DESKTOP-70VPDLK\Administrator hai 1 ano
pai
achega
d1917d2467
Modificáronse 2 ficheiros con 51 adicións e 15 borrados
  1. 14 11
      common/task/task-item.vue
  2. 37 4
      pages/index/index.vue

+ 14 - 11
common/task/task-item.vue

@@ -1,32 +1,35 @@
 <template>
 	<view>
 		<view class="task-body m-20">
-			<view class="row-c page-box-bg-fff m-b20 r-30 p-30 box-shadow-197" v-for="(item,index) in 10" :key="index"
+			<view class="row-c page-box-bg-fff m-b20 r-30 p-30 box-shadow-197" v-for="(item,index) in taskList" :key="index"
 				@click="onTaskDetails(item)">
-				<image class="wh-80" :src="getLeftImg(leftImg)" mode=""></image>
+				<image class="wh-80" :src="item.product_icon" mode=""></image>
 				<view class="flex m-l20">
 					<view class="row-justify-sb center flex">
-						<text class="text-color-333 sys-weight-600">垫资还款</text>
+						<text class="text-color-333 sys-weight-600">{{item.product_name}}</text>
 						<view class="row-c line-40">
-							<text class="size-26 text-color-333">刘芳芳{{index}}</text>
+							<text class="size-26 text-color-333">{{item.name}}</text>
 							<image class="wh-30 m-l16" src="/static/img/task/task-phone.png" mode=""></image>
 						</view>
 					</view>
 					<view
 						class="p-tb14 p-lr30 m-tb20 r-100 row-justify-sb center size-24 text-color-12 sys-from-background-color"
 						style="line-height: 40rpx;">
-						<text class="size-28 text-color-E21 sys-weight-600">120万</text>
-						<text>初审</text>
-						<text>2024/12/24用款</text>
+						<text class="size-28 text-color-E21 sys-weight-600">{{item.quota}}万</text>
+						<text>{{item.stage_name}}</text>
+						<text>{{item.use_date}}用款</text>
 					</view>
 					<view class="row-justify-sb center" style="line-height: 40rpx;">
-						<text class="size-24 text-color-999 flex">2024.10.11 12:45</text>
-						<image style="width: 65rpx;height: 32rpx;" :src="getIconStatus(iconStatus)" v-if="type == 1">
+						<text class="size-24 text-color-999 flex">{{item.created_date}}</text>
+						<image style="width: 65rpx;height: 32rpx;" :src="getIconStatus(iconStatus)" v-if="type === 1">
 						</image>
 						<button class="button-background en_button sys-weight-500 text-color-fff size-28 r-100"
 							style="width: 200rpx;height: 70rpx;line-height: 70rpx;" type="default"
-							hover-class="is-hover" v-if="type == 2">领取任务</button>
-						<view class="row-c" v-if="type == 3">
+							hover-class="is-hover" v-else-if="type === 2">领取任务</button>
+            <button class="button-background en_button sys-weight-500 text-color-fff size-28 r-100"
+                    style="width: 200rpx;height: 70rpx;line-height: 70rpx;" type="default"
+                    hover-class="is-hover" v-else-if="type === 4">去处理</button>
+						<view class="row-c" v-else-if="type === 3">
 							<button
 								class="button-backgroun en_buttond left_button sys-weight-500 button_color-008FD6 size-26 r-100 m-r20"
 								type="default" hover-class="is-hover">核算</button>

+ 37 - 4
pages/index/index.vue

@@ -45,8 +45,8 @@
 				<text class="size-24 text-color-12">任务进度</text>
 			</view>
 		</view>
-		<Enblank :message="'暂无待办任务'" v-if="!taskList.length"></Enblank>
-		<TaskItem :type="2" :taskList="taskList"></TaskItem>
+		<Enblank :message="'暂无待办任务'" v-if="backlogList.length<=0"></Enblank>
+		<TaskItem :type="4" :taskList="backlogList"></TaskItem>
 		<Tab class="tabs_height" :tab-index="0"></Tab>
 	</view>
 
@@ -59,6 +59,7 @@
 	import IndexColumn from "./module/index_column.vue"
 	// 顶部栏目
 	import IndexPersonal from "./module/index_personal.vue"
+  import {getDayBacklogList} from "@/api/task";
 
 	export default {
 		components: {
@@ -88,20 +89,52 @@
 					color: '#3ABF7D',
 					value: "100%"
 				}, ],
-				taskList: [],
-        memberData:{}
+        memberData:{},
+        backlogList: [],
+        weekData: [],
+        weekNum: 1,
+        dayNum: 0,
+        day: '',
+        month: '',
+        page: 1,
+        isAjax: false,
+        total: null
 			}
 		},
 		onLoad() {
 			uni.hideTabBar()
+      uni.$on('newReceiving', () => {
+
+      })
+      this.startList()
 		},
 		onPageScroll(res) {
 			this.scrollTop = res.scrollTop / 120
 		},
 		onReachBottom() {
 			console.log('到底部了');
+      this.getDayBacklogList()
 		},
 		methods: {
+      startList(){
+        this.backlogList=[];
+        this.page=1;
+        this.total=null;
+        this.getDayBacklogList();
+      },
+      getDayBacklogList() {
+        if(this.total!==null && this.total<=this.backlogList.length){
+          return
+        }
+        getDayBacklogList({'dateNum': this.indexTime,'page':this.page}).then((res) => {
+          if (res.code === 1) {
+            this.backlogList.push(...res.data.items)
+            this.total = res.data.total
+            ++ this.page
+          }
+        })
+      },
+
       setMemberData(memberData){
         this.memberData=memberData
       },