Browse Source

refactor(market): 重构订单列表页面布局和数据展示

- 修改了订单列表页面的顶部标题为"订单状态"
- 移除了下载合同按钮
- 重新安排了订单信息的展示格式,包括客户姓名、付款类型、订单金额、课程、班级、人员和支付时间等字段
- 在 clue_info 页面中添加了 resource_id 字段
- 修改了 order_list 页面的 onLoad 方法,获取 resource_id 参数
- 更新了订单列表 API调用方式
master
liutong 1 year ago
parent
commit
96d6798bbe
  1. 3
      pages/market/clue/clue_info.vue
  2. 57
      pages/market/clue/order_list.vue

3
pages/market/clue/clue_info.vue

@ -281,6 +281,7 @@
resource_sharing_id:'',//共享资源表id resource_sharing_id:'',//共享资源表id
clientInfo:{ clientInfo:{
id:'',//共享资源id id:'',//共享资源id
resource_id:'',//客户资源id
customerResource:{},//客户资源信息 customerResource:{},//客户资源信息
sixSpeed:{},//六要素信息 sixSpeed:{},//六要素信息
},//共享资源详情 },//共享资源详情
@ -377,7 +378,7 @@
//跳转页面-订单列表 //跳转页面-订单列表
openViewOrder() { openViewOrder() {
let resource_id = this.clientInfo.resource_id let resource_id = this.clientInfo.resource_id//客户资源id
this.$navigateTo({ this.$navigateTo({
url: `/pages/market/clue/order_list?resource_id=${resource_id}` url: `/pages/market/clue/order_list?resource_id=${resource_id}`
}) })

57
pages/market/clue/order_list.vue

@ -16,22 +16,47 @@
:key="k" :key="k"
> >
<view class="top"> <view class="top">
<view class="">企业合同</view> <view class="title">订单状态</view>
<view class="btn" @click="downloadFile($util.img(v.file_data))">下载合同 <fui-icon name="arrowright" color="#A4ADB3" size="35"></fui-icon></view> <!-- <view class="btn" @click="downloadFile($util.img(v.file_data))">下载合同 <fui-icon name="arrowright" color="#A4ADB3" size="35"></fui-icon></view>-->
</view> </view>
<view class="bottom"> <view class="bottom">
<view class="box"> <view class="box">
<view class="title">合同名称:</view> <view class="title">客户姓名:</view>
<view class="content">{{v.title}}</view> <view class="content">{{ v.resource_id_name }}</view>
</view> </view>
<view class="box">
<view class="title">付款类型:</view>
<view class="content">
{{ v.payment_type === 'cash' ? '现金支付' : v.payment_type === 'scan_code' ? '扫码支付' : '订阅支付' }}
</view>
</view>
<view class="box">
<view class="title">订单金额:</view>
<view class="content">¥{{ v.order_amount }}</view>
</view>
<view class="box">
<view class="title">课程:</view>
<view class="content">{{ v.course_id_name }}</view>
</view>
<view class="box"> <view class="box">
<view class="title">签署方:</view> <view class="title">班级:</view>
<view class="content">{{v.signatory_a}}</view> <view class="content">{{ v.class_id_name }}</view>
</view> </view>
<view class="box">
<view class="title">人员:</view>
<view class="content">{{ v.staff_id_name }}</view>
</view>
<view class="box"> <view class="box">
<view class="title">签署方:</view> <view class="title">支付时间:</view>
<view class="content">{{v.signatory_b}}</view> <view class="content">{{ v.payment_time }}</view>
</view> </view>
</view> </view>
</view> </view>
@ -41,8 +66,8 @@
</template> </template>
<script> <script>
import apiRoute from '@/api/apiRoute.js';
import marketApi from '@/api/market.js'; import marketApi from '@/api/market.js';
import commonApi from '@/api/common.js';
export default { export default {
components: { components: {
@ -58,11 +83,14 @@ export default {
page:1,//当前页码 page:1,//当前页码
limit:10,//每页返回数据条数 limit:10,//每页返回数据条数
total:10,//数据总条数 total:10,//数据总条数
resource_id:'',//客户资源表id
}, },
tableList:[],//聊天数据列表 tableList:[],//聊天数据列表
} }
}, },
onLoad(options) {}, onLoad(options) {
this.filteredData.resource_id = options.resource_id//客户资源表id
},
onShow(){ onShow(){
this.init() this.init()
}, },
@ -98,7 +126,7 @@ export default {
async getList(){ async getList(){
this.loading = true this.loading = true
let data = {...this.filteredData} let params = {...this.filteredData}
//判断是否还有数据 //判断是否还有数据
if ((this.filteredData.page - 1) * this.filteredData.limit >= this.filteredData.total) { if ((this.filteredData.page - 1) * this.filteredData.limit >= this.filteredData.total) {
@ -110,11 +138,11 @@ export default {
return return
} }
if(data.page == 1){ if(params.page == 1){
this.tableList = [] this.tableList = []
} }
let res = await marketApi.contractsList(data)//获取合同列表 let res = await apiRoute.xs_orderTableList(params)//获取订单那列表
this.loading = false this.loading = false
this.isReachedBottom = false; this.isReachedBottom = false;
if (res.code != 1){ if (res.code != 1){
@ -223,6 +251,9 @@ export default {
font-size: 28rpx; font-size: 28rpx;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
.title{
font-size: 30rpx;
}
.btn{ .btn{
display: flex; display: flex;
align-items: center; align-items: center;

Loading…
Cancel
Save