Commit 6a21c3f5 by 张珈源

feat(ckgl): 新增是否投料字段并优化领料单功能

- 在scbl模块config.ts中新增"是否投料"开关组件配置
- 将生产领料单按钮改为生成领料单,并添加模态框事件配置
- 配置模态框的内外参数绑定,支持物料编码、名称和领料数量传递
- 在scll模块searchFormSchema中新增单据编号搜索字段
- 移除领料人搜索中的库管员字段,调整列配置顺序
- 将单据编号列的组件类型改为auto-code,并新增备注列
- 修改表单中单据编号为自动生成规则,移除maxlength限制
- 在API模型中调整字段位置,将djbh从查询参数移到返回字段
- 新增打印按钮功能,集成print-js实现表格打印
- 在工作流权限中同步新增字段权限配置
parent c585c6d1
...@@ -4,11 +4,11 @@ import { BasicPageParams, BasicFetchResult } from '/@/api/model/baseModel'; ...@@ -4,11 +4,11 @@ import { BasicPageParams, BasicFetchResult } from '/@/api/model/baseModel';
* @description: MesWarehousePromaterial分页参数 模型 * @description: MesWarehousePromaterial分页参数 模型
*/ */
export interface MesWarehousePromaterialPageParams extends BasicPageParams { export interface MesWarehousePromaterialPageParams extends BasicPageParams {
djbh: string;
lldw: string; lldw: string;
llr: string; llr: string;
kgy: string;
} }
/** /**
...@@ -17,8 +17,6 @@ export interface MesWarehousePromaterialPageParams extends BasicPageParams { ...@@ -17,8 +17,6 @@ export interface MesWarehousePromaterialPageParams extends BasicPageParams {
export interface MesWarehousePromaterialPageModel { export interface MesWarehousePromaterialPageModel {
id: string; id: string;
djbh: string;
djrq: string; djrq: string;
lldw: string; lldw: string;
...@@ -28,6 +26,10 @@ export interface MesWarehousePromaterialPageModel { ...@@ -28,6 +26,10 @@ export interface MesWarehousePromaterialPageModel {
llkczz: string; llkczz: string;
kgy: string; kgy: string;
djbh: string;
bz: string;
} }
/** /**
......
...@@ -647,6 +647,26 @@ export const formProps: FormProps = { ...@@ -647,6 +647,26 @@ export const formProps: FormProps = {
}, },
}, },
{ {
key: '32efe413b9fe490b918ad1cd2eaadc08',
title: '是否投料',
dataIndex: 'sftl',
componentType: 'Switch',
defaultValue: 1,
componentProps: {
span: '',
defaultValue: 1,
checkedChildren: '',
unCheckedChildren: '',
checkedColor: '#1C8DFF',
unCheckedColor: '#bbbdbf',
showLabel: true,
disabled: false,
events: {},
isShow: true,
tooltipConfig: { visible: false, title: '提示文本' },
},
},
{
key: '4839b861d8b541afbb12092478d08bb7', key: '4839b861d8b541afbb12092478d08bb7',
title: '备注', title: '备注',
dataIndex: 'bz', dataIndex: 'bz',
...@@ -697,11 +717,69 @@ export const formProps: FormProps = { ...@@ -697,11 +717,69 @@ export const formProps: FormProps = {
topButtonList: [ topButtonList: [
{ {
key: 'button1768888716700', key: 'button1768888716700',
label: '生领料单', label: '生领料单',
icon: '', icon: '',
style: 'primary', style: 'primary',
event: [], event: [
type: 1, {
operateType: 2,
operateConfig: { js: 'formActionType.openModal(curRowData)' },
},
],
type: 2,
modal: {
bindModal: '2013812486102130689',
innerParams: [
{
name: '物料编码',
type: 'value',
value: '',
apiConfig: {
path: 'CodeGeneration/selection',
method: 'GET',
apiId: '93d735dcb7364a0f8102188ec4d77ac7',
},
component: '{"table":"table_17482","field":"wu_liao_bian_ma5244"}',
},
{
name: '物料名称',
type: 'value',
value: '',
apiConfig: {
path: 'CodeGeneration/selection',
method: 'GET',
apiId: '93d735dcb7364a0f8102188ec4d77ac7',
},
component: '{"table":"table_17482","field":"wu_liao_ming_chen9124"}',
},
],
outParams: [
{
name: '物料编码',
component: '{"table":"table_17482","field":"wu_liao_bian_ma5244"}',
mainComponent: '',
},
{
name: '物料名称',
component: '{"table":"table_17482","field":"wu_liao_ming_chen9124"}',
mainComponent: '',
},
{
name: '领料数量',
component: '{"table":"table_17482","field":"ling_liao_shu_liang7997"}',
mainComponent: '',
},
],
modalWidth: 900,
modalWidthUnit: 'px',
modalHeight: 500,
modalHeightUnit: 'px',
title: '生成领料单',
confirm: '',
cancel: '',
open: '',
close: '',
},
}, },
{ {
key: 'button1768888730464', key: 'button1768888730464',
......
...@@ -257,6 +257,21 @@ export const permissionList = [ ...@@ -257,6 +257,21 @@ export const permissionList = [
isSaveTable: false, isSaveTable: false,
showChildren: false, showChildren: false,
tableName: 'mesWarehousePrepareInfoList', tableName: 'mesWarehousePrepareInfoList',
fieldName: '是否投料',
fieldId: 'sftl',
type: 'Switch',
key: '32efe413b9fe490b918ad1cd2eaadc08',
children: [],
},
{
required: true,
view: true,
edit: true,
disabled: false,
isSubTable: false,
isSaveTable: false,
showChildren: false,
tableName: 'mesWarehousePrepareInfoList',
fieldName: '备注', fieldName: '备注',
fieldId: 'bz', fieldId: 'bz',
type: 'Input', type: 'Input',
......
...@@ -4,20 +4,20 @@ import { uploadApi } from '/@/api/sys/upload'; ...@@ -4,20 +4,20 @@ import { uploadApi } from '/@/api/sys/upload';
export const searchFormSchema: FormSchema[] = [ export const searchFormSchema: FormSchema[] = [
{ {
field: 'lldw', field: 'djbh',
label: '领料单位', label: '单据编号',
defaultValue: undefined, defaultValue: undefined,
component: 'Input', component: 'Input',
}, },
{ {
field: 'llr', field: 'lldw',
label: '领料', label: '领料单位',
defaultValue: undefined, defaultValue: undefined,
component: 'Input', component: 'Input',
}, },
{ {
field: 'kgy', field: 'llr',
label: '库管员', label: '领料人',
defaultValue: undefined, defaultValue: undefined,
component: 'Input', component: 'Input',
}, },
...@@ -26,19 +26,6 @@ export const searchFormSchema: FormSchema[] = [ ...@@ -26,19 +26,6 @@ export const searchFormSchema: FormSchema[] = [
export const columns: BasicColumn[] = [ export const columns: BasicColumn[] = [
{ {
resizable: true, resizable: true,
dataIndex: 'djbh',
title: '单据编号',
componentType: 'input',
fixed: false,
sorter: true,
styleConfig: undefined,
listStyle: '',
},
{
resizable: true,
dataIndex: 'djrq', dataIndex: 'djrq',
title: '单据日期', title: '单据日期',
componentType: 'date', componentType: 'date',
...@@ -101,6 +88,32 @@ export const columns: BasicColumn[] = [ ...@@ -101,6 +88,32 @@ export const columns: BasicColumn[] = [
styleConfig: undefined, styleConfig: undefined,
listStyle: '', listStyle: '',
}, },
{
resizable: true,
dataIndex: 'djbh',
title: '单据编号',
componentType: 'auto-code',
fixed: false,
sorter: true,
styleConfig: undefined,
listStyle: undefined,
},
{
resizable: true,
dataIndex: 'bz',
title: '备注',
componentType: 'input',
fixed: false,
sorter: true,
styleConfig: undefined,
listStyle: '',
},
]; ];
//表头合并配置 //表头合并配置
export const headerMergingData = []; export const headerMergingData = [];
...@@ -185,35 +198,24 @@ export const formProps: FormProps = { ...@@ -185,35 +198,24 @@ export const formProps: FormProps = {
span: 8, span: 8,
list: [ list: [
{ {
key: '2821c9b0e7cf4e438e6b1750123e67c7', key: '1599562edde2479ea55a497f20983412',
field: 'djbh', field: 'djbh',
label: '单据编号', label: '单据编号',
type: 'input', type: 'auto-code',
component: 'Input', component: 'AutoCodeRule',
colProps: { span: 24 }, colProps: { span: 24 },
defaultValue: '',
componentProps: { componentProps: {
width: '100%', width: '100%',
span: 7, span: 7,
defaultValue: '',
placeholder: '请输入单据编号', placeholder: '请输入单据编号',
maxlength: null,
prefix: '', prefix: '',
suffix: '', suffix: '',
addonBefore: '', addonBefore: '',
addonAfter: '', addonAfter: '',
disabled: false,
allowClear: false,
showLabel: true, showLabel: true,
required: true, autoCodeRule: 'LLDH',
rules: [], required: false,
events: {},
listStyle: '',
isSave: false,
isShow: true, isShow: true,
scan: false,
bordered: true,
isShowAi: false,
tooltipConfig: { visible: false, title: '提示文本' }, tooltipConfig: { visible: false, title: '提示文本' },
style: { width: '100%' }, style: { width: '100%' },
}, },
...@@ -268,7 +270,6 @@ export const formProps: FormProps = { ...@@ -268,7 +270,6 @@ export const formProps: FormProps = {
span: 7, span: 7,
defaultValue: '', defaultValue: '',
placeholder: '请输入领料单位', placeholder: '请输入领料单位',
maxlength: null,
prefix: '', prefix: '',
suffix: '', suffix: '',
addonBefore: '', addonBefore: '',
...@@ -307,7 +308,6 @@ export const formProps: FormProps = { ...@@ -307,7 +308,6 @@ export const formProps: FormProps = {
span: 7, span: 7,
defaultValue: '', defaultValue: '',
placeholder: '请输入领料人', placeholder: '请输入领料人',
maxlength: null,
prefix: '', prefix: '',
suffix: '', suffix: '',
addonBefore: '', addonBefore: '',
...@@ -346,7 +346,6 @@ export const formProps: FormProps = { ...@@ -346,7 +346,6 @@ export const formProps: FormProps = {
span: 7, span: 7,
defaultValue: '', defaultValue: '',
placeholder: '请输入领料库存组织', placeholder: '请输入领料库存组织',
maxlength: null,
prefix: '', prefix: '',
suffix: '', suffix: '',
addonBefore: '', addonBefore: '',
...@@ -385,7 +384,6 @@ export const formProps: FormProps = { ...@@ -385,7 +384,6 @@ export const formProps: FormProps = {
span: 7, span: 7,
defaultValue: '', defaultValue: '',
placeholder: '请输入库管员', placeholder: '请输入库管员',
maxlength: null,
prefix: '', prefix: '',
suffix: '', suffix: '',
addonBefore: '', addonBefore: '',
...@@ -424,7 +422,6 @@ export const formProps: FormProps = { ...@@ -424,7 +422,6 @@ export const formProps: FormProps = {
span: 2, span: 2,
defaultValue: '', defaultValue: '',
placeholder: '请输入备注', placeholder: '请输入备注',
maxlength: null,
prefix: '', prefix: '',
suffix: '', suffix: '',
addonBefore: '', addonBefore: '',
...@@ -513,7 +510,6 @@ export const formProps: FormProps = { ...@@ -513,7 +510,6 @@ export const formProps: FormProps = {
span: '', span: '',
defaultValue: '', defaultValue: '',
placeholder: '请输入物料编码单行文本物料编码', placeholder: '请输入物料编码单行文本物料编码',
maxlength: null,
prefix: '', prefix: '',
suffix: '', suffix: '',
addonBefore: '', addonBefore: '',
...@@ -544,7 +540,6 @@ export const formProps: FormProps = { ...@@ -544,7 +540,6 @@ export const formProps: FormProps = {
span: '', span: '',
defaultValue: '', defaultValue: '',
placeholder: '请输入物料名称', placeholder: '请输入物料名称',
maxlength: null,
prefix: '', prefix: '',
suffix: '', suffix: '',
addonBefore: '', addonBefore: '',
...@@ -575,7 +570,6 @@ export const formProps: FormProps = { ...@@ -575,7 +570,6 @@ export const formProps: FormProps = {
span: '', span: '',
defaultValue: '', defaultValue: '',
placeholder: '请输入规格', placeholder: '请输入规格',
maxlength: null,
prefix: '', prefix: '',
suffix: '', suffix: '',
addonBefore: '', addonBefore: '',
...@@ -606,7 +600,6 @@ export const formProps: FormProps = { ...@@ -606,7 +600,6 @@ export const formProps: FormProps = {
span: '', span: '',
defaultValue: '', defaultValue: '',
placeholder: '请输入单位', placeholder: '请输入单位',
maxlength: null,
prefix: '', prefix: '',
suffix: '', suffix: '',
addonBefore: '', addonBefore: '',
...@@ -637,9 +630,7 @@ export const formProps: FormProps = { ...@@ -637,9 +630,7 @@ export const formProps: FormProps = {
span: '', span: '',
defaultValue: 0, defaultValue: 0,
min: 0, min: 0,
max: null,
step: 1, step: 1,
maxlength: null,
disabled: false, disabled: false,
showLabel: true, showLabel: true,
controls: true, controls: true,
...@@ -663,7 +654,6 @@ export const formProps: FormProps = { ...@@ -663,7 +654,6 @@ export const formProps: FormProps = {
span: '', span: '',
defaultValue: '', defaultValue: '',
placeholder: '请输入货位号', placeholder: '请输入货位号',
maxlength: null,
prefix: '', prefix: '',
suffix: '', suffix: '',
addonBefore: '', addonBefore: '',
...@@ -694,9 +684,7 @@ export const formProps: FormProps = { ...@@ -694,9 +684,7 @@ export const formProps: FormProps = {
span: '', span: '',
defaultValue: 0, defaultValue: 0,
min: 0, min: 0,
max: null,
step: 1, step: 1,
maxlength: null,
disabled: false, disabled: false,
showLabel: true, showLabel: true,
controls: true, controls: true,
...@@ -720,9 +708,7 @@ export const formProps: FormProps = { ...@@ -720,9 +708,7 @@ export const formProps: FormProps = {
span: '', span: '',
defaultValue: 0, defaultValue: 0,
min: 0, min: 0,
max: null,
step: 1, step: 1,
maxlength: null,
disabled: false, disabled: false,
showLabel: true, showLabel: true,
controls: true, controls: true,
...@@ -746,7 +732,6 @@ export const formProps: FormProps = { ...@@ -746,7 +732,6 @@ export const formProps: FormProps = {
span: '', span: '',
defaultValue: '', defaultValue: '',
placeholder: '请输入备注', placeholder: '请输入备注',
maxlength: null,
prefix: '', prefix: '',
suffix: '', suffix: '',
addonBefore: '', addonBefore: '',
...@@ -791,7 +776,7 @@ export const formProps: FormProps = { ...@@ -791,7 +776,7 @@ export const formProps: FormProps = {
isDeleteSelected: false, isDeleteSelected: false,
isListView: false, isListView: false,
viewList: [], viewList: [],
isShowAdd: true, isShowAdd: false,
isShowDelete: true, isShowDelete: true,
hasCheckedCol: false, hasCheckedCol: false,
events: {}, events: {},
...@@ -818,7 +803,6 @@ export const formButtons = [ ...@@ -818,7 +803,6 @@ export const formButtons = [
isShow: true, isShow: true,
index: 2, index: 2,
type: 1, type: 1,
modal: null,
}, },
{ {
key: 'cancel', key: 'cancel',
...@@ -829,7 +813,6 @@ export const formButtons = [ ...@@ -829,7 +813,6 @@ export const formButtons = [
isShow: true, isShow: true,
index: 1, index: 1,
type: 1, type: 1,
modal: null,
}, },
{ {
key: 'reset', key: 'reset',
...@@ -840,6 +823,5 @@ export const formButtons = [ ...@@ -840,6 +823,5 @@ export const formButtons = [
isShow: true, isShow: true,
index: 0, index: 0,
type: 1, type: 1,
modal: null,
}, },
]; ];
export const permissionList = [ export const permissionList = [
{ {
required: true, required: false,
view: true, view: true,
edit: true, edit: false,
disabled: false, disabled: true,
isSaveTable: false, isSaveTable: false,
tableName: '', tableName: '',
fieldName: '单据编号', fieldName: '单据编号',
fieldId: 'djbh', fieldId: 'djbh',
isSubTable: false, isSubTable: false,
showChildren: true, showChildren: true,
type: 'input', type: 'auto-code',
key: '2821c9b0e7cf4e438e6b1750123e67c7', key: '1599562edde2479ea55a497f20983412',
children: [], children: [],
options: {}, options: {},
defaultValue: '',
}, },
{ {
required: false, required: false,
......
...@@ -77,6 +77,7 @@ ...@@ -77,6 +77,7 @@
import printJS from 'print-js';
import { useModal } from '/@/components/Modal'; import { useModal } from '/@/components/Modal';
...@@ -98,7 +99,7 @@ ...@@ -98,7 +99,7 @@
import { generateTableJson, } from '/@/utils/event/design';
...@@ -133,7 +134,7 @@ ...@@ -133,7 +134,7 @@
//展示在列表内的按钮 //展示在列表内的按钮
const actionButtons = ref<string[]>(["view","edit","delete"]); const actionButtons = ref<string[]>(["view","edit","delete"]);
const buttonConfigs = computed(()=>{ const buttonConfigs = computed(()=>{
const list = [{"isUse":true,"name":"查看","code":"view","icon":"ant-design:eye-outlined","isDefault":true},{"isUse":true,"name":"新增","code":"add","icon":"ant-design:plus-outlined","isDefault":true},{"isUse":true,"name":"编辑","code":"edit","icon":"ant-design:form-outlined","isDefault":true,"isEnableLock":true},{"isUse":true,"name":"删除","code":"delete","icon":"ant-design:delete-outlined","isDefault":true}] const list = [{"buttonId":"2010557152968171520","name":"查看","code":"view","icon":"ant-design:eye-outlined","isDefault":true,"isUse":true},{"buttonId":"2010557152972365824","name":"编辑","code":"edit","icon":"ant-design:form-outlined","isDefault":true,"isUse":true,"isEnableLock":true},{"name":"打印","code":"print","icon":"ant-design:printer-outlined","isDefault":true,"isUse":true},{"buttonId":"2010557152972365825","name":"删除","code":"delete","icon":"ant-design:delete-outlined","isDefault":true,"isUse":true}]
return filterButtonAuth(list); return filterButtonAuth(list);
}) })
...@@ -145,7 +146,7 @@ ...@@ -145,7 +146,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,add : handleAdd,edit : handleEdit,delete : handleDelete,} const btnEvent = {view : handleView,edit : handleEdit,print : handlePrint,delete : handleDelete,}
const { currentRoute } = useRouter(); const { currentRoute } = useRouter();
...@@ -165,7 +166,7 @@ ...@@ -165,7 +166,7 @@
const [registerTable, { reload, }] = useTable({ const [registerTable, { reload, getRawDataSource, }] = useTable({
title: 'Scll列表', title: 'Scll列表',
api: getMesWarehousePromaterialPage, api: getMesWarehousePromaterialPage,
rowKey: 'id', rowKey: 'id',
...@@ -221,13 +222,6 @@ ...@@ -221,13 +222,6 @@
} }
function handleAdd() {
openModal(true, { isUpdate: false, });
}
async function handleEdit(record: Recordable) { async function handleEdit(record: Recordable) {
let field = 'id'; let field = 'id';
...@@ -282,6 +276,18 @@ ...@@ -282,6 +276,18 @@
} }
async function handlePrint() {
const dataSource = Array.isArray(getRawDataSource())
? getRawDataSource()
: getRawDataSource().list;
const json = generateTableJson(filterColumns, dataSource);
const properties = filterColumns.map((item) => item.title);
printJS({
printable: json,
properties: properties,
type: 'json',
});
}
......
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