Browse Source

BUG 修改

master
Rui_Li 4 years ago
parent
commit
db6332fa53
  1. 3
      src/api/yieldReport/com_switch_roll.js
  2. 2
      src/views/modules/yieldReport/com_split_order_report.vue
  3. 190
      src/views/modules/yieldReport/com_split_order_switch_roll.vue

3
src/api/yieldReport/com_switch_roll.js

@ -19,3 +19,6 @@ export const switchrollRepackCheck = data => createAPI('schedule/switchrollRepac
// 包装切换卷执行
export const switchrollRepackAction = data => createAPI('schedule/switchrollRepackAction', 'POST', data)
// 换分切工单切换卷校验
export const checkSplitScheduleSwitchRoll = data => createAPI('schedule/checkSplitScheduleSwitchRoll', 'POST', data)

2
src/views/modules/yieldReport/com_split_order_report.vue

@ -606,7 +606,7 @@ import {
} from "@/api/yieldReport/com_split_order_report.js";
/*引入组件*/
import comSwitchOperator from "./com_switch_operator";/*切换操作员*/
import comSwitchRoll from "./com_switch_roll";/*切换卷操作*/
import comSwitchRoll from "./com_split_order_switch_roll";/*切换卷操作*/
import comSeparateRollWithSplit from "./com_separate_roll_with_split";/*创建分卷的组件*/
import comFinishRoll from "./com_finish_roll";/*结束卷数的组件*/
import comFinishPartRoll from "./com_finish_part_roll";//

190
src/views/modules/yieldReport/com_split_order_switch_roll.vue

@ -0,0 +1,190 @@
<template>
<div class="customer-css">
<el-dialog :title="titleCon" v-drag v-bind="$attrs" v-on="$listeners"
width="210px" style="height: 680px;" class="customer-dialog">
<el-form :inline="true" label-position="top" @submit.native.prevent style="height: 60px;"
label-width="80px">
<!-- 半成品卷卷号 -->
<el-row>
<el-col :span="24" style="margin-left: 35px;">
<el-form-item :label="'半成品卷卷号:'">
<el-input ref="newRollNo" v-model="pageData.newRollNo" style="width: 120px;" ></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="switchRollBun"> </el-button>
<el-button type="primary" @click="closeDialog">关闭</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
/*添加组件*/
import comExceptionReason from "./com_exception_reason";//
/*添加js的方法和请求*/
import {
checkSplitScheduleSwitchRoll,/*校验是否可以切换卷*/
switchSfdcRoll,/*执行切换卷的操作*/
} from '@/api/yieldReport/com_switch_roll.js'
export default {
name: "com_merge_roll",
data() {
return {
titleCon: '切换卷',
scheduleData: {
site: this.$store.state.user.site,
username: this.$store.state.user.name,
seqNo: '',
orderNo: '',
itemNo: 0,
resourceId: '',
scheduledDate: '',
shiftNo: '',
partNo: '',
workCenterNo: '',
workCenterDesc: '',
resourceDesc: '',
rollNo: '',
partDesc: '',
planStartTime: '',
planFinishTime: '',
qtyRequiredOriginal: 0,
preItemDesc: '',
nextItemDesc: '',
nextItemNo: 0,
operatorId: '',
functionName: '',
currentRollFlag: false
},
pageData: {
site: this.$store.state.user.site,
username: this.$store.state.user.name,
seqNo: '',
orderNo: '',
itemNo: '',
newRollNo: '',
operatorId: ''
},
operatorData: {
site: this.$store.state.user.site,
username: this.$store.state.user.name,
operatorId: '',
operatorName: '',
status: '',
seqNo: '',
showFlag: false
},
}
},
components: {
comExceptionReason,/*异常原因的组件*/
},
methods: {
//
init(scheduleData, operatorData) {
//
this.scheduleData = scheduleData;
//
this.operatorData = JSON.parse(JSON.stringify(operatorData));
//
this.pageData.orderNo = scheduleData.orderNo;
this.pageData.itemNo = scheduleData.itemNo;
this.pageData.seqNo = scheduleData.seqNo;
this.pageData.operatorId = operatorData.operatorId;
this.pageData.newRollNo = '';
//
this.$nextTick(() => {
this.$refs.newRollNo.focus();
});
},
/*关闭modal*/
closeDialog(){
//
this.$emit('refreshPageData');
//
this.$emit('update:visible', false);
},
switchRollBun() {
//
if (this.pageData.operatorId == '' || this.pageData.operatorId == null) {
this.$message.error('请先切换人员!');
return false;
}
//
let newRollNo = this.pageData.newRollNo;
if (newRollNo == null || newRollNo == '') {
this.$message.error('请输入半成品卷号!');
return false;
}
//
checkSplitScheduleSwitchRoll(this.pageData).then(({data}) => {
//
if (data.code == 500) {
this.$message.error(data.msg);
} else if (data.resultMap.resultCode == '201') {
//
this.$confirm(data.resultMap.resultMsg, '提示', {
confirmButtonText: '确认',
celButtonText: '取消',
type: 'warning'
}).then(() => {
//
this.switchRollOperation();
});
} else { //
this.switchRollOperation();
}
});
},
/*执行切换卷的操作*/
switchRollOperation() {
//
switchSfdcRoll(this.pageData).then(({data}) => {
//
if (data.code == 500) {
this.$message.error(data.msg);
} else {
//
this.pageData.newRollNo = '';
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>
Loading…
Cancel
Save