|
|
@@ -70,13 +70,14 @@
|
|
|
|
|
|
<view class="cell-bottom">
|
|
|
<view
|
|
|
- v-if="!item.mainChecker == null && item.taskStatus === PressureCheckerMyTaskStatus.RECORD_INPUT"
|
|
|
+ v-if="
|
|
|
+ !item.mainChecker == null &&
|
|
|
+ item.taskStatus === PressureCheckerMyTaskStatus.RECORD_INPUT
|
|
|
+ "
|
|
|
class="claim-btn white-btn"
|
|
|
@click="fetchClaimEquipments(item.id, item.mainChecker != null)"
|
|
|
>
|
|
|
- <text class="white-btn-text">
|
|
|
- 认领
|
|
|
- </text>
|
|
|
+ <text class="white-btn-text">认领</text>
|
|
|
</view>
|
|
|
<view
|
|
|
v-if="item.mainChecker != null"
|
|
|
@@ -117,7 +118,10 @@
|
|
|
<button
|
|
|
class="operate-btn white-btn"
|
|
|
:style="!selectedEquipments.length ? { opacity: 0.5 } : {}"
|
|
|
- @click="selectedEquipments.length && showBatchClaimPopup({ text: '是否认领已选择的设备?', isClaim: false })"
|
|
|
+ @click="
|
|
|
+ selectedEquipments.length &&
|
|
|
+ showBatchClaimPopup({ text: '是否认领已选择的设备?', isClaim: false })
|
|
|
+ "
|
|
|
>
|
|
|
批量认领
|
|
|
</button>
|
|
|
@@ -199,14 +203,24 @@
|
|
|
<view v-if="showSuspendPopup" class="popup-mask" @click="closeSuspendPopup">
|
|
|
<view class="popup-content suspend-popup" @click.stop>
|
|
|
<text class="popup-title">客户拒检</text>
|
|
|
+ <view class="form-item">
|
|
|
+ <text class="form-label">拒检类别</text>
|
|
|
+ <wd-picker
|
|
|
+ v-model="suspendReasonDict"
|
|
|
+ :columns="refuseCategoryColumns"
|
|
|
+ placeholder="请选择拒检类别"
|
|
|
+ />
|
|
|
+ </view>
|
|
|
<textarea
|
|
|
+ v-if="suspendReasonDict === '5'"
|
|
|
v-model="suspendReason"
|
|
|
class="suspend-textarea"
|
|
|
- placeholder="请输入中止检验原因"
|
|
|
+ placeholder="请输入拒绝检验原因"
|
|
|
/>
|
|
|
- <view class="popup-actions">
|
|
|
+ <view class="popup-actions suspend-actions">
|
|
|
<button class="action-btn cancel-btn" @click="closeSuspendPopup">取消</button>
|
|
|
- <button class="action-btn confirm-btn" @click="suspendCheck">确定</button>
|
|
|
+ <button class="action-btn confirm-btn" @click="suspendCheck(1)">上报市局</button>
|
|
|
+ <button class="action-btn warn-btn" @click="suspendCheck(0)">无需上报</button>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
@@ -277,11 +291,16 @@ import {
|
|
|
PressureCheckerMyTaskStatus,
|
|
|
PressureCheckerMyTaskStatusMap,
|
|
|
EquipmentType,
|
|
|
+ getStrDictOptions,
|
|
|
} from '@/utils/dictMap'
|
|
|
import dayjs from 'dayjs'
|
|
|
import UpdateSafetyManagerPopup from '@/pages/unClaim/components/UpdateSafetyManagerPopup.vue'
|
|
|
import { TaskOrderFuncName, requestFunc } from '@/api/ApiRouter/taskOrder'
|
|
|
-import { getBoilerTaskItemListByOrderId, addInspectProject, confirmBoilerEquipmentBatchClaim } from '@/api/boiler/boilerTaskOrder'
|
|
|
+import {
|
|
|
+ getBoilerTaskItemListByOrderId,
|
|
|
+ addInspectProject,
|
|
|
+ confirmBoilerEquipmentBatchClaim,
|
|
|
+} from '@/api/boiler/boilerTaskOrder'
|
|
|
import { updateEquipBoilerSecurityManager } from '@/api/boiler/boilerEquip'
|
|
|
import NavBar from '@/components/NavBar/NavBar.vue'
|
|
|
import BoilerCheckProject from '@/pages/taskOnline/components/BoilerCheckProject.vue'
|
|
|
@@ -317,6 +336,13 @@ const tipsPopupData = ref<PopupData>({ text: '', isClaim: false })
|
|
|
const showMoreOperate = ref(false)
|
|
|
const showSuspendPopup = ref(false)
|
|
|
const suspendReason = ref('')
|
|
|
+const suspendReasonDict = ref('')
|
|
|
+const refuseCategoryColumns = computed(() => {
|
|
|
+ return getStrDictOptions('refuseInspectedCategory').map((item: any) => ({
|
|
|
+ label: item.label,
|
|
|
+ value: item.value,
|
|
|
+ }))
|
|
|
+})
|
|
|
|
|
|
const showInspectionplanPopup = ref(false)
|
|
|
const inspectionplanName = ref('')
|
|
|
@@ -530,7 +556,7 @@ const handleCheckProjectChange = (selectedItems: any[]) => {
|
|
|
currentSelectedCheckProjectItems.value = selectedItems
|
|
|
}
|
|
|
|
|
|
-const handleCheckProjectConfirm = (checkProjectItems: any[]) => {
|
|
|
+const handleCheckProjectConfirm = async (checkProjectItems: any[]) => {
|
|
|
const addProjectList = []
|
|
|
selectedEquipments.value.forEach((item: any) => {
|
|
|
checkProjectItems.forEach((project: any) => {
|
|
|
@@ -541,12 +567,22 @@ const handleCheckProjectConfirm = (checkProjectItems: any[]) => {
|
|
|
addProjectList.push(newItem)
|
|
|
})
|
|
|
})
|
|
|
- addInspectProject({
|
|
|
- itemList: addProjectList,
|
|
|
- // 200 表示锅炉 300是管道
|
|
|
- type: 200,
|
|
|
- })
|
|
|
closeCheckProjectPopup()
|
|
|
+ uni.showLoading({ title: '提交中...' })
|
|
|
+ try {
|
|
|
+ await addInspectProject({
|
|
|
+ itemList: addProjectList,
|
|
|
+ // 200 表示锅炉 300是管道
|
|
|
+ type: 200,
|
|
|
+ })
|
|
|
+ initSelect()
|
|
|
+ await fetchCheckerOnlineEquipmentList()
|
|
|
+ } catch (error) {
|
|
|
+ console.error('添加检验项目失败:', error)
|
|
|
+ uni.showToast({ title: '添加项目失败', icon: 'error' })
|
|
|
+ } finally {
|
|
|
+ uni.hideLoading()
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
const showSuspendPopupFunc = () => {
|
|
|
@@ -558,23 +594,33 @@ const showSuspendPopupFunc = () => {
|
|
|
return uni.showToast({ title: '请先选择设备', icon: 'error' })
|
|
|
}
|
|
|
showMoreOperate.value = false
|
|
|
+ suspendReasonDict.value = ''
|
|
|
+ suspendReason.value = ''
|
|
|
showSuspendPopup.value = true
|
|
|
}
|
|
|
|
|
|
const closeSuspendPopup = () => {
|
|
|
showSuspendPopup.value = false
|
|
|
+ suspendReasonDict.value = ''
|
|
|
suspendReason.value = ''
|
|
|
}
|
|
|
|
|
|
-const suspendCheck = async () => {
|
|
|
- if (!suspendReason.value.trim()) {
|
|
|
- return uni.showToast({ title: '请输入中止检验原因', icon: 'error' })
|
|
|
+const suspendCheck = async (flag: number) => {
|
|
|
+ if (!suspendReasonDict.value) {
|
|
|
+ return uni.showToast({ title: '请选择拒检类别', icon: 'error' })
|
|
|
+ }
|
|
|
+ if (suspendReasonDict.value === '5' && !suspendReason.value.trim()) {
|
|
|
+ return uni.showToast({ title: '请输入拒绝检验原因', icon: 'error' })
|
|
|
}
|
|
|
- closeSuspendPopup()
|
|
|
uni.showLoading({ title: '加载中' })
|
|
|
const ids = selectedEquipments.value.map((item: any) => item.mainID)
|
|
|
try {
|
|
|
- const reqData = { orderItemIds: ids, reason: suspendReason.value, flag: 1 }
|
|
|
+ const reqData = {
|
|
|
+ orderItemIds: ids,
|
|
|
+ reason: suspendReason.value,
|
|
|
+ reasonDict: suspendReasonDict.value,
|
|
|
+ flag,
|
|
|
+ }
|
|
|
const result = await requestFunc(TaskOrderFuncName.BatchSuspendEquip, equipType, reqData)
|
|
|
uni.hideLoading()
|
|
|
if (result?.code === 0) {
|
|
|
@@ -587,8 +633,10 @@ const suspendCheck = async () => {
|
|
|
uni.showToast({ title: msg, icon: 'error' })
|
|
|
}
|
|
|
} catch (error) {
|
|
|
- uni.hideLoading()
|
|
|
uni.showToast({ title: '中止检验失败', icon: 'error' })
|
|
|
+ } finally {
|
|
|
+ closeSuspendPopup()
|
|
|
+ uni.hideLoading()
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -599,7 +647,7 @@ const createInform = async () => {
|
|
|
}
|
|
|
if (!orderId.value) return
|
|
|
|
|
|
- if(selectedEquipments.value.length !== 1) {
|
|
|
+ if (selectedEquipments.value.length !== 1) {
|
|
|
return uni.showToast({ title: '只能选择一个设备添加重大问题线索', icon: 'error' })
|
|
|
}
|
|
|
|
|
|
@@ -609,7 +657,6 @@ const createInform = async () => {
|
|
|
return uni.showToast({ title: '该设备已添加了重大问题线索', icon: 'error' })
|
|
|
}
|
|
|
|
|
|
-
|
|
|
uni.showLoading({ title: '提交中...', mask: true })
|
|
|
try {
|
|
|
const orderFormResp = await requestFunc(TaskOrderFuncName.GetOrderForm, equipType, {
|
|
|
@@ -625,7 +672,7 @@ const createInform = async () => {
|
|
|
const addMajorIssueResp = await requestFunc(TaskOrderFuncName.AddMajorIssues, equipType, {
|
|
|
orderFormEnterReqVO: {
|
|
|
businessType: 400,
|
|
|
- modifiedReason: "",
|
|
|
+ modifiedReason: '',
|
|
|
orderId: orderId.value,
|
|
|
orderItemId: selectedEquipment.mainID,
|
|
|
},
|
|
|
@@ -735,7 +782,8 @@ const handleUpdateSafetyManagerConfirm = async (params: { name: string; phone: s
|
|
|
if (isSuccess) {
|
|
|
uni.showToast({ title: '修改成功', icon: 'success' })
|
|
|
showUpdateContactPopup.value = false
|
|
|
- refreshList()
|
|
|
+ initSelect()
|
|
|
+ await refreshList()
|
|
|
} else {
|
|
|
uni.showToast({ title: '修改失败', icon: 'none' })
|
|
|
}
|
|
|
@@ -1093,6 +1141,20 @@ const handleCalcTotalFee = (reportDOList: any) => {
|
|
|
background-color: #2f8eff;
|
|
|
}
|
|
|
|
|
|
+.warn-btn {
|
|
|
+ color: #fff;
|
|
|
+ background-color: #e6a23c;
|
|
|
+}
|
|
|
+
|
|
|
+.suspend-actions {
|
|
|
+ gap: 8px;
|
|
|
+}
|
|
|
+
|
|
|
+.suspend-actions .action-btn {
|
|
|
+ flex: 1;
|
|
|
+ width: auto;
|
|
|
+}
|
|
|
+
|
|
|
.more-operate-overlay {
|
|
|
position: fixed;
|
|
|
top: 0;
|