Commit 6a55db7b by 宋春膨

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

parents 148c294f 524796c3
......@@ -157,8 +157,10 @@
"rollup": "^3.22.1",
"rollup-plugin-visualizer": "^5.9.0",
"stylelint": "^16.26.1",
"stylelint-config-prettier": "^9.0.5",
"stylelint-config-recommended-vue": "^1.4.0",
"stylelint-config-standard": "^33.0.0",
"stylelint-order": "^7.0.1",
"terser": "^5.17.4",
"ts-node": "^10.9.1",
"typescript": "^5.0.4",
......
......@@ -13,6 +13,8 @@ export interface MesWarehouseArrivedPageParams extends BasicPageParams {
zdr: string;
ywzz: string;
cspc: string;
}
/**
......@@ -38,6 +40,8 @@ export interface MesWarehouseArrivedPageModel {
ywzz: string;
bz: string;
cspc: string;
}
/**
......@@ -64,6 +68,8 @@ export interface MesWarehouseArrivedModel {
ywzz: string;
cspc: string;
fj: string;
bz: string;
......@@ -121,6 +127,8 @@ export interface MesWarehouseArrivedInfoModel {
xqbm: string;
cspc: string;
sfzp: string;
sfzj: string;
......
......@@ -113,6 +113,8 @@ export interface MesWarehouseInInfoModel {
dw: string;
pch: string;
yssl: string;
sssl: string;
......
......@@ -133,12 +133,8 @@ export interface MesWarehouseInventoryRelaModel {
pch: string;
xtsl: string;
pdsl: string;
ce: string;
p1: 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 {
lldw: string;
llr: string;
ywzz: string;
zt: string;
}
/**
......@@ -25,10 +29,12 @@ export interface MesWarehousePromaterialPageModel {
llr: string;
llkczz: string;
kgy: string;
ywzz: string;
zt: string;
bz: string;
}
......@@ -48,10 +54,12 @@ export interface MesWarehousePromaterialModel {
llr: string;
llkczz: string;
ywzz: string;
kgy: string;
zt: string;
bz: string;
fj: string;
......@@ -147,14 +155,16 @@ export interface MesWarehousePromaterialInfoModel {
dw: string;
sl: string;
hwh: string;
yfsl: string;
sl: string;
sfsl: string;
pch: string;
lldh: string;
bz: string;
p1: string;
......
......@@ -4,13 +4,17 @@ import { BasicPageParams, BasicFetchResult } from '/@/api/model/baseModel';
* @description: MesWarehouseProduct分页参数 模型
*/
export interface MesWarehouseProductPageParams extends BasicPageParams {
kczz: string;
djbh: string;
ck: string;
kgy: string;
scbm: string;
ywzz: string;
djzt: string;
pch: string;
}
/**
......@@ -19,21 +23,25 @@ export interface MesWarehouseProductPageParams extends BasicPageParams {
export interface MesWarehouseProductPageModel {
id: string;
kczz: string;
djbh: string;
djrq: string;
ck: string;
crklx: string;
kgy: string;
scbm: string;
djbh: string;
ck: string;
pch: string;
ywzz: string;
djzt: string;
bz: string;
}
/**
......@@ -44,7 +52,7 @@ export interface MesWarehouseProductModel {
deleteMark: string;
kczz: string;
ywzz: string;
djrq: string;
......@@ -56,6 +64,8 @@ export interface MesWarehouseProductModel {
scbm: string;
pch: string;
djbh: string;
djzt: string;
......@@ -186,6 +196,8 @@ export interface MesWarehouseProductInfoModel {
modifyDate: string;
modifyUserId: string;
rkdh: string;
}
/**
......
......@@ -6,7 +6,7 @@ import { BasicPageParams, BasicFetchResult } from '/@/api/model/baseModel';
export interface MesProductOutputPageParams extends BasicPageParams {
bh: string;
lph: string;
lch: string;
kh: string;
......@@ -19,6 +19,8 @@ export interface MesProductOutputPageParams extends BasicPageParams {
cpbh: string;
ccsj: string;
ywzz: string;
}
/**
......@@ -29,19 +31,21 @@ export interface MesProductOutputPageModel {
bh: string;
lph: string;
lch: string;
kh: string;
cpbh: string;
cpmc: string;
csl: string;
rkzt: string;
kh: string;
cpbh: string;
rkzt: string;
ccsj: string;
ywzz: string;
}
/**
......@@ -119,6 +123,16 @@ export interface MesProductOutputModel {
modifyDate: string;
modifyUserId: string;
ywzz: string;
lch: string;
zl: string;
ks: string;
cpid: string;
}
/**
......
......@@ -8,9 +8,7 @@ enum Api {
List = '/scgl/scjh/list',
Info = '/scgl/scjh/info',
MesProductionPlan = '/scgl/scjh',
Issue = '/scgl/scjh/issue',
}
/**
......@@ -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 {
ddbh: string;
ssgs: string;
zt: string;
}
......@@ -17,13 +19,13 @@ export interface MesProductionPlanPageParams extends BasicPageParams {
export interface MesProductionPlanPageModel {
id: string;
jhbh: string;
ddbh: string;
jhbh: string;
kh: string;
jhjhrq: string;
ssgs: string;
zt: string;
}
......@@ -84,6 +86,10 @@ export interface MesProductionPlanModel {
modifyUserId: string;
lph: string;
ywzz: string;
mesProductionPlanProductList?: MesProductionPlanProductModel;
}
......
......@@ -56,6 +56,12 @@ export const searchFormSchema: FormSchema[] = [
getPopupContainer: () => document.body,
},
},
{
field: 'cspc',
label: '厂商批次',
defaultValue: undefined,
component: 'Input',
},
];
export const columns: BasicColumn[] = [
......@@ -175,6 +181,19 @@ export const columns: BasicColumn[] = [
styleConfig: undefined,
listStyle: undefined,
},
{
resizable: true,
dataIndex: 'cspc',
title: '厂商批次',
componentType: 'input',
fixed: false,
sorter: true,
styleConfig: undefined,
listStyle: '',
},
];
//表头合并配置
export const headerMergingData = [];
......@@ -349,7 +368,6 @@ export const formProps: FormProps = {
{ key: 2, label: 'Option 2', value: 'Option 2' },
{ key: 3, label: 'Option 3', value: 'Option 3' },
],
defaultSelect: null,
datasourceType: 'dic',
params: { itemId: '2010533622867509249' },
labelField: 'name',
......@@ -395,7 +413,6 @@ export const formProps: FormProps = {
{ key: 2, label: 'Option 2', value: 'Option 2' },
{ key: 3, label: 'Option 3', value: 'Option 3' },
],
defaultSelect: null,
datasourceType: 'dic',
params: { itemId: '2010539474382962690' },
labelField: 'name',
......@@ -510,7 +527,6 @@ export const formProps: FormProps = {
{ key: 2, label: 'Option 2', value: 'Option 2' },
{ key: 3, label: 'Option 3', value: 'Option 3' },
],
defaultSelect: null,
datasourceType: 'dic',
params: { itemId: '2015724355955159041' },
labelField: 'name',
......@@ -536,27 +552,35 @@ export const formProps: FormProps = {
span: 8,
list: [
{
key: '4ca80a2d3a8244bc8d3380b6b0457c25',
field: 'zsl',
label: '总数量',
type: 'number',
component: 'InputNumber',
key: 'ac1495dbcbde4305b9e30167b92fcc7b',
field: 'cspc',
label: '厂商批次',
type: 'input',
component: 'Input',
colProps: { span: 24 },
defaultValue: 0,
defaultValue: '',
componentProps: {
width: '100%',
span: 7,
defaultValue: 0,
min: 0,
step: 1,
defaultValue: '',
placeholder: '请输入厂商批次',
maxlength: null,
prefix: '',
suffix: '',
addonBefore: '',
addonAfter: '',
disabled: false,
allowClear: false,
showLabel: true,
controls: true,
required: false,
subTotal: false,
isShow: false,
rules: [],
events: {},
listStyle: '',
isSave: false,
isShow: true,
scan: false,
bordered: true,
isShowAi: false,
tooltipConfig: { visible: false, title: '提示文本' },
style: { width: '100%' },
},
......@@ -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: {
gutter: 16,
......@@ -855,7 +910,6 @@ export const formProps: FormProps = {
span: '',
defaultValue: '',
placeholder: '',
maxlength: null,
prefix: '',
suffix: '',
addonBefore: '',
......@@ -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',
title: '是否赠品',
dataIndex: 'sfzp',
......
......@@ -122,15 +122,15 @@ export const permissionList = [
disabled: false,
isSaveTable: false,
tableName: '',
fieldName: '总数量',
fieldId: 'zsl',
fieldName: '厂商批次',
fieldId: 'cspc',
isSubTable: false,
showChildren: true,
type: 'number',
key: '4ca80a2d3a8244bc8d3380b6b0457c25',
type: 'input',
key: 'ac1495dbcbde4305b9e30167b92fcc7b',
children: [],
options: {},
defaultValue: 0,
defaultValue: '',
},
{
required: false,
......@@ -184,6 +184,23 @@ export const permissionList = [
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,
view: true,
edit: true,
......@@ -355,6 +372,21 @@ export const permissionList = [
isSaveTable: false,
showChildren: false,
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: '是否赠品',
fieldId: 'sfzp',
type: 'Input',
......
......@@ -427,7 +427,6 @@ export const formProps: FormProps = {
span: 7,
defaultValue: '',
placeholder: '请输入供应商',
maxlength: null,
prefix: '',
suffix: '',
addonBefore: '',
......@@ -533,7 +532,6 @@ export const formProps: FormProps = {
{ key: 2, label: 'Option 2', value: 'Option 2' },
{ key: 3, label: 'Option 3', value: 'Option 3' },
],
defaultSelect: null,
datasourceType: 'dic',
params: { itemId: '2015724355955159041' },
labelField: 'name',
......@@ -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',
title: '应收数量',
dataIndex: 'yssl',
......
......@@ -261,6 +261,21 @@ export const permissionList = [
isSaveTable: false,
showChildren: false,
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: '应收数量',
fieldId: 'yssl',
type: 'InputNumber',
......
......@@ -7,21 +7,38 @@
v-bind="$attrs" @register="registerModal" :title="getTitle"
@ok="handleSubmit" @cancel="handleClose" >
<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>
</template>
<script lang="ts" setup>
import { ref, computed, reactive, provide, Ref } from 'vue';
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 { useI18n } from '/@/hooks/web/useI18n';
import { formProps } from './config';
import { formProps ,formButtons } from './config';
import ModalForm from './Form.vue';
import { FromPageType } from '/@/enums/workflowEnum';
import { sortBy } from 'lodash-es';
import { executeCurFormEvent } from '/@/utils/event/data';
const emit = defineEmits(['success', 'register']);
......@@ -52,8 +69,8 @@
setModalProps({
destroyOnClose: true,
maskClosable: false,
showCancelBtn: !state.isView,
showOkBtn: !state.isView,
showCancelBtn: false,
showOkBtn: false,
canFullscreen: true,
width: 1980,
footer: state.isView ? null : undefined,defaultFullscreen:true,
......@@ -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() {
formRef.value.resetFields();
}
......
......@@ -198,6 +198,160 @@ export const formProps: FormProps = {
size: 'default',
schemas: [
{
key: '44f1b3495b854c708ce9f13c0e6afc94',
field: '',
label: '',
type: 'grid',
colProps: { span: 24 },
component: 'Grid',
children: [
{
span: 2,
list: [
{
key: '3498b1519f97476e87627a4b7de4b268',
label: '开始盘点',
type: 'button',
component: 'Button',
colProps: { span: 24 },
componentProps: {
name: '开始盘点',
buttonStyleType: 'primary',
buttonWidth: '',
buttonHeight: '',
datasourceType: 'api',
prefix: '',
suffix: '',
labelField: 'label',
valueField: 'value',
apiConfig: {
path: 'CodeGeneration/assoc-selection',
method: 'GET',
apiId: 'ac61f579074c465aaf017d64284a44a3',
outputParams: [
{ name: 'label', tableTitle: 'label' },
{ name: 'value', tableTitle: 'value' },
],
},
dicOptions: [],
disabled: false,
isShow: true,
margin: '10px',
events: { click: "formActionType.showMessage('开始盘点')" },
modal: null,
type: 1,
event: [],
tooltipConfig: { visible: false, title: '提示文本' },
span: 7,
width: '',
height: '',
},
},
],
},
{
span: 2,
list: [
{
key: 'b0b8fc72994d4f34a985bbf6880799f1',
label: '确认盘点',
type: 'button',
component: 'Button',
colProps: { span: 24 },
componentProps: {
name: '确认盘点',
buttonStyleType: 'primary',
buttonWidth: '',
buttonHeight: '',
datasourceType: 'api',
prefix: '',
suffix: '',
labelField: 'label',
valueField: 'value',
apiConfig: {
path: 'CodeGeneration/assoc-selection',
method: 'GET',
apiId: 'ac61f579074c465aaf017d64284a44a3',
outputParams: [
{ name: 'label', tableTitle: 'label' },
{ name: 'value', tableTitle: 'value' },
],
},
dicOptions: [],
disabled: false,
isShow: true,
margin: '10px',
events: { click: "formActionType.showMessage('确认盘点')" },
modal: null,
type: 1,
event: [],
tooltipConfig: { visible: false, title: '提示文本' },
span: 7,
width: '',
height: '',
},
},
],
},
{
span: 2,
list: [
{
key: 'a2539c9a104248ab9cb0dedea1641b39',
label: '取消盘点',
type: 'button',
component: 'Button',
colProps: { span: 24 },
componentProps: {
name: '取消盘点',
buttonStyleType: 'primary',
buttonWidth: '',
buttonHeight: '',
datasourceType: 'api',
prefix: '',
suffix: '',
labelField: 'label',
valueField: 'value',
apiConfig: {
path: 'CodeGeneration/assoc-selection',
method: 'GET',
apiId: 'ac61f579074c465aaf017d64284a44a3',
outputParams: [
{ name: 'label', tableTitle: 'label' },
{ name: 'value', tableTitle: 'value' },
],
},
dicOptions: [],
disabled: false,
isShow: true,
margin: '10px',
events: { click: "formActionType.showMessage('取消盘点')" },
modal: null,
type: 1,
event: [],
tooltipConfig: { visible: false, title: '提示文本' },
span: 7,
width: '',
height: '',
},
},
],
},
],
componentProps: {
gutter: 0,
justify: 'start',
align: 'top',
isShow: true,
showBorder: false,
bordercolor: '#d9d9d9',
bordershowtype: [true, true, true, true],
borderwidth: 1,
padding: '10px',
margin: '10px',
},
},
{
key: 'bd276037af164568843b957a4de98cb2',
field: '',
label: '',
......@@ -229,7 +383,6 @@ export const formProps: FormProps = {
{ key: 2, label: 'Option 2', value: 'Option 2' },
{ key: 3, label: 'Option 3', value: 'Option 3' },
],
defaultSelect: null,
datasourceType: 'dic',
params: { itemId: '2010539474382962690' },
labelField: 'name',
......@@ -275,7 +428,6 @@ export const formProps: FormProps = {
{ key: 2, label: 'Option 2', value: 'Option 2' },
{ key: 3, label: 'Option 3', value: 'Option 3' },
],
defaultSelect: null,
datasourceType: 'dic',
params: { itemId: '2003761375221407745' },
labelField: 'name',
......@@ -321,9 +473,7 @@ export const formProps: FormProps = {
{ key: 2, label: 'Option 2', value: 'Option 2' },
{ key: 3, label: 'Option 3', value: 'Option 3' },
],
defaultSelect: null,
datasourceType: 'api',
params: null,
labelField: 'label',
valueField: 'value',
apiConfig: {
......@@ -398,7 +548,6 @@ export const formProps: FormProps = {
span: 2,
defaultValue: '',
placeholder: '请输入备注',
maxlength: null,
prefix: '',
suffix: '',
addonBefore: '',
......@@ -484,9 +633,7 @@ export const formProps: FormProps = {
{ key: 2, label: 'Option 2', value: 'Option 2' },
{ key: 3, label: 'Option 3', value: 'Option 3' },
],
defaultSelect: null,
datasourceType: 'api',
params: null,
labelField: 'label',
valueField: 'value',
apiConfig: {
......@@ -529,7 +676,6 @@ export const formProps: FormProps = {
{ key: 2, label: 'Option 2', value: 'Option 2' },
{ key: 3, label: 'Option 3', value: 'Option 3' },
],
defaultSelect: null,
datasourceType: 'dic',
params: { itemId: '2003761375221407745' },
labelField: 'name',
......@@ -568,7 +714,6 @@ export const formProps: FormProps = {
{ key: 2, label: 'Option 2', value: 'Option 2' },
{ key: 3, label: 'Option 3', value: 'Option 3' },
],
defaultSelect: null,
datasourceType: 'dic',
params: { itemId: '2010539474382962690' },
labelField: 'name',
......@@ -599,7 +744,6 @@ export const formProps: FormProps = {
span: '',
defaultValue: '',
placeholder: '请输入单件\\批次号',
maxlength: null,
prefix: '',
suffix: '',
addonBefore: '',
......@@ -620,32 +764,6 @@ export const formProps: FormProps = {
},
},
{
key: 'ec3ea4fd15ae4cae803fe45b18c0e4b1',
title: '系统数量',
dataIndex: 'xtsl',
componentType: 'InputNumber',
defaultValue: 0,
componentProps: {
width: '100%',
span: '',
defaultValue: 0,
min: 0,
max: null,
step: 1,
maxlength: null,
disabled: false,
showLabel: true,
controls: true,
required: false,
subTotal: false,
isShow: true,
rules: [],
events: {},
tooltipConfig: { visible: false, title: '提示文本' },
listStyle: "return 'width:100%'",
},
},
{
key: 'a2b46aaba5264ee79e83eeeda69990d0',
title: '盘点数量',
dataIndex: 'pdsl',
......@@ -656,35 +774,7 @@ export const formProps: FormProps = {
span: '',
defaultValue: 0,
min: 0,
max: null,
step: 1,
maxlength: null,
disabled: false,
showLabel: true,
controls: true,
required: false,
subTotal: false,
isShow: true,
rules: [],
events: {},
tooltipConfig: { visible: false, title: '提示文本' },
listStyle: "return 'width:100%'",
},
},
{
key: '312fc725ea894778851d52c25a20eba4',
title: '差额',
dataIndex: 'ce',
componentType: 'InputNumber',
defaultValue: 0,
componentProps: {
width: '100%',
span: '',
defaultValue: 0,
min: 0,
max: null,
step: 1,
maxlength: null,
disabled: false,
showLabel: true,
controls: true,
......@@ -722,7 +812,7 @@ export const formProps: FormProps = {
isDeleteSelected: false,
isListView: false,
viewList: [],
isShowAdd: true,
isShowAdd: false,
isShowDelete: true,
hasCheckedCol: false,
events: {},
......@@ -742,3 +832,39 @@ export const formProps: FormProps = {
showSubmitButton: false,
hiddenComponent: [],
};
export const formButtons = [
{
key: 'confirm',
code: 'confirm',
name: '确定',
style: 'primary',
event: [],
isShow: true,
index: 2,
type: 1,
modal: null,
},
{
key: 'cancel',
code: 'cancel',
name: '取消',
style: 'default',
event: [],
isShow: true,
index: 1,
type: 1,
modal: null,
},
{
key: 'reset',
code: 'reset',
name: '重置',
style: 'default',
event: [],
isShow: true,
index: 0,
type: 1,
modal: null,
},
];
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,
view: true,
edit: true,
......@@ -163,42 +208,12 @@ export const permissionList = [
isSaveTable: false,
showChildren: false,
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: '盘点数量',
fieldId: 'pdsl',
type: 'InputNumber',
key: 'a2b46aaba5264ee79e83eeeda69990d0',
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 @@
//展示在列表内的按钮
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":"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);
})
......
<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
import { FormProps, FormSchema } from '/@/components/Form';
import { BasicColumn } from '/@/components/Table';
export const searchFormSchema: FormSchema[] = [
{
field: 'cpbm',
label: '产品编码',
defaultValue: undefined,
component: 'Input',
},
{
field: 'cpmc',
label: '产品名称',
defaultValue: undefined,
component: 'Input',
},
{
field: 'ck',
label: '仓库',
defaultValue: undefined,
component: 'Input',
},
{
field: 'pch',
label: '批次号',
defaultValue: undefined,
component: 'Input',
},
{
field: 'ykzt',
label: '盈亏状态',
defaultValue: undefined,
component: 'Input',
},
{
field: 'ywzz',
label: '业务组织',
defaultValue: undefined,
component: 'Input',
},
{
field: 'pddid',
label: '盘点单ID',
defaultValue: undefined,
component: 'Input',
},
];
export const columns: BasicColumn[] = [
{
resizable: true,
dataIndex: 'cpbm',
title: '产品编码',
componentType: 'input',
fixed: false,
sorter: true,
styleConfig: undefined,
listStyle: '',
},
{
resizable: true,
dataIndex: 'cpmc',
title: '产品名称',
componentType: 'input',
fixed: false,
sorter: true,
styleConfig: undefined,
listStyle: '',
},
{
resizable: true,
dataIndex: 'ck',
title: '仓库',
componentType: 'input',
fixed: false,
sorter: true,
styleConfig: undefined,
listStyle: '',
},
{
resizable: true,
dataIndex: 'pch',
title: '批次号',
componentType: 'input',
fixed: false,
sorter: true,
styleConfig: undefined,
listStyle: '',
},
{
resizable: true,
dataIndex: 'xtsl',
title: '系统数量',
componentType: 'input',
fixed: false,
sorter: true,
styleConfig: undefined,
listStyle: '',
},
{
resizable: true,
dataIndex: 'pdsl',
title: '盘点数量',
componentType: 'input',
fixed: false,
sorter: true,
styleConfig: undefined,
listStyle: '',
},
{
resizable: true,
dataIndex: 'dw',
title: '单位',
componentType: 'input',
fixed: false,
sorter: true,
styleConfig: undefined,
listStyle: '',
},
{
resizable: true,
dataIndex: 'ce',
title: '差额',
componentType: 'input',
fixed: false,
sorter: true,
styleConfig: undefined,
listStyle: '',
},
{
resizable: true,
dataIndex: 'ykzt',
title: '盈亏状态',
componentType: 'input',
fixed: false,
sorter: true,
styleConfig: undefined,
listStyle: '',
},
{
resizable: true,
dataIndex: 'ywzz',
title: '业务组织',
componentType: 'input',
fixed: false,
sorter: true,
styleConfig: undefined,
listStyle: '',
},
{
resizable: true,
dataIndex: 'pddid',
title: '盘点单ID',
componentType: 'input',
fixed: false,
sorter: true,
styleConfig: undefined,
listStyle: '',
},
];
//表头合并配置
export const headerMergingData = [];
//表单事件
export const formEventConfigs = {
0: [
{
type: 'circle',
color: '#2774ff',
text: '开始节点',
icon: '#icon-kaishi',
bgcColor: '#D8E5FF',
isUserDefined: false,
},
{
color: '#F6AB01',
icon: '#icon-chushihua',
text: '初始化表单',
bgcColor: '#f9f5ea',
isUserDefined: false,
nodeInfo: { processEvent: [] },
},
],
1: [
{
color: '#B36EDB',
icon: '#icon-shujufenxi',
text: '获取表单数据',
detail: '(新增无此操作)',
bgcColor: '#F8F2FC',
isUserDefined: false,
nodeInfo: { processEvent: [] },
},
],
2: [
{
color: '#F8625C',
icon: '#icon-jiazai',
text: '加载表单',
bgcColor: '#FFF1F1',
isUserDefined: false,
nodeInfo: { processEvent: [] },
},
],
3: [
{
color: '#6C6AE0',
icon: '#icon-jsontijiao',
text: '提交表单',
bgcColor: '#F5F4FF',
isUserDefined: false,
nodeInfo: { processEvent: [] },
},
],
4: [
{
type: 'circle',
color: '#F8625C',
text: '结束节点',
icon: '#icon-jieshuzhiliao',
bgcColor: '#FFD6D6',
isLast: true,
isUserDefined: false,
},
],
};
export const formProps: FormProps = {
labelCol: { span: 3, offset: 0 },
labelAlign: 'right',
layout: 'horizontal',
size: 'default',
schemas: [
{
key: 'fa1d0a5221e9495093873afc5f40790a',
field: '',
label: '',
type: 'grid',
colProps: { span: 24 },
component: 'Grid',
children: [
{
span: 8,
list: [
{
key: '2e7416cc5a0f443c9fc6c6cad7beee27',
field: 'cpbm',
label: '产品编码',
type: 'input',
component: 'Input',
colProps: { span: 24 },
defaultValue: '',
componentProps: {
width: '100%',
span: 7,
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: '提示文本' },
style: { width: '100%' },
},
},
],
},
{
span: 8,
list: [
{
key: '2c53a58060824f98b2402df0f9db7806',
field: 'cpmc',
label: '产品名称',
type: 'input',
component: 'Input',
colProps: { span: 24 },
defaultValue: '',
componentProps: {
width: '100%',
span: 7,
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: '提示文本' },
style: { width: '100%' },
},
},
],
},
{
span: 8,
list: [
{
key: '52ef022eff7247689f7aafe21f546140',
field: 'ck',
label: '仓库',
type: 'input',
component: 'Input',
colProps: { span: 24 },
defaultValue: '',
componentProps: {
width: '100%',
span: 7,
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: '提示文本' },
style: { width: '100%' },
},
},
],
},
{
span: 8,
list: [
{
key: '2b50d71167144489b6c05ee94996f53a',
field: 'pch',
label: '批次号',
type: 'input',
component: 'Input',
colProps: { span: 24 },
defaultValue: '',
componentProps: {
width: '100%',
span: 7,
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: '提示文本' },
style: { width: '100%' },
},
},
],
},
{
span: 8,
list: [
{
key: 'c29582cdbd274b0cbd798fe5a4642cc9',
field: 'xtsl',
label: '系统数量',
type: 'input',
component: 'Input',
colProps: { span: 24 },
defaultValue: '',
componentProps: {
width: '100%',
span: 7,
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: '提示文本' },
style: { width: '100%' },
},
},
],
},
{
span: 8,
list: [
{
key: 'c04bb88244fe43349bebf968fdce3ce9',
field: 'pdsl',
label: '盘点数量',
type: 'input',
component: 'Input',
colProps: { span: 24 },
defaultValue: '',
componentProps: {
width: '100%',
span: 7,
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: '提示文本' },
style: { width: '100%' },
},
},
],
},
{
span: 8,
list: [
{
key: 'a5c69cf2f1424b3fa6dae4ebf37fae27',
field: 'dw',
label: '单位',
type: 'input',
component: 'Input',
colProps: { span: 24 },
defaultValue: '',
componentProps: {
width: '100%',
span: 7,
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: '提示文本' },
style: { width: '100%' },
},
},
],
},
{
span: 8,
list: [
{
key: '10186fcaa02b4481be4c236037f0783a',
field: 'ce',
label: '差额',
type: 'input',
component: 'Input',
colProps: { span: 24 },
defaultValue: '',
componentProps: {
width: '100%',
span: 7,
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: '提示文本' },
style: { width: '100%' },
},
},
],
},
{
span: 8,
list: [
{
key: 'b62f769fa46d453fa562c8ea6f6e0c50',
field: 'ykzt',
label: '盈亏状态',
type: 'input',
component: 'Input',
colProps: { span: 24 },
defaultValue: '',
componentProps: {
width: '100%',
span: 7,
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: '提示文本' },
style: { width: '100%' },
},
},
],
},
{
span: 8,
list: [
{
key: '2ea1f1f551ed4c7b949bb11a1d792192',
field: 'ywzz',
label: '业务组织',
type: 'input',
component: 'Input',
colProps: { span: 24 },
defaultValue: '',
componentProps: {
width: '100%',
span: 7,
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: '提示文本' },
style: { width: '100%' },
},
},
],
},
{
span: 8,
list: [
{
key: '018031d351d24bfebfeec15cd57cfa95',
field: 'pddid',
label: '盘点单ID',
type: 'input',
component: 'Input',
colProps: { span: 24 },
defaultValue: '',
componentProps: {
width: '100%',
span: 7,
defaultValue: '',
placeholder: '请输入盘点单ID',
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: '提示文本' },
style: { width: '100%' },
},
},
],
},
],
componentProps: {
gutter: 16,
justify: 'start',
align: 'top',
isShow: true,
showBorder: false,
bordercolor: '#d9d9d9',
bordershowtype: [true, true, true, true],
borderwidth: 1,
padding: '10px',
margin: '10px',
},
},
],
showActionButtonGroup: false,
buttonLocation: 'center',
actionColOptions: { span: 24 },
showResetButton: false,
showSubmitButton: false,
hiddenComponent: [],
};
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 @@
v-bind="$attrs"
@register="registerModal"
title="生成领料单"
width="700px"
width="1000px"
:confirmLoading="loading"
@ok="handleOk"
@cancel="handleCancel"
......@@ -34,7 +34,7 @@
/* 表格数据 */
const tableData = ref<any[]>([]);
/* 加载状态 */
const loading = ref(false);
......@@ -42,19 +42,21 @@
const columns: BasicColumn[] = [
{ title: '物料编码', dataIndex: 'wlbh', width: 120 },
{ title: '物料名称', dataIndex: 'wlmc', width: 200 },
{ title: '备料数量', dataIndex: 'blsl', width: 200 },
{ title: '库存数量', dataIndex: 'kcl', width: 200 },
{
title: '领料数量',
dataIndex: 'blsl',
dataIndex: 'sl',
width: 130,
// 常驻输入框
customRender: ({ record }) =>
h(InputNumber, {
value: record.blsl,
value: 0,
min: 0,
max: 999999,
size: 'small',
style: { width: '100%' },
onChange: (val) => (record.blsl = val),
// onChange: (val) => (record.sl = val),
}),
},
];
......@@ -69,7 +71,7 @@
async function handleOk() {
// 防止重复提交
if (loading.value) return;
// 简单校验:数量不能全 0
const allZero = tableData.value.every((r) => r.blsl === 0);
if (allZero) {
......@@ -77,11 +79,20 @@
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, // 物料编码
wlmc: item.wlmc, // 物料名称
sl: item.blsl || 0 // 领料数量
blsl: item.blsl || 0, // 备料数量
kcl: item.kcl || 0, // 库存数量
sl: item.sl || 0, // 领料数量
}));
loading.value = true;
......@@ -94,9 +105,9 @@
},
{
errorMessageMode: 'message',
}
},
);
// 接口调用成功
createMessage.success('领料单生成成功');
emit('success', tableData.value); // 回传完整数组
......
......@@ -29,6 +29,28 @@ export const searchFormSchema: FormSchema[] = [
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[] = [
......@@ -86,8 +108,8 @@ export const columns: BasicColumn[] = [
{
resizable: true,
dataIndex: 'llkczz',
title: '领料库存组织',
dataIndex: 'kgy',
title: '库管员',
componentType: 'input',
fixed: false,
......@@ -99,8 +121,8 @@ export const columns: BasicColumn[] = [
{
resizable: true,
dataIndex: 'kgy',
title: '库管员',
dataIndex: 'ywzz',
title: '业务组织',
componentType: 'input',
fixed: false,
......@@ -112,6 +134,19 @@ export const columns: BasicColumn[] = [
{
resizable: true,
dataIndex: 'zt',
title: '单据状态',
componentType: 'select',
fixed: false,
sorter: true,
styleConfig: undefined,
listStyle: undefined,
},
{
resizable: true,
dataIndex: 'bz',
title: '备注',
componentType: 'input',
......@@ -325,8 +360,8 @@ export const formProps: FormProps = {
list: [
{
key: 'cc6c68d8b8f740e0a4d16f334508e0c3',
field: 'llkczz',
label: '领料库存组织',
field: 'ywzz',
label: '业务组织',
type: 'input',
component: 'Input',
colProps: { span: 24 },
......@@ -335,7 +370,7 @@ export const formProps: FormProps = {
width: '100%',
span: 7,
defaultValue: '',
placeholder: '请输入领料库存组织',
placeholder: '请输入业务组织',
prefix: '',
suffix: '',
addonBefore: '',
......@@ -397,38 +432,45 @@ export const formProps: FormProps = {
],
},
{
span: 24,
span: 8,
list: [
{
key: '47ae1b1e159b4f5787e9d59f219a3e9f',
field: 'bz',
label: '备注',
type: 'input',
component: 'Input',
key: '9cdba668d8b348e8a581859ade8585b2',
field: 'zt',
label: '单据状态',
type: 'select',
component: 'XjrSelect',
colProps: { span: 24 },
defaultValue: '',
componentProps: {
width: '100%',
span: 2,
defaultValue: '',
placeholder: '请输入备注',
prefix: '',
suffix: '',
addonBefore: '',
addonAfter: '',
disabled: false,
allowClear: false,
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' },
],
datasourceType: 'dic',
params: { itemId: '2016321281785163777' },
labelField: 'name',
valueField: 'value',
apiConfig: {
path: 'CodeGeneration/selection',
method: 'GET',
apiId: '93d735dcb7364a0f8102188ec4d77ac7',
},
dicOptions: [],
required: false,
rules: [],
events: {},
listStyle: '',
isSave: false,
isShow: true,
scan: false,
bordered: true,
isShowAi: false,
tooltipConfig: { visible: false, title: '提示文本' },
itemId: '2016321281785163777',
style: { width: '100%' },
},
},
......@@ -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: {
gutter: 16,
......@@ -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',
title: '货位号',
dataIndex: 'hwh',
......@@ -664,9 +720,9 @@ export const formProps: FormProps = {
},
},
{
key: 'c90814d02b6f420f93d397202c8803fd',
title: '应发数量',
dataIndex: 'yfsl',
key: '1026628c881d477b890e57ffd408b77a',
title: '数量',
dataIndex: 'sl',
componentType: 'InputNumber',
defaultValue: 0,
componentProps: {
......@@ -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',
title: '备注',
dataIndex: 'bz',
......
......@@ -72,8 +72,8 @@ export const permissionList = [
disabled: false,
isSaveTable: false,
tableName: '',
fieldName: '领料库存组织',
fieldId: 'llkczz',
fieldName: '业务组织',
fieldId: 'ywzz',
isSubTable: false,
showChildren: true,
type: 'input',
......@@ -106,15 +106,14 @@ export const permissionList = [
disabled: false,
isSaveTable: false,
tableName: '',
fieldName: '备注',
fieldId: 'bz',
fieldName: '单据状态',
fieldId: 'zt',
isSubTable: false,
showChildren: true,
type: 'input',
key: '47ae1b1e159b4f5787e9d59f219a3e9f',
type: 'select',
key: '9cdba668d8b348e8a581859ade8585b2',
children: [],
options: {},
defaultValue: '',
},
{
required: false,
......@@ -134,6 +133,23 @@ export const permissionList = [
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,
view: true,
edit: true,
......@@ -215,10 +231,10 @@ export const permissionList = [
isSaveTable: false,
showChildren: false,
tableName: 'mesWarehousePromaterialInfoList',
fieldName: '数量',
fieldId: 'sl',
type: 'InputNumber',
key: '1026628c881d477b890e57ffd408b77a',
fieldName: '货位号',
fieldId: 'hwh',
type: 'Input',
key: '6561cde6f9ee4fd6a898ed3e3618eaca',
children: [],
},
{
......@@ -230,10 +246,10 @@ export const permissionList = [
isSaveTable: false,
showChildren: false,
tableName: 'mesWarehousePromaterialInfoList',
fieldName: '货位号',
fieldId: 'hwh',
type: 'Input',
key: '6561cde6f9ee4fd6a898ed3e3618eaca',
fieldName: '数量',
fieldId: 'sl',
type: 'InputNumber',
key: '1026628c881d477b890e57ffd408b77a',
children: [],
},
{
......@@ -245,10 +261,10 @@ export const permissionList = [
isSaveTable: false,
showChildren: false,
tableName: 'mesWarehousePromaterialInfoList',
fieldName: '发数量',
fieldId: 'yfsl',
fieldName: '发数量',
fieldId: 'sfsl',
type: 'InputNumber',
key: 'c90814d02b6f420f93d397202c8803fd',
key: 'aed6a337f7a447538e0eb2faec5f9f06',
children: [],
},
{
......@@ -260,10 +276,10 @@ export const permissionList = [
isSaveTable: false,
showChildren: false,
tableName: 'mesWarehousePromaterialInfoList',
fieldName: '实发数量',
fieldId: 'sfsl',
type: 'InputNumber',
key: 'aed6a337f7a447538e0eb2faec5f9f06',
fieldName: '批次号',
fieldId: 'pch',
type: 'Input',
key: 'ee29558be5e24c4ca2a706ebfae5fd7a',
children: [],
},
{
......
......@@ -134,7 +134,7 @@
//展示在列表内的按钮
const actionButtons = ref<string[]>(["view","edit","delete"]);
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);
})
......@@ -146,7 +146,7 @@
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();
......@@ -222,6 +222,13 @@
}
function handleAdd() {
openModal(true, { isUpdate: false, });
}
async function handleEdit(record: Recordable) {
let field = 'id';
......
......@@ -4,8 +4,8 @@ import { uploadApi } from '/@/api/sys/upload';
export const searchFormSchema: FormSchema[] = [
{
field: 'kczz',
label: '库存组织',
field: 'djbh',
label: '单据编号',
defaultValue: undefined,
component: 'Input',
},
......@@ -13,17 +13,56 @@ export const searchFormSchema: FormSchema[] = [
field: 'ck',
label: '仓库',
defaultValue: undefined,
component: 'Input',
component: 'XjrSelect',
componentProps: {
datasourceType: 'dic',
params: { itemId: '2010539474382962690' },
labelField: 'name',
valueField: 'value',
mode: 'multiple',
showSearch: true,
getPopupContainer: () => document.body,
},
},
{
field: 'kgy',
label: '库管员',
field: 'scbm',
label: '生产部门',
defaultValue: undefined,
component: 'Input',
},
{
field: 'scbm',
label: '生产部门',
field: 'ywzz',
label: '业务组织',
defaultValue: undefined,
component: 'XjrSelect',
componentProps: {
datasourceType: 'dic',
params: { itemId: '2015724355955159041' },
labelField: 'name',
valueField: 'value',
mode: 'multiple',
showSearch: true,
getPopupContainer: () => document.body,
},
},
{
field: 'djzt',
label: '单据状态',
defaultValue: undefined,
component: 'XjrSelect',
componentProps: {
datasourceType: 'dic',
params: { itemId: '2016321281785163777' },
labelField: 'name',
valueField: 'value',
mode: 'multiple',
showSearch: true,
getPopupContainer: () => document.body,
},
},
{
field: 'pch',
label: '批次号',
defaultValue: undefined,
component: 'Input',
},
......@@ -32,15 +71,15 @@ export const searchFormSchema: FormSchema[] = [
export const columns: BasicColumn[] = [
{
resizable: true,
dataIndex: 'kczz',
title: '库存组织',
componentType: 'input',
dataIndex: 'djbh',
title: '单据编号',
componentType: 'auto-code',
fixed: false,
sorter: true,
styleConfig: undefined,
listStyle: '',
listStyle: undefined,
},
{
......@@ -58,19 +97,6 @@ export const columns: BasicColumn[] = [
{
resizable: true,
dataIndex: 'ck',
title: '仓库',
componentType: 'input',
fixed: false,
sorter: true,
styleConfig: undefined,
listStyle: '',
},
{
resizable: true,
dataIndex: 'crklx',
title: '出入库类型',
componentType: 'select',
......@@ -110,8 +136,21 @@ export const columns: BasicColumn[] = [
{
resizable: true,
dataIndex: 'djbh',
title: '单据编号',
dataIndex: 'ck',
title: '仓库',
componentType: 'select',
fixed: false,
sorter: true,
styleConfig: undefined,
listStyle: undefined,
},
{
resizable: true,
dataIndex: 'pch',
title: '批次号',
componentType: 'input',
fixed: false,
......@@ -123,8 +162,34 @@ export const columns: BasicColumn[] = [
{
resizable: true,
dataIndex: 'ywzz',
title: '业务组织',
componentType: 'select',
fixed: false,
sorter: true,
styleConfig: undefined,
listStyle: undefined,
},
{
resizable: true,
dataIndex: 'djzt',
title: '单据状态',
componentType: 'select',
fixed: false,
sorter: true,
styleConfig: undefined,
listStyle: undefined,
},
{
resizable: true,
dataIndex: 'bz',
title: '备注',
componentType: 'input',
fixed: false,
......@@ -217,35 +282,24 @@ export const formProps: FormProps = {
span: 8,
list: [
{
key: 'b7fc1a99eb11469fbffd723f8ce0629f',
field: 'kczz',
label: '库存组织',
type: 'input',
component: 'Input',
key: '783643292ed9482fae0d3a37d2ebef65',
field: 'djbh',
label: '单据编号',
type: 'auto-code',
component: 'AutoCodeRule',
colProps: { span: 24 },
defaultValue: '',
componentProps: {
width: '100%',
span: 7,
defaultValue: '',
placeholder: '请输入库存组织',
maxlength: null,
placeholder: '请输入单据编号',
prefix: '',
suffix: '',
addonBefore: '',
addonAfter: '',
disabled: false,
allowClear: false,
showLabel: true,
required: true,
rules: [],
events: {},
listStyle: '',
isSave: false,
autoCodeRule: 'scrkbh',
required: false,
isShow: true,
scan: false,
bordered: true,
isShowAi: false,
tooltipConfig: { visible: false, title: '提示文本' },
style: { width: '100%' },
},
......@@ -288,36 +342,42 @@ export const formProps: FormProps = {
span: 8,
list: [
{
key: '0f17a0106f2348bbbc3d19889815b9c7',
key: '7a643e99ca7242c9a606dc550981d6af',
field: 'ck',
label: '仓库',
type: 'input',
component: 'Input',
type: 'select',
component: 'XjrSelect',
colProps: { span: 24 },
defaultValue: '',
componentProps: {
width: '100%',
span: 7,
defaultValue: '',
placeholder: '请输入仓库',
maxlength: null,
prefix: '',
suffix: '',
addonBefore: '',
addonAfter: '',
disabled: false,
allowClear: false,
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' },
],
datasourceType: 'dic',
params: { itemId: '2010539474382962690' },
labelField: 'name',
valueField: 'value',
apiConfig: {
path: 'CodeGeneration/selection',
method: 'GET',
apiId: '93d735dcb7364a0f8102188ec4d77ac7',
},
dicOptions: [],
required: false,
rules: [],
events: {},
listStyle: '',
isSave: false,
isShow: true,
scan: false,
bordered: true,
isShowAi: false,
tooltipConfig: { visible: false, title: '提示文本' },
itemId: '2010539474382962690',
style: { width: '100%' },
},
},
......@@ -385,7 +445,6 @@ export const formProps: FormProps = {
span: 7,
defaultValue: '',
placeholder: '请输入库管员',
maxlength: null,
prefix: '',
suffix: '',
addonBefore: '',
......@@ -424,7 +483,6 @@ export const formProps: FormProps = {
span: 7,
defaultValue: '',
placeholder: '请输入生产部门',
maxlength: null,
prefix: '',
suffix: '',
addonBefore: '',
......@@ -451,9 +509,99 @@ export const formProps: FormProps = {
span: 8,
list: [
{
key: 'd5e600afe891410882c273a7bc1b2ca2',
field: 'djbh',
label: '单据编号',
key: 'b4b870255bc248e3adb580c6dbcbaac1',
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' },
],
datasourceType: 'dic',
params: { itemId: '2015724355955159041' },
labelField: 'name',
valueField: 'value',
apiConfig: {
path: 'CodeGeneration/selection',
method: 'GET',
apiId: '93d735dcb7364a0f8102188ec4d77ac7',
},
dicOptions: [],
required: false,
rules: [],
events: {},
isShow: true,
tooltipConfig: { visible: false, title: '提示文本' },
itemId: '2015724355955159041',
style: { width: '100%' },
},
},
],
},
{
span: 8,
list: [
{
key: '16ad4aafe99c4797966fc6e01bc63e90',
field: 'djzt',
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' },
],
datasourceType: 'dic',
params: { itemId: '2016321281785163777' },
labelField: 'name',
valueField: 'value',
apiConfig: {
path: 'CodeGeneration/selection',
method: 'GET',
apiId: '93d735dcb7364a0f8102188ec4d77ac7',
},
dicOptions: [],
required: false,
rules: [],
events: {},
isShow: true,
tooltipConfig: { visible: false, title: '提示文本' },
itemId: '2016321281785163777',
style: { width: '100%' },
},
},
],
},
{
span: 8,
list: [
{
key: 'ec89abed664a4341acd26ac8509d311a',
field: 'pch',
label: '批次号',
type: 'input',
component: 'Input',
colProps: { span: 24 },
......@@ -462,7 +610,7 @@ export const formProps: FormProps = {
width: '100%',
span: 7,
defaultValue: '',
placeholder: '请输入单据编号',
placeholder: '请输入批次号',
maxlength: null,
prefix: '',
suffix: '',
......@@ -487,22 +635,21 @@ export const formProps: FormProps = {
],
},
{
span: 8,
span: 24,
list: [
{
key: '320589395feb4544a4c0b9ff283e3b2f',
field: 'djzt',
label: '单据状态',
key: '90b34658b2bd49f89270a0e864587f62',
field: 'bz',
label: '备注',
type: 'input',
component: 'Input',
colProps: { span: 24 },
defaultValue: '',
componentProps: {
width: '100%',
span: 7,
span: 2,
defaultValue: '',
placeholder: '请输入单据状态',
maxlength: null,
placeholder: '请输入备注',
prefix: '',
suffix: '',
addonBefore: '',
......@@ -556,45 +703,6 @@ export const formProps: FormProps = {
],
},
{
span: 24,
list: [
{
key: '90b34658b2bd49f89270a0e864587f62',
field: 'bz',
label: '备注',
type: 'input',
component: 'Input',
colProps: { span: 24 },
defaultValue: '',
componentProps: {
width: '100%',
span: 2,
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: '提示文本' },
style: { width: '100%' },
},
},
],
},
{
span: 8,
list: [
{
......@@ -610,7 +718,6 @@ export const formProps: FormProps = {
span: 7,
defaultValue: '',
placeholder: '',
maxlength: null,
prefix: '',
suffix: '',
addonBefore: '',
......@@ -669,7 +776,6 @@ export const formProps: FormProps = {
span: '',
defaultValue: '',
placeholder: '请输入物料编码',
maxlength: null,
prefix: '',
suffix: '',
addonBefore: '',
......@@ -700,7 +806,6 @@ export const formProps: FormProps = {
span: '',
defaultValue: '',
placeholder: '请输入物料名称',
maxlength: null,
prefix: '',
suffix: '',
addonBefore: '',
......@@ -731,7 +836,6 @@ export const formProps: FormProps = {
span: '',
defaultValue: '',
placeholder: '请输入规格',
maxlength: null,
prefix: '',
suffix: '',
addonBefore: '',
......@@ -762,7 +866,6 @@ export const formProps: FormProps = {
span: '',
defaultValue: '',
placeholder: '请输入型号',
maxlength: null,
prefix: '',
suffix: '',
addonBefore: '',
......@@ -793,7 +896,6 @@ export const formProps: FormProps = {
span: '',
defaultValue: '',
placeholder: '请输入批次号',
maxlength: null,
prefix: '',
suffix: '',
addonBefore: '',
......@@ -824,7 +926,6 @@ export const formProps: FormProps = {
span: '',
defaultValue: '',
placeholder: '请输入货位',
maxlength: null,
prefix: '',
suffix: '',
addonBefore: '',
......@@ -855,7 +956,6 @@ export const formProps: FormProps = {
span: '',
defaultValue: '',
placeholder: '请输入实收件数',
maxlength: null,
prefix: '',
suffix: '',
addonBefore: '',
......@@ -886,7 +986,6 @@ export const formProps: FormProps = {
span: '',
defaultValue: '',
placeholder: '请输入备注',
maxlength: null,
prefix: '',
suffix: '',
addonBefore: '',
......@@ -917,7 +1016,6 @@ export const formProps: FormProps = {
span: '',
defaultValue: '',
placeholder: '',
maxlength: null,
prefix: '',
suffix: '',
addonBefore: '',
......
export const permissionList = [
{
required: true,
required: false,
view: true,
edit: true,
disabled: false,
edit: false,
disabled: true,
isSaveTable: false,
tableName: '',
fieldName: '库存组织',
fieldId: 'kczz',
fieldName: '单据编号',
fieldId: 'djbh',
isSubTable: false,
showChildren: true,
type: 'input',
key: 'b7fc1a99eb11469fbffd723f8ce0629f',
type: 'auto-code',
key: '783643292ed9482fae0d3a37d2ebef65',
children: [],
options: {},
defaultValue: '',
},
{
required: false,
......@@ -44,11 +43,10 @@ export const permissionList = [
fieldId: 'ck',
isSubTable: false,
showChildren: true,
type: 'input',
key: '0f17a0106f2348bbbc3d19889815b9c7',
type: 'select',
key: '7a643e99ca7242c9a606dc550981d6af',
children: [],
options: {},
defaultValue: '',
},
{
required: false,
......@@ -108,15 +106,14 @@ export const permissionList = [
disabled: false,
isSaveTable: false,
tableName: '',
fieldName: '单据编号',
fieldId: 'djbh',
fieldName: '业务组织',
fieldId: 'ywzz',
isSubTable: false,
showChildren: true,
type: 'input',
key: 'd5e600afe891410882c273a7bc1b2ca2',
type: 'select',
key: 'b4b870255bc248e3adb580c6dbcbaac1',
children: [],
options: {},
defaultValue: '',
},
{
required: false,
......@@ -129,11 +126,10 @@ export const permissionList = [
fieldId: 'djzt',
isSubTable: false,
showChildren: true,
type: 'input',
key: '320589395feb4544a4c0b9ff283e3b2f',
type: 'select',
key: '16ad4aafe99c4797966fc6e01bc63e90',
children: [],
options: {},
defaultValue: '',
},
{
required: false,
......@@ -142,12 +138,12 @@ export const permissionList = [
disabled: false,
isSaveTable: false,
tableName: '',
fieldName: '上传附件',
fieldId: 'fj',
fieldName: '批次号',
fieldId: 'pch',
isSubTable: false,
showChildren: true,
type: 'upload',
key: '904dcc9c92f2492eba6f775a2602847b',
type: 'input',
key: 'ec89abed664a4341acd26ac8509d311a',
children: [],
options: {},
defaultValue: '',
......@@ -176,6 +172,23 @@ export const permissionList = [
disabled: false,
isSaveTable: false,
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',
fieldId: 'id',
isSubTable: false,
......
......@@ -133,7 +133,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":"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);
})
......
......@@ -3,7 +3,7 @@
<BasicModal
:height="500"
:height="400"
v-bind="$attrs" @register="registerModal" :title="getTitle"
@ok="handleSubmit" @cancel="handleClose" >
<ModalForm ref="formRef" v-model:value="state.formModel" :fromPage="FromPageType.MENU" />
......@@ -72,7 +72,7 @@
showCancelBtn: false,
showOkBtn: false,
canFullscreen: true,
width: 900,
width: 1400,
footer: state.isView ? null : undefined,defaultFullscreen:true,
});
......
......@@ -9,8 +9,8 @@ export const searchFormSchema: FormSchema[] = [
component: 'Input',
},
{
field: 'lph',
label: '炉号',
field: 'lch',
label: '炉号',
defaultValue: undefined,
component: 'Input',
},
......@@ -20,11 +20,19 @@ export const searchFormSchema: FormSchema[] = [
defaultValue: undefined,
component: 'XjrSelect',
componentProps: {
datasourceType: 'staticData',
staticOptions: [
{ key: 1, label: '张三', value: '张三' },
{ key: 2, label: '李四', value: '李四' },
],
datasourceType: 'api',
apiConfig: {
path: '/jcxx/getKhList',
method: 'GET',
apiId: '7bc8db3faba24b19a997856f6ef0b27e',
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 roke_partner where delete_mark = 0 and customer = \'1\'";\r\nreturn db.select(sql);',
},
labelField: 'label',
valueField: 'value',
mode: 'multiple',
......@@ -40,7 +48,7 @@ export const searchFormSchema: FormSchema[] = [
},
{
field: 'csl',
label: '产出量',
label: '产出量',
defaultValue: undefined,
component: 'InputNumber',
componentProps: {
......@@ -53,13 +61,9 @@ export const searchFormSchema: FormSchema[] = [
defaultValue: undefined,
component: 'XjrSelect',
componentProps: {
datasourceType: 'staticData',
staticOptions: [
{ key: 1, label: '进行中', value: '进行中' },
{ key: 2, label: '已入库', value: '已入库' },
{ key: 3, label: '未入库', value: '未入库' },
],
labelField: 'label',
datasourceType: 'dic',
params: { itemId: '2016706939403292674' },
labelField: 'name',
valueField: 'value',
mode: 'multiple',
showSearch: true,
......@@ -83,6 +87,7 @@ export const searchFormSchema: FormSchema[] = [
getPopupContainer: () => document.body,
},
},
{
field: 'ywzz',
label: '业务组织',
......@@ -105,19 +110,7 @@ export const columns: BasicColumn[] = [
resizable: true,
dataIndex: 'bh',
title: '编号',
componentType: 'input',
fixed: false,
sorter: true,
styleConfig: undefined,
listStyle: '',
},
{
resizable: true,
dataIndex: 'ywzz',
title: '业务组织',
componentType: 'select',
componentType: 'auto-code',
fixed: false,
sorter: true,
......@@ -125,10 +118,11 @@ export const columns: BasicColumn[] = [
styleConfig: undefined,
listStyle: undefined,
},
{
resizable: true,
dataIndex: 'lph',
title: '炉号',
dataIndex: 'lch',
title: '炉号',
componentType: 'input',
fixed: false,
......@@ -140,24 +134,15 @@ export const columns: BasicColumn[] = [
{
resizable: true,
dataIndex: 'kh',
title: '客户',
componentType: 'select',
customRender: ({ record }) => {
const staticOptions = [
{ key: 1, label: '张三', value: '张三' },
{ key: 2, label: '李四', value: '李四' },
];
return staticOptions.filter((x) => x.value == record.kh)[0]?.label;
},
dataIndex: 'cpbh',
title: '产品编号',
componentType: 'input',
fixed: false,
sorter: true,
styleConfig: undefined,
listStyle: undefined,
listStyle: '',
},
{
......@@ -176,7 +161,7 @@ export const columns: BasicColumn[] = [
{
resizable: true,
dataIndex: 'csl',
title: '产出量',
title: '产出量',
componentType: 'number',
fixed: false,
......@@ -188,20 +173,10 @@ export const columns: BasicColumn[] = [
{
resizable: true,
dataIndex: 'rkzt',
title: '入库状态',
dataIndex: 'kh',
title: '客户',
componentType: 'select',
customRender: ({ record }) => {
const staticOptions = [
{ key: 1, label: '进行中', value: '进行中' },
{ key: 2, label: '已入库', value: '已入库' },
{ key: 3, label: '未入库', value: '未入库' },
];
return staticOptions.filter((x) => x.value == record.rkzt)[0]?.label;
},
fixed: false,
sorter: true,
......@@ -211,15 +186,15 @@ export const columns: BasicColumn[] = [
{
resizable: true,
dataIndex: 'cpbh',
title: '产品编号',
componentType: 'input',
dataIndex: 'rkzt',
title: '入库状态',
componentType: 'select',
fixed: false,
sorter: true,
styleConfig: undefined,
listStyle: '',
listStyle: undefined,
},
{
......@@ -234,6 +209,19 @@ export const columns: BasicColumn[] = [
styleConfig: undefined,
listStyle: undefined,
},
{
resizable: true,
dataIndex: 'ywzz',
title: '业务组织',
componentType: 'select',
fixed: false,
sorter: true,
styleConfig: undefined,
listStyle: undefined,
},
];
//表头合并配置
export const headerMergingData = [];
......@@ -318,42 +306,32 @@ export const formProps: FormProps = {
span: 8,
list: [
{
key: 'c31870ac60a74049bbf979f225394251',
key: 'ea62ca64d4e04d7b9b5113ccbfcfe537',
field: 'bh',
label: '编号',
type: 'input',
component: 'Input',
type: 'auto-code',
component: 'AutoCodeRule',
colProps: { span: 24 },
defaultValue: '',
componentProps: {
width: '100%',
span: 7,
defaultValue: '',
placeholder: '',
prefix: '',
suffix: '',
addonBefore: '',
addonAfter: '',
disabled: false,
allowClear: false,
showLabel: true,
autoCodeRule: 'CCMX',
required: false,
rules: [],
events: {},
listStyle: '',
isSave: false,
isShow: true,
scan: false,
bordered: true,
isShowAi: false,
tooltipConfig: { visible: false, title: '提示文本' },
style: { width: '100%' },
},
},
{
key: 'e31e3c2a30b243ca8753bded8b4a62cc',
field: 'lph',
label: '炉号',
field: 'lch',
label: '炉号',
type: 'input',
component: 'Input',
colProps: { span: 24 },
......@@ -367,7 +345,7 @@ export const formProps: FormProps = {
suffix: '',
addonBefore: '',
addonAfter: '',
disabled: false,
disabled: true,
allowClear: false,
showLabel: true,
required: false,
......@@ -398,19 +376,25 @@ export const formProps: FormProps = {
showSearch: false,
isMultiple: false,
clearable: false,
disabled: false,
disabled: true,
staticOptions: [
{ key: 1, label: '张三', value: '张三' },
{ key: 2, label: '李四', value: '李四' },
],
defaultSelect: '',
datasourceType: 'staticData',
datasourceType: 'api',
labelField: 'label',
valueField: 'value',
apiConfig: {
path: 'CodeGeneration/selection',
path: '/jcxx/getKhList',
method: 'GET',
apiId: '93d735dcb7364a0f8102188ec4d77ac7',
apiId: '7bc8db3faba24b19a997856f6ef0b27e',
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 roke_partner where delete_mark = 0 and customer = \'1\'";\r\nreturn db.select(sql);',
},
dicOptions: [],
required: false,
......@@ -421,6 +405,32 @@ export const formProps: FormProps = {
style: { width: '100%' },
},
},
{
key: 'dc4db2b098ab4dd198655c04b27f4df6',
field: 'zl',
label: '重量',
type: 'number',
component: 'InputNumber',
colProps: { span: 24 },
defaultValue: '',
componentProps: {
width: '100%',
span: 7,
defaultValue: '',
step: 0.01,
disabled: true,
showLabel: true,
controls: true,
required: false,
subTotal: false,
isShow: false,
rules: [],
events: {},
placeholder: '',
tooltipConfig: { visible: false, title: '提示文本' },
style: { width: '100%' },
},
},
],
},
{
......@@ -443,7 +453,7 @@ export const formProps: FormProps = {
suffix: '',
addonBefore: '',
addonAfter: '',
disabled: false,
disabled: true,
allowClear: false,
showLabel: true,
required: false,
......@@ -462,19 +472,16 @@ export const formProps: FormProps = {
{
key: '1c0bf170e3ba4be78474821571cda0e6',
field: 'csl',
label: '产出量',
label: '产出量',
type: 'number',
component: 'InputNumber',
colProps: { span: 24 },
defaultValue: 0,
componentProps: {
width: '100%',
span: 7,
defaultValue: 0,
min: 0,
max: 100,
step: 1,
disabled: false,
disabled: true,
showLabel: true,
controls: true,
required: false,
......@@ -507,9 +514,8 @@ export const formProps: FormProps = {
{ key: 2, label: '已入库', value: '已入库' },
{ key: 3, label: '未入库', value: '未入库' },
],
defaultSelect: '',
datasourceType: 'staticData',
labelField: 'label',
datasourceType: 'dic',
labelField: 'name',
valueField: 'value',
apiConfig: {
path: 'CodeGeneration/selection',
......@@ -522,6 +528,34 @@ export const formProps: FormProps = {
events: {},
isShow: true,
tooltipConfig: { visible: false, title: '提示文本' },
params: { itemId: '2016706939403292674' },
itemId: '2016706939403292674',
style: { width: '100%' },
},
},
{
key: '9b0eb4203d0f48bda446532f1db3cbdb',
field: 'ks',
label: '捆数',
type: 'number',
component: 'InputNumber',
colProps: { span: 24 },
defaultValue: '',
componentProps: {
width: '100%',
span: 7,
defaultValue: '',
step: 0.01,
disabled: true,
showLabel: true,
controls: true,
required: false,
subTotal: false,
isShow: false,
rules: [],
events: {},
placeholder: '',
tooltipConfig: { visible: false, title: '提示文本' },
style: { width: '100%' },
},
},
......@@ -547,7 +581,7 @@ export const formProps: FormProps = {
suffix: '',
addonBefore: '',
addonAfter: '',
disabled: false,
disabled: true,
allowClear: false,
showLabel: true,
required: false,
......@@ -578,8 +612,8 @@ export const formProps: FormProps = {
placeholder: '',
format: 'YYYY-MM-DD HH:mm:ss',
showLabel: true,
allowClear: true,
disabled: false,
allowClear: false,
disabled: true,
required: false,
isShow: true,
rules: [],
......@@ -590,6 +624,46 @@ export const formProps: FormProps = {
style: { width: '100%' },
},
},
{
key: 'd0e0407ab883414baed7b5e4ac06dca1',
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: '进行中', value: '进行中' },
{ key: 2, label: '已入库', value: '已入库' },
{ key: 3, label: '未入库', value: '未入库' },
],
datasourceType: 'dic',
labelField: 'name',
valueField: 'value',
apiConfig: {
path: 'CodeGeneration/selection',
method: 'GET',
apiId: '93d735dcb7364a0f8102188ec4d77ac7',
},
dicOptions: [],
required: false,
rules: [],
events: {},
isShow: true,
tooltipConfig: { visible: false, title: '提示文本' },
params: { itemId: '2015724355955159041' },
itemId: '2015724355955159041',
style: { width: '100%' },
},
},
],
},
],
......@@ -642,7 +716,7 @@ export const formButtons = [
name: '重置',
style: 'default',
event: [],
isShow: true,
isShow: false,
index: 0,
type: 1,
},
......
......@@ -2,29 +2,28 @@ export const permissionList = [
{
required: false,
view: true,
edit: true,
disabled: false,
edit: false,
disabled: true,
isSaveTable: false,
tableName: '',
fieldName: '编号',
fieldId: 'bh',
isSubTable: false,
showChildren: true,
type: 'input',
key: 'c31870ac60a74049bbf979f225394251',
type: 'auto-code',
key: 'ea62ca64d4e04d7b9b5113ccbfcfe537',
children: [],
options: {},
defaultValue: '',
},
{
required: false,
view: true,
edit: true,
edit: false,
disabled: false,
isSaveTable: false,
tableName: '',
fieldName: '炉号',
fieldId: 'lph',
fieldName: '炉号',
fieldId: 'lch',
isSubTable: false,
showChildren: true,
type: 'input',
......@@ -36,7 +35,7 @@ export const permissionList = [
{
required: false,
view: true,
edit: true,
edit: false,
disabled: false,
isSaveTable: false,
tableName: '',
......@@ -52,7 +51,24 @@ export const permissionList = [
{
required: false,
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,
isSaveTable: false,
tableName: '',
......@@ -69,11 +85,11 @@ export const permissionList = [
{
required: false,
view: true,
edit: true,
edit: false,
disabled: false,
isSaveTable: false,
tableName: '',
fieldName: '产出量',
fieldName: '产出量',
fieldId: 'csl',
isSubTable: false,
showChildren: true,
......@@ -81,7 +97,6 @@ export const permissionList = [
key: '1c0bf170e3ba4be78474821571cda0e6',
children: [],
options: {},
defaultValue: 0,
},
{
required: false,
......@@ -102,7 +117,24 @@ export const permissionList = [
{
required: false,
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,
isSaveTable: false,
tableName: '',
......@@ -119,7 +151,7 @@ export const permissionList = [
{
required: false,
view: true,
edit: true,
edit: false,
disabled: false,
isSaveTable: false,
tableName: '',
......@@ -134,7 +166,7 @@ export const permissionList = [
defaultValue: '',
},
{
required: true,
required: false,
view: true,
edit: true,
disabled: false,
......@@ -145,7 +177,7 @@ export const permissionList = [
isSubTable: false,
showChildren: true,
type: 'select',
key: 'lkajsldjaljdla',
key: 'd0e0407ab883414baed7b5e4ac06dca1',
children: [],
options: {},
},
......
......@@ -6,7 +6,7 @@
<template #resizeRight>
<BasicTable @register="registerTable" isMenuTable ref="tableRef" :row-selection="{ selectedRowKeys: selectedKeys, onChange: onSelectChange }"
<BasicTable @register="registerTable" isMenuTable ref="tableRef"
>
......@@ -131,7 +131,7 @@
//展示在列表内的按钮
const actionButtons = ref<string[]>(["view"]);
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);
})
......@@ -155,8 +155,6 @@
const selectedKeys = ref<string[]>([]);
const selectedRowsData = ref<any[]>([]);
......@@ -189,8 +187,6 @@
selectedKeys.value = [];
selectedRowsData.value = [];
},
useSearchForm: true,
......@@ -232,24 +228,10 @@
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("ccmx:edit")) {
handleEdit(record);
......@@ -261,8 +243,6 @@
function handleSuccess() {
selectedKeys.value = [];
selectedRowsData.value = [];
reload();
}
......
......@@ -100,8 +100,8 @@ export const columns: BasicColumn[] = [
{
resizable: true,
dataIndex: 'zch',
title: '次号',
dataIndex: 'lch',
title: '次号',
componentType: 'input',
fixed: false,
......@@ -909,8 +909,8 @@ export const formProps: FormProps = {
list: [
{
key: 'fada4c1222a94076a8e811c6489ce593',
field: 'zch',
label: '次号',
field: 'lch',
label: '次号',
type: 'input',
component: 'Input',
colProps: { span: 24 },
......@@ -919,7 +919,7 @@ export const formProps: FormProps = {
width: '100%',
span: 7,
defaultValue: '',
placeholder: '请输入铸次号',
placeholder: '',
prefix: '',
suffix: '',
addonBefore: '',
......@@ -973,7 +973,7 @@ export const formProps: FormProps = {
style: { width: '100%' },
},
},
{
/*{
key: 'dca82bcd3e7b44dfa96df1bc5a8d3ff3',
field: 'rch',
label: '熔次号',
......@@ -1005,6 +1005,54 @@ export const formProps: FormProps = {
tooltipConfig: { visible: false, title: '提示文本' },
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',
......@@ -1093,54 +1141,7 @@ export const formProps: FormProps = {
{
span: 8,
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 = [
disabled: false,
isSaveTable: false,
tableName: '',
fieldName: '次号',
fieldId: 'zch',
fieldName: '次号',
fieldId: 'lch',
isSubTable: false,
showChildren: true,
type: 'input',
......
......@@ -3,12 +3,12 @@ import { BasicColumn } from '/@/components/Table';
import { uploadApi } from '/@/api/sys/upload';
export const searchFormSchema: FormSchema[] = [
{
field: 'jhbh',
label: '计划编号',
defaultValue: undefined,
component: 'Input',
},
// {
// field: 'jhbh',
// label: '计划编号',
// defaultValue: undefined,
// component: 'Input',
// },
{
field: 'ddbh',
label: '订单编号',
......@@ -16,13 +16,13 @@ export const searchFormSchema: FormSchema[] = [
component: 'Input',
},
{
field: 'zt',
label: '状态',
field: 'ssgs',
label: '业务组织',
defaultValue: undefined,
component: 'XjrSelect',
componentProps: {
datasourceType: 'dic',
params: { itemId: '2004464883576217601' },
params: { itemId: '2015724355955159041' },
labelField: 'name',
valueField: 'value',
mode: 'multiple',
......@@ -31,13 +31,13 @@ export const searchFormSchema: FormSchema[] = [
},
},
{
field: 'ywzz',
label: '业务组织',
field: 'zt',
label: '状态',
defaultValue: undefined,
component: 'XjrSelect',
componentProps: {
datasourceType: 'dic',
params: { itemId: '2015724355955159041' },
params: { itemId: '2004464883576217601' },
labelField: 'name',
valueField: 'value',
mode: 'multiple',
......@@ -50,8 +50,8 @@ export const searchFormSchema: FormSchema[] = [
export const columns: BasicColumn[] = [
{
resizable: true,
dataIndex: 'jhbh',
title: '计划编号',
dataIndex: 'ddbh',
title: '订单编号',
componentType: 'input',
fixed: false,
......@@ -63,35 +63,35 @@ export const columns: BasicColumn[] = [
{
resizable: true,
dataIndex: 'ddbh',
title: '订单编号',
componentType: 'input',
dataIndex: 'jhbh',
title: '计划编号',
componentType: 'auto-code',
fixed: false,
sorter: true,
styleConfig: undefined,
listStyle: '',
listStyle: undefined,
},
{
resizable: true,
dataIndex: 'kh',
title: '客户',
componentType: 'input',
componentType: 'select',
fixed: false,
sorter: true,
styleConfig: undefined,
listStyle: '',
listStyle: undefined,
},
{
resizable: true,
dataIndex: 'jhjhrq',
title: '计划交付日期',
componentType: 'date',
dataIndex: 'ssgs',
title: '业务组织',
componentType: 'select',
fixed: false,
sorter: true,
......@@ -112,18 +112,6 @@ export const columns: BasicColumn[] = [
styleConfig: undefined,
listStyle: undefined,
},
{
resizable: true,
dataIndex: 'ywzz',
title: '业务组织',
componentType: 'select',
fixed: false,
sorter: true,
styleConfig: undefined,
listStyle: undefined,
},
];
//表头合并配置
export const headerMergingData = [];
......@@ -214,34 +202,24 @@ export const formProps: FormProps = {
span: 8,
list: [
{
key: 'bb401260571f476c9816266b858aa2fa',
key: '192945cba90645f593eb7e21a4776c97',
field: 'jhbh',
label: '计划编号',
type: 'input',
component: 'Input',
type: 'auto-code',
component: 'AutoCodeRule',
colProps: { span: 24 },
defaultValue: '',
componentProps: {
width: '100%',
span: 7,
defaultValue: '',
placeholder: '请输入计划编号',
prefix: '',
suffix: '',
addonBefore: '',
addonAfter: '',
disabled: false,
allowClear: false,
showLabel: true,
autoCodeRule: 'scjh',
required: true,
rules: [],
events: {},
listStyle: '',
isSave: false,
isShow: true,
scan: false,
bordered: true,
isShowAi: false,
tooltipConfig: { visible: false, title: '提示文本' },
style: { width: '100%' },
},
......@@ -409,49 +387,16 @@ export const formProps: FormProps = {
span: 8,
list: [
{
key: '105fe8a606b74e0ca90ea9ff1d20b648',
key: 'dbb3bfcc0aa54e84b31adc2ba45dd48b',
field: 'kh',
label: '客户',
type: 'input',
component: 'Input',
colProps: { span: 24 },
defaultValue: '',
componentProps: {
width: '100%',
span: 7,
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%' },
},
},
{
key: '6833bea0c42c432b83e6946695f2d723',
field: 'ssgs',
label: '所属公司',
type: 'select',
component: 'XjrSelect',
colProps: { span: 24 },
componentProps: {
width: '100%',
span: 7,
placeholder: '请选择下拉选择',
placeholder: '请选择下拉选择客户',
showLabel: true,
showSearch: false,
isMultiple: false,
......@@ -462,20 +407,21 @@ export const formProps: FormProps = {
{ key: 2, label: 'Option 2', value: 'Option 2' },
{ key: 3, label: 'Option 3', value: 'Option 3' },
],
defaultSelect: '',
datasourceType: 'api',
labelField: 'label',
valueField: 'value',
apiConfig: {
path: '/bmxx/getCompanyList',
path: '/jcxx/getKhList',
method: 'GET',
apiId: 'copy1765431632890d13798',
apiId: '7bc8db3faba24b19a997856f6ef0b27e',
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);',
'var sql="select id as value,name as label from roke_partner where delete_mark = 0 and customer = \'1\'";\r\nreturn db.select(sql);',
},
dicOptions: [],
required: false,
......@@ -486,14 +432,9 @@ export const formProps: FormProps = {
style: { width: '100%' },
},
},
],
},
{
span: 8,
list: [
{
key: 'lkajsldjaljdla',
field: 'ywzz',
key: '6833bea0c42c432b83e6946695f2d723',
field: 'ssgs',
label: '业务组织',
type: 'select',
component: 'XjrSelect',
......@@ -512,7 +453,6 @@ export const formProps: FormProps = {
{ key: 2, label: 'Option 2', value: 'Option 2' },
{ key: 3, label: 'Option 3', value: 'Option 3' },
],
defaultSelect: null,
datasourceType: 'dic',
labelField: 'name',
valueField: 'value',
......@@ -567,16 +507,17 @@ export const formProps: FormProps = {
mainKey: 'mesProductionPlanProductList',
columns: [
{
key: '0b5e3de2d92f4a1cba6a650cff672653',
title: 'id',
dataIndex: 'id',
key: 'd762849da7e741a7b004c1c81b91593a',
title: '产品ID',
dataIndex: 'cpid',
componentType: 'Input',
defaultValue: '',
componentProps: {
width: '100%',
span: '',
defaultValue: '',
placeholder: '请输入id',
placeholder: '请输入产品ID产品ID',
maxlength: null,
prefix: '',
suffix: '',
addonBefore: '',
......@@ -594,91 +535,7 @@ export const formProps: FormProps = {
bordered: true,
isShowAi: false,
tooltipConfig: { visible: false, title: '提示文本' },
},
},
{
key: '416cd1b15c314d0dafaf6fc91e3f4653',
title: '产品选择',
dataIndex: 'cpid',
componentType: 'MultiplePopup',
componentProps: {
popupType: 'associate',
width: '100%',
span: '',
placeholder: '请选择产品选择',
showLabel: true,
disabled: false,
datasourceType: 'api',
labelField: 'label',
valueField: 'value',
pageSize: 10,
assoTitle: '选择产品',
apiConfig: {
path: '/scgl/scjh/getAllProduct',
method: 'GET',
apiId: 'f4fbb57f2f18425e97918a031c8aa7d8',
apiParams: [
{ key: '1', title: 'Query Params', tableInfo: [] },
{ key: '2', title: 'Header', tableInfo: [] },
{ key: '3', title: 'Body' },
],
script:
"var sql = 'select *,id as value,cpmc as label from mes_base_product_info where delete_mark=0';\r\nreturn db.select(sql)",
outputParams: [
{ name: 'cpmc', tableTitle: '产品名称', show: true, width: 150 },
{
name: 'cpbh',
tableTitle: '物料编号',
bindField: 'cpbh',
show: true,
width: 150,
component: 'cd0038f42bc64c189b3821f0e2061321',
bindTable: 'mes_production_plan_product',
},
{
name: 'nbdm',
tableTitle: '内部代码',
bindField: 'nbdm',
show: true,
width: 150,
component: '6ce71ecb0b6e4d14ae65be4029b179fd',
bindTable: 'mes_production_plan_product',
},
{
name: 'xh',
tableTitle: '型号',
bindField: 'xh',
show: true,
width: 150,
component: '0c075736898c431ea3f5bca58ec65af6',
bindTable: 'mes_production_plan_product',
},
{
name: 'gg',
tableTitle: '规格',
bindField: 'gg',
show: true,
width: 150,
component: '2f56d9297a9c49d59d3b43f62e2946f2',
bindTable: 'mes_production_plan_product',
},
{
name: 'hjzt',
tableTitle: '合金状态',
bindField: 'hjzt',
show: true,
width: 150,
component: '697829b6aed54b8cbaa853c62619831a',
bindTable: 'mes_production_plan_product',
},
],
},
dicOptions: [],
required: false,
rules: [],
events: {},
isShow: true,
tooltipConfig: { visible: false, title: '提示文本' },
prestrainField: 'id',
},
},
{
......@@ -709,6 +566,7 @@ export const formProps: FormProps = {
bordered: true,
isShowAi: false,
tooltipConfig: { visible: false, title: '提示文本' },
prestrainField: 'cpbh',
},
},
{
......@@ -739,6 +597,7 @@ export const formProps: FormProps = {
bordered: true,
isShowAi: false,
tooltipConfig: { visible: false, title: '提示文本' },
prestrainField: 'nbdm',
},
},
{
......@@ -769,6 +628,7 @@ export const formProps: FormProps = {
bordered: true,
isShowAi: false,
tooltipConfig: { visible: false, title: '提示文本' },
prestrainField: 'xh',
},
},
{
......@@ -799,6 +659,7 @@ export const formProps: FormProps = {
bordered: true,
isShowAi: false,
tooltipConfig: { visible: false, title: '提示文本' },
prestrainField: 'hjzt',
},
},
{
......@@ -829,6 +690,7 @@ export const formProps: FormProps = {
bordered: true,
isShowAi: false,
tooltipConfig: { visible: false, title: '提示文本' },
prestrainField: 'gg',
},
},
{
......@@ -842,7 +704,7 @@ export const formProps: FormProps = {
span: '',
defaultValue: 0,
min: 0,
step: 0.1,
step: 1,
disabled: false,
showLabel: true,
controls: true,
......@@ -852,6 +714,7 @@ export const formProps: FormProps = {
rules: [],
events: {},
tooltipConfig: { visible: false, title: '提示文本' },
prestrainField: '',
listStyle: "return 'width:100%'",
},
},
......@@ -866,7 +729,7 @@ export const formProps: FormProps = {
span: '',
defaultValue: 0,
min: 0,
step: 1,
step: 0.1,
disabled: false,
showLabel: true,
controls: true,
......@@ -883,11 +746,29 @@ export const formProps: FormProps = {
],
span: '24',
preloadType: 'api',
apiConfig: {},
apiConfig: {
path: '/scgl/scjh/getAllProduct',
method: 'GET',
apiId: 'f4fbb57f2f18425e97918a031c8aa7d8',
apiParams: [
{ key: '1', title: 'Query Params', tableInfo: [] },
{ key: '2', title: 'Header', tableInfo: [] },
{ key: '3', title: 'Body' },
],
script:
"var sql = 'select *,id as value,cpmc as label from mes_base_product_info where delete_mark=0';\r\nreturn db.select(sql)",
outputParams: [
{ tableTitle: '产品编号', name: 'cpbh' },
{ tableTitle: '产品名称', name: 'cpmc' },
{ name: 'nbdm', tableTitle: '内部代码' },
{ name: 'gg', tableTitle: '规格' },
{ tableTitle: '型号', name: 'xh' },
],
},
itemId: '',
dicOptions: [],
useSelectButton: false,
buttonName: '选择数据',
useSelectButton: true,
buttonName: '选择产品',
showLabel: true,
showComponentBorder: true,
showBorder: false,
......@@ -904,7 +785,7 @@ export const formProps: FormProps = {
isDeleteSelected: false,
isListView: false,
viewList: [],
isShowAdd: true,
isShowAdd: false,
isShowDelete: true,
hasCheckedCol: false,
events: {},
......@@ -921,7 +802,7 @@ export const formProps: FormProps = {
componentProps: {
width: '100%',
span: '',
placeholder: '请选择下拉选择',
placeholder: '请选择下拉选择状态',
showLabel: true,
showSearch: false,
isMultiple: false,
......@@ -932,7 +813,7 @@ export const formProps: FormProps = {
{ key: 2, label: 'Option 2', value: 'Option 2' },
{ key: 3, label: 'Option 3', value: 'Option 3' },
],
defaultSelect: '1',
defaultSelect: '草稿',
datasourceType: 'dic',
params: { itemId: '2004464883576217601' },
labelField: 'name',
......
export const permissionList = [
{
required: true,
view: true,
edit: true,
disabled: false,
isSaveTable: false,
tableName: '',
fieldName: '业务组织',
fieldId: 'ywzz',
isSubTable: false,
showChildren: true,
type: 'select',
key: 'lkajsldjaljdla',
children: [],
options: {},
},
{
required: true,
required: false,
view: true,
edit: true,
disabled: false,
edit: false,
disabled: true,
isSaveTable: false,
tableName: '',
fieldName: '计划编号',
fieldId: 'jhbh',
isSubTable: false,
showChildren: true,
type: 'input',
key: 'bb401260571f476c9816266b858aa2fa',
type: 'auto-code',
key: '192945cba90645f593eb7e21a4776c97',
children: [],
options: {},
defaultValue: '',
},
{
required: false,
......@@ -128,20 +111,19 @@ export const permissionList = [
fieldId: 'kh',
isSubTable: false,
showChildren: true,
type: 'input',
key: '105fe8a606b74e0ca90ea9ff1d20b648',
type: 'select',
key: 'dbb3bfcc0aa54e84b31adc2ba45dd48b',
children: [],
options: {},
defaultValue: '',
},
{
required: false,
required: true,
view: true,
edit: true,
disabled: false,
isSaveTable: false,
tableName: '',
fieldName: '所属公司',
fieldName: '业务组织',
fieldId: 'ssgs',
isSubTable: false,
showChildren: true,
......@@ -158,7 +140,7 @@ export const permissionList = [
isSubTable: true,
showChildren: false,
tableName: 'mesProductionPlanProductList',
fieldName: '表格组件',
fieldName: '',
fieldId: 'mesProductionPlanProductList',
type: 'form',
key: '24ea4c6631d047a1a8e7c3fe86ab080c',
......@@ -172,25 +154,10 @@ export const permissionList = [
isSaveTable: false,
showChildren: false,
tableName: 'mesProductionPlanProductList',
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: '产品选择',
fieldName: '产品ID',
fieldId: 'cpid',
type: 'MultiplePopup',
key: '416cd1b15c314d0dafaf6fc91e3f4653',
type: 'Input',
key: 'd762849da7e741a7b004c1c81b91593a',
children: [],
},
{
......@@ -315,6 +282,6 @@ export const permissionList = [
key: 'f7ae7fe08ec74cf6b91cd3cd35cfeaaf',
children: [],
options: {},
defaultValue: '1',
defaultValue: '草稿',
},
];
......@@ -17,7 +17,8 @@
<a-button
v-else
: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>
{{ button.name }}
......@@ -50,7 +51,11 @@
import { Modal } from 'ant-design-vue';
import { ExclamationCircleOutlined } from '@ant-design/icons-vue';
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 { useMessage } from '/@/hooks/web/useMessage';
import { useI18n } from '/@/hooks/web/useI18n';
......@@ -70,8 +75,6 @@
const listSpliceNum = ref(3); //操作列最先展示几个
import { useConcurrentLock } from '/@/hooks/web/useConcurrentLock';
import axios from 'axios';
import { useUserStore } from '/@/store/modules/user';
const pageParamsInfo = ref<any>({});
const {
......@@ -149,7 +152,13 @@
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();
......@@ -204,40 +213,6 @@
});
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]();
}
......@@ -338,6 +313,33 @@
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) {
let list = getActions(record);
return list.slice(0, listSpliceNum.value);
......
......@@ -99,29 +99,17 @@ export const columns: BasicColumn[] = [
{
resizable: true,
dataIndex: 'rch',
title: '次号',
dataIndex: 'lch',
title: '次号',
componentType: 'input',
fixed: false,
sorter: true,
styleConfig: undefined,
listStyle: '',
listStyle: undefined,
},
{
resizable: true,
dataIndex: 'zch',
title: '铸次号',
componentType: 'input',
fixed: false,
sorter: true,
styleConfig: undefined,
listStyle: '',
},
{
resizable: true,
......@@ -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',
field: 'zch',
label: '铸次号',
......@@ -304,7 +340,7 @@ export const formProps: FormProps = {
tooltipConfig: { visible: false, title: '提示文本' },
style: { width: '100%' },
},
},
},*/
{
key: '25e30bcce47a437fb5674d9dbce3523a',
field: 'zl',
......@@ -686,9 +722,9 @@ export const formProps: FormProps = {
span: 6,
list: [
{
key: '3c95be972e5b4ebfb6fc32a629199a07',
field: 'rch',
label: '次号',
key: 'fsdfsdf',
field: 'lch',
label: '次号',
type: 'input',
component: 'Input',
colProps: { span: 24 },
......@@ -810,54 +846,7 @@ export const formProps: FormProps = {
{
span: 6,
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 = {
disabled: false,
showLabel: true,
controls: true,
required: false,
required: true,
subTotal: false,
isShow: true,
rules: [],
......
......@@ -220,12 +220,12 @@ export const permissionList = [
disabled: false,
isSaveTable: false,
tableName: '',
fieldName: '次号',
fieldId: 'rch',
fieldName: '次号',
fieldId: 'lch',
isSubTable: false,
showChildren: true,
type: 'input',
key: '3c95be972e5b4ebfb6fc32a629199a07',
key: 'fsdfsdf',
children: [],
options: {},
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