Commit 6ece6502 by chenwq

申请业务和申请产品改版,样式提交

1 parent 838e517d
// 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
})
},
}
})
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file \ No newline at end of file
/* 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 \ No newline at end of file
<!--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 \ No newline at end of file
// 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()
},
}
})
{
"component": true,
"usingComponents": {
"van-action-sheet": "@vant/weapp/action-sheet/index",
"van-cell": "@vant/weapp/cell/index"
}
}
\ No newline at end of file \ No newline at end of file
/* 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 \ No newline at end of file
<!--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 \ No newline at end of file
...@@ -2,10 +2,11 @@ ...@@ -2,10 +2,11 @@
const navStyle = 'background-color: transparent;' const navStyle = 'background-color: transparent;'
import { IMG_URL } from '~/utils/constantData.js' import { IMG_URL } from '~/utils/constantData.js'
import applyApi from '~/api/applyApi/index' import applyApi from '~/api/applyApi/index'
import { addCoProductApi } from '~/api/applyProd.js'
// `${IMG_URL}index/car2.png`, // `${IMG_URL}index/car2.png`,
//本地图片路径 //本地图片路径
let IMG_URLLocal = '../../images/' 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' import { behavior as computedBehavior } from '~/utils/lib/miniprogram-computed'
Page({ Page({
...@@ -14,18 +15,16 @@ Page({ ...@@ -14,18 +15,16 @@ Page({
*/ */
behaviors: [computedBehavior], behaviors: [computedBehavior],
data: { data: {
scenceList,
// navStyle, // navStyle,
IMG_URL, IMG_URL,
carObj: { tabActive: 1,
name: '', tabList: [{
model: '', title: '申请业务',
selNum: '', name: 1
contact: '', }, {
phone: '' title: '申请产品',
}, name: 2
actNum:0, //选中的场景 }]
selectProdArr:[] //选中的产品数组
}, },
// computed: { // computed: {
// hasProdAct(data) { // hasProdAct(data) {
...@@ -40,34 +39,16 @@ Page({ ...@@ -40,34 +39,16 @@ Page({
// headerHeight: height / 2 + statusBarHeight + 88*2 // headerHeight: height / 2 + statusBarHeight + 88*2
}) })
}, },
selectCar(e) { onTabChange(e) {
// console.log('e: ', e); const { name } = e.detail
let {num} = e.currentTarget.dataset
this.setData({ this.setData({
actNum:num tabActive: name
}) })
}, },
selectProd(e){ // 申请业务
console.log('e: ', e); applyBusiness() {
let item = e.currentTarget.dataset.item const subCompData = this.selectComponent('#apply-business').data
let productName = item.productName let { name } = subCompData.carObj
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
// console.log('name: ', name) // console.log('name: ', name)
if (!name) { if (!name) {
wx.pro.showToast({ wx.pro.showToast({
...@@ -76,11 +57,10 @@ Page({ ...@@ -76,11 +57,10 @@ Page({
}) })
return return
} }
this.submitForm() this.submitBusinessForm(subCompData)
// console.log(123)
}, },
submitForm() { submitBusinessForm(subCompData) {
let { carObj, clueId,selectProdArr } = this.data let { carObj, clueId,selectProdArr } = subCompData
let selectProdArrStr = '' let selectProdArrStr = ''
selectProdArr.forEach((item,index)=>{selectProdArrStr+=`${item.productName}${selectProdArr.length-1 == index?'':';'}`}) selectProdArr.forEach((item,index)=>{selectProdArrStr+=`${item.productName}${selectProdArr.length-1 == index?'':';'}`})
...@@ -98,7 +78,6 @@ Page({ ...@@ -98,7 +78,6 @@ Page({
clueId, clueId,
intentProducts:selectProdArrStr intentProducts:selectProdArrStr
} }
// return wx.$api.showToast('申请成功') // return wx.$api.showToast('申请成功')
applyApi applyApi
.merchantApply(params) .merchantApply(params)
...@@ -107,22 +86,58 @@ Page({ ...@@ -107,22 +86,58 @@ Page({
if (result) { if (result) {
wx.$api.showToast('申请成功') wx.$api.showToast('申请成功')
setTimeout(() => { setTimeout(() => {
wx.$router.back(page => { wx.$router.back()
let node = page.selectComponent('#indexclue') // wx.$router.back(page => {
node && node.getClueInit() // let node = page.selectComponent('#indexclue')
}) // node && node.getClueInit()
// })
}, 1000) }, 1000)
} }
}) })
.catch(err => {}) .catch(err => {})
}, },
bindinputFn(e) { // 申请产品
// console.log("e: ", e); applyProduct() {
let name = e.currentTarget.dataset.name const subCompData = this.selectComponent('#apply-product').data
let content = e.detail.value let { prodName, selectStoreItem } = subCompData
this.setData({ if (!prodName) {
[`carObj.${name}`]: content 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)
}
}, },
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
......
{ {
"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", "navigationStyle": "custom",
"onReachBottomDistance": 10, "onReachBottomDistance": 10,
"enablePullDownRefresh": true "enablePullDownRefresh": true
......
...@@ -32,9 +32,6 @@ page { ...@@ -32,9 +32,6 @@ page {
display: flex; display: flex;
align-items: center; align-items: center;
.line { .line {
// width: 3px;
// height: 14px;
// background:var(--btnColor);
width: 6rpx; width: 6rpx;
height: 36rpx; height: 36rpx;
background: #3666fe; background: #3666fe;
...@@ -48,193 +45,6 @@ page { ...@@ -48,193 +45,6 @@ page {
// line-height: 48rpx; // 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 { .btn {
margin: 64rpx auto 0; margin: 64rpx auto 0;
......
<!-- pages/apply/apply.wxml --> <!-- pages/apply/apply.wxml -->
<wxs module="filter" src="./apply.wxs"></wxs>
<navigation-bar showBack="{{true}}" bindnavbarReady="navbarReady" navStyle="{{navStyle}}"> <navigation-bar showBack="{{true}}" bindnavbarReady="navbarReady" navStyle="{{navStyle}}">
申请业务 申请业务
</navigation-bar> </navigation-bar>
...@@ -9,61 +8,17 @@ ...@@ -9,61 +8,17 @@
<view class="content-wrap"> <view class="content-wrap">
<view class="content" hover-class="none" hover-stop-propagation> <view class="content" hover-class="none" hover-stop-propagation>
<view class="top"> <view class="top">
<view class="line" hover-class="none" hover-stop-propagation="false" /> <!-- <view class="line" hover-class="none" hover-stop-propagation="false" />
<view class="title" hover-class="none" hover-stop-propagation="false">开通门店账号</view> <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> </view>
<view class="inp-wrap"> <apply-business id="apply-business" wx:if="{{tabActive == 1}}"></apply-business>
<view class="title" hover-class="none" hover-stop-propagation="false"> <apply-product id="apply-product" wx:if="{{tabActive == 2}}"></apply-product>
开店名称
<text class="point">*</text>
</view> </view>
<input class="inp" placeholder-class="inp-placeholder" value="{{carObj.name}}" bindinput="bindinputFn" data-name="name" maxlength="{{30}}" placeholder="营业执照上的公司名称" />
</view> </view>
<view class="inp-wrap"> <button class="btn" bindtap="{{tabActive == 1 ? 'applyBusiness' : 'applyProduct'}}">{{ tabActive == 1 ? '提交开店信息' : '申请合作产品'}}</button>
<view class="title" hover-class="none" hover-stop-propagation="false">店面车型</view> <!-- <button class="btn" bindtap="applyFn">申请合作产品</button> -->
<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>
</view> </view>
\ No newline at end of file \ No newline at end of file
// pages/apply/apply.js // pages/apply/apply.js
const navStyle = 'background-color: transparent;' const navStyle = 'background-color: transparent;'
import { IMG_URL } from '~/utils/constantData.js' 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 { behavior as computedBehavior } from '~/utils/lib/miniprogram-computed'
import utils from '~/utils/util.js' import utils from '~/utils/util.js'
...@@ -13,9 +13,7 @@ Page({ ...@@ -13,9 +13,7 @@ Page({
data: { data: {
IMG_URL, IMG_URL,
// navStyle, // navStyle,
prodName:'',
cooperativeStore:'', cooperativeStore:'',
storeShow: false,
actions: [ actions: [
// { // {
// "merchantId": 0, // "merchantId": 0,
...@@ -26,13 +24,6 @@ Page({ ...@@ -26,13 +24,6 @@ Page({
// "merchantName": "选项2" // "merchantName": "选项2"
// }, // },
], ],
selectStoreItem:{},
scene:'' //场景值
},
computed: {
selectStoreValue(data) {
return data.selectStoreItem.name || '请输入合作门店'
}
}, },
// navbar高度设置 // navbar高度设置
navbarReady(e) { navbarReady(e) {
...@@ -42,20 +33,6 @@ Page({ ...@@ -42,20 +33,6 @@ Page({
// headerHeight: height / 2 + statusBarHeight + 88*2 // 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() { applyFn() {
...@@ -134,26 +111,6 @@ Page({ ...@@ -134,26 +111,6 @@ Page({
}) })
this.getMerchantListFn() 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
})
}
},
/** /**
* 生命周期函数--监听页面初次渲染完成 * 生命周期函数--监听页面初次渲染完成
......
...@@ -11,30 +11,6 @@ ...@@ -11,30 +11,6 @@
<view class="line" hover-class="none" hover-stop-propagation="false" /> <view class="line" hover-class="none" hover-stop-propagation="false" />
<view class="title" hover-class="none" hover-stop-propagation="false">申请合作</view> <view class="title" hover-class="none" hover-stop-propagation="false">申请合作</view>
</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>
</view> </view>
<button class="btn" bindtap="applyFn">申请合作产品</button> <button class="btn" bindtap="applyFn">申请合作产品</button>
......
...@@ -44,12 +44,14 @@ Page({ ...@@ -44,12 +44,14 @@ Page({
imgSrc: 'bus-pro', imgSrc: 'bus-pro',
name: '申请业务', name: '申请业务',
bindtap: 'openBus' bindtap: 'openBus'
}, { },
imgSrc: 'bus-pro', // {
name: '申请产品', // imgSrc: 'bus-pro',
bindtap: 'openPro', // name: '申请产品',
isHide: false // bindtap: 'openPro',
}, { // isHide: false
// },
{
imgSrc: 'valuation', imgSrc: 'valuation',
name: '预估产值', name: '预估产值',
bindtap: 'showCalculate', bindtap: 'showCalculate',
...@@ -233,12 +235,12 @@ Page({ ...@@ -233,12 +235,12 @@ Page({
wx.$router.go("/packagesList/apply/pages/apply"); wx.$router.go("/packagesList/apply/pages/apply");
}, },
// 开通产品 // 开通产品
openPro() { // openPro() {
let obj = { // let obj = {
scene:3 // scene:3
} // }
wx.$router.go("/packagesList/applyProd/pages/apply",obj); // wx.$router.go("/packagesList/applyProd/pages/apply",obj);
}, // },
// 预估产值 // 预估产值
showCalculate() { showCalculate() {
wx.$router.go("measure"); wx.$router.go("measure");
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!