Procházet zdrojové kódy

fix: 修改付款计划日期必填规则和合同物品清单税率逻辑

liujt před 2 měsíci
rodič
revize
cf40c560b8

+ 7 - 2
src/BIZComponents/inventoryTable.vue

@@ -1082,6 +1082,11 @@
         type: Boolean,
         default: true
       },
+      // 是否合同
+      isContractBook: {
+        type: Boolean,
+        default: false
+      },
       contractBookType: {
         //合同类型 1销售 2采购
         type: [String, Number],
@@ -2201,7 +2206,7 @@
             item['customerMark'] = item.customerMark || this.customerMark;
             item['arrivalWay'] = item.arrivalWay || 1;
             item.discountRatio = Number(item.discountRatio) || 100; 
-            item.taxRate = item.taxRate || this.defTaxRate;
+            item.taxRate = item.taxRate ? item.taxRate : this.isContractBook ? this.defTaxRate : this.isTaxRate == 1 ? this.defTaxRate : undefined;
             item.quoteWay = item.quoteWay || 1;
           });
           this.form.datasource = productList;
@@ -2305,7 +2310,7 @@
             this.$set(parasm, 'colorKey', item.colorKey.split(','));
           }
           if (this.defTaxRate) {
-            this.$set(parasm, 'taxRate', parasm.taxRate || this.defTaxRate);
+            this.$set(parasm, 'taxRate', parasm.taxRate ? parasm.taxRate : this.isContractBook ? this.defTaxRate : this.isTaxRate == 1 ? this.defTaxRate : undefined);
           }
           this.$set(
             parasm,

+ 2 - 2
src/BIZComponents/paymentCollectionPlan/Index.vue

@@ -171,7 +171,7 @@
           style="margin-bottom: 20px"
           :prop="'datasource.' + scope.$index + '.deadLine'"
           :rules="{
-            required: true,
+            required: false,
             message: '请选择日期',
             trigger: 'change'
           }"
@@ -330,7 +330,7 @@
             prop: 'deadLine',
             label: this.menu === 'purchase' ? '计划付款日期' : '计划收款日期',
             slot: 'deadLine',
-            headerSlot: 'headerDeadLine',
+            // headerSlot: 'headerDeadLine',
             align: 'center'
           },
           {

+ 2 - 0
src/views/contractManage/contractBook/components/addDialog.vue

@@ -635,6 +635,7 @@
         <el-tab-pane label="物品清单" name="1">
           <inventoryTable1
             ref="inventoryTable"
+            isContractBook="true"
             :contractStartDate="this.form.contractStartDate"
             :isCustomerMark="form.type == '1'"
             :isSupplierMark="form.type == '2'"
@@ -643,6 +644,7 @@
             :contractBookType="form.type"
             :pricingWay="form.pricingWay"
             :isChangeCount="false"
+            :defTaxRate="13"
             @setDiscountTotalPrice="setDiscountTotalPrice"
             :isTemporary="true"
             :isSalesRecord="form.type"