批量导入只上传状态不等于-1的数据

This commit is contained in:
wuteng 2025-11-22 16:08:25 +08:00
parent 5e16ec3a94
commit 9bf9cdd36b

View File

@ -162,6 +162,8 @@ import { listEmisWaybill, draftSubmitOrder } from "@/api/emis/emisWaybill";
import { parseTime } from "@/utils/custom";
import {timeDiffTime,timeFormat} from '@/utils/dateUtils'
import { formatSearchStr,deepClone } from '@/utils/index'
import { getSalesmanSupportList} from "@/api/emis/emisSalesCommissionRatio";
import XLSX from 'xlsx'
export default {
@ -523,6 +525,27 @@ export default {
uploadStatus: 0,
errorInfo:'',
}
if (orderData.salesSupport) {
//判断销售支持是否属于销售联系人
let queryParams = {
pageNum: 1,
pageSize: 100,
status: 1,
salesmen: orderData.salesmen,
salesSupport: orderData.salesSupport,
params: {
userStatus: 1,
sendDate: new Date().toLocaleString().replace(/\//g, "-"),
},
}
getSalesmanSupportList(queryParams).then(response => {
let supportList = response.rows;
if (supportList.findIndex(t => t.salesSupport === orderData.salesSupport) === -1) {
orderData.errorInfo = '销售支持不属于销售联系人';
orderData.uploadStatus = -1;
}
});
}
this.tmpDataList.push(orderData);
}
@ -539,6 +562,8 @@ export default {
distinguishCancelAndClose: true,
closeOnClickModal: false
}).then(async () => {
// selectionList 过滤掉下单状态等于-1
this.selectionList = this.selectionList.filter(t => t.uploadStatus !== -1);
if(this.selectionList&&this.selectionList.length>0){
for(let i=0;i<this.selectionList.length;i++){