QuKatie 3 vuotta sitten
vanhempi
commit
09c904ce66

+ 1 - 1
src/cache.js

@@ -11,7 +11,7 @@ Vue.mixin({
   },
   beforeRouteLeave: function (to, from, next) {
     if (store.getters.tagList.length >= 8 && !store.getters.tagList.find(res => to.fullPath == res.value)) {
-      this.$confirm('tab页面数量已超出限制,请关闭tab页再打开', '温馨提示', {
+      this.$confirm('打开页面数超出最大限制,请先关闭其它页面!', '温馨提示', {
         confirmButtonText: '确定',
         showCancelButton: false,
         type: 'warning'

+ 47 - 15
src/views/exportTrade/customerInquiry/detailsPage.vue

@@ -1774,7 +1774,16 @@ export default {
                 );
                 this.oldExchange = this.deepClone(this.form.exchangeRate);
                 if (status == "goBack") {
+                  if (this.form.id) {
+                    this.unLock({
+                      moduleName: "bj",
+                      tableName: "business_order",
+                      billId: this.form.id,
+                      billNo: this.form.orgOrderNo,
+                    });
+                  }
                   this.$emit("goBack");
+                  this.leaveDetailsKey(this.$route.name);
                 }
               }
             })
@@ -1803,10 +1812,28 @@ export default {
             this.editCustomer("goBack");
           })
           .catch(() => {
+            if (this.form.id) {
+              this.unLock({
+                moduleName: "bj",
+                tableName: "business_order",
+                billId: this.form.id,
+                billNo: this.form.orgOrderNo,
+              });
+            }
             this.$emit("goBack");
+            this.leaveDetailsKey(this.$route.name);
           });
       } else {
+        if (this.form.id) {
+          this.unLock({
+            moduleName: "bj",
+            tableName: "business_order",
+            billId: this.form.id,
+            billNo: this.form.orgOrderNo,
+          });
+        }
         this.$emit("goBack");
+        this.leaveDetailsKey(this.$route.name);
       }
     },
     openReport() {
@@ -1861,22 +1888,27 @@ export default {
       return sums;
     },
     openEdit() {
-      // const data = {
-      //   // moduleName: "bj",
-      //   // tableName: "business_order",
-      //   billId: this.form.id,
-      //   no: localStorage.getItem('browserID')
-      // };
-      // this.saveLoading = true;
-      // this.checkLock(data).then(res => {
-      //   if (res.data.code == 200) {
-      //     this.onLock(data).then(response => {});
-      //     this.detailData.status = 2;
-      //     this.option = this.$options.data().option;
-      //   }
-      // });
-      this.detailData.status = 2;
+      const data = {
+        moduleName: "bj",
+        tableName: "business_order",
+        billId: this.form.id,
+        no: localStorage.getItem("browserID"),
+        billNo: this.form.orgOrderNo,
+      };
+      this.inDetailsKey(this.$route.name, {
+        moduleName: "bj",
+        tableName: "business_order",
+        billId: this.form.id,
+        billNo: this.form.orgOrderNo,
+      });
+      this.saveLoading = true;
+      this.checkLock(data).then(res => {
+        if (res.data.code == 200) {
+          this.onLock(data);
+          this.detailData.status = 2;
           this.option = this.$options.data().option;
+        }
+      });
     },
     async saveColumn() {
       const inSave = await this.saveColumnData(

+ 1 - 1
src/views/exportTrade/customerInquiry/index.vue

@@ -120,7 +120,7 @@
             type="text"
             icon="el-icon-edit"
             size="small"
-            @click.stop="editOpen(scope.row, 2)"
+            @click.stop="editOpen(scope.row, 1)"
             >编辑
           </el-button>
           <el-button

+ 24 - 5
src/views/exportTrade/salesContract/detailsPage.vue

@@ -1929,15 +1929,16 @@ export default {
               );
               this.oldExchange = this.deepClone(this.form.exchangeRate);
               if (status == "goBack") {
-                this.$emit("goBack");
-                this.leaveDetailsKey(this.$route.name);
                 if (this.form.id) {
                   this.unLock({
                     moduleName: "xs",
                     tableName: "business_order",
-                    billId: this.form.id
+                    billId: this.form.id,
+                    billNo: this.form.orgOrderNo,
                   });
                 }
+                this.$emit("goBack");
+                this.leaveDetailsKey(this.$route.name);
               }
             })
             .finally(() => {
@@ -2015,10 +2016,26 @@ export default {
             this.editCustomer("goBack");
           })
           .catch(() => {
+            if (this.form.id) {
+              this.unLock({
+                moduleName: "xs",
+                tableName: "business_order",
+                billId: this.form.id,
+                billNo: this.form.orgOrderNo,
+              });
+            }
             this.$emit("goBack");
             this.leaveDetailsKey(this.$route.name);
           });
       } else {
+        if (this.form.id) {
+          this.unLock({
+            moduleName: "xs",
+            tableName: "business_order",
+            billId: this.form.id,
+            billNo: this.form.orgOrderNo,
+          });
+        }
         this.$emit("goBack");
         this.leaveDetailsKey(this.$route.name);
       }
@@ -2093,12 +2110,14 @@ export default {
         moduleName: "xs",
         tableName: "business_order",
         billId: this.form.id,
-        no: localStorage.getItem("browserID")
+        no: localStorage.getItem("browserID"),
+        billNo: this.form.orgOrderNo,
       };
       this.inDetailsKey(this.$route.name, {
         moduleName: "xs",
         tableName: "business_order",
-        id: this.form.id
+        billId: this.form.id,
+        billNo: this.form.orgOrderNo,
       });
       this.saveLoading = true;
       this.checkLock(data).then(res => {