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 {
ck: string;
gys: string;
zdr: string;
ywzz: string;
}
/**
......@@ -21,21 +25,17 @@ export interface MesWarehouseArrivedPageModel {
djrq: string;
crklx: string;
ck: 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;
}
......@@ -50,8 +50,6 @@ export interface MesWarehouseArrivedModel {
djh: string;
kczz: string;
djrq: string;
crklx: string;
......@@ -64,14 +62,14 @@ export interface MesWarehouseArrivedModel {
zdr: string;
ywzz: string;
fj: string;
bz: string;
zt: string;
cgzz: string;
p5: string;
p6: string;
......@@ -111,7 +109,9 @@ export interface MesWarehouseArrivedInfoModel {
wlmc: string;
ggxh: string;
gg: string;
xh: string;
dw: string;
......
......@@ -13,7 +13,16 @@ export const searchFormSchema: FormSchema[] = [
field: 'ck',
label: '仓库',
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',
......@@ -21,6 +30,32 @@ export const searchFormSchema: FormSchema[] = [
defaultValue: undefined,
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[] = [
......@@ -52,32 +87,6 @@ export const columns: BasicColumn[] = [
{
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',
title: '供应商',
componentType: 'input',
......@@ -91,48 +100,48 @@ export const columns: BasicColumn[] = [
{
resizable: true,
dataIndex: 'zdr',
title: '制单人',
componentType: 'input',
dataIndex: 'crklx',
title: '出入库类型',
componentType: 'select',
fixed: false,
sorter: true,
styleConfig: undefined,
listStyle: '',
listStyle: undefined,
},
{
resizable: true,
dataIndex: 'kczz',
title: '库存组织',
componentType: 'input',
dataIndex: 'zsl',
title: '总数量',
componentType: 'number',
fixed: false,
sorter: true,
styleConfig: undefined,
listStyle: '',
listStyle: undefined,
},
{
resizable: true,
dataIndex: 'cgzz',
title: '采购组织',
componentType: 'input',
dataIndex: 'ck',
title: '仓库',
componentType: 'select',
fixed: false,
sorter: true,
styleConfig: undefined,
listStyle: '',
listStyle: undefined,
},
{
resizable: true,
dataIndex: 'zsl',
title: '总数量',
componentType: 'number',
dataIndex: 'zdr',
title: '制单人',
componentType: 'user',
fixed: false,
sorter: true,
......@@ -143,8 +152,8 @@ export const columns: BasicColumn[] = [
{
resizable: true,
dataIndex: 'zt',
title: '质检状态',
dataIndex: 'ywzz',
title: '业务组织',
componentType: 'select',
fixed: false,
......@@ -320,35 +329,43 @@ export const formProps: FormProps = {
span: 8,
list: [
{
key: '8e7ab50fd3ee4849bdceebab4198a9f6',
key: 'cf825b8df185417fa8fa904fa8313dba',
field: 'crklx',
label: '出入库类型',
type: 'input',
component: 'Input',
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: '2010533622867509249' },
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: '2010533622867509249',
style: { width: '100%' },
},
},
......@@ -358,35 +375,43 @@ export const formProps: FormProps = {
span: 8,
list: [
{
key: '6c39c3b78f9448408de4342df16cc748',
key: '62df26a243614a71a1a42be4425bff71',
field: 'ck',
label: '仓库',
type: 'input',
component: 'Input',
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: '2010539474382962690' },
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: '2010539474382962690',
style: { width: '100%' },
},
},
......@@ -434,34 +459,27 @@ export const formProps: FormProps = {
span: 8,
list: [
{
key: '208ae8323f36498d8f7f03a332837637',
key: 'abf781fca11e4df9aea8ccab752fa7ce',
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%' },
},
......@@ -472,73 +490,43 @@ export const formProps: FormProps = {
span: 8,
list: [
{
key: '6d7e64828eeb46e7b7a10bcca6c50c16',
field: 'kczz',
label: '库存组织',
type: 'input',
component: 'Input',
key: '7a4182b8b8ee4a16b9e1ccda3dc71e4c',
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,
required: false,
rules: [],
events: {},
listStyle: '',
isSave: false,
isShow: true,
scan: false,
bordered: true,
isShowAi: false,
tooltipConfig: { visible: false, title: '提示文本' },
style: { width: '100%' },
},
},
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',
},
{
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,
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%' },
},
},
......@@ -548,57 +536,25 @@ export const formProps: FormProps = {
span: 8,
list: [
{
key: '94f59d97b377411fb1097853bd9479b0',
field: 'fj',
label: '上传附件',
type: 'upload',
component: 'Upload',
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',
key: '4ca80a2d3a8244bc8d3380b6b0457c25',
field: 'zsl',
label: '总数量',
type: 'number',
component: 'InputNumber',
colProps: { span: 24 },
defaultValue: '',
defaultValue: 0,
componentProps: {
width: '100%',
span: 2,
defaultValue: '',
placeholder: '请输入备注',
rows: 4,
autoSize: false,
showCount: false,
span: 7,
defaultValue: 0,
min: 0,
step: 1,
disabled: false,
showLabel: true,
allowClear: false,
controls: true,
required: false,
isShow: true,
isShowAi: false,
subTotal: false,
isShow: false,
rules: [],
events: {},
tooltipConfig: { visible: false, title: '提示文本' },
......@@ -646,45 +602,33 @@ export const formProps: FormProps = {
],
},
{
span: 8,
span: 24,
list: [
{
key: '8e9c97d8cc0e40c8b1a28183050df250',
field: 'zt',
label: '质检状态',
type: 'select',
component: 'XjrSelect',
key: '2adde8c1d7e24327874bec1411479ec8',
field: 'bz',
label: '备注',
type: 'textarea',
component: 'InputTextArea',
colProps: { span: 24 },
defaultValue: '',
componentProps: {
width: '100%',
span: 7,
placeholder: '请选择质检状态',
showLabel: true,
showSearch: false,
isMultiple: false,
clearable: false,
span: 2,
defaultValue: '',
placeholder: '请输入备注',
rows: 4,
autoSize: false,
showCount: 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' },
],
datasourceType: 'dic',
params: { itemId: '2012042307269611522' },
labelField: 'name',
valueField: 'value',
apiConfig: {
path: 'CodeGeneration/selection',
method: 'GET',
apiId: '93d735dcb7364a0f8102188ec4d77ac7',
},
dicOptions: [],
showLabel: true,
allowClear: false,
required: false,
isShow: true,
isShowAi: false,
rules: [],
events: {},
isShow: false,
tooltipConfig: { visible: false, title: '提示文本' },
itemId: '2012042307269611522',
style: { width: '100%' },
},
},
......@@ -694,29 +638,28 @@ export const formProps: FormProps = {
span: 8,
list: [
{
key: '4ca80a2d3a8244bc8d3380b6b0457c25',
field: 'zsl',
label: '总数量',
type: 'number',
component: 'InputNumber',
key: '94f59d97b377411fb1097853bd9479b0',
field: 'fj',
label: '上传附件',
type: 'upload',
component: 'Upload',
colProps: { span: 24 },
defaultValue: 0,
componentProps: {
width: '100%',
api: uploadApi,
span: 7,
defaultValue: 0,
min: 0,
step: 1,
disabled: false,
defaultValue: '',
accept: '',
maxNumber: 5,
maxSize: 5,
showLabel: true,
controls: true,
multiple: false,
disabled: false,
required: false,
subTotal: false,
isShow: false,
rules: [],
isShow: true,
events: {},
listType: 'text',
sourceType: 'album,camera',
tooltipConfig: { visible: false, title: '提示文本' },
style: { width: '100%' },
},
},
],
......@@ -872,8 +815,8 @@ export const formProps: FormProps = {
},
{
key: '0e6903d4d9014dcfae6b1cb666d448b7',
title: '规格型号',
dataIndex: 'ggxh',
title: '规格',
dataIndex: 'gg',
componentType: 'Input',
defaultValue: '',
componentProps: {
......@@ -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',
title: '单位',
dataIndex: 'dw',
......
......@@ -44,11 +44,10 @@ export const permissionList = [
fieldId: 'crklx',
isSubTable: false,
showChildren: true,
type: 'input',
key: '8e7ab50fd3ee4849bdceebab4198a9f6',
type: 'select',
key: 'cf825b8df185417fa8fa904fa8313dba',
children: [],
options: {},
defaultValue: '',
},
{
required: false,
......@@ -61,11 +60,10 @@ export const permissionList = [
fieldId: 'ck',
isSubTable: false,
showChildren: true,
type: 'input',
key: '6c39c3b78f9448408de4342df16cc748',
type: 'select',
key: '62df26a243614a71a1a42be4425bff71',
children: [],
options: {},
defaultValue: '',
},
{
required: false,
......@@ -95,8 +93,8 @@ export const permissionList = [
fieldId: 'zdr',
isSubTable: false,
showChildren: true,
type: 'input',
key: '208ae8323f36498d8f7f03a332837637',
type: 'user',
key: 'abf781fca11e4df9aea8ccab752fa7ce',
children: [],
options: {},
defaultValue: '',
......@@ -108,15 +106,14 @@ export const permissionList = [
disabled: false,
isSaveTable: false,
tableName: '',
fieldName: '库存组织',
fieldId: 'kczz',
fieldName: '业务组织',
fieldId: 'ywzz',
isSubTable: false,
showChildren: true,
type: 'input',
key: '6d7e64828eeb46e7b7a10bcca6c50c16',
type: 'select',
key: '7a4182b8b8ee4a16b9e1ccda3dc71e4c',
children: [],
options: {},
defaultValue: '',
},
{
required: false,
......@@ -125,15 +122,15 @@ export const permissionList = [
disabled: false,
isSaveTable: false,
tableName: '',
fieldName: '采购组织',
fieldId: 'cgzz',
fieldName: '总数量',
fieldId: 'zsl',
isSubTable: false,
showChildren: true,
type: 'input',
key: '8b55245dd1cb473193b7302da6ec35be',
type: 'number',
key: '4ca80a2d3a8244bc8d3380b6b0457c25',
children: [],
options: {},
defaultValue: '',
defaultValue: 0,
},
{
required: false,
......@@ -142,12 +139,12 @@ export const permissionList = [
disabled: false,
isSaveTable: false,
tableName: '',
fieldName: '上传附件',
fieldId: 'fj',
fieldName: 'Id',
fieldId: 'id',
isSubTable: false,
showChildren: true,
type: 'upload',
key: '94f59d97b377411fb1097853bd9479b0',
type: 'input',
key: '139048460226487596074dfbbaedba0c',
children: [],
options: {},
defaultValue: '',
......@@ -176,50 +173,17 @@ export const permissionList = [
disabled: false,
isSaveTable: false,
tableName: '',
fieldName: 'Id',
fieldId: 'id',
fieldName: '上传附件',
fieldId: 'fj',
isSubTable: false,
showChildren: true,
type: 'input',
key: '139048460226487596074dfbbaedba0c',
type: 'upload',
key: '94f59d97b377411fb1097853bd9479b0',
children: [],
options: {},
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,
view: true,
edit: true,
......@@ -301,8 +265,8 @@ export const permissionList = [
isSaveTable: false,
showChildren: false,
tableName: 'mesWarehouseArrivedInfoList',
fieldName: '规格型号',
fieldId: 'ggxh',
fieldName: '规格',
fieldId: 'gg',
type: 'Input',
key: '0e6903d4d9014dcfae6b1cb666d448b7',
children: [],
......@@ -316,6 +280,21 @@ export const permissionList = [
isSaveTable: false,
showChildren: false,
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: '单位',
fieldId: 'dw',
type: 'Input',
......
......@@ -72,7 +72,6 @@
import CustomButtonModal from '/@/components/Form/src/components/CustomButtonModal.vue';
import { executeListStyle, getValue } from '/@/hooks/web/useListStyle';//列表样式配置
import { useRouter } from 'vue-router';
import { useUserStore } from '/@/store/modules/user';
......@@ -130,9 +129,9 @@
//展示在列表内的按钮
const actionButtons = ref<string[]>(["view","edit","create"]);
const actionButtons = ref<string[]>(["view","edit"]);
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);
})
......@@ -144,7 +143,7 @@
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();
......@@ -201,7 +200,7 @@
striped: false,
actionColumn: {
width: 195,
width: 130,
title: '操作',
dataIndex: 'action',
slots: { customRender: 'action' },
......@@ -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) {
let list = getActions(record);
......@@ -371,27 +333,6 @@
let actionsList: ActionItem[] = [];
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) {
record.isCanEdit = true;
actionsList.push({
......@@ -405,13 +346,13 @@
} else {
if (!['edit', 'delete'].includes(button.code)) {
actionsList.push({
auth: `cgdh:${button.code}`,
label: button?.name,
onClick: btnEvent[button.code]?.bind(null, record),
});
}
}
}
});
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