Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas_plus
/
business-assistant
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 19d169bd
authored
Mar 22, 2023
by
chenwq
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
客户管理,销售列表,服务中心联调
1 parent
db63a1b5
Hide whitespace changes
Inline
Side-by-side
Showing
23 changed files
with
1136 additions
and
25 deletions
api/mineApi/mineService.js
app.json
packageMine/pages/customerManagement/customerList/customerList.js
packageMine/pages/customerManagement/customerList/customerList.json
packageMine/pages/customerManagement/customerList/customerList.scss
packageMine/pages/customerManagement/customerList/customerList.wxml
packageMine/pages/customerManagement/editCustomer/constant/data.js
packageMine/pages/customerManagement/editCustomer/editCustomer.js
packageMine/pages/customerManagement/editCustomer/editCustomer.json
packageMine/pages/customerManagement/editCustomer/editCustomer.scss
packageMine/pages/customerManagement/editCustomer/editCustomer.wxml
packageMine/pages/customerManagement/saleList/saleList.js
packageMine/pages/customerManagement/saleList/saleList.json
packageMine/pages/customerManagement/saleList/saleList.scss
packageMine/pages/customerManagement/saleList/saleList.wxml
packageMine/pages/serviceManage/editService/constant/data.js
packageMine/pages/serviceManage/editService/editService.js
packageMine/pages/serviceManage/editService/editService.wxml
packageMine/pages/serviceManage/serviceList/serviceList.js
packageMine/pages/serviceManage/serviceList/serviceList.wxml
packageMine/pages/successPage/successPage.js
pages/tab/mine/mine.js
utils/request/environment.js
api/mineApi/mineService.js
0 → 100644
View file @
19d169b
import
api
from
'~/utils/request/request'
// 分页查询服务中心列表
const
getServiceList
=
data
=>
{
return
api
.
post
(
{
method
:
'scrm.api.busassistant.serviceCenter.page'
,
...
data
}
)
}
// 保存服务中心信息
const
saveService
=
data
=>
{
return
api
.
post
(
{
method
:
'scrm.api.busassistant.serviceCenter.save'
,
...
data
}
)
}
// 修改服务中心信息
const
updateService
=
data
=>
{
return
api
.
post
(
{
method
:
'scrm.api.busassistant.serviceCenter.update'
,
...
data
}
)
}
export
default
{
getServiceList
,
saveService
,
updateService
}
\ No newline at end of file
\ No newline at end of file
app.json
View file @
19d169b
...
@@ -93,7 +93,10 @@
...
@@ -93,7 +93,10 @@
"staffManage/createStaff/createStaff"
,
"staffManage/createStaff/createStaff"
,
"staffManage/selectConnectionPage/selectConnectionPage"
,
"staffManage/selectConnectionPage/selectConnectionPage"
,
"successPage/successPage"
,
"successPage/successPage"
,
"serviceManage/editService/editService"
"serviceManage/editService/editService"
,
"customerManagement/customerList/customerList"
,
"customerManagement/editCustomer/editCustomer"
,
"customerManagement/saleList/saleList"
]
]
}
}
],
],
...
...
packageMine/pages/customerManagement/customerList/customerList.js
0 → 100644
View file @
19d169b
// packageMine/pages/customerManagement/customerList/customerList.js
import
{
IMG_URL
}
from
'~/utils/constantData'
Page
({
/**
* 页面的初始数据
*/
data
:
{
IMG_URL
,
bgUrl
:
`
${
IMG_URL
}
/personal/empty_tran.png`
,
selectInfo
:
{
serviceName
:
'全部服务中心'
},
popupShow
:
false
,
customerList
:
[{
merchantId
:
'4400000'
,
merchantName
:
'嘀加鹏辉奥迪4S店'
,
contactName
:
'张三'
,
phone
:
'15718122929'
,
serviceCenterMerchantId
:
'1'
,
serviceCenterName
:
'广东嘀加八号服务中心'
,
createdDate
:
'2022.10.03'
,
employeeNum
:
'2'
,
sceneList
:
[]
},
{
merchantId
:
'4400000'
,
merchantName
:
'嘀加鹏辉奥迪4S店'
,
contactName
:
'张三'
,
phone
:
'15718122929'
,
serviceCenterMerchantId
:
'1'
,
serviceCenterName
:
'广东嘀加八号服务中心'
,
createdDate
:
'2022.10.03'
,
employeeNum
:
'1'
,
sceneList
:
[]
},
{
merchantId
:
'4400000'
,
merchantName
:
'嘀加鹏辉奥迪4S店'
,
contactName
:
'张三'
,
phone
:
'15718122929'
,
serviceCenterMerchantId
:
'1'
,
serviceCenterName
:
'广东嘀加八号服务中心'
,
createdDate
:
'2022.10.03'
,
employeeNum
:
'4'
,
sceneList
:
[]
},
{
merchantId
:
'4400000'
,
merchantName
:
'嘀加鹏辉奥迪4S店'
,
contactName
:
'张三'
,
phone
:
'15718122929'
,
serviceCenterMerchantId
:
'1'
,
serviceCenterName
:
'广东嘀加八号服务中心'
,
createdDate
:
'2022.10.03'
,
employeeNum
:
'0'
,
sceneList
:
[]
}],
total
:
15
,
pageCof
:
{
currentPage
:
1
,
pageSize
:
10
}
},
// 筛选服务中心
filterTypeFn
()
{
this
.
setData
({
popupShow
:
!
this
.
data
.
popupShow
})
},
// 邀请销售
handleSale
(
e
)
{
let
{
target
}
=
e
.
currentTarget
.
dataset
console
.
log
(
target
,
'target---'
)
wx
.
$router
.
go
(
'packageMine.saleList'
,
{
serviceCenterMerchantId
:
target
.
serviceCenterMerchantId
})
},
handleEdit
(
e
)
{
let
{
type
}
=
e
.
currentTarget
.
dataset
let
params
=
{
addOrEdit
:
type
,
target
:
e
.
currentTarget
.
dataset
?.
target
||
{}
}
wx
.
$router
.
go
(
'packageMine.editCustomer'
,
params
)
},
/**
* 生命周期函数--监听页面加载
*/
onLoad
(
options
)
{
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady
()
{
},
/**
* 生命周期函数--监听页面显示
*/
onShow
()
{
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide
()
{
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload
()
{
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh
()
{
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom
()
{
},
/**
* 用户点击右上角分享
*/
onShareAppMessage
()
{
}
})
\ No newline at end of file
\ No newline at end of file
packageMine/pages/customerManagement/customerList/customerList.json
0 → 100644
View file @
19d169b
{
"usingComponents"
:
{
"select-service-popup"
:
"../../../components/selectServicePopup/selectServicePopup"
}
}
\ No newline at end of file
\ No newline at end of file
packageMine/pages/customerManagement/customerList/customerList.scss
0 → 100644
View file @
19d169b
/* packageMine/pages/customerManagement/customerList/customerList.wxss */
.customer-list-page
{
width
:
100%
;
box-sizing
:
border-box
;
padding
:
20rpx
;
background-color
:
#F2F3F7
;
.btn_box
{
width
:
100%
;
height
:
96rpx
;
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
background-color
:
#FFFFFF
;
border-radius
:
16rpx
;
color
:
var
(
--
btnColor
);
font-size
:
28rpx
;
font-weight
:
600
;
margin-bottom
:
32rpx
;
.icon
{
width
:
40rpx
;
height
:
40rpx
;
margin-right
:
16rpx
;
vertical-align
:
-12rpx
}
}
.title-box
{
display
:
flex
;
align-items
:
center
;
justify-content
:
space-between
;
.title
{
color
:
#323436
;
font-size
:
28rpx
;
font-weight
:
600
;
.number
{
color
:
var
(
--
btnColor
)
}
}
.select-btn
{
box-sizing
:
border-box
;
padding
:
16rpx
0
;
display
:
flex
;
align-items
:
center
;
z-index
:
2
;
background-color
:
#f2f3f7
;
.type
{
margin-left
:
8px
;
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
padding
:
0
16rpx
;
height
:
24px
;
line-height
:
24px
;
background
:
#ffffff
;
border-radius
:
14px
;
font-size
:
12px
;
color
:
#8a8c90
;
text
{
max-width
:
360rpx
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
white-space
:
nowrap
;
}
.point
{
margin-left
:
2px
;
width
:
12px
;
height
:
12px
;
}
}
}
}
.item-box
{
width
:
100%
;
background
:
#FFFFFF
;
border-radius
:
12rpx
;
margin-bottom
:
20rpx
;
.top
{
display
:
flex
;
justify-content
:
space-between
;
align-items
:
center
;
padding
:
24rpx
0
;
margin
:
0
32rpx
;
border-bottom
:
2rpx
dotted
#CCCED1
;
.message
{
display
:
flex
;
.avatar
{
flex-shrink
:
0
;
width
:
72rpx
;
height
:
72rpx
;
margin-right
:
12rpx
;
}
.message-text
{
display
:
flex
;
flex-flow
:
column
;
justify-content
:
center
;
.name
{
color
:
#323436
;
font-size
:
28rpx
;
}
.tips
{
color
:
#858A94
;
font-size
:
26rpx
;
}
}
}
.arrow_right
{
width
:
36rpx
;
height
:
36rpx
;
}
}
.employee-box
{
display
:
flex
;
justify-content
:
space-between
;
align-items
:
center
;
padding
:
27rpx
12rpx
24rpx
32rpx
;
.employee-list
{
display
:
flex
;
align-items
:
center
;
font-size
:
26rpx
;
color
:
#323436
;
.avatar-box
{
position
:
relative
;
width
:
96rpx
;
height
:
48rpx
;
margin-right
:
14rpx
;
.employee-img
{
position
:
absolute
;
top
:
0
;
left
:
0
;
width
:
48rpx
;
height
:
48rpx
;
z-index
:
3
;
}
.img-2
{
left
:
12rpx
;
z-index
:
2
;
}
.img-3
{
left
:
24rpx
;
z-index
:
1
;
}
}
.look-btn
{
font-size
:
24rpx
;
color
:
#3666FE
;
margin-left
:
10rpx
;
}
}
.employee-btn
{
width
:
192rpx
;
height
:
48rpx
;
line-height
:
48rpx
;
background
:
#3666FE
;
border-radius
:
24rpx
;
font-size
:
24rpx
;
color
:
#FFFFFF
;
text-align
:
center
;
}
}
.bottom
{
padding
:
0
32rpx
;
height
:
72rpx
;
background-color
:
#FFF9F2
;
display
:
flex
;
align-items
:
center
;
justify-content
:
space-between
;
font-size
:
24rpx
;
color
:
#8A8C90
;
.service_name
{
white-space
:
nowrap
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
}
}
}
.bottomTips
{
text-align
:
center
;
color
:
#393b3e
;
font-size
:
26rpx
;
height
:
60rpx
;
line-height
:
40rpx
;
}
}
\ No newline at end of file
\ No newline at end of file
packageMine/pages/customerManagement/customerList/customerList.wxml
0 → 100644
View file @
19d169b
<!--packageMine/pages/customerManagement/customerList/customerList.wxml-->
<!-- <wxs src="../index.wxs" module="format" /> -->
<view class="customer-list-page">
<view class="btn_box" bindtap="handleEdit" data-type="add">
<glsx-image src="index/apply.png" class="icon" />
<text>创建新客户</text>
</view>
<view class="content-box" wx:if="{{customerList.length}}">
<view class="title-box">
<view class="title">客户数量:<text class="number">{{total}}</text></view>
<view class="select-btn">
<view class="type" bindtap="filterTypeFn">
<text>{{selectInfo.serviceName}}</text>
<glsx-image class="point" src="index/point.png" />
</view>
</view>
</view>
<scroll-view scroll-y enable-back-to-top refresher-enabled="{{true}}" bindrefresherrefresh="search" bindscrolltolower="onBottomRefresh" class="list" style="height:calc(100vh - 148rpx - 110rpx);" refresher-threshold="104" refresher-triggered="{{triggered}}">
<view class="item-box" wx:for="{{customerList}}" wx:key="index" bindtap="handleEdit" data-type="edit" data-target="{{item}}">
<view class="top">
<view class="message">
<glsx-image src="personal/customer_head.png" class="avatar" />
<!-- <image wx:else src="{{item.avatarUrl}}" class="avatar"></image> -->
<view class="message-text">
<view class="name">{{item.merchantName}}</view>
<view class="tips">{{item.merchantId}} | {{item.contactName}} {{item.phone}}</view>
</view>
</view>
<glsx-image src="personal/arrow_right.png" class="arrow_right" />
</view>
<view class="employee-box">
<view>
<view class="employee-list" wx:if="{{item.employeeNum != '0'}}">
<view class="avatar-box">
<glsx-image class="employee-img" src="personal/staff_defalut_avatar.png" />
<glsx-image wx:if="{{item.employeeNum > 1}}" class="employee-img img-2" src="personal/staff_defalut_avatar.png" />
<glsx-image wx:if="{{item.employeeNum > 2}}" class="employee-img img-3" src="personal/staff_defalut_avatar.png" />
</view>
<view>+{{item.employeeNum}}</view>
<view class="look-btn">查看</view>
</view>
</view>
<view class="employee-btn" data-target="{{item}}" catchtap="handleSale">邀请销售顾问</view>
</view>
<view class="bottom">
<view class="service_name">
所属:{{item.serviceCenterName}}
</view>
<view class="time">{{item.createdDate}}</view>
</view>
</view>
<view class="bottomTips" wx:if="{{customerList.length>10}}">到底啦!</view>
</scroll-view>
</view>
<view wx:else>
<nothing-tips tips="暂无客户~" bgColor="{{'#F2F3F7'}}" bg="{{bgUrl}}" />
</view>
</view>
<select-service-popup wx:if="{{popupShow}}" bind:hidePopup="filterTypeFn" bind:getStaffList="getCustomerList" selectInfo="{{selectInfo}}" popShow="{{popupShow}}" merchantRange="{{staffList}}" />
\ No newline at end of file
\ No newline at end of file
packageMine/pages/customerManagement/editCustomer/constant/data.js
0 → 100644
View file @
19d169b
const
phoneRex
=
/^
[
1
]([
3-9
])[
0-9
]{9}
$/
const
formRule
=
{
merchantName
:
[{
required
:
true
,
message
:
'客户名称不能为空'
}],
contactName
:
[{
required
:
true
,
message
:
'联系人不能为空'
}],
phone
:
[
{
required
:
true
,
message
:
'联系电话不能为空'
},
{
validator
:
(
rule
,
value
)
=>
{
return
!
phoneRex
.
test
(
value
)
?
{
message
:
'请输入正确的手机号'
}
:
null
}
}
]
}
const
formItems
=
[{
label
:
'所属服务中心'
,
props
:
'selectServiceInfo'
,
valueFn
:
'serviceValue'
,
type
:
'select'
,
placeholder
:
'请选择服务中心'
,
pageType
:
1
},
{
label
:
'客户名称'
,
props
:
'merchantName'
,
type
:
'input'
,
placeholder
:
'请输入客户的商户名称'
,
maxlength
:
50
},
{
label
:
'联系人'
,
props
:
'contactName'
,
type
:
'input'
,
placeholder
:
'请输入联系人姓名'
,
maxlength
:
10
},
{
label
:
'联系电话'
,
props
:
'phone'
,
type
:
'input'
,
inputType
:
'number'
,
placeholder
:
'请输入手机号码'
,
maxlength
:
11
},
{
label
:
'业务开通'
,
props
:
''
,
type
:
'business'
}]
export
default
{
formRule
,
formItems
}
\ No newline at end of file
\ No newline at end of file
packageMine/pages/customerManagement/editCustomer/editCustomer.js
0 → 100644
View file @
19d169b
// packageMine/pages/customerManagement/editCustomer/editCustomer.js
import
constantData
from
'./constant/data'
Page
({
/**
* 页面的初始数据
*/
data
:
{
addOrEdit
:
''
,
formData
:
{},
formItems
:
constantData
.
formItems
,
},
handleInput
(
e
)
{
let
{
attr
}
=
e
.
currentTarget
.
dataset
let
{
value
}
=
e
.
detail
this
.
setData
({
[
'formData.'
+
attr
]:
value
})
},
handleConfirm
()
{
let
{
addOrEdit
,
formData
}
=
this
.
data
let
validObj
=
wx
.
$util
.
checkRule
(
formData
,
constantData
.
formRule
)
if
(
validObj
)
{
wx
.
$api
.
showToast
(
validObj
.
message
)
return
}
let
message
=
addOrEdit
==
'add'
?
'是否确定客户?'
:
'是否确定修改客户?'
wx
.
showModal
({
title
:
'提示'
,
content
:
message
,
confirmText
:
'确定'
,
cancelText
:
'取消'
,
confirmColor
:
'#3666FE'
,
success
(
res
)
{
if
(
res
.
confirm
)
{
// 创建/编辑接口
if
(
addOrEdit
==
'add'
)
{
wx
.
$router
.
reLaunch
(
'packageMine.successPage?page=customer'
)
}
}
}
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad
(
options
)
{
wx
.
$router
.
getData
(
res
=>
{
let
{
addOrEdit
,
target
}
=
res
this
.
setData
({
addOrEdit
,
formData
:
target
||
{}
})
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady
()
{
},
/**
* 生命周期函数--监听页面显示
*/
onShow
()
{
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide
()
{
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload
()
{
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh
()
{
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom
()
{
},
/**
* 用户点击右上角分享
*/
onShareAppMessage
()
{
}
})
\ No newline at end of file
\ No newline at end of file
packageMine/pages/customerManagement/editCustomer/editCustomer.json
0 → 100644
View file @
19d169b
{
"usingComponents"
:
{}
}
\ No newline at end of file
\ No newline at end of file
packageMine/pages/customerManagement/editCustomer/editCustomer.scss
0 → 100644
View file @
19d169b
/* packageMine/pages/customerManagement/editCustomer/editCustomer.wxss */
.create-service-page
{
margin
:
20rpx
;
.tips
{
padding
:
12rpx
;
color
:
#323436
;
font-size
:
28rpx
;
font-weight
:
600
;
}
.form-content
{
background
:
#FFFFFF
;
border-radius
:
16rpx
;
padding
:
44rpx
40rpx
;
.label
{
font-size
:
28rpx
;
font-weight
:
600
;
color
:
#323436
;
margin-bottom
:
12rpx
;
.tips
{
font-size
:
24rpx
;
font-weight
:
400
;
color
:
#F35251
;
}
}
.input-box
,
.select-box
{
height
:
40rpx
;
background
:
#F8F9FC
;
border-radius
:
12rpx
;
padding
:
32rpx
24rpx
;
margin-bottom
:
16rpx
;
color
:
#323436
;
}
.select-box
{
display
:
flex
;
justify-content
:
space-between
;
.arrow_right
{
width
:
36rpx
;
height
:
36rpx
;
}
.name
{
overflow
:
hidden
;
text-overflow
:
ellipsis
;
white-space
:
nowrap
;
}
}
}
.btn
{
position
:
fixed
;
bottom
:
16rpx
;
left
:
0
;
width
:
calc
(
100%
-
64rpx
);
height
:
88rpx
;
line-height
:
88rpx
;
text-align
:
center
;
font-size
:
28rpx
;
color
:
#FFFFFF
;
margin
:
0
32rpx
;
}
.btn-blue
{
background
:
var
(
--
btnColor
);
border-radius
:
8rpx
;
}
}
\ No newline at end of file
\ No newline at end of file
packageMine/pages/customerManagement/editCustomer/editCustomer.wxml
0 → 100644
View file @
19d169b
<!--packageMine/pages/customerManagement/editCustomer/editCustomer.wxml-->
<view class="create-service-page" style="padding-top:{{tabBarStyle}}px;">
<view class="tips" wx:if="{{addOrEdit == 'add'}}">请完善服务中心资料完成创建:</view>
<view class="form-content">
<block wx:for="{{formItems}}" wx:key="index">
<view class="label">{{item.label}}<text class="tips">{{item.tips}}</text></view>
<view class="input-box" wx:if="{{item.type == 'input'}}">
<input type="text" placeholder="{{item.placeholder || '请输入' + item.label}}" maxlength="{{item.maxlength}}" class="input" value="{{formData[item.props]}}" type="{{item.inputType || 'text'}}" password="{{item.password}}" placeholder-class="input-placeholder" data-attr="{{item.props}}" bindinput="handleInput" />
</view>
<view class="select-box" wx:if="{{item.type == 'select'}}" bindtap="jump" data-type="{{item.pageType}}">
<view class="name" wx:if="{{formData[item.valueFn]}}">{{formData[item.valueFn]}}</view>
<view class="placeholder-text" wx:else>{{item.placeholder}}</view>
<glsx-image src="personal/arrow_right.png" class="arrow_right" />
</view>
<view wx:if="{{item.type == 'business'}}">
</view>
</block>
</view>
<view class="isFullSucreen btn">
<view class="btn-blue" bindtap="handleConfirm">{{addOrEdit == 'add' ? '提交' : '保存'}}</view>
</view>
</view>
\ No newline at end of file
\ No newline at end of file
packageMine/pages/customerManagement/saleList/saleList.js
0 → 100644
View file @
19d169b
// packageMine/pages/customerManagement/saleList/saleList.js
import
{
IMG_URL
}
from
'~/utils/constantData'
Page
({
/**
* 页面的初始数据
*/
data
:
{
IMG_URL
,
bgUrl
:
`
${
IMG_URL
}
/personal/empty_tran.png`
,
saleList
:
[{
merchantName
:
'刘权'
,
phone
:
'15718122929'
,
departmentName
:
'销售部'
,
merchantCustomerName
:
'广东嘀加鹏辉奥迪4S店'
,
createdDate
:
'2022.10.03'
}],
total
:
15
,
searchForm
:
{
serviceCenterMerchantId
:
''
},
// 邀请销售
isPopupShow
:
false
,
popupVal
:
''
},
handlePopup
()
{
this
.
setData
({
isPopupShow
:
!
this
.
data
.
isPopupShow
,
popupVal
:
''
})
},
handlePopupChoose
(
e
)
{
let
{
val
}
=
e
.
currentTarget
.
dataset
this
.
setData
({
popupVal
:
val
})
},
handlePopupConfirm
()
{
this
.
handlePopup
()
},
/**
* 生命周期函数--监听页面加载
*/
onLoad
(
options
)
{
wx
.
$router
.
getData
(
res
=>
{
console
.
log
(
res
)
let
{
serviceCenterMerchantId
}
=
res
this
.
setData
({
[
'searchForm.serviceCenterMerchantId'
]:
serviceCenterMerchantId
})
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady
()
{
},
/**
* 生命周期函数--监听页面显示
*/
onShow
()
{
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide
()
{
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload
()
{
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh
()
{
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom
()
{
},
/**
* 用户点击右上角分享
*/
onShareAppMessage
()
{
}
})
\ No newline at end of file
\ No newline at end of file
packageMine/pages/customerManagement/saleList/saleList.json
0 → 100644
View file @
19d169b
{
"usingComponents"
:
{}
}
\ No newline at end of file
\ No newline at end of file
packageMine/pages/customerManagement/saleList/saleList.scss
0 → 100644
View file @
19d169b
/* packageMine/pages/customerManagement/saleList/saleList.wxss */
.sale-list-page
{
width
:
100%
;
box-sizing
:
border-box
;
padding
:
20rpx
;
background-color
:
#F2F3F7
;
.btn_box
{
width
:
100%
;
height
:
96rpx
;
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
background-color
:
#FFFFFF
;
border-radius
:
16rpx
;
color
:
var
(
--
btnColor
);
font-size
:
28rpx
;
font-weight
:
600
;
margin-bottom
:
32rpx
;
.icon
{
width
:
40rpx
;
height
:
40rpx
;
margin-right
:
16rpx
;
vertical-align
:
-12rpx
}
}
.title-box
{
display
:
flex
;
align-items
:
center
;
justify-content
:
space-between
;
margin-bottom
:
20rpx
;
.title
{
color
:
#323436
;
font-size
:
28rpx
;
font-weight
:
600
;
.number
{
color
:
var
(
--
btnColor
)
}
}
// .select-btn {
// box-sizing: border-box;
// padding: 16rpx 0;
// display: flex;
// align-items: center;
// z-index: 2;
// background-color: #f2f3f7;
// .type {
// margin-left: 8px;
// display: flex;
// justify-content: center;
// align-items: center;
// padding: 0 16rpx;
// height: 24px;
// line-height: 24px;
// background: #ffffff;
// border-radius: 14px;
// font-size: 12px;
// color: #8a8c90;
// text {
// max-width: 360rpx;
// overflow: hidden;
// text-overflow: ellipsis;
// white-space: nowrap;
// }
// .point {
// margin-left: 2px;
// width: 12px;
// height: 12px;
// }
// }
// }
}
.item-box
{
width
:
100%
;
background
:
#FFFFFF
;
border-radius
:
12rpx
;
margin-bottom
:
20rpx
;
.top
{
display
:
flex
;
justify-content
:
space-between
;
padding
:
24rpx
32rpx
;
.message
{
display
:
flex
;
.avatar
{
flex-shrink
:
0
;
width
:
72rpx
;
height
:
72rpx
;
margin-right
:
12rpx
;
}
.message-text
{
display
:
flex
;
flex-flow
:
column
;
justify-content
:
center
;
.merchant
{
color
:
#323436
;
font-size
:
28rpx
;
}
.contact
{
color
:
#858A94
;
font-size
:
26rpx
;
}
}
}
.department
{
display
:
flex
;
font-size
:
24rpx
;
color
:
#323436
;
}
.icon-department
{
width
:
36rpx
;
height
:
36rpx
;
}
}
.bottom
{
padding
:
0
32rpx
;
height
:
72rpx
;
background-color
:
#FFF9F2
;
display
:
flex
;
align-items
:
center
;
justify-content
:
space-between
;
font-size
:
24rpx
;
color
:
#8A8C90
;
.service_name
{
white-space
:
nowrap
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
}
}
}
.bottomTips
{
text-align
:
center
;
color
:
#393b3e
;
font-size
:
26rpx
;
height
:
60rpx
;
line-height
:
40rpx
;
}
}
.popup-row
{
height
:
116rpx
;
line-height
:
116rpx
;
font-weight
:
500
;
font-size
:
32rpx
;
color
:
#323436
;
text-align
:
center
;
}
.popup-active
{
background
:
#F0F7FF
;
}
\ No newline at end of file
\ No newline at end of file
packageMine/pages/customerManagement/saleList/saleList.wxml
0 → 100644
View file @
19d169b
<!--packageMine/pages/customerManagement/saleList/saleList.wxml-->
<view class="sale-list-page">
<view class="btn_box" bindtap="handlePopup">
<glsx-image src="index/apply.png" class="icon" />
<text>邀请加入</text>
</view>
<view class="content-box" wx:if="{{saleList.length}}">
<view class="title-box">
<view class="title">销售顾问:<text class="number">{{total}}</text></view>
</view>
<scroll-view scroll-y enable-back-to-top refresher-enabled="{{true}}" bindrefresherrefresh="search" bindscrolltolower="onBottomRefresh" class="list" style="height:calc(100vh - 148rpx - 110rpx);" refresher-threshold="104" refresher-triggered="{{triggered}}">
<view class="item-box" wx:for="{{saleList}}" wx:key="index">
<view class="top">
<view class="message">
<glsx-image src="personal/staff_defalut_avatar.png" class="avatar" />
<view class="message-text">
<view class="merchant">{{item.merchantName}}</view>
<view class="contact">{{item.contactName}} {{item.phone}}</view>
</view>
</view>
<view class="department">
<glsx-image src="personal/icon-department.png" class="icon-department" />
<view>{{item.departmentName}}</view>
</view>
</view>
<view class="bottom">
<view class="sale_name">
所属:{{item.merchantCustomerName}}
</view>
<view class="time">{{item.createdDate}}</view>
</view>
</view>
<view class="bottomTips" wx:if="{{saleList.length>10}}">到底啦!</view>
</scroll-view>
</view>
<view wx:else>
<nothing-tips tips="暂无销售顾问~" bgColor="{{'#F2F3F7'}}" bg="{{bgUrl}}" />
</view>
</view>
<!-- 邀请 -->
<popup show="{{isPopupShow}}" title="请选择邀请方式" height="36%" bindconfirm="handlePopupConfirm" bindhidePopup="handlePopup">
<view class="popup-row {{popupVal == 'code' ? 'popup-active' : ''}}" data-val="code" bindtap="handlePopupChoose">二维码邀请</view>
<view class="popup-row {{popupVal == 'link' ? 'popup-active' : ''}}" data-val="link" bindtap="handlePopupChoose">链接邀请</view>
</popup>
\ No newline at end of file
\ No newline at end of file
packageMine/pages/serviceManage/editService/constant/data.js
View file @
19d169b
...
@@ -36,6 +36,7 @@ const formItems = [{
...
@@ -36,6 +36,7 @@ const formItems = [{
tips
:
'(登录凭证)'
,
tips
:
'(登录凭证)'
,
props
:
'phone'
,
props
:
'phone'
,
type
:
'input'
,
type
:
'input'
,
inputType
:
'number'
,
placeholder
:
'请输入手机号码'
,
placeholder
:
'请输入手机号码'
,
maxlength
:
11
maxlength
:
11
},
{
},
{
...
@@ -43,6 +44,7 @@ const formItems = [{
...
@@ -43,6 +44,7 @@ const formItems = [{
tips
:
'(可用于PC端登录)'
,
tips
:
'(可用于PC端登录)'
,
props
:
'password'
,
props
:
'password'
,
type
:
'input'
,
type
:
'input'
,
password
:
true
,
placeholder
:
'请输入登录密码(6-20位字母+数字)'
,
placeholder
:
'请输入登录密码(6-20位字母+数字)'
,
maxlength
:
20
maxlength
:
20
}]
}]
...
...
packageMine/pages/serviceManage/editService/editService.js
View file @
19d169b
// packageMine/pages/serviceManage/editService/editService.js
// packageMine/pages/serviceManage/editService/editService.js
import
constantData
from
'./constant/data'
import
constantData
from
'./constant/data'
import
mineServiceApi
from
'~/api/mineApi/mineService'
Page
({
Page
({
/**
/**
...
@@ -9,6 +10,10 @@ Page({
...
@@ -9,6 +10,10 @@ Page({
addOrEdit
:
''
,
addOrEdit
:
''
,
formData
:
{},
formData
:
{},
formItems
:
constantData
.
formItems
,
formItems
:
constantData
.
formItems
,
apiNameObj
:
{
'add'
:
'saveService'
,
'edit'
:
'updateService'
}
},
},
handleInput
(
e
)
{
handleInput
(
e
)
{
...
@@ -20,12 +25,37 @@ Page({
...
@@ -20,12 +25,37 @@ Page({
},
},
handleConfirm
()
{
handleConfirm
()
{
let
{
addOrEdit
,
formData
}
=
this
.
data
let
{
apiNameObj
,
addOrEdit
,
formData
}
=
this
.
data
let
_this
=
this
let
validObj
=
wx
.
$util
.
checkRule
(
formData
,
constantData
.
formRule
)
let
validObj
=
wx
.
$util
.
checkRule
(
formData
,
constantData
.
formRule
)
if
(
validObj
)
{
if
(
validObj
)
{
wx
.
$api
.
showToast
(
validObj
.
message
)
wx
.
$api
.
showToast
(
validObj
.
message
)
return
return
}
let
message
=
addOrEdit
==
'add'
?
'是否确定创建服务中心?'
:
'是否确定修改服务中心信息?'
wx
.
showModal
({
title
:
'提示'
,
content
:
message
,
confirmText
:
'确定'
,
cancelText
:
'取消'
,
confirmColor
:
'#3666FE'
,
success
(
res
)
{
if
(
res
.
confirm
)
{
// 创建/编辑接口
mineServiceApi
[
apiNameObj
[
addOrEdit
]](
formData
).
then
(
res
=>
{
console
.
log
(
res
,
'res---'
)
if
(
addOrEdit
==
'add'
)
{
wx
.
$router
.
reLaunch
(
'packageMine.successPage?page=service'
)
}
else
{
wx
.
$api
.
showToast
(
'修改成功'
)
setTimeout
(()
=>
{
wx
.
$router
.
reLaunch
(
'packageMine.serviceList'
)
},
1000
)
}
})
}
}
}
})
},
},
/**
/**
...
@@ -36,7 +66,10 @@ Page({
...
@@ -36,7 +66,10 @@ Page({
let
{
addOrEdit
,
target
}
=
res
let
{
addOrEdit
,
target
}
=
res
this
.
setData
({
this
.
setData
({
addOrEdit
,
addOrEdit
,
formData
:
target
||
{}
formData
:
{
...
target
,
oldPhone
:
target
.
phone
||
''
}
})
})
})
})
},
},
...
...
packageMine/pages/serviceManage/editService/editService.wxml
View file @
19d169b
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
<block wx:for="{{formItems}}" wx:key="index">
<block wx:for="{{formItems}}" wx:key="index">
<view class="label">{{item.label}}<text class="tips">{{item.tips}}</text></view>
<view class="label">{{item.label}}<text class="tips">{{item.tips}}</text></view>
<view class="input-box" wx:if="{{item.type == 'input'}}">
<view class="input-box" wx:if="{{item.type == 'input'}}">
<input type="text" placeholder="{{item.placeholder || '请输入' + item.label}}" maxlength="{{item.maxlength}}" class="input" value="{{formData[item.props]}}" placeholder-class="input-placeholder" data-attr="{{item.props}}" bindinput="handleInput" />
<input type="text" placeholder="{{item.placeholder || '请输入' + item.label}}" maxlength="{{item.maxlength}}" class="input" value="{{formData[item.props]}}" p
assword="{{item.password}}" p
laceholder-class="input-placeholder" data-attr="{{item.props}}" bindinput="handleInput" />
</view>
</view>
<view class="select-box" wx:if="{{item.type == 'select'}}" bindtap="jump" data-type="{{item.pageType}}">
<view class="select-box" wx:if="{{item.type == 'select'}}" bindtap="jump" data-type="{{item.pageType}}">
<view class="name" wx:if="{{formData[item.valueFn]}}">{{formData[item.valueFn]}}</view>
<view class="name" wx:if="{{formData[item.valueFn]}}">{{formData[item.valueFn]}}</view>
...
...
packageMine/pages/serviceManage/serviceList/serviceList.js
View file @
19d169b
// packagesList/mineDetail/pages/serviceManage/serviceList/serviceList.js
// packagesList/mineDetail/pages/serviceManage/serviceList/serviceList.js
import
{
IMG_URL
}
from
'~/utils/constantData'
import
{
IMG_URL
}
from
'~/utils/constantData'
import
mineServiceApi
from
'~/api/mineApi/mineService'
Page
({
Page
({
/**
/**
...
@@ -8,15 +9,8 @@ Page({
...
@@ -8,15 +9,8 @@ Page({
data
:
{
data
:
{
IMG_URL
,
IMG_URL
,
bgUrl
:
`
${
IMG_URL
}
/personal/empty_tran.png`
,
bgUrl
:
`
${
IMG_URL
}
/personal/empty_tran.png`
,
serviceList
:
[{
serviceList
:
[],
merchantId
:
'4400000'
,
total
:
-
1
,
merchantName
:
'广东嘀加第一服务中心'
,
contactName
:
'张三'
,
phone
:
'15718122929'
,
createdDate
:
'2022.10.03'
,
password
:
'123456'
}],
total
:
15
,
pageCof
:
{
pageCof
:
{
pageNum
:
1
,
pageNum
:
1
,
pageSize
:
10
pageSize
:
10
...
@@ -24,7 +18,6 @@ Page({
...
@@ -24,7 +18,6 @@ Page({
},
},
handleEdit
(
e
)
{
handleEdit
(
e
)
{
console
.
log
(
e
)
let
{
type
}
=
e
.
currentTarget
.
dataset
let
{
type
}
=
e
.
currentTarget
.
dataset
let
params
=
{
let
params
=
{
addOrEdit
:
type
,
addOrEdit
:
type
,
...
@@ -33,13 +26,38 @@ Page({
...
@@ -33,13 +26,38 @@ Page({
wx
.
$router
.
go
(
'packageMine.editService'
,
params
)
wx
.
$router
.
go
(
'packageMine.editService'
,
params
)
},
},
getList
()
{},
handleSearch
()
{
this
.
setData
({
[
'pageCof.pageNum'
]:
1
,
total
:
-
1
})
this
.
getList
()
},
getList
()
{
let
{
serviceList
,
pageCof
,
total
}
=
this
.
data
if
(
total
==
serviceList
.
length
)
{
return
true
}
let
params
=
{
...
pageCof
}
mineServiceApi
.
getServiceList
(
params
).
then
(
res
=>
{
let
{
list
,
total
}
=
res
this
.
setData
({
serviceList
:
pageCof
.
pageNum
==
1
?
(
list
||
[])
:
serviceList
.
concat
(
list
),
[
'pageCof.pageNum'
]:
pageCof
.
pageNum
+
1
,
triggered
:
false
,
total
})
})
},
/**
/**
* 生命周期函数--监听页面加载
* 生命周期函数--监听页面加载
*/
*/
onLoad
(
options
)
{
onLoad
(
options
)
{
this
.
getList
()
},
},
/**
/**
...
...
packageMine/pages/serviceManage/serviceList/serviceList.wxml
View file @
19d169b
...
@@ -6,9 +6,9 @@
...
@@ -6,9 +6,9 @@
</view>
</view>
<view class="content-box" wx:if="{{serviceList.length}}">
<view class="content-box" wx:if="{{serviceList.length}}">
<view class="title-box">
<view class="title-box">
<view class="title">服务中心数量:<text class="number">{{total}}</text></view>
<view class="title">服务中心数量:<text class="number">{{total
< 0 ? 0 : total
}}</text></view>
</view>
</view>
<scroll-view scroll-y enable-back-to-top refresher-enabled="{{true}}" bindrefresherrefresh="
search" bindscrolltolower="onBottomRefresh
" class="list" style="height:calc(100vh - 148rpx - 110rpx);" refresher-threshold="104" refresher-triggered="{{triggered}}">
<scroll-view scroll-y enable-back-to-top refresher-enabled="{{true}}" bindrefresherrefresh="
handleSearch" bindscrolltolower="getList
" class="list" style="height:calc(100vh - 148rpx - 110rpx);" refresher-threshold="104" refresher-triggered="{{triggered}}">
<view class="item-box" wx:for="{{serviceList}}" wx:key="index" bindtap="handleEdit" data-type="edit" data-target="{{item}}">
<view class="item-box" wx:for="{{serviceList}}" wx:key="index" bindtap="handleEdit" data-type="edit" data-target="{{item}}">
<view class="top">
<view class="top">
<view class="message">
<view class="message">
...
@@ -27,7 +27,7 @@
...
@@ -27,7 +27,7 @@
<view class="time">{{item.createdDate}}</view>
<view class="time">{{item.createdDate}}</view>
</view>
</view>
</view>
</view>
<view class="bottomTips" wx:if="{{serviceList.length
>10
}}">到底啦!</view>
<view class="bottomTips" wx:if="{{serviceList.length
== total
}}">到底啦!</view>
</scroll-view>
</scroll-view>
</view>
</view>
<view wx:else>
<view wx:else>
...
...
packageMine/pages/successPage/successPage.js
View file @
19d169b
// packagesList/mineDetail/pages/successPage/successPage.js
// packagesList/mineDetail/pages/successPage/successPage.js
const
obj
=
{
service
:
{
navigationTitle
:
'创建服务中心'
,
primaryBtn
:
'继续创建服务中心'
,
primaryCallback
:
'packageMine.editService'
,
cancelBtn
:
'S后自动跳转我的服务中心'
,
cancelCallback
:
'packageMine.serviceList'
},
customer
:
{
navigationTitle
:
'创建客户'
,
primaryBtn
:
'邀请销售顾问'
,
primaryCallback
:
'packageMine.editService'
,
cancelBtn
:
'S后自动跳转我的客户'
,
cancelCallback
:
'packageMine.customerList'
}
}
Page
({
Page
({
/**
/**
...
@@ -21,7 +37,13 @@ Page({
...
@@ -21,7 +37,13 @@ Page({
// this.setData({
// this.setData({
// paramsObj: options
// paramsObj: options
// })
// })
let
{
count
}
=
this
.
data
if
(
options
)
{
let
{
page
}
=
options
this
.
setData
({
paramsObj
:
obj
[
page
]
})
}
let
{
count
,
paramsObj
}
=
this
.
data
this
.
countDownTime
=
setInterval
(()
=>
{
this
.
countDownTime
=
setInterval
(()
=>
{
this
.
setData
({
this
.
setData
({
count
:
--
count
count
:
--
count
...
...
pages/tab/mine/mine.js
View file @
19d169b
...
@@ -43,7 +43,7 @@ Page({
...
@@ -43,7 +43,7 @@ Page({
isRead
:
false
isRead
:
false
},
{
},
{
name
:
'客户管理'
,
name
:
'客户管理'
,
path
:
'packageMine.customer
Managemen
t'
path
:
'packageMine.customer
Lis
t'
}],
}],
isShowService
:
false
,
isShowService
:
false
,
},
},
...
...
utils/request/environment.js
View file @
19d169b
...
@@ -21,7 +21,7 @@ const systemInfo = wx.getSystemInfoSync()
...
@@ -21,7 +21,7 @@ const systemInfo = wx.getSystemInfoSync()
const
manual
=
false
const
manual
=
false
const
release
=
false
const
release
=
false
let
index
=
2
let
index
=
1
// 判断小程序环境
// 判断小程序环境
// develop:开发版(正常开发工具,测试时)
// develop:开发版(正常开发工具,测试时)
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment