master V1.0.0
yujialong 2 years ago
parent 851b60ec81
commit 08bce81031
  1. 4
      apis/modules/parner.js
  2. 4
      config/request.js
  3. 7
      manifest.json
  4. 10
      order/editCourse/editCourse.vue
  5. 82
      order/orderDetail/orderDetail.vue
  6. 41
      order/orders/orders.vue
  7. 13
      pages.json
  8. 6
      pages/addStaff/addStaff.vue
  9. 21
      pages/clientDetail/clientDetail.vue
  10. 91
      pages/editTeam/editTeam.vue
  11. 1
      pages/index/index.vue
  12. 1
      pages/products/products.vue
  13. 51
      pages/qrcode/qrcode.vue
  14. 2
      pages/teamDetail/teamDetail.vue
  15. 29
      pages/teams/teams.vue
  16. BIN
      static/image/1.jpg
  17. BIN
      static/image/wechat-code.jpeg
  18. 21
      styles/common.scss

@ -36,3 +36,7 @@ export const teamPartnerList = (data) => {
export const queryTeamMembers = (data) => { export const queryTeamMembers = (data) => {
return post('nakadai/nakadai/partnerAccount/queryTeamMembers', data) return post('nakadai/nakadai/partnerAccount/queryTeamMembers', data)
} }
export const updatePartner = (data) => {
return post('nakadai/nakadai/partnerClassification/update', data)
}

@ -5,9 +5,9 @@
*/ */
export default { export default {
// baseURL: 'https://huorantech.cn/', baseURL: 'https://huorantech.cn/',
// baseURL: 'http://192.168.31.151: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'
}, },

@ -1,5 +1,5 @@
{ {
"name" : "或然crm", "name" : "或然科技产业平台运营版",
"appid" : "__UNI__2E89BA6", "appid" : "__UNI__2E89BA6",
"description" : "", "description" : "",
"versionName" : "1.0.0", "versionName" : "1.0.0",
@ -54,7 +54,10 @@
"es6" : true, "es6" : true,
"minified" : true "minified" : true
}, },
"usingComponents" : true "usingComponents" : true,
"optimization" : {
"subPackages" : true
}
}, },
"vueVersion" : "2" "vueVersion" : "2"
} }

@ -47,7 +47,10 @@
</view> </view>
<view class="line"> <view class="line">
<view class="name">结算价</view> <view class="name">结算价</view>
<view class="val">{{ item.settlementPrice }}</view> <view class="inline">
<input type="number" v-model="item.settlementPrice" placeholder="请输入" @change="handleErr(item, 'settlementPrice')">
</view>
</view> </view>
<view class="line"> <view class="line">
<view class="name">折扣率</view> <view class="name">折扣率</view>
@ -359,6 +362,11 @@
msg = '请输入数量!' msg = '请输入数量!'
break break
} }
if (e.settlementPrice === '') {
this.err = 'settlementPrice' + suf
msg = '请输入结算价!'
break
}
if (e.finalPrice === '') { if (e.finalPrice === '') {
this.err = 'finalPrice' + suf this.err = 'finalPrice' + suf
msg = '请输入成交价!' msg = '请输入成交价!'

@ -85,7 +85,7 @@
</view> </view>
<view class="line"> <view class="line">
<view class="label">市场价</view> <view class="label">市场价</view>
<view class="val">{{ item.marketValue }}</view> <view class="val">{{ item.marketValue || 0 }}</view>
</view> </view>
<view class="line"> <view class="line">
<view class="label">结算价</view> <view class="label">结算价</view>
@ -139,6 +139,29 @@
</view> </view>
</view> </view>
<view v-if="isDetail" class="action">
<template v-if="form.isDel !== 1">
<template v-if="form.orderStatus === 1">
<view class="item" @click="toAction(`../orderDetail/orderDetail?orderId=${orderId}&action=edit`)">
<uni-icons class="icon" custom-prefix="iconfont" type="icon-edit" size="30" color="#959595"></uni-icons>
<view class="text">修改</view>
</view>
<view class="item" @click="toAction(`../orderDetail/orderDetail?orderId=${orderId}&action=renew`)">
<uni-icons class="icon" custom-prefix="iconfont" type="icon-product" size="30" color="#959595"></uni-icons>
<view class="text">续费</view>
</view>
</template>
<view v-else class="item" @click="toAction(`../orderDetail/orderDetail?orderId=${orderId}&action=handle`)">
<uni-icons class="icon" custom-prefix="iconfont" type="icon-edit" size="30" color="#959595"></uni-icons>
<view class="text">处理</view>
</view>
</template>
<view class="item" @click="del">
<uni-icons class="icon" type="trash-filled" size="30" color="#959595"></uni-icons>
<view class="text">删除</view>
</view>
</view>
<view class="popup-mask" v-show="customerVisible" @click="closeCustomer"></view> <view class="popup-mask" v-show="customerVisible" @click="closeCustomer"></view>
<view class="popup" v-show="customerVisible"> <view class="popup" v-show="customerVisible">
<view class="top">请选择客户</view> <view class="top">请选择客户</view>
@ -153,7 +176,7 @@
<script> <script>
import { queryCustomer, queryCustomerDetails } from '@/apis/modules/client.js' import { queryCustomer, queryCustomerDetails } from '@/apis/modules/client.js'
import { add, update, getDetail, renew, ship, miniProgramOrderRecord, bulkShipping } from '@/apis/modules/order.js' import { add, update, del, getDetail, renew, ship, miniProgramOrderRecord, bulkShipping } from '@/apis/modules/order.js'
import { teamList, getAllTeam } from '@/apis/modules/parner.js' import { teamList, getAllTeam } from '@/apis/modules/parner.js'
export default { export default {
data() { data() {
@ -226,11 +249,12 @@
const { options } = pages[pages.length - 1] const { options } = pages[pages.length - 1]
this.orderId = options.orderId this.orderId = options.orderId
this.isDetail = !!options.show this.isDetail = !!options.show
this.isEdit = options.text === '修改' const { action } = options
this.isHandle = options.text === '处理' this.isEdit = action === 'edit'
this.isRenew = options.text === '续费' this.isHandle = action === 'handle'
this.getTeam() this.isRenew = action === 'renew'
const store = uni.getStorageSync('courses') const store = uni.getStorageSync('courses')
this.getTeam(!store)
if (store) { if (store) {
// //
const list = [] const list = []
@ -244,7 +268,6 @@
selector: '#products', selector: '#products',
}) })
}) })
try { try {
uni.removeStorageSync('courses') uni.removeStorageSync('courses')
} catch (e) {} } catch (e) {}
@ -379,6 +402,31 @@
}) })
})) }))
}, },
toAction(url) {
uni.redirectTo({
url
})
},
//
del() {
const that = this
uni.showModal({
title: '提示',
content: '确定要删除吗?',
success(res) {
if (res.confirm) {
del({
ids: [that.orderId]
}).then(res => {
that.$util.sucMsg('删除成功')
setTimeout(() => {
uni.navigateBack()
}, 1000)
}).catch(res => {})
}
}
})
},
// //
getCustomer() { getCustomer() {
queryCustomer({ queryCustomer({
@ -427,10 +475,10 @@
this.closeCustomer() this.closeCustomer()
}, },
// //
getTeam() { getTeam(getInfo) {
getAllTeam().then(({ team }) => { getAllTeam().then(({ team }) => {
this.teams = team this.teams = team
this.orderId && this.getInfo() this.orderId && getInfo && this.getInfo() //
}).catch(res => {}) }).catch(res => {})
}, },
// //
@ -568,7 +616,6 @@
} }
this.courses = courses this.courses = courses
this.isEdit && bulkShipping({orderOthers: courses}).then(res => {}).catch(res => {}) // this.isEdit && bulkShipping({orderOthers: courses}).then(res => {}).catch(res => {}) //
console.log(11, this.courses)
}, },
// //
submit() { submit() {
@ -586,9 +633,15 @@
courses.push(...this.courseList[i].list) courses.push(...this.courseList[i].list)
} }
if (!courses.length) return this.$util.errMsg('请选择课程权限或数据权限后再确认订单!') if (!courses.length) return this.$util.errMsg('请选择课程权限或数据权限后再确认订单!')
courses.map(e => { let invalid = 0
courses.forEach(e => {
if (!e.periodOfUse) {
invalid = 1
return this.$util.errMsg('请输入使用期限!')
}
e.startTime = this.$util.formatDate(new Date(e.startTime), 'yyyy-MM-dd') e.startTime = this.$util.formatDate(new Date(e.startTime), 'yyyy-MM-dd')
}) })
if (invalid) return false
if (this.isRenew || courses.some(e => e.renew)) form.orderNature = 2 if (this.isRenew || courses.some(e => e.renew)) form.orderNature = 2
uni.showLoading({ uni.showLoading({
title: '提交中' title: '提交中'
@ -603,6 +656,7 @@
uni.hideLoading() uni.hideLoading()
this.$util.sucMsg('编辑成功') this.$util.sucMsg('编辑成功')
setTimeout(() => { setTimeout(() => {
// this.$util.to(`../orders/orders`)
uni.navigateBack() uni.navigateBack()
}, 1500) }, 1500)
}).catch(res => { }).catch(res => {
@ -614,6 +668,7 @@
uni.hideLoading() uni.hideLoading()
this.$util.sucMsg('添加成功') this.$util.sucMsg('添加成功')
setTimeout(() => { setTimeout(() => {
// this.$util.to(`../orders/orders`)
uni.navigateBack() uni.navigateBack()
}, 1500) }, 1500)
}).catch(res => { }).catch(res => {
@ -630,7 +685,10 @@
padding-bottom: 420rpx; padding-bottom: 420rpx;
} }
.show { .show {
padding-bottom: 280rpx; padding-bottom: 380rpx;
.bottom {
bottom: 100rpx;
}
} }
.pro-wrap { .pro-wrap {
position: relative; position: relative;

@ -12,8 +12,8 @@
<uni-swipe-action-item <uni-swipe-action-item
v-for="item in list" v-for="item in list"
:threshold="0" :threshold="0"
:right-options="item.ops" :right-options="ops"
@click="e => handle(e, item)" @click="e => handle(item)"
> >
<view class="item" @click="toDetail(item)"> <view class="item" @click="toDetail(item)">
<view class="c-name">{{ item.orderNumber }}</view> <view class="c-name">{{ item.orderNumber }}</view>
@ -112,23 +112,11 @@
pageSize: 10, pageSize: 10,
ops: [ ops: [
{ {
text: '处理', text: '删除',
style: {
backgroundColor: '#e08443'
}
},
{
text: '修改',
style: { style: {
backgroundColor: '#46c58b' backgroundColor: '#F56C6C'
} }
},
{
text: '续费',
style: {
backgroundColor: '#34b3fd'
} }
},
], ],
} }
}, },
@ -180,21 +168,7 @@
uni.hideLoading() uni.hideLoading()
// list // list
const list = orderPage.orders const list = orderPage.orders
const { ops } = this
list.map(e => { list.map(e => {
// pcpcisDel
const op = []
if (e.isDel !== 1) {
op.push(ops[e.orderStatus === 1 ? 1 : 0])
e.orderStatus === 1 && op.push(ops[2])
}
op.push({
text: '删除',
style: {
backgroundColor: '#F56C6C'
}
})
e.ops = op
e.toggle = e.orderContent.length < 14 // 14 e.toggle = e.orderContent.length < 14 // 14
}) })
this.list = this.reachBottom > 0 ? [...this.list, ...list] : list this.list = this.reachBottom > 0 ? [...this.list, ...list] : list
@ -236,9 +210,7 @@
this.$util.to(`../orderDetail/orderDetail?orderId=${item.orderId}&show=1`) this.$util.to(`../orderDetail/orderDetail?orderId=${item.orderId}&show=1`)
}, },
// //
handle(e, row) { handle(row) {
const { text } = e.content
if (text === '删除') {
const that = this const that = this
uni.showModal({ uni.showModal({
title: '提示', title: '提示',
@ -254,9 +226,6 @@
} }
} }
}) })
} else {
this.$util.to(`../orderDetail/orderDetail?orderId=${row.orderId}&text=${text}`)
}
}, },
} }
} }

@ -136,6 +136,15 @@
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
} }
,{
"path" : "pages/editTeam/editTeam",
"style" :
{
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
}
], ],
"subPackages": [{ "subPackages": [{
"root": "order", "root": "order",
@ -191,9 +200,9 @@
] ]
}], }],
"preloadRule": { "preloadRule": {
"order/orders/orders": { "pages/index/index": {
"network": "all", "network": "all",
"packages": ["__APP__"] "packages": ["order"]
} }
}, },
"condition": { // "condition": { //

@ -33,15 +33,9 @@
// //
getOrg() { getOrg() {
treeList().then(({ treeList }) => { treeList().then(({ treeList }) => {
this.handleOrg(treeList)
this.orgs = treeList this.orgs = treeList
}).catch(e => {}) }).catch(e => {})
}, },
// isTeam=1isTeam=1
handleOrg(list) {
list.forEach(e => {
})
},
// //
orgClick(e) { orgClick(e) {
this.orgTemp = e.id this.orgTemp = e.id

@ -355,25 +355,4 @@
margin-right: 10rpx; margin-right: 10rpx;
} }
} }
.action {
z-index: 2;
position: fixed;
bottom: 0;
display: flex;
justify-content: space-around;
width: 100%;
padding: 5px 10px;
padding-bottom: env(safe-area-inset-bottom);
background-color: #fff;
border-top: 1px solid #f3f3f3;
box-shadow: 0 -2px 2px #f5f5f5;
box-sizing: border-box;
.item {
text-align: center;
}
.text {
font-size: 10px;
color: #959595;
}
}
</style> </style>

@ -0,0 +1,91 @@
<template>
<view>
<uni-section title="组织架构" type="line">
<view class="page">
<view class="org-picker">
<uni-data-picker class="picker-input" placeholder="请选择组织" popup-title="请选择组织" preload :localdata="orgs" :map="{text: 'partnerClassificationName', value: 'id'}" v-model="org" @nodeclick="orgClick" @popupclosed="orgClose"></uni-data-picker>
</view>
<button type="primary" @click="submit">确定</button>
</view>
</uni-section>
</view>
</template>
<script>
import { treeList, updatePartner } from '@/apis/modules/parner.js'
export default {
data() {
return {
id: '',
areaId: '',
orgs: [],
org: '',
orgTemp: '',
extraIcon: {
color: '#007eff',
size: '22',
type: 'icon-qrcode'
}
}
},
onShow() {
const pages = getCurrentPages()
const { options } = pages[pages.length - 1]
this.id = options.id
this.org = +options.areaId || ''
this.getOrg()
},
methods: {
//
getOrg() {
treeList().then(({ treeList }) => {
this.orgs = treeList
}).catch(e => {})
},
//
orgClick(e) {
this.orgTemp = e.id
},
//
orgClose(e) {
this.org = this.orgTemp
},
//
submit() {
if(!this.org) return this.$util.errMsg('请选择区域')
updatePartner({
id: this.id,
isTeam: 1,
parentId: this.org
}).then(res => {
this.$util.sucMsg('修改成功!')
setTimeout(() => {
uni.navigateBack()
}, 1000)
}).catch(e => {})
}
}
}
</script>
<style scoped lang="scss">
.page {
padding: 0 20px 20px;
.org-picker {
margin-bottom: 20px;
}
}
.slot-box {
display: flex;
flex-direction: row;
align-items: center;
}
.icon {
width: 25px;
height: 25px;
margin-right: 10px;
}
.text {
font-size: 14px;
}
</style>

@ -28,7 +28,6 @@
<view class="text">产品</view> <view class="text">产品</view>
</li> </li>
</ul> </ul>
<view class="panel"> <view class="panel">
<view class="title" @click="toPanel(1)"> <view class="title" @click="toPanel(1)">
<view class="left"> <view class="left">

@ -178,6 +178,7 @@
border-bottom: 1px solid #E6E8ED; border-bottom: 1px solid #E6E8ED;
.icon { .icon {
width: 52rpx; width: 52rpx;
height: 52rpx;
margin-right: 20rpx; margin-right: 20rpx;
} }
} }

@ -10,8 +10,11 @@
</view> </view>
</view> </view>
</view> </view>
<u-qrcode ref="qrcode" canvas-id="qrcode" :size="size" :value="link"></u-qrcode> <u-qrcode class="qrcode" ref="qrcode" canvas-id="qrcode" isQueueLoadImage :size="size" :value="link" @complete="qrcodeComplete"></u-qrcode>
<view class="tips">扫一扫加入我们吧</view> <image class="qrcode-img" :src="qrcodeImg" show-menu-by-longpress @click="previewImage"></image>
<view class="tips" style="margin-top: 20rpx;">扫一扫加入我们吧</view>
<view class="tips">长按可转发至微信好友和保存图片</view>
</view> </view>
<view class="warn">邀请二维码失效日期{{ expireTime }}</view> <view class="warn">邀请二维码失效日期{{ expireTime }}</view>
</view> </view>
@ -32,6 +35,7 @@
qrcode: '', qrcode: '',
link: '', link: '',
size: uni.upx2px(420), size: uni.upx2px(420),
qrcodeImg: ''
} }
}, },
onShow() { onShow() {
@ -55,10 +59,38 @@
generateInvitationCode(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())}`
// this.link = `https://huorantech.cn/#/join?accountId=${accountId}&id=${this.id}&isTeam=0` this.link = `https://huorantech.cn/#/join?accountId=${accountId}&id=${this.id}&isTeam=1`
this.link = `http://121.37.12.51/backstage/#/join?accountId=${accountId}&id=${this.id}&isTeam=0` // this.link = `http://121.37.12.51/backstage/#/join?accountId=${accountId}&id=${this.id}&isTeam=1`
}).catch(e => {}) }).catch(e => {})
}, },
// imageimage
qrcodeComplete() {
this.$refs.qrcode.toTempFilePath({
success: res => {
this.qrcodeImg = res.tempFilePath
}
});
},
previewImage(e){
uni.previewImage({
// urls
urls: [e.target.src],
// /
current: e.target.src,
//
indicator:'default',
//
loop:false,
//
// longPressActions:{
// itemList:[this.l(''),this.l]
// },
success: res => {
console.log('previewImage res', res);
},
fail: err => {}
})
},
} }
} }
</script> </script>
@ -76,6 +108,7 @@
text-align: center; text-align: center;
background-color: #fff; background-color: #fff;
.inner { .inner {
position: relative;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: center; justify-content: center;
@ -106,12 +139,20 @@
margin: 20rpx 0; margin: 20rpx 0;
font-size: 30rpx; font-size: 30rpx;
} }
.qrcode {
display: none;
}
.qrcode-img {
width: 420rpx;
height: 420rpx;
}
.tips { .tips {
margin: 30rpx 0 20rpx; margin-bottom: 10rpx;
font-size: 24rpx; font-size: 24rpx;
color: #333; color: #333;
} }
.warn { .warn {
margin-top: 10rpx;
font-size: 24rpx; font-size: 24rpx;
color: #f00; color: #f00;
} }

@ -42,7 +42,7 @@
keyword () { keyword () {
clearTimeout(this.searchTimer) clearTimeout(this.searchTimer)
this.searchTimer = setTimeout(() => { this.searchTimer = setTimeout(() => {
this.initList() this.getList()
}, 500) }, 500)
} }
}, },

@ -4,11 +4,10 @@
<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"> <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> <uni-data-picker class="picker-input" placeholder="请选择组织" popup-title="请选择组织" preload :localdata="orgs" :map="{text: 'partnerClassificationName', value: 'id'}" v-model="org" @change="initList" @nodeclick="orgClick" @popupclosed="orgClose"></uni-data-picker>
</view> </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" @click="toTeam(item)"> <li v-for="item in list" @click="toTeam(item)">
@ -44,6 +43,7 @@
<text class="val">{{ item.invitationAccount }}</text> <text class="val">{{ item.invitationAccount }}</text>
</view> </view>
</view> </view>
<view class="iconfont icon-edit" @click.stop="toEdit(item)"></view>
</li> </li>
</ul> </ul>
<uni-load-more :status="status" /> <uni-load-more :status="status" />
@ -68,7 +68,8 @@
keyword: '', keyword: '',
list: [], list: [],
page: 1, page: 1,
pageSize: 10 pageSize: 10,
isClose: 0
} }
}, },
watch: { watch: {
@ -107,14 +108,17 @@
}, },
orgClick(e) { orgClick(e) {
this.orgTemp = e.id this.orgTemp = e.id
this.org = e.id
this.initList()
}, },
// //
orgClose(e) { orgClose() {
this.org = this.orgTemp // this.org = this.orgTemp
this.initList() // this.isClose = 1
// this.initList()
}, },
// //
getList() { async getList() {
uni.showLoading({ uni.showLoading({
title: '加载中' title: '加载中'
}) })
@ -145,6 +149,10 @@
// //
toTeam(e) { toTeam(e) {
this.$util.to(`../teamDetail/teamDetail?id=${e.teamId}`) this.$util.to(`../teamDetail/teamDetail?id=${e.teamId}`)
},
//
toEdit(e) {
this.$util.to(`../editTeam/editTeam?id=${e.teamId}&areaId=${e.partnerClassificationId}`)
} }
} }
} }
@ -159,6 +167,7 @@
margin-top: 20rpx; margin-top: 20rpx;
background-color: #fff; background-color: #fff;
li { li {
position: relative;
display: flex; display: flex;
align-items: center; align-items: center;
padding: 20rpx 40rpx; padding: 20rpx 40rpx;
@ -192,6 +201,12 @@
font-size: 28rpx; font-size: 28rpx;
color: #333; color: #333;
} }
.iconfont {
position: absolute;
right: 50rpx;
font-size: 52rpx;
color: #0196ff;
}
} }
.plus { .plus {
position: fixed; position: fixed;

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 49 KiB

@ -219,3 +219,24 @@ ul {
-webkit-user-select: none; -webkit-user-select: none;
user-select: none; user-select: none;
} }
.action {
z-index: 2;
position: fixed;
bottom: 0;
display: flex;
justify-content: space-around;
width: 100%;
padding: 5px 10px;
padding-bottom: env(safe-area-inset-bottom);
background-color: #fff;
border-top: 1px solid #f3f3f3;
box-shadow: 0 -2px 2px #f5f5f5;
box-sizing: border-box;
.item {
text-align: center;
}
.text {
font-size: 10px;
color: #959595;
}
}
Loading…
Cancel
Save