|
@@ -828,8 +828,7 @@
|
|
|
</div>
|
|
</div>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
- <!-- MIS选择组件 -->
|
|
|
|
|
- <MisInfoSelectSingle :key="commonKey" v-model="misInfoSelectVisible" @onSelected="onMisInfoSelected" :pcsStationName="finalizeRepairForm.pcsStationName" :pcsDeviceName="finalizeRepairForm.pcsDeviceName"></MisInfoSelectSingle>
|
|
|
|
|
|
|
+
|
|
|
<el-col :span="12">
|
|
<el-col :span="12">
|
|
|
<el-form-item label="开始时间" prop="realStartTime">
|
|
<el-form-item label="开始时间" prop="realStartTime">
|
|
|
<el-date-picker
|
|
<el-date-picker
|
|
@@ -1391,6 +1390,107 @@
|
|
|
</template>
|
|
</template>
|
|
|
</el-dialog>
|
|
</el-dialog>
|
|
|
|
|
|
|
|
|
|
+ <!-- 维保工单下发对话框 -->
|
|
|
|
|
+ <el-dialog title="下发" v-model="assignWorkDialogVisible" width="800px" append-to-body>
|
|
|
|
|
+ <div style="max-height: 500px; overflow-y: auto; padding-right: 10px;">
|
|
|
|
|
+ <el-form ref="workOrderRef" :model="assignWorkForm" :rules="assignWorkRules" label-width="120px" label-position="top">
|
|
|
|
|
+ <el-row :gutter="20">
|
|
|
|
|
+ <el-col :span="12">
|
|
|
|
|
+ <el-form-item label="工单编码" prop="workOrderProjectNo">
|
|
|
|
|
+ <el-input v-model="assignWorkForm.workOrderProjectNo" maxlength="50" show-word-limit v-chinese-limit readonly/>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ </el-col>
|
|
|
|
|
+ <el-col :span="12">
|
|
|
|
|
+ <el-form-item label="风机编号" prop="pcsDeviceName">
|
|
|
|
|
+ <el-input v-model="assignWorkForm.pcsDeviceName" readonly>
|
|
|
|
|
+ <template #append>
|
|
|
|
|
+ <el-button @click="handleSelectEquipment" icon="Search"></el-button>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-input>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ </el-col>
|
|
|
|
|
+ </el-row>
|
|
|
|
|
+ <el-row :gutter="20">
|
|
|
|
|
+ <el-col :span="12">
|
|
|
|
|
+ <el-form-item label="维保中心" prop="gxtCenter">
|
|
|
|
|
+ <el-input v-model="assignWorkForm.gxtCenter" readonly />
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ </el-col>
|
|
|
|
|
+ <el-col :span="12">
|
|
|
|
|
+ <el-form-item label="场站" prop="pcsStationName">
|
|
|
|
|
+ <el-input v-model="assignWorkForm.pcsStationName" readonly />
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ </el-col>
|
|
|
|
|
+ </el-row>
|
|
|
|
|
+ <el-row :gutter="20">
|
|
|
|
|
+ <el-col :span="12">
|
|
|
|
|
+ <el-form-item label="品牌" prop="brand">
|
|
|
|
|
+ <el-input v-model="assignWorkForm.brand" readonly />
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ </el-col>
|
|
|
|
|
+ <el-col :span="12">
|
|
|
|
|
+ <el-form-item label="机型" prop="model">
|
|
|
|
|
+ <el-input v-model="assignWorkForm.model" readonly />
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ </el-col>
|
|
|
|
|
+ </el-row>
|
|
|
|
|
+ <el-row :gutter="20">
|
|
|
|
|
+ <el-col :span="12">
|
|
|
|
|
+ <el-form-item label="MIS工单编码" prop="misNo">
|
|
|
|
|
+ <el-input v-model="assignWorkForm.misNo"
|
|
|
|
|
+ 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 && assignWorkForm.misNo && !misNoLoading">
|
|
|
|
|
+ <div>未找到匹配的MIS工单</div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="quick-select-dropdown no-data" v-show="showMisNoQuickSelect && misNoLoading">
|
|
|
|
|
+ <div>
|
|
|
|
|
+ <i class="el-icon-loading"></i>
|
|
|
|
|
+ 搜索中...
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </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="assignWorkForm.content" type="textarea" :rows="3" readonly />
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ </el-col>
|
|
|
|
|
+ </el-row>
|
|
|
|
|
+ </el-form>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <template #footer>
|
|
|
|
|
+ <div class="dialog-footer">
|
|
|
|
|
+ <el-button @click="assignWorkDialogVisible = false">取 消</el-button>
|
|
|
|
|
+ <el-button type="primary" @click="submitWorkFormAndIssue">确认下发</el-button>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-dialog>
|
|
|
|
|
+
|
|
|
|
|
+ <!-- MIS选择组件 -->
|
|
|
|
|
+ <MisInfoSelectSingle :key="commonKey" v-model="misInfoSelectVisible" @onSelected="onMisInfoSelected" :pcsStationName="finalizeRepairForm.pcsStationName || assignWorkForm.pcsStationName" :pcsDeviceName="finalizeRepairForm.pcsDeviceName || assignWorkForm.pcsDeviceName"></MisInfoSelectSingle>
|
|
|
|
|
+
|
|
|
<!-- 设备选择组件 -->
|
|
<!-- 设备选择组件 -->
|
|
|
<equipment-select-single v-model="equipmentSelectVisible" @onSelected="onEquipmentSelected"></equipment-select-single>
|
|
<equipment-select-single v-model="equipmentSelectVisible" @onSelected="onEquipmentSelected"></equipment-select-single>
|
|
|
</div>
|
|
</div>
|
|
@@ -1412,7 +1512,7 @@ import {
|
|
|
restartWorkOrder,
|
|
restartWorkOrder,
|
|
|
} from "@/api/gxt/orderMine.js";
|
|
} from "@/api/gxt/orderMine.js";
|
|
|
import { listUserNoPermi } from "@/api/system/user.js";
|
|
import { listUserNoPermi } from "@/api/system/user.js";
|
|
|
-import { listMaintenanceCenters, listStationsByMaintenanceCenter } from "@/api/gxt/equipment.js";
|
|
|
|
|
|
|
+import { listEquipment,listMaintenanceCenters, listStationsByMaintenanceCenter } from "@/api/gxt/equipment.js";
|
|
|
import { listMisInfo, listWorkPerson } from "@/api/gxt/misInfo.js";
|
|
import { listMisInfo, listWorkPerson } from "@/api/gxt/misInfo.js";
|
|
|
import preview from '@/components/FileUpload/preview.vue'
|
|
import preview from '@/components/FileUpload/preview.vue'
|
|
|
import MisInfoSelectSingle from "@/components/misInfoSelect/single.vue";
|
|
import MisInfoSelectSingle from "@/components/misInfoSelect/single.vue";
|
|
@@ -1420,6 +1520,10 @@ import useUserStore from '@/store/modules/user'
|
|
|
import {
|
|
import {
|
|
|
listRepairOrder,updateRepairOrder,
|
|
listRepairOrder,updateRepairOrder,
|
|
|
} from "@/api/gxt/repairOrder";
|
|
} from "@/api/gxt/repairOrder";
|
|
|
|
|
+import {
|
|
|
|
|
+ listGxtOrder,
|
|
|
|
|
+ updateGxtOrder,
|
|
|
|
|
+} from "@/api/gxt/gxtOrder"
|
|
|
import EquipmentSelectSingle from "@/components/equipmentSelect/single.vue"
|
|
import EquipmentSelectSingle from "@/components/equipmentSelect/single.vue"
|
|
|
|
|
|
|
|
const { proxy } = getCurrentInstance();
|
|
const { proxy } = getCurrentInstance();
|
|
@@ -1603,7 +1707,6 @@ const restartRepairRules = ref({
|
|
|
{ required: true, message: "请选择恢复运行时间", trigger: "change" },
|
|
{ required: true, message: "请选择恢复运行时间", trigger: "change" },
|
|
|
{
|
|
{
|
|
|
validator: (rule, value, callback) => {
|
|
validator: (rule, value, callback) => {
|
|
|
- debugger
|
|
|
|
|
if (value && new Date(value) > new Date()) {
|
|
if (value && new Date(value) > new Date()) {
|
|
|
callback(new Error('恢复运行时间不能大于当前时间'));
|
|
callback(new Error('恢复运行时间不能大于当前时间'));
|
|
|
} else if(value && new Date(value) < new Date(restartRepairForm.value.realEndTime)) {
|
|
} else if(value && new Date(value) < new Date(restartRepairForm.value.realEndTime)) {
|
|
@@ -1622,7 +1725,6 @@ const restartWorkRules = ref({
|
|
|
{ required: true, message: "请选择恢复运行时间", trigger: "change" },
|
|
{ required: true, message: "请选择恢复运行时间", trigger: "change" },
|
|
|
{
|
|
{
|
|
|
validator: (rule, value, callback) => {
|
|
validator: (rule, value, callback) => {
|
|
|
- debugger
|
|
|
|
|
if (value && new Date(value) > new Date()) {
|
|
if (value && new Date(value) > new Date()) {
|
|
|
callback(new Error('恢复运行时间不能大于当前时间'));
|
|
callback(new Error('恢复运行时间不能大于当前时间'));
|
|
|
} else if(value && new Date(value) < new Date(restartWorkForm.value.realEndTime)) {
|
|
} else if(value && new Date(value) < new Date(restartWorkForm.value.realEndTime)) {
|
|
@@ -1662,9 +1764,11 @@ const assignRepairRules = ref({
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
const assignWorkRules = ref({
|
|
const assignWorkRules = ref({
|
|
|
- /* rejectionReason: [
|
|
|
|
|
- { required: true, message: "请输入审批意见", trigger: "blur" }
|
|
|
|
|
- ]*/
|
|
|
|
|
|
|
+ workOrderProjectNo: [{ required: true, message: "工单编码不能为空", trigger: "blur" }],
|
|
|
|
|
+ misNo: [{ required: true, message: "MIS编码不能为空", trigger: "blur" }],
|
|
|
|
|
+ pcsDeviceName: [{ required: true, message: "风机编号不能为空", trigger: "blur" }],
|
|
|
|
|
+ gxtCenter: [{ required: true, message: "维保中心不能为空", trigger: "blur" }],
|
|
|
|
|
+ pcsStationName: [{ required: true, message: "风电场不能为空", trigger: "blur" }]
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
// 页面加载时执行
|
|
// 页面加载时执行
|
|
@@ -2025,6 +2129,10 @@ const handleTeamLeaderInputBlur = () => {
|
|
|
}, 200);
|
|
}, 200);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
// 工作负责人输入事件 - 实时搜索
|
|
// 工作负责人输入事件 - 实时搜索
|
|
|
const handleTeamLeaderInput = (value) => {
|
|
const handleTeamLeaderInput = (value) => {
|
|
|
const searchText = value.trim();
|
|
const searchText = value.trim();
|
|
@@ -2118,13 +2226,14 @@ const handleTeamLeaderClear = () => {
|
|
|
showTeamLeaderQuickSelect.value = false;
|
|
showTeamLeaderQuickSelect.value = false;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-// 添加MIS工单编码相关方法
|
|
|
|
|
/** MIS工单编码输入框获取焦点 */
|
|
/** MIS工单编码输入框获取焦点 */
|
|
|
const handleMisNoInputFocus = () => {
|
|
const handleMisNoInputFocus = () => {
|
|
|
showMisNoQuickSelect.value = true;
|
|
showMisNoQuickSelect.value = true;
|
|
|
// 如果已有输入内容,立即搜索
|
|
// 如果已有输入内容,立即搜索
|
|
|
- if (finalizeRepairForm.value && finalizeRepairForm.value.misOrderNo && finalizeRepairForm.value.misOrderNo.trim()) {
|
|
|
|
|
- handleMisNoInput(finalizeRepairForm.value.misOrderNo);
|
|
|
|
|
|
|
+ if ((finalizeRepairForm.value && finalizeRepairForm.value.misOrderNo && finalizeRepairForm.value.misOrderNo.trim()) ||
|
|
|
|
|
+ (assignWorkForm.value && assignWorkForm.value.misNo && assignWorkForm.value.misNo.trim())) {
|
|
|
|
|
+ const currentForm = finalizeRepairDialogVisible.value ? finalizeRepairForm.value : assignWorkForm.value;
|
|
|
|
|
+ handleMisNoInput(currentForm.misOrderNo || currentForm.misNo);
|
|
|
} else {
|
|
} else {
|
|
|
// 如果没有输入内容,加载默认列表
|
|
// 如果没有输入内容,加载默认列表
|
|
|
loadQuickMisNoList();
|
|
loadQuickMisNoList();
|
|
@@ -2155,7 +2264,7 @@ const handleMisNoInput = (value) => {
|
|
|
if (misNoSearchTimer.value) {
|
|
if (misNoSearchTimer.value) {
|
|
|
clearTimeout(misNoSearchTimer.value);
|
|
clearTimeout(misNoSearchTimer.value);
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
// 设置新的定时器,防抖处理(300ms)
|
|
// 设置新的定时器,防抖处理(300ms)
|
|
|
misNoSearchTimer.value = setTimeout(() => {
|
|
misNoSearchTimer.value = setTimeout(() => {
|
|
|
filterQuickMisNoList(searchText);
|
|
filterQuickMisNoList(searchText);
|
|
@@ -2171,12 +2280,18 @@ const filterQuickMisNoList = (keyword) => {
|
|
|
|
|
|
|
|
const lowerKeyword = keyword.toLowerCase();
|
|
const lowerKeyword = keyword.toLowerCase();
|
|
|
quickMisNoList.value = allMisNoList.value.filter(item =>
|
|
quickMisNoList.value = allMisNoList.value.filter(item =>
|
|
|
- (item.misNo && item.misNo.toLowerCase().includes(lowerKeyword))
|
|
|
|
|
|
|
+ (item.misNo && item.misNo.toLowerCase().includes(lowerKeyword))
|
|
|
);
|
|
);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/** 加载快速检索MIS工单列表 */
|
|
/** 加载快速检索MIS工单列表 */
|
|
|
const loadQuickMisNoList = async () => {
|
|
const loadQuickMisNoList = async () => {
|
|
|
|
|
+ // 如果已有所有MIS工单数据,直接使用
|
|
|
|
|
+ if (allMisNoList.value.length > 0) {
|
|
|
|
|
+ quickMisNoList.value = allMisNoList.value;
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
misNoLoading.value = true;
|
|
misNoLoading.value = true;
|
|
|
try {
|
|
try {
|
|
|
// 加载MIS工单列表
|
|
// 加载MIS工单列表
|
|
@@ -2203,11 +2318,16 @@ const handleMisNoQuickSelect = (item) => {
|
|
|
// 清空MIS工单编码
|
|
// 清空MIS工单编码
|
|
|
const handleMisNoClear = () => {
|
|
const handleMisNoClear = () => {
|
|
|
// 清空与MIS工单相关的字段
|
|
// 清空与MIS工单相关的字段
|
|
|
- finalizeRepairForm.value.misOrderNo = null;
|
|
|
|
|
- finalizeRepairForm.value.realStartTime = null;
|
|
|
|
|
- finalizeRepairForm.value.realEndTime = null;
|
|
|
|
|
- finalizeRepairForm.value.repairOrderPersonList = [];
|
|
|
|
|
- finalizeRepairForm.value.workGroupMemberName = null;
|
|
|
|
|
|
|
+ if (finalizeRepairDialogVisible.value && finalizeRepairForm.value) {
|
|
|
|
|
+ finalizeRepairForm.value.misOrderNo = undefined;
|
|
|
|
|
+ finalizeRepairForm.value.realStartTime = undefined;
|
|
|
|
|
+ finalizeRepairForm.value.realEndTime = undefined;
|
|
|
|
|
+ finalizeRepairForm.value.workGroupMemberName = undefined;
|
|
|
|
|
+ finalizeRepairForm.value.repairOrderPersonList = [];
|
|
|
|
|
+ } else if (assignWorkDialogVisible.value && assignWorkForm.value) {
|
|
|
|
|
+ assignWorkForm.value.misNo = null;
|
|
|
|
|
+ assignWorkForm.value.content = null;
|
|
|
|
|
+ }
|
|
|
quickMisNoList.value = [];
|
|
quickMisNoList.value = [];
|
|
|
showMisNoQuickSelect.value = false;
|
|
showMisNoQuickSelect.value = false;
|
|
|
}
|
|
}
|
|
@@ -2257,33 +2377,63 @@ function handleSelectMisInfo() {
|
|
|
// 设备MIS信息回调
|
|
// 设备MIS信息回调
|
|
|
function onMisInfoSelected(row) {
|
|
function onMisInfoSelected(row) {
|
|
|
if (row) {
|
|
if (row) {
|
|
|
- // 检查工单是否已存在
|
|
|
|
|
- listRepairOrder({pageNum: 1, pageSize: 10, misOrderNo: row.misNo }).then(response => {
|
|
|
|
|
- const orders = response.rows;
|
|
|
|
|
- // 过滤出当前工单以外的其他工单
|
|
|
|
|
- const existingOrders = orders.filter(order => order.id !== finalizeRepairForm.value.id);
|
|
|
|
|
- if (existingOrders.length > 0) {
|
|
|
|
|
- proxy.$modal.msgWarning('选择工单已存在!请重新选择!');
|
|
|
|
|
- return;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- finalizeRepairForm.value.misOrderNo = row.misNo;
|
|
|
|
|
- finalizeRepairForm.value.realStartTime = row.realStartTime;
|
|
|
|
|
- finalizeRepairForm.value.realEndTime = row.realEndTime;
|
|
|
|
|
-
|
|
|
|
|
- // 获取检修人员列表
|
|
|
|
|
- listWorkPerson({ misNo: row.misNo }).then(response => {
|
|
|
|
|
- finalizeRepairForm.value.repairOrderPersonList = response.rows;
|
|
|
|
|
- if (finalizeRepairForm.value.repairOrderPersonList) {
|
|
|
|
|
- const nickNames = finalizeRepairForm.value.repairOrderPersonList
|
|
|
|
|
- .map(person => person.nickName)
|
|
|
|
|
- .join(',');
|
|
|
|
|
- finalizeRepairForm.value.workGroupMemberName = nickNames;
|
|
|
|
|
|
|
+ if (finalizeRepairDialogVisible.value) {
|
|
|
|
|
+ // 检查工单是否已存在
|
|
|
|
|
+ listRepairOrder({pageNum: 1, pageSize: 10, misOrderNo: row.misNo }).then(response => {
|
|
|
|
|
+ const orders = response.rows;
|
|
|
|
|
+ // 过滤出当前工单以外的其他工单
|
|
|
|
|
+ const existingOrders = orders.filter(order => order.id !== finalizeRepairForm.value.id);
|
|
|
|
|
+ if (existingOrders.length > 0) {
|
|
|
|
|
+ proxy.$modal.msgWarning('选择工单已存在!请重新选择!');
|
|
|
|
|
+ return;
|
|
|
}
|
|
}
|
|
|
|
|
+ finalizeRepairForm.value.misOrderNo = row.misNo;
|
|
|
|
|
+ finalizeRepairForm.value.realStartTime = row.realStartTime;
|
|
|
|
|
+ finalizeRepairForm.value.realEndTime = row.realEndTime;
|
|
|
|
|
+
|
|
|
|
|
+ // 获取检修人员信息
|
|
|
|
|
+ listWorkPerson({misNo: row.misNo }).then(response => {
|
|
|
|
|
+ finalizeRepairForm.value.repairOrderPersonList = response.rows;
|
|
|
|
|
+ if (finalizeRepairForm.value.repairOrderPersonList) {
|
|
|
|
|
+ const nickNames = finalizeRepairForm.value.repairOrderPersonList
|
|
|
|
|
+ .map(person => person.nickName)
|
|
|
|
|
+ .join(',');
|
|
|
|
|
+ finalizeRepairForm.value.workGroupMemberName = nickNames
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ misInfoSelectVisible.value = false;
|
|
|
});
|
|
});
|
|
|
-
|
|
|
|
|
- misInfoSelectVisible.value = false;
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ }else if (assignWorkDialogVisible.value) {
|
|
|
|
|
+ // 检查工单是否已存在
|
|
|
|
|
+ listGxtOrder({pageNum: 1, pageSize: 10, misNo: row.misNo }).then(response => {
|
|
|
|
|
+ const gxtOrders= response.rows
|
|
|
|
|
+ if (gxtOrders.length > 0) {
|
|
|
|
|
+ proxy.$modal.msgWarning('选择工单已存在!请重新选择!')
|
|
|
|
|
+ return
|
|
|
|
|
+ }
|
|
|
|
|
+ assignWorkForm.value.misNo = row.misNo
|
|
|
|
|
+ assignWorkForm.value.content = row.content
|
|
|
|
|
+ assignWorkForm.value.realStartTime = row.realStartTime
|
|
|
|
|
+ assignWorkForm.value.realEndTime = row.realEndTime
|
|
|
|
|
+ assignWorkForm.value.planStartTime = row.planStartTime
|
|
|
|
|
+ assignWorkForm.value.planEndTime = row.planEndTime
|
|
|
|
|
+ if (!assignWorkForm.value.pcsDeviceId) {
|
|
|
|
|
+ assignWorkForm.value.pcsDeviceName = row.pcsDeviceName
|
|
|
|
|
+ assignWorkForm.value.pcsStationName = row.pcsStationName
|
|
|
|
|
+ listEquipment({station: row.pcsStationName, equipmentCode: row.pcsDeviceName}).then(response => {
|
|
|
|
|
+ const equipments = response.rows
|
|
|
|
|
+ if (equipments) {
|
|
|
|
|
+ assignWorkForm.value.pcsDeviceId = equipments[0].equipmentId
|
|
|
|
|
+ assignWorkForm.value.gxtCenter = equipments[0].maintenanceCenter
|
|
|
|
|
+ assignWorkForm.value.brand = equipments[0].brand
|
|
|
|
|
+ assignWorkForm.value.model = equipments[0].model
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+ misInfoSelectVisible.value = false
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
|
|
+ misInfoSelectVisible.value = false;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -2369,6 +2519,12 @@ function handleSelectEquipment() {
|
|
|
|
|
|
|
|
/** 设备选择回调 */
|
|
/** 设备选择回调 */
|
|
|
function onEquipmentSelected(row) {
|
|
function onEquipmentSelected(row) {
|
|
|
|
|
+ // Determine which form we're updating based on which dialog is visible
|
|
|
|
|
+ let targetForm = assignRepairForm;
|
|
|
|
|
+ if (assignWorkDialogVisible.value) {
|
|
|
|
|
+ targetForm = assignWorkForm;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
if (row) {
|
|
if (row) {
|
|
|
// 检查维保中心ID和场站ID是否存在
|
|
// 检查维保中心ID和场站ID是否存在
|
|
|
if (!row.maintenanceCenterId) {
|
|
if (!row.maintenanceCenterId) {
|
|
@@ -2379,19 +2535,19 @@ function onEquipmentSelected(row) {
|
|
|
proxy.$modal.msgError("该设备的场站没有对应的部门,请完善部门信息后再更新设备数据!");
|
|
proxy.$modal.msgError("该设备的场站没有对应的部门,请完善部门信息后再更新设备数据!");
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
- assignRepairForm.value.pcsDeviceId = row.equipmentId
|
|
|
|
|
- assignRepairForm.value.pcsDeviceName = row.equipmentCode
|
|
|
|
|
- assignRepairForm.value.gxtCenterId = row.maintenanceCenterId
|
|
|
|
|
- assignRepairForm.value.gxtCenter = row.maintenanceCenter
|
|
|
|
|
- assignRepairForm.value.pcsStationId = row.stationId
|
|
|
|
|
- assignRepairForm.value.pcsStationName = row.station
|
|
|
|
|
- assignRepairForm.value.brand = row.brand
|
|
|
|
|
- assignRepairForm.value.model = row.model
|
|
|
|
|
|
|
+ targetForm.value.pcsDeviceId = row.equipmentId
|
|
|
|
|
+ targetForm.value.pcsDeviceName = row.equipmentCode
|
|
|
|
|
+ targetForm.value.gxtCenterId = row.maintenanceCenterId
|
|
|
|
|
+ targetForm.value.gxtCenter = row.maintenanceCenter
|
|
|
|
|
+ targetForm.value.pcsStationId = row.stationId
|
|
|
|
|
+ targetForm.value.pcsStationName = row.station
|
|
|
|
|
+ targetForm.value.brand = row.brand
|
|
|
|
|
+ targetForm.value.model = row.model
|
|
|
}
|
|
}
|
|
|
equipmentSelectVisible.value = false
|
|
equipmentSelectVisible.value = false
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-/** 保存并下发 */
|
|
|
|
|
|
|
+/** 保存并下发维修工单 */
|
|
|
function submitFormAndIssue() {
|
|
function submitFormAndIssue() {
|
|
|
proxy.$refs["repairOrderRef"].validate(valid => {
|
|
proxy.$refs["repairOrderRef"].validate(valid => {
|
|
|
if (valid) {
|
|
if (valid) {
|
|
@@ -2405,6 +2561,21 @@ function submitFormAndIssue() {
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+/** 保存并下发维保工单 */
|
|
|
|
|
+function submitWorkFormAndIssue() {
|
|
|
|
|
+ proxy.$refs["workOrderRef"].validate(valid => {
|
|
|
|
|
+ if (valid) {
|
|
|
|
|
+ // 设置状态为待接单
|
|
|
|
|
+ assignWorkForm.value.workOrderStatus = "assigned"
|
|
|
|
|
+ updateGxtOrder(assignWorkForm.value).then(response => {
|
|
|
|
|
+ proxy.$modal.msgSuccess("下发成功")
|
|
|
|
|
+ assignWorkDialogVisible.value = false
|
|
|
|
|
+ getList()
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+}
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|
|
|
<style scoped>
|
|
<style scoped>
|