Commit 1ce37313 authored by Facius's avatar Facius

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

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