Browse Source

部分代码

LIrui
DouDou 2 years ago
parent
commit
fac39156c5
  1. 1610
      src/views/modules/scheduleReport/com_die_cutting_report.vue
  2. 315
      src/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

315
src/views/modules/scheduleReport/com_scan_material.vue

@ -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>
Loading…
Cancel
Save