md
This commit is contained in:
parent
97fec7dfc1
commit
bef59a9f6a
@ -103,6 +103,7 @@ import { listSimpleEmisSite } from "@/api/emis/emisSite";
|
|||||||
import { listSimpleEmisSupplier } from "@/api/emis/emisSupplier";
|
import { listSimpleEmisSupplier } from "@/api/emis/emisSupplier";
|
||||||
import { listEmisTmsSiteBatchDtl, delEmisTmsSiteBatchDtl, addEmisTmsSiteBatchDtl } from "@/api/emis/emisTmsSiteBatchDtl";
|
import { listEmisTmsSiteBatchDtl, delEmisTmsSiteBatchDtl, addEmisTmsSiteBatchDtl } from "@/api/emis/emisTmsSiteBatchDtl";
|
||||||
import { listEmisWaybill } from "@/api/emis/emisWaybill";
|
import { listEmisWaybill } from "@/api/emis/emisWaybill";
|
||||||
|
import { listSimpleEmisCountry} from "@/api/emis/emisCountry";
|
||||||
|
|
||||||
import { parseTime,parseExcelTime } from "@/utils/custom";
|
import { parseTime,parseExcelTime } from "@/utils/custom";
|
||||||
import {timeDiffTime,timeFormat} from '@/utils/dateUtils'
|
import {timeDiffTime,timeFormat} from '@/utils/dateUtils'
|
||||||
@ -493,6 +494,21 @@ export default {
|
|||||||
postForm.nextSiteName=nextSite.siteName;
|
postForm.nextSiteName=nextSite.siteName;
|
||||||
postForm.nextSiteSizeCode3=nextSite.sizeCode3||'-';
|
postForm.nextSiteSizeCode3=nextSite.sizeCode3||'-';
|
||||||
|
|
||||||
|
if(itemData.destCountry){
|
||||||
|
let country = await this.getCountryByName(itemData.destCountry);
|
||||||
|
if(country==null){
|
||||||
|
let rst = {
|
||||||
|
code:500,
|
||||||
|
msg:'目的国不存在',
|
||||||
|
data:{
|
||||||
|
result:'fail'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return rst;
|
||||||
|
}
|
||||||
|
postForm.destCountry=country.code;
|
||||||
|
}
|
||||||
|
|
||||||
// 供应商
|
// 供应商
|
||||||
let supplier=await this.getSupplierByName(itemData.supplierName);
|
let supplier=await this.getSupplierByName(itemData.supplierName);
|
||||||
if(supplier==null){
|
if(supplier==null){
|
||||||
@ -669,6 +685,22 @@ export default {
|
|||||||
}
|
}
|
||||||
return resStartSite.rows[0];
|
return resStartSite.rows[0];
|
||||||
},
|
},
|
||||||
|
async getCountryByName(name){
|
||||||
|
// 计算网点是否存在
|
||||||
|
let qParam = {
|
||||||
|
pageNum:1,
|
||||||
|
pageSize:1,
|
||||||
|
name:name
|
||||||
|
};
|
||||||
|
let rst = await listSimpleEmisCountry(qParam);
|
||||||
|
if(!rst || rst.code != 200){
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
if(rst.rows==null || rst.rows.length==0){
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
return rst.rows[0];
|
||||||
|
},
|
||||||
async getSupplierByName(supplierName){
|
async getSupplierByName(supplierName){
|
||||||
// 计算网点是否存在
|
// 计算网点是否存在
|
||||||
let qParam = {
|
let qParam = {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user