Browse Source

右键菜单 sxm 2022-3-24

master
[li_she] 4 years ago
parent
commit
263c74a6fc
  1. 11
      src/api/yieldReport/produce_order.js
  2. 15
      src/views/modules/shopOrder/shopOrder/shopOrder.vue
  3. 219
      src/views/modules/yieldReport/com_create_recheck.vue
  4. 359
      src/views/modules/yieldReport/produce_order.vue

11
src/api/yieldReport/produce_order.js

@ -19,3 +19,14 @@ export const getUserSpecialSecurity = data => createAPI('schedule/getUserSpecial
export const closeOrOpenProduceOrder = data => createAPI('schedule/closeOrOpenProduceOrder', 'POST', data) export const closeOrOpenProduceOrder = data => createAPI('schedule/closeOrOpenProduceOrder', 'POST', data)
// 暂停/重开 // 暂停/重开
export const pauseOrOpenProduceOrder = data => createAPI('schedule/pauseOrOpenProduceOrder', 'POST', data) export const pauseOrOpenProduceOrder = data => createAPI('schedule/pauseOrOpenProduceOrder', 'POST', data)
// 确认/取消 生产订单已排产
export const costRollUpProduceOrder = data => createAPI('schedule/costRollUpProduceOrder', 'POST', data)
// 确认/取消 刀模已发
export const manualProduceOrder = data => createAPI('schedule/manualProduceOrder', 'POST', data)
// 确认/取消 印版已发
export const repairSOFlagProduceOrder = data => createAPI('schedule/repairSOFlagProduceOrder', 'POST', data)
// 取消所有派工单操作
export const workbenchCancelallops = data => createAPI('schedule/workbenchCancelallops', 'POST', data)
// 创建重检派工单
export const soscheduleNewReinspectjob = data => createAPI('schedule/soscheduleNewReinspectjob', 'POST', data)

15
src/views/modules/shopOrder/shopOrder/shopOrder.vue

@ -1638,6 +1638,17 @@
], ],
} }
}, },
watch: {
$route:{
handler: function(val, oldVal){
this.$router.onReady(() => {
this.modelData.orderNo = this.$route.query.order
})
},
//
deep: true
}
},
mounted() { mounted() {
this.$nextTick(() => { this.$nextTick(() => {
this.height = window.innerHeight - 255; this.height = window.innerHeight - 255;
@ -1895,7 +1906,9 @@
// end // end
}, },
created() { created() {
this.$router.onReady(() => {
this.modelData.orderNo = this.$route.query.order
})
} }
} }
</script> </script>

219
src/views/modules/yieldReport/com_create_recheck.vue

@ -0,0 +1,219 @@
<template>
<div class="customer-css">
<el-dialog :title="titleCon" v-drag
:visible.sync="createRecheckShow"
width="300px" style="height: 680px;" class="customer-dialog">
<el-container>
<el-container style="height: 160px;">
<el-form :inline="true" label-position="top" label-width="80px">
<el-row>
<el-col :span="12">
<el-form-item>
<span slot="label" style="" >排产日期:</span>
<el-date-picker
type="date"
v-model="pageData.scheduleDate" style="width: 100px">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="'排产数量:'">
<el-input type="number" min="0" v-model="pageData.qtytoSchedule " style="width: 100px"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row style="margin-top: -10px;">
<el-col :span="24" >
<el-form-item :label="'开始时间:'">
<el-date-picker style="width: 170px;"
v-model="pageData.planStartTime "
type="datetime"
placeholder="">
</el-date-picker>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item :label="'预计时长:'">
<el-input type="number" controls-position="right" min="0" v-model="pageData.timeRequired " style="width: 100px"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item>
<span slot="label" style="" @click="getBaseList(88)"><a herf="#">机台编号:</a></span>
<el-input v-model="pageData.resourceId " style="width: 100px"></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
</el-container>
<el-container style="margin-left: -0px; margin-top: 20px">
<el-form :inline="true" label-position="top" label-width="80px">
<!-- 不良代码 和日期 -->
<el-row style="margin-top: 15px;">
<el-col>
<el-form-item style="margin-top: 15px;">
<el-button @click="createRecheck" type="primary"
style="margin-left: -10px; margin-bottom: 5px;">
创建</el-button>
</el-form-item>
</el-col>
</el-row>
<el-row style="margin-top: 15px;">
<el-col>
<el-form-item style="margin-top: 10px;">
<el-button type="primary" @click="closeDialog"
style="margin-left: -10px; margin-bottom: 10px;">
关闭</el-button>
</el-form-item>
</el-col>
</el-row>
</el-form>
</el-container>
</el-container>
</el-dialog>
<!--列表的组件-->
<Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist>
</div>
</template>
<script>
import Chooselist from '@/views/modules/common/Chooselist';/*列表组件*/
import {
soscheduleNewReinspectjob
}
from '@/api/yieldReport/produce_order.js';
export default {
data() {
return {
titleCon: '创建重检派工单',
createRecheckShow:false,
tagNo: '',
pageData: {
site: this.$store.state.user.site,
username: this.$store.state.user.name,
orderNo: '',
itemNo: '',
workCenterNo: '',
resourceId: '',
scheduledDate: '',
planStartTime:'',
qtytoSchedule: '',
timeRequired: ''
},
operatorData: {
site: this.$store.state.user.site,
username: this.$store.state.user.name,
operatorId: '',
operatorName: '',
status: '',
seqNo: '',
showFlag: false
},
buttonTags:{
createRollFlag: true
},
dataListLoading: false,
}
},
/*组件*/
components: {
Chooselist,/*列表的组件*/
},
methods: {
//
init(row) {
this.createRecheckShow= true
//
this.pageData.orderNo = row.orderNo;
this.pageData.itemNo = row.itemNo;
this.pageData.seqNo = row.seqNo;
this.pageData.rollNo = row.rollNo;
this.pageData.operatorId = row.operatorId;
this.pageData.scheduleDate = row.scheduledDate;
this.pageData.workCenterNo = row.workCenterNo;
//
this.pageData.planStartTime = this.dayjs(new Date()).format('YYYY-MM-DD HH:mm:ss');
},
/*关闭modal*/
closeDialog(){
//
this.$emit('refreshPageData');
//
this.createRecheckShow = false
Object.assign(this.$data.pageData, this.$options.data.call(this).pageData);
},
/*创建重检*/
createRecheck(){
if (this.pageData.qtytoSchedule<=0){
this.$message.warning('排产数量不能小于0')
return
}
if (this.pageData.timeRequired<=0){
this.$message.warning('预计重检时长不能小于0')
return
}
soscheduleNewReinspectjob(this.pageData).then(({data}) => {
if(data.code == 0){
this.$message.success(data.msg);
//
this.closeDialog();
}else{
this.$message.warning(data.msg);
}
});
},
/*列表方法的回调*/
getBaseData(val){
if (this.tagNo == 88){
this.pageData.resourceId = val.ResourceID;
}
},
//
getBaseList(val){
this.tagNo = val
this.$nextTick(() => {
let strVal = "";
if (val == 88){
strVal = this.pageData.resourceId;
}
this.$refs.baseList.init(val, strVal)
})
},
},
/*监听器*/
watch:{
pageData: {
deep: true,
handler: function (newV, oldV) {
this.pageData.resourceId = this.pageData.resourceId.toUpperCase();
}
}
},
created() {
// this.factoryList()
// this.getLanguageList()
}
}
</script>
<style scoped >
</style>

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

@ -78,20 +78,50 @@
</el-checkbox> </el-checkbox>
</el-form-item> </el-form-item>
</el-form> </el-form>
<!-- 右键操作菜单 --> <!-- 右键操作菜单 -->
<el-form :inline="true"> <el-form :inline="true">
<el-form-item label="生产工单列表"> <el-form-item label="生产工单列表">
<el-dropdown style="margin-top: 3px" class="customer-dropdown" @command="handleCommand"> <el-dropdown style="margin-top: 3px" class="customer-dropdown" @command="handleCommand">
<el-button type="primary" @click="menuButtonFlag"> <el-button type="primary" @click="menuButtonFlag">
主菜单<i class="el-icon-arrow-down el-icon--right"></i> 主菜单<i class="el-icon-arrow-down el-icon--right"></i>
</el-button> </el-button>
<el-dropdown-menu slot="dropdown"> <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="0" :disabled="menuButton.prdButton"><span>生产订单</span>
</el-dropdown-item>
<hr width="95%"/>
<el-dropdown-item class="customer-li" command="1" :disabled="menuButton.closedButton">关闭</el-dropdown-item> <el-dropdown-item class="customer-li" command="1" :disabled="menuButton.closedButton">关闭</el-dropdown-item>
<el-dropdown-item class="customer-li" command="2" :disabled="menuButton.openButton">打开</el-dropdown-item>
<el-dropdown-item class="customer-li" command="2" :disabled="menuButton.openButton">打开
</el-dropdown-item>
<hr width="95%"/>
<el-dropdown-item class="customer-li" command="3" :disabled="menuButton.pauseButton">暂停</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 class="customer-li" command="4" :disabled="menuButton.openReverseButton">重新开工
</el-dropdown-item> </el-dropdown-item>
<hr width="95%"/>
<el-dropdown-item class="customer-li" command="5" :disabled="menuButton.createRecheckButton">创建重检派工单
</el-dropdown-item>
<hr width="95%"/>
<el-dropdown-item class="customer-li" command="6" :disabled="menuButton.canceledAllPrdButton">取消所有派工单操作
</el-dropdown-item>
<hr width="95%"/>
<el-dropdown-item class="customer-li" command="7" :disabled="menuButton.costRollUpFlagButton">生产已排料
</el-dropdown-item>
<el-dropdown-item class="customer-li" command="8" :disabled="menuButton.canceledCostRollUpFlagButton">
取消生产已排料
</el-dropdown-item>
<hr width="95%"/>
<el-dropdown-item class="customer-li" command="9" :disabled="menuButton.manualFlagButton">刀模已发
</el-dropdown-item>
<el-dropdown-item class="customer-li" command="10" :disabled="menuButton.canceledManualFlagButton">取消刀模已发
</el-dropdown-item>
<hr width="95%"/>
<el-dropdown-item class="customer-li" command="11" :disabled="menuButton.repairSOFlagButton">印版已发
</el-dropdown-item>
<el-dropdown-item class="customer-li" command="12" :disabled="menuButton.canceledRepairSOFlagButton">取消印版已发
</el-dropdown-item>
<hr width="95%"/>
</el-dropdown-menu> </el-dropdown-menu>
</el-dropdown> </el-dropdown>
</el-form-item> </el-form-item>
@ -155,6 +185,8 @@
<!-- FQC分卷 --> <!-- FQC分卷 -->
<fqcSplitRollReport :close-on-click-modal="false" <fqcSplitRollReport :close-on-click-modal="false"
:visible.sync="fqcRollShowReportFlag" ref="fqcSplitRollReport"></fqcSplitRollReport> :visible.sync="fqcRollShowReportFlag" ref="fqcSplitRollReport"></fqcSplitRollReport>
<!-- 创建重检派工单 -->
<createRecheck ref="createRecheck" ></createRecheck>
</div> </div>
</template> </template>
@ -165,7 +197,11 @@ import {
reportCheck, reportCheck,
getUserSpecialSecurity, getUserSpecialSecurity,
closeOrOpenProduceOrder, closeOrOpenProduceOrder,
pauseOrOpenProduceOrder
pauseOrOpenProduceOrder,
costRollUpProduceOrder,
manualProduceOrder,
repairSOFlagProduceOrder,
workbenchCancelallops
} from '@/api/yieldReport/produce_order.js'; } from '@/api/yieldReport/produce_order.js';
/*引入组件*/ /*引入组件*/
@ -175,6 +211,7 @@ import comFinishSchedule from "./com_finish_schedule";/*结束派工的组件*/
import fqcProduceReportNormal from "./otherReport/fqc_produce_report_normal";/*结束派工的组件*/ import fqcProduceReportNormal from "./otherReport/fqc_produce_report_normal";/*结束派工的组件*/
import reworkInspectReport from "./otherReport/rework_inspect_report";/*结束派工的组件*/ import reworkInspectReport from "./otherReport/rework_inspect_report";/*结束派工的组件*/
import fqcSplitRollReport from "./otherReport/fqc_split_roll_report";/*结束派工的组件*/ import fqcSplitRollReport from "./otherReport/fqc_split_roll_report";/*结束派工的组件*/
import createRecheck from './com_create_recheck'
export default { export default {
data() { data() {
@ -993,7 +1030,15 @@ export default {
openButton: true, openButton: true,
closedButton: true, closedButton: true,
pauseButton: true, pauseButton: true,
openReverseButton: true
openReverseButton: true,
costRollUpFlagButton: true,
canceledCostRollUpFlagButton: false,
manualFlagButton: false,
canceledManualFlagButton: false,
repairSOFlagButton: false,
canceledRepairSOFlagButton: false,
canceledAllPrdButton: false,
createRecheckButton: false,
} }
} }
}, },
@ -1004,6 +1049,7 @@ export default {
fqcProduceReportNormal, /*FQC报工*/ fqcProduceReportNormal, /*FQC报工*/
reworkInspectReport, /*返工重建*/ reworkInspectReport, /*返工重建*/
fqcSplitRollReport, /*FQC分卷*/ fqcSplitRollReport, /*FQC分卷*/
createRecheck /*创建重检派工单*/
}, },
mounted() { mounted() {
this.$nextTick(() => { this.$nextTick(() => {
@ -1018,11 +1064,15 @@ export default {
this.menuButton.openButton = true this.menuButton.openButton = true
this.menuButton.closedButton = true this.menuButton.closedButton = true
this.menuButton.pauseButton = true this.menuButton.pauseButton = true
this.menuButton.openReverseButton = true
this.menuButton.costRollUpFlagButton = true
this.menuButton.canceledCostRollUpFlagButton = true
this.menuButton.manualFlagButton = true
this.menuButton.canceledManualFlagButton = true
this.menuButton.repairSOFlagButton = true
this.menuButton.canceledRepairSOFlagButton = true
} else { } else {
// //
this.menuButton.prdButton = false this.menuButton.prdButton = false
// //
if (this.currentRow.closedFlag == 'N') { if (this.currentRow.closedFlag == 'N') {
let data = { let data = {
@ -1042,7 +1092,6 @@ export default {
// //
if (this.currentRow.closedFlag == 'Y') { if (this.currentRow.closedFlag == 'Y') {
this.menuButton.closedButton = true
let data = { let data = {
userSpecialSecurityNo: 231, userSpecialSecurityNo: 231,
username: this.$store.state.user.name, username: this.$store.state.user.name,
@ -1054,6 +1103,8 @@ export default {
this.menuButton.openButton = true this.menuButton.openButton = true
} }
}) })
} else {
this.menuButton.openButton = true
} }
// //
if (this.currentRow.closedFlag == 'N' && this.currentRow.parkFlag == 'N') { if (this.currentRow.closedFlag == 'N' && this.currentRow.parkFlag == 'N') {
@ -1065,6 +1116,108 @@ export default {
this.menuButton.openReverseButton = false this.menuButton.openReverseButton = false
this.menuButton.pauseButton = true this.menuButton.pauseButton = true
} }
//
if (this.currentRow.costRollUpFlag == 'N') {
//
let data = {
userSpecialSecurityNo: 238,
username: this.$store.state.user.name,
}
getUserSpecialSecurity(data).then(({data}) => {
if (data.userSpecialSecurity == 'Y') {
this.menuButton.costRollUpFlagButton = false
} else {
this.menuButton.costRollUpFlagButton = true
}
})
} else {
this.menuButton.costRollUpFlagButton = true
}
//
if (this.currentRow.costRollUpFlag == 'Y') {
//
let data = {
userSpecialSecurityNo: 238,
username: this.$store.state.user.name,
}
getUserSpecialSecurity(data).then(({data}) => {
if (data.userSpecialSecurity == 'Y') {
this.menuButton.canceledCostRollUpFlagButton = false
} else {
this.menuButton.canceledCostRollUpFlagButton = true
}
})
} else {
this.menuButton.canceledCostRollUpFlagButton = true
}
//
if (this.currentRow.manualFlag == 'N') {
//
let data = {
userSpecialSecurityNo: 258,
username: this.$store.state.user.name,
}
getUserSpecialSecurity(data).then(({data}) => {
if (data.userSpecialSecurity == 'Y') {
this.menuButton.manualFlagButton = false
} else {
this.menuButton.manualFlagButton = true
}
})
} else {
this.menuButton.manualFlagButton = true
}
//
if (this.currentRow.manualFlag == 'Y') {
//
let canceledAllPrdData = {
userSpecialSecurityNo: 259,
username: this.$store.state.user.name,
}
getUserSpecialSecurity(data).then(({data}) => {
if (data.userSpecialSecurity == 'Y') {
this.menuButton.canceledManualFlagButton = false
} else {
this.menuButton.canceledManualFlagButton = true
}
})
} else {
this.menuButton.canceledManualFlagButton = true
}
//
if (this.currentRow.repairSOFlag == 'N') {
//
let data = {
userSpecialSecurityNo: 259,
username: this.$store.state.user.name,
}
getUserSpecialSecurity(data).then(({data}) => {
if (data.userSpecialSecurity == 'Y') {
this.menuButton.repairSOFlagButton = false
} else {
this.menuButton.repairSOFlagButton = true
}
})
} else {
this.menuButton.repairSOFlagButton = true
}
//
if (this.currentRow.repairSOFlag == 'Y') {
//
let data = {
userSpecialSecurityNo: 259,
username: this.$store.state.user.name,
}
getUserSpecialSecurity(data).then(({data}) => {
if (data.userSpecialSecurity == 'Y') {
this.menuButton.canceledRepairSOFlagButton = false
} else {
this.menuButton.canceledRepairSOFlagButton = true
}
})
} else {
this.menuButton.canceledRepairSOFlagButton = true
}
} }
}, },
@ -1077,7 +1230,12 @@ export default {
this.$message.error('请先选择派工单!'); this.$message.error('请先选择派工单!');
return false; return false;
} }
this.$router.push('/shopOrder-shopOrder/shopOrder', this.currentRow.orderNo)
this.$router.push({
path: '/shopOrder-shopOrder/shopOrder',
query: {
order: this.currentRow.orderNo
}
})
} }
// //
if ('1' == val) { if ('1' == val) {
@ -1179,6 +1337,181 @@ export default {
}) })
}); });
} }
//
if ('5' == val) {
this.$nextTick(() => {
this.$refs.createRecheck.init(this.currentRow);
});
}
//
if ('6' == val) {
//
this.$confirm(` 确定取消所有派工单操作`, `生产已排料`, {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
let data = {
orderNo: this.currentRow.orderNo,
itemNo: this.currentRow.itemNo,
site: this.currentRow.site,
seqNo: this.currentRow.seqNo,
}
workbenchCancelallops(data).then(({data}) => {
if (data.code == 0) {
this.$message.success(data.msg)
} else {
this.$message.warning(data.msg)
}
})
})
}
//
if ('7' == val) {
//
this.$confirm(` 确定该订单的料已排`, `生产已排料`, {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
let data = {
username: this.$store.state.user.name,
orderNo: this.currentRow.orderNo,
costRollUpFlag: 'Y',
site: this.currentRow.site,
orderChangeStatus: "订单已排料",
}
costRollUpProduceOrder(data).then(({data}) => {
if (data.code == 0) {
this.$message.success(data.msg)
} else {
this.$message.warning(data.msg)
}
})
})
}
//
if ('8' == val) {
//
this.$confirm(` 确定要撤销该订单的排料?`, `撤销订单排料`, {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
let data = {
username: this.$store.state.user.name,
orderNo: this.currentRow.orderNo,
costRollUpFlag: 'N',
site: this.currentRow.site,
orderChangeStatus: "撤销订单排料",
}
costRollUpProduceOrder(data).then(({data}) => {
if (data.code == 0) {
this.$message.success(data.msg)
} else {
this.$message.warning(data.msg)
}
})
})
}
//
if ('9' == val) {
this.$confirm(` 确定该订单的刀模已发?`, `刀模已发`, {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
let data = {
username: this.$store.state.user.name,
orderNo: this.currentRow.orderNo,
manualFlag: 'Y',
site: this.currentRow.site,
orderChangeStatus: "订单刀模已发",
}
manualProduceOrder(data).then(({data}) => {
if (data.code == 0) {
this.$message.success(data.msg)
} else {
this.$message.warning(data.msg)
}
})
})
}
//
if ('10' == val) {
this.$confirm(` 确定要撤销该订单的刀模已发?`, `刀模已发`, {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
let data = {
username: this.$store.state.user.name,
orderNo: this.currentRow.orderNo,
manualFlag: 'N',
site: this.currentRow.site,
orderChangeStatus: "撤销订单刀模已发",
}
manualProduceOrder(data).then(({data}) => {
if (data.code == 0) {
this.$message.success(data.msg)
} else {
this.$message.warning(data.msg)
}
})
})
}
//
if ('11' == val) {
this.$confirm(` 确定该订单的印版已发?`, `印版已发`, {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
let data = {
username: this.$store.state.user.name,
orderNo: this.currentRow.orderNo,
repairSOFlag: 'Y',
site: this.currentRow.site,
orderChangeStatus: "订单印版已发",
}
repairSOFlagProduceOrder(data).then(({data}) => {
if (data.code == 0) {
this.$message.success(data.msg)
} else {
this.$message.warning(data.msg)
}
})
})
}
//
if ('12' == val) {
this.$confirm(` 确定要撤销该订单的印版已发?`, `订单印版`, {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
let data = {
username: this.$store.state.user.name,
orderNo: this.currentRow.orderNo,
repairSOFlag: 'N',
site: this.currentRow.site,
orderChangeStatus: "订单印版已发",
}
repairSOFlagProduceOrder(data).then(({data}) => {
if (data.code == 0) {
this.$message.success(data.msg)
} else {
this.$message.warning(data.msg)
}
})
})
}
}, },
// FQC // FQC
fqcReportModal() { fqcReportModal() {
@ -1502,5 +1835,15 @@ div.customer-el-card-blue {
font-size: 12px; font-size: 12px;
} }
.el-dropdown-menu--medium .el-dropdown-menu__item {
line-height: 18px;
padding: 0 17px;
font-size: 12px;
}
hr {
margin-top: 0px;
}
/*控制上下间距*/ /*控制上下间距*/
</style> </style>
Loading…
Cancel
Save