Commit 1e631b98 by 金民

feat(scjh): 添加状态字段并优化产品选择组件

- 添加状态字段(zh)到表单配置和数据模型
- 将状态字段组件从Input改为XjrSelect支持字典选项
- 修复产品选择组件的key值和字段映射
- 更新物料编号字段的绑定和显示配置
- 为表单组件添加prestrainField属性
- 优化状态选择组件的数据源和选项配置
parent b28515f8
......@@ -9,6 +9,8 @@ export interface MesProductionPlanPageParams extends BasicPageParams {
khxmh: string;
ddbh: string;
zt: string;
}
/**
......
......@@ -21,6 +21,21 @@ export const searchFormSchema: FormSchema[] = [
defaultValue: undefined,
component: 'Input',
},
{
field: 'zt',
label: '状态',
defaultValue: undefined,
component: 'XjrSelect',
componentProps: {
datasourceType: 'dic',
params: { itemId: '2004464883576217601' },
labelField: 'name',
valueField: 'value',
mode: 'multiple',
showSearch: true,
getPopupContainer: () => document.body,
},
},
];
export const columns: BasicColumn[] = [
......@@ -128,13 +143,13 @@ export const columns: BasicColumn[] = [
resizable: true,
dataIndex: 'zt',
title: '状态',
componentType: 'input',
componentType: 'select',
fixed: false,
sorter: true,
styleConfig: undefined,
listStyle: '',
listStyle: undefined,
},
];
//表头合并配置
......@@ -526,7 +541,7 @@ export const formProps: FormProps = {
mainKey: 'mesProductionPlanProductList',
columns: [
{
key: 'b8eabe8ddb714392b7a5710ce598f9e6',
key: '416cd1b15c314d0dafaf6fc91e3f4653',
title: '产品选择',
dataIndex: 'cpid',
componentType: 'MultiplePopup',
......@@ -541,7 +556,7 @@ export const formProps: FormProps = {
labelField: 'label',
valueField: 'value',
pageSize: 10,
assoTitle: '产品选择',
assoTitle: '选择产品',
apiConfig: {
path: '/scgl/scjh/getAllProduct',
method: 'GET',
......@@ -552,8 +567,18 @@ export const formProps: FormProps = {
{ key: '3', title: 'Body' },
],
script:
"var sql = 'select * from mes_base_product_info where delete_mark=0';\r\nreturn db.select(sql)",
"var sql = 'select *,id as value,cpmc as label from mes_base_product_info where delete_mark=0';\r\nreturn db.select(sql)",
outputParams: [
{ name: 'cpmc', tableTitle: '产品名称', show: true, width: 150 },
{
name: 'cpbh',
tableTitle: '物料编号',
bindField: 'wuLiaoBianHao8001',
show: true,
width: 150,
component: '1d4bb53150224ab99e0705074b984a4c',
bindTable: 'mes_production_plan_product_rela',
},
{
name: 'nbdm',
tableTitle: '内部代码',
......@@ -573,15 +598,6 @@ export const formProps: FormProps = {
bindTable: 'mes_production_plan_product_rela',
},
{
name: 'hjzt',
tableTitle: '合金状态',
bindField: 'heJinZhuangTai4056',
show: true,
width: 150,
component: 'e466da29e7544bdba302b4829996f478',
bindTable: 'mes_production_plan_product_rela',
},
{
name: 'gg',
tableTitle: '规格',
bindField: 'guiGe(ChiCun)9562',
......@@ -590,15 +606,6 @@ export const formProps: FormProps = {
component: '0973f42360874c6e86f425a363afd8ad',
bindTable: 'mes_production_plan_product_rela',
},
{
name: 'cpbh',
tableTitle: '物料编号',
bindField: 'wuLiaoBianHao2884',
show: true,
width: 150,
component: '1d4bb53150224ab99e0705074b984a4c',
bindTable: 'mes_production_plan_product_rela',
},
],
},
dicOptions: [],
......@@ -607,14 +614,12 @@ export const formProps: FormProps = {
events: {},
isShow: true,
tooltipConfig: { visible: false, title: '提示文本' },
type: 1,
event: [],
},
},
{
key: '1d4bb53150224ab99e0705074b984a4c',
title: '物料编号',
dataIndex: 'wuLiaoBianHao2884',
dataIndex: 'wuLiaoBianHao8001',
componentType: 'Input',
defaultValue: '',
componentProps: {
......@@ -639,6 +644,7 @@ export const formProps: FormProps = {
bordered: true,
isShowAi: false,
tooltipConfig: { visible: false, title: '提示文本' },
prestrainField: '',
},
},
{
......@@ -669,6 +675,7 @@ export const formProps: FormProps = {
bordered: true,
isShowAi: false,
tooltipConfig: { visible: false, title: '提示文本' },
prestrainField: '',
},
},
{
......@@ -699,6 +706,7 @@ export const formProps: FormProps = {
bordered: true,
isShowAi: false,
tooltipConfig: { visible: false, title: '提示文本' },
prestrainField: '',
},
},
{
......@@ -729,6 +737,7 @@ export const formProps: FormProps = {
bordered: true,
isShowAi: false,
tooltipConfig: { visible: false, title: '提示文本' },
prestrainField: '',
},
},
{
......@@ -759,6 +768,7 @@ export const formProps: FormProps = {
bordered: true,
isShowAi: false,
tooltipConfig: { visible: false, title: '提示文本' },
prestrainField: '',
},
},
{
......@@ -782,6 +792,7 @@ export const formProps: FormProps = {
rules: [],
events: {},
tooltipConfig: { visible: false, title: '提示文本' },
prestrainField: '',
listStyle: "return 'width:100%'",
},
},
......@@ -806,6 +817,7 @@ export const formProps: FormProps = {
rules: [],
events: {},
tooltipConfig: { visible: false, title: '提示文本' },
prestrainField: '',
listStyle: "return 'width:100%'",
},
},
......@@ -842,35 +854,43 @@ export const formProps: FormProps = {
},
},
{
key: 'a56dcb33304442d8ad43c83ad966c161',
key: 'f7ae7fe08ec74cf6b91cd3cd35cfeaaf',
field: 'zt',
label: '状态',
type: 'input',
component: 'Input',
type: 'select',
component: 'XjrSelect',
colProps: { span: 24 },
defaultValue: '1',
componentProps: {
width: '100%',
span: '',
defaultValue: '1',
placeholder: '请输入状态',
prefix: '',
suffix: '',
addonBefore: '',
addonAfter: '',
disabled: false,
allowClear: false,
placeholder: '请选择下拉选择',
showLabel: true,
showSearch: false,
isMultiple: false,
clearable: false,
disabled: false,
staticOptions: [
{ key: 1, label: 'Option 1', value: 'Option 1' },
{ key: 2, label: 'Option 2', value: 'Option 2' },
{ key: 3, label: 'Option 3', value: 'Option 3' },
],
defaultSelect: '1',
datasourceType: 'dic',
params: { itemId: '2004464883576217601' },
labelField: 'name',
valueField: 'value',
apiConfig: {
path: 'CodeGeneration/selection',
method: 'GET',
apiId: '93d735dcb7364a0f8102188ec4d77ac7',
},
dicOptions: [],
required: false,
rules: [],
events: {},
listStyle: '',
isSave: false,
isShow: false,
scan: false,
bordered: true,
isShowAi: false,
tooltipConfig: { visible: false, title: '提示文本' },
itemId: '2004464883576217601',
style: { width: '100%' },
},
},
......
......@@ -159,7 +159,7 @@ export const permissionList = [
fieldName: '产品选择',
fieldId: 'cpid',
type: 'MultiplePopup',
key: 'b8eabe8ddb714392b7a5710ce598f9e6',
key: '416cd1b15c314d0dafaf6fc91e3f4653',
children: [],
},
{
......@@ -172,7 +172,7 @@ export const permissionList = [
showChildren: false,
tableName: 'mesProductionPlanProductList',
fieldName: '物料编号',
fieldId: 'wuLiaoBianHao2884',
fieldId: 'wuLiaoBianHao8001',
type: 'Input',
key: '1d4bb53150224ab99e0705074b984a4c',
children: [],
......@@ -280,8 +280,8 @@ export const permissionList = [
fieldId: 'zt',
isSubTable: false,
showChildren: true,
type: 'input',
key: 'a56dcb33304442d8ad43c83ad966c161',
type: 'select',
key: 'f7ae7fe08ec74cf6b91cd3cd35cfeaaf',
children: [],
options: {},
defaultValue: '1',
......
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