|
|
@@ -24,16 +24,26 @@
|
|
|
:filterable="true"
|
|
|
:allowCreate="true"
|
|
|
></dic-select>
|
|
|
- <el-tag type="danger" style="margin-left: 10px;">入库数量:{{ qtyMax }}</el-tag>
|
|
|
+ <el-tag type="danger" style="margin-left: 10px;">库存数量:{{ qtyMax }}</el-tag>
|
|
|
+ <el-tag type="danger" style="margin-left: 10px;">库存融资:{{ query.inventoryFinancing }}</el-tag>
|
|
|
+ <el-tag type="danger" style="margin-left: 10px;">库存自有:{{ query.inventoryHave }}</el-tag>
|
|
|
</div>
|
|
|
</template>
|
|
|
<template slot="reservoirAreaName" slot-scope="{ row }">
|
|
|
<dic-select
|
|
|
+ :key="query.dot"
|
|
|
v-model="row.reservoirAreaName"
|
|
|
placeholder="库区"
|
|
|
label="cname"
|
|
|
res="records"
|
|
|
- :url="'/blade-sales-part/reservoirarea/list?current=1&size=5&storageId=' + form.storageId"
|
|
|
+ :url="
|
|
|
+ '/blade-sales-part/reservoirarea/listZero?current=1&size=5&whether=1&storageId=' +
|
|
|
+ form.storageId +
|
|
|
+ '&goodsId=' +
|
|
|
+ query.goodsId +
|
|
|
+ '&dot=' +
|
|
|
+ query.dot
|
|
|
+ "
|
|
|
:filterable="true"
|
|
|
:remote="true"
|
|
|
dataName="cname"
|
|
|
@@ -211,8 +221,13 @@ export default {
|
|
|
row.quantity = row.quantityFinancing;
|
|
|
row.quantityHave = 0;
|
|
|
let sum = 0;
|
|
|
+ let sendNumFinancing = 0;
|
|
|
for (let item of this.data) {
|
|
|
sum += Number(item.quantity);
|
|
|
+ sendNumFinancing += Number(item.quantityFinancing);
|
|
|
+ }
|
|
|
+ if (sendNumFinancing > Number(this.query.inventoryFinancing)) {
|
|
|
+ return this.$message.error("融资数量不能超过" + this.query.inventoryFinancing);
|
|
|
}
|
|
|
if (sum > this.qtyMax) {
|
|
|
return this.$message.error("总数量不能超过" + this.qtyMax);
|
|
|
@@ -222,8 +237,14 @@ export default {
|
|
|
row.quantity = row.quantityHave;
|
|
|
row.quantityFinancing = 0;
|
|
|
let sum = 0;
|
|
|
+ let sendNumHave = 0;
|
|
|
for (let item of this.data) {
|
|
|
sum += Number(item.quantity);
|
|
|
+ sendNumHave += Number(item.quantityHave);
|
|
|
+ }
|
|
|
+
|
|
|
+ if (sendNumHave > Number(this.query.inventoryHave)) {
|
|
|
+ return this.$message.error("自有数量不能超过" + this.query.inventoryHave);
|
|
|
}
|
|
|
if (sum > this.qtyMax) {
|
|
|
return this.$message.error("总数量不能超过" + this.qtyMax);
|
|
|
@@ -266,6 +287,12 @@ export default {
|
|
|
if (!this.query.dot) {
|
|
|
this.query.dot = this.data.filter(item => item.quantity > 0)[0].dot;
|
|
|
}
|
|
|
+ if (sendNumFinancing > Number(this.query.inventoryFinancing)) {
|
|
|
+ return this.$message.error("融资数量不能超过" + this.query.inventoryFinancing);
|
|
|
+ }
|
|
|
+ if (sendNumHave > Number(this.query.inventoryHave)) {
|
|
|
+ return this.$message.error("自有数量不能超过" + this.query.inventoryHave);
|
|
|
+ }
|
|
|
if (sum > this.qtyMax) {
|
|
|
return this.$message.error("总数量不能超过" + this.qtyMax);
|
|
|
}
|