7 changed files with 432 additions and 585 deletions
-
5src/api/scheduleReport/com_scan_material.js
-
7src/api/scheduleReport/com_separate_roll.js
-
19src/api/yieldReport/com_separate_roll.js
-
442src/views/modules/scheduleReport/com_die_cutting_report.vue
-
216src/views/modules/scheduleReport/com_scan_material.vue
-
326src/views/modules/scheduleReport/com_separate_roll.vue
-
2src/views/modules/scheduleReport/produce_order.vue
@ -1,4 +1,7 @@ |
|||
import { createAPI } from '@/utils/httpRequest.js' |
|||
|
|||
// 查询材料卷信息
|
|||
export const getRmRollData = data => createAPI('schedule/getRmRollData', 'POST', data) |
|||
|
|||
// 材料下机操作
|
|||
export const processCuttingMaterialRoll = data => createAPI('schedule/processCuttingMaterialRoll', 'POST', data) |
|||
export const scanRmRollNo = data => createAPI('schedule/scanRmRollNo', 'POST', data) |
|||
@ -0,0 +1,7 @@ |
|||
import { createAPI } from '@/utils/httpRequest.js' |
|||
|
|||
//获取当前派工单的标准卷数量
|
|||
export const getSeqStandardRollQty = data => createAPI('schedule/getSeqStandardRollQty', 'POST', data) |
|||
|
|||
// 执行创建分卷的操作
|
|||
export const createSplitSfdcRoll = data => createAPI('schedule/createSplitSfdcRoll', 'POST', data) |
|||
@ -1,19 +0,0 @@ |
|||
import { createAPI } from '@/utils/httpRequest.js' |
|||
|
|||
// 校验创建分卷的操作
|
|||
export const checkCreateSplitSfdcRoll = data => createAPI('schedule/checkCreateSplitSfdcRoll', 'POST', data) |
|||
|
|||
// 执行创建分卷的操作
|
|||
export const createSplitSfdcRoll = data => createAPI('schedule/createSplitSfdcRoll', 'POST', data) |
|||
|
|||
|
|||
// 校验fqc创建分卷的操作
|
|||
export const otherCheckCreateSplitSfdcRoll = data => createAPI('schedule/otherCheckCreateSplitSfdcRoll', 'POST', data) |
|||
|
|||
// 执行fqc创建分卷的操作
|
|||
export const otherCreateSplitSfdcRoll = data => createAPI('schedule/otherCreateSplitSfdcRoll', 'POST', data) |
|||
|
|||
|
|||
// 换包装分卷
|
|||
export const workbenchCreateslittingrollRepackAction = data => createAPI('schedule/workbench_createslittingroll_Repack_action', 'POST', data) |
|||
|
|||
@ -0,0 +1,326 @@ |
|||
<template> |
|||
<div class="customer-css"> |
|||
<el-dialog :title="titleCon" v-drag v-bind="$attrs" v-on="$listeners" |
|||
:visible.sync="visible" |
|||
width="200px" style="height: 680px;" class="customer-dialog"> |
|||
<el-form :inline="true" label-position="top" style="height: 100px;" |
|||
label-width="80px"> |
|||
<!-- 半成品卷卷号 --> |
|||
<el-row> |
|||
<el-col :span="24" style="margin-top: -5px;"> |
|||
<el-form-item :label=labels.rollQty> |
|||
<el-input ref="rollQty" v-model="pageData.rollQty" style="width: 180px;" ></el-input> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="24" style="margin-top: -5px;"> |
|||
<el-form-item :label=labels.rollNums> |
|||
<el-input v-model="pageData.rollNums" style="width: 180px;" ></el-input> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
</el-form> |
|||
<span slot="footer" class="dialog-footer"> |
|||
<el-button type="primary" @click="createSeparateRolllBun">{{ buttons.confirmButton }}</el-button> |
|||
<el-button type="primary" @click="closeDialog">{{ buttons.closeButton }}</el-button> |
|||
</span> |
|||
</el-dialog> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import { |
|||
getSeqStandardRollQty, |
|||
createSplitSfdcRoll,/*执行创建分卷的操作*/ |
|||
} from '@/api/scheduleReport/com_separate_roll.js'; |
|||
|
|||
/*打印标签专用的js*/ |
|||
import { |
|||
printSfdcLabel, |
|||
} from "@/views/modules/scheduleReport/print_roll_label.js"; |
|||
|
|||
var functionId = 'C10000003'; |
|||
|
|||
export default { |
|||
data() { |
|||
return { |
|||
titleCon: '创建分卷', |
|||
visible: false, |
|||
scheduleData: { |
|||
site: this.$store.state.user.site, |
|||
username: this.$store.state.user.name, |
|||
seqNo: '', |
|||
orderNo: '', |
|||
itemNo: 0, |
|||
partNo: '', |
|||
workCenterNo: '', |
|||
rollNo: '', |
|||
functionName: '', |
|||
currentRollFlag: false |
|||
}, |
|||
pageData: { |
|||
site: this.$store.state.user.site, |
|||
username: this.$store.state.user.name, |
|||
orderNo: '', |
|||
itemNo: '', |
|||
seqNo: '', |
|||
rollNo: '', |
|||
reportDate: '', |
|||
reportTime: '', |
|||
rollQty: 0, |
|||
rollNums: 1 |
|||
}, |
|||
buttons: { |
|||
confirmButton: '确定', |
|||
closeButton: '关闭', |
|||
}, |
|||
buttonList: [ |
|||
{ |
|||
functionId: functionId, |
|||
languageValue: '确定', |
|||
objectId: 'confirmButton', |
|||
objectType: 'button', |
|||
tableId: '*' |
|||
}, { |
|||
functionId: functionId, |
|||
languageValue: '关闭', |
|||
objectId: 'closeButton', |
|||
objectType: 'button', |
|||
tableId: '*' |
|||
}, |
|||
], |
|||
queryButton: { |
|||
functionId: functionId, |
|||
table_id: '*', |
|||
languageCode: this.$i18n.locale, |
|||
objectType: 'button' |
|||
}, |
|||
labels: { |
|||
titleCon: '创建分卷', |
|||
rollQty: '良品数量:', |
|||
rollNums: '卷数:', |
|||
confirmLabel: '确认', |
|||
cancelLabel: '取消', |
|||
}, |
|||
labelsList: [ |
|||
{ |
|||
functionId: functionId, |
|||
languageValue: '创建分卷', |
|||
objectId: 'titleCon', |
|||
objectType: 'label', |
|||
tableId: '*' |
|||
}, { |
|||
functionId: functionId, |
|||
languageValue: '当前时间:', |
|||
objectId: 'currentTime', |
|||
objectType: 'label', |
|||
tableId: '*' |
|||
}, { |
|||
functionId: functionId, |
|||
languageValue: '良品数量:', |
|||
objectId: 'rollQty', |
|||
objectType: 'label', |
|||
tableId: '*' |
|||
}, { |
|||
functionId: functionId, |
|||
languageValue: '卷数:', |
|||
objectId: 'rollNums', |
|||
objectType: 'label', |
|||
tableId: '*' |
|||
}, { |
|||
functionId: functionId, |
|||
languageValue: '良品数量必须是正整数!', |
|||
objectId: 'approvedQtyMustBeInteger', |
|||
objectType: 'label', |
|||
tableId: '*' |
|||
}, { |
|||
functionId: functionId, |
|||
languageValue: '卷数必须是正整数!', |
|||
objectId: 'rollQtyMustBeInteger', |
|||
objectType: 'label', |
|||
tableId: '*' |
|||
}, { |
|||
functionId: functionId, |
|||
languageValue: '良品数量必须大于零且是整数!', |
|||
objectId: 'approvedQtyMustMoreTanZeroAndBeInteger', |
|||
objectType: 'label', |
|||
tableId: '*' |
|||
}, { |
|||
functionId: functionId, |
|||
languageValue: '卷数必须大于零且是整数!', |
|||
objectId: 'rollQtyMustMoreTanZeroAndBeInteger', |
|||
objectType: 'label', |
|||
tableId: '*' |
|||
}, { |
|||
functionId: functionId, |
|||
languageValue: '请先切换人员!', |
|||
objectId: 'pleaseSwitchOperator', |
|||
objectType: 'label', |
|||
tableId: '*' |
|||
}, { |
|||
functionId: functionId, |
|||
languageValue: '确认', |
|||
objectId: 'confirmLabel', |
|||
objectType: 'label', |
|||
tableId: '*' |
|||
}, { |
|||
functionId: functionId, |
|||
languageValue: '取消', |
|||
objectId: 'cancelLabel', |
|||
objectType: 'label', |
|||
tableId: '*' |
|||
}, |
|||
], |
|||
queryLabel: { |
|||
functionId: functionId, |
|||
table_id: '*', |
|||
languageCode: this.$i18n.locale, |
|||
objectType: 'label' |
|||
}, |
|||
} |
|||
}, |
|||
methods: { |
|||
//页面初始化是的方法 |
|||
init(scheduleData) { |
|||
//初始化参数 |
|||
this.scheduleData = scheduleData; |
|||
//设置参数 |
|||
this.pageData.orderNo = scheduleData.orderNo; |
|||
this.pageData.itemNo = scheduleData.itemNo; |
|||
this.pageData.seqNo = scheduleData.seqNo; |
|||
//清空参数 |
|||
this.pageData.rollQty = 0; |
|||
this.pageData.rollNums = 1; |
|||
this.visible = true; |
|||
//获取焦点 |
|||
this.$nextTick(() => { |
|||
this.$refs.rollQty.focus(); |
|||
}); |
|||
this.titleCon = this.labels.titleCon;//重置标题 |
|||
}, |
|||
|
|||
/*关闭modal*/ |
|||
closeDialog(){ |
|||
//刷新报工的页面 |
|||
this.$emit('refreshPageData'); |
|||
//关闭当前的页面 |
|||
this.$emit('update:visible', false); |
|||
}, |
|||
|
|||
/*检查材料卷号的数据*/ |
|||
checkValidQty() { |
|||
//获取当前是的数量 |
|||
let rollQty = parseFloat(this.pageData.rollQty); |
|||
//判断是否可以修改 |
|||
if (rollQty <= 0 || !Number.isInteger(rollQty)){ |
|||
this.$message.error('卷数量无效!'); |
|||
return false; |
|||
} |
|||
}, |
|||
|
|||
/*检查材料卷号的数据*/ |
|||
checkRollNums() { |
|||
//获取当前是的数量 |
|||
let rollNums = parseFloat(this.pageData.rollNums); |
|||
//判断是否是正整数 |
|||
if (rollNums <= 0 || !Number.isInteger(rollNums)){ |
|||
this.$message.error('卷数量无效!'); |
|||
return false; |
|||
} |
|||
}, |
|||
|
|||
checkCreateSeparateRolllBun() { |
|||
//人员判断 |
|||
if (this.pageData.operatorId == '' || this.pageData.operatorId == null) { |
|||
this.$message.error(this.labels.pleaseSwitchOperator); |
|||
return false; |
|||
} |
|||
|
|||
//获取当前是的数量 |
|||
let rollQty = parseFloat(this.pageData.rollQty); |
|||
//判断是否可以修改 |
|||
if (rollQty <= 0 || !Number.isInteger(rollQty)){ |
|||
this.$message.error('卷数量无效!'); |
|||
return false; |
|||
} |
|||
|
|||
//获取当前是的数量 |
|||
let rollNums = parseFloat(this.pageData.rollNums); |
|||
//判断是否是正整数 |
|||
if (rollNums <= 0 || !Number.isInteger(rollNums)){ |
|||
this.$message.error(this.labels.rollQtyMustMoreTanZeroAndBeInteger); |
|||
return false; |
|||
} |
|||
//校验是否继续 |
|||
checkCreateSplitSfdcRoll(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: this.labels.confirmLabel, |
|||
celButtonText: this.labels.cancelLabel, |
|||
type: 'warning' |
|||
}).then(() => { |
|||
//执行切换卷的操作 |
|||
this.createSeparateRolllOperation(); |
|||
}); |
|||
} else { //执行切换卷的操作 |
|||
this.createSeparateRolllOperation(); |
|||
} |
|||
}); |
|||
}, |
|||
|
|||
/*执行创建分卷的操作*/ |
|||
createSeparateRolllOperation() { |
|||
//处理信息 |
|||
createSplitSfdcRoll(this.pageData).then(({data}) => { |
|||
//判断操作是否成功 |
|||
if (data.code == 500) { |
|||
this.$message.error(data.msg); |
|||
} else { |
|||
//处理打印的数据 |
|||
let printList = data.printList; |
|||
printSfdcLabel(printList); |
|||
//延时关闭弹窗 |
|||
setTimeout(() =>{ |
|||
//关闭当前的页面 |
|||
this.closeDialog(); |
|||
}, 1000) |
|||
} |
|||
}) |
|||
}, |
|||
|
|||
}, |
|||
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