Browse Source

修复测试bug

master
ljlong_2630 8 months ago
parent
commit
3e28f56729
  1. 25
      src/components/Detail/src/DetailDeviceLedger.vue
  2. 46
      src/views/eam/device/deviceAccounts/deviceAccounts.data.ts
  3. 9
      src/views/eam/device/deviceRepair/deviceRepair.data.ts
  4. 5
      src/views/eam/device/deviceSpotInspectionRecordMain/deviceSpotInspectionRecordMain.data.ts
  5. 29
      src/views/eam/device/deviceinspectionjob/deviceInspectionMain.data.ts
  6. 8
      src/views/eam/device/devicemaintainjob/deviceMaintainOrderMain.data.ts
  7. 27
      src/views/eam/device/devicemaintenancejob/deviceMaintenanceMain.data.ts
  8. 18
      src/views/eam/mold/moldAccounts/index.vue
  9. 17
      src/views/eam/mold/moldAccounts/moldAccounts.data.ts
  10. 8
      src/views/eam/mold/moldinspectionjob/index.vue

25
src/components/Detail/src/DetailDeviceLedger.vue

@ -107,7 +107,7 @@
:key="milestoneUpdateKey"
>
<template #action="{ row }">
<ButtonBase :Butttondata="butttondata" @button-base-click="buttonMilestoneClick($event, row)" />
<ButtonBase :Butttondata="butttondata(row)" @button-base-click="buttonMilestoneClick($event, row)" />
</template>
</Table>
<Table
@ -219,6 +219,7 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons'
import BasicForm from '@/components/BasicForm/src/BasicForm.vue'
import TableHead from '@/components/TableHead/src/TableHead.vue'
import DetailTable from '@/components/DetailTable/src/DetailTable.vue'
import { useUserStoreWithOut } from '@/store/modules/user'
defineOptions({ name: 'Detail' })
@ -491,6 +492,7 @@ const buttondata = ref()
const detailData = ref()
const titleNameRef = ref()
const titleValueRef = ref()
const userStore = useUserStoreWithOut()
const tabsKay = ref(0) //tabskey
const openDetail = async (row: any, titleName: any, titleValue: any, tableName: any) => {
titleNameRef.value = titleName
@ -880,10 +882,12 @@ const setBeiJian = () => {
}
// -
const butttondata = [
defaultButtons.mainListEditBtn(null), //
defaultButtons.uploadFileBtn(null),//
]
const butttondata = (row) => {
return [
defaultButtons.mainListEditBtn({ hide: !hasmMilestoneRight(row)}), //
defaultButtons.uploadFileBtn({ hide: !hasmMilestoneRight(row)}),//
]
}
// -
const buttonMilestoneClick = async (val, row) => {
@ -949,6 +953,17 @@ function dialogUploadFile() {
})
}
const hasmMilestoneRight = (row) => {
const rolesOk = userStore.roles.find(item => {
return item == 'mold_Engineer_role '
})
if (rolesOk != undefined && rolesOk != null) {
return true
} else {
return false
}
}
</script>
<style lang="scss">
.el-drawer__body {

46
src/views/eam/device/deviceAccounts/deviceAccounts.data.ts

@ -3,8 +3,12 @@ import { dateFormatter } from '@/utils/formatTime'
import { selectAllFactoryArea } from '@/api/system/dept'
import { validateHanset,validateNumDot, validateEmail } from '@/utils/validator'
import * as SupplierApi from '@/api/eam/basic/supplier'
import * as UserApi from '@/api/system/user'
import { selecUserByType } from '@/api/system/dept'
const factoryList = await selectAllFactoryArea()
const supplierList = await SupplierApi.getSupplierNoPage()
const userListAll = await UserApi.getSimpleUserList()
const userList = await selecUserByType({ classType: 'DEVICE', factoryAreaNumber: '', flag: null })
// 表单校验
export const DeviceAccountsRules = reactive({
name: [
@ -143,7 +147,8 @@ export const DeviceAccounts = useCrudSchemas(reactive<CrudSchema[]>([
optionsAlias: {
labelField: 'name',
valueField: 'id'
}
},
filterable: true,
}
},
form: {
@ -155,10 +160,48 @@ export const DeviceAccounts = useCrudSchemas(reactive<CrudSchema[]>([
labelField: 'name',
valueField: 'id'
},
filterable: true,
placeholder: "请选择设备"
},
}
},
{
label: '负责人',
field: 'principal',
sort: 'custom',
isSearch: false,
isDetail: false,
table: {
width: '150',
},
api: () => userListAll,
formatter: (_: Recordable, __: TableColumn, cellValue: number) => {
return userListAll.find((account) => account.id == cellValue)?.nickname
},
// search: {
// show: true,
// component: 'Select',
// api: () => userListAll,
// componentProps: {
// optionsAlias: {
// labelField: 'nickname',
// valueField: 'id'
// }
// }
// },
form: {
component: 'Select',
api: () => userListAll,
componentProps: {
optionsAlias: {
labelField: 'nickname',
valueField: 'id',
},
filterable: true,
placeholder: "请选择负责人"
},
},
},
{
label: '采购时间',
field: 'purchaseTime',
@ -218,6 +261,7 @@ export const DeviceAccounts = useCrudSchemas(reactive<CrudSchema[]>([
labelField: 'name',
valueField: 'number'
},
filterable: true,
placeholder: "请选择供应商"
}
}

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

@ -59,7 +59,8 @@ export const DeviceRepair = useCrudSchemas(reactive<CrudSchema[]>([
optionsAlias: {
labelField: 'name',
valueField: 'id'
}
},
filterable: true,
}
},
form: {
@ -70,6 +71,7 @@ export const DeviceRepair = useCrudSchemas(reactive<CrudSchema[]>([
labelField: 'name',
valueField: 'id'
},
filterable: true,
onChange: (val) => {
DeviceAccountsApi.getDeviceAccountsNoPage({
isSearch: false,
@ -102,6 +104,7 @@ export const DeviceRepair = useCrudSchemas(reactive<CrudSchema[]>([
labelField: 'label',
valueField: 'value'
},
filterable: true,
},
},
form: {
@ -112,6 +115,7 @@ export const DeviceRepair = useCrudSchemas(reactive<CrudSchema[]>([
labelField: 'label',
valueField: 'value'
},
filterable: true,
placeholder: "请选择设备"
}
},
@ -138,6 +142,7 @@ export const DeviceRepair = useCrudSchemas(reactive<CrudSchema[]>([
labelField: 'name',
valueField: 'number'
},
filterable: true,
},
},
form: {
@ -148,6 +153,7 @@ export const DeviceRepair = useCrudSchemas(reactive<CrudSchema[]>([
labelField: 'name',
valueField: 'number'
},
filterable: true,
},
}
},
@ -179,6 +185,7 @@ export const DeviceRepair = useCrudSchemas(reactive<CrudSchema[]>([
labelField: 'nickname',
valueField: 'id'
},
filterable: true,
},
},
},

5
src/views/eam/device/deviceSpotInspectionRecordMain/deviceSpotInspectionRecordMain.data.ts

@ -66,6 +66,7 @@ export const DeviceSpotInspectionRecordMain = useCrudSchemas(reactive<CrudSchema
labelField: 'name',
valueField: 'number'
},
filterable: true,
},
},
form: {
@ -76,6 +77,7 @@ export const DeviceSpotInspectionRecordMain = useCrudSchemas(reactive<CrudSchema
labelField: 'name',
valueField: 'number'
},
filterable: true,
},
}
},
@ -99,6 +101,7 @@ export const DeviceSpotInspectionRecordMain = useCrudSchemas(reactive<CrudSchema
labelField: 'name',
valueField: 'id'
},
filterable: true,
},
}
},
@ -148,6 +151,7 @@ export const DeviceSpotInspectionRecordMain = useCrudSchemas(reactive<CrudSchema
labelField: 'label',
valueField: 'value'
},
filterable: true,
},
},
form: {
@ -158,6 +162,7 @@ export const DeviceSpotInspectionRecordMain = useCrudSchemas(reactive<CrudSchema
labelField: 'label',
valueField: 'value'
},
filterable: true,
placeholder: "请选择设备"
}
},

29
src/views/eam/device/deviceinspectionjob/deviceInspectionMain.data.ts

@ -72,7 +72,8 @@ export const DeviceInspectionMain = useCrudSchemas(reactive<CrudSchema[]>([
optionsAlias: {
labelField: 'number',
valueField: 'number'
}
},
filterable: true,
}
},
form: {
@ -83,6 +84,7 @@ export const DeviceInspectionMain = useCrudSchemas(reactive<CrudSchema[]>([
labelField: 'number',
valueField: 'number'
},
filterable: true,
},
}
},
@ -106,7 +108,8 @@ export const DeviceInspectionMain = useCrudSchemas(reactive<CrudSchema[]>([
optionsAlias: {
labelField: 'name',
valueField: 'id'
}
},
filterable: true,
}
},
form: {
@ -118,6 +121,7 @@ export const DeviceInspectionMain = useCrudSchemas(reactive<CrudSchema[]>([
labelField: 'name',
valueField: 'id'
},
filterable: true,
placeholder: "请选择设备"
},
}
@ -142,7 +146,8 @@ export const DeviceInspectionMain = useCrudSchemas(reactive<CrudSchema[]>([
optionsAlias: {
labelField: 'name',
valueField: 'number'
}
},
filterable: true,
}
},
form: {
@ -153,6 +158,7 @@ export const DeviceInspectionMain = useCrudSchemas(reactive<CrudSchema[]>([
labelField: 'name',
valueField: 'number'
},
filterable: true,
},
}
},
@ -178,7 +184,8 @@ export const DeviceInspectionMain = useCrudSchemas(reactive<CrudSchema[]>([
optionsAlias: {
labelField: 'nickname',
valueField: 'id'
}
},
filterable: true,
}
},
form: {
@ -190,6 +197,7 @@ export const DeviceInspectionMain = useCrudSchemas(reactive<CrudSchema[]>([
labelField: 'nickname',
valueField: 'id'
},
filterable: true,
placeholder: "请选择检修人"
},
},
@ -234,8 +242,9 @@ export const DeviceInspectionMain = useCrudSchemas(reactive<CrudSchema[]>([
component: 'Select',
componentProps: {
disabled: true,
placeholder: "请选择设备"
placeholder: "请选择状态"
},
filterable: true,
},
},
{
@ -253,7 +262,8 @@ export const DeviceInspectionMain = useCrudSchemas(reactive<CrudSchema[]>([
componentProps: {
disabled: true,
placeholder: "请选择设备"
}
},
filterable: true,
},
},
{
@ -272,7 +282,8 @@ export const DeviceInspectionMain = useCrudSchemas(reactive<CrudSchema[]>([
componentProps: {
// disabled: true,
placeholder: "请选择故障类型"
}
},
filterable: true,
},
},
// {
@ -362,7 +373,8 @@ export const DeviceInspectionDetail = useCrudSchemas(reactive<CrudSchema[]>([
optionsAlias: {
labelField: 'name',
valueField: 'id'
}
},
filterable: true,
},
formatter: (_: Recordable, __: TableColumn, cellValue) => {
const cellValueList = cellValue?.split(',');
@ -380,6 +392,7 @@ export const DeviceInspectionDetail = useCrudSchemas(reactive<CrudSchema[]>([
labelField: 'name',
valueField: 'id'
},
filterable: true,
placeholder: "请选择责任人",
multiple: true,
},

8
src/views/eam/device/devicemaintainjob/deviceMaintainOrderMain.data.ts

@ -80,7 +80,8 @@ export const DeviceMaintainOrderMain = useCrudSchemas(reactive<CrudSchema[]>([
optionsAlias: {
labelField: 'name',
valueField: 'id'
}
},
filterable: true,
}
},
form: {
@ -92,6 +93,7 @@ export const DeviceMaintainOrderMain = useCrudSchemas(reactive<CrudSchema[]>([
labelField: 'name',
valueField: 'id'
},
filterable: true,
placeholder: "请先选择设备"
},
},
@ -326,7 +328,8 @@ export const DeviceMaintainOrderDetail = useCrudSchemas(reactive<CrudSchema[]>([
optionsAlias: {
labelField: 'name',
valueField: 'id'
}
},
filterable: true,
},
api: () => dutyUserList,
formatter: (_: Recordable, __: TableColumn, cellValue: number) => {
@ -342,6 +345,7 @@ export const DeviceMaintainOrderDetail = useCrudSchemas(reactive<CrudSchema[]>([
labelField: 'name',
valueField: 'id'
},
filterable: true,
placeholder: "请选择责任人",
multiple: true,
},

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

@ -107,7 +107,8 @@ export const DeviceMaintenanceMain = useCrudSchemas(reactive<CrudSchema[]>([
optionsAlias: {
labelField: 'name',
valueField: 'id'
}
},
filterable: true,
}
},
form: {
@ -119,6 +120,7 @@ export const DeviceMaintenanceMain = useCrudSchemas(reactive<CrudSchema[]>([
labelField: 'name',
valueField: 'id'
},
filterable: true,
placeholder: "请先选择设备"
},
}
@ -156,6 +158,7 @@ export const DeviceMaintenanceMain = useCrudSchemas(reactive<CrudSchema[]>([
labelField: 'nickname',
valueField: 'id'
},
filterable: true,
placeholder: "请先选择设备"
},
},
@ -169,7 +172,8 @@ export const DeviceMaintenanceMain = useCrudSchemas(reactive<CrudSchema[]>([
optionsAlias: {
labelField: 'nickname',
valueField: 'id'
}
},
filterable: true,
}
}
},
@ -205,6 +209,7 @@ export const DeviceMaintenanceMain = useCrudSchemas(reactive<CrudSchema[]>([
labelField: 'label',
valueField: 'value'
},
filterable: true,
},
},
form: {
@ -215,6 +220,7 @@ export const DeviceMaintenanceMain = useCrudSchemas(reactive<CrudSchema[]>([
labelField: 'label',
valueField: 'value'
},
filterable: true,
placeholder: "请选择设备"
}
},
@ -385,7 +391,8 @@ export const DeviceMaintenanceDetail = useCrudSchemas(reactive<CrudSchema[]>([
optionsAlias: {
labelField: 'nickname',
valueField: 'id'
}
},
filterable: true,
},
form: {
component: 'Select',
@ -397,7 +404,8 @@ export const DeviceMaintenanceDetail = useCrudSchemas(reactive<CrudSchema[]>([
optionsAlias: {
labelField: 'name',
valueField: 'id'
}
},
filterable: true,
}
}
},
@ -566,6 +574,7 @@ export const DeviceMaintenanceMainSec = useCrudSchemas(reactive<CrudSchema[]>([
labelField: 'label',
valueField: 'value'
},
filterable: true,
},
},
form: {
@ -576,6 +585,7 @@ export const DeviceMaintenanceMainSec = useCrudSchemas(reactive<CrudSchema[]>([
labelField: 'label',
valueField: 'value'
},
filterable: true,
placeholder: "请选择设备"
}
},
@ -600,7 +610,8 @@ export const DeviceMaintenanceMainSec = useCrudSchemas(reactive<CrudSchema[]>([
optionsAlias: {
labelField: 'name',
valueField: 'id'
}
},
filterable: true,
}
},
form: {
@ -612,6 +623,7 @@ export const DeviceMaintenanceMainSec = useCrudSchemas(reactive<CrudSchema[]>([
labelField: 'name',
valueField: 'id'
},
filterable: true,
placeholder: "请先选择设备"
},
}
@ -647,7 +659,8 @@ export const DeviceMaintenanceMainSec = useCrudSchemas(reactive<CrudSchema[]>([
optionsAlias: {
labelField: 'name',
valueField: 'number'
}
},
filterable: true,
}
},
form: {
@ -658,6 +671,7 @@ export const DeviceMaintenanceMainSec = useCrudSchemas(reactive<CrudSchema[]>([
labelField: 'name',
valueField: 'number'
},
filterable: true,
},
}
},
@ -682,6 +696,7 @@ export const DeviceMaintenanceMainSec = useCrudSchemas(reactive<CrudSchema[]>([
labelField: 'name',
valueField: 'id'
},
filterable: true,
placeholder: "请先选择设备"
},
}

18
src/views/eam/mold/moldAccounts/index.vue

@ -258,6 +258,21 @@ const formsSuccess = async (formType, data) => {
if (data.activeTime == 0) data.activeTime = null
if (data.expireTime == 0) data.expireTime = null
if (formType === 'create') {
const param = {
number : data.number
}
//
let flag = false
await MoldAccountsApi.getMoldAccountsPage(param).then(res => {
if (res?.total > 0) {
flag = true
}
})
if (flag) {
message.error('模具编号已存在')
return
}
//
await MoldAccountsApi.createMoldAccounts(data)
message.success(t('common.createSuccess'))
} else {
@ -462,4 +477,7 @@ const qrCodeBatch = async (val,item) => {
window.open(src.value + "&number=" + qrCodeList)
}
</script>

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

@ -94,7 +94,8 @@ export const MoldAccounts = useCrudSchemas(reactive<CrudSchema[]>([
optionsAlias: {
labelField: 'name',
valueField: 'id'
}
},
filterable: true,
}
},
form: {
@ -106,6 +107,7 @@ export const MoldAccounts = useCrudSchemas(reactive<CrudSchema[]>([
labelField: 'name',
valueField: 'id'
},
filterable: true,
placeholder: "请选择设备"
},
}
@ -160,6 +162,7 @@ export const MoldAccounts = useCrudSchemas(reactive<CrudSchema[]>([
labelField: 'name',
valueField: 'number'
},
filterable: true,
placeholder: "请选择供应商"
}
}
@ -192,6 +195,16 @@ export const MoldAccounts = useCrudSchemas(reactive<CrudSchema[]>([
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
},
{
label: '模次',
field: 'frequency',
sort: 'custom',
isForm: false,
isSearch: false,
form: {
component: 'Input',
}
},
{
label: '节拍',
field: 'beat',
@ -257,7 +270,7 @@ export const MoldMilestone = useCrudSchemas(reactive<CrudSchema[]>([
form: {
component: 'Select',
componentProps: {
disabled: true
disabled: true,
}
},
},

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

@ -93,6 +93,14 @@ import * as DeviceInspectionDetailApi from '@/api/eam/device/deviceInspectionDet
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 {
MoldMaintenanceMain,
MoldMaintenanceMainRules,
MoldMaintenanceDetail,
MoldMaintenanceDetailRules,
MoldMaintenanceMainSec,
MoldMaintenanceMainSecRules,
} from '../moldmaintenancejob/moldMaintenanceMain.data'
// import TableHead from '@/components/TableHead/src/TableHead.vue'
// import ImportForm from '@/components/ImportForm/src/ImportForm.vue'

Loading…
Cancel
Save