Browse Source

备件出库备件归还

master
songguoqiang 7 months ago
parent
commit
c6becb0522
  1. 23
      src/views/eam/item/itemAccounts/itemAccounts.data.ts
  2. 61
      src/views/eam/item/itemInLocation/itemInLocation.data.ts
  3. 35
      src/views/eam/item/itemOutLocation/itemOutLocation.data.ts

23
src/views/eam/item/itemAccounts/itemAccounts.data.ts

@ -5,7 +5,7 @@ import { LocationArea } from '@/views/eam/basic/locationArea/locationArea.data'
import * as LocationApi from '@/api/eam/basic/location'
import { Location } from '@/views/eam/basic/location/location.data'
import { validateNumber } from '@/utils/validator'
import * as ItemApi from '@/api/eam/basic/item'
import { Item } from '@/views/eam/basic/item/item.data'
import { getStrDictOptions } from '@/utils/dict'
@ -18,7 +18,10 @@ export const ItemAccountsRules = reactive({
areaNumber: [required],
type: [required],
locationNumber: [required],
qty: [required]
qty: [
required,
{ validator: validateNumber, message: '数量不能等于0', trigger: 'blur' },
],
})
export const ItemAccounts = useCrudSchemas(
@ -211,6 +214,22 @@ export const ItemAccounts = useCrudSchemas(
}
}
},
{
label: '创建时间',
field: 'createTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: false,
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
isForm: false
},
// {
// label: '是否账内库',
// field: 'isInAccount',

61
src/views/eam/item/itemInLocation/itemInLocation.data.ts

@ -2,6 +2,7 @@ import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import * as LocationApi from '@/api/eam/basic/location'
import { Location } from '@/views/eam/basic/location/location.data'
import { validateNumber } from '@/utils/validator'
import { dateFormatter } from '@/utils/formatTime'
// 表单校验
export const ItemInLocationRules = reactive({
number: [required],
@ -52,28 +53,28 @@ export const ItemInLocation = useCrudSchemas(reactive<CrudSchema[]>([
isSearch: false,
isForm:false
},
// {
// label: '备件编号',
// field: 'itemNumber',
// sort: 'custom',
// isSearch: true,
// form:{
// componentProps:{
// disabled:true
// }
// }
// },
// {
// label: '备件名称',
// field: 'itemName',
// sort: 'custom',
// isSearch: false,
// form:{
// componentProps:{
// disabled:true
// }
// }
// },
{
label: '备件编号',
field: 'itemNumber',
sort: 'custom',
isSearch: true,
form:{
componentProps:{
disabled:true
}
}
},
{
label: '备件名称',
field: 'itemName',
sort: 'custom',
isSearch: false,
form:{
componentProps:{
disabled:true
}
}
},
{
label: '归还人',
field: 'returner',
@ -104,6 +105,22 @@ export const ItemInLocation = useCrudSchemas(reactive<CrudSchema[]>([
}
}
},
{
label: '创建时间',
field: 'createTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: false,
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
isForm: false
},
{
label: '操作',
field: 'action',

35
src/views/eam/item/itemOutLocation/itemOutLocation.data.ts

@ -1,19 +1,23 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import * as LocationAreaApi from '@/api/eam/basic/locationArea'
import { LocationArea } from '@/views/eam/basic/locationArea/locationArea.data'
import { dateFormatter } from '@/utils/formatTime'
import * as LocationApi from '@/api/eam/basic/location'
import { Location } from '@/views/eam/basic/location/location.data'
import { validateNumber } from '@/utils/validator'
// 表单校验
export const ItemOutLocationRules = reactive({
// number: [required],
itemNumber: [required],
qty: [required],
locationNumber: [required],
qty: [
required,
{ validator: validateNumber, message: '数量不能等于0', trigger: 'blur' },
],
locationNumber: [required]
})
export const ItemOutLocation = useCrudSchemas(reactive<CrudSchema[]>([
export const ItemOutLocation = useCrudSchemas(
reactive<CrudSchema[]>([
// {
// label: '编号',
// field: 'number',
@ -116,7 +120,7 @@ export const ItemOutLocation = useCrudSchemas(reactive<CrudSchema[]>([
label: '领用人',
field: 'receiver',
sort: 'custom',
isSearch: false,
isSearch: false
},
// {
// label: '出库类型',
@ -142,6 +146,22 @@ export const ItemOutLocation = useCrudSchemas(reactive<CrudSchema[]>([
}
}
},
{
label: '创建时间',
field: 'createTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: false,
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
isForm: false
},
{
label: '操作',
field: 'action',
@ -152,4 +172,5 @@ export const ItemOutLocation = useCrudSchemas(reactive<CrudSchema[]>([
fixed: 'right'
}
}
]))
])
)

Loading…
Cancel
Save