|
@@ -73,13 +73,16 @@
|
|
|
</template>
|
|
</template>
|
|
|
<!-- 开票信息 -->
|
|
<!-- 开票信息 -->
|
|
|
<template v-slot:invoiceCode="{ row }">
|
|
<template v-slot:invoiceCode="{ row }">
|
|
|
- <el-link
|
|
|
|
|
- type="primary"
|
|
|
|
|
- :underline="false"
|
|
|
|
|
- @click="handleInvoiceDetail(row, 'view')"
|
|
|
|
|
- >
|
|
|
|
|
- {{ row.invoiceCode }}
|
|
|
|
|
- </el-link>
|
|
|
|
|
|
|
+ <div v-for="(code, index) in splitInvoiceCodes(row.invoiceCode)" :key="`code-${index}`">
|
|
|
|
|
+ <span v-if="index > 0">,</span>
|
|
|
|
|
+ <el-link
|
|
|
|
|
+ type="primary"
|
|
|
|
|
+ :underline="false"
|
|
|
|
|
+ @click="handleInvoiceDetail(row, code, 'view')"
|
|
|
|
|
+ >
|
|
|
|
|
+ {{ code }}
|
|
|
|
|
+ </el-link>
|
|
|
|
|
+ </div>
|
|
|
</template>
|
|
</template>
|
|
|
</ele-pro-table>
|
|
</ele-pro-table>
|
|
|
</div>
|
|
</div>
|
|
@@ -482,11 +485,25 @@
|
|
|
this.$refs.detailDialogRef.init(row.id, type);
|
|
this.$refs.detailDialogRef.init(row.id, type);
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
- handleInvoiceDetail(row = {}, type) {
|
|
|
|
|
|
|
+ splitInvoiceCodes(invoiceCode) {
|
|
|
|
|
+ if (!invoiceCode) {
|
|
|
|
|
+ return [];
|
|
|
|
|
+ }
|
|
|
|
|
+ return String(invoiceCode)
|
|
|
|
|
+ .split(',')
|
|
|
|
|
+ .map((item) => item.trim())
|
|
|
|
|
+ .filter(Boolean);
|
|
|
|
|
+ },
|
|
|
|
|
+ handleInvoiceDetail(row = {}, invoiceCode, type) {
|
|
|
|
|
+ const code = row.invoiceInfoList ? row.invoiceInfoList[invoiceCode] : row.invoiceId;
|
|
|
|
|
+ if (!code) {
|
|
|
|
|
+ this.$message.warning(`未找到发票${invoiceCode}的详情`);
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
this.invoiceDetailDialogFlag = true;
|
|
this.invoiceDetailDialogFlag = true;
|
|
|
this.$nextTick(() => {
|
|
this.$nextTick(() => {
|
|
|
let params = {
|
|
let params = {
|
|
|
- id: row.invoiceId
|
|
|
|
|
|
|
+ id: code
|
|
|
};
|
|
};
|
|
|
this.$refs.invoiceDetailDialogRef.init(params, type);
|
|
this.$refs.invoiceDetailDialogRef.init(params, type);
|
|
|
});
|
|
});
|