Commit 4092ad37 by 前端

Merge branch 'SAAS+V4.35.0-0305' into 'develop'

上线合并

See merge request !228
2 parents ce5dbc03 422fb712
Showing 98 changed files with 3835 additions and 180 deletions
...@@ -206,9 +206,24 @@ module.exports = { ...@@ -206,9 +206,24 @@ module.exports = {
return api.post('dj.api.scenemerchantref.listShop4sByRef.page', data) return api.post('dj.api.scenemerchantref.listShop4sByRef.page', data)
}, },
/** 查询员工或园区店商户是否开启了商学院 */ /** 查询员工或园区店商户是否开启了工资绩效 */
isBusinessSchoolEnableCurrentUser(data) { isBusinessSchoolEnableCurrentUser(data) {
return api.post('dj.api.businessSchool.isBusinessSchoolEnable.currentUser', data) return api.post('dj.api.businessSchool.isBusinessSchoolEnable.currentUser', data)
}, },
/**
* 客户线索新增客户提醒 */
getCustomerClueRemind(params = {}) {
return api.post('dj.api.smartcarlife.customer.clue.tips.newCount', params)
},
/** 获取驻店员工目标任务 */
getStaffTargetTaskApi(data) {
return api.post('dj.api.smartcarlife.staffTargetCheck.getTargetCheck', data)
},
/** 将当前门店的员工目标任务弹窗标记为已弹起过 */
setTaskDialog(data) {
return api.post('dj.api.smartcarlife.staffTargetCheck.promptYes', data)
}
} }
...@@ -19,6 +19,7 @@ import { checkYqdSuper, checkScene } from '~/store/index' ...@@ -19,6 +19,7 @@ import { checkYqdSuper, checkScene } from '~/store/index'
import eventbus from './utils/eventbus' import eventbus from './utils/eventbus'
import api from './api/api' import api from './api/api'
import { Version } from 'glsx-common-sdk' import { Version } from 'glsx-common-sdk'
import { areaList } from '@vant/area-data'; //预加载省市区
App({ App({
onLaunch() { onLaunch() {
/**挂载到wx对象 */ /**挂载到wx对象 */
...@@ -28,7 +29,7 @@ App({ ...@@ -28,7 +29,7 @@ App({
wx.$util = util wx.$util = util
wx.$api = wxApi wx.$api = wxApi
wx.$eventbus = eventbus wx.$eventbus = eventbus
wx.$areaList = areaList
let userInfo = util.getStorageSync('dj_boutique_user_info') let userInfo = util.getStorageSync('dj_boutique_user_info')
// ,this.globalData, userInfo // ,this.globalData, userInfo
userInfo && this.gobalCheckYqdSuper(userInfo) userInfo && this.gobalCheckYqdSuper(userInfo)
......
...@@ -102,7 +102,10 @@ ...@@ -102,7 +102,10 @@
"pages/carEquity/carSeries/carSeries", "pages/carEquity/carSeries/carSeries",
"pages/TabBar/equityPage", "pages/TabBar/equityPage",
"pages/carEquity/previewContract/previewContract", "pages/carEquity/previewContract/previewContract",
"pages/collegeScene/collegeScene" "pages/collegeScene/collegeScene",
"pages/clueList/clueList",
"pages/clueDetail/clueDetail",
"pages/residentTarget/residentTarget"
] ]
}, },
{ {
......
// components/CarBrands/CarBrands.js // components/CarBrands/CarBrands.js
import api from '../../api/api.js' import api from '../../api/api.js'
import carLifeApi from '~/packageEquity/carEquityApi'
let isNum, num, y, time let isNum, num, y, time
Component({ Component({
/** /**
...@@ -9,7 +11,9 @@ Component({ ...@@ -9,7 +11,9 @@ Component({
show: { show: {
type: Boolean, type: Boolean,
observer: function (n) { observer: function (n) {
let { isFirst } = this.data let {
isFirst
} = this.data
n && wx.$util.pointRecord(19) n && wx.$util.pointRecord(19)
if (n && isFirst) { if (n && isFirst) {
this.init() this.init()
...@@ -27,7 +31,8 @@ Component({ ...@@ -27,7 +31,8 @@ Component({
this.init() this.init()
} }
} }
} },
apiType: Number
}, },
/** /**
...@@ -50,7 +55,10 @@ Component({ ...@@ -50,7 +55,10 @@ Component({
init(keyword) { init(keyword) {
// console.log('getBrandList') // console.log('getBrandList')
// console.log(storageData) // console.log(storageData)
let { merchantId } = this.data let {
merchantId,
apiType
} = this.data
let userInfo = wx.$util.getUserInfo() let userInfo = wx.$util.getUserInfo()
let params = { let params = {
merchantId: merchantId || userInfo?.shopMerchantId, merchantId: merchantId || userInfo?.shopMerchantId,
...@@ -62,11 +70,36 @@ Component({ ...@@ -62,11 +70,36 @@ Component({
keyword keyword
} }
let customerList = [] let customerList = []
api.getWorkList(params).then(res => { //客户线索1.1 、2.1客户列表
wx.$util.showLoading()
if (apiType == 2) carLifeApi.getCustomerFileList({
currentPage: 1,
merchantId: merchantId || userInfo?.shopMerchantId,
pageSize: 999999,
search: keyword,
}).then(({code,data})=>{
wx.$util.hideLoading()
if (code == 0 && data?.list.length) {
data.list.map(item => {
customerList.push({
customer:item,
carType: `${item.carBrand || ''}-${item.carChildsBrandName || ''}-${item.carSeriesName || ''}`
})
})
}
this.setData({
customerList
})
})
else api.getWorkList(params).then(res => {
wx.$util.hideLoading()
// console.log(res) // console.log(res)
// this.setCar(res.data, changeMerchantId) // this.setCar(res.data, changeMerchantId)
// console.log(res) // console.log(res)
let { data, code } = res let {
data,
code
} = res
if (code == 0 && data?.list.length) { if (code == 0 && data?.list.length) {
data.list = data.list.map(item => { data.list = data.list.map(item => {
if (item.customer && item.customer.carSeriesName) { if (item.customer && item.customer.carSeriesName) {
...@@ -80,15 +113,23 @@ Component({ ...@@ -80,15 +113,23 @@ Component({
customerList customerList
}) })
}) })
}, },
searchCar(e) { searchCar(e) {
let { value } = e.detail let {
value
} = e.detail
this.init(value) this.init(value)
}, },
choose(e) { choose(e) {
let { item, index } = e.currentTarget.dataset let {
item,
index
} = e.currentTarget.dataset
console.log(item, index) console.log(item, index)
let { customerList } = this.data let {
customerList
} = this.data
customerList = customerList.map(item => { customerList = customerList.map(item => {
item.active = false item.active = false
return item return item
...@@ -111,7 +152,10 @@ Component({ ...@@ -111,7 +152,10 @@ Component({
}) })
}, },
confirm() { confirm() {
let { orderInfo, customerList } = this.data let {
orderInfo,
customerList
} = this.data
let flag = customerList.some(item => { let flag = customerList.some(item => {
return item.active return item.active
}) })
...@@ -125,4 +169,4 @@ Component({ ...@@ -125,4 +169,4 @@ Component({
}) })
} }
} }
}) })
\ No newline at end of file \ No newline at end of file
...@@ -12,7 +12,7 @@ Component({ ...@@ -12,7 +12,7 @@ Component({
type: Number, type: Number,
value: 0 value: 0
}, },
// 是否显示商学院 // 是否显示工资绩效
showCollege: { showCollege: {
type: Boolean, type: Boolean,
value: false value: false
...@@ -53,6 +53,7 @@ Component({ ...@@ -53,6 +53,7 @@ Component({
* 组件的方法列表 * 组件的方法列表
*/ */
methods: { methods: {
// 跳转到工资绩效
jump(e) { jump(e) {
let { url } = e.currentTarget.dataset let { url } = e.currentTarget.dataset
const baseUrl = 'https://img01.glsx.com.cn/weapp/resource/saas/scrm/html/' const baseUrl = 'https://img01.glsx.com.cn/weapp/resource/saas/scrm/html/'
...@@ -64,7 +65,7 @@ Component({ ...@@ -64,7 +65,7 @@ Component({
// 跳转到商学院 // 跳转到商学院
goCollegeScene() { goCollegeScene() {
wx.$router.go('packageEquity.collegeScene') wx.$router.go('packageEquity.collegeScene')
console.log('跳转到商学院') console.log('跳转到工资绩效')
}, },
// 获取版本信息 // 获取版本信息
async getVersionInfo() { async getVersionInfo() {
......
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
</block> </block>
<view class="collegeCon set_box" wx:if="{{ showCollege }}"> <view class="collegeCon set_box" wx:if="{{ showCollege }}">
<view class="set_item" bindtap="goCollegeScene"> <view class="set_item" bindtap="goCollegeScene">
<view class="title">商学院(员工绩效)</view> <view class="title">工资绩效(员工绩效)</view>
<view class="set_tips">去查看</view> <view class="set_tips">去查看</view>
<image class="icon_image" src="./images/right.png" mode="" /> <image class="icon_image" src="./images/right.png" mode="" />
</view> </view>
......
// components/TaskDialog/TaskDialog.js
Component({
/**
* 组件的属性列表
*/
properties: {
showDialog: Boolean,
taskInfo: {
type: Object,
observer: function(n) {
n.checkMonthPeriod = `${{1: '首月', 2: '次月', 3: '第三月'}[n?.checkMonth]}-${{1: '上半月', 2: '下半月'}[n?.checkPeriod]}` // 考核周期
this.setData({
infoData: n
})
}
}
},
/**
* 组件的初始数据
*/
data: {
infoData: {}
},
/**
* 组件的方法列表
*/
methods: {
// 查看驻店目标任务详情
jump() {
wx.$router.go('packageEquity.residentTarget', {id: this.data.infoData?.id})
}
}
})
\ No newline at end of file \ No newline at end of file
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file \ No newline at end of file
<!--components/TaskDialog/TaskDialog.wxml-->
<van-dialog
use-slot
title="驻店目标通知"
show="{{ showDialog }}"
class="auth-dialog-class"
width="622rpx"
closeOnClickOverlay="true"
confirmButtonText="查看明细"
use-title-slot="{{ true }}"
confirm-button-color="#347BFF"
bind:confirm="jump"
bind:close="onClose"
>
<view slot="title">
<view class="title_text">驻店目标通知</view>
</view>
<view class="message-box">
<view class="message">您当前正处于<text style="font-weight: 500;color: #347BFF;">「{{infoData.checkMonthPeriod}}」</text>驻店期,驻店目标已为您展示,请点击查看。祝您顺利完成目标!</view>
</view>
</van-dialog>
\ No newline at end of file \ No newline at end of file
/* components/TaskDialog/TaskDialog.wxss */
.title_text{
font-weight: 500;
color: #222222;
font-size: 32rpx;
}
.message-box{
margin-top: 32rpx;
padding: 0 64rpx 48rpx 64rpx;
font-size: 30rpx;
color: #6C6C70;
font-weight: 400;
}
\ No newline at end of file \ No newline at end of file
...@@ -18,7 +18,7 @@ export const appId = 'wx570d9331f9ace0bd' ...@@ -18,7 +18,7 @@ export const appId = 'wx570d9331f9ace0bd'
* 4预发布 * 4预发布
* 5cdptest * 5cdptest
*/ */
let index = 2 let index = 3
const accountInfo = wx.getAccountInfoSync() const accountInfo = wx.getAccountInfoSync()
const systemInfo = wx.getSystemInfoSync() const systemInfo = wx.getSystemInfoSync()
......
...@@ -2,6 +2,11 @@ ...@@ -2,6 +2,11 @@
"requires": true, "requires": true,
"lockfileVersion": 1, "lockfileVersion": 1,
"dependencies": { "dependencies": {
"@vant/area-data": {
"version": "1.5.1",
"resolved": "https://registry.npmjs.org/@vant/area-data/-/area-data-1.5.1.tgz",
"integrity": "sha512-gR5TPEzTbxN1cTK1aDhCoyikSCLX7DAacxyXoKyI4SAsYYTZrDl/nLgQFIm9vLsvWzlPIda8xV8/U3x7M9k6ww=="
},
"@vant/weapp": { "@vant/weapp": {
"version": "1.10.24", "version": "1.10.24",
"resolved": "https://registry.npmmirror.com/@vant/weapp/-/weapp-1.10.24.tgz", "resolved": "https://registry.npmmirror.com/@vant/weapp/-/weapp-1.10.24.tgz",
......
{ {
"dependencies": { "dependencies": {
"@vant/area-data": "^1.5.1",
"@vant/weapp": "^1.10.24", "@vant/weapp": "^1.10.24",
"glsx-applet-component": "^1.1.25", "glsx-applet-component": "^1.1.25",
"glsx-common-sdk": "^0.2.8",
"number-precision": "^1.6.0", "number-precision": "^1.6.0",
"rfdc": "^1.3.0", "rfdc": "^1.3.0"
"glsx-common-sdk": "^0.2.8"
} }
} }
...@@ -108,6 +108,18 @@ module.exports = { ...@@ -108,6 +108,18 @@ module.exports = {
orderStatistics(data) { orderStatistics(data) {
return api.post('dj.api.smartcarlife.vehicle.damage.upgrade.quotation.order.status.statistics', data) return api.post('dj.api.smartcarlife.vehicle.damage.upgrade.quotation.order.status.statistics', data)
}, },
/** 报价单订单分状态统计信息 */
orderStatistics(data) {
return api.post('dj.api.smartcarlife.vehicle.damage.upgrade.quotation.order.status.statistics', data)
},
/**报价单-撤销工单 */
cancelOrderById(data) {
return api.post('dj.api.smartcarlife.quotation.cancel', data)
},
/** 标记错误订单 */
errorOrderById(data) {
return api.post('dj.api.smartcarlife.quotation.correct', data)
},
/** 校验员工绩效密码 */ /** 校验员工绩效密码 */
performancePasswordCheck(data) { performancePasswordCheck(data) {
...@@ -118,15 +130,15 @@ module.exports = { ...@@ -118,15 +130,15 @@ module.exports = {
performancePassword(data) { performancePassword(data) {
return api.post('dj.api.businessSchool.staff.performancePassword', data) return api.post('dj.api.businessSchool.staff.performancePassword', data)
}, },
// /** 查询员工或园区店商户是否开启了商学院 */ // /** 查询员工或园区店商户是否开启了工资绩效 */
// isBusinessSchoolEnable(data) { // isBusinessSchoolEnable(data) {
// return api.post('dj.api.businessSchool.staff.isBusinessSchoolEnable', data) // return api.post('dj.api.businessSchool.staff.isBusinessSchoolEnable', data)
// }, // },
/** 获取商学院员工订单绩效明细 */ /** 获取工资绩效员工订单绩效明细 */
orderPerformanceDetail(data) { orderPerformanceDetail(data) {
return api.post('dj.api.businessSchool.staff.orderPerformanceDetail', data) return api.post('dj.api.businessSchool.staff.orderPerformanceDetail', data)
}, },
/** 查询员工或园区店商户是否开启了商学院 */ /** 查询员工或园区店商户是否开启了工资绩效 */
isBusinessSchoolEnableCurrentUser(data) { isBusinessSchoolEnableCurrentUser(data) {
return api.post('dj.api.businessSchool.isBusinessSchoolEnable.currentUser', data) return api.post('dj.api.businessSchool.isBusinessSchoolEnable.currentUser', data)
}, },
...@@ -136,12 +148,17 @@ module.exports = { ...@@ -136,12 +148,17 @@ module.exports = {
return api.post('dj.api.businessSchool.staff.performancePassword.update', data) return api.post('dj.api.businessSchool.staff.performancePassword.update', data)
}, },
/** 获取商学院员工信息及前3月绩效信息 */ /** 获取工资绩效员工信息及前3月绩效信息 */
staffInfo(data) { staffInfo(data) {
return api.post('dj.api.businessSchool.staff.info', data) return api.post('dj.api.businessSchool.staff.info', data)
}, },
/** 查询当周员工日报是否填写列表 */
staffDailyReportDetailWeeklyList(data) { /** 将驻店员工目标任务标记为已读 */
return api.post('dj.api.smartcarlife.staff.daily.report.weekly.list', data) taskMarkAsReadApi(data) {
}, return api.post('dj.api.smartcarlife.staffTargetCheck.readTargetCheck', data)
},
/** 查询当周员工日报是否填写列表 */
staffDailyReportDetailWeeklyList(data) {
return api.post('dj.api.smartcarlife.staff.daily.report.weekly.list', data)
}
} }
...@@ -9,7 +9,9 @@ export default { ...@@ -9,7 +9,9 @@ export default {
}, },
/** 获取车型 */ /** 获取车型 */
getCarTypeList(carSeriesId) { getCarTypeList(carSeriesId) {
return api.post('scrm.api.carlife.common.getCarTypeList', { carSeriesId }, [], '/rop-scrm-carlife/router', 'scrm') return api.post('scrm.api.carlife.common.getCarTypeList', {
carSeriesId
}, [], '/rop-scrm-carlife/router', 'scrm')
}, },
/** 权益单分页列表 */ /** 权益单分页列表 */
equityPage(data) { equityPage(data) {
...@@ -61,5 +63,36 @@ export default { ...@@ -61,5 +63,36 @@ export default {
goodsInfoGetDetailById(data) { goodsInfoGetDetailById(data) {
let params = data || {} let params = data || {}
return api.post('dj.api.smartcarlife.goodsInfo.getDetailById', params) return api.post('dj.api.smartcarlife.goodsInfo.getDetailById', params)
} },
}
/**获取客户线索列表 */
getCustomerClueList(params = {}) {
params.pageSize = 10
return api.post('dj.api.smartcarlife.customer.clue.page', params)
},
/** 客户线索今日新增客户 */
getCustomerClueTodayCount(params = {}) {
return api.post('dj.api.smartcarlife.customer.clue.tips.today', params)
},
/** 客户线索详情 */
getCustomerClueDetail(params = {}) {
return api.post('dj.api.smartcarlife.customer.clue.detail', params)
},
/** 查询客户画像 */
portraitQuery(data) {
return api.post('dj.api.smartcarlife.customer.portrait.query', data)
},
/**
* 客户线索状态统计
*/
getCustomerClueStatistics(data) {
return api.post('dj.api.smartcarlife.customer.clue.statistics.status', data)
},
/**
* 获取客户档案列表
*/
getCustomerFileList(data) {
return api.post('dj.api.smartcarlife.vehicle.damage.upgrade.quotation.customer.page', data)
},
}
\ No newline at end of file \ No newline at end of file
// packageEquity/pages/carEquity/components/GLForm/GLForm.js // packageEquity/pages/carEquity/components/GLForm/GLForm.js
Component({ Component({
externalClasses: ['custom-class'], externalClasses: ['custom-class'],
options: { options: {
...@@ -50,7 +51,8 @@ Component({ ...@@ -50,7 +51,8 @@ Component({
* 组件的初始数据 * 组件的初始数据
*/ */
data: { data: {
targetIdx: -1 targetIdx: -1,
areaList: []
}, },
lifetimes: { lifetimes: {
...@@ -199,6 +201,21 @@ Component({ ...@@ -199,6 +201,21 @@ Component({
default: default:
break break
} }
},
showAreaFun() {
let {
showArea,
areaList
} = this.data
if (!areaList.length) areaList = wx.$areaList // 省市区数据
this.setData({
showArea: !showArea,
areaList
})
},
bindRegionChange(e) {
this.triggerEvent('RegionChange', e)
this.showAreaFun()
} }
} }
}) })
\ No newline at end of file \ No newline at end of file
{ {
"component": true, "component": true,
"usingComponents": {} "usingComponents": {
"van-area": "@vant/weapp/area/index",
"van-popup": "@vant/weapp/popup/index"
}
} }
...@@ -60,6 +60,39 @@ ...@@ -60,6 +60,39 @@
<text class="placeholder" wx:else>请选择</text> <text class="placeholder" wx:else>请选择</text>
</view> </view>
</picker> </picker>
<!-- 省市区 -->
<block wx:if="{{item.type == 'region'}}">
<view class="picker" bindtap="showAreaFun">
<image class="arrow" src="/components/images/arrow-x.png" />
<view class="text-hide" wx:if="{{formData[item.labelName]}}">
{{formData[item.labelName]}}
</view>
<text class="placeholder" wx:else>请选择</text>
</view>
<van-popup
show="{{ showArea }}"
position="bottom"
bind:close="showAreaFun"
>
<van-area area-list="{{ areaList }}" columns-num="{{ item.columnsNum }}" title="{{item.label}}" bind:confirm="bindRegionChange" bind:cancel="showAreaFun" />
</van-popup>
</block>
<!-- <picker
mode="region"
bindchange="bindRegionChange"
data-target="{{item}}"
value="{{index}}"
level="{{item.level}}"
disabled="{{item.disabled||disable}}">
<view class="picker">
<image class="arrow" src="/components/images/arrow-x.png" />
<view class="text-hide" wx:if="{{formData[item.labelName]}}">
{{formData[item.labelName]}}
</view>
<text class="placeholder" wx:else>请选择</text>
</view>
</picker> -->
<!-- 时间选择器 --> <!-- 时间选择器 -->
<picker <picker
wx:if="{{item.type == 'pickerTime'}}" wx:if="{{item.type == 'pickerTime'}}"
......
...@@ -25,7 +25,8 @@ Component({ ...@@ -25,7 +25,8 @@ Component({
itemFormObj: [ itemFormObj: [
{ {
label: '交易参考号', label: '交易参考号',
prop: 'outTradeNo' prop: 'outTradeNo',
copy:true
}, },
{ {
label: '支付时间', label: '支付时间',
...@@ -136,6 +137,16 @@ Component({ ...@@ -136,6 +137,16 @@ Component({
thisPage.setData({ thisPage.setData({
orderNoPopup: false orderNoPopup: false
}) })
},
// 复制交易参考号
toCopyNumber(e){
const {ordernum} = e.currentTarget.dataset
wx.setClipboardData({
data: ordernum.toString(),
success (res) {
wx.$util.showToast('已复制')
}
})
} }
} }
}) })
...@@ -15,13 +15,16 @@ ...@@ -15,13 +15,16 @@
refresher-threshold="104" refresher-threshold="104"
refresher-triggered="{{triggered}}"> refresher-triggered="{{triggered}}">
<block wx:for="{{orderNoList}}" wx:key="index"> <block wx:for="{{orderNoList}}" wx:key="index">
<view class="order_no_item {{item.active?'active':''}}" bindtap="changeOrderNo" data-target="{{item}}"> <view class="order_no_item {{item.active?'active':''}}" catch:tap="changeOrderNo" data-target="{{item}}">
<view class="message"> <view class="message">
<block wx:for="{{itemFormObj}}" wx:for-item="subItem" wx:key="idx"> <block wx:for="{{itemFormObj}}" wx:for-item="subItem" wx:key="idx">
<view class="item" wx:if="{{item[subItem.prop]}}"> <view class="item" wx:if="{{item[subItem.prop]}}">
<view class="label">{{subItem.label}}</view> <view class="label">{{subItem.label}}</view>
<view class="value price_value" wx:if="{{subItem.type == 'price'}}">¥{{filter.priceFilter(item[subItem.prop])}}</view> <view class="value price_value" wx:if="{{subItem.type == 'price'}}">¥{{filter.priceFilter(item[subItem.prop])}}</view>
<view class="value" wx:else>{{item[subItem.prop]}}</view> <view class="value" wx:else>
{{item[subItem.prop]}}
<image wx:if="{{subItem.copy}}" catch:tap="toCopyNumber" data-ordernum="{{item[subItem.prop]}}" class="copy_icon" src="../../images/copy_name.png" />
</view>
</view> </view>
</block> </block>
</view> </view>
......
...@@ -87,3 +87,7 @@ ...@@ -87,3 +87,7 @@
.item .price_value{ .item .price_value{
font-weight: 600; font-weight: 600;
} }
.order_no_item .item .copy_icon{
width: 28rpx;
height: 28rpx;
}
...@@ -119,6 +119,7 @@ Page({ ...@@ -119,6 +119,7 @@ Page({
} else { } else {
num = num + 1 num = num + 1
} }
// num <= 2 // num <= 2
if (hasNeedReport) { if (hasNeedReport) {
// if (num <= 2) { // if (num <= 2) {
...@@ -229,7 +230,7 @@ Page({ ...@@ -229,7 +230,7 @@ Page({
// this.test() // this.test()
}, },
getIsBusinessSchoolEnableCurrentUser() { getIsBusinessSchoolEnableCurrentUser() {
// 判断是不是超管 是默认开启商学院 不是查询对应园区 // 判断是不是超管 是默认开启工资绩效 不是查询对应园区
// let userInfo = wx.$util.getUserInfo() // let userInfo = wx.$util.getUserInfo()
let { userInfo } = this.data let { userInfo } = this.data
// let enableBusinessSchool = userInfo?.isSuper ? true : false // let enableBusinessSchool = userInfo?.isSuper ? true : false
...@@ -376,13 +377,11 @@ Page({ ...@@ -376,13 +377,11 @@ Page({
const showPageNum = [1, 2] const showPageNum = [1, 2]
showPageNum.includes(tabIndex) && wx.$eventbus.emit('page_show') // 初始化tab底部条没有的问题 showPageNum.includes(tabIndex) && wx.$eventbus.emit('page_show') // 初始化tab底部条没有的问题
this.initList() this.initList()
this.checkDailyRecport()
}, },
initList() { initList() {
this.getMerchant4SMode() this.getMerchant4SMode()
let { tabIndex } = this.data let { tabIndex } = this.data
const isStaff = app.globalData.isStaff
// 如果是员工 判读是否要填写日报
isStaff && tabIndex == 0 && this.staffDailyReport(wx.$util.getUserInfo())
// console.log(this.selectComponent(`#page-${tabIndex}`)?.onLoad,'this.selectComponent(`#page-${tabIndex}`)?.onLoad'); // console.log(this.selectComponent(`#page-${tabIndex}`)?.onLoad,'this.selectComponent(`#page-${tabIndex}`)?.onLoad');
this.selectComponent(`#page-${tabIndex}`)?.onLoad && this.selectComponent(`#page-${tabIndex}`).onLoad() this.selectComponent(`#page-${tabIndex}`)?.onLoad && this.selectComponent(`#page-${tabIndex}`).onLoad()
}, },
...@@ -432,11 +431,25 @@ Page({ ...@@ -432,11 +431,25 @@ Page({
.catch(err => { }) .catch(err => { })
} }
}, },
checkDailyRecport() {
let { tabIndex } = this.data
const isStaff = app.globalData.isStaff
// 如果是员工 判读是否要填写日报
isStaff && tabIndex == 0 && this.staffDailyReport(wx.$util.getUserInfo())
},
onRoute(options) { onRoute(options) {
console.log(options, 'options') console.log(options, 'options')
if (options && options.tabIndex) { if (options && options.tabIndex) {
this.changeTabBar({ detail: options.tabIndex }) this.changeTabBar({ detail: options.tabIndex })
} }
if (options && options.tabIndex) {
this.changeTabBar({ detail: options.tabIndex })
} else {
if (options && options.tabIndex && options.tabIndex != 0) {
return
}
this.checkDailyRecport()
}
}, },
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
......
...@@ -101,7 +101,7 @@ ...@@ -101,7 +101,7 @@
<view class="item-footer"> <view class="item-footer">
<view>{{item.createdDate}}</view> <view>{{item.createdDate}}</view>
<!-- 超管isSuper/商户类型 userType 1账号不可操作 --> <!-- 超管isSuper/商户类型 userType 1账号不可操作 -->
<block wx:if="{{(!userInfo.isSuper && userInfo.userType == 2)||(item.orderStatus==2) }}"> <block wx:if="{{(!userInfo.isSuper && userInfo.userType == 2&&item.orderStatus!=4)||(item.orderStatus==2) }}">
<view <view
wx:if="{{item.orderStatus == '2'}}" wx:if="{{item.orderStatus == '2'}}"
class="order-btn" class="order-btn"
......
...@@ -60,14 +60,17 @@ Component({ ...@@ -60,14 +60,17 @@ Component({
customer: true, customer: true,
product: true, product: true,
info: true, info: true,
store: true store: true,
retrofit:true
}, },
codeToAttr: { codeToAttr: {
YB0001: 'invoice', YB0001: 'invoice',
YB0003: 'driveFront', YB0003: 'driveFront',
YB0004: 'driveBack', YB0004: 'driveBack',
YB0002: 'contract', YB0002: 'contract',
YB0005: 'other' YB0005: 'other',
QS0001:'retrofitInvoice',
QS0002:'retrofit'
}, },
imgToInfo: { imgToInfo: {
invoice: { invoice: {
...@@ -88,6 +91,14 @@ Component({ ...@@ -88,6 +91,14 @@ Component({
}, },
other: { other: {
code: 'YB0005' code: 'YB0005'
},
retrofitInvoice:{
code:'QS0001',
label: '发票或收据'
},
retrofit:{
code:'QS0002',
label: '加改装部位'
} }
}, },
imgObj: { imgObj: {
...@@ -95,12 +106,17 @@ Component({ ...@@ -95,12 +106,17 @@ Component({
driveFront: [], driveFront: [],
driveBack: [], driveBack: [],
contract: [], contract: [],
other: [] other: [],
retrofitInvoice:[],
retrofit:[]
}, },
popObj: { popObj: {
popValue: '' popValue: ''
}, },
tireObjList: constantData.tireObjList tireObjList: constantData.tireObjList,
retrofitInfo:{
inclueType:1
}
}, },
lifetimes: { lifetimes: {
...@@ -113,6 +129,15 @@ Component({ ...@@ -113,6 +129,15 @@ Component({
* 组件的方法列表 * 组件的方法列表
*/ */
methods: { methods: {
changeInclueType(e){
const {types} = e.target.dataset
let formData = this.getPageData()
formData.addOnsFlag = types
this.setData({
'retrofitInfo.inclueType':types,
formData
})
},
onClickShow(e) { onClickShow(e) {
const { type } = e.target.dataset const { type } = e.target.dataset
this.setData({ imgShow: true, imgType: type }) this.setData({ imgShow: true, imgType: type })
...@@ -122,7 +147,7 @@ Component({ ...@@ -122,7 +147,7 @@ Component({
}, },
dealFormRule() { dealFormRule() {
let formData = this.getPageData() let formData = this.getPageData()
var { formRule } = this.data var { formRule,retrofitInfo } = this.data
// const list = ['tireBrand', 'frontTireSpecification', 'rearTireSpecification'] // const list = ['tireBrand', 'frontTireSpecification', 'rearTireSpecification']
const list = ['tireBrand', 'tireScale', 'leftFrontDTO', 'leftFrontBatch', 'rightFrontDTO', 'rightFrontBatch', 'leftRearDTO', 'leftRearBatch', 'rightRearDTO', 'rightRearBatch'] const list = ['tireBrand', 'tireScale', 'leftFrontDTO', 'leftFrontBatch', 'rightFrontDTO', 'rightFrontBatch', 'leftRearDTO', 'leftRearBatch', 'rightRearDTO', 'rightRearBatch']
if (formData && formData.tireFlag == 0) { if (formData && formData.tireFlag == 0) {
...@@ -130,13 +155,15 @@ Component({ ...@@ -130,13 +155,15 @@ Component({
formRule[item][0].required = false formRule[item][0].required = false
}) })
} }
retrofitInfo.inclueType=formData&&formData.addOnsFlag==0?2:1
this.setData({ this.setData({
formRule formRule,
retrofitInfo
}) })
}, },
dealImg() { dealImg() {
let { serviceInfo, codeToAttr, imgObj } = this.data let { serviceInfo, codeToAttr, imgObj } = this.data
if (serviceInfo.ybAttachmentFlag == 0 && serviceInfo.attachmentList.length) { if ((serviceInfo.ybAttachmentFlag == 0 || serviceInfo.qsFlag==1) && serviceInfo.attachmentList.length) {
serviceInfo.attachmentList.forEach(item => { serviceInfo.attachmentList.forEach(item => {
imgObj[codeToAttr[item.attachmentCode]].push({ url: item.attachmentFile }) imgObj[codeToAttr[item.attachmentCode]].push({ url: item.attachmentFile })
}) })
...@@ -182,20 +209,28 @@ Component({ ...@@ -182,20 +209,28 @@ Component({
return thisPage?.data[this.data.dataAttrName] return thisPage?.data[this.data.dataAttrName]
}, },
confirmDealImg() { confirmDealImg() {
var { serviceInfo, imgObj, imgToInfo } = this.data var { serviceInfo, imgObj, imgToInfo,retrofitInfo } = this.data
let formData = this.getPageData() let formData = this.getPageData()
// 图片处理 // 图片处理
if (serviceInfo.ybAttachmentFlag == 0) { if (serviceInfo.ybAttachmentFlag == 0 || serviceInfo.qsFlag==1) {
formData.attachmentList = [] formData.attachmentList = []
let attrList = Object.keys(imgObj) let attrList = Object.keys(imgObj)
for (let i = 0; i < attrList.length; i++) { for (let i = 0; i < attrList.length; i++) {
let item = attrList[i] let item = attrList[i]
imgObj[item].forEach(k => { imgObj[item].forEach(k => {
formData.attachmentList.push({ if((item=='retrofitInvoice' || item=='retrofit')&&retrofitInfo.inclueType==1){
attachmentCode: imgToInfo[item].code, formData.attachmentList.push({
attachmentType: 'IMG', attachmentCode: imgToInfo[item].code,
attachmentFile: k.url attachmentType: 'IMG',
}) attachmentFile: k.url
})
}else if(item!='retrofitInvoice' && item!='retrofit'){
formData.attachmentList.push({
attachmentCode: imgToInfo[item].code,
attachmentType: 'IMG',
attachmentFile: k.url
})
}
}) })
} }
} }
...@@ -214,7 +249,7 @@ Component({ ...@@ -214,7 +249,7 @@ Component({
}) })
}, },
handleConfirm(e) { handleConfirm(e) {
var { formRule, serviceInfo, imgObj, imgToInfo, energyFormRule, oilFormRule } = this.data var { formRule, serviceInfo, imgObj, imgToInfo, energyFormRule, oilFormRule,retrofitInfo } = this.data
let formData = this.getPageData() let formData = this.getPageData()
let validObj = fn.checkRequired(formData, formRule) let validObj = fn.checkRequired(formData, formRule)
if (validObj) { if (validObj) {
...@@ -259,12 +294,12 @@ Component({ ...@@ -259,12 +294,12 @@ Component({
} }
} }
// 图片处理 // 图片处理
if (serviceInfo.ybAttachmentFlag == 0) { if (serviceInfo.ybAttachmentFlag == 0 || serviceInfo.qsFlag==1) {
formData.attachmentList = [] formData.attachmentList = []
let attrList = Object.keys(imgObj) let attrList = Object.keys(imgObj)
for (let i = 0; i < attrList.length; i++) { for (let i = 0; i < attrList.length; i++) {
let item = attrList[i] let item = attrList[i]
if (item != 'other' && !imgObj[item].length) { if ((item != 'other' && !imgObj[item].length&&item != 'retrofitInvoice'&&item != 'retrofit'&&serviceInfo.ybAttachmentFlag==0) || (item == 'retrofitInvoice' && !imgObj[item].length &&retrofitInfo.inclueType==1&&serviceInfo.qsFlag==1) || (item == 'retrofit' && !imgObj[item].length &&retrofitInfo.inclueType==1&&serviceInfo.qsFlag==1)) {
wx.$util.showToast('请上传' + imgToInfo[item].label) wx.$util.showToast('请上传' + imgToInfo[item].label)
return true return true
} }
......
...@@ -131,6 +131,36 @@ ...@@ -131,6 +131,36 @@
</view> </view>
</gl-form> </gl-form>
</view> </view>
<!-- 改装件信息 -->
<view wx:if="{{serviceInfo.qsFlag==1}}" class="box m-b-40">
<view class="title">
<view>改装件信息</view>
<view class="up-down-box" bindtap="handleUpDown" data-attr="retrofit">
<view class="up-down-arrow">
<view class="arrow-up {{isShowObj.retrofit ? '' : 'arrow-down'}}"></view>
</view>
</view>
</view>
<gl-form wx:if="{{isShowObj.retrofit}}" id="retrofit" formData="{{serviceInfo}}" dataAttrName="{{dataAttrName}}" formDataList="{{secondObj.retrofitList}}">
<view slot="upload" class="{{retrofitInfo.inclueType==1?'upload':''}}">
<gl-cell border class="pay-type" label="含加改装件" valueAlign="right" labelWidth="140rpx">
<view class="switch-box">
<view class="block text-center {{ retrofitInfo.inclueType==1?'':'right' }}" />
<view class="left text-center {{ retrofitInfo.inclueType == 1?'active':'' }}" bindtap="changeInclueType" data-types="1">是</view>
<view class="right text-center {{ retrofitInfo.inclueType == 2?'active':'' }}" bindtap="changeInclueType" data-types="2">否</view>
</view>
</gl-cell>
<block wx:if="{{retrofitInfo.inclueType==1}}">
<view class="label">发票或收据</view>
<van-uploader class="plus" file-list="{{ imgObj.retrofitInvoice }}" upload-text="上传照片" max-count="1" deletable preview-size="192rpx" bind:after-read="upLoad" bind:delete="handleDeleteImg" data-attr="retrofitInvoice">
</van-uploader>
<view class="label">加改装部位照片</view>
<van-uploader class="plus" file-list="{{ imgObj.retrofit }}" upload-text="上传照片" max-count="1" deletable preview-size="192rpx" bind:after-read="upLoad" bind:delete="handleDeleteImg" data-attr="retrofit">
</van-uploader>
</block>
</view>
</gl-form>
</view>
<view class="box m-b-40"> <view class="box m-b-40">
<view class="title"> <view class="title">
<view>店面信息</view> <view>店面信息</view>
......
...@@ -313,4 +313,62 @@ ...@@ -313,4 +313,62 @@
.upload .van-uploader .van-uploader__wrapper .van-uploader__upload { .upload .van-uploader .van-uploader__wrapper .van-uploader__upload {
order: 0 !important; order: 0 !important;
}
.switch-box {
/* box-sizing: border-box; */
width: 216rpx;
height: 60rpx;
display: flex;
border: 2rpx solid #347BFF;
border-radius: 12rpx;
font-size: 28rpx;
color: #347BFF;
margin-left: auto;
margin-right: -30rpx;
position: relative;
}
.switch-box .block {
position: absolute;
/* top: 0; */
top: 50%;
transform: translateY(-50%);
border: 2rpx solid #347BFF;
left: 0;
width: 50%;
border-radius: 12rpx;
height: 100%;
background: #347BFF;
color: #fff;
transition: all .25s;
}
.switch-box .block.right {
left: 50%;
top: 50%;
}
.switch-box .left,
.switch-box .right {
width: 50%;
height: 100%;
position: absolute;
top: 0;
transition: all .25s;
}
.switch-box .left {
left: 0;
}
.switch-box .right {
right: 0;
}
.switch-box .left.active,
.switch-box .right.active {
color: #fff;
}
.pay-type .cell {
padding-left: 20rpx!important;
} }
\ No newline at end of file \ No newline at end of file
...@@ -649,7 +649,14 @@ const secondObj = { ...@@ -649,7 +649,14 @@ const secondObj = {
// noCellHeight: true, // noCellHeight: true,
maxlength: '100' maxlength: '100'
} }
] ],
retrofitList:[{
label: ' ',
name: 'upload',
type: 'slot',
labelWidth: '0rpx',
noCellHeight: true,
}]
} }
export default { export default {
......
...@@ -48,7 +48,6 @@ Page({ ...@@ -48,7 +48,6 @@ Page({
cardSetting: true, cardSetting: true,
isAsk: false isAsk: false
}, },
getPickerObj(obj) { getPickerObj(obj) {
let data = [] let data = []
if (!obj) { if (!obj) {
...@@ -290,6 +289,7 @@ Page({ ...@@ -290,6 +289,7 @@ Page({
let params = this.dealComfirmData(JSON.parse(JSON.stringify(serviceInfo))) let params = this.dealComfirmData(JSON.parse(JSON.stringify(serviceInfo)))
// 0草稿,1提单 // 0草稿,1提单
params.operationType = typeObj[type] params.operationType = typeObj[type]
params.addOnsFlag = serviceInfo.addOnsFlag==2?0:1
console.log(params, '调接口---') console.log(params, '调接口---')
this.setData({ this.setData({
isAsk: true isAsk: true
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
import data from '../constant/stepData' import data from '../constant/stepData'
import fn from '../constant/ruleFn' import fn from '../constant/ruleFn'
import carLifeApi from '~/packageEquity/carEquityApi' import carLifeApi from '~/packageEquity/carEquityApi'
import commonApi from '~/api/api'
const defaultLabelWidth = '140rpx' const defaultLabelWidth = '140rpx'
// import api from '~/api/api' // import api from '~/api/api'
Component({ Component({
...@@ -48,8 +48,12 @@ Component({ ...@@ -48,8 +48,12 @@ Component({
}, },
observers: { observers: {
'orderInfo.mode': function (value) { 'orderInfo.mode': function (value) {
this.getYqStoreConfig()
// if (n.mode) { // if (n.mode) {
// console.log(value, 'mode') console.log(value, data, data.firstObjSimple, 'mode')
console.log({
first: value ? data.firstObjSimple : data.firstObj
}, ' first: value ? data.firstObjSimple : data.firstObj,');
// first: data.firstObj, // first: data.firstObj,
this.setData({ this.setData({
first: value ? data.firstObjSimple : data.firstObj, first: value ? data.firstObjSimple : data.firstObj,
...@@ -74,7 +78,7 @@ Component({ ...@@ -74,7 +78,7 @@ Component({
defaultLabelWidth, defaultLabelWidth,
formData: {}, formData: {},
employeeList: [], employeeList: [],
first: data.firstObj, first: data.firstObjSimple,
disable: true, disable: true,
formRule: data.formRuleSimple, formRule: data.formRuleSimple,
referrerPicker: false, referrerPicker: false,
...@@ -209,6 +213,72 @@ Component({ ...@@ -209,6 +213,72 @@ Component({
// debugger // debugger
this.triggerEvent('confirm') this.triggerEvent('confirm')
return true return true
} },
showCustomPop() {
this.setData({
customerInfoBox: true
})
},
chooseCustomerInfo(e) {
console.log(e)
let {
customer
} = e.detail
const thisPage = wx.$router.getPageInstance()
thisPage.setCustomerInfo(customer)
},
changeGender(e) {
let {
gender
} = e.currentTarget.dataset
wx.vibrateShort()
const thisPage = wx.$router.getPageInstance()
thisPage.setData({
['owner.ownerGender']: gender
})
},
bindRegionChange(e) {
const thisPage = wx.$router.getPageInstance(),
{
values
} = e.detail.detail
let city = Array.from(new Set([...values.map(e => e.name)]))
thisPage.setData({
['owner.city']: city.join('-')
})
},
// 品牌车型
handleJumpBrand(e) {
wx.$router.go('packageEquity.carBrands')
},
/**获取园区配置 */
async getYqStoreConfig() {
const {
merchantId: yqMerchantId
} = wx.$util.getUserInfo(), {
first
} = this.data, {
data
} = await commonApi.getYqStoreConfig({
yqMerchantId
})
let {
customerFormList,
carFormList
} = first
//是否配置园区店面档案互通 Y / N
if (data) {
if (data.customerExchangeFlag == 'N') {
customerFormList = customerFormList.filter(item => !item.configItem)
carFormList = carFormList.filter(item => !item.configItem)
}
}
this.setData({
['first.customerFormList']: customerFormList,
['first.carFormList']: carFormList,
showCustomeBtn: data.customerExchangeFlag == 'Y'
})
},
} }
}) })
\ No newline at end of file \ No newline at end of file
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
"usingComponents": { "usingComponents": {
"gl-form": "/packageEquity/components/GLForm/GLForm", "gl-form": "/packageEquity/components/GLForm/GLForm",
"Gl-Button-Group": "../../../../components/GlButtonGroup/GlButtonGroup", "Gl-Button-Group": "../../../../components/GlButtonGroup/GlButtonGroup",
"store-referrer-picker": "../storeReferrerPicker/storeReferrerPicker" "store-referrer-picker": "../storeReferrerPicker/storeReferrerPicker",
"customerInfo": "/components/CustomerInfo/CustomerInfo"
} }
} }
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
.title { .title {
display: flex; display: flex;
justify-content: space-between; // justify-content: space-between;
align-items: center; align-items: center;
height: 96rpx; height: 96rpx;
line-height: 96rpx; line-height: 96rpx;
...@@ -51,6 +51,25 @@ ...@@ -51,6 +51,25 @@
font-size: 32rpx; font-size: 32rpx;
padding: 0 32rpx; padding: 0 32rpx;
.file-btn {
width: 180rpx;
height: 48rpx;
background: #FFFFFF;
border: 2rpx solid #347BFF;
border-radius: 32rpx;
display: flex;
align-items: center;
justify-content: center;
font-size: 26rpx;
color: #347BFF;
margin-left: 20rpx;
.icon {
width: 28rpx;
height: 28rpx;
margin-right: 8rpx;
}
}
.ocrBtn { .ocrBtn {
box-sizing: border-box; box-sizing: border-box;
display: flex; display: flex;
...@@ -62,7 +81,7 @@ ...@@ -62,7 +81,7 @@
background-color: #e5f2fd; background-color: #e5f2fd;
border-radius: 32rpx; border-radius: 32rpx;
padding: 6rpx 20rpx; padding: 6rpx 20rpx;
margin-left: auto;
.pictureIcon { .pictureIcon {
width: 28rpx; width: 28rpx;
height: 28rpx; height: 28rpx;
...@@ -166,4 +185,58 @@ ...@@ -166,4 +185,58 @@
.draft-btn { .draft-btn {
background: #FFFFFF; background: #FFFFFF;
color: #347BFF; color: #347BFF;
}
.gender-box {
/* box-sizing: border-box; */
width: 236rpx;
height: 60rpx;
display: flex;
border: 2rpx solid #347BFF;
border-radius: 12rpx;
font-size: 28rpx;
color: #347BFF;
margin-left: auto;
position: relative;
}
.gender-box .block {
position: absolute;
/* top: 0; */
top: 50%;
transform: translateY(-50%);
border: 2rpx solid #347BFF;
left: 0;
width: 50%;
border-radius: 12rpx;
height: 100%;
background: #347BFF;
color: #fff;
transition: all .25s;
}
.gender-box .block.right {
left: 50%;
}
.gender-box .male,
.gender-box .woman {
width: 50%;
height: 100%;
position: absolute;
top: 0;
transition: all .25s;
}
.gender-box .male {
left: 0;
}
.gender-box .woman {
right: 0;
}
.gender-box .male.active,
.gender-box .woman.active {
color: #fff;
} }
\ No newline at end of file \ No newline at end of file
<!-- packageEquity/pages/carEquity/components/FirstStep/FirstStep.wxml --> <!-- packageEquity/pages/carEquity/components/FirstStep/FirstStep.wxml -->
<view class="firstStep"> <view class="firstStep">
<view class="box employeeBox"> <view class="box employeeBox">
<gl-cell <gl-cell border valueAlign="right" label="推荐人" class="pickerCell" required="{{true}}" requiredAfter="{{true}}" labelWidth="{{defaultLabelWidth}}">
border <!-- <picker
valueAlign="right"
label="推荐人"
class="pickerCell"
required="{{true}}"
requiredAfter="{{true}}"
labelWidth="{{defaultLabelWidth}}">
<!-- <picker
bindchange="handleSalesChange" bindchange="handleSalesChange"
value="{{index}}" value="{{index}}"
range="{{employeeList}}" range="{{employeeList}}"
range-key="staffName"> --> range-key="staffName"> -->
<view class="picker" bindtap="handleReferrerPicker"> <view class="picker" bindtap="handleReferrerPicker">
<image class="pickerArrow" src="/components/images/arrow-x.png" /> <image class="pickerArrow" src="/components/images/arrow-x.png" />
<view class="text-hide" wx:if="{{orderInfo.referrerId }}">{{orderInfo.referrer }}</view> <view class="text-hide" wx:if="{{orderInfo.referrerId }}">{{orderInfo.referrer }}</view>
<text class="placeholder" wx:else>请选择</text> <text class="placeholder" wx:else>请选择</text>
</view> </view>
<!-- </picker> --> <!-- </picker> -->
</gl-cell> </gl-cell>
</view> </view>
<view class="box"> <view class="box">
<!-- <view class="title">客户信息</view> --> <!-- <view class="title">客户信息</view> -->
<view class="title"> <view class="title">
<view>客户信息</view> <view>客户信息</view>
<view class="ocrBtn" data-type="idCard" bind:tap="navOcr"> <block wx:if="{{showCustomeBtn}}">
<image <view class="file-btn" bindtap="showCustomPop">
data-type="idCard" <gl-image webp src="/equity/file.png" class="icon"></gl-image>
data-ocrType="idCard" 客户档案
class="pictureIcon" </view>
src="/packageEquity/images/pictureIcon.png" </block>
binderror="" <view class="ocrBtn" data-type="idCard" bind:tap="navOcr">
bindload="" /> <image data-type="idCard" data-ocrType="idCard" class="pictureIcon" src="/packageEquity/images/pictureIcon.png" binderror="" bindload="" />
<view class="text" data-type="idCard">拍照识别</view> <view class="text" data-type="idCard">拍照识别</view>
</view> </view>
</view> </view>
<gl-form <gl-form disable="{{disable}}" formData="{{serviceInfo}}" dataAttrName="{{dataAttrName}}" formDataList="{{first.customerFormList}}" bindRegionChange="bindRegionChange">
disable="{{disable}}" <view class="gender-box" slot="ownerGender">
formData="{{serviceInfo}}" <view class="block text-center {{ serviceInfo.ownerGender=='男'?'':'right' }}" />
dataAttrName="{{dataAttrName}}" <view class="male text-center {{ serviceInfo.ownerGender == '男'?'active':'' }}" bindtap="changeGender" data-gender="男">男</view>
formDataList="{{first.customerFormList}}" /> <view class="woman text-center {{ serviceInfo.ownerGender == '女'?'active':'' }}" bindtap="changeGender" data-gender="女">女</view>
</view> </view>
<view class="box"> </gl-form>
<view class="title"> </view>
<view>车辆信息</view> <view class="box">
<view class="ocrBtn" data-type="vehicleCertificate" bind:tap="navOcr"> <view class="title">
<image <view>车辆信息</view>
data-type="vehicleCertificate" <view class="ocrBtn" data-type="vehicleCertificate" bind:tap="navOcr">
data-ocrType="car" <image data-type="vehicleCertificate" data-ocrType="car" class="pictureIcon" src="/packageEquity/images/pictureIcon.png" binderror="" bindload="" />
class="pictureIcon" <view class="text" data-type="vehicleCertificate">拍照识别</view>
src="/packageEquity/images/pictureIcon.png" </view>
binderror="" </view>
bindload="" /> <gl-form disable="{{disable}}" formData="{{serviceInfo}}" dataAttrName="{{dataAttrName}}" bind:inputEvent="inputEvent" formDataList="{{first.carFormList}}">
<view class="text" data-type="vehicleCertificate">拍照识别</view> <view slot="brands" class="brand" bindtap="handleJumpBrand">
</view> <view wx:if="{{serviceInfo.carBrandId}}">
</view> {{serviceInfo.carBrand || ''}}/{{serviceInfo.carChildsBrandName || ''}}/{{serviceInfo.carSeriesName || ''}}
<gl-form </view>
disable="{{disable}}" <view wx:else class="placeholder-class">请选择</view>
formData="{{serviceInfo}}" </view>
dataAttrName="{{dataAttrName}}" </gl-form>
bind:inputEvent="inputEvent" </view>
formDataList="{{first.carFormList}}" /> <Gl-Button-Group wx:if="{{subBtnShow}}" bindbtnTap="btnTap" textNameObj="{{textNameObj}}" />
</view>
<Gl-Button-Group wx:if="{{subBtnShow}}" bindbtnTap="btnTap" textNameObj="{{textNameObj}}" />
</view> </view>
<store-referrer-picker <store-referrer-picker bindconfirm="handleSalesChange" show="{{referrerPicker}}" referrerId="{{orderInfo.referrerId}}" pickerListAll="{{employeeList}}" />
bindconfirm="handleSalesChange"
show="{{referrerPicker}}"
referrerId="{{orderInfo.referrerId}}"
pickerListAll="{{employeeList}}" />
<customerInfo show="{{ customerInfoBox }}" bindconfirm="chooseCustomerInfo" apiType="2" />
\ No newline at end of file \ No newline at end of file
...@@ -14,6 +14,8 @@ Component({ ...@@ -14,6 +14,8 @@ Component({
observer: function (n) { observer: function (n) {
} }
}, },
resetTransNo: String,
resetOrder: Boolean
}, },
/** /**
...@@ -36,8 +38,9 @@ Component({ ...@@ -36,8 +38,9 @@ Component({
* 组件的方法列表 * 组件的方法列表
*/ */
methods: { methods: {
noScroll() {}, noScroll() { },
close() { close() {
let thisPage = wx.$router.getPageInstance()
let { routerBack } = this.data let { routerBack } = this.data
if (routerBack) { if (routerBack) {
wx.navigateBack() wx.navigateBack()
...@@ -46,6 +49,12 @@ Component({ ...@@ -46,6 +49,12 @@ Component({
this.setData({ this.setData({
show: false show: false
}) })
// 点击关闭 情况门店付款数据
thisPage.setData({
showPopup: false,
['orderInfo.transactionNo']: '',
['orderInfo.paymentDocList']: []
})
}, },
input(e) { input(e) {
let { value } = e.detail let { value } = e.detail
...@@ -76,7 +85,7 @@ Component({ ...@@ -76,7 +85,7 @@ Component({
console.log(img) console.log(img)
let { code, data, message } = img let { code, data, message } = img
if (code == 0) { if (code == 0) {
payVoucherList.push({url: data}) payVoucherList.push({ url: data })
_this.setData({ _this.setData({
payVoucherList payVoucherList
}) })
...@@ -108,24 +117,38 @@ Component({ ...@@ -108,24 +117,38 @@ Component({
}) })
}, },
confirm(e) { confirm(e) {
let { outTradeNo, payVoucherList } = this.data let { outTradeNo, payVoucherList, resetOrder } = this.data
// debugger // debugger
// console.log(wx.$router) // console.log(wx.$router)
let thisPage = wx.$router.getPageInstance() let thisPage = wx.$router.getPageInstance()
if (resetOrder) return this.newResetOrder()
// if (orderType == 2) { // if (orderType == 2) {
if (payVoucherList.length && outTradeNo) { if (payVoucherList.length && outTradeNo) {
thisPage.setData({ thisPage.setData({
['orderInfo.transactionNo']: outTradeNo, ['orderInfo.transactionNo']: outTradeNo,
['orderInfo.paymentDocList']: payVoucherList.map(item=>item.url) ['orderInfo.paymentDocList']: payVoucherList.map(item => item.url)
}) })
console.log(thisPage.handleSecondConfirm); console.log(thisPage.handleSecondConfirm);
thisPage.handleSecondConfirm() thisPage.handleSecondConfirm()
} else { } else {
wx.$util.showToast('交易流水号或付款凭证不能为空!') wx.$util.showToast('交易流水号或付款凭证不能为空!')
} }
// } // }
}, },
// 标记错误订单&补录订单
newResetOrder() {
let { resetTransNo, payVoucherList } = this.data
let thisPage = wx.$router.getPageInstance()
if (payVoucherList.length && resetTransNo) {
thisPage.setData({
['orderInfo.transactionNo']: resetTransNo,
['orderInfo.paymentDocList']: payVoucherList.map(item => item.url)
})
thisPage.handleSecondConfirm()
} else {
wx.$util.showToast('交易流水号或付款凭证不能为空!')
}
}
} }
}) })
...@@ -10,7 +10,8 @@ ...@@ -10,7 +10,8 @@
<block wx:if="{{orderType == 2}}"> <block wx:if="{{orderType == 2}}">
<view class="input-item"> <view class="input-item">
<view class="title-text">交易流水号</view> <view class="title-text">交易流水号</view>
<view class="input-box"> <view class="input-box" wx:if="{{resetOrder}}">{{resetTransNo}}</view>
<view wx:else class="input-box">
<input <input
type="text" type="text"
class="input" class="input"
......
...@@ -72,6 +72,14 @@ Component({ ...@@ -72,6 +72,14 @@ Component({
}) })
// } // }
}, },
'orderInfo.resetOrder': function (value) {
// console.log(value, 'outTradeNo')
// if (value) {
value && this.setData({
['textNameObj.cancelName']: '放弃'
})
// }
},
}, },
/** /**
* 组件的初始数据 * 组件的初始数据
......
...@@ -391,4 +391,15 @@ ...@@ -391,4 +391,15 @@
.van-cell:after { .van-cell:after {
border: none!important; border: none!important;
}
\ No newline at end of file \ No newline at end of file
}
.only-select-text{
width: 300rpx;
height: 60rpx;
display: flex;
align-items: center;
justify-content: flex-end;
font-size: 28rpx;
margin-left: auto;
margin-right: -30rpx;
position: relative;
}
\ No newline at end of file \ No newline at end of file
...@@ -51,8 +51,9 @@ ...@@ -51,8 +51,9 @@
<view class="label">其他信息</view> <view class="label">其他信息</view>
</view> </view>
</view> </view>
<gl-cell wx:if="{{!orderInfo.outTradeNo}}" border class="pay-type" label="支付方式" valueAlign="right" labelWidth="140rpx"> <gl-cell wx:if="{{!orderInfo.outTradeNo || orderInfo.resetOrder}}" border class="pay-type" label="支付方式" valueAlign="right" labelWidth="140rpx">
<view class="switch-box"> <view class="only-select-text" wx:if="{{orderInfo.resetOrder}}">门店收款</view>
<view wx:else class="switch-box">
<view class="block text-center {{ orderInfo.payType==1?'':'right' }}" /> <view class="block text-center {{ orderInfo.payType==1?'':'right' }}" />
<view class="left text-center {{ orderInfo.payType == 1?'active':'' }}" bindtap="changePayType" data-payType="1">线上支付</view> <view class="left text-center {{ orderInfo.payType == 1?'active':'' }}" bindtap="changePayType" data-payType="1">线上支付</view>
<view class="right text-center {{ orderInfo.payType == 2?'active':'' }}" bindtap="changePayType" data-payType="2">门店收款</view> <view class="right text-center {{ orderInfo.payType == 2?'active':'' }}" bindtap="changePayType" data-payType="2">门店收款</view>
......
...@@ -57,10 +57,28 @@ const buyCarTypeList = [{ ...@@ -57,10 +57,28 @@ const buyCarTypeList = [{
optionId: 1, optionId: 1,
optionLabel: '全款车' optionLabel: '全款车'
}] }]
const ageList = [{
optionId: 0,
optionLabel: '20岁以下',
},
{
optionId: 1,
optionLabel: '21-30岁'
},{
optionId: 2,
optionLabel: '31-40岁'
},{
optionId: 3,
optionLabel: '41-50岁'
},{
optionId: 4,
optionLabel: '51岁以上'
}]
export default { export default {
seatesList, seatesList,
customerTypeList, customerTypeList,
cardTypeList, cardTypeList,
buyCarTypeList buyCarTypeList,
ageList
} }
...@@ -131,14 +131,72 @@ const firstObj = { ...@@ -131,14 +131,72 @@ const firstObj = {
requiredAfter: true requiredAfter: true
}, },
{ {
label: '性别',
name: 'ownerGender',
type: 'slot',
configItem: true
},
{
label: '年龄区间',
name: 'ageRange',
labelName: 'ageRange',
type: 'select',
optionList: constantList.ageList,
optionId: 'optionId',
optionLabel: 'optionLabel',
placeholder: '点击选择(非必填)',
configItem: true
},
{
label: '所在城市',
name: 'city',
labelName: 'city',
type: 'region',
columnsNum:'2',
placeholder: '点击选择(非必填)',
configItem: true
},
{
label: '证件号码', label: '证件号码',
name: 'certificateNo', name: 'certificateNo',
type: 'input', type: 'input',
maxlength: '18', maxlength: '18',
placeholder: '请输入(非必填)' placeholder: '请输入(非必填)'
} },
{
label: '兴趣爱好',
name: 'hobby',
type: 'input',
maxlength: '200',
fieldType: 'textarea',
configItem: true,
noCellHeight: true,
},
{
label: '陪伴人员',
name: 'companion',
type: 'input',
maxlength: '200',
fieldType: 'textarea',
configItem: true,
noCellHeight: true,
},
], ],
carFormList: [{ carFormList: [
{
label: '车型',
name: 'brands',
type: 'slot',
configItem: true
},
{
label: '车辆颜色',
name: 'carColor',
type: 'input',
maxlength: '20',
configItem: true
},
{
label: '车架号', label: '车架号',
name: 'carVin', name: 'carVin',
type: 'input', type: 'input',
...@@ -146,7 +204,6 @@ const firstObj = { ...@@ -146,7 +204,6 @@ const firstObj = {
required: true, required: true,
requiredAfter: true requiredAfter: true
}, },
{ {
label: '座位数', label: '座位数',
name: 'seat', name: 'seat',
...@@ -192,14 +249,72 @@ const firstObjSimple = { ...@@ -192,14 +249,72 @@ const firstObjSimple = {
requiredAfter: true requiredAfter: true
}, },
{ {
label: '性别',
name: 'ownerGender',
type: 'slot',
configItem: true
},
{
label: '年龄区间',
name: 'ageRange',
labelName: 'ageRange',
type: 'select',
optionList: constantList.ageList,
optionId: 'optionId',
optionLabel: 'optionLabel',
placeholder: '点击选择(非必填)',
configItem: true
},
{
label: '所在城市',
name: 'city',
labelName: 'city',
type: 'region',
columnsNum:'2',
placeholder: '点击选择(非必填)',
configItem: true
},
{
label: '证件号码', label: '证件号码',
name: 'certificateNo', name: 'certificateNo',
type: 'input', type: 'input',
maxlength: '18', maxlength: '18',
placeholder: '请输入(非必填)' placeholder: '请输入(非必填)'
} },
{
label: '兴趣爱好',
name: 'hobby',
type: 'input',
maxlength: '200',
fieldType: 'textarea',
configItem: true,
noCellHeight: true,
},
{
label: '陪伴人员',
name: 'companion',
type: 'input',
maxlength: '200',
fieldType: 'textarea',
configItem: true,
noCellHeight: true,
},
], ],
carFormList: [{ carFormList: [
{
label: '车型',
name: 'brands',
type: 'slot',
configItem: true
},
{
label: '车辆颜色',
name: 'carColor',
type: 'input',
maxlength: '20',
configItem: true
},
{
label: '车架号', label: '车架号',
name: 'carVin', name: 'carVin',
type: 'input', type: 'input',
...@@ -207,7 +322,6 @@ const firstObjSimple = { ...@@ -207,7 +322,6 @@ const firstObjSimple = {
// required:true, // required:true,
// requiredAfter:true // requiredAfter:true
}, },
{ {
label: '座位数', label: '座位数',
name: 'seat', name: 'seat',
...@@ -292,6 +406,7 @@ const optionsSelect = { ...@@ -292,6 +406,7 @@ const optionsSelect = {
} }
] ]
} }
export default { export default {
formRule, formRule,
firstObj, firstObj,
......
...@@ -7,6 +7,8 @@ const orderStatusObj = { ...@@ -7,6 +7,8 @@ const orderStatusObj = {
'4': '已支付', '4': '已支付',
'5': '已完成', '5': '已完成',
'-1': '战败', '-1': '战败',
'9':'已撤销',
'11':'已失效'
} }
const orderStatusList = [{ const orderStatusList = [{
confName: '待报价', confName: '待报价',
......
...@@ -7,11 +7,13 @@ import { ...@@ -7,11 +7,13 @@ import {
quotationUpgrade, quotationUpgrade,
getQuotationInfoById, getQuotationInfoById,
listByMerchantIdAndIds, listByMerchantIdAndIds,
quotationRecording quotationRecording,
errorOrderById
} from '../../../api' } from '../../../api'
import { import {
quotedImgUrl quotedImgUrl
} from '~/config' } from '~/config'
import NP from 'number-precision'
Page({ Page({
/** /**
* 页面的初始数据 * 页面的初始数据
...@@ -27,7 +29,19 @@ Page({ ...@@ -27,7 +29,19 @@ Page({
seat: '5', seat: '5',
price: '', price: '',
confirmStatus: false, confirmStatus: false,
saveStatus: false saveStatus: false,
ownerGender: '男',
city: '',
ageRange: '',
hobby: '',
companion: '',
carColor: '',
carBrandId: '',
carBrand: '',
carChildsBrandId: '',
carChildsBrandName: '',
carSeriesId: '',
carSeriesName: ''
}, },
quotationGoodsList: [], //权益商品列表 quotationGoodsList: [], //权益商品列表
// owner: { // owner: {
...@@ -201,9 +215,10 @@ Page({ ...@@ -201,9 +215,10 @@ Page({
// 是订单补录直接走另外的补录逻辑 // 是订单补录直接走另外的补录逻辑
console.log(outTradeNo, '是订单补录直接走另外的补录逻辑'); console.log(outTradeNo, '是订单补录直接走另外的补录逻辑');
if (outTradeNo) return this.setQuotationRecording() if (outTradeNo && !orderInfo.resetOrder) return this.setQuotationRecording()
// debugger // debugger
// 如果是门店收款 并且付款凭证没有填 // 如果是门店收款 并且付款凭证没有填
orderInfo.paymentDocList = orderInfo.paymentDocList || []
if (orderInfo.payType == 2 && !(orderInfo.transactionNo && orderInfo.paymentDocList.length)) return this.setData({ if (orderInfo.payType == 2 && !(orderInfo.transactionNo && orderInfo.paymentDocList.length)) return this.setData({
showPopup: true, showPopup: true,
confirmStatus: false confirmStatus: false
...@@ -303,6 +318,14 @@ Page({ ...@@ -303,6 +318,14 @@ Page({
return new Promise(async (resolve, reject) => { return new Promise(async (resolve, reject) => {
// let { orderInfo } = this.data // let { orderInfo } = this.data
console.log('调接口---') console.log('调接口---')
// 标记错误--补录订单
if (orderInfo.resetOrder && orderInfo.id) {
orderInfo.oldQuotationId = orderInfo.id
orderInfo.transactionNo = orderInfo.transactionNo || orderInfo.outTradeNo
orderInfo.transactionNo = orderInfo.transactionNo + ','
let result = await errorOrderById(orderInfo)
return resolve(result)
}
// 编辑后重新提交 // 编辑后重新提交
if (orderInfo.id) { if (orderInfo.id) {
let result = await updateQuotation(orderInfo) let result = await updateQuotation(orderInfo)
...@@ -355,7 +378,11 @@ Page({ ...@@ -355,7 +378,11 @@ Page({
item.price = this.divideByHundred(item.goodsPrice) item.price = this.divideByHundred(item.goodsPrice)
return item return item
}) })
// 标识为补录工单
if (this.resetOrder) {
orderInfo.resetOrder = this.resetOrder
tableInfo.payType = 2
}
this.setData({ this.setData({
orderInfo: Object.assign(orderInfo, tableInfo, { orderInfo: Object.assign(orderInfo, tableInfo, {
insureList: [] insureList: []
...@@ -413,7 +440,7 @@ Page({ ...@@ -413,7 +440,7 @@ Page({
saveStatus saveStatus
} = this.data } = this.data
// 补单点放弃 // 补单点放弃
if (orderInfo.outTradeNo) { if (orderInfo.outTradeNo || orderInfo.resetOrder) {
return wx.$router.redirectTo('packageEquity.equityPage', { return wx.$router.redirectTo('packageEquity.equityPage', {
tabIndex: 1 tabIndex: 1
}) })
...@@ -555,9 +582,11 @@ Page({ ...@@ -555,9 +582,11 @@ Page({
back() { back() {
console.log('back') console.log('back')
let { let {
step step,
isClue
} = this.data } = this.data
console.log('step', step) console.log('step', step)
if (isClue) return wx.$router.back()
if (step == 'first') { if (step == 'first') {
wx.$router.reLaunch('packageEquity.equityPage') wx.$router.reLaunch('packageEquity.equityPage')
} else { } else {
...@@ -580,7 +609,10 @@ Page({ ...@@ -580,7 +609,10 @@ Page({
outTradeNo, outTradeNo,
totalFee, totalFee,
accountDate, accountDate,
id id,
resetOrder,
isClue,
customerInfo
} = options } = options
// outTradeNo // outTradeNo
if (outTradeNo) { if (outTradeNo) {
...@@ -591,7 +623,7 @@ Page({ ...@@ -591,7 +623,7 @@ Page({
accountDate accountDate
}) })
} }
if (resetOrder) this.resetOrder = resetOrder
if (id) { if (id) {
this.setData({ this.setData({
id id
...@@ -600,11 +632,50 @@ Page({ ...@@ -600,11 +632,50 @@ Page({
} else { } else {
this.getQuotationInfo() this.getQuotationInfo()
} }
//客户线索回显客户信息
if (customerInfo) this.setCustomerInfo(customerInfo)
this.setData({
isClue
})
},
setCustomerInfo(customerInfo) {
let {
owner
} = this.data
owner.owner = customerInfo.customerName
owner.phone = customerInfo.customerPhone
owner.ownerGender = customerInfo.customerSex != 2 ? '男' : '女'
owner.seat = customerInfo.carSeat
if (customerInfo.carPrice) owner.price = NP.times(customerInfo.carPrice, 0.01)
owner.city = customerInfo.customerCity
owner.ageRange = customerInfo.customerAgeRange
owner.hobby = customerInfo.customerHobby
owner.companion = customerInfo.customerCompanion
owner.certificateNo = customerInfo.customerCertificateNo || ''
owner = {
...owner,
...customerInfo
}
this.setData({
owner
})
}, },
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad(options) {}, onLoad(options) {
const that = this
wx.$eventbus.on('set_car_info', res => {
that.setData({
['owner.carBrandId']: res.vehicleBrandId,
['owner.carBrand']: res.vehicleBrandName,
['owner.carChildsBrandId']: res.vehicleSubBrandId,
['owner.carChildsBrandName']: res.vehicleSubBrandName,
['owner.carSeriesId']: res.vehicleSeriesId,
['owner.carSeriesName']: res.vehicleSeriesName
})
})
},
/** /**
* 生命周期函数--监听页面初次渲染完成 * 生命周期函数--监听页面初次渲染完成
......
...@@ -48,5 +48,7 @@ ...@@ -48,5 +48,7 @@
</view> </view>
<order-popup <order-popup
orderType="{{orderInfo.payType }}" orderType="{{orderInfo.payType }}"
resetTransNo="{{orderInfo.transactionNo || orderInfo.outTradeNo}}"
resetOrder="{{orderInfo.resetOrder}}"
wx:if="{{showPopup}}" wx:if="{{showPopup}}"
show="{{showPopup}}" /> show="{{showPopup}}" />
\ No newline at end of file \ No newline at end of file
...@@ -4,7 +4,8 @@ import { ...@@ -4,7 +4,8 @@ import {
getQuotationStatistics, getQuotationStatistics,
updateOrderStatus, updateOrderStatus,
merchantMode, merchantMode,
orderStatistics orderStatistics,
cancelOrderById
} from '../../../api' } from '../../../api'
import data from '../constant/data' import data from '../constant/data'
import constantData from '../constant/data' import constantData from '../constant/data'
...@@ -43,6 +44,15 @@ Component({ ...@@ -43,6 +44,15 @@ Component({
key: 'goodsName' key: 'goodsName'
}, },
{ {
label: '工单编号',
key: 'payId'
},
{
label: '交易流水号',
key: 'transactionNo',
canCopy:true
},
{
label: '拒升原因', label: '拒升原因',
key: 'remark' key: 'remark'
}, },
...@@ -53,7 +63,15 @@ Component({ ...@@ -53,7 +63,15 @@ Component({
{ {
label: '创建时间', label: '创建时间',
key: 'createdTime' key: 'createdTime'
} },
{
label: '支付方式',
key: 'payType',
mapValue:{
1:'线上支付',
2:'门店收款'
}
},
], ],
// statisticsObj: {}, // statisticsObj: {},
btnTxt: { btnTxt: {
...@@ -116,7 +134,7 @@ Component({ ...@@ -116,7 +134,7 @@ Component({
*/ */
methods: { methods: {
onScroll: function (e) { onScroll: function (e) {
console.log(e, 'onPageScroll'); // console.log(e, 'onPageScroll');
// const { // const {
// scrollTop // scrollTop
// } = e.detail // } = e.detail
...@@ -250,6 +268,8 @@ Component({ ...@@ -250,6 +268,8 @@ Component({
if (item.payTime) { if (item.payTime) {
item.payTime = wx.$util.tsFormatTime(item.payTime, 'Y/M/D h:m:s') item.payTime = wx.$util.tsFormatTime(item.payTime, 'Y/M/D h:m:s')
} }
item.isTouchMove = false
item.repeal = item.orderStatus==3 || item.orderStatus==5
return item return item
}) })
this.setData({ this.setData({
...@@ -456,5 +476,177 @@ Component({ ...@@ -456,5 +476,177 @@ Component({
console.log(err) console.log(err)
}) })
}, },
//手指触摸动作开始 记录起点X坐标
touchstart: function (e) {
//开始触摸时 重置所有删除
this.data.list.forEach(v => {
// console.log(item)
if (v.isTouchMove)
//只操作为true的
v.isTouchMove = false
v.confirmIndex = false
})
this.setData({
startX: e.changedTouches[0].clientX,
startY: e.changedTouches[0].clientY,
list: this.data.list
})
},
//滑动事件处理
touchmove: function (e) {
// console.log(e)
// if (condition) {
// }
// let { userInfo } = this.data
let {
item
} = e.currentTarget.dataset
// console.log(!li.repeal)
if (!item.repeal) return
// let userType = !userInfo.isSuper && userInfo.merchantType
// let orderType = userInfo.userType == 1 && li.status != 9 && li.status != 1 && li.selectPayType != 3 && li.selectPayType != 1
// // 权限检验
// // console.log(!userType || !orderType)
// if (!userType || !orderType) return
var that = this,
index = e.currentTarget.dataset.index, //当前索引
// ind = e.currentTarget.dataset.ind, //当前索引
startX = that.data.startX, //开始X坐标
startY = that.data.startY, //开始Y坐标
touchMoveX = e.changedTouches[0].clientX, //滑动变化坐标
touchMoveY = e.changedTouches[0].clientY, //滑动变化坐标
//获取滑动角度
angle = that.angle({
X: startX,
Y: startY
}, {
X: touchMoveX,
Y: touchMoveY
})
// console.log(that.data.list[index])
that.data.list.forEach(function (v, i) {
v.isTouchMove = false
//滑动超过30度角 return
if (Math.abs(angle) > 30) return
if (i == index) {
if (touchMoveX > startX)
//右滑
v.isTouchMove = false
//左滑
else v.isTouchMove = true
}
})
//更新数据
that.setData({
list: that.data.list
})
},
touchE: function (e) {
// console.log(e)
var that = this
// console.log(e.changedTouches.length)
// debugger
let {
item
} = e.currentTarget.dataset
// // console.log(!li.repeal)
if (!item.repeal) return
if (e.changedTouches.length == 1) {
//手指移动结束后触摸点位置的X坐标
var endX = e.changedTouches[0].clientX
//触摸开始与结束,手指移动的距离
var disX = that.data.startX - endX
// console.log(disX)
var delBtnWidth = that.data.delBtnWidth
//如果距离小于删除按钮的1/2,不显示删除按钮
var txtStyle = disX > delBtnWidth / 2 ? 'left:-' + delBtnWidth + 'rpx' : 'left:0rpx'
//获取手指触摸的是哪一项
var index = e.currentTarget.dataset.index
// var ind = e.currentTarget.dataset.ind
var list = that.data.list
list[index].txtStyle = txtStyle
// console.log(list)
//更新列表的状态
that.setData({
list: list
})
}
},
angle: function (start, end) {
var _X = end.X - start.X,
_Y = end.Y - start.Y
//返回角度 /Math.atan()返回数字的反正切值
return (360 * Math.atan(_Y / _X)) / (2 * Math.PI)
},
toConfirmReturanOrder(e){
const {id} = e.currentTarget.dataset
let _this = this
wx.showModal({
title: '',
content: '是否取撤销该工单?',
confirmText: '是',
confirmColor: '#347BFF',
cancelText: '否',
success(res) {
if (res.confirm) {
// _this.showLoading('取消中...')
_this.repeal(id)
}
}
})
},
toCopyNumber(e){
let {ordernum} = e.currentTarget.dataset
ordernum = ordernum.replace(/,$/, "")
wx.setClipboardData({
data: ordernum.toString(),
success (res) {
wx.$util.showToast('已复制')
}
})
},
repeal(id){
let _this = this
cancelOrderById({id}).then(_res_=>{
let {
code,
message
} = _res_
if (code == 0) {
wx.showToast({
title: '操作成功',
icon: 'success'
})
setTimeout(() => {
_this.search()
}, 500)
} else {
wx.$util.showToast(message)
}
})
},
toshowErrorOrder(e){
const {item} = e.currentTarget.dataset
this.setData({
showErrorId:item.payId
},()=>{
wx.$modal(this, {
show: true,
title: '工单标记',
tabTitleShow: false,
success: res => {
wx.$router.go(item.mode != 0 ? 'createOrderCarQuotationSimple' : 'createOrderCarQuotation', {
id: item.id,
resetOrder:true
})
},
error: () => {
}
})
})
},
} }
}) })
\ No newline at end of file \ No newline at end of file
...@@ -210,7 +210,34 @@ ...@@ -210,7 +210,34 @@
border-radius: 16rpx; border-radius: 16rpx;
margin: 0 6rpx 20rpx; margin: 0 6rpx 20rpx;
padding-bottom: 20rpx; padding-bottom: 20rpx;
display: flex;
justify-content: space-between;
overflow: hidden;
}
.list .item .item-inner{
width: 100%;
margin-right: 0;
-webkit-transition: all 0.4s;
transition: all 0.4s;
-webkit-transform: translateX(72px);
transform: translateX(72px);
margin-left: -72px;
} }
.list .item .del {
width: 72px;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
color: #fff;
background-color: #f1554c;
-webkit-transform: translateX(90px);
transform: translateX(90px);
-webkit-transition: all 0.4s;
transition: all 0.4s;
font-size: 28rpx;
}
.list .item:first-child { .list .item:first-child {
margin-top: 20rpx; margin-top: 20rpx;
...@@ -262,6 +289,13 @@ ...@@ -262,6 +289,13 @@
border-radius: 4rpx; border-radius: 4rpx;
} }
.grey-txt{
background: #F2F3F5;
color: #999999;
padding: 4rpx 8rpx;
font-size: 24rpx;
border-radius: 4rpx;
}
.red-txt { .red-txt {
color: #EB4E4E; color: #EB4E4E;
background: #FDECE9; background: #FDECE9;
...@@ -701,4 +735,36 @@ ...@@ -701,4 +735,36 @@
/* line-height: 136rpx; */ /* line-height: 136rpx; */
width: 32rpx; width: 32rpx;
height: 32rpx; height: 32rpx;
}
.touch-move-active .item-inner,
.touch-move-active .del {
-webkit-transform: translateX(0) !important;
transform: translateX(0) !important;
}
.modatcontent {
box-sizing: border-box;
padding: 48rpx 50rpx;
}
.modal text,
.modal {
font-size: 28rpx;
color: #333333;
}
.modal .orderCode {
margin-bottom: 20rpx;
}
.modal .code {
color: #888888;
}
.modal .color {
color: #347BFF;
}
.copy_icon{
width: 28rpx;
height: 28rpx;
margin-left: 12rpx;
} }
\ No newline at end of file \ No newline at end of file
// packageEquity/pages/clueDetail/clueDetail.js
import carLifeApi from '../../carEquityApi'
import CONSTANTDATA from './data'
import itemMixin from '../clueList/components/itemMixins'
import NP from 'number-precision'
Page({
behaviors: [itemMixin],
/**
* 页面的初始数据
*/
data: {
customerObj: [{
label: '客户姓名',
key: 'customerName'
},
{
label: '手机号',
key: 'customerPhone',
// color: '#347BFF',
// callBack: 'makePhoneCall',
copy: true
},
{
label: '性别',
key: 'customerSex',
enum: {
1: '男',
2: '女'
}
},
{
label: '年龄区间',
key: 'customerAgeRange',
},
{
label: '所在城市',
key: 'customerCity',
},
{
label: '兴趣爱好',
key: 'customerHobby'
},
{
label: '陪伴人员',
key: 'customerCompanion'
},
{
label: '销售顾问',
key: 'employeeName'
},
{
label: '客户画像',
key: 'userPortrait',
portrait: true
}
],
carInfoObk: [{
label: '客户车型',
key: 'carSeriesName'
},
{
label: '车辆颜色',
key: 'carColor'
},
{
label: '座位数',
key: 'carSeat'
},
{
label: '车辆价格',
key: 'carPrice'
},
{
label: '车架号码',
key: 'carVin'
},
],
recordObj: [{
label: '跟进人',
key: 'follower'
},
{
label: ['事', '件'],
key: 'eventDesc',
// enum: {
// 1: '车主领券',
// 2: '车主预约',
// 3: '预约时间',
// 4: '修改时间',
// 5: '取消预约'
// }
},
{
label: ['备', '注'],
key: 'remark'
}
],
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
if (options.id) {
this.getCustomerClueDetail(options.id)
} else wx.$router.getData(({
id
}) => {
this.getCustomerClueDetail(id)
})
},
async getCustomerClueDetail(id) {
wx.$util.showLoading()
try {
const {
sceneType,
shopMerchantId: merchantId
} = wx.$util.getUserInfo(), {
code,
data,
message
} = await carLifeApi.getCustomerClueDetail({
id,
sceneType,
merchantId: [merchantId]
})
if (code == 0) {
wx.hideLoading()
if (data.customerInfo && data.customerInfo.carPrice) data.customerInfo.carPrice = this.truncateDecimal(NP.times(data.customerInfo.carPrice, 0.01))
if (data.records && data.records.length) {
data.records.map(e => {
let createdDate = new Date(e.createdDate)
e.year = createdDate.format('yyyy-MM-dd')
e.time = createdDate.format('hh:mm:ss')
})
}
const TimeFormat = 'yyyy.MM.dd hh:mm:ss'
data.boutiqueOrders?.map(e => {
e.orderTime = new Date(e.orderTime).format(TimeFormat)
e.totalPrice = this.truncateDecimal(e.totalPrice || 0)
if (e.payOrder && e.payOrder.successDate) e.successDate = new Date(e.payOrder.successDate).format(TimeFormat)
e.subOrderList?.map(x => {
x.totalPrice = this.truncateDecimal(x.totalPrice || 0)
})
})
data.vqOrders?.map(e => {
if (e.payTime) e.payTime = new Date(e.payTime).format(TimeFormat)
if (e.createdTime) e.createdTime = new Date(e.createdTime).format(TimeFormat)
e.quotedPriceUpdate = this.truncateDecimal(NP.times(e.quotedPriceUpdate || 0, 0.01))
e.vdQuotationGoodsList?.map(x => {
if (x.goodsPrice) x.goodsPrice = this.truncateDecimal(NP.times(x.goodsPrice, 0.01))
})
})
this.setData({
detail: data,
flag: true
})
this.dealPortrait()
} else throw message
} catch (error) {
console.log(error)
wx.hideLoading()
if (error) wx.$util.showToast(error)
}
},
async dealPortrait() {
const {
detail
} = this.data
if (!detail) return
const {
portraitCustomerId: id
} = detail
if (!id) return
let _userPortrait = []
let {
code,
data: info
} = await carLifeApi.portraitQuery({
id
})
if (code != 0) return
CONSTANTDATA.formData.forEach(item => {
if (info[item.name]) {
if (item.type == 'textarea') {
_userPortrait.push(info[item.name])
} else {
if (item.isMult) {
// let _list = info[item.name].split(',')
let _list = info[item.name]
_list.forEach(n => {
_userPortrait.push(item.optionList.find(k => k.confId == n).confName)
})
} else {
_userPortrait.push(item.optionList.find(k => k.confId == info[item.name])?.otherName || item.optionList.find(k => k.confId == info[item.name])?.confName)
}
}
}
})
this.setData({
['detail.customerInfo.userPortrait']: _userPortrait
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
setCopyData(e) {
console.log(e)
let {
content
} = e.currentTarget.dataset
wx.$util.setCopyData(`${content}`)
},
editProtrait(e) {
wx.$util.pointRecord(24)
const {
customerInfo,
portraitCustomerId
} = this.data.detail
wx.$router.go('tabDate.userPortrait', {
customer: customerInfo,
customerId: portraitCustomerId
})
},
truncateDecimal(number, decimalPlaces = 2) {
let [integer, decimals] = String(number).split('.')
if (!decimals) decimals = '00'
if (decimals.length > 2) decimals = decimals.substring(0, decimalPlaces)
if (decimals.length == 1) decimals += '0'
return `${integer}.${decimals}`
},
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
// 用户画像
this.dealPortrait()
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})
\ No newline at end of file \ No newline at end of file
{
"usingComponents": {
"order-item":"./components/OrderItem/OrderItem",
"equity-order-item":"./components/EquityOrderItem/EquityOrderItem"
},
"navigationBarTitleText": "客户详情"
}
\ No newline at end of file \ No newline at end of file
/* packageEquity/pages/clueDetail/clueDetail.wxss */
/* tabDate/pages/detail/detail.wxss */
.flex {
display: flex;
align-items: center;
}
page {
background-color: rgb(245, 246, 246);
}
.main {
padding: 20rpx 20rpx 120rpx;
}
.box {
background: #FFFFFF;
box-shadow: 0 4rpx 20rpx 0 #cdcdd159;
border-radius: 16rpx;
padding: 32rpx;
position: relative;
margin-bottom: 20rpx;
}
.box .title {
font-weight: 500;
font-size: 32rpx;
color: #222222;
margin-bottom: 24rpx;
position: relative;
line-height: 48rpx;
&::before {
position: absolute;
left: -32rpx;
top: 50%;
transform: translateY(-50%);
width: 8rpx;
height: 40rpx;
background: #347BFF;
border-radius: 0 4rpx 4rpx 0;
content: '';
}
}
.box .sub-title {
display: flex;
align-items: center;
font-weight: 500;
font-size: 28rpx;
color: #292D33;
.status {
margin-left: auto;
font-weight: 400;
font-size: 28rpx;
color: #F24724;
}
.status-1 {
color: #FF9D0A;
}
.status-2 {
color: #35C376;
}
}
.equity-title {
margin-top: 32rpx;
}
.box .customer-list {
font-size: 24rpx;
color: #333333;
}
.box .customer-list .item {
display: flex;
/* align-items: center; */
margin-bottom: 20rpx;
.edit {
margin-left: auto;
flex-shrink: 0;
color: #347BFF;
}
}
.box .customer-list .item .copy {
margin-left: auto;
flex-shrink: 0;
width: 32rpx;
height: 32rpx;
}
.box .customer-list .item .label {
width: 140rpx;
flex-shrink: 0;
}
.box .customer-list .item .value {
color: #888888;
}
.box .icon {
position: absolute;
top: 0;
right: 0;
width: 32rpx;
height: 32rpx;
}
.box .date-icon {
top: 40rpx;
right: 40rpx;
}
.box .date-box {
padding: 30rpx 0 20rpx;
}
.box .date {
position: relative;
font-size: 40rpx;
color: #F24724;
font-weight: 700;
}
.box .date.gray {
color: #BEC1C7;
}
.box .date .cancel {
position: absolute;
right: 0;
font-size: 24rpx;
color: #347BFF;
font-weight: normal;
}
.box .date-box .tips {
font-size: 24rpx;
color: #888888;
margin-top: 8rpx;
}
.box .record-box {
padding-top: 28rpx;
}
.box .record {
display: flex;
padding-bottom: 30rpx;
justify-content: space-between;
position: relative;
}
.box .record .line {
position: absolute;
left: 140rpx;
top: 10rpx;
height: 100%;
background: #DCDEE0;
border-radius: 2rpx;
width: 4rpx;
}
.box .record .arc {
width: 16rpx;
height: 16rpx;
position: absolute;
left: 134rpx;
top: 10rpx;
background: #DCDEE0;
border-radius: 100%;
}
.box .record .arc-icon {
width: 32rpx;
height: 32rpx;
left: 126rpx;
top: 5rpx;
position: absolute;
}
.box .record .time {
width: 130rpx;
font-size: 20rpx;
color: #2A2A2A;
line-height: 32rpx;
}
.box .record .time .year {
color: #666666;
font-weight: 700;
}
.box .record .info {
width: calc(100% - 176rpx);
position: relative;
}
.box .record .info .item {
margin-bottom: 10rpx;
display: flex;
align-items: flex-start;
font-size: 24rpx;
color: #323233;
}
.box .record.opacity .info .item {
color: #C8C9CC;
}
.box .record .info .item .label {
width: 80rpx;
text-align: right;
display: flex;
justify-content: space-between;
}
.box .record .info .item .value {
width: calc(100% - 90rpx);
margin-left: 10rpx;
}
.box .record .info .item .label .w2 {
display: flex;
align-items: center;
justify-content: space-between;
width: 100%;
}
.box .nothing {
padding: 60rpx 0 40rpx;
font-size: 12px;
color: #999999;
}
.fixed-box {
position: fixed;
top: 0;
left: 0;
bottom: 0;
right: 0;
z-index: 998;
perspective: 99999999px;
}
.fixed-bg {
position: absolute;
top: 0;
left: 0;
bottom: 0;
right: 0;
animation: show-bg .1s forwards .5s;
}
@keyframes show-bg {
0% {
background-color: rgba(0, 0, 0, 0);
}
100% {
background-color: rgba(0, 0, 0, .6);
}
}
.fixed-content {
position: absolute;
left: 50%;
top: 50%;
background: #FFFFFF;
border-radius: 20rpx;
width: 622rpx;
animation: show-modal .5s forwards;
}
@keyframes show-modal {
0% {
opacity: 0;
transform: translate3d(-50%, -50%, -99999999px);
}
100% {
opacity: 1;
transform: translate3d(-50%, -50%, 0);
}
}
.fixed-content .fixed-title {
height: 96rpx;
font-size: 32rpx;
color: #333333;
}
.fixed-date-box .fixed-body {
height: 360rpx;
display: flex;
}
.fixed-date-box .picker {
width: 50%;
height: 100%;
}
.fixed-date-box .picker .view {
display: flex;
align-items: center;
justify-content: center;
font-size: 36rpx;
color: #323233;
}
.fixed-date-box .indicator {
height: 96rpx;
}
.fixed-date-box .picker .tips {
font-size: 20rpx;
color: rgba(100, 101, 102, .5);
margin-left: 10rpx;
}
.fixed-content .fixed-footer {
height: 96rpx;
display: flex;
align-items: center;
position: relative;
}
.fixed-content .fixed-footer view {
width: 50%;
height: 100%;
font-size: 32rpx;
color: #333333;
}
.fixed-content .fixed-footer .fixed-confirm {
color: #347BFF;
}
.fixed-content .fixed-footer::after {
background-color: #EBEDF0;
width: 1rpx;
height: 100%;
position: absolute;
top: 0;
left: 50%;
transform: translateX(-50%);
content: '';
}
.isFullSucreen-btn {
padding-bottom: 34px !important;
}
.btns {
position: fixed;
z-index: 998;
left: 0;
bottom: 0;
width: 100%;
box-sizing: border-box;
min-height: 100rpx;
background: #FFFFFF;
padding-bottom: 10rpx;
}
.btns .btn {
height: 80rpx;
background: #347BFF;
border-radius: 12rpx;
font-size: 32rpx;
font-weight: 500;
color: #FFFFFF;
margin: 10rpx 32rpx;
}
.portrait {
display: flex;
flex-wrap: wrap;
}
.portrait-item {
box-sizing: border-box;
/* height: 48rpx; */
line-height: 48rpx;
background: #E6F0FF;
border-radius: 8rpx;
font-size: 24rpx;
color: #333333;
padding: 0 12rpx;
margin: 0 8rpx 8rpx 0;
}
\ No newline at end of file \ No newline at end of file
<block wx:if="{{flag}}">
<view class="main">
<view class="box">
<view class="title">客户信息</view>
<view class="customer-list">
<block wx:for="{{customerObj}}" wx:key="index">
<view class="item">
<view class="label">{{item.label}}</view>
<view class="value {{item.key != 'userPortrait' ? 'text-hide' : ''}}">
<block wx:if="{{item.key == 'userPortrait'}}">
<view class="portrait">
<view wx:for="{{detail.customerInfo[item.key]}}" wx:for-item="subItem" wx:for-index="idx" wx:key="idx" class="portrait-item">
{{subItem}}
</view>
</view>
</block>
<block wx:elif="{{item.key == 'employeeName'}}">
{{ detail.customerInfo.merchantName}} | {{ detail.customerInfo.employeeName}}
</block>
<block wx:else>
{{item.enum? item.enum[detail.customerInfo[item.key]] : detail.customerInfo[item.key] || ''}}
</block>
</view>
<block wx:if="{{item.copy}}">
<view class="copy" catchtap="setCopyData" data-content="{{detail.customerInfo[item.key]}}">
<gl-image webp src="/equity/copy.png"></gl-image>
</view>
</block>
<block wx:if="{{item.portrait}}">
<view class="edit" catchtap="editProtrait">编辑</view>
</block>
</view>
</block>
</view>
</view>
<view class="box">
<view class="title">车辆信息</view>
<view class="customer-list">
<block wx:for="{{carInfoObk}}" wx:key="index">
<view class="item">
<view class="label">{{item.label}}</view>
<view class="value text-hide">
<block wx:if="{{detail.customerInfo[item.key]}}">
<block wx:if="{{item.key == 'carSeriesName'}}">
{{detail.customerInfo.carBrand}}-{{detail.customerInfo.carChildsBrandName}}-{{detail.customerInfo.carSeriesName}}
</block>
<block wx:else>
{{ detail.customerInfo[item.key] || ''}}
</block>
</block>
</view>
</view>
</block>
</view>
</view>
<view class="box">
<view class="title">订单信息</view>
<view class="sub-title">
精品加装
<view class="status status-{{detail.sceneTypeStatusMap[1]}}">{{statusEnum[detail.sceneTypeStatusMap[1]]}}</view>
</view>
<block wx:if="{{detail.boutiqueOrders.length}}">
<block wx:for="{{detail.boutiqueOrders}}" wx:key="index">
<order-item num="{{index}}" item="{{item}}"></order-item>
</block>
</block>
<view class="sub-title equity-title">
权益服务
<view class="status status-{{detail.sceneTypeStatusMap[0]}}">{{statusEnum[detail.sceneTypeStatusMap[0]]}}</view>
</view>
<block wx:if="{{detail.vqOrders.length}}">
<block wx:for="{{detail.vqOrders}}" wx:key="index">
<equity-order-item num="{{index}}" item="{{item}}"></equity-order-item>
</block>
</block>
</view>
<view class="box">
<view class="title">客户跟进记录</view>
<block wx:if="{{detail.records.length}}">
<view class="record-box">
<block wx:for="{{detail.records}}" wx:key="index">
<view class="record {{index != 0 ? 'opacity' : ''}}">
<view class="line" wx:if="{{index != detail.records.length - 1}}" />
<block wx:if="{{detail.records.length > 1}}">
<block wx:if="{{index == 0 }}">
<view class="arc-icon">
<image src="/images/active-arc.png" />
</view>
</block>
<block wx:else>
<view class="arc" />
</block>
</block>
<view class="time">
<view class="year">{{item.year}}</view>
{{item.time}}
</view>
<view class="info">
<block wx:for="{{recordObj}}" wx:key="ind" wx:for-index="ind" wx:for-item="i">
<view class="item">
<view class="label">
<block wx:if="{{ind==0}}">
<view>{{i.label}}</view>
</block>
<block wx:else>
<view class="w2">
<block wx:for="{{i.label}}" wx:key="in" wx:for-index="in" wx:for-item="c">
<text>{{c}}</text>
</block>
</view>
</block>
:
</view>
<view class="value">
{{i.enum? i.enum[item[i.key]]+item.inviteDate :item[i.key]||'无'}}
</view>
</view>
</block>
</view>
</view>
</block>
</view>
</block>
<block wx:else>
<view class="nothing text-center">暂无记录</view>
</block>
</view>
</view>
</block>
\ No newline at end of file \ No newline at end of file
// packageEquity/pages/clueDetail/components/OrderItem/OrderItem.js
Component({
/**
* 组件的属性列表
*/
properties: {
num: Number,
item: Object
},
/**
* 组件的初始数据
*/
data: {
orderObj: [{
label: '升级总价',
key: 'quotedPriceUpdate',
unit:'¥'
},
{
label: '转化人员',
key: 'transferName'
},
{
label: '工单编号',
key: 'payId'
},
{
label: '工单时间',
key: 'createdTime'
},
{
label: '支付时间',
key: 'payTime'
},
],
//服务状态(0待报价、1待确认、2待支付、3已支付、4权益提单已完成、5已完成、-1战败)
orderStatusEnum:{
0:'待报价',
1:'待确认',
2:'待支付',
3:'已支付',
4:'权益提单已完成',
5:'完成',
'-1':'战败',
9:'已撤销',
11:'错误订单',
}
},
/**
* 组件的方法列表
*/
methods: {
}
})
\ No newline at end of file \ No newline at end of file
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file \ No newline at end of file
/* packageEquity/pages/clueDetail/components/OrderItem/OrderItem.wxss */
.flex {
display: flex;
align-items: center;
}
.order-item {
background: #F7F8FA;
border-radius: 12rpx;
margin-top: 20rpx;
padding: 24rpx 32rpx 8rpx;
.order-title {
font-weight: 500;
font-size: 28rpx;
color: #292D33;
.status {
margin-left: 20rpx;
color: #F24724;
}
.status-0,.status-1,
.status-2{
color: #FF9D0A;
}
.status-3,.status-4,
.status-5{
color: #35C376;
}
}
.goods-box {
padding: 24rpx 0 8rpx;
font-size: 28rpx;
color: #292D33;
.goods-item {
margin-bottom: 16rpx;
&::before {
width: 12rpx;
height: 12rpx;
background: #347BFF;
border-radius: 100%;
content: '';
display: block;
margin-right: 16rpx;
flex-shrink: 0;
}
.price {
margin-left: auto;
flex-shrink: 0;
color: #6C6C70;
}
}
}
.item {
font-size: 28rpx;
color: #999EA8;
margin-bottom: 16rpx;
.label{
flex-shrink: 0;
margin-right: 40rpx;
}
.value{
color: #292D33;
}
.price {
color: #347BFF;
}
}
}
\ No newline at end of file \ No newline at end of file
<view class="order-item">
<view class="order-title flex">
订单{{num + 1}}
<view class="status status-{{item.orderStatus}}">{{orderStatusEnum[item.orderStatus]}}</view>
</view>
<block wx:if="{{item.vdQuotationGoodsList.length}}">
<view class="goods-box">
<block wx:for="{{item.vdQuotationGoodsList}}" wx:key="index" wx:for-item="i">
<view class="goods-item flex">
{{i.goodsName}}
<view class="price">¥{{i.goodsPrice}}</view>
</view>
</block>
</view>
</block>
<block wx:for="{{orderObj}}" wx:key="index" wx:for-item="i">
<block wx:if="{{item[i.key]}}">
<view class="item flex">
<view class="label">{{i.label}}</view>
<view class="value {{i.key == 'quotedPriceUpdate'?'price':''}}">
<block wx:if="{{i.key == 'transferName'}}">
{{item.merchantName}} | {{item.transferName}}
</block>
<block wx:else>
{{i.unit||''}}{{item[i.key] || ''}}
</block>
</view>
</view>
</block>
</block>
</view>
\ No newline at end of file \ No newline at end of file
// packageEquity/pages/clueDetail/components/OrderItem/OrderItem.js
Component({
/**
* 组件的属性列表
*/
properties: {
num: Number,
item: Object
},
/**
* 组件的初始数据
*/
data: {
orderObj: [{
label: '升级总价',
key: 'totalPrice',
unit:'¥'
},
{
label: '转化人员',
key: 'sellerName'
},
{
label: '工单编号',
key: 'orderCode'
},
{
label: '工单时间',
key: 'orderTime'
},
{
label: '支付时间',
key: 'successDate'
}
],
status:{
1:'待跟进',
2:'战败',
3:'待支付',
4:'已支付',
6:'已评价',
9:'已撤销',
10:'已关闭',
11:'已失效',
12:'已退款',
}
},
/**
* 组件的方法列表
*/
methods: {
}
})
\ No newline at end of file \ No newline at end of file
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file \ No newline at end of file
/* packageEquity/pages/clueDetail/components/OrderItem/OrderItem.wxss */
.flex {
display: flex;
align-items: center;
}
.order-item {
background: #F7F8FA;
border-radius: 12rpx;
margin-top: 20rpx;
padding: 24rpx 32rpx 8rpx;
.order-title {
font-weight: 500;
font-size: 28rpx;
color: #292D33;
.status {
margin-left: 20rpx;
color: #F24724;
}
.status-1,.status-3{
color: #FF9D0A;
}
.status-4,.status-5{
color: #35C376;
}
}
.goods-box {
padding: 24rpx 0 8rpx;
font-size: 28rpx;
color: #292D33;
.goods-item {
margin-bottom: 16rpx;
&::before {
width: 12rpx;
height: 12rpx;
background: #347BFF;
border-radius: 100%;
content: '';
display: block;
margin-right: 16rpx;
flex-shrink: 0;
}
.price {
margin-left: auto;
flex-shrink: 0;
color: #6C6C70;
}
}
}
.item {
font-size: 28rpx;
color: #999EA8;
margin-bottom: 16rpx;
.label{
flex-shrink: 0;
margin-right: 40rpx;
}
.value{
color: #292D33;
}
.price {
color: #347BFF;
}
}
}
\ No newline at end of file \ No newline at end of file
<view class="order-item">
<view class="order-title flex">
订单{{num + 1}}
<view class="status status-{{item.status}}">{{status[item.status]}}</view>
</view>
<block wx:if="{{item.subOrderList.length}}">
<view class="goods-box">
<block wx:for="{{item.subOrderList}}" wx:key="index" wx:for-item="i">
<view class="goods-item flex">
{{i.upgradeGoodsName}}
<view class="price">¥{{i.totalPrice}}</view>
</view>
</block>
</view>
</block>
<block wx:for="{{orderObj}}" wx:key="index" wx:for-item="i">
<block wx:if="{{item[i.key]}}">
<view class="item flex">
<view class="label">{{i.label}}</view>
<view class="value {{i.key == 'totalPrice'?'price':''}}">
<block wx:if="{{i.key == 'sellerName'}}">
{{item.sellerMerchantName}} | {{item.sellerName}}
</block>
<block wx:else>
{{i.unit||''}}{{item[i.key] || ''}}
</block>
</view>
</view>
</block>
</block>
</view>
\ No newline at end of file \ No newline at end of file
const sexList = [
{
confId: '1',
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 = [
{
confId: '1',
confName: '首次'
},
{
confId: '2',
confName: '置换'
},
{
confId: '3',
confName: '增购'
}
]
const purchaseList = [
{
confId: '1',
confName: '全款'
},
{
confId: '2',
confName: '正常贷款'
},
{
confId: '3',
confName: '超低首付'
}
]
const decisionList = [
{
confId: '1',
confName: '自己做主'
},
{
confId: '2',
confName: '听从亲友建议'
},
{
confId: '3',
confName: '他人买单'
}
]
const promoteList = [
{
confId: 'Y',
confName: '是',
otherName: '推膜时有铺垫'
},
{
confId: 'N',
confName: '否',
otherName: '推膜时未铺垫'
}
]
const satisfiedList = [
{
confId: 'Y',
confName: '是',
otherName: '购车上牌时客户满意'
},
{
confId: 'N',
confName: '否',
otherName: '购车上牌时客户不满'
}
]
const timeList = [
{
confId: '1',
confName: '加急安排'
},
{
confId: '2',
confName: '正常预约'
}
]
var formData = [
{
label: '性别(单选)',
name: 'customerSex',
optionList: sexList,
optionId: 'confId',
optionLabel: 'confName',
optionsName: 'sexList'
},
{
label: '年龄段',
name: 'age',
optionList: age,
optionId: 'confId',
optionLabel: 'confName',
optionsName: 'age'
},
{
label: '家庭情况',
name: 'maritalStatus',
optionList: maritalStatus,
optionId: 'confId',
optionLabel: 'confName',
optionsName: 'maritalStatus'
},
{
label: '附赠产品(每类产品只支持选一个选项)',
name: 'giftProductList',
isMult: true,
optionList: giftProduct,
optionId: 'confId',
optionLabel: 'confName',
optionsName: 'sexList'
},
{
label: '买车情况(单选)',
name: 'buyingCarDetails',
optionList: buyCarList,
optionId: 'confId',
optionLabel: 'confName',
optionsName: 'buyCarList'
},
{
label: '消费力(单选)',
name: 'purchasingPower',
optionList: purchaseList,
optionId: 'confId',
optionLabel: 'confName',
optionsName: 'purchaseList'
}
// ,{
// label: '决策力(可多选)',
// name: 'decisionMakingAbility',
// isMult: true,
// 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 {
sexList,
age,
maritalStatus,
giftProduct,
buyCarList,
purchaseList,
decisionList,
promoteList,
satisfiedList,
timeList,
formData
}
// packageEquity/pages/clueList/clueList.js
import carLifeApi from '../../carEquityApi'
import NP from 'number-precision'
Page({
/**
* 页面的初始数据
*/
data: {
activeIndex: 0,
pageNum: 1,
searchValue: '',
list: [],
customerTips: '今日新增0客户',
tabList: [{
text: '全部',
count: 0,
key: 'total'
}, {
text: '待跟进',
count: 0,
key: 'waitFollow'
},
{
text: '已升级',
count: 0,
key: 'upgrade'
},
{
text: '战败',
count: 0,
key: 'defeat'
}
],
},
onRoute(options) {
console.log(options, 'options');
if (options.activeIndex) {
this.setData({
activeIndex: 1
})
this.status = 1
this.getCustomerClueTodayCount()
}
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
const {
sceneType
} = wx.$util.getUserInfo()
/**sceneType
* 1精品升级
* 0会员权益/升级*/
this.setData({
sceneType: sceneType || 1
})
// this.getCustomerClueList()
this.getCustomerClueTodayCount()
},
search() {
this.setData({
pageNum: 1,
list: [],
flag: false,
nothing: false
})
this.getCustomerClueList()
},
tabClick(e) {
this.status = [null, 1, 2, -1][e.detail]
this.search()
},
async getCustomerClueList() {
try {
const {
searchValue,
sceneType,
pageNum,
} = this.data, {
status
} = this, {
shopMerchantId: merchantId
} = wx.$util.getUserInfo(),
params = {
search: searchValue,
sceneType,
pageNum,
merchantId: [merchantId]
}
if (status !== null) params.status = status
wx.$util.showLoading()
const {
code,
data,
message
} = await carLifeApi.getCustomerClueList(params)
if (code == 0) {
wx.hideLoading()
const TimeFormat = 'yyyy.MM.dd hh:mm:ss'
data.list.map(e => {
if (sceneType == 1) {
//权益服务
e.vqOrders?.map(i => {
i.quotedPriceUpdate = this.truncateDecimal(NP.times(i.quotedPriceUpdate || 0, 0.01))
if (i.payTime) i.payTime = new Date(i.payTime).format(TimeFormat)
i.vdQuotationGoodsList?.map(x => {
x.goodsPrice = this.truncateDecimal(NP.times(x.goodsPrice || 0, 0.01))
})
})
} else {
//精品加装
e.boutiqueOrders?.map(i => {
i.totalPrice = this.truncateDecimal(i.totalPrice || 0)
if (i.payOrder && i.payOrder.successDate) i.successDate = new Date(i.payOrder.successDate).format(TimeFormat)
i.subOrderList?.map(x => {
x.totalPrice = this.truncateDecimal(x.totalPrice || 0)
})
})
}
if (e.customerInfo && e.customerInfo.carPrice) e.customerInfo.price = this.truncateDecimal(NP.times(e.customerInfo.carPrice, 0.01))
})
this.setData({
[`list[${pageNum - 1}]`]: data.list || [],
total: data.total,
flag: true
})
} else throw message
} catch (error) {
wx.hideLoading()
this.setData({
flag: true
})
console.log(error)
wx.$util.showToast(error)
}
},
async getCustomerClueTodayCount() {
const {
sceneType,
} = this.data, {
shopMerchantId: merchantId
} = wx.$util.getUserInfo(), {
data
} = await carLifeApi.getCustomerClueTodayCount({
sceneType,
merchantId: [merchantId]
})
if (data) this.setData({
customerTips: data
})
},
async getCustomerClueStatistics() {
const {
sceneType,
tabList
} = this.data, {
shopMerchantId: merchantId
} = wx.$util.getUserInfo(), {
data
} = await carLifeApi.getCustomerClueStatistics({
sceneType,
merchantId: [merchantId]
})
if (data) {
tabList.map(e => {
Object.keys(data).map(key => {
if (key == e.key) e.count = data[key] || 0
})
})
this.setData({
tabList
})
}
},
input(e) {
let {
value
} = e.detail
this.setData({
searchValue: value
})
},
handleReset() {
this.setData({
searchValue: ''
})
this.search()
},
truncateDecimal(number, decimalPlaces = 2) {
let [integer, decimals] = String(number).split('.')
if (!decimals) decimals = '00'
if (decimals.length > 2) decimals = decimals.substring(0, decimalPlaces)
if (decimals.length == 1) decimals += '0'
return `${integer}.${decimals}`
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
this.getCustomerClueStatistics()
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
let {
total,
pageNum
} = this.data
wx.$util.onReachBottom({
total,
pageNum
}, res => {
this.getCustomerClueList()
})
}
})
\ No newline at end of file \ No newline at end of file
{
"usingComponents": {
"equity-item":"./components/EquityItem/EquityItem",
"upgrade-item":"./components/UpgradeItem/UpgradeItem"
},
"navigationBarTitleText": "线索管理"
}
\ No newline at end of file \ No newline at end of file
page{
background:#fff;
}
.layout {
.to-box {
position: sticky;
top: 0;
z-index: 2;
.search-box {
width: 100%;
padding: 32rpx 32rpx 0;
display: flex;
background-color: #fff;
position: sticky;
top: 0;
left: 0;
z-index: 9;
box-sizing: border-box;
.search-input {
background: #F7F8FA;
border-radius: 38rpx;
width: 100%;
height: 72rpx;
display: flex;
align-items: center;
.search-icon {
width: 28rpx;
height: 28rpx;
margin: 0 10rpx 0 26rpx;
}
.clearBtn {
width: 100rpx;
height: 100rpx;
position: relative;
}
.search-clear {
position: absolute;
left: 40rpx;
top: 33rpx;
width: 36rpx;
height: 36rpx;
/* margin: 0 26rpx 0 10rpx; */
}
.input {
font-size: 28rpx;
width: calc(100% - 136rpx);
}
.input-placeholder {
color: rgba(200, 201, 204, .89);
}
}
.search {
width: 144rpx;
height: 100%;
color: #666;
box-sizing: border-box;
padding: 0 24rpx;
.text-center {
font-size: 24rpx;
/* background-color: #f7f7f7; */
border-radius: 12rpx;
width: 100%;
height: 50rpx;
color: #888;
.search-filter {
margin-left: 6rpx;
width: 24rpx;
height: 24rpx;
}
}
}
}
}
.tips {
font-size: 24rpx;
color: #222222;
line-height: 32rpx;
padding: 24rpx 40rpx 20rpx;
}
.content {
padding: 0 20rpx 100rpx;
}
}
\ No newline at end of file \ No newline at end of file
<view class="layout">
<view class="to-box">
<view class="search-box">
<view class="search-input">
<image src="/images/search.png" class="search-icon" />
<input type="text" placeholder="请输入客户名字进行搜索" class="input" confirm-type="search" value="{{searchValue}}" placeholder-class="input-placeholder" bindinput="input" bindconfirm="search" maxlength="20" />
<block wx:if="{{searchValue}}">
<view bindtap="handleReset" class="clearBtn">
<image src="/images/clear.png" class="search-clear" />
</view>
</block>
</view>
</view>
<tab-bar tabList="{{tabList}}" bindclick="tabClick" activeIndex="{{activeIndex}}"/>
</view>
<view class="tips">{{customerTips}}</view>
<view class="content">
<block wx:if="{{flag}}">
<block wx:if="{{list.length}}">
<block wx:for="{{list}}" wx:key="index">
<block wx:for="{{item}}" wx:key="ind" wx:for-item="i" wx:for-index="ind">
<block wx:if="{{sceneType == 0}}">
<upgrade-item data="{{i}}"></upgrade-item>
</block>
<block wx:else>
<equity-item data="{{i}}"></equity-item>
</block>
</block>
</block>
<block wx:if="{{nothing}}">
<view class="list-nothing">到底了~</view>
</block>
</block>
<block wx:else>
<empty-data />
</block>
</block>
</view>
</view>
\ No newline at end of file \ No newline at end of file
// packageEquity/pages/clueList/components/EquityItem/EquityItem.js
import itemMixin from '../itemMixins'
Component({
behaviors: [itemMixin],
/**
* 组件的属性列表
*/
properties: {
data: Object
},
/**
* 组件的初始数据
*/
data: {
sceneTypeStatusMap: [{
label: '精品加装',
key: '1'
},
{
label: '权益服务',
key: '0'
},
],
orderObj: [{
label: '升级价格',
key: 'quotedPriceUpdate',
unit: '¥'
},
{
label: '支付时间',
key: 'payTime'
}
],
orderStatusEnum:{
0:'待报价',
1:'待确认',
2:'待支付',
3:'已支付',
4:'权益提单已完成',
5:'完成',
'-1':'战败',
9:'已撤销',
11:'错误订单',
}
},
/**
* 组件的方法列表
*/
methods: {
showAllFun() {
this.setData({
showAll: !this.data.showAll
})
},
jump() {
const {
data
} = this.data
let params = {}
if (data.boutiqueOrders && data.boutiqueOrders.length) params = data.boutiqueOrders[0]
wx.$router.go('tabWorkOrder.createOrder', params)
}
}
})
\ No newline at end of file \ No newline at end of file
{
"component": true,
"usingComponents": {
"goods-list":"../GoodsList/GoodsList"
}
}
\ No newline at end of file \ No newline at end of file
.flex {
display: flex;
align-items: center;
}
.item {
background: #FFFFFF;
box-shadow: 0 4rpx 16rpx 0 #cdcdd180;
border-radius: 16rpx;
margin-bottom: 20rpx;
box-sizing: border-box;
padding: 0 20rpx;
position: relative;
.status {
position: absolute;
top: 42rpx;
right: 32rpx;
height: 44rpx;
line-height: 44rpx;
border-radius: 4rpx;
padding: 0 8rpx;
font-weight: 500;
font-size: 24rpx;
background: #FDECE9;
color: #F24724;
}
.status-1 {
background: #FFF5E6;
color: #FF9D0A;
}
.status-2 {
background: #EAF9F1;
color: #35C376;
}
.top {
padding: 24rpx 12rpx;
.icon {
width: 80rpx;
height: 80rpx;
margin-right: 16rpx;
border-radius: 100%;
overflow: hidden;
}
.info {
.name {
font-size: 28rpx;
color: #1B233D;
line-height: 48rpx;
.tips {
margin-left: 16rpx;
font-size: 22rpx;
color: #FFFFFF;
padding: 0 10rpx;
height: 32rpx;
line-height: 32rpx;
border-radius: 16rpx;
background: #FF9D0A;
}
.new {
background: #E75E58;
}
}
.phone {
font-size: 24rpx;
color: #9B9B9E;
line-height: 32rpx;
}
}
}
.info-box {
padding: 0 12rpx;
line-height: 36rpx;
font-size: 24rpx;
.info-item {
margin-bottom: 16rpx;
.label {
width: 136rpx;
color: #999EA8;
}
.value {
color: #292D33;
}
}
}
.package-box {
background: #F7F8FA;
border-radius: 12rpx;
padding: 20rpx 32rpx 8rpx;
box-sizing: border-box;
margin-bottom: 16rpx;
.package-title {
padding: 4rpx 0 24rpx;
font-weight: 500;
font-size: 28rpx;
color: #292D33;
.order-status {
margin-left: 20rpx;
color: #F24724;
}
.order-status-0,
.order-status-1,
.order-status-2 {
color: #FF9D0A;
}
.order-status-3,
.order-status-4,
.order-status-5 {
color: #35C376;
}
}
.package-info {
padding-top: 24rpx;
}
.package-item {
font-size: 28rpx;
color: #999EA8;
margin-bottom: 16rpx;
.label {
flex-shrink: 0;
margin-right: 40rpx;
}
.value {
color: #292D33;
}
.price {
color: #347BFF;
}
}
}
.bottom {
height: 96rpx;
padding: 0 12rpx;
font-size: 24rpx;
color: #999EA8;
.num {
font-weight: 700;
font-size: 32rpx;
color: #347BFF;
margin-left: 40rpx;
.unit {
font-size: 28rpx;
}
}
.btn {
margin-left: auto;
font-size: 28rpx;
color: #FFFFFF;
width: 180rpx;
height: 56rpx;
background: #347BFF;
border-radius: 32rpx;
justify-content: center;
}
}
}
.padding-bottom {
padding-bottom: 8rpx;
}
\ No newline at end of file \ No newline at end of file
<view class="item {{data.status == 1?'':'padding-bottom'}}" bindtap="jumpDetail">
<view class="status status-{{data.status}}">{{statusEnum[data.status]}}</view>
<view class="top flex">
<view class="icon">
<gl-image webp src="/equity/{{data.customerInfo.customerSex == 2 ?'woman-default-avatar' : 'default-avatar'}}.png"></gl-image>
</view>
<view class="info">
<view class="name flex">
{{data.customerInfo.customerName}}
<block wx:if="{{data.changeType > 0}}">
<block wx:if="{{data.changeType == 1}}">
<view class="tips new">New</view>
</block>
<block wx:else>
<view class="tips">更新</view>
</block>
</block>
</view>
<view class="phone">{{data.customerInfo.customerPhone}}</view>
</view>
</view>
<view class="info-box">
<block wx:for="{{infoObject}}" wx:key="index">
<block wx:if="{{data.customerInfo[item.key]}}">
<view class="info-item flex">
<view class="label">{{item.label}}</view>
<view class="value">
<block wx:if="{{item.key == 'carSeriesName'}}">
{{data.customerInfo.carBrand}}-{{data.customerInfo.carChildsBrandName}}-{{data.customerInfo.carSeriesName}}
</block>
<block wx:else>
{{data.customerInfo[item.key]}}
</block>
</view>
</view>
</block>
</block>
<block wx:for="{{sceneTypeStatusMap}}" wx:key="index">
<view class="info-item flex">
<view class="label">{{item.label}}</view>
<view class="value">{{statusEnum[data.sceneTypeStatusMap[item.key]]}}</view>
</view>
</block>
</view>
<block wx:if="{{data.vqOrders.length}}">
<block wx:for="{{data.vqOrders}}" wx:key="index">
<view class="package-box">
<view class="package-title flex">
订单{{index + 1}}
<view class="order-status order-status-{{item.orderStatus}}">{{orderStatusEnum[item.orderStatus]}}</view>
</view>
<goods-list list="{{item.vdQuotationGoodsList}}" goodsNameKey="goodsName" goodsPriceKey="goodsPrice"></goods-list>
<view class="package-info">
<block wx:for="{{orderObj}}" wx:key="ind" wx:for-item="i" wx:for-index="ind">
<block wx:if="{{item[i.key]}}">
<view class="package-item flex">
<view class="label">{{i.label}}</view>
<view class="value {{i.key == 'quotedPriceUpdate'?'price':''}}">
{{i.unit||''}}{{item[i.key] || ''}}
</view>
</view>
</block>
</block>
</view>
</view>
</block>
</block>
<block wx:if="{{data.status == 1}}">
<view class="bottom flex">
<view class="btn flex" catchtap="jump">车膜升级单</view>
</view>
</block>
</view>
\ No newline at end of file \ No newline at end of file
// packageEquity/pages/clueList/components/GoodsList/GoodsList.js
Component({
/**
* 组件的属性列表
*/
properties: {
list: Array,
goodsNameKey: String,
goodsPriceKey: String
},
/**
* 组件的初始数据
*/
data: {
},
/**
* 组件的方法列表
*/
methods: {
showAllFun() {
this.setData({
showAll: !this.data.showAll
})
},
}
})
\ No newline at end of file \ No newline at end of file
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file \ No newline at end of file
/* packageEquity/pages/clueList/components/GoodsList/GoodsList.wxss */
.flex {
display: flex;
align-items: center;
}
.package-item {
font-size: 24rpx;
color: #292D33;
margin-bottom: 16rpx;
&::before {
width: 12rpx;
height: 12rpx;
background: #347BFF;
content: '';
display: block;
margin-right: 16rpx;
border-radius: 100%;
}
.price {
color: #6C6C70;
margin-left: auto;
flex-shrink: 0;
}
}
.clear-margin {
margin-bottom: 0;
}
.show-all {
font-size: 24rpx;
color: #347BFF;
line-height: 36rpx;
padding-left: 28rpx;
text {
color: #999EA8;
}
}
\ No newline at end of file \ No newline at end of file
<block wx:for="{{list}}" wx:key="index">
<block wx:if="{{index < 2 || showAll}}">
<view class="package-item flex {{list.length == 1 ? 'clear-margin':'' }} {{list.length == 2 && index == 1?'clear-margin':''}}">
{{item[goodsNameKey]}}
<view class="price">¥{{item[goodsPriceKey]}}</view>
</view>
</block>
</block>
<block wx:if="{{list.length > 2}}">
<view class="show-all" catchtap="showAllFun">
<block wx:if="{{!showAll}}">
查看全部<text>(共{{list.length}}件)</text>
</block>
<block wx:else>
收起
</block>
</view>
</block>
\ No newline at end of file \ No newline at end of file
// packageEquity/pages/clueList/components/UpgradeItem/UpgradeItem.js
import itemMixin from '../itemMixins'
Component({
behaviors: [itemMixin],
/**
* 组件的属性列表
*/
properties: {
data: Object
},
/**
* 组件的初始数据
*/
data: {
sceneTypeStatusMap: [{
label: '权益服务',
key: '0'
},
{
label: '精品加装',
key: '1'
},
],
orderObj: [{
label: '升级价格',
key: 'totalPrice',
unit: '¥'
},
{
label: '支付时间',
key: 'successDate'
}
],
status: {
1: '待跟进',
2: '战败',
3: '待支付',
4: '已支付',
6: '已评价',
9: '已撤销',
10: '已关闭',
11: '已失效',
12: '已退款',
}
},
/**
* 组件的方法列表
*/
methods: {
jump() {
const {
data
} = this.data
let params = {
isClue: true
}
if (data.customerInfo) params.customerInfo = data.customerInfo
wx.$router.go('createOrderCarQuotationSimple', params)
}
}
})
\ No newline at end of file \ No newline at end of file
{
"component": true,
"usingComponents": {
"goods-list":"../GoodsList/GoodsList"
}
}
\ No newline at end of file \ No newline at end of file
.flex {
display: flex;
align-items: center;
}
.item {
background: #FFFFFF;
box-shadow: 0 4rpx 16rpx 0 #cdcdd180;
border-radius: 16rpx;
margin-bottom: 20rpx;
box-sizing: border-box;
padding: 0 20rpx;
position: relative;
.status {
position: absolute;
top: 42rpx;
right: 32rpx;
height: 44rpx;
line-height: 44rpx;
border-radius: 4rpx;
padding: 0 8rpx;
font-weight: 500;
font-size: 24rpx;
background: #FDECE9;
color: #F24724;
}
.status-1 {
background: #FFF5E6;
color: #FF9D0A;
}
.status-2 {
background: #EAF9F1;
color: #35C376;
}
.top {
padding: 24rpx 12rpx;
.icon {
width: 80rpx;
height: 80rpx;
margin-right: 16rpx;
border-radius: 100%;
overflow: hidden;
}
.info {
.name {
font-size: 28rpx;
color: #1B233D;
line-height: 48rpx;
.tips {
margin-left: 16rpx;
font-size: 22rpx;
color: #FFFFFF;
padding: 0 10rpx;
height: 32rpx;
line-height: 32rpx;
border-radius: 16rpx;
background: #FF9D0A;
}
.new {
background: #E75E58;
}
}
.phone {
font-size: 24rpx;
color: #9B9B9E;
line-height: 32rpx;
}
}
}
.info-box {
padding: 0 12rpx;
line-height: 36rpx;
font-size: 24rpx;
.info-item {
margin-bottom: 16rpx;
.label {
width: 136rpx;
color: #999EA8;
}
.value {
color: #292D33;
}
}
}
.package-box {
background: #F7F8FA;
border-radius: 12rpx;
padding: 20rpx 32rpx 8rpx;
box-sizing: border-box;
margin-bottom: 16rpx;
.package-title {
padding: 4rpx 0 24rpx;
font-weight: 500;
font-size: 28rpx;
color: #292D33;
.order-status {
margin-left: 20rpx;
color: #F24724;
}
.order-status-1,.order-status-3{
color: #FF9D0A;
}
.order-status-4,.order-status-5{
color: #35C376;
}
}
.package-info{
padding-top: 24rpx;
}
.package-item {
font-size: 28rpx;
color: #999EA8;
margin-bottom: 16rpx;
.label{
flex-shrink: 0;
margin-right: 40rpx;
}
.value{
color: #292D33;
}
.price {
color: #347BFF;
}
}
}
.bottom {
height: 96rpx;
padding: 0 12rpx;
font-size: 24rpx;
color: #999EA8;
.num {
font-weight: 700;
font-size: 32rpx;
color: #347BFF;
margin-left: 40rpx;
.unit {
font-size: 28rpx;
}
}
.btn {
margin-left: auto;
font-size: 28rpx;
color: #FFFFFF;
width: 180rpx;
height: 56rpx;
background: #347BFF;
border-radius: 32rpx;
justify-content: center;
}
}
}
.padding-bottom{
padding-bottom: 8rpx;
}
\ No newline at end of file \ No newline at end of file
<view class="item {{data.status == 1?'':'padding-bottom'}}" bindtap="jumpDetail">
<view class="status status-{{data.status}}">{{statusEnum[data.status]}}</view>
<view class="top flex">
<view class="icon">
<gl-image webp src="/equity/{{data.customerInfo.customerSex == 2 ?'woman-default-avatar' : 'default-avatar'}}.png"></gl-image>
</view>
<view class="info">
<view class="name flex">
{{data.customerInfo.customerName}}
<block wx:if="{{data.changeType > 0}}">
<block wx:if="{{data.changeType == 1}}">
<view class="tips new">New</view>
</block>
<block wx:else>
<view class="tips">更新</view>
</block>
</block>
</view>
<view class="phone">{{data.customerInfo.customerPhone}}</view>
</view>
</view>
<view class="info-box">
<block wx:for="{{infoObject}}" wx:key="index">
<block wx:if="{{data.customerInfo[item.key]}}">
<view class="info-item flex">
<view class="label">{{item.label}}</view>
<view class="value">
<block wx:if="{{item.key == 'carSeriesName'}}">
{{data.customerInfo.carBrand}}-{{data.customerInfo.carChildsBrandName}}-{{data.customerInfo.carSeriesName}}
</block>
<block wx:else>
{{data.customerInfo[item.key]}}
</block>
</view>
</view>
</block>
</block>
<block wx:for="{{sceneTypeStatusMap}}" wx:key="index">
<view class="info-item flex">
<view class="label">{{item.label}}</view>
<view class="value">{{statusEnum[data.sceneTypeStatusMap[item.key]]}}</view>
</view>
</block>
</view>
<block wx:if="{{data.boutiqueOrders.length}}">
<block wx:for="{{data.boutiqueOrders}}" wx:key="index">
<view class="package-box">
<view class="package-title flex">
订单{{index + 1}}
<view class="order-status order-status-{{item.status}}">{{status[item.status]}}</view>
</view>
<goods-list list="{{item.subOrderList}}" goodsNameKey="upgradeGoodsName" goodsPriceKey="totalPrice"></goods-list>
<view class="package-info">
<block wx:for="{{orderObj}}" wx:key="ind" wx:for-item="i" wx:for-index="ind">
<block wx:if="{{item[i.key]}}">
<view class="package-item flex">
<view class="label">{{i.label}}</view>
<view class="value {{i.key == 'totalPrice'?'price':''}}">
{{i.unit||''}}{{item[i.key] || ''}}
</view>
</view>
</block>
</block>
</view>
</view>
</block>
</block>
<block wx:if="{{data.status == 1}}">
<view class="bottom flex">
<view class="btn flex" catchtap="jump">数字报价单</view>
</view>
</block>
</view>
\ No newline at end of file \ No newline at end of file
module.exports = Behavior({
data: {
infoObject: [{
label: '车型',
key: 'carSeriesName'
},
{
label: '车辆颜色',
key: 'carColor'
},
{
label: '车辆价格',
key: 'price'
},
{
label: '座位数',
key: 'carSeat'
},
],
statusEnum: {
1: '待跟进',
2: '已升级',
'-1': '战败'
}
},
methods:{
jumpDetail(){
const {id} = this.data.data
wx.$router.go('clueDetail',{id})
}
}
})
\ No newline at end of file \ No newline at end of file
...@@ -122,6 +122,10 @@ Page({ ...@@ -122,6 +122,10 @@ Page({
}) })
// wx.$util.tsFormatTime(data.orderTime, 'Y年M月D日 h:m:s') // wx.$util.tsFormatTime(data.orderTime, 'Y年M月D日 h:m:s')
orderList.push({ ...data }) orderList.push({ ...data })
// 当获取不到数据 无法触发scroll-view 触底加载 手动触发加载
if (!data?.orderList.length && currentPage < 2) { // 默认最近三个月数据
this.onBottomRefresh()
}
// console.log(data, 'data') // console.log(data, 'data')
this.setData({ this.setData({
orderList, orderList,
...@@ -154,14 +158,22 @@ Page({ ...@@ -154,14 +158,22 @@ Page({
item.performanceMonthLabel = this.extractMonth(item.performanceMonth) item.performanceMonthLabel = this.extractMonth(item.performanceMonth)
item.height = item.staffDataList.length > 3 ? item.staffDataList.length * 70 + 120 : '300' item.height = item.staffDataList.length > 3 ? item.staffDataList.length * 70 + 120 : '300'
// console.log(Boolean(item.minimumWage && item.minimumWage > item.finalWage)); // console.log(Boolean(item.minimumWage && item.minimumWage > item.finalWage));
let currentMonthYear = wx.$util.tsFormatTime(new Date(), 'Y-M')
// 获取当前月份
if (currentMonthYear == item.performanceMonth) { // 当月预计工资提成
data.finalWage = item.staffDataList?.[0]?.performanceWage
}
item.staffDataList = item.staffDataList.map((childItem) => { item.staffDataList = item.staffDataList.map((childItem) => {
if (Boolean(childItem.minimumWage && childItem.minimumWage > childItem.finalWage)) { // 工资=最终工资finalWage-绩效提成performanceWage
childItem.finalWage = childItem.minimumWage childItem.wages = this.Subtr(childItem?.finalWage, childItem?.performanceWage)
// item.performanceWage = 0 // if (Boolean(childItem.minimumWage && childItem.minimumWage > childItem.finalWage)) {
childItem.hidePerformanceWage = true // childItem.finalWage = childItem.minimumWage
} else { // // item.performanceWage = 0
childItem.finalWage = childItem.basicWage // childItem.hidePerformanceWage = true
} // } else {
// childItem.finalWage = childItem.basicWage
// }
//
return childItem return childItem
}) })
...@@ -178,7 +190,8 @@ Page({ ...@@ -178,7 +190,8 @@ Page({
1: '中级导师', 1: '中级导师',
2: '高级导师' 2: '高级导师'
} }
data.staffInfo.titleLabel = userInfo.isSuper ? '超管' : titleLabel[data.staffInfo.title] // 取多场景下最高职级显示
data.staffInfo.titleLabel = userInfo.isSuper ? '超管' : titleLabel[Math.max(data.staffInfo.title)]
// 如果title是2,那导师就是员工自己 // 如果title是2,那导师就是员工自己
if (data.staffInfo.title) { if (data.staffInfo.title) {
} }
...@@ -195,6 +208,23 @@ Page({ ...@@ -195,6 +208,23 @@ Page({
wx.$util.hideLoading() wx.$util.hideLoading()
}) })
}, },
// 减法运算解决精度丢失问题
Subtr(num1, num2) {
var r1, r2, m, n
try{
r1 = num1.toString().split('.')[1].length
} catch(e) {
r1 = 0
}
try{
r2 = num2.toString().split(".")[1].length
}catch(e) {
r2 = 0
}
m = Math.pow(10, Math.max(r1, r2))
n = (r1 >= r2) ? r1 : r2
return ((num1 * m - num2 * m) / m).toFixed(n)
},
getDetailInfo() { getDetailInfo() {
let monthArray = this.getYearMonthArray() let monthArray = this.getYearMonthArray()
this.setData({ this.setData({
...@@ -203,9 +233,9 @@ Page({ ...@@ -203,9 +233,9 @@ Page({
currentPage: 0 currentPage: 0
}) })
// console.log(monthArray, 'monthArray') // console.log(monthArray, 'monthArray')
// 获取商学院员工信息及前3月绩效信息 // 获取工资绩效员工信息及前3月绩效信息
this.businessSchoolStaffInfo() this.businessSchoolStaffInfo()
//获取商学院员工订单绩效明细 //获取工资绩效员工订单绩效明细
this.orderPerformanceDetail() this.orderPerformanceDetail()
}, },
// 获取月份 // 获取月份
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!