浏览代码

1.累计付款申请金额更新为不可修改
2.物料改变清空询价带出的数量以及价格

002390 2 年之前
父节点
当前提交
44857e2c11

+ 7 - 1
src/views/purchase/purchase-order/add/column.js

@@ -301,7 +301,13 @@ export const Columns = [
     valueFormat: "yyyy-MM-dd",
     isShow:true,
   },
-  { key: "applyPaymentMoney", title: "累计付款申请金额", inputType: "Input", isShow:true,},
+  { 
+    key: "applyPaymentMoney", 
+    title: "累计付款申请金额", 
+    inputType: "Input", 
+    isShow:true,
+    disabled:true,
+  },
   { key: "paymentMoney", title: "累计付款金额", inputType: "Input", isShow:true,},
   { key: "invoiceMoney", title: "发票金额", inputType: "Input",isShow:true, },
   {

+ 6 - 1
src/views/purchase/purchase-order/add/index.vue

@@ -362,7 +362,7 @@ export default {
    async handleTabReferChange(val, source, type) {
 
       // 触发物料参照询价   && source.qty && source.qty != ""
-      if (type == "MATERIAL_PARAM") {
+      if (type == "MATERIAL_PARAM" && source.qty && source.qty != "") {
 
         source['qty'] = 0;
 
@@ -380,6 +380,11 @@ export default {
 
         source['tax'] = 0;
 
+        this.params['qty'] = 0;
+        this.params['originalQty'] = 0;
+        this.params['money'] = 0;
+        this.params['originalMoney'] = 0;
+        this.params['notaxMoney'] = 0;
         source.isDrug = val.materialMedcine.isDrug  == '0' ? 'Y' : 'N';
 
         await this.handleGetPrice();

+ 7 - 1
src/views/purchase/purchase-order/edit/index.vue

@@ -233,7 +233,7 @@ export default {
     // 子表参照改变之后
     async handleTabReferChange(val, source, type) {
       // 触发物料参照
-      if (type == "MATERIAL_PARAM") {
+      if (type == "MATERIAL_PARAM" && source.qty && source.qty != "") {
 
         source['qty'] = 0;
 
@@ -251,6 +251,12 @@ export default {
         
         source['tax'] = 0;
 
+        this.params['qty'] = 0;
+        this.params['originalQty'] = 0;
+        this.params['money'] = 0;
+        this.params['originalMoney'] = 0;
+        this.params['notaxMoney'] = 0;
+
         source.isDrug = val.materialMedcine.isDrug  == '0' ? 'Y' : 'N';
         
         await this.handleGetPrice();

+ 7 - 4
src/views/purchase/purchase-order/index.vue

@@ -8,6 +8,7 @@ import {
   initColumns,
   initDicts,
 } from "@/utils/init";
+import { async } from "q";
 
 
 export default {
@@ -255,7 +256,7 @@ export default {
           cancelButtonText: '取消',
           inputPattern: /\s*\S+?/,
           inputErrorMessage: '退回原因不能为空'
-        }).then(({ value }) => {
+        }).then(async ({ value }) => {
 
           let data = {
             id: this.checkedList[0].id,
@@ -267,14 +268,16 @@ export default {
 
           try {
 
-            let { code, msg } = orderApi.documentsReturn(data);
+            let { code, msg } = await orderApi.documentsReturn(data);
 
-            if (code == 200) {
+            if (code === 200) {
 
               this.fetchList(this.params, this.page);
 
             }
-          } catch (error) {}
+          } catch (error) {
+            console.log(error,'error------------');
+          }
         }).catch(() => {   });
       
     },