Commit 13b212c8 by sunhaiwei

修改物料清单页面

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