Commit 95ef29f9 by 张珈源

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

parents a6e09732 ef0a7c28
...@@ -157,8 +157,10 @@ ...@@ -157,8 +157,10 @@
"rollup": "^3.22.1", "rollup": "^3.22.1",
"rollup-plugin-visualizer": "^5.9.0", "rollup-plugin-visualizer": "^5.9.0",
"stylelint": "^16.26.1", "stylelint": "^16.26.1",
"stylelint-config-prettier": "^9.0.5",
"stylelint-config-recommended-vue": "^1.4.0", "stylelint-config-recommended-vue": "^1.4.0",
"stylelint-config-standard": "^33.0.0", "stylelint-config-standard": "^33.0.0",
"stylelint-order": "^7.0.1",
"terser": "^5.17.4", "terser": "^5.17.4",
"ts-node": "^10.9.1", "ts-node": "^10.9.1",
"typescript": "^5.0.4", "typescript": "^5.0.4",
......
...@@ -8,9 +8,7 @@ enum Api { ...@@ -8,9 +8,7 @@ enum Api {
List = '/scgl/scjh/list', List = '/scgl/scjh/list',
Info = '/scgl/scjh/info', Info = '/scgl/scjh/info',
MesProductionPlan = '/scgl/scjh', MesProductionPlan = '/scgl/scjh',
Issue = '/scgl/scjh/issue',
} }
/** /**
...@@ -88,6 +86,17 @@ export async function deleteMesProductionPlan(ids: string[], mode: ErrorMessageM ...@@ -88,6 +86,17 @@ export async function deleteMesProductionPlan(ids: string[], mode: ErrorMessageM
); );
} }
/**
* @description: 下发任务
*/
export async function issueMesProductionPlan(ids: string[], mode: ErrorMessageMode = 'modal') {
return defHttp.post<boolean>(
{
url: Api.Issue,
data: { ids },
},
{
errorMessageMode: mode,
},
);
}
...@@ -8,6 +8,8 @@ export interface MesProductionPlanPageParams extends BasicPageParams { ...@@ -8,6 +8,8 @@ export interface MesProductionPlanPageParams extends BasicPageParams {
ddbh: string; ddbh: string;
ssgs: string;
zt: string; zt: string;
} }
...@@ -17,13 +19,13 @@ export interface MesProductionPlanPageParams extends BasicPageParams { ...@@ -17,13 +19,13 @@ export interface MesProductionPlanPageParams extends BasicPageParams {
export interface MesProductionPlanPageModel { export interface MesProductionPlanPageModel {
id: string; id: string;
jhbh: string;
ddbh: string; ddbh: string;
jhbh: string;
kh: string; kh: string;
jhjhrq: string; ssgs: string;
zt: string; zt: string;
} }
...@@ -84,6 +86,10 @@ export interface MesProductionPlanModel { ...@@ -84,6 +86,10 @@ export interface MesProductionPlanModel {
modifyUserId: string; modifyUserId: string;
lph: string;
ywzz: string;
mesProductionPlanProductList?: MesProductionPlanProductModel; mesProductionPlanProductList?: MesProductionPlanProductModel;
} }
......
...@@ -3,12 +3,12 @@ import { BasicColumn } from '/@/components/Table'; ...@@ -3,12 +3,12 @@ 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', // field: 'jhbh',
label: '计划编号', // label: '计划编号',
defaultValue: undefined, // defaultValue: undefined,
component: 'Input', // component: 'Input',
}, // },
{ {
field: 'ddbh', field: 'ddbh',
label: '订单编号', label: '订单编号',
...@@ -16,13 +16,13 @@ export const searchFormSchema: FormSchema[] = [ ...@@ -16,13 +16,13 @@ export const searchFormSchema: FormSchema[] = [
component: 'Input', component: 'Input',
}, },
{ {
field: 'zt', field: 'ssgs',
label: '状态', label: '业务组织',
defaultValue: undefined, defaultValue: undefined,
component: 'XjrSelect', component: 'XjrSelect',
componentProps: { componentProps: {
datasourceType: 'dic', datasourceType: 'dic',
params: { itemId: '2004464883576217601' }, params: { itemId: '2015724355955159041' },
labelField: 'name', labelField: 'name',
valueField: 'value', valueField: 'value',
mode: 'multiple', mode: 'multiple',
...@@ -31,13 +31,13 @@ export const searchFormSchema: FormSchema[] = [ ...@@ -31,13 +31,13 @@ export const searchFormSchema: FormSchema[] = [
}, },
}, },
{ {
field: 'ywzz', field: 'zt',
label: '业务组织', label: '状态',
defaultValue: undefined, defaultValue: undefined,
component: 'XjrSelect', component: 'XjrSelect',
componentProps: { componentProps: {
datasourceType: 'dic', datasourceType: 'dic',
params: { itemId: '2015724355955159041' }, params: { itemId: '2004464883576217601' },
labelField: 'name', labelField: 'name',
valueField: 'value', valueField: 'value',
mode: 'multiple', mode: 'multiple',
...@@ -50,8 +50,8 @@ export const searchFormSchema: FormSchema[] = [ ...@@ -50,8 +50,8 @@ export const searchFormSchema: FormSchema[] = [
export const columns: BasicColumn[] = [ export const columns: BasicColumn[] = [
{ {
resizable: true, resizable: true,
dataIndex: 'jhbh', dataIndex: 'ddbh',
title: '计划编号', title: '订单编号',
componentType: 'input', componentType: 'input',
fixed: false, fixed: false,
...@@ -63,35 +63,35 @@ export const columns: BasicColumn[] = [ ...@@ -63,35 +63,35 @@ export const columns: BasicColumn[] = [
{ {
resizable: true, resizable: true,
dataIndex: 'ddbh', dataIndex: 'jhbh',
title: '订单编号', title: '计划编号',
componentType: 'input', componentType: 'auto-code',
fixed: false, fixed: false,
sorter: true, sorter: true,
styleConfig: undefined, styleConfig: undefined,
listStyle: '', listStyle: undefined,
}, },
{ {
resizable: true, resizable: true,
dataIndex: 'kh', dataIndex: 'kh',
title: '客户', title: '客户',
componentType: 'input', componentType: 'select',
fixed: false, fixed: false,
sorter: true, sorter: true,
styleConfig: undefined, styleConfig: undefined,
listStyle: '', listStyle: undefined,
}, },
{ {
resizable: true, resizable: true,
dataIndex: 'jhjhrq', dataIndex: 'ssgs',
title: '计划交付日期', title: '业务组织',
componentType: 'date', componentType: 'select',
fixed: false, fixed: false,
sorter: true, sorter: true,
...@@ -112,18 +112,6 @@ export const columns: BasicColumn[] = [ ...@@ -112,18 +112,6 @@ export const columns: BasicColumn[] = [
styleConfig: undefined, styleConfig: undefined,
listStyle: undefined, listStyle: undefined,
}, },
{
resizable: true,
dataIndex: 'ywzz',
title: '业务组织',
componentType: 'select',
fixed: false,
sorter: true,
styleConfig: undefined,
listStyle: undefined,
},
]; ];
//表头合并配置 //表头合并配置
export const headerMergingData = []; export const headerMergingData = [];
...@@ -214,34 +202,24 @@ export const formProps: FormProps = { ...@@ -214,34 +202,24 @@ export const formProps: FormProps = {
span: 8, span: 8,
list: [ list: [
{ {
key: 'bb401260571f476c9816266b858aa2fa', key: '192945cba90645f593eb7e21a4776c97',
field: 'jhbh', field: 'jhbh',
label: '计划编号', label: '计划编号',
type: 'input', type: 'auto-code',
component: 'Input', component: 'AutoCodeRule',
colProps: { span: 24 }, colProps: { span: 24 },
defaultValue: '',
componentProps: { componentProps: {
width: '100%', width: '100%',
span: 7, span: 7,
defaultValue: '',
placeholder: '请输入计划编号', placeholder: '请输入计划编号',
prefix: '', prefix: '',
suffix: '', suffix: '',
addonBefore: '', addonBefore: '',
addonAfter: '', addonAfter: '',
disabled: false,
allowClear: false,
showLabel: true, showLabel: true,
autoCodeRule: 'scjh',
required: true, required: true,
rules: [],
events: {},
listStyle: '',
isSave: false,
isShow: true, isShow: true,
scan: false,
bordered: true,
isShowAi: false,
tooltipConfig: { visible: false, title: '提示文本' }, tooltipConfig: { visible: false, title: '提示文本' },
style: { width: '100%' }, style: { width: '100%' },
}, },
...@@ -409,49 +387,16 @@ export const formProps: FormProps = { ...@@ -409,49 +387,16 @@ export const formProps: FormProps = {
span: 8, span: 8,
list: [ list: [
{ {
key: '105fe8a606b74e0ca90ea9ff1d20b648', key: 'dbb3bfcc0aa54e84b31adc2ba45dd48b',
field: 'kh', field: 'kh',
label: '客户', 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%' },
},
},
{
key: '6833bea0c42c432b83e6946695f2d723',
field: 'ssgs',
label: '所属公司',
type: 'select', type: 'select',
component: 'XjrSelect', component: 'XjrSelect',
colProps: { span: 24 }, colProps: { span: 24 },
componentProps: { componentProps: {
width: '100%', width: '100%',
span: 7, span: 7,
placeholder: '请选择下拉选择', placeholder: '请选择下拉选择客户',
showLabel: true, showLabel: true,
showSearch: false, showSearch: false,
isMultiple: false, isMultiple: false,
...@@ -462,20 +407,21 @@ export const formProps: FormProps = { ...@@ -462,20 +407,21 @@ export const formProps: FormProps = {
{ key: 2, label: 'Option 2', value: 'Option 2' }, { key: 2, label: 'Option 2', value: 'Option 2' },
{ key: 3, label: 'Option 3', value: 'Option 3' }, { key: 3, label: 'Option 3', value: 'Option 3' },
], ],
defaultSelect: '',
datasourceType: 'api', datasourceType: 'api',
labelField: 'label', labelField: 'label',
valueField: 'value', valueField: 'value',
apiConfig: { apiConfig: {
path: '/bmxx/getCompanyList', path: '/jcxx/getKhList',
method: 'GET', method: 'GET',
apiId: 'copy1765431632890d13798', apiId: '7bc8db3faba24b19a997856f6ef0b27e',
apiParams: [ apiParams: [
{ key: '1', title: 'Query Params', tableInfo: [] }, { key: '1', title: 'Query Params', tableInfo: [] },
{ key: '2', title: 'Header', tableInfo: [] }, { key: '2', title: 'Header', tableInfo: [] },
{ key: '3', title: 'Body' }, { key: '3', title: 'Body' },
], ],
script: script:
'var sql="select id as value,name as label from res_company";\r\nreturn db.select(sql);', 'var sql="select id as value,name as label from roke_partner where delete_mark = 0 and customer = \'1\'";\r\nreturn db.select(sql);',
}, },
dicOptions: [], dicOptions: [],
required: false, required: false,
...@@ -486,14 +432,9 @@ export const formProps: FormProps = { ...@@ -486,14 +432,9 @@ export const formProps: FormProps = {
style: { width: '100%' }, style: { width: '100%' },
}, },
}, },
],
},
{
span: 8,
list: [
{ {
key: 'lkajsldjaljdla', key: '6833bea0c42c432b83e6946695f2d723',
field: 'ywzz', field: 'ssgs',
label: '业务组织', label: '业务组织',
type: 'select', type: 'select',
component: 'XjrSelect', component: 'XjrSelect',
...@@ -512,7 +453,6 @@ export const formProps: FormProps = { ...@@ -512,7 +453,6 @@ export const formProps: FormProps = {
{ key: 2, label: 'Option 2', value: 'Option 2' }, { key: 2, label: 'Option 2', value: 'Option 2' },
{ key: 3, label: 'Option 3', value: 'Option 3' }, { key: 3, label: 'Option 3', value: 'Option 3' },
], ],
defaultSelect: null,
datasourceType: 'dic', datasourceType: 'dic',
labelField: 'name', labelField: 'name',
valueField: 'value', valueField: 'value',
...@@ -567,16 +507,17 @@ export const formProps: FormProps = { ...@@ -567,16 +507,17 @@ export const formProps: FormProps = {
mainKey: 'mesProductionPlanProductList', mainKey: 'mesProductionPlanProductList',
columns: [ columns: [
{ {
key: '0b5e3de2d92f4a1cba6a650cff672653', key: 'd762849da7e741a7b004c1c81b91593a',
title: 'id', title: '产品ID',
dataIndex: 'id', dataIndex: 'cpid',
componentType: 'Input', componentType: 'Input',
defaultValue: '', defaultValue: '',
componentProps: { componentProps: {
width: '100%', width: '100%',
span: '', span: '',
defaultValue: '', defaultValue: '',
placeholder: '请输入id', placeholder: '请输入产品ID产品ID',
maxlength: null,
prefix: '', prefix: '',
suffix: '', suffix: '',
addonBefore: '', addonBefore: '',
...@@ -594,91 +535,7 @@ export const formProps: FormProps = { ...@@ -594,91 +535,7 @@ export const formProps: FormProps = {
bordered: true, bordered: true,
isShowAi: false, isShowAi: false,
tooltipConfig: { visible: false, title: '提示文本' }, tooltipConfig: { visible: false, title: '提示文本' },
}, prestrainField: 'id',
},
{
key: '416cd1b15c314d0dafaf6fc91e3f4653',
title: '产品选择',
dataIndex: 'cpid',
componentType: 'MultiplePopup',
componentProps: {
popupType: 'associate',
width: '100%',
span: '',
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: 'cpmc', tableTitle: '产品名称', show: true, width: 150 },
{
name: 'cpbh',
tableTitle: '物料编号',
bindField: 'cpbh',
show: true,
width: 150,
component: 'cd0038f42bc64c189b3821f0e2061321',
bindTable: 'mes_production_plan_product',
},
{
name: 'nbdm',
tableTitle: '内部代码',
bindField: 'nbdm',
show: true,
width: 150,
component: '6ce71ecb0b6e4d14ae65be4029b179fd',
bindTable: 'mes_production_plan_product',
},
{
name: 'xh',
tableTitle: '型号',
bindField: 'xh',
show: true,
width: 150,
component: '0c075736898c431ea3f5bca58ec65af6',
bindTable: 'mes_production_plan_product',
},
{
name: 'gg',
tableTitle: '规格',
bindField: 'gg',
show: true,
width: 150,
component: '2f56d9297a9c49d59d3b43f62e2946f2',
bindTable: 'mes_production_plan_product',
},
{
name: 'hjzt',
tableTitle: '合金状态',
bindField: 'hjzt',
show: true,
width: 150,
component: '697829b6aed54b8cbaa853c62619831a',
bindTable: 'mes_production_plan_product',
},
],
},
dicOptions: [],
required: false,
rules: [],
events: {},
isShow: true,
tooltipConfig: { visible: false, title: '提示文本' },
}, },
}, },
{ {
...@@ -709,6 +566,7 @@ export const formProps: FormProps = { ...@@ -709,6 +566,7 @@ export const formProps: FormProps = {
bordered: true, bordered: true,
isShowAi: false, isShowAi: false,
tooltipConfig: { visible: false, title: '提示文本' }, tooltipConfig: { visible: false, title: '提示文本' },
prestrainField: 'cpbh',
}, },
}, },
{ {
...@@ -739,6 +597,7 @@ export const formProps: FormProps = { ...@@ -739,6 +597,7 @@ export const formProps: FormProps = {
bordered: true, bordered: true,
isShowAi: false, isShowAi: false,
tooltipConfig: { visible: false, title: '提示文本' }, tooltipConfig: { visible: false, title: '提示文本' },
prestrainField: 'nbdm',
}, },
}, },
{ {
...@@ -769,6 +628,7 @@ export const formProps: FormProps = { ...@@ -769,6 +628,7 @@ export const formProps: FormProps = {
bordered: true, bordered: true,
isShowAi: false, isShowAi: false,
tooltipConfig: { visible: false, title: '提示文本' }, tooltipConfig: { visible: false, title: '提示文本' },
prestrainField: 'xh',
}, },
}, },
{ {
...@@ -799,6 +659,7 @@ export const formProps: FormProps = { ...@@ -799,6 +659,7 @@ export const formProps: FormProps = {
bordered: true, bordered: true,
isShowAi: false, isShowAi: false,
tooltipConfig: { visible: false, title: '提示文本' }, tooltipConfig: { visible: false, title: '提示文本' },
prestrainField: 'hjzt',
}, },
}, },
{ {
...@@ -829,6 +690,7 @@ export const formProps: FormProps = { ...@@ -829,6 +690,7 @@ export const formProps: FormProps = {
bordered: true, bordered: true,
isShowAi: false, isShowAi: false,
tooltipConfig: { visible: false, title: '提示文本' }, tooltipConfig: { visible: false, title: '提示文本' },
prestrainField: 'gg',
}, },
}, },
{ {
...@@ -842,7 +704,7 @@ export const formProps: FormProps = { ...@@ -842,7 +704,7 @@ export const formProps: FormProps = {
span: '', span: '',
defaultValue: 0, defaultValue: 0,
min: 0, min: 0,
step: 0.1, step: 1,
disabled: false, disabled: false,
showLabel: true, showLabel: true,
controls: true, controls: true,
...@@ -852,6 +714,7 @@ export const formProps: FormProps = { ...@@ -852,6 +714,7 @@ export const formProps: FormProps = {
rules: [], rules: [],
events: {}, events: {},
tooltipConfig: { visible: false, title: '提示文本' }, tooltipConfig: { visible: false, title: '提示文本' },
prestrainField: '',
listStyle: "return 'width:100%'", listStyle: "return 'width:100%'",
}, },
}, },
...@@ -866,7 +729,7 @@ export const formProps: FormProps = { ...@@ -866,7 +729,7 @@ export const formProps: FormProps = {
span: '', span: '',
defaultValue: 0, defaultValue: 0,
min: 0, min: 0,
step: 1, step: 0.1,
disabled: false, disabled: false,
showLabel: true, showLabel: true,
controls: true, controls: true,
...@@ -883,11 +746,29 @@ export const formProps: FormProps = { ...@@ -883,11 +746,29 @@ export const formProps: FormProps = {
], ],
span: '24', span: '24',
preloadType: 'api', preloadType: 'api',
apiConfig: {}, 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: '', itemId: '',
dicOptions: [], dicOptions: [],
useSelectButton: false, useSelectButton: true,
buttonName: '选择数据', buttonName: '选择产品',
showLabel: true, showLabel: true,
showComponentBorder: true, showComponentBorder: true,
showBorder: false, showBorder: false,
...@@ -904,7 +785,7 @@ export const formProps: FormProps = { ...@@ -904,7 +785,7 @@ export const formProps: FormProps = {
isDeleteSelected: false, isDeleteSelected: false,
isListView: false, isListView: false,
viewList: [], viewList: [],
isShowAdd: true, isShowAdd: false,
isShowDelete: true, isShowDelete: true,
hasCheckedCol: false, hasCheckedCol: false,
events: {}, events: {},
...@@ -921,7 +802,7 @@ export const formProps: FormProps = { ...@@ -921,7 +802,7 @@ export const formProps: FormProps = {
componentProps: { componentProps: {
width: '100%', width: '100%',
span: '', span: '',
placeholder: '请选择下拉选择', placeholder: '请选择下拉选择状态',
showLabel: true, showLabel: true,
showSearch: false, showSearch: false,
isMultiple: false, isMultiple: false,
...@@ -932,7 +813,7 @@ export const formProps: FormProps = { ...@@ -932,7 +813,7 @@ export const formProps: FormProps = {
{ key: 2, label: 'Option 2', value: 'Option 2' }, { key: 2, label: 'Option 2', value: 'Option 2' },
{ key: 3, label: 'Option 3', value: 'Option 3' }, { key: 3, label: 'Option 3', value: 'Option 3' },
], ],
defaultSelect: '1', defaultSelect: '草稿',
datasourceType: 'dic', datasourceType: 'dic',
params: { itemId: '2004464883576217601' }, params: { itemId: '2004464883576217601' },
labelField: 'name', labelField: 'name',
......
export const permissionList = [ export const permissionList = [
{ {
required: true, required: false,
view: true,
edit: true,
disabled: false,
isSaveTable: false,
tableName: '',
fieldName: '业务组织',
fieldId: 'ywzz',
isSubTable: false,
showChildren: true,
type: 'select',
key: 'lkajsldjaljdla',
children: [],
options: {},
},
{
required: true,
view: true, view: true,
edit: true, edit: false,
disabled: false, disabled: true,
isSaveTable: false, isSaveTable: false,
tableName: '', tableName: '',
fieldName: '计划编号', fieldName: '计划编号',
fieldId: 'jhbh', fieldId: 'jhbh',
isSubTable: false, isSubTable: false,
showChildren: true, showChildren: true,
type: 'input', type: 'auto-code',
key: 'bb401260571f476c9816266b858aa2fa', key: '192945cba90645f593eb7e21a4776c97',
children: [], children: [],
options: {}, options: {},
defaultValue: '',
}, },
{ {
required: false, required: false,
...@@ -128,20 +111,19 @@ export const permissionList = [ ...@@ -128,20 +111,19 @@ export const permissionList = [
fieldId: 'kh', fieldId: 'kh',
isSubTable: false, isSubTable: false,
showChildren: true, showChildren: true,
type: 'input', type: 'select',
key: '105fe8a606b74e0ca90ea9ff1d20b648', key: 'dbb3bfcc0aa54e84b31adc2ba45dd48b',
children: [], children: [],
options: {}, options: {},
defaultValue: '',
}, },
{ {
required: false, required: true,
view: true, view: true,
edit: true, edit: true,
disabled: false, disabled: false,
isSaveTable: false, isSaveTable: false,
tableName: '', tableName: '',
fieldName: '所属公司', fieldName: '业务组织',
fieldId: 'ssgs', fieldId: 'ssgs',
isSubTable: false, isSubTable: false,
showChildren: true, showChildren: true,
...@@ -158,7 +140,7 @@ export const permissionList = [ ...@@ -158,7 +140,7 @@ export const permissionList = [
isSubTable: true, isSubTable: true,
showChildren: false, showChildren: false,
tableName: 'mesProductionPlanProductList', tableName: 'mesProductionPlanProductList',
fieldName: '表格组件', fieldName: '',
fieldId: 'mesProductionPlanProductList', fieldId: 'mesProductionPlanProductList',
type: 'form', type: 'form',
key: '24ea4c6631d047a1a8e7c3fe86ab080c', key: '24ea4c6631d047a1a8e7c3fe86ab080c',
...@@ -172,25 +154,10 @@ export const permissionList = [ ...@@ -172,25 +154,10 @@ export const permissionList = [
isSaveTable: false, isSaveTable: false,
showChildren: false, showChildren: false,
tableName: 'mesProductionPlanProductList', tableName: 'mesProductionPlanProductList',
fieldName: 'id', fieldName: '产品ID',
fieldId: 'id',
type: 'Input',
key: '0b5e3de2d92f4a1cba6a650cff672653',
children: [],
},
{
required: true,
view: true,
edit: true,
disabled: false,
isSubTable: false,
isSaveTable: false,
showChildren: false,
tableName: 'mesProductionPlanProductList',
fieldName: '产品选择',
fieldId: 'cpid', fieldId: 'cpid',
type: 'MultiplePopup', type: 'Input',
key: '416cd1b15c314d0dafaf6fc91e3f4653', key: 'd762849da7e741a7b004c1c81b91593a',
children: [], children: [],
}, },
{ {
...@@ -315,6 +282,6 @@ export const permissionList = [ ...@@ -315,6 +282,6 @@ export const permissionList = [
key: 'f7ae7fe08ec74cf6b91cd3cd35cfeaaf', key: 'f7ae7fe08ec74cf6b91cd3cd35cfeaaf',
children: [], children: [],
options: {}, options: {},
defaultValue: '1', defaultValue: '草稿',
}, },
]; ];
...@@ -17,7 +17,8 @@ ...@@ -17,7 +17,8 @@
<a-button <a-button
v-else v-else
:type="button.buttonType === 'danger' ? 'default' : button.buttonType || 'primary'" :type="button.buttonType === 'danger' ? 'default' : button.buttonType || 'primary'"
:danger="button.buttonType === 'danger'" @click="buttonClick(button.code)" :danger="button.buttonType === 'danger'"
@click="buttonClick(button.code)"
> >
<template #icon><Icon :icon="button.icon" /></template> <template #icon><Icon :icon="button.icon" /></template>
{{ button.name }} {{ button.name }}
...@@ -50,7 +51,11 @@ ...@@ -50,7 +51,11 @@
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';
import { getMesProductionPlanPage, deleteMesProductionPlan } from '/@/api/scgl/scjh'; import {
getMesProductionPlanPage,
deleteMesProductionPlan,
issueMesProductionPlan,
} from '/@/api/scgl/scjh';
import { ResizePageWrapper } from '/@/components/Page'; import { ResizePageWrapper } from '/@/components/Page';
import { useMessage } from '/@/hooks/web/useMessage'; import { useMessage } from '/@/hooks/web/useMessage';
import { useI18n } from '/@/hooks/web/useI18n'; import { useI18n } from '/@/hooks/web/useI18n';
...@@ -70,8 +75,6 @@ ...@@ -70,8 +75,6 @@
const listSpliceNum = ref(3); //操作列最先展示几个 const listSpliceNum = ref(3); //操作列最先展示几个
import { useConcurrentLock } from '/@/hooks/web/useConcurrentLock'; import { useConcurrentLock } from '/@/hooks/web/useConcurrentLock';
import axios from 'axios';
import { useUserStore } from '/@/store/modules/user';
const pageParamsInfo = ref<any>({}); const pageParamsInfo = ref<any>({});
const { const {
...@@ -149,7 +152,13 @@ ...@@ -149,7 +152,13 @@
return buttonConfigs.value?.filter((x) => actionButtons.value.includes(x.code)); return buttonConfigs.value?.filter((x) => actionButtons.value.includes(x.code));
}); });
const btnEvent = { view: handleView, add: handleAdd, edit: handleEdit, delete: handleDelete }; const btnEvent = {
view: handleView,
add: handleAdd,
edit: handleEdit,
delete: handleDelete,
xiafa: handleXiafa,
};
const { currentRoute } = useRouter(); const { currentRoute } = useRouter();
...@@ -204,40 +213,6 @@ ...@@ -204,40 +213,6 @@
}); });
function buttonClick(code) { function buttonClick(code) {
const store = useUserStore()
const ids = selectedRowsData.value.map((x) => x.id)
if (code === 'xiafa') {
//如果状态是已下发就直接禁止提交 提示警告
if (selectedRowsData.value.some((x) => x.status === '已下发')) {
notification.warning({
message: '提示信息',
description: '请勿重复下发任务!',
});
return;
}else{
Modal.confirm({
title: '提示信息',
icon: createVNode(ExclamationCircleOutlined),
content: '是否确认下发任务?',
okText: '确认',
cancelText: '取消',
onOk() {
axios
.post(import.meta.env.VITE_GLOB_API_URL + '/scgl/scjh/issue', { ids } , {headers: { Authorization: 'Bearer '+store.getToken } })
.then((res) => {
if (res.data === '下发成功') {
notification.success({
message: '提示信息',
description: res.data,
});
}
});
},
});
}
}
btnEvent[code](); btnEvent[code]();
} }
...@@ -338,6 +313,33 @@ ...@@ -338,6 +313,33 @@
openModal(true, info); openModal(true, info);
} }
function handleXiafa(record: Recordable) {
if (selectedKeys.value.length === 0) {
Modal.warning({
title: '提示',
content: '请选择计划',
});
return;
}
const hasNonDraft = selectedRowsData.value.some((item) => item.zt !== '草稿');
if (hasNonDraft) {
Modal.warning({
title: '提示',
content: '非草稿计划无法下发任务任务',
});
return;
}
const ids = selectedRowsData.value.map((x) => x.id);
issueMesProductionPlan(ids).then((_) => {
handleSuccess();
notification.success({
message: 'Tip',
description: '下发成功!',
});
});
}
function getLessActions(record: Recordable) { function getLessActions(record: Recordable) {
let list = getActions(record); let list = getActions(record);
return list.slice(0, listSpliceNum.value); return list.slice(0, listSpliceNum.value);
......
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