|
|
@@ -460,6 +460,14 @@
|
|
|
{{scope.row.receivablesStatus === '1'?'已收款':'未收款'}}
|
|
|
</template>
|
|
|
</vxe-column>
|
|
|
+ <vxe-column title="操作" min-width="120" align="center" fixed="right">
|
|
|
+ <template #default="scope">
|
|
|
+ <el-button v-if="scope.row.omsAttachmentUrl" type="primary" text size="small"
|
|
|
+ @click="handleDownloadInvoice(scope.row)">
|
|
|
+ <i class="el-icon-download"></i> 下载
|
|
|
+ </el-button>
|
|
|
+ </template>
|
|
|
+ </vxe-column>
|
|
|
</vxe-table>
|
|
|
</el-tab-pane>
|
|
|
</el-tabs>
|
|
|
@@ -614,6 +622,7 @@
|
|
|
projectNumber: ''
|
|
|
},
|
|
|
invoiceList: [],
|
|
|
+ invoiceLoading: false,
|
|
|
invoiceForm: {
|
|
|
no: ''
|
|
|
},
|
|
|
@@ -1202,6 +1211,30 @@
|
|
|
viewInvoice (flag, id) {
|
|
|
this.$refs.invoiceFormDialog.init(flag, id)
|
|
|
},
|
|
|
+ // 下载单个发票
|
|
|
+ handleDownloadInvoice (row) {
|
|
|
+ this.$confirm(`确定下载当前发票文件吗?`, '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ }).then(() => {
|
|
|
+ this.invoiceLoading = true
|
|
|
+ let omsAttachmentUrl = row.omsAttachmentUrl.substring(1)
|
|
|
+ omsAttachmentUrl = omsAttachmentUrl.substring(0, omsAttachmentUrl.lastIndexOf('/') + 1)
|
|
|
+ cwFinanceInvoiceService.downLoadOMSInvoiceAttachzip({
|
|
|
+ fileUrl: omsAttachmentUrl,
|
|
|
+ invoiceNo: row.no
|
|
|
+ }).then((res) => {
|
|
|
+ this.$utils.downloadZip(res, '发票-' + row.no + '.zip')
|
|
|
+ this.invoiceLoading = false
|
|
|
+ }).catch((err) => {
|
|
|
+ this.invoiceLoading = false
|
|
|
+ if (err.response) {
|
|
|
+ console.log(err.response)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+ },
|
|
|
searchReport () {
|
|
|
this.loading = true
|
|
|
projectReportService.getIdByContractId(this.inputForm.id, this.reportForm).then((data) => {
|