Commit 900aab32 by 张立顺

fix:超时订单详情页提示

1 parent 76da0009
# 项目名 精品升级小程序 # 项目名 精品升级小程序
# 账号登录可以使用以下(验证码 开发和测试环境任意输入即可): # 账号登录可以使用以下(验证码 开发和测试环境任意输入即可):
超级管理员:13022223223(测试环境) 13476670746(开发环境) 超级管理员:13022223223(测试环境) 13476670746(开发环境)
供应商账号:13978573226 (选testfws1) 供应商账号:13978573226 (选testfws1) 15023656699 13978573226
园区店管理员: 15589265685(测试环境)
员工账号 :15626599735 (选明明塘朗园区店) 员工账号 :15626599735 (选明明塘朗园区店)
员工账号 :18775035205 (选测试园店) 员工账号 :18775035205 (选测试园店)
员工账号 :13632791593 (选fennun03能下单 园区测试门店有多条数据) 员工账号 :13632791593 (选fennun03能下单 园区测试门店有多条数据)
园区店管理员: 15589265685(测试环境)
# 项目功需真机测试的功能:scroll-view组件里面有组件使用fixed定位的组件 # 项目功需真机测试的功能:scroll-view组件里面有组件使用fixed定位的组件
# 测试机iphone8plus 密码 127458 # 测试机iphone8plus 密码 127458
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
const accountInfo = wx.getAccountInfoSync() const accountInfo = wx.getAccountInfoSync()
// console.log(accountInfo.miniProgram.envVersion) // console.log(accountInfo.miniProgram.envVersion)
let index = 1 let index = 2
// 判断小程序环境 // 判断小程序环境
// develop:开发版(正常开发工具,测试时) // develop:开发版(正常开发工具,测试时)
......
...@@ -8,6 +8,18 @@ Component({ ...@@ -8,6 +8,18 @@ Component({
type: Number, type: Number,
value: -1 value: -1
}, },
show: {
String
// observer: function (boolean) {
// // console.log(n)
// // this.resetData(n)
// if (boolean) {
// // this.data.value = this.
// console.log(this.data.value)
// this.data.inputValue = this.data.value ? this.data.value : ''
// }
// }
},
customMaxLength: Boolean, customMaxLength: Boolean,
placeholder: String, placeholder: String,
showWordLimit: Boolean, showWordLimit: Boolean,
...@@ -32,6 +44,7 @@ Component({ ...@@ -32,6 +44,7 @@ Component({
*/ */
data: { data: {
edit: true, edit: true,
// inputValue: null
value: null value: null
}, },
...@@ -75,7 +88,7 @@ Component({ ...@@ -75,7 +88,7 @@ Component({
value = parseFloat(value) value = parseFloat(value)
} }
} }
console.log(value)
this.setData({ value }) this.setData({ value })
return value return value
......
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
min-height: 120rpx; min-height: 120rpx;
position: relative; position: relative;
height: 100%; height: 100%;
line-height: 14rpx;
} }
.textarea-box .textarea { .textarea-box .textarea {
position: absolute; position: absolute;
...@@ -13,14 +14,17 @@ ...@@ -13,14 +14,17 @@
width: 100%; width: 100%;
height: 100%; height: 100%;
overflow-y: scroll; overflow-y: scroll;
line-height: 32rpx; /* line-height: 32rpx; */
word-break: break-all; word-break: break-all;
} }
._textarea_ { ._textarea_ {
width: 100%; width: 100%;
line-height: 14rpx;
height: calc(100% - 40rpx); height: calc(100% - 40rpx);
} }
.textarea-box.showWordLimit .textarea { .textarea-box.showWordLimit .textarea {
line-height: 14rpx;
height: calc(100% - 40rpx); height: calc(100% - 40rpx);
} }
......
...@@ -4,10 +4,19 @@ Component({ ...@@ -4,10 +4,19 @@ Component({
* 组件的属性列表 * 组件的属性列表
*/ */
properties: { properties: {
show: Boolean, show: {
Boolean,
value: false,
observer: function (n) {
// if (n) this.getLetter()
console.log(n)
}
},
placeholder: String, placeholder: String,
maxlength: Number, maxlength: Number,
value: String, value: {
String
},
// isFormComponent: { // isFormComponent: {
// type: Boolean, // type: Boolean,
// value: false // value: false
...@@ -32,7 +41,10 @@ Component({ ...@@ -32,7 +41,10 @@ Component({
/** /**
* 组件的初始数据 * 组件的初始数据
*/ */
data: {}, data: {
inputValue: '',
isEdit: false
},
/** /**
* 组件的方法列表 * 组件的方法列表
...@@ -41,13 +53,19 @@ Component({ ...@@ -41,13 +53,19 @@ Component({
noScroll() {}, noScroll() {},
blur(e) { blur(e) {
this.setData({ this.setData({
value: e.detail.value inputValue: e.detail.value,
isEdit: true
}) })
}, },
showPopup(e) { showPopup(e) {
// console.log() // console.log()
let { name } = e.currentTarget.dataset let { name, btnName } = e.currentTarget.dataset
console.log(name) // if (btnName == 'cancel') {
// this.setData({
// value: ''
// })
// }
// console.log(name)
// 判断是不是来自组件 不是调用页面的数据修改 // 判断是不是来自组件 不是调用页面的数据修改
// 是用方法回传关闭 // 是用方法回传关闭
// let { isFormComponent } = this.data // let { isFormComponent } = this.data
...@@ -58,14 +76,28 @@ Component({ ...@@ -58,14 +76,28 @@ Component({
thisPage.setData({ thisPage.setData({
[name]: false [name]: false
}) })
this.setData({
isEdit: false
})
// } else { // } else {
// // console.log('tri') // // console.log('tri')
// this.triggerEvent('closePop') // this.triggerEvent('closePop')
// } // }
}, },
remarkConfirm() { remarkConfirm() {
this.triggerEvent('confirm', this.data.value) console.log('confirm')
let { isInt, value, inputValue, isEdit } = this.data
let confirmValue = isEdit ? inputValue : value
console.log('1', confirmValue)
console.log('confirmValue', confirmValue.length)
if (isInt && !confirmValue.toString().length) {
return wx.showToast({
title: '修改值不能为空',
icon: 'none'
})
}
// let { isFormComponent } = this.data // let { isFormComponent } = this.data
this.triggerEvent('confirm', confirmValue)
// if (!isFormComponent) { // if (!isFormComponent) {
this.showPopup({ this.showPopup({
currentTarget: { currentTarget: {
......
<block wx:if="{{show}}"> <block>
<!-- wx:if="{{show}}" -->
<view class="fixed-box fixed-remark-box" catchtouchmove="noScroll"> <view class="fixed-box fixed-remark-box" catchtouchmove="noScroll">
<view class="fixed-bg" bindtap="showPopup" data-name="showRemark" /> <view class="fixed-bg" bindtap="showPopup" data-name="showRemark" />
<view class="fixed-content"> <view class="fixed-content">
...@@ -7,6 +8,7 @@ ...@@ -7,6 +8,7 @@
<view class="fixed-remark"> <view class="fixed-remark">
<gl-textarea <gl-textarea
value="{{value}}" value="{{value}}"
show="{{show}}"
bindinput="blur" bindinput="blur"
maxlength="{{maxlength}}" maxlength="{{maxlength}}"
placeholder="{{placeholder || '请输入'}}" placeholder="{{placeholder || '请输入'}}"
...@@ -16,7 +18,13 @@ ...@@ -16,7 +18,13 @@
</view> </view>
</view> </view>
<view class="fixed-footer"> <view class="fixed-footer">
<view class="fixed-cancel text-center" bindtap="showPopup" data-name="showRemark">取消</view> <view
class="fixed-cancel text-center"
bindtap="showPopup"
data-btnName="cancel"
data-name="showRemark">
取消
</view>
<view class="fixed-confirm text-center" bindtap="remarkConfirm">{{btnName||'确定'}}</view> <view class="fixed-confirm text-center" bindtap="remarkConfirm">{{btnName||'确定'}}</view>
</view> </view>
</view> </view>
......
<!--tabDate/pages/detail/detail.wxml--> <!-- tabDate/pages/detail/detail.wxml -->
<block wx:if="{{flag}}"> <block wx:if="{{flag}}">
<view class="main"> <view class="main">
<view class="box"> <view class="box">
...@@ -7,11 +7,17 @@ ...@@ -7,11 +7,17 @@
<block wx:for="{{customerObj}}" wx:key="index"> <block wx:for="{{customerObj}}" wx:key="index">
<view class="item"> <view class="item">
<view class="label">{{item.label}}</view> <view class="label">{{item.label}}</view>
<view class="value text-hide" style="color:{{item.color}};" catchtap="{{item.callBack}}" data-data="{{detail[item.key]}}"> <view
class="value text-hide"
style="color:{{item.color}};"
catchtap="{{item.callBack}}"
data-data="{{detail[item.key]}}">
{{item.enum? item.enum[detail[item.key]] : detail[item.key] || ''}} {{item.enum? item.enum[detail[item.key]] : detail[item.key] || ''}}
</view> </view>
<block wx:if="{{item.copy}}"> <block wx:if="{{item.copy}}">
<view class="copy" catchtap="setCopyData" data-content="{{detail[item.key]}}">复制</view> <view class="copy" catchtap="setCopyData" data-content="{{detail[item.key]}}">
复制
</view>
</block> </block>
</view> </view>
</block> </block>
...@@ -20,7 +26,7 @@ ...@@ -20,7 +26,7 @@
<view class="box "> <view class="box ">
<block wx:if="{{!userInfo.isSuper && userInfo.merchantType && userInfo.userType == 2}}"> <block wx:if="{{!userInfo.isSuper && userInfo.merchantType && userInfo.userType == 2}}">
<view class="icon date-icon" bindtap="showPopup" data-name="showDate"> <view class="icon date-icon" bindtap="showPopup" data-name="showDate">
<image src="../../images/date.png"></image> <image src="../../images/date.png" />
</view> </view>
</block> </block>
<view class="title">到店时间</view> <view class="title">到店时间</view>
...@@ -45,16 +51,15 @@ ...@@ -45,16 +51,15 @@
<view class="record-box"> <view class="record-box">
<block wx:for="{{detail.remarks}}" wx:key="index"> <block wx:for="{{detail.remarks}}" wx:key="index">
<view class="record {{index != 0 ? 'opacity' : ''}}"> <view class="record {{index != 0 ? 'opacity' : ''}}">
<view class="line" wx:if="{{index != detail.remarks.length - 1}}"> <view class="line" wx:if="{{index != detail.remarks.length - 1}}" />
</view>
<block wx:if="{{detail.remarks.length > 1}}"> <block wx:if="{{detail.remarks.length > 1}}">
<block wx:if="{{index == 0 }}"> <block wx:if="{{index == 0 }}">
<view class="arc-icon"> <view class="arc-icon">
<image src="/images/active-arc.png"></image> <image src="/images/active-arc.png" />
</view> </view>
</block> </block>
<block wx:else> <block wx:else>
<view class="arc"></view> <view class="arc" />
</block> </block>
</block> </block>
<view class="time"> <view class="time">
...@@ -62,7 +67,11 @@ ...@@ -62,7 +67,11 @@
{{item.time}} {{item.time}}
</view> </view>
<view class="info"> <view class="info">
<block wx:for="{{recordObj}}" wx:key="ind" wx:for-index="ind" wx:for-item="i"> <block
wx:for="{{recordObj}}"
wx:key="ind"
wx:for-index="ind"
wx:for-item="i">
<view class="item"> <view class="item">
<view class="label"> <view class="label">
<block wx:if="{{ind==0}}"> <block wx:if="{{ind==0}}">
...@@ -70,21 +79,23 @@ ...@@ -70,21 +79,23 @@
</block> </block>
<block wx:else> <block wx:else>
<view class="w2"> <view class="w2">
<block wx:for="{{i.label}}" wx:key="in" wx:for-index="in" wx:for-item="c"> <block
wx:for="{{i.label}}"
wx:key="in"
wx:for-index="in"
wx:for-item="c">
<text>{{c}}</text> <text>{{c}}</text>
</block> </block>
</view> </view>
</block> </block>
: :
</view> </view>
<view class="value"> <view class="value">{{i.enum? i.enum[item[i.key]] :item[i.key]||'无'}}</view>
{{i.enum? i.enum[item[i.key]] :item[i.key]||'无'}}
</view>
</view> </view>
</block> </block>
<block wx:if="{{!userInfo.isSuper && userInfo.merchantType && index == 0 && userInfo.userType == 2}}"> <block wx:if="{{!userInfo.isSuper && userInfo.merchantType && index == 0 && userInfo.userType == 2}}">
<view class="icon" bindtap="showPopup" data-name="showRemark"> <view class="icon" bindtap="showPopup" data-name="showRemark">
<image src="../../images/edit.png"></image> <image src="../../images/edit.png" />
</view> </view>
</block> </block>
</view> </view>
...@@ -97,8 +108,12 @@ ...@@ -97,8 +108,12 @@
</block> </block>
</view> </view>
</view> </view>
<date-picker show="{{showDate}}" merchantId="{{detail.merchantCoupon.yqMerchantId}}" />
<date-picker show="{{showDate}}" merchantId="{{detail.merchantCoupon.yqMerchantId}}"></date-picker> <remark-popup
<remark-popup show="{{showRemark}}" bindconfirm="remarkConfirm" placeholder="请填写内容,最多15个字" maxlength="15"> wx:if="{{showRemark}}"
</remark-popup> show="{{showRemark}}"
bindconfirm="remarkConfirm"
placeholder="请填写内容,最多15个字"
maxlength="15" />
</block> </block>
...@@ -75,12 +75,7 @@ Page({ ...@@ -75,12 +75,7 @@ Page({
remarkConfirm(e) { remarkConfirm(e) {
let { methodUpdateInfo } = this.data let { methodUpdateInfo } = this.data
let { detail: filmTimes } = e let { detail: filmTimes } = e
if (!filmTimes.length) {
return wx.showToast({
title: '修改值不能为空',
icon: 'none'
})
}
// let params ={filmTimes} // let params ={filmTimes}
// if (methodUpdateInfo.filmTimes > filmTimes) { // if (methodUpdateInfo.filmTimes > filmTimes) {
// return wx.showToast({ // return wx.showToast({
...@@ -134,7 +129,8 @@ Page({ ...@@ -134,7 +129,8 @@ Page({
let methodUpdateInfo = { let methodUpdateInfo = {
merchantId, merchantId,
merchantName, merchantName,
filmTimes: filmTimes == 0 ? '' : filmTimes, // filmTimes == 0 ? '' :
filmTimes: filmTimes,
startDate: maxDate, startDate: maxDate,
endDate: maxDate endDate: maxDate
} }
......
...@@ -235,12 +235,13 @@ ...@@ -235,12 +235,13 @@
</block> </block>
</view> </view>
<remark-popup <remark-popup
wx:if="{{showRemark}}"
show="{{showRemark}}" show="{{showRemark}}"
isLimitNum="{{false}}" isLimitNum="{{false}}"
title="{{'修改贴膜台次'}}" title="{{'修改贴膜台次'}}"
btnName="{{'确认'}}" btnName="{{'确认'}}"
bind:confirm="remarkConfirm" bind:confirm="remarkConfirm"
placeholder="{{'修改值不可低于原数值,且范围在1万以内'}}" placeholder="{{'请输入整数'}}"
maxlength="4" maxlength="4"
value="{{methodUpdateInfo.filmTimes}}" value="{{methodUpdateInfo.filmTimes}}"
isInt="{{true}}" /> isInt="{{true}}" />
......
...@@ -148,9 +148,9 @@ Component({ ...@@ -148,9 +148,9 @@ Component({
*/ */
methods: { methods: {
inputFocus(e) { inputFocus(e) {
this.setTimeout(() => { // this.setTimeout(() => {
wx.hideKeyboard() // wx.hideKeyboard()
}, 1000) // }, 1000)
// let thisPage = wx.$router.getPageInstance() // let thisPage = wx.$router.getPageInstance()
// // console.log(thisPage.data) // // console.log(thisPage.data)
// let { statusBarHeight } = thisPage.data // let { statusBarHeight } = thisPage.data
...@@ -348,11 +348,12 @@ Component({ ...@@ -348,11 +348,12 @@ Component({
// }, // },
remarkShow(e) { remarkShow(e) {
console.log(e)
let { list } = this.data let { list } = this.data
// console.log(listItem) // console.log(listItem)
// e.currentTarget.dataset // e.currentTarget.dataset
console.log(e.currentTarget.dataset) // console.log(e.currentTarget.dataset)
let { id, type } = e.currentTarget.dataset let { id, type } = e.currentTarget.dataset
if (type == 'add') { if (type == 'add') {
if (list.length >= 10) { if (list.length >= 10) {
......
...@@ -116,7 +116,12 @@ ...@@ -116,7 +116,12 @@
</view> </view>
</view> </view>
<view class="num"> <view class="num">
<view class="placeholder num" wx:if="{{item['fieldValue']}}"> <view
data-id="{{item['fieldId']}}"
data-type="update"
bindtap="remarkShow"
class="placeholder num"
wx:if="{{item['fieldValue']}}">
{{item['fieldValue']}} {{item['fieldValue']}}
</view> </view>
<!-- <view class="placeholder" >输入数字</view> --> <!-- <view class="placeholder" >输入数字</view> -->
...@@ -141,12 +146,15 @@ ...@@ -141,12 +146,15 @@
placeholder-class="placeholder-class" placeholder-class="placeholder-class"
maxlength="10" maxlength="10"
type="text" type="text"
bindblur="inputBlur" data-id="{{item['fieldId']}}"
bindinput="input" data-type="update"
bindfocus="inputFocus" bindtap="remarkShow"
bindconfirm="inputBlur"
data-index="{{index}}" data-index="{{index}}"
always-embed></textarea> always-embed></textarea>
<!-- bindblur="remarkShow"
bindinput="remarkShow"
bindfocus="remarkShow"
bindconfirm="remarkShow" -->
<!-- adjust-position="{{inputUp}}" adjust-position="" --> <!-- adjust-position="{{inputUp}}" adjust-position="" -->
</view> </view>
</view> </view>
......
...@@ -147,6 +147,7 @@ ...@@ -147,6 +147,7 @@
</view> </view>
<!-- isFormComponent="{{true}}" bind:closePop="closePop" --> <!-- isFormComponent="{{true}}" bind:closePop="closePop" -->
<remark-popup <remark-popup
wx:if="{{showRemark}}"
show="{{showRemark}}" show="{{showRemark}}"
isLimitNum="{{remarkObj.type== 'add'?false:true}}" isLimitNum="{{remarkObj.type== 'add'?false:true}}"
title="{{remarkObj.type== 'add'?'新增字段':'核准数据'}}" title="{{remarkObj.type== 'add'?'新增字段':'核准数据'}}"
......
...@@ -138,12 +138,16 @@ Page({ ...@@ -138,12 +138,16 @@ Page({
}) })
}, },
setQrBoxHeight() { setQrBoxHeight() {
const { orderInfo } = this.data
let statusList = [2, 4, 6]
if (statusList.includes(orderInfo.status)) {
wx.$util.getViewInfo('#qr-view', ({ height }) => { wx.$util.getViewInfo('#qr-view', ({ height }) => {
this.setData({ this.setData({
// qrHeight: height, // qrHeight: height,
qrFlag: true qrFlag: true
}) })
}) })
}
}, },
showQrBox() { showQrBox() {
this.setData({ this.setData({
...@@ -151,7 +155,7 @@ Page({ ...@@ -151,7 +155,7 @@ Page({
}) })
}, },
getQrCode() { getQrCode() {
console.log('getQrcode') // console.log('getQrcode')
let data = this.data.orderInfo let data = this.data.orderInfo
let appId = 'wx06d1198e751435d1' let appId = 'wx06d1198e751435d1'
let path = 'packagePersonal/pages/boutiquePages/boutiqueInstall/boutiqueInstall' let path = 'packagePersonal/pages/boutiquePages/boutiqueInstall/boutiqueInstall'
......
...@@ -271,6 +271,7 @@ ...@@ -271,6 +271,7 @@
type="1" /> type="1" />
<car-brands show="{{carBrandBox}}" bindconfirm="chooseCar" carSeriesId="{{orderObj.customer.carSeriesId || ''}}" /> <car-brands show="{{carBrandBox}}" bindconfirm="chooseCar" carSeriesId="{{orderObj.customer.carSeriesId || ''}}" />
<remark-popup <remark-popup
wx:if="{{showRemark}}"
show="{{showRemark}}" show="{{showRemark}}"
bindconfirm="remarkConfirm" bindconfirm="remarkConfirm"
placeholder="请填写内容,最多30个字" placeholder="请填写内容,最多30个字"
......
...@@ -105,7 +105,7 @@ Page({ ...@@ -105,7 +105,7 @@ Page({
wx.$util.showNoAccess() wx.$util.showNoAccess()
} }
// 已支付加已施工 // 已支付加已施工
} else if (item.constructionFlag == 'Y') { } else if (item.constructionFlag == 'Y' && item.status != 10) {
wx.$router.go('constructionOrderDetail', item) wx.$router.go('constructionOrderDetail', item)
} else { } else {
// console.log(item) // console.log(item)
......
<block wx:if="{{flag}}"> <block wx:if="{{flag}}">
<view class="main {{isFullSucreen?'isFullSucreen':''}}"> <view class="main {{isFullSucreen?'isFullSucreen':''}}">
<view class="status-box"> <view class="status-box" wx:if="{{orderInfo.status!=10}}">
<view class="content">客户已付款</view> <view class="content">客户已付款</view>
<view class="tips">技师施工完毕后,点击完成施工按钮可通知车主前来取车</view> <view class="tips">技师施工完毕后,点击完成施工按钮可通知车主前来取车</view>
<!-- <view class="content">工单已完成</view> </view>
<view class="tips">为该客户新增工单,请点击继续下单。</view> --> <view class="status-box" wx:if="{{orderInfo.status == 10}}">
<view class="content">订单关闭</view>
<view class="tips">客户支付超过24小时,系统自动关闭订单</view>
</view> </view>
<view class="box"> <view class="box">
<!-- <view class="title">礼券信息</view> --> <!-- <view class="title">礼券信息</view> -->
...@@ -173,7 +175,7 @@ ...@@ -173,7 +175,7 @@
</view> </view>
</block> --> </block> -->
</view> </view>
<block wx:if="{{!userInfo.isSuper && userInfo.userType == 2}}"> <block wx:if="{{!userInfo.isSuper && userInfo.userType == 2&&orderInfo.status!=10}}">
<view class="btn-box {{isFullSucreen?'isFullSucreen-btn':''}}"> <view class="btn-box {{isFullSucreen?'isFullSucreen-btn':''}}">
<view class="tips" wx:if="{{showTips}}"> <view class="tips" wx:if="{{showTips}}">
<image class="tipsIcon" src="../../images/tips.png" /> <image class="tipsIcon" src="../../images/tips.png" />
......
...@@ -268,7 +268,7 @@ Page({ ...@@ -268,7 +268,7 @@ Page({
.then(result => { .then(result => {
wx.$util.hideLoading() wx.$util.hideLoading()
console.log(result) console.log(result)
if (result.code == 0 && !result.message) { if (result.code == 0 && result.data) {
wx.$refresh = true wx.$refresh = true
this.back(orderObj.orderCode) this.back(orderObj.orderCode)
} else { } else {
...@@ -334,6 +334,7 @@ Page({ ...@@ -334,6 +334,7 @@ Page({
return false return false
}, },
setOrderObj(options) { setOrderObj(options) {
// console.log(options)
let { scene, userInfo } = this.data let { scene, userInfo } = this.data
console.log('setOrderObj', options) console.log('setOrderObj', options)
// wx.$util.showLoading('加载中...') // wx.$util.showLoading('加载中...')
...@@ -348,14 +349,15 @@ Page({ ...@@ -348,14 +349,15 @@ Page({
orderObj[e] = options[e] orderObj[e] = options[e]
} }
}) })
console.log(orderObj)
// 去除优惠券 参数 // 去除优惠券 参数
delete orderObj.couponName // delete orderObj.couponName
// if (!orderObj.merchantId) orderObj.merchantId = orderObj.customerInfo.merchantId // if (!orderObj.merchantId) orderObj.merchantId = orderObj.customerInfo.merchantId
// if (!orderObj.merchantId) orderObj.merchantId = orderObj.customerInfo.merchantId // if (!orderObj.merchantId) orderObj.merchantId = orderObj.customerInfo.merchantId
// 使用优惠券的merchantId 避免优惠券和店区不一致的情况 // 使用优惠券的merchantId 避免优惠券和店区不一致的情况
if (!orderObj.merchantId) orderObj.merchantId = orderObj.merchantCoupon.merchantId // if (!orderObj.merchantId) orderObj.merchantId = orderObj.merchantCoupon.merchantId
if (!orderObj.customer) orderObj.customer = orderObj.customerInfo if (!orderObj.customer) orderObj.customer = orderObj.customerInfo
if (!orderObj.customer.customerSex) orderObj.customer.customerSex = 1 if (!orderObj.customer.customerSex) orderObj.customer.customerSex = 1
...@@ -413,26 +415,45 @@ Page({ ...@@ -413,26 +415,45 @@ Page({
// }, 2000) // }, 2000)
}, },
onRoute(res) { onRoute(res) {
console.log(res) // console.log(res)
if (res.scene) { // if (res.scene) {
res.returnFun = true // res.returnFun = true
this.setData(res) // this.setData(res)
} else if (res.merchantId) { // } else if (res.merchantId) {
this.setData({ // this.setData({
returnFun: true // returnFun: true
}) // })
this.setOrderObj(res) // console.log(111)
} else { // 重新赋值清空
wx.$util.showLoading('加载中...') // const orderObj = {
this.setData( // customer: {
{ // customerName: '',
flag: true // customerPhone: '',
}, // standNo: '',
() => { // plateNumber: '',
wx.$util.hideLoading() // customerSex: 1,
} // experienceFlag: 'Y'
) // },
} // selectPayType: 2,
// remark: ''
// }
// this.setData({
// orderObj
// })
// 避免数据污染到上一页
let obj = JSON.parse(JSON.stringify(res))
this.setOrderObj(obj)
// } else {
// wx.$util.showLoading('加载中...')
// this.setData(
// {
// flag: true
// },
// () => {
// wx.$util.hideLoading()
// }
// )
// }
}, },
/** /**
* 生命周期函数--监听页面隐藏 * 生命周期函数--监听页面隐藏
......
...@@ -277,6 +277,7 @@ ...@@ -277,6 +277,7 @@
type="1" /> --> type="1" /> -->
<car-brands show="{{carBrandBox}}" bindconfirm="chooseCar" carSeriesId="{{orderObj.customer.carSeriesId}}" /> <car-brands show="{{carBrandBox}}" bindconfirm="chooseCar" carSeriesId="{{orderObj.customer.carSeriesId}}" />
<remark-popup <remark-popup
wx:if="{{showRemark}}"
show="{{showRemark}}" show="{{showRemark}}"
bindconfirm="remarkConfirm" bindconfirm="remarkConfirm"
placeholder="请填写内容,最多30个字" placeholder="请填写内容,最多30个字"
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!