Browse Source

Merge branch 'dev' of http://110.41.163.243:9980/kd-aiot/kd-aiot-frontend-eom into dev

zhangqing 1 year ago
parent
commit
ab7a77952b
30 changed files with 2316 additions and 2112 deletions
  1. 12 4
      src/BIZComponents/inventoryTableDetails.vue
  2. 3 3
      src/views/bpm/processInstance/detail.vue
  3. 8 8
      src/views/contractManage/contractBook/components/addDialog.vue
  4. 128 0
      src/views/contractManage/contractBook/components/generateContractsDialog1.vue
  5. 13 22
      src/views/financialManage/components/feeRelatedInfoTable.vue
  6. 3 56
      src/views/financialManage/feeManage/feeApplication/addOrEditDialog.vue
  7. 1 1
      src/views/financialManage/invoiceManage/components/addOrEditDialog.vue
  8. 6 1
      src/views/financialManage/invoiceManage/components/tableInfo.vue
  9. 35 7
      src/views/financialManage/payableManage/components/infoTable.vue
  10. 10 1
      src/views/financialManage/payableManage/index.vue
  11. 2 1
      src/views/purchasingManage/inquiryManage/components/inquiryTable.vue
  12. 479 474
      src/views/purchasingManage/purchaseOrder/invoice/components/addInvoiceDialog.vue
  13. 9 6
      src/views/purchasingManage/purchaseOrder/invoice/components/inventoryTable.vue
  14. 5 1
      src/views/purchasingManage/purchaseOrder/outSourceSend/components/detailDialog.vue
  15. 5 1
      src/views/purchasingManage/purchaseOrder/outSourceSend/components/inventoryTable.vue
  16. 5 1
      src/views/purchasingManage/purchaseOrder/returnGoods/components/detailDialog.vue
  17. 5 1
      src/views/purchasingManage/purchaseOrder/returnGoods/components/inventoryTable.vue
  18. 2 1
      src/views/saleManage/saleOrder/components/addDialog.vue
  19. 346 356
      src/views/saleManage/saleOrder/entrustedReceive/components/detailDialog.vue
  20. 579 543
      src/views/saleManage/saleOrder/entrustedReceive/components/inventoryTable.vue
  21. 6 6
      src/views/saleManage/saleOrder/exceptionManagement/exceptionList/index.vue
  22. 6 1
      src/views/saleManage/saleOrder/index.vue
  23. 3 1
      src/views/saleManage/saleOrder/invoice/components/addInvoiceDialog.vue
  24. 5 1
      src/views/saleManage/saleOrder/invoice/components/detailDialog.vue
  25. 5 1
      src/views/saleManage/saleOrder/invoice/components/inventoryTable.vue
  26. 19 15
      src/views/saleManage/saleOrder/invoice/components/palletTable.vue
  27. 169 323
      src/views/saleManage/saleOrder/invoiceConfirm/components/addInvoiceDialog.vue
  28. 130 276
      src/views/saleManage/saleOrder/invoiceConfirm/components/detailDialog.vue
  29. 103 0
      src/views/saleManage/saleOrder/palletManagement/components/searchTable.vue
  30. 214 0
      src/views/saleManage/saleOrder/palletManagement/index.vue

+ 12 - 4
src/BIZComponents/inventoryTableDetails.vue

@@ -111,7 +111,12 @@
           datasource: []
         },
 
-        columns: [
+       
+      };
+    },
+    computed: {
+      columns(){
+        return [
           {
             width: 45,
             type: 'index',
@@ -263,7 +268,11 @@
             width: 160,
             prop: 'taxRate',
             label: '税率',
-            slot: 'taxRate',
+            formatter: (_row, _column, cellValue) => {
+              return _row.taxRate
+                ? _row.taxRate+'%'
+                : '';
+            },
             align: 'center'
           },
           {
@@ -460,9 +469,8 @@
             align: 'center'
           }
         ]
-      };
+      }
     },
-    computed: {},
 
     created() {
       this.requestDict('产地');

+ 3 - 3
src/views/bpm/processInstance/detail.vue

@@ -68,7 +68,7 @@
                     </el-image>
                   </label>
 
-                  <p v-if="item.reason">
+                  <p v-if="item.reason&&item.result!=4">
                     <el-tag :type="getTimelineItemType(item)">{{
                       item.reason
                     }}</el-tag>
@@ -191,9 +191,9 @@
           this.tasks = [];
           // 移除已取消的审批
           response.forEach((task) => {
-            if (task.result !== 4) {
+            // if (task.result !== 4) {
               this.tasks.push(task);
-            }
+            // }
           });
           // 排序,将未完成的排在前面,已完成的排在后面;
           this.tasks.sort((a, b) => {

+ 8 - 8
src/views/contractManage/contractBook/components/addDialog.vue

@@ -564,13 +564,13 @@
       @changeParent="getReturnOrderInfo"
     >
     </return-order-dialog>
-    <generate-contracts-dialog
+    <generate-contracts-dialog1
       :isContractBook="true"
-      v-if="generateContractsDialogFlag"
+      v-if="generateContractsDialogFlag1"
       ref="generateContractsDialogRef"
-      :generate-contracts-dialog-flag.sync="generateContractsDialogFlag"
+      :generate-contracts-dialog-flag1.sync="generateContractsDialogFlag1"
       @changeParent="changeInquiryDetailList"
-    ></generate-contracts-dialog>
+    ></generate-contracts-dialog1>
     <process-submit-dialog
       api-fun-name="contractStatusAPI"
       :processSubmitDialogFlag.sync="processSubmitDialogFlag"
@@ -622,7 +622,7 @@
     getReturnSaleOrderrecordDetail,
     saleReturnGetByIdAPI
   } from '@/api/saleManage/returnGoods';
-  import generateContractsDialog from './generateContractsDialog.vue';
+  import generateContractsDialog1 from './generateContractsDialog1.vue';
   import processSubmitDialog from '@/BIZComponents/processSubmitDialog/processSubmitDialog.vue';
 
   export default {
@@ -644,7 +644,7 @@
     mixins: [dictMixins],
     components: {
       processSubmitDialog,
-      generateContractsDialog,
+      generateContractsDialog1,
       returnOrderDialog,
       opportunityDialog,
       inquiryManageList,
@@ -763,7 +763,7 @@
         processSubmitDialogFlag: false,
         opportunityDialogFlag: false,
         returnOrderDialogFlag: false,
-        generateContractsDialogFlag: false,
+        generateContractsDialogFlag1: false,
         title: '',
         row: {},
         formDef,
@@ -981,7 +981,7 @@
       },
       handleHJQD() {
         if (!this.form.sourceId) return this.$message.warning('请先选择核价单');
-        this.generateContractsDialogFlag = true;
+        this.generateContractsDialogFlag1 = true;
         this.$nextTick(() => {
           this.$refs.generateContractsDialogRef.open({
             id: this.form.sourceId

+ 128 - 0
src/views/contractManage/contractBook/components/generateContractsDialog1.vue

@@ -0,0 +1,128 @@
+<template>
+  <ele-modal
+    custom-class="ele-dialog-form long-dialog-form"
+    :centered="true"
+    :visible.sync="generateContractsDialogFlag1"
+    title="生成合同"
+    :close-on-click-modal="false"
+    append-to-body
+    width="80%"
+    :before-close="cancel"
+  >
+    <inquiryTable
+      :radio="form.winnerId"
+      v-for="item in form.supplierList"
+      :key="item.supplierId"
+      style="margin-top: 15px"
+      status="Detail"
+      v-if="item.resultList.some(i=>i.isWinner)"
+      :obj="item"
+    >
+      <template #generateContracts>
+        <el-button @click="handleGenerate(item)" type="primary" plain>生成合同</el-button>
+        <span v-if="item.isGeneratedContract"
+              style="color: red;margin-left: 5px;font-size: 11px">*已生成过合同,请注意</span>
+      </template>
+
+    </inquiryTable>
+    <div slot="footer" class="footer">
+      <el-button @click="cancel">返回</el-button>
+    </div>
+  </ele-modal>
+
+</template>
+<script>
+import inquiryTable from "@/views/purchasingManage/inquiryManage/components/inquiryTable.vue";
+import {generateContract, getpurchaseinquiry} from "@/api/purchasingManage/inquiryManage";
+import {contactDetail, contactTypeTree} from "@/api/saleManage/contact";
+
+export default {
+  name: "generateContractsDialog",
+  components: {inquiryTable},
+  props: {
+    generateContractsDialogFlag1: {
+      type: Boolean,
+      default: false,
+    },
+  },
+  data() {
+    return {
+      form: {
+        supplierList: []
+      },
+      treeList: []
+    };
+  },
+  methods: {
+    async open(row) {
+
+      await this.getInquiryData(row.id);
+      await this.getTreeData();
+    },
+    async getInquiryData(id) {
+      this.loading = true;
+      const data = await getpurchaseinquiry(id);
+      this.loading = false;
+      if (data) {
+        this.form = data;
+      }
+    },
+    //获取合同分类
+    async getTreeData() {
+      try {
+        this.treeLoading = true;
+        const res = await contactTypeTree({ id: '20' });
+        this.treeLoading = false;
+        if (res?.code === '0') {
+          this.treeList = res.data;
+
+          return this.treeList;
+        }
+      } catch (error) {
+      }
+      this.treeLoading = false;
+    },
+    async handleGenerate(i) {
+     
+      
+      let contractInfo = await generateContract({inquiryIds: [this.form.id], supplierId: i.supplierId});
+      let contact = await contactDetail(contractInfo.contractVO.partbId);
+      contractInfo.contractVO.contractName = contact.base.simpleName;
+      await this.setContractInfo(contractInfo);
+
+    },
+    async setContractInfo(data) {
+      if (data) {
+        //获取优惠金额和总计的差价
+        let diffPrice = Number(data.contractVO.totalPrice) - Number(data.contractVO.discountTotalPrice)
+        data.productList.forEach((item) => {
+          if (data.contractVO.discountTotalPrice === 0) {
+            item.discountTotalPrice = 0
+            item.discountSinglePrice = 0
+            return
+          }
+          if (!data.contractVO.discountTotalPrice) {
+            item.discountTotalPrice = item.totalPrice
+            item.discountSinglePrice = item.singlePrice
+            return
+          }
+          //获取详情每条的小计
+          // 使用小计除以总价得出该条数据小计占比 在乘以差价或的该条数据应承担的差价 在小计-应承担差价获得折让后的小计
+          item.discountTotalPrice = (Number(item.totalPrice) - Number(item.totalPrice) / Number(data.contractVO.totalPrice) * diffPrice).toFixed(2)
+          //使用折让后的小计除以数量得到单价
+          item.discountSinglePrice = (Number(item.discountTotalPrice) / Number(item.totalCount)).toFixed(2)
+        })
+        this.$emit('changeParent', {data});
+        this.cancel();
+      }
+    },
+    cancel() {
+      this.$emit("update:generateContractsDialogFlag1", false);
+    },
+  }
+}
+</script>
+
+<style scoped lang="scss">
+
+</style>

+ 13 - 22
src/views/financialManage/components/feeRelatedInfoTable.vue

@@ -76,9 +76,7 @@
           v-if="dialogType !== 'view'"
         >
           <el-form-item :prop="'datasource.' + $index + '.linkType'">
-            <!--            <DictSelection clearable dictName="关联类型" v-model="row.linkType"-->
-            <!--                           :disabled="dialogType==='view'"-->
-            <!--                           @itemChange="(val)=>handleChangeFinLink(val,row,$index)"></DictSelection>-->
+          
             <el-select
               v-model="row.linkType"
               @change="(val) => handleChangeFinLink(val, row, $index)"
@@ -127,21 +125,7 @@
         <template v-slot:files="{ row, $index }">
           <el-form-item :prop="'datasource.' + $index + '.files'">
             <fileMain v-model="row.files" :type="dialogType"></fileMain>
-            <!--            <fileUpload-->
-            <!--              v-if="dialogType!=='view'"-->
-            <!--              v-model="row.files"-->
-            <!--              module="main"-->
-            <!--              :showLib="false"-->
-            <!--              :limit="1"-->
-            <!--            />-->
-            <!--            <el-link-->
-            <!--              v-else-if="row.files.length"-->
-            <!--              v-for="item in row.files"-->
-            <!--              type="primary"-->
-            <!--              :underline="false"-->
-            <!--              @click="downloadFile(item)">-->
-            <!--              {{ item.name }}-->
-            <!--            </el-link>-->
+         
           </el-form-item>
         </template>
         <template v-slot:remark="{ row, $index }" v-if="dialogType !== 'view'">
@@ -504,9 +488,12 @@
       },
 
       setSelectData(val) {
+        console.log(val,'val')
         this.$set(this.form.datasource[this.editIndex], 'linkId', val.id);
         this.$set(this.form.datasource[this.editIndex], 'linkName', val.name);
         this.$set(this.form.datasource[this.editIndex], 'linkCode', val.code);
+        this.$set(this.form.datasource[this.editIndex], 'amount', val.amount);
+        
       },
       clearData() {
         this.form.datasource = [];
@@ -529,7 +516,8 @@
         this.setSelectData({
           id: '',
           name: '',
-          code: ''
+          code: '',
+          amount:''
         });
         this.$nextTick(() => {
           this.$refs.form.clearValidate('datasource.' + index + '.linkName');
@@ -571,7 +559,8 @@
         let row = {
           id: params.id,
           name: params.name,
-          code: params.code
+          code: params.code,
+        
         };
         this.setSelectData(row);
       },
@@ -617,7 +606,8 @@
         let row = {
           id: params.id,
           name: params.contractName,
-          code: params.contractNo
+          code: params.contractNo,
+          amount:params.discountTotalPrice
         };
         this.setSelectData(row);
       },
@@ -634,7 +624,8 @@
         let row = {
           id: params.id,
           name: params.orderNo,
-          code: params.orderNo
+          code: params.orderNo,
+          amount:params.payAmount
         };
         this.setSelectData(row);
       },

+ 3 - 56
src/views/financialManage/feeManage/feeApplication/addOrEditDialog.vue

@@ -78,57 +78,9 @@
             <el-input v-model="form.bankName" clearable></el-input>
           </el-form-item>
         </el-col>
-        <!--        <el-col :span="8">-->
-        <!--          <el-form-item-->
-        <!--            label="费用类型"-->
-        <!--            prop="feeTypeId"-->
-        <!--           -->
-        <!--          >-->
-        <!--            <ele-tree-select-->
-        <!--              clearable-->
-        <!--              filterable-->
-        <!--              ref="feeTypeTree"-->
-        <!--              :data="feeTypeList"-->
-        <!--              v-model="form.feeTypeId"-->
-        <!--              valueKey="id"-->
-        <!--              labelKey="name"-->
-        <!--              placeholder="请选择"-->
-        <!--              @change="changeFeeTypeInfo"-->
-        <!--              default-expand-all-->
-        <!--            />-->
-        <!--          </el-form-item>-->
-        <!--        </el-col>-->
-        <!--        <el-col :span="8">-->
-        <!--          <el-form-item-->
-        <!--            label="金额"-->
-        <!--            prop="amount"-->
-        <!--           >-->
-        <!--            <el-input-number v-model="form.amount" :precision="2" :controls="false" style="width: 100%"-->
-        <!--                             :min="0"></el-input-number>-->
-        <!--          </el-form-item>-->
-        <!--        </el-col>-->
+       
       </el-row>
-      <!--        <el-col :span="12">-->
-      <!--          <el-form-item-->
-      <!--            label="会计科目"-->
-      <!--            prop="accountingSubjectId"-->
-      <!--           -->
-      <!--          >-->
-      <!--            <ele-tree-select-->
-      <!--              clearable-->
-      <!--              filterable-->
-      <!--              ref="treeSelect"-->
-      <!--              :data="accountingSubjectList"-->
-      <!--              v-model="form.accountingSubjectId"-->
-      <!--              valueKey="id"-->
-      <!--              labelKey="name"-->
-      <!--              placeholder="请选择"-->
-      <!--              @change="changeSubjectInfo"-->
-      <!--              default-expand-all-->
-      <!--            />-->
-      <!--          </el-form-item>-->
-      <!--        </el-col>-->
-
+     
       <el-row>
         <el-col :span="8">
           <el-row style="display: flex; flex-direction: column">
@@ -140,12 +92,7 @@
             <el-col :span="24">
               <el-form-item prop="repliedFiles" label="附件">
                 <fileMain v-model="form.repliedFiles"></fileMain>
-                <!--                <fileUpload-->
-                <!--                  v-model="form.files"-->
-                <!--                  module="main"-->
-                <!--                  :showLib="false"-->
-                <!--                  :limit="10"-->
-                <!--                />-->
+              
               </el-form-item>
             </el-col>
           </el-row>

+ 1 - 1
src/views/financialManage/invoiceManage/components/addOrEditDialog.vue

@@ -589,7 +589,7 @@
         console.log(data);
         this.$set(this.form, 'sourceId', row.id);
         this.$set(this.form, 'sourceCode', row.code);
-        this.$set(this.form, 'amount', row.receivedTotalPrice);
+        this.$set(this.form, 'amount', row.receivedTotalPrice||row.paidTotalPrice);
         this.$set(this.form, 'invoiceAmount', row.invoiceAmount);
         this.getContactDetail(form.contactId, {});
       },

+ 6 - 1
src/views/financialManage/invoiceManage/components/tableInfo.vue

@@ -169,7 +169,12 @@
             minWidth: 80,
             prop: 'taxRate',
             label: '税率',
-            align: 'center'
+            align: 'center',
+            formatter: (_row, _column, cellValue) => {
+              return _row.taxRate
+                ? _row.taxRate+'%'
+                : '';
+            },
           }
           // {
           //   width: 100,

+ 35 - 7
src/views/financialManage/payableManage/components/infoTable.vue

@@ -39,7 +39,7 @@
         </template>
 
         <template v-slot:action="{ row, $index }">
-          <!-- <el-link
+          <el-link
             v-if="
               dialogType == 'view' && !row.invoiceStatus && !form.invoiceCode
             "
@@ -48,7 +48,7 @@
             @click="addInvoice(row)"
           >
             新增发票
-          </el-link> -->
+          </el-link>
           <el-popconfirm
             class="ele-action"
             title="确定要删除此信息吗?"
@@ -119,6 +119,16 @@
         <template v-slot:columnRequired="{ column }">
           <span class="is-required">{{ column.label }}</span>
         </template>
+        <!-- 开票信息 -->
+        <template v-slot:invoiceCode="{ row }">
+          <el-link
+            type="primary"
+            :underline="false"
+            @click="handleInvoiceDetail(row, 'view')"
+          >
+            {{ row.invoiceCode }}
+          </el-link>
+        </template>
       </ele-pro-table>
     </el-form>
     <add-or-edit-dialog
@@ -127,6 +137,12 @@
       v-if="addOrEditDialogFlag"
       @reload="reload"
     ></add-or-edit-dialog>
+        <!--开票详情-->
+        <invoice-detail-dialog
+      ref="invoiceDetailDialogRef"
+      v-if="invoiceDetailDialogFlag"
+      :detailDialogFlag.sync="invoiceDetailDialogFlag"
+    ></invoice-detail-dialog>
   </div>
 </template>
 
@@ -134,9 +150,11 @@
   import { deepClone } from '@/utils';
   import fileMain from '@/components/addDoc/index.vue';
   import addOrEditDialog from '@/views/financialManage/invoiceManage/components/addOrEditDialog.vue';
+  import invoiceDetailDialog from '@/views/financialManage/invoiceManage/components/detailDialog.vue';
+
   export default {
     name: 'relatedInfoTable',
-    components: { fileMain, addOrEditDialog },
+    components: { fileMain, addOrEditDialog,invoiceDetailDialog },
     props: {
       form: {
         type: Object,
@@ -157,7 +175,9 @@
         unpaidTotalPrice: 0,
         oldVal: 0,
         MAXPrice: 0,
-        addOrEditDialogFlag: false
+        addOrEditDialogFlag: false,
+        invoiceDetailDialogFlag: false
+
       };
     },
     computed: {
@@ -285,15 +305,23 @@
       },
       addInvoice(row) {
         this.addOrEditDialogFlag = true;
-        this.$next(() => {
-          this.$refs.addOrEditDialog.createInvoice1(
+        this.$nextTick(() => {
+          this.$refs.addOrEditDialogRef.createInvoice1(
             { row, form: this.dialogForm },
             2,
             4
           );
         });
       },
-
+      handleInvoiceDetail(row = {}, type) {
+        this.invoiceDetailDialogFlag = true;
+        this.$nextTick(() => {
+          let params = {
+            id: row.invoiceId
+          };
+          this.$refs.invoiceDetailDialogRef.init(params, type);
+        });
+      },
       handlePrice(val, oldVal, row, index) {
         // this.$set(this.dialogForm.detailList[index], 'unpaidTotalPrice', this.MAXPrice)
         // this.dialogForm.unpaidTotalPrice = this.form.payableTotalPrice - this.dialogForm.detailList.reduce((num, row) => {

+ 10 - 1
src/views/financialManage/payableManage/index.vue

@@ -17,6 +17,15 @@
       >
         <!-- 操作 -->
         <template v-slot:action="{ row }">
+          <el-link
+            type="primary"
+            v-if="[2].includes(row.approvalStatus)&&!row.invoiceCode"
+            :underline="false"
+            icon="el-icon-plus"
+            @click="handleDetail(row, 'view')"
+          >
+            新增发票
+          </el-link>
           <el-link
             type="primary"
             v-if="[2].includes(row.approvalStatus)"
@@ -265,7 +274,7 @@
           {
             columnKey: 'action',
             label: '操作',
-            width: 100,
+            width: 180,
             align: 'center',
             resizable: false,
             slot: 'action',

+ 2 - 1
src/views/purchasingManage/inquiryManage/components/inquiryTable.vue

@@ -113,7 +113,8 @@
           </el-input>
         </el-form-item>
         <span v-else>
-          {{ row.taxRate }}
+          {{ row.taxRate?row.taxRate+'%':'' }}
+   
         </span>
       </template>
       <template v-slot:files="{ row, $index }">

+ 479 - 474
src/views/purchasingManage/purchaseOrder/invoice/components/addInvoiceDialog.vue

@@ -9,20 +9,24 @@
     width="70%"
     @close="cancel"
     :fullscreen="fullscreen"
-
   >
-  <template slot="title">
-     <modalTitle :title="title" @setFullscreen="fullscreen=!fullscreen"></modalTitle>
+    <template slot="title">
+      <modalTitle
+        :title="title"
+        @setFullscreen="fullscreen = !fullscreen"
+      ></modalTitle>
     </template>
-    <el-form ref="form" :model="form" :rules="rules" class="el-form-box" label-width="120px">
+    <el-form
+      ref="form"
+      :model="form"
+      :rules="rules"
+      class="el-form-box"
+      label-width="120px"
+    >
       <headerTitle title="收货信息"></headerTitle>
       <el-row :gutter="20">
         <el-col :span="12">
-          <el-form-item
-            label="选择订单"
-            prop="orderNo"
-
-          >
+          <el-form-item label="选择订单" prop="orderNo">
             <el-input
               clearable
               v-model="form.orderNo"
@@ -32,10 +36,7 @@
           </el-form-item>
         </el-col>
         <el-col :span="12">
-          <el-form-item
-            label="委外发货单"
-
-          >
+          <el-form-item label="委外发货单">
             <el-input
               clearable
               v-model="form.outsourceSendCode"
@@ -47,11 +48,7 @@
       </el-row>
       <el-row :gutter="20">
         <el-col :span="12">
-          <el-form-item
-            label="供应商名称"
-            prop="supplierName"
-
-          >
+          <el-form-item label="供应商名称" prop="supplierName">
             <el-input
               clearable
               v-model="form.supplierName"
@@ -61,49 +58,31 @@
           </el-form-item>
         </el-col>
         <el-col :span="12">
-          <el-form-item
-            label="供应商联系人"
-            prop="linkName"
-
-          >
-            <el-input clearable v-model="form.linkName" placeholder="请输入"/>
+          <el-form-item label="供应商联系人" prop="linkName">
+            <el-input clearable v-model="form.linkName" placeholder="请输入" />
           </el-form-item>
         </el-col>
       </el-row>
       <el-row :gutter="20">
         <el-col :span="12">
-          <el-form-item
-            label="订单类型">
+          <el-form-item label="订单类型">
             <el-input v-model="form.sourceTypeName" disabled></el-input>
           </el-form-item>
-
         </el-col>
         <el-col :span="12">
-          <el-form-item
-            label="供应商电话"
-            prop="linkPhone"
-
-          >
-            <el-input clearable v-model="form.linkPhone" placeholder="请输入"/>
+          <el-form-item label="供应商电话" prop="linkPhone">
+            <el-input clearable v-model="form.linkPhone" placeholder="请输入" />
           </el-form-item>
         </el-col>
       </el-row>
       <el-row :gutter="20">
         <el-col :span="12">
-
-          <el-form-item
-            label="车辆号"
-            prop="carNo"
-            >
-            <el-input clearable v-model="form.carNo" placeholder="请输入"/>
+          <el-form-item label="车辆号" prop="carNo">
+            <el-input clearable v-model="form.carNo" placeholder="请输入" />
           </el-form-item>
         </el-col>
         <el-col :span="12">
-          <el-form-item
-            label="送货单号"
-            prop="sendNoteNo"
-
-          >
+          <el-form-item label="送货单号" prop="sendNoteNo">
             <el-input
               clearable
               v-model="form.sendNoteNo"
@@ -120,11 +99,11 @@
               v-model="form.receiveDate"
               type="date"
               placeholder="选择日期"
+              :picker-options="pickerOptions"
             >
             </el-date-picker>
           </el-form-item>
         </el-col>
-
       </el-row>
       <el-row :gutter="20">
         <!-- <el-col :span="12">
@@ -138,12 +117,9 @@
         <el-col :span="12">
           <el-form-item prop="receiveFiles" label="附件">
             <fileMain v-model="form.receiveFiles"></fileMain>
-
           </el-form-item>
         </el-col>
       </el-row>
-
-
     </el-form>
 
     <headerTitle title="物品清单" style="margin-top: 30px"></headerTitle>
@@ -159,7 +135,13 @@
 
     <div slot="footer" class="footer">
       <el-button type="primary" @click="save" v-click-once>保存</el-button>
-      <el-button type="primary" v-if="isNeed_process_is_close" @click="save('sub')" v-click-once>提交</el-button>
+      <el-button
+        type="primary"
+        v-if="isNeed_process_is_close"
+        @click="save('sub')"
+        v-click-once
+        >提交</el-button
+      >
       <el-button @click="cancel">返回</el-button>
     </div>
     <!-- 采购订单   -->
@@ -169,137 +151,283 @@
       :isOutsourcing="1"
     ></orderListDialog>
     <!-- 委外发货单   -->
-    <out-source-send-dialog :out-source-send-dialog-flag.sync="outSourceSendDialogFlag" v-if="outSourceSendDialogFlag"
-                            ref="outSourceSendDialogRef" :searchParams="searchParams"
-                            @changeParent="getOutSourceInfo"></out-source-send-dialog>
-    <process-submit-dialog :isNotNeedProcess="false" :processSubmitDialogFlag.sync="processSubmitDialogFlag" v-if="processSubmitDialogFlag" ref="processSubmitDialogRef" @reload="reload"></process-submit-dialog>
-
+    <out-source-send-dialog
+      :out-source-send-dialog-flag.sync="outSourceSendDialogFlag"
+      v-if="outSourceSendDialogFlag"
+      ref="outSourceSendDialogRef"
+      :searchParams="searchParams"
+      @changeParent="getOutSourceInfo"
+    ></out-source-send-dialog>
+    <process-submit-dialog
+      :isNotNeedProcess="false"
+      :processSubmitDialogFlag.sync="processSubmitDialogFlag"
+      v-if="processSubmitDialogFlag"
+      ref="processSubmitDialogRef"
+      @reload="reload"
+    ></process-submit-dialog>
   </ele-modal>
 </template>
 
 <script>
-import {acceptUnpackoptions} from '@/enum/dict';
-import fileUpload from '@/components/upload/fileUpload';
-import dictMixins from '@/mixins/dictMixins';
-import {
-  // getpurchaseorderDetail,
-  getByIdCondition
-} from '@/api/purchasingManage/purchaseOrder';
+  import { acceptUnpackoptions } from '@/enum/dict';
+  import fileUpload from '@/components/upload/fileUpload';
+  import dictMixins from '@/mixins/dictMixins';
+  import {
+    // getpurchaseorderDetail,
+    getByIdCondition
+  } from '@/api/purchasingManage/purchaseOrder';
+
+  import {
+    addReceiveInformation,
+    UpdateReceiveInformation,
+    getReceiveSaleOrderrecordDetail,
+    submit
+  } from '@/api/purchasingManage/purchaseorderreceive';
+  import inventoryTable from './inventoryTable.vue';
+  import orderListDialog from './orderListDialog.vue';
+  import { copyObj } from '@/utils/util';
+  import outSourceSendDialog from '@/views/purchasingManage/purchaseOrder/invoice/components/outSourceSendDialog.vue';
+  import { getPurchaseOutSourceSendDetailAPI } from '@/api/purchasingManage/outSourceSend';
+  import { getWarehouseListByIds } from '@/api/purchasingManage/returnGoods';
+  import fileMain from '@/components/addDoc/index.vue';
+  import processSubmitDialog from '@/BIZComponents/processSubmitDialog/processSubmitDialog.vue';
+  import modalTitle from '@/BIZComponents/modalTitle.vue';
+
+  export default {
+    mixins: [dictMixins],
+    components: {
+      processSubmitDialog,
+      fileMain,
+      fileUpload,
+      inventoryTable,
+      orderListDialog,
+      outSourceSendDialog,
+      modalTitle
+    },
+    data() {
+      let formDef = {
+        id: '',
+        contractId: '',
+        isQmsCheck: 0,
+        receiveFiles: [],
+        contractName: '',
+        carNo: '',
+        carId: '',
+        linkName: '',
+        linkPhone: '',
+        orderNo: '',
+        orderId: '',
+        outsourceSendCode: '',
+        outsourceSendId: '',
+        sendNoteNo: '',
+        sourceTypeName: '',
+        receiveDate: '',
+        receiveType: ''
+      };
 
-import {
-  addReceiveInformation,
-  UpdateReceiveInformation,
-  getReceiveSaleOrderrecordDetail, submit
-} from '@/api/purchasingManage/purchaseorderreceive';
-import inventoryTable from './inventoryTable.vue';
-import orderListDialog from './orderListDialog.vue';
-import {copyObj} from '@/utils/util';
-import outSourceSendDialog from "@/views/purchasingManage/purchaseOrder/invoice/components/outSourceSendDialog.vue";
-import {getPurchaseOutSourceSendDetailAPI} from "@/api/purchasingManage/outSourceSend";
-import {getWarehouseListByIds} from "@/api/purchasingManage/returnGoods";
-import fileMain from "@/components/addDoc/index.vue";
-import processSubmitDialog from "@/BIZComponents/processSubmitDialog/processSubmitDialog.vue";
-import modalTitle from '@/BIZComponents/modalTitle.vue';
+      return {
+        fullscreen: false,
+        searchParams: {},
+        detailData: {},
+        payWayOptions: [],
+        delDetailIds: [],
+        linkNameOptions: [],
+        acceptUnpackoptions,
+        visible: false,
+        outSourceSendDialogFlag: false,
+        processSubmitDialogFlag: false,
+        title: '',
+        row: {},
+        activeName: 'base',
+        formDef,
+        form: copyObj(formDef),
+        tableBankData: [],
+        tableLinkData: [],
+        businessId: '',
+        // 组织机构树形结构数据
+        rules: {
+          orderNo: [
+            { required: true, message: '请选择采购订单', trigger: 'change' }
+          ],
+          receiveType: [
+            { required: true, message: '请选择采购单类型', trigger: 'change' }
+          ]
+        },
+
+        // 提交状态
+        loading: false,
+        // 是否是修改
+        isUpdate: false,
+        pickerOptions: {
+        disabledDate(time) {
+          return time.getTime() > Date.now();
+        }
+      },
+      };
+    },
+    computed: {
+      allcountAmount() {
+        return this.$store.state.order.allcountAmount;
+      }
+    },
 
-export default {
-  mixins: [dictMixins],
-  components: {
-    processSubmitDialog,
-    fileMain,
-    fileUpload,
-    inventoryTable,
-    orderListDialog,
-    outSourceSendDialog,modalTitle
-  },
-  data() {
-    let formDef = {
-      id: '',
-      contractId: '',
-      isQmsCheck: 0,
-      receiveFiles: [],
-      contractName: '',
-      carNo: '',
-      carId: '',
-      linkName: '',
-      linkPhone: '',
-      orderNo: '',
-      orderId: '',
-      outsourceSendCode: '',
-      outsourceSendId: '',
-      sendNoteNo: '',
-      sourceTypeName: '',
-      receiveDate: '',
-      receiveType: ""
-    };
+    methods: {
+      //选择订单回调
+      changeOrder(obj) {
+        this.form = Object.assign({}, this.form, {
+          orderId: obj.id,
+          orderNo: obj.orderNo
+        });
+        this.getPurchaseorderDetail(obj.id);
+      },
 
-    return {
-      fullscreen:false,
-      searchParams: {},
-      detailData: {},
-      payWayOptions: [],
-      delDetailIds: [],
-      linkNameOptions: [],
-      acceptUnpackoptions,
-      visible: false,
-      outSourceSendDialogFlag: false,
-      processSubmitDialogFlag: false,
-      title: '',
-      row: {},
-      activeName: 'base',
-      formDef,
-      form: copyObj(formDef),
-      tableBankData: [],
-      tableLinkData: [],
-      businessId: '',
-      // 组织机构树形结构数据
-      rules: {
-        orderNo: [
-          {required: true, message: '请选择采购订单', trigger: 'change'}
-        ],
-        receiveType: [
-          {required: true, message: '请选择采购单类型', trigger: 'change'}
-        ]
+      //获取订单详情
+      async getPurchaseorderDetail(id) {
+        this.loading = true;
+        const data = await getByIdCondition(id, 2);
+        this.loading = false;
+        if (data) {
+          this.$nextTick(() => {
+            let {
+              partbId,
+              partbName,
+              partbTel,
+              orderNo,
+              id,
+              partbLinkName,
+              productList,
+              sourceTypeName,
+              sourceType,
+              pricingWay
+            } = data;
+            if (productList && productList.length > 0) {
+              productList.forEach((v) => {
+                v.orderTotalCount = v.orderTotalCount || v.totalCount;
+              });
+            }
+            this.form = Object.assign({}, this.form, {
+              supplierId: partbId,
+              supplierName: partbName,
+              linkName: partbLinkName,
+              linkPhone: partbTel,
+              orderNo,
+              orderId: id,
+              sourceTypeName,
+              sourceType,
+              productList,
+              pricingWay
+            });
+            // if(sourceType==1){
+            //   this.form.isQmsCheck=1
+            // }
+            console.log(data, 'productList');
+            this.$refs.inventoryTableref &&
+              this.$refs.inventoryTableref.putTableValue(productList);
+          });
+        }
       },
 
-      // 提交状态
-      loading: false,
-      // 是否是修改
-      isUpdate: false
-    };
-  },
-  computed: {
-    allcountAmount() {
-      return this.$store.state.order.allcountAmount;
-    }
-  },
+      //发货单详情
+      async getReceiveSaleOrderDetail(id) {
+        this.businessId = id;
+        this.loading = true;
+        const data = await getReceiveSaleOrderrecordDetail(id);
+        this.loading = false;
+        if (data) {
+          this.$nextTick(() => {
+            this.form = data;
+            this.$refs.inventoryTableref &&
+              this.$refs.inventoryTableref.putTableValue(data.productList);
+          });
+        }
+      },
 
-  methods: {
-    //选择订单回调
-    changeOrder(obj) {
-      this.form = Object.assign({}, this.form, {
-        orderId: obj.id,
-        orderNo: obj.orderNo
-      });
-      this.getPurchaseorderDetail(obj.id);
-    },
-    //获取订单详情
-    async getPurchaseorderDetail(id) {
-      this.loading = true;
-      const data = await getByIdCondition(id,2);
-      this.loading = false;
-      if (data) {
+      handHead() {
+        let item = {
+          id: this.form.partbLinkId
+        };
+        this.$refs.headRef.open(item);
+      },
+
+      //选择订单弹框
+      handleOrderBtn(e) {
+        if (e.target.nodeName == 'I') {
+          this.form = Object.assign({}, this.form, {
+            contractId: '',
+            receiveFiles: [],
+            contractName: '',
+            carNo: '',
+            carId: '',
+            linkName: '',
+            linkPhone: '',
+            orderNo: '',
+            orderId: '',
+            pricingWay: '',
+            outsourceSendCode: '',
+            outsourceSendId: '',
+            sendNoteNo: '',
+            sourceTypeName: '',
+            receiveType: ''
+          });
+          this.$refs.inventoryTableref &&
+            this.$refs.inventoryTableref.putTableValue([]);
+          return;
+        }
+        let item = {
+          id: this.form.orderId
+        };
+        this.$refs.orderListDialogRef.open(item);
+      },
+      //选择委外发货单弹框
+      handleOutsourceSend(e) {
+        if (e.target.nodeName == 'I') {
+          this.form = Object.assign({}, this.form, {
+            contractId: '',
+            receiveFiles: [],
+            contractName: '',
+            carNo: '',
+            carId: '',
+            linkName: '',
+            linkPhone: '',
+            orderNo: '',
+            orderId: '',
+            outsourceSendCode: '',
+            outsourceSendId: '',
+            sendNoteNo: '',
+            sourceTypeName: '',
+            receiveType: '',
+            pricingWay: ''
+          });
+          this.$refs.inventoryTableref &&
+            this.$refs.inventoryTableref.putTableValue([]);
+          return;
+        }
+        this.searchParams = {
+          orderId: this.form.orderId
+        };
+        this.outSourceSendDialogFlag = true;
+        this.$nextTick(() => {
+          this.$refs.outSourceSendDialogRef.init();
+        });
+      },
+      //获取委外发货单数据回调
+      async getOutSourceInfo(row) {
+        const data = await getPurchaseOutSourceSendDetailAPI(row.id);
         this.$nextTick(() => {
           let {
-            partbId,
-            partbName,
-            partbTel,
+            carNo,
+            code,
+            linkName,
+            linkPhone,
+            orderId,
             orderNo,
-            id,
-            partbLinkName,
             productList,
-            sourceTypeName,
+            sendNoteNo,
+            supplierId,
+            supplierName,
             sourceType,
-            pricingWay,
+            sourceTypeName,
+            pricingWay
           } = data;
           if (productList && productList.length > 0) {
             productList.forEach((v) => {
@@ -307,337 +435,214 @@ export default {
             });
           }
           this.form = Object.assign({}, this.form, {
-            supplierId: partbId,
-            supplierName: partbName,
-            linkName: partbLinkName,
-            linkPhone: partbTel,
+            supplierId,
+            supplierName,
+            linkName,
+            linkPhone,
             orderNo,
-            orderId: id,
+            orderId,
             sourceTypeName,
             sourceType,
             productList,
+            sendNoteNo,
+            carNo,
             pricingWay,
+            outsourceSendCode: code
+          });
+          productList.forEach((item) => {
+            item.id = '';
           });
-          // if(sourceType==1){
-          //   this.form.isQmsCheck=1
-          // }
-          console.log(data,'productList')
-          this.$refs.inventoryTableref &&
-          this.$refs.inventoryTableref.putTableValue(productList);
-        });
-      }
-    },
-
-    //发货单详情
-    async getReceiveSaleOrderDetail(id) {
-      this.businessId = id;
-      this.loading = true;
-      const data = await getReceiveSaleOrderrecordDetail(id);
-      this.loading = false;
-      if (data) {
-        this.$nextTick(() => {
-          this.form = data;
           this.$refs.inventoryTableref &&
-          this.$refs.inventoryTableref.putTableValue(data.productList);
+            this.$refs.inventoryTableref.putTableValue(productList, code);
         });
-      }
-    },
-
-    handHead() {
-      let item = {
-        id: this.form.partbLinkId
-      };
-      this.$refs.headRef.open(item);
-    },
-
-    //选择订单弹框
-    handleOrderBtn(e) {
-      if (e.target.nodeName == 'I') {
-        this.form = Object.assign({}, this.form, {
-          contractId: '',
-          receiveFiles: [],
-          contractName: '',
-          carNo: '',
-          carId: '',
-          linkName: '',
-          linkPhone: '',
-          orderNo: '',
-          orderId: '',
-          pricingWay: '',
-          outsourceSendCode: '',
-          outsourceSendId: '',
-          sendNoteNo: '',
-          sourceTypeName: '',
-          receiveType: ""
-        })
-        this.$refs.inventoryTableref &&
-        this.$refs.inventoryTableref.putTableValue([]);
-        return
-      }
-      let item = {
-        id: this.form.orderId
-      };
-      this.$refs.orderListDialogRef.open(item);
-    },
-    //选择委外发货单弹框
-    handleOutsourceSend(e) {
-      if (e.target.nodeName == 'I') {
-        this.form = Object.assign({}, this.form, {
-          contractId: '',
-          receiveFiles: [],
-          contractName: '',
-          carNo: '',
-          carId: '',
-          linkName: '',
-          linkPhone: '',
-          orderNo: '',
-          orderId: '',
-          outsourceSendCode: '',
-          outsourceSendId: '',
-          sendNoteNo: '',
-          sourceTypeName: '',
-          receiveType: "",
-          pricingWay: '',
-        })
-        this.$refs.inventoryTableref &&
-        this.$refs.inventoryTableref.putTableValue([]);
-        return
-      }
-      this.searchParams = {
-        orderId: this.form.orderId
-      }
-      this.outSourceSendDialogFlag = true
-      this.$nextTick(() => {
-        this.$refs.outSourceSendDialogRef.init();
-      })
-
-    },
-    //获取委外发货单数据回调
-    async getOutSourceInfo(row) {
-      const data = await getPurchaseOutSourceSendDetailAPI(row.id);
-      this.$nextTick(() => {
-        let {
-          carNo,
-          code,
-          linkName,
-          linkPhone,
-          orderId,
-          orderNo,
-          productList,
-          sendNoteNo,
-          supplierId,
-          supplierName,
-          sourceType,
-          sourceTypeName,
-          pricingWay
-        } = data;
-        if (productList && productList.length > 0) {
-          productList.forEach((v) => {
-            v.orderTotalCount = v.orderTotalCount || v.totalCount;
-          });
+      },
+      //打开新增编辑弹框
+      async open(type, row, orderId, outSourceId) {
+        this.title = type === 'add' ? '新增收货单' : '修改';
+        this.row = row;
+        this.visible = true;
+        if (orderId) {
+          await this.getPurchaseorderDetail(orderId);
+        }
+        if (row && row?.id) {
+          await this.getReceiveSaleOrderDetail(row?.id);
+        }
+        if (outSourceId) {
+          await this.getOutSourceInfo({ id: outSourceId });
         }
-        this.form = Object.assign({}, this.form, {
-          supplierId,
-          supplierName,
-          linkName,
-          linkPhone,
-          orderNo,
-          orderId,
-          sourceTypeName,
-          sourceType,
-          productList,
-          sendNoteNo,
-          carNo,
-          pricingWay,
-          outsourceSendCode: code
-        });
-        productList.forEach(item => {
-          item.id = ''
-        })
-        this.$refs.inventoryTableref &&
-        this.$refs.inventoryTableref.putTableValue(productList, code);
-      });
-    },
-    //打开新增编辑弹框
-    async open(type, row, orderId, outSourceId) {
-      this.title = type === 'add' ? '新增收货单' : '修改';
-      this.row = row;
-      this.visible = true;
-      if (orderId) {
-        await this.getPurchaseorderDetail(orderId);
-      }
-      if (row && row?.id) {
-        await this.getReceiveSaleOrderDetail(row?.id);
-      }
-      if (outSourceId) {
-        await this.getOutSourceInfo({id: outSourceId})
-      }
-
-      if (type == 'add') {
-        this.isUpdate = false;
-        this.form.receiveDate = new Date()
-      } else {
-        this.isUpdate = true;
-      }
-    },
-
-    getValidate() {
-      return Promise.all([
-        new Promise((resolve, reject) => {
-          this.$refs.form.validate((valid) => {
-            if (!valid) {
-              reject(false);
-            } else {
-              resolve(true);
-            }
-          });
-        }),
-        new Promise((resolve, reject) => {
-          this.$refs.inventoryTableref.validateForm((valid) => {
-            if (!valid) {
-              reject(false);
-            } else {
-              resolve(true);
-            }
-          });
-        })
-      ]);
-    },
-    async save(type) {
-      try {
-        await this.getValidate();
-        // 表单验证通过,执行保存操作
-        this.loading = true;
 
-        if (!this.isUpdate) {
-          delete this.form.id;
+        if (type == 'add') {
+          this.isUpdate = false;
+          this.form.receiveDate = new Date();
+        } else {
+          this.isUpdate = true;
         }
-        this.form.receiveTypeName = this.getDictValue(
-          '采购收货单类型',
-          this.form.receiveType
-        );
-        let commitData = Object.assign({}, this.form, {
-          productList: this.$refs.inventoryTableref.getTableValue()
-        });
+      },
 
-        if (this.isUpdate) {
-          UpdateReceiveInformation(commitData)
-            .then(async(res) => {
-              this.loading = false;
-              this.$message.success('修改成功');
-              if (type === 'sub') {
-                let storemanIds = ''
-                let ids = commitData.productList.map((item) => item.warehouseId);
-                let warehouseList = await getWarehouseListByIds(ids || []);
-                storemanIds = warehouseList.map((item) => item.ownerId);
-                this.sub(res, commitData.sourceType,storemanIds.toString());
-                return;
+      getValidate() {
+        return Promise.all([
+          new Promise((resolve, reject) => {
+            this.$refs.form.validate((valid) => {
+              if (!valid) {
+                reject(false);
+              } else {
+                resolve(true);
               }
-              this.cancel();
-              this.$emit('done');
-            })
-            .catch((e) => {
-              //this.loading = false;
             });
-        } else {
-          commitData.createTime=''
-          addReceiveInformation(commitData)
-            .then(async (res) => {
-              this.loading = false;
-              this.$message.success('新增成功');
-              if (type === 'sub') {
-                let storemanIds = ''
-                let ids = commitData.productList.map((item) => item.warehouseId);
-                let warehouseList = await getWarehouseListByIds(ids || []);
-                storemanIds = warehouseList.map((item) => item.ownerId);
-                this.sub(res, commitData.sourceType, storemanIds.toString());
-                return;
+          }),
+          new Promise((resolve, reject) => {
+            this.$refs.inventoryTableref.validateForm((valid) => {
+              if (!valid) {
+                reject(false);
+              } else {
+                resolve(true);
               }
-              this.cancel();
-              this.$emit('done');
-            })
-            .catch((e) => {
-              //this.loading = false;
             });
-        }
-      } catch (error) {
-        console.log(error);
-        // 表单验证未通过,不执行保存操作
-      }
-    },
-  async  sub(res, sourceType, storemanIds) {
-      const data = await getReceiveSaleOrderrecordDetail(this.businessId || res);
-      this.processSubmitDialogFlag = true
-      let key = sourceType =='1'? 'purchase_receive_approve':'purchase_receive_approve_2'
-      this.$nextTick(() => {
-        let params = {
-          businessId: data.id,
-          businessKey: key,
-          formCreateUserId: data.createUserId,
-          variables: {
-            businessCode: data.receiveNo,
-            receiveType: data.receiveType,
-            sourceType: data.sourceType,
-            storemanIds: storemanIds.toString(),
-          },
-          // callBackMethodType : '1',
-          // callBackMethod : 'proTargetPlanApproveApiImpl.updatePlanApprovalStatus',
-          // pcHandle : '/bpm/handleTask/components/project-manage/plan-manage/submit.vue',
-          // pcView : '/bpm/handleTask/components/project-manage/plan-manage/detailDialog.vue',
-          // miniHandle : '',
-          // miniView : '',
-        }
-
-
-        this.$refs.processSubmitDialogRef.init(params)
-      })
+          })
+        ]);
+      },
+      async save(type) {
+        try {
+          await this.getValidate();
+          // 表单验证通过,执行保存操作
+          this.loading = true;
+
+          if (!this.isUpdate) {
+            delete this.form.id;
+          }
+          this.form.receiveTypeName = this.getDictValue(
+            '采购收货单类型',
+            this.form.receiveType
+          );
+          let commitData = Object.assign({}, this.form, {
+            productList: this.$refs.inventoryTableref.getTableValue()
+          });
 
+          if (this.isUpdate) {
+            UpdateReceiveInformation(commitData)
+              .then(async (res) => {
+                this.loading = false;
+                this.$message.success('修改成功');
+                if (type === 'sub') {
+                  let storemanIds = '';
+                  let ids = commitData.productList.map(
+                    (item) => item.warehouseId
+                  );
+                  let warehouseList = await getWarehouseListByIds(ids || []);
+                  storemanIds = warehouseList.map((item) => item.ownerId);
+                  this.sub(res, commitData.sourceType, storemanIds.toString());
+                  return;
+                }
+                this.cancel();
+                this.$emit('done');
+              })
+              .catch((e) => {
+                //this.loading = false;
+              });
+          } else {
+            commitData.createTime = '';
+            addReceiveInformation(commitData)
+              .then(async (res) => {
+                this.loading = false;
+                this.$message.success('新增成功');
+                if (type === 'sub') {
+                  let storemanIds = '';
+                  let ids = commitData.productList.map(
+                    (item) => item.warehouseId
+                  );
+                  let warehouseList = await getWarehouseListByIds(ids || []);
+                  storemanIds = warehouseList.map((item) => item.ownerId);
+                  this.sub(res, commitData.sourceType, storemanIds.toString());
+                  return;
+                }
+                this.cancel();
+                this.$emit('done');
+              })
+              .catch((e) => {
+                //this.loading = false;
+              });
+          }
+        } catch (error) {
+          console.log(error);
+          // 表单验证未通过,不执行保存操作
+        }
+      },
+      async sub(res, sourceType, storemanIds) {
+        const data = await getReceiveSaleOrderrecordDetail(
+          this.businessId || res
+        );
+        this.processSubmitDialogFlag = true;
+        let key =
+          sourceType == '1'
+            ? 'purchase_receive_approve'
+            : 'purchase_receive_approve_2';
+        this.$nextTick(() => {
+          let params = {
+            businessId: data.id,
+            businessKey: key,
+            formCreateUserId: data.createUserId,
+            variables: {
+              businessCode: data.receiveNo,
+              receiveType: data.receiveType,
+              sourceType: data.sourceType,
+              storemanIds: storemanIds.toString()
+            }
+            // callBackMethodType : '1',
+            // callBackMethod : 'proTargetPlanApproveApiImpl.updatePlanApprovalStatus',
+            // pcHandle : '/bpm/handleTask/components/project-manage/plan-manage/submit.vue',
+            // pcView : '/bpm/handleTask/components/project-manage/plan-manage/detailDialog.vue',
+            // miniHandle : '',
+            // miniView : '',
+          };
+
+          this.$refs.processSubmitDialogRef.init(params);
+        });
 
-      // submit({
-      //   businessId: this.businessId || res,
-      //   receiveType: this.form.receiveType,
-      //   sourceType,
-      //   variables: {
-      //     storemanIds
-      //   }
-      // }).then((res) => {
-      //   this.cancel();
-      //   this.$emit('done');
-      // });
-    },
-    reload(){
-      this.cancel();
-      this.$emit('done');
-    },
-    cancel() {
-      this.$nextTick(() => {
-        this.activeName = 'base';
-        // 关闭后,销毁所有的表单数据
-        this.$refs['otherForm'] && this.$refs['otherForm'].resetFields();
-        this.$refs['formRef'] && this.$refs['formRef'].resetFields();
-        this.$store.commit('order/clearUserData');
-        this.form = copyObj(this.formDef);
-        this.visible = false;
-      });
+        // submit({
+        //   businessId: this.businessId || res,
+        //   receiveType: this.form.receiveType,
+        //   sourceType,
+        //   variables: {
+        //     storemanIds
+        //   }
+        // }).then((res) => {
+        //   this.cancel();
+        //   this.$emit('done');
+        // });
+      },
+      reload() {
+        this.cancel();
+        this.$emit('done');
+      },
+      cancel() {
+        this.$nextTick(() => {
+          this.activeName = 'base';
+          // 关闭后,销毁所有的表单数据
+          this.$refs['otherForm'] && this.$refs['otherForm'].resetFields();
+          this.$refs['formRef'] && this.$refs['formRef'].resetFields();
+          this.$store.commit('order/clearUserData');
+          this.form = copyObj(this.formDef);
+          this.visible = false;
+        });
+      }
     }
-  }
-};
+  };
 </script>
 <style scoped lang="scss">
-.TotalAmount {
-  font-size: 16px;
-  padding-right: 30px;
-}
+  .TotalAmount {
+    font-size: 16px;
+    padding-right: 30px;
+  }
 
-.headbox {
-  display: flex;
-  justify-content: flex-start;
-  align-items: center;
+  .headbox {
+    display: flex;
+    justify-content: flex-start;
+    align-items: center;
 
-  .amount {
-    font-size: 14px;
-    font-weight: bold;
-    margin-right: 20px;
+    .amount {
+      font-size: 14px;
+      font-weight: bold;
+      margin-right: 20px;
+    }
   }
-}
 </style>

+ 9 - 6
src/views/purchasingManage/purchaseOrder/invoice/components/inventoryTable.vue

@@ -451,7 +451,11 @@
             width: 120,
             prop: 'taxRate',
             label: '税率',
-            slot: 'taxRate',
+            formatter: (_row, _column, cellValue) => {
+              return _row.taxRate
+                ? _row.taxRate+'%'
+                : '';
+            },
             align: 'center'
           },
           {
@@ -750,12 +754,11 @@
       validateTotalCount(row) {
         return (rule, value, callback) => {
           if (isNaN(value) || Number(value) <= 0) {
-            this.$message.error('请输入大于0的数');
+            // this.$message.error('请输入大于0的数');
             callback(new Error('请输入大于0的数字'));
-          } else if (row.totalCount > row.orderTotalCount) {
-            this.$message.warning('收货数量大于总数量');
-            //new Error('进货数量不能大于总数量')
-            callback();
+          } else if ((row.totalCount+(row.receiveTotalCount||0)) > row.orderTotalCount) {
+            // this.$message.warning('收货数量大于采购总数量');
+            callback(new Error('收货数量大于采购总数量'));
           } else {
             callback();
           }

+ 5 - 1
src/views/purchasingManage/purchaseOrder/outSourceSend/components/detailDialog.vue

@@ -373,7 +373,11 @@
             width: 120,
             prop: 'taxRate',
             label: '税率',
-            slot: 'taxRate',
+            formatter: (_row, _column, cellValue) => {
+              return _row.taxRate
+                ? _row.taxRate+'%'
+                : '';
+            },
             align: 'center'
           },
           {

+ 5 - 1
src/views/purchasingManage/purchaseOrder/outSourceSend/components/inventoryTable.vue

@@ -426,7 +426,11 @@
             width: 120,
             prop: 'taxRate',
             label: '税率',
-            slot: 'taxRate',
+            formatter: (_row, _column, cellValue) => {
+              return _row.taxRate
+                ? _row.taxRate+'%'
+                : '';
+            },
             align: 'center',
             show: !this.detailType
           },

+ 5 - 1
src/views/purchasingManage/purchaseOrder/returnGoods/components/detailDialog.vue

@@ -387,7 +387,11 @@
             width: 120,
             prop: 'taxRate',
             label: '税率',
-            slot: 'taxRate',
+            formatter: (_row, _column, cellValue) => {
+              return _row.taxRate
+                ? _row.taxRate+'%'
+                : '';
+            },
             align: 'center'
           },
           {

+ 5 - 1
src/views/purchasingManage/purchaseOrder/returnGoods/components/inventoryTable.vue

@@ -480,7 +480,11 @@
             width: 120,
             prop: 'taxRate',
             label: '税率',
-            slot: 'taxRate',
+            formatter: (_row, _column, cellValue) => {
+              return _row.taxRate
+                ? _row.taxRate+'%'
+                : '';
+            },
             align: 'center'
           },
           {

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

@@ -820,7 +820,8 @@
         this.projectData = obj;
         this.form = Object.assign({}, this.form, {
           projectName: obj.name,
-          projectId: obj.id
+          projectId: obj.id,
+          projectCode: obj.code,
         });
 
         if (obj.contractId) {

+ 346 - 356
src/views/saleManage/saleOrder/entrustedReceive/components/detailDialog.vue

@@ -23,88 +23,66 @@
         </ul>
       </div>
     </div>
-    <div v-if="activeComp==='main'">
-      <el-form ref="form" :model="form" class="el-form-box" :rules="rules" label-width="120px">
+    <div v-if="activeComp === 'main'">
+      <el-form
+        ref="form"
+        :model="form"
+        class="el-form-box"
+        :rules="rules"
+        label-width="120px"
+      >
         <headerTitle title="收货信息"></headerTitle>
         <el-row :gutter="12">
           <el-col :span="12">
-            <el-form-item
-              label="选择订单:"
-              prop="orderNo">
+            <el-form-item label="选择订单:" prop="orderNo">
               <el-input v-model="form.orderNo" disabled></el-input>
             </el-form-item>
           </el-col>
           <el-col :span="12">
-            <el-form-item
-              label="客户名称:"
-              prop="contactName"
-            >
+            <el-form-item label="客户名称:" prop="contactName">
               <el-input v-model="form.contactName" disabled></el-input>
             </el-form-item>
           </el-col>
-        </el-row>
-        <el-row :gutter="12">
-          <el-col :span="12">
-            <el-form-item
-              label="计价方式:"
-             >
+
+          <!-- <el-col :span="12">
+            <el-form-item label="计价方式:">
               <el-select v-model="form.pricingWay" disabled style="width: 100%">
                 <el-option label="按数量计费" :value="1"></el-option>
                 <el-option label="按重量计费" :value="2"></el-option>
               </el-select>
             </el-form-item>
-          </el-col>
+          </el-col> -->
           <el-col :span="12">
-            <el-form-item
-              label="客户联系人:"
-              prop="linkName">
+            <el-form-item label="客户联系人:" prop="linkName">
               <el-input v-model="form.linkName" disabled></el-input>
             </el-form-item>
           </el-col>
-        </el-row>
-        <el-row :gutter="12">
+ 
           <el-col :span="12">
             <el-form-item label="车辆号:" prop="carNo">
               <el-input v-model="form.carNo" disabled></el-input>
             </el-form-item>
           </el-col>
           <el-col :span="12">
-            <el-form-item
-              label="客户电话:"
-              prop="linkPhone">
+            <el-form-item label="客户电话:" prop="linkPhone">
               <el-input v-model="form.linkPhone" disabled></el-input>
             </el-form-item>
           </el-col>
         </el-row>
         <el-row :gutter="12">
-
           <el-col :span="12">
-            <el-form-item
-              label="收货日期:"
-              prop="receiveDate">
+            <el-form-item label="收货日期:" prop="receiveDate">
               <el-input v-model="form.receiveDate" disabled></el-input>
             </el-form-item>
           </el-col>
           <el-col :span="12">
-            <el-form-item
-              label="收货单号:"
-              prop="sendNoteNo">
+            <el-form-item label="收货单号:" prop="sendNoteNo">
               <el-input v-model="form.sendNoteNo" disabled></el-input>
             </el-form-item>
           </el-col>
           <el-col :span="12">
             <el-form-item prop="files" label="附件:">
               <fileMain v-model="row.files" type="view"></fileMain>
-<!--              <div v-if="row.files && row.files?.length">-->
-<!--                <el-link-->
-<!--                  v-for="link in row.files"-->
-<!--                  :key="link.id"-->
-<!--                  type="primary"-->
-<!--                  :underline="false"-->
-<!--                  @click="downloadFile(link)">-->
-<!--                  {{ link.name }}-->
-<!--                </el-link>-->
-<!--              </div>-->
             </el-form-item>
           </el-col>
         </el-row>
@@ -127,25 +105,31 @@
         </template> -->
         <template v-slot:technicalDrawings="{ row }">
           <fileMain v-model="row.files" type="view"></fileMain>
-<!--          <div v-if="row.technicalDrawings && row.technicalDrawings?.length">-->
-<!--            <el-link-->
-<!--              v-for="link in row.technicalDrawings"-->
-<!--              :key="link.id"-->
-<!--              type="primary"-->
-<!--              :underline="false"-->
-<!--              @click="downloadFile(link)"-->
-<!--            >-->
-<!--              {{ link.name }}-->
-<!--            </el-link-->
-<!--            >-->
-<!--          </div>-->
+          <!--          <div v-if="row.technicalDrawings && row.technicalDrawings?.length">-->
+          <!--            <el-link-->
+          <!--              v-for="link in row.technicalDrawings"-->
+          <!--              :key="link.id"-->
+          <!--              type="primary"-->
+          <!--              :underline="false"-->
+          <!--              @click="downloadFile(link)"-->
+          <!--            >-->
+          <!--              {{ link.name }}-->
+          <!--            </el-link-->
+          <!--            >-->
+          <!--          </div>-->
         </template>
       </ele-pro-table>
     </div>
 
-    <bpmDetail v-if="activeComp==='bpm'&&form.processInstanceId" :id="form.processInstanceId"></bpmDetail>
+    <bpmDetail
+      v-if="activeComp === 'bpm' && form.processInstanceId"
+      :id="form.processInstanceId"
+    ></bpmDetail>
 
-    <inner-bound-details v-if="activeComp==='store'" ref="outBoundDetailsRef"></inner-bound-details>
+    <inner-bound-details
+      v-if="activeComp === 'store'"
+      ref="outBoundDetailsRef"
+    ></inner-bound-details>
     <div slot="footer" class="footer">
       <el-button @click="cancel">返回</el-button>
     </div>
@@ -153,333 +137,339 @@
 </template>
 
 <script>
-import {getFile} from '@/api/system/file';
-import dictMixins from '@/mixins/dictMixins';
-import {reviewStatusEnum} from '@/enum/dict';
-import {copyObj} from '@/utils/util';
-import {
-  getPSaleEntrustedReceiveDetailAPI,
-} from '@/api/saleManage/entrustedReceive';
-import bpmDetail from '@/views/bpm/processInstance/detail.vue';
-import fileUpload from "@/components/upload/fileUpload.vue";
-import innerBoundDetails from "@/BIZComponents/innerdetails.vue";
-import fileMain from "@/components/addDoc/index.vue";
-export default {
-  mixins: [dictMixins],
-  components: {
-    fileMain,
-    fileUpload,
-    bpmDetail,
-    innerBoundDetails
-  },
-  props: {
-    detailDialogFlag: Boolean
-  },
-  data() {
-    return {
-      activeComp: 'main',
-      tabOptions: [
-        {key: 'main', name: '收货单详情'},
-        {key: 'bpm', name: '流程详情'},
-        {key: 'store', name: '入库单详情'},
-      ],
-      reviewStatusEnum,
-      detailId: '',
-      title: '详情',
-      row: {},
-      activeName: 'base',
-      form: {
-        orderFiles: [{name: '222'}]
-      },
-      rules: {},
-      detailData: {},
-
-      competAnalysisListcolumns: [
-        {
-          width: 45,
-          type: 'index',
-          columnKey: 'index',
-          align: 'center',
-          fixed: 'left'
-        },
-        {
-          minWidth: 140,
-          prop: 'productName',
-          label: '名称',
-          slot: 'productName',
-          align: "center"
-        },
-        {
-          minWidth: 120,
-          prop: 'productCode',
-          label: '编码',
-          slot: 'productCode',
-          align: "center"
-        },
-        {
-          minWidth: 100,
-          prop: 'productCategoryName',
-          label: '类型',
-          slot: 'productCategoryName',
-          align: "center"
-        },
-        {
-          width: 160,
-          prop: 'productBrand',
-          label: '牌号',
-          slot: 'productBrand',
-          align: "center"
-        },
-        {
-          width: 120,
-          prop: 'modelType',
-          label: '型号',
-          slot: 'modelType',
-          align: "center"
-        },
-        {
-          width: 120,
-          prop: 'specification',
-          label: '规格',
-          slot: 'specification',
-          align: "center"
-        },
-        {
-          width: 200,
-          prop: 'customerMark',
-          label: '客户代号',
-          slot: 'customerMark',
-          align: "center"
-        },
-        {
-          width: 200,
-          prop: 'warehouseName',
-          label: '仓库名称',
-          slot: 'warehouseName',
-          align: "center"
-        },
-        {
-          width: 110,
-          prop: 'orderTotalCount',
-          label: '订单总数量',
-          slot: 'orderTotalCount',
-          align: "center"
-        },
-        {
-          width: 120,
-          prop: 'totalCount',
-          label: '本次收货数量',
-          slot: 'totalCount',
-          headerSlot: 'headerTotalCount',
-          align: "center"
-        },
-        {
-          width: 100,
-          prop: 'receiveTotalCount',
-          label: '已收货总数',
-          slot: 'receiveTotalCount',
-          align: "center"
-        },
-        {
-          width: 120,
-          prop: 'measuringUnit',
-          label: '计量单位',
-          slot: 'measuringUnit',
-          align: "center"
-        },
-        {
-          width: 120,
-          prop: 'singleWeight',
-          label: '单重',
-          slot: 'singleWeight',
-          align: "center"
-        },
-        {
-          width: 100,
-          prop: 'receiveTotalWeight',
-          label: '收货总重',
-          slot: 'receiveTotalWeight',
-          align: "center"
-        },
-        {
-          width: 100,
-          prop: 'weightUnit',
-          label: '重量单位',
-          slot: 'weightUnit',
-          align: "center"
+  import { getFile } from '@/api/system/file';
+  import dictMixins from '@/mixins/dictMixins';
+  import { reviewStatusEnum } from '@/enum/dict';
+  import { copyObj } from '@/utils/util';
+  import { getPSaleEntrustedReceiveDetailAPI } from '@/api/saleManage/entrustedReceive';
+  import bpmDetail from '@/views/bpm/processInstance/detail.vue';
+  import fileUpload from '@/components/upload/fileUpload.vue';
+  import innerBoundDetails from '@/BIZComponents/innerdetails.vue';
+  import fileMain from '@/components/addDoc/index.vue';
+  export default {
+    mixins: [dictMixins],
+    components: {
+      fileMain,
+      fileUpload,
+      bpmDetail,
+      innerBoundDetails
+    },
+    props: {
+      detailDialogFlag: Boolean
+    },
+    data() {
+      return {
+        activeComp: 'main',
+        tabOptions: [
+          { key: 'main', name: '收货单详情' },
+          { key: 'bpm', name: '流程详情' },
+          { key: 'store', name: '入库单详情' }
+        ],
+        reviewStatusEnum,
+        detailId: '',
+        title: '详情',
+        row: {},
+        activeName: 'base',
+        form: {
+          orderFiles: [{ name: '222' }]
         },
-        {
+        rules: {},
+        detailData: {},
+
+        competAnalysisListcolumns: [
+          {
+            width: 45,
+            type: 'index',
+            columnKey: 'index',
+            align: 'center',
+            fixed: 'left'
+          },
+          {
+            minWidth: 140,
+            prop: 'productName',
+            label: '名称',
+            slot: 'productName',
+            align: 'center'
+          },
+          {
+            minWidth: 120,
+            prop: 'productCode',
+            label: '编码',
+            slot: 'productCode',
+            align: 'center'
+          },
+          {
+            minWidth: 100,
+            prop: 'productCategoryName',
+            label: '类型',
+            slot: 'productCategoryName',
+            align: 'center'
+          },
+          {
+            width: 160,
+            prop: 'productBrand',
+            label: '牌号',
+            slot: 'productBrand',
+            align: 'center'
+          },
+          {
+            width: 120,
+            prop: 'modelType',
+            label: '型号',
+            slot: 'modelType',
+            align: 'center'
+          },
+          {
+            width: 120,
+            prop: 'specification',
+            label: '规格',
+            slot: 'specification',
+            align: 'center'
+          },
+          {
+            width: 200,
+            prop: 'customerMark',
+            label: '客户代号',
+            slot: 'customerMark',
+            align: 'center'
+          },
+          {
+            width: 200,
+            prop: 'warehouseName',
+            label: '仓库名称',
+            slot: 'warehouseName',
+            align: 'center'
+          },
+          {
+            width: 110,
+            prop: 'orderTotalCount',
+            label: '订单总数量',
+            slot: 'orderTotalCount',
+            align: 'center'
+          },
+          {
+            width: 120,
+            prop: 'totalCount',
+            label: '本次收货数量',
+            slot: 'totalCount',
+            headerSlot: 'headerTotalCount',
+            align: 'center'
+          },
+          {
+            width: 100,
+            prop: 'receiveTotalCount',
+            label: '已收货总数',
+            slot: 'receiveTotalCount',
+            align: 'center'
+          },
+          {
+            width: 120,
+            prop: 'measuringUnit',
+            label: '计量单位',
+            slot: 'measuringUnit',
+            align: 'center'
+          },
+          {
+            width: 120,
+            prop: 'singleWeight',
+            label: '单重',
+            slot: 'singleWeight',
+            align: 'center'
+          },
+          {
+            width: 100,
+            prop: 'receiveTotalWeight',
+            label: '收货总重',
+            slot: 'receiveTotalWeight',
+            align: 'center'
+          },
+          {
+            width: 100,
+            prop: 'weightUnit',
+            label: '重量单位',
+            slot: 'weightUnit',
+            align: 'center'
+          },
+          {
             width: 160,
             prop: 'pricingWay',
             label: '计价方式',
             slot: 'pricingWay',
             align: 'center',
             formatter: (row, column) => {
-              return row.pricingWay == 1 ? '按数量计费' : row.pricingWay == 2 ? '按重量计费':'';
-
+              return row.pricingWay == 1
+                ? '按数量计费'
+                : row.pricingWay == 2
+                ? '按重量计费'
+                : '';
             }
           },
-        {
-          width: 160,
-          prop: 'singlePrice',
-          label: '单价',
-          slot: 'singlePrice',
-          align: "center"
-        },
-        {
+          {
+            width: 160,
+            prop: 'singlePrice',
+            label: '单价',
+            slot: 'singlePrice',
+            align: 'center'
+          },
+          {
             width: 100,
             prop: 'taxRate',
             label: '税率',
+            formatter: (_row, _column, cellValue) => {
+              return _row.taxRate ? _row.taxRate + '%' : '';
+            },
             align: 'center'
           },
-        {
-          width: 100,
-          prop: 'discountSinglePrice',
-          label: '折让单价',
-          slot: 'discountSinglePrice',
-          align: "center",
-          formatter: (_row, _column, cellValue) => {
-            return _row.discountSinglePrice
-              ? Number(_row.discountSinglePrice).toFixed(2)
-              : '';
-          }
-        },
+          {
+            width: 100,
+            prop: 'discountSinglePrice',
+            label: '折让单价',
+            slot: 'discountSinglePrice',
+            align: 'center',
+            formatter: (_row, _column, cellValue) => {
+              return _row.discountSinglePrice
+                ? Number(_row.discountSinglePrice).toFixed(2)
+                : '';
+            }
+          },
 
-        {
-          width: 120,
-          prop: 'totalPrice',
-          label: '合计',
-          slot: 'totalPrice',
-          formatter: (_row, _column, cellValue) => {
-            return _row.totalPrice + '元';
+          {
+            width: 120,
+            prop: 'totalPrice',
+            label: '合计',
+            slot: 'totalPrice',
+            formatter: (_row, _column, cellValue) => {
+              return _row.totalPrice + '元';
+            },
+            align: 'center'
           },
-          align: "center"
-        },
-        {
-          width: 100,
-          prop: 'discountTotalPrice',
-          label: '折让合计',
-          slot: 'discountTotalPrice',
-          align: "center",
-          formatter: (_row, _column, cellValue) => {
-            return _row.discountTotalPrice
-              ? Number(_row.discountTotalPrice).toFixed(2)
-              : '';
-          }
-        },
-        {
-          width: 120,
-          prop: 'deliveryDays',
-          label: '交期(天)',
-          slot: 'deliveryDays',
-          align: "center"
-        },
-        {
-          width: 200,
-          prop: 'guaranteePeriod',
-          label: '质保期',
-          slot: 'guaranteePeriod',
-          formatter: (_row, _column, cellValue) => {
-            return (_row.guaranteePeriod || '') + _row.guaranteePeriodUnitName;
+          {
+            width: 100,
+            prop: 'discountTotalPrice',
+            label: '折让合计',
+            slot: 'discountTotalPrice',
+            align: 'center',
+            formatter: (_row, _column, cellValue) => {
+              return _row.discountTotalPrice
+                ? Number(_row.discountTotalPrice).toFixed(2)
+                : '';
+            }
           },
-          align: "center"
-        },
-        // {
-        //   width: 120,
-        //   prop: 'guaranteePeriodUnitCode',
-        //   label: '',
-        //   slot: 'guaranteePeriodUnitCode'
-        // },
-        {
-          width: 120,
-          prop: 'technicalAnswerName',
-          label: '技术答疑人',
-          slot: 'technicalAnswerName',
-          align: "center"
-        },
-        {
-          width: 220,
-          prop: 'technicalParams',
-          label: '技术参数',
-          slot: 'technicalParams',
-          align: "center"
-        },
-        {
-          width: 240,
-          prop: 'technicalDrawings',
-          label: '技术图纸',
-          slot: 'technicalDrawings',
-          formatter: (_row, _column, cellValue) => {
-            return (_row.guaranteePeriod || '') + _row.guaranteePeriodUnitName;
+          {
+            width: 120,
+            prop: 'deliveryDays',
+            label: '交期(天)',
+            slot: 'deliveryDays',
+            align: 'center'
           },
-          align: "center"
-        },
-        {
-          width: 220,
-          prop: 'remark',
-          label: '备注',
-          slot: 'remark',
-          align: "center"
-        }
-      ]
-    };
-  },
-  methods: {
-    async open(row) {
-      this.form = row;
-      this.getDetailData(row.id);
-      this.detailId = row.id;
-
-    },
-    handleTag(val){
-      this.activeComp = val
-      if(val =='store'){
-        this.$nextTick(()=>{
-          this.$refs.outBoundDetailsRef._getInfo(this.form.code);
-        })
-      }
-    },
-    //关闭弹窗
-    cancel() {
-      this.$emit('update:detailDialogFlag', false)
-    },
-    downloadFile(file) {
-      getFile({objectName: file.storePath}, file.name);
+          {
+            width: 200,
+            prop: 'guaranteePeriod',
+            label: '质保期',
+            slot: 'guaranteePeriod',
+            formatter: (_row, _column, cellValue) => {
+              return (
+                (_row.guaranteePeriod || '') + _row.guaranteePeriodUnitName
+              );
+            },
+            align: 'center'
+          },
+          // {
+          //   width: 120,
+          //   prop: 'guaranteePeriodUnitCode',
+          //   label: '',
+          //   slot: 'guaranteePeriodUnitCode'
+          // },
+          {
+            width: 120,
+            prop: 'technicalAnswerName',
+            label: '技术答疑人',
+            slot: 'technicalAnswerName',
+            align: 'center'
+          },
+          {
+            width: 220,
+            prop: 'technicalParams',
+            label: '技术参数',
+            slot: 'technicalParams',
+            align: 'center'
+          },
+          {
+            width: 240,
+            prop: 'technicalDrawings',
+            label: '技术图纸',
+            slot: 'technicalDrawings',
+            formatter: (_row, _column, cellValue) => {
+              return (
+                (_row.guaranteePeriod || '') + _row.guaranteePeriodUnitName
+              );
+            },
+            align: 'center'
+          },
+          {
+            width: 220,
+            prop: 'remark',
+            label: '备注',
+            slot: 'remark',
+            align: 'center'
+          }
+        ]
+      };
     },
-    async getDetailData(id) {
-      this.loading = true;
-      const data = await getPSaleEntrustedReceiveDetailAPI(id);
-      this.loading = false;
-      if (data) {
-        data.productList.forEach(item=>{
-          data.pricingWay=data.pricingWay|| data?.saleOrder?.pricingWay
-        })
-        this.form = data;
-        this.detailData = data;
-        this.form.pricingWay = data?.saleOrder?.pricingWay
-
+    methods: {
+      async open(row) {
+        this.form = row;
+        this.getDetailData(row.id);
+        this.detailId = row.id;
+      },
+      handleTag(val) {
+        this.activeComp = val;
+        if (val == 'store') {
+          this.$nextTick(() => {
+            this.$refs.outBoundDetailsRef._getInfo(this.form.code);
+          });
+        }
+      },
+      //关闭弹窗
+      cancel() {
+        this.$emit('update:detailDialogFlag', false);
+      },
+      downloadFile(file) {
+        getFile({ objectName: file.storePath }, file.name);
+      },
+      async getDetailData(id) {
+        this.loading = true;
+        const data = await getPSaleEntrustedReceiveDetailAPI(id);
+        this.loading = false;
+        if (data) {
+          data.productList.forEach((item) => {
+            data.pricingWay = data.pricingWay || data?.saleOrder?.pricingWay;
+          });
+          this.form = data;
+          this.detailData = data;
+          this.form.pricingWay = data?.saleOrder?.pricingWay;
+        }
       }
     }
-  }
-};
+  };
 </script>
 
 <style scoped lang="scss">
-.ele-dialog-form {
-  .el-form-item {
-    margin-bottom: 10px;
+  .ele-dialog-form {
+    .el-form-item {
+      margin-bottom: 10px;
+    }
   }
-}
 
-.headbox {
-  display: flex;
-  justify-content: flex-start;
-  align-items: center;
+  .headbox {
+    display: flex;
+    justify-content: flex-start;
+    align-items: center;
 
-  .amount {
-    font-size: 14px;
-    font-weight: bold;
-    margin-right: 20px;
+    .amount {
+      font-size: 14px;
+      font-weight: bold;
+      margin-right: 20px;
+    }
   }
-}
 </style>

+ 579 - 543
src/views/saleManage/saleOrder/entrustedReceive/components/inventoryTable.vue

@@ -11,7 +11,7 @@
     >
       <!-- 表头工具栏 -->
       <template v-slot:toolbar>
-        <div class="headbox" v-if="!contractId&&isShowAdd">
+        <div class="headbox" v-if="!contractId && isShowAdd">
           <el-button
             size="small"
             type="primary"
@@ -29,7 +29,6 @@
           :prop="'datasource.' + $index + '.technicalDrawings'"
         >
           <fileMain v-model="row.technicalDrawings" type="view"></fileMain>
-
         </el-form-item>
       </template>
       <template v-slot:industryArtFiles="{ row, $index }">
@@ -38,7 +37,6 @@
           :prop="'datasource.' + $index + '.industryArtFiles'"
         >
           <fileMain v-model="row.industryArtFiles" type="view"></fileMain>
-
         </el-form-item>
       </template>
       <template v-slot:otherFiles="{ row, $index }">
@@ -47,7 +45,6 @@
           :prop="'datasource.' + $index + '.otherFiles'"
         >
           <fileMain v-model="row.otherFiles" type="view"></fileMain>
-
         </el-form-item>
       </template>
       <template v-slot:customerReqFiles="{ row, $index }">
@@ -56,18 +53,18 @@
           :prop="'datasource.' + $index + '.customerReqFiles'"
         >
           <fileMain v-model="row.customerReqFiles" type="view"></fileMain>
-<!--          <div v-if="row.customerReqFiles && row.customerReqFiles?.length">-->
-<!--            <el-link-->
-<!--              v-for="link in row.customerReqFiles"-->
-<!--              :key="link.id"-->
-<!--              type="primary"-->
-<!--              :underline="false"-->
-<!--              @click="downloadFile(link)"-->
-<!--            >-->
-<!--              {{ link.name }}-->
-<!--            </el-link-->
-<!--            >-->
-<!--          </div>-->
+          <!--          <div v-if="row.customerReqFiles && row.customerReqFiles?.length">-->
+          <!--            <el-link-->
+          <!--              v-for="link in row.customerReqFiles"-->
+          <!--              :key="link.id"-->
+          <!--              type="primary"-->
+          <!--              :underline="false"-->
+          <!--              @click="downloadFile(link)"-->
+          <!--            >-->
+          <!--              {{ link.name }}-->
+          <!--            </el-link-->
+          <!--            >-->
+          <!--          </div>-->
         </el-form-item>
       </template>
 
@@ -96,7 +93,7 @@
           <!--           { validator: validateTotalCount(scope.row), trigger: 'blur' }-->
           <el-input
             v-model="scope.row.totalCount"
-            @input="(val) => changeNum(val,scope.row, scope.$index)"
+            @input="(val) => changeNum(val, scope.row, scope.$index)"
           ></el-input>
         </el-form-item>
       </template>
@@ -155,575 +152,614 @@
   </el-form>
 </template>
 <script>
-import {emailReg, phoneReg, numberReg} from 'ele-admin';
-import dictMixins from '@/mixins/dictMixins';
-import productList from './product-list.vue';
-import {
-  getWarehouseList,
-  getWarehouseOutStock
-} from '@/api/saleManage/saleorder';
+  import { emailReg, phoneReg, numberReg } from 'ele-admin';
+  import dictMixins from '@/mixins/dictMixins';
+  import productList from './product-list.vue';
+  import {
+    getWarehouseList,
+    getWarehouseOutStock
+  } from '@/api/saleManage/saleorder';
 
-import {copyObj} from '@/utils/util';
-import {getFile} from "@/api/system/file";
-import fileMain from "@/components/addDoc/index.vue";
+  import { copyObj } from '@/utils/util';
+  import { getFile } from '@/api/system/file';
+  import fileMain from '@/components/addDoc/index.vue';
 
-export default {
-  mixins: [dictMixins],
-  props: {
-    orderId: String,
-    isShowAdd: {
-      type: Boolean,
-      default: true
-    },
-    pricingWay: [Number, String]
-  },
-  components: {
-    fileMain,
-    productList
-  },
-  data() {
-    const defaultForm = {
-      key: null,
-      endTime: '',
-      isFirst: 0,
-      name: '',
-      startTime: '',
-      workHour: '',
-      technicalDrawings: []
-      // warehouseCode:"",
-      // warehouseId:'',
-      // warehouseName:'',
-    };
-    return {
-      discountTotalPrice: 0.0,
-      allPrice: 0.0,
-      numberReg,
-      defaultForm,
-      warehouseList: [],
-      form: {
-        datasource: []
+  export default {
+    mixins: [dictMixins],
+    props: {
+      orderId: String,
+      isShowAdd: {
+        type: Boolean,
+        default: true
       },
-      rules: {},
-      columns: [
-        {
-          width: 45,
-          type: 'index',
-          columnKey: 'index',
-          align: 'center',
-          fixed: 'left'
-        },
-        {
-          minWidth: 200,
-          prop: 'productName',
-          label: '名称',
-          slot: 'productName',
-          align: "center"
-        },
-        {
-          minWidth: 120,
-          prop: 'productCode',
-          label: '编码',
-          slot: 'productCode',
-          align: "center"
-        },
-        {
-          minWidth: 150,
-          prop: 'productCategoryName',
-          label: '类型',
-          slot: 'productCategoryName',
-          align: "center"
-        },
-        {
-          prop: 'batchNo',
-          label: '批次号',
-          align: 'center',
-          showOverflowTooltip: true,
-          minWidth: 100
-        },
-        {
-          minWidth: 100,
-          prop: 'productBrand',
-          label: '牌号',
-          slot: 'productBrand',
-          align: "center"
-        },
-        {
-          minWidth: 120,
-          prop: 'modelType',
-          label: '型号',
-          slot: 'modelType',
-          align: "center"
-        },
-        {
-          minWidth: 120,
-          prop: 'specification',
-          label: '规格',
-          slot: 'specification',
-          align: "center"
-        },
-        {
-          minWidth: 150,
-          prop: 'customerMark',
-          label: '客户代号',
-          slot: 'customerMark',
-          align: "center"
-        },
-        {
-          minWidth: 200,
-          prop: 'warehouseId',
-          label: '仓库名称',
-          slot: 'warehouseId',
-          headerSlot: 'headerWarehouseId',
-          align: "center"
-        },
-        {
-          minWidth: 80,
-          prop: 'warehouseNum',
-          label: '库存',
-          slot: 'warehouseNum',
-          align: "center"
-        },
-        {
-          width: 110,
-          prop: 'orderTotalCount',
-          label: '订单总数量',
-          slot: 'orderTotalCount',
-          align: "center"
-        },
-        {
-          width: 120,
-          prop: 'totalCount',
-          label: '本次收货数量',
-          slot: 'totalCount',
-          headerSlot: 'headerTotalCount',
-          align: "center"
-        },
-        {
-          width: 100,
-          prop: 'receiveTotalCount',
-          label: '已收货总数',
-          slot: 'receiveTotalCount',
-          align: "center"
-        },
-        {
-          minWidth: 100,
-          prop: 'measuringUnit',
-          label: '计量单位',
-          slot: 'measuringUnit',
-          align: "center"
-        },
-        {
-          width: 120,
-          prop: 'singleWeight',
-          label: '单重',
-          slot: 'singleWeight',
-          align: "center"
-        },
-        {
-          width: 100,
-          prop: 'receiveTotalWeight',
-          label: '收货总重',
-          slot: 'receiveTotalWeight',
-          align: "center"
-        },
-        {
-          width: 100,
-          prop: 'weightUnit',
-          label: '重量单位',
-          slot: 'weightUnit',
-          align: "center"
-        },
-        {
+      pricingWay: [Number, String]
+    },
+    components: {
+      fileMain,
+      productList
+    },
+    data() {
+      const defaultForm = {
+        key: null,
+        endTime: '',
+        isFirst: 0,
+        name: '',
+        startTime: '',
+        workHour: '',
+        technicalDrawings: []
+        // warehouseCode:"",
+        // warehouseId:'',
+        // warehouseName:'',
+      };
+      return {
+        discountTotalPrice: 0.0,
+        allPrice: 0.0,
+        numberReg,
+        defaultForm,
+        warehouseList: [],
+        form: {
+          datasource: []
+        },
+        rules: {},
+        columns: [
+          {
+            width: 45,
+            type: 'index',
+            columnKey: 'index',
+            align: 'center',
+            fixed: 'left'
+          },
+          {
+            minWidth: 200,
+            prop: 'productName',
+            label: '名称',
+            slot: 'productName',
+            align: 'center'
+          },
+          {
+            minWidth: 120,
+            prop: 'productCode',
+            label: '编码',
+            slot: 'productCode',
+            align: 'center'
+          },
+          {
+            minWidth: 150,
+            prop: 'productCategoryName',
+            label: '类型',
+            slot: 'productCategoryName',
+            align: 'center'
+          },
+          {
+            prop: 'batchNo',
+            label: '批次号',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 100
+          },
+          {
+            minWidth: 100,
+            prop: 'productBrand',
+            label: '牌号',
+            slot: 'productBrand',
+            align: 'center'
+          },
+          {
+            minWidth: 120,
+            prop: 'modelType',
+            label: '型号',
+            slot: 'modelType',
+            align: 'center'
+          },
+          {
+            minWidth: 120,
+            prop: 'specification',
+            label: '规格',
+            slot: 'specification',
+            align: 'center'
+          },
+          {
+            minWidth: 150,
+            prop: 'customerMark',
+            label: '客户代号',
+            slot: 'customerMark',
+            align: 'center'
+          },
+          {
+            minWidth: 200,
+            prop: 'warehouseId',
+            label: '仓库名称',
+            slot: 'warehouseId',
+            headerSlot: 'headerWarehouseId',
+            align: 'center'
+          },
+          {
+            minWidth: 80,
+            prop: 'warehouseNum',
+            label: '库存',
+            slot: 'warehouseNum',
+            align: 'center'
+          },
+          {
+            width: 110,
+            prop: 'orderTotalCount',
+            label: '订单总数量',
+            slot: 'orderTotalCount',
+            align: 'center'
+          },
+          {
+            width: 120,
+            prop: 'totalCount',
+            label: '本次收货数量',
+            slot: 'totalCount',
+            headerSlot: 'headerTotalCount',
+            align: 'center'
+          },
+          {
+            width: 100,
+            prop: 'receiveTotalCount',
+            label: '已收货总数',
+            slot: 'receiveTotalCount',
+            align: 'center'
+          },
+          {
+            minWidth: 100,
+            prop: 'measuringUnit',
+            label: '计量单位',
+            slot: 'measuringUnit',
+            align: 'center'
+          },
+          {
+            width: 120,
+            prop: 'singleWeight',
+            label: '单重',
+            slot: 'singleWeight',
+            align: 'center'
+          },
+          {
+            width: 100,
+            prop: 'receiveTotalWeight',
+            label: '收货总重',
+            slot: 'receiveTotalWeight',
+            align: 'center'
+          },
+          {
+            width: 100,
+            prop: 'weightUnit',
+            label: '重量单位',
+            slot: 'weightUnit',
+            align: 'center'
+          },
+          {
             width: 160,
             prop: 'pricingWay',
             label: '计价方式',
             slot: 'pricingWay',
             align: 'center',
             formatter: (row, column) => {
-              return row.pricingWay == 1 ? '按数量计费' : row.pricingWay == 2 ? '按重量计费':'';
-
+              return row.pricingWay == 1
+                ? '按数量计费'
+                : row.pricingWay == 2
+                ? '按重量计费'
+                : '';
             }
           },
-        {
-          width: 80,
-          prop: 'singlePrice',
-          label: '单价',
-          slot: 'singlePrice',
-          align: "center"
-        },
-        {
+          {
+            width: 80,
+            prop: 'singlePrice',
+            label: '单价',
+            slot: 'singlePrice',
+            align: 'center'
+          },
+          {
             width: 100,
             prop: 'taxRate',
             label: '税率',
+            formatter: (_row, _column, cellValue) => {
+              return _row.taxRate ? _row.taxRate + '%' : '';
+            },
             align: 'center'
           },
-        {
-          width: 100,
-          prop: 'discountSinglePrice',
-          label: '折让单价',
-          slot: 'discountSinglePrice',
-          align: "center",
-          formatter: (_row, _column, cellValue) => {
-            return _row.discountSinglePrice
-              ? Number(_row.discountSinglePrice).toFixed(2)
-              : '';
-          }
-        },
-        {
-          width: 80,
-          prop: 'totalPrice',
-          label: '合计',
-          slot: 'totalPrice',
-          align: "center"
-        },
-        {
-          width: 100,
-          prop: 'discountTotalPrice',
-          label: '折让合计',
-          slot: 'discountTotalPrice',
-          align: "center",
-          formatter: (_row, _column, cellValue) => {
-            return _row.discountTotalPrice
-              ? Number(_row.discountTotalPrice).toFixed(2)
-              : '';
-          }
-        },
+          {
+            width: 100,
+            prop: 'discountSinglePrice',
+            label: '折让单价',
+            slot: 'discountSinglePrice',
+            align: 'center',
+            formatter: (_row, _column, cellValue) => {
+              return _row.discountSinglePrice
+                ? Number(_row.discountSinglePrice).toFixed(2)
+                : '';
+            }
+          },
+          {
+            width: 80,
+            prop: 'totalPrice',
+            label: '合计',
+            slot: 'totalPrice',
+            align: 'center'
+          },
+          {
+            width: 100,
+            prop: 'discountTotalPrice',
+            label: '折让合计',
+            slot: 'discountTotalPrice',
+            align: 'center',
+            formatter: (_row, _column, cellValue) => {
+              return _row.discountTotalPrice
+                ? Number(_row.discountTotalPrice).toFixed(2)
+                : '';
+            }
+          },
 
-        // {
-        //   width: 80,
-        //   prop: 'deliveryDays',
-        //   label: '交期(天)',
-        //   slot: 'deliveryDays'
-        // },
-        // {
-        //   width: 160,
-        //   prop: 'deliveryDeadline',
-        //   label: '交期截止日期',
-        //   slot: 'deliveryDeadline',
-        //   show: this.isDeliveryDeadline
-        // },
-        {
-          minWidth: 140,
-          prop: 'customerExpectDeliveryDeadline',
-          label: '客户期望交期',
-          slot: 'customerExpectDeliveryDeadline',
-          headerSlot: 'headerCustomerExpectDeliveryDeadline',
-          align: "center"
-        },
-        {
-          minWidth: 140,
-          prop: 'produceDeliveryDeadline',
-          label: '生产交付交期',
-          slot: 'produceDeliveryDeadline',
-          align: "center"
-        },
-        {
-          width: 100,
-          prop: 'guaranteePeriod',
-          label: '质保期',
-          slot: 'guaranteePeriod',
-          formatter: (_row, _column, cellValue) => {
-            return (_row.guaranteePeriod || '') + _row.guaranteePeriodUnitName;
-          },
-          align: "center"
-        },
-        {
-          minWidth: 120,
-          prop: 'guaranteePeriodDeadline',
-          label: '质保截止日期',
-          align: "center"
-        },
-        {
-          minWidth: 200,
-          prop: 'customerReqFiles',
-          label: '客户需求',
-          slot: 'customerReqFiles',
-          align: "center"
-        },
-        {
-          width: 130,
-          prop: 'technicalAnswerName',
-          label: '技术答疑人',
-          slot: 'technicalAnswerName',
-          align: "center"
-        },
-        {
-          width: 220,
-          prop: 'technicalParams',
-          label: '技术参数',
-          slot: 'technicalParams',
-          align: "center"
-        },
-        {
-          width: 240,
-          prop: 'technicalDrawings',
-          label: '技术图纸',
-          slot: 'technicalDrawings',
-          align: "center"
-        },
-        {
-          width: 240,
-          prop: 'industryArtFiles',
-          label: '工艺附件',
-          slot: 'industryArtFiles',
-          align: "center"
-        },
-        {
-          width: 240,
-          prop: 'otherFiles',
-          label: '其他附件',
-          slot: 'otherFiles',
-          align: "center"
-        },
-        {
-          width: 220,
-          prop: 'remark',
-          label: '备注',
-          slot: 'remark',
-          align: "center"
-        },
-        {
-          columnKey: 'action',
-          label: '操作',
-          width: 120,
-          align: 'center',
-          resizable: false,
-          slot: 'action',
-          fixed: 'right',
-          showOverflowTooltip: true
-        }
-      ]
-    };
-  },
-  created() {
-    getWarehouseList().then((res) => {
-      this.warehouseList = res;
-    });
-  },
-  computed: {
-    canHandl() {
-      return this.form.datasource.length;
-    },
-    contractId() {
-      return this.$store.state.order.contractId;
-    }
-  },
-  methods: {
-    downloadFile(file) {
-      getFile({objectName: file.storePath}, file.name);
+          // {
+          //   width: 80,
+          //   prop: 'deliveryDays',
+          //   label: '交期(天)',
+          //   slot: 'deliveryDays'
+          // },
+          // {
+          //   width: 160,
+          //   prop: 'deliveryDeadline',
+          //   label: '交期截止日期',
+          //   slot: 'deliveryDeadline',
+          //   show: this.isDeliveryDeadline
+          // },
+          {
+            minWidth: 140,
+            prop: 'customerExpectDeliveryDeadline',
+            label: '客户期望交期',
+            slot: 'customerExpectDeliveryDeadline',
+            headerSlot: 'headerCustomerExpectDeliveryDeadline',
+            align: 'center'
+          },
+          {
+            minWidth: 140,
+            prop: 'produceDeliveryDeadline',
+            label: '生产交付交期',
+            slot: 'produceDeliveryDeadline',
+            align: 'center'
+          },
+          {
+            width: 100,
+            prop: 'guaranteePeriod',
+            label: '质保期',
+            slot: 'guaranteePeriod',
+            formatter: (_row, _column, cellValue) => {
+              return (
+                (_row.guaranteePeriod || '') + _row.guaranteePeriodUnitName
+              );
+            },
+            align: 'center'
+          },
+          {
+            minWidth: 120,
+            prop: 'guaranteePeriodDeadline',
+            label: '质保截止日期',
+            align: 'center'
+          },
+          {
+            minWidth: 200,
+            prop: 'customerReqFiles',
+            label: '客户需求',
+            slot: 'customerReqFiles',
+            align: 'center'
+          },
+          {
+            width: 130,
+            prop: 'technicalAnswerName',
+            label: '技术答疑人',
+            slot: 'technicalAnswerName',
+            align: 'center'
+          },
+          {
+            width: 220,
+            prop: 'technicalParams',
+            label: '技术参数',
+            slot: 'technicalParams',
+            align: 'center'
+          },
+          {
+            width: 240,
+            prop: 'technicalDrawings',
+            label: '技术图纸',
+            slot: 'technicalDrawings',
+            align: 'center'
+          },
+          {
+            width: 240,
+            prop: 'industryArtFiles',
+            label: '工艺附件',
+            slot: 'industryArtFiles',
+            align: 'center'
+          },
+          {
+            width: 240,
+            prop: 'otherFiles',
+            label: '其他附件',
+            slot: 'otherFiles',
+            align: 'center'
+          },
+          {
+            width: 220,
+            prop: 'remark',
+            label: '备注',
+            slot: 'remark',
+            align: 'center'
+          },
+          {
+            columnKey: 'action',
+            label: '操作',
+            width: 120,
+            align: 'center',
+            resizable: false,
+            slot: 'action',
+            fixed: 'right',
+            showOverflowTooltip: true
+          }
+        ]
+      };
     },
-    async warehouseChange(index, row) {
-      let warehouseIds = this.form.datasource.filter((item, i) => row.productCode == item.productCode && index != i).map((item) => item.warehouseId) || [];
-      const data = this.warehouseList.find((item) => item.id == row.warehouseId);
-      if (warehouseIds.length > 0 && warehouseIds.includes(row.warehouseId)) {
-        row.warehouseId = '';
-        return this.$message.error('同一个产品不能选择相同的仓库');
-      }
-      this.$set(this.form.datasource[index], 'warehouseName', data.name);
-      this.$set(this.form.datasource[index], 'warehouseCode', data.code);
-      const warehouseOutStock = await getWarehouseOutStock({
-        warehouseId: data.id,
-        code: row.productCode
+    created() {
+      getWarehouseList().then((res) => {
+        this.warehouseList = res;
       });
-      this.$set(
-        this.form.datasource[index],
-        'warehouseNum',
-        warehouseOutStock
-      );
-    },
-
-    //修改数量更新合计
-    changeNum(val, row, index) {
-      console.log(val, row, index);
-      this.$set(this.form.datasource[index], 'receiveTotalWeight', val ? val * row.singleWeight : '');
-      this.$set(this.form.datasource[index], 'totalPrice', this.getTotalPrice(row).toFixed(2));
-      this.$set(this.form.datasource[index], 'discountTotalPrice', this.getDiscountTotalPrice(row).toFixed(2));
-      this.$refs.table.reload()
     },
-    getTotalPrice(row) {
-      let num = 0
-      if(row.pricingWay==1){
-        num = Number(row.singlePrice) * Number(row.totalCount)
-      }
-      if(row.pricingWay==2){
-        num = Number(row.singlePrice) * Number(row.totalCount) * Number(row.singleWeight)
-      }
-      return num
-    
-    },
-    getDiscountTotalPrice(row) {
-      let num = 0
-      if(row.pricingWay==1){
-        num = Number(row.discountSinglePrice) * Number(row.totalCount)
-      }
-      if(row.pricingWay==2){
-        num = Number(row.discountSinglePrice) * Number(row.totalCount) * Number(row.singleWeight)
+    computed: {
+      canHandl() {
+        return this.form.datasource.length;
+      },
+      contractId() {
+        return this.$store.state.order.contractId;
       }
-     
-      return num
-    },
-    //选择产品回调
-    changeParent(obj, idx) {
-      obj.orderTotalCount = obj.totalCount;
-      obj.id = '';
-      obj['pricingWay']=obj.pricingWay||this.pricingWay
-      this.$set(
-        this.form.datasource,
-        this.form.datasource.length,
-        copyObj(obj)
-      );
     },
-    validateTotalCount(row) {
-      return (rule, value, callback) => {
-        if (isNaN(value) || Number(value) <= 0) {
-          callback(new Error('请输入大于0的数字'));
-        } else if ((Number(value)+Number(row.receiveTotalCount)) > row.orderTotalCount) {
-          callback(new Error('输入的数字不能大于最大发货值'));
-        } else {
-          callback();
+    methods: {
+      downloadFile(file) {
+        getFile({ objectName: file.storePath }, file.name);
+      },
+      async warehouseChange(index, row) {
+        let warehouseIds =
+          this.form.datasource
+            .filter(
+              (item, i) => row.productCode == item.productCode && index != i
+            )
+            .map((item) => item.warehouseId) || [];
+        const data = this.warehouseList.find(
+          (item) => item.id == row.warehouseId
+        );
+        if (warehouseIds.length > 0 && warehouseIds.includes(row.warehouseId)) {
+          row.warehouseId = '';
+          return this.$message.error('同一个产品不能选择相同的仓库');
+        }
+        this.$set(this.form.datasource[index], 'warehouseName', data.name);
+        this.$set(this.form.datasource[index], 'warehouseCode', data.code);
+        const warehouseOutStock = await getWarehouseOutStock({
+          warehouseId: data.id,
+          code: row.productCode
+        });
+        this.$set(
+          this.form.datasource[index],
+          'warehouseNum',
+          warehouseOutStock
+        );
+      },
+
+      //修改数量更新合计
+      changeNum(val, row, index) {
+        console.log(val, row, index);
+        this.$set(
+          this.form.datasource[index],
+          'receiveTotalWeight',
+          val ? val * row.singleWeight : ''
+        );
+        this.$set(
+          this.form.datasource[index],
+          'totalPrice',
+          this.getTotalPrice(row).toFixed(2)
+        );
+        this.$set(
+          this.form.datasource[index],
+          'discountTotalPrice',
+          this.getDiscountTotalPrice(row).toFixed(2)
+        );
+        this.$refs.table.reload();
+      },
+      getTotalPrice(row) {
+        let num = 0;
+        if (row.pricingWay == 1) {
+          num = Number(row.singlePrice) * Number(row.totalCount);
+        }
+        if (row.pricingWay == 2) {
+          num =
+            Number(row.singlePrice) *
+            Number(row.totalCount) *
+            Number(row.singleWeight);
+        }
+        return num;
+      },
+      getDiscountTotalPrice(row) {
+        let num = 0;
+        if (row.pricingWay == 1) {
+          num = Number(row.discountSinglePrice) * Number(row.totalCount);
+        }
+        if (row.pricingWay == 2) {
+          num =
+            Number(row.discountSinglePrice) *
+            Number(row.totalCount) *
+            Number(row.singleWeight);
         }
-      };
-    },
-    // 返回列表数据
-    getTableValue() {
-      let comitDatasource = this.form.datasource;
-      if (comitDatasource.length === 0) return [];
-      comitDatasource.forEach(async (v) => {
-        v.totalCount = Number(v.totalCount);
-        item['pricingWay']=item.pricingWay||this.pricingWay
-        v.technicalDrawings = Array.isArray(v.technicalDrawings) ? v.technicalDrawings : [];
-        v.customerReqFiles = Array.isArray(v.customerReqFiles) ? v.customerReqFiles : [];
-        v.industryArtFiles = v.industryArtFiles || [];
-        v.otherFiles = v.otherFiles || [];
-        // v.ownerId = this.warehouseList.find(item => v.warehouseId == item.id)?.ownerId 获取仓库人员id
-      });
-      return comitDatasource;
-    },
-    getPrice() {
-      return [this.allPrice];
-    },
 
-    //修改回显
-    putTableValue(data) {
-      if (data) {
-        this.form.datasource = data;
-        data.forEach(async (item, index) => {
-          if (item.warehouseId) {
-            this.$set(this.form.datasource[index], 'warehouseNum',
-              await getWarehouseOutStock({
-                warehouseId: item.warehouseId,
-                code: item.productCode
-              })
-            );
+        return num;
+      },
+      //选择产品回调
+      changeParent(obj, idx) {
+        obj.orderTotalCount = obj.totalCount;
+        obj.id = '';
+        obj['pricingWay'] = obj.pricingWay || this.pricingWay;
+        this.$set(
+          this.form.datasource,
+          this.form.datasource.length,
+          copyObj(obj)
+        );
+      },
+      validateTotalCount(row) {
+        return (rule, value, callback) => {
+          if (isNaN(value) || Number(value) <= 0) {
+            callback(new Error('请输入大于0的数字'));
+          } else if (
+            Number(value) + Number(row.receiveTotalCount) >
+            row.orderTotalCount
+          ) {
+            callback(new Error('输入的数字不能大于最大发货值'));
+          } else {
+            callback();
           }
-          //发货数量因已发货数量被修改需要重新计算金额,总重
-          this.changeNum(item.totalCount,item,index)
+        };
+      },
+      // 返回列表数据
+      getTableValue() {
+        let comitDatasource = this.form.datasource;
+        if (comitDatasource.length === 0) return [];
+        comitDatasource.forEach(async (v) => {
+          v.totalCount = Number(v.totalCount);
+          item['pricingWay'] = item.pricingWay || this.pricingWay;
+          v.technicalDrawings = Array.isArray(v.technicalDrawings)
+            ? v.technicalDrawings
+            : [];
+          v.customerReqFiles = Array.isArray(v.customerReqFiles)
+            ? v.customerReqFiles
+            : [];
+          v.industryArtFiles = v.industryArtFiles || [];
+          v.otherFiles = v.otherFiles || [];
+          // v.ownerId = this.warehouseList.find(item => v.warehouseId == item.id)?.ownerId 获取仓库人员id
         });
-      }
-    },
-    //选择产品
-    handParent(row, index) {
-      let item = {
-        id: row.productCode
-      };
-      this.$refs.productListRef.open(item, index);
-    },
-    //选择技术人回调
-    changeAnswer(obj, idx) {
-      this.$set(this.form.datasource[idx], 'technicalAnswerId', obj.id);
-      this.$set(this.form.datasource[idx], 'technicalAnswerName', obj.name);
-    },
-    handHead(row, index) {
-      let item = {
-        id: row.technicalAnswerId
-      };
-      this.$refs.headRef.open(item, index);
-    },
-
-    remove(i) {
-      this.form.datasource.splice(i, 1);
-      this.setSort();
-    },
-    // 清空表格
-    restTable() {
-      this.form.datasource = [];
-    },
-    // 重新排序
-    setSort() {
-      this.form.datasource.forEach((n, index) => {
-        n.key = index + 1;
-      });
-    },
-    // 添加
-    handlAdd() {
-      if (!this.orderId) return this.$message.error('请先选择订单');
-      this.$refs.productListRef.open(this.form.datasource);
-    },
+        return comitDatasource;
+      },
+      getPrice() {
+        return [this.allPrice];
+      },
 
-    validateForm(callback) {
-      //开始表单校验
-      this.$refs.form.validate((valid,obj) => {
-        if(obj){
-          let messages= Object.keys(obj).map(key=>obj[key][0])
-          if(messages.length>0){
-            this.$message.warning(messages[0].message);
+      //修改回显
+      putTableValue(data) {
+        if (data) {
+          this.form.datasource = data;
+          data.forEach(async (item, index) => {
+            if (item.warehouseId) {
+              this.$set(
+                this.form.datasource[index],
+                'warehouseNum',
+                await getWarehouseOutStock({
+                  warehouseId: item.warehouseId,
+                  code: item.productCode
+                })
+              );
+            }
+            //发货数量因已发货数量被修改需要重新计算金额,总重
+            this.changeNum(item.totalCount, item, index);
+          });
+        }
+      },
+      //选择产品
+      handParent(row, index) {
+        let item = {
+          id: row.productCode
+        };
+        this.$refs.productListRef.open(item, index);
+      },
+      //选择技术人回调
+      changeAnswer(obj, idx) {
+        this.$set(this.form.datasource[idx], 'technicalAnswerId', obj.id);
+        this.$set(this.form.datasource[idx], 'technicalAnswerName', obj.name);
+      },
+      handHead(row, index) {
+        let item = {
+          id: row.technicalAnswerId
+        };
+        this.$refs.headRef.open(item, index);
+      },
 
-          }
+      remove(i) {
+        this.form.datasource.splice(i, 1);
+        this.setSort();
+      },
+      // 清空表格
+      restTable() {
+        this.form.datasource = [];
+      },
+      // 重新排序
+      setSort() {
+        this.form.datasource.forEach((n, index) => {
+          n.key = index + 1;
+        });
+      },
+      // 添加
+      handlAdd() {
+        if (!this.orderId) return this.$message.error('请先选择订单');
+        this.$refs.productListRef.open(this.form.datasource);
+      },
 
+      validateForm(callback) {
+        //开始表单校验
+        this.$refs.form.validate((valid, obj) => {
+          if (obj) {
+            let messages = Object.keys(obj).map((key) => obj[key][0]);
+            if (messages.length > 0) {
+              this.$message.warning(messages[0].message);
+            }
           }
-        callback(valid);
-      });
+          callback(valid);
+        });
+      }
     }
-  }
-};
+  };
 </script>
 <style lang="scss" scoped>
-.headbox {
-  display: flex;
-  justify-content: space-between;
-  align-items: center;
+  .headbox {
+    display: flex;
+    justify-content: space-between;
+    align-items: center;
 
-  .amount {
-    font-size: 14px;
-    font-weight: bold;
-    padding-right: 30px;
+    .amount {
+      font-size: 14px;
+      font-weight: bold;
+      padding-right: 30px;
+    }
   }
-}
 
-.time-form .el-form-item {
-  margin-bottom: 0 !important;
-}
+  .time-form .el-form-item {
+    margin-bottom: 0 !important;
+  }
 
-::v-deep .period {
-  display: flex;
+  ::v-deep .period {
+    display: flex;
 
-  .borderleftnone {
-    .el-input--medium .el-input__inner {
-      border-top-right-radius: 0;
-      border-bottom-right-radius: 0;
+    .borderleftnone {
+      .el-input--medium .el-input__inner {
+        border-top-right-radius: 0;
+        border-bottom-right-radius: 0;
+      }
     }
-  }
 
-  .borderrightnone {
-    .el-input--medium .el-input__inner {
-      border-top-left-radius: 0;
-      border-bottom-left-radius: 0;
+    .borderrightnone {
+      .el-input--medium .el-input__inner {
+        border-top-left-radius: 0;
+        border-bottom-left-radius: 0;
+      }
     }
   }
-}
 
-::v-deep .time-form tbody > tr:hover > td {
-  background-color: transparent !important;
-}
+  ::v-deep .time-form tbody > tr:hover > td {
+    background-color: transparent !important;
+  }
 
-::v-deep .time-form .el-table tr {
-  background-color: #ffffff;
-}
+  ::v-deep .time-form .el-table tr {
+    background-color: #ffffff;
+  }
 
-.pricebox {
-  display: flex;
-  justify-content: flex-start;
-  align-items: center;
-  font-weight: bold;
-}
+  .pricebox {
+    display: flex;
+    justify-content: flex-start;
+    align-items: center;
+    font-weight: bold;
+  }
 </style>

+ 6 - 6
src/views/saleManage/saleOrder/exceptionManagement/exceptionList/index.vue

@@ -189,7 +189,7 @@
           id: ''
         },
         selection: [],
-        userOptions: [],
+        // userOptions: [],
         viewId: '',
         qualityInspector: '',
         cacheKeyUrl:'eos-7a45afd7-saleManage-exceptionList',
@@ -311,11 +311,11 @@
     },
     created() {
       this.requestDict('异常类型');
-      this.userOptions = [];
-      listAllUserBind().then((data) => {
-        return;
-        this.userOptions.push(...data);
-      });
+      // this.userOptions = [];
+      // listAllUserBind().then((data) => {
+      //   return;
+      //   this.userOptions.push(...data);
+      // });
     },
     filters: {},
     methods: {

+ 6 - 1
src/views/saleManage/saleOrder/index.vue

@@ -192,6 +192,9 @@
         <div v-if="activeComp == 'exceptionList'">
           <exceptionList></exceptionList>
         </div>
+        <div v-if="activeComp == 'trayList'">
+         <palletManagement></palletManagement>
+        </div>
       </div>
     </el-card>
 
@@ -256,6 +259,7 @@
   import accountstatement from './accountstatement/index.vue';
   import customerReturnOrder from './customerReturnOrder/index.vue';
   import returnGoods from './returnGoods/index.vue';
+  import palletManagement from './palletManagement/index.vue';
   import addInvoiceManage from '@/views/financialManage/invoiceManage/components/addOrEditDialog.vue';
 
   import {
@@ -290,7 +294,7 @@
       entrustedReceive,
       invoiceConfirm,
       drawer,
-      exceptionList,addInvoiceManage
+      exceptionList,addInvoiceManage,palletManagement
     },
     //客户管理数据
     props: {
@@ -309,6 +313,7 @@
           { key: 'entrustedReceive', name: '受托收货单' },
           { key: 'invoice', name: '发货单' },
           { key: 'invoiceConfirm', name: '收货确认单' },
+          { key: 'trayList', name: '托盘清单' },
           { key: 'exceptionList', name: '异常列表' },
           { key: 'returnorder', name: '退货单' },
           { key: 'customerReturnOrder', name: '退货处理单' },

+ 3 - 1
src/views/saleManage/saleOrder/invoice/components/addInvoiceDialog.vue

@@ -352,6 +352,7 @@
               payAmount,
               projectName,
               projectId,
+              projectCode,
               totalPrice,
               receiveAddress
             } = data;
@@ -376,7 +377,8 @@
               totalPrice,
               payAmount,
               projectName,
-              projectId
+              projectId,
+              projectSn:projectCode
             });
             productList.forEach((item, index) => {
               item['tempId'] = index;

+ 5 - 1
src/views/saleManage/saleOrder/invoice/components/detailDialog.vue

@@ -500,7 +500,11 @@
             width: 160,
             prop: 'taxRate',
             label: '税率',
-            slot: 'taxRate',
+            formatter: (_row, _column, cellValue) => {
+              return _row.taxRate
+                ? _row.taxRate+'%'
+                : '';
+            },
             align: 'center'
           },
           {

+ 5 - 1
src/views/saleManage/saleOrder/invoice/components/inventoryTable.vue

@@ -605,7 +605,11 @@
             width: 160,
             prop: 'taxRate',
             label: '税率',
-            slot: 'taxRate',
+            formatter: (_row, _column, cellValue) => {
+              return _row.taxRate
+                ? _row.taxRate+'%'
+                : '';
+            },
             align: 'center'
           },
           {

+ 19 - 15
src/views/saleManage/saleOrder/invoice/components/palletTable.vue

@@ -1,5 +1,5 @@
 <template>
-  <el-form ref="form" :model="form" >
+  <el-form ref="form" :model="form">
     <ele-pro-table
       ref="table"
       :needPage="false"
@@ -235,7 +235,7 @@
             slot: 'productCode',
             align: 'center'
           },
- 
+
           {
             minWidth: 160,
             prop: 'productBrand',
@@ -300,17 +300,21 @@
       //选择调
       changeParent(obj = []) {
         let list = _.cloneDeep(obj);
-        this.form.datasource.push(...list);
-        this.totalCountChange()
+
+        this.form.datasource.push(
+          ...list.map((item) => {
+            item['warehouseNum'] = item.measureQuantity;
+            item['provenance'] = [];
+            return item;
+          })
+        );
+
+        this.totalCountChange();
       },
       validateTotalCount(row) {
         return (rule, value, callback) => {
           if (isNaN(value) || Number(value) <= 0) {
-            // this.$message.error('请输入大于0的数');
             callback(new Error('请输入大于0的数字'));
-          } else if (Number(value) > row.warehouseNum) {
-            // this.$message.error('输入的数字不能大于仓库物品数');
-            // callback(new Error('输入的数字不能大于仓库物品数'));
           } else {
             callback();
           }
@@ -326,10 +330,10 @@
         const data = this.warehouseList.find(
           (item) => item.id == row.warehouseId
         );
-        if (warehouseIds.length > 0 && warehouseIds.includes(row.warehouseId)) {
-          row.warehouseId = '';
-          return this.$message.error('只能选择同产品仓库的托盘');
-        }
+        // if (warehouseIds.length > 0 && warehouseIds.includes(row.warehouseId)) {
+        //   row.warehouseId = '';
+        //   return this.$message.error('只能选择同产品仓库的托盘');
+        // }
 
         this.$set(this.form.datasource[index], 'warehouseName', data.id);
         this.$set(this.form.datasource[index], 'warehouseCode', data.code);
@@ -357,7 +361,7 @@
         this.form.datasource.forEach((item) => {
           num += Number(item.totalCount);
         });
-        this.$emit('totalCountChange',num);
+        this.$emit('totalCountChange', num);
       },
       //修改回显
       putTableValue(data = []) {
@@ -381,7 +385,7 @@
       remove(i) {
         this.form.datasource.splice(i, 1);
         this.setSort();
-        this.totalCountChange()
+        this.totalCountChange();
       },
 
       // 重新排序
@@ -400,7 +404,7 @@
         this.$refs.form.validate((valid) => {
           callback(valid);
         });
-        callback(true)
+        callback(true);
       }
     }
   };

+ 169 - 323
src/views/saleManage/saleOrder/invoiceConfirm/components/addInvoiceDialog.vue

@@ -39,18 +39,10 @@
         <el-col :span="12">
           <el-form-item prop="repliedFiles" label="回执附件">
             <fileMain v-model="form.repliedFiles"></fileMain>
-            <!--            <fileUpload-->
-            <!--              v-model="form.repliedFiles"-->
-            <!--              module="main"-->
-            <!--              :showLib="false"-->
-            <!--              :limit="10"-->
-            <!--            />-->
           </el-form-item>
         </el-col>
       </el-row>
-      <!--      <template v-if="form.sendNo">-->
-      <!--        -->
-      <!--      </template>-->
+
       <headerTitle title="发货信息"></headerTitle>
 
       <el-row :gutter="12">
@@ -139,58 +131,41 @@
           row-key="id"
         >
           <template v-slot:isException="scope">
-              <el-select v-model="scope.row.isException" placeholder="请选择">
-                <el-option
-                  v-for="item in options"
-                  :key="item.value"
-                  :label="item.label"
-                  :value="item.value"
-                >
-                </el-option>
-              </el-select>
+            <el-select v-model="scope.row.isException" placeholder="请选择">
+              <el-option
+                v-for="item in options"
+                :key="item.value"
+                :label="item.label"
+                :value="item.value"
+              >
+              </el-option>
+            </el-select>
           </template>
-          <!-- <template v-slot:action="{ $index }">
-            <el-popconfirm
-              class="ele-action"
-              title="确定要删除吗?"
-              @confirm="remove($index)"
-            >
-              <template v-slot:reference>
-                <el-link type="danger" :underline="false" icon="el-icon-delete">
-                  删除
-                </el-link>
-              </template>
-            </el-popconfirm>
-          </template> -->
         </ele-pro-table>
       </el-tab-pane>
 
-      <!-- <el-tab-pane label="原产品清单" name="first1">
+      <el-tab-pane label="托盘清单" name="second">
+        <!-- <palletTable ref="palletTableRef" type="view"></palletTable> -->
         <ele-pro-table
           ref="table"
           :needPage="false"
-          :columns="competAnalysisListcolumns"
+          :columns="trayListColumns"
           :toolkit="[]"
-          :datasource="productList"
+          :datasource="trayListData"
           row-key="id"
         >
-          <template v-slot:technicalDrawings="{ row }">
-            <div v-if="row.technicalDrawings && row.technicalDrawings?.length">
-              <el-link
-                v-for="link in row.technicalDrawings"
-                :key="link.id"
-                type="primary"
-                :underline="false"
-                @click="downloadFile(link)"
+          <template v-slot:type="scope">
+            <el-select v-model="scope.row.type" placeholder="请选择">
+              <el-option
+                v-for="item in options1"
+                :key="item.value"
+                :label="item.label"
+                :value="item.value"
               >
-                {{ link.name }}
-              </el-link>
-            </div>
+              </el-option>
+            </el-select>
           </template>
         </ele-pro-table>
-      </el-tab-pane> -->
-      <el-tab-pane label="托盘清单" name="second">
-        <palletTable ref="palletTableRef" type="view"></palletTable>
       </el-tab-pane>
       <el-tab-pane label="装载车叉车信息" name="third">
         <stowageTable ref="stowageTableRef" dialogType="view"></stowageTable>
@@ -253,7 +228,7 @@
   import sendListDialog from './sendListDialog.vue';
   import { copyObj } from '@/utils/util';
 
-  import PalletTable from '@/views/saleManage/saleOrder/invoice/components/palletTable.vue';
+  // import PalletTable from '@/views/saleManage/saleOrder/invoice/components/palletTable.vue';
   import fileMain from '@/components/addDoc/index.vue';
   import processSubmitDialog from '@/BIZComponents/processSubmitDialog/processSubmitDialog.vue';
   import getDynamicsColumns from '@/mixins/getDynamicsColumns';
@@ -270,7 +245,7 @@
     components: {
       processSubmitDialog,
       fileMain,
-      PalletTable,
+      // PalletTable,
       sendListDialog,
       taskInfoTable,
       fileUpload,
@@ -322,13 +297,15 @@
       };
 
       return {
-        
         fullscreen: false,
         outboundDetailsDialogFlag: false,
         payWayOptions: [],
         delDetailIds: [],
         linkNameOptions: [],
         productList: [],
+        trayList: [],
+        trayListData: [],
+
         acceptUnpackoptions,
         visible: false,
         entrustedReceiveDialogFlag: false,
@@ -337,18 +314,14 @@
         row: {},
         activeName: 'first',
         formDef,
-        options:[
-          {value:0,label:'已收货'},
-          {value:1,label:'未收货'},
+        options: [
+          { value: 0, label: '已收货' },
+          { value: 1, label: '未收货' }
+        ],
+        options1: [
+          { value: 0, label: '未回收' },
+          { value: 1, label: '已回收' }
         ],
-        qualityStatus: {
-          0: '未质检',
-          1: '已质检'
-        }, // 质检状态 0未检 1已检
-        qualityResults: {
-          1: '合格',
-          2: '不合格'
-        }, // 质检结果 1合格 2不合格
         columns: [
           {
             width: 45,
@@ -451,8 +424,11 @@
             slot: 'pricingWay',
             align: 'center',
             formatter: (row, column) => {
-              return row.pricingWay == 1 ? '按数量计费' : row.pricingWay == 2 ? '按重量计费':'';
-
+              return row.pricingWay == 1
+                ? '按数量计费'
+                : row.pricingWay == 2
+                ? '按重量计费'
+                : '';
             }
           },
           {
@@ -493,10 +469,9 @@
             minWidth: 200,
             showOverflowTooltip: true,
             formatter: (row, column) => {
-       
               return row.provenance && row.provenance.length
                 ? row.provenance
-                    .map((item) => this.getDictValue('产地', item ))
+                    .map((item) => this.getDictValue('产地', item))
                     .join(',')
                 : '';
             }
@@ -517,8 +492,7 @@
             fixed: 'right'
           }
         ],
-
-        childrenColumns: [
+        trayListColumns: [
           {
             width: 45,
             type: 'index',
@@ -527,281 +501,127 @@
             fixed: 'left'
           },
           {
-            minWidth: 100,
-            prop: 'code',
+            minWidth: 160,
+            prop: 'productCode',
             label: '编码',
+            showOverflowTooltip: true,
             align: 'center'
           },
           {
-            minWidth: 140,
-            prop: 'barcodes',
-            label: '发货条码',
-            align: 'center'
-          },
-          {
-            minWidth: 100,
-            prop: 'engrave',
-            label: '刻码',
-            align: 'center'
-          }
-        ],
-        form: copyObj(formDef),
-        tableBankData: [],
-        tableLinkData: [],
-        // 组织机构树形结构数据
-        groupTreeData: [],
-        groupData: [],
-        rules: {
-          sendNo: [
-            { required: true, message: '请选择发货单', trigger: 'change' }
-          ],
-          repliedFiles: [
-            { required: true, message: '请上传回执附件', trigger: 'change' }
-          ]
-        },
-
-        // 提交状态
-        loading: false,
-        // 是否是修改
-        isUpdate: false,
-        businessId: ''
-      };
-    },
-    created(){
-      this.requestDict('产地');
-    },
-    computed: {
-      competAnalysisListcolumns() {
-        return [
-          {
-            width: 45,
-            type: 'index',
-            columnKey: 'index',
-            align: 'center',
-            fixed: 'left'
-          },
-          {
-            width: 200,
+            minWidth: 120,
             prop: 'productName',
             label: '名称',
-            slot: 'productName',
-            align: 'center'
-          },
-          {
-            width: 120,
-            prop: 'productCode',
-            label: '编码',
-            slot: 'productCode',
-            align: 'center'
-          },
-          {
-            width: 200,
-            prop: 'productCategoryName',
-            label: '类型',
-            slot: 'productCategoryName',
-            align: 'center'
-          },
-          {
-            width: 160,
-            prop: 'productBrand',
-            label: '牌号',
-            slot: 'productBrand',
+            showOverflowTooltip: true,
             align: 'center'
           },
+
           {
-            width: 160,
+            minWidth: 160,
             prop: 'batchNo',
             label: '批次号',
-            slot: 'batchNo',
+            showOverflowTooltip: true,
             align: 'center'
           },
           {
-            width: 120,
-            prop: 'modelType',
-            label: '型号',
-            slot: 'modelType',
+            minWidth: 160,
+            prop: 'barcodes',
+            label: '发货条码',
+            showOverflowTooltip: true,
             align: 'center'
           },
           {
-            width: 120,
-            prop: 'specification',
-            label: '规格',
-            slot: 'specification',
+            minWidth: 120,
+            prop: 'materielDesignation',
+            label: '物料代号',
+            showOverflowTooltip: true,
             align: 'center'
           },
-
           {
-            width: 200,
-            prop: 'customerMark',
+            minWidth: 120,
+            prop: 'clientCode',
             label: '客户代号',
-            slot: 'customerMark',
-            align: 'center'
-          },
-          {
-            width: 200,
-            prop: 'warehouseName',
-            label: '仓库名称',
-            slot: 'warehouseName',
-            align: 'center'
-          },
-          // {
-          //   width: 100,
-          //   prop: 'stockLedger',
-          //   label: '发货明细',
-          //   slot: 'stockLedger',
-          //   align: 'center'
-          // },
-
-          {
-            width: 120,
-            prop: 'sendTotalCount',
-            label: '发货数量',
-            slot: 'sendTotalCount',
-            align: 'center'
-          },
-          // {
-          //   width: 120,
-          //   prop: 'totalCount',
-          //   label: '实收数量',
-          //   slot: 'totalCount',
-          //   align: 'center'
-          // },
-          {
-            width: 120,
-            prop: 'measuringUnit',
-            label: '计量单位',
-            slot: 'measuringUnit',
-            align: 'center'
-          },
-          {
-            width: 120,
-            prop: 'singleWeight',
-            label: '单重',
-            slot: 'singleWeight',
+            showOverflowTooltip: true,
             align: 'center'
           },
           {
-            width: 100,
-            prop: 'receiveTotalWeight',
-            label: '收货总重',
-            slot: 'receiveTotalWeight',
+            minWidth: 120,
+            prop: 'engrave',
+            label: '刻码',
+            showOverflowTooltip: true,
             align: 'center'
           },
           {
-            width: 200,
-            prop: 'sendTotalWeight',
-            label: '发货总重',
-            slot: 'sendTotalWeight',
+            minWidth: 160,
+            prop: 'packageNo',
             align: 'center',
-            headerSlot: 'headerTotalCount'
-          },
-
-          {
-            width: 100,
-            prop: 'increaseTotalWeight',
-            label: '增重重量',
-            slot: 'increaseTotalWeight',
-            align: 'center'
-          },
-          {
-            width: 100,
-            prop: 'weightUnit',
-            label: '重量单位',
-            slot: 'weightUnit',
-            align: 'center'
-          },
-
-
-          {
-            width: 160,
-            prop: 'singlePrice',
-            label: '单价',
-            slot: 'singlePrice',
-            align: 'center'
-          },
-          {
-            width: 160,
-            prop: 'discountSinglePrice',
-            label: '折后单价',
-            slot: 'discountSinglePrice',
-            align: 'center'
+            label: '包装编码',
+            showOverflowTooltip: true
           },
           {
-            width: 120,
-            prop: 'totalPrice',
-            label: '合计',
-            slot: 'totalPrice',
-            align: 'center'
+            minWidth: 100,
+            prop: 'packingQuantity',
+            align: 'center',
+            label: '包装数量',
+            showOverflowTooltip: true
           },
           {
-            width: 120,
-            prop: 'discountTotalPrice',
-            label: '折后合计',
-            slot: 'discountTotalPrice',
-            align: 'center'
+            minWidth: 120,
+            prop: 'packingUnit',
+            align: 'center',
+            label: '包装单位',
+            showOverflowTooltip: true
           },
-          ...this.dynamicsColumns,
           {
-            width: 120,
-            prop: 'deliveryDays',
-            label: '交期(天)',
-            slot: 'deliveryDays',
+            minWidth: 100,
+            prop: 'totalCount',
+            label: '计量数量',
+            showOverflowTooltip: true,
             align: 'center'
           },
           {
-            width: 200,
-            prop: 'guaranteePeriod',
-            label: '质保期',
-            slot: 'guaranteePeriod',
-            formatter: (_row, _column, cellValue) => {
-              return (
-                (_row.guaranteePeriod || '') + _row.guaranteePeriodUnitName
-              );
-            },
+            minWidth: 150,
+            prop: 'measuringUnit',
+            label: '计量单位',
+            showOverflowTooltip: true,
             align: 'center'
           },
-          // {
-          //   width: 120,
-          //   prop: 'guaranteePeriodUnitCode',
-          //   label: '',
-          //   slot: 'guaranteePeriodUnitCode'
-          // },
           {
             width: 120,
-            prop: 'technicalAnswerName',
-            label: '技术答疑人',
-            slot: 'technicalAnswerName',
-            align: 'center'
-          },
-          {
-            width: 220,
-            prop: 'technicalParams',
-            label: '技术参数',
-            slot: 'technicalParams',
-            align: 'center'
-          },
-          {
-            width: 240,
-            prop: 'technicalDrawings',
-            label: '技术图纸',
-            slot: 'technicalDrawings',
-            formatter: (_row, _column, cellValue) => {
-              return (
-                (_row.guaranteePeriod || '') + _row.guaranteePeriodUnitName
-              );
-            },
-            align: 'center'
-          },
-          // {
-          //   width: 220,
-          //   prop: 'remark',
-          //   label: '备注',
-          //   slot: 'remark',
-          //   align: 'center'
-          // }
-        ];
-      }
+            slot: 'type',
+            prop: 'type',
+            label: '回收状态',
+            align: 'center',
+            fixed: 'right'
+          }
+        ],
+        form: copyObj(formDef),
+        tableBankData: [],
+        tableLinkData: [],
+        oldId: '',
+        oldDocNo:'',
+        // 组织机构树形结构数据
+        groupTreeData: [],
+        groupData: [],
+        rules: {
+          sendNo: [
+            { required: true, message: '请选择发货单', trigger: 'change' }
+          ],
+          repliedFiles: [
+            { required: true, message: '请上传回执附件', trigger: 'change' }
+          ]
+        },
+
+        // 提交状态
+        loading: false,
+        // 是否是修改
+        isUpdate: false,
+        businessId: ''
+      };
     },
+    created() {
+      this.requestDict('产地');
+    },
+    computed: {},
 
     methods: {
       //选择订单回调
@@ -816,24 +636,27 @@
       async getSaleOrderDetail(id) {
         this.loading = true;
         const data = await getSendSaleOrderrecordDetailSplit(id);
+
         this.loading = false;
         if (data) {
           this.form = data;
-          this.form.sendId = this.form.id;
-          this.form.sendNo = this.form.docNo;
-          this.form.docNo = '';
-          this.form.id = '';
+          this.form.sendId = data.id;
+          this.form.sendNo = data.docNo;
+          this.form.docNo = this.oldDocNo;
+          this.form.id = this.oldId;
+          this.form.reviewStatus=0
+          this.form.processInstanceId=''
           this.$refs.taskInfoTableRef &&
             this.$refs.taskInfoTableRef.putTableValue(
               data.logisticTrakListNoteVOList
             );
           this.$refs.stowageTableRef &&
             this.$refs.stowageTableRef.putTableValue(data.carList);
-          this.$refs.palletTableRef &&
-            this.$refs.palletTableRef.putTableValue(data.trayList);
+          this.trayList = data.trayList;
+
           this.productList = data.productList;
 
-          this.form.pricingWay = data?.saleOrder?.pricingWay;
+          // this.form.pricingWay = data?.saleOrder?.pricingWay;
           this.form.productList = [];
           this.handleSelectGoods();
         }
@@ -842,38 +665,55 @@
       handleSelectGoods(list) {
         this.outboundDetailsDialogFlag = true;
         this.$nextTick(() => {
-          this.$refs.outboundDetailsDialogRef.init({...this.form,type:10}, list);
+          this.$refs.outboundDetailsDialogRef.init(
+            { ...this.form, type: 10 },
+            list
+          );
         });
       },
       saveDate(data) {
-        console.log(data,'data')
         data.forEach((item) => {
           item['totalCount'] = item.measureQuantity;
           item['qmsResult'] = item.result;
           item['qmsStatus'] = item.status;
           item['sendProductId'] = item.categoryId;
           item['sendTotalWeight'] = item.weight;
-          
+
           this.productList.forEach((val) => {
             if (item.productCode == val.productCode) {
               item['singlePrice'] = val.singlePrice;
               item['clientCode'] = item.clientCode || val.customerMark;
-              item['pricingWay'] = item.pricingWay||val.pricingWay || 1;
+              item['pricingWay'] = item.pricingWay || val.pricingWay || 1;
 
               if (item.pricingWay == 1) {
                 item.totalPrice = item.singlePrice * item.packingQuantity;
               }
               if (item.pricingWay == 2) {
                 item.totalPrice =
-                  item.singlePrice * item.packingQuantity * item.sendTotalWeight;
+                  item.singlePrice *
+                  item.packingQuantity *
+                  item.sendTotalWeight;
               }
             }
           });
         });
-        this.form.productList = data;
-        this.form.productList.forEach((item,index)=>{
-          this.$set(this.form.productList[index],'isException',0)
-        })
+        let trayListCodes = this.trayList.map((item) => item.productCode);
+        this.form.productList = data.filter(
+          (item) => !trayListCodes.includes(item.productCode)
+        );
+        this.form.productList.forEach((item, index) => {
+          this.$set(this.form.productList[index], 'isException', 0);
+        });
+
+        this.trayListData = data.filter((item) => {
+          if (trayListCodes.includes(item.productCode)) {
+            item['orderProductType'] = 1;
+            return item;
+          }
+        });
+        this.trayListData.forEach((item, index) => {
+          this.$set(this.trayListData[index], 'type', 0);
+        });
       },
       // //发货单确认详情
       async getSendSaleOrderDetail(id) {
@@ -881,10 +721,14 @@
 
         this.loading = true;
         const data = await getSendSaleOrderConfirmDetail(id);
+        this.oldId = data.id;
+        this.oldDocNo=data.docNo
         this.loading = false;
         if (data) {
+          this.form = data;
+          this.trayListData = data.trayList;
+
           this.$nextTick(() => {
-            this.form = data;
             this.form.pricingWay = data?.saleOrder?.pricingWay;
             this.$refs.inventoryTableref &&
               this.$refs.inventoryTableref.putTableValue(data.productList);
@@ -894,8 +738,8 @@
               this.$refs.taskInfoTableRef.putTableValue(
                 data.logisticTrakListNoteVOList
               );
-            this.$refs.palletTableRef &&
-              this.$refs.palletTableRef.putTableValue(data.trayList);
+            // this.$refs.palletTableRef &&
+            //   this.$refs.palletTableRef.putTableValue(data.trayList);
           });
         }
       },
@@ -928,8 +772,8 @@
             this.$refs.stowageTableRef.putTableValue([]);
           this.$refs.taskInfoTableRef &&
             this.$refs.taskInfoTableRef.putTableValue([]);
-          this.$refs.palletTableRef &&
-            this.$refs.palletTableRef.putTableValue([]);
+          this.trayListData = [];
+          this.trayList = [];
           return;
         }
         let item = {
@@ -992,7 +836,7 @@
 
           this.form.replied = this.form.repliedFiles.length > 0 ? 1 : 0;
           let commitData = Object.assign({}, this.form, {
-            trayList: this.$refs.palletTableRef.getTableValue(),
+            trayList: this.trayListData,
             carList: this.$refs.stowageTableRef.getTableValue(),
             trakNoteList: this.$refs.taskInfoTableRef.getTableValue()
           });
@@ -1066,6 +910,8 @@
           this.$store.commit('order/clearUserData');
           this.form = copyObj(this.formDef);
           this.visible = false;
+          this.trayListData = [];
+          this.trayLis = [];
         });
       }
     }

+ 130 - 276
src/views/saleManage/saleOrder/invoiceConfirm/components/detailDialog.vue

@@ -49,23 +49,20 @@
             <el-form-item label="客户地址:" prop="partaAddress">
               <el-input v-model="form.partaAddress" disabled></el-input>
             </el-form-item>
-          
+
             <el-form-item label="发货附件:" prop="sendFiles">
               <fileMain v-model="form.sendFiles" type="view"></fileMain>
-          
             </el-form-item>
             <el-form-item label="回执附件:" prop="sendFiles">
               <fileMain v-model="form.repliedFiles" type="view"></fileMain>
-        
             </el-form-item>
           </el-col>
 
           <el-col :span="12">
-          
             <el-form-item label="收货确认单编码:" prop="entrustedCode">
               <el-input v-model="form.docNo" disabled></el-input>
             </el-form-item>
-       
+
             <el-form-item label="发货单编码:" prop="docNo">
               <el-input v-model="form.sendNo" disabled></el-input>
             </el-form-item>
@@ -106,11 +103,18 @@
             :datasource="form.productList"
             row-key="id"
           >
-
           </ele-pro-table>
         </el-tab-pane>
         <el-tab-pane label="托盘清单">
-          <palletTable ref="palletTableRef" type="view"></palletTable>
+          <ele-pro-table
+            ref="table"
+            :needPage="false"
+            :columns="trayListColumns"
+            :toolkit="[]"
+            :datasource="trayListData"
+            row-key="id"
+          >
+          </ele-pro-table>
         </el-tab-pane>
         <el-tab-pane label="装载叉车信息">
           <stowageTable ref="stowageTableRef" dialog-type="view"></stowageTable>
@@ -175,6 +179,113 @@
           { key: 'bpm', name: '流程详情' }
           // {key: 'store', name: '出库单详情'},
         ],
+        trayListColumns: [
+          {
+            width: 45,
+            type: 'index',
+            columnKey: 'index',
+            align: 'center',
+            fixed: 'left'
+          },
+          {
+            minWidth: 160,
+            prop: 'productCode',
+            label: '编码',
+            showOverflowTooltip: true,
+            align: 'center'
+          },
+          {
+            minWidth: 120,
+            prop: 'productName',
+            label: '名称',
+            showOverflowTooltip: true,
+            align: 'center'
+          },
+
+          {
+            minWidth: 160,
+            prop: 'batchNo',
+            label: '批次号',
+            showOverflowTooltip: true,
+            align: 'center'
+          },
+          {
+            minWidth: 160,
+            prop: 'barcodes',
+            label: '发货条码',
+            showOverflowTooltip: true,
+            align: 'center'
+          },
+          {
+            minWidth: 120,
+            prop: 'materielDesignation',
+            label: '物料代号',
+            showOverflowTooltip: true,
+            align: 'center'
+          },
+          {
+            minWidth: 120,
+            prop: 'clientCode',
+            label: '客户代号',
+            showOverflowTooltip: true,
+            align: 'center'
+          },
+          {
+            minWidth: 120,
+            prop: 'engrave',
+            label: '刻码',
+            showOverflowTooltip: true,
+            align: 'center'
+          },
+          {
+            minWidth: 160,
+            prop: 'packageNo',
+            align: 'center',
+            label: '包装编码',
+            showOverflowTooltip: true
+          },
+          {
+            minWidth: 100,
+            prop: 'packingQuantity',
+            align: 'center',
+            label: '包装数量',
+            showOverflowTooltip: true
+          },
+          {
+            minWidth: 120,
+            prop: 'packingUnit',
+            align: 'center',
+            label: '包装单位',
+            showOverflowTooltip: true
+          },
+          {
+            minWidth: 100,
+            prop: 'totalCount',
+            label: '计量数量',
+            showOverflowTooltip: true,
+            align: 'center'
+          },
+          {
+            minWidth: 150,
+            prop: 'measuringUnit',
+            label: '计量单位',
+            showOverflowTooltip: true,
+            align: 'center'
+          },
+          {
+            width: 120,
+            slot: 'type',
+            prop: 'type',
+            label: '回收状态',
+            align: 'center',
+            formatter: (row, column) => {
+              return row.type===0?'未回收': row.type===1?'已回收':''
+            },
+            fixed: 'right'
+          }
+        ],
+        trayListData: [],
+
         reviewStatusEnum,
         visible: false,
         outboundDetailsDialogFlag: false,
@@ -289,8 +400,11 @@
             slot: 'pricingWay',
             align: 'center',
             formatter: (row, column) => {
-              return row.pricingWay == 1 ? '按数量计费' : row.pricingWay == 2 ? '按重量计费':'';
-
+              return row.pricingWay == 1
+                ? '按数量计费'
+                : row.pricingWay == 2
+                ? '按重量计费'
+                : '';
             }
           },
           {
@@ -331,10 +445,9 @@
             minWidth: 200,
             showOverflowTooltip: true,
             formatter: (row, column) => {
-       
               return row.provenance && row.provenance.length
                 ? row.provenance
-                    .map((item) => this.getDictValue('产地', item ))
+                    .map((item) => this.getDictValue('产地', item))
                     .join(',')
                 : '';
             }
@@ -353,275 +466,16 @@
             label: '收货状态',
             slot: 'isException',
             formatter: (row, column) => {
-              return row.isException == 1
-                ? '未收货'
-                : '已收货'
+              return row.isException == 1 ? '未收货' : '已收货';
             },
             fixed: 'right',
             align: 'center'
-          },
- 
-        ],
-        childrenColumns: [
-          {
-            width: 45,
-            type: 'index',
-            columnKey: 'index',
-            align: 'center',
-            fixed: 'left'
-          },
-          {
-            minWidth: 100,
-            prop: 'code',
-            label: '编码',
-            align: 'center'
-          },
-          {
-            minWidth: 140,
-            prop: 'barcodes',
-            label: '发货条码',
-            align: 'center'
-          },
-          {
-            minWidth: 100,
-            prop: 'engrave',
-            label: '刻码',
-            align: 'center'
           }
         ]
       };
     },
-    computed: {
-      competAnalysisListcolumns() {
-        return [
-          {
-            width: 45,
-            type: 'index',
-            columnKey: 'index',
-            align: 'center',
-            fixed: 'left'
-          },
-          {
-            width: 200,
-            prop: 'productName',
-            label: '名称',
-            slot: 'productName',
-            align: 'center'
-          },
-          {
-            width: 120,
-            prop: 'productCode',
-            label: '编码',
-            slot: 'productCode',
-            align: 'center'
-          },
-          {
-            width: 200,
-            prop: 'productCategoryName',
-            label: '类型',
-            slot: 'productCategoryName',
-            align: 'center'
-          },
-          {
-            width: 160,
-            prop: 'productBrand',
-            label: '牌号',
-            slot: 'productBrand',
-            align: 'center'
-          },
-          {
-            width: 160,
-            prop: 'batchNo',
-            label: '批次号',
-            slot: 'batchNo',
-            align: 'center'
-          },
-          {
-            width: 120,
-            prop: 'modelType',
-            label: '型号',
-            slot: 'modelType',
-            align: 'center'
-          },
-          {
-            width: 120,
-            prop: 'specification',
-            label: '规格',
-            slot: 'specification',
-            align: 'center'
-          },
-
-          {
-            width: 200,
-            prop: 'customerMark',
-            label: '客户代号',
-            slot: 'customerMark',
-            align: 'center'
-          },
-          {
-            width: 200,
-            prop: 'warehouseName',
-            label: '仓库名称',
-            slot: 'warehouseName',
-            align: 'center'
-          },
-          {
-            width: 100,
-            prop: 'stockLedger',
-            label: '发货明细',
-            slot: 'stockLedger',
-            align: 'center'
-          },
-
-          {
-            width: 120,
-            prop: 'sendTotalCount',
-            label: '发货数量',
-            align: 'center'
-          },
-          {
-            width: 120,
-            prop: 'totalCount',
-            label: '实收数量',
-            slot: 'totalCount',
-            align: 'center'
-          },
-          {
-            width: 120,
-            prop: 'measuringUnit',
-            label: '计量单位',
-            slot: 'measuringUnit',
-            align: 'center'
-          },
-          {
-            width: 120,
-            prop: 'singleWeight',
-            label: '单重',
-            slot: 'singleWeight',
-            align: 'center'
-          },
-          {
-            width: 100,
-            prop: 'receiveTotalWeight',
-            label: '收货总重',
-            slot: 'receiveTotalWeight',
-            align: 'center'
-          },
-          {
-            width: 200,
-            prop: 'sendTotalWeight',
-            label: '发货总重',
-            slot: 'sendTotalWeight',
-            align: 'center',
-            headerSlot: 'headerTotalCount'
-          },
 
-          {
-            width: 100,
-            prop: 'increaseTotalWeight',
-            label: '增重重量',
-            slot: 'increaseTotalWeight',
-            align: 'center'
-          },
-          {
-            width: 100,
-            prop: 'weightUnit',
-            label: '重量单位',
-            slot: 'weightUnit',
-            align: 'center'
-          },
-          {
-            width: 160,
-            prop: 'singlePrice',
-            label: '单价',
-            slot: 'singlePrice',
-            align: 'center'
-          },
-          {
-            width: 160,
-            prop: 'discountSinglePrice',
-            label: '折后单价',
-            slot: 'discountSinglePrice',
-            align: 'center'
-          },
-          {
-            width: 120,
-            prop: 'totalPrice',
-            label: '合计',
-            slot: 'totalPrice',
-            align: 'center'
-          },
-          {
-            width: 120,
-            prop: 'discountTotalPrice',
-            label: '折后合计',
-            slot: 'discountTotalPrice',
-            align: 'center'
-          },
-          //...this.dynamicsColumns,
-          {
-            width: 120,
-            prop: 'deliveryDays',
-            label: '交期(天)',
-            slot: 'deliveryDays',
-            align: 'center'
-          },
-          {
-            width: 200,
-            prop: 'guaranteePeriod',
-            label: '质保期',
-            slot: 'guaranteePeriod',
-            formatter: (_row, _column, cellValue) => {
-              return (
-                (_row.guaranteePeriod || '') +
-                (_row.guaranteePeriodUnitName || '')
-              );
-            },
-            align: 'center'
-          },
-          // {
-          //   width: 120,
-          //   prop: 'guaranteePeriodUnitCode',
-          //   label: '',
-          //   slot: 'guaranteePeriodUnitCode'
-          // },
-          {
-            width: 120,
-            prop: 'technicalAnswerName',
-            label: '技术答疑人',
-            slot: 'technicalAnswerName',
-            align: 'center'
-          },
-          {
-            width: 220,
-            prop: 'technicalParams',
-            label: '技术参数',
-            slot: 'technicalParams',
-            align: 'center'
-          },
-          {
-            width: 240,
-            prop: 'technicalDrawings',
-            label: '技术图纸',
-            slot: 'technicalDrawings',
-            formatter: (_row, _column, cellValue) => {
-              return (
-                (_row.guaranteePeriod || '') + _row.guaranteePeriodUnitName
-              );
-            },
-            align: 'center'
-          },
-          {
-            width: 220,
-            prop: 'remark',
-            label: '备注',
-            slot: 'remark',
-            align: 'center'
-          }
-        ];
-      }
-    },
-    created(){
+    created() {
       this.requestDict('产地');
     },
     methods: {
@@ -656,17 +510,17 @@
         this.loading = true;
         const data = await getSendSaleOrderConfirmDetail(id);
         this.loading = false;
+        this.form = data;
+        this.detailData = data;
+        this.trayListData = data.trayList;
         if (data) {
-          this.form = data;
-          this.detailData = data;
           this.$refs.taskInfoTableRef &&
             this.$refs.taskInfoTableRef.putTableValue(
               data.logisticTrakListNoteVOList
             );
           this.$refs.stowageTableRef &&
             this.$refs.stowageTableRef.putTableValue(data.carList);
-          this.$refs.palletTableRef &&
-            this.$refs.palletTableRef.putTableValue(data.trayList);
+
           this.form.pricingWay = data?.saleOrder?.pricingWay;
         }
       }

+ 103 - 0
src/views/saleManage/saleOrder/palletManagement/components/searchTable.vue

@@ -0,0 +1,103 @@
+<!-- 搜索表单 -->
+<template>
+  <el-form
+    label-width="100px"
+    class="ele-form-search"
+    @keyup.enter.native="search"
+    @submit.native.prevent
+  >
+    <el-row :gutter="15">
+
+      <el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }" v-if="!saleOrderId">
+        <el-form-item label="订单编码:" prop="orderNo">
+          <el-input
+            clearable
+            placeholder="请输入"
+            v-model.trim="params.orderNo"
+          ></el-input>
+        </el-form-item>
+      </el-col>
+
+      <el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">
+        <el-form-item label="项目名称:">
+          <el-input
+            clearable
+            placeholder="请输入"
+            v-model.trim="params.projectName"
+          ></el-input>
+        </el-form-item>
+      </el-col>
+      <el-col
+        style="display: flex; justify-content: end"
+        v-bind="styleResponsive ? { lg: 12, md: 18 } : { span: 12 }"
+      >
+        <div class="ele-form-actions">
+          <el-button
+            type="primary"
+            icon="el-icon-search"
+            class="ele-btn-icon"
+            @click="search"
+          >
+            查询
+          </el-button>
+          <el-button @click="reset">重置</el-button>
+        </div>
+      </el-col>
+    </el-row>
+  </el-form>
+</template>
+<script>
+import { reviewStatusEnum } from '@/enum/dict';
+const repliedOptions = [
+  { value: 0, label: '否' },
+  { value: 1, label: '是' }
+];
+export default {
+  data() {
+    // 默认表单数据
+    const defaultParams = {
+      contractName: '',
+      contractId: '',
+      docNo: '',
+      orderId: '',
+      replied: null,
+      reviewStatus: null,
+      projectName:''
+    };
+    return {
+      reviewStatusEnum,
+      defaultParams,
+      repliedOptions,
+      // 表单数据
+      params: { ...defaultParams }
+    };
+  },
+  props: {
+    saleOrderId: ''
+  },
+  computed: {
+    // 是否开启响应式布局
+    styleResponsive() {
+      return this.$store.state.theme.styleResponsive;
+    }
+  },
+  methods: {
+    //选择时间
+    changeDate(e) {
+      this.createTime = e;
+    },
+    /* 搜索 */
+    search() {
+      this.$emit('search', {
+        ...this.params
+      });
+    },
+    /*  重置 */
+    reset() {
+      this.createTime = [];
+      this.params = Object.assign({}, { ...this.defaultParams });
+      this.search();
+    }
+  }
+};
+</script>

+ 214 - 0
src/views/saleManage/saleOrder/palletManagement/index.vue

@@ -0,0 +1,214 @@
+<template>
+  <div class="ele-body" style="width: 100%">
+    <el-card shadow="never" v-loading="loading" style="width: 100%">
+      <div class="ele-border-lighter form-content" v-loading="loading">
+        <search-table @search="reload"></search-table>
+
+        <!-- 数据表格 -->
+        <ele-pro-table
+          ref="table"
+          :columns="columns"
+          :datasource="datasource"
+          height="calc(100vh - 410px)"
+          style="margin-bottom: 10px"
+          full-height="calc(100vh - 116px)"
+          tool-class="ele-toolbar-form"
+          :selection.sync="selection"
+          cache-key="eomContactPageTable"
+          :page-size="20"
+        >
+ 
+
+
+          <template v-slot:orderCode="{ row }">
+            <el-link
+              type="primary"
+              :underline="false"
+              @click="openorderDetail(row, 'orderCode')"
+            >
+              {{ row.orderCode }}
+            </el-link>
+          </template>
+
+        </ele-pro-table>
+      </div>
+    </el-card>
+
+    <order-detail-dialog ref="orderDetailDialogRef"></order-detail-dialog>
+
+  </div>
+</template>
+
+<script>
+  import searchTable from './components/searchTable.vue';
+
+  import orderDetailDialog from '@/views/saleManage/saleOrder/components/detailDialog.vue';
+
+  import dictMixins from '@/mixins/dictMixins';
+
+  export default {
+    mixins: [dictMixins],
+    components: {
+      searchTable,
+      orderDetailDialog,
+    },
+
+    data() {
+      return {
+
+      
+        loading: false, // 加载状态
+        columns: [
+    
+          {
+            columnKey: 'index',
+            label: '序号',
+            type: 'index',
+            width: 55,
+            align: 'center',
+            showOverflowTooltip: true,
+            fixed: 'left'
+          },
+          {
+            prop: 'orderCode',
+            label: '销售订单编码',
+            align: 'center',
+            sortable: true,
+            slot: 'orderCode',
+            showOverflowTooltip: true,
+            minWidth: 200
+          },
+          {
+            prop: 'projectName',
+            label: '项目名称',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 180
+          },
+          {
+            prop: 'productName',
+            label: '托盘名称',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 140
+          },
+          {
+            prop: 'totalCount',
+            label: '托盘数量',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 140
+          },
+   
+          {
+            prop: 'receiveCount',
+            label: '已回收数量',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 140
+          },
+          {
+            prop: 'noReceiveCount',
+            label: '未回收数量',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 140
+          },
+          {
+            prop: 'createUserName',
+            label: '创建人',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 80
+          },
+          {
+            prop: 'createTime',
+            label: '创建时间',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 170
+          },
+      
+        ]
+      };
+    },
+    computed: {},
+
+    methods: {
+      /* 表格数据源 */
+      datasource({ page, limit, where, order }) {
+        return []
+        return getSendTableList({
+          pageNum: page,
+          size: limit,
+          ...where
+        });
+      },
+
+      /* 刷新表格 */
+      reload(where) {
+        this.$refs.table.reload({ page: 1, where });
+      },
+
+     
+      //查看详情
+      openorderDetail(row, type) {
+        if (type === 'docNo') {
+          this.$refs.DetailDialogRef.open(row);
+        }
+        if (type === 'orderCode') {
+          this.$refs.orderDetailDialogRef.open({ id: row.orderId });
+        }
+      }
+    }
+  };
+</script>
+
+<style lang="scss" scoped>
+  .ele-body {
+    padding-top: 0;
+    padding-bottom: 0;
+  }
+
+  :deep .el-card__body {
+    padding: 0;
+  }
+
+  :deep(.el-link--inner) {
+    margin-left: 0px !important;
+  }
+
+  .sys-organization-list {
+    height: calc(100vh - 264px);
+    box-sizing: border-box;
+    border-width: 1px;
+    border-style: solid;
+    overflow: auto;
+  }
+
+  .sys-organization-list :deep(.el-tree-node__content) {
+    height: 40px;
+
+    & > .el-tree-node__expand-icon {
+      margin-left: 10px;
+    }
+  }
+
+  .switch_left ul .active {
+    border-top: 4px solid var(--color-primary);
+    color: var(--color-primary-5);
+  }
+
+  .switch {
+    padding-bottom: 20px;
+  }
+
+  .el-dropdown-link {
+    cursor: pointer;
+    color: var(--color-primary-5);
+  }
+
+  .el-icon-arrow-down {
+    font-size: 12px;
+  }
+</style>