预算计划

master
lion 5 months ago
parent f0e9b7f452
commit 87f19361a0

@ -17,7 +17,7 @@
type="year"
@on-change="(e) => {
planSelect.year = e
getBudgets()
getBudgets(true)
}"
></DatePicker>
<el-select
@ -26,7 +26,7 @@
size="small"
v-model="planSelect.plan_department_id"
style="width: 180px;margin-right: 10px;"
@change="getBudgets"
@change="getBudgets(true)"
>
<el-option
v-for="item in departments"
@ -50,7 +50,7 @@
style="width: 220px;margin-right: 10px;"
@change="(e) => {
planSelect.type = e[e.length - 1] || '';
getBudgets();
getBudgets(true);
}"
/>
<Input
@ -59,10 +59,11 @@
enter-button="搜 索"
clearable
placeholder="搜索预算计划.."
@on-search="getBudgets"
@on-search="getBudgets(true)"
/>
</div>
<xy-table
:header-cell-class-name="cellClassName"
:list="plans"
:show-index="false"
:table-item="planTable"
@ -145,7 +146,7 @@ export default {
reserveSelection: true,
fixed: "left",
selectable: (row, index) => {
return row.pid != 0;
return row.pid > 0;
},
},
{
@ -211,16 +212,49 @@ export default {
planPick (selection, row) {
if (row.year != new Date().getFullYear()) {
this.$confirm("您选择了非本年预算,是否继续?").catch(_ => {
this.$refs['editorPlanTable'].toggleRowSelection(row)
if (selection.length > 1) {
//
this.$refs.editorPlanTable.clearSelection();
this.$refs.editorPlanTable.toggleRowSelection(selection[selection.length - 1]);
}
})
}else{
if (selection.length > 1) {
//
this.$refs.editorPlanTable.clearSelection();
this.$refs.editorPlanTable.toggleRowSelection(selection[selection.length - 1]);
}
}
},
//
async getBudgets() {
cellClassName({row,column,rowIndex,columnIndex}){
if(columnIndex===0){
return 'allSelect'
}
},
initInputMoney(list) {
if (!Array.isArray(list)) return [];
return list.map(item => {
// 使 Vue.set
this.$set(item, '_inputMoney', 0);
if (Array.isArray(item.children)) {
item.children = this.initInputMoney(item.children);
}
return item;
});
},
async getBudgets(refresh) {
let res = await getBudget(this.planSelect);
res.list.forEach((item) => (item._inputMoney = 0));
// res.list.forEach((item) => (item._inputMoney = 0));
this.initInputMoney(res.list)
this.plans = res.list;
this.planTotal = res.list.total || 0;
if(refresh){
this.$refs["editorPlanTable"].clearSelection();
}
},
getDepartment() {
@ -291,6 +325,12 @@ export default {
</script>
<style scoped lang="scss">
::v-deep .ivu-input-group-append.ivu-input-search{
background-color: #409EFF;
}
::v-deep .allSelect .cell {
display: none;
}
.page {
padding: 10px;
height: 100%;

@ -315,7 +315,8 @@ export default {
computed: {},
mounted() {
this.$nextTick(() => {
this.boxHeight = window.innerHeight - document.querySelector('.select-container')?.getBoundingClientRect()?.height - document.querySelector('.pagination')?.getBoundingClientRect()?.height - 50
// document.querySelector('.pagination')?.getBoundingClientRect()?.height
this.boxHeight = window.innerHeight - document.querySelector('.select-container')?.getBoundingClientRect()?.height - 50
console.log(this.boxHeight, 'box')
})
},
@ -330,6 +331,9 @@ export default {
</script>
<style scoped lang="scss">
::v-deep .ivu-input-group-append.ivu-input-search{
background-color: #409EFF;
}
.page {
padding: 10px;
height: 100%;

@ -13,7 +13,7 @@
type="year"
@on-change="(e) => {
planSelect.year = e
getBudgets()
getBudgets(true)
}"
></DatePicker>
<el-select
@ -22,7 +22,7 @@
size="small"
v-model="planSelect.plan_department_id"
style="width: 180px;margin-right: 10px;"
@change="getBudgets"
@change="getBudgets(true)"
>
<el-option
v-for="item in departments"
@ -46,7 +46,7 @@
style="width: 220px;margin-right: 10px;"
@change="(e) => {
planSelect.type = e[e.length - 1] || '';
getBudgets();
getBudgets(true);
}"
/>
<Input
@ -55,7 +55,7 @@
enter-button="搜 索"
clearable
placeholder="搜索预算计划.."
@on-search="getBudgets"
@on-search="getBudgets(true)"
/>
</div>
<xy-table
@ -70,7 +70,7 @@
border
default-expand-all
@select="planPick"
:tree-props="{ children: 'notChildren', hasChildren: 'hasChildren' }"
:tree-props="{ children: 'children', hasChildren: 'hasChildren' }"
>
<template v-slot:btns>
<el-table-column
@ -79,7 +79,7 @@
header-align="center"
width="144"
>
<template slot-scope="scope" v-if="scope.row.pid === 0">
<template slot-scope="scope" v-if="scope.row.pid > 0">
<InputNumber
style="width: 120px"
:min="0"
@ -134,6 +134,7 @@ export default {
data() {
return {
isShowPlanModal:false,
isMuplite:false,// 0
myFlowModId: '',
boxHeight: 0,
planTypes: [],
@ -156,9 +157,17 @@ export default {
reserveSelection: true,
fixed: "left",
selectable: (row, index) => {
return row.pid === 0;
return row.pid > 0;
},
},
// {
// label: "pid",
// prop: "pid",
// },
// {
// label: "id",
// prop: "id",
// },
{
label: "科室",
prop: "plan_department.name",
@ -218,34 +227,80 @@ export default {
planTotal: 0,
}
},
watch:{
isShowPlanModal(newVal){
if(newVal){
this.getBudgets(true)
}else{
this.$refs.editorPlanTable.clearSelection();
this.isMuplite = false
this.plans = []
this.planSelect = {
name: "",
page_size: 20,
page: 1,
is_tree: 1,
year: new Date().getFullYear().toString(),
plan_department_id: "",
type: ""
}
}
}
},
methods: {
planPick (selection, row) {
console.log("selection",selection)
if (row.year != new Date().getFullYear()) {
this.$confirm("您选择了非本年预算,是否继续?").catch(_ => {
if(!this.isMuplite){
if (selection.length > 1) {
//
this.$refs.editorPlanTable.clearSelection();
this.$refs.editorPlanTable.toggleRowSelection(selection[selection.length - 1]);
}
}
})
}else{
if(!this.isMuplite){
if (selection.length > 1) {
//
this.$refs.editorPlanTable.clearSelection();
this.$refs.editorPlanTable.toggleRowSelection(selection[selection.length - 1]);
}
})
}else{
if (selection.length > 1) {
//
this.$refs.editorPlanTable.clearSelection();
this.$refs.editorPlanTable.toggleRowSelection(selection[selection.length - 1]);
}
}
},
//
async getBudgets() {
//
initInputMoney(list) {
if (!Array.isArray(list)) return [];
return list.map(item => {
// 使 Vue.set
this.$set(item, '_inputMoney', 0);
if (Array.isArray(item.children)) {
item.children = this.initInputMoney(item.children);
}
return item;
});
},
async getBudgets(refresh) {
let res = await getBudget(this.planSelect);
// this.$refs.editorPlanTable.clearSelection();
res.list.forEach((item) => (item._inputMoney = 0));
// res.list.forEach((item) => (item._inputMoney = 0));
this.initInputMoney(res.list)
this.plans = res.list;
this.planTotal = res.list.total || 0;
console.log("this.plans",this.plans)
if(refresh){
this.$refs.editorPlanTable.clearSelection();
}
// this.toggleBudgetByFlowModId()
},
@ -277,7 +332,6 @@ export default {
if(columnIndex===0){
return 'allSelect'
}
},
getSelections() {
const selections = this.$refs["editorPlanTable"].getSelection();
@ -286,20 +340,35 @@ export default {
this.$message.warning('请选择一条预算计划')
return
}
if(selections.length>1){
this.$message.warning('只能选择一条预算计划')
return
if(!this.isMuplite){
if(selections.length>1){
this.$message.warning('只能选择一条预算计划')
return
}
}
if (selections?.length > 0) {
// if (this.$route.query.isNeedMoney) {
for (let i of selections) {
if(!i._inputMoney){
if (i._inputMoney < 0) {
this.$message({
type: "warning",
message: `${i.year}${i.name} 使用金额需要大于0`,
});
return;
// 0
if(this.isMuplite){
if (i._inputMoney <= 0) {
this.$message({
type: "warning",
message: `${i.year}${i.name} 使用金额需要大于0`,
});
return;
}
}else{
if (i._inputMoney < 0) {
this.$message({
type: "warning",
message: `${i.year}${i.name} 使用金额需要大于0`,
});
return;
}
}
if (i._inputMoney > ((Number(i.money) || Number(i.update_money)) - Number(i.has_money_total))) {
this.$message({
@ -357,7 +426,7 @@ export default {
// window.$getPlans = this.getSelections
this.getPlanTypes()
this.getDepartment()
this.getBudgets()
// this.getBudgets()
}
}
</script>
@ -375,4 +444,7 @@ export default {
::v-deep .allSelect .cell {
display: none;
}
::v-deep .ivu-input-group-append.ivu-input-search{
background-color: #409EFF;
}
</style>

@ -23,6 +23,7 @@ const getDefaultState = () => {
adminId: '',
department: {},
role: [],
roles:[]
}
}
@ -44,6 +45,9 @@ const mutations = {
SET_ROLE: (state, role) => {
state.role = role
},
SET_ROLES: (state, roles) => {
state.roles = roles
},
SET_ADMIN_ID: (state, id) => {
state.adminId = id
},
@ -118,13 +122,18 @@ const actions = {
if (!response) {
reject('身份验证失败请重新登录')
}
const { name, avatar, id, role, department, username } = response
const { name, avatar, id, role,roles, department, username } = response
let rolseArr = []
roles.map(item=>{
rolseArr.push(item.name)
})
commit('SET_DEPARTMENT',department)
commit('SET_NAME', name)
commit('SET_AVATAR', avatar)
commit('SET_ADMIN_ID', id)
commit('SET_ROLE', role)
commit('SET_ROLES', rolseArr)
commit('SET_USERNAME', username)
resolve(response)
}).catch(error => {

@ -175,7 +175,13 @@
};
</script>
<style scoped lang="scss">
<style scoped lang="scss">
::v-deep .allSelect .cell {
display: none;
}
::v-deep .ivu-input-group-append.ivu-input-search{
background-color: #409EFF;
}
.xy-table-item-label {
width: 180px;
}

@ -89,7 +89,8 @@
</div>
</div>
</div>
</div>
</div>
<!-- 是否没有关联 -->
</template>
@ -202,8 +203,102 @@
</div>
</div>
</template>
<template v-slot:extraFormBottom v-if="false">
<Input search enter-button=" " placeholder="搜索预算计划.." v-model="searchContent" @on-search="getBudgets" />
<template v-slot:extraFormBottom v-if="paymentRegistrationForm.plan.length===0">
<div class="select-container">
<DatePicker
:value="planSelect.year"
placeholder="选择所属年份"
placement="bottom-start"
style="width: 180px;margin-right: 10px;"
type="year"
@on-change="(e) => {
planSelect.year = e
getBudgets(true)
}"
></DatePicker>
<el-select
placeholder="科室选择"
clearable
size="small"
v-model="planSelect.plan_department_id"
style="width: 180px;margin-right: 10px;"
@change="getBudgets(true)"
>
<el-option
v-for="item in departments"
:label="item.name"
:value="item.id"
:key="item.id"
>
</el-option>
</el-select>
<el-cascader
placeholder="资金类型选择"
:options="planTypes"
:props="{
checkStrictly: false,
label: 'name',
value: 'id',
}"
:value="planSelect.type"
clearable
size="small"
style="width: 220px;margin-right: 10px;"
@change="(e) => {
planSelect.type = e[e.length - 1] || '';
getBudgets(true);
}"
/>
<Input
v-model="planSelect.name"
search
enter-button="搜 索"
clearable
placeholder="搜索预算计划.."
@on-search="getBudgets(true)"
/>
</div>
<xy-table
:header-cell-class-name="cellClassName"
:list="plans"
:show-index="false"
:table-item="planTable"
:height="300"
style="margin-top: 10px"
ref="editorPlanTable"
row-key="id"
border
default-expand-all
@select="planPick"
:tree-props="{ children: 'children', hasChildren: 'hasChildren' }"
>
<template v-slot:btns>
<el-table-column
label="使用金额(元)"
:fixed="$store.getters.device === 'mobile'?false:'right'"
header-align="center"
width="144"
>
<template slot-scope="scope" v-if="scope.row.pid > 0">
<InputNumber
style="width: 120px"
:min="0"
:precision="2"
:active-change="false"
v-model="scope.row._inputMoney"
:formatter="
(value) => `${value}`.replace(/\B(?=(\d{3})+(?!\d))/g, ',')
"
:parser="(value) => value.replace(/\$\s?|(,*)/g, '')"
></InputNumber>
</template>
</el-table-column>
</template>
</xy-table>
<!-- <Input search enter-button=" " placeholder="搜索预算计划.." v-model="searchContent" @on-search="getBudgets" />
<xy-table :list="plans" :show-index="false" :table-item="planTable" :height="310" style="margin-top: 10px"
ref="planTable" @select="selectPlan">
<template v-slot:btns>
@ -217,7 +312,7 @@
<div style="display: flex; justify-content: flex-end">
<Page :total="planTotal" show-elevator @on-change="pageChange" />
</div>
</div> -->
</template>
</xy-dialog>
</div>
@ -225,12 +320,13 @@
<script>
import {
getparameter
getparameter,getparameterTree
} from "@/api/system/dictionary";
import {
getFundLog,
addFundLog
} from "@/api/paymentRegistration/fundLog";
} from "@/api/paymentRegistration/fundLog";
import { listdeptNoAuth } from '@/api/system/department'
import {
getBudget
} from "@/api/budget/budget";
@ -266,7 +362,16 @@
searchContent: "",
planTotal: 0,
pageIndex: 1,
//
//
planSelect: {
name: "",
page_size: 20,
page: 1,
is_tree: 1,
year: new Date().getFullYear().toString(),
plan_department_id: "",
type: ""
},
plans: [],
planTypes: [],
contract: {},
@ -335,32 +440,73 @@
required: true,
message: "必选",
}, ],
},
planTable: [{
sortable: false,
width: 36,
type: "selection",
},
{
label: "分类",
prop: "type",
formatter: (cell, data, value) => {
let res = this.planTypes.filter((item) => {
return item.id === value;
});
return res[0]?.value || "未知";
},
},
{
label: "名称",
prop: "name",
align: "left",
},
{
label: "计划金额",
prop: "money",
align: "right",
},
},
departments:[],
planTable: [{
sortable: false,
width: 44,
type: "selection",
reserveSelection: true,
fixed: "left",
selectable: (row, index) => {
return row.pid > 0;
},
},
{
label: "科室",
prop: "plan_department.name",
width: 120,
align: "center",
},
{
label: "年份",
prop: "year",
width: 80,
align: "center",
},
{
label: "分类",
prop: "type_detail.value",
width: 120,
},
{
label: "名称",
prop: "name",
minWidth: 180,
align: "left",
},
{
label: "内容",
prop: "content",
minWidth: 240,
align: "left",
showOverflowTooltip: true
},
{
label: "计划金额",
prop: "money",
align: "right",
width: 120,
formatter: (v1, v2, value) => {
return `${(value && parseFloat(value) !== 0) ? value : v1.update_money }`.replace(/\B(?=(\d{3})+(?!\d))/g, ",")
}
},
{
label: "实付金额",
prop: "use_money_total",
width: 120,
align: "right",
formatter: (v1, v2, value) =>
value ? `${value}`.replace(/\B(?=(\d{3})+(?!\d))/g, ",") : "",
},
{
label: "已用金额",
prop: "has_money_total",
width: 120,
align: "right",
formatter: (v1, v2, value) =>
value ? `${value}`.replace(/\B(?=(\d{3})+(?!\d))/g, ",") : "",
}
],
};
},
@ -383,12 +529,31 @@
}
},
async getPlanTypes() {
const res = await getparameter({
number: "money_way",
});
this.planTypes = res.detail;
},
// async getPlanTypes() {
// const res = await getparameter({
// number: "money_way",
// });
// this.planTypes = res.detail;
// },
async getPlanTypes() {
const res = await getparameterTree({
id: 3
});
const dataHandler = (data) => {
data.forEach(i => {
if (i.hasOwnProperty('detail')) {
i.children = i.detail.map(j => {
j.name = j.value
return j;
})
} else {
dataHandler(i['children'])
}
})
return data;
}
this.planTypes = dataHandler(res?.children) || []
},
//
pageChange(e) {
@ -429,18 +594,20 @@
},
//
async getContract(info) {
async getContract(info) {
this.contract = await detailContract({
id: info.id,
});
this.paymentRegistrationForm.plan = this.contract.plans.map((item) => {
return {
plan_id: item.id,
use_money: item.useMoney,
new_money: item.money,
};
});
this.paymentRegistrationForm.plan = this.contract.plan_link
console.log("this.paymentRegistrationForm.plan",this.contract.plan_link)
if(this.contract.plan_link.legnth===0){
Message({
type: 'warning',
message: '该支出未关联预算计划,请在下方手动关联预算计划'
})
}
this.form.audit_money = this.contract.audit_money;
if (this.contract.borrows && this.contract.borrows.length > 0) {
@ -477,7 +644,42 @@
files: this.fileList ? this.fileList.map(i => i?.response?.id) : [],
property: this.paymentRegistrationForm.property,
property_type_id: this.paymentRegistrationForm.property_type_id,
};
};
//
if(this.paymentRegistrationForm.plan.length===0){
let contract_plan_act_links = this.$refs.editorPlanTable.getSelection()
console.log("contract_plan_act_links",contract_plan_act_links)
if(contract_plan_act_links.length<1){
Message({
type: 'warning',
message: '请选择预算计划'
})
return
}
// 0
let money0 = 0
contract_plan_act_links.map(i=>{
if(parseFloat(i._inputMoney)<=0 || !i._inputMoney){
money0++
}
})
if(money0>0){
Message({
type: 'warning',
message: '选择的预算计划的使用金额不能为0'
})
return
}
data.contract_plan_links = contract_plan_act_links.map(item=>{
return {
plan_id:item.id,
new_money:this.contract.money,
use_money:item._inputMoney
}
})
}
console.log("data",data,data.contract_plan_links)
// return
addFundLog(data).then((res) => {
//
editorContract({
@ -511,23 +713,55 @@
});
},
//
//
async getBudgets() {
let res = await getBudget({
name: this.searchContent,
page_size: 10,
page: this.pageIndex,
});
this.plans = res.list.data;
this.planTotal = res.list.total;
//
initInputMoney(list) {
if (!Array.isArray(list)) return [];
return list.map(item => {
// 使 Vue.set
this.$set(item, '_inputMoney', 0);
if (Array.isArray(item.children)) {
item.children = this.initInputMoney(item.children);
}
return item;
});
},
cellClassName({row,column,rowIndex,columnIndex}){
if(columnIndex===0){
return 'allSelect'
}
},
async getBudgets(refresh) {
let res = await getBudget(this.planSelect);
this.initInputMoney(res.list)
this.plans = res.list;
if(refresh){
this.$refs.editorPlanTable.clearSelection()
}
// this.planTotal = res.list.total;
// this.toggleSelection(this.paymentRegistrationForm.plan.map(item => {
// return item.plan_id
// }))
},
getDepartment() {
listdeptNoAuth().then((res) => {
this.departments = res.data;
});
},
planPageChange(e) {
this.plansPageIndex = e;
this.getBudgets();
},
planPick (selection, row) {
if (row.year != new Date().getFullYear()) {
this.$confirm("您选择了非本年预算,是否继续?").catch(_ => {
this.$refs['editorPlanTable'].toggleRowSelection(row)
})
}
},
selectPlan(sel, row) {
if (sel) {
@ -615,12 +849,24 @@
this.getPlanTypes();
},
created() {
this.getAssetsFlowIds()
this.getAssetsFlowIds()
this.getDepartment()
}
};
</script>
<style scoped lang="scss">
<style scoped lang="scss">
::v-deep .ivu-input-group-append.ivu-input-search{
background-color: #409EFF;
}
::v-deep .allSelect .cell {
display: none;
}
.select-container {
display: flex;
justify-content: space-between;
align-items: center;
}
.payment-registration {
&-row {
display: flex;

@ -11,6 +11,7 @@
<div v-show="step === 1">
<div class="select-container">
<DatePicker
:value="planSelect.year"
placeholder="选择所属年份"
placement="bottom-start"
@ -18,7 +19,7 @@
type="year"
@on-change="(e) => {
planSelect.year = e
getBudgets()
getBudgets(true)
}"
></DatePicker>
<el-select
@ -27,7 +28,7 @@
size="small"
v-model="planSelect.plan_department_id"
style="width: 180px;margin-right: 10px;"
@change="getBudgets"
@change="getBudgets(true)"
>
<el-option
v-for="item in departments"
@ -51,7 +52,7 @@
style="width: 220px;margin-right: 10px;"
@change="(e) => {
planSelect.type = e[e.length - 1] || '';
getBudgets();
getBudgets(true);
}"
/>
<Input
@ -60,11 +61,13 @@
enter-button="搜 索"
clearable
placeholder="搜索预算计划.."
@on-search="getBudgets"
@on-search="getBudgets(true)"
/>
</div>
<xy-table
:header-cell-class-name="cellClassName"
:list="plans"
:show-index="false"
:table-item="planTable"
@ -75,7 +78,7 @@
border
default-expand-all
@select="planPick"
:tree-props="{ children: 'notChildren', hasChildren: 'hasChildren' }"
:tree-props="{ children: 'children', hasChildren: 'hasChildren' }"
>
<template v-slot:btns>
<el-table-column
@ -84,7 +87,7 @@
header-align="center"
width="144"
>
<template slot-scope="scope" v-if="scope.row.pid === 0">
<template slot-scope="scope" v-if="scope.row.pid > 0">
<InputNumber
style="width: 120px"
:min="0"
@ -100,7 +103,7 @@
</el-table-column>
</template>
</xy-table>
<div style="display: flex; justify-content: flex-end">
<!-- <div style="display: flex; justify-content: flex-end">
<Page
:total="planTotal"
show-elevator
@ -111,7 +114,7 @@
}
"
/>
</div>
</div> -->
<div style="text-align: center">
<el-button type="primary" style="margin-top: 12px" @click="() => nextStep()"
>下一步</el-button
@ -996,7 +999,7 @@
<div class="typeFlex">
<div class="typeFlex-list">
<div class="typeFlex-title">从已有的支出列表中选择</div>
<div>
<div style="height:500px;overflow: scroll;">
<listAll ref="listAll" :isOpt="true"></listAll>
</div>
</div>
@ -1331,7 +1334,7 @@ export default {
reserveSelection: true,
fixed: "left",
selectable: (row, index) => {
return row.pid === 0;
return row.pid > 0;
},
},
{
@ -1751,11 +1754,38 @@ export default {
})
},
//
async getBudgets() {
initInputMoney(list) {
if (!Array.isArray(list)) return [];
return list.map(item => {
// 使 Vue.set
this.$set(item, '_inputMoney', 0);
if (Array.isArray(item.children)) {
item.children = this.initInputMoney(item.children);
}
return item;
});
},
cellClassName({row,column,rowIndex,columnIndex}){
if(columnIndex===0){
return 'allSelect'
}
},
async getBudgets(refresh) {
let res = await getBudget(this.planSelect);
res.list.forEach((item) => (item._inputMoney = 0));
// res.list.forEach((item) => (item._inputMoney = 0));
this.initInputMoney(res.list)
this.plans = res.list;
this.planTotal = res.list.total || 0;
console.log("this.plans",this.plans)
if(refresh){
this.$refs.editorPlanTable.clearSelection()
this.form.contract_plan_links = []
}
this.toggleBudgetByFlowModId()
},
@ -1906,7 +1936,7 @@ export default {
this.getPurchaseType();
this.getPurchaseWay();
this.getFlowIds();
this.boxheight = document.documentElement.clientHeight - 400;
this.boxheight = document.documentElement.clientHeight - 250;
this.handleDefaultJSON()
},
watch: {
@ -1984,6 +2014,12 @@ export default {
</script>
<style scoped lang="scss">
::v-deep .ivu-input-group-append.ivu-input-search{
background-color: #409EFF;
}
::v-deep .allSelect .cell {
display: none;
}
.typeFlex{
display: flex;
justify-content: space-between;

@ -409,6 +409,26 @@
</el-table-column>
</template>
<template v-slot:plansTag>
<el-table-column
header-align="center"
label="预算计划"
width="240"
>
<template slot-scope="scope">
<div style="text-align: center;">
<i v-if="$store.getters.roles.includes('系统管理员')" @click="changePlan(scope.row)" class="el-icon-edit"></i>
<div v-for="item in scope.row.plans">
[{{item.year}}] {{item.pid_info ? item.pid_info.name : ''}} - {{item.name}}
</div>
</div>
</template>
</el-table-column>
</template>
<template v-slot:btns>
<el-table-column
:fixed="$store.getters.device === 'mobile'?false:'right'"
@ -746,6 +766,9 @@
<addContractLedger ref="addContractLedger" @refresh="getContracts"></addContractLedger>
<!-- 管理员选择预算计划 -->
<otherPlan ref="otherPlan" @getPlan="saveChangePlan"></otherPlan>
<!-- oa办理-->
<oaLink ref="oaLink" @createOa="createOa" @oaDetail="oaDetail" @refresh="getContracts"></oaLink>
<Modal
@ -797,6 +820,8 @@ import EditContract from './components/EditContract.vue'
import { show } from "@/api/away";
import {flowStatusConfig,listCommonuser} from "@/api/common";
import {getFundLog} from "@/api/paymentRegistration/fundLog";
import otherPlan from "@/components/PlanPicker/otherPlan.vue"
let iframe;
export default {
props:{
@ -820,7 +845,8 @@ export default {
oaFiles,
EditContract,
borrow,
borrowList
borrowList,
otherPlan
},
data() {
return {
@ -1337,6 +1363,7 @@ export default {
label: "预算计划",
width: 330,
align: "left",
prop:'plansTag',
customFn: (row) => {
{
return row.plans.map((item) => {
@ -1672,9 +1699,40 @@ export default {
flowConfig: [],
isShowEditor: false,
myChangeId:'',
myChangeMoney:''
};
},
methods: {
//
changePlan(row){
if(!this.$store.getters.roles.includes('系统管理员')){
return
}
this.myChangeId = row.id
this.myChangeMoney = row.money
this.$refs.otherPlan.isMuplite = true
this.$refs.otherPlan.isShowPlanModal = true
},
saveChangePlan(e){
console.log("e",e)
let contract_plan_links = e.map(item=>{
return{
plan_id:item.id,
use_money:item._inputMoney,
new_money:this.myChangeMoney
}
})
editorContract({
id: this.myChangeId,
contract_plan_links:contract_plan_links
}).then(_ =>{
this.myChangeId = ''
this.myChangeMoney = ''
this.getContracts()
})
},
// oa
showPayment(row){
if(row.is_common_purchase){
@ -2560,6 +2618,7 @@ export default {
};
},
created() {
console.log("this.$store.getters",this.$store.getters)
this.getFlowConfig();
this.getCommonPurchaseType();
this.getPurchaseType();

@ -270,8 +270,8 @@ export default {
width: 330,
align: "left",
customFn: (row) => {
if (row.act_plan_link && row.act_plan_link.length > 0) {
return row.act_plan_link.map((item) => {
if (row.plan_link && row.plan_link.length > 0) {
return row.plan_link.map((item) => {
return (
<div>
[{item.plan?.year}] {(item.plan && item.plan.pid_info) ? item.plan.pid_info.name: ''} - {item.plan?.name}

@ -335,8 +335,8 @@ export default {
align: "left",
customFn: (row) => {
{
if (row.act_plan_link && row.act_plan_link.length > 0) {
return row.act_plan_link.map((item) => {
if (row.plan_link && row.plan_link.length > 0) {
return row.plan_link.map((item) => {
return (
<div>
{" "}

Loading…
Cancel
Save