Commit 900aab32 by 张立顺

fix:超时订单详情页提示

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