2 changed files with 1925 additions and 0 deletions
-
1610src/views/modules/scheduleReport/com_die_cutting_report.vue
-
315src/views/modules/scheduleReport/com_scan_material.vue
1610
src/views/modules/scheduleReport/com_die_cutting_report.vue
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
@ -0,0 +1,315 @@ |
|||||
|
<template> |
||||
|
<div class="customer-css"> |
||||
|
<el-dialog :title="titleCon" v-drag v-bind="$attrs" v-on="$listeners" |
||||
|
width="200px" style="height: 360px;" class="customer-dialog"> |
||||
|
<el-container style="height: 150px;"> |
||||
|
<el-form :inline="true" label-position="top" label-width="80px"> |
||||
|
<!-- 材料卷号和BOM序号 --> |
||||
|
<el-row> |
||||
|
<el-col :span="16"> |
||||
|
<el-form-item :label=labels.rmRollNo> |
||||
|
<el-input v-model="pageData.rmRollNo" disabled="disabled" style="width: 120px"> |
||||
|
</el-input> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
<el-row> |
||||
|
<el-col :span="16"> |
||||
|
<el-form-item :label=labels.transQty> |
||||
|
<el-input ref="transQty" @blur="checkValidQty" |
||||
|
v-model="pageData.transQty" |
||||
|
style="width: 120px"> |
||||
|
</el-input> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
<el-row> |
||||
|
<el-col :span="16"> |
||||
|
<el-form-item :label=labels.bomItemNo> |
||||
|
<el-input v-model="pageData.bomItemNo" disabled="disabled" |
||||
|
style="width: 120px"> |
||||
|
</el-input> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
</el-form> |
||||
|
</el-container> |
||||
|
<span slot="footer" class="dialog-footer"> |
||||
|
<el-button type="primary" @click="processCuttingMaterialBun">{{ buttons.confirmButton }}</el-button> |
||||
|
<el-button type="primary" @click="closeDialog">{{ buttons.closeButton }}</el-button> |
||||
|
<el-button v-if="showDefault" @click="saveMultiLanguage()" type="primary">多语言设置</el-button> |
||||
|
</span> |
||||
|
</el-dialog> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import { |
||||
|
processCuttingMaterialRoll, |
||||
|
} from "@/api/scheduleReport/com_scan_material.js"; |
||||
|
|
||||
|
var functionId = 'C10000002'; |
||||
|
|
||||
|
export default { |
||||
|
data() { |
||||
|
return { |
||||
|
titleCon: '材料退料', |
||||
|
showDefault: false, |
||||
|
sfdcTimeList: [], |
||||
|
selectFlag: true, |
||||
|
scheduleData: { |
||||
|
site: this.$store.state.user.site, |
||||
|
username: this.$store.state.user.name, |
||||
|
seqNo: '', |
||||
|
orderNo: '', |
||||
|
itemNo: 0, |
||||
|
partNo: '', |
||||
|
workCenterNo: '', |
||||
|
workCenterDesc: '', |
||||
|
resourceDesc: '', |
||||
|
rollNo: '', |
||||
|
partDesc: '', |
||||
|
planStartTime: '', |
||||
|
planFinishTime: '', |
||||
|
qtyRequiredOriginal: 0, |
||||
|
scheduledDate: '', |
||||
|
shiftNo: '', |
||||
|
preItemDesc: '', |
||||
|
nextItemDesc: '', |
||||
|
nextItemNo: 0, |
||||
|
operatorId: '', |
||||
|
functionName: '', |
||||
|
currentRollFlag: false |
||||
|
}, |
||||
|
timeArray: [], |
||||
|
pageData: { |
||||
|
site: this.$store.state.user.site, |
||||
|
username: this.$store.state.user.name, |
||||
|
seqNo: '', |
||||
|
orderNo: '', |
||||
|
itemNo: 0, |
||||
|
rollNo: '', |
||||
|
rmRollNo: '', |
||||
|
rmPartNo: '', |
||||
|
transQty: 0, |
||||
|
oriTransQty: 0, |
||||
|
bomItemNo: '', |
||||
|
histSeqNo: -1, |
||||
|
operatorId: '', |
||||
|
closedFlag: 'N' |
||||
|
}, |
||||
|
operatorData: { |
||||
|
site: this.$store.state.user.site, |
||||
|
username: this.$store.state.user.name, |
||||
|
operatorId: '', |
||||
|
operatorName: '', |
||||
|
status: '', |
||||
|
seqNo: '', |
||||
|
showFlag: false |
||||
|
}, |
||||
|
dataListLoading: false, |
||||
|
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: '材料退料', |
||||
|
rmRollNo: '材料卷号:', |
||||
|
transQty: '退料数量:', |
||||
|
bomItemNo: 'BOM序号:', |
||||
|
returnQtyMoreThanDeliveryQty: '退料数量超过了该记录上的发料数量!', |
||||
|
pleaseEnterValidQty: '请输入有效的数量!', |
||||
|
}, |
||||
|
labelsList: [ |
||||
|
{ |
||||
|
functionId: functionId, |
||||
|
languageValue: '材料退料', |
||||
|
objectId: 'titleCon', |
||||
|
objectType: 'label', |
||||
|
tableId: '*' |
||||
|
}, { |
||||
|
functionId: functionId, |
||||
|
languageValue: '材料卷号:', |
||||
|
objectId: 'rmRollNo', |
||||
|
objectType: 'label', |
||||
|
tableId: '*' |
||||
|
}, { |
||||
|
functionId: functionId, |
||||
|
languageValue: '退料数量:', |
||||
|
objectId: 'transQty', |
||||
|
objectType: 'label', |
||||
|
tableId: '*' |
||||
|
}, { |
||||
|
functionId: functionId, |
||||
|
languageValue: 'BOM序号:', |
||||
|
objectId: 'bomItemNo', |
||||
|
objectType: 'label', |
||||
|
tableId: '*' |
||||
|
}, { |
||||
|
functionId: functionId, |
||||
|
languageValue: '退料数量超过了该记录上的发料数量!', |
||||
|
objectId: 'returnQtyMoreThanDeliveryQty', |
||||
|
objectType: 'label', |
||||
|
tableId: '*' |
||||
|
}, { |
||||
|
functionId: functionId, |
||||
|
languageValue: '请输入有效的数量!', |
||||
|
objectId: 'pleaseEnterValidQty', |
||||
|
objectType: 'label', |
||||
|
tableId: '*' |
||||
|
}, |
||||
|
], |
||||
|
queryLabel: { |
||||
|
functionId: functionId, |
||||
|
table_id: '*', |
||||
|
languageCode: this.$i18n.locale, |
||||
|
objectType: 'label' |
||||
|
}, |
||||
|
} |
||||
|
}, |
||||
|
methods: { |
||||
|
|
||||
|
//初始化页面的参数 |
||||
|
init(scheduleData, operatorData, materialData) { |
||||
|
//初始化参数 |
||||
|
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.rollNo = scheduleData.rollNo; |
||||
|
this.pageData.rmRollNo = materialData.rmRollNo; |
||||
|
this.pageData.rmPartNo = materialData.partNo; |
||||
|
this.pageData.bomItemNo = materialData.sAPBOMItemNo; |
||||
|
this.pageData.transQty = materialData.transQty |
||||
|
this.pageData.oriTransQty = materialData.transQty; |
||||
|
this.pageData.histSeqNo = materialData.histSeqNo; |
||||
|
this.pageData.operatorId = operatorData.operatorId; |
||||
|
this.getMultiLanguageList(); //刷新多语言的信息 |
||||
|
//自动获取焦点 |
||||
|
this.$nextTick(() => { |
||||
|
this.$refs.transQty.focus(); |
||||
|
}); |
||||
|
//清空当前的时间数据 |
||||
|
this.timeArray = []; |
||||
|
//重置标题 |
||||
|
this.titleCon = this.labels.titleCon; |
||||
|
}, |
||||
|
|
||||
|
/*关闭modal*/ |
||||
|
closeDialog(){ |
||||
|
this.$emit('update:visible', false); |
||||
|
}, |
||||
|
|
||||
|
/*检查材料卷号的数据*/ |
||||
|
checkValidQty() { |
||||
|
//获取当前是的数量 |
||||
|
let transQty = this.pageData.transQty; |
||||
|
//判断是否可以修改 |
||||
|
if (transQty > this.pageData.oriTransQty){ |
||||
|
this.$message.error(this.labels.returnQtyMoreThanDeliveryQty); |
||||
|
return false; |
||||
|
} |
||||
|
//判断时间是否在范围之内 |
||||
|
if(transQty < 0){ |
||||
|
this.$message.error(this.labels.pleaseEnterValidQty); |
||||
|
return false; |
||||
|
} |
||||
|
}, |
||||
|
|
||||
|
/*处理材料下料的记录*/ |
||||
|
processCuttingMaterialBun(){ |
||||
|
//数量是否符合要求 |
||||
|
let transQty = this.pageData.transQty; |
||||
|
//判断是否可以修改 |
||||
|
if (transQty > this.pageData.oriTransQty){ |
||||
|
this.$message.error(this.labels.returnQtyMoreThanDeliveryQty); |
||||
|
return false; |
||||
|
} |
||||
|
//判断时间是否在范围之内 |
||||
|
if(transQty <= 0){ |
||||
|
this.$message.error(this.labels.pleaseEnterValidQty); |
||||
|
return false; |
||||
|
} |
||||
|
//调用方法执行上材料 |
||||
|
processCuttingMaterialRoll(this.pageData).then(({data}) => { |
||||
|
if(data.code == 500){ |
||||
|
this.$message.error(data.msg); |
||||
|
}else{ |
||||
|
this.$message.success(data.msg); |
||||
|
//刷新报工的页面 |
||||
|
this.$emit('refreshPageData'); |
||||
|
//打印材料卷标签 |
||||
|
let printList = data.printList; |
||||
|
printMaterialLabel(printList); |
||||
|
//关闭当前的页面 |
||||
|
this.closeDialog(); |
||||
|
} |
||||
|
}); |
||||
|
}, |
||||
|
|
||||
|
// 保存 默认配置 列 |
||||
|
async saveMultiLanguage() { |
||||
|
// 保存页面 button label title 属性 |
||||
|
let buttons = this.buttonList; |
||||
|
let labels = this.labelsList; |
||||
|
await saveButtonList(buttons) |
||||
|
await saveButtonList(labels) |
||||
|
}, |
||||
|
|
||||
|
getMultiLanguageList() { |
||||
|
//首先查询当前按钮的多语言 |
||||
|
searchFunctionButtonList(this.queryButton).then(({data}) => { |
||||
|
if (data && data.code == 0 ) { |
||||
|
this.buttons = data.data |
||||
|
} else { |
||||
|
// saveButtonList(this.buttonList).then(({data}) => { |
||||
|
// }) |
||||
|
} |
||||
|
}); |
||||
|
//其次查询当前标签的多语言 |
||||
|
searchFunctionButtonList(this.queryLabel).then(({data}) => { |
||||
|
if (data && data.code == 0 ) { |
||||
|
this.labels = data.data |
||||
|
} else { |
||||
|
// saveButtonList(this.buttonList).then(({data}) => { |
||||
|
// }) |
||||
|
} |
||||
|
}); |
||||
|
}, |
||||
|
|
||||
|
}, |
||||
|
created() { |
||||
|
// this.factoryList() |
||||
|
// this.getLanguageList() |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
<style scoped lang="scss"> |
||||
|
|
||||
|
|
||||
|
</style> |
||||
Write
Preview
Loading…
Cancel
Save
Reference in new issue