|
@ -9,32 +9,36 @@ |
|
|
</view> |
|
|
</view> |
|
|
|
|
|
|
|
|
<view class="content-area flex-1 h-1rpx"> |
|
|
<view class="content-area flex-1 h-1rpx"> |
|
|
<view class="type0-container" v-show="type==0"> |
|
|
<template v-if="orderList.length<=0"> |
|
|
<image :src="showImg('/uploads/20241203/e114fd176d9ef85e81e57150274bcc4a.png')"></image> |
|
|
<view class="type0-container" v-show="type==0"> |
|
|
<view @click="scanCode">点击扫码核销</view> |
|
|
<image @click="scanCode" :src="showImg('/uploads/20241203/e114fd176d9ef85e81e57150274bcc4a.png')"></image> |
|
|
</view> |
|
|
<view @click="scanCode">点击扫码核销</view> |
|
|
<view class="type1-container" v-show="type==1"> |
|
|
|
|
|
<view class="flex flex-items-center"> |
|
|
|
|
|
<view class="hexiao-text">输入核销码</view> |
|
|
|
|
|
<input v-model="HXCode" class="hexiao-code" placeholder="请输入内容" /> |
|
|
|
|
|
</view> |
|
|
</view> |
|
|
<view class="hexiao-btn" @click="verifyByCode">立即核销</view> |
|
|
<view class="type1-container" v-show="type==1"> |
|
|
</view> |
|
|
|
|
|
<view class="type1-container" v-show="type==2"> |
|
|
|
|
|
<view v-if="orderList.length<=0"> |
|
|
|
|
|
<view class="flex flex-items-center"> |
|
|
<view class="flex flex-items-center"> |
|
|
<view class="hexiao-text">输入手机号</view> |
|
|
<view class="hexiao-text">输入核销码</view> |
|
|
<input v-model="HXPhone" class="hexiao-code" placeholder="请输入内容" /> |
|
|
<input v-model="HXCode" class="hexiao-code" placeholder="请输入内容" /> |
|
|
</view> |
|
|
</view> |
|
|
<view class="tips"> |
|
|
<view class="hexiao-btn" @click="verifyByCode">立即核销</view> |
|
|
<view>注:仅支持查询当日订单 </view> |
|
|
</view> |
|
|
<view>支持手机号模糊搜索(不少于4位)</view> |
|
|
<view class="type1-container" v-show="type==2"> |
|
|
|
|
|
<view v-if="orderList.length<=0"> |
|
|
|
|
|
<view class="flex flex-items-center"> |
|
|
|
|
|
<view class="hexiao-text">输入手机号</view> |
|
|
|
|
|
<input v-model="HXPhone" class="hexiao-code" placeholder="请输入内容" /> |
|
|
|
|
|
</view> |
|
|
|
|
|
<view class="tips"> |
|
|
|
|
|
<view>注:仅支持查询当日订单 </view> |
|
|
|
|
|
<view>支持手机号模糊搜索(不少于4位)</view> |
|
|
|
|
|
</view> |
|
|
|
|
|
<view class="hexiao-btn" style="margin-top: 100rpx;" @click="searchByPhone">查询</view> |
|
|
</view> |
|
|
</view> |
|
|
<view class="hexiao-btn" style="margin-top: 100rpx;" @click="searchByPhone">查询</view> |
|
|
|
|
|
</view> |
|
|
</view> |
|
|
|
|
|
</template> |
|
|
<view class="order-list" v-else> |
|
|
|
|
|
<view class="order-item"> |
|
|
<view class="type1-container" v-else> |
|
|
|
|
|
<view class="order-list" > |
|
|
|
|
|
<view class="order-item" v-for="(item,i) in orderList" :key="i"> |
|
|
<view class="title">订单详情</view> |
|
|
<view class="title">订单详情</view> |
|
|
<view class="flex" > |
|
|
<view class="flex" > |
|
|
<view class="label">下单日期:</view> |
|
|
<view class="label">下单日期:</view> |
|
@ -46,7 +50,7 @@ |
|
|
</view> |
|
|
</view> |
|
|
<view class="flex"> |
|
|
<view class="flex"> |
|
|
<view class="label">订单名称:</view> |
|
|
<view class="label">订单名称:</view> |
|
|
<view class="text"> {{item.name}}</view> |
|
|
<view class="text"> {{item.goods_title}}</view> |
|
|
</view> |
|
|
</view> |
|
|
<view class="flex"> |
|
|
<view class="flex"> |
|
|
<view class="label">数量:</view> |
|
|
<view class="label">数量:</view> |
|
@ -58,81 +62,32 @@ |
|
|
</view> |
|
|
</view> |
|
|
<view class="flex"> |
|
|
<view class="flex"> |
|
|
<view class="label">时段:</view> |
|
|
<view class="label">时段:</view> |
|
|
<view class="text"></view> |
|
|
<view class="text">{{item.use_date}}</view> |
|
|
</view> |
|
|
</view> |
|
|
<view class="flex"> |
|
|
<view class="flex"> |
|
|
<view class="label">出行人:</view> |
|
|
<view class="label">出行人:</view> |
|
|
<view class="text">{{item.nickname}}</view> |
|
|
<view class="text">{{item.contact_name}}</view> |
|
|
</view> |
|
|
</view> |
|
|
<view class="flex"> |
|
|
<view class="flex"> |
|
|
<view class="label">出行人手机号:</view> |
|
|
<view class="label">出行人手机号:</view> |
|
|
<view class="text">{{item.phone}}</view> |
|
|
<view class="text">{{item.contact_tel}}</view> |
|
|
</view> |
|
|
</view> |
|
|
<view class="flex"> |
|
|
<view class="flex"> |
|
|
<view class="label">出行人身份证:</view> |
|
|
<view class="label">出行人身份证:</view> |
|
|
<view class="text">{{item.user_id_number}}</view> |
|
|
<view class="text">{{item.id_number}}</view> |
|
|
</view> |
|
|
</view> |
|
|
|
|
|
|
|
|
<view class="hexiao-btn" @click="verifyByPhone">核销</view> |
|
|
<view class="hexiao-btn" @click="verifyByPhone">核销</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
|
|
|
|
|
|
</view> |
|
|
</view> |
|
|
|
|
|
|
|
|
<!-- 核销弹窗 --> |
|
|
|
|
|
<uni-popup ref="popup" type="center" style="width: 100%;"> |
|
|
|
|
|
<view class="pop-order-detail order-item"> |
|
|
|
|
|
<view class="title flex-shrink-0">确认是否核销</view> |
|
|
|
|
|
<view class="pop-order-content flex-1 h-1rpx"> |
|
|
|
|
|
<template v-for="(item,i) in orderList"> |
|
|
|
|
|
<view class="flex" :key="i"> |
|
|
|
|
|
<view class="label">下单日期:</view> |
|
|
|
|
|
<view class="text">{{item.create_time}}</view> |
|
|
|
|
|
</view> |
|
|
|
|
|
<view class="flex"> |
|
|
|
|
|
<view class="label">订单号:</view> |
|
|
|
|
|
<view class="text">{{item.order_id}}</view> |
|
|
|
|
|
</view> |
|
|
|
|
|
<view class="flex"> |
|
|
|
|
|
<view class="label">订单名称:</view> |
|
|
|
|
|
<view class="text"> {{item.name}}</view> |
|
|
|
|
|
</view> |
|
|
|
|
|
<view class="flex"> |
|
|
|
|
|
<view class="label">数量:</view> |
|
|
|
|
|
<view class="text">{{item.num}}</view> |
|
|
|
|
|
</view> |
|
|
|
|
|
<view class="flex"> |
|
|
|
|
|
<view class="label">订单状态:</view> |
|
|
|
|
|
<view class="text">{{item.status_text}}</view> |
|
|
|
|
|
</view> |
|
|
|
|
|
<view class="flex"> |
|
|
|
|
|
<view class="label">时段:</view> |
|
|
|
|
|
<view class="text"></view> |
|
|
|
|
|
</view> |
|
|
|
|
|
<view class="flex"> |
|
|
|
|
|
<view class="label">出行人:</view> |
|
|
|
|
|
<view class="text">{{item.nickname}}</view> |
|
|
|
|
|
</view> |
|
|
|
|
|
<view class="flex"> |
|
|
|
|
|
<view class="label">出行人手机号:</view> |
|
|
|
|
|
<view class="text">{{item.phone}}</view> |
|
|
|
|
|
</view> |
|
|
|
|
|
<view class="flex"> |
|
|
|
|
|
<view class="label">出行人身份证:</view> |
|
|
|
|
|
<view class="text">{{item.user_id_number}}</view> |
|
|
|
|
|
</view> |
|
|
|
|
|
</template> |
|
|
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
|
|
<view class="bottom-btn"> |
|
|
|
|
|
<view class="hexiao-btn" @click="confirmVerify">核销</view> |
|
|
|
|
|
</view> |
|
|
|
|
|
</view> |
|
|
|
|
|
</uni-popup> |
|
|
|
|
|
|
|
|
|
|
|
<template v-if="showScan"> |
|
|
<view v-if="showScan"> |
|
|
<scanCodeVue ref="scanCodeVueRef" @success="getCode" @fail="scanFail"></scanCodeVue> |
|
|
<scanCodeVue ref="scanCodeVueRef" @success="getCode" @fail="scanFail"></scanCodeVue> |
|
|
</template> |
|
|
</view> |
|
|
|
|
|
|
|
|
</view> |
|
|
</view> |
|
|
</template> |
|
|
</template> |
|
@ -163,6 +118,12 @@ |
|
|
getCode (res) { |
|
|
getCode (res) { |
|
|
console.log(res) |
|
|
console.log(res) |
|
|
this.showScan = false |
|
|
this.showScan = false |
|
|
|
|
|
|
|
|
|
|
|
if (res) { |
|
|
|
|
|
let param = {child_id: res} |
|
|
|
|
|
this.getOrderList(param) |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
scanFail(res) { |
|
|
scanFail(res) { |
|
|
this.showScan = false |
|
|
this.showScan = false |
|
@ -173,26 +134,35 @@ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
setType (type) { |
|
|
setType (type) { |
|
|
|
|
|
if (this.type != type) { |
|
|
|
|
|
this.orderList = [] |
|
|
|
|
|
} |
|
|
this.type = type |
|
|
this.type = type |
|
|
}, |
|
|
}, |
|
|
// 微信扫码获取订单详情 |
|
|
// 查询订单 |
|
|
getOrderByCode (code) { |
|
|
getOrderList (param) { |
|
|
this.Post({ |
|
|
this.orderList = [] |
|
|
code: code |
|
|
this.Post(param, '/api/Merchants/search').then(res=>{ |
|
|
}, '/api/wx/jsSdk').then(res=>{ |
|
|
|
|
|
if (res && res.code == 1 && res.data) { |
|
|
if (res && res.code == 1 && res.data) { |
|
|
this.orderList = [res.data] |
|
|
this.orderList = res.data || [] |
|
|
this.$refs.popup.open() |
|
|
|
|
|
|
|
|
if (this.orderList.length<=0) { |
|
|
|
|
|
uni.showToast({ |
|
|
|
|
|
title:'未查询到需核销的订单', |
|
|
|
|
|
icon:"none" |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
// 核销码核销 |
|
|
// 核销搜索 |
|
|
verifyByCode () { |
|
|
verifyByCode () { |
|
|
if (this.HXCode.trim() == '') { |
|
|
if (this.HXCode.trim() == '') { |
|
|
uni.showToast({title:'请输入核销码',icon:"none"}) |
|
|
uni.showToast({title:'请输入核销码',icon:"none"}) |
|
|
return |
|
|
return |
|
|
} |
|
|
} |
|
|
this.getOrderByCode(this.HXCode) |
|
|
let param = {child_id: this.HXCode.trim()} |
|
|
|
|
|
this.getOrderList(param) |
|
|
}, |
|
|
}, |
|
|
// 确认核销 |
|
|
// 确认核销 |
|
|
confirmVerify () { |
|
|
confirmVerify () { |
|
@ -216,12 +186,8 @@ |
|
|
uni.showToast({title:'查询手机号最低4位',icon:"none"}) |
|
|
uni.showToast({title:'查询手机号最低4位',icon:"none"}) |
|
|
return |
|
|
return |
|
|
} |
|
|
} |
|
|
// this.Post({ |
|
|
let param = {mobile: this.HXPhone.trim()} |
|
|
// mobile: this.HXPhone |
|
|
this.getOrderList(param) |
|
|
// }, '/api/wx/jsSdk').then(res=>{ |
|
|
|
|
|
|
|
|
|
|
|
// }) |
|
|
|
|
|
this.orderList = [{}] |
|
|
|
|
|
}, |
|
|
}, |
|
|
// 手机号核销 |
|
|
// 手机号核销 |
|
|
verifyByPhone () { |
|
|
verifyByPhone () { |
|
@ -241,46 +207,6 @@ |
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
// 微信扫码 |
|
|
|
|
|
initWX () { |
|
|
|
|
|
try { |
|
|
|
|
|
// if (window.navigator.userAgent.toLowerCase().match(/MicroMessenger/i) == "micromessenger") { |
|
|
|
|
|
let that = this |
|
|
|
|
|
this.Post({ |
|
|
|
|
|
web_url: encodeURIComponent(window.location.href.split('#')[0]), |
|
|
|
|
|
apis: 'scanQRCode' |
|
|
|
|
|
}, '').then(res => { |
|
|
|
|
|
if (res) { |
|
|
|
|
|
let data = res.jssdk |
|
|
|
|
|
//初始化微信功能 |
|
|
|
|
|
wx.config({ |
|
|
|
|
|
debug: false, |
|
|
|
|
|
appId: data.appId, |
|
|
|
|
|
timestamp: data.timestamp, |
|
|
|
|
|
nonceStr: data.nonceStr, |
|
|
|
|
|
signature: data.signature,// + "asdfasdf",//测试获取地理位置失败 |
|
|
|
|
|
jsApiList: ['scanQRCode'] |
|
|
|
|
|
}); |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
// } |
|
|
|
|
|
} catch (e) {} |
|
|
|
|
|
}, |
|
|
|
|
|
// 调起微信扫码 |
|
|
|
|
|
saoma() { |
|
|
|
|
|
let that = this |
|
|
|
|
|
wx.scanQRCode({ |
|
|
|
|
|
needResult: 1, // 默认为0,扫描结果由微信处理,1则直接返回扫描结果, |
|
|
|
|
|
scanType: ["qrCode", "barCode"], // 可以指定扫二维码还是一维码,默认二者都有 |
|
|
|
|
|
success: function (res) { |
|
|
|
|
|
that.getOrderByCode(res.resultStr.split('?')[1].split('=')[1]) |
|
|
|
|
|
}, |
|
|
|
|
|
fail: function (error) { |
|
|
|
|
|
console.log(error) |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
@ -413,6 +339,7 @@ |
|
|
font-weight: 500; |
|
|
font-weight: 500; |
|
|
font-size: 28rpx; |
|
|
font-size: 28rpx; |
|
|
color: #000000; |
|
|
color: #000000; |
|
|
|
|
|
margin-bottom: 30rpx; |
|
|
&>view{ |
|
|
&>view{ |
|
|
margin-bottom: 26rpx; |
|
|
margin-bottom: 26rpx; |
|
|
} |
|
|
} |
|
@ -434,44 +361,11 @@ |
|
|
.hexiao-btn{ |
|
|
.hexiao-btn{ |
|
|
margin: 0; |
|
|
margin: 0; |
|
|
margin-left: auto; |
|
|
margin-left: auto; |
|
|
} |
|
|
width: 200rpx; |
|
|
} |
|
|
height: 66rpx; |
|
|
|
|
|
line-height: 66rpx; |
|
|
.pop-order-detail{ |
|
|
|
|
|
width: 640rpx; |
|
|
|
|
|
height: 800rpx; |
|
|
|
|
|
background: #FFFFFF; |
|
|
|
|
|
border-radius: 13rpx; |
|
|
|
|
|
display: flex; |
|
|
|
|
|
flex-direction: column; |
|
|
|
|
|
overflow: hidden; |
|
|
|
|
|
.pop-order-content{ |
|
|
|
|
|
overflow-x: hidden; |
|
|
|
|
|
overflow-y: auto; |
|
|
|
|
|
&>view{ |
|
|
|
|
|
margin-bottom: 12rpx; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
.bottom-btn{ |
|
|
|
|
|
display: flex; |
|
|
|
|
|
width: 100%; |
|
|
|
|
|
padding: 20rpx 0 0; |
|
|
|
|
|
align-items: center; |
|
|
|
|
|
justify-content: space-between; |
|
|
|
|
|
margin: 0; |
|
|
|
|
|
} |
|
|
|
|
|
.hexiao-btn{ |
|
|
|
|
|
width: 160rpx; |
|
|
|
|
|
height: 60rpx; |
|
|
|
|
|
background: #96684F; |
|
|
|
|
|
border-radius: 30rpx; |
|
|
|
|
|
font-weight: 500; |
|
|
font-weight: 500; |
|
|
font-size: 24rpx; |
|
|
font-size: 28rpx; |
|
|
color: #FFFFFF; |
|
|
|
|
|
line-height: 60rpx; |
|
|
|
|
|
text-align: center; |
|
|
|
|
|
display: block; |
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
</style> |
|
|
</style> |