|
|
@@ -183,7 +183,7 @@
|
|
|
</el-table-column>
|
|
|
<el-table-column label="MIS系统工单编码" align="center" prop="misNo" min-width="150">
|
|
|
<template #default="scope">
|
|
|
- {{ scope.row.misNo || '-' }}
|
|
|
+ {{ scope.row.infoEntry == '1' ? scope.row.misNo || '-' : '-' }}
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="接单人" align="center" prop="acceptUserName">
|
|
|
@@ -338,6 +338,19 @@
|
|
|
</el-row>
|
|
|
<el-row :gutter="20">
|
|
|
<el-col :span="12">
|
|
|
+ <el-form-item label="信息录入" prop="infoEntry">
|
|
|
+ <el-radio-group v-model="form.infoEntry" @change="handleInfoEntryChange">
|
|
|
+ <el-radio
|
|
|
+ v-for="dict in gxt_info_entry"
|
|
|
+ :key="dict.value"
|
|
|
+ :label="dict.value"
|
|
|
+ >
|
|
|
+ {{ dict.label }}
|
|
|
+ </el-radio>
|
|
|
+ </el-radio-group>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="12" v-if="form.infoEntry == '1'">
|
|
|
<el-form-item label="MIS工单编码" prop="misNo">
|
|
|
<el-input v-model="form.misNo"
|
|
|
placeholder="请输入MIS工单编码或点击搜索选择"
|
|
|
@@ -371,10 +384,34 @@
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="外委人员数(人)" prop="wwryNum">
|
|
|
+ <el-input-number
|
|
|
+ v-model="form.wwryNum"
|
|
|
+ placeholder="请输入外委人员数"
|
|
|
+ controls-position="right"
|
|
|
+ style="width: 100%"
|
|
|
+ class="input-number-left"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="外来人员数(人)" prop="wlryNum">
|
|
|
+ <el-input-number
|
|
|
+ v-model="form.wlryNum"
|
|
|
+ placeholder="请输入外来人员数"
|
|
|
+ controls-position="right"
|
|
|
+ style="width: 100%"
|
|
|
+ class="input-number-left"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
<el-row :gutter="20">
|
|
|
<el-col :span="24">
|
|
|
<el-form-item label="维保内容" prop="content">
|
|
|
- <el-input v-model="form.content" type="textarea" :rows="3" readonly />
|
|
|
+ <el-input v-model="form.content" type="textarea" :rows="3" :readonly="form.infoEntry == '1'" />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
@@ -713,7 +750,7 @@
|
|
|
value-format="YYYY-MM-DD HH:mm"
|
|
|
placeholder="请选择开始时间"
|
|
|
style="width: 100%"
|
|
|
- readonly
|
|
|
+ :readonly="finishForm.infoEntry == '1'"
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
@@ -727,7 +764,7 @@
|
|
|
value-format="YYYY-MM-DD HH:mm"
|
|
|
placeholder="请选择结束时间"
|
|
|
style="width: 100%"
|
|
|
- readonly
|
|
|
+ :readonly="finishForm.infoEntry == '1'"
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
@@ -774,7 +811,7 @@
|
|
|
<el-row>
|
|
|
<el-col :span="24">
|
|
|
<el-form-item label="检修人员">
|
|
|
- <el-input v-model="finishForm.workGroupMemberName" readonly />
|
|
|
+ <el-input v-model="finishForm.workGroupMemberName" :readonly="finishForm.infoEntry == '1'" />
|
|
|
</el-form-item>
|
|
|
<!-- <el-form-item label="检修人员" prop="memberIds">-->
|
|
|
<!-- <el-checkbox-group v-model="finishForm.memberIds" style="width: 100%" @change="handleMembersChange">-->
|
|
|
@@ -1307,7 +1344,7 @@
|
|
|
<el-col :span="24">
|
|
|
<el-form-item label="检修人员">{{ detailData.workGroupMemberName || '-' }}</el-form-item>
|
|
|
</el-col>
|
|
|
- <el-col :span="24">
|
|
|
+ <el-col :span="24" v-if="detailData.infoEntry == '1'">
|
|
|
<el-form-item label="MIS工单编码">{{ detailData.misNo || '-' }}</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="24">
|
|
|
@@ -1779,13 +1816,15 @@ const {
|
|
|
gxt_inspection_type,
|
|
|
gxt_pause_reasons,
|
|
|
gxt_repair_order_flow_action_type,
|
|
|
- gxt_order_suspend_reason
|
|
|
+ gxt_order_suspend_reason,
|
|
|
+ gxt_info_entry
|
|
|
} = proxy.useDict(
|
|
|
"gxt_work_order_status",
|
|
|
"gxt_inspection_type",
|
|
|
"gxt_pause_reasons",
|
|
|
"gxt_repair_order_flow_action_type",
|
|
|
- "gxt_order_suspend_reason"
|
|
|
+ "gxt_order_suspend_reason",
|
|
|
+ "gxt_info_entry"
|
|
|
)
|
|
|
const orderList = ref([])
|
|
|
const open = ref(false)
|
|
|
@@ -2025,6 +2064,8 @@ const data = reactive({
|
|
|
// memberIds: [{ required: true, message: "请至少选择一名检修人员", trigger: "change" }]
|
|
|
},
|
|
|
finishRules: {
|
|
|
+ realStartTime: [{ required: true, message: "请选择开始时间", trigger: "change" }],
|
|
|
+ realEndTime: [{ required: true, message: "请选择结束时间", trigger: "change" }]
|
|
|
// teamLeaderId: [{ required: true, message: "请选择工作负责人", trigger: "change" }],
|
|
|
// inspectionType: [{ required: true, message: "请选择维保类型", trigger: "change" }],
|
|
|
// realContent: [{ required: true, message: "请输入实际维保内容", trigger: "change" }],
|
|
|
@@ -2173,6 +2214,7 @@ function handleSelectionChange(selection) {
|
|
|
/** 新增按钮操作 */
|
|
|
function handleAdd() {
|
|
|
reset()
|
|
|
+ form.value.infoEntry = "1"
|
|
|
//生成工单编码
|
|
|
genCode('WORK_ORDER_CODE').then(response =>{
|
|
|
form.value.workOrderProjectNo = response;
|
|
|
@@ -2268,30 +2310,36 @@ function handleFinish(row) {
|
|
|
getGxtOrder(row.id).then(response => {
|
|
|
finishForm.value = response.data
|
|
|
finishForm.value.orderId = row.id
|
|
|
- if (row.misNo != null) {
|
|
|
- listMisInfo({misNo: row.misNo}).then(response => {
|
|
|
- const misInfo = response.rows
|
|
|
- debugger
|
|
|
- if (misInfo.length > 0) {
|
|
|
- finishForm.value.realStartTime = misInfo[0].realStartTime
|
|
|
- finishForm.value.realEndTime = misInfo[0].realEndTime
|
|
|
+ if (finishForm.value.infoEntry != null && finishForm.value.infoEntry == '1') {
|
|
|
+ if (row.misNo != null) {
|
|
|
+ listMisInfo({misNo: row.misNo}).then(response => {
|
|
|
+ const misInfo = response.rows
|
|
|
+ debugger
|
|
|
+ if (misInfo.length > 0) {
|
|
|
+ finishForm.value.realStartTime = misInfo[0].realStartTime
|
|
|
+ finishForm.value.realEndTime = misInfo[0].realEndTime
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ listWorkPerson({misNo: row.misNo}).then(response => {
|
|
|
+ finishForm.value.workOrderPersonList = response.rows;
|
|
|
+ if (finishForm.value.workOrderPersonList) {
|
|
|
+ const nickNames = finishForm.value.workOrderPersonList
|
|
|
+ .map(person => person.nickName)
|
|
|
+ .join(',');
|
|
|
+ finishForm.value.workGroupMemberName = nickNames
|
|
|
+ finishDialogVisible.value = true
|
|
|
+ // 打开对话框后重置表单验证错误
|
|
|
+ proxy.$nextTick(() => {
|
|
|
+ proxy.$refs["finishRef"]?.clearValidate()
|
|
|
+ })
|
|
|
}
|
|
|
})
|
|
|
+ } else {
|
|
|
+ finishForm.value.realStartTime = null
|
|
|
+ finishForm.value.realEndTime = null
|
|
|
+ finishDialogVisible.value = true
|
|
|
}
|
|
|
- listWorkPerson({misNo: row.misNo }).then(response => {
|
|
|
- finishForm.value.workOrderPersonList = response.rows;
|
|
|
- if (finishForm.value.workOrderPersonList) {
|
|
|
- const nickNames = finishForm.value.workOrderPersonList
|
|
|
- .map(person => person.nickName)
|
|
|
- .join(',');
|
|
|
- finishForm.value.workGroupMemberName = nickNames
|
|
|
- finishDialogVisible.value = true
|
|
|
- // 打开对话框后重置表单验证错误
|
|
|
- proxy.$nextTick(() => {
|
|
|
- proxy.$refs["finishRef"]?.clearValidate()
|
|
|
- })
|
|
|
- }
|
|
|
- })
|
|
|
// finishForm.value.memberIds = []
|
|
|
// listUser({ pageNum: 1, pageSize: 100, deptId: row.pcsStationId }).then(response => {
|
|
|
// userList.value = response.rows
|
|
|
@@ -2327,7 +2375,8 @@ function saveFinishWorkOrder() {
|
|
|
proxy.$modal.msgSuccess("结单成功")
|
|
|
getList()
|
|
|
}).catch(error => {
|
|
|
- proxy.$modal.msgError("结单失败:" + (error?.response?.data?.msg || "未知错误"))
|
|
|
+ debugger
|
|
|
+ proxy.$modal.msgError("结单失败:" + (error? error.message || "未知错误" : "未知错误"))
|
|
|
})
|
|
|
}
|
|
|
|
|
|
@@ -2883,7 +2932,15 @@ function onEquipmentSelected(row) {
|
|
|
equipmentSelectVisible.value = false
|
|
|
commonKey++
|
|
|
}
|
|
|
-
|
|
|
+const handleInfoEntryChange = (val) => {
|
|
|
+ form.value.content = undefined;
|
|
|
+ // 选中2工作票编号时修改其他值
|
|
|
+ if (val === '2') {
|
|
|
+ form.value.misOrderNo = undefined;
|
|
|
+ form.value.realStartTime = undefined;
|
|
|
+ form.value.realEndTime = undefined;
|
|
|
+ }
|
|
|
+};
|
|
|
|
|
|
|
|
|
getList()
|