Commit 78864b56 by 张立顺

Merge branch 'SAAS+V5.3.0-1117' of 192.168.3.233:saas_plus/sales-assistant into SAAS+V5.3.0-1117

2 parents e4db5539 811220f4
Showing 26 changed files with 179 additions and 72 deletions
...@@ -68,10 +68,10 @@ Component({ ...@@ -68,10 +68,10 @@ Component({
rightCurrent: false, rightCurrent: false,
defaultIndex: 1, defaultIndex: 1,
opts: { opts: {
keys: ['stattime', 'output'], keys: ['stattime', 'output', 'predictOutput'],
color: '#69C9FF', color: '#D1D7F5',
lineColr: '#6ED0BE', lineColr: '#347BFF',
tickCount: 8 tickCount: 10
}, },
}, },
...@@ -119,13 +119,16 @@ Component({ ...@@ -119,13 +119,16 @@ Component({
async getAnalysisData() { async getAnalysisData() {
try { try {
let params = this.getParams() let params = this.getParams()
params.merchantid = 44215138
const [outputData, buyAndToStoreData, chartData, supervisionSale] = await Promise.all([ const [outputData, buyAndToStoreData, chartData, supervisionSale] = await Promise.all([
CustomerApi.queryMerchantOutputAndAtv(params), CustomerApi.queryMerchantOutputAndAtv(params),
CustomerApi.queryMerchantBuyAndTostore(params), CustomerApi.queryMerchantBuyAndTostore(params),
CustomerApi.queryMerchantOutputTrend(params), CustomerApi.queryMerchantOutputTrend(params),
CustomerApi.queryServiceSupervisionSale(params) CustomerApi.queryServiceSupervisionSale(params)
]) ])
console.log(chartData) chartData?.data?.list?.forEach((val, index) => {
val.predictOutput = chartData.data?.listpredict?.[index] ? chartData.data?.listpredict?.[index].output: ''
})
this.setData({ this.setData({
outputData: outputData?.data?.list || [], outputData: outputData?.data?.list || [],
buyAndToStoreData: buyAndToStoreData?.data?.list || [], buyAndToStoreData: buyAndToStoreData?.data?.list || [],
......
...@@ -92,7 +92,8 @@ Component({ ...@@ -92,7 +92,8 @@ Component({
}) })
}, },
onMoreTap(e) { onMoreTap(e) {
const index = e.currentTarget.dataset.index let { index, type } = e.currentTarget.dataset
if (!type) return
const item = this.data.displayItems[index] || {} const item = this.data.displayItems[index] || {}
this.setData({ this.setData({
showPopup: true, showPopup: true,
......
...@@ -3,9 +3,9 @@ ...@@ -3,9 +3,9 @@
<block wx:for="{{displayItems}}" wx:key="index"> <block wx:for="{{displayItems}}" wx:key="index">
<view class="cell {{item.full ? 'cell-full' : (item.span === 2 ? 'cell-span2' : '')}}"> <view class="cell {{item.full ? 'cell-full' : (item.span === 2 ? 'cell-span2' : '')}}">
<view class="cell-label">{{item.label}}</view> <view class="cell-label">{{item.label}}</view>
<view class="cell-value {{item.highlight ? 'highlight' : ''}}"> <view class="cell-value {{item.highlight ? 'highlight' : ''}}" bindtap="onMoreTap" data-type="{{item.isLong}}" data-index="{{index}}">
<text class="value-text">{{item.value || '-'}}</text> <text class="value-text">{{item.value || '-'}}</text>
<image wx:if="{{item.isLong}}" class="more-icon" src="{{IMG_URL}}/customer/more-icon.png" mode="aspectFit" data-index="{{index}}" bindtap="onMoreTap" /> <image wx:if="{{item.isLong}}" class="more-icon" src="{{IMG_URL}}/customer/more-icon.png" mode="aspectFit" />
</view> </view>
</view> </view>
</block> </block>
......
...@@ -159,11 +159,11 @@ Component({ ...@@ -159,11 +159,11 @@ Component({
businessType: businessTypeObj[current] businessType: businessTypeObj[current]
} }
CustomerApi.getKPIData(params).then(res => { CustomerApi.getKPIData(params).then(res => {
res?.map(m => { console.log(res)
const completed = this.formatCurrency(m.completed, ) res?.forEach(val => {
const target = this.formatCurrency(m.target) val.completed = this.formatCurrency(val.completed)
const completionRate = this.formatCurrency(m.completionRate, true) val.target = this.formatCurrency(val.target)
return { ...m, completed, target, completionRate } val.completionRate = this.formatCurrency(val.completionRate, true)
}) })
res?.sort((a, b) => { res?.sort((a, b) => {
return a.month - b.month return a.month - b.month
......
...@@ -68,6 +68,10 @@ Component({ ...@@ -68,6 +68,10 @@ Component({
val.cycleIndicator = this.formatPercent(val.cycleIndicator) val.cycleIndicator = this.formatPercent(val.cycleIndicator)
val.fallbackIndicator = this.formatPercent(val.fallbackIndicator) val.fallbackIndicator = this.formatPercent(val.fallbackIndicator)
}) })
res?.displaySituationWarningList?.forEach(val => {
val.cycleIndicator = this.formatPercent(val.cycleIndicator)
val.fallbackIndicator = this.formatPercent(val.fallbackIndicator)
})
// 初始化展开状态:仅在有数据时允许展开 // 初始化展开状态:仅在有数据时允许展开
const hasBusiness = (res.displaySituationWarningList || []).length > 0 const hasBusiness = (res.displaySituationWarningList || []).length > 0
const hasBottom = (res?.safetyIndexWarningList || []).length > 0 const hasBottom = (res?.safetyIndexWarningList || []).length > 0
......
...@@ -79,7 +79,7 @@ ...@@ -79,7 +79,7 @@
opacity: 0; opacity: 0;
.summary-card { .summary-card {
background: #fffcf7; background: #fffcf7;
padding: 24rpx 32rpx; padding: 24rpx 32rpx 1rpx;
.summary-title { .summary-title {
color: #292D33; color: #292D33;
font-size: 28rpx; font-size: 28rpx;
...@@ -88,6 +88,7 @@ ...@@ -88,6 +88,7 @@
.summary-row { .summary-row {
color: #757B85; color: #757B85;
font-size: 26rpx; font-size: 26rpx;
margin-bottom: 28rpx;
.red { .red {
color: #F24724; color: #F24724;
} }
......
.bar-wrap { .bar-wrap {
padding: 34rpx 30rpx 30rpx 40rpx; padding: 34rpx 10rpx 30rpx 40rpx;
box-sizing: border-box; box-sizing: border-box;
.searchList { .searchList {
......
...@@ -18,7 +18,7 @@ Component({ ...@@ -18,7 +18,7 @@ Component({
}, },
color: { color: {
type: String, type: String,
value: '#3975C6' value: '#347BFF'
} }
}, },
observers: { observers: {
...@@ -40,24 +40,24 @@ Component({ ...@@ -40,24 +40,24 @@ Component({
* 组件的方法列表 * 组件的方法列表
*/ */
methods: { methods: {
onInitChart(xData, yData) { onInitChart(xData, yData, yData2) {
this.ecComponent && this.ecComponent.init((canvas, width, height, dpr) => { this.ecComponent && this.ecComponent.init((canvas, width, height, dpr) => {
const chart = echarts.init(canvas, null, { const chart = echarts.init(canvas, null, {
width: width, width: width,
height: height, height: height,
devicePixelRatio: dpr // new devicePixelRatio: dpr // new
}); });
this.setOption(chart, xData, yData); this.setOption(chart, xData, yData, yData2);
return chart; return chart;
}) })
}, },
setOption(chart, xData, yData) { setOption(chart, xData, yData, yData2) {
let maxSpan = xData.length < 10 ? 80 : 20 let maxSpan = xData.length < 10 ? 80 : 20
// let start= xData.length < 10 ? 50 : 80 // let start= xData.length < 10 ? 50 : 80
var option = { var option = {
grid: { grid: {
left: 8, left: 8,
right: 30, right: 18,
top: 30, top: 30,
bottom: 0, bottom: 0,
containLabel: true containLabel: true
...@@ -66,32 +66,27 @@ Component({ ...@@ -66,32 +66,27 @@ Component({
trigger: 'axis', trigger: 'axis',
triggerOn: "mousemove", triggerOn: "mousemove",
axisPointer: { axisPointer: {
type: "shadow", type: "line",
shadowStyle: { shadowStyle: {
shadowColor: 'rgba(53, 195, 118, .1)', shadowColor: '#E5EAFC',
color: 'rgba(53, 195, 118, .1)', color: '#E5EAFC',
}, },
lineStyle: { lineStyle: {
color: '#35C376', color: '#2A2B32',
type: 'shadow' type: 'dashed'
} }
}, },
position: 'top', position: 'top',
padding: [0, 12], padding: [0, 12],
borderWidth: 2, borderRadius: 8,
borderColor: '#6ED0BE', backgroundColor: '#292D33',
borderRadius: 10,
textStyle: { textStyle: {
color: '#6ED0BE', color: '#FFFFFF',
fontSize: 10 fontSize: 11
},
position: function (point, params, dom, rect, size) {
// 固定在顶部
return [point[0]-20, '10%'];
}, },
formatter: function (item) { formatter: function (item) {
return `${item[0].value}` return `${item[0].value}`
} }
}, },
xAxis: { xAxis: {
type: 'category', type: 'category',
...@@ -100,11 +95,15 @@ Component({ ...@@ -100,11 +95,15 @@ Component({
// max: 5, // max: 5,
axisLabel: { axisLabel: {
interval: 0,
fontSize: 11, fontSize: 11,
color: '#A6A6A6' color: '#999EA8'
}, },
axisLine: { axisLine: {
show: false //坐标轴线线 show: true,
lineStyle: {
color: "rgba(153, 158, 168, 0.5)",
},
}, },
axisTick: { axisTick: {
show: false //坐标轴刻度 show: false //坐标轴刻度
...@@ -114,51 +113,110 @@ Component({ ...@@ -114,51 +113,110 @@ Component({
yAxis: { yAxis: {
x: 'center', x: 'center',
type: 'value', type: 'value',
labelLine: {
show: true,
},
axisLabel: { axisLabel: {
fontSize: 11, fontSize: 11,
color: '#A6A6A6' color: '#999EA8',
formatter(value) {
if (value >= 10000) {
return value / 10000 + "w";
} else {
return value;
}
},
}, },
axisLine: { axisLine: {
show: false //坐标轴线线 show: true,
lineStyle: {
color: "rgba(153, 158, 168, 0.5)",
},
}, },
axisTick: { axisTick: {
show: false //坐标轴刻度 show: false //坐标轴刻度
}, },
splitLine: { splitLine: {
show: true,
lineStyle: { lineStyle: {
type: 'dashed' type: 'dashed'
} }
} }
}, },
dataZoom: { series: [
type: "inside", {
maxSpan: maxSpan, showSymbol: false,
// end: 100,
// // start: start,
},
series: [{
data: yData, data: yData,
type: 'line', type: 'line',
// smooth: true, // smooth: true,
color: this.data.color color: this.data.color,
}] areaStyle: {
color: {
type: 'linear',
x: 0,
y: 0,
x2: 0,
y2: 1,
colorStops: [{
offset: 0,
color: 'rgba(147, 170, 253, 1)' // 顶部颜色
}, {
offset: 1,
color: 'rgba(229, 234, 252, 0.31)' // 底部颜色
}]
}
}
},
{
showSymbol: false,
data: yData2,
type: 'line',
lineStyle: {
type: 'dashed'
},
itemStyle: {
color: "rgba(52, 123, 255, 1)",
},
// smooth: true,
color: this.data.color,
areaStyle: {
color: {
type: 'linear',
x: 0,
y: 0,
x2: 0,
y2: 1,
colorStops: [{
offset: 0,
color: 'rgba(147, 170, 253, 1)' // 顶部颜色
}, {
offset: 1,
color: 'rgba(229, 234, 252, 0.31)' // 底部颜色
}]
}
}
}
]
} }
chart.setOption(option) chart.setOption(option)
}, },
//初始化数据 //初始化数据
initData(data) { initData(data) {
const xData = [], const xData = [],
yData = []; yData = [],
const [x, y] = this.data.keys yData2 = []
const [x, y, y2] = this.data.keys
data.forEach(item => { data.forEach(item => {
xData.push(item[x]) xData.push(item[x])
yData.push(item[y]) yData.push(item[y])
yData2.push(item[y2])
}) })
this.setData({ this.setData({
xData, xData,
yData yData,
yData2
}) })
this.onInitChart(xData, yData) this.onInitChart(xData, yData, yData2)
}, },
}, },
ready() { ready() {
......
...@@ -7,5 +7,14 @@ Component({ ...@@ -7,5 +7,14 @@ Component({
} }
}, },
data: {}, data: {},
methods: {} methods: {
// 图片预览
previewImage(e) {
let { url, index } = e.currentTarget.dataset
wx.previewImage({
urls: url,
current: url[index]
})
}
}
}) })
\ No newline at end of file \ No newline at end of file
...@@ -51,6 +51,7 @@ ...@@ -51,6 +51,7 @@
height: 72rpx; height: 72rpx;
border-radius: 8rpx; border-radius: 8rpx;
background: #D5D8DB; background: #D5D8DB;
margin-right: 16rpx;
} }
} }
......
...@@ -46,10 +46,12 @@ ...@@ -46,10 +46,12 @@
<view class="section-title">附加信息</view> <view class="section-title">附加信息</view>
<view class="card"> <view class="card">
<view class="row image-row"> <view class="row image-row">
<view class="label">门店门头照片</view> <view class="label">店面门头照片</view>
<view class="value"> <view class="value">
<view class="photo-wrap" wx:if="{{detail.storePhoto}}"> <view class="photo-wrap" wx:if="{{detail.storePhoto}}">
<image class="photo" webp src="{{detail.storePhoto}}" /> <block wx:for="{{detail.storePhotoList}}" wx:key="index">
<image class="photo" data-url="{{detail.storePhotoList}}" bindtap="previewImage" webp data-index="{{index}}" src="{{item}}" />
</block>
</view> </view>
<view wx:else>-</view> <view wx:else>-</view>
</view> </view>
......
...@@ -62,6 +62,7 @@ ...@@ -62,6 +62,7 @@
border-bottom: none; border-bottom: none;
} }
.uploader-wrap { .uploader-wrap {
margin-top: -16rpx;
padding: 0 0 32rpx 40rpx; padding: 0 0 32rpx 40rpx;
border-bottom: 1rpx solid #EFF0F280; border-bottom: 1rpx solid #EFF0F280;
.image_content { .image_content {
......
...@@ -43,6 +43,7 @@ ...@@ -43,6 +43,7 @@
</view> </view>
</view> </view>
</block> </block>
<view class="section-title">附加信息</view>
<view class="row no-border"> <view class="row no-border">
<view class="label">店面门头照片</view> <view class="label">店面门头照片</view>
</view> </view>
......
...@@ -32,7 +32,6 @@ Page({ ...@@ -32,7 +32,6 @@ Page({
if (pageQuery.currentTab == 2) { if (pageQuery.currentTab == 2) {
this.setData({tabIndex: 2}) this.setData({tabIndex: 2})
} }
this.setData({tabIndex: 2})
} }
}, },
...@@ -89,7 +88,10 @@ Page({ ...@@ -89,7 +88,10 @@ Page({
}, },
getMerchantDetail(pageQuery) { getMerchantDetail(pageQuery) {
wx.$api.showLoading()
CustomerApi.getMaterialData({id: pageQuery.merchantId}).then(res => { CustomerApi.getMaterialData({id: pageQuery.merchantId}).then(res => {
wx.$api.hideLoading()
this.setData({showPage: true})
// 处理数据回显 // 处理数据回显
this.progressData(res) this.progressData(res)
}) })
...@@ -117,6 +119,8 @@ Page({ ...@@ -117,6 +119,8 @@ Page({
data.salePotentialCustomerPersonnelInfoDTOList?.forEach(val => { data.salePotentialCustomerPersonnelInfoDTOList?.forEach(val => {
val.roleName = ROLELIST?.find(v => v.value == val.personnelType)?.label val.roleName = ROLELIST?.find(v => v.value == val.personnelType)?.label
}) })
// 店面门头照片
data.storePhotoList = data.storePhoto?.split(',')
this.setData({ this.setData({
infoDetail: data infoDetail: data
}, () => { }, () => {
......
<!--packageCustomer/pages/merchantDetail/merchantDetail.wxml--> <!--packageCustomer/pages/merchantDetail/merchantDetail.wxml-->
<navigation-bar showBack="{{true}}" navStyle="{{navStyle}}" bindnavbarReady="navbarReady">门店详情</navigation-bar> <navigation-bar showBack="{{true}}" navStyle="{{navStyle}}" bindnavbarReady="navbarReady">门店详情</navigation-bar>
<scroll-view class="layout" scroll-y style="padding-top: {{navBarHeight}}px;" bindscroll="onScroll" scroll-top="{{setScrollTop}}"> <scroll-view class="layout" scroll-y style="padding-top: {{navBarHeight}}px;" bindscroll="onScroll" scroll-top="{{setScrollTop}}">
<view class="container"> <view class="container" wx:if="{{showPage}}">
<view class="card header-card"> <view class="card header-card">
<view class="title-row"> <view class="title-row">
<text class="status" style="color: {{statusText[infoDetail.storeType].color}};background: {{statusText[infoDetail.storeType].background}}">{{statusText[infoDetail.storeType].label}}</text> <text class="status" style="color: {{statusText[infoDetail.storeType].color}};background: {{statusText[infoDetail.storeType].background}}">{{statusText[infoDetail.storeType].label}}</text>
......
...@@ -77,6 +77,14 @@ Page({ ...@@ -77,6 +77,14 @@ Page({
}) })
}, },
// 图片预览
previewImage(e) {
let { url } = e.currentTarget.dataset
wx.previewImage({
urls: [url]
})
},
progressData(data) { progressData(data) {
// 主营品牌 // 主营品牌
data.mainCategory = data?.salePotentialCustomerBrandDTOList?.map(val => {return `${val.mainBrandName}${val.subBrandName}`})?.join('/') data.mainCategory = data?.salePotentialCustomerBrandDTOList?.map(val => {return `${val.mainBrandName}${val.subBrandName}`})?.join('/')
...@@ -90,6 +98,8 @@ Page({ ...@@ -90,6 +98,8 @@ Page({
data.salePotentialCustomerPersonnelInfoDTOList?.forEach(val => { data.salePotentialCustomerPersonnelInfoDTOList?.forEach(val => {
val.roleName = ROLELIST?.find(v => v.value == val.personnelType)?.label val.roleName = ROLELIST?.find(v => v.value == val.personnelType)?.label
}) })
// 店面门头照片
data.storePhotoList = data.storePhoto?.split(',')
this.setData({ this.setData({
infoDetail: data infoDetail: data
}, () => { }, () => {
...@@ -148,7 +158,7 @@ Page({ ...@@ -148,7 +158,7 @@ Page({
this.setData({ this.setData({
tabIndex: index tabIndex: index
}) })
this.resetAndLoad() if (index == 0) this.resetAndLoad()
wx.nextTick(() => { this.measureLayout() }) wx.nextTick(() => { this.measureLayout() })
}, },
......
...@@ -92,6 +92,7 @@ ...@@ -92,6 +92,7 @@
padding: 16rpx; padding: 16rpx;
text-align: center; text-align: center;
font-size: 24rpx; font-size: 24rpx;
border-radius: 16rpx;
.title { .title {
color: #757B85; color: #757B85;
margin-bottom: 12rpx; margin-bottom: 12rpx;
...@@ -120,6 +121,7 @@ ...@@ -120,6 +121,7 @@
padding: 32rpx; padding: 32rpx;
margin-bottom: 24rpx; margin-bottom: 24rpx;
.visit-title { .visit-title {
font-weight: 500;
color: #292D33; color: #292D33;
font-size: 32rpx; font-size: 32rpx;
margin-bottom: 16rpx; margin-bottom: 16rpx;
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
<info-board items="{{infoBoardItems}}" threshold="{{24}}" clampLines="{{1}}" /> <info-board items="{{infoBoardItems}}" threshold="{{24}}" clampLines="{{1}}" />
<view class="fail-row" wx:if="{{infoDetail.potentialCustomersStatus == 2}}"> <view class="fail-row" wx:if="{{infoDetail.potentialCustomersStatus == 2}}">
<view class="title">战败原因</view> <view class="title">战败原因</view>
<view class="content">{{infoDetail.reason}}</view> <view class="content">{{infoDetail.failureReason}}</view>
</view> </view>
</view> </view>
<view class="tabbar-anchor" id="tabbarAnchor"> <view class="tabbar-anchor" id="tabbarAnchor">
...@@ -29,12 +29,12 @@ ...@@ -29,12 +29,12 @@
<block wx:else> <block wx:else>
<block wx:for="{{visitRecords}}" wx:key="index"> <block wx:for="{{visitRecords}}" wx:key="index">
<view class="card visit-card"> <view class="card visit-card">
<view class="visit-title">{{item.contactName}}</view> <view class="visit-title">{{item.createdBy}}</view>
<block wx:for="{{cardItemObj}}" wx:for-item='i' wx:for-index='ind' wx:key='ind'> <block wx:for="{{cardItemObj}}" wx:for-item='i' wx:for-index='ind' wx:key='ind'>
<view class="item"> <view class="item">
<view class="label">{{i.label}}</view> <view class="label">{{i.label}}</view>
<block wx:if="{{i.type == 'image'}}"> <block wx:if="{{i.type == 'image'}}">
<image wx:if="{{item[i.key]}}" src="{{item[i.key]}}"></image> <image wx:if="{{item[i.key]}}" data-url="{{item[i.key]}}" bindtap="previewImage" src="{{item[i.key]}}"></image>
<view wx:else class="value">-</view> <view wx:else class="value">-</view>
</block> </block>
...@@ -60,7 +60,7 @@ ...@@ -60,7 +60,7 @@
</scroll-view> </scroll-view>
<!-- 底部固定操作条:新增拜访 --> <!-- 底部固定操作条:新增拜访 -->
<!-- potentialCustomersStatus 4是根据isBind绑定状态方便处理造出来的值 --> <!-- potentialCustomersStatus 4是根据isBind绑定状态方便处理造出来的值 -->
<view class="bottom-bar" wx:if="{{tabIndex != 0 && userInfo.loginRole != 1 && infoDetail.potentialCustomersStatus != 3 && infoDetail.potentialCustomersStatus != 4}}"> <view class="bottom-bar" wx:if="{{tabIndex != 1 && userInfo.loginRole != 1 && infoDetail.potentialCustomersStatus != 3 && infoDetail.potentialCustomersStatus != 4}}">
<view class="inner safe-area-bottom"> <view class="inner safe-area-bottom">
<view class="btn" bind:tap="onCreateVisit">新增拜访</view> <view class="btn" bind:tap="onCreateVisit">新增拜访</view>
</view> </view>
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
.box { .box {
margin: 0 32rpx; margin: 0 32rpx;
border-bottom: 1rpx solid #EFF0F2; border-bottom: 1rpx solid #EFF0F280;
&:last-child{ &:last-child{
border-bottom: none; border-bottom: none;
} }
...@@ -65,6 +65,7 @@ ...@@ -65,6 +65,7 @@
padding: 16rpx; padding: 16rpx;
font-size: 24rpx; font-size: 24rpx;
margin-bottom: 20rpx; margin-bottom: 20rpx;
color: #292D33;
image { image {
width: 32rpx; width: 32rpx;
height: 32rpx; height: 32rpx;
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
</view> </view>
</view> </view>
<view class="choose-btn" bindtap="chooseCarBrand"> <view class="choose-btn" bindtap="chooseCarBrand">
<text>请选择</text> <text>去选择</text>
<image src="{{IMG_URL}}customer/arrow.png" mode=""/> <image src="{{IMG_URL}}customer/arrow.png" mode=""/>
</view> </view>
<view class="list-box"> <view class="list-box">
......
...@@ -73,13 +73,13 @@ Component({ ...@@ -73,13 +73,13 @@ Component({
mainBrandId: searchObj?.selectedMainBrand?.[0]?.id, mainBrandId: searchObj?.selectedMainBrand?.[0]?.id,
subBrandId: searchObj?.selectedMainBrand?.[0]?.children[0]?.id, subBrandId: searchObj?.selectedMainBrand?.[0]?.children[0]?.id,
cooperationMode: searchObj?.cooperationModelList?.value, cooperationMode: searchObj?.cooperationModelList?.value,
businessTypeList: searchObj?.businessTypeList?.map(val => { if (val.value) return val.value })?.join(','), businessTypeList: searchObj?.businessTypeList?.map(val => { if (val.value) return val.value }),
flowSituation: searchObj?.trafficStatusList?.value, flowSituation: searchObj?.trafficStatusList?.value,
provinceId: searchObj?.provinces?.value, provinceId: searchObj?.provinces?.value,
salesPersonId: searchObj?.salesStaffList?.value, salesPersonId: searchObj?.salesStaffList?.value,
potentialCustomersStatus: statusIndex == 0 ? undefined : statusMap[statusIndex], // 状态 potentialCustomersStatus: statusIndex == 0 ? undefined : statusMap[statusIndex], // 状态
isBind: statusIndex == 3 ? 1 : undefined, // 是否绑定 isBind: statusIndex == 3 ? 1 : undefined, // 是否绑定
isSuperior: userInfo.loginRole != 3 ? 1 : 0, isSuperior: userInfo.loginRole == 1 ? 1 : 0,
queryScoure: 3 queryScoure: 3
} }
return obj return obj
......
...@@ -53,6 +53,7 @@ ...@@ -53,6 +53,7 @@
color: #757B85; color: #757B85;
} }
.value { .value {
font-family: "numberBold";
margin-top: 8rpx; margin-top: 8rpx;
font-size: 40rpx; font-size: 40rpx;
font-weight: 700; font-weight: 700;
......
...@@ -82,7 +82,8 @@ ...@@ -82,7 +82,8 @@
<view class="label">战败原因</view> <view class="label">战败原因</view>
<view class="value">{{item.failureReason || '-'}} </view> <view class="value">{{item.failureReason || '-'}} </view>
</view> </view>
<view class="card-actions" wx:if="{{userInfo.loginRole != 1}}"> <!-- loginRole 1 总监 2 大区经理 3 销售 -->
<view class="card-actions" wx:if="{{(userInfo.loginRole == 2 && item.isSelf == 1) || userInfo.loginRole == 3}}">
<view wx:if="{{item.potentialCustomersStatus == 1 || item.potentialCustomersStatus == 3}}" class="btn {{item.potentialCustomersStatus == 1 ? 'ghost' : ''}}" catchtap="jump" data-item="{{item}}">信息完善</view> <view wx:if="{{item.potentialCustomersStatus == 1 || item.potentialCustomersStatus == 3}}" class="btn {{item.potentialCustomersStatus == 1 ? 'ghost' : ''}}" catchtap="jump" data-item="{{item}}">信息完善</view>
<view wx:if="{{item.potentialCustomersStatus == 1}}" class="btn" catchtap="jump" data-item="{{item}}" data-name="resultFeedback">结果反馈</view> <view wx:if="{{item.potentialCustomersStatus == 1}}" class="btn" catchtap="jump" data-item="{{item}}" data-name="resultFeedback">结果反馈</view>
</view> </view>
......
import { IMG_URL } from '~/utils/constantData' import { IMG_URL } from '~/utils/constantData'
import CustomerApi from '~/api/customerApi/index' import CustomerApi from '~/api/customerApi/index'
import dayjs from 'dayjs'
// 预计算安全的月份时间戳,避免初始 0 值 // 预计算安全的月份时间戳,避免初始 0 值
const __NOW__ = new Date() const __NOW__ = new Date()
...@@ -59,12 +60,13 @@ Component({ ...@@ -59,12 +60,13 @@ Component({
mainBrandId: searchObj?.selectedMainBrand?.[0]?.id, mainBrandId: searchObj?.selectedMainBrand?.[0]?.id,
subBrandId: searchObj?.selectedMainBrand?.[0]?.children[0]?.id, subBrandId: searchObj?.selectedMainBrand?.[0]?.children[0]?.id,
cooperationMode: searchObj?.cooperationModelList?.value, cooperationMode: searchObj?.cooperationModelList?.value,
businessTypeList: searchObj?.businessTypeList?.map(val => { if (val.value) return val.value })?.join(','), businessTypeList: searchObj?.businessTypeList?.map(val => { if (val.value) return val.value }),
flowSituation: searchObj?.trafficStatusList?.value, flowSituation: searchObj?.trafficStatusList?.value,
provinceId: searchObj?.provinces?.value, provinceId: searchObj?.provinces?.value,
salesPersonId: searchObj?.salesStaffList?.value, salesPersonId: searchObj?.salesStaffList?.value,
storeType: statusIndex ? statusIndex : undefined, storeType: statusIndex ? statusIndex : undefined,
isSuperior: userInfo.loginRole != 3 ? 1 : 0 isSuperior: userInfo.loginRole == 1 ? 1 : 0,
queryScoure: 3
} }
return obj return obj
}, },
...@@ -159,6 +161,7 @@ Component({ ...@@ -159,6 +161,7 @@ Component({
}, },
getMore() { getMore() {
this.loadMore()
}, },
async loadMore(cb) { async loadMore(cb) {
...@@ -169,6 +172,8 @@ Component({ ...@@ -169,6 +172,8 @@ Component({
const res = await CustomerApi.getStorePageList({ currentPage, pageSize, ...params }) const res = await CustomerApi.getStorePageList({ currentPage, pageSize, ...params })
const nextList = (res.list || []).map(val => { const nextList = (res.list || []).map(val => {
val.salesUser = val.salePersonnelInfoDTOList?.map(v => { return v.personnelName })?.join('/') val.salesUser = val.salePersonnelInfoDTOList?.map(v => { return v.personnelName })?.join('/')
val.signedTime = val.signedTime ? dayjs(val.signedTime).format('YYYY-MM-DD HH:mm') : ''
val.expectedOperationDate = val.expectedOperationDate ? dayjs(val.expectedOperationDate).format('YYYY-MM-DD') : ''
return val return val
}) })
const total = res?.total || res?.count || 0 const total = res?.total || res?.count || 0
......
...@@ -64,6 +64,7 @@ ...@@ -64,6 +64,7 @@
color: #757B85; color: #757B85;
} }
.value { .value {
font-family: "numberBold";
margin-top: 8rpx; margin-top: 8rpx;
font-size: 40rpx; font-size: 40rpx;
font-weight: 700; font-weight: 700;
......
...@@ -31,7 +31,8 @@ ...@@ -31,7 +31,8 @@
<view class="bg_iamge"> <view class="bg_iamge">
<glsx-image src="{{'customer/top-bg.png'}}" class="image_class" /> <glsx-image src="{{'customer/top-bg.png'}}" class="image_class" />
</view> </view>
<scroll-view class="layout" style="padding-top: calc({{navBarHeight}}px + 172rpx);" scroll-top="{{setScrollTop}}" lower-threshold="104" scroll-y bindscrolltolower="getMore" bindscroll="onPageScroll"> <!-- scroll-top="{{setScrollTop}}" -->
<scroll-view class="layout" style="padding-top: calc({{navBarHeight}}px + 172rpx);" scroll-into-view="{{statusIndex % 2 ? 'mask-view' : 'mask-view-2'}}" lower-threshold="104" scroll-y bindscrolltolower="getMore" bindscroll="onPageScroll">
<view class="container"> <view class="container">
<block wx:if="{{myTabIdx==0}}"> <block wx:if="{{myTabIdx==0}}">
<potential-section id="potentialSection" <potential-section id="potentialSection"
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!