|
@@ -1,5 +1,9 @@
|
|
|
<template>
|
|
|
<view class="page">
|
|
|
+<!-- <view class="page-head">
|
|
|
+ <view class="handle" @click="handleSubmit(1)">全部通过</view>
|
|
|
+ <view class="handle" @click="handleSubmit(2)">全不通过</view>
|
|
|
+ </view> -->
|
|
|
<view class="wrap">
|
|
|
<template v-if="itemList.length>0">
|
|
|
<view class="checklist" v-for="(checklist,idx) in itemList" :key="idx">
|
|
@@ -28,11 +32,12 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <view class="handle-container" v-if="handleVisiable">
|
|
|
- <view class="handle" @click="handleSubmit(3)">全部通过</view>
|
|
|
- <view class="handle" @click="handleSubmit(4)">全不通过</view>
|
|
|
- <view class="handle" @click="handleSubmit(1)">提交</view>
|
|
|
- <view class="handle" @click="handleSubmit(2)">撤销</view>
|
|
|
+ <view class="handle-container" v-if="handleVisiable">
|
|
|
+ <view class="handle" @click="handleSubmit(1)">全部通过</view>
|
|
|
+ <view class="handle" @click="handleSubmit(2)">全不通过</view>
|
|
|
+ <view class="handle" @click="handleSubmit(3)">提交</view>
|
|
|
+ <view class="handle" @click="handleSubmit(4)">撤销</view>
|
|
|
+ <view class="handle" @click="handleSubmit(5)">转交</view>
|
|
|
</view>
|
|
|
</template>
|
|
|
<template v-else>没有可处理的清单^-_-^</template>
|
|
@@ -46,6 +51,7 @@
|
|
|
checklistCancel,
|
|
|
checklistBatchUpdate,
|
|
|
} from '@/api/aqpt/checklistPoint.js'
|
|
|
+ import {cancelCheckTask,completeCheckTask} from '@/api/aqpt/task.js'
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
@@ -62,14 +68,16 @@
|
|
|
checklistId:undefined,
|
|
|
handleVisiable:false,
|
|
|
type:undefined,
|
|
|
- status:undefined
|
|
|
+ status:undefined,
|
|
|
+ taskTitle:""
|
|
|
}
|
|
|
},
|
|
|
- onLoad({rid,cid}) {
|
|
|
+ onLoad({rid,cid,title}) {
|
|
|
this.checklistId=cid
|
|
|
this.recordId=rid
|
|
|
let accountInfo=uni.getStorageSync('accountInfo')
|
|
|
this.accountInfo=accountInfo
|
|
|
+ this.taskTitle=title
|
|
|
this.getchecklistRecord(cid,rid)
|
|
|
},
|
|
|
methods: {
|
|
@@ -90,8 +98,18 @@
|
|
|
handleSubmit(type){
|
|
|
let recordId=this.recordId;
|
|
|
let checklistId=this.checklistId;
|
|
|
- if(type===1){//完成
|
|
|
- checklistComplete(recordId,checklistId).then(()=>{
|
|
|
+ if(type===1){
|
|
|
+ checklistBatchUpdate(recordId,1).then(()=>{
|
|
|
+ this.getchecklistRecord(checklistId,recordId)
|
|
|
+ })
|
|
|
+ }
|
|
|
+ if(type===2){
|
|
|
+ checklistBatchUpdate(recordId,-1).then(()=>{
|
|
|
+ this.getchecklistRecord(checklistId,recordId)
|
|
|
+ })
|
|
|
+ }
|
|
|
+ if(type===3){//完成
|
|
|
+ completeCheckTask(recordId).then(()=>{
|
|
|
uni.switchTab({
|
|
|
url:'/pages/index/index'
|
|
|
})
|
|
@@ -102,8 +120,8 @@
|
|
|
})
|
|
|
})
|
|
|
}
|
|
|
- if(type===2){//放弃
|
|
|
- checklistCancel(recordId).then(()=>{
|
|
|
+ if(type===4){//放弃
|
|
|
+ cancelCheckTask(recordId).then(()=>{
|
|
|
uni.switchTab({
|
|
|
url:'/pages/index/index'
|
|
|
})
|
|
@@ -113,17 +131,13 @@
|
|
|
title:"操作失败"
|
|
|
})
|
|
|
})
|
|
|
- }
|
|
|
- if(type===3){
|
|
|
- checklistBatchUpdate(recordId,1).then(()=>{
|
|
|
- this.getchecklistRecord(checklistId,recordId)
|
|
|
+ }
|
|
|
+ if(type===5){//转交
|
|
|
+ let taskTitle=this.taskTitle;
|
|
|
+ uni.navigateTo({
|
|
|
+ url:`/pages/index/handle/task/checkList/form/transferCheckTask?tid=${recordId}&title=${taskTitle}`
|
|
|
})
|
|
|
}
|
|
|
- if(type===4){
|
|
|
- checklistBatchUpdate(recordId,-1).then(()=>{
|
|
|
- this.getchecklistRecord(checklistId,recordId)
|
|
|
- })
|
|
|
- }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -136,6 +150,23 @@
|
|
|
min-height: 100vh;
|
|
|
box-sizing: border-box;
|
|
|
margin-bottom: 100rpx;
|
|
|
+ .page-head{
|
|
|
+ text-align: right;
|
|
|
+ padding-bottom: 10rpx;
|
|
|
+ .handle{
|
|
|
+ display: inline-block;
|
|
|
+ background-color: #3384FF;
|
|
|
+ color: #fff;
|
|
|
+ padding: 10rpx 15rpx;
|
|
|
+ box-sizing: border-box;
|
|
|
+ border-right: 1rpx solid #eaeaea;
|
|
|
+ font-size: 30rpx;
|
|
|
+ text-align: center;
|
|
|
+ &:nth-child(4){
|
|
|
+ border: 0;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
.wrap{
|
|
|
padding: 20rpx;
|
|
@@ -183,6 +214,7 @@
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
.handle-container{
|
|
|
position: fixed;
|
|
|
width: 100%;
|
|
@@ -194,16 +226,16 @@
|
|
|
align-items: center;
|
|
|
border-top: 1rpx solid #eaeaea;
|
|
|
.handle{
|
|
|
- display: inline-block;
|
|
|
+ display:block;
|
|
|
background-color: #3384FF;
|
|
|
color: #fff;
|
|
|
- padding: 15rpx 20rpx;
|
|
|
- width: 25%;
|
|
|
+ padding: 15rpx 0;
|
|
|
+ width: 20%;
|
|
|
box-sizing: border-box;
|
|
|
border-right: 1rpx solid #eaeaea;
|
|
|
- font-size: 30rpx;
|
|
|
+ font-size: 26rpx;
|
|
|
text-align: center;
|
|
|
- &:nth-child(4){
|
|
|
+ &:last-child(){
|
|
|
border: 0;
|
|
|
}
|
|
|
}
|