瀏覽代碼

1.新增个贷我的订单详情页面
2.优化个贷我的订单列表页面
3.新增资产我的订单与订单详情页面

GouGengquan 1 月之前
父節點
當前提交
cbe3b9c1de

+ 5 - 0
src/api/assets.js

@@ -13,4 +13,9 @@ export function getAssetsTodoDetail(params) {
 // 资产业务订单新增
 export function add(params) {
     return request.post(`assets/add`, params)
+}
+
+// 我的订单查询
+export function myOrder(params) {
+    return request.get(`assets/selectMyOrderPage`, { params: params })
 }

+ 28 - 1
src/router/index.js

@@ -15,12 +15,15 @@ import LoginView from '@/views/login/index.vue'
 import AssetsIndex from '@/views/assets/index.vue'
 import AssetsTodoDetailView from '@/views/assets/todoDetail.vue'
 import AssetsPlaceOrderView from '@/views/assets/placeOrder.vue'
+import AssetsMyOrder from '@/views/assets/myOrder.vue'
+import AssetsDetail from '@/views/assets/detail.vue'
 
 // 个贷业务
 import PersonalIndex from '@/views/personal/index.vue'
 import PersonalTodoDetailView from '@/views/personal/todoDetail.vue'
 import PersonalPlaceOrderView from '@/views/personal/placeOrder.vue'
 import PersonalMyOrder from '@/views/personal/myOrder.vue'
+import PersonalDetail from '@/views/personal/detail.vue'
 
 // 大中型业务
 import MajorIndex from '@/views/major/index.vue'
@@ -108,11 +111,27 @@ const routes = [
           {
             path: 'placeOrder',
             component: AssetsPlaceOrderView,
-            name: 'assetsPlaceOrder',
+            name: 'assetsPlaceOrderView',
             meta: {
               title: '资产业务下单'
             },
           },
+          {
+            path: 'myOrder',
+            component: AssetsMyOrder,
+            name: 'assetsMyOrderView',
+            meta: {
+              title: '我的订单-资产'
+            },
+          },
+          {
+            path: 'detail',
+            component: AssetsDetail,
+            name: 'assetsDetailView',
+            meta: {
+              title: '我的订单-资产'
+            },
+          },
         ]
       },
       // 个贷业务
@@ -145,6 +164,14 @@ const routes = [
               title: '我的订单-个贷'
             },
           },
+          {
+            path: 'detail',
+            component: PersonalDetail,
+            name: 'personalDetailView',
+            meta: {
+              title: '订单详情-资产'
+            },
+          },
         ]
       },
       // 大中型业务

+ 45 - 0
src/views/assets/detail.vue

@@ -0,0 +1,45 @@
+<template>
+  <div>
+    <BackBar title="订单详情-资产" lefttext="返回" />
+    <van-form>
+      <van-cell-group inset>
+        <van-field label="项目编号" v-model="assets.orderId" name="orderId" readonly placeholder="-" />
+        <van-field label="项目名称" v-model="assets.name" name="name" readonly placeholder="-" />
+        <van-field label="意见书号" v-model="assets.statementNo" name="statementNo" readonly placeholder="-" />
+        <van-field label="报告号" v-model="assets.reportNo" name="reportNo" readonly placeholder="-" />
+        <van-field label="业务类型" v-model="assets.assetsBusinessGener" name="assetsBusinessGener" readonly placeholder="-" />
+        <van-field label="客户名称" v-model="assets.customerName" name="customerName" readonly placeholder="-" />
+        <van-field label="业务来源" v-model="assets.customerSubName" name="customerSubName" readonly placeholder="-" />
+        <van-field label="委托人" v-model="assets.bailor" name="bailor" readonly placeholder="-" />
+        <van-field label="委托人电话" v-model="assets.bailorContactTel" name="bailorContactTel" readonly placeholder="-" />
+        <van-field label="当前节点" v-model="assets.currentNodeName" name="currentNodeName" readonly placeholder="-" />
+        <van-field label="当前负责人" v-model="assets.handlerName" name="handlerName" readonly placeholder="-" />
+        <van-field label="项目负责人" v-model="assets.principalName" name="principalName" readonly placeholder="-" />
+        <van-field label="客户经理" v-model="assets.clientManagerName" name="clientManagerName" readonly placeholder="-" />
+        <van-field label="评估值" v-model="assets.estimatedValue" name="estimatedValue" readonly placeholder="-" />
+        <van-field label="产品应收款" v-model="assets.productionShouldAmount" name="productionShouldAmount" readonly placeholder="-" />
+        <van-field label="产品实收款" v-model="assets.productionRealAmount" name="productionRealAmount" readonly placeholder="-" />
+        <van-field label="实际开票金额" v-model="assets.invoiceRealAmount" name="invoiceRealAmount" readonly placeholder="-" />
+        <van-field label="送达状态" v-model="assets.reportDelivery" name="reportDelivery" readonly placeholder="-" />
+      </van-cell-group>
+    </van-form>
+  </div>
+</template>
+
+<script>
+export default {
+  data() {
+    return {
+      // 个贷详情
+      assets: {},
+    };
+  },
+  created() {
+    this.assets = JSON.parse(this.$route.query.item);
+  },
+  methods: {},
+};
+</script>
+
+<style scoped>
+</style>

+ 151 - 0
src/views/assets/myOrder.vue

@@ -0,0 +1,151 @@
+<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="getMyOrder()">
+        <div class="card" v-for="item in listData" :key="item.id" @click="toDetail(item)">
+          <h3>
+            <van-icon name="link-o" />
+            &nbsp;{{ item.orderId }}
+          </h3>
+          <p class="productionNo" v-if="item.statementNo || item.reportNo">
+            <van-icon name="coupon-o" />
+            &nbsp;
+            {{ item.statementNo }}
+            <!-- 产品号都不为空才显示中间的分割空格, 以保持页面间距统一 -->
+            <span v-if="item.statementNo && item.reportNo">&nbsp;&nbsp;</span>
+            {{ item.reportNo }}
+          </p>
+          <p class="projectName">
+            <van-icon name="location-o" />
+            &nbsp;{{ item.reportName || item.statementName || item.name }}
+          </p>
+          <p>
+            <van-tag type="primary" size="medium" class="van-tag">{{ item.currentNodeName }}</van-tag>
+            <van-tag type="success" size="medium" class="van-tag">{{ item.clientManagerName }}</van-tag>
+            <van-tag color="#969799" size="medium" class="van-tag">{{ item.created }}</van-tag>
+          </p>
+        </div>
+      </van-list>
+    </van-pull-refresh>
+    <van-back-top right="10vw" bottom="10vh" />
+  </div>
+</template>
+
+<script>
+import { mapStores } from 'pinia';
+import { useUserStore } from '@/stores/useUserStore';
+import { myOrder } from '@/api/assets';
+
+export default {
+  data() {
+    return {
+      loading: false,
+      listData: [],
+      finished: false,
+      listQuery: {
+        // 当前页数
+        current: 1,
+        // 查询关键字
+        keyWord: null,
+        clientManagerId: null,
+      },
+    };
+  },
+  computed: {
+    ...mapStores(useUserStore),
+  },
+  created() {
+    this.listQuery.clientManagerId = this.userStore.userInfo.id;
+    this.getMyOrder();
+  },
+  methods: {
+    // 列表刷新
+    onRefresh() {
+      this.listQuery.current = 1;
+      this.finished = false;
+      this.listData = [];
+      this.getMyOrder();
+    },
+    // 列表关键字搜索
+    onSearch() {
+      this.listQuery.current = 1;
+      this.finished = false;
+      this.listData = [];
+      this.getMyOrder();
+    },
+    // 获取我的订单
+    getMyOrder() {
+      this.loading = true;
+      myOrder(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;
+      });
+    },
+    toDetail(item) {
+      const detailInfo = {
+        orderId: item.orderId,
+        name: item.name,
+        statementNo: item.statementNo,
+        reportNo: item.reportNo,
+        assetsBusinessGener: item.assetsBusinessGener,
+        customerName: item.customerName,
+        customerSubName: item.customerSubName,
+        bailor: item.bailor,
+        bailorContactTel: item.bailorContactTel,
+        currentNodeName: item.currentNodeName,
+        handlerName: item.handlerName,
+        principalName: item.principalName,
+        clientManagerName: item.clientManagerName,
+        estimatedValue: item.estimatedValue,
+        productionShouldAmount: item.productionShouldAmount,
+        productionRealAmount: item.productionRealAmount,
+        invoiceRealAmount: item.invoiceRealAmount,
+        reportDelivery: item.reportDelivery ? '已送达' : '未送达',
+      };
+      this.$router.push({
+        path: `/index/assets/detail`,
+        query: {
+          item: JSON.stringify(detailInfo),
+        },
+      });
+    },
+  },
+};
+</script>
+
+<style scoped>
+.card {
+  background-color: white;
+  border-radius: 12px;
+  box-shadow: 2px 2px 2px 2px rgba(0, 0, 0, 0.1);
+  padding: 16px;
+  margin: 10px;
+}
+
+.productionNo {
+  width: 100%;
+  font-size: 14px;
+}
+
+.projectName {
+  width: 100%;
+}
+
+.van-tag {
+  margin: 2px;
+}
+</style>

+ 2 - 2
src/views/home/home.vue

@@ -97,7 +97,7 @@
     </div>
     <div class="card">
       <h3 class="businessTitle">资产业务</h3>
-      <div class="icon-area" @click="goBench('/index/assets')">
+      <div class="icon-area">
         <svg t="1713838525654" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="6320" width="48" height="48">
           <path
             d="M810.666667 1024H213.333333c-117.333333 0-213.333333-96-213.333333-213.333333V213.333333C0 96 96 0 213.333333 0h597.333334c117.333333 0 213.333333 96 213.333333 213.333333v597.333334c0 117.333333-96 213.333333-213.333333 213.333333z"
@@ -134,7 +134,7 @@
         </svg>
         <div class="icon-word">正在进行</div>
       </div>
-      <div class="icon-area">
+      <div class="icon-area" @click="goBench('/index/assets/myOrder')">
         <svg t="1748250501503" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2184" id="mx_n_1748250501504" width="48" height="48">
           <path
             d="M810.666667 1024H213.333333c-117.333333 0-213.333333-96-213.333333-213.333333V213.333333C0 96 96 0 213.333333 0h597.333334c117.333333 0 213.333333 96 213.333333 213.333333v597.333334c0 117.333333-96 213.333333-213.333333 213.333333z"

+ 55 - 0
src/views/personal/detail.vue

@@ -0,0 +1,55 @@
+<template>
+  <div>
+    <BackBar title="订单详情-个贷" lefttext="返回" />
+    <van-form>
+      <van-cell-group inset>
+        <van-field label="项目编号" v-model="personal.orderId" name="orderId" readonly placeholder="-" />
+        <van-field label="坐落" v-model="personal.location" name="location" readonly placeholder="-" />
+        <van-field label="面积" v-model="personal.acreage" name="acreage" readonly placeholder="-">
+          <template #button>平</template>
+        </van-field>
+        <van-field label="单价" v-model="personal.price" name="price" readonly placeholder="-">
+          <template #button>元/平</template>
+        </van-field>
+        <van-field label="总价" v-model="personal.amount" name="amount" readonly placeholder="-">
+          <template #button>万元</template>
+        </van-field>
+        <van-field label="客户名称" v-model="personal.clientName" name="clientName" readonly placeholder="-" />
+        <van-field label="业务来源" v-model="personal.clientSubName" name="clientSubName" readonly placeholder="-" />
+        <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="实收款" v-model="personal.realAmount" name="realAmount" readonly placeholder="-">
+          <template #button>元</template>
+        </van-field>
+        <van-field label="应收款" v-model="personal.shouldAmount" name="shouldAmount" readonly placeholder="-">
+          <template #button>元</template>
+        </van-field>
+        <van-field label="开票金额" v-model="personal.invoiceAmount" name="invoiceAmount" readonly placeholder="-">
+          <template #button>元</template>
+        </van-field>
+        <van-field label="下单时间" v-model="personal.created" name="created" readonly placeholder="-" />
+      </van-cell-group>
+    </van-form>
+  </div>
+</template>
+
+<script>
+export default {
+  data() {
+    return {
+      // 个贷详情
+      personal: {},
+    };
+  },
+  created() {
+    this.personal = JSON.parse(this.$route.query.item);
+  },
+  methods: {},
+};
+</script>
+
+<style scoped>
+</style>

+ 27 - 2
src/views/personal/myOrder.vue

@@ -20,7 +20,7 @@
           <p>
             <van-tag type="primary" size="medium" class="van-tag">{{ item.acreage ? item.acreage : '-' }} 平</van-tag>
             <van-tag type="success" size="medium" class="van-tag">{{ item.price ? item.price : '-' }} 元/平</van-tag>
-            <van-tag color="#969799" size="medium" class="van-tag">{{ item.amount ? item.amount : '-' }} 万</van-tag>
+            <van-tag color="#969799" size="medium" class="van-tag">{{ item.amount ? item.amount / 10000 : '-' }} 万</van-tag>
           </p>
         </div>
       </van-list>
@@ -84,7 +84,32 @@ export default {
         this.loading = false;
       });
     },
-    toDetail(item) {},
+    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,
+        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>