Commit 64b77a7b by 张恒

feat(scjh): 更新生产计划模块的搜索表单和表格配置

- 添加计划编号搜索字段并启用客户选择功能
- 集成客户API数据源支持多选和搜索功能
- 调整表格列配置显示计划编号、客户和交付日期
- 修正占位符文本错误并调整字段必填验证规则
- 将子表单重构为标签页结构提升用户体验
- 优化产品列表组件的编辑和删除功能
- 更新工作流权限配置以匹配新的字段结构
parent a4d70719
......@@ -6,9 +6,9 @@ import { BasicPageParams, BasicFetchResult } from '/@/api/model/baseModel';
export interface MesProductionPlanPageParams extends BasicPageParams {
jhbh: string;
ddbh: string;
kh: string;
ssgs: string;
ywzz: string;
zt: string;
}
......@@ -19,13 +19,15 @@ export interface MesProductionPlanPageParams extends BasicPageParams {
export interface MesProductionPlanPageModel {
id: string;
ddbh: string;
jhbh: string;
ddbh: string;
kh: string;
ssgs: string;
jhjhrq: string;
ywzz: string;
zt: string;
}
......@@ -107,6 +109,8 @@ export interface MesProductionPlanProductModel {
cpbh: string;
cpmc: string;
nbdm: string;
hjzt: string;
......
......@@ -222,3 +222,4 @@
});
</script>
\ No newline at end of file
......@@ -33,7 +33,7 @@ export const permissionList = [
defaultValue: '',
},
{
required: true,
required: false,
view: true,
edit: true,
disabled: false,
......@@ -169,7 +169,7 @@ export const permissionList = [
isSaveTable: false,
showChildren: false,
tableName: 'mesProductionPlanProductList',
fieldName: '物料编号',
fieldName: '编号',
fieldId: 'cpbh',
type: 'Input',
key: 'cd0038f42bc64c189b3821f0e2061321',
......@@ -184,6 +184,21 @@ export const permissionList = [
isSaveTable: false,
showChildren: false,
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: '内部代码',
fieldId: 'nbdm',
type: 'Input',
......
<template>
<ResizePageWrapper :hasLeft="false">
<template #resizeRight>
......@@ -26,7 +27,11 @@
</template>
</template>
<template #bodyCell="{ column, record }">
<template v-if="column.dataIndex === 'action'">
<TableAction
:actions="getLessActions(record)"
:dropDownActions="getMoreActions(record)"
......@@ -39,14 +44,27 @@
}}</span>
</template>
</template>
</BasicTable>
</template>
<ScjhModal @register="registerModal" @success="handleFormSuccess" @cancel="handleFormCancel" />
</ResizePageWrapper>
<ScjhModal @register="registerModal" @success="handleFormSuccess" @cancel="handleFormCancel"/>
</ResizePageWrapper>
</template>
<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 { ExclamationCircleOutlined } from '@ant-design/icons-vue';
......@@ -61,19 +79,45 @@
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 { executeListStyle, getValue } from '/@/hooks/web/useListStyle';//列表样式配置
import { useRouter } from 'vue-router';
import { useModal } from '/@/components/Modal';
import ScjhModal from './components/ScjhModal.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>({});
......@@ -92,6 +136,11 @@
const filterColumns = filterColumnAuth(columns);
const tableRef = ref();
//展示在列表内的按钮
const actionButtons = ref<string[]>(['view', 'edit', 'delete']);
const buttonConfigs = computed(() => {
......@@ -162,12 +211,18 @@
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({
......@@ -184,18 +239,25 @@
fieldMapToTime: [],
showResetButton: false,
},
bordered: false,
bordered:false,
beforeFetch: (params) => {
pageParamsInfo.value = { ...params, FormId: formIdComputedRef.value, PK: 'id' };
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: 195,
......@@ -212,10 +274,15 @@
objectId: formIdComputedRef.value, ////系统表单formId,自定义表单releaseId的id值
});
function buttonClick(code) {
btnEvent[code]();
}
function handleAdd() {
openModal(true, { isUpdate: false });
}
......@@ -235,12 +302,16 @@
id: record[field],
isUpdate: true,
};
openModal(true, info);
} catch (error) {}
}
function handleDelete(record: Recordable) {
deleteList([record.id]);
}
......@@ -265,6 +336,10 @@
});
}
function onSelectChange(selectedRowKeys: [], selectedRows) {
selectedKeys.value = selectedRowKeys;
selectedRowsData.value = selectedRows;
......@@ -272,6 +347,7 @@
function customRow(record: Recordable) {
return {
onClick: () => {
let selectedRowKeys = [...selectedKeys.value];
if (selectedRowKeys.indexOf(record.id) >= 0) {
......@@ -291,11 +367,15 @@
}
function handleSuccess() {
selectedKeys.value = [];
selectedRowsData.value = [];
reload();
}
function handleFormSuccess() {
handleSuccess();
handleCloseFormEnableLocke(buttonConfigs.value, 'edit');
......@@ -304,8 +384,9 @@
handleCloseFormEnableLocke(buttonConfigs.value, 'edit');
}
function handleView(record: Recordable) {
let info = {
let info={
isView: true,
id: record.id,
};
......@@ -348,7 +429,7 @@
let list = getActions(record);
return list.slice(listSpliceNum.value);
}
function getActions(record: Recordable): ActionItem[] {
function getActions(record: Recordable):ActionItem[] {
record.isCanEdit = false;
let actionsList: ActionItem[] = [];
......@@ -375,17 +456,24 @@
});
return actionsList;
}
</script>
<style lang="less" scoped>
:deep(.ant-table-selection-col) {
width: 50px;
}
.show {
.show{
display: flex;
}
.hide {
.hide{
display: none !important;
}
</style>
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