修改4s店铺和扫码核销
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
// pages/customer/score/exchange.js 20250624
|
||||
import _ from '../../../commons/js/commons'
|
||||
Page({
|
||||
|
||||
/**
|
||||
@@ -7,33 +8,12 @@ Page({
|
||||
data: {
|
||||
startDate: '',
|
||||
endDate: '',
|
||||
orderList: [
|
||||
{
|
||||
id: 1,
|
||||
orderNumber: 'LC202505101913247',
|
||||
customerName: '李先生',
|
||||
customerPhone: '138****382',
|
||||
points: 3000,
|
||||
couponAmount: 2000,
|
||||
couponTitle: '购车补贴',
|
||||
validityPeriod: '2025-01-01~2025-12-12',
|
||||
orderTime: '2025-05-10 19:13'
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
orderNumber: 'LC202505101913247',
|
||||
customerName: '李先生',
|
||||
customerPhone: '138****382',
|
||||
points: 3000,
|
||||
couponAmount: 2000,
|
||||
couponTitle: '购车补贴',
|
||||
validityPeriod: '2025-01-01~2025-12-12',
|
||||
orderTime: '2025-05-10 19:13'
|
||||
}
|
||||
],
|
||||
list: [],
|
||||
loading: true,
|
||||
end: false,
|
||||
noData: false
|
||||
noData: false,
|
||||
pageNo: 1,
|
||||
size: 20
|
||||
},
|
||||
|
||||
/**
|
||||
@@ -60,6 +40,15 @@ Page({
|
||||
onSearch() {
|
||||
console.log('搜索', this.data.startDate, this.data.endDate);
|
||||
// 这里可以添加搜索逻辑
|
||||
this.setData({
|
||||
pageNo: 1,
|
||||
list: [],
|
||||
noData: false,
|
||||
end: false,
|
||||
load: true,
|
||||
loading: false
|
||||
})
|
||||
this.getAppCusorderDestroy();
|
||||
},
|
||||
|
||||
/**
|
||||
@@ -83,7 +72,7 @@ Page({
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
|
||||
this.getAppCusorderDestroy();
|
||||
},
|
||||
|
||||
/**
|
||||
@@ -131,7 +120,46 @@ Page({
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage() {
|
||||
onShareAppMessage() {},
|
||||
getAppCusorderDestroy() {
|
||||
this.setData({
|
||||
load: false,
|
||||
loading: true,
|
||||
})
|
||||
|
||||
}
|
||||
let params = {};
|
||||
params['page'] = this.data.pageNo;
|
||||
params['size'] = this.data.size;
|
||||
if (this.data.startDate) {
|
||||
params['startDate'] = this.data.startDate;
|
||||
}
|
||||
if (this.data.endDate) {
|
||||
params['endDate'] = this.data.endDate;
|
||||
}
|
||||
_.apiQuery.getAppCusorderDestroy(params).then(res => {
|
||||
this.setData({
|
||||
total: res.data.total,
|
||||
pageNo: this.data.pageNo + 1,
|
||||
list: this.data.list.concat(res.data.list),
|
||||
load: true,
|
||||
loading: false,
|
||||
})
|
||||
if (res.data.total == 0) {
|
||||
this.setData({
|
||||
noData: true
|
||||
})
|
||||
} else if (this.data.list.length == res.data.total) {
|
||||
this.setData({
|
||||
end: true
|
||||
})
|
||||
}
|
||||
wx.stopPullDownRefresh()
|
||||
});
|
||||
},
|
||||
//推送链接
|
||||
pushLink(e) {
|
||||
if (e.currentTarget.dataset.url) {
|
||||
_.$router.openUrlScheme(e.currentTarget.dataset.url)
|
||||
}
|
||||
},
|
||||
})
|
||||
@@ -1,3 +1,8 @@
|
||||
{
|
||||
"navigationBarTitleText": "核销记录",
|
||||
"navigationBarTextStyle": "white",
|
||||
"navigationBarBackgroundColor": "#1a1c26",
|
||||
"backgroundColor": "#ffffff",
|
||||
"backgroundColorTop": "#1a1c26",
|
||||
"usingComponents": {}
|
||||
}
|
||||
@@ -25,20 +25,20 @@
|
||||
|
||||
<!-- 订单列表 -->
|
||||
<view class="order-list">
|
||||
<view class="order-item" wx:for="{{orderList}}" wx:key="id">
|
||||
<view class="order-item" wx:for="{{list}}" wx:key="id">
|
||||
<!-- 订单编号和详情按钮 -->
|
||||
<view class="order-header font-26 color-36afa2 pt20 pb20 pl30 pr30">
|
||||
<text class="order-number">订单编号 {{item.orderNumber}}</text>
|
||||
<view class="order-detail-btn" bindtap="viewOrderDetail" data-id="{{item.id}}">
|
||||
<view class="order-header font-26 color-36afa2 pt20 pb20 pl30 pr30" bindtap="pushLink" data-url="/pages/order/detail/index2?id={{item.order_id}}">
|
||||
<text class="order-number">订单编号 {{item.order_sid}}</text>
|
||||
<view class="order-detail-btn" bindtap="viewOrderDetail" data-id="{{item.order_id}}">
|
||||
<text>订单详情 ></text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="inner30">
|
||||
<!-- 客户信息 -->
|
||||
<view class="customer-info">
|
||||
<text class="customer-name">{{item.customerName}}</text>
|
||||
<text class="customer-phone">({{item.customerPhone}})</text>
|
||||
<view class="points-info">
|
||||
<text class="customer-name">{{item.name}}</text>
|
||||
<text class="customer-phone">({{item.mobile}})</text>
|
||||
<view class="points-info" wx:if="{{item.points}}">
|
||||
<text class="points-label">消耗积分:</text>
|
||||
<text class="points-value">{{item.points}}</text>
|
||||
</view>
|
||||
@@ -48,7 +48,7 @@
|
||||
<view class="coupon-card">
|
||||
<view class="coupon-left text-center">
|
||||
<view >
|
||||
<text class="coupon-amount">{{item.couponAmount}}</text>
|
||||
<text class="coupon-amount">{{item.price}}</text>
|
||||
<text class="coupon-unit">元</text>
|
||||
</view>
|
||||
<view class="coupon-rules mt10 font-22" bindtap="viewCouponRules">
|
||||
@@ -57,14 +57,15 @@
|
||||
</view>
|
||||
<view class="coupon-divider"></view>
|
||||
<view class="coupon-right">
|
||||
<text class="coupon-title text-italic text-bold"><text>购车</text><text style="color:#f84803;">补贴</text></text>
|
||||
<text class="coupon-validity font-22">时限 {{item.validityPeriod}}</text>
|
||||
<text class="coupon-title text-italic text-bold">
|
||||
<text>{{item.type_cn}}</text><text style="color:#f84803;">{{item.red_type_cn}}</text></text>
|
||||
<text class="coupon-validity font-22">时限 {{item.timeStart}}-{{item.timeEnd}}</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 下单时间 -->
|
||||
<view class="order-time font-24 color-666">
|
||||
<text>下单时间: {{item.orderTime}}</text>
|
||||
<text>核销时间: {{item.use_time}}</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
+27
-2
@@ -8,6 +8,7 @@ Page({
|
||||
mobile: '',
|
||||
isShowProfile: true, //是否显示授权用户信息按钮
|
||||
isShowSwitchingRoles: false,
|
||||
biz_type_4s: 5 //门店类型4s店
|
||||
},
|
||||
onLoad: function (options) {
|
||||
for (let key in options) {
|
||||
@@ -203,8 +204,32 @@ Page({
|
||||
bindScanCode(){
|
||||
wx.scanCode({
|
||||
success(res) {
|
||||
console.log(res)
|
||||
}
|
||||
let params = {
|
||||
'sid':res.result
|
||||
}
|
||||
_.apiQuery.postAppCusorderDestroy(params).then(res => {
|
||||
if (res.code == 200) {
|
||||
wx.showToast({
|
||||
title: res.msg,
|
||||
icon: 'success',
|
||||
duration: 2000
|
||||
})
|
||||
}else{
|
||||
wx.showToast({
|
||||
title: res.msg,
|
||||
duration: 2000
|
||||
})
|
||||
}
|
||||
});
|
||||
},
|
||||
fail(err) {
|
||||
wx.showToast({
|
||||
title: '扫描失败,请重试',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
},
|
||||
|
||||
})
|
||||
},
|
||||
//其他菜单
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
<view class="absolute right-0 box-middle p240" >
|
||||
<!-- 20250624 -->
|
||||
<view class="bg-f6 mb25 pt10 pb10 pl20 pr15 font-22 color-666 ulib-rl750 fn-flex fn-flex-middle" bindtap="bindScanCode" wx:if="{{userInfo.group_name_arr.length>0}}">
|
||||
<view class="bg-f6 mb25 pt10 pb10 pl20 pr15 font-22 color-666 ulib-rl750 fn-flex fn-flex-middle" bindtap="bindScanCode" wx:if="{{userInfo.biz_type==biz_type_4s}}">
|
||||
<i class="custom-icon custom-icon-scancode mr10"></i><text>扫码</text>
|
||||
</view>
|
||||
<view class="bg-f6 mb25 pt10 pb10 pl20 pr15 font-22 color-666 ulib-rl750" bindtap="switchingRoles" wx:if="{{userInfo.group_name_arr.length>0}}">
|
||||
|
||||
@@ -29,7 +29,7 @@ Page({
|
||||
confirm_count_down: 3,
|
||||
wxTimerList: {},
|
||||
wxTimer: null,
|
||||
group_id_4s: 5 //角色类型4店铺
|
||||
biz_type_4s: 5 //门店类型4s店
|
||||
},
|
||||
onLoad: function (options) {
|
||||
for (let key in options) {
|
||||
|
||||
@@ -98,7 +98,7 @@
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
<block wx:if="{{userInfo.group_id!=group_id_4s}}">
|
||||
<block wx:if="{{userInfo.biz_type!=biz_type_4s}}">
|
||||
<!--订单合同-->
|
||||
<view class="relative bbs-1-eb pl140 font-28" bindtap="pushLink" data-url="/pages/order/editImg/index?id={{id}}&type=contract_img&title=订单合同&multi=true&edit={{info.status>0?'0':'1'}}">
|
||||
<view class="absolute left-0 box-middle font-32 color-333">订单合同</view>
|
||||
|
||||
@@ -62,7 +62,7 @@ Page({
|
||||
discount_amount: '', //⻋身优惠
|
||||
business_type: 0,
|
||||
brand_page_show: false,
|
||||
group_id_4s: 5 //角色类型4店铺
|
||||
biz_type_4s: 5 //门店类型4s店
|
||||
},
|
||||
//生命周期函数--监听页面加载
|
||||
onLoad: function (options) {
|
||||
@@ -308,7 +308,7 @@ Page({
|
||||
this.setData({
|
||||
userInfo: res,
|
||||
})
|
||||
if (res.group_id == this.data.group_id_4s) { //4s店铺
|
||||
if (res.biz_type == this.data.biz_type_4s) { //4s店铺
|
||||
let tab = [{
|
||||
title: '车辆信息',
|
||||
step: 2,
|
||||
|
||||
@@ -148,7 +148,7 @@
|
||||
</view>
|
||||
<view class="fixed left-0 right-0 bottom-0 bg-fff-op90 inner40 fn-flex safe-pb">
|
||||
<block wx:if="{{step==2}}">
|
||||
<block wx:if="{{userInfo.group_id==group_id_4s}}">
|
||||
<block wx:if="{{userInfo.biz_type==biz_type_4s}}">
|
||||
<button class="wp100 btn-36afa2 ml20 pt10 pb10 text-center font-32 color-fff ulib-r750" hover-class="btn-36afa2-hover" disabled="{{submitFlag}}" bindtap="putAppCusorderV2">确认</button>
|
||||
</block>
|
||||
<block wx:else>
|
||||
|
||||
@@ -18,7 +18,7 @@ Page({
|
||||
step: 1,
|
||||
name: '', //姓名
|
||||
mobile: '', //手机号
|
||||
cardid: '350822198911298152', //身份证
|
||||
cardid: '', //身份证
|
||||
brand_id: '', //品牌
|
||||
brand_name: '', //品牌名称
|
||||
series_id: '', //车系id
|
||||
@@ -68,7 +68,7 @@ Page({
|
||||
confirm_amount: '', //定⾦
|
||||
discount_amount: '', //⻋身优惠
|
||||
brand_page_show: false,
|
||||
group_id_4s: 5 //角色类型4店铺
|
||||
biz_type_4s: 5 //门店类型4s店
|
||||
},
|
||||
//生命周期函数--监听页面加载
|
||||
onLoad: function (options) {
|
||||
@@ -145,7 +145,7 @@ Page({
|
||||
icon: 'none'
|
||||
})
|
||||
} else {
|
||||
if (this.data.userInfo.group_id == this.data.group_id_4s) {
|
||||
if (this.data.userInfo.biz_type == this.data.biz_type_4s) {
|
||||
this.showPreview();
|
||||
} else {
|
||||
this.setData({
|
||||
@@ -203,7 +203,7 @@ Page({
|
||||
this.setData({
|
||||
userInfo: res,
|
||||
})
|
||||
if (res.group_id == this.data.group_id_4s) { //4s店铺
|
||||
if (res.biz_type == this.data.biz_type_4s) { //4s店铺
|
||||
let main = [{
|
||||
title: '个人',
|
||||
value: 0
|
||||
|
||||
@@ -215,7 +215,7 @@
|
||||
</block>
|
||||
<block wx:if="{{step==2}}">
|
||||
<button class="wp100 bds-2-36afa2 bg-fff mr20 pt10 pb10 text-center font-32 color-36afa2 ulib-r750" hover-class="btn-36afa2-hover" bindtap="optstep" data-step="{{step-1}}">上一步</button>
|
||||
<block wx:if="{{userInfo.group_id==group_id_4s}}">
|
||||
<block wx:if="{{userInfo.biz_type==biz_type_4s}}">
|
||||
<button class="wp100 btn-36afa2 pt10 pb10 text-center font-32 color-fff ulib-r750" hover-class="btn-36afa2-hover" bindtap="nextstep">登记预览</button>
|
||||
</block>
|
||||
<block wx:else>
|
||||
@@ -271,7 +271,7 @@
|
||||
<view class="absolute left-0 box-middle font-28 color-333">内饰颜色</view>
|
||||
<view class="pt30 pb30 text-right font-28 color-666">{{in_color}}</view>
|
||||
</view>
|
||||
<block wx:if="{{userInfo.group_id!=group_id_4s}}">
|
||||
<block wx:if="{{userInfo.biz_type!=biz_type_4s}}">
|
||||
<view class="mt40 font-32">其他信息</view>
|
||||
<view class="relative bbs-1-eb pl190 last-b-none">
|
||||
<view class="absolute left-0 box-middle font-28 color-333">付款方式</view>
|
||||
@@ -369,7 +369,7 @@
|
||||
<view class="font-36 text-center">订单登记成功</view>
|
||||
<view class="font-30 pt10 text-left">
|
||||
<view class="pt10 text-center">--- 请及时上传 ---</view>
|
||||
<block wx:if="{{userInfo.group_id!=group_id_4s}}">
|
||||
<block wx:if="{{userInfo.biz_type!=biz_type_4s}}">
|
||||
<view class="text-center">订单合同</view>
|
||||
<view class="text-center">付款凭证</view>
|
||||
</block>
|
||||
|
||||
Reference in New Issue
Block a user