|
@@ -31,7 +31,7 @@ |
|
@@ -31,7 +31,7 @@ |
31
|
:is-visible="showFeatureSelector"
|
31
|
:is-visible="showFeatureSelector"
|
32
|
:entity="entity"
|
32
|
:entity="entity"
|
33
|
:on-add-to-cart="whenFeatureChange"
|
33
|
:on-add-to-cart="whenFeatureChange"
|
34
|
- :config="{btnTxt:'确定'}">
|
34
|
+ buttonText="确定">
|
35
|
</feature-selector>
|
35
|
</feature-selector>
|
36
|
</div>
|
36
|
</div>
|
37
|
</template>
|
37
|
</template>
|
|
@@ -51,6 +51,7 @@ |
|
@@ -51,6 +51,7 @@ |
51
|
return {
|
51
|
return {
|
52
|
title: '请选择换货商品',
|
52
|
title: '请选择换货商品',
|
53
|
page: 'exchange',
|
53
|
page: 'exchange',
|
|
|
54
|
+ orderCode: qs.orderId,
|
54
|
showFeatureSelector: false,
|
55
|
showFeatureSelector: false,
|
55
|
entity: {},
|
56
|
entity: {},
|
56
|
exchangeData: {},
|
57
|
exchangeData: {},
|
|
@@ -92,7 +93,7 @@ |
|
@@ -92,7 +93,7 @@ |
92
|
$.ajax({
|
93
|
$.ajax({
|
93
|
url: '/home/exchange/order',
|
94
|
url: '/home/exchange/order',
|
94
|
data: {
|
95
|
data: {
|
95
|
- orderId: qs.orderId
|
96
|
+ orderId: this.orderCode
|
96
|
}
|
97
|
}
|
97
|
}).then(res => {
|
98
|
}).then(res => {
|
98
|
const self = this;
|
99
|
const self = this;
|
|
@@ -147,14 +148,48 @@ |
|
@@ -147,14 +148,48 @@ |
147
|
return result;
|
148
|
return result;
|
148
|
});
|
149
|
});
|
149
|
},
|
150
|
},
|
|
|
151
|
+
|
|
|
152
|
+ // 生成提交数据
|
|
|
153
|
+ submitData() {
|
|
|
154
|
+ const data = {
|
|
|
155
|
+ order_code: this.orderCode,
|
|
|
156
|
+ address_id: this.address.address_id,
|
|
|
157
|
+ address: this.address.address,
|
|
|
158
|
+ consigee_name: this.address.consignee,
|
|
|
159
|
+ area_code: this.address.areaCode,
|
|
|
160
|
+ zip_code: this.address.zipCode,
|
|
|
161
|
+ mobile: this.address.mobile,
|
|
|
162
|
+ delivery_typ: this.deliveryType,
|
|
|
163
|
+ app_type: 1,
|
|
|
164
|
+ goods: []
|
|
|
165
|
+ };
|
|
|
166
|
+
|
|
|
167
|
+ this.selectedGoods.forEach(good => {
|
|
|
168
|
+ data.goods.push({
|
|
|
169
|
+ product_skn: good.productSkn,
|
|
|
170
|
+ product_skc: good.productSku,
|
|
|
171
|
+ goods_type: good.goodsTypeId,
|
|
|
172
|
+ last_price: good.lastPrice,
|
|
|
173
|
+ exchange_reason: good.reason.id,
|
|
|
174
|
+ remark: good.remark,
|
|
|
175
|
+ evidence_images: good.imageList,
|
|
|
176
|
+ new_goods_id: good.newGoodsId,
|
|
|
177
|
+ new_product_sku: good.newProductSku
|
|
|
178
|
+ });
|
|
|
179
|
+ });
|
|
|
180
|
+
|
|
|
181
|
+ return data;
|
|
|
182
|
+ },
|
|
|
183
|
+
|
|
|
184
|
+ // 提交 换货
|
150
|
submit() {
|
185
|
submit() {
|
151
|
if (!this.checkSubmitData()) {
|
186
|
if (!this.checkSubmitData()) {
|
152
|
alert('请填写完整退换货信息');
|
187
|
alert('请填写完整退换货信息');
|
153
|
}
|
188
|
}
|
154
|
$.ajax({
|
189
|
$.ajax({
|
155
|
method: 'POST',
|
190
|
method: 'POST',
|
156
|
- url: '/home/refund/submit',
|
|
|
157
|
- data: this.submitData
|
191
|
+ url: '/home/exchange/submit',
|
|
|
192
|
+ data: this.submitData()
|
158
|
}).then(result => {
|
193
|
}).then(result => {
|
159
|
if (result.code === 200) {
|
194
|
if (result.code === 200) {
|
160
|
console.log(result);
|
195
|
console.log(result);
|