Commit 0cc7187d by 金民

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

parents 592f830c 4c5dc717
...@@ -7,8 +7,6 @@ export interface MesBaseBomPageParams extends BasicPageParams { ...@@ -7,8 +7,6 @@ export interface MesBaseBomPageParams extends BasicPageParams {
bommc: string; bommc: string;
cpid: string; cpid: string;
sfyy: string;
} }
/** /**
...@@ -19,15 +17,17 @@ export interface MesBaseBomPageModel { ...@@ -19,15 +17,17 @@ export interface MesBaseBomPageModel {
bommc: string; bommc: string;
bomsl: string;
bombb: string;
cpmc: string; cpmc: string;
cpbh: string;
cpgg: string; cpgg: string;
cpxh: string; cpxh: string;
bomsl: string;
bombb: string;
} }
/** /**
...@@ -86,6 +86,8 @@ export interface MesBaseBomModel { ...@@ -86,6 +86,8 @@ export interface MesBaseBomModel {
modifyUserId: string; modifyUserId: string;
sjbom: string;
mesBaseBomItemList?: MesBaseBomItemModel; mesBaseBomItemList?: MesBaseBomItemModel;
} }
...@@ -99,6 +101,8 @@ export interface MesBaseBomItemModel { ...@@ -99,6 +101,8 @@ export interface MesBaseBomItemModel {
bomid: string; bomid: string;
wlid: string;
wlbh: string; wlbh: string;
wlmc: string; wlmc: string;
......
...@@ -6,9 +6,9 @@ import { BasicPageParams, BasicFetchResult } from '/@/api/model/baseModel'; ...@@ -6,9 +6,9 @@ import { BasicPageParams, BasicFetchResult } from '/@/api/model/baseModel';
export interface MesProductionPlanPageParams extends BasicPageParams { export interface MesProductionPlanPageParams extends BasicPageParams {
jhbh: string; jhbh: string;
ddbh: string; kh: string;
ssgs: string; ywzz: string;
zt: string; zt: string;
} }
...@@ -19,13 +19,15 @@ export interface MesProductionPlanPageParams extends BasicPageParams { ...@@ -19,13 +19,15 @@ export interface MesProductionPlanPageParams extends BasicPageParams {
export interface MesProductionPlanPageModel { export interface MesProductionPlanPageModel {
id: string; id: string;
ddbh: string;
jhbh: string; jhbh: string;
ddbh: string;
kh: string; kh: string;
ssgs: string; jhjhrq: string;
ywzz: string;
zt: string; zt: string;
} }
...@@ -107,6 +109,8 @@ export interface MesProductionPlanProductModel { ...@@ -107,6 +109,8 @@ export interface MesProductionPlanProductModel {
cpbh: string; cpbh: string;
cpmc: string;
nbdm: string; nbdm: string;
hjzt: string; hjzt: string;
......
...@@ -595,7 +595,7 @@ export const formProps: FormProps = { ...@@ -595,7 +595,7 @@ export const formProps: FormProps = {
{ name: 'category_id', tableTitle: '工序类别' }, { name: 'category_id', tableTitle: '工序类别' },
{ name: 'id', tableTitle: 'ID' }, { name: 'id', tableTitle: 'ID' },
{ tableTitle: '采集方案ID', name: 'collection_scheme_id' }, { tableTitle: '采集方案ID', name: 'collection_scheme_id' },
{ name: 'rated_working_hours', tableTitle: '额工时定' }, { name: 'rated_working_hours', tableTitle: '额定工时' },
], ],
}, },
itemId: '', itemId: '',
......
...@@ -57,7 +57,7 @@ export const permissionList = [ ...@@ -57,7 +57,7 @@ export const permissionList = [
disabled: false, disabled: false,
isSaveTable: false, isSaveTable: false,
tableName: '', tableName: '',
fieldName: '选择产品', fieldName: '产品',
fieldId: 'cpid', fieldId: 'cpid',
isSubTable: false, isSubTable: false,
showChildren: true, showChildren: true,
...@@ -176,7 +176,7 @@ export const permissionList = [ ...@@ -176,7 +176,7 @@ export const permissionList = [
isSubTable: true, isSubTable: true,
showChildren: false, showChildren: false,
tableName: 'mesBaseBomItemList', tableName: 'mesBaseBomItemList',
fieldName: '物料项', fieldName: '',
fieldId: 'mesBaseBomItemList', fieldId: 'mesBaseBomItemList',
type: 'form', type: 'form',
key: 'c87fc2d18e24429a819521f35f19137b', key: 'c87fc2d18e24429a819521f35f19137b',
...@@ -190,21 +190,6 @@ export const permissionList = [ ...@@ -190,21 +190,6 @@ export const permissionList = [
isSaveTable: false, isSaveTable: false,
showChildren: false, showChildren: false,
tableName: 'mesBaseBomItemList', tableName: 'mesBaseBomItemList',
fieldName: '选择物料',
fieldId: 'wlmc',
type: 'MultiplePopup',
key: '709b38c05d11468db0db4e6e9168e4f9',
children: [],
},
{
required: true,
view: true,
edit: true,
disabled: false,
isSubTable: false,
isSaveTable: false,
showChildren: false,
tableName: 'mesBaseBomItemList',
fieldName: '物料编号', fieldName: '物料编号',
fieldId: 'wlbh', fieldId: 'wlbh',
type: 'Input', type: 'Input',
...@@ -221,7 +206,7 @@ export const permissionList = [ ...@@ -221,7 +206,7 @@ export const permissionList = [
showChildren: false, showChildren: false,
tableName: 'mesBaseBomItemList', tableName: 'mesBaseBomItemList',
fieldName: '物料名称', fieldName: '物料名称',
fieldId: 'wuLiaoMingChen9398', fieldId: 'wlmc',
type: 'Input', type: 'Input',
key: '112f6292bd884006ad872f06aeef4e6f', key: '112f6292bd884006ad872f06aeef4e6f',
children: [], children: [],
...@@ -316,6 +301,21 @@ export const permissionList = [ ...@@ -316,6 +301,21 @@ export const permissionList = [
key: '9230b500d1024028af68ed4ac49bdbd3', key: '9230b500d1024028af68ed4ac49bdbd3',
children: [], children: [],
}, },
{
required: true,
view: true,
edit: true,
disabled: false,
isSubTable: false,
isSaveTable: false,
showChildren: false,
tableName: 'mesBaseBomItemList',
fieldName: '物料ID',
fieldId: 'wlid',
type: 'Input',
key: '998cedda278d4544ab851536bae4aacc',
children: [],
},
], ],
}, },
]; ];
...@@ -222,3 +222,4 @@ ...@@ -222,3 +222,4 @@
}); });
</script> </script>
\ No newline at end of file
...@@ -33,7 +33,7 @@ export const permissionList = [ ...@@ -33,7 +33,7 @@ export const permissionList = [
defaultValue: '', defaultValue: '',
}, },
{ {
required: true, required: false,
view: true, view: true,
edit: true, edit: true,
disabled: false, disabled: false,
...@@ -169,7 +169,7 @@ export const permissionList = [ ...@@ -169,7 +169,7 @@ export const permissionList = [
isSaveTable: false, isSaveTable: false,
showChildren: false, showChildren: false,
tableName: 'mesProductionPlanProductList', tableName: 'mesProductionPlanProductList',
fieldName: '物料编号', fieldName: '编号',
fieldId: 'cpbh', fieldId: 'cpbh',
type: 'Input', type: 'Input',
key: 'cd0038f42bc64c189b3821f0e2061321', key: 'cd0038f42bc64c189b3821f0e2061321',
...@@ -184,6 +184,21 @@ export const permissionList = [ ...@@ -184,6 +184,21 @@ export const permissionList = [
isSaveTable: false, isSaveTable: false,
showChildren: false, showChildren: false,
tableName: 'mesProductionPlanProductList', tableName: 'mesProductionPlanProductList',
fieldName: '名称',
fieldId: 'cpmc',
type: 'Input',
key: 'c8f88cafd17f4655bfbe4643ffe58c9c',
children: [],
},
{
required: true,
view: true,
edit: true,
disabled: false,
isSubTable: false,
isSaveTable: false,
showChildren: false,
tableName: 'mesProductionPlanProductList',
fieldName: '内部代码', fieldName: '内部代码',
fieldId: 'nbdm', fieldId: 'nbdm',
type: 'Input', type: 'Input',
......
<template> <template>
<ResizePageWrapper :hasLeft="false"> <ResizePageWrapper :hasLeft="false">
<template #resizeRight> <template #resizeRight>
...@@ -26,7 +27,11 @@ ...@@ -26,7 +27,11 @@
</template> </template>
</template> </template>
<template #bodyCell="{ column, record }"> <template #bodyCell="{ column, record }">
<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)"
...@@ -39,14 +44,27 @@ ...@@ -39,14 +44,27 @@
}}</span> }}</span>
</template> </template>
</template> </template>
</BasicTable> </BasicTable>
</template> </template>
<ScjhModal @register="registerModal" @success="handleFormSuccess" @cancel="handleFormCancel" />
</ResizePageWrapper>
<ScjhModal @register="registerModal" @success="handleFormSuccess" @cancel="handleFormCancel"/>
</ResizePageWrapper>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { ref, computed, provide, Ref, createVNode } from 'vue'; import { ref, computed,provide,Ref, createVNode,
} from 'vue';
import { Modal } from 'ant-design-vue'; import { Modal } from 'ant-design-vue';
import { ExclamationCircleOutlined } from '@ant-design/icons-vue'; import { ExclamationCircleOutlined } from '@ant-design/icons-vue';
...@@ -61,19 +79,45 @@ ...@@ -61,19 +79,45 @@
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';
import { useModal } from '/@/components/Modal'; import { useModal } from '/@/components/Modal';
import ScjhModal from './components/ScjhModal.vue'; import ScjhModal from './components/ScjhModal.vue';
import { searchFormSchema, columns } from './components/config'; import { searchFormSchema, columns } from './components/config';
import Icon from '/@/components/Icon/index'; import Icon from '/@/components/Icon/index';
const listSpliceNum = ref(3); //操作列最先展示几个 const listSpliceNum = ref(3); //操作列最先展示几个
import { useConcurrentLock } from '/@/hooks/web/useConcurrentLock'; import { useConcurrentLock } from '/@/hooks/web/useConcurrentLock';
const pageParamsInfo = ref<any>({}); const pageParamsInfo = ref<any>({});
...@@ -92,6 +136,11 @@ ...@@ -92,6 +136,11 @@
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(() => {
...@@ -162,12 +211,18 @@ ...@@ -162,12 +211,18 @@
const { currentRoute } = useRouter(); const { currentRoute } = useRouter();
const formIdComputedRef = computed(() => currentRoute.value.meta.formId as string); const formIdComputedRef = computed(() => currentRoute.value.meta.formId as string);
provide<Ref<string>>('currentFormId', formIdComputedRef); provide<Ref<string>>('currentFormId', formIdComputedRef);
const selectedKeys = ref<string[]>([]); const selectedKeys = ref<string[]>([]);
const selectedRowsData = ref<any[]>([]); const selectedRowsData = ref<any[]>([]);
const [registerModal, { openModal }] = useModal(); const [registerModal, { openModal }] = useModal();
const [registerTable, { reload }] = useTable({ const [registerTable, { reload }] = useTable({
...@@ -184,18 +239,25 @@ ...@@ -184,18 +239,25 @@
fieldMapToTime: [], fieldMapToTime: [],
showResetButton: false, showResetButton: false,
}, },
bordered: false, bordered:false,
beforeFetch: (params) => { beforeFetch: (params) => {
pageParamsInfo.value = { ...params, FormId: formIdComputedRef.value, PK: 'id' }; pageParamsInfo.value = {...params, FormId: formIdComputedRef.value,PK: 'id' }
return pageParamsInfo.value; return pageParamsInfo.value;
}, },
afterFetch: (res) => { afterFetch: (res) => {
selectedKeys.value = []; selectedKeys.value = [];
selectedRowsData.value = []; selectedRowsData.value = [];
}, },
useSearchForm: true, useSearchForm: true,
showTableSetting: true, showTableSetting: true,
striped: false, striped: false,
actionColumn: { actionColumn: {
width: 195, width: 195,
...@@ -212,10 +274,15 @@ ...@@ -212,10 +274,15 @@
objectId: formIdComputedRef.value, ////系统表单formId,自定义表单releaseId的id值 objectId: formIdComputedRef.value, ////系统表单formId,自定义表单releaseId的id值
}); });
function buttonClick(code) { function buttonClick(code) {
btnEvent[code](); btnEvent[code]();
} }
function handleAdd() { function handleAdd() {
openModal(true, { isUpdate: false }); openModal(true, { isUpdate: false });
} }
...@@ -235,12 +302,16 @@ ...@@ -235,12 +302,16 @@
id: record[field], id: record[field],
isUpdate: true, isUpdate: true,
}; };
openModal(true, info); openModal(true, info);
} catch (error) {} } catch (error) {}
} }
function handleDelete(record: Recordable) { function handleDelete(record: Recordable) {
deleteList([record.id]); deleteList([record.id]);
} }
...@@ -265,6 +336,10 @@ ...@@ -265,6 +336,10 @@
}); });
} }
function onSelectChange(selectedRowKeys: [], selectedRows) { function onSelectChange(selectedRowKeys: [], selectedRows) {
selectedKeys.value = selectedRowKeys; selectedKeys.value = selectedRowKeys;
selectedRowsData.value = selectedRows; selectedRowsData.value = selectedRows;
...@@ -272,6 +347,7 @@ ...@@ -272,6 +347,7 @@
function customRow(record: Recordable) { function customRow(record: Recordable) {
return { return {
onClick: () => { onClick: () => {
let selectedRowKeys = [...selectedKeys.value]; let selectedRowKeys = [...selectedKeys.value];
if (selectedRowKeys.indexOf(record.id) >= 0) { if (selectedRowKeys.indexOf(record.id) >= 0) {
...@@ -291,11 +367,15 @@ ...@@ -291,11 +367,15 @@
} }
function handleSuccess() { function handleSuccess() {
selectedKeys.value = []; selectedKeys.value = [];
selectedRowsData.value = []; selectedRowsData.value = [];
reload(); reload();
} }
function handleFormSuccess() { function handleFormSuccess() {
handleSuccess(); handleSuccess();
handleCloseFormEnableLocke(buttonConfigs.value, 'edit'); handleCloseFormEnableLocke(buttonConfigs.value, 'edit');
...@@ -304,8 +384,9 @@ ...@@ -304,8 +384,9 @@
handleCloseFormEnableLocke(buttonConfigs.value, 'edit'); handleCloseFormEnableLocke(buttonConfigs.value, 'edit');
} }
function handleView(record: Recordable) { function handleView(record: Recordable) {
let info = { let info={
isView: true, isView: true,
id: record.id, id: record.id,
}; };
...@@ -348,7 +429,7 @@ ...@@ -348,7 +429,7 @@
let list = getActions(record); let list = getActions(record);
return list.slice(listSpliceNum.value); return list.slice(listSpliceNum.value);
} }
function getActions(record: Recordable): ActionItem[] { function getActions(record: Recordable):ActionItem[] {
record.isCanEdit = false; record.isCanEdit = false;
let actionsList: ActionItem[] = []; let actionsList: ActionItem[] = [];
...@@ -375,17 +456,24 @@ ...@@ -375,17 +456,24 @@
}); });
return actionsList; return actionsList;
} }
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
:deep(.ant-table-selection-col) { :deep(.ant-table-selection-col) {
width: 50px; width: 50px;
} }
.show { .show{
display: flex; display: flex;
} }
.hide { .hide{
display: none !important; display: none !important;
} }
</style> </style>
...@@ -854,7 +854,7 @@ export const formProps: FormProps = { ...@@ -854,7 +854,7 @@ export const formProps: FormProps = {
disabled: false, disabled: false,
showLabel: true, showLabel: true,
controls: true, controls: true,
required: false, required: true,
subTotal: false, subTotal: false,
isShow: true, isShow: true,
rules: [], rules: [],
......
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