master
yujialong 3 years ago
parent fd4363423f
commit 98bf599434
  1. 14
      App.vue
  2. 4
      apis/modules/order.js
  3. 12
      apis/modules/parner.js
  4. 16
      apis/request.js
  5. 4
      libs/util.js
  6. 28
      pages.json
  7. 4
      pages/addCourse/addCourse.vue
  8. 2
      pages/addStaff/addStaff.vue
  9. 6
      pages/clientDetail/clientDetail.vue
  10. 48
      pages/clients/clients.vue
  11. 178
      pages/editCourse/editCourse.vue
  12. 61
      pages/index/index.vue
  13. 2
      pages/invite/invite.vue
  14. 18
      pages/login/login.vue
  15. 22
      pages/orderDetail/orderDetail.vue
  16. 142
      pages/orders/orders.vue
  17. 16
      pages/person/person.vue
  18. 67
      pages/plans/plans.vue
  19. 30
      pages/products/products.vue
  20. 2
      pages/qrcode/qrcode.vue
  21. 65
      pages/teams/teams.vue
  22. BIN
      static/avatar.jpg
  23. 20
      static/customicons.css
  24. BIN
      static/customicons.ttf
  25. 1
      styles/common.scss

@ -14,19 +14,5 @@
</script>
<style lang="scss">
/*每个页面公共css */
@import '@/uni_modules/uni-scss/index.scss';
/* #ifndef APP-NVUE */
@import '@/static/customicons.css';
//
page {
background-color: #f5f5f5;
}
/* #endif */
.example-info {
font-size: 14px;
color: #333;
padding: 10px;
}
</style>

@ -24,3 +24,7 @@ export const renew = (data) => {
export const list = (data) => {
return post('nakadai/applets/order/getOrderBasedOnBusinessManagerId', data)
}
export const del = (data) => {
return post('nakadai/nakadai/order/delete', data)
}

@ -4,3 +4,15 @@ const { get, post } = request
export const savePartnerAccount = (data) => {
return post('nakadai/partnerAccount/savePartnerAccount', data)
}
export const teamList = (data) => {
return get('nakadai/partner-team/teamList', data)
}
export const generateInvitationCode = (data) => {
return post('nakadai/partnerAccount/generateInvitationCode', data)
}
export const generationQrCode = (data) => {
return get('nakadai/partnerAccount/generationQrCode ', data)
}

@ -13,19 +13,31 @@ const request = options => {
}
const header = Object.assign({}, config.headers, {
// token: uni.getStorageSync('token')
token: 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ1c2VyIiwiaWF0IjoxNjU0NDg1NjgzLCJleHAiOjE2NTQ1Mjg4ODMsImFjY291bnRJZCI6IjQ1MiJ9.rsgoTtE1l0ooK7TBTQjC8Xd1nKGYTfoQrM8BDZqODGU'
token: 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ1c2VyIiwiaWF0IjoxNjU0NTY5OTA1LCJleHAiOjE2NTQ2MTMxMDUsImFjY291bnRJZCI6IjQ1MiJ9.IwVDQSpfYctr3ScaBiwXApNiSFjfwVbivt_uLCEPiW0'
})
return new Promise((resolve, reject)=>{
const { url } = options
uni.request({
header,
url: ((url.includes('weChatAppletCallback') || url.includes('userBinding')) ? 'http://192.168.31.151:9000/' : config.baseURL) + url,
url: ((url.includes('teamList')) ? 'http://192.168.31.137:9000/' : config.baseURL) + url,
method: options.method || 'GET', // 请求类型,默认为GET
data: options.data || {}, // 请求参数,默认空对象
success: ({ data }) => {
// 状态判断,根据后台定义并提示
if (data.status === 200) {
resolve(data)
} else if (data.status == 401) {
// 登录过期
uni.showToast({
title: data.message,
icon: 'none'
})
setTimeout(() => {
uni.navigateTo({
url: '../login/login'
})
}, 1500)
reject(data)
} else {
uni.showToast({
title: data.message,

@ -46,10 +46,10 @@ export default {
},
// 获取商务经理id
getBmId(val) {
return uni.getStorageSync('partnerId')
return uni.getStorageSync('team').partnerId
},
// 获取商务经理名称
getBmName(val) {
return uni.getStorageSync('partnerClassificationName')
return uni.getStorageSync('team').partnerClassificationName
},
}

@ -1,18 +1,26 @@
{
"pages": [
{
"path" : "pages/main/main",
"path" : "pages/login/login",
"style" :
{
"navigationBarTitleText": "",
"navigationBarTitleText": "登录",
"enablePullDownRefresh": false
}
},
{
"path" : "pages/login/login",
"path" : "pages/invite/invite",
"style" :
{
"navigationBarTitleText": "登录",
"navigationBarTitleText": "加入团队",
"enablePullDownRefresh": false
}
},
{
"path" : "pages/index/index",
"style" :
{
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
},
@ -64,14 +72,6 @@
"enablePullDownRefresh": false
}
},
{
"path" : "pages/invite/invite",
"style" :
{
"navigationBarTitleText": "加入团队",
"enablePullDownRefresh": false
}
},
{
"path" : "pages/addStaff/addStaff",
"style" :
@ -182,10 +182,8 @@
"selectedColor": "#007FFF",
"borderStyle": "white",
"backgroundColor": "#ffffff",
"height": "100px",
"spacing": "10px",
"list": [{
"pagePath": "pages/main/main",
"pagePath": "pages/index/index",
"iconPath": "static/image/tab1.png",
"selectedIconPath": "static/image/tab1-1.png",
"text": "首页"

@ -211,13 +211,13 @@
const { customerId } = this
list.map(e => {
// id
if (!result.find(n => n.dataOrCourseId == e.id)) {
if (!result.find(n => n.dataOrCourseId == e.id && n.authority == e.authority)) {
e.productType === 2 ? dataIds.push(e.id) : courseIds.push(e.id)
result.push(this.createParam(e))
}
})
const promises = []
//
dataIds.length && promises.push(new Promise((resolve, reject) => {
this.handleRenew(0, customerId, dataIds, result, resolve, reject)
}))

@ -5,7 +5,7 @@
<uni-list-item thumb-size="sm" showArrow title="二维码邀请" clickable>
<template v-slot:header>
<view class="slot-box">
<image class="icon" src="../../static/image/qrcode.png" mode="widthFix"></image>
<image class="icon" src="@/static/image/qrcode.png" mode="widthFix"></image>
</view>
</template>
<template v-slot:body>

@ -185,11 +185,7 @@
}).then(({ result }) => {
const { customer } = result
this.form = customer
this.$refs.nameInput.val = customer.name
this.$refs.phoneInput.val = customer.phone
this.$refs.accountInput.val = customer.account
this.$refs.positionInput.val = customer.position
this.$refs.emailInput.val = customer.email
!this.isDetail && customer.industryClassId && this.getIndustry()
this.customerType = this.customerTypeList.find(e => e.value === customer.customerType).name
}).catch(e => {})
},

@ -14,13 +14,25 @@
<template v-if="list.length">
<ul class="list">
<li v-for="item in list" @click="toDetail(item)">
<view class="name">{{ item.customerName }}</view>
<view class="c-name">{{ item.customerName }}</view>
<view class="info">
<view class="left">
<view class="text">联系人{{ item.orderContact }}</view>
<view class="text">账号{{ item.account }}</view>
<view class="text">产品到期时间{{ item.expireDate.replace(' 00:00:00', '') }}</view>
<view class="text">商务经理{{ item.account }}</view>
<view class="line">
<text class="name">联系人</text>
<text class="val">{{ item.orderContact }}</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.expireDate.replace(' 00:00:00', '') }}</text>
</view>
<view class="line">
<text class="name">商务经理</text>
<text class="val">{{ item.account }}</text>
</view>
</view>
<view class="type">
{{ menuList[0].detailList.find(e => e.value === item.customerType).title }}客户
@ -49,6 +61,10 @@
'key': 'customerType',
'isMutiple': false,
'detailList': [
{
'title': '全部',
'value': ''
},
{
'title': '正式',
'value': 1
@ -177,8 +193,8 @@
padding: 20rpx 40rpx;
border-bottom: 1px solid #f1f1f1;
}
.num {
font-size: 32rpx;
.c-name {
font-size: 30rpx;
color: #333;
}
.info {
@ -187,10 +203,20 @@
align-items: center;
margin-top: 10rpx;
}
.text {
padding: 8rpx 0;
font-size: 26rpx;
color: #ccc;
.line {
display: flex;
padding: 10rpx 0;
}
.name {
width: 200rpx;
margin-right: 10rpx;
font-size: 28rpx;
color: #999;
}
.val {
max-width: 70%;
font-size: 28rpx;
color: #333;
}
.type {
font-size: 28rpx;

@ -1,68 +1,72 @@
<template>
<view class="page">
<view class="block">
<view class="l-title">基本信息</view>
<uni-icons class="arrow" type="top" size="20" color="#007EFF"></uni-icons>
<view v-for="(item, i) in courses">
<view class="pro-name">
<view class="left">
<image v-if="item.miniProgramPictureAddress" class="icon" :src="item.miniProgramPictureAddress" mode="widthFix"></image>
{{ item.productName }}
</view>
<uni-icons class="del" type="trash" size="25" color="#ADADAD" @click="delCourse(i)"></uni-icons>
</view>
<view class="form-list">
<view class="line">
<view class="name">产品类型</view>
<view class="val">{{ item.provinceName }}</view>
</view>
<view class="line req">
<view class="name">使用期限</view>
<input type="text" v-model="item.periodOfUse" placeholder="请输入" @change="calcDate(item, !item.authority)">
</view>
<view class="line">
<view class="name">使用期限单位</view>
<uni-data-picker class="picker-input" placeholder="请选择" popup-title="请选择" preload :clear-icon="false" :localdata="units" v-model="item.options" @change="calcDate(item)"></uni-data-picker>
</view>
<view class="line req">
<view class="name">起止日期</view>
<uni-datetime-picker type="date" v-model="item.startTime" :border="false" @change="calcDate(item)">
<view :class="['ph', {val: item.startTime}]">
{{ item.endTime ? item.startTime + ' - ' + item.endTime : item.startTime}}
<template v-for="c in courses">
<view v-if="c.list.length" class="block">
<view class="l-title">{{ c.name }}</view>
<uni-icons class="arrow" type="top" size="20" color="#007EFF" @click="toggle(c)"></uni-icons>
<view v-show="!c.shrink">
<view v-for="(item, i) in c.list">
<view class="pro-name">
<view class="left">
<image v-if="item.miniProgramPictureAddress" class="icon" :src="item.miniProgramPictureAddress" mode="widthFix"></image>
{{ item.productName }}
</view>
<uni-icons class="del" type="trash" size="25" color="#ADADAD" @click="delCourse(c, i)"></uni-icons>
</view>
<view class="form-list">
<view class="line">
<view class="name">产品类型</view>
<view class="val">{{ item.provinceName }}</view>
</view>
<view class="line req">
<view class="name">使用期限</view>
<input type="text" v-model="item.periodOfUse" placeholder="请输入" @change="calcDate(item, !item.authority)">
</view>
<view class="line">
<view class="name">使用期限单位</view>
<uni-data-picker class="picker-input" placeholder="请选择" popup-title="请选择" preload :clear-icon="false" :localdata="units" v-model="item.options" @change="calcDate(item)"></uni-data-picker>
</view>
<view class="line req">
<view class="name">起止日期</view>
<uni-datetime-picker type="date" v-model="item.startTime" :border="false" @change="calcDate(item)">
<view :class="['ph', {val: item.startTime}]">
{{ item.endTime ? item.startTime + ' - ' + item.endTime : item.startTime}}
</view>
</uni-datetime-picker>
</view>
<view class="line req">
<view class="name">数量</view>
<view v-if="item.authority" class="val">1</view>
<input v-else type="text" v-model="item.accountNum" placeholder="请输入" @change="calcFinalPrice(item)">
</view>
<view class="line">
<view class="name">{{ item.authority ? '市场价' : '市场单价' }}</view>
<view class="val">{{ item.marketValue }}</view>
</view>
<view class="line">
<view class="name">结算价</view>
<view class="val">{{ item.settlementPrice }}</view>
</view>
<view class="line">
<view class="name">折扣率</view>
<view class="val">{{ item.discountRate }}</view>
</view>
<view class="line">
<view class="name">平台服务费</view>
<view class="val">{{ item.serviceFee }}</view>
</view>
<view class="line req">
<view class="name">成交价</view>
<view class="inline">
<input type="text" v-model="item.finalPrice" placeholder="请输入" @change="calcFinalValue(item)">
</view>
</view>
</uni-datetime-picker>
</view>
<view class="line req">
<view class="name">数量</view>
<view v-if="item.authority" class="val">1</view>
<input v-else type="text" v-model="item.accountNum" placeholder="请输入" @change="calcFinalPrice(item)">
</view>
<view class="line">
<view class="name">{{ item.authority ? '市场价' : '市场单价' }}</view>
<view class="val">{{ item.marketValue }}</view>
</view>
<view class="line">
<view class="name">结算价</view>
<view class="val">{{ item.settlementPrice }}</view>
</view>
<view class="line">
<view class="name">折扣率</view>
<view class="val">{{ item.discountRate }}</view>
</view>
<view class="line">
<view class="name">平台服务费</view>
<view class="val">{{ item.serviceFee }}</view>
</view>
<view class="line req">
<view class="name">成交价</view>
<view class="inline">
<input type="text" v-model="item.finalPrice" placeholder="请输入" @change="calcFinalValue(item)">
</view>
</view>
</view>
</view>
</view>
</template>
<view class="btn-wrap">
<view class="btn" @click="submit">确定</view>
</view>
@ -85,7 +89,7 @@
text: '年',
value: 2
}],
courses: [], //
courses: {} , //
orderRepeat: [],
repeatMsg: ''
}
@ -94,23 +98,54 @@
const pages = getCurrentPages()
const { options } = pages[pages.length - 1]
this.customerId = options.customerId
const store = uni.getStorageSync('courses')
if (store) {
this.courses = store
this.handleProduct()
},
methods: {
//
handleProduct() {
const list = uni.getStorageSync('courses')
const courses = {
practice: {
shrink: false,
name: '实训课程产品',
list: []
},
theory: {
shrink: false,
name: '理论课程产品',
list: []
},
data: {
shrink: false,
name: '数据产品',
list: []
}
}
// 3push(0-> 1- 2 )
list.map(e => {
const type = e.productType
!type ?
courses.theory.list.push(e) :
type === 1 ?
courses.practice.list.push(e) :
courses.data.list.push(e)
})
this.courses = courses
try {
uni.removeStorageSync('courses')
} catch (e) {}
}
},
methods: {
},
//
toggle(c) {
c.shrink = !c.shrink
},
//
delCourse(i) {
const that = this
delCourse(c, i) {
uni.showModal({
title: '提示',
content: '确定要删除吗?',
success(res) {
res.confirm && that.courses.splice(i, 1)
res.confirm && c.list.splice(i, 1)
}
})
},
@ -236,8 +271,13 @@
},
//
submit() {
const list = this.courses
const courses = this.courses
const list = []
let msg = ''
// push便
for (const i in courses) {
list.push(...courses[i].list)
}
//
for (const i in list) {
const e = list[i]

@ -1,39 +1,40 @@
<template>
<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" v-model="partnerId" @change="teamChange"></uni-data-picker>
<uni-data-picker class="picker-input" placeholder="切换团队" popup-title="切换团队" preload :clear-icon="false" :localdata="list" :map="{text: 'partnerClassificationName', value: 'partnerId'}" v-model="partnerId" @change="teamChange"></uni-data-picker>
</view>
<image class="banner" src="../../static/image/index/index1.png" mode="widthFix"></image>
<image class="banner" src="@/static/image/index/index1.png" mode="widthFix"></image>
<ul class="entry">
<li @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>
</li>
<li @click="$util.to('../plans/plans')">
<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>
</li>
<li @click="$util.to('../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>
</li>
<li @click="$util.to('../products/products')">
<image class="icon" src="../../static/image/index/index6.png" mode="widthFix"></image>
<image class="icon" src="@/static/image/index/index6.png" mode="widthFix"></image>
<view class="text">产品</view>
</li>
</ul>
<view class="panel">
<view class="title">
<view class="title" @click="toPanel(1)">
<view class="left">
<image class="icon" src="../../static/image/index/index8.png" mode="widthFix"></image>
<image class="icon" src="@/static/image/index/index8.png" mode="widthFix"></image>
销售进展
</view>
<view class="right">
<image class="date" src="../../static/image/index/index7.png" mode="widthFix"></image>
<image class="date" src="@/static/image/index/index7.png" mode="widthFix"></image>
<text>本月</text>
<image class="arrow" src="../../static/image/index/index10.png" mode="widthFix"></image>
<image class="arrow" src="@/static/image/index/index10.png" mode="widthFix"></image>
</view>
</view>
<view class="data first">
@ -62,12 +63,12 @@
<view class="panel">
<view class="title">
<view class="title y-title" @click="toPanel(1)">
<view class="left">
<image class="icon" src="../../static/image/index/index9.png" mode="widthFix"></image>
<image class="icon" src="@/static/image/index/index9.png" mode="widthFix"></image>
年度业绩看板
</view>
<image class="arrow" src="../../static/image/index/index10.png" mode="widthFix"></image>
<image class="arrow" src="@/static/image/index/index10.png" mode="widthFix"></image>
</view>
<view class="data second">
<view class="line">
@ -109,26 +110,21 @@
//
getInfo() {
getTeamsByAccountId().then(({ data }) => {
const result = []
data.map(e => {
result.push({
text: e.partnerClassificationName,
value: e.partnerId
})
})
//
if (result.length) {
const val = result[0].value
this.partnerId = val
uni.setStorageSync('partnerId', val)
uni.setStorageSync('partnerClassificationName', result[0].text)
if (data.length) {
this.partnerId = data[0].partnerId
uni.setStorageSync('team', data[0])
}
this.list = result
this.list = data
}).catch(e => {})
},
//
teamChange() {
uni.setStorageSync('partnerId', this.partnerId)
},
//
toPanel(i) {
this.$util.errMsg('功能暂未开放!')
}
}
}
@ -136,9 +132,17 @@
<style scoped lang="scss">
.page {
position: relative;
min-height: 100%;
padding: 30rpx 22rpx;
background: url(../../static/image/index/index2.png) 0 0/100% 100% no-repeat;
}
.bg {
z-index: -1;
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
.team {
width: 200rpx;
@ -173,6 +177,9 @@
padding: 17rpx 20rpx;
background: linear-gradient(90deg, #E5EFFF 0%, #FFFFFF 100%);
}
.y-title {
background: linear-gradient(90deg, #FFF5E5 0%, #FFFFFF 100%);
}
.left {
display: flex;
align-items: center;

@ -3,7 +3,7 @@
<view class="title">Annie 邀请你加入</view>
<view class="form">
<view class="icon">
<image src="../../static/image/house.png" mode=""></image>
<image src="@/static/image/house.png" mode=""></image>
</view>
<view class="des">或然科技城市合伙人计划</view>
<view class="des">加入并自动为你创建一个团队群组</view>

@ -1,19 +1,19 @@
<template>
<view class="page">
<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>
<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>
绑定手机
</button>
<template v-else>
<view class="btn wechat" @click="login">
<image src="../../static/image/wechat.png" mode="widthFix"></image>
<image src="@/static/image/wechat.png" mode="widthFix"></image>
微信授权登录
</view>
<view class="btn phone">
<image src="../../static/image/phone.png" mode="widthFix"></image>
<image src="@/static/image/phone.png" mode="widthFix"></image>
手机账号登录
</view>
</template>
@ -30,6 +30,7 @@
<script>
import { login, userBinding } from '@/apis/modules/user.js'
import WXBizDataCrypt from '@/libs/WXBizDataCrypt'
export default {
data() {
return {
@ -103,7 +104,7 @@
onGetPhoneNumber(e){
const { encryptedData, iv } = e.detail
// 1.使js2.使
const WXBizDataCrypt = require('@/libs/WXBizDataCrypt')
// const WXBizDataCrypt = require('@/libs/WXBizDataCrypt')
const accountInfo = uni.getAccountInfoSync() // appid
const pc = new WXBizDataCrypt(accountInfo.miniProgram.appId , this.sessionKey)
const data = pc.decryptData(encryptedData , iv)
@ -120,9 +121,10 @@
toAgreement(id) {
this.$util.to('../detail/detail?id=' + id)
},
//
toIndex() {
uni.reLaunch({
url: '../main/main'
url: '../index/index'
})
}
}
@ -133,8 +135,8 @@
.page {
min-height: calc(100vh - 170rpx);
padding-top: 170rpx;
background: url(../../static/image/login1.png) 0 0/175rpx auto no-repeat,
url(../../static/image/login2.png) bottom right/123rpx auto no-repeat;
background: url(@/static/image/login1.png) 0 0/175rpx auto no-repeat,
url(@/static/image/login2.png) bottom right/123rpx auto no-repeat;
overflow: hidden;
}
.wrap {

@ -55,8 +55,8 @@
<template v-for="c in courseList">
<view v-if="c.list.length" class="block pro-wrap">
<view class="l-title">{{ c.name }}</view>
<uni-icons class="arrow" type="top" size="20" color="#007EFF"></uni-icons>
<ul class="pro-list">
<uni-icons class="arrow" type="top" size="20" color="#007EFF" @click="toggle(c)"></uni-icons>
<ul class="pro-list" v-show="!c.shrink">
<li v-for="(item, i) in c.list">
<view class="name">
<view class="left">
@ -196,8 +196,12 @@
this.getInfo()
} else if (store) {
//
this.handleProduct(store)
this.courses = store
const list = []
for (const i in store) {
list.push(...store[i].list)
}
this.courseList = store
this.courses = list
try {
uni.removeStorageSync('courses')
} catch (e) {}
@ -234,19 +238,21 @@
handleProduct(list) {
const courses = {
practice: {
shrink: false,
name: '实训课程产品',
list: []
},
theory: {
shrink: false,
name: '理论课程产品',
list: []
},
data: {
shrink: false,
name: '数据产品',
list: []
}
}
console.log(111, list)
// 3push(0-> 1- 2 )
list.map(e => {
e.serviceFee = (e.settlementPrice * 0.1).toFixed(2)
@ -257,7 +263,6 @@
courses.practice.list.push(e) :
courses.data.list.push(e)
})
console.log(222, courses)
this.courseList = courses
},
//
@ -316,7 +321,6 @@
},
//
delCourse(c, i) {
const that = this
uni.showModal({
title: '提示',
content: '确定要删除吗?',
@ -325,6 +329,10 @@
}
})
},
//
toggle(c) {
c.shrink = !c.shrink
},
//
calcTotal() {
let total = 0

@ -13,22 +13,46 @@
</view>
<template v-if="list.length">
<ul class="list">
<li v-for="item in list" @click="toDetail(item)">
<view class="num">{{ item.orderNumber }}</view>
<view class="info">
<view class="left">
<view class="text">客户名称{{ item.customerName }}</view>
<view class="text">订单金额{{ item.orderAmount }}</view>
<view class="text">订单内容{{ item.orderContent }}</view>
<view class="text">下单日期{{ item.createTime }}</view>
<view class="list">
<uni-swipe-action>
<uni-swipe-action-item
v-for="item in list"
:threshold="0"
:right-options="delOption"
@click="del(item)"
>
<view class="item" @click="toDetail(item)">
<view class="c-name">{{ item.orderNumber }}</view>
<view class="info">
<view class="left">
<view class="line">
<text class="name">客户名称</text>
<text class="val">{{ item.customerName }}</text>
</view>
<view class="line">
<text class="name">订单金额</text>
<text class="val">{{ item.orderAmount }}</text>
</view>
<view class="line">
<text class="name">订单内容</text>
<view class="val ell-wrap">
<view :class="{ell: !item.toggle}">{{ item.orderContent }}</view>
<view v-if="!item.toggle" class="toggle" @click.stop="toggle(item)">展开</view>
</view>
</view>
<view class="line">
<text class="name">下单日期</text>
<text class="val">{{ item.createTime }}</text>
</view>
</view>
<view :class="['type', 'type' + item.orderStatus]">
{{ menuList[0].detailList.find(e => e.value === item.orderStatus).title }}
</view>
</view>
</view>
<view :class="['type', 'type' + item.orderStatus]">
{{ menuList[0].detailList.find(e => e.value === item.orderStatus).title }}
</view>
</view>
</li>
</ul>
</uni-swipe-action-item>
</uni-swipe-action>
</view>
<uni-load-more :status="status" />
</template>
<empty v-else></empty>
@ -39,7 +63,7 @@
<script>
import { queryCustomer } from '@/apis/modules/client.js'
import { list } from '@/apis/modules/order.js'
import { list, del } from '@/apis/modules/order.js'
import slFilter from '@/components/sl-filter/sl-filter.vue'
export default {
data() {
@ -51,6 +75,10 @@
'key': 'orderStatus',
'isMutiple': false,
'detailList': [
{
'title': '全部',
'value': ''
},
{
'title': '待发货',
'value': 0
@ -99,7 +127,13 @@
keyword: '',
list: [],
page: 1,
pageSize: 10
pageSize: 10,
delOption: [{
text: '删除',
style: {
backgroundColor: '#F56C6C'
}
}],
}
},
components: {
@ -146,7 +180,11 @@
orderStatus: this.orderStatus
}).then(({ data }) => {
// list
this.list = this.reachBottom > 0 ? [...this.list, ...data.records] : data.records
const list = data.records
list.map(e => {
e.toggle = e.orderContent.length < 14 // 14
})
this.list = this.reachBottom > 0 ? [...this.list, ...list] : list
this.page++ // page+1
const noMore = this.list.length === data.total //
this.status = noMore ? 'noMore' : 'more' // noMore
@ -158,11 +196,14 @@
this.reachBottom = 0
this.getList()
},
//
toggle(item) {
item.toggle = !item.toggle
},
//
result(val) {
console.log(33, val)
this.orderStatus = val.orderStatus !== '' ? val.orderStatus : 0
this.sort = val.sort || 'desc'
if (val.orderStatus !== undefined) this.orderStatus = val.orderStatus
if (val.sort) this.sort = val.sort
this.initList()
},
// tab
@ -172,7 +213,26 @@
//
toDetail(item) {
this.$util.to(`../orderDetail/orderDetail?orderId=${item.orderId}&show=1`)
}
},
//
del(e) {
console.log(e);
const that = this
uni.showModal({
title: '提示',
content: '确定要删除吗?',
success(res) {
if (res.confirm) {
del({
ids: [e.orderId]
}).then(res => {
that.$util.sucMsg('删除成功')
that.initList()
}).catch(res => {})
}
}
})
},
}
}
</script>
@ -184,12 +244,12 @@
.list {
margin-top: 20rpx;
background-color: #fff;
li {
.item {
padding: 20rpx 40rpx;
border-bottom: 1px solid #f1f1f1;
}
.num {
font-size: 32rpx;
.c-name {
font-size: 30rpx;
color: #333;
}
.info {
@ -198,10 +258,34 @@
align-items: center;
margin-top: 10rpx;
}
.text {
padding: 8rpx 0;
font-size: 26rpx;
color: #ccc;
.left {
max-width: 70%;
}
.line {
display: flex;
padding: 10rpx 0;
}
.name {
margin-right: 10rpx;
white-space: nowrap;
font-size: 28rpx;
color: #999;
}
.val {
max-width: 88%;
font-size: 28rpx;
color: #333;
}
.ell {
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
}
.toggle {
margin-top: 10rpx;
white-space: nowrap;
font-size: 24rpx;
color: #0e92ef;
}
.type {
margin-left: 20rpx;

@ -1,32 +1,32 @@
<template>
<view class="page">
<image class="bg" src="../../static/image/person-bg.png"></image>
<image class="bg" src="@/static/image/person-bg.png"></image>
<view class="wrap">
<view class="info">
<image class="avatar" src="../../static/image/avatar.png" mode=""></image>
<image class="avatar" :src="avatar" mode=""></image>
<view class="text">
<view class="name">仲达</view>
<view class="name">{{ userName }}</view>
<view class="phone">1356231564</view>
</view>
</view>
<view class="list">
<view class="item">
<view class="left">
<image class="icon" src="../../static/image/person1.png" mode=""></image>
<image class="icon" src="@/static/image/person1.png" mode=""></image>
<text class="name">我的收益</text>
</view>
<text class="val">231323</text>
</view>
<view class="item">
<view class="left">
<image class="icon" src="../../static/image/person2.png" mode=""></image>
<image class="icon" src="@/static/image/person2.png" mode=""></image>
<text class="name">团队收益</text>
</view>
<text class="val">231323</text>
</view>
<view class="item" @click="$util.to('../setting/setting')">
<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>
</view>
</view>
@ -39,7 +39,8 @@
export default {
data() {
return {
avatar: uni.getStorageSync('avatar') || '@/static/image/avatar.png',
userName: uni.getStorageSync('userName'),
}
},
methods: {
@ -69,6 +70,7 @@
width: 120rpx;
height: 120rpx;
margin-right: 28rpx;
border-radius: 50%;
}
.name {
margin-bottom: 10rpx;

@ -9,28 +9,31 @@
<li v-for="(tab, i) in tabs" :class="{active: curTab === tab.id}" @click="tabChange(tab)">{{ tab.name }}</li>
</ul>
<ul v-if="list.length" class="list">
<li v-for="(item, i) in list">
<view class="name">{{ item.name }}</view>
<view v-if="list.length" class="list">
<view v-for="(item, i) in list" class="item">
<view class="c-name">{{ item.name }}</view>
<view class="content">
<view class="info">
<view class="line">
<view class="label">产品</view>
<view class="val" v-html="item.product"></view>
<view class="name">产品</view>
<view class="val ell-wrap">
<view :class="{ell: !item.toggle}" v-html="item.product"></view>
<view v-if="!item.toggle" class="toggle" @click.stop="toggle(item)">展开</view>
</view>
</view>
<view class="line">
<view class="label">更新日期</view>
<view class="name">更新日期</view>
<view class="val">{{ item.date }}</view>
</view>
<view class="line">
<view class="label">适用专业</view>
<view class="name">适用专业</view>
<view class="val">{{ item.major }}</view>
</view>
</view>
<view class="detail" @click="toDetail(i + 2)">详情</view>
</view>
</li>
</ul>
</view>
</view>
<empty v-else></empty>
</view>
</template>
@ -58,6 +61,7 @@
all: [
{
type: 1,
toggle: false,
name: '人工智能实验室建设方案-2020.1',
product: `python程序设计实验教学系统<br>
Docker技术实验教学系统<br>
@ -69,6 +73,7 @@
},
{
type: 1,
toggle: false,
name: '大数据管理与应用专业建设方案',
product: `python程序设计实验教学系统<br>
量化投资实验教学系统<br>
@ -83,6 +88,7 @@
},
{
type: 1,
toggle: false,
name: '金融科技实验室建设方案V2.0',
product: `python程序设计实验教学系统<br>
量化投资实验教学系统<br>
@ -126,6 +132,10 @@
//
toDetail(id) {
this.$util.to('../detail/detail?id=' + id)
},
//
toggle(item) {
item.toggle = !item.toggle
}
}
}
@ -144,17 +154,17 @@
}
.list {
background-color: #fff;
li {
padding: 40rpx;
border-bottom: 1px solid #f8f8f8;
.item {
padding: 20rpx 40rpx;
border-bottom: 1px solid #f1f1f1;
}
.name {
font-size: 28rpx;
.c-name {
font-size: 30rpx;
color: #333;
}
.line {
display: flex;
margin-bottom: 20rpx;
padding: 10rpx 0;
}
.content {
display: flex;
@ -162,18 +172,29 @@
align-items: center;
margin-top: 20rpx;
}
.info {
margin: 10rpx 0;
}
.label {
.name {
width: 140rpx;
font-size: 24rpx;
color: #898989;
margin-right: 10rpx;
white-space: nowrap;
font-size: 28rpx;
color: #999;
}
.val {
max-width: 88%;
font-size: 28rpx;
color: #333;
}
.ell {
height: 38rpx;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
}
.toggle {
margin-top: 10rpx;
white-space: nowrap;
font-size: 24rpx;
line-height: 1.8;
color: #898989;
color: #0e92ef;
}
.detail {
margin-left: 20rpx;

@ -20,7 +20,10 @@
<view class="info">
<view class="line">
<text class="name">产品简介</text>
<text class="val">{{ item.briefIntroduction }}</text>
<view class="val ell-wrap">
<view :class="{ell: !item.toggle}">{{ item.briefIntroduction }}</view>
<view v-if="!item.toggle" class="toggle" @click="toggle(item)">展开</view>
</view>
</view>
<view class="line">
<text class="name">产品类型</text>
@ -138,7 +141,11 @@
pageSize: this.pageSize
}).then(({ data }) => {
// list
this.list = this.reachBottom > 0 ? [...this.list, ...data.records] : data.records
const list = data.records
list.map(e => {
e.toggle = e.briefIntroduction.length < 14 // 14
})
this.list = this.reachBottom > 0 ? [...this.list, ...list] : list
this.page++ // page+1
const noMore = this.list.length === data.total //
this.status = noMore ? 'noMore' : 'more' // noMore
@ -150,6 +157,10 @@
this.reachBottom = 0
this.getList()
},
//
toggle(item) {
item.toggle = !item.toggle
},
//
result(val) {
this.sort = val.sort
@ -212,5 +223,20 @@
font-size: 28rpx;
color: #333;
}
.ell-wrap {
display: inline-flex;
align-items: center;
}
.ell {
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
}
.toggle {
margin-left: 10rpx;
white-space: nowrap;
font-size: 24rpx;
color: #0e92ef;
}
}
</style>

@ -2,7 +2,7 @@
<view class="page">
<view class="wrap">
<view class="info">
<image class="avatar" src="../../static/avatar.jpg" mode=""></image>
<image class="avatar" src="@/static/image/avatar.png" mode=""></image>
<view class="text">
<view class="invite">
<text class="name">Jane</text> 邀请你加入

@ -1,12 +1,12 @@
<template>
<view>
<uni-card :is-shadow="false" :border="false" is-full spacing="0" margin="20">
<uni-search-bar class="search" radius="5" placeholder="请输入成员名称" clearButton="auto" cancelButton="none" @confirm="search" />
<uni-search-bar class="search" radius="5" placeholder="请输入成员名称" clearButton="auto" cancelButton="none" v-model="keyword" />
</uni-card>
<ul class="list">
<li @click="toPage('../addMember/addMember')">
<image class="avatar" src="../../static/avatar.jpg" mode=""></image>
<li v-for="item in list">
<image class="avatar" src="@/static/image/avatar.png" mode=""></image>
<view class="info">
<view class="name">Luna</view>
<view class="text">手机号码1352351253</view>
@ -15,26 +15,67 @@
</li>
</ul>
<uni-icons class="plus" type="plus-filled" size="60" color="#007eff" @click="toPage('../addStaff/addStaff')"></uni-icons>
<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'
export default {
data() {
return {
reachBottom: 0, // 0->,1->,-1->
status: 'more', // more|loading|noMore
searchTimer: null,
keyword: '',
list: [],
page: 1,
pageSize: 10
}
},
watch: {
keyword () {
clearTimeout(this.searchTimer)
this.searchTimer = setTimeout(() => {
this.initList()
}, 500)
}
},
//
onPullDownRefresh() {
this.initList()
setTimeout(() => {
uni.stopPullDownRefresh()
}, 1500)
},
//
onReachBottom() {
if (this.reachBottom >= 0) {
this.reachBottom = 1
this.status = 'loading'
this.getList()
}
},
onShow() {
this.initList()
},
methods: {
search(res) {
uni.showToast({
title: '搜索:' + res.value,
icon: 'none'
})
getList() {
teamList({
id: uni.getStorageSync('team').teamId
}).then(({ data }) => {
// list
this.list = this.reachBottom > 0 ? [...this.list, ...data.records] : data.records
this.page++ // page+1
const noMore = this.list.length === data.total //
this.status = noMore ? 'noMore' : 'more' // noMore
this.reachBottom = noMore ? -1 : 0 // -1
}).catch(e => {})
},
toPage(path) {
this.$util.to(path)
initList() {
this.page = 1
this.reachBottom = 0
this.getList()
}
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.6 KiB

@ -1,20 +0,0 @@
@font-face {
font-family: "customicons"; /* Project id 2878519 */
src:url('/static/customicons.ttf') format('truetype');
}
.customicons {
font-family: "customicons" !important;
}
.youxi:before {
content: "\e60e";
}
.wenjian:before {
content: "\e60f";
}
.zhuanfa:before {
content: "\e610";
}

Binary file not shown.

@ -3,6 +3,7 @@ button[type=primary] {
}
page {
height: 100%;
background-color: #f5f5f5;
}
ul {
padding-left: 0;

Loading…
Cancel
Save