|
|
|
|
@ -146,7 +146,7 @@
|
|
|
|
|
@click=" select = {showDatePicker:'',ageIndex:1,startDate:'',endDate:'',type:'',department:'',purchaseModality:'',purchaseMethods:'',priceMin:null,priceMax:null,status:''}">
|
|
|
|
|
重置
|
|
|
|
|
</Button>
|
|
|
|
|
<Button type="primary" @click="toExport()" style="margin-left: 10px">导出</Button>
|
|
|
|
|
<Button type="primary" @click="downloadExel()" style="margin-left: 10px">导出</Button>
|
|
|
|
|
<!-- <Button type="primary" style="margin-left: 10px">导出</Button>-->
|
|
|
|
|
</div>
|
|
|
|
|
</slot>
|
|
|
|
|
@ -503,7 +503,10 @@ import detail from "./components/detailContract"
|
|
|
|
|
import paymentRegistration from "./components/paymentRegistration";
|
|
|
|
|
import contractSign from "@/views/contract/components/contractSign";
|
|
|
|
|
import contractPaymentRegistration from "@/views/contract/components/contractPaymentRegistration";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import {
|
|
|
|
|
download
|
|
|
|
|
} from '@/utils/downloadRequest'
|
|
|
|
|
export default {
|
|
|
|
|
components: {
|
|
|
|
|
editor,
|
|
|
|
|
@ -1509,6 +1512,20 @@ export default {
|
|
|
|
|
this.select.pageIndex = 1;
|
|
|
|
|
this.getContracts();
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
downloadExel() {
|
|
|
|
|
|
|
|
|
|
download(
|
|
|
|
|
'/api/admin/contract/index',
|
|
|
|
|
'get', {
|
|
|
|
|
is_auth: 1,
|
|
|
|
|
is_export: 1,
|
|
|
|
|
...this.select
|
|
|
|
|
},
|
|
|
|
|
'合同列表.xlsx')
|
|
|
|
|
},
|
|
|
|
|
//获取合同列表
|
|
|
|
|
async getContracts(is_export) {
|
|
|
|
|
|
|
|
|
|
@ -1520,18 +1537,18 @@ export default {
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
let tokens = getToken();
|
|
|
|
|
if (is_export) {
|
|
|
|
|
this.select.is_export == 1
|
|
|
|
|
var url = "/api/admin/contract/index?is_auth=1&token=" + tokens
|
|
|
|
|
Object.keys(this.select).map((key, item) => {
|
|
|
|
|
url += "&" + key + "=" + this.select[key];
|
|
|
|
|
});
|
|
|
|
|
url = location.host + url;
|
|
|
|
|
console.log(url)
|
|
|
|
|
window.open("http://" + url, '_blank')
|
|
|
|
|
this.select.is_export = 0
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
// if (is_export) {
|
|
|
|
|
// this.select.is_export == 1
|
|
|
|
|
// var url = "/api/admin/contract/index?is_auth=1&token=" + tokens
|
|
|
|
|
// Object.keys(this.select).map((key, item) => {
|
|
|
|
|
// url += "&" + key + "=" + this.select[key];
|
|
|
|
|
// });
|
|
|
|
|
// url = location.host + url;
|
|
|
|
|
// console.log(url)
|
|
|
|
|
// window.open("http://" + url, '_blank')
|
|
|
|
|
// this.select.is_export = 0
|
|
|
|
|
// return;
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
this.list = res.list.data
|
|
|
|
|
this.total = res.list.total
|
|
|
|
|
|