|
@ -126,6 +126,22 @@ |
|
|
<el-image v-for="url in urls" :key="url" :src="url" lazy /> |
|
|
<el-image v-for="url in urls" :key="url" :src="url" lazy /> |
|
|
</Dialog> |
|
|
</Dialog> |
|
|
|
|
|
|
|
|
|
|
|
<Dialog |
|
|
|
|
|
ref="confirmIfTempIdeaRef" |
|
|
|
|
|
v-model="showTempIdeaRefView" |
|
|
|
|
|
:key="tempIdeaRefViewKey" |
|
|
|
|
|
:closeOnClickModal="true" |
|
|
|
|
|
:title="tempIdeaRefViewTitle" |
|
|
|
|
|
> |
|
|
|
|
|
<div style="text-align: center;"> |
|
|
|
|
|
<el-checkbox ref="checkBoxTempDue" v-model="isTemporary">临时措施</el-checkbox> |
|
|
|
|
|
</div> |
|
|
|
|
|
<template #footer> |
|
|
|
|
|
<el-button @click="cancel">取消</el-button> |
|
|
|
|
|
<el-button type="primary" @click="confirmIsTemporary">确定</el-button> |
|
|
|
|
|
</template> |
|
|
|
|
|
</Dialog> |
|
|
|
|
|
|
|
|
</template> |
|
|
</template> |
|
|
|
|
|
|
|
|
<script setup lang="ts"> |
|
|
<script setup lang="ts"> |
|
@ -170,6 +186,11 @@ const newRow = ref() |
|
|
const deviceList = ref() |
|
|
const deviceList = ref() |
|
|
const moldList = ref() |
|
|
const moldList = ref() |
|
|
const repairUser = ref() |
|
|
const repairUser = ref() |
|
|
|
|
|
const showTempIdeaRefView = ref(false) |
|
|
|
|
|
const tempIdeaRefViewKey = ref(0) |
|
|
|
|
|
const tempIdeaRefViewTitle = ref('是否临时措施') |
|
|
|
|
|
const isTemporary = ref(false) |
|
|
|
|
|
const tempIdeaRefViewData = ref() |
|
|
// 字段设置 更新主列表字段 |
|
|
// 字段设置 更新主列表字段 |
|
|
const updataTableColumns = (val) => { |
|
|
const updataTableColumns = (val) => { |
|
|
tableColumns.value = val |
|
|
tableColumns.value = val |
|
@ -343,7 +364,7 @@ const butttondata = (row) => { |
|
|
) |
|
|
) |
|
|
}), // 接单 |
|
|
}), // 接单 |
|
|
defaultButtons.turnOrderBtn({ |
|
|
defaultButtons.turnOrderBtn({ |
|
|
hide: !(row.status == 'PECEIVED' && row.maintenance == userStore.getUser.id && !row.hasDetails) |
|
|
hide: !(row.status == 'PECEIVED' && row.maintenance == userStore.getUser.id && !row.hasDetails ) |
|
|
}), // 转办 |
|
|
}), // 转办 |
|
|
defaultButtons.repairBtn({ |
|
|
defaultButtons.repairBtn({ |
|
|
hide: !(row.status == 'PECEIVED' && row.maintenance == userStore.getUser.id) |
|
|
hide: !(row.status == 'PECEIVED' && row.maintenance == userStore.getUser.id) |
|
@ -385,13 +406,29 @@ const onChangeSec = (field, cur, item,formRefSec) => { |
|
|
const setV = {} |
|
|
const setV = {} |
|
|
setV['maintenance'] = '' |
|
|
setV['maintenance'] = '' |
|
|
formRefSec.setValues(setV) |
|
|
formRefSec.setValues(setV) |
|
|
MoldMaintenanceMainSec.allSchemas.formSchema.find(item => { |
|
|
DeviceMaintenanceMainSec.allSchemas.formSchema.find(item => { |
|
|
return item.field == 'maintenance' |
|
|
return item.field == 'maintenance' |
|
|
}).componentProps.options = res |
|
|
}).componentProps.options = res |
|
|
}) |
|
|
}) |
|
|
const setV = {} |
|
|
const setV = {} |
|
|
setV['deviceNumber'] = '' |
|
|
setV['deviceNumber'] = '' |
|
|
formRefSec.setValues(setV) |
|
|
formRefSec.setValues(setV) |
|
|
|
|
|
} else if (cur == 'TECH') { |
|
|
|
|
|
DeviceMaintenanceMainSec.allSchemas.formSchema.find(item => { |
|
|
|
|
|
return item.field == 'deviceNumber' |
|
|
|
|
|
}).componentProps.options = deviceList.value |
|
|
|
|
|
selecUserByType({ classType: 'TECH', factoryAreaNumber: '', flag: null }).then(res => { |
|
|
|
|
|
repairUser.value = res |
|
|
|
|
|
const setV = {} |
|
|
|
|
|
setV['maintenance'] = '' |
|
|
|
|
|
formRefSec.setValues(setV) |
|
|
|
|
|
DeviceMaintenanceMainSec.allSchemas.formSchema.find(item => { |
|
|
|
|
|
return item.field == 'maintenance' |
|
|
|
|
|
}).componentProps.options = res |
|
|
|
|
|
}) |
|
|
|
|
|
const setV = {} |
|
|
|
|
|
setV['deviceNumber'] = '' |
|
|
|
|
|
formRefSec.setValues(setV) |
|
|
} else { |
|
|
} else { |
|
|
DeviceMaintenanceMainSec.allSchemas.formSchema.find(item => { |
|
|
DeviceMaintenanceMainSec.allSchemas.formSchema.find(item => { |
|
|
return item.field == 'deviceNumber' |
|
|
return item.field == 'deviceNumber' |
|
@ -401,7 +438,7 @@ const onChangeSec = (field, cur, item,formRefSec) => { |
|
|
const setV = {} |
|
|
const setV = {} |
|
|
setV['maintenance'] = '' |
|
|
setV['maintenance'] = '' |
|
|
formRefSec.setValues(setV) |
|
|
formRefSec.setValues(setV) |
|
|
MoldMaintenanceMainSec.allSchemas.formSchema.find(item => { |
|
|
DeviceMaintenanceMainSec.allSchemas.formSchema.find(item => { |
|
|
return item.field == 'maintenance' |
|
|
return item.field == 'maintenance' |
|
|
}).componentProps.options = res |
|
|
}).componentProps.options = res |
|
|
}) |
|
|
}) |
|
@ -614,21 +651,29 @@ function acceptOrder(row) { |
|
|
getList() |
|
|
getList() |
|
|
} |
|
|
} |
|
|
// 转办 |
|
|
// 转办 |
|
|
function turnOrder() {} |
|
|
function turnOrder() { } |
|
|
|
|
|
|
|
|
// 完成 |
|
|
// 完成 |
|
|
function finishOrder(row) { |
|
|
function finishOrder(row) { |
|
|
|
|
|
showTempIdeaRefView.value = true |
|
|
|
|
|
tempIdeaRefViewData.value = row |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
function confirmFinish(row) { |
|
|
let param = { |
|
|
let param = { |
|
|
id: row.id, |
|
|
id: row.id, |
|
|
number: row.number, |
|
|
number: row.number, |
|
|
status: row.status, |
|
|
status: row.status, |
|
|
result: 'COMPLETED', |
|
|
result:isTemporary.value && isTemporary.value != ''?'TEMPORARILY':'COMPLETED', |
|
|
requestNumber: row.requestNumber, |
|
|
requestNumber: row.requestNumber, |
|
|
} |
|
|
} |
|
|
DeviceMaintenanceMainApi.finishOrder(param).then(res => { |
|
|
DeviceMaintenanceMainApi.finishOrder(param).then(res => { |
|
|
getList() |
|
|
getList() |
|
|
|
|
|
showTempIdeaRefView.value = false; |
|
|
message.success('操作成功') |
|
|
message.success('操作成功') |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// 验证 |
|
|
// 验证 |
|
|
function verifyOrder(row) { |
|
|
function verifyOrder(row) { |
|
|
let param = { |
|
|
let param = { |
|
@ -834,7 +879,7 @@ const openFormCallBack = (type, row, masterParmas, callback) => { |
|
|
|
|
|
|
|
|
function buttonControllFunction(row, val) { |
|
|
function buttonControllFunction(row, val) { |
|
|
if (val == 'delete') { |
|
|
if (val == 'delete') { |
|
|
if (row.status == 'COMPLETED' || row.status == 'VERIFIED' || row.status == 'REJECTED' || !isReceiver(row.maintenance) ) { |
|
|
if (row.status == 'COMPLETED' || row.status == 'VERIFIED' || row.status == 'REJECTED' || !isReceiver(row.maintenance) ) { |
|
|
return false |
|
|
return false |
|
|
} else { |
|
|
} else { |
|
|
return true |
|
|
return true |
|
@ -866,6 +911,15 @@ function isReceiver(orderPerson) { |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const confirmIsTemporary = () => { |
|
|
|
|
|
confirmFinish(tempIdeaRefViewData.value) |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const cancel = () => { |
|
|
|
|
|
showTempIdeaRefView.value = false; |
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
/** 初始化 **/ |
|
|
/** 初始化 **/ |
|
|
onMounted(async () => { |
|
|
onMounted(async () => { |
|
|
getList() |
|
|
getList() |
|
|