Commit e1edb637 authored by zhoutong's avatar zhoutong

修复一些出货的bug

parent f77ff94c
...@@ -50,16 +50,16 @@ ...@@ -50,16 +50,16 @@
<el-form-item :label="$t('始发地')"> <el-form-item :label="$t('始发地')">
<p>{{importCityName(queryParams.startWarehouseId)}}</p> <p>{{importCityName(queryParams.startWarehouseId)}}</p>
</el-form-item> </el-form-item>
<el-form-item :label="$t('国家')" prop="destination">
<el-select v-model="queryParams.destCountryId" :placeholder="$t('请选择国家')" @change="clearDestWarehouseIdList">
<el-option v-for="item in countryList" :key="item.id" :label="$l(item, 'title')" :value="item.id" />
</el-select>
</el-form-item>
<el-form-item :label="$t('目的地')" prop="destination"> <el-form-item :label="$t('目的地')" prop="destination">
<el-select v-model="queryParams.destWarehouseIdList" :placeholder="$t('请选择目的地')" multiple> <el-select v-model="queryParams.destWarehouseIdList" :placeholder="$t('请选择目的地')" multiple>
<el-option v-for="item in importWarehouseList" :label="item.titleZh" :value="item.id" :key="item.id"></el-option> <el-option v-for="item in importWarehouseList" :label="item.titleZh" :value="item.id" :key="item.id"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item :label="$t('国家')" prop="destination">
<el-select v-model="queryParams.destCountryId" :placeholder="$t('请选择国家')">
<el-option v-for="item in countryList" :key="item.id" :label="$l(item, 'name')" :value="item.id" />
</el-select>
</el-form-item>
<el-form-item :label="$t('订单号')" prop="orderNo"> <el-form-item :label="$t('订单号')" prop="orderNo">
<el-input v-model="queryParams.orderNo" :placeholder="$t('请输入订单号')" clearable /> <el-input v-model="queryParams.orderNo" :placeholder="$t('请输入订单号')" clearable />
</el-form-item> </el-form-item>
...@@ -159,6 +159,7 @@ import { ...@@ -159,6 +159,7 @@ import {
createGoods, createGoods,
remove, remove,
} from "@/api/ecw/boxSea"; } from "@/api/ecw/boxSea";
import { getWarehouseList } from "@/api/ecw/warehouse"
import { import {
formatDate, formatDate,
getTotlContent, getTotlContent,
...@@ -166,7 +167,7 @@ import { ...@@ -166,7 +167,7 @@ import {
getCapacity, getCapacity,
sumStatistics, sumStatistics,
} from "../../utils"; } from "../../utils";
import {getCountryListAll} from "@/api/ecw/country"; import { getListTree } from "@/api/ecw/region";
/** /**
* 补单 * 补单
*/ */
...@@ -177,6 +178,8 @@ export default { ...@@ -177,6 +178,8 @@ export default {
return { return {
//国家列表 //国家列表
countryList:[], countryList:[],
//仓库列表
warehouseList: [],
// 二维码/条码编号 // 二维码/条码编号
cabinetNo: "", cabinetNo: "",
// 表格数据 // 表格数据
...@@ -201,11 +204,21 @@ export default { ...@@ -201,11 +204,21 @@ export default {
}, },
created() { created() {
this.queryAllData(); this.queryAllData();
getCountryListAll().then(r => { this.getCountry()
this.countryList = r.data
})
}, },
methods: { methods: {
//获取国家
async getCountry() {
let countryList = await getListTree({treeType: 1})
this.countryList = countryList.data
let warehouseList = await getWarehouseList()
this.warehouseList = warehouseList.data
let warehouse = this.warehouseList.find(item=>item.id == this.$attrs.shipmentObj.destWarehouseId)
console.log(warehouse,'warehouse')
if(warehouse){
this.$set(this.queryParams,'destCountryId', warehouse.guojia)
}
},
/* 查询已预装 */ /* 查询已预装 */
getSecGoods() { getSecGoods() {
loadSecGoodsList({ shipmentId: this.$attrs.shipmentObj.id }).then( loadSecGoodsList({ shipmentId: this.$attrs.shipmentObj.id }).then(
...@@ -443,12 +456,16 @@ export default { ...@@ -443,12 +456,16 @@ export default {
formatDate, formatDate,
getTotlContent, getTotlContent,
sumStatistics, sumStatistics,
//切换国家时清除目的仓
clearDestWarehouseIdList() {
this.queryParams.destWarehouseIdList = []
}
}, },
computed: { computed: {
/** 目的地 */ /** 目的地 */
importWarehouseList() { importWarehouseList() {
return this.$attrs.warehouseList.filter( return this.$attrs.warehouseList.filter(
(item) => item.tradeType == "1" || item.type == "3" (item) => (item.tradeType == "1" || item.type == "3") && item.guojia == this.queryParams.destCountryId
); );
}, },
/* 容量 */ /* 容量 */
......
...@@ -178,7 +178,7 @@ export default { ...@@ -178,7 +178,7 @@ export default {
list.push({ list.push({
...oItem, ...oItem,
warehouseInInfo, warehouseInInfo,
multiSpecification: item.multiSpecification, multiSpecification: oItem.multiSpecification,
positionNo: oItem.positionNo, positionNo: oItem.positionNo,
tallyStatus: item.tallyStatus, tallyStatus: item.tallyStatus,
tallyTime: item.tallyTime, tallyTime: item.tallyTime,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment