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.
219 lines
4.1 KiB
219 lines
4.1 KiB
10 months ago
|
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
|
||
|
import { dateFormatter } from '@/utils/formatTime'
|
||
|
|
||
9 months ago
|
// 表单校验
|
||
|
export const UnfinishedShipmentMainRules = reactive({
|
||
|
orderNumber: [required],
|
||
|
shipmentRecordNumber: [required],
|
||
|
shipmentType: [required],
|
||
|
customerOrderNumber: [required],
|
||
|
available: [required],
|
||
|
concurrencyStamp: [required]
|
||
|
})
|
||
|
|
||
|
export const UnfinishedShipmentMain = useCrudSchemas(reactive<CrudSchema[]>([
|
||
|
|
||
|
{
|
||
|
label: '单据号',
|
||
|
field: 'number',
|
||
|
sort: 'custom',
|
||
|
table: {
|
||
|
width: 150,
|
||
|
},
|
||
|
isSearch: true
|
||
|
},
|
||
|
{
|
||
|
label: '发货记录单号',
|
||
|
field: 'shipmentRecordNumber',
|
||
|
sort: 'custom',
|
||
|
table: {
|
||
|
width: 150,
|
||
|
},
|
||
|
isSearch: true
|
||
|
},
|
||
|
{
|
||
|
label: '发货方式',
|
||
|
field: 'shipmentType',
|
||
|
sort: 'custom',
|
||
|
isSearch: true,
|
||
|
table: {
|
||
|
width: 150,
|
||
|
},
|
||
|
dictType: DICT_TYPE.DELIVER_METHOD,
|
||
|
dictClass: 'string',
|
||
|
form: {
|
||
|
component: 'SelectV2'
|
||
|
}
|
||
|
},
|
||
|
{
|
||
|
label: '客户订单号',
|
||
|
field: 'customerOrderNumber',
|
||
|
sort: 'custom',
|
||
|
table: {
|
||
|
width: 150,
|
||
|
},
|
||
|
isSearch: true
|
||
|
},
|
||
|
{
|
||
|
label: '操作',
|
||
|
field: 'action',
|
||
|
isForm: false,
|
||
|
isDetail: false,
|
||
|
isTable: false,
|
||
|
table: {
|
||
|
width: 150,
|
||
|
fixed: 'right'
|
||
|
}
|
||
|
}
|
||
|
]))
|
||
|
|
||
|
|
||
10 months ago
|
// 表单校验
|
||
|
export const UnfinishedShipmentDetailRules = reactive({
|
||
|
materialCode: [required],
|
||
|
materialName: [required],
|
||
|
backNumber: [required],
|
||
|
materialDescription: [required],
|
||
|
shipmentQuantity: [required],
|
||
|
unitPrice: [required],
|
||
|
lockedQuantity: [required],
|
||
|
available: [required],
|
||
|
concurrencyStamp: [required]
|
||
|
})
|
||
|
|
||
|
export const UnfinishedShipmentDetail = useCrudSchemas(reactive<CrudSchema[]>([
|
||
9 months ago
|
|
||
10 months ago
|
{
|
||
|
label: '物料代码',
|
||
9 months ago
|
field: 'itemCode',
|
||
10 months ago
|
sort: 'custom',
|
||
9 months ago
|
table: {
|
||
|
width: 150
|
||
|
},
|
||
10 months ago
|
isSearch: true
|
||
|
},
|
||
|
{
|
||
|
label: '物料名称',
|
||
9 months ago
|
field: 'itemName',
|
||
10 months ago
|
sort: 'custom',
|
||
9 months ago
|
table: {
|
||
|
width: 150
|
||
|
},
|
||
10 months ago
|
isSearch: true
|
||
|
},
|
||
|
{
|
||
|
label: '背番',
|
||
|
field: 'backNumber',
|
||
|
sort: 'custom',
|
||
9 months ago
|
table: {
|
||
|
width: 150,
|
||
|
},
|
||
10 months ago
|
isSearch: true
|
||
|
},
|
||
|
{
|
||
|
label: '物料描述',
|
||
9 months ago
|
field: 'itemDescription',
|
||
10 months ago
|
sort: 'custom',
|
||
9 months ago
|
table: {
|
||
|
width: 150,
|
||
|
},
|
||
10 months ago
|
isSearch: true,
|
||
|
form: {
|
||
|
component: 'Editor',
|
||
|
componentProps: {
|
||
|
valueHtml: '',
|
||
|
height: 200
|
||
|
}
|
||
|
}
|
||
|
},
|
||
|
{
|
||
|
label: '发货数量',
|
||
|
field: 'shipmentQuantity',
|
||
|
sort: 'custom',
|
||
9 months ago
|
table: {
|
||
|
width: 150,
|
||
|
},
|
||
10 months ago
|
isSearch: true,
|
||
|
form: {
|
||
|
component: 'InputNumber',
|
||
|
value: 0
|
||
|
}
|
||
|
},
|
||
|
{
|
||
|
label: '销售单价',
|
||
|
field: 'unitPrice',
|
||
|
sort: 'custom',
|
||
9 months ago
|
table: {
|
||
|
width: 150,
|
||
|
},
|
||
10 months ago
|
isSearch: true
|
||
|
},
|
||
|
{
|
||
|
label: '锁定数量',
|
||
|
field: 'lockedQuantity',
|
||
|
sort: 'custom',
|
||
9 months ago
|
table: {
|
||
|
width: 150,
|
||
|
},
|
||
10 months ago
|
isSearch: true,
|
||
|
form: {
|
||
|
component: 'InputNumber',
|
||
|
value: 0
|
||
|
}
|
||
|
},
|
||
9 months ago
|
// {
|
||
|
// label: '是否可用',
|
||
|
// field: 'available',
|
||
|
// sort: 'custom',
|
||
|
// dictType: DICT_TYPE.TRUE_FALSE,
|
||
|
// dictClass: 'string', // 默认都是字符串类型其他暂不考虑
|
||
|
// isSearch: true,
|
||
|
// form: {
|
||
|
// component: 'Switch',
|
||
|
// value: 'TRUE',
|
||
|
// componentProps: {
|
||
|
// inactiveValue: 'FALSE',
|
||
|
// activeValue: 'TRUE'
|
||
|
// }
|
||
|
// }
|
||
|
// },
|
||
9 months ago
|
|
||
10 months ago
|
{
|
||
|
label: '创建时间',
|
||
|
field: 'createTime',
|
||
|
sort: 'custom',
|
||
9 months ago
|
table: {
|
||
|
width: 150
|
||
|
},
|
||
10 months ago
|
formatter: dateFormatter,
|
||
|
isSearch: true,
|
||
|
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
|
||
|
},
|
||
9 months ago
|
{
|
||
|
label: '创建人',
|
||
|
field: 'creator',
|
||
|
sort: 'custom',
|
||
|
table: {
|
||
|
width: 150
|
||
|
},
|
||
|
isTable: true,
|
||
|
},
|
||
9 months ago
|
// {
|
||
|
// label: '操作',
|
||
|
// field: 'action',
|
||
|
// isForm: false,
|
||
|
// table: {
|
||
|
// width: 150,
|
||
|
// fixed: 'right'
|
||
|
// }
|
||
|
// }
|
||
10 months ago
|
]))
|