fix(wms): 修正收货报表和详情页的文本及按钮状态

- 将发货报表相关文本修正为收货报表
- 在收货详情页添加删除按钮和加载状态
- 为签收、拒签和删除操作添加加载状态防止重复提交
This commit is contained in:
砂糖
2025-12-16 14:13:39 +08:00
parent 5ac2e78a33
commit 770f78b1df
2 changed files with 14 additions and 6 deletions

View File

@@ -86,9 +86,11 @@
<el-table-column label="操作">
<template slot-scope="scope">
<el-button v-if="scope.row.actionStatus == 0 || scope.row.actionStatus == 1" type="primary"
@click="openReceiptModal(scope.row)">签收</el-button>
<el-button v-if="scope.row.actionStatus == 0 || scope.row.actionStatus == 1" type="danger"
@click="handleReject(scope.row)">拒签</el-button>
@click="openReceiptModal(scope.row)" v-loading="buttonLoading">签收</el-button>
<el-button v-if="scope.row.actionStatus == 0 || scope.row.actionStatus == 1" type="danger"
@click="handleReject(scope.row)" v-loading="buttonLoading">拒签</el-button>
<el-button v-if="scope.row.actionStatus == 3" type="warning" v-loading="buttonLoading"
@click="handleDelete(scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
@@ -269,12 +271,15 @@ export default {
cancelButtonText: "取消",
type: "warning"
}).then(() => {
this.buttonLoading = true;
updatePendingAction({
...row,
actionStatus: 3, // 3表示拒签
}).then(response => {
this.$modal.msgSuccess("拒签成功");
this.getList();
}).finally(() => {
this.buttonLoading = false;
});
});
},
@@ -340,9 +345,12 @@ export default {
cancelButtonText: "取消",
type: "warning"
}).then(() => {
this.buttonLoading = true;
delPendingAction(row.actionId).then(response => {
this.$modal.msgSuccess("删除成功");
this.getList();
}).finally(() => {
this.buttonLoading = false;
});
});
},

View File

@@ -20,7 +20,7 @@
<el-card class="summary-card" v-if="summary">
<template #header>
<div class="card-header">
<span>货报表汇总</span>
<span>货报表汇总</span>
</div>
</template>
<el-descriptions :column="2" border>
@@ -39,7 +39,7 @@
<el-card class="table-card" v-if="details && details.length > 0">
<template #header>
<div class="card-header">
<span>产品货计划</span>
<span>产品货计划</span>
<span> {{ details.length }} 个计划</span>
</div>
</template>
@@ -158,7 +158,7 @@ export default {
this.summary = res.data?.summary || null
this.details = res.data?.details || []
} catch (error) {
console.error('获取货报表失败:', error)
console.error('获取货报表失败:', error)
this.$message.error('获取数据失败')
this.summary = null
this.details = []