|
@@ -61,7 +61,7 @@
|
|
<ws-button type="primary" @click="reject">驳回</ws-button>
|
|
<ws-button type="primary" @click="reject">驳回</ws-button>
|
|
<ws-button type="primary" @click="adopt">通过</ws-button>
|
|
<ws-button type="primary" @click="adopt">通过</ws-button>
|
|
<ws-button type="primary" @click="invoicingClick"
|
|
<ws-button type="primary" @click="invoicingClick"
|
|
- v-hasPermission="`acquisitionManagement.acquisitionPay.finace`">开票</ws-button>
|
|
|
|
|
|
+ v-hasPermission="`acquisitionManagement.acquisitionPay.finace`" >开票</ws-button>
|
|
<ws-button type="primary" @click="exportlist" v-hasPermission="`acquisitionManagement.acquisitionPay.print`">导出
|
|
<ws-button type="primary" @click="exportlist" v-hasPermission="`acquisitionManagement.acquisitionPay.print`">导出
|
|
</ws-button>
|
|
</ws-button>
|
|
<!-- <ws-button type="primary" @click="handlepass" v-if="isShowAdopt">审核</ws-button> -->
|
|
<!-- <ws-button type="primary" @click="handlepass" v-if="isShowAdopt">审核</ws-button> -->
|
|
@@ -482,10 +482,17 @@ import download from '../../components/WsDownload/download'
|
|
// .then(response => {
|
|
// .then(response => {
|
|
// console.log(response)
|
|
// console.log(response)
|
|
// })
|
|
// })
|
|
|
|
+
|
|
let data = {
|
|
let data = {
|
|
paymentManagementList: this.modification
|
|
paymentManagementList: this.modification
|
|
}
|
|
}
|
|
console.log('开票', data)
|
|
console.log('开票', data)
|
|
|
|
+ for(let i=0;i<this.modification.length;i++){
|
|
|
|
+ if(this.modification[i].status!='全部付款'&&this.modification[i].status!='部分付款') {
|
|
|
|
+ this.$message.error('开票只能选择全部付款或部分付款!');
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ }
|
|
//开票
|
|
//开票
|
|
invoicing(data)
|
|
invoicing(data)
|
|
.toPromise()
|
|
.toPromise()
|
|
@@ -495,54 +502,11 @@ import download from '../../components/WsDownload/download'
|
|
|
|
|
|
var arr=[]
|
|
var arr=[]
|
|
for (let i = 0; i < response.length; i++) {
|
|
for (let i = 0; i < response.length; i++) {
|
|
|
|
+ debugger
|
|
arr.push({fileUrl:response[i],renameFileName:'发票'+i+'.xml'})
|
|
arr.push({fileUrl:response[i],renameFileName:'发票'+i+'.xml'})
|
|
- //创建标签下载文件
|
|
|
|
- // window.open(response[i],)
|
|
|
|
- // let a = document.createElement('a');
|
|
|
|
- // // a.href = response[i];
|
|
|
|
- // a.setAttribute('target', 'blank');
|
|
|
|
- // a.setAttribute('download', response[i]);
|
|
|
|
- // a.setAttribute('href', response[i]);
|
|
|
|
- // a.click();
|
|
|
|
- // a.remove();
|
|
|
|
- // let b = document.createElement('a');
|
|
|
|
- // // b.href = response[i];
|
|
|
|
- // b.setAttribute('target', 'blank');
|
|
|
|
- // b.setAttribute('download', response[i]);
|
|
|
|
- // b.setAttribute('href', response[i]);
|
|
|
|
- // b.click();
|
|
|
|
- // b.remove();
|
|
|
|
}
|
|
}
|
|
this.filesToRar(arr, '开票XML文件')
|
|
this.filesToRar(arr, '开票XML文件')
|
|
}
|
|
}
|
|
- //未完成,接口调通后替换假数据
|
|
|
|
- // response = {
|
|
|
|
-
|
|
|
|
- // }
|
|
|
|
- // response.data.imgList = [{
|
|
|
|
- // name: 'xml1',
|
|
|
|
- // src: 'https://taohaoliang.oss-cn-beijing.aliyuncs.com/admin/75215bed1ad7408aa73d6474bfe82854.png'
|
|
|
|
- // },
|
|
|
|
- // {
|
|
|
|
- // name: 'xml2',
|
|
|
|
- // src: 'https://taohaoliang.oss-cn-beijing.aliyuncs.com/admin/75215bed1ad7408aa73d6474bfe82854.png'
|
|
|
|
- // }, {
|
|
|
|
- // name: 'xml3',
|
|
|
|
- // src: 'https://taohaoliang.oss-cn-beijing.aliyuncs.com/admin/75215bed1ad7408aa73d6474bfe82854.png'
|
|
|
|
- // }
|
|
|
|
- // ]
|
|
|
|
- // this.invoicingImgList = response.data.imgList
|
|
|
|
- // if (response.data.imgList.length > 0) {
|
|
|
|
- // for (let i = 0; i < response.data.imgList.length; i++) {
|
|
|
|
- // //创建标签下载文件
|
|
|
|
- // let a = document.createElement('a');
|
|
|
|
- // a.href = response.data.imgList[i].src;
|
|
|
|
- // let urlArr = a.href.split('.');
|
|
|
|
- // a.setAttribute('download', response.data.imgList[i].name + '.xml');
|
|
|
|
- // a.click();
|
|
|
|
- // a.remove();
|
|
|
|
- // }
|
|
|
|
- // }
|
|
|
|
})
|
|
})
|
|
.catch(() => {})
|
|
.catch(() => {})
|
|
},
|
|
},
|