刘翔宇-旅管家 3 years ago
parent d4b2228cb3
commit fdfce58994

@ -10,6 +10,14 @@
<Input v-model="select.keyword" clearable placeholder="关键字搜索" style="width: 200px" /> <Input v-model="select.keyword" clearable placeholder="关键字搜索" style="width: 200px" />
</span> </span>
</div> </div>
<div>
<span style="padding: 0 6px;word-break: keep-all;">服务商/供应商</span>
<span>
<Input v-model="select.supply" clearable placeholder="请输入服务商/供应商" style="width: 200px" />
</span>
</div>
<div> <div>
<span style="padding: 0 6px;word-break: keep-all;">预算计划</span> <span style="padding: 0 6px;word-break: keep-all;">预算计划</span>
@ -136,6 +144,7 @@
@click=" select = {showDatePicker:'',ageIndex:1,startDate:'',endDate:'',type:'',department:'',purchaseModality:'',purchaseMethods:'',priceMin:null,priceMax:null,status:''}"> @click=" select = {showDatePicker:'',ageIndex:1,startDate:'',endDate:'',type:'',department:'',purchaseModality:'',purchaseMethods:'',priceMin:null,priceMax:null,status:''}">
重置 重置
</Button> </Button>
<Button type="primary" @click="toExport()" style="margin-left: 10px">导出</Button>
<!-- <Button type="primary" style="margin-left: 10px">导出</Button>--> <!-- <Button type="primary" style="margin-left: 10px">导出</Button>-->
</div> </div>
</slot> </slot>
@ -314,7 +323,8 @@
<span style="color: red;font-weight: 600;padding-right: 4px;">*</span>是否为代建项目 <span style="color: red;font-weight: 600;padding-right: 4px;">*</span>是否为代建项目
</div> </div>
<div class="xy-table-item-content"> <div class="xy-table-item-content">
<el-switch v-model="form.is_substitute" active-text="" inactive-text="" :active-value="1" :inactive-value="0"/> <el-switch v-model="form.is_substitute" active-text="" inactive-text="" :active-value="1"
:inactive-value="0" />
</div> </div>
</div> </div>
</template> </template>
@ -446,7 +456,9 @@
import { import {
getInfo getInfo
} from '@/api/user.js' } from '@/api/user.js'
import {
getToken
} from '@/utils/auth'
import editor from "./components/editorContract" import editor from "./components/editorContract"
import detail from "./components/detailContract" import detail from "./components/detailContract"
import paymentRegistration from "./components/paymentRegistration"; import paymentRegistration from "./components/paymentRegistration";
@ -575,7 +587,7 @@
width: 140, width: 140,
prop: 'req_status', prop: 'req_status',
formatter: (cell, data, value) => { formatter: (cell, data, value) => {
if(cell.is_substitute){ if (cell.is_substitute) {
return '无' return '无'
} }
if (cell.is_plan === 1) { if (cell.is_plan === 1) {
@ -602,7 +614,7 @@
width: 158, width: 158,
prop: 'purchase_status', prop: 'purchase_status',
formatter: (cell, data, value) => { formatter: (cell, data, value) => {
if(cell.is_substitute){ if (cell.is_substitute) {
return '无' return '无'
} }
switch (value) { switch (value) {
@ -626,7 +638,7 @@
width: 145, width: 145,
prop: 'invite_status', prop: 'invite_status',
formatter: (cell, data, value) => { formatter: (cell, data, value) => {
if(cell.is_substitute){ if (cell.is_substitute) {
return '无' return '无'
} }
if (cell.purchase_way.remark === 'false') { if (cell.purchase_way.remark === 'false') {
@ -795,6 +807,12 @@
return value + '期' return value + '期'
} }
}, },
{
label: "供应商/服务商",
width: 220,
prop: 'supply',
align: "left"
},
{ {
label: "业务科室", label: "业务科室",
width: 140, width: 140,
@ -928,7 +946,7 @@
fundingChannels: [], fundingChannels: [],
isBudget: true, isBudget: true,
plan: [], plan: [],
is_substitute:0, is_substitute: 0,
}, },
plan: [], plan: [],
rules: { rules: {
@ -979,6 +997,10 @@
} }
}, },
methods: { methods: {
toExport() {
this.select.is_export = 1;
this.getContracts(true);
},
clearSelectForSearch() { clearSelectForSearch() {
this.select.plan_id = ""; this.select.plan_id = "";
this.select.plan_name = "请选择预算计划"; this.select.plan_name = "请选择预算计划";
@ -1003,7 +1025,7 @@
return return
} }
let money = Number(row.update_money) == 0 ? Number(row.money) : Number(row.update_money); let money = Number(row.update_money) == 0 ? Number(row.money) : Number(row.update_money);
console.log(e,money,row.use_money_total) console.log(e, money, row.use_money_total)
console.log(e <= (money - Number(row.use_money_total))) console.log(e <= (money - Number(row.use_money_total)))
if (e <= (money - Number(row.use_money_total))) { if (e <= (money - Number(row.use_money_total))) {
row.useMoney = e row.useMoney = e
@ -1094,7 +1116,7 @@
} }
} }
if (column.property === 'purchase_status') { if (column.property === 'purchase_status') {
if(row.is_substitute){ if (row.is_substitute) {
return { return {
'color': 'rgb(140,140,140)' 'color': 'rgb(140,140,140)'
} }
@ -1323,7 +1345,7 @@
this.getContracts(); this.getContracts();
}, },
// //
async getContracts() { async getContracts(is_export) {
const res = await getContract({ const res = await getContract({
page_size: this.select.pageSize, page_size: this.select.pageSize,
@ -1332,6 +1354,19 @@
...this.select ...this.select
}) })
let tokens = getToken();
if (is_export) {
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.list = res.list.data
this.total = res.list.total this.total = res.list.total
this.tableTotal.fundLogTotal = res.fund_log_total this.tableTotal.fundLogTotal = res.fund_log_total
@ -1481,7 +1516,7 @@
contract_plan_links: this.form.plan.map(item => { contract_plan_links: this.form.plan.map(item => {
return item.value return item.value
}), }),
is_substitute:this.form.is_substitute is_substitute: this.form.is_substitute
}).then(res => { }).then(res => {
this.isShowAdd = false this.isShowAdd = false
Message({ Message({

@ -10,6 +10,12 @@
<Input v-model="select.keyword" clearable placeholder="关键字搜索" style="width: 200px" /> <Input v-model="select.keyword" clearable placeholder="关键字搜索" style="width: 200px" />
</span> </span>
</div> </div>
<div>
<span style="padding: 0 6px;word-break: keep-all;">服务商/供应商</span>
<span>
<Input v-model="select.supply" clearable placeholder="请输入服务商/供应商" style="width: 200px" />
</span>
</div>
<div> <div>
<span style="padding: 0 6px;word-break: keep-all;">预算计划</span> <span style="padding: 0 6px;word-break: keep-all;">预算计划</span>
@ -737,6 +743,12 @@
width: 140, width: 140,
prop: 'admin.name' prop: 'admin.name'
}, },
{
label: "供应商/服务商",
width: 220,
prop: 'supply',
align: "left"
},
{ {
label: "签订日期", label: "签订日期",
width: 160, width: 160,

Loading…
Cancel
Save