Commit dee15156 by 齐伟伦

Merge branch 'weiqiao-vue3' into 'hongshun'

Weiqiao vue3

See merge request !2
parents 945455de 7ec34d23
...@@ -29,10 +29,6 @@ export interface MesWarehouseProductPageModel { ...@@ -29,10 +29,6 @@ export interface MesWarehouseProductPageModel {
crklx: string; crklx: string;
kgy: string;
scbm: string;
ck: string; ck: string;
pch: string; pch: string;
...@@ -42,6 +38,8 @@ export interface MesWarehouseProductPageModel { ...@@ -42,6 +38,8 @@ export interface MesWarehouseProductPageModel {
djzt: string; djzt: string;
bz: string; bz: string;
kgy: string;
} }
/** /**
......
...@@ -74,7 +74,7 @@ export default { ...@@ -74,7 +74,7 @@ export default {
registerButton: '注册', registerButton: '注册',
rememberMe: '记住我', rememberMe: '记住我',
forgetPassword: '忘记密码?', forgetPassword: '忘记密码?',
otherSignIn: '其他登录方式', // otherSignIn: '其他登录方式',
// notify // notify
loginSuccessTitle: '登录成功', loginSuccessTitle: '登录成功',
......
...@@ -936,7 +936,7 @@ export const formProps: FormProps = { ...@@ -936,7 +936,7 @@ export const formProps: FormProps = {
labelField: 'label', labelField: 'label',
valueField: 'value', valueField: 'value',
pageSize: 10, pageSize: 10,
assoTitle: '联想弹层-联想数据配置', assoTitle: '物料编码',
apiConfig: { apiConfig: {
path: '/jcxx/wlInfoList', path: '/jcxx/wlInfoList',
method: 'GET', method: 'GET',
...@@ -1169,74 +1169,110 @@ export const formProps: FormProps = { ...@@ -1169,74 +1169,110 @@ export const formProps: FormProps = {
}, },
}, },
{ {
key: 'ac4098a101a84c40b7ef51f714b136d9', key: '36635cbf40d14baf96358f8fa129ce0f',
title: '实收数量', title: '实收数量',
dataIndex: 'sssl', dataIndex: 'sssl',
componentType: 'InputNumber', componentType: 'Computation',
defaultValue: 0,
componentProps: { componentProps: {
width: '100%',
span: '', span: '',
min: 0, width: '100%',
step: 1, defaultValue: 0,
disabled: false, placeholder: '请输入实收数量',
addonBefore: '',
addonAfter: '',
prefix: '',
maxlength: null,
showLabel: true, showLabel: true,
controls: true, disabled: false,
required: false,
subTotal: false, subTotal: false,
computationalConfig: [],
computationalConfigValue: '== 请填写计算式配置 ==',
beAdoptedComponent: ['4be31cc0258a426bb3ed21612076b687'],
decimals: 0,
required: false,
isShow: true, isShow: true,
rules: [], rules: [],
events: {}, events: {},
tooltipConfig: { visible: false, title: '提示文本' }, tooltipConfig: { visible: false, title: '提示文本' },
prestrainField: 'sssl',
listStyle: "return 'width:100%'",
}, },
}, },
{ {
key: '9cd15589c75f476ebe5605b3352e8ffc', key: '5e4377f941cd450ba40bbc1f9d26ff27',
title: '应收数量', title: '应收数量',
dataIndex: 'yssl', dataIndex: 'yssl',
componentType: 'InputNumber', componentType: 'Computation',
defaultValue: 0,
componentProps: { componentProps: {
width: '100%',
span: '', span: '',
min: 0, width: '100%',
step: 1, defaultValue: 0,
disabled: false, placeholder: '请输入应收数量',
addonBefore: '',
addonAfter: '',
prefix: '',
maxlength: null,
showLabel: true, showLabel: true,
controls: true, disabled: false,
required: false,
subTotal: false, subTotal: false,
computationalConfig: [],
computationalConfigValue: '== 请填写计算式配置 ==',
beAdoptedComponent: ['4be31cc0258a426bb3ed21612076b687'],
decimals: 0,
required: false,
isShow: true, isShow: true,
rules: [], rules: [],
events: {}, events: {},
tooltipConfig: { visible: false, title: '提示文本' }, tooltipConfig: { visible: false, title: '提示文本' },
prestrainField: 'yssl',
listStyle: "return 'width:100%'",
}, },
}, },
{ {
key: '3b7ca3cc16344d6787f1676dcd3a77b7', key: '4be31cc0258a426bb3ed21612076b687',
title: '剩余数量', title: '剩余数量',
dataIndex: 'sysl', dataIndex: 'sysl',
componentType: 'InputNumber', componentType: 'Computation',
defaultValue: '', defaultValue: 0,
componentProps: { componentProps: {
width: '100%',
span: '', span: '',
defaultValue: '', width: '100%',
min: 0, defaultValue: 0,
step: 1, placeholder: '请输入剩余数量',
disabled: false, addonBefore: '',
addonAfter: '',
prefix: '',
maxlength: null,
showLabel: true, showLabel: true,
controls: true, disabled: false,
required: false,
subTotal: false, subTotal: false,
computationalConfig: [
{
$index: 145,
label: '应收数量',
type: 'computational',
key: '5e4377f941cd450ba40bbc1f9d26ff27',
bindTable: 'mesWarehouseArrivedInfo',
bindField: 'yssl',
isMainForm: false,
},
{ $index: 841, label: '-', type: 'operation', key: 2 },
{
$index: 830,
label: '实收数量',
type: 'computational',
key: '36635cbf40d14baf96358f8fa129ce0f',
bindTable: 'mesWarehouseArrivedInfo',
bindField: 'sssl',
isMainForm: false,
},
],
computationalConfigValue: '应收数量-实收数量',
beAdoptedComponent: [],
decimals: 0,
required: false,
isShow: true, isShow: true,
rules: [], rules: [],
events: {}, events: {},
placeholder: '请输入剩余数量',
tooltipConfig: { visible: false, title: '提示文本' }, tooltipConfig: { visible: false, title: '提示文本' },
listStyle: "return 'width:100%'",
}, },
}, },
{ {
...@@ -1320,7 +1356,10 @@ export const formProps: FormProps = { ...@@ -1320,7 +1356,10 @@ export const formProps: FormProps = {
showLabel: true, showLabel: true,
required: false, required: false,
rules: [], rules: [],
events: {}, events: {
click:
"const pch = formModel['pch'];\nconst length =formModel['mesWarehouseArrivedInfoList'].length;\nformModel.mesWarehouseArrivedInfoList[length-1].pch=pch; ",
},
listStyle: '', listStyle: '',
isSave: false, isSave: false,
isShow: true, isShow: true,
......
...@@ -359,8 +359,8 @@ export const permissionList = [ ...@@ -359,8 +359,8 @@ export const permissionList = [
tableName: 'mesWarehouseArrivedInfoList', tableName: 'mesWarehouseArrivedInfoList',
fieldName: '实收数量', fieldName: '实收数量',
fieldId: 'sssl', fieldId: 'sssl',
type: 'InputNumber', type: 'Computation',
key: 'ac4098a101a84c40b7ef51f714b136d9', key: '36635cbf40d14baf96358f8fa129ce0f',
children: [], children: [],
}, },
{ {
...@@ -374,8 +374,8 @@ export const permissionList = [ ...@@ -374,8 +374,8 @@ export const permissionList = [
tableName: 'mesWarehouseArrivedInfoList', tableName: 'mesWarehouseArrivedInfoList',
fieldName: '应收数量', fieldName: '应收数量',
fieldId: 'yssl', fieldId: 'yssl',
type: 'InputNumber', type: 'Computation',
key: '9cd15589c75f476ebe5605b3352e8ffc', key: '5e4377f941cd450ba40bbc1f9d26ff27',
children: [], children: [],
}, },
{ {
...@@ -389,8 +389,8 @@ export const permissionList = [ ...@@ -389,8 +389,8 @@ export const permissionList = [
tableName: 'mesWarehouseArrivedInfoList', tableName: 'mesWarehouseArrivedInfoList',
fieldName: '剩余数量', fieldName: '剩余数量',
fieldId: 'sysl', fieldId: 'sysl',
type: 'InputNumber', type: 'Computation',
key: '3b7ca3cc16344d6787f1676dcd3a77b7', key: '4be31cc0258a426bb3ed21612076b687',
children: [], children: [],
}, },
{ {
......
...@@ -292,34 +292,87 @@ export const formProps: FormProps = { ...@@ -292,34 +292,87 @@ export const formProps: FormProps = {
span: 8, span: 8,
list: [ list: [
{ {
key: '5a82773c288f4bb49914109c9f112f9e', key: '1339633e12984e499ca9ceb44a89b739',
field: 'cpbh', field: 'cpbh',
label: '产品编号', label: '产品编号',
type: 'input', type: 'associate-popup',
component: 'Input', component: 'MultiplePopup',
colProps: { span: 24 }, colProps: { span: 24 },
defaultValue: '',
componentProps: { componentProps: {
popupType: 'associate',
width: '100%', width: '100%',
span: 7, span: 7,
defaultValue: '', placeholder: '请选择产品编号',
placeholder: '请输入产品编号',
prefix: '',
suffix: '',
addonBefore: '',
addonAfter: '',
disabled: false,
allowClear: false,
showLabel: true, showLabel: true,
disabled: false,
datasourceType: 'api',
labelField: 'label',
valueField: 'value',
pageSize: 10,
assoTitle: '产品信息',
apiConfig: {
path: '/jcxx/wlbhList',
method: 'GET',
apiId: '588543bf8c6045fd89f63b8337f5aec6',
apiParams: [
{
key: '1',
title: 'Query Params',
tableInfo: [
{
name: 'keyword',
value: null,
description: null,
required: false,
dataType: null,
type: null,
defaultValue: null,
validateType: null,
error: null,
expression: null,
children: null,
bindType: '',
},
],
},
{ key: '2', title: 'Header', tableInfo: [] },
{ key: '3', title: 'Body' },
],
script:
'var sql ="select *,cpbh as value,cpbh as label from mes_base_product_info where delete_mark = 0"+\r\n\' ?{keyword, AND cpmc LIKE CONCAT("%", #{keyword}, "%")}\';\r\nreturn db.select(sql);',
outputParams: [
{ name: 'label', tableTitle: '产品编码', show: true, width: 150 },
{
name: 'cpmc',
tableTitle: '产品名称',
bindField: 'cpmc',
show: true,
width: 150,
component: '464846c54eb54238b89b5b87fca84e3b',
},
{
name: 'gg',
tableTitle: '规格',
bindField: 'gg',
show: true,
width: 150,
component: '55216a96a79245c2894a1e7ed60537aa',
},
{
name: 'xh',
tableTitle: '型号',
bindField: 'xh',
show: true,
width: 150,
component: 'afdf24cf5fe14e898257fe820d398723',
},
],
},
dicOptions: [],
required: false, required: false,
rules: [], rules: [],
events: {}, events: {},
listStyle: '',
isSave: false,
isShow: true, isShow: true,
scan: false,
bordered: true,
isShowAi: false,
tooltipConfig: { visible: false, title: '提示文本' }, tooltipConfig: { visible: false, title: '提示文本' },
style: { width: '100%' }, style: { width: '100%' },
}, },
......
...@@ -10,11 +10,10 @@ export const permissionList = [ ...@@ -10,11 +10,10 @@ export const permissionList = [
fieldId: 'cpbh', fieldId: 'cpbh',
isSubTable: false, isSubTable: false,
showChildren: true, showChildren: true,
type: 'input', type: 'associate-popup',
key: '5a82773c288f4bb49914109c9f112f9e', key: '1339633e12984e499ca9ceb44a89b739',
children: [], children: [],
options: {}, options: {},
defaultValue: '',
}, },
{ {
required: false, required: false,
......
...@@ -76,11 +76,10 @@ export const permissionList = [ ...@@ -76,11 +76,10 @@ export const permissionList = [
fieldId: 'kgy', fieldId: 'kgy',
isSubTable: false, isSubTable: false,
showChildren: true, showChildren: true,
type: 'input', type: 'associate-popup',
key: '6948582a4bcc4ed59c2a9e20b0eb0a40', key: '5138ee5cb107492e994b7e0b9e69be26',
children: [], children: [],
options: {}, options: {},
defaultValue: '',
}, },
{ {
required: false, required: false,
...@@ -223,6 +222,21 @@ export const permissionList = [ ...@@ -223,6 +222,21 @@ export const permissionList = [
showChildren: false, showChildren: false,
tableName: 'mesWarehouseProductInfoList', tableName: 'mesWarehouseProductInfoList',
fieldName: '物料编码', fieldName: '物料编码',
fieldId: 'wlid',
type: 'MultiplePopup',
key: '9f9255da541c4ab6987fb95a9cd10fe0',
children: [],
},
{
required: true,
view: true,
edit: true,
disabled: false,
isSubTable: false,
isSaveTable: false,
showChildren: false,
tableName: 'mesWarehouseProductInfoList',
fieldName: '物料编码',
fieldId: 'wlbm', fieldId: 'wlbm',
type: 'Input', type: 'Input',
key: '67758677bce44720b4af09091d5590f3', key: '67758677bce44720b4af09091d5590f3',
...@@ -344,8 +358,8 @@ export const permissionList = [ ...@@ -344,8 +358,8 @@ export const permissionList = [
tableName: 'mesWarehouseProductInfoList', tableName: 'mesWarehouseProductInfoList',
fieldName: '货位', fieldName: '货位',
fieldId: 'hw', fieldId: 'hw',
type: 'Input', type: 'MultiplePopup',
key: '5d9a11c345e24ff59f416012ae5fb4c1', key: 'f48fe405a2dc46799eb0c943254d6c88',
children: [], children: [],
}, },
{ {
...@@ -403,6 +417,21 @@ export const permissionList = [ ...@@ -403,6 +417,21 @@ export const permissionList = [
showChildren: false, showChildren: false,
tableName: 'mesWarehouseProductChangeList', tableName: 'mesWarehouseProductChangeList',
fieldName: '物料编码', fieldName: '物料编码',
fieldId: 'wlid',
type: 'MultiplePopup',
key: 'c2c87879074c465cbf872c30f274f080',
children: [],
},
{
required: true,
view: true,
edit: true,
disabled: false,
isSubTable: false,
isSaveTable: false,
showChildren: false,
tableName: 'mesWarehouseProductChangeList',
fieldName: '物料编码',
fieldId: 'wlbm', fieldId: 'wlbm',
type: 'Input', type: 'Input',
key: 'd1de0271a0aa489e8fbed33e705c4f5a', key: 'd1de0271a0aa489e8fbed33e705c4f5a',
...@@ -479,8 +508,8 @@ export const permissionList = [ ...@@ -479,8 +508,8 @@ export const permissionList = [
tableName: 'mesWarehouseProductChangeList', tableName: 'mesWarehouseProductChangeList',
fieldName: '货位', fieldName: '货位',
fieldId: 'hw', fieldId: 'hw',
type: 'Input', type: 'MultiplePopup',
key: '4ff849ba704342fa901be52adeab6bb8', key: 'fe0be7ab60d8433d8c4b5832b15acd60',
children: [], children: [],
}, },
{ {
......
<template> <template>
<BasicModal <BasicModal
:height="500" :height="500"
v-bind="$attrs" @register="registerModal" :title="getTitle" v-bind="$attrs"
@ok="handleSubmit" @cancel="handleClose" > @register="registerModal"
:title="getTitle"
@ok="handleSubmit"
@cancel="handleClose"
>
<ModalForm ref="formRef" v-model:value="state.formModel" :fromPage="FromPageType.MENU" /> <ModalForm ref="formRef" v-model:value="state.formModel" :fromPage="FromPageType.MENU" />
<template #footer v-if=" !state.isView"> <template #footer v-if="!state.isView">
<template v-for="(item, index) in sortBy(formButtons, 'index')" :key="item.key"> <template v-for="(item, index) in sortBy(formButtons, 'index')" :key="item.key">
<template v-if="item.isShow"> <template v-if="item.isShow">
<CustomButtonModal v-if="item.type == CustomButtonModalType.Modal" :info="item" /> <CustomButtonModal v-if="item.type == CustomButtonModalType.Modal" :info="item" />
...@@ -23,7 +24,6 @@ ...@@ -23,7 +24,6 @@
</template> </template>
</template> </template>
</BasicModal> </BasicModal>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { ref, computed, reactive, provide, Ref } from 'vue'; import { ref, computed, reactive, provide, Ref } from 'vue';
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
import CustomButtonModal from '/@/components/Form/src/components/CustomButtonModal.vue'; import CustomButtonModal from '/@/components/Form/src/components/CustomButtonModal.vue';
import { useMessage } from '/@/hooks/web/useMessage'; import { useMessage } from '/@/hooks/web/useMessage';
import { useI18n } from '/@/hooks/web/useI18n'; import { useI18n } from '/@/hooks/web/useI18n';
import { formProps ,formButtons } from './config'; import { formProps, formButtons } from './config';
import ModalForm from './Form.vue'; import ModalForm from './Form.vue';
import { FromPageType } from '/@/enums/workflowEnum'; import { FromPageType } from '/@/enums/workflowEnum';
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
const { notification } = useMessage(); const { notification } = useMessage();
const formRef = ref(); const formRef = ref();
const isCopy = ref<boolean>(false) const isCopy = ref<boolean>(false);
const state = reactive({ const state = reactive({
formModel: {}, formModel: {},
isUpdate: true, isUpdate: true,
...@@ -58,10 +58,11 @@ ...@@ -58,10 +58,11 @@
await handleInner(data); await handleInner(data);
}); });
const getTitle = computed(() => (state.isView ? '查看' : state.isUpdate ? '编辑' : isCopy.value ? '复制数据' : '新增')); const getTitle = computed(() =>
state.isView ? '查看' : state.isUpdate ? '编辑' : isCopy.value ? '复制数据' : '新增',
);
async function handleInner(data){ async function handleInner(data) {
state.isUpdate = !!data?.isUpdate; state.isUpdate = !!data?.isUpdate;
state.isView = !!data?.isView; state.isView = !!data?.isView;
isCopy.value = !!data?.isCopy; isCopy.value = !!data?.isCopy;
...@@ -73,7 +74,8 @@ ...@@ -73,7 +74,8 @@
showOkBtn: false, showOkBtn: false,
canFullscreen: true, canFullscreen: true,
width: 900, width: 900,
footer: state.isView ? null : undefined,defaultFullscreen:true, footer: state.isView ? null : undefined,
defaultFullscreen: true,
}); });
if (state.isUpdate || state.isView || isCopy.value) { if (state.isUpdate || state.isView || isCopy.value) {
...@@ -85,10 +87,9 @@ ...@@ -85,10 +87,9 @@
await formRef.value.setFormDataFromId(state.rowId); await formRef.value.setFormDataFromId(state.rowId);
} else { } else {
formRef.value.resetFields(); formRef.value.resetFields();
} }
} }
async function saveModal() { async function saveModal() {
let saveSuccess = false; let saveSuccess = false;
try { try {
...@@ -140,15 +141,14 @@ ...@@ -140,15 +141,14 @@
emit('success'); emit('success');
} }
} finally { } finally {
setModalProps({ confirmLoading: false }); setModalProps({ confirmLoading: false });
} }
} }
function customClick(item) { function customClick(item) {
if (item.key == 'confirm') { if (item.key == 'confirm') {
handleSubmit(); handleSubmit();
} else if (item.key == 'cancel' && props.formType !== 'normal') { } else if (item.key == 'cancel') {
handleClose(); handleClose();
closeModal(); closeModal();
} else if (item.key == 'reset') { } else if (item.key == 'reset') {
...@@ -157,10 +157,8 @@ ...@@ -157,10 +157,8 @@
executeCurFormEvent(item.event, state.formModel, true); executeCurFormEvent(item.event, state.formModel, true);
} }
} }
function handleClose() { function handleClose() {
formRef.value.resetFields(); formRef.value.resetFields();
} }
</script> </script>
\ No newline at end of file
<template> <template>
<div class="pt-4"> <div class="pt-4">
<SimpleForm <SimpleForm
ref="systemFormRef" ref="systemFormRef"
:formProps="data.formDataProps" :formProps="data.formDataProps"
:formModel="state.formModel" :formModel="state.formModel"
:isWorkFlow="props.fromPage!=FromPageType.MENU" :isWorkFlow="props.fromPage != FromPageType.MENU"
:isCamelCase="true" :isCamelCase="true"
@model-change="handleChange" @model-change="handleChange"
/> />
...@@ -15,13 +14,22 @@ ...@@ -15,13 +14,22 @@
import { reactive, ref, onMounted, nextTick, watch } from 'vue'; import { reactive, ref, onMounted, nextTick, watch } from 'vue';
import { formProps, formEventConfigs } from './config'; import { formProps, formEventConfigs } from './config';
import SimpleForm from '/@/components/SimpleForm/src/SimpleForm.vue'; import SimpleForm from '/@/components/SimpleForm/src/SimpleForm.vue';
import { addMesCollectionScheme, getMesCollectionScheme, updateMesCollectionScheme } from '/@/api/jcsj/cjfa'; import {
addMesCollectionScheme,
getMesCollectionScheme,
updateMesCollectionScheme,
} from '/@/api/jcsj/cjfa';
import { cloneDeep, isString } from 'lodash-es'; import { cloneDeep, isString } from 'lodash-es';
import { FormDataProps } from '/@/components/Designer/src/types'; import { FormDataProps } from '/@/components/Designer/src/types';
import { usePermission } from '/@/hooks/web/usePermission'; import { usePermission } from '/@/hooks/web/usePermission';
import CustomButtonModal from '/@/components/Form/src/components/CustomButtonModal.vue'; import CustomButtonModal from '/@/components/Form/src/components/CustomButtonModal.vue';
import { FromPageType } from '/@/enums/workflowEnum'; import { FromPageType } from '/@/enums/workflowEnum';
import { createFormEvent, getFormDataEvent, loadFormEvent, submitFormEvent,} from '/@/hooks/web/useFormEvent'; import {
createFormEvent,
getFormDataEvent,
loadFormEvent,
submitFormEvent,
} from '/@/hooks/web/useFormEvent';
import { changeWorkFlowForm, changeSchemaDisabled } from '/@/hooks/web/useWorkFlowForm'; import { changeWorkFlowForm, changeSchemaDisabled } from '/@/hooks/web/useWorkFlowForm';
import { WorkFlowFormParams } from '/@/model/workflow/bpmnConfig'; import { WorkFlowFormParams } from '/@/model/workflow/bpmnConfig';
import { useRouter } from 'vue-router'; import { useRouter } from 'vue-router';
...@@ -29,7 +37,7 @@ ...@@ -29,7 +37,7 @@
const { filterFormSchemaAuth } = usePermission(); const { filterFormSchemaAuth } = usePermission();
const RowKey = 'id'; const RowKey = 'id';
const emits = defineEmits(['changeUploadComponentIds','loadingCompleted', 'update:value']); const emits = defineEmits(['changeUploadComponentIds', 'loadingCompleted', 'update:value']);
const props = defineProps({ const props = defineProps({
fromPage: { fromPage: {
type: Number, type: Number,
...@@ -42,7 +50,7 @@ ...@@ -42,7 +50,7 @@
}); });
const state = reactive({ const state = reactive({
formModel: {}, formModel: {},
formInfo:{formId:'',formName:''} formInfo: { formId: '', formName: '' },
}); });
const { currentRoute } = useRouter(); const { currentRoute } = useRouter();
watch( watch(
...@@ -59,17 +67,35 @@ ...@@ -59,17 +67,35 @@
try { try {
if (props.fromPage == FromPageType.MENU) { if (props.fromPage == FromPageType.MENU) {
setMenuPermission(); setMenuPermission();
if(currentRoute.value.meta){ if (currentRoute.value.meta) {
state.formInfo.formName = currentRoute.value.meta.title&&isString(currentRoute.value.meta.title)?currentRoute.value.meta.title:''; state.formInfo.formName =
state.formInfo.formId = currentRoute.value.meta.formId&&isString(currentRoute.value.meta.formId)?currentRoute.value.meta.formId:''; 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, await createFormEvent(
formEventConfigs,
state.formModel,
systemFormRef.value, systemFormRef.value,
formProps.schemas, true, state.formInfo.formName,state.formInfo.formId); //表单事件:初始化表单 formProps.schemas,
true,
state.formInfo.formName,
state.formInfo.formId,
); //表单事件:初始化表单
await nextTick(); await nextTick();
await loadFormEvent(formEventConfigs, state.formModel, await loadFormEvent(
formEventConfigs,
state.formModel,
systemFormRef.value, systemFormRef.value,
formProps.schemas, true, state.formInfo.formName,state.formInfo.formId); //表单事件:加载表单 formProps.schemas,
true,
state.formInfo.formName,
state.formInfo.formId,
); //表单事件:加载表单
} else if (props.fromPage == FromPageType.FLOW) { } else if (props.fromPage == FromPageType.FLOW) {
emits('loadingCompleted'); //告诉系统表单已经加载完毕 emits('loadingCompleted'); //告诉系统表单已经加载完毕
// loadingCompleted后 工作流页面直接利用Ref调用setWorkFlowForm方法 // loadingCompleted后 工作流页面直接利用Ref调用setWorkFlowForm方法
...@@ -78,15 +104,28 @@ ...@@ -78,15 +104,28 @@
} else if (props.fromPage == FromPageType.DESKTOP) { } else if (props.fromPage == FromPageType.DESKTOP) {
// 桌面设计 表单事件需要执行 // 桌面设计 表单事件需要执行
emits('loadingCompleted'); //告诉系统表单已经加载完毕 emits('loadingCompleted'); //告诉系统表单已经加载完毕
await createFormEvent(formEventConfigs, state.formModel, await createFormEvent(
formEventConfigs,
state.formModel,
systemFormRef.value, systemFormRef.value,
formProps.schemas, true, state.formInfo.formName,state.formInfo.formId); //表单事件:初始化表单 formProps.schemas,
await loadFormEvent(formEventConfigs, state.formModel, true,
state.formInfo.formName,
state.formInfo.formId,
); //表单事件:初始化表单
await loadFormEvent(
formEventConfigs,
state.formModel,
systemFormRef.value, systemFormRef.value,
formProps.schemas, true, state.formInfo.formName,state.formInfo.formId); //表单事件:加载表单 formProps.schemas,
true,
state.formInfo.formName,
state.formInfo.formId,
); //表单事件:加载表单
} }
} catch (error) {} } catch (error) {}
}); });
// 根据菜单页面权限,设置表单属性(必填,禁用,显示) // 根据菜单页面权限,设置表单属性(必填,禁用,显示)
function setMenuPermission() { function setMenuPermission() {
data.formDataProps.schemas = filterFormSchemaAuth(data.formDataProps.schemas!); data.formDataProps.schemas = filterFormSchemaAuth(data.formDataProps.schemas!);
...@@ -107,19 +146,25 @@ ...@@ -107,19 +146,25 @@
} }
return values; return values;
} }
// 根据行唯一ID查询行数据,并设置表单数据 【编辑】 // 根据行唯一ID查询行数据,并设置表单数据 【编辑】
async function setFormDataFromId(rowId) { async function setFormDataFromId(rowId) {
try { try {
const record = await getMesCollectionScheme(rowId); const record = await getMesCollectionScheme(rowId);
setFieldsValue(record); setFieldsValue(record);
state.formModel = record; state.formModel = record;
await getFormDataEvent(formEventConfigs, state.formModel, await getFormDataEvent(
formEventConfigs,
state.formModel,
systemFormRef.value, systemFormRef.value,
formProps.schemas, true, state.formInfo.formName,state.formInfo.formId); //表单事件:获取表单数据 formProps.schemas,
} catch (error) { true,
state.formInfo.formName,
} state.formInfo.formId,
); //表单事件:获取表单数据
} catch (error) {}
} }
// 辅助返回表单数据 // 辅助返回表单数据
async function getFieldsValue() { async function getFieldsValue() {
let values = []; let values = [];
...@@ -135,45 +180,64 @@ ...@@ -135,45 +180,64 @@
} }
return values; return values;
} }
// 辅助设置表单数据 // 辅助设置表单数据
function setFieldsValue(record) { function setFieldsValue(record) {
systemFormRef.value.setFieldsValue(record); systemFormRef.value.setFieldsValue(record);
} }
// 重置表单数据 // 重置表单数据
async function resetFields() { async function resetFields() {
await systemFormRef.value.resetFields(); await systemFormRef.value.resetFields();
} }
// 设置表单数据全部为Disabled 【查看】 // 设置表单数据全部为Disabled 【查看】
async function setDisabledForm( ) { async function setDisabledForm() {
data.formDataProps.schemas = changeSchemaDisabled(cloneDeep(data.formDataProps.schemas)); data.formDataProps.schemas = changeSchemaDisabled(cloneDeep(data.formDataProps.schemas));
} }
// 获取行键值 // 获取行键值
function getRowKey() { function getRowKey() {
return RowKey; return RowKey;
} }
// 更新api表单数据 // 更新api表单数据
async function update({ values, rowId }) { async function update({ values, rowId }) {
try { try {
values[RowKey] = rowId; values[RowKey] = rowId;
state.formModel = values; state.formModel = values;
let saveVal = await updateMesCollectionScheme(values); let saveVal = await updateMesCollectionScheme(values);
await submitFormEvent(formEventConfigs, state.formModel, await submitFormEvent(
formEventConfigs,
state.formModel,
systemFormRef.value, systemFormRef.value,
formProps.schemas, true, state.formInfo.formName,state.formInfo.formId); //表单事件:提交表单 formProps.schemas,
true,
state.formInfo.formName,
state.formInfo.formId,
); //表单事件:提交表单
return saveVal; return saveVal;
} catch (error) {} } catch (error) {}
} }
// 新增api表单数据 // 新增api表单数据
async function add(values) { async function add(values) {
try { try {
state.formModel = values; state.formModel = values;
let saveVal = await addMesCollectionScheme(values); let saveVal = await addMesCollectionScheme(values);
await submitFormEvent(formEventConfigs, state.formModel, await submitFormEvent(
formEventConfigs,
state.formModel,
systemFormRef.value, systemFormRef.value,
formProps.schemas, true, state.formInfo.formName,state.formInfo.formId); //表单事件:提交表单 formProps.schemas,
true,
state.formInfo.formName,
state.formInfo.formId,
); //表单事件:提交表单
return saveVal; return saveVal;
} catch (error) {} } catch (error) {}
} }
// 根据工作流页面权限,设置表单属性(必填,禁用,显示) // 根据工作流页面权限,设置表单属性(必填,禁用,显示)
async function setWorkFlowForm(obj: WorkFlowFormParams) { async function setWorkFlowForm(obj: WorkFlowFormParams) {
try { try {
...@@ -189,16 +253,30 @@ ...@@ -189,16 +253,30 @@
state.formModel = formModels; state.formModel = formModels;
setFieldsValue(formModels); setFieldsValue(formModels);
} catch (error) {} } catch (error) {}
await createFormEvent(formEventConfigs, state.formModel, await createFormEvent(
formEventConfigs,
state.formModel,
systemFormRef.value, systemFormRef.value,
formProps.schemas, true, state.formInfo.formName,state.formInfo.formId); //表单事件:初始化表单 formProps.schemas,
await loadFormEvent(formEventConfigs, state.formModel, true,
state.formInfo.formName,
state.formInfo.formId,
); //表单事件:初始化表单
await loadFormEvent(
formEventConfigs,
state.formModel,
systemFormRef.value, systemFormRef.value,
formProps.schemas, true, state.formInfo.formName,state.formInfo.formId); //表单事件:加载表单 formProps.schemas,
true,
state.formInfo.formName,
state.formInfo.formId,
); //表单事件:加载表单
} }
function handleChange(val) { function handleChange(val) {
emits('update:value', val); emits('update:value', val);
} }
async function sendMessageForAllIframe() { async function sendMessageForAllIframe() {
try { try {
if (systemFormRef.value && systemFormRef.value.sendMessageForAllIframe) { if (systemFormRef.value && systemFormRef.value.sendMessageForAllIframe) {
...@@ -206,6 +284,7 @@ ...@@ -206,6 +284,7 @@
} }
} catch (error) {} } catch (error) {}
} }
defineExpose({ defineExpose({
setFieldsValue, setFieldsValue,
resetFields, resetFields,
...@@ -218,8 +297,6 @@ ...@@ -218,8 +297,6 @@
setWorkFlowForm, setWorkFlowForm,
getRowKey, getRowKey,
getFieldsValue, getFieldsValue,
sendMessageForAllIframe sendMessageForAllIframe,
}); });
</script> </script>
\ No newline at end of file
...@@ -523,6 +523,7 @@ export const formProps: FormProps = { ...@@ -523,6 +523,7 @@ export const formProps: FormProps = {
{ name: 'code', tableTitle: '编码' }, { name: 'code', tableTitle: '编码' },
{ name: 'name', tableTitle: '名称' }, { name: 'name', tableTitle: '名称' },
{ name: 'note', tableTitle: '备注' }, { name: 'note', tableTitle: '备注' },
{ name: 'type', tableTitle: '类型' },
{ name: 'id', tableTitle: 'ID' }, { name: 'id', tableTitle: 'ID' },
], ],
}, },
......
...@@ -135,4 +135,3 @@ ...@@ -135,4 +135,3 @@
</script> </script>
\ No newline at end of file
...@@ -21,10 +21,10 @@ ...@@ -21,10 +21,10 @@
{{ button.name }} {{ button.name }}
</a-button> </a-button>
<CustomButtonModal v-else-if="button.buttonType == 'modal'" :info="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'" > <!-- <a-button v-else :type="button.buttonType === 'danger' ? 'default' : button.buttonType || 'primary'" :danger="button.buttonType === 'danger'" >-->
<template #icon><Icon :icon="button.icon" /></template> <!-- <template #icon><Icon :icon="button.icon" /></template>-->
{{ button.name }} <!-- {{ button.name }}-->
</a-button> <!-- </a-button>-->
</template> </template>
</template> </template>
<template #bodyCell="{ column, record }"> <template #bodyCell="{ column, record }">
...@@ -137,11 +137,6 @@ ...@@ -137,11 +137,6 @@
const filterColumns = filterColumnAuth(columns); const filterColumns = filterColumnAuth(columns);
const tableRef = ref(); const tableRef = ref();
//展示在列表内的按钮 //展示在列表内的按钮
const actionButtons = ref<string[]>(["view","edit","delete"]); const actionButtons = ref<string[]>(["view","edit","delete"]);
const buttonConfigs = computed(()=>{ const buttonConfigs = computed(()=>{
......
...@@ -267,7 +267,7 @@ export const formProps: FormProps = { ...@@ -267,7 +267,7 @@ export const formProps: FormProps = {
popupType: 'associate', popupType: 'associate',
width: '100%', width: '100%',
span: 7, span: 7,
placeholder: '请产品名称选择', placeholder: '请选择产品名称',
showLabel: true, showLabel: true,
disabled: false, disabled: false,
datasourceType: 'api', datasourceType: 'api',
...@@ -927,7 +927,8 @@ export const formProps: FormProps = { ...@@ -927,7 +927,8 @@ export const formProps: FormProps = {
{ key: '3', title: 'Body' }, { key: '3', title: 'Body' },
], ],
script: script:
"if(keyword!=null && keyword!=''){\r\n var sql = \"select *,id as value,cpmc as label from mes_base_product_info where delete_mark=0 and cpmc like '%${keyword}%' \";\r\n return db.select(sql)\r\n}\r\nvar sql = 'select *,id as value,cpmc as label from mes_base_product_info where delete_mark=0';\r\nreturn db.select(sql)", "if(keyword!=null && keyword!=''){\r\n var sql " +
"= \"select *,id as value,cpmc as label from mes_base_product_info where delete_mark=0 and cpmc like '%${keyword}%' \";\r\n return db.select(sql)\r\n}\r\nvar sql = 'select *,id as value,cpmc as label from mes_base_product_info where delete_mark=0';\r\nreturn db.select(sql)",
outputParams: [ outputParams: [
{ name: 'cpbh', tableTitle: '编号' }, { name: 'cpbh', tableTitle: '编号' },
{ name: 'cpmc', tableTitle: '名称' }, { name: 'cpmc', tableTitle: '名称' },
......
...@@ -1126,6 +1126,35 @@ export const formProps: FormProps = { ...@@ -1126,6 +1126,35 @@ export const formProps: FormProps = {
}, },
}, },
{ {
key: 'f77409b09aba410ca08f78847b871a45',
field: 'jhsl',
label: '计划数量',
type: 'number',
component: 'InputNumber',
colProps: { span: 24 },
defaultValue: '',
componentProps: {
width: '100%',
span: 7,
defaultValue: '',
min: 0,
max: null,
step: 1,
maxlength: null,
disabled: false,
showLabel: true,
controls: true,
required: false,
subTotal: false,
isShow: true,
rules: [],
events: {},
placeholder: '请输入计划数量',
tooltipConfig: { visible: false, title: '提示文本' },
style: { width: '100%' },
},
},
{
key: '32d66a3f683c4cb482f439d0619412fd', key: '32d66a3f683c4cb482f439d0619412fd',
field: 'bz', field: 'bz',
label: '备注', label: '备注',
...@@ -1138,7 +1167,7 @@ export const formProps: FormProps = { ...@@ -1138,7 +1167,7 @@ export const formProps: FormProps = {
span: 7, span: 7,
defaultValue: '', defaultValue: '',
placeholder: '请输入备注', placeholder: '请输入备注',
rows: 4, rows: 3,
autoSize: false, autoSize: false,
showCount: false, showCount: false,
disabled: false, disabled: false,
......
...@@ -387,6 +387,23 @@ export const permissionList = [ ...@@ -387,6 +387,23 @@ export const permissionList = [
disabled: false, disabled: false,
isSaveTable: false, isSaveTable: false,
tableName: '', tableName: '',
fieldName: '计划数量',
fieldId: 'jhsl',
isSubTable: false,
showChildren: true,
type: 'number',
key: 'f77409b09aba410ca08f78847b871a45',
children: [],
options: {},
defaultValue: '',
},
{
required: false,
view: true,
edit: true,
disabled: false,
isSaveTable: false,
tableName: '',
fieldName: '备注', fieldName: '备注',
fieldId: 'bz', fieldId: 'bz',
isSubTable: false, isSubTable: false,
......
...@@ -111,11 +111,20 @@ import { log } from 'node:console'; ...@@ -111,11 +111,20 @@ import { log } from 'node:console';
if (newGylxId && !state.isInitializing) { if (newGylxId && !state.isInitializing) {
try { try {
const response = await getRokeRouting(newGylxId); const response = await getRokeRouting(newGylxId);
//计划数量
const jhsl = state.formModel["sl"];
//计划开始时间
const jhksrq = state.formModel["jhksrq"];
//计划结束时间
const jhjsrq = state.formModel["jhjsrq"];
// Assign the process list from API response to production order list with field mapping // Assign the process list from API response to production order list with field mapping
state.formModel.mesProductionGongdanList = response.rokeRoutingProcessList.map(item => ({ state.formModel.mesProductionGongdanList = response.rokeRoutingProcessList.map(item => ({
gxbh: item.code, // 工序编号 → 工序编号 gxbh: item.code, // 工序编号 → 工序编号
gxmc: item.name, // 工序名称 → 工序名称 gxmc: item.name, // 工序名称 → 工序名称
jhsl: jhsl,
jhksrq: jhksrq,
jhjsrq: jhjsrq,
gxId: item.processId // 工序ID → 工序ID gxId: item.processId // 工序ID → 工序ID
})); }));
} catch (error) { } catch (error) {
......
...@@ -782,7 +782,7 @@ export const formProps: FormProps = { ...@@ -782,7 +782,7 @@ export const formProps: FormProps = {
maxSize: '', maxSize: '',
showLabel: true, showLabel: true,
multiple: false, multiple: false,
disabled: true, disabled: false,
required: false, required: false,
isShow: true, isShow: true,
events: {}, events: {},
...@@ -817,7 +817,7 @@ export const formProps: FormProps = { ...@@ -817,7 +817,7 @@ export const formProps: FormProps = {
disabled: false, disabled: false,
allowClear: false, allowClear: false,
showLabel: true, showLabel: true,
required: false, required: true,
rules: [], rules: [],
events: { change: '' }, events: { change: '' },
listStyle: '', listStyle: '',
...@@ -1384,6 +1384,102 @@ export const formProps: FormProps = { ...@@ -1384,6 +1384,102 @@ export const formProps: FormProps = {
}, },
}, },
{ {
key: '512d436e22c895a098efc1be72a113ea',
title: '计划数量',
dataIndex: 'jhsl',
componentType: 'InputNumber',
defaultValue: null,
componentProps: {
width: '100%',
span: '',
defaultValue: null,
placeholder: '',
prefix: '',
suffix: '',
addonBefore: '',
addonAfter: '',
disabled: true,
allowClear: false,
showLabel: true,
required: false,
rules: [],
events: {},
listStyle: '',
isSave: false,
isShow: true,
scan: false,
bordered: true,
isShowAi: false,
tooltipConfig: { visible: false, title: '提示文本' },
prestrainField: '',
},
},
{
key: '983d777e22c113a965efc1be72a225ea',
title: '计划开始时间',
dataIndex: 'jhksrq',
componentType: 'DatePicker',
defaultValue: null,
componentProps: {
width: '100%',
span: '',
defaultValue: null,
placeholder: '',
prefix: '',
suffix: '',
addonBefore: '',
addonAfter: '',
format: 'YYYY-MM-DD HH:mm:ss',
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: '提示文本' },
prestrainField: '',
},
},
{
key: '345d623e15c966a965efc1be72a446ea',
title: '计划结束时间',
dataIndex: 'jhjsrq',
componentType: 'DatePicker',
defaultValue: null,
componentProps: {
width: '100%',
span: '',
defaultValue: null,
placeholder: '',
prefix: '',
suffix: '',
addonBefore: '',
addonAfter: '',
format: 'YYYY-MM-DD HH:mm:ss',
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: '提示文本' },
prestrainField: '',
},
},
{
key: '2f069a67fe784742a2729fa09af94ec4', key: '2f069a67fe784742a2729fa09af94ec4',
title: '工序ID隐藏', title: '工序ID隐藏',
dataIndex: 'gxId', dataIndex: 'gxId',
......
...@@ -35,23 +35,23 @@ ...@@ -35,23 +35,23 @@
</template> </template>
</InputPassword> </InputPassword>
</FormItem> </FormItem>
<FormItem name="code" class="enter-x" v-if="formData.showCaptcha"> <!-- <FormItem name="code" class="enter-x" v-if="formData.showCaptcha">-->
<label class="form-title"> {{ t('验证码') }}</label> <!-- <label class="form-title"> {{ t('验证码') }}</label>-->
<div style="display: flex"> <!-- <div style="display: flex">-->
<Input <!-- <Input-->
size="large" <!-- size="large"-->
v-model:value="formData.code" <!-- v-model:value="formData.code"-->
:placeholder="t('验证码')" <!-- :placeholder="t('验证码')"-->
class="fix-auto-fill" <!-- class="fix-auto-fill"-->
style="height: 58px" <!-- style="height: 58px"-->
/> <!-- />-->
<img <!-- <img-->
:src="formData.captchaImg" <!-- :src="formData.captchaImg"-->
style="width: 100%; height: 60px; margin-left: 10px" <!-- style="width: 100%; height: 60px; margin-left: 10px"-->
@click="getImg" <!-- @click="getImg"-->
/> <!-- />-->
</div> <!-- </div>-->
</FormItem> <!-- </FormItem>-->
<ARow class="enter-x"> <ARow class="enter-x">
<ACol :span="12"> <ACol :span="12">
<FormItem> <FormItem>
...@@ -97,16 +97,16 @@ ...@@ -97,16 +97,16 @@
</ACol> </ACol>
</ARow> --> </ARow> -->
<a-divider class="enter-x">{{ t('其他登录方式') }}</a-divider> <!-- <a-divider class="enter-x">{{ t('其他登录方式') }}</a-divider>-->
</div> </div>
<!-- <div style="height: 1000px; width: 800px" v-else> <!-- <div style="height: 1000px; width: 800px" v-else>
<iframe id="iframeId" style="height: 100%; width: 100%" :src="authorizeUrl"></iframe> <iframe id="iframeId" style="height: 100%; width: 100%" :src="authorizeUrl"></iframe>
</div> --> </div> -->
<div class="text-center" :class="`${prefixCls}-sign-in-way`"> <!-- <div class="text-center" :class="`${prefixCls}-sign-in-way`">-->
<WechatOutlined @click="oauthLogin('wechat_enterprise')" class="methods-icon mr-5" /> <!-- <WechatOutlined @click="oauthLogin('wechat_enterprise')" class="methods-icon mr-5" />-->
<DingdingOutlined @click="oauthLogin('dingtalk')" class="methods-icon" /> <!-- <DingdingOutlined @click="oauthLogin('dingtalk')" class="methods-icon" />-->
</div> <!-- </div>-->
</Form> </Form>
<Modal <Modal
......
...@@ -287,6 +287,18 @@ export const columns: BasicColumn[] = [ ...@@ -287,6 +287,18 @@ export const columns: BasicColumn[] = [
styleConfig: undefined, styleConfig: undefined,
listStyle: undefined, listStyle: undefined,
}, },
{
resizable: true,
dataIndex: 'createDate',
title: '创建时间',
componentType: 'date',
fixed: false,
sorter: true,
styleConfig: undefined,
listStyle: undefined,
},
{ {
resizable: true, resizable: true,
...@@ -303,6 +315,19 @@ export const columns: BasicColumn[] = [ ...@@ -303,6 +315,19 @@ export const columns: BasicColumn[] = [
{ {
resizable: true, resizable: true,
dataIndex: 'lydh',
title: '来源单号',
componentType: 'select',
fixed: false,
sorter: true,
styleConfig: undefined,
listStyle: undefined,
},
{
resizable: true,
dataIndex: 'zt', dataIndex: 'zt',
title: '质检状态', title: '质检状态',
componentType: 'select', componentType: 'select',
......
...@@ -75,7 +75,18 @@ export const columns: BasicColumn[] = [ ...@@ -75,7 +75,18 @@ export const columns: BasicColumn[] = [
styleConfig: undefined, styleConfig: undefined,
listStyle: '', listStyle: '',
}, },
{
resizable: true,
dataIndex: 'createDate',
title: '创建时间',
componentType: 'input',
fixed: false,
sorter: true,
styleConfig: undefined,
listStyle: '',
},
{ {
resizable: true, resizable: true,
dataIndex: 'cp', dataIndex: 'cp',
......
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