|
|
@@ -343,12 +343,12 @@
|
|
|
:detailList="detailList"
|
|
|
/> -->
|
|
|
<spareParts
|
|
|
- ref="sparePartsRef"
|
|
|
- :type="type"
|
|
|
- :source="source"
|
|
|
- obtain="仓库"
|
|
|
- v-if="form.part == 1"
|
|
|
-/>
|
|
|
+ ref="sparePartsRef"
|
|
|
+ :type="type"
|
|
|
+ :source="source"
|
|
|
+ obtain="仓库"
|
|
|
+ v-if="form.part == 1 && isPurchaseNeed"
|
|
|
+ />
|
|
|
<div class="after_sales_target" v-if="salesShow">
|
|
|
<headerTitle
|
|
|
title="售后对象"
|
|
|
@@ -1305,12 +1305,12 @@ export default {
|
|
|
// return [];
|
|
|
// },
|
|
|
getSpareInfoData() {
|
|
|
- if (this.$refs.sparePartsRef) {
|
|
|
- // 调用spareParts的getTableValue获取配件列表数据
|
|
|
- return this.$refs.sparePartsRef.getTableValue() || [];
|
|
|
- }
|
|
|
- return [];
|
|
|
-},
|
|
|
+ if (this.$refs.sparePartsRef) {
|
|
|
+ // 调用spareParts的getTableValue获取配件列表数据
|
|
|
+ return this.$refs.sparePartsRef.getTableValue() || [];
|
|
|
+ }
|
|
|
+ return [];
|
|
|
+ },
|
|
|
async init(res) {
|
|
|
// 原有字段初始化
|
|
|
let productDetail = res.productDetail ? res.productDetail : [];
|
|
|
@@ -1351,11 +1351,11 @@ export default {
|
|
|
);
|
|
|
|
|
|
this.$set(this, 'detailList', res.costListVOS || []);
|
|
|
- this.$nextTick(() => {
|
|
|
- if (this.$refs.sparePartsRef && this.detailList.length > 0) {
|
|
|
- this.$refs.sparePartsRef.setTableValue(this.detailList);
|
|
|
- }
|
|
|
- });
|
|
|
+ this.$nextTick(() => {
|
|
|
+ if (this.$refs.sparePartsRef && this.detailList.length > 0) {
|
|
|
+ this.$refs.sparePartsRef.setTableValue(this.detailList);
|
|
|
+ }
|
|
|
+ });
|
|
|
},
|
|
|
getValue() {
|
|
|
return this.form;
|