|
|
@@ -991,12 +991,13 @@ export default {
|
|
|
*/
|
|
|
this.$emit(ORDER_FORM_EVENTS.SAVE_SUCCESS, response.data.data)
|
|
|
|
|
|
- // 保持在当前页:编辑模式不返回列表,仅在新增模式返回列表
|
|
|
- if (!this.isEdit) {
|
|
|
- // 新增模式:保存成功后返回列表
|
|
|
- this.handleBack()
|
|
|
- } else {
|
|
|
- // 编辑模式:留在当前页,方便继续编辑
|
|
|
+ // 保持在当前页:新增与编辑模式均不主动返回列表
|
|
|
+ // 编辑模式:保存成功后刷新订单详情,已保存的物料置为不可删除
|
|
|
+ if (this.isEdit) {
|
|
|
+ const savedId = (response && response.data && response.data.data && response.data.data.id) || this.orderId || (this.formData && this.formData.id)
|
|
|
+ if (savedId) {
|
|
|
+ await this.loadOrderDetail(String(savedId))
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
} catch (error) {
|
|
|
@@ -1054,6 +1055,8 @@ export default {
|
|
|
if (orderId) {
|
|
|
await this.loadOrderDetail(orderId)
|
|
|
}
|
|
|
+ // 提交动作完成后返回订单列表页
|
|
|
+ this.handleBack()
|
|
|
} else {
|
|
|
this.$message.error((response && response.data && response.data.msg) || '提交失败')
|
|
|
}
|