yusheng 1 год назад
Родитель
Сommit
7d8b39b40b

+ 33 - 28
src/BIZComponents/inventoryTable.vue

@@ -245,9 +245,11 @@
         </el-form-item>
       </template>
       <template v-slot:headerGuaranteePeriod="{ column }">
-        <span :class="{ 'is-required': contractBookType == 1 }">{{ column.label }}</span>
+        <span :class="{ 'is-required': contractBookType == 1 }">{{
+          column.label
+        }}</span>
       </template>
-      
+
       <template v-slot:guaranteePeriod="scope">
         <div class="period">
           <div class="borderleftnone">
@@ -353,9 +355,7 @@
         }}</span>
       </template>
       <template v-slot:headerCustomerExpectDeliveryDeadline="{ column }">
-        <span class="is-required">{{
-          column.label
-        }}</span>
+        <span class="is-required">{{ column.label }}</span>
       </template>
 
       <template v-slot:technicalAnswerName="{ row, $index }">
@@ -741,11 +741,10 @@
           {
             width: 200,
             prop: 'customerMark',
-            label: this.contractBookType == 1?'客户代号':'供应商代号',
+            label: this.contractBookType == 1 ? '客户代号' : '供应商代号',
             slot: 'customerMark',
             headerSlot: 'headerCustomerMark',
-            align: 'center',
-      
+            align: 'center'
           },
           // {
           //   width: 200,
@@ -1036,11 +1035,17 @@
       },
       async getSupplierObj(productList, queryName) {
         try {
-          let categoryIds = productList.map((item) => item[queryName]);
-          return await contactQueryByCategoryIdsAPI({
-            categoryIds,
-            isQueryEE: 1
-          });
+          let categoryIds = productList
+            .filter((item) => item.productId)
+            .map((item) => item.productId);
+          if (categoryIds.lenght > 0) {
+            return await contactQueryByCategoryIdsAPI({
+              categoryIds,
+              isQueryEE: 1
+            });
+          }else{
+            return Promise.resolve({});
+          }
         } catch (e) {
           return Promise.resolve({});
         }
@@ -1119,8 +1124,7 @@
         this.allPrice = allPrice || 0;
         if (this.isDiscountTotalPrice) {
           this.form.discountTotalPrice = allPrice;
-        this.$emit('setDiscountTotalPrice',allPrice)
-
+          this.$emit('setDiscountTotalPrice', allPrice);
         }
         this.$emit('setCountAmount', this.allPrice);
       },
@@ -1148,7 +1152,7 @@
             this.getDiscountTotalPrice(item)
           );
         });
-        this.$emit('setDiscountTotalPrice',val)
+        this.$emit('setDiscountTotalPrice', val);
 
         this.$forceUpdate();
         this.$refs.table.reRenderTable();
@@ -1218,7 +1222,8 @@
           }
 
           if (this.isDiscountTotalPrice) {
-            this.form.discountTotalPrice = data.payAmount||data?.contractVO?.discountTotalPrice;
+            this.form.discountTotalPrice =
+              data.payAmount || data?.contractVO?.discountTotalPrice;
           }
 
           let codeList = this.form.datasource.map((item) => item.productCode);
@@ -1275,7 +1280,7 @@
           this.$set(parasm, 'specification', item.specification);
           this.$set(parasm, 'weightUnit', item.weightUnit);
           this.$set(parasm, 'singleWeight', item.roughWeight);
-          this.$set(parasm, 'pricingWay',item.pricingWay||1);
+          this.$set(parasm, 'pricingWay', item.pricingWay || 1);
 
           this.$set(parasm, 'imgCode', item.imgCode);
           this.$set(parasm, 'produceType', item.produceType);
@@ -1318,17 +1323,17 @@
       },
 
       validateForm(callback) {
-        let singleWeightData={}
-        this.form.datasource.forEach(item=>{
-
-          if(item.pricingWay==2&&!item.singleWeight){
-            singleWeightData['name']=item.productName
-            console.log(singleWeightData,'singleWeightData')
+        let singleWeightData = {};
+        this.form.datasource.forEach((item) => {
+          if (item.pricingWay == 2 && !item.singleWeight) {
+            singleWeightData['name'] = item.productName;
+            console.log(singleWeightData, 'singleWeightData');
           }
-
-        })
-        if(singleWeightData.name){
-          this.$message.warning(singleWeightData.name+'计价方式为重量,单重不能为空');
+        });
+        if (singleWeightData.name) {
+          this.$message.warning(
+            singleWeightData.name + '计价方式为重量,单重不能为空'
+          );
           callback(false);
         }
         //开始表单校验

+ 10 - 10
src/views/contractManage/contractBook/components/quotationList.vue

@@ -150,16 +150,16 @@ export default {
           minWidth: 100
         },
 
-        {
-          prop: 'taxRate',
-          label: '税率',
-          align: 'center',
-          showOverflowTooltip: true,
-          minWidth: 140,
-          formatter: (_row, _column, cellValue) => {
-            return _row.taxRate + '%';
-          }
-        },
+        // {
+        //   prop: 'taxRate',
+        //   label: '税率',
+        //   align: 'center',
+        //   showOverflowTooltip: true,
+        //   minWidth: 140,
+        //   formatter: (_row, _column, cellValue) => {
+        //     return _row.taxRate + '%';
+        //   }
+        // },
         {
           prop: 'totalPrice',
           label: '总金额',

+ 10 - 10
src/views/saleManage/quotation/index.vue

@@ -267,16 +267,16 @@ export default {
           minWidth: 100
         },
 
-        {
-          prop: 'taxRate',
-          label: '税率',
-          align: 'center',
-          showOverflowTooltip: true,
-          minWidth: 140,
-          formatter: (_row, _column, cellValue) => {
-            return _row.taxRate ? _row.taxRate + '%' : '';
-          }
-        },
+        // {
+        //   prop: 'taxRate',
+        //   label: '税率',
+        //   align: 'center',
+        //   showOverflowTooltip: true,
+        //   minWidth: 140,
+        //   formatter: (_row, _column, cellValue) => {
+        //     return _row.taxRate ? _row.taxRate + '%' : '';
+        //   }
+        // },
         {
           prop: 'totalPrice',
           label: '总金额',