Commit 6a2a5925 by 张珈源

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

- 在CgdhModel模型中添加pch批次号字段到多个接口定义
- 配置文件中添加批次号输入框组件和表格列配置
- 重新排列字段顺序,将制单人字段位置调整
- 设置部分表单项为禁用状态并添加默认值
- 更新表单验证规则,将制单人设为必填项
- 修改组件属性配置,如禁用状态、占位符文本等
- 添加批量报检功能按钮及其JavaScript逻辑实现
- 启用新增按钮显示并在工作流权限中配置相应字段
parent 811d28ea
......@@ -15,6 +15,8 @@ export interface MesWarehouseArrivedPageParams extends BasicPageParams {
ywzz: string;
cspc: string;
pch: string;
}
/**
......@@ -35,13 +37,15 @@ export interface MesWarehouseArrivedPageModel {
ck: string;
zdr: string;
ywzz: string;
bz: string;
cspc: string;
pch: string;
zdr: string;
}
/**
......@@ -70,6 +74,8 @@ export interface MesWarehouseArrivedModel {
cspc: string;
pch: string;
fj: string;
bz: string;
......@@ -131,6 +137,8 @@ export interface MesWarehouseArrivedInfoModel {
cspc: string;
pch: string;
sfzp: string;
sfzj: string;
......
......@@ -62,6 +62,12 @@ export const searchFormSchema: FormSchema[] = [
defaultValue: undefined,
component: 'Input',
},
{
field: 'pch',
label: '批次号',
defaultValue: undefined,
component: 'Input',
},
];
export const columns: BasicColumn[] = [
......@@ -145,19 +151,6 @@ export const columns: BasicColumn[] = [
{
resizable: true,
dataIndex: 'zdr',
title: '制单人',
componentType: 'user',
fixed: false,
sorter: true,
styleConfig: undefined,
listStyle: undefined,
},
{
resizable: true,
dataIndex: 'ywzz',
title: '业务组织',
componentType: 'select',
......@@ -194,6 +187,32 @@ export const columns: BasicColumn[] = [
styleConfig: undefined,
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 = [];
......@@ -362,7 +381,7 @@ export const formProps: FormProps = {
showSearch: false,
isMultiple: false,
clearable: false,
disabled: false,
disabled: true,
staticOptions: [
{ key: 1, label: 'Option 1', value: 'Option 1' },
{ key: 2, label: 'Option 2', value: 'Option 2' },
......@@ -384,6 +403,7 @@ export const formProps: FormProps = {
isShow: true,
tooltipConfig: { visible: false, title: '提示文本' },
itemId: '2010533622867509249',
defaultSelect: '入库',
style: { width: '100%' },
},
},
......@@ -476,7 +496,7 @@ export const formProps: FormProps = {
span: 8,
list: [
{
key: 'abf781fca11e4df9aea8ccab752fa7ce',
key: 'c8bee15be90449d58c6bb61b45013906',
field: 'zdr',
label: '制单人',
type: 'user',
......@@ -487,10 +507,10 @@ export const formProps: FormProps = {
span: 7,
width: '100%',
defaultValue: '',
placeholder: '请选择制单人',
placeholder: '请选择人员',
userType: 0,
prefix: '',
suffix: '',
suffix: 'ant-design:setting-outlined',
showLabel: true,
disabled: false,
required: false,
......@@ -537,7 +557,7 @@ export const formProps: FormProps = {
apiId: '93d735dcb7364a0f8102188ec4d77ac7',
},
dicOptions: [],
required: false,
required: true,
rules: [],
events: {},
isShow: true,
......@@ -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,
list: [
{
......@@ -1016,9 +1064,7 @@ export const formProps: FormProps = {
span: '',
defaultValue: '',
min: 0,
max: null,
step: 1,
maxlength: null,
disabled: false,
showLabel: true,
controls: true,
......@@ -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',
title: '是否赠品',
dataIndex: 'sfzp',
......@@ -1265,7 +1341,16 @@ export const formProps: FormProps = {
label: '批量报检',
icon: 'ant-design:alert-outlined',
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,
},
],
......@@ -1274,7 +1359,7 @@ export const formProps: FormProps = {
isDeleteSelected: false,
isListView: false,
viewList: [],
isShowAdd: false,
isShowAdd: true,
isShowDelete: false,
hasCheckedCol: true,
events: {},
......
......@@ -36,7 +36,7 @@ export const permissionList = [
{
required: false,
view: true,
edit: true,
edit: false,
disabled: false,
isSaveTable: false,
tableName: '',
......@@ -48,6 +48,7 @@ export const permissionList = [
key: 'cf825b8df185417fa8fa904fa8313dba',
children: [],
options: {},
defaultValue: '入库',
},
{
required: false,
......@@ -94,13 +95,13 @@ export const permissionList = [
isSubTable: false,
showChildren: true,
type: 'user',
key: 'abf781fca11e4df9aea8ccab752fa7ce',
key: 'c8bee15be90449d58c6bb61b45013906',
children: [],
options: {},
defaultValue: '',
},
{
required: false,
required: true,
view: true,
edit: true,
disabled: false,
......@@ -152,6 +153,22 @@ export const permissionList = [
{
required: false,
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,
disabled: false,
isSaveTable: false,
......@@ -402,6 +419,21 @@ export const permissionList = [
isSaveTable: false,
showChildren: false,
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: '是否赠品',
fieldId: 'sfzp',
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