|
@@ -1,48 +1,53 @@
|
|
|
<template>
|
|
|
<view class="sales-warp">
|
|
|
- <!--销售数据统计 -->
|
|
|
- <view class="content-data">
|
|
|
- <view class="date-type">
|
|
|
- <text v-for="(item, index) in tabNav" :key="index" :class="[index == navInd ? 'active_day' : '']" @click="seleteTime(index)">{{item.name}}</text>
|
|
|
- </view>
|
|
|
- <view class="total">
|
|
|
- <view class="item-box">
|
|
|
- <u-count-to v-if="navInd==0" :end-val="bizData&&bizData.sales&&(bizData.sales.dayTotalQty || bizData.sales.dayTotalQty==0) ? bizData.sales.dayTotalQty : 0" separator=","></u-count-to>
|
|
|
- <u-count-to v-if="navInd==1" :end-val="bizData&&bizData.sales&&(bizData.sales.weekSalesQty || bizData.sales.weekSalesQty==0) ? bizData.sales.weekSalesQty : 0" separator=","></u-count-to>
|
|
|
- <u-count-to v-if="navInd==2" :end-val="bizData&&bizData.sales&&(bizData.sales.monthSalesQty || bizData.sales.monthSalesQty==0) ? bizData.sales.monthSalesQty : 0" separator=","></u-count-to>
|
|
|
- <view>销售总单量(个)</view>
|
|
|
+ <view id="tjCons">
|
|
|
+ <!--销售数据统计 -->
|
|
|
+ <view class="content-data">
|
|
|
+ <view class="date-type">
|
|
|
+ <text v-for="(item, index) in tabNav" :key="index" :class="[index == navInd ? 'active_day' : '']" @click="seleteTime(index)">{{item.name}}</text>
|
|
|
</view>
|
|
|
- <view class="item-box">
|
|
|
- <u-count-to v-if="navInd==0" :end-val="bizData&&bizData.sales&&(bizData.sales.dayTotalAmount || bizData.sales.dayTotalAmount==0) ? bizData.sales.dayTotalAmount : 0" separator="," :decimals="2"></u-count-to>
|
|
|
- <u-count-to v-if="navInd==1" :end-val="bizData&&bizData.sales&&(bizData.sales.weekSalesAmount || bizData.sales.weekSalesAmount==0) ? bizData.sales.weekSalesAmount : 0" separator="," :decimals="2"></u-count-to>
|
|
|
- <u-count-to v-if="navInd==2" :end-val="bizData&&bizData.sales&&(bizData.sales.monthSalesAmount || bizData.sales.monthSalesAmount==0) ? bizData.sales.monthSalesAmount : 0" separator="," :decimals="2"></u-count-to>
|
|
|
- <view>销售总金额(¥)</view>
|
|
|
+ <view class="total">
|
|
|
+ <view class="item-box">
|
|
|
+ <u-count-to v-if="navInd==0" :end-val="bizData&&bizData.sales&&(bizData.sales.dayTotalQty || bizData.sales.dayTotalQty==0) ? bizData.sales.dayTotalQty : 0" separator=","></u-count-to>
|
|
|
+ <u-count-to v-if="navInd==1" :end-val="bizData&&bizData.sales&&(bizData.sales.weekSalesQty || bizData.sales.weekSalesQty==0) ? bizData.sales.weekSalesQty : 0" separator=","></u-count-to>
|
|
|
+ <u-count-to v-if="navInd==2" :end-val="bizData&&bizData.sales&&(bizData.sales.monthSalesQty || bizData.sales.monthSalesQty==0) ? bizData.sales.monthSalesQty : 0" separator=","></u-count-to>
|
|
|
+ <view>销售总单量(个)</view>
|
|
|
+ </view>
|
|
|
+ <view class="item-box">
|
|
|
+ <u-count-to v-if="navInd==0" :end-val="bizData&&bizData.sales&&(bizData.sales.dayTotalAmount || bizData.sales.dayTotalAmount==0) ? bizData.sales.dayTotalAmount : 0" separator="," :decimals="2"></u-count-to>
|
|
|
+ <u-count-to v-if="navInd==1" :end-val="bizData&&bizData.sales&&(bizData.sales.weekSalesAmount || bizData.sales.weekSalesAmount==0) ? bizData.sales.weekSalesAmount : 0" separator="," :decimals="2"></u-count-to>
|
|
|
+ <u-count-to v-if="navInd==2" :end-val="bizData&&bizData.sales&&(bizData.sales.monthSalesAmount || bizData.sales.monthSalesAmount==0) ? bizData.sales.monthSalesAmount : 0" separator="," :decimals="2"></u-count-to>
|
|
|
+ <view>销售总金额(¥)</view>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
</view>
|
|
|
- </view>
|
|
|
- <!-- 产品报价及新增销售单 -->
|
|
|
- <view class="nav-cont flex align_center justify_between">
|
|
|
- <view class="nav-item" @click="toPage('/pages/sales/productPricing')">
|
|
|
- <u-image class="nav-pic" style="margin-top: 5upx;" :src="`../../static/${theme}/navIcon/price_icon.png`" width="60" height="60"></u-image>
|
|
|
- <text class="nav-txt" style="margin-top: 5upx;">产品报价</text>
|
|
|
- </view>
|
|
|
- <!-- <view class="nav-item" @click="toPage('/pages/sales/chooseCustomer')">
|
|
|
- <u-image class="nav-pic" :src="`../../static/${theme}/navIcon/sale_icon.png`" width="70" height="70"></u-image>
|
|
|
- <text class="nav-txt">新增销售单</text>
|
|
|
- </view> -->
|
|
|
- <view class="nav-item" @click="toPage('/pages/webviews/openview?title=产品查询&url=https://jgqp.51cjml.com/h5/#!/')">
|
|
|
- <u-image class="nav-pic" :src="`../../static/${theme}/navIcon/pfind.png`" width="64" height="64"></u-image>
|
|
|
- <text class="nav-txt">产品查询</text>
|
|
|
+ <!-- 产品报价及新增销售单 -->
|
|
|
+ <view class="nav-cont flex align_center justify_between">
|
|
|
+ <view class="nav-item" @click="toPage('/pages/sales/productPricing')">
|
|
|
+ <u-image class="nav-pic" style="margin-top: 5upx;" :src="`../../static/${theme}/navIcon/price_icon.png`" width="60" height="60"></u-image>
|
|
|
+ <text class="nav-txt" style="margin-top: 5upx;">产品报价</text>
|
|
|
+ </view>
|
|
|
+ <!-- <view class="nav-item" @click="toPage('/pages/sales/chooseCustomer')">
|
|
|
+ <u-image class="nav-pic" :src="`../../static/${theme}/navIcon/sale_icon.png`" width="70" height="70"></u-image>
|
|
|
+ <text class="nav-txt">新增销售单</text>
|
|
|
+ </view> -->
|
|
|
+ <view class="nav-item" @click="toPage('/pages/webviews/openview?title=产品查询&url=https://jgqp.51cjml.com/h5/#!/')">
|
|
|
+ <u-image class="nav-pic" :src="`../../static/${theme}/navIcon/pfind.png`" width="64" height="64"></u-image>
|
|
|
+ <text class="nav-txt">产品查询</text>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
</view>
|
|
|
<!-- 销售单 -->
|
|
|
<view class="sales-list">
|
|
|
<view class="title">
|
|
|
- <text class="title-name">销售单</text>
|
|
|
+ <text class="title-name" @click="$refs.salesList.refash()">
|
|
|
+ 销售单
|
|
|
+ <u-icon name="reload" color="#2979ff" size="28"></u-icon>
|
|
|
+ </text>
|
|
|
<view class="title-all" @click="toPage('/pages/sales/list')">查看全部<u-icon name="arrow-right" color="rgb(144, 147, 153)" size="28"></u-icon></view>
|
|
|
</view>
|
|
|
<!-- 销售单列表 -->
|
|
|
- <listComponent ref="salesList" height="458" />
|
|
|
+ <listComponent ref="salesList" :height="listHeight" />
|
|
|
</view>
|
|
|
</view>
|
|
|
</template>
|
|
@@ -62,9 +67,16 @@
|
|
|
],
|
|
|
navInd: 0,
|
|
|
bizData: null, // 销售数据统计
|
|
|
- theme: ''
|
|
|
+ theme: '',
|
|
|
+ listHeight: 400
|
|
|
}
|
|
|
},
|
|
|
+ onReady() {
|
|
|
+ const query = uni.createSelectorQuery().in(this);
|
|
|
+ query.select('#tjCons').boundingClientRect(data => {
|
|
|
+ this.listHeight = data.height
|
|
|
+ }).exec();
|
|
|
+ },
|
|
|
onLoad() {
|
|
|
const _this = this
|
|
|
this.$nextTick(function(){
|
|
@@ -109,6 +121,7 @@
|
|
|
uni.$off('refreshBL')
|
|
|
},
|
|
|
onShow() {
|
|
|
+ this.navInd = 0
|
|
|
this.getBizData()
|
|
|
},
|
|
|
methods:{
|
|
@@ -125,6 +138,7 @@
|
|
|
} else {
|
|
|
this.bizData = null
|
|
|
}
|
|
|
+ uni.stopPullDownRefresh();
|
|
|
})
|
|
|
}
|
|
|
}
|