Browse Source

Merge branch 'dev' into 'purchaseDev'

Dev20231227

See merge request new-business/drp-web!632
李园 1 year ago
parent
commit
b591b70df4

+ 23 - 0
src/api/business/ehr/wxworklogin.js

@@ -0,0 +1,23 @@
+import request from "@/utils/request";
+
+//查询企业微信用户信息
+export function getWxworkUser_ehrpm(code) {
+  return request({
+    url: '/wxwork/ehrpm/getInfo/' + code,
+	headers: {
+	  isToken: false
+	},
+    method: 'get'
+  })
+}
+
+//根据手机号获取DRP用户信息
+export function getDrpUser(staffCode) {
+  return request({
+    'url': '/login/ehr/' + staffCode,
+    headers: {
+      isToken: false
+    },
+    'method': 'get',
+  })
+}

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

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

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

@@ -224,6 +224,33 @@ export default {
       const { referName } = this.$props;
       const { referName } = this.$props;
       this.$emit("copyChange", this.innerValue.split(/,|,|\s+/));
       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() {
     handleClear() {
       this.innerValue = "";
       this.innerValue = "";
     },
     },
@@ -255,7 +282,9 @@ export default {
       v-model="innerValue"
       v-model="innerValue"
       :value-key="valueKey"
       :value-key="valueKey"
       :fetch-suggestions="useAutocomplete"
       :fetch-suggestions="useAutocomplete"
+      @blur="useBlur"
       @select="useConfirm([$event])"
       @select="useConfirm([$event])"
+      @keyup.delete.native="handleKeyupDel"
       style="width: 100%"
       style="width: 100%"
     >
     >
       <i class="el-icon-search" slot="suffix" @click="open"> </i>
       <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;
       const { type, source } = this.$props;
       this.$emit("copyChange", this.innerValue.split(/,|,|\s+/));
       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() {},
   created() {},
   mounted() {},
   mounted() {},
@@ -326,10 +354,12 @@ export default {
       v-bind="$attrs"
       v-bind="$attrs"
       v-model="innerValue"
       v-model="innerValue"
       :size="size"
       :size="size"
+      :disabled="disabled"
       :value-key="valueKey"
       :value-key="valueKey"
       :fetch-suggestions="useAutocomplete"
       :fetch-suggestions="useAutocomplete"
+      @blur="useBlur"
       @select="useConfirm([$event])"
       @select="useConfirm([$event])"
-      :disabled="disabled"
+      @keyup.delete.native="handleKeyupDel"
       style="width: 100%"
       style="width: 100%"
     >
     >
       <i :size="size" class="el-icon-search" slot="suffix" @click="open"> </i>
       <i :size="size" class="el-icon-search" slot="suffix" @click="open"> </i>

+ 1 - 1
src/permission.js

@@ -8,7 +8,7 @@ import { isRelogin } from '@/utils/request'
 
 
 NProgress.configure({ showSpinner: false })
 NProgress.configure({ showSpinner: false })
 
 
-const whiteList = ['/login', '/register', '/test01', '/ehrentrance', '/canteenAddFood', '/canteenAddMenu', '/menuScreen', '/foodScreen','/business/wms/historical-route']
+const whiteList = ['/login', '/register', '/test01', '/ehrentrance','/business/ehr/ehrpm-entrance','/canteenAddFood', '/canteenAddMenu', '/menuScreen', '/foodScreen','/business/wms/historical-route']
 
 
 router.beforeEach((to, from, next) => {
 router.beforeEach((to, from, next) => {
   NProgress.start()
   NProgress.start()

+ 5 - 0
src/router/index.js

@@ -62,6 +62,11 @@ export const constantRoutes = [
     hidden: true
     hidden: true
   },
   },
   {
   {
+    path: '/business/ehr/ehrpm-entrance',
+    component: () => import('@/views/business/ehr/ehrpm-entrance'),
+    hidden: true
+  },
+  {
     path: '/canteenAddFood',
     path: '/canteenAddFood',
     component: () => import('@/views/canteen/addFood'),
     component: () => import('@/views/canteen/addFood'),
     hidden: true
     hidden: true

+ 36 - 0
src/views/business/ehr/ehrpm-entrance.vue

@@ -0,0 +1,36 @@
+<template>
+	<div>
+		正在前往DRP绩效...
+	</div>
+</template>
+<script>
+	import {getWxworkUser_ehrpm,getDrpUser} from "@/api/business/ehr/wxworklogin";
+	import {setToken} from '@/utils/auth'
+	export default {
+		data() {
+			return {
+			}
+		},
+		methods: {
+		},
+		async created() {
+			let query = this.$route.query;
+			console.log("query",query);
+			let res = await getWxworkUser_ehrpm(query.code);
+			console.log("res",res);
+			if(res.code == '200'){
+				let staffCode = res.data.userid;
+				let dres = await getDrpUser(staffCode);
+				if (dres.code === 200) {
+					let token = dres.token
+					setToken(token)
+					this.$store.commit('SET_TOKEN', token)
+					this.$store.dispatch("GetInfo").then(() => {})
+					this.$store.dispatch("GenerateRoutes").then(
+						this.$router.push({ path: '/business/ehr/pm/myPm' }).catch(()=>{})
+					)
+				}
+			}
+		}
+	}
+</script>

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

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

+ 94 - 5
src/views/business/spd/cm/customers/index.vue

@@ -1,6 +1,6 @@
 <template>
 <template>
   <div id="Customers" class="app-container">
   <div id="Customers" class="app-container">
-    <div v-if="!isAdd1 && !isAdd2">
+    <div v-if="!isAdd0 && !isAdd1 && !isAdd2">
       <div v-if="isList">
       <div v-if="isList">
         <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch"
         <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch"
           label-width="68px">
           label-width="68px">
@@ -77,6 +77,7 @@
 
 
         <el-table v-loading="loading" :data="customersList" @selection-change="handleSelectionChange">
         <el-table v-loading="loading" :data="customersList" @selection-change="handleSelectionChange">
           <el-table-column type="selection" width="55" align="center" />
           <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="orgName" min-width="300" />
           <el-table-column label="客户编码" align="center" prop="code" min-width="100" />
           <el-table-column label="客户编码" align="center" prop="code" min-width="100" />
           <el-table-column label="客户名称" align="center" prop="name" min-width="200" />
           <el-table-column label="客户名称" align="center" prop="name" min-width="200" />
@@ -366,11 +367,47 @@
               </el-tab-pane>
               </el-tab-pane>
 
 
               <el-tab-pane label="联系人信息" name="third" v-if="openState == 'check'">
               <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="handleDeleteMkCmCustomersContact">
+                      删除
+                    </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="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>
                 </el-table>
               </el-tab-pane>
               </el-tab-pane>
 
 
@@ -391,6 +428,7 @@
                   @selection-change="handleMkCmCustomersResponsiblePersonSelectionChange"
                   @selection-change="handleMkCmCustomersResponsiblePersonSelectionChange"
                   ref="mkCmCustomersResponsiblePerson">
                   ref="mkCmCustomersResponsiblePerson">
                   <el-table-column type="selection" width="55" align="center" />
                   <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="personName" min-width="150" />
                   <el-table-column label="客户名称" align="center" prop="customersName" 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"
                   <el-table-column label="关系类型" align="center" prop="relationshipType" min-width="150"
@@ -439,6 +477,7 @@
                 <el-table :data="mkCmCustomersDepartmentList" :row-class-name="rowMkCmCustomersDepartmentIndex"
                 <el-table :data="mkCmCustomersDepartmentList" :row-class-name="rowMkCmCustomersDepartmentIndex"
                   @selection-change="handleMkCmCustomersDepartmentSelectionChange" ref="mkCmCustomersDepartment">
                   @selection-change="handleMkCmCustomersDepartmentSelectionChange" ref="mkCmCustomersDepartment">
                   <el-table-column type="selection" width="55" align="center" />
                   <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="name" min-width="150" />
                   <el-table-column label="科室名称" align="center" prop="name" min-width="150" />
                   <el-table-column label="客户名称" align="center" prop="customersName" min-width="150" />
                   <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="responsiblePersonName" min-width="150" />
@@ -471,6 +510,8 @@
         </el-form>
         </el-form>
       </div>
       </div>
     </div>
     </div>
+    <AddContact v-model="isAdd0" v-if="isAdd0" :operatingState="operatingSta" :state="state" :customersId="form.id"
+      :customersName="form.name" />
 
 
     <AddPerson v-model="isAdd1" v-if="isAdd1" :pageStu="page" :disable="disable" :row="rowDetail" :customersId="form.id"
     <AddPerson v-model="isAdd1" v-if="isAdd1" :pageStu="page" :disable="disable" :row="rowDetail" :customersId="form.id"
       :customersName="form.name" />
       :customersName="form.name" />
@@ -489,6 +530,7 @@
     addCustomers,
     addCustomers,
     updateCustomers,
     updateCustomers,
     getContactInfo,
     getContactInfo,
+    delContact,
   } from "@/api/business/spd/cm/customers";
   } from "@/api/business/spd/cm/customers";
   // 客户负责人接口
   // 客户负责人接口
   import {
   import {
@@ -501,6 +543,8 @@
   import CollapseTransition from '@/components/MyCollapse/collapse.vue';
   import CollapseTransition from '@/components/MyCollapse/collapse.vue';
   // 参照弹出框
   // 参照弹出框
   import ElPopoverSelectV2 from "@/components/popover-select-v2";
   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";
   import AddPerson from "@/views/business/spd/cm/customersResponsiblePerson/index.vue";
   // 新建客户科室信息页面
   // 新建客户科室信息页面
@@ -511,6 +555,7 @@
     components: {
     components: {
       CollapseTransition,
       CollapseTransition,
       ElPopoverSelectV2,
       ElPopoverSelectV2,
+      AddContact,
       AddPerson,
       AddPerson,
       AddDepartment,
       AddDepartment,
     },
     },
@@ -527,9 +572,11 @@
         // 选中数组中的客户编码
         // 选中数组中的客户编码
         codes: [],
         codes: [],
         // 子表选中数据
         // 子表选中数据
+        checkedMkCmCustomersContact: [],
         checkedMkCmCustomersResponsiblePerson: [],
         checkedMkCmCustomersResponsiblePerson: [],
         checkedMkCmCustomersDepartment: [],
         checkedMkCmCustomersDepartment: [],
         // 子表选中主键
         // 子表选中主键
+        checkedMkCmCustomersContactIds: [],
         checkedMkCmCustomersResponsiblePersonIds: [],
         checkedMkCmCustomersResponsiblePersonIds: [],
         checkedMkCmCustomersDepartmentIds: [],
         checkedMkCmCustomersDepartmentIds: [],
         // 非单个禁用
         // 非单个禁用
@@ -557,6 +604,9 @@
         // 列表页面
         // 列表页面
         isList: true,
         isList: true,
         // 添加页面
         // 添加页面
+        isAdd0: false,
+        operatingSta: null,
+        state: null,
         isAdd1: false,
         isAdd1: false,
         isAdd2: false,
         isAdd2: false,
         rowDetail: {},
         rowDetail: {},
@@ -702,6 +752,7 @@
           delFlag: null
           delFlag: null
         };
         };
         this.activeName = 'first';
         this.activeName = 'first';
+        this.mkCmCustomersContactList = [];
         this.mkCmCustomersResponsiblePersonList = [];
         this.mkCmCustomersResponsiblePersonList = [];
         this.mkCmCustomersDepartmentList = [];
         this.mkCmCustomersDepartmentList = [];
         this.resetForm("form");
         this.resetForm("form");
@@ -884,6 +935,13 @@
           }).catch(() => {});
           }).catch(() => {});
         }
         }
       },
       },
+      /** 客户联系人序号 */
+      rowMkCmCustomersContactIndex({
+        row,
+        rowIndex
+      }) {
+        row.index = rowIndex + 1;
+      },
       /** 客户负责人序号 */
       /** 客户负责人序号 */
       rowMkCmCustomersResponsiblePersonIndex({
       rowMkCmCustomersResponsiblePersonIndex({
         row,
         row,
@@ -898,6 +956,14 @@
       }) {
       }) {
         row.index = rowIndex + 1;
         row.index = rowIndex + 1;
       },
       },
+      /** 客户联系人添加按钮操作 */
+      handleAddMkCmCustomersContact() {
+        this.isList = false;
+        this.isAdd0 = true;
+        this.operatingSta = 'Insert';
+        this.disable = false;
+        this.state = '1';
+      },
       /** 客户负责人添加按钮操作 */
       /** 客户负责人添加按钮操作 */
       handleAddMkCmCustomersResponsiblePerson() {
       handleAddMkCmCustomersResponsiblePerson() {
         this.isList = false;
         this.isList = false;
@@ -912,6 +978,24 @@
         this.page = 'add';
         this.page = 'add';
         this.disable = false;
         this.disable = false;
       },
       },
+      /** 客户联系人删除按钮操作 */
+      handleDeleteMkCmCustomersContact() {
+        let that = this;
+        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');
+          });
+        }
+      },
       /** 客户负责人删除按钮操作 */
       /** 客户负责人删除按钮操作 */
       handleDeleteMkCmCustomersResponsiblePerson() {
       handleDeleteMkCmCustomersResponsiblePerson() {
         if (this.checkedMkCmCustomersResponsiblePerson.length == 0) {
         if (this.checkedMkCmCustomersResponsiblePerson.length == 0) {
@@ -943,6 +1027,11 @@
         }
         }
       },
       },
       /** 复选框选中数据 */
       /** 复选框选中数据 */
+      handleMkCmCustomersContactSelectionChange(selection) {
+        this.checkedMkCmCustomersContact = selection.map(item => item.index)
+        this.checkedMkCmCustomersContactIds = selection.map(item => item.id)
+      },
+      /** 复选框选中数据 */
       handleMkCmCustomersResponsiblePersonSelectionChange(selection) {
       handleMkCmCustomersResponsiblePersonSelectionChange(selection) {
         this.checkedMkCmCustomersResponsiblePerson = selection.map(item => item.index)
         this.checkedMkCmCustomersResponsiblePerson = selection.map(item => item.index)
         this.checkedMkCmCustomersResponsiblePersonIds = selection.map(item => item.id)
         this.checkedMkCmCustomersResponsiblePersonIds = selection.map(item => item.id)

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

@@ -0,0 +1,476 @@
+<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.form" />
+        </el-tab-pane>
+        <el-tab-pane label="社会关系" name="second">
+          <RelationshipList :key="timer" :supForm="this.form" />
+        </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() {},
+    methods: {
+      /** 查询联系人管理列表 */
+      getList() {
+        this.loading = true;
+        listContact(this.queryParams).then(response => {
+          this.contactList = response.rows;
+          this.total = response.total;
+          this.loading = false;
+        });
+      },
+      // 取消按钮
+      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");
+      },
+      /** 新增按钮操作 */
+      handleAdd() {
+        this.operatingState = "Insert";
+        this.reset();
+        this.form.state = '1';
+      },
+      /** 修改按钮操作 */
+      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;
+          }
+        });
+      },
+      /** 删除按钮操作 */
+      handleDelete(row) {
+        const ids = []
+        ids = row.id || this.ids;
+        this.$modal.confirm('是否确认删除联系人管理编号为"' + ids + '"的数据项?').then(function () {
+          return delContact(ids);
+        }).then(() => {
+          this.$modal.msgSuccess("删除成功");
+        }).catch(() => {});
+      },
+      additionalCondition() {
+        return {
+          parame: {
+            customer: this.form.customer ? this.form.customer : 'xxx'
+          }
+        }
+      },
+    }
+  };
+
+</script>

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

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

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

@@ -78,9 +78,6 @@
     },
     },
     data() {
     data() {
       return {
       return {
-        // 不能直接改变props传来的值
-        sonPageStu: this.pageStu,
-        sonDisable: this.disable,
         // 遮罩层
         // 遮罩层
         loading: true,
         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>
                 <el-table-column label="科室" align="center" prop="department" min-width="200">
                 <el-table-column label="科室" align="center" prop="department" min-width="200">
                   <template slot-scope="scope">
                   <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-option v-for="dict in dict.type.mk_bo_section" :key="dict.value" :label="dict.label" :value="dict.value"></el-option>
                     </el-select>
                     </el-select>
                   </template>
                   </template>

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

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

+ 3 - 2
src/views/purchase/DemandSummary/index.vue

@@ -1402,16 +1402,17 @@ export default {
       this.getList(this.queryParams);
       this.getList(this.queryParams);
     },
     },
     saveList() {
     saveList() {
-      // console.log('记录',this.record)
+      // console.log("记录", this.record);
       // 对记录的数据进行去重
       // 对记录的数据进行去重
       let newRecord = Array.from(new Set(this.record));
       let newRecord = Array.from(new Set(this.record));
-      // console.log('去重后的', newRecord)
+      // console.log("去重后的", newRecord);
       let changeList = newRecord.map((i) => {
       let changeList = newRecord.map((i) => {
         return this.tableList[i];
         return this.tableList[i];
       });
       });
       // console.log('shuzu', changeList)
       // console.log('shuzu', changeList)
       editSummaryList(changeList).then((res) => {
       editSummaryList(changeList).then((res) => {
         if (res.code === 200) {
         if (res.code === 200) {
+          this.record = [];
           this.$modal.notifySuccess("保存成功");
           this.$modal.notifySuccess("保存成功");
           this.lineDisable = true;
           this.lineDisable = true;
           this.getList(this.queryParams);
           this.getList(this.queryParams);