|
@@ -8,7 +8,7 @@
|
|
<view class="check-order-list" v-for="(item, index) in list" :key="item.id">
|
|
<view class="check-order-list" v-for="(item, index) in list" :key="item.id">
|
|
<view class="check-row" @click="viewRow(item)">
|
|
<view class="check-row" @click="viewRow(item)">
|
|
<view class="createDate">{{ item.createDate }}</view>
|
|
<view class="createDate">{{ item.createDate }}</view>
|
|
- <view>{{ item.status }}</view>
|
|
|
|
|
|
+ <view :class="clsStatus(item.status)">{{ item.status }}</view>
|
|
</view>
|
|
</view>
|
|
<view class="check-row" @click="viewRow(item)">
|
|
<view class="check-row" @click="viewRow(item)">
|
|
<view>
|
|
<view>
|
|
@@ -16,8 +16,9 @@
|
|
<view style="color: #666666;">{{ item.storeName }}</view>
|
|
<view style="color: #666666;">{{ item.storeName }}</view>
|
|
</view>
|
|
</view>
|
|
<view>
|
|
<view>
|
|
- <text style="color: #007AFF;">开始点检</text>
|
|
|
|
- <u-icon name="icon-xian-11" custom-prefix="xd-icon" size="28" color="#888888"></u-icon>
|
|
|
|
|
|
+ <text v-if="item.status=='待处理'" style="color: #007AFF;">开始点检</text>
|
|
|
|
+ <text v-if="item.status=='已完成'" style="color: #007AFF;">查看结果</text>
|
|
|
|
+ <u-icon v-if="item.status!='已过期'" name="icon-xian-11" custom-prefix="xd-icon" size="28" color="#888888"></u-icon>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
@@ -42,21 +43,22 @@ export default {
|
|
tabList: [
|
|
tabList: [
|
|
{
|
|
{
|
|
dispName: '待处理',
|
|
dispName: '待处理',
|
|
- typeId: 4
|
|
|
|
|
|
+ code: 4
|
|
},
|
|
},
|
|
{
|
|
{
|
|
dispName: '已完成',
|
|
dispName: '已完成',
|
|
- typeId: 3
|
|
|
|
|
|
+ code: 3
|
|
},
|
|
},
|
|
{
|
|
{
|
|
dispName: '已过期',
|
|
dispName: '已过期',
|
|
- typeId: 2
|
|
|
|
|
|
+ code: 2
|
|
},
|
|
},
|
|
{
|
|
{
|
|
dispName: '全部',
|
|
dispName: '全部',
|
|
- typeId: 1
|
|
|
|
|
|
+ code: 1
|
|
}
|
|
}
|
|
],
|
|
],
|
|
|
|
+ typeId:'1',
|
|
current: 0,
|
|
current: 0,
|
|
swiperCurrent: 0,
|
|
swiperCurrent: 0,
|
|
pageNo: 1,
|
|
pageNo: 1,
|
|
@@ -78,8 +80,6 @@ export default {
|
|
// tabs通知swiper切换
|
|
// tabs通知swiper切换
|
|
tabsChange(index) {
|
|
tabsChange(index) {
|
|
this.swiperCurrent = index;
|
|
this.swiperCurrent = index;
|
|
- this.list = [];
|
|
|
|
- this.status = 'loading';
|
|
|
|
},
|
|
},
|
|
swiperChange(event) {
|
|
swiperChange(event) {
|
|
console.log(event.detail);
|
|
console.log(event.detail);
|
|
@@ -118,11 +118,12 @@ export default {
|
|
if (pageNo) {
|
|
if (pageNo) {
|
|
this.pageNo = pageNo;
|
|
this.pageNo = pageNo;
|
|
}
|
|
}
|
|
|
|
+ this.typeId = this.tabList[this.swiperCurrent].code
|
|
let params = {
|
|
let params = {
|
|
pageNo: this.pageNo,
|
|
pageNo: this.pageNo,
|
|
pageSize: this.pageSize,
|
|
pageSize: this.pageSize,
|
|
type: '点检任务', // 任务类型
|
|
type: '点检任务', // 任务类型
|
|
- status: this.typeId == 1 ? '' : this.typeId // 任务状态
|
|
|
|
|
|
+ status: this.typeId=='1'?'':this.typeId // 任务状态
|
|
};
|
|
};
|
|
this.status = 'loading';
|
|
this.status = 'loading';
|
|
getTaskList(params).then(res => {
|
|
getTaskList(params).then(res => {
|
|
@@ -141,14 +142,29 @@ export default {
|
|
_this.status = 'loadmore';
|
|
_this.status = 'loadmore';
|
|
});
|
|
});
|
|
},
|
|
},
|
|
- // 详细页
|
|
|
|
|
|
+ //判断状态,待处理的跳转的开始点检页面,已完成的查看点检结果,已过期的不处理
|
|
viewRow(item) {
|
|
viewRow(item) {
|
|
- // 判断状态,待处理的跳转的开始点检页面,已完成的查看点检结果,已过期的不处理
|
|
|
|
// 已完成的
|
|
// 已完成的
|
|
- uni.navigateTo({
|
|
|
|
- url: '/pages/spotCheckCenter/spotCheckResult?id=' + item.id
|
|
|
|
- });
|
|
|
|
- // 待处理
|
|
|
|
|
|
+ if(item.status == '已完成'){
|
|
|
|
+ uni.navigateTo({
|
|
|
|
+ url: '/pages/spotCheckCenter/spotCheckResult?id=' + item.id
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ // 待处理,开始点检
|
|
|
|
+ if(item.status == '待处理'){
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ clsStatus(status){
|
|
|
|
+ if(status == '待处理'){
|
|
|
|
+ return 'dcl'
|
|
|
|
+ }
|
|
|
|
+ if(status == '已完成'){
|
|
|
|
+ return 'ywc'
|
|
|
|
+ }
|
|
|
|
+ if(status == '已过期'){
|
|
|
|
+ return 'ygq'
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
};
|
|
};
|
|
@@ -194,20 +210,14 @@ page {
|
|
padding: 0 20rpx;
|
|
padding: 0 20rpx;
|
|
color: #fff;
|
|
color: #fff;
|
|
}
|
|
}
|
|
- .edit {
|
|
|
|
- background-color: #f9ba09;
|
|
|
|
- }
|
|
|
|
- .view {
|
|
|
|
- background-color: #ff7801;
|
|
|
|
- }
|
|
|
|
- .del {
|
|
|
|
- background-color: #f72525;
|
|
|
|
|
|
+ .dcl {
|
|
|
|
+ color: #f72525;
|
|
}
|
|
}
|
|
- .finish {
|
|
|
|
- background-color: #2d8cf0;
|
|
|
|
|
|
+ .ygq {
|
|
|
|
+ color: #999;
|
|
}
|
|
}
|
|
- .pay {
|
|
|
|
- background-color: #10c71e;
|
|
|
|
|
|
+ .ywc {
|
|
|
|
+ color: #10c71e;
|
|
}
|
|
}
|
|
.check-btns {
|
|
.check-btns {
|
|
width: '50%';
|
|
width: '50%';
|