detailsPage.vue 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562
  1. <template>
  2. <div>
  3. <div class="customer-head">
  4. <div class="customer-back">
  5. <el-button
  6. type="danger"
  7. style="border: none; background: none; color: red"
  8. icon="el-icon-arrow-left"
  9. @click="goBack()"
  10. >返回列表
  11. </el-button>
  12. </div>
  13. <div class="add-customer-btn" v-if="form.claimSourceType == 1">
  14. <el-button
  15. class="el-button--small-yh"
  16. style="margin-left: 6px"
  17. type="primary"
  18. size="small"
  19. v-if="editBtn"
  20. @click="inEdit"
  21. >编 辑
  22. </el-button>
  23. <el-button
  24. class="el-button--small-yh"
  25. v-else
  26. style="margin-left: 6px"
  27. type="primary"
  28. size="small"
  29. :disabled="editDis"
  30. @click="submit"
  31. >保 存
  32. </el-button>
  33. <el-button
  34. v-if="form.id && form.auditStatus == 0"
  35. class="el-button--small-yh"
  36. style="margin-left: 6px"
  37. type="success"
  38. size="small"
  39. :disabled="editDis"
  40. @click="allClick('提交审核')"
  41. >提交审核
  42. </el-button>
  43. <el-button
  44. v-if="form.id && form.auditStatus == 1"
  45. class="el-button--small-yh"
  46. style="margin-left: 6px"
  47. type="danger"
  48. size="small"
  49. :disabled="editBtn"
  50. @click="allClick('撤销审核')"
  51. >撤销审核
  52. </el-button>
  53. </div>
  54. </div>
  55. <div style="margin-top: 50px">
  56. <trade-card title="基础信息">
  57. <avue-form :option="optionForm" v-model="form" ref="form"> </avue-form>
  58. </trade-card>
  59. <trade-card title="相应图片信息">
  60. <upload-file
  61. :data="form.claimAttachmentList"
  62. :disabled="editDis"
  63. @upDate="upDate"
  64. :isImage="true"
  65. ></upload-file>
  66. </trade-card>
  67. <trade-card title="反馈表">
  68. <avue-crud :option="option" :data="form.bladeClaimAuditList" id="out-table" ref="crud"> </avue-crud>
  69. </trade-card>
  70. <trade-card title="操作记录">
  71. <avue-form :option="optionForm2" v-model="form" ref="form2"> </avue-form>
  72. </trade-card>
  73. </div>
  74. </div>
  75. </template>
  76. <script>
  77. // @ts-nocheck
  78. import { submit, detail, submitApprova, revokeApproval } from "@/api/claimSettlement/index";
  79. import dicSelect from "@/components/dicSelect/main.vue";
  80. export default {
  81. name: "detailsPage",
  82. data() {
  83. return {
  84. editBtn: false,
  85. editDis: false,
  86. form: {
  87. tireQuantity: 1,
  88. claimSourceType: 1,
  89. claimAttachmentList: [],
  90. bladeClaimAuditList: [],
  91. },
  92. optionForm: {
  93. menuBtn: false,
  94. span: 6,
  95. disabled: false,
  96. labelWidth: 100,
  97. column: [
  98. {
  99. label: "理赔单号",
  100. prop: "claimNo",
  101. disabled: true,
  102. },
  103. {
  104. label: "来源类型",
  105. prop: "claimSourceType",
  106. type: "select",
  107. dicData: [
  108. {
  109. label: "经销商",
  110. value: 1,
  111. },
  112. {
  113. label: "门店",
  114. value: 2,
  115. },
  116. // {
  117. // label: "终端消费者",
  118. // value: 3,
  119. // },
  120. ],
  121. disabled: true,
  122. },
  123. {
  124. label: "来源方名称",
  125. prop: "sourceName",
  126. disabled: true,
  127. },
  128. {
  129. label: "联系人",
  130. prop: "consumerName",
  131. },
  132. {
  133. label: "电话",
  134. prop: "consumerPhone",
  135. type:'number',
  136. controls:false,
  137. precision:0,
  138. maxRows:19999999999,
  139. rules: [
  140. {
  141. required: true,
  142. message: " ",
  143. trigger: "blur",
  144. },
  145. ],
  146. },
  147. {
  148. label: "胎号",
  149. prop: "tyreNo",
  150. },
  151. {
  152. label: "车牌号",
  153. prop: "vehicleNumber",
  154. },
  155. {
  156. label: "规格型号",
  157. prop: "tyreSpecs",
  158. },
  159. {
  160. label: "轮胎数量",
  161. prop: "tireQuantity",
  162. type: "number",
  163. controls: false,
  164. precision: 0,
  165. disabled: true,
  166. },
  167. {
  168. label: "购买日期",
  169. prop: "purchaseDate",
  170. type: "date",
  171. format: "yyyy-MM-dd",
  172. valueFormat: "yyyy-MM-dd 00:00:00",
  173. },
  174. {
  175. label: "装车日期",
  176. prop: "mountDate",
  177. type: "date",
  178. format: "yyyy-MM-dd",
  179. valueFormat: "yyyy-MM-dd 00:00:00",
  180. },
  181. {
  182. label: "行驶里程(km)",
  183. prop: "runMileage",
  184. type: "number",
  185. controls: false,
  186. precision: 0,
  187. },
  188. {
  189. label: "索赔金额",
  190. prop: "claimAmount",
  191. type: "number",
  192. controls: false,
  193. precision: 2,
  194. disabled: true,
  195. placeholder: " ",
  196. },
  197. {
  198. label: "审核状态",
  199. prop: "auditStatus",
  200. type: "select",
  201. dicData: [
  202. {
  203. label: "待审核",
  204. value: 0,
  205. },
  206. {
  207. label: "审核中",
  208. value: 1,
  209. },
  210. {
  211. label: "已通过",
  212. value: 2,
  213. },
  214. {
  215. label: "已拒绝",
  216. value: 3,
  217. },
  218. ],
  219. disabled: true,
  220. },
  221. {
  222. label: "理赔原因",
  223. prop: "claimReason",
  224. type: "textarea",
  225. span: 12,
  226. minRows: 2,
  227. },
  228. {
  229. label: "备注",
  230. prop: "remark",
  231. type: "textarea",
  232. span: 12,
  233. minRows: 2,
  234. },
  235. ],
  236. },
  237. optionForm2: {
  238. menuBtn: false,
  239. span: 6,
  240. disabled: false,
  241. labelWidth: 100,
  242. column: [
  243. {
  244. label: "制单人",
  245. prop: "createUserName",
  246. disabled: true,
  247. },
  248. {
  249. label: "制单日期",
  250. prop: "createTime",
  251. disabled: true,
  252. },
  253. {
  254. label: "修改人",
  255. prop: "updateUserName",
  256. disabled: true,
  257. },
  258. {
  259. label: "修改日期",
  260. prop: "updateTime",
  261. disabled: true,
  262. },
  263. ],
  264. },
  265. option: {
  266. maxHeight: 340,
  267. calcHeight: 30,
  268. index: true,
  269. menu: false,
  270. header: false,
  271. column: [
  272. {
  273. label: "理赔单号",
  274. prop: "claimNo",
  275. overHidden: true,
  276. },
  277. {
  278. label: "审核结论",
  279. prop: "auditResult",
  280. overHidden: true,
  281. type: "select",
  282. dicData: [
  283. {
  284. label: "通过",
  285. value: 2,
  286. },
  287. {
  288. label: "拒绝",
  289. value: 3,
  290. },
  291. ],
  292. },
  293. {
  294. label: "核定赔付金额",
  295. prop: "auditAmount",
  296. overHidden: true,
  297. },
  298. {
  299. label: "详细审核说明",
  300. prop: "reasonDetail",
  301. overHidden: true,
  302. },
  303. {
  304. label: "审核人姓名",
  305. prop: "auditorName",
  306. overHidden: true,
  307. },
  308. {
  309. label: "审核时间",
  310. prop: "auditTime",
  311. overHidden: true,
  312. },
  313. {
  314. label: "反馈渠道",
  315. prop: "feedbackChannel",
  316. overHidden: true,
  317. },
  318. {
  319. label: "客户反馈内容",
  320. prop: "feedbackDesc",
  321. overHidden: true,
  322. },
  323. {
  324. label: "客户反馈时间",
  325. prop: "feedbackTime",
  326. overHidden: true,
  327. },
  328. {
  329. label: "申诉状态",
  330. prop: "appealStatus",
  331. overHidden: true,
  332. type: "select",
  333. dicData: [
  334. {
  335. label: "无申诉",
  336. value: 0,
  337. },
  338. {
  339. label: "申诉中",
  340. value: 1,
  341. },
  342. {
  343. label: "已处理",
  344. value: 2,
  345. },
  346. ],
  347. },
  348. {
  349. label: "申诉处理结果",
  350. prop: "appealResult",
  351. overHidden: true,
  352. },
  353. {
  354. label: "申诉处理时间",
  355. prop: "appealTime",
  356. overHidden: true,
  357. },
  358. {
  359. label: "制单人",
  360. prop: "createUserName",
  361. overHidden: true,
  362. },
  363. {
  364. label: "制单日期",
  365. prop: "createTime",
  366. type: "date",
  367. overHidden: true,
  368. width: 120,
  369. format: "yyyy-MM-dd",
  370. valueFormat: "yyyy-MM-dd HH:mm:ss",
  371. },
  372. {
  373. label: "修改人",
  374. prop: "updateUserName",
  375. overHidden: true,
  376. },
  377. {
  378. label: "修改日期",
  379. prop: "updateTime",
  380. type: "date",
  381. overHidden: true,
  382. width: 120,
  383. format: "yyyy-MM-dd",
  384. valueFormat: "yyyy-MM-dd HH:mm:ss",
  385. },
  386. {
  387. label: "备注",
  388. prop: "remarks",
  389. cell: true,
  390. width: 150,
  391. overHidden: true,
  392. },
  393. ],
  394. },
  395. };
  396. },
  397. components: { dicSelect },
  398. props: {
  399. detailData: Object,
  400. },
  401. created() {
  402. if (this.detailData && this.detailData.id) {
  403. this.editBtn = true;
  404. this.editDis = true;
  405. this.optionForm.disabled = true;
  406. this.getDetail(this.detailData.id);
  407. }
  408. },
  409. methods: {
  410. inEdit() {
  411. this.editBtn = false;
  412. if (this.form.auditStatus == 0) {
  413. this.editDis = false;
  414. this.optionForm.disabled = false;
  415. }
  416. },
  417. allClick(name) {
  418. if (name == "提交审核") {
  419. this.$refs.form.validate((valid, done) => {
  420. done();
  421. if (valid) {
  422. if (!/^[1][3,4,5,7,8,9][0-9]{9}$/.test(this.form.consumerPhone)) {
  423. return this.$message.error("请输入正确电话");
  424. }
  425. if (this.form.claimAttachmentList.length == 0) return this.$message.error("请上传鼓包并向照片");
  426. if (this.form.claimAttachmentList.length == 1) return this.$message.error("请上传轮胎DOT");
  427. if (this.form.claimAttachmentList.length == 2) return this.$message.error("请上传车头照片");
  428. if (this.form.claimAttachmentList.length == 3) return this.$message.error("请上传鼓包处照片");
  429. this.form.claimAttachmentList.forEach((item, index) => {
  430. item.fileProperties = index + 1;
  431. });
  432. submit(this.form);
  433. this.$confirm("是否提交审核?", "提示", {
  434. confirmButtonText: "确定",
  435. cancelButtonText: "取消",
  436. type: "warning",
  437. }).then(() => {
  438. let obj = {
  439. id: this.form.id,
  440. };
  441. submitApprova(obj).then((res) => {
  442. this.$message.success("操作成功");
  443. this.getDetail(this.form.id);
  444. });
  445. });
  446. } else {
  447. return false;
  448. }
  449. });
  450. }
  451. if (name == "撤销审核") {
  452. this.$confirm("是否撤销审核?", "提示", {
  453. confirmButtonText: "确定",
  454. cancelButtonText: "取消",
  455. type: "warning",
  456. }).then(() => {
  457. let obj = {
  458. id: this.form.id,
  459. };
  460. revokeApproval(obj).then((res) => {
  461. this.$message.success("操作成功");
  462. this.getDetail(this.form.id);
  463. });
  464. });
  465. }
  466. },
  467. upDate(data) {
  468. this.form.claimAttachmentList = data;
  469. },
  470. submit() {
  471. // @ts-ignore
  472. this.$refs.form.validate((valid, done) => {
  473. done();
  474. if (valid) {
  475. if (!/^[1][3,4,5,7,8,9][0-9]{9}$/.test(this.form.consumerPhone)) {
  476. return this.$message.error("请输入正确电话");
  477. }
  478. if (this.form.claimAttachmentList.length == 0) return this.$message.error("请上传鼓包并向照片");
  479. if (this.form.claimAttachmentList.length == 1) return this.$message.error("请上传轮胎DOT");
  480. if (this.form.claimAttachmentList.length == 2) return this.$message.error("请上传车头照片");
  481. if (this.form.claimAttachmentList.length == 3) return this.$message.error("请上传鼓包处照片");
  482. this.form.claimAttachmentList.forEach((item, index) => {
  483. item.fileProperties = index + 1;
  484. });
  485. const loading = this.$loading({
  486. lock: true,
  487. text: "加载中",
  488. spinner: "el-icon-loading",
  489. background: "rgba(255,255,255,0.7)",
  490. });
  491. submit(this.form)
  492. .then((res) => {
  493. this.$message.success("保存成功");
  494. this.getDetail(res.data.data.id);
  495. })
  496. .finally(() => {
  497. loading.close();
  498. });
  499. } else {
  500. return false;
  501. }
  502. });
  503. },
  504. /**
  505. * @param {any} id
  506. */
  507. getDetail(id) {
  508. const loading = this.$loading({
  509. lock: true,
  510. text: "加载中",
  511. spinner: "el-icon-loading",
  512. background: "rgba(255,255,255,0.7)",
  513. });
  514. detail({ id: id })
  515. .then((res) => {
  516. if (res.data.data.auditStatus > 0) {
  517. this.editBtn = true;
  518. this.editDis = true;
  519. this.optionForm.disabled = true;
  520. }
  521. if (!this.editBtn && res.data.data.auditStatus == 0) {
  522. this.editDis = false;
  523. this.optionForm.disabled = false;
  524. }
  525. this.form = res.data.data;
  526. })
  527. .finally(() => {
  528. loading.close();
  529. });
  530. },
  531. /**
  532. * @param {any} type
  533. */
  534. goBack(type) {
  535. this.$emit("goBack");
  536. },
  537. },
  538. };
  539. </script>
  540. <style lang="scss" scoped>
  541. ::v-deep .el-form-item__error {
  542. display: none !important;
  543. }
  544. ::v-deep .el-form-item {
  545. margin-bottom: 8px !important;
  546. }
  547. ::v-deep .el-table .cell {
  548. padding: 0 2px !important;
  549. .el-form-item {
  550. margin-bottom: 0px !important;
  551. }
  552. }
  553. ::v-deep .el-table--small td,
  554. .el-table--small th {
  555. padding: 2px !important;
  556. }
  557. </style>