Commit 0cc7187d by 金民

Merge remote-tracking branch 'origin/weiqiao-vue3' into hongshun

parents 592f830c 4c5dc717
...@@ -7,8 +7,6 @@ export interface MesBaseBomPageParams extends BasicPageParams { ...@@ -7,8 +7,6 @@ export interface MesBaseBomPageParams extends BasicPageParams {
bommc: string; bommc: string;
cpid: string; cpid: string;
sfyy: string;
} }
/** /**
...@@ -19,15 +17,17 @@ export interface MesBaseBomPageModel { ...@@ -19,15 +17,17 @@ export interface MesBaseBomPageModel {
bommc: string; bommc: string;
bomsl: string;
bombb: string;
cpmc: string; cpmc: string;
cpbh: string;
cpgg: string; cpgg: string;
cpxh: string; cpxh: string;
bomsl: string;
bombb: string;
} }
/** /**
...@@ -86,6 +86,8 @@ export interface MesBaseBomModel { ...@@ -86,6 +86,8 @@ export interface MesBaseBomModel {
modifyUserId: string; modifyUserId: string;
sjbom: string;
mesBaseBomItemList?: MesBaseBomItemModel; mesBaseBomItemList?: MesBaseBomItemModel;
} }
...@@ -99,6 +101,8 @@ export interface MesBaseBomItemModel { ...@@ -99,6 +101,8 @@ export interface MesBaseBomItemModel {
bomid: string; bomid: string;
wlid: string;
wlbh: string; wlbh: string;
wlmc: string; wlmc: string;
......
...@@ -6,9 +6,9 @@ import { BasicPageParams, BasicFetchResult } from '/@/api/model/baseModel'; ...@@ -6,9 +6,9 @@ import { BasicPageParams, BasicFetchResult } from '/@/api/model/baseModel';
export interface MesProductionPlanPageParams extends BasicPageParams { export interface MesProductionPlanPageParams extends BasicPageParams {
jhbh: string; jhbh: string;
ddbh: string; kh: string;
ssgs: string; ywzz: string;
zt: string; zt: string;
} }
...@@ -19,13 +19,15 @@ export interface MesProductionPlanPageParams extends BasicPageParams { ...@@ -19,13 +19,15 @@ export interface MesProductionPlanPageParams extends BasicPageParams {
export interface MesProductionPlanPageModel { export interface MesProductionPlanPageModel {
id: string; id: string;
ddbh: string;
jhbh: string; jhbh: string;
ddbh: string;
kh: string; kh: string;
ssgs: string; jhjhrq: string;
ywzz: string;
zt: string; zt: string;
} }
...@@ -107,6 +109,8 @@ export interface MesProductionPlanProductModel { ...@@ -107,6 +109,8 @@ export interface MesProductionPlanProductModel {
cpbh: string; cpbh: string;
cpmc: string;
nbdm: string; nbdm: string;
hjzt: string; hjzt: string;
......
...@@ -595,7 +595,7 @@ export const formProps: FormProps = { ...@@ -595,7 +595,7 @@ export const formProps: FormProps = {
{ name: 'category_id', tableTitle: '工序类别' }, { name: 'category_id', tableTitle: '工序类别' },
{ name: 'id', tableTitle: 'ID' }, { name: 'id', tableTitle: 'ID' },
{ tableTitle: '采集方案ID', name: 'collection_scheme_id' }, { tableTitle: '采集方案ID', name: 'collection_scheme_id' },
{ name: 'rated_working_hours', tableTitle: '额工时定' }, { name: 'rated_working_hours', tableTitle: '额定工时' },
], ],
}, },
itemId: '', itemId: '',
......
...@@ -10,7 +10,7 @@ export const searchFormSchema: FormSchema[] = [ ...@@ -10,7 +10,7 @@ export const searchFormSchema: FormSchema[] = [
}, },
{ {
field: 'cpid', field: 'cpid',
label: '选择产品', label: '产品',
defaultValue: undefined, defaultValue: undefined,
component: 'XjrSelect', component: 'XjrSelect',
componentProps: { componentProps: {
...@@ -68,25 +68,6 @@ export const searchFormSchema: FormSchema[] = [ ...@@ -68,25 +68,6 @@ export const searchFormSchema: FormSchema[] = [
getPopupContainer: () => document.body, getPopupContainer: () => document.body,
}, },
}, },
{
field: 'sfyy',
label: '是否有效',
defaultValue: 1,
component: 'Select',
componentProps: {
getPopupContainer: () => document.body,
options: [
{
label: '开',
value: 1,
},
{
label: '关',
value: 0,
},
],
},
},
]; ];
export const columns: BasicColumn[] = [ export const columns: BasicColumn[] = [
...@@ -105,21 +86,21 @@ export const columns: BasicColumn[] = [ ...@@ -105,21 +86,21 @@ export const columns: BasicColumn[] = [
{ {
resizable: true, resizable: true,
dataIndex: 'bomsl', dataIndex: 'cpmc',
title: '物料数量', title: '产品名称',
componentType: 'number', componentType: 'input',
fixed: false, fixed: false,
sorter: true, sorter: true,
styleConfig: undefined, styleConfig: undefined,
listStyle: undefined, listStyle: '',
}, },
{ {
resizable: true, resizable: true,
dataIndex: 'bombb', dataIndex: 'cpbh',
title: '物料版本', title: '产品编号',
componentType: 'input', componentType: 'input',
fixed: false, fixed: false,
...@@ -131,8 +112,8 @@ export const columns: BasicColumn[] = [ ...@@ -131,8 +112,8 @@ export const columns: BasicColumn[] = [
{ {
resizable: true, resizable: true,
dataIndex: 'cpmc', dataIndex: 'cpgg',
title: '产品名称', title: '产品规格',
componentType: 'input', componentType: 'input',
fixed: false, fixed: false,
...@@ -144,8 +125,8 @@ export const columns: BasicColumn[] = [ ...@@ -144,8 +125,8 @@ export const columns: BasicColumn[] = [
{ {
resizable: true, resizable: true,
dataIndex: 'cpgg', dataIndex: 'cpxh',
title: '产品规格', title: '产品型号',
componentType: 'input', componentType: 'input',
fixed: false, fixed: false,
...@@ -157,8 +138,21 @@ export const columns: BasicColumn[] = [ ...@@ -157,8 +138,21 @@ export const columns: BasicColumn[] = [
{ {
resizable: true, resizable: true,
dataIndex: 'cpxh', dataIndex: 'bomsl',
title: '产品型号', title: '物料数量',
componentType: 'number',
fixed: false,
sorter: true,
styleConfig: undefined,
listStyle: undefined,
},
{
resizable: true,
dataIndex: 'bombb',
title: '物料版本',
componentType: 'input', componentType: 'input',
fixed: false, fixed: false,
...@@ -360,7 +354,7 @@ export const formProps: FormProps = { ...@@ -360,7 +354,7 @@ export const formProps: FormProps = {
{ {
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 },
...@@ -368,7 +362,7 @@ export const formProps: FormProps = { ...@@ -368,7 +362,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',
...@@ -448,7 +442,7 @@ export const formProps: FormProps = { ...@@ -448,7 +442,7 @@ export const formProps: FormProps = {
width: '100%', width: '100%',
span: 7, span: 7,
defaultValue: '', defaultValue: '',
placeholder: '请输入产品编号', placeholder: '',
prefix: '', prefix: '',
suffix: '', suffix: '',
addonBefore: '', addonBefore: '',
...@@ -486,7 +480,7 @@ export const formProps: FormProps = { ...@@ -486,7 +480,7 @@ export const formProps: FormProps = {
width: '100%', width: '100%',
span: 7, span: 7,
defaultValue: '', defaultValue: '',
placeholder: '请输入产品名称', placeholder: '',
prefix: '', prefix: '',
suffix: '', suffix: '',
addonBefore: '', addonBefore: '',
...@@ -524,7 +518,7 @@ export const formProps: FormProps = { ...@@ -524,7 +518,7 @@ export const formProps: FormProps = {
width: '100%', width: '100%',
span: 7, span: 7,
defaultValue: '', defaultValue: '',
placeholder: '请输入产品规格', placeholder: '',
prefix: '', prefix: '',
suffix: '', suffix: '',
addonBefore: '', addonBefore: '',
...@@ -562,7 +556,7 @@ export const formProps: FormProps = { ...@@ -562,7 +556,7 @@ export const formProps: FormProps = {
width: '100%', width: '100%',
span: 7, span: 7,
defaultValue: '', defaultValue: '',
placeholder: '请输入产品型号', placeholder: '',
prefix: '', prefix: '',
suffix: '', suffix: '',
addonBefore: '', addonBefore: '',
...@@ -663,390 +657,462 @@ export const formProps: FormProps = { ...@@ -663,390 +657,462 @@ export const formProps: FormProps = {
}, },
}, },
{ {
key: 'c87fc2d18e24429a819521f35f19137b', key: '2d0c8112a86543e0ac71468e261f0a55',
label: '物料项', field: '',
field: 'mesBaseBomItemList', label: '',
type: 'form', type: 'tab',
component: 'SubForm',
required: true,
colProps: { span: 24 }, colProps: { span: 24 },
componentProps: { component: 'Tab',
mainKey: 'mesBaseBomItemList', children: [
columns: [ {
{ span: 24,
key: '709b38c05d11468db0db4e6e9168e4f9', name: '物料',
title: '选择物料', prefix: '',
dataIndex: 'wlmc', suffix: '',
componentType: 'MultiplePopup', activeColor: '#1c8dff',
componentProps: { folderId: '',
popupType: 'associate', imageUrl: '',
width: '100%', conFolderId: '',
placeholder: '请选择物料选择', conImageUrl: '',
showLabel: true, list: [
disabled: false, {
datasourceType: 'api', key: 'c87fc2d18e24429a819521f35f19137b',
labelField: 'label', label: '',
valueField: 'value', field: 'mesBaseBomItemList',
pageSize: 10, type: 'form',
assoTitle: '物料列表', component: 'SubForm',
apiConfig: { required: true,
path: '/scgl/scjh/getAllProduct', colProps: { span: 24 },
method: 'GET', componentProps: {
apiId: 'f4fbb57f2f18425e97918a031c8aa7d8', mainKey: 'mesBaseBomItemList',
apiParams: [ columns: [
{ key: '1', title: 'Query Params', tableInfo: [] }, {
{ key: '2', title: 'Header', tableInfo: [] }, key: '3988d1cba45a464abbeabce6ed09970e',
{ key: '3', title: 'Body' }, title: '物料编号',
dataIndex: 'wlbh',
componentType: 'Input',
defaultValue: '',
componentProps: {
width: '100%',
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: '提示文本' },
prestrainField: 'cpbh',
},
},
{
key: '112f6292bd884006ad872f06aeef4e6f',
title: '物料名称',
dataIndex: 'wlmc',
componentType: 'Input',
defaultValue: '',
componentProps: {
width: '100%',
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: '提示文本' },
prestrainField: 'cpmc',
},
},
{
key: '80fe637a2eaa47a49e96f6e86f0efdda',
title: '物料数量',
dataIndex: 'wlsl',
componentType: 'InputNumber',
defaultValue: 0,
componentProps: {
width: '100%',
min: 0,
step: 1,
disabled: false,
showLabel: true,
controls: true,
required: false,
subTotal: false,
isShow: true,
rules: [],
events: {},
tooltipConfig: { visible: false, title: '提示文本' },
prestrainField: '',
defaultValue: 0,
listStyle: "return 'width:100%'",
},
},
{
key: '1afa69530c154b6f904f1661e82ff9a3',
title: '库存数量',
dataIndex: 'wlkcl',
componentType: 'InputNumber',
defaultValue: 0,
componentProps: {
width: '100%',
min: 0,
step: 1,
disabled: false,
showLabel: true,
controls: true,
required: false,
subTotal: false,
isShow: true,
rules: [],
events: {},
tooltipConfig: { visible: false, title: '提示文本' },
prestrainField: '',
defaultValue: 0,
listStyle: "return 'width:100%'",
},
},
{
key: 'd15b4777d2794944995aa2a085442a6e',
title: '客户标准(%)',
dataIndex: 'khbz',
componentType: 'InputNumber',
defaultValue: 0,
componentProps: {
width: '100%',
min: 0,
max: 100,
step: 1,
disabled: false,
showLabel: true,
controls: true,
required: false,
subTotal: false,
isShow: true,
rules: [],
events: {},
tooltipConfig: { visible: false, title: '提示文本' },
prestrainField: '',
defaultValue: 0,
listStyle: "return 'width:100%'",
},
},
{
key: '1ef860d823ff46c690334dc5eff5a6e4',
title: '内控标准(%)',
dataIndex: 'nkbz',
componentType: 'InputNumber',
defaultValue: 0,
componentProps: {
width: '100%',
min: 0,
max: 100,
step: 1,
disabled: false,
showLabel: true,
controls: true,
required: false,
subTotal: false,
isShow: true,
rules: [],
events: {},
tooltipConfig: { visible: false, title: '提示文本' },
prestrainField: '',
defaultValue: 0,
listStyle: "return 'width:100%'",
},
},
{
key: '40a1e893e8ee496a96d7ed6dbe17e271',
title: '是否投料',
dataIndex: 'sftl',
componentType: 'Switch',
defaultValue: 1,
componentProps: {
span: '',
defaultValue: 1,
checkedChildren: '',
unCheckedChildren: '',
checkedColor: '#1C8DFF',
unCheckedColor: '#bbbdbf',
showLabel: true,
disabled: false,
events: {},
isShow: true,
tooltipConfig: { visible: false, title: '提示文本' },
prestrainField: '',
},
},
{
key: '9230b500d1024028af68ed4ac49bdbd3',
title: '备注',
dataIndex: 'bz',
componentType: 'Input',
defaultValue: '',
componentProps: {
width: '100%',
span: '',
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: '提示文本' },
prestrainField: '',
},
},
{
key: '998cedda278d4544ab851536bae4aacc',
title: '物料ID',
dataIndex: 'wlid',
componentType: 'Input',
defaultValue: '',
componentProps: {
width: '100%',
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: '提示文本' },
prestrainField: 'id',
},
},
{ title: '操作', key: 'action', fixed: 'right', width: '50px' },
],
span: 2,
preloadType: 'api',
apiConfig: {
path: '/scgl/scjh/getAllProduct',
method: 'GET',
apiId: 'f4fbb57f2f18425e97918a031c8aa7d8',
apiParams: [
{
key: '1',
title: 'Query Params',
tableInfo: [
{
name: 'keyword',
value: '',
required: false,
dataType: 'String',
bindType: '',
},
],
},
{ key: '2', title: 'Header', tableInfo: [] },
{ key: '3', title: 'Body' },
],
script:
"if(keyword!=null && keyword!=''){\r\n var sql = \"select *,id as value,cpmc as label from mes_base_product_info where delete_mark=0 and cpmc like '%${keyword}%' \";\r\n return db.select(sql)\r\n}\r\nvar 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', tableTitle: '编号' },
{ name: 'cpmc', tableTitle: '名称' },
{ name: 'id', tableTitle: 'ID' },
],
},
itemId: '',
dicOptions: [],
useSelectButton: true,
buttonName: '选择',
showLabel: true,
showComponentBorder: true,
showBorder: false,
bordercolor: '#f0f0f0',
bordershowtype: [true, true, true, true],
borderwidth: 1,
showIndex: true,
isShow: true,
multipleHeads: [],
buttonList: [],
topButtonList: [],
isExport: false,
isImport: false,
isDeleteSelected: false,
isListView: false,
viewList: [
{
key: '112f6292bd884006ad872f06aeef4e6f',
label: '物料名称',
field: 'wlmc',
componentType: 'input',
checked: true,
},
{
key: '3988d1cba45a464abbeabce6ed09970e',
label: '物料编号',
field: 'wlbh',
componentType: 'input',
checked: true,
},
{
key: '80fe637a2eaa47a49e96f6e86f0efdda',
label: '物料数量',
field: 'wlsl',
componentType: 'number',
checked: true,
},
{
key: '1afa69530c154b6f904f1661e82ff9a3',
label: '库存数量',
field: 'wlkcl',
componentType: 'number',
checked: true,
},
{
key: 'd15b4777d2794944995aa2a085442a6e',
label: '客户标准(%)',
field: 'khbz',
componentType: 'number',
checked: true,
},
{
key: '1ef860d823ff46c690334dc5eff5a6e4',
label: '内控标准(%)',
field: 'nkbz',
componentType: 'number',
checked: true,
},
{
key: '9230b500d1024028af68ed4ac49bdbd3',
label: '备注',
field: 'bz',
componentType: 'input',
checked: true,
},
{
key: '40a1e893e8ee496a96d7ed6dbe17e271',
label: '是否投料',
field: 'sftl',
componentType: 'switch',
checked: false,
},
{
key: '709b38c05d11468db0db4e6e9168e4f9',
label: '选择物料',
field: 'bomid',
componentType: 'associate-popup',
checked: false,
},
], ],
script: isShowAdd: false,
"var sql = 'select *,id as value,cpmc as label from mes_base_product_info where delete_mark=0';\r\nreturn db.select(sql)", isShowDelete: true,
outputParams: [ hasCheckedCol: false,
events: {},
showPagenation: true,
rowResize: false,
widths: [
{ {
name: 'cpbh', key: '3988d1cba45a464abbeabce6ed09970e',
tableTitle: '物料编号', name: '物料编号',
bindField: 'wlbh', bindField: 'wlbh',
show: true, resizable: false,
width: 150, isEdit: true,
component: '3988d1cba45a464abbeabce6ed09970e',
bindTable: 'mes_base_bom_item',
}, },
{ {
name: 'cpmc', key: '112f6292bd884006ad872f06aeef4e6f',
tableTitle: '物料名称', name: '物料名称',
bindField: 'wlmc', bindField: 'wlmc',
show: true, resizable: false,
width: 150, isEdit: true,
component: '112f6292bd884006ad872f06aeef4e6f', },
bindTable: 'mes_base_bom_item', {
key: '80fe637a2eaa47a49e96f6e86f0efdda',
name: '物料数量',
bindField: 'wlsl',
resizable: false,
isEdit: false,
},
{
key: '1afa69530c154b6f904f1661e82ff9a3',
name: '库存数量',
bindField: 'wlkcl',
resizable: false,
isEdit: false,
},
{
key: 'd15b4777d2794944995aa2a085442a6e',
name: '客户标准(%)',
bindField: 'khbz',
resizable: false,
isEdit: false,
},
{
key: '1ef860d823ff46c690334dc5eff5a6e4',
name: '内控标准(%)',
bindField: 'nkbz',
resizable: false,
isEdit: false,
},
{
key: '40a1e893e8ee496a96d7ed6dbe17e271',
name: '是否投料',
bindField: 'sftl',
resizable: false,
isEdit: false,
},
{
key: '9230b500d1024028af68ed4ac49bdbd3',
name: '备注',
bindField: 'bz',
resizable: false,
isEdit: false,
}, },
], ],
}, },
dicOptions: [],
required: true,
rules: [],
events: {},
isShow: true,
tooltipConfig: { visible: false, title: '提示文本' },
prestrainField: 'name',
},
},
{
key: '3988d1cba45a464abbeabce6ed09970e',
title: '物料编号',
dataIndex: 'wlbh',
componentType: 'Input',
defaultValue: '',
componentProps: {
width: '100%',
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: '提示文本' },
prestrainField: '',
},
},
{
key: '112f6292bd884006ad872f06aeef4e6f',
title: '物料名称',
dataIndex: 'wuLiaoMingChen9398',
componentType: 'Input',
defaultValue: '',
componentProps: {
width: '100%',
defaultValue: '',
placeholder: '请输入物料名称',
prefix: '',
suffix: '',
addonBefore: '',
addonAfter: '',
disabled: true,
allowClear: false,
showLabel: true,
required: false,
rules: [],
events: {},
listStyle: '',
isSave: true,
isShow: false,
scan: false,
bordered: true,
isShowAi: false,
tooltipConfig: { visible: false, title: '提示文本' },
prestrainField: '',
}, },
},
{
key: '80fe637a2eaa47a49e96f6e86f0efdda',
title: '物料数量',
dataIndex: 'wlsl',
componentType: 'InputNumber',
defaultValue: 0,
componentProps: {
width: '100%',
min: 0,
step: 1,
disabled: false,
showLabel: true,
controls: true,
required: false,
subTotal: false,
isShow: true,
rules: [],
events: {},
tooltipConfig: { visible: false, title: '提示文本' },
prestrainField: '',
defaultValue: 0,
listStyle: "return 'width:100%'",
},
},
{
key: '1afa69530c154b6f904f1661e82ff9a3',
title: '库存数量',
dataIndex: 'wlkcl',
componentType: 'InputNumber',
defaultValue: 0,
componentProps: {
width: '100%',
min: 0,
step: 1,
disabled: false,
showLabel: true,
controls: true,
required: false,
subTotal: false,
isShow: false,
rules: [],
events: {},
tooltipConfig: { visible: false, title: '提示文本' },
prestrainField: '',
defaultValue: 0,
listStyle: "return 'width:100%'",
},
},
{
key: 'd15b4777d2794944995aa2a085442a6e',
title: '客户标准(%)',
dataIndex: 'khbz',
componentType: 'InputNumber',
defaultValue: 0,
componentProps: {
width: '100%',
min: 0,
max: 100,
step: 1,
disabled: false,
showLabel: true,
controls: true,
required: false,
subTotal: false,
isShow: true,
rules: [],
events: {},
tooltipConfig: { visible: false, title: '提示文本' },
prestrainField: '',
defaultValue: 0,
listStyle: "return 'width:100%'",
},
},
{
key: '1ef860d823ff46c690334dc5eff5a6e4',
title: '内控标准(%)',
dataIndex: 'nkbz',
componentType: 'InputNumber',
defaultValue: 0,
componentProps: {
width: '100%',
min: 0,
max: 100,
step: 1,
disabled: false,
showLabel: true,
controls: true,
required: false,
subTotal: false,
isShow: true,
rules: [],
events: {},
tooltipConfig: { visible: false, title: '提示文本' },
prestrainField: '',
defaultValue: 0,
listStyle: "return 'width:100%'",
},
},
{
key: '40a1e893e8ee496a96d7ed6dbe17e271',
title: '是否投料',
dataIndex: 'sftl',
componentType: 'Switch',
defaultValue: 1,
componentProps: {
span: '',
defaultValue: 1,
checkedChildren: '',
unCheckedChildren: '',
checkedColor: '#1C8DFF',
unCheckedColor: '#bbbdbf',
showLabel: true,
disabled: false,
events: {},
isShow: false,
tooltipConfig: { visible: false, title: '提示文本' },
prestrainField: '',
},
},
{
key: '9230b500d1024028af68ed4ac49bdbd3',
title: '备注',
dataIndex: 'bz',
componentType: 'Input',
defaultValue: '',
componentProps: {
width: '100%',
span: '',
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: '提示文本' },
prestrainField: '',
},
},
{ title: '操作', key: 'action', fixed: 'right', width: '50px' },
],
span: 2,
preloadType: 'dic',
apiConfig: {
path: '/scgl/wlqd/getAllBomItemList',
method: 'GET',
apiId: '1a6a0c6bab2a4aceaf761b0c2c8d17a0',
apiParams: [
{ key: '1', title: 'Query Params', tableInfo: [] },
{ key: '2', title: 'Header', tableInfo: [] },
{ key: '3', title: 'Body' },
], ],
script:
"var sql = 'select *,id as value,wlmc as label from mes_base_bom_item where delete_mark=0';\r\nreturn db.select(sql)",
}, },
itemId: '', ],
dicOptions: [], componentProps: { tabPosition: 'top', size: 'default', type: 'line', isShow: true },
useSelectButton: false,
buttonName: '选择物料',
showLabel: true,
showComponentBorder: true,
showBorder: false,
bordercolor: '#f0f0f0',
bordershowtype: [true, true, true, true],
borderwidth: 1,
showIndex: false,
isShow: true,
multipleHeads: [],
buttonList: [],
topButtonList: [],
isExport: false,
isImport: false,
isDeleteSelected: false,
isListView: false,
viewList: [
{
key: '112f6292bd884006ad872f06aeef4e6f',
label: '物料名称',
field: 'wlmc',
componentType: 'input',
checked: true,
},
{
key: '3988d1cba45a464abbeabce6ed09970e',
label: '物料编号',
field: 'wlbh',
componentType: 'input',
checked: true,
},
{
key: '80fe637a2eaa47a49e96f6e86f0efdda',
label: '物料数量',
field: 'wlsl',
componentType: 'number',
checked: true,
},
{
key: '1afa69530c154b6f904f1661e82ff9a3',
label: '库存数量',
field: 'wlkcl',
componentType: 'number',
checked: true,
},
{
key: 'd15b4777d2794944995aa2a085442a6e',
label: '客户标准(%)',
field: 'khbz',
componentType: 'number',
checked: true,
},
{
key: '1ef860d823ff46c690334dc5eff5a6e4',
label: '内控标准(%)',
field: 'nkbz',
componentType: 'number',
checked: true,
},
{
key: '9230b500d1024028af68ed4ac49bdbd3',
label: '备注',
field: 'bz',
componentType: 'input',
checked: true,
},
{
key: '40a1e893e8ee496a96d7ed6dbe17e271',
label: '是否投料',
field: 'sftl',
componentType: 'switch',
checked: false,
},
{
key: '709b38c05d11468db0db4e6e9168e4f9',
label: '选择物料',
field: 'bomid',
componentType: 'associate-popup',
checked: false,
},
],
isShowAdd: true,
isShowDelete: true,
hasCheckedCol: false,
events: {},
showPagenation: true,
rowResize: false,
},
}, },
], ],
showActionButtonGroup: false, showActionButtonGroup: false,
......
...@@ -57,7 +57,7 @@ export const permissionList = [ ...@@ -57,7 +57,7 @@ export const permissionList = [
disabled: false, disabled: false,
isSaveTable: false, isSaveTable: false,
tableName: '', tableName: '',
fieldName: '选择产品', fieldName: '产品',
fieldId: 'cpid', fieldId: 'cpid',
isSubTable: false, isSubTable: false,
showChildren: true, showChildren: true,
...@@ -176,7 +176,7 @@ export const permissionList = [ ...@@ -176,7 +176,7 @@ export const permissionList = [
isSubTable: true, isSubTable: true,
showChildren: false, showChildren: false,
tableName: 'mesBaseBomItemList', tableName: 'mesBaseBomItemList',
fieldName: '物料项', fieldName: '',
fieldId: 'mesBaseBomItemList', fieldId: 'mesBaseBomItemList',
type: 'form', type: 'form',
key: 'c87fc2d18e24429a819521f35f19137b', key: 'c87fc2d18e24429a819521f35f19137b',
...@@ -190,21 +190,6 @@ export const permissionList = [ ...@@ -190,21 +190,6 @@ export const permissionList = [
isSaveTable: false, isSaveTable: false,
showChildren: false, showChildren: false,
tableName: 'mesBaseBomItemList', tableName: 'mesBaseBomItemList',
fieldName: '选择物料',
fieldId: 'wlmc',
type: 'MultiplePopup',
key: '709b38c05d11468db0db4e6e9168e4f9',
children: [],
},
{
required: true,
view: true,
edit: true,
disabled: false,
isSubTable: false,
isSaveTable: false,
showChildren: false,
tableName: 'mesBaseBomItemList',
fieldName: '物料编号', fieldName: '物料编号',
fieldId: 'wlbh', fieldId: 'wlbh',
type: 'Input', type: 'Input',
...@@ -221,7 +206,7 @@ export const permissionList = [ ...@@ -221,7 +206,7 @@ export const permissionList = [
showChildren: false, showChildren: false,
tableName: 'mesBaseBomItemList', tableName: 'mesBaseBomItemList',
fieldName: '物料名称', fieldName: '物料名称',
fieldId: 'wuLiaoMingChen9398', fieldId: 'wlmc',
type: 'Input', type: 'Input',
key: '112f6292bd884006ad872f06aeef4e6f', key: '112f6292bd884006ad872f06aeef4e6f',
children: [], children: [],
...@@ -316,6 +301,21 @@ export const permissionList = [ ...@@ -316,6 +301,21 @@ export const permissionList = [
key: '9230b500d1024028af68ed4ac49bdbd3', key: '9230b500d1024028af68ed4ac49bdbd3',
children: [], children: [],
}, },
{
required: true,
view: true,
edit: true,
disabled: false,
isSubTable: false,
isSaveTable: false,
showChildren: false,
tableName: 'mesBaseBomItemList',
fieldName: '物料ID',
fieldId: 'wlid',
type: 'Input',
key: '998cedda278d4544ab851536bae4aacc',
children: [],
},
], ],
}, },
]; ];
...@@ -222,3 +222,4 @@ ...@@ -222,3 +222,4 @@
}); });
</script> </script>
\ No newline at end of file
...@@ -3,19 +3,39 @@ import { BasicColumn } from '/@/components/Table'; ...@@ -3,19 +3,39 @@ import { BasicColumn } from '/@/components/Table';
import { uploadApi } from '/@/api/sys/upload'; import { uploadApi } from '/@/api/sys/upload';
export const searchFormSchema: FormSchema[] = [ export const searchFormSchema: FormSchema[] = [
// {
// field: 'jhbh',
// label: '计划编号',
// defaultValue: undefined,
// component: 'Input',
// },
{ {
field: 'ddbh', field: 'jhbh',
label: '订单编号', label: '计划编号',
defaultValue: undefined, defaultValue: undefined,
component: 'Input', component: 'Input',
}, },
{ {
field: 'kh',
label: '客户',
defaultValue: undefined,
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,
},
},
{
field: 'ywzz', field: 'ywzz',
label: '业务组织', label: '业务组织',
defaultValue: undefined, defaultValue: undefined,
...@@ -50,6 +70,19 @@ export const searchFormSchema: FormSchema[] = [ ...@@ -50,6 +70,19 @@ export const searchFormSchema: FormSchema[] = [
export const columns: BasicColumn[] = [ export const columns: BasicColumn[] = [
{ {
resizable: true, resizable: true,
dataIndex: 'jhbh',
title: '计划编号',
componentType: 'auto-code',
fixed: false,
sorter: true,
styleConfig: undefined,
listStyle: undefined,
},
{
resizable: true,
dataIndex: 'ddbh', dataIndex: 'ddbh',
title: '订单编号', title: '订单编号',
componentType: 'input', componentType: 'input',
...@@ -63,9 +96,9 @@ export const columns: BasicColumn[] = [ ...@@ -63,9 +96,9 @@ export const columns: BasicColumn[] = [
{ {
resizable: true, resizable: true,
dataIndex: 'jhbh', dataIndex: 'kh',
title: '计划编号', title: '客户',
componentType: 'auto-code', componentType: 'select',
fixed: false, fixed: false,
sorter: true, sorter: true,
...@@ -76,9 +109,9 @@ export const columns: BasicColumn[] = [ ...@@ -76,9 +109,9 @@ export const columns: BasicColumn[] = [
{ {
resizable: true, resizable: true,
dataIndex: 'kh', dataIndex: 'jhjhrq',
title: '客户', title: '计划交付日期',
componentType: 'select', componentType: 'date',
fixed: false, fixed: false,
sorter: true, sorter: true,
...@@ -236,7 +269,7 @@ export const formProps: FormProps = { ...@@ -236,7 +269,7 @@ export const formProps: FormProps = {
width: '100%', width: '100%',
span: 7, span: 7,
defaultValue: '', defaultValue: '',
placeholder: '请输入客户项目号', placeholder: '请输入客户项目号项目号',
prefix: '', prefix: '',
suffix: '', suffix: '',
addonBefore: '', addonBefore: '',
...@@ -283,7 +316,7 @@ export const formProps: FormProps = { ...@@ -283,7 +316,7 @@ export const formProps: FormProps = {
apiId: '93d735dcb7364a0f8102188ec4d77ac7', apiId: '93d735dcb7364a0f8102188ec4d77ac7',
}, },
dicOptions: [], dicOptions: [],
required: true, required: false,
rules: [], rules: [],
events: {}, events: {},
isShow: true, isShow: true,
...@@ -396,9 +429,9 @@ export const formProps: FormProps = { ...@@ -396,9 +429,9 @@ export const formProps: FormProps = {
componentProps: { componentProps: {
width: '100%', width: '100%',
span: 7, span: 7,
placeholder: '请选择下拉选择客户', placeholder: '',
showLabel: true, showLabel: true,
showSearch: false, showSearch: true,
isMultiple: false, isMultiple: false,
clearable: false, clearable: false,
disabled: false, disabled: false,
...@@ -442,7 +475,7 @@ export const formProps: FormProps = { ...@@ -442,7 +475,7 @@ export const formProps: FormProps = {
componentProps: { componentProps: {
width: '100%', width: '100%',
span: 7, span: 7,
placeholder: '请选择下拉选择业务组织', placeholder: '',
showLabel: true, showLabel: true,
showSearch: false, showSearch: false,
isMultiple: false, isMultiple: false,
...@@ -496,301 +529,420 @@ export const formProps: FormProps = { ...@@ -496,301 +529,420 @@ export const formProps: FormProps = {
}, },
}, },
{ {
key: '24ea4c6631d047a1a8e7c3fe86ab080c', key: '4b60581139c047959bf0ed8f0d5dd55f',
field: '',
label: '', label: '',
field: 'mesProductionPlanProductList', type: 'tab',
type: 'form',
component: 'SubForm',
required: true,
colProps: { span: 24 }, colProps: { span: 24 },
componentProps: { component: 'Tab',
mainKey: 'mesProductionPlanProductList', children: [
columns: [ {
{ span: 24,
key: 'd762849da7e741a7b004c1c81b91593a', name: '物料',
title: '产品ID', prefix: '',
dataIndex: 'cpid', suffix: '',
componentType: 'Input', activeColor: '#1c8dff',
defaultValue: '', folderId: '',
componentProps: { imageUrl: '',
width: '100%', conFolderId: '',
span: '', conImageUrl: '',
defaultValue: '', list: [
placeholder: '请输入产品ID产品ID', {
maxlength: null, key: '24ea4c6631d047a1a8e7c3fe86ab080c',
prefix: '', label: '',
suffix: '', field: 'mesProductionPlanProductList',
addonBefore: '', type: 'form',
addonAfter: '', component: 'SubForm',
disabled: false, required: true,
allowClear: false, colProps: { span: 24 },
showLabel: true, componentProps: {
required: false, mainKey: 'mesProductionPlanProductList',
rules: [], columns: [
events: {}, {
listStyle: '', key: 'd762849da7e741a7b004c1c81b91593a',
isSave: false, title: '产品ID',
isShow: false, dataIndex: 'cpid',
scan: false, componentType: 'Input',
bordered: true, defaultValue: '',
isShowAi: false, componentProps: {
tooltipConfig: { visible: false, title: '提示文本' }, width: '100%',
prestrainField: 'id', span: '',
}, defaultValue: '',
}, placeholder: '',
{ prefix: '',
key: 'cd0038f42bc64c189b3821f0e2061321', suffix: '',
title: '物料编号', addonBefore: '',
dataIndex: 'cpbh', addonAfter: '',
componentType: 'Input', disabled: false,
defaultValue: '', allowClear: false,
componentProps: { showLabel: true,
width: '100%', required: false,
span: '', rules: [],
defaultValue: '', events: {},
placeholder: '请输入物料编号', listStyle: '',
prefix: '', isSave: false,
suffix: '', isShow: false,
addonBefore: '', scan: false,
addonAfter: '', bordered: true,
disabled: false, isShowAi: false,
allowClear: false, tooltipConfig: { visible: false, title: '提示文本' },
showLabel: true, prestrainField: 'id',
required: false, },
rules: [], },
events: {}, {
listStyle: '', key: 'cd0038f42bc64c189b3821f0e2061321',
isSave: false, title: '编号',
isShow: true, dataIndex: 'cpbh',
scan: false, componentType: 'Input',
bordered: true, defaultValue: '',
isShowAi: false, componentProps: {
tooltipConfig: { visible: false, title: '提示文本' }, width: '100%',
prestrainField: 'cpbh', span: '',
}, defaultValue: '',
}, placeholder: '',
{ prefix: '',
key: '6ce71ecb0b6e4d14ae65be4029b179fd', suffix: '',
title: '内部代码', addonBefore: '',
dataIndex: 'nbdm', addonAfter: '',
componentType: 'Input', disabled: false,
defaultValue: '', allowClear: false,
componentProps: { showLabel: true,
width: '100%', required: false,
span: '', rules: [],
defaultValue: '', events: {},
placeholder: '请输入内部代码', listStyle: '',
prefix: '', isSave: false,
suffix: '', isShow: true,
addonBefore: '', scan: false,
addonAfter: '', bordered: true,
disabled: false, isShowAi: false,
allowClear: false, tooltipConfig: { visible: false, title: '提示文本' },
showLabel: true, prestrainField: 'cpbh',
required: false, },
rules: [], },
events: {}, {
listStyle: '', key: 'c8f88cafd17f4655bfbe4643ffe58c9c',
isSave: false, title: '名称',
isShow: true, dataIndex: 'cpmc',
scan: false, componentType: 'Input',
bordered: true, defaultValue: '',
isShowAi: false, componentProps: {
tooltipConfig: { visible: false, title: '提示文本' }, width: '100%',
prestrainField: 'nbdm', span: '',
}, defaultValue: '',
}, placeholder: '',
{ prefix: '',
key: '0c075736898c431ea3f5bca58ec65af6', suffix: '',
title: '型号', addonBefore: '',
dataIndex: 'xh', addonAfter: '',
componentType: 'Input', disabled: false,
defaultValue: '', allowClear: false,
componentProps: { showLabel: true,
width: '100%', required: false,
span: '', rules: [],
defaultValue: '', events: {},
placeholder: '请输入型号', listStyle: '',
prefix: '', isSave: false,
suffix: '', isShow: true,
addonBefore: '', scan: false,
addonAfter: '', bordered: true,
disabled: false, isShowAi: false,
allowClear: false, tooltipConfig: { visible: false, title: '提示文本' },
showLabel: true, prestrainField: 'cpmc',
required: false, },
rules: [], },
events: {}, {
listStyle: '', key: '6ce71ecb0b6e4d14ae65be4029b179fd',
isSave: false, title: '内部代码',
isShow: true, dataIndex: 'nbdm',
scan: false, componentType: 'Input',
bordered: true, defaultValue: '',
isShowAi: false, componentProps: {
tooltipConfig: { visible: false, title: '提示文本' }, width: '100%',
prestrainField: 'xh', span: '',
}, defaultValue: '',
}, placeholder: '请输入内部代码',
{ prefix: '',
key: '697829b6aed54b8cbaa853c62619831a', suffix: '',
title: '合金状态', addonBefore: '',
dataIndex: 'hjzt', addonAfter: '',
componentType: 'Input', disabled: false,
defaultValue: '', allowClear: false,
componentProps: { showLabel: true,
width: '100%', required: false,
span: '', rules: [],
defaultValue: '', events: {},
placeholder: '请输入合金状态', listStyle: '',
prefix: '', isSave: false,
suffix: '', isShow: true,
addonBefore: '', scan: false,
addonAfter: '', bordered: true,
disabled: false, isShowAi: false,
allowClear: false, tooltipConfig: { visible: false, title: '提示文本' },
showLabel: true, prestrainField: 'nbdm',
required: false, },
rules: [], },
events: {}, {
listStyle: '', key: '0c075736898c431ea3f5bca58ec65af6',
isSave: false, title: '型号',
isShow: true, dataIndex: 'xh',
scan: false, componentType: 'Input',
bordered: true, defaultValue: '',
isShowAi: false, componentProps: {
tooltipConfig: { visible: false, title: '提示文本' }, width: '100%',
prestrainField: 'hjzt', span: '',
}, defaultValue: '',
}, placeholder: '请输入型号',
{ prefix: '',
key: '2f56d9297a9c49d59d3b43f62e2946f2', suffix: '',
title: '规格(尺寸)', addonBefore: '',
dataIndex: 'gg', addonAfter: '',
componentType: 'Input', disabled: false,
defaultValue: '', allowClear: false,
componentProps: { showLabel: true,
width: '100%', required: false,
span: '', rules: [],
defaultValue: '', events: {},
placeholder: '请输入规格(尺寸)', listStyle: '',
prefix: '', isSave: false,
suffix: '', isShow: true,
addonBefore: '', scan: false,
addonAfter: '', bordered: true,
disabled: false, isShowAi: false,
allowClear: false, tooltipConfig: { visible: false, title: '提示文本' },
showLabel: true, prestrainField: 'xh',
required: false, },
rules: [], },
events: {}, {
listStyle: '', key: '697829b6aed54b8cbaa853c62619831a',
isSave: false, title: '合金状态',
isShow: true, dataIndex: 'hjzt',
scan: false, componentType: 'Input',
bordered: true, defaultValue: '',
isShowAi: false, componentProps: {
tooltipConfig: { visible: false, title: '提示文本' }, width: '100%',
prestrainField: 'gg', span: '',
}, defaultValue: '',
}, placeholder: '请输入合金状态',
{ prefix: '',
key: '6a93c6d77ce1428c9fbba62a02afd6d0', suffix: '',
title: '数量', addonBefore: '',
dataIndex: 'sl', addonAfter: '',
componentType: 'InputNumber', disabled: false,
defaultValue: 0, allowClear: false,
componentProps: { showLabel: true,
width: '100%', required: false,
span: '', rules: [],
defaultValue: 0, events: {},
min: 0, listStyle: '',
step: 1, isSave: false,
disabled: false, isShow: true,
showLabel: true, scan: false,
controls: true, bordered: true,
required: false, isShowAi: false,
subTotal: false, tooltipConfig: { visible: false, title: '提示文本' },
isShow: true, prestrainField: 'hjzt',
rules: [], },
events: {}, },
tooltipConfig: { visible: false, title: '提示文本' }, {
prestrainField: '', key: '2f56d9297a9c49d59d3b43f62e2946f2',
listStyle: "return 'width:100%'", title: '规格(尺寸)',
}, dataIndex: 'gg',
}, componentType: 'Input',
{ defaultValue: '',
key: '3b80cb19086e49e1a746cf9ace3f938e', componentProps: {
title: '质量/KG', width: '100%',
dataIndex: 'zl', span: '',
componentType: 'InputNumber', defaultValue: '',
defaultValue: 0, placeholder: '请输入规格(尺寸)',
componentProps: { prefix: '',
width: '100%', suffix: '',
span: '', addonBefore: '',
defaultValue: 0, addonAfter: '',
min: 0, disabled: false,
step: 0.1, allowClear: false,
disabled: false, showLabel: true,
showLabel: true, required: false,
controls: true, rules: [],
required: false, events: {},
subTotal: false, listStyle: '',
isShow: true, isSave: false,
rules: [], isShow: true,
events: {}, scan: false,
tooltipConfig: { visible: false, title: '提示文本' }, bordered: true,
listStyle: "return 'width:100%'", isShowAi: false,
tooltipConfig: { visible: false, title: '提示文本' },
prestrainField: 'gg',
},
},
{
key: '6a93c6d77ce1428c9fbba62a02afd6d0',
title: '数量',
dataIndex: 'sl',
componentType: 'InputNumber',
defaultValue: 0,
componentProps: {
width: '100%',
span: '',
defaultValue: 0,
min: 0,
step: 1,
disabled: false,
showLabel: true,
controls: true,
required: false,
subTotal: false,
isShow: true,
rules: [],
events: {},
tooltipConfig: { visible: false, title: '提示文本' },
prestrainField: '',
listStyle: "return 'width:100%'",
},
},
{
key: '3b80cb19086e49e1a746cf9ace3f938e',
title: '质量/KG',
dataIndex: 'zl',
componentType: 'InputNumber',
defaultValue: 0,
componentProps: {
width: '100%',
span: '',
defaultValue: 0,
min: 0,
step: 0.1,
disabled: false,
showLabel: true,
controls: true,
required: false,
subTotal: false,
isShow: true,
rules: [],
events: {},
tooltipConfig: { visible: false, title: '提示文本' },
listStyle: "return 'width:100%'",
},
},
{ title: '操作', key: 'action', fixed: 'right', width: '50px' },
],
span: '24',
preloadType: '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: [
{ tableTitle: '产品编号', name: 'cpbh' },
{ tableTitle: '产品名称', name: 'cpmc' },
{ name: 'nbdm', tableTitle: '内部代码' },
{ name: 'gg', tableTitle: '规格' },
{ tableTitle: '型号', name: 'xh' },
],
},
itemId: '',
dicOptions: [],
useSelectButton: true,
buttonName: '选择',
showLabel: true,
showComponentBorder: true,
showBorder: false,
bordercolor: '#f0f0f0',
bordershowtype: [true, true, true, true],
borderwidth: 1,
showIndex: true,
isShow: true,
multipleHeads: [],
buttonList: [],
topButtonList: [],
isExport: false,
isImport: false,
isDeleteSelected: false,
isListView: false,
viewList: [],
isShowAdd: false,
isShowDelete: true,
hasCheckedCol: false,
events: {},
showPagenation: true,
widths: [
{
key: 'd762849da7e741a7b004c1c81b91593a',
name: '产品ID',
bindField: 'cpid',
resizable: false,
isEdit: false,
},
{
key: 'cd0038f42bc64c189b3821f0e2061321',
name: '编号',
bindField: 'cpbh',
resizable: false,
isEdit: true,
},
{
key: 'c8f88cafd17f4655bfbe4643ffe58c9c',
name: '名称',
bindField: 'cpmc',
resizable: false,
isEdit: true,
},
{
key: '6ce71ecb0b6e4d14ae65be4029b179fd',
name: '内部代码',
bindField: 'nbdm',
resizable: false,
isEdit: false,
},
{
key: '0c075736898c431ea3f5bca58ec65af6',
name: '型号',
bindField: 'xh',
resizable: false,
isEdit: false,
},
{
key: '697829b6aed54b8cbaa853c62619831a',
name: '合金状态',
bindField: 'hjzt',
resizable: false,
isEdit: false,
},
{
key: '2f56d9297a9c49d59d3b43f62e2946f2',
name: '规格(尺寸)',
bindField: 'gg',
resizable: false,
isEdit: false,
},
{
key: '6a93c6d77ce1428c9fbba62a02afd6d0',
name: '数量',
bindField: 'sl',
resizable: false,
isEdit: false,
},
{
key: '3b80cb19086e49e1a746cf9ace3f938e',
name: '质量/KG',
bindField: 'zl',
resizable: false,
isEdit: false,
},
],
},
}, },
},
{ title: '操作', key: 'action', fixed: 'right', width: '50px' },
],
span: '24',
preloadType: '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: [
{ tableTitle: '产品编号', name: 'cpbh' },
{ tableTitle: '产品名称', name: 'cpmc' },
{ name: 'nbdm', tableTitle: '内部代码' },
{ name: 'gg', tableTitle: '规格' },
{ tableTitle: '型号', name: 'xh' },
], ],
}, },
itemId: '', ],
dicOptions: [], componentProps: { tabPosition: 'top', size: 'default', type: 'line', isShow: true },
useSelectButton: true,
buttonName: '选择产品',
showLabel: true,
showComponentBorder: true,
showBorder: false,
bordercolor: '#f0f0f0',
bordershowtype: [true, true, true, true],
borderwidth: 1,
showIndex: false,
isShow: true,
multipleHeads: [],
buttonList: [],
topButtonList: [],
isExport: false,
isImport: false,
isDeleteSelected: false,
isListView: false,
viewList: [],
isShowAdd: false,
isShowDelete: true,
hasCheckedCol: false,
events: {},
showPagenation: true,
},
}, },
{ {
key: 'f7ae7fe08ec74cf6b91cd3cd35cfeaaf', key: 'f7ae7fe08ec74cf6b91cd3cd35cfeaaf',
......
...@@ -33,7 +33,7 @@ export const permissionList = [ ...@@ -33,7 +33,7 @@ export const permissionList = [
defaultValue: '', defaultValue: '',
}, },
{ {
required: true, required: false,
view: true, view: true,
edit: true, edit: true,
disabled: false, disabled: false,
...@@ -169,7 +169,7 @@ export const permissionList = [ ...@@ -169,7 +169,7 @@ export const permissionList = [
isSaveTable: false, isSaveTable: false,
showChildren: false, showChildren: false,
tableName: 'mesProductionPlanProductList', tableName: 'mesProductionPlanProductList',
fieldName: '物料编号', fieldName: '编号',
fieldId: 'cpbh', fieldId: 'cpbh',
type: 'Input', type: 'Input',
key: 'cd0038f42bc64c189b3821f0e2061321', key: 'cd0038f42bc64c189b3821f0e2061321',
...@@ -184,6 +184,21 @@ export const permissionList = [ ...@@ -184,6 +184,21 @@ export const permissionList = [
isSaveTable: false, isSaveTable: false,
showChildren: false, showChildren: false,
tableName: 'mesProductionPlanProductList', tableName: 'mesProductionPlanProductList',
fieldName: '名称',
fieldId: 'cpmc',
type: 'Input',
key: 'c8f88cafd17f4655bfbe4643ffe58c9c',
children: [],
},
{
required: true,
view: true,
edit: true,
disabled: false,
isSubTable: false,
isSaveTable: false,
showChildren: false,
tableName: 'mesProductionPlanProductList',
fieldName: '内部代码', fieldName: '内部代码',
fieldId: 'nbdm', fieldId: 'nbdm',
type: 'Input', type: 'Input',
......
<template> <template>
<ResizePageWrapper :hasLeft="false"> <ResizePageWrapper :hasLeft="false">
<template #resizeRight> <template #resizeRight>
...@@ -26,28 +27,45 @@ ...@@ -26,28 +27,45 @@
</template> </template>
</template> </template>
<template #bodyCell="{ column, record }"> <template #bodyCell="{ column, record }">
<template v-if="column.dataIndex === 'action'"> <template v-if="column.dataIndex === 'action'">
<TableAction
<TableAction
:actions="getLessActions(record)" :actions="getLessActions(record)"
:dropDownActions="getMoreActions(record)" :dropDownActions="getMoreActions(record)"
/> />
</template> </template>
<template v-else-if="column.dataIndex && column?.listStyle"> <template v-else-if="column.dataIndex && column?.listStyle">
<span :style="executeListStyle(getValue(record, column, 'style'), column?.listStyle)">{{ <span :style="executeListStyle(getValue(record, column, 'style'), column?.listStyle)">{{
getValue(record, column, 'value') getValue(record, column, 'value')
}}</span> }}</span>
</template> </template>
</template> </template>
</BasicTable> </BasicTable>
</template> </template>
<ScjhModal @register="registerModal" @success="handleFormSuccess" @cancel="handleFormCancel"/>
</ResizePageWrapper>
<ScjhModal @register="registerModal" @success="handleFormSuccess" @cancel="handleFormCancel" />
</ResizePageWrapper>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { ref, computed, provide, Ref, createVNode } from 'vue'; import { ref, computed,provide,Ref, createVNode,
} from 'vue';
import { Modal } from 'ant-design-vue'; import { Modal } from 'ant-design-vue';
import { ExclamationCircleOutlined } from '@ant-design/icons-vue'; import { ExclamationCircleOutlined } from '@ant-design/icons-vue';
import { BasicTable, useTable, TableAction, ActionItem } from '/@/components/Table'; import { BasicTable, useTable, TableAction, ActionItem } from '/@/components/Table';
...@@ -60,20 +78,46 @@ ...@@ -60,20 +78,46 @@
import { useMessage } from '/@/hooks/web/useMessage'; import { useMessage } from '/@/hooks/web/useMessage';
import { useI18n } from '/@/hooks/web/useI18n'; import { useI18n } from '/@/hooks/web/useI18n';
import { usePermission } from '/@/hooks/web/usePermission'; import { usePermission } from '/@/hooks/web/usePermission';
import CustomButtonModal from '/@/components/Form/src/components/CustomButtonModal.vue'; import CustomButtonModal from '/@/components/Form/src/components/CustomButtonModal.vue';
import { executeListStyle, getValue } from '/@/hooks/web/useListStyle'; //列表样式配置 import { executeListStyle, getValue } from '/@/hooks/web/useListStyle';//列表样式配置
import { useRouter } from 'vue-router'; import { useRouter } from 'vue-router';
import { useModal } from '/@/components/Modal'; import { useModal } from '/@/components/Modal';
import ScjhModal from './components/ScjhModal.vue'; import ScjhModal from './components/ScjhModal.vue';
import { searchFormSchema, columns } from './components/config';
import { searchFormSchema, columns } from './components/config';
import Icon from '/@/components/Icon/index'; import Icon from '/@/components/Icon/index';
const listSpliceNum = ref(3); //操作列最先展示几个
const listSpliceNum = ref(3); //操作列最先展示几个
import { useConcurrentLock } from '/@/hooks/web/useConcurrentLock'; import { useConcurrentLock } from '/@/hooks/web/useConcurrentLock';
const pageParamsInfo = ref<any>({}); const pageParamsInfo = ref<any>({});
...@@ -91,7 +135,12 @@ ...@@ -91,7 +135,12 @@
const filterColumns = filterColumnAuth(columns); const filterColumns = filterColumnAuth(columns);
const tableRef = ref(); const tableRef = ref();
//展示在列表内的按钮 //展示在列表内的按钮
const actionButtons = ref<string[]>(['view', 'edit', 'delete']); const actionButtons = ref<string[]>(['view', 'edit', 'delete']);
const buttonConfigs = computed(() => { const buttonConfigs = computed(() => {
...@@ -161,13 +210,19 @@ ...@@ -161,13 +210,19 @@
}; };
const { currentRoute } = useRouter(); const { currentRoute } = useRouter();
const formIdComputedRef = computed(() => currentRoute.value.meta.formId as string); const formIdComputedRef = computed(() => currentRoute.value.meta.formId as string);
provide<Ref<string>>('currentFormId', formIdComputedRef); provide<Ref<string>>('currentFormId', formIdComputedRef);
const selectedKeys = ref<string[]>([]); const selectedKeys = ref<string[]>([]);
const selectedRowsData = ref<any[]>([]); const selectedRowsData = ref<any[]>([]);
const [registerModal, { openModal }] = useModal(); const [registerModal, { openModal }] = useModal();
const [registerTable, { reload }] = useTable({ const [registerTable, { reload }] = useTable({
...@@ -184,18 +239,25 @@ ...@@ -184,18 +239,25 @@
fieldMapToTime: [], fieldMapToTime: [],
showResetButton: false, showResetButton: false,
}, },
bordered: false, bordered:false,
beforeFetch: (params) => { beforeFetch: (params) => {
pageParamsInfo.value = { ...params, FormId: formIdComputedRef.value, PK: 'id' }; pageParamsInfo.value = {...params, FormId: formIdComputedRef.value,PK: 'id' }
return pageParamsInfo.value; return pageParamsInfo.value;
}, },
afterFetch: (res) => { afterFetch: (res) => {
selectedKeys.value = []; selectedKeys.value = [];
selectedRowsData.value = []; selectedRowsData.value = [];
}, },
useSearchForm: true, useSearchForm: true,
showTableSetting: true, showTableSetting: true,
striped: false, striped: false,
actionColumn: { actionColumn: {
width: 195, width: 195,
...@@ -207,44 +269,53 @@ ...@@ -207,44 +269,53 @@
size: false, size: false,
}, },
customRow, customRow,
isAdvancedQuery: false, isAdvancedQuery: false,
querySelectOption: JSON.stringify(searchFormSchema), querySelectOption: JSON.stringify(searchFormSchema),
objectId: formIdComputedRef.value, ////系统表单formId,自定义表单releaseId的id值 objectId: formIdComputedRef.value, ////系统表单formId,自定义表单releaseId的id值
}); });
function buttonClick(code) { function buttonClick(code) {
btnEvent[code](); btnEvent[code]();
} }
function handleAdd() { function handleAdd() {
openModal(true, { isUpdate: false }); openModal(true, { isUpdate: false });
} }
async function handleEdit(record: Recordable) { async function handleEdit(record: Recordable) {
let field = 'id'; let field = 'id';
try { try {
let hasIn = handleHasEnableLocke(buttonConfigs.value, 'edit'); let hasIn = handleHasEnableLocke(buttonConfigs.value, 'edit');
if (hasIn) { if (hasIn) {
let res = await handleOpenFormEnableLockeData(record[field], formIdComputedRef.value); let res = await handleOpenFormEnableLockeData(record[field], formIdComputedRef.value);
if (res !== null) { if (res !== null) {
return; return;
} }
} }
let info = { let info = {
id: record[field], id: record[field],
isUpdate: true, isUpdate: true,
};
};
openModal(true, info);
} catch (error) {} openModal(true, info);
} catch (error) {}
} }
function handleDelete(record: Recordable) { function handleDelete(record: Recordable) {
deleteList([record.id]); deleteList([record.id]);
} }
function deleteList(ids) { function deleteList(ids) {
Modal.confirm({ Modal.confirm({
title: '提示信息', title: '提示信息',
...@@ -264,14 +335,19 @@ ...@@ -264,14 +335,19 @@
onCancel() {}, onCancel() {},
}); });
} }
function onSelectChange(selectedRowKeys: [], selectedRows) { function onSelectChange(selectedRowKeys: [], selectedRows) {
selectedKeys.value = selectedRowKeys; selectedKeys.value = selectedRowKeys;
selectedRowsData.value = selectedRows; selectedRowsData.value = selectedRows;
} }
function customRow(record: Recordable) { function customRow(record: Recordable) {
return { return {
onClick: () => { onClick: () => {
let selectedRowKeys = [...selectedKeys.value]; let selectedRowKeys = [...selectedKeys.value];
if (selectedRowKeys.indexOf(record.id) >= 0) { if (selectedRowKeys.indexOf(record.id) >= 0) {
...@@ -289,14 +365,18 @@ ...@@ -289,14 +365,18 @@
}, },
}; };
} }
function handleSuccess() { function handleSuccess() {
selectedKeys.value = [];
selectedRowsData.value = [];
selectedKeys.value = [];
selectedRowsData.value = [];
reload(); reload();
} }
function handleFormSuccess() {
function handleFormSuccess() {
handleSuccess(); handleSuccess();
handleCloseFormEnableLocke(buttonConfigs.value, 'edit'); handleCloseFormEnableLocke(buttonConfigs.value, 'edit');
} }
...@@ -304,13 +384,14 @@ ...@@ -304,13 +384,14 @@
handleCloseFormEnableLocke(buttonConfigs.value, 'edit'); handleCloseFormEnableLocke(buttonConfigs.value, 'edit');
} }
function handleView(record: Recordable) { function handleView(record: Recordable) {
let info = { let info={
isView: true, isView: true,
id: record.id, id: record.id,
}; };
openModal(true, info); openModal(true, info);
} }
function handleXiafa(record: Recordable) { function handleXiafa(record: Recordable) {
...@@ -348,16 +429,16 @@ ...@@ -348,16 +429,16 @@
let list = getActions(record); let list = getActions(record);
return list.slice(listSpliceNum.value); return list.slice(listSpliceNum.value);
} }
function getActions(record: Recordable): ActionItem[] { function getActions(record: Recordable):ActionItem[] {
record.isCanEdit = false; record.isCanEdit = false;
let actionsList: ActionItem[] = []; let actionsList: ActionItem[] = [];
actionButtonConfig.value?.map((button) => { actionButtonConfig.value?.map((button) => {
if (!record?.workflowData?.processId) { if (!record?.workflowData?.processId) {
record.isCanEdit = true; record.isCanEdit = true;
actionsList.push({ actionsList.push({
...button, ...button,
auth: `scjh:${button.code}`, auth: `scjh:${button.code}`,
label: button?.name, label: button?.name,
color: button.code === 'delete' ? 'error' : undefined, color: button.code === 'delete' ? 'error' : undefined,
...@@ -370,22 +451,29 @@ ...@@ -370,22 +451,29 @@
label: button?.name, label: button?.name,
onClick: btnEvent[button.code]?.bind(null, record), onClick: btnEvent[button.code]?.bind(null, record),
}); });
} }
} }
}); });
return actionsList; return actionsList;
} }
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
:deep(.ant-table-selection-col) { :deep(.ant-table-selection-col) {
width: 50px; width: 50px;
} }
.show { .show{
display: flex; display: flex;
} }
.hide { .hide{
display: none !important; display: none !important;
} }
</style> </style>
...@@ -854,7 +854,7 @@ export const formProps: FormProps = { ...@@ -854,7 +854,7 @@ export const formProps: FormProps = {
disabled: false, disabled: false,
showLabel: true, showLabel: true,
controls: true, controls: true,
required: false, required: true,
subTotal: false, subTotal: false,
isShow: true, isShow: true,
rules: [], rules: [],
......
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