yusheng 1 سال پیش
والد
کامیت
493984dd86

+ 2 - 3
src/views/contractManage/contractBook/index.vue

@@ -32,7 +32,6 @@
               full-height="calc(100vh - 116px)"
               tool-class="ele-toolbar-form"
               :selection.sync="selection"
-              cache-key="eomContactPageTable"
             >
               <!-- 表头工具栏 -->
               <template v-slot:toolbar>
@@ -370,11 +369,11 @@ export default {
           }
         },
         {
-          prop: 'createUserName',
+          prop: 'createUsername',
           label: '创建人',
           align: 'center',
           showOverflowTooltip: true,
-          minWidth: 80
+          minWidth: 120
         },
         {
           prop: 'createTime',

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

@@ -327,6 +327,7 @@
           this.$nextTick(() => {
             this.$refs.inventoryTable &&
               this.$refs.inventoryTable.putTableValue(data.detailList);
+              this.setIsInquiry()
             // this.$refs.rawDetailListRef &&
             //   this.$refs.rawDetailListRef.putTableValue(data.rawDetailList); //原料
             // this.$refs.outputDetailListRef &&

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

@@ -221,7 +221,7 @@
       </template>
       <template
         v-slot:guaranteePeriodUnitCode="scope"
-        v-if="status !== 'Detail'"
+   
       >
         <el-form-item
           style="margin-bottom: 20px"
@@ -669,6 +669,7 @@
       this.getSpanArr();
       this.setDeliveryDays();
       this.setIsInquiry();
+
       // this.dataList=copyObj(this.list)
     },
     methods: {
@@ -785,6 +786,7 @@
           });
           this.form.preferentialPrice = parseFloat(num.toFixed(2));
         }
+        this.setIsInquiry()
       },
       //计算销售金额
       totalPrice(a, b, row) {

+ 45 - 14
src/views/purchasingManage/inquiryManage/components/inventoryTable.vue

@@ -202,7 +202,11 @@
             label: '状态',
             fixed: 'left',
             formatter: (row, column) => {
-              return row.isInquiry==1?'已核价':'未核价'
+              return row.isInquiry == 1
+                ? '部分核价'
+                : row.isInquiry == 2
+                ? '全部核价完成'
+                : '未核价';
             },
             align: 'center'
           },
@@ -259,6 +263,12 @@
             showOverflowTooltip: true,
             align: 'center'
           },
+          {
+            width: 150,
+            prop: 'inquiryNum',
+            label: '已核价数量',
+            align: 'center'
+          },
           {
             minWidth: 80,
             prop: 'availableCountBase',
@@ -273,6 +283,12 @@
             slot: 'totalWeight',
             align: 'center'
           },
+          {
+            width: 150,
+            prop: 'inquiryWeight',
+            label: '已核价重量',
+            align: 'center'
+          },
           {
             minWidth: 220,
             prop: 'taskName',
@@ -415,20 +431,35 @@
           };
         });
       },
-      setIsInquiry(list){
-        let codeS=[]
-        list.forEach(item=>{
-          item.resultList.forEach(val=>{
-            codeS.push(val.productCode)
-          })
-          
-        }) 
-        this.form.datasource.forEach((item,index)=>{
-          this.$set(this.form.datasource[index],'isInquiry',codeS.includes(item.productCode)?1:0)
-        })
+      setIsInquiry(list) {
+        this.form.datasource.forEach((productItem, index) => {
+          //产品清单
+          let isInquiry = 0,
+            totalCountS = [];
+          list.forEach((item) => {
+            //供应商列表
+            item.resultList.forEach((val) => {
+              //供应商产品
+              if (val.productCode == productItem.productCode) {
+                totalCountS.push(
+                  Number(val.totalCount||0) + Number(productItem.doneTotalCount||0)
+                );
+              }
+            });
+          });
+          if (totalCountS.length > 0) {
         
-        console.log(codeS,'codeS')
-
+            this.$set(
+              this.form.datasource[index],
+              'isInquiry',
+            
+              Math.max(...totalCountS) >= productItem.totalCount ? 2 : 1
+            );
+          } else {
+            this.$set(this.form.datasource[index], 'isInquiry', 0);
+          }
+          console.log(totalCountS, 'codeS');
+        });
       },
       downloadFile(file) {
         getFile({ objectName: file.storePath }, file.name);

+ 7 - 5
src/views/purchasingManage/purchaseOrder/components/addDialog.vue

@@ -935,8 +935,7 @@
           this.$refs.rawDetailListRef.putTableValue(rawDetailList); //原料
         this.$refs.outputDetailListRef &&
           this.$refs.outputDetailListRef.putTableValue(outputDetailList);
-          await this.changeParent({ id: info.partbId });
-
+        await this.changeParent({ id: info.partbId });
       },
 
       // //选择需求类型
@@ -1048,9 +1047,9 @@
               isFirstProcess
             });
             this.getLinkInfo(partaId);
-            data.productList.forEach(item=>{
-              item['supplierMark']=item.customerMark
-            })
+            data.productList.forEach((item) => {
+              item['supplierMark'] = item.customerMark;
+            });
             if (data.productList.lenght > 1) {
               this.$refs.planTableListRef.contractOpen(
                 data.productList,
@@ -1157,6 +1156,9 @@
       },
       //选择供应商回调
       async changeParent(obj) {
+        if (!obj.id) {
+          return;
+        }
         const { base, other } = await contactDetail(obj.id);
 
         this.form = Object.assign({}, this.form, {

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

@@ -1026,7 +1026,7 @@
         let num =
           (Number(this.form.discountTotalPrice) / Number(this.allPrice)) *
           Number(row.singlePrice);
-        return isNaN(num) ? '' : num;
+        return isNaN(num) ? '' : num.toFixed(2);
       },
       handleTaskinstance(row, index) {
         this.taskinstanceDialogFlag = true;

+ 1 - 1
src/views/purchasingManage/purchaseOrder/index.vue

@@ -301,7 +301,7 @@
           },
           {
             prop: 'contractNo',
-            label: '合同编码',
+            label: '来源单据',
             align: 'center',
             slot: 'contractNo',
             showOverflowTooltip: true,

+ 22 - 0
src/views/purchasingManage/purchasePlanManage/components/detailDialog.vue

@@ -312,6 +312,15 @@
             slot: 'productName',
             align: 'center'
           },
+          {
+            minWidth: 100,
+            label: '状态',
+            fixed: 'left',
+            formatter: (row, column) => {
+              return row.isInquiry==1?'部分核价':row.isInquiry==2?'全部核价完成':'未核价'
+            },
+            align: 'center'
+          },
           {
             width: 110,
             prop: 'batchNo',
@@ -340,6 +349,13 @@
             slot: 'totalCount',
             align: 'center'
           },
+          
+          {
+            width: 150,
+            prop: 'inquiryNum',
+            label: '已核价数量',
+            align: 'center'
+          },
           {
             width: 80,
             prop: 'doneTotalCount',
@@ -359,6 +375,12 @@
             slot: 'totalWeight',
             align: 'center'
           },
+          {
+            width: 150,
+            prop: 'inquiryWeight',
+            label: '已核价重量',
+            align: 'center'
+          },
           {
             width: 100,
             prop: 'measuringUnit',

+ 2 - 6
src/views/purchasingManage/purchasePlanManage/components/inventoryTable.vue

@@ -328,11 +328,7 @@
         <el-form-item
           style="margin-bottom: 20px"
           :prop="'datasource.' + scope.$index + '.supplierName'"
-          :rules="{
-            required: isNeedInquiry === 1,
-            message: '请选择供应商',
-            trigger: 'change'
-          }"
+          
         >
           <el-input
             clearable
@@ -556,7 +552,7 @@ export default {
           prop: 'supplierName',
           label: '供应商',
           slot: 'supplierName',
-          headerSlot: 'headerSupplierName',
+          // headerSlot: 'headerSupplierName',
           align: 'center'
         },
 

+ 1204 - 950
src/views/purchasingManage/supplierManage/components/addContactDialog.vue

@@ -1,47 +1,79 @@
 <template>
-  <ele-modal custom-class="ele-dialog-form long-dialog-form"
-             :centered="true" v-if="visible" :visible.sync="visible" :title="title"
-             :close-on-click-modal="false" width="70%" @close="cancel">
-
+  <ele-modal
+    custom-class="ele-dialog-form long-dialog-form"
+    :centered="true"
+    v-if="visible"
+    :visible.sync="visible"
+    :title="title"
+    :close-on-click-modal="false"
+    width="70%"
+    @close="cancel"
+  >
     <el-tabs v-model="activeName" type="card" @tab-click="handleActive">
       <el-tab-pane label="基本信息" :name="1">
         <headerTitle title="基本信息" style="margin-top: 30px"></headerTitle>
-        <el-form label-width="120px" ref="form" :model="form" :rules="rules" class="el-form-box">
+        <el-form
+          label-width="120px"
+          ref="form"
+          :model="form"
+          :rules="rules"
+          class="el-form-box"
+        >
           <el-row>
             <el-col :span="8">
               <el-form-item label="供应商分类" prop="categoryId">
-                <ele-tree-select multiple
-                                 filterable
-                                 :checkStrictly="true" :data="categoryTreeList" v-model="categoryIdList" valueKey="id"
-                                 labelKey="name"
-                                 placeholder="请选择" default-expand-all/>
+                <ele-tree-select
+                  multiple
+                  filterable
+                  :checkStrictly="true"
+                  :data="categoryTreeList"
+                  v-model="categoryIdList"
+                  valueKey="id"
+                  labelKey="name"
+                  placeholder="请选择"
+                  default-expand-all
+                />
               </el-form-item>
             </el-col>
             <el-col :span="8">
               <el-form-item label="是否受托企业">
-                <el-select v-model="form.isEntrustedEnterprise" placeholder="请选择" style="width: 100%">
+                <el-select
+                  v-model="form.isEntrustedEnterprise"
+                  placeholder="请选择"
+                  style="width: 100%"
+                >
                   <el-option label="是" :value="1"></el-option>
                   <el-option label="否" :value="0"></el-option>
                 </el-select>
               </el-form-item>
-
             </el-col>
             <el-col :span="8">
               <el-form-item label="供应商名称" prop="name">
-                <el-input placeholder="请输入" v-model="form.name" maxlength="50"></el-input>
+                <el-input
+                  placeholder="请输入"
+                  v-model="form.name"
+                  maxlength="50"
+                ></el-input>
               </el-form-item>
             </el-col>
-
           </el-row>
           <el-row>
             <el-col :span="8">
               <el-form-item label="供应商代号" prop="serialNo">
-                <el-input placeholder="请输入" v-model="form.serialNo" maxlength="50"></el-input>
+                <el-input
+                  placeholder="请输入"
+                  v-model="form.serialNo"
+                  maxlength="50"
+                ></el-input>
               </el-form-item>
             </el-col>
             <el-col :span="8">
               <el-form-item label="供应商简称" prop="simpleName">
-                <el-input placeholder="请输入" v-model="form.simpleName" maxlength="50"></el-input>
+                <el-input
+                  placeholder="请输入"
+                  v-model="form.simpleName"
+                  maxlength="50"
+                ></el-input>
               </el-form-item>
             </el-col>
             <el-col :span="8">
@@ -57,36 +89,67 @@
           <el-row>
             <el-col :span="8">
               <el-form-item label="授信额度" prop="authorizationLimit">
-                <el-input placeholder="请输入" v-model="form.authorizationLimit" maxlength="17"
-                          oninput="value=value.replace(/[^0-9.]/g,'')"></el-input>
+                <el-input
+                  placeholder="请输入"
+                  v-model="form.authorizationLimit"
+                  maxlength="17"
+                  oninput="value=value.replace(/[^0-9.]/g,'')"
+                ></el-input>
               </el-form-item>
             </el-col>
             <el-col :span="8">
               <el-form-item label="单位电话" prop="phone">
-                <el-input placeholder="请输入" v-model="form.phone" maxlength="20"></el-input>
+                <el-input
+                  placeholder="请输入"
+                  v-model="form.phone"
+                  maxlength="20"
+                ></el-input>
               </el-form-item>
             </el-col>
             <el-col :span="8">
               <el-form-item label="地址" prop="addressId">
-                <el-cascader clearable v-model="form.addressId" filterable :options="options.cityData" ref="address"
-                             style="width: 100%"></el-cascader>
+                <el-cascader
+                  clearable
+                  v-model="form.addressId"
+                  filterable
+                  :options="options.cityData"
+                  ref="address"
+                  style="width: 100%"
+                ></el-cascader>
               </el-form-item>
             </el-col>
           </el-row>
           <el-row>
             <el-col :span="8">
               <el-form-item label="详细地址" prop="address">
-                <el-input placeholder="请输入" v-model="form.address" maxlength="50"></el-input>
+                <el-input
+                  placeholder="请输入"
+                  v-model="form.address"
+                  maxlength="50"
+                ></el-input>
               </el-form-item>
             </el-col>
             <el-col :span="8">
-              <el-form-item label="统一社会信用代码	" prop="unifiedSocialCreditCode" class="form_item_label">
-                <el-input placeholder="请输入" v-model="form.unifiedSocialCreditCode" maxlength="18"></el-input>
+              <el-form-item
+                label="统一社会信用代码	"
+                prop="unifiedSocialCreditCode"
+                class="form_item_label"
+              >
+                <el-input
+                  placeholder="请输入"
+                  v-model="form.unifiedSocialCreditCode"
+                  maxlength="18"
+                ></el-input>
               </el-form-item>
             </el-col>
             <el-col :span="8">
               <el-form-item label="所属行业" prop="industry">
-                <el-cascader :options="options.categoryData" v-model="form.industry" style="width: 100%" ref="industry">
+                <el-cascader
+                  :options="options.categoryData"
+                  v-model="form.industry"
+                  style="width: 100%"
+                  ref="industry"
+                >
                 </el-cascader>
               </el-form-item>
             </el-col>
@@ -94,55 +157,86 @@
           <el-row>
             <el-col :span="8">
               <el-form-item label="营业类型" prop="companyCategoryId">
-                <DictSelection dictName="营业类型" clearable v-model="form.companyCategoryId">
+                <DictSelection
+                  dictName="营业类型"
+                  clearable
+                  v-model="form.companyCategoryId"
+                >
                 </DictSelection>
               </el-form-item>
             </el-col>
             <el-col :span="8">
               <el-form-item label="登记日期" prop="registerDate">
-                <el-date-picker style="width: 100%" clearable v-model="form.registerDate" type="date"
-                                value-format="yyyy-MM-dd" placeholder="请选择日期">
+                <el-date-picker
+                  style="width: 100%"
+                  clearable
+                  v-model="form.registerDate"
+                  type="date"
+                  value-format="yyyy-MM-dd"
+                  placeholder="请选择日期"
+                >
                 </el-date-picker>
               </el-form-item>
             </el-col>
             <el-col :span="8">
               <el-form-item label="经营范围" prop="businessScope">
-                <el-input placeholder="请输入" v-model="form.businessScope" maxlength="100"></el-input>
+                <el-input
+                  placeholder="请输入"
+                  v-model="form.businessScope"
+                  maxlength="100"
+                ></el-input>
               </el-form-item>
             </el-col>
           </el-row>
           <el-row>
             <el-col :span="8">
               <el-form-item label="主营产品" prop="mainProduct">
-                <el-input placeholder="请输入" v-model="form.mainProduct" maxlength="100"></el-input>
+                <el-input
+                  placeholder="请输入"
+                  v-model="form.mainProduct"
+                  maxlength="100"
+                ></el-input>
               </el-form-item>
             </el-col>
             <el-col :span="8">
               <el-form-item label="关联上级单位" prop="parentId">
-                <el-input placeholder="请选择关联上级单位" v-model="form.parentName" readonly
-                          @click.native="handParent"></el-input>
+                <el-input
+                  placeholder="请选择关联上级单位"
+                  v-model="form.parentName"
+                  readonly
+                  @click.native="handParent"
+                ></el-input>
               </el-form-item>
             </el-col>
 
             <el-col :span="8">
               <el-form-item label="级别">
-                <DictSelection dictName="供应商级别" clearable v-model="form.level">
+                <DictSelection
+                  dictName="供应商级别"
+                  clearable
+                  v-model="form.level"
+                >
                 </DictSelection>
               </el-form-item>
-
             </el-col>
           </el-row>
           <el-row>
             <el-col :span="16">
               <el-form-item label="备注" prop="remark">
-                <el-input type="textarea" resize="none" v-model="form.remark" :rows="2" placeholder="请输入"
-                          size="small"
-                          maxlength="200"></el-input>
+                <el-input
+                  type="textarea"
+                  resize="none"
+                  v-model="form.remark"
+                  :rows="2"
+                  placeholder="请输入"
+                  size="small"
+                  maxlength="200"
+                ></el-input>
               </el-form-item>
               <el-col :span="8">
                 <el-form-item prop="businessLicenseFile" label="营业执照附件">
                   <fileMain v-model="form.businessLicenseFile"></fileMain>
-<!--                  <fileUpload v-model="form.businessLicenseFiles" module="main" :showLib="false" :limit="1"/>-->
+                  <!--                  <fileUpload v-model="form.businessLicenseFiles" module="main" :showLib="false" :limit="1"/>-->
                 </el-form-item>
               </el-col>
             </el-col>
@@ -160,112 +254,207 @@
       </el-tab-pane>
       <el-tab-pane label="银行信息" :name="2">
         <headerTitle title="银行信息" style="margin-top: 30px"></headerTitle>
-        <ele-pro-table ref="table" :columns="bankColumns" :datasource="tableBankData" height="350px" :toolkit="[]"
-                       :need-page="false">
+        <ele-pro-table
+          ref="table"
+          :columns="bankColumns"
+          :datasource="tableBankData"
+          height="350px"
+          :toolkit="[]"
+          :need-page="false"
+        >
           <!-- 表头工具栏 -->
           <template v-slot:toolbar>
             <el-button type="primary" @click="addBank">添加</el-button>
           </template>
           <template v-slot:action="{ row, $index }">
-            <el-link type="primary" @click="handleBankDel(row, $index)">删除</el-link>
+            <el-link type="primary" @click="handleBankDel(row, $index)"
+              >删除</el-link
+            >
           </template>
           <template v-slot:accountNameHeader="{ column }">
-            <span>{{ column.label }}</span><span style="color:red">*</span>
+            <span>{{ column.label }}</span
+            ><span style="color: red">*</span>
           </template>
 
           <template v-slot:accountName="{ row }">
-            <el-input v-model="row.accountName" placeholder="请输入" maxlength="50"></el-input>
+            <el-input
+              v-model="row.accountName"
+              placeholder="请输入"
+              maxlength="50"
+            ></el-input>
           </template>
           <template v-slot:accountNo="{ row }">
-            <el-input v-model="row.accountNo" placeholder="请输入" maxlength="50"></el-input>
+            <el-input
+              v-model="row.accountNo"
+              placeholder="请输入"
+              maxlength="50"
+            ></el-input>
           </template>
           <template v-slot:bankName="{ row }">
-            <el-input v-model="row.bankName" placeholder="请输入" maxlength="50"></el-input>
+            <el-input
+              v-model="row.bankName"
+              placeholder="请输入"
+              maxlength="50"
+            ></el-input>
           </template>
           <template v-slot:interbankNo="{ row }">
-            <el-input v-model="row.interbankNo" placeholder="请输入" maxlength="50"></el-input>
+            <el-input
+              v-model="row.interbankNo"
+              placeholder="请输入"
+              maxlength="50"
+            ></el-input>
           </template>
         </ele-pro-table>
       </el-tab-pane>
       <el-tab-pane label="联系人信息" :name="3">
         <headerTitle title="联系人信息" style="margin-top: 30px"></headerTitle>
-        <ele-pro-table ref="linkTable" :columns="linkColumns" :datasource="tableLinkData" :toolkit="[]" height="350px"
-                       :need-page="false">
+        <ele-pro-table
+          ref="linkTable"
+          :columns="linkColumns"
+          :datasource="tableLinkData"
+          :toolkit="[]"
+          height="350px"
+          :need-page="false"
+        >
           <!-- 表头工具栏 -->
           <template v-slot:toolbar>
             <el-button type="primary" @click="addLink">添加</el-button>
           </template>
           <template v-slot:action="{ row, $index }">
-            <el-link type="primary" @click="handleLinkDel(row, $index)">删除</el-link>
+            <el-link type="primary" @click="handleLinkDel(row, $index)"
+              >删除</el-link
+            >
           </template>
           <template v-slot:linkNameHeader="{ column }">
-            <span>{{ column.label }}</span><span style="color:red">*</span>
+            <span>{{ column.label }}</span
+            ><span style="color: red">*</span>
           </template>
           <template v-slot:mobilePhoneHeader="{ column }">
-            <span>{{ column.label }}</span><span style="color:red">*</span>
+            <span>{{ column.label }}</span
+            ><span style="color: red">*</span>
           </template>
           <template v-slot:statusHeader="{ column }">
-            <span>{{ column.label }}</span><span style="color:red">*</span>
+            <span>{{ column.label }}</span
+            ><span style="color: red">*</span>
           </template>
 
           <template v-slot:linkName="{ row }">
-            <el-input v-model="row.linkName" placeholder="请输入" maxlength="50"></el-input>
+            <el-input
+              v-model="row.linkName"
+              placeholder="请输入"
+              maxlength="50"
+            ></el-input>
           </template>
           <template v-slot:mobilePhone="{ row }">
-            <el-input v-model="row.mobilePhone" placeholder="请输入" maxlength="20"></el-input>
+            <el-input
+              v-model="row.mobilePhone"
+              placeholder="请输入"
+              maxlength="20"
+            ></el-input>
           </template>
 
-
           <template v-slot:phone="{ row }">
-            <el-input v-model="row.phone" placeholder="请输入" maxlength="20"></el-input>
+            <el-input
+              v-model="row.phone"
+              placeholder="请输入"
+              maxlength="20"
+            ></el-input>
           </template>
 
-
           <template v-slot:wechat="{ row }">
-            <el-input v-model="row.wechat" placeholder="请输入" maxlength="5cls0"></el-input>
+            <el-input
+              v-model="row.wechat"
+              placeholder="请输入"
+              maxlength="5cls0"
+            ></el-input>
           </template>
           <template v-slot:email="{ row }">
-            <el-input v-model="row.email" placeholder="请输入" maxlength="50"></el-input>
+            <el-input
+              v-model="row.email"
+              placeholder="请输入"
+              maxlength="50"
+            ></el-input>
           </template>
           <template v-slot:post="{ row }">
-            <el-input v-model="row.post" placeholder="请输入" maxlength="20"></el-input>
+            <el-input
+              v-model="row.post"
+              placeholder="请输入"
+              maxlength="20"
+            ></el-input>
           </template>
           <template v-slot:ifChief="{ row, $index }">
-            <el-select v-model="row.ifChief" placeholder="请选择" class="w100"
-                       @change="((value) => { ifChiefChange(value, $index) })">
-              <el-option v-for="item in ifChiefList" :key="item.value" :label="item.label"
-                         :value="item.value"></el-option>
+            <el-select
+              v-model="row.ifChief"
+              placeholder="请选择"
+              class="w100"
+              @change="
+                (value) => {
+                  ifChiefChange(value, $index);
+                }
+              "
+            >
+              <el-option
+                v-for="item in ifChiefList"
+                :key="item.value"
+                :label="item.label"
+                :value="item.value"
+              ></el-option>
             </el-select>
           </template>
           <template v-slot:status="{ row }">
-            <DictSelection dictName="联系人状态" v-model="row.status"></DictSelection>
+            <DictSelection
+              dictName="联系人状态"
+              v-model="row.status"
+            ></DictSelection>
           </template>
           <template v-slot:remark="{ row }">
-            <el-input v-model="row.remark" placeholder="请输入" maxlength="50"></el-input>
+            <el-input
+              v-model="row.remark"
+              placeholder="请输入"
+              maxlength="50"
+            ></el-input>
           </template>
         </ele-pro-table>
       </el-tab-pane>
       <el-tab-pane label="其他信息" :name="4">
         <headerTitle title="其他信息" style="margin-top: 30px"></headerTitle>
-        <el-form label-width="100px" ref="otherForm" :model="otherForm" :rules="otherRules" class="el-form-box">
+        <el-form
+          label-width="100px"
+          ref="otherForm"
+          :model="otherForm"
+          :rules="otherRules"
+          class="el-form-box"
+        >
           <el-row>
             <el-col :span="8">
               <el-form-item label="结算方式" prop="settlementMode">
-                <DictSelection dictName="结算方式" clearable @itemChange="settlementModeChange"
-                               v-model="otherForm.settlementMode">
+                <DictSelection
+                  dictName="结算方式"
+                  clearable
+                  @itemChange="settlementModeChange"
+                  v-model="otherForm.settlementMode"
+                >
                 </DictSelection>
               </el-form-item>
             </el-col>
             <el-col :span="8">
               <el-form-item label="税率" prop="taxRate">
-                <el-input v-model="otherForm.taxRate" maxlength="5" oninput="value=value.replace(/[^0-9.]/g,'')">
+                <el-input
+                  v-model="otherForm.taxRate"
+                  maxlength="5"
+                  oninput="value=value.replace(/[^0-9.]/g,'')"
+                >
                   <template slot="append">%</template>
                 </el-input>
               </el-form-item>
             </el-col>
             <el-col :span="8">
               <el-form-item label="折扣率" prop="discount">
-                <el-input v-model="otherForm.discount" maxlength="5" oninput="value=value.replace(/[^0-9.]/g,'')">
+                <el-input
+                  v-model="otherForm.discount"
+                  maxlength="5"
+                  oninput="value=value.replace(/[^0-9.]/g,'')"
+                >
                   <template slot="append">%</template>
                 </el-input>
               </el-form-item>
@@ -285,23 +474,40 @@
 
             <el-col :span="8">
               <el-form-item label="寄件人">
-                <el-input placeholder="请输入" v-model="otherForm.sender" maxlength="50"></el-input>
+                <el-input
+                  placeholder="请输入"
+                  v-model="otherForm.sender"
+                  maxlength="50"
+                ></el-input>
               </el-form-item>
             </el-col>
             <el-col :span="8">
               <el-form-item label="寄件人电话">
-                <el-input placeholder="请输入" v-model="otherForm.senderPhone" maxlength="20"></el-input>
+                <el-input
+                  placeholder="请输入"
+                  v-model="otherForm.senderPhone"
+                  maxlength="20"
+                ></el-input>
               </el-form-item>
             </el-col>
             <el-col :span="8">
               <el-form-item label="寄件人地址">
-                <el-cascader clearable v-model="otherForm.addressId" :options="options.cityData" ref="sendAddress"
-                             style="width: 100%"></el-cascader>
+                <el-cascader
+                  clearable
+                  v-model="otherForm.addressId"
+                  :options="options.cityData"
+                  ref="sendAddress"
+                  style="width: 100%"
+                ></el-cascader>
               </el-form-item>
             </el-col>
             <el-col :span="8">
               <el-form-item label="寄件人详细地址" class="form_item_label">
-                <el-input placeholder="请输入" v-model="otherForm.address" maxlength="50"></el-input>
+                <el-input
+                  placeholder="请输入"
+                  v-model="otherForm.address"
+                  maxlength="50"
+                ></el-input>
               </el-form-item>
             </el-col>
           </el-row>
@@ -309,9 +515,14 @@
       </el-tab-pane>
       <el-tab-pane label="供货列表" :name="5">
         <headerTitle title="供货列表" style="margin-top: 30px"></headerTitle>
-        <ele-pro-table ref="supplyRef" :columns="supplyColumns" :need-page="false"
-                       :datasource="supplyList"
-                       :toolkit="[]" height="350px">
+        <ele-pro-table
+          ref="supplyRef"
+          :columns="supplyColumns"
+          :need-page="false"
+          :datasource="supplyList"
+          :toolkit="[]"
+          height="350px"
+        >
           <!-- 表头工具栏 -->
           <template v-slot:toolbar>
             <el-button type="primary" @click="handSelectSupply">新增</el-button>
@@ -324,11 +535,7 @@
               @confirm="handleRemoveSupply(scope.$index)"
             >
               <template v-slot:reference>
-                <el-link
-                  type="danger"
-                  :underline="false"
-                  icon="el-icon-delete"
-                >
+                <el-link type="danger" :underline="false" icon="el-icon-delete">
                   删除
                 </el-link>
               </template>
@@ -338,38 +545,54 @@
       </el-tab-pane>
       <el-tab-pane label="证书资质" :name="6">
         <headerTitle title="证书资质" style="margin-top: 30px"></headerTitle>
-        <ele-pro-table ref="certificateTable" :columns="certificateColumns" :need-page="false"
-                       :datasource="tableCertificateData"
-                       :toolkit="[]" height="350px">
+        <ele-pro-table
+          ref="certificateTable"
+          :columns="certificateColumns"
+          :need-page="false"
+          :datasource="tableCertificateData"
+          :toolkit="[]"
+          height="350px"
+        >
           <!-- 表头工具栏 -->
           <template v-slot:toolbar>
-            <el-button type="primary" v-if="form.id" @click="addCertificate('add','')">新增</el-button>
+            <el-button
+              type="primary"
+              v-if="form.id"
+              @click="addCertificate('add', '')"
+              >新增</el-button
+            >
           </template>
           <!-- 操作栏 -->
           <template v-slot:action="scope">
             <el-link
-              v-if="[1,2].includes(scope.row.processStatus)"
+              v-if="[1, 2].includes(scope.row.processStatus)"
               type="primary"
               :underline="false"
               icon="el-icon-edit"
-              @click="addCertificate('view',scope.row)">
+              @click="addCertificate('view', scope.row)"
+            >
               详情
             </el-link>
             <el-link
-              v-if="[0,3].includes(scope.row.processStatus)"
+              v-if="[0, 3].includes(scope.row.processStatus)"
               type="primary"
               :underline="false"
               icon="el-icon-edit"
-              @click="addCertificate('update',scope.row)">
+              @click="addCertificate('update', scope.row)"
+            >
               修改
             </el-link>
 
             <el-link
-              v-if="isNeed_process_is_close&&[0,3].includes(scope.row.processStatus)"
+              v-if="
+                isNeed_process_is_close &&
+                [0, 3].includes(scope.row.processStatus)
+              "
               type="primary"
               :underline="false"
               icon="el-icon-plus"
-              @click="submit(scope.row)">
+              @click="submit(scope.row)"
+            >
               提交
             </el-link>
 
@@ -380,7 +603,7 @@
             >
               <template v-slot:reference>
                 <el-link
-                  v-if="[0,3].includes(scope.row.processStatus)"
+                  v-if="[0, 3].includes(scope.row.processStatus)"
                   type="danger"
                   :underline="false"
                   icon="el-icon-delete"
@@ -392,7 +615,6 @@
           </template>
         </ele-pro-table>
       </el-tab-pane>
-
     </el-tabs>
 
     <div slot="footer" class="footer">
@@ -408,924 +630,956 @@
         :disabled="activeName == 6"
         >下一步</el-button
       >
-      <el-button type="primary" v-if="activeName == 6||title!='新建供应商'" @click="save"
-      v-click-once
+      <el-button
+        type="primary"
+        v-if="activeName == 6 || title != '新建供应商'"
+        @click="save"
+        v-click-once
         >保存</el-button
       >
       <el-button @click="cancel">返回</el-button>
     </div>
 
-    <parentList ref="parentRef" :classType="2" @changeParent="changeParent"></parentList>
+    <parentList
+      ref="parentRef"
+      :classType="2"
+      @changeParent="changeParent"
+    ></parentList>
     <!-- 资质证书弹窗   -->
     <certificate-qualifications-dialog
-      :certificate-qualifications-dialog-flag.sync="certificateQualificationsDialogFlag"
+      :certificate-qualifications-dialog-flag.sync="
+        certificateQualificationsDialogFlag
+      "
       v-if="certificateQualificationsDialogFlag"
       typeInfo="2"
       ref="certificateQualificationsDialogRef"
       :contactInfo="form"
-      @reload="reload">
-
+      @reload="reload"
+    >
     </certificate-qualifications-dialog>
     <product-list
       ref="productListRef"
       :data="supplyList"
       @changeParent="getSupplyList"
     ></product-list>
-    <process-submit-dialog  :processSubmitDialogFlag.sync="processSubmitDialogFlag" v-if="processSubmitDialogFlag" ref="processSubmitDialogRef" @reload="reload"></process-submit-dialog>
-
+    <process-submit-dialog
+      :processSubmitDialogFlag.sync="processSubmitDialogFlag"
+      v-if="processSubmitDialogFlag"
+      ref="processSubmitDialogRef"
+      @reload="reload"
+    ></process-submit-dialog>
   </ele-modal>
 </template>
 
 <script>
-import {
-  contactDetail,
-  contactQcPackPageAPI,
-  contactSave,
-  contactUpdate,
-  contactQcPackDeleteAPI, contactQcSubmit
-} from '@/api/saleManage/contact';
-import {categoryData} from 'element-china-category-data';
-import fileUpload from '@/components/upload/fileUpload';
-import {cityData} from 'ele-admin/packages/utils/regions';
-import dictMixins from '@/mixins/dictMixins';
-import deptSelect from '@/components/CommomSelect/dept-select.vue';
-import personSelect from '@/components/CommomSelect/person-select.vue';
-import {listOrganizations} from '@/api/system/organization';
-import {copyObj} from '@/utils/util';
-import certificateQualificationsDialog
-  from "@/views/purchasingManage/supplierManage/components/certificateQualificationsDialog.vue";
-import parentList from './parentList.vue'
-import {reviewStatus} from "@/enum/dict";
-import productList from "@/BIZComponents/product-list.vue";
-import fileMain from "@/components/addDoc/index.vue";
-import processSubmitDialog from "@/BIZComponents/processSubmitDialog/processSubmitDialog.vue";
-
-
-export default {
-  props: {
-    categoryTreeList: Array,
-  },
-  mixins: [dictMixins],
-  components: {
-    processSubmitDialog,
-    fileMain,
-    productList,
-    fileUpload,
-    deptSelect,
-    personSelect,
-    parentList,
-    certificateQualificationsDialog
-  },
-  data() {
-    let formDef = {
-      address: '',
-      addressId: 0,
-      addressName: '',
-      authorizationLimit: 0,
-      businessLicenseFiles: [],
-      businessLicenseFile: [],
-      businessScope: '',
-      categoryId: '',
-      level: '',
-      companyCategoryId: '',
-      companyCategoryName: '',
-      parentId: null,
-      industry: '',
-      industryCode: '',
-      industryFullName: '',
-      mainProduct: '',
-      name: '',
-      officialIndustry: '',
-      phone: '',
-      registerDate: '',
-      legalPerson: '',
-      registeredCapital: '',
-      remark: '',
-      serialNo: '',
-      simpleName: '',
-      type: 2,
-      unifiedSocialCreditCode: ''
-    };
-    let otherFormDef = {
-      settlementMode: '',
-      settlementModeName: '',
-      taxRate: 0,
-      address: '',
-      addressId: '',
-      deptId: '',
-      deptName: '',
-      discount: 0,
-      salesmanId: '',
-      salesmanName: '',
-      sender: '',
-      senderPhone: ''
-    };
-    return {
-      visible: false,
-      certificateQualificationsDialogFlag: false,
-      processSubmitDialogFlag: false,
-      title: '',
-      row: {},
-      activeName: 1,
-      formDef,
-      otherFormDef,
-      form: copyObj(formDef),
-      otherForm: copyObj(otherFormDef),
-      // removeBankList: [],
-      // removeLinkList: [],
-      tableBankData: [],
-      tableLinkData: [],
-      categoryIdList: [],
-      supplyList: [],
-      ifChiefList: [
-        {
-          value: 0,
-          label: '否'
-        },
-        {
-          value: 1,
-          label: '是'
-        }
-      ],
-      bankColumns: [
-        {
-          type: 'index',
-          width: 55,
-          align: 'center'
-        },
-        {
-          label: '单位名称',
-          prop: 'accountName',
-          slot: 'accountName',
-          action: 'accountName',
-          headerSlot: 'accountNameHeader',
-          align: 'center'
-        },
-        {
-          label: '银行账号',
-          prop: 'accountNo',
-          slot: 'accountNo',
-          action: 'accountNo',
-          align: 'center'
-        },
-        {
-          label: '开户行',
-          prop: 'bankName',
-          slot: 'bankName',
-          action: 'bankName',
-          align: 'center'
-        },
-        {
-          label: '银行银联号',
-          prop: 'interbankNo',
-          slot: 'interbankNo',
-          action: 'interbankNo',
-          align: 'center'
-        },
-        {
-          action: 'action',
-          slot: 'action',
-          label: '操作',
-          align: 'center'
-        }
-      ],
-      linkColumns: [
-        {
-          type: 'index',
-          width: 55,
-          align: 'center'
-        },
-        {
-          label: '姓名',
-          prop: 'linkName',
-          slot: 'linkName',
-          action: 'linkName',
-          headerSlot: 'linkNameHeader',
-          align: 'center'
-        },
-        {
-          label: '手机',
-          prop: 'mobilePhone',
-          slot: 'mobilePhone',
-          action: 'mobilePhone',
-          headerSlot: 'mobilePhoneHeader',
-          align: 'center'
-        },
-
-
-        {
-          label: '电话',
-          prop: 'phone',
-          slot: 'phone',
-          action: 'phone',
-          align: 'center'
-        },
-
-        {
-          label: '微信号',
-          prop: 'wechat',
-          slot: 'wechat',
-          action: 'wechat',
-          align: 'center',
-        },
+  import {
+    contactDetail,
+    contactQcPackPageAPI,
+    contactSave,
+    contactUpdate,
+    contactQcPackDeleteAPI,
+    contactQcSubmit
+  } from '@/api/saleManage/contact';
+  import { categoryData } from 'element-china-category-data';
+  import fileUpload from '@/components/upload/fileUpload';
+  import { cityData } from 'ele-admin/packages/utils/regions';
+  import dictMixins from '@/mixins/dictMixins';
+  import deptSelect from '@/components/CommomSelect/dept-select.vue';
+  import personSelect from '@/components/CommomSelect/person-select.vue';
+  import { listOrganizations } from '@/api/system/organization';
+  import { copyObj } from '@/utils/util';
+  import certificateQualificationsDialog from '@/views/purchasingManage/supplierManage/components/certificateQualificationsDialog.vue';
+  import parentList from './parentList.vue';
+  import { reviewStatus } from '@/enum/dict';
+  import productList from '@/BIZComponents/product-list.vue';
+  import fileMain from '@/components/addDoc/index.vue';
+  import processSubmitDialog from '@/BIZComponents/processSubmitDialog/processSubmitDialog.vue';
 
-        {
-          label: '邮箱',
-          prop: 'email',
-          slot: 'email',
-          action: 'email',
-          align: 'center'
-        },
-        {
-          label: '职务',
-          prop: 'post',
-          slot: 'post',
-          action: 'post',
-          align: 'center'
-        },
-        {
-          label: '状态',
-          prop: 'status',
-          slot: 'status',
-          action: 'status',
-          headerSlot: 'statusHeader',
-          align: 'center'
-        },
-        {
-          label: '是否首要',
-          prop: 'ifChief',
-          slot: 'ifChief',
-          action: 'ifChief',
-          align: 'center'
-        },
-        {
-          label: '备注',
-          prop: 'remark',
-          slot: 'remark',
-          action: 'remark',
-          align: 'center'
-        },
-        {
-          action: 'action',
-          slot: 'action',
-          label: '操作',
-          align: 'center'
-        }
-      ],
-      certificateColumns: [
-        {
-          type: 'index',
-          width: 55,
-          align: 'center'
-        },
-        {
-          label: '编码',
-          prop: 'code',
-          slot: 'code',
-          align: "center",
-          minWidth: 120
-        },
-        {
-          label: '名称',
-          prop: 'name',
-          slot: 'name',
-          align: "center",
-          minWidth: 120
-        },
-        // {
-        //   label: '创建人',
-        //   prop: 'createUserName',
-        //   slot: 'createUserName',
-        //   align: "center",
-        //   width: 120
-        // },
-        {
-          label: '创建时间',
-          prop: 'createTime',
-          slot: 'createTime',
-          align: "center",
-          minWidth: 120
-        },
-        {
-          label: '备注',
-          prop: 'remark',
-          slot: 'remark',
-          align: "center",
-          minWidth: 120
-        },
-        {
-          label: '状态',
-          prop: 'processStatus',
-          slot: 'processStatus',
-          align: "center",
-          width: 120,
-          formatter: (_row, _column, cellValue) => {
-            return reviewStatus[_row.processStatus];
+  export default {
+    props: {
+      categoryTreeList: Array
+    },
+    mixins: [dictMixins],
+    components: {
+      processSubmitDialog,
+      fileMain,
+      productList,
+      fileUpload,
+      deptSelect,
+      personSelect,
+      parentList,
+      certificateQualificationsDialog
+    },
+    data() {
+      let formDef = {
+        address: '',
+        addressId: 0,
+        addressName: '',
+        authorizationLimit: 0,
+        businessLicenseFiles: [],
+        businessLicenseFile: [],
+        businessScope: '',
+        categoryId: '',
+        level: '',
+        companyCategoryId: '',
+        companyCategoryName: '',
+        parentId: null,
+        industry: '',
+        industryCode: '',
+        industryFullName: '',
+        mainProduct: '',
+        name: '',
+        officialIndustry: '',
+        phone: '',
+        registerDate: '',
+        legalPerson: '',
+        registeredCapital: '',
+        remark: '',
+        serialNo: '',
+        simpleName: '',
+        type: 2,
+        unifiedSocialCreditCode: ''
+      };
+      let otherFormDef = {
+        settlementMode: '',
+        settlementModeName: '',
+        taxRate: 0,
+        address: '',
+        addressId: '',
+        deptId: '',
+        deptName: '',
+        discount: 0,
+        salesmanId: '',
+        salesmanName: '',
+        sender: '',
+        senderPhone: ''
+      };
+      return {
+        visible: false,
+        certificateQualificationsDialogFlag: false,
+        processSubmitDialogFlag: false,
+        title: '',
+        row: {},
+        activeName: 1,
+        formDef,
+        otherFormDef,
+        form: copyObj(formDef),
+        otherForm: copyObj(otherFormDef),
+        // removeBankList: [],
+        // removeLinkList: [],
+        tableBankData: [],
+        tableLinkData: [],
+        categoryIdList: [],
+        supplyList: [],
+        ifChiefList: [
+          {
+            value: 0,
+            label: '否'
+          },
+          {
+            value: 1,
+            label: '是'
           }
-        },
-        {
-          action: 'action',
-          slot: 'action',
-          label: '操作',
-          align: "center",
-          width: 200
-        }
-      ],
-      supplyColumns: [
-        {
-          columnKey: 'index',
-          type: 'index',
-          width: 50,
-          align: 'center',
-          showOverflowTooltip: true,
-          label: '序号'
-        },
-        {
-          prop: 'productCode',
-          label: '编码',
-          align: 'center',
-          showOverflowTooltip: true,
-          minWidth: 110
-        },
-        {
-          prop: 'productName',
-          label: '名称',
-          align: 'center',
-          showOverflowTooltip: true,
-          minWidth: 110
-        },
-        {
-          prop: 'imgCode',
-          align: 'center',
-          label: '图号/件号',
-          showOverflowTooltip: true,
-          minWidth: 110
-        },
-        {
-          prop: 'produceType',
-          align: 'center',
-          label: '生产类型',
-          showOverflowTooltip: true,
-          minWidth: 110
-        },
-        {
-          prop: 'approvalNumber',
-          align: 'center',
-          label: '批准文号',
-          showOverflowTooltip: true,
-          minWidth: 110
-        },
-        {
-          prop: 'packingSpecification',
-          align: 'center',
-          label: '包装规格',
-          showOverflowTooltip: true,
-          minWidth: 110
-        },
-        {
-          prop: 'brandNum',
-          align: 'center',
-          label: '牌号',
-          showOverflowTooltip: true
-        },
-        {
-          prop: 'modelType',
-          label: '型号',
-          align: 'center',
-          showOverflowTooltip: true
-        },
-        {
-          prop: 'specification',
-          label: '规格',
-          align: 'center',
-          showOverflowTooltip: true
-        },
-        {
-          prop: 'measuringUnit',
-          label: '计量单位',
-          showOverflowTooltip: true,
-          align: 'center',
-          minWidth: 90
-        },
-
-        // {
-        //   prop: 'weightUnit',
-        //   label: '重量单位',
-        //   showOverflowTooltip: true,
-        //   align: 'center',
-        //   minWidth: 90
-        // },
-        //
-        // {
-        //   prop: 'roughWeight',
-        //   label: '毛重',
-        //   showOverflowTooltip: true,
-        //   align: 'center',
-        //   minWidth: 90
-        // },
-        //
-        // {
-        //   prop: 'netWeight',
-        //   label: '净重',
-        //   showOverflowTooltip: true,
-        //   align: 'center',
-        //   minWidth: 90
-        // },
-        //
-        // {
-        //   prop: 'packingUnit',
-        //   align: 'center',
-        //   label: '包装单位',
-        //   showOverflowTooltip: true
-        // },
-        // {
-        //   prop: 'categoryLevelPath',
-        //   label: '分类',
-        //   align: 'center',
-        //   showOverflowTooltip: true
-        // },
-        {
-          slot: 'action',
-          align: 'center',
-          minWidth: 90,
-          fixed: 'right',
-          label: '操作',
-        }
-      ],
-      rules: {
-        categoryId: [
-          {required: true, message: '请选择供应商分类', trigger: 'change'}
-        ],
-        name: [
-          {required: true, message: '请输入供应商名称', trigger: 'blur'}
         ],
-        authorizationLimit: [
-          {required: true, message: '请输入授信额度', trigger: 'blur'}
+        bankColumns: [
+          {
+            type: 'index',
+            width: 55,
+            align: 'center'
+          },
+          {
+            label: '单位名称',
+            prop: 'accountName',
+            slot: 'accountName',
+            action: 'accountName',
+            headerSlot: 'accountNameHeader',
+            align: 'center'
+          },
+          {
+            label: '银行账号',
+            prop: 'accountNo',
+            slot: 'accountNo',
+            action: 'accountNo',
+            align: 'center'
+          },
+          {
+            label: '开户行',
+            prop: 'bankName',
+            slot: 'bankName',
+            action: 'bankName',
+            align: 'center'
+          },
+          {
+            label: '银行银联号',
+            prop: 'interbankNo',
+            slot: 'interbankNo',
+            action: 'interbankNo',
+            align: 'center'
+          },
+          {
+            action: 'action',
+            slot: 'action',
+            label: '操作',
+            align: 'center'
+          }
         ],
+        linkColumns: [
+          {
+            type: 'index',
+            width: 55,
+            align: 'center'
+          },
+          {
+            label: '姓名',
+            prop: 'linkName',
+            slot: 'linkName',
+            action: 'linkName',
+            headerSlot: 'linkNameHeader',
+            align: 'center'
+          },
+          {
+            label: '手机',
+            prop: 'mobilePhone',
+            slot: 'mobilePhone',
+            action: 'mobilePhone',
+            headerSlot: 'mobilePhoneHeader',
+            align: 'center'
+          },
 
-        addressId: [
-          {required: true, message: '请选择地址', trigger: 'change'}
-        ]
-      },
-      otherRules: {
-        // settlementMode: [
-        //   { required: true, message: '请输入结算方式', trigger: 'blur' }
-        // ],
-        taxRate: [
-          {required: true, message: '请输入税率', trigger: 'change'}
-        ],
+          {
+            label: '电话',
+            prop: 'phone',
+            slot: 'phone',
+            action: 'phone',
+            align: 'center'
+          },
 
+          {
+            label: '微信号',
+            prop: 'wechat',
+            slot: 'wechat',
+            action: 'wechat',
+            align: 'center'
+          },
 
-        sender: [
-          {required: true, message: '请输入收件人', trigger: 'change'}
+          {
+            label: '邮箱',
+            prop: 'email',
+            slot: 'email',
+            action: 'email',
+            align: 'center'
+          },
+          {
+            label: '职务',
+            prop: 'post',
+            slot: 'post',
+            action: 'post',
+            align: 'center'
+          },
+          {
+            label: '状态',
+            prop: 'status',
+            slot: 'status',
+            action: 'status',
+            headerSlot: 'statusHeader',
+            align: 'center'
+          },
+          {
+            label: '是否首要',
+            prop: 'ifChief',
+            slot: 'ifChief',
+            action: 'ifChief',
+            align: 'center'
+          },
+          {
+            label: '备注',
+            prop: 'remark',
+            slot: 'remark',
+            action: 'remark',
+            align: 'center'
+          },
+          {
+            action: 'action',
+            slot: 'action',
+            label: '操作',
+            align: 'center'
+          }
         ],
-
-        senderPhone: [
-          {required: true, message: '请输入收件人电话', trigger: 'change'}
+        certificateColumns: [
+          {
+            type: 'index',
+            width: 55,
+            align: 'center'
+          },
+          {
+            label: '编码',
+            prop: 'code',
+            slot: 'code',
+            align: 'center',
+            minWidth: 120
+          },
+          {
+            label: '名称',
+            prop: 'name',
+            slot: 'name',
+            align: 'center',
+            minWidth: 120
+          },
+          // {
+          //   label: '创建人',
+          //   prop: 'createUserName',
+          //   slot: 'createUserName',
+          //   align: "center",
+          //   width: 120
+          // },
+          {
+            label: '创建时间',
+            prop: 'createTime',
+            slot: 'createTime',
+            align: 'center',
+            minWidth: 120
+          },
+          {
+            label: '备注',
+            prop: 'remark',
+            slot: 'remark',
+            align: 'center',
+            minWidth: 120
+          },
+          {
+            label: '状态',
+            prop: 'processStatus',
+            slot: 'processStatus',
+            align: 'center',
+            width: 120,
+            formatter: (_row, _column, cellValue) => {
+              return reviewStatus[_row.processStatus];
+            }
+          },
+          {
+            action: 'action',
+            slot: 'action',
+            label: '操作',
+            align: 'center',
+            width: 200
+          }
         ],
+        supplyColumns: [
+          {
+            columnKey: 'index',
+            type: 'index',
+            width: 50,
+            align: 'center',
+            showOverflowTooltip: true,
+            label: '序号'
+          },
+          {
+            prop: 'productCode',
+            label: '编码',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 110
+          },
+          {
+            prop: 'productName',
+            label: '名称',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 110
+          },
+          {
+            prop: 'purchasingCycle',
+            label: '周期',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 150
+          },
+          {
+            prop: 'purchaseMultiplier',
+            label: '倍数',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 100
+          },
+          {
+            prop: 'minimumOrderQuantity',
+            label: '最低订购数量',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 150
+          },
+
+          {
+            prop: 'imgCode',
+            align: 'center',
+            label: '图号/件号',
+            showOverflowTooltip: true,
+            minWidth: 110
+          },
+          {
+            prop: 'produceType',
+            align: 'center',
+            label: '生产类型',
+            showOverflowTooltip: true,
+            minWidth: 110
+          },
+          {
+            prop: 'approvalNumber',
+            align: 'center',
+            label: '批准文号',
+            showOverflowTooltip: true,
+            minWidth: 110
+          },
+          {
+            prop: 'packingSpecification',
+            align: 'center',
+            label: '包装规格',
+            showOverflowTooltip: true,
+            minWidth: 110
+          },
+          {
+            prop: 'brandNum',
+            align: 'center',
+            label: '牌号',
+            showOverflowTooltip: true
+          },
+          {
+            prop: 'modelType',
+            label: '型号',
+            align: 'center',
+            showOverflowTooltip: true
+          },
+          {
+            prop: 'specification',
+            label: '规格',
+            align: 'center',
+            showOverflowTooltip: true
+          },
+          {
+            prop: 'measuringUnit',
+            label: '计量单位',
+            showOverflowTooltip: true,
+            align: 'center',
+            minWidth: 90
+          },
 
-        addressId: [
-          {required: true, message: '请选择收件人地址', trigger: 'change'}
+          // {
+          //   prop: 'weightUnit',
+          //   label: '重量单位',
+          //   showOverflowTooltip: true,
+          //   align: 'center',
+          //   minWidth: 90
+          // },
+          //
+          // {
+          //   prop: 'roughWeight',
+          //   label: '毛重',
+          //   showOverflowTooltip: true,
+          //   align: 'center',
+          //   minWidth: 90
+          // },
+          //
+          // {
+          //   prop: 'netWeight',
+          //   label: '净重',
+          //   showOverflowTooltip: true,
+          //   align: 'center',
+          //   minWidth: 90
+          // },
+          //
+          // {
+          //   prop: 'packingUnit',
+          //   align: 'center',
+          //   label: '包装单位',
+          //   showOverflowTooltip: true
+          // },
+          // {
+          //   prop: 'categoryLevelPath',
+          //   label: '分类',
+          //   align: 'center',
+          //   showOverflowTooltip: true
+          // },
+          {
+            slot: 'action',
+            align: 'center',
+            minWidth: 90,
+            fixed: 'right',
+            label: '操作'
+          }
         ],
+        rules: {
+          categoryId: [
+            { required: true, message: '请选择供应商分类', trigger: 'change' }
+          ],
+          name: [
+            { required: true, message: '请输入供应商名称', trigger: 'blur' }
+          ],
+          authorizationLimit: [
+            { required: true, message: '请输入授信额度', trigger: 'blur' }
+          ],
 
-        address: [
-          {required: true, message: '请输入收件人详细地址', trigger: 'blur'}
-        ]
+          addressId: [
+            { required: true, message: '请选择地址', trigger: 'change' }
+          ]
+        },
+        otherRules: {
+          // settlementMode: [
+          //   { required: true, message: '请输入结算方式', trigger: 'blur' }
+          // ],
+          taxRate: [
+            { required: true, message: '请输入税率', trigger: 'change' }
+          ],
 
-      },
-      options: {
-        cityData,
-        categoryData,
-      },
-      // 提交状态
-      loading: false,
-      // 是否是修改
-      isUpdate: false,
+          sender: [
+            { required: true, message: '请输入收件人', trigger: 'change' }
+          ],
 
-      // 组织机构树形结构数据
-      groupTreeData: [],
-      // 组织机构平铺数据
-      groupData: [],
-    };
-  },
-  watch: {
-    categoryIdList(val) {
-      if (val.length > 0) {
-        this.$refs.form.clearValidate('categoryId')
-        this.form.categoryId = this.categoryIdList.join(',')
-      } else {
-        this.form.categoryId = ''
-        this.$refs.form.validateField('categoryId')
-      }
-    }
-  },
-  created() {
-    this.getGroupAll();
-  },
-  methods: {
-    async open(type, row, contactCategoryId) {
-      this.title = type;
-      this.row = row;
-      this.visible = true;
-      if (type == '新建供应商') {
-        this.isUpdate = false;
-        // 默认带出列表页面选中的分类
-        this.form.categoryId = contactCategoryId;
-      } else {
-        this.isUpdate = true;
-        await this._getById(row.id);
-      }
-    },
+          senderPhone: [
+            { required: true, message: '请输入收件人电话', trigger: 'change' }
+          ],
 
+          addressId: [
+            { required: true, message: '请选择收件人地址', trigger: 'change' }
+          ],
 
-    // 获取公司数据
-    getGroupAll() {
-      listOrganizations().then((list) => {
-        this.groupData = list;
-        this.groupTreeData = this.$util.toTreeData({
-          data: list,
-          idField: 'id',
-          parentIdField: 'parentId'
-        });
-      });
-    },
+          address: [
+            { required: true, message: '请输入收件人详细地址', trigger: 'blur' }
+          ]
+        },
+        options: {
+          cityData,
+          categoryData
+        },
+        // 提交状态
+        loading: false,
+        // 是否是修改
+        isUpdate: false,
 
-    handleActive(val) {
-      if (val.name == 'certificate') {
-        this.reload()
-      }
-    },
-    // 选择负责人部门
-    change_principalDep(id) {
-      const info = this.groupData.find(e => e.id == id);
-      this.otherForm.deptName = info.name;
-      this.otherForm.salesmanId = '';
-      this.otherForm.salesmanName = '';
-      // 根据部门获取人员
-      const params = {groupId: id};
-      this.$nextTick(() => {
-        this.$refs.directorRef.getList(params);
-      });
-    },
-    salesmanChange(val, info) {
-      this.otherForm.salesmanName = info.name;
-    },
-    settlementModeChange(info) {
-      this.otherForm.settlementModeName = info.dictValue;
-    },
-    ifChiefChange(value, idx) {
-      if (value === 1) {
-        this.tableLinkData.forEach(e => e.ifChief = 0);
-        this.tableLinkData[idx].ifChief = 1;
-      }
-    },
-    addBank() {
-      this.tableBankData.push({
-        accountName: '',
-        accountNo: '',
-        bankName: '',
-        interbankNo: ''
-      });
-    },
-    addLink() {
-      this.tableLinkData.push({
-        linkName: '',
-        mobilePhone: '',
-        phone: '',
-        email: '',
-        post: '',
-        status: '',
-        ifChief: 0,
-        remark: ''
-      });
-    },
-    handleBankDel(row, index) {
-      this.tableBankData.splice(index, 1);
-      if (row?.id) {
-        //   this.removeBankList.push(row.id);
-      }
-    },
-    handleLinkDel(row, index) {
-      this.tableLinkData.splice(index, 1);
-      if (row?.id) {
-        //   this.removeLinkList.push(row.id);
-      }
-    },
-    //新增/查看/修改资质
-    addCertificate(type, row) {
-      this.certificateQualificationsDialogFlag = true
-      this.$nextTick(() => {
-        this.$refs.certificateQualificationsDialogRef.init(type, row)
-      })
-    },
-    /* 证书资质表格数据源 */
-    tableCertificateData({page, limit, where}) {
-      if (!this.form.id) return []
-      return contactQcPackPageAPI({
-        certificationType: '2',
-        relationId: this.form.id
-      });
+        // 组织机构树形结构数据
+        groupTreeData: [],
+        // 组织机构平铺数据
+        groupData: []
+      };
     },
-    /* 刷新表格 */
-    reload(where) {
-      where = {
-        certificationType: '2',
-        relationId: this.form.id
+    watch: {
+      categoryIdList(val) {
+        if (val.length > 0) {
+          this.$refs.form.clearValidate('categoryId');
+          this.form.categoryId = this.categoryIdList.join(',');
+        } else {
+          this.form.categoryId = '';
+          this.$refs.form.validateField('categoryId');
+        }
       }
-      this.$refs.certificateTable.reload({...where});
     },
-    //删除资质包
-    handleRemove(row) {
-      contactQcPackDeleteAPI([row.id]).then((res) => {
-        this.$message.success('删除成功!');
-        this.reload();
-      });
+    created() {
+      this.getGroupAll();
     },
+    methods: {
+      async open(type, row, contactCategoryId) {
+        this.title = type;
+        this.row = row;
+        this.visible = true;
+        if (type == '新建供应商') {
+          this.isUpdate = false;
+          // 默认带出列表页面选中的分类
+          this.form.categoryId = contactCategoryId;
+        } else {
+          this.isUpdate = true;
+          await this._getById(row.id);
+        }
+      },
 
-    formValid() {
-      return new Promise((resolve, reject) => {
-        this.$refs.form.validate((valid) => {
-          if (!valid) {
-            this.activeName = 1;
-            reject(false);
-          } else {
-            resolve(true);
-          }
+      // 获取公司数据
+      getGroupAll() {
+        listOrganizations().then((list) => {
+          this.groupData = list;
+          this.groupTreeData = this.$util.toTreeData({
+            data: list,
+            idField: 'id',
+            parentIdField: 'parentId'
+          });
         });
-      });
-    },
-    otherFormValid() {
-      return new Promise((resolve, reject) => {
-        this.$refs.otherForm.validate((valid) => {
-          if (!valid) {
-            this.activeName = 4;
+      },
+
+      handleActive(val) {
+        if (val.name == 'certificate') {
+          this.reload();
+        }
+      },
+      // 选择负责人部门
+      change_principalDep(id) {
+        const info = this.groupData.find((e) => e.id == id);
+        this.otherForm.deptName = info.name;
+        this.otherForm.salesmanId = '';
+        this.otherForm.salesmanName = '';
+        // 根据部门获取人员
+        const params = { groupId: id };
+        this.$nextTick(() => {
+          this.$refs.directorRef.getList(params);
+        });
+      },
+      salesmanChange(val, info) {
+        this.otherForm.salesmanName = info.name;
+      },
+      settlementModeChange(info) {
+        this.otherForm.settlementModeName = info.dictValue;
+      },
+      ifChiefChange(value, idx) {
+        if (value === 1) {
+          this.tableLinkData.forEach((e) => (e.ifChief = 0));
+          this.tableLinkData[idx].ifChief = 1;
+        }
+      },
+      addBank() {
+        this.tableBankData.push({
+          accountName: '',
+          accountNo: '',
+          bankName: '',
+          interbankNo: ''
+        });
+      },
+      addLink() {
+        this.tableLinkData.push({
+          linkName: '',
+          mobilePhone: '',
+          phone: '',
+          email: '',
+          post: '',
+          status: '',
+          ifChief: 0,
+          remark: ''
+        });
+      },
+      handleBankDel(row, index) {
+        this.tableBankData.splice(index, 1);
+        if (row?.id) {
+          //   this.removeBankList.push(row.id);
+        }
+      },
+      handleLinkDel(row, index) {
+        this.tableLinkData.splice(index, 1);
+        if (row?.id) {
+          //   this.removeLinkList.push(row.id);
+        }
+      },
+      //新增/查看/修改资质
+      addCertificate(type, row) {
+        this.certificateQualificationsDialogFlag = true;
+        this.$nextTick(() => {
+          this.$refs.certificateQualificationsDialogRef.init(type, row);
+        });
+      },
+      /* 证书资质表格数据源 */
+      tableCertificateData({ page, limit, where }) {
+        if (!this.form.id) return [];
+        return contactQcPackPageAPI({
+          certificationType: '2',
+          relationId: this.form.id
+        });
+      },
+      /* 刷新表格 */
+      reload(where) {
+        where = {
+          certificationType: '2',
+          relationId: this.form.id
+        };
+        this.$refs.certificateTable.reload({ ...where });
+      },
+      //删除资质包
+      handleRemove(row) {
+        contactQcPackDeleteAPI([row.id]).then((res) => {
+          this.$message.success('删除成功!');
+          this.reload();
+        });
+      },
+
+      formValid() {
+        return new Promise((resolve, reject) => {
+          this.$refs.form.validate((valid) => {
+            if (!valid) {
+              this.activeName = 1;
+              reject(false);
+            } else {
+              resolve(true);
+            }
+          });
+        });
+      },
+      otherFormValid() {
+        return new Promise((resolve, reject) => {
+          this.$refs.otherForm.validate((valid) => {
+            if (!valid) {
+              this.activeName = 4;
+              reject(false);
+            } else {
+              resolve(true);
+            }
+          });
+        });
+      },
+      tableLinkDataValid() {
+        return new Promise((resolve, reject) => {
+          if (this.tableLinkData.length == 0) {
+            this.activeName = 3;
+            this.$message.error('联系人信息至少有1条');
             reject(false);
           } else {
             resolve(true);
           }
         });
-      });
-    },
-    tableLinkDataValid() {
-      return new Promise((resolve, reject) => {
-        if (this.tableLinkData.length == 0) {
-          this.activeName = 3;
-          this.$message.error('联系人信息至少有1条');
-          reject(false);
-        } else {
-          resolve(true);
-        }
-      });
-    },
-    getValidate() {
-      return Promise.all([
-        this.formValid(),
-        this.otherFormValid(),
-        this.tableLinkDataValid()
-      ]);
-    },
+      },
+      getValidate() {
+        return Promise.all([
+          this.formValid(),
+          this.otherFormValid(),
+          this.tableLinkDataValid()
+        ]);
+      },
 
-    async pageChange(type) {
-      if (type == 'up') {
-        this.activeName -= 1;
-      }
-      if (type == 'next') {
-        if (this.activeName == 1 && !(await this.formValid())) {
-          return;
-        }
-        if (this.activeName == 3 && !(await this.tableLinkDataValid())) {
-          this.$message.error('联系人信息至少有1条');
-          return;
-        }
-        if (this.activeName == 4 && !(await this.otherFormValid())) {
-          return;
+      async pageChange(type) {
+        if (type == 'up') {
+          this.activeName -= 1;
         }
-        this.activeName += 1;
-      }
-    },
-    //开启资质提交流程
-    async submit(row) {
-      // await contactQcSubmit({businessId: row.id, certificationType: '2'})
-      this.processSubmitDialogFlag = true
-      this.$nextTick(()=>{
-        let params = {
-          businessId: row.id,
-          businessKey : 'contact_qc_approve',
-          formCreateUserId: row.createUserId,
-          variables:{
-            certificationType: 2,
-            businessCode:row.code
-          },
-          
-          // 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)
-      })
-      //this.reload()
-    },
-    async save() {
-      try {
-        await this.getValidate();
-        // 表单验证通过,执行保存操作
-        this.loading = true;
-        // 基本信息处理
-        if (this.$refs.address.getCheckedNodes()) {
-          let node = this.$refs.address.getCheckedNodes()[0];
-          if (node) {
-            this.form.addressId = node.path.join();
-            this.form.addressName = node.pathLabels.join();
-          } else {
-            this.form.addressId = '';
-            this.form.addressName = '';
+        if (type == 'next') {
+          if (this.activeName == 1 && !(await this.formValid())) {
+            return;
+          }
+          if (this.activeName == 3 && !(await this.tableLinkDataValid())) {
+            this.$message.error('联系人信息至少有1条');
+            return;
+          }
+          if (this.activeName == 4 && !(await this.otherFormValid())) {
+            return;
           }
+          this.activeName += 1;
         }
+      },
+      //开启资质提交流程
+      async submit(row) {
+        // await contactQcSubmit({businessId: row.id, certificationType: '2'})
+        this.processSubmitDialogFlag = true;
+        this.$nextTick(() => {
+          let params = {
+            businessId: row.id,
+            businessKey: 'contact_qc_approve',
+            formCreateUserId: row.createUserId,
+            variables: {
+              certificationType: 2,
+              businessCode: row.code
+            }
+
+            // 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);
+        });
+        //this.reload()
+      },
+      async save() {
+        try {
+          await this.getValidate();
+          // 表单验证通过,执行保存操作
+          this.loading = true;
+          // 基本信息处理
+          if (this.$refs.address.getCheckedNodes()) {
+            let node = this.$refs.address.getCheckedNodes()[0];
+            if (node) {
+              this.form.addressId = node.path.join();
+              this.form.addressName = node.pathLabels.join();
+            } else {
+              this.form.addressId = '';
+              this.form.addressName = '';
+            }
+          }
 
-        if (this.$refs.industry.getCheckedNodes()) {
-          let node = this.$refs.industry.getCheckedNodes()[0];
-          if (node) {
-            this.form.industryCode = node.path.join();
-            this.form.industryFullName = node.pathLabels.join();
+          if (this.$refs.industry.getCheckedNodes()) {
+            let node = this.$refs.industry.getCheckedNodes()[0];
+            if (node) {
+              this.form.industryCode = node.path.join();
+              this.form.industryFullName = node.pathLabels.join();
+            } else {
+              this.form.industryCode = '';
+              this.form.industryFullName = '';
+            }
+          }
+          if (this.form.companyCategoryId) {
+            this.form.companyCategoryName = this.getDictValue(
+              '营业类型',
+              this.form.companyCategoryId
+            );
+          }
+          // if (this.form.businessLicenseFiles && this.form.businessLicenseFiles.length > 0) {
+          //   this.form.businessLicenseFile = this.form.businessLicenseFiles[0];
+          // } else {
+          //   this.form.businessLicenseFile = null;
+          // }
+
+          // 其他信息处理
+          if (this.form.settlementMode) {
+            this.form.settlementModeName = this.getDictValue(
+              '结算方式',
+              this.form.settlementMode
+            );
+          }
+          if (this.$refs.sendAddress.getCheckedNodes()) {
+            let node = this.$refs.sendAddress.getCheckedNodes()[0];
+            if (node) {
+              this.otherForm.addressId = node.path.join();
+              this.otherForm.addressName = node.pathLabels.join();
+            } else {
+              this.otherForm.addressId = '';
+              this.otherForm.addressName = '';
+            }
+          }
+
+          if (!this.isUpdate) {
+            delete this.form.id;
           } else {
-            this.form.industryCode = '';
-            this.form.industryFullName = '';
+            //   this.form.removeBankList = this.removeBankList;
+            //   this.form.removeLinkList = this.removeLinkList;
           }
+          const data = {
+            base: this.form,
+            other: this.otherForm,
+            bankList: this.tableBankData,
+            linkList: this.tableLinkData,
+            productList: this.supplyList
+          };
+          if (this.isUpdate) {
+            contactUpdate(data)
+              .then((res) => {
+                this.loading = false;
+                this.$message.success('修改成功');
+                this.cancel();
+                this.$emit('done');
+              })
+              .catch((e) => {
+                //this.loading = false;
+              });
+          } else {
+            contactSave(data)
+              .then((id) => {
+                this.loading = false;
+                this.$message.success('新增成功');
+                this.cancel();
+                this._getById(id);
+                this.title = '编辑';
+                this.$emit('done');
+                this.isUpdate = true;
+              })
+              .catch((e) => {
+                //this.loading = false;
+              });
+          }
+        } catch (error) {
+          // 表单验证未通过,不执行保存操作
         }
-        if (this.form.companyCategoryId) {
-          this.form.companyCategoryName = this.getDictValue(
-            '营业类型',
-            this.form.companyCategoryId
-          );
-        }
-        // if (this.form.businessLicenseFiles && this.form.businessLicenseFiles.length > 0) {
-        //   this.form.businessLicenseFile = this.form.businessLicenseFiles[0];
-        // } else {
-        //   this.form.businessLicenseFile = null;
+      },
+      cancel() {
+        this.$nextTick(() => {
+          this.activeName = 1;
+          // 关闭后,销毁所有的表单数据
+          this.$refs['otherForm'] && this.$refs['otherForm'].resetFields();
+          this.$refs['formRef'] && this.$refs['formRef'].resetFields();
+          (this.form = copyObj(this.formDef)),
+            (this.otherForm = copyObj(this.otherFormDef)),
+            (this.tableBankData = []);
+          this.tableLinkData = [];
+          this.categoryIdList = [];
+          this.visible = false;
+        });
+      },
+      async _getById(id) {
+        const data = await contactDetail(id);
+        this.form = data.base || {};
+        this.otherForm = data.other || {};
+        this.tableBankData = data.bankList || [];
+        this.tableLinkData = data.linkList || [];
+        this.supplyList = data.productList || [];
+        // if (data.base.businessLicenseFile && data.base.businessLicenseFile !== "") {
+        //   this.$set(this.form, 'businessLicenseFiles', [data.base.businessLicenseFile])
         // }
-
-        // 其他信息处理
-        if (this.form.settlementMode) {
-          this.form.settlementModeName = this.getDictValue(
-            '结算方式',
-            this.form.settlementMode
-          );
+        this.categoryIdList = this.form.categoryId.split(',');
+        if (this.tableLinkData && this.tableLinkData.length > 0) {
+          this.tableLinkData.forEach((e) => (e.status = e.status + ''));
         }
-        if (this.$refs.sendAddress.getCheckedNodes()) {
-          let node = this.$refs.sendAddress.getCheckedNodes()[0];
-          if (node) {
-            this.otherForm.addressId = node.path.join();
-            this.otherForm.addressName = node.pathLabels.join();
-          } else {
-            this.otherForm.addressId = '';
-            this.otherForm.addressName = '';
-          }
+        if (this.otherForm.settlementMode) {
+          this.otherForm.settlementMode = this.otherForm.settlementMode + '';
         }
-
-        if (!this.isUpdate) {
-          delete this.form.id;
-        } else {
-          //   this.form.removeBankList = this.removeBankList;
-          //   this.form.removeLinkList = this.removeLinkList;
+        if (this.form.level) {
+          this.form.level = this.form.level + '';
         }
-        const data = {
-          base: this.form,
-          other: this.otherForm,
-          bankList: this.tableBankData,
-          linkList: this.tableLinkData,
-          productList: this.supplyList
-        };
-        if (this.isUpdate) {
-          contactUpdate(data)
-            .then((res) => {
-              this.loading = false;
-              this.$message.success("修改成功");
-              this.cancel();
-              this.$emit('done');
-            })
-            .catch((e) => {
-              //this.loading = false;
-            });
-        } else {
-          contactSave(data)
-            .then((id) => {
-              this.loading = false;
-              this.$message.success("新增成功");
-              this.cancel();
-              this._getById(id)
-              this.title = '编辑'
-              this.$emit('done');
-              this.isUpdate = true
-            })
-            .catch((e) => {
-              //this.loading = false;
+        // 回显地址选择器
+        if (this.form.addressId && this.form.addressId.length > 0) {
+          this.form.addressId = this.form.addressId.split(',');
+        }
+        if (this.otherForm.addressId && this.otherForm.addressId.length > 0) {
+          this.otherForm.addressId = this.otherForm.addressId.split(',');
+        }
+        // 回显行业
+        if (this.form.industryCode && this.form.industryCode.length > 0) {
+          this.form.industry = this.form.industryCode.split(',');
+        }
+        if (this.otherForm.deptId) {
+          // 编辑时,默认查询组织相关的用户列表,用于回显
+          this.$nextTick(async () => {
+            await this.$refs.directorRef.getList({
+              groupId: this.otherForm.deptId
             });
+          });
         }
-      } catch (error) {
-        // 表单验证未通过,不执行保存操作
-      }
+      },
 
-    },
-    cancel() {
-      this.$nextTick(() => {
-        this.activeName = 1;
-        // 关闭后,销毁所有的表单数据
-        this.$refs['otherForm'] && this.$refs['otherForm'].resetFields();
-        this.$refs['formRef'] && this.$refs['formRef'].resetFields();
-        this.form = copyObj(this.formDef),
-          this.otherForm = copyObj(this.otherFormDef),
-          this.tableBankData = []
-        this.tableLinkData = []
-        this.categoryIdList = []
-        this.visible = false;
-      })
-    },
-    async _getById(id) {
-      const data = await contactDetail(id);
-      this.form = data.base || {};
-      this.otherForm = data.other || {};
-      this.tableBankData = data.bankList || [];
-      this.tableLinkData = data.linkList || [];
-      this.supplyList = data.productList || [];
-      // if (data.base.businessLicenseFile && data.base.businessLicenseFile !== "") {
-      //   this.$set(this.form, 'businessLicenseFiles', [data.base.businessLicenseFile])
-      // }
-      this.categoryIdList = this.form.categoryId.split(',')
-      if (this.tableLinkData && this.tableLinkData.length > 0) {
-        this.tableLinkData.forEach(e => e.status = e.status + "");
-      }
-      if (this.otherForm.settlementMode) {
-        this.otherForm.settlementMode = this.otherForm.settlementMode + "";
-      }
-      if (this.form.level) {
-        this.form.level = this.form.level + "";
-      }
-      // 回显地址选择器
-      if (this.form.addressId && this.form.addressId.length > 0) {
-        this.form.addressId = this.form.addressId.split(",");
-      }
-      if (this.otherForm.addressId && this.otherForm.addressId.length > 0) {
-        this.otherForm.addressId = this.otherForm.addressId.split(",");
-      }
-      // 回显行业
-      if (this.form.industryCode && this.form.industryCode.length > 0) {
-        this.form.industry = this.form.industryCode.split(",");
-      }
-      if (this.otherForm.deptId) {
-        // 编辑时,默认查询组织相关的用户列表,用于回显
-        this.$nextTick(async () => {
-          await this.$refs.directorRef.getList({groupId: this.otherForm.deptId});
-        })
-      }
-    },
+      handParent() {
+        let item = {
+          id: this.form.parentId
+        };
+        this.$refs.parentRef.open(item);
+      },
 
-    handParent() {
-      let item = {
-        id: this.form.parentId
+      changeParent(obj) {
+        this.$set(this.form, 'parentId', obj.id);
+        this.$set(this.form, 'parentName', obj.name);
+      },
+      //选择产品
+      handSelectSupply() {
+        this.$refs.productListRef.open(this.supplyList, -1);
+      },
+      getSupplyList(obj) {
+        obj.forEach((item, index) => {
+          let params = {};
+          this.$set(params, 'contactId', this.row.id);
+          this.$set(params, 'productId', item.id);
+          this.$set(params, 'categoryName', item.name);
+          this.$set(params, 'productCategoryId', item.categoryLevelId);
+          this.$set(params, 'productBrand', item.brandNum);
+          this.$set(params, 'productCategoryName', item.categoryLevelPath);
+          this.$set(params, 'productCode', item.code);
+          this.$set(params, 'productName', item.name);
+          this.$set(params, 'modelType', item.modelType);
+          this.$set(params, 'availableCountBase', item.availableCountBase);
+          this.$set(params, 'measuringUnit', item.measuringUnit);
+          this.$set(params, 'specification', item.specification);
+          this.$set(params, 'weightUnit', item.weightUnit);
+          this.$set(params, 'imgCode', item.imgCode);
+          this.$set(params, 'produceType', item.produceType);
+          this.$set(params, 'approvalNumber', item.approvalNumber);
+          this.$set(params, 'packingSpecification', item.packingSpecification);
+          this.$set(params, 'purchasingCycle', item.purchasingCycle);
+          this.$set(params, 'purchaseMultiplier', item.purchaseMultiplier);
+          this.$set(params, 'minimumOrderQuantity', item.minimumOrderQuantity);
+          this.supplyList.push(params);
+        });
+      },
+      //删除供货产品
+      handleRemoveSupply(index) {
+        this.supplyList.splice(index, 1);
       }
-      this.$refs.parentRef.open(item)
-    },
-
-    changeParent(obj) {
-      this.$set(this.form, 'parentId', obj.id)
-      this.$set(this.form, 'parentName', obj.name)
-
-    },
-    //选择产品
-    handSelectSupply() {
-      this.$refs.productListRef.open( this.supplyList,-1);
-    },
-    getSupplyList(obj) {
-      obj.forEach((item, index) => {
-        let params = {}
-        this.$set(params, 'contactId',this.row.id);
-        this.$set(params, 'productId', item.id);
-        this.$set(params, 'categoryName', item.name);
-        this.$set(params, 'productCategoryId', item.categoryLevelId);
-        this.$set(params, 'productBrand', item.brandNum);
-        this.$set(params, 'productCategoryName', item.categoryLevelPath);
-        this.$set(params, 'productCode', item.code);
-        this.$set(params, 'productName', item.name);
-        this.$set(params, 'modelType', item.modelType);
-        this.$set(params, 'availableCountBase', item.availableCountBase);
-        this.$set(params, 'measuringUnit', item.measuringUnit);
-        this.$set(params, 'specification', item.specification);
-        this.$set(params, 'weightUnit', item.weightUnit);
-        this.$set(params, 'imgCode', item.imgCode);
-        this.$set(params, 'produceType', item.produceType);
-        this.$set(params, 'approvalNumber', item.approvalNumber);
-        this.$set(params, 'packingSpecification', item.packingSpecification);
-        this.supplyList.push(params)
-      });
-    },
-    //删除供货产品
-    handleRemoveSupply(index) {
-      this.supplyList.splice(index, 1);
-    },
-
-  }
-};
+    }
+  };
 </script>

+ 52 - 5
src/views/saleManage/contact/components/addContactDialog.vue

@@ -697,6 +697,28 @@
           <template v-slot:toolbar>
             <el-button type="primary" @click="handSelectSupply">新增</el-button>
           </template>
+          <template v-slot:purchasingCycle="scope">
+              <el-input
+                v-model="scope.row.purchasingCycle"
+                placeholder="请输入"
+              >
+                <template slot="append">天</template>
+              </el-input>
+          </template>
+          <template v-slot:purchaseMultiplier="scope">
+              <el-input
+                v-model="scope.row.purchaseMultiplier"
+                placeholder="请输入"
+              >
+              </el-input>
+          </template>
+          <template v-slot:minimumOrderQuantity="scope">
+              <el-input
+                v-model="scope.row.minimumOrderQuantity"
+                placeholder="请输入"
+              >
+              </el-input>
+          </template>
           <!-- 操作栏 -->
           <template v-slot:action="scope">
             <el-popconfirm
@@ -942,6 +964,31 @@
             showOverflowTooltip: true,
             minWidth: 110
           },
+          {
+            prop: 'purchasingCycle',
+            label: '周期',
+            align: 'center',
+            slot: 'purchasingCycle',
+            showOverflowTooltip: true,
+            minWidth: 150
+          },
+          {
+            prop: 'purchaseMultiplier',
+            label: '倍数',
+            slot: 'purchaseMultiplier',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 100
+          },
+          {
+            prop: 'minimumOrderQuantity',
+            label: '最低订购数量',
+            slot: 'minimumOrderQuantity',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 150
+          },
+
           {
             prop: 'imgCode',
             align: 'center',
@@ -956,10 +1003,11 @@
             showOverflowTooltip: true,
             minWidth: 110,
             formatter: (row, column) => {
-              return row?.produceType?.map((item) =>{
-
-               return this.getDictValue('生产类型', item)
-              })?.toString()
+              return row?.produceType
+                ?.map((item) => {
+                  return this.getDictValue('生产类型', item);
+                })
+                ?.toString();
             }
           },
           {
@@ -1195,7 +1243,6 @@
     created() {
       this.getGroupAll();
       this.requestDict('生产类型');
-
     },
     computed: {
       clientEnvironmentId() {

+ 66 - 83
src/views/saleManage/quotation/components/detailDialog.vue

@@ -11,8 +11,11 @@
     width="70%"
     @close="cancel"
   >
-  <template slot="title">
-     <modalTitle :title="title" @setFullscreen="fullscreen=!fullscreen"></modalTitle>
+    <template slot="title">
+      <modalTitle
+        :title="title"
+        @setFullscreen="fullscreen = !fullscreen"
+      ></modalTitle>
     </template>
     <div class="switch">
       <div class="switch_left">
@@ -29,7 +32,13 @@
       </div>
     </div>
     <div v-show="activeComp === 'main'">
-      <el-form ref="form" :model="form" :rules="rules" label-width="120px" class="el-form-box">
+      <el-form
+        ref="form"
+        :model="form"
+        :rules="rules"
+        label-width="120px"
+        class="el-form-box"
+      >
         <headerTitle title="基本信息">
           <el-button
             size="small"
@@ -42,65 +51,43 @@
           </el-button>
         </headerTitle>
         <el-row gutter="12">
-          <el-col :span="12">
-            <el-form-item
-              label="关联商机名称"
-              prop="opportunityName">
-              <el-input v-model="detailData.opportunityName" disabled></el-input>
+          <el-col :span="8">
+            <el-form-item label="关联商机名称" prop="opportunityName">
+              <el-input
+                v-model="detailData.opportunityName"
+                disabled
+              ></el-input>
             </el-form-item>
-            <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-form-item
-              label="询价方联系人"
-              prop="contactLinkName">
+            <el-form-item label="询价方联系人" prop="contactLinkName">
               <el-input v-model="form.contactLinkName" disabled></el-input>
             </el-form-item>
 
-            <el-form-item
-              label="询价方电话"
-              prop="contactTel">
+            <el-form-item label="询价方电话" prop="contactTel">
               <el-input v-model="form.contactTel" disabled></el-input>
             </el-form-item>
-            <el-form-item
-              label="询价方传真"
-              prop="contactFax">
+            <el-form-item label="询价方传真" prop="contactFax">
               <el-input v-model="form.contactFax" disabled></el-input>
             </el-form-item>
-            <el-form-item
-              label="询价方Email"
-              prop="contactEmail">
+            <el-form-item label="询价方Email" prop="contactEmail">
               <el-input v-model="form.contactEmail" disabled></el-input>
             </el-form-item>
-            <el-form-item
-              label="询价方地址"
-              prop="contactAddress">
+            <el-form-item label="询价方地址" prop="contactAddress">
               <el-input v-model="form.contactAddress" disabled></el-input>
             </el-form-item>
-            <el-form-item
-              label="结算方式"
-              prop="payWay">
-              <el-input v-model="form.settlementModeName" disabled></el-input>
-            </el-form-item>
-            <el-form-item
-              label="创建人"
-              prop="createUsername">
+
+            <el-form-item label="创建人" prop="createUsername">
               <el-input v-model="form.createUsername" disabled></el-input>
             </el-form-item>
-
           </el-col>
-          <el-col :span="12">
-            <el-form-item
-              label="报价方名称"
-              prop="quoteName">
+          <el-col :span="8">
+            <el-form-item label="报价方名称" prop="quoteName">
               <el-input v-model="form.quoteName" disabled></el-input>
             </el-form-item>
 
-            <el-form-item
-              label="报价方联系人"
-              prop="quoteLinkName">
+            <el-form-item label="报价方联系人" prop="quoteLinkName">
               <el-input v-model="form.quoteLinkName" disabled></el-input>
             </el-form-item>
             <el-form-item prop="quoteTel" label="报价方联系电话">
@@ -110,15 +97,11 @@
               <el-input v-model="form.quoteFax" disabled></el-input>
             </el-form-item>
 
-            <el-form-item
-              label="报价方Email"
-              prop="quoteEmail">
+            <el-form-item label="报价方Email" prop="quoteEmail">
               <el-input v-model="form.quoteEmail" disabled></el-input>
             </el-form-item>
 
-            <el-form-item
-              label="报价方地址"
-              prop="quoteAddress">
+            <el-form-item label="报价方地址" prop="quoteAddress">
               <el-input v-model="form.quoteAddress" disabled></el-input>
             </el-form-item>
             <el-form-item prop="askFile" label="附件">
@@ -131,12 +114,32 @@
                 {{ form.askFile.name }}</el-link
               >
             </el-form-item>
-          
-            <el-form-item
-              label="是否接受拆单"
-              prop="acceptUnpack"
-            >
-              <el-select v-model="form.acceptUnpack" placeholder="请选择" style="width: 100%;" disabled>
+
+      
+            <el-form-item label="创建时间" prop="createTime">
+              <el-input v-model="form.createTime" disabled></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="8">
+          <el-form-item label="总价" prop="totalPrice">
+            <el-input v-model="form.totalPrice" disabled></el-input>
+          </el-form-item>
+          <el-form-item prop="totalCount" label="总数量">
+            <el-input v-model="form.totalCount" disabled></el-input>
+          </el-form-item>
+          <el-form-item prop="totalWeight" label=" 总重">
+            <el-input v-model="form.totalWeight" disabled></el-input>
+          </el-form-item>
+          <el-form-item label="结算方式" prop="payWay">
+              <el-input v-model="form.settlementModeName" disabled></el-input>
+            </el-form-item>
+          <el-form-item label="是否接受拆单" prop="acceptUnpack">
+              <el-select
+                v-model="form.acceptUnpack"
+                placeholder="请选择"
+                style="width: 100%"
+                disabled
+              >
                 <el-option
                   v-for="item in acceptUnpackoptions"
                   :key="item.value"
@@ -146,38 +149,15 @@
                 </el-option>
               </el-select>
             </el-form-item>
-            <el-form-item
-              label="创建时间"
-              prop="createTime">
-              <el-input v-model="form.createTime" disabled></el-input>
-            </el-form-item>
-          </el-col>
+       </el-col >
         </el-row>
         <headerTitle title="报价单产品清单"></headerTitle>
         <inventoryTabledetail
           :isCustomerMark="false"
           ref="inventoryTabledetailRef"
         ></inventoryTabledetail>
-        <el-row style="margin-top: 20px">
-          <!-- <el-col :span="6">
-            <el-form-item prop="taxRate" label="税率">
-              <el-input v-model="form.taxRate" disabled>
-                <template slot="append">%</template>
-              </el-input>
-            </el-form-item>
-          </el-col>
-          <el-col :span="6">
-            <el-form-item prop="deliveryDate" label="交货日期">
-              <el-input v-model="form.deliveryDate" disabled>
-              </el-input>
-            </el-form-item>
-          </el-col> -->
- 
-
-        </el-row>
+  
       </el-form>
-
-
     </div>
 
     <bpmDetail
@@ -198,18 +178,19 @@
   import { copyObj } from '@/utils/util';
   import bpmDetail from '@/views/bpm/processInstance/detail.vue';
   import inventoryTabledetail from '@/BIZComponents/inventoryTableDetails.vue';
-  import {acceptUnpackoptions} from '@/enum/dict';
+  import { acceptUnpackoptions } from '@/enum/dict';
   import modalTitle from '@/BIZComponents/modalTitle.vue';
 
   export default {
     mixins: [dictMixins],
     components: {
       bpmDetail,
-      inventoryTabledetail,modalTitle
+      inventoryTabledetail,
+      modalTitle
     },
     data() {
       return {
-      fullscreen:false,
+        fullscreen: false,
 
         activeComp: 'main',
         tabOptions: [
@@ -309,7 +290,9 @@
             label: '质保期',
             slot: 'guaranteePeriod',
             formatter: (_row, _column, cellValue) => {
-              return (_row.guaranteePeriod||'') + _row.guaranteePeriodUnitName;
+              return (
+                (_row.guaranteePeriod || '') + _row.guaranteePeriodUnitName
+              );
             }
           },
           // {

+ 413 - 393
src/views/saleManage/saleOrder/index.vue

@@ -40,7 +40,6 @@
                   icon="el-icon-plus"
                   class="ele-btn-icon"
                   @click="openEdit('add', {})"
-
                 >
                   新建
                 </el-button>
@@ -82,7 +81,11 @@
                   :underline="false"
                   icon="el-icon-edit"
                   @click="openEdit('edit', row)"
-                  v-if="(isNeed_process_is_close&&[0, 3].includes(row.orderStatus))||!isNeed_process_is_close"
+                  v-if="
+                    (isNeed_process_is_close &&
+                      [0, 3].includes(row.orderStatus)) ||
+                    !isNeed_process_is_close
+                  "
                 >
                   修改
                 </el-link>
@@ -91,7 +94,9 @@
                   :underline="false"
                   icon="el-icon-plus"
                   @click="saleOrderSubmitOrGenerate(row)"
-                  v-if="isNeed_process_is_close&&[0, 3].includes(row.orderStatus)"
+                  v-if="
+                    isNeed_process_is_close && [0, 3].includes(row.orderStatus)
+                  "
                 >
                   提交
                 </el-link>
@@ -113,7 +118,11 @@
                   class="ele-action"
                   title="确定要删除此信息吗?"
                   @confirm="remove([row.id])"
-                  v-if="(isNeed_process_is_close&&[0, 3].includes(row.orderStatus))||!isNeed_process_is_close"
+                  v-if="
+                    (isNeed_process_is_close &&
+                      [0, 3].includes(row.orderStatus)) ||
+                    !isNeed_process_is_close
+                  "
                 >
                   <template v-slot:reference>
                     <el-link
@@ -143,13 +152,13 @@
                   </span>
                   <el-dropdown-menu slot="dropdown">
                     <el-dropdown-item command="invoice"
-                    >创建发货单
+                      >创建发货单
                     </el-dropdown-item>
                     <el-dropdown-item command="returnOrder"
-                    >创建退货单
+                      >创建退货单
                     </el-dropdown-item>
                     <el-dropdown-item command="saleOrderReminder"
-                    >催单
+                      >催单
                     </el-dropdown-item>
                   </el-dropdown-menu>
                 </el-dropdown>
@@ -178,11 +187,14 @@
         <div v-if="activeComp == 'exceptionList'">
           <exceptionList></exceptionList>
         </div>
-        
       </div>
     </el-card>
 
-    <add-dialog ref="addDialogRef" @done="reload" :contactData="contactData"></add-dialog>
+    <add-dialog
+      ref="addDialogRef"
+      @done="reload"
+      :contactData="contactData"
+    ></add-dialog>
     <add-invoice-dialog
       ref="invoiceDialogRef"
       @done="reload"
@@ -207,419 +219,427 @@
       @done="commitBtn"
     />
     <drawer ref="drawerRef"></drawer>
-    <process-submit-dialog :isNotNeedProcess="false" :processSubmitDialogFlag.sync="processSubmitDialogFlag" v-if="processSubmitDialogFlag"
-                           ref="processSubmitDialogRef" @reload="reload"></process-submit-dialog>
-
+    <process-submit-dialog
+      :isNotNeedProcess="false"
+      :processSubmitDialogFlag.sync="processSubmitDialogFlag"
+      v-if="processSubmitDialogFlag"
+      ref="processSubmitDialogRef"
+      @reload="reload"
+    ></process-submit-dialog>
   </div>
 </template>
 
 <script>
-import searchTable from './components/searchTable.vue';
-import addDialog from './components/addDialog.vue';
-import invoice from './invoice/index.vue';
-import invoiceConfirm from './invoiceConfirm/index.vue';
-import detailDialog from './components/detailDialog.vue';
-import exceptionList from './exceptionManagement/exceptionList';
+  import searchTable from './components/searchTable.vue';
+  import addDialog from './components/addDialog.vue';
+  import invoice from './invoice/index.vue';
+  import invoiceConfirm from './invoiceConfirm/index.vue';
+  import detailDialog from './components/detailDialog.vue';
+  import exceptionList from './exceptionManagement/exceptionList';
 
-import drawer from './components/drawer.vue';
-import contractrDetail from '@/views/contractManage/contractBook/components/detailDialog.vue';
-import addInvoiceDialog from '@/views/saleManage/saleOrder/invoice/components/addInvoiceDialog';
-import addReturnGoodsDialog from '@/views/saleManage/saleOrder/returnGoods/components/addReturnGoodsDialog';
-import popModal from '@/components/pop-modal';
-import accountstatement from './accountstatement/index.vue';
-import customerReturnOrder from './customerReturnOrder/index.vue';
-import returnGoods from './returnGoods/index.vue';
-import {deleteInformation, getSaleOrderDetail, getTableList,saleOrderReminder} from '@/api/saleManage/saleorder';
-import dictMixins from '@/mixins/dictMixins';
-import {reviewStatus, saleOrderProgressStatusEnum} from '@/enum/dict';
-import entrustedReceive from '@/views/saleManage/saleOrder/entrustedReceive/index.vue';
-import autogenerateDialog from '@/BIZComponents/autogenerateDialog.vue';
-import processSubmitDialog from "@/BIZComponents/processSubmitDialog/processSubmitDialog.vue";
+  import drawer from './components/drawer.vue';
+  import contractrDetail from '@/views/contractManage/contractBook/components/detailDialog.vue';
+  import addInvoiceDialog from '@/views/saleManage/saleOrder/invoice/components/addInvoiceDialog';
+  import addReturnGoodsDialog from '@/views/saleManage/saleOrder/returnGoods/components/addReturnGoodsDialog';
+  import popModal from '@/components/pop-modal';
+  import accountstatement from './accountstatement/index.vue';
+  import customerReturnOrder from './customerReturnOrder/index.vue';
+  import returnGoods from './returnGoods/index.vue';
+  import {
+    deleteInformation,
+    getSaleOrderDetail,
+    getTableList,
+    saleOrderReminder
+  } from '@/api/saleManage/saleorder';
+  import dictMixins from '@/mixins/dictMixins';
+  import { reviewStatus, saleOrderProgressStatusEnum } from '@/enum/dict';
+  import entrustedReceive from '@/views/saleManage/saleOrder/entrustedReceive/index.vue';
+  import autogenerateDialog from '@/BIZComponents/autogenerateDialog.vue';
+  import processSubmitDialog from '@/BIZComponents/processSubmitDialog/processSubmitDialog.vue';
 
-export default {
-  mixins: [dictMixins],
-  components: {
-    processSubmitDialog,
-    autogenerateDialog,
-    searchTable,
-    returnGoods,
-    accountstatement,
-    popModal,
-    contractrDetail,
-    addReturnGoodsDialog,
-    addInvoiceDialog,
-    invoice,
-    addDialog,
-    detailDialog,
-    customerReturnOrder,
-    entrustedReceive,
-    invoiceConfirm,
-    drawer,exceptionList
-  },
-  //客户管理数据
-  props: {
-    contactData: {
-      type: Object,
-      default: () => {
-        return {}
+  export default {
+    mixins: [dictMixins],
+    components: {
+      processSubmitDialog,
+      autogenerateDialog,
+      searchTable,
+      returnGoods,
+      accountstatement,
+      popModal,
+      contractrDetail,
+      addReturnGoodsDialog,
+      addInvoiceDialog,
+      invoice,
+      addDialog,
+      detailDialog,
+      customerReturnOrder,
+      entrustedReceive,
+      invoiceConfirm,
+      drawer,
+      exceptionList
+    },
+    //客户管理数据
+    props: {
+      contactData: {
+        type: Object,
+        default: () => {
+          return {};
+        }
       }
-    }
-  },
-  data() {
-    return {
-      activeComp: 'saleorder',
-      tabOptions: [
-        {key: 'saleorder', name: '销售订单'},
-        {key: 'entrustedReceive', name: '受托收货单'},
-        {key: 'invoice', name: '发货单'},
-        {key: 'invoiceConfirm', name: '收货确认单'},
-        {key: 'exceptionList', name: '异常列表'},
-        {key: 'returnorder', name: '退货单'},
-        {key: 'customerReturnOrder', name: '退货处理单'},
-        {key: 'accountstatement', name: '对账单'}
-      ],
-      selection: [], //单选中集合
-      delVisible: false, //批量删除弹框状态
-      loading: false, // 加载状态
-      processSubmitDialogFlag: false, // 加载状态
-      columns: [
-        {
-          width: 45,
-          type: 'selection',
-          columnKey: 'selection',
-          align: 'center'
-        },
-        {
-          columnKey: 'index',
-          label: '序号',
-          type: 'index',
-          width: 55,
-          align: 'center',
-          showOverflowTooltip: true,
-          fixed: 'left'
-        },
-        {
-          prop: 'orderNo',
-          label: '订单编码',
-          align: 'center',
-          slot: 'orderNo',
-          showOverflowTooltip: true,
-          sortable: true,
-          minWidth: 200,
-          fixed: 'left'
-
-        },
-        {
-          prop: 'progress',
-          label: '订单进度',
-          align: 'center',
-          showOverflowTooltip: true,
-          formatter: (_row, _column, cellValue) => {
-            return saleOrderProgressStatusEnum.find(val=>val.value==_row.progress)?.label;
+    },
+    data() {
+      return {
+        activeComp: 'saleorder',
+        tabOptions: [
+          { key: 'saleorder', name: '销售订单' },
+          { key: 'entrustedReceive', name: '受托收货单' },
+          { key: 'invoice', name: '发货单' },
+          { key: 'invoiceConfirm', name: '收货确认单' },
+          { key: 'exceptionList', name: '异常列表' },
+          { key: 'returnorder', name: '退货单' },
+          { key: 'customerReturnOrder', name: '退货处理单' },
+          { key: 'accountstatement', name: '对账单' }
+        ],
+        selection: [], //单选中集合
+        delVisible: false, //批量删除弹框状态
+        loading: false, // 加载状态
+        processSubmitDialogFlag: false, // 加载状态
+        columns: [
+          {
+            width: 45,
+            type: 'selection',
+            columnKey: 'selection',
+            align: 'center'
+          },
+          {
+            columnKey: 'index',
+            label: '序号',
+            type: 'index',
+            width: 55,
+            align: 'center',
+            showOverflowTooltip: true,
+            fixed: 'left'
+          },
+          {
+            prop: 'orderNo',
+            label: '订单编码',
+            align: 'center',
+            slot: 'orderNo',
+            showOverflowTooltip: true,
+            sortable: true,
+            minWidth: 200,
+            fixed: 'left'
+          },
+          {
+            prop: 'progress',
+            label: '订单进度',
+            align: 'center',
+            showOverflowTooltip: true,
+            formatter: (_row, _column, cellValue) => {
+              return saleOrderProgressStatusEnum.find(
+                (val) => val.value == _row.progress
+              )?.label;
+            },
+            minWidth: 120
           },
-          minWidth: 120
-        },
-
-        // {
-        //   prop: 'deliveryDate',
-        //   label: '交货日期',
-        //   align: 'center',
-        //   showOverflowTooltip: true,
-        //   minWidth: 200
-        // },
-        {
-          prop: 'productNames',
-          label: '产品名称',
-          align: 'center',
-          showOverflowTooltip: true,
-          minWidth: 140
-        },
-        {
-          prop: 'batchNo',
-          label: '批次号',
-          align: 'center',
-          showOverflowTooltip: true,
-          minWidth: 140
-        },
-        {
-          prop: 'saleTypeName',
-          label: '销售类型',
-          align: 'center',
-          showOverflowTooltip: true,
-          minWidth: 140
-        },
-        {
-          prop: 'projectName',
-          label: '项目名称',
-          align: 'center',
-          showOverflowTooltip: true,
-          minWidth: 180
-        },
-        {
-          prop: 'partaName',
-          label: '客户名称',
-          align: 'center',
-          showOverflowTooltip: true,
-          minWidth: 180
-        },
-        {
-          prop: 'partaLinkName',
-          label: '客户联系人',
-          align: 'center',
-          showOverflowTooltip: true,
-          minWidth: 130
-        },
 
-        {
-          prop: 'partaTel',
-          label: '客户联系电话',
-          align: 'center',
-          showOverflowTooltip: true,
-          minWidth: 130
-        },
-        {
-          prop: 'partbName',
-          label: '售出方名称',
-          align: 'center',
-          showOverflowTooltip: true,
-          minWidth: 130
-        },
-        {
-          prop: 'partbLinkName',
-          label: '售出方联系人',
-          align: 'center',
-          showOverflowTooltip: true,
-          minWidth: 130
-        },
-        {
-          prop: 'partbTel',
-          label: '售出方联系电话',
-          align: 'center',
-          showOverflowTooltip: true,
-          minWidth: 130
-        },
-        {
-          prop: 'payAmount',
-          label: '金额(元)',
-          align: 'center',
-          showOverflowTooltip: true,
-          minWidth: 170
-        },
+          // {
+          //   prop: 'deliveryDate',
+          //   label: '交货日期',
+          //   align: 'center',
+          //   showOverflowTooltip: true,
+          //   minWidth: 200
+          // },
+          {
+            prop: 'productNames',
+            label: '产品名称',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 140
+          },
+          {
+            prop: 'batchNo',
+            label: '批次号',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 140
+          },
+          {
+            prop: 'saleTypeName',
+            label: '销售类型',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 140
+          },
+          {
+            prop: 'projectName',
+            label: '项目名称',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 180
+          },
+          {
+            prop: 'partaName',
+            label: '客户名称',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 180
+          },
+          {
+            prop: 'partaLinkName',
+            label: '客户联系人',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 130
+          },
 
-        {
-          prop: 'orderStatus',
-          label: '审核状态',
-          align: 'center',
-          showOverflowTooltip: true,
-          minWidth: 100,
-          formatter: (_row, _column, cellValue) => {
-            return reviewStatus[_row.orderStatus];
-          }
-        },
-        {
-          prop: 'contractNo',
-          label: '合同编码',
-          align: 'center',
-          slot: 'contractNo',
-          showOverflowTooltip: true,
-          minWidth: 200
-        },
-        {
-          prop: 'contractNumber',
-          label: '合同编号',
-          align: 'center',
-          showOverflowTooltip: true,
-          minWidth: 200
-        },
-        {
-          prop: 'createUserName',
-          label: '创建人',
-          align: 'center',
-          showOverflowTooltip: true,
-          minWidth: 80,
-        },
-        {
-          prop: 'createTime',
-          label: '创建时间',
-          align: 'center',
-          showOverflowTooltip: true,
-          minWidth: 170
-        },
-        {
-          columnKey: 'action',
-          label: '操作',
-          width: 230,
-          align: 'center',
-          resizable: false,
-          slot: 'action',
-          showOverflowTooltip: true,
-          fixed: 'right'
-        }
-      ]
-    };
-  },
-  computed: {},
-  created() {
-    this.requestDict('客户状态');
-  },
-  methods: {
-    //更多菜单
-    handleCommand(command, row) {
-      if (command === 'invoice') {
-        this.$refs.invoiceDialogRef.open('add', {}, row.id);
-      }
-      if (command === 'returnOrder') {
-        this.$refs.addReturnGoodsRef.open('add', {});
-      }
-      if (command === 'saleOrderReminder') {
-        saleOrderReminder(row.id).then(res=>{
-          this.$message.success('催单成功');
+          {
+            prop: 'partaTel',
+            label: '客户联系电话',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 130
+          },
+          {
+            prop: 'partbName',
+            label: '售出方名称',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 130
+          },
+          {
+            prop: 'partbLinkName',
+            label: '售出方联系人',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 130
+          },
+          {
+            prop: 'partbTel',
+            label: '售出方联系电话',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 130
+          },
+          {
+            prop: 'payAmount',
+            label: '金额(元)',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 170
+          },
 
-        })
-      }
+          {
+            prop: 'orderStatus',
+            label: '审核状态',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 100,
+            formatter: (_row, _column, cellValue) => {
+              return reviewStatus[_row.orderStatus];
+            }
+          },
+          {
+            prop: 'contractNo',
+            label: '来源单据',
+            align: 'center',
+            slot: 'contractNo',
+            showOverflowTooltip: true,
+            minWidth: 200,
+            formatter: (_row, _column, cellValue) => {
+              return _row.contractNo+(_row.contractNumber&&','+_row.contractNumber)
+            }
+          },
       
+          {
+            prop: 'createUserName',
+            label: '创建人',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 80
+          },
+          {
+            prop: 'createTime',
+            label: '创建时间',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 170
+          },
+          {
+            columnKey: 'action',
+            label: '操作',
+            width: 230,
+            align: 'center',
+            resizable: false,
+            slot: 'action',
+            showOverflowTooltip: true,
+            fixed: 'right'
+          }
+        ]
+      };
     },
-    //点击左边分类
-    handleNodeClick(data, node) {
-      // this.curNodeData = data;
-      this.reload({categoryId: data.id});
-    },
-    /* 表格数据源 */
-    datasource({page, limit, where, order}) {
-      if (this.contactData.id) {
-        where['contactId'] = this.contactData.id;
-      }
-      return getTableList({
-        pageNum: page,
-        size: limit,
-        ...where
-      });
+    computed: {},
+    created() {
+      this.requestDict('客户状态');
     },
+    methods: {
+      //更多菜单
+      handleCommand(command, row) {
+        if (command === 'invoice') {
+          this.$refs.invoiceDialogRef.open('add', {}, row.id);
+        }
+        if (command === 'returnOrder') {
+          this.$refs.addReturnGoodsRef.open('add', {});
+        }
+        if (command === 'saleOrderReminder') {
+          saleOrderReminder(row.id).then((res) => {
+            this.$message.success('催单成功');
+          });
+        }
+      },
+      //点击左边分类
+      handleNodeClick(data, node) {
+        // this.curNodeData = data;
+        this.reload({ categoryId: data.id });
+      },
+      /* 表格数据源 */
+      datasource({ page, limit, where, order }) {
+        if (this.contactData.id) {
+          where['contactId'] = this.contactData.id;
+        }
+        return getTableList({
+          pageNum: page,
+          size: limit,
+          ...where
+        });
+      },
 
-    /* 刷新表格 */
-    reload(where) {
-      this.$refs.table.reload({page: 1, where});
-    },
+      /* 刷新表格 */
+      reload(where) {
+        this.$refs.table.reload({ page: 1, where });
+      },
 
-    //新增编辑
-    openEdit(type, row) {
-      this.$refs.addDialogRef.open(type, row, row.id);
-      this.$refs.addDialogRef.$refs.form &&
-      this.$refs.addDialogRef.$refs.form.clearValidate();
-    },
+      //新增编辑
+      openEdit(type, row) {
+        this.$refs.addDialogRef.open(type, row, row.id);
+        this.$refs.addDialogRef.$refs.form &&
+          this.$refs.addDialogRef.$refs.form.clearValidate();
+      },
 
-    //批量删除
-    allDelBtn() {
-      if (this.selection.length === 0) return;
-      let flag = this.selection.some((item) =>
-        [1, 2].includes(item.orderStatus)
-      );
-      if (flag)
-        return this.$message.warning('抱歉已审核、审核中的数据不能删除,请检查');
-      this.delVisible = true;
-    },
+      //批量删除
+      allDelBtn() {
+        if (this.selection.length === 0) return;
+        let flag = this.selection.some((item) =>
+          [1, 2].includes(item.orderStatus)
+        );
+        if (flag)
+          return this.$message.warning(
+            '抱歉已审核、审核中的数据不能删除,请检查'
+          );
+        this.delVisible = true;
+      },
 
-    //删除接口
-    remove(delData) {
-      deleteInformation(delData).then((res) => {
-        this.$message.success('删除成功!');
-        this.reload();
-      });
-    },
+      //删除接口
+      remove(delData) {
+        deleteInformation(delData).then((res) => {
+          this.$message.success('删除成功!');
+          this.reload();
+        });
+      },
 
-    //删除弹框确定
-    commitBtn() {
-      const dataId = this.selection.map((v) => v.id);
-      this.remove(dataId);
-    },
+      //删除弹框确定
+      commitBtn() {
+        const dataId = this.selection.map((v) => v.id);
+        this.remove(dataId);
+      },
 
-    //查看详情
-    openorderDetail(row) {
-      // this.$refs.contactDetailDialogRef.open(row);
-      this.$refs.drawerRef.open(row);
-    },
-    async saleOrderSubmit(id) {
-      this.$refs.addDialogRef && this.$refs.addDialogRef.cancel();
-      const data = await getSaleOrderDetail(id);
-      this.processSubmitDialogFlag = true
-      this.$nextTick(() => {
-        let params = {
-          businessId: id,
-          businessKey: 'sales_order_approve',
-          formCreateUserId: data.createUserId,
-          variables: {
-            businessCode: data.orderNo
-          },
-          // 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: id
-      // }).then(() => {
-      //   this.$message.success('提交成功');
-      //   this.reload();
-      // });
-    },
-    saleOrderSubmitOrGenerate(res) {
-      this.saleOrderSubmit(res.id);
-      // if (res.needProduce == 1) {
-      //   this.handleAutoGenerate(res.id, true);
-      // } else {
-      //   this.saleOrderSubmit(res.id);
-      // }
-    },
-    //生成
-    handleAutoGenerate(id, isAuto = false) {
-      this.$refs.autogenerateDialogRef.init(id, isAuto);
-    },
-    //查看合同详情
-    opencontractDetail(row) {
-      let data = {
-        id: row.contractId
-      };
-      this.$refs.contractDetailRef.open(data);
+      //查看详情
+      openorderDetail(row) {
+        // this.$refs.contactDetailDialogRef.open(row);
+        this.$refs.drawerRef.open(row);
+      },
+      async saleOrderSubmit(id) {
+        this.$refs.addDialogRef && this.$refs.addDialogRef.cancel();
+        const data = await getSaleOrderDetail(id);
+        this.processSubmitDialogFlag = true;
+        this.$nextTick(() => {
+          let params = {
+            businessId: id,
+            businessKey: 'sales_order_approve',
+            formCreateUserId: data.createUserId,
+            variables: {
+              businessCode: data.orderNo
+            }
+            // 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: id
+        // }).then(() => {
+        //   this.$message.success('提交成功');
+        //   this.reload();
+        // });
+      },
+      saleOrderSubmitOrGenerate(res) {
+        this.saleOrderSubmit(res.id);
+        // if (res.needProduce == 1) {
+        //   this.handleAutoGenerate(res.id, true);
+        // } else {
+        //   this.saleOrderSubmit(res.id);
+        // }
+      },
+      //生成
+      handleAutoGenerate(id, isAuto = false) {
+        this.$refs.autogenerateDialogRef.init(id, isAuto);
+      },
+      //查看合同详情
+      opencontractDetail(row) {
+        let data = {
+          id: row.contractId
+        };
+        this.$refs.contractDetailRef.open(data);
+      }
     }
-  }
-};
+  };
 </script>
 
 <style lang="scss" scoped>
-:deep .el-card__body {
-  padding: 0;
-}
+  :deep .el-card__body {
+    padding: 0;
+  }
 
-:deep(.el-link--inner) {
-  margin-left: 0px !important;
-}
+  :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 {
+    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;
+  .sys-organization-list :deep(.el-tree-node__content) {
+    height: 40px;
 
-  & > .el-tree-node__expand-icon {
-    margin-left: 10px;
+    & > .el-tree-node__expand-icon {
+      margin-left: 10px;
+    }
   }
-}
 
-.el-dropdown-link {
-  cursor: pointer;
-  color: var(--color-primary-5);
-}
+  .el-dropdown-link {
+    cursor: pointer;
+    color: var(--color-primary-5);
+  }
 
-.el-icon-arrow-down {
-  font-size: 12px;
-}
+  .el-icon-arrow-down {
+    font-size: 12px;
+  }
 </style>