czpandanxinxi.js 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. import { memberListPageV2 } from "@/api/masterManagement";
  2. import { required, mobileRequired, mobile, httpUrl, email } from '@/components/template/rules_verify.js'
  3. export default {
  4. data() {
  5. return {
  6. workerList_cz: []
  7. }
  8. },
  9. computed: {
  10. czpandanxinxi() {
  11. return [
  12. {
  13. name: 'el-input',
  14. md: 6,
  15. attributes: { placeholder: '请输入' },
  16. formItemAttributes: {
  17. label: '处罚工单号',
  18. prop: 'disposeOrderBaseId',
  19. rules: [...required],
  20. }
  21. },
  22. {
  23. name: 'el-select',
  24. md: 6,
  25. options: this.orderSmallTypeData,
  26. attributes: {
  27. placeholder: '请选择',
  28. clearable: true,
  29. filterable: true
  30. },
  31. formItemAttributes: {
  32. label: '工单类型',
  33. prop: 'disposeOrderSmallType',
  34. rules: [...required],
  35. },
  36. events: {
  37. change: (val) => {
  38. if (val) {
  39. this.formData.disposeOrderSmallTypeText = this.orderSmallTypeData.find(item => item.value == val).label
  40. } else {
  41. this.formData.disposeOrderSmallTypeText = ''
  42. }
  43. }
  44. }
  45. },
  46. {
  47. name: 'el-select-add',
  48. options: this.websitList,
  49. md: 6,
  50. attributes: {
  51. placeholder: '请选择',
  52. clearable: true,
  53. filterable: true,
  54. },
  55. formItemAttributes: {
  56. label: '网点名称',
  57. prop: 'disposeWebsitId',
  58. rules: [...required],
  59. },
  60. events: {
  61. change: (val) => {
  62. this.formData.disposeWorkerId = ""
  63. this.formData.disposeWorkerName = ""
  64. this.formData.disposeWorkerMobile = ""
  65. this.getdisposeWebsitIds()
  66. if (val) {
  67. this.formData['disposeWebsitName'] = this.websitList.find(item => item.value == val)?.label || val
  68. } else {
  69. this.formData['disposeWebsitName'] = ''
  70. }
  71. }
  72. }
  73. },
  74. {
  75. name: 'el-select-add',
  76. options: this.workerList_cz,
  77. md: 6,
  78. attributes: {
  79. placeholder: '请选择',
  80. clearable: true,
  81. filterable: true,
  82. },
  83. formItemAttributes: {
  84. label: '处置工程师',
  85. prop: 'disposeWorkerId',
  86. rules: [...required],
  87. },
  88. events: {
  89. change: (val) => {
  90. if (val) {
  91. this.formData['disposeWorkerName'] = this.workerList_cz.find(item => item.value == val)?.label || val
  92. this.formData['disposeWorkerMobile'] = this.workerList_cz.find(item => item.value == val)?.data?.workerMobile || ""
  93. } else {
  94. this.formData['disposeWorkerMobile'] = ''
  95. this.formData['disposeWorkerName'] = ''
  96. }
  97. }
  98. }
  99. },
  100. ]
  101. }
  102. },
  103. methods: {
  104. getdisposeWebsitIds() {
  105. if (this.formData.disposeWebsitId) {
  106. memberListPageV2({ "pageNum": 1, "pageSize": -1, "params": [{ "param": "b.examine_status", "compare": "=", "value": "OK" }, { "param": "b.websit_id", "compare": "=", "value": this.formData.disposeWebsitId }] }).then(res => {
  107. this.workerList_cz = res.data.records.map(item => {
  108. var { id, userId, ...data } = item
  109. return {
  110. value: userId,
  111. label: data.nickName,
  112. data: {
  113. workerId: userId,
  114. workerName: data.nickName,
  115. workerIdcard: data.idCard,
  116. workerMobile: data.mobile,
  117. ...data
  118. }
  119. }
  120. })
  121. })
  122. } else {
  123. this.workerList_cz = []
  124. }
  125. }
  126. },
  127. }