Commit b5cc888c by 宋春膨

refactor(zlgl/llzjd): 重构质量检验单据模块的数据模型和表单配置

- 将 MesDeQualityInspectionPageParams 接口字段 bh、wcsj、cp 替换为 djlx、zjfa、zjgj
- 在 LlzjdModel.ts 中添加 createDate 和 bjsl 字段并调整 zjfa 字段位置
- 更新 searchFormSchema 配置将编号字段改为单据类型选择器并配置字典数据源
- 修改质检方案字段的数据源路径和 SQL 查询逻辑
- 添加质检结果筛选字段并配置相应的字典数据源
- 调整表格列配置将完成时间替换为质检状态和创建时间
- 新增报检数量和质检方案表格列并配置排序功能
- 更新表单组件的 API 数据源配置和字典选项设置
- 修改质检状态字段的默认值设置和数据源类型配置
- 清理表单时间范围映射配置并优化工作流程相关代码结构
parent 684dd5c3
...@@ -4,11 +4,11 @@ import { BasicPageParams, BasicFetchResult } from '/@/api/model/baseModel'; ...@@ -4,11 +4,11 @@ import { BasicPageParams, BasicFetchResult } from '/@/api/model/baseModel';
* @description: MesDeQualityInspection分页参数 模型 * @description: MesDeQualityInspection分页参数 模型
*/ */
export interface MesDeQualityInspectionPageParams extends BasicPageParams { export interface MesDeQualityInspectionPageParams extends BasicPageParams {
bh: string; djlx: string;
wcsj: string; zjfa: string;
cp: string; zjgj: string;
} }
/** /**
...@@ -25,9 +25,13 @@ export interface MesDeQualityInspectionPageModel { ...@@ -25,9 +25,13 @@ export interface MesDeQualityInspectionPageModel {
zjbmmc: string; zjbmmc: string;
wcsj: string;
zt: string; zt: string;
createDate: string;
bjsl: string;
zjfa: string;
} }
/** /**
......
...@@ -3,41 +3,38 @@ import { BasicColumn } from '/@/components/Table'; ...@@ -3,41 +3,38 @@ import { BasicColumn } from '/@/components/Table';
export const searchFormSchema: FormSchema[] = [ export const searchFormSchema: FormSchema[] = [
{ {
field: 'bh', field: 'djlx',
label: '编号', label: '单据类型',
defaultValue: undefined, defaultValue: undefined,
component: 'Input', component: 'XjrSelect',
},
{
field: 'wcsj',
label: '完成时间',
defaultValue: undefined,
component: 'RangePicker',
componentProps: { componentProps: {
format: 'YYYY-MM-DD HH:mm:ss', datasourceType: 'dic',
style: { width: '100%' }, params: { itemId: '2010912995692544001' },
labelField: 'name',
valueField: 'value',
mode: 'multiple',
showSearch: true,
getPopupContainer: () => document.body, getPopupContainer: () => document.body,
}, },
}, },
{ {
field: 'cp', field: 'zjfa',
label: '产品名称', label: '质检方案',
defaultValue: undefined, defaultValue: undefined,
component: 'XjrSelect', component: 'XjrSelect',
componentProps: { componentProps: {
datasourceType: 'api', datasourceType: 'api',
apiConfig: { apiConfig: {
path: '/scgl/scjh/getAllProduct', path: '/zlgl//zjjcsj/getZjfa',
method: 'GET', method: 'GET',
apiId: 'f4fbb57f2f18425e97918a031c8aa7d8', apiId: 'ae3834298bc54c2fb66e9e9af18765e7',
apiParams: [ apiParams: [
{ key: '1', title: 'Query Params', tableInfo: [] }, { key: '1', title: 'Query Params', tableInfo: [] },
{ key: '2', title: 'Header', tableInfo: [] }, { key: '2', title: 'Header', tableInfo: [] },
{ key: '3', title: 'Body' }, { key: '3', title: 'Body' },
], ],
script: script:
"var sql = 'select *,id as value,cpmc as label from mes_base_product_info where delete_mark=0';\r\nreturn db.select(sql)", "var sql = 'select *,id as value,mc as label from mes_quality_inspection_plan where delete_mark=0';\r\nreturn db.select(sql)",
}, },
labelField: 'label', labelField: 'label',
valueField: 'value', valueField: 'value',
...@@ -46,6 +43,21 @@ export const searchFormSchema: FormSchema[] = [ ...@@ -46,6 +43,21 @@ export const searchFormSchema: FormSchema[] = [
getPopupContainer: () => document.body, getPopupContainer: () => document.body,
}, },
}, },
{
field: 'zjgj',
label: '质检结果',
defaultValue: undefined,
component: 'XjrSelect',
componentProps: {
datasourceType: 'dic',
params: { itemId: '2012036275783090178' },
labelField: 'name',
valueField: 'value',
mode: 'multiple',
showSearch: true,
getPopupContainer: () => document.body,
},
},
]; ];
export const columns: BasicColumn[] = [ export const columns: BasicColumn[] = [
...@@ -103,8 +115,21 @@ export const columns: BasicColumn[] = [ ...@@ -103,8 +115,21 @@ export const columns: BasicColumn[] = [
{ {
resizable: true, resizable: true,
dataIndex: 'wcsj', dataIndex: 'zt',
title: '完成时间', title: '质检状态',
componentType: 'select',
fixed: false,
sorter: true,
styleConfig: undefined,
listStyle: undefined,
},
{
resizable: true,
dataIndex: 'createDate',
title: '创建时间',
componentType: 'date', componentType: 'date',
fixed: false, fixed: false,
...@@ -116,18 +141,22 @@ export const columns: BasicColumn[] = [ ...@@ -116,18 +141,22 @@ export const columns: BasicColumn[] = [
{ {
resizable: true, resizable: true,
dataIndex: 'zt', dataIndex: 'bjsl',
title: '质检状态', title: '报检数量',
componentType: 'select', componentType: 'number',
customRender: ({ record }) => { fixed: false,
const staticOptions = [ sorter: true,
{ key: 1, label: '完成', value: '完成' },
{ key: 2, label: '进行中', value: '进行中' },
];
return staticOptions.filter((x) => x.value == record.zt)[0]?.label; styleConfig: undefined,
}, listStyle: undefined,
},
{
resizable: true,
dataIndex: 'zjfa',
title: '质检方案',
componentType: 'select',
fixed: false, fixed: false,
sorter: true, sorter: true,
...@@ -442,14 +471,21 @@ export const formProps: FormProps = { ...@@ -442,14 +471,21 @@ export const formProps: FormProps = {
clearable: false, clearable: false,
disabled: false, disabled: false,
staticOptions: [{ key: 1, label: '方案1', value: '方案1' }], staticOptions: [{ key: 1, label: '方案1', value: '方案1' }],
defaultSelect: '', defaultSelect: null,
datasourceType: 'staticData', datasourceType: 'api',
labelField: 'label', labelField: 'label',
valueField: 'value', valueField: 'value',
apiConfig: { apiConfig: {
path: 'CodeGeneration/selection', path: '/zlgl//zjjcsj/getZjfa',
method: 'GET', method: 'GET',
apiId: '93d735dcb7364a0f8102188ec4d77ac7', apiId: 'ae3834298bc54c2fb66e9e9af18765e6',
apiParams: [
{ key: '1', title: 'Query Params', tableInfo: [] },
{ key: '2', title: 'Header', tableInfo: [] },
{ key: '3', title: 'Body' },
],
script:
"var sql = 'select *,id as value,mc as label from mes_quality_inspection_plan where delete_mark=0';\r\nreturn db.select(sql)",
}, },
dicOptions: [], dicOptions: [],
required: false, required: false,
...@@ -457,6 +493,7 @@ export const formProps: FormProps = { ...@@ -457,6 +493,7 @@ export const formProps: FormProps = {
events: {}, events: {},
isShow: true, isShow: true,
tooltipConfig: { visible: false, title: '提示文本' }, tooltipConfig: { visible: false, title: '提示文本' },
params: null,
style: { width: '100%' }, style: { width: '100%' },
}, },
}, },
...@@ -477,9 +514,9 @@ export const formProps: FormProps = { ...@@ -477,9 +514,9 @@ export const formProps: FormProps = {
clearable: false, clearable: false,
disabled: false, disabled: false,
staticOptions: [{ key: 1, label: '成功', value: '成功' }], staticOptions: [{ key: 1, label: '成功', value: '成功' }],
defaultSelect: '', defaultSelect: null,
datasourceType: 'staticData', datasourceType: 'dic',
labelField: 'label', labelField: 'name',
valueField: 'value', valueField: 'value',
apiConfig: { apiConfig: {
path: 'CodeGeneration/selection', path: 'CodeGeneration/selection',
...@@ -492,6 +529,8 @@ export const formProps: FormProps = { ...@@ -492,6 +529,8 @@ export const formProps: FormProps = {
events: {}, events: {},
isShow: true, isShow: true,
tooltipConfig: { visible: false, title: '提示文本' }, tooltipConfig: { visible: false, title: '提示文本' },
params: { itemId: '2012036275783090178' },
itemId: '2012036275783090178',
style: { width: '100%' }, style: { width: '100%' },
}, },
}, },
...@@ -512,9 +551,9 @@ export const formProps: FormProps = { ...@@ -512,9 +551,9 @@ export const formProps: FormProps = {
clearable: false, clearable: false,
disabled: false, disabled: false,
staticOptions: [{ key: 1, label: '设备1', value: '设备1' }], staticOptions: [{ key: 1, label: '设备1', value: '设备1' }],
defaultSelect: '', defaultSelect: null,
datasourceType: 'staticData', datasourceType: 'dic',
labelField: 'label', labelField: 'name',
valueField: 'value', valueField: 'value',
apiConfig: { apiConfig: {
path: 'CodeGeneration/selection', path: 'CodeGeneration/selection',
...@@ -527,6 +566,8 @@ export const formProps: FormProps = { ...@@ -527,6 +566,8 @@ export const formProps: FormProps = {
events: {}, events: {},
isShow: true, isShow: true,
tooltipConfig: { visible: false, title: '提示文本' }, tooltipConfig: { visible: false, title: '提示文本' },
params: { itemId: '2012036686640332802' },
itemId: '2012036686640332802',
style: { width: '100%' }, style: { width: '100%' },
}, },
}, },
...@@ -550,9 +591,9 @@ export const formProps: FormProps = { ...@@ -550,9 +591,9 @@ export const formProps: FormProps = {
{ key: 1, label: '完成', value: '完成' }, { key: 1, label: '完成', value: '完成' },
{ key: 2, label: '进行中', value: '进行中' }, { key: 2, label: '进行中', value: '进行中' },
], ],
defaultSelect: '', defaultSelect: '2',
datasourceType: 'staticData', datasourceType: 'dic',
labelField: 'label', labelField: 'name',
valueField: 'value', valueField: 'value',
apiConfig: { apiConfig: {
path: 'CodeGeneration/selection', path: 'CodeGeneration/selection',
...@@ -565,7 +606,8 @@ export const formProps: FormProps = { ...@@ -565,7 +606,8 @@ export const formProps: FormProps = {
events: {}, events: {},
isShow: false, isShow: false,
tooltipConfig: { visible: false, title: '提示文本' }, tooltipConfig: { visible: false, title: '提示文本' },
itemId: '2010588655764074497', itemId: '2012037005038338050',
params: { itemId: '2012037005038338050' },
style: { width: '100%' }, style: { width: '100%' },
}, },
}, },
...@@ -726,6 +768,8 @@ export const formProps: FormProps = { ...@@ -726,6 +768,8 @@ export const formProps: FormProps = {
events: {}, events: {},
isShow: true, isShow: true,
tooltipConfig: { visible: false, title: '提示文本' }, tooltipConfig: { visible: false, title: '提示文本' },
params: null,
defaultSelect: null,
style: { width: '100%' }, style: { width: '100%' },
}, },
}, },
......
...@@ -181,6 +181,7 @@ export const permissionList = [ ...@@ -181,6 +181,7 @@ export const permissionList = [
key: 'f7f68f4d1adf4f01abb41d84b0c20d81', key: 'f7f68f4d1adf4f01abb41d84b0c20d81',
children: [], children: [],
options: {}, options: {},
defaultValue: '2',
}, },
{ {
required: false, required: false,
......
...@@ -176,7 +176,7 @@ ...@@ -176,7 +176,7 @@
formConfig: { formConfig: {
labelWidth: 100, labelWidth: 100,
schemas: searchFormSchema, schemas: searchFormSchema,
fieldMapToTime: [['wcsj', ['wcsjStart', 'wcsjEnd'], 'YYYY-MM-DD HH:mm:ss ', true],], fieldMapToTime: [],
showResetButton: false, showResetButton: false,
}, },
bordered:false, bordered:false,
......
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