Browse Source

模具界面问题

master
ljlong_2630 9 months ago
parent
commit
e98bc0517a
  1. 5
      src/api/eam/basic/location/index.ts
  2. 5
      src/api/eam/basic/supplier/index.ts
  3. 33
      src/views/eam/basic/fixedAssets/fixedAssets.data.ts
  4. 1
      src/views/eam/device/deviceAccounts/deviceAccounts.data.ts
  5. 89
      src/views/eam/mold/moldAccounts/moldAccounts.data.ts

5
src/api/eam/basic/location/index.ts

@ -48,3 +48,8 @@ export const exportLocation = async (params) => {
return await request.download({ url: `/eam/location/export-excel`, params })
}
// 查询库位列表
export const getLocationNoPage = async (params) => {
return await request.get({ url: `/eam/location/noPage`, params })
}

5
src/api/eam/basic/supplier/index.ts

@ -52,3 +52,8 @@ export const exportSupplier = async (params) => {
return await request.download({ url: `/eam/supplier/export-excel`, params })
}
// 查询供应商列表
export const getSupplierNoPage = async (params) => {
return await request.get({ url: `/eam/supplier/noPage`, params })
}

33
src/views/eam/basic/fixedAssets/fixedAssets.data.ts

@ -1,6 +1,11 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime'
import { validateHanset,validateNumDot, validateEmail } from '@/utils/validator'
import * as LocationApi from '@/api/eam/basic/location'
import * as SupplierApi from '@/api/eam/basic/supplier'
const localtionList = await LocationApi.getLocationNoPage()
const supplierList = await SupplierApi.getSupplierNoPage()
// 表单校验
export const FixedAssetsRules = reactive({
@ -79,13 +84,24 @@ export const FixedAssets = useCrudSchemas(reactive<CrudSchema[]>([
},
},
{
label: '库位编号',
label: '库位',
field: 'locationNumber',
sort: 'custom',
table: {
width: '150',
},
isSearch: true
isSearch: true,
form:{
component: 'Select',
componentProps: {
options: localtionList,
optionsAlias: {
labelField: 'name',
valueField: 'number'
},
placeholder: "请选择库位"
}
}
},
{
label: '购买时间',
@ -112,12 +128,23 @@ export const FixedAssets = useCrudSchemas(reactive<CrudSchema[]>([
},
},
{
label: '供应商编号',
label: '供应商',
field: 'supplierNumber',
sort: 'custom',
table: {
width: '150',
},
form:{
component: 'Select',
componentProps: {
options: supplierList,
optionsAlias: {
labelField: 'name',
valueField: 'number'
},
placeholder: "请选择供应商"
}
}
},
{
label: '出厂日期',

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

@ -106,6 +106,7 @@ export const DeviceAccounts = useCrudSchemas(reactive<CrudSchema[]>([
},
isSearch: false,
isForm: true,
isTable: true,
dictType: DICT_TYPE.DEVICE_MOLD_TYPE,
dictClass: 'string',
form: {

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

@ -1,17 +1,34 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime'
import { selectAllFactoryArea } from '@/api/system/dept'
import * as SupplierApi from '@/api/eam/basic/supplier'
import { validateHanset,validateNumDot, validateEmail,validateNum } from '@/utils/validator'
const factoryList = await selectAllFactoryArea()
const supplierList = await SupplierApi.getSupplierNoPage()
// 表单校验
export const MoldAccountsRules = reactive({
// number: [required],
name: [required],
// factoryAreaNumber: [required],
// purchaseTime: [required],
// deptId: [required],
// purchaser: [required],
// supplierNumber: [required],
concurrencyStamp: [required]
number: [
required,
{ max: 20, message: '不得超过20个字符', trigger: 'blur' },
],
name: [
required,
{ max: 50, message: '不得超过50个字符', trigger: 'blur' },
],
factoryAreaNumber: [required],
purchaseDept: [
{ max: 100, message: '不得超过100个字符', trigger: 'blur' },
],
purchaser: [
{ max: 60, message: '不得超过60个字符', trigger: 'blur' },
],
purchasePrice: [
{ max: 20, message: '不得超过20个字符', trigger: 'blur' },
{ validator:validateNumDot, message: '请输入数字格式', trigger: 'blur'}
],
beat:[
{ validator:validateNum, message: '请输入数字格式', trigger: 'blur'}
]
})
export const MoldAccounts = useCrudSchemas(reactive<CrudSchema[]>([
@ -38,8 +55,19 @@ export const MoldAccounts = useCrudSchemas(reactive<CrudSchema[]>([
field: 'type',
sort: 'custom',
isSearch: false,
isForm: true,
isTable: true,
dictType: DICT_TYPE.DEVICE_MOLD_TYPE,
dictClass: 'string',
form: {
component: 'Select'
value: 'MOLD',
component: 'Select',
componentProps: {
disabled: true,
}
},
search: {
value: 'MOLD'
}
},
{
@ -114,9 +142,23 @@ export const MoldAccounts = useCrudSchemas(reactive<CrudSchema[]>([
}
},
{
label: '供应商编号',
label: '供应商',
field: 'supplierNumber',
sort: 'custom'
sort: 'custom',
table:{
width:150
},
form:{
component: 'Select',
componentProps: {
options: supplierList,
optionsAlias: {
labelField: 'name',
valueField: 'number'
},
placeholder: "请选择供应商"
}
}
},
{
label: '出厂日期',
@ -146,15 +188,6 @@ export const MoldAccounts = useCrudSchemas(reactive<CrudSchema[]>([
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
},
{
label: '生产次数',
field: 'frequency',
sort: 'custom',
isForm: false,
form: {
component: 'InputNumber',
}
},
{
label: '节拍',
field: 'beat',
@ -164,22 +197,6 @@ export const MoldAccounts = useCrudSchemas(reactive<CrudSchema[]>([
component: 'Input',
}
},
{
label: '创建时间',
field: 'createTime',
sort: 'custom',
formatter: dateFormatter,
isForm: false
},
{
label: '是否可用',
field: 'available',
sort: 'custom',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
},
{
label: '维修状态',
field: 'status',

Loading…
Cancel
Save