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 { 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[]>([
{
@ -18,6 +22,7 @@ export const ProcessproductionRequestMain = useCrudSchemas(reactive<CrudSchema[]
table: {
width: 150
},
isForm: false,
isSearch: true,
},
{
@ -28,6 +33,22 @@ export const ProcessproductionRequestMain = useCrudSchemas(reactive<CrudSchema[]
width: 150
},
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: '完工数量',
@ -36,6 +57,13 @@ export const ProcessproductionRequestMain = useCrudSchemas(reactive<CrudSchema[]
table: {
width: 150
},
form: {
component: 'InputNumber',
componentProps: {
min: 1,
precision: 6
},
},
},
{
label: '报废数量',
@ -44,6 +72,13 @@ export const ProcessproductionRequestMain = useCrudSchemas(reactive<CrudSchema[]
table: {
width: 150
},
form: {
component: 'InputNumber',
componentProps: {
min: 1,
precision: 6
},
},
},
{
label: '是否可用',
@ -52,6 +87,16 @@ export const ProcessproductionRequestMain = useCrudSchemas(reactive<CrudSchema[]
table: {
width: 150
},
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
form: {
component: 'Switch',
value: 'TRUE',
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE'
}
}
},
{
label: '备注',
@ -97,6 +142,7 @@ export const ProcessproductionRequestMain = useCrudSchemas(reactive<CrudSchema[]
sort: 'custom',
isSearch: false,
isTable:false,
isForm: false,
},
{
label: '扩展属性',
@ -104,6 +150,7 @@ export const ProcessproductionRequestMain = useCrudSchemas(reactive<CrudSchema[]
sort: 'custom',
isSearch: false,
isTable:false,
isForm: false,
},
{
label: '并发乐观锁',
@ -111,6 +158,7 @@ export const ProcessproductionRequestMain = useCrudSchemas(reactive<CrudSchema[]
sort: 'custom',
isSearch: false,
isTable:false,
isForm: false,
form: {
component: 'InputNumber',
value: 0
@ -121,6 +169,7 @@ export const ProcessproductionRequestMain = useCrudSchemas(reactive<CrudSchema[]
field: 'siteId',
sort: 'custom',
isSearch: false,
isForm: false,
isTable:false,
},
{
@ -136,50 +185,79 @@ export const ProcessproductionRequestMain = useCrudSchemas(reactive<CrudSchema[]
// 表单校验
export const ProcessproductionRequestMainRules = reactive({
itemCode: [{ required: true, message: '物料代码不能为空', trigger: 'change' }],
completedQuantity: [{ required: true, message: '完工数量不能为空', trigger: 'change' }],
scrapQuantity: [{ required: true, message: '报废数量不能为空', trigger: 'change' }],
available: [required],
concurrencyStamp: [required],
})
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: '单据号',
field: 'number',
sort: 'custom',
isSearch: true,
isSearch: false,
isTable:false,
isTableForm:false,
table: {
width: 150
},
hiddenInMain:true,
},
{
label: '工序',
field: 'processCode',
label: '生产线',
field: 'productionLine',
sort: 'custom',
table: {
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: '生产线',
field: 'productionLine',
label: '工序',
field: 'processCode',
sort: 'custom',
table: {
width: 150
@ -239,6 +317,7 @@ export const ProcessproductionRequestDetail = useCrudSchemas(reactive<CrudSchema
field: 'available',
sort: 'custom',
isTable:false,
isTableForm:false,
table: {
width: 150
},
@ -254,6 +333,7 @@ export const ProcessproductionRequestDetail = useCrudSchemas(reactive<CrudSchema
sort: 'custom',
formatter: dateFormatter,
isForm: false,
isTableForm: false,
table: {
width: 150
},
@ -265,6 +345,7 @@ export const ProcessproductionRequestDetail = useCrudSchemas(reactive<CrudSchema
formatter: dateFormatter,
isSearch: false,
isTable:false,
isTableForm: false,
table: {
width: 150
},
@ -290,6 +371,7 @@ export const ProcessproductionRequestDetail = useCrudSchemas(reactive<CrudSchema
sort: 'custom',
isSearch: false,
isTable:false,
isTableForm: false,
table: {
width: 150
},
@ -300,6 +382,7 @@ export const ProcessproductionRequestDetail = useCrudSchemas(reactive<CrudSchema
sort: 'custom',
isSearch: false,
isTable:false,
isTableForm: false,
},
{
label: '并发乐观锁',
@ -307,6 +390,7 @@ export const ProcessproductionRequestDetail = useCrudSchemas(reactive<CrudSchema
sort: 'custom',
isSearch: false,
isTable:false,
isTableForm: false,
form: {
component: 'InputNumber',
value: 0
@ -318,6 +402,19 @@ export const ProcessproductionRequestDetail = useCrudSchemas(reactive<CrudSchema
sort: 'custom',
isSearch: false,
isTable:false,
isTableForm: false,
},
{
label: '主表ID',
field: 'masterId',
sort: 'custom',
hiddenInMain:true,
isTable:false,
isTableForm:false,
form: {
component: 'InputNumber',
value: 0
},
},
{
label: '操作',

Loading…
Cancel
Save