master
schry 2 years ago
parent fb8c4adb9c
commit 8e1860f55e

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

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

Loading…
Cancel
Save