@@ -854,22 +864,27 @@
-
- -
- (押金{{ $i18n.t("money") }}{{ goodsInfo.total_deposit }}可退)
-
- -
- 合计:{{ $i18n.t("money") }}{{ price }}
+
立即兑换
+ 文创豆不足
+
+
+
+ -
+ (押金{{ $i18n.t("money") }}{{ goodsInfo.total_deposit }}可退)
+
+ -
+ 合计:{{ $i18n.t("money") }}{{ price }}
-
-
-
-
- 提交订单
-
-
-
+
+
+
+ 提交订单
+
+
+
+
@@ -2845,8 +2860,8 @@ export default goods_order_controller;
}
}
.cityDelivery_Style{
- background: #fff;
- text-align: left;
+ background: #fff;
+ text-align: left;
padding: 0.5rem 0.8rem;
}
diff --git a/src/views/goods/goods_order_controller.js b/src/views/goods/goods_order_controller.js
index 9c55f3c..429d99e 100644
--- a/src/views/goods/goods_order_controller.js
+++ b/src/views/goods/goods_order_controller.js
@@ -341,6 +341,10 @@ export default {
},
isRentSetting:false,
storeTable: null,//门店餐桌扫码
+
+ is_legumes_exchange: 0,// 是否使用文创豆兑换
+ is_allow_use_legumes_exchange: 0,// 是否允许使用文创豆兑换
+ use_legumes_exchange: 0,// 使用的文创豆数量
};
},
@@ -356,12 +360,14 @@ export default {
this.initAdress();
},
activated() {
+ // 判断:当前购买流程是否为文创豆兑换流程
+ this.is_legumes_exchange = !isNaN(parseInt(this.$route.query.is_legumes_exchange)) ? parseInt(this.$route.query.is_legumes_exchange) : 0;
+
this.initData();
this.handleQueryData();
if ((this.$route.query.orderShowDate ?? "") !== "") {
this.orderShowDate = this.$route.query.orderShowDate;
}
-
// 重新计算
if (this.selected == "10") {
// 定位
@@ -376,7 +382,6 @@ export default {
})
.catch(err => {});
}
-
let yz_basic_info = JSON.parse(window.localStorage.getItem("yz_basic_info"));
if (yz_basic_info.plugin_setting.address_code && yz_basic_info.plugin_setting.address_code.enable) {
this.address_codeEnable = true;
@@ -1625,6 +1630,7 @@ export default {
}
json = this.handleDataActionBuyUrl(json);
+ json.is_legumes_exchange = this.is_legumes_exchange;
if (this.$route.query.orderType == "newRetail" && this.$route.query.retail_state == 2) {
json.goods = JSON.parse(this.$route.query.goods) || []; // 自由发货
@@ -1726,6 +1732,7 @@ export default {
this.order_other_json = {};
json = this.handleDataActionCartUrl(json);
+ json.is_legumes_exchange = this.is_legumes_exchange;
$http.get(this.pre_order_url, json, "生成中").then(
response => {
if (response.result === 1) {
@@ -2100,6 +2107,10 @@ export default {
},
// 设置界面
setViewData(data, cart_ids) {
+
+ this.use_legumes_exchange = data.use_legumes_exchange_total || 0;
+ this.is_allow_use_legumes_exchange = data.is_allow_exchange || 0;
+
if (data.discount && data.discount.default_deduction && data.discount.default_deduction != 0) {
// 获取第一次接口默认积分抵扣
this.default_deduction = data.discount.default_deduction;
@@ -2592,6 +2603,8 @@ export default {
},
submitBtnPost() {
let json = this.assembleJson();
+ json.is_legumes_exchange = this.is_legumes_exchange;
+
if (this.$route.query.tag === "tourAround") {
if (this.orderShowIdCard && this.fun.isTextEmpty(this.idCard)) {
Toast("身份证必填");
@@ -2782,7 +2795,9 @@ export default {
invoice: this.invoice_list,
mark: this.$route.query.mark || 0,
- dispatch_type_id: this.selected //配送方式 ,1:快递 ||2:门店自提||3:门店配送(送货上门)||8:自提点
+ dispatch_type_id: this.selected, //配送方式 ,1:快递 ||2:门店自提||3:门店配送(送货上门)||8:自提点
+
+ is_legumes_exchange: this.is_legumes_exchange,
};
// 分销活动页面购买的商品,带活动id
if (this.$route.query.activity_id) {
diff --git a/src/views/member/weight_value/legumes/shopping.vue b/src/views/member/weight_value/legumes/shopping.vue
index 6065ff1..e8afca1 100644
--- a/src/views/member/weight_value/legumes/shopping.vue
+++ b/src/views/member/weight_value/legumes/shopping.vue
@@ -54,7 +54,7 @@
{{ item.use_legumes }}文创豆