From f698d1dbfe9b74cd7a4938380d4501ccf21508f9 Mon Sep 17 00:00:00 2001
From: zhangxiaoxu <819527061@qq.com>
Date: 星期三, 26 十一月 2025 10:19:30 +0800
Subject: [PATCH] 煤仓库存明细无数据隐藏

---
 pages/home/home.vue |   91 +++++++++++++++++++++++++++++----------------
 1 files changed, 58 insertions(+), 33 deletions(-)

diff --git a/pages/home/home.vue b/pages/home/home.vue
index 3d73838..d14b171 100644
--- a/pages/home/home.vue
+++ b/pages/home/home.vue
@@ -4,8 +4,8 @@
 		<view class="home_swipe"><u-swiper :list="list3" indicator indicatorMode="line" circular></u-swiper></view>
 
 		<!-- 鍥捐〃 -->
-		<combined-title title="鐓や粨搴撳瓨鏄庣粏"></combined-title>
-		<view class="charts-box">
+		<combined-title v-if="uchartsData && uchartsData.length > 0" title="鐓や粨搴撳瓨鏄庣粏"></combined-title>
+		<view class="charts-box" v-if="uchartsData && uchartsData.length > 0">
 			<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>
@@ -19,7 +19,7 @@
 					</view>
 				</template>
 				<template v-slot:center>
-					<view class="center-container" @click="() => shenqingDetail(item)">
+					<view class="center-container">
 						<view class="center-content__one center-margin">
 							<view class="">
 								<text>鎵�灞炴祦绋嬶細{{ item.processName }}</text>
@@ -54,11 +54,11 @@
 								<image src="@/static/home/cehui.png" mode=""></image>
 								<view>鎾ゅ洖</view>
 							</view> -->
-							<view @click="checkTheScheduleClick(item.procInstId)" v-if="item.status == 1">
+							<view @click="() => checkTheScheduleClick(item.procInstId)" v-if="item.status == 1">
 								<image src="@/static/home/jindu.png" mode=""></image>
 								<view>鏌ョ湅杩涘害</view>
 							</view>
-							<view @click="theFormDataClick(item.tableId)" v-if="(item.status == 1 || item.status == 2 || item.status == 3) && item.processName == '鍙戣繍閫氱煡鍗�'">
+							<view @click="() => shenqingDetail(item)" v-if="item.actType == 'Offsetting' || item.actType == 'XsWaybill'">
 								<image src="@/static/home/biaodan.png" mode=""></image>
 								<view>鐢宠璇︽儏</view>
 							</view>
@@ -70,7 +70,7 @@
 								<image src="@/static/home/history.png" mode=""></image>
 								<view>缂栬緫</view>
 							</view> -->
-							<view @click="approvalHistoryClick(item.procInstId)" v-if="item.status == 2 || item.status == 3">
+							<view @click="() => checkTheScheduleClick(item.procInstId)" v-if="item.status !== 1">
 								<image src="@/static/home/history.png" mode=""></image>
 								<view>瀹℃壒鍘嗗彶</view>
 							</view>
@@ -96,13 +96,13 @@
 		<combined-title title="鎴戠殑寰呭姙" detailsPath="/pages/my-todo/my-todo"></combined-title>
 		<view class="card-group">
 			<combination-card class="card" v-for="(item, index) in daibanData" index="index">
-				<template v-slot:top>
+				<template slot="top">
 					<view>
 						<text>{{ item.actBusiness.title }}</text>
 					</view>
 				</template>
-				<template v-slot:center>
-					<view class="center-container" @click="() => daibanDetail(item)">
+				<template slot="center">
+					<view class="center-container">
 						<view class="center-content__one center-margin">
 							<view class="">
 								<text>浠诲姟鍚嶇О锛歿{ item.name || '' }}</text>
@@ -120,23 +120,23 @@
 						</view>
 					</view>
 				</template>
-				<template v-slot:bottom>
+				<template slot="bottom">
 					<view class="bottom-container">
 						<!-- 寰呭姙鎸夐挳 -->
 						<view class="bottom-content__item">
-							<view @click="theFormDataClick(item.tableId)">
+							<view @click="() => daibanDetail(item)" v-if="item.actBusiness.actType == 'Offsetting' || item.actBusiness.actType == 'XsWaybill'">
 								<image src="@/static/home/jindu.png" mode=""></image>
 								<view>鐢宠璇︽儏</view>
 							</view>
-							<view @click="adopClick(item)">
+							<view @click="() => adopClick(item)">
 								<image src="@/static/home/tongguo.png" mode=""></image>
 								<view>閫氳繃</view>
 							</view>
-							<view @click="rejectClick(item)">
+							<view @click="() => rejectClick(item)">
 								<image src="@/static/home/bohui.png" mode=""></image>
 								<view>椹冲洖</view>
 							</view>
-							<view @click="approvalHistoryClick(item.procInstId)">
+							<view @click="() => checkTheScheduleClick(item.procInstId)">
 								<image src="@/static/home/history.png" mode=""></image>
 								<view>鍘嗗彶</view>
 							</view>
@@ -198,11 +198,15 @@
 					<view class="bottom-container">
 						<!-- 宸插姙鎸夐挳 -->
 						<view class="bottom-content__item">
-							<view @click="theFormDataClick(item.tableId)" v-if="item.processName == '鍙戣繍閫氱煡鍗�'">
+							<view @click="() => shenqingDetail(item)" v-if="item.processName == '鍙戣繍閫氱煡鍗�'">
 								<image src="@/static/home/biaodan.png" mode=""></image>
 								<view>琛ㄥ崟鏁版嵁</view>
 							</view>
-							<view @click="approvalHistoryClick(item.procInstId)">
+              <view @click="() => daibanDetail(item)"  v-if="item.actBusiness.actType == 'Offsetting' || item.actBusiness.actType == 'XsWaybill'">
+                <image src="@/static/home/jindu.png" mode=""></image>
+                <view>璇︽儏</view>
+              </view>
+							<view @click="() => checkTheScheduleClick(item.procInstId)">
 								<image src="@/static/home/history.png" mode=""></image>
 								<view>瀹℃壒鍘嗗彶</view>
 							</view>
@@ -217,9 +221,9 @@
 		</view>
 
 		<!-- 鏃ヨ鍒� -->
-		<combined-title title="鏃ュ彂杩愯鍒�" detailsPath="/pages/jihua/jihua" v-if="rijihuaMenu"></combined-title>
+		<combined-title title="鏃ュ彂杩愯鍒�" detailsPath="/pages/jihua/jihua"></combined-title>
 		<view class="card-group bottomChild">
-			<combination-card class="card" :showTop="false" v-for="(item, index) in fyData.slice(0, 2)" :key="item.id" v-if="rijihuaMenu">
+			<combination-card class="card" :showTop="false" v-for="(item, index) in fyData.slice(0, 2)" :key="item.id">
 				<template v-slot:top></template>
 				<template v-slot:center>
 					<view class="main-block-box">
@@ -348,6 +352,7 @@
 	},
 	computed: {
 		rijihuaMenu() {
+      console.log(this.$store.state.rijihuaMenu,'this.$store.state.rijihuaMenu==============',this.$store.state)
 			return this.$store.state.rijihuaMenu;
 		},
 		shenqingMenu() {
@@ -416,8 +421,14 @@
 			// dataSeletText: '璇烽�夋嫨鐘舵��',
 			// 椹冲洖璇锋眰
 			rejectForm: {
-				procInstIds: '',
-				comment: ''
+        id: "",
+        procInstId: "",
+        comment: "",
+        type: 0,
+        backTaskKey: "-1",
+        sendMessage: true,
+        sendSms: true,
+        sendEmail: true,
 			},
 			modalType: 0,
 			// 鍒犻櫎鐢宠妯℃�佹
@@ -448,8 +459,8 @@
 			haveTodoParams: {
 				pageNumber: 1,
 				pageSize: 2,
-				sort: 'createTime',
-				order: 'desc'
+				// sort: 'createTime',
+				// order: 'desc'
 			}
 		};
 	},
@@ -493,12 +504,13 @@
 		},
     //浠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}`,
 
         })
-      }else if(item?.actBusiness?.actType == 'WAY_BILL') {
+      }else if(item?.actBusiness?.actType == 'XsWaybill') {
         uni.navigateTo({
           url: `/pages/new-application-form-data/new-application-form-data?id=${item.tableId}`
         })
@@ -506,12 +518,13 @@
     },
     //浠e姙璇︽儏
     shenqingDetail(item) {
+      console.log(item,'item====寰呭姙===璇︽儏')
       if(item.actType == 'Offsetting') {  //鏀舵 actType = 鈥極ffsetting鈥�
         uni.navigateTo({
           url: `/pages/payment-form-data/payment-form-data?id=${item.tableId}`,
 
         })
-      }else if(item.actType == 'WAY_BILL') {
+      }else if(item.actType == 'XsWaybill') {
         uni.navigateTo({
           url: `/pages/new-application-form-data/new-application-form-data?id=${item.tableId}`
         })
@@ -519,8 +532,11 @@
     },
 		getUserInfo() {
 			this.$reqGet('getUserInfo').then(res => {
+        console.log(res,'res=====绯荤粺鐧诲綍===')
 				if (res.code == 0) {
 					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.$nextTick(() => {
 						this.coalbunker();
@@ -570,6 +586,7 @@
 			};
 			this.$reqGet('xscarshippingdayplan', params)
 				.then(res => {
+          console.log('鍙戣繍鏃ヨ鍒�----------------------------------',res)
 					if (res.code == 0) {
 						this.fyData = res.data.records;
 						uni.hideLoading();
@@ -659,7 +676,7 @@
 		// 閫氳繃妯℃�佹
 		adoptModalConfirm() {
 			this.adoptModalShow = false;
-			this.adoptForm.comment = this.adoptModalContent;
+			this.adoptForm.comment = this.adoptModalContent || '';
 			this.$reqPost('passAll', this.adoptForm).then(res => {
 				if (res.code == 0) {
 					this.$u.toast('鎿嶄綔鎴愬姛!');
@@ -675,15 +692,20 @@
 		},
 		// 椹冲洖
 		rejectClick(v) {
+      console.log('椹冲洖====',v)
 			this.modalType = 1;
 			this.rejectModalShow = true;
-			this.rejectForm.procInstIds = v.procInstId;
+			this.rejectForm.procInstId = v.procInstId;
+      this.rejectForm.id = v.id;
+      this.rejectForm.procDefId = v.procDefId;
+      this.rejectForm.priority = v.priority;
+      this.rejectForm.type = 1;
 		},
 		// 椹冲洖妯℃�佹
 		rejectModalConfirm() {
 			this.rejectModalShow = false;
 
-			this.$reqPost('backAll', this.rejectForm).then(res => {
+			this.$reqPost('back', this.rejectForm).then(res => {
 				if (res.code == 0) {
 					this.$u.toast('鎿嶄綔鎴愬姛锛�');
 				} else {
@@ -725,11 +747,13 @@
 			});
 		},
 		// 琛ㄥ崟鏁版嵁
-		theFormDataClick(v) {
-			uni.navigateTo({
-				url: `/pages/the-form-data/the-form-data?index=${v}`
-			});
-		},
+		// theFormDataClick(item) {
+    //   console.log(item,'鐢宠杩樻槸-----item')
+		// 	// uni.navigateTo({
+		// 	// 	url: `/pages/the-form-data/the-form-data?index=${v}`
+		// 	// });
+    //
+		// },
 		// 鍒犻櫎鎾ゅ洖鐢宠
 		deleteWithDrawApplication(id) {
 			this.deleteWithDrawApplicationGlobal(id)
@@ -845,6 +869,7 @@
 };
 </script>
 
+
 <style lang="scss" scoped>
 ::v-deep.home {
 	width: 100%;
@@ -889,7 +914,7 @@
 	// echarts鍥捐〃
 	.charts-box {
 		width: 91%;
-		height: vww(330);
+		height: vww(270);
 		margin: 0 auto;
 		.u-empty {
 			height: 100%;

--
Gitblit v1.9.1