master
schry 2 years ago
parent fb8c4adb9c
commit 8e1860f55e

@ -155,7 +155,7 @@
<template slot="title">
<p class="form-title">生产信息</p>
</template>
<el-table v-loading="loading" :data="listOrder"
<el-table v-loading="manuOrderLoading" :data="listOrder"
style="width: 100%"
@row-click="handleSelectionChange"
highlight-current-row border>
@ -461,7 +461,7 @@
<template slot="title">
<p class="form-title">出入库单据信息</p>
</template>
<el-table v-loading="loading" :data="list"
<el-table v-loading="loading" :data="this.list"
style="width: 100%"
border highlight-current-row>
<el-table-column label="序号" type="index"></el-table-column>
@ -713,12 +713,14 @@
<script>
import {filterylqxzcrbarmc,filterCpmctymc,
filterGgxh, filterNameCode, sourceSearch,filterCompanyName} from "@/api/udi/udiTrace";
filterGgxh, filterNameCode, sourceSearch,filterCompanyName,getTraceManuOrderList,
getManuCodeRelList} from "@/api/udi/udiTrace";
export default {
data() {
return {
monitorOrder: "", // id便
filterQuery: {
udiCode: null,
ylqxzcrbarmc: null,
@ -732,7 +734,11 @@ export default {
},
total: 0,
loading: false,
manuOrderLoading: false,
manuCodeRelLoading: false,
list: [],
listOrder: [],
listCodeRel: [],
open: false,
formView: {},
manuOrderFormView: {},
@ -749,7 +755,61 @@ export default {
}
},
methods: {
formaterSourceType(row){
getManuCodeRel() {
if (this.currentRow == null || isBlank(this.currentRow.billNo)) {
this.$message.error("请先选择需要查询的单据!")
return;
}
this.manuCodeRelLoading = true;
this.manuCodeRelQuery.manuOrderNo = this.currentRow.billNo;
getManuCodeRelList(this.manuCodeRelQuery).then((res) => {
this.manuCodeRelLoading = false;
if (res.code === 20000) {
this.listCodeRel = res.data.list || [];
this.codeRelTotal = res.data.total || 0;
console.log(this.listCodeRel)
} else {
this.$message.error(res.message);
this.listCodeRel = [];
this.codeRelTotal = 0;
}
}).catch((error) => {
this.manuCodeRelLoading = false;
this.$message.error(error.message);
this.listCodeRel = [];
this.codeRelTotal = 0;
})
},
getManuOrderList() {
//
this.listCodeRel = null;
this.loading = true;
getTraceManuOrderList(this.filterQuery).then((res) => {
this.loading = false;
if (res.code === 20000) {
this.listOrder = res.data.list || [];
this.total = res.data.total || 0;
console.log(this.listOrder)
} else {
this.$message.error(res.message);
this.listOrder = [];
this.total = 0;
}
}).catch((error) => {
this.loading = false;
this.$message.error(error.message);
this.listOrder = [];
this.total = 0;
})
},
orderTimeOut() {
//
this.filterQuery.page = 1;
this.getList()
// 使
this.monitorOrder = setTimeout(this.orderTimeOut, 10000);
},
formaterSourceType(row){
if (row.sourceType == 1) {
this.formateSourceType = "起始位置"
return "起始位置"
@ -771,11 +831,11 @@ export default {
}
},
formatCompanyName(row){
let temp = this.companyNameList.find(item=>{
return item.id == row.companyIdFk
this.companyNameList.find(item=>{
if (item.id == row.companyIdFk) {
this.formateCompanyName = item.companyName
}
})
this.formateCompanyName = temp.companyName
return temp && temp.companyName
},
getCompanyName(){
let cQuery = {
@ -891,11 +951,16 @@ export default {
limit: 10,
};
this.list = null
clearTimeout(this.monitorOrder);
this.monitorOrder = null
//this.total = 0
},
onSubmit() {
this.filterQuery.page = 1;
this.getList()
this.orderTimeOut()
if (this.list != null) {
clearTimeout(this.monitorOrder);
this.monitorOrder = null
}
},
getList() {
this.loading = true;
@ -904,7 +969,7 @@ export default {
if (res.code === 20000) {
this.list = res.data || [];
this.total = res.data.total || 0;
console.log(this.list)
console.log(res.data)
} else {
this.$message.error(res.message);
this.list = [];
@ -920,6 +985,11 @@ export default {
},
created() {
this.getCompanyName()
},
beforeDestroy() {
if (this.monitorOrder) {
clearTimeout(this.monitorOrder)
}
}
}
</script>

@ -482,11 +482,11 @@ export default {
}
},
formatCompanyName(row){
let temp = this.companyNameList.find(item=>{
return item.id == row.companyIdFk
this.companyNameList.find(item=>{
if (item.id == row.companyIdFk) {
this.companyNameDetail = item.companyName
}
})
this.companyNameDetail = temp.companyName
return temp && temp.companyName
},
geCompanyNameList(query) {
let cQuery = {

Loading…
Cancel
Save