Commit 3ed40a2f by 金民

feat(hujinbz): 添加产品和客户字段功能

- 在表单配置中新增产品(cp)和客户(kh)字段,使用XjrSelect组件
- 集成产品和客户数据的API接口,支持多选和搜索功能
- 更新表格列配置以显示产品和客户信息
- 修改表单布局,调整栅格跨度以适应新字段
- 更新数据模型接口,添加cp、kh和version字段定义
- 在工作流权限配置中添加新产品、客户和版本字段配置
- 调整标签对齐方式和间距设置
- 移除输入框的最大长度限制属性
parent 4e533ee0
......@@ -6,9 +6,11 @@ import { BasicPageParams, BasicFetchResult } from '/@/api/model/baseModel';
export interface MesAlloyStandardPageParams extends BasicPageParams {
code: string;
cp: string;
name: string;
remark: string;
kh: string;
}
/**
......@@ -21,7 +23,9 @@ export interface MesAlloyStandardPageModel {
name: string;
remark: string;
cp: string;
kh: string;
}
/**
......@@ -66,6 +70,12 @@ export interface MesAlloyStandardModel {
modifyUserId: string;
kh: string;
cp: string;
version: string;
mesAlloyStandardDetailsList?: MesAlloyStandardDetailsModel;
}
......
......@@ -222,3 +222,4 @@
});
</script>
\ No newline at end of file
......@@ -135,3 +135,4 @@
</script>
\ No newline at end of file
......@@ -9,16 +9,62 @@ export const searchFormSchema: FormSchema[] = [
component: 'Input',
},
{
field: 'cp',
label: '产品',
defaultValue: undefined,
component: 'XjrSelect',
componentProps: {
datasourceType: 'api',
apiConfig: {
path: '/scgl/scjh/getAllProduct',
method: 'GET',
apiId: 'f4fbb57f2f18425e97918a031c8aa7d8',
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)",
},
labelField: 'label',
valueField: 'value',
mode: 'multiple',
showSearch: true,
getPopupContainer: () => document.body,
},
},
{
field: 'name',
label: '名称',
defaultValue: undefined,
component: 'Input',
},
{
field: 'remark',
label: '备注',
field: 'kh',
label: '客户',
defaultValue: undefined,
component: 'Input',
component: 'XjrSelect',
componentProps: {
datasourceType: 'api',
apiConfig: {
path: '/jcxx/getKhList',
method: 'GET',
apiId: '7bc8db3faba24b19a997856f6ef0b27e',
apiParams: [
{ key: '1', title: 'Query Params', tableInfo: [] },
{ key: '2', title: 'Header', tableInfo: [] },
{ key: '3', title: 'Body' },
],
script:
'var sql="select id as value,name as label from roke_partner where delete_mark = 0 and customer = \'1\'";\r\nreturn db.select(sql);',
},
labelField: 'label',
valueField: 'value',
mode: 'multiple',
showSearch: true,
getPopupContainer: () => document.body,
},
},
];
......@@ -51,9 +97,22 @@ export const columns: BasicColumn[] = [
{
resizable: true,
dataIndex: 'remark',
title: '备注',
componentType: 'textarea',
dataIndex: 'cp',
title: '产品',
componentType: 'select',
fixed: false,
sorter: true,
styleConfig: undefined,
listStyle: undefined,
},
{
resizable: true,
dataIndex: 'kh',
title: '客户',
componentType: 'select',
fixed: false,
sorter: true,
......@@ -129,7 +188,7 @@ export const formEventConfigs = {
};
export const formProps: FormProps = {
labelCol: { span: 3, offset: 0 },
labelAlign: 'left',
labelAlign: 'right',
layout: 'horizontal',
size: 'default',
schemas: [
......@@ -142,7 +201,7 @@ export const formProps: FormProps = {
component: 'Grid',
children: [
{
span: 12,
span: 8,
list: [
{
key: '584fa619df5f4924826ca66e40616a8b',
......@@ -153,7 +212,7 @@ export const formProps: FormProps = {
colProps: { span: 24 },
componentProps: {
width: '100%',
span: 4,
span: 7,
placeholder: '',
prefix: '',
suffix: '',
......@@ -167,10 +226,57 @@ export const formProps: FormProps = {
style: { width: '100%' },
},
},
{
key: 'e04826ec6fca476f97dbe9848559485b',
field: 'cp',
label: '产品',
type: 'select',
component: 'XjrSelect',
colProps: { span: 24 },
componentProps: {
width: '100%',
span: 7,
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: '',
datasourceType: 'api',
params: null,
labelField: 'label',
valueField: 'value',
apiConfig: {
path: '/scgl/scjh/getAllProduct',
method: 'GET',
apiId: 'f4fbb57f2f18425e97918a031c8aa7d8',
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)",
},
dicOptions: [],
required: false,
rules: [],
events: {},
isShow: true,
tooltipConfig: { visible: false, title: '提示文本' },
style: { width: '100%' },
},
},
],
},
{
span: 12,
span: 8,
list: [
{
key: '2945f8e78cd2440caeb234bb50fc62df',
......@@ -182,10 +288,9 @@ export const formProps: FormProps = {
defaultValue: '',
componentProps: {
width: '100%',
span: 4,
span: 7,
defaultValue: '',
placeholder: '请输入名称',
maxlength: null,
prefix: '',
suffix: '',
addonBefore: '',
......@@ -206,11 +311,91 @@ export const formProps: FormProps = {
style: { width: '100%' },
},
},
{
key: '1464bd72f64648ed9201b6b617ad0025',
field: 'version',
label: '版本',
type: 'number',
component: 'InputNumber',
colProps: { span: 24 },
defaultValue: '',
componentProps: {
width: '100%',
span: 7,
defaultValue: '',
min: 0,
max: 100,
step: 1,
disabled: false,
showLabel: true,
controls: true,
required: false,
subTotal: false,
isShow: true,
rules: [],
events: {},
placeholder: '请输入版本',
tooltipConfig: { visible: false, title: '提示文本' },
style: { width: '100%' },
},
},
],
},
{
span: 8,
list: [
{
key: 'c79819dd1d3349f6b2d14c7db18a35e8',
field: 'kh',
label: '客户',
type: 'select',
component: 'XjrSelect',
colProps: { span: 24 },
componentProps: {
width: '100%',
span: 7,
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: '',
datasourceType: 'api',
params: null,
labelField: 'label',
valueField: 'value',
apiConfig: {
path: '/jcxx/getKhList',
method: 'GET',
apiId: '7bc8db3faba24b19a997856f6ef0b27e',
apiParams: [
{ key: '1', title: 'Query Params', tableInfo: [] },
{ key: '2', title: 'Header', tableInfo: [] },
{ key: '3', title: 'Body' },
],
script:
'var sql="select id as value,name as label from roke_partner where delete_mark = 0 and customer = \'1\'";\r\nreturn db.select(sql);',
},
dicOptions: [],
required: false,
rules: [],
events: {},
isShow: true,
tooltipConfig: { visible: false, title: '提示文本' },
style: { width: '100%' },
},
},
],
},
],
componentProps: {
gutter: 16,
gutter: 0,
justify: 'start',
align: 'top',
isShow: true,
......@@ -246,7 +431,6 @@ export const formProps: FormProps = {
span: 2,
defaultValue: '',
placeholder: '请输入备注',
maxlength: null,
rows: 4,
autoSize: false,
showCount: false,
......@@ -319,7 +503,6 @@ export const formProps: FormProps = {
span: '',
defaultValue: '',
placeholder: '',
maxlength: null,
prefix: '',
suffix: '',
addonBefore: '',
......@@ -351,7 +534,6 @@ export const formProps: FormProps = {
span: '',
defaultValue: '',
placeholder: '',
maxlength: null,
prefix: '',
suffix: '',
addonBefore: '',
......@@ -383,7 +565,6 @@ export const formProps: FormProps = {
span: '',
defaultValue: '',
placeholder: '',
maxlength: null,
prefix: '',
suffix: '',
addonBefore: '',
......@@ -414,7 +595,6 @@ export const formProps: FormProps = {
span: '',
defaultValue: '',
placeholder: '',
maxlength: null,
prefix: '',
suffix: '',
addonBefore: '',
......@@ -445,7 +625,6 @@ export const formProps: FormProps = {
span: '',
defaultValue: '',
placeholder: '',
maxlength: null,
prefix: '',
suffix: '',
addonBefore: '',
......@@ -476,7 +655,6 @@ export const formProps: FormProps = {
span: '',
defaultValue: '',
placeholder: '',
maxlength: null,
prefix: '',
suffix: '',
addonBefore: '',
......@@ -507,7 +685,6 @@ export const formProps: FormProps = {
span: '',
defaultValue: '',
placeholder: '',
maxlength: null,
prefix: '',
suffix: '',
addonBefore: '',
......@@ -538,7 +715,6 @@ export const formProps: FormProps = {
span: '',
defaultValue: '',
placeholder: '',
maxlength: null,
prefix: '',
suffix: '',
addonBefore: '',
......@@ -569,7 +745,6 @@ export const formProps: FormProps = {
span: '',
defaultValue: '',
placeholder: '',
maxlength: null,
prefix: '',
suffix: '',
addonBefore: '',
......@@ -601,7 +776,6 @@ export const formProps: FormProps = {
span: '',
defaultValue: '',
placeholder: '',
maxlength: null,
prefix: '',
suffix: '',
addonBefore: '',
......@@ -673,110 +847,70 @@ export const formProps: FormProps = {
key: '2712bdd338964f038f45439d4c1feb8e',
name: '合金名称',
bindField: 'name',
width: null,
minWidth: null,
maxWidth: null,
resizable: false,
unit: null,
isEdit: true,
},
{
key: '341f1c4031554a88af26de53261b1e94',
name: '客户标准',
bindField: 'customer_standard',
width: null,
minWidth: null,
maxWidth: null,
resizable: false,
unit: null,
isEdit: false,
},
{
key: '98af38feed0f417f9c9a1a899720ec06',
name: '客户标准上限',
bindField: 'customer_upper_limit',
width: null,
minWidth: null,
maxWidth: null,
resizable: false,
unit: null,
isEdit: false,
},
{
key: 'acb300ec5c0f4ca9b7b91b250f668800',
name: '客户标准下限',
bindField: 'customer_lower_limit',
width: null,
minWidth: null,
maxWidth: null,
resizable: false,
unit: null,
isEdit: false,
},
{
key: '9369baff2e2d4105b0488e21bd19fe2f',
name: '内控标准',
bindField: 'internal_standard',
width: null,
minWidth: null,
maxWidth: null,
resizable: false,
unit: null,
isEdit: false,
},
{
key: 'eadf6efef4094aa080eead40c9eaa177',
name: '内控标准上限',
bindField: 'internal_upper_limit',
width: null,
minWidth: null,
maxWidth: null,
resizable: false,
unit: null,
isEdit: false,
},
{
key: '53085afd908a493f859852a6b02d517c',
name: '内控标准下限',
bindField: 'internal_lower_limit',
width: null,
minWidth: null,
maxWidth: null,
resizable: false,
unit: null,
isEdit: false,
},
{
key: '3f55ad59b15d4dd8945eb272600401e9',
name: '备注',
bindField: 'remark',
width: null,
minWidth: null,
maxWidth: null,
resizable: false,
unit: null,
isEdit: false,
},
{
key: 'e618c972ba9f497f80a3b3656e962a80',
name: '产品编号',
bindField: 'code',
width: null,
minWidth: null,
maxWidth: null,
resizable: false,
unit: null,
isEdit: false,
},
{
key: '0e961ed9254b44e8b6e478daca3bf64d',
name: '产品ID',
bindField: 'product_id',
width: null,
minWidth: null,
maxWidth: null,
resizable: false,
unit: null,
isEdit: false,
},
],
......
......@@ -22,6 +22,22 @@ export const permissionList = [
disabled: false,
isSaveTable: false,
tableName: '',
fieldName: '产品',
fieldId: 'cp',
isSubTable: false,
showChildren: true,
type: 'select',
key: 'e04826ec6fca476f97dbe9848559485b',
children: [],
options: {},
},
{
required: false,
view: true,
edit: true,
disabled: false,
isSaveTable: false,
tableName: '',
fieldName: '名称',
fieldId: 'name',
isSubTable: false,
......@@ -39,6 +55,39 @@ export const permissionList = [
disabled: false,
isSaveTable: false,
tableName: '',
fieldName: '版本',
fieldId: 'version',
isSubTable: false,
showChildren: true,
type: 'number',
key: '1464bd72f64648ed9201b6b617ad0025',
children: [],
options: {},
defaultValue: '',
},
{
required: false,
view: true,
edit: true,
disabled: false,
isSaveTable: false,
tableName: '',
fieldName: '客户',
fieldId: 'kh',
isSubTable: false,
showChildren: true,
type: 'select',
key: 'c79819dd1d3349f6b2d14c7db18a35e8',
children: [],
options: {},
},
{
required: false,
view: true,
edit: true,
disabled: false,
isSaveTable: false,
tableName: '',
fieldName: '备注',
fieldId: 'remark',
isSubTable: false,
......
......@@ -133,7 +133,7 @@
//展示在列表内的按钮
const actionButtons = ref<string[]>(["view","edit","delete"]);
const buttonConfigs = computed(()=>{
const list = [{"isUse":true,"name":"查看","code":"view","icon":"ant-design:eye-outlined","isDefault":true},{"isUse":true,"name":"新增","code":"add","icon":"ant-design:plus-outlined","isDefault":true},{"isUse":true,"name":"编辑","code":"edit","icon":"ant-design:form-outlined","isDefault":true,"isEnableLock":true},{"isUse":true,"name":"删除","code":"delete","icon":"ant-design:delete-outlined","isDefault":true}]
const list = [{"buttonId":"2008425744182145024","name":"查看","code":"view","icon":"ant-design:eye-outlined","isDefault":true,"isUse":true},{"buttonId":"2008425744186339328","name":"新增","code":"add","icon":"ant-design:plus-outlined","isDefault":true,"isUse":true},{"buttonId":"2008425744186339329","name":"编辑","code":"edit","icon":"ant-design:form-outlined","isDefault":true,"isUse":true,"isEnableLock":true},{"buttonId":"2008425744186339330","name":"删除","code":"delete","icon":"ant-design:delete-outlined","isDefault":true,"isUse":true}]
return filterButtonAuth(list);
})
......
......@@ -278,54 +278,6 @@ export const formProps: FormProps = {
span: 8,
list: [
{
key: 'lkajsldjaljdla',
field: 'p20',
label: '业务组织',
type: 'select',
component: 'XjrSelect',
colProps: { span: 24 },
componentProps: {
width: '100%',
span: 7,
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: null,
datasourceType: 'dic',
labelField: 'name',
valueField: 'value',
apiConfig: {
path: '/bmxx/getCompanyList',
method: 'GET',
apiId: 'copy1765431632890d13798',
apiParams: [
{ key: '1', title: 'Query Params', tableInfo: [] },
{ key: '2', title: 'Header', tableInfo: [] },
{ key: '3', title: 'Body' },
],
script:
'var sql="select id as value,name as label from res_company";\r\nreturn db.select(sql);',
},
dicOptions: [],
required: true,
rules: [],
events: {},
isShow: true,
tooltipConfig: { visible: false, title: '提示文本' },
params: { itemId: '2015724355955159041' },
itemId: '2015724355955159041',
style: { width: '100%' },
},
},
{
key: 'fd1b0f4df3ff44179f86dfa5ec6a5c1f',
field: 'jjdh',
label: '交接单号',
......@@ -624,8 +576,57 @@ export const formProps: FormProps = {
span: 8,
list: [
{
key: 'lkajsldjaljdla',
field: 'p20',
label: '业务组织',
type: 'select',
component: 'XjrSelect',
colProps: { span: 24 },
componentProps: {
width: '100%',
span: 7,
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: null,
datasourceType: 'dic',
labelField: 'name',
valueField: 'value',
apiConfig: {
path: '/bmxx/getCompanyList',
method: 'GET',
apiId: 'copy1765431632890d13798',
apiParams: [
{ key: '1', title: 'Query Params', tableInfo: [] },
{ key: '2', title: 'Header', tableInfo: [] },
{ key: '3', title: 'Body' },
],
script:
'var sql="select id as value,name as label from res_company";\r\nreturn db.select(sql);',
},
dicOptions: [],
required: true,
rules: [],
events: {},
isShow: true,
tooltipConfig: { visible: false, title: '提示文本' },
params: { itemId: '2015724355955159041' },
itemId: '2015724355955159041',
style: { width: '100%' },
},
},
{
key: '2e41a029fd9d4e338ef7ec9965643df1',
field: 'jssj',
label: '接收时间',
type: 'date',
component: 'DatePicker',
......
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