Commit b1c622b8 by 张珈源

feat(ckgl/cgdh): 优化采购到货模块功能

- 在CgdhModel中新增zdr(制单人)和ywzz(业务组织)字段
- 移除kczz(库存组织)、cgzz(采购组织)和zt(质检状态)字段
- 将ggxh(规格型号)拆分为gg(规格)和xh(型号)两个独立字段
- 更新仓库字段组件为XjrSelect并配置字典数据源
- 新增制单人字段使用User组件并配置相关属性
- 新增业务组织字段使用XjrSelect组件并配置字典数据源
- 调整列配置将出入库类型改为select组件
- 调整列配置将仓库改为select组件
- 调整列配置将制单人改为user组件
- 调整列配置将总数量改为number组件
- 调整列配置将质检状态替换为业务组织字段
- 更新表单布局配置中的组件类型和属性设置
- 移除操作按钮中的生成入库单(create)功能
- 减少操作列宽度从195到130
- 移除handleCreate方法及相关的HTTP请求逻辑
- 简化按钮显示逻辑移除质检状态相关的控制代码
- 更新工作流权限配置文件中的字段映射关系
parent 2cdedebe
...@@ -9,6 +9,10 @@ export interface MesWarehouseArrivedPageParams extends BasicPageParams { ...@@ -9,6 +9,10 @@ export interface MesWarehouseArrivedPageParams extends BasicPageParams {
ck: string; ck: string;
gys: string; gys: string;
zdr: string;
ywzz: string;
} }
/** /**
...@@ -21,21 +25,17 @@ export interface MesWarehouseArrivedPageModel { ...@@ -21,21 +25,17 @@ export interface MesWarehouseArrivedPageModel {
djrq: string; djrq: string;
crklx: string;
ck: string;
gys: string; gys: string;
zdr: string; crklx: string;
kczz: string; zsl: string;
cgzz: string; ck: string;
zsl: string; zdr: string;
zt: string; ywzz: string;
bz: string; bz: string;
} }
...@@ -50,8 +50,6 @@ export interface MesWarehouseArrivedModel { ...@@ -50,8 +50,6 @@ export interface MesWarehouseArrivedModel {
djh: string; djh: string;
kczz: string;
djrq: string; djrq: string;
crklx: string; crklx: string;
...@@ -64,14 +62,14 @@ export interface MesWarehouseArrivedModel { ...@@ -64,14 +62,14 @@ export interface MesWarehouseArrivedModel {
zdr: string; zdr: string;
ywzz: string;
fj: string; fj: string;
bz: string; bz: string;
zt: string; zt: string;
cgzz: string;
p5: string; p5: string;
p6: string; p6: string;
...@@ -111,7 +109,9 @@ export interface MesWarehouseArrivedInfoModel { ...@@ -111,7 +109,9 @@ export interface MesWarehouseArrivedInfoModel {
wlmc: string; wlmc: string;
ggxh: string; gg: string;
xh: string;
dw: string; dw: string;
......
...@@ -13,7 +13,16 @@ export const searchFormSchema: FormSchema[] = [ ...@@ -13,7 +13,16 @@ export const searchFormSchema: FormSchema[] = [
field: 'ck', field: 'ck',
label: '仓库', label: '仓库',
defaultValue: undefined, defaultValue: undefined,
component: 'Input', component: 'XjrSelect',
componentProps: {
datasourceType: 'dic',
params: { itemId: '2010539474382962690' },
labelField: 'name',
valueField: 'value',
mode: 'multiple',
showSearch: true,
getPopupContainer: () => document.body,
},
}, },
{ {
field: 'gys', field: 'gys',
...@@ -21,6 +30,32 @@ export const searchFormSchema: FormSchema[] = [ ...@@ -21,6 +30,32 @@ export const searchFormSchema: FormSchema[] = [
defaultValue: undefined, defaultValue: undefined,
component: 'Input', component: 'Input',
}, },
{
field: 'zdr',
label: '制单人',
defaultValue: undefined,
component: 'User',
componentProps: {
suffix: 'ant-design:setting-outlined',
placeholder: '请选择',
},
},
{
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[] = [ export const columns: BasicColumn[] = [
...@@ -52,32 +87,6 @@ export const columns: BasicColumn[] = [ ...@@ -52,32 +87,6 @@ export const columns: BasicColumn[] = [
{ {
resizable: true, resizable: true,
dataIndex: 'crklx',
title: '出入库类型',
componentType: 'input',
fixed: false,
sorter: true,
styleConfig: undefined,
listStyle: '',
},
{
resizable: true,
dataIndex: 'ck',
title: '仓库',
componentType: 'input',
fixed: false,
sorter: true,
styleConfig: undefined,
listStyle: '',
},
{
resizable: true,
dataIndex: 'gys', dataIndex: 'gys',
title: '供应商', title: '供应商',
componentType: 'input', componentType: 'input',
...@@ -91,48 +100,48 @@ export const columns: BasicColumn[] = [ ...@@ -91,48 +100,48 @@ export const columns: BasicColumn[] = [
{ {
resizable: true, resizable: true,
dataIndex: 'zdr', dataIndex: 'crklx',
title: '制单人', title: '出入库类型',
componentType: 'input', componentType: 'select',
fixed: false, fixed: false,
sorter: true, sorter: true,
styleConfig: undefined, styleConfig: undefined,
listStyle: '', listStyle: undefined,
}, },
{ {
resizable: true, resizable: true,
dataIndex: 'kczz', dataIndex: 'zsl',
title: '库存组织', title: '总数量',
componentType: 'input', componentType: 'number',
fixed: false, fixed: false,
sorter: true, sorter: true,
styleConfig: undefined, styleConfig: undefined,
listStyle: '', listStyle: undefined,
}, },
{ {
resizable: true, resizable: true,
dataIndex: 'cgzz', dataIndex: 'ck',
title: '采购组织', title: '仓库',
componentType: 'input', componentType: 'select',
fixed: false, fixed: false,
sorter: true, sorter: true,
styleConfig: undefined, styleConfig: undefined,
listStyle: '', listStyle: undefined,
}, },
{ {
resizable: true, resizable: true,
dataIndex: 'zsl', dataIndex: 'zdr',
title: '总数量', title: '制单人',
componentType: 'number', componentType: 'user',
fixed: false, fixed: false,
sorter: true, sorter: true,
...@@ -143,8 +152,8 @@ export const columns: BasicColumn[] = [ ...@@ -143,8 +152,8 @@ export const columns: BasicColumn[] = [
{ {
resizable: true, resizable: true,
dataIndex: 'zt', dataIndex: 'ywzz',
title: '质检状态', title: '业务组织',
componentType: 'select', componentType: 'select',
fixed: false, fixed: false,
...@@ -320,35 +329,43 @@ export const formProps: FormProps = { ...@@ -320,35 +329,43 @@ export const formProps: FormProps = {
span: 8, span: 8,
list: [ list: [
{ {
key: '8e7ab50fd3ee4849bdceebab4198a9f6', key: 'cf825b8df185417fa8fa904fa8313dba',
field: 'crklx', field: 'crklx',
label: '出入库类型', label: '出入库类型',
type: 'input', type: 'select',
component: 'Input', component: 'XjrSelect',
colProps: { span: 24 }, colProps: { span: 24 },
defaultValue: '',
componentProps: { componentProps: {
width: '100%', width: '100%',
span: 7, span: 7,
defaultValue: '', placeholder: '请选择出入库类型',
placeholder: '',
prefix: '',
suffix: '',
addonBefore: '',
addonAfter: '',
disabled: false,
allowClear: false,
showLabel: true, 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: '2010533622867509249' },
labelField: 'name',
valueField: 'value',
apiConfig: {
path: 'CodeGeneration/selection',
method: 'GET',
apiId: '93d735dcb7364a0f8102188ec4d77ac7',
},
dicOptions: [],
required: false, required: false,
rules: [], rules: [],
events: {}, events: {},
listStyle: '',
isSave: false,
isShow: true, isShow: true,
scan: false,
bordered: true,
isShowAi: false,
tooltipConfig: { visible: false, title: '提示文本' }, tooltipConfig: { visible: false, title: '提示文本' },
itemId: '2010533622867509249',
style: { width: '100%' }, style: { width: '100%' },
}, },
}, },
...@@ -358,35 +375,43 @@ export const formProps: FormProps = { ...@@ -358,35 +375,43 @@ export const formProps: FormProps = {
span: 8, span: 8,
list: [ list: [
{ {
key: '6c39c3b78f9448408de4342df16cc748', key: '62df26a243614a71a1a42be4425bff71',
field: 'ck', field: 'ck',
label: '仓库', label: '仓库',
type: 'input', type: 'select',
component: 'Input', component: 'XjrSelect',
colProps: { span: 24 }, colProps: { span: 24 },
defaultValue: '',
componentProps: { componentProps: {
width: '100%', width: '100%',
span: 7, span: 7,
defaultValue: '', placeholder: '请选择仓库',
placeholder: '',
prefix: '',
suffix: '',
addonBefore: '',
addonAfter: '',
disabled: false,
allowClear: false,
showLabel: true, 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: '2010539474382962690' },
labelField: 'name',
valueField: 'value',
apiConfig: {
path: 'CodeGeneration/selection',
method: 'GET',
apiId: '93d735dcb7364a0f8102188ec4d77ac7',
},
dicOptions: [],
required: false, required: false,
rules: [], rules: [],
events: {}, events: {},
listStyle: '',
isSave: false,
isShow: true, isShow: true,
scan: false,
bordered: true,
isShowAi: false,
tooltipConfig: { visible: false, title: '提示文本' }, tooltipConfig: { visible: false, title: '提示文本' },
itemId: '2010539474382962690',
style: { width: '100%' }, style: { width: '100%' },
}, },
}, },
...@@ -434,34 +459,27 @@ export const formProps: FormProps = { ...@@ -434,34 +459,27 @@ export const formProps: FormProps = {
span: 8, span: 8,
list: [ list: [
{ {
key: '208ae8323f36498d8f7f03a332837637', key: 'abf781fca11e4df9aea8ccab752fa7ce',
field: 'zdr', field: 'zdr',
label: '制单人', label: '制单人',
type: 'input', type: 'user',
component: 'Input', component: 'User',
colProps: { span: 24 }, colProps: { span: 24 },
defaultValue: '', defaultValue: '',
componentProps: { componentProps: {
width: '100%',
span: 7, span: 7,
width: '100%',
defaultValue: '', defaultValue: '',
placeholder: '', placeholder: '请选择制单人',
userType: 0,
prefix: '', prefix: '',
suffix: '', suffix: '',
addonBefore: '',
addonAfter: '',
disabled: false,
allowClear: false,
showLabel: true, showLabel: true,
disabled: false,
required: false, required: false,
rules: [], multiple: true,
events: {},
listStyle: '',
isSave: false,
isShow: true, isShow: true,
scan: false, events: {},
bordered: true,
isShowAi: false,
tooltipConfig: { visible: false, title: '提示文本' }, tooltipConfig: { visible: false, title: '提示文本' },
style: { width: '100%' }, style: { width: '100%' },
}, },
...@@ -472,73 +490,43 @@ export const formProps: FormProps = { ...@@ -472,73 +490,43 @@ export const formProps: FormProps = {
span: 8, span: 8,
list: [ list: [
{ {
key: '6d7e64828eeb46e7b7a10bcca6c50c16', key: '7a4182b8b8ee4a16b9e1ccda3dc71e4c',
field: 'kczz', field: 'ywzz',
label: '库存组织', label: '业务组织',
type: 'input', type: 'select',
component: 'Input', component: 'XjrSelect',
colProps: { span: 24 }, colProps: { span: 24 },
defaultValue: '',
componentProps: { componentProps: {
width: '100%', width: '100%',
span: 7, span: 7,
defaultValue: '', placeholder: '请选择业务组织',
placeholder: '',
prefix: '',
suffix: '',
addonBefore: '',
addonAfter: '',
disabled: false,
allowClear: false,
showLabel: true, showLabel: true,
required: false, showSearch: false,
rules: [], isMultiple: false,
events: {}, clearable: false,
listStyle: '', disabled: false,
isSave: false, staticOptions: [
isShow: true, { key: 1, label: 'Option 1', value: 'Option 1' },
scan: false, { key: 2, label: 'Option 2', value: 'Option 2' },
bordered: true, { key: 3, label: 'Option 3', value: 'Option 3' },
isShowAi: false,
tooltipConfig: { visible: false, title: '提示文本' },
style: { width: '100%' },
},
},
], ],
defaultSelect: null,
datasourceType: 'dic',
params: { itemId: '2015724355955159041' },
labelField: 'name',
valueField: 'value',
apiConfig: {
path: 'CodeGeneration/selection',
method: 'GET',
apiId: '93d735dcb7364a0f8102188ec4d77ac7',
}, },
{ dicOptions: [],
span: 8,
list: [
{
key: '8b55245dd1cb473193b7302da6ec35be',
field: 'cgzz',
label: '采购组织',
type: 'input',
component: 'Input',
colProps: { span: 24 },
defaultValue: '',
componentProps: {
width: '100%',
span: 7,
defaultValue: '',
placeholder: '请输入采购组织',
prefix: '',
suffix: '',
addonBefore: '',
addonAfter: '',
disabled: false,
allowClear: false,
showLabel: true,
required: false, required: false,
rules: [], rules: [],
events: {}, events: {},
listStyle: '',
isSave: false,
isShow: true, isShow: true,
scan: false,
bordered: true,
isShowAi: false,
tooltipConfig: { visible: false, title: '提示文本' }, tooltipConfig: { visible: false, title: '提示文本' },
itemId: '2015724355955159041',
style: { width: '100%' }, style: { width: '100%' },
}, },
}, },
...@@ -548,57 +536,25 @@ export const formProps: FormProps = { ...@@ -548,57 +536,25 @@ export const formProps: FormProps = {
span: 8, span: 8,
list: [ list: [
{ {
key: '94f59d97b377411fb1097853bd9479b0', key: '4ca80a2d3a8244bc8d3380b6b0457c25',
field: 'fj', field: 'zsl',
label: '上传附件', label: '总数量',
type: 'upload', type: 'number',
component: 'Upload', component: 'InputNumber',
colProps: { span: 24 },
componentProps: {
api: uploadApi,
span: 7,
defaultValue: '',
accept: '',
maxNumber: 5,
maxSize: 5,
showLabel: true,
multiple: false,
disabled: false,
required: false,
isShow: true,
events: {},
listType: 'text',
sourceType: 'album,camera',
tooltipConfig: { visible: false, title: '提示文本' },
},
},
],
},
{
span: 24,
list: [
{
key: '2adde8c1d7e24327874bec1411479ec8',
field: 'bz',
label: '备注',
type: 'textarea',
component: 'InputTextArea',
colProps: { span: 24 }, colProps: { span: 24 },
defaultValue: '', defaultValue: 0,
componentProps: { componentProps: {
width: '100%', width: '100%',
span: 2, span: 7,
defaultValue: '', defaultValue: 0,
placeholder: '请输入备注', min: 0,
rows: 4, step: 1,
autoSize: false,
showCount: false,
disabled: false, disabled: false,
showLabel: true, showLabel: true,
allowClear: false, controls: true,
required: false, required: false,
isShow: true, subTotal: false,
isShowAi: false, isShow: false,
rules: [], rules: [],
events: {}, events: {},
tooltipConfig: { visible: false, title: '提示文本' }, tooltipConfig: { visible: false, title: '提示文本' },
...@@ -646,45 +602,33 @@ export const formProps: FormProps = { ...@@ -646,45 +602,33 @@ export const formProps: FormProps = {
], ],
}, },
{ {
span: 8, span: 24,
list: [ list: [
{ {
key: '8e9c97d8cc0e40c8b1a28183050df250', key: '2adde8c1d7e24327874bec1411479ec8',
field: 'zt', field: 'bz',
label: '质检状态', label: '备注',
type: 'select', type: 'textarea',
component: 'XjrSelect', component: 'InputTextArea',
colProps: { span: 24 }, colProps: { span: 24 },
defaultValue: '',
componentProps: { componentProps: {
width: '100%', width: '100%',
span: 7, span: 2,
placeholder: '请选择质检状态', defaultValue: '',
showLabel: true, placeholder: '请输入备注',
showSearch: false, rows: 4,
isMultiple: false, autoSize: false,
clearable: false, showCount: false,
disabled: false, disabled: false,
staticOptions: [ showLabel: true,
{ key: 1, label: 'Option 1', value: 'Option 1' }, allowClear: false,
{ key: 2, label: 'Option 2', value: 'Option 2' },
{ key: 3, label: 'Option 3', value: 'Option 3' },
],
datasourceType: 'dic',
params: { itemId: '2012042307269611522' },
labelField: 'name',
valueField: 'value',
apiConfig: {
path: 'CodeGeneration/selection',
method: 'GET',
apiId: '93d735dcb7364a0f8102188ec4d77ac7',
},
dicOptions: [],
required: false, required: false,
isShow: true,
isShowAi: false,
rules: [], rules: [],
events: {}, events: {},
isShow: false,
tooltipConfig: { visible: false, title: '提示文本' }, tooltipConfig: { visible: false, title: '提示文本' },
itemId: '2012042307269611522',
style: { width: '100%' }, style: { width: '100%' },
}, },
}, },
...@@ -694,29 +638,28 @@ export const formProps: FormProps = { ...@@ -694,29 +638,28 @@ export const formProps: FormProps = {
span: 8, span: 8,
list: [ list: [
{ {
key: '4ca80a2d3a8244bc8d3380b6b0457c25', key: '94f59d97b377411fb1097853bd9479b0',
field: 'zsl', field: 'fj',
label: '总数量', label: '上传附件',
type: 'number', type: 'upload',
component: 'InputNumber', component: 'Upload',
colProps: { span: 24 }, colProps: { span: 24 },
defaultValue: 0,
componentProps: { componentProps: {
width: '100%', api: uploadApi,
span: 7, span: 7,
defaultValue: 0, defaultValue: '',
min: 0, accept: '',
step: 1, maxNumber: 5,
disabled: false, maxSize: 5,
showLabel: true, showLabel: true,
controls: true, multiple: false,
disabled: false,
required: false, required: false,
subTotal: false, isShow: true,
isShow: false,
rules: [],
events: {}, events: {},
listType: 'text',
sourceType: 'album,camera',
tooltipConfig: { visible: false, title: '提示文本' }, tooltipConfig: { visible: false, title: '提示文本' },
style: { width: '100%' },
}, },
}, },
], ],
...@@ -872,8 +815,8 @@ export const formProps: FormProps = { ...@@ -872,8 +815,8 @@ export const formProps: FormProps = {
}, },
{ {
key: '0e6903d4d9014dcfae6b1cb666d448b7', key: '0e6903d4d9014dcfae6b1cb666d448b7',
title: '规格型号', title: '规格',
dataIndex: 'ggxh', dataIndex: 'gg',
componentType: 'Input', componentType: 'Input',
defaultValue: '', defaultValue: '',
componentProps: { componentProps: {
...@@ -902,6 +845,37 @@ export const formProps: FormProps = { ...@@ -902,6 +845,37 @@ export const formProps: FormProps = {
}, },
}, },
{ {
key: '63ed4d83c8bc4858872435c676ca8eb7',
title: '型号',
dataIndex: 'xh',
componentType: 'Input',
defaultValue: '',
componentProps: {
width: '100%',
span: '',
defaultValue: '',
placeholder: '',
maxlength: null,
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: '4301478a5ef2448abdfdeee629297fbf', key: '4301478a5ef2448abdfdeee629297fbf',
title: '单位', title: '单位',
dataIndex: 'dw', dataIndex: 'dw',
......
...@@ -44,11 +44,10 @@ export const permissionList = [ ...@@ -44,11 +44,10 @@ export const permissionList = [
fieldId: 'crklx', fieldId: 'crklx',
isSubTable: false, isSubTable: false,
showChildren: true, showChildren: true,
type: 'input', type: 'select',
key: '8e7ab50fd3ee4849bdceebab4198a9f6', key: 'cf825b8df185417fa8fa904fa8313dba',
children: [], children: [],
options: {}, options: {},
defaultValue: '',
}, },
{ {
required: false, required: false,
...@@ -61,11 +60,10 @@ export const permissionList = [ ...@@ -61,11 +60,10 @@ export const permissionList = [
fieldId: 'ck', fieldId: 'ck',
isSubTable: false, isSubTable: false,
showChildren: true, showChildren: true,
type: 'input', type: 'select',
key: '6c39c3b78f9448408de4342df16cc748', key: '62df26a243614a71a1a42be4425bff71',
children: [], children: [],
options: {}, options: {},
defaultValue: '',
}, },
{ {
required: false, required: false,
...@@ -95,8 +93,8 @@ export const permissionList = [ ...@@ -95,8 +93,8 @@ export const permissionList = [
fieldId: 'zdr', fieldId: 'zdr',
isSubTable: false, isSubTable: false,
showChildren: true, showChildren: true,
type: 'input', type: 'user',
key: '208ae8323f36498d8f7f03a332837637', key: 'abf781fca11e4df9aea8ccab752fa7ce',
children: [], children: [],
options: {}, options: {},
defaultValue: '', defaultValue: '',
...@@ -108,15 +106,14 @@ export const permissionList = [ ...@@ -108,15 +106,14 @@ export const permissionList = [
disabled: false, disabled: false,
isSaveTable: false, isSaveTable: false,
tableName: '', tableName: '',
fieldName: '库存组织', fieldName: '业务组织',
fieldId: 'kczz', fieldId: 'ywzz',
isSubTable: false, isSubTable: false,
showChildren: true, showChildren: true,
type: 'input', type: 'select',
key: '6d7e64828eeb46e7b7a10bcca6c50c16', key: '7a4182b8b8ee4a16b9e1ccda3dc71e4c',
children: [], children: [],
options: {}, options: {},
defaultValue: '',
}, },
{ {
required: false, required: false,
...@@ -125,15 +122,15 @@ export const permissionList = [ ...@@ -125,15 +122,15 @@ export const permissionList = [
disabled: false, disabled: false,
isSaveTable: false, isSaveTable: false,
tableName: '', tableName: '',
fieldName: '采购组织', fieldName: '总数量',
fieldId: 'cgzz', fieldId: 'zsl',
isSubTable: false, isSubTable: false,
showChildren: true, showChildren: true,
type: 'input', type: 'number',
key: '8b55245dd1cb473193b7302da6ec35be', key: '4ca80a2d3a8244bc8d3380b6b0457c25',
children: [], children: [],
options: {}, options: {},
defaultValue: '', defaultValue: 0,
}, },
{ {
required: false, required: false,
...@@ -142,12 +139,12 @@ export const permissionList = [ ...@@ -142,12 +139,12 @@ export const permissionList = [
disabled: false, disabled: false,
isSaveTable: false, isSaveTable: false,
tableName: '', tableName: '',
fieldName: '上传附件', fieldName: 'Id',
fieldId: 'fj', fieldId: 'id',
isSubTable: false, isSubTable: false,
showChildren: true, showChildren: true,
type: 'upload', type: 'input',
key: '94f59d97b377411fb1097853bd9479b0', key: '139048460226487596074dfbbaedba0c',
children: [], children: [],
options: {}, options: {},
defaultValue: '', defaultValue: '',
...@@ -176,50 +173,17 @@ export const permissionList = [ ...@@ -176,50 +173,17 @@ export const permissionList = [
disabled: false, disabled: false,
isSaveTable: false, isSaveTable: false,
tableName: '', tableName: '',
fieldName: 'Id', fieldName: '上传附件',
fieldId: 'id', fieldId: 'fj',
isSubTable: false, isSubTable: false,
showChildren: true, showChildren: true,
type: 'input', type: 'upload',
key: '139048460226487596074dfbbaedba0c', key: '94f59d97b377411fb1097853bd9479b0',
children: [], children: [],
options: {}, options: {},
defaultValue: '', defaultValue: '',
}, },
{ {
required: false,
view: true,
edit: true,
disabled: false,
isSaveTable: false,
tableName: '',
fieldName: '质检状态',
fieldId: 'zt',
isSubTable: false,
showChildren: true,
type: 'select',
key: '8e9c97d8cc0e40c8b1a28183050df250',
children: [],
options: {},
},
{
required: false,
view: true,
edit: true,
disabled: false,
isSaveTable: false,
tableName: '',
fieldName: '总数量',
fieldId: 'zsl',
isSubTable: false,
showChildren: true,
type: 'number',
key: '4ca80a2d3a8244bc8d3380b6b0457c25',
children: [],
options: {},
defaultValue: 0,
},
{
required: true, required: true,
view: true, view: true,
edit: true, edit: true,
...@@ -301,8 +265,8 @@ export const permissionList = [ ...@@ -301,8 +265,8 @@ export const permissionList = [
isSaveTable: false, isSaveTable: false,
showChildren: false, showChildren: false,
tableName: 'mesWarehouseArrivedInfoList', tableName: 'mesWarehouseArrivedInfoList',
fieldName: '规格型号', fieldName: '规格',
fieldId: 'ggxh', fieldId: 'gg',
type: 'Input', type: 'Input',
key: '0e6903d4d9014dcfae6b1cb666d448b7', key: '0e6903d4d9014dcfae6b1cb666d448b7',
children: [], children: [],
...@@ -316,6 +280,21 @@ export const permissionList = [ ...@@ -316,6 +280,21 @@ export const permissionList = [
isSaveTable: false, isSaveTable: false,
showChildren: false, showChildren: false,
tableName: 'mesWarehouseArrivedInfoList', tableName: 'mesWarehouseArrivedInfoList',
fieldName: '型号',
fieldId: 'xh',
type: 'Input',
key: '63ed4d83c8bc4858872435c676ca8eb7',
children: [],
},
{
required: true,
view: true,
edit: true,
disabled: false,
isSubTable: false,
isSaveTable: false,
showChildren: false,
tableName: 'mesWarehouseArrivedInfoList',
fieldName: '单位', fieldName: '单位',
fieldId: 'dw', fieldId: 'dw',
type: 'Input', type: 'Input',
......
...@@ -72,7 +72,6 @@ ...@@ -72,7 +72,6 @@
import CustomButtonModal from '/@/components/Form/src/components/CustomButtonModal.vue'; import CustomButtonModal from '/@/components/Form/src/components/CustomButtonModal.vue';
import { executeListStyle, getValue } from '/@/hooks/web/useListStyle';//列表样式配置 import { executeListStyle, getValue } from '/@/hooks/web/useListStyle';//列表样式配置
import { useRouter } from 'vue-router'; import { useRouter } from 'vue-router';
import { useUserStore } from '/@/store/modules/user';
...@@ -130,9 +129,9 @@ ...@@ -130,9 +129,9 @@
//展示在列表内的按钮 //展示在列表内的按钮
const actionButtons = ref<string[]>(["view","edit","create"]); const actionButtons = ref<string[]>(["view","edit"]);
const buttonConfigs = computed(()=>{ const buttonConfigs = computed(()=>{
const list = [{"buttonId":"2009445983314264064","name":"查看","code":"view","icon":"ant-design:eye-outlined","isDefault":true,"isUse":true},{"buttonId":"2009445983314264065","name":"新增","code":"add","icon":"ant-design:plus-outlined","isDefault":true,"isUse":true},{"buttonId":"2009445983314264066","name":"编辑","code":"edit","icon":"ant-design:form-outlined","isDefault":true,"isUse":true,"isEnableLock":true},{"buttonId":"2009478676487966720","name":"同步","code":"get","icon":"ant-design:arrow-down-outlined","isDefault":false,"isUse":true,"setting":[],"showType":"top","buttonType":"primary"},{"buttonId":"2012037219988561920","name":"生成入库单","code":"create","icon":"ant-design:download-outlined","isDefault":false,"isUse":true,"setting":[],"showType":"inline","buttonType":"primary"}] const list = [{"buttonId":"2009445983314264064","name":"查看","code":"view","icon":"ant-design:eye-outlined","isDefault":true,"isUse":true},{"buttonId":"2009445983314264065","name":"新增","code":"add","icon":"ant-design:plus-outlined","isDefault":true,"isUse":true},{"buttonId":"2009445983314264066","name":"编辑","code":"edit","icon":"ant-design:form-outlined","isDefault":true,"isUse":true,"isEnableLock":true},{"buttonId":"2009478676487966720","name":"同步","code":"get","icon":"ant-design:arrow-down-outlined","isDefault":false,"isUse":true,"setting":[],"showType":"top","buttonType":"primary"}]
return filterButtonAuth(list); return filterButtonAuth(list);
}) })
...@@ -144,7 +143,7 @@ ...@@ -144,7 +143,7 @@
return buttonConfigs.value?.filter((x) => actionButtons.value.includes(x.code)); return buttonConfigs.value?.filter((x) => actionButtons.value.includes(x.code));
}); });
const btnEvent = {view : handleView,edit : handleEdit,create : handleCreate,add : handleAdd} const btnEvent = {view : handleView,add : handleAdd,edit : handleEdit,}
const { currentRoute } = useRouter(); const { currentRoute } = useRouter();
...@@ -201,7 +200,7 @@ ...@@ -201,7 +200,7 @@
striped: false, striped: false,
actionColumn: { actionColumn: {
width: 195, width: 130,
title: '操作', title: '操作',
dataIndex: 'action', dataIndex: 'action',
slots: { customRender: 'action' }, slots: { customRender: 'action' },
...@@ -319,44 +318,7 @@ ...@@ -319,44 +318,7 @@
} }
async function handleCreate(record: Recordable) {
try {
// 获取token\
const store = useUserStore();
let token = store.token
// 调用后端接口
const response = await fetch('http://localhost:8053/ckgl/cgrk', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer ' + token, // 添加token到请求头
},
body: JSON.stringify(record), // 将当前行数据作为参数传递
});
if (response.ok) {
const result = await response.json();
notification.success({
message: '操作成功',
description: '生成入库单成功',
});
// 刷新表格数据
reload();
} else {
const error = await response.json();
notification.error({
message: '操作失败',
description: error.message || '生成入库单失败',
});
}
} catch (error) {
notification.error({
message: '操作失败',
description: '网络错误,请稍后重试',
});
}
}
function getLessActions(record: Recordable) { function getLessActions(record: Recordable) {
let list = getActions(record); let list = getActions(record);
...@@ -371,27 +333,6 @@ ...@@ -371,27 +333,6 @@
let actionsList: ActionItem[] = []; let actionsList: ActionItem[] = [];
actionButtonConfig.value?.map((button) => { actionButtonConfig.value?.map((button) => {
// 检查是否应该显示当前按钮
let shouldShowButton = true;
// 控制create按钮的显示/隐藏
if (button.code === 'create') {
// 质检状态为"草稿"或"已质检"时隐藏
if (record.zt === '草稿' || record.zt === '已质检') {
shouldShowButton = false;
}
// 质检状态为"质检合格"或"质检不合格"时显示
else if (record.zt === '质检合格' || record.zt === '质检不合格') {
shouldShowButton = true;
}
// 其他状态默认隐藏
else {
shouldShowButton = false;
}
}
// 如果按钮应该显示,则继续处理
if (shouldShowButton) {
if (!record?.workflowData?.processId) { if (!record?.workflowData?.processId) {
record.isCanEdit = true; record.isCanEdit = true;
actionsList.push({ actionsList.push({
...@@ -405,13 +346,13 @@ ...@@ -405,13 +346,13 @@
} else { } else {
if (!['edit', 'delete'].includes(button.code)) { if (!['edit', 'delete'].includes(button.code)) {
actionsList.push({ actionsList.push({
auth: `cgdh:${button.code}`, auth: `cgdh:${button.code}`,
label: button?.name, label: button?.name,
onClick: btnEvent[button.code]?.bind(null, record), onClick: btnEvent[button.code]?.bind(null, record),
}); });
} }
} }
}
}); });
return actionsList; return actionsList;
} }
......
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