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