diff --git a/common/utils/common.js b/common/utils/common.js
index d8774fd..0111653 100644
--- a/common/utils/common.js
+++ b/common/utils/common.js
@@ -25,7 +25,7 @@ export const nextStepMap = {
},
ylInspector: {
name: '巡查员验收',
- // btnText: '验收',
+ btnText: '验收',
ysShow:true,
operateTypePass: 140, //巡查员验收通过: 140
operateTypeNoPass: 240, // 巡查员验收不通过:240
@@ -70,7 +70,8 @@ export const nextStepMap = {
ylAiInspectorStart: {
name: 'AI工单派发人员',
ysShow:false,
- btnText: '',
+ btnText: '结束工单',
+ // operateTypePass: 200, //巡查员结束工单:200
operateTypePass: 40, // 大区经理分配:40
operateTypeNoPass: 50, // 大区经理退回:50
backShow: false,
diff --git a/manifest.json b/manifest.json
index 4a8c964..f35456e 100644
--- a/manifest.json
+++ b/manifest.json
@@ -54,7 +54,7 @@
},
/* 小程序特有相关 */
"mp-weixin" : {
- "appid" : "wx64368a9b9e799172",
+ "appid" : "wxcb4cd34066b97d82",
"setting" : {
"urlCheck" : false
},
diff --git a/pages-sub/problem/ai-manage/index.vue b/pages-sub/problem/ai-manage/index.vue
index 2f76d95..e9bb73a 100644
--- a/pages-sub/problem/ai-manage/index.vue
+++ b/pages-sub/problem/ai-manage/index.vue
@@ -95,16 +95,13 @@
{{ timeFormat(item.createTime, 'yyyy-mm-dd hh:MM:ss') }}
-
+
-
- 验收
+ {{ nextStepMap[item.taskKey].btnText }}
+
-
-
-
- 详情
+ 详情
@@ -122,6 +119,9 @@
>
+
+ 工单详情
+
工单编号:
{{ item.orderNo || '-' }}
@@ -142,9 +142,9 @@
紧急程度:{{ uni.$dict.getDictLabel('workorder_pressing_type', item.pressingType) }}
-
- 工单详情
-
+
+
+
工单状态:
@@ -447,7 +447,7 @@ const handleRenew = (item) => {
const handleProcess = async (item) => {
if (!item) return uni.showToast({title: '工单信息异常', icon: 'none'});
const stepName = nextStepMap[item.taskKey]?.name;
-
+ console.log(stepName)
try {
// 大区经理分配
if (stepName === '大区经理分配') {
@@ -486,6 +486,23 @@ const handleProcess = async (item) => {
}
});
}
+ else if (stepName === 'AI工单派发人员') {
+ uni.showModal({
+ title: "结束工单",
+ content: "请确定是否结束工单?",
+ success: async (res) => {
+ if (res.confirm) {
+ const requestData = {
+ workerDataId: item.id, taskKey: 'ylInspectorStart', taskId: item.taskId,
+ operateType: 200, agree: 1, reason: 'AI工单派发人员结束工单'
+ };
+ await callApprovalApi(requestData, item.taskKey);
+ uni.showToast({title: '结束成功', icon: 'success'});
+ refreshOrderList();
+ }
+ }
+ });
+ }
} catch (error) {
console.error('处理工单失败:', error);
uni.showToast({title: '处理失败,请重试', icon: 'none'});
@@ -576,7 +593,10 @@ const handleAcceptModalConfirm = async () => {
};
// ========== 页面生命周期 ==========
-onLoad(() => {
+// onLoad(() => {
+// refreshOrderList();
+// });
+onShow(() => {
refreshOrderList();
});
@@ -621,6 +641,11 @@ onLoad(() => {
box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.04);
}
+.u-body-item-btn-wrap :deep(.u-button--large){
+ height: 28px;
+}
+
+
// 弹窗公共样式
.reject-modal-content, .accept-modal-content {
width: 100%;
diff --git a/pages-sub/problem/regional-order-manage/order-detail.vue b/pages-sub/problem/regional-order-manage/order-detail.vue
index d853af2..969168e 100644
--- a/pages-sub/problem/regional-order-manage/order-detail.vue
+++ b/pages-sub/problem/regional-order-manage/order-detail.vue
@@ -426,6 +426,7 @@ const callApprovalApi = async (params: any, taskKey: string) => {
if (USER_ROLES.includes('regional_manager')) return await daquUniversalApproval(params);
if (USER_ROLES.includes('Inspector_global')) return await dcyUniversalApproval(params);
if (USER_ROLES.includes('patrol_global')) return await qyUniversalApproval(params);
+ if (USER_ROLES.includes('AI_dispatcher')) return await aiUniversalApproval(params);
// if (USER_ROLES.includes('AI_dispatcher')) return await aiUniversalApproval(params);
throw new Error('未匹配到对应的审批接口,请检查角色或工单taskKey');
};
@@ -786,6 +787,25 @@ const handleProcess = async (item: any) => {
},
});
}
+ else if (stepName === 'AI工单派发人员') {
+ uni.showModal({
+ title: "结束工单",
+ content: "请确定是否结束工单?",
+ success: async (res) => {
+ if (res.confirm) {
+ const requestData = {
+ workerDataId: item.id, taskKey: 'ylInspectorStart', taskId: item.taskId,
+ operateType: 200, agree: 1, reason: 'AI工单派发人员结束工单'
+ };
+ await callApprovalApi(requestData, item.taskKey);
+ uni.showToast({title: '结束成功', icon: 'success'});
+ eventChannel.value.emit('needRefresh');
+ uni.navigateBack({ delta: 1 });
+ }
+ }
+ });
+ }
+
} catch (error: any) {
console.error('处理工单失败:', error);
showToast(error.msg || error.message || '处理失败,请重试');
diff --git a/pages/login/index.vue b/pages/login/index.vue
index 2c69a7f..3f62a49 100644
--- a/pages/login/index.vue
+++ b/pages/login/index.vue
@@ -320,6 +320,12 @@ onMounted(() => {
\ No newline at end of file