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;
} }
/** /**
......
...@@ -66,7 +66,7 @@ export async function updateRokeDepartment(rokeDepartment: Recordable, mode: Err ...@@ -66,7 +66,7 @@ export async function updateRokeDepartment(rokeDepartment: Recordable, mode: Err
{ {
url: Api.RokeDepartment, url: Api.RokeDepartment,
params: rokeDepartment, params: rokeDepartment,
}, },
{ {
errorMessageMode: mode, errorMessageMode: mode,
}, },
......
...@@ -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
:height="500"
<BasicModal v-bind="$attrs"
:height="500" @register="registerModal"
v-bind="$attrs" @register="registerModal" :title="getTitle" :title="getTitle"
@ok="handleSubmit" @cancel="handleClose" > @ok="handleSubmit"
<ModalForm ref="formRef" v-model:value="state.formModel" :fromPage="FromPageType.MENU" /> @cancel="handleClose"
<template #footer v-if=" !state.isView"> >
<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-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" />
<a-button <a-button
:type="item.style" :type="item.style"
...@@ -22,29 +23,28 @@ ...@@ -22,29 +23,28 @@
</template> </template>
</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';
import { BasicModal, useModalInner } from '/@/components/Modal'; import { BasicModal, useModalInner } from '/@/components/Modal';
import { CustomButtonModalType } from '/@/enums/userEnum'; import { CustomButtonModalType } from '/@/enums/userEnum';
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';
import { sortBy } from 'lodash-es'; import { sortBy } from 'lodash-es';
import { executeCurFormEvent } from '/@/utils/event/data'; import { executeCurFormEvent } from '/@/utils/event/data';
const emit = defineEmits(['success', 'register']); const emit = defineEmits(['success', 'register']);
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,
...@@ -55,40 +55,41 @@ ...@@ -55,40 +55,41 @@
const { t } = useI18n(); const { t } = useI18n();
const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => { const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
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;
setModalProps({ setModalProps({
destroyOnClose: true, destroyOnClose: true,
maskClosable: false, maskClosable: false,
showCancelBtn: false, showCancelBtn: false,
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) {
state.rowId = data.id; state.rowId = data.id;
if (state.isView) { if (state.isView) {
await formRef.value.setDisabledForm(); await formRef.value.setDisabledForm();
} }
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 {
...@@ -117,9 +118,9 @@ ...@@ -117,9 +118,9 @@
async function handleSubmit() { async function handleSubmit() {
try { try {
const saveSuccess = await saveModal(); const saveSuccess = await saveModal();
setModalProps({ confirmLoading: true }); setModalProps({ confirmLoading: true });
if (saveSuccess) { if (saveSuccess) {
if (!state.isUpdate || isCopy.value) { if (!state.isUpdate || isCopy.value) {
//false 新增 //false 新增
...@@ -133,34 +134,31 @@ ...@@ -133,34 +134,31 @@
description: t('修改成功!'), description: t('修改成功!'),
}); //提示消息 }); //提示消息
} }
closeModal(); closeModal();
formRef.value.resetFields(); formRef.value.resetFields();
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') {
formRef.value.resetFields(); formRef.value.resetFields();
} else { } else {
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
...@@ -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' },
], ],
}, },
......
...@@ -2,12 +2,12 @@ ...@@ -2,12 +2,12 @@
<template> <template>
<BasicModal <BasicModal
:height="1080" :height="1080"
v-bind="$attrs" @register="registerModal" :title="getTitle" v-bind="$attrs" @register="registerModal" :title="getTitle"
@ok="handleSubmit" @cancel="handleClose" > @ok="handleSubmit" @cancel="handleClose" >
<ModalForm ref="formRef" v-model:value="state.formModel" :fromPage="FromPageType.MENU" /> <ModalForm ref="formRef" v-model:value="state.formModel" :fromPage="FromPageType.MENU" />
</BasicModal> </BasicModal>
</template> </template>
...@@ -135,4 +135,3 @@ ...@@ -135,4 +135,3 @@
</script> </script>
\ No newline at end of file
...@@ -10,10 +10,10 @@ ...@@ -10,10 +10,10 @@
</template> </template>
<template #resizeRight> <template #resizeRight>
<BasicTable @register="registerTable" isMenuTable ref="tableRef" <BasicTable @register="registerTable" isMenuTable ref="tableRef"
> >
<template #toolbar> <template #toolbar>
<template v-for="button in tableButtonConfig" :key="button.code"> <template v-for="button in tableButtonConfig" :key="button.code">
<a-button v-if="button.isDefault" type="primary" @click="buttonClick(button.code)"> <a-button v-if="button.isDefault" type="primary" @click="buttonClick(button.code)">
...@@ -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 }">
...@@ -36,25 +36,25 @@ ...@@ -36,25 +36,25 @@
:disabled="true" :disabled="true"
/> />
</template> </template>
<template v-if="column.dataIndex === 'action'"> <template v-if="column.dataIndex === 'action'">
<TableAction <TableAction
:actions="getLessActions(record)" :actions="getLessActions(record)"
:dropDownActions="getMoreActions(record)" :dropDownActions="getMoreActions(record)"
/> />
</template> </template>
<template v-else-if="column.dataIndex && column?.listStyle"> <template v-else-if="column.dataIndex && column?.listStyle">
<span :style="executeListStyle(getValue(record, column, 'style'), column?.listStyle)">{{ <span :style="executeListStyle(getValue(record, column, 'style'), column?.listStyle)">{{
getValue(record, column, 'value') getValue(record, column, 'value')
}}</span> }}</span>
</template> </template>
</template> </template>
</BasicTable> </BasicTable>
</template> </template>
...@@ -82,7 +82,7 @@ ...@@ -82,7 +82,7 @@
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 { 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 { executeListStyle, getValue } from '/@/hooks/web/useListStyle';//列表样式配置 import { executeListStyle, getValue } from '/@/hooks/web/useListStyle';//列表样式配置
import { useRouter } from 'vue-router'; import { useRouter } from 'vue-router';
...@@ -104,7 +104,7 @@ ...@@ -104,7 +104,7 @@
import { searchFormSchema, columns } from './components/config'; import { searchFormSchema, columns } from './components/config';
import { treeConfig } from './components/config'; import { treeConfig } from './components/config';
import {TreeStructure} from '/@/components/TreeStructure'; import {TreeStructure} from '/@/components/TreeStructure';
import Icon from '/@/components/Icon/index'; import Icon from '/@/components/Icon/index';
import { BasicTree, TreeItem } from '/@/components/Tree'; import { BasicTree, TreeItem } from '/@/components/Tree';
...@@ -136,12 +136,7 @@ ...@@ -136,12 +136,7 @@
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(()=>{
...@@ -197,17 +192,17 @@ ...@@ -197,17 +192,17 @@
return pageParamsInfo.value; return pageParamsInfo.value;
}, },
afterFetch: (res) => { afterFetch: (res) => {
}, },
useSearchForm: true, useSearchForm: true,
showTableSetting: true, showTableSetting: true,
striped: false, striped: false,
actionColumn: { actionColumn: {
width: 195, width: 195,
...@@ -428,4 +423,4 @@ ...@@ -428,4 +423,4 @@
</style> </style>
\ No newline at end of file
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
<template> <template>
<BasicModal <BasicModal
:height="1080" :height="1080"
v-bind="$attrs" @register="registerModal" :title="getTitle" v-bind="$attrs" @register="registerModal" :title="getTitle"
@ok="handleSubmit" @cancel="handleClose" > @ok="handleSubmit" @cancel="handleClose" >
<ModalForm ref="formRef" v-model:value="state.formModel" :fromPage="FromPageType.MENU" /> <ModalForm ref="formRef" v-model:value="state.formModel" :fromPage="FromPageType.MENU" />
......
...@@ -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