Commit 6a55db7b by 宋春膨

Merge remote-tracking branch 'origin/weiqiao-vue3' into weiqiao-vue3

parents 148c294f 524796c3
...@@ -157,8 +157,10 @@ ...@@ -157,8 +157,10 @@
"rollup": "^3.22.1", "rollup": "^3.22.1",
"rollup-plugin-visualizer": "^5.9.0", "rollup-plugin-visualizer": "^5.9.0",
"stylelint": "^16.26.1", "stylelint": "^16.26.1",
"stylelint-config-prettier": "^9.0.5",
"stylelint-config-recommended-vue": "^1.4.0", "stylelint-config-recommended-vue": "^1.4.0",
"stylelint-config-standard": "^33.0.0", "stylelint-config-standard": "^33.0.0",
"stylelint-order": "^7.0.1",
"terser": "^5.17.4", "terser": "^5.17.4",
"ts-node": "^10.9.1", "ts-node": "^10.9.1",
"typescript": "^5.0.4", "typescript": "^5.0.4",
......
...@@ -13,6 +13,8 @@ export interface MesWarehouseArrivedPageParams extends BasicPageParams { ...@@ -13,6 +13,8 @@ export interface MesWarehouseArrivedPageParams extends BasicPageParams {
zdr: string; zdr: string;
ywzz: string; ywzz: string;
cspc: string;
} }
/** /**
...@@ -38,6 +40,8 @@ export interface MesWarehouseArrivedPageModel { ...@@ -38,6 +40,8 @@ export interface MesWarehouseArrivedPageModel {
ywzz: string; ywzz: string;
bz: string; bz: string;
cspc: string;
} }
/** /**
...@@ -64,6 +68,8 @@ export interface MesWarehouseArrivedModel { ...@@ -64,6 +68,8 @@ export interface MesWarehouseArrivedModel {
ywzz: string; ywzz: string;
cspc: string;
fj: string; fj: string;
bz: string; bz: string;
...@@ -121,6 +127,8 @@ export interface MesWarehouseArrivedInfoModel { ...@@ -121,6 +127,8 @@ export interface MesWarehouseArrivedInfoModel {
xqbm: string; xqbm: string;
cspc: string;
sfzp: string; sfzp: string;
sfzj: string; sfzj: string;
......
...@@ -113,6 +113,8 @@ export interface MesWarehouseInInfoModel { ...@@ -113,6 +113,8 @@ export interface MesWarehouseInInfoModel {
dw: string; dw: string;
pch: string;
yssl: string; yssl: string;
sssl: string; sssl: string;
......
...@@ -133,12 +133,8 @@ export interface MesWarehouseInventoryRelaModel { ...@@ -133,12 +133,8 @@ export interface MesWarehouseInventoryRelaModel {
pch: string; pch: string;
xtsl: string;
pdsl: string; pdsl: string;
ce: string;
p1: string; p1: string;
p2: string; p2: string;
......
import { MesWarehouseProfitandlossPageModel, MesWarehouseProfitandlossPageParams, MesWarehouseProfitandlossPageResult } from './model/KcykModel';
import { defHttp } from '/@/utils/http/axios';
import { ErrorMessageMode } from '/#/axios';
enum Api {
Page = '/ckgl/kcyk/page',
List = '/ckgl/kcyk/list',
Info = '/ckgl/kcyk/info',
MesWarehouseProfitandloss = '/ckgl/kcyk',
}
/**
* @description: 查询MesWarehouseProfitandloss分页列表
*/
export async function getMesWarehouseProfitandlossPage(params: MesWarehouseProfitandlossPageParams, mode: ErrorMessageMode = 'modal') {
return defHttp.get<MesWarehouseProfitandlossPageResult>(
{
url: Api.Page,
params,
},
{
errorMessageMode: mode,
},
);
}
/**
* @description: 获取MesWarehouseProfitandloss信息
*/
export async function getMesWarehouseProfitandloss(id: String, mode: ErrorMessageMode = 'modal') {
return defHttp.get<MesWarehouseProfitandlossPageModel>(
{
url: Api.Info,
params: { id },
},
{
errorMessageMode: mode,
},
);
}
/**
* @description: 新增MesWarehouseProfitandloss
*/
export async function addMesWarehouseProfitandloss(mesWarehouseProfitandloss: Recordable, mode: ErrorMessageMode = 'modal') {
return defHttp.post<boolean>(
{
url: Api.MesWarehouseProfitandloss,
params: mesWarehouseProfitandloss,
},
{
errorMessageMode: mode,
},
);
}
/**
* @description: 更新MesWarehouseProfitandloss
*/
export async function updateMesWarehouseProfitandloss(mesWarehouseProfitandloss: Recordable, mode: ErrorMessageMode = 'modal') {
return defHttp.put<boolean>(
{
url: Api.MesWarehouseProfitandloss,
params: mesWarehouseProfitandloss,
},
{
errorMessageMode: mode,
},
);
}
/**
* @description: 删除MesWarehouseProfitandloss(批量删除)
*/
export async function deleteMesWarehouseProfitandloss(ids: string[], mode: ErrorMessageMode = 'modal') {
return defHttp.delete<boolean>(
{
url: Api.MesWarehouseProfitandloss,
data: ids,
},
{
errorMessageMode: mode,
},
);
}
import { BasicPageParams, BasicFetchResult } from '/@/api/model/baseModel';
/**
* @description: MesWarehouseProfitandloss分页参数 模型
*/
export interface MesWarehouseProfitandlossPageParams extends BasicPageParams {
cpbm: string;
cpmc: string;
ck: string;
pch: string;
ykzt: string;
ywzz: string;
pddid: string;
}
/**
* @description: MesWarehouseProfitandloss分页返回值模型
*/
export interface MesWarehouseProfitandlossPageModel {
id: string;
cpbm: string;
cpmc: string;
ck: string;
pch: string;
xtsl: string;
pdsl: string;
dw: string;
ce: string;
ykzt: string;
ywzz: string;
pddid: string;
}
/**
* @description: MesWarehouseProfitandloss表类型
*/
export interface MesWarehouseProfitandlossModel {
id: string;
deleteMark: string;
ywzz: string;
cpbm: string;
cpmc: string;
pch: string;
ck: string;
xtsl: string;
pdsl: string;
dw: string;
ce: string;
pddid: string;
ykzt: string;
p1: string;
p2: string;
p3: string;
p4: string;
p5: string;
p6: string;
p7: string;
p8: string;
p9: string;
p10: string;
p11: string;
p12: string;
p13: string;
p14: string;
p15: string;
p16: string;
p17: string;
p18: string;
p19: string;
p20: string;
p21: string;
p22: string;
p23: string;
p24: string;
p25: string;
p26: string;
p27: string;
p28: string;
p29: string;
p30: string;
createDate: string;
createUserId: string;
modifyDate: string;
modifyUserId: string;
}
/**
* @description: MesWarehouseProfitandloss分页返回值结构
*/
export type MesWarehouseProfitandlossPageResult =
BasicFetchResult<MesWarehouseProfitandlossPageModel>;
...@@ -9,6 +9,10 @@ export interface MesWarehousePromaterialPageParams extends BasicPageParams { ...@@ -9,6 +9,10 @@ export interface MesWarehousePromaterialPageParams extends BasicPageParams {
lldw: string; lldw: string;
llr: string; llr: string;
ywzz: string;
zt: string;
} }
/** /**
...@@ -25,10 +29,12 @@ export interface MesWarehousePromaterialPageModel { ...@@ -25,10 +29,12 @@ export interface MesWarehousePromaterialPageModel {
llr: string; llr: string;
llkczz: string;
kgy: string; kgy: string;
ywzz: string;
zt: string;
bz: string; bz: string;
} }
...@@ -48,10 +54,12 @@ export interface MesWarehousePromaterialModel { ...@@ -48,10 +54,12 @@ export interface MesWarehousePromaterialModel {
llr: string; llr: string;
llkczz: string; ywzz: string;
kgy: string; kgy: string;
zt: string;
bz: string; bz: string;
fj: string; fj: string;
...@@ -147,14 +155,16 @@ export interface MesWarehousePromaterialInfoModel { ...@@ -147,14 +155,16 @@ export interface MesWarehousePromaterialInfoModel {
dw: string; dw: string;
sl: string;
hwh: string; hwh: string;
yfsl: string; sl: string;
sfsl: string; sfsl: string;
pch: string;
lldh: string;
bz: string; bz: string;
p1: string; p1: string;
......
...@@ -4,13 +4,17 @@ import { BasicPageParams, BasicFetchResult } from '/@/api/model/baseModel'; ...@@ -4,13 +4,17 @@ import { BasicPageParams, BasicFetchResult } from '/@/api/model/baseModel';
* @description: MesWarehouseProduct分页参数 模型 * @description: MesWarehouseProduct分页参数 模型
*/ */
export interface MesWarehouseProductPageParams extends BasicPageParams { export interface MesWarehouseProductPageParams extends BasicPageParams {
kczz: string; djbh: string;
ck: string; ck: string;
kgy: string;
scbm: string; scbm: string;
ywzz: string;
djzt: string;
pch: string;
} }
/** /**
...@@ -19,21 +23,25 @@ export interface MesWarehouseProductPageParams extends BasicPageParams { ...@@ -19,21 +23,25 @@ export interface MesWarehouseProductPageParams extends BasicPageParams {
export interface MesWarehouseProductPageModel { export interface MesWarehouseProductPageModel {
id: string; id: string;
kczz: string; djbh: string;
djrq: string; djrq: string;
ck: string;
crklx: string; crklx: string;
kgy: string; kgy: string;
scbm: string; scbm: string;
djbh: string; ck: string;
pch: string;
ywzz: string;
djzt: string; djzt: string;
bz: string;
} }
/** /**
...@@ -44,7 +52,7 @@ export interface MesWarehouseProductModel { ...@@ -44,7 +52,7 @@ export interface MesWarehouseProductModel {
deleteMark: string; deleteMark: string;
kczz: string; ywzz: string;
djrq: string; djrq: string;
...@@ -56,6 +64,8 @@ export interface MesWarehouseProductModel { ...@@ -56,6 +64,8 @@ export interface MesWarehouseProductModel {
scbm: string; scbm: string;
pch: string;
djbh: string; djbh: string;
djzt: string; djzt: string;
...@@ -186,6 +196,8 @@ export interface MesWarehouseProductInfoModel { ...@@ -186,6 +196,8 @@ export interface MesWarehouseProductInfoModel {
modifyDate: string; modifyDate: string;
modifyUserId: string; modifyUserId: string;
rkdh: string;
} }
/** /**
......
...@@ -6,7 +6,7 @@ import { BasicPageParams, BasicFetchResult } from '/@/api/model/baseModel'; ...@@ -6,7 +6,7 @@ import { BasicPageParams, BasicFetchResult } from '/@/api/model/baseModel';
export interface MesProductOutputPageParams extends BasicPageParams { export interface MesProductOutputPageParams extends BasicPageParams {
bh: string; bh: string;
lph: string; lch: string;
kh: string; kh: string;
...@@ -19,6 +19,8 @@ export interface MesProductOutputPageParams extends BasicPageParams { ...@@ -19,6 +19,8 @@ export interface MesProductOutputPageParams extends BasicPageParams {
cpbh: string; cpbh: string;
ccsj: string; ccsj: string;
ywzz: string;
} }
/** /**
...@@ -29,19 +31,21 @@ export interface MesProductOutputPageModel { ...@@ -29,19 +31,21 @@ export interface MesProductOutputPageModel {
bh: string; bh: string;
lph: string; lch: string;
kh: string; cpbh: string;
cpmc: string; cpmc: string;
csl: string; csl: string;
rkzt: string; kh: string;
cpbh: string; rkzt: string;
ccsj: string; ccsj: string;
ywzz: string;
} }
/** /**
...@@ -119,6 +123,16 @@ export interface MesProductOutputModel { ...@@ -119,6 +123,16 @@ export interface MesProductOutputModel {
modifyDate: string; modifyDate: string;
modifyUserId: string; modifyUserId: string;
ywzz: string;
lch: string;
zl: string;
ks: string;
cpid: string;
} }
/** /**
......
...@@ -8,9 +8,7 @@ enum Api { ...@@ -8,9 +8,7 @@ enum Api {
List = '/scgl/scjh/list', List = '/scgl/scjh/list',
Info = '/scgl/scjh/info', Info = '/scgl/scjh/info',
MesProductionPlan = '/scgl/scjh', MesProductionPlan = '/scgl/scjh',
Issue = '/scgl/scjh/issue',
} }
/** /**
...@@ -88,6 +86,17 @@ export async function deleteMesProductionPlan(ids: string[], mode: ErrorMessageM ...@@ -88,6 +86,17 @@ export async function deleteMesProductionPlan(ids: string[], mode: ErrorMessageM
); );
} }
/**
* @description: 下发任务
*/
export async function issueMesProductionPlan(ids: string[], mode: ErrorMessageMode = 'modal') {
return defHttp.post<boolean>(
{
url: Api.Issue,
data: { ids },
},
{
errorMessageMode: mode,
},
);
}
...@@ -8,6 +8,8 @@ export interface MesProductionPlanPageParams extends BasicPageParams { ...@@ -8,6 +8,8 @@ export interface MesProductionPlanPageParams extends BasicPageParams {
ddbh: string; ddbh: string;
ssgs: string;
zt: string; zt: string;
} }
...@@ -17,13 +19,13 @@ export interface MesProductionPlanPageParams extends BasicPageParams { ...@@ -17,13 +19,13 @@ export interface MesProductionPlanPageParams extends BasicPageParams {
export interface MesProductionPlanPageModel { export interface MesProductionPlanPageModel {
id: string; id: string;
jhbh: string;
ddbh: string; ddbh: string;
jhbh: string;
kh: string; kh: string;
jhjhrq: string; ssgs: string;
zt: string; zt: string;
} }
...@@ -84,6 +86,10 @@ export interface MesProductionPlanModel { ...@@ -84,6 +86,10 @@ export interface MesProductionPlanModel {
modifyUserId: string; modifyUserId: string;
lph: string;
ywzz: string;
mesProductionPlanProductList?: MesProductionPlanProductModel; mesProductionPlanProductList?: MesProductionPlanProductModel;
} }
......
...@@ -56,6 +56,12 @@ export const searchFormSchema: FormSchema[] = [ ...@@ -56,6 +56,12 @@ export const searchFormSchema: FormSchema[] = [
getPopupContainer: () => document.body, getPopupContainer: () => document.body,
}, },
}, },
{
field: 'cspc',
label: '厂商批次',
defaultValue: undefined,
component: 'Input',
},
]; ];
export const columns: BasicColumn[] = [ export const columns: BasicColumn[] = [
...@@ -175,6 +181,19 @@ export const columns: BasicColumn[] = [ ...@@ -175,6 +181,19 @@ export const columns: BasicColumn[] = [
styleConfig: undefined, styleConfig: undefined,
listStyle: undefined, listStyle: undefined,
}, },
{
resizable: true,
dataIndex: 'cspc',
title: '厂商批次',
componentType: 'input',
fixed: false,
sorter: true,
styleConfig: undefined,
listStyle: '',
},
]; ];
//表头合并配置 //表头合并配置
export const headerMergingData = []; export const headerMergingData = [];
...@@ -349,7 +368,6 @@ export const formProps: FormProps = { ...@@ -349,7 +368,6 @@ export const formProps: FormProps = {
{ key: 2, label: 'Option 2', value: 'Option 2' }, { key: 2, label: 'Option 2', value: 'Option 2' },
{ key: 3, label: 'Option 3', value: 'Option 3' }, { key: 3, label: 'Option 3', value: 'Option 3' },
], ],
defaultSelect: null,
datasourceType: 'dic', datasourceType: 'dic',
params: { itemId: '2010533622867509249' }, params: { itemId: '2010533622867509249' },
labelField: 'name', labelField: 'name',
...@@ -395,7 +413,6 @@ export const formProps: FormProps = { ...@@ -395,7 +413,6 @@ export const formProps: FormProps = {
{ key: 2, label: 'Option 2', value: 'Option 2' }, { key: 2, label: 'Option 2', value: 'Option 2' },
{ key: 3, label: 'Option 3', value: 'Option 3' }, { key: 3, label: 'Option 3', value: 'Option 3' },
], ],
defaultSelect: null,
datasourceType: 'dic', datasourceType: 'dic',
params: { itemId: '2010539474382962690' }, params: { itemId: '2010539474382962690' },
labelField: 'name', labelField: 'name',
...@@ -510,7 +527,6 @@ export const formProps: FormProps = { ...@@ -510,7 +527,6 @@ export const formProps: FormProps = {
{ key: 2, label: 'Option 2', value: 'Option 2' }, { key: 2, label: 'Option 2', value: 'Option 2' },
{ key: 3, label: 'Option 3', value: 'Option 3' }, { key: 3, label: 'Option 3', value: 'Option 3' },
], ],
defaultSelect: null,
datasourceType: 'dic', datasourceType: 'dic',
params: { itemId: '2015724355955159041' }, params: { itemId: '2015724355955159041' },
labelField: 'name', labelField: 'name',
...@@ -536,27 +552,35 @@ export const formProps: FormProps = { ...@@ -536,27 +552,35 @@ export const formProps: FormProps = {
span: 8, span: 8,
list: [ list: [
{ {
key: '4ca80a2d3a8244bc8d3380b6b0457c25', key: 'ac1495dbcbde4305b9e30167b92fcc7b',
field: 'zsl', field: 'cspc',
label: '总数量', label: '厂商批次',
type: 'number', type: 'input',
component: 'InputNumber', component: 'Input',
colProps: { span: 24 }, colProps: { span: 24 },
defaultValue: 0, defaultValue: '',
componentProps: { componentProps: {
width: '100%', width: '100%',
span: 7, span: 7,
defaultValue: 0, defaultValue: '',
min: 0, placeholder: '请输入厂商批次',
step: 1, maxlength: null,
prefix: '',
suffix: '',
addonBefore: '',
addonAfter: '',
disabled: false, disabled: false,
allowClear: false,
showLabel: true, showLabel: true,
controls: true,
required: false, required: false,
subTotal: false,
isShow: false,
rules: [], rules: [],
events: {}, events: {},
listStyle: '',
isSave: false,
isShow: true,
scan: false,
bordered: true,
isShowAi: false,
tooltipConfig: { visible: false, title: '提示文本' }, tooltipConfig: { visible: false, title: '提示文本' },
style: { width: '100%' }, style: { width: '100%' },
}, },
...@@ -664,6 +688,37 @@ export const formProps: FormProps = { ...@@ -664,6 +688,37 @@ export const formProps: FormProps = {
}, },
], ],
}, },
{
span: 8,
list: [
{
key: '4ca80a2d3a8244bc8d3380b6b0457c25',
field: 'zsl',
label: '总数量',
type: 'number',
component: 'InputNumber',
colProps: { span: 24 },
defaultValue: 0,
componentProps: {
width: '100%',
span: 7,
defaultValue: 0,
min: 0,
step: 1,
disabled: false,
showLabel: true,
controls: true,
required: false,
subTotal: false,
isShow: false,
rules: [],
events: {},
tooltipConfig: { visible: false, title: '提示文本' },
style: { width: '100%' },
},
},
],
},
], ],
componentProps: { componentProps: {
gutter: 16, gutter: 16,
...@@ -855,7 +910,6 @@ export const formProps: FormProps = { ...@@ -855,7 +910,6 @@ export const formProps: FormProps = {
span: '', span: '',
defaultValue: '', defaultValue: '',
placeholder: '', placeholder: '',
maxlength: null,
prefix: '', prefix: '',
suffix: '', suffix: '',
addonBefore: '', addonBefore: '',
...@@ -984,6 +1038,37 @@ export const formProps: FormProps = { ...@@ -984,6 +1038,37 @@ export const formProps: FormProps = {
}, },
}, },
{ {
key: 'd5ad3321ea444ead9034b6acb9e376a8',
title: '厂商批次',
dataIndex: 'cspc',
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: 'd2d0c0c885684a99a792beb3dc3415ba', key: 'd2d0c0c885684a99a792beb3dc3415ba',
title: '是否赠品', title: '是否赠品',
dataIndex: 'sfzp', dataIndex: 'sfzp',
......
...@@ -122,15 +122,15 @@ export const permissionList = [ ...@@ -122,15 +122,15 @@ export const permissionList = [
disabled: false, disabled: false,
isSaveTable: false, isSaveTable: false,
tableName: '', tableName: '',
fieldName: '总数量', fieldName: '厂商批次',
fieldId: 'zsl', fieldId: 'cspc',
isSubTable: false, isSubTable: false,
showChildren: true, showChildren: true,
type: 'number', type: 'input',
key: '4ca80a2d3a8244bc8d3380b6b0457c25', key: 'ac1495dbcbde4305b9e30167b92fcc7b',
children: [], children: [],
options: {}, options: {},
defaultValue: 0, defaultValue: '',
}, },
{ {
required: false, required: false,
...@@ -184,6 +184,23 @@ export const permissionList = [ ...@@ -184,6 +184,23 @@ export const permissionList = [
defaultValue: '', defaultValue: '',
}, },
{ {
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,
...@@ -355,6 +372,21 @@ export const permissionList = [ ...@@ -355,6 +372,21 @@ export const permissionList = [
isSaveTable: false, isSaveTable: false,
showChildren: false, showChildren: false,
tableName: 'mesWarehouseArrivedInfoList', tableName: 'mesWarehouseArrivedInfoList',
fieldName: '厂商批次',
fieldId: 'cspc',
type: 'Input',
key: 'd5ad3321ea444ead9034b6acb9e376a8',
children: [],
},
{
required: true,
view: true,
edit: true,
disabled: false,
isSubTable: false,
isSaveTable: false,
showChildren: false,
tableName: 'mesWarehouseArrivedInfoList',
fieldName: '是否赠品', fieldName: '是否赠品',
fieldId: 'sfzp', fieldId: 'sfzp',
type: 'Input', type: 'Input',
......
...@@ -427,7 +427,6 @@ export const formProps: FormProps = { ...@@ -427,7 +427,6 @@ export const formProps: FormProps = {
span: 7, span: 7,
defaultValue: '', defaultValue: '',
placeholder: '请输入供应商', placeholder: '请输入供应商',
maxlength: null,
prefix: '', prefix: '',
suffix: '', suffix: '',
addonBefore: '', addonBefore: '',
...@@ -533,7 +532,6 @@ export const formProps: FormProps = { ...@@ -533,7 +532,6 @@ export const formProps: FormProps = {
{ key: 2, label: 'Option 2', value: 'Option 2' }, { key: 2, label: 'Option 2', value: 'Option 2' },
{ key: 3, label: 'Option 3', value: 'Option 3' }, { key: 3, label: 'Option 3', value: 'Option 3' },
], ],
defaultSelect: null,
datasourceType: 'dic', datasourceType: 'dic',
params: { itemId: '2015724355955159041' }, params: { itemId: '2015724355955159041' },
labelField: 'name', labelField: 'name',
...@@ -816,6 +814,37 @@ export const formProps: FormProps = { ...@@ -816,6 +814,37 @@ export const formProps: FormProps = {
}, },
}, },
{ {
key: 'b32a9b93b59a40eab7ba494960fc46b4',
title: '批次号',
dataIndex: 'pch',
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: 'cb499ddb7a2f46d0a421a7ee8aa9769f', key: 'cb499ddb7a2f46d0a421a7ee8aa9769f',
title: '应收数量', title: '应收数量',
dataIndex: 'yssl', dataIndex: 'yssl',
......
...@@ -261,6 +261,21 @@ export const permissionList = [ ...@@ -261,6 +261,21 @@ export const permissionList = [
isSaveTable: false, isSaveTable: false,
showChildren: false, showChildren: false,
tableName: 'mesWarehouseInInfoList', tableName: 'mesWarehouseInInfoList',
fieldName: '批次号',
fieldId: 'pch',
type: 'Input',
key: 'b32a9b93b59a40eab7ba494960fc46b4',
children: [],
},
{
required: true,
view: true,
edit: true,
disabled: false,
isSubTable: false,
isSaveTable: false,
showChildren: false,
tableName: 'mesWarehouseInInfoList',
fieldName: '应收数量', fieldName: '应收数量',
fieldId: 'yssl', fieldId: 'yssl',
type: 'InputNumber', type: 'InputNumber',
......
...@@ -7,21 +7,38 @@ ...@@ -7,21 +7,38 @@
v-bind="$attrs" @register="registerModal" :title="getTitle" v-bind="$attrs" @register="registerModal" :title="getTitle"
@ok="handleSubmit" @cancel="handleClose" > @ok="handleSubmit" @cancel="handleClose" >
<ModalForm ref="formRef" v-model:value="state.formModel" :fromPage="FromPageType.MENU" /> <ModalForm ref="formRef" v-model:value="state.formModel" :fromPage="FromPageType.MENU" />
<template #footer v-if=" !state.isView">
<template v-for="(item, index) in sortBy(formButtons, 'index')" :key="item.key">
<template v-if="item.isShow">
<CustomButtonModal v-if="item.type == CustomButtonModalType.Modal" :info="item" />
<a-button
:type="item.style"
v-else
:style="{ marginLeft: index > 0 ? '10px' : 0 }"
@click="customClick(item)"
>
{{ t(item.name) }}
</a-button>
</template>
</template>
</template>
</BasicModal> </BasicModal>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { ref, computed, reactive, provide, Ref } from 'vue'; import { ref, computed, reactive, provide, Ref } from 'vue';
import { BasicModal, useModalInner } from '/@/components/Modal'; import { BasicModal, useModalInner } from '/@/components/Modal';
import { CustomButtonModalType } from '/@/enums/userEnum';
import CustomButtonModal from '/@/components/Form/src/components/CustomButtonModal.vue';
import { useMessage } from '/@/hooks/web/useMessage'; import { useMessage } from '/@/hooks/web/useMessage';
import { useI18n } from '/@/hooks/web/useI18n'; import { useI18n } from '/@/hooks/web/useI18n';
import { formProps } from './config'; import { formProps ,formButtons } from './config';
import ModalForm from './Form.vue'; import ModalForm from './Form.vue';
import { FromPageType } from '/@/enums/workflowEnum'; import { FromPageType } from '/@/enums/workflowEnum';
import { sortBy } from 'lodash-es';
import { executeCurFormEvent } from '/@/utils/event/data';
const emit = defineEmits(['success', 'register']); const emit = defineEmits(['success', 'register']);
...@@ -52,8 +69,8 @@ ...@@ -52,8 +69,8 @@
setModalProps({ setModalProps({
destroyOnClose: true, destroyOnClose: true,
maskClosable: false, maskClosable: false,
showCancelBtn: !state.isView, showCancelBtn: false,
showOkBtn: !state.isView, showOkBtn: false,
canFullscreen: true, canFullscreen: true,
width: 1980, width: 1980,
footer: state.isView ? null : undefined,defaultFullscreen:true, footer: state.isView ? null : undefined,defaultFullscreen:true,
...@@ -128,7 +145,18 @@ ...@@ -128,7 +145,18 @@
} }
} }
function customClick(item) {
if (item.key == 'confirm') {
handleSubmit();
} else if (item.key == 'cancel' && props.formType !== 'normal') {
handleClose();
closeModal();
} else if (item.key == 'reset') {
formRef.value.resetFields();
} else {
executeCurFormEvent(item.event, state.formModel, true);
}
}
function handleClose() { function handleClose() {
formRef.value.resetFields(); formRef.value.resetFields();
} }
......
export const permissionList = [ export const permissionList = [
{ {
required: false,
view: true,
edit: true,
disabled: false,
isSaveTable: false,
tableName: '',
fieldName: '开始盘点',
isSubTable: false,
showChildren: true,
type: 'button',
key: '3498b1519f97476e87627a4b7de4b268',
children: [],
options: {},
},
{
required: false,
view: true,
edit: true,
disabled: false,
isSaveTable: false,
tableName: '',
fieldName: '确认盘点',
isSubTable: false,
showChildren: true,
type: 'button',
key: 'b0b8fc72994d4f34a985bbf6880799f1',
children: [],
options: {},
},
{
required: false,
view: true,
edit: true,
disabled: false,
isSaveTable: false,
tableName: '',
fieldName: '取消盘点',
isSubTable: false,
showChildren: true,
type: 'button',
key: 'a2539c9a104248ab9cb0dedea1641b39',
children: [],
options: {},
},
{
required: true, required: true,
view: true, view: true,
edit: true, edit: true,
...@@ -163,42 +208,12 @@ export const permissionList = [ ...@@ -163,42 +208,12 @@ export const permissionList = [
isSaveTable: false, isSaveTable: false,
showChildren: false, showChildren: false,
tableName: 'mesWarehouseInventoryRelaList', tableName: 'mesWarehouseInventoryRelaList',
fieldName: '系统数量',
fieldId: 'xtsl',
type: 'InputNumber',
key: 'ec3ea4fd15ae4cae803fe45b18c0e4b1',
children: [],
},
{
required: true,
view: true,
edit: true,
disabled: false,
isSubTable: false,
isSaveTable: false,
showChildren: false,
tableName: 'mesWarehouseInventoryRelaList',
fieldName: '盘点数量', fieldName: '盘点数量',
fieldId: 'pdsl', fieldId: 'pdsl',
type: 'InputNumber', type: 'InputNumber',
key: 'a2b46aaba5264ee79e83eeeda69990d0', key: 'a2b46aaba5264ee79e83eeeda69990d0',
children: [], children: [],
}, },
{
required: true,
view: true,
edit: true,
disabled: false,
isSubTable: false,
isSaveTable: false,
showChildren: false,
tableName: 'mesWarehouseInventoryRelaList',
fieldName: '差额',
fieldId: 'ce',
type: 'InputNumber',
key: '312fc725ea894778851d52c25a20eba4',
children: [],
},
], ],
}, },
]; ];
...@@ -141,7 +141,7 @@ ...@@ -141,7 +141,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":"import","icon":"ant-design:import-outlined","isDefault":true},{"isUse":true,"name":"快速导出","code":"export","icon":"ant-design:export-outlined","isDefault":true},{"isUse":true,"name":"删除","code":"delete","icon":"ant-design:delete-outlined","isDefault":true}] const list = [{"buttonId":"2010901323197190144","name":"查看","code":"view","icon":"ant-design:eye-outlined","isDefault":true,"isUse":true},{"buttonId":"2010901323201384448","name":"新增","code":"add","icon":"ant-design:plus-outlined","isDefault":true,"isUse":true},{"buttonId":"2010901323201384449","name":"编辑","code":"edit","icon":"ant-design:form-outlined","isDefault":true,"isUse":true,"isEnableLock":true},{"buttonId":"2010901323201384450","name":"快速导入","code":"import","icon":"ant-design:import-outlined","isDefault":true,"isUse":true},{"buttonId":"2010901323201384451","name":"快速导出","code":"export","icon":"ant-design:export-outlined","isDefault":true,"isUse":true},{"buttonId":"2010901323201384452","name":"删除","code":"delete","icon":"ant-design:delete-outlined","isDefault":true,"isUse":true}]
return filterButtonAuth(list); return filterButtonAuth(list);
}) })
......
<template>
<div class="pt-4">
<SimpleForm
ref="systemFormRef"
:formProps="data.formDataProps"
:formModel="state.formModel"
:isWorkFlow="props.fromPage!=FromPageType.MENU"
:isCamelCase="true"
@model-change="handleChange"
/>
</div>
</template>
<script lang="ts" setup>
import { reactive, ref, onMounted, nextTick, watch } from 'vue';
import { formProps, formEventConfigs } from './config';
import SimpleForm from '/@/components/SimpleForm/src/SimpleForm.vue';
import { addMesWarehouseProfitandloss, getMesWarehouseProfitandloss, updateMesWarehouseProfitandloss } from '/@/api/ckgl/kcyk';
import { cloneDeep, isString } from 'lodash-es';
import { FormDataProps } from '/@/components/Designer/src/types';
import { usePermission } from '/@/hooks/web/usePermission';
import CustomButtonModal from '/@/components/Form/src/components/CustomButtonModal.vue';
import { FromPageType } from '/@/enums/workflowEnum';
import { createFormEvent, getFormDataEvent, loadFormEvent, submitFormEvent,} from '/@/hooks/web/useFormEvent';
import { changeWorkFlowForm, changeSchemaDisabled } from '/@/hooks/web/useWorkFlowForm';
import { WorkFlowFormParams } from '/@/model/workflow/bpmnConfig';
import { useRouter } from 'vue-router';
const { filterFormSchemaAuth } = usePermission();
const RowKey = 'id';
const emits = defineEmits(['changeUploadComponentIds','loadingCompleted', 'update:value']);
const props = defineProps({
fromPage: {
type: Number,
default: FromPageType.MENU,
},
});
const systemFormRef = ref();
const data: { formDataProps: FormDataProps } = reactive({
formDataProps: cloneDeep(formProps),
});
const state = reactive({
formModel: {},
formInfo:{formId:'',formName:''}
});
const { currentRoute } = useRouter();
watch(
() => state.formModel,
(val) => {
emits('update:value', val);
},
{
deep: true,
},
);
onMounted(async () => {
try {
if (props.fromPage == FromPageType.MENU) {
setMenuPermission();
if(currentRoute.value.meta){
state.formInfo.formName = currentRoute.value.meta.title&&isString(currentRoute.value.meta.title)?currentRoute.value.meta.title:'';
state.formInfo.formId = currentRoute.value.meta.formId&&isString(currentRoute.value.meta.formId)?currentRoute.value.meta.formId:'';
}
await createFormEvent(formEventConfigs, state.formModel,
systemFormRef.value,
formProps.schemas, true, state.formInfo.formName,state.formInfo.formId); //表单事件:初始化表单
await nextTick();
await loadFormEvent(formEventConfigs, state.formModel,
systemFormRef.value,
formProps.schemas, true, state.formInfo.formName,state.formInfo.formId); //表单事件:加载表单
} else if (props.fromPage == FromPageType.FLOW) {
emits('loadingCompleted'); //告诉系统表单已经加载完毕
// loadingCompleted后 工作流页面直接利用Ref调用setWorkFlowForm方法
} else if (props.fromPage == FromPageType.PREVIEW) {
// 预览 无需权限,表单事件也无需执行
} else if (props.fromPage == FromPageType.DESKTOP) {
// 桌面设计 表单事件需要执行
emits('loadingCompleted'); //告诉系统表单已经加载完毕
await createFormEvent(formEventConfigs, state.formModel,
systemFormRef.value,
formProps.schemas, true, state.formInfo.formName,state.formInfo.formId); //表单事件:初始化表单
await loadFormEvent(formEventConfigs, state.formModel,
systemFormRef.value,
formProps.schemas, true, state.formInfo.formName,state.formInfo.formId); //表单事件:加载表单
}
} catch (error) {}
});
// 根据菜单页面权限,设置表单属性(必填,禁用,显示)
function setMenuPermission() {
data.formDataProps.schemas = filterFormSchemaAuth(data.formDataProps.schemas!);
}
// 校验form 通过返回表单数据
async function validate() {
let values = [];
try {
values = await systemFormRef.value?.validate();
//添加隐藏组件
if (data.formDataProps.hiddenComponent?.length) {
data.formDataProps.hiddenComponent.forEach((component) => {
values[component.bindField] = component.value;
});
}
} finally {
}
return values;
}
// 根据行唯一ID查询行数据,并设置表单数据 【编辑】
async function setFormDataFromId(rowId) {
try {
const record = await getMesWarehouseProfitandloss(rowId);
setFieldsValue(record);
state.formModel = record;
await getFormDataEvent(formEventConfigs, state.formModel,
systemFormRef.value,
formProps.schemas, true, state.formInfo.formName,state.formInfo.formId); //表单事件:获取表单数据
} catch (error) {
}
}
// 辅助返回表单数据
async function getFieldsValue() {
let values = [];
try {
values = await systemFormRef.value?.getFieldsValue();
//添加隐藏组件
if (data.formDataProps.hiddenComponent?.length) {
data.formDataProps.hiddenComponent.forEach((component) => {
values[component.bindField] = component.value;
});
}
} finally {
}
return values;
}
// 辅助设置表单数据
function setFieldsValue(record) {
systemFormRef.value.setFieldsValue(record);
}
// 重置表单数据
async function resetFields() {
await systemFormRef.value.resetFields();
}
// 设置表单数据全部为Disabled 【查看】
async function setDisabledForm( ) {
data.formDataProps.schemas = changeSchemaDisabled(cloneDeep(data.formDataProps.schemas));
}
// 获取行键值
function getRowKey() {
return RowKey;
}
// 更新api表单数据
async function update({ values, rowId }) {
try {
values[RowKey] = rowId;
state.formModel = values;
let saveVal = await updateMesWarehouseProfitandloss(values);
await submitFormEvent(formEventConfigs, state.formModel,
systemFormRef.value,
formProps.schemas, true, state.formInfo.formName,state.formInfo.formId); //表单事件:提交表单
return saveVal;
} catch (error) {}
}
// 新增api表单数据
async function add(values) {
try {
state.formModel = values;
let saveVal = await addMesWarehouseProfitandloss(values);
await submitFormEvent(formEventConfigs, state.formModel,
systemFormRef.value,
formProps.schemas, true, state.formInfo.formName,state.formInfo.formId); //表单事件:提交表单
return saveVal;
} catch (error) {}
}
// 根据工作流页面权限,设置表单属性(必填,禁用,显示)
async function setWorkFlowForm(obj: WorkFlowFormParams) {
try {
if (obj.formId) state.formInfo.formId = obj.formId;
if (obj.formName) state.formInfo.formName = obj.formName;
let flowData = await changeWorkFlowForm(cloneDeep(formProps), obj);
let { buildOptionJson, uploadComponentIds, formModels, isViewProcess } = flowData;
data.formDataProps = buildOptionJson;
emits('changeUploadComponentIds', uploadComponentIds); //工作流中必须保存上传组件id【附件汇总需要】
if (isViewProcess) {
setDisabledForm(); //查看
}
state.formModel = formModels;
setFieldsValue(formModels);
} catch (error) {}
await createFormEvent(formEventConfigs, state.formModel,
systemFormRef.value,
formProps.schemas, true, state.formInfo.formName,state.formInfo.formId); //表单事件:初始化表单
await loadFormEvent(formEventConfigs, state.formModel,
systemFormRef.value,
formProps.schemas, true, state.formInfo.formName,state.formInfo.formId); //表单事件:加载表单
}
function handleChange(val) {
emits('update:value', val);
}
async function sendMessageForAllIframe() {
try {
if (systemFormRef.value && systemFormRef.value.sendMessageForAllIframe) {
systemFormRef.value.sendMessageForAllIframe();
}
} catch (error) {}
}
defineExpose({
setFieldsValue,
resetFields,
validate,
add,
update,
setFormDataFromId,
setDisabledForm,
setMenuPermission,
setWorkFlowForm,
getRowKey,
getFieldsValue,
sendMessageForAllIframe
});
</script>
\ No newline at end of file
<template>
<BasicModal
:height="1080"
v-bind="$attrs" @register="registerModal" :title="getTitle"
@ok="handleSubmit" @cancel="handleClose" >
<ModalForm ref="formRef" v-model:value="state.formModel" :fromPage="FromPageType.MENU" />
</BasicModal>
</template>
<script lang="ts" setup>
import { ref, computed, reactive, provide, Ref } from 'vue';
import { BasicModal, useModalInner } from '/@/components/Modal';
import { useMessage } from '/@/hooks/web/useMessage';
import { useI18n } from '/@/hooks/web/useI18n';
import { formProps } from './config';
import ModalForm from './Form.vue';
import { FromPageType } from '/@/enums/workflowEnum';
const emit = defineEmits(['success', 'register']);
const { notification } = useMessage();
const formRef = ref();
const isCopy = ref<boolean>(false)
const state = reactive({
formModel: {},
isUpdate: true,
isView: false,
rowId: '',
});
provide<Ref<boolean>>('isCopy', isCopy);
const { t } = useI18n();
const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
await handleInner(data);
});
const getTitle = computed(() => (state.isView ? '查看' : state.isUpdate ? '编辑' : isCopy.value ? '复制数据' : '新增'));
async function handleInner(data){
state.isUpdate = !!data?.isUpdate;
state.isView = !!data?.isView;
isCopy.value = !!data?.isCopy;
setModalProps({
destroyOnClose: true,
maskClosable: false,
showCancelBtn: !state.isView,
showOkBtn: !state.isView,
canFullscreen: true,
width: 1980,
footer: state.isView ? null : undefined,defaultFullscreen:true,
});
if (state.isUpdate || state.isView || isCopy.value) {
state.rowId = data.id;
if (state.isView) {
await formRef.value.setDisabledForm();
}
await formRef.value.setFormDataFromId(state.rowId);
} else {
formRef.value.resetFields();
}
}
async function saveModal() {
let saveSuccess = false;
try {
const values = await formRef.value?.validate();
//添加隐藏组件
if (formProps.hiddenComponent?.length) {
formProps.hiddenComponent.forEach((component) => {
values[component.bindField] = component.value;
});
}
if (values !== false) {
try {
if (!state.isUpdate || isCopy.value) {
saveSuccess = await formRef.value.add(values);
} else {
saveSuccess = await formRef.value.update({ values, rowId: state.rowId });
}
return saveSuccess;
} catch (error) {}
}
} catch (error) {
return saveSuccess;
}
}
async function handleSubmit() {
try {
const saveSuccess = await saveModal();
setModalProps({ confirmLoading: true });
if (saveSuccess) {
if (!state.isUpdate || isCopy.value) {
//false 新增
notification.success({
message: 'Tip',
description: isCopy.value ? '复制成功' : t('新增成功!'),
}); //提示消息
} else {
notification.success({
message: 'Tip',
description: t('修改成功!'),
}); //提示消息
}
closeModal();
formRef.value.resetFields();
emit('success');
}
} finally {
setModalProps({ confirmLoading: false });
}
}
function handleClose() {
formRef.value.resetFields();
}
</script>
\ No newline at end of file
export const permissionList = [
{
required: false,
view: true,
edit: true,
disabled: false,
isSaveTable: false,
tableName: '',
fieldName: '产品编码',
fieldId: 'cpbm',
isSubTable: false,
showChildren: true,
type: 'input',
key: '2e7416cc5a0f443c9fc6c6cad7beee27',
children: [],
options: {},
defaultValue: '',
},
{
required: false,
view: true,
edit: true,
disabled: false,
isSaveTable: false,
tableName: '',
fieldName: '产品名称',
fieldId: 'cpmc',
isSubTable: false,
showChildren: true,
type: 'input',
key: '2c53a58060824f98b2402df0f9db7806',
children: [],
options: {},
defaultValue: '',
},
{
required: false,
view: true,
edit: true,
disabled: false,
isSaveTable: false,
tableName: '',
fieldName: '仓库',
fieldId: 'ck',
isSubTable: false,
showChildren: true,
type: 'input',
key: '52ef022eff7247689f7aafe21f546140',
children: [],
options: {},
defaultValue: '',
},
{
required: false,
view: true,
edit: true,
disabled: false,
isSaveTable: false,
tableName: '',
fieldName: '批次号',
fieldId: 'pch',
isSubTable: false,
showChildren: true,
type: 'input',
key: '2b50d71167144489b6c05ee94996f53a',
children: [],
options: {},
defaultValue: '',
},
{
required: false,
view: true,
edit: true,
disabled: false,
isSaveTable: false,
tableName: '',
fieldName: '系统数量',
fieldId: 'xtsl',
isSubTable: false,
showChildren: true,
type: 'input',
key: 'c29582cdbd274b0cbd798fe5a4642cc9',
children: [],
options: {},
defaultValue: '',
},
{
required: false,
view: true,
edit: true,
disabled: false,
isSaveTable: false,
tableName: '',
fieldName: '盘点数量',
fieldId: 'pdsl',
isSubTable: false,
showChildren: true,
type: 'input',
key: 'c04bb88244fe43349bebf968fdce3ce9',
children: [],
options: {},
defaultValue: '',
},
{
required: false,
view: true,
edit: true,
disabled: false,
isSaveTable: false,
tableName: '',
fieldName: '单位',
fieldId: 'dw',
isSubTable: false,
showChildren: true,
type: 'input',
key: 'a5c69cf2f1424b3fa6dae4ebf37fae27',
children: [],
options: {},
defaultValue: '',
},
{
required: false,
view: true,
edit: true,
disabled: false,
isSaveTable: false,
tableName: '',
fieldName: '差额',
fieldId: 'ce',
isSubTable: false,
showChildren: true,
type: 'input',
key: '10186fcaa02b4481be4c236037f0783a',
children: [],
options: {},
defaultValue: '',
},
{
required: false,
view: true,
edit: true,
disabled: false,
isSaveTable: false,
tableName: '',
fieldName: '盈亏状态',
fieldId: 'ykzt',
isSubTable: false,
showChildren: true,
type: 'input',
key: 'b62f769fa46d453fa562c8ea6f6e0c50',
children: [],
options: {},
defaultValue: '',
},
{
required: false,
view: true,
edit: true,
disabled: false,
isSaveTable: false,
tableName: '',
fieldName: '业务组织',
fieldId: 'ywzz',
isSubTable: false,
showChildren: true,
type: 'input',
key: '2ea1f1f551ed4c7b949bb11a1d792192',
children: [],
options: {},
defaultValue: '',
},
{
required: false,
view: true,
edit: true,
disabled: false,
isSaveTable: false,
tableName: '',
fieldName: '盘点单ID',
fieldId: 'pddid',
isSubTable: false,
showChildren: true,
type: 'input',
key: '018031d351d24bfebfeec15cd57cfa95',
children: [],
options: {},
defaultValue: '',
},
];
<template>
<ResizePageWrapper :hasLeft="false">
<template #resizeRight>
<BasicTable @register="registerTable" isMenuTable ref="tableRef" :row-selection="{ selectedRowKeys: selectedKeys, onChange: onSelectChange }"
>
<template #toolbar>
<template v-for="button in tableButtonConfig" :key="button.code">
<a-button v-if="button.isDefault" type="primary" @click="buttonClick(button.code)">
<template #icon><Icon :icon="button.icon" /></template>
{{ button.name }}
</a-button>
<CustomButtonModal v-else-if="button.buttonType == 'modal'" :info="button" />
<a-button v-else :type="button.buttonType === 'danger' ? 'default' : button.buttonType || 'primary'" :danger="button.buttonType === 'danger'" >
<template #icon><Icon :icon="button.icon" /></template>
{{ button.name }}
</a-button>
</template>
</template>
<template #bodyCell="{ column, record }">
<template v-if="column.dataIndex === 'action'">
<TableAction
:actions="getLessActions(record)"
:dropDownActions="getMoreActions(record)"
/>
</template>
<template v-else-if="column.dataIndex && column?.listStyle">
<span :style="executeListStyle(getValue(record, column, 'style'), column?.listStyle)">{{
getValue(record, column, 'value')
}}</span>
</template>
</template>
</BasicTable>
</template>
<KcykModal @register="registerModal" @success="handleFormSuccess" @cancel="handleFormCancel"/>
</ResizePageWrapper>
</template>
<script lang="ts" setup>
import { ref, computed,provide,Ref,
} from 'vue';
import { BasicTable, useTable, TableAction, ActionItem } from '/@/components/Table';
import { getMesWarehouseProfitandlossPage, deleteMesWarehouseProfitandloss} from '/@/api/ckgl/kcyk';
import { ResizePageWrapper } from '/@/components/Page';
import { useMessage } from '/@/hooks/web/useMessage';
import { useI18n } from '/@/hooks/web/useI18n';
import { usePermission } from '/@/hooks/web/usePermission';
import CustomButtonModal from '/@/components/Form/src/components/CustomButtonModal.vue';
import { executeListStyle, getValue } from '/@/hooks/web/useListStyle';//列表样式配置
import { useRouter } from 'vue-router';
import { useModal } from '/@/components/Modal';
import KcykModal from './components/KcykModal.vue';
import { searchFormSchema, columns } from './components/config';
import Icon from '/@/components/Icon/index';
const listSpliceNum = ref(3); //操作列最先展示几个
import { useConcurrentLock } from '/@/hooks/web/useConcurrentLock';
const pageParamsInfo = ref<any>({});
const { enableLockeData,handleOpenFormEnableLockeData, handleCloseFormEnableLocke, handleHasEnableLocke } =
useConcurrentLock();
const { notification } = useMessage();
const { t } = useI18n();
defineEmits(['register']);
const { filterColumnAuth, filterButtonAuth, hasPermission } = usePermission();
const filterColumns = filterColumnAuth(columns);
const tableRef = ref();
//展示在列表内的按钮
const actionButtons = ref<string[]>(["create"]);
const buttonConfigs = computed(()=>{
const list = [{"isUse":true,"name":"生成单据","code":"create","icon":"ant-design:download-outlined","isDefault":false,"setting":[],"showType":"inline","buttonType":"primary"}]
return filterButtonAuth(list);
})
const tableButtonConfig = computed(() => {
return buttonConfigs.value?.filter((x) => !actionButtons.value.includes(x.code));
});
const actionButtonConfig = computed(() => {
return buttonConfigs.value?.filter((x) => actionButtons.value.includes(x.code));
});
const btnEvent = {}
const { currentRoute } = useRouter();
const formIdComputedRef = computed(() => currentRoute.value.meta.formId as string);
provide<Ref<string>>('currentFormId', formIdComputedRef);
const selectedKeys = ref<string[]>([]);
const selectedRowsData = ref<any[]>([]);
const [registerModal, { openModal }] = useModal();
const [registerTable, { reload, }] = useTable({
title: 'Kcyk列表',
api: getMesWarehouseProfitandlossPage,
rowKey: 'id',
columns: filterColumns,
pagination: {
pageSize: 10,
},
formConfig: {
labelWidth: 100,
schemas: searchFormSchema,
fieldMapToTime: [],
showResetButton: false,
},
bordered:false,
beforeFetch: (params) => {
pageParamsInfo.value = {...params, FormId: formIdComputedRef.value,PK: 'id' }
return pageParamsInfo.value;
},
afterFetch: (res) => {
selectedKeys.value = [];
selectedRowsData.value = [];
},
useSearchForm: true,
showTableSetting: true,
striped: false,
actionColumn: {
width: 65,
title: '操作',
dataIndex: 'action',
slots: { customRender: 'action' },
},
tableSetting: {
size: false,
},
customRow,
isAdvancedQuery: false,
querySelectOption: JSON.stringify(searchFormSchema),
objectId: formIdComputedRef.value, ////系统表单formId,自定义表单releaseId的id值
});
function buttonClick(code) {
btnEvent[code]();
}
function onSelectChange(selectedRowKeys: [], selectedRows) {
selectedKeys.value = selectedRowKeys;
selectedRowsData.value = selectedRows;
}
function customRow(record: Recordable) {
return {
onClick: () => {
let selectedRowKeys = [...selectedKeys.value];
if (selectedRowKeys.indexOf(record.id) >= 0) {
let index = selectedRowKeys.indexOf(record.id);
selectedRowKeys.splice(index, 1);
} else {
selectedRowKeys.push(record.id);
}
selectedKeys.value = selectedRowKeys;
},
ondblclick: () => {
if (record.isCanEdit && hasPermission("kcyk:edit")) {
handleEdit(record);
}
},
};
}
function handleSuccess() {
selectedKeys.value = [];
selectedRowsData.value = [];
reload();
}
function handleFormSuccess() {
handleSuccess();
handleCloseFormEnableLocke(buttonConfigs.value, 'edit');
}
function handleFormCancel() {
handleCloseFormEnableLocke(buttonConfigs.value, 'edit');
}
function getLessActions(record: Recordable) {
let list = getActions(record);
return list.slice(0, listSpliceNum.value);
}
function getMoreActions(record: Recordable) {
let list = getActions(record);
return list.slice(listSpliceNum.value);
}
function getActions(record: Recordable):ActionItem[] {
record.isCanEdit = false;
let actionsList: ActionItem[] = [];
actionButtonConfig.value?.map((button) => {
if (!record?.workflowData?.processId) {
record.isCanEdit = true;
actionsList.push({
...button,
auth: `kcyk:${button.code}`,
label: button?.name,
color: button.code === 'delete' ? 'error' : undefined,
onClick: btnEvent[button.code]?.bind(null, record),
});
} else {
if (!['edit', 'delete'].includes(button.code)) {
actionsList.push({
auth: `kcyk:${button.code}`,
label: button?.name,
onClick: btnEvent[button.code]?.bind(null, record),
});
}
}
});
return actionsList;
}
</script>
<style lang="less" scoped>
:deep(.ant-table-selection-col) {
width: 50px;
}
.show{
display: flex;
}
.hide{
display: none !important;
}
</style>
\ No newline at end of file
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
v-bind="$attrs" v-bind="$attrs"
@register="registerModal" @register="registerModal"
title="生成领料单" title="生成领料单"
width="700px" width="1000px"
:confirmLoading="loading" :confirmLoading="loading"
@ok="handleOk" @ok="handleOk"
@cancel="handleCancel" @cancel="handleCancel"
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
/* 表格数据 */ /* 表格数据 */
const tableData = ref<any[]>([]); const tableData = ref<any[]>([]);
/* 加载状态 */ /* 加载状态 */
const loading = ref(false); const loading = ref(false);
...@@ -42,19 +42,21 @@ ...@@ -42,19 +42,21 @@
const columns: BasicColumn[] = [ const columns: BasicColumn[] = [
{ title: '物料编码', dataIndex: 'wlbh', width: 120 }, { title: '物料编码', dataIndex: 'wlbh', width: 120 },
{ title: '物料名称', dataIndex: 'wlmc', width: 200 }, { title: '物料名称', dataIndex: 'wlmc', width: 200 },
{ title: '备料数量', dataIndex: 'blsl', width: 200 },
{ title: '库存数量', dataIndex: 'kcl', width: 200 },
{ {
title: '领料数量', title: '领料数量',
dataIndex: 'blsl', dataIndex: 'sl',
width: 130, width: 130,
// 常驻输入框 // 常驻输入框
customRender: ({ record }) => customRender: ({ record }) =>
h(InputNumber, { h(InputNumber, {
value: record.blsl, value: 0,
min: 0, min: 0,
max: 999999, max: 999999,
size: 'small', size: 'small',
style: { width: '100%' }, style: { width: '100%' },
onChange: (val) => (record.blsl = val), // onChange: (val) => (record.sl = val),
}), }),
}, },
]; ];
...@@ -69,7 +71,7 @@ ...@@ -69,7 +71,7 @@
async function handleOk() { async function handleOk() {
// 防止重复提交 // 防止重复提交
if (loading.value) return; if (loading.value) return;
// 简单校验:数量不能全 0 // 简单校验:数量不能全 0
const allZero = tableData.value.every((r) => r.blsl === 0); const allZero = tableData.value.every((r) => r.blsl === 0);
if (allZero) { if (allZero) {
...@@ -77,11 +79,20 @@ ...@@ -77,11 +79,20 @@
return; return;
} }
// 校验库存数量是否足够
const insufficientItem = tableData.value.find((r) => (r.kcl || 0) < (r.blsl || 0));
if (insufficientItem) {
createMessage.warning(`${insufficientItem.wlmc}库存数量不足`);
return;
}
// 构建请求参数 // 构建请求参数
const requestData = tableData.value.map(item => ({ const requestData = tableData.value.map((item) => ({
wlbm: item.wlbh, // 物料编码 wlbm: item.wlbh, // 物料编码
wlmc: item.wlmc, // 物料名称 wlmc: item.wlmc, // 物料名称
sl: item.blsl || 0 // 领料数量 blsl: item.blsl || 0, // 备料数量
kcl: item.kcl || 0, // 库存数量
sl: item.sl || 0, // 领料数量
})); }));
loading.value = true; loading.value = true;
...@@ -94,9 +105,9 @@ ...@@ -94,9 +105,9 @@
}, },
{ {
errorMessageMode: 'message', errorMessageMode: 'message',
} },
); );
// 接口调用成功 // 接口调用成功
createMessage.success('领料单生成成功'); createMessage.success('领料单生成成功');
emit('success', tableData.value); // 回传完整数组 emit('success', tableData.value); // 回传完整数组
......
...@@ -29,6 +29,28 @@ export const searchFormSchema: FormSchema[] = [ ...@@ -29,6 +29,28 @@ export const searchFormSchema: FormSchema[] = [
placeholder: '请选择', placeholder: '请选择',
}, },
}, },
{
field: 'ywzz',
label: '业务组织',
defaultValue: undefined,
component: 'Input',
},
{
field: 'zt',
label: '单据状态',
defaultValue: undefined,
component: 'XjrSelect',
componentProps: {
datasourceType: 'dic',
params: { itemId: '2016321281785163777' },
labelField: 'name',
valueField: 'value',
mode: 'multiple',
showSearch: true,
getPopupContainer: () => document.body,
},
},
]; ];
export const columns: BasicColumn[] = [ export const columns: BasicColumn[] = [
...@@ -86,8 +108,8 @@ export const columns: BasicColumn[] = [ ...@@ -86,8 +108,8 @@ export const columns: BasicColumn[] = [
{ {
resizable: true, resizable: true,
dataIndex: 'llkczz', dataIndex: 'kgy',
title: '领料库存组织', title: '库管员',
componentType: 'input', componentType: 'input',
fixed: false, fixed: false,
...@@ -99,8 +121,8 @@ export const columns: BasicColumn[] = [ ...@@ -99,8 +121,8 @@ export const columns: BasicColumn[] = [
{ {
resizable: true, resizable: true,
dataIndex: 'kgy', dataIndex: 'ywzz',
title: '库管员', title: '业务组织',
componentType: 'input', componentType: 'input',
fixed: false, fixed: false,
...@@ -112,6 +134,19 @@ export const columns: BasicColumn[] = [ ...@@ -112,6 +134,19 @@ export const columns: BasicColumn[] = [
{ {
resizable: true, resizable: true,
dataIndex: 'zt',
title: '单据状态',
componentType: 'select',
fixed: false,
sorter: true,
styleConfig: undefined,
listStyle: undefined,
},
{
resizable: true,
dataIndex: 'bz', dataIndex: 'bz',
title: '备注', title: '备注',
componentType: 'input', componentType: 'input',
...@@ -325,8 +360,8 @@ export const formProps: FormProps = { ...@@ -325,8 +360,8 @@ export const formProps: FormProps = {
list: [ list: [
{ {
key: 'cc6c68d8b8f740e0a4d16f334508e0c3', key: 'cc6c68d8b8f740e0a4d16f334508e0c3',
field: 'llkczz', field: 'ywzz',
label: '领料库存组织', label: '业务组织',
type: 'input', type: 'input',
component: 'Input', component: 'Input',
colProps: { span: 24 }, colProps: { span: 24 },
...@@ -335,7 +370,7 @@ export const formProps: FormProps = { ...@@ -335,7 +370,7 @@ export const formProps: FormProps = {
width: '100%', width: '100%',
span: 7, span: 7,
defaultValue: '', defaultValue: '',
placeholder: '请输入领料库存组织', placeholder: '请输入业务组织',
prefix: '', prefix: '',
suffix: '', suffix: '',
addonBefore: '', addonBefore: '',
...@@ -397,38 +432,45 @@ export const formProps: FormProps = { ...@@ -397,38 +432,45 @@ export const formProps: FormProps = {
], ],
}, },
{ {
span: 24, span: 8,
list: [ list: [
{ {
key: '47ae1b1e159b4f5787e9d59f219a3e9f', key: '9cdba668d8b348e8a581859ade8585b2',
field: 'bz', field: 'zt',
label: '备注', label: '单据状态',
type: 'input', type: 'select',
component: 'Input', component: 'XjrSelect',
colProps: { span: 24 }, colProps: { span: 24 },
defaultValue: '',
componentProps: { componentProps: {
width: '100%', width: '100%',
span: 2, span: 7,
defaultValue: '', placeholder: '请选择下拉选择',
placeholder: '请输入备注',
prefix: '',
suffix: '',
addonBefore: '',
addonAfter: '',
disabled: false,
allowClear: false,
showLabel: true, 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' },
],
datasourceType: 'dic',
params: { itemId: '2016321281785163777' },
labelField: 'name',
valueField: 'value',
apiConfig: {
path: 'CodeGeneration/selection',
method: 'GET',
apiId: '93d735dcb7364a0f8102188ec4d77ac7',
},
dicOptions: [],
required: false, required: false,
rules: [], rules: [],
events: {}, events: {},
listStyle: '',
isSave: false,
isShow: true, isShow: true,
scan: false,
bordered: true,
isShowAi: false,
tooltipConfig: { visible: false, title: '提示文本' }, tooltipConfig: { visible: false, title: '提示文本' },
itemId: '2016321281785163777',
style: { width: '100%' }, style: { width: '100%' },
}, },
}, },
...@@ -464,6 +506,44 @@ export const formProps: FormProps = { ...@@ -464,6 +506,44 @@ export const formProps: FormProps = {
}, },
], ],
}, },
{
span: 24,
list: [
{
key: '47ae1b1e159b4f5787e9d59f219a3e9f',
field: 'bz',
label: '备注',
type: 'input',
component: 'Input',
colProps: { span: 24 },
defaultValue: '',
componentProps: {
width: '100%',
span: 2,
defaultValue: '',
placeholder: '请输入备注',
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: '提示文本' },
style: { width: '100%' },
},
},
],
},
], ],
componentProps: { componentProps: {
gutter: 16, gutter: 16,
...@@ -610,30 +690,6 @@ export const formProps: FormProps = { ...@@ -610,30 +690,6 @@ export const formProps: FormProps = {
}, },
}, },
{ {
key: '1026628c881d477b890e57ffd408b77a',
title: '数量',
dataIndex: 'sl',
componentType: 'InputNumber',
defaultValue: 0,
componentProps: {
width: '100%',
span: '',
defaultValue: 0,
min: 0,
step: 1,
disabled: false,
showLabel: true,
controls: true,
required: false,
subTotal: false,
isShow: true,
rules: [],
events: {},
tooltipConfig: { visible: false, title: '提示文本' },
listStyle: "return 'width:100%'",
},
},
{
key: '6561cde6f9ee4fd6a898ed3e3618eaca', key: '6561cde6f9ee4fd6a898ed3e3618eaca',
title: '货位号', title: '货位号',
dataIndex: 'hwh', dataIndex: 'hwh',
...@@ -664,9 +720,9 @@ export const formProps: FormProps = { ...@@ -664,9 +720,9 @@ export const formProps: FormProps = {
}, },
}, },
{ {
key: 'c90814d02b6f420f93d397202c8803fd', key: '1026628c881d477b890e57ffd408b77a',
title: '应发数量', title: '数量',
dataIndex: 'yfsl', dataIndex: 'sl',
componentType: 'InputNumber', componentType: 'InputNumber',
defaultValue: 0, defaultValue: 0,
componentProps: { componentProps: {
...@@ -712,6 +768,36 @@ export const formProps: FormProps = { ...@@ -712,6 +768,36 @@ export const formProps: FormProps = {
}, },
}, },
{ {
key: 'ee29558be5e24c4ca2a706ebfae5fd7a',
title: '批次号',
dataIndex: 'pch',
componentType: 'Input',
defaultValue: '',
componentProps: {
width: '100%',
span: '',
defaultValue: '',
placeholder: '请输入批次号',
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: '8e0d25fb158a46c9a482d0f957cb88ae', key: '8e0d25fb158a46c9a482d0f957cb88ae',
title: '备注', title: '备注',
dataIndex: 'bz', dataIndex: 'bz',
......
...@@ -72,8 +72,8 @@ export const permissionList = [ ...@@ -72,8 +72,8 @@ export const permissionList = [
disabled: false, disabled: false,
isSaveTable: false, isSaveTable: false,
tableName: '', tableName: '',
fieldName: '领料库存组织', fieldName: '业务组织',
fieldId: 'llkczz', fieldId: 'ywzz',
isSubTable: false, isSubTable: false,
showChildren: true, showChildren: true,
type: 'input', type: 'input',
...@@ -106,15 +106,14 @@ export const permissionList = [ ...@@ -106,15 +106,14 @@ export const permissionList = [
disabled: false, disabled: false,
isSaveTable: false, isSaveTable: false,
tableName: '', tableName: '',
fieldName: '备注', fieldName: '单据状态',
fieldId: 'bz', fieldId: 'zt',
isSubTable: false, isSubTable: false,
showChildren: true, showChildren: true,
type: 'input', type: 'select',
key: '47ae1b1e159b4f5787e9d59f219a3e9f', key: '9cdba668d8b348e8a581859ade8585b2',
children: [], children: [],
options: {}, options: {},
defaultValue: '',
}, },
{ {
required: false, required: false,
...@@ -134,6 +133,23 @@ export const permissionList = [ ...@@ -134,6 +133,23 @@ export const permissionList = [
defaultValue: '', defaultValue: '',
}, },
{ {
required: false,
view: true,
edit: true,
disabled: false,
isSaveTable: false,
tableName: '',
fieldName: '备注',
fieldId: 'bz',
isSubTable: false,
showChildren: true,
type: 'input',
key: '47ae1b1e159b4f5787e9d59f219a3e9f',
children: [],
options: {},
defaultValue: '',
},
{
required: true, required: true,
view: true, view: true,
edit: true, edit: true,
...@@ -215,10 +231,10 @@ export const permissionList = [ ...@@ -215,10 +231,10 @@ export const permissionList = [
isSaveTable: false, isSaveTable: false,
showChildren: false, showChildren: false,
tableName: 'mesWarehousePromaterialInfoList', tableName: 'mesWarehousePromaterialInfoList',
fieldName: '数量', fieldName: '货位号',
fieldId: 'sl', fieldId: 'hwh',
type: 'InputNumber', type: 'Input',
key: '1026628c881d477b890e57ffd408b77a', key: '6561cde6f9ee4fd6a898ed3e3618eaca',
children: [], children: [],
}, },
{ {
...@@ -230,10 +246,10 @@ export const permissionList = [ ...@@ -230,10 +246,10 @@ export const permissionList = [
isSaveTable: false, isSaveTable: false,
showChildren: false, showChildren: false,
tableName: 'mesWarehousePromaterialInfoList', tableName: 'mesWarehousePromaterialInfoList',
fieldName: '货位号', fieldName: '数量',
fieldId: 'hwh', fieldId: 'sl',
type: 'Input', type: 'InputNumber',
key: '6561cde6f9ee4fd6a898ed3e3618eaca', key: '1026628c881d477b890e57ffd408b77a',
children: [], children: [],
}, },
{ {
...@@ -245,10 +261,10 @@ export const permissionList = [ ...@@ -245,10 +261,10 @@ export const permissionList = [
isSaveTable: false, isSaveTable: false,
showChildren: false, showChildren: false,
tableName: 'mesWarehousePromaterialInfoList', tableName: 'mesWarehousePromaterialInfoList',
fieldName: '发数量', fieldName: '发数量',
fieldId: 'yfsl', fieldId: 'sfsl',
type: 'InputNumber', type: 'InputNumber',
key: 'c90814d02b6f420f93d397202c8803fd', key: 'aed6a337f7a447538e0eb2faec5f9f06',
children: [], children: [],
}, },
{ {
...@@ -260,10 +276,10 @@ export const permissionList = [ ...@@ -260,10 +276,10 @@ export const permissionList = [
isSaveTable: false, isSaveTable: false,
showChildren: false, showChildren: false,
tableName: 'mesWarehousePromaterialInfoList', tableName: 'mesWarehousePromaterialInfoList',
fieldName: '实发数量', fieldName: '批次号',
fieldId: 'sfsl', fieldId: 'pch',
type: 'InputNumber', type: 'Input',
key: 'aed6a337f7a447538e0eb2faec5f9f06', key: 'ee29558be5e24c4ca2a706ebfae5fd7a',
children: [], children: [],
}, },
{ {
......
...@@ -134,7 +134,7 @@ ...@@ -134,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 = [{"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},{"buttonId":"2013779484670955520","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}] const list = [{"buttonId":"2010557152968171520","name":"查看","code":"view","icon":"ant-design:eye-outlined","isDefault":true,"isUse":true},{"buttonId":"2010557152968171521","name":"新增","code":"add","icon":"ant-design:plus-outlined","isDefault":true,"isUse":true},{"buttonId":"2010557152972365824","name":"编辑","code":"edit","icon":"ant-design:form-outlined","isDefault":true,"isUse":true,"isEnableLock":true},{"buttonId":"2013779484670955520","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);
}) })
...@@ -146,7 +146,7 @@ ...@@ -146,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,edit : handleEdit,print : handlePrint,delete : handleDelete,} const btnEvent = {view : handleView,add : handleAdd,edit : handleEdit,print : handlePrint,delete : handleDelete,}
const { currentRoute } = useRouter(); const { currentRoute } = useRouter();
...@@ -222,6 +222,13 @@ ...@@ -222,6 +222,13 @@
} }
function handleAdd() {
openModal(true, { isUpdate: false, });
}
async function handleEdit(record: Recordable) { async function handleEdit(record: Recordable) {
let field = 'id'; let field = 'id';
......
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: 'kczz', fieldId: 'djbh',
isSubTable: false, isSubTable: false,
showChildren: true, showChildren: true,
type: 'input', type: 'auto-code',
key: 'b7fc1a99eb11469fbffd723f8ce0629f', key: '783643292ed9482fae0d3a37d2ebef65',
children: [], children: [],
options: {}, options: {},
defaultValue: '',
}, },
{ {
required: false, required: false,
...@@ -44,11 +43,10 @@ export const permissionList = [ ...@@ -44,11 +43,10 @@ export const permissionList = [
fieldId: 'ck', fieldId: 'ck',
isSubTable: false, isSubTable: false,
showChildren: true, showChildren: true,
type: 'input', type: 'select',
key: '0f17a0106f2348bbbc3d19889815b9c7', key: '7a643e99ca7242c9a606dc550981d6af',
children: [], children: [],
options: {}, options: {},
defaultValue: '',
}, },
{ {
required: false, required: false,
...@@ -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: 'djbh', fieldId: 'ywzz',
isSubTable: false, isSubTable: false,
showChildren: true, showChildren: true,
type: 'input', type: 'select',
key: 'd5e600afe891410882c273a7bc1b2ca2', key: 'b4b870255bc248e3adb580c6dbcbaac1',
children: [], children: [],
options: {}, options: {},
defaultValue: '',
}, },
{ {
required: false, required: false,
...@@ -129,11 +126,10 @@ export const permissionList = [ ...@@ -129,11 +126,10 @@ export const permissionList = [
fieldId: 'djzt', fieldId: 'djzt',
isSubTable: false, isSubTable: false,
showChildren: true, showChildren: true,
type: 'input', type: 'select',
key: '320589395feb4544a4c0b9ff283e3b2f', key: '16ad4aafe99c4797966fc6e01bc63e90',
children: [], children: [],
options: {}, options: {},
defaultValue: '',
}, },
{ {
required: false, required: false,
...@@ -142,12 +138,12 @@ export const permissionList = [ ...@@ -142,12 +138,12 @@ export const permissionList = [
disabled: false, disabled: false,
isSaveTable: false, isSaveTable: false,
tableName: '', tableName: '',
fieldName: '上传附件', fieldName: '批次号',
fieldId: 'fj', fieldId: 'pch',
isSubTable: false, isSubTable: false,
showChildren: true, showChildren: true,
type: 'upload', type: 'input',
key: '904dcc9c92f2492eba6f775a2602847b', key: 'ec89abed664a4341acd26ac8509d311a',
children: [], children: [],
options: {}, options: {},
defaultValue: '', defaultValue: '',
...@@ -176,6 +172,23 @@ export const permissionList = [ ...@@ -176,6 +172,23 @@ export const permissionList = [
disabled: false, disabled: false,
isSaveTable: false, isSaveTable: false,
tableName: '', tableName: '',
fieldName: '上传附件',
fieldId: 'fj',
isSubTable: false,
showChildren: true,
type: 'upload',
key: '904dcc9c92f2492eba6f775a2602847b',
children: [],
options: {},
defaultValue: '',
},
{
required: false,
view: true,
edit: true,
disabled: false,
isSaveTable: false,
tableName: '',
fieldName: 'ID', fieldName: 'ID',
fieldId: 'id', fieldId: 'id',
isSubTable: false, isSubTable: false,
......
...@@ -133,7 +133,7 @@ ...@@ -133,7 +133,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":"2010538548100980736","name":"查看","code":"view","icon":"ant-design:eye-outlined","isDefault":true,"isUse":true},{"buttonId":"2010538548100980737","name":"新增","code":"add","icon":"ant-design:plus-outlined","isDefault":true,"isUse":true},{"buttonId":"2010538548100980738","name":"编辑","code":"edit","icon":"ant-design:form-outlined","isDefault":true,"isUse":true,"isEnableLock":true},{"buttonId":"2010538548100980739","name":"删除","code":"delete","icon":"ant-design:delete-outlined","isDefault":true,"isUse":true}]
return filterButtonAuth(list); return filterButtonAuth(list);
}) })
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<BasicModal <BasicModal
:height="500" :height="400"
v-bind="$attrs" @register="registerModal" :title="getTitle" v-bind="$attrs" @register="registerModal" :title="getTitle"
@ok="handleSubmit" @cancel="handleClose" > @ok="handleSubmit" @cancel="handleClose" >
<ModalForm ref="formRef" v-model:value="state.formModel" :fromPage="FromPageType.MENU" /> <ModalForm ref="formRef" v-model:value="state.formModel" :fromPage="FromPageType.MENU" />
...@@ -72,7 +72,7 @@ ...@@ -72,7 +72,7 @@
showCancelBtn: false, showCancelBtn: false,
showOkBtn: false, showOkBtn: false,
canFullscreen: true, canFullscreen: true,
width: 900, width: 1400,
footer: state.isView ? null : undefined,defaultFullscreen:true, footer: state.isView ? null : undefined,defaultFullscreen:true,
}); });
......
...@@ -2,29 +2,28 @@ export const permissionList = [ ...@@ -2,29 +2,28 @@ export const permissionList = [
{ {
required: false, required: false,
view: true, view: true,
edit: true, edit: false,
disabled: false, disabled: true,
isSaveTable: false, isSaveTable: false,
tableName: '', tableName: '',
fieldName: '编号', fieldName: '编号',
fieldId: 'bh', fieldId: 'bh',
isSubTable: false, isSubTable: false,
showChildren: true, showChildren: true,
type: 'input', type: 'auto-code',
key: 'c31870ac60a74049bbf979f225394251', key: 'ea62ca64d4e04d7b9b5113ccbfcfe537',
children: [], children: [],
options: {}, options: {},
defaultValue: '',
}, },
{ {
required: false, required: false,
view: true, view: true,
edit: true, edit: false,
disabled: false, disabled: false,
isSaveTable: false, isSaveTable: false,
tableName: '', tableName: '',
fieldName: '炉号', fieldName: '炉号',
fieldId: 'lph', fieldId: 'lch',
isSubTable: false, isSubTable: false,
showChildren: true, showChildren: true,
type: 'input', type: 'input',
...@@ -36,7 +35,7 @@ export const permissionList = [ ...@@ -36,7 +35,7 @@ export const permissionList = [
{ {
required: false, required: false,
view: true, view: true,
edit: true, edit: false,
disabled: false, disabled: false,
isSaveTable: false, isSaveTable: false,
tableName: '', tableName: '',
...@@ -52,7 +51,24 @@ export const permissionList = [ ...@@ -52,7 +51,24 @@ export const permissionList = [
{ {
required: false, required: false,
view: true, view: true,
edit: true, edit: false,
disabled: false,
isSaveTable: false,
tableName: '',
fieldName: '重量',
fieldId: 'zl',
isSubTable: false,
showChildren: true,
type: 'number',
key: 'dc4db2b098ab4dd198655c04b27f4df6',
children: [],
options: {},
defaultValue: '',
},
{
required: false,
view: true,
edit: false,
disabled: false, disabled: false,
isSaveTable: false, isSaveTable: false,
tableName: '', tableName: '',
...@@ -69,11 +85,11 @@ export const permissionList = [ ...@@ -69,11 +85,11 @@ export const permissionList = [
{ {
required: false, required: false,
view: true, view: true,
edit: true, edit: false,
disabled: false, disabled: false,
isSaveTable: false, isSaveTable: false,
tableName: '', tableName: '',
fieldName: '产出量', fieldName: '产出量',
fieldId: 'csl', fieldId: 'csl',
isSubTable: false, isSubTable: false,
showChildren: true, showChildren: true,
...@@ -81,7 +97,6 @@ export const permissionList = [ ...@@ -81,7 +97,6 @@ export const permissionList = [
key: '1c0bf170e3ba4be78474821571cda0e6', key: '1c0bf170e3ba4be78474821571cda0e6',
children: [], children: [],
options: {}, options: {},
defaultValue: 0,
}, },
{ {
required: false, required: false,
...@@ -102,7 +117,24 @@ export const permissionList = [ ...@@ -102,7 +117,24 @@ export const permissionList = [
{ {
required: false, required: false,
view: true, view: true,
edit: true, edit: false,
disabled: false,
isSaveTable: false,
tableName: '',
fieldName: '捆数',
fieldId: 'ks',
isSubTable: false,
showChildren: true,
type: 'number',
key: '9b0eb4203d0f48bda446532f1db3cbdb',
children: [],
options: {},
defaultValue: '',
},
{
required: false,
view: true,
edit: false,
disabled: false, disabled: false,
isSaveTable: false, isSaveTable: false,
tableName: '', tableName: '',
...@@ -119,7 +151,7 @@ export const permissionList = [ ...@@ -119,7 +151,7 @@ export const permissionList = [
{ {
required: false, required: false,
view: true, view: true,
edit: true, edit: false,
disabled: false, disabled: false,
isSaveTable: false, isSaveTable: false,
tableName: '', tableName: '',
...@@ -134,7 +166,7 @@ export const permissionList = [ ...@@ -134,7 +166,7 @@ export const permissionList = [
defaultValue: '', defaultValue: '',
}, },
{ {
required: true, required: false,
view: true, view: true,
edit: true, edit: true,
disabled: false, disabled: false,
...@@ -145,7 +177,7 @@ export const permissionList = [ ...@@ -145,7 +177,7 @@ export const permissionList = [
isSubTable: false, isSubTable: false,
showChildren: true, showChildren: true,
type: 'select', type: 'select',
key: 'lkajsldjaljdla', key: 'd0e0407ab883414baed7b5e4ac06dca1',
children: [], children: [],
options: {}, options: {},
}, },
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<template #resizeRight> <template #resizeRight>
<BasicTable @register="registerTable" isMenuTable ref="tableRef" :row-selection="{ selectedRowKeys: selectedKeys, onChange: onSelectChange }" <BasicTable @register="registerTable" isMenuTable ref="tableRef"
> >
...@@ -131,7 +131,7 @@ ...@@ -131,7 +131,7 @@
//展示在列表内的按钮 //展示在列表内的按钮
const actionButtons = ref<string[]>(["view"]); const actionButtons = ref<string[]>(["view"]);
const buttonConfigs = computed(()=>{ const buttonConfigs = computed(()=>{
const list = [{"name":"查看","code":"view","icon":"ant-design:eye-outlined","isDefault":true,"isUse":true},{"buttonId":"2010596152129912832","name":"入库申请","code":"rksq","icon":"","isDefault":false,"isUse":true,"setting":[],"showType":"top","buttonType":"primary"}] const list = [{"buttonId":"2010597918263234560","name":"查看","code":"view","icon":"ant-design:eye-outlined","isDefault":true,"isUse":true}]
return filterButtonAuth(list); return filterButtonAuth(list);
}) })
...@@ -155,8 +155,6 @@ ...@@ -155,8 +155,6 @@
const selectedKeys = ref<string[]>([]);
const selectedRowsData = ref<any[]>([]);
...@@ -189,8 +187,6 @@ ...@@ -189,8 +187,6 @@
selectedKeys.value = [];
selectedRowsData.value = [];
}, },
useSearchForm: true, useSearchForm: true,
...@@ -232,24 +228,10 @@ ...@@ -232,24 +228,10 @@
function onSelectChange(selectedRowKeys: [], selectedRows) {
selectedKeys.value = selectedRowKeys;
selectedRowsData.value = selectedRows;
}
function customRow(record: Recordable) { function customRow(record: Recordable) {
return { return {
onClick: () => {
let selectedRowKeys = [...selectedKeys.value];
if (selectedRowKeys.indexOf(record.id) >= 0) {
let index = selectedRowKeys.indexOf(record.id);
selectedRowKeys.splice(index, 1);
} else {
selectedRowKeys.push(record.id);
}
selectedKeys.value = selectedRowKeys;
},
ondblclick: () => { ondblclick: () => {
if (record.isCanEdit && hasPermission("ccmx:edit")) { if (record.isCanEdit && hasPermission("ccmx:edit")) {
handleEdit(record); handleEdit(record);
...@@ -261,8 +243,6 @@ ...@@ -261,8 +243,6 @@
function handleSuccess() { function handleSuccess() {
selectedKeys.value = [];
selectedRowsData.value = [];
reload(); reload();
} }
......
...@@ -100,8 +100,8 @@ export const columns: BasicColumn[] = [ ...@@ -100,8 +100,8 @@ export const columns: BasicColumn[] = [
{ {
resizable: true, resizable: true,
dataIndex: 'zch', dataIndex: 'lch',
title: '次号', title: '次号',
componentType: 'input', componentType: 'input',
fixed: false, fixed: false,
...@@ -909,8 +909,8 @@ export const formProps: FormProps = { ...@@ -909,8 +909,8 @@ export const formProps: FormProps = {
list: [ list: [
{ {
key: 'fada4c1222a94076a8e811c6489ce593', key: 'fada4c1222a94076a8e811c6489ce593',
field: 'zch', field: 'lch',
label: '次号', label: '次号',
type: 'input', type: 'input',
component: 'Input', component: 'Input',
colProps: { span: 24 }, colProps: { span: 24 },
...@@ -919,7 +919,7 @@ export const formProps: FormProps = { ...@@ -919,7 +919,7 @@ export const formProps: FormProps = {
width: '100%', width: '100%',
span: 7, span: 7,
defaultValue: '', defaultValue: '',
placeholder: '请输入铸次号', placeholder: '',
prefix: '', prefix: '',
suffix: '', suffix: '',
addonBefore: '', addonBefore: '',
...@@ -973,7 +973,7 @@ export const formProps: FormProps = { ...@@ -973,7 +973,7 @@ export const formProps: FormProps = {
style: { width: '100%' }, style: { width: '100%' },
}, },
}, },
{ /*{
key: 'dca82bcd3e7b44dfa96df1bc5a8d3ff3', key: 'dca82bcd3e7b44dfa96df1bc5a8d3ff3',
field: 'rch', field: 'rch',
label: '熔次号', label: '熔次号',
...@@ -1005,6 +1005,54 @@ export const formProps: FormProps = { ...@@ -1005,6 +1005,54 @@ export const formProps: FormProps = {
tooltipConfig: { visible: false, title: '提示文本' }, tooltipConfig: { visible: false, title: '提示文本' },
style: { width: '100%' }, style: { width: '100%' },
}, },
},*/
{
key: 'lkajsldjaljdla',
field: 'ywzz',
label: '业务组织',
type: 'select',
component: 'XjrSelect',
colProps: { span: 24 },
componentProps: {
width: '100%',
span: 7,
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',
labelField: 'name',
valueField: 'value',
apiConfig: {
path: '/bmxx/getCompanyList',
method: 'GET',
apiId: 'copy1765431632890d13798',
apiParams: [
{ key: '1', title: 'Query Params', tableInfo: [] },
{ key: '2', title: 'Header', tableInfo: [] },
{ key: '3', title: 'Body' },
],
script:
'var sql="select id as value,name as label from res_company";\r\nreturn db.select(sql);',
},
dicOptions: [],
required: true,
rules: [],
events: {},
isShow: true,
tooltipConfig: { visible: false, title: '提示文本' },
params: { itemId: '2015724355955159041' },
itemId: '2015724355955159041',
style: { width: '100%' },
},
}, },
{ {
key: 'dc5d1cdc42b34094a3d6af5ee787e0df', key: 'dc5d1cdc42b34094a3d6af5ee787e0df',
...@@ -1093,54 +1141,7 @@ export const formProps: FormProps = { ...@@ -1093,54 +1141,7 @@ export const formProps: FormProps = {
{ {
span: 8, span: 8,
list: [ list: [
{
key: 'lkajsldjaljdla',
field: 'ywzz',
label: '业务组织',
type: 'select',
component: 'XjrSelect',
colProps: { span: 24 },
componentProps: {
width: '100%',
span: 7,
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',
labelField: 'name',
valueField: 'value',
apiConfig: {
path: '/bmxx/getCompanyList',
method: 'GET',
apiId: 'copy1765431632890d13798',
apiParams: [
{ key: '1', title: 'Query Params', tableInfo: [] },
{ key: '2', title: 'Header', tableInfo: [] },
{ key: '3', title: 'Body' },
],
script:
'var sql="select id as value,name as label from res_company";\r\nreturn db.select(sql);',
},
dicOptions: [],
required: true,
rules: [],
events: {},
isShow: true,
tooltipConfig: { visible: false, title: '提示文本' },
params: { itemId: '2015724355955159041' },
itemId: '2015724355955159041',
style: { width: '100%' },
},
},
], ],
}, },
], ],
......
...@@ -302,8 +302,8 @@ export const permissionList = [ ...@@ -302,8 +302,8 @@ export const permissionList = [
disabled: false, disabled: false,
isSaveTable: false, isSaveTable: false,
tableName: '', tableName: '',
fieldName: '次号', fieldName: '次号',
fieldId: 'zch', fieldId: 'lch',
isSubTable: false, isSubTable: false,
showChildren: true, showChildren: true,
type: 'input', type: 'input',
......
export const permissionList = [ export const permissionList = [
{ {
required: true, required: false,
view: true,
edit: true,
disabled: false,
isSaveTable: false,
tableName: '',
fieldName: '业务组织',
fieldId: 'ywzz',
isSubTable: false,
showChildren: true,
type: 'select',
key: 'lkajsldjaljdla',
children: [],
options: {},
},
{
required: true,
view: true, view: true,
edit: true, edit: false,
disabled: false, disabled: true,
isSaveTable: false, isSaveTable: false,
tableName: '', tableName: '',
fieldName: '计划编号', fieldName: '计划编号',
fieldId: 'jhbh', fieldId: 'jhbh',
isSubTable: false, isSubTable: false,
showChildren: true, showChildren: true,
type: 'input', type: 'auto-code',
key: 'bb401260571f476c9816266b858aa2fa', key: '192945cba90645f593eb7e21a4776c97',
children: [], children: [],
options: {}, options: {},
defaultValue: '',
}, },
{ {
required: false, required: false,
...@@ -128,20 +111,19 @@ export const permissionList = [ ...@@ -128,20 +111,19 @@ export const permissionList = [
fieldId: 'kh', fieldId: 'kh',
isSubTable: false, isSubTable: false,
showChildren: true, showChildren: true,
type: 'input', type: 'select',
key: '105fe8a606b74e0ca90ea9ff1d20b648', key: 'dbb3bfcc0aa54e84b31adc2ba45dd48b',
children: [], children: [],
options: {}, options: {},
defaultValue: '',
}, },
{ {
required: false, required: true,
view: true, view: true,
edit: true, edit: true,
disabled: false, disabled: false,
isSaveTable: false, isSaveTable: false,
tableName: '', tableName: '',
fieldName: '所属公司', fieldName: '业务组织',
fieldId: 'ssgs', fieldId: 'ssgs',
isSubTable: false, isSubTable: false,
showChildren: true, showChildren: true,
...@@ -158,7 +140,7 @@ export const permissionList = [ ...@@ -158,7 +140,7 @@ export const permissionList = [
isSubTable: true, isSubTable: true,
showChildren: false, showChildren: false,
tableName: 'mesProductionPlanProductList', tableName: 'mesProductionPlanProductList',
fieldName: '表格组件', fieldName: '',
fieldId: 'mesProductionPlanProductList', fieldId: 'mesProductionPlanProductList',
type: 'form', type: 'form',
key: '24ea4c6631d047a1a8e7c3fe86ab080c', key: '24ea4c6631d047a1a8e7c3fe86ab080c',
...@@ -172,25 +154,10 @@ export const permissionList = [ ...@@ -172,25 +154,10 @@ export const permissionList = [
isSaveTable: false, isSaveTable: false,
showChildren: false, showChildren: false,
tableName: 'mesProductionPlanProductList', tableName: 'mesProductionPlanProductList',
fieldName: 'id', fieldName: '产品ID',
fieldId: 'id',
type: 'Input',
key: '0b5e3de2d92f4a1cba6a650cff672653',
children: [],
},
{
required: true,
view: true,
edit: true,
disabled: false,
isSubTable: false,
isSaveTable: false,
showChildren: false,
tableName: 'mesProductionPlanProductList',
fieldName: '产品选择',
fieldId: 'cpid', fieldId: 'cpid',
type: 'MultiplePopup', type: 'Input',
key: '416cd1b15c314d0dafaf6fc91e3f4653', key: 'd762849da7e741a7b004c1c81b91593a',
children: [], children: [],
}, },
{ {
...@@ -315,6 +282,6 @@ export const permissionList = [ ...@@ -315,6 +282,6 @@ export const permissionList = [
key: 'f7ae7fe08ec74cf6b91cd3cd35cfeaaf', key: 'f7ae7fe08ec74cf6b91cd3cd35cfeaaf',
children: [], children: [],
options: {}, options: {},
defaultValue: '1', defaultValue: '草稿',
}, },
]; ];
...@@ -17,7 +17,8 @@ ...@@ -17,7 +17,8 @@
<a-button <a-button
v-else v-else
:type="button.buttonType === 'danger' ? 'default' : button.buttonType || 'primary'" :type="button.buttonType === 'danger' ? 'default' : button.buttonType || 'primary'"
:danger="button.buttonType === 'danger'" @click="buttonClick(button.code)" :danger="button.buttonType === 'danger'"
@click="buttonClick(button.code)"
> >
<template #icon><Icon :icon="button.icon" /></template> <template #icon><Icon :icon="button.icon" /></template>
{{ button.name }} {{ button.name }}
...@@ -50,7 +51,11 @@ ...@@ -50,7 +51,11 @@
import { Modal } from 'ant-design-vue'; import { Modal } from 'ant-design-vue';
import { ExclamationCircleOutlined } from '@ant-design/icons-vue'; import { ExclamationCircleOutlined } from '@ant-design/icons-vue';
import { BasicTable, useTable, TableAction, ActionItem } from '/@/components/Table'; import { BasicTable, useTable, TableAction, ActionItem } from '/@/components/Table';
import { getMesProductionPlanPage, deleteMesProductionPlan } from '/@/api/scgl/scjh'; import {
getMesProductionPlanPage,
deleteMesProductionPlan,
issueMesProductionPlan,
} from '/@/api/scgl/scjh';
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';
...@@ -70,8 +75,6 @@ ...@@ -70,8 +75,6 @@
const listSpliceNum = ref(3); //操作列最先展示几个 const listSpliceNum = ref(3); //操作列最先展示几个
import { useConcurrentLock } from '/@/hooks/web/useConcurrentLock'; import { useConcurrentLock } from '/@/hooks/web/useConcurrentLock';
import axios from 'axios';
import { useUserStore } from '/@/store/modules/user';
const pageParamsInfo = ref<any>({}); const pageParamsInfo = ref<any>({});
const { const {
...@@ -149,7 +152,13 @@ ...@@ -149,7 +152,13 @@
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,
add: handleAdd,
edit: handleEdit,
delete: handleDelete,
xiafa: handleXiafa,
};
const { currentRoute } = useRouter(); const { currentRoute } = useRouter();
...@@ -204,40 +213,6 @@ ...@@ -204,40 +213,6 @@
}); });
function buttonClick(code) { function buttonClick(code) {
const store = useUserStore()
const ids = selectedRowsData.value.map((x) => x.id)
if (code === 'xiafa') {
//如果状态是已下发就直接禁止提交 提示警告
if (selectedRowsData.value.some((x) => x.status === '已下发')) {
notification.warning({
message: '提示信息',
description: '请勿重复下发任务!',
});
return;
}else{
Modal.confirm({
title: '提示信息',
icon: createVNode(ExclamationCircleOutlined),
content: '是否确认下发任务?',
okText: '确认',
cancelText: '取消',
onOk() {
axios
.post(import.meta.env.VITE_GLOB_API_URL + '/scgl/scjh/issue', { ids } , {headers: { Authorization: 'Bearer '+store.getToken } })
.then((res) => {
if (res.data === '下发成功') {
notification.success({
message: '提示信息',
description: res.data,
});
}
});
},
});
}
}
btnEvent[code](); btnEvent[code]();
} }
...@@ -338,6 +313,33 @@ ...@@ -338,6 +313,33 @@
openModal(true, info); openModal(true, info);
} }
function handleXiafa(record: Recordable) {
if (selectedKeys.value.length === 0) {
Modal.warning({
title: '提示',
content: '请选择计划',
});
return;
}
const hasNonDraft = selectedRowsData.value.some((item) => item.zt !== '草稿');
if (hasNonDraft) {
Modal.warning({
title: '提示',
content: '非草稿计划无法下发任务任务',
});
return;
}
const ids = selectedRowsData.value.map((x) => x.id);
issueMesProductionPlan(ids).then((_) => {
handleSuccess();
notification.success({
message: 'Tip',
description: '下发成功!',
});
});
}
function getLessActions(record: Recordable) { function getLessActions(record: Recordable) {
let list = getActions(record); let list = getActions(record);
return list.slice(0, listSpliceNum.value); return list.slice(0, listSpliceNum.value);
......
...@@ -99,29 +99,17 @@ export const columns: BasicColumn[] = [ ...@@ -99,29 +99,17 @@ export const columns: BasicColumn[] = [
{ {
resizable: true, resizable: true,
dataIndex: 'rch', dataIndex: 'lch',
title: '次号', title: '次号',
componentType: 'input', componentType: 'input',
fixed: false, fixed: false,
sorter: true, sorter: true,
styleConfig: undefined, styleConfig: undefined,
listStyle: '', listStyle: undefined,
}, },
{
resizable: true,
dataIndex: 'zch',
title: '铸次号',
componentType: 'input',
fixed: false,
sorter: true,
styleConfig: undefined,
listStyle: '',
},
{ {
resizable: true, resizable: true,
...@@ -273,6 +261,54 @@ export const formProps: FormProps = { ...@@ -273,6 +261,54 @@ export const formProps: FormProps = {
}, },
}, },
{ {
key: 'lkajsldjaljdla',
field: 'ywzz',
label: '业务组织',
type: 'select',
component: 'XjrSelect',
colProps: { span: 24 },
componentProps: {
width: '100%',
span: 7,
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',
labelField: 'name',
valueField: 'value',
apiConfig: {
path: '/bmxx/getCompanyList',
method: 'GET',
apiId: 'copy1765431632890d13798',
apiParams: [
{ key: '1', title: 'Query Params', tableInfo: [] },
{ key: '2', title: 'Header', tableInfo: [] },
{ key: '3', title: 'Body' },
],
script:
'var sql="select id as value,name as label from res_company";\r\nreturn db.select(sql);',
},
dicOptions: [],
required: true,
rules: [],
events: {},
isShow: true,
tooltipConfig: { visible: false, title: '提示文本' },
params: { itemId: '2015724355955159041' },
itemId: '2015724355955159041',
style: { width: '100%' },
},
},
/* {
key: 'b22f0a133613428f84ee08c70c61311b', key: 'b22f0a133613428f84ee08c70c61311b',
field: 'zch', field: 'zch',
label: '铸次号', label: '铸次号',
...@@ -304,7 +340,7 @@ export const formProps: FormProps = { ...@@ -304,7 +340,7 @@ export const formProps: FormProps = {
tooltipConfig: { visible: false, title: '提示文本' }, tooltipConfig: { visible: false, title: '提示文本' },
style: { width: '100%' }, style: { width: '100%' },
}, },
}, },*/
{ {
key: '25e30bcce47a437fb5674d9dbce3523a', key: '25e30bcce47a437fb5674d9dbce3523a',
field: 'zl', field: 'zl',
...@@ -686,9 +722,9 @@ export const formProps: FormProps = { ...@@ -686,9 +722,9 @@ export const formProps: FormProps = {
span: 6, span: 6,
list: [ list: [
{ {
key: '3c95be972e5b4ebfb6fc32a629199a07', key: 'fsdfsdf',
field: 'rch', field: 'lch',
label: '次号', label: '次号',
type: 'input', type: 'input',
component: 'Input', component: 'Input',
colProps: { span: 24 }, colProps: { span: 24 },
...@@ -810,54 +846,7 @@ export const formProps: FormProps = { ...@@ -810,54 +846,7 @@ export const formProps: FormProps = {
{ {
span: 6, span: 6,
list: [ list: [
{
key: 'lkajsldjaljdla',
field: 'ywzz',
label: '业务组织',
type: 'select',
component: 'XjrSelect',
colProps: { span: 24 },
componentProps: {
width: '100%',
span: 7,
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',
labelField: 'name',
valueField: 'value',
apiConfig: {
path: '/bmxx/getCompanyList',
method: 'GET',
apiId: 'copy1765431632890d13798',
apiParams: [
{ key: '1', title: 'Query Params', tableInfo: [] },
{ key: '2', title: 'Header', tableInfo: [] },
{ key: '3', title: 'Body' },
],
script:
'var sql="select id as value,name as label from res_company";\r\nreturn db.select(sql);',
},
dicOptions: [],
required: true,
rules: [],
events: {},
isShow: true,
tooltipConfig: { visible: false, title: '提示文本' },
params: { itemId: '2015724355955159041' },
itemId: '2015724355955159041',
style: { width: '100%' },
},
},
], ],
}, },
], ],
...@@ -1756,7 +1745,7 @@ export const formProps: FormProps = { ...@@ -1756,7 +1745,7 @@ export const formProps: FormProps = {
disabled: false, disabled: false,
showLabel: true, showLabel: true,
controls: true, controls: true,
required: false, required: true,
subTotal: false, subTotal: false,
isShow: true, isShow: true,
rules: [], rules: [],
......
...@@ -220,12 +220,12 @@ export const permissionList = [ ...@@ -220,12 +220,12 @@ export const permissionList = [
disabled: false, disabled: false,
isSaveTable: false, isSaveTable: false,
tableName: '', tableName: '',
fieldName: '次号', fieldName: '次号',
fieldId: 'rch', fieldId: 'lch',
isSubTable: false, isSubTable: false,
showChildren: true, showChildren: true,
type: 'input', type: 'input',
key: '3c95be972e5b4ebfb6fc32a629199a07', key: 'fsdfsdf',
children: [], children: [],
options: {}, options: {},
defaultValue: '', defaultValue: '',
......
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