Parcourir la source

Merge branch 'dev' of http://git.echepei.com/caojunjie/Smart_platform_ui into dev

QuKatie il y a 3 ans
Parent
commit
ac65c56226

+ 7 - 0
src/page/index/top/top-notice.vue

@@ -141,4 +141,11 @@ export default {
   ::v-deep .avue-notice__more {
     display: none;
   }
+  ::v-deep .avue-notice__title {
+    display: flex;
+    align-items: center;
+  }
+  ::v-deep .avue-notice__tag {
+    margin-left: 15px;
+  }
 </style>

+ 25 - 3
src/views/businessManagement/deliveryNotice/detailsPageEdit.vue

@@ -11,9 +11,9 @@
         <el-button
           v-if="detailData.seeDisabled"
           size="small"
-          @click="detailData.seeDisabled = false"
+          @click="editHandle"
           type="primary"
-        >编辑</el-button>
+        >编 辑</el-button>
         <el-button
           class="el-button--small-yh"
           type="primary"
@@ -1631,9 +1631,11 @@ export default {
           }
           this.saveLoading = true
           this.form.billType = 'FH'
+          // 如果有id解锁,没有跳过
+          this.form.id && this.unLock({moduleName: 'fh',tableName: 'business_delivery', billId: this.form.id})
           typeSave(this.form).then(res => {
             this.$message({type: "success", message: this.form.id ? "修改成功!" : "新增成功!"});
-            // this.disabled = false
+            this.detailData.seeDisabled = true;
             if (isBack) {
               //成功关闭此页面回到列表页
               this.$emit("goBack");
@@ -1984,6 +1986,26 @@ export default {
       params.srcOrderno = this.form.orderNo
       callback(params)
     },
+    // 编辑
+    editHandle() {
+      const data = {
+        moduleName: 'fh',
+        tableName: 'business_delivery',
+        billId: this.form.id,
+        no: 87654567
+      }
+      this.saveLoading = true
+      this.checkLock(data).then(res => {
+        if (res.data.code == 200) {
+          this.onLock(data).then(response => {
+          })
+          this.detailData.seeDisabled = false;
+        }
+      }).catch(error => {
+      }).finally(() => {
+        this.saveLoading = false
+      })
+    },
   }
 }
 </script>

+ 29 - 17
src/views/businessManagement/deliveryNotice/index.vue

@@ -63,20 +63,13 @@
         <template slot-scope="scope" slot="menu">
 <!--          <el-button-->
 <!--            type="text"-->
-<!--            icon="el-icon-view"-->
+<!--            icon="el-icon-edit"-->
 <!--            size="small"-->
-<!--            @click.stop="beforeOpenPage(scope.row,scope.index)"-->
-<!--          >查看-->
+<!--            @click.stop="editOpen(scope.row,scope.index)"-->
+<!--          >编辑-->
 <!--          </el-button>-->
           <el-button
             type="text"
-            icon="el-icon-edit"
-            size="small"
-            @click.stop="editOpen(scope.row,scope.index)"
-          >编辑
-          </el-button>
-          <el-button
-            type="text"
             icon="el-icon-delete"
             size="small"
             @click.stop="rowDel(scope.row,scope.index)"
@@ -256,13 +249,32 @@ export default {
     },
     //查看跳转页面
     beforeOpenPage(row, index) {
-      // /deliveryNotice_detailsPageEdit
-      this.detailData = {
-        id: row.id,
-        seeDisabled: true,
-      };
-      this.isShow = false;
-      this.$store.commit("IN_IN_DETAIL");
+      const data = {
+        moduleName: 'fh',
+        tableName: 'business_delivery',
+        billId: row.id,
+        no: 87654567
+      }
+      this.checkLock(data).then(res => {
+        if (res.data.code == 200) {
+          this.onLock(data).then(response => {
+          })
+          this.detailData = {
+            seeDisabled: true,
+            id: row.id,
+          };
+          this.isShow = false;
+          this.$store.commit("IN_IN_DETAIL");
+        }
+      }).catch(err => {
+        this.detailData = {
+          id: row.id,
+          seeDisabled: true,
+          opDisabled: true
+        };
+        this.isShow = false;
+        this.$store.commit("IN_IN_DETAIL");
+      })
     },
     //新增跳转页面
     beforeOpen(row, index) {

+ 26 - 5
src/views/businessManagement/purchaseOrder/detailsPageEdit.vue

@@ -9,12 +9,13 @@
       </div>
       <div class="add-customer-btn">
         <el-button
-          v-if="detailData.seeDisabled && !detailData.opDisabled"
+          v-if="detailData.seeDisabled"
           size="small"
-          @click="detailData.seeDisabled = false"
+          @click="editHandle"
           type="primary"
           style="margin-right: 8px"
-        >编辑</el-button>
+          :loading="saveLoading"
+        >编 辑</el-button>
 <!--        <el-dropdown style="margin-right: 8px;">-->
 <!--          <el-button-->
 <!--            type="primary"-->
@@ -1524,10 +1525,11 @@ export default {
           this.saveLoading = true
           this.form.billType = 'CG'
           this.$set(this.form, 'tradeType', 'GN')
-          this.form.id && this.unLock({moduleName: 'cg',tableName: 'order', billId: this.form.id})
+          // 如果有id解锁,没有跳过
+          this.form.id && this.unLock({moduleName: 'cg',tableName: 'business_order', billId: this.form.id})
           typeSave(this.form).then(res => {
             this.$message({type: "success", message: this.form.id ? "修改成功!" : "新增成功!"});
-            // this.saveLoading = false
+            this.detailData.seeDisabled = true;
             if (isBack) {
               //成功关闭此页面回到列表页
               this.$emit("goBack");
@@ -1825,6 +1827,25 @@ export default {
     choceScheduleFun(){
       this.checkScheduleDialog = false
     },
+    editHandle() {
+      const data = {
+        moduleName: 'cg',
+        tableName: 'business_order',
+        billId: this.form.id,
+        no: 87654567
+      }
+      this.saveLoading = true
+      this.checkLock(data).then(res => {
+        if (res.data.code == 200) {
+          this.onLock(data).then(response => {
+          })
+          this.detailData.seeDisabled = false;
+        }
+      }).catch(error => {
+      }).finally(() => {
+        this.saveLoading = false
+      })
+    },
   }
 }
 </script>

+ 31 - 21
src/views/businessManagement/purchaseOrder/index.vue

@@ -47,20 +47,13 @@
         <template slot-scope="scope" slot="menu">
 <!--          <el-button-->
 <!--            type="text"-->
-<!--            icon="el-icon-view"-->
+<!--            icon="el-icon-edit"-->
 <!--            size="small"-->
-<!--            @click.stop="beforeOpenPage(scope.row,scope.index)"-->
-<!--          >查看-->
+<!--            @click.stop="editOpen(scope.row,scope.index)"-->
+<!--          >编辑-->
 <!--          </el-button>-->
           <el-button
             type="text"
-            icon="el-icon-edit"
-            size="small"
-            @click.stop="editOpen(scope.row,scope.index)"
-          >编辑
-          </el-button>
-          <el-button
-            type="text"
             icon="el-icon-delete"
             size="small"
             @click.stop="rowDel(scope.row,scope.index)"
@@ -279,12 +272,32 @@ export default {
     },
     //查看跳转页面
     beforeOpenPage(row, index) {
-      this.detailData = {
-        id: row.id,
-        seeDisabled: true,
-      };
-      this.isShow = false;
-      this.$store.commit("DOMCG_IN_DETAIL");
+      const data = {
+        moduleName: 'cg',
+        tableName: 'business_order',
+        billId: row.id,
+        no: 87654567
+      }
+      this.checkLock(data).then(res => {
+        if (res.data.code == 200) {
+          this.onLock(data).then(response => {
+          })
+          this.detailData = {
+            seeDisabled: true,
+            id: row.id,
+          };
+          this.isShow = false;
+          this.$store.commit("DOMCG_IN_DETAIL");
+        }
+      }).catch(err => {
+        this.detailData = {
+          id: row.id,
+          seeDisabled: true,
+          opDisabled: true
+        };
+        this.isShow = false;
+        this.$store.commit("DOMCG_IN_DETAIL");
+      })
     },
     //新增跳转页面
     beforeOpen(row, index) {
@@ -297,23 +310,20 @@ export default {
     editOpen(row, index) {
       const data = {
         moduleName: 'cg',
-        tableName: 'order',
+        tableName: 'business_order',
         billId: row.id,
         no: 87654567
       }
       this.checkLock(data).then(res => {
         if (res.data.code == 200) {
-          this.onLock(data).then(response => {
-            console.log(response)
-          })
           this.detailData = {
+            seeDisabled: true,
             id: row.id,
           };
           this.isShow = false;
           this.$store.commit("DOMCG_IN_DETAIL");
         }
       }).catch(err => {
-        console.log(JSON.stringify(err.message))
         this.detailData = {
           id: row.id,
           seeDisabled: true,

+ 23 - 3
src/views/businessManagement/receipt/detailsPageEdit.vue

@@ -11,9 +11,9 @@
         <el-button
           v-if="detailData.seeDisabled"
           size="small"
-          @click="detailData.seeDisabled = false"
+          @click="editHandle"
           type="primary"
-        >编辑</el-button>
+        >编 辑</el-button>
         <el-button type="primary"
                    size="small"
                    :disabled="!form.id"
@@ -1350,10 +1350,11 @@ export default {
           if (typeof this.form.corpsTypeId == 'object') {
             this.form.corpsTypeId = this.form.corpsTypeId.join(",")
           }
+          this.form.id && this.unLock({moduleName: 'sh',tableName: 'business_delivery', billId: this.form.id})
           this.saveLoading = true
           typeSave(this.form).then(res => {
+            this.detailData.seeDisabled = true;
             this.$message({type: "success", message: this.form.id ? "修改成功!" : "新增成功!"});
-            // this.saveLoading = false
             if (isBack) {
               //成功关闭此页面回到列表页
               this.$emit("goBack");
@@ -1456,6 +1457,25 @@ export default {
     closeDialog() {
       this.messageVisble = false
     },
+    editHandle() {
+      const data = {
+        moduleName: 'sh',
+        tableName: 'business_delivery',
+        billId: this.form.id,
+        no: 87654567
+      }
+      this.saveLoading = true
+      this.checkLock(data).then(res => {
+        if (res.data.code == 200) {
+          this.onLock(data).then(response => {
+          })
+          this.detailData.seeDisabled = false;
+        }
+      }).catch(error => {
+      }).finally(() => {
+        this.saveLoading = false
+      })
+    },
   }
 }
 </script>

+ 27 - 17
src/views/businessManagement/receipt/index.vue

@@ -63,20 +63,13 @@
         <template slot-scope="scope" slot="menu">
 <!--          <el-button-->
 <!--            type="text"-->
-<!--            icon="el-icon-view"-->
+<!--            icon="el-icon-edit"-->
 <!--            size="small"-->
-<!--            @click.stop="beforeOpenPage(scope.row,scope.index)"-->
-<!--          >查看-->
+<!--            @click.stop="editOpen(scope.row,scope.index)"-->
+<!--          >编辑-->
 <!--          </el-button>-->
           <el-button
             type="text"
-            icon="el-icon-edit"
-            size="small"
-            @click.stop="editOpen(scope.row,scope.index)"
-          >编辑
-          </el-button>
-          <el-button
-            type="text"
             icon="el-icon-delete"
             size="small"
             @click.stop="rowDel(scope.row,scope.index)"
@@ -259,13 +252,30 @@ export default {
     },
     //查看跳转页面
     beforeOpenPage(row, index) {
-      // /receipt_detailsPageEdit
-      this.detailData = {
-        id: row.id,
-        seeDisabled: true,
-      };
-      this.isShow = false;
-      this.$store.commit("DOM_IN_DETAIL");
+      const data = {
+        moduleName: 'sh',
+        tableName: 'business_delivery',
+        billId: row.id,
+        no: 87654567
+      }
+      this.checkLock(data).then(res => {
+        if (res.data.code == 200) {
+          this.detailData = {
+            seeDisabled: true,
+            id: row.id,
+          };
+          this.isShow = false;
+          this.$store.commit("DOM_IN_DETAIL");
+        }
+      }).catch(err => {
+        this.detailData = {
+          id: row.id,
+          seeDisabled: true,
+          opDisabled: true
+        };
+        this.isShow = false;
+        this.$store.commit("DOM_IN_DETAIL");
+      })
     },
     //新增跳转页面
     beforeOpen(row, index) {

+ 26 - 5
src/views/businessManagement/salesOrder/detailsPageEdit.vue

@@ -11,10 +11,10 @@
         <el-button
           v-if="detailData.seeDisabled"
           size="small"
-          @click="detailData.seeDisabled = false"
+          @click="editHandle"
           type="primary"
           style="margin-right: 8px"
-        >编辑</el-button>
+        >编 辑</el-button>
         <el-dropdown style="margin-right: 8px;">
           <el-button
             type="primary"
@@ -127,7 +127,7 @@
                 <el-select v-else-if="item.prop === 'paymentType'" v-model="form[item.prop]" placeholder="请选择" clearable filterable style="width: 100%" size="small" :disabled="detailData.seeDisabled || browse">
                   <el-option v-for="(item,index) in paymentOption" :key="index" :label="item.dictValue" :value="item.dictValue"></el-option>
                 </el-select>
-                <el-select v-else-if="item.prop === 'packageRemarks'" v-model="form[item.prop]" placeholder="请选择" clearable filterable style="width: 100%" size="small" :disabled="detailData.seeDisabled || browse">
+                <el-select v-else-if="item.prop === 'packageRemarks'" v-model="form[item.prop]" placeholder="请选择" clearable filterable allow-create default-first-option style="width: 100%" size="small" :disabled="detailData.seeDisabled || browse">
                   <el-option v-for="(item,index) in packageOptions" :key="index" :label="item.dictValue" :value="item.dictValue"></el-option>
                 </el-select>
                 <el-select v-else-if="item.prop === 'arrivalAddress'" v-model="form[item.prop]" placeholder="请选择" clearable filterable style="width: 100%" size="small" :disabled="detailData.seeDisabled || browse" allow-create default-first-option>
@@ -2165,7 +2165,6 @@ export default {
     choice(row) {
       this.dialogCost = !this.dialogCost
       this.choiceData = true
-      console.log(row)
       this.choiceIndex = row.$index
     },
     // 去重
@@ -2251,7 +2250,6 @@ export default {
     commodityChoice(row) {
       this.dialogVisible = !this.dialogVisible
       this.commodityData = true
-      console.log(row)
       this.choiceIndexT = row.$index
     },
     //导入商品触发
@@ -2893,8 +2891,11 @@ export default {
             this.form.corpsTypeId = this.form.corpsTypeId.join(",")
           }
           this.form.billType = 'XS'
+          // 如果有id解锁,没有跳过
+          this.form.id && this.unLock({moduleName: 'xs',tableName: 'business_order', billId: this.form.id})
           this.saveLoading = true
           typeSave(this.form).then(res => {
+            this.detailData.seeDisabled = true;
             this.$message({type: "success", message: this.form.id ? "修改成功!" : "新增成功!"});
             if (isBack) {
               //成功关闭此页面回到列表页
@@ -3015,6 +3016,7 @@ export default {
       let getGoodsList = []
       let getGiftList = []
       let getFeeList = this.$refs.feeInfo.submitData()
+      debugger
       if (this.goodsActives == 'gift') {
         getGiftList = this.goodsShowData
         getGoodsList = this.contactsData
@@ -3317,6 +3319,25 @@ export default {
       (val == 1) && (row.price = 0)
       this.priceChange(row)
     },
+    editHandle() {
+      const data = {
+        moduleName: 'xs',
+        tableName: 'business_order',
+        billId: this.form.id,
+        no: 87654567
+      }
+      this.saveLoading = true
+      this.checkLock(data).then(res => {
+        if (res.data.code == 200) {
+          this.onLock(data).then(response => {
+          })
+          this.detailData.seeDisabled = false;
+        }
+      }).catch(error => {
+      }).finally(() => {
+        this.saveLoading = false
+      })
+    },
   },
 }
 </script>

+ 28 - 17
src/views/businessManagement/salesOrder/index.vue

@@ -65,20 +65,13 @@
         <template slot-scope="scope" slot="menu">
 <!--          <el-button-->
 <!--            type="text"-->
-<!--            icon="el-icon-view"-->
+<!--            icon="el-icon-edit"-->
 <!--            size="small"-->
-<!--            @click.stop="beforeOpenPage(scope.row,scope.index)"-->
-<!--          >查看-->
+<!--            @click.stop="editOpen(scope.row,scope.index)"-->
+<!--          >编辑-->
 <!--          </el-button>-->
           <el-button
             type="text"
-            icon="el-icon-edit"
-            size="small"
-            @click.stop="editOpen(scope.row,scope.index)"
-          >编辑
-          </el-button>
-          <el-button
-            type="text"
             icon="el-icon-delete"
             size="small"
             @click.stop="rowDel(scope.row,scope.index)"
@@ -312,12 +305,30 @@ export default {
     },
     //查看跳转页面
     beforeOpenPage(row, index) {
-      this.detailData = {
-        id: row.id,
-        seeDisabled: true,
-      };
-      this.isShow = false;
-      this.$store.commit("DOMXS_IN_DETAIL");
+      const data = {
+        moduleName: 'xs',
+        tableName: 'business_order',
+        billId: row.id,
+        no: 87654567
+      }
+      this.checkLock(data).then(res => {
+        if (res.data.code == 200) {
+          this.detailData = {
+            seeDisabled: true,
+            id: row.id,
+          };
+          this.isShow = false;
+          this.$store.commit("DOMXS_IN_DETAIL");
+        }
+      }).catch(err => {
+        this.detailData = {
+          id: row.id,
+          seeDisabled: true,
+          opDisabled: true
+        };
+        this.isShow = false;
+        this.$store.commit("DOMXS_IN_DETAIL");
+      })
     },
     //新增跳转页面
     beforeOpen(row, index) {
@@ -447,7 +458,7 @@ export default {
     },
     goBack() {
       this.detailData=this.$options.data().detailData
-      if (this.$route.query) {
+      if (JSON.stringify(this.$route.query) != "{}") {
         this.$router.$avueRouter.closeTag();
         this.$router.push({
           path: "/businessManagement/salesOrder/index"