Commit ca26721c by 张立顺

bugfix

1 parent 5dfc6255
<wxs src="./Tab.wxs" module="filterUtils" /> <wxs src="./Tab.wxs" module="filterUtils" />
<block wx:if="{{openScroll}}"> <block wx:if="{{openScroll}}">
<scroll-view <scroll-view
class="tab-box {{align}} {{outClassName}}" class="tab-box {{align}} {{outClassName}}"
scroll-x scroll-x
enable-flex enable-flex
scroll-with-animation scroll-with-animation
scroll-into-view="{{to}}" scroll-into-view="{{to}}"
enhanced="{{true}}" enhanced="{{true}}"
show-scrollbar="{{false}}" show-scrollbar="{{false}}">
>
<block wx:for="{{tab}}" wx:key="index"> <block wx:for="{{tab}}" wx:key="index">
<view <view
class="tab {{index==count?'active':''}}" class="tab {{index==count?'active':''}}"
bindtap="click" bindtap="click"
data-count="{{index}}" data-count="{{index}}"
id="to-{{index}}" id="to-{{index}}">
>
<view class="text">{{item}}</view> <view class="text">{{item}}</view>
<!-- <view class="text" style="width:{{38 * item.length + 20}}rpx;">{{item}}</view> --> <!-- <view class="text" style="width:{{38 * item.length + 20}}rpx;">{{item}}</view> -->
<view class="line" /> <view class="line" />
...@@ -27,16 +25,13 @@ ...@@ -27,16 +25,13 @@
<view class="tab-box flex"> <view class="tab-box flex">
<block wx:for="{{tab}}" wx:key="index"> <block wx:for="{{tab}}" wx:key="index">
<view <view
class="tab {{index==count?'active':''}}" class="tab {{index==count?'active':''}}"
style="width:{{itemWidth}}" style="width:{{itemWidth}}"
bindtap="click" bindtap="click"
data-count="{{index}}" data-count="{{index}}">
> <view class="text text-center">{{item}}</view>
<view class="text text-center">
{{item}}
</view>
<view class="line" style="lineStyle" /> <view class="line" style="lineStyle" />
<!-- --> <!-- -->
<view wx:if="{{filterUtils.hasRedpoint(unreadClueCount)}}" class="redpoint" /> <view wx:if="{{filterUtils.hasRedpoint(unreadClueCount)}}" class="redpoint" />
</view> </view>
</block> </block>
......
...@@ -66,7 +66,10 @@ Page({ ...@@ -66,7 +66,10 @@ Page({
if (result) { if (result) {
wx.$api.showToast('申请成功') wx.$api.showToast('申请成功')
setTimeout(() => { setTimeout(() => {
wx.$router.back() wx.$router.back(page => {
page.getClueInit && page.getClueInit()
// this.getClueInit()
})
}, 1000) }, 1000)
} }
}) })
......
...@@ -169,8 +169,8 @@ Page({ ...@@ -169,8 +169,8 @@ Page({
wx.$router.go('packageOutput.openBusiness', params) wx.$router.go('packageOutput.openBusiness', params)
} else { } else {
//申请门店 //申请门店
let { type, item } = e.currentTarget.dataset // let { type, item } = e.currentTarget.dataset
wx.$router.go('apply', item.clueId) wx.$router.go('apply', item?.clueId || '')
} }
// wx.$router.go('apply',1235) // wx.$router.go('apply',1235)
}, },
...@@ -213,20 +213,12 @@ Page({ ...@@ -213,20 +213,12 @@ Page({
}, },
// 提交测算 // 提交测算
submit(e) { submit(e) {
<<<<<<< HEAD
console.log(e) console.log(e)
let sales = e ? +e.detail.value.sales : this.data.formData.sales let sales = e ? +e.detail.value.sales : this.data.formData.sales
let flow = e ? +e.detail.value.flow : this.data.formData.flow let flow = e ? +e.detail.value.flow : this.data.formData.flow
console.log('flow', sales, flow)
const reg = /^[1-9]\d*$/ const reg = /^[1-9]\d*$/
console.log(reg.test(sales), flow, '---') console.log(reg.test(sales), flow, '---')
=======
console.log(e);
let sales = e ? +e.detail.value.sales : this.data.formData.sales;
let flow = e ? +e.detail.value.flow : this.data.formData.flow;
console.log('flow',sales,flow)
const reg = /^[1-9]\d*$/;
console.log(reg.test(sales), flow, "---");
>>>>>>> 79abc4b9c737b04214efde25436bd78cadbc6b51
if (!reg.test(sales)) { if (!reg.test(sales)) {
wx.showToast({ wx.showToast({
title: '门店月平均新车销量应为正整数', title: '门店月平均新车销量应为正整数',
...@@ -264,27 +256,16 @@ Page({ ...@@ -264,27 +256,16 @@ Page({
this.data.senceData.forEach((item, index) => { this.data.senceData.forEach((item, index) => {
item.productList.forEach((i, lastIndex) => { item.productList.forEach((i, lastIndex) => {
if (i.profit) { if (i.profit) {
<<<<<<< HEAD
let sale = `senceData[${index}].productList[${lastIndex}].sale` let sale = `senceData[${index}].productList[${lastIndex}].sale`
let name = `senceData[${index}].productList[${lastIndex}].profit` let name = `senceData[${index}].productList[${lastIndex}].profit`
let flowKey = `senceData[${index}].productList[${lastIndex}].flow`
let profit = _this.formula(i.productType, sales, flow) let profit = _this.formula(i.productType, sales, flow)
console.log(name, profit) console.log(name, profit)
this.setData({ this.setData({
[name]: profit, [name]: profit,
[sale]: sales
})
=======
let sale = `senceData[${index}].productList[${lastIndex}].sale`;
let name = `senceData[${index}].productList[${lastIndex}].profit`;
let flowKey = `senceData[${index}].productList[${lastIndex}].flow`;
let profit = _this.formula(i.productType, sales, flow);
console.log(name, profit);
this.setData({
[name]: profit,
[sale]: sales, [sale]: sales,
[flowKey]: flow, [flowKey]: flow
}); })
>>>>>>> 79abc4b9c737b04214efde25436bd78cadbc6b51
} }
}) })
}) })
...@@ -569,6 +550,7 @@ Page({ ...@@ -569,6 +550,7 @@ Page({
wx.$api.setCopyData(phone) wx.$api.setCopyData(phone)
}, },
getClueInit(param) { getClueInit(param) {
// console.log(22222)
this.getUnreadApi(param) this.getUnreadApi(param)
this.getPageApi(param) this.getPageApi(param)
}, },
......
...@@ -149,7 +149,7 @@ Component({ ...@@ -149,7 +149,7 @@ Component({
this.setData({ this.setData({
list: [] list: []
}) })
return wx.$api.showTips(result.message) return wx.$api.showToast(result.message)
} }
let { dataList, yqMerchantIds } = data let { dataList, yqMerchantIds } = data
const list = yqMerchantIds.reduce((list, item, index) => { const list = yqMerchantIds.reduce((list, item, index) => {
......
...@@ -116,7 +116,9 @@ Page({ ...@@ -116,7 +116,9 @@ Page({
/** /**
* 生命周期函数--监听页面初次渲染完成 * 生命周期函数--监听页面初次渲染完成
*/ */
onReady() {}, onReady() {
// console.log(getTextWidth('随后获取dom元素的clientWidth 随后获取dom元素的clientWidth随后获取dom元素的clientWidth随后获取dom元素的clientWidth', '12px'))
},
/** /**
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!