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. 184
      order/orderDetail/orderDetail.vue
  13. 130
      order/orders/orders.vue
  14. 14
      pages.json
  15. 56
      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) return post('nakadai/nakadai/applets/customer/getCustomerListBasedOnBusinessManagerId', data)
} }
export const all = (data) => {
return post('nakadai/nakadai/applets/customer/customerList', data)
}
export const queryCustomerDetails = (data) => { export const queryCustomerDetails = (data) => {
return get('nakadai/nakadai/customer/queryCustomerDetails', data) return get('nakadai/nakadai/customer/queryCustomerDetails', data)
} }

@ -22,7 +22,7 @@ export const renew = (data) => {
} }
export const list = (data) => { export const list = (data) => {
return post('nakadai/nakadai/applets/order/orderList', data) return post('nakadai/nakadai/order/list', data)
} }
export const orderList = (data) => { export const orderList = (data) => {
@ -40,3 +40,11 @@ export const ship = (data) => {
export const miniProgramOrderRecord = (data) => { export const miniProgramOrderRecord = (data) => {
return post('nakadai/nakadai/applets/order/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}`) return post(`nakadai/nakadai/partnerAccount/generateInvitationCode?accountId=${accountId}`)
} }
export const treeList = (data) => { export const treeList = () => {
return post('nakadai/nakadai/partnerClassification/treeList', data) return post('nakadai/nakadai/partnerClassification/treeList?applet=1')
} }
export const my = (data) => { export const my = (data) => {
@ -24,3 +24,15 @@ export const my = (data) => {
export const mailFileSend = (data) => { export const mailFileSend = (data) => {
return post('nakadai/nakadai/partnerAccount/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 const { get, post } = request
export const login = (data) => { export const login = (data) => {
return post('users/users/user/weChatAppletCallback', data) return post('users/users/user/weChatAppletCallbackByOperation', data)
} }
export const userBinding = (data) => { export const userBinding = (data) => {
return post('users/users/user/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) => { export const examinePassword = (data) => {
return post('users/users/userAccount/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 )` }"> <scroll-view class="select-scroll" scroll-y :style="{ height: `calc( ${height} - 120rpx - 152rpx )` }">
<view class="select-main"> <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="select-item" v-for="(item, index) in data" :key="index">
<view class="title"> {{ item.title }} </view> <view class="title"> {{ item.title }} </view>
<view class="tag-list" v-if="!item.children"> <view class="tag-list" v-if="!item.children">
@ -60,6 +68,7 @@
<script> <script>
import Popup from './components/popup.vue'; import Popup from './components/popup.vue';
import { queryProvince, queryCity } from '@/apis/modules/user.js'
export default { export default {
components:{ components:{
Popup Popup
@ -103,6 +112,10 @@ export default {
type: Boolean, type: Boolean,
default: true, default: true,
}, },
showArea: {
type: Boolean,
default: false
}
}, },
computed: { computed: {
// //
@ -135,9 +148,16 @@ export default {
}, },
data() { data() {
return { return {
originForm: {} originForm: {},
provinces: [],
provinceId: '',
cities: [],
cityId: ''
} }
}, },
mounted() {
this.showArea && this.getProvince()
},
methods: { methods: {
//value id //value id
selectTagBuyValueOrId(item, key, keyValue, isRadio) { selectTagBuyValueOrId(item, key, keyValue, isRadio) {
@ -172,8 +192,31 @@ export default {
this.acceptForm = this.acceptForm; 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() { finsh() {
if (this.showArea) {
this.acceptForm.provinceId = this.provinceId
this.acceptForm.cityId = this.cityId
}
this.$emit("finsh", this.acceptForm); this.$emit("finsh", this.acceptForm);
this.$emit("input", false); this.$emit("input", false);
}, },
@ -258,6 +301,10 @@ export default {
} }
} }
} }
.area-picker {
width: 50%;
padding: 30rpx 0;
}
.filter-button { .filter-button {
width: 100%; width: 100%;
height: 152rpx; height: 152rpx;

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

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

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

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

@ -11,7 +11,7 @@
<image class="icon" :src="$util.getIcon(item)" mode="widthFix"></image> <image class="icon" :src="$util.getIcon(item)" mode="widthFix"></image>
{{ item.productName }} {{ item.productName }}
</view> </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>
<view class="form-list"> <view class="form-list">
<view class="line"> <view class="line">
@ -340,7 +340,6 @@
for (const i in courses) { for (const i in courses) {
list.push(...courses[i].list) list.push(...courses[i].list)
} }
console.log(11, list)
// //
for (const i in list) { for (const i in list) {
const e = list[i] const e = list[i]
@ -366,7 +365,6 @@
break break
} }
} }
console.log(33, this.err)
if (msg) return this.$util.errMsg(msg) if (msg) return this.$util.errMsg(msg)
if (this.orderRepeat.length) return this.$util.errMsg(this.repeatMsg) // if (this.orderRepeat.length) return this.$util.errMsg(this.repeatMsg) //
uni.setStorageSync('courses', this.courses) uni.setStorageSync('courses', this.courses)

@ -3,10 +3,6 @@
<view class="block"> <view class="block">
<view class="l-title">基本信息</view> <view class="l-title">基本信息</view>
<view class="form-list"> <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="['line req', {err: err === 'customerName'}]">
<view class="name">客户名称</view> <view class="name">客户名称</view>
<view v-if="orderId" class="val">{{ form.customerName }}</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> <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> <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>
<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="line">
<view class="name">订单编号</view> <view class="name">订单编号</view>
<view class="val">{{ form.orderNumber }}</view> <view class="val">{{ form.orderNumber }}</view>
@ -57,25 +63,25 @@
<view class="l-title">{{ c.name }}</view> <view class="l-title">{{ c.name }}</view>
<uni-icons class="arrow" type="top" size="20" color="#007EFF" @click="toggle(c)"></uni-icons> <uni-icons class="arrow" type="top" size="20" color="#007EFF" @click="toggle(c)"></uni-icons>
<ul class="pro-list" v-show="!c.shrink"> <ul class="pro-list" v-show="!c.shrink">
<uni-swipe-action> <li v-for="(item, i) in c.list" :key="i" @click.stop="editCourse(c, i)">
<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="name">
<view class="left"> <view class="left">
<image class="icon" :src="$util.getIcon(item)" mode="widthFix"></image> <image class="icon" :src="$util.getIcon(item)" mode="widthFix"></image>
{{ item.productName }} {{ item.productName }}
</view> </view>
<image v-if="!isDetail && !isEdit" class="del" src="@/static/image/trash.png" mode="widthFix" @click.stop="delCourse(c, i)"></image> <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>
<view class="info"> <view class="info">
<view class="line"> <view class="line">
<view class="label">使用期限</view> <view class="label">使用期限</view>
<view class="val">{{ item.startTime + ' - ' + item.endTime }}</view> <view class="val">{{ item.startTime + (item.endTime && ' - ' + item.endTime) }}</view>
</view> </view>
<view class="line"> <view class="line">
<view class="label">市场价</view> <view class="label">市场价</view>
@ -99,8 +105,6 @@
</view> </view>
</view> </view>
</li> </li>
</uni-swipe-action-item>
</uni-swipe-action>
</ul> </ul>
</view> </view>
</template> </template>
@ -128,7 +132,10 @@
</view> </view>
</view> </view>
</view> </view>
<view class="product-btns">
<view v-if="!isDetail" class="btn" @click="submit">提交({{ courses.length }})</view> <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>
</view> </view>
@ -146,7 +153,8 @@
<script> <script>
import { queryCustomer, queryCustomerDetails } from '@/apis/modules/client.js' 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 { export default {
data() { data() {
return { return {
@ -163,7 +171,8 @@
value: 2 value: 2
}], }],
form: { form: {
businessManagerName: uni.getStorageSync('team').userName, businessManagerId: '',
businessManagerName: '',
// orderNumber: '', // // orderNumber: '', //
provinceId: '', // id provinceId: '', // id
provinceName: '', provinceName: '',
@ -179,9 +188,11 @@
customerName: '', customerName: '',
profit: 0, // profit: 0, //
purchaseCost: 0, // purchaseCost: 0, //
teamId: uni.getStorageSync('team').id, teamId: '',
businessManagerId: this.$util.getBmId() partnerClassificationName: '',
}, },
teams: [],
bms: [],
courseList: {}, courseList: {},
courses: [], // courses: [], //
contract: { // contract: { //
@ -218,10 +229,9 @@
this.isEdit = options.text === '修改' this.isEdit = options.text === '修改'
this.isHandle = options.text === '处理' this.isHandle = options.text === '处理'
this.isRenew = options.text === '续费' this.isRenew = options.text === '续费'
this.getTeam()
const store = uni.getStorageSync('courses') const store = uni.getStorageSync('courses')
if (this.orderId) { if (store) {
this.getInfo()
} else if (store) {
// //
const list = [] const list = []
for (const i in store) { for (const i in store) {
@ -269,6 +279,16 @@
const order = orderDetails const order = orderDetails
if (!this.isRenew) this.contract = order.contractInformation // if (!this.isRenew) this.contract = order.contractInformation //
this.form = order.order 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.courses = order.orderOther
this.handleRenew(0) this.handleRenew(0)
this.handleRenew(1) this.handleRenew(1)
@ -313,7 +333,7 @@
}) })
this.courseList = courses this.courseList = courses
}, },
// // pc
handleRenew(authority) { handleRenew(authority) {
const productId = this.courses.filter(e => e.authority == authority).map(e => e.dataOrCourseId) const productId = this.courses.filter(e => e.authority == authority).map(e => e.dataOrCourseId)
productId.length && this.promises.push(new Promise((resolve, reject) => { productId.length && this.promises.push(new Promise((resolve, reject) => {
@ -332,7 +352,6 @@
if (now < date) { // +1 if (now < date) { // +1
date = new Date(date.setDate(date.getDate() + 1)) date = new Date(date.setDate(date.getDate() + 1))
item.startTime = this.$util.formatDate(date, 'yyyy-MM-dd') item.startTime = this.$util.formatDate(date, 'yyyy-MM-dd')
console.log(444, item, now < date,date,e.startTime)
} else { // } else { //
item.startTime = this.$util.formatDate(now, 'yyyy-MM-dd') item.startTime = this.$util.formatDate(now, 'yyyy-MM-dd')
} }
@ -341,7 +360,7 @@
item.marketValue = e.marketValue item.marketValue = e.marketValue
} else if (!this.isDetail) { // } else if (!this.isDetail) { //
item.startTime = e.startTime.split(' ')[0] 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) const startTime = new Date(item.startTime)
@ -353,21 +372,6 @@
2 : 2 :
3 3
if (item.status === 3) item.isEnable = 0 // 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() resolve()
}).catch(e => { }).catch(e => {
@ -422,6 +426,24 @@
}).catch(e => {}) }).catch(e => {})
this.closeCustomer() 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() { toAdd() {
uni.setStorageSync('courses', this.courses) uni.setStorageSync('courses', this.courses)
@ -463,21 +485,15 @@
toggle(c) { toggle(c) {
c.shrink = !c.shrink c.shrink = !c.shrink
}, },
// //
productHandle(e, n, i) { handleEnable(c, i) {
const row = this.courseList[n].list[i] this.courseList[c].list[i].isEnable = this.courseList[c].list[i].isEnable ? 0 : 1
const { text } = e.content },
if (text === '发货' || text === '取消发货') { //
row.ship = text === '发货' ? 1 : 0 handleDeliver(c, i) {
this.isEdit && ship(row).then(res => {}).catch(res => {}) const row = this.courseList[c].list[i]
row.ops[0].text = text === '发货' ? '取消发货' : '发货' row.ship = row.ship ? 0 : 1
console.log(444, row.ops) this.isEdit && ship(row).then(res => {}).catch(res => {}) //
} else {
row.isEnable = text === '启用' ? 1 : 0
row.ops[0].text = text === '启用' ? '禁用' : '启用'
}
this.courseList[n].list[i] = row
console.log(111,row, this.courseList)
}, },
// //
calcTotal(out) { calcTotal(out) {
@ -521,6 +537,39 @@
handleErr(val) { handleErr(val) {
if (val === this.err) this.err = '' 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() { submit() {
const { form } = this const { form } = this
@ -549,7 +598,7 @@
order: form, // order: form, //
orderOther: courses // orderOther: courses //
} }
if (this.orderId) { if (this.isEdit || this.isHandle) {
update(data).then(res => { update(data).then(res => {
uni.hideLoading() uni.hideLoading()
this.$util.sucMsg('编辑成功') this.$util.sucMsg('编辑成功')
@ -561,6 +610,7 @@
}) })
} else { } else {
add(data).then(res => { add(data).then(res => {
// form.orderOther.find(e => !e.ship) || this.publicNotice(form, orderId) //
uni.hideLoading() uni.hideLoading()
this.$util.sucMsg('添加成功') this.$util.sucMsg('添加成功')
setTimeout(() => { setTimeout(() => {
@ -608,6 +658,15 @@
display: inline-flex; display: inline-flex;
align-items: center; align-items: center;
} }
.course-action {
display: inline-flex;
align-items: center;
}
.course-btn {
padding: 0 16rpx;
margin-right: 10rpx;
font-size: 28rpx;
}
.del { .del {
width: 40rpx; width: 40rpx;
} }
@ -732,11 +791,16 @@
color: #333; color: #333;
white-space: nowrap; white-space: nowrap;
} }
.product-btns {
display: inline-flex;
align-items: center;
margin-left: 20rpx;
}
.btn { .btn {
width: 180rpx; padding: 0 20rpx;
margin-left: 30rpx; margin-left: 16rpx;
line-height: 80rpx; line-height: 80rpx;
font-size: 32rpx; font-size: 30rpx;
text-align: center; text-align: center;
color: #fff; color: #fff;
border-radius: 10rpx; border-radius: 10rpx;

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

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

@ -1,26 +1,24 @@
<template> <template>
<view> <view>
<uni-section title="邀请成员" type="line"> <uni-section title="邀请城市合伙人" type="line">
<uni-list> <view class="page">
<uni-list-item thumb-size="sm" showArrow title="二维码邀请" clickable :to="`../qrcode/qrcode`"> <view class="org-picker">
<template v-slot:header> <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 class="slot-box"> </view>
<image class="icon" src="@/static/image/qrcode.png" mode="widthFix"></image> <button type="primary" @click="toCode">生成邀请二维码</button>
</view> </view>
</template>
<template v-slot:body>
<text class="slot-box text">二维码邀请</text>
</template>
</uni-list-item>
</uni-list>
</uni-section> </uni-section>
</view> </view>
</template> </template>
<script> <script>
import { treeList } from '@/apis/modules/parner.js'
export default { export default {
data() { data() {
return { return {
orgs: [],
org: '',
orgTemp: '',
extraIcon: { extraIcon: {
color: '#007eff', color: '#007eff',
size: '22', size: '22',
@ -28,13 +26,45 @@
} }
} }
}, },
onShow() {
this.getOrg()
},
methods: { 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> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.page {
padding: 0 20px 20px;
.org-picker {
margin-bottom: 20px;
}
}
.slot-box { .slot-box {
display: flex; display: flex;
flex-direction: row; flex-direction: row;

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

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

@ -1,9 +1,6 @@
<template> <template>
<view :class="['page', {oh: !per}]"> <view class="page">
<image class="bg" src="@/static/image/index/index2.png" mode="widthFix"></image> <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"> <view class="banner">
<image class="img" src="@/static/image/index/index1.png" mode="widthFix"></image> <image class="img" src="@/static/image/index/index1.png" mode="widthFix"></image>
@ -14,7 +11,7 @@
</view> </view>
<ul class="entry"> <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> <image class="icon" src="@/static/image/index/index3.png" mode="widthFix"></image>
<view class="text">客户</view> <view class="text">客户</view>
</li> </li>
@ -22,7 +19,7 @@
<image class="icon" src="@/static/image/index/index4.png" mode="widthFix"></image> <image class="icon" src="@/static/image/index/index4.png" mode="widthFix"></image>
<view class="text">方案</view> <view class="text">方案</view>
</li> </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> <image class="icon" src="@/static/image/index/index5.png" mode="widthFix"></image>
<view class="text">订单</view> <view class="text">订单</view>
</li> </li>
@ -98,42 +95,30 @@
</view> </view>
</view> </view>
</view> </view>
<view v-if="!per" class="per-mask">功能升级中敬请期待...</view>
</view> </view>
</template> </template>
<script> <script>
import { getUserRolesPermissionMenu } from '@/apis/modules/user.js' import { getUserRolesPermissionMenu } from '@/apis/modules/user.js'
import { getTeamsByAccountId, getTheBusinessManagerIdsUnderTheTeam } from '@/apis/modules/client.js'
import { treeList } from '@/apis/modules/parner.js'
export default { export default {
data() { data() {
return { return {
per: true, // per: true, //
// teamId: uni.getStorageSync('team').teamId || '',
teamId: '',
list: [],
id: '', id: '',
teamList: []
} }
}, },
onShow() { onShow() {
this.per = true this.getAuth()
this.getInfo()
}, },
methods: { methods: {
//
initRole() {
if (!uni.getStorageSync('auth').includes('首页')) {
this.per = false
}
},
// //
getAuth() { getAuth() {
uni.showLoading({
title: '加载中'
})
uni.getStorageSync('token') && getUserRolesPermissionMenu({ uni.getStorageSync('token') && getUserRolesPermissionMenu({
teamId: this.list.find(e => e.teamId === this.teamId).partnerClassificationId, platformId: 3
platformId: 4 }).then(res => {
}).then(({ permissionMenu }) => {
uni.hideLoading() uni.hideLoading()
const auth = [] const auth = []
// //
@ -144,59 +129,14 @@
generateAuth(e.children, name) generateAuth(e.children, name)
}) })
} }
generateAuth(permissionMenu[0].children, '') generateAuth(res.permissionMenu[0].children, '')
uni.setStorageSync('dataPermission', res.dataPermissionList)
uni.setStorageSync('auth', auth) uni.setStorageSync('auth', auth)
this.$forceUpdate() this.$forceUpdate()
this.initRole()
}).catch(e => { }).catch(e => {
uni.hideLoading() uni.hideLoading()
uni.setStorageSync('auth', []) 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) { toPanel(i) {

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

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

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

@ -6,11 +6,10 @@
<image class="avatar" :src="avatar" mode=""></image> <image class="avatar" :src="avatar" mode=""></image>
<view class="text"> <view class="text">
<view class="invite"> <view class="invite">
<text class="name">{{ userName }}</text> 邀请你加入城市合伙人计划 <text class="name">{{ my.info.userName }}</text> 邀请你加入城市合伙人计划
</view> </view>
</view> </view>
</view> </view>
<view class="com">{{ team.partnerClassificationName }}</view>
<u-qrcode ref="qrcode" canvas-id="qrcode" :size="size" :value="link"></u-qrcode> <u-qrcode ref="qrcode" canvas-id="qrcode" :size="size" :value="link"></u-qrcode>
<view class="tips">扫一扫加入我们吧</view> <view class="tips">扫一扫加入我们吧</view>
</view> </view>
@ -20,33 +19,44 @@
</template> </template>
<script> <script>
import { generateInvitationCode } from '@/apis/modules/parner.js' import { generateInvitationCode, my } from '@/apis/modules/parner.js'
export default { export default {
data() { data() {
return { return {
id: '',
avatar: uni.getStorageSync('avatar') || '@/static/image/avatar.png', avatar: uni.getStorageSync('avatar') || '@/static/image/avatar.png',
userName: uni.getStorageSync('userName'), my: {
info: {},
},
expireTime: '', expireTime: '',
qrcode: '', qrcode: '',
link: '', link: '',
size: uni.upx2px(420), size: uni.upx2px(420),
team: uni.getStorageSync('team')
} }
}, },
onShow() { onShow() {
const pages = getCurrentPages()
const { options } = pages[pages.length - 1]
this.id = options.id || ''
this.getQrcode() this.getQrcode()
this.getInfo()
}, },
methods: { methods: {
//
getInfo() {
my().then(({ my }) => {
this.my = my
}).catch(e => {})
},
// //
getQrcode() { 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 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())}` 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=${accountId}&id=${this.id}&isTeam=0`
this.link = `https://huorantech.cn/#/join?accountId=${team.accountId}&id=${team.teamId}&isTeam=0&teamName=${team.partnerClassificationName}` this.link = `http://121.37.12.51/backstage/#/join?accountId=${accountId}&id=${this.id}&isTeam=0`
// this.link = `http://192.168.31.125:8086/#/join?accountId=${team.accountId}&id=${team.teamId}&isTeam=0`
}).catch(e => {}) }).catch(e => {})
}, },
} }
@ -75,6 +85,7 @@
.info { .info {
display: flex; display: flex;
align-items: center; align-items: center;
margin-bottom: 40rpx;
text-align: left; text-align: left;
} }
.avatar { .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-item :show-extra-icon="true" showArrow :extra-icon="pwdIcon" title="密码" rightText="******" clickable @click="toPage('../password/password')" />
</uni-list> </uni-list>
<view v-if="auth('我的:退出账号')" class="logout" @click="logout">退出登录</view> <view class="logout" @click="logout">退出登录</view>
</view> </view>
</template> </template>
@ -49,11 +49,7 @@
methods: { methods: {
// //
getInfo() { getInfo() {
const team = uni.getStorageSync('team') my().then(({ my }) => {
my({
partnerId: team.partnerId,
teamId: team.teamId
}).then(({ my }) => {
this.info = my.info this.info = my.info
}).catch(e => {}) }).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> <view>
<uni-card :is-shadow="false" :border="false" is-full spacing="0" margin="20"> <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-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> </uni-card>
<template v-if="list.length"> <template v-if="list.length">
<ul class="list"> <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> <image class="avatar" :src="item.userAvatars || require('@/static/image/avatar.png')" mode=""></image>
<view class="info"> <view class="info">
<view class="c-name">{{ item.userName }}</view> <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"> <view class="line">
<text class="name">手机号码</text> <text class="name">手机号码</text>
<text class="val">{{ item.phone }}</text> <text class="val">{{ item.phone }}</text>
@ -20,12 +33,15 @@
</view> </view>
<view class="line"> <view class="line">
<text class="name">所属区域</text> <text class="name">所属区域</text>
<text class="val">{{ item.area }}</text>
</view> </view>
<view class="line"> <view class="line">
<text class="name">团队成员</text> <text class="name">团队成员</text>
<text class="val">{{ item.teamSize }}</text>
</view> </view>
<view class="line"> <view class="line">
<text class="name">邀请人</text> <text class="name">邀请人</text>
<text class="val">{{ item.invitationAccount }}</text>
</view> </view>
</view> </view>
</li> </li>
@ -34,17 +50,18 @@
</template> </template>
<empty v-else></empty> <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> <uni-icons class="plus" type="plus-filled" size="60" color="#007eff" @click="$util.to('../addStaff/addStaff')"></uni-icons>
<view v-if="!per" class="per-mask">功能升级中敬请期待...</view>
</view> </view>
</template> </template>
<script> <script>
import { teamList } from '@/apis/modules/parner.js' import { teamPartnerList, treeList } from '@/apis/modules/parner.js'
export default { export default {
data() { data() {
return { return {
per: true, // orgs: [],
org: '',
orgTemp: '',
reachBottom: 0, // 0->,1->,-1-> reachBottom: 0, // 0->,1->,-1->
status: 'more', // more|loading|noMore status: 'more', // more|loading|noMore
searchTimer: null, searchTimer: null,
@ -78,30 +95,35 @@
} }
}, },
onShow() { onShow() {
this.per = true this.getOrg()
this.initRole()
}, },
methods: { methods: {
// //
initRole() { getOrg() {
const auth = uni.getStorageSync('auth') treeList().then(({ treeList }) => {
if (!auth.includes('团队')) { this.orgs = treeList
this.per = false this.initList()
} else if (auth.includes('团队:团队列表')) { }).catch(e => {})
},
orgClick(e) {
this.orgTemp = e.id
},
//
orgClose(e) {
this.org = this.orgTemp
this.initList() this.initList()
}
}, },
// //
getList() { getList() {
uni.showLoading({ uni.showLoading({
title: '加载中' title: '加载中'
}) })
teamList({ teamPartnerList({
type: 1, type: 1,
pageNum: this.page, pageNum: this.page,
pageSize: this.pageSize, pageSize: this.pageSize,
keyWord: this.keyword, keyWord: this.keyword,
partnerClassificationId: uni.getStorageSync('team').teamId partnerClassificationId: this.org || ''
}).then(({ pageList }) => { }).then(({ pageList }) => {
uni.hideLoading() uni.hideLoading()
const { records } = pageList const { records } = pageList
@ -119,12 +141,20 @@
this.page = 1 this.page = 1
this.reachBottom = 0 this.reachBottom = 0
this.getList() this.getList()
},
//
toTeam(e) {
this.$util.to(`../teamDetail/teamDetail?id=${e.teamId}`)
} }
} }
} }
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.org-picker {
padding: 10px;
background-color: #fff;
}
.list { .list {
margin-top: 20rpx; margin-top: 20rpx;
background-color: #fff; background-color: #fff;
@ -150,7 +180,7 @@
} }
.line { .line {
display: flex; display: flex;
padding: 2rpx 0; padding: 5rpx 0;
} }
.name { .name {
margin-right: 10rpx; margin-right: 10rpx;

Loading…
Cancel
Save