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 6ece6502
authored
Feb 10, 2023
by
chenwq
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
申请业务和申请产品改版,样式提交
1 parent
838e517d
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
615 additions
and
387 deletions
packagesList/apply/components/ApplyBusiness/ApplyBusiness.js
packagesList/apply/components/ApplyBusiness/ApplyBusiness.json
packagesList/apply/components/ApplyBusiness/ApplyBusiness.scss
packagesList/apply/components/ApplyBusiness/ApplyBusiness.wxml
packagesList/apply/pages/apply.wxs → packagesList/apply/components/ApplyBusiness/ApplyBusiness.wxs
packagesList/apply/components/ApplyProduct/ApplyProduct.js
packagesList/apply/components/ApplyProduct/ApplyProduct.json
packagesList/apply/components/ApplyProduct/ApplyProduct.scss
packagesList/apply/components/ApplyProduct/ApplyProduct.wxml
packagesList/apply/pages/apply.js
packagesList/apply/pages/apply.json
packagesList/apply/pages/apply.scss
packagesList/apply/pages/apply.wxml
packagesList/applyProd/pages/apply.js
packagesList/applyProd/pages/apply.wxml
pages/tab/index/index.js
packagesList/apply/components/ApplyBusiness/ApplyBusiness.js
0 → 100644
View file @
6ece650
// packagesList/apply/components/ApplyBusiness/ApplyBusiness.js
import
{
scenceList
}
from
'~/pages/tab/index/constant/data'
Component
({
/**
* 组件的属性列表
*/
properties
:
{
},
/**
* 组件的初始数据
*/
data
:
{
scenceList
,
carObj
:
{
name
:
''
,
model
:
''
,
selNum
:
''
,
contact
:
''
,
phone
:
''
},
actNum
:
0
,
//选中的场景
selectProdArr
:[]
//选中的产品数组
},
/**
* 组件的方法列表
*/
methods
:
{
selectCar
(
e
)
{
// console.log('e: ', e);
let
{
num
}
=
e
.
currentTarget
.
dataset
this
.
setData
({
actNum
:
num
})
},
selectProd
(
e
){
console
.
log
(
'e: '
,
e
);
let
item
=
e
.
currentTarget
.
dataset
.
item
let
productName
=
item
.
productName
let
{
selectProdArr
}
=
this
.
data
;
let
searchIndex
=
selectProdArr
.
findIndex
((
item
)
=>
item
.
productName
==
productName
)
if
(
searchIndex
!=
-
1
){
// 找到item、删除
selectProdArr
.
splice
(
searchIndex
,
1
)
}
else
{
selectProdArr
.
push
(
item
)
}
this
.
setData
({
selectProdArr
})
console
.
log
(
this
.
data
.
selectProdArr
,
'selectProdArr--'
)
},
bindinputFn
(
e
)
{
// console.log("e: ", e);
let
name
=
e
.
currentTarget
.
dataset
.
name
let
content
=
e
.
detail
.
value
this
.
setData
({
[
`carObj.
${
name
}
`
]:
content
})
},
}
})
packagesList/apply/components/ApplyBusiness/ApplyBusiness.json
0 → 100644
View file @
6ece650
{
"component"
:
true
,
"usingComponents"
:
{}
}
\ No newline at end of file
packagesList/apply/components/ApplyBusiness/ApplyBusiness.scss
0 → 100644
View file @
6ece650
/* packagesList/apply/components/ApplyBusiness/ApplyBusiness.wxss */
.inp-wrap
{
margin-left
:
32rpx
;
display
:
flex
;
align-items
:
center
;
height
:
112rpx
;
border-bottom
:
1px
solid
#f3f3f3
;
.title
{
margin-right
:
64rpx
;
// margin-top: 8px;
// margin-bottom: 8px;
font-weight
:
500
;
font-size
:
14px
;
color
:
#323436
;
.point
{
color
:
#f35251
;
}
}
.inp
{
flex
:
1
;
height
:
112rpx
;
// padding: 7px 12px;
// border: 1px solid #E3E4E8;
// border-radius: 2px;
}
.inp-placeholder
{
font-family
:
PingFangSC-Regular
;
font-size
:
24rpx
;
color
:
#8a8c90
;
}
}
.scene-title
{
display
:
flex
;
align-items
:
center
;
margin-left
:
32rpx
;
margin-top
:
48rpx
;
margin-bottom
:
36rpx
;
font-weight
:
500
;
font-size
:
28rpx
;
color
:
#323436
;
.tip
{
font-size
:
22rpx
;
color
:
#6E6E7A
;
}
}
.content-product
{
.scene
{
// margin-top: 32rpx;
// margin-left: 20rpx;
// margin-right: 20rpx;
// margin-bottom: 10rpx;
margin
:
32rpx
16rpx
0
;
.scene-wrap
{
display
:
flex
;
}
.item-wrap
{
margin-right
:
8rpx
;
margin-bottom
:
40rpx
;
position
:
relative
;
width
:
160rpx
;
height
:
180rpx
;
border-radius
:
8rpx
;
border
:
1px
solid
#f7f8fc
;
box-sizing
:
border-box
;
}
.item
{
position
:
relative
;
// padding-top: 10px;
width
:
160rpx
;
height
:
180rpx
;
background
:
#f7f8fc
;
border-radius
:
8rpx
;
box-sizing
:
border-box
;
// border: 1px solid #f7f8fc;
}
.open-img
{
position
:
absolute
;
top
:
0
;
right
:
0
;
width
:
78rpx
;
height
:
78rpx
;
box-sizing
:
border-box
;
}
.act
{
// background-image: url("https://img02.glsx.com.cn/weapp/resource/saas/business-assistant/index/act.png");
// background-size: 100% 100%;
border
:
1px
solid
var
(
--
btnColor
);
// box-shadow: 0 2rpx 4rpx 0 rgba(180, 186, 204, 0.4);
background-image
:
linear-gradient
(
145deg
,
#f0f7ff
0%
,
#ffffff
73%
);
box-shadow
:
0
4rpx
8rpx
0
rgba
(
180
,
186
,
204
,
0
.32
)
,
0
8rpx
20rpx
0
rgba
(
180
,
186
,
204
,
0
.4
);
&
:
:
after
{
position
:
absolute
;
left
:
50%
;
bottom
:
-7px
;
display
:
block
;
content
:
""
;
width
:
6px
;
height
:
6px
;
border-bottom
:
1px
solid
var
(
--
btnColor
);
border-right
:
1px
solid
var
(
--
btnColor
);
transform
:
rotate
(
45deg
)
translateX
(
-50%
);
background-color
:
#fff
;
}
// .open-img{
// display: none;
// }
.item
{
background
:
transparent
;
}
}
.img
{
padding-top
:
10px
;
display
:
block
;
margin
:
0
auto
2px
;
width
:
28px
;
height
:
28px
;
}
.name
{
margin-bottom
:
2px
;
font-weight
:
500
;
font-size
:
12px
;
color
:
#323436
;
text-align
:
center
;
}
.msg
{
font-weight
:
500
;
font-size
:
18rpx
;
// color: #323436;
color
:
#8A8C90
;
text-align
:
center
;
}
}
}
.scene-select
{
display
:
flex
;
flex-wrap
:
wrap
;
padding
:
0
16rpx
32rpx
;
.scene-item
{
&
:nth-child
(
3n
+
3
)
{
margin-right
:
0
;
}
position
:
relative
;
margin-right
:
10rpx
;
margin-bottom
:
20rpx
;
width
:
216rpx
;
height
:
64rpx
;
background
:
#F5F5FA
;
border-radius
:
8rpx
;
font-size
:
28rpx
;
color
:
#323436
;
text-align
:
center
;
line-height
:
64rpx
;
box-sizing
:
border-box
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
white-space
:nowrap
;
}
.act
{
background
:
#F0F7FF
;
border
:
2rpx
solid
#3E71FE
;
border-radius
:
8rpx
;
font-weight
:
500
;
color
:
#3666FE
;
.act-img
{
display
:
block
;
}
}
.act-img
{
display
:
none
;
position
:
absolute
;
top
:
0
;
right
:
0
;
width
:
30rpx
;
height
:
22rpx
;
}
}
\ No newline at end of file
packagesList/apply/components/ApplyBusiness/ApplyBusiness.wxml
0 → 100644
View file @
6ece650
<!--packagesList/apply/components/ApplyBusiness/ApplyBusiness.wxml-->
<wxs module="filter" src="./ApplyBusiness.wxs"></wxs>
<view>
<view class="inp-wrap">
<view class="title" hover-class="none" hover-stop-propagation="false">
开店名称
<text class="point">*</text>
</view>
<input class="inp" placeholder-class="inp-placeholder" value="{{carObj.name}}" bindinput="bindinputFn" data-name="name" maxlength="{{30}}" placeholder="营业执照上的公司名称" />
</view>
<view class="inp-wrap">
<view class="title" hover-class="none" hover-stop-propagation="false">店面车型</view>
<input class="inp" placeholder-class="inp-placeholder" value="{{carObj.model}}" bindinput="bindinputFn" data-name="model" maxlength="{{30}}" placeholder="主营品牌/车型" />
</view>
<view class="inp-wrap">
<view class="title" hover-class="none" hover-stop-propagation="false">店面新车销量/基盘客户</view>
<input class="inp" placeholder-class="inp-placeholder" value="{{carObj.selNum}}" bindinput="bindinputFn" data-name="selNum" maxlength="{{30}}" placeholder="请输入数字" />
</view>
<view class="inp-wrap">
<view class="title" hover-class="none" hover-stop-propagation="false">门店联系人</view>
<input class="inp" placeholder-class="inp-placeholder" value="{{carObj.contact}}" bindinput="bindinputFn" data-name="contact" placeholder="请输入联系人" />
</view>
<view class="inp-wrap">
<view class="title" hover-class="none" hover-stop-propagation="false">联系人手机号</view>
<input class="inp" placeholder-class="inp-placeholder" value="{{carObj.phone}}" bindinput="bindinputFn" data-name="phone" placeholder="请输入手机号" />
</view>
<view class="scene-title" hover-class="none" hover-stop-propagation="false">业务场景</view>
<view class="content-product">
<view class="scene">
<scroll-view scroll-x="{{true}}">
<view class="scene-wrap">
<view class="item-wrap {{actNum== index ? 'act':''}}" data-num="{{index}}" data-scenestatus="{{item.sceneStatus}}" bindtap="selectCar" wx:for="{{scenceList}}" wx:key="name">
<view class="item">
<image webp class="img" src="{{item.src}}" />
<view class="name">{{item.name}}</view>
<view class="msg">{{item.msg}}</view>
</view>
</view>
</view>
</scroll-view>
</view>
</view>
<view class="scene-title" hover-class="none" hover-stop-propagation="false">
业务场景
<view class="tip" hover-class="none" hover-stop-propagation="false">(可多选)</view>
</view>
<view class="scene-select">
<view class="scene-item {{filter.hasProdAct(item,selectProdArr)?'act':''}}" wx:for="{{scenceList[actNum]['productList']}}" wx:key="index" data-item="{{item}}" data-index="{{index}}" bindtap="selectProd">
<glsx-image webp class="act-img" src="index/act-img.png"></glsx-image>
{{item.productName}}
</view>
</view>
</view>
\ No newline at end of file
packagesList/apply/
pages/apply
.wxs
→
packagesList/apply/
components/ApplyBusiness/ApplyBusiness
.wxs
View file @
6ece650
File moved
packagesList/apply/components/ApplyProduct/ApplyProduct.js
0 → 100644
View file @
6ece650
// packagesList/apply/components/ApplyProduct/ApplyProduct.js
import
{
getMerchantListApi
}
from
'~/api/applyProd.js'
import
{
behavior
as
computedBehavior
}
from
'~/utils/lib/miniprogram-computed'
Component
({
/**
* 组件的属性列表
*/
properties
:
{
},
/**
* 组件的初始数据
*/
behaviors
:
[
computedBehavior
],
data
:
{
prodName
:
''
,
storeShow
:
false
,
selectStoreItem
:
{},
scene
:
3
//场景值
},
computed
:
{
selectStoreValue
(
data
)
{
return
data
.
selectStoreItem
.
name
||
'请输入合作门店'
}
},
lifetimes
:
{
attached
()
{
this
.
getMerchantListFn
()
}
},
/**
* 组件的方法列表
*/
methods
:
{
//获取门店
async
getMerchantListFn
()
{
let
{
scene
}
=
this
.
data
let
userInfo
=
wx
.
$storage
.
get
(
'userInfo'
)
let
params
=
{
// scene,
serviceMerchantId
:
userInfo
.
merchantId
}
let
{
code
,
data
}
=
await
getMerchantListApi
(
params
)
if
(
code
==
0
&&
data
.
length
!=
0
)
{
data
=
data
.
map
(
item
=>
{
item
.
name
=
item
.
merchantName
return
item
})
// console.log('data: ', data);
this
.
setData
({
actions
:
data
})
}
},
// 选择门店
selectStore
()
{
this
.
setData
({
storeShow
:
true
});
},
onStoreClose
()
{
this
.
setData
({
storeShow
:
false
});
},
onStoreSelect
(
event
)
{
console
.
log
(
event
.
detail
);
let
selectStoreItem
=
event
.
detail
this
.
setData
({
selectStoreItem
})
this
.
onStoreClose
()
},
}
})
packagesList/apply/components/ApplyProduct/ApplyProduct.json
0 → 100644
View file @
6ece650
{
"component"
:
true
,
"usingComponents"
:
{
"van-action-sheet"
:
"@vant/weapp/action-sheet/index"
,
"van-cell"
:
"@vant/weapp/cell/index"
}
}
\ No newline at end of file
packagesList/apply/components/ApplyProduct/ApplyProduct.scss
0 → 100644
View file @
6ece650
/* packagesList/apply/components/ApplyProduct/ApplyProduct.wxss */
.inp-wrap
{
margin-left
:
32rpx
;
display
:
flex
;
align-items
:
center
;
height
:
112rpx
;
border-bottom
:
1px
solid
#f3f3f3
;
.title
{
margin-right
:
64rpx
;
// margin-top: 8px;
// margin-bottom: 8px;
font-weight
:
500
;
font-size
:
14px
;
color
:
#323436
;
.point
{
color
:
#f35251
;
}
}
.inp
{
flex
:
1
;
height
:
112rpx
;
// padding: 7px 12px;
// border: 1px solid #E3E4E8;
// border-radius: 2px;
}
.inp-placeholder
{
font-family
:
PingFangSC-Regular
;
font-size
:
24rpx
;
color
:
#8a8c90
;
}
.out-van-cell
{
flex
:
1
;
.inp-van-cell
{
&
.van-cell
{
height
:
112rpx
;
line-height
:
112rpx
;
padding
:
0
;
flex
:
1
;
.point
{
color
:
#f35251
;
}
// line-height: 1;
}
&
:after
{
display
:
none
;
}
.van-cell__title
{
flex
:
none
;
width
:
184rpx
;
}
.van-cell__value
{
text-align
:
left
;
}
.van-cell__right-icon-wrap
{
margin-right
:
32rpx
;
height
:
112rpx
;
line-height
:
112rpx
;
}
}
}
}
.list-sheet-wrap
{
max-height
:
60vh
;
overflow-y
:
auto
;
}
\ No newline at end of file
packagesList/apply/components/ApplyProduct/ApplyProduct.wxml
0 → 100644
View file @
6ece650
<!--packagesList/apply/components/ApplyProduct/ApplyProduct.wxml-->
<view class="inp-wrap">
<view class="title" hover-class="none" hover-stop-propagation="false">
您的产品名称
<text class="point">*</text>
</view>
<input class="inp" placeholder-class="inp-placeholder" model:value="{{prodName}}" maxlength="{{10}}" placeholder="请输入产品名称" />
</view>
<view class="inp-wrap">
<view class="out-van-cell">
<van-cell custom-class="inp-van-cell" value="{{selectStoreValue}}" is-link bind:click="selectStore">
<view slot="title" class="title">
<view class="van-cell-text">
合作门店
<text class="point">*</text>
</view>
</view>
</van-cell>
</view>
</view>
<view>
<van-action-sheet show="{{ storeShow }}" cancel-text="取消" actions="{{ actions }}" list-class="list-sheet-wrap" bind:cancel="onStoreClose" bind:close="onStoreClose" bind:select="onStoreSelect" />
</view>
\ No newline at end of file
packagesList/apply/pages/apply.js
View file @
6ece650
...
...
@@ -2,10 +2,11 @@
const
navStyle
=
'background-color: transparent;'
import
{
IMG_URL
}
from
'~/utils/constantData.js'
import
applyApi
from
'~/api/applyApi/index'
import
{
addCoProductApi
}
from
'~/api/applyProd.js'
// `${IMG_URL}index/car2.png`,
//本地图片路径
let
IMG_URLLocal
=
'../../images/'
import
{
scenceList
}
from
'~/pages/tab/index/constant/data
'
import
utils
from
'~/utils/util.js
'
import
{
behavior
as
computedBehavior
}
from
'~/utils/lib/miniprogram-computed'
Page
({
...
...
@@ -14,18 +15,16 @@ Page({
*/
behaviors
:
[
computedBehavior
],
data
:
{
scenceList
,
// navStyle,
IMG_URL
,
carObj
:
{
name
:
''
,
model
:
''
,
selNum
:
''
,
contact
:
''
,
phone
:
''
},
actNum
:
0
,
//选中的场景
selectProdArr
:[]
//选中的产品数组
tabActive
:
1
,
tabList
:
[{
title
:
'申请业务'
,
name
:
1
},
{
title
:
'申请产品'
,
name
:
2
}]
},
// computed: {
// hasProdAct(data) {
...
...
@@ -40,34 +39,16 @@ Page({
// headerHeight: height / 2 + statusBarHeight + 88*2
})
},
selectCar
(
e
)
{
// console.log('e: ', e);
let
{
num
}
=
e
.
currentTarget
.
dataset
onTabChange
(
e
)
{
const
{
name
}
=
e
.
detail
this
.
setData
({
actNum
:
num
tabActive
:
name
})
},
selectProd
(
e
){
console
.
log
(
'e: '
,
e
);
let
item
=
e
.
currentTarget
.
dataset
.
item
let
productName
=
item
.
productName
let
{
selectProdArr
}
=
this
.
data
;
let
searchIndex
=
selectProdArr
.
findIndex
((
item
)
=>
item
.
productName
==
productName
)
if
(
searchIndex
!=
-
1
){
// 找到item、删除
selectProdArr
.
splice
(
searchIndex
,
1
)
}
else
{
selectProdArr
.
push
(
item
)
}
this
.
setData
({
selectProdArr
})
},
// 提交信息
applyFn
()
{
let
{
name
}
=
this
.
data
.
carObj
// 申请业务
applyBusiness
()
{
const
subCompData
=
this
.
selectComponent
(
'#apply-business'
).
data
let
{
name
}
=
subCompData
.
carObj
// console.log('name: ', name)
if
(
!
name
)
{
wx
.
pro
.
showToast
({
...
...
@@ -76,11 +57,10 @@ Page({
})
return
}
this
.
submitForm
()
// console.log(123)
this
.
submitBusinessForm
(
subCompData
)
},
submit
Form
(
)
{
let
{
carObj
,
clueId
,
selectProdArr
}
=
this
.
d
ata
submit
BusinessForm
(
subCompData
)
{
let
{
carObj
,
clueId
,
selectProdArr
}
=
subCompD
ata
let
selectProdArrStr
=
''
selectProdArr
.
forEach
((
item
,
index
)
=>
{
selectProdArrStr
+=
`
${
item
.
productName
}${
selectProdArr
.
length
-
1
==
index
?
''
:
';'
}
`
})
...
...
@@ -98,7 +78,6 @@ Page({
clueId
,
intentProducts
:
selectProdArrStr
}
// return wx.$api.showToast('申请成功')
applyApi
.
merchantApply
(
params
)
...
...
@@ -107,22 +86,58 @@ Page({
if
(
result
)
{
wx
.
$api
.
showToast
(
'申请成功'
)
setTimeout
(()
=>
{
wx
.
$router
.
back
(
page
=>
{
let
node
=
page
.
selectComponent
(
'#indexclue'
)
node
&&
node
.
getClueInit
()
})
wx
.
$router
.
back
()
// wx.$router.back(page => {
// let node = page.selectComponent('#indexclue')
// node && node.getClueInit()
// })
},
1000
)
}
})
.
catch
(
err
=>
{})
},
bindinputFn
(
e
)
{
// console.log("e: ", e);
let
name
=
e
.
currentTarget
.
dataset
.
name
let
content
=
e
.
detail
.
value
this
.
setData
({
[
`carObj.
${
name
}
`
]:
content
})
// 申请产品
applyProduct
()
{
const
subCompData
=
this
.
selectComponent
(
'#apply-product'
).
data
let
{
prodName
,
selectStoreItem
}
=
subCompData
if
(
!
prodName
)
{
wx
.
pro
.
showToast
({
title
:
'请输入产品名称'
,
icon
:
'error'
})
return
}
if
(
utils
.
isEmptyObj
(
selectStoreItem
)){
wx
.
pro
.
showToast
({
title
:
'请选择合作门店'
,
icon
:
'error'
})
return
}
this
.
submitProductForm
(
subCompData
)
},
async
submitProductForm
(
subCompData
)
{
let
{
prodName
,
selectStoreItem
}
=
subCompData
let
userInfo
=
wx
.
$storage
.
get
(
'userInfo'
)
let
params
=
{
...
selectStoreItem
,
serviceMerchantId
:
userInfo
.
merchantId
,
serviceMerchantName
:
userInfo
.
merchantName
,
coProduct
:
prodName
}
let
{
code
}
=
await
addCoProductApi
(
params
)
if
(
code
==
0
){
wx
.
$api
.
showToast
(
'申请成功'
)
setTimeout
(()
=>
{
wx
.
$router
.
back
()
// wx.$router.back(page => {
// let node = page.selectComponent('#indexclue')
// node && node.getClueInit()
// })
},
1000
)
}
},
/**
* 生命周期函数--监听页面加载
...
...
packagesList/apply/pages/apply.json
View file @
6ece650
{
"usingComponents"
:
{},
"usingComponents"
:
{
"apply-business"
:
"../components/ApplyBusiness/ApplyBusiness"
,
"apply-product"
:
"../components/ApplyProduct/ApplyProduct"
,
"van-tab"
:
"@vant/weapp/tab/index"
,
"van-tabs"
:
"@vant/weapp/tabs/index"
},
"navigationStyle"
:
"custom"
,
"onReachBottomDistance"
:
10
,
"enablePullDownRefresh"
:
true
...
...
packagesList/apply/pages/apply.scss
View file @
6ece650
...
...
@@ -32,9 +32,6 @@ page {
display
:
flex
;
align-items
:
center
;
.line
{
// width: 3px;
// height: 14px;
// background:var(--btnColor);
width
:
6rpx
;
height
:
36rpx
;
background
:
#3666fe
;
...
...
@@ -48,193 +45,6 @@ page {
// line-height: 48rpx;
}
}
.inp-wrap
{
margin-left
:
32rpx
;
display
:
flex
;
align-items
:
center
;
height
:
112rpx
;
border-bottom
:
1px
solid
#f3f3f3
;
.title
{
margin-right
:
64rpx
;
// margin-top: 8px;
// margin-bottom: 8px;
font-weight
:
500
;
font-size
:
14px
;
color
:
#323436
;
.point
{
color
:
#f35251
;
}
}
.inp
{
flex
:
1
;
height
:
112rpx
;
// padding: 7px 12px;
// border: 1px solid #E3E4E8;
// border-radius: 2px;
}
.inp-placeholder
{
font-family
:
PingFangSC-Regular
;
font-size
:
24rpx
;
color
:
#8a8c90
;
}
}
.scene-title
{
display
:
flex
;
align-items
:
center
;
margin-left
:
32rpx
;
margin-top
:
48rpx
;
margin-bottom
:
36rpx
;
font-weight
:
500
;
font-size
:
28rpx
;
color
:
#323436
;
.tip
{
font-size
:
22rpx
;
color
:
#6E6E7A
;
}
}
.content-product
{
.scene
{
// margin-top: 32rpx;
// margin-left: 20rpx;
// margin-right: 20rpx;
// margin-bottom: 10rpx;
margin
:
32rpx
16rpx
0
;
.scene-wrap
{
display
:
flex
;
}
.item-wrap
{
margin-right
:
8rpx
;
margin-bottom
:
40rpx
;
position
:
relative
;
width
:
160rpx
;
height
:
180rpx
;
border-radius
:
8rpx
;
border
:
1px
solid
#f7f8fc
;
box-sizing
:
border-box
;
}
.item
{
position
:
relative
;
// padding-top: 10px;
width
:
160rpx
;
height
:
180rpx
;
background
:
#f7f8fc
;
border-radius
:
8rpx
;
box-sizing
:
border-box
;
// border: 1px solid #f7f8fc;
}
.open-img
{
position
:
absolute
;
top
:
0
;
right
:
0
;
width
:
78rpx
;
height
:
78rpx
;
box-sizing
:
border-box
;
}
.act
{
// background-image: url("https://img02.glsx.com.cn/weapp/resource/saas/business-assistant/index/act.png");
// background-size: 100% 100%;
border
:
1px
solid
var
(
--
btnColor
);
// box-shadow: 0 2rpx 4rpx 0 rgba(180, 186, 204, 0.4);
background-image
:
linear-gradient
(
145deg
,
#f0f7ff
0%
,
#ffffff
73%
);
box-shadow
:
0
4rpx
8rpx
0
rgba
(
180
,
186
,
204
,
0
.32
)
,
0
8rpx
20rpx
0
rgba
(
180
,
186
,
204
,
0
.4
);
&
:
:
after
{
position
:
absolute
;
left
:
50%
;
bottom
:
-7px
;
display
:
block
;
content
:
""
;
width
:
6px
;
height
:
6px
;
border-bottom
:
1px
solid
var
(
--
btnColor
);
border-right
:
1px
solid
var
(
--
btnColor
);
transform
:
rotate
(
45deg
)
translateX
(
-50%
);
background-color
:
#fff
;
}
// .open-img{
// display: none;
// }
.item
{
background
:
transparent
;
}
}
.img
{
padding-top
:
10px
;
display
:
block
;
margin
:
0
auto
2px
;
width
:
28px
;
height
:
28px
;
}
.name
{
margin-bottom
:
2px
;
font-weight
:
500
;
font-size
:
12px
;
color
:
#323436
;
text-align
:
center
;
}
.msg
{
font-weight
:
500
;
font-size
:
18rpx
;
// color: #323436;
color
:
#8A8C90
;
text-align
:
center
;
}
}
}
.scene-select
{
display
:
flex
;
flex-wrap
:
wrap
;
padding
:
0
16rpx
32rpx
;
.scene-item
{
&
:nth-child
(
3n
+
3
)
{
margin-right
:
0
;
}
position
:
relative
;
margin-right
:
10rpx
;
margin-bottom
:
20rpx
;
width
:
216rpx
;
height
:
64rpx
;
background
:
#F5F5FA
;
border-radius
:
8rpx
;
font-size
:
28rpx
;
color
:
#323436
;
text-align
:
center
;
line-height
:
64rpx
;
box-sizing
:
border-box
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
white-space
:nowrap
;
}
.act
{
background
:
#F0F7FF
;
border
:
2rpx
solid
#3E71FE
;
border-radius
:
8rpx
;
font-weight
:
500
;
color
:
#3666FE
;
.act-img
{
display
:
block
;
}
}
.act-img
{
display
:
none
;
position
:absolute
;
top
:
0
;
right
:
0
;
width
:
30rpx
;
height
:
22rpx
;
}
}
}
.btn
{
margin
:
64rpx
auto
0
;
...
...
packagesList/apply/pages/apply.wxml
View file @
6ece650
<!-- pages/apply/apply.wxml -->
<wxs module="filter" src="./apply.wxs"></wxs>
<navigation-bar showBack="{{true}}" bindnavbarReady="navbarReady" navStyle="{{navStyle}}">
申请业务
申请业务
</navigation-bar>
<view class="apply">
<image class="head" src="{{IMG_URL}}index/apply-title.png" style="height:{{tabBarStyle}}px;" />
<image class="introduce" src="{{IMG_URL}}index/new-apply-bg.png" />
<view class="content-wrap">
<view class="content" hover-class="none" hover-stop-propagation>
<view class="top">
<view class="line" hover-class="none" hover-stop-propagation="false" />
<view class="title" hover-class="none" hover-stop-propagation="false">开通门店账号</view>
</view>
<view class="inp-wrap">
<view class="title" hover-class="none" hover-stop-propagation="false">
开店名称
<text class="point">*</text>
</view>
<input class="inp" placeholder-class="inp-placeholder" value="{{carObj.name}}" bindinput="bindinputFn" data-name="name" maxlength="{{30}}" placeholder="营业执照上的公司名称" />
</view>
<view class="inp-wrap">
<view class="title" hover-class="none" hover-stop-propagation="false">店面车型</view>
<input class="inp" placeholder-class="inp-placeholder" value="{{carObj.model}}" bindinput="bindinputFn" data-name="model" maxlength="{{30}}" placeholder="主营品牌/车型" />
</view>
<view class="inp-wrap">
<view class="title" hover-class="none" hover-stop-propagation="false">店面新车销量/基盘客户</view>
<input class="inp" placeholder-class="inp-placeholder" value="{{carObj.selNum}}" bindinput="bindinputFn" data-name="selNum" maxlength="{{30}}" placeholder="请输入数字" />
</view>
<view class="inp-wrap">
<view class="title" hover-class="none" hover-stop-propagation="false">门店联系人</view>
<input class="inp" placeholder-class="inp-placeholder" value="{{carObj.contact}}" bindinput="bindinputFn" data-name="contact" placeholder="请输入联系人" />
</view>
<view class="inp-wrap">
<view class="title" hover-class="none" hover-stop-propagation="false">联系人手机号</view>
<input class="inp" placeholder-class="inp-placeholder" value="{{carObj.phone}}" bindinput="bindinputFn" data-name="phone" placeholder="请输入手机号" />
</view>
<view class="scene-title" hover-class="none" hover-stop-propagation="false">业务场景</view>
<view class="content-product">
<view class="scene">
<!-- wx:if="{{item.sceneStatus == 1}}" -->
<scroll-view scroll-x="{{true}}">
<view class="scene-wrap">
<view class="item-wrap {{actNum== index ? 'act':''}}" data-num="{{index}}" data-scenestatus="{{item.sceneStatus}}" bindtap="selectCar" wx:for="{{scenceList}}" wx:key="name">
<view class="item">
<!-- <image class="open-img" wx:if="{{item.sceneStatus == 1}}" src="{{IMG_URL}}/output/openedIcon.png" /> -->
<image webp class="img" src="{{item.src}}" />
<view class="name">{{item.name}}</view>
<view class="msg">{{item.msg}}</view>
</view>
</view>
</view>
</scroll-view>
</view>
</view>
<view class="scene-title" hover-class="none" hover-stop-propagation="false">
业务场景
<view class="tip" hover-class="none" hover-stop-propagation="false">(可多选)</view>
</view>
<view class="scene-select">
<view class="scene-item {{filter.hasProdAct(item,selectProdArr)?'act':''}}" wx:for="{{scenceList[actNum]['productList']}}" wx:key="index" data-item="{{item}}" data-index="{{index}}" bindtap="selectProd">
<glsx-image webp class="act-img" src="index/act-img.png"></glsx-image>
{{item.productName}}
</view>
</view>
</view>
</view>
<button class="btn" bindtap="applyFn">提交开店信息</button>
<image class="head" src="{{IMG_URL}}index/apply-title.png" style="height:{{tabBarStyle}}px;" />
<image class="introduce" src="{{IMG_URL}}index/new-apply-bg.png" />
<view class="content-wrap">
<view class="content" hover-class="none" hover-stop-propagation>
<view class="top">
<!-- <view class="line" hover-class="none" hover-stop-propagation="false" />
<view class="title" hover-class="none" hover-stop-propagation="false">开通门店账号</view> -->
<van-tabs active="{{ tabActive }}" bind:change="onTabChange">
<van-tab wx:for="{{tabList}}" wx:key="index" title="{{item.title}}" name="{{item.name}}">
</van-tab>
</van-tabs>
</view>
<apply-business id="apply-business" wx:if="{{tabActive == 1}}"></apply-business>
<apply-product id="apply-product" wx:if="{{tabActive == 2}}"></apply-product>
</view>
</view>
<button class="btn" bindtap="{{tabActive == 1 ? 'applyBusiness' : 'applyProduct'}}">{{ tabActive == 1 ? '提交开店信息' : '申请合作产品'}}</button>
<!-- <button class="btn" bindtap="applyFn">申请合作产品</button> -->
</view>
\ No newline at end of file
packagesList/applyProd/pages/apply.js
View file @
6ece650
// pages/apply/apply.js
const
navStyle
=
'background-color: transparent;'
import
{
IMG_URL
}
from
'~/utils/constantData.js'
import
{
getMerchantListApi
,
addCoProductApi
}
from
'~/api/applyProd.js'
import
{
addCoProductApi
}
from
'~/api/applyProd.js'
import
{
behavior
as
computedBehavior
}
from
'~/utils/lib/miniprogram-computed'
import
utils
from
'~/utils/util.js'
...
...
@@ -13,9 +13,7 @@ Page({
data
:
{
IMG_URL
,
// navStyle,
prodName
:
''
,
cooperativeStore
:
''
,
storeShow
:
false
,
actions
:
[
// {
// "merchantId": 0,
...
...
@@ -26,13 +24,6 @@ Page({
// "merchantName": "选项2"
// },
],
selectStoreItem
:{},
scene
:
''
//场景值
},
computed
:
{
selectStoreValue
(
data
)
{
return
data
.
selectStoreItem
.
name
||
'请输入合作门店'
}
},
// navbar高度设置
navbarReady
(
e
)
{
...
...
@@ -42,20 +33,6 @@ Page({
// headerHeight: height / 2 + statusBarHeight + 88*2
})
},
// 选择门店
selectStore
(){
this
.
setData
({
storeShow
:
true
});
},
onStoreClose
()
{
this
.
setData
({
storeShow
:
false
});
},
onStoreSelect
(
event
)
{
console
.
log
(
event
.
detail
);
let
selectStoreItem
=
event
.
detail
this
.
setData
({
selectStoreItem
})
this
.
onStoreClose
()
},
// 提交信息
applyFn
()
{
...
...
@@ -134,26 +111,6 @@ Page({
})
this
.
getMerchantListFn
()
},
//获取门店
async
getMerchantListFn
(){
let
{
scene
}
=
this
.
data
let
userInfo
=
wx
.
$storage
.
get
(
'userInfo'
)
let
params
=
{
// scene,
serviceMerchantId
:
userInfo
.
merchantId
}
let
{
code
,
data
}
=
await
getMerchantListApi
(
params
)
if
(
code
==
0
&&
data
.
length
!=
0
){
data
=
data
.
map
(
item
=>
{
item
.
name
=
item
.
merchantName
return
item
}
)
// console.log('data: ', data);
this
.
setData
({
actions
:
data
})
}
},
/**
* 生命周期函数--监听页面初次渲染完成
...
...
packagesList/applyProd/pages/apply.wxml
View file @
6ece650
...
...
@@ -11,30 +11,6 @@
<view class="line" hover-class="none" hover-stop-propagation="false" />
<view class="title" hover-class="none" hover-stop-propagation="false">申请合作</view>
</view>
<view class="inp-wrap">
<view class="title" hover-class="none" hover-stop-propagation="false">
您的产品名称
<text class="point">*</text>
</view>
<input class="inp" placeholder-class="inp-placeholder" model:value="{{prodName}}" maxlength="{{10}}" placeholder="请输入产品名称" />
</view>
<view class="inp-wrap">
<!-- <view class="title" hover-class="none" hover-stop-propagation="false">
合作门店
<text class="point">*</text>
</view> -->
<!-- <input class="inp" placeholder-class="inp-placeholder" model:value="{{cooperativeStore}}" maxlength="{{30}}" placeholder="营业执照上的公司名称" /> -->
<view class="out-van-cell">
<van-cell custom-class="inp-van-cell" value="{{selectStoreValue}}" is-link bind:click="selectStore">
<view slot="title">
<view class="van-cell-text">
合作门店
<text class="point">*</text>
</view>
</view>
</van-cell>
</view>
</view>
</view>
</view>
<button class="btn" bindtap="applyFn">申请合作产品</button>
...
...
pages/tab/index/index.js
View file @
6ece650
...
...
@@ -44,12 +44,14 @@ Page({
imgSrc
:
'bus-pro'
,
name
:
'申请业务'
,
bindtap
:
'openBus'
},
{
imgSrc
:
'bus-pro'
,
name
:
'申请产品'
,
bindtap
:
'openPro'
,
isHide
:
false
},
{
},
// {
// imgSrc: 'bus-pro',
// name: '申请产品',
// bindtap: 'openPro',
// isHide: false
// },
{
imgSrc
:
'valuation'
,
name
:
'预估产值'
,
bindtap
:
'showCalculate'
,
...
...
@@ -233,12 +235,12 @@ Page({
wx
.
$router
.
go
(
"/packagesList/apply/pages/apply"
);
},
// 开通产品
openPro
()
{
let
obj
=
{
scene
:
3
}
wx
.
$router
.
go
(
"/packagesList/applyProd/pages/apply"
,
obj
);
},
//
openPro() {
//
let obj = {
//
scene:3
//
}
//
wx.$router.go("/packagesList/applyProd/pages/apply",obj);
//
},
// 预估产值
showCalculate
()
{
wx
.
$router
.
go
(
"measure"
);
...
...
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