|
@@ -58,6 +58,14 @@
|
|
|
if(data.action == 'updateKpTj'){
|
|
|
this.getTaskDetail()
|
|
|
}
|
|
|
+ // 提交巡店
|
|
|
+ if(data.action == 'submitTask'){
|
|
|
+ this.submitTask()
|
|
|
+ }
|
|
|
+ // 现场巡店下一步签字页面
|
|
|
+ if(data.action == 'nextStep'){
|
|
|
+ this.nextStep()
|
|
|
+ }
|
|
|
},
|
|
|
//指标评论,图片更新保存
|
|
|
saveZbPlImgs(data){
|
|
@@ -104,13 +112,13 @@
|
|
|
content: '确定删除此考评项,删除后无法恢复?',
|
|
|
success: function(res) {
|
|
|
if (res.confirm || res.index == 0) {
|
|
|
- delTaskItem({id:id}).then(res=>{
|
|
|
- if(res.status == 200){
|
|
|
+ delTaskItem({id:id}).then(ret=>{
|
|
|
+ if(ret.status == 200){
|
|
|
_this.wv.evalJS("vm.delKpItemSuccess("+id+")")
|
|
|
}
|
|
|
uni.showToast({
|
|
|
icon:'none',
|
|
|
- title: res.message
|
|
|
+ title: ret.message
|
|
|
})
|
|
|
})
|
|
|
}
|
|
@@ -197,13 +205,20 @@
|
|
|
content: '确定提交本次巡店?',
|
|
|
success: function(res) {
|
|
|
if (res.confirm || res.index == 0) {
|
|
|
- submitTask({storeId:this.storeId}).then(res=>{
|
|
|
- if(res.status == 200){
|
|
|
- uni.navigateBack()
|
|
|
+ submitTask({storeId:_this.storeId}).then(ret=>{
|
|
|
+ console.log(ret)
|
|
|
+ if(ret.status == 200){
|
|
|
+ _this.isClose = true
|
|
|
+ // 打开完成页面
|
|
|
+ uni.redirectTo({
|
|
|
+ url:"/pages/shopTourCompleted/shopTourCompleted?id="+ret.data.id
|
|
|
+ })
|
|
|
+ }else{
|
|
|
+ _this.isClose = false
|
|
|
}
|
|
|
uni.showToast({
|
|
|
icon:'none',
|
|
|
- title: res.message
|
|
|
+ title: ret.message
|
|
|
})
|
|
|
})
|
|
|
}
|