Procházet zdrojové kódy

产品清单改为物品清单

yusheng před 1 rokem
rodič
revize
c90063cc5a
33 změnil soubory, kde provedl 989 přidání a 798 odebrání
  1. 11 0
      src/api/saleManage/contact.js
  2. 9 6
      src/views/financialManage/invoiceManage/components/detailDialog.vue
  3. 20 10
      src/views/financialManage/invoiceManage/components/tableInfo.vue
  4. 1 1
      src/views/financialManage/payableManage/components/detailDialog.vue
  5. 1 1
      src/views/financialManage/receivableManage/components/detailDialog.vue
  6. 10 1
      src/views/purchasingManage/inquiryManage/components/addDialog.vue
  7. 1 1
      src/views/purchasingManage/inquiryManage/components/detailDialog.vue
  8. 47 20
      src/views/purchasingManage/inquiryManage/components/inquiryTable.vue
  9. 276 181
      src/views/purchasingManage/purchaseOrder/accountstatement/components/purchaseForm.vue
  10. 3 1
      src/views/purchasingManage/purchaseOrder/components/detailDialog.vue
  11. 4 3
      src/views/purchasingManage/purchaseOrder/components/inventoryTable.vue
  12. 4 3
      src/views/purchasingManage/purchaseOrder/index.vue
  13. 4 8
      src/views/purchasingManage/purchaseOrder/invoice/components/addInvoiceDialog.vue
  14. 2 2
      src/views/purchasingManage/purchaseOrder/invoice/components/detailDialog.vue
  15. 6 2
      src/views/purchasingManage/purchaseOrder/invoice/components/orderListDialog.vue
  16. 546 536
      src/views/purchasingManage/purchasePlanManage/components/inventoryTable.vue
  17. 2 2
      src/views/saleManage/businessOpportunity/components/addOpportunityDialog.vue
  18. 2 2
      src/views/saleManage/businessOpportunity/components/drawer.vue
  19. 1 1
      src/views/saleManage/businessOpportunity/components/opportunityDetailDialog.vue
  20. 1 1
      src/views/saleManage/quotation/components/addDialog.vue
  21. 1 1
      src/views/saleManage/quotation/components/detailDialog.vue
  22. 24 2
      src/views/saleManage/saleOrder/accountstatement/components/saleForm.vue
  23. 1 1
      src/views/saleManage/saleOrder/components/addDialog.vue
  24. 1 1
      src/views/saleManage/saleOrder/components/darwerComponents/saleOrderInfo.vue
  25. 1 1
      src/views/saleManage/saleOrder/components/detailDialog.vue
  26. 1 1
      src/views/saleManage/saleOrder/customerReturnOrder/add-sale-order-dialog.vue
  27. 1 1
      src/views/saleManage/saleOrder/entrustedReceive/components/addOrEditDialog.vue
  28. 1 1
      src/views/saleManage/saleOrder/entrustedReceive/components/detailDialog.vue
  29. 1 1
      src/views/saleManage/saleOrder/exceptionManagement/components/addOrEditDialog.vue
  30. 1 1
      src/views/saleManage/saleOrder/invoice/components/addInvoiceDialog.vue
  31. 1 1
      src/views/saleManage/saleOrder/invoice/components/detailDialog.vue
  32. 2 2
      src/views/saleManage/saleOrder/returnGoods/components/addReturnGoodsDialog.vue
  33. 2 2
      src/views/saleManage/saleOrder/returnGoods/components/detailDialog.vue

+ 11 - 0
src/api/saleManage/contact.js

@@ -263,3 +263,14 @@ export async function updateRelationStatus(data) {
   }
   return Promise.reject(new Error(res.data.message));
 }
+
+/**
+ * 获取供应商最小订购数量
+ */
+export async function listByContactId(data) {
+  const res = await request.post('/eom/contactproduct/listByContactId',  data);
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}

+ 9 - 6
src/views/financialManage/invoiceManage/components/detailDialog.vue

@@ -29,7 +29,7 @@
       </ul>
     </div>
     <div v-if="activeComp === 'main'">
-      <el-form ref="form" :model="form" class="el-form-box" label-width="120px">
+      <el-form ref="form" :model="form" class="el-form-box" label-width="140px">
         <headerTitle title="基本信息"></headerTitle>
         <el-row :gutter="12">
           <el-col :span="12">
@@ -138,6 +138,12 @@
               <el-input disabled v-model="form.companyName"></el-input>
             </el-form-item>
           </el-col>
+          <el-col :span="12">
+          <el-form-item label="发票类型" prop="category">
+            <el-radio disabled v-model="form.category" :label="2">增值税普通发票</el-radio>
+            <el-radio disabled v-model="form.category" :label="1">增值税专用发票</el-radio>
+          </el-form-item>
+        </el-col>
           <el-col :span="12">
             <el-form-item
               label="统一社会信用代码"
@@ -147,8 +153,7 @@
               <el-input disabled v-model="form.companyUsc"></el-input>
             </el-form-item>
           </el-col>
-        </el-row>
-        <el-row :gutter="12">
+ 
           <el-col :span="12">
             <el-form-item label="开户银行" prop="companyBankBranchNo">
               <el-input disabled v-model="form.companyBankBranchNo"></el-input>
@@ -159,9 +164,7 @@
               <el-input disabled v-model="form.companyBankAccount"></el-input>
             </el-form-item>
           </el-col>
-        </el-row>
-
-        <el-row :gutter="12">
+ 
           <el-col :span="12">
             <el-form-item label="单位地址" prop="companyAddress">
               <el-input disabled v-model="form.companyAddress"></el-input>

+ 20 - 10
src/views/financialManage/invoiceManage/components/tableInfo.vue

@@ -8,10 +8,9 @@
       :datasource="tableForm.detailList"
       row-key="id"
     >
-    <template  v-slot:toolbar>
-      <span>已开票金额:{{  invoiceAmount }}</span>
-
-    </template>
+      <template v-slot:toolbar>
+        <span>已开票金额:{{ invoiceAmount }}</span>
+      </template>
     </ele-pro-table>
   </div>
 </template>
@@ -42,7 +41,7 @@
           return {};
         }
       },
-      invoiceAmount:{
+      invoiceAmount: {
         type: Number,
         default: 0
       }
@@ -115,7 +114,7 @@
           //   slot: 'productBrand',
           //   align: "center"
           // },
-     
+
           {
             width: 80,
             prop: 'totalCount',
@@ -123,7 +122,7 @@
             slot: 'totalCount',
             align: 'center'
           },
-      
+
           {
             width: 100,
             prop: 'measuringUnit',
@@ -158,7 +157,7 @@
           //   label: '单量',
           //   align: 'center'
           // },
-          
+
           {
             minWidth: 80,
             prop: 'totalPrice',
@@ -210,6 +209,11 @@
     mounted() {
       this.tableForm = this.form;
     },
+    watch: {
+      form(val) {
+        this.tableForm = this.form;
+      }
+    },
     methods: {
       //获取选择的对账单数据
       async getAccountData(params) {
@@ -243,7 +247,10 @@
           });
           this.$refs.table.reload();
         }
-        this.$emit('setPrice', params.children.amountTotalPrice-this.invoiceAmount);
+        this.$emit(
+          'setPrice',
+          params.children.amountTotalPrice - this.invoiceAmount
+        );
         let row = {
           id: params.id,
           name: params.statementNo,
@@ -264,7 +271,10 @@
       },
       getTableValidate() {
         return new Promise((resolve, reject) => {
-          if (this.tableForm.detailList.length == 0&&![4,5].includes(this.form.sourceType))
+          if (
+            this.tableForm.detailList.length == 0 &&
+            ![4, 5].includes(this.form.sourceType)
+          )
             return this.$message.warning('请选择关联信息');
           resolve(this.tableForm);
         });

+ 1 - 1
src/views/financialManage/payableManage/components/detailDialog.vue

@@ -89,7 +89,7 @@
               label="来源类型"
               prop="sourceType"
               >
-              <el-input :value="form.sourceType==3?'合同':form.sourceType==2?'采购订单':form.sourceType==1?'销售订单':''" disabled></el-input>
+              <el-input :value="form.sourceType==2?'合同':form.sourceType==3?'采购订单':'对账单'" disabled></el-input>
             </el-form-item>
           </el-col>
           <el-col :span="12">

+ 1 - 1
src/views/financialManage/receivableManage/components/detailDialog.vue

@@ -88,7 +88,7 @@
               label="来源类型"
               prop="sourceType"
              >
-             <el-input :value="form.sourceType==3?'合同':form.sourceType==2?'采购订单':form.sourceType==1?'销售订单':''" disabled></el-input>
+             <el-input :value="form.sourceType==2?'合同':form.sourceType==3?'销售订单':'对账单'" disabled></el-input>
             </el-form-item>
           </el-col>
           <el-col :span="12">

+ 10 - 1
src/views/purchasingManage/inquiryManage/components/addDialog.vue

@@ -618,11 +618,20 @@
             this.$refs['inquiryTable' + item.supplierId][0].getTableValue()
           );
         });
+        let is=false
         supplierList.forEach((item) => {
           item.resultList.forEach((val) => {
             val['technicalDrawings'] = [];
+
+            if(val.minimumOrderQuantity>val.totalCount){
+              is=true
+            }
           });
         });
+        if(is){
+          this.$message.warning('购买数量不能小于最低订购量!');
+           return
+        }
 
         this.form.detailList = this.list;
         this.form.supplierList = supplierList;
@@ -641,7 +650,7 @@
           // 表单验证通过,执行保存操作
           this.loading = true;
           if (this.$refs.inventoryTable.getTableValue().length == 0) {
-            this.$message.warning('品清单不能为空');
+            this.$message.warning('品清单不能为空');
             return;
           }
           if (!this.isUpdate) {

+ 1 - 1
src/views/purchasingManage/inquiryManage/components/detailDialog.vue

@@ -81,7 +81,7 @@
         </el-row>
       </el-form>
 
-      <headerTitle title="品清单" style="margin-top: 15px"></headerTitle>
+      <headerTitle title="品清单" style="margin-top: 15px"></headerTitle>
       <ele-pro-table
         ref="table"
         :needPage="false"

+ 47 - 20
src/views/purchasingManage/inquiryManage/components/inquiryTable.vue

@@ -284,7 +284,6 @@
             dictName="产地"
             clearable
             :disabled="status == 'Detail'"
-
             v-model="scope.row.provenance"
             multiple
           >
@@ -360,7 +359,7 @@
   import { getFile } from '@/api/system/file';
   import fileMain from '@/components/addDoc/index.vue';
   import { getInventoryTotalAPI } from '@/api/wms';
-
+  import { listByContactId } from '@/api/saleManage/contact';
   const defaultColumns = [
     {
       width: 50,
@@ -483,12 +482,9 @@
       align: 'center'
     },
     {
-      minWidth: 130,
-      prop: 'totalCount',
-      label: '购买数量',
-      slot: 'totalCount',
-      headerSlot: 'isRequired',
-      showOverflowTooltip: true,
+      minWidth: 120,
+      prop: 'minimumOrderQuantity',
+      label: '最低订购量',
       align: 'center'
     },
     {
@@ -698,12 +694,14 @@
           this.obj.deliveryDate || item.expectReceiveDate;
       });
       this.form = copyObj(this.obj);
+      console.log(this.form, '');
 
       this.radio1 = this.radio;
       this.getSpanArr();
       this.setDeliveryDays();
       this.setIsInquiry();
       this.getInventoryTotalAPI();
+      this.getListByContactId();
 
       // this.dataList=copyObj(this.list)
     },
@@ -744,20 +742,48 @@
         };
       },
       async getInventoryTotalAPI() {
-        let codeList = this.form.resultList.filter((item) => item.productCode).map((item) => item.productCode);
+        let codeList = this.form.resultList
+          .filter((item) => item.productCode)
+          .map((item) => item.productCode);
         //获取仓库库存
         let inventoryTotalList = await getInventoryTotalAPI(codeList);
-        this.form.resultList.filter((item) => item.productCode).forEach((item, index) => {
-          let find =
-            inventoryTotalList.find((key) => key.code == item.productCode) ||
-            {};
-          // item.availableCountBase = find.availableCountBase;
-          this.$set(
-            this.form.resultList[index],
-            'availableCountBase',
-            find.availableCountBase
-          );
-        });
+        this.form.resultList
+          .filter((item) => item.productCode)
+          .forEach((item, index) => {
+            let find =
+              inventoryTotalList.find((key) => key.code == item.productCode) ||
+              {};
+            // item.availableCountBase = find.availableCountBase;
+            this.$set(
+              this.form.resultList[index],
+              'availableCountBase',
+              find.availableCountBase
+            );
+          });
+      },
+      //获取最新订购量
+      async getListByContactId() {
+        let productIds = this.form.resultList
+          .filter((item) => item.productId)
+          .map((item) => item.productId)
+        if (productIds?.length > 0) {
+          const data = await listByContactId({
+            contactId: this.form.supplierId,
+            productIds
+          });
+          this.form.resultList
+            .filter((item) => item.productCode)
+            .forEach((item, index) => {
+              let pData = data.find((val) => val.productId == item.productId);
+              if (pData) {
+                this.$set(
+                  this.form.resultList[index],
+                  'minimumOrderQuantity',
+                  pData.minimumOrderQuantity
+                );
+              }
+            });
+        }
       },
       setIsInquiry() {
         return;
@@ -878,6 +904,7 @@
       //修改回显
       putTableValue(data) {
         this.form.resultList = copyObj(data);
+        this.getListByContactId();
         this.setDeliveryDays();
         this.setIsInquiry();
       },

+ 276 - 181
src/views/purchasingManage/purchaseOrder/accountstatement/components/purchaseForm.vue

@@ -1,32 +1,67 @@
 <template>
-  <el-form ref="form" :model="dataForm" :rules="rules" class="el-form-box" label-width="120px">
+  <el-form
+    ref="form"
+    :model="dataForm"
+    :rules="rules"
+    class="el-form-box"
+    label-width="120px"
+  >
     <headerTitle title="对账单信息"></headerTitle>
     <el-row>
       <el-col :span="12" class="el-col-form">
         <el-form-item label="来源类型" prop="sourceType">
           <el-select
-            :disabled="dialogType=='view'"
+            :disabled="dialogType == 'view'"
             clearable
             class="ele-block"
             v-model="dataForm.sourceType"
             @change="handleChange"
-            placeholder="请选择">
-            <el-option label="供应商" :value="1"/>
-            <!--            <el-option label="项目" :value="2"/>-->
-            <el-option label="采购订单" :value="3"/>
+            placeholder="请选择"
+          >
+            <el-option label="供应商" :value="1" />
+            <!-- <el-option label="项目" :value="2"/> -->
+            <el-option label="合同" :value="4" />
+
+            <el-option label="采购订单" :value="3" />
           </el-select>
         </el-form-item>
       </el-col>
       <el-col :span="12">
-        <el-form-item label="选择供应商" prop="contactId" v-if="dataForm.sourceType ==1">
-          <el-input :disabled="dialogType=='view'" v-model="dataForm.contactName"
-                    @click.native="handleGetCus"></el-input>
+        <el-form-item
+          label="选择供应商"
+          prop="contactId"
+          v-if="dataForm.sourceType == 1"
+        >
+          <el-input
+            :disabled="dialogType == 'view'"
+            v-model="dataForm.contactName"
+            @click.native="handleGetCus"
+          ></el-input>
         </el-form-item>
         <!--        <el-form-item label="选择项目" prop="projectId" v-if="dataForm.sourceType ==2">-->
         <!--          <el-input :disabled="dialogType=='view'" v-model="dataForm.projectId" @click.native="handleGetOrd"></el-input>-->
         <!--        </el-form-item>-->
-        <el-form-item label="选择订单" prop="orderId" v-if="dataForm.sourceType ==3">
-          <el-input :disabled="dialogType=='view'" v-model="dataForm.orderNo" @click.native="handleGetOrd"></el-input>
+        <el-form-item
+          label="选择订单"
+          prop="orderId"
+          v-if="dataForm.sourceType == 3"
+        >
+          <el-input
+            :disabled="dialogType == 'view'"
+            v-model="dataForm.sourceName"
+            @click.native="handleGetOrd"
+          ></el-input>
+        </el-form-item>
+        <el-form-item
+          label="选择合同"
+          prop="contractId"
+          v-if="dataForm.sourceType == 4"
+        >
+          <el-input
+            :disabled="dialogType == 'view'"
+            v-model="dataForm.sourceName"
+            @click.native="handleGetContract"
+          ></el-input>
         </el-form-item>
       </el-col>
     </el-row>
@@ -34,44 +69,59 @@
       <el-col :span="12">
         <el-form-item label="查询方式" prop="dateType">
           <el-select
-            :disabled="dialogType=='view'"
+            :disabled="dialogType == 'view'"
             clearable
             class="ele-block"
             v-model="dataForm.dateType"
             @change="reloadTableData"
-            placeholder="请选择">
-            <el-option label="按年度" :value="1"/>
-            <el-option label="按季度" :value="2"/>
-            <el-option label="按月度" :value="3"/>
-            <el-option label="按时间段" :value="4"/>
+            placeholder="请选择"
+          >
+            <el-option label="按年度" :value="1" />
+            <el-option label="按季度" :value="2" />
+            <el-option label="按月度" :value="3" />
+            <el-option label="按时间段" :value="4" />
           </el-select>
         </el-form-item>
       </el-col>
       <el-col :span="12" v-if="![2].includes(dataForm.dateType)">
-        <el-form-item label="选择年度" prop="year" v-if="[1].includes(dataForm.dateType)">
+        <el-form-item
+          label="选择年度"
+          prop="year"
+          v-if="[1].includes(dataForm.dateType)"
+        >
           <el-date-picker
-            :disabled="dialogType=='view'"
+            :disabled="dialogType == 'view'"
             v-model="dataForm.year"
             value-format="yyyy"
             type="year"
             style="width: 100%"
             @change="reloadTableData"
-            placeholder="选择年">
+            placeholder="选择年"
+          >
           </el-date-picker>
         </el-form-item>
-        <el-form-item label="选择月度" prop="month" v-if="[3].includes(dataForm.dateType)">
+        <el-form-item
+          label="选择月度"
+          prop="month"
+          v-if="[3].includes(dataForm.dateType)"
+        >
           <el-date-picker
-            :disabled="dialogType=='view'"
+            :disabled="dialogType == 'view'"
             v-model="dataForm.month"
             value-format="yyyy-MM"
             type="month"
             @change="reloadTableData"
-            style="width: 100%">
+            style="width: 100%"
+          >
           </el-date-picker>
         </el-form-item>
-        <el-form-item label="选择时间段" prop="dateTimeRange" v-if="[4].includes(dataForm.dateType)">
+        <el-form-item
+          label="选择时间段"
+          prop="dateTimeRange"
+          v-if="[4].includes(dataForm.dateType)"
+        >
           <el-date-picker
-            :disabled="dialogType=='view'"
+            :disabled="dialogType == 'view'"
             v-model="dataForm.dateTimeRange"
             value-format="yyyy-MM-dd"
             type="daterange"
@@ -79,36 +129,47 @@
             range-separator="至"
             start-placeholder="开始日期"
             end-placeholder="结束日期"
-            style="width: 100%">
+            style="width: 100%"
+          >
           </el-date-picker>
         </el-form-item>
       </el-col>
       <el-col :span="6" v-if="[2].includes(dataForm.dateType)">
-        <el-form-item label="选择年度" prop="year" v-if="[1,2].includes(dataForm.dateType)">
+        <el-form-item
+          label="选择年度"
+          prop="year"
+          v-if="[1, 2].includes(dataForm.dateType)"
+        >
           <el-date-picker
-            :disabled="dialogType=='view'"
+            :disabled="dialogType == 'view'"
             v-model="dataForm.year"
             value-format="yyyy"
             type="year"
             @change="reloadTableData"
             style="width: 100%"
-            placeholder="选择年">
+            placeholder="选择年"
+          >
           </el-date-picker>
         </el-form-item>
       </el-col>
       <el-col :span="6" v-if="[2].includes(dataForm.dateType)">
-        <el-form-item label="选择季度" prop="quarter" v-if="[2].includes(dataForm.dateType)">
+        <el-form-item
+          label="选择季度"
+          prop="quarter"
+          v-if="[2].includes(dataForm.dateType)"
+        >
           <el-select
-            :disabled="dialogType=='view'"
+            :disabled="dialogType == 'view'"
             clearable
             @change="reloadTableData"
             class="ele-block"
             v-model="dataForm.quarter"
-            placeholder="请选择">
-            <el-option label="一季度" value="一季度"/>
-            <el-option label="二季度" value="二季度"/>
-            <el-option label="三季度" value="三季度"/>
-            <el-option label="四季度" value="四季度"/>
+            placeholder="请选择"
+          >
+            <el-option label="一季度" value="一季度" />
+            <el-option label="二季度" value="二季度" />
+            <el-option label="三季度" value="三季度" />
+            <el-option label="四季度" value="四季度" />
           </el-select>
         </el-form-item>
       </el-col>
@@ -123,19 +184,18 @@
         </el-form-item>
       </el-col>
     </el-row>
-    <el-row  v-if="dialogType=='view'">
+    <el-row v-if="dialogType == 'view'">
       <el-col :span="12">
-        <el-form-item
-          prop="repliedFiles"
-          label="回执附件">
+        <el-form-item prop="repliedFiles" label="回执附件">
           <fileMain v-model="dataForm.repliedFiles" type="view"></fileMain>
-
         </el-form-item>
       </el-col>
     </el-row>
-    <el-row v-if="dialogType!=='view'">
+    <el-row v-if="dialogType !== 'view'">
       <el-col :span="24">
-        <el-button style="float: right;" @click="handleSearch" type="primary">查询</el-button>
+        <el-button style="float: right" @click="handleSearch" type="primary"
+          >查询</el-button
+        >
       </el-col>
     </el-row>
     <supplierList
@@ -143,152 +203,187 @@
       :classType="2"
       @changeParent="getCusInfo"
     ></supplierList>
-    <orderListDialog ref="orderListDialogRef" @changeParent="getOrderInfo"
+    <orderListDialog
+      ref="orderListDialogRef"
+      @changeParent="getOrderInfo"
     ></orderListDialog>
+    <contractListDialog
+      ref="selectContractRef"
+      @changeParent="changeContract"
+      :type="2"
+    ></contractListDialog>
   </el-form>
 </template>
 <script xmlns:el-col="http://www.w3.org/1999/html">
-import parentList from "@/views/saleManage/contact/components/parentList.vue";
-import OrderListDialog from "./orderListDialog.vue";
-import {getSearchMergeListByTypeAPI} from "@/api/saleManage/accountstatement";
-import {getFile} from "@/api/system/file";
-import supplierList from "@/views/purchasingManage/supplierManage/components/parentList.vue";
-import fileMain from "@/components/addDoc/index.vue";
+  import parentList from '@/views/saleManage/contact/components/parentList.vue';
+  import OrderListDialog from './orderListDialog.vue';
+  import { getSearchMergeListByTypeAPI } from '@/api/saleManage/accountstatement';
+  import { getFile } from '@/api/system/file';
+  import supplierList from '@/views/purchasingManage/supplierManage/components/parentList.vue';
+  import fileMain from '@/components/addDoc/index.vue';
+  import contractListDialog from '@/views/saleManage/saleOrder/components/contractListDialog.vue';
 
-export default {
-  name: "saleForm",
-  components: {fileMain, supplierList, OrderListDialog, parentList},
-  props: ['dataForm', 'datasource', 'dialogType'],
-  data() {
-    return {
-      monthByDays: {},
-      quarterList: {
-        '一季度': ['-01-01 00:00:00', '-03-31 23:59:59'],
-        '二季度': ['-04-01 00:00:00', '-06-30 23:59:59'],
-        '三季度': ['-07-01 00:00:00', '-09-30 23:59:59'],
-        '四季度': ['-10-01 00:00:00', '-12-31 23:59:59'],
-      },
-      startTime: '-01-01 00:00:00',
-      endTime: '23:59:59',
-      rules: {
-        sourceType: {required: true, message: '请选择', trigger: 'change'},
-        contactId: {required: true, message: '请选择', trigger: 'change'},
-        projectId: {required: true, message: '请选择', trigger: 'change'},
-        orderId: {required: true, message: '请选择', trigger: 'change'},
-        dateType: {required: true, message: '请选择', trigger: 'change'},
-        year: {required: true, message: '请选择', trigger: 'change'},
-        quarter: {required: true, message: '请选择', trigger: 'change'},
-        month: {required: true, message: '请选择', trigger: 'change'},
-        dateTimeRange: {required: true, message: '请选择', trigger: 'change'},
+  export default {
+    name: 'saleForm',
+    components: {
+      fileMain,
+      supplierList,
+      OrderListDialog,
+      parentList,
+      contractListDialog
+    },
+    props: ['dataForm', 'datasource', 'dialogType'],
+    data() {
+      return {
+        monthByDays: {},
+        quarterList: {
+          一季度: ['-01-01 00:00:00', '-03-31 23:59:59'],
+          二季度: ['-04-01 00:00:00', '-06-30 23:59:59'],
+          三季度: ['-07-01 00:00:00', '-09-30 23:59:59'],
+          四季度: ['-10-01 00:00:00', '-12-31 23:59:59']
+        },
+        startTime: '-01-01 00:00:00',
+        endTime: '23:59:59',
+        rules: {
+          sourceType: { required: true, message: '请选择', trigger: 'change' },
+          contactId: { required: true, message: '请选择', trigger: 'change' },
+          projectId: { required: true, message: '请选择', trigger: 'change' },
+          orderId: { required: true, message: '请选择', trigger: 'change' },
+          dateType: { required: true, message: '请选择', trigger: 'change' },
+          year: { required: true, message: '请选择', trigger: 'change' },
+          quarter: { required: true, message: '请选择', trigger: 'change' },
+          month: { required: true, message: '请选择', trigger: 'change' },
+          dateTimeRange: {
+            required: true,
+            message: '请选择',
+            trigger: 'change'
+          },
+          contractId: { required: true, message: '请选择', trigger: 'change' }
+        }
+      };
+    },
+    methods: {
+      //查询
+      handleSearch() {
+        //
+        switch (this.dataForm.dateType) {
+          case 1:
+            this.dataForm.dateValue = this.dataForm.year;
+            this.dataForm.startDate = this.dataForm.year + this.startTime;
+            this.dataForm.endDate = this.dataForm.year + '-12-31 23:59:59';
+            break;
+          case 2:
+            this.dataForm.dateValue =
+              this.dataForm.year + '年-' + this.dataForm.quarter;
+            this.dataForm.startDate =
+              this.dataForm.year + this.quarterList[this.dataForm.quarter][0];
+            this.dataForm.endDate =
+              this.dataForm.year + this.quarterList[this.dataForm.quarter][1];
+            break;
+          case 3:
+            this.dataForm.dateValue = this.dataForm.month;
+            this.dataForm.startDate = this.dataForm.month + '-01 00:00:00';
+            let data = this.dataForm.month.split('-');
+            let days = new Date(data[0], data[1], 0).getDate();
+            this.dataForm.endDate =
+              this.dataForm.month + '-' + days + ' 23:59:59';
+            break;
+          default:
+            this.dataForm.dateValue = '';
+            this.dataForm.startDate =
+              this.dataForm.dateTimeRange[0] + ' 00:00:00';
+            this.dataForm.endDate =
+              this.dataForm.dateTimeRange[1] + ' 23:59:59';
+        }
+        this.$refs.form.validate((validate) => {
+          if (!validate) return;
+          this.$emit('handleSearch', this.dataForm);
+        });
       },
-
-    }
-  },
-  methods: {
-    //查询
-    handleSearch() {
       //
-      switch (this.dataForm.dateType) {
-        case 1:
-          this.dataForm.dateValue = this.dataForm.year
-          this.dataForm.startDate = this.dataForm.year + this.startTime
-          this.dataForm.endDate = this.dataForm.year + '-12-31 23:59:59'
-          break;
-        case 2:
-          this.dataForm.dateValue = this.dataForm.year + '年-' + this.dataForm.quarter
-          this.dataForm.startDate = this.dataForm.year + this.quarterList[this.dataForm.quarter][0]
-          this.dataForm.endDate = this.dataForm.year + this.quarterList[this.dataForm.quarter][1]
-          break
-        case 3:
-          this.dataForm.dateValue = this.dataForm.month
-          this.dataForm.startDate = this.dataForm.month + '-01 00:00:00'
-          let data = this.dataForm.month.split('-')
-          let days = new Date(data[0], data[1], 0).getDate()
-          this.dataForm.endDate = this.dataForm.month + '-' + days + ' 23:59:59'
-          break
-        default:
-          this.dataForm.dateValue = ''
-          this.dataForm.startDate = this.dataForm.dateTimeRange[0] + ' 00:00:00'
-          this.dataForm.endDate = this.dataForm.dateTimeRange[1] +  ' 23:59:59'
+      getDays() {},
+      //获取客户信息
+      handleGetCus() {
+        let item = { id: this.dataForm.contactId };
+        this.$refs.supplierListRef.open(item);
+      },
+      //选择客户信息回调
+      getCusInfo(obj) {
+        let params = Object.assign({}, this.dataForm, {
+          contactId: obj.id,
+          contactName: obj.name,
+          sourceName: obj.name,
+          sourceId: obj.id
+        });
+        this.$emit('update:dataForm', params);
+        this.reloadTableData();
+      },
+      //获取订单信息
+      handleGetOrd() {
+        let item = { id: this.dataForm.orderId };
+        this.$refs.orderListDialogRef.open(item);
+      },
+      //选择订单信息回调
+      getOrderInfo(obj) {
+        let params = Object.assign({}, this.dataForm, {
+          orderId: obj.id,
+          orderNo: obj.orderNo,
+          contactId: obj.partbId,
+          contactName: obj.partbName,
+          sourceName: obj.orderNo,
+          sourceId: obj.id
+        });
+        this.$emit('update:dataForm', params);
+        this.reloadTableData();
+      },
+      //获取合同信息
+      handleGetContract() {
+        this.$refs.selectContractRef.open();
+      },
+      changeContract(obj) {
+        let params = Object.assign({}, this.dataForm, {
+          contractId: obj.id,
+          contractName: obj.contractName,
+          sourceId: obj.id,
+          sourceName: obj.contractName,
+          contactId: obj.partbId,
+          contactName: obj.partbName,
+        });
+        this.$emit('update:dataForm', params);
+        this.reloadTableData();
+      },
+      //切换来源类型重置数据
+      handleChange() {
+        let params = Object.assign(
+          {},
+          {
+            ...this.dataForm,
+            orderNo: '',
+            orderId: '',
+            contactId: '',
+            contactName: '',
+            sourceName: '',
+            sourceId: ''
+          }
+        );
+        this.$emit('update:dataForm', params);
+        this.reloadTableData();
+      },
+      reloadTableData() {
+        this.$emit('update:datasource', []);
+      },
+      downloadFile(file) {
+        getFile({ objectName: file.storePath }, file.name);
       }
-      this.$refs.form.validate(validate => {
-        if (!validate) return
-        this.$emit('handleSearch', this.dataForm)
-      })
-    },
-    //
-    getDays() {
-
-
-    },
-    //获取客户信息
-    handleGetCus() {
-      let item = {id: this.dataForm.contactId};
-      this.$refs.supplierListRef.open(item);
-    },
-    //选择客户信息回调
-    getCusInfo(obj) {
-      let params = Object.assign({}, this.dataForm, {
-        contactId: obj.id,
-        contactName: obj.name,
-        sourceName: obj.name,
-        sourceId: obj.id,
-      });
-      this.$emit('update:dataForm', params)
-      this.reloadTableData()
     },
-    //获取订单信息
-    handleGetOrd() {
-      let item = {id: this.dataForm.orderId};
-      this.$refs.orderListDialogRef.open(item);
-    },
-    //选择订单信息回调
-    getOrderInfo(obj) {
-      let params = Object.assign({}, this.dataForm, {
-        orderId: obj.id,
-        orderNo: obj.orderNo,
-        contactId: obj.partbId,
-        contactName: obj.partbName,
-        sourceName: obj.orderNo,
-        sourceId: obj.id,
-      });
-      this.$emit('update:dataForm', params)
-      this.reloadTableData()
-    },
-    //切换来源类型重置数据
-    handleChange() {
-      let params = Object.assign({}, {
-        ...this.dataForm,
-        orderNo: '',
-        orderId: '',
-        contactId: '',
-        contactName: '',
-        sourceName: '',
-        sourceId: '',
-      })
-      this.$emit('update:dataForm', params)
-      this.reloadTableData()
-    },
-    reloadTableData() {
-      this.$emit('update:datasource', [])
-    },
-    downloadFile(file) {
-      getFile({ objectName: file.storePath }, file.name);
-    },
-  },
-  mounted() {
-    // const year = new Date().getFullYear(); // 获取当前年份
-    // for (let i = 0; i < 12; i++) {
-    //   // 获取指定月份的天数
-    //   this.monthByDays[i + 1] = new Date(year, i + 1, 0).getDate()
-    // }
-
-  },
-}
+    mounted() {
+      // const year = new Date().getFullYear(); // 获取当前年份
+      // for (let i = 0; i < 12; i++) {
+      //   // 获取指定月份的天数
+      //   this.monthByDays[i + 1] = new Date(year, i + 1, 0).getDate()
+      // }
+    }
+  };
 </script>
 
-
-
-<style scoped lang="scss">
-
-</style>
+<style scoped lang="scss"></style>

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

@@ -712,7 +712,9 @@
             width: 120,
             prop: 'taxRate',
             label: '税率',
-            slot: 'taxRate',
+            formatter: (row, column) => {
+              return  row.taxRate&&row.taxRate+'%'
+            },
             align: 'center'
           },
           {

+ 4 - 3
src/views/purchasingManage/purchaseOrder/components/inventoryTable.vue

@@ -132,7 +132,9 @@
             style="margin-bottom: 20px"
             :prop="'datasource.' + scope.$index + '.taxRate'"
           >
-            <el-input v-model="scope.row.taxRate"></el-input>
+            <el-input v-model="scope.row.taxRate">
+              <template slot="append">%</template>
+            </el-input>
           </el-form-item>
         </template>
         <template v-slot:totalCount="scope">
@@ -649,7 +651,6 @@
             // slot: 'waitTotalCount',
             align: 'center'
           },
-
           {
             width: 150,
             prop: 'totalCount',
@@ -683,7 +684,7 @@
             show: !this.detailType
           },
           {
-            width: 120,
+            width: 150,
             prop: 'taxRate',
             label: '税率',
             slot: 'taxRate',

+ 4 - 3
src/views/purchasingManage/purchaseOrder/index.vue

@@ -136,11 +136,12 @@
                       >创建委外发货单
                     </el-dropdown-item>
                     <el-dropdown-item command="invoice"
+                    v-if="!['3', '4', '5', '6'].includes(row.sourceType)"
                       >创建收货单
                     </el-dropdown-item>
-                    <el-dropdown-item command="returnOrder"
+                    <!-- <el-dropdown-item command="returnOrder"
                       >创建退货单
-                    </el-dropdown-item>
+                    </el-dropdown-item> -->
                     <el-dropdown-item command="invoiceManage" v-if="!row.hasInvoiceApply"
                       >新增发票
                     </el-dropdown-item>
@@ -394,7 +395,7 @@
           },
           {
             prop: 'payAmount',
-            label: '应付金额(元)',
+            label: '金额(元)',
             align: 'center',
             showOverflowTooltip: true,
             minWidth: 140

+ 4 - 8
src/views/purchasingManage/purchaseOrder/invoice/components/addInvoiceDialog.vue

@@ -127,23 +127,18 @@
 
       </el-row>
       <el-row :gutter="20">
-        <el-col :span="12">
+        <!-- <el-col :span="12">
           <el-form-item prop="isQmsCheck" label="是否需要质检">
             <el-select v-model="form.isQmsCheck" style="width: 100%" placeholder="请选择">
               <el-option label="是" :value="1"></el-option>
               <el-option label="否" :value="0"></el-option>
             </el-select>
           </el-form-item>
-        </el-col>
+        </el-col> -->
         <el-col :span="12">
           <el-form-item prop="receiveFiles" label="附件">
             <fileMain v-model="form.receiveFiles"></fileMain>
-<!--            <fileUpload-->
-<!--              v-model="form.receiveFiles"-->
-<!--              module="main"-->
-<!--              :showLib="false"-->
-<!--              :limit="10"-->
-<!--            />-->
+
           </el-form-item>
         </el-col>
       </el-row>
@@ -171,6 +166,7 @@
     <orderListDialog
       ref="orderListDialogRef"
       @changeParent="changeOrder"
+      :isOutsourcing="1"
     ></orderListDialog>
     <!-- 委外发货单   -->
     <out-source-send-dialog :out-source-send-dialog-flag.sync="outSourceSendDialogFlag" v-if="outSourceSendDialogFlag"

+ 2 - 2
src/views/purchasingManage/purchaseOrder/invoice/components/detailDialog.vue

@@ -126,9 +126,9 @@
                 ></el-option>
               </el-select>
             </el-form-item>
-            <el-form-item prop="isQmsCheck" label="是否需要质检:">
+            <!-- <el-form-item prop="isQmsCheck" label="是否需要质检:">
               {{ form.isQmsCheck == 1 ? '是' : '否' }}
-            </el-form-item>
+            </el-form-item> -->
 
             <el-form-item v-if="form.reviewStatus == 2" label="入库单:">
               <el-link

+ 6 - 2
src/views/purchasingManage/purchaseOrder/invoice/components/orderListDialog.vue

@@ -60,7 +60,8 @@
       searchParams: {
         type: Object,
         default: () => {}
-      }
+      },
+      isOutsourcing:''
     },
 
     data() {
@@ -161,7 +162,7 @@
           },
           {
             prop: 'payAmount',
-            label: '应付金额(元)',
+            label: '金额(元)',
             align: 'center',
             showOverflowTooltip: true,
             minWidth: 170
@@ -192,6 +193,9 @@
 
       /* 表格数据源 */
       datasource({ page, limit, where, order }) {
+        if(this.isOutsourcing){
+         where['isOutsourcing']=this.isOutsourcing
+        }
         return getTableList({
           pageNum: page,
           size: limit,

+ 546 - 536
src/views/purchasingManage/purchasePlanManage/components/inventoryTable.vue

@@ -328,7 +328,6 @@
         <el-form-item
           style="margin-bottom: 20px"
           :prop="'datasource.' + scope.$index + '.supplierName'"
-          
         >
           <el-input
             clearable
@@ -406,119 +405,119 @@
   </el-form>
 </template>
 <script>
-import { numberReg } from 'ele-admin';
-import productList from '@/BIZComponents/product-list.vue';
-import dictMixins from '@/mixins/dictMixins';
-import fileUpload from '@/components/upload/fileUpload';
-import headList from '@/BIZComponents/user-select/user-select.vue';
-import timeDialog from '@/components/timeDialog/index.vue';
-import { copyObj } from '@/utils/util';
-import supplierList from '@/views/purchasingManage/supplierManage/components/parentList.vue';
-import { getInventoryTotalAPI } from '@/api/wms';
-import { getByCode } from '@/api/system/dictionary-data';
-import fileMain from '@/components/addDoc/index.vue';
-import taskinstanceDialog from '@/BIZComponents/procedure/taskinstanceDialog.vue';
+  import { numberReg } from 'ele-admin';
+  import productList from '@/BIZComponents/product-list.vue';
+  import dictMixins from '@/mixins/dictMixins';
+  import fileUpload from '@/components/upload/fileUpload';
+  import headList from '@/BIZComponents/user-select/user-select.vue';
+  import timeDialog from '@/components/timeDialog/index.vue';
+  import { copyObj } from '@/utils/util';
+  import supplierList from '@/views/purchasingManage/supplierManage/components/parentList.vue';
+  import { getInventoryTotalAPI } from '@/api/wms';
+  import { getByCode } from '@/api/system/dictionary-data';
+  import fileMain from '@/components/addDoc/index.vue';
+  import taskinstanceDialog from '@/BIZComponents/procedure/taskinstanceDialog.vue';
 
-export default {
-  mixins: [dictMixins],
-  props: {
-    needInquiry: {
-      type: Number,
-      default: 1
+  export default {
+    mixins: [dictMixins],
+    props: {
+      needInquiry: {
+        type: Number,
+        default: 1
+      },
+      detailType: {
+        type: Number,
+        default: 0
+      }
     },
-    detailType: {
-      type: Number,
-      default: 0
-    }
-  },
-  components: {
-    taskinstanceDialog,
-    fileMain,
-    supplierList,
-    productList,
-    fileUpload,
-    headList,
-    timeDialog
-  },
-  computed: {
-    isNeedInquiry() {
-      if (this.needInquiry === 1) {
-        // this.form.datasource.forEach(item => {
-        //   item.supplierCode = ''
-        //   item.supplierId = ''
-        //   item.supplierName = ''
-        // })
+    components: {
+      taskinstanceDialog,
+      fileMain,
+      supplierList,
+      productList,
+      fileUpload,
+      headList,
+      timeDialog
+    },
+    computed: {
+      isNeedInquiry() {
+        if (this.needInquiry === 1) {
+          // this.form.datasource.forEach(item => {
+          //   item.supplierCode = ''
+          //   item.supplierId = ''
+          //   item.supplierName = ''
+          // })
+        }
+        return this.needInquiry;
       }
-      return this.needInquiry;
-    }
-  },
-  data() {
-    const defaultForm = {
-      key: null,
-      endTime: '',
-      isFirst: 0,
-      name: '',
-      supplierName: '',
-      weightUnit: ''
-    };
-    return {
-      curIndex: null,
-      numberReg,
-      defaultForm,
-      arrivalWayList: [
-        { label: '一次性到货', value: 1 },
-        { label: '分批到货', value: 2 }
-      ],
-      form: {
-        datasource: []
-      },
-      taskinstanceDialogFlag: false,
-      rules: {},
-      dictList: {},
-      columns: [
-        {
-          width: 45,
-          type: 'index',
-          columnKey: 'index',
-          align: 'center'
-        },
-        {
-          width: 150,
-          prop: 'productCategoryName',
-          label: '分类',
-          slot: 'productCategoryName',
-          align: 'center'
-        },
-        {
-          width: 140,
-          prop: 'productCode',
-          label: '编码',
-          slot: 'productCode',
-          align: 'center'
-        },
-        {
-          width: 240,
-          prop: 'productName',
-          label: '名称',
-          slot: 'productName',
-          headerSlot: 'headerProductName',
-          align: 'center'
-        },
-        {
-          width: 240,
-          prop: 'taskName',
-          label: '工序',
-          slot: 'taskName',
-          align: 'center'
-        },
-        {
-          width: 110,
-          prop: 'batchNo',
-          label: '批次号',
-          slot: 'batchNo',
-          align: 'center'
+    },
+    data() {
+      const defaultForm = {
+        key: null,
+        endTime: '',
+        isFirst: 0,
+        name: '',
+        supplierName: '',
+        weightUnit: ''
+      };
+      return {
+        curIndex: null,
+        numberReg,
+        defaultForm,
+        arrivalWayList: [
+          { label: '一次性到货', value: 1 },
+          { label: '分批到货', value: 2 }
+        ],
+        form: {
+          datasource: []
         },
-        {
+        taskinstanceDialogFlag: false,
+        rules: {},
+        dictList: {},
+        columns: [
+          {
+            width: 45,
+            type: 'index',
+            columnKey: 'index',
+            align: 'center'
+          },
+          {
+            width: 150,
+            prop: 'productCategoryName',
+            label: '分类',
+            slot: 'productCategoryName',
+            align: 'center'
+          },
+          {
+            width: 140,
+            prop: 'productCode',
+            label: '编码',
+            slot: 'productCode',
+            align: 'center'
+          },
+          {
+            width: 240,
+            prop: 'productName',
+            label: '名称',
+            slot: 'productName',
+            headerSlot: 'headerProductName',
+            align: 'center'
+          },
+          {
+            width: 240,
+            prop: 'taskName',
+            label: '工序',
+            slot: 'taskName',
+            align: 'center'
+          },
+          {
+            width: 110,
+            prop: 'batchNo',
+            label: '批次号',
+            slot: 'batchNo',
+            align: 'center'
+          },
+          {
             prop: 'provenance',
             label: '产地',
             slot: 'provenance',
@@ -526,464 +525,475 @@ export default {
             showOverflowTooltip: true,
             minWidth: 200
           },
-        {
-          width: 90,
-          prop: 'totalCount',
-          label: '数量',
-          slot: 'totalCount',
-          headerSlot: 'headerTotalCount',
-          align: 'center'
-        },
-        {
-          width: 80,
-          prop: 'availableCountBase',
-          label: '库存数量',
-          slot: 'availableCountBase',
-          align: 'center'
-        },
-        {
-          width: 120,
-          prop: 'totalWeight',
-          label: '重量',
-          slot: 'totalWeight',
-          align: 'center'
-        },
-        {
-          width: 160,
-          prop: 'arrivalWay',
-          label: '到货方式',
-          slot: 'arrivalWay',
-          headerSlot: 'headerArrivalWay',
-          align: 'center'
-        },
-        {
-          width: 170,
-          prop: 'expectReceiveDate',
-          label: '到货日期',
-          slot: 'expectReceiveDate',
-          headerSlot: 'headerExpectReceiveDate',
-          align: 'center'
-        },
+          {
+            width: 150,
+            prop: 'reqTotalCount',
+            label: '需求数量',
+            align: 'center'
+          },
+          {
+            width: 90,
+            prop: 'totalCount',
+            label: '数量',
+            slot: 'totalCount',
+            headerSlot: 'headerTotalCount',
+            align: 'center'
+          },
+          {
+            width: 80,
+            prop: 'availableCountBase',
+            label: '库存数量',
+            slot: 'availableCountBase',
+            align: 'center'
+          },
+          {
+            width: 120,
+            prop: 'totalWeight',
+            label: '重量',
+            slot: 'totalWeight',
+            align: 'center'
+          },
+          {
+            width: 160,
+            prop: 'arrivalWay',
+            label: '到货方式',
+            slot: 'arrivalWay',
+            headerSlot: 'headerArrivalWay',
+            align: 'center'
+          },
+          {
+            width: 170,
+            prop: 'expectReceiveDate',
+            label: '到货日期',
+            slot: 'expectReceiveDate',
+            headerSlot: 'headerExpectReceiveDate',
+            align: 'center'
+          },
 
-        {
-          width: 130,
-          prop: 'supplierName',
-          label: '供应商',
-          slot: 'supplierName',
-          // headerSlot: 'headerSupplierName',
-          align: 'center'
-        },
+          {
+            width: 130,
+            prop: 'supplierName',
+            label: '供应商',
+            slot: 'supplierName',
+            // headerSlot: 'headerSupplierName',
+            align: 'center'
+          },
 
-        {
-          width: 130,
-          prop: 'brand',
-          label: '品牌',
-          slot: 'brand',
-          align: 'center'
-        },
-        // {
-        //   width: 120,
-        //   prop: 'singleWeight',
-        //   label: '单重',
-        //   slot: 'singleWeight',
-        //   align: 'center'
-        // },
+          {
+            width: 130,
+            prop: 'brand',
+            label: '品牌',
+            slot: 'brand',
+            align: 'center'
+          },
+          // {
+          //   width: 120,
+          //   prop: 'singleWeight',
+          //   label: '单重',
+          //   slot: 'singleWeight',
+          //   align: 'center'
+          // },
 
-        {
-          width: 160,
-          prop: 'technicalDrawings',
-          label: '图纸附件',
-          slot: 'technicalDrawings'
-        },
-        {
-          width: 160,
-          prop: 'files',
-          label: '附件',
-          slot: 'files'
-        },
-        {
-          width: 150,
-          prop: 'productBrand',
-          label: '牌号',
-          slot: 'productBrand',
-          align: 'center'
-        },
-        {
-          width: 130,
-          prop: 'modelType',
-          label: '型号',
-          slot: 'modelType',
-          align: 'center'
-        },
+          {
+            width: 160,
+            prop: 'technicalDrawings',
+            label: '图纸附件',
+            slot: 'technicalDrawings'
+          },
+          {
+            width: 160,
+            prop: 'files',
+            label: '附件',
+            slot: 'files'
+          },
+          {
+            width: 150,
+            prop: 'productBrand',
+            label: '牌号',
+            slot: 'productBrand',
+            align: 'center'
+          },
+          {
+            width: 130,
+            prop: 'modelType',
+            label: '型号',
+            slot: 'modelType',
+            align: 'center'
+          },
 
-        {
-          width: 120,
-          prop: 'specification',
-          label: '规格',
-          slot: 'specification',
-          align: 'center'
-        },
-        {
-          width: 120,
-          prop: 'imgCode',
-          align: 'center',
-          label: '图号/件号',
-          showOverflowTooltip: true
-        },
-        {
-          width: 120,
-          prop: 'produceType',
-          align: 'center',
-          label: '生产类型',
-          showOverflowTooltip: true,
-          formatter: (row, column) => {
-            return row.produceType && row.produceType.length
-              ? row.produceType
-                  .map((item) => this.getDictV('productionType', item + ''))
-                  .join(',')
-              : '';
-          }
-        },
-        {
-          width: 120,
-          prop: 'approvalNumber',
-          align: 'center',
-          label: '批准文号',
-          showOverflowTooltip: true
-        },
-        {
-          width: 120,
-          prop: 'packingSpecification',
-          align: 'center',
-          label: '包装规格',
-          showOverflowTooltip: true
-        },
+          {
+            width: 120,
+            prop: 'specification',
+            label: '规格',
+            slot: 'specification',
+            align: 'center'
+          },
+          {
+            width: 120,
+            prop: 'imgCode',
+            align: 'center',
+            label: '图号/件号',
+            showOverflowTooltip: true
+          },
+          {
+            width: 120,
+            prop: 'produceType',
+            align: 'center',
+            label: '生产类型',
+            showOverflowTooltip: true,
+            formatter: (row, column) => {
+              return row.produceType && row.produceType.length
+                ? row.produceType
+                    .map((item) => this.getDictV('productionType', item + ''))
+                    .join(',')
+                : '';
+            }
+          },
+          {
+            width: 120,
+            prop: 'approvalNumber',
+            align: 'center',
+            label: '批准文号',
+            showOverflowTooltip: true
+          },
+          {
+            width: 120,
+            prop: 'packingSpecification',
+            align: 'center',
+            label: '包装规格',
+            showOverflowTooltip: true
+          },
 
-        {
-          width: 100,
-          prop: 'measuringUnit',
-          label: '单位',
-          slot: 'measuringUnit',
-          align: 'center'
-        },
+          {
+            width: 100,
+            prop: 'measuringUnit',
+            label: '单位',
+            slot: 'measuringUnit',
+            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() {
-    this.getDictList('productionType');
-  },
-  methods: {
-    getDictV(code, val) {
-      if (!this.dictList[code]) return '';
-      return this.dictList[code].find((item) => item.value == val)?.label;
-    },
-    async getDictList(code) {
-      let { data: res } = await getByCode(code);
-      this.dictList[code] = res.map((item) => {
-        let values = Object.keys(item);
-        return {
-          value: values[0],
-          label: item[values[0]]
-        };
-      });
-    },
-    // 返回列表数据
-    getTableValue() {
-      let comitDatasource = this.form.datasource;
-      if (comitDatasource.length === 0) return [];
-      comitDatasource.forEach((v) => {
-        v.totalPrice = (v.totalCount * v.singlePrice)?.toFixed(2) || 0;
-        v.files = v.files || [];
-        v.technicalDrawings = v.technicalDrawings || [];
-        v.arrivalBatch = v.arrivalBatch || [];
-        v.detailType = this.detailType;
-      });
-      return comitDatasource;
+          {
+            width: 220,
+            prop: 'remark',
+            label: '备注',
+            slot: 'remark',
+            align: 'center'
+          },
+          {
+            columnKey: 'action',
+            label: '操作',
+            width: 120,
+            align: 'center',
+            resizable: false,
+            slot: 'action',
+            fixed: 'right',
+            showOverflowTooltip: true
+          }
+        ]
+      };
     },
-    //计算单重
-    singleWeightChange(row, index) {
-      if (row && row.singleWeight && row.totalCount) {
-        row.totalWeight = (row.singleWeight * row.totalCount).toFixed(2) || 0;
-        this.$set(this.form.datasource[index], 'totalWeight', row.totalWeight);
-      }
+    created() {
+      this.getDictList('productionType');
     },
-    //修改回显
-    async putTableValue(data) {
-      if (data && data?.length) {
-        this.form.datasource = [];
-        data.forEach((row) => {
-          row['arrivalWay']=row.arrivalWay||1
-          let item = JSON.parse(JSON.stringify(row));
-          item.key = this.form.datasource.length + 1;
-          item = {
-            ...this.defaultForm,
-            ...item
+    methods: {
+      getDictV(code, val) {
+        if (!this.dictList[code]) return '';
+        return this.dictList[code].find((item) => item.value == val)?.label;
+      },
+      async getDictList(code) {
+        let { data: res } = await getByCode(code);
+        this.dictList[code] = res.map((item) => {
+          let values = Object.keys(item);
+          return {
+            value: values[0],
+            label: item[values[0]]
           };
-          this.form.datasource.push(item);
         });
-        let codeList = this.form.datasource.map((item) => item.productCode);
-        //获取仓库库存
-        let inventoryTotalList = await getInventoryTotalAPI(codeList);
-        this.form.datasource.forEach((item) => {
-          let find =
-            inventoryTotalList.find((key) => key.code == item.productCode) ||
-            {};
-          item.availableCountBase = find.availableCountBase;
+      },
+      // 返回列表数据
+      getTableValue() {
+        let comitDatasource = this.form.datasource;
+        if (comitDatasource.length === 0) return [];
+        comitDatasource.forEach((v) => {
+          v.totalPrice = (v.totalCount * v.singlePrice)?.toFixed(2) || 0;
+          v.files = v.files || [];
+          v.technicalDrawings = v.technicalDrawings || [];
+          v.arrivalBatch = v.arrivalBatch || [];
+          v.detailType = this.detailType;
         });
-        this.$refs.table.reload();
-      }
-    },
-    handleMethod(row, index) {
-      this.curIndex = index;
-      this.$refs.timeDialogRef.open(row, index);
-    },
-    chooseTime(row, arrivalBatch) {
-      row.arrivalBatch = copyObj(arrivalBatch);
-      this.$set(
-        this.form.datasource[this.curIndex],
-        'arrivalBatch',
-        copyObj(arrivalBatch)
-      );
-    },
-    handleTaskinstance(row, index) {
-      this.taskinstanceDialogFlag = true;
-      this.$nextTick(() => {
-        this.$refs.taskinstanceDialogRef.open(row, index);
-      });
-    },
-    saveTaskInstance(row = {}) {
-      this.$set(this.form.datasource[row.index], 'taskId', row.id);
-      this.$set(this.form.datasource[row.index], 'taskName', row.name);
-      this.$set(
-        this.form.datasource[row.index],
-        'routingId',
-        row.produceRoutingId
-      );
-    },
-    //获取供应商信息
-    handleGetSup(e, row, index) {
-      this.curIndex = index;
-      if (e.target.nodeName == 'I') {
-        this.$set(this.form.datasource[this.curIndex], 'supplierCode', '');
-        this.$set(this.form.datasource[this.curIndex], 'supplierId', '');
-        this.$set(this.form.datasource[this.curIndex], 'supplierName', '');
-        return;
-      }
-      let item = { id: row.supplierId };
-      this.$refs.supplierListRef.open(item);
-    },
-    //选择供应商信息回调
-    getSupInfo(obj) {
-      let params = {
-        supplierCode: obj.code,
-        supplierId: obj.id,
-        supplierName: obj.name
-      };
-      this.$set(
-        this.form.datasource[this.curIndex],
-        'supplierCode',
-        params.supplierCode
-      );
-      this.$set(
-        this.form.datasource[this.curIndex],
-        'supplierId',
-        params.supplierId
-      );
-      this.$set(
-        this.form.datasource[this.curIndex],
-        'supplierName',
-        params.supplierName
-      );
-    },
-    //选择产品
-    handParent(row, index) {
-      // let item = {
-      //   id: row.productCode
-      // };
-      this.$refs.productListRef.open(this.form.datasource, 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);
-    },
-    getSelectionCbom(obj, idx = -1) {
-      obj.forEach((item, index) => {
-        let i = idx == -1 ? index : idx;
-        let row = JSON.parse(JSON.stringify(this.defaultForm));
-        row.key = this.form.datasource.length + 1;
-        let parasm = idx == -1 ? row : this.form.datasource[i];
-        this.$set(parasm, 'productId', item.id);
-        // this.$set(parasm, 'id', item.id);
-        this.$set(parasm, 'categoryName', item.name);
-        this.$set(parasm, 'productCategoryId', item.categoryLevelId);
-        this.$set(parasm, 'productBrand', item.brandNum);
+        return comitDatasource;
+      },
+      //计算单重
+      singleWeightChange(row, index) {
+        if (row && row.singleWeight && row.totalCount) {
+          row.totalWeight = (row.singleWeight * row.totalCount).toFixed(2) || 0;
+          this.$set(
+            this.form.datasource[index],
+            'totalWeight',
+            row.totalWeight
+          );
+        }
+      },
+      //修改回显
+      async putTableValue(data) {
+        if (data && data?.length) {
+          this.form.datasource = [];
+          data.forEach((row) => {
+            row['reqTotalCount']=row['reqTotalCount']||row.totalCount
+            row['arrivalWay'] = row.arrivalWay || 1;
+            let item = JSON.parse(JSON.stringify(row));
+            item.key = this.form.datasource.length + 1;
+            item = {
+              ...this.defaultForm,
+              ...item
+            };
+            this.form.datasource.push(item);
+          });
+          let codeList = this.form.datasource.map((item) => item.productCode);
+          //获取仓库库存
+          let inventoryTotalList = await getInventoryTotalAPI(codeList);
+          this.form.datasource.forEach((item) => {
+            let find =
+              inventoryTotalList.find((key) => key.code == item.productCode) ||
+              {};
+            item.availableCountBase = find.availableCountBase;
+          });
+          this.$refs.table.reload();
+        }
+      },
+      handleMethod(row, index) {
+        this.curIndex = index;
+        this.$refs.timeDialogRef.open(row, index);
+      },
+      chooseTime(row, arrivalBatch) {
+        row.arrivalBatch = copyObj(arrivalBatch);
         this.$set(
-          parasm,
-          'productCategoryName',
-          item.category.categoryLevelPath
+          this.form.datasource[this.curIndex],
+          'arrivalBatch',
+          copyObj(arrivalBatch)
         );
-        this.$set(parasm, 'totalCount', item.dosage);
-        this.$set(parasm, 'productCode', item.code);
-        this.$set(parasm, 'productName', item.name);
-        this.$set(parasm, 'availableCountBase', item.availableCountBase);
-        this.$set(parasm, 'modelType', item.modelType);
-        this.$set(parasm, 'weightUnit', item.weightUnit);
-        this.$set(parasm, 'measuringUnit', item.unit);
-        this.$set(parasm, 'specification', item.specification);
-        this.$set(parasm, 'remark', '');
-        this.$set(parasm, 'imgCode', item.imgCode);
-        this.$set(parasm, 'produceType', item.produceType);
-        this.$set(parasm, 'singleWeight', item.roughWeight);
-
-        this.$set(parasm, 'approvalNumber', item.extField.approvalNumber);
+      },
+      handleTaskinstance(row, index) {
+        this.taskinstanceDialogFlag = true;
+        this.$nextTick(() => {
+          this.$refs.taskinstanceDialogRef.open(row, index);
+        });
+      },
+      saveTaskInstance(row = {}) {
+        this.$set(this.form.datasource[row.index], 'taskId', row.id);
+        this.$set(this.form.datasource[row.index], 'taskName', row.name);
         this.$set(
-          parasm,
-          'packingSpecification',
-          item.extField.packingSpecification
+          this.form.datasource[row.index],
+          'routingId',
+          row.produceRoutingId
         );
-        this.$set(parasm, 'provenance', item.purchaseOrigins || []);
-        if (idx == -1) {
-          this.form.datasource.push(row);
+      },
+      //获取供应商信息
+      handleGetSup(e, row, index) {
+        this.curIndex = index;
+        if (e.target.nodeName == 'I') {
+          this.$set(this.form.datasource[this.curIndex], 'supplierCode', '');
+          this.$set(this.form.datasource[this.curIndex], 'supplierId', '');
+          this.$set(this.form.datasource[this.curIndex], 'supplierName', '');
+          return;
         }
-      });
-    },
-    //选择产品回调
-    changeParent(obj, idx) {
-      obj.forEach((item, index) => {
-        let i = idx == -1 ? index : idx;
-        let row = JSON.parse(JSON.stringify(this.defaultForm));
-        row.key = this.form.datasource.length + 1;
-        let parasm = idx == -1 ? row : this.form.datasource[i];
-        this.$set(parasm, 'productId', item.id);
-        // this.$set(parasm, 'id', item.id);
-        this.$set(parasm, 'categoryName', item.name);
-        this.$set(parasm, 'productCategoryId', item.categoryLevelId);
-        this.$set(parasm, 'productBrand', item.brandNum);
-        this.$set(parasm, 'productCategoryName', item.categoryLevelPath);
-        this.$set(parasm, 'productCode', item.code);
-        this.$set(parasm, 'productName', item.name);
-        this.$set(parasm, 'availableCountBase', item.availableCountBase);
-        this.$set(parasm, 'modelType', item.modelType);
-        this.$set(parasm, 'weightUnit', item.weightUnit);
-        this.$set(parasm, 'measuringUnit', item.measuringUnit);
-        this.$set(parasm, 'specification', item.specification);
-        this.$set(parasm, 'singleWeight', item.netWeight);
-        row['arrivalWay']=row.arrivalWay||1
-
-        this.$set(parasm, 'remark', '');
-        this.$set(parasm, 'imgCode', item.imgCode);
-        this.$set(parasm, 'produceType', item.produceType);
-        this.$set(parasm, 'approvalNumber', item.extField.approvalNumber);
+        let item = { id: row.supplierId };
+        this.$refs.supplierListRef.open(item);
+      },
+      //选择供应商信息回调
+      getSupInfo(obj) {
+        let params = {
+          supplierCode: obj.code,
+          supplierId: obj.id,
+          supplierName: obj.name
+        };
         this.$set(
-          parasm,
-          'packingSpecification',
-          item.extField.packingSpecification
+          this.form.datasource[this.curIndex],
+          'supplierCode',
+          params.supplierCode
         );
-        if (idx == -1) {
-          this.form.datasource.push(row);
-        }
-      });
-    },
-    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() {
-      let item = JSON.parse(JSON.stringify(this.defaultForm));
-      item.key = this.form.datasource.length + 1;
-      this.form.datasource.push(item);
-    },
+        this.$set(
+          this.form.datasource[this.curIndex],
+          'supplierId',
+          params.supplierId
+        );
+        this.$set(
+          this.form.datasource[this.curIndex],
+          'supplierName',
+          params.supplierName
+        );
+      },
+      //选择产品
+      handParent(row, index) {
+        // let item = {
+        //   id: row.productCode
+        // };
+        this.$refs.productListRef.open(this.form.datasource, 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);
+      },
+      getSelectionCbom(obj, idx = -1) {
+        obj.forEach((item, index) => {
+          let i = idx == -1 ? index : idx;
+          let row = JSON.parse(JSON.stringify(this.defaultForm));
+          row.key = this.form.datasource.length + 1;
+          let parasm = idx == -1 ? row : this.form.datasource[i];
+          this.$set(parasm, 'productId', item.id);
+          // this.$set(parasm, 'id', item.id);
+          this.$set(parasm, 'categoryName', item.name);
+          this.$set(parasm, 'productCategoryId', item.categoryLevelId);
+          this.$set(parasm, 'productBrand', item.brandNum);
+          this.$set(
+            parasm,
+            'productCategoryName',
+            item.category.categoryLevelPath
+          );
+          this.$set(parasm, 'totalCount', item.dosage);
+          this.$set(parasm, 'productCode', item.code);
+          this.$set(parasm, 'productName', item.name);
+          this.$set(parasm, 'availableCountBase', item.availableCountBase);
+          this.$set(parasm, 'modelType', item.modelType);
+          this.$set(parasm, 'weightUnit', item.weightUnit);
+          this.$set(parasm, 'measuringUnit', item.unit);
+          this.$set(parasm, 'specification', item.specification);
+          this.$set(parasm, 'remark', '');
+          this.$set(parasm, 'imgCode', item.imgCode);
+          this.$set(parasm, 'produceType', item.produceType);
+          this.$set(parasm, 'singleWeight', item.roughWeight);
 
-    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);
+          this.$set(parasm, 'approvalNumber', item.extField.approvalNumber);
+          this.$set(
+            parasm,
+            'packingSpecification',
+            item.extField.packingSpecification
+          );
+          this.$set(parasm, 'provenance', item.purchaseOrigins || []);
+          if (idx == -1) {
+            this.form.datasource.push(row);
           }
-        }
-        callback(valid);
-      });
+        });
+      },
+      //选择产品回调
+      changeParent(obj, idx) {
+        obj.forEach((item, index) => {
+          let i = idx == -1 ? index : idx;
+          let row = JSON.parse(JSON.stringify(this.defaultForm));
+          row.key = this.form.datasource.length + 1;
+          let parasm = idx == -1 ? row : this.form.datasource[i];
+          this.$set(parasm, 'productId', item.id);
+          // this.$set(parasm, 'id', item.id);
+          this.$set(parasm, 'categoryName', item.name);
+          this.$set(parasm, 'productCategoryId', item.categoryLevelId);
+          this.$set(parasm, 'productBrand', item.brandNum);
+          this.$set(parasm, 'productCategoryName', item.categoryLevelPath);
+          this.$set(parasm, 'productCode', item.code);
+          this.$set(parasm, 'productName', item.name);
+          this.$set(parasm, 'availableCountBase', item.availableCountBase);
+          this.$set(parasm, 'modelType', item.modelType);
+          this.$set(parasm, 'weightUnit', item.weightUnit);
+          this.$set(parasm, 'measuringUnit', item.measuringUnit);
+          this.$set(parasm, 'specification', item.specification);
+          this.$set(parasm, 'singleWeight', item.netWeight);
+          row['arrivalWay'] = row.arrivalWay || 1;
+
+          this.$set(parasm, 'remark', '');
+          this.$set(parasm, 'imgCode', item.imgCode);
+          this.$set(parasm, 'produceType', item.produceType);
+          this.$set(parasm, 'approvalNumber', item.extField.approvalNumber);
+          this.$set(
+            parasm,
+            'packingSpecification',
+            item.extField.packingSpecification
+          );
+          if (idx == -1) {
+            this.form.datasource.push(row);
+          }
+        });
+      },
+      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() {
+        let item = JSON.parse(JSON.stringify(this.defaultForm));
+        item.key = this.form.datasource.length + 1;
+        this.form.datasource.push(item);
+      },
+
+      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);
+        });
+      }
     }
-  }
-};
+  };
 </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;
+    .amount {
+      font-size: 14px;
+      font-weight: bold;
+    }
   }
-}
 
-.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;
+  }
 </style>

+ 2 - 2
src/views/saleManage/businessOpportunity/components/addOpportunityDialog.vue

@@ -155,7 +155,7 @@
         </el-col>
       </el-row>
     </el-form>
-    <headerTitle title="品清单"></headerTitle>
+    <headerTitle title="品清单"></headerTitle>
 
     <inventoryTable
       ref="inventoryTable"
@@ -555,7 +555,7 @@
           });
 
           if (this.$refs.inventoryTable.getTableValue().length == 0) {
-            this.$message.warning('品清单不能为空');
+            this.$message.warning('品清单不能为空');
 
             return;
           }

+ 2 - 2
src/views/saleManage/businessOpportunity/components/drawer.vue

@@ -43,7 +43,7 @@
         <el-tab-pane label="详细信息" name="详细信息">
           <opportunityInfo ref="opportunityInfoRef"></opportunityInfo>
         </el-tab-pane>
-        <el-tab-pane label="产品清单" name="产品清单">
+        <el-tab-pane label="物品清单" name="物品清单">
           <inventoryTableDetails
             ref="inventoryTable"
             :isSinglePrice="false"
@@ -211,7 +211,7 @@
           this.loading = true;
 
           if (this.$refs.inventoryTable.getTableValue().length == 0) {
-            this.$message.warning('品清单不能为空');
+            this.$message.warning('品清单不能为空');
             return;
           }
           const commitData = {

+ 1 - 1
src/views/saleManage/businessOpportunity/components/opportunityDetailDialog.vue

@@ -103,7 +103,7 @@
           </el-col>
         </el-row>
       </el-form>
-      <headerTitle title="品清单" style="margin-top: 15px"></headerTitle>
+      <headerTitle title="品清单" style="margin-top: 15px"></headerTitle>
       <inventoryTabledetail
         ref="inventoryTabledetailRef"
         :isCustomerMark="false"

+ 1 - 1
src/views/saleManage/quotation/components/addDialog.vue

@@ -222,7 +222,7 @@
         </el-col>
       </el-row>
 
-      <headerTitle title="报价单品清单"></headerTitle>
+      <headerTitle title="报价单品清单"></headerTitle>
       <inventoryTable
         ref="inventoryTable"
         :customerMark="form.customerMark"

+ 1 - 1
src/views/saleManage/quotation/components/detailDialog.vue

@@ -144,7 +144,7 @@
             </el-form-item>
        </el-col >
         </el-row>
-        <headerTitle title="报价单品清单"></headerTitle>
+        <headerTitle title="报价单品清单"></headerTitle>
         <inventoryTabledetail
           :isCustomerMark="false"
           ref="inventoryTabledetailRef"

+ 24 - 2
src/views/saleManage/saleOrder/accountstatement/components/saleForm.vue

@@ -187,17 +187,23 @@
       @changeParent="getOrderInfo"
       :contactData="contactData"
     ></orderListDialog>
+    <contractListDialog
+      ref="selectContractRef"
+      @changeParent="changeContract"
+      :type="1"
+    ></contractListDialog>
   </el-form>
 </template>
 <script xmlns:el-col="http://www.w3.org/1999/html">
   import parentList from '@/views/saleManage/contact/components/parentList.vue';
   import OrderListDialog from '@/views/saleManage/saleOrder/accountstatement/components/orderListDialog.vue';
   import { getFile } from '@/api/system/file';
-  import fileMain from "@/components/addDoc/index.vue";
+  import fileMain from '@/components/addDoc/index.vue';
+  import contractListDialog from '@/views/saleManage/saleOrder/components/contractListDialog.vue';
 
   export default {
     name: 'saleForm',
-    components: { OrderListDialog, parentList,fileMain },
+    components: { OrderListDialog, parentList, fileMain, contractListDialog },
     //客户管理数据
     props: {
       dataForm: {
@@ -310,6 +316,22 @@
         this.$emit('update:dataForm', params);
         this.reloadTableData();
       },
+      //获取合同信息
+      handleGetContract() {
+        this.$refs.selectContractRef.open();
+      },
+      changeContract(obj) {
+        let params = Object.assign({}, this.dataForm, {
+          contractId: obj.id,
+          contractName: obj.contractName,
+          sourceId: obj.id,
+          sourceName: obj.contractName,
+          contactId: obj.partbId,
+          contactName: obj.partbName
+        });
+        this.$emit('update:dataForm', params);
+        this.reloadTableData();
+      },
       //获取订单信息
       handleGetOrd() {
         let item = { id: this.dataForm.orderId };

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

@@ -267,7 +267,7 @@
         </el-col>
       </el-row>
 
-      <headerTitle title="品清单" style="margin-top: 30px"></headerTitle>
+      <headerTitle title="品清单" style="margin-top: 30px"></headerTitle>
       <inventoryTable
         :customerMark="customerMark"
         :isCustomerMark="true"

+ 1 - 1
src/views/saleManage/saleOrder/components/darwerComponents/saleOrderInfo.vue

@@ -176,7 +176,7 @@
       </el-row>
     </el-form>
 
-    <headerTitle title="品清单"></headerTitle>
+    <headerTitle title="品清单"></headerTitle>
     <inventoryTabledetail
       ref="inventoryTabledetailRef"
       :isCustomerMark="true"

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

@@ -231,7 +231,7 @@
         </el-row>
       </el-form>
 
-      <headerTitle title="品清单"></headerTitle>
+      <headerTitle title="品清单"></headerTitle>
       <inventoryTabledetail
         @toSendTab="toSendTab"
         ref="inventoryTabledetailRef"

+ 1 - 1
src/views/saleManage/saleOrder/customerReturnOrder/add-sale-order-dialog.vue

@@ -102,7 +102,7 @@
       </el-row>
     </el-form>
 
-    <headerTitle title="品清单" style="margin-top: 30px"></headerTitle>
+    <headerTitle title="品清单" style="margin-top: 30px"></headerTitle>
     <inventoryTable
       :pricingWay="form.pricingWay"
       :entrustedCode="form.entrustedCode"

+ 1 - 1
src/views/saleManage/saleOrder/entrustedReceive/components/addOrEditDialog.vue

@@ -116,7 +116,7 @@
 
     </el-form>
 
-    <headerTitle title="品清单" style="margin-top: 30px"></headerTitle>
+    <headerTitle title="品清单" style="margin-top: 30px"></headerTitle>
     <inventoryTable
       :pricingWay="form.pricingWay"
       ref="inventoryTableref"

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

@@ -110,7 +110,7 @@
         </el-row>
       </el-form>
 
-      <headerTitle title="品清单"></headerTitle>
+      <headerTitle title="品清单"></headerTitle>
       <ele-pro-table
         ref="table"
         :needPage="false"

+ 1 - 1
src/views/saleManage/saleOrder/exceptionManagement/components/addOrEditDialog.vue

@@ -83,7 +83,7 @@
           </el-form-item>
         </el-col>
       </el-row>
-      <headerTitle title="品清单" style="margin-top: 30px"></headerTitle>
+      <headerTitle title="品清单" style="margin-top: 30px"></headerTitle>
     <ele-pro-table
       ref="table"
       :needPage="false"

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

@@ -114,7 +114,7 @@
 
     </el-form>
     <el-tabs v-model="activeName" style="margin-top: 15px" type="border-card">
-      <el-tab-pane label="品清单" name="first">
+      <el-tab-pane label="品清单" name="first">
    
         <inventoryTable
           :pricingWay="form.pricingWay"

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

@@ -116,7 +116,7 @@
         </el-row>
       </el-form>
       <el-tabs type="border-card">
-        <el-tab-pane label="品清单">
+        <el-tab-pane label="品清单">
           <ele-pro-table
             ref="table"
             :needPage="false"

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

@@ -157,7 +157,7 @@
           </el-form-item>
         </el-col>
       </el-row>
-      <headerTitle title="原品清单" style="margin-top: 30px"></headerTitle>
+      <headerTitle title="原品清单" style="margin-top: 30px"></headerTitle>
       <ele-pro-table
         ref="table"
         :needPage="false"
@@ -168,7 +168,7 @@
       >
       </ele-pro-table>
       <headerTitle
-        title="退货品明细"
+        title="退货品明细"
         style="margin-top: 30px"
         v-show="!['40', '50'].includes(form.type) || form.returnSourceType != 1"
       ></headerTitle>

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

@@ -126,7 +126,7 @@
           </el-col>
         </el-row>
       </el-form>
-      <headerTitle title="原品清单" style="margin-top: 30px"></headerTitle>
+      <headerTitle title="原品清单" style="margin-top: 30px"></headerTitle>
       <ele-pro-table
         ref="table"
         :needPage="false"
@@ -136,7 +136,7 @@
         row-key="id"
       >
       </ele-pro-table>
-      <headerTitle title="退货品明细"
+      <headerTitle title="退货品明细"
       v-show="!['40', '50'].includes(form.type) || form.returnSourceType != 1"
       ></headerTitle>
       <ele-pro-table