|
@@ -1,7 +1,7 @@
|
|
|
<script>
|
|
|
import useColumns from "./columns";
|
|
|
import { EXIST } from "@/api/business/purchase/catalogue";
|
|
|
-import { ITEM, SAVE, PRICE } from "@/api/business/purchase/apply";
|
|
|
+import { ITEM, SAVE, PRICE, BATCHPRICE } from "@/api/business/purchase/apply";
|
|
|
import { tax, unit, currency } from "@/components/popover-select-v2/fetch";
|
|
|
// 用于回显参照框数据
|
|
|
import { getRefer } from "@/api/purchase/basic.js";
|
|
@@ -446,6 +446,8 @@ export default {
|
|
|
// console.log(this.params[prop])
|
|
|
this.$modal.closeLoading();
|
|
|
}
|
|
|
+
|
|
|
+ await this.batchPrice(this.params.priceApplyItems);
|
|
|
} else if (scope.column.property == "supplierName") {
|
|
|
if (this.params[prop].length <= 1) {
|
|
|
this.params[prop][index].supplierName = rows[0];
|
|
@@ -542,6 +544,20 @@ export default {
|
|
|
this.$modal.closeLoading();
|
|
|
}
|
|
|
},
|
|
|
+
|
|
|
+ // 复制含税单价,查询价格
|
|
|
+ async batchPrice(prop) {
|
|
|
+ try {
|
|
|
+ this.loading = true;
|
|
|
+ let { code, data } = await BATCHPRICE(prop);
|
|
|
+ if (code === 200) {
|
|
|
+ this.params.priceApplyItems = data;
|
|
|
+ }
|
|
|
+ } catch (error) {
|
|
|
+ } finally {
|
|
|
+ this.loading = false;
|
|
|
+ }
|
|
|
+ },
|
|
|
// 含税单价
|
|
|
async changeTaxPrice(val, prop) {
|
|
|
try {
|
|
@@ -559,6 +575,7 @@ export default {
|
|
|
prop.increase = data.increase;
|
|
|
prop.priceDiffer = data.priceDiffer;
|
|
|
prop.yAffectedAmount = data.yAffectedAmount;
|
|
|
+ prop.yPurchaseVolume = data.yPurchaseVolume;
|
|
|
}
|
|
|
} catch (error) {
|
|
|
} finally {
|