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.
364 lines
7.7 KiB
364 lines
7.7 KiB
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
|
|
import { dateFormatter } from '@/utils/formatTime'
|
|
import {Itembasic} from "@/views/wms/basicDataManage/itemManage/itembasic/itembasic.data";
|
|
import * as ItembasicApi from "@/api/wms/itembasic";
|
|
|
|
// 主表单校验
|
|
export const DismantlingMainRules = reactive({
|
|
productionCode: [required],
|
|
workbillType: [required],
|
|
})
|
|
|
|
export const DismantlingMain = useCrudSchemas(reactive<CrudSchema[]>([
|
|
{
|
|
label: '删除时间',
|
|
field: 'deleteTime',
|
|
sort: 'custom',
|
|
formatter: dateFormatter,
|
|
isSearch: false,
|
|
isTable: false,
|
|
isForm: false,
|
|
isDetail: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')]
|
|
}
|
|
},
|
|
form: {
|
|
component: 'DatePicker',
|
|
componentProps: {
|
|
type: 'datetime',
|
|
valueFormat: 'x'
|
|
}
|
|
},
|
|
},
|
|
{
|
|
label: '主键',
|
|
field: 'id',
|
|
sort: 'custom',
|
|
isSearch: false,
|
|
isTable: false,
|
|
isForm: false,
|
|
isDetail:false,
|
|
},
|
|
{
|
|
label: '并发乐观锁',
|
|
field: 'concurrencyStamp',
|
|
sort: 'custom',
|
|
isSearch: false,
|
|
isTable: false,
|
|
isForm: false,
|
|
isDetail:false,
|
|
form: {
|
|
component: 'InputNumber',
|
|
value: 0
|
|
},
|
|
},
|
|
{
|
|
label: '创建时间',
|
|
field: 'createTime',
|
|
sort: 'custom',
|
|
formatter: dateFormatter,
|
|
isSearch: false,
|
|
isTable: false,
|
|
isForm: false,
|
|
isDetail: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: 'deleter',
|
|
sort: 'custom',
|
|
isSearch: false,
|
|
isTable: false,
|
|
isForm: false,
|
|
isDetail:false,
|
|
},
|
|
{
|
|
label: '位置ID',
|
|
field: 'siteId',
|
|
sort: 'custom',
|
|
isSearch: false,
|
|
isTable: false,
|
|
isForm: false,
|
|
isDetail:false,
|
|
form: {
|
|
component: 'InputNumber',
|
|
value: 0
|
|
},
|
|
},
|
|
{
|
|
label: '单据编号',
|
|
field: 'dismantlingBillno',
|
|
sort: 'custom',
|
|
isSearch: true,
|
|
isForm: false,
|
|
isDetail: true
|
|
},
|
|
{
|
|
label: '产品编码',
|
|
field: 'productionCode',
|
|
sort: 'custom',
|
|
isSearch: true,
|
|
form: {
|
|
componentProps: {
|
|
isSearchList: true, // 开启查询弹窗
|
|
searchTitle: '产品编码', // 查询弹窗标题
|
|
searchAllSchemas: Itembasic.allSchemas, // 查询弹窗所需类
|
|
searchField: 'code', // 查询弹窗赋值字段
|
|
searchPage: ItembasicApi.getItembasicPage, // 查询弹窗所需分页方法
|
|
searchCondition: [{
|
|
key: 'available',
|
|
value: 'TRUE',
|
|
isMainValue: false
|
|
},
|
|
{
|
|
key: 'type',
|
|
action: 'in', // 查询拼接条件
|
|
isSearch: true, // 使用自定义拼接条件
|
|
value: 'BCP,CCP',//,SEMI]
|
|
isMainValue: false
|
|
}]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
label: '工单类型',
|
|
field: 'workbillType',
|
|
sort: 'custom',
|
|
dictType: DICT_TYPE.DISMANTLING_BILL_TYPE,
|
|
dictClass: 'string',
|
|
isSearch: true,
|
|
},
|
|
{
|
|
label: '工单状态',
|
|
field: 'workbillStatus',
|
|
sort: 'custom',
|
|
dictType: DICT_TYPE.DISMANTLING_MATERIAL_HANDLE_STATUS,
|
|
dictClass: 'string',
|
|
isSearch: true,
|
|
},
|
|
{
|
|
label: '是否可用',
|
|
field: 'status',
|
|
sort: 'custom',
|
|
dictType: DICT_TYPE.QUALIFY_STATUS,
|
|
dictClass: 'string',
|
|
isForm: false,
|
|
isSearch: false,
|
|
isTable: false,
|
|
form: {
|
|
component: 'Switch',
|
|
value: '2',
|
|
componentProps: {
|
|
inactiveValue: '2',
|
|
activeValue: '1'
|
|
}
|
|
},
|
|
},
|
|
{
|
|
label: '备注',
|
|
field: 'remark',
|
|
sort: 'custom',
|
|
isSearch: true,
|
|
},
|
|
{
|
|
label: '操作',
|
|
field: 'action',
|
|
isForm: false,
|
|
table: {
|
|
width: 150,
|
|
fixed: 'right'
|
|
}
|
|
}
|
|
]))
|
|
|
|
export const DismantlingDetail = useCrudSchemas(reactive<CrudSchema[]>([
|
|
{
|
|
label: '删除时间',
|
|
field: 'deleteTime',
|
|
sort: 'custom',
|
|
formatter: dateFormatter,
|
|
isSearch: false,
|
|
isTable: false,
|
|
isForm: false,
|
|
isDetail: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')]
|
|
}
|
|
},
|
|
form: {
|
|
component: 'DatePicker',
|
|
componentProps: {
|
|
type: 'datetime',
|
|
valueFormat: 'x'
|
|
}
|
|
},
|
|
},
|
|
{
|
|
label: '主键',
|
|
field: 'id',
|
|
sort: 'custom',
|
|
isSearch: false,
|
|
isTable: false,
|
|
isForm: false,
|
|
isDetail:false,
|
|
},
|
|
{
|
|
label: '状态',
|
|
field: 'status',
|
|
sort: 'custom',
|
|
isSearch: false,
|
|
isTable: false,
|
|
isForm: false,
|
|
isDetail:false,
|
|
form: {
|
|
component: 'Radio'
|
|
},
|
|
},
|
|
{
|
|
label: '并发乐观锁',
|
|
field: 'concurrencyStamp',
|
|
sort: 'custom',
|
|
isSearch: false,
|
|
isTable: false,
|
|
isForm: false,
|
|
isDetail:false,
|
|
form: {
|
|
component: 'InputNumber',
|
|
value: 0
|
|
},
|
|
},
|
|
{
|
|
label: '创建时间',
|
|
field: 'createTime',
|
|
sort: 'custom',
|
|
formatter: dateFormatter,
|
|
isSearch: false,
|
|
isTable: false,
|
|
isForm: false,
|
|
isDetail: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: 'deleter',
|
|
sort: 'custom',
|
|
isSearch: false,
|
|
isTable: false,
|
|
isForm: false,
|
|
isDetail:false,
|
|
},
|
|
{
|
|
label: '位置ID',
|
|
field: 'siteId',
|
|
sort: 'custom',
|
|
isSearch: false,
|
|
isTable: false,
|
|
isForm: false,
|
|
isDetail:false,
|
|
form: {
|
|
component: 'InputNumber',
|
|
value: 0
|
|
},
|
|
},
|
|
{
|
|
label: '单据编码',
|
|
field: 'mainBiilno',
|
|
sort: 'custom',
|
|
isSearch: true,
|
|
isForm: false,
|
|
isTable: false,
|
|
table: {
|
|
width: 150,
|
|
fixed: 'right'
|
|
}
|
|
},
|
|
{
|
|
label: '物料编码',
|
|
field: 'materialCode',
|
|
sort: 'custom',
|
|
isSearch: true,
|
|
form: {
|
|
componentProps: {
|
|
isSearchList: true, // 开启查询弹窗
|
|
searchTitle: '物料编码', // 查询弹窗标题
|
|
searchAllSchemas: Itembasic.allSchemas, // 查询弹窗所需类
|
|
searchField: 'code', // 查询弹窗赋值字段
|
|
searchPage: ItembasicApi.getItembasicPage, // 查询弹窗所需分页方法
|
|
searchCondition: [{
|
|
key: 'available',
|
|
value: 'TRUE',
|
|
isMainValue: false
|
|
},
|
|
{
|
|
key: 'type',
|
|
action: 'in', // 查询拼接条件
|
|
isSearch: true, // 使用自定义拼接条件
|
|
value: 'BCP,CCP',//,SEMI]
|
|
isMainValue: false
|
|
}]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
label: '物料状态',
|
|
field: 'materialStauts',
|
|
sort: 'custom',
|
|
dictType: DICT_TYPE.DISMANTLING_MATERIAL_STATUS,
|
|
dictClass: 'string',
|
|
isSearch: true,
|
|
},
|
|
{
|
|
label: '处理状态',
|
|
field: 'materialProcessstauts',
|
|
dictType: DICT_TYPE.DISMANTLING_MATERIAL_HANDLE_STATUS,
|
|
dictClass: 'string',
|
|
sort: 'custom',
|
|
isSearch: true,
|
|
},
|
|
{
|
|
label: '备注',
|
|
field: 'remark',
|
|
sort: 'custom',
|
|
isSearch: true,
|
|
},
|
|
{
|
|
label: '操作',
|
|
field: 'action',
|
|
isForm: false,
|
|
table: {
|
|
width: 150,
|
|
fixed: 'right'
|
|
}
|
|
}
|
|
]))
|
|
|
|
// 子表单校验
|
|
export const DismantlingDetailRules = reactive({
|
|
materialCode: [required],
|
|
materialStauts: [required],
|
|
materialProcessstauts: [required],
|
|
})
|
|
|