Commit 9476107a authored by Morson's avatar Morson
parents 88bf579f 9e6ad67d
...@@ -9,6 +9,6 @@ const UNI_APP = { ...@@ -9,6 +9,6 @@ const UNI_APP = {
// apiUrl: 'http://apidoc.banshouhui.com:3000/mock/31', // mock端域名请求头 // apiUrl: 'http://apidoc.banshouhui.com:3000/mock/31', // mock端域名请求头
}, },
qn_base_url: 'https://qn-static.banshouhui.com/self-support/', qn_base_url: 'https://qn-static.banshouhui.com/self-support/',
qn_asset_url: 'http://deudn.c.pp.cc/' qn_asset_url: 'http://deudn.c.pp.cc/',
} }
module.exports = UNI_APP; module.exports = UNI_APP;
...@@ -95,6 +95,31 @@ let orderApiFun = function(vm){ ...@@ -95,6 +95,31 @@ let orderApiFun = function(vm){
*/ */
let getSignDistance = async (params = {}) => await vm.$u.get('/wxh-worker-rest/rest/' + vm.vuex_token + `/wokerOrder/sign/distance`, params) let getSignDistance = async (params = {}) => await vm.$u.get('/wxh-worker-rest/rest/' + vm.vuex_token + `/wokerOrder/sign/distance`, params)
/**
* 获取订单的完工项目(配置+数据)
*/
let getCompleteConfigAndData= async (orderId) => await vm.$u.get(prefix+ vm.vuex_token+'/order/'+ orderId +'/maintain/info');
/**
* 查询措施
*/
let getMeasure= async (params = {}) => await vm.$u.get('wxh-worker-rest/rest/service/'+ vm.vuex_token+'/measure/queryMeasureItems', params);
/**
* 保存售后记录
*/
let saveCompleteData = async (params = {},orderId) => await vm.$u.post(prefix+ vm.vuex_token+'/order/'+ orderId +'/maintain/saveMaintainInfoV2', params);
/**
* 保内工单完工
*/
let inOrderFinish = async (orderId) => await vm.$u.post(prefix + vm.vuex_token+'/order/'+ orderId +'/finishedAndConfirm',{}, {'content-type': 'application/x-www-form-urlencoded'});
/**
* 保外工单完工
*/
let outOrderFinish = async (params = {},orderId) => await vm.$u.post(prefix + vm.vuex_token+'/order/'+ orderId +'/v1/finishedAndConfirmOutGuaranteePeriod', params, {'content-type': 'application/x-www-form-urlencoded'});
const orderApi = { const orderApi = {
listByRecommendOrder, listByRecommendOrder,
listOrderCount, listOrderCount,
...@@ -106,7 +131,6 @@ let orderApiFun = function(vm){ ...@@ -106,7 +131,6 @@ let orderApiFun = function(vm){
listOrderRecord, listOrderRecord,
orderAccept, orderAccept,
orderGan, orderGan,
maintainWorkerCheckin,
feedbackConfig, feedbackConfig,
traceAndAppointment, traceAndAppointment,
rejectOrder, rejectOrder,
...@@ -116,7 +140,12 @@ let orderApiFun = function(vm){ ...@@ -116,7 +140,12 @@ let orderApiFun = function(vm){
openTimerange, openTimerange,
contactTime, contactTime,
checkRejectable, checkRejectable,
getSignDistance getSignDistance,
getCompleteConfigAndData,
getMeasure,
saveCompleteData,
inOrderFinish,
outOrderFinish
} }
return orderApi return orderApi
} }
......
...@@ -302,6 +302,10 @@ ...@@ -302,6 +302,10 @@
/deep/ button[plain] { /deep/ button[plain] {
border: none; border: none;
} }
button[disabled]:not([type]) {
background: #d1d4d4;
color: #ffffff;
}
} }
} }
</style> </style>
...@@ -125,8 +125,8 @@ ...@@ -125,8 +125,8 @@
} }
}, },
showCountTime() { showCountTime() {
return [1, 2, 3].indexOf(this.orderType) != -1 || (this.orderType == 0 && this.orderData return ([1, 2, 3].indexOf(this.orderType) != -1 || (this.orderType == 0 && this.orderData
.orderBusinessType != 'R') .orderBusinessType != 'R')) && this.orderData.currentOverTime
}, },
showTime() { showTime() {
return [4, 5, 6].indexOf(this.orderType) != -1 return [4, 5, 6].indexOf(this.orderType) != -1
...@@ -248,7 +248,6 @@ ...@@ -248,7 +248,6 @@
this.$emit('click') this.$emit('click')
}, },
handleChange(timestamp) { handleChange(timestamp) {
console.log(timestamp)
if (this.timeout) this.$refs['order-count-down'].seconds += 2 if (this.timeout) this.$refs['order-count-down'].seconds += 2
if (timestamp == 0 && !this.timeout) { if (timestamp == 0 && !this.timeout) {
setTimeout(()=> { setTimeout(()=> {
......
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
.no-order-image { .no-order-image {
width: 374rpx; width: 374rpx;
height: 218rpx; height: 218rpx;
margin-top: 60rpx; margin-top: 50rpx;
margin-bottom: 20rpx; margin-bottom: 20rpx;
} }
} }
......
...@@ -32,11 +32,12 @@ ...@@ -32,11 +32,12 @@
<style lang="scss" scoped> <style lang="scss" scoped>
.content { .content {
height: 100vh; // height: 100vh;
background-color: #f4f5f7; background-color: #f4f5f7;
padding: 0rpx 30rpx 0 30rpx; padding: 0rpx 30rpx 0 30rpx;
overflow-y: auto; // overflow-y: auto;
&.fixed { &.fixed {
height: 100vh;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
} }
......
<template> <template>
<scroll-view scroll-y style="margin-bottom: 20rpx;height: 100vh;" @scrolltolower="reachBottom"
scroll-anchoring scroll-y="true" refresher-enabled="true" :refresher-triggered="triggered" :refresher-threshold="100"
refresher-background="#F4F5F7" @refresherpulling="triggered = true" @refresherrefresh="onRefresh"
@refresherrestore="onRestore" @refresherabort="onAbort">
<TabBarPage title="充电桩自营平台"> <TabBarPage title="充电桩自营平台">
<image class="banner-image" :src="bannerImage"></image> <image class="banner-image" :src="bannerImage"></image>
...@@ -41,15 +45,15 @@ ...@@ -41,15 +45,15 @@
<NoOrder /> <NoOrder />
</view> </view>
<view v-else class="order-item-view"> <view v-else class="order-item-view">
<scroll-view scroll-y style="height: 100%;width: 100%;" @scrolltolower="reachBottom" <!-- <scroll-view scroll-y style="margin-bottom: 20rpx;" @scrolltolower="reachBottom"
scroll-anchoring> scroll-anchoring> -->
<view v-for="(item, index) in orderList" :key="index"> <view v-for="(item, index) in orderList" :key="index">
<OrderCell :orderData="item" type="waitAccept" :location="location" <OrderCell :orderData="item" type="waitAccept" :location="location"
@click="handleClick(item.orderId)" @action="handleAction(item.orderId)"> @click="handleClick(item.orderId)" @action="handleAction(item.orderId)">
</OrderCell> </OrderCell>
</view> </view>
<u-loadmore :status="currentLoadStatus" bgColor="#F4F5F7"></u-loadmore> <u-loadmore :status="currentLoadStatus" bgColor="#F4F5F7"></u-loadmore>
</scroll-view> <!-- </scroll-view> -->
</view> </view>
</template> </template>
...@@ -63,6 +67,7 @@ ...@@ -63,6 +67,7 @@
<view class="bottom-line-view"></view> <view class="bottom-line-view"></view>
</view> </view>
</TabBarPage> </TabBarPage>
</scroll-view>
</template> </template>
<script> <script>
...@@ -96,6 +101,8 @@ ...@@ -96,6 +101,8 @@
pageNumber: 0, pageNumber: 0,
pageSize: 100, pageSize: 100,
}, },
triggered: false,
_freshing: false,
}; };
}, },
watch: { watch: {
...@@ -132,6 +139,7 @@ ...@@ -132,6 +139,7 @@
}, },
}, },
onLoad() { onLoad() {
this._freshing = false;
this.getOrderCount() this.getOrderCount()
}, },
onShow() { onShow() {
...@@ -140,12 +148,20 @@ ...@@ -140,12 +148,20 @@
this.initSettleInfo(); this.initSettleInfo();
} }
}, },
onPullDownRefresh() { // onPullDownRefresh() {
console.log('------下拉刷新------') // console.log('------下拉刷新------')
// 下拉刷洗 // // 下拉刷洗
this.initSettleInfo() // this.initSettleInfo()
}, // },
// onReachBottom() {
// console.log('----------底部-------------', this.currentLoadStatus)
// if (this.currentLoadStatus != 'loadmore') return
// this.currentLoadStatus == 'loading'
// this.loadOrderList()
// },
// onPageScroll(obj) {
// console.log('---------scroll---------', obj)
// },
methods: { methods: {
handleClick(orderId) { // 点击了cell handleClick(orderId) { // 点击了cell
console.log('点击了cell') console.log('点击了cell')
...@@ -174,10 +190,10 @@ ...@@ -174,10 +190,10 @@
}; };
await app.getBaseInfo(self, callBack); await app.getBaseInfo(self, callBack);
this.orderList = []
this.search.pageNumber = 0
// 加载消息列表 // 加载消息列表
self.loadMessageList(); self.loadMessageList();
self.search.pageNumber = 0
self.loadedOrder = false
self.loadOrderList(); self.loadOrderList();
}, },
loadMessageList() { loadMessageList() {
...@@ -204,6 +220,8 @@ ...@@ -204,6 +220,8 @@
self.$u.api.listByRecommendOrder(self.search).then((res) => { self.$u.api.listByRecommendOrder(self.search).then((res) => {
uni.stopPullDownRefresh() // 结束下拉刷新 uni.stopPullDownRefresh() // 结束下拉刷新
self.loadedOrder = true self.loadedOrder = true
self.triggered = false;
self._freshing = false;
/*↓↓↓↓↓↓↓↓↓↓测试数据↓↓↓↓↓↓↓↓↓↓*/ /*↓↓↓↓↓↓↓↓↓↓测试数据↓↓↓↓↓↓↓↓↓↓*/
// if (res.data.list) { // if (res.data.list) {
// if (res.data.list.length == 0 && res.data.total > 0) { // if (res.data.list.length == 0 && res.data.total > 0) {
...@@ -239,6 +257,9 @@ ...@@ -239,6 +257,9 @@
/*↑↑↑↑↑↑↑↑↑↑测试数据↑↑↑↑↑↑↑↑↑↑↑↑↑*/ /*↑↑↑↑↑↑↑↑↑↑测试数据↑↑↑↑↑↑↑↑↑↑↑↑↑*/
if (res.code == 200) { if (res.code == 200) {
if (res.data && res.data.list && res.data.list.length > 0) { if (res.data && res.data.list && res.data.list.length > 0) {
if (self.search.pageNumber == 1) {
self.orderList = []
}
self.orderList.push(...res.data.list); self.orderList.push(...res.data.list);
self.currentLoadStatus = res.data.total > self.orderList.length ? 'loadmore' : 'nomore' self.currentLoadStatus = res.data.total > self.orderList.length ? 'loadmore' : 'nomore'
...@@ -252,10 +273,26 @@ ...@@ -252,10 +273,26 @@
this.triggered = "restore"; this.triggered = "restore";
}, },
reachBottom() { reachBottom() {
console.log(this.currentLoadStatus)
if (this.currentLoadStatus != 'loadmore') return if (this.currentLoadStatus != 'loadmore') return
this.currentLoadStatus == 'loading' this.currentLoadStatus == 'loading'
this.loadOrderList() this.loadOrderList()
}, },
onPulling(e) {
console.log("onpulling", e);
},
onRefresh() {
if (this._freshing) return;
this._freshing = true;
this.initSettleInfo()
},
onRestore() {
this.triggered = 'restore'; // 需要重置
console.log("onRestore");
},
onAbort() {
console.log("onAbort");
},
// clickSwiper(index) {}, // clickSwiper(index) {},
handleScroll() { handleScroll() {
console.log("-----scroll-------"); console.log("-----scroll-------");
...@@ -330,7 +367,7 @@ ...@@ -330,7 +367,7 @@
.banner-image { .banner-image {
width: 730rpx; width: 730rpx;
height: 280rpx; height: 280rpx;
margin-left: -14rpx; margin-left: -16rpx;
} }
.msg-view { .msg-view {
......
...@@ -81,7 +81,7 @@ ...@@ -81,7 +81,7 @@
type="primary" shape="circle" :hover-class="submitStatus ? '' : 'none'"> type="primary" shape="circle" :hover-class="submitStatus ? '' : 'none'">
暂存 暂存
</u-button> </u-button>
<u-button class="btn-submit" @click="nextStep" v-if="tabIndex===list.length - 1" <u-button class="btn-submit" @click="orderFinish" v-if="tabIndex===list.length - 1"
type="primary" shape="circle" :hover-class="submitStatus ? '' : 'none'"> type="primary" shape="circle" :hover-class="submitStatus ? '' : 'none'">
交付 交付
</u-button> </u-button>
...@@ -116,6 +116,7 @@ ...@@ -116,6 +116,7 @@
orderId:0, orderId:0,
categoryId:0, categoryId:0,
orderServiceType:'', orderServiceType:'',
inGuaranteePeriod:'',
list: [], list: [],
tabIndex: 0, tabIndex: 0,
scrollTop: 0, //tab标题的滚动条位置 scrollTop: 0, //tab标题的滚动条位置
...@@ -186,10 +187,12 @@ ...@@ -186,10 +187,12 @@
this.orderId = option.orderId this.orderId = option.orderId
this.categoryId = option.categoryId this.categoryId = option.categoryId
this.orderServiceType = decodeURIComponent(option.orderServiceType) this.orderServiceType = decodeURIComponent(option.orderServiceType)
this.inGuaranteePeriod = option.inGuaranteePeriod
} else { } else {
this.orderId = 9708719 this.orderId = 9708719
this.categoryId = 88 this.categoryId = 88
this.orderServiceType = '安装' this.orderServiceType = '安装'
this.inGuaranteePeriod = 'Y'
} }
this.getCompleteData() this.getCompleteData()
}, },
...@@ -269,6 +272,18 @@ ...@@ -269,6 +272,18 @@
} }
}) })
}, },
orderFinish(){
let self = this
if(self.inGuaranteePeriod === 'Y'){
self.$u.api.inOrderFinish(self.orderId).then((res)=>{
console.log(res)
})
}else{
self.$u.api.outOrderFinish({customerPayType:'CASH'}, self.orderId).then((res)=>{
console.log(res)
})
}
},
getTakeStatus(event) { getTakeStatus(event) {
this.takeStatus = event.status this.takeStatus = event.status
this.fileIndex = event.index.toString() this.fileIndex = event.index.toString()
......
...@@ -44,21 +44,23 @@ ...@@ -44,21 +44,23 @@
<view v-else class="order-item-more"> <view v-else class="order-item-more">
<view class="line-view"></view> <view class="line-view"></view>
<view class="order-cell between-cell"> <view class="order-cell between-cell">
<text>品牌:</text> <text class="cell-title">品牌:</text>
<text>{{ order.brandName }}</text> <text>{{ order.brandName }}</text>
</view> </view>
<view class="order-cell between-cell"> <view class="order-cell between-cell">
<text>数量:</text> <text class="cell-title">数量:</text>
<text>x{{ order.orderProductCount }}</text> <text>x{{ order.orderProductCount }}</text>
</view> </view>
<view class="order-cell between-cell"> <view class="order-cell between-cell">
<text>信息:</text> <text>充电桩信息:</text>
<text class="cell-title">充电桩信息:</text>
<text>{{ order.serviceContent }}</text> <text>{{ order.serviceContent }}</text>
</view> </view>
<view class="order-cell between-cell"> <!-- <view class="order-cell between-cell">
<!-- <view class="order-cell between-cell">
<text>备注:</text> <text>备注:</text>
<text>{{ order.serviceContent }}</text> <text>{{ order.serviceContent }}</text>
</view> </view> -->
<view class="read-more-toggle"> <view class="read-more-toggle">
<u-icon name="arrow-up"></u-icon> <u-icon name="arrow-up"></u-icon>
<text class="read-more-text" @click="readMore = true">点击收起</text> <text class="read-more-text" @click="readMore = true">点击收起</text>
...@@ -130,8 +132,6 @@ ...@@ -130,8 +132,6 @@
</u-count-down> </u-count-down>
</view> </view>
</view> </view>
</view> </view>
<!-- 异常预约 ,现场拍照 这里是调用拍照的两个组件--> <!-- 异常预约 ,现场拍照 这里是调用拍照的两个组件-->
<view class="right"> <view class="right">
...@@ -212,7 +212,8 @@ ...@@ -212,7 +212,8 @@
isAllowDianhuaAndDaohang : false, isAllowDianhuaAndDaohang : false,
appointmentDatetimeRange:'', appointmentDatetimeRange:'',
appointmentDatetime:'', appointmentDatetime:'',
signDistance:3000 signDistance:3000,
num:0
} }
}, },
onLoad(option) { onLoad(option) {
...@@ -220,8 +221,6 @@ ...@@ -220,8 +221,6 @@
console.log("option", option) console.log("option", option)
if (option && option.id) { if (option && option.id) {
this.orderId = option.id this.orderId = option.id
} else {
// 异常处理
} }
this.loadOrderDetail() this.loadOrderDetail()
this.loadOrderRecord() this.loadOrderRecord()
...@@ -236,7 +235,6 @@ ...@@ -236,7 +235,6 @@
}else{ }else{
return process.uniEnv.qn_base_url + 'dianhua-0.png' return process.uniEnv.qn_base_url + 'dianhua-0.png'
} }
}, },
navigationIcon() { navigationIcon() {
//self-support/icon/daohang-0@2x.png //self-support/icon/daohang-0@2x.png
...@@ -245,7 +243,6 @@ ...@@ -245,7 +243,6 @@
}else{ }else{
return process.uniEnv.qn_base_url + 'daohang-0.png' return process.uniEnv.qn_base_url + 'daohang-0.png'
} }
}, },
centerButtonClass() { centerButtonClass() {
let btnClass = "appoint-btn" let btnClass = "appoint-btn"
...@@ -336,7 +333,6 @@ ...@@ -336,7 +333,6 @@
}; };
self.$u.api.orderDetail(data, self.orderId).then((res) => { self.$u.api.orderDetail(data, self.orderId).then((res) => {
if (res.code == 200) { if (res.code == 200) {
console.log("===", res.data)
self.order = res.data self.order = res.data
this.getCurrentBtn() this.getCurrentBtn()
if(self.order.isFirstOrder){ if(self.order.isFirstOrder){
...@@ -362,7 +358,6 @@ ...@@ -362,7 +358,6 @@
}; };
self.$u.api.listOrderRecord(param).then((res) => { self.$u.api.listOrderRecord(param).then((res) => {
if (res.code == 200) { if (res.code == 200) {
self.orderRecords = res.data self.orderRecords = res.data
} else { } else {
console.log(res.message, "获取订单详情失败!"); console.log(res.message, "获取订单详情失败!");
...@@ -371,39 +366,55 @@ ...@@ -371,39 +366,55 @@
}, },
weekChange(data){ weekChange(data){
// 点击下一周 // 点击下一周
console.log(data,'weekChange') console.log(data,'week-data')
if (data && data.time) { if (data && data.time) {
let num = data.num let num = data.num
let time = data.time let time = data.time
this.num = num
if (num == 0) { if (num == 0) {
this.dateList = [ this.loadCalendar()
{day: time, timeRange: []},
{day: time + (1*86400000), timeRange: []},
{day: time + (2*86400000), timeRange: []},
{day: time + (3*86400000), timeRange: []},
{day: time + (4*86400000), timeRange: []},
{day: time + (5*86400000), timeRange: []},
{day: time + (6*86400000), timeRange: []},
]
} else { } else {
this.dateList = [ this.loadCalendar()
{day: time, timeRange: []},
{day: time + (1*86400000), timeRange: []},
{day: time + (2*86400000), timeRange: []},
{day: time + (3*86400000), timeRange: []},
{day: time + (4*86400000), timeRange: []},
{day: time + (5*86400000), timeRange: []},
]
} }
} }
},/* 加载日历数据 */
async loadCalendar() {
let self = this
let params = {
num: this.num
}
let res = await this.$u.api.workerCalendar(params)
if(res && res.code == 200) {
self.dateList = res.data
self.dateList[1].timeRange[0]='appointment_range_8'
}
},
/* 加载预约时间段 */
async loadTimerange() {
let self = this
let res = await this.$u.api.openTimerange()
if(res && res.code == 200) {
let list = res.data
list.map((item, index) => {
item.disabled = false
})
self.timeList = list
}
}, },
dateChange(data){ dateChange(data){
// 点击日期选择 // 点击日期选择
console.log(data,'dateChange') console.log(data,'dateChange')
this.loadCalendar()
let self = this let self = this
self.appointmentDatetime = data.item.day self.appointmentDatetime = data.item.day
self.timeList.map((item, index) => {
if(data.item.timeRange.indexOf(item.pkey) > -1) {
item.disabled = true
} else {
item.disabled = false
}
})
}, },
timeChange(data){ timeChange(data){
// 时间段选择变化 // 时间段选择变化
...@@ -538,6 +549,7 @@ ...@@ -538,6 +549,7 @@
url: 'pages/order/complete?orderId='+this.order.orderId url: 'pages/order/complete?orderId='+this.order.orderId
+ "&categoryId=" + this.order.categoryId + "&categoryId=" + this.order.categoryId
+ "&orderServiceType=" + this.order.orderServiceType + "&orderServiceType=" + this.order.orderServiceType
+ "&inGuaranteePeriod=" + this.order.inGuaranteePeriod
}) })
}, },
rejectOrder() { // 拒单 rejectOrder() { // 拒单
...@@ -624,7 +636,7 @@ ...@@ -624,7 +636,7 @@
}; };
</script> </script>
<style lang="scss"> <style lang="scss" scoped>
.order-wrap { .order-wrap {
width: 750rpx; width: 750rpx;
height: 100vh; height: 100vh;
...@@ -756,6 +768,7 @@ ...@@ -756,6 +768,7 @@
.order-item-more { .order-item-more {
font-size: 26rpx; font-size: 26rpx;
color: #333333; color: #333333;
text-align: right;
.line-view { .line-view {
background-color: #F4F5F7; background-color: #F4F5F7;
height: 2rpx; height: 2rpx;
...@@ -945,7 +958,7 @@ ...@@ -945,7 +958,7 @@
color: #333333; color: #333333;
line-height: 48rpx; line-height: 48rpx;
margin-bottom: 10rpx; margin-bottom: 10rpx;
text-align: left;
} }
.between-cell { .between-cell {
...@@ -953,4 +966,8 @@ ...@@ -953,4 +966,8 @@
justify-content: space-between; justify-content: space-between;
align-items: flex-start; align-items: flex-start;
} }
.cell-title {
text-align: left;
flex-shrink: 0;
}
</style> </style>
...@@ -176,6 +176,7 @@ ...@@ -176,6 +176,7 @@
}, },
reachBottom(e) { reachBottom(e) {
console.log('-------底部-------', this.loadStatus)
if (this.loadStatus != 'loadmore') return if (this.loadStatus != 'loadmore') return
this.loadStatus == 'loading' this.loadStatus == 'loading'
this.getOrderList(this.currentIndex) this.getOrderList(this.currentIndex)
...@@ -183,7 +184,7 @@ ...@@ -183,7 +184,7 @@
// 页面数据 // 页面数据
getOrderList(index) { getOrderList(index) {
// 状态处理 // 状态处理
// this.pageNumber += 1 this.pageNumber += 1
this.loaded = false this.loaded = false
var param = { var param = {
pageNumber: this.pageNumber, pageNumber: this.pageNumber,
...@@ -233,6 +234,7 @@ ...@@ -233,6 +234,7 @@
self.triggered = false; self.triggered = false;
self._freshing = false; self._freshing = false;
if (res.data.list) { if (res.data.list) {
res.data.list[0].currentOverTime = undefined
self.orderList.push(...res.data.list) self.orderList.push(...res.data.list)
if (self.list[self.types[res.data.type]]) { if (self.list[self.types[res.data.type]]) {
self.list[self.types[res.data.type]].total = res.data.total self.list[self.types[res.data.type]].total = res.data.total
...@@ -249,23 +251,23 @@ ...@@ -249,23 +251,23 @@
// 获取订单数量 // 获取订单数量
getOrderCount() { getOrderCount() {
var self = this; // 加载订单列表 // 加载订单列表
self.$u.api.listOrderCount().then((res) => { this.$u.api.listOrderCount().then((res) => {
if (res.code == 200) { if (res.code == 200) {
console.log("===", res.data) console.log("===", res.data)
if (res.data) { if (res.data) {
var count = 0 var count = 0
self.list.forEach(item => { this.list.forEach(item => {
if (item.name === '待预约') { if (item.name === '待预约') {
item.count = res.data.toAppointmentCount item.total = res.data.toAppointmentCount
} else if (item.name === '待签到') { } else if (item.name === '待签到') {
item.count = res.data.toCheckinCount item.total = res.data.toCheckinCount
} else if (item.name === '待完工') { } else if (item.name === '待完工') {
item.count = res.data.toFinishCount item.total = res.data.toFinishCount
} else if (item.name === '待审核') { } else if (item.name === '审核中') {
item.count = res.data.reviewingCount item.total = res.data.reviewingCount
} else if (item.name === '异常单') { } else if (item.name === '异常单') {
item.count = res.data.exceptionCount item.total = res.data.exceptionCount
} }
}) })
var count = 0 var count = 0
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment