订单、邀请等

master
yujialong 3 years ago
parent 4138ce6628
commit 0608fcf01c
  1. 34
      apis/modules/order.js
  2. 2
      apis/request.js
  3. 2
      components/sl-filter/sl-filter.vue
  4. 71
      pages.json
  5. 29
      pages/addStaff/addStaff.vue
  6. 21
      pages/clientDetail/clientDetail.vue
  7. 18
      pages/clients/clients.vue
  8. 28
      pages/index/index.vue
  9. 152
      pages/invite/invite.vue
  10. 15
      pages/orderDetail/orderDetail.vue
  11. 132
      pages/orders/orders.vue
  12. 23
      pages/send/send.vue
  13. BIN
      static/house.png
  14. BIN
      static/qrcode.png

@ -0,0 +1,34 @@
import request from '@/apis/request.js'
const { get, post } = request
export const queryCustomer = (data) => {
return post('nakadai/nakadai/customer/queryCustomer', data)
}
export const queryCustomerDetails = (data) => {
return get('nakadai/nakadai/customer/queryCustomerDetails', data)
}
export const querySchool = (data) => {
return get('nakadai/nakadai/school/querySchool', data)
}
export const queryIndustryClass = (data) => {
return get('nakadai/nakadai/hrIndustryClass/queryIndustryClass', data)
}
export const queryIndustry = (data) => {
return get('nakadai/nakadai/hrIndustry/queryIndustry', data)
}
export const queryCustomerIsExists = (data) => {
return get('nakadai/nakadai/customer/queryCustomerIsExists', data)
}
export const addCustomer = (data) => {
return post('nakadai/nakadai/customer/addCustomer', data)
}
export const updateCustomer = (data) => {
return post('nakadai/nakadai/customer/updateCustomer', data)
}

@ -12,7 +12,7 @@ const request = options => {
})
}
const header = Object.assign({}, config.headers, {
token: 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ1c2VyIiwiaWF0IjoxNjUyMjM0OTM2LCJleHAiOjE2NTIyNzgxMzYsImFjY291bnRJZCI6IjEifQ.QwmlBM6uDfRpW4xV8b0r3aBOqXQu5gWLj5Jbrlnrtcg'
token: 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ1c2VyIiwiaWF0IjoxNjUyMzIxMzkwLCJleHAiOjE2NTIzNjQ1OTAsImFjY291bnRJZCI6IjEifQ.TbdyqfODzJngOzLavF3Pb79eGzhuiCDeviRbj8ClU30'
})
return new Promise((resolve, reject)=>{
uni.request({

@ -2,7 +2,7 @@
<view class="content">
<view :style="{height: tabHeight + 1 +'px'}">
<view :class="topFixed?'select-tab-fixed-top':'select-tab'" :style="{height: tabHeight+'px'}">
<view class="select-tab-item" :style="{width: itemWidth}" v-for="(item,index) in titleList" :key="index" @tap="showMenuClick(index)">
<view class="select-tab-item" :style="{width: titleList.length === 1 ? 'auto' : itemWidth}" v-for="(item,index) in titleList" :key="index" @tap="showMenuClick(index)">
<text :style="{color:color}">{{item.title}}</text>
<text class="arrows sl-font" :class="statusList[index].isActive?up:down"></text>
</view>

@ -1,28 +1,44 @@
{
"pages": [
{
"path" : "pages/clients/clients",
{
"path" : "pages/send/send",
"style" :
{
"navigationBarTitleText": "客户列表",
"enablePullDownRefresh": true
"navigationBarTitleText": "下载发送",
"enablePullDownRefresh": false
}
},
{
"path" : "pages/orderDetail/orderDetail",
"path" : "pages/invite/invite",
"style" :
{
"navigationBarTitleText": "订单详情",
"navigationBarTitleText": "加入团队",
"enablePullDownRefresh": false
}
},
{
"path" : "pages/orders/orders",
"path" : "pages/addStaff/addStaff",
"style" :
{
"navigationBarTitleText": "订单列表",
"navigationBarTitleText": "添加成员",
"enablePullDownRefresh": false
}
},
{
"path" : "pages/addMember/addMember",
"style" :
{
"navigationBarTitleText": "添加成员",
"enablePullDownRefresh": false
}
},
{
"path" : "pages/clients/clients",
"style" :
{
"navigationBarTitleText": "客户列表",
"enablePullDownRefresh": true
}
},
{
"path": "pages/index/index",
@ -31,26 +47,34 @@
}
},
{
"path" : "pages/password/password",
"path" : "pages/orders/orders",
"style" :
{
"navigationBarTitleText": "修改密码",
"navigationBarTitleText": "订单列表",
"enablePullDownRefresh": false
}
},
{
"path" : "pages/setting/setting",
"path" : "pages/orderDetail/orderDetail",
"style" :
{
"navigationBarTitleText": "设置",
"navigationBarTitleText": "订单详情",
"enablePullDownRefresh": false
}
},
{
"path" : "pages/send/send",
"path" : "pages/password/password",
"style" :
{
"navigationBarTitleText": "下载发送",
"navigationBarTitleText": "修改密码",
"enablePullDownRefresh": false
}
},
{
"path" : "pages/setting/setting",
"style" :
{
"navigationBarTitleText": "设置",
"enablePullDownRefresh": false
}
},
@ -102,25 +126,6 @@
"navigationBarTitleText": "我的",
"enablePullDownRefresh": false
}
}
,{
"path" : "pages/addMember/addMember",
"style" :
{
"navigationBarTitleText": "添加成员",
"enablePullDownRefresh": false
}
}
,{
"path" : "pages/addStaff/addStaff",
"style" :
{
"navigationBarTitleText": "添加成员",
"enablePullDownRefresh": false
}
},
{
"path" : "pages/detail/detail",

@ -1,7 +1,18 @@
<template>
<view>
<uni-section title="邀请员工" type="line">
<uni-list-item :show-extra-icon="true" showArrow :extra-icon="extraIcon" title="二维码邀请" />
<uni-list>
<uni-list-item thumb-size="sm" showArrow title="二维码邀请" clickable>
<template v-slot:header>
<view class="slot-box">
<image class="icon" src="../../static/qrcode2.png" mode="widthFix"></image>
</view>
</template>
<template v-slot:body>
<text class="slot-box text">二维码邀请</text>
</template>
</uni-list-item>
</uni-list>
</uni-section>
</view>
</template>
@ -23,6 +34,18 @@
}
</script>
<style>
<style scoped lang="scss">
.slot-box {
display: flex;
flex-direction: row;
align-items: center;
}
.icon {
width: 25px;
height: 25px;
margin-right: 10px;
}
.text {
font-size: 14px;
}
</style>

@ -58,7 +58,7 @@
</view>
</uni-section>
<view class="action">
<view class="action" v-if="isDetail">
<view class="item" @click="toPage(`../clientDetail/clientDetail?customerId=${customerId}`)">
<uni-icons class="icon" custom-prefix="iconfont" type="icon-edit" size="20" color="#959595"></uni-icons>
<view class="text">编辑</view>
@ -159,8 +159,19 @@
this.isDetail = !!option.show
option.customerId && this.getInfo()
this.getSchool()
this.getIndustryClass()
//
if (!this.isDetail) {
this.getSchool()
this.getIndustryClass()
}
//
uni.setNavigationBarTitle({
title: option.customerId ?
(option.show ?
'客户详情' :
'编辑客户') :
'新增客户'
})
},
methods: {
//
@ -243,9 +254,7 @@
}, 1500)
}).catch(res => {})
}
}).catch(err => {
console.log('err', err);
})
}).catch(err => {})
},
}
}

@ -4,10 +4,13 @@
<li v-for="(tab, i) in tabs" :class="{active: curTab === tab.id}" @click="tabChange(tab)">{{ tab.name }}</li>
</ul>
<sl-filter :independence="true" :menuList="menuList" @result="result"></sl-filter>
<uni-card :is-shadow="false" :border="false" padding="0" is-full>
<uni-search-bar class="search" radius="5" placeholder="请输入客户名称" v-model="keyword" clearButton="auto" cancelButton="none" @confirm="search" />
<view class="filter">
<uni-search-bar class="search" radius="5" placeholder="请输入客户名称" v-model="keyword" clearButton="auto" cancelButton="none" @confirm="search" />
<sl-filter class="sl-filter" :independence="true" :menuList="menuList" @result="result"></sl-filter>
</view>
</uni-card>
<ul class="list">
@ -93,12 +96,14 @@
}, 500)
}
},
//
onPullDownRefresh() {
this.initList()
setTimeout(() => {
uni.stopPullDownRefresh()
}, 1500)
},
//
onReachBottom() {
if (this.reachBottom >= 0) {
this.reachBottom = 1
@ -152,15 +157,16 @@
.page {
padding-bottom: 90px;
}
.top {
.filter {
display: flex;
align-items: center;
padding: 5px 15px 5px 5px;
margin-bottom: 10px;
background-color: #fff;
.search {
flex: 1;
}
.sl-filter {
width: 30%;
margin-left: 10%;
}
}
.list {
margin-top: 10px;

@ -1,6 +1,9 @@
<template>
<view class="container">
首页
<button class="confirm-btn" @click="login1">微信授权登录</button>
<view class="v">
{{text}}
</view>
</view>
</template>
@ -8,18 +11,35 @@
export default {
data() {
return {
text: ''
}
},
onLoad() {
},
methods: {
login1() {
uni.login({
provider: 'weixin',
success: function (loginRes) {
console.log(loginRes);
//
uni.getUserInfo({
provider: 'weixin',
success: function (infoRes) {
console.log('用户昵称为:' + JSON.stringify(infoRes));
}
});
}
});
}
}
}
</script>
<style>
.v {
white-space: normal;
word-wrap: break-word;
}
</style>

@ -0,0 +1,152 @@
<template>
<view class="page">
<view class="title">Annie 邀请你加入</view>
<view class="form">
<view class="icon">
<image src="../../static/house.png" mode=""></image>
</view>
<view class="des">或然科技城市合伙人计划</view>
<view class="des">加入并自动为你创建一个团队群组</view>
<view class="input">
<uni-easyinput v-model="form.contact" placeholder="请填写你的真实姓名" :clearable="false" />
</view>
<view class="input">
<uni-easyinput v-model="form.contact" placeholder="请填写你的手机号" :clearable="false" />
</view>
<view class="input code-wrap">
<uni-easyinput class="code" v-model="form.contact" placeholder="验证码" :clearable="false" />
<view class="send-code" @click="sendCode" :disabled="codeDisabled">{{ btnText }}</view>
</view>
<button class="submit" type="primary" @click="submit('valiForm')">立即加入</button>
</view>
</view>
</template>
<script>
export default {
data() {
return {
form: {
name: '',
provience: '',
city: '',
},
codeDisabled: false,
phoneTimer: null,
phoneOpener: '',
btnText: '发送验证码',
}
},
onLoad() {
},
methods: {
submit(ref) {
this.$refs[ref].validate().then(res => {
console.log('success', res);
uni.showToast({
title: `校验通过`
})
}).catch(err => {
console.log('err', err);
})
},
//
phoneCountdown() {
let count = 60
if (!this.phoneTimer) {
this.codeDisabled = true
this.phoneTimer = setInterval(() => {
if (count > 0) {
count--
this.btnText = `${count}秒后重试`
} else {
this.codeDisabled = false
clearInterval(this.phoneTimer)
this.phoneTimer = null
this.btnText = `发送验证码`
}
}, 1000)
}
},
//
sendPhoneCode(bind) {
const { phone } = this.form
if (!phone) return this.$util.errMsg('请填写手机号!')
if (!/^1[3456789]\d{9}$/.test(phone) && !/^([a-zA-Z]|[0-9])(\w|\-)+@[a-zA-Z0-9]+\.([a-zA-Z]{2,4})$/.test(phone)) return this.$util.errMsg('请填写正确的手机号!')
// this.$post(this.api.sendPhoneOrEmailCode, {
// platform: Setting.platformId,
// phone,
// types: 2
// }).then(({ message }) => {
// if (message.opener) {
// this.phoneCountdown()
// this.phoneOpener = message.opener
// } else {
// util.errorMsg(message)
// }
// }).catch(res => {})
}
}
}
</script>
<style scoped lang="scss">
.page {
margin: 20px;
border-radius: 6px;
overflow: hidden;
.title {
padding: 0 15px;
line-height: 2.4;
font-size: 16px;
color: #fff;
background-color: #319bf7;
}
}
.form {
padding: 20px 20px 30px;
background-color: #fff;
.icon {
display: flex;
justify-content: center;
align-items: center;
width: 70px;
height: 70px;
margin: 20px auto;
border-radius: 4px;
background-color: $uni-primary;
image {
width: 40px;
height: 40px;
}
}
.des {
margin-bottom: 10px;
text-align: center;
font-size: 14px;
}
.input {
margin-bottom: 20px;
}
.code-wrap {
display: flex;
}
.code {
flex: 1;
}
.send-code {
width: 100px;
margin-left: 20px;
text-align: center;
color: #4386ff;
font-size: 12px;
line-height: 36px;
border: 1px solid #4386ff;
border-radius: 5px;
}
.submit {
border-radius: 40px;
}
}
</style>

@ -6,9 +6,6 @@
<uni-forms-item label="商务经理">
<uni-easyinput v-model="form.provience" disabled />
</uni-forms-item>
<uni-forms-item label="客户名称" name="contact" required>
<uni-easyinput v-model="form.contact" placeholder="请选择" disabled />
</uni-forms-item>
<uni-forms-item label="省份">
<uni-easyinput v-model="form.provience" disabled />
</uni-forms-item>
@ -16,25 +13,25 @@
<uni-easyinput v-model="form.city" disabled />
</uni-forms-item>
<uni-forms-item label="联系人">
<uni-easyinput v-model="form.provience" disabled />
<uni-easyinput v-model="form.orderContact" disabled />
</uni-forms-item>
<uni-forms-item label="电话">
<uni-easyinput v-model="form.city" disabled />
<uni-easyinput v-model="form.phone" disabled />
</uni-forms-item>
<uni-forms-item label="邮箱">
<uni-easyinput v-model="form.provience" disabled />
<uni-easyinput v-model="form.email" disabled />
</uni-forms-item>
<uni-forms-item label="订单类型">
<uni-data-checkbox v-model="form.orderType" :localdata="orderTypes" disabled></uni-data-checkbox>
</uni-forms-item>
<uni-forms-item label="订单编号">
<uni-easyinput v-model="form.provience" disabled />
<uni-easyinput v-model="form.orderNumber" disabled />
</uni-forms-item>
<uni-forms-item label="订单时间">
<uni-easyinput v-model="form.city" disabled />
<uni-easyinput v-model="form.createTime" disabled />
</uni-forms-item>
<uni-forms-item label="订单金额(元)">
<uni-easyinput v-model="form.provience" disabled />
<uni-easyinput v-model="form.orderAmount" disabled />
</uni-forms-item>
</uni-forms>
</view>

@ -4,15 +4,16 @@
<li v-for="(tab, i) in tabs" :class="{active: curTab === tab.id}" @click="tabChange(tab)">{{ tab.name }}</li>
</ul>
<view class="top">
<sl-filter :independence="true" :menuList="menuList" @result="result"></sl-filter>
<uni-card :is-shadow="false" :border="false" padding="0" is-full>
<uni-search-bar class="search" radius="5" placeholder="请输入姓名、订单号" clearButton="auto" cancelButton="none" @confirm="search" />
<uni-icons class="icon" custom-prefix="iconfont" type="icon-filter" size="18" color="#007eff"></uni-icons>
</view>
</uni-card>
<uni-card :is-shadow="false" :border="false" is-full>
<ul class="list">
<li @click="toPage('../clientDetail/clientDetail')">
<view class="name">中山大学</view>
<li @click="toDetail({})">
<view class="num">1652163515968</view>
<view class="info">
<view class="left">
<view class="text">客户名称海文</view>
@ -28,53 +29,47 @@
</ul>
</uni-card>
<uni-icons class="plus" type="plus-filled" size="60" color="#007eff" @click="toPage('../addOrder/addOrder')"></uni-icons>
<uni-icons class="plus" type="plus-filled" size="60" color="#007eff" @click="$util.to('../addOrder/addOrder')"></uni-icons>
</view>
</template>
<script>
import { queryCustomer } from '@/apis/modules/client.js'
import slFilter from '@/components/sl-filter/sl-filter.vue'
export default {
data() {
return {
menuList: [
{
'title': '客户类型',
'detailTitle': '请选择客户类型',
'key': 'customerType',
'title': '订单状态',
'detailTitle': '请选择订单状态',
'key': 'orderStatus',
'isMutiple': false,
'detailList': [
{
'title': '正式',
'value': 1
},
{
'title': '试用',
'value': 2
'title': '待发货',
'value': 0
},
{
'title': '到期',
'value': 3
'title': '已完成',
'value': 1
}
]
},
{
'title': '菜单3',
'detailTitle': '子标题3',
'title': '排序',
'detailTitle': '请选择排序(按下单日期)',
'key': 'key_3',
'isSort': true,
'isMutiple': false,
'detailList': [
{
'title': '条件_3_1',
'value': 'val_3_1'
},
{
'title': '条件_3_2',
'value': 'val_3_2'
'title': '顺序',
'value': 1
},
{
'title': '条件_3_3',
'value': 'val_3_3'
'title': '倒序',
'value': 2
}
]
}
@ -89,18 +84,83 @@
name: '团队全部订单',
id: 1
}
]
],
reachBottom: 0, // 0->,1->,-1->
isFilter: 0, // 0->,1->
status: 'more', // more|loading|noMore
searchTimer: null,
customerType: '',
keyword: '',
list: [],
page: 1,
pageSize: 10
}
},
components: {
slFilter
},
watch: {
keyword (newName, oldName) {
clearTimeout(this.searchTimer)
this.searchTimer = setTimeout(() => {
this.isFilter = 1
this.initList()
}, 500)
}
},
//
onPullDownRefresh() {
this.initList()
setTimeout(() => {
uni.stopPullDownRefresh()
}, 1500)
},
//
onReachBottom() {
if (this.reachBottom >= 0) {
this.reachBottom = 1
this.status = 'loading'
this.getList()
}
},
onLoad() {
// this.getList()
},
methods: {
search(res) {
uni.showToast({
title: '搜索:' + res.value,
icon: 'none'
})
getList() {
queryCustomer({
countries: '中国',
provinceId: '',
cityId: '',
searchContent: this.keyword,
page: this.page,
size: this.pageSize
}).then(({ message }) => {
// list
this.list = (this.reachBottom >= 0 && !this.isFilter) ? [...this.list, ...message.list] : message.list
this.page++ // page+1
const noMore = this.list.length === message.totalCount //
this.status = noMore ? 'noMore' : 'more' // noMore
this.reachBottom = noMore ? -1 : 0 // -1
this.isFilter = 0 // 0
}).catch(e => {})
},
initList() {
this.page = 1
this.getList()
},
//
result(val) {
console.log(val)
this.customerType = val.customerType
},
// tab
tabChange(tab) {
this.curTab = tab.id
},
toPage(path) {
this.$util.to(path)
//
toDetail(item) {
this.$util.to(`../orderDetail/orderDetail?customerId=${item.customerId}&show=1`)
}
}
}
@ -118,7 +178,7 @@
}
}
.list {
.name {
.num {
font-size: 16px;
color: #333;
}

@ -3,12 +3,12 @@
<uni-card :is-shadow="false" :border="false" is-full>
<view class="form">
<view class="line">
<uni-data-checkbox v-model="type" :localdata="my"></uni-data-checkbox>
<uni-data-checkbox v-model="myVal" :localdata="checkList" @change="myChange"></uni-data-checkbox>
<text>我的邮箱</text>
<uni-easyinput v-model="form.contact" />
<uni-easyinput v-model="form.contact" disabled />
</view>
<view class="line">
<uni-data-checkbox v-model="type1" :localdata="my"></uni-data-checkbox>
<uni-data-checkbox v-model="otherVal" :localdata="checkList" @change="otherChange"></uni-data-checkbox>
<text>其他邮箱</text>
<uni-easyinput v-model="form.contact" placeholder="请输入其他邮箱" />
</view>
@ -22,13 +22,9 @@
export default {
data() {
return {
type: 0,
type1: 1,
my: [{
text: '',
value: 0
}],
other: [{
myVal: 1,
otherVal: 2,
checkList: [{
text: '',
value: 1
}],
@ -49,7 +45,12 @@
console.log(getApp())
},
methods: {
onchange(e) {
myChange(e) {
this.otherVal = ''
console.log('---------onchange:', e);
},
otherChange(e) {
this.myVal = ''
console.log('---------onchange:', e);
},
submit(ref) {

Binary file not shown.

After

Width:  |  Height:  |  Size: 331 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 666 B

Loading…
Cancel
Save