master
xy 2 years ago
parent 6c3026aa49
commit 76b5cb86e3

@ -119,6 +119,9 @@ export default {
}, },
toggleAllSelection(){ toggleAllSelection(){
this.$refs.table.toggleAllSelection() this.$refs.table.toggleAllSelection()
},
setCurrentRow (row) {
this.$refs.table.setCurrentRow(row)
} }
}, },
created() { created() {

@ -58,6 +58,16 @@
</div> </div>
</div> </div>
</template> </template>
<template #act_date>
<div class="xy-table-item">
<div class="xy-table-item-label">实付日期
</div>
<div class="xy-table-item-content">
<el-date-picker v-model="paymentRegistrationForm.act_date" value-format="yyyy-MM-dd" style="width: 150px;">
</el-date-picker>
</div>
</div>
</template>
<template v-slot:applyMoney> <template v-slot:applyMoney>
<div class="xy-table-item"> <div class="xy-table-item">
<div class="xy-table-item-label"> <div class="xy-table-item-label">
@ -210,6 +220,7 @@
applyMoney: "", applyMoney: "",
deductionMoney: "", deductionMoney: "",
audit_money: "", audit_money: "",
act_date: `${this.$moment(new Date()).format('YYYY-MM-DD')}`,
type: "", type: "",
isLast: false, isLast: false,
plan: [], plan: [],

@ -131,7 +131,7 @@
</el-card> </el-card>
<div class="demo-split"> <div class="demo-split">
<div v-for="(sitem, index) in this.typeList"> <div v-for="(sitem, index) in typeList">
<Split v-model="split" style="height: 580px"> <Split v-model="split" style="height: 580px">
<template #left> <template #left>
<div class="demo-split-pane" style="padding-right: 5px"> <div class="demo-split-pane" style="padding-right: 5px">
@ -325,6 +325,15 @@ export default {
return `¥ ${value}`.replace(/\B(?=(\d{3})+(?!\d))/g, ","); return `¥ ${value}`.replace(/\B(?=(\d{3})+(?!\d))/g, ",");
}, },
}, },
{
label: "已付金额",
width: 160,
prop: "fund_log_total",
align: "right",
formatter: (cell, data, value) => {
return `¥ ${value}`.replace(/\B(?=(\d{3})+(?!\d))/g, ",");
},
},
{ {
prop: "supply", prop: "supply",
label: "承包商/供货商", label: "承包商/供货商",
@ -343,15 +352,6 @@ export default {
); );
}, },
}, },
{
label: "已付金额",
width: 160,
prop: "fund_log_total",
align: "right",
formatter: (cell, data, value) => {
return `¥ ${value}`.replace(/\B(?=(\d{3})+(?!\d))/g, ",");
},
},
], ],
departmentTotal: [], departmentTotal: [],
departmentTotalTable: [ departmentTotalTable: [
@ -1045,10 +1045,9 @@ export default {
async getNopay() { async getNopay() {
const res = await nopayTotal({ const res = await nopayTotal({
is_auth: 1, is_auth: 1,
year: this.select.year //year: this.select.year
}); });
this.nopay = res; this.nopay = res.filter(i => i.momey != 0);
console.log(222, this.nopay);
}, },
async getDepartmnetTotal() { async getDepartmnetTotal() {
const res = await departmentTotal({ const res = await departmentTotal({

@ -68,6 +68,17 @@
</div> </div>
</div> </div>
</template> </template>
<template #act_date>
<div class="xy-table-item">
<div class="xy-table-item-label">
<span style="color: red;font-weight: 600;padding-right: 4px;">*</span>实付日期
</div>
<div class="xy-table-item-content">
<el-date-picker readonly v-model="paymentRegistrationForm.act_date" value-format="yyyy-MM-dd" style="width: 150px;">
</el-date-picker>
</div>
</div>
</template>
<template v-slot:applyMoney> <template v-slot:applyMoney>
<div class="xy-table-item"> <div class="xy-table-item">
<div class="xy-table-item-label"> <div class="xy-table-item-label">
@ -229,11 +240,12 @@
paymentRegistrationForm: { paymentRegistrationForm: {
applyMoney: "", applyMoney: "",
deductionMoney: "", deductionMoney: "",
audit_money: "",
act_date: `${this.$moment(new Date()).format('YYYY-MM-DD')}`,
type: "", type: "",
//isLast:false, isLast: false,
plan: [], plan: [],
actMoney: '', remark: ""
moneyWay: [], //
}, },
paymentRegistrationRules: { paymentRegistrationRules: {
applyMoney: [{ applyMoney: [{
@ -427,6 +439,7 @@
id id
}) })
this.paymentRegistrationForm.type = res.type this.paymentRegistrationForm.type = res.type
this.paymentRegistrationForm.act_date = res.act_date
this.paymentRegistrationForm.isLast = res.is_end === 1 this.paymentRegistrationForm.isLast = res.is_end === 1
this.paymentRegistrationForm.deductionMoney = res.apply_money this.paymentRegistrationForm.deductionMoney = res.apply_money
this.paymentRegistrationForm.applyMoney = res.apply_money this.paymentRegistrationForm.applyMoney = res.apply_money
@ -485,6 +498,7 @@
contract_id: this.contract.id, contract_id: this.contract.id,
act_money: this.paymentRegistrationForm.actMoney, act_money: this.paymentRegistrationForm.actMoney,
status: 1, status: 1,
act_date: this.paymentRegistrationForm.act_date,
money_way_id: this.paymentRegistrationForm.moneyWay.toString(), money_way_id: this.paymentRegistrationForm.moneyWay.toString(),
contract_plan_act_links: this.paymentRegistrationForm.plan contract_plan_act_links: this.paymentRegistrationForm.plan
}).then(res => { }).then(res => {

@ -56,7 +56,7 @@
</div> </div>
</div> </div>
</template> </template>
<template v-slot:public_plane_date> <template v-slot:public_plane_date v-if="role == 0">
<div class="xy-table-item"> <div class="xy-table-item">
<div class="xy-table-item-label">采购意向公开计划时间 </div> <div class="xy-table-item-label">采购意向公开计划时间 </div>
<div class="xy-table-item-content"> <div class="xy-table-item-content">
@ -69,7 +69,7 @@
</div> </div>
</div> </div>
</template> </template>
<template v-slot:public_act_date> <template v-slot:public_act_date v-if="role == 1">
<div class="xy-table-item"> <div class="xy-table-item">
<div class="xy-table-item-label">采购意向公开实际时间 </div> <div class="xy-table-item-label">采购意向公开实际时间 </div>
<div class="xy-table-item-content"> <div class="xy-table-item-content">
@ -82,7 +82,7 @@
</div> </div>
</div> </div>
</template> </template>
<template v-slot:invite_plane_date> <template v-slot:invite_plane_date v-if="role == 0">
<div class="xy-table-item"> <div class="xy-table-item">
<div class="xy-table-item-label">招标文件挂网计划时间 </div> <div class="xy-table-item-label">招标文件挂网计划时间 </div>
<div class="xy-table-item-content"> <div class="xy-table-item-content">
@ -95,7 +95,7 @@
</div> </div>
</div> </div>
</template> </template>
<template v-slot:invite_act_date> <template v-slot:invite_act_date v-if="role == 1">
<div class="xy-table-item"> <div class="xy-table-item">
<div class="xy-table-item-label">招标文件挂网实际时间 </div> <div class="xy-table-item-label">招标文件挂网实际时间 </div>
<div class="xy-table-item-content"> <div class="xy-table-item-content">
@ -108,7 +108,7 @@
</div> </div>
</div> </div>
</template> </template>
<template v-slot:open_plane_date> <template v-slot:open_plane_date v-if="role == 0">
<div class="xy-table-item"> <div class="xy-table-item">
<div class="xy-table-item-label">项目开标计划时间 </div> <div class="xy-table-item-label">项目开标计划时间 </div>
<div class="xy-table-item-content"> <div class="xy-table-item-content">
@ -121,7 +121,7 @@
</div> </div>
</div> </div>
</template> </template>
<template v-slot:open_act_date> <template v-slot:open_act_date v-if="role == 1">
<div class="xy-table-item"> <div class="xy-table-item">
<div class="xy-table-item-label">项目开标实际时间 </div> <div class="xy-table-item-label">项目开标实际时间 </div>
<div class="xy-table-item-content"> <div class="xy-table-item-content">
@ -134,16 +134,174 @@
</div> </div>
</div> </div>
</template> </template>
<template #plan_id>
<div class="xy-table-item">
<div class="xy-table-item-label">
关联预算计划
</div>
<div class="xy-table-item-content">
<div
class="contract-add-plan"
style="width: 300px"
@click="isShowPlan = true"
>
<template>
<el-input
readonly
:value="form.plan ? form.plan.name : form.plan_id"
clearable
placeholder="请选择关联计划"
style="width: 300px"
@focus="isShowPlan = true"
></el-input>
</template>
</div>
</div>
</div>
</template>
</xy-dialog>
<!-- 新增表 预算计划 -->
<xy-dialog
:is-show.sync="isShowPlan"
:width="720"
title="预算计划"
@on-ok="isShowPlan = false"
>
<template v-slot:normalContent>
<div style="display: flex">
<el-select
placeholder="科室选择"
clearable
size="small"
v-model="planSearch.plan_department_id"
style="width: 160px"
>
<el-option
v-for="item in departments"
:label="item.name"
:value="item.id"
:key="item.id"
>
</el-option>
</el-select>
<Input
v-model="planSearch.name"
enter-button="搜 索"
placeholder="搜索预算计划.."
search
@on-search="searchBudgets"
/>
</div>
<xy-table
highlight-current-row
ref="planTable"
:height="300"
:list="plans"
:show-index="false"
:table-item="planTable"
style="margin-top: 10px"
@cellClick="row => { form.plan_id = row.id;form.plan = row; }"
>
<template #btns>
</template>
</xy-table>
<div style="display: flex; justify-content: flex-end">
<Page :total="planTotal" show-elevator @on-change="e => { planSearch.page = e;getBudgets(); }" />
</div>
</template>
<template v-slot:footerContent>
<Button type="primary" @click="isShowPlan = false">确定</Button>
</template>
</xy-dialog> </xy-dialog>
</div> </div>
</template> </template>
<script> <script>
import { show, save, store } from "@/api/govPlane"; import { show, save, store } from "@/api/govPlane";
import {getBudget} from "@/api/budget/budget";
import {listdeptNoAuth} from "@/api/system/department";
import {getparameter} from "@/api/system/dictionary";
export default { export default {
props: {}, props: {
role: Number
},
data() { data() {
return { return {
isShowPlan: false,
departments: [],
moneyWay: [],
planTotal: 0,
plans: [],
planSearch: {
name: "",
plan_department_id: "",
page: 1,
page_size: 10,
top_pid: 1
},
planTable: [
{
label: "分类",
prop: "type",
formatter: (cell, data, value) => {
let res = this.moneyWay.filter((item) => {
return item.id === value;
});
return res[0]?.value || "未知";
},
width: 100,
fixed: "left",
},
{
label: "科室",
prop: "plan_department.name",
width: 100,
align: "center",
},
{
label: "年份",
prop: "year",
width: 80,
align: "center",
},
{
label: "隶属",
prop: "pid_info.name",
width: 180,
align: "left",
},
{
label: "名称",
prop: "name",
width: 320,
align: "left",
},
{
label: "计划金额",
prop: "money",
align: "right",
width: 120,
customFn: (row) => {
let m1 = row.money;
let m2 = row.update_money;
return m2 == 0 ? m1 : m2;
},
},
{
label: "已用金额",
prop: "use_money_total",
width: 120,
align: "right",
},
],
isShow: false, isShow: false,
id: "", id: "",
type: "", type: "",
@ -158,6 +316,8 @@ export default {
invite_act_date: "", invite_act_date: "",
open_plane_date: "", open_plane_date: "",
open_act_date: "", open_act_date: "",
plan_id: "",
plan: {}
}, },
rules: { rules: {
name: [ name: [
@ -260,6 +420,43 @@ export default {
}); });
} }
}, },
//
async getDepartment() {
this.departments = await listdeptNoAuth();
},
//
async getMoneyWay() {
this.moneyWay = (
await getparameter({
number: "money_way",
})
).detail;
},
//
planSelect(row) {
console.log(row)
// if (this.plan.length === 0) {
// this.$message({
// type: "warning",
// message: "",
// });
// return;
// }
//
// this.isShowPlan = false;
},
searchBudgets() {
this.getBudgets();
},
//
async getBudgets() {
let res = await getBudget(this.planSearch);
this.plans = res.list.data;
this.planTotal = res.list.total;
},
}, },
watch: { watch: {
isShow(val) { isShow(val) {
@ -275,7 +472,17 @@ export default {
delete this.form.id; delete this.form.id;
} }
}, },
isShowPlan(val) {
if (val) {
this.$refs['planTable'].setCurrentRow(this.plans.find(row => row.id === this.form.plan_id))
}
}
}, },
created() {
this.getMoneyWay();
this.getDepartment();
this.getBudgets();
}
}; };
</script> </script>

@ -34,6 +34,7 @@
</lx-header> </lx-header>
<xy-table <xy-table
:cell-style="cellStyle"
:list="list" :list="list"
:table-item="table" :table-item="table"
@ -62,7 +63,7 @@
/> />
</div> </div>
<addGovPlane ref="addGovPlane" @refresh="getList"></addGovPlane> <addGovPlane ref="addGovPlane" :role="type" @refresh="getList"></addGovPlane>
</div> </div>
</template> </template>
@ -75,7 +76,7 @@ export default {
}, },
data() { data() {
return { return {
type: 0, type: 0,//01
select: { select: {
page: 1, page: 1,
page_size: 10, page_size: 10,
@ -93,6 +94,7 @@ export default {
prop: "name", prop: "name",
label: "项目名称", label: "项目名称",
width: 180, width: 180,
align: 'left'
}, },
{ {
prop: "content", prop: "content",
@ -114,7 +116,7 @@ export default {
label: "采购意向公开计划时间", label: "采购意向公开计划时间",
width: 190, width: 190,
formatter: (cell, data, value) => { formatter: (cell, data, value) => {
return this.$moment(new Date(value)).format("YYYY年MM月DD"); return value ? this.$moment(new Date(value)).format("YYYY年MM月DD") : '未完成';
}, },
}, },
{ {
@ -122,7 +124,7 @@ export default {
label: "采购意向公开实际时间", label: "采购意向公开实际时间",
width: 190, width: 190,
formatter: (cell, data, value) => { formatter: (cell, data, value) => {
return this.$moment(new Date(value)).format("YYYY年MM月DD"); return value ? this.$moment(new Date(value)).format("YYYY年MM月DD") : '未完成';
}, },
}, },
{ {
@ -130,7 +132,7 @@ export default {
label: "招标文件挂网计划时间", label: "招标文件挂网计划时间",
width: 190, width: 190,
formatter: (cell, data, value) => { formatter: (cell, data, value) => {
return this.$moment(new Date(value)).format("YYYY年MM月DD"); return value ? this.$moment(new Date(value)).format("YYYY年MM月DD") : '未完成';
}, },
}, },
{ {
@ -138,7 +140,7 @@ export default {
label: "招标文件挂网实际时间", label: "招标文件挂网实际时间",
width: 190, width: 190,
formatter: (cell, data, value) => { formatter: (cell, data, value) => {
return this.$moment(new Date(value)).format("YYYY年MM月DD"); return value ? this.$moment(new Date(value)).format("YYYY年MM月DD") : '未完成';
}, },
}, },
{ {
@ -146,7 +148,7 @@ export default {
label: "项目开标计划时间", label: "项目开标计划时间",
width: 180, width: 180,
formatter: (cell, data, value) => { formatter: (cell, data, value) => {
return this.$moment(new Date(value)).format("YYYY年MM月DD"); return value ? this.$moment(new Date(value)).format("YYYY年MM月DD") : '未完成';
}, },
}, },
{ {
@ -154,13 +156,37 @@ export default {
label: "项目开标实际时间", label: "项目开标实际时间",
width: 180, width: 180,
formatter: (cell, data, value) => { formatter: (cell, data, value) => {
return this.$moment(new Date(value)).format("YYYY年MM月DD"); return value ? this.$moment(new Date(value)).format("YYYY年MM月DD") : '未完成';
}, },
}, },
{
prop: 'plan.name',
label: '关联计划',
width: 220,
align: 'left'
},
{
prop: 'department.name',
label: '部门',
width: 150
}
], ],
}; };
}, },
methods: { methods: {
cellStyle ({ column }) {
if (/计划时间/g.test(column.label)) {
return {
background: 'rgba(200,0,0,.1)'
}
}
if (/实际时间/g.test(column.label)) {
return {
background: 'rgba(0,200,0,.1)'
}
}
},
async getList() { async getList() {
const res = await index(this.select); const res = await index(this.select);
this.total = res.total; this.total = res.total;

Loading…
Cancel
Save