Browse Source

添加明细

master_hella_20240701
zhaoxuebing 6 months ago
parent
commit
ee5085340a
  1. 143
      src/views/wms/productionManage/processproduction/processproductionRequest/processproductionRequestMain.data.ts

143
src/views/wms/productionManage/processproduction/processproductionRequest/processproductionRequestMain.data.ts

@ -1,6 +1,10 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas' import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime' import { dateFormatter } from '@/utils/formatTime'
import * as ItembasicApi from '@/api/wms/itembasic'
import { Itembasic } from '@/views/wms/basicDataManage/itemManage/itembasic/itembasic.data'
import * as ProductionlineitemApi from '@/api/wms/productionlineitem'
import { Productionlineitem } from '@/views/wms/basicDataManage/itemManage/productionlineitem/productionlineitem.data'
import { fa } from 'element-plus/es/locale'
export const ProcessproductionRequestMain = useCrudSchemas(reactive<CrudSchema[]>([ export const ProcessproductionRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
{ {
@ -18,6 +22,7 @@ export const ProcessproductionRequestMain = useCrudSchemas(reactive<CrudSchema[]
table: { table: {
width: 150 width: 150
}, },
isForm: false,
isSearch: true, isSearch: true,
}, },
{ {
@ -28,6 +33,22 @@ export const ProcessproductionRequestMain = useCrudSchemas(reactive<CrudSchema[]
width: 150 width: 150
}, },
isSearch: true, isSearch: true,
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择物料代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '物料基础信息', // 查询弹窗标题
searchAllSchemas: Itembasic.allSchemas, // 查询弹窗所需类
searchPage: ItembasicApi.getItembasicPage, // 查询弹窗所需分页方法
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
}]
}
}
}, },
{ {
label: '完工数量', label: '完工数量',
@ -36,6 +57,13 @@ export const ProcessproductionRequestMain = useCrudSchemas(reactive<CrudSchema[]
table: { table: {
width: 150 width: 150
}, },
form: {
component: 'InputNumber',
componentProps: {
min: 1,
precision: 6
},
},
}, },
{ {
label: '报废数量', label: '报废数量',
@ -44,6 +72,13 @@ export const ProcessproductionRequestMain = useCrudSchemas(reactive<CrudSchema[]
table: { table: {
width: 150 width: 150
}, },
form: {
component: 'InputNumber',
componentProps: {
min: 1,
precision: 6
},
},
}, },
{ {
label: '是否可用', label: '是否可用',
@ -52,6 +87,16 @@ export const ProcessproductionRequestMain = useCrudSchemas(reactive<CrudSchema[]
table: { table: {
width: 150 width: 150
}, },
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
form: {
component: 'Switch',
value: 'TRUE',
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE'
}
}
}, },
{ {
label: '备注', label: '备注',
@ -97,6 +142,7 @@ export const ProcessproductionRequestMain = useCrudSchemas(reactive<CrudSchema[]
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
isTable:false, isTable:false,
isForm: false,
}, },
{ {
label: '扩展属性', label: '扩展属性',
@ -104,6 +150,7 @@ export const ProcessproductionRequestMain = useCrudSchemas(reactive<CrudSchema[]
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
isTable:false, isTable:false,
isForm: false,
}, },
{ {
label: '并发乐观锁', label: '并发乐观锁',
@ -111,6 +158,7 @@ export const ProcessproductionRequestMain = useCrudSchemas(reactive<CrudSchema[]
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
isTable:false, isTable:false,
isForm: false,
form: { form: {
component: 'InputNumber', component: 'InputNumber',
value: 0 value: 0
@ -121,6 +169,7 @@ export const ProcessproductionRequestMain = useCrudSchemas(reactive<CrudSchema[]
field: 'siteId', field: 'siteId',
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
isForm: false,
isTable:false, isTable:false,
}, },
{ {
@ -136,50 +185,79 @@ export const ProcessproductionRequestMain = useCrudSchemas(reactive<CrudSchema[]
// 表单校验 // 表单校验
export const ProcessproductionRequestMainRules = reactive({ export const ProcessproductionRequestMainRules = reactive({
itemCode: [{ required: true, message: '物料代码不能为空', trigger: 'change' }],
completedQuantity: [{ required: true, message: '完工数量不能为空', trigger: 'change' }],
scrapQuantity: [{ required: true, message: '报废数量不能为空', trigger: 'change' }],
available: [required], available: [required],
concurrencyStamp: [required], concurrencyStamp: [required],
}) })
export const ProcessproductionRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([ export const ProcessproductionRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
{
label: 'id',
field: 'id',
sort: 'custom',
isForm: false,
isTable:false,
},
{
label: '主表ID',
field: 'masterId',
sort: 'custom',
isTable:false,
form: {
component: 'InputNumber',
value: 0
},
},
{ {
label: '单据号', label: '单据号',
field: 'number', field: 'number',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: false,
isTable:false,
isTableForm:false,
table: { table: {
width: 150 width: 150
}, },
hiddenInMain:true, hiddenInMain:true,
}, },
{ {
label: '工序', label: '生产线',
field: 'processCode', field: 'productionLine',
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 150
}, },
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择物料代码', // 输入框占位文本
searchField: 'itemCode', // 查询弹窗赋值字段
searchTitle: '生产线物料关系信息', // 查询弹窗标题
searchAllSchemas: Productionlineitem.allSchemas, // 查询弹窗所需类
searchPage: ProductionlineitemApi.getProductionlineitemPage, // 查询弹窗所需分页方法
searchCondition: [{
key:'itemCode',
value:'itemCode',
message: '请选择物料代码!',
isMainValue: true
},{
key: 'available',
value: 'TRUE',
isMainValue: false
}],
}
},
tableForm:{
multiple:true,
isInpuFocusShow: true,
searchListPlaceholder: '请选择物料代码', // 输入框占位文本
searchField: 'itemCode', // 查询弹窗赋值字段
searchTitle: '生产线物料关系信息', // 查询弹窗标题
searchAllSchemas: Productionlineitem.allSchemas, // 查询弹窗所需类
searchPage: ProductionlineitemApi.getProductionlineitemPage, // 查询弹窗所需分页方法
searchCondition: [{
key:'itemCode',
value:'itemCode',
message: '请选择物料代码!',
isMainValue: true
},{
key: 'available',
value: 'TRUE',
isMainValue: false
}],
},
}, },
{ {
label: '生产线', label: '工序',
field: 'productionLine', field: 'processCode',
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 150
@ -239,6 +317,7 @@ export const ProcessproductionRequestDetail = useCrudSchemas(reactive<CrudSchema
field: 'available', field: 'available',
sort: 'custom', sort: 'custom',
isTable:false, isTable:false,
isTableForm:false,
table: { table: {
width: 150 width: 150
}, },
@ -254,6 +333,7 @@ export const ProcessproductionRequestDetail = useCrudSchemas(reactive<CrudSchema
sort: 'custom', sort: 'custom',
formatter: dateFormatter, formatter: dateFormatter,
isForm: false, isForm: false,
isTableForm: false,
table: { table: {
width: 150 width: 150
}, },
@ -265,6 +345,7 @@ export const ProcessproductionRequestDetail = useCrudSchemas(reactive<CrudSchema
formatter: dateFormatter, formatter: dateFormatter,
isSearch: false, isSearch: false,
isTable:false, isTable:false,
isTableForm: false,
table: { table: {
width: 150 width: 150
}, },
@ -290,6 +371,7 @@ export const ProcessproductionRequestDetail = useCrudSchemas(reactive<CrudSchema
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
isTable:false, isTable:false,
isTableForm: false,
table: { table: {
width: 150 width: 150
}, },
@ -300,6 +382,7 @@ export const ProcessproductionRequestDetail = useCrudSchemas(reactive<CrudSchema
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
isTable:false, isTable:false,
isTableForm: false,
}, },
{ {
label: '并发乐观锁', label: '并发乐观锁',
@ -307,6 +390,7 @@ export const ProcessproductionRequestDetail = useCrudSchemas(reactive<CrudSchema
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
isTable:false, isTable:false,
isTableForm: false,
form: { form: {
component: 'InputNumber', component: 'InputNumber',
value: 0 value: 0
@ -318,6 +402,19 @@ export const ProcessproductionRequestDetail = useCrudSchemas(reactive<CrudSchema
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
isTable:false, isTable:false,
isTableForm: false,
},
{
label: '主表ID',
field: 'masterId',
sort: 'custom',
hiddenInMain:true,
isTable:false,
isTableForm:false,
form: {
component: 'InputNumber',
value: 0
},
}, },
{ {
label: '操作', label: '操作',

Loading…
Cancel
Save