소스 검색

1.新增个贷正在进行订单详情页面
2.新增个贷已完成任务列表

GouGengquan 3 주 전
부모
커밋
253c76ee69
6개의 변경된 파일211개의 추가작업 그리고 5개의 파일을 삭제
  1. 5 0
      src/api/personal.js
  2. 9 0
      src/router/index.js
  3. 31 2
      src/views/home/home.vue
  4. 4 2
      src/views/personal/detail.vue
  5. 133 0
      src/views/personal/doneList.vue
  6. 29 1
      src/views/personal/pendingOrder.vue

+ 5 - 0
src/api/personal.js

@@ -28,4 +28,9 @@ export function myOrder(params) {
 // 个贷正在进行订单
 export function pendingOrder(params) {
     return request.get(`personal`, { params: params })
+}
+
+// 个贷已完成任务列表
+export function taskDoneList(params) {
+    return request.get(`workTaskRecord/personal/done`, { params: params })
 }

+ 9 - 0
src/router/index.js

@@ -26,6 +26,7 @@ import PersonalPlaceOrderView from '@/views/personal/placeOrder.vue'
 import PersonalMyOrder from '@/views/personal/myOrder.vue'
 import PersonalDetail from '@/views/personal/detail.vue'
 import PersonalPendingOrder from '@/views/personal/pendingOrder.vue'
+import PersonalDoneList from '@/views/personal/doneList.vue'
 
 // 大中型业务
 import MajorIndex from '@/views/major/index.vue'
@@ -193,6 +194,14 @@ const routes = [
               title: '正在进行-个贷'
             },
           },
+          {
+            path: 'doneList',
+            component: PersonalDoneList,
+            name: 'personalDoneListView',
+            meta: {
+              title: '已办任务-个贷'
+            },
+          },
         ]
       },
       // 大中型业务

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 31 - 2
src/views/home/home.vue


+ 4 - 2
src/views/personal/detail.vue

@@ -19,8 +19,10 @@
         <van-field label="中介" v-model="personal.agent" name="agent" readonly placeholder="-" />
         <van-field label="联系人" v-model="personal.contactName" name="contactName" readonly placeholder="-" />
         <van-field label="联系人电话" v-model="personal.contactTel" name="contactTel" readonly placeholder="-" />
-        <van-field label="委托人1" v-model="personal.bailorA" name="bailorA" readonly placeholder="-" />
-        <van-field label="委托人2" v-model="personal.bailorB" name="bailorB" readonly placeholder="-" />
+        <van-field label="委托人1" v-model="personal.bailorA" name="bailor" readonly placeholder="-" />
+        <van-field label="委托人1电话" v-model="personal.bailoraTel" name="bailor" readonly placeholder="-" />
+        <van-field label="委托人2" v-model="personal.bailorB" name="bailor" readonly placeholder="-" />
+        <van-field label="委托人2电话" v-model="personal.bailorbTel" name="bailor" readonly placeholder="-" />
         <van-field label="实收款" v-model="personal.realAmount" name="realAmount" readonly placeholder="-">
           <template #button>元</template>
         </van-field>

+ 133 - 0
src/views/personal/doneList.vue

@@ -0,0 +1,133 @@
+<template>
+  <div>
+    <BackBar title="已办任务-个贷" lefttext="返回" />
+    <van-search v-model="listQuery.keyword" placeholder="请输入项目编号或坐落" @search="onSearch()" />
+    <van-pull-refresh v-model="loading" @refresh="onRefresh()">
+      <van-list v-model:loading="loading" :finished="finished" finished-text="没有更多了" @load="getDoneList()">
+        <div class="card" v-for="item in listData" :key="item.id">
+          <div class="businessTitle">
+            <van-icon name="link-o" />
+            {{ item.orderId }}
+          </div>
+          <div class="projectName">
+            <div>
+              <van-icon name="location-o" />
+              {{ item.location }}
+            </div>
+          </div>
+          <div class="clientInfo">
+            <div>
+              <van-icon name="contact-o" />
+              {{ item.clientName }}-{{ item.clientSubName}}
+            </div>
+          </div>
+          <div class="clientInfo">
+            <div>
+              <van-icon name="notes-o" />
+              {{ item.comments ? item.comments : '-' }}
+            </div>
+          </div>
+          <div>
+            <van-tag type="success" size="medium" class="van-tag">{{ item.nodeName }}</van-tag>
+            <van-tag type="success" size="medium" class="van-tag" v-if="item.state === '提交'">{{ item.state }}</van-tag>
+            <van-tag type="warning" size="medium" class="van-tag" v-if="item.state !== '提交'">{{ item.state }}</van-tag>
+            <van-tag type="primary" size="medium" class="van-tag">{{ item.handler }}</van-tag>
+            <van-tag color="#969799" size="medium" class="van-tag">{{ item.finishTime }}</van-tag>
+          </div>
+        </div>
+      </van-list>
+    </van-pull-refresh>
+    <van-back-top right="10vw" bottom="10vh" />
+  </div>
+</template>
+
+<script>
+import { taskDoneList } from '@/api/personal';
+
+export default {
+  data() {
+    return {
+      loading: false,
+      listData: [],
+      finished: false,
+      listQuery: {
+        // 当前页数
+        current: 1,
+        // 查询关键字
+        keyword: null,
+      },
+    };
+  },
+  created() {
+    this.getDoneList();
+  },
+  methods: {
+    // 列表刷新
+    onRefresh() {
+      this.listQuery.current = 1;
+      this.finished = false;
+      this.listData = [];
+      this.getDoneList();
+    },
+    // 列表关键字搜索
+    onSearch() {
+      this.listQuery.current = 1;
+      this.finished = false;
+      this.listData = [];
+      this.getDoneList();
+    },
+    // 获取我的订单
+    getDoneList() {
+      this.loading = true;
+      taskDoneList(this.listQuery).then((res) => {
+        if (res.code == 200) {
+          if (res.data.records) {
+            this.listData = this.listData.concat(res.data.records);
+          }
+          // 判断是否还有下一页
+          if (res.data.pages > this.listQuery.current) {
+            // 服务端返回的总页数大于当前页数, 将当前页数+1
+            this.listQuery.current++;
+          } else {
+            // 反之停止加载
+            this.finished = true;
+          }
+        }
+        this.loading = false;
+      });
+    },
+  },
+};
+</script>
+
+<style scoped>
+.card {
+  background-color: white;
+  border-radius: 5px;
+  padding: 10px;
+  margin: 10px;
+}
+
+.projectName {
+  width: 100%;
+  margin-bottom: 5px;
+  display: flex;
+}
+
+.van-tag {
+  margin: 2px;
+}
+
+.businessTitle {
+  font-weight: bold;
+  margin-bottom: 5px;
+}
+
+/deep/ .van-tabs__wrap {
+  width: 100%;
+}
+
+.clientInfo {
+  margin-bottom: 5px;
+}
+</style>

+ 29 - 1
src/views/personal/pendingOrder.vue

@@ -4,7 +4,7 @@
     <van-search v-model="listQuery.keyword" placeholder="请输入搜索关键词" @search="onSearch()" />
     <van-pull-refresh v-model="loading" @refresh="onRefresh()">
       <van-list v-model:loading="loading" :finished="finished" finished-text="没有更多了" @load="getPendingOrder()">
-        <div class="card" v-for="item in listData" :key="item.id">
+        <div class="card" v-for="item in listData" :key="item.id" @click="toDetail(item)">
           <div class="businessTitle">
             <van-icon name="link-o" />
             {{ item.orderId }}
@@ -88,6 +88,34 @@ export default {
         this.loading = false;
       });
     },
+    toDetail(item) {
+      const detailInfo = {
+        orderId: item.orderId,
+        location: item.location,
+        acreage: item.acreage,
+        price: item.price,
+        amount: item.amount / 10000,
+        clientName: item.clientName,
+        clientSubName: item.clientSubName,
+        agent: item.agent,
+        contactName: item.contactName,
+        contactTel: item.contactTel,
+        bailorA: item.bailorA,
+        bailoraTel: item.bailoraTel,
+        bailorbTel: item.bailorbTel,
+        bailorB: item.bailorB,
+        realAmount: item.realAmount,
+        shouldAmount: item.shouldAmount,
+        invoiceAmount: item.invoiceAmount,
+        created: item.created,
+      };
+      this.$router.push({
+        path: `/index/personal/detail`,
+        query: {
+          item: JSON.stringify(detailInfo),
+        },
+      });
+    },
   },
 };
 </script>