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 9b66c2c5
authored
Apr 13, 2023
by
chenwq
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
产品开通
1 parent
6aa357bd
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
49 additions
and
27 deletions
packageMine/pages/customerManagement/editCustomer/editCustomer.js
packageMine/pages/customerManagement/editCustomer/editCustomer.scss
packageMine/pages/customerManagement/editCustomer/editCustomer.wxml
packageMine/pages/customerManagement/editCustomer/editCustomer.js
View file @
9b66c2c
...
...
@@ -39,10 +39,10 @@ Page({
}
let
list
=
[]
outputApi
.
findProByScene
(
params
).
then
(
res
=>
{
console
.
log
(
res
)
console
.
log
(
this
.
data
.
scenceList
)
sceneCodeList
.
forEach
(
item
=>
{
let
target
=
res
.
find
(
k
=>
k
.
sceneCode
==
item
)
let
proList
=
res
.
find
(
k
=>
k
.
sceneCode
==
item
)?.
productList
let
target
=
scenceList
.
find
(
k
=>
k
.
sceneCode
==
item
)
target
.
proList
=
proList
list
.
push
(
target
)
})
this
.
setData
({
...
...
@@ -59,10 +59,10 @@ Page({
})
},
handle
Scene
Click
(
e
)
{
let
{
idx
}
=
e
.
currentTarget
.
dataset
handle
Pro
Click
(
e
)
{
let
{
sceneidx
,
pro
idx
}
=
e
.
currentTarget
.
dataset
this
.
setData
({
[
'scenceList['
+
idx
+
'].isCheck'
]:
!
this
.
data
.
scenceList
[
idx
].
isCheck
[
`scenceList[
${
sceneidx
}
].proList[
${
proidx
}
].isCheck`
]:
!
this
.
data
.
scenceList
[
sceneidx
].
proList
[
pro
idx
].
isCheck
})
},
...
...
@@ -101,13 +101,15 @@ Page({
})
},
deal
Scene
()
{
deal
Pro
()
{
let
arr
=
[]
let
{
scenceList
}
=
this
.
data
scenceList
.
forEach
(
item
=>
{
if
(
item
.
isCheck
)
{
arr
.
push
(
item
.
sceneCode
)
}
item
.
proList
.
forEach
(
k
=>
{
if
(
k
.
isCheck
)
{
arr
.
push
(
k
.
productCode
)
}
})
})
return
arr
},
...
...
@@ -119,14 +121,14 @@ Page({
if
(
isConfirm
)
{
return
true
}
formData
.
sceneList
=
this
.
dealScene
()
formData
.
productCodeList
=
this
.
dealPro
()
let
validObj
=
wx
.
$util
.
checkRule
(
formData
,
constantData
.
formRule
)
if
(
validObj
)
{
wx
.
$api
.
showToast
(
validObj
.
message
)
return
}
if
(
!
formData
.
scen
eList
.
length
)
{
wx
.
$api
.
showToast
(
'请
选择场景
'
)
if
(
!
formData
.
productCod
eList
.
length
)
{
wx
.
$api
.
showToast
(
'请
至少选择一个产品
'
)
return
}
let
message
=
addOrEdit
==
'add'
?
'是否确定客户?'
:
'是否确定修改客户?'
...
...
packageMine/pages/customerManagement/editCustomer/editCustomer.scss
View file @
9b66c2c
/* packageMine/pages/customerManagement/editCustomer/editCustomer.wxss */
.create-service-page
{
margin
:
20rpx
;
padding-bottom
:
200rpx
;
.tips
{
padding
:
12rpx
;
...
...
@@ -89,16 +90,36 @@
.scene-item
{
display
:
flex
;
align-items
:
center
;
box-sizing
:
border-box
;
background
:
#F
7F8FC
;
background
:
#F
FFFFF
;
font-size
:
24rpx
;
padding
:
8rpx
28rpx
;
font-weight
:
500
;
border
:
2rpx
solid
#F2F3F7
;
border-radius
:
12rpx
;
margin-bottom
:
16rpx
;
}
.scene-item
:last-child
{
.pro-box
{
display
:
flex
;
flex-wrap
:
wrap
;
}
.pro-item
{
position
:
relative
;
box-sizing
:
border-box
;
width
:
calc
((
100%
-
20rpx
)
/
2
);
margin-right
:
20rpx
;
height
:
64rpx
;
line-height
:
64rpx
;
text-align
:
center
;
background
:
#F2F3F7
;
border-radius
:
8rpx
;
margin-bottom
:
16rpx
;
}
.pro-item
:nth-child
(
2n
)
{
margin-right
:
0
;
}
...
...
@@ -111,16 +132,16 @@
}
/* 选中 - start */
.active.
scene
-item
{
background-image
:
linear-gradient
(
144deg
,
#F0F7FF
0%
,
#FFFFFF
73%
)
;
b
order
:
2rpx
solid
#3666FE
;
border
-radius
:
12rpx
;
.active.
pro
-item
{
color
:
#3666FE
;
b
ackground
:
#F0F7FF
;
border
:
2rpx
solid
#3E71FE
;
}
/* 选中 - end */
.scene-img
{
width
:
92
rpx
;
height
:
64
rpx
;
width
:
81
rpx
;
height
:
56
rpx
;
}
/* .notOpened {
...
...
packageMine/pages/customerManagement/editCustomer/editCustomer.wxml
View file @
9b66c2c
...
...
@@ -13,19 +13,18 @@
<glsx-image src="personal/arrow_right.png" class="arrow_right" />
</view>
<view wx:if="{{item.type == 'business'}}">
<!-- <view class="scene"> -->
<!-- <view class="scene-item {{item.isCheck ? 'active' : ''}}" wx:for="{{scenceList}}" wx:key="index" bindtap="handleSceneClick" data-idx="{{index}}" data-scenecode="{{item.sceneCode}}"> -->
<view wx:for="{{scenceList}}" wx:key="index" class="scene">
<!-- <glsx-image wx:if="{{item.isCheck}}" src="personal/scene-check.png" class="check-icon" /> -->
<view class="scene-item">
<image webp class="scene-img" src="{{IMGURL}}output/caracticon0{{item.sceneid + 1}}.png?v={{img_version}}"></image>
<view>{{item.name}}</view>
</view>
<view wx:for="{{item.productList}}" wx:for-item="subItem" wx:for-index="idx" wx:key="idx">
{{subItem.productName}}
<view class="pro-box">
<view wx:for="{{item.proList}}" wx:for-item="subItem" wx:for-index="idx" wx:key="idx" class="pro-item {{subItem.isCheck ? 'active' : ''}}" bindtap="handleProClick" data-sceneIdx="{{index}}" data-proIdx="{{idx}}">
<glsx-image wx:if="{{subItem.isCheck}}" src="personal/scene-check.png" class="check-icon" />
{{subItem.productName}}
</view>
</view>
</view>
<!-- </view> -->
</view>
</block>
</view>
...
...
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