From e55484fc73e5d7dd3ae0a904a9d4eb56260cd6a4 Mon Sep 17 00:00:00 2001
From: WXL <1785969728@qq.com>
Date: 星期五, 13 十月 2023 10:31:13 +0800
Subject: [PATCH] 11
---
src/views/project/travelexpenseapply/travelexpensedetail/index.vue | 118 +++++++++++++++++++++++------------------------------------
1 files changed, 46 insertions(+), 72 deletions(-)
diff --git a/src/views/project/travelexpenseapply/travelexpensedetail/index.vue b/src/views/project/travelexpenseapply/travelexpensedetail/index.vue
index f9798b0..bb80450 100644
--- a/src/views/project/travelexpenseapply/travelexpensedetail/index.vue
+++ b/src/views/project/travelexpenseapply/travelexpensedetail/index.vue
@@ -111,11 +111,11 @@
</el-form-item>
</el-col>
<el-col :span="5">
- <el-form-item label="棰勫鐘舵��" prop="infoid">
+ <el-form-item label="鐢宠鏉愭枡鐘舵��" prop="infoid">
<el-select
v-model="form.checkstatus"
filterable
- placeholder="璇烽�夋嫨棰勫鐘舵��"
+ placeholder="璇烽�夋嫨鐢宠鏉愭枡鐘舵��"
>
<el-option
v-for="item in baselisttages"
@@ -917,6 +917,25 @@
v-if="operationType == 'check'"
>
<el-col :span="7">
+ <el-form-item label="鐢宠鏉愭枡鐘舵��" prop="infoid">
+ <el-radio-group
+ v-model="form.checkstatus"
+ align="left"
+ :disabled="userprofile.nickName != '闄堟厱鍗�'"
+ >
+ <el-radio label="1">寰呯敵璇锋潗鏂�</el-radio>
+ <el-radio label="2">鐢宠鏉愭枡閫氳繃绛夊緟鏉愭枡</el-radio>
+ <el-radio label="3">宸叉敹鍒版姤閿�鏉愭枡</el-radio>
+ </el-radio-group>
+ </el-form-item>
+ </el-col>
+ </el-row>
+
+ <el-row
+ style="margin-top: 25px; margin-bottom: 5px"
+ v-if="operationType == 'check'"
+ >
+ <el-col :span="7">
<el-form-item label="瀹℃牳缁撴灉" align="left">
<el-radio-group v-model="checkObj.flowlevelone" align="left">
<el-radio label="1">閫氳繃</el-radio>
@@ -937,14 +956,14 @@
<el-button
type="primary"
@click="submitForm"
- v-if="operationType == 'edit'||beforehandType=='1'"
+ v-if="operationType == 'edit'||userprofile.nickName == '闄堟厱鍗�'"
>淇� 瀛�</el-button
>
<el-button
type="primary"
@click="checksubmit"
- v-if="operationType == 'check'&& beforehandType!='1'"
- >鎻� 浜�</el-button
+ v-if="operationType == 'check'"
+ >鎻愪氦瀹℃牳</el-button
>
<!--<el-button @click="cancel">閫� 鍑�</el-button>-->
</div>
@@ -1243,6 +1262,8 @@
queryParamsPayee: {
rbid: null
},
+ // 褰撳墠鐢ㄦ埛淇℃伅
+ userprofile: {},
// 琛ㄥ崟鍙傛暟
form: {},
reimbursementList: [],
@@ -1273,16 +1294,16 @@
baselisttages: [
{
id: 1,
- name: "寰呴瀹�"
+ name: "寰呯敵璇锋潗鏂�"
},
{
id: 2,
- name: "棰勫閫氳繃绛夊緟鏉愭枡"
+ name: "鐢宠鏉愭枡閫氳繃绛夊緟鏉愭枡"
},
{
id: 3,
name: "宸叉敹鍒版姤閿�鏉愭枡"
- },
+ }
],
baselist: [],
donatorList: [],
@@ -1301,7 +1322,6 @@
persontype: null,
//鍒拌揪鍦�
arriveAddr: null,
- beforehandType:null,
headers: {
Authorization: "Bearer " + getToken()
},
@@ -1330,6 +1350,7 @@
//鑾峰彇鐧诲綍鑰呬俊鎭�
getUserProfile().then(response => {
+ this.userprofile = response.data;
this.defaultperson = response.data;
this.standardlevel = response.data.standardlevel;
console.log("this.defaultperson", this.defaultperson);
@@ -1363,7 +1384,6 @@
let curId = this.$route.query.id;
let pos = this.$route.query.pos;
this.defaultperson = this.$route.query.routerparam;
- this.beforehandType = this.$route.query.beforehandType;
if (pos == 1) {
this.handleAdd(curId);
} else if (pos == 2) {
@@ -2136,6 +2156,14 @@
//鎻愪氦瀹℃牳鎰忚
checksubmit() {
+ if (
+ this.form.checkstatus != 3 &&
+ this.userprofile.nickName == "闄堟厱鍗�" &&
+ this.checkObj.flowlevelone == 1
+ ) {
+ this.$modal.msgError("璇烽�夌‘璁ゆ潗鏂欑姸鎬佸凡鏀跺埌锛�");
+ return;
+ }
let checkfundobj = {
flowconclusion: this.checkObj.flowlevelone,
flowcontent: this.checkObj.flowconclusion,
@@ -2155,6 +2183,9 @@
this.reset();
this.open = false;
this.$modal.msgSuccess("鎻愪氦瀹℃牳鎴愬姛!");
+ if (this.userprofile.nickName == "闄堟厱鍗�") {
+ this.submitForm();
+ }
// 鍏抽棴绐楀彛
this.$store.dispatch("tagsView/delView", this.$route);
this.$router.go(-1);
@@ -2165,63 +2196,6 @@
submitForm: debounce(function(data) {
this.$refs["form"].validate(valid => {
if (valid) {
- // idisabled=true;
- /**
- let indexErrTime = this.rbDetails.findIndex((item) => {
- if (item.endtime && item.starttime) {
- let d = this.$moment(item.endtime).diff(this.$moment(item.starttime), "d");
- if (d < 0) {
- return true;
- } else {
- return false;
- }
- } else {
- false;
- }
- });
-
- if (indexErrTime > -1) {
- this.$message({
- message: "绗�" + (indexErrTime + 1) + "琛屽埌杈炬棩鏈熸棭浜庡嚭鍙戞棩鏈�",
- type: "warning",
- });
- return;
- }
-
- let emptyStartTimeindex = this.rbDetails.findIndex(
- (item) => item.starttime == null || item.starttime == undefined || item.starttime == ""
- );
-
- if (emptyStartTimeindex > -1) {
- this.$message({
- message: "绗�" + (emptyStartTimeindex + 1) + "琛屽嚭鍙戞棩鏈熶负绌�",
- type: "warning",
- });
- return;
- }
-
- let emptyEndTimeindex = this.rbDetails.findIndex(
- (item) => item.endtime == null || item.endtime == undefined || item.endtime == ""
- );
-
- if (emptyEndTimeindex > -1) {
- this.$message({
- message: "绗�" + (emptyEndTimeindex + 1) + "琛屽埌杈炬棩鏈熶负绌�",
- type: "warning",
- });
- return;
- }
-
- //璐圭敤褰掑睘
- let belongArr = this.dict.type.sys_travelexpensebelong;
- let costtypeindex = belongArr.findIndex(
- (item) => this.form.costtype == item.value
- );
- if (costtypeindex > -1) {
- this.form.costtypename = belongArr[costtypeindex].label;
- }
- */
-
//绁ㄦ嵁鏂囦欢澶勭悊
const addnumber = this.rbPayees.reduce(
(amount, item) => amount + Number(item.amount),
@@ -2243,7 +2217,7 @@
const rbDetails = [...this.rbDetails];
const rbPayees = [...this.rbPayees];
if (this.form.id != null) {
- console.log(this.form);
+ console.log(this.form);
updateReimbursement(this.form);
// .then(res => {
//淇濆瓨鏄庣粏
@@ -2267,8 +2241,9 @@
addReimbursementpayee(rbPayees[i]);
}
}
-
- this.$modal.msgSuccess("淇敼鎶ラ攢鍗曚繚瀛樻垚鍔�!");
+ if (this.userprofile.nickName != "闄堟厱鍗�") {
+ this.$modal.msgSuccess("淇敼鎶ラ攢鍗曚繚瀛樻垚鍔燂紒");
+ }
this.open = false;
// 鍏抽棴绐楀彛
@@ -2864,8 +2839,7 @@
"departure",
"destination",
"traffictype",
- "traffictype2",
- "departure"
+ "traffictype2"
];
columns.forEach((column, index) => {
if (index === 0) {
--
Gitblit v1.9.3