|
|
@@ -127,9 +127,9 @@
|
|
|
</el-row>
|
|
|
|
|
|
<!-- 工单列表 -->
|
|
|
- <el-table
|
|
|
- v-loading="loading"
|
|
|
- :data="repairOrderList"
|
|
|
+ <el-table
|
|
|
+ v-loading="loading"
|
|
|
+ :data="repairOrderList"
|
|
|
@selection-change="handleSelectionChange"
|
|
|
style="width: 100%"
|
|
|
:max-height="tableHeight"
|
|
|
@@ -176,43 +176,40 @@
|
|
|
<dict-tag :options="gxt_order_priority_type" :value="scope.row.priorityType" />
|
|
|
</template>
|
|
|
</el-table-column>-->
|
|
|
- <el-table-column label="操作" align="center" class-name="small-padding fixed-width" min-width="250" fixed="right">
|
|
|
+ <el-table-column label="操作" align="center" class-name="small-padding fixed-width" min-width="220" fixed="right">
|
|
|
<template #default="scope">
|
|
|
- <el-button
|
|
|
+ <el-button
|
|
|
v-if="scope.row.workOrderStatus === 'to_issue'"
|
|
|
- type="primary"
|
|
|
- link
|
|
|
+ type="primary"
|
|
|
+ link
|
|
|
@click="handleEdit(scope.row)"
|
|
|
v-hasPermi="['gxt:repairOrder:edit']"
|
|
|
- ><i class="fa fa-edit"></i>编辑</el-button>
|
|
|
- <el-button
|
|
|
+ >编辑</el-button>
|
|
|
+
|
|
|
+ <el-button
|
|
|
v-if="scope.row.workOrderStatus === 'to_issue'"
|
|
|
type="primary"
|
|
|
link
|
|
|
@click="handleAssign(scope.row)"
|
|
|
- v-hasPermi="['gxt:repairOrder:assign']"
|
|
|
- ><i class="fa fa-user-plus"></i>下发</el-button>
|
|
|
- <el-button
|
|
|
+ >下发</el-button>
|
|
|
+ <el-button
|
|
|
v-if="scope.row.workOrderStatus === 'assigned'"
|
|
|
type="primary"
|
|
|
link
|
|
|
@click="handleAccept(scope.row)"
|
|
|
- v-hasPermi="['gxt:repairOrder:accept']"
|
|
|
- ><i class="fa fa-check"></i>接单</el-button>
|
|
|
- <el-button
|
|
|
+ >接单</el-button>
|
|
|
+ <el-button
|
|
|
v-if="scope.row.workOrderStatus === 'suspended'"
|
|
|
type="success"
|
|
|
link
|
|
|
@click="handleStart(scope.row)"
|
|
|
- v-hasPermi="['gxt:repairOrder:start']"
|
|
|
- ><i class="fa fa-play"></i>开始</el-button>
|
|
|
- <el-button
|
|
|
+ >开始</el-button>
|
|
|
+ <el-button
|
|
|
v-if="scope.row.workOrderStatus === 'processing'"
|
|
|
- type="danger"
|
|
|
+ type="warning"
|
|
|
link
|
|
|
@click="handleSuspend(scope.row)"
|
|
|
- v-hasPermi="['gxt:repairOrder:suspend']"
|
|
|
- ><i class="fa fa-stop"></i>挂起</el-button>
|
|
|
+ >挂起</el-button>
|
|
|
<!-- <el-button
|
|
|
v-if="scope.row.workOrderStatus === 'processing'"
|
|
|
type="warning"
|
|
|
@@ -225,57 +222,52 @@
|
|
|
link
|
|
|
@click="handleProcessDone(scope.row)"
|
|
|
>结束</el-button>-->
|
|
|
- <el-button
|
|
|
+ <el-button
|
|
|
v-if="scope.row.workOrderStatus === 'processing'"
|
|
|
- type="success"
|
|
|
+ type="primary"
|
|
|
link
|
|
|
@click="handleFinalize(scope.row)"
|
|
|
- v-hasPermi="['gxt:repairOrder:finalize']"
|
|
|
- ><i class="fa fa-check"></i>结单</el-button>
|
|
|
- <el-button
|
|
|
+ >结单</el-button>
|
|
|
+ <el-button
|
|
|
v-if="scope.row.workOrderStatus === 'to_approve'"
|
|
|
type="primary"
|
|
|
link
|
|
|
@click="handleApprove(scope.row)"
|
|
|
- v-hasPermi="['gxt:repairOrder:approve']"
|
|
|
- ><i class="fa fa-check-circle"></i>审批</el-button>
|
|
|
+ >审批</el-button>
|
|
|
<!-- <el-button
|
|
|
v-if="scope.row.workOrderStatus === 'paused' || scope.row.workOrderStatus === 'suspended'"
|
|
|
type="primary"
|
|
|
link
|
|
|
@click="handleResume(scope.row)"
|
|
|
>恢复</el-button>-->
|
|
|
- <el-button
|
|
|
+ <el-button
|
|
|
v-if="scope.row.workOrderStatus === 'completed' && !scope.row.score"
|
|
|
- type="warning"
|
|
|
+ type="primary"
|
|
|
link
|
|
|
@click="handleRating(scope.row)"
|
|
|
- v-hasPermi="['gxt:repairOrder:rating']"
|
|
|
- ><i class="fa fa-star"></i>评分</el-button>
|
|
|
+ >评分</el-button>
|
|
|
<el-button
|
|
|
v-if="scope.row.workOrderStatus === 'completed' && !scope.row.restartTime"
|
|
|
- type="success"
|
|
|
+ type="primary"
|
|
|
link
|
|
|
@click="handleRestart(scope.row)"
|
|
|
- v-hasPermi="['gxt:repairOrder:restart']"
|
|
|
- ><i class="fa fa-play"></i>复运</el-button>
|
|
|
+ >复运</el-button>
|
|
|
<el-button
|
|
|
- type="info"
|
|
|
+ type="primary"
|
|
|
link
|
|
|
@click="handleView(scope.row)"
|
|
|
- v-hasPermi="['gxt:repairOrder:query']"
|
|
|
- ><i class="fa fa-eye"></i>查看</el-button>
|
|
|
+ >查看</el-button>
|
|
|
<el-button
|
|
|
v-if="scope.row.workOrderStatus === 'to_issue'"
|
|
|
type="danger"
|
|
|
link
|
|
|
@click="handleDelete(scope.row)"
|
|
|
v-hasPermi="['gxt:repairOrder:remove']"
|
|
|
- ><i class="fa fa-trash"></i>删除</el-button>
|
|
|
+ >删除</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
-
|
|
|
+
|
|
|
<pagination
|
|
|
v-show="total>0"
|
|
|
:total="total"
|
|
|
@@ -394,10 +386,10 @@
|
|
|
<el-row>
|
|
|
<el-col :span="24">
|
|
|
<el-form-item label="故障描述" prop="faultDesc">
|
|
|
- <el-input
|
|
|
- v-model="form.faultDesc"
|
|
|
- type="textarea"
|
|
|
- placeholder="请输入故障描述"
|
|
|
+ <el-input
|
|
|
+ v-model="form.faultDesc"
|
|
|
+ type="textarea"
|
|
|
+ placeholder="请输入故障描述"
|
|
|
maxlength="500"
|
|
|
show-word-limit
|
|
|
:rows="3"
|
|
|
@@ -455,12 +447,12 @@
|
|
|
{{ assignForm.misOrderNo }}
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
- <el-col :span="12">
|
|
|
+ <el-col :span="24">
|
|
|
<el-form-item label="故障描述">{{ assignForm.faultDesc || '无' }}</el-form-item>
|
|
|
</el-col>
|
|
|
|
|
|
</el-row>
|
|
|
-
|
|
|
+
|
|
|
<!-- <el-form-item label="关联维保工单">
|
|
|
<el-select
|
|
|
v-model="assignForm.relatedOrderCode"
|
|
|
@@ -484,16 +476,16 @@
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
-
|
|
|
- <el-form-item
|
|
|
- v-if="assignForm.relatedOrderCode"
|
|
|
+
|
|
|
+ <el-form-item
|
|
|
+ v-if="assignForm.relatedOrderCode"
|
|
|
label="维保内容"
|
|
|
prop="relatedOrderContent">
|
|
|
|
|
|
- <el-input
|
|
|
+ <el-input
|
|
|
v-model="assignForm.relatedOrderContent"
|
|
|
- type="textarea"
|
|
|
- placeholder="请输入维保内容"
|
|
|
+ type="textarea"
|
|
|
+ placeholder="请输入维保内容"
|
|
|
maxlength="500"
|
|
|
show-word-limit
|
|
|
:rows="3"
|
|
|
@@ -639,11 +631,11 @@
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="详细说明" prop="suspendDescription">
|
|
|
- <el-input
|
|
|
- v-model="suspendForm.suspendDescription"
|
|
|
- type="textarea"
|
|
|
- placeholder="请输入详细说明"
|
|
|
- maxlength="100"
|
|
|
+ <el-input
|
|
|
+ v-model="suspendForm.suspendDescription"
|
|
|
+ type="textarea"
|
|
|
+ placeholder="请输入详细说明"
|
|
|
+ maxlength="100"
|
|
|
show-word-limit
|
|
|
:rows="3"
|
|
|
/>
|
|
|
@@ -707,10 +699,10 @@
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="工作负责人">{{ approveForm.teamLeaderName }}</el-form-item>
|
|
|
</el-col>
|
|
|
- <el-col :span="12">
|
|
|
+ <el-col :span="24">
|
|
|
<el-form-item label="故障描述">{{ approveForm.faultDesc || '无' }}</el-form-item>
|
|
|
</el-col>
|
|
|
- <el-col :span="12">
|
|
|
+ <el-col :span="24">
|
|
|
<el-form-item label="挂起原因">
|
|
|
{{ approveForm.suspendReason || '无' }}
|
|
|
</el-form-item>
|
|
|
@@ -723,11 +715,11 @@
|
|
|
</el-radio-group>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="驳回原因" prop="rejectionReason" v-if="approveForm.approvalStatus === 'rejected'">
|
|
|
- <el-input
|
|
|
- v-model="approveForm.rejectionReason"
|
|
|
- type="textarea"
|
|
|
- placeholder="请输入驳回原因"
|
|
|
- maxlength="100"
|
|
|
+ <el-input
|
|
|
+ v-model="approveForm.rejectionReason"
|
|
|
+ type="textarea"
|
|
|
+ placeholder="请输入驳回原因"
|
|
|
+ maxlength="100"
|
|
|
show-word-limit
|
|
|
:rows="3"
|
|
|
/>
|
|
|
@@ -797,7 +789,7 @@
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="结束时间">{{ parseTime(finalizeForm.realEndTime) }}</el-form-item>
|
|
|
</el-col>
|
|
|
- <el-col :span="12">
|
|
|
+ <el-col :span="24">
|
|
|
<el-form-item label="故障描述">{{ finalizeForm.faultDesc || '无' }}</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
|
@@ -833,15 +825,15 @@
|
|
|
show-word-limit
|
|
|
:rows="4"
|
|
|
/>
|
|
|
- </el-form-item>
|
|
|
+ </el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
<!-- <el-form-item label="结单说明" prop="finalizationRemark">
|
|
|
- <el-input
|
|
|
- v-model="finalizeForm.finalizationRemark"
|
|
|
- type="textarea"
|
|
|
- placeholder="请输入结单说明"
|
|
|
- maxlength="200"
|
|
|
+ <el-input
|
|
|
+ v-model="finalizeForm.finalizationRemark"
|
|
|
+ type="textarea"
|
|
|
+ placeholder="请输入结单说明"
|
|
|
+ maxlength="200"
|
|
|
show-word-limit
|
|
|
:rows="4"
|
|
|
/>
|
|
|
@@ -859,11 +851,11 @@
|
|
|
<el-dialog title="结束工单" v-model="completeDialogVisible" width="600px" append-to-body @close="closeCompleteDialog">
|
|
|
<el-form ref="completeFormRef" :model="completeForm" :rules="completeRules" label-width="120px" label-position="top">
|
|
|
<el-form-item label="处理结果描述" prop="completeDescription">
|
|
|
- <el-input
|
|
|
- v-model="completeForm.completeDescription"
|
|
|
- type="textarea"
|
|
|
- placeholder="请输入处理结果描述"
|
|
|
- maxlength="200"
|
|
|
+ <el-input
|
|
|
+ v-model="completeForm.completeDescription"
|
|
|
+ type="textarea"
|
|
|
+ placeholder="请输入处理结果描述"
|
|
|
+ maxlength="200"
|
|
|
show-word-limit
|
|
|
:rows="4"
|
|
|
/>
|
|
|
@@ -933,14 +925,9 @@
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="结束时间">{{ parseTime(ratingForm.realEndTime) }}</el-form-item>
|
|
|
</el-col>
|
|
|
- <el-col :span="12">
|
|
|
+ <el-col :span="24">
|
|
|
<el-form-item label="故障描述">{{ ratingForm.faultDesc || '无' }}</el-form-item>
|
|
|
</el-col>
|
|
|
- <el-col :span="12">
|
|
|
- <el-form-item label="维修内容">
|
|
|
- {{ ratingForm.content }}
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="检修类型">
|
|
|
<dict-tag :options="gxt_maintenance_type" :value="ratingForm.maintenanceType" />
|
|
|
@@ -949,7 +936,11 @@
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="检修人员">{{ ratingForm.workGroupMemberName }}</el-form-item>
|
|
|
</el-col>
|
|
|
-
|
|
|
+ <el-col :span="24">
|
|
|
+ <el-form-item label="维修内容">
|
|
|
+ {{ ratingForm.content }}
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="评分" prop="score">
|
|
|
<el-input-number
|
|
|
@@ -982,7 +973,7 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-dialog>
|
|
|
-
|
|
|
+
|
|
|
<!-- 开始处理对话框 -->
|
|
|
<el-dialog title="开始工单" v-model="startDialogVisible" width="500px" append-to-body @close="closeStartDialog">
|
|
|
<el-form label-width="120px" label-position="top">
|
|
|
@@ -1021,7 +1012,7 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-dialog>
|
|
|
-
|
|
|
+
|
|
|
<!-- 复运对话框 -->
|
|
|
<el-dialog title="复运" v-model="restartDialogVisible" width="800px" append-to-body @close="closeRestartDialog">
|
|
|
<el-form ref="restartFormRef" :model="restartForm" :rules="restartRules" label-width="120px" label-position="top">
|
|
|
@@ -1060,7 +1051,7 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-dialog>
|
|
|
-
|
|
|
+
|
|
|
<!-- 查看工单详情对话框 -->
|
|
|
<el-dialog title="查看工单详情" v-model="viewDialogVisible" width="1000px" append-to-body>
|
|
|
<el-row :gutter="20">
|
|
|
@@ -1172,7 +1163,7 @@
|
|
|
<el-timeline-item type="primary"
|
|
|
v-for="(flow, index) in flowList"
|
|
|
:key="index"
|
|
|
- :timestamp="parseTime(flow.actionTime, '{y}-{m}-{d} {h}:{i}:{s}')"
|
|
|
+ :timestamp="parseTime(flow.actionTime, '{y}-{m}-{d} {h}:{i}:{s}')"
|
|
|
>
|
|
|
<div class="flow-item">
|
|
|
<h4><dict-tag :options="gxt_repair_order_flow_action_type" :value="flow.actionType" /></h4>
|
|
|
@@ -1187,25 +1178,25 @@
|
|
|
</div>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
-
|
|
|
+
|
|
|
<template #footer>
|
|
|
<div class="dialog-footer">
|
|
|
<el-button @click="closeViewDialog">关 闭</el-button>
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-dialog>
|
|
|
-
|
|
|
+
|
|
|
<!-- 设备选择组件 -->
|
|
|
<equipment-select-single v-model="equipmentSelectVisible" @onSelected="onEquipmentSelected"></equipment-select-single>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script setup name="RepairOrder">
|
|
|
-import {
|
|
|
- listRepairOrder,
|
|
|
- getRepairOrder,
|
|
|
- delRepairOrder,
|
|
|
- addRepairOrder,
|
|
|
+import {
|
|
|
+ listRepairOrder,
|
|
|
+ getRepairOrder,
|
|
|
+ delRepairOrder,
|
|
|
+ addRepairOrder,
|
|
|
updateRepairOrder,
|
|
|
assignRepairOrder,
|
|
|
acceptRepairOrder,
|
|
|
@@ -1546,19 +1537,19 @@ function getList() {
|
|
|
function getMaintenanceCenterAndStationList() {
|
|
|
listDept({}).then(response => {
|
|
|
const depts = response.data;
|
|
|
-
|
|
|
+
|
|
|
// 筛选出维保中心(level=2)
|
|
|
maintenanceCenterOptions.value = depts.filter(dept => dept.level === "2");
|
|
|
-
|
|
|
+
|
|
|
// 筛选出场站(level=3)
|
|
|
const stations = depts.filter(dept => dept.level === "3");
|
|
|
-
|
|
|
+
|
|
|
// 如果已选择维保中心,则筛选出该维保中心下的场站
|
|
|
if (queryParams.value.gxtCenter) {
|
|
|
const selectedMaintenanceCenter = maintenanceCenterOptions.value.find(
|
|
|
center => center.deptName === queryParams.value.gxtCenter
|
|
|
);
|
|
|
-
|
|
|
+
|
|
|
if (selectedMaintenanceCenter) {
|
|
|
stationOptions.value = stations.filter(
|
|
|
station => station.ancestors.includes(selectedMaintenanceCenter.deptId)
|
|
|
@@ -1577,18 +1568,18 @@ function getMaintenanceCenterAndStationList() {
|
|
|
function handleMaintenanceCenterChange(selectedCenter) {
|
|
|
// 清空场站选择
|
|
|
queryParams.value.pcsStationName = null;
|
|
|
-
|
|
|
+
|
|
|
// 如果选择了维保中心,则加载对应的场站
|
|
|
if (selectedCenter) {
|
|
|
listDept({}).then(response => {
|
|
|
const depts = response.data;
|
|
|
const stations = depts.filter(dept => dept.level === "3");
|
|
|
-
|
|
|
+
|
|
|
// 找到选中的维保中心
|
|
|
const selectedMaintenanceCenter = maintenanceCenterOptions.value.find(
|
|
|
center => center.deptName === selectedCenter
|
|
|
);
|
|
|
-
|
|
|
+
|
|
|
if (selectedMaintenanceCenter) {
|
|
|
// 筛选出该维保中心下的场站
|
|
|
stationOptions.value = stations.filter(
|
|
|
@@ -1628,15 +1619,6 @@ function handleSelectEquipment() {
|
|
|
/** 设备选择回调 */
|
|
|
function onEquipmentSelected(row) {
|
|
|
if (row) {
|
|
|
- // 检查维保中心ID和场站ID是否存在
|
|
|
- if (!row.maintenanceCenterId) {
|
|
|
- proxy.$modal.msgError("该设备的维保中心没有对应的部门,请完善部门信息后再更新设备数据!");
|
|
|
- return;
|
|
|
- }
|
|
|
- if (!row.stationId) {
|
|
|
- proxy.$modal.msgError("该设备的场站没有对应的部门,请完善部门信息后再更新设备数据!");
|
|
|
- return;
|
|
|
- }
|
|
|
form.value.pcsDeviceId = row.equipmentId
|
|
|
form.value.pcsDeviceName = row.equipmentCode
|
|
|
form.value.gxtCenterId = row.maintenanceCenterId
|
|
|
@@ -1667,7 +1649,7 @@ function handleAdd() {
|
|
|
reset()
|
|
|
openDialog.value = true
|
|
|
dialogTitle.value = "新建维修工单"
|
|
|
-
|
|
|
+
|
|
|
// 生成工单编号
|
|
|
const now = new Date()
|
|
|
const year = now.getFullYear()
|
|
|
@@ -1676,7 +1658,7 @@ function handleAdd() {
|
|
|
const dateStr = `${year}${month}${day}`
|
|
|
const randomNum = Math.floor(100 + Math.random() * 900)
|
|
|
form.value.workOrderProjectNo = `WX${dateStr}${randomNum}`
|
|
|
-
|
|
|
+
|
|
|
// 设置默认发生时间
|
|
|
form.value.occurTime = now
|
|
|
}
|
|
|
@@ -1740,8 +1722,7 @@ function submitFormAndIssue() {
|
|
|
/** 删除按钮操作 */
|
|
|
function handleDelete(row) {
|
|
|
const ids = row.id || ids.value
|
|
|
- const workOrderProjectNo = row.workOrderProjectNo || (repairOrderList.value.find(item => item.id === ids)?.workOrderProjectNo)
|
|
|
- proxy.$modal.confirm('是否确认删除维修工单编号为"' + workOrderProjectNo + '"的数据项?').then(function() {
|
|
|
+ proxy.$modal.confirm('是否确认删除维修工单编号为"' + ids + '"的数据项?').then(function() {
|
|
|
return delRepairOrder(ids)
|
|
|
}).then(() => {
|
|
|
getList()
|
|
|
@@ -1799,7 +1780,7 @@ function searchWorkOrders(query) {
|
|
|
workOrderOptions.value = []
|
|
|
return
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
workOrderSearchLoading.value = true
|
|
|
listGxtOrder({ workOrderProjectNo: query }).then(response => {
|
|
|
workOrderOptions.value = response.rows
|
|
|
@@ -1816,7 +1797,7 @@ function handleWorkOrderChange(val) {
|
|
|
assignForm.value.relatedOrderContent = ""
|
|
|
return
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
// 查找选中的维保工单
|
|
|
const selectedWorkOrder = workOrderOptions.value.find(item => item.workOrderProjectNo === val)
|
|
|
if (selectedWorkOrder) {
|
|
|
@@ -1838,9 +1819,9 @@ async function submitAssign() {
|
|
|
relatedOrderCode: assignForm.value.relatedOrderCode,
|
|
|
relatedOrderContent: assignForm.value.relatedOrderContent
|
|
|
}*/
|
|
|
-
|
|
|
+
|
|
|
await assignRepairOrder(assignForm.value)
|
|
|
-
|
|
|
+
|
|
|
proxy.$modal.msgSuccess("下发成功")
|
|
|
assignDialogVisible.value = false
|
|
|
getList()
|
|
|
@@ -1876,7 +1857,7 @@ async function submitAccept() {
|
|
|
try {
|
|
|
// 更新检修人员列表
|
|
|
handleMembersChange('acceptForm');
|
|
|
-
|
|
|
+
|
|
|
// 更新工单状态和相关信息
|
|
|
/*const updateData = {
|
|
|
id: acceptForm.value.id,
|
|
|
@@ -1887,9 +1868,9 @@ async function submitAccept() {
|
|
|
teamLeaderName: acceptForm.value.teamLeaderName,
|
|
|
workGroupMemberName: acceptForm.value.selectedMembers.join(",")
|
|
|
}*/
|
|
|
-
|
|
|
+
|
|
|
await acceptRepairOrder(acceptForm.value)
|
|
|
-
|
|
|
+
|
|
|
proxy.$modal.msgSuccess("接单成功")
|
|
|
acceptDialogVisible.value = false
|
|
|
getList()
|
|
|
@@ -1918,9 +1899,9 @@ async function submitStart() {
|
|
|
workOrderStatus: "processing",
|
|
|
realStartTime: new Date()
|
|
|
};*/
|
|
|
-
|
|
|
+
|
|
|
await startRepairOrder(startForm.value);
|
|
|
-
|
|
|
+
|
|
|
proxy.$modal.msgSuccess("工单已开始处理");
|
|
|
startDialogVisible.value = false;
|
|
|
getList();
|
|
|
@@ -1937,9 +1918,9 @@ async function handlePause(row) {
|
|
|
id: row.id,
|
|
|
workOrderStatus: "paused"
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
await pauseRepairOrder(updateData)
|
|
|
-
|
|
|
+
|
|
|
proxy.$modal.msgSuccess("工单已暂停")
|
|
|
getList()
|
|
|
} catch (error) {
|
|
|
@@ -1956,9 +1937,9 @@ async function handleResume(row) {
|
|
|
id: row.id,
|
|
|
workOrderStatus: "processing"
|
|
|
};
|
|
|
-
|
|
|
+
|
|
|
await resumeRepairOrder(updateData);
|
|
|
-
|
|
|
+
|
|
|
proxy.$modal.msgSuccess("工单已恢复");
|
|
|
getList();
|
|
|
} catch (error) {
|
|
|
@@ -1997,9 +1978,9 @@ async function submitComplete() {
|
|
|
realEndTime: new Date(),
|
|
|
completeDescription: completeForm.value.completeDescription
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
await processDoneRepairOrder(updateData)
|
|
|
-
|
|
|
+
|
|
|
proxy.$modal.msgSuccess("处理完成,工单进入待结单状态")
|
|
|
completeDialogVisible.value = false
|
|
|
getList()
|
|
|
@@ -2030,7 +2011,7 @@ async function submitRating() {
|
|
|
score: ratingForm.value.score,
|
|
|
reviewContent: ratingForm.value.reviewContent
|
|
|
}*/
|
|
|
-
|
|
|
+
|
|
|
await ratingRepairOrder(ratingForm.value)
|
|
|
proxy.$modal.msgSuccess("评分成功")
|
|
|
ratingDialogVisible.value = false
|
|
|
@@ -2082,7 +2063,7 @@ async function submitSuspend() {
|
|
|
};
|
|
|
*/
|
|
|
await suspendRepairOrder(suspendForm.value);
|
|
|
-
|
|
|
+
|
|
|
proxy.$modal.msgSuccess("挂起申请已提交");
|
|
|
suspendDialogVisible.value = false;
|
|
|
getList();
|
|
|
@@ -2120,7 +2101,7 @@ async function submitApprove() {
|
|
|
if (valid) {
|
|
|
try {
|
|
|
/*let updateData, actionRemark, toStatus, actionType = "审批";
|
|
|
-
|
|
|
+
|
|
|
if (approveForm.value.approvalStatus === 'approved') {
|
|
|
// 审批通过
|
|
|
toStatus = "suspended";
|
|
|
@@ -2145,7 +2126,7 @@ async function submitApprove() {
|
|
|
approveForm.value.rejectionReason = undefined;
|
|
|
}
|
|
|
await approveSuspendRepairOrder(approveForm.value);
|
|
|
-
|
|
|
+
|
|
|
proxy.$modal.msgSuccess("操作完成");
|
|
|
approveDialogVisible.value = false;
|
|
|
getList();
|
|
|
@@ -2187,15 +2168,15 @@ async function submitFinalize() {
|
|
|
try {
|
|
|
// 更新检修人员列表
|
|
|
handleMembersChange('finalizeForm');
|
|
|
-
|
|
|
+
|
|
|
/*const updateData = {
|
|
|
id: finalizeForm.value.id,
|
|
|
workOrderStatus: "completed",
|
|
|
finalizationRemark: finalizeForm.value.finalizationRemark
|
|
|
}*/
|
|
|
-
|
|
|
+
|
|
|
await finalizeRepairOrder(finalizeForm.value)
|
|
|
-
|
|
|
+
|
|
|
proxy.$modal.msgSuccess("工单结单成功")
|
|
|
finalizeDialogVisible.value = false
|
|
|
getList()
|
|
|
@@ -2210,7 +2191,7 @@ async function submitFinalize() {
|
|
|
function handleMembersChange(formName) {
|
|
|
// 默认使用 acceptForm,但也支持其他表单
|
|
|
const targetForm = formName === 'finalizeForm' ? finalizeForm : acceptForm;
|
|
|
-
|
|
|
+
|
|
|
// 清空之前的列表
|
|
|
targetForm.value.repairOrderPersonList = [];
|
|
|
console.log(targetForm.value.selectedMembers)
|
|
|
@@ -2243,7 +2224,7 @@ async function submitRestart() {
|
|
|
if (valid) {
|
|
|
try {
|
|
|
await restartRepairOrder(restartForm.value)
|
|
|
-
|
|
|
+
|
|
|
proxy.$modal.msgSuccess("复运成功")
|
|
|
restartDialogVisible.value = false
|
|
|
getList()
|