From 07e7049fe46931edd6ade7c6871fdccb360a9058 Mon Sep 17 00:00:00 2001
From: zhangxiaoxu <819527061@qq.com>
Date: 星期二, 16 十二月 2025 15:57:52 +0800
Subject: [PATCH] 新增 产品当前价格 当日收款情况 煤种发运情况 分客户煤种发运情况
---
pages/home/home.vue | 565 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
utils/api.js | 20 +
2 files changed, 579 insertions(+), 6 deletions(-)
diff --git a/pages/home/home.vue b/pages/home/home.vue
index d14b171..6d06960 100644
--- a/pages/home/home.vue
+++ b/pages/home/home.vue
@@ -9,6 +9,209 @@
<qiun-data-charts type="pie" :opts="opts" :chartData="chartData" v-if="uchartsData.length > 0" />
<u-empty mode="data" iconSize="200" textSize="25" width="350" height="350" icon="http://cdn.uviewui.com/uview/empty/data.png" v-if="uchartsData.length == 0"></u-empty>
</view>
+
+
+ <view class="huoshiju-box" v-if="compId == '1000278'">
+ <!-- 浜у搧褰撳墠浠锋牸 -->
+ <view class="price-group" v-if="coalData && coalData.length > 0">
+ <combined-title title="浜у搧褰撳墠浠锋牸"></combined-title>
+ <view class="price-box">
+ <div class="price-box-inside">
+ <uni-table border stripe emptyText="鏆傛棤鏇村鏁版嵁" >
+ <uni-tr>
+ <uni-th width="100" align="center">鐓ょ</uni-th>
+ <uni-th width="100" align="center">闀垮崗鎴�(鍏�)</uni-th>
+ <uni-th width="100" align="center">鏅�氭埛(鍏�)</uni-th>
+ </uni-tr>
+ <uni-tr v-for="(item,index) in coalData" :key="index">
+ <uni-td align="left">{{item.coalName}}</uni-td>
+ <uni-td align="center">{{item.price1}}</uni-td>
+ <uni-td align="center">{{item.price2}}</uni-td>
+ </uni-tr>
+ </uni-table>
+<!-- <view class="price-line">
+ <view class="name">涓叅</view>
+ <view class="price"><view class="priceNum">344</view><view class="priceUnit">鍏�</view></view>
+ </view>
+ <view class="price-line">
+ <view class="name">涓叅</view>
+ <view class="price"><view class="priceNum">344</view><view class="priceUnit">鍏�</view></view>
+ </view>
+ <view class="price-line">
+ <view class="name">涓叅</view>
+ <view class="price"><view class="priceNum">344</view><view class="priceUnit">鍏�</view></view>
+ </view>
+ <view class="price-line">
+ <view class="name">涓叅</view>
+ <view class="price"><view class="priceNum">344</view><view class="priceUnit">鍏�</view></view>
+ </view>-->
+ </div>
+
+ </view>
+ </view>
+ <!-- 褰撴棩鏀舵鎯呭喌 -->
+ <view class="shoukuan-group" v-if="shoukuanJiluTemp && shoukuanJiluTemp.length > 0">
+ <view class="currentDay-box">
+ <combined-title title="褰撴棩鏀舵鎯呭喌">
+ </combined-title>
+ <view class="total-box">
+ <view class="total1">灏忚:</view>
+ <view class="total2">{{shoukuanToatl}}
+ <view class="small">鍏�</view>
+ </view>
+ </view>
+ </view>
+ <view class="shoukuan-box">
+ <div class="shoukuan-box-inside">
+ <view class="shoukuan-main" v-for="(item,index) in shoukuanJilu" :key="index">
+ <view class="shoukuan-line shoukuanFirst-line">
+ <view class="text1">{{item.customerName || ''}}</view>
+ </view>
+ <view class="shoukuan-line">
+ <view class="name">閲戦锛�</view>
+ <view class="text1 num">{{item.money || ''}}
+ <view class="small">鍏�</view>
+ </view>
+ </view>
+ <view class="shoukuan-line">
+ <view class="name">璐﹀锛�</view>
+ <view class="text1">{{item.ledgerName || ''}}</view>
+ </view>
+ </view>
+ <view class="shouqiIcon" @click="handleShouKuanIsMore">
+ <image v-if="!shoukuanIsMore" src="@/static/home/xialaIcon.png"></image>
+ <image v-else src="@/static/home/shouqiIcon.png"></image>
+ </view>
+ </div>
+ </view>
+ </view>
+ <!-- 鐓ょ鍙戣繍鎯呭喌 -->
+ <view class="shoukuan-group" v-if="coalTongjiTemp && coalTongjiTemp.length > 0">
+ <view class="currentDay-box">
+ <combined-title title="鐓ょ鍙戣繍鎯呭喌">
+ </combined-title>
+ </view>
+ <view class="shoukuan-box">
+ <view class="coalFayun-total">
+ <view class="total-block">
+ <view class="num">{{d2Sum || 0}}</view>
+ <view class="name">鎬昏閲戦(鍏�)</view>
+ </view>
+ <view class="total-block">
+ <view class="num">{{dsumSum || 0}}</view>
+ <view class="name">姹借繍鎬昏(鍚�)</view>
+ </view>
+ <view class="total-block">
+ <view class="num">{{lyDSumSum || 0}}</view>
+ <view class="name">璺繍鎬昏(鍚�)</view>
+ </view>
+ <view class="total-block">
+ <view class="num">{{d1Sum || 0}}</view>
+ <view class="name">鎬诲惃鏁�(鍚�)</view>
+ </view>
+ </view>
+ <div class="shoukuan-box-inside">
+ <view class="shoukuan-main" v-for="(item,index) in coalTongji" :key="index">
+ <view class="shoukuan-line shoukuanFirst-line">
+ <view class="text1">{{item.coalName}}</view>
+ </view>
+ <view class="shoukuan-line">
+ <view class="name">璐﹀锛�</view>
+ <view class="text1">{{item.ledgerName || ''}}</view>
+ </view>
+ <view class="coalTongji-box">
+ <view class="shoukuan-line">
+ <view class="name">鍗曚环锛�</view>
+ <view class="text1 num">
+ {{item.d3 || 0}}
+ <view class="small">鍏�</view>
+ </view>
+ </view>
+ <view class="shoukuan-line">
+ <view class="name">閲戦锛�</view>
+ <view class="text1 num">
+ {{item.d2 || 0}}
+ <view class="small">鍏�</view>
+ </view>
+ </view>
+ </view>
+ <view class="coalTongji-box marginTop">
+ <view class="caol-block">
+ <view class="name">鏃ユ苯杩愰噺(鍚�)</view>
+ <view class="num">{{item.dSum || 0}}</view>
+ </view>
+ <view class="caol-block">
+ <view class="name">鏃ヨ矾杩愰噺(鍚�)</view>
+ <view class="num">{{item.lyDSum || 0}}</view>
+ </view>
+ <view class="caol-block">
+ <view class="name">鏃ュ悎璁�(鍏�)</view>
+ <view class="num">{{item.d1 || 0}}</view>
+ </view>
+ </view>
+ </view>
+ <view class="shouqiIcon" @click="handleCoalIsMore">
+ <image v-if="!coalShowIsMore" src="@/static/home/xialaIcon.png"></image>
+ <image v-else src="@/static/home/shouqiIcon.png"></image>
+ </view>
+ </div>
+
+ </view>
+ </view>
+ <!-- 鍒嗗鎴风叅绉嶅彂杩愭儏鍐� -->
+ <view class="shoukuan-group" v-if="kehuTongjiTemp && kehuTongjiTemp.length > 0">
+ <view class="currentDay-box">
+ <combined-title title="鍒嗗鎴风叅绉嶅彂杩愭儏鍐�">
+ </combined-title>
+ </view>
+
+ <view class="shoukuan-box">
+ <div class="shoukuan-box-inside">
+ <view class="shoukuan-main" v-for="(item,index) in kehuTongji" :key="index">
+ <view class="shoukuan-line">
+ <view class="name">瀹㈡埛锛�</view>
+ <view class="text1">{{item.customerName}}</view>
+ </view>
+ <view class="shoukuan-line">
+ <view class="name">璐﹀锛�</view>
+ <view class="text1">{{item.ledgerName}}</view>
+ </view>
+ <view class="coalTongji-box">
+ <view class="shoukuan-line kehu-block">
+ <view class="name">杞︽暟锛�</view>
+ <view class="text1 num">{{item.carSize}}</view>
+ </view>
+ <view class="shoukuan-line kehu-block">
+ <view class="name">鐓ょ锛�</view>
+ <view class="text1">{{item.coalName}}</view>
+ </view>
+ </view>
+ <view class="coalTongji-box marginTop">
+ <view class="caol-block">
+ <view class="name">鍙戣繍閲�(鍚�)</view>
+ <view class="num">{{item.executive || 0}}</view>
+ </view>
+ <view class="caol-block">
+ <view class="name">鍗曚环(鍏�)</view>
+ <view class="num">{{item.coalPrice || 0}}</view>
+ </view>
+ <view class="caol-block">
+ <view class="name">閲戦(鍏�)</view>
+ <view class="num">{{item.amount || 0}}</view>
+ </view>
+ </view>
+ </view>
+ <view class="shouqiIcon" @click="handlekehuTongjiShowIsMore">
+ <image v-if="!kehuTongjiShowIsMore" src="@/static/home/xialaIcon.png"></image>
+ <image v-else src="@/static/home/shouqiIcon.png"></image>
+ </view>
+ </div>
+
+ </view>
+ </view>
+ </view>
+
+
<!-- 鎴戠殑鐢宠 -->
<combined-title title="鎴戠殑鐢宠" detailsPath="/pages/my-application/my-application" v-if="shenqingMenu"></combined-title>
<view class="card-group">
@@ -338,6 +541,7 @@
import combinationCard from '@/components/common/combination-card/combination-card.vue';
import { setAccessToken, redirectLogin } from '@/utils/status.js';
import { logout } from '@/api/global.js';
+import UText from "../../uni_modules/uview-ui/components/u-text/u-text.vue";
export default {
name: 'home',
@@ -461,7 +665,23 @@
pageSize: 2,
// sort: 'createTime',
// order: 'desc'
- }
+ },
+ coalData:[],
+ shoukuanJilu:[],
+ shoukuanJiluTemp:[],
+ shoukuanIsMore:false, //
+ shoukuanToatl:0,
+ coalTongji:[], //鐓ょ缁熻
+ coalTongjiTemp:[], //鐓ょ缁熻
+ coalShowIsMore: false,
+ kehuTongji:[], //鐓ょ缁熻
+ kehuTongjiTemp:[], //鐓ょ缁熻
+ kehuTongjiShowIsMore: false,
+ compId:'',
+ d2Sum:0, //鎬昏閲戦
+ d1Sum:0, //鎬昏
+ lyDSumSum:0, //璺繍
+ dsumSum:0, //姹借繍
};
},
// 鐩戝惉椤甸潰鍒濇娓叉煋瀹屾垚銆傛敞鎰忓鏋滄覆鏌撻�熷害蹇紝浼氬湪椤甸潰杩涘叆鍔ㄧ敾瀹屾垚鍓嶈Е鍙�
@@ -487,11 +707,74 @@
this.init();
},
components: {
+ UText,
combinedTitle,
combinationCard
// popupMenu
},
+ watch: {
+ shoukuanIsMore: {
+ handler(newVal,oldVal) {
+ console.log(newVal,'newVal-------褰撳ぉ鏀舵璁板綍')
+ let temp = newVal.toString() || ''
+ if(this.shoukuanJiluTemp && this.shoukuanJiluTemp.length > 0) {
+ if(temp == 'false') {
+ this.shoukuanJilu = this.shoukuanJiluTemp.slice(0,2)
+ this.coalShowIsMore = false
+ }else if(temp == 'true') {
+ this.shoukuanJilu = this.shoukuanJiluTemp
+ this.coalShowIsMore = true
+ }
+ }
+ },
+ immediate: true,
+ deep: true
+ },
+ coalShowIsMore: {
+ handler(newVal,oldVal) {
+ console.log(newVal,'newVal-------鎸夌叅绉嶇粺璁�')
+ let temp = newVal.toString() || ''
+ if(this.coalTongjiTemp && this.coalTongjiTemp.length > 0) {
+ if(temp == 'false') {
+ this.coalTongji = this.coalTongjiTemp.slice(0,2)
+ this.coalShowIsMore = false
+ }else if(temp == 'true') {
+ this.coalTongji = this.coalTongjiTemp
+ this.coalShowIsMore = true
+ }
+ }
+ },
+ immediate: true,
+ deep: true
+ },
+ kehuTongjiShowIsMore: {
+ handler(newVal,oldVal) {
+ console.log(newVal,'newVal-------鎸夊鎴峰彂杩愮粺璁�')
+ let temp = newVal.toString() || ''
+ if(this.kehuTongjiTemp && this.kehuTongjiTemp.length > 0) {
+ if(temp == 'false') {
+ this.kehuTongji = this.kehuTongjiTemp.slice(0,2)
+ this.kehuTongjiShowIsMore = false
+ }else if(temp == 'true') {
+ this.kehuTongji = this.kehuTongjiTemp
+ this.kehuTongjiShowIsMore = true
+ }
+ }
+ },
+ immediate: true,
+ deep: true
+ },
+ },
methods: {
+ handleShouKuanIsMore() { //褰撴棩鏀舵鎯呭喌
+ this.shoukuanIsMore = !this.shoukuanIsMore
+ },
+ handleCoalIsMore() { //鐓ょ鍙戣繍鎯呭喌
+ this.coalShowIsMore = !this.coalShowIsMore
+ },
+ handlekehuTongjiShowIsMore() { //鐓ょ鍙戣繍鎯呭喌
+ this.kehuTongjiShowIsMore = !this.kehuTongjiShowIsMore
+ },
watchRouter() {
console.log('璺敱璺宠浆');
},
@@ -501,10 +784,66 @@
this.todoList(); // 鎴戠殑寰呭姙
this.doneList(); // 鎴戠殑宸插姙
this.xscarshippingdayplan(); // 鏃ヨ鍒�
+ this.currentCoalPrice() //鐓ょ浠锋牸
+ this.getSkList() //褰撳ぉ鏀舵璁板綍
+ this.getStatistics1() //鎸夌叅绉嶇粺璁�
+ this.getStatistics2() //鎸夊鎴峰彂杩愮粺璁�
},
+ //鐓ょ浠锋牸
+ currentCoalPrice() {
+ this.$reqGet('currentCoalPrice').then(res => {
+ console.log(res.data,'res.data')
+ if (res.code == 0) {
+ this.coalData = res.data || []
+ }
+ })
+ },
+ getSkList() { //褰撳ぉ鏀舵璁板綍
+ this.$reqGet('getSkList').then(res => {
+ if (res.code == 0) {
+ this.shoukuanJiluTemp = res.data || []
+ if(this.shoukuanJiluTemp && this.shoukuanJiluTemp.length > 0) {
+ this.shoukuanToatl = this.shoukuanJiluTemp[0]?.money || 0
+ if(this.shoukuanJiluTemp.length > 1) {
+ this.shoukuanJilu = this.shoukuanJiluTemp.slice(0,2)
+ this.shoukuanIsMore = false
+ }
+ }
+ }
+ })
+ },
+ getStatistics1() { //鎸夌叅绉嶇粺璁�
+ this.$reqGet('getStatistics1').then(res => {
+ if (res.code == 0) {
+ this.coalTongjiTemp = res.data || []
+ if(this.coalTongjiTemp && this.coalTongjiTemp.length > 0){
+ this.d2Sum = this.coalTongjiTemp[0]?.d2Sum || 0
+ this.d1Sum = this.coalTongjiTemp[0]?.d1Sum || 0
+ this.lyDSumSum = this.coalTongjiTemp[0]?.lyDSumSum || 0
+ this.dsumSum = this.coalTongjiTemp[0]?.dsumSum || 0
+ if(this.coalTongjiTemp.length > 1) {
+ this.coalTongji = this.coalTongjiTemp.slice(0,2)
+ this.coalShowIsMore = false
+ }
+ }
+ }
+ })
+ },
+ getStatistics2() { //鎸夊鎴峰彂杩愮粺璁�
+ this.$reqGet('getStatistics2').then(res => {
+ if (res.code == 0) {
+ this.kehuTongjiTemp = res.data || []
+ if(this.kehuTongjiTemp && this.kehuTongjiTemp.length > 0){
+ if(this.kehuTongjiTemp.length > 1) {
+ this.kehuTongji = this.kehuTongjiTemp.slice(0,2)
+ this.kehuTongjiShowIsMore = false
+ }
+ }
+ }
+ })
+ },
//浠e姙璇︽儏
daibanDetail(item) {
- console.log(item,'item=====------000000')
if(item?.actBusiness?.actType == 'Offsetting') { //鏀舵 actType = 鈥極ffsetting鈥�
uni.navigateTo({
url: `/pages/payment-form-data/payment-form-data?id=${item.tableId}`,
@@ -537,7 +876,9 @@
uni.setStorageSync('userInfo', res.data.sysUser);
this.$store.commit('SET_PERMISSIONS',res.data.permissions)
//uni.setStorageSync('permissions', res.data.permissions);
- this.userId = res.data.sysUser.userId;
+ this.userId = res.data.sysUser?.userId;
+ this.compId = res.data.sysUser?.compId;
+ console.log(this.compId,'this.compId---111')
this.$nextTick(() => {
this.coalbunker();
});
@@ -871,11 +1212,23 @@
<style lang="scss" scoped>
+::v-deep{
+ .uni-table-td,.uni-table-th{
+ color: #000;
+ }
+}
::v-deep.home {
width: 100%;
display: flex;
flex-direction: column;
-
+ .marginTop{
+ margin-top: 16rpx;
+ }
+ .small{
+ font-size: 20rpx;
+ margin-left: 6rpx;
+ font-weight: normal;
+ }
// 妯悜鑿滃崟鏍�
.utils {
.utils-container {
@@ -1161,4 +1514,208 @@
}
}
}
+.huoshiju-box{
+ width: 100%;
+ display: flex;
+ flex-direction: column;
+ .price-group{
+ width: 100%;
+ display: flex;
+ flex-direction: column;
+ .price-title{
+ width: 100%;
+ display: flex;
+ justify-content: space-between;
+ font-size: 32rpx;
+ }
+ .price-box{
+ width: 100%;
+ padding: 0 20rpx 20rpx 20rpx;
+ box-sizing: border-box;
+ .price-box-inside{
+ width: 100%;
+ display: flex;
+ flex-direction: column;
+ padding: 30rpx;
+ box-sizing: border-box;
+ border-radius: 18rpx;
+ box-shadow: 0 2rpx 20rpx #e5e5e5, 0 0 1px #e5e5e5, 0 0 1px #e5e5e5;
+ }
+ .price-line{
+ width: 100%;
+ display: flex;
+ justify-content: space-between;
+ height: 60rpx;
+ line-height: 60rpx;
+ .name{
+ font-size: 26rpx;
+ color: #606266;
+ }
+ .price{
+ display: flex;
+ align-items: baseline;
+ .priceNum{
+ font-size: 28rpx;
+ }
+ .priceUnit{
+ font-size: 20rpx;
+ margin-left: 10rpx;
+ }
+ }
+ }
+ }
+ }
+ .shoukuan-group{
+ width: 100%;
+ display: flex;
+ flex-direction: column;
+ .currentDay-box{
+ width: 100%;
+ position: relative;
+ .total-box{
+ position: absolute;
+ right: 20rpx;
+ top: 50%;
+ transform: translateY(-50%);
+ display: flex;
+ align-items: baseline;
+ .total1{
+ font-size: 22rpx;
+ }
+ .total2{
+ font-size: 32rpx;
+ margin-top: 6rpx;
+ color: #000;
+ font-weight: 540;
+ display: flex;
+ align-items: baseline;
+ }
+ }
+ }
+ .shoukuan-box{
+ width: 100%;
+ padding: 0 20rpx 20rpx 20rpx;
+ box-sizing: border-box;
+ .coalFayun-total{
+ width: 100%;
+ display: flex;
+ background: #4b6cfa;
+ padding: 20rpx 10rpx;
+ box-sizing: border-box;
+ border-radius: 16rpx;
+ margin-bottom: 20rpx;
+ .total-block{
+ width: 50%;
+ display: flex;
+ flex-direction: column;
+ justify-content: center;
+ align-items: center;
+ .num{
+ font-size: 32rpx;
+ color: #fff;
+ font-weight: 540;
+ display: flex;
+ align-items: baseline;
+ height: 38rpx;
+ }
+ .name{
+ font-size: 22rpx;
+ color: #fff;
+ margin-top: 10rpx;
+ }
+ }
+ }
+ .shoukuan-box-inside{
+ width: 100%;
+ display: flex;
+ flex-direction: column;
+ padding: 0 40rpx;
+ box-sizing: border-box;
+ border-radius: 18rpx;
+ box-shadow: 0 2rpx 20rpx #e5e5e5, 0 0 1px #e5e5e5, 0 0 1px #e5e5e5;
+ transition: all 0.3s;
+ .shoukuan-main{
+ width: 100%;
+ display: flex;
+ flex-direction: column;
+ border-bottom: 1px solid #e5e5e5;
+ padding: 20rpx 0;
+ &:nth-last-child(2){
+ border-bottom: none;
+ }
+ }
+ .shoukuan-line{
+ width: 100%;
+ display: flex;
+ align-items: baseline;
+ height: 60rpx;
+ line-height: 60rpx;
+ .name{
+ font-size: 24rpx;
+ color: #606266;
+ }
+ .text1{
+ font-size: 30rpx;
+ }
+ .num{
+ font-size: 32rpx;
+ margin-top: 6rpx;
+ color: #000;
+ font-weight: 540;
+ display: flex;
+ align-items: baseline;
+ }
+ }
+ .kehu-block{
+ width: 33%;
+ .text1{
+ flex: 1;
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ }
+ &:nth-child(2){
+ width: 67%;
+ }
+ }
+ .shoukuanFirst-line{
+ font-weight: bolder;
+ }
+ }
+ .coalTongji-box{
+ width: 100%;
+ display: flex;
+ align-items: center;
+ .caol-block{
+ width: 33.3%;
+ display: flex;
+ flex-direction: column;
+ .name{
+ font-size: 22rpx;
+ color: #606266;
+ }
+ .num{
+ font-size: 32rpx;
+ margin-top: 6rpx;
+ color: #000;
+ font-weight: 540;
+ display: flex;
+ align-items: baseline;
+ }
+ }
+ }
+ }
+ .shouqiIcon{
+ width: 100%;
+ display: flex;
+ justify-content: center;
+ transition: all 0.3s;
+ image{
+ width: 50rpx;
+ height: 34rpx;
+ margin: 10rpx 0;
+ }
+ }
+ }
+}
</style>
diff --git a/utils/api.js b/utils/api.js
index 27a940a..16eafed 100644
--- a/utils/api.js
+++ b/utils/api.js
@@ -242,6 +242,22 @@
getListByComp: {
url: '/yunxiao/jcncskuser/getListByComp',
method: 'GET',
- }
-
+ },
+ //棣栭〉鏂板鐓ょ浠锋牸
+ currentCoalPrice: {
+ url: '/yunxiao/api/index/currentCoalPrice',
+ method: 'GET',
+ },
+ getSkList: { //褰撳ぉ鏀舵璁板綍
+ url: '/yunxiao/api/index/getSkList',
+ method: 'GET',
+ },
+ getStatistics1: { //鎸夌叅绉嶇粺璁�
+ url: '/yunxiao/api/index/getStatistics1',
+ method: 'GET',
+ },
+ getStatistics2: { //鎸夊鎴峰彂杩愮粺璁�
+ url: '/yunxiao/api/index/getStatistics2',
+ method: 'GET',
+ }
}
--
Gitblit v1.9.1