yusheng 11 ヶ月 前
コミット
0daa8b697b

+ 10 - 0
src/api/bpm/components/documentManagement/index.js

@@ -37,4 +37,14 @@ export async function deleteIdentityphoto(data) {
     return res.data.data;
   }
   return Promise.reject(new Error(res.data.message));
+}
+/**
+ * 客户资质证照
+ */
+export async function identityphotoList(data) {
+  const res = await request.post(`/main/identityphoto/list`, data);
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
 }

+ 5 - 4
src/views/bpm/carbonCopy/index.vue

@@ -142,7 +142,7 @@
             fixed: 'left'
           },
           {
-            prop: 'processInstance.processTypeName',
+            prop: 'processTypeName',
             label: '流程分类',
             align: 'center',
             showOverflowTooltip: true,
@@ -270,9 +270,10 @@
       handleAudit(row) {
         this.$refs.detailRef.open({
           processInstance: {
-            id: row.processInstanceId,
-            pcView: row.vals?.processInstanceId
-          }
+            id: row.processInstanceId
+          },
+          businessId:row.vals.businessId,
+          pcViewRouter: row.pcViewRouter
         });
       },
       getTimelineItemType(result) {

+ 164 - 0
src/views/bpm/handleTask/components/certificateQualifications/index.vue

@@ -0,0 +1,164 @@
+<template>
+  <ele-pro-table
+    ref="table"
+    :columns="columns"
+    :datasource="tableList"
+    class="dict-table"
+    tool-class="ele-toolbar-form"
+    :need-page="false"
+  >
+    <template v-slot:code="{ row }">
+      <el-link type="primary" :underline="false" @click="openDetail(row)">{{
+        row.code
+      }}</el-link>
+
+      <p class="ele-text-info">
+        {{ getDictValue('客户/供应商资质类型', row.type) }}
+      </p>
+    </template>
+    <template v-slot:time="{ row }">
+      <p>起:{{ row.validityStartTime }}</p>
+      <p class="ele-text-info">止:{{ row.validityEndTime }}</p>
+    </template>
+    <template v-slot:createUser="{ row }">
+      <p>{{ row.createUserName }}</p>
+      <p>{{ row.createUserDeptName }}</p>
+      <p class="ele-text-info">{{ row.createTime }}</p>
+    </template>
+    <template v-slot:picture="{ row }">
+      <fileMain v-model="row.fileObj" type="view"></fileMain>
+    </template>
+    <ele-modal
+      :visible.sync="visible"
+      :close-on-click-modal="false"
+      width="60%"
+      :maxable="true"
+      append-to-body
+
+    >
+      <certificateQualificationsDialog
+        v-if="visible"
+        :businessId="businessId"
+      ></certificateQualificationsDialog>
+    </ele-modal>
+  </ele-pro-table>
+</template>
+
+<script>
+  import certificateQualificationsDialog from './certificateQualificationsDialog.vue';
+
+  import dictMixins from '@/mixins/dictMixins';
+  import { holderTypeOptions, reviewStatus } from '@/enum/dict.js';
+  import fileMain from '@/components/addDoc/index.vue';
+
+  import { identityphotoList } from '@/api/bpm/components/documentManagement';
+  export default {
+    mixins: [dictMixins],
+    components: { certificateQualificationsDialog, fileMain },
+    data() {
+      return {
+        visible: false,
+        tableList: [],
+        businessId: '',
+        columns: [
+          {
+            label: '序号',
+            type: 'index',
+            width: 55,
+            align: 'center'
+          },
+          // {
+          //   label: '持证类型',
+          //   align: 'center',
+          //   prop: 'holderType',
+          //   formatter: (row) => {
+          //     return holderTypeOptions.find(
+          //       (item) => item.value == row.holderType
+          //     )?.label;
+          //   },
+          //   width: 150
+          // },
+          {
+            align: 'center',
+            label: '证照编号',
+            prop: 'code',
+            slot: 'code',
+            width: 180
+          },
+          {
+            label: '状态',
+            align: 'center',
+            prop: 'status',
+            formatter: (row) => {
+              return this.getDictValue('规则状态', row.status);
+            }
+          },
+          {
+            label: '执证对象',
+            align: 'center',
+            prop: 'holder'
+          },
+          {
+            align: 'center',
+            label: '有效期限',
+            prop: 'time',
+            slot: 'time',
+            minWidth: '180',
+            showOverflowTooltip: true
+          },
+          {
+            label: '创建人信息',
+            align: 'center',
+            prop: 'createUser',
+            slot: 'createUser',
+            minWidth: '200',
+            showOverflowTooltip: true
+          },
+          {
+            label: '证照',
+            align: 'center',
+            prop: 'picture',
+            slot: 'picture'
+          },
+          {
+            label: '备注',
+            align: 'center',
+            prop: 'remark',
+            minWidth: '100',
+            showOverflowTooltip: true
+          },
+          {
+            label: '审核状态',
+            prop: 'approvalStatus',
+            align: 'center',
+            width: 120,
+            formatter: (_row, _column, cellValue) => {
+              return reviewStatus[_row.approvalStatus];
+            }
+          }
+        ]
+      };
+    },
+    created() {
+      this.requestDict('客户/供应商资质类型');
+      this.requestDict('规则状态');
+    },
+    methods: {
+      getTable(holderId, holderType) {
+        identityphotoList({
+          holderType,
+          holderId
+        }).then((res) => {
+          this.tableList = res;
+        });
+      },
+
+      openDetail(row) {
+        this.visible=true
+        this.businessId = row.id;
+      }
+    }
+  };
+</script>
+
+<style class=""></style>

+ 295 - 442
src/views/bpm/handleTask/components/contact/contactDetailDialog.vue

@@ -1,26 +1,21 @@
 <template>
   <div>
-    <el-tabs v-model="activeName" @tab-click="handleActive" type="card">
+    <el-tabs v-model="activeName" type="card">
       <el-tab-pane label="基本信息" name="base">
         <el-form
           label-width="140px"
           class="el-form-box"
           ref="formRef"
-          :model="form">
+          :model="form"
+        >
           <el-row>
             <el-col :span="8">
-              <el-form-item
-                label="客户分类:"
-                prop="categoryId">
+              <el-form-item label="客户分类:" prop="categoryId">
                 <el-input v-model="form.categoryName" disabled></el-input>
               </el-form-item>
             </el-col>
             <el-col :span="8">
-              <el-form-item
-                label="分管部门:"
-                prop="fgDeptId"
-
-              >
+              <el-form-item label="分管部门:" prop="fgDeptId">
                 <el-input v-model="form.fgDeptName" disabled></el-input>
               </el-form-item>
             </el-col>
@@ -29,7 +24,7 @@
                 <el-input v-model="form.salesmanName" disabled></el-input>
               </el-form-item>
             </el-col>
-     
+
             <el-col :span="8">
               <el-form-item label="客户名称:" prop="name">
                 <el-input v-model="form.name" disabled></el-input>
@@ -61,21 +56,23 @@
                 <el-input v-model="form.authorizationLimit" disabled></el-input>
               </el-form-item>
             </el-col>
-    
+
             <el-col :span="8">
               <el-form-item label="单位电话:" prop="phone">
                 <el-input v-model="form.phone" disabled></el-input>
               </el-form-item>
             </el-col>
-      
-     
+
             <el-col :span="8">
               <el-form-item
                 class="form_item_label"
                 label="统一社会信用代码:"
                 prop="unifiedSocialCreditCode"
               >
-                <el-input v-model="form.unifiedSocialCreditCode" disabled></el-input>
+                <el-input
+                  v-model="form.unifiedSocialCreditCode"
+                  disabled
+                ></el-input>
               </el-form-item>
             </el-col>
             <el-col :span="8">
@@ -86,23 +83,39 @@
 
             <el-col :span="24">
               <el-form-item label="注册地址:" prop="addressId">
-                <el-input v-model="form.addressName" disabled style="width: 35%;"></el-input>
-                <el-input v-model="form.address" disabled style="width: 65%;"></el-input>
+                <el-input
+                  v-model="form.addressName"
+                  disabled
+                  style="width: 35%"
+                ></el-input>
+                <el-input
+                  v-model="form.address"
+                  disabled
+                  style="width: 65%"
+                ></el-input>
               </el-form-item>
             </el-col>
-   
-          
-    
-       
-          <el-col :span="24">
+
+            <el-col :span="24">
               <el-form-item label="联系地址:" prop="addressId">
-                <el-input v-model="otherForm.addressName" disabled style="width: 35%;"></el-input>
-                <el-input v-model="otherForm.address" disabled style="width: 65%;"></el-input>
+                <el-input
+                  v-model="otherForm.addressName"
+                  disabled
+                  style="width: 35%"
+                ></el-input>
+                <el-input
+                  v-model="otherForm.address"
+                  disabled
+                  style="width: 65%"
+                ></el-input>
               </el-form-item>
             </el-col>
             <el-col :span="8">
               <el-form-item label="营业类型:" prop="companyCategoryId">
-                <el-input v-model="form.companyCategoryName" disabled></el-input>
+                <el-input
+                  v-model="form.companyCategoryName"
+                  disabled
+                ></el-input>
               </el-form-item>
             </el-col>
             <el-col :span="8">
@@ -127,21 +140,22 @@
               </el-form-item>
             </el-col>
             <el-col :span="8">
-              <el-form-item
-                label="上级单位:"
-                prop="hasParentGroup"
-              >
+              <el-form-item label="上级单位:" prop="hasParentGroup">
                 <el-input v-model="form.parentName" disabled></el-input>
               </el-form-item>
             </el-col>
             <el-col :span="8">
-              <el-form-item label="级别:" >
-                <DictSelection dictName="供应商级别" disabled clearable v-model="form.level">
+              <el-form-item label="级别:">
+                <DictSelection
+                  dictName="供应商级别"
+                  disabled
+                  clearable
+                  v-model="form.level"
+                >
                 </DictSelection>
               </el-form-item>
-
             </el-col>
-      
+
             <el-col :span="16">
               <el-form-item label="经营范围" prop="businessScope">
                 <el-input
@@ -156,10 +170,13 @@
 
             <el-col :span="16">
               <el-form-item label="备注:" prop="remark">
-                <el-input type="textarea" v-model="form.remark" disabled></el-input>
+                <el-input
+                  type="textarea"
+                  v-model="form.remark"
+                  disabled
+                ></el-input>
               </el-form-item>
             </el-col>
-
           </el-row>
         </el-form>
       </el-tab-pane>
@@ -173,7 +190,8 @@
           :need-page="false"
         >
           <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 }">
@@ -200,13 +218,16 @@
           :need-page="false"
         >
           <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 }">
@@ -249,425 +270,257 @@
           </template>
         </ele-pro-table>
       </el-tab-pane>
-      <!-- <el-tab-pane label="其他信息" name="other">
-        <el-form
-          label-width="160px"
-          ref="otherFormRef"
-          :model="otherForm"
-          style="margin-top: 30px"
-        >
-          <el-row>
-            <el-col :span="8">
-              <el-form-item label="结算方式:" prop="settlementMode">
-                {{ otherForm.settlementModeName }}
-              </el-form-item>
-            </el-col>
-            <el-col :span="8">
-              <el-form-item label="税率:" prop="taxRate">
-                {{ otherForm.taxRate }} %
-              </el-form-item>
-            </el-col>
-            <el-col :span="8">
-              <el-form-item label="折扣率:" prop="discount">
-                {{ otherForm.discount }} %
-              </el-form-item>
-            </el-col>
+
+      <el-tab-pane label="证书资质" name="certificate"> 
+        <certificateManagement
+          ref="certificateManagementRef"
+        ></certificateManagement>
 
 
-            <el-col :span="8">
-              <el-form-item label="收件人:" prop="sender">
-                {{ otherForm.sender }}
-              </el-form-item>
-            </el-col>
-            <el-col :span="8">
-              <el-form-item label="收件人电话:" prop="senderPhone">
-                {{ otherForm.senderPhone }}
-              </el-form-item>
-            </el-col>
-            <el-col :span="8">
-              <el-form-item label="收件人地址:" prop="addressId">
-                {{ otherForm.addressName }}
-              </el-form-item>
-            </el-col>
-            <el-col :span="8">
-              <el-form-item label="收件人详细地址:" prop="address">
-                {{ otherForm.address }}
-              </el-form-item>
-            </el-col>
-          </el-row>
-        </el-form>
-      </el-tab-pane> -->
-      <el-tab-pane label="证书资质" name="certificate">
-        <ele-pro-table ref="certificateTable"
-                       :row-class-name="({row})=>row.id==this.businessId?'isGreen':''"
-                       :columns="certificateColumns" :datasource="tableCertificateData"
-                       :toolkit="[]" height="350px">
-          <!-- 操作栏 -->
-          <template v-slot:action="scope">
-            <el-link
-              type="primary"
-              :underline="false"
-              icon="el-icon-view"
-              @click="addCertificate('view',scope.row)">
-              详情
-            </el-link>
-            <el-popconfirm
-              class="ele-action"
-              title="确定要删除此资质包吗?"
-              @confirm="handleRemove(scope.row)"
-            >
-              <template v-slot:reference>
-                <el-link
-                  v-if="[0,3].includes(scope.row.approvalStatus)"
-                  type="danger"
-                  :underline="false"
-                  icon="el-icon-delete"
-                >
-                  删除
-                </el-link>
-              </template>
-            </el-popconfirm>
-          </template>
-        </ele-pro-table>
       </el-tab-pane>
     </el-tabs>
-    <!-- 资质证书弹窗   -->
-    <certificate-qualifications-dialog
-      :certificate-qualifications-dialog-flag.sync="certificateQualificationsDialogFlag"
-      v-if="certificateQualificationsDialogFlag"
-      typeInfo="1"
-      ref="certificateQualificationsDialogRef"
-      :contactId="form.id"
-      @reload="reload">
 
-    </certificate-qualifications-dialog>
   </div>
 </template>
 
 <script>
-import {contactDetail, getInfoByIds} from '@/api/bpm/components/saleManage/contact';
-import {getFile} from '@/api/system/file';
-import dictMixins from '@/mixins/dictMixins';
-import {copyObj} from '@/utils/util';
-import certificateQualificationsDialog
-  from "@/views/bpm/handleTask/components/supplierManage/certificateQualificationsDialog.vue";
-import {contactQcPackDetailAPI, contactQcPackPageAPI} from "@/api/bpm/components/supplierManage/contact";
-import {reviewStatus} from "@/enum/dict";
-import fileMain from "@/components/addDoc/index.vue";
-
-
-export default {
-  props:{
-      businessId:{
-        default:""
+  import {
+    contactDetail,
+    getInfoByIds
+  } from '@/api/bpm/components/saleManage/contact';
+  import { getFile } from '@/api/system/file';
+  import dictMixins from '@/mixins/dictMixins';
+  import { copyObj } from '@/utils/util';
+  import {
+    contactQcPackPageAPI
+  } from '@/api/bpm/components/supplierManage/contact';
+  import fileMain from '@/components/addDoc/index.vue';
+  import certificateManagement from '@/views/bpm/handleTask/components/certificateQualifications/index.vue';
+  export default {
+    props: {
+      businessId: {
+        default: ''
       }
     },
-  mixins: [dictMixins],
-  components: {fileMain, certificateQualificationsDialog},
-  data() {
-    let formDef = {
-      address: '',
-      addressId: 0,
-      addressName: '',
-      authorizationLimit: 0,
-      businessLicenseFile: [],
-      businessScope: '',
-      categoryId: '',
-      categoryName: '',
-      companyCategoryId: '',
-      companyCategoryName: '',
-      enterpriseTypeName: '',
-      enterpriseTypeId: '',
-      hasParentGroup: 0,
-      industry: '',
-      industryCode: '',
-      industryFullName: '',
-      mainProduct: '',
-      name: '',
-      officialIndustry: '',
-      phone: '',
-      registerDate: '',
-      remark: '',
-      serialNo: '',
-      simpleName: '',
-      legalPerson: '',
-      registeredCapital: '',
-      type: 1,
-      unifiedSocialCreditCode: ''
-    };
-    let otherFormDef = {
-      settlementMode: '',
-      settlementModeName: '',
-      taxRate: 0,
-      address: '',
-      addressId: '',
-      deptId: '',
-      deptName: '',
-      discount: 0,
-      salesmanId: '',
-      salesmanName: '',
-      sender: '',
-      senderPhone: ''
-    };
-    return {
-      visible: false,
-      certificateQualificationsDialogFlag: false,
-      title: '客户详情',
-      row: {},
-      activeName: 'base',
-      formDef,
-      otherFormDef,
-      form: copyObj(formDef),
-      otherForm: copyObj(otherFormDef),
-      tableBankData: [],
-      tableLinkData: [],
-      ifChiefList: [
-        {
-          value: 0,
-          label: '否'
-        },
-        {
-          value: 1,
-          label: '是'
-        }
-      ],
-      bankColumns: [
-        {
-          type: 'index',
-          width: 55,
-          align: 'center'
-        },
-        {
-          label: '单位名称',
-          prop: 'accountName',
-          slot: 'accountName',
-          action: 'accountName',
-          headerSlot: 'accountNameHeader'
-        },
-        {
-          label: '银行账号',
-          prop: 'accountNo',
-          slot: 'accountNo',
-          action: 'accountNo'
-        },
-        {
-          label: '开户行',
-          prop: 'bankName',
-          slot: 'bankName',
-          action: 'bankName'
-        },
-        {
-          label: '银行银联号',
-          prop: 'interbankNo',
-          slot: 'interbankNo',
-          action: 'interbankNo'
-        },
-      ],
-      linkColumns: [
-        {
-          type: 'index',
-          width: 55,
-          align: 'center'
-        },
-        {
-          label: '姓名',
-          prop: 'linkName',
-          slot: 'linkName',
-          action: 'linkName',
-          headerSlot: 'linkNameHeader'
-        },
-        {
-          label: '手机',
-          prop: 'mobilePhone',
-          slot: 'mobilePhone',
-          action: 'mobilePhone',
-          headerSlot: 'mobilePhoneHeader'
-        },
-        {
-          label: '电话',
-          prop: 'phone',
-          slot: 'phone',
-          action: 'phone'
-        },
-        {
-          label: '微信号',
-          prop: 'wechat',
-          slot: 'wechat',
-          action: 'wechat'
-        },
-        {
-          label: '邮箱',
-          prop: 'email',
-          slot: 'email',
-          action: 'email'
-        },
-        {
-          label: '部门',
-          prop: 'deptName',
-          slot: 'deptName',
-          action: 'deptName'
-        },
-        {
-          label: '职务',
-          prop: 'post',
-          slot: 'post',
-          action: 'post'
-        },
-        {
-          label: '状态',
-          prop: 'status',
-          slot: 'status',
-          action: 'status',
-          headerSlot: 'statusHeader'
-        },
-        {
-          label: '是否首要',
-          prop: 'ifChief',
-          slot: 'ifChief',
-          action: 'ifChief'
-        },
-        {
-          label: '备注',
-          prop: 'remark',
-          slot: 'remark',
-          action: 'remark'
-        },
-      ],
-      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: 'approvalStatus',
-        //   slot: 'approvalStatus',
-        //   align: "center",
-        //   width: 120,
-        //   formatter: (_row, _column, cellValue) => {
-        //     return reviewStatus[_row.approvalStatus];
-        //   }
-        // },
-        {
-          label: '备注',
-          prop: 'remark',
-          slot: 'remark',
-          align: "center",
-          minWidth: 120
-        },
-        {
-          action: 'action',
-          slot: 'action',
-          label: '操作',
-          align: "center",
-        }
-      ],
-    };
-  },
-  created() {
-      this._getById(this.businessId);
-  },
-  methods: {
-    cancel() {
-      this.$nextTick(() => {
-        // 关闭后,销毁所有的表单数据
-        this.form = copyObj(this.formDef),
-          this.otherForm = copyObj(this.otherFormDef),
-          this.tableBankData = []
-        this.tableLinkData = []
-        this.visible = false;
-      })
-    },
-    //新增资质
-    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({
-        pageNum: page,
-        size: limit,
-        ...where,
-        contactId: this.form.id
-      });
-    },
-    handleActive(val) {
-      if (val.name == 'certificate') {
-        this.reload()
-      }
+    mixins: [dictMixins],
+    components: { fileMain, certificateManagement },
+    data() {
+      let formDef = {
+        address: '',
+        addressId: 0,
+        addressName: '',
+        authorizationLimit: 0,
+        businessLicenseFile: [],
+        businessScope: '',
+        categoryId: '',
+        categoryName: '',
+        companyCategoryId: '',
+        companyCategoryName: '',
+        enterpriseTypeName: '',
+        enterpriseTypeId: '',
+        hasParentGroup: 0,
+        industry: '',
+        industryCode: '',
+        industryFullName: '',
+        mainProduct: '',
+        name: '',
+        officialIndustry: '',
+        phone: '',
+        registerDate: '',
+        remark: '',
+        serialNo: '',
+        simpleName: '',
+        legalPerson: '',
+        registeredCapital: '',
+        type: 1,
+        unifiedSocialCreditCode: ''
+      };
+      let otherFormDef = {
+        settlementMode: '',
+        settlementModeName: '',
+        taxRate: 0,
+        address: '',
+        addressId: '',
+        deptId: '',
+        deptName: '',
+        discount: 0,
+        salesmanId: '',
+        salesmanName: '',
+        sender: '',
+        senderPhone: ''
+      };
+      return {
+        visible: false,
+        certificateQualificationsDialogFlag: false,
+        title: '客户详情',
+        row: {},
+        activeName: 'base',
+        formDef,
+        otherFormDef,
+        form: copyObj(formDef),
+        otherForm: copyObj(otherFormDef),
+        tableBankData: [],
+        tableLinkData: [],
+        ifChiefList: [
+          {
+            value: 0,
+            label: '否'
+          },
+          {
+            value: 1,
+            label: '是'
+          }
+        ],
+        bankColumns: [
+          {
+            type: 'index',
+            width: 55,
+            align: 'center'
+          },
+          {
+            label: '单位名称',
+            prop: 'accountName',
+            slot: 'accountName',
+            action: 'accountName',
+            headerSlot: 'accountNameHeader'
+          },
+          {
+            label: '银行账号',
+            prop: 'accountNo',
+            slot: 'accountNo',
+            action: 'accountNo'
+          },
+          {
+            label: '开户行',
+            prop: 'bankName',
+            slot: 'bankName',
+            action: 'bankName'
+          },
+          {
+            label: '银行银联号',
+            prop: 'interbankNo',
+            slot: 'interbankNo',
+            action: 'interbankNo'
+          }
+        ],
+        linkColumns: [
+          {
+            type: 'index',
+            width: 55,
+            align: 'center'
+          },
+          {
+            label: '姓名',
+            prop: 'linkName',
+            slot: 'linkName',
+            action: 'linkName',
+            headerSlot: 'linkNameHeader'
+          },
+          {
+            label: '手机',
+            prop: 'mobilePhone',
+            slot: 'mobilePhone',
+            action: 'mobilePhone',
+            headerSlot: 'mobilePhoneHeader'
+          },
+          {
+            label: '电话',
+            prop: 'phone',
+            slot: 'phone',
+            action: 'phone'
+          },
+          {
+            label: '微信号',
+            prop: 'wechat',
+            slot: 'wechat',
+            action: 'wechat'
+          },
+          {
+            label: '邮箱',
+            prop: 'email',
+            slot: 'email',
+            action: 'email'
+          },
+          {
+            label: '部门',
+            prop: 'deptName',
+            slot: 'deptName',
+            action: 'deptName'
+          },
+          {
+            label: '职务',
+            prop: 'post',
+            slot: 'post',
+            action: 'post'
+          },
+          {
+            label: '状态',
+            prop: 'status',
+            slot: 'status',
+            action: 'status',
+            headerSlot: 'statusHeader'
+          },
+          {
+            label: '是否首要',
+            prop: 'ifChief',
+            slot: 'ifChief',
+            action: 'ifChief'
+          },
+          {
+            label: '备注',
+            prop: 'remark',
+            slot: 'remark',
+            action: 'remark'
+          }
+        ],
+      };
     },
-    /* 刷新表格 */
-    reload(where) {
-      where = {
-        ...where,
-        relationId: this.form.id
-      }
-      this.$refs.certificateTable.reload({page: 1, where});
+    created() {
+      this._getById(this.businessId);
     },
-    async _getById(id) {
-      if(!id){
- return
-      }
-      const data = await contactDetail(id);
-      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 + "");
-      }
+    methods: {
+      cancel() {
+        this.$nextTick(() => {
+          // 关闭后,销毁所有的表单数据
+          (this.form = copyObj(this.formDef)),
+            (this.otherForm = copyObj(this.otherFormDef)),
+            (this.tableBankData = []);
+          this.tableLinkData = [];
+          this.visible = false;
+        });
+      },
+    
+      async _getById(id) {
+        if (!id) {
+          return;
+        }
+        const data = await contactDetail(id);
+        this.form = data.base;
+        this.otherForm = data.other;
+        this.tableBankData = data.bankList;
+        this.tableLinkData = data.linkList;
 
-      await getInfoByIds(this.form.categoryId).then((res) => {
-        let categoryName = res.data.map((item) => item.name)?.join(',');
-        this.$set(this.form, 'categoryName', categoryName);
-      });
-    },
+        if (this.tableLinkData && this.tableLinkData.length > 0) {
+          this.tableLinkData.forEach((e) => (e.status = e.status + ''));
+        }
+        this.$nextTick(()=>{
+          this.$refs.certificateManagementRef.getTable(this.form.id,4)
+        })
 
-    downloadFile(file) {
-      getFile({objectName: file.storePath}, file.name);
-    },
+        await getInfoByIds(this.form.categoryId).then((res) => {
+          let categoryName = res.data.map((item) => item.name)?.join(',');
+          this.$set(this.form, 'categoryName', categoryName);
+        });
+      },
 
-  }
-};
+      downloadFile(file) {
+        getFile({ objectName: file.storePath }, file.name);
+      }
+    }
+  };
 </script>
 <style scoped lang="scss">
-:deep .isGreen {
-  background: #ffd16c;
-}
+  :deep .isGreen {
+    background: #ffd16c;
+  }
 </style>