Browse Source

右键菜单 sxm 2022-3-18

master
[li_she] 4 years ago
parent
commit
1dbc6a8a47
  1. 8
      src/api/yieldReport/produce_order.js
  2. 34
      src/views/modules/yieldReport/otherReport/bulk_inspection.vue
  3. 2
      src/views/modules/yieldReport/otherReport/fqc_produce_report_normal.vue
  4. 2
      src/views/modules/yieldReport/otherReport/fqc_split_roll_report.vue
  5. 2
      src/views/modules/yieldReport/otherReport/rework_inspect_report.vue
  6. 159
      src/views/modules/yieldReport/produce_order.vue

8
src/api/yieldReport/produce_order.js

@ -11,3 +11,11 @@ export const getOrderScheduleList = data => createAPI('schedule/getOrderSchedule
// 点击报工校验
export const reportCheck = data => createAPI('schedule/reportCheck', 'POST', data)
// 获取指定用户权限
export const getUserSpecialSecurity = data => createAPI('schedule/getUserSpecialSecurity', 'POST', data)
// 关闭/打开生产订单
export const closeOrOpenProduceOrder = data => createAPI('schedule/closeOrOpenProduceOrder', 'POST', data)
// 暂停/重开
export const pauseOrOpenProduceOrder = data => createAPI('schedule/pauseOrOpenProduceOrder', 'POST', data)

34
src/views/modules/yieldReport/otherReport/bulk_inspection.vue

@ -6,8 +6,8 @@
title="批量直接送检"
:close-on-click-modal="false"
:visible.sync="visible">
<el-row>
<el-col :span="24">
<el-row style="margin-top: 0px">
<el-col :span="24" style="margin-top: -12px">
<el-form :inline="true" label-position="top">
<el-form-item label="卷号:">
<el-input style="width: 120px" v-model="sfdcRolls.rollNo">
@ -18,7 +18,7 @@
</el-form-item>
</el-form>
</el-col>
<el-col :span="24">
<el-col :span="24" style="margin-top: -5px">
<fieldset class="customer-fieldset" style="width: 350px; height: 60px">
<legend class="customer-legend">排程班次信息</legend>
<el-form style="margin-top: -10px" :inline="true" label-position="top">
@ -136,7 +136,7 @@ export default {
},
methods: {
init(val,val2) {
init(val, val2) {
this.visible = true
this.repairOrderFlag = val2
this.sfdcRolls.site = val.site
@ -180,9 +180,9 @@ export default {
resourceId: this.sfdcRolls.resourceId,
scheduleDate: this.currentDate,
rollNo: item.rollNo,
repairOrderFlag: this.repairOrderFlag ,
repairOrderFlag: this.repairOrderFlag,
operatorId: this.operatorId,
currentDatetime: this.scheduleDateShiftDto.currentDateTime ,
currentDatetime: this.scheduleDateShiftDto.currentDateTime,
remark: ''
}
return item
@ -192,20 +192,20 @@ export default {
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
workbenchPostinspection(paramData).then(({data}) =>{
if (data.code == 0){
this.$message.success(data.msg)
}
if (data.code == 400){
this.$message.warning(data.msg)
}
if (data.code == 500){
workbenchPostinspection(paramData).then(({data}) => {
if (data.code == 0) {
this.$message.success(data.msg)
}
if (data.code == 400) {
this.$message.warning(data.msg)
}
if (data.code == 500) {
this.$message.error(data.msg)
}
})
})
},
closeDialog(){
closeDialog() {
Object.assign(this.$data.sfdcRolls, this.$options.data.call(this).sfdcRolls);
}
},
@ -231,4 +231,8 @@ export default {
}
.el-table /deep/ th {
padding: 0;
}
</style>

2
src/views/modules/yieldReport/otherReport/fqc_produce_report_normal.vue

@ -2692,7 +2692,7 @@ export default {
},
scheduleData: {
site: this.$store.state.user.site,
userName: this.$store.state.user.name,
username: this.$store.state.user.name,
seqNo: '',
orderNo: '',
itemNo: 0,

2
src/views/modules/yieldReport/otherReport/fqc_split_roll_report.vue

@ -2593,7 +2593,7 @@ export default {
},
scheduleData: {
site: this.$store.state.user.site,
userName: this.$store.state.user.name,
username: this.$store.state.user.name,
seqNo: '',
orderNo: '',
itemNo: 0,

2
src/views/modules/yieldReport/otherReport/rework_inspect_report.vue

@ -2693,7 +2693,7 @@ export default {
},
scheduleData: {
site: this.$store.state.user.site,
userName: this.$store.state.user.name,
username: this.$store.state.user.name,
seqNo: '',
orderNo: '',
itemNo: 0,

159
src/views/modules/yieldReport/produce_order.vue

@ -78,7 +78,7 @@
</el-checkbox>
</el-form-item>
</el-form>
<!-- 查询时间和产品 -->
<!-- 右键操作菜单 -->
<el-form :inline="true">
<el-form-item label="生产工单列表">
<el-dropdown style="margin-top: 3px" class="customer-dropdown" @command="handleCommand">
@ -88,9 +88,10 @@
<el-dropdown-menu slot="dropdown">
<el-dropdown-item class="customer-li" command="0" :disabled="menuButton.prdButton">生产订单</el-dropdown-item>
<el-dropdown-item class="customer-li" command="1" :disabled="menuButton.closedButton">关闭</el-dropdown-item>
<el-dropdown-item class="customer-li" command="1" :disabled="menuButton.openButton">打开</el-dropdown-item>
<el-dropdown-item class="customer-li" command="1" :disabled="menuButton.pauseButton">暂停</el-dropdown-item>
<el-dropdown-item class="customer-li" command="1" :disabled="menuButton.openReverseButton">重新开工</el-dropdown-item>
<el-dropdown-item class="customer-li" command="2" :disabled="menuButton.openButton">打开</el-dropdown-item>
<el-dropdown-item class="customer-li" command="3" :disabled="menuButton.pauseButton">暂停</el-dropdown-item>
<el-dropdown-item class="customer-li" command="4" :disabled="menuButton.openReverseButton">重新开工
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</el-form-item>
@ -161,7 +162,10 @@
import {
getProduceScheduleList,
reportCheck
reportCheck,
getUserSpecialSecurity,
closeOrOpenProduceOrder,
pauseOrOpenProduceOrder
} from '@/api/yieldReport/produce_order.js';
/*引入组件*/
@ -1016,11 +1020,50 @@ export default {
this.menuButton.pauseButton = true
this.menuButton.openReverseButton = true
} else {
//
this.menuButton.prdButton = false
//
if (this.currentRow.closedFlag == 'N'){
this.menuButton.closedButton = false
//
if (this.currentRow.closedFlag == 'N') {
let data = {
userSpecialSecurityNo: 230,
username: this.$store.state.user.name,
}
getUserSpecialSecurity(data).then(({data}) => {
if (data.userSpecialSecurity == 'Y') {
this.menuButton.closedButton = false
} else {
this.menuButton.closedButton = true
}
})
} else {
this.menuButton.closedButton = true
}
//
if (this.currentRow.closedFlag == 'Y') {
this.menuButton.closedButton = true
let data = {
userSpecialSecurityNo: 231,
username: this.$store.state.user.name,
}
getUserSpecialSecurity(data).then(({data}) => {
if (data.userSpecialSecurity == 'Y') {
this.menuButton.openButton = false
} else {
this.menuButton.openButton = true
}
})
}
//
if (this.currentRow.closedFlag == 'N' && this.currentRow.parkFlag == 'N') {
this.menuButton.pauseButton = false
this.menuButton.openReverseButton = true
}
//
if (this.currentRow.closedFlag == 'N' & this.currentRow.parkFlag == 'Y') {
this.menuButton.openReverseButton = false
this.menuButton.pauseButton = true
}
}
@ -1028,6 +1071,7 @@ export default {
/*区分不同的菜单 调用不同的方法 调用不同的方法*/
handleCommand(val) {
//
//
if ('0' == val) {
if (JSON.stringify(this.currentRow) == '{}') {
this.$message.error('请先选择派工单!');
@ -1035,11 +1079,106 @@ export default {
}
this.$router.push('/shopOrder-shopOrder/shopOrder', this.currentRow.orderNo)
}
//
if ('1' == val) {
//
this.warnReScheduleConfirm();
this.$confirm(`确定要关闭当前派工单吗?`, `关闭派工单`, {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
let data = {
username: this.$store.state.user.name,
itemNo: this.currentRow.itemNo,
site: this.currentRow.site,
orderNo: this.currentRow.orderNo,
seqNo: this.currentRow.seqNo,
closedFlag: 'Y',
}
closeOrOpenProduceOrder(data).then(({data}) => {
if (data.code == 0) {
this.$message.success(data.msg)
} else {
this.$message.error(data.msg)
}
})
});
}
//
if ('2' == val) {
//
this.$confirm(`确定要打开当前派工单吗?`, `关闭派工单`, {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
let data = {
username: this.$store.state.user.name,
itemNo: this.currentRow.itemNo,
site: this.currentRow.site,
orderNo: this.currentRow.orderNo,
seqNo: this.currentRow.seqNo,
closedFlag: 'N',
}
closeOrOpenProduceOrder(data).then(({data}) => {
if (data.code == 0) {
this.$message.success(data.msg)
} else {
this.$message.error(data.msg)
}
})
});
}
//
if ('3' == val) {
//
this.$confirm(`确定要暂停当前派工单吗?`, `关闭派工单`, {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
let data = {
username: this.$store.state.user.name,
itemNo: this.currentRow.itemNo,
site: this.currentRow.site,
orderNo: this.currentRow.orderNo,
seqNo: this.currentRow.seqNo,
parkFlag: 'Y',
}
pauseOrOpenProduceOrder(data).then(({data}) => {
if (data.code == 0) {
this.$message.success(data.msg)
} else {
this.$message.error(data.msg)
}
})
});
}
//
if ('4' == val) {
//
this.$confirm(`确定要重开当前派工单吗?`, `关闭派工单`, {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
let data = {
username: this.$store.state.user.name,
itemNo: this.currentRow.itemNo,
site: this.currentRow.site,
orderNo: this.currentRow.orderNo,
seqNo: this.currentRow.seqNo,
parkFlag: 'N',
}
pauseOrOpenProduceOrder(data).then(({data}) => {
if (data.code == 0) {
this.$message.success(data.msg)
} else {
this.$message.error(data.msg)
}
})
});
}
},
// FQC
fqcReportModal() {

Loading…
Cancel
Save