Commit 319e2d00 by 张恒

refactor(wlqd): 重构物料清单组件配置和数据模型

- 移除选择产品的标签文字冗余描述
- 删除是否有效字段配置和对应数据模型
- 调整表格列配置顺序和字段映射关系
- 更新占位符文本为简洁形式
- 将物料项配置转换为选项卡结构
- 添加物料ID字段并配置预填入功能
- 修改工作流权限配置中的字段名称映射
- 更新数据模型接口定义以匹配新的字段结构
- 优化子表单的API配置和数据绑定设置
parent 64b77a7b
...@@ -7,8 +7,6 @@ export interface MesBaseBomPageParams extends BasicPageParams { ...@@ -7,8 +7,6 @@ export interface MesBaseBomPageParams extends BasicPageParams {
bommc: string; bommc: string;
cpid: string; cpid: string;
sfyy: string;
} }
/** /**
...@@ -19,15 +17,17 @@ export interface MesBaseBomPageModel { ...@@ -19,15 +17,17 @@ export interface MesBaseBomPageModel {
bommc: string; bommc: string;
bomsl: string;
bombb: string;
cpmc: string; cpmc: string;
cpbh: string;
cpgg: string; cpgg: string;
cpxh: string; cpxh: string;
bomsl: string;
bombb: string;
} }
/** /**
...@@ -86,6 +86,8 @@ export interface MesBaseBomModel { ...@@ -86,6 +86,8 @@ export interface MesBaseBomModel {
modifyUserId: string; modifyUserId: string;
sjbom: string;
mesBaseBomItemList?: MesBaseBomItemModel; mesBaseBomItemList?: MesBaseBomItemModel;
} }
...@@ -99,6 +101,8 @@ export interface MesBaseBomItemModel { ...@@ -99,6 +101,8 @@ export interface MesBaseBomItemModel {
bomid: string; bomid: string;
wlid: string;
wlbh: string; wlbh: string;
wlmc: string; wlmc: string;
......
...@@ -10,7 +10,7 @@ export const searchFormSchema: FormSchema[] = [ ...@@ -10,7 +10,7 @@ export const searchFormSchema: FormSchema[] = [
}, },
{ {
field: 'cpid', field: 'cpid',
label: '选择产品', label: '产品',
defaultValue: undefined, defaultValue: undefined,
component: 'XjrSelect', component: 'XjrSelect',
componentProps: { componentProps: {
...@@ -68,25 +68,6 @@ export const searchFormSchema: FormSchema[] = [ ...@@ -68,25 +68,6 @@ export const searchFormSchema: FormSchema[] = [
getPopupContainer: () => document.body, getPopupContainer: () => document.body,
}, },
}, },
{
field: 'sfyy',
label: '是否有效',
defaultValue: 1,
component: 'Select',
componentProps: {
getPopupContainer: () => document.body,
options: [
{
label: '开',
value: 1,
},
{
label: '关',
value: 0,
},
],
},
},
]; ];
export const columns: BasicColumn[] = [ export const columns: BasicColumn[] = [
...@@ -105,21 +86,21 @@ export const columns: BasicColumn[] = [ ...@@ -105,21 +86,21 @@ export const columns: BasicColumn[] = [
{ {
resizable: true, resizable: true,
dataIndex: 'bomsl', dataIndex: 'cpmc',
title: '物料数量', title: '产品名称',
componentType: 'number', componentType: 'input',
fixed: false, fixed: false,
sorter: true, sorter: true,
styleConfig: undefined, styleConfig: undefined,
listStyle: undefined, listStyle: '',
}, },
{ {
resizable: true, resizable: true,
dataIndex: 'bombb', dataIndex: 'cpbh',
title: '物料版本', title: '产品编号',
componentType: 'input', componentType: 'input',
fixed: false, fixed: false,
...@@ -131,8 +112,8 @@ export const columns: BasicColumn[] = [ ...@@ -131,8 +112,8 @@ export const columns: BasicColumn[] = [
{ {
resizable: true, resizable: true,
dataIndex: 'cpmc', dataIndex: 'cpgg',
title: '产品名称', title: '产品规格',
componentType: 'input', componentType: 'input',
fixed: false, fixed: false,
...@@ -144,8 +125,8 @@ export const columns: BasicColumn[] = [ ...@@ -144,8 +125,8 @@ export const columns: BasicColumn[] = [
{ {
resizable: true, resizable: true,
dataIndex: 'cpgg', dataIndex: 'cpxh',
title: '产品规格', title: '产品型号',
componentType: 'input', componentType: 'input',
fixed: false, fixed: false,
...@@ -157,8 +138,21 @@ export const columns: BasicColumn[] = [ ...@@ -157,8 +138,21 @@ export const columns: BasicColumn[] = [
{ {
resizable: true, resizable: true,
dataIndex: 'cpxh', dataIndex: 'bomsl',
title: '产品型号', title: '物料数量',
componentType: 'number',
fixed: false,
sorter: true,
styleConfig: undefined,
listStyle: undefined,
},
{
resizable: true,
dataIndex: 'bombb',
title: '物料版本',
componentType: 'input', componentType: 'input',
fixed: false, fixed: false,
...@@ -360,7 +354,7 @@ export const formProps: FormProps = { ...@@ -360,7 +354,7 @@ export const formProps: FormProps = {
{ {
key: 'c42ef62f38e1445b89e5c3362ffd3af2', key: 'c42ef62f38e1445b89e5c3362ffd3af2',
field: 'cpid', field: 'cpid',
label: '选择产品', label: '产品',
type: 'associate-popup', type: 'associate-popup',
component: 'MultiplePopup', component: 'MultiplePopup',
colProps: { span: 24 }, colProps: { span: 24 },
...@@ -368,7 +362,7 @@ export const formProps: FormProps = { ...@@ -368,7 +362,7 @@ export const formProps: FormProps = {
popupType: 'associate', popupType: 'associate',
width: '100%', width: '100%',
span: 7, span: 7,
placeholder: '请选择产品选择', placeholder: '请产品选择',
showLabel: true, showLabel: true,
disabled: false, disabled: false,
datasourceType: 'api', datasourceType: 'api',
...@@ -448,7 +442,7 @@ export const formProps: FormProps = { ...@@ -448,7 +442,7 @@ export const formProps: FormProps = {
width: '100%', width: '100%',
span: 7, span: 7,
defaultValue: '', defaultValue: '',
placeholder: '请输入产品编号', placeholder: '',
prefix: '', prefix: '',
suffix: '', suffix: '',
addonBefore: '', addonBefore: '',
...@@ -486,7 +480,7 @@ export const formProps: FormProps = { ...@@ -486,7 +480,7 @@ export const formProps: FormProps = {
width: '100%', width: '100%',
span: 7, span: 7,
defaultValue: '', defaultValue: '',
placeholder: '请输入产品名称', placeholder: '',
prefix: '', prefix: '',
suffix: '', suffix: '',
addonBefore: '', addonBefore: '',
...@@ -524,7 +518,7 @@ export const formProps: FormProps = { ...@@ -524,7 +518,7 @@ export const formProps: FormProps = {
width: '100%', width: '100%',
span: 7, span: 7,
defaultValue: '', defaultValue: '',
placeholder: '请输入产品规格', placeholder: '',
prefix: '', prefix: '',
suffix: '', suffix: '',
addonBefore: '', addonBefore: '',
...@@ -562,7 +556,7 @@ export const formProps: FormProps = { ...@@ -562,7 +556,7 @@ export const formProps: FormProps = {
width: '100%', width: '100%',
span: 7, span: 7,
defaultValue: '', defaultValue: '',
placeholder: '请输入产品型号', placeholder: '',
prefix: '', prefix: '',
suffix: '', suffix: '',
addonBefore: '', addonBefore: '',
...@@ -663,8 +657,27 @@ export const formProps: FormProps = { ...@@ -663,8 +657,27 @@ export const formProps: FormProps = {
}, },
}, },
{ {
key: '2d0c8112a86543e0ac71468e261f0a55',
field: '',
label: '',
type: 'tab',
colProps: { span: 24 },
component: 'Tab',
children: [
{
span: 24,
name: '物料',
prefix: '',
suffix: '',
activeColor: '#1c8dff',
folderId: '',
imageUrl: '',
conFolderId: '',
conImageUrl: '',
list: [
{
key: 'c87fc2d18e24429a819521f35f19137b', key: 'c87fc2d18e24429a819521f35f19137b',
label: '物料项', label: '',
field: 'mesBaseBomItemList', field: 'mesBaseBomItemList',
type: 'form', type: 'form',
component: 'SubForm', component: 'SubForm',
...@@ -674,63 +687,6 @@ export const formProps: FormProps = { ...@@ -674,63 +687,6 @@ export const formProps: FormProps = {
mainKey: 'mesBaseBomItemList', mainKey: 'mesBaseBomItemList',
columns: [ columns: [
{ {
key: '709b38c05d11468db0db4e6e9168e4f9',
title: '选择物料',
dataIndex: 'wlmc',
componentType: 'MultiplePopup',
componentProps: {
popupType: 'associate',
width: '100%',
placeholder: '请选择物料选择',
showLabel: true,
disabled: false,
datasourceType: 'api',
labelField: 'label',
valueField: 'value',
pageSize: 10,
assoTitle: '物料列表',
apiConfig: {
path: '/scgl/scjh/getAllProduct',
method: 'GET',
apiId: 'f4fbb57f2f18425e97918a031c8aa7d8',
apiParams: [
{ key: '1', title: 'Query Params', tableInfo: [] },
{ key: '2', title: 'Header', tableInfo: [] },
{ key: '3', title: 'Body' },
],
script:
"var sql = 'select *,id as value,cpmc as label from mes_base_product_info where delete_mark=0';\r\nreturn db.select(sql)",
outputParams: [
{
name: 'cpbh',
tableTitle: '物料编号',
bindField: 'wlbh',
show: true,
width: 150,
component: '3988d1cba45a464abbeabce6ed09970e',
bindTable: 'mes_base_bom_item',
},
{
name: 'cpmc',
tableTitle: '物料名称',
bindField: 'wlmc',
show: true,
width: 150,
component: '112f6292bd884006ad872f06aeef4e6f',
bindTable: 'mes_base_bom_item',
},
],
},
dicOptions: [],
required: true,
rules: [],
events: {},
isShow: true,
tooltipConfig: { visible: false, title: '提示文本' },
prestrainField: 'name',
},
},
{
key: '3988d1cba45a464abbeabce6ed09970e', key: '3988d1cba45a464abbeabce6ed09970e',
title: '物料编号', title: '物料编号',
dataIndex: 'wlbh', dataIndex: 'wlbh',
...@@ -739,7 +695,7 @@ export const formProps: FormProps = { ...@@ -739,7 +695,7 @@ export const formProps: FormProps = {
componentProps: { componentProps: {
width: '100%', width: '100%',
defaultValue: '', defaultValue: '',
placeholder: '请输入物料编号', placeholder: '',
prefix: '', prefix: '',
suffix: '', suffix: '',
addonBefore: '', addonBefore: '',
...@@ -757,37 +713,37 @@ export const formProps: FormProps = { ...@@ -757,37 +713,37 @@ export const formProps: FormProps = {
bordered: true, bordered: true,
isShowAi: false, isShowAi: false,
tooltipConfig: { visible: false, title: '提示文本' }, tooltipConfig: { visible: false, title: '提示文本' },
prestrainField: '', prestrainField: 'cpbh',
}, },
}, },
{ {
key: '112f6292bd884006ad872f06aeef4e6f', key: '112f6292bd884006ad872f06aeef4e6f',
title: '物料名称', title: '物料名称',
dataIndex: 'wuLiaoMingChen9398', dataIndex: 'wlmc',
componentType: 'Input', componentType: 'Input',
defaultValue: '', defaultValue: '',
componentProps: { componentProps: {
width: '100%', width: '100%',
defaultValue: '', defaultValue: '',
placeholder: '请输入物料名称', placeholder: '',
prefix: '', prefix: '',
suffix: '', suffix: '',
addonBefore: '', addonBefore: '',
addonAfter: '', addonAfter: '',
disabled: true, disabled: false,
allowClear: false, allowClear: false,
showLabel: true, showLabel: true,
required: false, required: false,
rules: [], rules: [],
events: {}, events: {},
listStyle: '', listStyle: '',
isSave: true, isSave: false,
isShow: false, isShow: true,
scan: false, scan: false,
bordered: true, bordered: true,
isShowAi: false, isShowAi: false,
tooltipConfig: { visible: false, title: '提示文本' }, tooltipConfig: { visible: false, title: '提示文本' },
prestrainField: '', prestrainField: 'cpmc',
}, },
}, },
{ {
...@@ -829,7 +785,7 @@ export const formProps: FormProps = { ...@@ -829,7 +785,7 @@ export const formProps: FormProps = {
controls: true, controls: true,
required: false, required: false,
subTotal: false, subTotal: false,
isShow: false, isShow: true,
rules: [], rules: [],
events: {}, events: {},
tooltipConfig: { visible: false, title: '提示文本' }, tooltipConfig: { visible: false, title: '提示文本' },
...@@ -904,7 +860,7 @@ export const formProps: FormProps = { ...@@ -904,7 +860,7 @@ export const formProps: FormProps = {
showLabel: true, showLabel: true,
disabled: false, disabled: false,
events: {}, events: {},
isShow: false, isShow: true,
tooltipConfig: { visible: false, title: '提示文本' }, tooltipConfig: { visible: false, title: '提示文本' },
prestrainField: '', prestrainField: '',
}, },
...@@ -940,33 +896,80 @@ export const formProps: FormProps = { ...@@ -940,33 +896,80 @@ export const formProps: FormProps = {
prestrainField: '', prestrainField: '',
}, },
}, },
{
key: '998cedda278d4544ab851536bae4aacc',
title: '物料ID',
dataIndex: 'wlid',
componentType: 'Input',
defaultValue: '',
componentProps: {
width: '100%',
defaultValue: '',
placeholder: '',
prefix: '',
suffix: '',
addonBefore: '',
addonAfter: '',
disabled: false,
allowClear: false,
showLabel: true,
required: false,
rules: [],
events: {},
listStyle: '',
isSave: false,
isShow: false,
scan: false,
bordered: true,
isShowAi: false,
tooltipConfig: { visible: false, title: '提示文本' },
prestrainField: 'id',
},
},
{ title: '操作', key: 'action', fixed: 'right', width: '50px' }, { title: '操作', key: 'action', fixed: 'right', width: '50px' },
], ],
span: 2, span: 2,
preloadType: 'dic', preloadType: 'api',
apiConfig: { apiConfig: {
path: '/scgl/wlqd/getAllBomItemList', path: '/scgl/scjh/getAllProduct',
method: 'GET', method: 'GET',
apiId: '1a6a0c6bab2a4aceaf761b0c2c8d17a0', apiId: 'f4fbb57f2f18425e97918a031c8aa7d8',
apiParams: [ apiParams: [
{ key: '1', title: 'Query Params', tableInfo: [] }, {
key: '1',
title: 'Query Params',
tableInfo: [
{
name: 'keyword',
value: '',
required: false,
dataType: 'String',
bindType: '',
},
],
},
{ key: '2', title: 'Header', tableInfo: [] }, { key: '2', title: 'Header', tableInfo: [] },
{ key: '3', title: 'Body' }, { key: '3', title: 'Body' },
], ],
script: script:
"var sql = 'select *,id as value,wlmc as label from mes_base_bom_item where delete_mark=0';\r\nreturn db.select(sql)", "if(keyword!=null && keyword!=''){\r\n var sql = \"select *,id as value,cpmc as label from mes_base_product_info where delete_mark=0 and cpmc like '%${keyword}%' \";\r\n return db.select(sql)\r\n}\r\nvar sql = 'select *,id as value,cpmc as label from mes_base_product_info where delete_mark=0';\r\nreturn db.select(sql)",
outputParams: [
{ name: 'cpbh', tableTitle: '编号' },
{ name: 'cpmc', tableTitle: '名称' },
{ name: 'id', tableTitle: 'ID' },
],
}, },
itemId: '', itemId: '',
dicOptions: [], dicOptions: [],
useSelectButton: false, useSelectButton: true,
buttonName: '选择物料', buttonName: '选择',
showLabel: true, showLabel: true,
showComponentBorder: true, showComponentBorder: true,
showBorder: false, showBorder: false,
bordercolor: '#f0f0f0', bordercolor: '#f0f0f0',
bordershowtype: [true, true, true, true], bordershowtype: [true, true, true, true],
borderwidth: 1, borderwidth: 1,
showIndex: false, showIndex: true,
isShow: true, isShow: true,
multipleHeads: [], multipleHeads: [],
buttonList: [], buttonList: [],
...@@ -1040,13 +1043,76 @@ export const formProps: FormProps = { ...@@ -1040,13 +1043,76 @@ export const formProps: FormProps = {
checked: false, checked: false,
}, },
], ],
isShowAdd: true, isShowAdd: false,
isShowDelete: true, isShowDelete: true,
hasCheckedCol: false, hasCheckedCol: false,
events: {}, events: {},
showPagenation: true, showPagenation: true,
rowResize: false, rowResize: false,
widths: [
{
key: '3988d1cba45a464abbeabce6ed09970e',
name: '物料编号',
bindField: 'wlbh',
resizable: false,
isEdit: true,
},
{
key: '112f6292bd884006ad872f06aeef4e6f',
name: '物料名称',
bindField: 'wlmc',
resizable: false,
isEdit: true,
},
{
key: '80fe637a2eaa47a49e96f6e86f0efdda',
name: '物料数量',
bindField: 'wlsl',
resizable: false,
isEdit: false,
},
{
key: '1afa69530c154b6f904f1661e82ff9a3',
name: '库存数量',
bindField: 'wlkcl',
resizable: false,
isEdit: false,
},
{
key: 'd15b4777d2794944995aa2a085442a6e',
name: '客户标准(%)',
bindField: 'khbz',
resizable: false,
isEdit: false,
},
{
key: '1ef860d823ff46c690334dc5eff5a6e4',
name: '内控标准(%)',
bindField: 'nkbz',
resizable: false,
isEdit: false,
}, },
{
key: '40a1e893e8ee496a96d7ed6dbe17e271',
name: '是否投料',
bindField: 'sftl',
resizable: false,
isEdit: false,
},
{
key: '9230b500d1024028af68ed4ac49bdbd3',
name: '备注',
bindField: 'bz',
resizable: false,
isEdit: false,
},
],
},
},
],
},
],
componentProps: { tabPosition: 'top', size: 'default', type: 'line', isShow: true },
}, },
], ],
showActionButtonGroup: false, showActionButtonGroup: false,
......
...@@ -57,7 +57,7 @@ export const permissionList = [ ...@@ -57,7 +57,7 @@ export const permissionList = [
disabled: false, disabled: false,
isSaveTable: false, isSaveTable: false,
tableName: '', tableName: '',
fieldName: '选择产品', fieldName: '产品',
fieldId: 'cpid', fieldId: 'cpid',
isSubTable: false, isSubTable: false,
showChildren: true, showChildren: true,
...@@ -176,7 +176,7 @@ export const permissionList = [ ...@@ -176,7 +176,7 @@ export const permissionList = [
isSubTable: true, isSubTable: true,
showChildren: false, showChildren: false,
tableName: 'mesBaseBomItemList', tableName: 'mesBaseBomItemList',
fieldName: '物料项', fieldName: '',
fieldId: 'mesBaseBomItemList', fieldId: 'mesBaseBomItemList',
type: 'form', type: 'form',
key: 'c87fc2d18e24429a819521f35f19137b', key: 'c87fc2d18e24429a819521f35f19137b',
...@@ -190,21 +190,6 @@ export const permissionList = [ ...@@ -190,21 +190,6 @@ export const permissionList = [
isSaveTable: false, isSaveTable: false,
showChildren: false, showChildren: false,
tableName: 'mesBaseBomItemList', tableName: 'mesBaseBomItemList',
fieldName: '选择物料',
fieldId: 'wlmc',
type: 'MultiplePopup',
key: '709b38c05d11468db0db4e6e9168e4f9',
children: [],
},
{
required: true,
view: true,
edit: true,
disabled: false,
isSubTable: false,
isSaveTable: false,
showChildren: false,
tableName: 'mesBaseBomItemList',
fieldName: '物料编号', fieldName: '物料编号',
fieldId: 'wlbh', fieldId: 'wlbh',
type: 'Input', type: 'Input',
...@@ -221,7 +206,7 @@ export const permissionList = [ ...@@ -221,7 +206,7 @@ export const permissionList = [
showChildren: false, showChildren: false,
tableName: 'mesBaseBomItemList', tableName: 'mesBaseBomItemList',
fieldName: '物料名称', fieldName: '物料名称',
fieldId: 'wuLiaoMingChen9398', fieldId: 'wlmc',
type: 'Input', type: 'Input',
key: '112f6292bd884006ad872f06aeef4e6f', key: '112f6292bd884006ad872f06aeef4e6f',
children: [], children: [],
...@@ -316,6 +301,21 @@ export const permissionList = [ ...@@ -316,6 +301,21 @@ export const permissionList = [
key: '9230b500d1024028af68ed4ac49bdbd3', key: '9230b500d1024028af68ed4ac49bdbd3',
children: [], children: [],
}, },
{
required: true,
view: true,
edit: true,
disabled: false,
isSubTable: false,
isSaveTable: false,
showChildren: false,
tableName: 'mesBaseBomItemList',
fieldName: '物料ID',
fieldId: 'wlid',
type: 'Input',
key: '998cedda278d4544ab851536bae4aacc',
children: [],
},
], ],
}, },
]; ];
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment