|
|
@@ -107,6 +107,7 @@
|
|
|
v-model="workPermitNum"
|
|
|
maxlength="20"
|
|
|
:disabled="infoEntry == '1'"
|
|
|
+ @change="handleWorkPermitNumChange"
|
|
|
/>
|
|
|
</view>
|
|
|
</view>
|
|
|
@@ -141,7 +142,7 @@
|
|
|
placeholder="请选择结束时间"
|
|
|
v-model="realEndTime"
|
|
|
:disabled="true"
|
|
|
-
|
|
|
+
|
|
|
/>
|
|
|
<!-- <text class="input-field">
|
|
|
{{ realEndTime != '' ? realEndTime : '请选择结束时间' }}
|
|
|
@@ -392,7 +393,7 @@
|
|
|
</scroll-view>
|
|
|
</view>
|
|
|
</view>
|
|
|
-
|
|
|
+
|
|
|
<!-- 工作负责人弹窗 -->
|
|
|
<view v-if="showLeaderPicker" class="picker-modal">
|
|
|
<view class="modal-mask" @click="showLeaderPicker = false"></view>
|
|
|
@@ -418,7 +419,7 @@
|
|
|
:class="{ 'selected': index === selectedTeamLeaderIndex }"
|
|
|
@click="selectLeaderManually(user, index)"
|
|
|
>
|
|
|
-
|
|
|
+
|
|
|
<text class="option-text">{{ (user['nickName'] as string | null) ?? '' }}</text>
|
|
|
<text class="option-text">{{ ((user['dept'] as UTSJSONObject | null)?.['deptName'] as string | null) ?? '' }}</text>
|
|
|
<text v-if="index === selectedTeamLeaderIndex" class="option-check">✓</text>
|
|
|
@@ -506,7 +507,7 @@
|
|
|
const workAreaDictList = ref<SysDictData[]>([]) // 工作部位字典列表
|
|
|
const selectedWorkAreas = ref<SysDictData[]>([]) // 选中的工作部位
|
|
|
const showWorkAreaPicker = ref<boolean>(false) // 显示工作部位选择器
|
|
|
-
|
|
|
+
|
|
|
// 选中的负责人信息
|
|
|
const selectedTeamLeaderName = ref<string>('')
|
|
|
const selectedTeamLeaderIndex = ref<number>(-1)
|
|
|
@@ -766,6 +767,21 @@
|
|
|
workGroupMemberName.value = '';
|
|
|
}
|
|
|
};
|
|
|
+
|
|
|
+ // 工作票编号变化处理
|
|
|
+ const handleWorkPermitNumChange = async(): Promise<void> => {
|
|
|
+ if (infoEntry.value == '2') {
|
|
|
+ // 查询工作票编号是否已存在
|
|
|
+ const response = await getOrderList(1, 10, workPermitNum.value, '')
|
|
|
+ const responseObj = response as UTSJSONObject
|
|
|
+ const rows = responseObj['rows'] as UTSJSONObject[] | null
|
|
|
+ if (rows != null && rows.length > 0) {
|
|
|
+ uni.showToast({ title: '工作票编号:' + workPermitNum.value + '已存在', icon: 'none' })
|
|
|
+ workPermitNum.value = ''
|
|
|
+ return
|
|
|
+ }
|
|
|
+ }
|
|
|
+ };
|
|
|
|
|
|
// MIS工单编码输入处理
|
|
|
const handleMisNoInputFocus = (): void => {
|
|
|
@@ -861,7 +877,7 @@
|
|
|
teamLeaderId.value = (leaderPerson['userId'] as Number | null) ?? null
|
|
|
teamLeaderName.value = (leaderPerson['nickName'] as string | null) ?? ''
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
const nickNames = rows
|
|
|
.filter(person => person.isLeader != 1)
|
|
|
.map(person => (person.nickName as string | null) ?? '')
|
|
|
@@ -918,7 +934,7 @@
|
|
|
userKeyword.value = "";
|
|
|
userList.value = userAllList.value
|
|
|
};
|
|
|
-
|
|
|
+
|
|
|
// 搜索工作负责人
|
|
|
const handleSearch = (): void => {
|
|
|
const keyword = teamKeyword.value
|
|
|
@@ -927,7 +943,7 @@
|
|
|
return nickName != null && nickName.indexOf(keyword) >= 0
|
|
|
})
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
// 清空搜索工作负责人
|
|
|
const clearSearch = (): void => {
|
|
|
teamKeyword.value = ""
|
|
|
@@ -1137,7 +1153,7 @@
|
|
|
});
|
|
|
return false;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
if (teamLeaderName.value == '') {
|
|
|
uni.showToast({
|
|
|
title: '请选择工作负责人',
|
|
|
@@ -1145,7 +1161,7 @@
|
|
|
});
|
|
|
return false;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
if (workGroupMemberName.value == '') {
|
|
|
uni.showToast({
|
|
|
title: '请选择工作班成员',
|
|
|
@@ -1154,14 +1170,6 @@
|
|
|
return false;
|
|
|
}
|
|
|
|
|
|
- // if (infoEntry.value == '2' && (workGroupMemberName.value == '' || selectedUsers.value.length == 0)) {
|
|
|
- // uni.showToast({
|
|
|
- // title: '请选择工作班成员',
|
|
|
- // icon: 'none'
|
|
|
- // });
|
|
|
- // return false;
|
|
|
- // }
|
|
|
-
|
|
|
return true;
|
|
|
};
|
|
|
|
|
|
@@ -1916,6 +1924,4 @@
|
|
|
font-size: 24rpx;
|
|
|
color: #666;
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
</style>
|