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';
* @description: MesWarehousePromaterial分页参数 模型
*/
export interface MesWarehousePromaterialPageParams extends BasicPageParams {
djbh: string;
lldw: string;
llr: string;
kgy: string;
}
/**
......@@ -17,8 +17,6 @@ export interface MesWarehousePromaterialPageParams extends BasicPageParams {
export interface MesWarehousePromaterialPageModel {
id: string;
djbh: string;
djrq: string;
lldw: string;
......@@ -28,6 +26,10 @@ export interface MesWarehousePromaterialPageModel {
llkczz: string;
kgy: string;
djbh: string;
bz: string;
}
/**
......
......@@ -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',
title: '备注',
dataIndex: 'bz',
......@@ -697,11 +717,69 @@ export const formProps: FormProps = {
topButtonList: [
{
key: 'button1768888716700',
label: '生领料单',
label: '生领料单',
icon: '',
style: 'primary',
event: [],
type: 1,
event: [
{
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',
......
......@@ -257,6 +257,21 @@ export const permissionList = [
isSaveTable: false,
showChildren: false,
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: '备注',
fieldId: 'bz',
type: 'Input',
......
......@@ -4,20 +4,20 @@ import { uploadApi } from '/@/api/sys/upload';
export const searchFormSchema: FormSchema[] = [
{
field: 'lldw',
label: '领料单位',
field: 'djbh',
label: '单据编号',
defaultValue: undefined,
component: 'Input',
},
{
field: 'llr',
label: '领料',
field: 'lldw',
label: '领料单位',
defaultValue: undefined,
component: 'Input',
},
{
field: 'kgy',
label: '库管员',
field: 'llr',
label: '领料人',
defaultValue: undefined,
component: 'Input',
},
......@@ -26,19 +26,6 @@ export const searchFormSchema: FormSchema[] = [
export const columns: BasicColumn[] = [
{
resizable: true,
dataIndex: 'djbh',
title: '单据编号',
componentType: 'input',
fixed: false,
sorter: true,
styleConfig: undefined,
listStyle: '',
},
{
resizable: true,
dataIndex: 'djrq',
title: '单据日期',
componentType: 'date',
......@@ -101,6 +88,32 @@ export const columns: BasicColumn[] = [
styleConfig: undefined,
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 = [];
......@@ -185,35 +198,24 @@ export const formProps: FormProps = {
span: 8,
list: [
{
key: '2821c9b0e7cf4e438e6b1750123e67c7',
key: '1599562edde2479ea55a497f20983412',
field: 'djbh',
label: '单据编号',
type: 'input',
component: 'Input',
type: 'auto-code',
component: 'AutoCodeRule',
colProps: { span: 24 },
defaultValue: '',
componentProps: {
width: '100%',
span: 7,
defaultValue: '',
placeholder: '请输入单据编号',
maxlength: null,
prefix: '',
suffix: '',
addonBefore: '',
addonAfter: '',
disabled: false,
allowClear: false,
showLabel: true,
required: true,
rules: [],
events: {},
listStyle: '',
isSave: false,
autoCodeRule: 'LLDH',
required: false,
isShow: true,
scan: false,
bordered: true,
isShowAi: false,
tooltipConfig: { visible: false, title: '提示文本' },
style: { width: '100%' },
},
......@@ -268,7 +270,6 @@ export const formProps: FormProps = {
span: 7,
defaultValue: '',
placeholder: '请输入领料单位',
maxlength: null,
prefix: '',
suffix: '',
addonBefore: '',
......@@ -307,7 +308,6 @@ export const formProps: FormProps = {
span: 7,
defaultValue: '',
placeholder: '请输入领料人',
maxlength: null,
prefix: '',
suffix: '',
addonBefore: '',
......@@ -346,7 +346,6 @@ export const formProps: FormProps = {
span: 7,
defaultValue: '',
placeholder: '请输入领料库存组织',
maxlength: null,
prefix: '',
suffix: '',
addonBefore: '',
......@@ -385,7 +384,6 @@ export const formProps: FormProps = {
span: 7,
defaultValue: '',
placeholder: '请输入库管员',
maxlength: null,
prefix: '',
suffix: '',
addonBefore: '',
......@@ -424,7 +422,6 @@ export const formProps: FormProps = {
span: 2,
defaultValue: '',
placeholder: '请输入备注',
maxlength: null,
prefix: '',
suffix: '',
addonBefore: '',
......@@ -513,7 +510,6 @@ export const formProps: FormProps = {
span: '',
defaultValue: '',
placeholder: '请输入物料编码单行文本物料编码',
maxlength: null,
prefix: '',
suffix: '',
addonBefore: '',
......@@ -544,7 +540,6 @@ export const formProps: FormProps = {
span: '',
defaultValue: '',
placeholder: '请输入物料名称',
maxlength: null,
prefix: '',
suffix: '',
addonBefore: '',
......@@ -575,7 +570,6 @@ export const formProps: FormProps = {
span: '',
defaultValue: '',
placeholder: '请输入规格',
maxlength: null,
prefix: '',
suffix: '',
addonBefore: '',
......@@ -606,7 +600,6 @@ export const formProps: FormProps = {
span: '',
defaultValue: '',
placeholder: '请输入单位',
maxlength: null,
prefix: '',
suffix: '',
addonBefore: '',
......@@ -637,9 +630,7 @@ export const formProps: FormProps = {
span: '',
defaultValue: 0,
min: 0,
max: null,
step: 1,
maxlength: null,
disabled: false,
showLabel: true,
controls: true,
......@@ -663,7 +654,6 @@ export const formProps: FormProps = {
span: '',
defaultValue: '',
placeholder: '请输入货位号',
maxlength: null,
prefix: '',
suffix: '',
addonBefore: '',
......@@ -694,9 +684,7 @@ export const formProps: FormProps = {
span: '',
defaultValue: 0,
min: 0,
max: null,
step: 1,
maxlength: null,
disabled: false,
showLabel: true,
controls: true,
......@@ -720,9 +708,7 @@ export const formProps: FormProps = {
span: '',
defaultValue: 0,
min: 0,
max: null,
step: 1,
maxlength: null,
disabled: false,
showLabel: true,
controls: true,
......@@ -746,7 +732,6 @@ export const formProps: FormProps = {
span: '',
defaultValue: '',
placeholder: '请输入备注',
maxlength: null,
prefix: '',
suffix: '',
addonBefore: '',
......@@ -791,7 +776,7 @@ export const formProps: FormProps = {
isDeleteSelected: false,
isListView: false,
viewList: [],
isShowAdd: true,
isShowAdd: false,
isShowDelete: true,
hasCheckedCol: false,
events: {},
......@@ -818,7 +803,6 @@ export const formButtons = [
isShow: true,
index: 2,
type: 1,
modal: null,
},
{
key: 'cancel',
......@@ -829,7 +813,6 @@ export const formButtons = [
isShow: true,
index: 1,
type: 1,
modal: null,
},
{
key: 'reset',
......@@ -840,6 +823,5 @@ export const formButtons = [
isShow: true,
index: 0,
type: 1,
modal: null,
},
];
export const permissionList = [
{
required: true,
required: false,
view: true,
edit: true,
disabled: false,
edit: false,
disabled: true,
isSaveTable: false,
tableName: '',
fieldName: '单据编号',
fieldId: 'djbh',
isSubTable: false,
showChildren: true,
type: 'input',
key: '2821c9b0e7cf4e438e6b1750123e67c7',
type: 'auto-code',
key: '1599562edde2479ea55a497f20983412',
children: [],
options: {},
defaultValue: '',
},
{
required: false,
......
......@@ -77,6 +77,7 @@
import printJS from 'print-js';
import { useModal } from '/@/components/Modal';
......@@ -98,7 +99,7 @@
import { generateTableJson, } from '/@/utils/event/design';
......@@ -133,7 +134,7 @@
//展示在列表内的按钮
const actionButtons = ref<string[]>(["view","edit","delete"]);
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);
})
......@@ -145,7 +146,7 @@
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();
......@@ -165,7 +166,7 @@
const [registerTable, { reload, }] = useTable({
const [registerTable, { reload, getRawDataSource, }] = useTable({
title: 'Scll列表',
api: getMesWarehousePromaterialPage,
rowKey: 'id',
......@@ -221,13 +222,6 @@
}
function handleAdd() {
openModal(true, { isUpdate: false, });
}
async function handleEdit(record: Recordable) {
let field = 'id';
......@@ -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