|
|
|
@ -5,7 +5,9 @@ |
|
|
|
<legend>菜单</legend> |
|
|
|
<el-form :inline="true" label-position="top" label-width="100px" style=""> |
|
|
|
<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 :label="''"> |
|
|
|
<el-button type="primary" @click="refreshPageTables()" class="customer-bun-mid" |
|
|
|
@ -64,10 +66,12 @@ |
|
|
|
</el-date-picker> |
|
|
|
</el-form-item> |
|
|
|
<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 :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 :label="''" style="margin-left: -5px;"> |
|
|
|
<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> |
|
|
|
<!-- 查询时间和产品 --> |
|
|
|
<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> |
|
|
|
</el-button> |
|
|
|
<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> |
|
|
|
</el-form-item> |
|
|
|
@ -135,8 +139,8 @@ |
|
|
|
|
|
|
|
<!-- 正常的结束派工单组件 --> |
|
|
|
<comFinishSchedule :close-on-click-modal="false" |
|
|
|
:visible.sync="showFinishScheduleFlag" ref="comFinishSchedule" |
|
|
|
@processFinishScheduleOperation = "processFinishScheduleOperation"> |
|
|
|
:visible.sync="showFinishScheduleFlag" ref="comFinishSchedule" |
|
|
|
@processFinishScheduleOperation="processFinishScheduleOperation"> |
|
|
|
|
|
|
|
</comFinishSchedule> |
|
|
|
<!-- fqc报工的组件 --> |
|
|
|
@ -146,10 +150,10 @@ |
|
|
|
|
|
|
|
<!-- 返工重检 --> |
|
|
|
<reworkInspectReport :close-on-click-modal="false" |
|
|
|
:visible.sync="reworkShowReportFlag" ref="reworkInspectReport"></reworkInspectReport> |
|
|
|
:visible.sync="reworkShowReportFlag" ref="reworkInspectReport"></reworkInspectReport> |
|
|
|
<!-- FQC分卷 --> |
|
|
|
<fqcSplitRollReport :close-on-click-modal="false" |
|
|
|
:visible.sync="fqcRollShowReportFlag" ref="fqcSplitRollReport"></fqcSplitRollReport> |
|
|
|
:visible.sync="fqcRollShowReportFlag" ref="fqcSplitRollReport"></fqcSplitRollReport> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
|
|
|
|
@ -174,10 +178,10 @@ export default { |
|
|
|
height: 800, |
|
|
|
showOperatorFlag: false, |
|
|
|
showReportFlag: false, |
|
|
|
fqcShowReportFlag:false, |
|
|
|
reworkShowReportFlag:false, |
|
|
|
fqcShowReportFlag: false, |
|
|
|
reworkShowReportFlag: false, |
|
|
|
fqcRollShowReportFlag: false, |
|
|
|
showFinishScheduleFlag:false, |
|
|
|
showFinishScheduleFlag: false, |
|
|
|
searchData: { |
|
|
|
site: this.$store.state.user.site, |
|
|
|
resourceId: '', |
|
|
|
@ -980,8 +984,12 @@ export default { |
|
|
|
fixed: false |
|
|
|
} |
|
|
|
], |
|
|
|
menuButton:{ |
|
|
|
prdButton:true |
|
|
|
menuButton: { |
|
|
|
prdButton: true, |
|
|
|
openButton: true, |
|
|
|
closedButton: true, |
|
|
|
pauseButton: true, |
|
|
|
openReverseButton: true |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
@ -999,27 +1007,42 @@ export default { |
|
|
|
}) |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
/*区分不同的菜单 调用不同的方法 调用不同的方法*/ |
|
|
|
handleCommand(val){ |
|
|
|
// 控制是否显示功能 |
|
|
|
menuButtonFlag() { |
|
|
|
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 |
|
|
|
|
|
|
|
// 获取用户权限 |
|
|
|
if (this.currentRow.closedFlag == 'N'){ |
|
|
|
this.menuButton.closedButton = false |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
/*区分不同的菜单 调用不同的方法 调用不同的方法*/ |
|
|
|
handleCommand(val) { |
|
|
|
//区分是哪一个方法调用 |
|
|
|
if('0' == val){ |
|
|
|
if ('0' == val) { |
|
|
|
if (JSON.stringify(this.currentRow) == '{}') { |
|
|
|
this.$message.error('请先选择派工单!'); |
|
|
|
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(); |
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
// FQC 报工 |
|
|
|
fqcReportModal(){ |
|
|
|
fqcReportModal() { |
|
|
|
//首先判断是否选择好派工单 |
|
|
|
if (JSON.stringify(this.currentRow) == '{}') { |
|
|
|
this.$message.error('请先选择派工单!'); |
|
|
|
@ -1032,7 +1055,7 @@ export default { |
|
|
|
}); |
|
|
|
}, |
|
|
|
// FQC 分卷 |
|
|
|
fqcSplitRollModal(){ |
|
|
|
fqcSplitRollModal() { |
|
|
|
if (JSON.stringify(this.currentRow) == '{}') { |
|
|
|
this.$message.error('请先选择派工单!'); |
|
|
|
return false; |
|
|
|
@ -1044,7 +1067,7 @@ export default { |
|
|
|
}); |
|
|
|
}, |
|
|
|
// 返工重捡 |
|
|
|
reworkInspectModal(){ |
|
|
|
reworkInspectModal() { |
|
|
|
//首先判断是否选择好派工单 |
|
|
|
if (JSON.stringify(this.currentRow) == '{}') { |
|
|
|
this.$message.error('请先选择派工单!'); |
|
|
|
@ -1057,7 +1080,7 @@ export default { |
|
|
|
}); |
|
|
|
}, |
|
|
|
// 换包装 |
|
|
|
changePackaging(){ |
|
|
|
changePackaging() { |
|
|
|
|
|
|
|
}, |
|
|
|
/*查询派工单*/ |
|
|
|
@ -1072,6 +1095,7 @@ export default { |
|
|
|
|
|
|
|
/*刷新页面table*/ |
|
|
|
refreshPageTables() { |
|
|
|
this.currentRow = {} |
|
|
|
this.getProduceScheduleList(); |
|
|
|
}, |
|
|
|
/*设置选中行的参数*/ |
|
|
|
@ -1080,50 +1104,50 @@ export default { |
|
|
|
}, |
|
|
|
|
|
|
|
//设置参数 |
|
|
|
initOperatorData(operatorData){ |
|
|
|
initOperatorData(operatorData) { |
|
|
|
this.showOperatorFlag = false; |
|
|
|
this.operatorData = JSON.parse(JSON.stringify(operatorData)); |
|
|
|
if (operatorData.reportType == 0){ |
|
|
|
if (operatorData.reportType == 0) { |
|
|
|
//切换到报工组件 |
|
|
|
this.switchProduceReportModal(); |
|
|
|
} |
|
|
|
|
|
|
|
if (operatorData.reportType == 1){ |
|
|
|
if (operatorData.reportType == 1) { |
|
|
|
//切换到fqc报工组件 |
|
|
|
this.fqcReportModal(); |
|
|
|
} |
|
|
|
|
|
|
|
if (operatorData.reportType == 2){ |
|
|
|
if (operatorData.reportType == 2) { |
|
|
|
//切换到返工 重检组件 |
|
|
|
this.reworkInspectModal(); |
|
|
|
} |
|
|
|
if (operatorData.reportType == 3){ |
|
|
|
if (operatorData.reportType == 3) { |
|
|
|
//切换到fqc分卷组件 |
|
|
|
this.fqcSplitRollModal(); |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
notInitOperatorData(val){ |
|
|
|
notInitOperatorData(val) { |
|
|
|
//注销用户信息 |
|
|
|
this.operatorData.operatorId = ''; |
|
|
|
this.operatorData.operatorName = ''; |
|
|
|
//关闭切换用户模态框 |
|
|
|
this.showOperatorFlag = false; |
|
|
|
if (val == 0){ |
|
|
|
if (val == 0) { |
|
|
|
//切换到报工组件 |
|
|
|
this.switchProduceReportModal(); |
|
|
|
} |
|
|
|
|
|
|
|
if (val == 1){ |
|
|
|
if (val == 1) { |
|
|
|
//切换到fqc报工组件 |
|
|
|
this.fqcReportModal(); |
|
|
|
} |
|
|
|
|
|
|
|
if (val == 2){ |
|
|
|
if (val == 2) { |
|
|
|
//切换到返工 重检组件 |
|
|
|
this.reworkInspectModal(); |
|
|
|
} |
|
|
|
if (val == 3){ |
|
|
|
if (val == 3) { |
|
|
|
//切换到fqc分卷组件 |
|
|
|
this.fqcSplitRollModal(); |
|
|
|
} |
|
|
|
@ -1138,26 +1162,26 @@ export default { |
|
|
|
this.$message.error('请先选择派工单!'); |
|
|
|
return false; |
|
|
|
} |
|
|
|
if(val == 0){ |
|
|
|
if (val == 0) { |
|
|
|
let data = { |
|
|
|
site: this.currentRow.site, |
|
|
|
resourceId: this.currentRow.resourceId, |
|
|
|
workCenterNo: this.currentRow.workCenterNo, |
|
|
|
seqNo:this.currentRow.seqNo, |
|
|
|
seqNo: this.currentRow.seqNo, |
|
|
|
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.$nextTick(() => { |
|
|
|
this.$refs.comSwitchOperator.init(val); |
|
|
|
}); |
|
|
|
} |
|
|
|
if (data.code == 300){ |
|
|
|
if (data.code == 300) { |
|
|
|
this.$message.warning(data.msg) |
|
|
|
} |
|
|
|
if (data.code == 400){ |
|
|
|
if (data.code == 400) { |
|
|
|
this.$confirm(`${data.msg}`, '提示', { |
|
|
|
confirmButtonText: '确定', |
|
|
|
cancelButtonText: '取消', |
|
|
|
@ -1171,7 +1195,7 @@ export default { |
|
|
|
}) |
|
|
|
} |
|
|
|
}) |
|
|
|
}else { |
|
|
|
} else { |
|
|
|
//打开操作员切换功能 |
|
|
|
this.showOperatorFlag = true; |
|
|
|
this.$nextTick(() => { |
|
|
|
@ -1210,7 +1234,7 @@ export default { |
|
|
|
}, |
|
|
|
|
|
|
|
//结束派工单后刷新页面 |
|
|
|
processFinishScheduleOperation(){ |
|
|
|
processFinishScheduleOperation() { |
|
|
|
//刷新当前页面的数据 |
|
|
|
this.refreshPageTables(); |
|
|
|
}, |
|
|
|
@ -1321,19 +1345,23 @@ div.customer-el-card-blue { |
|
|
|
.el-radio + .el-radio { |
|
|
|
margin-left: 0px; |
|
|
|
} |
|
|
|
|
|
|
|
/*当前按钮的通用样式*/ |
|
|
|
.customer-css .customer-bun-mid{ |
|
|
|
.customer-css .customer-bun-mid { |
|
|
|
width: 65px; |
|
|
|
text-align: center; |
|
|
|
} |
|
|
|
|
|
|
|
/*当前按钮的通用样式*/ |
|
|
|
.customer-css .el-button--medium { |
|
|
|
padding: 5px 5px; |
|
|
|
} |
|
|
|
|
|
|
|
/*添加主菜单和明细菜单的样式*/ |
|
|
|
.customer-css .customer-dropdown .el-button--primary{ |
|
|
|
.customer-css .customer-dropdown .el-button--primary { |
|
|
|
padding: 2px; |
|
|
|
font-size: 12px; |
|
|
|
} |
|
|
|
|
|
|
|
/*控制上下间距*/ |
|
|
|
</style> |