gjy há 3 anos atrás
pai
commit
77b4edfb7d

+ 16 - 0
src/views/taskManagement/tranManagementTransportAdd.vue

@@ -219,6 +219,7 @@
             @change="(val) => {engflagchange(val, index)}"
             class="endflag"
             true-label="1"
+            :disabled='disabled'
             false-label="0"
             v-model="item.endFlag"
             :label="1"
@@ -415,6 +416,7 @@ export default {
     let self = this
     return {
       checkList: [],
+      disabled:false,
       deptBudgetList: {
         taskNo: '',
         totalStorage: 0,
@@ -596,6 +598,20 @@ export default {
       this.deptBudgetList.tranProcessInfoList[0].weight = e
     },
     engflagchange(e, index) {
+      this.$confirm('选择结算阶段后不可修改,是否确定选择?', {
+          distinguishCancelAndClose: true,
+          confirmButtonText: '确定',
+          cancelButtonText: '取消'
+        })
+          .then(() => {
+            this.$message({
+              type: 'success',
+              message: '选择成功'
+            });
+            this.disabled=true
+          })
+          .catch(action => {
+          });
       for(var i=0;i<this.deptBudgetList.tranProcessInfoList.length;i++){
         this.deptBudgetList.tranProcessInfoList[i].endFlag='0'
       }

+ 23 - 0
src/views/taskManagement/tranManagementTransportEdit.vue

@@ -219,6 +219,7 @@
           <el-checkbox
             @change="(val) => {engflagchange(val, index)}"
             class="endflag"
+            :disabled='disabled'
             true-label="1"
             false-label="0"
             v-model="item.endFlag"
@@ -400,6 +401,7 @@ import {
   xialaNo,
   examinetran,
   delhaulagestage,
+  
   getstaff
 } from '@/model/tasksport/index'
 import WsUpload from '@/components/WsUpload'
@@ -426,6 +428,7 @@ export default {
       radio: '1',
       carModelList: [],
       carLengthList: [],
+      disabled:false,
       warehouseType: '1',
       options_: regionData,
       heightData: '600px',
@@ -570,6 +573,20 @@ export default {
       }
     },
     engflagchange(e,index) {
+      this.$confirm('选择结算阶段后不可修改,是否确定选择?', {
+          distinguishCancelAndClose: true,
+          confirmButtonText: '确定',
+          cancelButtonText: '取消'
+        })
+          .then(() => {
+            this.$message({
+              type: 'success',
+              message: '选择成功'
+            });
+            this.disabled=true
+          })
+          .catch(action => {
+          });
        for(var i=0;i<this.deptBudgetList.tranProcessInfoList.length;i++){
         this.deptBudgetList.tranProcessInfoList[i].endFlag='0'
       }
@@ -599,7 +616,13 @@ export default {
           //     this.endflag = '1'
           //   }
           // }
+        
           this.deptBudgetList = response
+          if(this.deptBudgetList.tranProcessInfoList.some( function( item, index, array ){ 
+    return item.endFlag==1
+})){
+  this.disabled=true
+}
           this.number = response.tranProcessInfoList.length + 1
           this.count = response.count + 1
           if (