Commit 1ae3228f by 张立顺

冲突解决

2 parents 73a5800d 17c81ae8
......@@ -13,6 +13,10 @@ Component({
type: Boolean,
value: true
},
hasLockIcon: {
type: Boolean,
value: true
},
formData: {
type: Object,
value: () => { }
......
......@@ -10,8 +10,11 @@
已开通
</view>
<image wx:if="{{formData['scene' + (index + 1)]}}" class="scene-img" src="{{IMGURL}}output/caract0{{index + 1}}.png?v={{img_version}}" />
<image wx:else class="scene-img" src="{{IMGURL}}output/car0{{index + 1}}.png?v={{img_version}}" />
<view class="scene-title {{hasOpenIcon && formData['scene' + (index + 1)] && sceneActive != (index + 1)?'':'notOpened'}}">
<view wx:else class="no-open-img">
<image wx:if="{{hasLockIcon}}" class="lock-img" src="{{IMGURL}}output/carlock0{{index + 1}}.png?v={{img_version}}" />
<image wx:else="" class="scene-img" src="{{IMGURL}}output/car0{{index + 1}}.png?v={{img_version}}" />
</view>
<view class="scene-title {{formData['scene' + (index + 1)] ? '' : 'on-open'}}">
{{item.title}}
</view>
<view>{{item.subTitle}}</view>
......
......@@ -19,7 +19,7 @@
color: #8A8C90;
padding: 32rpx 0 28rpx;
border-radius: 12rpx;
margin-bottom: 20rpx;
/* margin-bottom: 20rpx; */
}
.scene-item:last-child {
......@@ -66,11 +66,12 @@
.active::after {
position: absolute;
left: 50%;
bottom: -7px;
bottom: -18rpx;
display: block;
content: "";
width: 6px;
height: 6px;
width: 16rpx;
height: 16rpx;
/* border-radius: 4rpx; */
border-bottom: 1px solid var(--btnColor);
border-right: 1px solid var(--btnColor);
transform: rotate(45deg) translateX(-50%);
......@@ -81,7 +82,14 @@
.scene-title {
color: #323436;
/* font-weight: 600; */
}
.scene-title.on-open {
color: #8A8C90;
}
.no-open-img {
position: relative;
}
.scene-img {
......@@ -89,6 +97,11 @@
height: 56rpx;
}
.lock-img {
width: 92rpx;
height: 64rpx;
}
.total-price {
height: 40rpx;
line-height: 40rpx;
......
......@@ -2,7 +2,7 @@
<block wx:if="{{openScroll}}">
<scroll-view
class="tab-box {{align}} {{outClassName}}"
style="{{productHeight ? 'height: 68rpx;' : ''}}"
style="{{productHeight ? 'height: 72rpx;' : ''}}"
scroll-x
enable-flex
scroll-with-animation
......@@ -28,7 +28,7 @@
<block wx:for="{{tab}}" wx:key="index">
<view
class="tab {{index==count?'active':''}}"
style="width:{{itemWidth}}"
style="width:{{itemWidth}}; {{index == 0 ? 'margin-left: 32rpx;' : ''}}"
bindtap="click"
data-count="{{index}}"
>
......
......@@ -221,7 +221,10 @@ Component({
message
}) => {
if (code == '0') this.checkLoginUserInfo(data)
else wx.$api.showToast(message || '系统异常')
else {
wx.$api.showToast(message || '系统异常')
this.init()
}
this.setBtnLoading(false)
})
.catch(({
......@@ -229,6 +232,7 @@ Component({
}) => {
wx.$api.showToast(errMsg || '系统异常')
this.setBtnLoading(false)
this.init()
})
},
/**手机号&微信登录:是否跳转登录列表页 */
......
......@@ -51,7 +51,7 @@ page {
.box {
&-title {
font-weight: 600;
padding: 0 0 16rpx 12rpx;
padding: 32rpx 0 16rpx 12rpx;
}
.title-tip {
......@@ -85,28 +85,30 @@ page {
background: #F0F7FF;
border: 2rpx solid #3E71FE;
color: #3666FE;
border: 1rpx solid #3E71FE;
}
}
}
.btn {
position: fixed;
bottom: 0;
bottom: 16rpx;
left: 0;
width: 100%;
width: calc(100% - 64rpx);
height: 88rpx;
line-height: 88rpx;
font-size: 34rpx;
color: #FFFFFF;
text-align: center;
font-size: 28rpx;
color: #FFFFFF;
margin: 0 32rpx;
}
.btn-blue {
background: #3666FE;
border-radius: 8rpx;
}
.btn-disabled {
background: #CCCED1;
border-radius: 8rpx;
}
}
\ No newline at end of file
<!--packageOutput/pages/openBusiness/openBusiness.wxml-->
<view class="openBusiness">
<image class="bg-img" src="{{IMGURL}}output/open0{{sceneActive}}.png?v={{img_version}}"/>
<image class="bg-img" src="{{IMGURL}}output/open0{{sceneActive}}.png?v={{img_version}}" />
<view class="layout">
<view class="form m-b-32">
<text class="label">开通门店:</text>
......@@ -20,6 +20,8 @@
</view>
</view>
</view>
<view wx:if="{{sceneActive != 1}}" class="isFullSucreen btn btn-blue" bindtap="handleConfirm">申请开通</view>
<view wx:else class="btn btn-disabled">申请开通</view>
<view class="isFullSucreen btn">
<view wx:if="{{sceneActive != 1}}" class="btn-blue" bindtap="handleConfirm">申请开通</view>
<view wx:else class="btn-disabled">申请开通</view>
</view>
</view>
\ No newline at end of file
......@@ -10,7 +10,7 @@ Component({
type: Object,
value: () => { },
observer(n) {
this.dealStaffList()
n && this.dealStaffList()
}
},
},
......@@ -25,10 +25,10 @@ Component({
name: 'totalNum'
}, {
label: '总订单',
name: 'totalAmount'
name: 'totalOrderCount'
}, {
label: '成交金额',
name: 'totalOrderCount',
name: 'totalAmount',
prefix: '¥'
}],
merchantFormList: [{
......@@ -77,7 +77,7 @@ Component({
methods: {
dealStaffList() {
var list = this.data.orderObj
list && list.activityList.forEach(item => {
list && list.activityList?.forEach(item => {
// 0-未开始;1-活动中;2-已结束
let sliceNum = item.actStatus == 2 ? 3 : 10
item.showStaffList = item.staffList.length > sliceNum ? item.staffList.slice(0, sliceNum) : item.staffList
......
......@@ -74,7 +74,6 @@ Page({
},
setCurActivity() {
console.log(this.data.activityActive)
this.setData({
activityList: JSON.parse(JSON.stringify(this.data.sceneActivityObj['scene' + (this.data.sceneActive)]))
})
......@@ -94,8 +93,7 @@ Page({
this.setData({
['searchForm.scene' + this.data.sceneActive + 'Idx']: res.tapIndex
})
this.data.sceneActive != 4 ? this.getCustomerDetail() : this.getActivityRevenue()
console.log('调接口---')
this.data.sceneActive != 4 ? this.getCustomerDetail(false, false) : this.getActivityRevenue()
}
})
},
......@@ -110,24 +108,31 @@ Page({
wx.$router.go('packageOutput.openBusiness', params)
},
getSceneProStatus(sceneCode) {
getSceneProStatus(sceneCode, isFirst = false) {
var params = {
serviceMerchantId: this.data.merchantInfo.pMerchantId,
merchant4sId: this.data.merchantInfo.merchantId,
sceneCode: sceneCode
}
outputApi.getSceneProStatus(params).then(res => {
var proList = res.find(item => item.sceneCode == sceneCode)
// var proList = res.find(item => item.sceneCode == sceneCode)
// 删---
// proList.productList[1].productStatus = 2
this.setData({
['sceneActivityObj.scene' + this.data.sceneActive]: proList.productList
['sceneActivityObj.scene1']: res[0].productList,
['sceneActivityObj.scene2']: res[1].productList,
['sceneActivityObj.scene3']: res[2].productList,
['sceneActivityObj.scene4']: res[3].productList
})
if ([2, 3].includes(+this.data.sceneActive)) {
this.getCustomerDetail()
} else if (this.data.sceneActive == 4) {
this.getActivityRevenue()
} else {
if (isFirst) {
this.getCustomerDetail(isFirst)
this.getActivityRevenue(isFirst)
}
this.setCurActivity()
}
})
......@@ -157,15 +162,14 @@ Page({
/** 1.1和1.2场景产品数据处理
* 调同一个接口,返回两个服务下面的全部产品的数据
*/
getCustomerDetail() {
getCustomerDetail(isFirst = false, isChangeOtherTotal = true) {
var params = this.dealSearchTime()
outputApi.getCustomerDetail({ merchantId: this.data.merchantInfo.merchantId, ...params }).then(res => {
var actList = this.data.sceneActivityObj['scene' + this.data.sceneActive]
var actList = this.data.sceneActivityObj['scene' + (isFirst ? 2 : this.data.sceneActive)]
var actCodeList = actList.map(item => item.productCode)
console.log(actCodeList)
var curTotal = 0
var otherTotal = 0
var otherScene = this.data.sceneActive == 2 ? 3 : 2
var otherScene = isFirst ? 2 : (this.data.sceneActive == 2 ? 3 : 2)
res.forEach(item => {
var idx = actCodeList.findIndex(i => i == item.productCode)
if (idx != -1) {
......@@ -184,14 +188,21 @@ Page({
otherTotal = otherTotal + (item.orderTotal?.totalSubOrderOrderMoney || 0)
}
})
if (!isFirst) {
this.setData({
['sceneActivityObj.scene' + this.data.sceneActive]: actList
})
}
// 总金额
this.setData({
['sceneActivityObj.scene' + this.data.sceneActive]: actList,
['scenePriceList[' + (this.data.sceneActive - 1) + '].total']: curTotal,
['scenePriceList[' + (otherScene - 1) + '].total']: otherTotal
['scenePriceList[' + (isFirst ? 1 : (this.data.sceneActive - 1)) + '].total']: curTotal
})
console.log(this.data.sceneActivityObj['scene' + this.data.sceneActive])
this.setCurActivity()
if(isChangeOtherTotal) {
this.setData({
['scenePriceList[' + (isFirst ? 2 : (otherScene - 1)) + '].total']: otherTotal
})
}
!isFirst && this.setCurActivity()
})
},
......@@ -218,13 +229,17 @@ Page({
},
/** 查询场景4的产值 */
getActivityRevenue() {
wx.showLoading()
getActivityRevenue(isFirst = false) {
!isFirst && wx.showLoading()
var params = this.dealSearchStatus()
outputApi.getActivityRevenue({ merchantId: this.data.merchantInfo.merchantId, ...params }).then(res => {
// console.log(res)
// console.log(this.data.sceneActivityObj, '++++++')
var actList = this.data.sceneActivityObj['scene' + this.data.sceneActive]
var actList = this.data.sceneActivityObj['scene' + (isFirst ? 4 : this.data.sceneActive)]
var total = 0
res.forEach(item => {
total = total + item.totalAmount
})
actList.forEach((item, idx) => {
var curItem = res.find(k => k.goodsCategoryCode == item.productCode)
if (curItem) {
......@@ -270,12 +285,19 @@ Page({
}
})
actList[idx].outputData = curItem
} else {
actList[idx].outputData = []
}
})
if (!isFirst) {
this.setData({
['sceneActivityObj.scene' + this.data.sceneActive]: actList
})
}
this.setData({
['sceneActivityObj.scene' + this.data.sceneActive]: actList
['scenePriceList[3].total']: total
})
this.setCurActivity()
!isFirst && this.setCurActivity()
}).finally(() => {
wx.hideLoading()
})
......@@ -295,8 +317,8 @@ Page({
// },
// sceneCodeList: ['SC001', 'SC002', 'SC003', 'SC004']
// })
// this.getSceneProStatus(this.data.sceneCodeList[this.data.sceneActive - 1])
this.getSceneProStatus(this.data.sceneCodeList[this.data.sceneActive - 1])
wx.$router.getData(obj => {
var scene = {}
Object.keys(this.data.sceneObj).forEach(item => {
......@@ -308,7 +330,7 @@ Page({
sceneCodeList: obj.sceneCodeList
})
this.getSceneProStatus(this.data.sceneCodeList[this.data.sceneActive - 1])
this.getSceneProStatus(this.data.sceneCodeList[this.data.sceneActive - 1], true)
})
},
......
......@@ -42,8 +42,17 @@
padding: 27rpx 0 24rpx;
}
scroll-view ::-webkit-scrollbar {
display:none;
width:0;
height:0;
color:transparent;
}
.activity-box {
width: 100%;
height: 64rpx;
padding: 32rpx 0 28rpx;
.activity-item {
box-sizing: border-box;
......@@ -115,21 +124,24 @@
.btn {
position: fixed;
bottom: 0;
bottom: 16rpx;
left: 0;
width: 100%;
width: calc(100% - 64rpx);
height: 88rpx;
line-height: 88rpx;
text-align: center;
font-size: 28rpx;
color: #FFFFFF;
margin: 0 32rpx;
.btn-blue {
background: #3666FE;
border-radius: 8rpx;
}
.btn-disabled {
background: #CCCED1;
border-radius: 8rpx;
}
}
}
\ No newline at end of file
......@@ -11,7 +11,7 @@
</view>
<!-- 活动 -->
<view class="p-rl-20 bg-white">
<scroll-view scroll-x="{{true}}" class="activity-box" scroll-left="{{scrollLeft}}">
<scroll-view scroll-x="{{true}}" enable-flex class="activity-box" scroll-with-animation scroll-left="{{scrollLeft}}">
<view class="flex">
<view class="activity-item {{ activityActive == index ? 'active' : ''}} {{item.productStatus == 2 ? 'open' : 'no-open'}}" wx:for="{{activityList}}" wx:key="index" bindtap="handleActChange" data-idx="{{index}}">{{item.productName}}</view>
</view>
......
......@@ -35,7 +35,7 @@ Page({
console.log('name: ', name)
if (!name) {
wx.pro.showToast({
title: '请输入店名',
title: '请输入开店名称',
icon: 'error'
})
return
......
/* pages/apply/apply.wxss */
page {
background: white;
height: 100%;
position: relative;
}
.apply {
.head {
width: 100%;
}
.introduce {
height: 180px;
height: 360rpx;
}
.content {
padding: 16px 17px 0;
......@@ -42,15 +47,22 @@
border: 1px solid #E3E4E8;
border-radius: 2px;
}
.inp-placeholder {
font-family: PingFangSC-Regular;
font-size: 24rpx;
color: #8A8C90;
}
}
}
.btn {
margin-top:40px;
width: 100%;
width: 648rpx;
font-weight: 500;
font-size: 17px;
color: #ffffff;
text-align: center;
background: var(--btnColor);
position: absolute;
bottom: 40rpx;
left: 50%;
transform: translateX(-50%);
}
}
......@@ -11,27 +11,27 @@
<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">
<view class="title" hover-class="none" hover-stop-propagation="false" style="margin-top: 32rpx;">
开店名称
<text class="point">*</text>
</view>
<input class="inp" value="{{carObj.name}}" bindinput="bindinputFn" data-name="name" maxlength="{{30}}" placeholder="请输入30个字符以内" />
<input class="inp" placeholder-class="inp-placeholder" value="{{carObj.name}}" bindinput="bindinputFn" data-name="name" maxlength="{{30}}" placeholder="请输入30个字符以内" />
</view>
<view class="inp-wrap">
<view class="title" hover-class="none" hover-stop-propagation="false">店面车型</view>
<input class="inp" value="{{carObj.model}}" bindinput="bindinputFn" data-name="model" maxlength="{{30}}" placeholder="请输入30个字符以内" />
<input class="inp" placeholder-class="inp-placeholder" value="{{carObj.model}}" bindinput="bindinputFn" data-name="model" maxlength="{{30}}" placeholder="请输入30个字符以内" />
</view>
<view class="inp-wrap">
<view class="title" hover-class="none" hover-stop-propagation="false">店面新车销量/基盘客户</view>
<input class="inp" value="{{carObj.selNum}}" bindinput="bindinputFn" data-name="selNum" maxlength="{{30}}" placeholder="请输入30个字符以内" />
<input class="inp" placeholder-class="inp-placeholder" value="{{carObj.selNum}}" bindinput="bindinputFn" data-name="selNum" maxlength="{{30}}" placeholder="请输入30个字符以内" />
</view>
<view class="inp-wrap">
<view class="title" hover-class="none" hover-stop-propagation="false">门店联系人</view>
<input class="inp" value="{{carObj.contact}}" bindinput="bindinputFn" data-name="contact" placeholder="请输入联系人" />
<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" value="{{carObj.phone}}" bindinput="bindinputFn" data-name="phone" placeholder="请输入手机号" />
<input class="inp" placeholder-class="inp-placeholder" value="{{carObj.phone}}" bindinput="bindinputFn" data-name="phone" placeholder="请输入手机号" />
</view>
</view>
<button class="btn" bindtap="applyFn">提交开店信息</button>
......
......@@ -510,6 +510,7 @@ Page({
filterTypeFn(e) {
let { typeList } = this.data
let index = e.currentTarget.dataset.index
// console.log('index: ', index);
// let itemList = []
// let params = {
// clueSource: '',
......@@ -536,12 +537,20 @@ Page({
success(res) {
// 选中全部
let selectIndex = res.tapIndex
// console.log('selectIndex: ', selectIndex);
typeList[index].selectIndex = selectIndex
let params = typeList.reduce((obj, item, index) => {
console.log(' item: ', item);
if (item['key']) {
selectIndex = index == 2 ? selectIndex + 1 : selectIndex
// selectIndex = index == 2 ? selectIndex + 1 : selectIndex
// console.log('selectIndex: ', selectIndex);
let itemIndx = item.selectIndex
obj[item['key']] = itemIndx == 2 ? '' : itemIndx
// console.log('itemIndx: ', itemIndx);
if(index == 2){
itemIndx += 1
}
obj[item['key']] = (itemIndx == 2 || itemIndx == 3)? '' : itemIndx
}
return obj
}, {})
......
......@@ -89,7 +89,7 @@ page {
.clue {
padding: 0px 10px 0;
background-color: #f2f3f7;
margin-top: -16rpx;
.types {
margin-bottom: 8px;
display: flex;
......@@ -100,7 +100,7 @@ page {
display: flex;
justify-content: center;
align-items: center;
width: 80px;
padding: 0 16rpx;
height: 24px;
line-height: 24px;
background: #ffffff;
......@@ -378,7 +378,7 @@ page {
left: 0;
width: 100%;
height: 100%;
z-index: 2;
z-index: 3;
}
}
......
......@@ -63,6 +63,7 @@
wx:for="{{typeList}}"
wx:key="*this"
data-index="{{index}}"
style="{{index == 0 ? 'margin-left: 0px;' : ''}}"
bindtap="filterTypeFn">
{{item[item['selectIndex']] }}
<image class="point" wx:if="{{index != 3}}" src="{{item['selectIndex']!=2&&index != 3? IMAGES.actArrow : IMAGES.arrow}}" />
......
......@@ -43,7 +43,6 @@
.price-txt {
// font-family: 'test';
// font-family: "test";
font-weight: Bold;
// font-weight: 600;
font-size: 26rpx;
......
......@@ -23,7 +23,7 @@
</view>
<!-- 场景内容 -->
<view class="box-content">
<scene-box formData="{{item}}" />
<scene-box formData="{{item}}" hasLockIcon="{{false}}" />
<!-- 通知 -->
<view class="box-bottom">
<view wx:if="{{item.msgList.length}}" class="flex">
......
......@@ -26,15 +26,15 @@ Page = function (options) {
const oldHide = options.onHide
options.onShow = function () {
routerBefore(() => {
oldShow.apply(this, arguments)
oldShow && oldShow.apply(this, arguments)
})
}
options.onHide = function () {
routerAfter(() => {
oldHide.apply(this, arguments)
oldHide && oldHide.apply(this, arguments)
})
}
OldPage(options)
}
export default routerBefore
export default routerBefore
\ No newline at end of file
......@@ -24,22 +24,24 @@ class NetWork {
const thisPage = wx.$router.getPageInstance(),
options = Object.keys(thisPage.options)
this[ISCOMMECTED] = false
if (thisPage.noPageAuth) {
wx.showLoading()
this.refreshPage()
} else {
let url = `/${thisPage.route}`
if (options.length) {
let query = []
options.map(key => {
query.push(`${key}=${thisPage.options[key]}`)
})
url += `?${query.join('&')}`
}
wx.$router.redirectTo('login.loading', {
url
})
}
wx.showLoading()
wx.hideLoading()
// if (thisPage.noPageAuth) {
// wx.showLoading()
// this.refreshPage()
// } else {
// let url = `/${thisPage.route}`
// if (options.length) {
// let query = []
// options.map(key => {
// query.push(`${key}=${thisPage.options[key]}`)
// })
// url += `?${query.join('&')}`
// }
// wx.$router.redirectTo('login.loading', {
// url
// })
// }
}
}
})
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!