Commit 7ea5ddbd by 张立顺

feat 功能联调

1 parent c317ff7a
......@@ -45,11 +45,11 @@
</view>
</block>
<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>
</block>
<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>
</block>
<auth-setting bind:choose="authChoose" />
......
// packageIndex/pages/regionalLeaders/regionalLeaders.js
Component({
/**
* 组件的属性列表
*/
properties: {
},
/**
* 组件的初始数据
*/
// 页面的初始数据
Page({
data: {
// 页面的初始数据
pageQuery: null
},
/**
* 组件的方法列表
*/
methods: {
// onRoute(options) {
// console.log(options, 'options')
// // console.log(options, 'options')
// // this.setData({
// // 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
})
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file
"usingComponents": {
"regionalLeaders": "/pages/components/regionalLeaders/regionalLeaders"
}
}
/* packageIndex/pages/regionalLeaders/regionalLeaders.wxss */
\ 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
<!--packageIndex/pages/regionalLeaders/regionalLeaders.wxml-->
<text>packageIndex/pages/regionalLeaders/regionalLeaders.wxml</text>
\ 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
// packageIndex/pages/staff/staff.js
Page({
/**
* 页面的初始数据
*/
data: {
pageQuery: null
},
/**
* 生命周期函数--监听页面加载
*/
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
onShareAppMessage() {}
})
{
"usingComponents": {}
}
\ No newline at end of file
"usingComponents": {
"staff": "/pages/components/staff/staff"
}
}
/* packageIndex/pages/staff/staff.wxss */
\ 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
<!--packageIndex/pages/staff/staff.wxml-->
<text>packageIndex/pages/staff/staff.wxml</text>
\ 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
<tab-bar tabList="{{ tabList }}" bindclick="tabClick" activeIndex="{{ activeIndex }}" />
<scroll-view class="scrollView" scroll-y style="height: calc(100vh - 80px);">
<view class="list">
<!-- wx:for="{{ list }}" wx:key="index" -->
<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>
<view class="introduction merchantInfo">
<view class="item">
<!-- <view class="left children"> -->
<view class="label">拜访次数</view>
<view class="content">{{item.visitTimes?item.visitTimes+'次':'-'}}</view>
<!-- </view> -->
<!-- <view class="right children">
<view class="list">
<!-- wx:for="{{ list }}" wx:key="index" -->
<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>
<view class="introduction merchantInfo">
<view class="item">
<!-- <view class="left children"> -->
<view class="label">拜访次数</view>
<view class="content">{{item.visitTimes?item.visitTimes+'次':'-'}}</view>
<!-- </view> -->
<!-- <view class="right children">
<view class="label">销售人员</view>
<view class="content text-hide">{{item.visitCount?item.visitCount+'次':'-'}}</view>
</view> -->
</view>
<view class="item">
<view class="label person">销售人员</view>
<!-- <view class="content text-hide" wx:for="{{item.salePersonnelInfoDTOList}}" wx:key="index" >{{item.salePersonnelInfoDTOList[index].salePersonnelName}}</view> -->
</view>
<view class="item">
<view class="label person">签约时间</view>
<view class="content">{{item.signedTime||'-'}}</view>
</view>
<view class="item">
<view class="label person">展业时间</view>
<view class="content">{{item.expectedOperationDate||'-'}}</view>
</view>
<view class="item">
<view class="label person">门店地址</view>
<view class="content">{{item.address||'-'}}</view>
</view>
</view>
</view>
</view>
<block wx:if="{{ list.length <= 0 }}">
<view class="nothing">
<glsx-image class="img" src="{{ '/index/empty.png' }}" webp></glsx-image>
<view class="text">暂无数据</view>
</view>
</block>
</view>
<view class="item">
<view class="label person">销售人员</view>
<!-- view. -->
<view class="content text-hide" wx:for="{{ item.salePersonnelInfoDTOList }}" wx:key="index">{{item.salePersonnelInfoDTOList[index].salePersonnelName}}</view>
</view>
<view class="item">
<view class="label person">签约时间</view>
<view class="content">{{item.signedTime||'-'}}</view>
</view>
<view class="item">
<view class="label person">展业时间</view>
<view class="content">{{item.expectedOperationDate||'-'}}</view>
</view>
<view class="item">
<view class="label person">门店地址</view>
<view class="content">{{item.address||'-'}}</view>
</view>
</view>
</view>
</view>
<block wx:if="{{ list.length <= 0 }}">
<view class="nothing">
<glsx-image class="img" src="{{ '/index/empty.png' }}" webp></glsx-image>
<view class="text">暂无数据</view>
</view>
</block>
</scroll-view>
\ No newline at end of file
......@@ -26,7 +26,7 @@ Component({
tableWidth: 960,
tableFlag: true,
tableData: [],
headerConfig: [],
// headerConfig: [],
// tableWidth: '100%',
itemTableHeight: 0,
itemTableHeightOverview: 0,
......@@ -58,13 +58,13 @@ Component({
key: 'penetrationRate',
width: 'var(--fontSize120)',
unit: '%'
},
{
name: '完成率',
key: 'completionRate',
width: 'var(--fontSize120)',
unit: '%'
}
// {
// name: '完成率',
// key: 'completionRate',
// width: 'var(--fontSize120)',
// unit: '%'
// }
],
selectedMainBrand: [],
selectedMainBrandOverview: [],
......@@ -126,13 +126,13 @@ Component({
key: 'penetrationRate',
width: 'var(--fontSize120)',
unit: '%'
},
{
name: '完成率',
key: 'completionRate',
width: 'var(--fontSize120)',
unit: '%'
}
// {
// name: '完成率',
// key: 'completionRate',
// width: 'var(--fontSize120)',
// unit: '%'
// }
],
headerConfigStoreExpansion: {
name: '销售名称',
......@@ -173,10 +173,6 @@ Component({
{
value: 5,
name: '渗透率'
},
{
value: 6,
name: '完成率'
}
],
orderByListOverview: [
......@@ -199,6 +195,10 @@ Component({
{
value: 5,
name: '渗透率'
},
{
value: 6,
name: '完成率'
}
],
orderByListOverView: [
......@@ -519,7 +519,7 @@ Component({
this.setData({
dataOverviewTable: res.data,
itemTableHeightOverview: res.data.length * 72,
tableWidthOverview: overviewTabIndex == 1 ? '900' : '640'
tableWidthOverview: overviewTabIndex == 1 ? '1020' : '640'
})
})
.finally(() => {
......@@ -560,7 +560,7 @@ Component({
this.setData({
tableData: res.data,
itemTableHeight: res.data.length * 72,
tableWidth: overviewTabIndexRegion == 1 ? '1020' : '640'
tableWidth: overviewTabIndexRegion == 1 ? '900' : '640'
})
console.log('tableWidth', overviewTabIndexRegion == 1 ? '1025' : '400')
})
......
......@@ -5,7 +5,12 @@ Component({
/**
* 组件的属性列表
*/
properties: {},
properties: {
regionId: {
type: String,
value: ''
}
},
/**
* 组件的初始数据
......@@ -84,10 +89,11 @@ Component({
},
getMyTeam() {
// console.log(IndexApi, 'IndexApi')
let { overviewSwitchValue } = this.data
let { overviewSwitchValue, regionId } = this.data
this.runLatest('myTeam', () =>
IndexApi.getMyTeam({
isAll: overviewSwitchValue
isAll: overviewSwitchValue,
regionId: regionId
})
)
.then(res => {
......
......@@ -20,7 +20,7 @@
></table>
</view>
</view>
<storeStatistics></storeStatistics>
<storeStatistics regionId="{{ regionId }}"></storeStatistics>
<view class="storeWaring">
<store-waring></store-waring>
<store-waring regionId="{{ regionId }}"></store-waring>
</view>
\ 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) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
data: {
// storeStatistics: {},
// storeWarning: {}
},
/**
* 页面上拉触底事件的处理函数
* 组件生命周期函数
*/
onReachBottom() {
lifetimes: {
attached() {
// this.getStoreStatistics()
}
},
/**
* 用户点击右上角分享
* 组件的方法列表
*/
onShareAppMessage() {
}
})
\ No newline at end of file
methods: {}
})
<!--packageIndex/pages/staff/staff.wxml-->
<storeStatistics></storeStatistics>
<store-waring></store-waring>
\ 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
......@@ -9,6 +9,10 @@ Component({
regionId: {
type: String,
value: ''
},
staffUuid: {
type: String,
value: ''
}
},
......@@ -122,10 +126,12 @@ Component({
})
},
getKpiProgress() {
let { tabActive, orderBy } = this.data
let { tabActive, orderBy, regionId, staffUuid } = this.data
let params = {
businessType: tabActive,
orderBy: orderBy
orderBy: orderBy,
regionId: regionId,
staffUuid: staffUuid
}
IndexApi.getKpiProgress(params)
.then(res => {
......@@ -149,9 +155,12 @@ Component({
let params = {
isAll: overviewSwitchValue
}
if (this.properties.director) {
if (this.properties.regionId) {
params.regionId = this.properties.regionId
}
if (this.properties.staffUuid) {
params.staffUuid = this.properties.staffUuid
}
IndexApi.getTotal(params)
.then(res => {
let { code, data, message } = res
......
......@@ -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() {
// console.log('scrollonReachBottom')
......
......@@ -162,6 +162,19 @@ Component({
* 组件的方法列表
*/
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) {
const keys = (tableObj || []).map(i => i && i.key).filter(Boolean)
const src = Array.isArray(table) ? table : []
......
......@@ -36,7 +36,7 @@
<block wx:if="{{ formattedTable.length > 0 }}">
<block wx:for="{{ formattedTable }}" wx:key="index">
<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>
<view class="values">
......
......@@ -21,7 +21,7 @@ const h5Obj = {
2测试
3生产
*/
let index = 2
let index = 1
const accountInfo = wx.getAccountInfoSync()
const systemInfo = wx.getSystemInfoSync()
// console.log(systemInfo);
......@@ -117,7 +117,8 @@ const domain = {
ip: {
// dj: 'http://192.168.1.165:8292',
// 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',
merchant: 'http://192.168.1.144:8091'
// 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!