|
@@ -97,6 +97,7 @@
|
|
|
import tableColumnsMixin from '@/mixins/tableColumnsMixin.js';
|
|
import tableColumnsMixin from '@/mixins/tableColumnsMixin.js';
|
|
|
import { getSummaries } from '@/utils/util.js';
|
|
import { getSummaries } from '@/utils/util.js';
|
|
|
import { getAllQuantity } from '@/BIZComponents/setProduct.js';
|
|
import { getAllQuantity } from '@/BIZComponents/setProduct.js';
|
|
|
|
|
+ import { getInventoryTotalAPI } from '@/api/bpm/components/wms';
|
|
|
|
|
|
|
|
export default {
|
|
export default {
|
|
|
mixins: [dictMixins, tableColumnsMixin],
|
|
mixins: [dictMixins, tableColumnsMixin],
|
|
@@ -143,6 +144,11 @@
|
|
|
type: Boolean,
|
|
type: Boolean,
|
|
|
default: true
|
|
default: true
|
|
|
},
|
|
},
|
|
|
|
|
+ //显示库存
|
|
|
|
|
+ isWms: {
|
|
|
|
|
+ type: Boolean,
|
|
|
|
|
+ default: false
|
|
|
|
|
+ },
|
|
|
//是否显示订单编码
|
|
//是否显示订单编码
|
|
|
isOrderNo: {
|
|
isOrderNo: {
|
|
|
type: Boolean,
|
|
type: Boolean,
|
|
@@ -251,7 +257,7 @@
|
|
|
return pricingWayList.find((item) => item.id == row.pricingWay)
|
|
return pricingWayList.find((item) => item.id == row.pricingWay)
|
|
|
?.name;
|
|
?.name;
|
|
|
}
|
|
}
|
|
|
- }
|
|
|
|
|
|
|
+ },
|
|
|
];
|
|
];
|
|
|
// 条件显示的新增字段列(仅当quoteType为2时显示)
|
|
// 条件显示的新增字段列(仅当quoteType为2时显示)
|
|
|
const additionalColumns =
|
|
const additionalColumns =
|
|
@@ -355,6 +361,30 @@
|
|
|
]
|
|
]
|
|
|
: [];
|
|
: [];
|
|
|
const remainingColumns = [
|
|
const remainingColumns = [
|
|
|
|
|
+ {
|
|
|
|
|
+ width: 280,
|
|
|
|
|
+ prop: 'cuttingLength',
|
|
|
|
|
+ label: '裁线米段',
|
|
|
|
|
+ align: 'center',
|
|
|
|
|
+ slot: 'cuttingLength',
|
|
|
|
|
+ isNone: this.quoteType === 2,
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ width: 120,
|
|
|
|
|
+ prop: 'warehouseName',
|
|
|
|
|
+ label: '仓库名称',
|
|
|
|
|
+ slot: 'warehouseName',
|
|
|
|
|
+ align: 'center',
|
|
|
|
|
+ isNone: this.quoteType === 2,
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ width: 160,
|
|
|
|
|
+ prop: 'availableCountBase',
|
|
|
|
|
+ label: '库存数量',
|
|
|
|
|
+ showOverflowTooltip: true,
|
|
|
|
|
+ align: 'center',
|
|
|
|
|
+ isNone: this.quoteType === 2,
|
|
|
|
|
+ },
|
|
|
{
|
|
{
|
|
|
width: 200,
|
|
width: 200,
|
|
|
prop: 'customerMark',
|
|
prop: 'customerMark',
|
|
@@ -904,6 +934,28 @@
|
|
|
}
|
|
}
|
|
|
// this.setDeliveryDays();
|
|
// this.setDeliveryDays();
|
|
|
|
|
|
|
|
|
|
+ if (this.isWms) {
|
|
|
|
|
+ let codeList = this.form.datasource
|
|
|
|
|
+ .filter((item) => item.productCode)
|
|
|
|
|
+ .map((item) => item.batchNo ? [item.productCode, item.batchNo].join(',') : item.productCode);
|
|
|
|
|
+ //获取仓库库存
|
|
|
|
|
+ let inventoryTotalList = await getInventoryTotalAPI(codeList);
|
|
|
|
|
+ this.form.datasource
|
|
|
|
|
+ .filter((item) => item.productCode)
|
|
|
|
|
+ .forEach((item, index) => {
|
|
|
|
|
+ let find =
|
|
|
|
|
+ inventoryTotalList.find(
|
|
|
|
|
+ (key) => (key.code + ',' + key.batchNo == item.productCode+','+item.batchNo)
|
|
|
|
|
+ ) || {};
|
|
|
|
|
+ this.form.datasource;
|
|
|
|
|
+ this.$set(
|
|
|
|
|
+ this.form.datasource[index],
|
|
|
|
|
+ 'availableCountBase',
|
|
|
|
|
+ find.availableCountBase
|
|
|
|
|
+ );
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
this.supplierObj = await this.getSupplierObj(
|
|
this.supplierObj = await this.getSupplierObj(
|
|
|
productList,
|
|
productList,
|
|
|
'productId'
|
|
'productId'
|