Commit b4a6d91e by 张恒

feat(ccmx): 优化出入库管理模块功能

- 在CcmxModel模型中新增ywzz字段,调整zjzt和rkzt字段位置
- 配置文件中新增业务组织、质检状态筛选条件和表格列
- 新增入库申请和质检申请API接口及对应函数
- 页面中集成行选择功能和入库质检申请按钮
- 更新工作流权限配置中的字段映射关系
- 调整表格操作列宽度以适应多按钮显示
- 完善入库申请和质检申请的业务处理逻辑
parent 371832af
...@@ -8,7 +8,8 @@ enum Api { ...@@ -8,7 +8,8 @@ enum Api {
List = '/scgl/ccmx/list', List = '/scgl/ccmx/list',
Info = '/scgl/ccmx/info', Info = '/scgl/ccmx/info',
MesProductOutput = '/scgl/ccmx', MesProductOutput = '/scgl/ccmx',
Rksq = '/scgl/ccmx/commitRk',
Zjsq = '/scgl/ccmx/commitQuality',
} }
...@@ -88,6 +89,35 @@ export async function deleteMesProductOutput(ids: string[], mode: ErrorMessageMo ...@@ -88,6 +89,35 @@ export async function deleteMesProductOutput(ids: string[], mode: ErrorMessageMo
); );
} }
/**
* @description: 入库申请
*/
export async function rksqMesProductOutput(params: Recordable, mode: ErrorMessageMode = 'modal') {
return defHttp.post<boolean>(
{
url: Api.Rksq,
params,
},
{
errorMessageMode: mode,
},
);
}
/**
* @description: 质检申请
*/
export async function zjsqMesProductOutput(params: Recordable, mode: ErrorMessageMode = 'modal') {
return defHttp.post<boolean>(
{
url: Api.Zjsq,
params,
},
{
errorMessageMode: mode,
},
);
}
...@@ -10,17 +10,17 @@ export interface MesProductOutputPageParams extends BasicPageParams { ...@@ -10,17 +10,17 @@ export interface MesProductOutputPageParams extends BasicPageParams {
kh: string; kh: string;
cpmc: string; ywzz: string;
csl: string; cpmc: string;
rkzt: string; zjzt: string;
cpbh: string; cpbh: string;
ccsj: string; ccsj: string;
ywzz: string; rkzt: string;
} }
/** /**
...@@ -43,6 +43,8 @@ export interface MesProductOutputPageModel { ...@@ -43,6 +43,8 @@ export interface MesProductOutputPageModel {
rkzt: string; rkzt: string;
zjzt: string;
ccsj: string; ccsj: string;
ywzz: string; ywzz: string;
...@@ -133,6 +135,10 @@ export interface MesProductOutputModel { ...@@ -133,6 +135,10 @@ export interface MesProductOutputModel {
ks: string; ks: string;
cpid: string; cpid: string;
gdid: string;
zjzt: string;
} }
/** /**
......
...@@ -41,28 +41,34 @@ export const searchFormSchema: FormSchema[] = [ ...@@ -41,28 +41,34 @@ export const searchFormSchema: FormSchema[] = [
}, },
}, },
{ {
field: 'cpmc', field: 'ywzz',
label: '产品名称', label: '业务组织',
defaultValue: undefined, defaultValue: undefined,
component: 'Input', component: 'XjrSelect',
componentProps: {
datasourceType: 'dic',
params: { itemId: '2015724355955159041' },
labelField: 'name',
valueField: 'value',
mode: 'multiple',
showSearch: true,
getPopupContainer: () => document.body,
},
}, },
{ {
field: 'csl', field: 'cpmc',
label: '产出数量', label: '产品名称',
defaultValue: undefined, defaultValue: undefined,
component: 'InputNumber', component: 'Input',
componentProps: {
style: { width: '100%' },
},
}, },
{ {
field: 'rkzt', field: 'zjzt',
label: '入库状态', label: '质检状态',
defaultValue: undefined, defaultValue: undefined,
component: 'XjrSelect', component: 'XjrSelect',
componentProps: { componentProps: {
datasourceType: 'dic', datasourceType: 'dic',
params: { itemId: '2016706939403292674' }, params: { itemId: '2017039368643051521' },
labelField: 'name', labelField: 'name',
valueField: 'value', valueField: 'value',
mode: 'multiple', mode: 'multiple',
...@@ -89,13 +95,13 @@ export const searchFormSchema: FormSchema[] = [ ...@@ -89,13 +95,13 @@ export const searchFormSchema: FormSchema[] = [
}, },
{ {
field: 'ywzz', field: 'rkzt',
label: '业务组织', label: '入库状态',
defaultValue: undefined, defaultValue: undefined,
component: 'XjrSelect', component: 'XjrSelect',
componentProps: { componentProps: {
datasourceType: 'dic', datasourceType: 'dic',
params: { itemId: '2015724355955159041' }, params: { itemId: '2016706939403292674' },
labelField: 'name', labelField: 'name',
valueField: 'value', valueField: 'value',
mode: 'multiple', mode: 'multiple',
...@@ -199,6 +205,19 @@ export const columns: BasicColumn[] = [ ...@@ -199,6 +205,19 @@ export const columns: BasicColumn[] = [
{ {
resizable: true, resizable: true,
dataIndex: 'zjzt',
title: '质检状态',
componentType: 'select',
fixed: false,
sorter: true,
styleConfig: undefined,
listStyle: undefined,
},
{
resizable: true,
dataIndex: 'ccsj', dataIndex: 'ccsj',
title: '产出时间', title: '产出时间',
componentType: 'date', componentType: 'date',
...@@ -406,28 +425,42 @@ export const formProps: FormProps = { ...@@ -406,28 +425,42 @@ export const formProps: FormProps = {
}, },
}, },
{ {
key: 'dc4db2b098ab4dd198655c04b27f4df6', key: 'd0e0407ab883414baed7b5e4ac06dca1',
field: 'zl', field: 'ywzz',
label: '重量', label: '业务组织',
type: 'number', type: 'select',
component: 'InputNumber', component: 'XjrSelect',
colProps: { span: 24 }, colProps: { span: 24 },
defaultValue: '',
componentProps: { componentProps: {
width: '100%', width: '100%',
span: 7, span: 7,
defaultValue: '', placeholder: '',
step: 0.01,
disabled: true,
showLabel: true, showLabel: true,
controls: true, showSearch: false,
isMultiple: false,
clearable: false,
disabled: false,
staticOptions: [
{ key: 1, label: '进行中', value: '进行中' },
{ key: 2, label: '已入库', value: '已入库' },
{ key: 3, label: '未入库', value: '未入库' },
],
datasourceType: 'dic',
labelField: 'name',
valueField: 'value',
apiConfig: {
path: 'CodeGeneration/selection',
method: 'GET',
apiId: '93d735dcb7364a0f8102188ec4d77ac7',
},
dicOptions: [],
required: false, required: false,
subTotal: false,
isShow: false,
rules: [], rules: [],
events: {}, events: {},
placeholder: '', isShow: true,
tooltipConfig: { visible: false, title: '提示文本' }, tooltipConfig: { visible: false, title: '提示文本' },
params: { itemId: '2015724355955159041' },
itemId: '2015724355955159041',
style: { width: '100%' }, style: { width: '100%' },
}, },
}, },
...@@ -494,9 +527,9 @@ export const formProps: FormProps = { ...@@ -494,9 +527,9 @@ export const formProps: FormProps = {
}, },
}, },
{ {
key: 'fe0962f1aba948a285cec7392b380a09', key: '8a31c99c196242b89bed46dae5568476',
field: 'rkzt', field: 'zjzt',
label: '入库状态', label: '质检状态',
type: 'select', type: 'select',
component: 'XjrSelect', component: 'XjrSelect',
colProps: { span: 24 }, colProps: { span: 24 },
...@@ -528,15 +561,15 @@ export const formProps: FormProps = { ...@@ -528,15 +561,15 @@ export const formProps: FormProps = {
events: {}, events: {},
isShow: true, isShow: true,
tooltipConfig: { visible: false, title: '提示文本' }, tooltipConfig: { visible: false, title: '提示文本' },
params: { itemId: '2016706939403292674' }, params: { itemId: '2017039368643051521' },
itemId: '2016706939403292674', itemId: '2017039368643051521',
style: { width: '100%' }, style: { width: '100%' },
}, },
}, },
{ {
key: '9b0eb4203d0f48bda446532f1db3cbdb', key: 'dc4db2b098ab4dd198655c04b27f4df6',
field: 'ks', field: 'zl',
label: '捆数', label: '重量',
type: 'number', type: 'number',
component: 'InputNumber', component: 'InputNumber',
colProps: { span: 24 }, colProps: { span: 24 },
...@@ -625,9 +658,9 @@ export const formProps: FormProps = { ...@@ -625,9 +658,9 @@ export const formProps: FormProps = {
}, },
}, },
{ {
key: 'd0e0407ab883414baed7b5e4ac06dca1', key: 'fe0962f1aba948a285cec7392b380a09',
field: 'ywzz', field: 'rkzt',
label: '业务组织', label: '入库状态',
type: 'select', type: 'select',
component: 'XjrSelect', component: 'XjrSelect',
colProps: { span: 24 }, colProps: { span: 24 },
...@@ -659,8 +692,34 @@ export const formProps: FormProps = { ...@@ -659,8 +692,34 @@ export const formProps: FormProps = {
events: {}, events: {},
isShow: true, isShow: true,
tooltipConfig: { visible: false, title: '提示文本' }, tooltipConfig: { visible: false, title: '提示文本' },
params: { itemId: '2015724355955159041' }, params: { itemId: '2016706939403292674' },
itemId: '2015724355955159041', itemId: '2016706939403292674',
style: { width: '100%' },
},
},
{
key: '9b0eb4203d0f48bda446532f1db3cbdb',
field: 'ks',
label: '捆数',
type: 'number',
component: 'InputNumber',
colProps: { span: 24 },
defaultValue: '',
componentProps: {
width: '100%',
span: 7,
defaultValue: '',
step: 0.01,
disabled: true,
showLabel: true,
controls: true,
required: false,
subTotal: false,
isShow: false,
rules: [],
events: {},
placeholder: '',
tooltipConfig: { visible: false, title: '提示文本' },
style: { width: '100%' }, style: { width: '100%' },
}, },
}, },
......
...@@ -51,19 +51,18 @@ export const permissionList = [ ...@@ -51,19 +51,18 @@ export const permissionList = [
{ {
required: false, required: false,
view: true, view: true,
edit: false, edit: true,
disabled: false, disabled: false,
isSaveTable: false, isSaveTable: false,
tableName: '', tableName: '',
fieldName: '重量', fieldName: '业务组织',
fieldId: 'zl', fieldId: 'ywzz',
isSubTable: false, isSubTable: false,
showChildren: true, showChildren: true,
type: 'number', type: 'select',
key: 'dc4db2b098ab4dd198655c04b27f4df6', key: 'd0e0407ab883414baed7b5e4ac06dca1',
children: [], children: [],
options: {}, options: {},
defaultValue: '',
}, },
{ {
required: false, required: false,
...@@ -105,12 +104,12 @@ export const permissionList = [ ...@@ -105,12 +104,12 @@ export const permissionList = [
disabled: false, disabled: false,
isSaveTable: false, isSaveTable: false,
tableName: '', tableName: '',
fieldName: '入库状态', fieldName: '质检状态',
fieldId: 'rkzt', fieldId: 'zjzt',
isSubTable: false, isSubTable: false,
showChildren: true, showChildren: true,
type: 'select', type: 'select',
key: 'fe0962f1aba948a285cec7392b380a09', key: '8a31c99c196242b89bed46dae5568476',
children: [], children: [],
options: {}, options: {},
}, },
...@@ -121,12 +120,12 @@ export const permissionList = [ ...@@ -121,12 +120,12 @@ export const permissionList = [
disabled: false, disabled: false,
isSaveTable: false, isSaveTable: false,
tableName: '', tableName: '',
fieldName: '捆数', fieldName: '重量',
fieldId: 'ks', fieldId: 'zl',
isSubTable: false, isSubTable: false,
showChildren: true, showChildren: true,
type: 'number', type: 'number',
key: '9b0eb4203d0f48bda446532f1db3cbdb', key: 'dc4db2b098ab4dd198655c04b27f4df6',
children: [], children: [],
options: {}, options: {},
defaultValue: '', defaultValue: '',
...@@ -172,13 +171,30 @@ export const permissionList = [ ...@@ -172,13 +171,30 @@ export const permissionList = [
disabled: false, disabled: false,
isSaveTable: false, isSaveTable: false,
tableName: '', tableName: '',
fieldName: '业务组织', fieldName: '入库状态',
fieldId: 'ywzz', fieldId: 'rkzt',
isSubTable: false, isSubTable: false,
showChildren: true, showChildren: true,
type: 'select', type: 'select',
key: 'd0e0407ab883414baed7b5e4ac06dca1', key: 'fe0962f1aba948a285cec7392b380a09',
children: [], children: [],
options: {}, options: {},
}, },
{
required: false,
view: true,
edit: false,
disabled: false,
isSaveTable: false,
tableName: '',
fieldName: '捆数',
fieldId: 'ks',
isSubTable: false,
showChildren: true,
type: 'number',
key: '9b0eb4203d0f48bda446532f1db3cbdb',
children: [],
options: {},
defaultValue: '',
},
]; ];
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<template #resizeRight> <template #resizeRight>
<BasicTable @register="registerTable" isMenuTable ref="tableRef" <BasicTable @register="registerTable" isMenuTable ref="tableRef" :row-selection="{ selectedRowKeys: selectedKeys, onChange: onSelectChange }"
> >
...@@ -64,7 +64,7 @@ ...@@ -64,7 +64,7 @@
} from 'vue'; } from 'vue';
import { BasicTable, useTable, TableAction, ActionItem } from '/@/components/Table'; import { BasicTable, useTable, TableAction, ActionItem } from '/@/components/Table';
import { getMesProductOutputPage, deleteMesProductOutput} from '/@/api/scgl/ccmx'; import { getMesProductOutputPage, deleteMesProductOutput, rksqMesProductOutput, zjsqMesProductOutput } from '/@/api/scgl/ccmx';
import { ResizePageWrapper } from '/@/components/Page'; import { ResizePageWrapper } from '/@/components/Page';
import { useMessage } from '/@/hooks/web/useMessage'; import { useMessage } from '/@/hooks/web/useMessage';
import { useI18n } from '/@/hooks/web/useI18n'; import { useI18n } from '/@/hooks/web/useI18n';
...@@ -129,9 +129,9 @@ ...@@ -129,9 +129,9 @@
//展示在列表内的按钮 //展示在列表内的按钮
const actionButtons = ref<string[]>(["view"]); const actionButtons = ref<string[]>(["view","rksq","zjsq"]);
const buttonConfigs = computed(()=>{ const buttonConfigs = computed(()=>{
const list = [{"buttonId":"2010597918263234560","name":"查看","code":"view","icon":"ant-design:eye-outlined","isDefault":true,"isUse":true}] const list = [{"buttonId":"2010597918263234560","name":"查看","code":"view","icon":"ant-design:eye-outlined","isDefault":true,"isUse":true},{"buttonId":"2016798907521257472","name":"入库","code":"rksq","icon":"","isDefault":false,"isUse":true,"setting":[],"showType":"inline","buttonType":"primary"},{"buttonId":"2016798907521257473","name":"质检","code":"zjsq","icon":"","isDefault":false,"isUse":true,"setting":[],"showType":"inline","buttonType":"primary"}]
return filterButtonAuth(list); return filterButtonAuth(list);
}) })
...@@ -143,7 +143,7 @@ ...@@ -143,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,} const btnEvent = {view : handleView, rksq: handleRksq, zjsq: handleZjsq}
const { currentRoute } = useRouter(); const { currentRoute } = useRouter();
...@@ -155,6 +155,8 @@ ...@@ -155,6 +155,8 @@
const selectedKeys = ref<string[]>([]);
const selectedRowsData = ref<any[]>([]);
...@@ -187,6 +189,8 @@ ...@@ -187,6 +189,8 @@
selectedKeys.value = [];
selectedRowsData.value = [];
}, },
useSearchForm: true, useSearchForm: true,
...@@ -196,7 +200,7 @@ ...@@ -196,7 +200,7 @@
striped: false, striped: false,
actionColumn: { actionColumn: {
width: 65, width: 195,
title: '操作', title: '操作',
dataIndex: 'action', dataIndex: 'action',
slots: { customRender: 'action' }, slots: { customRender: 'action' },
...@@ -214,7 +218,6 @@ ...@@ -214,7 +218,6 @@
function buttonClick(code) { function buttonClick(code) {
btnEvent[code](); btnEvent[code]();
} }
...@@ -228,14 +231,23 @@ ...@@ -228,14 +231,23 @@
function onSelectChange(selectedRowKeys: [], selectedRows) {
selectedKeys.value = selectedRowKeys;
selectedRowsData.value = selectedRows;
}
function customRow(record: Recordable) { function customRow(record: Recordable) {
return { return {
ondblclick: () => { onClick: () => {
if (record.isCanEdit && hasPermission("ccmx:edit")) { let selectedRowKeys = [...selectedKeys.value];
handleEdit(record); if (selectedRowKeys.indexOf(record.id) >= 0) {
let index = selectedRowKeys.indexOf(record.id);
selectedRowKeys.splice(index, 1);
} else {
selectedRowKeys.push(record.id);
} }
selectedKeys.value = selectedRowKeys;
}, },
}; };
} }
...@@ -243,6 +255,8 @@ ...@@ -243,6 +255,8 @@
function handleSuccess() { function handleSuccess() {
selectedKeys.value = [];
selectedRowsData.value = [];
reload(); reload();
} }
...@@ -266,6 +280,38 @@ ...@@ -266,6 +280,38 @@
openModal(true, info); openModal(true, info);
} }
/**
* @description: 入库申请
*/
async function handleRksq(record: Recordable) {
try {
await rksqMesProductOutput({ id: record.id });
notification.success({
message: t('成功'),
description: '入库申请成功',
});
handleSuccess();
} catch (error) {
console.error('入库申请失败:', error);
}
}
/**
* @description: 质检申请
*/
async function handleZjsq(record: Recordable) {
try {
await zjsqMesProductOutput({ id: record.id });
notification.success({
message: t('成功'),
description: '质检申请成功',
});
handleSuccess();
} catch (error) {
console.error('质检申请失败:', error);
}
}
...@@ -325,4 +371,4 @@ ...@@ -325,4 +371,4 @@
</style> </style>
\ No newline at end of file
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