Просмотр исходного кода

客户、供应商资质修改

Z 1 год назад
Родитель
Сommit
afb8d6f8bf

+ 9 - 7
src/api/saleManage/contact.js

@@ -43,11 +43,13 @@ export async function contactSave(data) {
   }
   return Promise.reject(new Error(res.data.message));
 }
+
+
 /**
  * 客户证书资质信息分页
  */
-export async function contactQcPackPageAPI(data) {
-  const res = await request.post(`/eom/contactqcpack/page`, data);
+export async function contactQcPackPageAPI(params) {
+  const res = await request.get(`/main/professionCertification/selectByRelationIdAndType`, {params});
   if (res.data.code == 0) {
     return res.data.data;
   }
@@ -57,7 +59,7 @@ export async function contactQcPackPageAPI(data) {
  * 新增客户证书资质信息
  */
 export async function contactQcPackSaveAPI(data) {
-  const res = await request.post(`/eom/contactqcpack/save`, data);
+  const res = await request.post(`/main/professionCertification/save`, data);
   if (res.data.code == 0) {
     return res.data.data;
   }
@@ -67,7 +69,7 @@ export async function contactQcPackSaveAPI(data) {
  * 修改客户证书资质信息
  */
 export async function contactQcPackUpdateAPI(data) {
-  const res = await request.put(`/eom/contactqcpack/update`, data);
+  const res = await request.put(`/main/professionCertification/update`, data);
   if (res.data.code == 0) {
     return res.data.data;
   }
@@ -78,7 +80,7 @@ export async function contactQcPackUpdateAPI(data) {
  * 获取客户证书资质信息详情
  */
 export async function contactQcPackDetailAPI(id) {
-  const res = await request.get(`/eom/contactqcpack/getById/${id}`, {});
+  const res = await request.get(`/main/professionCertification/getById/${id}`, {});
   if (res.data.code == 0) {
     return res.data.data;
   }
@@ -88,7 +90,7 @@ export async function contactQcPackDetailAPI(id) {
  * 删除客户证书资质包
  */
 export async function contactQcPackDeleteAPI(data) {
-  const res = await request.delete(`/eom/contactqcpack/delete`, {data});
+  const res = await request.delete(`/main/professionCertification/delete`, {data});
   if (res.data.code == 0) {
     return res.data.data;
   }
@@ -99,7 +101,7 @@ export async function contactQcPackDeleteAPI(data) {
  * 提交客户证书资质信息  开启流程
  */
 export async function contactQcSubmit(data) {
-  const res = await request.post(`/bpm/contactQc/submit`, data);
+  const res = await request.post(`/bpm/ProfessionCertification/submit`, data);
   if (res.data.code == 0) {
     return res.data.data;
   }

+ 3 - 1
src/enum/dict.js

@@ -41,7 +41,9 @@ export default {
   计划紧急程度: 'logistic_urgency_level_type',
   计划工单费用类型: 'logistic_list_cost_type',
   驾照类型: 'driver_license_type',
-  单据类型: 'receipt_type'
+  单据类型: 'receipt_type',
+  工种类型: 'work_type',
+  供应商级别: 'contact_level'
 };
 
 export const numberList = [

+ 18 - 6
src/views/purchasingManage/inquiryManage/components/searchQuotation.vue

@@ -1,15 +1,16 @@
 <!-- 搜索表单 -->
 <template>
   <el-form
-    label-width="130px"
+    label-width="110px"
     class="ele-form-search"
     @keyup.enter.native="search"
     @submit.native.prevent
   >
     <el-row :gutter="15">
-      <el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">
+      <el-col v-bind="styleResponsive ? { lg: 8, md: 12 } : { span: 8 }">
         <el-form-item label="需求来源类型:" prop="sourceCode">
           <DictSelection
+            style="width: 100%"
             dictName="需求来源类型"
             clearable
             v-model="params.sourceId"
@@ -29,7 +30,7 @@
         </el-form-item>
       </el-col> -->
 
-      <el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">
+      <el-col v-bind="styleResponsive ? { lg: 8, md: 12 } : { span: 8 }">
         <el-form-item label="需求部门名称:" prop="requireDeptName">
           <el-input
             clearable
@@ -38,12 +39,13 @@
           ></el-input>
         </el-form-item>
       </el-col>
-      <el-col v-bind="styleResponsive ? { lg: 8, md: 12 } : { span: 6 }">
+      <el-col v-bind="styleResponsive ? { lg: 8, md: 12 } : { span: 8 }">
         <el-form-item label="完成日期:" prop="finishDateStart">
           <el-date-picker
             v-model="finishDate"
             @change="changeDate"
             type="daterange"
+            style="width: 100%"
             value-format="yyyy-MM-dd"
             start-placeholder="开始日期"
             end-placeholder="结束日期"
@@ -53,10 +55,10 @@
       </el-col>
     </el-row>
     <el-row :gutter="15">
-      <el-col v-bind="styleResponsive ? { lg: 10, md: 12 } : { span: 6 }">
+      <el-col v-bind="styleResponsive ? { lg: 8, md: 12 } : { span: 8 }">
         <el-form-item label="创建时间:" prop="createTimeStart">
           <el-date-picker
-            style="width: 360px"
+            style="width: 100%"
             v-model="createTime"
             @change="changeCreateTime"
             type="datetimerange"
@@ -68,6 +70,15 @@
           </el-date-picker>
         </el-form-item>
       </el-col>
+      <el-col v-bind="styleResponsive ? { lg: 8, md: 12 } : { span: 8 }">
+        <el-form-item label="采购需求编码:" prop="requirementCode">
+          <el-input
+            clearable
+            placeholder="请输入"
+            v-model.trim="params.requirementCode"
+          ></el-input>
+        </el-form-item>
+      </el-col>
       <el-col v-bind="styleResponsive ? { lg: 4, md: 12 } : { span: 4 }">
         <div class="ele-form-actions">
           <el-button
@@ -94,6 +105,7 @@
         createTimeStart: '',
         createTimeEnd: '',
         sourceType: '',
+        requirementCode: '',
         sourceId: ''
       };
       return {

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

@@ -66,13 +66,13 @@
           <el-form-item
             style="margin-bottom: 20px"
           >
-<!--  :prop="'datasource.' + scope.$index + '.totalCount'"
-            :rules="{
-              required: true,
-              pattern: numberReg,
-              message: '请输入数字',
-              trigger: 'blur'
-            }"           -->
+            <!--  :prop="'datasource.' + scope.$index + '.totalCount'"
+                        :rules="{
+                          required: true,
+                          pattern: numberReg,
+                          message: '请输入数字',
+                          trigger: 'blur'
+                        }"           -->
             <el-input
               :disabled="isContractId"
               v-model="scope.row.totalCount"
@@ -438,7 +438,8 @@ export default {
           label: '名称',
           slot: 'productName',
           headerSlot: 'headerProductName',
-          align: "center"
+          align: "center",
+          fixed: 'left'
         },
         {
           width: 120,
@@ -812,7 +813,7 @@ export default {
       this.$set(this.form.datasource[idx], 'specification', obj.specification);
       this.$set(this.form.datasource[idx], 'weightUnit', obj.weightUnit);
     },
-    remove(row,index) {
+    remove(row, index) {
       this.form.datasource.splice(index, 1);
       // let index = this.form.datasource.findIndex((n) => n.key == row.key);
       // if (index !== -1) {

+ 60 - 45
src/views/purchasingManage/supplierManage/components/addContactDialog.vue

@@ -10,7 +10,9 @@
           <el-row>
             <el-col :span="8">
               <el-form-item label="供应商分类" prop="categoryId">
-                <ele-tree-select :data="categoryTreeList" v-model="form.categoryId" valueKey="id" labelKey="name"
+                <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>
@@ -119,10 +121,13 @@
                           @click.native="handParent"></el-input>
               </el-form-item>
             </el-col>
+
             <el-col :span="8">
-              <el-form-item prop="businessLicenseFiles" label="营业执照附件">
-                <fileUpload v-model="form.businessLicenseFiles" module="main" :showLib="false" :limit="1"/>
+              <el-form-item label="级别" >
+                <DictSelection dictName="供应商级别" clearable v-model="form.level">
+                </DictSelection>
               </el-form-item>
+
             </el-col>
           </el-row>
           <el-row>
@@ -132,6 +137,11 @@
                           size="small"
                           maxlength="200"></el-input>
               </el-form-item>
+              <el-col :span="8">
+                <el-form-item prop="businessLicenseFiles" label="营业执照附件">
+                  <fileUpload v-model="form.businessLicenseFiles" module="main" :showLib="false" :limit="1"/>
+                </el-form-item>
+              </el-col>
             </el-col>
           </el-row>
         </el-form>
@@ -287,7 +297,7 @@
       </el-tab-pane>
       <el-tab-pane label="证书资质" name="certificate">
         <headerTitle title="证书资质" style="margin-top: 30px"></headerTitle>
-        <ele-pro-table ref="certificateTable" :columns="certificateColumns" :datasource="tableCertificateData"
+        <ele-pro-table ref="certificateTable" :columns="certificateColumns" :need-page="false" :datasource="tableCertificateData"
                        :toolkit="[]" height="350px">
           <!-- 表头工具栏 -->
           <template v-slot:toolbar>
@@ -296,7 +306,7 @@
           <!-- 操作栏 -->
           <template v-slot:action="scope">
             <el-link
-              v-if="[1,2].includes(scope.row.approvalStatus)"
+              v-if="[1,2].includes(scope.row.processStatus)"
               type="primary"
               :underline="false"
               icon="el-icon-edit"
@@ -304,7 +314,7 @@
               详情
             </el-link>
             <el-link
-              v-if="[0,3].includes(scope.row.approvalStatus)"
+              v-if="[0,3].includes(scope.row.processStatus)"
               type="primary"
               :underline="false"
               icon="el-icon-edit"
@@ -313,7 +323,7 @@
             </el-link>
 
             <el-link
-              v-if="[0,3].includes(scope.row.approvalStatus)"
+              v-if="[0,3].includes(scope.row.processStatus)"
               type="primary"
               :underline="false"
               icon="el-icon-plus"
@@ -328,7 +338,7 @@
             >
               <template v-slot:reference>
                 <el-link
-                  v-if="[0,3].includes(scope.row.approvalStatus)"
+                  v-if="[0,3].includes(scope.row.processStatus)"
                   type="danger"
                   :underline="false"
                   icon="el-icon-delete"
@@ -354,7 +364,7 @@
       v-if="certificateQualificationsDialogFlag"
       typeInfo="2"
       ref="certificateQualificationsDialogRef"
-      :contactId="form.id"
+      :contactInfo="form"
       @reload="reload">
 
     </certificate-qualifications-dialog>
@@ -385,7 +395,7 @@ import {reviewStatus} from "@/enum/dict";
 
 export default {
   props: {
-    categoryTreeList: Array
+    categoryTreeList: Array,
   },
   mixins: [dictMixins],
   components: {
@@ -405,6 +415,7 @@ export default {
       businessLicenseFile: {},
       businessScope: '',
       categoryId: '',
+      level: '',
       companyCategoryId: '',
       companyCategoryName: '',
       parentId: null,
@@ -452,6 +463,7 @@ export default {
       // removeLinkList: [],
       tableBankData: [],
       tableLinkData: [],
+      categoryIdList: [],
       ifChiefList: [
         {
           value: 0,
@@ -607,13 +619,13 @@ export default {
           align: "center",
           minWidth: 120
         },
-        {
-          label: '创建人',
-          prop: 'createUserName',
-          slot: 'createUserName',
-          align: "center",
-          width: 120
-        },
+        // {
+        //   label: '创建人',
+        //   prop: 'createUserName',
+        //   slot: 'createUserName',
+        //   align: "center",
+        //   width: 120
+        // },
         {
           label: '创建时间',
           prop: 'createTime',
@@ -621,16 +633,6 @@ export default {
           align: "center",
           minWidth: 120
         },
-        {
-          label: '状态',
-          prop: 'approvalStatus',
-          slot: 'approvalStatus',
-          align: "center",
-          width: 120,
-          formatter: (_row, _column, cellValue) => {
-            return reviewStatus[_row.approvalStatus];
-          }
-        },
         {
           label: '备注',
           prop: 'remark',
@@ -638,6 +640,16 @@ export default {
           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',
@@ -805,12 +817,18 @@ export default {
     tableCertificateData({page, limit, where}) {
       if (!this.form.id) return []
       return contactQcPackPageAPI({
-        pageNum: page,
-        size: limit,
-        ...where,
-        contactId: this.form.id
+        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) => {
@@ -818,14 +836,7 @@ export default {
         this.reload();
       });
     },
-    /* 刷新表格 */
-    reload(where) {
-      where = {
-        ...where,
-        contactId: this.form.id
-      }
-      this.$refs.certificateTable.reload({page: 1, where});
-    },
+
     getValidate() {
       return Promise.all([
         new Promise((resolve, reject) => {
@@ -861,7 +872,7 @@ export default {
     },
     //开启资质提交流程
     async submit(row) {
-      await contactQcSubmit({businessId: row.id,type:'2'})
+      await contactQcSubmit({businessId: row.id,certificationType:'2'})
       this.reload()
     },
     async save() {
@@ -880,6 +891,7 @@ export default {
             this.form.addressName = '';
           }
         }
+        this.form.categoryId = this.categoryIdList.join(',')
         if (this.$refs.industry.getCheckedNodes()) {
           let node = this.$refs.industry.getCheckedNodes()[0];
           if (node) {
@@ -978,20 +990,23 @@ export default {
     },
     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.form = data.base||{};
+      this.otherForm = data.other||{};
+      this.tableBankData = data.bankList||[];
+      this.tableLinkData = data.linkList||[];
       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(",");

+ 192 - 85
src/views/purchasingManage/supplierManage/components/certificateQualificationsDialog.vue

@@ -5,7 +5,7 @@
              :close-on-click-modal="false" width="70%" :before-close="cancel">
     <el-tabs v-model="activeName" type="card">
       <el-tab-pane label="证书资质" name="QC">
-        <el-form ref="form" :model="form">
+        <el-form ref="form" :model="form" class="el-form-box">
           <headerTitle title="基本信息"/>
           <el-row :gutter="20">
             <el-col :span="12">
@@ -14,27 +14,64 @@
                 <el-input v-model="form.name" :disabled="type=='view'" clearable></el-input>
               </el-form-item>
             </el-col>
+            <el-col :span="12">
+              <el-form-item label="有效时间:" prop="date" label-width="90px">
+                <el-date-picker
+                  :disabled="type=='view'"
+                  v-model="form.date"
+                  style="width: 100%;"
+                  type="daterange"
+                  value-format="yyyy-MM-dd"
+                  range-separator="至"
+                  start-placeholder="开始日期"
+                  end-placeholder="结束日期"
+                >
+                </el-date-picker>
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <el-row>
             <el-col :span="12">
               <el-form-item label-width="50px" label="备注">
                 <el-input type="textarea" v-model="form.remark" :disabled="type=='view'" clearable></el-input>
               </el-form-item>
             </el-col>
+            <el-col :span="12">
+              <el-form-item label="附件:" prop="accessory" label-width="90px">
+                <fileUpload
+                  v-if="type!=='view'"
+                  v-model="form.accessory"
+                  module="main"
+                  :showLib="false"
+                  :limit="10"/>
+                <div v-else>
+                  <el-link
+                    v-for="link in form.accessory"
+                    :key="link.id"
+                    type="primary"
+                    :underline="false"
+                    @click="downloadFile(link)">
+                    {{ link.name }}
+                  </el-link>
+                </div>
+              </el-form-item>
+            </el-col>
           </el-row>
           <headerTitle title="资质信息"/>
-          <ele-pro-table ref="linkTable" :columns="columns" :datasource="form.detailList" :toolkit="[]" height="350px"
+          <ele-pro-table ref="linkTable" :columns="columns" :datasource="form.detailsList" :toolkit="[]" height="350px"
                          :need-page="false">
             <!-- 表头工具栏 -->
             <template v-slot:toolbar>
 
               <el-button v-if="type!=='view'" type="primary" @click="handleAdd">添加</el-button>
             </template>
-            <template v-slot:type="scope">
-              <el-form-item :prop="'detailList.' + scope.$index + '.type'" :rules="{
+            <template v-slot:name="scope">
+              <el-form-item :prop="'detailsList.' + scope.$index + '.name'" :rules="{
             required: true,
             message: '',
             trigger: 'change'
           }">
-                <el-select v-if="type!=='view'" v-model="scope.row.type" clearable
+                <el-select v-if="type!=='view'" v-model="scope.row.name" clearable
                            @change="(val)=>handleChangeType(val,scope.row)">
                   <el-option :disabled="disabledToType(scope.row).includes(item.dictCode)"
                              v-for="item in dictList" :value="item.dictCode"
@@ -42,27 +79,27 @@
                 </el-select>
                 <!--                <DictSelection v-if="type!=='view'" clearable dictName="客户/供应商资质类型" v-model="scope.row.type"-->
                 <!--                               @itemChange="(val)=>handleChangeType(val,scope.row)"></DictSelection>-->
-                <span v-else>{{ scope.row.name }}</span>
+                <span v-else>{{ getLabelName(dictList,scope.row.name)  }}</span>
               </el-form-item>
 
             </template>
-            <template v-slot:num="scope">
-              <el-form-item :prop="'detailList.' + scope.$index + '.num'" :rules="{
+            <template v-slot:code="scope">
+              <el-form-item :prop="'detailsList.' + scope.$index + '.code'" :rules="{
             required: true,
             message: '',
             trigger: 'blur'
           }">
-                <el-input v-model="scope.row.num" :disabled="type=='view'" clearable></el-input>
+                <el-input v-model="scope.row.code" :disabled="type=='view'" clearable></el-input>
               </el-form-item>
 
             </template>
-            <template v-slot:scope="scope">
-              <el-form-item :prop="'detailList.' + scope.$index + '.scope'">
-                <el-input type="textarea" v-model="scope.row.scope" :disabled="type=='view'" clearable></el-input>
+            <template v-slot:businessRange="scope">
+              <el-form-item :prop="'detailsList.' + scope.$index + '.businessRange'">
+                <el-input type="textarea" v-model="scope.row.businessRange" :disabled="type=='view'" clearable></el-input>
               </el-form-item>
             </template>
-            <template v-slot:validityPeriodStart="scope">
-              <el-form-item inline-message :prop="'detailList.' + scope.$index + '.validityPeriodStart'" :rules="{
+            <template v-slot:startTime="scope">
+              <el-form-item inline-message :prop="'detailsList.' + scope.$index + '.startTime'" :rules="{
             required: true,
             message: '',
             trigger: 'change'
@@ -70,7 +107,7 @@
           }">
                 <el-date-picker
                   :disabled="type=='view'"
-                  v-model="scope.row.validityPeriodStart"
+                  v-model="scope.row.startTime"
                   type="date"
                   style="width: 100%"
                   value-format="yyyy-MM-dd"
@@ -79,8 +116,8 @@
               </el-form-item>
 
             </template>
-            <template v-slot:validityPeriodEnd="scope">
-              <el-form-item :prop="'detailList.' + scope.$index + '.validityPeriodEnd'"
+            <template v-slot:endTime="scope">
+              <el-form-item :prop="'detailsList.' + scope.$index + '.endTime'"
                             :rules="{
             required: true,
             validator: validateEndDate(scope.row,scope.$index),
@@ -88,7 +125,7 @@
           }">
                 <el-date-picker
                   :disabled="type=='view'"
-                  v-model="scope.row.validityPeriodEnd"
+                  v-model="scope.row.endTime"
                   type="date"
                   style="width: 100%"
                   value-format="yyyy-MM-dd"
@@ -97,8 +134,8 @@
               </el-form-item>
 
             </template>
-            <template v-slot:notifyUserName="scope">
-              <el-form-item :prop="'detailList.' + scope.$index + '.notifyUserName'" :rules="{
+            <template v-slot:noticePersonName="scope">
+              <el-form-item :prop="'detailsList.' + scope.$index + '.noticePersonName'" :rules="{
             required: true,
             message: '',
             trigger: ['blur','change']
@@ -107,27 +144,27 @@
                 <el-input
                   :disabled="type=='view'"
                   @click.native="openStaffSelection(scope.$index)"
-                  v-model="scope.row.notifyUserName"
+                  v-model="scope.row.noticePersonName"
                   placeholder="请选择"
                 ></el-input>
               </el-form-item>
 
             </template>
-            <template v-slot:files="scope">
-              <el-form-item :prop="'detailList.' + scope.$index + '.files'" :rules="{
+            <template v-slot:accessory="scope">
+              <el-form-item :prop="'detailsList.' + scope.$index + '.accessory'" :rules="{
             required: true,
             message: '',
             trigger: ['change','blur']
           }">
                 <fileUpload
                   v-if="type!=='view'"
-                  v-model="scope.row.files"
+                  v-model="scope.row.accessory"
                   module="main"
                   :showLib="false"
                   :limit="10"/>
                 <div v-else>
                   <el-link
-                    v-for="link in scope.row.files"
+                    v-for="link in scope.row.accessory"
                     :key="link.id"
                     type="primary"
                     :underline="false"
@@ -138,13 +175,36 @@
               </el-form-item>
 
             </template>
+            <template v-slot:type="scope">
+              <el-form-item :prop="'detailsList.' + scope.$index + '.type'">
+                <el-select v-if="type!=='view'" v-model="scope.row.type" clearable>
+                  <el-option v-for="item in typeList" :value="item.dictCode"
+                             :label="item.dictValue"></el-option>
+                </el-select>
+                <!--                <DictSelection v-if="type!=='view'" clearable dictName="客户/供应商资质类型" v-model="scope.row.type"-->
+                <!--                               @itemChange="(val)=>handleChangeType(val,scope.row)"></DictSelection>-->
+                <span v-else>{{ getLabelName(typeList,scope.row.type)  }}</span>
+              </el-form-item>
+
+            </template>
+            <template v-slot:level="scope">
+              <el-form-item :prop="'detailsList.' + scope.$index + '.level'">
+                <el-select v-if="type!=='view'" v-model="scope.row.level" clearable>
+                  <el-option v-for="item in levelOptions" :value="item.dictCode"
+                             :label="item.dictValue"></el-option>
+                </el-select>
+                <!--                <DictSelection v-if="type!=='view'" clearable dictName="客户/供应商资质类型" v-model="scope.row.type"-->
+                <!--                               @itemChange="(val)=>handleChangeType(val,scope.row)"></DictSelection>-->
+                <span v-else>{{ getLabelName(levelOptions,scope.row.type)  }}</span>
+              </el-form-item>
+            </template>
             <template v-slot:remark="scope">
-              <el-form-item :prop="'detailList.' + scope.$index + '.remark'">
+              <el-form-item :prop="'detailsList.' + scope.$index + '.remark'">
                 <el-input type="textarea" :disabled="type=='view'" v-model="scope.row.remark"></el-input>
               </el-form-item>
             </template>
             <template v-slot:status="scope">
-              <el-form-item :prop="'detailList.' + scope.$index + '.status'">
+              <el-form-item :prop="'detailsList.' + scope.$index + '.status'">
                 <el-tag v-if="scope.row.status" :type="statusTagTypeList[scope.row.status]">
                   {{ statusList[scope.row.status] }}
                 </el-tag>
@@ -212,7 +272,7 @@ export default {
   components: {bpmDetail, FileUpload, staffSelection},
   props: {
     certificateQualificationsDialogFlag: Boolean,
-    contactId: String,
+    contactInfo: Object,
     typeInfo: String
   },
   data() {
@@ -221,26 +281,63 @@ export default {
       type: '',
       activeName: 'QC',
       defaultData: {
-        files: [],
+        accessory: [],
         name: "",
-        notifyUserId: "",
-        notifyUserName: "",
+        noticePersonId: "",
+        noticePersonName: "",
         num: "",
         remark: "",
-        scope: "",
+        businessRange: "",
         type: "",
-        validityPeriodEnd: "",
-        validityPeriodStart: ""
+        endTime: "",
+        startTime: ""
       },
       form: {
-        detailList: [],
-        contactId: '',
+        accessory:[],
+        detailsList: [],
+        relationName: '',
         name: '',
+        date: [],
         remark: '',
 
       },
       curIndex: null,
-      columns: [
+      levelOptions: [
+        {
+          dictValue: '初级',
+          dictCode: '1'
+        },
+        {
+          dictValue: '中级',
+          dictCode: '2'
+        },
+        {
+          dictValue: '高级',
+          dictCode: '3'
+        }
+      ],
+      statusList: {
+        10: '有效',
+        20: '无效',
+        30: '已过期',
+      },
+      statusTagTypeList: {
+        10: 'success',
+        20: 'info',
+        30: 'danger',
+      },
+    }
+  },
+  computed: {
+    ...mapGetters(['dict']),
+    dictList() {
+      return this.dict[dictEnum['客户/供应商资质类型']] || [];
+    },
+    typeList() {
+      return this.dict[dictEnum['工种类型']] || [];
+    },
+    columns() {
+      return [
         {
           type: 'index',
           width: 55,
@@ -248,63 +345,77 @@ export default {
         },
         {
           label: '名称',
-          prop: 'type',
-          slot: 'type',
+          prop: 'name',
+          slot: 'name',
           headerSlot: 'isRequired',
-          minWidth: 120,
+          minWidth: 180,
           align: 'center'
         },
         {
           label: '编号',
-          prop: 'num',
-          slot: 'num',
+          prop: 'code',
+          slot: 'code',
           headerSlot: 'isRequired',
           minWidth: 120,
           align: 'center'
         },
         {
           label: '许可/经营范围',
-          prop: 'scope',
-          slot: 'scope',
+          prop: 'businessRange',
+          slot: 'businessRange',
           minWidth: 140,
           align: 'center'
         },
         {
           label: '有效期起始日期',
-          prop: 'validityPeriodStart',
-          slot: 'validityPeriodStart',
+          prop: 'startTime',
+          slot: 'startTime',
           headerSlot: 'isRequired',
-          minWidth: 140,
+          minWidth: 160,
           align: 'center'
         },
         {
           label: '有效期截止日期',
-          prop: 'validityPeriodEnd',
-          slot: 'validityPeriodEnd',
+          prop: 'endTime',
+          slot: 'endTime',
           headerSlot: 'isRequired',
-          minWidth: 140,
+          minWidth: 160,
           align: 'center'
         },
         {
           label: '通知人',
-          prop: 'notifyUserName',
-          slot: 'notifyUserName',
+          prop: 'noticePersonName',
+          slot: 'noticePersonName',
           headerSlot: 'isRequired',
           minWidth: 140,
           align: 'center'
         },
         {
           label: '附件',
-          prop: 'files',
-          slot: 'files',
+          prop: 'accessory',
+          slot: 'accessory',
           headerSlot: 'isRequired',
           minWidth: 140,
         },
+        {
+          label: '等级',
+          prop: 'level',
+          slot: 'level',
+          minWidth: 140,
+          align: 'center'
+        },
+        {
+          label: '分类',
+          prop: 'type',
+          slot: 'type',
+          minWidth: 140,
+          align: 'center'
+        },
         {
           label: '备注',
           prop: 'remark',
           slot: 'remark',
-          action: 'remark',
+          minWidth: 140,
           align: 'center'
         },
         {
@@ -317,53 +428,43 @@ export default {
           action: 'action',
           slot: 'action',
           label: '操作',
-          align: 'center'
+          align: 'center',
+          fixed:'right'
         }
-      ],
-      statusList: {
-        10: '有效',
-        20: '无效',
-        30: '已过期',
-      },
-      statusTagTypeList: {
-        10: 'success',
-        20: 'info',
-        30: 'danger',
-      },
-    }
-  },
-  computed: {
-    ...mapGetters(['dict']),
-    dictList() {
-      return this.dict[dictEnum['客户/供应商资质类型']] || [];
+      ]
     },
     disabledToType() {
       return (row) => {
-        let list = this.form.detailList.map(item => item.type)
+        let list = this.form.detailsList.map(item => item.name)
         let dictCodeList = this.dictList.map(item => item.dictCode)
         let intersectionList = list.filter((v) => dictCodeList.indexOf(v) > -1)
-        intersectionList = intersectionList.filter(v => row.type !== v)
+        intersectionList = intersectionList.filter(v => row.name !== v)
         return intersectionList
       }
     },
   },
   created() {
     this.requestDict('客户/供应商资质类型');
+    this.requestDict('工种类型');
   },
   methods: {
     ...mapActions('dict', ['requestDict']),
+    getLabelName(arr,id){
+      if(!id) return ''
+      return arr.find(item=>item.dictCode == id)?.dictValue
+    },
     //删除资质
     handleRemove(index) {
-      this.form.detailList.splice(index, 1)
+      this.form.detailsList.splice(index, 1)
     },
     //结束日期验证
     validateEndDate(row, index) {
       return (rule, value, callback) => {
         if (!value) return callback(new Error(''))
         if (
-          row.validityPeriodEnd &&
-          row.validityPeriodStart &&
-          value < row.validityPeriodStart
+          row.endTime &&
+          row.startTime &&
+          value < row.startTime
         ) {
           callback(new Error('截止日期不能小于起始日期'))
         } else {
@@ -381,6 +482,7 @@ export default {
     },
     async getCertificateInfo(row) {
       this.form = await contactQcPackDetailAPI(row.id)
+      this.form.date = [this.form.startTime, this.form.endTime]
     },
     //打开选择负责人弹窗
     openStaffSelection(index) {
@@ -389,12 +491,12 @@ export default {
     },
     //选择负责人回调
     confirmStaffSelection(data) {
-      this.form.detailList[this.curIndex].notifyUserName = data.map((item) => item.name).toString();
-      this.form.detailList[this.curIndex].notifyUserId = data.map((item) => item.id).toString();
+      this.form.detailsList[this.curIndex].noticePersonName = data.map((item) => item.name).toString();
+      this.form.detailsList[this.curIndex].noticePersonId = data.map((item) => item.id).toString();
     },
     //新增
     handleAdd() {
-      this.form.detailList.push({...this.defaultData})
+      this.form.detailsList.push({...this.defaultData})
     },
     //修改资质证书
     handleChangeType(val, row) {
@@ -407,11 +509,16 @@ export default {
     },
     //保存/提交
     handleSave(isSub) {
-      if (!this.contactId) return this.$message.success('请保存合同信息后新增资质')
+      let msg = this.typeInfo == '1' ? '请保存客户信息后新增资质':'请保存供应商信息后新增资质'
+      if (!this.contactInfo.id) return this.$message.success(msg)
       this.$refs.form.validate(async (valid) => {
         if (!valid) return this.$message.warning('有必填项未填写,请检查')
-        if (!this.form.detailList.length) return this.$message.warning('至少保存一条资质信息')
-        this.form.contactId = this.contactId
+        if (!this.form.detailsList.length) return this.$message.warning('至少保存一条资质信息')
+        this.form.certificationType = this.typeInfo
+        this.form.relationId = this.contactInfo.id
+        this.form.relationName = this.contactInfo.name
+        this.form.startTime = this.form.date[0]
+        this.form.endTime = this.form.date[1]
         let api = this.type == 'add' ? contactQcPackSaveAPI : contactQcPackUpdateAPI
         let id = await api(this.form)
         if (isSub) {

+ 20 - 10
src/views/purchasingManage/supplierManage/components/contactDetailDialog.vue

@@ -124,13 +124,13 @@
               </el-form-item>
             </el-col>
             <el-col :span="8">
-              <el-form-item prop="businessLicenseFile" label="营业执照附件:">
-                <el-link v-if="form.businessLicenseFile && form.businessLicenseFile !== ''"
-                         type="primary" :underline="false"
-                         @click="downloadFile(form.businessLicenseFile)"> {{ form.businessLicenseFile.name }}
-                </el-link>
+              <el-form-item label="级别:" >
+                <DictSelection dictName="供应商级别" disabled clearable v-model="form.level">
+                </DictSelection>
               </el-form-item>
+
             </el-col>
+
           </el-row>
           <el-row>
             <el-col :span="16">
@@ -138,6 +138,14 @@
                 <el-input v-model="form.remark" disabled type="textarea"></el-input>
               </el-form-item>
             </el-col>
+            <el-col :span="8">
+              <el-form-item prop="businessLicenseFile" label="营业执照附件:">
+                <el-link v-if="form.businessLicenseFile && form.businessLicenseFile !== ''"
+                         type="primary" :underline="false"
+                         @click="downloadFile(form.businessLicenseFile)"> {{ form.businessLicenseFile.name }}
+                </el-link>
+              </el-form-item>
+            </el-col>
           </el-row>
         </el-form>
       </el-tab-pane>
@@ -637,15 +645,17 @@ export default {
     },
     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.form = data.base||{};
+      this.otherForm = data.other||{};
+      this.tableBankData = data.bankList||[];
+      this.tableLinkData = data.linkList||[];
 
       if (this.tableLinkData && this.tableLinkData.length > 0) {
         this.tableLinkData.forEach(e => e.status = e.status + "");
       }
-
+      if (this.form.level) {
+        this.form.level = this.form.level + "";
+      }
       await getCategoryInfo(this.form.categoryId).then((res) => {
         this.$set(this.form, 'categoryName', res.data.name)
       });

+ 31 - 35
src/views/saleManage/contact/components/addContactDialog.vue

@@ -25,11 +25,14 @@
             <el-col :span="8">
               <el-form-item
                 label="客户分类"
-                prop="categoryId"
+                prop="categoryIdList"
               >
                 <ele-tree-select
                   :data="categoryTreeList"
-                  v-model="form.categoryId"
+                  v-model="form.categoryIdList"
+                  multiple
+                  filterable
+                  :checkStrictly="true"
                   valueKey="id"
                   labelKey="name"
                   placeholder="请选择"
@@ -253,9 +256,9 @@
             <el-button type="primary" @click="addBank">添加</el-button>
           </template>
           <template v-slot:action="{ row, $index }">
-            <el-link  type="danger"
-                      :underline="false"
-                      icon="el-icon-delete" @click="handleBankDel(row, $index)">删除
+            <el-link type="danger"
+                     :underline="false"
+                     icon="el-icon-delete" @click="handleBankDel(row, $index)">删除
             </el-link>
           </template>
           <template v-slot:accountNameHeader="{ column }">
@@ -291,9 +294,9 @@
             <el-button type="primary" @click="addLink">添加</el-button>
           </template>
           <template v-slot:action="{ row, $index }">
-            <el-link  type="danger"
-                      :underline="false"
-                      icon="el-icon-delete" @click="handleLinkDel(row, $index)"
+            <el-link type="danger"
+                     :underline="false"
+                     icon="el-icon-delete" @click="handleLinkDel(row, $index)"
             >删除
             </el-link
             >
@@ -456,7 +459,7 @@
       </el-tab-pane>
       <el-tab-pane label="证书资质" name="certificate">
         <headerTitle title="证书资质" style="margin-top: 30px"></headerTitle>
-        <ele-pro-table ref="certificateTable" :columns="certificateColumns" :datasource="tableCertificateData"
+        <ele-pro-table ref="certificateTable" :columns="certificateColumns" :need-page="false" :datasource="tableCertificateData"
                        :toolkit="[]" height="350px">
           <!-- 表头工具栏 -->
           <template v-slot:toolbar>
@@ -465,7 +468,7 @@
           <!-- 操作栏 -->
           <template v-slot:action="scope">
             <el-link
-              v-if="[1,2].includes(scope.row.approvalStatus)"
+              v-if="[1,2].includes(scope.row.processStatus)"
               type="primary"
               :underline="false"
               icon="el-icon-edit"
@@ -473,7 +476,7 @@
               详情
             </el-link>
             <el-link
-              v-if="[0,3].includes(scope.row.approvalStatus)"
+              v-if="[0,3].includes(scope.row.processStatus)"
               type="primary"
               :underline="false"
               icon="el-icon-edit"
@@ -482,7 +485,7 @@
             </el-link>
 
             <el-link
-              v-if="[0,3].includes(scope.row.approvalStatus)"
+              v-if="[0,3].includes(scope.row.processStatus)"
               type="primary"
               :underline="false"
               icon="el-icon-plus"
@@ -497,7 +500,7 @@
             >
               <template v-slot:reference>
                 <el-link
-                  v-if="[0,3].includes(scope.row.approvalStatus)"
+                  v-if="[0,3].includes(scope.row.processStatus)"
                   type="danger"
                   :underline="false"
                   icon="el-icon-delete"
@@ -523,7 +526,7 @@
       v-if="certificateQualificationsDialogFlag"
       ref="certificateQualificationsDialogRef"
       typeInfo="1"
-      :contactId="form.id"
+      :contactInfo="form"
       @reload="reload">
 
     </certificate-qualifications-dialog>
@@ -553,6 +556,7 @@ import parentList from './parentList.vue'
 import certificateQualificationsDialog
   from "@/views/purchasingManage/supplierManage/components/certificateQualificationsDialog.vue";
 import {reviewStatus} from "@/enum/dict";
+import {deepClone} from "@/utils";
 
 export default {
   props: {
@@ -576,6 +580,7 @@ export default {
       businessLicenseFile: {},
       businessScope: '',
       categoryId: '',
+      categoryIdList: [],
       companyCategoryId: '',
       companyCategoryName: '',
       enterpriseTypeId: '',
@@ -785,14 +790,6 @@ export default {
           minWidth: 120
         },
 
-
-        {
-          label: '创建人',
-          prop: 'createUserName',
-          slot: 'createUserName',
-          align: "center",
-          width: 120
-        },
         {
           label: '创建时间',
           prop: 'createTime',
@@ -802,12 +799,12 @@ export default {
         },
         {
           label: '状态',
-          prop: 'approvalStatus',
-          slot: 'approvalStatus',
+          prop: 'processStatus',
+          slot: 'processStatus',
           align: "center",
           width: 120,
           formatter: (_row, _column, cellValue) => {
-            return reviewStatus[_row.approvalStatus];
+            return reviewStatus[_row.processStatus];
           }
         },
         {
@@ -827,7 +824,7 @@ export default {
       ],
       rules: {
 
-        categoryId: [
+        categoryIdList: [
           {required: true, message: '请选择客户分类', trigger: 'change'}
         ],
         simpleName: [
@@ -916,10 +913,8 @@ export default {
     tableCertificateData({page, limit, where}) {
       if (!this.form.id) return []
       return contactQcPackPageAPI({
-        pageNum: page,
-        size: limit,
-        ...where,
-        contactId: this.form.id
+        certificationType:'1',
+        relationId: this.form.id
       });
     },
     //删除资质包
@@ -932,14 +927,14 @@ export default {
     /* 刷新表格 */
     reload(where) {
       where = {
-        ...where,
-        contactId: this.form.id
+        certificationType:'1',
+        relationId: this.form.id
       }
-      this.$refs.certificateTable.reload({page: 1, where});
+      this.$refs.certificateTable.reload({...where});
     },
     //开启资质提交流程
     async submit(row) {
-      await contactQcSubmit({businessId: row.id,type:1})
+      await contactQcSubmit({businessId: row.id, certificationType: 1})
       this.reload()
     },
     // 选择负责人部门
@@ -1047,6 +1042,7 @@ export default {
             this.form.addressName = '';
           }
         }
+        this.form.categoryId = this.form.categoryIdList.join(',')
         if (this.$refs.industry.getCheckedNodes()) {
           let node = this.$refs.industry.getCheckedNodes()[0];
           if (node) {
@@ -1158,7 +1154,7 @@ export default {
       if (data.base.businessLicenseFile && data.base.businessLicenseFile.uid) {
         this.$set(this.form, 'businessLicenseFiles', [data.base.businessLicenseFile])
       }
-
+      this.form.categoryIdList = this.form.categoryId ? deepClone(this.form.categoryId.split(',')) : []
       if (this.tableLinkData && this.tableLinkData.length > 0) {
         this.tableLinkData.forEach(e => e.status = e.status + "");
       }

+ 6 - 8
src/views/saleManage/contact/index.vue

@@ -141,15 +141,13 @@
           </div>
         </template>
       </ele-split-layout>
-      <contactList
-        v-if="
-          activeComp == 'contactList' && $hasPermission('eom:contact:staff')
-        "
-      ></contactList>
+<!--      <contactList-->
+<!--        v-if="-->
+<!--          activeComp == 'contactList' && $hasPermission('eom:contact:staff')-->
+<!--        "-->
+<!--      ></contactList>-->
       <contactListAdmin
-        v-else-if="
-          activeComp == 'contactList' && $hasPermission('eom:contact:admin')
-        "
+
       ></contactListAdmin>
     </el-card>