|
@ -78,6 +78,36 @@ |
|
|
<!-- 导入 --> |
|
|
<!-- 导入 --> |
|
|
<ImportForm ref="importFormRef" url="/eam/mold-inspection-main/import" :importTemplateData="importTemplateData" |
|
|
<ImportForm ref="importFormRef" url="/eam/mold-inspection-main/import" :importTemplateData="importTemplateData" |
|
|
@success="importSuccess" /> |
|
|
@success="importSuccess" /> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<Dialog |
|
|
|
|
|
ref="verifyDialog" |
|
|
|
|
|
title="验证意见" |
|
|
|
|
|
v-model="verifyDialogVisible" |
|
|
|
|
|
:width="600" |
|
|
|
|
|
:maxHeight="700" |
|
|
|
|
|
:style="{height:'450px'}" |
|
|
|
|
|
:before-close="handleBeforeVerifyClose" |
|
|
|
|
|
> |
|
|
|
|
|
<el-form :model="verifyFormValue" class="demo-form-inline"> |
|
|
|
|
|
<el-form-item label="验证意见"> |
|
|
|
|
|
<el-input |
|
|
|
|
|
type="textarea" |
|
|
|
|
|
v-model="verifyFormValue.verifyContent" |
|
|
|
|
|
placeholder="请填写验证意见" |
|
|
|
|
|
clearable |
|
|
|
|
|
:rows="12" |
|
|
|
|
|
/> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
</el-form> |
|
|
|
|
|
<template #footer> |
|
|
|
|
|
<div style="text-align: center;"> |
|
|
|
|
|
<el-button type="primary" @click="verifyCancel">取消</el-button> |
|
|
|
|
|
<el-button type="primary" @click="verifySubmit">提交</el-button> |
|
|
|
|
|
</div> |
|
|
|
|
|
</template> |
|
|
|
|
|
</Dialog> |
|
|
|
|
|
|
|
|
</template> |
|
|
</template> |
|
|
|
|
|
|
|
|
<script setup lang="ts"> |
|
|
<script setup lang="ts"> |
|
@ -118,6 +148,11 @@ const tableColumns = ref(MoldInspectionMain.allSchemas.tableColumns) |
|
|
const Echo = [] |
|
|
const Echo = [] |
|
|
const tableData = ref([]) |
|
|
const tableData = ref([]) |
|
|
const formRef = ref() |
|
|
const formRef = ref() |
|
|
|
|
|
const verifyDialogVisible = ref(false) |
|
|
|
|
|
const verifyFormValue = ref({ |
|
|
|
|
|
verifyContent: '', |
|
|
|
|
|
}) |
|
|
|
|
|
const openRowValue = ref() |
|
|
// 查询页面返回 |
|
|
// 查询页面返回 |
|
|
const searchTableSuccess = (formField, searchField, val, formRef, type, row) => { |
|
|
const searchTableSuccess = (formField, searchField, val, formRef, type, row) => { |
|
|
nextTick(() => { |
|
|
nextTick(() => { |
|
@ -207,8 +242,11 @@ const butttondata = (row) => { |
|
|
// defaultButtons.mainListEditBtn({hasPermi:'eam:moldInspectionMain:update'}), // 编辑 |
|
|
// defaultButtons.mainListEditBtn({hasPermi:'eam:moldInspectionMain:update'}), // 编辑 |
|
|
// defaultButtons.mainListDeleteBtn({hasPermi:'eam:moldInspectionMain:delete'}), // 删除 |
|
|
// defaultButtons.mainListDeleteBtn({hasPermi:'eam:moldInspectionMain:delete'}), // 删除 |
|
|
// defaultButtons.mainListEditBtn({ hide: !(row.status != 'COMPLETED' && row.status != 'VERIFIED' && row.status != 'REJECTED' && isReceiver(row.maintenance))}), // 编辑 |
|
|
// defaultButtons.mainListEditBtn({ hide: !(row.status != 'COMPLETED' && row.status != 'VERIFIED' && row.status != 'REJECTED' && isReceiver(row.maintenance))}), // 编辑 |
|
|
defaultButtons.mainInspectionOrderBtn({ hide: !(row.status == 'PROCCED' && (userStore.getUser.id == row.maintenance)) }), //检修 |
|
|
defaultButtons.mainInspectionOrderBtn({ hide: !(row.status == 'PECEIVED' && (userStore.getUser.id == row.maintenance)) }), //检修 |
|
|
defaultButtons.finishOrderBtn({ hide: !(row.status == 'PROCCED' && (userStore.getUser.id == row.maintenance)) }), //完成 |
|
|
defaultButtons.finishOrderBtn({ hide: !(row.status == 'PECEIVED' && (userStore.getUser.id == row.maintenance)) }), //完成 |
|
|
|
|
|
defaultButtons.verifyOrderBtn({ |
|
|
|
|
|
hide: !(row.status == 'COMPLETED' && judgeIsTheClassEngineer(row)) |
|
|
|
|
|
}), // 验证 |
|
|
] |
|
|
] |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -220,6 +258,8 @@ const buttonTableClick = async (val, row) => { |
|
|
openDetail(row, '代码', row.number) |
|
|
openDetail(row, '代码', row.number) |
|
|
} else if (val == 'finishOrder') { // 完成 |
|
|
} else if (val == 'finishOrder') { // 完成 |
|
|
handleFinishOrder(row) |
|
|
handleFinishOrder(row) |
|
|
|
|
|
} else if (val == 'verifyOrder') { // 验证 |
|
|
|
|
|
verifyOrder(row) |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -290,6 +330,7 @@ const openDetail = async (row: any, titleName: any, titleValue: any) => { |
|
|
const userListAll = await UserApi.getSimpleUserList() |
|
|
const userListAll = await UserApi.getSimpleUserList() |
|
|
row.factoryAreaNumber1 = factoryList.find((account) => account.id == row.factoryAreaNumber)?.name |
|
|
row.factoryAreaNumber1 = factoryList.find((account) => account.id == row.factoryAreaNumber)?.name |
|
|
row.maintenance1 = userListAll.find((account) => account.id == row.maintenance)?.nickname |
|
|
row.maintenance1 = userListAll.find((account) => account.id == row.maintenance)?.nickname |
|
|
|
|
|
row.verifyerDetail = userListAll.find((account) => account.id == row.verifyer)?.nickname |
|
|
detailRef.value.openDetail(row, titleName, titleValue, 'basicMoldInspectionMain') |
|
|
detailRef.value.openDetail(row, titleName, titleValue, 'basicMoldInspectionMain') |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -382,13 +423,13 @@ function handleFinishOrder(row) { |
|
|
const onChange = (field, cur, item) => { |
|
|
const onChange = (field, cur, item) => { |
|
|
// 当有效天数 和 生效时间 发生变化 |
|
|
// 当有效天数 和 生效时间 发生变化 |
|
|
if (field == 'deviceNumber') { |
|
|
if (field == 'deviceNumber') { |
|
|
basicFormRef.value.formRef.formModel.factoryAreaNumber = Number(item.componentProps.options.find(element => element.number == cur).factoryAreaNumber) |
|
|
basicFormRef.value.formRef.formModel.factoryAreaNumber = String(item.componentProps.options.find(element => element.number == cur).factoryAreaNumber) |
|
|
basicFormRef.value.formRef.formModel.maintenance = String(userStore?.getUser?.id) |
|
|
basicFormRef.value.formRef.formModel.maintenance = Number(userStore?.getUser?.id) |
|
|
basicFormRef.value.formRef.formModel.maintenanceNumber = '' |
|
|
basicFormRef.value.formRef.formModel.maintenanceNumber = '' |
|
|
} else if (field == 'maintenanceNumber') { |
|
|
} else if (field == 'maintenanceNumber') { |
|
|
basicFormRef.value.formRef.formModel.deviceNumber = item.componentProps.options.find(element => element.number == cur).deviceNumber |
|
|
basicFormRef.value.formRef.formModel.deviceNumber = item.componentProps.options.find(element => element.number == cur).deviceNumber |
|
|
basicFormRef.value.formRef.formModel.factoryAreaNumber = Number(item.componentProps.options.find(element => element.number == cur).factoryAreaNumber) |
|
|
basicFormRef.value.formRef.formModel.factoryAreaNumber = String(item.componentProps.options.find(element => element.number == cur).factoryAreaNumber) |
|
|
basicFormRef.value.formRef.formModel.maintenance = String(userStore?.getUser?.id) |
|
|
basicFormRef.value.formRef.formModel.maintenance = Number(userStore?.getUser?.id) |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -595,6 +636,38 @@ function isReceiver(orderPerson) { |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// 验证 |
|
|
|
|
|
function verifyOrder(row) { |
|
|
|
|
|
openRowValue.value = row |
|
|
|
|
|
verifyDialogVisible.value = true |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// 验证 |
|
|
|
|
|
function verifySubmit() { |
|
|
|
|
|
const row = openRowValue.value |
|
|
|
|
|
MoldInspectionMainApi.verifyOrder(row.id,verifyFormValue.value.verifyContent).then(res => { |
|
|
|
|
|
verifyDialogVisible.value = false |
|
|
|
|
|
getList() |
|
|
|
|
|
message.success('操作成功') |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// 验证取消 |
|
|
|
|
|
function verifyCancel(row) { |
|
|
|
|
|
verifyDialogVisible.value = false |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const judgeIsTheClassEngineer = (row) => { |
|
|
|
|
|
const rolesOk = userStore.roles.find(item => { |
|
|
|
|
|
return item == 'mold_class_Engineer_role' |
|
|
|
|
|
}) |
|
|
|
|
|
if (rolesOk != undefined && rolesOk != null) { |
|
|
|
|
|
return true |
|
|
|
|
|
} else { |
|
|
|
|
|
return false |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
/** 初始化 **/ |
|
|
/** 初始化 **/ |
|
|
onMounted(async () => { |
|
|
onMounted(async () => { |
|
|
getList() |
|
|
getList() |
|
|