Browse Source

Merge branch 'master' of http://git.wealfavor.cn/root/wh-new-xcx

# Conflicts:
#	pages.json
443166679@qq.com 1 year ago
parent
commit
230babca48
51 changed files with 491 additions and 23 deletions
  1. 2 2
      common/chart/circle_chart.vue
  2. 16 2
      common/chart/pie_chart.vue
  3. 176 0
      page_task/draft/index.vue
  4. 206 1
      pages.json
  5. 37 7
      pages/index/index.vue
  6. 9 4
      pages/index/module/index_column.vue
  7. 2 2
      pages/task/task.vue
  8. 29 0
      qodana.yaml
  9. 11 5
      service/tools.js
  10. 3 0
      static/css/default-color.scss
  11. BIN
      static/img/index/index-add.png
  12. BIN
      static/img/index/index-audit.png
  13. BIN
      static/img/index/index-avatar.png
  14. BIN
      static/img/index/index-bg.png
  15. BIN
      static/img/index/index-do.png
  16. BIN
      static/img/index/index-house.png
  17. BIN
      static/img/index/index-message.png
  18. BIN
      static/img/index/index-money.png
  19. BIN
      static/img/index/index-record.png
  20. BIN
      static/img/index/index-stay.png
  21. BIN
      static/img/index/index-system.png
  22. BIN
      static/img/index/index-task.png
  23. BIN
      static/img/index/top-nav.png
  24. BIN
      static/img/information/Group 2122.png
  25. BIN
      static/img/information/Group 2123.png
  26. BIN
      static/img/information/Mask group.png
  27. BIN
      static/img/information/Union.png
  28. BIN
      static/img/information/car.png
  29. BIN
      static/img/information/company.png
  30. BIN
      static/img/information/correct.png
  31. BIN
      static/img/information/delete.png
  32. BIN
      static/img/information/double.png
  33. BIN
      static/img/information/down.png
  34. BIN
      static/img/information/edit.png
  35. BIN
      static/img/information/error.png
  36. BIN
      static/img/information/guarantee.png
  37. BIN
      static/img/information/hint-four.png
  38. BIN
      static/img/information/hint-one.png
  39. BIN
      static/img/information/hint-subtract.png
  40. BIN
      static/img/information/hint-three.png
  41. BIN
      static/img/information/hint-vector.png
  42. BIN
      static/img/information/house.png
  43. BIN
      static/img/information/identity-front.png
  44. BIN
      static/img/information/identity-verso.png
  45. BIN
      static/img/information/paizhao 1.png
  46. BIN
      static/img/information/right-arrows.png
  47. BIN
      static/img/information/right.png
  48. BIN
      static/img/information/three.png
  49. BIN
      static/img/information/two.png
  50. BIN
      static/img/information/vector.png
  51. BIN
      static/img/information/关闭.png

+ 2 - 2
common/chart/circle_chart.vue

@@ -23,7 +23,7 @@
 			},
 			bgColor: {
 				type: String,
-				default: ''
+				default: '#0FB160'
 			},
 		},
 		data() {
@@ -121,4 +121,4 @@
 </script>
 
 <style scoped>
-</style>
+</style>

+ 16 - 2
common/chart/pie_chart.vue

@@ -93,7 +93,7 @@ export default {
     };
   },
   onReady() {
-    this.getServerData();
+    // this.getServerData();
   },
   methods: {
     getServerData() {
@@ -110,6 +110,20 @@ export default {
         this.chartData = JSON.parse(JSON.stringify(res));
       }, 500);
     },
+    setData(data){
+      console.log(data)
+      setTimeout(() => {
+        //模拟服务器返回数据,如果数据格式和标准格式不同,需自行按下面的格式拼接
+        let res = {
+          series: [
+            {
+              data: data
+            }
+          ]
+        };
+        this.chartData = JSON.parse(JSON.stringify(res));
+      }, 50);
+    }
   }
 };
 </script>
@@ -120,4 +134,4 @@ export default {
     width: 135px;
     height: 135px;
   }
-</style>
+</style>

+ 176 - 0
page_task/draft/index.vue

@@ -0,0 +1,176 @@
+<template>
+  <view class="total-page page-box page-env-20 scroll_content task-bg">
+    <Nav :title="'草稿箱'" :genre="1" :back="true" is_fixed></Nav>
+    <view>
+      <Search :placeholder="'客户姓名或电话'"></Search>
+
+    </view>
+    <EnScroll ref="scroll" :navHeight="0" is_tabHeight @onRefresh="onRefresh" @onScrollBottom="onScrollBottom">
+      <view class="draft-item r-40 sys-background-fff" v-for="item in  list">
+        <view class="item-left">
+          <view class="left-top left-item">
+            <view class="top-name sys-weight-600 size-30 text-color-12">{{item.name}}</view>
+            <view class="top-product sys-weight-400 size-24 text-color-009 r-10">{{item.product_name}}</view>
+          </view>
+          <view class="left-content left-item">
+            <view class="sys-weight-400 size-24 text-color-12">身份证:</view>
+            <view class="sys-weight-600 sys-size-28 text-color-12">{{item.id_number}}</view>
+          </view>
+          <view class="left-bottom left-item">
+            <view class=" size-24 text-color-999">保存时间:</view>
+            <view class=" size-24 text-color-999">{{item.created_at}}</view>
+          </view>
+
+        </view>
+        <view class="item-right">
+          <view class="but-item but-edit size-28 sys-weight-500 text-color-fff button-background sys-radius-100">编辑</view>
+          <view class="but-item but-del  size-28 sys-weight-500 text-color-666 ">删除</view>
+        </view>
+
+      </view>
+      <en-blank v-if="list.length<=0"></en-blank>
+
+    </EnScroll>
+  </view>
+</template>
+
+<script>
+
+import {getDraftList} from "@/api/task";
+import EnBlank from "@/components/en-utils/en-blank/en-blank.vue";
+
+export default {
+  components: {EnBlank},
+  data() {
+    return {
+      list: [],
+      page: 1,
+      total: null,
+      isAjax: false,
+    };
+  },
+  mounted(){
+    uni.$on('setNewDraft',()=>{
+      if(this.$refs.draftRef){
+        this.startList()
+      }
+    })
+    this.startList()
+  },
+  methods: {
+    startList() {
+      this.total = 999;
+      this.list = [];
+      this.page = 1;
+      this.isAjax = false;
+      this.getDraftList();
+
+    },
+    delDraft(draftId,index){
+      uni.showModal({
+        title: '警告',
+        content: '是否删除当前草稿!',
+        success:  (res) =>{
+          if (res.confirm) {
+            delDraft({'draftId':draftId}).then((res)=>{
+              this.$refs.draftRef.list.splice(index,1)
+            })
+          }
+        }
+      });
+
+    },
+    editDraft(id){
+      // uni.navigateTo({
+      //   url: '/pages-task/add-client/new-add?draftId='+id
+      // });
+    },
+    getDraftList(){
+      if (this.isAjax || (this.total <= this.list.length)) {
+        return;
+      }
+      this.isAjax = true;
+      getDraftList({'page':this.page}).then((res)=>{
+        if(res.code===1){
+          this.list.push(...res.data.items)
+          this.total = res.data.total
+          this.isAjax = false
+          ++this.page;
+        }
+      })
+    },
+    // 下拉刷新
+    onRefresh() {
+      // uni.showLoading({
+      // 	title: '数据加载中'
+      // })
+      // setTimeout(() => {
+      // 	uni.showToast({
+      // 		title: '加载完成',
+      // 		icon: 'none'
+      // 	})
+      // 	this.$refs.scroll.onEndPulling()
+      // }, 1000)
+      console.log("下拉刷新");
+      this.startList()
+    },
+    // 滚动到底部
+    onScrollBottom() {
+
+      this.getDraftList();
+
+      console.log("到底部了");
+    },
+  },
+}
+</script>
+
+<style lang="scss">
+.draft-item{
+  margin: 20rpx 32rpx 0;
+  padding: 25rpx 30rpx;
+  display: flex;
+  justify-content: space-between;
+  .item-left{
+    .left-item{
+      display: flex;
+      justify-content: left;
+      align-items: center;
+    }
+    .left-top{
+      height: 52rpx;
+      .top-product{
+        background-color: rgba(15, 177, 96, 0.1);
+        padding: 9rpx 22rpx;
+        margin-left: 20rpx;
+      }
+    }
+    .left-content{
+      margin-top: 24rpx;
+      height: 40rpx;
+    }
+    .left-bottom{
+      margin-top: 24rpx;
+      height: 34rpx;
+    }
+
+  }
+  .item-right{
+    padding-top: 20rpx;
+    .but-item{
+      width: 172rpx;
+      height: 70rpx;
+      text-align: center;
+      line-height: 70rpx;
+    }
+    .but-del{
+      margin-top: 15rpx;
+      box-sizing: border-box;
+      border-radius: 99rpx 99rpx 99rpx 99rpx;
+      border: 1rpx solid #666666;
+    }
+  }
+
+}
+
+</style>

+ 206 - 1
pages.json

@@ -1,4 +1,5 @@
 {
+<<<<<<< HEAD
 	"pages": [{
 			"path": "pages/index/index",
 			"style": {
@@ -196,4 +197,208 @@
 
 		]
 	}
-}
+}
+=======
+  "pages": [
+    {
+      "path": "pages/index/index",
+      "style": {
+        "navigationBarTitleText": "首页",
+        "navigationBarTextStyle": "white"
+      }
+    },
+    {
+      "path": "pages/login/index",
+      "style": {
+        "navigationBarTitleText": "登陆",
+        "disableScroll": true
+      }
+    },
+    {
+      "path": "pages/login/register",
+      "style": {
+        "navigationBarTitleText": "",
+        "enablePullDownRefresh": false,
+        "disableScroll": true
+      }
+    },
+    {
+      "path": "pages/login/forget",
+      "style": {
+        "navigationBarTitleText": "",
+        "enablePullDownRefresh": false
+      }
+    },
+    {
+      "path": "pages/login/await-audit",
+      "style": {
+        "navigationBarTitleText": "",
+        "enablePullDownRefresh": false
+      }
+    },
+    {
+      "path": "pages/test/index",
+      "style": {
+        "navigationBarTitleText": "",
+        "enablePullDownRefresh": false
+      }
+    },
+    {
+      "path": "pages/task/task",
+      "style": {
+        "navigationBarTitleText": ""
+      }
+    },
+    {
+      "path": "pages/loan/loan",
+      "style": {
+        "navigationBarTitleText": ""
+      }
+    },
+    {
+      "path": "pages/statistics/statistics",
+      "style": {
+        "navigationBarTextStyle": "white"
+      }
+    }
+  ],
+  "subPackages": [
+    {
+      "root": "page_subpack",
+      "pages": [
+        {
+          "path": "system_setting/system_setting",
+          "style": {
+            "navigationBarTitleText": ""
+          }
+        },
+        {
+          "path": "message/message",
+          "style": {
+            "navigationBarTitleText": ""
+          }
+        },
+        {
+          "path": "personal_details/personal_details",
+          "style": {
+            "navigationBarTitleText": ""
+          }
+        }
+      ]
+    },
+    {
+      "root": "page_task",
+      "pages": [
+        {
+          "path": "gain_task/gain_task",
+          "style": {
+            "navigationBarTitleText": ""
+          }
+        },
+        {
+          "path": "task_details/task_details",
+          "style": {
+            "navigationBarTitleText": ""
+          }
+        },
+        {
+          "path": "creation_task/creation_task",
+          "style": {
+            "navigationBarTitleText": ""
+          }
+        },
+        {
+          "path": "information/information",
+          "style": {
+            "navigationBarTitleText": ""
+          }
+        },
+        {
+          "path": "identity/identity",
+          "style": {
+            "navigationBarTitleText": ""
+          }
+        },
+        {
+          "path": "identity_upload/identity_upload",
+          "style": {
+            "navigationBarTitleText": ""
+          }
+        },
+        {
+          "path": "property/property",
+          "style": {
+            "navigationBarTitleText": ""
+          }
+        },
+        {
+          "path": "apply/apply",
+          "style": {
+            "navigationBarTitleText": ""
+          }
+        },
+        {
+          "path": "task_operate/task_operate",
+          "style": {
+            "navigationBarTitleText": ""
+          }
+        },
+        {
+          "path": "draft/index",
+          "style": {
+            "navigationBarTitleText": "",
+            "enablePullDownRefresh": false
+          }
+        }
+      ]
+    }
+  ],
+  "globalStyle": {
+    "navigationBarTextStyle": "black",
+    "navigationBarTitleText": "万汇融通云",
+    "navigationBarBackgroundColor": "#F8F8F8",
+    "backgroundColor": "#F8F8F8",
+    "navigationStyle": "custom",
+    "backgroundColorBottom": "#EEF1F7"
+  },
+  "tabBar": {
+    "custom": true,
+    "list": [
+      {
+        "pagePath": "pages/index/index",
+        "text": ""
+      },
+      {
+        "pagePath": "pages/task/task",
+        "text": ""
+      },
+      {
+        "pagePath": "pages/loan/loan",
+        "text": ""
+      },
+      {
+        "pagePath": "pages/statistics/statistics",
+        "text": ""
+      }
+    ],
+    "color": "",
+    "selectedColor": "",
+    "backgroundColor": ""
+  },
+  "condition": {
+    "current": 0,
+    "list": [
+      {
+        "name": "任务详情",
+        "path": "/page_task/task_details/task_details",
+        "query": "taskId=4278"
+      },
+      {
+        "name": "添加任务",
+        "path": "/page_task/information/information",
+        "query": "productId=1"
+      }
+    ]
+  }
+}
+>>>>>>> 81d8ff2fe39f47a217874d3be5b66c757eec8673

+ 37 - 7
pages/index/index.vue

@@ -24,7 +24,7 @@
 			<view class="">
 				<view class="row-c">
 					<view class="pie_chart column-c">
-						<PieChart></PieChart>
+						<PieChart ref="pieChart"></PieChart>
 						<text class="size-24 text-color-12">任务完成情况</text>
 					</view>
 					<view class="m-b30">
@@ -35,13 +35,13 @@
 									<text class="m-l16 text-color-787">{{item.name}}</text>
 								</view>
 							</view>
-							<text class="text-color-12 sys-weight-600 m-l40">{{item.value}}</text>
+							<text class="text-color-12 sys-weight-600 m-l40">{{item.value}}%</text>
 						</view>
 					</view>
 				</view>
 			</view>
 			<view class="circle_chart column-sb-c m-t10">
-				<CircleChart :width="'180rpx'" :height="'180rpx'" :bgColor="'#0FB160'"></CircleChart>
+				<CircleChart ref="circleObj" :width="'180rpx'" :height="'180rpx'" bgColor="#0FB160" ></CircleChart>
 				<text class="size-24 text-color-12">任务进度</text>
 			</view>
 		</view>
@@ -58,7 +58,8 @@
 	import IndexColumn from "./module/index_column.vue"
 	// 顶部栏目
 	import IndexPersonal from "./module/index_personal.vue"
-  import {getDayBacklogList} from "@/api/task";
+  import {getDateBacklogStatistics, getDayBacklogList} from "@/api/task";
+  import {date} from "@/uni_modules/uv-ui-tools/libs/function/test";
 
 	export default {
 		components: {
@@ -89,6 +90,12 @@
 					value: "100%"
 				}, ],
         memberData:{},
+        statisticsData:{
+          endNum: 0,
+          exceedDate: 0,
+          lagDate: 0,
+          totalNum: 0,
+        },
         backlogList: [],
         weekData: [],
         weekNum: 1,
@@ -106,26 +113,49 @@
 
       })
       this.startList()
+
 		},
 		onPageScroll(res) {
 			this.scrollTop = res.scrollTop / 120
 		},
 		onReachBottom() {
-			console.log('到底部了');
       this.getDayBacklogList()
+
 		},
 		methods: {
+      getDateBacklogStatistics(){
+        getDateBacklogStatistics({'dateNum':this.modelTime}).then(res=>{
+          if(res.code===1){
+            if(res.data.totalNum>0){
+              this.chartList[0].value=(res.data.exceedNum/res.data.totalNum*100).toFixed(0)*1;
+              this.chartList[1].value=(res.data.lagNum/res.data.totalNum*100).toFixed(0)*1;
+              this.chartList[2].value=(res.data.normalNum/res.data.totalNum*100).toFixed(0)*1;
+              this.$refs.circleObj.setServerData( (res.data.endNum/res.data.totalNum).toFixed(2)*1)
+            }else {
+              this.chartList[0].value=0;
+              this.chartList[1].value=0;
+              this.chartList[2].value=0;
+              this.$refs.circleObj.setServerData( 0)
+            }
+            console.log(this.chartList)
+            this.$refs.pieChart.setData( this.chartList)
+
+
+          }
+        })
+      },
       startList(){
         this.backlogList=[];
         this.page=1;
         this.total=null;
         this.getDayBacklogList();
+        this.getDateBacklogStatistics()
       },
       getDayBacklogList() {
         if(this.total!==null && this.total<=this.backlogList.length){
           return
         }
-        getDayBacklogList({'dateNum': this.indexTime,'page':this.page}).then((res) => {
+        getDayBacklogList({'dateNum': this.modelTime,'page':this.page}).then((res) => {
           if (res.code === 1) {
             this.backlogList.push(...res.data.items)
             this.total = res.data.total
@@ -166,4 +196,4 @@
 		height: 16rpx;
 		border-radius: 50%;
 	}
-</style>
+</style>

+ 9 - 4
pages/index/module/index_column.vue

@@ -9,12 +9,12 @@
 				</view>
 			</view>
 			<view class="column_record row-justify-sb center p-lr20">
-				<view class="column_task">
+				<view class="column_task" @click="onGetDraft">
 					<view class="row-c m-b16 column-c justify-center line-30">
 						<text class="size-26 text-color-fff">任务记录</text>
 					</view>
 					<text class="column_record_num text-color-fff size-24 text-center r-12 line-30 p-tb6">
-						创建中({{memberData.draftNum}})
+						草稿({{memberData.draftNum>99?99:memberData.draftNum}})
 					</text>
 				</view>
 				<view class="column_line"></view>
@@ -23,7 +23,7 @@
 						<text class="size-26 text-color-fff">征信审核</text>
 					</view>
 					<text class="column_record_num text-color-fff size-24 text-center r-12 line-30 p-tb6">
-						待验证({{memberData.creditNum}})
+						待审({{memberData.creditNum>99?99:memberData.creditNum}})
 					</text>
 				</view>
 			</view>
@@ -116,6 +116,11 @@
 			}
 		},
 		methods: {
+      onGetDraft(){
+        uni.navigateTo({
+          url: "/page_task/draft/index"
+        })
+      },
 			onGetTask() {
 				uni.navigateTo({
 					url: "/page_task/gain_task/gain_task"
@@ -204,4 +209,4 @@
 		top: -10rpx;
 		line-height: 30rpx;
 	}
-</style>
+</style>

+ 2 - 2
pages/task/task.vue

@@ -2,7 +2,7 @@
 	<view class="total-page page-box page-env-20 scroll_content task-bg">
 		<Nav :title="'任务'" :genre="1" :back="false" is_fixed></Nav>
 		<view>
-			<Search :placeholder="'贷款人姓名或电话'"></Search>
+			<Search :placeholder="'客户姓名或电话'"></Search>
 			<view style="height: 100rpx;">
 				<z-tabs ref="tabs" :list="tabsList" :active-style="{color:'#10B261',fontWeight:'bold',fontSize:'28rpx'}"
 					:bar-style="{background:'#10B261'}" :inactive-style="{fontWeight:'bold',fontSize:'28rpx'}"
@@ -179,4 +179,4 @@
 </script>
 <style lang="scss" scoped>
 
-</style>
+</style>

+ 29 - 0
qodana.yaml

@@ -0,0 +1,29 @@
+#-------------------------------------------------------------------------------#
+#               Qodana analysis is configured by qodana.yaml file               #
+#             https://www.jetbrains.com/help/qodana/qodana-yaml.html            #
+#-------------------------------------------------------------------------------#
+version: "1.0"
+
+#Specify inspection profile for code analysis
+profile:
+  name: qodana.starter
+
+#Enable inspections
+#include:
+#  - name: <SomeEnabledInspectionId>
+
+#Disable inspections
+#exclude:
+#  - name: <SomeDisabledInspectionId>
+#    paths:
+#      - <path/where/not/run/inspection>
+
+#Execute shell command before Qodana execution (Applied in CI/CD pipeline)
+#bootstrap: sh ./prepare-qodana.sh
+
+#Install IDE plugins before Qodana execution (Applied in CI/CD pipeline)
+#plugins:
+#  - id: <plugin.id> #(plugin id can be found at https://plugins.jetbrains.com)
+
+#Specify Qodana linter for analysis (Applied in CI/CD pipeline)
+linter: jetbrains/qodana-js:latest

+ 11 - 5
service/tools.js

@@ -260,16 +260,22 @@ tools.setLoginData = function(data, type) {
 tools.getDate = function(type) {
 	let myDate = new Date();
 	// let myYear = myDate.getFullYear(); //获取完整的年份(4位,1970-????)
-	// let myMonth = myDate.getMonth() + 1; //获取当前月份(0-11,0代表1月)
-	// let myToday = myDate.getDate(); //获取当前日(1-31)
+	let myMonth = myDate.getMonth() + 1; //获取当前月份(0-11,0代表1月)
+	let myToday = myDate.getDate(); //获取当前日(1-31)
 	// let myDay = myDate.getDay(); //获取当前星期X(0-6,0代表星期天)
 	// let myHour = myDate.getHours(); //获取当前小时数(0-23)
 	// let myMinute = myDate.getMinutes(); //获取当前分钟数(0-59)
 	// let mySecond = myDate.getSeconds(); //获取当前秒数(0-59)
+	if(myMonth<10){
+		myMonth='0'+myMonth
+	}
+	if(myToday<10){
+		myToday='0'+myToday
+	}
 	if (type === '-') {
-		return myDate.getFullYear() + '-' + (myDate.getMonth() + 1) + '-' + myDate.getDate()
+		return myDate.getFullYear() + '-' + (myMonth) + '-' + myToday
 	} else {
-		return myDate.getFullYear() + '年' + (myDate.getMonth() + 1) + '月' + myDate.getDate() + '日'
+		return myDate.getFullYear() + '年' + (myMonth) + '月' + myToday + '日'
 	}
 }
 
@@ -500,4 +506,4 @@ tools.topHeight = function() {
 	return navTop.height + navTop.top + 10
 }
 
-export default tools
+export default tools

+ 3 - 0
static/css/default-color.scss

@@ -68,6 +68,9 @@
 .page-box .button-color{
   color: #10B261;
 }
+.page-box .text-color-009{
+  color: #00984C;
+}
 
 .page-box .text-color-666{
   color: #666;

BIN
static/img/index/index-add.png


BIN
static/img/index/index-audit.png


BIN
static/img/index/index-avatar.png


BIN
static/img/index/index-bg.png


BIN
static/img/index/index-do.png


BIN
static/img/index/index-house.png


BIN
static/img/index/index-message.png


BIN
static/img/index/index-money.png


BIN
static/img/index/index-record.png


BIN
static/img/index/index-stay.png


BIN
static/img/index/index-system.png


BIN
static/img/index/index-task.png


BIN
static/img/index/top-nav.png


BIN
static/img/information/Group 2122.png


BIN
static/img/information/Group 2123.png


BIN
static/img/information/Mask group.png


BIN
static/img/information/Union.png


BIN
static/img/information/car.png


BIN
static/img/information/company.png


BIN
static/img/information/correct.png


BIN
static/img/information/delete.png


BIN
static/img/information/double.png


BIN
static/img/information/down.png


BIN
static/img/information/edit.png


BIN
static/img/information/error.png


BIN
static/img/information/guarantee.png


BIN
static/img/information/hint-four.png


BIN
static/img/information/hint-one.png


BIN
static/img/information/hint-subtract.png


BIN
static/img/information/hint-three.png


BIN
static/img/information/hint-vector.png


BIN
static/img/information/house.png


BIN
static/img/information/identity-front.png


BIN
static/img/information/identity-verso.png


BIN
static/img/information/paizhao 1.png


BIN
static/img/information/right-arrows.png


BIN
static/img/information/right.png


BIN
static/img/information/three.png


BIN
static/img/information/two.png


BIN
static/img/information/vector.png


BIN
static/img/information/关闭.png