|
|
@@ -150,7 +150,7 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
-
|
|
|
+
|
|
|
<!-- 挂起结束时间 -->
|
|
|
<view class="info-item" v-if="resumeInfo != null && resumeShow">
|
|
|
<view class="info-label">
|
|
|
@@ -163,7 +163,7 @@
|
|
|
placeholder="请选择挂起结束时间"
|
|
|
v-model="resumeTime"
|
|
|
type="none"
|
|
|
-
|
|
|
+
|
|
|
/>
|
|
|
</view>
|
|
|
</view>
|
|
|
@@ -230,6 +230,7 @@
|
|
|
placeholder="请选择工作负责人"
|
|
|
v-model="teamLeaderName"
|
|
|
@click="showLeaderPicker = true"
|
|
|
+ :disabled="infoEntry == '1'"
|
|
|
/>
|
|
|
</view>
|
|
|
</view>
|
|
|
@@ -317,7 +318,7 @@
|
|
|
@cancel="showEndTimePicker = false">
|
|
|
</l-date-time-picker>
|
|
|
</l-popup>
|
|
|
-
|
|
|
+
|
|
|
<l-popup v-model="showResumeTimePicker" position="bottom" :safe-area-inset-bottom="true" :z-index="10000">
|
|
|
<l-date-time-picker
|
|
|
title="选择挂起结束时间"
|
|
|
@@ -389,11 +390,11 @@
|
|
|
@click="selectMisItem(item, index)"
|
|
|
>
|
|
|
<!-- <text class="option-text">{{ option.label }}</text> -->
|
|
|
- <view>
|
|
|
+ <view>
|
|
|
<text class="option-text">MIS工单编码</text>
|
|
|
<text class="option-text">工作票编号</text>
|
|
|
</view>
|
|
|
- <view>
|
|
|
+ <view>
|
|
|
<text class="option-text">{{ ((item['misNo'] as string | null) ?? '-')}}</text>
|
|
|
<text class="option-text">{{ item['workPermitNum'] as string | null ?? '-' }}</text>
|
|
|
</view>
|
|
|
@@ -487,7 +488,7 @@
|
|
|
import type { acceptOrderInfo } from '../../../types/order'
|
|
|
import type { WorkOrderFlow } from '../../../types/flow'
|
|
|
import { getOrderInfoById, getRepairOrderInfoById, returnRepairOrder, repairFinishOrder } from '../../../api/order/detail'
|
|
|
- import { getMisInfoList, listWorkPerson, getOrderList, listAutoMisInfo } from '../../../api/order/list'
|
|
|
+ import { getMisInfoList, listWorkPerson, getOrderList, listAutoMisInfo, allListOrder } from '../../../api/order/list'
|
|
|
import type { SysDictData } from '../../../types/dict'
|
|
|
import { getDictDataByType } from '../../../api/dict/index'
|
|
|
import type { UserInfo } from '../../../types/user'
|
|
|
@@ -569,7 +570,6 @@
|
|
|
|
|
|
// 监听开始时间和结束时间变化
|
|
|
watch(realStartTime, (value: string) => {
|
|
|
- console.log('开始时间变化:', value)
|
|
|
// 在这里添加开始时间变化时的处理逻辑
|
|
|
if (resumeInfo.value != null && value != '') {
|
|
|
const suspendTime = (suspendInfo.value?.['actionTime'] as string | null) ?? ''
|
|
|
@@ -602,7 +602,6 @@
|
|
|
})
|
|
|
|
|
|
watch(realEndTime, (value: string) => {
|
|
|
- console.log('结束时间变化:', value)
|
|
|
// 在这里添加结束时间变化时的处理逻辑
|
|
|
if (resumeInfo.value != null && value != '') {
|
|
|
const suspendTime = (suspendInfo.value?.['actionTime'] as string | null) ?? ''
|
|
|
@@ -614,7 +613,7 @@
|
|
|
} else {
|
|
|
resumeShow.value = false
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
} else if(suspendTime != '' && realStartTime.value != '' && new Date(suspendTime).getTime() >= new Date(realStartTime.value).getTime()) { // 作业中挂起
|
|
|
if (realStartTime.value != '' && resumeTime.value != '' && new Date(resumeTime.value).getTime() < new Date(realStartTime.value).getTime()) {
|
|
|
resumeShow.value = true
|
|
|
@@ -819,12 +818,15 @@
|
|
|
workGroupMemberName.value = '';
|
|
|
}
|
|
|
};
|
|
|
-
|
|
|
+
|
|
|
// 工作票编号变化处理
|
|
|
const handleWorkPermitNumChange = async(): Promise<void> => {
|
|
|
if (infoEntry.value == '2') {
|
|
|
// 查询工作票编号是否已存在
|
|
|
- const response = await getOrderList(1, 10, workPermitNum.value, '')
|
|
|
+ const queryParams = {
|
|
|
+ workPermitNum: workPermitNum.value,
|
|
|
+ } as UTSJSONObject;
|
|
|
+ const response = await allListOrder(queryParams)
|
|
|
const responseObj = response as UTSJSONObject
|
|
|
const rows = responseObj['rows'] as UTSJSONObject[] | null
|
|
|
if (rows != null && rows.length > 0) {
|
|
|
@@ -1024,14 +1026,14 @@
|
|
|
realEndTime.value = value
|
|
|
showEndTimePicker.value = false
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
function onResumeTimeConfirm(value: string) {
|
|
|
// 检查新的结束时间是否小于开始时间
|
|
|
if (resumeTime.value != '' && new Date(realStartTime.value as string) > new Date(value)) {
|
|
|
uni.showToast({ title: '结束时间不能小于开始时间', icon: 'none' })
|
|
|
return
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
resumeTime.value = value
|
|
|
showResumeTimePicker.value = false
|
|
|
}
|
|
|
@@ -1297,13 +1299,13 @@
|
|
|
isDealing.value = true
|
|
|
// 确保附件URLs是最新的逗号分隔格式
|
|
|
attachmentUrls.value = uploadedFiles.value.map(file => file.fileName).join(',');
|
|
|
-
|
|
|
+
|
|
|
flowList.value = []
|
|
|
if (resumeTime.value != '' && resumeInfo.value != null && resumeTime.value != (resumeInfo.value['actionTime'] as string | null)) { //存入新的挂起结束时间
|
|
|
resumeInfo.value['actionTime'] = resumeTime.value
|
|
|
flowList.value.push(resumeInfo.value as UTSJSONObject)
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
const finishData = {
|
|
|
id: orderId.value,
|
|
|
orderType: orderType.value,
|
|
|
@@ -1522,7 +1524,7 @@
|
|
|
icon: 'none'
|
|
|
});
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
flowList.value = data['repairOrderFlowList'] as UTSJSONObject[]
|
|
|
if (suspendReason.value != '' && flowList.value.length > 0) {
|
|
|
// 获取最后一个 actionType 等于 'resume' 的项
|
|
|
@@ -1532,12 +1534,12 @@
|
|
|
// 直接给 resumeTime 赋值,无需 formData
|
|
|
resumeTime.value = (lastResumeItem['actionTime'] as string | null) ?? ''
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
const lastSuspendItem = flowList.value.findLast(item => (item['actionType'] as string | null) === 'to_approve') as UTSJSONObject | null
|
|
|
if (lastSuspendItem != null) {
|
|
|
suspendInfo.value = lastSuspendItem
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
}
|
|
|
} else {
|
|
|
const msg = resultObj['msg'] as string | null
|
|
|
@@ -1906,19 +1908,19 @@
|
|
|
.picker-option.selected {
|
|
|
background-color: #f8f9fa;
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
.picker-mis-option {
|
|
|
justify-content: space-between;
|
|
|
align-items: center;
|
|
|
padding: 24rpx 30rpx;
|
|
|
border-bottom: 1rpx solid #f0f0f0;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
.picker-mis-option:last-child {
|
|
|
border-bottom: none;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
.picker-mis-option.selected {
|
|
|
background-color: #f8f9fa;
|
|
|
}
|