Commit 76da0009 by 张立顺

fix:第二轮修复

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