刘翔宇-旅管家 4 years ago
parent e5ddfa5b1b
commit efdf1e21dd

@ -2,8 +2,8 @@
ENV = 'development' ENV = 'development'
# base api # base api
VUE_APP_DOMIAN=http://192.168.60.99:9003/ #VUE_APP_DOMIAN=http://192.168.60.99:9003/
#VUE_APP_DOMIAN=http://hdcontract.ali251.langye.net/ VUE_APP_DOMIAN=http://hdcontract.ali251.langye.net/
VUE_APP_BASE_API = '' VUE_APP_BASE_API = ''

@ -148,8 +148,10 @@
<template slot-scope="scope"> <template slot-scope="scope">
<div class="slot-btns"> <div class="slot-btns">
<template v-if="scope.row.status === 2&&scope.row.is_end===0"> <template v-if="scope.row.status === 2&&scope.row.is_end===0">
<block v-if="scope.row.is_assurance==1"><!-- --> <block v-if="scope.row.is_assurance==1">
<block v-if="scope.row.assurance_status==1"><!-- --> <!-- 如果是 履约文件-->
<block v-if="scope.row.assurance_status==1">
<!-- 那么必须财务审核通过-->
<Button class="slot-btns-item" size="small" type="primary" <Button class="slot-btns-item" size="small" type="primary"
@click="$refs['paymentRegistration'].getContract(scope.row),$refs['paymentRegistration'].isShowPaymentRegistration = true"> @click="$refs['paymentRegistration'].getContract(scope.row),$refs['paymentRegistration'].isShowPaymentRegistration = true">
付款登记 付款登记
@ -675,7 +677,7 @@
customFn: (row) => { customFn: (row) => {
{ {
return row.plans.map(item => { return row.plans.map(item => {
return ( < div > { return ( < div > [{item.year}] - {
item.name item.name
} < /div>) } < /div>)
}) })

@ -1,186 +1,403 @@
<template> <template>
<div style="padding: 0 20px;"> <div style="padding: 0 20px;">
<lx-header icon="md-apps" text="付款登记" style="margin-bottom: 10px; border: 0px; margin-top: 15px"> <lx-header icon="md-apps" text="付款登记" style="margin-bottom: 10px; border: 0px; margin-top: 15px">
<div slot="content"></div> <div slot="content"></div>
<slot> <slot>
<span style="padding: 0 6px;word-break: keep-all;">创建日期</span> <span style="padding: 0 6px;word-break: keep-all;">创建日期</span>
<span> <span>
<DatePicker :value="selectDate" placeholder="请选择日期" type="date" placement="bottom-start" style="width: 180px" @on-change="(e)=>selectDate = e"></DatePicker> <DatePicker :value="selectDate" placeholder="请选择日期" type="date" placement="bottom-start" style="width: 180px"
</span> @on-change="(e)=>selectDate = e"></DatePicker>
</span>
<span style="padding: 0 6px;word-break: keep-all;">关键字</span>
<span> <span style="padding: 0 6px;word-break: keep-all;">关键字</span>
<Input v-model="keyword" placeholder="请输入关键字" style="width: 180px"></Input> <span>
</span> <Input v-model="keyword" placeholder="请输入关键字" style="width: 180px"></Input>
</span>
<span style="padding: 0 6px;word-break: keep-all;">
状态 <span style="padding: 0 6px;word-break: keep-all;">预算计划</span>
</span>
<Select v-model="status" clearable placeholder="请选择" style="width:100px;"> <span>
<Option v-for="item in [{label:'',value:0},{label:'',value:1}]" :key="item.value" <Input v-model="select.plan_name" clearable placeholder="请选择预算计划" @on-focus="showPlanForSearch"
:value="item.value">{{ item.label }} style="width: 200px" @on-clear="clearSelectForSearch" />
</Option> </span>
</Select> <span style="padding: 0 6px;word-break: keep-all;">
<Button type="primary" style="margin-left: 10px" ghost>重置</Button> 状态
<Button type="primary" style="margin-left: 10px" @click="getFundLogs"></Button> </span>
</slot> <Select v-model="status" clearable placeholder="请选择" style="width:100px;">
</lx-header> <Option v-for="item in [{label:'待审核',value:0},{label:'已审核',value:1}]" :key="item.value" :value="item.value">
{{ item.label }}
<xy-table :list="list" :table-item="table"> </Option>
<template v-slot:btns> </Select>
<el-table-column label="操作" fixed="right" width="160" header-align="center"> <Button type="primary" style="margin-left: 10px" ghost>重置</Button>
<template slot-scope="scope"> <Button type="primary" style="margin-left: 10px" @click="doSearch()"></Button>
<template v-if="scope.row.status === 0"> </slot>
<Button size="small" type="primary" style="margin-left: 10px;margin-bottom: 4px" @click="$refs['examineRegistration'].isShow = true,$refs['examineRegistration'].getRegistration(scope.row.id)">审核确认</Button> </lx-header>
</template>
<template v-else>
<Button size="small" type="error" ghost style="margin-left: 10px;margin-bottom: 4px" @click="cancelExamine(scope.row)"></Button>
</template> <!-- 搜索使用 预算计划 -->
</template> <xy-dialog :is-show.sync="isShowPlanForSearch" title="预算计划" :width="720" @on-ok="planSelectForSearch">
</el-table-column> <template v-slot:normalContent>
</template> <Input v-model="planSearch.name" search enter-button=" " placeholder="搜索预算计划.." @on-search="searchBudgets" />
</xy-table> <div style="margin: 10px 0;display: flex;justify-content: space-between;
align-items: center;">
<div style="display: flex;justify-content: flex-end;"> <div>已选择<span style="margin-right:10px">{{select.plan_name}}</span> </div>
<Page :total="total" show-elevator @on-change="pageChange"/> <el-link type="success" @click="clearSelectForSearch"></el-link>
</div>
</div>
<examineRegistration ref="examineRegistration" @refresh="getFundLogs"></examineRegistration> <xy-table :list="plans" @rowClick="selectPlanForSearch" :show-index="false" :table-item="planTableSearch"
</div> :height="310" style="margin-top: 10px;" ref="singlePlanTable">
</template> <template v-slot:btns>
</template>
<script> </xy-table>
import {getFundLog,delFundLog,editorFundLog} from "@/api/paymentRegistration/fundLog"
import {parseTime} from "@/utils" <div style="display: flex;justify-content: flex-end;">
import {Message} from "element-ui"; <Page :total="planTotal" show-elevator @on-change="planPageChange" />
</div>
import examineRegistration from "./components/examineRegistration"; <el-tag type="warning">点击行进行选择</el-tag>
export default { </template>
components:{
examineRegistration <template v-slot:footerContent>
}, <Button type="primary" @click="confirmPlanForSearch"></Button>
data() { </template>
return { </xy-dialog>
status:0,
keyword:'', <xy-table :list="list" :table-item="table">
selectDate:'', <template v-slot:btns>
list:[], <el-table-column label="操作" fixed="right" width="160" header-align="center">
total:0, <template slot-scope="scope">
pageIndex:1, <template v-if="scope.row.status === 0">
table:[ <Button size="small" type="primary" style="margin-left: 10px;margin-bottom: 4px"
{ @click="$refs['examineRegistration'].isShow = true,$refs['examineRegistration'].getRegistration(scope.row.id)">审核确认</Button>
label:"项目名称", </template>
minWidth: 160, <template v-else>
prop:'contract.name', <Button size="small" type="error" ghost style="margin-left: 10px;margin-bottom: 4px"
fixed:'left', @click="cancelExamine(scope.row)">审核撤销</Button>
align:'left' </template>
}, </template>
{ </el-table-column>
label:"付款申请金额(元)", </template>
prop:"apply_money", </xy-table>
align:'right',
width: 170, <div style="display: flex;justify-content: flex-end;">
formatter:(v1,v2,value)=>{ <Page :total="total" show-elevator @on-change="pageChange" />
return Number(value).toFixed(2).replace(/(\d)(?=(\d{3})+\.)/g, '$1,') </div>
}
}, <examineRegistration ref="examineRegistration" @refresh="getFundLogs"></examineRegistration>
{ </div>
label:'实际付款金额(元)', </template>
prop:"act_money",
align:'right', <script>
width: 170, import {
formatter:(v1,v2,value)=>{ getFundLog,
return Number(value).toFixed(2).replace(/(\d)(?=(\d{3})+\.)/g, '$1,') delFundLog,
} editorFundLog
}, } from "@/api/paymentRegistration/fundLog"
{ import {
label:"款项类型", parseTime
prop:"type", } from "@/utils"
width: 120 import {
}, Message
{ } from "element-ui";
prop:'status', import {
label:'状态', getBudget
width: 120, } from "@/api/budget/budget"
formatter:(cell,data,value)=>{ import {
if(value === 0) return '待审核' getparameter
else return '已审核' } from "@/api/system/dictionary"
} import examineRegistration from "./components/examineRegistration";
}, export default {
{ components: {
label:"是否为最后一笔", examineRegistration
prop:"is_end", },
width: 145, data() {
formatter:(cell,data,value)=>{ return {
return value == 1 ? "是" : "否" moneyWay: [],
} plan: [],
}, planTableSearch: [{
{ label: "分类",
label:"经办人", prop: 'type',
minWidth: 160, formatter: (cell, data, value) => {
prop:'admin.name', let res = this.moneyWay.filter(item => {
align:'center' return item.id === value
}, })
{ return res[0]?.value || '未知'
label:"业务科室", },
minWidth: 160, width:120
prop:'department.name', },
align:'center' {
}, label: "年份",
{ prop: 'year',
label:"备注", align: 'center',
minWidth: 160, width:90
prop:'remark', },
align:'left' {
}, label: "名称",
{ prop: 'name',
label:"创建信息", align: 'left'
prop:"created_at", },
width:160, {
formatter:(cell,data,value)=>{ label: "计划金额",
return parseTime(new Date(value),'{y}-{m}-{d}') prop: 'money',
} align: 'right',
} width:160
] }
} ],
}, plans: [], //
methods: { planSearch: {
pageChange(e){ name: "",
this.pageIndex = e plan_department_id: ""
this.getFundLogs() },
}, planTotal: 0,
plansPageIndex: 1,
async getFundLogs(){ isShowPlanForSearch: false,
const res = await getFundLog({page_size:10,page:this.pageIndex,keyword:this.keyword,date:this.selectDate,status:this.status}) status: 0,
this.list = res.data keyword: '',
this.total = res.total select: {
}, plan_id: "",
plan_name: ""
deleteFundLog(row){ },
delFundLog({id:row.id}).then(res=>{ selectDate: '',
Message({ list: [],
type:'success', total: 0,
message:'操作成功' pageIndex: 1,
}) table: [{
this.getFundLogs() label: "项目名称",
}) minWidth: 300,
}, prop: 'contract.name',
fixed: 'left',
cancelExamine(row){ align: 'left'
editorFundLog({id:row.id,contract_id:row.contract_id,status:0}).then(res=>{ },
this.getFundLogs() {
Message({ label: "付款申请金额(元)",
type:"success", prop: "apply_money",
message:"操作成功" align: 'right',
}) width: 170,
}) formatter: (v1, v2, value) => {
} return Number(value).toFixed(2).replace(/(\d)(?=(\d{3})+\.)/g, '$1,')
}, }
mounted() { },
this.getFundLogs() {
} label: '实际付款金额(元)',
} prop: "act_money",
</script> align: 'right',
width: 170,
<style scoped lang="scss"> formatter: (v1, v2, value) => {
return Number(value).toFixed(2).replace(/(\d)(?=(\d{3})+\.)/g, '$1,')
}
},
{
label: "预算计划",
width: 320,
align: "left",
customFn: (row) => {
{
if (row.act_plan_link.length > 0) {
return row.act_plan_link.map(item => {
return ( < div > [{
item.plan.year
}] - {
item.plan.name
} < br / > [使用金额] {
item.use_money
}
< /div>)
})
}
}
}
},
{
label: "款项类型",
prop: "type",
width: 120
},
{
prop: 'status',
label: '状态',
width: 100,
formatter: (cell, data, value) => {
if (value === 0) return '待审核'
else return '已审核'
}
},
{
label: "最后一笔",
prop: "is_end",
width: 125,
formatter: (cell, data, value) => {
return value == 1 ? "是" : "否"
}
},
{
label: "经办人",
minWidth: 120,
prop: 'admin.name',
align: 'center'
},
{
label: "业务科室",
minWidth: 140,
prop: 'department.name',
align: 'center'
},
{
label: "备注",
minWidth: 360,
prop: 'remark',
align: 'left'
},
{
label: "创建信息",
prop: "created_at",
width: 160,
formatter: (cell, data, value) => {
return parseTime(new Date(value), '{y}-{m}-{d}')
}
}
]
}
},
methods: {
planPageChange(e) {
this.plansPageIndex = e
this.getBudgets()
},
//
async getMoneyWay() {
this.moneyWay = (await getparameter({
number: 'money_way'
})).detail
},
clearSelectForSearch() {
this.select.plan_id = "";
this.select.plan_name = "请选择预算计划";
},
//
searchBudgets() {
this.plansPageIndex = 1;
this.getBudgets();
},
doSearch() {
this.pageIndex = 0;
this.getFundLogs();
},
confirmPlanForSearch() {
this.isShowPlanForSearch = false;
this.getFundLogs();
},
//
toggleSelection(plans, type) {
if (plans) {
this.plans.filter(plan => {
if (plans.includes(plan.id)) {
plan.useMoney = this.plan[plans.indexOf(plan.id)].value.use_money
return true
}
}).map(row => {
this.$refs.planTable.toggleRowSelection(row)
})
} else {
this.$refs.planTable.clearSelection()
}
},
//
async getBudgets() {
let res = await getBudget({
name: this.planSearch.name,
page_size: 10,
page: this.plansPageIndex,
plan_department_id: this.planSearch.plan_department_id
})
this.plans = res.list.data
this.planTotal = res.list.total;
this.toggleSelection(this.plan.map(item => {
return item.value.plan_id
}), 1)
},
async showPlanForSearch() {
this.isShowPlanForSearch = true
await this.getBudgets();
},
//
selectPlanForSearch(sel) {
console.log(sel)
if (sel) {
this.select.plan_id = sel.id;
this.select.plan_name = "["+sel.year+"]-"+sel.name;
} else {
this.select.plan_id = "";
this.select.plan_name = "";
}
},
//
planSelectForSearch() {
if (this.select.plan_id == "") {
Message({
type: 'warning',
message: '选择计划不能为空'
})
return
}
this.isShowPlanForSearch = false
},
pageChange(e) {
this.pageIndex = e
this.getFundLogs()
},
async getFundLogs() {
const res = await getFundLog({
page_size: 10,
page: this.pageIndex,
keyword: this.keyword,
date: this.selectDate,
status: this.status,
act_plan_link_id: this.select.plan_id
})
this.list = res.data
this.total = res.total
},
deleteFundLog(row) {
delFundLog({
id: row.id
}).then(res => {
Message({
type: 'success',
message: '操作成功'
})
this.getFundLogs()
})
},
cancelExamine(row) {
editorFundLog({
id: row.id,
contract_id: row.contract_id,
status: 0
}).then(res => {
this.getFundLogs()
Message({
type: "success",
message: "操作成功"
})
})
}
},
mounted() {
this.getMoneyWay();
this.getFundLogs()
}
}
</script>
<style scoped lang="scss">
</style> </style>

Loading…
Cancel
Save