订单支付自定义货币符号
parent
7b93ffd900
commit
ff802f4663
|
|
@ -25,7 +25,7 @@
|
|||
<iconfont name="icon-huiyuan-guanbi" prop-class="pa right-0 margin-right-main margin-top-xs" size="30rpx" color="#999" @tap="payment_popup_event_close"></iconfont>
|
||||
</view>
|
||||
<view class="payment-price tc padding-top-sm padding-bottom-sm br-b">
|
||||
<text class="text-size-md">{{ currency_symbol }}</text>
|
||||
<text class="text-size-md">{{ propCurrencySymbol }}</text>
|
||||
{{ propPayPrice }}
|
||||
</view>
|
||||
<view v-if="propPaymentList.length > 0" class="oh">
|
||||
|
|
@ -67,7 +67,11 @@
|
|||
import componentPopup from '@/components/popup/popup';
|
||||
export default {
|
||||
name: 'pay',
|
||||
props: {
|
||||
props: {
|
||||
propCurrencySymbol: {
|
||||
type: String,
|
||||
default: app.globalData.data.currency_symbol,
|
||||
},
|
||||
propPayUrl: {
|
||||
type: String,
|
||||
default: '',
|
||||
|
|
@ -198,7 +202,6 @@
|
|||
payment_id: Number(this.propPaymentId) === 0 ? this.propDefaultPaymentId : Number(this.propPaymentId),
|
||||
submit_disabled_status: true,
|
||||
order_id: 0,
|
||||
currency_symbol: app.globalData.data.currency_symbol,
|
||||
popup_view_pay_html_is_show: false,
|
||||
};
|
||||
},
|
||||
|
|
|
|||
|
|
@ -110,7 +110,7 @@
|
|||
</view>
|
||||
</view>
|
||||
<!-- 小计 -->
|
||||
<view class="oh tr goods-group-footer padding-top-xl">
|
||||
<view class="oh tr wh-auto goods-group-footer padding-top-xl">
|
||||
<text v-if="group.order_base.total_price != group.order_base.actual_price" class="original-price margin-right-sm">{{ currency_symbol }}{{ group.order_base.total_price }}</text>
|
||||
<text class="sales-price">{{ currency_symbol }}{{ group.order_base.actual_price }}</text>
|
||||
</view>
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@
|
|||
(item.operate_data.is_order_frequencycard || 0) == 1
|
||||
" class="item-operation tr br-t padding-vertical-main">
|
||||
<button v-if="item.operate_data.is_cancel == 1" class="round bg-white cr-yellow br-yellow" type="default" size="mini" @tap="cancel_event" :data-value="item.id" :data-index="index" hover-class="none">取消</button>
|
||||
<button v-if="item.operate_data.is_pay == 1" class="round bg-white cr-green br-green" type="default" size="mini" @tap="pay_event" :data-value="item.order_id" :data-index="index" :data-price="item.total_price" :data-payment="item.main_order_data.payment_id" hover-class="none">支付</button>
|
||||
<button v-if="item.operate_data.is_pay == 1" class="round bg-white cr-green br-green" type="default" size="mini" @tap="pay_event" :data-value="item.order_id" :data-index="index" :data-price="item.total_price" :data-payment="item.main_order_data.payment_id" :data-currency-symbol="item.currency_data.currency_symbol" hover-class="none">支付</button>
|
||||
<button v-if="item.operate_data.is_collect == 1" class="round bg-white cr-green br-green" type="default" size="mini" @tap="collect_event" :data-value="item.id" :data-index="index" hover-class="none">收货</button>
|
||||
<button v-if="(item.operate_data.is_order_batch || 0) == 1" class="round bg-white cr-blue br-blue" type="default" size="mini" @tap="url_event" :data-value="'/pages/plugins/realstore/batchorder-list/batchorder-list?oid=' + item.order_id" hover-class="none">批次</button>
|
||||
<button v-if="(item.operate_data.is_order_frequencycard || 0) == 1" class="round bg-white cr-green br-green" type="default" size="mini" @tap="url_event" :data-value="'/pages/plugins/realstore/frequencycard-list/frequencycard-list?oid=' + item.order_id" hover-class="none">次卡</button>
|
||||
|
|
@ -74,6 +74,7 @@
|
|||
|
||||
<!-- 支付组件 -->
|
||||
<component-payment
|
||||
:prop-currency-symbol="payment_currency_symbol"
|
||||
:prop-pay-url="pay_url"
|
||||
:prop-qrcode-url="qrcode_url"
|
||||
:prop-payment-list="payment_list"
|
||||
|
|
@ -117,6 +118,7 @@ export default {
|
|||
],
|
||||
nav_status_index: 0,
|
||||
// 前往页面携带的参数
|
||||
payment_currency_symbol: app.globalData.data.currency_symbol,
|
||||
pay_price: 0,
|
||||
pay_url: '',
|
||||
qrcode_url: '',
|
||||
|
|
@ -126,6 +128,9 @@ export default {
|
|||
payment_id: 0,
|
||||
default_payment_id: 0,
|
||||
is_show_payment_popup: false,
|
||||
// 智能工具箱(限定仅可选择下单支付方式)
|
||||
is_order_pay_only_can_buy_payment: 0,
|
||||
original_payment_list: [],
|
||||
};
|
||||
},
|
||||
|
||||
|
|
@ -152,6 +157,9 @@ export default {
|
|||
nav_status_index: nav_status_index,
|
||||
});
|
||||
|
||||
// 初始化配置
|
||||
this.init_config();
|
||||
|
||||
// 数据加载
|
||||
this.init();
|
||||
},
|
||||
|
|
@ -170,6 +178,17 @@ export default {
|
|||
},
|
||||
|
||||
methods: {
|
||||
// 初始化配置
|
||||
init_config(status) {
|
||||
if ((status || false) == true) {
|
||||
this.setData({
|
||||
is_order_pay_only_can_buy_payment: parseInt(app.globalData.get_config('plugins_base.intellectstools.data.is_order_pay_only_can_buy_payment', 0)),
|
||||
});
|
||||
} else {
|
||||
app.globalData.is_config(this, 'init_config');
|
||||
}
|
||||
},
|
||||
|
||||
// 获取数据
|
||||
init() {
|
||||
var user = app.globalData.get_user_info(this, "init");
|
||||
|
|
@ -249,6 +268,7 @@ export default {
|
|||
}
|
||||
}
|
||||
this.setData({
|
||||
original_payment_list: res.data.data.payment_list || [],
|
||||
payment_list: res.data.data.payment_list || [],
|
||||
default_payment_id: res.data.data.default_payment_id || 0,
|
||||
data_list: temp_data_list,
|
||||
|
|
@ -314,11 +334,30 @@ export default {
|
|||
|
||||
// 支付
|
||||
pay_event(e) {
|
||||
// 参数
|
||||
var index = e.currentTarget.dataset.index || 0;
|
||||
var payment_id = e.currentTarget.dataset.payment || 0;
|
||||
|
||||
// 智能工具箱(限定仅可选择下单支付方式)
|
||||
if(this.is_order_pay_only_can_buy_payment == 1) {
|
||||
var payment_list = [];
|
||||
this.original_payment_list.forEach(function(v, k) {
|
||||
if(v.id == payment_id) {
|
||||
payment_list.push(v);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
var payment_list = this.original_payment_list;
|
||||
}
|
||||
|
||||
// 设置支付参数
|
||||
this.setData({
|
||||
is_show_payment_popup: true,
|
||||
payment_list: payment_list,
|
||||
payment_currency_symbol: e.currentTarget.dataset.currencySymbol,
|
||||
temp_pay_value: e.currentTarget.dataset.value,
|
||||
temp_pay_index: e.currentTarget.dataset.index,
|
||||
payment_id: e.currentTarget.dataset.payment || 0,
|
||||
temp_pay_index: index,
|
||||
payment_id: payment_id,
|
||||
pay_price: e.currentTarget.dataset.price,
|
||||
order_select_ids: [],
|
||||
});
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@
|
|||
"
|
||||
class="item-operation tr br-t padding-vertical-main">
|
||||
<button v-if="item.operate_data.is_cancel == 1" class="round bg-white cr-yellow br-yellow" type="default" size="mini" @tap="cancel_event" :data-value="item.id" :data-index="index" hover-class="none">取消</button>
|
||||
<button v-if="item.operate_data.is_pay == 1" class="round bg-white cr-green br-green" type="default" size="mini" @tap="pay_event" :data-value="item.id" :data-index="index" :data-price="item.total_price" :data-payment="item.payment_id" hover-class="none">支付</button>
|
||||
<button v-if="item.operate_data.is_pay == 1" class="round bg-white cr-green br-green" type="default" size="mini" @tap="pay_event" :data-value="item.id" :data-index="index" :data-price="item.total_price" :data-payment="item.payment_id" :data-currency-symbol="item.currency_data.currency_symbol" hover-class="none">支付</button>
|
||||
<button v-if="item.operate_data.is_collect == 1" class="round bg-white cr-green br-green" type="default" size="mini" @tap="collect_event" :data-value="item.id" :data-index="index" hover-class="none">收货</button>
|
||||
<button v-if="(item.plugins_express_data || 0) == 1 && (item.express_number || null) != null" class="round bg-white cr-main br-main" type="default" size="mini" @tap="url_event" :data-value="'/pages/plugins/express/detail/detail?id=' + item.id" hover-class="none">物流</button>
|
||||
<button v-if="(item.plugins_delivery_data || 0) == 1" class="round bg-white cr-main br-main" type="default" size="mini" @tap="url_event" :data-value="'/pages/plugins/delivery/logistics/logistics?id=' + item.id" hover-class="none">物流</button>
|
||||
|
|
@ -108,6 +108,7 @@
|
|||
|
||||
<!-- 支付组件 -->
|
||||
<component-payment
|
||||
:prop-currency-symbol="payment_currency_symbol"
|
||||
:prop-pay-url="pay_url"
|
||||
:prop-qrcode-url="qrcode_url"
|
||||
:prop-payment-list="payment_list"
|
||||
|
|
@ -163,6 +164,7 @@
|
|||
// 页面从其他页面跳转过来携带的参数
|
||||
params: {},
|
||||
// 前往页面携带的参数
|
||||
payment_currency_symbol: app.globalData.data.currency_symbol,
|
||||
pay_price: 0,
|
||||
pay_url: '',
|
||||
qrcode_url: '',
|
||||
|
|
@ -172,6 +174,9 @@
|
|||
payment_id: 0,
|
||||
default_payment_id: 0,
|
||||
is_show_payment_popup: false,
|
||||
// 智能工具箱(限定仅可选择下单支付方式)
|
||||
is_order_pay_only_can_buy_payment: 0,
|
||||
original_payment_list: [],
|
||||
};
|
||||
},
|
||||
|
||||
|
|
@ -225,6 +230,7 @@
|
|||
if ((status || false) == true) {
|
||||
this.setData({
|
||||
home_is_enable_order_bulk_pay: app.globalData.get_config('config.home_is_enable_order_bulk_pay'),
|
||||
is_order_pay_only_can_buy_payment: parseInt(app.globalData.get_config('plugins_base.intellectstools.data.is_order_pay_only_can_buy_payment', 0)),
|
||||
});
|
||||
} else {
|
||||
app.globalData.is_config(this, 'init_config');
|
||||
|
|
@ -318,6 +324,7 @@
|
|||
}
|
||||
}
|
||||
this.setData({
|
||||
original_payment_list: res.data.data.payment_list || [],
|
||||
payment_list: res.data.data.payment_list || [],
|
||||
default_payment_id: res.data.data.default_payment_id || 0,
|
||||
data_list: temp_data_list,
|
||||
|
|
@ -383,11 +390,30 @@
|
|||
|
||||
// 支付
|
||||
pay_event(e) {
|
||||
// 参数
|
||||
var index = e.currentTarget.dataset.index || 0;
|
||||
var payment_id = e.currentTarget.dataset.payment || 0;
|
||||
|
||||
// 智能工具箱(限定仅可选择下单支付方式)
|
||||
if(this.is_order_pay_only_can_buy_payment == 1) {
|
||||
var payment_list = [];
|
||||
this.original_payment_list.forEach(function(v, k) {
|
||||
if(v.id == payment_id) {
|
||||
payment_list.push(v);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
var payment_list = this.original_payment_list;
|
||||
}
|
||||
|
||||
// 设置支付参数
|
||||
this.setData({
|
||||
is_show_payment_popup: true,
|
||||
payment_list: payment_list,
|
||||
payment_currency_symbol: e.currentTarget.dataset.currencySymbol,
|
||||
temp_pay_value: e.currentTarget.dataset.value,
|
||||
temp_pay_index: e.currentTarget.dataset.index,
|
||||
payment_id: e.currentTarget.dataset.payment || 0,
|
||||
temp_pay_index: index,
|
||||
payment_id: payment_id,
|
||||
pay_price: e.currentTarget.dataset.price,
|
||||
order_select_ids: [],
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in New Issue