Commit 1ce37313 authored by Facius's avatar Facius

fix: 订单管理和浏览记录页面的跳转

parent 7abaf6b4
......@@ -442,6 +442,10 @@ export default {
this.otherAction()
},
handleClickCell() {
if (this.isSimple) {
this.handleClick()
return
}
var func = 'click'
this.handleExceptions()
if (this.isException) {
......
......@@ -114,6 +114,8 @@ export default {
},
onLoad() {
this.currentClicks = this.clicks
},
onShow() {
this.getOrderCount()
},
methods: {
......
......@@ -597,6 +597,22 @@ export default {
this.form.paymentMethodsType && this.form.paymentMethodsType != '03'
)
},
// 从订单管理和浏览记录进来,不跳转到订单列表,而是后退到订单管理和浏览记录
completeBack() {
let pages = getCurrentPages()
var i = 0
for (var item of pages) {
if (
['/pages/mine/history/index', '/pages/mine/order/index'].indexOf(
item.$page.fullPath
) != -1
) {
return pages.length - i - 1
}
i++
}
return 0
},
},
methods: {
getCompleteData() {
......@@ -867,9 +883,16 @@ export default {
async appointment() {
const save = await this.nextStepSaveData()
if (save) {
uni.reLaunch({
url: '/pages/index/order?type=waitAppointment',
})
if (this.completeBack) {
// 从订单管理和浏览记录进来
uni.navigateBack({
delta: this.completeBack,
})
} else {
uni.reLaunch({
url: '/pages/index/order?type=waitAppointment',
})
}
}
},
// 下一步动作
......@@ -926,7 +949,7 @@ export default {
maintainFields: this.handleSaveData(),
currentStep: this.list[this.tabIndex].panelFieldsName,
nextStep: this.list[this.tabIndex + 1].panelFieldsName,
version: 2
version: 2,
}
uni.showLoading({
title: '加载中',
......@@ -1003,9 +1026,16 @@ export default {
title: '提交成功',
type: 'success',
callback: () => {
uni.reLaunch({
url: '/pages/index/order?type=audit',
})
if (this.completeBack) {
// 从订单管理和浏览记录进来
uni.navigateBack({
delta: this.completeBack,
})
} else {
uni.reLaunch({
url: '/pages/index/order?type=audit',
})
}
},
})
} else {
......@@ -1024,9 +1054,16 @@ export default {
title: '提交成功',
type: 'success',
callback: () => {
uni.reLaunch({
url: '/pages/index/order?type=audit',
})
if (this.completeBack) {
// 从订单管理和浏览记录进来
uni.navigateBack({
delta: this.completeBack,
})
} else {
uni.reLaunch({
url: '/pages/index/order?type=audit',
})
}
},
})
} else {
......@@ -1157,7 +1194,7 @@ export default {
orderNumber: this.orderNumber,
fieldsName: this.photoItem.fieldsName,
fieldsTitle: this.photoItem.fieldsTitle,
uploadType: 'camera'
uploadType: 'camera',
}
const value = await this.saveToTask(val, order)
this.$refs[
......@@ -1174,13 +1211,13 @@ export default {
let options = {
sourceType: ['album'], //['album', 'camera']
count: 3,
sizeType: ['original']
sizeType: ['original'],
}
const order = {
orderNumber: this.orderNumber,
fieldsName: this.photoItem.fieldsName,
fieldsTitle: this.photoItem.fieldsTitle,
uploadType: 'album'
uploadType: 'album',
}
const value = await this.chooseImg(options, order)
self.$refs[
......
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