index.vue 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298
  1. <template>
  2. <div>
  3. <ListPage :column="listPageData.tableColumn" :tableApi="listPageData.tableApi" :isSelect="listPageData.isSelect"
  4. :scopeBtns="listPageData.scopeBtns" :searchBtns="listPageData.searchBtns" ref="userTableRef"
  5. />
  6. <DialogForm ref="dialogFormRef" :title="title" :column="dialogData.column" @submit="submitForm" />
  7. </div>
  8. </template>
  9. <script setup>
  10. import { ref } from 'vue';
  11. import ListPage from '@/views/components/ListPage/index.vue';
  12. import { settlementOrderList } from "@/api/finance/settlement.js";
  13. import DialogForm from '@/views/components/DialogForm/index.vue';
  14. const { proxy } = getCurrentInstance();
  15. const { lrr_service_status } = proxy.useDict("lrr_service_status");
  16. const router = useRouter();
  17. const userTableRef = ref();
  18. const dialogFormRef = ref(null);
  19. const listPageData = reactive({
  20. tableColumn: [
  21. {
  22. label: '订单ID',
  23. prop: 'mainOrderId',
  24. type: 'input',
  25. isSearch: true,
  26. },
  27. {
  28. label: '申请方类型',
  29. prop: 'applicantType',
  30. },
  31. {
  32. label: '结算金额',
  33. prop: 'serviceTotalPrice',
  34. },
  35. {
  36. label: '申请时间',
  37. prop: 'createTime',
  38. },
  39. {
  40. label: '收款方式',
  41. prop: 'payeeMethod',
  42. },
  43. {
  44. label: '收款账号',
  45. prop: 'payeeAccount',
  46. },
  47. {
  48. label: '收款银行名称',
  49. prop: 'payeeBankName',
  50. },
  51. {
  52. label: '收款人姓名',
  53. prop: 'clientName',
  54. },
  55. {
  56. label: '收款人手机号',
  57. prop: 'clientTelephone',
  58. },
  59. {
  60. label: '收款申请备注',
  61. prop: 'payeeRemark',
  62. },
  63. {
  64. label: '审核时间',
  65. prop: 'auditorTime',
  66. },
  67. {
  68. label: '审核状态',
  69. prop: 'auditorStatus',
  70. type: 'dict',
  71. dict: lrr_service_status
  72. },
  73. {
  74. label: '审核结果说明',
  75. prop: 'auditorRemark',
  76. },
  77. ],
  78. searchBtns: [
  79. // {
  80. // label: '批量结算',
  81. // func: () => {
  82. // const ids = userTableRef.value.ids;
  83. // console.log('批量删除', ids)
  84. // handleDelete(ids);
  85. // },
  86. // key: 'deletes',
  87. // hasPermi: ['system:role:query'],
  88. // type: 'danger'
  89. // },
  90. // {
  91. // label: '导出',
  92. // func: (parmas) => {
  93. // exportFile(parmas);
  94. // },
  95. // key: 'deletes',
  96. // hasPermi: ['system:role:query'],
  97. // type: 'danger'
  98. // },
  99. ],
  100. tableApi: settlementOrderList,//接口地址
  101. isSelect: true,//是否勾选
  102. scopeBtns: [
  103. // {
  104. // label: '结算',
  105. // type: 'primary',
  106. // hasPermi: ['manage:examine'],
  107. // key: 'examine',
  108. // func: (row) => {
  109. // console.log(row)
  110. // openDialog(row, 'examine')
  111. // },
  112. // show: (row) => {
  113. // return row.appStatus == 1
  114. // }
  115. // },
  116. // {
  117. // label: '查看',
  118. // type: 'primary',
  119. // hasPermi: ['manage:details'],
  120. // key: 'details',
  121. // func: (row) => {
  122. // console.log(row)
  123. // // router.push("/order/order-details/" + row.mainOrderId);
  124. // // openDialog(row)
  125. // }
  126. // },
  127. // {
  128. // label: '删除',
  129. // type: 'danger',
  130. // hasPermi: ['manage:delete'],
  131. // key: 'delete',
  132. // func: (row) => {
  133. // console.log(row)
  134. // handleDelete([row.id])
  135. // }
  136. // }
  137. ]
  138. })
  139. const dialogData = reactive({
  140. title: '',
  141. column: [
  142. {
  143. label: '姓名',
  144. prop: 'name',
  145. type: 'input',
  146. },
  147. {
  148. label: '年龄',
  149. prop: 'age',
  150. type: 'input',
  151. },
  152. {
  153. label: '电话',
  154. prop: 'phonenumber',
  155. type: 'input',
  156. },
  157. {
  158. label: '家庭地址',
  159. prop: 'address',
  160. type: 'input',
  161. },
  162. // {
  163. // label: '服务项目/类别',
  164. // prop: 'businessManagementId',
  165. // type: 'cascader',
  166. // isSearch: true,
  167. // options: options,
  168. // props: { label: 'businessName', value: 'id', checkStrictly:true },
  169. // },
  170. {
  171. label: '身份证件',
  172. prop: 'idCardPicture',
  173. type: 'img',
  174. },
  175. {
  176. label: '职业证书',
  177. prop: 'certificationPicture',
  178. type: 'img',
  179. },
  180. {
  181. label: '技能简介',
  182. prop: 'skillDescribe',
  183. type: 'textarea',
  184. },
  185. {
  186. label: '审核状态',
  187. prop: 'appStatus',
  188. type: 'radio',
  189. rules: [
  190. { required: true, message: '请选择审核状态', trigger: 'blur' }
  191. ],
  192. options: [
  193. {
  194. label: '通过',
  195. value: '2'
  196. },
  197. {
  198. label: '不通过',
  199. value: '3'
  200. }
  201. ]
  202. },
  203. ]
  204. })
  205. const { title } = toRefs(dialogData);
  206. const parentId = ref(0);
  207. const openDialog = (row, type) => {
  208. console.log('row', row);
  209. try {
  210. const disabledData = {
  211. name: true,
  212. age: true,
  213. phonenumber: true,
  214. address: true,
  215. skillDescribe: true,
  216. businessManagementId: true,
  217. }
  218. if (type) {
  219. //审核
  220. title.value = '审核'
  221. } else {
  222. disabledData['appStatus'] = true;
  223. //查看详情
  224. title.value = '查看详情'
  225. }
  226. dialogFormRef.value.initForm(row, disabledData)
  227. } catch (error) {
  228. console.log('error', error);
  229. } finally {
  230. console.log('dialogFormRef.value', dialogFormRef.value);
  231. dialogFormRef.value.handleDialog(true);
  232. }
  233. }
  234. const handleDelete = (ids) => {
  235. proxy.$modal.confirm('是否确认删除角色编号为"' + ids + '"的数据项?').then(function () {
  236. return true
  237. }).then(() => {
  238. userTableRef.value.resetForm();
  239. proxy.$modal.msgSuccess("删除成功");
  240. }).catch(() => { });
  241. }
  242. const submitForm = async (parmas) => {
  243. try {
  244. console.log('submit', parmas);
  245. // if (title.value === '审核') {
  246. // const res = await approval({
  247. // volunteerInfoId: parmas.volunteerInfoId,
  248. // appStatus: parmas.appStatus,
  249. // rejectReason: parmas.rejectReason
  250. // })
  251. // if (up_res.code === 200) {
  252. // proxy.$modal.msgSuccess("审核成功");
  253. // return;
  254. // }
  255. // proxy.$modal.msgSuccess(res.msg);
  256. // }
  257. } catch (error) {
  258. console.log('error', error);
  259. } finally {
  260. userTableRef.value.resetForm();
  261. dialogFormRef.value.handleDialog(false);
  262. }
  263. }
  264. const exportFile = async(parmas) => {
  265. console.log("TCL: exportFile -> parmas", parmas)
  266. try {
  267. proxy.download("core/orderSettlementApplication/export",{
  268. ...queryParams.value,
  269. }, `订单费用结算_${new Date().getTime()}.xlsx`);
  270. } catch (error) {
  271. }
  272. }
  273. </script>
  274. <style lang='scss' scoped></style>