运检食堂代码修改4
This commit is contained in:
parent
b8f423846d
commit
0e138cfdff
|
|
@ -20,7 +20,7 @@
|
|||
</el-form>
|
||||
<ImportFile ref="importRef" :show-popup="showPopup" @update:showPopup="showPopup = $event" textTip="导入文件不能超过5M"
|
||||
key="odAlarmOrderRecordFile" @uploadFinish="handleQuery" uploadUrl="/canteen/cmPersonAccount/importData"
|
||||
localDownloadTemplateUrl="glweb/yjCanteen-template/UserFoodAllowance_template.xlsx"
|
||||
localDownloadTemplateUrl="/glweb/yjCanteen-template/UserFoodAllowance_template.xlsx"
|
||||
errorUrl="canteen/cmPersonAccount/importExport" template-file-name="用户餐补数据模板"
|
||||
export-error-file-name="用户餐补数据.xls" title="用户餐补数据" />
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -445,13 +445,21 @@ export default {
|
|||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const ids = row.id || this.ids;
|
||||
this.$modal.confirm(`是否确认删除${row.userName}该条食堂客户调岗记录`).then(function () {
|
||||
return delTransfer(ids);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.confirm(`是否确认删除${row.userName}的调岗记录?删除后原先调岗将会还原!`)
|
||||
.then(() => delTransfer(row)) // 箭头函数保持 this
|
||||
.then(async () => {
|
||||
await this.initDeptUserTree(); // 先更新人员树
|
||||
await this.getList(); // 再刷新列表数据
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {
|
||||
})
|
||||
.then(() => {
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
})
|
||||
.catch((error) => {
|
||||
if (error !== 'cancel') { // 避免用户取消报错
|
||||
console.error("删除失败:", error);
|
||||
this.$modal.msgError(`删除失败: ${error.message || '未知错误'}`);
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
|
|
|
|||
Loading…
Reference in New Issue