You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
192 lines
5.4 KiB
192 lines
5.4 KiB
<template>
|
|
<div class="customer-css">
|
|
<el-dialog :title="titleCon" v-drag v-bind="$attrs" v-on="$listeners"
|
|
width="300px" style="height: 680px;" class="customer-dialog">
|
|
<el-form :inline="true" label-position="top" style="height: 60px;"
|
|
label-width="80px">
|
|
<!-- 时间 -->
|
|
<el-row style="margin-top: -10px;">
|
|
<el-col :span="10" >
|
|
<el-form-item :label="'当前时间:'">
|
|
<el-date-picker style="width: 100px;"
|
|
v-model="pageData.reportDate"
|
|
format="yyyy-MM-dd"
|
|
value-format="yyyy-MM-dd"
|
|
placeholder="">
|
|
</el-date-picker>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="8" style="margin-top: 26px;">
|
|
<el-form-item :label="''">
|
|
<el-form-item :label="''">
|
|
<el-time-picker style="width: 80px;"
|
|
v-model="pageData.reportTime"
|
|
format="HH:mm:ss"
|
|
value-format="HH:mm:ss"
|
|
placeholder="">
|
|
</el-time-picker>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-row>
|
|
</el-form>
|
|
<span slot="footer" class="dialog-footer">
|
|
<el-button type="primary" @click="startProduceFun">保存</el-button>
|
|
<el-button type="primary" @click="closeDialog">关闭</el-button>
|
|
</span>
|
|
</el-dialog>
|
|
|
|
<!-- 卷调机-卷材料耗用 -->
|
|
<comEndTuning ref="comEndTuning" :close-on-click-modal="false"
|
|
:visible.sync="endTuningFlag" @closeDialog="closeDialog">
|
|
</comEndTuning>
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
import {
|
|
checkStartProduce,
|
|
startProduce,
|
|
}
|
|
from '@/api/yieldReport//com_start_produce.js';
|
|
/*引入组件*/
|
|
import comEndTuning from './com_end_tuning';
|
|
/*开始生产时候报告调机的材料的使用数量*/
|
|
export default {
|
|
data() {
|
|
return {
|
|
titleCon: '开始生产',
|
|
endTuningFlag: false,
|
|
sfdcTimeList: [],
|
|
pageData: {
|
|
site: this.$store.state.user.site,
|
|
userName: this.$store.state.user.name,
|
|
seqNo: '',
|
|
orderNo: '',
|
|
itemNo: 0,
|
|
rollNo: '',
|
|
operatorId: '',
|
|
reportDate: '',
|
|
reportTime: '',
|
|
},
|
|
operatorData: {
|
|
site: this.$store.state.user.site,
|
|
username: this.$store.state.user.name,
|
|
operatorId: '',
|
|
operatorName: '',
|
|
status: '',
|
|
seqNo: '',
|
|
showFlag: false
|
|
},
|
|
dataListLoading: false,
|
|
}
|
|
},
|
|
components: {
|
|
comEndTuning,/*开始生产时 调用结束调机的功能*/
|
|
},
|
|
methods: {
|
|
|
|
/*页面的初始化方法*/
|
|
init(scheduleData, operatorData) {
|
|
//设置参数
|
|
this.pageData.orderNo = scheduleData.orderNo;
|
|
this.pageData.itemNo = scheduleData.itemNo;
|
|
this.pageData.seqNo = scheduleData.seqNo;
|
|
this.pageData.rollNo = scheduleData.rollNo;
|
|
this.pageData.operatorId = operatorData.operatorId;
|
|
//重置时间
|
|
this.pageData.reportDate = this.dayjs(new Date()).format('YYYY-MM-DD');
|
|
this.pageData.reportTime = this.dayjs(new Date()).format('HH:mm:ss');
|
|
//初始化操作员对象
|
|
this.operatorData = JSON.parse(JSON.stringify(operatorData));
|
|
//初始化标题
|
|
this.titleCon = '开始生产操作 \
|
|
派工单号:'+scheduleData.seqNo;
|
|
// this.currentRollOps.seqNo = seqNo;
|
|
// this.currentRollOps.rollNo = rollNo;
|
|
//刷新当前派工单的信息
|
|
//this.refreshPageData();
|
|
},
|
|
|
|
/*关闭modal*/
|
|
closeDialog(){
|
|
this.$emit('update:visible', false);
|
|
//刷新报工的页面
|
|
this.$emit('refreshPageData')
|
|
},
|
|
|
|
/*开始生产的方法*/
|
|
startProduceFun(){
|
|
//首先要检查是否可以开始生产
|
|
checkStartProduce(this.pageData).then(({data}) => {
|
|
//判断返回的结果 ---》异常
|
|
if(data.code == 500){
|
|
this.$message.error(data.msg);
|
|
//需要跳转到结束调机的功能
|
|
}else if (data.resultMap.resultCode == 201){
|
|
//需要跳到结束停机的页面
|
|
this.comEndTuningModal();
|
|
}else{
|
|
//需要报告开始生产
|
|
this.startProduceOperation();
|
|
}
|
|
|
|
});
|
|
},
|
|
|
|
/*打开结束调机的modal*/
|
|
comEndTuningModal(){
|
|
//打开当前的页面
|
|
this.$nextTick(() => {
|
|
//打开modal
|
|
this.endTuningFlag = true;
|
|
this.$refs.comEndTuning.init(this.pageData, this.operatorData);
|
|
});
|
|
},
|
|
|
|
/*打开结束调机的modal*/
|
|
startProduceOperation(){
|
|
startProduce(this.pageData).then(({data}) => {
|
|
//判断操作是否成功
|
|
if(data.code == 500){
|
|
this.$message.error(data.msg);
|
|
}else{
|
|
//直接关闭当前的modal
|
|
this.closeDialog();
|
|
}
|
|
});
|
|
},
|
|
|
|
|
|
|
|
|
|
},
|
|
created() {
|
|
// this.factoryList()
|
|
// this.getLanguageList()
|
|
}
|
|
}
|
|
|
|
</script>
|
|
|
|
<style scoped lang="scss">
|
|
/*调节页面button和input的上下间距*/
|
|
.customer-css .customer-button{
|
|
margin-top: 25px;
|
|
}
|
|
|
|
/*调节fieldset下的样式*/
|
|
.customer-fieldset .customer-item{
|
|
margin-top: -15px;
|
|
}
|
|
|
|
/*fieldset下table的样式*/
|
|
.customer-fieldset /deep/ .el-table__header th.is-leaf{
|
|
line-height: 16px;
|
|
}
|
|
|
|
/deep/ .customer-tab .el-tabs__content{
|
|
padding: 0px !important;
|
|
}
|
|
|
|
</style>
|