|
|
@@ -893,306 +893,33 @@
|
|
|
</template>
|
|
|
</el-dialog>
|
|
|
|
|
|
- <!-- 结单对话框 -->
|
|
|
- <el-dialog title="结单" v-model="finalizeDialogVisible" width="800px" append-to-body @close="closeFinalizeDialog">
|
|
|
- <el-alert type="info" :closable="false" style="border-color: #14b8a6; background-color: #f0fdfa; color: #0d9488; height: 35px;">
|
|
|
- <template #default>
|
|
|
- <i class="fa fa-file-text-o mr-2" style="color: #0d9488;"> 请选择信息录入方式,并上传相关附件完成结单。</i>
|
|
|
- </template>
|
|
|
- </el-alert>
|
|
|
- <h4 class="text-sm font-medium text-gray-800 mb-3"></h4>
|
|
|
- <el-form ref="finalizeFormRef" :model="finalizeForm" :rules="finalizeRules" label-width="120px" label-position="top">
|
|
|
- <el-row>
|
|
|
- <el-col :span="12">
|
|
|
- <el-form-item label="工单编码"><el-input v-model="finalizeForm.workOrderProjectNo" disabled /></el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :span="12">
|
|
|
- <el-form-item label="风机编号"><el-input v-model="finalizeForm.pcsDeviceName" disabled /></el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :span="12">
|
|
|
- <el-form-item label="工单状态">
|
|
|
- <el-select v-model="finalizeForm.workOrderStatus" style="width: 100%" disabled>
|
|
|
- <el-option
|
|
|
- v-for="dict in gxt_work_order_status"
|
|
|
- :key="dict.value"
|
|
|
- :label="dict.label"
|
|
|
- :value="dict.value"
|
|
|
- />
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :span="12">
|
|
|
- <el-form-item label="维保中心"><el-input v-model="finalizeForm.gxtCenter" disabled /> </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :span="12">
|
|
|
- <el-form-item label="场站"><el-input v-model="finalizeForm.pcsStationName" disabled /> </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :span="12">
|
|
|
- <el-form-item label="品牌"><el-input v-model="finalizeForm.brand" disabled /> </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :span="12">
|
|
|
- <el-form-item label="故障代码"><el-input v-model="finalizeForm.faultCode" disabled /> </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :span="24">
|
|
|
- <el-form-item label="故障信息">
|
|
|
- <el-input
|
|
|
- v-model="finalizeForm.faultBarcode"
|
|
|
- type="textarea"
|
|
|
- placeholder="请输入故障信息"
|
|
|
- maxlength="100"
|
|
|
- show-word-limit
|
|
|
- :rows="3"
|
|
|
- disabled
|
|
|
- />
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :span="12">
|
|
|
- <el-form-item label="下发人"><el-input v-model="finalizeForm.assignUserName" disabled /> </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :span="12">
|
|
|
- <el-form-item label="下发时间"><el-input v-model="finalizeForm.assignTime" disabled /> </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :span="12">
|
|
|
- <el-form-item label="接单人"><el-input v-model="finalizeForm.acceptUserName" disabled /> </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :span="12">
|
|
|
- <el-form-item label="接单时间"><el-input v-model="finalizeForm.acceptTime" disabled /> </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :span="12">
|
|
|
- <el-form-item label="工作负责人"><el-input v-model="finalizeForm.teamLeaderName" disabled /> </el-form-item>
|
|
|
- </el-col>
|
|
|
-<!-- <el-col :span="12">-->
|
|
|
-<!-- <el-form-item label="维修方式" prop="repairMethod">-->
|
|
|
-<!-- <el-select-->
|
|
|
-<!-- v-model="finalizeForm.repairMethod"-->
|
|
|
-<!-- placeholder="请选择维修方式"-->
|
|
|
-<!-- style="width: 100%"-->
|
|
|
-<!-- @change="handleRepairMethodChange"-->
|
|
|
-<!-- >-->
|
|
|
-<!-- <el-option-->
|
|
|
-<!-- v-for="dict in gxt_repair_method"-->
|
|
|
-<!-- :key="dict.value"-->
|
|
|
-<!-- :label="dict.label"-->
|
|
|
-<!-- :value="dict.value"-->
|
|
|
-<!-- />-->
|
|
|
-<!-- </el-select>-->
|
|
|
-<!-- </el-form-item>-->
|
|
|
-<!-- </el-col>-->
|
|
|
- </el-row>
|
|
|
- <el-row>
|
|
|
- <el-col :span="12">
|
|
|
- <el-form-item label="信息录入" prop="infoEntry">
|
|
|
- <el-radio-group v-model="finalizeForm.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="finalizeForm.infoEntry == 1">
|
|
|
- <el-form-item label="MIS工单编码" prop="misOrderNo" >
|
|
|
- <el-input
|
|
|
- v-model="finalizeForm.misOrderNo"
|
|
|
- placeholder="请输入MIS工单编码或点击搜索选择"
|
|
|
- clearable
|
|
|
- @focus="handleMisNoInputFocus"
|
|
|
- @blur="handleMisNoInputBlur"
|
|
|
- @input="handleMisNoInput"
|
|
|
- @clear="handleMisNoClear"
|
|
|
- >
|
|
|
- <template #append>
|
|
|
- <el-button @click="handleSelectMisInfo" icon="Search"></el-button>
|
|
|
- </template>
|
|
|
- </el-input>
|
|
|
- <!-- 快速检索下拉框 -->
|
|
|
- <div class="quick-select-dropdown" v-show="showMisNoQuickSelect && quickMisNoList.length > 0">
|
|
|
- <div
|
|
|
- v-for="item in quickMisNoList"
|
|
|
- :key="item.misNo"
|
|
|
- class="quick-select-item"
|
|
|
- @click="handleMisNoQuickSelect(item)">
|
|
|
- <span class="mis-no">{{ item.misNo }}</span>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="quick-select-dropdown no-data" v-show="showMisNoQuickSelect && quickMisNoList.length === 0 && form.misNo">
|
|
|
- <div>未找到匹配的MIS工单</div>
|
|
|
- </div>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <!-- MIS选择组件 -->
|
|
|
- <MisInfoSelectSingle :key="commonKey" v-model="misInfoSelectVisible" @onSelected="onMisInfoSelected" :pcsStationName="finalizeForm.pcsStationName" :pcsDeviceName="finalizeForm.pcsDeviceName"></MisInfoSelectSingle>
|
|
|
- <el-col :span="12" v-if="finalizeForm.infoEntry == 2">
|
|
|
- <el-form-item label="工作票编号" prop="workPermitNum">
|
|
|
- <el-input v-model="workPermitNumProxy" maxlength="20" show-word-limit />
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :span="12">
|
|
|
- <el-form-item label="开始时间" prop="realStartTime">
|
|
|
- <el-date-picker
|
|
|
- v-model="finalizeForm.realStartTime"
|
|
|
- type="datetime"
|
|
|
- format="YYYY-MM-DD HH:mm"
|
|
|
- value-format="YYYY-MM-DD HH:mm"
|
|
|
- placeholder="请选择开始时间"
|
|
|
- style="width: 100%"
|
|
|
- :readonly="finalizeForm.infoEntry == 1"
|
|
|
- :disabled-date="disabledStartDate"
|
|
|
- />
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :span="12">
|
|
|
- <el-form-item label="工作部位" prop="workArea">
|
|
|
- <el-select
|
|
|
- v-model="finalizeForm.workArea"
|
|
|
- multiple
|
|
|
- placeholder="请选择工作部位"
|
|
|
- style="width: 100%"
|
|
|
- >
|
|
|
- <el-option
|
|
|
- v-for="dict in gxt_work_area"
|
|
|
- :key="dict.value"
|
|
|
- :label="dict.label"
|
|
|
- :value="dict.value"
|
|
|
- />
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
-
|
|
|
- <el-col :span="12">
|
|
|
- <el-form-item label="结束时间" prop="realEndTime">
|
|
|
- <el-date-picker
|
|
|
- v-model="finalizeForm.realEndTime"
|
|
|
- type="datetime"
|
|
|
- format="YYYY-MM-DD HH:mm"
|
|
|
- value-format="YYYY-MM-DD HH:mm"
|
|
|
- placeholder="请选择结束时间"
|
|
|
- style="width: 100%"
|
|
|
- :readonly="finalizeForm.infoEntry == 1"
|
|
|
- :disabled-date="disabledEndDate"
|
|
|
- />
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :span="12">
|
|
|
- <el-form-item label="检修人员" prop="workGroupMemberName">
|
|
|
- <el-input
|
|
|
- v-model="finalizeForm.workGroupMemberName"
|
|
|
- placeholder="请输入检修人员"
|
|
|
- maxlength="200"
|
|
|
- show-word-limit
|
|
|
- :readonly="finalizeForm.infoEntry == 1"
|
|
|
- />
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :span="12">
|
|
|
- <el-form-item label="外委人员数(人)" prop="wwryNum">
|
|
|
- <el-input-number
|
|
|
- v-model="finalizeForm.wwryNum"
|
|
|
- placeholder="请输入外委人员数"
|
|
|
- controls-position="right"
|
|
|
- style="width: 100%"
|
|
|
- class="input-number-left"
|
|
|
- :min="0"
|
|
|
- :step="1"
|
|
|
- :precision="0"
|
|
|
- />
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :span="12">
|
|
|
- <el-form-item label="外来人员数(人)" prop="wlryNum">
|
|
|
- <el-input-number
|
|
|
- v-model="finalizeForm.wlryNum"
|
|
|
- placeholder="请输入外来人员数"
|
|
|
- controls-position="right"
|
|
|
- style="width: 100%"
|
|
|
- class="input-number-left"
|
|
|
- :min="0"
|
|
|
- :step="1"
|
|
|
- :precision="0"
|
|
|
- />
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :span="24">
|
|
|
- <el-form-item label="真实故障原因" prop="realContent">
|
|
|
- <el-input v-model="finalizeForm.realFailureReason"
|
|
|
- type="textarea"
|
|
|
- placeholder="请输入真实故障原因,最多500字"
|
|
|
- maxlength="500"
|
|
|
- :rows="5"
|
|
|
- show-word-limit />
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :span="24">
|
|
|
- <el-form-item label="附件(可选)">
|
|
|
- <preview :limit="8" v-model="finalizeForm.attachmentUrls" :filesize="5"></preview>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
- </el-form>
|
|
|
- <template #footer>
|
|
|
- <div class="dialog-footer">
|
|
|
- <el-button @click="closeFinalizeDialog">取 消</el-button>
|
|
|
- <el-button type="primary" @click="submitFinalize">确认结单</el-button>
|
|
|
- </div>
|
|
|
- </template>
|
|
|
- </el-dialog>
|
|
|
-
|
|
|
- <!-- 复运对话框 -->
|
|
|
- <el-dialog title="复启" v-model="resetDialogVisible" width="800px" append-to-body>
|
|
|
- <el-alert type="info" :closable="false" style="border-color: #0ea5e9; background-color: #ecf7ff; color: #0369a1; height: 35px;">
|
|
|
- <template #default>
|
|
|
- <i class="fa fa-refresh mr-2" style="color: #0369a1;"> 请选择复位方式,完成工单复启。</i>
|
|
|
- </template>
|
|
|
- </el-alert>
|
|
|
- <h4 class="text-sm font-medium text-gray-800 mb-3"></h4>
|
|
|
- <el-form ref="resetFormRef" :model="finalizeForm" :rules="resetRules" label-width="120px" label-position="top">
|
|
|
- <el-row>
|
|
|
- <el-col :span="12">
|
|
|
- <el-form-item label="工单编码"><el-input v-model="finalizeForm.workOrderProjectNo" disabled /> </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :span="12">
|
|
|
- <el-form-item label="风机编号"><el-input v-model="finalizeForm.pcsDeviceName" disabled /> </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :span="12">
|
|
|
- <el-form-item label="维保中心"><el-input v-model="finalizeForm.gxtCenter" disabled /> </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :span="12">
|
|
|
- <el-form-item label="场站"><el-input v-model="finalizeForm.pcsStationName" disabled /> </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :span="12">
|
|
|
- <el-form-item label="品牌"><el-input v-model="finalizeForm.brand" disabled /> </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :span="12">
|
|
|
- <el-form-item label="发生时间"><el-input v-model="finalizeForm.occurTime" disabled /> </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :span="12">
|
|
|
- <el-form-item label="复位方式" prop="resetMethod">
|
|
|
- <el-select
|
|
|
- v-model="finalizeForm.resetMethod"
|
|
|
- placeholder="请选择复位方式"
|
|
|
- style="width: 100%"
|
|
|
- >
|
|
|
- <el-option
|
|
|
- v-for="dict in gxt_reset_method"
|
|
|
- :key="dict.value"
|
|
|
- :label="dict.label"
|
|
|
- :value="dict.value"
|
|
|
- />
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
- </el-form>
|
|
|
- <template #footer>
|
|
|
- <div class="dialog-footer">
|
|
|
- <el-button @click="resetDialogVisible=false">取 消</el-button>
|
|
|
- <el-button type="primary" @click="submitReset">复位启机</el-button>
|
|
|
- </div>
|
|
|
+ <!-- 结单对话框组件 -->
|
|
|
+ <FinalizeDialog
|
|
|
+ v-model="finalizeDialogVisible"
|
|
|
+ :data="finalizeFormData"
|
|
|
+ :work-order-status-options="gxt_work_order_status"
|
|
|
+ :info-entry-options="gxt_info_entry"
|
|
|
+ :work-area-options="gxt_work_area"
|
|
|
+ :on-submit="submitFinalizeFromParent"
|
|
|
+ :list-repair-order="listRepairOrder"
|
|
|
+ :list-work-person="listWorkPerson"
|
|
|
+ :list-user-data="listUserData"
|
|
|
+ @success="handleFinalizeSuccess"
|
|
|
+ @select-mis-info="handleSelectMisInfo"
|
|
|
+ >
|
|
|
+ <template #mis-info-select>
|
|
|
+ <MisInfoSelectSingle :key="commonKey" v-model="misInfoSelectVisible" @onSelected="onMisInfoSelected" :pcsStationName="finalizeFormData.pcsStationName" :pcsDeviceName="finalizeFormData.pcsDeviceName"></MisInfoSelectSingle>
|
|
|
</template>
|
|
|
- </el-dialog>
|
|
|
+ </FinalizeDialog>
|
|
|
+
|
|
|
+ <!-- 复启对话框组件 -->
|
|
|
+ <ResetDialog
|
|
|
+ v-model="resetDialogVisible"
|
|
|
+ :data="resetFormData"
|
|
|
+ :reset-method-options="gxt_reset_method"
|
|
|
+ :on-submit="submitResetFromParent"
|
|
|
+ @success="handleResetSuccess"
|
|
|
+ />
|
|
|
|
|
|
<!-- 结束工单对话框 -->
|
|
|
<el-dialog title="结束工单" v-model="completeDialogVisible" width="600px" append-to-body @close="closeCompleteDialog">
|
|
|
@@ -1907,6 +1634,8 @@ import useUserStore from '@/store/modules/user'
|
|
|
import { useRoute } from 'vue-router'
|
|
|
import { watch } from 'vue'
|
|
|
import { decryptParams } from '@/utils/encrypt'
|
|
|
+import ResetDialog from '@/components/repairOrder/reset.vue'
|
|
|
+import FinalizeDialog from '@/components/repairOrder/finalize.vue'
|
|
|
|
|
|
const { proxy } = getCurrentInstance()
|
|
|
const { gxt_maintenance_type, gxt_work_order_status, gxt_order_priority_type,gxt_repair_order_flow_action_type,gxt_order_suspend_reason,gxt_repair_method,gxt_reset_method,gxt_return_type,gxt_info_entry,gxt_work_area } = proxy.useDict("gxt_maintenance_type", "gxt_work_order_status", "gxt_order_priority_type","gxt_repair_order_flow_action_type","gxt_order_suspend_reason","gxt_repair_method","gxt_reset_method","gxt_return_type","gxt_info_entry","gxt_work_area")
|
|
|
@@ -2535,13 +2264,18 @@ const finalizeRules = ref({
|
|
|
}
|
|
|
try {
|
|
|
// 将输入的检修人员姓名按逗号分割
|
|
|
- const names = value.split(',').map(name => name.trim()).filter(name => name);
|
|
|
+ const names = value.split(',').map(name => name.trim());
|
|
|
|
|
|
// 验证每个检修人员是否存在于组织架构中
|
|
|
for (const name of names) {
|
|
|
- const response = await listUserData({ nickName: name });
|
|
|
- if (!response.rows || response.rows.length === 0) {
|
|
|
- return callback(new Error(`检修人员"${name}"非系统内人员,请重新输入`));
|
|
|
+ debugger
|
|
|
+ if (name.length > 0) {
|
|
|
+ const response = await listUserData({nickName: name});
|
|
|
+ if (!response.rows || response.rows.length === 0) {
|
|
|
+ return callback(new Error(`检修人员"${name}"非系统内人员,请重新输入`));
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ return callback(new Error(`请正确输入检修人员名单`));
|
|
|
}
|
|
|
}
|
|
|
callback();
|
|
|
@@ -3654,111 +3388,58 @@ async function submitApprove(approvalStatusValue) {
|
|
|
/** 结单操作 */
|
|
|
function handleFinalize(row, method) {
|
|
|
getRepairOrder(row.id).then(response => {
|
|
|
- finalizeForm.value = { ...response.data, selectedMembers: [] }
|
|
|
+ finalizeFormData.value = { ...response.data, selectedMembers: [] }
|
|
|
debugger
|
|
|
- finalizeForm.value.repairMethod = method;
|
|
|
+ finalizeFormData.value.repairMethod = method;
|
|
|
if (method == '1') {
|
|
|
- finalizeForm.value.infoEntry = '1'
|
|
|
+ finalizeFormData.value.infoEntry = '1'
|
|
|
}
|
|
|
finalizeDialogVisible.value = true
|
|
|
commonKey++
|
|
|
- /*// 获取场站ID用于查询用户
|
|
|
- finalizeForm.value.pcsStationId = response.data.pcsStationId
|
|
|
- finalizeForm.value.pcsStationPid = response.data.pcsStationPid
|
|
|
- // 根据场站ID查询该场站的用户列表
|
|
|
- if (finalizeForm.value.pcsStationPid) {
|
|
|
- listUser({ pageNum: 1, pageSize: 100, deptId: finalizeForm.value.pcsStationPid }).then(response => {
|
|
|
- userList.value = response.rows
|
|
|
- finalizeDialogVisible.value = true
|
|
|
- })
|
|
|
- }else if (finalizeForm.value.pcsStationId) {
|
|
|
- // 先获取部门信息,判断level是否为4,如果是则查找其父部门直到level为3
|
|
|
- getDeptAndUserByLevel(finalizeForm.value.pcsStationId).then(deptId => {
|
|
|
- // 确保 deptId 是有效的再调用 listUser
|
|
|
- if (deptId) {
|
|
|
- listUser({ pageNum: 1, pageSize: 100, deptId: deptId }).then(response => {
|
|
|
- userList.value = response.rows
|
|
|
- finalizeDialogVisible.value = true
|
|
|
- })
|
|
|
- } else {
|
|
|
- // 如果没有找到有效的部门ID,仍然打开对话框但给出提示
|
|
|
- proxy.$modal.msgWarning("未找到有效的部门信息,无法加载用户列表");
|
|
|
- finalizeDialogVisible.value = true
|
|
|
- }
|
|
|
- })
|
|
|
- } else {
|
|
|
- proxy.$modal.msgWarning("未找到有效的部门信息,无法加载用户列表");
|
|
|
- finalizeDialogVisible.value = true
|
|
|
- }*/
|
|
|
})
|
|
|
}
|
|
|
|
|
|
/** 复启操作 */
|
|
|
function handleReset(row) {
|
|
|
getRepairOrder(row.id).then(response => {
|
|
|
- finalizeForm.value = { ...response.data, selectedMembers: [] }
|
|
|
+ // 使用新的组件方式
|
|
|
+ resetFormData.value = { ...response.data }
|
|
|
resetDialogVisible.value = true
|
|
|
- // 打开对话框后重置表单验证错误
|
|
|
- proxy.resetForm("resetFormRef")
|
|
|
- commonKey++
|
|
|
})
|
|
|
}
|
|
|
|
|
|
-/** 提交结单 */
|
|
|
-async function submitFinalize() {
|
|
|
- // 根据维修方式执行不同的验证逻辑
|
|
|
- if (finalizeForm.value.repairMethod === '1' && finalizeForm.value.infoEntry == '1') {
|
|
|
- // 正常维修需要验证MIS相关字段
|
|
|
- if (!finalizeForm.value.realEndTime) {
|
|
|
- proxy.$modal.msgError("该工单未结束,无法结单!")
|
|
|
- return
|
|
|
- }
|
|
|
- }/* else if (finalizeForm.value.repairMethod === '2') {
|
|
|
- // 复位启机需要验证复位方式
|
|
|
- if (!finalizeForm.value.resetMethod) {
|
|
|
- proxy.$modal.msgError("请选择复位方式!")
|
|
|
- return
|
|
|
- }
|
|
|
- } else {
|
|
|
- proxy.$modal.msgError("请选择维修方式!")
|
|
|
- return
|
|
|
- }*/
|
|
|
+// 添加响应式数据用于复启组件
|
|
|
+const resetFormData = ref({})
|
|
|
|
|
|
- proxy.$refs["finalizeFormRef"].validate(async valid => {
|
|
|
- if (valid) {
|
|
|
- try {
|
|
|
- // 根据维修方式清除不需要的字段
|
|
|
- if (finalizeForm.value.repairMethod === '1') {
|
|
|
- // 正常维修时清除复位方式
|
|
|
- finalizeForm.value.resetMethod = undefined;
|
|
|
- finalizeForm.value.workArea = Array.isArray(finalizeForm.value.workArea) ? finalizeForm.value.workArea.join(',')
|
|
|
- : finalizeForm.value.workArea || ''
|
|
|
- } else if (finalizeForm.value.repairMethod === '2') {
|
|
|
- // 复位启机时清除MIS相关字段
|
|
|
- finalizeForm.value.misOrderNo = undefined;
|
|
|
- finalizeForm.value.realStartTime = undefined;
|
|
|
- finalizeForm.value.realEndTime = undefined;
|
|
|
- finalizeForm.value.workGroupMemberName = undefined;
|
|
|
- finalizeForm.value.infoEntry = undefined;
|
|
|
- finalizeForm.value.wwryNum = undefined;
|
|
|
- finalizeForm.value.wlryNum = undefined;
|
|
|
- finalizeForm.value.workArea = undefined;
|
|
|
- finalizeForm.value.repairOrderPersonList = [];
|
|
|
- }
|
|
|
+// 在提交复启成功后的回调函数
|
|
|
+function handleResetSuccess() {
|
|
|
+ resetDialogVisible.value = false
|
|
|
+ resetTimeOutOrder()
|
|
|
+ getList()
|
|
|
+}
|
|
|
|
|
|
- await finalizeRepairOrder(finalizeForm.value)
|
|
|
+// 添加响应式数据用于结单组件
|
|
|
+const finalizeFormData = ref({})
|
|
|
|
|
|
- proxy.$modal.msgSuccess("工单结单成功")
|
|
|
- finalizeDialogVisible.value = false
|
|
|
- resetTimeOutOrder();
|
|
|
- getList()
|
|
|
- } catch (error) {
|
|
|
- console.log("操作失败: " + error.message)
|
|
|
- }
|
|
|
- }
|
|
|
- })
|
|
|
+// 在提交结单成功后的回调函数
|
|
|
+function handleFinalizeSuccess() {
|
|
|
+ finalizeDialogVisible.value = false
|
|
|
+ resetTimeOutOrder()
|
|
|
+ getList()
|
|
|
}
|
|
|
|
|
|
+// 用于传递给结单组件的提交方法
|
|
|
+async function submitFinalizeFromParent(data) {
|
|
|
+ await finalizeRepairOrder(data)
|
|
|
+}
|
|
|
+
|
|
|
+// 用于传递给复启组件的提交方法
|
|
|
+async function submitResetFromParent(data) {
|
|
|
+ await finalizeRepairOrder(data)
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
/** 提交复启 */
|
|
|
async function submitReset() {
|
|
|
proxy.$refs["resetFormRef"].validate(async valid => {
|
|
|
@@ -3777,18 +3458,7 @@ async function submitReset() {
|
|
|
})
|
|
|
}
|
|
|
|
|
|
-const handleInfoEntryChange = (val) => {
|
|
|
- // 选中2工作票编号时修改其他值
|
|
|
- if (val === '2') {
|
|
|
- finalizeForm.value.misOrderNo = undefined;
|
|
|
- finalizeForm.value.realStartTime = undefined;
|
|
|
- finalizeForm.value.realEndTime = undefined;
|
|
|
- finalizeForm.value.workGroupMemberName = undefined;
|
|
|
- finalizeForm.value.repairOrderPersonList = [];
|
|
|
- } else {
|
|
|
- finalizeForm.value.workPermitNum = undefined;
|
|
|
- }
|
|
|
-};
|
|
|
+
|
|
|
|
|
|
/** 检修人员选择变化 */
|
|
|
function handleMembersChange(formName) {
|
|
|
@@ -3989,20 +3659,31 @@ function onMisInfoSelected(row) {
|
|
|
proxy.$modal.msgWarning('选择工单已存在!请重新选择!')
|
|
|
return
|
|
|
}
|
|
|
- finalizeForm.value.misOrderNo = row.misNo
|
|
|
- finalizeForm.value.realStartTime = row.realStartTime
|
|
|
- finalizeForm.value.realEndTime = row.realEndTime
|
|
|
- // finalizeForm.value.content = row.content
|
|
|
- listWorkPerson({ misNo: row.misNo }).then(response => {
|
|
|
- debugger
|
|
|
- finalizeForm.value.repairOrderPersonList = response.rows;
|
|
|
- if (finalizeForm.value.repairOrderPersonList) {
|
|
|
- const nickNames = finalizeForm.value.repairOrderPersonList
|
|
|
- .map(person => person.nickName)
|
|
|
- .join(',');
|
|
|
- finalizeForm.value.workGroupMemberName = nickNames
|
|
|
- }
|
|
|
- })
|
|
|
+ // 使用展开运算符创建新对象以确保响应式更新
|
|
|
+ finalizeFormData.value = {
|
|
|
+ ...finalizeFormData.value,
|
|
|
+ misOrderNo: row.misNo,
|
|
|
+ realStartTime: row.realStartTime,
|
|
|
+ realEndTime: row.realEndTime
|
|
|
+ };
|
|
|
+ // finalizeFormData.value.content = row.content
|
|
|
+ // 使用从属性传入的listWorkPerson方法
|
|
|
+ if (typeof listWorkPerson === 'function') {
|
|
|
+ listWorkPerson({ misNo: row.misNo }).then(response => {
|
|
|
+ debugger
|
|
|
+ const updatedData = {
|
|
|
+ ...finalizeFormData.value,
|
|
|
+ repairOrderPersonList: response.rows
|
|
|
+ };
|
|
|
+ if (response.rows) {
|
|
|
+ const nickNames = response.rows
|
|
|
+ .map(person => person.nickName)
|
|
|
+ .join(',');
|
|
|
+ updatedData.workGroupMemberName = nickNames
|
|
|
+ }
|
|
|
+ finalizeFormData.value = updatedData;
|
|
|
+ })
|
|
|
+ }
|
|
|
misInfoSelectVisible.value = false
|
|
|
})
|
|
|
}
|