Commit 13a2e95b by 胡悦

提交

1 parent 7cbf2a87
......@@ -39,6 +39,14 @@ module.exports = {
...data,
});
},
// 历史订单列表
getQuotationList (data) {
return http.post({
method: "dj.api.smartcarlife.vehicle.damage.upgrade.quotation.page",
projectName: "boutique",
...data,
});
},
/**客户邀约记录 */
customerInviteRecordPage (data) {
return http.post({
......
<template>
<view class="layout">
<view class="title">{{ title }}</view>
<template v-if="historyList.length > 0">
<template v-if="list.length > 0">
<scroll-view class="record-box" scroll-y @scrolltolower="pageonReachBottom">
<view class="card-list">
<view class="card-item" v-for="item in historyList" :key="item.id">
<view class="card-item" v-for="item in list" :key="item.id">
<template>
<image
v-if="item.vdQuotationPaymentDoc && item.vdQuotationPaymentDoc.paymentDocUrl"
......@@ -19,7 +19,8 @@
<view class="gradient-overlay"></view>
</template>
<view>
<view class="name">{{ nameHide(item.customerName) }}</view>
<!-- <view class="name">{{ nameHide(item.customerName) }}</view> -->
<view class="name">{{ item.id }}</view>
<view class="goods-name">{{ item.goodsName }}</view>
<view class="card-info">
<view class="label">车架号</view>
......@@ -40,7 +41,7 @@
</view>
</view>
</view>
<view class="end-text" v-if="historyList.length > 0 && isEnd">我是一个有底线的人</view>
<view class="end-text" v-if="list.length > 0 && isEnd">我是一个有底线的人</view>
</scroll-view>
</template>
<template v-else>
......@@ -55,8 +56,10 @@
<script>
import utils from '@/utils/utils';
import Record from "@/mixin/record";
export default {
name: 'History',
mixins:[Record],
props: {
title: String,
madiaId: Number,
......@@ -64,9 +67,7 @@ export default {
},
data() {
return {
historyList: [],
isEnd: false,
pageNum: 1,
shopMerchantId: '',
goodsName: null
}
......@@ -79,7 +80,7 @@ export default {
immediate: true,
handler (newval) {
this.pageNum = 1
this.historyList = []
this.list = uni.$storage.get(`${this.shopMerchantId}-historyList`)
}
},
watchCarModel: {
......@@ -87,7 +88,7 @@ export default {
handler(newval) {
console.log(newval)
if (this.madiaId == 4) {
this.historyList = uni.$storage.get("historyList")
// this.list = uni.$storage.get("historyList")
let index = {
'问界M5': 'M5',
'问界M7': 'M7',
......@@ -116,34 +117,24 @@ export default {
this.shopMerchantId = shopMerchantId
this.getQuotationList(true);
},
async getQuotationList (isSwitch = false, next = false) {
const { goodsName, shopMerchantId, pageNum } = this
if (next) ++this.pageNum
const data = await uni.$api.commonApi.getQuotationList({
pageNum,
pageSize: 18,
merchantId: shopMerchantId,
orderStatus: 3,
goodsName
async getQuotationList () {
const { goodsName, shopMerchantId, pageNum, pageSize } = this
this.getList('getQuotationList',{
merchantIds: shopMerchantId,
pageNum,
pageSize,
goodsName,
orderStatus: 3,
})
console.log(data.list, '=====')
if (isSwitch) {
this.historyList = data.list
uni.$storage.set("historyList", data.list)
this.isEnd = false
} else {
if (data.list.length > 0) {
this.historyList = this.historyList.concat(data.list)
this.isEnd = false
} else {
if (this.historyList.length > 9) this.isEnd = true
}
}
if (pageNum == 1) uni.setStorageSync(`${shopMerchantId}-historyList`, thisuni.onGetWifiList())
},
pageonReachBottom() {
console.log('xiala ')
this.getQuotationList(false, true)
let { pageNum, total, isEnd, pageSize } = this
if (!isEnd) isEnd = false
if (Math.ceil(total / pageSize) > pageNum) {
this.pageNum += 1
this.getQuotationList()
} else this.isEnd = true
},
// 脱敏
nameHide(name) {
......
......@@ -19,6 +19,7 @@ export const STORAGE_OBJECTkEY = {
employeeList: "employeeList",
recordList: "recordList",
recordSuccessList: "recordSuccessList",
historyList: "historyList"
};
// export const IMG_VERSION = async () => {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!