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';
* @description: MesDeQualityInspection分页参数 模型
*/
export interface MesDeQualityInspectionPageParams extends BasicPageParams {
bh: string;
djlx: string;
wcsj: string;
zjfa: string;
cp: string;
zjgj: string;
}
/**
......@@ -25,9 +25,13 @@ export interface MesDeQualityInspectionPageModel {
zjbmmc: string;
wcsj: string;
zt: string;
createDate: string;
bjsl: string;
zjfa: string;
}
/**
......
......@@ -3,41 +3,38 @@ import { BasicColumn } from '/@/components/Table';
export const searchFormSchema: FormSchema[] = [
{
field: 'bh',
label: '编号',
field: 'djlx',
label: '单据类型',
defaultValue: undefined,
component: 'Input',
},
{
field: 'wcsj',
label: '完成时间',
defaultValue: undefined,
component: 'RangePicker',
component: 'XjrSelect',
componentProps: {
format: 'YYYY-MM-DD HH:mm:ss',
style: { width: '100%' },
datasourceType: 'dic',
params: { itemId: '2010912995692544001' },
labelField: 'name',
valueField: 'value',
mode: 'multiple',
showSearch: true,
getPopupContainer: () => document.body,
},
},
{
field: 'cp',
label: '产品名称',
field: 'zjfa',
label: '质检方案',
defaultValue: undefined,
component: 'XjrSelect',
componentProps: {
datasourceType: 'api',
apiConfig: {
path: '/scgl/scjh/getAllProduct',
path: '/zlgl//zjjcsj/getZjfa',
method: 'GET',
apiId: 'f4fbb57f2f18425e97918a031c8aa7d8',
apiId: 'ae3834298bc54c2fb66e9e9af18765e7',
apiParams: [
{ key: '1', title: 'Query Params', tableInfo: [] },
{ key: '2', title: 'Header', tableInfo: [] },
{ key: '3', title: 'Body' },
],
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',
valueField: 'value',
......@@ -46,6 +43,21 @@ export const searchFormSchema: FormSchema[] = [
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[] = [
......@@ -103,8 +115,21 @@ export const columns: BasicColumn[] = [
{
resizable: true,
dataIndex: 'wcsj',
title: '完成时间',
dataIndex: 'zt',
title: '质检状态',
componentType: 'select',
fixed: false,
sorter: true,
styleConfig: undefined,
listStyle: undefined,
},
{
resizable: true,
dataIndex: 'createDate',
title: '创建时间',
componentType: 'date',
fixed: false,
......@@ -116,18 +141,22 @@ export const columns: BasicColumn[] = [
{
resizable: true,
dataIndex: 'zt',
title: '质检状态',
componentType: 'select',
dataIndex: 'bjsl',
title: '报检数量',
componentType: 'number',
customRender: ({ record }) => {
const staticOptions = [
{ key: 1, label: '完成', value: '完成' },
{ key: 2, label: '进行中', value: '进行中' },
];
fixed: false,
sorter: true,
return staticOptions.filter((x) => x.value == record.zt)[0]?.label;
},
styleConfig: undefined,
listStyle: undefined,
},
{
resizable: true,
dataIndex: 'zjfa',
title: '质检方案',
componentType: 'select',
fixed: false,
sorter: true,
......@@ -442,14 +471,21 @@ export const formProps: FormProps = {
clearable: false,
disabled: false,
staticOptions: [{ key: 1, label: '方案1', value: '方案1' }],
defaultSelect: '',
datasourceType: 'staticData',
defaultSelect: null,
datasourceType: 'api',
labelField: 'label',
valueField: 'value',
apiConfig: {
path: 'CodeGeneration/selection',
path: '/zlgl//zjjcsj/getZjfa',
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: [],
required: false,
......@@ -457,6 +493,7 @@ export const formProps: FormProps = {
events: {},
isShow: true,
tooltipConfig: { visible: false, title: '提示文本' },
params: null,
style: { width: '100%' },
},
},
......@@ -477,9 +514,9 @@ export const formProps: FormProps = {
clearable: false,
disabled: false,
staticOptions: [{ key: 1, label: '成功', value: '成功' }],
defaultSelect: '',
datasourceType: 'staticData',
labelField: 'label',
defaultSelect: null,
datasourceType: 'dic',
labelField: 'name',
valueField: 'value',
apiConfig: {
path: 'CodeGeneration/selection',
......@@ -492,6 +529,8 @@ export const formProps: FormProps = {
events: {},
isShow: true,
tooltipConfig: { visible: false, title: '提示文本' },
params: { itemId: '2012036275783090178' },
itemId: '2012036275783090178',
style: { width: '100%' },
},
},
......@@ -512,9 +551,9 @@ export const formProps: FormProps = {
clearable: false,
disabled: false,
staticOptions: [{ key: 1, label: '设备1', value: '设备1' }],
defaultSelect: '',
datasourceType: 'staticData',
labelField: 'label',
defaultSelect: null,
datasourceType: 'dic',
labelField: 'name',
valueField: 'value',
apiConfig: {
path: 'CodeGeneration/selection',
......@@ -527,6 +566,8 @@ export const formProps: FormProps = {
events: {},
isShow: true,
tooltipConfig: { visible: false, title: '提示文本' },
params: { itemId: '2012036686640332802' },
itemId: '2012036686640332802',
style: { width: '100%' },
},
},
......@@ -550,9 +591,9 @@ export const formProps: FormProps = {
{ key: 1, label: '完成', value: '完成' },
{ key: 2, label: '进行中', value: '进行中' },
],
defaultSelect: '',
datasourceType: 'staticData',
labelField: 'label',
defaultSelect: '2',
datasourceType: 'dic',
labelField: 'name',
valueField: 'value',
apiConfig: {
path: 'CodeGeneration/selection',
......@@ -565,7 +606,8 @@ export const formProps: FormProps = {
events: {},
isShow: false,
tooltipConfig: { visible: false, title: '提示文本' },
itemId: '2010588655764074497',
itemId: '2012037005038338050',
params: { itemId: '2012037005038338050' },
style: { width: '100%' },
},
},
......@@ -726,6 +768,8 @@ export const formProps: FormProps = {
events: {},
isShow: true,
tooltipConfig: { visible: false, title: '提示文本' },
params: null,
defaultSelect: null,
style: { width: '100%' },
},
},
......
......@@ -181,6 +181,7 @@ export const permissionList = [
key: 'f7f68f4d1adf4f01abb41d84b0c20d81',
children: [],
options: {},
defaultValue: '2',
},
{
required: false,
......
......@@ -176,7 +176,7 @@
formConfig: {
labelWidth: 100,
schemas: searchFormSchema,
fieldMapToTime: [['wcsj', ['wcsjStart', 'wcsjEnd'], 'YYYY-MM-DD HH:mm:ss ', true],],
fieldMapToTime: [],
showResetButton: 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