|
@@ -274,7 +274,7 @@ export default {
|
|
|
title: "申购计划",
|
|
|
key: "code",
|
|
|
tooltip: "true",
|
|
|
- width: 100
|
|
|
+ width: 200
|
|
|
},
|
|
|
{
|
|
|
title: "计划月份",
|
|
@@ -422,6 +422,12 @@ export default {
|
|
|
},
|
|
|
// 导出excel
|
|
|
async handleExcelClick() {
|
|
|
+ let allArea = [];
|
|
|
+ let allProject = [];
|
|
|
+ let areaList = JSON.parse(localStorage.getItem("areaList"));
|
|
|
+ let projectList = JSON.parse(localStorage.getItem("projectList"));
|
|
|
+ areaList.forEach(a => allArea.push(a.areaId));
|
|
|
+ projectList.forEach(a => allProject.push(a.projectId));
|
|
|
let postData = {
|
|
|
firstClassId: this.searchForm.yjfl,
|
|
|
secondClassId: this.searchForm.ejfl,
|
|
@@ -431,6 +437,12 @@ export default {
|
|
|
projectIds: this.searchForm.ssxm
|
|
|
// storehouseId: this.searchForm.ck
|
|
|
};
|
|
|
+ if (!this.searchForm.ssqy) {
|
|
|
+ postData.areaIds = allArea.join(",");
|
|
|
+ }
|
|
|
+ if (!this.searchForm.ssmx) {
|
|
|
+ postData.projectIds = allProject.join(",");
|
|
|
+ }
|
|
|
let res = await exportPurchasePool(postData);
|
|
|
console.log(res);
|
|
|
},
|
|
@@ -569,7 +581,7 @@ export default {
|
|
|
price: Number(this.tableSelect[i].referencePrice),
|
|
|
purchaseNum: Number(this.tableSelect[i].noBilledAmount),
|
|
|
plannedArrivalTime: dateArr,
|
|
|
- isNumControl: 1,
|
|
|
+ isNumControl: 0,
|
|
|
isTimeControl: 1,
|
|
|
applySurplusNum: this.tableSelect[i].noBilledAmount,
|
|
|
warehousedNum: 0,
|
|
@@ -622,6 +634,12 @@ export default {
|
|
|
},
|
|
|
//列表方法
|
|
|
getTableData() {
|
|
|
+ let allArea = [];
|
|
|
+ let allProject = [];
|
|
|
+ let areaList = JSON.parse(localStorage.getItem("areaList"));
|
|
|
+ let projectList = JSON.parse(localStorage.getItem("projectList"));
|
|
|
+ areaList.forEach(a => allArea.push(a.areaId));
|
|
|
+ projectList.forEach(a => allProject.push(a.projectId));
|
|
|
let postData = {
|
|
|
page: this.pageNum,
|
|
|
pageSize: 10,
|
|
@@ -633,6 +651,12 @@ export default {
|
|
|
projectIds: this.searchForm.ssxm
|
|
|
// storehouseId: this.searchForm.ck
|
|
|
};
|
|
|
+ if (!this.searchForm.ssqy) {
|
|
|
+ postData.areaIds = allArea.join(",");
|
|
|
+ }
|
|
|
+ if (!this.searchForm.ssxm) {
|
|
|
+ postData.projectIds = allProject.join(",");
|
|
|
+ }
|
|
|
this.tableLoading = true;
|
|
|
queryPurchasePoolList(postData).then(res => {
|
|
|
this.tableLoading = false;
|
|
@@ -646,6 +670,7 @@ export default {
|
|
|
this.pageNum = val;
|
|
|
this.getTableData();
|
|
|
},
|
|
|
+ // 跨页多选逻辑 利用findIndex((a) => a.id = id) 获取对应数据的index(-1为无此元素) 然后利用splice去除数组元素
|
|
|
tableOnSelect(selection, row) {
|
|
|
this.tableSelect = selection;
|
|
|
},
|