Browse Source

右键菜单 , 数量统计 , 关闭状态 按钮控制 sxm 2022-3-15

master
[li_she] 4 years ago
parent
commit
258de86a06
  1. 128
      src/views/modules/yieldReport/produce_order.vue

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

@ -5,7 +5,9 @@
<legend>菜单</legend> <legend>菜单</legend>
<el-form :inline="true" label-position="top" label-width="100px" style=""> <el-form :inline="true" label-position="top" label-width="100px" style="">
<el-form-item :label="''"> <el-form-item :label="''">
<el-button type="primary" class="customer-bun-mid" style="margin-left: 10px; width: 60px; margin-bottom: 5px;">列表</el-button>
<el-button type="primary" class="customer-bun-mid"
style="margin-left: 10px; width: 60px; margin-bottom: 5px;">列表
</el-button>
</el-form-item> </el-form-item>
<el-form-item :label="''"> <el-form-item :label="''">
<el-button type="primary" @click="refreshPageTables()" class="customer-bun-mid" <el-button type="primary" @click="refreshPageTables()" class="customer-bun-mid"
@ -64,10 +66,12 @@
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
<el-form-item :label="'生产订单号:'"> <el-form-item :label="'生产订单号:'">
<el-input v-model="searchData.orderNo" style="width: 120px" @keyup.enter.native="refreshPageTables" @blur="refreshPageTables"></el-input>
<el-input v-model="searchData.orderNo" style="width: 120px" @keyup.enter.native="refreshPageTables"
@blur="refreshPageTables"></el-input>
</el-form-item> </el-form-item>
<el-form-item :label="'派工单号:'"> <el-form-item :label="'派工单号:'">
<el-input v-model="searchData.seqNo" style="width: 120px" @keyup.enter.native="refreshPageTables" @blur="refreshPageTables"></el-input>
<el-input v-model="searchData.seqNo" style="width: 120px" @keyup.enter.native="refreshPageTables"
@blur="refreshPageTables"></el-input>
</el-form-item> </el-form-item>
<el-form-item :label="''" style="margin-left: -5px;"> <el-form-item :label="''" style="margin-left: -5px;">
<el-checkbox style="margin-top: 20px;" true-label="Y" false-label="N" v-model="searchData.closedFlag">显示已结束派工单 <el-checkbox style="margin-top: 20px;" true-label="Y" false-label="N" v-model="searchData.closedFlag">显示已结束派工单
@ -75,18 +79,18 @@
</el-form-item> </el-form-item>
</el-form> </el-form>
<!-- 查询时间和产品 --> <!-- 查询时间和产品 -->
<el-form :inline="true" label-position="top" label-width="100px">
<el-form-item >
<el-dropdown class="customer-dropdown" @command="handleCommand">
<el-button type="primary">
<el-form :inline="true">
<el-form-item label="生产工单列表">
<el-dropdown style="margin-top: 3px" class="customer-dropdown" @command="handleCommand">
<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" :disable="menuButton.prdButton" >生产订单</el-dropdown-item>
<el-dropdown-item class="customer-li" command="1" disabled >关闭</el-dropdown-item>
<el-dropdown-item class="customer-li" command="1" disabled >打开</el-dropdown-item>
<el-dropdown-item class="customer-li" command="1" disabled >暂停</el-dropdown-item>
<el-dropdown-item class="customer-li" command="1" disabled >重新开工</el-dropdown-item>
<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-menu> </el-dropdown-menu>
</el-dropdown> </el-dropdown>
</el-form-item> </el-form-item>
@ -135,8 +139,8 @@
<!-- 正常的结束派工单组件 --> <!-- 正常的结束派工单组件 -->
<comFinishSchedule :close-on-click-modal="false" <comFinishSchedule :close-on-click-modal="false"
:visible.sync="showFinishScheduleFlag" ref="comFinishSchedule"
@processFinishScheduleOperation = "processFinishScheduleOperation">
:visible.sync="showFinishScheduleFlag" ref="comFinishSchedule"
@processFinishScheduleOperation="processFinishScheduleOperation">
</comFinishSchedule> </comFinishSchedule>
<!-- fqc报工的组件 --> <!-- fqc报工的组件 -->
@ -146,10 +150,10 @@
<!-- 返工重检 --> <!-- 返工重检 -->
<reworkInspectReport :close-on-click-modal="false" <reworkInspectReport :close-on-click-modal="false"
:visible.sync="reworkShowReportFlag" ref="reworkInspectReport"></reworkInspectReport>
:visible.sync="reworkShowReportFlag" ref="reworkInspectReport"></reworkInspectReport>
<!-- 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>
</div> </div>
</template> </template>
@ -174,10 +178,10 @@ export default {
height: 800, height: 800,
showOperatorFlag: false, showOperatorFlag: false,
showReportFlag: false, showReportFlag: false,
fqcShowReportFlag:false,
reworkShowReportFlag:false,
fqcShowReportFlag: false,
reworkShowReportFlag: false,
fqcRollShowReportFlag: false, fqcRollShowReportFlag: false,
showFinishScheduleFlag:false,
showFinishScheduleFlag: false,
searchData: { searchData: {
site: this.$store.state.user.site, site: this.$store.state.user.site,
resourceId: '', resourceId: '',
@ -980,8 +984,12 @@ export default {
fixed: false fixed: false
} }
], ],
menuButton:{
prdButton:true
menuButton: {
prdButton: true,
openButton: true,
closedButton: true,
pauseButton: true,
openReverseButton: true
} }
} }
}, },
@ -999,27 +1007,42 @@ export default {
}) })
}, },
methods: { methods: {
/*区分不同的菜单 调用不同的方法 调用不同的方法*/
handleCommand(val){
//
menuButtonFlag() {
if (JSON.stringify(this.currentRow) == '{}') { if (JSON.stringify(this.currentRow) == '{}') {
this.menuButton.prdButton = true
this.menuButton.openButton = true
this.menuButton.closedButton = true
this.menuButton.pauseButton = true
this.menuButton.openReverseButton = true
} else {
this.menuButton.prdButton = false this.menuButton.prdButton = false
//
if (this.currentRow.closedFlag == 'N'){
this.menuButton.closedButton = false
}
} }
},
/*区分不同的菜单 调用不同的方法 调用不同的方法*/
handleCommand(val) {
// //
if('0' == val){
if ('0' == val) {
if (JSON.stringify(this.currentRow) == '{}') { if (JSON.stringify(this.currentRow) == '{}') {
this.$message.error('请先选择派工单!'); this.$message.error('请先选择派工单!');
return false; return false;
} }
this.$router.push('/shopOrder-shopOrder/shopOrder',this.currentRow.orderNo)
this.$router.push('/shopOrder-shopOrder/shopOrder', this.currentRow.orderNo)
} }
if('1' == val){
if ('1' == val) {
// //
this.warnReScheduleConfirm(); this.warnReScheduleConfirm();
} }
}, },
// FQC // FQC
fqcReportModal(){
fqcReportModal() {
// //
if (JSON.stringify(this.currentRow) == '{}') { if (JSON.stringify(this.currentRow) == '{}') {
this.$message.error('请先选择派工单!'); this.$message.error('请先选择派工单!');
@ -1032,7 +1055,7 @@ export default {
}); });
}, },
// FQC // FQC
fqcSplitRollModal(){
fqcSplitRollModal() {
if (JSON.stringify(this.currentRow) == '{}') { if (JSON.stringify(this.currentRow) == '{}') {
this.$message.error('请先选择派工单!'); this.$message.error('请先选择派工单!');
return false; return false;
@ -1044,7 +1067,7 @@ export default {
}); });
}, },
// //
reworkInspectModal(){
reworkInspectModal() {
// //
if (JSON.stringify(this.currentRow) == '{}') { if (JSON.stringify(this.currentRow) == '{}') {
this.$message.error('请先选择派工单!'); this.$message.error('请先选择派工单!');
@ -1057,7 +1080,7 @@ export default {
}); });
}, },
// //
changePackaging(){
changePackaging() {
}, },
/*查询派工单*/ /*查询派工单*/
@ -1072,6 +1095,7 @@ export default {
/*刷新页面table*/ /*刷新页面table*/
refreshPageTables() { refreshPageTables() {
this.currentRow = {}
this.getProduceScheduleList(); this.getProduceScheduleList();
}, },
/*设置选中行的参数*/ /*设置选中行的参数*/
@ -1080,50 +1104,50 @@ export default {
}, },
// //
initOperatorData(operatorData){
initOperatorData(operatorData) {
this.showOperatorFlag = false; this.showOperatorFlag = false;
this.operatorData = JSON.parse(JSON.stringify(operatorData)); this.operatorData = JSON.parse(JSON.stringify(operatorData));
if (operatorData.reportType == 0){
if (operatorData.reportType == 0) {
// //
this.switchProduceReportModal(); this.switchProduceReportModal();
} }
if (operatorData.reportType == 1){
if (operatorData.reportType == 1) {
//fqc //fqc
this.fqcReportModal(); this.fqcReportModal();
} }
if (operatorData.reportType == 2){
if (operatorData.reportType == 2) {
// //
this.reworkInspectModal(); this.reworkInspectModal();
} }
if (operatorData.reportType == 3){
if (operatorData.reportType == 3) {
//fqc //fqc
this.fqcSplitRollModal(); this.fqcSplitRollModal();
} }
}, },
notInitOperatorData(val){
notInitOperatorData(val) {
// //
this.operatorData.operatorId = ''; this.operatorData.operatorId = '';
this.operatorData.operatorName = ''; this.operatorData.operatorName = '';
// //
this.showOperatorFlag = false; this.showOperatorFlag = false;
if (val == 0){
if (val == 0) {
// //
this.switchProduceReportModal(); this.switchProduceReportModal();
} }
if (val == 1){
if (val == 1) {
//fqc //fqc
this.fqcReportModal(); this.fqcReportModal();
} }
if (val == 2){
if (val == 2) {
// //
this.reworkInspectModal(); this.reworkInspectModal();
} }
if (val == 3){
if (val == 3) {
//fqc //fqc
this.fqcSplitRollModal(); this.fqcSplitRollModal();
} }
@ -1138,26 +1162,26 @@ export default {
this.$message.error('请先选择派工单!'); this.$message.error('请先选择派工单!');
return false; return false;
} }
if(val == 0){
if (val == 0) {
let data = { let data = {
site: this.currentRow.site, site: this.currentRow.site,
resourceId: this.currentRow.resourceId, resourceId: this.currentRow.resourceId,
workCenterNo: this.currentRow.workCenterNo, workCenterNo: this.currentRow.workCenterNo,
seqNo:this.currentRow.seqNo,
seqNo: this.currentRow.seqNo,
username: this.$store.state.user.name username: this.$store.state.user.name
} }
reportCheck(data).then(({data})=>{
if (data.code==0){
reportCheck(data).then(({data}) => {
if (data.code == 0) {
// //
this.showOperatorFlag = true; this.showOperatorFlag = true;
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.comSwitchOperator.init(val); this.$refs.comSwitchOperator.init(val);
}); });
} }
if (data.code == 300){
if (data.code == 300) {
this.$message.warning(data.msg) this.$message.warning(data.msg)
} }
if (data.code == 400){
if (data.code == 400) {
this.$confirm(`${data.msg}`, '提示', { this.$confirm(`${data.msg}`, '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
@ -1171,7 +1195,7 @@ export default {
}) })
} }
}) })
}else {
} else {
// //
this.showOperatorFlag = true; this.showOperatorFlag = true;
this.$nextTick(() => { this.$nextTick(() => {
@ -1210,7 +1234,7 @@ export default {
}, },
// //
processFinishScheduleOperation(){
processFinishScheduleOperation() {
// //
this.refreshPageTables(); this.refreshPageTables();
}, },
@ -1321,19 +1345,23 @@ div.customer-el-card-blue {
.el-radio + .el-radio { .el-radio + .el-radio {
margin-left: 0px; margin-left: 0px;
} }
/*当前按钮的通用样式*/ /*当前按钮的通用样式*/
.customer-css .customer-bun-mid{
.customer-css .customer-bun-mid {
width: 65px; width: 65px;
text-align: center; text-align: center;
} }
/*当前按钮的通用样式*/ /*当前按钮的通用样式*/
.customer-css .el-button--medium { .customer-css .el-button--medium {
padding: 5px 5px; padding: 5px 5px;
} }
/*添加主菜单和明细菜单的样式*/ /*添加主菜单和明细菜单的样式*/
.customer-css .customer-dropdown .el-button--primary{
.customer-css .customer-dropdown .el-button--primary {
padding: 2px; padding: 2px;
font-size: 12px; font-size: 12px;
} }
/*控制上下间距*/ /*控制上下间距*/
</style> </style>
Loading…
Cancel
Save