Commit 0cc7187d by 金民

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

parents 592f830c 4c5dc717
......@@ -7,8 +7,6 @@ export interface MesBaseBomPageParams extends BasicPageParams {
bommc: string;
cpid: string;
sfyy: string;
}
/**
......@@ -19,15 +17,17 @@ export interface MesBaseBomPageModel {
bommc: string;
bomsl: string;
bombb: string;
cpmc: string;
cpbh: string;
cpgg: string;
cpxh: string;
bomsl: string;
bombb: string;
}
/**
......@@ -86,6 +86,8 @@ export interface MesBaseBomModel {
modifyUserId: string;
sjbom: string;
mesBaseBomItemList?: MesBaseBomItemModel;
}
......@@ -99,6 +101,8 @@ export interface MesBaseBomItemModel {
bomid: string;
wlid: string;
wlbh: string;
wlmc: string;
......
......@@ -6,9 +6,9 @@ import { BasicPageParams, BasicFetchResult } from '/@/api/model/baseModel';
export interface MesProductionPlanPageParams extends BasicPageParams {
jhbh: string;
ddbh: string;
kh: string;
ssgs: string;
ywzz: string;
zt: string;
}
......@@ -19,13 +19,15 @@ export interface MesProductionPlanPageParams extends BasicPageParams {
export interface MesProductionPlanPageModel {
id: string;
ddbh: string;
jhbh: string;
ddbh: string;
kh: string;
ssgs: string;
jhjhrq: string;
ywzz: string;
zt: string;
}
......@@ -107,6 +109,8 @@ export interface MesProductionPlanProductModel {
cpbh: string;
cpmc: string;
nbdm: string;
hjzt: string;
......
......@@ -595,7 +595,7 @@ export const formProps: FormProps = {
{ name: 'category_id', tableTitle: '工序类别' },
{ name: 'id', tableTitle: 'ID' },
{ tableTitle: '采集方案ID', name: 'collection_scheme_id' },
{ name: 'rated_working_hours', tableTitle: '额工时定' },
{ name: 'rated_working_hours', tableTitle: '额定工时' },
],
},
itemId: '',
......
......@@ -10,7 +10,7 @@ export const searchFormSchema: FormSchema[] = [
},
{
field: 'cpid',
label: '选择产品',
label: '产品',
defaultValue: undefined,
component: 'XjrSelect',
componentProps: {
......@@ -68,25 +68,6 @@ export const searchFormSchema: FormSchema[] = [
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[] = [
......@@ -105,21 +86,21 @@ export const columns: BasicColumn[] = [
{
resizable: true,
dataIndex: 'bomsl',
title: '物料数量',
componentType: 'number',
dataIndex: 'cpmc',
title: '产品名称',
componentType: 'input',
fixed: false,
sorter: true,
styleConfig: undefined,
listStyle: undefined,
listStyle: '',
},
{
resizable: true,
dataIndex: 'bombb',
title: '物料版本',
dataIndex: 'cpbh',
title: '产品编号',
componentType: 'input',
fixed: false,
......@@ -131,8 +112,8 @@ export const columns: BasicColumn[] = [
{
resizable: true,
dataIndex: 'cpmc',
title: '产品名称',
dataIndex: 'cpgg',
title: '产品规格',
componentType: 'input',
fixed: false,
......@@ -144,8 +125,8 @@ export const columns: BasicColumn[] = [
{
resizable: true,
dataIndex: 'cpgg',
title: '产品规格',
dataIndex: 'cpxh',
title: '产品型号',
componentType: 'input',
fixed: false,
......@@ -157,8 +138,21 @@ export const columns: BasicColumn[] = [
{
resizable: true,
dataIndex: 'cpxh',
title: '产品型号',
dataIndex: 'bomsl',
title: '物料数量',
componentType: 'number',
fixed: false,
sorter: true,
styleConfig: undefined,
listStyle: undefined,
},
{
resizable: true,
dataIndex: 'bombb',
title: '物料版本',
componentType: 'input',
fixed: false,
......@@ -360,7 +354,7 @@ export const formProps: FormProps = {
{
key: 'c42ef62f38e1445b89e5c3362ffd3af2',
field: 'cpid',
label: '选择产品',
label: '产品',
type: 'associate-popup',
component: 'MultiplePopup',
colProps: { span: 24 },
......@@ -368,7 +362,7 @@ export const formProps: FormProps = {
popupType: 'associate',
width: '100%',
span: 7,
placeholder: '请选择产品选择',
placeholder: '请产品选择',
showLabel: true,
disabled: false,
datasourceType: 'api',
......@@ -448,7 +442,7 @@ export const formProps: FormProps = {
width: '100%',
span: 7,
defaultValue: '',
placeholder: '请输入产品编号',
placeholder: '',
prefix: '',
suffix: '',
addonBefore: '',
......@@ -486,7 +480,7 @@ export const formProps: FormProps = {
width: '100%',
span: 7,
defaultValue: '',
placeholder: '请输入产品名称',
placeholder: '',
prefix: '',
suffix: '',
addonBefore: '',
......@@ -524,7 +518,7 @@ export const formProps: FormProps = {
width: '100%',
span: 7,
defaultValue: '',
placeholder: '请输入产品规格',
placeholder: '',
prefix: '',
suffix: '',
addonBefore: '',
......@@ -562,7 +556,7 @@ export const formProps: FormProps = {
width: '100%',
span: 7,
defaultValue: '',
placeholder: '请输入产品型号',
placeholder: '',
prefix: '',
suffix: '',
addonBefore: '',
......@@ -663,8 +657,27 @@ export const formProps: FormProps = {
},
},
{
key: '2d0c8112a86543e0ac71468e261f0a55',
field: '',
label: '',
type: 'tab',
colProps: { span: 24 },
component: 'Tab',
children: [
{
span: 24,
name: '物料',
prefix: '',
suffix: '',
activeColor: '#1c8dff',
folderId: '',
imageUrl: '',
conFolderId: '',
conImageUrl: '',
list: [
{
key: 'c87fc2d18e24429a819521f35f19137b',
label: '物料项',
label: '',
field: 'mesBaseBomItemList',
type: 'form',
component: 'SubForm',
......@@ -674,63 +687,6 @@ export const formProps: FormProps = {
mainKey: 'mesBaseBomItemList',
columns: [
{
key: '709b38c05d11468db0db4e6e9168e4f9',
title: '选择物料',
dataIndex: 'wlmc',
componentType: 'MultiplePopup',
componentProps: {
popupType: 'associate',
width: '100%',
placeholder: '请选择物料选择',
showLabel: true,
disabled: false,
datasourceType: 'api',
labelField: 'label',
valueField: 'value',
pageSize: 10,
assoTitle: '物料列表',
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',
tableTitle: '物料编号',
bindField: 'wlbh',
show: true,
width: 150,
component: '3988d1cba45a464abbeabce6ed09970e',
bindTable: 'mes_base_bom_item',
},
{
name: 'cpmc',
tableTitle: '物料名称',
bindField: 'wlmc',
show: true,
width: 150,
component: '112f6292bd884006ad872f06aeef4e6f',
bindTable: 'mes_base_bom_item',
},
],
},
dicOptions: [],
required: true,
rules: [],
events: {},
isShow: true,
tooltipConfig: { visible: false, title: '提示文本' },
prestrainField: 'name',
},
},
{
key: '3988d1cba45a464abbeabce6ed09970e',
title: '物料编号',
dataIndex: 'wlbh',
......@@ -739,7 +695,7 @@ export const formProps: FormProps = {
componentProps: {
width: '100%',
defaultValue: '',
placeholder: '请输入物料编号',
placeholder: '',
prefix: '',
suffix: '',
addonBefore: '',
......@@ -757,37 +713,37 @@ export const formProps: FormProps = {
bordered: true,
isShowAi: false,
tooltipConfig: { visible: false, title: '提示文本' },
prestrainField: '',
prestrainField: 'cpbh',
},
},
{
key: '112f6292bd884006ad872f06aeef4e6f',
title: '物料名称',
dataIndex: 'wuLiaoMingChen9398',
dataIndex: 'wlmc',
componentType: 'Input',
defaultValue: '',
componentProps: {
width: '100%',
defaultValue: '',
placeholder: '请输入物料名称',
placeholder: '',
prefix: '',
suffix: '',
addonBefore: '',
addonAfter: '',
disabled: true,
disabled: false,
allowClear: false,
showLabel: true,
required: false,
rules: [],
events: {},
listStyle: '',
isSave: true,
isShow: false,
isSave: false,
isShow: true,
scan: false,
bordered: true,
isShowAi: false,
tooltipConfig: { visible: false, title: '提示文本' },
prestrainField: '',
prestrainField: 'cpmc',
},
},
{
......@@ -829,7 +785,7 @@ export const formProps: FormProps = {
controls: true,
required: false,
subTotal: false,
isShow: false,
isShow: true,
rules: [],
events: {},
tooltipConfig: { visible: false, title: '提示文本' },
......@@ -904,7 +860,7 @@ export const formProps: FormProps = {
showLabel: true,
disabled: false,
events: {},
isShow: false,
isShow: true,
tooltipConfig: { visible: false, title: '提示文本' },
prestrainField: '',
},
......@@ -940,33 +896,80 @@ export const formProps: FormProps = {
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: 'dic',
preloadType: 'api',
apiConfig: {
path: '/scgl/wlqd/getAllBomItemList',
path: '/scgl/scjh/getAllProduct',
method: 'GET',
apiId: '1a6a0c6bab2a4aceaf761b0c2c8d17a0',
apiId: 'f4fbb57f2f18425e97918a031c8aa7d8',
apiParams: [
{ key: '1', title: 'Query Params', tableInfo: [] },
{
key: '1',
title: 'Query Params',
tableInfo: [
{
name: 'keyword',
value: '',
required: false,
dataType: 'String',
bindType: '',
},
],
},
{ 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)",
"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: false,
buttonName: '选择物料',
useSelectButton: true,
buttonName: '选择',
showLabel: true,
showComponentBorder: true,
showBorder: false,
bordercolor: '#f0f0f0',
bordershowtype: [true, true, true, true],
borderwidth: 1,
showIndex: false,
showIndex: true,
isShow: true,
multipleHeads: [],
buttonList: [],
......@@ -1040,13 +1043,76 @@ export const formProps: FormProps = {
checked: false,
},
],
isShowAdd: true,
isShowAdd: false,
isShowDelete: true,
hasCheckedCol: false,
events: {},
showPagenation: true,
rowResize: false,
widths: [
{
key: '3988d1cba45a464abbeabce6ed09970e',
name: '物料编号',
bindField: 'wlbh',
resizable: false,
isEdit: true,
},
{
key: '112f6292bd884006ad872f06aeef4e6f',
name: '物料名称',
bindField: 'wlmc',
resizable: false,
isEdit: true,
},
{
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,
},
],
},
},
],
},
],
componentProps: { tabPosition: 'top', size: 'default', type: 'line', isShow: true },
},
],
showActionButtonGroup: false,
......
......@@ -57,7 +57,7 @@ export const permissionList = [
disabled: false,
isSaveTable: false,
tableName: '',
fieldName: '选择产品',
fieldName: '产品',
fieldId: 'cpid',
isSubTable: false,
showChildren: true,
......@@ -176,7 +176,7 @@ export const permissionList = [
isSubTable: true,
showChildren: false,
tableName: 'mesBaseBomItemList',
fieldName: '物料项',
fieldName: '',
fieldId: 'mesBaseBomItemList',
type: 'form',
key: 'c87fc2d18e24429a819521f35f19137b',
......@@ -190,21 +190,6 @@ export const permissionList = [
isSaveTable: false,
showChildren: false,
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: '物料编号',
fieldId: 'wlbh',
type: 'Input',
......@@ -221,7 +206,7 @@ export const permissionList = [
showChildren: false,
tableName: 'mesBaseBomItemList',
fieldName: '物料名称',
fieldId: 'wuLiaoMingChen9398',
fieldId: 'wlmc',
type: 'Input',
key: '112f6292bd884006ad872f06aeef4e6f',
children: [],
......@@ -316,6 +301,21 @@ export const permissionList = [
key: '9230b500d1024028af68ed4ac49bdbd3',
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 @@
});
</script>
\ No newline at end of file
......@@ -3,19 +3,39 @@ import { BasicColumn } from '/@/components/Table';
import { uploadApi } from '/@/api/sys/upload';
export const searchFormSchema: FormSchema[] = [
// {
// field: 'jhbh',
// label: '计划编号',
// defaultValue: undefined,
// component: 'Input',
// },
{
field: 'ddbh',
label: '订单编号',
field: 'jhbh',
label: '计划编号',
defaultValue: undefined,
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',
label: '业务组织',
defaultValue: undefined,
......@@ -50,6 +70,19 @@ export const searchFormSchema: FormSchema[] = [
export const columns: BasicColumn[] = [
{
resizable: true,
dataIndex: 'jhbh',
title: '计划编号',
componentType: 'auto-code',
fixed: false,
sorter: true,
styleConfig: undefined,
listStyle: undefined,
},
{
resizable: true,
dataIndex: 'ddbh',
title: '订单编号',
componentType: 'input',
......@@ -63,9 +96,9 @@ export const columns: BasicColumn[] = [
{
resizable: true,
dataIndex: 'jhbh',
title: '计划编号',
componentType: 'auto-code',
dataIndex: 'kh',
title: '客户',
componentType: 'select',
fixed: false,
sorter: true,
......@@ -76,9 +109,9 @@ export const columns: BasicColumn[] = [
{
resizable: true,
dataIndex: 'kh',
title: '客户',
componentType: 'select',
dataIndex: 'jhjhrq',
title: '计划交付日期',
componentType: 'date',
fixed: false,
sorter: true,
......@@ -236,7 +269,7 @@ export const formProps: FormProps = {
width: '100%',
span: 7,
defaultValue: '',
placeholder: '请输入客户项目号',
placeholder: '请输入客户项目号项目号',
prefix: '',
suffix: '',
addonBefore: '',
......@@ -283,7 +316,7 @@ export const formProps: FormProps = {
apiId: '93d735dcb7364a0f8102188ec4d77ac7',
},
dicOptions: [],
required: true,
required: false,
rules: [],
events: {},
isShow: true,
......@@ -396,9 +429,9 @@ export const formProps: FormProps = {
componentProps: {
width: '100%',
span: 7,
placeholder: '请选择下拉选择客户',
placeholder: '',
showLabel: true,
showSearch: false,
showSearch: true,
isMultiple: false,
clearable: false,
disabled: false,
......@@ -442,7 +475,7 @@ export const formProps: FormProps = {
componentProps: {
width: '100%',
span: 7,
placeholder: '请选择下拉选择业务组织',
placeholder: '',
showLabel: true,
showSearch: false,
isMultiple: false,
......@@ -496,6 +529,25 @@ export const formProps: FormProps = {
},
},
{
key: '4b60581139c047959bf0ed8f0d5dd55f',
field: '',
label: '',
type: 'tab',
colProps: { span: 24 },
component: 'Tab',
children: [
{
span: 24,
name: '物料',
prefix: '',
suffix: '',
activeColor: '#1c8dff',
folderId: '',
imageUrl: '',
conFolderId: '',
conImageUrl: '',
list: [
{
key: '24ea4c6631d047a1a8e7c3fe86ab080c',
label: '',
field: 'mesProductionPlanProductList',
......@@ -516,8 +568,7 @@ export const formProps: FormProps = {
width: '100%',
span: '',
defaultValue: '',
placeholder: '请输入产品ID产品ID',
maxlength: null,
placeholder: '',
prefix: '',
suffix: '',
addonBefore: '',
......@@ -540,7 +591,7 @@ export const formProps: FormProps = {
},
{
key: 'cd0038f42bc64c189b3821f0e2061321',
title: '物料编号',
title: '编号',
dataIndex: 'cpbh',
componentType: 'Input',
defaultValue: '',
......@@ -548,7 +599,7 @@ export const formProps: FormProps = {
width: '100%',
span: '',
defaultValue: '',
placeholder: '请输入物料编号',
placeholder: '',
prefix: '',
suffix: '',
addonBefore: '',
......@@ -570,6 +621,37 @@ export const formProps: FormProps = {
},
},
{
key: 'c8f88cafd17f4655bfbe4643ffe58c9c',
title: '名称',
dataIndex: 'cpmc',
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: 'cpmc',
},
},
{
key: '6ce71ecb0b6e4d14ae65be4029b179fd',
title: '内部代码',
dataIndex: 'nbdm',
......@@ -768,14 +850,14 @@ export const formProps: FormProps = {
itemId: '',
dicOptions: [],
useSelectButton: true,
buttonName: '选择产品',
buttonName: '选择',
showLabel: true,
showComponentBorder: true,
showBorder: false,
bordercolor: '#f0f0f0',
bordershowtype: [true, true, true, true],
borderwidth: 1,
showIndex: false,
showIndex: true,
isShow: true,
multipleHeads: [],
buttonList: [],
......@@ -790,7 +872,77 @@ export const formProps: FormProps = {
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,
},
],
},
},
],
},
],
componentProps: { tabPosition: 'top', size: 'default', type: 'line', isShow: true },
},
{
key: 'f7ae7fe08ec74cf6b91cd3cd35cfeaaf',
......
......@@ -33,7 +33,7 @@ export const permissionList = [
defaultValue: '',
},
{
required: true,
required: false,
view: true,
edit: true,
disabled: false,
......@@ -169,7 +169,7 @@ export const permissionList = [
isSaveTable: false,
showChildren: false,
tableName: 'mesProductionPlanProductList',
fieldName: '物料编号',
fieldName: '编号',
fieldId: 'cpbh',
type: 'Input',
key: 'cd0038f42bc64c189b3821f0e2061321',
......@@ -184,6 +184,21 @@ export const permissionList = [
isSaveTable: false,
showChildren: false,
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: '内部代码',
fieldId: 'nbdm',
type: 'Input',
......
<template>
<ResizePageWrapper :hasLeft="false">
<template #resizeRight>
......@@ -26,7 +27,11 @@
</template>
</template>
<template #bodyCell="{ column, record }">
<template v-if="column.dataIndex === 'action'">
<TableAction
:actions="getLessActions(record)"
:dropDownActions="getMoreActions(record)"
......@@ -39,14 +44,27 @@
}}</span>
</template>
</template>
</BasicTable>
</template>
<ScjhModal @register="registerModal" @success="handleFormSuccess" @cancel="handleFormCancel" />
</ResizePageWrapper>
<ScjhModal @register="registerModal" @success="handleFormSuccess" @cancel="handleFormCancel"/>
</ResizePageWrapper>
</template>
<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 { ExclamationCircleOutlined } from '@ant-design/icons-vue';
......@@ -61,19 +79,45 @@
import { useI18n } from '/@/hooks/web/useI18n';
import { usePermission } from '/@/hooks/web/usePermission';
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 { useModal } from '/@/components/Modal';
import ScjhModal from './components/ScjhModal.vue';
import { searchFormSchema, columns } from './components/config';
import Icon from '/@/components/Icon/index';
const listSpliceNum = ref(3); //操作列最先展示几个
import { useConcurrentLock } from '/@/hooks/web/useConcurrentLock';
const pageParamsInfo = ref<any>({});
......@@ -92,6 +136,11 @@
const filterColumns = filterColumnAuth(columns);
const tableRef = ref();
//展示在列表内的按钮
const actionButtons = ref<string[]>(['view', 'edit', 'delete']);
const buttonConfigs = computed(() => {
......@@ -162,12 +211,18 @@
const { currentRoute } = useRouter();
const formIdComputedRef = computed(() => currentRoute.value.meta.formId as string);
provide<Ref<string>>('currentFormId', formIdComputedRef);
const selectedKeys = ref<string[]>([]);
const selectedRowsData = ref<any[]>([]);
const [registerModal, { openModal }] = useModal();
const [registerTable, { reload }] = useTable({
......@@ -184,18 +239,25 @@
fieldMapToTime: [],
showResetButton: false,
},
bordered: false,
bordered:false,
beforeFetch: (params) => {
pageParamsInfo.value = { ...params, FormId: formIdComputedRef.value, PK: 'id' };
pageParamsInfo.value = {...params, FormId: formIdComputedRef.value,PK: 'id' }
return pageParamsInfo.value;
},
afterFetch: (res) => {
selectedKeys.value = [];
selectedRowsData.value = [];
},
useSearchForm: true,
showTableSetting: true,
striped: false,
actionColumn: {
width: 195,
......@@ -212,10 +274,15 @@
objectId: formIdComputedRef.value, ////系统表单formId,自定义表单releaseId的id值
});
function buttonClick(code) {
btnEvent[code]();
}
function handleAdd() {
openModal(true, { isUpdate: false });
}
......@@ -235,12 +302,16 @@
id: record[field],
isUpdate: true,
};
openModal(true, info);
} catch (error) {}
}
function handleDelete(record: Recordable) {
deleteList([record.id]);
}
......@@ -265,6 +336,10 @@
});
}
function onSelectChange(selectedRowKeys: [], selectedRows) {
selectedKeys.value = selectedRowKeys;
selectedRowsData.value = selectedRows;
......@@ -272,6 +347,7 @@
function customRow(record: Recordable) {
return {
onClick: () => {
let selectedRowKeys = [...selectedKeys.value];
if (selectedRowKeys.indexOf(record.id) >= 0) {
......@@ -291,11 +367,15 @@
}
function handleSuccess() {
selectedKeys.value = [];
selectedRowsData.value = [];
reload();
}
function handleFormSuccess() {
handleSuccess();
handleCloseFormEnableLocke(buttonConfigs.value, 'edit');
......@@ -304,8 +384,9 @@
handleCloseFormEnableLocke(buttonConfigs.value, 'edit');
}
function handleView(record: Recordable) {
let info = {
let info={
isView: true,
id: record.id,
};
......@@ -348,7 +429,7 @@
let list = getActions(record);
return list.slice(listSpliceNum.value);
}
function getActions(record: Recordable): ActionItem[] {
function getActions(record: Recordable):ActionItem[] {
record.isCanEdit = false;
let actionsList: ActionItem[] = [];
......@@ -375,17 +456,24 @@
});
return actionsList;
}
</script>
<style lang="less" scoped>
:deep(.ant-table-selection-col) {
width: 50px;
}
.show {
.show{
display: flex;
}
.hide {
.hide{
display: none !important;
}
</style>
......@@ -854,7 +854,7 @@ export const formProps: FormProps = {
disabled: false,
showLabel: true,
controls: true,
required: false,
required: true,
subTotal: false,
isShow: true,
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