Browse Source

测试bug修复

master
ljlong_2630 8 months ago
parent
commit
5ad14c8f4d
  1. 2
      src/views/eam/device/devicemaintenancejob/deviceMaintenanceMain.data.ts
  2. 64
      src/views/eam/device/devicemaintenancejob/index.vue
  3. 49
      src/views/eam/mold/moldmaintenancejob/index.vue

2
src/views/eam/device/devicemaintenancejob/deviceMaintenanceMain.data.ts

@ -195,7 +195,7 @@ export const DeviceMaintenanceMain = useCrudSchemas(reactive<CrudSchema[]>([
formatter: (_: Recordable, __: TableColumn, cellValue: number) => {
return deviceMoldTypeList.find((account) => account.value == cellValue)?.label
},
dictType: DICT_TYPE.APP_DEVICE_MOLD_TYPE,
// dictType: DICT_TYPE.APP_DEVICE_MOLD_TYPE,
isSearch: true,
search: {
component: 'Select',

64
src/views/eam/device/devicemaintenancejob/index.vue

@ -126,6 +126,22 @@
<el-image v-for="url in urls" :key="url" :src="url" lazy />
</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>
<script setup lang="ts">
@ -170,6 +186,11 @@ const newRow = ref()
const deviceList = ref()
const moldList = 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) => {
tableColumns.value = val
@ -343,7 +364,7 @@ const butttondata = (row) => {
)
}), //
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({
hide: !(row.status == 'PECEIVED' && row.maintenance == userStore.getUser.id)
@ -385,7 +406,23 @@ const onChangeSec = (field, cur, item,formRefSec) => {
const setV = {}
setV['maintenance'] = ''
formRefSec.setValues(setV)
MoldMaintenanceMainSec.allSchemas.formSchema.find(item => {
DeviceMaintenanceMainSec.allSchemas.formSchema.find(item => {
return item.field == 'maintenance'
}).componentProps.options = res
})
const setV = {}
setV['deviceNumber'] = ''
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
})
@ -401,7 +438,7 @@ const onChangeSec = (field, cur, item,formRefSec) => {
const setV = {}
setV['maintenance'] = ''
formRefSec.setValues(setV)
MoldMaintenanceMainSec.allSchemas.formSchema.find(item => {
DeviceMaintenanceMainSec.allSchemas.formSchema.find(item => {
return item.field == 'maintenance'
}).componentProps.options = res
})
@ -614,21 +651,29 @@ function acceptOrder(row) {
getList()
}
//
function turnOrder() {}
function turnOrder() { }
//
function finishOrder(row) {
showTempIdeaRefView.value = true
tempIdeaRefViewData.value = row
}
function confirmFinish(row) {
let param = {
id: row.id,
number: row.number,
status: row.status,
result: 'COMPLETED',
result:isTemporary.value && isTemporary.value != ''?'TEMPORARILY':'COMPLETED',
requestNumber: row.requestNumber,
}
DeviceMaintenanceMainApi.finishOrder(param).then(res => {
getList()
showTempIdeaRefView.value = false;
message.success('操作成功')
})
}
//
function verifyOrder(row) {
let param = {
@ -866,6 +911,15 @@ function isReceiver(orderPerson) {
}
}
const confirmIsTemporary = () => {
confirmFinish(tempIdeaRefViewData.value)
}
const cancel = () => {
showTempIdeaRefView.value = false;
};
/** 初始化 **/
onMounted(async () => {
getList()

49
src/views/eam/mold/moldmaintenancejob/index.vue

@ -126,6 +126,24 @@
</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>
<script setup lang="ts">
@ -146,9 +164,9 @@ import { selecUserByType } from '@/api/system/dept'
import { DICT_TYPE, getStrDictOptions } from '@/utils/dict'
import * as DeviceAccountsApi from '@/api/eam/device/deviceAccounts'
import * as MoldAccountsApi from '@/api/eam/mold/moldAccounts'
import * as UserApi from '@/api/system/user'
const deviceMoldTypeList = getStrDictOptions(DICT_TYPE.APP_DEVICE_MOLD_TYPE)
const moldTypeList = getStrDictOptions(DICT_TYPE.APP_DEVICE_MOLD_TYPE).filter(item => item.value == 'MOLD')
const userListAll = await UserApi.getSimpleUserList()
defineOptions({ name: 'MoldMaintenanceMain' })
const message = useMessage() //
const { t } = useI18n() //
@ -166,6 +184,11 @@ const newRow = ref()
const deviceList = ref()
const moldList = ref()
const repairUser = ref()
const showTempIdeaRefView = ref(false)
const tempIdeaRefViewKey = ref(0)
const tempIdeaRefViewTitle = ref('是否临时措施')
const isTemporary = ref(false)
const tempIdeaRefViewData = ref()
routeName.value = route.name
const tableColumns = ref(MoldMaintenanceMain.allSchemas.tableColumns)
@ -345,7 +368,7 @@ const butttondata = (row) => {
)
}), //
defaultButtons.turnOrderBtn({
hide: !(row.status == 'PECEIVED' && row.maintenance == userStore.getUser.id)
hide: !(row.status == 'PECEIVED' && row.maintenance == userStore.getUser.id && !row.hasDetails)
}), //
defaultButtons.repairBtn({
hide: !(row.status == 'PECEIVED' && row.maintenance == userStore.getUser.id)
@ -486,21 +509,29 @@ function acceptOrder(row) {
})
}
//
function turnOrder() {}
function turnOrder() { }
//
function finishOrder(row) {
showTempIdeaRefView.value = true
tempIdeaRefViewData.value = row
}
function confirmFinish(row) {
let param = {
id: row.id,
number: row.number,
status: row.status,
result: 'COMPLETED',
result:isTemporary.value && isTemporary.value != ''?'TEMPORARILY':'COMPLETED',
requestNumber: row.requestNumber,
}
MoldMaintenanceMainApi.finishOrder(param).then(res => {
getList()
showTempIdeaRefView.value = false;
message.success('操作成功')
})
}
//
function verifyOrder(row) {
let param = {
@ -859,6 +890,16 @@ function isReceiver(orderPerson) {
}
}
const confirmIsTemporary = () => {
confirmFinish(tempIdeaRefViewData.value)
}
const cancel = () => {
showTempIdeaRefView.value = false;
};
/** 初始化 **/
onMounted(async () => {
getList()

Loading…
Cancel
Save