9 changed files with 340 additions and 13 deletions
-
5src/api/yieldReport/com_separate_roll.js
-
6src/api/yieldReport/com_switch_roll.js
-
2src/views/modules/yieldReport/com_finish_roll.vue
-
2src/views/modules/yieldReport/otherReport/bulk_inspection.vue
-
27src/views/modules/yieldReport/otherReport/change_packaging.vue
-
299src/views/modules/yieldReport/otherReport/change_switch_roll.vue
-
6src/views/modules/yieldReport/otherReport/fqc_produce_report_normal.vue
-
3src/views/modules/yieldReport/otherReport/fqc_split_roll_report.vue
-
3src/views/modules/yieldReport/otherReport/rework_inspect_report.vue
@ -0,0 +1,299 @@ |
|||||
|
<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> |
||||
|
<el-col :span="24" style="margin-left: 0px;"> |
||||
|
<el-form-item :label="'产品卷号:'"> |
||||
|
<el-input ref="newRollNo" v-model="pageData.newRollNo" style="width: 208px;" ></el-input> |
||||
|
</el-form-item> |
||||
|
|
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
<el-row> |
||||
|
<el-col :span="24" style="margin-left: 0px;"> |
||||
|
<el-form-item label="排产日期:"> |
||||
|
<el-date-picker style="width: 100px" |
||||
|
format="yyyy-MM-dd" |
||||
|
value-format="yyyy-MM-dd hh:mm:ss" v-model="currentDate" readonly> |
||||
|
</el-date-picker> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="班次:"> |
||||
|
<el-input style="width: 120px" v-model="shift" readonly> |
||||
|
</el-input> |
||||
|
</el-form-item> |
||||
|
<el-button type="info" :disabled="buttonTags.selectShiftFlag" plain @click="selectSchduleShiftModal" |
||||
|
style="margin-left: -10px; margin-top: 20px; height: 20px; padding: 3px 3px;"> |
||||
|
<icon-svg name="ellipsis" style="height: 10px; width: 10px;" ></icon-svg> |
||||
|
</el-button> |
||||
|
</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";//异常远远 |
||||
|
import { |
||||
|
getScheduleDateShift, |
||||
|
getScheduleShiftData,/*LR 新增查询班次的方法*/ |
||||
|
} from "@/api/yieldReport/produce_report_normal.js"; |
||||
|
/*添加js的方法和请求*/ |
||||
|
import { |
||||
|
switchrollRepackCheck , /*换包装切换卷校验*/ |
||||
|
switchrollRepackAction/*换包装执行切换卷的操作*/ |
||||
|
} from '@/api/yieldReport/com_switch_roll.js' |
||||
|
import comSelectShift from "../com_select_shift"; |
||||
|
export default { |
||||
|
data() { |
||||
|
return { |
||||
|
shift: '', |
||||
|
site: this.$store.state.user.site, |
||||
|
reportedBy: this.$store.state.user.name, |
||||
|
buttonTags:{ |
||||
|
selectShiftFlag: true, |
||||
|
}, |
||||
|
currentDate: '', |
||||
|
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: '', |
||||
|
// fqc , 切换卷参数 |
||||
|
repairOrderFlag: 'N', |
||||
|
checkMultipleRoll: 'Y', |
||||
|
directPass: 'N', |
||||
|
// repackage |
||||
|
resourceId: '', |
||||
|
currentDate:'', |
||||
|
directRepackageflag:true, |
||||
|
workcenterno: '', |
||||
|
shiftNo: '', |
||||
|
scheduledDate: '' |
||||
|
}, |
||||
|
operatorData: { |
||||
|
site: this.$store.state.user.site, |
||||
|
username: this.$store.state.user.name, |
||||
|
operatorId: '', |
||||
|
operatorName: '', |
||||
|
status: '', |
||||
|
seqNo: '', |
||||
|
showFlag: false |
||||
|
}, |
||||
|
scheduleDateShiftDto: { |
||||
|
site: '', |
||||
|
resourceId: '', |
||||
|
currentDateTime: '' |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
components: { |
||||
|
comExceptionReason,/*异常原因的组件*/ |
||||
|
comSelectShift,/*班次选择的组件*/ |
||||
|
}, |
||||
|
methods: { |
||||
|
// 获取排产日期 |
||||
|
searchScheduleDateShift() { |
||||
|
getScheduleDateShift(this.scheduleDateShiftDto).then(({data}) => { |
||||
|
if (data.code == 0) { |
||||
|
this.currentDate = data.map.scheduleddate |
||||
|
this.shift = data.map.ShiftNo |
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
searchScheduleShiftData(){ |
||||
|
let requestData = {'site': this.site, 'username': this.reportedBy,reportedTime:this.scheduleDateShiftDto.currentDateTime}; |
||||
|
getScheduleShiftData(requestData).then(({data}) => { |
||||
|
let specialAuth = data.row.specialAuth; |
||||
|
//根据不同设置不同的属性 |
||||
|
if("Y" === specialAuth){ |
||||
|
this.buttonTags.selectShiftFlag = false; |
||||
|
}else{ |
||||
|
this.buttonTags.selectShiftFlag = true; |
||||
|
} |
||||
|
}); |
||||
|
}, |
||||
|
|
||||
|
/*打开班次选择页面*/ |
||||
|
selectSchduleShiftModal(){ |
||||
|
//1.首先调用菜单判断方式 打开生产过程的材料的页面 |
||||
|
//checkProduceButton('produceMaterialFlag'); |
||||
|
//处理请求的参数 |
||||
|
let requestData = {'site': this.site, 'username': this.reportedBy, 'resourceId': this.sfdcRolls.resourceId, |
||||
|
'reportedTime': this.scheduleDateShiftDto.currentDateTime, 'scheduledDate': this.scheduleDateShiftDto.currentDateTime.substring(0, 10)}; |
||||
|
//打开生产过程的工具的页面 |
||||
|
this.$nextTick(() => { |
||||
|
this.showShiftFlag = true; |
||||
|
this.$refs.comSelectShift.init(requestData); |
||||
|
}); |
||||
|
}, |
||||
|
/*修改页面的班次和排产的时间*/ |
||||
|
initScheduleShift(scheduleDate, shiftDesc, username){ |
||||
|
//重置班次和排产的时间 |
||||
|
this.currentDate = scheduleDate.substring(0, 10); |
||||
|
this.shift = shiftDesc; |
||||
|
}, |
||||
|
//页面的初始化的方法 |
||||
|
init(scheduleData, operatorData) { |
||||
|
this.pageData.newRollNo = '' |
||||
|
//初始化参数 |
||||
|
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.repairOrderFlag = scheduleData.repairOrderFlag; |
||||
|
this.pageData.checkMultipleRoll = scheduleData.checkMultipleRoll; |
||||
|
this.pageData.directPass = scheduleData.directPass; |
||||
|
this.pageData.resourceId = scheduleData.resourceId; |
||||
|
this.pageData.workcenterno = scheduleData.workcenterno; |
||||
|
this.pageData.currentDate = this.dayjs().format("YYYY-MM-DD HH:mm:ss") |
||||
|
this.scheduleDateShiftDto.resourceId = scheduleData.resourceId |
||||
|
this.scheduleDateShiftDto.currentDateTime = this.dayjs().format("YYYY-MM-DD HH:mm:ss") |
||||
|
|
||||
|
this.searchScheduleDateShift(); |
||||
|
//刷新是否可以选择班次的按钮 |
||||
|
this.searchScheduleShiftData(); |
||||
|
//自动获取焦点 |
||||
|
this.$nextTick(() => { |
||||
|
this.$refs.newRollNo.focus(); |
||||
|
}); |
||||
|
|
||||
|
}, |
||||
|
|
||||
|
/*关闭modal*/ |
||||
|
closeDialog(){ |
||||
|
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; |
||||
|
} |
||||
|
//校验是否继续 |
||||
|
switchrollRepackCheck(this.pageData).then(({data}) => { |
||||
|
//判断是否成功 |
||||
|
if (data.code == 400) { |
||||
|
this.$message.error(data.msg); |
||||
|
} else 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() { |
||||
|
if (!this.currentDate){ |
||||
|
this.$message.warning('请选择排产日期'); |
||||
|
return; |
||||
|
} |
||||
|
this.pageData.scheduledDate = this.currentDate |
||||
|
switchrollRepackAction(this.pageData).then(({data}) => { |
||||
|
//判断操作是否成功 |
||||
|
if (data.code == 400) { |
||||
|
this.$message.warning(data.msg); |
||||
|
} else if (data.code == 500){ |
||||
|
this.$message.error(data.msg); |
||||
|
} else { |
||||
|
//刷新报工的页面 |
||||
|
this.$emit('refreshPageData'); |
||||
|
//关闭当前的页面 |
||||
|
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> |
||||
Write
Preview
Loading…
Cancel
Save
Reference in new issue