Commit 13b212c8 by sunhaiwei

修改物料清单页面

parent a92993c0
...@@ -6,7 +6,19 @@ import { BasicPageParams, BasicFetchResult } from '/@/api/model/baseModel'; ...@@ -6,7 +6,19 @@ import { BasicPageParams, BasicFetchResult } from '/@/api/model/baseModel';
export interface MesBaseBomPageParams extends BasicPageParams { export interface MesBaseBomPageParams extends BasicPageParams {
bommc: string; bommc: string;
cpid: string; bomsl: string;
bombb: string;
cpbh: string;
cpgg: string;
cpxh: string;
sfyy: string;
bz: string;
} }
/** /**
...@@ -17,7 +29,9 @@ export interface MesBaseBomPageModel { ...@@ -17,7 +29,9 @@ export interface MesBaseBomPageModel {
bommc: string; bommc: string;
cpmc: string; bomsl: string;
bombb: string;
cpbh: string; cpbh: string;
...@@ -25,9 +39,9 @@ export interface MesBaseBomPageModel { ...@@ -25,9 +39,9 @@ export interface MesBaseBomPageModel {
cpxh: string; cpxh: string;
bomsl: string; sfyy: string;
bombb: string; bz: string;
} }
/** /**
......
...@@ -148,7 +148,7 @@ ...@@ -148,7 +148,7 @@
function customClick(item) { function customClick(item) {
if (item.key == 'confirm') { if (item.key == 'confirm') {
handleSubmit(); handleSubmit();
} else if (item.key == 'cancel' && props.formType !== 'normal') { } else if (item.key == 'cancel') {
handleClose(); handleClose();
closeModal(); closeModal();
} else if (item.key == 'reset') { } else if (item.key == 'reset') {
...@@ -163,4 +163,3 @@ ...@@ -163,4 +163,3 @@
</script> </script>
\ No newline at end of file
...@@ -4,69 +4,68 @@ import { BasicColumn } from '/@/components/Table'; ...@@ -4,69 +4,68 @@ import { BasicColumn } from '/@/components/Table';
export const searchFormSchema: FormSchema[] = [ export const searchFormSchema: FormSchema[] = [
{ {
field: 'bommc', field: 'bommc',
label: '物料名称', label: '产品名称',
defaultValue: undefined, defaultValue: undefined,
component: 'Input', component: 'Input',
}, },
{ {
field: 'cpid', field: 'bomsl',
label: '产品', label: '产品数量',
defaultValue: undefined, defaultValue: undefined,
component: 'XjrSelect', component: 'InputNumber',
componentProps: { componentProps: {
datasourceType: 'api', style: { width: '100%' },
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)",
outputParams: [
{ {
name: 'cpbh', field: 'bombb',
tableTitle: '产品编号', label: 'BOM版本',
bindField: 'cpbh', defaultValue: undefined,
show: true, component: 'Input',
width: 150,
component: 'b2682f1ff2dc48448211cacb4bf48bfd',
}, },
{ {
name: 'cpmc', field: 'cpbh',
tableTitle: '产品名称', label: '产品编号',
bindField: 'cpmc', defaultValue: undefined,
show: true, component: 'Input',
width: 150,
component: 'db0bea5c2dbf4505833e67179e8618f3',
}, },
{ {
name: 'gg', field: 'cpgg',
tableTitle: '产品规格', label: '产品规格',
bindField: 'cpgg', defaultValue: undefined,
show: true, component: 'Input',
width: 150,
component: '3e7491b6d43c4ef7a7b6c2fd49a94a7f',
}, },
{ {
name: 'xh', field: 'cpxh',
tableTitle: '产品型号', label: '产品型号',
bindField: 'cpxh', defaultValue: undefined,
show: true, component: 'Input',
width: 150, },
component: 'cf7d04d1e6374a3fbc4a9dfb9ebdf19e', {
field: 'sfyy',
label: '是否有效',
defaultValue: 1,
component: 'Select',
componentProps: {
getPopupContainer: () => document.body,
options: [
{
label: '开',
value: 1,
},
{
label: '关',
value: 0,
}, },
], ],
}, },
labelField: 'label',
valueField: 'value',
mode: 'multiple',
showSearch: true,
getPopupContainer: () => document.body,
}, },
{
field: 'bz',
label: '备注',
defaultValue: undefined,
component: 'Input',
}, },
]; ];
...@@ -74,20 +73,33 @@ export const columns: BasicColumn[] = [ ...@@ -74,20 +73,33 @@ export const columns: BasicColumn[] = [
{ {
resizable: true, resizable: true,
dataIndex: 'bommc', dataIndex: 'bommc',
title: '物料名称', title: '产品名称',
componentType: 'input', componentType: 'input',
fixed: false, fixed: false,
sorter: true, sorter: true,
styleConfig: undefined, styleConfig: undefined,
listStyle: '', listStyle: undefined,
}, },
{ {
resizable: true, resizable: true,
dataIndex: 'cpmc', dataIndex: 'bomsl',
title: '产品名称', title: '产品数量',
componentType: 'number',
fixed: false,
sorter: true,
styleConfig: undefined,
listStyle: undefined,
},
{
resizable: true,
dataIndex: 'bombb',
title: 'BOM版本',
componentType: 'input', componentType: 'input',
fixed: false, fixed: false,
...@@ -138,9 +150,9 @@ export const columns: BasicColumn[] = [ ...@@ -138,9 +150,9 @@ export const columns: BasicColumn[] = [
{ {
resizable: true, resizable: true,
dataIndex: 'bomsl', dataIndex: 'sfyy',
title: '物料数量', title: '是否有效',
componentType: 'number', componentType: 'switch',
fixed: false, fixed: false,
sorter: true, sorter: true,
...@@ -151,15 +163,15 @@ export const columns: BasicColumn[] = [ ...@@ -151,15 +163,15 @@ export const columns: BasicColumn[] = [
{ {
resizable: true, resizable: true,
dataIndex: 'bombb', dataIndex: 'bz',
title: '物料版本', title: '备注',
componentType: 'input', componentType: 'textarea',
fixed: false, fixed: false,
sorter: true, sorter: true,
styleConfig: undefined, styleConfig: undefined,
listStyle: '', listStyle: undefined,
}, },
]; ];
//表头合并配置 //表头合并配置
...@@ -245,116 +257,9 @@ export const formProps: FormProps = { ...@@ -245,116 +257,9 @@ export const formProps: FormProps = {
span: 8, span: 8,
list: [ list: [
{ {
key: '0bb6edfef8ac486482e02a6e650306e6',
field: 'bommc',
label: '物料名称',
type: 'input',
component: 'Input',
colProps: { span: 24 },
defaultValue: '',
componentProps: {
width: '100%',
span: 7,
defaultValue: '',
placeholder: '请输入物料名称',
prefix: '',
suffix: '',
addonBefore: '',
addonAfter: '',
disabled: false,
allowClear: false,
showLabel: true,
required: true,
rules: [],
events: {},
listStyle: '',
isSave: false,
isShow: true,
scan: false,
bordered: true,
isShowAi: false,
tooltipConfig: { visible: false, title: '提示文本' },
style: { width: '100%' },
},
},
],
},
{
span: 8,
list: [
{
key: '4bc74304a0144e879b2fc45ae28ab1c5',
field: 'bomsl',
label: '物料数量',
type: 'number',
component: 'InputNumber',
colProps: { span: 24 },
defaultValue: 0,
componentProps: {
width: '100%',
span: 7,
min: 0,
step: 1,
disabled: false,
showLabel: true,
controls: true,
required: true,
subTotal: false,
isShow: true,
rules: [],
events: {},
tooltipConfig: { visible: false, title: '提示文本' },
defaultValue: 0,
style: { width: '100%' },
},
},
],
},
{
span: 8,
list: [
{
key: '50bff2d4c82d40a98ace5fd2b1d3b41e',
field: 'bombb',
label: '物料版本',
type: 'input',
component: 'Input',
colProps: { span: 24 },
defaultValue: '',
componentProps: {
width: '100%',
span: 7,
defaultValue: '',
placeholder: '请输入物料版本',
prefix: '',
suffix: '',
addonBefore: '',
addonAfter: '',
disabled: false,
allowClear: false,
showLabel: true,
required: false,
rules: [],
events: {},
listStyle: '',
isSave: false,
isShow: true,
scan: false,
bordered: true,
isShowAi: false,
tooltipConfig: { visible: false, title: '提示文本' },
style: { width: '100%' },
},
},
],
},
{
span: 8,
list: [
{
key: 'c42ef62f38e1445b89e5c3362ffd3af2', key: 'c42ef62f38e1445b89e5c3362ffd3af2',
field: 'cpid', field: 'cpid',
label: '产品', label: '产品名称',
type: 'associate-popup', type: 'associate-popup',
component: 'MultiplePopup', component: 'MultiplePopup',
colProps: { span: 24 }, colProps: { span: 24 },
...@@ -362,7 +267,7 @@ export const formProps: FormProps = { ...@@ -362,7 +267,7 @@ export const formProps: FormProps = {
popupType: 'associate', popupType: 'associate',
width: '100%', width: '100%',
span: 7, span: 7,
placeholder: '请产品选择', placeholder: '请产品名称选择',
showLabel: true, showLabel: true,
disabled: false, disabled: false,
datasourceType: 'api', datasourceType: 'api',
...@@ -393,10 +298,10 @@ export const formProps: FormProps = { ...@@ -393,10 +298,10 @@ export const formProps: FormProps = {
{ {
name: 'cpmc', name: 'cpmc',
tableTitle: '产品名称', tableTitle: '产品名称',
bindField: 'cpmc',
show: true, show: true,
width: 150, width: 150,
component: 'db0bea5c2dbf4505833e67179e8618f3', component: 'b44ff861a87d45b5b264515d85935042',
bindField: 'bommc',
}, },
{ {
name: 'gg', name: 'gg',
...@@ -431,9 +336,40 @@ export const formProps: FormProps = { ...@@ -431,9 +336,40 @@ export const formProps: FormProps = {
span: 8, span: 8,
list: [ list: [
{ {
key: 'b2682f1ff2dc48448211cacb4bf48bfd', key: '4bc74304a0144e879b2fc45ae28ab1c5',
field: 'cpbh', field: 'bomsl',
label: '产品编号', label: '产品数量',
type: 'number',
component: 'InputNumber',
colProps: { span: 24 },
defaultValue: 0,
componentProps: {
width: '100%',
span: 7,
min: 0,
step: 1,
disabled: false,
showLabel: true,
controls: true,
required: true,
subTotal: false,
isShow: true,
rules: [],
events: {},
tooltipConfig: { visible: false, title: '提示文本' },
defaultValue: 0,
style: { width: '100%' },
},
},
],
},
{
span: 8,
list: [
{
key: '50bff2d4c82d40a98ace5fd2b1d3b41e',
field: 'bombb',
label: 'BOM版本',
type: 'input', type: 'input',
component: 'Input', component: 'Input',
colProps: { span: 24 }, colProps: { span: 24 },
...@@ -442,12 +378,12 @@ export const formProps: FormProps = { ...@@ -442,12 +378,12 @@ export const formProps: FormProps = {
width: '100%', width: '100%',
span: 7, span: 7,
defaultValue: '', defaultValue: '',
placeholder: '', placeholder: '请输入BOM版本',
prefix: '', prefix: '',
suffix: '', suffix: '',
addonBefore: '', addonBefore: '',
addonAfter: '', addonAfter: '',
disabled: true, disabled: false,
allowClear: false, allowClear: false,
showLabel: true, showLabel: true,
required: false, required: false,
...@@ -469,9 +405,9 @@ export const formProps: FormProps = { ...@@ -469,9 +405,9 @@ export const formProps: FormProps = {
span: 8, span: 8,
list: [ list: [
{ {
key: 'db0bea5c2dbf4505833e67179e8618f3', key: 'b2682f1ff2dc48448211cacb4bf48bfd',
field: 'cpmc', field: 'cpbh',
label: '产品名称', label: '产品编号',
type: 'input', type: 'input',
component: 'Input', component: 'Input',
colProps: { span: 24 }, colProps: { span: 24 },
...@@ -610,6 +546,45 @@ export const formProps: FormProps = { ...@@ -610,6 +546,45 @@ export const formProps: FormProps = {
], ],
}, },
{ {
span: 8,
list: [
{
key: 'b44ff861a87d45b5b264515d85935042',
field: 'bommc',
label: '产品名称',
type: 'input',
component: 'Input',
colProps: { span: 24 },
defaultValue: '',
componentProps: {
width: '100%',
span: 7,
defaultValue: '',
placeholder: '请输入产品名称',
prefix: '',
suffix: '',
addonBefore: '',
addonAfter: '',
disabled: false,
allowClear: false,
showLabel: true,
required: false,
rules: [],
events: {},
listStyle: '',
isSave: false,
isShow: false,
scan: false,
bordered: true,
isShowAi: false,
tooltipConfig: { visible: false, title: '提示文本' },
style: { width: '100%' },
},
},
],
},
{ span: 8, list: [] },
{
span: 24, span: 24,
list: [ list: [
{ {
......
...@@ -6,15 +6,14 @@ export const permissionList = [ ...@@ -6,15 +6,14 @@ export const permissionList = [
disabled: false, disabled: false,
isSaveTable: false, isSaveTable: false,
tableName: '', tableName: '',
fieldName: '物料名称', fieldName: '产品名称',
fieldId: 'bommc', fieldId: 'cpid',
isSubTable: false, isSubTable: false,
showChildren: true, showChildren: true,
type: 'input', type: 'associate-popup',
key: '0bb6edfef8ac486482e02a6e650306e6', key: 'c42ef62f38e1445b89e5c3362ffd3af2',
children: [], children: [],
options: {}, options: {},
defaultValue: '',
}, },
{ {
required: true, required: true,
...@@ -23,7 +22,7 @@ export const permissionList = [ ...@@ -23,7 +22,7 @@ export const permissionList = [
disabled: false, disabled: false,
isSaveTable: false, isSaveTable: false,
tableName: '', tableName: '',
fieldName: '物料数量', fieldName: '产品数量',
fieldId: 'bomsl', fieldId: 'bomsl',
isSubTable: false, isSubTable: false,
showChildren: true, showChildren: true,
...@@ -40,7 +39,7 @@ export const permissionList = [ ...@@ -40,7 +39,7 @@ export const permissionList = [
disabled: false, disabled: false,
isSaveTable: false, isSaveTable: false,
tableName: '', tableName: '',
fieldName: '物料版本', fieldName: 'BOM版本',
fieldId: 'bombb', fieldId: 'bombb',
isSubTable: false, isSubTable: false,
showChildren: true, showChildren: true,
...@@ -51,22 +50,6 @@ export const permissionList = [ ...@@ -51,22 +50,6 @@ export const permissionList = [
defaultValue: '', defaultValue: '',
}, },
{ {
required: true,
view: true,
edit: true,
disabled: false,
isSaveTable: false,
tableName: '',
fieldName: '产品',
fieldId: 'cpid',
isSubTable: false,
showChildren: true,
type: 'associate-popup',
key: 'c42ef62f38e1445b89e5c3362ffd3af2',
children: [],
options: {},
},
{
required: false, required: false,
view: true, view: true,
edit: false, edit: false,
...@@ -90,23 +73,6 @@ export const permissionList = [ ...@@ -90,23 +73,6 @@ export const permissionList = [
disabled: false, disabled: false,
isSaveTable: false, isSaveTable: false,
tableName: '', tableName: '',
fieldName: '产品名称',
fieldId: 'cpmc',
isSubTable: false,
showChildren: true,
type: 'input',
key: 'db0bea5c2dbf4505833e67179e8618f3',
children: [],
options: {},
defaultValue: '',
},
{
required: false,
view: true,
edit: false,
disabled: false,
isSaveTable: false,
tableName: '',
fieldName: '产品规格', fieldName: '产品规格',
fieldId: 'cpgg', fieldId: 'cpgg',
isSubTable: false, isSubTable: false,
...@@ -158,6 +124,23 @@ export const permissionList = [ ...@@ -158,6 +124,23 @@ export const permissionList = [
disabled: false, disabled: false,
isSaveTable: false, isSaveTable: false,
tableName: '', tableName: '',
fieldName: '产品名称',
fieldId: 'bommc',
isSubTable: false,
showChildren: true,
type: 'input',
key: 'b44ff861a87d45b5b264515d85935042',
children: [],
options: {},
defaultValue: '',
},
{
required: false,
view: true,
edit: true,
disabled: false,
isSaveTable: false,
tableName: '',
fieldName: '备注', fieldName: '备注',
fieldId: 'bz', fieldId: 'bz',
isSubTable: false, isSubTable: false,
......
...@@ -24,7 +24,14 @@ ...@@ -24,7 +24,14 @@
</template> </template>
</template> </template>
<template #bodyCell="{ column, record }"> <template #bodyCell="{ column, record }">
<template v-if="column.componentType === 'switch'">
<a-switch
v-model:checked="record[column.dataIndex]"
:unCheckedValue="0"
:checkedValue="1"
:disabled="true"
/>
</template>
<template v-if="column.dataIndex === 'action'"> <template v-if="column.dataIndex === 'action'">
......
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