|
|
@@ -1,79 +1,77 @@
|
|
|
<template>
|
|
|
<view class="page-wrap">
|
|
|
<view class="tabs-panel">
|
|
|
- <view :class="{ item: true, active: tabActive === item.value }" v-for="(item, index) in tabList" :key="index"
|
|
|
- @click="tabActive = item.value">
|
|
|
- {{ item.label }}
|
|
|
+ <view :class="{ item: true, active: tabActive === item }" v-for="(item, index) in tabList" :key="index" @click="tabActive = item">
|
|
|
+ {{ item }}
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="order-panel">
|
|
|
- <view class="item" @click="handleOpenOrderDetail">
|
|
|
+ <view class="item" v-for="(item, index) in orderList" :key="index" @click="handleOpenOrderDetail(item.orderId)">
|
|
|
<view class="head">
|
|
|
<image class="icon" src="../../../static/svg/temp.svg" mode="aspectFill"></image>
|
|
|
<view class="business">财税</view>
|
|
|
- <view class="state">待审核</view>
|
|
|
+ <view class="state">{{ item.status || '--' }}</view>
|
|
|
</view>
|
|
|
<view class="content">
|
|
|
- <view class="name">记账报税套餐(年度)</view>
|
|
|
- <view class="text">订单号:10735</view>
|
|
|
- <view class="text">天津超易达胜科技发展有限公司</view>
|
|
|
- <view class="text">2023-10 至 2024-09</view>
|
|
|
- <view class="money">¥3600.00</view>
|
|
|
- <view class="sub">新签申请</view>
|
|
|
+ <view class="name">{{ item.productName }}</view>
|
|
|
+ <view class="text">订单号:{{ item.orderCode || '--' }}</view>
|
|
|
+ <view class="text">{{ item.company.companyName || '--' }}</view>
|
|
|
+ <view class="text">
|
|
|
+ {{ item.contractServiceStart ? item.contractServiceStart.slice(0, 7) : '--' }} 至 {{ item.contractServiceEnd ? item.contractServiceEnd.slice(0, 7) : '--' }}
|
|
|
+ </view>
|
|
|
+ <view class="money">¥{{ numberfilter(item.amount) }}</view>
|
|
|
+ <view class="sub">{{ item.signingTypeName || '' }}</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <view class="item">
|
|
|
- <view class="head">
|
|
|
- <image class="icon" src="../../../static/svg/temp.svg" mode="aspectFill"></image>
|
|
|
- <view class="business">财税</view>
|
|
|
- <view class="state">生效中</view>
|
|
|
- </view>
|
|
|
- <view class="content">
|
|
|
- <view class="name">记账报税套餐(年度)</view>
|
|
|
- <view class="text">订单号:10735</view>
|
|
|
- <view class="text">天津超易达胜科技发展有限公司</view>
|
|
|
- <view class="text">2023-10 至 2024-09</view>
|
|
|
- <view class="money">¥3600.00</view>
|
|
|
- </view>
|
|
|
+ <view class="c-abnor" v-if="!orderList.length">
|
|
|
+ <image class="icon" src="@/static/svg/bags.svg"></image>
|
|
|
+ 暂无数据
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
- export default {
|
|
|
- data() {
|
|
|
- return {
|
|
|
- tabActive: 1,
|
|
|
- tabList: [{
|
|
|
- label: '全部订单',
|
|
|
- value: 1
|
|
|
- },
|
|
|
- {
|
|
|
- label: '未生效',
|
|
|
- value: 2
|
|
|
- },
|
|
|
- {
|
|
|
- label: '未生效',
|
|
|
- value: 3
|
|
|
- },
|
|
|
- {
|
|
|
- label: '已完成',
|
|
|
- value: 4
|
|
|
- }
|
|
|
- ]
|
|
|
- };
|
|
|
- },
|
|
|
- methods: {
|
|
|
- handleOpenOrderDetail() {
|
|
|
- uni.navigateTo({
|
|
|
- url: 'detail'
|
|
|
- });
|
|
|
- }
|
|
|
+import orderService from '@/api/order.js';
|
|
|
+import { numberfilter } from '@/utils/filter';
|
|
|
+export default {
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ tabActive: '全部订单',
|
|
|
+ tabList: ['全部订单', '未生效', '生效中', '已完成'],
|
|
|
+ orderList: []
|
|
|
+ };
|
|
|
+ },
|
|
|
+ watch: {
|
|
|
+ tabActive() {
|
|
|
+ this.getOrderList();
|
|
|
}
|
|
|
- };
|
|
|
+ },
|
|
|
+ onLoad() {
|
|
|
+ this.getOrderList();
|
|
|
+ },
|
|
|
+ onPullDownRefresh() {
|
|
|
+ this.getOrderList();
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ // 获取订单列表
|
|
|
+ async getOrderList() {
|
|
|
+ const { tabActive } = this;
|
|
|
+ const { rows } = await orderService.getOrderList(tabActive === '全部订单' ? '' : tabActive);
|
|
|
+ this.orderList = rows;
|
|
|
+ uni.pageScrollTo({ scrollTop: 0 });
|
|
|
+ uni.stopPullDownRefresh();
|
|
|
+ },
|
|
|
+ handleOpenOrderDetail() {
|
|
|
+ uni.navigateTo({
|
|
|
+ url: 'detail'
|
|
|
+ });
|
|
|
+ },
|
|
|
+ numberfilter
|
|
|
+ }
|
|
|
+};
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
- @import 'index.scss';
|
|
|
-</style>
|
|
|
+@import 'index.scss';
|
|
|
+</style>
|