|
|
@@ -343,6 +343,8 @@
|
|
|
import { copyObj } from '@/utils/util';
|
|
|
import { getFile } from '@/api/system/file';
|
|
|
import fileMain from '@/components/addDoc/index.vue';
|
|
|
+ import { getInventoryTotalAPI } from '@/api/bpm/components/wms';
|
|
|
+
|
|
|
// import headList from '@/views/saleManage/businessOpportunity/components/headList.vue';
|
|
|
const defaultColumns = [
|
|
|
{
|
|
|
@@ -455,6 +457,25 @@
|
|
|
headerSlot: 'isRequired',
|
|
|
align: 'center'
|
|
|
},
|
|
|
+ {
|
|
|
+ minWidth: 80,
|
|
|
+ prop: 'availableCountBase',
|
|
|
+ label: '库存数量',
|
|
|
+ slot: 'availableCountBase',
|
|
|
+ align: 'center'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ minWidth: 80,
|
|
|
+ prop: 'doneTotalCount',
|
|
|
+ label: '已采数量',
|
|
|
+ align: 'center'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ minWidth: 80,
|
|
|
+ prop: 'waitTotalCount',
|
|
|
+ label: '待采数量',
|
|
|
+ align: 'center'
|
|
|
+ },
|
|
|
{
|
|
|
minWidth: 80,
|
|
|
prop: 'measuringUnit',
|
|
|
@@ -624,6 +645,8 @@
|
|
|
this.getSpanArr();
|
|
|
this.setDeliveryDays();
|
|
|
this.setIsInquiry();
|
|
|
+ this.getInventoryTotalAPI();
|
|
|
+
|
|
|
},
|
|
|
methods: {
|
|
|
//计算交期
|
|
|
@@ -656,6 +679,22 @@
|
|
|
colspan: 1
|
|
|
};
|
|
|
},
|
|
|
+ async getInventoryTotalAPI() {
|
|
|
+ let codeList = this.form.resultList.map((item) => item.productCode);
|
|
|
+ //获取仓库库存
|
|
|
+ let inventoryTotalList = await getInventoryTotalAPI(codeList);
|
|
|
+ this.form.resultList.forEach((item, index) => {
|
|
|
+ let find =
|
|
|
+ inventoryTotalList.find((key) => key.code == item.productCode) ||
|
|
|
+ {};
|
|
|
+ // item.availableCountBase = find.availableCountBase;
|
|
|
+ this.$set(
|
|
|
+ this.form.resultList[index],
|
|
|
+ 'availableCountBase',
|
|
|
+ find.availableCountBase
|
|
|
+ );
|
|
|
+ });
|
|
|
+ },
|
|
|
getSpanArr() {
|
|
|
let pos = 0;
|
|
|
this.spanArr = [];
|