浏览代码

no message

USER-20230908AJ\Administrator 1 年之前
父节点
当前提交
911a0c3427
共有 2 个文件被更改,包括 66 次插入18 次删除
  1. 2 1
      pages/statistics/components/capital_stat.vue
  2. 64 17
      pages/statistics/module/stat_situation.vue

+ 2 - 1
pages/statistics/components/capital_stat.vue

@@ -10,7 +10,7 @@
 			<view class="view_line"></view>
 			<StatRanking ref="rankingObj" :is_margin_top="false" :is_type="2" :leftText="'个人业绩排行'" :data-list="userList"></StatRanking>
 		</view>
-		<StatSituation :type="1"></StatSituation>
+		<StatSituation ref="situationObj" :date-type-obj="dateTypeObj" :type="1"></StatSituation>
 	</view>
 </template>
 
@@ -91,6 +91,7 @@
             this.getDepartmentMoney(2)
             this.getSysPassage()
             this.setUserRanking()
+            this.$refs.situationObj.startList()
           }
         }
       },

+ 64 - 17
pages/statistics/module/stat_situation.vue

@@ -10,36 +10,29 @@
 		</view>
 		<view class="">
 			<view class="sys-from-background-color m-b16 r-20 p-20 finance_item sys-weight-400"
-				v-for="(item,index) in 3" :key="index">
-				<view class="" v-if="type === 1">
+				v-for="(item,index) in businessList" :key="index">
+				<view class="" >
 					<view class="row-justify-sb center">
 						<view class="row-c">
 							<text class="size-26 text-color-666">客户:</text>
-							<text class="size-26 text-color-12 sys-weight-500">张三</text>
+							<text class="size-26 text-color-12 sys-weight-500">{{item.name}}</text>
 						</view>
 						<view class="row-c">
 							<text class="size-24 text-color-666">客户经理:</text>
-							<text class="size-26 text-color-12sys-weight-500">李四</text>
+							<text class="size-26 text-color-12sys-weight-500">{{item.user_name}}</text>
 						</view>
 					</view>
 					<view class="page-box-bg-fff row-justify-sb center size-24 p-tb16 p-lr40 r-20 m-t20">
-						<text class="text-color-E21 sys-weight-600">200万</text>
-						<text>归档确认</text>
+						<text class="text-color-E21 sys-weight-600">{{item.total_money}}万</text>
+						<text>{{item.status_str}}</text>
 						<view class="">
-							<text class="text-color-12">2024/12/23</text>
+							<text class="text-color-12">{{item.use_date}}</text>
 							<text class="text-color-666">用款</text>
 						</view>
 					</view>
 				</view>
-				<view class="row-justify-sb center size-24 p-tb16 p-lr20 r-20" v-else>
-					<text>归档确认</text>
-					<text class="text-color-E21 sys-weight-600">200万</text>
-					<view class="">
-						<text class="text-color-12">2024/12/23</text>
-						<text class="text-color-666">用款</text>
-					</view>
-				</view>
 			</view>
+      <en-blank v-if="businessList.length<=0"></en-blank>
 		</view>
 	</view>
 </template>
@@ -47,10 +40,13 @@
 <script>
 	import PeakChart from "@/common/chart/peak_chart.vue";
 	import StatisticsTitle from "./statistics_title.vue";
+  import {getBusinessList, getUseList} from "@/api/statistics";
+  import EnBlank from "@/components/en-utils/en-blank/en-blank.vue";
 
 	export default {
 		name: 'stat_situation',
 		components: {
+      EnBlank,
 			PeakChart,
 			StatisticsTitle
 		},
@@ -67,12 +63,63 @@
 				type: String,
 				default: '情况说明'
 			},
+      'dateTypeObj':{
+        default:()=>{
+          return {
+            dateType:4,
+            selectDate:'2023-02-25',
+            money_type:1,
+            censusUserType:0,
+            product_id:5,
+          }
+        }
+      },
 		},
 		data() {
 			return {
-				list: ['到访情况', '预计出款']
+				list: ['到访情况', '预计出款'],
+        current:0,
+        useNum:0,
+        usePage:1,
+        useList:[],
+        businessNum:0,
+        businessPage:1,
+        businessList:[],
 			};
-		}
+		},
+    methods: {
+      onChange(e){
+        this.current=e
+      },
+      startList(){
+        if(this.dateTypeObj.censusUserType>0){
+          if(this.current===0){
+            this.getBusinessList()
+          }else {
+            this.getUseList()
+          }
+        }
+      },
+      // 到访记录
+      getBusinessList(){
+        this.dateTypeObj.page=1
+        getBusinessList(this.dateTypeObj).then((res)=>{
+          if(res.code === 1){
+            this.businessNum = res.data.totalNum
+            this.businessList = res.data.items
+          }
+        })
+      },
+      // 预计出款
+      getUseList(){
+        this.dateTypeObj.page=1
+        getUseList(this.dateTypeObj).then((res)=>{
+          this.useNum = res.data.totalNum
+          this.useNum = res.data.items
+        })
+      },
+
+    },
 	}
 </script>