chencc 1 an în urmă
părinte
comite
3be84ff163
20 a modificat fișierele cu 454 adăugiri și 263 ștergeri
  1. 71 49
      src/BIZComponents/inventoryTable.vue
  2. 51 34
      src/BIZComponents/inventoryTableDetails.vue
  3. 4 2
      src/api/bpm/components/wms/index.js
  4. 1 1
      src/enum/dict.js
  5. 1 1
      src/views/bpm/handleTask/components/businessOpportunity/inventoryTable.vue
  6. 1 1
      src/views/bpm/handleTask/components/contractBook/inventoryTable.vue
  7. 1 1
      src/views/bpm/handleTask/components/inquiryManage/inquiryTable.vue
  8. 1 3
      src/views/bpm/handleTask/components/purchaseOrder/returnGoods/detailDialog.vue
  9. 73 16
      src/views/bpm/handleTask/components/saleOrder/accountstatement/inventoryTable.vue
  10. 24 20
      src/views/bpm/handleTask/components/saleOrder/customerReturnGoods/customerReturnOrder.vue
  11. 94 72
      src/views/bpm/handleTask/components/saleOrder/returnGoods/addReturnGoodsDialog.vue
  12. 21 6
      src/views/bpm/handleTask/components/saleOrder/returnGoods/detailDialog.vue
  13. 16 20
      src/views/bpm/handleTask/components/saleOrder/returnGoods/inventoryTable.vue
  14. 11 0
      src/views/bpm/handleTask/components/saleOrder/returnGoods/inventoryTableReturn.vue
  15. 10 0
      src/views/bpm/handleTask/components/saleOrder/returnGoods/inventoryTabledetail.vue
  16. 5 1
      src/views/bpm/handleTask/components/supplierManage/contactDetailDialog.vue
  17. 1 1
      src/views/bpm/handleTask/components/supplierManage/parentList.vue
  18. 2 2
      src/views/bpm/handleTask/index.vue
  19. 42 4
      src/views/bpm/stockManagement/details.vue
  20. 24 29
      src/views/bpm/stockManagement/storage.vue

+ 71 - 49
src/BIZComponents/inventoryTable.vue

@@ -33,11 +33,10 @@
             >
             >
               新增
               新增
             </el-button>
             </el-button>
-     
           </div>
           </div>
           <div class="pricebox">
           <div class="pricebox">
             <span class="amount">总计:{{ allPrice }}元</span>
             <span class="amount">总计:{{ allPrice }}元</span>
-        
+
             <el-form-item
             <el-form-item
               style="width: 300px"
               style="width: 300px"
               v-if="isDiscountTotalPrice"
               v-if="isDiscountTotalPrice"
@@ -93,10 +92,7 @@
         <span class="is-required">{{ column.label }}</span>
         <span class="is-required">{{ column.label }}</span>
       </template>
       </template>
       <template v-slot:customerMark="{ row, $index }">
       <template v-slot:customerMark="{ row, $index }">
-        <el-form-item
-          :prop="'datasource.' + $index + '.customerMark'"
-      
-        >
+        <el-form-item :prop="'datasource.' + $index + '.customerMark'">
           <el-input v-model="row.customerMark" placeholder="请输入"></el-input>
           <el-input v-model="row.customerMark" placeholder="请输入"></el-input>
         </el-form-item>
         </el-form-item>
       </template>
       </template>
@@ -125,11 +121,10 @@
           style="margin-bottom: 20px"
           style="margin-bottom: 20px"
           :prop="'datasource.' + scope.$index + '.totalCount'"
           :prop="'datasource.' + scope.$index + '.totalCount'"
           :rules="{
           :rules="{
-            required: isTotalCount?true:false,
+            required: isTotalCount ? true : false,
             message: '请输入单价',
             message: '请输入单价',
             trigger: 'change'
             trigger: 'change'
           }"
           }"
-          
         >
         >
           <el-input
           <el-input
             :disabled="isContractId"
             :disabled="isContractId"
@@ -140,11 +135,8 @@
           ></el-input>
           ></el-input>
         </el-form-item>
         </el-form-item>
       </template>
       </template>
-      <template
-        v-slot:headerTotalCount="{ column }"
-
-      >
-        <span :class="{'is-required':isTotalCount}">{{ column.label }}</span>
+      <template v-slot:headerTotalCount="{ column }">
+        <span :class="{ 'is-required': isTotalCount }">{{ column.label }}</span>
       </template>
       </template>
       <template v-slot:totalPrice="scope">
       <template v-slot:totalPrice="scope">
         <el-form-item
         <el-form-item
@@ -257,7 +249,7 @@
           style="margin-bottom: 20px"
           style="margin-bottom: 20px"
           :prop="'datasource.' + scope.$index + '.singlePrice'"
           :prop="'datasource.' + scope.$index + '.singlePrice'"
           :rules="{
           :rules="{
-            required: isSinglePrice?true:false,
+            required: isSinglePrice ? true : false,
             message: '请输入单价',
             message: '请输入单价',
             trigger: 'change'
             trigger: 'change'
           }"
           }"
@@ -283,18 +275,16 @@
             v-model="scope.row.taxRate"
             v-model="scope.row.taxRate"
             placeholder="请输入"
             placeholder="请输入"
             type="number"
             type="number"
-            
           >
           >
             <template slot="append">%</template>
             <template slot="append">%</template>
           </el-input>
           </el-input>
         </el-form-item>
         </el-form-item>
       </template>
       </template>
-      
-      <template
-        v-slot:headerSinglePrice="{ column }"
-       
-      >
-        <span :class="isSinglePrice?'is-required':''">{{ column.label }}</span>
+
+      <template v-slot:headerSinglePrice="{ column }">
+        <span :class="isSinglePrice ? 'is-required' : ''">{{
+          column.label
+        }}</span>
       </template>
       </template>
       <template v-slot:headerCustomerExpectDeliveryDeadline="{ column }">
       <template v-slot:headerCustomerExpectDeliveryDeadline="{ column }">
         <span :class="contractBookType == 1 ? 'is-required' : ''">{{
         <span :class="contractBookType == 1 ? 'is-required' : ''">{{
@@ -377,14 +367,23 @@
           ></fileMain>
           ></fileMain>
         </el-form-item>
         </el-form-item>
       </template>
       </template>
+      <template v-slot:headerProduceDeliveryDeadline="{ column }">
+        <span :class="isProduceDeliveryDeadline ? 'is-required' : ''">{{
+          column.label
+        }}</span>
+      </template>
       <template v-slot:produceDeliveryDeadline="scope">
       <template v-slot:produceDeliveryDeadline="scope">
         <el-form-item
         <el-form-item
           :prop="'datasource.' + scope.$index + '.produceDeliveryDeadline'"
           :prop="'datasource.' + scope.$index + '.produceDeliveryDeadline'"
+          :rules="{
+            required: isProduceDeliveryDeadline ? true : false,
+            message: '选择生产交付交期',
+            trigger: 'change'
+          }"
         >
         >
           <el-date-picker
           <el-date-picker
             style="width: 140px"
             style="width: 140px"
             v-model="scope.row.produceDeliveryDeadline"
             v-model="scope.row.produceDeliveryDeadline"
-            :disabled="isContractId"
             type="date"
             type="date"
             placeholder="选择日期"
             placeholder="选择日期"
           >
           >
@@ -393,7 +392,7 @@
       </template>
       </template>
       <template v-slot:customerExpectDeliveryDeadline="scope">
       <template v-slot:customerExpectDeliveryDeadline="scope">
         <el-form-item
         <el-form-item
-        :rules="{
+          :rules="{
             required: true,
             required: true,
             message:
             message:
               contractBookType == 1 ? '请选择客户期望交期' : '请选择交付日期',
               contractBookType == 1 ? '请选择客户期望交期' : '请选择交付日期',
@@ -431,7 +430,6 @@
       <template v-slot:singleWeight="scope">
       <template v-slot:singleWeight="scope">
         <el-form-item
         <el-form-item
           style="margin-bottom: 20px"
           style="margin-bottom: 20px"
-         
           :prop="'datasource.' + scope.$index + '.singleWeight'"
           :prop="'datasource.' + scope.$index + '.singleWeight'"
         >
         >
           <el-input
           <el-input
@@ -461,7 +459,15 @@
       </template>
       </template>
       <template v-slot:pricingWay="scope">
       <template v-slot:pricingWay="scope">
         <el-form-item :prop="'datasource.' + scope.$index + '.pricingWay'">
         <el-form-item :prop="'datasource.' + scope.$index + '.pricingWay'">
-          <el-select v-model="scope.row.pricingWay" placeholder="请选择">
+          <el-select
+            v-model="scope.row.pricingWay"
+            placeholder="请选择"
+            :rules="{
+              required: true,
+              message: '请选择计价方式',
+              trigger: 'change'
+            }"
+          >
             <el-option
             <el-option
               v-for="item in pricingWayList"
               v-for="item in pricingWayList"
               :key="item.id"
               :key="item.id"
@@ -473,7 +479,9 @@
           </el-select>
           </el-select>
         </el-form-item>
         </el-form-item>
       </template>
       </template>
-
+      <template v-slot:headerPricingWay="{ column }">
+        <span class="is-required">{{ column.label }}</span>
+      </template>
       <!-- 操作列 -->
       <!-- 操作列 -->
       <template v-slot:action="scope">
       <template v-slot:action="scope">
         <el-popconfirm
         <el-popconfirm
@@ -534,12 +542,17 @@
         default: false,
         default: false,
         type: Boolean
         type: Boolean
       },
       },
-  
+
       isGuaranteePeriod: {
       isGuaranteePeriod: {
         default: true,
         default: true,
         type: Boolean
         type: Boolean
       },
       },
 
 
+      isProduceDeliveryDeadline: {
+        //生产交付交期必填
+        type: Boolean,
+        default: false
+      },
       customerMark: {
       customerMark: {
         default: '',
         default: '',
         type: String
         type: String
@@ -549,16 +562,18 @@
         type: Boolean,
         type: Boolean,
         default: false
         default: false
       },
       },
-      
-      isSinglePrice: { //单价必填
+
+      isSinglePrice: {
+        //单价必填
         type: Boolean,
         type: Boolean,
         default: true
         default: true
       },
       },
-      isTotalCount: { //数量必填
+      isTotalCount: {
+        //数量必填
         type: Boolean,
         type: Boolean,
         default: true
         default: true
       },
       },
-      
+
       isDrawer: {
       isDrawer: {
         type: Boolean,
         type: Boolean,
         default: false
         default: false
@@ -582,6 +597,11 @@
         //临时
         //临时
         type: Boolean,
         type: Boolean,
         default: false
         default: false
+      },
+      isDiscount: {
+        //折让
+        type: Boolean,
+        default: true
       }
       }
     },
     },
     data() {
     data() {
@@ -600,7 +620,7 @@
         numberReg,
         numberReg,
         defaultForm,
         defaultForm,
         form: {
         form: {
-        discountTotalPrice: 0,
+          discountTotalPrice: 0,
 
 
           datasource: []
           datasource: []
         },
         },
@@ -749,6 +769,7 @@
             width: 160,
             width: 160,
             prop: 'pricingWay',
             prop: 'pricingWay',
             label: '计价方式',
             label: '计价方式',
+            headerSlot: 'headerPricingWay',
             slot: 'pricingWay',
             slot: 'pricingWay',
             align: 'center'
             align: 'center'
           },
           },
@@ -812,7 +833,8 @@
             prop: 'produceDeliveryDeadline',
             prop: 'produceDeliveryDeadline',
             label: '生产交付交期',
             label: '生产交付交期',
             slot: 'produceDeliveryDeadline',
             slot: 'produceDeliveryDeadline',
-
+            headerSlot: 'headerProduceDeliveryDeadline',
+            show: this.contractBookType == 1,
             align: 'center'
             align: 'center'
           },
           },
 
 
@@ -1011,21 +1033,20 @@
       //改变数量
       //改变数量
       changeCount(row, index) {
       changeCount(row, index) {
         const { allPrice, arr } = changeCount(row, index, this.form.datasource);
         const { allPrice, arr } = changeCount(row, index, this.form.datasource);
-        this.form.datasource=arr
-        this.allPrice=allPrice||0
+        this.form.datasource = arr;
+        this.allPrice = allPrice || 0;
         if (this.isDiscountTotalPrice) {
         if (this.isDiscountTotalPrice) {
           this.form.discountTotalPrice = allPrice;
           this.form.discountTotalPrice = allPrice;
         }
         }
         this.$emit('setCountAmount', this.allPrice);
         this.$emit('setCountAmount', this.allPrice);
-      
       },
       },
       setCustomerMark(customerMark) {
       setCustomerMark(customerMark) {
         this.form.datasource.forEach((item) => {
         this.form.datasource.forEach((item) => {
-         item['customerMark'] = customerMark;
+          item['customerMark'] = customerMark;
           this.$forceUpdate();
           this.$forceUpdate();
         });
         });
       },
       },
-     
+
       //修改回显
       //修改回显
       async putTableValue(data) {
       async putTableValue(data) {
         let productList =
         let productList =
@@ -1057,7 +1078,8 @@
           }
           }
 
 
           if (this.isDiscountTotalPrice) {
           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);
           let codeList = this.form.datasource.map((item) => item.productCode);
@@ -1114,7 +1136,7 @@
           this.$set(parasm, 'specification', item.specification);
           this.$set(parasm, 'specification', item.specification);
           this.$set(parasm, 'weightUnit', item.weightUnit);
           this.$set(parasm, 'weightUnit', item.weightUnit);
           this.$set(parasm, 'singleWeight', item.roughWeight);
           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, 'imgCode', item.imgCode);
           this.$set(parasm, 'produceType', item.produceType);
           this.$set(parasm, 'produceType', item.produceType);
@@ -1153,16 +1175,16 @@
       },
       },
 
 
       validateForm(callback) {
       validateForm(callback) {
-        let singleWeightData={}
-        this.form.datasource.forEach(item=>{
-
-          if(item.pricingWay==2&&!item.singleWeight){
-            singleWeightData['name']=item.productName
+        let singleWeightData = {};
+        this.form.datasource.forEach((item) => {
+          if (item.pricingWay == 2 && !item.singleWeight) {
+            singleWeightData['name'] = item.productName;
           }
           }
-
-        })
-        if(singleWeightData.name){
-          this.$message.warning(singleWeightData.name+'计价方式为重量,单重不能为空');
+        });
+        if (singleWeightData.name) {
+          this.$message.warning(
+            singleWeightData.name + '计价方式为重量,单重不能为空'
+          );
           callback(false);
           callback(false);
         }
         }
         //开始表单校验
         //开始表单校验

+ 51 - 34
src/BIZComponents/inventoryTableDetails.vue

@@ -1,5 +1,5 @@
 <template>
 <template>
-  <el-form ref="form" >
+  <el-form ref="form">
     <ele-pro-table
     <ele-pro-table
       ref="table"
       ref="table"
       :needPage="false"
       :needPage="false"
@@ -13,7 +13,7 @@
       <template v-slot:toolbar>
       <template v-slot:toolbar>
         <div class="headbox">
         <div class="headbox">
           <div class="pricebox">
           <div class="pricebox">
-            <span class="amount">总计:{{ allPrice }}元</span>
+            <span class="amount" v-if="isAllPrice">总计:{{ allPrice }}元</span>
             <span class="amount" v-if="isDiscountTotalPrice"
             <span class="amount" v-if="isDiscountTotalPrice"
               >优惠后总金额:{{ form.discountTotalPrice }}元</span
               >优惠后总金额:{{ form.discountTotalPrice }}元</span
             >
             >
@@ -27,9 +27,7 @@
   import dictMixins from '@/mixins/dictMixins';
   import dictMixins from '@/mixins/dictMixins';
 
 
   import fileMain from '@/components/addDoc/index.vue';
   import fileMain from '@/components/addDoc/index.vue';
-  import {contactQueryByCategoryIdsAPI} from "@/api/bpm/components/supplierManage/contact";
-
-
+  import { contactQueryByCategoryIdsAPI } from '@/api/bpm/components/supplierManage/contact';
 
 
   export default {
   export default {
     mixins: [dictMixins],
     mixins: [dictMixins],
@@ -65,13 +63,18 @@
         type: [String, Number],
         type: [String, Number],
         default: 1
         default: 1
       },
       },
+      isAllPrice: {
+        //是否显示合计
+        type: Boolean,
+        default: true
+      }
     },
     },
     data() {
     data() {
       return {
       return {
         allPrice: 0,
         allPrice: 0,
 
 
         form: {
         form: {
-        discountTotalPrice: 0,
+          discountTotalPrice: 0,
           datasource: []
           datasource: []
         },
         },
 
 
@@ -80,7 +83,7 @@
             width: 45,
             width: 45,
             type: 'index',
             type: 'index',
             columnKey: 'index',
             columnKey: 'index',
-            align: 'center',
+            align: 'center'
           },
           },
           {
           {
             width: 280,
             width: 280,
@@ -88,21 +91,21 @@
             label: '名称',
             label: '名称',
             slot: 'productName',
             slot: 'productName',
             headerSlot: 'headerProductName',
             headerSlot: 'headerProductName',
-            align: 'center',
+            align: 'center'
           },
           },
           {
           {
             width: 120,
             width: 120,
             prop: 'productCode',
             prop: 'productCode',
             label: '编码',
             label: '编码',
             slot: 'productCode',
             slot: 'productCode',
-            align: 'center',
+            align: 'center'
           },
           },
           {
           {
             width: 200,
             width: 200,
             prop: 'productCategoryName',
             prop: 'productCategoryName',
             label: '类型',
             label: '类型',
             slot: 'productCategoryName',
             slot: 'productCategoryName',
-            align: 'center',
+            align: 'center'
           },
           },
           {
           {
             width: 120,
             width: 120,
@@ -139,9 +142,11 @@
             showOverflowTooltip: true,
             showOverflowTooltip: true,
             formatter: (row, column) => {
             formatter: (row, column) => {
               return (
               return (
-                this.supplierObj&&this.supplierObj[row.productId]?.find(
-                  (item) => item.id === row.entrustedEnterpriseId
-                )?.name || ''
+                (this.supplierObj &&
+                  this.supplierObj[row.productId]?.find(
+                    (item) => item.id === row.entrustedEnterpriseId
+                  )?.name) ||
+                ''
               );
               );
             }
             }
           },
           },
@@ -208,8 +213,11 @@
             slot: 'pricingWay',
             slot: 'pricingWay',
             align: 'center',
             align: 'center',
             formatter: (row, column) => {
             formatter: (row, column) => {
-              return row.pricingWay == 1 ? '按数量计费' : row.pricingWay == 2 ? '按重量计费':'';
-
+              return row.pricingWay == 1
+                ? '按数量计费'
+                : row.pricingWay == 2
+                ? '按重量计费'
+                : '';
             }
             }
           },
           },
           {
           {
@@ -332,7 +340,12 @@
             label: '质保期',
             label: '质保期',
             slot: 'guaranteePeriod',
             slot: 'guaranteePeriod',
             headerSlot: 'headerCustomerExpectDeliveryDeadline',
             headerSlot: 'headerCustomerExpectDeliveryDeadline',
-            align: 'center'
+            align: 'center',
+            formatter: (_row, _column, cellValue) => {
+              return (
+                (_row.guaranteePeriod || '') + _row.guaranteePeriodUnitName
+              );
+            }
           },
           },
           {
           {
             width: 200,
             width: 200,
@@ -407,17 +420,17 @@
       this.requestDict('生产类型');
       this.requestDict('生产类型');
     },
     },
     methods: {
     methods: {
-      async getSupplierObj(productList, queryName) {
-        try {
-          let categoryIds = productList.map((item) => item[queryName]);
-          return await contactQueryByCategoryIdsAPI({
-            categoryIds,
-            isQueryEE: 1
-          });
-        } catch (e) {
-          return Promise.resolve({});
-        }
-      },
+      // async getSupplierObj(productList, queryName) {
+      //   try {
+      //     let categoryIds = productList.map((item) => item[queryName]);
+      //     return await contactQueryByCategoryIdsAPI({
+      //       categoryIds,
+      //       isQueryEE: 1
+      //     });
+      //   } catch (e) {
+      //     return Promise.resolve({});
+      //   }
+      // },
 
 
       // 返回列表数据
       // 返回列表数据
       getTableValue() {
       getTableValue() {
@@ -440,21 +453,25 @@
 
 
       //修改回显
       //修改回显
       async putTableValue(data) {
       async putTableValue(data) {
-        console.log(data,'dasdas')
+        console.log(data, 'dasdas');
         let productList =
         let productList =
           (data &&
           (data &&
             (data.quoteProductList || data.productList || data.detailList)) ||
             (data.quoteProductList || data.productList || data.detailList)) ||
           [];
           [];
         if (productList) {
         if (productList) {
           this.form.datasource = productList;
           this.form.datasource = productList;
-          this.allPrice = data.totalAmount || data.totalPrice||data?.contractVO?.totalPrice;
+          this.allPrice =
+            data.totalAmount || data.totalPrice || data?.contractVO?.totalPrice;
           if (this.isDiscountTotalPrice) {
           if (this.isDiscountTotalPrice) {
-            this.form.discountTotalPrice = data.payAmount||data.discountTotalPrice||data?.contractVO?.discountTotalPrice;
+            this.form.discountTotalPrice =
+              data.payAmount ||
+              data.discountTotalPrice ||
+              data?.contractVO?.discountTotalPrice;
           }
           }
-          this.supplierObj = await this.getSupplierObj(
-            productList,
-            'productId'
-          );
+          // this.supplierObj = await this.getSupplierObj(
+          //   productList,
+          //   'productId'
+          // );
           this.$refs.table.reload();
           this.$refs.table.reload();
         }
         }
       }
       }

+ 4 - 2
src/api/bpm/components/wms/index.js

@@ -4,6 +4,9 @@ import request from '@/utils/request';
  * 获取产品所有库存
  * 获取产品所有库存
  */
  */
 export async function getInventoryTotalAPI(data) {
 export async function getInventoryTotalAPI(data) {
+  if (data.length == 0) {
+    return [];
+  }
   const res = await request.post(`wms/stocktwo/getInventoryTotal`, data);
   const res = await request.post(`wms/stocktwo/getInventoryTotal`, data);
   if (res.data.code == 0) {
   if (res.data.code == 0) {
     return res.data.data;
     return res.data.data;
@@ -111,7 +114,6 @@ export async function getProductList(params) {
   return Promise.reject(new Error(res.data.message));
   return Promise.reject(new Error(res.data.message));
 }
 }
 
 
-
 //库存台账-库存明细-物料维度
 //库存台账-库存明细-物料维度
 
 
 export async function getMaterielDetails(params) {
 export async function getMaterielDetails(params) {
@@ -125,7 +127,7 @@ export async function getMaterielDetails(params) {
 }
 }
 //库存台账-库存明细
 //库存台账-库存明细
 
 
-export async function getInventoryDetails (params)  {
+export async function getInventoryDetails(params) {
   const res = await request.get(`/wms/outin/getInventoryDetails`, {
   const res = await request.get(`/wms/outin/getInventoryDetails`, {
     params
     params
   });
   });

+ 1 - 1
src/enum/dict.js

@@ -90,7 +90,7 @@ export const numberList = [
   'capacity_cycle',
   'capacity_cycle',
   'target_unit',
   'target_unit',
   'capacity_status',
   'capacity_status',
-  'date_unit',
+  // 'date_unit',
   'quality_assurance',
   'quality_assurance',
   'schedule_type',
   'schedule_type',
   'leadtime_unit',
   'leadtime_unit',

+ 1 - 1
src/views/bpm/handleTask/components/businessOpportunity/inventoryTable.vue

@@ -1110,7 +1110,7 @@ export default {
         [];
         [];
       if (productList) {
       if (productList) {
         productList.forEach((item) => {
         productList.forEach((item) => {
-          item.guaranteePeriodUnitCode = item.guaranteePeriodUnitCode * 1 || '';
+          // item.guaranteePeriodUnitCode = item.guaranteePeriodUnitCode * 1 || '';
           //item.guaranteePeriodUnitCode
           //item.guaranteePeriodUnitCode
           // if (item.deliveryDays) {
           // if (item.deliveryDays) {
           //   item['deliveryDeadline'] =
           //   item['deliveryDeadline'] =

+ 1 - 1
src/views/bpm/handleTask/components/contractBook/inventoryTable.vue

@@ -1136,7 +1136,7 @@ export default {
         [];
         [];
       if (productList) {
       if (productList) {
         productList.forEach((item) => {
         productList.forEach((item) => {
-          item.guaranteePeriodUnitCode = item.guaranteePeriodUnitCode * 1 || '';
+          // item.guaranteePeriodUnitCode = item.guaranteePeriodUnitCode * 1 || '';
           //item.guaranteePeriodUnitCode
           //item.guaranteePeriodUnitCode
           // if (item.deliveryDays) {
           // if (item.deliveryDays) {
           //   item['deliveryDeadline'] =
           //   item['deliveryDeadline'] =

+ 1 - 1
src/views/bpm/handleTask/components/inquiryManage/inquiryTable.vue

@@ -660,7 +660,7 @@
         let pos = 0;
         let pos = 0;
         this.spanArr = [];
         this.spanArr = [];
         this.form.resultList.forEach((item, index) => {
         this.form.resultList.forEach((item, index) => {
-          item.guaranteePeriodUnitCode = Number(item.guaranteePeriodUnitCode);
+          // item.guaranteePeriodUnitCode = Number(item.guaranteePeriodUnitCode);
           // console.log(item.guaranteePeriodUnitCode,'item.guaranteePeriodUnitCode')
           // console.log(item.guaranteePeriodUnitCode,'item.guaranteePeriodUnitCode')
           if (index === 0) {
           if (index === 0) {
             let obj = {};
             let obj = {};

+ 1 - 3
src/views/bpm/handleTask/components/purchaseOrder/returnGoods/detailDialog.vue

@@ -200,12 +200,10 @@
   import { getFile } from '@/api/system/file';
   import { getFile } from '@/api/system/file';
   import dictMixins from '@/mixins/dictMixins';
   import dictMixins from '@/mixins/dictMixins';
   import fileUpload from '@/components/upload/fileUpload';
   import fileUpload from '@/components/upload/fileUpload';
-  // import add from './purchaseReturnsOutboundShipments';
-  // import detailDialog from '@/views/bpm/handleTask/components/outBound/detailDialog.vue';
+
   import add from '@/views/bpm/outgoingManagement/outbound.vue';
   import add from '@/views/bpm/outgoingManagement/outbound.vue';
   import detailDialog from '@/views/bpm/outgoingManagement/details.vue';
   import detailDialog from '@/views/bpm/outgoingManagement/details.vue';
   import { reviewStatusEnum } from '@/enum/dict';
   import { reviewStatusEnum } from '@/enum/dict';
-  import { getOutInBySourceBizNo } from '@/api/classifyManage';
   import fileMain from "@/components/addDoc/index.vue";
   import fileMain from "@/components/addDoc/index.vue";
   export default {
   export default {
     components: {
     components: {

+ 73 - 16
src/views/bpm/handleTask/components/saleOrder/accountstatement/inventoryTable.vue

@@ -8,9 +8,9 @@
             <span>销售订单:</span>
             <span>销售订单:</span>
             <span>{{ item.orderNo }}</span>
             <span>{{ item.orderNo }}</span>
             <el-divider direction="vertical"></el-divider>
             <el-divider direction="vertical"></el-divider>
-            <span>计价方式:</span>
-            <span> {{ item.pricingWay == 1 ? '按数量计费' : '按重量计费' }}</span>
-            <el-divider direction="vertical"></el-divider>
+            <!-- <span>计价方式:</span>
+            <span> {{ item.pricingWay == 1 ? '按数量计费' : '按重量计费' }}</span> -->
+            <!-- <el-divider direction="vertical"></el-divider> -->
             <span>总金额:</span>
             <span>总金额:</span>
             <span>{{item.amountTotalPrice}}</span>
             <span>{{item.amountTotalPrice}}</span>
             <el-divider direction="vertical"></el-divider>
             <el-divider direction="vertical"></el-divider>
@@ -27,7 +27,7 @@
           <div  v-for="(j,i) in item.subList" :key="i">
           <div  v-for="(j,i) in item.subList" :key="i">
             <ele-pro-table :show-summary="true" :summary-method="getSummaries" ref="table" row-key="id" :needPage="false"
             <ele-pro-table :show-summary="true" :summary-method="getSummaries" ref="table" row-key="id" :needPage="false"
                            :columns="getColumns(j)" max-height="500px" style="margin-bottom: 10px"
                            :columns="getColumns(j)" max-height="500px" style="margin-bottom: 10px"
-                           :sub-title="subTypeList[j.subType]+j.statementSubOrderCode" :toolkit="[]" :datasource="j.detailList"
+                           :sub-title="getTitle(j)" :toolkit="[]" :datasource="j.detailList"
                            cache-key="systemRoleTable17-11121" class="time-form">
                            cache-key="systemRoleTable17-11121" class="time-form">
             </ele-pro-table>
             </ele-pro-table>
           </div>
           </div>
@@ -100,6 +100,17 @@ export default {
             align: 'center',
             align: 'center',
             showOverflowTooltip: true
             showOverflowTooltip: true
           },
           },
+          {
+            minWidth: 140,
+            prop: 'subType',
+            label: '退货产品类型',
+            slot: 'subType',
+            align: 'center',
+            show:j.subType==11,
+            showOverflowTooltip: true,formatter(_row, _column, cellValue){
+              return cellValue==11?'原货':'实物赔偿'
+            }
+          },
           {
           {
             minWidth: 100,
             minWidth: 100,
             prop: 'specification',
             prop: 'specification',
@@ -124,17 +135,17 @@ export default {
           //   slot: 'orderNo',
           //   slot: 'orderNo',
           //   showOverflowTooltip: true
           //   showOverflowTooltip: true
           // },
           // },
-          // {
-          //   minWidth: 100,
-          //   prop: 'pricingWay',
-          //   label: '计价方式',
-          //   align: 'center',
-          //   slot: 'pricingWay',
-          //   showOverflowTooltip: true,
-          //   formatter: (_row, _column, cellValue) => {
-          //     return _row.pricingWay == 1 ? '按数量计价' : '按重量计价'
-          //   }
-          // },
+          {
+            minWidth: 100,
+            prop: 'pricingWay',
+            label: '计价方式',
+            align: 'center',
+            slot: 'pricingWay',
+            showOverflowTooltip: true,
+            formatter: (_row, _column, cellValue) => {
+              return _row.pricingWay == 1 ? '按数量计价' : '按重量计价'
+            }
+          },
           {
           {
             minWidth: 100,
             minWidth: 100,
             prop: 'totalCount',
             prop: 'totalCount',
@@ -186,12 +197,31 @@ export default {
           //   align: 'center',
           //   align: 'center',
           //   slot: 'singlePrice'
           //   slot: 'singlePrice'
           // },
           // },
+          {
+            minWidth: 90,
+            prop: 'singlePrice',
+            label: '单价',
+            align: 'center',
+            slot: 'singlePrice',
+            show:j.subType==11
+          },
           {
           {
             minWidth: 100,
             minWidth: 100,
             prop: 'discountSinglePrice',
             prop: 'discountSinglePrice',
             label: '单价',
             label: '单价',
             align: 'center',
             align: 'center',
-            slot: 'discountSinglePrice'
+            slot: 'discountSinglePrice',
+            show:j.subType!=11
+
+          },
+          {
+            minWidth: 120,
+            prop: 'totalPrice',
+            label: '合计金额',
+            slot: 'totalPrice',
+            align: 'center',
+            show:j.subType==11
+
           },
           },
           {
           {
             minWidth: 120,
             minWidth: 120,
@@ -199,6 +229,8 @@ export default {
             label: '合计金额',
             label: '合计金额',
             slot: 'discountTotalPrice',
             slot: 'discountTotalPrice',
             align: 'center',
             align: 'center',
+            show:j.subType!=11
+
           },
           },
           // {
           // {
           //   minWidth: 100,
           //   minWidth: 100,
@@ -328,12 +360,37 @@ export default {
         return basicFields
         return basicFields
       }
       }
     },
     },
+    getTitle(){
+        return (j)=>{
+          let title=this.subTypeList[j.subType]+(j.statementSubOrderCode||'')+' '
+          if(j.subType==11&&j.returnType){
+                 if(j.returnType=='10'){
+                  title=title+' 退货方式:全部原货 '
+                 }
+                 if(j.returnType=='20'){
+                  title=title+' 退货方式:部分原货+实物赔偿'
+                 }
+                 if(j.returnType=='30'){
+                  title=title+' 退货方式:部分原货+现金赔偿 '+' 赔偿金额:'+j.amountPayablePrice
+                 }
+                 if(j.returnType=='40'){
+                  title=title+' 退货方式:全部实物赔偿'
+                 }
+                 if(j.returnType=='50'){
+                  title=title+' 退货方式:全部现金赔偿  '+' 赔偿金额:'+j.amountPayablePrice
+                 }
+          }
+          return title
+        }
+      }
   },
   },
   data() {
   data() {
     return {
     return {
       subTypeList:{
       subTypeList:{
         10:'发货单:',
         10:'发货单:',
         11:'退货单:',
         11:'退货单:',
+        12:'实物赔偿清单:',
+
       },
       },
       subColumnsTypeList:{
       subColumnsTypeList:{
         10:'发货日期',
         10:'发货日期',

+ 24 - 20
src/views/bpm/handleTask/components/saleOrder/customerReturnGoods/customerReturnOrder.vue

@@ -386,7 +386,6 @@
                 <!-- <el-input v-if="isTrue" v-model="row.improveCorrect"></el-input>
                 <!-- <el-input v-if="isTrue" v-model="row.improveCorrect"></el-input>
                 <div v-else>{{ row.improveCorrect }}</div> -->
                 <div v-else>{{ row.improveCorrect }}</div> -->
 
 
-
                 <el-select
                 <el-select
                   v-if="isTrue"
                   v-if="isTrue"
                   v-model="row.improveCorrect"
                   v-model="row.improveCorrect"
@@ -399,7 +398,6 @@
                   <el-option label="否" value="否" />
                   <el-option label="否" value="否" />
                 </el-select>
                 </el-select>
                 <div v-else>{{ row.improveCorrect }}</div>
                 <div v-else>{{ row.improveCorrect }}</div>
-
               </el-form-item>
               </el-form-item>
             </template>
             </template>
             <template v-slot:headerImproveCorrect="{ column }">
             <template v-slot:headerImproveCorrect="{ column }">
@@ -745,15 +743,15 @@
               align: 'center',
               align: 'center',
               slot: 'ifReasonMatch',
               slot: 'ifReasonMatch',
               headerSlot: 'headerIfReasonMatch'
               headerSlot: 'headerIfReasonMatch'
-            },
-            {
-              minWidth: 140,
-              prop: 'reason',
-              label: '客户退货理由',
-              align: 'center',
-              slot: 'reason',
-              headerSlot: 'headerReason'
             }
             }
+            // {
+            //   minWidth: 140,
+            //   prop: 'reason',
+            //   label: '客户退货理由',
+            //   align: 'center',
+            //   slot: 'reason',
+            //   headerSlot: 'headerReason'
+            // }
           ],
           ],
           //技术部主管指派
           //技术部主管指派
           techLeader: [
           techLeader: [
@@ -764,15 +762,15 @@
               align: 'center',
               align: 'center',
               slot: 'ifReasonMatch',
               slot: 'ifReasonMatch',
               headerSlot: 'headerIfReasonMatch'
               headerSlot: 'headerIfReasonMatch'
-            },
-            {
-              minWidth: 140,
-              prop: 'reason',
-              label: '客户退货理由',
-              align: 'center',
-              slot: 'reason',
-              headerSlot: 'headerReason'
             }
             }
+            // {
+            //   minWidth: 140,
+            //   prop: 'reason',
+            //   label: '客户退货理由',
+            //   align: 'center',
+            //   slot: 'reason',
+            //   headerSlot: 'headerReason'
+            // }
           ],
           ],
           //技术员审核
           //技术员审核
           techApprove: [
           techApprove: [
@@ -940,7 +938,13 @@
       listChange(key, value, row) {
       listChange(key, value, row) {
         this.form.detailList.forEach((item, index) => {
         this.form.detailList.forEach((item, index) => {
           if (!this.form.detailList[index][key]) {
           if (!this.form.detailList[index][key]) {
-            this.$set(this.form.detailList[index], key, value);
+            if (row == 'outerInfo') {
+              if (this.form.detailList[index].inOrOut == 2) {
+                this.$set(this.form.detailList[index], key, value);
+              }
+            } else {
+              this.$set(this.form.detailList[index], key, value);
+            }
           }
           }
         });
         });
         if (key == 'inOrOut') {
         if (key == 'inOrOut') {
@@ -991,7 +995,7 @@
         this.$refs.parentListRef.open();
         this.$refs.parentListRef.open();
       },
       },
       changeParent(data) {
       changeParent(data) {
-        this.listChange('outerInfo', data.name);
+        this.listChange('outerInfo', data.name, 'outerInfo');
       },
       },
       getTableValue() {
       getTableValue() {
         return new Promise((resolve) => {
         return new Promise((resolve) => {

+ 94 - 72
src/views/bpm/handleTask/components/saleOrder/returnGoods/addReturnGoodsDialog.vue

@@ -38,18 +38,21 @@
             </el-select>
             </el-select>
           </el-form-item> -->
           </el-form-item> -->
           <el-form-item label="总金额:" prop="totalAmount">
           <el-form-item label="总金额:" prop="totalAmount">
-              <el-input v-model="totalAmount" disabled>
-                <template slot="append">元</template>
-              </el-input>
-            </el-form-item>
+            <el-input v-model="totalAmount" disabled>
+              <template slot="append">元</template>
+            </el-input>
+          </el-form-item>
           <el-form-item
           <el-form-item
             label="赔偿金额"
             label="赔偿金额"
             prop="redressAmount"
             prop="redressAmount"
             style="margin-bottom: 22px"
             style="margin-bottom: 22px"
             :rules="{
             :rules="{
-              required: ['30', '50'].includes(form.type)&&form.returnSourceType==1
+              required:
+                ['30', '50'].includes(form.type)
             }"
             }"
-            v-show="['30', '50'].includes(form.type)&&form.returnSourceType==1"
+            v-show="
+              ['30', '50'].includes(form.type)
+            "
           >
           >
             <el-input
             <el-input
               clearable
               clearable
@@ -101,11 +104,7 @@
           </el-form-item>
           </el-form-item>
         </el-col>
         </el-col>
       </el-row>
       </el-row>
-      <headerTitle
-        title="原产品清单"
-        style="margin-top: 30px"
-   
-      ></headerTitle>
+      <headerTitle title="原产品清单" style="margin-top: 30px"></headerTitle>
       <ele-pro-table
       <ele-pro-table
         ref="table"
         ref="table"
         :needPage="false"
         :needPage="false"
@@ -114,13 +113,15 @@
         :datasource="productList"
         :datasource="productList"
         row-key="id"
         row-key="id"
       >
       >
-
       </ele-pro-table>
       </ele-pro-table>
-      <headerTitle title="退货产品明细" style="margin-top: 30px"    v-show="!['40', '50'].includes(form.type)||form.returnSourceType!=1"></headerTitle>
+      <headerTitle
+        title="退货产品明细"
+        style="margin-top: 30px"
+        v-show="!['40', '50'].includes(form.type)"
+      ></headerTitle>
       <inventoryTable
       <inventoryTable
-      v-show="!['40', '50'].includes(form.type)||form.returnSourceType!=1"
+        v-show="!['40', '50'].includes(form.type)"
         ref="inventoryTableref"
         ref="inventoryTableref"
-        :pricingWay="form.pricingWay"
         :entrustedCode="form.sendNo"
         :entrustedCode="form.sendNo"
         :sendId="form.sendId"
         :sendId="form.sendId"
         :type="form.type"
         :type="form.type"
@@ -129,18 +130,15 @@
       ></inventoryTable>
       ></inventoryTable>
       <headerTitle
       <headerTitle
         title="实物赔偿清单"
         title="实物赔偿清单"
-        v-show="['20', '40'].includes(form.type)&&form.returnSourceType==1"
+        v-show="['20', '40'].includes(form.type)"
         style="margin-top: 30px"
         style="margin-top: 30px"
       ></headerTitle>
       ></headerTitle>
       <inventoryTable1
       <inventoryTable1
-      v-show="['20', '40'].includes(form.type)&&form.returnSourceType==1"
+        v-show="['20', '40'].includes(form.type)"
         ref="inventoryTableref1"
         ref="inventoryTableref1"
-        :type="form.type"
-        :pricingWay="form.pricingWay"
-        :entrustedCode="form.sendNo"
-        :sendId="form.sendId"
-        :isSinglePrice="false"
-        :taskDefinitionKey="this.taskDefinitionKey"
+        :customerMark="customerMark"
+        :isDiscount="false"
+        :isProduceDeliveryDeadline="taskDefinitionKey == 'produceLeader'"
       ></inventoryTable1>
       ></inventoryTable1>
     </el-form>
     </el-form>
     <!--出库详情-->
     <!--出库详情-->
@@ -162,7 +160,10 @@
     getSendSaleOrderrecordDetail
     getSendSaleOrderrecordDetail
   } from '@/api/bpm/components/saleManage/saleorder';
   } from '@/api/bpm/components/saleManage/saleorder';
   import inventoryTable from './inventoryTable.vue';
   import inventoryTable from './inventoryTable.vue';
-  import inventoryTable1 from './inventoryTableReturn.vue';
+  // import inventoryTable1 from './inventoryTableReturn.vue';
+  import inventoryTable1 from '@/BIZComponents/inventoryTable.vue';
+  import { contactDetail } from '@/api/bpm/components/saleManage/contact';
+
   import sendListDialog from './sendListDialog.vue';
   import sendListDialog from './sendListDialog.vue';
   import { copyObj } from '@/utils/util';
   import { copyObj } from '@/utils/util';
   import fileMain from '@/components/addDoc/index.vue';
   import fileMain from '@/components/addDoc/index.vue';
@@ -175,7 +176,8 @@
       fileUpload,
       fileUpload,
       sendListDialog,
       sendListDialog,
       inventoryTable,
       inventoryTable,
-      inventoryTable1,outboundDetailsDialog
+      inventoryTable1,
+      outboundDetailsDialog
     },
     },
     props: {
     props: {
       businessId: {
       businessId: {
@@ -204,9 +206,10 @@
       };
       };
 
 
       return {
       return {
-        outboundDetailsDialogFlag:false,
+        outboundDetailsDialogFlag: false,
+        customerMark: '',
         oldColumns: [
         oldColumns: [
-        {
+          {
             width: 45,
             width: 45,
             type: 'index',
             type: 'index',
             columnKey: 'index',
             columnKey: 'index',
@@ -336,6 +339,20 @@
             slot: 'weightUnit',
             slot: 'weightUnit',
             align: 'center'
             align: 'center'
           },
           },
+          {
+            width: 160,
+            prop: 'pricingWay',
+            label: '计价方式',
+            slot: 'pricingWay',
+            align: 'center',
+            formatter: (row, column) => {
+              return row.pricingWay == 1
+                ? '按数量计费'
+                : row.pricingWay == 2
+                ? '按重量计费'
+                : '';
+            }
+          },
           {
           {
             width: 160,
             width: 160,
             prop: 'singlePrice',
             prop: 'singlePrice',
@@ -423,7 +440,7 @@
             align: 'center'
             align: 'center'
           }
           }
         ],
         ],
-        productList:[],
+        productList: [],
         detailData: {},
         detailData: {},
         payWayOptions: [],
         payWayOptions: [],
         delDetailIds: [],
         delDetailIds: [],
@@ -462,41 +479,41 @@
     computed: {
     computed: {
       totalAmount() {
       totalAmount() {
         let allcountAmount = 0;
         let allcountAmount = 0;
-        if(this.form.returnSourceType==1){
+        if (this.form.returnSourceType == 1) {
           if (this.form.type === '10') {
           if (this.form.type === '10') {
-          allcountAmount =
-            his.$refs.inventoryTableref &&
-            this.$refs.inventoryTableref.totalAmount;
-        }
-        if (this.form.type === '20') {
-          allcountAmount =
-            (this.$refs.inventoryTableref &&
-              this.$refs.inventoryTableref.totalAmount) +
-            Number(
+            allcountAmount =
+            this.$refs.inventoryTableref &&
+              this.$refs.inventoryTableref.totalAmount;
+          }
+          if (this.form.type === '20') {
+            allcountAmount =
+              (this.$refs.inventoryTableref &&
+                this.$refs.inventoryTableref.totalAmount) +
+              Number(
+                this.$refs.inventoryTableref1 &&
+                  this.$refs.inventoryTableref1.getPrice()[0]
+              );
+          }
+          if (this.form.type === '30') {
+            allcountAmount =
+              (this.$refs.inventoryTableref &&
+                this.$refs.inventoryTableref.totalAmount) +
+              Number(this.form.redressAmount);
+          }
+          if (this.form.type === '40') {
+            allcountAmount =
               this.$refs.inventoryTableref1 &&
               this.$refs.inventoryTableref1 &&
-                this.$refs.inventoryTableref1.getPrice()[0]
-            );
-        }
-        if (this.form.type === '30') {
-          allcountAmount =
-            (this.$refs.inventoryTableref &&
-              this.$refs.inventoryTableref.totalAmount) +
-            Number(this.form.redressAmount);
-        }
-        if (this.form.type === '40') {
-          allcountAmount =
-            this.$refs.inventoryTableref1 &&
-            this.$refs.inventoryTableref1.getPrice()[0];
-        }
-        if (this.form.type === '50') {
-          allcountAmount = Number(this.form.redressAmount);
-        }
-        }else{
+              this.$refs.inventoryTableref1.getPrice()[0];
+          }
+          if (this.form.type === '50') {
+            allcountAmount = Number(this.form.redressAmount);
+          }
+        } else {
           allcountAmount =
           allcountAmount =
             this.$refs.inventoryTableref &&
             this.$refs.inventoryTableref &&
             this.$refs.inventoryTableref.totalAmount;
             this.$refs.inventoryTableref.totalAmount;
         }
         }
-       
+
         return allcountAmount;
         return allcountAmount;
       }
       }
     },
     },
@@ -530,8 +547,7 @@
       //发货单详情
       //发货单详情
       async getSendSaleOrderDetail(id) {
       async getSendSaleOrderDetail(id) {
         const data = await getSendSaleOrderrecordDetail(id);
         const data = await getSendSaleOrderrecordDetail(id);
-        this.productList=data.productList
-  
+        this.productList = data.productList;
       },
       },
 
 
       //获取退货单详情
       //获取退货单详情
@@ -541,16 +557,22 @@
         this.loading = false;
         this.loading = false;
         if (data) {
         if (data) {
           this.form = data;
           this.form = data;
-            this.form.pricingWay = data?.saleOrder?.pricingWay;
-            this.form.entrustedCode = data?.entrustedReceiveCode;
-            this.form.entrustedId = data?.entrustedReceiveId;
+          // this.form.pricingWay = data?.saleOrder?.pricingWay;
+          this.form.entrustedCode = data?.entrustedReceiveCode;
+          this.form.entrustedId = data?.entrustedReceiveId;
+          if (data.contactId) {
+            const { base } = await contactDetail(data.contactId);
+            this.customerMark = base.serialNo;
+          }
+
           this.$nextTick(() => {
           this.$nextTick(() => {
-          
             this.$refs.inventoryTableref &&
             this.$refs.inventoryTableref &&
               this.$refs.inventoryTableref.putTableValue(data.productList);
               this.$refs.inventoryTableref.putTableValue(data.productList);
             this.$refs.inventoryTableref1 &&
             this.$refs.inventoryTableref1 &&
-              this.$refs.inventoryTableref1.putTableValue(data);
-              this.getSendSaleOrderDetail(data.sendId)
+              this.$refs.inventoryTableref1.putTableValue({
+                productList: data.redressProductList
+              });
+            this.getSendSaleOrderDetail(data.sendId);
           });
           });
         }
         }
       },
       },
@@ -618,9 +640,8 @@
         ]);
         ]);
       },
       },
       onchangeLink() {
       onchangeLink() {
-        if(this.form.type=='10'){
-          this.handleSelectGoods()
-
+        if (this.form.type == '10') {
+          this.handleSelectGoods();
         }
         }
         // this.getSendSaleOrderDetail(this.form.sendId);
         // this.getSendSaleOrderDetail(this.form.sendId);
       },
       },
@@ -646,10 +667,11 @@
           this.form.replied = this.form.repliedFiles.length > 0 ? 1 : 0;
           this.form.replied = this.form.repliedFiles.length > 0 ? 1 : 0;
           let commitData = Object.assign({}, this.form, {
           let commitData = Object.assign({}, this.form, {
             totalAmount: this.totalAmount,
             totalAmount: this.totalAmount,
+            payAmount:this.totalAmount,
+
             productList: data.productList,
             productList: data.productList,
             redressProductList
             redressProductList
           });
           });
-          commitData.totalAmount = this.totalAmount;
 
 
           return commitData;
           return commitData;
         } catch (error) {
         } catch (error) {
@@ -661,7 +683,7 @@
       handleSelectGoods(list) {
       handleSelectGoods(list) {
         this.outboundDetailsDialogFlag = true;
         this.outboundDetailsDialogFlag = true;
         this.$nextTick(() => {
         this.$nextTick(() => {
-          this.$refs.outboundDetailsDialogRef.init(this.form,list);
+          this.$refs.outboundDetailsDialogRef.init(this.form, list);
         });
         });
       },
       },
       saveDate(data) {
       saveDate(data) {
@@ -672,8 +694,8 @@
           this.productList.forEach((val) => {
           this.productList.forEach((val) => {
             if (item.productCode == val.productCode) {
             if (item.productCode == val.productCode) {
               item['singlePrice'] = val.singlePrice;
               item['singlePrice'] = val.singlePrice;
-              item['clientCode']= item.clientCode||val.customerMark;
-              item['pricingWay'] = item.pricingWay || this.form.pricingWay||1;
+              item['clientCode'] = item.clientCode || val.customerMark;
+              item['pricingWay'] = item.pricingWay || val.pricingWay;
             }
             }
           });
           });
         });
         });

+ 21 - 6
src/views/bpm/handleTask/components/saleOrder/returnGoods/detailDialog.vue

@@ -159,16 +159,19 @@
         ['20', '40'].includes(form.type) && taskDefinitionKey != 'produceLeader'
         ['20', '40'].includes(form.type) && taskDefinitionKey != 'produceLeader'
       "
       "
       ref="inventoryTabledetailRef"
       ref="inventoryTabledetailRef"
-      :isSinglePrice="false"
+      :isDiscount="false"
+      :isAllPrice="false"
+
     ></inventoryTabledetail>
     ></inventoryTabledetail>
     <inventoryTable
     <inventoryTable
       v-if="
       v-if="
         ['20', '40'].includes(form.type) && taskDefinitionKey == 'produceLeader'
         ['20', '40'].includes(form.type) && taskDefinitionKey == 'produceLeader'
       "
       "
       ref="inventoryTabledetailRef"
       ref="inventoryTabledetailRef"
-      :isSinglePrice="false"
-      :taskDefinitionKey="taskDefinitionKey"
+      :isProduceDeliveryDeadline="taskDefinitionKey == 'produceLeader'"
+      :isDiscount="false"
     ></inventoryTable>
     ></inventoryTable>
+    
   </div>
   </div>
 </template>
 </template>
 
 
@@ -177,8 +180,9 @@
   import { getFile } from '@/api/system/file';
   import { getFile } from '@/api/system/file';
   import dictMixins from '@/mixins/dictMixins';
   import dictMixins from '@/mixins/dictMixins';
   import { reviewStatusEnum } from '@/enum/dict';
   import { reviewStatusEnum } from '@/enum/dict';
-  import inventoryTabledetail from './inventoryTableReturnDetail.vue';
-  import inventoryTable from './inventoryTableReturn.vue';
+  import inventoryTabledetail from '@/BIZComponents/inventoryTableDetails.vue';
+  import inventoryTable from '@/BIZComponents/inventoryTable.vue';
+
 
 
   export default {
   export default {
     mixins: [dictMixins],
     mixins: [dictMixins],
@@ -332,6 +336,17 @@
             slot: 'weightUnit',
             slot: 'weightUnit',
             align: 'center'
             align: 'center'
           },
           },
+          {
+            width: 160,
+            prop: 'pricingWay',
+            label: '计价方式',
+            slot: 'pricingWay',
+            align: 'center',
+            formatter: (row, column) => {
+              return row.pricingWay == 1 ? '按数量计费' : row.pricingWay == 2 ? '按重量计费':'';
+
+            }
+          },
           {
           {
             width: 160,
             width: 160,
             prop: 'singlePrice',
             prop: 'singlePrice',
@@ -675,7 +690,7 @@
           this.form.pricingWay = data?.saleOrder?.pricingWay;
           this.form.pricingWay = data?.saleOrder?.pricingWay;
           this.$nextTick(() => {
           this.$nextTick(() => {
             this.$refs.inventoryTabledetailRef &&
             this.$refs.inventoryTabledetailRef &&
-              this.$refs.inventoryTabledetailRef.putTableValue(data);
+              this.$refs.inventoryTabledetailRef.putTableValue({productList:data.redressProductList});
               this.getSendSaleOrderDetail(data.sendId)
               this.getSendSaleOrderDetail(data.sendId)
           });
           });
         }
         }

+ 16 - 20
src/views/bpm/handleTask/components/saleOrder/returnGoods/inventoryTable.vue

@@ -79,13 +79,7 @@
         <el-form-item
         <el-form-item
           style="margin-bottom: 20px"
           style="margin-bottom: 20px"
           :prop="'datasource.' + scope.$index + '.sendTotalWeight'"
           :prop="'datasource.' + scope.$index + '.sendTotalWeight'"
-          :rules="[
-            {
-              required: entrustedCode && pricingWay == 2,
-              message: '请输入数字',
-              trigger: 'blur'
-            }
-          ]"
+
         >
         >
           <el-input
           <el-input
             v-model="scope.row.sendTotalWeight"
             v-model="scope.row.sendTotalWeight"
@@ -380,7 +374,7 @@
           //   align: 'center'
           //   align: 'center'
           // },
           // },
           {
           {
-            minWidth: 80,
+            minWidth: 150,
             prop: 'receiveTotalWeight',
             prop: 'receiveTotalWeight',
             label: '重量',
             label: '重量',
             slot: 'receiveTotalWeight',
             slot: 'receiveTotalWeight',
@@ -461,16 +455,18 @@
     computed: {
     computed: {
       totalAmount() {
       totalAmount() {
         let num = 0;
         let num = 0;
-        this.form.datasource.forEach((item) => {
+        this.form.datasource.forEach((item, index) => {
           if (item.pricingWay == 1) {
           if (item.pricingWay == 1) {
-            item.totalPrice = item.singlePrice * item.totalCount;
+            this.$set(
+              this.form.datasource[index],
+              'totalPrice',
+              item.singlePrice * item.totalCount || 0
+            );
           }
           }
-          if (item.pricingWay == 2) {
-            item.totalPrice =
-              item.singlePrice * item.totalCount * receiveTotalWeight;
+      
+          if (item.totalPrice) {
+            num += Number(item.totalPrice);
           }
           }
-
-          num += item.totalPrice;
         });
         });
         return num;
         return num;
       }
       }
@@ -551,7 +547,7 @@
           this.form.datasource[this.curIndex].receiveTotalWeight
           this.form.datasource[this.curIndex].receiveTotalWeight
         );
         );
         // if (this.entrustedCode) {
         // if (this.entrustedCode) {
-        if (this.pricingWay == 2) {
+        if (this.form.datasource[this.curIndex].pricingWay == 2) {
           if (isNaN(receiveTotalWeight) || isNaN(sendTotalWeight)) {
           if (isNaN(receiveTotalWeight) || isNaN(sendTotalWeight)) {
             return this.$set(
             return this.$set(
               this.form.datasource[this.curIndex],
               this.form.datasource[this.curIndex],
@@ -575,7 +571,7 @@
         // } else {
         // } else {
         //   this.$set(this.form.datasource[this.curIndex], 'increaseTotalWeight', sendTotalWeight);
         //   this.$set(this.form.datasource[this.curIndex], 'increaseTotalWeight', sendTotalWeight);
         // }
         // }
-        if (this.pricingWay == 2) {
+        if (this.form.datasource[this.curIndex].pricingWay == 2) {
           this.getWeightPrice();
           this.getWeightPrice();
         }
         }
         this.$refs.table.reload();
         this.$refs.table.reload();
@@ -619,7 +615,7 @@
             v.returnReason = v.returnReason || '';
             v.returnReason = v.returnReason || '';
             v.returnType = v.returnType || '';
             v.returnType = v.returnType || '';
             v.sendTotalCount = v.sendTotalCount || v.totalCount;
             v.sendTotalCount = v.sendTotalCount || v.totalCount;
-            v.sendProductId = v.sendProductId || v.id;
+            v.sendProductId = v.sendProductId || v.categoryId||v.productId;
           });
           });
           this.oldSendTotalWeightList = data.map((item) => {
           this.oldSendTotalWeightList = data.map((item) => {
             return {
             return {
@@ -641,14 +637,14 @@
           //   //   );
           //   //   );
           //   // }
           //   // }
           // });
           // });
-          this.gettotalAmount();
+          // this.gettotalAmount();
         }
         }
       },
       },
 
 
       remove(index) {
       remove(index) {
         this.form.datasource.splice(index, 1);
         this.form.datasource.splice(index, 1);
         this.setSort();
         this.setSort();
-        this.gettotalAmount();
+        // this.gettotalAmount();
       },
       },
       // 清空表格
       // 清空表格
       restTable() {
       restTable() {

+ 11 - 0
src/views/bpm/handleTask/components/saleOrder/returnGoods/inventoryTableReturn.vue

@@ -596,6 +596,17 @@
             align: 'center',
             align: 'center',
             show: this.clientEnvironmentId == '4'
             show: this.clientEnvironmentId == '4'
           },
           },
+          {
+            width: 160,
+            prop: 'pricingWay',
+            label: '计价方式',
+            slot: 'pricingWay',
+            align: 'center',
+            formatter: (row, column) => {
+              return row.pricingWay == 1 ? '按数量计费' : row.pricingWay == 2 ? '按重量计费':'';
+
+            }
+          },
           {
           {
             width: 150,
             width: 150,
             prop: 'singlePrice',
             prop: 'singlePrice',

+ 10 - 0
src/views/bpm/handleTask/components/saleOrder/returnGoods/inventoryTabledetail.vue

@@ -204,7 +204,17 @@ export default {
           slot: 'weightUnit',
           slot: 'weightUnit',
           align: 'center'
           align: 'center'
         },
         },
+        {
+            width: 160,
+            prop: 'pricingWay',
+            label: '计价方式',
+            slot: 'pricingWay',
+            align: 'center',
+            formatter: (row, column) => {
+              return row.pricingWay == 1 ? '按数量计费' : row.pricingWay == 2 ? '按重量计费':'';
 
 
+            }
+          },
         {
         {
           width: 160,
           width: 160,
           prop: 'singlePrice',
           prop: 'singlePrice',

+ 5 - 1
src/views/bpm/handleTask/components/supplierManage/contactDetailDialog.vue

@@ -615,7 +615,11 @@ export default {
     },
     },
     async _getById(id) {
     async _getById(id) {
       let QCInfo = await contactQcPackDetailAPI(id)
       let QCInfo = await contactQcPackDetailAPI(id)
-      const data = await contactDetail(QCInfo.contactId);
+      let data = {}
+      if(QCInfo.relationId){
+        data = await contactDetail(QCInfo.relationId);
+      }
+
       this.form = data.base;
       this.form = data.base;
       this.otherForm = data.other;
       this.otherForm = data.other;
       this.tableBankData = data.bankList;
       this.tableBankData = data.bankList;

+ 1 - 1
src/views/bpm/handleTask/components/supplierManage/parentList.vue

@@ -47,7 +47,7 @@ export default {
   props: {
   props: {
     classType: {
     classType: {
       type: Number,
       type: Number,
-      default: 1
+      default: 2
     }
     }
   },
   },
   data() {
   data() {

+ 2 - 2
src/views/bpm/handleTask/index.vue

@@ -62,9 +62,9 @@
               @submit="submit"
               @submit="submit"
               @handleClose="handleClose"
               @handleClose="handleClose"
               ref="subForm"
               ref="subForm"
-            ></async-sub-form-component> 
+            ></async-sub-form-component>
           </div>
           </div>
-          <div> </div>
+          <!-- <div> </div> -->
           <!-- <el-col :span="16" :offset="6">
           <!-- <el-col :span="16" :offset="6">
             <el-form
             <el-form
               :ref="'form' + index"
               :ref="'form' + index"

+ 42 - 4
src/views/bpm/stockManagement/details.vue

@@ -61,6 +61,21 @@
                   <span>{{ extInfo.supplierName }}</span>
                   <span>{{ extInfo.supplierName }}</span>
                 </el-form-item>
                 </el-form-item>
               </el-col>
               </el-col>
+              <el-col :span="8" v-if="infoData.bizType == 2">
+                <el-form-item label="供应商代号:">
+                  <template v-if="bizType == 2">{{
+                    extInfo.supplierMark
+                  }}</template>
+                  <template v-if="bizType != 2">{{
+                    extInfo.supplierCode
+                  }}</template>
+                </el-form-item>
+              </el-col>
+              <el-col :span="8" v-if="infoData.bizType == 2">
+                <el-form-item label="产地:">
+                  <span>{{ extInfo.provenance }}</span>
+                </el-form-item>
+              </el-col>
               <el-col :span="8">
               <el-col :span="8">
                 <el-form-item label="送货人:">
                 <el-form-item label="送货人:">
                   <span>{{ infoData.fromUser }}</span>
                   <span>{{ infoData.fromUser }}</span>
@@ -109,7 +124,7 @@
             <el-table-column label="序号" type="index" width="50">
             <el-table-column label="序号" type="index" width="50">
             </el-table-column>
             </el-table-column>
             <el-table-column
             <el-table-column
-            v-if="isIds"
+              v-if="isIds"
               minWidth="150"
               minWidth="150"
               label="入库单号"
               label="入库单号"
               prop="bizNo"
               prop="bizNo"
@@ -230,10 +245,10 @@
               :show-overflow-tooltip="true"
               :show-overflow-tooltip="true"
             >
             >
             </el-table-column>
             </el-table-column>
-            <el-table-column label="单价" prop="price" align="center">
+            <el-table-column label="单价" prop="unitPrice" align="center">
               <template slot-scope="{ row }">
               <template slot-scope="{ row }">
                 <template>
                 <template>
-                  {{ row.price ? row.price : '-' + '元' }}/{{ row.measureUnit }}
+                  {{ row.unitPrice ? row.unitPrice + '/元' : '' }}
                 </template>
                 </template>
               </template>
               </template>
             </el-table-column>
             </el-table-column>
@@ -241,7 +256,7 @@
             <el-table-column
             <el-table-column
               label="金额"
               label="金额"
               align="center"
               align="center"
-              prop="contentImage"
+              prop="totalMoney"
               :show-overflow-tooltip="true"
               :show-overflow-tooltip="true"
             >
             >
               <template slot-scope="{ row, $index }">
               <template slot-scope="{ row, $index }">
@@ -313,6 +328,11 @@
               prop="packingQuantity"
               prop="packingQuantity"
               :show-overflow-tooltip="true"
               :show-overflow-tooltip="true"
             ></el-table-column>
             ></el-table-column>
+            <el-table-column
+              label="计量数量"
+              prop="measureQuantity"
+              :show-overflow-tooltip="true"
+            ></el-table-column>
             <el-table-column
             <el-table-column
               label="单位"
               label="单位"
               prop="packingUnit"
               prop="packingUnit"
@@ -329,6 +349,10 @@
               prop="clientCode"
               prop="clientCode"
               :show-overflow-tooltip="true"
               :show-overflow-tooltip="true"
             >
             >
+              <template slot-scope="{ row, $index }">
+                <span v-if="bizType != 2">{{ row?.clientCode }}</span>
+                <span v-if="bizType == 2">{{ row?.customerMark }}</span>
+              </template>
             </el-table-column>
             </el-table-column>
             <el-table-column
             <el-table-column
               label="刻码"
               label="刻码"
@@ -418,6 +442,16 @@
               prop="barcodes"
               prop="barcodes"
               :show-overflow-tooltip="true"
               :show-overflow-tooltip="true"
             ></el-table-column>
             ></el-table-column>
+            <el-table-column
+              label="计价方式"
+              prop="pricingWay"
+              :show-overflow-tooltip="true"
+            >
+              <template slot-scope="{ row, $index }">
+                <span v-if="row.pricingWay == 1">数量</span>
+                <span v-if="row.pricingWay == 2">重量</span>
+              </template>
+            </el-table-column>
             <el-table-column
             <el-table-column
               label="计量数量"
               label="计量数量"
               prop="measureQuantity"
               prop="measureQuantity"
@@ -429,6 +463,10 @@
             <el-table-column label="物料代号" prop="materielDesignation">
             <el-table-column label="物料代号" prop="materielDesignation">
             </el-table-column>
             </el-table-column>
             <el-table-column label="客户代号" prop="clientCode">
             <el-table-column label="客户代号" prop="clientCode">
+              <template slot-scope="{ row, $index }">
+                <span v-if="bizType != 2">{{ row?.clientCode }}</span>
+                <span v-if="bizType == 2">{{ row?.customerMark }}</span>
+              </template>
             </el-table-column>
             </el-table-column>
             <el-table-column label="刻码" prop="engrave"> </el-table-column>
             <el-table-column label="刻码" prop="engrave"> </el-table-column>
             <el-table-column width="100" label="重量" prop="weight">
             <el-table-column width="100" label="重量" prop="weight">

+ 24 - 29
src/views/bpm/stockManagement/storage.vue

@@ -405,29 +405,31 @@
               </el-table-column>
               </el-table-column>
               <el-table-column
               <el-table-column
                 label="单价"
                 label="单价"
-                prop="price"
+                prop="unitPrice"
                 width="200"
                 width="200"
                 align="center"
                 align="center"
               >
               >
                 <template slot-scope="{ row, $index }">
                 <template slot-scope="{ row, $index }">
                   <template v-if="row.isSave">
                   <template v-if="row.isSave">
-                    {{ row.price }}元/{{ row.measureUnit }}
+                    <span>{{ row.unitPrice }}</span>
+                    <span v-if="row.unitPrice">/元</span>
                   </template>
                   </template>
                   <el-form-item v-else>
                   <el-form-item v-else>
                     <el-input
                     <el-input
                       type="number"
                       type="number"
-                      :ref="'price' + $index"
+                      :ref="'unitPrice' + $index"
                       @keyup.native="
                       @keyup.native="
-                        moveFocus($event, $index, 'price', '产品', row)
+                        moveFocus($event, $index, 'unitPrice', '产品', row)
                       "
                       "
-                      v-model.number="row.price"
+                      v-model.number="row.unitPrice"
                       placeholder="非必填"
                       placeholder="非必填"
                       @input="
                       @input="
-                        (value) => (row.price = value.replace(/[^0-9.]+/g, ''))
+                        (value) =>
+                          (row.unitPrice = value.replace(/[^0-9.]+/g, ''))
                       "
                       "
                     >
                     >
                       <template slot="append">
                       <template slot="append">
-                        元/{{ row.measureUnit }}
+                        <span v-if="row.unitPrice">/元</span>
                       </template>
                       </template>
                     </el-input>
                     </el-input>
                   </el-form-item>
                   </el-form-item>
@@ -442,7 +444,7 @@
                 <template slot-scope="{ row, $index }">
                 <template slot-scope="{ row, $index }">
                   {{
                   {{
                     changeCount(
                     changeCount(
-                      calcSumTotal(row.measureQuantity, row.price, row)
+                      calcSumTotal(row.measureQuantity, row.unitPrice, row)
                     )
                     )
                   }}
                   }}
                 </template>
                 </template>
@@ -1236,8 +1238,6 @@
         } else {
         } else {
           this.$message.warning('未获取到物品类型!');
           this.$message.warning('未获取到物品类型!');
         }
         }
-
-        console.log('this.detailList---------', this.detailList);
         if (this.sourceBizNo != null && this.sourceBizNo != '') {
         if (this.sourceBizNo != null && this.sourceBizNo != '') {
           this.formData.sourceBizNo = this.sourceBizNo;
           this.formData.sourceBizNo = this.sourceBizNo;
         } else {
         } else {
@@ -1252,14 +1252,13 @@
 
 
         // this.formData.extInfo.supplierName = this.form.supplierName;
         // this.formData.extInfo.supplierName = this.form.supplierName;
         // this.formData.extInfo.supplierId = this.form.supplierId;
         // this.formData.extInfo.supplierId = this.form.supplierId;
-        console.log('this.saleProductList---------', this.saleProductList);
+        
         if (this.saleProductList?.length > 0) {
         if (this.saleProductList?.length > 0) {
           // 物品列表
           // 物品列表
           let codeList = this.saleProductList.map((item) => {
           let codeList = this.saleProductList.map((item) => {
             return item.productCode;
             return item.productCode;
           });
           });
           storageApi.getListByNameOrModeType({ codeList }).then(async (res) => {
           storageApi.getListByNameOrModeType({ codeList }).then(async (res) => {
-            console.log('res---------', res);
             if (res.length <= 0) {
             if (res.length <= 0) {
               this.$message.warning('未获取到物品信息!');
               this.$message.warning('未获取到物品信息!');
               return;
               return;
@@ -1301,7 +1300,7 @@
               let packingQuantity = filtersItem.totalCount || 0;
               let packingQuantity = filtersItem.totalCount || 0;
               let packingUnit = filtersItem.measuringUnit || '';
               let packingUnit = filtersItem.measuringUnit || '';
 
 
-              let price = filtersItem.singlePrice || 0;
+              let unitPrice = filtersItem.singlePrice || 0;
               let pricingWay = filtersItem.pricingWay || '';
               let pricingWay = filtersItem.pricingWay || '';
               // 计价方式是重量
               // 计价方式是重量
               let singleWeight =
               let singleWeight =
@@ -1349,7 +1348,7 @@
                 weight: weight, // 总重量
                 weight: weight, // 总重量
                 weightUnit: item.weightUnit, // 重量单位
                 weightUnit: item.weightUnit, // 重量单位
                 totalMoney: totalMoney, // 总价
                 totalMoney: totalMoney, // 总价
-                price: item.price || price, // 单价
+                unitPrice: item.unitPrice || unitPrice, // 单价
                 pricingWay: pricingWay, //计价方式
                 pricingWay: pricingWay, //计价方式
                 purpose: '', // 用途
                 purpose: '', // 用途
                 isUnpack: item.isUnpack, // 是否允许拆包
                 isUnpack: item.isUnpack, // 是否允许拆包
@@ -1525,7 +1524,7 @@
                 singleWeight: singleWeight,
                 singleWeight: singleWeight,
                 weightUnit: item.weightUnit, // 重量单位
                 weightUnit: item.weightUnit, // 重量单位
                 totalMoney: item.totalPrice, // 总价
                 totalMoney: item.totalPrice, // 总价
-                price: item.price, // 单价
+                unitPrice: item.unitPrice, // 单价
                 purpose: '', // 用途
                 purpose: '', // 用途
                 isUnpack: item.isUnpack, // 是否允许拆包
                 isUnpack: item.isUnpack, // 是否允许拆包
                 warehouseId: this.isMoreProduct
                 warehouseId: this.isMoreProduct
@@ -1664,7 +1663,7 @@
                     ).index
                     ).index
                   : this.productList[0].index, // 产品索引
                   : this.productList[0].index, // 产品索引
                 batchNo: item.batchNo || this.productList[0].batchNo, // 批次号
                 batchNo: item.batchNo || this.productList[0].batchNo, // 批次号
-                packageNo: packingCodeList[index]?.onlyCode, // 包装编码
+                packageNo: item.packageNo||packingCodeList[index]?.onlyCode, // 包装编码
                 packingQuantity: 1, // 包装数量
                 packingQuantity: 1, // 包装数量
                 packingUnit: item.packingUnit, // 单位
                 packingUnit: item.packingUnit, // 单位
                 measureQuantity: item.quantity, // 计量数量
                 measureQuantity: item.quantity, // 计量数量
@@ -1733,7 +1732,7 @@
       },
       },
       // 赋值入库时间
       // 赋值入库时间
       getNowFormatDate() {
       getNowFormatDate() {
-        if (this.bizType == '2') {
+        if (this.bizType == '2' || this.bizType == '6') {
           let time = '00:00:00';
           let time = '00:00:00';
           this.formData.storageTime = this.form.receiveDate + ' ' + time;
           this.formData.storageTime = this.form.receiveDate + ' ' + time;
         } else {
         } else {
@@ -1771,7 +1770,7 @@
         switch (type) {
         switch (type) {
           case '产品':
           case '产品':
             listLength = this.productList.length;
             listLength = this.productList.length;
-            keyfield = ['batchNo', 'packingQuantity', 'price', 'purpose'];
+            keyfield = ['batchNo', 'packingQuantity', 'unitPrice', 'purpose'];
             break;
             break;
           case '包装':
           case '包装':
             listLength = this.showPackingList.length;
             listLength = this.showPackingList.length;
@@ -1951,10 +1950,6 @@
               _workOrderId = this.detailProductList[0]?.workOrderId;
               _workOrderId = this.detailProductList[0]?.workOrderId;
               _taskId = this.detailProductList[0]?.taskId;
               _taskId = this.detailProductList[0]?.taskId;
             }
             }
-            // workOrderId: this.detailProductList[0]?.workOrderId,
-            // taskId: this.detailProductList[0]?.taskId,
-            // taskId: this.detailList[0]?.taskId,
-            // workOrderId: this.detailList[0]?.workOrderId,
             return {
             return {
               ...packingItem,
               ...packingItem,
               workOrderId: _workOrderId,
               workOrderId: _workOrderId,
@@ -2171,15 +2166,15 @@
         }
         }
       },
       },
       //计算金额
       //计算金额
-      calcSumTotal(measureQuantity, price, row) {
+      calcSumTotal(measureQuantity, unitPrice, row) {
         //最小包装单元,包装数量,单价
         //最小包装单元,包装数量,单价
         if (this.bizType != 2) {
         if (this.bizType != 2) {
           const total = {
           const total = {
             measureQuantity: Number(measureQuantity > 0 ? measureQuantity : 0),
             measureQuantity: Number(measureQuantity > 0 ? measureQuantity : 0),
-            price: Number(price > 0 ? price : 0)
+            unitPrice: Number(unitPrice > 0 ? unitPrice : 0)
           };
           };
           let number = Number(
           let number = Number(
-            this.$math.format(total.measureQuantity * total.price, 14)
+            this.$math.format(total.measureQuantity * total.unitPrice, 14)
           );
           );
 
 
           row.totalMoney = number;
           row.totalMoney = number;
@@ -2339,13 +2334,12 @@
             pricingWay: item.pricingWay,
             pricingWay: item.pricingWay,
             weightUnit: item.weightUnit, // 重量单位
             weightUnit: item.weightUnit, // 重量单位
             totalMoney: item.totalPrice, // 总价
             totalMoney: item.totalPrice, // 总价
-            price: item.price, // 单价
+            unitPrice: item.unitPrice, // 单价
             purpose: '', // 用途
             purpose: '', // 用途
             isUnpack: item.isUnpack // 是否允许拆包
             isUnpack: item.isUnpack // 是否允许拆包
           };
           };
         });
         });
         this.productList = this.productList.concat(productList);
         this.productList = this.productList.concat(productList);
-        console.log('this.productList--------', this.productList);
       },
       },
       // 物品保存验证表单(批量)
       // 物品保存验证表单(批量)
       validateForm() {
       validateForm() {
@@ -2796,7 +2790,7 @@
         let num = row.packingQuantity;
         let num = row.packingQuantity;
         let filterArr = [];
         let filterArr = [];
         // 处理单位为KG类的情况
         // 处理单位为KG类的情况
-
+        console.log(packingBoolen, 'packingBoolenpackingBoolen');
         if (packingBoolen) {
         if (packingBoolen) {
           filterArr = row.packingSpecificationOption.filter((item) => {
           filterArr = row.packingSpecificationOption.filter((item) => {
             return (
             return (
@@ -2834,8 +2828,9 @@
               }
               }
             }
             }
           } else {
           } else {
+            console.log(row, 'row123');
             // num = row.packingQuantity;
             // num = row.packingQuantity;
-            num = this.productList.length;
+            num = 1;
           }
           }
         }
         }
         for (let index = 0; index < num; index++) {
         for (let index = 0; index < num; index++) {