Commit 7ea5ddbd by 张立顺

feat 功能联调

1 parent c317ff7a
...@@ -45,11 +45,11 @@ ...@@ -45,11 +45,11 @@
</view> </view>
</block> </block>
<block wx:if="{{loginType == 0 &&agree}}"> <block wx:if="{{loginType == 0 &&agree}}">
<button class="button" disabled="{{disabled}}" hover-class="btn-hover" open-type="getPhoneNumber" bindgetphonenumber="wxLogin" loading="{{loading}}">授权登录 <button class="button" disabled="{{disabled}}" hover-class="btn-hover" open-type="getPhoneNumber" bindgetphonenumber="wxLogin" loading="{{loading}}">登录
</button> </button>
</block> </block>
<block wx:else> <block wx:else>
<button class="button" disabled="{{disabled}}" hover-class="btn-hover" bindtap="login" loading="{{loading}}">手机号登录 <button class="button" disabled="{{disabled}}" hover-class="btn-hover" bindtap="login" loading="{{loading}}">登录
</button> </button>
</block> </block>
<auth-setting bind:choose="authChoose" /> <auth-setting bind:choose="authChoose" />
......
// packageIndex/pages/regionalLeaders/regionalLeaders.js // 页面的初始数据
Component({ Page({
/**
* 组件的属性列表
*/
properties: {
},
/**
* 组件的初始数据
*/
data: { data: {
// 页面的初始数据
pageQuery: null
}, },
// onRoute(options) {
/** // console.log(options, 'options')
* 组件的方法列表 // // console.log(options, 'options')
*/ // // this.setData({
methods: { // // month: options.month,
// // staffUuid: options.staffUuid,
// // regionId: options.regionId
// // })
// // this.getWarningStores()
// },
onLoad: function (options) {
console.log(options, 'options')
// 生命周期函数--监听页面加载
console.log(options, 'options')
let { query } = options
if (query) {
const pageQuery = JSON.parse(decodeURIComponent(query))
// console.log(pageQuery, pageQuery.regionName, 'pageQuery')
this.setData({ pageQuery })
wx.setNavigationBarTitle({
title: pageQuery.regionName
})
}
} }
})
\ No newline at end of file \ No newline at end of file
})
{ {
"component": true, "component": true,
"usingComponents": {}
}
\ No newline at end of file \ No newline at end of file
"usingComponents": {
"regionalLeaders": "/pages/components/regionalLeaders/regionalLeaders"
}
}
/* packageIndex/pages/regionalLeaders/regionalLeaders.wxss */
\ No newline at end of file \ No newline at end of file
/* packageIndex/pages/regionalLeaders/regionalLeaders.wxss */
.layout {
box-sizing: border-box;
position: relative;
font-size: 24rpx;
color: #8A8C90;
overflow: scroll;
margin: 0 var(--fontSize20);
padding-bottom: 30rpx;
.tabContainer {
height: 100rpx;
}
}
\ No newline at end of file \ No newline at end of file
<!--packageIndex/pages/regionalLeaders/regionalLeaders.wxml--> <!--packageIndex/pages/regionalLeaders/regionalLeaders.wxml-->
<text>packageIndex/pages/regionalLeaders/regionalLeaders.wxml</text>
\ No newline at end of file \ No newline at end of file
<!-- <text>packageIndex/pages/regionalLeaders/regionalLeaders.wxml</text> -->
<view class="layout">
<regionalLeaders regionId="{{ pageQuery.regionId }}" wx:if="{{ pageQuery }}"></regionalLeaders>
</view>
\ No newline at end of file \ No newline at end of file
// packageIndex/pages/staff/staff.js // packageIndex/pages/staff/staff.js
Page({ Page({
/** /**
* 页面的初始数据 * 页面的初始数据
*/ */
data: { data: {
pageQuery: null
}, },
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad(options) { onLoad(options) {
console.log(options, 'options')
let { query } = options
if (query) {
const pageQuery = JSON.parse(decodeURIComponent(query))
console.log(pageQuery, pageQuery.staffName, 'pageQuery')
this.setData({ pageQuery })
wx.setNavigationBarTitle({
title: pageQuery.staffName
})
}
}, },
/** /**
* 生命周期函数--监听页面初次渲染完成 * 生命周期函数--监听页面初次渲染完成
*/ */
onReady() { onReady() {},
},
/** /**
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
*/ */
onShow() { onShow(options) {},
},
/** /**
* 生命周期函数--监听页面隐藏 * 生命周期函数--监听页面隐藏
*/ */
onHide() { onHide() {},
},
/** /**
* 生命周期函数--监听页面卸载 * 生命周期函数--监听页面卸载
*/ */
onUnload() { onUnload() {},
},
/** /**
* 页面相关事件处理函数--监听用户下拉动作 * 页面相关事件处理函数--监听用户下拉动作
*/ */
onPullDownRefresh() { onPullDownRefresh() {},
},
/** /**
* 页面上拉触底事件的处理函数 * 页面上拉触底事件的处理函数
*/ */
onReachBottom() { onReachBottom() {},
},
/** /**
* 用户点击右上角分享 * 用户点击右上角分享
*/ */
onShareAppMessage() {
}
})
\ No newline at end of file \ No newline at end of file
onShareAppMessage() {}
})
{ {
"usingComponents": {}
}
\ No newline at end of file \ No newline at end of file
"usingComponents": {
"staff": "/pages/components/staff/staff"
}
}
/* packageIndex/pages/staff/staff.wxss */
\ No newline at end of file \ No newline at end of file
/* packageIndex/pages/staff/staff.wxss */
.layout {
box-sizing: border-box;
position: relative;
font-size: 24rpx;
color: #8A8C90;
overflow: scroll;
margin: 0 var(--fontSize20);
padding-bottom: 30rpx;
.tabContainer {
height: 100rpx;
}
}
\ No newline at end of file \ No newline at end of file
<!--packageIndex/pages/staff/staff.wxml--> <!--packageIndex/pages/staff/staff.wxml-->
<text>packageIndex/pages/staff/staff.wxml</text>
\ No newline at end of file \ No newline at end of file
<!-- <text>packageIndex/pages/staff/staff.wxml</text> -->
<view class="layout">
<staff staffUuid="{{ pageQuery.staffUuid }}" regionId="{{ pageQuery.regionId }}" wx:if="{{ pageQuery }}"></staff>
</view>
\ No newline at end of file \ No newline at end of file
<tab-bar tabList="{{ tabList }}" bindclick="tabClick" activeIndex="{{ activeIndex }}" /> <tab-bar tabList="{{ tabList }}" bindclick="tabClick" activeIndex="{{ activeIndex }}" />
<scroll-view class="scrollView" scroll-y style="height: calc(100vh - 80px);"> <scroll-view class="scrollView" scroll-y style="height: calc(100vh - 80px);">
<view class="list"> <view class="list">
<!-- wx:for="{{ list }}" wx:key="index" --> <!-- wx:for="{{ list }}" wx:key="index" -->
<view class="box" wx:for="{{ list }}" wx:key="index" data-item="{{ item }}" bindtap="navigateToStoreDetail"> <view class="box" wx:for="{{ list }}" wx:key="index" data-item="{{ item }}" bindtap="navigateToStoreDetail">
<text class="merchant"><text class="status {{ item.storeType == 1?'newStore':'oldStore' }}">{{item.storeType == 1?'新店':'老店'}}</text><text class="merchantName">{{item.merchantName}}</text></text> <text class="merchant"><text class="status {{ item.storeType == 1?'newStore':'oldStore' }}">{{item.storeType == 1?'新店':'老店'}}</text><text class="merchantName">{{item.merchantName}}</text></text>
<view class="introduction merchantInfo"> <view class="introduction merchantInfo">
<view class="item"> <view class="item">
<!-- <view class="left children"> --> <!-- <view class="left children"> -->
<view class="label">拜访次数</view> <view class="label">拜访次数</view>
<view class="content">{{item.visitTimes?item.visitTimes+'次':'-'}}</view> <view class="content">{{item.visitTimes?item.visitTimes+'次':'-'}}</view>
<!-- </view> --> <!-- </view> -->
<!-- <view class="right children"> <!-- <view class="right children">
<view class="label">销售人员</view> <view class="label">销售人员</view>
<view class="content text-hide">{{item.visitCount?item.visitCount+'次':'-'}}</view> <view class="content text-hide">{{item.visitCount?item.visitCount+'次':'-'}}</view>
</view> --> </view> -->
</view> </view>
<view class="item"> <view class="item">
<view class="label person">销售人员</view> <view class="label person">销售人员</view>
<!-- <view class="content text-hide" wx:for="{{item.salePersonnelInfoDTOList}}" wx:key="index" >{{item.salePersonnelInfoDTOList[index].salePersonnelName}}</view> --> <!-- view. -->
</view> <view class="content text-hide" wx:for="{{ item.salePersonnelInfoDTOList }}" wx:key="index">{{item.salePersonnelInfoDTOList[index].salePersonnelName}}</view>
<view class="item"> </view>
<view class="label person">签约时间</view> <view class="item">
<view class="content">{{item.signedTime||'-'}}</view> <view class="label person">签约时间</view>
</view> <view class="content">{{item.signedTime||'-'}}</view>
<view class="item"> </view>
<view class="label person">展业时间</view> <view class="item">
<view class="content">{{item.expectedOperationDate||'-'}}</view> <view class="label person">展业时间</view>
</view> <view class="content">{{item.expectedOperationDate||'-'}}</view>
<view class="item"> </view>
<view class="label person">门店地址</view> <view class="item">
<view class="content">{{item.address||'-'}}</view> <view class="label person">门店地址</view>
</view> <view class="content">{{item.address||'-'}}</view>
</view> </view>
</view> </view>
</view> </view>
<block wx:if="{{ list.length <= 0 }}"> </view>
<view class="nothing"> <block wx:if="{{ list.length <= 0 }}">
<glsx-image class="img" src="{{ '/index/empty.png' }}" webp></glsx-image> <view class="nothing">
<view class="text">暂无数据</view> <glsx-image class="img" src="{{ '/index/empty.png' }}" webp></glsx-image>
</view> <view class="text">暂无数据</view>
</block> </view>
</block>
</scroll-view> </scroll-view>
\ No newline at end of file \ No newline at end of file
...@@ -26,7 +26,7 @@ Component({ ...@@ -26,7 +26,7 @@ Component({
tableWidth: 960, tableWidth: 960,
tableFlag: true, tableFlag: true,
tableData: [], tableData: [],
headerConfig: [], // headerConfig: [],
// tableWidth: '100%', // tableWidth: '100%',
itemTableHeight: 0, itemTableHeight: 0,
itemTableHeightOverview: 0, itemTableHeightOverview: 0,
...@@ -58,13 +58,13 @@ Component({ ...@@ -58,13 +58,13 @@ Component({
key: 'penetrationRate', key: 'penetrationRate',
width: 'var(--fontSize120)', width: 'var(--fontSize120)',
unit: '%' unit: '%'
},
{
name: '完成率',
key: 'completionRate',
width: 'var(--fontSize120)',
unit: '%'
} }
// {
// name: '完成率',
// key: 'completionRate',
// width: 'var(--fontSize120)',
// unit: '%'
// }
], ],
selectedMainBrand: [], selectedMainBrand: [],
selectedMainBrandOverview: [], selectedMainBrandOverview: [],
...@@ -126,13 +126,13 @@ Component({ ...@@ -126,13 +126,13 @@ Component({
key: 'penetrationRate', key: 'penetrationRate',
width: 'var(--fontSize120)', width: 'var(--fontSize120)',
unit: '%' unit: '%'
},
{
name: '完成率',
key: 'completionRate',
width: 'var(--fontSize120)',
unit: '%'
} }
// {
// name: '完成率',
// key: 'completionRate',
// width: 'var(--fontSize120)',
// unit: '%'
// }
], ],
headerConfigStoreExpansion: { headerConfigStoreExpansion: {
name: '销售名称', name: '销售名称',
...@@ -173,10 +173,6 @@ Component({ ...@@ -173,10 +173,6 @@ Component({
{ {
value: 5, value: 5,
name: '渗透率' name: '渗透率'
},
{
value: 6,
name: '完成率'
} }
], ],
orderByListOverview: [ orderByListOverview: [
...@@ -199,6 +195,10 @@ Component({ ...@@ -199,6 +195,10 @@ Component({
{ {
value: 5, value: 5,
name: '渗透率' name: '渗透率'
},
{
value: 6,
name: '完成率'
} }
], ],
orderByListOverView: [ orderByListOverView: [
...@@ -519,7 +519,7 @@ Component({ ...@@ -519,7 +519,7 @@ Component({
this.setData({ this.setData({
dataOverviewTable: res.data, dataOverviewTable: res.data,
itemTableHeightOverview: res.data.length * 72, itemTableHeightOverview: res.data.length * 72,
tableWidthOverview: overviewTabIndex == 1 ? '900' : '640' tableWidthOverview: overviewTabIndex == 1 ? '1020' : '640'
}) })
}) })
.finally(() => { .finally(() => {
...@@ -560,7 +560,7 @@ Component({ ...@@ -560,7 +560,7 @@ Component({
this.setData({ this.setData({
tableData: res.data, tableData: res.data,
itemTableHeight: res.data.length * 72, itemTableHeight: res.data.length * 72,
tableWidth: overviewTabIndexRegion == 1 ? '1020' : '640' tableWidth: overviewTabIndexRegion == 1 ? '900' : '640'
}) })
console.log('tableWidth', overviewTabIndexRegion == 1 ? '1025' : '400') console.log('tableWidth', overviewTabIndexRegion == 1 ? '1025' : '400')
}) })
......
...@@ -5,7 +5,12 @@ Component({ ...@@ -5,7 +5,12 @@ Component({
/** /**
* 组件的属性列表 * 组件的属性列表
*/ */
properties: {}, properties: {
regionId: {
type: String,
value: ''
}
},
/** /**
* 组件的初始数据 * 组件的初始数据
...@@ -84,10 +89,11 @@ Component({ ...@@ -84,10 +89,11 @@ Component({
}, },
getMyTeam() { getMyTeam() {
// console.log(IndexApi, 'IndexApi') // console.log(IndexApi, 'IndexApi')
let { overviewSwitchValue } = this.data let { overviewSwitchValue, regionId } = this.data
this.runLatest('myTeam', () => this.runLatest('myTeam', () =>
IndexApi.getMyTeam({ IndexApi.getMyTeam({
isAll: overviewSwitchValue isAll: overviewSwitchValue,
regionId: regionId
}) })
) )
.then(res => { .then(res => {
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
></table> ></table>
</view> </view>
</view> </view>
<storeStatistics></storeStatistics> <storeStatistics regionId="{{ regionId }}"></storeStatistics>
<view class="storeWaring"> <view class="storeWaring">
<store-waring></store-waring> <store-waring regionId="{{ regionId }}"></store-waring>
</view> </view>
\ No newline at end of file \ No newline at end of file
// packageIndex/pages/staff/staff.js // 组件
Page({ Component({
/** /**
* 页面的初始数据 * 组件的属性列表
*/ */
data: { properties: {
regionId: {
type: String,
value: ''
},
staffUuid: {
type: String,
value: ''
}
}, },
/** /**
* 生命周期函数--监听页面加载 * 组件的初始数据
*/ */
onLoad(options) { data: {
// storeStatistics: {},
}, // storeWarning: {}
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
}, },
/** /**
* 页面上拉触底事件的处理函数 * 组件生命周期函数
*/ */
onReachBottom() { lifetimes: {
attached() {
// this.getStoreStatistics()
}
}, },
/** /**
* 用户点击右上角分享 * 组件的方法列表
*/ */
onShareAppMessage() {
}
})
\ No newline at end of file \ No newline at end of file
methods: {}
})
<!--packageIndex/pages/staff/staff.wxml--> <!--packageIndex/pages/staff/staff.wxml-->
<storeStatistics></storeStatistics>
<store-waring></store-waring>
\ No newline at end of file \ No newline at end of file
<storeStatistics regionId="{{ regionId }}" staffUuid="{{ staffUuid }}"></storeStatistics>
<store-waring regionId="{{ regionId }}" staffUuid="{{ staffUuid }}"></store-waring>
\ No newline at end of file \ No newline at end of file
...@@ -9,6 +9,10 @@ Component({ ...@@ -9,6 +9,10 @@ Component({
regionId: { regionId: {
type: String, type: String,
value: '' value: ''
},
staffUuid: {
type: String,
value: ''
} }
}, },
...@@ -122,10 +126,12 @@ Component({ ...@@ -122,10 +126,12 @@ Component({
}) })
}, },
getKpiProgress() { getKpiProgress() {
let { tabActive, orderBy } = this.data let { tabActive, orderBy, regionId, staffUuid } = this.data
let params = { let params = {
businessType: tabActive, businessType: tabActive,
orderBy: orderBy orderBy: orderBy,
regionId: regionId,
staffUuid: staffUuid
} }
IndexApi.getKpiProgress(params) IndexApi.getKpiProgress(params)
.then(res => { .then(res => {
...@@ -149,9 +155,12 @@ Component({ ...@@ -149,9 +155,12 @@ Component({
let params = { let params = {
isAll: overviewSwitchValue isAll: overviewSwitchValue
} }
if (this.properties.director) { if (this.properties.regionId) {
params.regionId = this.properties.regionId params.regionId = this.properties.regionId
} }
if (this.properties.staffUuid) {
params.staffUuid = this.properties.staffUuid
}
IndexApi.getTotal(params) IndexApi.getTotal(params)
.then(res => { .then(res => {
let { code, data, message } = res let { code, data, message } = res
......
...@@ -192,6 +192,14 @@ Component({ ...@@ -192,6 +192,14 @@ Component({
)}` )}`
}) })
} }
if (headerConfig.key == 'staffName') {
let { item } = e.currentTarget.dataset
wx.navigateTo({
url: `/packageIndex/pages/staff/staff?query=${encodeURIComponent(
JSON.stringify(item)
)}`
})
}
}, },
scrollonReachBottom() { scrollonReachBottom() {
// console.log('scrollonReachBottom') // console.log('scrollonReachBottom')
......
...@@ -162,6 +162,19 @@ Component({ ...@@ -162,6 +162,19 @@ Component({
* 组件的方法列表 * 组件的方法列表
*/ */
methods: { methods: {
navToRegionalLeaders(e) {
let { headerConfig } = this.data
// let { headerConfig } = this.data
console.log(headerConfig, 'headerConfig')
if (headerConfig.key == 'regionName') {
let { item } = e.currentTarget.dataset
wx.navigateTo({
url: `/packageIndex/pages/regionalLeaders/regionalLeaders?query=${encodeURIComponent(
JSON.stringify(item)
)}`
})
}
},
formatTable(table, tableObj) { formatTable(table, tableObj) {
const keys = (tableObj || []).map(i => i && i.key).filter(Boolean) const keys = (tableObj || []).map(i => i && i.key).filter(Boolean)
const src = Array.isArray(table) ? table : [] const src = Array.isArray(table) ? table : []
......
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
<block wx:if="{{ formattedTable.length > 0 }}"> <block wx:if="{{ formattedTable.length > 0 }}">
<block wx:for="{{ formattedTable }}" wx:key="index"> <block wx:for="{{ formattedTable }}" wx:key="index">
<view class="th" style="width: var(--fontSize{{ tableWidth }})"> <view class="th" style="width: var(--fontSize{{ tableWidth }})">
<view class="name" bind:tap="navToRegionalLeaders" data> <view class="name" bind:tap="navToRegionalLeaders" data-item="{{ item }}">
<view class="labelName {{ item[headerConfig.key].length<=10?'oneLine':'' }}">{{item[headerConfig.key]}}</view> <view class="labelName {{ item[headerConfig.key].length<=10?'oneLine':'' }}">{{item[headerConfig.key]}}</view>
</view> </view>
<view class="values"> <view class="values">
......
...@@ -21,7 +21,7 @@ const h5Obj = { ...@@ -21,7 +21,7 @@ const h5Obj = {
2测试 2测试
3生产 3生产
*/ */
let index = 2 let index = 1
const accountInfo = wx.getAccountInfoSync() const accountInfo = wx.getAccountInfoSync()
const systemInfo = wx.getSystemInfoSync() const systemInfo = wx.getSystemInfoSync()
// console.log(systemInfo); // console.log(systemInfo);
...@@ -117,7 +117,8 @@ const domain = { ...@@ -117,7 +117,8 @@ const domain = {
ip: { ip: {
// dj: 'http://192.168.1.165:8292', // dj: 'http://192.168.1.165:8292',
// dj: 'http://192.168.1.150:8293', // dj: 'http://192.168.1.150:8293',
dj: 'http://192.168.1.76:8293', //璐琦 // dj: 'http://192.168.1.76:8293', //璐琦
dj: 'http:// 192.168.1.150:8293', // 张富康
scrm: 'https://scrm.dev.glsx.com.cn', scrm: 'https://scrm.dev.glsx.com.cn',
merchant: 'http://192.168.1.144:8091' merchant: 'http://192.168.1.144:8091'
// dj: 'http://192.168.3.189:8385', // dj: 'http://192.168.3.189:8385',
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!