Commit a9516bf2 by 张立顺

Merge branch 'dev_v4.23.0' into 'develop'

Dev v4.23.0

See merge request !104
2 parents 0567851e 31130cb9
Showing 93 changed files with 1809 additions and 777 deletions
No preview for this file type
...@@ -21,6 +21,12 @@ module.exports = { ...@@ -21,6 +21,12 @@ module.exports = {
data.productCode = 'PC00c2' data.productCode = 'PC00c2'
return api.post('dj.api.smartcarlife.sms.not.code.login', data) return api.post('dj.api.smartcarlife.sms.not.code.login', data)
}, },
/** 免登录 */
reNoSignIn(data) {
data.productCode = 'PC00c2'
return api.post('dj.api.smartcarlife.sms.noSignIn.login', data)
},
/**手机验证码登录 /1.0.0 */ /**手机验证码登录 /1.0.0 */
smsLogin(data = {}) { smsLogin(data = {}) {
data.source = 'MINIAPP' data.source = 'MINIAPP'
...@@ -157,5 +163,9 @@ module.exports = { ...@@ -157,5 +163,9 @@ module.exports = {
// 获取园区店配置 // 获取园区店配置
getYqStoreConfig(data) { getYqStoreConfig(data) {
return api.get('dj.api.smarcarlife.yqMerchantConfig.detail', data) return api.get('dj.api.smarcarlife.yqMerchantConfig.detail', data)
},
//插入埋点记录
burialPointRecord(data) {
return api.get('dj.api.smartcarlife.common.insertRecord', data)
} }
} }
...@@ -13,10 +13,11 @@ import wxApi from './utils/utils_wx' ...@@ -13,10 +13,11 @@ import wxApi from './utils/utils_wx'
// 实例化对象存储 // 实例化对象存储
import { Storage } from '~/utils/cache/storage' import { Storage } from '~/utils/cache/storage'
const $Storage = new Storage() const $Storage = new Storage()
import { setSystem_info } from '~/utils/cache/storageApi' import { setSystem_info, getNoSignInUuid,removeSystemStorage } from '~/utils/cache/storageApi'
setSystem_info() // 存储设备信息 setSystem_info() // 存储设备信息
import { checkYqdSuper, checkScene } from '~/store/index' import { checkYqdSuper, checkScene } from '~/store/index'
import eventbus from './utils/eventbus' import eventbus from './utils/eventbus'
import api from './api/api'
App({ App({
onLaunch() { onLaunch() {
/**挂载到wx对象 */ /**挂载到wx对象 */
...@@ -34,8 +35,8 @@ App({ ...@@ -34,8 +35,8 @@ App({
showModal(that, options) { showModal(that, options) {
that.selectComponent('#modal').showModal(options) that.selectComponent('#modal').showModal(options)
}, },
gobalCheckYqdSuper(userInfo){ gobalCheckYqdSuper(userInfo) {
checkYqdSuper(userInfo,this.globalData) checkYqdSuper(userInfo, this.globalData)
}, },
onShow(options) { onShow(options) {
getUpdateManager() getUpdateManager()
...@@ -49,30 +50,52 @@ App({ ...@@ -49,30 +50,52 @@ App({
} }
}, },
login(relogin, context) { login(relogin, context) {
// debugger
// console.log(relogin, 'relogin') // console.log(relogin, 'relogin')
let that = this let that = this
// 清空多账号信息 // 清空多账号信息
if (relogin) { if (relogin) {
wx.showModal({ // 判断有没有 30 天免登陆 有直接跳选园区
title: '温馨提示', let noSignInUuid = getNoSignInUuid()
content: context || '登录过期,请重新登录。', if (noSignInUuid) {
showCancel: false, api.reNoSignIn({ noSignInUuid: noSignInUuid }).then(res => {
confirmText: '去登录', let {
confirmColor: '#3582EE', code,
success(res) { data
if (res.confirm) { } = res
that.globalData.yqdInfo = {} if (code == '0' && data) {
that.globalData.YQorderSetting = '' // util.setUserinfo(data)
util.setSessionId(data?.sessionId)
return router.reLaunch('pages.accountItems')
} else {
util.removeStorage() util.removeStorage()
wx.$relogin = relogin removeSystemStorage()
router.reLaunch('pages.wxLogin') that.login(false)
} }
} })
}) } else {
wx.showModal({
title: '温馨提示',
content: context || '登录过期,请重新登录。',
showCancel: false,
confirmText: '去登录',
confirmColor: '#3582EE',
success(res) {
if (res.confirm) {
that.globalData.yqdInfo = {}
that.globalData.YQorderSetting = ''
util.removeStorage()
wx.$relogin = relogin
router.reLaunch('pages.wxLogin')
}
}
})
}
} else { } else {
this.globalData.yqdInfo = {} this.globalData.yqdInfo = {}
this.globalData.YQorderSetting = '' this.globalData.YQorderSetting = ''
util.removeStorage() util.removeStorage()
removeSystemStorage()
wx.$relogin = relogin wx.$relogin = relogin
router.reLaunch('pages.wxLogin') router.reLaunch('pages.wxLogin')
} }
......
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
{ {
"root": "tabWorkOrder", "root": "tabWorkOrder",
"name": "tabWorkOrder", "name": "tabWorkOrder",
"pages": ["pages/createOrder/createOrder", "pages/additionRecordOrder/additionRecordOrder", "pages/orderDetail/orderDetail", "pages/constructionOrderDetail/constructionOrderDetail", "pages/confirmOrder/confirmOrder", "pages/updateOrderInfo/updateOrderInfo", "pages/createArchives/createArchives", "pages/orderSignature/orderSignature", "pages/fullSignture/fullSignture", "tpages/ocr/ocr"] "pages": ["pages/createOrder/createOrder", "pages/additionRecordOrder/additionRecordOrder", "pages/orderDetail/orderDetail", "pages/constructionOrderDetail/constructionOrderDetail", "pages/confirmOrder/confirmOrder", "pages/updateOrderInfo/updateOrderInfo", "pages/createArchives/createArchives", "pages/orderSignature/orderSignature", "pages/fullSignture/fullSignture", "pages/ocr/ocr"]
}, },
{ {
"root": "packageEquity", "root": "packageEquity",
......
...@@ -9,6 +9,7 @@ Component({ ...@@ -9,6 +9,7 @@ Component({
show: { show: {
type: Boolean, type: Boolean,
observer: function (n) { observer: function (n) {
wx.$util.pointRecord(19)
let { isFirst } = this.data let { isFirst } = this.data
if (n && isFirst) { if (n && isFirst) {
this.init() this.init()
...@@ -105,6 +106,7 @@ Component({ ...@@ -105,6 +106,7 @@ Component({
if (!flag) { if (!flag) {
return wx.$util.showToast('请选择客户') return wx.$util.showToast('请选择客户')
} }
this.triggerEvent('confirm', orderInfo) this.triggerEvent('confirm', orderInfo)
this.setData({ this.setData({
show: false show: false
......
...@@ -164,17 +164,21 @@ Component({ ...@@ -164,17 +164,21 @@ Component({
}, },
confirm() { confirm() {
let chooseList = this.getChooseList() let chooseList = this.getChooseList()
let { goodsList } = this.data let { goodsList } = this.data
if (goodsList.length < 1) return if (goodsList.length < 1) return
this.setData({ if (!chooseList.length) return wx.$util.showToast('请勾选商品')
show: false
})
let thisPage = wx.$router.getPageInstance() let thisPage = wx.$router.getPageInstance()
thisPage.setGoodsTotal(chooseList)
console.log(chooseList)
thisPage.setData({ thisPage.setData({
goodsList: chooseList goodsList: chooseList
}) })
thisPage.setGoodsTotal(chooseList)
console.log(chooseList)
this.setData({
show: false
})
} }
} }
}) })
...@@ -65,14 +65,19 @@ Component({ ...@@ -65,14 +65,19 @@ Component({
}) })
}, },
getMerchantList() { getMerchantList() {
let { userInfo, type } = this.data let {
userInfo,
type
} = this.data
// console.log('type', type) // console.log('type', type)
let thisPage = wx.$router.getPageInstance() let thisPage = wx.$router.getPageInstance()
// console.log(thisPage.data) // console.log(thisPage.data)
// console.log(thisPage) // console.log(thisPage)
// 处理组件实例化比页面快用上一个页面数据的问题 // 处理组件实例化比页面快用上一个页面数据的问题
if (!thisPage?.data?.name) return if (!thisPage?.data?.name) return
let { orderObj } = thisPage.data let {
orderObj
} = thisPage.data
let isSellerInfo, orderSellerInfo let isSellerInfo, orderSellerInfo
// console.log('orderObj', orderObj) // console.log('orderObj', orderObj)
...@@ -91,12 +96,19 @@ Component({ ...@@ -91,12 +96,19 @@ Component({
} }
: {} : {}
).then(async res => { ).then(async res => {
let { code, data, message } = res let {
code,
data,
message
} = res
if (code == 0) { if (code == 0) {
// console.log('data', data) // console.log('data', data)
// 解决为空报错问题 // 解决为空报错问题
if (data[0]) data[0].active = true if (data[0]) data[0].active = true
let { merchantId, merchantName } = data[0] || {} let {
merchantId,
merchantName
} = data[0] || {}
let compareId = type == 1 ? orderObj.merchantId : orderObj.sellerMerchantId let compareId = type == 1 ? orderObj.merchantId : orderObj.sellerMerchantId
// 增加默认勾选逻辑 // 增加默认勾选逻辑
...@@ -159,7 +171,9 @@ Component({ ...@@ -159,7 +171,9 @@ Component({
let { type, merchantList, isFirst, orderObj: comOrderObj, orderSellerInfo } = this.data let { type, merchantList, isFirst, orderObj: comOrderObj, orderSellerInfo } = this.data
let thisPage = wx.$router.getPageInstance() let thisPage = wx.$router.getPageInstance()
let { orderObj } = thisPage.data let {
orderObj
} = thisPage.data
api api
.getConversionEmployeeList({ .getConversionEmployeeList({
merchantId, merchantId,
...@@ -167,10 +181,17 @@ Component({ ...@@ -167,10 +181,17 @@ Component({
}) })
.then(async res => { .then(async res => {
wx.$util.hideLoading() wx.$util.hideLoading()
let { code, data, message } = res let {
code,
data,
message
} = res
if (code == 0) { if (code == 0) {
if (data && data.length) { if (data && data.length) {
let { staffName, uuid } = data[0] let {
staffName,
uuid
} = data[0]
data[0].active = true data[0].active = true
// console.log(orderObj.sellerUserId) // console.log(orderObj.sellerUserId)
let compareId = type == 1 ? orderObj.userId : orderObj.sellerUserId let compareId = type == 1 ? orderObj.userId : orderObj.sellerUserId
...@@ -277,8 +298,15 @@ Component({ ...@@ -277,8 +298,15 @@ Component({
this.confirm() this.confirm()
}, },
changeMerchant(e) { changeMerchant(e) {
let { index, item } = e.currentTarget.dataset let {
let { merchantList, orderObj, type } = this.data index,
item
} = e.currentTarget.dataset
let {
merchantList,
orderObj,
type
} = this.data
let merchantId = type == 1 ? orderObj.merchantId : orderObj.sellerMerchantId let merchantId = type == 1 ? orderObj.merchantId : orderObj.sellerMerchantId
if (merchantId == item.merchantId) return if (merchantId == item.merchantId) return
merchantList.map(i => (i.active = false)) merchantList.map(i => (i.active = false))
...@@ -356,9 +384,15 @@ Component({ ...@@ -356,9 +384,15 @@ Component({
// console.log(e) // console.log(e)
let { let {
index, index,
item: { staffName, uuid } item: {
staffName,
uuid
}
} = e.currentTarget.dataset } = e.currentTarget.dataset
let { type, selesList } = this.data let {
type,
selesList
} = this.data
selesList.map(i => (i.active = false)) selesList.map(i => (i.active = false))
selesList[index].active = true selesList[index].active = true
let targetName = type == 1 ? 'orderObj.employeeName' : 'orderObj.sellerName' let targetName = type == 1 ? 'orderObj.employeeName' : 'orderObj.sellerName'
...@@ -380,4 +414,4 @@ Component({ ...@@ -380,4 +414,4 @@ Component({
// } // }
} }
} }
}) })
\ No newline at end of file \ No newline at end of file
...@@ -94,8 +94,8 @@ ...@@ -94,8 +94,8 @@
padding: 30rpx 0 72rpx; padding: 30rpx 0 72rpx;
} }
.fixed-remark { .fixed-remark {
background: #F7F7F7; background: #F4F5F7;
border: 2rpx solid #C3C3C3; border: 2rpx solid #EFF0F2;
border-radius: 12rpx; border-radius: 12rpx;
width: 522rpx; width: 522rpx;
height: 260rpx; height: 260rpx;
......
...@@ -10,6 +10,7 @@ Component({ ...@@ -10,6 +10,7 @@ Component({
value: false, value: false,
observer: function (n) { observer: function (n) {
if (n) { if (n) {
wx.$util.pointRecord(31)
let userInfo = wx.$util.getUserInfo() || {} let userInfo = wx.$util.getUserInfo() || {}
let storageSelectedSceneType = userInfo.selectedSceneType let storageSelectedSceneType = userInfo.selectedSceneType
this.setData({storageSelectedSceneType}) this.setData({storageSelectedSceneType})
...@@ -53,14 +54,16 @@ Component({ ...@@ -53,14 +54,16 @@ Component({
if (this.data.hasTabBar) wx.hideTabBar({animation: true}) if (this.data.hasTabBar) wx.hideTabBar({animation: true})
}, },
selectScene(e) { selectScene(e) {
let { scene } = e.currentTarget.dataset let { scene,item } = e.currentTarget.dataset
let { sceneList, storageSelectedSceneType } = this.data let { sceneList, storageSelectedSceneType } = this.data
if (scene == storageSelectedSceneType) return this.closeMenu() if (scene == storageSelectedSceneType) return this.closeMenu()
wx.$router.reLaunch(constantData?.pageUrl[scene]) wx.$router.reLaunch(constantData?.pageUrl[scene])
sceneList.map(i => (i.actived = false)) sceneList.map(i => (i.actived = false))
wx.$util.setUserInfo({ ...wx.$util.getUserInfo(), selectedSceneType: scene }) wx.$util.setUserInfo({ ...wx.$util.getUserInfo(), selectedSceneType: scene })
wx.$util.pointRecord(item.recordId)
}, },
goMineCenter() { goMineCenter() {
wx.$util.pointRecord(5)
wx.$router.redirectTo('pages.sceneIndex') wx.$router.redirectTo('pages.sceneIndex')
} }
} }
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<view class="wrapper"> <view class="wrapper">
<view class="title">业务</view> <view class="title">业务</view>
<block wx:for="{{sceneList}}" wx:key="index"> <block wx:for="{{sceneList}}" wx:key="index">
<view catch:tap="selectScene" data-scene="{{item.sceneType}}" class="element {{item.sceneType == storageSelectedSceneType ? 'active' : ''}}"> <view catch:tap="selectScene" data-item="{{item}}" data-scene="{{item.sceneType}}" class="element {{item.sceneType == storageSelectedSceneType ? 'active' : ''}}">
<view class="img"><image src="https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/scene_type_{{item.sceneType}}.png"></image></view> <view class="img"><image src="https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/scene_type_{{item.sceneType}}.png"></image></view>
<view class="label">{{item.sceneName}}</view> <view class="label">{{item.sceneName}}</view>
</view> </view>
......
...@@ -9,8 +9,9 @@ ...@@ -9,8 +9,9 @@
* 1开发 * 1开发
* 2测试 * 2测试
* 3生产环境 * 3生产环境
* 4预发布
*/ */
let index = 2 let index = 1
const accountInfo = wx.getAccountInfoSync() const accountInfo = wx.getAccountInfoSync()
const systemInfo = wx.getSystemInfoSync() const systemInfo = wx.getSystemInfoSync()
......
...@@ -50,5 +50,9 @@ module.exports = { ...@@ -50,5 +50,9 @@ module.exports = {
/**改变支付订单状态 */ /**改变支付订单状态 */
createPayOrder(data) { createPayOrder(data) {
return api.post('dj.api.smartcarlife.payOrder.create', data) return api.post('dj.api.smartcarlife.payOrder.create', data)
},
/** 修改订单备注 */
updateOrderRemark(data) {
return api.post('dj.api.smartcarlife.order.updateRemark', data)
} }
} }
...@@ -88,6 +88,9 @@ Component({ ...@@ -88,6 +88,9 @@ Component({
console.log(target) console.log(target)
this.triggerEvent('showPickerSelect', target) this.triggerEvent('showPickerSelect', target)
break break
case 'remarkPopup':
this.triggerEvent('showMask')
break
default: default:
break break
} }
......
...@@ -43,12 +43,19 @@ ...@@ -43,12 +43,19 @@
</view> </view>
<!-- picker --> <!-- picker -->
<view class="picker" wx:if="{{item.type == 'select'}}"> <view class="picker" wx:if="{{item.type == 'select'}}">
<image class="arrow" src="/components/images/arrow-x.png" /> <image class="arrow" src="/components/images/arrow-x.png" />
<view class="text-hide" wx:if="{{formData[item.optionName]}}"> <view class="text-hide" wx:if="{{formData[item.optionName]}}">
{{formData[item.optionName]}} {{formData[item.optionName]}}
</view> </view>
<text class="placeholder" wx:else>请选择</text> <text class="placeholder" wx:else>请选择</text>
</view> </view>
<!-- 备注 -->
<view class="remarks_box" wx:if="{{item.type == 'remarkPopup'}}">
<view class="text-hide" wx:if="{{formData[item.name]}}">
{{formData[item.name]}}
</view>
<text class="placeholder" wx:else>请输入</text>
</view>
</gl-cell> </gl-cell>
</view> </view>
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
color: #C3C3C3; color: #C3C3C3;
} }
.picker { .picker,.remarks_box{
display: flex; display: flex;
flex-direction: row-reverse; flex-direction: row-reverse;
height: 80rpx; height: 80rpx;
......
...@@ -26,7 +26,15 @@ Component({ ...@@ -26,7 +26,15 @@ Component({
title: String, title: String,
orderInfo: Object, orderInfo: Object,
pickerObj: Object, pickerObj: Object,
isAdditionRecordOrder: Boolean isAdditionRecordOrder: Boolean,
popupHeight: {
type: String,
value: '60%'
},
goodsNumber: {
type: Number,
value: 1
}
}, },
/** /**
...@@ -53,7 +61,7 @@ Component({ ...@@ -53,7 +61,7 @@ Component({
this.setData({optionList}) this.setData({optionList})
}, },
confirm() { confirm() {
let { optionList, orderInfo, pickerObj, title, isAdditionRecordOrder } = this.data let { optionList, orderInfo, pickerObj, title, isAdditionRecordOrder, goodsNumber } = this.data
let arr = optionList?.filter(v => v.active) || [] let arr = optionList?.filter(v => v.active) || []
if (!arr.length) { if (!arr.length) {
return wx.showToast({ return wx.showToast({
...@@ -67,13 +75,13 @@ Component({ ...@@ -67,13 +75,13 @@ Component({
orderInfo[pickerObj.optionName] = arr[0][pickerObj.optionName] || '' orderInfo[pickerObj.optionName] = arr[0][pickerObj.optionName] || ''
if (pickerObj.flag) { // 商品带出金额 if (pickerObj.flag) { // 商品带出金额
// 定金金额 // 定金金额
orderInfo['depositPrice'] = `¥${this.priceFilter(arr[0]?.activityPrice / 100 || 0)}` orderInfo['depositPrice'] = `¥${this.priceFilter(arr[0]?.activityPrice * goodsNumber / 100 || 0)}`
// 尾款金额 = 众筹价 - 定金金额 // 尾款金额 = 众筹价 - 定金金额
orderInfo['tailPayment'] = `¥${this.priceFilter((arr[0]?.crowdFundingPrice - arr[0]?.activityPrice) / 100 || 0)}` orderInfo['tailPayment'] = `¥${this.priceFilter((arr[0]?.crowdFundingPrice - arr[0]?.activityPrice) * goodsNumber / 100 || 0)}`
orderInfo['crowdFundingPrice'] = `¥${this.priceFilter(arr[0]?.crowdFundingPrice / 100 || 0)}` orderInfo['crowdFundingPrice'] = `¥${this.priceFilter(arr[0]?.crowdFundingPrice * goodsNumber / 100 || 0)}`
// 筛选交易流水号 补录用订单总价 关联尾款单(有定金支付时间 用尾款 没有支付时间 用订单总价) // 筛选交易流水号 补录用订单总价 关联尾款单(有定金支付时间 用尾款 没有支付时间 用订单总价)
if (isAdditionRecordOrder) { if (isAdditionRecordOrder) {
orderInfo['tailPayment'] = `¥${this.priceFilter(arr[0]?.crowdFundingPrice / 100 || 0)}` // orderInfo['tailPayment'] = `¥${this.priceFilter(arr[0]?.crowdFundingPrice / 100 || 0)}`
orderInfo['totalFee'] = arr[0]?.crowdFundingPrice || 0 orderInfo['totalFee'] = arr[0]?.crowdFundingPrice || 0
} else { } else {
orderInfo['totalFee'] = (arr[0]?.crowdFundingPrice - arr[0]?.activityPrice) || 0 orderInfo['totalFee'] = (arr[0]?.crowdFundingPrice - arr[0]?.activityPrice) || 0
......
<!--packageCrowdFunding/components/PickerSelect/PickerSelect.wxml--> <!--packageCrowdFunding/components/PickerSelect/PickerSelect.wxml-->
<popup show="{{show}}" bindconfirm="confirm" bindcancel="cancel" height="60%"> <popup show="{{show}}" bindconfirm="confirm" bindcancel="cancel" height="{{popupHeight || '60%'}}">
<view class="sub-title text-center">{{title}}</view> <view class="sub-title text-center">{{title}}</view>
<scroll-view class="picker_select_box" scroll-y enhanced="{{true}}" show-scrollbar="{{false}}"> <scroll-view class="picker_select_box" scroll-y enhanced="{{true}}" show-scrollbar="{{false}}">
<block wx:for="{{optionList}}" wx:key="index"> <block wx:for="{{optionList}}" wx:key="index">
......
import Api from '../../api' import Api from '../../api'
import api from "../../api";
Component({ Component({
options: { options: {
...@@ -110,7 +109,9 @@ Component({ ...@@ -110,7 +109,9 @@ Component({
selectData: ['客户姓名','订单编号','手机号'], // 下拉列表的数据 selectData: ['客户姓名','订单编号','手机号'], // 下拉列表的数据
selectIndex: 0, // 选择的下拉列表下标 selectIndex: 0, // 选择的下拉列表下标
showSelect: false, // 下拉框 showSelect: false, // 下拉框
confirmFlag: false confirmFlag: false,
remarkType: '', // 备注类型 1备注 2 退款原因
selectItem: {} // 修改备注的订单对象
}, },
methods: { methods: {
init() { init() {
...@@ -149,9 +150,9 @@ Component({ ...@@ -149,9 +150,9 @@ Component({
this.getList() this.getList()
}, },
remarkCancel() { remarkCancel() {
this.setData({ this.setData({
showRemark: false, showRemark: false,
}) })
}, },
tabClick(e) { tabClick(e) {
let {searchObj} = this.data let {searchObj} = this.data
...@@ -186,6 +187,14 @@ Component({ ...@@ -186,6 +187,14 @@ Component({
} }
}) })
}, },
// 复制文案
copyData(e) {
const {target, flag} = e.currentTarget.dataset
let copyItem = flag == 1 ? `${target.customerName}\t${target.customerPhone}` : target.subOrderCode
wx.setClipboardData({
data: copyItem
})
},
getList(isReset = false) { getList(isReset = false) {
this.setData({ this.setData({
...@@ -245,24 +254,55 @@ Component({ ...@@ -245,24 +254,55 @@ Component({
} }
}) })
}, },
showMask(e) {
const { item } = e.currentTarget.dataset || {}
this.setData({
showRemark: true,
remarkType: 1,
selectItem: item
})
},
// 备注确认
remarkConfirm(e) { remarkConfirm(e) {
let value = e.detail let value = e.detail
let refundRemark = value // 备注类型 remarkType 1备注 2退款原因
const {subOrderCodeCopy} = this.data const {subOrderCodeCopy, remarkType, list, selectItem} = this.data
if (remarkType == 1) {
if (value) {
wx.showLoading()
Api.updateOrderRemark({
orderCode: selectItem?.subOrderCode,
remark: value
}).then(res => {
wx.hideLoading()
let { code } = res
if (code == 0) {
// 将订单项备注值回填 不请求接口刷新页面
list.forEach(val => {
if (val.subOrderCode == selectItem.subOrderCode) {
val.remark = value
}
})
this.setData({list})
}
})
}
} else {
let params = { let params = {
orderCode: subOrderCodeCopy, orderCode: subOrderCodeCopy,
refundRemark refundRemark: value
} }
wx.showLoading()
Api.markAsRefunded(params).then(res => { Api.markAsRefunded(params).then(res => {
if (res.code == 0) { wx.hideLoading()
console.log(res) if (res.code == 0) {
wx.$util.showToast('退款成功!') wx.$util.showToast('退款成功!')
this.getList() this.getList()
} else { } else {
wx.$util.showToast(res.message || '接口异常') wx.$util.showToast(res.message || '接口异常')
} }
}) })
}
}, },
handleClickBtn(e) { handleClickBtn(e) {
const {target} = e.currentTarget.dataset const {target} = e.currentTarget.dataset
...@@ -276,20 +316,21 @@ Component({ ...@@ -276,20 +316,21 @@ Component({
const {goodsId: shopmallGoodsId, subOrderCode} = target const {goodsId: shopmallGoodsId, subOrderCode} = target
let params = { let params = {
subOrderCode, subOrderCode,
orderPaySource: 1, orderPaySource: 1, // 订单支付源(1.正常付尾款,2关联尾款单,3未收款新增,4已收款补录)
shopmallGoodsId, shopmallGoodsId,
selectPayType:1, selectPayType:1, // 支付方式(1:线上微信支付,2:线下收款,3:POS机收款, 4:支付宝支付) 默认使用微信支付
updatedBy: accountName updatedBy: accountName,
remark: target?.remark
} }
if (confirmFlag) return if (confirmFlag) return
wx.$util.showLoading() wx.$util.showLoading()
this.setData({confirmFlag: true}) this.setData({confirmFlag: true})
api.createPayOrderAPI(params).then(res => { Api.createPayOrderAPI(params).then(res => {
let {code, data, message} = res let {code, data, message} = res
wx.$util.hideLoading() wx.$util.hideLoading()
if (code == '0') { if (code == '0') {
// wx.$router.reLaunch // wx.$router.reLaunch
wx.$router.go('activityPay', {orderCode: target.subOrderCode, paramsActivityPrice: target.payedDate ? target.activityPrice : '', paramsActivityId: target.activityId, supplementOrderFlag: target.supplementOrderFlag}) wx.$router.go('activityPay', {orderCode: target.subOrderCode, paramsActivityPrice: target.payedDate ? target.activityPrice : '', paramsActivityId: target.activityId, supplementOrderFlag: target.supplementOrderFlag, orderPaySource: 1, goodsNumber: target.goodsNumber || 1, shopmallGoodsId})
setTimeout(() => { setTimeout(() => {
this.setData({ this.setData({
confirmFlag: false confirmFlag: false
...@@ -302,35 +343,13 @@ Component({ ...@@ -302,35 +343,13 @@ Component({
}) })
} }
}) })
// wx.$router.go('activityPay',{orderCode:target.subOrderCode})
} }
if (target.tailOrderStatus == 1 || target.tailOrderStatus == 4) { // 已支付或退定金状态 if (target.tailOrderStatus == 1 || target.tailOrderStatus == 4) { // 已支付或退定金状态
this.setData({ this.setData({
showRemark: true, showRemark: true,
}) remarkType: 2
// wx.showModal({ })
// title: '温馨提示',
// content: '请确定将此订单状态标记为已退款',
// showCancel: true,
// confirmText: '确定',
// confirmColor: '#3582EE',
// success(res) {
// if (res.confirm) {
// Api.markAsRefunded({orderCode: subOrderCode}).then(res => {
// if (res.code == 0){
// console.log(res)
// wx.$util.showToast('退款成功!')
// this.getList()
// }else{
// wx.$util.showToast(res.message || '接口异常')
// }
// })
// }
// }
// })
} }
}, },
search() { search() {
this.setData({ this.setData({
......
...@@ -70,6 +70,7 @@ ...@@ -70,6 +70,7 @@
<view class="header-cust"> <view class="header-cust">
<view class="cust-name">{{item.customerName}}</view> <view class="cust-name">{{item.customerName}}</view>
<view class="cust-phone">{{item.customerPhone}}</view> <view class="cust-phone">{{item.customerPhone}}</view>
<image class="copy-icon" bindtap="copyData" data-target="{{item}}" data-flag="1" src="../../images/copy-text.png" mode=""/>
</view> </view>
<view class="header-status"> <view class="header-status">
<view wx:if="{{ item.tailOrderStatus =='1'}}"> <view wx:if="{{ item.tailOrderStatus =='1'}}">
...@@ -90,8 +91,16 @@ ...@@ -90,8 +91,16 @@
<view class="order"> <view class="order">
<view class="order-label">{{i.label}} </view> <view class="order-label">{{i.label}} </view>
<view class="order-value"> <view class="order-value">
<block wx:if="{{i.type == 'price' && item[i.key]}}">¥{{filter.priceFilter(item[i.key])}}</block> <block wx:if="{{i.type == 'price' && (item[i.key]+'')}}">¥{{filter.priceFilter(item[i.key])}}</block>
<block wx:else>{{item[i.key] || ''}}</block> <block wx:else>
<view wx:if="{{i.key == 'subOrderCode'}}" class="ordercode-class">
{{item[i.key] || ''}}
<image class="copy-icon" bindtap="copyData" data-target="{{item}}" data-flag="2" src="../../images/copy-text.png" mode=""/>
</view>
<view wx:else>
{{item[i.key] || ''}}
</view>
</block>
</view> </view>
</view> </view>
</block> </block>
...@@ -108,6 +117,15 @@ ...@@ -108,6 +117,15 @@
<block>{{item['refundRemark']}}</block> <block>{{item['refundRemark']}}</block>
</view> </view>
</view> </view>
<view class="order refund_text">
<view class="order-label">备注 </view>
<view bindtap="showMask" class="order-value" data-item="{{item}}">
<view wx:if="{{item.remark}}">
<block>{{item['remark']}}</block>
</view>
<view class="placeholder_class" wx:if="{{!item.remark}}">点击添加备注</view>
</view>
</view>
</view> </view>
</view> </view>
...@@ -137,11 +155,12 @@ ...@@ -137,11 +155,12 @@
</view> </view>
<remark-popup wx:if="{{showRemark}}" <remark-popup wx:if="{{showRemark}}"
title="退款备注" title="{{remarkType == 1 ? '备注' : '退款备注'}}"
show="{{showRemark}}" show="{{showRemark}}"
required="{{true}}" required="{{true}}"
maxlength="100" maxlength="{{remarkType == 1 ? 30 : 100}}"
value="{{remarkType == 1 ? selectItem.remark : ''}}"
bindcancel="remarkCancel" bindcancel="remarkCancel"
bindconfirm="remarkConfirm" bindconfirm="remarkConfirm"
placeholder="请填写退款备注" /> placeholder="请填写内容,最多{{remarkType == 1 ? 30 : 100}}个字" />
...@@ -147,7 +147,7 @@ ...@@ -147,7 +147,7 @@
.order-box { .order-box {
background-color: #fdfdfd; background-color: #fdfdfd;
height: calc(100% - 104rpx - 104rpx - 52rpx - 20rpx); height: calc(100% - 104rpx - 104rpx - 52rpx - 30rpx);
} }
.list { .list {
...@@ -204,6 +204,12 @@ ...@@ -204,6 +204,12 @@
margin-left: 24rpx; margin-left: 24rpx;
} }
.item-header .header-cust .copy-icon{
width: 32rpx;
height: 32rpx;
margin-left: 16rpx;
}
.list .icon-sex { .list .icon-sex {
width: 24rpx; width: 24rpx;
height: 24rpx; height: 24rpx;
...@@ -445,6 +451,30 @@ ...@@ -445,6 +451,30 @@
align-items: center; align-items: center;
} }
.list .item .refund_text .order-value{
text-overflow:ellipsis;
display: -webkit-box;
word-break: break-all;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
overflow: hidden;
}
.list .item .refund_text .order-value .placeholder_class{
color: #C8C8C8;
}
.list .item .order .order-value .ordercode-class{
display: flex;
align-items: center;
}
.list .item .order .order-value .ordercode-class .copy-icon{
width: 32rpx;
height: 32rpx;
margin-left: 16rpx;
}
.list .item .order .order-value .order-value-item:first-of-type { .list .item .order .order-value .order-value-item:first-of-type {
max-width: 70%; max-width: 70%;
} }
......
...@@ -22,8 +22,8 @@ page { ...@@ -22,8 +22,8 @@ page {
color: #fff; color: #fff;
.imgBox image { .imgBox image {
width: 18rpx; width: 22rpx;
height: 34rpx; height: 32rpx;
display: inline-block; display: inline-block;
vertical-align: middle; vertical-align: middle;
} }
...@@ -40,7 +40,6 @@ page { ...@@ -40,7 +40,6 @@ page {
} }
} }
} }
.box { .box {
...@@ -69,7 +68,7 @@ page { ...@@ -69,7 +68,7 @@ page {
overflow: hidden; overflow: hidden;
border-radius: 16rpx 16rpx 0 0; border-radius: 16rpx 16rpx 0 0;
overflow: hidden; overflow: hidden;
flex-shrink: 0;
.tab-item { .tab-item {
flex: 1; flex: 1;
display: flex; display: flex;
...@@ -85,20 +84,95 @@ page { ...@@ -85,20 +84,95 @@ page {
} }
} }
} }
.pay-box{
flex-shrink: 0;
display: flex;
flex-flow: column;
align-items: center;
justify-content: center;
.tab-title {
margin: 36rpx 0;
}
.tab-title { .tab-qrcode {
margin: 36rpx 0; width: 430rpx;
} height: 430rpx;
}
.tab-qrcode { .tab-desc {
width: 430rpx; margin-top: 20rpx;
height: 430rpx; font-size: 24rpx;
color: #666666;
}
} }
.input-box{
.tab-desc { flex-shrink: 0;
margin-top: 20rpx; width: 100%;
font-size: 24rpx; height: 100%;
color: #666666; padding: 38rpx 44rpx;
box-sizing: border-box;
.input-item{
display: flex;
margin-bottom: 36rpx;
.label{
flex-shrink: 0;
width: 150rpx;
height: 68rpx;
line-height: 68rpx;
font-size: 24rpx;
text-align: right;
margin-right: 16rpx;
color: #222222;
}
.input_content{
box-sizing: border-box;
flex-shrink: 0;
width: 456rpx;
height: 68rpx;
border: 2rpx solid #DCDCDC;
border-radius: 8rpx;
padding: 0 20rpx;
display: flex;
align-items: center;
input {
width: 100%;
height: 100%;
}
}
.payVoucher_image{
width: 456rpx;
height: 316rpx;
border: 2rpx dashed #999999;
border-radius: 20rpx;
}
.camera-box{
flex-shrink: 0;
width: 460rpx;
height: 320rpx;
background-image: url('https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/miniProgram/pay-voucher-bg.png');
background-size: 100% 100%;
position: relative;
.camera-icon{
width: 96rpx;
height: 96rpx;
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
}
}
}
.confirm-btn{
display: flex;
align-items: center;
justify-content: center;
font-size: 14px;
color: #FFFFFF;
width: 100%;
height: 88rpx;
background: #3582EE;
border-radius: 12rpx;
}
} }
} }
...@@ -157,6 +231,7 @@ page { ...@@ -157,6 +231,7 @@ page {
} }
&:last-child { &:last-child {
width: calc(100% - 200rpx);
color: #1B233D; color: #1B233D;
} }
...@@ -173,6 +248,18 @@ page { ...@@ -173,6 +248,18 @@ page {
text-overflow: ellipsis; text-overflow: ellipsis;
} }
} }
&.placeholder_class{
color: #C8C8C8;
}
&.remark-text{
text-overflow:ellipsis;
display: -webkit-box;
word-break: break-all;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
overflow: hidden;
width: 100% !important;
}
} }
} }
......
...@@ -16,32 +16,64 @@ ...@@ -16,32 +16,64 @@
<view class=" box"> <view class=" box">
<view class="tab-head"> <view class="tab-head">
<view <view
class="tab-item {{orderPaySource === item.id?'active':'' }}" class="tab-item {{selectPayType === item.id?'active':'' }}"
wx:for="{{payItems}}" wx:for="{{payItems}}"
wx:key="index" wx:key="index"
data-item="{{item}}" data-item="{{item}}"
catchtap="handleTab"> catchtap="handleTab">
<gl-image <gl-image
class="btn_icon" class="btn_icon"
data-item="{{item}}" data-item="{{item}}"
webp webp
src="/miniProgram/wxPay.png" src="/miniProgram/{{item.icon}}.png"></gl-image>
wx:if="{{item.id==1}}" />
<gl-image
class="btn_icon"
data-item="{{item}}"
webp
src="/miniProgram/posPay.png"
wx:else></gl-image>
{{item.name}} {{item.name}}
</view> </view>
</view> </view>
<view class="tab-title">{{orderDetail.merchantName}}</view> <!-- 微信/pos机支付 -->
<view class="tab-qrcode"> <block wx:if="{{selectPayType == 1 || selectPayType == 3}}">
<image src="{{orderPaySource==1?wxqrcode:posqrcode}}" mode="widthFix" /> <view class="pay-box">
</view> <view class="tab-title">{{orderDetail.merchantName}}</view>
<view class="tab-desc" hidden="{{orderPaySource==3}}">请让客户打开微信扫描上方付款码进行支付</view> <view class="tab-qrcode">
<view class="tab-desc" hidden="{{orderPaySource==1}}">请使用POS机扫描此码,再向客户收款</view> <image src="{{selectPayType==1?wxqrcode:posqrcode}}" mode="widthFix" />
</view>
<view class="tab-desc" hidden="{{selectPayType==3}}">请让客户打开微信扫描上方付款码进行支付</view>
<view class="tab-desc" hidden="{{selectPayType==1}}">请使用POS机扫描此码,再向客户收款</view>
</view>
</block>
<!-- 门店收款 -->
<block wx:if="{{selectPayType == 2}}">
<view class="input-box">
<view class="input-item">
<view class="label">交易流水号</view>
<view class="input_content">
<input
type="text"
bindinput="input"
value="{{customOutTradeNo}}"
maxlength="32" />
</view>
</view>
<view class="input-item">
<view class="label">上传付款凭证</view>
<view bindtap="upLoad">
<block wx:if="{{customPayVoucher}}">
<image class="payVoucher_image" src="{{customPayVoucher}}" />
</block>
<block wx:else>
<view class="camera-box">
<gl-image
class="camera-icon"
webp
src="/miniProgram/camera-icon.png"></gl-image>
</view>
</block>
</view>
</view>
<view class="confirm-btn" bindtap="confirm">确定</view>
</view>
</block>
</view> </view>
<!-- <view class="infoBox"> --> <!-- <view class="infoBox"> -->
<!-- <activity-info orderInfo="{{orderDetail}}" /> --> <!-- <activity-info orderInfo="{{orderDetail}}" /> -->
...@@ -57,6 +89,10 @@ ...@@ -57,6 +89,10 @@
<view class="money" wx:elif="{{item.handle == 'money'}}"> <view class="money" wx:elif="{{item.handle == 'money'}}">
¥{{orderDetail[item.value] || 0}} ¥{{orderDetail[item.value] || 0}}
</view> </view>
<view wx:elif="{{item.handle == 'input'}}" bindtap="showMask">
<view class="placeholder_class" wx:if="{{!orderDetail[item.value]}}">点击添加备注</view>
<view class="remark-text" wx:else>{{orderDetail[item.value]}}</view>
</view>
<view wx:else>{{orderDetail[item.value] || ''}}</view> <view wx:else>{{orderDetail[item.value] || ''}}</view>
</view> </view>
</view> </view>
...@@ -66,6 +102,15 @@ ...@@ -66,6 +102,15 @@
pickerObj="{{pickerObj}}" pickerObj="{{pickerObj}}"
orderInfo="{{orderInfo}}" orderInfo="{{orderInfo}}"
bindconfirm="changeGoods" /> bindconfirm="changeGoods" />
<remark-popup wx:if="{{showRemark}}"
title="备注"
show="{{showRemark}}"
required="{{true}}"
maxlength="30"
value="{{textAreaValue}}"
bindcancel="remarkCancel"
bindconfirm="remarkConfirm"
placeholder="请填写内容,最多30个字" />
<!-- <view class="page-box isFullSucreen"> <!-- <view class="page-box isFullSucreen">
<view class="img-bg"> <view class="img-bg">
<glsx-image webp src="store-assistant/visitor_bg.png" /> <glsx-image webp src="store-assistant/visitor_bg.png" />
......
...@@ -11,7 +11,14 @@ Page({ ...@@ -11,7 +11,14 @@ Page({
orderInfo: {}, orderInfo: {},
orderNoPopup: false, orderNoPopup: false,
activityName: '', activityName: '',
activityId: '' activityId: '',
navBarHeight: 0
},
navbarReady(e) {
let navBarHeight = e.detail.height
this.setData({
navBarHeight
})
}, },
/** /**
...@@ -21,7 +28,7 @@ Page({ ...@@ -21,7 +28,7 @@ Page({
// 推荐人 // 推荐人
let { orderObj, orderInfo } = this.data let { orderObj, orderInfo } = this.data
if (app.globalData?.staffListRange && orderObj?.orderFormList) { if (app.globalData?.staffListRange && orderObj?.orderFormList) {
orderObj.orderFormList[orderObj.orderFormList.length - 1].optionList = app.globalData.staffListRange orderObj.orderFormList[orderObj.orderFormList.findIndex(v => v.name == 'uuid')].optionList = app.globalData.staffListRange
} }
// 商品 // 商品
if (app.globalData?.crowdFundingShopInfo && orderObj?.shopFormList) { if (app.globalData?.crowdFundingShopInfo && orderObj?.shopFormList) {
...@@ -34,9 +41,9 @@ Page({ ...@@ -34,9 +41,9 @@ Page({
orderObj.shopFormList[0].readonly = true orderObj.shopFormList[0].readonly = true
orderInfo.shopmallGoodsId = app.globalData?.crowdFundingShopInfo[0]?.goodsId || '' orderInfo.shopmallGoodsId = app.globalData?.crowdFundingShopInfo[0]?.goodsId || ''
orderInfo.goodsName = app.globalData?.crowdFundingShopInfo[0]?.goodsName || '' orderInfo.goodsName = app.globalData?.crowdFundingShopInfo[0]?.goodsName || ''
orderInfo.activityPrice = `¥${this.priceFilter(app.globalData?.crowdFundingShopInfo[0]?.activityPrice / 100 || 0)}` orderInfo.depositPrice = `¥${this.priceFilter(app.globalData?.crowdFundingShopInfo[0]?.activityPrice / 100 || 0)}` // 定金金额
orderInfo.crowdFundingPrice = `¥${this.priceFilter(app.globalData?.crowdFundingShopInfo[0]?.crowdFundingPrice / 100 || 0)}` orderInfo.crowdFundingPrice = `¥${this.priceFilter(app.globalData?.crowdFundingShopInfo[0]?.crowdFundingPrice / 100 || 0)}` // 众筹价
orderInfo.tailPayment = `¥${this.priceFilter((app.globalData?.crowdFundingShopInfo[0]?.crowdFundingPrice - app.globalData?.crowdFundingShopInfo[0]?.activityPrice) / 100 || 0)}` orderInfo.tailPayment = `¥${this.priceFilter((app.globalData?.crowdFundingShopInfo[0]?.crowdFundingPrice - app.globalData?.crowdFundingShopInfo[0]?.activityPrice) / 100 || 0)}` // 尾款
orderInfo['totalFee'] = app.globalData?.crowdFundingShopInfo[0]?.crowdFundingPrice || 0 orderInfo['totalFee'] = app.globalData?.crowdFundingShopInfo[0]?.crowdFundingPrice || 0
orderInfo.goodsId = app.globalData?.crowdFundingShopInfo[0]?.goodsId orderInfo.goodsId = app.globalData?.crowdFundingShopInfo[0]?.goodsId
} }
...@@ -68,6 +75,24 @@ Page({ ...@@ -68,6 +75,24 @@ Page({
}) })
}, },
// 添加备注
showMask() {
this.setData({
showRemark: true,
})
},
remarkCancel() {
this.setData({
showRemark: false,
})
},
remarkConfirm(e) {
let remark = e.detail
let { orderInfo } = this.data
orderInfo.remark = remark
this.setData({orderInfo})
},
// 自定义picker选择器 // 自定义picker选择器
showPickerSelect(e) { showPickerSelect(e) {
this.setData({ this.setData({
...@@ -103,7 +128,8 @@ Page({ ...@@ -103,7 +128,8 @@ Page({
shopmallGoodsId: orderInfo.goodsId, shopmallGoodsId: orderInfo.goodsId,
orderPaySource: 4, orderPaySource: 4,
activityId: activityId, activityId: activityId,
activityName: activityName activityName: activityName,
remark: orderInfo?.remark // 备注
} }
wx.$util.showLoading() wx.$util.showLoading()
api.createFullPayOrderAPI(params).then(res => { api.createFullPayOrderAPI(params).then(res => {
......
<!--packageCrowdFunding/pages/additionRecordOrder/additionRecordOrder.wxml--> <!--packageCrowdFunding/pages/additionRecordOrder/additionRecordOrder.wxml-->
<view class="addition-record-order"> <view class="addition-record-order">
<view class="title">订单信息</view> <view class="title">订单信息</view>
<view class="content-box"> <scroll-view scroll-y class="content-box" style="height: calc(100vh - 220rpx);">
<view class="box"> <view class="box">
<gl-form formData="{{orderInfo}}" bindshowPickerSelect="showPickerSelect" formDataList="{{orderObj.shopFormList}}"></gl-form> <gl-form formData="{{orderInfo}}" bindshowPickerSelect="showPickerSelect" formDataList="{{orderObj.shopFormList}}"></gl-form>
</view> </view>
<view class="box"> <view class="box">
<gl-form bindshowOrderNoPopup="showOrderNoPopup" bindshowPickerSelect="showPickerSelect" formData="{{orderInfo}}" dataAttrName="orderInfo" formDataList="{{orderObj.orderFormList}}"></gl-form> <gl-form bindshowOrderNoPopup="showOrderNoPopup" bindshowPickerSelect="showPickerSelect" bindshowMask="showMask" formData="{{orderInfo}}" dataAttrName="orderInfo" formDataList="{{orderObj.orderFormList}}"></gl-form>
</view> </view>
</view> </scroll-view>
<view class="btn-box {{isFullSucreen?'isFullSucreen-btn':''}}"> <view class="btn-box {{isFullSucreen?'isFullSucreen-btn':''}}">
<view class="btn" bindtap="confirm">确定</view> <view class="btn" bindtap="confirm">确定</view>
</view> </view>
...@@ -25,3 +25,12 @@ ...@@ -25,3 +25,12 @@
orderInfo="{{orderInfo}}" orderInfo="{{orderInfo}}"
isAdditionRecordOrder="true" isAdditionRecordOrder="true"
/> />
<remark-popup wx:if="{{showRemark}}"
title="备注"
show="{{showRemark}}"
required="{{true}}"
value="{{orderInfo.remark}}"
maxlength="30"
bindcancel="remarkCancel"
bindconfirm="remarkConfirm"
placeholder="请填写内容,最多30个字" />
...@@ -68,9 +68,14 @@ const orderObj = { ...@@ -68,9 +68,14 @@ const orderObj = {
type: 'select', type: 'select',
optionList: [], optionList: [],
optionId: 'uuid', optionId: 'uuid',
optionName: 'staffName', optionName: 'staffName'
},
{
label: '备注',
name: 'remark',
type: 'remarkPopup',
noBorder: true noBorder: true
} },
] ]
} }
......
...@@ -42,6 +42,11 @@ Page({ ...@@ -42,6 +42,11 @@ Page({
{ {
name: '订单编号', name: '订单编号',
value: 'subOrderCode' value: 'subOrderCode'
},
{
name: '备注',
value: 'remark',
handle: 'input'
} }
], ],
confirmFlag: false confirmFlag: false
...@@ -57,8 +62,8 @@ Page({ ...@@ -57,8 +62,8 @@ Page({
}, },
initOrderInfo() { initOrderInfo() {
const {orderObj, orderList, orderInfo} = this.data const {orderObj, orderList, orderInfo} = this.data
// 商品 // 商品 (购买多个商品数量 定金过滤 总定价/购买数量)
api.getSamePriceGoodsAPI({actId: orderInfo.activityId, activityPrice: orderInfo.payedDate ? orderInfo.activityPrice : ''}).then(res => { api.getSamePriceGoodsAPI({actId: orderInfo.activityId, activityPrice: orderInfo.payedDate ? (orderInfo.activityPrice / orderInfo?.goodsNumber) : ''}).then(res => {
let { code, data, message } = res let { code, data, message } = res
if (code == 0) { if (code == 0) {
if (data && orderObj?.shopFormList) { if (data && orderObj?.shopFormList) {
...@@ -90,6 +95,35 @@ Page({ ...@@ -90,6 +95,35 @@ Page({
pickerObj: this.data.orderObj.shopFormList[0] pickerObj: this.data.orderObj.shopFormList[0]
}) })
}, },
// 添加备注
showMask() {
this.setData({
showRemark: true,
})
},
remarkCancel() {
this.setData({
showRemark: false,
})
},
// 修改备注
remarkConfirm(e) {
let remark = e.detail
let { orderInfo } = this.data
if (remark) {
api.updateOrderRemark({
orderCode: orderInfo?.subOrderCode,
remark: remark
}).then(res => {
let { code } = res
if (code == 0) {
// 直接更新订单备注字段
orderInfo.remark = remark
this.setData({orderInfo})
}
})
}
},
confirm() { confirm() {
const {orderInfo, confirmFlag} = this.data const {orderInfo, confirmFlag} = this.data
// console.log(orderInfo, orderListInfo) // console.log(orderInfo, orderListInfo)
...@@ -169,6 +203,7 @@ Page({ ...@@ -169,6 +203,7 @@ Page({
list.tailPayment = list.supplementOrderFlag == 1 ? `¥${this.priceFilter(list.crowdFundingPrice || 0)}` : `¥${this.priceFilter(list.tailPayment || 0)}` list.tailPayment = list.supplementOrderFlag == 1 ? `¥${this.priceFilter(list.crowdFundingPrice || 0)}` : `¥${this.priceFilter(list.tailPayment || 0)}`
list.shopmallGoodsId = list.goodsId || '' list.shopmallGoodsId = list.goodsId || ''
list.payedDateStr = list.payedDate ? wx.$util.tsFormatTime(list.payedDate, 'Y年M月D日 h:m:s') : '' list.payedDateStr = list.payedDate ? wx.$util.tsFormatTime(list.payedDate, 'Y年M月D日 h:m:s') : ''
list.goodsNumber = list.goodsNumber || 1
this.setData({ this.setData({
orderInfo: list orderInfo: list
}) })
......
...@@ -143,6 +143,12 @@ ...@@ -143,6 +143,12 @@
text-overflow: ellipsis; text-overflow: ellipsis;
} }
} }
&.remark-text{
width: calc(100% - 200rpx);
.placeholder_class{
color: #C8C8C8;
}
}
} }
} }
......
...@@ -36,6 +36,10 @@ ...@@ -36,6 +36,10 @@
<view wx:if="{{item.isMark}}" class="mark-text" bindtap="showPopup"> <view wx:if="{{item.isMark}}" class="mark-text" bindtap="showPopup">
<text class="goods_name_class">{{orderInfo[item.value] || '请选择商品'}}</text><text> ></text> <text class="goods_name_class">{{orderInfo[item.value] || '请选择商品'}}</text><text> ></text>
</view> </view>
<view wx:elif="{{item.handle == 'input'}}" class="remark-text" bindtap="showMask">
<text class="placeholder_class" wx:if="{{!orderInfo[item.value]}}">点击添加备注</text>
<text wx:else>{{orderInfo[item.value]}}</text>
</view>
<view wx:else>{{orderInfo[item.value] || ''}}</view> <view wx:else>{{orderInfo[item.value] || ''}}</view>
</view> </view>
</view> </view>
...@@ -57,4 +61,14 @@ ...@@ -57,4 +61,14 @@
pickerObj="{{pickerObj}}" pickerObj="{{pickerObj}}"
orderInfo="{{orderInfo}}" orderInfo="{{orderInfo}}"
isAdditionRecordOrder="{{!orderInfo.payedDate}}" isAdditionRecordOrder="{{!orderInfo.payedDate}}"
goodsNumber="{{orderInfo.goodsNumber}}"
/> />
<remark-popup wx:if="{{showRemark}}"
title="备注"
show="{{showRemark}}"
required="{{true}}"
value="{{orderInfo.remark}}"
maxlength="30"
bindcancel="remarkCancel"
bindconfirm="remarkConfirm"
placeholder="请填写内容,最多30个字" />
// packageCrowdFunding/pages/newOrder/components/paymentVoucherPopup.js
import { uploadImg } from '~/api/api'
Component({
/**
* 组件的属性列表
*/
properties: {
show: {
type: Boolean,
observer: function(n) {
if (n) {
this.setData({
outTradeNo: '',
payVoucher: ''
})
}
}
},
},
/**
* 组件的初始数据
*/
data: {
outTradeNo: '',
payVoucher: ''
},
/**
* 组件的方法列表
*/
methods: {
input(e) {
let { value } = e.detail
let val = value.replace(/[^a-zA-Z0-9]/g, '')
this.setData({
outTradeNo: val
})
},
// 上传付款凭证
upLoad() {
let _this = this
wx.chooseImage({
count: 1,
success(res) {
let [tempFiles] = res.tempFilePaths
let imgType = tempFiles.split('.')[1]
let type = imgType == 'unknown' ? 'jpg' : imgType
wx.getFileSystemManager().readFile({
filePath: tempFiles, //选择图片返回的相对路径
encoding: 'base64', //编码格式
success(_res) {
wx.$util.showLoading('上传中...')
uploadImg({
file: `${type}@${_res.data}`
})
.then(img => {
wx.$util.hideLoading()
console.log(img)
let { code, data, message } = img
if (code == 0) {
_this.setData({
payVoucher: data
})
} else {
wx.$util.showToast(message)
}
})
}
})
}
})
},
confirm() {
let { outTradeNo, payVoucher } = this.data
if (!outTradeNo) {
return wx.$util.showToast('请输入交易流水号')
}
if (!payVoucher) {
return wx.$util.showToast('请上传付款凭证')
}
this.triggerEvent('payVoucherConfirm', {outTradeNo, payVoucher})
},
cancel() {
this.setData({
show: false
})
}
}
})
{ {
"component": true,
"usingComponents": {} "usingComponents": {}
} }
\ No newline at end of file \ No newline at end of file
/* packageCrowdFunding/pages/newOrder/components/paymentVoucherPopup.wxss */
.input-box{
flex-shrink: 0;
width: 100%;
height: 100%;
padding: 38rpx 44rpx;
box-sizing: border-box;
.input-item{
display: flex;
margin-bottom: 36rpx;
.label{
flex-shrink: 0;
width: 150rpx;
height: 68rpx;
line-height: 68rpx;
font-size: 24rpx;
text-align: right;
margin-right: 16rpx;
color: #222222;
}
.input_content{
box-sizing: border-box;
flex-shrink: 0;
width: 456rpx;
height: 68rpx;
border: 2rpx solid #DCDCDC;
border-radius: 8rpx;
padding: 0 20rpx;
display: flex;
align-items: center;
input {
width: 100%;
height: 100%;
}
}
.payVoucher_image{
width: 456rpx;
height: 316rpx;
border: 2rpx dashed #999999;
border-radius: 20rpx;
}
.camera-box{
flex-shrink: 0;
width: 460rpx;
height: 320rpx;
background-image: url('https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/miniProgram/pay-voucher-bg.png');
background-size: 100% 100%;
position: relative;
.camera-icon{
width: 96rpx;
height: 96rpx;
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
}
}
}
}
\ No newline at end of file \ No newline at end of file
<!--packageCrowdFunding/pages/newOrder/components/paymentVoucherPopup.wxml-->
<popup show="{{show}}" bindconfirm="confirm" bindcancel="cancel" height="750rpx" title="上传付款凭证">
<view class="input-box">
<view class="input-item">
<view class="label">交易流水号</view>
<view class="input_content">
<input
type="text"
bindinput="input"
value="{{outTradeNo}}"
maxlength="32" />
</view>
</view>
<view class="input-item">
<view class="label">上传付款凭证</view>
<view bindtap="upLoad">
<block wx:if="{{payVoucher}}">
<image class="payVoucher_image" src="{{payVoucher}}" />
</block>
<block wx:else>
<view class="camera-box">
<gl-image
class="camera-icon"
webp
src="/miniProgram/camera-icon.png"></gl-image>
</view>
</block>
</view>
</view>
</view>
</popup>
...@@ -2,7 +2,8 @@ const formRule = { ...@@ -2,7 +2,8 @@ const formRule = {
shopmallGoodsId: [{ required: true, message: '请选择商品' }], shopmallGoodsId: [{ required: true, message: '请选择商品' }],
customerName: [{ required: true, message: '客户名称不能为空' }], customerName: [{ required: true, message: '客户名称不能为空' }],
customerPhone: [{ required: true, message: '客户手机号不能为空' }], customerPhone: [{ required: true, message: '客户手机号不能为空' }],
userId: [{ required: true, message: '推荐人不能为空' }] userId: [{ required: true, message: '推荐人不能为空' }],
payType: [{ required: true, message: '请选择支付方式' }]
} }
const orderObj = { const orderObj = {
...@@ -33,7 +34,31 @@ const orderObj = { ...@@ -33,7 +34,31 @@ const orderObj = {
type: 'select', type: 'select',
optionList: [], optionList: [],
optionId: 'userId', optionId: 'userId',
optionName: 'employeeName', optionName: 'employeeName'
},
{
label: '备注',
name: 'remark',
type: 'remarkPopup'
},
{
label: '支付方式',
pickerTitle: '支付方式',
name: 'payType',
type: 'select',
optionList: [{
payType: 'wechat',
confValue: '微信支付'
}, {
payType: 'pos',
confValue: 'POS机支付'
}, {
payType: 'store',
confValue: '门店收款'
}],
optionId: 'payType',
optionName: 'confValue',
height: '40%',
noBorder: true noBorder: true
} }
], ],
......
...@@ -12,13 +12,23 @@ Page({ ...@@ -12,13 +12,23 @@ Page({
formRule: constantData.formRule, formRule: constantData.formRule,
orderInfo: {}, orderInfo: {},
dataAttrName: 'orderInfo', dataAttrName: 'orderInfo',
confirmFlag: false confirmFlag: false,
showRemark: false,
showPaymentVoucherVisible: false,
navBarHeight: 0,
popupHeight: ''
}, },
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad(options) {}, onLoad(options) {},
navbarReady(e) {
let navBarHeight = e.detail.height
this.setData({
navBarHeight
})
},
back() { back() {
wx.$router.back() wx.$router.back()
}, },
...@@ -36,7 +46,6 @@ Page({ ...@@ -36,7 +46,6 @@ Page({
let { orderObj, orderInfo } = this.data let { orderObj, orderInfo } = this.data
// 商品 // 商品
if (app.globalData?.crowdFundingShopInfo && orderObj?.shopFormList) { if (app.globalData?.crowdFundingShopInfo && orderObj?.shopFormList) {
console.log(app.globalData?.crowdFundingShopInfo?.length)
if (app.globalData?.crowdFundingShopInfo?.length > 1) { if (app.globalData?.crowdFundingShopInfo?.length > 1) {
// 多商品 // 多商品
orderObj.shopFormList[1].optionList = app.globalData?.crowdFundingShopInfo.map(item => { orderObj.shopFormList[1].optionList = app.globalData?.crowdFundingShopInfo.map(item => {
...@@ -53,7 +62,7 @@ Page({ ...@@ -53,7 +62,7 @@ Page({
} }
} }
if (app.globalData?.staffListRange && orderObj?.orderFormList) { if (app.globalData?.staffListRange && orderObj?.orderFormList) {
orderObj.orderFormList[orderObj.orderFormList.length - 1].optionList = app.globalData.staffListRange.map(item => { orderObj.orderFormList[orderObj.orderFormList.findIndex(v => v.name == 'employeeName')].optionList = app.globalData.staffListRange.map(item => {
item.employeeName = item.staffName item.employeeName = item.staffName
item.userId = item.uuid item.userId = item.uuid
return item return item
...@@ -67,23 +76,22 @@ Page({ ...@@ -67,23 +76,22 @@ Page({
return (Math.round(num * pow) / pow).toFixed(2) return (Math.round(num * pow) / pow).toFixed(2)
}, },
confirm(e) { confirm(e) {
const { target } = e.currentTarget.dataset
var { formRule, orderInfo, confirmFlag } = this.data var { formRule, orderInfo, confirmFlag } = this.data
// let thisPage = this.$router.getCurrentPage()
// let thisPage = wx.$router.getPageInstance()
// console.log(thisPage.data['orderInfo']['actualSalesPersonId'])
// if (!thisPage.data['orderInfo']['referrerId']) {
// wx.$util.showToast('请选择推荐人')
// return
// }
let validObj = fn.checkRequired(orderInfo, formRule) let validObj = fn.checkRequired(orderInfo, formRule)
if (validObj) { if (validObj) {
wx.$util.showToast(validObj.message) wx.$util.showToast(validObj.message)
return return
} }
if (confirmFlag) return if (confirmFlag) return
// 门店收款
if (orderInfo?.payType == 'store') {
this.setData({
showPaymentVoucherVisible: true
})
return
}
let { default4SStoreInfo_crowdFunding: merchantInfo } = wx.$util.getUserInfo() let { default4SStoreInfo_crowdFunding: merchantInfo } = wx.$util.getUserInfo()
const selectPayType = target == 'wechat' ? 1 : 3 const selectPayType = orderInfo?.payType == 'wechat' ? 1 : orderInfo?.payType == 'pos' ? 3 : ''
const orderObj = wx.$util.deepClone(orderInfo) const orderObj = wx.$util.deepClone(orderInfo)
delete orderObj.activityPrice delete orderObj.activityPrice
delete orderObj.crowdFundingPrice delete orderObj.crowdFundingPrice
...@@ -92,7 +100,7 @@ Page({ ...@@ -92,7 +100,7 @@ Page({
let params = { let params = {
...orderObj, ...orderObj,
selectPayType, selectPayType,
orderPaySource: 3, orderPaySource: 3, // 订单支付源(1.正常付尾款,2关联尾款单,3未收款新增,4已收款补录)
merchantId: merchantInfo.merchantId, merchantId: merchantInfo.merchantId,
merchantName: merchantInfo.merchantName merchantName: merchantInfo.merchantName
} }
...@@ -109,7 +117,7 @@ Page({ ...@@ -109,7 +117,7 @@ Page({
let { code, data, message } = res let { code, data, message } = res
if (code == '0') { if (code == '0') {
// 新增未收款单 付全款金额 // 新增未收款单 付全款金额
wx.$router.redirectTo('activityPay', { orderCode: data.subOrderCode, selectPayType, outTradeNo: data.outTradeNo || data?.payOrder?.outTradeNo, paramsActivityId: orderInfo.activityId, supplementOrderFlag: 1 }) wx.$router.redirectTo('activityPay', { orderCode: data.subOrderCode, selectPayType, outTradeNo: data.outTradeNo || data?.payOrder?.outTradeNo, paramsActivityId: orderInfo.activityId, supplementOrderFlag: 1, orderPaySource: 3, shopmallGoodsId: orderInfo.shopmallGoodsId })
setTimeout(() => { setTimeout(() => {
// 防止页面跳转慢 重复点击 // 防止页面跳转慢 重复点击
this.setData({ this.setData({
...@@ -129,14 +137,90 @@ Page({ ...@@ -129,14 +137,90 @@ Page({
}) })
}) })
}, },
payVoucherConfirm(e) {
let obj = e?.detail
let { orderInfo } = this.data
wx.showModal({
title: '门店收款确认',
content: '确定将此订单标记为门店收款',
complete: res => {
if (res.confirm) {
let { default4SStoreInfo_crowdFunding: merchantInfo } = wx.$util.getUserInfo()
const selectPayType = orderInfo?.payType == 'wechat' ? 1 : orderInfo?.payType == 'pos' ? 3 : 2
const orderObj = wx.$util.deepClone(orderInfo)
delete orderObj.activityPrice
delete orderObj.crowdFundingPrice
delete orderObj.tailPayment
delete orderObj.specialGoodsId
let params = {
...orderObj,
selectPayType,
orderPaySource: 3,
merchantId: merchantInfo.merchantId,
merchantName: merchantInfo.merchantName,
outTradeNo: obj.outTradeNo,
payVoucher: obj.payVoucher
}
this.setData({
confirmFlag: true
})
wx.showLoading()
api
.createFullPayOrderAPI(params)
.then(res => {
console.log(res, 'res')
wx.hideLoading()
let { code, data, message } = res
if (code == '0') {
wx.$router.back()
this.setData({
confirmFlag: false
})
} else {
wx.$util.showToast(message || '接口异常')
this.setData({
confirmFlag: false
})
}
})
.finally(() => {
this.setData({
confirmFlag: false
})
})
}
}
})
this.setData({
showPaymentVoucherVisible: false
})
},
// 自定义picker选择器 // 自定义picker选择器
showPickerSelect(e) { showPickerSelect(e) {
this.setData({ this.setData({
showPickerSelect: true, showPickerSelect: true,
pickerTitle: e?.detail?.pickerTitle, pickerTitle: e?.detail?.pickerTitle,
pickerObj: e?.detail || {} pickerObj: e?.detail || {},
popupHeight: e?.detail?.height || ''
}) })
}, },
// 添加备注
showMask() {
this.setData({
showRemark: true
})
},
remarkCancel() {
this.setData({
showRemark: false
})
},
remarkConfirm(e) {
let remark = e.detail
let { orderInfo } = this.data
orderInfo.remark = remark
this.setData({ orderInfo })
},
/** /**
* 生命周期函数--监听页面初次渲染完成 * 生命周期函数--监听页面初次渲染完成
*/ */
......
...@@ -2,7 +2,8 @@ ...@@ -2,7 +2,8 @@
"navigationBarTitleText": "新增订单", "navigationBarTitleText": "新增订单",
"usingComponents": { "usingComponents": {
"gl-form": "/packageCrowdFunding/components/GLForm/GLForm", "gl-form": "/packageCrowdFunding/components/GLForm/GLForm",
"picker-select": "/packageCrowdFunding/components/PickerSelect/PickerSelect" "picker-select": "/packageCrowdFunding/components/PickerSelect/PickerSelect",
"payment-voucher-popup": "./components/paymentVoucherPopup"
}, },
"navigationStyle": "custom" "navigationStyle": "custom"
} }
...@@ -12,18 +12,19 @@ ...@@ -12,18 +12,19 @@
</navigation-bar> </navigation-bar>
<view class="addition-record-order"> <view class="addition-record-order">
<view class="title">订单信息</view> <view class="title">订单信息</view>
<view class="content-box"> <scroll-view scroll-y class="content-box" style="height: calc(100vh - {{navBarHeight}}px - 250rpx);">
<view class="box"> <view class="box">
<gl-form formData="{{orderInfo}}" dataAttrName="orderInfo" bindshowPickerSelect="showPickerSelect" formDataList="{{orderObj.shopFormList}}"></gl-form> <gl-form formData="{{orderInfo}}" dataAttrName="orderInfo" bindshowPickerSelect="showPickerSelect" formDataList="{{orderObj.shopFormList}}"></gl-form>
</view> </view>
<view class="box"> <view class="box">
<gl-form bindshowOrderNoPopup="showOrderNoPopup" dataAttrName="orderInfo" bindshowPickerSelect="showPickerSelect" formData="{{orderInfo}}" formDataList="{{orderObj.orderFormList}}"></gl-form> <gl-form bindshowOrderNoPopup="showOrderNoPopup" dataAttrName="orderInfo" bindshowPickerSelect="showPickerSelect" bindshowMask="showMask" formData="{{orderInfo}}" formDataList="{{orderObj.orderFormList}}"></gl-form>
</view> </view>
</view> </scroll-view>
<view class="btn-box {{isFullSucreen?'isFullSucreen-btn':''}}"> <view class="btn-box {{isFullSucreen?'isFullSucreen-btn':''}}">
<view class="btn" bindtap="confirm" data-target="wechat">微信支付</view> <!-- <view class="btn" bindtap="confirm" data-target="wechat">微信支付</view>
<view class="btn-lucency" bindtap="confirm" data-target="pos">POS机支付</view> <view class="btn-lucency" bindtap="confirm" data-target="pos">POS机支付</view> -->
<view class="btn" bindtap="confirm">确定</view>
</view> </view>
</view> </view>
<picker-select <picker-select
...@@ -31,4 +32,15 @@ ...@@ -31,4 +32,15 @@
title="请选择{{pickerTitle}}" title="请选择{{pickerTitle}}"
pickerObj="{{pickerObj}}" pickerObj="{{pickerObj}}"
orderInfo="{{orderInfo}}" orderInfo="{{orderInfo}}"
popupHeight="{{popupHeight}}"
/> />
<remark-popup wx:if="{{showRemark}}"
title="备注"
show="{{showRemark}}"
required="{{true}}"
value="{{orderInfo.remark}}"
maxlength="30"
bindcancel="remarkCancel"
bindconfirm="remarkConfirm"
placeholder="请填写内容,最多30个字" />
<payment-voucher-popup wx:if="{{showPaymentVoucherVisible}}" show="{{showPaymentVoucherVisible}}" bindpayVoucherConfirm="payVoucherConfirm" />
<!--packageCrowdFunding/pages/paidOrder/paidOrder.wxml--> <!--packageCrowdFunding/pages/paidOrder/paidOrder.wxml-->
<navigation-bar class="navigation-header" bindnavbarReady="navbarReady" showMenu="{{true}}" bindback="back" bindshowMenuPopup="showMenuPopup"> <navigation-bar class="navigation-header" bindnavbarReady="navbarReady" showMenu="{{true}}" bindback="back" bindshowMenuPopup="showMenuPopup">
<view class="navigation-title" bindtap="showStorePicker"> <view class="navigation-title" bindtap="showStorePicker" wx:if="{{storeListRange.length}}">
<view class="navigation-title-text text-hide">{{userInfo && userInfo.default4SStoreInfo_crowdFunding && userInfo.default4SStoreInfo_crowdFunding.merchantName}}</view> <view class="navigation-title-text text-hide">{{userInfo && userInfo.default4SStoreInfo_crowdFunding && userInfo.default4SStoreInfo_crowdFunding.merchantName}}</view>
<view class="arrow"> <view class="arrow">
<image src="/images/back.png"/> <image src="/images/back.png"/>
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
showMenu="{{true}}" showMenu="{{true}}"
bindback="back" bindback="back"
bindshowMenuPopup="showMenuPopup"> bindshowMenuPopup="showMenuPopup">
<view class="navigation-title" bindtap="showStorePicker"> <view class="navigation-title" bindtap="showStorePicker" wx:if="{{storeListRange.length}}">
<view class="navigation-title-text text-hide"> <view class="navigation-title-text text-hide">
{{userInfo && userInfo.default4SStoreInfo && userInfo.default4SStoreInfo.merchantName}} {{userInfo && userInfo.default4SStoreInfo && userInfo.default4SStoreInfo.merchantName}}
</view> </view>
......
// components/authSetting/authSetting.js
// const restapi = require('../../utils/restapi.js')
// var appInstance = getApp()
Component({
/**
* 组件的属性列表
*/
properties: {
// auth: {
// type: Boolean,
// value: true,
// observer: function (newVal, oldVal) {
// this.getHeadImage()
// }
// },
// type: {
// type: Boolean,
// value: true
// },
// special: {
// type: Boolean,
// value: false
// },
// index: {
// type: Boolean,
// value: false
// }
agree: Boolean
},
/**
* 组件的初始数据
*/
data: {
// auth: true,
// type: true,
// appLogo: '',
// appName: '',
// merchantName: '',
// gender: 1
},
ready() {
// this.getHeadImage()
},
/**
* 组件的方法列表
*/
methods: {
choose() {
this.setData({
agree: !this.data.agree
})
this.triggerEvent('choose', this.data.agree)
},
jump(e) {
console.log(e)
let { url } = e.currentTarget.dataset
const baseUrl = 'https://img01.glsx.com.cn/weapp/resource/saas/scrm/html/'
const path = `${baseUrl}${url}.html`
// private user
wx.navigateTo({
url: `/pages/webView/webView?url=${encodeURIComponent(path)}`
})
// var globalData = appInstance.globalData.extConfig
// restapi.getMerchantBussiness(globalData.merchantId, function (res) {
// console.log(res);
// if (res.returnCode == '0') {
// let path = `https://dj.glsx.com.cn/agreement/djUserPolicy.html?merchantName=${globalData.merchantName}&phone=${res.data.phone}`
// wx.navigateTo({
// url: `/pages/webpage/webpage?path=${encodeURIComponent(path)}`
// })
// }
// }, function (res) {
// console.log(res);
// })
},
noScroll() {}
}
})
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file \ No newline at end of file
<view class='tips'>
<view class='choose-box' bindtap="choose">
<view class='icon'>
<image src="{{agree?'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/login_checked.png':'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/login_check.png'}}" class='check-img' />
</view>
</view>
<text>30天内免登录</text>
</view>
/* components/authSetting/authSetting.wxss */
.tips {
/* position: fixed; */
width: 100%;
/* left: 0;
bottom: 60rpx; */
font-size: 24rpx;
color: #858A94;
letter-spacing: 2rpx;
/* padding-left: 28rpx; */
box-sizing: border-box;
display: flex;
align-items: center;
justify-content: center;
}
/* .tips text {
color: #5092FF;
} */
.tips .icon {
position: absolute;
top: 50%;
left: 50%;
width: 28rpx;
height: 28rpx;
border-radius: 50%;
box-sizing: border-box;
transform: translate(-50%, -50%);
}
.tips .icon .check-img {
vertical-align: top;
width: 100%;
height: 100%;
}
.tips .choose-box {
width: 80rpx;
height: 80rpx;
position: relative;
z-index: 10;
margin-right: -18rpx;
}
\ No newline at end of file \ No newline at end of file
...@@ -3,25 +3,29 @@ const sceneList = [ ...@@ -3,25 +3,29 @@ const sceneList = [
sceneName: '精品升级', sceneName: '精品升级',
sceneDesc: '太阳膜升级转化下单', sceneDesc: '太阳膜升级转化下单',
sceneType: 1, sceneType: 1,
actived: false actived: false,
recordId:1,
}, },
{ {
sceneName: '会员权益/升级', sceneName: '会员权益/升级',
sceneDesc: '新车车损险下单', sceneDesc: '新车车损险下单',
sceneType: 0, sceneType: 0,
actived: false actived: false,
recordId:2,
}, },
{ {
sceneName: '售后众筹', sceneName: '售后众筹',
sceneDesc: '门店存量客户众筹下单', sceneDesc: '门店存量客户众筹下单',
sceneType: 3, sceneType: 3,
actived: false actived: false,
recordId:3,
}, },
{ {
sceneName: '次新车转化', sceneName: '次新车转化',
sceneDesc: '次新车用户领取套餐包转化', sceneDesc: '次新车用户领取套餐包转化',
sceneType: 2, sceneType: 2,
actived: false actived: false,
recordId:4,
} }
] ]
......
...@@ -25,6 +25,8 @@ Page({ ...@@ -25,6 +25,8 @@ Page({
this.setData({ this.setData({
sceneList sceneList
}) })
wx.$util.pointRecord( sceneList[index].recordId)
}, },
/** /**
...@@ -53,7 +55,7 @@ Page({ ...@@ -53,7 +55,7 @@ Page({
},) },)
// 没有登录信息 或无开通场景 退出登录 // 没有登录信息 或无开通场景 退出登录
if (!Object.keys(userInfo).length || !userInfo.openSceneArr?.length) { if (!Object.keys(userInfo).length || !userInfo.openSceneArr?.length) {
app.login(false) app.login(true,'请重新登录')
} }
}, },
......
...@@ -99,7 +99,7 @@ Page({ ...@@ -99,7 +99,7 @@ Page({
if (userType == 2 && item?.selectPayType == 1) { if (userType == 2 && item?.selectPayType == 1) {
wx.$router.go('tabWorkOrder.confirmOrder', item) wx.$router.go('tabWorkOrder.confirmOrder', item)
} else if (userType == 2) { } else if (userType == 2) {
wx.$router.go('tabWorkOrder.'+name, item) wx.$router.go('tabWorkOrder.' + name, item)
} else { } else {
wx.$util.showNoAccess() wx.$util.showNoAccess()
} }
...@@ -111,7 +111,7 @@ Page({ ...@@ -111,7 +111,7 @@ Page({
wx.$router.go('tabWorkOrder.constructionOrderDetail', item) wx.$router.go('tabWorkOrder.constructionOrderDetail', item)
} else { } else {
// console.log(item) // console.log(item)
wx.$router.go('tabWorkOrder.'+name, item) wx.$router.go('tabWorkOrder.' + name, item)
} }
}, },
scan() { scan() {
...@@ -505,6 +505,12 @@ Page({ ...@@ -505,6 +505,12 @@ Page({
) )
}, },
/** /**
* 监听 TabBar 切换点击
*/
// onTabItemTap(item) {
// console.log(item, 'item')
// },
/**
* 用户点击右上角分享 * 用户点击右上角分享
*/ */
onShareAppMessage: function () {} onShareAppMessage: function () {}
......
// pages/wxLogin/wxLogin.js // pages/wxLogin/wxLogin.js
import api from '../../api/api.js' import api from '../../api/api.js'
import { setNoSignInUuid,getNoSignInUuid } from '~/utils/cache/storageApi.js'
const app = getApp()
Page({ Page({
/** /**
* 页面的初始数据 * 页面的初始数据
...@@ -10,13 +12,20 @@ Page({ ...@@ -10,13 +12,20 @@ Page({
count: 60, count: 60,
verificationCount: '', verificationCount: '',
loginType: 3, loginType: 3,
agree: false agree: false,
noLoginAgree: false
}, },
onRoute(loginToken) { onRoute(loginToken) {
this.setData({ this.setData({
loginToken loginToken
}) })
}, },
noLoginAgreeChoose(e) {
let { detail: agree } = e
this.setData({
noLoginAgreeChoose: agree
})
},
authChoose(e) { authChoose(e) {
let { detail: agree } = e let { detail: agree } = e
this.setData({ this.setData({
...@@ -93,7 +102,7 @@ Page({ ...@@ -93,7 +102,7 @@ Page({
const checkAgree = this.checkAgree() const checkAgree = this.checkAgree()
if (checkAgree) return false if (checkAgree) return false
let { flag, code, mobile, loginType, accountNumber, password } = this.data let { flag, code, mobile, loginType, accountNumber, password, noLoginAgreeChoose } = this.data
console.log(flag) console.log(flag)
if (!flag) return if (!flag) return
wx.$util.showLoading() wx.$util.showLoading()
...@@ -102,14 +111,18 @@ Page({ ...@@ -102,14 +111,18 @@ Page({
api api
.smsLogin({ .smsLogin({
code, code,
mobile mobile,
noSignIn: noLoginAgreeChoose
}) })
.then(result => { .then(result => {
wx.$util.showLoading() wx.$util.showLoading()
if (result.code == 0) { if (result.code == 0) {
let { loginUserInfoList, sessionId } = result.data let { loginUserInfoList, sessionId, noSignInUuid } = result.data
if (loginUserInfoList.length > 0) { if (loginUserInfoList.length > 0) {
wx.$util.setSessionId(sessionId) wx.$util.setSessionId(sessionId)
// wx.$storage.
noSignInUuid && setNoSignInUuid(noSignInUuid)
wx.$router.reLaunch('pages.accountItems') wx.$router.reLaunch('pages.accountItems')
} else { } else {
wx.$router.reLaunch('pages.nothing') wx.$router.reLaunch('pages.nothing')
...@@ -210,7 +223,7 @@ Page({ ...@@ -210,7 +223,7 @@ Page({
const checkAgree = this.checkAgree() const checkAgree = this.checkAgree()
if (checkAgree) return false if (checkAgree) return false
let { loginToken } = this.data let { loginToken, noLoginAgreeChoose } = this.data
let { encryptedData, iv } = e.detail let { encryptedData, iv } = e.detail
if (!encryptedData) return if (!encryptedData) return
wx.$util.showLoading('加载中...') wx.$util.showLoading('加载中...')
...@@ -218,15 +231,18 @@ Page({ ...@@ -218,15 +231,18 @@ Page({
.authPhone({ .authPhone({
encryptedData, encryptedData,
loginToken, loginToken,
iv iv,
noLoginAgreeChoose
}) })
.then(({ code, data, message }) => { .then(({ code, data, message }) => {
console.log(data) console.log(data)
wx.hideLoading() wx.hideLoading()
if (code == 0) { if (code == 0) {
let { loginUserInfoList, sessionId } = data let { loginUserInfoList, sessionId, noSignInUuid } = data
if (loginUserInfoList.length) { if (loginUserInfoList.length) {
wx.$util.setSessionId(sessionId) wx.$util.setSessionId(sessionId)
// wx.$storage.
noSignInUuid && setNoSignInUuid(noSignInUuid)
wx.$router.reLaunch('pages.accountItems') wx.$router.reLaunch('pages.accountItems')
} else { } else {
wx.$router.reLaunch('pages.nothing') wx.$router.reLaunch('pages.nothing')
...@@ -255,6 +271,8 @@ Page({ ...@@ -255,6 +271,8 @@ Page({
onShow: function () { onShow: function () {
wx.hideHomeButton() wx.hideHomeButton()
this.login() this.login()
let noSignInUuid = getNoSignInUuid()
noSignInUuid&&app.login(true)
}, },
login() { login() {
wx.$util.showLoading() wx.$util.showLoading()
......
{ {
"usingComponents": { "usingComponents": {
"auth-setting": "../components/authSetting/authSetting" "auth-setting": "../components/authSetting/authSetting",
"auth-noLogin": "../components/authNoLogin/authNoLogin"
}, },
"navigationStyle": "custom" "navigationStyle": "custom"
} }
<view class="layout {{loginType == 1?'phone_login_layout':''}}"> <view class="layout {{ loginType == 1?'phone_login_layout':'' }}">
<navigation-bar navStyle="background-color: rgba(0,0,0,0);box-shadow:none;">生意助手员工版</navigation-bar> <navigation-bar navStyle="background-color: rgba(0,0,0,0);box-shadow:none;">生意助手员工版</navigation-bar>
<view class="box_content"> <view class="box_content">
<!-- 登录区域 --> <!-- 登录区域 -->
<view class="box"> <view class="box">
<!-- 微信登录 --> <!-- 微信登录 -->
<block wx:if="{{loginType == 3}}"> <block wx:if="{{ loginType == 3 }}">
<view class="wx opacity-view"> <view class="wx opacity-view">
<view class="title"> <view class="title">您好</view>
您好 <view class="subtitle">欢迎登录生意助手员工版</view>
</view> <image class="img" src="https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/login_box.png" />
<view class="subtitle"> </view>
欢迎登录生意助手员工版 <view class="login-btn {{ loginType == 3?'mini':'' }}">
</view> <button size="default" hidden="{{ loginType != 3 || !agree }}" open-type="getPhoneNumber" bindgetphonenumber="getPhoneNumber" />
<image class="img" src="https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/login_box.png" /> <view hidden="{{ loginType !=3 }}" bindtap="checkAgree">微信登录</view>
</view> </view>
<view class="login-btn {{loginType == 3?'mini':''}}"> <view class="mobile_btn" bindtap="changeLoginType" data-type="1" wx:if="{{ loginType != 1 }}">手机号登录</view>
<button <auth-noLogin bind:choose="noLoginAgreeChoose" agree="{{ noLoginAgree }}"></auth-noLogin>
size="default" </block>
hidden="{{loginType != 3 || !agree}}" <!-- 手机号登录 -->
open-type="getPhoneNumber" <block wx:if="{{ loginType == 1 }}">
bindgetphonenumber="getPhoneNumber" /> <view class="phone_login">
<view hidden="{{loginType !=3 }}" bindtap="checkAgree">微信登录</view> <view class="title">手机号码登录</view>
</view> <view class="login-form">
<view <view class="input">
class="mobile_btn" <input
bindtap="changeLoginType" placeholder="请输入手机号"
data-type="1" type="number"
wx:if="{{loginType != 1}}">手机号登录 </view> placeholder-style="color:#999;"
</block> style="width:calc(100% - 50rpx);"
<!-- 手机号登录 --> bindinput="input"
<block wx:if="{{loginType == 1}}"> data-name="mobile"
<view class="phone_login"> value="{{ mobile }}"
<view class="title">手机号码登录</view> maxlength="11"
<view class='login-form'> />
<view class='input'> <view class="clear" hidden="{{ !mobile }}" bindtap="clear" data-name="mobile">
<input <image src="/images/clear.png" />
placeholder="请输入手机号" </view>
type="number" </view>
placeholder-style="color:#999;" <view class="input">
style="width:calc(100% - 50rpx);" <input
bindinput="input" placeholder="请输入验证码"
data-name='mobile' type="number"
value="{{mobile}}" placeholder-style="color:#999;"
maxlength="11" /> style="width:calc(100% - 100rpx);"
<view bindinput="input"
class='clear' data-name="code"
hidden="{{!mobile}}" value="{{ code }}"
bindtap="clear" maxlength="4"
data-name='mobile'> />
<image src="/images/clear.png" /> <view class="clear" hidden="{{ !code }}" bindtap="clear" data-name="code">
</view> <image src="/images/clear.png" />
</view> </view>
<view class='input'> <view class="sms {{ countDown?'code-disabled':'' }}" bindtap="getSms">
<input <view wx:if="{{ countDown }}">重新发送({{count}})</view>
placeholder="请输入验证码" <view wx:else>获取验证码</view>
type="number" </view>
placeholder-style="color:#999;" </view>
style="width:calc(100% - 100rpx);" <view class="login_btn" bindtap="smsLogin">登录</view>
bindinput="input" <view class="wx_login">
data-name='code' 或
value='{{code}}' <text bindtap="changeLoginType" data-type="3">微信登录</text>
maxlength="4" /> </view>
<view </view>
class='clear' </view>
hidden="{{!code}}" <autoLogin-btn></autoLogin-btn>
bindtap="clear" </block>
data-name='code'> </view>
<image src="/images/clear.png" /> <!-- 协议 -->
</view> <auth-setting bind:choose="authChoose" agree="{{ agree }}" />
<view class="sms {{countDown?'code-disabled':''}}" bindtap="getSms"> </view>
<view wx:if="{{countDown}}">重新发送({{count}})</view> <!-- -->
<view wx:else>获取验证码</view>
</view>
</view>
<view class="login_btn" bindtap="smsLogin">登录</view>
<view class="wx_login">或<text bindtap="changeLoginType" data-type="3">微信登录</text></view>
</view>
</view>
</block>
</view>
<!-- 协议 -->
<auth-setting bind:choose="authChoose" agree="{{agree}}"/>
</view>
<!-- -->
</view> </view>
<!-- 未同意协议弹窗提示 --> <!-- 未同意协议弹窗提示 -->
<van-dialog <van-dialog
use-slot use-slot
title="隐私协议与用户协议" title="隐私协议与用户协议"
show="{{ showAuthDialog }}" show="{{ showAuthDialog }}"
class="auth-dialog-class" class="auth-dialog-class"
width="552rpx" width="552rpx"
show-cancel-button show-cancel-button
confirmButtonText="同意" confirmButtonText="同意"
confirm-button-color="#5092FF" confirm-button-color="#5092FF"
bind:confirm="agreeEvent" bind:confirm="agreeEvent"
bind:close="onClose" bind:close="onClose"
> >
<view class="message-box"> <view class="message-box">
<view class="message">为保障你的合法权益,请阅读并同意</view> <view class="message">为保障你的合法权益,请阅读并同意</view>
<text catchtap="jump" data-url="privacy">《隐私协议》</text>和 <text catchtap="jump" data-url="privacy">《隐私协议》</text>
<text catchtap="jump" data-url="agreement">《用户协议》</text> 和
</view> <text catchtap="jump" data-url="agreement">《用户协议》</text>
</van-dialog> </view>
</van-dialog>
\ No newline at end of file \ No newline at end of file
...@@ -265,15 +265,8 @@ ...@@ -265,15 +265,8 @@
"scene": null "scene": null
}, },
{ {
"name": "1.1 订单详情",
"pathName": "tabWorkOrder/pages/constructionOrderDetail/constructionOrderDetail",
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "1.1 订单列表", "name": "1.1 订单列表",
"pathName": "tabWorkOrder/pages/index/index", "pathName": "pages/tabWorkOrder/pages/index/index",
"query": "", "query": "",
"launchMode": "default", "launchMode": "default",
"scene": null "scene": null
...@@ -312,6 +305,27 @@ ...@@ -312,6 +305,27 @@
"query": "", "query": "",
"launchMode": "default", "launchMode": "default",
"scene": null "scene": null
},
{
"name": "用户画像",
"pathName": "tabDate/pages/userPortrait/userPortrait",
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "经营数据",
"pathName": "tabOperating/pages/index/index",
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "1.1 订单详情",
"pathName": "tabWorkOrder/pages/constructionOrderDetail/constructionOrderDetail",
"query": "",
"launchMode": "default",
"scene": null
} }
] ]
} }
......
...@@ -36,11 +36,14 @@ export const getYQInfo = userInfo => { ...@@ -36,11 +36,14 @@ export const getYQInfo = userInfo => {
let subIndex = 0 let subIndex = 0
console.log(!userInfo.isSuper && userInfo.merchantType && userInfo.userType == 2); console.log(!userInfo.isSuper && userInfo.merchantType && userInfo.userType == 2);
console.log(userInfo.merchantId,'userInfo.merchantId');
if (!userInfo.loginRole || userInfo.loginRole ==4 ) { if (!userInfo.loginRole || userInfo.loginRole ==4 ) {
// console.log(userInfo.merchantId,'userInfo.merchantId');
app.globalData.yqdInfo = { app.globalData.yqdInfo = {
subIndex, subIndex,
merchantRange: [{ merchantRange: [{
merchantName: userInfo.merchantName merchantName: userInfo.merchantName,
merchantId: userInfo.merchantId
}] }]
} }
// this.setData({ // this.setData({
...@@ -71,7 +74,8 @@ export const getYQInfo = userInfo => { ...@@ -71,7 +74,8 @@ export const getYQInfo = userInfo => {
arr = [all, ...data] arr = [all, ...data]
} else { } else {
arr = [{ arr = [{
merchantName: userInfo.merchantName merchantName: userInfo.merchantName,
merchantId: userInfo.merchantId
}] }]
} }
app.globalData.yqdInfo = { app.globalData.yqdInfo = {
......
<!--subvehicleConversion/pages/index/index.wxml--> <!--subvehicleConversion/pages/index/index.wxml-->
<navigation-bar class="navigation-header" bindnavbarReady="navbarReady" showMenu="{{true}}" bindshowMenuPopup="showMenuPopup" navStyle="{{navStyle}}"> <navigation-bar class="navigation-header" bindnavbarReady="navbarReady" showMenu="{{true}}" bindshowMenuPopup="showMenuPopup" navStyle="{{navStyle}}">
<view class="navigation-title" bindtap="showStorePicker"> <view class="navigation-title" bindtap="showStorePicker" wx:if="{{storeListRange.length}}">
<view class="navigation-title-text text-hide">{{userInfo && userInfo.default4SStoreInfo_newCarConversion && userInfo.default4SStoreInfo_newCarConversion.merchantName}}</view> <view class="navigation-title-text text-hide">{{userInfo && userInfo.default4SStoreInfo_newCarConversion && userInfo.default4SStoreInfo_newCarConversion.merchantName}}</view>
<view class="arrow"> <view class="arrow">
<image src="/images/back.png"/> <image src="/images/back.png"/>
......
...@@ -48,5 +48,10 @@ module.exports = { ...@@ -48,5 +48,10 @@ module.exports = {
/** 编辑客户画像 */ /** 编辑客户画像 */
updateProfile(data) { updateProfile(data) {
return api.post('dj.api.smartcarlife.inviteRecord.updateCustomerProfile', data) return api.post('dj.api.smartcarlife.inviteRecord.updateCustomerProfile', data)
},
/** 查询客户画像 */
portraitQuery(data) {
return api.post('dj.api.smartcarlife.customer.portrait.query', data)
} }
} }
...@@ -578,6 +578,7 @@ Component({ ...@@ -578,6 +578,7 @@ Component({
}) })
// this.triggerEvent('change', list) // this.triggerEvent('change', list)
this.triggerEventSelectDay(); this.triggerEventSelectDay();
wx.$util.pointRecord(26)
}, },
// 收起/展开 // 收起/展开
......
...@@ -30,6 +30,7 @@ Page({ ...@@ -30,6 +30,7 @@ Page({
* inviteDate - 邀约日期(格式:yyyy-MM-dd) * inviteDate - 邀约日期(格式:yyyy-MM-dd)
* */ * */
getListByDay(e) { getListByDay(e) {
let { detail } = e let { detail } = e
let params = { let params = {
inviteDate: `${detail.year}-${detail.month}-${detail.day}` inviteDate: `${detail.year}-${detail.month}-${detail.day}`
...@@ -57,6 +58,7 @@ Page({ ...@@ -57,6 +58,7 @@ Page({
// 预约按钮 // 预约按钮
handleInvite(e) { handleInvite(e) {
wx.$util.pointRecord(27)
let { item } = e.currentTarget.dataset let { item } = e.currentTarget.dataset
this.setData({ this.setData({
inviteObj: item, inviteObj: item,
......
...@@ -20,8 +20,7 @@ Page({ ...@@ -20,8 +20,7 @@ Page({
remark: '', remark: '',
selectPayType: 2 selectPayType: 2
}, },
customerObj: [ customerObj: [{
{
label: '客户姓名', label: '客户姓名',
key: 'customerName' key: 'customerName'
}, },
...@@ -55,8 +54,7 @@ Page({ ...@@ -55,8 +54,7 @@ Page({
portrait: true portrait: true
} }
], ],
recordObj: [ recordObj: [{
{
label: '跟进人', label: '跟进人',
key: 'userName' key: 'userName'
}, },
...@@ -80,8 +78,12 @@ Page({ ...@@ -80,8 +78,12 @@ Page({
}, },
showPopup(e) { showPopup(e) {
let _this = this let _this = this
let { name } = e.currentTarget.dataset let {
let { detail } = this.data name
} = e.currentTarget.dataset
let {
detail
} = this.data
// if (detail.inviteStatus == 4 && name == 'showDate') return _this.showToast('已施工不可操作!')// 已施工预约单不可修改到店时间 // if (detail.inviteStatus == 4 && name == 'showDate') return _this.showToast('已施工不可操作!')// 已施工预约单不可修改到店时间
this.setData({ this.setData({
[name]: !this.data[name] [name]: !this.data[name]
...@@ -89,15 +91,20 @@ Page({ ...@@ -89,15 +91,20 @@ Page({
}, },
setCopyData(e) { setCopyData(e) {
console.log(e) console.log(e)
let { content } = e.currentTarget.dataset let {
content
} = e.currentTarget.dataset
wx.$util.setCopyData(`${content}`) wx.$util.setCopyData(`${content}`)
}, },
editProtrait(e) { editProtrait(e) {
wx.$util.pointRecord(24)
wx.$router.go('userPortrait', this.data.detail) wx.$router.go('userPortrait', this.data.detail)
}, },
makePhoneCall(e) { makePhoneCall(e) {
console.log(e) console.log(e)
let { data } = e.currentTarget.dataset let {
data
} = e.currentTarget.dataset
wx.makePhoneCall({ wx.makePhoneCall({
phoneNumber: data phoneNumber: data
}) })
...@@ -123,28 +130,39 @@ Page({ ...@@ -123,28 +130,39 @@ Page({
}) })
this.getInviteDetail(options.id) this.getInviteDetail(options.id)
} }
this.checkPhoneShow(app.globalData.YQorderSetting.yqPhoneConfig) this.checkPhoneShow(app.globalData.YQorderSetting?.yqPhoneConfig)
}, },
checkPhoneShow(config) { checkPhoneShow(config) {
console.log('config', config) console.log('config', config)
// 有就屏蔽手机号的显示 // 有就屏蔽手机号的显示
if (config) { if (config) {
let { customerObj } = this.data let {
customerObj
} = this.data
delete customerObj[1] delete customerObj[1]
this.setData({ this.setData({
customerObj customerObj
}) })
} }
}, },
dealPortrait(info) { async dealPortrait(id) {
let _userPortrait = [] let _userPortrait = []
let {
code,
data: info
} = await api.portraitQuery({
id
})
if (code != 0) return
CONSTANTDATA.formData.forEach(item => { CONSTANTDATA.formData.forEach(item => {
if (info[item.name]) { if (info[item.name]) {
if (item.type == 'textarea') { if (item.type == 'textarea') {
_userPortrait.push(info[item.name]) _userPortrait.push(info[item.name])
} else { } else {
if (item.isMult) { if (item.isMult) {
let _list = info[item.name].split(',') // let _list = info[item.name].split(',')
let _list = info[item.name]
_list.forEach(n => { _list.forEach(n => {
_userPortrait.push(item.optionList.find(k => k.confId == n).confName) _userPortrait.push(item.optionList.find(k => k.confId == n).confName)
}) })
...@@ -154,7 +172,10 @@ Page({ ...@@ -154,7 +172,10 @@ Page({
} }
} }
}) })
return _userPortrait this.setData({
['detail.userPortrait']: _userPortrait
})
// return _userPortrait
}, },
getInviteDetail(id) { getInviteDetail(id) {
let _this = this let _this = this
...@@ -165,7 +186,11 @@ Page({ ...@@ -165,7 +186,11 @@ Page({
}) })
.then(res => { .then(res => {
console.log(res) console.log(res)
let { code, message, data } = res let {
code,
message,
data
} = res
if (code == 0) { if (code == 0) {
wx.$util.hideLoading() wx.$util.hideLoading()
let detail = {} let detail = {}
...@@ -183,8 +208,8 @@ Page({ ...@@ -183,8 +208,8 @@ Page({
...detail.customerCoupon, ...detail.customerCoupon,
...detail.customer, ...detail.customer,
...detail, ...detail,
employeeName: detail?.customerCoupon.employeeName,//解决详情的userId 不是对应的销售方的useid employeeName: detail?.customerCoupon.employeeName, //解决详情的userId 不是对应的销售方的useid
userId:detail?.customerCoupon.userId userId: detail?.customerCoupon.userId
} }
if (detail.remarks && detail.remarks.length > 0) { if (detail.remarks && detail.remarks.length > 0) {
detail.remarks.map(e => { detail.remarks.map(e => {
...@@ -200,12 +225,13 @@ Page({ ...@@ -200,12 +225,13 @@ Page({
if (detail.carSeriesName) detail.carType = `${detail.carBrand}-${detail.carChildsBrandName || ''}-${detail.carSeriesName}` if (detail.carSeriesName) detail.carType = `${detail.carBrand}-${detail.carChildsBrandName || ''}-${detail.carSeriesName}`
if (detail.customerCoupon.createdDate) detail.time = new Date(detail.customerCoupon.createdDate).format('yyyy-MM-dd hh:mm:ss') if (detail.customerCoupon.createdDate) detail.time = new Date(detail.customerCoupon.createdDate).format('yyyy-MM-dd hh:mm:ss')
if (detail.inviteDate) detail.inviteDate = new Date(detail.inviteDate).format('yyyy-MM-dd hh:mm:ss') if (detail.inviteDate) detail.inviteDate = new Date(detail.inviteDate).format('yyyy-MM-dd hh:mm:ss')
// 用户画像
detail.userPortrait = this.dealPortrait(detail)
this.setData({ this.setData({
detail, detail,
flag: true flag: true
}) })
// 用户画像
this.dealPortrait(detail.customerId)
} else { } else {
wx.showModal({ wx.showModal({
title: '温馨提示', title: '温馨提示',
...@@ -223,7 +249,10 @@ Page({ ...@@ -223,7 +249,10 @@ Page({
}) })
}, },
setInviteDate() { setInviteDate() {
let { detail, inviteDateStr } = this.data let {
detail,
inviteDateStr
} = this.data
api api
.setInviteDate({ .setInviteDate({
id: detail.id, id: detail.id,
...@@ -234,7 +263,11 @@ Page({ ...@@ -234,7 +263,11 @@ Page({
wx.$refresh = true wx.$refresh = true
wx.hideLoading() wx.hideLoading()
console.log(res) console.log(res)
let { code, data, message } = res let {
code,
data,
message
} = res
if (code == 0) { if (code == 0) {
this.setData({ this.setData({
showDate: false showDate: false
...@@ -247,7 +280,9 @@ Page({ ...@@ -247,7 +280,9 @@ Page({
}, },
cancelInvite() { cancelInvite() {
let _this = this let _this = this
let { id } = this.data.detail let {
id
} = this.data.detail
wx.showModal({ wx.showModal({
title: '温馨提示', title: '温馨提示',
content: '是否取消预约?', content: '是否取消预约?',
...@@ -263,7 +298,10 @@ Page({ ...@@ -263,7 +298,10 @@ Page({
}) })
.then(res => { .then(res => {
console.log(res) console.log(res)
let { code, message } = res let {
code,
message
} = res
if (code == 0) { if (code == 0) {
wx.hideLoading() wx.hideLoading()
_this.showToast('取消成功!') _this.showToast('取消成功!')
...@@ -279,8 +317,12 @@ Page({ ...@@ -279,8 +317,12 @@ Page({
}, },
remarkConfirm(e) { remarkConfirm(e) {
let value = e.detail let value = e.detail
let { detail } = this.data let {
let { id } = detail.remarks[0] detail
} = this.data
let {
id
} = detail.remarks[0]
if (value) { if (value) {
api api
.followRecord({ .followRecord({
...@@ -288,7 +330,10 @@ Page({ ...@@ -288,7 +330,10 @@ Page({
remark: value remark: value
}) })
.then(res => { .then(res => {
let { code, message } = res let {
code,
message
} = res
if (code == 0) { if (code == 0) {
this.showToast('提交成功') this.showToast('提交成功')
this.getInviteDetail(detail.id) this.getInviteDetail(detail.id)
...@@ -300,20 +345,25 @@ Page({ ...@@ -300,20 +345,25 @@ Page({
}, },
// 去下单 // 去下单
orderSubmit() { orderSubmit() {
let { detail } = this.data let {
detail
} = this.data
detail.isAppointment = true detail.isAppointment = true
wx.$util.pointRecord(25)
wx.$router.redirectTo('tabWorkOrder.createOrder', detail) wx.$router.redirectTo('tabWorkOrder.createOrder', detail)
}, },
/** /**
* 生命周期函数--监听页面初次渲染完成 * 生命周期函数--监听页面初次渲染完成
*/ */
onReady: function () { }, onReady: function () {},
/** /**
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
*/ */
onShow: function () { onShow: function () {
let { options } = this.data let {
options
} = this.data
if (options?.id) { if (options?.id) {
this.getInviteDetail(options.id) this.getInviteDetail(options.id)
} }
...@@ -322,25 +372,25 @@ Page({ ...@@ -322,25 +372,25 @@ Page({
/** /**
* 生命周期函数--监听页面隐藏 * 生命周期函数--监听页面隐藏
*/ */
onHide: function () { }, onHide: function () {},
/** /**
* 生命周期函数--监听页面卸载 * 生命周期函数--监听页面卸载
*/ */
onUnload: function () { }, onUnload: function () {},
/** /**
* 页面相关事件处理函数--监听用户下拉动作 * 页面相关事件处理函数--监听用户下拉动作
*/ */
onPullDownRefresh: function () { }, onPullDownRefresh: function () {},
/** /**
* 页面上拉触底事件的处理函数 * 页面上拉触底事件的处理函数
*/ */
onReachBottom: function () { }, onReachBottom: function () {},
/** /**
* 用户点击右上角分享 * 用户点击右上角分享
*/ */
onShareAppMessage: function () { } onShareAppMessage: function () {}
}) })
\ No newline at end of file \ No newline at end of file
...@@ -60,7 +60,11 @@ Page({ ...@@ -60,7 +60,11 @@ Page({
}, },
4: { 4: {
text: '已施工', text: '已施工',
color: '#999999' color: '#3582EE'
},
7: {
text: '已支付',
color: '#14CC68'
} }
}, },
searchObj: {}, searchObj: {},
...@@ -73,7 +77,7 @@ Page({ ...@@ -73,7 +77,7 @@ Page({
// let { list } = this.data // let { list } = this.data
// index, ind // index, ind
let { let {
item: { id,customerCouponId } item: { id, customerCouponId }
} = e.currentTarget.dataset } = e.currentTarget.dataset
wx.showModal({ wx.showModal({
...@@ -276,7 +280,7 @@ Page({ ...@@ -276,7 +280,7 @@ Page({
this.setData({ this.setData({
show_confirm: false show_confirm: false
}) })
wx.showTabBar() wx.showTabBar()
// else wx.$router.back() // else wx.$router.back()
}, },
showConfirm() { showConfirm() {
...@@ -286,16 +290,19 @@ Page({ ...@@ -286,16 +290,19 @@ Page({
wx.hideTabBar() wx.hideTabBar()
}, },
jump(e) { jump(e) {
console.log(e) // console.log(e)
let { item, name } = e.currentTarget.dataset // return
let { item, name,recorderid } = e.currentTarget.dataset
wx.$router.go(name, item) wx.$router.go(name, item)
wx.$util.pointRecord(recorderid)
}, },
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad: function (options) { onLoad: function (options) {
this.setData({ this.setData({
phoneShow: app.globalData.YQorderSetting.yqPhoneConfig phoneShow: app.globalData.YQorderSetting?.yqPhoneConfig
}) })
this.getStatByPeriod() this.getStatByPeriod()
this.getiIviteRecord() this.getiIviteRecord()
...@@ -367,7 +374,7 @@ Page({ ...@@ -367,7 +374,7 @@ Page({
} }
}) })
console.log(data.list, 'list') console.log(data.list, 'list')
const userType = !userInfo.isSuper && userInfo.merchantType&&userInfo.userType == 1 const userType = !userInfo.isSuper && userInfo.merchantType && userInfo.userType == 1
list = data.list.map(item => { list = data.list.map(item => {
item.repeal = userType && [1, 2].includes(item.inviteStatus) item.repeal = userType && [1, 2].includes(item.inviteStatus)
return item return item
...@@ -470,6 +477,13 @@ Page({ ...@@ -470,6 +477,13 @@ Page({
) )
}, },
/** /**
* 监听 TabBar 切换点击
*/
onTabItemTap(item) {
console.log(item, 'item')
wx.$util.pointRecord(10)
},
/**
* 用户点击右上角分享 * 用户点击右上角分享
*/ */
onShareAppMessage: function () {} onShareAppMessage: function () {}
......
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
<view>今日预约 · <span class="txt-blue">{{inviteObj.dayInvited || 0}}</span></view> <view>今日预约 · <span class="txt-blue">{{inviteObj.dayInvited || 0}}</span></view>
<view>本周预约 · <span class="txt-blue">{{inviteObj.weekInvited || 0}}</span></view> <view>本周预约 · <span class="txt-blue">{{inviteObj.weekInvited || 0}}</span></view>
<view>超时未到店 · <span class="txt-blue">{{inviteObj.overdue || 0}}</span></view> <view>超时未到店 · <span class="txt-blue">{{inviteObj.overdue || 0}}</span></view>
<image class="icon-cal" src="/images/icon-cal.png" bindtap="jump" data-item="{}" data-name="apprManage"/> <image class="icon-cal" src="/images/icon-cal.png" bindtap="jump" data-item="{}" data-recorderId='22' data-name="apprManage"/>
</view> </view>
<block wx:if="{{flag}}"> <block wx:if="{{flag}}">
<scroll-view <scroll-view
...@@ -67,6 +67,7 @@ ...@@ -67,6 +67,7 @@
bindtouchmove="touchmove" bindtouchmove="touchmove"
bindtouchend="touchE" bindtouchend="touchE"
data-name="detail" data-name="detail"
data-recorderId='23'
data-item="{{li}}"> data-item="{{li}}">
<view class="status" style="color:{{status[li.inviteStatus].color}}"> <view class="status" style="color:{{status[li.inviteStatus].color}}">
<block>{{status[li.inviteStatus].text}}</block> <block>{{status[li.inviteStatus].text}}</block>
......
const sexList = [{ const sexList = [
confId: '1', {
confName: '男' confId: '1',
}, { confName: '男'
confId: '2', },
confName: '女' {
}] confId: '2',
confName: '女'
}
]
const age = [
{
confId: '1',
confName: '20岁以下'
},
{
confId: '2',
confName: '21-30岁'
},
{
confId: '3',
confName: '31-40岁'
},
{
confId: '4',
confName: '41-50岁'
},
{
confId: '5',
confName: '51岁以上'
}
]
const maritalStatus = [
{
confId: '1',
confName: '已婚已育'
},
{
confId: '2',
confName: '已婚未育'
},
{
confId: '3',
confName: '未婚'
}
]
const giftProduct = [
{
confId: '1',
confName: '360全包脚垫'
},
{
confId: '2',
confName: '立体脚垫'
},
{
confId: '3',
confName: '单机记录仪'
},
{
confId: '4',
confName: '4G记录仪'
},
{
confId: '5',
confName: '单机车机'
},
{
confId: '6',
confName: '联网车机'
}
]
const buyCarList = [{ const buyCarList = [
confId: '1', {
confName: '首次' confId: '1',
}, { confName: '首次'
confId: '2', },
confName: '置换' {
}, { confId: '2',
confId: '3', confName: '置换'
confName: '增购' },
}] {
confId: '3',
confName: '增购'
}
]
const purchaseList = [{ const purchaseList = [
confId: '1', {
confName: '全款' confId: '1',
}, { confName: '全款'
confId: '2', },
confName: '正常贷款' {
}, { confId: '2',
confId: '3', confName: '正常贷款'
confName: '超低首付' },
}] {
confId: '3',
confName: '超低首付'
}
]
const decisionList = [{ const decisionList = [
confId: '1', {
confName: '自己做主' confId: '1',
}, { confName: '自己做主'
confId: '2', },
confName: '听从亲友建议' {
}, { confId: '2',
confId: '3', confName: '听从亲友建议'
confName: '他人买单' },
}] {
confId: '3',
confName: '他人买单'
}
]
const promoteList = [{ const promoteList = [
confId: 'Y', {
confName: '是', confId: 'Y',
otherName: '推膜时有铺垫' confName: '是',
}, { otherName: '推膜时有铺垫'
confId: 'N', },
confName: '否', {
otherName: '推膜时未铺垫' confId: 'N',
}] confName: '否',
otherName: '推膜时未铺垫'
}
]
const satisfiedList = [{ const satisfiedList = [
confId: 'Y', {
confName: '是', confId: 'Y',
otherName: '购车上牌时客户满意' confName: '是',
}, { otherName: '购车上牌时客户满意'
confId: 'N', },
confName: '否', {
otherName: '购车上牌时客户不满' confId: 'N',
}] confName: '否',
otherName: '购车上牌时客户不满'
}
]
const timeList = [{ const timeList = [
confId: '1', {
confName: '加急安排' confId: '1',
}, { confName: '加急安排'
confId: '2', },
confName: '正常预约' {
}] confId: '2',
confName: '正常预约'
}
]
var formData = [{ var formData = [
label: '性别(单选)', {
name: 'customerSex', label: '性别(单选)',
optionList: sexList, name: 'customerSex',
optionId: 'confId', optionList: sexList,
optionLabel: 'confName',
optionsName: 'sexList'
}, {
label: '买车情况(单选)',
name: 'buyingCarDetails',
optionList: buyCarList,
optionId: 'confId', optionId: 'confId',
optionLabel: 'confName', optionLabel: 'confName',
optionsName: 'buyCarList' optionsName: 'sexList'
}, { },
label: '消费力(单选)', {
name: 'purchasingPower', label: '年龄段',
optionList: purchaseList, name: 'age',
optionList: age,
optionId: 'confId', optionId: 'confId',
optionLabel: 'confName', optionLabel: 'confName',
optionsName: 'purchaseList' optionsName: 'age'
}, { },
label: '决策力(可多选)', {
name: 'decisionMakingAbility', label: '家庭情况',
isMult: true, name: 'maritalStatus',
optionList: decisionList, optionList: maritalStatus,
optionId: 'confId', optionId: 'confId',
optionLabel: 'confName', optionLabel: 'confName',
optionsName: 'decisionList' optionsName: 'maritalStatus'
}, { },
label: '是否有做推膜铺垫', {
name: 'introductionToPromoting', label: '附赠产品(每类产品只支持选一个选项)',
optionList: promoteList, name: 'giftProductList',
isMult: true,
optionList: giftProduct,
optionId: 'confId', optionId: 'confId',
optionLabel: 'confName', optionLabel: 'confName',
optionsName: 'promoteList' optionsName: 'sexList'
}, { },
label: '客户在购车上牌环节中是否顺利愉快满意',
name: 'detailsOfSatisfaction', {
optionList: satisfiedList, label: '买车情况(单选)',
name: 'buyingCarDetails',
optionList: buyCarList,
optionId: 'confId', optionId: 'confId',
optionLabel: 'confName', optionLabel: 'confName',
optionsName: 'satisfiedList' optionsName: 'buyCarList'
}, { },
label: '贴膜时间优先级', {
name: 'filmCoatingUseTime', label: '消费力(单选)',
optionList: timeList, name: 'purchasingPower',
optionList: purchaseList,
optionId: 'confId', optionId: 'confId',
optionLabel: 'confName', optionLabel: 'confName',
optionsName: 'timeList' optionsName: 'purchaseList'
}, { }
label: '自定义信息', // ,{
name: 'additionalInformation', // label: '决策力(可多选)',
type: 'textarea', // name: 'decisionMakingAbility',
maxlength: '100', // isMult: true,
placeholder: '输入职业画像、喜好禁忌、推膜建议等客户信息,不超过100字' // optionList: decisionList,
}] // optionId: 'confId',
// optionLabel: 'confName',
// optionsName: 'decisionList'
// }, {
// label: '是否有做推膜铺垫',
// name: 'introductionToPromoting',
// optionList: promoteList,
// optionId: 'confId',
// optionLabel: 'confName',
// optionsName: 'promoteList'
// }, {
// label: '客户在购车上牌环节中是否顺利愉快满意',
// name: 'detailsOfSatisfaction',
// optionList: satisfiedList,
// optionId: 'confId',
// optionLabel: 'confName',
// optionsName: 'satisfiedList'
// }, {
// label: '贴膜时间优先级',
// name: 'filmCoatingUseTime',
// optionList: timeList,
// optionId: 'confId',
// optionLabel: 'confName',
// optionsName: 'timeList'
// }, {
// label: '自定义信息',
// name: 'additionalInformation',
// type: 'textarea',
// maxlength: '100',
// placeholder: '输入职业画像、喜好禁忌、推膜建议等客户信息,不超过100字'
// }
]
export default { export default {
sexList, sexList,
age,
maritalStatus,
giftProduct,
buyCarList, buyCarList,
purchaseList, purchaseList,
decisionList, decisionList,
...@@ -134,4 +254,4 @@ export default { ...@@ -134,4 +254,4 @@ export default {
satisfiedList, satisfiedList,
timeList, timeList,
formData formData
}
\ No newline at end of file \ No newline at end of file
}
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
import CONSTANTDATA from './constant/data' import CONSTANTDATA from './constant/data'
import api from '../../api' import api from '../../api'
Page({ Page({
/** /**
* 页面的初始数据 * 页面的初始数据
*/ */
...@@ -11,7 +10,8 @@ Page({ ...@@ -11,7 +10,8 @@ Page({
formData: CONSTANTDATA.formData, formData: CONSTANTDATA.formData,
detailForm: { detailForm: {
additionalInformation: '' additionalInformation: ''
} },
customerSex:1
}, },
click(e) { click(e) {
let { pidx, idx } = e.currentTarget.dataset let { pidx, idx } = e.currentTarget.dataset
...@@ -23,8 +23,17 @@ Page({ ...@@ -23,8 +23,17 @@ Page({
[`formData[${pidx}].optionList`]: JSON.parse(JSON.stringify(CONSTANTDATA[_item.optionsName])) [`formData[${pidx}].optionList`]: JSON.parse(JSON.stringify(CONSTANTDATA[_item.optionsName]))
}) })
} }
// 赙赠产品 每类只能二选一
if (_item.name == 'giftProductList' ) {
const noActiveIdx = idx % 2 == 0? idx+1:idx-1
this.setData({
[`formData[${pidx}].optionList[${noActiveIdx}].active`]:false
})
}
this.setData({ this.setData({
[`formData[${pidx}].optionList[${idx}].active`]: (_item.name == 'customerSex' || _item.isMult) ? !this.data.formData[pidx].optionList[idx].active : !_active [`formData[${pidx}].optionList[${idx}].active`]: _item.name == 'customerSex' || _item.isMult ? !this.data.formData[pidx].optionList[idx].active : !_active
}) })
}, },
...@@ -36,27 +45,29 @@ Page({ ...@@ -36,27 +45,29 @@ Page({
}) })
}, },
recoverPortrait(info) { async recoverPortrait(id) {
let {code,data:info} = await api.portraitQuery({id})
console.log(info);
if (code!= 0 ) return
let { formData } = this.data let { formData } = this.data
formData.forEach(item => { formData.forEach(item => {
if (info[item.name]) { if (info[item.name]) {
if (item.type == 'textarea') {
this.setData({
['detailForm.' + item.name]: info[item.name]
})
} else {
if (item.isMult) { if (item.isMult) {
let _list = info[item.name].split(',') console.log(item.name,info[item.name],'info[item.name]');
// let _list = info[item.name].split(',')
let _list = info[item.name]
_list.forEach(n => { _list.forEach(n => {
item.optionList.find(k => k.confId == n).active = true item.optionList.find(k => k.confId == n).active = true
}) })
} else { } else {
item.optionList.find(k => k.confId == info[item.name]).active = true item.optionList.find(k => k.confId == info[item.name]).active = true
} }
} // }
} else { } else {
if (item.name == 'customerSex') { if (item.name == 'customerSex') {
item.optionList.find(k => k.confId == '1').active = true let {customerSex} = this.data
item.optionList.find(k => k.confId == customerSex).active = true
} }
} }
}) })
...@@ -65,19 +76,34 @@ Page({ ...@@ -65,19 +76,34 @@ Page({
}) })
}, },
reset() { }, reset() {
let {formData} = this.data
formData.forEach(item => {
// console.log(item?.optionList,'item?.optionList');
// if(item.isMult) params[item.name] = []
if (item.name!='customerSex') {
item?.optionList?.forEach(subItem => {
subItem.active = false
})
}
})
console.log(formData,'formData');
this.setData({
formData
})
},
dealParam() { dealParam() {
let { formData } = this.data let { formData } = this.data
let params = {} let params = {}
formData.forEach(item => { formData.forEach(item => {
// console.log(item?.optionList,'item?.optionList');
if(item.isMult) params[item.name] = []
item?.optionList?.forEach(subItem => { item?.optionList?.forEach(subItem => {
if (subItem.active) { if (subItem.active) {
if (item.isMult) { item.isMult? params[item.name].push(subItem.confId):( params[item.name] = subItem.confId)
params[item.name] = params[item.name] ? params[item.name] + ',' + subItem.confId : subItem.confId
} else {
params[item.name] = subItem.confId
}
} }
}) })
}) })
...@@ -85,14 +111,15 @@ Page({ ...@@ -85,14 +111,15 @@ Page({
}, },
confirm() { confirm() {
let { detail, detailForm } = this.data let { customerId } = this.data
let params = { let params = {
...this.dealParam(), ...this.dealParam(),
...detailForm, customerId
id: detail.customerId
} }
wx.$util.showLoading()
api.updateProfile(params).then(res => { api.updateProfile(params).then(res => {
let { code, data, message } = res let { code, data, message } = res
wx.hideLoading()
if (code == '0') { if (code == '0') {
wx.$util.showToast('编辑成功') wx.$util.showToast('编辑成功')
wx.$refresh = true wx.$refresh = true
...@@ -107,65 +134,66 @@ Page({ ...@@ -107,65 +134,66 @@ Page({
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad(options) { onLoad(options) {
wx.$router.getData(res => { // wx.$router.getData(res => {
res = { // res = {
...res.customerCoupon, // ...res.customerCoupon,
...res.customer, // ...res.customer,
...res // ...res
} // }
this.setData({ // this.setData({
detail: res // detail: res
// })
// console.log(res, 'res')
// this.recoverPortrait(this.data.detail)
// })
},
onRoute(options) {
console.log(options);
const {customerId,customer} = options
// let detail = {
// ...options.customerCoupon,
// ...options.customer,
// ...options
// }
this.setData({
customerId,
customerSex:customer?.customerSex||1
}) })
this.recoverPortrait(this.data.detail) console.log(customerId, 'customerId')
}) this.recoverPortrait(customerId)
}, },
/** /**
* 生命周期函数--监听页面初次渲染完成 * 生命周期函数--监听页面初次渲染完成
*/ */
onReady() { onReady() {},
},
/** /**
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
*/ */
onShow() { onShow() {},
},
/** /**
* 生命周期函数--监听页面隐藏 * 生命周期函数--监听页面隐藏
*/ */
onHide() { onHide() {},
},
/** /**
* 生命周期函数--监听页面卸载 * 生命周期函数--监听页面卸载
*/ */
onUnload() { onUnload() {},
},
/** /**
* 页面相关事件处理函数--监听用户下拉动作 * 页面相关事件处理函数--监听用户下拉动作
*/ */
onPullDownRefresh() { onPullDownRefresh() {},
},
/** /**
* 页面上拉触底事件的处理函数 * 页面上拉触底事件的处理函数
*/ */
onReachBottom() { onReachBottom() {},
},
/** /**
* 用户点击右上角分享 * 用户点击右上角分享
*/ */
onShareAppMessage() {
}
})
\ No newline at end of file \ No newline at end of file
onShareAppMessage() {}
})
...@@ -12,9 +12,14 @@ ...@@ -12,9 +12,14 @@
.user-portrait .check-block { .user-portrait .check-block {
display: flex; display: flex;
flex-wrap: wrap;
margin: 24rpx 0 62rpx; margin: 24rpx 0 62rpx;
} }
.check-box:nth-child(n+4) {
margin-top: 10rpx;
}
.user-portrait .check-box { .user-portrait .check-box {
position: relative; position: relative;
box-sizing: border-box; box-sizing: border-box;
......
...@@ -2,12 +2,8 @@ ...@@ -2,12 +2,8 @@
import mixins from './index_mixins' import mixins from './index_mixins'
import api from '../../api.js' import api from '../../api.js'
import NP from 'number-precision' import NP from 'number-precision'
import { import { env } from '~/config'
env import { getYQInfo } from '~/store/index'
} from '~/config'
import {
getYQInfo
} from '~/store/index'
const app = getApp() const app = getApp()
let time = null let time = null
Page({ Page({
...@@ -49,9 +45,7 @@ Page({ ...@@ -49,9 +45,7 @@ Page({
}, },
navigator(e) { navigator(e) {
console.log(e) console.log(e)
let { let { outTradeNo } = e.detail
outTradeNo
} = e.detail
this.closeSwitchPopup() this.closeSwitchPopup()
outTradeNo && outTradeNo &&
wx.$router.go('tabWorkOrder.additionRecordOrder', { wx.$router.go('tabWorkOrder.additionRecordOrder', {
...@@ -59,12 +53,8 @@ Page({ ...@@ -59,12 +53,8 @@ Page({
}) })
}, },
remarkConfirm(e) { remarkConfirm(e) {
let { let { methodUpdateInfo } = this.data
methodUpdateInfo let { detail: filmTimes } = e
} = this.data
let {
detail: filmTimes
} = e
methodUpdateInfo.filmTimes = filmTimes methodUpdateInfo.filmTimes = filmTimes
api api
.updateCouponDayReport(methodUpdateInfo) .updateCouponDayReport(methodUpdateInfo)
...@@ -88,16 +78,8 @@ Page({ ...@@ -88,16 +78,8 @@ Page({
}) })
}, },
changeTableData(e) { changeTableData(e) {
let { let { startDate, maxDate, isYqdSuper } = this.data
startDate, let { merchantId, filmTimes, merchantName } = e.currentTarget.dataset.item
maxDate,
isYqdSuper
} = this.data
let {
merchantId,
filmTimes,
merchantName
} = e.currentTarget.dataset.item
// 不是管理员不开启这个权限 // 不是管理员不开启这个权限
if (!isYqdSuper) return if (!isYqdSuper) return
if (startDate != maxDate) { if (startDate != maxDate) {
...@@ -143,12 +125,8 @@ Page({ ...@@ -143,12 +125,8 @@ Page({
}) })
}, },
changePicker(e) { changePicker(e) {
let { let { value } = e.detail
value let { merchantId } = this.data.merchantRange[value]
} = e.detail
let {
merchantId
} = this.data.merchantRange[value]
// 修改对应下标显示 // 修改对应下标显示
app.globalData.yqdInfo.subIndex = value app.globalData.yqdInfo.subIndex = value
let obj = {} let obj = {}
...@@ -156,11 +134,7 @@ Page({ ...@@ -156,11 +134,7 @@ Page({
wx.$util.showLoading('加载中...') wx.$util.showLoading('加载中...')
api.swtichSubLoginInfo(obj).then(res => { api.swtichSubLoginInfo(obj).then(res => {
console.log(res) console.log(res)
let { let { code, data, message } = res
code,
data,
message
} = res
if (code == 0) { if (code == 0) {
let userInfo = wx.$util.getUserInfo() let userInfo = wx.$util.getUserInfo()
userInfo.subLoginUser = data.subLoginUser userInfo.subLoginUser = data.subLoginUser
...@@ -173,21 +147,14 @@ Page({ ...@@ -173,21 +147,14 @@ Page({
this.tapPicker() this.tapPicker()
}, },
jump(e) { jump(e) {
let { let { item, type } = e.currentTarget.dataset
item, let { userInfo } = this.data
type
} = e.currentTarget.dataset
let {
userInfo
} = this.data
// 判断是不是门店员工 // 判断是不是门店员工
if (userInfo.merchantType && !userInfo.isSuper && type == 2) { if (userInfo.merchantType && !userInfo.isSuper && type == 2) {
if (item.type == 'scanCode') { if (item.type == 'scanCode') {
wx.scanCode({ wx.scanCode({
success(res) { success(res) {
let { let { result } = res
result
} = res
console.log(result) console.log(result)
wx.$router.go('tabWorkOrder.createOrder', { wx.$router.go('tabWorkOrder.createOrder', {
scene: result scene: result
...@@ -208,9 +175,7 @@ Page({ ...@@ -208,9 +175,7 @@ Page({
}, },
changeDate(e) { changeDate(e) {
// console.log(e) // console.log(e)
let { let { name } = e.currentTarget.dataset
name
} = e.currentTarget.dataset
let data = new Date(), let data = new Date(),
value = name == 'today' ? 0 : 1, value = name == 'today' ? 0 : 1,
startDate, startDate,
...@@ -229,9 +194,7 @@ Page({ ...@@ -229,9 +194,7 @@ Page({
// endDate = today.format('yyyy-MM-dd') // endDate = today.format('yyyy-MM-dd')
} }
let { let { tableBtn } = this.data
tableBtn
} = this.data
this.setData({ this.setData({
startDate, startDate,
endDate endDate
...@@ -247,14 +210,9 @@ Page({ ...@@ -247,14 +210,9 @@ Page({
}) })
}, },
monthSelect(e) { monthSelect(e) {
let { let { date } = e.detail
date
} = e.detail
// let {date} = this.data // let {date} = this.data
let { let { label, date: selectDate } = date
label,
date: selectDate
} = date
// let [year, month] = selectDate.split('-') // let [year, month] = selectDate.split('-')
// const endDate = new Date(year, month, 0).format('yyyy-MM-dd') // const endDate = new Date(year, month, 0).format('yyyy-MM-dd')
this.setData({ this.setData({
...@@ -265,25 +223,20 @@ Page({ ...@@ -265,25 +223,20 @@ Page({
// ['dateObj.endDateStr']: endDate // ['dateObj.endDateStr']: endDate
}) })
let { let {
subIndex, // subIndex,
merchantRange merchantRange
} = this.data } = this.data
this.getOutputValue({ this.getOutputValue({
subIndex, // subIndex,
merchantRange merchantRange
}) })
// console.log(date) // console.log(date)
}, },
rangeSelect(e) { rangeSelect(e) {
// console.log(e) // console.log(e)
let { tableBtn } = this.data
let { let {
tableBtn date: { start, end }
} = this.data
let {
date: {
start,
end
}
} = e.detail } = e.detail
this.setData({ this.setData({
startDate: start, startDate: start,
...@@ -305,14 +258,9 @@ Page({ ...@@ -305,14 +258,9 @@ Page({
}) })
}, },
changeTableSort(e) { changeTableSort(e) {
let { let { index } = e.currentTarget.dataset
index
} = e.currentTarget.dataset
console.log(index) console.log(index)
let { let { tableSort, tableObj } = this.data
tableSort,
tableObj
} = this.data
if (tableSort == index) { if (tableSort == index) {
tableObj[index].sort = !tableObj[index].sort tableObj[index].sort = !tableObj[index].sort
} else { } else {
...@@ -325,14 +273,8 @@ Page({ ...@@ -325,14 +273,8 @@ Page({
this.sortTable(tableObj) this.sortTable(tableObj)
}, },
sortTable(tableObj) { sortTable(tableObj) {
let { let { tableSort, table } = this.data
tableSort, let { key, sort } = tableObj[tableSort]
table
} = this.data
let {
key,
sort
} = tableObj[tableSort]
const objectArraySort = keyName => { const objectArraySort = keyName => {
return (objectN, objectM) => { return (objectN, objectM) => {
const valueN = objectN[keyName] const valueN = objectN[keyName]
...@@ -358,30 +300,25 @@ Page({ ...@@ -358,30 +300,25 @@ Page({
}, },
// 10s轮询一次待补录 // 10s轮询一次待补录
getWaitOrder() { getWaitOrder() {
let { let { isStaff } = this.data
isStaff
} = this.data
// console.log('isStaff', isStaff) // console.log('isStaff', isStaff)
// let thisPage = wx.$router.getPageInstance() // let thisPage = wx.$router.getPageInstance()
// console.log(thisPage.route, ' thisPage.route') // console.log(thisPage.route, ' thisPage.route')
// thisPage.route == 'tabIndex/pages/index/index' && // thisPage.route == 'tabIndex/pages/index/index' &&
isStaff && isStaff &&
api api
.waitinputorder() .waitinputorder()
.then(result => { .then(result => {
// console.log(result) // console.log(result)
let { let { code, data } = result
code, this.setTime()
data if (code == 0) {
} = result this.setData({
this.setTime() waitInputCount: data.waitInputCount
if (code == 0) { })
this.setData({ }
waitInputCount: data.waitInputCount })
}) .catch(err => {})
}
})
.catch(err => {})
}, },
// getPageData() { // getPageData() {
...@@ -403,15 +340,7 @@ Page({ ...@@ -403,15 +340,7 @@ Page({
// this.getMerchantCouponList() // this.getMerchantCouponList()
// }, // },
getMerchantCouponList() { getMerchantCouponList() {
let { let { orderByTypeEnum, tableSort, tableObj, startDate, endDate, totalTableSum, tableWidth } = this.data
orderByTypeEnum,
tableSort,
tableObj,
startDate,
endDate,
totalTableSum,
tableWidth
} = this.data
let target = tableObj[tableSort].sort let target = tableObj[tableSort].sort
let orderByType = orderByTypeEnum[target][tableSort] let orderByType = orderByTypeEnum[target][tableSort]
api api
...@@ -422,11 +351,7 @@ Page({ ...@@ -422,11 +351,7 @@ Page({
}) })
.then(res => { .then(res => {
console.log(res) console.log(res)
let { let { code, message, data } = res
code,
message,
data
} = res
let table = [] let table = []
if (code == 0) { if (code == 0) {
table = data?.page?.list || [] table = data?.page?.list || []
...@@ -447,7 +372,7 @@ Page({ ...@@ -447,7 +372,7 @@ Page({
}) })
// 处理列表宽度问题 // 处理列表宽度问题
tableWidth = 118 * 5 + 232 + 30 + sumWidth tableWidth = 118 * 5 + 232 + 30 + sumWidth
console.log(table, 'table'); console.log(table, 'table')
this.setData({ this.setData({
tableFlag: true, tableFlag: true,
table, table,
...@@ -471,15 +396,10 @@ Page({ ...@@ -471,15 +396,10 @@ Page({
} }
}, },
getOutputValue(yqdInfo) { getOutputValue(yqdInfo) {
let { let { dateObj, userInfo } = this.data
dateObj, console.log(yqdInfo, 'yqdInfo')
userInfo let { subIndex, merchantRange } = yqdInfo
} = this.data // yqMerchantId 不是全部就必要要带过去
let {
subIndex,
merchantRange
} = yqdInfo
// let { userInfo } = this.data
// 1-超管 2-商户管理员 3-区域督导 4-驻店人员 // 1-超管 2-商户管理员 3-区域督导 4-驻店人员
const yqMerchantId = merchantRange[subIndex].merchantId || '' const yqMerchantId = merchantRange[subIndex].merchantId || ''
const loginRole = userInfo.subLoginUser.loginRole const loginRole = userInfo.subLoginUser.loginRole
...@@ -499,10 +419,7 @@ Page({ ...@@ -499,10 +419,7 @@ Page({
.goodsOrderOutputValueBelong(params) .goodsOrderOutputValueBelong(params)
.then(result => { .then(result => {
console.log(result, 'result') console.log(result, 'result')
let { let { code, data } = result
code,
data
} = result
if (code == 0) { if (code == 0) {
let rateValue = NP.divide(data?.totalOutputValue || 0, data?.totalTargetOutputValue || 0) let rateValue = NP.divide(data?.totalOutputValue || 0, data?.totalTargetOutputValue || 0)
rateValue = NP.times(rateValue, 100) rateValue = NP.times(rateValue, 100)
...@@ -545,10 +462,7 @@ Page({ ...@@ -545,10 +462,7 @@ Page({
.userStat({}) .userStat({})
.then(result => { .then(result => {
// console.log(result, 'result') // console.log(result, 'result')
let { let { code, data } = result
code,
data
} = result
if (code == 0) { if (code == 0) {
this.setData({ this.setData({
userStat: data userStat: data
...@@ -558,12 +472,11 @@ Page({ ...@@ -558,12 +472,11 @@ Page({
.catch(err => {}) .catch(err => {})
}, },
totalListSet() { totalListSet() {
let { let { userInfo } = this.data
userInfo
} = this.data
if (userInfo.loginRole == 3 || userInfo.isSuper) { if (userInfo.loginRole == 3 || userInfo.isSuper) {
this.setData({ this.setData({
totalList: [{ totalList: [
{
name: '转化订单', name: '转化订单',
itemName: 'totalUpgrade', itemName: 'totalUpgrade',
index: 4 index: 4
...@@ -685,28 +598,27 @@ Page({ ...@@ -685,28 +598,27 @@ Page({
break break
} }
// 判断是不是特殊账号 // 判断是不是特殊账号
let { let { menu, userInfo } = this.data
menu, const isNoStaff = userInfo.loginRole != 4 && userInfo.loginRole != null
userInfo
} = this.data
const isNoStaff = userInfo.loginRole!=4 && userInfo.loginRole!= null
// 不是员工类型 // 不是员工类型
if (isNoStaff) { if (isNoStaff) {
menu = [ menu = [
{ {
name: '预约管理', name: '预约管理',
url: 'tabDate.index' url: 'tabDate.index',
recordId: 8
}, },
{ {
name: '经营数据', name: '经营数据',
url: 'tabOperating.index' url: 'tabOperating.index',
}, recordId: 11
}
] ]
} }
if (checklist.includes(userInfo?.accountName)) { if (checklist.includes(userInfo?.accountName)) {
menu = menu.filter(e => e.name != '预约管理') menu = menu.filter(e => e.name != '预约管理')
} }
this.setData({ this.setData({
menu, menu,
isNoStaff isNoStaff
...@@ -772,9 +684,11 @@ Page({ ...@@ -772,9 +684,11 @@ Page({
* 页面上拉触底事件的处理函数 * 页面上拉触底事件的处理函数
*/ */
onReachBottom: function () {}, onReachBottom: function () {},
// onTabItemTap(item) {
// console.log(item, 'item')
// },
/** /**
* 用户点击右上角分享 * 用户点击右上角分享
*/ */
onShareAppMessage: function () {} onShareAppMessage: function () {}
})
\ No newline at end of file \ No newline at end of file
})
...@@ -5,25 +5,30 @@ export default { ...@@ -5,25 +5,30 @@ export default {
menu: [ menu: [
{ {
name: '新建工单', name: '新建工单',
url: 'tabWorkOrder.createOrder' url: 'tabWorkOrder.createOrder',
recordId: 6
}, },
{ {
name: '扫码下单', name: '扫码下单',
url: 'tabWorkOrder.createOrder', url: 'tabWorkOrder.createOrder',
type: 'scanCode' type: 'scanCode',
recordId: 7
}, },
{ {
name: '预约管理', name: '预约管理',
url: 'tabDate.index' url: 'tabDate.index',
recordId: 9
}, },
{ {
name: '经营数据', name: '经营数据',
url: 'tabOperating.index' url: 'tabOperating.index',
recordId: 11
}, },
{ {
name: '客户建档', name: '客户建档',
// name: '战败下单', // name: '战败下单',
url: 'tabWorkOrder.createArchives' url: 'tabWorkOrder.createArchives',
recordId: 8
} }
], ],
totalTableSum: [ totalTableSum: [
......
...@@ -16,17 +16,20 @@ Page({ ...@@ -16,17 +16,20 @@ Page({
{ {
name: '营业概况', name: '营业概况',
active: true, active: true,
componentsName: 'businessCell' componentsName: 'businessCell',
recordId:12
}, },
{ {
name: '员工业绩', name: '员工业绩',
active: false, active: false,
componentsName: 'staffCell' componentsName: 'staffCell',
recordId:13
}, },
{ {
name: '今日战果', name: '今日战果',
active: false, active: false,
componentsName: 'conquestCell' componentsName: 'conquestCell',
recordId:14
} }
], ],
dateObj: { dateObj: {
...@@ -189,10 +192,12 @@ Page({ ...@@ -189,10 +192,12 @@ Page({
} else { } else {
this.setTimeList(dateObj.nextDay) this.setTimeList(dateObj.nextDay)
} }
wx.$util.pointRecord(type == 'before'?16:17)
this.calendar.resetData(type == 'before' ? dateObj.beforeDay : dateObj.nextDay) this.calendar.resetData(type == 'before' ? dateObj.beforeDay : dateObj.nextDay)
}, },
// 获取选中天数 // 获取选中天数
rangeSelect(e) { rangeSelect(e) {
wx.$util.pointRecord(15)
console.log(e.detail) console.log(e.detail)
let { date } = e.detail let { date } = e.detail
this.setTimeList(date) this.setTimeList(date)
...@@ -223,6 +228,7 @@ Page({ ...@@ -223,6 +228,7 @@ Page({
tabList, tabList,
activeTab activeTab
}) })
wx.$util.pointRecord(tabList[index].recordId)
}, },
closePop() { closePop() {
this.components = this.selectComponent('#businessCell') this.components = this.selectComponent('#businessCell')
......
...@@ -3,11 +3,13 @@ export default { ...@@ -3,11 +3,13 @@ export default {
menu: [ menu: [
{ {
name: '累计营收', name: '累计营收',
url: 'tabOperating.operatingShow' url: 'tabOperating.operatingShow',
recordId:18
}, },
{ {
name: '门店概况', name: '门店概况',
url: 'tabOperating.4sOverview' url: 'tabOperating.4sOverview',
recordId:29
}, },
{ {
name: '商品排行', name: '商品排行',
...@@ -55,6 +57,7 @@ export default { ...@@ -55,6 +57,7 @@ export default {
} else { } else {
console.log(item.url) console.log(item.url)
wx.$router.go(item.url) wx.$router.go(item.url)
item.recordId&&wx.$util.pointRecord(item.recordId)
} }
// 暂未上线,敬请期待 // 暂未上线,敬请期待
}, },
......
...@@ -219,7 +219,7 @@ Page({ ...@@ -219,7 +219,7 @@ Page({
// this.getDetail(options.orderCode) // this.getDetail(options.orderCode)
// } // }
if (time) clearInterval(time) if (time) clearInterval(time)
this.checkPhoneShow(app.globalData.YQorderSetting.yqPhoneConfig) this.checkPhoneShow(app.globalData.YQorderSetting?.yqPhoneConfig)
// wx.$util.setWebSocket() // wx.$util.setWebSocket()
setWebSocket() setWebSocket()
}, },
...@@ -283,7 +283,7 @@ Page({ ...@@ -283,7 +283,7 @@ Page({
// 校验是否显示二级流量方 // 校验是否显示二级流量方
if (data.subShopMerchantName) { if (data.subShopMerchantName) {
let { customerObj } = this.data let { customerObj } = this.data
if(customerObj.findIndex(val => val.key == 'subShopMerchantName') < 0) { if(customerObj.findIndex(val =>val?.key && val.key == 'subShopMerchantName') < 0) {
customerObj[customerObj.length - 2] = { customerObj[customerObj.length - 2] = {
label: '二级流量方:', label: '二级流量方:',
key: 'subShopMerchantName' key: 'subShopMerchantName'
...@@ -317,7 +317,7 @@ Page({ ...@@ -317,7 +317,7 @@ Page({
isArtificer(data) { isArtificer(data) {
let { customerObj, orderInfo } = this.data let { customerObj, orderInfo } = this.data
orderInfo.isOpenArtificer = true orderInfo.isOpenArtificer = true
if(customerObj.findIndex(val => val.key == 'technicianName') < 0) { if(customerObj.findIndex(val =>val?.key && val.key == 'technicianName') < 0) {
customerObj[customerObj.length] = { customerObj[customerObj.length] = {
label: '选择技师:', label: '选择技师:',
key: 'technicianName', key: 'technicianName',
......
...@@ -92,7 +92,8 @@ ...@@ -92,7 +92,8 @@
<!-- setDateSelect --> <!-- setDateSelect -->
<block wx:if="{{item.copy}}"> <block wx:if="{{item.copy}}">
<view class="copy" bindtap="setCopyData" data-content="{{orderInfo[item.key]}}"> <view class="copy" bindtap="setCopyData" data-content="{{orderInfo[item.key]}}">
复制 <!-- 复制 -->
<image src="../../images/copyIcon.png" class="copyImage" binderror="" bindload=""></image>
</view> </view>
</block> </block>
<!-- 超管不能进入创建工单页面 --> <!-- 超管不能进入创建工单页面 -->
...@@ -134,7 +135,8 @@ ...@@ -134,7 +135,8 @@
</block> </block>
<block wx:if="{{item.copy}}"> <block wx:if="{{item.copy}}">
<view class="copy" catchtap="setCopyData" data-content="{{orderInfo[item.key]}}"> <view class="copy" catchtap="setCopyData" data-content="{{orderInfo[item.key]}}">
复制 <!-- 复制 -->
<image src="../../images/copyIcon.png" class="copyImage" binderror="" bindload=""></image>
</view> </view>
</block> </block>
<block wx:if="{{item.type == 'select'}}"> <block wx:if="{{item.type == 'select'}}">
......
...@@ -26,6 +26,9 @@ Page({ ...@@ -26,6 +26,9 @@ Page({
showRatingPopup: !this.data.showRatingPopup showRatingPopup: !this.data.showRatingPopup
}) })
}, },
jumpUserPortrait (){
wx.$router.go('tabDate.userPortrait', this.data.orderInfo)
},
// 跳转正确订单 // 跳转正确订单
redirectOrder() { redirectOrder() {
let { orderInfo } = this.data let { orderInfo } = this.data
...@@ -133,7 +136,7 @@ Page({ ...@@ -133,7 +136,7 @@ Page({
this.getOrderDetail(options.orderCode) this.getOrderDetail(options.orderCode)
} }
let o = wx.$util.getStorageSync('dj_boutique_user_info') let o = wx.$util.getStorageSync('dj_boutique_user_info')
this.checkPhoneShow(app.globalData.YQorderSetting.yqPhoneConfig) this.checkPhoneShow(app.globalData.YQorderSetting?.yqPhoneConfig)
this.setData({ this.setData({
userInfo: o, userInfo: o,
isYqdSuper: app.globalData.isYqdSuper, isYqdSuper: app.globalData.isYqdSuper,
...@@ -217,7 +220,7 @@ Page({ ...@@ -217,7 +220,7 @@ Page({
// 校验是否显示二级流量方 // 校验是否显示二级流量方
if (data.subShopMerchantName) { if (data.subShopMerchantName) {
let { customerObj } = this.data let { customerObj } = this.data
if (customerObj.findIndex(val => val.key == 'subShopMerchantName') < 0) { if (customerObj.findIndex(val =>val?.key && val.key == 'subShopMerchantName') < 0) {
customerObj[customerObj.length - 2] = { customerObj[customerObj.length - 2] = {
label: '二级流量方:', label: '二级流量方:',
key: 'subShopMerchantName' key: 'subShopMerchantName'
...@@ -251,7 +254,7 @@ Page({ ...@@ -251,7 +254,7 @@ Page({
isArtificer(data) { isArtificer(data) {
let { customerObj, orderInfo } = this.data let { customerObj, orderInfo } = this.data
orderInfo.isOpenArtificer = true orderInfo.isOpenArtificer = true
if (customerObj.findIndex(val => val.key == 'technicianName') < 0) { if (customerObj.findIndex(val => val?.key && val.key == 'technicianName') < 0) {
customerObj[customerObj.length] = { customerObj[customerObj.length] = {
label: '选择技师:', label: '选择技师:',
key: 'technicianName' key: 'technicianName'
......
...@@ -91,7 +91,8 @@ ...@@ -91,7 +91,8 @@
</block> </block>
<block wx:if="{{item.copy}}"> <block wx:if="{{item.copy}}">
<view class="copy" bindtap="setCopyData" data-content="{{orderInfo[item.key]}}"> <view class="copy" bindtap="setCopyData" data-content="{{orderInfo[item.key]}}">
复制 <!-- 复制 -->
<image src="../../images/copyIcon.png" class="copyImage" binderror="" bindload=""></image>
</view> </view>
</block> </block>
</view> </view>
...@@ -111,9 +112,10 @@ ...@@ -111,9 +112,10 @@
</view> </view>
</view> </view>
<view class="box customer"> <view class="box customer">
<view class="title"> <view class="title userTitle">
<text>客户信息</text> <view>客户信息</view>
<text wx:if="{{isYqdSuper||isStaff}}" bindtap="jumpUpdate" class="updateInfo">修改客户信息</text> <view bindtap="jumpUserPortrait" class="updateInfo icon"><image src="../../images/userImageIcon.png" class="iconImage" ></image>画像</view>
<view wx:if="{{isYqdSuper||isStaff}}" bindtap="jumpUpdate" class="updateInfo "><image src="../../images/editIcon.png" class="iconImage" ></image>客户信息</view>
</view> </view>
<block wx:for="{{customerObj}}" wx:key="index"> <block wx:for="{{customerObj}}" wx:key="index">
<view class="cell"> <view class="cell">
...@@ -142,7 +144,8 @@ ...@@ -142,7 +144,8 @@
</block> </block>
<block wx:if="{{item.copy}}"> <block wx:if="{{item.copy}}">
<view class="copy" catchtap="setCopyData" data-content="{{orderInfo[item.key]}}"> <view class="copy" catchtap="setCopyData" data-content="{{orderInfo[item.key]}}">
复制 <!-- 复制 -->
<image src="../../images/copyIcon.png" class="copyImage" binderror="" bindload=""></image>
</view> </view>
</block> </block>
</view> </view>
......
...@@ -242,7 +242,21 @@ page { ...@@ -242,7 +242,21 @@ page {
font-weight: 700; font-weight: 700;
margin-left: auto; margin-left: auto;
} }
.copyImage, .iconImage {
width: 36rpx;
height: 36rpx;
/* vertical-align: bottom; */
vertical-align: middle;
}
.iconImage{
margin-right: 5rpx;
}
.customer .userTitle {
justify-content:start;
}
.userTitle .icon {
margin-right: auto;
}
.box .cell .copy { .box .cell .copy {
color: #3582EE; color: #3582EE;
margin-left: auto; margin-left: auto;
...@@ -509,6 +523,7 @@ page { ...@@ -509,6 +523,7 @@ page {
} }
.customer .title { .customer .title {
box-sizing: border-box;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
...@@ -517,6 +532,8 @@ page { ...@@ -517,6 +532,8 @@ page {
.customer .updateInfo { .customer .updateInfo {
color: #3582EE; color: #3582EE;
font-size: 28rpx; font-size: 28rpx;
margin-left: 16rpx;
margin-top: 3rpx;
} }
......
...@@ -321,6 +321,7 @@ Page({ ...@@ -321,6 +321,7 @@ Page({
// 预录建档跳转到预约列表 // 预录建档跳转到预约列表
wx.$refresh = true wx.$refresh = true
wx.$router.redirectTo('tabDate.index') wx.$router.redirectTo('tabDate.index')
wx.$util.pointRecord(30)
} else { } else {
wx.$router.back(page => { wx.$router.back(page => {
page.search && page.search() page.search && page.search()
...@@ -494,7 +495,7 @@ Page({ ...@@ -494,7 +495,7 @@ Page({
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad: function (options) { onLoad: function (options) {
// console.log(app.globalData.YQorderSetting, 'app.globalData.YQorderSetting.yqPhoneConfig') // console.log(app.globalData.YQorderSetting, 'app.globalData.YQorderSetting?.yqPhoneConfig')
console.log(options) console.log(options)
if (options.scene) { if (options.scene) {
this.setData(options) this.setData(options)
......
...@@ -368,6 +368,7 @@ Page({ ...@@ -368,6 +368,7 @@ Page({
wx.setNavigationBarTitle({ wx.setNavigationBarTitle({
title: data.type == 'standNo' ? '车架号识别' : '车牌识别' title: data.type == 'standNo' ? '车架号识别' : '车牌识别'
}) })
wx.$util.pointRecord(data.type == 'standNo'?20:21)
} }
// // 在组件实例进入页面节点树时执行 // // 在组件实例进入页面节点树时执行
var that = this var that = this
......
/* tabWorkOrder/pages/ocr/ocr.wxss */
\ No newline at end of file \ No newline at end of file
...@@ -11,13 +11,16 @@ Page({ ...@@ -11,13 +11,16 @@ Page({
showTips: true, showTips: true,
isYqdSuper: app.globalData.isYqdSuper, isYqdSuper: app.globalData.isYqdSuper,
isStaff: app.globalData.isStaff, isStaff: app.globalData.isStaff,
isShowPhone: app.globalData.YQorderSetting.yqPhoneConfig, isShowPhone: app.globalData.YQorderSetting?.yqPhoneConfig,
customerService: '', customerService: '',
defaultCustomerService: 'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/kf.png', defaultCustomerService: 'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/kf.png',
failCustomerService: '../images/kfrefresh.png', failCustomerService: '../images/kfrefresh.png',
warrantyCardVisible: true, warrantyCardVisible: true,
signatureSwitch: false //不需要走签名逻辑 没有开启签名功能或则是战败订单 signatureSwitch: false //不需要走签名逻辑 没有开启签名功能或则是战败订单
}, },
jumpUserPortrait (){
wx.$router.go('tabDate.userPortrait', this.data.orderInfo)
},
navOrderSignature() { navOrderSignature() {
let { orderInfo } = this.data let { orderInfo } = this.data
wx.$router.redirectTo('orderSignature', orderInfo) wx.$router.redirectTo('orderSignature', orderInfo)
...@@ -104,7 +107,7 @@ Page({ ...@@ -104,7 +107,7 @@ Page({
let o = wx.$util.getStorageSync('dj_boutique_user_info') let o = wx.$util.getStorageSync('dj_boutique_user_info')
this.checkPhoneShow(app.globalData.YQorderSetting.yqPhoneConfig) this.checkPhoneShow(app.globalData.YQorderSetting?.yqPhoneConfig)
this.setData({ this.setData({
isYqdSuper: app.globalData.isYqdSuper, isYqdSuper: app.globalData.isYqdSuper,
...@@ -184,7 +187,7 @@ Page({ ...@@ -184,7 +187,7 @@ Page({
// 校验是否显示二级流量方 // 校验是否显示二级流量方
if (data.subShopMerchantName) { if (data.subShopMerchantName) {
let { customerObj } = this.data let { customerObj } = this.data
if (customerObj.findIndex(val => val.key == 'subShopMerchantName') < 0) { if (customerObj.findIndex(val => val?.key &&val.key == 'subShopMerchantName') < 0) {
customerObj[customerObj.length - 2] = { customerObj[customerObj.length - 2] = {
label: '二级流量方:', label: '二级流量方:',
key: 'subShopMerchantName' key: 'subShopMerchantName'
...@@ -218,7 +221,7 @@ Page({ ...@@ -218,7 +221,7 @@ Page({
isArtificer(data) { isArtificer(data) {
let { customerObj, orderInfo } = this.data let { customerObj, orderInfo } = this.data
orderInfo.isOpenArtificer = true orderInfo.isOpenArtificer = true
if (customerObj.findIndex(val => val.key == 'technicianName') < 0) { if (customerObj.findIndex(val =>val?.key && val.key == 'technicianName') < 0) {
customerObj[customerObj.length] = { customerObj[customerObj.length] = {
label: '选择技师:', label: '选择技师:',
key: 'technicianName' key: 'technicianName'
......
...@@ -73,7 +73,8 @@ ...@@ -73,7 +73,8 @@
</block> </block>
<block wx:if="{{item.copy}}"> <block wx:if="{{item.copy}}">
<view class="copy" bindtap="setCopyData" data-content="{{orderInfo[item.key]}}"> <view class="copy" bindtap="setCopyData" data-content="{{orderInfo[item.key]}}">
复制 <!-- 复制 -->
<image src="../../images/copyIcon.png" class="copyImage" binderror="" bindload=""></image>
</view> </view>
</block> </block>
</view> </view>
...@@ -93,9 +94,10 @@ ...@@ -93,9 +94,10 @@
</view> </view>
</view> </view>
<view class="box customer"> <view class="box customer">
<view class="title"> <view class="title userTitle">
<text>客户信息</text> <text>客户信息</text>
<text wx:if="{{isYqdSuper||isStaff}}" bindtap="jumpUpdate" class="updateInfo">修改客户信息</text> <view bindtap="jumpUserPortrait" class="updateInfo icon"><image src="../../images/userImageIcon.png" class="iconImage" ></image>画像</view>
<view wx:if="{{isYqdSuper||isStaff}}" bindtap="jumpUpdate" class="updateInfo "><image src="../../images/editIcon.png" class="iconImage" ></image>客户信息</view>
</view> </view>
<block wx:for="{{customerObj}}" wx:key="index"> <block wx:for="{{customerObj}}" wx:key="index">
<view class="cell"> <view class="cell">
...@@ -124,7 +126,8 @@ ...@@ -124,7 +126,8 @@
</block> </block>
<block wx:if="{{item.copy}}"> <block wx:if="{{item.copy}}">
<view class="copy" catchtap="setCopyData" data-content="{{orderInfo[item.key]}}"> <view class="copy" catchtap="setCopyData" data-content="{{orderInfo[item.key]}}">
复制 <!-- 复制 -->
<image src="../../images/copyIcon.png" class="copyImage" binderror="" bindload=""></image>
</view> </view>
</block> </block>
</view> </view>
......
...@@ -2,7 +2,20 @@ ...@@ -2,7 +2,20 @@
page { page {
background-color: rgb(246, 247, 247); background-color: rgb(246, 247, 247);
} }
.copyImage, .iconImage {
width: 36rpx;
height: 36rpx;
vertical-align: bottom;
}
.iconImage{
margin-right: 5rpx;
}
.customer .userTitle {
justify-content:start;
}
.userTitle .icon {
margin-right: auto;
}
.main { .main {
padding-bottom: 160rpx; padding-bottom: 160rpx;
} }
...@@ -457,6 +470,7 @@ page { ...@@ -457,6 +470,7 @@ page {
.customer .updateInfo { .customer .updateInfo {
color: #3582EE; color: #3582EE;
font-size: 28rpx; font-size: 28rpx;
margin-left: 16rpx;
} }
......
...@@ -14,7 +14,7 @@ Page({ ...@@ -14,7 +14,7 @@ Page({
showTips: true, showTips: true,
isYqdSuper: app.globalData.isYqdSuper, isYqdSuper: app.globalData.isYqdSuper,
isStaff: app.globalData.isStaff, isStaff: app.globalData.isStaff,
isShowPhone: app.globalData.YQorderSetting.yqPhoneConfig, isShowPhone: app.globalData.YQorderSetting?.yqPhoneConfig,
ctx: '', ctx: '',
hasDraw: false, hasDraw: false,
canvasWidth: 0, canvasWidth: 0,
...@@ -557,7 +557,7 @@ Page({ ...@@ -557,7 +557,7 @@ Page({
} }
let o = wx.$util.getStorageSync('dj_boutique_user_info') let o = wx.$util.getStorageSync('dj_boutique_user_info')
this.checkPhoneShow(app.globalData.YQorderSetting.yqPhoneConfig) this.checkPhoneShow(app.globalData.YQorderSetting?.yqPhoneConfig)
this.setData({ this.setData({
isYqdSuper: app.globalData.isYqdSuper, isYqdSuper: app.globalData.isYqdSuper,
......
...@@ -286,6 +286,7 @@ Page({ ...@@ -286,6 +286,7 @@ Page({
*/ */
onShow: function () {}, onShow: function () {},
onRoute(res) { onRoute(res) {
wx.$util.pointRecord(28)
// 避免数据污染到上一页 // 避免数据污染到上一页
let obj = JSON.parse(JSON.stringify(res)) let obj = JSON.parse(JSON.stringify(res))
this.setOrderObj(obj) this.setOrderObj(obj)
......
// tabWorkOrder/tpages/ocr/ocr.js
Page({
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})
\ No newline at end of file \ No newline at end of file
/* tabWorkOrder/tpages/ocr/ocr.wxss */
\ No newline at end of file \ No newline at end of file
<!--tabWorkOrder/tpages/ocr/ocr.wxml-->
<text>tabWorkOrder/tpages/ocr/ocr.wxml</text>
...@@ -9,6 +9,12 @@ export function getSessionId() { ...@@ -9,6 +9,12 @@ export function getSessionId() {
export function setSessionId(sessionId) { export function setSessionId(sessionId) {
$Storage.set('sessionId', sessionId) $Storage.set('sessionId', sessionId)
} }
export function getNoSignInUuid() {
return $Storage.get('noSignInUuid')
}
export function setNoSignInUuid(noSignInUuid) {
$Storage.set('noSignInUuid', noSignInUuid)
}
export function getUserInfo() { export function getUserInfo() {
return $Storage.get('userInfo') return $Storage.get('userInfo')
} }
...@@ -17,9 +23,7 @@ export function setUserInfo(data) { ...@@ -17,9 +23,7 @@ export function setUserInfo(data) {
$Storage.set('userInfo', data) $Storage.set('userInfo', data)
} }
export function removeSystemStorage() { export function removeSystemStorage() {
// $Storage.rm('srcm_shopmall_user_info') $Storage.rm('noSignInUuid')
// $Storage.rm('scrm_shopmall_sessionId')
// $Storage.rm('guest_no')
} }
export function setStorageSync(key, data) { export function setStorageSync(key, data) {
$Storage.set(key, JSON.stringify(data)) $Storage.set(key, JSON.stringify(data))
......
...@@ -17,7 +17,8 @@ export const STORAGE_OBJECTkEY = { ...@@ -17,7 +17,8 @@ export const STORAGE_OBJECTkEY = {
authphone: 'authphone', authphone: 'authphone',
disLikeRecordFlag: 'disLikeRecordFlag', disLikeRecordFlag: 'disLikeRecordFlag',
fileList: 'fileList', fileList: 'fileList',
posterId: 'posterId' posterId: 'posterId',
noSignInUuid: 'noSignInUuid'
} }
// export const IMG_VERSION = () => { // export const IMG_VERSION = () => {
......
...@@ -51,8 +51,9 @@ const domain_items = { ...@@ -51,8 +51,9 @@ const domain_items = {
// dj: 'http://192.168.1.165:8292', // dj: 'http://192.168.1.165:8292',
// dj: 'http://192.168.1.170:8292', //叶立庆 // dj: 'http://192.168.1.170:8292', //叶立庆
// dj: 'http://192.168.1.169:8292',//蔡远明 // dj: 'http://192.168.1.169:8292',//蔡远明
dj: 'http://192.168.1.174:8292',//范富荣 // dj: 'http://192.168.1.174:8292',//范富荣
// dj: 'http://192.168.1.129:8292',//周杭 dj: 'http://192.168.1.203:8292',//周杭
// dj: 'http://192.168.1.53:8292',//陈希
// dj:'http://192.168.2.59:8292/',//周立明 // dj:'http://192.168.2.59:8292/',//周立明
// scrm: 'http://192.168.1.165:8292' // scrm: 'http://192.168.1.165:8292'
scrm: 'https://scrm.dev.glsx.com.cn' scrm: 'https://scrm.dev.glsx.com.cn'
......
// import api from '../api/api' import api from '~/api/api'
import wxApi from '~/utils/utils_wx' import wxApi from '~/utils/utils_wx'
import format from '~/utils/utils_format' import format from '~/utils/utils_format'
import $router from '../router/index' import $router from '../router/index'
...@@ -88,12 +88,15 @@ const getUserInfo = () => { ...@@ -88,12 +88,15 @@ const getUserInfo = () => {
let user = wx.getStorageSync('dj_boutique_user_info') || null let user = wx.getStorageSync('dj_boutique_user_info') || null
return JSON.parse(user) return JSON.parse(user)
} }
const removeSellerInfo = () => {
wx.removeStorageSync('dj_boutique_seller_info')
}
const setUserInfo = userInfo => { const setUserInfo = userInfo => {
// console.log(userInfo) // console.log(userInfo)
// userInfo.loginrole // userInfo.loginrole
const loginRole = userInfo.loginRole const loginRole = userInfo.loginRole
if (loginRole&&loginRole==3) { if (loginRole && loginRole == 3) {
userInfo.userType = 1 userInfo.userType = 1
} }
wx.setStorageSync('dj_boutique_user_info', JSON.stringify(userInfo)) wx.setStorageSync('dj_boutique_user_info', JSON.stringify(userInfo))
} }
...@@ -105,15 +108,16 @@ const setSessionId = sessionId => { ...@@ -105,15 +108,16 @@ const setSessionId = sessionId => {
wx.setStorageSync('dj_boutique_sessionId', sessionId) wx.setStorageSync('dj_boutique_sessionId', sessionId)
} }
const removeStorage = () => { const removeStorage = () => {
wx.removeStorageSync('noSignInUuid')
wx.removeStorageSync('dj_boutique_user_info') wx.removeStorageSync('dj_boutique_user_info')
wx.removeStorageSync('dj_boutique_sessionId') wx.removeStorageSync('dj_boutique_sessionId')
} }
const showNoAccess = () => { const showNoAccess = () => {
// wx.showToast('您的账号无法完成此操作') // wx.showToast('您的账号无法完成此操作')
wx.showToast({ wx.showToast({
title:'您的账号无法完成此操作', title: '您的账号无法完成此操作',
icon:'error' icon: 'error'
}) })
} }
const setStorageSync = (key, data) => { const setStorageSync = (key, data) => {
...@@ -123,7 +127,6 @@ const getStorageSync = key => { ...@@ -123,7 +127,6 @@ const getStorageSync = key => {
let data = wx.getStorageSync(key) || null let data = wx.getStorageSync(key) || null
return JSON.parse(data) return JSON.parse(data)
} }
const getSceneId = path => { const getSceneId = path => {
let [_route_, _options_] = path.split('?') let [_route_, _options_] = path.split('?')
let [target] = _route_.split('/') let [target] = _route_.split('/')
...@@ -209,6 +212,20 @@ const checkRule = function (obj, formRule) { ...@@ -209,6 +212,20 @@ const checkRule = function (obj, formRule) {
} }
return false return false
} }
// 埋点
const pointRecord = clickEventType => {
let userInfo = getUserInfo()
// let sessionId = getSessionId()
let params = {
userId: userInfo.uuid,
clickEventType
}
console.log('burialPointRecord', params)
api.burialPointRecord(params).then(res => {
console.log('burialPointRecord', res)
})
}
const util = { const util = {
onReachBottom, onReachBottom,
haveEmoji, haveEmoji,
...@@ -219,6 +236,7 @@ const util = { ...@@ -219,6 +236,7 @@ const util = {
setUserInfo, setUserInfo,
getSessionId, getSessionId,
setSessionId, setSessionId,
removeSellerInfo,
removeStorage, removeStorage,
showNoAccess, showNoAccess,
setStorageSync, setStorageSync,
...@@ -227,7 +245,8 @@ const util = { ...@@ -227,7 +245,8 @@ const util = {
type, type,
deepClone, deepClone,
getTimeState, getTimeState,
checkRule checkRule,
pointRecord
} }
const Util = Object.assign(util, wxApi, format) const Util = Object.assign(util, wxApi, format)
// console.log('Util', Util) // console.log('Util', Util)
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!