Commit 6a2a5925 by 张珈源

feat(ckgl/cgdh): 添加批次号字段和优化表单配置

- 在CgdhModel模型中添加pch批次号字段到多个接口定义
- 配置文件中添加批次号输入框组件和表格列配置
- 重新排列字段顺序,将制单人字段位置调整
- 设置部分表单项为禁用状态并添加默认值
- 更新表单验证规则,将制单人设为必填项
- 修改组件属性配置,如禁用状态、占位符文本等
- 添加批量报检功能按钮及其JavaScript逻辑实现
- 启用新增按钮显示并在工作流权限中配置相应字段
parent 811d28ea
...@@ -15,6 +15,8 @@ export interface MesWarehouseArrivedPageParams extends BasicPageParams { ...@@ -15,6 +15,8 @@ export interface MesWarehouseArrivedPageParams extends BasicPageParams {
ywzz: string; ywzz: string;
cspc: string; cspc: string;
pch: string;
} }
/** /**
...@@ -35,13 +37,15 @@ export interface MesWarehouseArrivedPageModel { ...@@ -35,13 +37,15 @@ export interface MesWarehouseArrivedPageModel {
ck: string; ck: string;
zdr: string;
ywzz: string; ywzz: string;
bz: string; bz: string;
cspc: string; cspc: string;
pch: string;
zdr: string;
} }
/** /**
...@@ -70,6 +74,8 @@ export interface MesWarehouseArrivedModel { ...@@ -70,6 +74,8 @@ export interface MesWarehouseArrivedModel {
cspc: string; cspc: string;
pch: string;
fj: string; fj: string;
bz: string; bz: string;
...@@ -131,6 +137,8 @@ export interface MesWarehouseArrivedInfoModel { ...@@ -131,6 +137,8 @@ export interface MesWarehouseArrivedInfoModel {
cspc: string; cspc: string;
pch: string;
sfzp: string; sfzp: string;
sfzj: string; sfzj: string;
......
...@@ -62,6 +62,12 @@ export const searchFormSchema: FormSchema[] = [ ...@@ -62,6 +62,12 @@ export const searchFormSchema: FormSchema[] = [
defaultValue: undefined, defaultValue: undefined,
component: 'Input', component: 'Input',
}, },
{
field: 'pch',
label: '批次号',
defaultValue: undefined,
component: 'Input',
},
]; ];
export const columns: BasicColumn[] = [ export const columns: BasicColumn[] = [
...@@ -145,19 +151,6 @@ export const columns: BasicColumn[] = [ ...@@ -145,19 +151,6 @@ export const columns: BasicColumn[] = [
{ {
resizable: true, resizable: true,
dataIndex: 'zdr',
title: '制单人',
componentType: 'user',
fixed: false,
sorter: true,
styleConfig: undefined,
listStyle: undefined,
},
{
resizable: true,
dataIndex: 'ywzz', dataIndex: 'ywzz',
title: '业务组织', title: '业务组织',
componentType: 'select', componentType: 'select',
...@@ -194,6 +187,32 @@ export const columns: BasicColumn[] = [ ...@@ -194,6 +187,32 @@ export const columns: BasicColumn[] = [
styleConfig: undefined, styleConfig: undefined,
listStyle: '', listStyle: '',
}, },
{
resizable: true,
dataIndex: 'pch',
title: '批次号',
componentType: 'auto-code',
fixed: false,
sorter: true,
styleConfig: undefined,
listStyle: undefined,
},
{
resizable: true,
dataIndex: 'zdr',
title: '制单人',
componentType: 'user',
fixed: false,
sorter: true,
styleConfig: undefined,
listStyle: undefined,
},
]; ];
//表头合并配置 //表头合并配置
export const headerMergingData = []; export const headerMergingData = [];
...@@ -362,7 +381,7 @@ export const formProps: FormProps = { ...@@ -362,7 +381,7 @@ export const formProps: FormProps = {
showSearch: false, showSearch: false,
isMultiple: false, isMultiple: false,
clearable: false, clearable: false,
disabled: false, disabled: true,
staticOptions: [ staticOptions: [
{ key: 1, label: 'Option 1', value: 'Option 1' }, { key: 1, label: 'Option 1', value: 'Option 1' },
{ key: 2, label: 'Option 2', value: 'Option 2' }, { key: 2, label: 'Option 2', value: 'Option 2' },
...@@ -384,6 +403,7 @@ export const formProps: FormProps = { ...@@ -384,6 +403,7 @@ export const formProps: FormProps = {
isShow: true, isShow: true,
tooltipConfig: { visible: false, title: '提示文本' }, tooltipConfig: { visible: false, title: '提示文本' },
itemId: '2010533622867509249', itemId: '2010533622867509249',
defaultSelect: '入库',
style: { width: '100%' }, style: { width: '100%' },
}, },
}, },
...@@ -476,7 +496,7 @@ export const formProps: FormProps = { ...@@ -476,7 +496,7 @@ export const formProps: FormProps = {
span: 8, span: 8,
list: [ list: [
{ {
key: 'abf781fca11e4df9aea8ccab752fa7ce', key: 'c8bee15be90449d58c6bb61b45013906',
field: 'zdr', field: 'zdr',
label: '制单人', label: '制单人',
type: 'user', type: 'user',
...@@ -487,10 +507,10 @@ export const formProps: FormProps = { ...@@ -487,10 +507,10 @@ export const formProps: FormProps = {
span: 7, span: 7,
width: '100%', width: '100%',
defaultValue: '', defaultValue: '',
placeholder: '请选择制单人', placeholder: '请选择人员',
userType: 0, userType: 0,
prefix: '', prefix: '',
suffix: '', suffix: 'ant-design:setting-outlined',
showLabel: true, showLabel: true,
disabled: false, disabled: false,
required: false, required: false,
...@@ -537,7 +557,7 @@ export const formProps: FormProps = { ...@@ -537,7 +557,7 @@ export const formProps: FormProps = {
apiId: '93d735dcb7364a0f8102188ec4d77ac7', apiId: '93d735dcb7364a0f8102188ec4d77ac7',
}, },
dicOptions: [], dicOptions: [],
required: false, required: true,
rules: [], rules: [],
events: {}, events: {},
isShow: true, isShow: true,
...@@ -625,6 +645,34 @@ export const formProps: FormProps = { ...@@ -625,6 +645,34 @@ export const formProps: FormProps = {
], ],
}, },
{ {
span: 8,
list: [
{
key: '7bfde045cd3e4401b4283ac394218c5d',
field: 'pch',
label: '批次号',
type: 'auto-code',
component: 'AutoCodeRule',
colProps: { span: 24 },
componentProps: {
width: '100%',
span: 7,
placeholder: '请输入批次号',
prefix: '',
suffix: '',
addonBefore: '',
addonAfter: '',
showLabel: true,
autoCodeRule: 'pcbm',
required: false,
isShow: true,
tooltipConfig: { visible: false, title: '提示文本' },
style: { width: '100%' },
},
},
],
},
{
span: 24, span: 24,
list: [ list: [
{ {
...@@ -1016,9 +1064,7 @@ export const formProps: FormProps = { ...@@ -1016,9 +1064,7 @@ export const formProps: FormProps = {
span: '', span: '',
defaultValue: '', defaultValue: '',
min: 0, min: 0,
max: null,
step: 1, step: 1,
maxlength: null,
disabled: false, disabled: false,
showLabel: true, showLabel: true,
controls: true, controls: true,
...@@ -1094,6 +1140,36 @@ export const formProps: FormProps = { ...@@ -1094,6 +1140,36 @@ export const formProps: FormProps = {
}, },
}, },
{ {
key: '3582e53475224ea18082fbddb678e7ec',
title: '批次号',
dataIndex: 'pch',
componentType: 'Input',
defaultValue: '',
componentProps: {
width: '100%',
span: '',
defaultValue: '',
placeholder: '请输入批次号',
prefix: '',
suffix: '',
addonBefore: '',
addonAfter: '',
disabled: false,
allowClear: false,
showLabel: true,
required: false,
rules: [],
events: {},
listStyle: '',
isSave: false,
isShow: true,
scan: false,
bordered: true,
isShowAi: false,
tooltipConfig: { visible: false, title: '提示文本' },
},
},
{
key: 'd2d0c0c885684a99a792beb3dc3415ba', key: 'd2d0c0c885684a99a792beb3dc3415ba',
title: '是否赠品', title: '是否赠品',
dataIndex: 'sfzp', dataIndex: 'sfzp',
...@@ -1265,7 +1341,16 @@ export const formProps: FormProps = { ...@@ -1265,7 +1341,16 @@ export const formProps: FormProps = {
label: '批量报检', label: '批量报检',
icon: 'ant-design:alert-outlined', icon: 'ant-design:alert-outlined',
style: 'primary', style: 'primary',
event: [], event: [
{
key: '1',
type: 2,
operateType: 2,
operateConfig: {
js: "if (formActionType.selectedRowsData && formActionType.selectedRowsData.length === 0) { formActionType.showMessage('请先勾选物料明细数据'); } else { const ids = formActionType.selectedRowsData.map(item => item.id); console.log('Extracted ids:', ids); formActionType.httpRequest({ requestUrl: '/ckgl/cgdh/quailty', requestType: 'put', params: ids, errorMessageMode: 'message' }).then(response => { console.log('Quality check response:', response); if (formActionType.showSuccessMessage) { formActionType.showSuccessMessage('报检处理成功!'); } else if (formActionType.message) { formActionType.message.success('报检处理成功!'); } else { formActionType.showMessage('报检处理成功!'); } if (formActionType.clearSelection) { formActionType.clearSelection(); } }).catch(error => { console.error('Quality check error:', error); formActionType.showMessage('批量报检失败,请重试!'); }); }"
}
}
],
type: 1, type: 1,
}, },
], ],
...@@ -1274,7 +1359,7 @@ export const formProps: FormProps = { ...@@ -1274,7 +1359,7 @@ export const formProps: FormProps = {
isDeleteSelected: false, isDeleteSelected: false,
isListView: false, isListView: false,
viewList: [], viewList: [],
isShowAdd: false, isShowAdd: true,
isShowDelete: false, isShowDelete: false,
hasCheckedCol: true, hasCheckedCol: true,
events: {}, events: {},
......
...@@ -36,7 +36,7 @@ export const permissionList = [ ...@@ -36,7 +36,7 @@ export const permissionList = [
{ {
required: false, required: false,
view: true, view: true,
edit: true, edit: false,
disabled: false, disabled: false,
isSaveTable: false, isSaveTable: false,
tableName: '', tableName: '',
...@@ -48,6 +48,7 @@ export const permissionList = [ ...@@ -48,6 +48,7 @@ export const permissionList = [
key: 'cf825b8df185417fa8fa904fa8313dba', key: 'cf825b8df185417fa8fa904fa8313dba',
children: [], children: [],
options: {}, options: {},
defaultValue: '入库',
}, },
{ {
required: false, required: false,
...@@ -94,13 +95,13 @@ export const permissionList = [ ...@@ -94,13 +95,13 @@ export const permissionList = [
isSubTable: false, isSubTable: false,
showChildren: true, showChildren: true,
type: 'user', type: 'user',
key: 'abf781fca11e4df9aea8ccab752fa7ce', key: 'c8bee15be90449d58c6bb61b45013906',
children: [], children: [],
options: {}, options: {},
defaultValue: '', defaultValue: '',
}, },
{ {
required: false, required: true,
view: true, view: true,
edit: true, edit: true,
disabled: false, disabled: false,
...@@ -152,6 +153,22 @@ export const permissionList = [ ...@@ -152,6 +153,22 @@ export const permissionList = [
{ {
required: false, required: false,
view: true, view: true,
edit: false,
disabled: true,
isSaveTable: false,
tableName: '',
fieldName: '批次号',
fieldId: 'pch',
isSubTable: false,
showChildren: true,
type: 'auto-code',
key: '7bfde045cd3e4401b4283ac394218c5d',
children: [],
options: {},
},
{
required: false,
view: true,
edit: true, edit: true,
disabled: false, disabled: false,
isSaveTable: false, isSaveTable: false,
...@@ -402,6 +419,21 @@ export const permissionList = [ ...@@ -402,6 +419,21 @@ export const permissionList = [
isSaveTable: false, isSaveTable: false,
showChildren: false, showChildren: false,
tableName: 'mesWarehouseArrivedInfoList', tableName: 'mesWarehouseArrivedInfoList',
fieldName: '批次号',
fieldId: 'pch',
type: 'Input',
key: '3582e53475224ea18082fbddb678e7ec',
children: [],
},
{
required: true,
view: true,
edit: true,
disabled: false,
isSubTable: false,
isSaveTable: false,
showChildren: false,
tableName: 'mesWarehouseArrivedInfoList',
fieldName: '是否赠品', fieldName: '是否赠品',
fieldId: 'sfzp', fieldId: 'sfzp',
type: 'Input', type: 'Input',
......
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