Browse Source

销售管理、销售退货、采购管理、采购退货增加版本控制

liyuan 2 months ago
parent
commit
9afdf45dd1

+ 4 - 13
src/views/tirePartsMall/financingManagement/balanceRecharge/index.vue

@@ -88,16 +88,7 @@ export default {
             label: '确认人',
             prop: "confirmingPersonName",
             search: true,
-            overHidden: true,
-            type: 'select',
-            filterable: true,
-            remote: true,
-            props: {
-              label: 'cname',
-              value: 'cname',
-              res: 'data.records'
-            },
-            dicUrl: '/api/blade-sales-part/corpsDesc/list?current=1&size=20&corpType=GYS&cname={{key}}',
+            overHidden: true
           },
           {
             label: '单号',
@@ -138,10 +129,10 @@ export default {
           {
             label: "制单人",
             prop: "createUserName",
-            searchProp: "createUser",
+            searchProp: "createUserName",
             search: true,
             overHidden: true,
-            filterable: true,
+/*            filterable: true,
             remote: true,
             type: "select",
             dicUrl: "/api/blade-user/page?size=20&current=1&account={{key}}",
@@ -149,7 +140,7 @@ export default {
               label: "account",
               value: "id",
               res: 'data.records'
-            }
+            }*/
           },
           {
             label: "制单日期",

+ 35 - 0
src/views/tirePartsMall/purchaseService/outStorage/detailsPage.vue

@@ -496,6 +496,18 @@ export default {
             ...this.form,
             bizTypeName: "TKFHGD"
           }).then(res => {
+              if (res.data.code === 601) {
+                  if (this.onLoad.id) {
+                      console.log(2);
+                      this.refresh(this.onLoad.id, true)
+                  }
+                  this.$message({
+                      type: "error",
+                      message: res.data.msg
+                  });
+                  loading.close();
+                  return true
+              }
             this.$message.success("撤销成功");
             this.refresh(res.data.data.id)
             loading.close();
@@ -552,6 +564,17 @@ export default {
             ...this.form,
             bizTypeName: "TKFHGD"
           }).then(res => {
+              if (res.data.code === 601) {
+                  if (this.onLoad.id) {
+                      console.log(2);
+                      this.refresh(this.onLoad.id, true)
+                  }
+                  this.$message({
+                      type: "error",
+                      message: res.data.msg
+                  });
+                  return true
+              }
             warehousingComplete({
               ...this.form,
               bizTypeName: "TKFHGD"
@@ -598,6 +621,18 @@ export default {
             bizTypeName: "TKFHGD",
             filesList: this.filesList
           }).then(res => {
+              if (res.data.code === 601) {
+                  if (this.onLoad.id) {
+                      console.log(2);
+                      this.refresh(this.onLoad.id, true)
+                  }
+                  this.$message({
+                      type: "error",
+                      message: res.data.msg
+                  });
+                  loading.close();
+                  return true
+              }
             this.$message.success("保存成功");
             this.refresh(res.data.data.id)
             loading.close();

+ 62 - 2
src/views/tirePartsMall/purchaseService/returns/detailsPage.vue

@@ -730,6 +730,17 @@ export default {
                         bsType: "TKCG",
                         ...this.form
                     }).then(res => {
+                        if (res.data.code === 601) {
+                            if (this.onLoad.id) {
+                                console.log(2);
+                                this.refresh(this.onLoad.id, true)
+                            }
+                            this.$message({
+                                type: "error",
+                                message: res.data.msg
+                            });
+                            return true
+                        }
                         this.$message.success("保存成功");
                         this.getDetail(res.data.data.id)
                         this.editButton = true
@@ -781,7 +792,19 @@ export default {
                     spinner: 'el-icon-loading',
                     background: 'rgba(255,255,255,0.7)'
                 });
-                generateShipTask({ id: this.form.id }).then((res) => {
+                generateShipTask({ id: this.form.id, version: this.form.version }).then((res) => {
+                    if (res.data.code === 601) {
+                        if (this.onLoad.id) {
+                            console.log(2);
+                            this.getDetail(this.onLoad.id, true)
+                        }
+                        this.$message({
+                            type: "error",
+                            message: res.data.msg
+                        });
+                        loading.close()
+                        return true
+                    }
                     loading.close()
                     this.$message.success('生成成功');
                     this.getDetail(this.form.id)
@@ -800,7 +823,19 @@ export default {
                     spinner: 'el-icon-loading',
                     background: 'rgba(255,255,255,0.7)'
                 });
-                revokeGenerateShipTask({ id: this.form.id }).then((res) => {
+                revokeGenerateShipTask({ id: this.form.id, version: this.form.version }).then((res) => {
+                    if (res.data.code === 601) {
+                        if (this.onLoad.id) {
+                            console.log(2);
+                            this.getDetail(this.onLoad.id, true)
+                        }
+                        this.$message({
+                            type: "error",
+                            message: res.data.msg
+                        });
+                        loading.close()
+                        return true
+                    }
                     loading.close()
                     this.$message.success('撤销成功');
                     this.getDetail(this.form.id)
@@ -822,6 +857,7 @@ export default {
                             url: '/tirePartsMall/purchaseService/returns/index',
                             pageStatus: "this.$store.getters.cgthStatus",
                             pageLabel: "采购退货(L)",
+                            version: this.form.version
                         }
                         const loading = this.$loading({
                             lock: true,
@@ -830,6 +866,18 @@ export default {
                             background: 'rgba(255,255,255,0.7)'
                         });
                         checkOrder({ ...data }).then((res) => {
+                            if (res.data.code === 601) {
+                                if (this.onLoad.id) {
+                                    console.log(2);
+                                    this.getDetail(this.onLoad.id, true)
+                                }
+                                this.$message({
+                                    type: "error",
+                                    message: res.data.msg
+                                });
+                                loading.close()
+                                return true
+                            }
                             this.getDetail(res.data.data.id)
                             this.$message.success('申请退货成功');
                             this.isApplySettlement = !this.isApplySettlement
@@ -889,6 +937,18 @@ export default {
                     background: 'rgba(255,255,255,0.7)'
                 });
                 revokeCheckOrder({ ...this.form }).then(res => {
+                    if (res.data.code === 601) {
+                        if (this.onLoad.id) {
+                            console.log(2);
+                            this.getDetail(this.onLoad.id, true)
+                        }
+                        this.$message({
+                            type: "error",
+                            message: res.data.msg
+                        });
+                        loading.close()
+                        return true
+                    }
                     this.isRevocationRequest = !this.isRevocationRequest
                     this.getDetail(res.data.data.id)
                     this.$message.success('撤回成功')

+ 30 - 2
src/views/tirePartsMall/purchasingManagement/financingProcurement/detailsPage.vue

@@ -7,7 +7,7 @@
                 </el-button>
             </div>
             <div class="add-customer-btn">
-                
+
                 <el-button class="el-button&#45;&#45;small-yh" style="margin-left: 6px;" type="primary" size="small"
                     v-if="editButton" @click="confirmEditing">编 辑
                 </el-button>
@@ -2058,6 +2058,17 @@ export default {
                         bsType: "RZCG",
                         ...this.form
                     }).then(res => {
+                        if (res.data.code === 601) {
+                            if (this.onLoad.id) {
+                                console.log(2);
+                                this.refresh(this.onLoad.id, true)
+                            }
+                            this.$message({
+                                type: "error",
+                                message: res.data.msg
+                            });
+                            return true
+                        }
                         this.$message.success("保存成功");
                         this.refresh(res.data.data.id)
                         this.isDisabledTask = false
@@ -2238,6 +2249,7 @@ export default {
                             url: '/tirePartsMall/purchasingManagement/financingProcurement/index',
                             pageStatus: "this.$store.getters.financingStatus",
                             pageLabel: "融资采购(L)",
+                            version: this.form.version,
                         }
                         const loading = this.$loading({
                             lock: true,
@@ -2246,6 +2258,14 @@ export default {
                             background: 'rgba(255,255,255,0.7)'
                         });
                         checkOrderCG({ ...data }).then((res) => {
+                            if (res.data.code === 601) {
+                                this.refresh(this.form.id)
+                                this.$message({
+                                    type: "error",
+                                    message: res.data.msg
+                                });
+                                return true
+                            }
                             this.refresh(res.data.data.id)
                             this.$message.success('请核成功');
                             this.isApplySettlement = !this.isApplySettlement
@@ -2319,11 +2339,19 @@ export default {
 
                 // })
                 revokeCheckOrderCG({ ...this.form }).then(res => {
+                    if (res.data.code === 601) {
+                        this.refresh(this.form.id)
+                        this.$message({
+                            type: "error",
+                            message: res.data.msg
+                        });
+                        return true
+                    }
                     this.isRevocationRequest = !this.isRevocationRequest
                     this.refresh(res.data.data.id)
                     this.$message.success('撤回成功')
                     loading.close();
-                })
+                }).catch(() => { loading.close(); })
             })
         },
         rowDelBox(row, index, type) {

+ 32 - 0
src/views/tirePartsMall/purchasingManagement/financingProcurement/index.vue

@@ -697,6 +697,14 @@ export default {
             dangerouslyUseHTMLString: true,
           }).then(() => {
             confirmWarehouse(row).then(res => {
+                if (res.data.code === 601) {
+                    this.onLoad(this.page, this.search)
+                    this.$message({
+                        type: "error",
+                        message: res.data.msg
+                    });
+                    return true
+                }
               this.$message.success("确认成功");
               this.onLoad(this.page, this.search)
             })
@@ -709,6 +717,14 @@ export default {
             type: 'warning'
           }).then(() => {
             revokeWarehouse(row).then(res => {
+                if (res.data.code === 601) {
+                    this.onLoad(this.page, this.search)
+                    this.$message({
+                        type: "error",
+                        message: res.data.msg
+                    });
+                    return true
+                }
               this.$message.success("撤销成功");
               this.onLoad(this.page, this.search)
             })
@@ -725,6 +741,14 @@ export default {
             type: 'warning'
           }).then(() => {
             confirmRedeem(row).then(res => {
+                if (res.data.code === 601) {
+                    this.onLoad(this.page, this.search)
+                    this.$message({
+                        type: "error",
+                        message: res.data.msg
+                    });
+                    return true
+                }
               this.$message.success("确认成功");
               this.onLoad(this.page, this.search)
             })
@@ -738,6 +762,14 @@ export default {
             type: 'warning'
           }).then(() => {
             revokeRedeem(row).then(res => {
+                if (res.data.code === 601) {
+                    this.onLoad(this.page, this.search)
+                    this.$message({
+                        type: "error",
+                        message: res.data.msg
+                    });
+                    return true
+                }
               this.$message.success("撤销成功");
               this.onLoad(this.page, this.search)
             })

+ 34 - 1
src/views/tirePartsMall/purchasingManagement/warehouseEntryOrder/detailsPage.vue

@@ -373,7 +373,7 @@ export default {
                     //     value: 'id'
                     // },
                     // dicUrl: '/api/blade-sales-part/goodsDesc/list?current=1&size=10&cname={{key}}&enableOrNot=1'
-                }, 
+                },
                 {
                     label: '商品名称',
                     prop: 'goodsName',
@@ -772,6 +772,17 @@ export default {
                         ...this.form,
                         bizTypeName: this.form.id ? this.form.bizTypeName : "SHGD"
                     }).then(res => {
+                        if (res.data.code === 601) {
+                            if (this.onLoad.id) {
+                                console.log(2);
+                                this.refresh(this.onLoad.id, true)
+                            }
+                            this.$message({
+                                type: "error",
+                                message: res.data.msg
+                            });
+                            return true
+                        }
                         this.$message.success("撤销成功");
                         this.refresh(res.data.data.id)
                         loading.close();
@@ -866,6 +877,17 @@ export default {
                         ...this.form,
                         bizTypeName: this.form.id ? this.form.bizTypeName : "SHGD"
                     }).then(res => {
+                        if (res.data.code === 601) {
+                            if (this.onLoad.id) {
+                                console.log(2);
+                                this.refresh(this.onLoad.id, true)
+                            }
+                            this.$message({
+                                type: "error",
+                                message: res.data.msg
+                            });
+                            return true
+                        }
                         warehousingComplete({
                             ...this.form,
                             bizTypeName: this.form.id ? this.form.bizTypeName : "SHGD"
@@ -908,6 +930,17 @@ export default {
                         bizTypeName: this.form.id ? this.form.bizTypeName : "SHGD",
                         filesList: this.filesList
                     }).then(res => {
+                        if (res.data.code === 601) {
+                            if (this.onLoad.id) {
+                                console.log(2);
+                                this.refresh(this.onLoad.id, true)
+                            }
+                            this.$message({
+                                type: "error",
+                                message: res.data.msg
+                            });
+                            return true
+                        }
                         this.$message.success("保存成功");
                         this.refresh(res.data.data.id);
                         loading.close();

+ 30 - 0
src/views/tirePartsMall/salesManagement/outboundWorkOrder/detailsPage.vue

@@ -560,6 +560,21 @@ export default {
             ...this.form,
             bizTypeName: "FHGD"
           }).then(res => {
+              if (res.data.code === 601) {
+                  if (this.onLoad.id && this.detailData.id) {
+                      console.log(1);
+                      this.refresh(this.onLoad.id, true)
+                      this.$set(this.optionForm, 'disabled', true)
+                  } else if (this.onLoad.id) {
+                      console.log(2);
+                      this.refresh(this.onLoad.id, true)
+                  }
+                  this.$message({
+                      type: "error",
+                      message: res.data.msg
+                  });
+                  return true
+              }
             this.$message.success("撤销成功");
             this.refresh(res.data.data.id)
             loading.close();
@@ -616,6 +631,21 @@ export default {
             ...this.form,
             bizTypeName: "FHGD"
           }).then(res => {
+              if (res.data.code === 601) {
+                  if (this.onLoad.id && this.detailData.id) {
+                      console.log(1);
+                      this.refresh(this.onLoad.id, true)
+                      this.$set(this.optionForm, 'disabled', true)
+                  } else if (this.onLoad.id) {
+                      console.log(2);
+                      this.refresh(this.onLoad.id, true)
+                  }
+                  this.$message({
+                      type: "error",
+                      message: res.data.msg
+                  });
+                  return true
+              }
             warehousingComplete({
               ...this.form,
               bizTypeName: "FHGD"

+ 17 - 1
src/views/tirePartsMall/salesManagement/purchaseOrder/detailsPage.vue

@@ -1260,6 +1260,10 @@ export default {
         })
     },
     methods: {
+        rowSum(row){
+            row.subTotalMoney = (row.goodsNum * row.price)
+            return row.subTotalMoney
+        },
         //生成退货单
         getReturns() {
             this.$confirm("您确定要退货吗?", {
@@ -1674,6 +1678,7 @@ export default {
                 this.isDisabled = false
                 this.viewDisabled = false;
                 // this.isDisabled = true
+                this.buttonText = '生成任务'
                 loading.close()
             }
             if (this.form.status == '待收货') {
@@ -1874,6 +1879,17 @@ export default {
                         bsType: "CG",
                         ...this.form
                     }).then(res => {
+                        if (res.data.code === 601) {
+                            if (this.onLoad.id) {
+                                console.log(2);
+                                this.refresh(this.onLoad.id, true)
+                            }
+                            this.$message({
+                                type: "error",
+                                message: res.data.msg
+                            });
+                            return true
+                        }
                         this.$message.success("保存成功");
                         this.refresh(res.data.data.id)
                         this.isDisabledTask = false
@@ -2137,7 +2153,7 @@ export default {
                     this.refresh(res.data.data.id)
                     this.$message.success('撤回成功')
                     loading.close();
-                })
+                }).catch(() => { loading.close(); })
             })
         },
         rowDelBox(row, index, type) {

+ 11 - 0
src/views/tirePartsMall/salesManagement/saleOrder/detailsPage.vue

@@ -2506,6 +2506,17 @@ export default {
                         bsType: "XS",
                         ...this.form
                     }).then(res => {
+                        if (res.data.code === 601) {
+                            if (this.onLoad.id) {
+                                console.log(2);
+                                this.refresh(this.onLoad.id, true)
+                            }
+                            this.$message({
+                                type: "error",
+                                message: res.data.msg
+                            });
+                            return true
+                        }
                         this.$message.success("保存成功");
                         this.refresh(res.data.data.id)
                         this.isDisabledTask = false

+ 33 - 0
src/views/tirePartsMall/salesService/inStorage/detailsPage.vue

@@ -765,6 +765,17 @@ export default {
                         ...this.form,
                         bizTypeName: "THSHGD"
                     }).then(res => {
+                        if (res.data.code === 601) {
+                            if (this.onLoad.id) {
+                                console.log(2);
+                                this.refresh(this.onLoad.id, true)
+                            }
+                            this.$message({
+                                type: "error",
+                                message: res.data.msg
+                            });
+                            return true
+                        }
                         this.$message.success("撤销成功");
                         this.refresh(res.data.data.id)
                         loading.close();
@@ -859,6 +870,17 @@ export default {
                         ...this.form,
                         bizTypeName: "THSHGD"
                     }).then(res => {
+                        if (res.data.code === 601) {
+                            if (this.onLoad.id) {
+                                console.log(2);
+                                this.refresh(this.onLoad.id, true)
+                            }
+                            this.$message({
+                                type: "error",
+                                message: res.data.msg
+                            });
+                            return true
+                        }
                         warehousingComplete({
                             ...this.form,
                             bizTypeName: "THSHGD"
@@ -899,6 +921,17 @@ export default {
                         bizTypeName: "THSHGD",
                         filesList: this.filesList
                     }).then(res => {
+                        if (res.data.code === 601) {
+                            if (this.onLoad.id) {
+                                console.log(2);
+                                this.refresh(this.onLoad.id, true)
+                            }
+                            this.$message({
+                                type: "error",
+                                message: res.data.msg
+                            });
+                            return true
+                        }
                         this.$message.success("保存成功");
                         this.refresh(res.data.data.id);
                         loading.close();

+ 51 - 3
src/views/tirePartsMall/salesService/returns/detailsPage.vue

@@ -740,6 +740,17 @@ export default {
                         bsType: "TKXS",
                         ...this.form
                     }).then(res => {
+                        if (res.data.code === 601) {
+                            if (this.onLoad.id) {
+                                console.log(2);
+                                this.getDetail(this.onLoad.id, true)
+                            }
+                            this.$message({
+                                type: "error",
+                                message: res.data.msg
+                            });
+                            return true
+                        }
                         this.$message.success("保存成功");
                         this.getDetail(res.data.data.id)
                         this.editButton = true
@@ -793,7 +804,16 @@ export default {
                 });
                 this.form.salerName = this.form.$salerId ? this.form.$salerId : ''
                 this.form.storageName = this.form.$storageId ? this.form.$storageId : ''
-                generateShipTask({ id: this.form.id }).then((res) => {
+                generateShipTask({ id: this.form.id, version: this.form.version }).then((res) => {
+                    if (res.data.code === 601) {
+                        this.getDetail(this.form.id)
+                        this.$message({
+                            type: "error",
+                            message: res.data.msg
+                        });
+                        loading.close();
+                        return true
+                    }
                     loading.close()
                     this.$message.success('生成成功');
                     this.getDetail(this.form.id)
@@ -812,7 +832,16 @@ export default {
                     spinner: 'el-icon-loading',
                     background: 'rgba(255,255,255,0.7)'
                 });
-                revokeGenerateShipTask({ id: this.form.id }).then((res) => {
+                revokeGenerateShipTask({ id: this.form.id, version: this.form.version }).then((res) => {
+                    if (res.data.code === 601) {
+                        this.getDetail(this.form.id)
+                        this.$message({
+                            type: "error",
+                            message: res.data.msg
+                        });
+                        loading.close();
+                        return true
+                    }
                     loading.close()
                     this.$message.success('撤销成功');
                     this.getDetail(this.form.id)
@@ -834,6 +863,7 @@ export default {
                             url: '/tirePartsMall/salesService/returns/index',
                             pageStatus: "this.$store.getters.xsthStatus",
                             pageLabel: "销售退货(L)",
+                            version: this.form.version
                         }
                         const loading = this.$loading({
                             lock: true,
@@ -842,6 +872,15 @@ export default {
                             background: 'rgba(255,255,255,0.7)'
                         });
                         checkOrder({ ...data }).then((res) => {
+                            if (res.data.code === 601) {
+                                this.getDetail(this.form.id)
+                                this.$message({
+                                    type: "error",
+                                    message: res.data.msg
+                                });
+                                loading.close();
+                                return true
+                            }
                             this.getDetail(res.data.data.id)
                             this.$message.success('申请退货成功');
                             this.isApplySettlement = !this.isApplySettlement
@@ -901,11 +940,20 @@ export default {
                     background: 'rgba(255,255,255,0.7)'
                 });
                 revokeCheckOrder({ ...this.form }).then(res => {
+                    if (res.data.code === 601) {
+                        this.getDetail(this.form.id)
+                        this.$message({
+                            type: "error",
+                            message: res.data.msg
+                        });
+                        loading.close();
+                        return true
+                    }
                     this.isRevocationRequest = !this.isRevocationRequest
                     this.getDetail(res.data.data.id)
                     this.$message.success('撤回成功')
                     loading.close();
-                })
+                }).catch(() => { loading.close(); })
             })
         },
         rowDelBox(row, index, type) {