|
@@ -6,7 +6,8 @@
|
|
|
:columns="columns"
|
|
:columns="columns"
|
|
|
:datasource="form.datasource"
|
|
:datasource="form.datasource"
|
|
|
class="time-form"
|
|
class="time-form"
|
|
|
- max-height="300"
|
|
|
|
|
|
|
+ height="300"
|
|
|
|
|
+ full-height="calc(100vh - 76px)"
|
|
|
@columns-change="handleColumnChange"
|
|
@columns-change="handleColumnChange"
|
|
|
:cache-key="cacheKeyUrl"
|
|
:cache-key="cacheKeyUrl"
|
|
|
:selection.sync="selection"
|
|
:selection.sync="selection"
|
|
@@ -783,7 +784,10 @@
|
|
|
import commodityPriceListDialog from '@/views/commodityManagement/commodityPriceList/components/commodityPriceListDialog.vue';
|
|
import commodityPriceListDialog from '@/views/commodityManagement/commodityPriceList/components/commodityPriceListDialog.vue';
|
|
|
const dayjs = require('dayjs');
|
|
const dayjs = require('dayjs');
|
|
|
import { levelList } from '@/enum/dict.js';
|
|
import { levelList } from '@/enum/dict.js';
|
|
|
- import { getGoodsPriceByCondition } from '@/api/goodsManage/index';
|
|
|
|
|
|
|
+ import {
|
|
|
|
|
+ getGoodsPriceByCondition,
|
|
|
|
|
+ getGoodsByCategoryId
|
|
|
|
|
+ } from '@/api/goodsManage/index';
|
|
|
import { parameterGetByCode } from '@/api/main/index.js';
|
|
import { parameterGetByCode } from '@/api/main/index.js';
|
|
|
|
|
|
|
|
export default {
|
|
export default {
|
|
@@ -1771,6 +1775,7 @@
|
|
|
this.$set(parasm, 'pricingWay', 1);
|
|
this.$set(parasm, 'pricingWay', 1);
|
|
|
this.$set(parasm, 'goodsLevel', item.goodsLevel);
|
|
this.$set(parasm, 'goodsLevel', item.goodsLevel);
|
|
|
this.$set(parasm, 'guaranteePeriod', item.warrantyPeriod);
|
|
this.$set(parasm, 'guaranteePeriod', item.warrantyPeriod);
|
|
|
|
|
+
|
|
|
this.$set(
|
|
this.$set(
|
|
|
parasm,
|
|
parasm,
|
|
|
'guaranteePeriodUnitCode',
|
|
'guaranteePeriodUnitCode',
|
|
@@ -1855,7 +1860,7 @@
|
|
|
this.changeCount();
|
|
this.changeCount();
|
|
|
},
|
|
},
|
|
|
replaceTable(obj, idx) {
|
|
replaceTable(obj, idx) {
|
|
|
- obj.forEach((item, index) => {
|
|
|
|
|
|
|
+ obj.forEach(async (item, index) => {
|
|
|
let i = idx == -1 ? index : idx;
|
|
let i = idx == -1 ? index : idx;
|
|
|
let row = JSON.parse(JSON.stringify(this.defaultForm));
|
|
let row = JSON.parse(JSON.stringify(this.defaultForm));
|
|
|
row.key = this.form.datasource.length + 1;
|
|
row.key = this.form.datasource.length + 1;
|
|
@@ -1877,9 +1882,22 @@
|
|
|
this.$set(parasm, 'singleWeight', item.weight);
|
|
this.$set(parasm, 'singleWeight', item.weight);
|
|
|
this.$set(parasm, 'pricingWay', 1);
|
|
this.$set(parasm, 'pricingWay', 1);
|
|
|
this.$set(parasm, 'arrivalWay', item.arrivalWay || 1);
|
|
this.$set(parasm, 'arrivalWay', item.arrivalWay || 1);
|
|
|
-
|
|
|
|
|
|
|
+ this.$set(parasm, 'batchNo', item.batchNo);
|
|
|
this.$set(parasm, 'imgCode', '');
|
|
this.$set(parasm, 'imgCode', '');
|
|
|
this.$set(parasm, 'produceType', item.componentAttribute);
|
|
this.$set(parasm, 'produceType', item.componentAttribute);
|
|
|
|
|
+ let goodsData = await getGoodsByCategoryId(item.productId);
|
|
|
|
|
+ goodsData = goodsData.filter((item) => item.approvalStatus == 2);
|
|
|
|
|
+ if (goodsData?.length) {
|
|
|
|
|
+ let goodsPriceList = goodsData[0]?.goodsPriceList[0];
|
|
|
|
|
+ this.$set(parasm, 'goodsId', goodsData[0].id);
|
|
|
|
|
+ this.$set(parasm, 'goodsPriceId', goodsPriceList.id);
|
|
|
|
|
+ this.$set(parasm, 'goodsPriceType', goodsPriceList.priceType);
|
|
|
|
|
+ this.$set(parasm, 'singlePrice', goodsPriceList.unitPrice);
|
|
|
|
|
+ this.$set(parasm, 'notaxSinglePrice', goodsPriceList.excludeTaxPrice);
|
|
|
|
|
+ this.$set(parasm, 'taxRate', goodsPriceList.taxRate);
|
|
|
|
|
+ this.$set(parasm, 'discountSinglePrice', goodsPriceList.unitPrice);
|
|
|
|
|
+ this.$set(parasm, 'totalCount', '');
|
|
|
|
|
+ }
|
|
|
if (this.isSupplier) {
|
|
if (this.isSupplier) {
|
|
|
this.$set(
|
|
this.$set(
|
|
|
parasm,
|
|
parasm,
|
|
@@ -1923,18 +1941,6 @@
|
|
|
}
|
|
}
|
|
|
this.$set(parasm, 'provenance', item.purchaseOrigins || []);
|
|
this.$set(parasm, 'provenance', item.purchaseOrigins || []);
|
|
|
|
|
|
|
|
- if (this.isSupplier) {
|
|
|
|
|
- this.$set(
|
|
|
|
|
- parasm,
|
|
|
|
|
- 'entrustedEnterpriseIdList',
|
|
|
|
|
- item.entrustedEnterpriseIdList
|
|
|
|
|
- );
|
|
|
|
|
- this.$set(
|
|
|
|
|
- parasm,
|
|
|
|
|
- 'entrustedEnterpriseId',
|
|
|
|
|
- item.entrustedEnterpriseId
|
|
|
|
|
- );
|
|
|
|
|
- }
|
|
|
|
|
if (idx == -1) {
|
|
if (idx == -1) {
|
|
|
this.form.datasource.push(row);
|
|
this.form.datasource.push(row);
|
|
|
}
|
|
}
|