Commit 8d4a7ace by 张珈源

feat(cgrk): 更新采购入库模块字段配置和界面组件

- 在CgrkModel模型中添加zdr、pch、ywzz字段并调整字段顺序
- 配置文件中增加制单人、批次号、业务组织字段的UI配置
- 列表表格中将库存组织、采购组织替换为制单人、批次号、业务组织列
- 更新供应商字段的maxlength属性配置
- 调整制单人字段为用户选择组件并修改相关属性
- 将批次号字段配置为自动编码规则组件
- 业务组织字段配置为下拉选择组件并设置数据源
- 禁用列表新增按钮功能并将编辑按钮添加到操作栏
- 扩展操作列宽度以适应更多按钮显示
- 实现编辑功能处理方法支持记录编辑操作
- 更新工作流权限配置中的字段类型和标识符映射
parent b1c622b8
......@@ -9,6 +9,12 @@ export interface MesWarehouseInPageParams extends BasicPageParams {
ck: string;
gys: string;
zdr: string;
pch: string;
ywzz: string;
}
/**
......@@ -27,11 +33,11 @@ export interface MesWarehouseInPageModel {
gys: string;
kczz: string;
zdr: string;
cgzz: string;
pch: string;
zdr: string;
ywzz: string;
bz: string;
}
......@@ -46,10 +52,6 @@ export interface MesWarehouseInModel {
djh: string;
kczz: string;
cgzz: string;
djrq: string;
crklx: string;
......@@ -64,9 +66,9 @@ export interface MesWarehouseInModel {
bz: string;
p3: string;
ywzz: string;
p4: string;
pch: string;
p5: string;
......
......@@ -30,6 +30,38 @@ export const searchFormSchema: FormSchema[] = [
defaultValue: undefined,
component: 'Input',
},
{
field: 'zdr',
label: '制单人',
defaultValue: undefined,
component: 'User',
componentProps: {
suffix: 'ant-design:setting-outlined',
placeholder: '请选择',
},
},
{
field: 'pch',
label: '批次号',
defaultValue: undefined,
component: 'Input',
},
{
field: 'ywzz',
label: '业务组织',
defaultValue: undefined,
component: 'XjrSelect',
componentProps: {
datasourceType: 'dic',
params: { itemId: '2015724355955159041' },
labelField: 'name',
valueField: 'value',
mode: 'multiple',
showSearch: true,
getPopupContainer: () => document.body,
},
},
];
export const columns: BasicColumn[] = [
......@@ -100,41 +132,41 @@ export const columns: BasicColumn[] = [
{
resizable: true,
dataIndex: 'kczz',
title: '库存组织',
componentType: 'input',
dataIndex: 'zdr',
title: '制单人',
componentType: 'user',
fixed: false,
sorter: true,
styleConfig: undefined,
listStyle: '',
listStyle: undefined,
},
{
resizable: true,
dataIndex: 'cgzz',
title: '采购组织',
componentType: 'input',
dataIndex: 'pch',
title: '批次号',
componentType: 'auto-code',
fixed: false,
sorter: true,
styleConfig: undefined,
listStyle: '',
listStyle: undefined,
},
{
resizable: true,
dataIndex: 'zdr',
title: '制单人',
componentType: 'input',
dataIndex: 'ywzz',
title: '业务组织',
componentType: 'select',
fixed: false,
sorter: true,
styleConfig: undefined,
listStyle: '',
listStyle: undefined,
},
{
......@@ -383,7 +415,7 @@ export const formProps: FormProps = {
span: 8,
list: [
{
key: '088c468398ab48bd996990978a6d54b7',
key: 'cc1a975fc12c43a69b75687e1af784e5',
field: 'gys',
label: '供应商',
type: 'input',
......@@ -395,6 +427,7 @@ export const formProps: FormProps = {
span: 7,
defaultValue: '',
placeholder: '请输入供应商',
maxlength: null,
prefix: '',
suffix: '',
addonBefore: '',
......@@ -421,34 +454,27 @@ export const formProps: FormProps = {
span: 8,
list: [
{
key: 'bed480e33d304f06b76cfffcc020f546',
key: 'f6cab4a9e2894121b5a05dc6e1addf49',
field: 'zdr',
label: '制单人',
type: 'input',
component: 'Input',
type: 'user',
component: 'User',
colProps: { span: 24 },
defaultValue: '',
componentProps: {
width: '100%',
span: 7,
width: '100%',
defaultValue: '',
placeholder: '请输入制单人',
placeholder: '请选择人员',
userType: 0,
prefix: '',
suffix: '',
addonBefore: '',
addonAfter: '',
disabled: false,
allowClear: false,
showLabel: true,
disabled: false,
required: false,
rules: [],
events: {},
listStyle: '',
isSave: false,
multiple: true,
isShow: true,
scan: false,
bordered: true,
isShowAi: false,
events: {},
tooltipConfig: { visible: false, title: '提示文本' },
style: { width: '100%' },
},
......@@ -459,34 +485,24 @@ export const formProps: FormProps = {
span: 8,
list: [
{
key: 'fae35f38efc94386a6389b11c4ed164d',
field: 'kczz',
label: '库存组织',
type: 'input',
component: 'Input',
key: '8661293203314885bc02bb17bae70147',
field: 'pch',
label: '批次号',
type: 'auto-code',
component: 'AutoCodeRule',
colProps: { span: 24 },
defaultValue: '',
componentProps: {
width: '100%',
span: 7,
defaultValue: '',
placeholder: '请输入库存组织',
placeholder: '请输入批次号',
prefix: '',
suffix: '',
addonBefore: '',
addonAfter: '',
disabled: false,
allowClear: false,
showLabel: true,
autoCodeRule: 'cgrkpc',
required: false,
rules: [],
events: {},
listStyle: '',
isSave: false,
isShow: true,
scan: false,
bordered: true,
isShowAi: false,
tooltipConfig: { visible: false, title: '提示文本' },
style: { width: '100%' },
},
......@@ -497,35 +513,43 @@ export const formProps: FormProps = {
span: 8,
list: [
{
key: '1293af02768d4c2c897ee5964e5ba3f4',
field: 'cgzz',
label: '采购组织',
type: 'input',
component: 'Input',
key: '55bfa8e7f6374af0a0be531657c966d9',
field: 'ywzz',
label: '业务组织',
type: 'select',
component: 'XjrSelect',
colProps: { span: 24 },
defaultValue: '',
componentProps: {
width: '100%',
span: 7,
defaultValue: '',
placeholder: '请输入采购组织',
prefix: '',
suffix: '',
addonBefore: '',
addonAfter: '',
disabled: false,
allowClear: false,
placeholder: '请选择下拉选择业务组织',
showLabel: true,
showSearch: false,
isMultiple: false,
clearable: false,
disabled: false,
staticOptions: [
{ key: 1, label: 'Option 1', value: 'Option 1' },
{ key: 2, label: 'Option 2', value: 'Option 2' },
{ key: 3, label: 'Option 3', value: 'Option 3' },
],
defaultSelect: null,
datasourceType: 'dic',
params: { itemId: '2015724355955159041' },
labelField: 'name',
valueField: 'value',
apiConfig: {
path: 'CodeGeneration/selection',
method: 'GET',
apiId: '93d735dcb7364a0f8102188ec4d77ac7',
},
dicOptions: [],
required: false,
rules: [],
events: {},
listStyle: '',
isSave: false,
isShow: true,
scan: false,
bordered: true,
isShowAi: false,
tooltipConfig: { visible: false, title: '提示文本' },
itemId: '2015724355955159041',
style: { width: '100%' },
},
},
......@@ -1014,7 +1038,7 @@ export const formProps: FormProps = {
isDeleteSelected: false,
isListView: false,
viewList: [],
isShowAdd: true,
isShowAdd: false,
isShowDelete: true,
hasCheckedCol: false,
events: {},
......
......@@ -76,7 +76,7 @@ export const permissionList = [
isSubTable: false,
showChildren: true,
type: 'input',
key: '088c468398ab48bd996990978a6d54b7',
key: 'cc1a975fc12c43a69b75687e1af784e5',
children: [],
options: {},
defaultValue: '',
......@@ -92,8 +92,8 @@ export const permissionList = [
fieldId: 'zdr',
isSubTable: false,
showChildren: true,
type: 'input',
key: 'bed480e33d304f06b76cfffcc020f546',
type: 'user',
key: 'f6cab4a9e2894121b5a05dc6e1addf49',
children: [],
options: {},
defaultValue: '',
......@@ -101,19 +101,18 @@ export const permissionList = [
{
required: false,
view: true,
edit: true,
disabled: false,
edit: false,
disabled: true,
isSaveTable: false,
tableName: '',
fieldName: '库存组织',
fieldId: 'kczz',
fieldName: '批次号',
fieldId: 'pch',
isSubTable: false,
showChildren: true,
type: 'input',
key: 'fae35f38efc94386a6389b11c4ed164d',
type: 'auto-code',
key: '8661293203314885bc02bb17bae70147',
children: [],
options: {},
defaultValue: '',
},
{
required: false,
......@@ -122,15 +121,14 @@ export const permissionList = [
disabled: false,
isSaveTable: false,
tableName: '',
fieldName: '采购组织',
fieldId: 'cgzz',
fieldName: '业务组织',
fieldId: 'ywzz',
isSubTable: false,
showChildren: true,
type: 'input',
key: '1293af02768d4c2c897ee5964e5ba3f4',
type: 'select',
key: '55bfa8e7f6374af0a0be531657c966d9',
children: [],
options: {},
defaultValue: '',
},
{
required: false,
......
......@@ -140,9 +140,9 @@
//展示在列表内的按钮
const actionButtons = ref<string[]>(["view","delete"]);
const actionButtons = ref<string[]>(["view","edit","delete"]);
const buttonConfigs = computed(()=>{
const list = [{"buttonId":"2011687510413426688","name":"查看","code":"view","icon":"ant-design:eye-outlined","isDefault":true,"isUse":true},{"buttonId":"2011687510413426689","name":"新增","code":"add","icon":"ant-design:plus-outlined","isDefault":true,"isUse":true},{"name":"打印","code":"print","icon":"ant-design:printer-outlined","isDefault":true,"isUse":true},{"buttonId":"2011691871017484288","name":"快速导出","code":"export","icon":"ant-design:export-outlined","isDefault":true,"isUse":true},{"buttonId":"2011691871017484289","name":"提交","code":"commit","icon":"ant-design:arrow-up-outlined","isDefault":false,"isUse":true,"setting":[],"showType":"top","buttonType":"primary"},{"buttonId":"2011687510413426691","name":"删除","code":"delete","icon":"ant-design:delete-outlined","isDefault":true,"isUse":true}]
const list = [{"buttonId":"2011687510413426688","name":"查看","code":"view","icon":"ant-design:eye-outlined","isDefault":true,"isUse":true},{"buttonId":"2011687510413426689","name":"新增","code":"add","icon":"ant-design:plus-outlined","isDefault":true,"isUse":true},{"buttonId":"2011687510413426690","name":"编辑","code":"edit","icon":"ant-design:form-outlined","isDefault":true,"isUse":true,"isEnableLock":true},{"buttonId":"2011729952881885184","name":"打印","code":"print","icon":"ant-design:printer-outlined","isDefault":true,"isUse":true},{"buttonId":"2011691871017484288","name":"快速导出","code":"export","icon":"ant-design:export-outlined","isDefault":true,"isUse":true},{"buttonId":"2011691871017484289","name":"提交","code":"commit","icon":"ant-design:arrow-up-outlined","isDefault":false,"isUse":true,"setting":[],"showType":"top","buttonType":"primary"},{"buttonId":"2011687510413426691","name":"删除","code":"delete","icon":"ant-design:delete-outlined","isDefault":true,"isUse":true}]
return filterButtonAuth(list);
})
......@@ -154,7 +154,7 @@
return buttonConfigs.value?.filter((x) => actionButtons.value.includes(x.code));
});
const btnEvent = {view : handleView,add : handleAdd,print : handlePrint,export : handleExport,delete : handleDelete,}
const btnEvent = {view : handleView,add : handleAdd,edit : handleEdit,print : handlePrint,export : handleExport,delete : handleDelete,}
const { currentRoute } = useRouter();
......@@ -211,7 +211,7 @@
striped: false,
actionColumn: {
width: 130,
width: 195,
title: '操作',
dataIndex: 'action',
slots: { customRender: 'action' },
......@@ -242,6 +242,30 @@
}
async function handleEdit(record: Recordable) {
let field = 'id';
try {
let hasIn = handleHasEnableLocke(buttonConfigs.value, 'edit');
if (hasIn) {
let res = await handleOpenFormEnableLockeData(
record[field],
formIdComputedRef.value,
);
if (res !== null) {
return;
}
}
let info = {
id: record[field],
isUpdate: true,
};
openModal(true, info);
} catch (error) {}
}
......
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