|
@@ -4,19 +4,19 @@
|
|
|
<view class="one"> <text>{{info.zhStatus}}</text> </view>
|
|
|
<view class="two">
|
|
|
<view class="two_1">
|
|
|
- <image v-if="info.no&&info.no.source&&info.no.source.file.length>0" class="image"
|
|
|
- :src="info.no.source.file&&info.no.source.file.length>0?info.no.source.file[0].url:''">
|
|
|
+ <image v-if="info.source&&info.source.file.length>0" class="image"
|
|
|
+ :src="info.source.file&&info.source.file.length>0?info.source.file[0].url:''">
|
|
|
</image>
|
|
|
<image v-else class="image"
|
|
|
:src="config.logo_url&&config.logo_url.length>0?config.logo_url[0].url:''">
|
|
|
</image>
|
|
|
- <text v-if="info.no.type=='0'">酒店民宿</text>
|
|
|
+ <text v-if="info.type=='0'">酒店民宿</text>
|
|
|
<text v-else>景区门票</text>
|
|
|
</view>
|
|
|
<view class="two_2">
|
|
|
<view class="left">
|
|
|
- <image v-if="info.no&&info.no.source&&info.no.source.file.length>0" class="image"
|
|
|
- :src="info.no.source.file&&info.no.source.file.length>0?info.no.source.file[0].url:''">
|
|
|
+ <image v-if="info.source&&info.source.file.length>0" class="image"
|
|
|
+ :src="info.source.file&&info.source.file.length>0?info.source.file[0].url:''">
|
|
|
</image>
|
|
|
<image v-else class="image"
|
|
|
:src="config.logo_url&&config.logo_url.length>0?config.logo_url[0].url:''">
|
|
@@ -31,39 +31,44 @@
|
|
|
</view>
|
|
|
<view class="right">
|
|
|
<view class="other">
|
|
|
- ¥{{info.no.source.money||'0'}}
|
|
|
+ ¥{{info.source.money||'0'}}
|
|
|
</view>
|
|
|
<view class="other">
|
|
|
- ×{{info.no.num||'0'}}
|
|
|
+ ×{{info.num||'0'}}
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="right_2">
|
|
|
- 实付 ¥{{info.no.money||'0'}}
|
|
|
+ 实付 ¥{{info.money||'0'}}
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="thr">
|
|
|
<view class="thr_1">优惠</view>
|
|
|
- <view class="other">商品总价:¥{{info.no.money||'0'}} <text>(共{{info.no.num||'0'}}件)</text> </view>
|
|
|
- <view class="other">优惠:¥{{info.no.discount||'0'}}</view>
|
|
|
- <view class="other">实付 ¥{{info.no.money||'0'}}</view>
|
|
|
+ <view class="other">商品总价:¥{{info.money||'0'}} <text>(共{{info.num||'0'}}件)</text> </view>
|
|
|
+ <view class="other">优惠:¥{{info.discount||'0'}}</view>
|
|
|
+ <view class="other">实付 ¥{{info.money||'0'}}</view>
|
|
|
</view>
|
|
|
<view class="four">
|
|
|
<view class="four_1">订单信息</view>
|
|
|
- <view class="other">真实姓名:{{info.name||'暂无'}}</view>
|
|
|
- <view class="other">证件号码:{{info.card||'暂无'}}</view>
|
|
|
- <view class="other">手机号码:{{info.phone||'暂无'}}</view>
|
|
|
- <view class="other">购买日期:{{info.no.date||'暂无'}}</view>
|
|
|
- <view class="other">订单编号:{{info.no._id||'暂无'}}</view>
|
|
|
- <view class="other">下单时间:{{info.no.buy_time||'暂无'}}</view>
|
|
|
+ <view class="other">订单编号:{{info._id||'暂无'}}</view>
|
|
|
+ <view class="other">下单时间:{{info.buy_time||'暂无'}}</view>
|
|
|
+ </view>
|
|
|
+ <view class="four">
|
|
|
+ <view class="four_1">用户信息</view>
|
|
|
+ <view class="list" v-for="(item, index) in info.identity" :key="index">
|
|
|
+ <view class="other">游客{{index+1}}</view>
|
|
|
+ <view class="other">真实姓名:{{item.name||'暂无'}}</view>
|
|
|
+ <view class="other">证件号码:{{item.card||'暂无'}}</view>
|
|
|
+ <view class="other">手机号码:{{ getProps(item.phone) }}</view>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
<view class="four">
|
|
|
<view class="four_1">支付信息</view>
|
|
|
- <view class="other">支付时间:{{info.no.pay_time||'暂无'}}</view>
|
|
|
+ <view class="other">支付时间:{{info.pay_time||'暂无'}}</view>
|
|
|
<view class="other">交易快照:当发生交易纠纷时可作为交易凭证 ></view>
|
|
|
- <view class="other">支付数据:{{info.no.pay||'暂无'}}</view>
|
|
|
+ <view class="other">支付数据:{{info.pay||'暂无'}}</view>
|
|
|
</view>
|
|
|
<view class="five" v-if="info.status=='1'">
|
|
|
<button class="button" type="primary" size="mini" @tap="toOff()">确定核销</button>
|
|
@@ -146,19 +151,18 @@
|
|
|
async search() {
|
|
|
const that = this;
|
|
|
if (that.id) {
|
|
|
- const res = await that.$api(`/orderDetail/${that.id}`, 'GET', {})
|
|
|
+ const res = await that.$api(`/order/${that.id}`, 'GET', {})
|
|
|
if (res.errcode == '0') {
|
|
|
const status = that.statusList.find(i => i.value == res.data.status)
|
|
|
if (status) res.data.zhStatus = status.label
|
|
|
- if (res.data && res.data.no && res.data.no.source && res.data.no.source.person) {
|
|
|
- const person = that.personList.find(i => i.value == res.data.no.source.person)
|
|
|
+ if (res.data && res.data.source && res.data.source.person) {
|
|
|
+ const person = that.personList.find(i => i.value == res.data.source.person)
|
|
|
if (person) res.data.zhPerson = person.label
|
|
|
}
|
|
|
- if (res.data && res.data.no && res.data.no.source && res.data.no.source.type) {
|
|
|
- const type = that.typeList.find(i => i.value == res.data.no.source.type)
|
|
|
+ if (res.data && res.data.source && res.data.source.type) {
|
|
|
+ const type = that.typeList.find(i => i.value == res.data.source.type)
|
|
|
if (type) res.data.zhType = type.label
|
|
|
}
|
|
|
- res.data.phone = res.data.phone.replace(/^(\d{3})(\d{4})(\d{4})$/, "$1****$2")
|
|
|
that.$set(that, `info`, res.data)
|
|
|
} else {
|
|
|
uni.showToast({
|
|
@@ -167,6 +171,11 @@
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
+ // 整理电话号
|
|
|
+ getProps(phone) {
|
|
|
+ if (!phone) return '暂无';
|
|
|
+ return phone.replace(/^(\d{3})(\d{4})(\d{4})$/, '$1****$2');
|
|
|
+ },
|
|
|
// 核销券码
|
|
|
async toOff() {
|
|
|
const that = this;
|
|
@@ -175,7 +184,7 @@
|
|
|
content: '确定核销券码吗?',
|
|
|
success: async function(res) {
|
|
|
if (res.confirm) {
|
|
|
- const res = await that.$api(`/orderDetail/${that.id}`, 'POST', {
|
|
|
+ const res = await that.$api(`/order/${that.id}`, 'POST', {
|
|
|
status: "2"
|
|
|
})
|
|
|
if (res.errcode == '0') {
|
|
@@ -223,8 +232,6 @@
|
|
|
.main {
|
|
|
display: flex;
|
|
|
flex-direction: column;
|
|
|
- width: 100vw;
|
|
|
- height: 100vh;
|
|
|
background-image: linear-gradient(to top, rgba(241, 241, 241, 1), rgba(135, 206, 250, 1), rgba(0, 122, 255, 1));
|
|
|
|
|
|
.one {
|
|
@@ -343,6 +350,13 @@
|
|
|
margin: 1vw 0;
|
|
|
}
|
|
|
|
|
|
+ .list {
|
|
|
+ border: 1px solid #d5d5da;
|
|
|
+ border-radius: 5px;
|
|
|
+ margin: 2vw 0 0 0;
|
|
|
+ padding: 2vw;
|
|
|
+ }
|
|
|
+
|
|
|
.other {
|
|
|
padding: 2px 0 0 0;
|
|
|
font-size: var(--font12Size);
|