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 { listEmisTmsSiteBatchDtl, delEmisTmsSiteBatchDtl, addEmisTmsSiteBatchDtl } from "@/api/emis/emisTmsSiteBatchDtl";
|
||||
import { listEmisWaybill } from "@/api/emis/emisWaybill";
|
||||
import { listSimpleEmisCountry} from "@/api/emis/emisCountry";
|
||||
|
||||
import { parseTime,parseExcelTime } from "@/utils/custom";
|
||||
import {timeDiffTime,timeFormat} from '@/utils/dateUtils'
|
||||
@ -493,6 +494,21 @@ export default {
|
||||
postForm.nextSiteName=nextSite.siteName;
|
||||
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);
|
||||
if(supplier==null){
|
||||
@ -669,6 +685,22 @@ export default {
|
||||
}
|
||||
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){
|
||||
// 计算网点是否存在
|
||||
let qParam = {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user