Commit 5902ef3e7eb7d736404692a01eb6fcf478478f77
1 parent
68d3fcfe
业务线 小程序不用写死,从后端接口获取
Showing
2 changed files
with
22 additions
and
4 deletions
api/regional-order-manage/regional-order-manage.js
| ... | ... | @@ -85,6 +85,14 @@ export const daquWorkorderCreate = (data) => { |
| 85 | 85 | }; |
| 86 | 86 | |
| 87 | 87 | /** |
| 88 | + * 问题工单批量创建 大区经理(入参为工单数组) | |
| 89 | + * @returns {Promise} | |
| 90 | + */ | |
| 91 | +export const daquWorkorderCreateBatch = (data) => { | |
| 92 | + return post('/app-api/bpm/regionmgr/workorder/createBatch',data); | |
| 93 | +}; | |
| 94 | + | |
| 95 | +/** | |
| 88 | 96 | * app端统一审批入口 -- 大区经理 |
| 89 | 97 | * @returns {Promise} |
| 90 | 98 | */ |
| ... | ... | @@ -102,6 +110,14 @@ export const qyWorkorderCreate = (data) => { |
| 102 | 110 | }; |
| 103 | 111 | |
| 104 | 112 | /** |
| 113 | + * 问题工单批量创建 全域巡查员(入参为工单数组) | |
| 114 | + * @returns {Promise} | |
| 115 | + */ | |
| 116 | +export const qyWorkorderCreateBatch = (data) => { | |
| 117 | + return post('/app-api/bpm/universal/workorder/createBatch',data); | |
| 118 | +}; | |
| 119 | + | |
| 120 | +/** | |
| 105 | 121 | * 问题工单创建 全域督察员新接口 |
| 106 | 122 | * @returns {Promise} |
| 107 | 123 | */ | ... | ... |
pages-sub/problem/regional-order-manage/add-order.vue
| ... | ... | @@ -233,7 +233,8 @@ import { useUploadImgs } from '@/common/utils/useUploadImgs' |
| 233 | 233 | import { getRoadListByLatLng, getProblemListByType } from '@/api/common' |
| 234 | 234 | import { |
| 235 | 235 | daquUniversalApproval, qyUniversalApproval, qyWorkorderCreate,dycCreateBatchNew, |
| 236 | - dcyUniversalApproval, daquWorkorderCreate, dcyWorkorderCreate | |
| 236 | + dcyUniversalApproval, daquWorkorderCreate, dcyWorkorderCreate, | |
| 237 | + daquWorkorderCreateBatch, qyWorkorderCreateBatch | |
| 237 | 238 | } from '@/api/regional-order-manage/regional-order-manage' |
| 238 | 239 | import { timeFormat } from '@/uni_modules/uview-plus' |
| 239 | 240 | import { nextStepMap } from '@/common/utils/common' |
| ... | ... | @@ -695,11 +696,11 @@ const callApiByRole = async (params, isRenewFlag) => { |
| 695 | 696 | } else { |
| 696 | 697 | console.log('dasda') |
| 697 | 698 | console.log(CONST.ROLE.INSPECTOR) |
| 698 | - if (USER_ROLES.includes(CONST.ROLE.MANAGER)) return await daquWorkorderCreate(params); | |
| 699 | + if (USER_ROLES.includes(CONST.ROLE.MANAGER)) return await daquWorkorderCreateBatch(params); | |
| 699 | 700 | // if (USER_ROLES.includes(CONST.ROLE.INSPECTOR)) return await dcyWorkorderCreate(params); |
| 700 | 701 | if (USER_ROLES.includes(CONST.ROLE.INSPECTOR)) return await dycCreateBatchNew(params); |
| 701 | 702 | if (USER_ROLES.includes(CONST.ROLE.LEADER)) return await dycCreateBatchNew(params); |
| 702 | - if (USER_ROLES.includes(CONST.ROLE.PATROL)) return await qyWorkorderCreate(params); | |
| 703 | + if (USER_ROLES.includes(CONST.ROLE.PATROL)) return await qyWorkorderCreateBatch(params); | |
| 703 | 704 | |
| 704 | 705 | |
| 705 | 706 | } |
| ... | ... | @@ -747,7 +748,8 @@ if (hasRepeat) { |
| 747 | 748 | pressingType: item.pressingType, |
| 748 | 749 | busiLine: busiLineCnToEn(item.busiLineCn), |
| 749 | 750 | busiType: busiLineCnToEn(item.busiLineCn), |
| 750 | - expectedFinishDate: dateToTimestamp(item.expectedFinishDate), | |
| 751 | + // 未填希望完成时间时传 undefined(JSON 序列化会丢弃),避免后端把空串按 0 解析成 1970-01-01 | |
| 752 | + expectedFinishDate: dateToTimestamp(item.expectedFinishDate) || undefined, | |
| 751 | 753 | problemsImgs: problemImgs.getSuccessImgUrls(), |
| 752 | 754 | remark: baseForm.problemDesc.trim(), |
| 753 | 755 | latLonType: 2, | ... | ... |