form.vue 29 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945
  1. <template>
  2. <div class="form">
  3. <div class="description-title">
  4. <span>基本信息</span>
  5. </div>
  6. <el-form :model="form" :rules="rules" ref="ruleForm" label-width="0px">
  7. <div class="description-view">
  8. <table class="description-table">
  9. <tbody>
  10. <tr class="description-tr">
  11. <th class="description-label">
  12. <i class="requiredStar">*</i>姓名
  13. </th>
  14. <td class="description-content">
  15. <el-form-item
  16. prop="realName"
  17. :rules="[
  18. { required: true, message: '请输入姓名', trigger: 'blur' },
  19. ]"
  20. >
  21. <el-input
  22. v-model="form.realName"
  23. placeholder="请输入姓名"
  24. />
  25. </el-form-item>
  26. </td>
  27. <th class="description-label">年龄</th>
  28. <td class="description-content">
  29. <el-form-item prop="age">
  30. <el-input
  31. v-model="form.age"
  32. type="number"
  33. min="1"
  34. step="1"
  35. placeholder="请输入年龄"
  36. />
  37. </el-form-item>
  38. </td>
  39. <th class="description-label">性别</th>
  40. <td class="description-content">
  41. <el-form-item prop="gender">
  42. <el-select
  43. v-model.trim="form.gender"
  44. clearable
  45. filterable
  46. placeholder="请选择性别"
  47. >
  48. <el-option label="男" :value="true"></el-option>
  49. <el-option label="女" :value="false"></el-option>
  50. </el-select>
  51. </el-form-item>
  52. </td>
  53. </tr>
  54. <tr class="description-tr">
  55. <th class="description-label">
  56. <i class="requiredStar">*</i>手机号
  57. </th>
  58. <td class="description-content">
  59. <el-form-item
  60. prop="mobileNo"
  61. :rules="[
  62. {
  63. required: true,
  64. message: '请输入手机号',
  65. trigger: 'blur',
  66. },
  67. {
  68. pattern: /^1\d{10}$/,
  69. message: '请输入正确的手机号',
  70. trigger: 'blur',
  71. },
  72. ]"
  73. >
  74. <el-input
  75. minlength="11"
  76. maxlength="11"
  77. v-model="form.mobileNo"
  78. placeholder="请输入手机号"
  79. type="tel"
  80. />
  81. <!-- @blur="mobileOrWechatValidate" -->
  82. </el-form-item>
  83. </td>
  84. <th class="description-label">微信号</th>
  85. <td class="description-content">
  86. <el-form-item prop="wechatNo">
  87. <el-input
  88. v-model="form.wechatNo"
  89. placeholder="请输入微信号"
  90. />
  91. </el-form-item>
  92. </td>
  93. <th class="description-label">身份证号</th>
  94. <td class="description-content">
  95. <el-form-item prop="idCard">
  96. <el-input
  97. v-model="form.idCard"
  98. placeholder="请输入身份证号"
  99. />
  100. </el-form-item>
  101. </td>
  102. </tr>
  103. </tbody>
  104. </table>
  105. </div>
  106. <div class="description-title" style="margin-top: 20px">
  107. <span>教育信息</span>
  108. </div>
  109. <div class="description-view">
  110. <table class="description-table">
  111. <tbody>
  112. <tr
  113. class="description-tr"
  114. v-for="(item, index) in form.educations"
  115. :key="index"
  116. >
  117. <th class="description-label desc-item">
  118. <span class="close">
  119. <i
  120. v-if="index === 0"
  121. @click="addEducation"
  122. class="el-icon-circle-plus-outline"
  123. />
  124. <i
  125. v-else
  126. @click="removeEducation(index)"
  127. class="el-icon-remove-outline"
  128. /> </span
  129. >学历
  130. </th>
  131. <td class="description-content">
  132. <el-form-item :prop="'educations.' + index + '.level'">
  133. <el-input
  134. v-model="form.educations[index].level"
  135. placeholder="请输入学历"
  136. />
  137. </el-form-item>
  138. </td>
  139. <th class="description-label">学校</th>
  140. <td class="description-content">
  141. <el-form-item :prop="'educations.' + index + '.school'">
  142. <el-input
  143. v-model="form.educations[index].school"
  144. placeholder="请输入学校"
  145. />
  146. </el-form-item>
  147. </td>
  148. <th class="description-label">专业</th>
  149. <td class="description-content">
  150. <el-form-item :prop="'educations.' + index + '.subject'">
  151. <el-input
  152. v-model="form.educations[index].subject"
  153. placeholder="请输入专业"
  154. />
  155. </el-form-item>
  156. </td>
  157. <th class="description-label">毕业时间</th>
  158. <td class="description-content">
  159. <el-form-item :prop="'educations.' + index + '.year'">
  160. <el-date-picker
  161. type="month"
  162. placeholder="请选择毕业时间"
  163. v-model="form.educations[index].year"
  164. />
  165. </el-form-item>
  166. </td>
  167. </tr>
  168. </tbody>
  169. </table>
  170. </div>
  171. <div class="description-title" style="margin-top: 20px">
  172. <span>招聘信息</span>
  173. </div>
  174. <div class="description-view">
  175. <table class="description-table">
  176. <tbody>
  177. <tr class="description-tr">
  178. <th class="description-label">所在城市</th>
  179. <td class="description-content">
  180. <el-form-item prop="liveCity">
  181. <el-input
  182. v-model.trim="form.liveCity"
  183. placeholder="请输入所在城市"
  184. />
  185. </el-form-item>
  186. </td>
  187. <th class="description-label">意向城市</th>
  188. <td class="description-content">
  189. <el-form-item prop="intentionCity">
  190. <el-input
  191. v-model.trim="form.intentionCity"
  192. placeholder="请输入意向城市"
  193. />
  194. </el-form-item>
  195. </td>
  196. <th class="description-label">意向合作模式</th>
  197. <td class="description-content">
  198. <el-form-item prop="jobNature">
  199. <el-select
  200. v-model.trim="form.jobNature"
  201. clearable
  202. filterable
  203. placeholder="请选择意向合作模式"
  204. >
  205. <el-option label="兼职" value="PART_TIME"></el-option>
  206. <el-option label="全职" value="FULL_TIME"></el-option>
  207. </el-select>
  208. </el-form-item>
  209. </td>
  210. </tr>
  211. <tr class="description-tr">
  212. <th class="description-label">岗位类别</th>
  213. <td class="description-content">
  214. <el-form-item prop="jobType">
  215. <el-select
  216. v-model.trim="form.jobType"
  217. clearable
  218. filterable
  219. placeholder="请选择岗位类别"
  220. >
  221. <el-option label="指导老师" value="ADVISER"></el-option>
  222. <el-option label="乐团主管" value="ACADEMIC"></el-option>
  223. <el-option label="乐队指导" value="TEACHING"></el-option>
  224. </el-select>
  225. </el-form-item>
  226. </td>
  227. <th class="description-label">声部</th>
  228. <td class="description-content" colspan="3">
  229. <el-form-item prop="subjectIdList">
  230. <el-select
  231. v-model.trim="form.subjectIdList"
  232. clearable
  233. filterable
  234. multiple
  235. collapse-tags
  236. placeholder="请选择声部"
  237. >
  238. <el-option
  239. v-for="(item, index) in subjectList"
  240. :key="index"
  241. :value="String(item.id)"
  242. :label="item.name"
  243. >
  244. </el-option>
  245. </el-select>
  246. </el-form-item>
  247. </td>
  248. </tr>
  249. <tr class="description-tr">
  250. <th class="description-label">信息来源</th>
  251. <td class="description-content">
  252. <el-form-item prop="sourceFrom">
  253. <el-select
  254. v-model.trim="form.sourceFrom"
  255. clearable
  256. filterable
  257. placeholder="请选择信息来源"
  258. >
  259. <el-option label="BOSS" value="BOSS"></el-option>
  260. <el-option label="转介绍" value="转介绍"></el-option>
  261. <el-option label="其它" value="其它"></el-option>
  262. </el-select>
  263. </el-form-item>
  264. </td>
  265. <th class="description-label">人员状态</th>
  266. <td class="description-content">
  267. <el-form-item prop="status">
  268. <el-select
  269. v-model.trim="form.status"
  270. clearable
  271. filterable
  272. placeholder="请选择人员状态"
  273. >
  274. <el-option label="未录用" value="NOT_EMPLOYED"></el-option>
  275. <el-option label="面试中" value="INTERVIEWING"></el-option>
  276. <el-option label="储备" value="RESERVE"></el-option>
  277. <el-option label="兼职" value="PART_TIME"></el-option>
  278. <el-option label="全职" value="FULL_TIME"></el-option>
  279. <el-option label="离职" value="DIMISSION"></el-option>
  280. <el-option label="黑名单" value="BLACK_LIST"></el-option>
  281. </el-select>
  282. </el-form-item>
  283. </td>
  284. <th class="description-label">HRBP</th>
  285. <td class="description-content">
  286. <el-form-item prop="hrbp">
  287. <el-select
  288. v-model.trim="form.hrbp"
  289. clearable
  290. filterable
  291. placeholder="请选择HRBP"
  292. >
  293. <el-option
  294. v-for="(item, index) in roleList"
  295. :key="index"
  296. :value="String(item.userId)"
  297. :label="item.userName"
  298. >
  299. </el-option>
  300. </el-select>
  301. </el-form-item>
  302. </td>
  303. </tr>
  304. </tbody>
  305. </table>
  306. </div>
  307. <div class="description-title" style="margin-top: 20px">
  308. <span>在职信息</span>
  309. </div>
  310. <div class="description-view">
  311. <table class="description-table">
  312. <tbody>
  313. <tr class="description-tr">
  314. <th class="description-label">入职日期</th>
  315. <td class="description-content">
  316. <el-form-item prop="entryDate">
  317. <el-date-picker
  318. type="date"
  319. placeholder="选择入职日期"
  320. v-model="form.entryDate"
  321. />
  322. </el-form-item>
  323. </td>
  324. <th class="description-label">离职日期</th>
  325. <td class="description-content">
  326. <el-form-item prop="resignationDate">
  327. <el-date-picker
  328. type="date"
  329. placeholder="选择离职日期"
  330. v-model="form.resignationDate"
  331. />
  332. </el-form-item>
  333. </td>
  334. <th class="description-label">离职原因</th>
  335. <td class="description-content">
  336. <el-form-item prop="resignationReason">
  337. <el-input
  338. v-model.trim="form.resignationReason"
  339. placeholder="请输入离职原因"
  340. />
  341. </el-form-item>
  342. </td>
  343. </tr>
  344. <tr class="description-tr">
  345. <th class="description-label">分部</th>
  346. <td class="description-content">
  347. <el-form-item prop="organId">
  348. <el-select
  349. v-model.trim="form.organId"
  350. placeholder="请选择分部"
  351. clearable
  352. filterable
  353. >
  354. <el-option
  355. v-for="(item, index) in organList"
  356. :key="index"
  357. :value="item.id"
  358. :label="item.name"
  359. >
  360. </el-option>
  361. </el-select>
  362. </el-form-item>
  363. </td>
  364. <th class="description-label">职位</th>
  365. <td class="description-content">
  366. <el-form-item prop="position">
  367. <el-select
  368. v-model.trim="form.position"
  369. clearable
  370. filterable
  371. placeholder="请选择职位"
  372. >
  373. <el-option label="指导老师" value="ADVISER"></el-option>
  374. <el-option label="乐团主管" value="ACADEMIC"></el-option>
  375. <el-option label="乐队指导" value="TEACHING"></el-option>
  376. </el-select>
  377. </el-form-item>
  378. </td>
  379. <th class="description-label">声部</th>
  380. <td class="description-content">
  381. <el-form-item prop="jobSubjectIdList">
  382. <el-select
  383. v-model.trim="form.jobSubjectIdList"
  384. clearable
  385. filterable
  386. multiple
  387. collapse-tags
  388. placeholder="请选择声部"
  389. >
  390. <el-option
  391. v-for="(item, index) in subjectList"
  392. :key="index"
  393. :value="String(item.id)"
  394. :label="item.name"
  395. >
  396. </el-option>
  397. </el-select>
  398. </el-form-item>
  399. </td>
  400. </tr>
  401. <tr class="description-tr">
  402. <th class="description-label">紧急联系人姓名</th>
  403. <td class="description-content">
  404. <el-form-item prop="emergencyContactName">
  405. <el-input
  406. v-model.trim="form.emergencyContactName"
  407. placeholder="请输入紧急联系人姓名"
  408. />
  409. </el-form-item>
  410. </td>
  411. <th class="description-label">紧急联系人关系</th>
  412. <td class="description-content">
  413. <el-form-item
  414. prop="emergencyContactRelation"
  415. :rules="{
  416. required: propRequred,
  417. message: '请输入紧急联系人关系',
  418. trigger: 'blur',
  419. }"
  420. >
  421. <el-input
  422. v-model.trim="form.emergencyContactRelation"
  423. placeholder="请输入紧急联系人关系"
  424. />
  425. </el-form-item>
  426. </td>
  427. <th class="description-label">紧急联系人电话</th>
  428. <td class="description-content">
  429. <el-form-item
  430. prop="emergencyContactPhone"
  431. :rules="[
  432. {
  433. min: 11,
  434. max: 11,
  435. message: '请输入正确的手机号码',
  436. trigger: 'blur',
  437. },
  438. ]"
  439. >
  440. <el-input
  441. v-model.trim="form.emergencyContactPhone"
  442. minlength="11"
  443. maxlength="11"
  444. placeholder="请输入紧急联系人电话"
  445. />
  446. </el-form-item>
  447. </td>
  448. </tr>
  449. <tr class="description-tr">
  450. <th class="description-label">开户行</th>
  451. <td class="description-content">
  452. <el-form-item prop="bankAddress">
  453. <el-input
  454. v-model="form.bankAddress"
  455. placeholder="请输入开户行"
  456. />
  457. </el-form-item>
  458. </td>
  459. <th class="description-label">银行卡号</th>
  460. <td class="description-content" colspan="3">
  461. <el-form-item prop="bankCardNo">
  462. <el-input
  463. v-model="form.bankCardNo"
  464. placeholder="请输入银行卡号"
  465. />
  466. </el-form-item>
  467. </td>
  468. </tr>
  469. </tbody>
  470. </table>
  471. </div>
  472. </el-form>
  473. <div
  474. class="tableWrap"
  475. style="margin-top: 20px"
  476. v-if="formActionTitle == 'update'"
  477. >
  478. <div class="description-title head_title">
  479. <span>在职信息</span>
  480. <span
  481. class="createRecord"
  482. @click="onCreateRecord"
  483. v-if="$helpers.permission('employeeInfo/insertVisit')"
  484. >新增沟通记录 >></span
  485. >
  486. </div>
  487. <el-table
  488. style="width: 100% !important"
  489. :data="tableList"
  490. :header-cell-style="{
  491. background: '#fafafa',
  492. color: '#444',
  493. borderTop: '1px solid #ebeef5',
  494. }"
  495. >
  496. <el-table-column
  497. align="center"
  498. prop="createTime"
  499. label="沟通时间"
  500. ></el-table-column>
  501. <el-table-column align="center" prop="operatorName" label="沟通人">
  502. </el-table-column>
  503. <el-table-column
  504. align="center"
  505. prop="content"
  506. label="沟通结论"
  507. show-overflow-tooltip
  508. >
  509. <template slot-scope="scope">
  510. <!-- <el-tooltip
  511. class="item"
  512. effect="dark"
  513. :content="scope.row.content"
  514. placement="top"
  515. > -->
  516. {{ scope.row.content }}
  517. <!-- </el-tooltip> -->
  518. </template>
  519. </el-table-column>
  520. <el-table-column
  521. align="center"
  522. prop="nextVisitDate"
  523. label="下次沟通时间"
  524. >
  525. <template slot-scope="scope">
  526. {{ scope.row.nextVisitDate | dayjsFormat }}
  527. </template>
  528. </el-table-column>
  529. </el-table>
  530. </div>
  531. <span class="dialog-footer">
  532. <el-button @click="close('ruleForm')">取 消</el-button>
  533. <el-button
  534. type="primary"
  535. class="main-button"
  536. @click="onTypeSubmit('ruleForm')"
  537. >确 定</el-button
  538. >
  539. </span>
  540. <el-dialog
  541. title="新增沟通记录"
  542. :visible.sync="recordStatus"
  543. :close-on-click-modal="false"
  544. width="500px"
  545. append-to-body
  546. v-if="recordStatus"
  547. >
  548. <create-record
  549. v-if="recordStatus"
  550. :employeeInfoId="detail.id"
  551. @close="recordStatus = false"
  552. @getList="getRecordList"
  553. ></create-record>
  554. </el-dialog>
  555. </div>
  556. </template>
  557. <script>
  558. // import Vue from 'vue'
  559. import {
  560. employeeCreate,
  561. employeeUpdate,
  562. employeeQueryDetail,
  563. } from "@/api/appTenant";
  564. import CreateRecord from "./createRecord.vue";
  565. export default {
  566. name: "hrform",
  567. props: [
  568. "detail",
  569. "subjectList",
  570. "organList",
  571. "close",
  572. "getList",
  573. "formActionTitle",
  574. "roleList",
  575. ],
  576. components: {
  577. CreateRecord,
  578. },
  579. data() {
  580. return {
  581. recordStatus: false,
  582. realName: "",
  583. form: {
  584. age: "",
  585. bankAddress: "",
  586. bankCardNo: "",
  587. birthdate: "",
  588. educationalBackground: "",
  589. emergencyContactName: "",
  590. emergencyContactPhone: "",
  591. emergencyContactRelation: "",
  592. entryDate: "",
  593. gender: "",
  594. idCard: "",
  595. intentionCity: "",
  596. assessmentResult: "",
  597. status: "",
  598. isProbationPeriod: "",
  599. liveCity: "",
  600. mobileNo: "",
  601. otherComment: "",
  602. position: "",
  603. realName: "",
  604. resignationDate: "",
  605. subjectIdList: [],
  606. jobSubjectIdList: [],
  607. wechatNo: "",
  608. organId: "",
  609. sourceFrom: "",
  610. educations: [{ level: "", school: "", year: "" }],
  611. },
  612. rules: {
  613. // birthdate: [
  614. // { required: true, message: '请输入生日', trigger: 'blur' },
  615. // ],
  616. // sourceFrom: [
  617. // { required: true, message: '请选择信息来源', trigger: 'change' },
  618. // ],
  619. // intentionCity: [
  620. // { required: true, message: '请输入工作意向', trigger: 'blur' },
  621. // ],
  622. // status: [
  623. // { required: true, message: '请选择员工状态', trigger: 'change' },
  624. // ],
  625. // liveCity: [
  626. // { required: true, message: '请输入所在城市', trigger: 'blur' },
  627. // ],
  628. // otherComment: [
  629. // { required: true, message: '请输入其他综合情况', trigger: 'blur' },
  630. // ],
  631. // position: [
  632. // { required: true, message: '请输入职位', trigger: 'blur' },
  633. // ],
  634. // realName: [
  635. // { required: true, message: '请输入姓名', trigger: 'blur' },
  636. // ],
  637. // subjectIdList: [
  638. // { required: true, message: '请选择声部', trigger: 'change' },
  639. // ],
  640. },
  641. tableList: [],
  642. };
  643. },
  644. watch: {
  645. detail() {
  646. this.updateData();
  647. },
  648. },
  649. async mounted() {
  650. this.updateData();
  651. if (this.formActionTitle == "update") {
  652. this.getRecordList();
  653. }
  654. },
  655. computed: {
  656. propRequred() {
  657. return (
  658. this.form.status === "PART_TIME" ||
  659. this.form.status === "FULL_TIME" ||
  660. this.form.status === "DIMISSION"
  661. );
  662. },
  663. },
  664. methods: {
  665. updateData() {
  666. if (this.detail) {
  667. try {
  668. this.detail.subjectIdList = this.detail.subjectIdList
  669. ? this.detail.subjectIdList.split(",")
  670. : [];
  671. this.detail.jobSubjectIdList = this.detail.jobSubjectIdList
  672. ? this.detail.jobSubjectIdList.split(",")
  673. : [];
  674. } catch (error) {}
  675. if (this.detail.organId === 0) {
  676. this.detail.organId = "";
  677. }
  678. if (this.detail.age === 0) {
  679. this.detail.age = "";
  680. }
  681. this.form = Object.assign(
  682. {
  683. educations: [{ level: "", school: "", year: "", subject: "" }],
  684. },
  685. this.detail
  686. );
  687. try {
  688. this.form.educations = JSON.parse(this.detail.educationalBackground);
  689. if (this.form.educations.length < 1) {
  690. this.form.educations = [
  691. { level: "", school: "", year: "", subject: "" },
  692. ];
  693. }
  694. this.form = { ...this.form };
  695. } catch (error) {}
  696. // console.log(this.form);
  697. } else {
  698. this.form.educations = [
  699. { level: "", school: "", year: "", subject: "" },
  700. ];
  701. this.form = { ...this.form };
  702. }
  703. this.$refs["ruleForm"].resetFields();
  704. },
  705. addEducation() {
  706. this.form.educations = [
  707. ...this.form.educations,
  708. { level: "", school: "", year: "", subject: "" },
  709. ];
  710. this.form = { ...this.form };
  711. },
  712. removeEducation(index) {
  713. this.form.educations[index] = null;
  714. this.form.educations = this.form.educations.filter((item) => !!item);
  715. this.form = { ...this.form };
  716. },
  717. onTypeSubmit() {
  718. this.$refs["ruleForm"].validate((valid) => {
  719. if (valid) {
  720. const { $message } = this;
  721. this.form.educationalBackground = JSON.stringify(
  722. this.form.educations
  723. );
  724. const { educations, subjectIdList, jobSubjectIdList, ...rest } =
  725. this.form;
  726. if (this.detail && this.detail.id) {
  727. employeeUpdate(
  728. Object.assign(
  729. {
  730. id: this.detail.id,
  731. subjectIdList: (subjectIdList || []).join(","),
  732. jobSubjectIdList: (jobSubjectIdList || []).join(","),
  733. },
  734. rest
  735. )
  736. ).then((res) => {
  737. if (res.code === 200) {
  738. $message.success("修改成功");
  739. this.close("ruleForm");
  740. // this.getList()
  741. }
  742. });
  743. } else {
  744. employeeCreate({
  745. subjectIdList: (subjectIdList || []).join(","),
  746. ...rest,
  747. }).then((res) => {
  748. if (res.code === 200) {
  749. $message.success("创建成功");
  750. this.close("ruleForm");
  751. // this.getList()
  752. } else if (res.code == 206) {
  753. this.$confirm(res.msg, "提示", {
  754. confirmButtonText: "确定",
  755. cancelButtonText: "取消",
  756. type: "warning",
  757. }).then((res) => {
  758. employeeCreate({
  759. subjectIdList: (subjectIdList || []).join(","),
  760. ...rest,
  761. cover: true,
  762. }).then((res) => {
  763. if (res.code == 200) {
  764. $message.success("提交成功");
  765. this.close("ruleForm");
  766. }
  767. });
  768. });
  769. }
  770. });
  771. }
  772. }
  773. });
  774. },
  775. mobileOrWechatValidate() {
  776. this.$refs["ruleForm"].validateField("mobileNo");
  777. },
  778. onCreateRecord() {
  779. // 新增沟通记录
  780. this.recordStatus = true;
  781. },
  782. getRecordList() {
  783. employeeQueryDetail({ id: this.detail.id }).then((res) => {
  784. let result = res.data.employeeVisitList || [];
  785. this.tableList = result;
  786. });
  787. },
  788. },
  789. };
  790. </script>
  791. <style lang="less" scoped>
  792. .desc-item {
  793. position: relative;
  794. .close {
  795. position: absolute;
  796. left: 10px;
  797. cursor: pointer;
  798. }
  799. }
  800. .main-button {
  801. background-color: var(--color-primary);
  802. border-color: var(--color-primary);
  803. }
  804. .dialog-footer {
  805. display: block;
  806. text-align: right;
  807. margin-top: 20px;
  808. }
  809. .description-title {
  810. margin-bottom: 10px;
  811. color: rgba(0, 0, 0, 0.85);
  812. font-weight: 700;
  813. font-size: 16px;
  814. line-height: 1.5;
  815. }
  816. .description-view {
  817. width: 100%;
  818. border: 1px solid #e8e8e8;
  819. }
  820. .description-view .description-table {
  821. width: 100%;
  822. /* border: 1px solid #e8e8e8; */
  823. border-collapse: collapse;
  824. table-layout: fixed;
  825. }
  826. .description-view .description-tr {
  827. border-bottom: 1px solid #e8e8e8;
  828. width: 100%;
  829. }
  830. .description-view .description-tr:last-child {
  831. border-bottom: none;
  832. }
  833. .description-view .description-label {
  834. border-right: 1px solid #e8e8e8;
  835. background-color: #fafafa;
  836. color: #000;
  837. font-weight: 400;
  838. font-size: 14px;
  839. line-height: 22px;
  840. /* margin-right: 8px; */
  841. // padding: 0 16px;
  842. width: 140px;
  843. white-space: nowrap;
  844. display: table-cell;
  845. }
  846. // .description-view .description-label:after {
  847. // content: ""; /** content: ":" */
  848. // margin: 0 8px 0 2px;
  849. // position: relative;
  850. // top: -0.5px;
  851. // }
  852. .description-view .description-content {
  853. white-space: nowrap;
  854. overflow: hidden;
  855. text-overflow: ellipsis;
  856. border-right: 1px solid #e8e8e8;
  857. font-size: 14px;
  858. line-height: 1.5;
  859. // padding: 12px 16px;
  860. // padding-bottom: 0;
  861. color: rgba(0, 0, 0, 0.65);
  862. display: table-cell;
  863. }
  864. .description-tr .description-content:last-child {
  865. border-right: none;
  866. }
  867. .form {
  868. /deep/ .el-form-item {
  869. margin-bottom: 0;
  870. &.is-error {
  871. border: 1px solid red;
  872. .el-input__inner {
  873. color: red;
  874. }
  875. input::-webkit-input-placeholder {
  876. color: red;
  877. }
  878. input::-moz-placeholde {
  879. color: red;
  880. }
  881. input::-ms-input-placeholder {
  882. color: red;
  883. }
  884. }
  885. }
  886. /deep/ .el-form-item__error {
  887. display: none;
  888. }
  889. /deep/.el-input__inner {
  890. border: 0;
  891. }
  892. }
  893. .requiredStar {
  894. padding-right: 3px;
  895. font-style: normal;
  896. color: red;
  897. }
  898. .head_title {
  899. display: flex;
  900. align-items: center;
  901. justify-content: space-between;
  902. .createRecord {
  903. font-size: 14px;
  904. font-weight: 400;
  905. color: var(--color-primary);
  906. cursor: pointer;
  907. }
  908. }
  909. </style>