refactor: 结算调整单推送金蝶与重新推送合并为单一按钮
This commit is contained in:
@@ -144,23 +144,10 @@
|
||||
@click="handleReturn(row)"
|
||||
>驳回</el-link
|
||||
><el-link
|
||||
v-if="
|
||||
hasPermission('settlement_adjustment_sync') &&
|
||||
row.approvalStatus === 'approved' &&
|
||||
row.kingdeeSyncStatus !== 'synced'
|
||||
"
|
||||
type="primary"
|
||||
@click="handleSyncKingdee(row)"
|
||||
>推送金蝶</el-link
|
||||
><el-link
|
||||
v-if="
|
||||
hasPermission('settlement_adjustment_repush') &&
|
||||
row.approvalStatus === 'approved' &&
|
||||
row.kingdeeSyncStatus === 'synced'
|
||||
"
|
||||
type="danger"
|
||||
@click="handleRepush(row)"
|
||||
>重新推送(高危)</el-link
|
||||
v-if="hasPermission('settlement_adjustment_repush') && row.approvalStatus === 'approved'"
|
||||
:type="row.kingdeeSyncStatus === 'synced' ? 'danger' : 'primary'"
|
||||
@click="handleKingdee(row)"
|
||||
>{{ row.kingdeeSyncStatus === 'synced' ? '重新推送(高危)' : '推送金蝶' }}</el-link
|
||||
>
|
||||
</div></template
|
||||
></el-table-column
|
||||
@@ -330,6 +317,11 @@ export default {
|
||||
this.$message.success('已驳回');
|
||||
this.loadTable();
|
||||
},
|
||||
// 单一入口按状态分流:未同步/失败→推送原结算单;已同步→冲销后重推新单(高危)
|
||||
async handleKingdee(row) {
|
||||
if (row.kingdeeSyncStatus === 'synced') return this.handleRepush(row);
|
||||
return this.handleSyncKingdee(row);
|
||||
},
|
||||
async handleSyncKingdee(row) {
|
||||
const res = await api.syncKingdee(row.id);
|
||||
this.$message.success(`已推送金蝶:${res.data.data || '-'}`);
|
||||
|
||||
Reference in New Issue
Block a user