Commit 95681298 by 张立顺

v4.15.0 功能开发

1 parent fe8443a2
...@@ -123,5 +123,9 @@ module.exports = { ...@@ -123,5 +123,9 @@ module.exports = {
/** 获取转化员上一笔订单的销售顾问 */ /** 获取转化员上一笔订单的销售顾问 */
getLastUserOrderInfo(data) { getLastUserOrderInfo(data) {
return api.post('dj.api.smartcarlife.order.getLastUser', data) return api.post('dj.api.smartcarlife.order.getLastUser', data)
},
// 获取订单信息
getWorkList(data) {
return api.post('dj.api.smartcarlife.order.search', data)
} }
} }
...@@ -14,7 +14,7 @@ const systemInfo = wx.getSystemInfoSync() ...@@ -14,7 +14,7 @@ const systemInfo = wx.getSystemInfoSync()
const manual = false const manual = false
const release = false const release = false
let index = 2 let index = 1
// 判断小程序环境 // 判断小程序环境
// develop:开发版(正常开发工具,测试时) // develop:开发版(正常开发工具,测试时)
......
...@@ -5,14 +5,12 @@ import util from './utils/util.js' ...@@ -5,14 +5,12 @@ import util from './utils/util.js'
import api from './api/api.js' import api from './api/api.js'
import * as Sentry from './utils/sentry-miniapp.wx.min' import * as Sentry from './utils/sentry-miniapp.wx.min'
// 先屏蔽不上sentry功能 // 先屏蔽不上sentry功能
// import * as Sentry from 'sentry-miniapp'
const accountInfo = wx.getAccountInfoSync() const accountInfo = wx.getAccountInfoSync()
// console.log(Sentry) // console.log(Sentry)
// 初始化 Sentry 生产环境再开启 // 初始化 Sentry 生产环境再开启
// console.log('Sentry',Sentry); // console.log('Sentry',Sentry);
accountInfo.miniProgram.envVersion == 'release' && accountInfo.miniProgram.envVersion == 'release' &&
Sentry.init({ Sentry.init({
// dsn: 'http://ebcf31c417cc4ce185782f046e4a87a2@sentry.glsx.com.cn/5'
dsn: 'https://ddaadc52bf8d4ecc92eca632683d456a@sentry.glsx.com.cn/23' dsn: 'https://ddaadc52bf8d4ecc92eca632683d456a@sentry.glsx.com.cn/23'
}) })
App({ App({
...@@ -25,8 +23,6 @@ App({ ...@@ -25,8 +23,6 @@ App({
wx.$modal = this.showModal wx.$modal = this.showModal
let userInfo = util.getStorageSync('dj_boutique_user_info') let userInfo = util.getStorageSync('dj_boutique_user_info')
userInfo && this.checkYqdSuper(userInfo) userInfo && this.checkYqdSuper(userInfo)
// this.getYQorderInfo() //初始化园区店配置
}, },
showModal(that, options) { showModal(that, options) {
that.selectComponent('#modal').showModal(options) that.selectComponent('#modal').showModal(options)
...@@ -35,7 +31,6 @@ App({ ...@@ -35,7 +31,6 @@ App({
* 下载小程序新版本并重启应用 * 下载小程序新版本并重启应用
*/ */
autoUpdate: function () { autoUpdate: function () {
// console.log(new Date())
const self = this const self = this
// 获取小程序更新机制兼容 // 获取小程序更新机制兼容
if (wx.canIUse('getUpdateManager')) { if (wx.canIUse('getUpdateManager')) {
...@@ -54,24 +49,6 @@ App({ ...@@ -54,24 +49,6 @@ App({
if (res.confirm) { if (res.confirm) {
//3. 新的版本已经下载好,调用 applyUpdate 应用新版本并重启 //3. 新的版本已经下载好,调用 applyUpdate 应用新版本并重启
updateManager.applyUpdate() updateManager.applyUpdate()
} else if (res.cancel) {
//如果需要强制更新,则给出二次弹窗,如果不需要,则这里的代码都可以删掉了
// wx.showModal({
// title: '温馨提示~',
// content: '本次版本更新涉及到新的功能添加,旧版本无法正常访问的哦~',
// success: function (res) {
// self.autoUpdate()
// return;
// //第二次提示后,强制更新
// if (res.confirm) {
// // 新的版本已经下载好,调用 applyUpdate 应用新版本并重启
// updateManager.applyUpdate()
// } else if (res.cancel) {
// //重新回到版本更新提示
// self.autoUpdate()
// }
// }
// })
} }
} }
}) })
...@@ -152,19 +129,6 @@ App({ ...@@ -152,19 +129,6 @@ App({
// this.globalData.isYqdSuper = userInfo.userType == 2 && !userInfo.isSuper && merchantAccountType // this.globalData.isYqdSuper = userInfo.userType == 2 && !userInfo.isSuper && merchantAccountType
this.globalData.isYqdSuper = userInfo.userType != 2 && !userInfo.isSuper && merchantAccountType this.globalData.isYqdSuper = userInfo.userType != 2 && !userInfo.isSuper && merchantAccountType
this.globalData.isStaff = userInfo.userType == 2 && !userInfo.isSuper && merchantAccountType this.globalData.isStaff = userInfo.userType == 2 && !userInfo.isSuper && merchantAccountType
// console.log(this.globalData.isYqdSuper)
// checkSeverType
// console.log(userInfo)
// let {
// yqdInfo: { merchantRange }
// } = this.globalData
// console.log(merchantRange)
// console.log(subIndex)
// let flag = userInfo.userType != 2 || userInfo.isSuper
// let flag2 = userInfo.subLoginUser.merchantId != userInfo.merchantId || merchantRange.length == 1
// console.log(this.globalData.isYqdSuper)
// this.globalData.isYqdSuper = flag && flag2
//先模拟测试 //先模拟测试
// this.globalData.serverType = !this.globalData.serverType // this.globalData.serverType = !this.globalData.serverType
// console.log('serverType', this.globalData.serverType) // console.log('serverType', this.globalData.serverType)
...@@ -234,12 +198,11 @@ App({ ...@@ -234,12 +198,11 @@ App({
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
// console.log(this.globalData.YQorderSetting, 'this.globalData.YQorderSetting') // console.log(this.globalData.YQorderSetting, 'this.globalData.YQorderSetting')
// 如果有 直接返回 // 如果有 直接返回
console.log(this.globalData.YQorderSetting, 'this.globalData.YQorderSetting') // console.log(this.globalData.YQorderSetting, 'this.globalData.YQorderSetting')
// debugger // debugger
if (this.globalData.YQorderSetting) { if (this.globalData.YQorderSetting) {
return resolve(this.globalData.YQorderSetting) return resolve(this.globalData.YQorderSetting)
} else { } else {
// this. yqdInfo
let userInfo = util.getUserInfo() let userInfo = util.getUserInfo()
let { merchantId, merchantName } = userInfo.subLoginUser let { merchantId, merchantName } = userInfo.subLoginUser
...@@ -255,11 +218,10 @@ App({ ...@@ -255,11 +218,10 @@ App({
if (code == 0) { if (code == 0) {
// 过滤园区店是否需要屏蔽手机号选项 // 过滤园区店是否需要屏蔽手机号选项
let filterYqPhoneConfig = JSON.parse(data.yqPhoneConfig) let filterYqPhoneConfig = JSON.parse(data.yqPhoneConfig)
console.log(filterYqPhoneConfig) // console.log(filterYqPhoneConfig)
data.yqPhoneConfig = filterYqPhoneConfig.find(item => item.yqMerchantId == merchantId)?.shopMerchantPhoneList || false data.yqPhoneConfig = filterYqPhoneConfig.find(item => item.yqMerchantId == merchantId)?.shopMerchantPhoneList || false
//
console.log(data) // console.log(data)
this.globalData.YQorderSetting = data this.globalData.YQorderSetting = data
// this.checkSeverType(userInfo) // this.checkSeverType(userInfo)
resolve(this.globalData.YQorderSetting) resolve(this.globalData.YQorderSetting)
...@@ -274,11 +236,9 @@ App({ ...@@ -274,11 +236,9 @@ App({
globalData: { globalData: {
// loginUserInfo: {}, // loginUserInfo: {},
systemInfo: {}, systemInfo: {},
// 头部导航栏的高度 statusBarHeight: wx.getSystemInfoSync()['statusBarHeight'], // 头部导航栏的高度
statusBarHeight: wx.getSystemInfoSync()['statusBarHeight'],
bottomLift: 0, bottomLift: 0,
yqdInfo: {}, yqdInfo: {},
// serverType: false
isYqdSuper: true, isYqdSuper: true,
isStaff: false, isStaff: false,
YQorderSetting: '' YQorderSetting: ''
......
...@@ -90,11 +90,11 @@ Component({ ...@@ -90,11 +90,11 @@ Component({
let carData = JSON.stringify(car.data) let carData = JSON.stringify(car.data)
let size = carData.length * 2 let size = carData.length * 2
// const arrp = ['bytes', 'KB', 'MB', 'GB', 'TB'] // const arrp = ['bytes', 'KB', 'MB', 'GB', 'TB']
console.log(size / 1000000) // console.log(size / 1000000)
let sliceLength = size / 1000000 let sliceLength = size / 1000000
const carDateLength = Math.ceil(sliceLength) const carDateLength = Math.ceil(sliceLength)
console.log(carDateLength) // console.log(carDateLength)
let list = [] let list = []
// carDateLength.map(index => { // carDateLength.map(index => {
// 缓存到本地 // 缓存到本地
......
// components/CarBrands/CarBrands.js
import api from '../../api/api.js'
let isNum, num, y, time
Component({
/**
* 组件的属性列表
*/
properties: {
show: {
type: Boolean,
observer: function (n) {
let { isFirst } = this.data
if (n && isFirst) {
this.init()
this.setData({
isFirst: false
})
}
}
}
},
/**
* 组件的初始数据
*/
data: {
orderInfo: {},
// storageData: null,
customerList: [],
isFirst: true
},
pageLifetimes: {
show: function () {},
hide: function () {}
},
/**
* 组件的方法列表
*/
methods: {
init(keyword) {
// console.log('getBrandList')
// console.log(storageData)
let params = {
pageSize: 999999,
pageNum: 1,
upgradeFinishFlag: 'R',
// ...data
keyword
}
let customerList = []
api.getWorkList(params).then(res => {
// console.log(res)
// this.setCar(res.data, changeMerchantId)
// console.log(res)
let { data, code } = res
if (code == 0 && data?.list.length) {
data.list = data.list.map(item => {
if (item.customer && item.customer.carSeriesName) {
item.carType = `${item.customer.carBrand || ''}-${item.customer.carChildsBrandName || ''}-${item.customer.carSeriesName || ''}`
}
return item
})
customerList = data.list
}
this.setData({
customerList
})
})
},
searchCar(e) {
let { value } = e.detail
this.init(value)
},
choose(e) {
let { item, index } = e.currentTarget.dataset
console.log(item, index)
let { customerList } = this.data
customerList = customerList.map(item => {
item.active = false
return item
})
customerList[index].active = true
let orderInfo = item
orderInfo.orderSource = 4
// delete orderInfo.orderCode
// 去除掉错误订单对应的关联码
// delete orderInfo.associateOrderCode
// 'orderCode',
let deleteList = ['associateOrderCode', 'merchantDistributionList', 'expenseCategoryList', 'profitAllocatinList']
for (var i = 0; i < deleteList.length; i++) {
// console.log(arr[i])
delete orderInfo[deleteList[i]]
}
this.setData({
customerList,
orderInfo
})
},
confirm() {
let { orderInfo, customerList } = this.data
let flag = customerList.some(item => {
return item.active
})
if (!flag) {
return wx.$util.showToast('请选择客户')
}
this.triggerEvent('confirm', orderInfo)
this.setData({
show: false
})
}
}
})
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file \ No newline at end of file
<popup
title="选择客户"
show="{{show}}"
bindconfirm="confirm"
height="90%">
<view class="car-brands-box">
<search-input bindsearch="searchCar" />
<view class="car-brands">
<view class="label title y-center">
<span class="labelName">姓名</span>
<span class="labelPhone">| 手机号</span>
</view>
<scroll-view style="height: calc(100% - 44px)" scroll-y scroll-into-view="{{letter}}">
<block wx:if="{{customerList.length > 0}}">
<!-- <block wx:for="{{customerList}}" wx:key="index"> -->
<!-- <view> -->
<!-- <view cla></view> -->
<view class="box">
<block
wx:for="{{customerList}}"
wx:for-item="item"
wx:key="ind"
wx:for-index="ind">
<view
class="list y-center child {{item.active?'active':''}}"
data-item="{{item}}"
data-index="{{ind}}"
catchtap="choose">
<span class="name text-hide">{{item.customer.customerName}}</span>
<span class="carType " wx:if="{{item.carType.length}}">
<view>(</view>
<view class="text-hide cartypeLabel">{{item.carType}}</view>
<view>)</view>
</span>
<span class="phone">{{item.customer.customerPhone}}</span>
<!-- {{c.name}} {{c.active?'active':''}} {{c.isTitle?'title':''}} -->
<view class="icon">
<image src="../images/choose.png" />
</view>
</view>
<!-- data-index="{{index}}"
data-ind="{{ind}}"
data-cind="{{cind}}"
data-item="{{i}}"
data-that="{{c}}" -->
<!-- <view
class="brands"
catchtap="showChilds"
data-index='{{index}}'
data-ind='{{ind}}'>
<view class="list y-center">{{i.name}}</view> -->
<!-- <block wx:if="{{i.active}}"> -->
<!-- <block
wx:for='{{i.childs_list}}'
wx:key="cind"
wx:for-item='c'
wx:for-index='cind'>
</block> -->
<!-- </block> -->
<!-- </view> -->
</block>
</view>
<!-- </view> -->
<!-- </block> -->
</block>
<block wx:if="{{ brandList.length <= 0}}">
<view class="nothing">暂无数据</view>
</block>
<!-- merchantId && -->
<!-- <block wx:if="{{!merchantId}}">
<view class="nothing">请先选择流量来源</view>
</block> -->
</scroll-view>
<!-- <view class="side-bar" id="side-bar">
<block wx:for="{{brandList}}" wx:key="index">
<view
data-letter="{{item.letter}}"
class="view {{item.active?'active':''}}"
capture-catch:touchstart="start"
id="letter-{{item.letter}}"
data-index="{{index}}"
capture-catch:touchmove="move"
capture-catch:touchend="end">
{{item.letter}}
</view>
</block>
</view> -->
<!-- 提示 -->
<view class='tips' hidden='{{!showTip}}'>{{letter}}</view>
</view>
</view>
</popup>
/* components/CarBrands/CarBrands.wxss */
.car-brands-box {
width: calc(100% + 64rpx);
height: 100%;
margin-left: -32rpx;
}
.car-brands {
height: calc(100% - 104rpx);
position: relative;
/* display: flex; */
}
.label {
padding-left: 32rpx;
line-height: 88rpx;
}
.labelName {
font-size: 16px;
color: #333333;
padding-right: 20rpx;
}
.text-hide {
/* display: inline-block; */
/* width: 200rpx; */
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
/* line-height: 37rpx; */
}
.labelPhone {
font-size: 12px;
color: #999999;
}
.y-center {
display: flex;
align-items: center;
}
.list {
box-sizing: border-box;
height: 88rpx;
/* padding-left: 32rpx; */
margin: 0 32rpx 0 92rpx;
font-weight: 700;
border-top: 2rpx solid #EBEDF0;
}
.list .name {
/* flex: 4; */
max-width: 150rpx;
}
.list .carType {
/* flex: 10; */
display: flex;
align-items: center;
margin-left: 15px;
max-width: 300rpx;
}
.cartypeLabel {
flex: 1;
}
.list .phone {
/* flex: 5; */
margin-left: auto;
}
.child {
font-weight: normal;
/* padding-left: 96rpx; */
font-size: 28rpx;
/* color: #888888; */
position: relative;
color: #333333;
}
.child.active {
color: #3582ee;
}
.child.title {
color: #282829;
padding-left: 64rpx;
/* color: #3582ee; */
}
.child .icon {
display: none;
width: 32rpx;
height: 32rpx;
position: absolute;
top: 50%;
left: -46rpx;
transform: translateY(-50%);
}
.child.active .icon {
display: block;
}
@keyframes show-side-bar {
0% {
opacity: 0;
right: -100%;
}
100% {
opacity: 1;
right: 0;
}
}
.tips {
position: fixed;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 140rpx;
height: 140rpx;
border-radius: 50%;
color: #fff;
background: rgba(153, 153, 153, 0.7);
z-index: 9999;
font-size: 60rpx;
font-weight: bold;
display: flex;
align-items: center;
justify-content: center;
}
.nothing {
padding: 100rpx;
text-align: center;
color: #999;
}
\ No newline at end of file \ No newline at end of file
...@@ -3,8 +3,12 @@ ...@@ -3,8 +3,12 @@
<view class='cell-label' style="width:{{labelWidth}};{{labelStyle}}" bindtap="titleClick"> <view class='cell-label' style="width:{{labelWidth}};{{labelStyle}}" bindtap="titleClick">
<text wx:if='{{required&&requiredBefore}}' class='required'>*</text> <text wx:if='{{required&&requiredBefore}}' class='required'>*</text>
{{label||'标题'}} {{label||'标题'}}
<image class="titleIcon" wx:if="{{iconSrc}}" src="{{iconSrc}}" />
<text wx:if='{{required&&requiredAfter}}' class='required'>*</text> <text wx:if='{{required&&requiredAfter}}' class='required'>*</text>
<image
webp
class="titleIcon"
wx:if="{{iconSrc}}"
src="{{iconSrc}}" />
</view> </view>
<view class='cell-value ' style="width:calc(100% - {{labelWidth}});"> <view class='cell-value ' style="width:calc(100% - {{labelWidth}});">
<view class='value {{valueAlign}} {{haveArrow}}'> <view class='value {{valueAlign}} {{haveArrow}}'>
......
...@@ -30,6 +30,7 @@ ...@@ -30,6 +30,7 @@
.titleIcon { .titleIcon {
width: 34rpx; width: 34rpx;
height: 34rpx; height: 34rpx;
margin-left: 10rpx;
} }
.cell-value { .cell-value {
......
// components/Merchant-Seles/Merchant-Seles.js // components/Merchant-Seles/Merchant-Seles.js
import api from '../../api/api' import api from '../../api/api'
import util from '../../utils/util.js' // import util from '../../utils/util.js'
Component({ Component({
/** /**
* 组件的属性列表 * 组件的属性列表
...@@ -31,7 +31,8 @@ Component({ ...@@ -31,7 +31,8 @@ Component({
merchantList: [], merchantList: [],
selesList: [], selesList: [],
orderObj: {}, orderObj: {},
isFirst: true isFirst: true,
orderSellerInfo: ''
}, },
/** /**
...@@ -51,8 +52,7 @@ Component({ ...@@ -51,8 +52,7 @@ Component({
// 处理组件实例化比页面快用上一个页面数据的问题 // 处理组件实例化比页面快用上一个页面数据的问题
if (!thisPage?.data?.name) return if (!thisPage?.data?.name) return
let { orderObj } = thisPage.data let { orderObj } = thisPage.data
let isSellerInfo let isSellerInfo, orderSellerInfo
// debugger
// console.log('orderObj', orderObj) // console.log('orderObj', orderObj)
let callBackName = type == 1 ? 'getServiceMerchantList' : 'getYQList' let callBackName = type == 1 ? 'getServiceMerchantList' : 'getYQList'
...@@ -62,13 +62,12 @@ Component({ ...@@ -62,13 +62,12 @@ Component({
merchantId: userInfo.merchantId merchantId: userInfo.merchantId
} }
: {} : {}
).then(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
...@@ -82,7 +81,13 @@ Component({ ...@@ -82,7 +81,13 @@ Component({
merchantName = orderObj.merchantName merchantName = orderObj.merchantName
} else { } else {
isSellerInfo = orderObj.merchantName && orderObj.employeeName isSellerInfo = orderObj.merchantName && orderObj.employeeName
let orderSellerInfo = util.getSellerInfo() // let orderSellerInfo = util.getSellerInfo()
// 获取上一个订单的销售顾问信息
let result = await api.getLastUserOrderInfo({ sellerUserId: userInfo.subLoginUser.uuid })
// let {data} = result
result.data && (orderSellerInfo = result.data)
// console.log(orderSellerInfo, 'result')
if (orderSellerInfo && !isSellerInfo) { if (orderSellerInfo && !isSellerInfo) {
compareId = orderSellerInfo.merchantId compareId = orderSellerInfo.merchantId
merchantId = orderSellerInfo.merchantId merchantId = orderSellerInfo.merchantId
...@@ -106,18 +111,23 @@ Component({ ...@@ -106,18 +111,23 @@ Component({
} }
let targetName = type == 1 ? 'orderObj.merchantName' : 'orderObj.sellerMerchantName' let targetName = type == 1 ? 'orderObj.merchantName' : 'orderObj.sellerMerchantName'
let targetId = type == 1 ? 'orderObj.merchantId' : 'orderObj.sellerMerchantId' let targetId = type == 1 ? 'orderObj.merchantId' : 'orderObj.sellerMerchantId'
this.setData({ this.setData(
{
[targetId]: merchantId, [targetId]: merchantId,
[targetName]: merchantName, [targetName]: merchantName,
merchantList: data merchantList: data,
}) orderSellerInfo
},
() => {
this.getConversionEmployeeList(merchantId) this.getConversionEmployeeList(merchantId)
} }
)
}
}) })
}, },
getConversionEmployeeList(merchantId, refresh) { getConversionEmployeeList(merchantId, refresh) {
// console.log(merchantId) // console.log(merchantId)
let { type, merchantList, isFirst, orderObj: comOrderObj, userInfo } = 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
...@@ -154,19 +164,8 @@ Component({ ...@@ -154,19 +164,8 @@ Component({
// isSellerInfo = orderObj.merchantName && orderObj.employeeName // isSellerInfo = orderObj.merchantName && orderObj.employeeName
// console.log(isSellerInfo) // console.log(isSellerInfo)
// let orderSellerInfo = util.getSellerInfo() // let orderSellerInfo = util.getSellerInfo()
// let orderSellerInfo = util.getUserInfo()
let result = await api.getLastUserOrderInfo({ sellerUserId: userInfo.subLoginUser.uuid })
// console.log(orderSellerInfo, 'result')
let orderSellerInfo
// let {data} = result
result.data && (orderSellerInfo = result.data)
//
if (orderSellerInfo || orderObj.userId) { if (orderSellerInfo || orderObj.userId) {
// compareId = orderSellerInfo.merchantId
// orderObj.employeeName ? orderObj.employeeName :
// orderObj.userId ? orderObj.userId :
staffName = orderObj.employeeName ? orderObj.employeeName : orderSellerInfo.employeeName staffName = orderObj.employeeName ? orderObj.employeeName : orderSellerInfo.employeeName
uuid = orderObj.userId ? orderObj.userId : orderSellerInfo.userId uuid = orderObj.userId ? orderObj.userId : orderSellerInfo.userId
data.map(e => { data.map(e => {
......
...@@ -81,6 +81,7 @@ ...@@ -81,6 +81,7 @@
"name": "首页", "name": "首页",
"pathName": "/tabIndex/pages/index/index", "pathName": "/tabIndex/pages/index/index",
"query": "", "query": "",
"launchMode": "default",
"scene": null "scene": null
}, },
{ {
......
...@@ -285,6 +285,17 @@ Page({ ...@@ -285,6 +285,17 @@ Page({
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad: function (options) { onLoad: function (options) {
// console.log(decodeURIComponent(options))
// let id = decodeURIComponent(options.supplement).split('=')[1]
// if (options) {
// }
// console.log(options)
if (options.supplement) {
this.setData({
showOrderpop: true
})
}
let today = new Date() let today = new Date()
let startDate = today.format('yyyy-MM-dd') let startDate = today.format('yyyy-MM-dd')
let endDate = today.format('yyyy-MM-dd') let endDate = today.format('yyyy-MM-dd')
......
...@@ -18,9 +18,11 @@ Page({ ...@@ -18,9 +18,11 @@ Page({
*/ */
data: { data: {
scanIcon: 'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/ocrIcon.png', scanIcon: 'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/ocrIcon.png',
selectIcon: 'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/selectIncon.webp',
name: 'createdOrder', name: 'createdOrder',
phoneShow: false, phoneShow: false,
flag: true, flag: true,
customerInfoBox: false,
// canOrder: true, // 是否能下单和保存 判断商户配置财务规则 // canOrder: true, // 是否能下单和保存 判断商户配置财务规则
payTypeList: [ payTypeList: [
{ {
...@@ -63,6 +65,16 @@ Page({ ...@@ -63,6 +65,16 @@ Page({
priceSpread: '', priceSpread: '',
showTips: true showTips: true
}, },
showCustomPop() {
this.setData({
customerInfoBox: true
})
},
chooseCustomerInfo(e) {
let { detail } = e
// this.onRoute(detail)
this.setOrderObj(detail)
},
closeTips() { closeTips() {
this.setData({ this.setData({
showTips: false showTips: false
...@@ -729,6 +741,7 @@ Page({ ...@@ -729,6 +741,7 @@ Page({
// wx.$util.showLoading() // wx.$util.showLoading()
// }, 2000) // }, 2000)
}, },
onRoute(res) { onRoute(res) {
// debugger // debugger
let { outTradeNo, totalFee, accountDate } = res let { outTradeNo, totalFee, accountDate } = res
......
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
"car-brands": "/components/CarBrands/CarBrands", "car-brands": "/components/CarBrands/CarBrands",
"merchant-seles": "/components/Merchant-Seles/Merchant-Seles", "merchant-seles": "/components/Merchant-Seles/Merchant-Seles",
"coupon": "/components/Coupon/Coupon", "coupon": "/components/Coupon/Coupon",
"goods": "/components/Goods/Goods" "goods": "/components/Goods/Goods",
"customerInfo": "/components/CustomerInfo/CustomerInfo"
} }
} }
...@@ -34,7 +34,9 @@ ...@@ -34,7 +34,9 @@
valueAlign="right" valueAlign="right"
label="车主姓名" label="车主姓名"
requiredAfter requiredAfter
labelWidth="140rpx" iconSrc="{{selectIcon}}"
bindtitleClick="showCustomPop"
labelWidth="280rpx"
required> required>
<input <input
placeholder="点击输入" placeholder="点击输入"
...@@ -347,6 +349,7 @@ ...@@ -347,6 +349,7 @@
<view class="modalTips">请修改商品价格,商品总额需等于总价。</view> <view class="modalTips">请修改商品价格,商品总额需等于总价。</view>
</view> </view>
</modal> </modal>
<customerInfo show="{{customerInfoBox}}" bindconfirm="chooseCustomerInfo" />
<!-- <order-popup <!-- <order-popup
orderType="{{remarkBox}}" orderType="{{remarkBox}}"
show="{{remarkBox}}" show="{{remarkBox}}"
......
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
"car-brands": "/components/CarBrands/CarBrands", "car-brands": "/components/CarBrands/CarBrands",
"merchant-seles": "/components/Merchant-Seles/Merchant-Seles", "merchant-seles": "/components/Merchant-Seles/Merchant-Seles",
"coupon": "/components/Coupon/Coupon", "coupon": "/components/Coupon/Coupon",
"goods": "/components/Goods/Goods" "goods": "/components/Goods/Goods",
"customerInfo": "/components/CustomerInfo/CustomerInfo"
} }
} }
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!