ソースを参照

Merge remote-tracking branch 'origin/dev' into dev

001295 1 年間 前
コミット
9291679a56

+ 9 - 0
src/api/business/spd/cm/customers.js

@@ -51,3 +51,12 @@ export function getContactInfo(id) {
     method: 'get',
   })
 }
+
+// 删除联系人
+export function delContact(ids) {
+  return request({
+    url: '/cm/customers/deleteContact',
+    method: 'post',
+    data: ids
+  })
+}

+ 4 - 3
src/api/business/spd/cm/customersDepartment.js

@@ -36,9 +36,10 @@ export function updateCustomersDepartment(data) {
 }
 
 // 删除客户科室
-export function delCustomersDepartment(id) {
+export function delCustomersDepartment(ids) {
   return request({
-    url: '/cm/customersDepartment/' + id,
-    method: 'delete'
+    url: '/cm/customersDepartment/delete',
+    method: 'post',
+    data: ids
   })
 }

+ 4 - 3
src/api/business/spd/cm/customersResponsiblePerson.js

@@ -36,9 +36,10 @@ export function updateCustomersResponsiblePerson(data) {
 }
 
 // 删除客户负责人
-export function delCustomersResponsiblePerson(id) {
+export function delCustomersResponsiblePerson(ids) {
   return request({
-    url: '/cm/customersResponsiblePerson/' + id,
-    method: 'delete'
+    url: '/cm/customersResponsiblePerson/delete',
+    method: 'post',
+    data: ids
   })
 }

+ 29 - 0
src/components/popover-select-v2/index.vue

@@ -224,6 +224,33 @@ export default {
       const { referName } = this.$props;
       this.$emit("copyChange", this.innerValue.split(/,|,|\s+/));
     },
+    useBlur() {
+      const {
+        $props: { source, dataMapping },
+      } = this;
+
+      for (let key in dataMapping) {
+        if (dataMapping[key] === "id" || dataMapping[key] === "code") {
+          if (!source[key] || source[key] === "") {
+            this.innerValue = "";
+          }
+        }
+      }
+    },
+    handleKeyupDel() {
+      console.log("focus");
+      const {
+        $props: { source, dataMapping },
+      } = this;
+
+      for (let key in dataMapping) {
+        if (dataMapping[key] === "id" || dataMapping[key] === "code") {
+          if (source[key] && source[key] !== "") {
+            source[key] = undefined;
+          }
+        }
+      }
+    },
     handleClear() {
       this.innerValue = "";
     },
@@ -255,7 +282,9 @@ export default {
       v-model="innerValue"
       :value-key="valueKey"
       :fetch-suggestions="useAutocomplete"
+      @blur="useBlur"
       @select="useConfirm([$event])"
+      @keyup.delete.native="handleKeyupDel"
       style="width: 100%"
     >
       <i class="el-icon-search" slot="suffix" @click="open"> </i>

+ 31 - 1
src/components/popover-select/index.vue

@@ -298,6 +298,34 @@ export default {
       const { type, source } = this.$props;
       this.$emit("copyChange", this.innerValue.split(/,|,|\s+/));
     },
+    useBlur() {
+      const {
+        $props: { source, dataMapping, multiple },
+      } = this;
+      if (!multiple) {
+        for (let key in dataMapping) {
+          if (dataMapping[key] === "id" || dataMapping[key] === "code") {
+            if (!source[key] || source[key] === "") {
+              this.innerValue = "";
+            }
+          }
+        }
+      }
+    },
+    handleKeyupDel() {
+      console.log("focus");
+      const {
+        $props: { source, dataMapping },
+      } = this;
+
+      for (let key in dataMapping) {
+        if (dataMapping[key] === "id" || dataMapping[key] === "code") {
+          if (source[key] && source[key] !== "") {
+            source[key] = undefined;
+          }
+        }
+      }
+    },
   },
   created() {},
   mounted() {},
@@ -326,10 +354,12 @@ export default {
       v-bind="$attrs"
       v-model="innerValue"
       :size="size"
+      :disabled="disabled"
       :value-key="valueKey"
       :fetch-suggestions="useAutocomplete"
+      @blur="useBlur"
       @select="useConfirm([$event])"
-      :disabled="disabled"
+      @keyup.delete.native="handleKeyupDel"
       style="width: 100%"
     >
       <i :size="size" class="el-icon-search" slot="suffix" @click="open"> </i>

+ 1 - 1
src/views/business/spd/bo/contact/index.vue

@@ -202,7 +202,7 @@
           </el-col>
           <el-col :span="8">
             <el-form-item label="任职科室" prop="section">
-              <el-select v-model="form.section" placeholder="">
+              <el-select v-model.trim="form.section" placeholder="" filterable>
                 <el-option
                   v-for="dict in dict.type.mk_bo_section"
                   :key="dict.value"

+ 168 - 42
src/views/business/spd/cm/customers/index.vue

@@ -1,6 +1,6 @@
 <template>
   <div id="Customers" class="app-container">
-    <div v-if="!isAdd1 && !isAdd2">
+    <div v-if="!isAdd0 && !isAdd1 && !isAdd2">
       <div v-if="isList">
         <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch"
           label-width="68px">
@@ -77,6 +77,7 @@
 
         <el-table v-loading="loading" :data="customersList" @selection-change="handleSelectionChange">
           <el-table-column type="selection" width="55" align="center" />
+          <el-table-column type="index" label="序号" min-width="50" align="center" />
           <el-table-column label="销售组织" align="center" prop="orgName" min-width="300" />
           <el-table-column label="客户编码" align="center" prop="code" min-width="100" />
           <el-table-column label="客户名称" align="center" prop="name" min-width="200" />
@@ -366,11 +367,60 @@
               </el-tab-pane>
 
               <el-tab-pane label="联系人信息" name="third" v-if="openState == 'check'">
-                <el-table :data="mkCmCustomersContactList" ref="mkCmCustomersContact">
+                <el-row :gutter="10" class="mb8">
+                  <el-col :span="6" :offset="21">
+                    <el-button type="primary" icon="el-icon-plus" size="mini" @click="handleAddMkCmCustomersContact">添加
+                    </el-button>
+                    <el-button type="danger" icon="el-icon-delete" size="mini"
+                      @click="handleDeleteTab('0')">
+                      删除
+                    </el-button>
+                  </el-col>
+                </el-row>
+                <el-table :data="mkCmCustomersContactList" :row-class-name="rowMkCmCustomersContactIndex"
+                  @selection-change="handleMkCmCustomersContactSelectionChange" ref="mkCmCustomersContact">
+                  <el-table-column type="selection" width="55" align="center" />
+                  <el-table-column type="index" label="序号" min-width="50" align="center" />
+                  <el-table-column width="300" label="编号" align="center" prop="code" />
                   <el-table-column label="姓名" align="center" prop="name" min-width="150" />
-                  <el-table-column label="客户" align="center" prop="customerName" min-width="150" />
-                  <el-table-column label="手机" align="center" prop="telephone" min-width="150" />
-                  <el-table-column label="邮箱" align="center" prop="mail" min-width="150" />
+                  <el-table-column label="性别" align="center" prop="gander" >
+                    <template slot-scope="scope">
+                      <dict-tag :options="dict.type.sys_user_sex" :value="scope.row.gander"/>
+                    </template>
+                  </el-table-column>
+                  <el-table-column label="联系电话" align="center" prop="telephone" min-width="150" />
+                  <el-table-column label="所属客户" align="center" prop="customerName" min-width="150" />
+                  <el-table-column width="200" show-overflow-tooltip label="部门名称" align="center" prop="departmentName" />
+                  <el-table-column label="职务" align="center" prop="position" >
+                    <template slot-scope="scope">
+                      <dict-tag :options="dict.type.mk_bo_position" :value="scope.row.position"/>
+                    </template>
+                  </el-table-column>
+                  <el-table-column label="决策力" align="center" prop="power" >
+                    <template slot-scope="scope">
+                      <dict-tag :options="dict.type.mk_bo_power" :value="scope.row.power"/>
+                    </template>
+                  </el-table-column>
+                  <el-table-column width="200" show-overflow-tooltip label="兴趣爱好" align="center" prop="hobby" />
+                  <el-table-column width="200" show-overflow-tooltip label="家庭地址" align="center" prop="address" />
+                  <el-table-column label="状态" align="center" prop="state" >
+                    <template slot-scope="scope">
+                      <dict-tag :options="dict.type.mk_bo_contact_state" :value="scope.row.state"/>
+                    </template>
+                  </el-table-column>
+                  <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="180px"
+                    fixed="right">
+                    <template slot-scope="scope">
+                      <el-button size="mini" type="text" icon="el-icon-search" @click="handleCheckAdd(scope.row, '0')">
+                        查看
+                      </el-button>
+                      <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdateAdd(scope.row, '0')">修改
+                      </el-button>
+                      <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDeleteAdd(scope.row, '0')">
+                        删除
+                      </el-button>
+                    </template>
+                  </el-table-column>
                 </el-table>
               </el-tab-pane>
 
@@ -381,7 +431,7 @@
                       @click="handleAddMkCmCustomersResponsiblePerson">添加
                     </el-button>
                     <el-button type="danger" icon="el-icon-delete" size="mini"
-                      @click="handleDeleteMkCmCustomersResponsiblePerson">
+                      @click="handleDeleteTab('1')">
                       删除
                     </el-button>
                   </el-col>
@@ -391,6 +441,7 @@
                   @selection-change="handleMkCmCustomersResponsiblePersonSelectionChange"
                   ref="mkCmCustomersResponsiblePerson">
                   <el-table-column type="selection" width="55" align="center" />
+                  <el-table-column type="index" label="序号" min-width="50" align="center" />
                   <el-table-column label="人员姓名" align="center" prop="personName" min-width="150" />
                   <el-table-column label="客户名称" align="center" prop="customersName" min-width="150" />
                   <el-table-column label="关系类型" align="center" prop="relationshipType" min-width="150"
@@ -431,7 +482,7 @@
                       添加
                     </el-button>
                     <el-button type="danger" icon="el-icon-delete" size="mini"
-                      @click="handleDeleteMkCmCustomersDepartment">
+                      @click="handleDeleteTab('2')">
                       删除
                     </el-button>
                   </el-col>
@@ -439,7 +490,13 @@
                 <el-table :data="mkCmCustomersDepartmentList" :row-class-name="rowMkCmCustomersDepartmentIndex"
                   @selection-change="handleMkCmCustomersDepartmentSelectionChange" ref="mkCmCustomersDepartment">
                   <el-table-column type="selection" width="55" align="center" />
-                  <el-table-column label="科室名称" align="center" prop="name" min-width="150" />
+                  <el-table-column type="index" label="序号" min-width="50" align="center" />
+                  <el-table-column label="科室名称" align="center" prop="name" min-width="150">
+                    <template slot-scope="scope">
+                      <dict-tag :options="dict.type.mk_bo_section" :value="scope.row.name"
+                        show-overflow-tooltip />
+                    </template>
+                  </el-table-column>
                   <el-table-column label="客户名称" align="center" prop="customersName" min-width="150" />
                   <el-table-column label="负责人姓名" align="center" prop="responsiblePersonName" min-width="150" />
                   <el-table-column label="联系人手机" align="center" prop="phone" min-width="150" />
@@ -471,6 +528,8 @@
         </el-form>
       </div>
     </div>
+    <AddContact v-model="isAdd0" v-if="isAdd0" :operatingState="operatingSta" :state="state" :row="rowDetail" :customersId="form.id"
+      :customersName="form.name" />
 
     <AddPerson v-model="isAdd1" v-if="isAdd1" :pageStu="page" :disable="disable" :row="rowDetail" :customersId="form.id"
       :customersName="form.name" />
@@ -489,6 +548,7 @@
     addCustomers,
     updateCustomers,
     getContactInfo,
+    delContact,
   } from "@/api/business/spd/cm/customers";
   // 客户负责人接口
   import {
@@ -501,6 +561,8 @@
   import CollapseTransition from '@/components/MyCollapse/collapse.vue';
   // 参照弹出框
   import ElPopoverSelectV2 from "@/components/popover-select-v2";
+  // 新建客户联系人信息页面
+  import AddContact from "@/views/business/spd/cm/customersContact/index.vue";
   // 新建客户负责人信息页面
   import AddPerson from "@/views/business/spd/cm/customersResponsiblePerson/index.vue";
   // 新建客户科室信息页面
@@ -511,12 +573,13 @@
     components: {
       CollapseTransition,
       ElPopoverSelectV2,
+      AddContact,
       AddPerson,
       AddDepartment,
     },
     dicts: ['mk_cm_yes_no', 'mk_cm_classification', 'mk_cm_type', 'mk_cm_category', 'mk_cm_channel',
       'mk_cm_business_type', 'mk_cm_industry', 'mk_cm_tax_type', 'mk_cm_enterprise_type', 'mk_cm_relationship_type',
-      'mk_cm_production_line'
+      'mk_cm_production_line', 'mk_bo_section', 'sys_user_sex', 'mk_bo_position', 'mk_bo_power', 'mk_bo_contact_state'
     ],
     data() {
       return {
@@ -527,9 +590,11 @@
         // 选中数组中的客户编码
         codes: [],
         // 子表选中数据
+        checkedMkCmCustomersContact: [],
         checkedMkCmCustomersResponsiblePerson: [],
         checkedMkCmCustomersDepartment: [],
         // 子表选中主键
+        checkedMkCmCustomersContactIds: [],
         checkedMkCmCustomersResponsiblePersonIds: [],
         checkedMkCmCustomersDepartmentIds: [],
         // 非单个禁用
@@ -557,6 +622,9 @@
         // 列表页面
         isList: true,
         // 添加页面
+        isAdd0: false,
+        operatingSta: null,
+        state: null,
         isAdd1: false,
         isAdd2: false,
         rowDetail: {},
@@ -702,6 +770,7 @@
           delFlag: null
         };
         this.activeName = 'first';
+        this.mkCmCustomersContactList = [];
         this.mkCmCustomersResponsiblePersonList = [];
         this.mkCmCustomersDepartmentList = [];
         this.resetForm("form");
@@ -782,7 +851,12 @@
       },
       /** Add查看按钮操作 */
       handleCheckAdd(row, type) {
-        if (type == '1') {
+        if (type == '0') {
+          this.isAdd0 = true;
+          this.operatingSta = 'Browse';
+          this.rowDetail = row;
+          this.disable = true;
+        } else if (type == '1') {
           this.isAdd1 = true;
           this.page = 'check';
           this.rowDetail = row;
@@ -809,7 +883,12 @@
       },
       /** Add修改按钮操作 */
       handleUpdateAdd(row, type) {
-        if (type == '1') {
+        if (type == '0') {
+          this.isAdd0 = true;
+          this.operatingSta = 'Update';
+          this.rowDetail = row;
+          this.disable = false;
+        } else if (type == '1') {
           this.isAdd1 = true;
           this.page = 'update';
           this.rowDetail = row;
@@ -863,9 +942,20 @@
       },
       /** Add删除按钮操作 */
       handleDeleteAdd(row, type) {
-        const ids = row.id || this.ids;
-        if (type == '1') {
-          this.$modal.confirm('是否确认删除人员姓名为"' + row.personName + '"的数据项?').then(function () {
+        let ids = [];
+        ids[0] = row.id;
+        if (type == '0') {
+          console.log(row, 'row')
+          this.$modal.confirm('是否确认删除序号为"' + row.index + '"的数据项?').then(function () {
+            return delContact(ids);
+          }).then(() => {
+            getContactInfo(this.form.id).then(res => {
+              this.mkCmCustomersContactList = res.data;
+            })
+            this.$modal.msgSuccess("删除成功");
+          }).catch(() => {});
+        } else if (type == '1') {
+          this.$modal.confirm('是否确认删除序号为"' + row.index + '"的数据项?').then(function () {
             return delCustomersResponsiblePerson(ids);
           }).then(() => {
             getCustomers(row.customersId).then(res => {
@@ -874,7 +964,7 @@
             this.$modal.msgSuccess("删除成功");
           }).catch(() => {});
         } else if (type == '2') {
-          this.$modal.confirm('是否确认删除科室名称为"' + row.name + '"的数据项?').then(function () {
+          this.$modal.confirm('是否确认删除序号为"' + row.index + '"的数据项?').then(function () {
             return delCustomersDepartment(ids);
           }).then(() => {
             getCustomers(row.customersId).then(res => {
@@ -884,6 +974,13 @@
           }).catch(() => {});
         }
       },
+      /** 客户联系人序号 */
+      rowMkCmCustomersContactIndex({
+        row,
+        rowIndex
+      }) {
+        row.index = rowIndex + 1;
+      },
       /** 客户负责人序号 */
       rowMkCmCustomersResponsiblePersonIndex({
         row,
@@ -898,6 +995,14 @@
       }) {
         row.index = rowIndex + 1;
       },
+      /** 客户联系人添加按钮操作 */
+      handleAddMkCmCustomersContact() {
+        this.isList = false;
+        this.isAdd0 = true;
+        this.operatingSta = 'Insert';
+        this.disable = false;
+        this.state = '1';
+      },
       /** 客户负责人添加按钮操作 */
       handleAddMkCmCustomersResponsiblePerson() {
         this.isList = false;
@@ -912,35 +1017,56 @@
         this.page = 'add';
         this.disable = false;
       },
-      /** 客户负责人删除按钮操作 */
-      handleDeleteMkCmCustomersResponsiblePerson() {
-        if (this.checkedMkCmCustomersResponsiblePerson.length == 0) {
-          this.$modal.msgError("请先选择要删除的客户负责人数据");
-        } else {
-          this.$modal.confirm('是否确认删除序号为"' + this.checkedMkCmCustomersResponsiblePerson + '"的数据项?').then(function () {
-            return delCustomersResponsiblePerson(this.checkedMkCmCustomersResponsiblePersonIds);
-          }).then(() => {
-            getCustomers(this.form.id).then(res => {
-              this.mkCmCustomersResponsiblePersonList = res.data.mkCmCustomersResponsiblePersonList;
-            })
-            this.$modal.msgSuccess("删除成功");
-          }).catch(() => {});
+      /** 客户页签删除按钮操作 */
+      handleDeleteTab(type) {
+        let that = this;
+        if (type == '0') {
+          if (that.checkedMkCmCustomersContact.length == 0) {
+            that.$modal.msgError("请先选择要删除的客户联系人数据");
+          } else {
+            that.$modal.confirm('是否确认删除序号为"' + that.checkedMkCmCustomersContact + '"的数据项?').then(function () {
+              return delContact(that.checkedMkCmCustomersContactIds);
+            }).then(() => {
+              getContactInfo(that.form.id).then(res => {
+                that.mkCmCustomersContactList = res.data;
+              })
+              that.$modal.msgSuccess("删除成功");
+            }).catch((e) => {
+              console.log(e, 'e');
+            });
+          }
+        } else if (type == '1') {
+          if (that.checkedMkCmCustomersResponsiblePerson.length == 0) {
+            that.$modal.msgError("请先选择要删除的客户负责人数据");
+          } else {
+            that.$modal.confirm('是否确认删除序号为"' + that.checkedMkCmCustomersResponsiblePerson + '"的数据项?').then(function () {
+              return delCustomersResponsiblePerson(that.checkedMkCmCustomersResponsiblePersonIds);
+            }).then(() => {
+              getCustomers(that.form.id).then(res => {
+                that.mkCmCustomersResponsiblePersonList = res.data.mkCmCustomersResponsiblePersonList;
+              })
+              that.$modal.msgSuccess("删除成功");
+            }).catch(() => {});
+          }
+        } else if (type == '2') {
+          if (that.checkedMkCmCustomersDepartment.length == 0) {
+            that.$modal.msgError("请先选择要删除的客户科室数据");
+          } else {
+            that.$modal.confirm('是否确认删除序号为"' + that.checkedMkCmCustomersDepartment + '"的数据项?').then(function () {
+              return delCustomersDepartment(that.checkedMkCmCustomersDepartmentIds);
+            }).then(() => {
+              getCustomers(that.form.id).then(res => {
+                that.mkCmCustomersDepartmentList = res.data.mkCmCustomersDepartmentList;
+              })
+              that.$modal.msgSuccess("删除成功");
+            }).catch(() => {});
+          }
         }
       },
-      /** 客户科室删除按钮操作 */
-      handleDeleteMkCmCustomersDepartment() {
-        if (this.checkedMkCmCustomersDepartment.length == 0) {
-          this.$modal.msgError("请先选择要删除的客户科室数据");
-        } else {
-          this.$modal.confirm('是否确认删除序号为"' + this.checkedMkCmCustomersDepartment + '"的数据项?').then(function () {
-            return delCustomersDepartment(this.checkedMkCmCustomersDepartmentIds);
-          }).then(() => {
-            getCustomers(this.form.id).then(res => {
-              this.mkCmCustomersDepartmentList = res.data.mkCmCustomersDepartmentList;
-            })
-            this.$modal.msgSuccess("删除成功");
-          }).catch(() => {});
-        }
+      /** 复选框选中数据 */
+      handleMkCmCustomersContactSelectionChange(selection) {
+        this.checkedMkCmCustomersContact = selection.map(item => item.index)
+        this.checkedMkCmCustomersContactIds = selection.map(item => item.id)
       },
       /** 复选框选中数据 */
       handleMkCmCustomersResponsiblePersonSelectionChange(selection) {

+ 457 - 0
src/views/business/spd/cm/customersContact/index.vue

@@ -0,0 +1,457 @@
+<template>
+  <!-- <el-dialog :title="title" :visible.sync="open" width="1100px" append-to-body> -->
+  <div id="CustomersContact" class="app-container">
+    <el-form ref="form" :model="form" :rules="rules" label-width="auto"
+      :disabled="this.operatingState == 'Browse'">
+      <el-divider content-position="left">
+        <dev style="width: 50px; height: 40px; font-size: 18px">基本信息</dev>
+      </el-divider>
+      <el-row>
+        <el-col :span="8">
+          <el-form-item label="编码" prop="code">
+            <el-input v-model="form.code" placeholder="系统自动生成编码" readonly />
+          </el-form-item>
+        </el-col>
+        <el-col :span="8">
+          <el-form-item label="姓名" prop="name">
+            <el-input v-model="form.name" />
+          </el-form-item>
+        </el-col>
+        <el-col :span="8">
+          <el-form-item label="性别" prop="gander">
+            <el-select v-model="form.gander" placeholder="">
+              <el-option v-for="dict in dict.type.sys_user_sex" :key="dict.value" :label="dict.label"
+                :value="dict.value"></el-option>
+            </el-select>
+          </el-form-item>
+        </el-col>
+      </el-row>
+      <el-row>
+        <el-col :span="8">
+          <el-form-item label="所属客户" prop="customerName">
+            <dr-popover-select v-model="form.customerName" title="客户" type="CUSTOMER_PARAM_ZT" :dataMapping="{
+                  customer: 'id',
+                  customerName: 'name',
+                }" :source.sync="form">
+            </dr-popover-select>
+          </el-form-item>
+        </el-col>
+        <el-col :span="8">
+          <el-form-item label="联系人分类" prop="contactClassification">
+            <el-select v-model="form.contactClassification" placeholder="">
+              <el-option v-for="dict in dict.type.mk_bo_contact_type" :key="dict.value" :label="dict.label"
+                :value="dict.value"></el-option>
+            </el-select>
+          </el-form-item>
+        </el-col>
+        <el-col :span="8">
+          <el-form-item label="生日" prop="birthday">
+            <el-date-picker clearable v-model="form.birthday" type="date" value-format="yyyy-MM-dd">
+            </el-date-picker>
+          </el-form-item>
+        </el-col>
+      </el-row>
+      <el-row>
+        <el-col :span="8">
+          <el-form-item label="籍贯" prop="birthplace">
+            <el-input v-model="form.birthplace" />
+          </el-form-item>
+        </el-col>
+        <el-col :span="8">
+          <el-form-item label="兴趣爱好" prop="hobby">
+            <el-input v-model="form.hobby" placeholder="" />
+          </el-form-item>
+        </el-col>
+        <el-col :span="8">
+          <el-form-item label="状态" prop="state">
+            <el-select v-model="form.state" placeholder="">
+              <el-option v-for="dict in dict.type.mk_bo_contact_state" :key="dict.value" :label="dict.label"
+                :value="dict.value"></el-option>
+            </el-select>
+          </el-form-item>
+        </el-col>
+      </el-row>
+      <el-divider content-position="left">
+        <dev style="width: 50px; height: 40px; font-size: 18px">工作信息</dev>
+      </el-divider>
+      <el-row>
+        <el-col :span="8">
+          <el-form-item label="上级联系人" prop="superiorContactName">
+            <dr-popover-select v-model="form.superiorContactName" title="上级联系人" type="LINKMAN_PARAM" :dataMapping="{
+                  superiorContact: 'id',
+                  superiorContactName: 'name',
+                }" :source.sync="form" :queryParams="additionalCondition">
+            </dr-popover-select>
+          </el-form-item>
+        </el-col>
+        <el-col :span="8">
+          <el-form-item label="任职科室" prop="section">
+            <el-select v-model.trim="form.section" placeholder="" filterable>
+              <el-option v-for="dict in dict.type.mk_bo_section" :key="dict.value" :label="dict.label"
+                :value="dict.value"></el-option>
+            </el-select>
+          </el-form-item>
+        </el-col>
+        <el-col :span="8">
+          <el-form-item label="职务" prop="position">
+            <el-select v-model="form.position" placeholder="">
+              <el-option v-for="dict in dict.type.mk_bo_position" :key="dict.value" :label="dict.label"
+                :value="dict.value"></el-option>
+            </el-select>
+          </el-form-item>
+        </el-col>
+      </el-row>
+      <el-row>
+        <el-col :span="8">
+          <el-form-item label="职称" prop="jobTitle">
+            <el-select v-model="form.jobTitle" placeholder="">
+              <el-option v-for="dict in dict.type.mk_bo_job_title" :key="dict.value" :label="dict.label"
+                :value="dict.value"></el-option>
+            </el-select>
+          </el-form-item>
+        </el-col>
+        <el-col :span="8">
+          <el-form-item label="决策力" prop="power">
+            <el-select v-model="form.power" placeholder="">
+              <el-option v-for="dict in dict.type.mk_bo_power" :key="dict.value" :label="dict.label"
+                :value="dict.value"></el-option>
+            </el-select>
+          </el-form-item>
+        </el-col>
+        <el-col :span="8">
+          <el-form-item label="支持度" prop="support">
+            <el-select v-model="form.support" placeholder="">
+              <el-option v-for="dict in dict.type.mk_bo_support" :key="dict.value" :label="dict.label"
+                :value="dict.value"></el-option>
+            </el-select>
+          </el-form-item>
+        </el-col>
+      </el-row>
+      <el-row>
+        <el-col :span="8">
+          <el-form-item label="擅长领域" prop="fieldExpertise">
+            <el-select v-model="form.fieldExpertise" placeholder="">
+              <el-option v-for="dict in dict.type.mk_bo_field_expertise" :key="dict.value" :label="dict.label"
+                :value="dict.value"></el-option>
+            </el-select>
+          </el-form-item>
+        </el-col>
+        <el-col :span="8">
+          <el-form-item label="关键决策人" prop="decisionMaker">
+            <el-select v-model="form.decisionMaker" placeholder="">
+              <el-option v-for="dict in dict.type.sys_yes_no" :key="dict.value" :label="dict.label" :value="dict.value">
+              </el-option>
+            </el-select>
+          </el-form-item>
+        </el-col>
+        <el-col :span="8">
+        </el-col>
+      </el-row>
+      <el-divider content-position="left">
+        <dev style="width: 50px; height: 40px; font-size: 18px">联系信息</dev>
+      </el-divider>
+      <el-row>
+        <el-col :span="8">
+          <el-form-item label="联系电话" prop="telephone">
+            <el-input v-model="form.telephone" />
+          </el-form-item>
+        </el-col>
+        <el-col :span="8">
+          <el-form-item label="微信" prop="mail">
+            <el-input v-model="form.mail" />
+          </el-form-item>
+        </el-col>
+        <el-col :span="8">
+          <el-form-item label="家庭地址" prop="address">
+            <el-input v-model="form.address" />
+          </el-form-item>
+        </el-col>
+      </el-row>
+      <el-row>
+        <el-col :span="8">
+          <el-form-item label="最佳拜访时间" prop="visitTime">
+            <el-input v-model="form.visitTime" />
+          </el-form-item>
+        </el-col>
+        <el-col :span="8">
+          <el-form-item label="最佳拜访地点" prop="visitPlace">
+            <el-input v-model="form.visitPlace" />
+          </el-form-item>
+        </el-col>
+        <el-col :span="8">
+        </el-col>
+      </el-row>
+      <el-tabs v-model="activeName" v-if="this.operatingState != 'Insert'">
+        <el-tab-pane label="学历信息" name="first">
+          <EducationList :key="timer" :supForm="this.row" />
+        </el-tab-pane>
+        <el-tab-pane label="社会关系" name="second">
+          <RelationshipList :key="timer" :supForm="this.row" />
+        </el-tab-pane>
+      </el-tabs>
+      <div class="md-auditInfo">
+        <el-divider content-position="left">
+          <dev style="width: 50px; height: 40px; font-size: 18px">其它信息</dev>
+        </el-divider>
+        <el-row>
+          <el-col :span="6">
+            <el-form-item label="创建人">
+              <el-input v-model="form.createByName" readonly></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="6">
+            <el-form-item label="创建时间">
+              <el-input v-model="form.createTime" readonly></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="6">
+            <el-form-item label="修改人">
+              <el-input v-model="form.updateByName" readonly></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="6">
+            <el-form-item label="修改时间">
+              <el-input v-model="form.updateTime" readonly></el-input>
+            </el-form-item>
+          </el-col>
+        </el-row>
+      </div>
+    </el-form>
+    <div slot="footer" class="dialog-footer">
+      <el-button size="mini" type="primary" @click="submitForm" v-if="this.operatingState != 'Browse'"
+        :disabled="submitButtonEditStatus">确 定</el-button>
+      <el-button size="mini" @click="cancel">取 消</el-button>
+    </div>
+  </div>
+  <!-- </el-dialog> -->
+</template>
+
+<script>
+  import {
+    listContact,
+    getContact,
+    delContact,
+    addContact,
+    updateContact
+  } from "@/api/business/spd/bo/contact";
+  // import EducationList from '../education/educationList.vue';
+  // import RelationshipList from '../relationship/relationshipList.vue';
+
+  export default {
+    name: "CustomersContact",
+    props: ['operatingState', 'row', 'disable', 'state', 'customersId', 'customersName'],
+    model: {
+      prop: 'isAdd0',
+      event: 'jugislist'
+    },
+    dicts: ['sys_user_sex', 'mk_bo_contact_state', 'mk_bo_section', 'mk_bo_position', 'mk_bo_job_title', 'mk_bo_power',
+      'mk_bo_support', 'mk_bo_field_expertise', 'sys_yes_no', 'mk_bo_contact_type'
+    ],
+    components: {
+      EducationList: () => import('../education/educationList.vue'),
+      RelationshipList: () => import('../relationship/relationshipList.vue')
+    },
+    data() {
+      return {
+        // 遮罩层
+        loading: true,
+        // 选中数组
+        ids: [],
+        // 非单个禁用
+        single: true,
+        // 非多个禁用
+        multiple: true,
+        // 显示搜索条件
+        showSearch: true,
+        // 总条数
+        total: 0,
+        // 联系人管理表格数据
+        contactList: [],
+        // 查询参数
+        queryParams: {
+          pageNum: 1,
+          pageSize: 10,
+          name: null,
+          telephone: null,
+          customerName: null,
+        },
+        // 表单参数
+        form: {},
+        // 表单校验
+        rules: {
+          name: [{
+            required: true,
+            message: "姓名不能为空",
+            trigger: "blur"
+          }],
+          gander: [{
+            required: true,
+            message: "性别不能为空",
+            trigger: "blur"
+          }],
+          customerName: [{
+            required: true,
+            message: "所属客户名称不能为空",
+            trigger: "blur"
+          }],
+          state: [{
+            required: true,
+            message: "状态不能为空",
+            trigger: "blur"
+          }],
+          section: [{
+            required: true,
+            message: "任职科室不能为空",
+            trigger: "blur"
+          }],
+          position: [{
+            required: true,
+            message: "职务不能为空",
+            trigger: "blur"
+          }],
+          jobTitle: [{
+            required: true,
+            message: "职称不能为空",
+            trigger: "blur"
+          }],
+          power: [{
+            required: true,
+            message: "决策力不能为空",
+            trigger: "blur"
+          }],
+          decisionMaker: [{
+            required: true,
+            message: "关键决策人不能为空",
+            trigger: "blur"
+          }],
+          telephone: [{
+              required: true,
+              message: "联系电话不能为空",
+              trigger: "blur"
+            },
+            {
+              validator: function (rule, value, callback) {
+                if (/^1[34578]\d{9}$/.test(value) == false) {
+                  callback(new Error("手机号格式错误"));
+                } else {
+                  callback();
+                }
+              },
+              trigger: "blur"
+            }
+          ],
+        },
+        //重新加载子组件参数
+        timer: '',
+        activeName: 'first',
+        //确定按钮是否可点
+        submitButtonEditStatus: false,
+      };
+    },
+    created() {
+      if (this.operatingState == 'Browse') {
+        this.handleBrowse(this.row);
+      } else if (this.operatingState == 'Update') {
+        this.handleUpdate(this.row);
+      }
+    },
+    methods: {
+      // 取消按钮
+      cancel() {
+        this.$emit('jugislist', false);
+      },
+      // 表单重置
+      reset() {
+        this.form = {
+          boId: null,
+          delFlag: null,
+          updateTime: null,
+          updateBy: null,
+          createDate: null,
+          createBy: null,
+          departmentName: null,
+          departmentCode: null,
+          area: null,
+          organization: null,
+          visitPlace: null,
+          visitTime: null,
+          address: null,
+          mail: null,
+          telephone: null,
+          decisionMaker: null,
+          fieldExpertise: null,
+          support: null,
+          power: null,
+          jobTitle: null,
+          position: null,
+          section: null,
+          superiorContact: null,
+          state: null,
+          hobby: null,
+          birthplace: null,
+          birthday: null,
+          contactClassification: null,
+          customerName: null,
+          customerCode: null,
+          gander: null,
+          name: null,
+          code: null,
+          id: null
+        };
+        this.resetForm("form");
+      },
+      /** 修改按钮操作 */
+      handleUpdate(row) {
+        this.operatingState = "Update";
+        this.reset();
+        const id = row.id || this.ids
+        getContact(id).then(response => {
+          this.form = response.data;
+          this.timer = new Date().getTime();
+        });
+      },
+      /** 查看按钮操作 */
+      handleBrowse(row) {
+        this.reset();
+        const id = row.id || this.ids
+        getContact(id).then(response => {
+          this.form = response.data;
+          this.operatingState = "Browse";
+        });
+      },
+      /** 提交按钮 */
+      submitForm() {
+        this.submitButtonEditStatus = true;
+        this.$refs["form"].validate(valid => {
+          if (valid) {
+            if (this.form.id != null) {
+              updateContact(this.form).then(response => {
+                this.$modal.msgSuccess("修改成功");
+                this.submitButtonEditStatus = false;
+                this.cancel();
+                this.$parent.handleCheck(this.customersId);
+              });
+            } else {
+              addContact(this.form).then(response => {
+                this.$modal.msgSuccess("新增成功");
+                this.submitButtonEditStatus = false;
+                this.cancel();
+                this.$parent.handleCheck(this.customersId);
+              });
+            }
+          } else {
+            this.submitButtonEditStatus = false;
+          }
+        });
+      },
+      additionalCondition() {
+        return {
+          parame: {
+            customer: this.form.customer ? this.form.customer : 'xxx'
+          }
+        }
+      },
+    }
+  };
+
+</script>

+ 5 - 4
src/views/business/spd/cm/customersDepartment/index.vue

@@ -5,7 +5,10 @@
       <el-row type="flex" class="row-bg" justify="space-around">
         <el-col :span="6">
           <el-form-item label="科室名称" prop="name">
-            <el-input v-model="form.name" placeholder="请输入科室名称" :disabled="disable" clearable />
+            <el-select v-model.trim="form.name" placeholder="请输入科室名称" :disabled="disable" clearable filterable>
+              <el-option v-for="dict in dict.type.mk_bo_section" :key="dict.value" :label="dict.label"
+                :value="dict.value"></el-option>
+            </el-select>
           </el-form-item>
         </el-col>
         <el-col :span="6">
@@ -77,6 +80,7 @@
   export default {
     name: "CustomersDepartment",
     props: ['pageStu', 'row', 'disable', 'customersId', 'customersName'],
+    dicts: ['mk_bo_section'],
     model: {
       prop: 'isAdd2',
       event: 'jugislist'
@@ -86,9 +90,6 @@
     },
     data() {
       return {
-        // 不能直接改变props传来的值
-        sonPageStu: this.pageStu,
-        sonDisable: this.disable,
         // 遮罩层
         loading: true,
         // 选中数组

+ 0 - 3
src/views/business/spd/cm/customersResponsiblePerson/index.vue

@@ -78,9 +78,6 @@
     },
     data() {
       return {
-        // 不能直接改变props传来的值
-        sonPageStu: this.pageStu,
-        sonDisable: this.disable,
         // 遮罩层
         loading: true,
         // 选中数组

+ 325 - 0
src/views/business/spd/cm/education/educationList.vue

@@ -0,0 +1,325 @@
+<template>
+  <div id="EducationList" class="app-container">
+    <el-row :gutter="10" class="mb8">
+      <el-col :span="1.5">
+        <el-button
+          type="primary"
+          plain
+          icon="el-icon-plus"
+          size="mini"
+          @click="handleAdd"
+        >新增</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="success"
+          plain
+          icon="el-icon-edit"
+          size="mini"
+          :disabled="single"
+          @click="handleUpdate"
+        >修改</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="danger"
+          plain
+          icon="el-icon-delete"
+          size="mini"
+          :disabled="multiple"
+          @click="handleDelete"
+        >删除</el-button>
+      </el-col>
+      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+    </el-row>
+
+    <el-table v-loading="loading" :data="educationList" @selection-change="handleSelectionChange">
+      <el-table-column type="selection" width="55" align="center" />
+      <el-table-column label="入学日期" align="center" prop="enrollDate" width="180">
+        <template slot-scope="scope">
+          <span>{{ parseTime(scope.row.enrollDate, '{y}-{m}-{d}') }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="毕业日期" align="center" prop="graduationDate" width="180">
+        <template slot-scope="scope">
+          <span>{{ parseTime(scope.row.graduationDate, '{y}-{m}-{d}') }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="学校名称" align="center" prop="school" />
+      <el-table-column label="专业名称" align="center" prop="majorName" />
+      <el-table-column label="学历" align="center" prop="education" >
+        <template slot-scope="scope">
+          <dict-tag :options="dict.type.mk_bo_education" :value="scope.row.education"/>
+        </template>
+      </el-table-column>
+      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
+        <template slot-scope="scope">
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-edit"
+            @click="handleUpdate(scope.row)"
+          >修改</el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-delete"
+            @click="handleDelete(scope.row)"
+          >删除</el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+    
+    <pagination
+      v-show="total>0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
+
+    <!-- 添加或修改联系人学历信息对话框 -->
+    <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
+      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
+        <!-- <el-form-item label="联系人ID" prop="contactId">
+          <el-input v-model="form.contactId" placeholder="请输入联系人ID" />
+        </el-form-item> -->
+        <el-form-item label="入学日期" prop="enrollDate">
+          <el-date-picker clearable
+            v-model="form.enrollDate"
+            type="date"
+            value-format="yyyy-MM-dd"
+            placeholder="请选择入学日期"
+            :picker-options="editStartOptions"
+            >
+          </el-date-picker>
+        </el-form-item>
+        <el-form-item label="毕业日期" prop="graduationDate">
+          <el-date-picker clearable
+            v-model="form.graduationDate"
+            type="date"
+            value-format="yyyy-MM-dd"
+            placeholder="请选择毕业日期"
+            :picker-options="editStopOptions"
+            >
+          </el-date-picker>
+        </el-form-item>
+        <el-form-item label="学校名称" prop="school">
+          <el-input v-model="form.school" placeholder="请输入学校名称" />
+        </el-form-item>
+        <el-form-item label="专业名称" prop="majorName">
+          <el-input v-model="form.majorName" placeholder="请输入专业名称" />
+        </el-form-item>
+        <el-form-item label="学历" prop="education">
+          <el-select v-model="form.education" placeholder="请输入学历">
+            <el-option
+              v-for="dict in dict.type.mk_bo_education"
+              :key="dict.value"
+              :label="dict.label"
+              :value="dict.value"
+            ></el-option>
+          </el-select>
+        </el-form-item>
+      </el-form>
+      <div slot="footer">
+        <el-button type="primary" @click="submitForm" :disabled="submitButtonEditStatus">确 定</el-button>
+        <el-button @click="cancel">取 消</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import { listEducation, getEducation, delEducation, addEducation, updateEducation }  from "@/api/business/spd/bo/education";
+
+export default {
+  name: "EducationList",
+  props:["supForm"],
+  dicts: ['mk_bo_education'],
+  data() {
+    return {
+      // 遮罩层
+      loading: true,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 联系人学历信息表格数据
+      educationList: [],
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        contactId: null,
+        createDate: null,
+        graduationDate: null,
+        enrollDate: null,
+        majorName: null,
+        education: null,
+        school: null,
+        code: null,
+      },
+      // 表单参数
+      form: {},
+      // 表单校验
+      rules: {
+        enrollDate: [
+          { required: true, message: "入学日期不能为空", trigger: ["blur", "change"] }
+        ],
+        graduationDate: [
+          { required: true, message: "毕业日期不能为空", trigger: ["blur", "change"] }
+        ],
+        school: [
+          { required: true, message: "学校名称不能为空", trigger: "blur" }
+        ],
+        education: [
+          { required: true, message: "学历不能为空", trigger: "blur" }
+        ],
+      },
+      editStartOptions: {
+        disabledDate: time => {
+          if (!this.form.graduationDate) {
+            return time.getTime() < new Date(1970 - 1 - 1).getTime();   //禁止选择1970年以前的日期
+          } else {
+            return time.getTime() > new Date(this.form.graduationDate);
+          }
+        }
+      },
+      editStopOptions: {
+        disabledDate: time => {
+          return (
+            time.getTime() < new Date(this.form.enrollDate) ||
+            time.getTime() < new Date(1970 - 1 - 1).getTime()    //禁止选择1970年以前的日期
+          );
+        }
+      },
+      //确定按钮是否可点
+      submitButtonEditStatus:false,
+    };
+  },
+  created() {
+    this.queryParams.contactId = this.supForm.id;
+    this.getList();
+  },
+  methods: {
+    /** 查询联系人学历信息列表 */
+    getList() {
+      this.loading = true;
+      listEducation(this.queryParams).then(response => {
+        this.educationList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+        contactId: null,
+        delFlag: null,
+        updateTime: null,
+        updateBy: null,
+        createDate: null,
+        createBy: null,
+        graduationDate: null,
+        enrollDate: null,
+        majorName: null,
+        education: null,
+        school: null,
+        code: null,
+        id: null
+      };
+      this.resetForm("form");
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.resetForm("queryForm");
+      this.handleQuery();
+    },
+    // 多选框选中数据
+    handleSelectionChange(selection) {
+      this.ids = selection.map(item => item.id)
+      this.single = selection.length!==1
+      this.multiple = !selection.length
+    },
+    /** 新增按钮操作 */
+    handleAdd() {
+      this.operatingState = "Insert";
+      this.reset();
+      this.form.contactId = this.supForm.id;
+      this.open = true;
+      this.title = "添加联系人学历信息";
+    },
+    /** 修改按钮操作 */
+    handleUpdate(row) {
+      this.reset();
+      const id = row.id || this.ids
+      getEducation(id).then(response => {
+        this.form = response.data;
+        this.open = true;
+        this.title = "修改联系人学历信息";
+      });
+    },
+    /** 提交按钮 */
+    submitForm() {
+      this.submitButtonEditStatus = true;
+      this.$refs["form"].validate(valid => {
+        if (valid) {
+          if (this.form.id != null) {
+            updateEducation(this.form).then(response => {
+              this.$modal.msgSuccess("修改成功");
+              this.open = false;
+              this.getList();
+              this.submitButtonEditStatus = false;
+            });
+          } else {
+            addEducation(this.form).then(response => {
+              this.$modal.msgSuccess("新增成功");
+              this.open = false;
+              this.getList();
+              this.submitButtonEditStatus = false;
+            });
+          }
+        }else{
+          this.submitButtonEditStatus = false;
+        }
+      });
+    },
+    /** 删除按钮操作 */
+    handleDelete(row) {
+      const ids = row.id || this.ids;
+      this.$modal.confirm('是否确认删除联系人学历信息编号为"' + ids + '"的数据项?').then(function() {
+        return delEducation(ids);
+      }).then(() => {
+        this.getList();
+        this.$modal.msgSuccess("删除成功");
+      }).catch(() => {});
+    },
+    /** 导出按钮操作 */
+    handleExport() {
+      this.download('system/education/export', {
+        ...this.queryParams
+      }, `education_${new Date().getTime()}.xlsx`)
+    }
+  }
+};
+</script>

+ 307 - 0
src/views/business/spd/cm/relationship/relationshipList.vue

@@ -0,0 +1,307 @@
+<template>
+  <div id="RelationshipList" class="app-container">
+    <el-row :gutter="10" class="mb8">
+      <el-col :span="1.5">
+        <el-button
+          type="primary"
+          plain
+          icon="el-icon-plus"
+          size="mini"
+          @click="handleAdd"
+        >新增</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="success"
+          plain
+          icon="el-icon-edit"
+          size="mini"
+          :disabled="single"
+          @click="handleUpdate"
+        >修改</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="danger"
+          plain
+          icon="el-icon-delete"
+          size="mini"
+          :disabled="multiple"
+          @click="handleDelete"
+        >删除</el-button>
+      </el-col>
+      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+    </el-row>
+
+    <el-table v-loading="loading" :data="relationshipList" @selection-change="handleSelectionChange">
+      <el-table-column type="selection" width="55" align="center" />
+      <el-table-column label="关系类型" align="center" prop="relationship" >
+        <template slot-scope="scope">
+          <dict-tag :options="dict.type.mk_bo_relationship" :value="scope.row.relationship"/>
+        </template>
+      </el-table-column>
+      <el-table-column label="姓名" align="center" prop="name" />
+      <el-table-column label="电话" align="center" prop="telephone" />
+      <el-table-column label="出生日期" align="center" prop="enrollDate" width="180">
+        <template slot-scope="scope">
+          <span>{{ parseTime(scope.row.enrollDate, '{y}-{m}-{d}') }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="就读学校" align="center" prop="school" />
+      <el-table-column label="工作单位" align="center" prop="company" />
+      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
+        <template slot-scope="scope">
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-edit"
+            @click="handleUpdate(scope.row)"
+          >修改</el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-delete"
+            @click="handleDelete(scope.row)"
+          >删除</el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+    
+    <pagination
+      v-show="total>0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
+
+    <!-- 添加或修改联系人社会关系对话框 -->
+    <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
+      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
+        <!-- <el-form-item label="联系人ID" prop="contactId">
+          <el-input v-model="form.contactId" placeholder="请输入联系人ID" />
+        </el-form-item> -->
+        <el-form-item label="关系类型" prop="relationship">
+          <el-select v-model="form.relationship" placeholder="请输入关系类型">
+            <el-option
+              v-for="dict in dict.type.mk_bo_relationship"
+              :key="dict.value"
+              :label="dict.label"
+              :value="dict.value"
+            ></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="姓名" prop="name">
+          <el-input v-model="form.name" placeholder="请输入姓名" />
+        </el-form-item>
+        <el-form-item label="电话" prop="telephone">
+          <el-input v-model="form.telephone" placeholder="请输入电话" />
+        </el-form-item>
+        <el-form-item label="出生日期" prop="enrollDate">
+          <el-date-picker clearable
+            v-model="form.enrollDate"
+            type="date"
+            value-format="yyyy-MM-dd"
+            placeholder="请选择出生日期">
+          </el-date-picker>
+        </el-form-item>
+        <el-form-item label="就读学校" prop="school">
+          <el-input v-model="form.school" placeholder="请输入就读学校" />
+        </el-form-item>
+        <el-form-item label="工作单位" prop="company">
+          <el-input v-model="form.company" placeholder="请输入工作单位" />
+        </el-form-item>
+      </el-form>
+      <div slot="footer">
+        <el-button type="primary" @click="submitForm" :disabled="submitButtonEditStatus">确 定</el-button>
+        <el-button @click="cancel">取 消</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import { listRelationship, getRelationship, delRelationship, addRelationship, updateRelationship } from "@/api/business/spd/bo/relationship";
+
+export default {
+  name: "RelationshipList",
+  props:["supForm"],
+  dicts: ['mk_bo_relationship'],
+  data() {
+    return {
+      // 遮罩层
+      loading: true,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 联系人社会关系表格数据
+      relationshipList: [],
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        contactId: null,
+        company: null,
+        school: null,
+        enrollDate: null,
+        telephone: null,
+        name: null,
+        relationship: null,
+        code: null,
+      },
+      // 表单参数
+      form: {},
+      // 表单校验
+      rules: {
+        relationship: [
+          { required: true, message: "关系类型不能为空", trigger: "blur" }
+        ],
+        name: [
+          { required: true, message: "姓名不能为空", trigger: "blur" }
+        ],
+        telephone: [
+          { required: true, message: "电话不能为空", trigger: "blur" },
+          {
+            validator: function(rule, value, callback) {
+              if (/^1[34578]\d{9}$/.test(value) == false) {
+                callback(new Error("手机号格式错误"));
+              } else {
+                callback();
+              }
+            },
+            trigger: "blur"
+          }
+        ],
+      },
+      //确定按钮是否可点
+      submitButtonEditStatus:false,
+    };
+  },
+  created() {
+    this.queryParams.contactId = this.supForm.id;
+    this.getList();
+  },
+  methods: {
+    /** 查询联系人社会关系列表 */
+    getList() {
+      this.loading = true;
+      listRelationship(this.queryParams).then(response => {
+        this.relationshipList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+        contactId: null,
+        delFlag: null,
+        updateTime: null,
+        updateBy: null,
+        createTime: null,
+        createBy: null,
+        company: null,
+        school: null,
+        enrollDate: null,
+        telephone: null,
+        name: null,
+        relationship: null,
+        code: null,
+        id: null
+      };
+      this.resetForm("form");
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.resetForm("queryForm");
+      this.handleQuery();
+    },
+    // 多选框选中数据
+    handleSelectionChange(selection) {
+      this.ids = selection.map(item => item.id)
+      this.single = selection.length!==1
+      this.multiple = !selection.length
+    },
+    /** 新增按钮操作 */
+    handleAdd() {
+      this.operatingState = "Insert";
+      this.reset();
+      this.form.contactId = this.supForm.id;
+      this.open = true;
+      this.title = "添加联系人社会关系";
+    },
+    /** 修改按钮操作 */
+    handleUpdate(row) {
+      this.reset();
+      const id = row.id || this.ids
+      getRelationship(id).then(response => {
+        this.form = response.data;
+        this.open = true;
+        this.title = "修改联系人社会关系";
+      });
+    },
+    /** 提交按钮 */
+    submitForm() {
+      this.submitButtonEditStatus = true;
+      this.$refs["form"].validate(valid => {
+        if (valid) {
+          if (this.form.id != null) {
+            updateRelationship(this.form).then(response => {
+              this.$modal.msgSuccess("修改成功");
+              this.open = false;
+              this.getList();
+              this.submitButtonEditStatus = false;
+            });
+          } else {
+            addRelationship(this.form).then(response => {
+              this.$modal.msgSuccess("新增成功");
+              this.open = false;
+              this.getList();
+              this.submitButtonEditStatus = false;
+            });
+          }
+        }else{
+          this.submitButtonEditStatus = false;
+        }
+      });
+    },
+    /** 删除按钮操作 */
+    handleDelete(row) {
+      const ids = row.id || this.ids;
+      this.$modal.confirm('是否确认删除联系人社会关系编号为"' + ids + '"的数据项?').then(function() {
+        return delRelationship(ids);
+      }).then(() => {
+        this.getList();
+        this.$modal.msgSuccess("删除成功");
+      }).catch(() => {});
+    },
+    /** 导出按钮操作 */
+    handleExport() {
+      this.download('system/relationship/export', {
+        ...this.queryParams
+      }, `relationship_${new Date().getTime()}.xlsx`)
+    }
+  }
+};
+</script>

+ 1 - 1
src/views/business/spd/target/MonthSaleGoal.vue

@@ -334,7 +334,7 @@
                 </el-table-column>
                 <el-table-column label="科室" align="center" prop="department" min-width="200">
                   <template slot-scope="scope">
-                    <el-select v-model="monthSaleGoalDetailsList[scope.$index].department" placeholder="请选择科室">
+                    <el-select v-model.trim="monthSaleGoalDetailsList[scope.$index].department" placeholder="请选择科室" filterable>
                       <el-option v-for="dict in dict.type.mk_bo_section" :key="dict.value" :label="dict.label" :value="dict.value"></el-option>
                     </el-select>
                   </template>

+ 1 - 1
src/views/business/spd/target/targetMk/item.vue

@@ -30,7 +30,7 @@
               />
               <el-popover-tree-select 
                 size="mini" 
-                v-else-if="scope.row[head.prop].model == 'MATERIALCLASSIFY_PARAM'"
+                v-else-if="scope.row[head.prop].model == 'MATERIALCLASSIFY_PARAM' || scope.row[head.prop].model == 'PROFITCENTER'"
                 v-model="scope.row[head.prop].valueName" 
                 valueKey='name'
                 title="参照选择" 

+ 1 - 1
src/views/material/classify/index.vue

@@ -304,7 +304,7 @@ export default {
         }]
       },{
         id: 10,
-        label: "设备产线"
+        label: "设备产线"
       }],
     };
   },