You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

189 lines
4.2 KiB

import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter, dateFormatter2 } from '@/utils/formatTime'
import * as ItembasicApi from '@/api/wms/itembasic'
import { Itembasic } from '@/views/wms/basicDataManage/itemManage/itembasic/itembasic.data'
// 表单校验
export const CutItemRules = reactive({
itemCode: [required],
cutoverQty: [required],
beginDate: [required]
})
export const CutItem = useCrudSchemas(
reactive<CrudSchema[]>([
{
label: '品番',
field: 'itemCode',
sort: 'custom',
isSearch: true,
table: {
width: 180,
fixed: 'left'
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
enterSearch: true,
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择品番', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '物料基础信息', // 查询弹窗标题
searchAllSchemas: Itembasic.allSchemas, // 查询弹窗所需类
searchPage: ItembasicApi.getItembasicPage, // 查询弹窗所需分页方法
searchCondition: [
{
key: 'available',
value: 'TRUE',
isMainValue: false
}
],
verificationParams: [
{
key: 'code',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true
}
] // 失去焦点校验参数
}
}
},
{
label: '品名',
field: 'itemName',
sort: 'custom',
isSearch: false,
isForm: false,
table: {
width: 150
}
},
{
label: '背番',
field: 'backNumber',
sort: 'custom',
isForm: false,
isSearch: true,
table: {
width: 150
}
},
{
label: '受入号',
field: 'receivedNumber',
sort: 'custom',
isSearch: true,
isForm: false,
table: {
width: 150
}
},
{
label: '打切数量',
field: 'cutoverQty',
sort: 'custom',
isTable: true,
form: {
component: 'InputNumber',
componentProps: {
min: 0,
precision: 0
}
}
},
{
label: '已要货数量',
field: 'planQty',
sort: 'custom',
isForm: false,
isSearch: false
},
{
label: '开始日期',
field: 'beginDate',
sort: 'custom',
formatter: dateFormatter,
table: {
width: 180
},
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')]
}
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
valueFormat: 'x'
}
},
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
}
},
{
label: '创建者',
field: 'creator',
sort: 'custom',
table: {
width: 150
},
isForm: false
},
{
label: '创建时间',
field: 'createTime',
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
sort: 'custom',
table: {
width: 180
},
isTable: true,
form: {
component: 'DatePicker',
componentProps: {
style: { width: '100%' },
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x'
}
},
isForm: false,
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')]
}
}
},
{
label: '备注',
field: 'remark',
sort: 'custom',
isForm: false,
isSearch: false
},
{
label: '操作',
field: 'action',
isForm: false,
table: {
width: 150,
fixed: 'right'
}
}
])
)