排产按钮权限添加

dev-scheduling
jinna 1 month ago
parent 91cd513bfa
commit 898054ca0f
  1. 6
      src/views/productionSchedulingPlan/basic/nonSameFurnace.vue
  2. 38
      src/views/productionSchedulingPlan/basic/oemProcess.vue
  3. 46
      src/views/productionSchedulingPlan/basic/sintTempCurve.vue

@ -211,7 +211,7 @@ export default {
}, },
{ {
label: '生产厂家', label: '生产厂家',
prop: 'factory', prop: 'producter',
search: false, search: false,
sortable: 'custom', sortable: 'custom',
span: 12, span: 12,
@ -286,7 +286,7 @@ export default {
}, },
{ {
label: '生产标识', label: '生产标识',
prop: 'productionIdent', prop: 'productIdent',
search: false, search: false,
sortable: 'custom', sortable: 'custom',
span: 12, span: 12,
@ -299,7 +299,7 @@ export default {
}, },
{ {
label: '结构/单件面积', label: '结构/单件面积',
prop: 'singleArea', prop: 'structure',
search: false, search: false,
sortable: 'custom', sortable: 'custom',
span: 12, span: 12,

@ -18,7 +18,7 @@
@refresh-change="refreshChange" @refresh-change="refreshChange"
@on-load="onLoad" @on-load="onLoad"
:before-open="beforeOpen" :before-open="beforeOpen"
@sort-change="sortChange"
> >
<template #menu-left> </template> <template #menu-left> </template>
<template #menu-right> </template> <template #menu-right> </template>
@ -37,6 +37,7 @@ import {
updateOutsourceProcess, updateOutsourceProcess,
getDetailOutsourceProcess getDetailOutsourceProcess
} from '@/api/productionSchedulingPlan/basic'; } from '@/api/productionSchedulingPlan/basic';
import { mapGetters } from 'vuex';
export default { export default {
components: {}, components: {},
data() { data() {
@ -64,10 +65,10 @@ export default {
border: true, border: true,
index: true, index: true,
selection: false, selection: false,
addBtn: true, addBtn: false,
editBtn: true, editBtn: false,
viewBtn: false, viewBtn: false,
delBtn: true, delBtn: false,
editBtnText: '修改', editBtnText: '修改',
labelWidth: 120, labelWidth: 120,
menuWidth: 120, menuWidth: 120,
@ -96,7 +97,7 @@ export default {
label: '工序', label: '工序',
prop: 'processIds', prop: 'processIds',
search: false, search: false,
sortable: true, sortable: 'custom',
span: 12, span: 12,
type: 'select', type: 'select',
filterable: true, filterable: true,
@ -122,7 +123,7 @@ export default {
label: '工序', label: '工序',
prop: 'processName', prop: 'processName',
search: false, search: false,
sortable: true, sortable: 'custom',
span: 12, span: 12,
display: false, display: false,
}, },
@ -130,7 +131,7 @@ export default {
label: '天数', label: '天数',
prop: 'days', prop: 'days',
search: false, search: false,
sortable: true, sortable: 'custom',
span: 12, span: 12,
type: 'number', type: 'number',
precision: 0, precision: 0,
@ -146,7 +147,7 @@ export default {
label: '备注', label: '备注',
prop: 'remarks', prop: 'remarks',
search: false, search: false,
sortable: true, sortable: 'custom',
span: 12, span: 12,
}, },
], ],
@ -155,7 +156,28 @@ export default {
data: [], data: [],
}; };
}, },
computed:{
...mapGetters(['permission']),
},
created(){
console.log('this.permission',this.permission)
this.option.addBtn = this.permission.oemProcess_add ? true : false;
this.option.editBtn = this.permission.oemProcess_edit ? true : false;
this.option.delBtn = this.permission.oemProcess_delete ? true : false;
},
methods: { methods: {
//
sortChange({ prop, order }) {
console.log('prop----------',prop)
console.log('order----------',order)
this.query.ascs = undefined;
this.query.descs = undefined;
const orderByFieldKey = order === 'ascending' ? 'ascs' : 'descs';
const orderByField = prop.replace(/([a-z])([A-Z0-9])/g, '$1_$2').toUpperCase();
this.query[orderByFieldKey] = orderByField;
// //
this.onLoad(this.page, this.query);
},
beforeOpen(done, type) { beforeOpen(done, type) {
if (['edit'].includes(type)) { if (['edit'].includes(type)) {
getDetailOutsourceProcess({id:this.form.id}).then(res => { getDetailOutsourceProcess({id:this.form.id}).then(res => {

@ -18,6 +18,7 @@
@refresh-change="refreshChange" @refresh-change="refreshChange"
@on-load="onLoad" @on-load="onLoad"
:before-open="beforeOpen" :before-open="beforeOpen"
@sort-change="sortChange"
> >
<template #menu-left> </template> <template #menu-left> </template>
<template #menu-right> </template> <template #menu-right> </template>
@ -35,6 +36,7 @@ import {
addSintTempCurve, addSintTempCurve,
updateSintTempCurve, updateSintTempCurve,
} from '@/api/productionSchedulingPlan/basic'; } from '@/api/productionSchedulingPlan/basic';
import { mapGetters } from 'vuex';
export default { export default {
components: {}, components: {},
data() { data() {
@ -55,17 +57,17 @@ export default {
calcHeight: 32, calcHeight: 32,
simplePage: false, simplePage: false,
searchShow: true, searchShow: true,
searchMenuSpan: 6, searchMenuSpan: 18,
searchIcon: true, searchIcon: true,
searchIndex: 3, searchIndex: 3,
tree: false, tree: false,
border: true, border: true,
index: true, index: true,
selection: false, selection: false,
addBtn: true, addBtn: false,
editBtn: true, editBtn: false,
viewBtn: false, viewBtn: false,
delBtn: true, delBtn: false,
editBtnText: '修改', editBtnText: '修改',
labelWidth: 120, labelWidth: 120,
menuWidth: 120, menuWidth: 120,
@ -83,6 +85,7 @@ export default {
editBtnIcon: ' ', editBtnIcon: ' ',
gridBtn: false, gridBtn: false,
searchLabelPosition: 'left', searchLabelPosition: 'left',
searchLabelWidth: 'auto',
searchGutter: 24, searchGutter: 24,
searchSpan: 6, searchSpan: 6,
menuAlign: 'left', menuAlign: 'left',
@ -94,7 +97,7 @@ export default {
label: '工序', label: '工序',
prop: 'processId', prop: 'processId',
search: true, search: true,
sortable: true, sortable: 'custom',
span: 12, span: 12,
type: 'select', type: 'select',
filterable: true, filterable: true,
@ -118,7 +121,7 @@ export default {
label: '工序', label: '工序',
prop: 'processName', prop: 'processName',
search: false, search: false,
sortable: true, sortable: 'custom',
span: 12, span: 12,
hide: true, hide: true,
display: false, display: false,
@ -127,7 +130,7 @@ export default {
label: '设备名称', label: '设备名称',
prop: 'equipName', prop: 'equipName',
search: false, search: false,
sortable: true, sortable: 'custom',
span: 12, span: 12,
rules: [ rules: [
{ {
@ -142,7 +145,7 @@ export default {
label: '设备分类', label: '设备分类',
prop: 'equipType', prop: 'equipType',
search: false, search: false,
sortable: true, sortable: 'custom',
span: 12, span: 12,
type: 'select', type: 'select',
rules: [ rules: [
@ -167,7 +170,7 @@ export default {
label: '玻璃粉牌号', label: '玻璃粉牌号',
prop: 'glassCode', prop: 'glassCode',
search: false, search: false,
sortable: true, sortable: 'custom',
span: 12, span: 12,
rules: [ rules: [
{ {
@ -182,7 +185,7 @@ export default {
label: '设定温度', label: '设定温度',
prop: 'temperature', prop: 'temperature',
search: false, search: false,
sortable: true, sortable: 'custom',
span: 12, span: 12,
rules: [ rules: [
{ {
@ -197,7 +200,7 @@ export default {
label: '备注', label: '备注',
prop: 'remarks', prop: 'remarks',
search: false, search: false,
sortable: true, sortable: 'custom',
span: 12, span: 12,
}, },
@ -207,7 +210,28 @@ export default {
data: [], data: [],
}; };
}, },
computed:{
...mapGetters(['permission']),
},
created(){
console.log('this.permission',this.permission)
this.option.addBtn = this.permission.sintTempCurve_add ? true : false;
this.option.editBtn = this.permission.sintTempCurve_edit ? true : false;
this.option.delBtn = this.permission.sintTempCurve_delete ? true : false;
},
methods: { methods: {
//
sortChange({ prop, order }) {
console.log('prop----------',prop)
console.log('order----------',order)
this.query.ascs = undefined;
this.query.descs = undefined;
const orderByFieldKey = order === 'ascending' ? 'ascs' : 'descs';
const orderByField = prop.replace(/([a-z])([A-Z0-9])/g, '$1_$2').toUpperCase();
this.query[orderByFieldKey] = orderByField;
// //
this.onLoad(this.page, this.query);
},
beforeOpen(done, type) { beforeOpen(done, type) {
if (['edit', 'view'].includes(type)) { if (['edit', 'view'].includes(type)) {
this.form.processId = this.form.processId+'' this.form.processId = this.form.processId+''

Loading…
Cancel
Save