Commit 0f3ec50b authored by 郭志伟's avatar 郭志伟

fix:联调

parent b00b233a
...@@ -109,4 +109,10 @@ strong { ...@@ -109,4 +109,10 @@ strong {
.text-14(); .text-14();
margin-bottom: @padding-xs; margin-bottom: @padding-xs;
} }
}
.cr-dialog--header {
padding: @padding-xl;
&--isolated {
padding-bottom: 0;
}
} }
\ No newline at end of file
...@@ -31,15 +31,13 @@ ...@@ -31,15 +31,13 @@
@cell-clear-color: @gray-4; @cell-clear-color: @gray-4;
@field-label-width: 75px; @field-label-width: 75px;
@dialog-width: 290px;
@dialog-font-size: 14px;
@dialog-border-radius: @border-radius-lg; @dialog-border-radius: @border-radius-lg;
@dialog-message-font-size: 16px; @dialog-has-title-message-text-color: @text-grey;
@dialog-has-title-message-text-color: @text-color;
@dialog-confirm-button-text-color: @red;
@navbar-default-height: @nav-bar-height; @navbar-default-height: @nav-bar-height;
@picker-toolbar-padding: @padding-unit - 2 @padding-md; @picker-toolbar-padding: @padding-unit - 2 @padding-md;
@picker-font-size: 14px; @picker-font-size: 14px;
@tabs-nav-background-color: @background-color; @tabs-nav-background-color: @background-color;
\ No newline at end of file
@loading-text-color: @white;
\ No newline at end of file
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
/> />
<div class="center-phone__list" :class="{ show: inputBlur }"> <div class="center-phone__list" :class="{ show: inputBlur }">
<div <div
v-for="(item, index) in list" v-for="(item, index) in historyPhoneNoList"
:key="index" :key="index"
class="center-phone__list-item" class="center-phone__list-item"
@click="selectPhone(item)" @click="selectPhone(item)"
...@@ -32,8 +32,10 @@ import { phoneFormat, phoneTrim, checkPhoneFormat } from '@/service/utils.servic ...@@ -32,8 +32,10 @@ import { phoneFormat, phoneTrim, checkPhoneFormat } from '@/service/utils.servic
const { getPhoneHome } = api; const { getPhoneHome } = api;
export default { export default {
props: { props: {
userPhoneInfo: Object, userPhoneInfo: {
list: Array type: Object,
default: () => {}
}
}, },
data() { data() {
return { return {
...@@ -46,6 +48,9 @@ export default { ...@@ -46,6 +48,9 @@ export default {
isDefaultphone: function() { isDefaultphone: function() {
return this.phoneNo === this.userPhoneInfo?.phoneNo; return this.phoneNo === this.userPhoneInfo?.phoneNo;
}, },
historyPhoneNoList() {
return this.userPhoneInfo?.historyPhoneNoList || [];
},
phoneNo: function() { phoneNo: function() {
return phoneTrim(this.rechargeTel); return phoneTrim(this.rechargeTel);
} }
......
...@@ -51,7 +51,12 @@ ...@@ -51,7 +51,12 @@
} }
} }
&__info { &__info {
&-right {
margin-left: auto;
color: @red !important;
}
&-item { &-item {
display: flex;
padding: 8px 0; padding: 8px 0;
color: @text-grey; color: @text-grey;
.text-13(); .text-13();
......
...@@ -46,6 +46,7 @@ ...@@ -46,6 +46,7 @@
<div class="Od__item Od__info"> <div class="Od__item Od__info">
<div class="Od__info-item"> <div class="Od__info-item">
订单编号:<span>{{ orderInfo.orderDetail.orderNo || '' }}</span> 订单编号:<span>{{ orderInfo.orderDetail.orderNo || '' }}</span>
<span class="Od__info-right" @click="copyPwd(orderNo)">复制</span>
</div> </div>
<div class="Od__info-item"> <div class="Od__info-item">
下单时间:<span>{{ orderInfo.orderDetail.orderTime || '' }}</span> 下单时间:<span>{{ orderInfo.orderDetail.orderTime || '' }}</span>
...@@ -115,12 +116,10 @@ ...@@ -115,12 +116,10 @@
再次购买 再次购买
</cr-button> </cr-button>
</div> </div>
<cancel-popup v-model="showCancelPopup" :order-info="currentOrder" />
</div> </div>
</template> </template>
<script> <script>
import ListItem from '../orderList/components/ListItem.vue'; import ListItem from '../orderList/components/ListItem.vue';
import CancelPopup from '../orderList/components/CancelPopup.vue';
import { setClipboardData } from '@/service/utils.service'; import { setClipboardData } from '@/service/utils.service';
import orderApi from '@/api/order.api'; import orderApi from '@/api/order.api';
import img11 from '@/assets/images/order/11.png'; import img11 from '@/assets/images/order/11.png';
...@@ -138,11 +137,11 @@ const orderStatusImgs = { ...@@ -138,11 +137,11 @@ const orderStatusImgs = {
export default { export default {
name: 'OrderDetail', name: 'OrderDetail',
components: { components: {
ListItem, ListItem
CancelPopup
}, },
data() { data() {
return { return {
orderNo: '',
orderInfo: { orderInfo: {
feeInfo: {}, feeInfo: {},
orderDetail: {}, orderDetail: {},
...@@ -151,8 +150,7 @@ export default { ...@@ -151,8 +150,7 @@ export default {
skuList: [], skuList: [],
payDetail: {}, payDetail: {},
orderNo: '' orderNo: ''
}, }
showCancelPopup: false
}; };
}, },
computed: { computed: {
...@@ -185,10 +183,29 @@ export default { ...@@ -185,10 +183,29 @@ export default {
'https://www.sobot.com/chat/h5/v2/index.html?sysnum=84ed0ad93caa47b0a9d1600824546b35&source=2'; 'https://www.sobot.com/chat/h5/v2/index.html?sysnum=84ed0ad93caa47b0a9d1600824546b35&source=2';
}, },
openCancelPopup() { openCancelPopup() {
this.showCancelPopup = true; this.$dialog({
title: '取消订单',
message: '您真的要取消吗?',
confirmButtonText: '仍要取消',
cancelButtonText: '留下商品',
onConfirm: () => {
this.handleRadioSubmit();
}
});
},
async handleRadioSubmit() {
const [res] = await orderApi.orderCancel({
orderNo: this.currentOrder.orderNo,
cancelReason: '不想买了',
cancelReasonType: 4
});
if (res) {
this.$toast('已取消');
this.$set(this.orderInfo.orderStatusInfo, `orderStatus`, 51);
this.$set(this.orderInfo.orderStatusInfo, `orderStatusText`, '交易关闭');
}
}, },
toPay() { toPay() {
console.log(this.currentOrder.orderNo);
this.$router.push({ path: '/pay', query: { orderNo: this.orderNo } }); this.$router.push({ path: '/pay', query: { orderNo: this.orderNo } });
}, },
toGoods() { toGoods() {
...@@ -201,7 +218,7 @@ export default { ...@@ -201,7 +218,7 @@ export default {
}, },
copyPwd(item) { copyPwd(item) {
setClipboardData({ setClipboardData({
data: `${item.cardPassword}`, data: '' + item,
success: () => { success: () => {
this.$toast.success('已复制'); this.$toast.success('已复制');
} }
......
...@@ -72,7 +72,7 @@ export default { ...@@ -72,7 +72,7 @@ export default {
}, },
computed: { computed: {
reason() { reason() {
return this.reasonList.find(item => item.cancelReasonType === this.reasonList); return this.reasonList.find(item => item.cancelReasonType === this.reasonType);
} }
}, },
watch: { watch: {
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
<div class="Ol__foot"> <div class="Ol__foot">
<div class="Ol__foot-settle"> <div class="Ol__foot-settle">
<span>总价¥{{ item.totalFee }}</span> <span>总价¥{{ item.totalFee }}</span>
<span>优惠¥{{ item.reduceFee }}</span> <span v-if="item.reduceFee">优惠¥{{ item.reduceFee }}</span>
<span> <span>
实付款<strong>¥{{ item.originalFee }}</strong> 实付款<strong>¥{{ item.originalFee }}</strong>
</span> </span>
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
plain plain
type="default" type="default"
shape="circle" shape="circle"
@click.stop="onOptionClick(item, 'cancel')" @click.stop="onOptionClick(item, index, 'cancel')"
> >
取消订单 取消订单
</cr-button> </cr-button>
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
plain plain
type="primary" type="primary"
shape="circle" shape="circle"
@click.stop="onOptionClick(item, 'pay')" @click.stop="onOptionClick(item, index, 'pay')"
> >
付款 付款
</cr-button> </cr-button>
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
plain plain
type="default" type="default"
shape="circle" shape="circle"
@click.stop="onOptionClick(item, 'notify')" @click.stop="onOptionClick(item, index, 'notify')"
> >
提醒发货 提醒发货
</cr-button> </cr-button>
...@@ -60,7 +60,7 @@ ...@@ -60,7 +60,7 @@
plain plain
type="primary" type="primary"
shape="circle" shape="circle"
@click.stop="onOptionClick(item, 'again')" @click.stop="onOptionClick(item, index, 'again')"
> >
再次购买 再次购买
</cr-button> </cr-button>
...@@ -119,8 +119,8 @@ export default { ...@@ -119,8 +119,8 @@ export default {
onLoad() { onLoad() {
this.$emit(EVENT_LOADING); this.$emit(EVENT_LOADING);
}, },
onOptionClick(orderInfo, eventType) { onOptionClick(orderInfo, index, eventType) {
this.$emit(EVENT_CLICK, { orderInfo, eventType }); this.$emit(EVENT_CLICK, { orderInfo: { ...orderInfo, index }, eventType });
}, },
toHome() { toHome() {
this.$router.replace({ path: '/home' }); this.$router.replace({ path: '/home' });
......
...@@ -12,26 +12,26 @@ ...@@ -12,26 +12,26 @@
<div v-if="it.count" class="Ol__body-row"> <div v-if="it.count" class="Ol__body-row">
<span class="Ol__body-count">{{ it.count }}</span> <span class="Ol__body-count">{{ it.count }}</span>
</div> </div>
<div v-if="it.virtualChargeAttrs" class="Ol__body-skus"> <div v-if="it.virtualRechargeAttrs" class="Ol__body-skus">
<div v-if="it.virtualChargeAttrs.account" class="Ol__body-sku"> <div v-if="it.virtualRechargeAttrs.account" class="Ol__body-sku">
<span>充值帐户:</span> <span>充值帐户:</span>
<span class="Ol__body-val">{{ it.virtualChargeAttrs.account }}</span> <span class="Ol__body-val">{{ it.virtualRechargeAttrs.account }}</span>
</div> </div>
<div v-if="it.virtualChargeAttrs.registrationLocation" class="Ol__body-sku"> <div v-if="it.virtualRechargeAttrs.registrationLocation" class="Ol__body-sku">
<span>归属地:</span> <span>归属地:</span>
<span class="Ol__body-val">{{ it.virtualChargeAttrs.account }}</span> <span class="Ol__body-val">{{ it.virtualRechargeAttrs.registrationLocation }}</span>
</div> </div>
<div v-if="it.virtualChargeAttrs.cardNo" class="Ol__body-sku"> <div v-if="it.virtualRechargeAttrs.cardNo" class="Ol__body-sku">
<span>卡号:</span> <span>卡号:</span>
<span class="Ol__body-val">{{ it.virtualChargeAttrs.cardNo }}</span> <span class="Ol__body-val">{{ it.virtualRechargeAttrs.cardNo }}</span>
</div> </div>
<div v-if="it.virtualChargeAttrs.cardPassword" class="Ol__body-sku"> <div v-if="it.virtualRechargeAttrs.cardPassword" class="Ol__body-sku">
<span>卡密:</span> <span>卡密:</span>
<span class="Ol__body-val">{{ it.virtualChargeAttrs.cardPassword }}</span> <span class="Ol__body-val">{{ it.virtualRechargeAttrs.cardPassword }}</span>
<a <a
v-if="props.showCopy" v-if="props.showCopy"
href="javascript:;" href="javascript:;"
@click="parent.copyPwd(it.virtualChargeAttrs)" @click="parent.copyPwd(it.virtualRechargeAttrs.cardPassword)"
> >
复制 复制
</a> </a>
......
...@@ -11,14 +11,12 @@ ...@@ -11,14 +11,12 @@
/> />
</cr-tab> </cr-tab>
</cr-tabs> </cr-tabs>
<cancel-popup v-model="showCancelPopup" :order-info="currentOrder" />
</div> </div>
</template> </template>
<script> <script>
import orderApi from '@/api/order.api'; import orderApi from '@/api/order.api';
import List from './components/List'; import List from './components/List';
import { isApp } from '@/service/validation.service'; import { isApp } from '@/service/validation.service';
import CancelPopup from './components/CancelPopup';
const commonParams = { const commonParams = {
loading: false, loading: false,
finished: false, finished: false,
...@@ -29,13 +27,11 @@ const commonParams = { ...@@ -29,13 +27,11 @@ const commonParams = {
export default { export default {
name: 'OrderList', name: 'OrderList',
components: { components: {
List, List
CancelPopup
}, },
data() { data() {
return { return {
isApp, isApp,
showCancelPopup: false,
currentTab: 0, currentTab: 0,
navList: [ navList: [
{ {
...@@ -94,13 +90,11 @@ export default { ...@@ -94,13 +90,11 @@ export default {
this.toGoods(); this.toGoods();
break; break;
default: default:
this.currentItems = {}; this.currentOrder = {};
break; break;
} }
}, },
orderCancelPopup() {
this.showCancelPopup = true;
},
toPay() { toPay() {
this.$router.push({ path: '/pay', query: { orderNo: this.currentOrder.orderNo } }); this.$router.push({ path: '/pay', query: { orderNo: this.currentOrder.orderNo } });
}, },
...@@ -113,6 +107,33 @@ export default { ...@@ -113,6 +107,33 @@ export default {
setNavListData(key, val) { setNavListData(key, val) {
this.$set(this.navList[this.currentTab], key, val); this.$set(this.navList[this.currentTab], key, val);
}, },
orderCancelPopup() {
this.$dialog({
title: '取消订单',
message: '您真的要取消吗?',
confirmButtonText: '仍要取消',
cancelButtonText: '留下商品',
onConfirm: () => {
this.handleRadioSubmit();
}
});
},
async handleRadioSubmit() {
const [res] = await orderApi.orderCancel({
orderNo: this.currentOrder.orderNo,
cancelReason: '不想买了',
cancelReasonType: 4
});
if (res) {
this.$toast('已取消');
this.$set(this.navList[this.currentTab].list[this.currentOrder.index], `orderStatus`, 51);
this.$set(
this.navList[this.currentTab].list[this.currentOrder.index],
`orderStatusText`,
'交易关闭'
);
}
},
async getList() { async getList() {
let { finished, page, pageSize, list, state: orderStatus } = this.navList[this.currentTab]; let { finished, page, pageSize, list, state: orderStatus } = this.navList[this.currentTab];
if (finished) return; if (finished) return;
......
...@@ -44,11 +44,11 @@ ...@@ -44,11 +44,11 @@
</template> </template>
<script> <script>
// import { registeredEvents } from '@/utils/sa'; // import { registeredEvents } from '@/utils/sa';
const payTypeE = [ // const payTypeE = [
'PD_YXMMAEC_UserClickCashierSelectXiangHuaCardPay', // 'PD_YXMMAEC_UserClickCashierSelectXiangHuaCardPay',
'PD_YXMMAEC_UserClickCashierSelectWechatPay' // 'PD_YXMMAEC_UserClickCashierSelectWechatPay'
]; // ];
const payTypeMiniAppE = ['c_cashierselectxianghuacardpay', 'c_cashierselectwechatpay']; // const payTypeMiniAppE = ['c_cashierselectxianghuacardpay', 'c_cashierselectwechatpay'];
export default { export default {
name: 'PayCardItem', name: 'PayCardItem',
inject: ['payCard', 'pay'], inject: ['payCard', 'pay'],
......
...@@ -8,10 +8,10 @@ ...@@ -8,10 +8,10 @@
:class="{ :class="{
cheap: item.price - item.salePrice > 0, cheap: item.price - item.salePrice > 0,
active: props.info.skuNo === item.skuNo, active: props.info.skuNo === item.skuNo,
'no-stock': !props.info.hasStock, 'no-stock': !item.hasStock,
nohhird: (index + 1) % 3 !== 0 nohhird: (index + 1) % 3 !== 0
}" }"
@click="props.info.hasStock && parent.handleSkuSelected(item, index)" @click="item.hasStock && parent.handleSkuSelected(item, index)"
> >
<div class="Vl__sku-name"> <div class="Vl__sku-name">
{{ props.threeCol ? item.salePrice : item.skuName }}{{ props.showUnit ? '' : '' }} {{ props.threeCol ? item.salePrice : item.skuName }}{{ props.showUnit ? '' : '' }}
......
...@@ -111,13 +111,13 @@ export default { ...@@ -111,13 +111,13 @@ export default {
}, },
getSkuListDebounce() { getSkuListDebounce() {
this.showLoading = true; this.showLoading = true;
this.skuList = [];
if (this.skuTimer) clearTimeout(this.skuTimer); if (this.skuTimer) clearTimeout(this.skuTimer);
this.skuTimer = setTimeout(() => { this.skuTimer = setTimeout(() => {
this.getSkuList(); this.getSkuList();
}, 600); }, 600);
}, },
async getSkuList() { async getSkuList() {
this.skuList = [];
const { spuNos, type } = this.spuInfo; const { spuNos, type } = this.spuInfo;
const [res] = await rechargeApi.getSkuList(spuNos, type); const [res] = await rechargeApi.getSkuList(spuNos, type);
if (res) { if (res) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment