Commit 76da0009 by 张立顺

fix:第二轮修复

1 parent b0e61a2e
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
超级管理员:13022223223(测试环境) 13476670746(开发环境) 超级管理员:13022223223(测试环境) 13476670746(开发环境)
供应商账号:13978573226 (选testfws1) 供应商账号:13978573226 (选testfws1)
员工账号 :15626599735 (选明明塘朗园区店) 员工账号 :15626599735 (选明明塘朗园区店)
员工账号 :18775035205 (选明明塘朗园区店) 员工账号 :18775035205 (选测试园店)
员工账号 :13632791593 (选fennun03能下单 园区测试门店有多条数据) 员工账号 :13632791593 (选fennun03能下单 园区测试门店有多条数据)
园区店管理员: 15589265685(测试环境) 园区店管理员: 15589265685(测试环境)
......
...@@ -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 = 2 let index = 1
// 判断小程序环境 // 判断小程序环境
// develop:开发版(正常开发工具,测试时) // develop:开发版(正常开发工具,测试时)
......
...@@ -123,8 +123,12 @@ App({ ...@@ -123,8 +123,12 @@ App({
}, },
// &&(userInfo.subLoginUser.merchantId != userInfo.merchantId || canRemark ) // &&(userInfo.subLoginUser.merchantId != userInfo.merchantId || canRemark )
checkYqdSuper(userInfo) { checkYqdSuper(userInfo) {
console.log('app', userInfo) // console.log('app', userInfo)
this.globalData.isYqdSuper = userInfo.userType != 2 && !userInfo.isSuper && userInfo.subLoginUser.merchantId == userInfo.merchantId let isYqdSuper = userInfo.merchantAccountList.every(item => {
return item == 6 || item == 8
})
this.globalData.isYqdSuper = userInfo.userType != 2 && !userInfo.isSuper && isYqdSuper
// console.log(this.globalData.isYqdSuper)
// console.log(11) // console.log(11)
// checkSeverType // checkSeverType
// console.log(userInfo) // console.log(userInfo)
......
...@@ -54,11 +54,15 @@ Component({ ...@@ -54,11 +54,15 @@ Component({
if (this.properties.filterEmoji) { if (this.properties.filterEmoji) {
if (wx.$util.haveEmoji(value)) value = wx.$util.replaceEmoji(value) if (wx.$util.haveEmoji(value)) value = wx.$util.replaceEmoji(value)
} }
// console.log(isInt)
if (isInt) { if (isInt) {
value = value.replace(/[^\d]/g, '') //清除“数字”和“.”以外的字符 value = value.replace(/[^\d]/g, '') //清除“数字”和“.”以外的字符
if (value != '') {
value = parseFloat(value).toString()
}
} }
// debugger
// console.log(value)
if (customMaxLength && maxlength != -1) value = value.substring(0, maxlength) if (customMaxLength && maxlength != -1) value = value.substring(0, maxlength)
if (isLimitNum) { if (isLimitNum) {
......
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
maxlength="{{maxlength}}" maxlength="{{maxlength}}"
placeholder="{{placeholder || '请输入'}}" placeholder="{{placeholder || '请输入'}}"
isLimitNum="{{isLimitNum}}" isLimitNum="{{isLimitNum}}"
isInt="{{isInt}}"
customMaxLength></gl-textarea> customMaxLength></gl-textarea>
</view> </view>
</view> </view>
......
...@@ -75,15 +75,21 @@ Page({ ...@@ -75,15 +75,21 @@ Page({
remarkConfirm(e) { remarkConfirm(e) {
let { methodUpdateInfo } = this.data let { methodUpdateInfo } = this.data
let { detail: filmTimes } = e let { detail: filmTimes } = e
// let params ={filmTimes} if (!filmTimes.length) {
if (methodUpdateInfo.filmTimes > filmTimes) {
return wx.showToast({ return wx.showToast({
title: '修改值不可低于原数值', title: '修改值不能为空',
icon: 'none' icon: 'none'
}) })
} else {
methodUpdateInfo.filmTimes = filmTimes
} }
// let params ={filmTimes}
// if (methodUpdateInfo.filmTimes > filmTimes) {
// return wx.showToast({
// title: '修改值不可低于原数值',
// icon: 'none'
// })
// } else {
methodUpdateInfo.filmTimes = filmTimes
// }
// let params = Object.assign(methodUpdateInfo, filmTimes) // let params = Object.assign(methodUpdateInfo, filmTimes)
// console.log(methodUpdateInfo) // console.log(methodUpdateInfo)
// return // return
...@@ -128,7 +134,7 @@ Page({ ...@@ -128,7 +134,7 @@ Page({
let methodUpdateInfo = { let methodUpdateInfo = {
merchantId, merchantId,
merchantName, merchantName,
filmTimes, filmTimes: filmTimes == 0 ? '' : filmTimes,
startDate: maxDate, startDate: maxDate,
endDate: maxDate endDate: maxDate
} }
...@@ -306,7 +312,7 @@ Page({ ...@@ -306,7 +312,7 @@ Page({
startDate, startDate,
endDate endDate
}) })
console.log(app.globalData.isYqdSuper) // console.log(app.globalData.isYqdSuper)
this.setData({ this.setData({
isYqdSuper: app.globalData.isYqdSuper isYqdSuper: app.globalData.isYqdSuper
}) })
......
...@@ -242,7 +242,7 @@ ...@@ -242,7 +242,7 @@
bind:confirm="remarkConfirm" bind:confirm="remarkConfirm"
placeholder="{{'修改值不可低于原数值,且范围在1万以内'}}" placeholder="{{'修改值不可低于原数值,且范围在1万以内'}}"
maxlength="4" maxlength="4"
value="{{methodUpdateInfo.value}}" value="{{methodUpdateInfo.filmTimes}}"
isInt="{{true}}" /> isInt="{{true}}" />
<!-- value="{{1}}" --> <!-- value="{{1}}" -->
...@@ -167,8 +167,14 @@ Page({ ...@@ -167,8 +167,14 @@ Page({
.then(_res_ => { .then(_res_ => {
let { code, message } = _res_ let { code, message } = _res_
if (code == 0) { if (code == 0) {
wx.$util.showToast('操作成功') // wx.$util.showToast('操作成功')
_this.search() wx.showToast({
title: '操作成功',
icon: 'success'
})
setTimeout(() => {
_this.search()
}, 500)
} else { } else {
wx.$util.showToast(message) wx.$util.showToast(message)
} }
......
...@@ -87,16 +87,17 @@ Page({ ...@@ -87,16 +87,17 @@ Page({
if (options.orderCode) { if (options.orderCode) {
this.getOrderDetail(options.orderCode) this.getOrderDetail(options.orderCode)
this.setData({ this.setData({
orderCode: options.orderCode, orderCode: options.orderCode
isYqdSuper: app.globalData.isYqdSuper
}) })
} }
let o = wx.$util.getStorageSync('dj_boutique_user_info') let o = wx.$util.getStorageSync('dj_boutique_user_info')
this.setData({ this.setData({
isYqdSuper: app.globalData.isYqdSuper,
userInfo: o userInfo: o
}) })
console.log(this.data.isYqdSuper)
}, },
getOrderDetail(orderCode) { getOrderDetail(orderCode) {
// console.log(orderCode) // console.log(orderCode)
......
...@@ -77,8 +77,8 @@ Page({ ...@@ -77,8 +77,8 @@ Page({
let { orderObj } = this.data let { orderObj } = this.data
let { value } = e.detail let { value } = e.detail
let { name } = e.currentTarget.dataset let { name } = e.currentTarget.dataset
let flag = (name == 'customer.customerPhone' && phoneRex.test(value)) || name != 'customer.customerPhone' // let flag = (name == 'customer.customerPhone' && phoneRex.test(value)) || name != 'customer.customerPhone'
if (!flag) return // if (!flag) return
this.setData({ this.setData({
[`orderObj.${name}`]: value [`orderObj.${name}`]: value
}) })
...@@ -171,7 +171,7 @@ Page({ ...@@ -171,7 +171,7 @@ Page({
// } // }
let key = this.checkRequired(orderObj) let key = this.checkRequired(orderObj)
// console.log(key) console.log(key)
// debugger // debugger
if (key) { if (key) {
this.showToast(toastList[key]) this.showToast(toastList[key])
...@@ -268,11 +268,12 @@ Page({ ...@@ -268,11 +268,12 @@ Page({
.then(result => { .then(result => {
wx.$util.hideLoading() wx.$util.hideLoading()
console.log(result) console.log(result)
if (result.code == 0 && !result.error) { if (result.code == 0 && !result.message) {
wx.$refresh = true
this.back(orderObj.orderCode) this.back(orderObj.orderCode)
} else { } else {
wx.showToast({ wx.showToast({
title: result.error, title: result.message,
icon: 'error' icon: 'error'
}) })
} }
...@@ -315,7 +316,7 @@ Page({ ...@@ -315,7 +316,7 @@ Page({
}, },
checkRequired(obj) { checkRequired(obj) {
// 'merchantId', 'employeeName', 'customerName','sellerUserId', 'sellerName', 'sellerMerchantId', 'customerCouponCode' // 'merchantId', 'employeeName', 'customerName','sellerUserId', 'sellerName', 'sellerMerchantId', 'customerCouponCode'
let target = ['userId', 'customerPhone'] let target = ['customerPhone', 'customerName']
obj = { obj = {
...obj, ...obj,
...obj.customer ...obj.customer
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!