成本列表批量导入

This commit is contained in:
wuteng 2025-12-15 13:15:28 +08:00
parent a3a193fd66
commit 738fbf0737
3 changed files with 7 additions and 5 deletions

View File

@ -18,14 +18,15 @@ export function getEmisTmsSiteBatch(id) {
}
// 根据供应商编码和运输号获取批次信息
export function listBySupplerAndCarNo(supplierCode,carNo,etd) {
export function listBySupplerAndCarNo(supplierCode,carNo,etd,batchNo) {
return request({
url: '/emis/emisTmsSiteBatch/listBySupplerAndCarNo',
method: 'get',
params: {
supplierCode:supplierCode,
carNo:carNo,
etd:etd
etd:etd,
batchNo:batchNo
}
})
}

View File

@ -343,7 +343,7 @@ export default {
if (element.hasOwnProperty(key)) {
this.$set(orderData,key,element[key]) ;
// 解析费用数据
if(key!='运输单号'&&key!='供应商名称'&&key!='账期'&&key!='备注'&&key!='成本时间'){
if(key!='运输单号'&&key!='供应商名称'&&key!='账期'&&key!='备注'&&key!='成本时间'&& key!=='批次号'){
// 获取费用编码
// 单价和币种特殊处理
let indexPos=key.indexOf("单价");
@ -447,8 +447,9 @@ export default {
// 判断批次是否存在 获取批次信息
let carNo=orderData['运输单号'];
let etd=orderData['成本时间'];
let batchNo=orderData['批次号'];
// let resBatch=await listBySupplerAndCarNo(supplierCode,carNo,etd);
let resBatch=await listBySupplerAndCarNo(supplierCode,carNo);
let resBatch=await listBySupplerAndCarNo(supplierCode,carNo,null,batchNo);
if(resBatch&&resBatch.code==200){
if(resBatch.rows&&resBatch.rows.length==0){
orderData.uploadStatus=-1;
@ -462,7 +463,7 @@ export default {
let batchItem=resBatch.rows[0];
if(etd && batchItem.etd!==etd){
orderData.uploadStatus=-1;
orderData.errorInfo='成本时间不一致';
orderData.errorInfo='成本时间不一致';
}else{
this.$set(orderData,"batchItem",batchItem) ;
this.$set(orderData,"batchNo",batchItem.batchNo) ;