Переглянути джерело

采购订单默认乙方
订单优惠总金额默认合同来源优惠总金额
客户退货入库处理 保存接口 字段修改

Z 2 роки тому
батько
коміт
35af1d2230

+ 2 - 1
src/views/contractManage/contractBook/components/inventoryTabledetail.vue

@@ -12,9 +12,10 @@
         <span class="amount" v-if="isSinglePrice"
           >总计:{{ form.totalPrice || form.totalAmount }}元</span
         >
+<!--  v-if="isDiscountTotalPrice"       -->
         <span
           class="amount"
-          v-if="isDiscountTotalPrice"
+
           style="margin-left: 12px"
           >优惠总金额:{{ form.discountTotalPrice || form.payAmount }}元</span
         >

+ 27 - 4
src/views/purchasingManage/purchaseOrder/components/addDialog.vue

@@ -280,7 +280,8 @@
 
       <headerTitle title="产品清单" style="margin-top: 30px"></headerTitle>
 
-      <inventoryTable ref="inventoryTable" :is-show-supplier-mark="true" :isContractId='!!form.contractId'></inventoryTable>
+      <inventoryTable ref="inventoryTable" :is-show-supplier-mark="true"
+                      :isContractId='!!form.contractId'></inventoryTable>
       <el-row style="margin-top: 20px">
         <el-col :span="12">
           <el-form-item
@@ -351,7 +352,7 @@ import dictMixins from '@/mixins/dictMixins';
 import deptSelect from '@/components/CommomSelect/dept-select.vue';
 import personSelect from '@/components/CommomSelect/person-select.vue';
 import parentList from '@/views/saleManage/contact/components/parentList.vue';
-import {getDetail} from '@/api/contractManage/contractBook';
+import {enterprisePage, getDetail} from '@/api/contractManage/contractBook';
 
 import {
   // getpurchaseorderDetail,
@@ -430,6 +431,7 @@ export default {
       activeName: 'base',
       formDef,
       form: copyObj(formDef),
+      enterprisePage: [],
       tableBankData: [],
       tableLinkData: [],
       // 组织机构树形结构数据
@@ -504,12 +506,15 @@ export default {
   },
   computed: {
     allcountAmount() {
-      this.form.payAmount = this.$store.state.order.allcountAmount
+      if (!this.form.contractId) {
+        this.form.payAmount = this.$store.state.order.allcountAmount
+      }
       return this.$store.state.order.allcountAmount;
     }
   },
   created() {
     this.getGroupAll();
+    this.getEnterprisePage()
   },
   methods: {
     // 选择负责人部门
@@ -720,7 +725,7 @@ export default {
       });
       this.getDetailData(obj.id);
       //采购询价表
-      this.getPurchaseinquiry(obj.sourceId);
+      obj.sourceId && this.getPurchaseinquiry(obj.sourceId);
       this.$store.commit('order/setContractId', obj.id);
     },
 
@@ -787,13 +792,31 @@ export default {
       this.title = type === 'add' ? '新增' : '修改';
       this.row = row;
       this.visible = true;
+      if (this.enterprisePage.length == 0) {
+        await this.getEnterprisePage();
+      }
       if (type == 'add') {
         this.isUpdate = false;
+        if (this.enterprisePage.length > 0) {
+          this.form.partaName = this.enterprisePage[0].name;
+          this.form.partaUnifiedSocialCreditCode = this.enterprisePage[0].unifiedSocialCreditCode;
+          this.form.partaFax = this.enterprisePage[0].fax;
+          this.form.partaAddress = this.enterprisePage[0].address;
+        }
       } else {
         this.isUpdate = true;
         this.getpurchaseorderDetail(row.id);
       }
     },
+    getEnterprisePage() {
+      enterprisePage({
+        pageNum: 1,
+        size: 100
+      }).then((res) => {
+        this.enterprisePage = [];
+        this.enterprisePage.push(...res.list);
+      });
+    },
     //从合同页面新增订单
     contractOpen(row) {
       this.title = '新增'

+ 4 - 2
src/views/saleManage/saleOrder/components/addDialog.vue

@@ -517,7 +517,9 @@ export default {
   },
   computed: {
     allcountAmount() {
-      this.form.payAmount = this.$store.state.order.allcountAmount
+      if (!this.form.contractId) {
+        this.form.payAmount = this.$store.state.order.allcountAmount
+      }
       return this.$store.state.order.allcountAmount;
     }
   },
@@ -611,7 +613,7 @@ export default {
             partaUnifiedSocialCreditCode,
             partbUnifiedSocialCreditCode,
             totalAmount: totalPrice,
-            payAmount: discountTotalPrice,
+            payAmount: discountTotalPrice || totalPrice,
             receiveAddress: partaAddress,
             settlementMode,
             settlementModeName

+ 4 - 2
src/views/saleManage/saleOrder/customerReturnOrder/addOrEditDialog.vue

@@ -607,6 +607,7 @@ export default {
               outInId: i.outInId,
               outInCode: i.outInCode,
               measurementCount: i.measurementCount,
+              measurementUnit: i.measuringUnit,
               outboundDetailId: i.outboundDetailId,
               outboundType: i.outboundType,
               packageCount: i.packageCount,
@@ -614,12 +615,13 @@ export default {
               weight: i.weight,
               weightUtil: i.weightUtil,
               specification: i.specification,
-              categoryCode: i.categoryCode,
+              modelType: i.modelType,
               carveCode: i.carveCode,
-              name: i.name,
+              productName: i.name,
               reason: i.reason,
               sendDate: i.sendDate,
               feedbackDate: i.feedbackDate,
+              productCode: i.categoryCode,
               id: i.id
             }
           }),

+ 7 - 7
src/views/saleManage/saleOrder/index.vue

@@ -249,13 +249,13 @@
             showOverflowTooltip: true,
             minWidth: 200
           },
-          {
-            prop: 'deliveryDate',
-            label: '交货日期',
-            align: 'center',
-            showOverflowTooltip: true,
-            minWidth: 200
-          },
+          // {
+          //   prop: 'deliveryDate',
+          //   label: '交货日期',
+          //   align: 'center',
+          //   showOverflowTooltip: true,
+          //   minWidth: 200
+          // },
           {
             prop: 'saleTypeName',
             label: '销售类型',

+ 4 - 2
src/views/saleManage/saleOrder/returnGoods/components/customerReturnOrderDialog.vue

@@ -517,16 +517,18 @@ export default {
               outInId: i.outInId,
               outInCode: i.outInCode,
               measurementCount: i.measurementCount,
+              measurementUnit: i.measuringUnit,
               outboundDetailId: i.outboundDetailId,
               outboundType: i.outboundType,
+              productName: i.name,
+              productCode: i.categoryCode,
               packageCount: i.packageCount,
               packingUnit: i.packingUnit,
               weight: i.weight,
               weightUtil: i.weightUtil,
               specification: i.specification,
-              categoryCode: i.categoryCode,
+              modelType: i.modelType,
               carveCode: i.carveCode,
-              name: i.name,
               reason: i.reason,
               sendDate: i.sendDate,
               feedbackDate: i.feedbackDate,