Browse Source

解决测试bug

master
ljlong_2630 10 months ago
parent
commit
4176e32a81
  1. 6
      src/api/eam/mold/moldInspectionMain/index.ts
  2. 15
      src/components/Detail/src/DetailDeviceLedger.vue
  3. 69
      src/views/eam/device/deviceRepair/deviceRepair.data.ts
  4. 2
      src/views/eam/device/deviceinspectionjob/index.vue
  5. 7
      src/views/eam/mold/moldAccounts/moldAccounts.data.ts
  6. 30
      src/views/eam/mold/moldinspectionjob/index.vue
  7. 2
      src/views/eam/mold/moldinspectionjob/moldInspectionMain.data.ts

6
src/api/eam/mold/moldInspectionMain/index.ts

@ -56,3 +56,9 @@ export const exportMoldInspectionMain = async (params) => {
export const importTemplate = () => { export const importTemplate = () => {
return request.download({ url: '/eam/device-inspection-job-main/get-import-template' }) return request.download({ url: '/eam/device-inspection-job-main/get-import-template' })
} }
// 查询检修工单主列表
export const getMoldInspectionMainNoPage = async (params) => {
return await request.get({ url: `/eam/device-inspection-job-main/noPage`, params })
}

15
src/components/Detail/src/DetailDeviceLedger.vue

@ -208,6 +208,7 @@
:rules="dialogFormAllSchemasRules" :rules="dialogFormAllSchemasRules"
:formAllSchemas="dialogFormAllSchemas" :formAllSchemas="dialogFormAllSchemas"
:isBusiness="false" :isBusiness="false"
:key="milestoneUpdateKey"
/> />
</div> </div>
</template> </template>
@ -234,12 +235,12 @@ const dialogTitle = ref()
const dialogAllSchemasRef = ref() const dialogAllSchemasRef = ref()
const dialogTableObjectRef = ref() const dialogTableObjectRef = ref()
const dialogTableMethodsRef = ref() const dialogTableMethodsRef = ref()
const dialogUploadTitle = ref() const dialogUploadTitle = ref('文件上传')
const dialogUploadVisible = ref(false) const dialogUploadVisible = ref(false)
const dialogUploadNumber = ref() const dialogUploadNumber = ref()
const dialogUploadBusiCode = ref() const dialogUploadBusiCode = ref()
const dialogFormKey = ref(0) const dialogFormKey = ref(0)
const milestoneUpdateKey = ref(0)
const props = defineProps({ const props = defineProps({
// //
tabs: { tabs: {
@ -894,10 +895,12 @@ const buttonMilestoneClick = async (val, row) => {
} }
} }
function submitDialogForm(type, row) { const submitDialogForm = async (type, row) => {
props.diaLogApiUpdate(row).then(res => { await props.diaLogApiUpdate(row)
console.log(res.code); dialogFormRef.value.dialogVisible = false
}) debugger
await getList()
milestoneUpdateKey.value += 1
} }
function openDialogUpload(row) { function openDialogUpload(row) {

69
src/views/eam/device/deviceRepair/deviceRepair.data.ts

@ -84,27 +84,37 @@ export const DeviceRepair = useCrudSchemas(reactive<CrudSchema[]>([
} }
}, },
{ {
label: '报修人', label: '类型',
field: 'declarer', field: 'type',
sort: 'custom', sort: 'custom',
table: { table: {
width: '150', width: '150',
}, },
isForm: false,
isDetail: false,
formatter: (_: Recordable, __: TableColumn, cellValue: number) => { formatter: (_: Recordable, __: TableColumn, cellValue: number) => {
return userListAll.find((account) => account.id == cellValue)?.nickname return deviceMoldTypeList.find((account) => account.value == cellValue)?.label
}, },
isSearch: true,
search: { search: {
component: 'Select', component: 'Select',
componentProps: { componentProps: {
options: userListAll, options: deviceTypeList,
optionsAlias: { optionsAlias: {
labelField: 'nickname', labelField: 'label',
valueField: 'id' valueField: 'value'
}, },
}, },
}, },
form: {
component: 'Select',
componentProps: {
options: deviceTypeList,
optionsAlias: {
labelField: 'label',
valueField: 'value'
},
placeholder: "请选择设备"
}
},
}, },
{ {
label: '设备', label: '设备',
@ -142,47 +152,36 @@ export const DeviceRepair = useCrudSchemas(reactive<CrudSchema[]>([
} }
}, },
{ {
label: '类型', label: '报修人电话',
field: 'type', field: 'declarerPhone',
sort: 'custom', sort: 'custom',
table: { table: {
width: '150', width: '150',
}, },
formatter: (_: Recordable, __: TableColumn, cellValue: number) => {
return deviceMoldTypeList.find((account) => account.value == cellValue)?.label
},
isSearch: true,
search: {
component: 'Select',
componentProps: {
options: deviceTypeList,
optionsAlias: {
labelField: 'label',
valueField: 'value'
}, },
{
label: '报修人',
field: 'declarer',
sort: 'custom',
table: {
width: '150',
}, },
isForm: false,
isDetail: false,
formatter: (_: Recordable, __: TableColumn, cellValue: number) => {
return userListAll.find((account) => account.id == cellValue)?.nickname
}, },
form: { search: {
component: 'Select', component: 'Select',
componentProps: { componentProps: {
options: deviceTypeList, options: userListAll,
optionsAlias: { optionsAlias: {
labelField: 'label', labelField: 'nickname',
valueField: 'value' valueField: 'id'
},
placeholder: "请选择设备"
}
}, },
}, },
{
label: '报修人电话',
field: 'declarerPhone',
sort: 'custom',
table: {
width: '150',
}, },
}, },
{ {
label: '故障类型', label: '故障类型',
field: 'faultType', field: 'faultType',

2
src/views/eam/device/deviceinspectionjob/index.vue

@ -197,7 +197,7 @@ const butttondata = (row) => {
return [ return [
// defaultButtons.mainListEditBtn({hasPermi:'eam:deviceInspectionMain:update'}), // // defaultButtons.mainListEditBtn({hasPermi:'eam:deviceInspectionMain:update'}), //
// defaultButtons.mainListDeleteBtn({hasPermi:'eam:deviceInspectionMain:delete'}), // // defaultButtons.mainListDeleteBtn({hasPermi:'eam:deviceInspectionMain: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 == 'PROCCED' && (userStore.getUser.id == row.maintenance)) }), //
defaultButtons.finishOrderBtn({ hide: !(row.status == 'PROCCED' && (userStore.getUser.id == row.maintenance)) }), // defaultButtons.finishOrderBtn({ hide: !(row.status == 'PROCCED' && (userStore.getUser.id == row.maintenance)) }), //
] ]

7
src/views/eam/mold/moldAccounts/moldAccounts.data.ts

@ -265,15 +265,14 @@ export const MoldMilestone = useCrudSchemas(reactive<CrudSchema[]>([
search: { search: {
component: 'DatePicker', component: 'DatePicker',
componentProps: { componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss', valueFormat: 'YYYY-MM-DD',
type: 'daterange', type: 'date',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
} }
}, },
form: { form: {
component: 'DatePicker', component: 'DatePicker',
componentProps: { componentProps: {
type: 'datetime', type: 'date',
valueFormat: 'x' valueFormat: 'x'
} }
} }

30
src/views/eam/mold/moldinspectionjob/index.vue

@ -91,6 +91,8 @@ import { selectAllFactoryArea } from '@/api/system/dept'
import * as UserApi from '@/api/system/user' import * as UserApi from '@/api/system/user'
import * as DeviceInspectionDetailApi from '@/api/eam/device/deviceInspectionDetail' import * as DeviceInspectionDetailApi from '@/api/eam/device/deviceInspectionDetail'
import * as DeviceInspectionMainApi from '@/api/eam/device/deviceInspectionMain' import * as DeviceInspectionMainApi from '@/api/eam/device/deviceInspectionMain'
import * as MoldAccountsApi from '@/api/eam/mold/moldAccounts'
import * as MoldMaintenanceMainApi from '@/api/eam/mold/moldMaintenanceMain'
// import TableHead from '@/components/TableHead/src/TableHead.vue' // import TableHead from '@/components/TableHead/src/TableHead.vue'
// import ImportForm from '@/components/ImportForm/src/ImportForm.vue' // import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
@ -196,7 +198,7 @@ const butttondata = (row) => {
return [ return [
// 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 == 'PROCCED' && (userStore.getUser.id == row.maintenance)) }), //
defaultButtons.finishOrderBtn({ hide: !(row.status == 'PROCCED' && (userStore.getUser.id == row.maintenance)) }), // defaultButtons.finishOrderBtn({ hide: !(row.status == 'PROCCED' && (userStore.getUser.id == row.maintenance)) }), //
] ]
@ -215,8 +217,32 @@ const buttonTableClick = async (val, row) => {
/** 添加/修改操作 */ /** 添加/修改操作 */
const basicFormRef = ref() const basicFormRef = ref()
const openForm = (type: string, row?: any) => { const openForm = async (type: string, row?: any) => {
tableData.value = [] // tableData.value = [] //
const res = await MoldInspectionMainApi.getMoldInspectionMainNoPage()
const moldList = await MoldAccountsApi.getMoldAccountsNoPage({})
const repairList = await MoldMaintenanceMainApi.getMoldMainTempList('MOLD')
const newMoldList = moldList.filter(item => {
let flag = true
res.forEach(element => {
if (item.number == element.deviceNumber && element.status != 'COMPLETED' && element.status != 'VERIFIED' && element.status != 'REJECTED') {
flag = false
}
})
return flag
})
const newRepairList = repairList.filter(item => {
let flag = false
newMoldList.forEach(element => {
if (item.number == element.number) {
flag = true
}
})
return flag
})
MoldInspectionMain.allSchemas.formSchema.find(item => item.field == 'deviceNumber').componentProps.options = newMoldList
MoldInspectionMain.allSchemas.formSchema.find(item => item.field == 'maintenanceNumber').componentProps.options = newRepairList
basicFormRef.value.open(type, row) basicFormRef.value.open(type, row)
} }

2
src/views/eam/mold/moldinspectionjob/moldInspectionMain.data.ts

@ -99,7 +99,7 @@ export const MoldInspectionMain = useCrudSchemas(reactive<CrudSchema[]>([
search: { search: {
show: true, show: true,
component: 'Select', component: 'Select',
api: () => moldListAll, api: () => moldList,
componentProps: { componentProps: {
optionsAlias: { optionsAlias: {
labelField: 'name', labelField: 'name',

Loading…
Cancel
Save