yujialong 2 years ago
parent 801b41325c
commit 851b60ec81
  1. 2
      README.md
  2. 4
      apis/modules/client.js
  3. 10
      apis/modules/order.js
  4. 16
      apis/modules/parner.js
  5. 10
      apis/modules/user.js
  6. 49
      components/filter-popup/filter-popup.vue
  7. 2
      config/request.js
  8. 2
      manifest.json
  9. 2
      order/addCourse/addCourse.vue
  10. 29
      order/curClient/curClient.vue
  11. 4
      order/editCourse/editCourse.vue
  12. 250
      order/orderDetail/orderDetail.vue
  13. 130
      order/orders/orders.vue
  14. 14
      pages.json
  15. 58
      pages/addStaff/addStaff.vue
  16. 15
      pages/clientDetail/clientDetail.vue
  17. 58
      pages/clients/clients.vue
  18. 82
      pages/index/index.vue
  19. 16
      pages/login/login.vue
  20. 41
      pages/person/person.vue
  21. 2
      pages/products/products.vue
  22. 31
      pages/qrcode/qrcode.vue
  23. 8
      pages/setting/setting.vue
  24. 119
      pages/teamDetail/teamDetail.vue
  25. 64
      pages/teams/teams.vue

@ -1 +1 @@
# 或然中台小程序端
# 或然科技产业平台运营版

@ -9,10 +9,6 @@ export const list = (data) => {
return post('nakadai/nakadai/applets/customer/getCustomerListBasedOnBusinessManagerId', data)
}
export const all = (data) => {
return post('nakadai/nakadai/applets/customer/customerList', data)
}
export const queryCustomerDetails = (data) => {
return get('nakadai/nakadai/customer/queryCustomerDetails', data)
}

@ -22,7 +22,7 @@ export const renew = (data) => {
}
export const list = (data) => {
return post('nakadai/nakadai/applets/order/orderList', data)
return post('nakadai/nakadai/order/list', data)
}
export const orderList = (data) => {
@ -39,4 +39,12 @@ export const ship = (data) => {
export const miniProgramOrderRecord = (data) => {
return post('nakadai/nakadai/applets/order/miniProgramOrderRecord', data)
}
export const publicConfiguration = (data) => {
return post('users/users/user/publicConfiguration', data)
}
export const bulkShipping = (data) => {
return post('nakadai/nakadai/orderOther/bulkShipping', data)
}

@ -13,8 +13,8 @@ export const generateInvitationCode = accountId => {
return post(`nakadai/nakadai/partnerAccount/generateInvitationCode?accountId=${accountId}`)
}
export const treeList = (data) => {
return post('nakadai/nakadai/partnerClassification/treeList', data)
export const treeList = () => {
return post('nakadai/nakadai/partnerClassification/treeList?applet=1')
}
export const my = (data) => {
@ -23,4 +23,16 @@ export const my = (data) => {
export const mailFileSend = (data) => {
return post('nakadai/nakadai/partnerAccount/mailFileSend', data)
}
export const getAllTeam = () => {
return get('nakadai/nakadai/partnerClassification/getAllTeam')
}
export const teamPartnerList = (data) => {
return post('nakadai/nakadai/partnerAccount/teamPartnerList', data)
}
export const queryTeamMembers = (data) => {
return post('nakadai/nakadai/partnerAccount/queryTeamMembers', data)
}

@ -2,13 +2,21 @@ import request from '@/apis/request.js'
const { get, post } = request
export const login = (data) => {
return post('users/users/user/weChatAppletCallback', data)
return post('users/users/user/weChatAppletCallbackByOperation', data)
}
export const userBinding = (data) => {
return post('users/users/user/userBinding', data)
}
export const queryProvince = () => {
return get('nakadai/nakadai/province/queryProvince')
}
export const queryCity = (data) => {
return get('nakadai/nakadai/city/queryCity', data)
}
export const examinePassword = (data) => {
return post('users/users/userAccount/examinePassword', data)
}

@ -17,6 +17,14 @@
<scroll-view class="select-scroll" scroll-y :style="{ height: `calc( ${height} - 120rpx - 152rpx )` }">
<view class="select-main">
<template v-if="showArea">
<view class="area-picker">
<uni-data-picker class="picker-input" placeholder="请选择省份" popup-title="请选择省份" preload :localdata="provinces" :map="{text: 'provinceName', value: 'provinceId'}" v-model="provinceId" @change="getCity"></uni-data-picker>
</view>
<view class="area-picker">
<uni-data-picker class="picker-input" placeholder="请选择城市" popup-title="请选择城市" preload :localdata="cities" :map="{text: 'cityName', value: 'cityId'}" v-model="cityId"></uni-data-picker>
</view>
</template>
<view class="select-item" v-for="(item, index) in data" :key="index">
<view class="title"> {{ item.title }} </view>
<view class="tag-list" v-if="!item.children">
@ -60,6 +68,7 @@
<script>
import Popup from './components/popup.vue';
import { queryProvince, queryCity } from '@/apis/modules/user.js'
export default {
components:{
Popup
@ -103,6 +112,10 @@ export default {
type: Boolean,
default: true,
},
showArea: {
type: Boolean,
default: false
}
},
computed: {
//
@ -135,9 +148,16 @@ export default {
},
data() {
return {
originForm: {}
originForm: {},
provinces: [],
provinceId: '',
cities: [],
cityId: ''
}
},
mounted() {
this.showArea && this.getProvince()
},
methods: {
//value id
selectTagBuyValueOrId(item, key, keyValue, isRadio) {
@ -172,8 +192,31 @@ export default {
this.acceptForm = this.acceptForm;
},
//
getProvince() {
queryProvince().then(({ list }) => {
this.provinces = list
}).catch(res => {})
},
//
getCity() {
if (this.provinceId) {
queryCity({
provinceId: this.provinceId
}).then(({ list }) => {
this.cities = list
}).catch(res => {})
} else {
this.cities = []
}
this.cityId = ''
},
//
finsh() {
if (this.showArea) {
this.acceptForm.provinceId = this.provinceId
this.acceptForm.cityId = this.cityId
}
this.$emit("finsh", this.acceptForm);
this.$emit("input", false);
},
@ -258,6 +301,10 @@ export default {
}
}
}
.area-picker {
width: 50%;
padding: 30rpx 0;
}
.filter-button {
width: 100%;
height: 152rpx;

@ -6,7 +6,7 @@
export default {
// baseURL: 'https://huorantech.cn/',
// baseURL: 'http://192.168.31.137:9000/',
// baseURL: 'http://192.168.31.151:9000/',
baseURL: 'http://121.37.12.51/',
headers: {
'Content-Type': 'application/json;charset=UTF-8'

@ -48,7 +48,7 @@
"quickapp" : {},
/* */
"mp-weixin" : {
"appid" : "wx77a8a2a23138998b",
"appid" : "wx88cd6037d54f230a",
"setting" : {
"urlCheck" : true,
"es6" : true,

@ -274,7 +274,7 @@
Promise.all(promises).then(_ => {
uni.setStorageSync('courses', result) //
uni.redirectTo({
url: `../editCourse/editCourse?customerId=${customerId}&orderType=${this.orderType}`
url: `../editCourse/editCourse?customerId=${customerId}&orderType=${this.orderType}&action=add`
})
})
} else {

@ -33,8 +33,8 @@
<view class="line">
<text class="name">订单内容</text>
<view class="val ell-wrap">
<view :class="{ell: !item.toggle}">{{ item.productName }}</view>
<view v-if="item.productName.length > 14" class="toggle" @click.stop="toggle(item)">{{ item.toggle ? '收起' : '展开' }}</view>
<view :class="{ell: !item.toggle}">{{ item.orderContent }}</view>
<view v-if="item.orderContent.length > 14" class="toggle" @click.stop="toggle(item)">{{ item.toggle ? '收起' : '展开' }}</view>
</view>
</view>
<view class="line">
@ -60,7 +60,7 @@
</template>
<script>
import { miniProgramOrderRecord, del } from '@/apis/modules/order.js'
import { list, del } from '@/apis/modules/order.js'
export default {
data() {
return {
@ -141,23 +141,20 @@
})
const team = uni.getStorageSync('team')
const { orderStatus } = this
miniProgramOrderRecord({
businessManagerId: this.$util.getBmId(),
teamId: team.id,
customerId: +this.customerId,
list({
orderStatus: orderStatus === '' ? null : orderStatus,
isAdmin: +team.isTeam, // (0 1)
pageNum: this.page,
pageNo: this.page,
pageSize: this.pageSize,
keywords: this.keyword
}).then(({ data }) => {
const { records } = data
records.map(e => {
e.toggle = e.productName.length < 14 // 14
customerName: this.customerName
}).then(({ orderPage }) => {
const { orders } = orderPage
orders.map(e => {
e.toggle = e.orderContent.length < 14 // 14
})
this.list = this.reachBottom > 0 ? [...this.list, ...records] : records
this.list = this.reachBottom > 0 ? [...this.list, ...orders] : orders
console.log(11, this.list)
this.page++ // page+1
const noMore = this.list.length === data.total //
const noMore = this.list.length === orderPage.total //
this.status = noMore ? 'noMore' : 'more' // noMore
this.reachBottom = noMore ? -1 : 0 // -1
uni.hideLoading()

@ -11,7 +11,7 @@
<image class="icon" :src="$util.getIcon(item)" mode="widthFix"></image>
{{ item.productName }}
</view>
<uni-icons class="del" type="trash" size="25" color="#ADADAD" @click="delCourse(c, i)"></uni-icons>
<uni-icons v-if="isAdd || isRenew" class="del" type="trash" size="25" color="#ADADAD" @click="delCourse(c, i)"></uni-icons>
</view>
<view class="form-list">
<view class="line">
@ -340,7 +340,6 @@
for (const i in courses) {
list.push(...courses[i].list)
}
console.log(11, list)
//
for (const i in list) {
const e = list[i]
@ -366,7 +365,6 @@
break
}
}
console.log(33, this.err)
if (msg) return this.$util.errMsg(msg)
if (this.orderRepeat.length) return this.$util.errMsg(this.repeatMsg) //
uni.setStorageSync('courses', this.courses)

@ -3,10 +3,6 @@
<view class="block">
<view class="l-title">基本信息</view>
<view class="form-list">
<view class="line">
<view class="name">商务经理</view>
<view class="val">{{ form.businessManagerName }}</view>
</view>
<view :class="['line req', {err: err === 'customerName'}]">
<view class="name">客户名称</view>
<view v-if="orderId" class="val">{{ form.customerName }}</view>
@ -37,6 +33,16 @@
<view v-if="isDetail" class="val">{{ orderTypes.find(e => e.value === form.orderType).text }}</view>
<uni-data-picker v-else class="picker-input" placeholder="请选择订单类型" popup-title="请选择订单类型" preload :clear-icon="false" :localdata="orderTypes" v-model="form.orderType" @change="calcTotal(1)"></uni-data-picker>
</view>
<view class="line">
<view class="name">团队</view>
<view v-if="isDetail" class="val">{{ form.partnerClassificationName }}</view>
<uni-data-picker v-else class="picker-input" placeholder="请选择团队" popup-title="请选择团队" preload :clear-icon="false" :localdata="teams" :map="{text: 'partnerClassificationName', value: 'id'}" v-model="form.teamId" @change="getBm"></uni-data-picker>
</view>
<view class="line">
<view class="name">商务经理</view>
<view v-if="isDetail" class="val">{{ form.businessManagerName }}</view>
<uni-data-picker v-else class="picker-input" placeholder="请选择商务经理" popup-title="请选择商务经理" preload :localdata="bms" :map="{text: 'userName', value: 'partnerId'}" v-model="form.businessManagerId" :readonly="form.teamId ? false : true"></uni-data-picker>
</view>
<view class="line">
<view class="name">订单编号</view>
<view class="val">{{ form.orderNumber }}</view>
@ -57,50 +63,48 @@
<view class="l-title">{{ c.name }}</view>
<uni-icons class="arrow" type="top" size="20" color="#007EFF" @click="toggle(c)"></uni-icons>
<ul class="pro-list" v-show="!c.shrink">
<uni-swipe-action>
<uni-swipe-action-item
v-for="(item, i) in c.list"
:threshold="0"
:right-options="item.ops"
@click="e => productHandle(e, n, i)"
>
<li @click.stop="editCourse(c, i)">
<view class="name">
<view class="left">
<image class="icon" :src="$util.getIcon(item)" mode="widthFix"></image>
{{ item.productName }}
</view>
<image v-if="!isDetail && !isEdit" class="del" src="@/static/image/trash.png" mode="widthFix" @click.stop="delCourse(c, i)"></image>
</view>
<view class="info">
<view class="line">
<view class="label">使用期限</view>
<view class="val">{{ item.startTime + ' - ' + item.endTime }}</view>
</view>
<view class="line">
<view class="label">市场价</view>
<view class="val">{{ item.marketValue }}</view>
</view>
<view class="line">
<view class="label">结算价</view>
<view class="val">{{ item.settlementPrice }}</view>
</view>
<view class="line">
<view class="label">折扣率</view>
<view class="val">{{ item.discountRate }}</view>
</view>
<view class="line">
<view class="label">平台服务费</view>
<view class="val">{{ item.serviceFee }}</view>
</view>
<view class="line done">
<view class="val">成交价格</view>
<view class="price">{{ item.finalPrice }}</view>
</view>
</view>
</li>
</uni-swipe-action-item>
</uni-swipe-action>
<li v-for="(item, i) in c.list" :key="i" @click.stop="editCourse(c, i)">
<view class="name">
<view class="left">
<image class="icon" :src="$util.getIcon(item)" mode="widthFix"></image>
{{ item.productName }}
</view>
<view class="course-action">
<!-- 1查看时不可操作
2发货和启用不要同时出现生效前只会显示发货不发货按钮生效后只显示禁启用按钮
3处理中的订单显示发货不显示禁用 -->
<button v-if="item.status === 1 || isHandle || !orderId" class="course-btn" type="primary" @click.stop="handleDeliver(n, i)">{{ item.ship ? '取消' : ''}}发货</button>
<button v-else-if="!isDetail" class="course-btn" type="primary" @click.stop="handleEnable(n, i)">{{ item.isEnable ? '禁用' : '启用'}}</button>
<image v-if="!orderId || isRenew" class="del" src="@/static/image/trash.png" mode="widthFix" @click.stop="delCourse(c, i)"></image>
</view>
</view>
<view class="info">
<view class="line">
<view class="label">使用期限</view>
<view class="val">{{ item.startTime + (item.endTime && ' - ' + item.endTime) }}</view>
</view>
<view class="line">
<view class="label">市场价</view>
<view class="val">{{ item.marketValue }}</view>
</view>
<view class="line">
<view class="label">结算价</view>
<view class="val">{{ item.settlementPrice }}</view>
</view>
<view class="line">
<view class="label">折扣率</view>
<view class="val">{{ item.discountRate }}</view>
</view>
<view class="line">
<view class="label">平台服务费</view>
<view class="val">{{ item.serviceFee }}</view>
</view>
<view class="line done">
<view class="val">成交价格</view>
<view class="price">{{ item.finalPrice }}</view>
</view>
</view>
</li>
</ul>
</view>
</template>
@ -128,7 +132,10 @@
</view>
</view>
</view>
<view v-if="!isDetail" class="btn" @click="submit">提交({{ courses.length }})</view>
<view class="product-btns">
<view v-if="!isDetail" class="btn" @click="submit">提交({{ courses.length }})</view>
<view v-if="isHandle || (!orderId && courses.length)" class="btn" @click="batchDeliver">{{ courses.find(e => !e.ship) ? '一键发货' : '取消全部发货' }}</view>
</view>
</view>
</view>
@ -146,7 +153,8 @@
<script>
import { queryCustomer, queryCustomerDetails } from '@/apis/modules/client.js'
import { add, update, getDetail, renew, ship } from '@/apis/modules/order.js'
import { add, update, getDetail, renew, ship, miniProgramOrderRecord, bulkShipping } from '@/apis/modules/order.js'
import { teamList, getAllTeam } from '@/apis/modules/parner.js'
export default {
data() {
return {
@ -163,7 +171,8 @@
value: 2
}],
form: {
businessManagerName: uni.getStorageSync('team').userName,
businessManagerId: '',
businessManagerName: '',
// orderNumber: '', //
provinceId: '', // id
provinceName: '',
@ -179,9 +188,11 @@
customerName: '',
profit: 0, //
purchaseCost: 0, //
teamId: uni.getStorageSync('team').id,
businessManagerId: this.$util.getBmId()
teamId: '',
partnerClassificationName: '',
},
teams: [],
bms: [],
courseList: {},
courses: [], //
contract: { //
@ -218,10 +229,9 @@
this.isEdit = options.text === '修改'
this.isHandle = options.text === '处理'
this.isRenew = options.text === '续费'
this.getTeam()
const store = uni.getStorageSync('courses')
if (this.orderId) {
this.getInfo()
} else if (store) {
if (store) {
//
const list = []
for (const i in store) {
@ -269,6 +279,16 @@
const order = orderDetails
if (!this.isRenew) this.contract = order.contractInformation //
this.form = order.order
// teamId
const { teamId } = this.form
if (teamId) {
const item = this.teams.find(e => e.id == teamId)
if (item) this.form.partnerClassificationName = item.partnerClassificationName
if (!this.isDetail) {
this.form.businessManagerId = +this.form.businessManagerId
this.getBm()
}
}
this.courses = order.orderOther
this.handleRenew(0)
this.handleRenew(1)
@ -313,7 +333,7 @@
})
this.courseList = courses
},
//
// pc
handleRenew(authority) {
const productId = this.courses.filter(e => e.authority == authority).map(e => e.dataOrCourseId)
productId.length && this.promises.push(new Promise((resolve, reject) => {
@ -332,7 +352,6 @@
if (now < date) { // +1
date = new Date(date.setDate(date.getDate() + 1))
item.startTime = this.$util.formatDate(date, 'yyyy-MM-dd')
console.log(444, item, now < date,date,e.startTime)
} else { //
item.startTime = this.$util.formatDate(now, 'yyyy-MM-dd')
}
@ -341,7 +360,7 @@
item.marketValue = e.marketValue
} else if (!this.isDetail) { //
item.startTime = e.startTime.split(' ')[0]
item.endTime = e.endTime.split(' ')[0]
item.endTime = e.endTime ? e.endTime.split(' ')[0] : ''
}
}
const startTime = new Date(item.startTime)
@ -353,21 +372,6 @@
2 :
3
if (item.status === 3) item.isEnable = 0 //
// 1
// 2
// 3
this.$set(item, 'ops', this.isDetail ?
[] :
[{
text: item.status === 1 || this.isHandle || !this.orderId ?
item.ship ? '取消发货' : '发货' :
item.isEnable ? '禁用' : '启用',
style: {
backgroundColor: '#34b3fd'
}
}],
)
})
resolve()
}).catch(e => {
@ -422,6 +426,24 @@
}).catch(e => {})
this.closeCustomer()
},
//
getTeam() {
getAllTeam().then(({ team }) => {
this.teams = team
this.orderId && this.getInfo()
}).catch(res => {})
},
//
getBm() {
teamList({
pageNum: 1,
pageSize: 1000,
type: 1,
partnerClassificationId: this.form.teamId
}).then(({ pageList }) => {
this.bms = pageList.records
}).catch(res => {})
},
//
toAdd() {
uni.setStorageSync('courses', this.courses)
@ -463,21 +485,15 @@
toggle(c) {
c.shrink = !c.shrink
},
//
productHandle(e, n, i) {
const row = this.courseList[n].list[i]
const { text } = e.content
if (text === '发货' || text === '取消发货') {
row.ship = text === '发货' ? 1 : 0
this.isEdit && ship(row).then(res => {}).catch(res => {})
row.ops[0].text = text === '发货' ? '取消发货' : '发货'
console.log(444, row.ops)
} else {
row.isEnable = text === '启用' ? 1 : 0
row.ops[0].text = text === '启用' ? '禁用' : '启用'
}
this.courseList[n].list[i] = row
console.log(111,row, this.courseList)
//
handleEnable(c, i) {
this.courseList[c].list[i].isEnable = this.courseList[c].list[i].isEnable ? 0 : 1
},
//
handleDeliver(c, i) {
const row = this.courseList[c].list[i]
row.ship = row.ship ? 0 : 1
this.isEdit && ship(row).then(res => {}).catch(res => {}) //
},
//
calcTotal(out) {
@ -521,6 +537,39 @@
handleErr(val) {
if (val === this.err) this.err = ''
},
//
publicNotice(form, id) {
miniProgramOrderRecord({
content: form.orderOther.map(e => e.productName).join(),
openId: uni.getStorageSync('openid'),
page: `orderId=201&show=1?id=${id}&isShow=1`,
school: form.customerName,
state: '已完成',
}).then(res => {
uni.hideLoading()
this.$util.sucMsg('编辑成功')
setTimeout(() => {
uni.navigateBack()
}, 1500)
}).catch(res => {
uni.hideLoading()
})
},
// /
batchDeliver() {
const list = this.courseList
const ship = this.courses.find(e => !e.ship) ? 1 : 0 // 0110
const courses = []
for (const i in list) {
list[i].list.forEach(e => {
e.ship = ship
courses.push(e)
})
}
this.courses = courses
this.isEdit && bulkShipping({orderOthers: courses}).then(res => {}).catch(res => {}) //
console.log(11, this.courses)
},
//
submit() {
const { form } = this
@ -549,7 +598,7 @@
order: form, //
orderOther: courses //
}
if (this.orderId) {
if (this.isEdit || this.isHandle) {
update(data).then(res => {
uni.hideLoading()
this.$util.sucMsg('编辑成功')
@ -561,6 +610,7 @@
})
} else {
add(data).then(res => {
// form.orderOther.find(e => !e.ship) || this.publicNotice(form, orderId) //
uni.hideLoading()
this.$util.sucMsg('添加成功')
setTimeout(() => {
@ -608,6 +658,15 @@
display: inline-flex;
align-items: center;
}
.course-action {
display: inline-flex;
align-items: center;
}
.course-btn {
padding: 0 16rpx;
margin-right: 10rpx;
font-size: 28rpx;
}
.del {
width: 40rpx;
}
@ -732,11 +791,16 @@
color: #333;
white-space: nowrap;
}
.product-btns {
display: inline-flex;
align-items: center;
margin-left: 20rpx;
}
.btn {
width: 180rpx;
margin-left: 30rpx;
padding: 0 20rpx;
margin-left: 16rpx;
line-height: 80rpx;
font-size: 32rpx;
font-size: 30rpx;
text-align: center;
color: #fff;
border-radius: 10rpx;

@ -1,13 +1,10 @@
<template>
<view>
<view class="filter">
<uni-search-bar class="search" radius="30" placeholder="请输入学校名称,商务经理,订单号" v-model="keyword" clearButton="auto" cancelButton="none" />
<view :class="['sort', sort]" @click="switchSort"></view>
<uni-search-bar class="search" radius="30" placeholder="请输入客户名称,订单名称,订单号" v-model="keyword" clearButton="auto" cancelButton="none" />
<view :class="['sort', sort ? 'asc' : 'desc']" @click="switchSort"></view>
<uni-icons class="icon" custom-prefix="iconfont" type="icon-filter" size="22" color="#007eff" @click="popup = true"></uni-icons>
</view>
<ul class="tab">
<li v-for="(tab, i) in tabs" :class="{active: curTab === tab.id}" @click="tabChange(tab)">{{ tab.name }}</li>
</ul>
<template v-if="list.length">
<view class="list">
@ -22,10 +19,6 @@
<view class="c-name">{{ item.orderNumber }}</view>
<view class="info">
<view class="left">
<view v-if="curTab" class="line">
<text class="name">商务经理</text>
<text class="val">{{ item.businessManagerName }}</text>
</view>
<view class="line">
<text class="name">客户名称</text>
<text class="val">{{ item.customerName }}</text>
@ -59,17 +52,7 @@
<empty v-else></empty>
<uni-icons class="plus" type="plus-filled" size="60" color="#007eff" @click="$util.to('../orderDetail/orderDetail')"></uni-icons>
<filter-popup :data="filterData" :form.sync="filterForm" v-model="popup" title="全部筛选" height="1104rpx" @finsh="subFinsh"></filter-popup>
<view class="popup-mask" v-show="schoolVisible" @click="closeSchool"></view>
<view class="popup" v-show="schoolVisible">
<view class="top">请选择学校</view>
<uni-icons class="close" type="closeempty" size="20" @click="closeSchool"></uni-icons>
<uni-search-bar class="search" radius="5" placeholder="请输入学校名称" v-model="keyword" clearButton="auto" cancelButton="none" />
<view class="list">
<view class="item" v-for="item in schoolList" @click="schoolChange(item)">{{ item.schoolName }}</view>
</view>
</view>
<filter-popup :data="filterData" :form.sync="filterForm" showArea v-model="popup" title="全部筛选" height="1104rpx" @finsh="subFinsh"></filter-popup>
</view>
</template>
@ -79,6 +62,7 @@
export default {
data() {
return {
form: {},
popup: false,
//
filterData: [
@ -118,23 +102,10 @@
}
],
filterForm: {},
curTab: 0,
tabs: [
{
name: '我的订单',
id: 0
},
{
name: '团队全部订单',
id: 1
}
],
reachBottom: 0, // 0->,1->,-1->
status: 'more', // more|loading|noMore
searchTimer: null,
orderType: '',
orderStatus: '',
sort: 'desc',
sort: 0,
keyword: '',
list: [],
page: 1,
@ -159,11 +130,6 @@
}
},
],
schoolVisible: false,
keywordSchool: '',
searchTimerSchool: null,
schoolList: [],
schoolListAll: [],
}
},
watch: {
@ -194,51 +160,29 @@
try {
uni.removeStorageSync('courses')
} catch (e) {}
this.initRole()
this.getSchool()
this.initList()
},
methods: {
//
initRole() {
this.tabs = []
const auth = uni.getStorageSync('auth')
auth.includes('首页:订单:我的订单') && this.tabs.push({
name: '我的订单',
id: 0
})
auth.includes('首页:订单:团队全部订单') && this.tabs.push({
name: '团队全部订单',
id: 1
})
const len = this.tabs.length
// tab
if (len === 1) {
this.curTab = this.tabs[0].id
this.tabs = []
}
this.initList()
},
getList() {
const per = (uni.getStorageSync('dataPermission') || []).find(e => e.permissionName === '订单管理')
const data = {
businessManagerId: this.$util.getBmId(),
teamId: uni.getStorageSync('team').id,
keywords: this.keyword,
pageNum: this.page,
customerName: this.keyword,
pageNo: this.page,
pageSize: this.pageSize,
sort: this.sort,
orderType: this.orderType,
orderStatus: this.orderStatus,
type: this.curTab
supplierId: per?.supplierId,
...this.form
}
uni.showLoading({
title: '加载中'
})
list(data).then(({ data }) => {
list(data).then(({ orderPage }) => {
uni.hideLoading()
// list
const list = data.records
const list = orderPage.orders
const { ops } = this
list.map(e => {
// pcpcisDel
const op = []
if (e.isDel !== 1) {
op.push(ops[e.orderStatus === 1 ? 1 : 0])
@ -255,7 +199,7 @@
})
this.list = this.reachBottom > 0 ? [...this.list, ...list] : list
this.page++ // page+1
const noMore = this.list.length === data.total //
const noMore = this.list.length === orderPage.total //
this.status = noMore ? 'noMore' : 'more' // noMore
this.reachBottom = noMore ? -1 : 0 // -1
}).catch(e => {
@ -273,46 +217,18 @@
},
//
subFinsh(e) {
const { orderType, orderStatus } = e
this.orderType = orderType.length ? orderType[0] : ''
this.orderStatus = orderStatus.length ? orderStatus[0] : ''
const { provinceId, cityId, orderType, orderStatus } = e
this.form = {
provinceId,
cityId,
orderType: orderType.length ? orderType[0] : '',
orderStatus: orderStatus.length ? orderStatus[0] : ''
}
this.initList()
},
//
switchSort() {
this.sort = this.sort === 'desc' ? 'asc' : 'desc'
this.initList()
},
//
getSchool() {
querySchool({
schoolName: '',
provinceId: '',
cityId: ''
}).then(({ list }) => {
this.schoolListAll = list
this.schoolList = list
}).catch(res => {})
},
//
filterSchool() {
const { keywordSchool } = this
this.schoolList = keywordSchool ?
this.schoolListAll.filter(e => e.schoolName.includes(keywordSchool)) :
this.schoolListAll
},
//
closeSchool() {
this.schoolVisible = false
this.keywordSchool = ''
},
//
schoolChange(school) {
this.closeSchool()
},
// tab
tabChange(tab) {
this.curTab = tab.id
this.sort = this.sort ? 0 : 1
this.initList()
},
//

@ -100,7 +100,7 @@
"path" : "pages/teams/teams",
"style" :
{
"navigationBarTitleText": "团队",
"navigationBarTitleText": "合伙人",
"enablePullDownRefresh": true
}
},
@ -128,6 +128,14 @@
"enablePullDownRefresh": false
}
}
,{
"path" : "pages/teamDetail/teamDetail",
"style" :
{
"navigationBarTitleText": "团队成员",
"enablePullDownRefresh": false
}
}
],
"subPackages": [{
"root": "order",
@ -197,7 +205,7 @@
},
"globalStyle": {
"navigationBarTextStyle": "white",
"navigationBarTitleText": "或然中台",
"navigationBarTitleText": "或然科技产业平台运营版",
"navigationBarBackgroundColor": "#007EFF",
"backgroundColor": "#f5f5f5",
"app-plus": {
@ -220,7 +228,7 @@
"pagePath": "pages/teams/teams",
"iconPath": "static/image/tab2.png",
"selectedIconPath": "static/image/tab2-1.png",
"text": "团队"
"text": "合伙人"
}, {
"pagePath": "pages/person/person",
"iconPath": "static/image/tab3.png",

@ -1,26 +1,24 @@
<template>
<view>
<uni-section title="邀请成员" type="line">
<uni-list>
<uni-list-item thumb-size="sm" showArrow title="二维码邀请" clickable :to="`../qrcode/qrcode`">
<template v-slot:header>
<view class="slot-box">
<image class="icon" src="@/static/image/qrcode.png" mode="widthFix"></image>
</view>
</template>
<template v-slot:body>
<text class="slot-box text">二维码邀请</text>
</template>
</uni-list-item>
</uni-list>
<uni-section title="邀请城市合伙人" type="line">
<view class="page">
<view class="org-picker">
<uni-data-picker class="picker-input" placeholder="请选择组织" popup-title="请选择组织" preload :localdata="orgs" :map="{text: 'partnerClassificationName', value: 'id'}" v-model="org" @nodeclick="orgClick" @popupclosed="orgClose"></uni-data-picker>
</view>
<button type="primary" @click="toCode">生成邀请二维码</button>
</view>
</uni-section>
</view>
</template>
<script>
import { treeList } from '@/apis/modules/parner.js'
export default {
data() {
return {
orgs: [],
org: '',
orgTemp: '',
extraIcon: {
color: '#007eff',
size: '22',
@ -28,13 +26,45 @@
}
}
},
onShow() {
this.getOrg()
},
methods: {
//
getOrg() {
treeList().then(({ treeList }) => {
this.handleOrg(treeList)
this.orgs = treeList
}).catch(e => {})
},
// isTeam=1isTeam=1
handleOrg(list) {
list.forEach(e => {
})
},
//
orgClick(e) {
this.orgTemp = e.id
},
//
orgClose(e) {
this.org = this.orgTemp
},
//
toCode() {
this.$util.to(`../qrcode/qrcode?id=${this.org}`)
}
}
}
</script>
<style scoped lang="scss">
.page {
padding: 0 20px 20px;
.org-picker {
margin-bottom: 20px;
}
}
.slot-box {
display: flex;
flex-direction: row;

@ -13,7 +13,7 @@
<view class="form-list">
<view :class="['line req', {err: err === 'customerName'}]">
<view class="name">客户名称</view>
<view v-if="isDetail" class="val">{{ form.customerName }}</view>
<view v-if="customerId" class="val">{{ form.customerName }}</view>
<view v-else :class="['ph', {val: form.customerName}]" @click="schoolVisible = true">{{ form.customerName || '请选择学校' }}</view>
</view>
<view class="line">
@ -39,10 +39,10 @@
<view v-if="isDetail" class="val">{{ form.name }}</view>
<input v-else type="text" placeholder="请输入" v-model="form.name" @change="handleErr('name')">
</view>
<view class="line">
<view :class="['line req', {err: err === 'phone'}]">
<view class="name">手机</view>
<view v-if="isDetail" class="val">{{ form.phone }}</view>
<input v-else type="number" maxlength="11" placeholder="请输入" v-model="form.phone">
<input v-else type="number" maxlength="11" placeholder="请输入" v-model="form.phone" @change="handleErr('phone')">
</view>
<view :class="['line req', {err: err === 'account'}]">
<view class="name">账号</view>
@ -274,7 +274,7 @@
submit() {
const refs = this.$refs
const { form } = this
const { schoolId, industryClassId, industryId, name, account } = form
const { schoolId, industryClassId, industryId, name, phone, account } = form
if (!schoolId) {
this.err = 'customerName'
return this.$util.errMsg('请选择客户!')
@ -290,6 +290,13 @@
} if (!name) {
this.err = 'name'
return this.$util.errMsg('请输入联系人姓名!')
} if (!phone) {
this.err = 'phone'
return this.$util.errMsg('请输入手机!')
}
if (!/^1[3456789]\d{9}$/.test(phone)) {
this.err = 'phone'
return this.$util.errMsg('请输入正确的手机!')
} if (!account) {
this.err = 'account'
return this.$util.errMsg('请输入账号!')

@ -4,10 +4,6 @@
<uni-search-bar class="search" radius="30" placeholder="请输入客户名称" v-model="keyword" clearButton="auto" cancelButton="none" />
<uni-icons class="icon" custom-prefix="iconfont" type="icon-filter" size="22" color="#007eff" @click="popup = true"></uni-icons>
</view>
<ul class="tab">
<li v-for="(tab, i) in tabs" :class="{active: curTab === tab.id}" @click="tabChange(tab)">{{ tab.name }}</li>
</ul>
<template v-if="list.length">
<ul class="list">
<li v-for="item in list" @click="toDetail(item)">
@ -16,7 +12,7 @@
<view class="left">
<view class="line">
<text class="name">联系人</text>
<text class="val">{{ item.orderContact }}</text>
<text class="val">{{ item.contacts }}</text>
</view>
<view class="line">
<text class="name">账号</text>
@ -26,10 +22,6 @@
<text class="name">产品到期时间</text>
<text class="val">{{ item.expireDate.split(' ')[0] }}</text>
</view>
<view class="line">
<text class="name">商务经理</text>
<text class="val">{{ item.businessManagerName }}</text>
</view>
</view>
<view class="type">
{{ filterData[0].data.find(e => e.value === item.customerType).title }}客户
@ -47,7 +39,7 @@
</template>
<script>
import { list, all } from '@/apis/modules/client.js'
import { queryCustomer } from '@/apis/modules/client.js'
export default {
data() {
return {
@ -79,8 +71,6 @@
filterForm: {
customerType: []
},
curTab: 0,
tabs: [],
reachBottom: 0, // 0->,1->,-1->
status: 'more', // more|loading|noMore
searchTimer: null,
@ -115,49 +105,28 @@
}
},
onShow() {
this.initRole()
this.initList()
},
methods: {
//
initRole() {
this.tabs = []
const auth = uni.getStorageSync('auth')
auth.includes('首页:客户:我的客户') && this.tabs.push({
name: '我的客户',
id: 0
})
auth.includes('首页:客户:团队全部客户') && this.tabs.push({
name: '团队全部客户',
id: 1
})
const len = this.tabs.length
// tab
if (len === 1) {
this.curTab = this.tabs[0].id
this.tabs = []
}
this.initList()
},
//
getList() {
const per = (uni.getStorageSync('dataPermission') || []).find(e => e.permissionName === '客户管理')
const data = {
businessManagerId: this.$util.getBmId(),
teamId: uni.getStorageSync('team').id,
customerType: this.customerType,
keywords: this.keyword,
pageNum: this.page,
pageSize: this.pageSize,
type: this.curTab // 团队:1 / 个人:0
searchContent: this.keyword,
page: this.page,
size: this.pageSize,
supplierId: per?.supplierId,
}
uni.showLoading({
title: '加载中'
})
all(data).then(({ data }) => {
queryCustomer(data).then(({ message }) => {
uni.hideLoading()
// list
this.list = this.reachBottom > 0 ? [...this.list, ...data.records] : data.records
this.list = this.reachBottom > 0 ? [...this.list, ...message.list] : message.list
this.page++ // page+1
const noMore = this.list.length === data.total //
const noMore = this.list.length === message.totalCount //
this.status = noMore ? 'noMore' : 'more' // noMore
this.reachBottom = noMore ? -1 : 0 // -1
}).catch(e => {
@ -175,11 +144,6 @@
this.customerType = customerType.length ? customerType[0] : ''
this.initList()
},
// tab
tabChange(tab) {
this.curTab = tab.id
this.initList()
},
//
toDetail(item) {
this.$util.to(`../clientDetail/clientDetail?customerId=${item.customerId}&show=1`)

@ -1,9 +1,6 @@
<template>
<view :class="['page', {oh: !per}]">
<view class="page">
<image class="bg" src="@/static/image/index/index2.png" mode="widthFix"></image>
<view class="team">
<uni-data-picker class="picker-input" placeholder="切换团队" popup-title="切换团队" preload :clear-icon="false" :localdata="list" :map="{text: 'partnerClassificationName', value: 'teamId'}" v-model="teamId" @change="teamChange"></uni-data-picker>
</view>
<view class="banner">
<image class="img" src="@/static/image/index/index1.png" mode="widthFix"></image>
@ -14,7 +11,7 @@
</view>
<ul class="entry">
<li v-if="auth('首页:客户')" @click="$util.to('../clients/clients')">
<li v-if="auth('客户管理')" @click="$util.to('../clients/clients')">
<image class="icon" src="@/static/image/index/index3.png" mode="widthFix"></image>
<view class="text">客户</view>
</li>
@ -22,7 +19,7 @@
<image class="icon" src="@/static/image/index/index4.png" mode="widthFix"></image>
<view class="text">方案</view>
</li>
<li v-if="auth('首页:订单')" @click="$util.to('/order/orders/orders')">
<li v-if="auth('订单管理')" @click="$util.to('/order/orders/orders')">
<image class="icon" src="@/static/image/index/index5.png" mode="widthFix"></image>
<view class="text">订单</view>
</li>
@ -98,42 +95,30 @@
</view>
</view>
</view>
<view v-if="!per" class="per-mask">功能升级中敬请期待...</view>
</view>
</template>
<script>
import { getUserRolesPermissionMenu } from '@/apis/modules/user.js'
import { getTeamsByAccountId, getTheBusinessManagerIdsUnderTheTeam } from '@/apis/modules/client.js'
import { treeList } from '@/apis/modules/parner.js'
export default {
data() {
return {
per: true, //
// teamId: uni.getStorageSync('team').teamId || '',
teamId: '',
list: [],
id: '',
teamList: []
}
},
onShow() {
this.per = true
this.getInfo()
this.getAuth()
},
methods: {
//
initRole() {
if (!uni.getStorageSync('auth').includes('首页')) {
this.per = false
}
},
//
getAuth() {
uni.showLoading({
title: '加载中'
})
uni.getStorageSync('token') && getUserRolesPermissionMenu({
teamId: this.list.find(e => e.teamId === this.teamId).partnerClassificationId,
platformId: 4
}).then(({ permissionMenu }) => {
platformId: 3
}).then(res => {
uni.hideLoading()
const auth = []
//
@ -144,60 +129,15 @@
generateAuth(e.children, name)
})
}
generateAuth(permissionMenu[0].children, '')
generateAuth(res.permissionMenu[0].children, '')
uni.setStorageSync('dataPermission', res.dataPermissionList)
uni.setStorageSync('auth', auth)
this.$forceUpdate()
this.initRole()
}).catch(e => {
uni.hideLoading()
uni.setStorageSync('auth', [])
this.initRole()
})
},
//
getInfo() {
uni.showLoading({
title: '加载中'
})
getTeamsByAccountId().then(({ data }) => {
data.map(e => {
const n = e.partnerClassificationList
e.id = n.id
e.teamId = e.isTeam == 1 ? e.partnerClassificationId : n.id
e.partnerClassificationName = n.partnerClassificationName
delete e.partnerClassificationList
})
if (data.length) {
/**
* @description 如果是第一次进则默认选中第一个团队并把该团队的信息存入缓存
* 或者团队列表里没有该id则说明超管已经被转让也需要重新选中团队
*/
if (!this.teamId || !data.find(e => e.teamId == this.teamId)) {
this.teamId = data[0].teamId
uni.setStorageSync('team', data[0])
}
} else {
// 退
uni.hideLoading()
uni.clearStorageSync()
uni.navigateTo({
url: '../login/login'
})
}
this.list = data
this.getAuth()
}).catch(e => {
uni.hideLoading()
})
},
//
teamChange() {
const { teamId } = this
const e = this.list.find(e => e.teamId == teamId)
uni.setStorageSync('team', e)
this.getAuth()
},
//
toPanel(i) {
this.$util.errMsg('功能暂未开放!')

@ -2,7 +2,7 @@
<view class="page">
<view class="wrap">
<image class="logo" src="@/static/image/logo.png" mode=""></image>
<view class="hello">Hi城市合伙人请登录</view>
<view class="hello">Hi欢迎使用或然科技产业平台运营版请登录</view>
<button v-if="isLogin && !getPhone" class="btn phone" open-type="getPhoneNumber" @getphonenumber="onGetPhoneNumber">
<image src="@/static/image/phone.png" mode="widthFix"></image>
绑定手机
@ -12,10 +12,6 @@
<image src="@/static/image/wechat.png" mode="widthFix"></image>
微信授权登录
</view>
<view class="btn phone">
<image src="@/static/image/phone.png" mode="widthFix"></image>
手机账号登录
</view>
</template>
<view class="agree">
@ -84,6 +80,7 @@
const e = data.sessionKey
this.sessionKey = e.session_key
this.openId = e.openid
uni.setStorageSync('openid', e.openid)
this.unionid = e.unionid
uni.setStorageSync('sessionKey', e.session_key)
this.submiting = false
@ -91,6 +88,7 @@
if (data.state === 'login') {
this.toIndex()
uni.setStorageSync('token', data.token)
uni.setStorageSync('accountId', data.accountId)
} else {
this.isLogin = true
}
@ -126,7 +124,8 @@
userBinding({
openId: this.openId,
phone: data.phoneNumber,
unionid: this.unionid
unionid: this.unionid,
platformId: 3
}).then(({ token }) => {
this.submiting = false
uni.setStorageSync('token', token)
@ -163,7 +162,7 @@
.wrap {
position: relative;
height: 60vh;
padding: 214rpx 74rpx 28rpx;
padding: 214rpx 60rpx 28rpx;
margin: 0 61rpx;
text-align: center;
background-color: #fff;
@ -174,7 +173,8 @@
}
.hello {
margin: 36rpx 0;
font-size: 28rpx;
font-size: 24rpx;
line-height: 1.6;
color: #333;
}
.btn {

@ -10,21 +10,7 @@
</view>
</view>
<view class="list">
<view v-if="auth('我的:我的收益')" class="item">
<view class="left">
<image class="icon" src="@/static/image/person1.png" mode=""></image>
<text class="name">我的项目收益</text>
</view>
<text class="val">{{ my.myIncome}}</text>
</view>
<view v-if="auth('我的:团队收益')" class="item">
<view class="left">
<image class="icon" src="@/static/image/person2.png" mode=""></image>
<text class="name">团队收益</text>
</view>
<text class="val">{{ my.teamIncome}}</text>
</view>
<view v-if="auth('我的:设置')" class="item" @click="$util.to('../setting/setting')">
<view class="item" @click="$util.to('../setting/setting')">
<view class="left">
<image class="icon" src="@/static/image/person3.png" mode=""></image>
<text class="name">设置</text>
@ -32,7 +18,6 @@
</view>
</view>
</view>
<view v-if="!per" class="per-mask">功能升级中敬请期待...</view>
</view>
</template>
@ -41,38 +26,20 @@
export default {
data() {
return {
per: true, //
my: {
info: {
phone: ''
},
myIncome: 0,
teamIncome: 0
info: {},
},
avatar: uni.getStorageSync('avatar') || '@/static/image/avatar.png',
userName: uni.getStorageSync('userName')
}
},
onShow() {
this.per = true
this.initRole()
this.getInfo()
},
methods: {
//
initRole() {
if (!uni.getStorageSync('auth').includes('我的')) {
this.per = false
} else {
this.getInfo()
}
},
//
getInfo() {
const team = uni.getStorageSync('team')
my({
partnerId: team.partnerId,
teamId: team.teamId
}).then(({ my }) => {
my().then(({ my }) => {
this.my = my
}).catch(e => {})
}

@ -37,7 +37,7 @@
</view>
<view class="line">
<text class="name">供应厂商</text>
<text class="val">{{ item.supplier }}</text>
<text class="val">{{ item.supplierName }}</text>
</view>
</view>
</li>

@ -6,11 +6,10 @@
<image class="avatar" :src="avatar" mode=""></image>
<view class="text">
<view class="invite">
<text class="name">{{ userName }}</text> 邀请你加入城市合伙人计划
<text class="name">{{ my.info.userName }}</text> 邀请你加入城市合伙人计划
</view>
</view>
</view>
<view class="com">{{ team.partnerClassificationName }}</view>
<u-qrcode ref="qrcode" canvas-id="qrcode" :size="size" :value="link"></u-qrcode>
<view class="tips">扫一扫加入我们吧</view>
</view>
@ -20,33 +19,44 @@
</template>
<script>
import { generateInvitationCode } from '@/apis/modules/parner.js'
import { generateInvitationCode, my } from '@/apis/modules/parner.js'
export default {
data() {
return {
id: '',
avatar: uni.getStorageSync('avatar') || '@/static/image/avatar.png',
userName: uni.getStorageSync('userName'),
my: {
info: {},
},
expireTime: '',
qrcode: '',
link: '',
size: uni.upx2px(420),
team: uni.getStorageSync('team')
}
},
onShow() {
const pages = getCurrentPages()
const { options } = pages[pages.length - 1]
this.id = options.id || ''
this.getQrcode()
this.getInfo()
},
methods: {
//
getInfo() {
my().then(({ my }) => {
this.my = my
}).catch(e => {})
},
//
getQrcode() {
const { team } = this
const accountId = uni.getStorageSync('accountId')
//
generateInvitationCode(uni.getStorageSync('team').accountId).then(({ expireTime }) => {
generateInvitationCode(accountId).then(({ expireTime }) => {
const date = new Date(Date.now() + expireTime * 1000) // *1000
this.expireTime = `${date.getFullYear()}-${this.$util.preZero(date.getMonth() + 1)}-${this.$util.preZero(date.getDate())} ${this.$util.preZero(date.getHours())}:${this.$util.preZero(date.getMinutes())}:${this.$util.preZero(date.getMinutes())}`
const team = this.team
this.link = `https://huorantech.cn/#/join?accountId=${team.accountId}&id=${team.teamId}&isTeam=0&teamName=${team.partnerClassificationName}`
// this.link = `http://192.168.31.125:8086/#/join?accountId=${team.accountId}&id=${team.teamId}&isTeam=0`
// this.link = `https://huorantech.cn/#/join?accountId=${accountId}&id=${this.id}&isTeam=0`
this.link = `http://121.37.12.51/backstage/#/join?accountId=${accountId}&id=${this.id}&isTeam=0`
}).catch(e => {})
},
}
@ -75,6 +85,7 @@
.info {
display: flex;
align-items: center;
margin-bottom: 40rpx;
text-align: left;
}
.avatar {

@ -7,7 +7,7 @@
<uni-list-item :show-extra-icon="true" showArrow :extra-icon="pwdIcon" title="密码" rightText="******" clickable @click="toPage('../password/password')" />
</uni-list>
<view v-if="auth('我的:退出账号')" class="logout" @click="logout">退出登录</view>
<view class="logout" @click="logout">退出登录</view>
</view>
</template>
@ -49,11 +49,7 @@
methods: {
//
getInfo() {
const team = uni.getStorageSync('team')
my({
partnerId: team.partnerId,
teamId: team.teamId
}).then(({ my }) => {
my().then(({ my }) => {
this.info = my.info
}).catch(e => {})
},

@ -0,0 +1,119 @@
<template>
<view>
<uni-card :is-shadow="false" :border="false" is-full spacing="0" margin="20">
<uni-search-bar class="search" radius="30" placeholder="请输入成员名称" clearButton="auto" cancelButton="none" v-model="keyword" />
</uni-card>
<template v-if="list.length">
<ul class="list">
<li v-for="item in list">
<image class="avatar" :src="item.userAvatars || require('@/static/image/avatar.png')" mode=""></image>
<view class="info">
<view class="c-name">{{ item.isTeam == '1' ? '团队管理员' : '团队成员' }}: {{ item.userName }}</view>
<view class="line">
<text class="name">手机号码</text>
<text class="val">{{ item.phone }}</text>
</view>
<view class="line">
<text class="name">加入时间</text>
<text class="val">{{ item.lastLoginTime.split(' ')[0] }}</text>
</view>
</view>
</li>
</ul>
</template>
<empty v-else></empty>
<uni-icons class="plus" type="plus-filled" size="60" color="#007eff" @click="$util.to('../addStaff/addStaff')"></uni-icons>
</view>
</template>
<script>
import { queryTeamMembers } from '@/apis/modules/parner.js'
export default {
data() {
return {
id: '',
keyword: '',
list: [],
}
},
watch: {
keyword () {
clearTimeout(this.searchTimer)
this.searchTimer = setTimeout(() => {
this.initList()
}, 500)
}
},
onShow() {
const pages = getCurrentPages()
const { options } = pages[pages.length - 1]
this.id = options.id
this.getList()
},
methods: {
//
getList() {
uni.showLoading({
title: '加载中'
})
queryTeamMembers({
teamId: this.id,
name: this.keyword,
}).then(({ teamMembers }) => {
uni.hideLoading()
this.list = teamMembers
}).catch(e => {
uni.hideLoading()
})
},
}
}
</script>
<style scoped lang="scss">
.list {
margin-top: 20rpx;
background-color: #fff;
li {
display: flex;
align-items: center;
padding: 20rpx 40rpx;
border-bottom: 1px solid #f7f7f7;
&:last-child {
border-bottom: 0;
}
}
.avatar {
width: 100rpx;
height: 100rpx;
margin-right: 30rpx;
border-radius: 50%;
}
.c-name {
margin-bottom: 6rpx;
font-size: 30rpx;
color: #333;
}
.line {
display: flex;
padding: 2rpx 0;
}
.name {
margin-right: 10rpx;
white-space: nowrap;
font-size: 28rpx;
color: #999;
}
.val {
font-size: 28rpx;
color: #333;
}
}
.plus {
position: fixed;
bottom: 40rpx;
right: 40rpx;
}
</style>

@ -2,14 +2,27 @@
<view>
<uni-card :is-shadow="false" :border="false" is-full spacing="0" margin="20">
<uni-search-bar class="search" radius="30" placeholder="请输入团队、合伙人名字" clearButton="auto" cancelButton="none" v-model="keyword" />
<view class="org-picker">
<uni-data-picker class="picker-input" placeholder="请选择组织" popup-title="请选择组织" preload :localdata="orgs" :map="{text: 'partnerClassificationName', value: 'id'}" v-model="org" @nodeclick="orgClick" @change="initList" @popupclosed="orgClose"></uni-data-picker>
</view>
</uni-card>
<template v-if="list.length">
<ul class="list">
<li v-for="item in list">
<li v-for="item in list" @click="toTeam(item)">
<image class="avatar" :src="item.userAvatars || require('@/static/image/avatar.png')" mode=""></image>
<view class="info">
<view class="c-name">{{ item.userName }}</view>
<view class="line">
<text class="name">团队名称</text>
<text class="val">{{ item.teamName }}</text>
</view>
<view class="line">
<text class="name">负责人</text>
<text class="val">{{ item.account }}</text>
</view>
<view class="line">
<text class="name">手机号码</text>
<text class="val">{{ item.phone }}</text>
@ -20,12 +33,15 @@
</view>
<view class="line">
<text class="name">所属区域</text>
<text class="val">{{ item.area }}</text>
</view>
<view class="line">
<text class="name">团队成员</text>
<text class="val">{{ item.teamSize }}</text>
</view>
<view class="line">
<text class="name">邀请人</text>
<text class="val">{{ item.invitationAccount }}</text>
</view>
</view>
</li>
@ -34,17 +50,18 @@
</template>
<empty v-else></empty>
<uni-icons v-if="auth('团队:邀请成员')" class="plus" type="plus-filled" size="60" color="#007eff" @click="$util.to('../addStaff/addStaff')"></uni-icons>
<view v-if="!per" class="per-mask">功能升级中敬请期待...</view>
<uni-icons class="plus" type="plus-filled" size="60" color="#007eff" @click="$util.to('../addStaff/addStaff')"></uni-icons>
</view>
</template>
<script>
import { teamList } from '@/apis/modules/parner.js'
import { teamPartnerList, treeList } from '@/apis/modules/parner.js'
export default {
data() {
return {
per: true, //
orgs: [],
org: '',
orgTemp: '',
reachBottom: 0, // 0->,1->,-1->
status: 'more', // more|loading|noMore
searchTimer: null,
@ -78,30 +95,35 @@
}
},
onShow() {
this.per = true
this.initRole()
this.getOrg()
},
methods: {
//
initRole() {
const auth = uni.getStorageSync('auth')
if (!auth.includes('团队')) {
this.per = false
} else if (auth.includes('团队:团队列表')) {
//
getOrg() {
treeList().then(({ treeList }) => {
this.orgs = treeList
this.initList()
}
}).catch(e => {})
},
orgClick(e) {
this.orgTemp = e.id
},
//
orgClose(e) {
this.org = this.orgTemp
this.initList()
},
//
getList() {
uni.showLoading({
title: '加载中'
})
teamList({
teamPartnerList({
type: 1,
pageNum: this.page,
pageSize: this.pageSize,
keyWord: this.keyword,
partnerClassificationId: uni.getStorageSync('team').teamId
partnerClassificationId: this.org || ''
}).then(({ pageList }) => {
uni.hideLoading()
const { records } = pageList
@ -119,12 +141,20 @@
this.page = 1
this.reachBottom = 0
this.getList()
},
//
toTeam(e) {
this.$util.to(`../teamDetail/teamDetail?id=${e.teamId}`)
}
}
}
</script>
<style scoped lang="scss">
.org-picker {
padding: 10px;
background-color: #fff;
}
.list {
margin-top: 20rpx;
background-color: #fff;
@ -150,7 +180,7 @@
}
.line {
display: flex;
padding: 2rpx 0;
padding: 5rpx 0;
}
.name {
margin-right: 10rpx;

Loading…
Cancel
Save