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;
......
...@@ -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