@@ -111,6 +111,46 @@ export function contractionList(query) { | |||
params: query | |||
}) | |||
} | |||
// 查询合同结款计划列表 | |||
export function listPlan(query) { | |||
return request({ | |||
url: '/contraction/plan/list', | |||
method: 'get', | |||
params: query | |||
}) | |||
} | |||
// 新增合同结款计划 | |||
export function addPlan(data) { | |||
return request({ | |||
url: '/contraction/plan/add', | |||
method: 'post', | |||
data: data | |||
}) | |||
} | |||
// 修改合同结款计划 | |||
export function updatePlan(data) { | |||
return request({ | |||
url: '/contraction/plan/edit', | |||
method: 'post', | |||
data: data | |||
}) | |||
} | |||
// 删除合同结款计划 | |||
export function delPlan(id) { | |||
return request({ | |||
url: '/contraction/plan/remove/' + id, | |||
method: 'get' | |||
}) | |||
} | |||
// 查询合同结款计划详细 | |||
export function getPlan(id) { | |||
return request({ | |||
url: '/contraction/plan/get/' + id, | |||
method: 'get' | |||
}) | |||
} | |||
// 新增固定资产 | |||
export function addPermanent(data) { | |||
return request({ | |||
@@ -3407,6 +3407,33 @@ export const constantRoutes = [ | |||
}, | |||
component: (resolve) => require(['@/views/sunVillage_info/informationEdit'], resolve) | |||
}, | |||
{ ////阳光村务(新)-- 新增结款计划 | |||
path: '/sunVillage_info/informationFunPlanAdd', | |||
name: 'sunVillageInfoinformationFunPlanAdd', | |||
meta: { | |||
title: '新增结款计划', | |||
hidden: true, | |||
}, | |||
component: (resolve) => require(['@/views/sunVillage_info/informationFunPlanAdd'], resolve) | |||
}, | |||
{ ////阳光村务(新)-- 结款计划列表 | |||
path: '/sunVillage_info/informationFunPlan', | |||
name: 'sunVillageInfoInformationFunPlan', | |||
meta: { | |||
title: '结款计划', | |||
hidden: true, | |||
}, | |||
component: (resolve) => require(['@/views/sunVillage_info/informationFunPlan'], resolve) | |||
}, | |||
{ ////阳光村务(新)-- 结款计划修改 | |||
path: '/sunVillage_info/informationFunPlanEdit', | |||
name: 'sunVillageInfoInformationFunPlanEdit', | |||
meta: { | |||
title: '修改结款计划', | |||
hidden: true, | |||
}, | |||
component: (resolve) => require(['@/views/sunVillage_info/informationFunPlanEdit'], resolve) | |||
}, | |||
{ ////阳光村务(新)-- 合同信息 | |||
path: '/sunVillage_info/details', | |||
name: 'sunVillageInfoDetails', | |||
@@ -42,6 +42,7 @@ | |||
<div @click="handleDelete(item,index)" style="background-color: #ee0a24;height: 100%">删除</div> | |||
<router-link :to="{name:'sunVillageInfoInformationEdit',query:{id:item.id}}" style="background-color: #07c160">修改</router-link> | |||
<div @click="openLoader(item.id,0)" style="background-color: rgba(98,173,102,0.2);color: #62AD66;">附件</div> | |||
<router-link :to="{name:'sunVillageInfoInformationFunPlan',query:{id:item.id}}" style="background-color: #4169E1;">结款</router-link> | |||
</template> | |||
</van-swipe-cell> | |||
</van-list> | |||
@@ -0,0 +1,388 @@ | |||
<template> | |||
<div class="home_wrapper"> | |||
<div class="header_main"> | |||
结款计划 | |||
<div class="return_btn" @click="onClickLeft"></div> | |||
<div class="add_btn" @click="goAdd"></div> | |||
</div> | |||
<div class="search_info"> | |||
<!-- <div class="search_block"> | |||
<i class="icon"></i> | |||
<input type="text" class="ipt" placeholder="搜索" v-model="queryParams.orderNum" @input="getSearchList"> | |||
</div>--> | |||
<div class="total">共{{listLength}}个结款计划</div> | |||
</div> | |||
<div class="list_main"> | |||
<van-list | |||
v-model="loading" | |||
:finished="finished" | |||
finished-text="没有更多了" | |||
@load="getList" | |||
> | |||
<!--1--> | |||
<van-swipe-cell right-width="150" class="item" v-for="(item,index) in applicationList" :key="index"> | |||
<div class="item_box"> | |||
<div class="head_block"> | |||
<i class="icon"></i> | |||
<div class="title">结款序号{{item.orderNum}}</div> | |||
</div> | |||
<div class="order_block"> | |||
<div class="order">{{item.collectionPay}}</div> | |||
<div :class="{'describe':true,'suspend':item.planStatus == '待结款','normal':item.planStatus == '已结款','undo':item.planStatus == '已作废'}">{{item.planStatus}}<i class="icon"></i></div> | |||
</div> | |||
<div class="function_block"> | |||
<div class="value">结款金额<span class="amount">¥{{item.settlementAmount}}</span></div> | |||
<div class="startStop_time"> | |||
<div class="time">结款日期{{item.settlementDate}}</div> | |||
</div> | |||
</div> | |||
</div> | |||
<template #right> | |||
<div @click="handleDelete(item,index)" style="background-color: #ee0a24;height: 100%" v-if="item.params.planStatus !=='2'">删除</div> | |||
<router-link :to="{name:'sunVillageInfoInformationFunPlanEdit',query:{id:item.id}}" style="background-color: #07c160" v-if="item.params.planStatus !=='2'">修改</router-link> | |||
</template> | |||
</van-swipe-cell> | |||
</van-list> | |||
</div> | |||
</div> | |||
</template> | |||
<script> | |||
import { listPlan , delPlan } from "@/api/sunVillage_info/fixedAssets"; | |||
import request from '@/utils/request' | |||
export default { | |||
name: "informationFunPlan", | |||
data() { | |||
return { | |||
applicationList:[], | |||
applicationListSecond:[], | |||
assetStatusOptions:[], | |||
auditStatus:[], | |||
loading: false, | |||
finished: false, | |||
show: false, | |||
fileList:[], | |||
listLength:'0', | |||
searchInput:'', | |||
contractionId:'', | |||
queryParams:{ | |||
pageNum:1, | |||
pageSize:10, | |||
orderNum:'', | |||
contractionId:'', | |||
}, | |||
uploadFiles1:[], | |||
projectId:'', | |||
projectIndex:'' | |||
}; | |||
}, | |||
created() { | |||
this.houseGetDicts("plan_status").then((response) => { | |||
this.planStatusOptions = response.data; | |||
}); | |||
this.houseGetDicts("collection_pay").then((response) => { | |||
this.collectionPayOptions = response.data; | |||
}); | |||
this.contractionId = this.$route.query.id; | |||
}, | |||
methods: { | |||
getList(){ | |||
setTimeout(() => { | |||
this.queryParams.contractionId =this.contractionId; | |||
listPlan(this.queryParams).then(response => { | |||
this.listLength = response.total; | |||
for (var i = 0; i < response.rows.length; i++) { | |||
response.rows[i].planStatus = this.selectDictLabel(this.planStatusOptions, response.rows[i].planStatus); | |||
response.rows[i].collectionPay = this.selectDictLabel(this.collectionPayOptions, response.rows[i].collectionPay); | |||
response.rows[i].totalAmount = Number(response.rows[i].totalAmount ).toFixed(2).replace(/(\d)(?=(\d{3})+\.)/g, ($0, $1) => { return $1 + ","; }).replace(/\.$/, "") | |||
this.applicationList.push(response.rows[i]); | |||
// this.applicationListSecond.push(response.rows[i]); | |||
} | |||
if(this.applicationList.length >= response.total){ | |||
this.finished = true; | |||
return; | |||
}else{ | |||
this.loading = false; | |||
this.queryParams.pageNum += 1 ; | |||
} | |||
}); | |||
}, 1000); | |||
}, | |||
getSearchList(){ | |||
this.applicationList = []; | |||
this.queryParams.pageNum = 1; | |||
this.getList(); | |||
}, | |||
/** 删除按钮操作 */ | |||
handleDelete(row,index) { | |||
const ids = row.id || this.ids; | |||
this.$dialog.alert( | |||
{ | |||
message:'是否确认删除结款计划?', | |||
title:"警告", | |||
showCancelButton:true, | |||
confirmButtonText: "确定", | |||
cancelButtonText: "取消", | |||
} | |||
) | |||
.then(function () { | |||
return delPlan(ids); | |||
}) | |||
.then(() => { | |||
this.applicationList.splice(index, 1); | |||
this.$notify({ type: 'success', message: '删除成功' }); | |||
}); | |||
}, | |||
goAdd() { | |||
this.$router.push({ path: '/sunVillage_info/informationFunPlanAdd', query: { contractionId: this.contractionId } }); | |||
}, | |||
}, | |||
} | |||
</script> | |||
<style scoped lang="scss"> | |||
.home_wrapper{ | |||
background: #e9e9e9; | |||
min-height: 100vh; | |||
width: 100vw; | |||
.header_main { | |||
height: 116px; | |||
background: url('../../assets/images/sunVillage_info/list_head.png') no-repeat; | |||
background-size: 100% 100%; | |||
position: fixed; | |||
top: 0; | |||
left: 0; | |||
width: 100%; | |||
font-size: 36px; | |||
line-height: 116px; | |||
text-align: center; | |||
color: #fff; | |||
position: relative; | |||
.return_btn { | |||
width: 24px; | |||
height: 43.2px; | |||
background: url('../../assets/images/sunVillage_info/list_icon_5.png') center center no-repeat; | |||
background-size: 20px 36px; | |||
position: absolute; | |||
left: 38px; | |||
top: 36px; | |||
} | |||
.add_btn { | |||
width: 56.4px; | |||
height: 40.8px; | |||
background: url('../../assets/images/sunVillage_info/list_icon_9.png') center center no-repeat; | |||
background-size: 47px 34px; | |||
position: absolute; | |||
right: 38px; | |||
top: 36px; | |||
} | |||
} | |||
.search_info{ | |||
padding:20px 23px; | |||
display: flex; | |||
.search_block{ | |||
height: 59px; | |||
width: 535px; | |||
border-radius: 59px; | |||
background: #fff; | |||
display: flex; | |||
border:2px solid #3494ff; | |||
padding-right: 35px; | |||
align-items: center; | |||
.icon{ | |||
width: 30px; | |||
height: 30px; | |||
background: url('../../assets/images/sunVillage_info/fixedAssets_icon_1.png') no-repeat; | |||
background-size: 100% 100%; | |||
display: block; | |||
margin:0 8px 0 26px; | |||
} | |||
.ipt{ | |||
flex: 1; | |||
font-size: 26px; | |||
background: none; | |||
border:0 none; | |||
line-height: 59px; | |||
} | |||
} | |||
.total{ | |||
flex: 1; | |||
display: flex; | |||
align-items: center; | |||
justify-content: center; | |||
font-size: 26px; | |||
color: #858585; | |||
} | |||
} | |||
.list_main{ | |||
padding:0 22px; | |||
.item{ | |||
height: 207px; | |||
border-radius: 30px; | |||
background: #fff; | |||
box-shadow: 4px 6px 5px rgba(63, 68, 75, 0.1); | |||
margin-bottom: 20px; | |||
.item_box{ | |||
padding:25px 32px; | |||
} | |||
.head_block{ | |||
height: 56px; | |||
display: flex; | |||
align-items: center; | |||
width: 100%; | |||
.icon{ | |||
width: 34px; | |||
height: 30px; | |||
background: url('../../assets/images/sunVillage_info/fixedAssets_icon_5.png') no-repeat; | |||
background-size: 100% 100%; | |||
display: block; | |||
margin-right: 12px; | |||
} | |||
.title{ | |||
flex:1; | |||
font-size: 32px; | |||
color: #252525; | |||
overflow: hidden; | |||
text-overflow: ellipsis; | |||
white-space: nowrap; | |||
padding-right: 20px; | |||
} | |||
} | |||
.order_block{ | |||
height: 50px; | |||
display: flex; | |||
align-items: center; | |||
width: 100%; | |||
.order{ | |||
flex: 1; | |||
font-size: 26px; | |||
color: #252525; | |||
} | |||
.describe{ | |||
font-size: 26px; | |||
display: flex; | |||
align-items: center; | |||
&.suspend{ | |||
color: #f69600; | |||
.icon{ | |||
width: 27px; | |||
height: 26px; | |||
background: url('../../assets/images/sunVillage_info/information_icon_1.png') no-repeat; | |||
background-size: 100% 100%; | |||
display: block; | |||
margin-left: 15px; | |||
} | |||
} | |||
&.normal{ | |||
color: #69c100; | |||
.icon{ | |||
width: 32px; | |||
height: 26px; | |||
background: url('../../assets/images/sunVillage_info/information_icon_2.png') no-repeat; | |||
background-size: 100% 100%; | |||
display: block; | |||
margin-left: 15px; | |||
} | |||
} | |||
&.undo{ | |||
color: #858585; | |||
.icon{ | |||
width: 27px; | |||
height: 26px; | |||
background: url('../../assets/images/sunVillage_info/information_icon_3.png') no-repeat; | |||
background-size: 100% 100%; | |||
display: block; | |||
margin-left: 15px; | |||
} | |||
} | |||
} | |||
} | |||
.function_block{ | |||
height: 50px; | |||
display: flex; | |||
align-items: center; | |||
width: 100%; | |||
.value{ | |||
flex: 1; | |||
font-size: 24px; | |||
color: #252525; | |||
.amount{ | |||
color: #eb1616; | |||
} | |||
} | |||
.startStop_time{ | |||
display: flex; | |||
align-items: center; | |||
.time{ | |||
display: flex; | |||
align-items: center; | |||
font-size: 24px; | |||
color: #002022; | |||
margin-left: 25px; | |||
.unim{ | |||
width: 32px; | |||
height: 32px; | |||
font-size: 22px; | |||
color: #fff; | |||
text-align: center; | |||
line-height: 32px; | |||
border-radius: 6px; | |||
margin-right: 8px; | |||
&.start{background: #3e7df2;} | |||
&.stop{background: #eb1616;} | |||
} | |||
} | |||
} | |||
} | |||
// <div class="function_block"> | |||
// <div class="value">合同金额<span class="amount">¥199.00</span></div> | |||
// <div class="startStop_time"> | |||
// <div class="time"><div class="unim">起</div>2022.05.04</div> | |||
// <div class="time"><div class="unim">起</div>2022.05.04</div> | |||
// </div> | |||
// </div> | |||
} | |||
} | |||
.bottom_tips{ | |||
font-size: 24px; | |||
color: #a7a6a6; | |||
text-align: center; | |||
margin-top: 32px; | |||
background: url('../../assets/images/sunVillage_info/list_icon_8.png') center center no-repeat; | |||
background-size: 260px 2px; | |||
.xs{ | |||
padding:0 8px; | |||
background: #e9e9e9; | |||
} | |||
} | |||
/deep/ .van-swipe-cell__right{ | |||
display: flex; | |||
align-items: center; | |||
width: 150PX; | |||
margin-left: 5PX; | |||
a,div{ | |||
margin: 0; | |||
display: flex; | |||
align-items: center; | |||
justify-content: center; | |||
color: #ffffff; | |||
font-size: 14PX; | |||
height: 100%; | |||
flex: 1; | |||
} | |||
} | |||
} | |||
</style> |
@@ -0,0 +1,251 @@ | |||
<template> | |||
<div class="home_wrapper"> | |||
<div class="header_main"> | |||
新增结款计划 | |||
<div class="return_btn" @click="onClickLeft"></div> | |||
</div> | |||
<van-form @submit="onSubmit"> | |||
<div class="list_main"> | |||
<div class="titBox"> | |||
<img src="../../assets/images/sunVillage_info/add_icon_2.png" style="width:22PX;height:22PX;margin-right: 10px;"/> | |||
<p class="tit">结款计划</p> | |||
</div> | |||
<!-- <van-field required v-model="form.biddingWay" label="招标方式" placeholder="招标方式" input-align="right" :border="false" />--> | |||
<van-field v-model="form.code" label="合同编码" placeholder="合同编码" input-align="right" disabled /> | |||
<van-field v-model="form.name" label="合同名称" placeholder="合同名称" input-align="right" :border="false" disabled /> | |||
<van-field v-model="form.secondParty" label="乙方" placeholder="乙方" input-align="right" :border="false" disabled /> | |||
<van-field v-model="collectionPay" @click="showCollectionPay = false" label="收付款" placeholder="收付款" input-align="right" :border="false" disabled/> | |||
<van-popup v-model="showCollectionPay" position="bottom"> | |||
<van-picker | |||
show-toolbar | |||
:columns="collectionPayOptions" | |||
@confirm="onConfirmCollectionPay" | |||
@cancel="showCollectionPay = false"/> | |||
</van-popup> | |||
<van-field v-model="form.orderNum" label="结款序号" placeholder="结款序号" input-align="right" :border="false" /> | |||
<van-field v-model="form.settlementDate" readonly clickable label="结款日期" placeholder="请选择" @click="showSettlementDate = true" input-align="right" right-icon="arrow-down" label-width="auto" required :border="false"/> | |||
<van-popup v-model="showSettlementDate" position="bottom"> | |||
<van-datetime-picker v-model="settlementDate" type="date" title="选择年月日" @confirm="onConfirmSettlementDate" @cancel="showSettlementDate = false"/> | |||
</van-popup> | |||
<van-field v-model="form.settlementAmount" label="结款金额" required placeholder="结款金额" input-align="right" :border="false" :rules="rules.settlementAmount" /> | |||
<van-field v-model="planStatus" @click="showPlanStatus = false" label="结款状态" input-align="right" :border="false" disabled /> | |||
<van-popup v-model="showPlanStatus" position="bottom"> | |||
<van-picker | |||
show-toolbar | |||
:columns="planStatusOptions" | |||
@confirm="onConfirmPlanStatus" | |||
@cancel="showPlanStatus = false" | |||
disabled/> | |||
</van-popup> | |||
<van-field v-model="form.remark" label="备注" placeholder="备注" input-align="right" :border="false" /> | |||
</div> | |||
<div style="margin: 16px auto;width: 50%;"> | |||
<van-button round block type="primary" native-type="submit"> | |||
保存 | |||
</van-button> | |||
</div> | |||
</van-form> | |||
</div> | |||
</template> | |||
<script> | |||
import {addPlan, getInfo} from "@/api/sunVillage_info/fixedAssets"; | |||
export default { | |||
name: "informationFunPlanAdd", | |||
data() { | |||
return { | |||
assetStatusOptions:[], | |||
auditStatus:[], | |||
loading: false, | |||
finished: false, | |||
listLength:'0', | |||
searchInput:'', | |||
contractionId:'', | |||
form:{ | |||
contractionId:'', | |||
code:'', | |||
name:'', | |||
secondParty:'', | |||
collectionPay:'', | |||
planStatus:'1', | |||
orderNum:'', | |||
settlementDate:'', | |||
settlementAmount:'', | |||
remark:'', | |||
}, | |||
queryParams:{ | |||
/* pageNum:1, | |||
pageSize:10, | |||
orderByColumn:'createTime', | |||
isAsc:'desc', | |||
name:'',*/ | |||
contractionId:'', | |||
}, | |||
//收款日期 | |||
settlementDate:new Date(), | |||
showSettlementDate:false, | |||
//结款状态 | |||
planStatus:'待付款', | |||
showPlanStatus:false, | |||
planStatusOptions:[], | |||
//收付款 | |||
collectionPay:'收款', | |||
showCollectionPay:false, | |||
collectionPayOptions:[], | |||
rules: { | |||
settlementAmount: [ | |||
{ required: true, message: '请输入结款金额' }, | |||
] | |||
}, | |||
}; | |||
}, | |||
created() { | |||
this.houseGetDicts("plan_status").then((response) => { | |||
for(var i = 0 ; i < response.data.length ; i++){ | |||
this.planStatusOptions.push({text:response.data[i].dictLabel,value:response.data[i].dictValue}); | |||
} | |||
}); | |||
this.houseGetDicts("collection_pay").then((response) => { | |||
for(var i = 0 ; i < response.data.length ; i++){ | |||
this.collectionPayOptions.push({text:response.data[i].dictLabel,value:response.data[i].dictValue}); | |||
} | |||
}); | |||
/* this.houseGetDicts("plan_status").then((response) => { | |||
this.planStatusOptions = response.data; | |||
}); | |||
this.houseGetDicts("collection_pay").then((response) => { | |||
this.collectionPayOptions = response.data; | |||
});*/ | |||
this.getDetail(this.$route.query.contractionId) | |||
this.contractionId = this.$route.query.contractionId; | |||
}, | |||
methods: { | |||
getDetail(id){ | |||
getInfo(id).then(response => { | |||
this.form.contractionId = response.data.id; | |||
this.form.code = response.data.code; | |||
this.form.name = response.data.name; | |||
this.form.secondParty = response.data.secondParty; | |||
this.form.planStatus = '1'; | |||
this.form.collectionPay = response.data.collectionPay; | |||
}); | |||
}, | |||
onConfirmPlanStatus(data){ | |||
this.planStatus = data.text; | |||
this.form.planStatus = data.value; | |||
this.showPlanStatus = false; | |||
}, | |||
onConfirmCollectionPay(data){ | |||
this.collectionPay = data.text; | |||
this.form.collectionPay = data.value; | |||
this.showCollectionPay = false; | |||
}, | |||
onConfirmSettlementDate(data){ | |||
this.form.settlementDate = this.format(data,'yyyy-MM-dd'); | |||
this.settlementDate = data; | |||
this.showSettlementDate = false; | |||
}, | |||
onSubmit(){ | |||
this.form.contractionId = this.contractionId; | |||
addPlan(this.form).then((response) => { | |||
if (response.code == 200){ | |||
this.$notify({ type: 'success', message: '新增成功' }); | |||
setTimeout(function(){ | |||
history.back(-1); | |||
},2000) | |||
} | |||
}); | |||
} | |||
}, | |||
} | |||
</script> | |||
<style scoped lang="scss"> | |||
/deep/ .van-button--primary{ | |||
background: url("../../assets/images/sunVillage_info/btn_bg.png") no-repeat; | |||
background-size: 100% 100%; | |||
border: none; | |||
} | |||
.home_wrapper{ | |||
background: #e9e9e9; | |||
min-height: 100vh; | |||
width: 100vw; | |||
.header_main { | |||
height: 116px; | |||
background: url('../../assets/images/sunVillage_info/list_head.png') no-repeat; | |||
background-size: 100% 100%; | |||
position: fixed; | |||
top: 0; | |||
left: 0; | |||
width: 100%; | |||
font-size: 36px; | |||
line-height: 116px; | |||
text-align: center; | |||
color: #fff; | |||
position: relative; | |||
.return_btn { | |||
width: 24px; | |||
height: 43.2px; | |||
background: url('../../assets/images/sunVillage_info/list_icon_5.png') center center no-repeat; | |||
background-size: 20px 36px; | |||
position: absolute; | |||
left: 38px; | |||
top: 36px; | |||
} | |||
.add_btn { | |||
width: 56.4px; | |||
height: 40.8px; | |||
background: url('../../assets/images/sunVillage_info/list_icon_9.png') center center no-repeat; | |||
background-size: 47px 34px; | |||
position: absolute; | |||
right: 38px; | |||
top: 36px; | |||
} | |||
} | |||
.list_main{ | |||
padding:25px; | |||
background: #ffffff; | |||
width: 94%; | |||
margin: 25px auto 0; | |||
border-radius: 15PX; | |||
box-shadow: 4px 6px 5px rgba(63, 68, 75, 0.1); | |||
} | |||
.titBox{ | |||
display: flex; | |||
align-items: center; | |||
} | |||
.tit{ | |||
font-size: 36px; | |||
font-weight: bold; | |||
} | |||
/deep/ .van-cell{ | |||
padding-left: 0!important; | |||
padding-right: 0!important; | |||
padding-bottom: 0!important; | |||
} | |||
/deep/ .van-field__label{ | |||
padding-left: 10PX; | |||
width: 8.2em; | |||
} | |||
/deep/ .van-cell--required::before{ | |||
left: 0; | |||
} | |||
} | |||
</style> |
@@ -0,0 +1,244 @@ | |||
<template> | |||
<div class="home_wrapper"> | |||
<div class="header_main"> | |||
修改结款计划 | |||
<div class="return_btn" @click="onClickLeft"></div> | |||
</div> | |||
<van-form @submit="onSubmit"> | |||
<div class="list_main"> | |||
<div class="titBox"> | |||
<img src="../../assets/images/sunVillage_info/add_icon_2.png" style="width:22PX;height:22PX;margin-right: 10px;"/> | |||
<p class="tit">结款计划</p> | |||
</div> | |||
<!-- <van-field required v-model="form.biddingWay" label="招标方式" placeholder="招标方式" input-align="right" :border="false" />--> | |||
<van-field v-model="form.code" label="合同编码" placeholder="合同编码" input-align="right" disabled /> | |||
<van-field v-model="form.name" label="合同名称" placeholder="合同名称" input-align="right" :border="false" disabled /> | |||
<van-field v-model="form.secondParty" label="乙方" placeholder="乙方" input-align="right" :border="false" disabled /> | |||
<van-field v-model="collectionPay" @click="showCollectionPay = false" label="收付款" placeholder="收付款" input-align="right" :border="false" disabled /> | |||
<van-popup v-model="showCollectionPay" position="bottom"> | |||
<van-picker | |||
show-toolbar | |||
:columns="collectionPayOptions" | |||
@confirm="onConfirmCollectionPay" | |||
@cancel="showCollectionPay = false"/> | |||
</van-popup> | |||
<van-field v-model="form.orderNum" label="结款序号" placeholder="结款序号" input-align="right" :border="false" /> | |||
<van-field v-model="form.settlementDate" readonly clickable label="结款日期" placeholder="请选择" @click="showSettlementDate = true" input-align="right" right-icon="arrow-down" label-width="auto" required :border="false"/> | |||
<van-popup v-model="showSettlementDate" position="bottom"> | |||
<van-datetime-picker v-model="settlementDate" type="date" title="选择年月日" @confirm="onConfirmSettlementDate" @cancel="showSettlementDate = false"/> | |||
</van-popup> | |||
<van-field v-model="form.settlementAmount" label="结款金额" placeholder="结款金额" required input-align="right" :border="false" :rules="rules.settlementAmount" /> | |||
<van-field v-model="planStatus" @click="showPlanStatus = false" label="结款状态" input-align="right" :border="false" disabled /> | |||
<van-popup v-model="showPlanStatus" position="bottom"> | |||
<van-picker | |||
show-toolbar | |||
:columns="planStatusOptions" | |||
@confirm="onConfirmPlanStatus" | |||
@cancel="showPlanStatus = false"/> | |||
</van-popup> | |||
<van-field v-model="form.remark" label="备注" placeholder="备注" input-align="right" :border="false" /> | |||
</div> | |||
<div style="margin: 16px auto;width: 50%;"> | |||
<van-button round block type="primary" native-type="submit"> | |||
保存 | |||
</van-button> | |||
</div> | |||
</van-form> | |||
</div> | |||
</template> | |||
<script> | |||
import {updatePlan, getPlan} from "@/api/sunVillage_info/fixedAssets"; | |||
export default { | |||
name: "informationFunPlanEdit", | |||
data() { | |||
return { | |||
assetStatusOptions:[], | |||
auditStatus:[], | |||
loading: false, | |||
finished: false, | |||
listLength:'0', | |||
searchInput:'', | |||
contractionId:'', | |||
form:{ | |||
contractionId:'', | |||
code:'', | |||
name:'', | |||
secondParty:'', | |||
collectionPay:'', | |||
planStatus:'1', | |||
orderNum:'', | |||
settlementDate:'', | |||
settlementAmount:'', | |||
remark:'', | |||
}, | |||
queryParams:{ | |||
/* pageNum:1, | |||
pageSize:10, | |||
orderByColumn:'createTime', | |||
isAsc:'desc', | |||
name:'',*/ | |||
contractionId:'', | |||
}, | |||
//收款日期 | |||
settlementDate:new Date(), | |||
showSettlementDate:false, | |||
//结款状态 | |||
planStatus:'待付款', | |||
showPlanStatus:false, | |||
planStatusOptions:[], | |||
//收付款 | |||
collectionPay:'收款', | |||
showCollectionPay:false, | |||
collectionPayOptions:[], | |||
rules: { | |||
settlementAmount: [ | |||
{ required: true, message: '请输入结款金额' }, | |||
] | |||
}, | |||
}; | |||
}, | |||
created() { | |||
this.houseGetDicts("plan_status").then((response) => { | |||
for(var i = 0 ; i < response.data.length ; i++){ | |||
this.planStatusOptions.push({text:response.data[i].dictLabel,value:response.data[i].dictValue}); | |||
} | |||
}); | |||
this.houseGetDicts("collection_pay").then((response) => { | |||
for(var i = 0 ; i < response.data.length ; i++){ | |||
this.collectionPayOptions.push({text:response.data[i].dictLabel,value:response.data[i].dictValue}); | |||
} | |||
}); | |||
/* this.houseGetDicts("plan_status").then((response) => { | |||
this.planStatusOptions = response.data; | |||
}); | |||
this.houseGetDicts("collection_pay").then((response) => { | |||
this.collectionPayOptions = response.data; | |||
});*/ | |||
this.getDetail(this.$route.query.id) | |||
this.contractionId = this.$route.query.id; | |||
}, | |||
methods: { | |||
getDetail(id){ | |||
getPlan(id).then(response => { | |||
this.form = response.data | |||
}); | |||
}, | |||
onConfirmPlanStatus(data){ | |||
this.planStatus = data.text; | |||
this.form.planStatus = data.value; | |||
this.showPlanStatus = false; | |||
}, | |||
onConfirmCollectionPay(data){ | |||
this.collectionPay = data.text; | |||
this.form.collectionPay = data.value; | |||
this.showCollectionPay = false; | |||
}, | |||
onConfirmSettlementDate(data){ | |||
this.form.settlementDate = this.format(data,'yyyy-MM-dd'); | |||
this.settlementDate = data; | |||
this.showSettlementDate = false; | |||
}, | |||
onSubmit(){ | |||
updatePlan(this.form).then((response) => { | |||
if (response.code == 200){ | |||
this.$notify({ type: 'success', message: '修改成功' }); | |||
setTimeout(function(){ | |||
history.back(-1); | |||
},2000) | |||
} | |||
}); | |||
} | |||
}, | |||
} | |||
</script> | |||
<style scoped lang="scss"> | |||
/deep/ .van-button--primary{ | |||
background: url("../../assets/images/sunVillage_info/btn_bg.png") no-repeat; | |||
background-size: 100% 100%; | |||
border: none; | |||
} | |||
.home_wrapper{ | |||
background: #e9e9e9; | |||
min-height: 100vh; | |||
width: 100vw; | |||
.header_main { | |||
height: 116px; | |||
background: url('../../assets/images/sunVillage_info/list_head.png') no-repeat; | |||
background-size: 100% 100%; | |||
position: fixed; | |||
top: 0; | |||
left: 0; | |||
width: 100%; | |||
font-size: 36px; | |||
line-height: 116px; | |||
text-align: center; | |||
color: #fff; | |||
position: relative; | |||
.return_btn { | |||
width: 24px; | |||
height: 43.2px; | |||
background: url('../../assets/images/sunVillage_info/list_icon_5.png') center center no-repeat; | |||
background-size: 20px 36px; | |||
position: absolute; | |||
left: 38px; | |||
top: 36px; | |||
} | |||
.add_btn { | |||
width: 56.4px; | |||
height: 40.8px; | |||
background: url('../../assets/images/sunVillage_info/list_icon_9.png') center center no-repeat; | |||
background-size: 47px 34px; | |||
position: absolute; | |||
right: 38px; | |||
top: 36px; | |||
} | |||
} | |||
.list_main{ | |||
padding:25px; | |||
background: #ffffff; | |||
width: 94%; | |||
margin: 25px auto 0; | |||
border-radius: 15PX; | |||
box-shadow: 4px 6px 5px rgba(63, 68, 75, 0.1); | |||
} | |||
.titBox{ | |||
display: flex; | |||
align-items: center; | |||
} | |||
.tit{ | |||
font-size: 36px; | |||
font-weight: bold; | |||
} | |||
/deep/ .van-cell{ | |||
padding-left: 0!important; | |||
padding-right: 0!important; | |||
padding-bottom: 0!important; | |||
} | |||
/deep/ .van-field__label{ | |||
padding-left: 10PX; | |||
width: 8.2em; | |||
} | |||
/deep/ .van-cell--required::before{ | |||
left: 0; | |||
} | |||
} | |||
</style> |