Commit 216dc338 by zhangxw

ui走查

1 parent dd238f76
......@@ -17,7 +17,7 @@ Component({
thisPage.setData({
isShowFilterScreen: true
})
if (!this.data.formData.startTime || !this.data.formData.endTime) this.setDate() // 默认展示当前月份
// if (!this.data.formData.startTime || !this.data.formData.endTime) this.setDate() // 默认展示当前月份
this.setViewData()
}
}
......@@ -106,7 +106,7 @@ Component({
}
})
formData.partnerMerchantIds = [merchantId]
if (!this.data.formData.startTime || !this.data.formData.endTime) this.setDate() // 未选择时间默认展示当前月份
// if (!this.data.formData.startTime || !this.data.formData.endTime) this.setDate() // 未选择时间默认展示当前月份
this.setData({
merchantRange,
subIndex,
......
......@@ -50,10 +50,10 @@
</view>
<view class="date_box">
<view class="date_item" wx:if="{{formData.startTime}}">{{filter.filterDate(formData.startTime) || '开始时间'}}</view>
<view class="date_item placeholder" wx:else>YYYY/MM</view>
<view class="date_item placeholder" wx:else>请选择</view>
<view>-</view>
<view class="date_item" wx:if="{{formData.endTime}}">{{filter.filterDate(formData.endTime) || '结束时间'}}</view>
<view class="date_item placeholder" wx:else>YYYY/MM</view>
<view class="date_item placeholder" wx:else>请选择</view>
</view>
</view>
<view class="box" wx:if="{{tabType == 0}}">
......
......@@ -4,6 +4,7 @@ const IMAGES = Object.freeze({
})
import outputValueApi from '~/api/outputValueApi/index'
import { IMG_URL } from '~/utils/constantData'
import Util from '~/utils/util'
Component({
/**
* 组件的属性列表
......@@ -57,7 +58,8 @@ Component({
})
},
onBottomRefresh() {
this.getListData()
let { isInit } = this.data // 是否首次进入页面
this.getListData(false, isInit)
},
refreshList() {
this.setData({
......@@ -65,7 +67,8 @@ Component({
nothing: false,
total: 0
})
this.getListData(true)
let { isInit } = this.data
this.getListData(true, isInit)
},
actionOperationResult(val1, val2, rate = false){
......@@ -81,8 +84,19 @@ Component({
const p = Math.max(len1, len2)
return Math.pow(10, p)
},
getListData(isReset = false) {
getLastDay(year, month) {
var new_year = year //取当前的年份
var new_month = month++ //取下一个月的第一天,方便计算(最后一天不固定)
if (month > 12) {
new_month -= 12 //月份减
new_year++ //年份增
}
var new_date = new Date(new_year, new_month, 1) //取当年当月中的第一天
return new Date(new_date.getTime() - 1000 * 60 * 60 * 24).getDate() //获取当月最后一天日期
},
getListData(isReset = false, isInit = false) {
let _this = this
_this.setData({ isInit })
if (isReset) {
_this.setData({
pageNum: 1,
......@@ -92,15 +106,22 @@ Component({
}
let { pageNum, pageSize, merchantOutputValuesPageSize, nothing, isAsk, dataList } = _this.data
const thisPage = wx.$router.getPageInstance()
let params = {
let params = Util.deepClone({
pageNum,
pageSize,
merchantOutputValuesPageSize,
...thisPage.data.screenFormData
}
this.setData({ searchFormData: thisPage.data.screenFormData })
})
delete params.shopMerchantNames
delete params.sceneType // 删除场景参数
let month = new Date().getMonth() + 1
let year = new Date().getFullYear()
let day = this.getLastDay(year, month)
if (isInit) { // 首次进入页面 我的员工请求当前月份数据
params.startTime = year + '-' + month + '-01' + ' 00:00:00'
params.endTime = year + '-' + month + '-' + day + ' 23:59:59'
}
this.setData({ searchFormData: params })
if (nothing || isAsk) {
return
}
......
......@@ -67,6 +67,7 @@
text{
color: #4772FC;
font-size: 36rpx;
font-family: 'ali-bold';
font-weight: 700;
}
}
......@@ -110,6 +111,7 @@
}
.merchant_box{
padding-top: 24rpx;
font-size: 28rpx;
.title{
font-size: 24rpx;
color: #8A8C90;
......@@ -120,6 +122,7 @@
.flex{
box-sizing: border-box;
padding-right: 30rpx;
font-family: 'ali-bold';
}
.flex_1{
width: calc(100% - 552rpx);
......@@ -133,16 +136,18 @@
padding-right: 52rpx;
}
.font_wei700{
font-size: 28rpx;
font-weight: 700;
color: #323436;
margin-bottom: 8rpx;
font-family: 'ali-bold';
}
.font_wei500{
font-weight: 500;
font-family: 'ali-medium';
}
.font_wei400{
font-weight: 400;
font-family: 'ali-medium';
}
.name{
font-size: 26rpx;
......
......@@ -79,10 +79,10 @@
<view class="font_wei400">赠送膜{{subItem.notUpgradeConstructionCount || '-'}}台/次</view>
</view>
<view class="flex_1 flex">
<view class="font_wei700" wx:if="{{subItem.upgradeIncentiveFee}}">¥{{subItem.upgradeIncentiveFee}}X{{subItem.upgradeConstructionCount}}</view>
<view class="font_wei700" wx:if="{{!subItem.upgradeIncentiveFee}}">-</view>
<view class="font_wei400" wx:if="{{subItem.notUpgradeIncentiveFee}}">¥{{subItem.notUpgradeIncentiveFee}}X{{subItem.notUpgradeConstructionCount}}</view>
<view class="font_wei400" wx:if="{{!subItem.notUpgradeIncentiveFee}}">-</view>
<view class="font_wei700" wx:if="{{subItem.upgradeIncentiveFee && subItem.upgradeConstructionCount}}">¥{{subItem.upgradeIncentiveFee}}X{{subItem.upgradeConstructionCount}}</view>
<view class="font_wei700" wx:if="{{!subItem.upgradeIncentiveFee || !subItem.upgradeConstructionCount}}">-</view>
<view class="font_wei400" wx:if="{{subItem.notUpgradeIncentiveFee && subItem.notUpgradeConstructionCount}}">¥{{subItem.notUpgradeIncentiveFee}}X{{subItem.notUpgradeConstructionCount}}</view>
<view class="font_wei400" wx:if="{{!subItem.notUpgradeIncentiveFee || !subItem.notUpgradeConstructionCount}}">-</view>
</view>
</view>
<view class="showMore" wx:if="{{subIndex >= 3 && subIndex === (item.constructionStats.length - 1) && !item.showMore}}" bindtap="showMore" data-index="{{index}}">
......
......@@ -67,16 +67,16 @@ Page({
},
init() {
this.setUserInfo()
this.searchEvent(true)
this.searchEvent(true, true)
},
// 筛选回调
searchEvent(isNoBack = false) {
searchEvent(isNoBack = false, isInit = false) {
console.log(this.data.screenFormData, 'screenFormData')
if (!isNoBack) this.back()
let merchantModule = this.selectComponent('#merchant')
merchantModule.merchantRefresh && merchantModule.merchantRefresh(true)
let employessModule = this.selectComponent('#employess')
employessModule.getListData && employessModule.getListData(true)
employessModule.getListData && employessModule.getListData(true, isInit)
},
setUserInfo() {
let { userInfo } = wx.$storage.get()
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!