|
|
@@ -372,20 +372,37 @@ export default {
|
|
|
|
|
|
},
|
|
|
toConfrim(params,title){
|
|
|
+ let that = this
|
|
|
uni.showModal({
|
|
|
- title: '完成订单提示',
|
|
|
+ title: '订单完成',
|
|
|
content: title,
|
|
|
success: function (res) {
|
|
|
if (res.confirm) {
|
|
|
- self.toConfirmRequest(params)
|
|
|
+ that.toConfirmRequest(params)
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
toConfirmRequest(params){
|
|
|
+ let that = this
|
|
|
confirmFinish(params).then((res) => {
|
|
|
- uni.showToast({title:res.msg,icon:'none'})
|
|
|
- this.init();
|
|
|
+
|
|
|
+ uni.showToast({title:res.msg,icon:'none'})
|
|
|
+ if(res.code == 1){
|
|
|
+ //订单变成完成
|
|
|
+ that.list.data.forEach((item, index,array) => {
|
|
|
+ if(item.id == params.id){
|
|
|
+ array[index].status = '4'
|
|
|
+ array[index].buttonList.forEach((it,ind,arr)=>{
|
|
|
+ if(it.type == 'confirm'){
|
|
|
+ arr[ind].disable = 1
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
})
|
|
|
},
|
|
|
selectSussess(val) {
|