Browse Source

提交箱管

caojunjie 2 năm trước cách đây
mục cha
commit
26018130e3

+ 18 - 16
src/components/boxCost/index.vue

@@ -1,6 +1,6 @@
 <template>
   <trade-card title="费用信息">
-    <el-tabs v-model="activeName" @tab-click="handleClick">
+    <el-tabs v-model="activeNameTwo" @tab-click="handleClick">
       <el-tab-pane label="应收" name="first" :key="'first'" v-if="tabShow == 1 || tabShow == 2">
       </el-tab-pane>
       <el-tab-pane label="应付" name="second" :key="'second'" v-if="tabShow == 1 || tabShow == 3">
@@ -463,27 +463,27 @@ export default {
         placeholder: "请点击右边按钮选择",
         dicData: []
       },
-      activeName: "first"
+      activeNameTwo: "first"
     }
   },
   watch: {
     listData(newVla, oldVal) {
       this.data_one = newVla.filter(item => item.feesType === 1); //应收
       this.data_two = newVla.filter(item => item.feesType === 2); //应付
-      if (this.activeName === "first") {
+      if (this.activeNameTwo === "first") {
         this.dataList = this.data_one;
       } else {
         this.dataList = this.data_two;
       }
+      this.key++
     },
     code(newVla, oldVal) {
       if (this.code){
         this.findObject(this.option.column, "code").dicUrl = `/api/blade-box-tube/archives/selectArchivesByCodeList?code=${this.code}`
       }
-      console.log(this.code)
       this.key++
     },
-    activeName(newVla, oldVal) {
+    activeNameTwo(newVla, oldVal) {
       if (newVla !== oldVal) {
         if (newVla === "first") {
           this.data_two = this.dataList;
@@ -534,10 +534,10 @@ export default {
       this.optionBack = this.boxTube
     }
     if (!this.codeValue) this.codeValue = 235.2
-    // 判断tabShow的activeName默认的显示
-    this.activeName = this.tabShow == 1 ? "first" : this.tabShow == 2 ? "first" : "second";
+    // 判断activeNameTwo默认的显示
+    this.activeNameTwo = this.activeName
     this.option = await this.getColumnData(this.getColumnName(this.codeValue), this.optionBack);
-    if (this.activeName === "first") {
+    if (this.activeNameTwo === "first") {
       this.findObject(this.option.column, "corpName").label = "收款对象"
     } else {
       this.findObject(this.option.column, "corpName").label = "付款对象"
@@ -574,7 +574,7 @@ export default {
   },
   methods: {
     handleClick(tab, event) {
-      // this.activeName = tab.name
+      this.activeNameTwo = tab.name
       if (tab.name === "first") {
         this.findObject(this.option.column, "corpName").label = "收款对象"
       } else {
@@ -584,18 +584,20 @@ export default {
     rowSave(form, done, loading) {
       done({
         ...form,
-        feesType: this.activeName === "first" ? 1 : 2,
+        feesType: this.activeNameTwo === "first" ? 1 : 2,
         sort: this.dataList.length
       })
-      if (this.activeName === "first") {
-        this.$emit("callBack", this.dataList.concat(this.data_two));
+      if (this.activeNameTwo === "first") {
+        this.dataList = this.dataList.concat(this.data_two)
+        this.$emit("callBack", this.dataList);
       } else {
-        this.$emit("callBack", this.data_one.concat(this.dataList));
+        this.dataList = this.dataList.concat(this.data_one)
+        this.$emit("callBack", this.dataList);
       }
     },
     rowUpdate(form, index, done, loading) {
       done(form)
-      if (this.activeName === "first") {
+      if (this.activeNameTwo === "first") {
         this.$emit("callBack", this.dataList.concat(this.data_two));
       } else {
         this.$emit("callBack", this.data_one.concat(this.dataList));
@@ -613,7 +615,7 @@ export default {
             if (res.data.success) {
               this.dataList.splice(index, 1);
               this.$message.success("操作成功!");
-              if (this.activeName === "first") {
+              if (this.activeNameTwo === "first") {
                 this.$emit("callBack", this.dataList.concat(this.data_two));
               } else {
                 this.$emit("callBack", this.data_one.concat(this.dataList));
@@ -623,7 +625,7 @@ export default {
         } else {
           this.dataList.splice(index, 1);
           this.$message.success("操作成功!");
-          if (this.activeName === "first") {
+          if (this.activeNameTwo === "first") {
             this.$emit("callBack", this.dataList.concat(this.data_two));
           } else {
             this.$emit("callBack", this.data_one.concat(this.dataList));

+ 3 - 0
src/views/boxManagement/boxRepair/detailsPage.vue

@@ -342,6 +342,7 @@ export default {
         //附件和顶部按钮
         this.disabled = false
       }
+      this.key++
     },
     selectionChange(list) {
       this.selectionList = list
@@ -555,6 +556,7 @@ export default {
             this.disabled = false
           }
         }
+        this.key++
       })
     },
     //新增修改
@@ -708,6 +710,7 @@ export default {
         //附件和顶部按钮
         this.disabled = false
       }
+      this.key++
     },
     //自定义列重置
     async resetColumnTwo(ref, option, optionBack, code) {

+ 3 - 0
src/views/boxManagement/boxWashing/detailsPage.vue

@@ -342,6 +342,7 @@ export default {
         //附件和顶部按钮
         this.disabled = false
       }
+      this.key++
     },
     selectionChange(list) {
       this.selectionList = list
@@ -555,6 +556,7 @@ export default {
             this.disabled = false
           }
         }
+        this.key++
       })
     },
     //新增修改
@@ -708,6 +710,7 @@ export default {
         //附件和顶部按钮
         this.disabled = false
       }
+      this.key++
     },
     //自定义列重置
     async resetColumnTwo(ref, option, optionBack, code) {

+ 3 - 0
src/views/boxManagement/exportShipment/detailsPage.vue

@@ -818,6 +818,7 @@ export default {
         //附件和顶部按钮
         this.disabled = false
       }
+      this.key++
     },
     //打开箱档案导入
     importBox() {
@@ -1208,6 +1209,7 @@ export default {
             this.disabled = false
           }
         }
+        this.key++
       })
     },
     //新增修改
@@ -1388,6 +1390,7 @@ export default {
         //附件和顶部按钮
         this.disabled = false
       }
+      this.key++
     },
     //自定义列重置
     async resetColumnTwo(ref, option, optionBack, code) {

+ 3 - 0
src/views/boxManagement/importReturnTrip/detailsPage.vue

@@ -822,6 +822,7 @@ export default {
         //附件和顶部按钮
         this.disabled = false
       }
+      this.key++
     },
     //打开箱档案导入
     importBox() {
@@ -1211,6 +1212,7 @@ export default {
             this.disabled = false
           }
         }
+        this.key++
       }).catch(()=>{
         loading.close();
       })
@@ -1393,6 +1395,7 @@ export default {
         //附件和顶部按钮
         this.disabled = false
       }
+      this.key++
     },
     //自定义列重置
     async resetColumnTwo(ref, option, optionBack, code) {

+ 3 - 0
src/views/boxManagement/leaseIn/detailsPage.vue

@@ -928,6 +928,7 @@ export default {
         //附件和顶部按钮
         this.disabled = false
       }
+      this.key++
     },
     // 明细删除
     rowDel(row, index, type) {
@@ -1127,6 +1128,7 @@ export default {
             this.disabled = false
           }
         }
+        this.key++
       })
     },
     //新增修改
@@ -1302,6 +1304,7 @@ export default {
         //附件和顶部按钮
         this.disabled = false
       }
+      this.key++
     },
     //自定义列重置
     async resetColumnTwo(ref, option, optionBack, code) {

+ 8 - 5
src/views/boxManagement/leaseOut/detailsPage.vue

@@ -50,8 +50,8 @@
           @row-save="rowSave"
           @row-update="rowUpdate"
           @selection-change="selectionChange"
-          @resetColumn="resetColumnTwo('crud','option','optionBack',247.1)"
-          @saveColumn="saveColumnTwo('crud','option','optionBack',247.1)">
+          @resetColumn="resetColumnTwo('crud','option','optionBack',248.1)"
+          @saveColumn="saveColumnTwo('crud','option','optionBack',248.1)">
         <template slot-scope="{type,size,row,index,disabled}" slot="menu">
           <el-button icon="el-icon-edit" :size="size" :disabled="disabled" :type="type"
                      @click="$refs.crud.rowEdit(row,index)">编辑
@@ -98,7 +98,7 @@
         @onClose="onClose()"
     />
 <!--    费用信息组件-->
-    <box-cost v-model="dataListTwo" type="ZC" activeName="first" :codeValue="247.2" ref="boxCost"
+    <box-cost v-model="dataListTwo" type="ZC" activeName="first" :codeValue="248.2" ref="boxCost"
               @resetTrigger="resetTrigger"></box-cost>
     <trade-card title="附件明细">
       <c-upload
@@ -106,7 +106,7 @@
           :data="tradingBoxFilesList"
           :disabled="disabled"
           deleteUrl="/api/blade-box-tube/tradingBoxFiles/remove"
-          :enumerationValue="247.3"
+          :enumerationValue="248.3"
           display
       />
     </trade-card>
@@ -700,7 +700,7 @@ export default {
     }
   },
   async created() {
-    this.option = await this.getColumnData(this.getColumnName(247.1), this.optionBack);
+    this.option = await this.getColumnData(this.getColumnName(248.1), this.optionBack);
     selectByName("买箱费").then(res => {
       this.costData = res.data.data
     })
@@ -927,6 +927,7 @@ export default {
         //附件和顶部按钮
         this.disabled = false
       }
+      this.key++
     },
     // 明细删除
     rowDel(row, index, type) {
@@ -1129,6 +1130,7 @@ export default {
             this.disabled = false
           }
         }
+        this.key++
       })
     },
     //新增修改
@@ -1301,6 +1303,7 @@ export default {
         //附件和顶部按钮
         this.disabled = false
       }
+      this.key++
     },
     //自定义列重置
     async resetColumnTwo(ref, option, optionBack, code) {

+ 4 - 4
src/views/boxManagement/sellingContainers/detailsPage.vue

@@ -48,8 +48,8 @@
           :upload-delete="uploadDelete"
           @row-save="rowSave"
           @row-update="rowUpdate"
-          @resetColumn="resetColumnTwo('crud','option','optionBack',235.1)"
-          @saveColumn="saveColumnTwo('crud','option','optionBack',235.1)">
+          @resetColumn="resetColumnTwo('crud','option','optionBack',236.1)"
+          @saveColumn="saveColumnTwo('crud','option','optionBack',236.1)">
         <template slot-scope="{type,size,row,index,disabled}" slot="menu">
           <el-button icon="el-icon-edit" :size="size" :disabled="disabled" :type="type"
                      @click="$refs.crud.rowEdit(row,index)">编辑
@@ -88,7 +88,7 @@
           :data="tradingBoxFilesList"
           :disabled="disabled"
           deleteUrl="/api/blade-box-tube/tradingBoxFiles/remove"
-          :enumerationValue="235.3"
+          :enumerationValue="236.3"
           display
       />
     </trade-card>
@@ -539,7 +539,7 @@ export default {
     }
   },
   async created() {
-    this.option = await this.getColumnData(this.getColumnName(235.1), this.optionBack);
+    this.option = await this.getColumnData(this.getColumnName(236.1), this.optionBack);
     selectByName("卖箱费").then(res => {
       this.costData = res.data.data
     })