|
|
|
@ -390,8 +390,10 @@ |
|
|
|
</el-row> |
|
|
|
</el-form> |
|
|
|
<el-footer style="height:40px;margin-top: 10px;text-align:center"> |
|
|
|
<el-button type="primary" @click="doUpdateDetail()">保存</el-button> |
|
|
|
<el-button type="primary" @click="updateDetailModelFlag=false">关闭</el-button> |
|
|
|
<el-button type="primary" @click="doUpdateDetail()" :loading="updateDetailLoading" :disabled="updateDetailLoading"> |
|
|
|
{{ updateDetailLoading ? '保存中...' : '保存' }} |
|
|
|
</el-button> |
|
|
|
<el-button type="primary" @click="updateDetailModelFlag=false" :disabled="updateDetailLoading">关闭</el-button> |
|
|
|
</el-footer> |
|
|
|
</el-dialog> |
|
|
|
<el-dialog title="沃尔玛订单" :close-on-click-modal="false" v-drag :visible.sync="walMartOrderDialog" width="200px"> |
|
|
|
@ -786,6 +788,7 @@ |
|
|
|
dataList2:[], |
|
|
|
dataListLoading: false, |
|
|
|
xiadaLoading: false, // 下达按钮加载状态 |
|
|
|
updateDetailLoading: false, // 明细保存/取消按钮加载状态 |
|
|
|
searchData: { |
|
|
|
page: 1, |
|
|
|
limit: 100, |
|
|
|
@ -2277,9 +2280,24 @@ |
|
|
|
}) |
|
|
|
return false |
|
|
|
} |
|
|
|
|
|
|
|
// 开始加载 |
|
|
|
this.updateDetailLoading = true |
|
|
|
|
|
|
|
updateEcssDelDetail(this.updateDetailModel).then(({data}) => { |
|
|
|
if (data && data.code === 0) { |
|
|
|
// 保存当前选中行的标识,以便刷新后恢复 |
|
|
|
const currentSelectedKey = this.currentRow ? this.currentRow.delNo : null |
|
|
|
if (currentSelectedKey) { |
|
|
|
this.selectedRowKey = currentSelectedKey |
|
|
|
this.saveSelectedRowToStorage() |
|
|
|
} |
|
|
|
|
|
|
|
// 刷新明细表格 |
|
|
|
this.refreshCurrentTabTable() |
|
|
|
// 刷新表头列表 |
|
|
|
this.searchTable() |
|
|
|
|
|
|
|
this.updateDetailModelFlag=false |
|
|
|
this.$message({ |
|
|
|
message: '操作成功', |
|
|
|
@ -2292,6 +2310,14 @@ |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
} |
|
|
|
}).catch((error) => { |
|
|
|
// 处理错误情况 |
|
|
|
this.$alert('操作失败,请重试', '错误', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
}).finally(() => { |
|
|
|
// 无论成功还是失败都要恢复加载状态 |
|
|
|
this.updateDetailLoading = false |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
@ -2352,9 +2378,23 @@ |
|
|
|
}, |
|
|
|
deleteDelDetail(row){ |
|
|
|
this.$confirm('确认取消此明细?', '提示').then(() => { |
|
|
|
// 开始加载 |
|
|
|
this.updateDetailLoading = true |
|
|
|
|
|
|
|
deleteEcssDelDetail(row).then(({data}) => { |
|
|
|
if (data && data.code === 0) { |
|
|
|
// 保存当前选中行的标识,以便刷新后恢复 |
|
|
|
const currentSelectedKey = this.currentRow ? this.currentRow.delNo : null |
|
|
|
if (currentSelectedKey) { |
|
|
|
this.selectedRowKey = currentSelectedKey |
|
|
|
this.saveSelectedRowToStorage() |
|
|
|
} |
|
|
|
|
|
|
|
// 刷新明细表格 |
|
|
|
this.refreshCurrentTabTable() |
|
|
|
// 刷新表头列表 |
|
|
|
this.searchTable() |
|
|
|
|
|
|
|
this.$message({ |
|
|
|
message: '操作成功', |
|
|
|
type: 'success', |
|
|
|
@ -2366,7 +2406,17 @@ |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
} |
|
|
|
}).catch((error) => { |
|
|
|
// 处理错误情况 |
|
|
|
this.$alert('操作失败,请重试', '错误', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
}).finally(() => { |
|
|
|
// 无论成功还是失败都要恢复加载状态 |
|
|
|
this.updateDetailLoading = false |
|
|
|
}) |
|
|
|
}).catch(() => { |
|
|
|
// 用户取消确认时不需要loading状态 |
|
|
|
}) |
|
|
|
}, |
|
|
|
getBu () { |
|
|
|
|