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 |   62 +++++++++++++++++++++++--------
 1 files changed, 46 insertions(+), 16 deletions(-)

diff --git a/src/views/project/travelexpenseapply/travelexpensedetail/index.vue b/src/views/project/travelexpenseapply/travelexpensedetail/index.vue
index 214cc38..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,7 +2196,6 @@
     submitForm: debounce(function(data) {
       this.$refs["form"].validate(valid => {
         if (valid) {
-
           //绁ㄦ嵁鏂囦欢澶勭悊
           const addnumber = this.rbPayees.reduce(
             (amount, item) => amount + Number(item.amount),
@@ -2187,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 => {
             //淇濆瓨鏄庣粏
@@ -2211,8 +2241,9 @@
                 addReimbursementpayee(rbPayees[i]);
               }
             }
-
-            this.$modal.msgSuccess("淇敼鎶ラ攢鍗曚繚瀛樻垚鍔�!");
+            if (this.userprofile.nickName != "闄堟厱鍗�") {
+              this.$modal.msgSuccess("淇敼鎶ラ攢鍗曚繚瀛樻垚鍔燂紒");
+            }
             this.open = false;
 
             // 鍏抽棴绐楀彛
@@ -2808,8 +2839,7 @@
         "departure",
         "destination",
         "traffictype",
-        "traffictype2",
-        "departure"
+        "traffictype2"
       ];
       columns.forEach((column, index) => {
         if (index === 0) {

--
Gitblit v1.9.3