@@ -16,12 +16,89 @@ export function contractionList(query) { | |||||
params: query | params: query | ||||
}) | }) | ||||
} | } | ||||
// 用户密码重置 | |||||
export function updateUserPwd(data) { | |||||
// 新增固定资产 | |||||
export function addPermanent(data) { | |||||
return request({ | return request({ | ||||
url: '/system/user/profile/updatePwd', | |||||
url: '/asset/permanent/add', | |||||
method: 'post', | method: 'post', | ||||
data: data | |||||
}) | |||||
} | |||||
// 查询固定资产详细 | |||||
export function getPermanent(id) { | |||||
return request({ | |||||
url: '/asset/permanent/get/' + id, | |||||
method: 'get' | |||||
}) | |||||
} | |||||
// 修改固定资产 | |||||
export function updatePermanent(data) { | |||||
return request({ | |||||
url: '/asset/permanent/edit', | |||||
method: 'post', | |||||
data: data | |||||
}) | |||||
} | |||||
// 删除固定资产 | |||||
export function delPermanent(id) { | |||||
return request({ | |||||
url: '/asset/permanent/remove/' + id, | |||||
method: 'get' | |||||
}) | |||||
} | |||||
//上传全局方法附件 | |||||
export function commonAttach(data) { | |||||
return request({ | |||||
url: '/common/attach', | |||||
method: 'post', | |||||
header: { "Content-Type": 'application/x-www-form-urlencoded' }, | |||||
data: data | |||||
}) | |||||
} | |||||
//查询已上传附件 | |||||
export const attachmentList = (data) => { | |||||
return request({ | |||||
url: '/system/attachment/query', | |||||
method: 'get', | |||||
params: data | params: data | ||||
}) | }) | ||||
} | } | ||||
//删除已上传附件 | |||||
export function systemAttachment(ids) { | |||||
if (ids != undefined) { | |||||
return request({ | |||||
url: '/system/attachment/remove/' + ids, | |||||
method: 'get' | |||||
}) | |||||
} | |||||
} | |||||
// 新增合同信息 | |||||
export function addInfo(data) { | |||||
return request({ | |||||
url: '/contraction/info/add', | |||||
method: 'post', | |||||
data: data | |||||
}) | |||||
} | |||||
// 查询合同信息详细 | |||||
export function getInfo(id) { | |||||
return request({ | |||||
url: '/contraction/info/get/' + id, | |||||
method: 'get' | |||||
}) | |||||
} | |||||
// 删除合同信息 | |||||
export function delInfo(id) { | |||||
return request({ | |||||
url: '/contraction/info/remove/' + id, | |||||
method: 'get' | |||||
}) | |||||
} | |||||
// 修改合同信息 | |||||
export function updateInfo(data) { | |||||
return request({ | |||||
url: '/contraction/info/edit', | |||||
method: 'post', | |||||
data: data | |||||
}) | |||||
} |
@@ -2872,6 +2872,24 @@ export const constantRoutes = [ | |||||
}, | }, | ||||
component: (resolve) => require(['@/views/sunVillage_info/fixedAssetsAdd'], resolve) | component: (resolve) => require(['@/views/sunVillage_info/fixedAssetsAdd'], resolve) | ||||
}, | }, | ||||
{ ////阳光村务(新)-- 固定资产 | |||||
path: '/sunVillage_info/fixedAssetsDetail', | |||||
name: 'sunVillageInfoFixedAssetsDetail', | |||||
meta: { | |||||
title: '查看固定资产', | |||||
hidden: true, | |||||
}, | |||||
component: (resolve) => require(['@/views/sunVillage_info/fixedAssetsDetail'], resolve) | |||||
}, | |||||
{ ////阳光村务(新)-- 固定资产 | |||||
path: '/sunVillage_info/fixedAssetsEdit', | |||||
name: 'sunVillageInfoFixedAssetsEdit', | |||||
meta: { | |||||
title: '修改固定资产', | |||||
hidden: true, | |||||
}, | |||||
component: (resolve) => require(['@/views/sunVillage_info/fixedAssetsEdit'], resolve) | |||||
}, | |||||
{ ////阳光村务(新)-- 合同信息 | { ////阳光村务(新)-- 合同信息 | ||||
path: '/sunVillage_info/information', | path: '/sunVillage_info/information', | ||||
name: 'sunVillageInfoInformation', | name: 'sunVillageInfoInformation', | ||||
@@ -2890,6 +2908,24 @@ export const constantRoutes = [ | |||||
}, | }, | ||||
component: (resolve) => require(['@/views/sunVillage_info/informationAdd'], resolve) | component: (resolve) => require(['@/views/sunVillage_info/informationAdd'], resolve) | ||||
}, | }, | ||||
{ ////阳光村务(新)-- 合同信息 | |||||
path: '/sunVillage_info/informationDetail', | |||||
name: 'sunVillageInfoInformationDetail', | |||||
meta: { | |||||
title: '查看合同信息', | |||||
hidden: true, | |||||
}, | |||||
component: (resolve) => require(['@/views/sunVillage_info/informationDetail'], resolve) | |||||
}, | |||||
{ ////阳光村务(新)-- 合同信息 | |||||
path: '/sunVillage_info/informationEdit', | |||||
name: 'sunVillageInfoInformationEdit', | |||||
meta: { | |||||
title: '修改合同信息', | |||||
hidden: true, | |||||
}, | |||||
component: (resolve) => require(['@/views/sunVillage_info/informationEdit'], resolve) | |||||
}, | |||||
{ ////阳光村务(新)-- 合同信息 | { ////阳光村务(新)-- 合同信息 | ||||
path: '/sunVillage_info/details', | path: '/sunVillage_info/details', | ||||
name: 'sunVillageInfoDetails', | name: 'sunVillageInfoDetails', | ||||
@@ -1,56 +1,69 @@ | |||||
<template> | <template> | ||||
<div class="home_wrapper"> | <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" v-model="queryParams.name" placeholder="搜索"> | |||||
<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" v-model="queryParams.name" placeholder="搜索"> | |||||
<!-- @input="getSearchList"--> | <!-- @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--> | |||||
<div class="item" v-for="(item,index) in applicationList"> | |||||
<div class="head_block"> | |||||
<i class="icon"></i> | |||||
<div class="title">{{item.name}}</div> | |||||
<div class="describe">{{item.useType}}</div> | |||||
</div> | |||||
<div class="order_block"> | |||||
<div class="order">{{item.code}}</div> | |||||
<div class="describe">{{item.assetType}}</div> | |||||
</div> | |||||
<div class="function_block"> | |||||
<div class="time"> | |||||
<i class="icon"></i> | |||||
{{item.buildTime}} | |||||
</div> | |||||
<div :class="{'state':true,'normal':item.assetStatus == '正常','sell':item.assetStatus=='出售','scrap':item.assetStatus=='报废'}">{{item.assetStatus}}</div> | |||||
<div class="value">原值<span class="amount">¥{{item.originalValue}}</span></div> | |||||
</div> | |||||
</div> | |||||
</van-list> | |||||
</div> | |||||
</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"> | |||||
<div class="item_box" @click="$router.push({name:'sunVillageInfoFixedAssetsDetail',query:{id:item.id}})"> | |||||
<div class="head_block"> | |||||
<i class="icon"></i> | |||||
<div class="title">{{item.name}}</div> | |||||
<div class="describe">{{item.useType}}</div> | |||||
</div> | |||||
<div class="order_block"> | |||||
<div class="order">{{item.code}}</div> | |||||
<div class="describe">{{item.assetType}}</div> | |||||
</div> | |||||
<div class="function_block"> | |||||
<div class="time"> | |||||
<i class="icon"></i> | |||||
{{item.buildTime}} | |||||
</div> | |||||
<div :class="{'state':true,'normal':item.assetStatus == '正常','sell':item.assetStatus=='出售','scrap':item.assetStatus=='报废'}">{{item.assetStatus}}</div> | |||||
<div class="value">原值<span class="amount">¥{{item.originalValue}}</span></div> | |||||
</div> | |||||
</div> | |||||
<template #right> | |||||
<div @click="handleDelete(item,index)" style="background-color: #ee0a24;height: 100%">删除</div> | |||||
<router-link :to="{name:'sunVillageInfoFixedAssetsEdit',query:{id:item.id}}" style="background-color: #07c160">修改</router-link> | |||||
<div @click="openLoader(item.id,index)" style="background-color: rgb(98,173,102,0.2);color: #62AD66;">附件</div> | |||||
</template> | |||||
</van-swipe-cell> | |||||
</van-list> | |||||
</div> | |||||
<!-- <div class="bottom_tips">--> | <!-- <div class="bottom_tips">--> | ||||
<!-- <span class="xs">已经到底啦</span>--> | <!-- <span class="xs">已经到底啦</span>--> | ||||
<!-- </div>--> | <!-- </div>--> | ||||
<van-popup v-model="show" lock-scroll closeable position="top" :style="{ height: '30%' }" > | |||||
<div style="padding: 0 13% 0 5%;"> | |||||
<van-divider>附件</van-divider> | |||||
<van-uploader v-model="fileList" :after-read="afterRead" @delete="deleteFile1" multiple /> | |||||
</div> | |||||
</van-popup> | |||||
</div> | </div> | ||||
</template> | </template> | ||||
<script> | <script> | ||||
import { permanentList } from "@/api/sunVillage_info/fixedAssets"; | |||||
import { permanentList , commonAttach , attachmentList , systemAttachment , delPermanent } from "@/api/sunVillage_info/fixedAssets"; | |||||
import request from '@/utils/request' | |||||
export default { | export default { | ||||
name: "certificateList", | name: "certificateList", | ||||
data() { | data() { | ||||
@@ -61,6 +74,8 @@ | |||||
auditStatus:[], | auditStatus:[], | ||||
loading: false, | loading: false, | ||||
finished: false, | finished: false, | ||||
show: false, | |||||
fileList:[], | |||||
listLength:'0', | listLength:'0', | ||||
searchInput:'', | searchInput:'', | ||||
queryParams:{ | queryParams:{ | ||||
@@ -69,7 +84,10 @@ | |||||
orderByColumn:'createTime', | orderByColumn:'createTime', | ||||
isAsc:'desc', | isAsc:'desc', | ||||
name:'', | name:'', | ||||
} | |||||
}, | |||||
uploadFiles1:[], | |||||
projectId:'', | |||||
projectIndex:'' | |||||
}; | }; | ||||
}, | }, | ||||
created() { | created() { | ||||
@@ -106,6 +124,75 @@ | |||||
}); | }); | ||||
}, 1000); | }, 1000); | ||||
}, | }, | ||||
afterRead(file) { | |||||
// 此时可以自行将文件上传至服务器 | |||||
this.uploadFiles1.push(file.file); | |||||
this.uploadFiles1.map((rr1,idx1) => { | |||||
let params1 = new FormData(); | |||||
params1.append("tableId", this.projectId); | |||||
params1.append("tableName", "t_asset_permanent"); | |||||
params1.append("bizPath", "asset"); | |||||
params1.append("fileType", this.projectIndex); | |||||
params1.append("file", rr1); | |||||
commonAttach(params1).then((r1) => { | |||||
this.$notify({ type: 'success', message: '上传成功' }); | |||||
}) | |||||
}) | |||||
}, | |||||
openLoader(id,index){ | |||||
this.show = true; | |||||
this.projectId = id; | |||||
this.projectIndex = index; | |||||
this.fileList = []; | |||||
let oData1= { | |||||
tableId: id, | |||||
tableName: "t_asset_permanent", | |||||
bizPath: "asset", | |||||
fileType: index, | |||||
} | |||||
attachmentList(oData1).then(res => { | |||||
res.rows.map(r => { | |||||
let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | |||||
this.fileList.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id}) | |||||
}) | |||||
}) | |||||
}, | |||||
/** 删除按钮操作 */ | |||||
handleDelete(row,index) { | |||||
let assetStatus = row.assetStatus ? row.assetStatus : data[0].assetStatus; | |||||
if (assetStatus === '2' || assetStatus === '3') { | |||||
this.$notify({ | |||||
message: "不允许删除已出售或已报废的资产", | |||||
type: "warning", | |||||
}); | |||||
return; | |||||
} | |||||
let useType = row.useType; | |||||
if(useType == 3) { | |||||
this.$notify({ | |||||
message: "出租或出借的资产不允许删除", | |||||
type: "warning", | |||||
}); | |||||
return ; | |||||
} | |||||
const ids = row.id || this.ids; | |||||
this.$dialog.alert( | |||||
{ | |||||
message:'是否确认删除固定资产?', | |||||
title:"警告", | |||||
confirmButtonText: "确定", | |||||
cancelButtonText: "取消", | |||||
} | |||||
) | |||||
.then(function () { | |||||
return delPermanent(ids); | |||||
}) | |||||
.then(() => { | |||||
this.applicationList.splice(index, 1); | |||||
this.$notify({ type: 'success', message: '删除成功' }); | |||||
}); | |||||
}, | |||||
getSearchList(){ | getSearchList(){ | ||||
this.loading = true; | this.loading = true; | ||||
if(this.applicationListSecond.length>0&&this.queryParams.name!=""){ | if(this.applicationListSecond.length>0&&this.queryParams.name!=""){ | ||||
@@ -122,6 +209,12 @@ | |||||
} | } | ||||
this.loading = false; | this.loading = false; | ||||
}, | }, | ||||
deleteFile1(file){ | |||||
console.log(file) | |||||
systemAttachment(file.id).then(res => { | |||||
this.$notify({ type: 'success', message: '删除成功' }); | |||||
}) | |||||
}, | |||||
goAdd(){ | goAdd(){ | ||||
this.$router.push('/sunVillage_info/fixedAssetsAdd') | this.$router.push('/sunVillage_info/fixedAssetsAdd') | ||||
}, | }, | ||||
@@ -211,8 +304,10 @@ | |||||
border-radius: 30px; | border-radius: 30px; | ||||
background: #fff; | background: #fff; | ||||
box-shadow: 4px 6px 5px rgba(63, 68, 75, 0.1); | box-shadow: 4px 6px 5px rgba(63, 68, 75, 0.1); | ||||
padding:25px 32px; | |||||
margin-bottom: 20px; | margin-bottom: 20px; | ||||
.item_box{ | |||||
padding:25px 32px; | |||||
} | |||||
.head_block{ | .head_block{ | ||||
height: 56px; | height: 56px; | ||||
display: flex; | display: flex; | ||||
@@ -321,6 +416,22 @@ | |||||
background: #e9e9e9; | 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; | |||||
} | |||||
} | |||||
} | } | ||||
@@ -10,12 +10,168 @@ | |||||
<img src="../../assets/images/sunVillage_info/add_icon_1.png" style="width:22PX;height:22PX;margin-right: 10px;"/> | <img src="../../assets/images/sunVillage_info/add_icon_1.png" style="width:22PX;height:22PX;margin-right: 10px;"/> | ||||
<p class="tit">基本信息</p> | <p class="tit">基本信息</p> | ||||
</div> | </div> | ||||
<van-field required v-model="username" label="资产名称" placeholder="资产名称" input-align="right" :border="false" /> | |||||
<van-field v-model="password" label="资产编码" placeholder="资产编码" input-align="right" :border="false" /> | |||||
<van-field required v-model="password" label="资产类别" placeholder="资产类别" input-align="right" is-link :border="false" /> | |||||
<van-field required v-model="password" label="增加方式" placeholder="增加方式" input-align="right" is-link :border="false" /> | |||||
<van-field required v-model="password" label="构建时间" placeholder="构建时间" input-align="right" is-link :border="false" /> | |||||
<van-field v-model="password" label="单元资产" placeholder="单元资产" input-align="right" :border="false" /> | |||||
<van-field required :rules="[{ required: true, message: '请填写资产名称' }]" v-model="form.name" label="资产名称" placeholder="资产名称" input-align="right" :border="false" /> | |||||
<van-field v-model="form.code" label="资产编码" placeholder="资产编码" input-align="right" :border="false" /> | |||||
<van-field | |||||
readonly | |||||
clickable | |||||
label="资产类别" | |||||
placeholder="请选择" | |||||
v-model="assetType" | |||||
@click="showAssetType = true" | |||||
input-align="right" | |||||
right-icon="arrow-down" | |||||
label-width="auto" | |||||
required | |||||
:border="false" | |||||
:rules="[{ required: true , message:'请选择资产类别' }]" | |||||
/> | |||||
<van-popup v-model="showAssetType" position="bottom"> | |||||
<van-picker | |||||
show-toolbar | |||||
:columns="assetTypeOptions" | |||||
@confirm="onConfirmAssetType" | |||||
@cancel="showAssetType = false" | |||||
/> | |||||
</van-popup> | |||||
<van-field | |||||
readonly | |||||
clickable | |||||
label="经营属性" | |||||
placeholder="请选择" | |||||
v-model="operationType" | |||||
@click="showOperationType = true" | |||||
input-align="right" | |||||
right-icon="arrow-down" | |||||
label-width="auto" | |||||
required | |||||
:border="false" | |||||
:rules="[{ required: true , message:'请选择经营属性' }]" | |||||
/> | |||||
<van-popup v-model="showOperationType" position="bottom"> | |||||
<van-picker | |||||
show-toolbar | |||||
:columns="operationTypeOptions" | |||||
@confirm="onConfirmOperationType" | |||||
@cancel="showOperationType = false" | |||||
/> | |||||
</van-popup> | |||||
<van-field | |||||
readonly | |||||
clickable | |||||
label="增加方式" | |||||
placeholder="请选择" | |||||
v-model="addType" | |||||
@click="showAddType = true" | |||||
input-align="right" | |||||
right-icon="arrow-down" | |||||
label-width="auto" | |||||
required | |||||
:border="false" | |||||
:rules="[{ required: true , message:'请选择增加方式' }]" | |||||
/> | |||||
<van-popup v-model="showAddType" position="bottom"> | |||||
<van-picker | |||||
show-toolbar | |||||
:columns="addTypeOptions" | |||||
@confirm="onConfirmAddType" | |||||
@cancel="showAddType = false" | |||||
/> | |||||
</van-popup> | |||||
<van-field | |||||
readonly | |||||
clickable | |||||
label="购建时间" | |||||
placeholder="请选择" | |||||
v-model="form.buildTime" | |||||
@click="showBuildTime = true" | |||||
input-align="right" | |||||
right-icon="arrow-down" | |||||
label-width="auto" | |||||
required | |||||
:border="false" | |||||
:rules="[{ required: true , message:'请选择购建时间' }]" | |||||
/> | |||||
<van-popup v-model="showBuildTime" position="bottom"> | |||||
<van-datetime-picker | |||||
type="date" | |||||
title="选择年月日" | |||||
@confirm="onConfirmBuildTime" | |||||
@cancel="showBuildTime = false" | |||||
/> | |||||
</van-popup> | |||||
<van-field v-model="form.location" label="坐落位置" placeholder="坐落位置" input-align="right" :border="false" /> | |||||
<van-field v-model="form.specification" label="规格型号" placeholder="规格型号" input-align="right" :border="false" /> | |||||
<van-field v-model="form.supplier" label="供应商" placeholder="供应商" input-align="right" :border="false" /> | |||||
<van-field | |||||
readonly | |||||
clickable | |||||
label="使用情况" | |||||
placeholder="请选择" | |||||
v-model="useType" | |||||
@click="showUseType = true" | |||||
input-align="right" | |||||
right-icon="arrow-down" | |||||
label-width="auto" | |||||
required | |||||
:border="false" | |||||
:rules="[{ required: true , message:'请选择使用情况' }]" | |||||
/> | |||||
<van-popup v-model="showUseType" position="bottom"> | |||||
<van-picker | |||||
show-toolbar | |||||
:columns="useTypeOptions" | |||||
@confirm="onConfirmUseType" | |||||
@cancel="showUseType = false" | |||||
/> | |||||
</van-popup> | |||||
<van-field | |||||
readonly | |||||
clickable | |||||
label="资产状态" | |||||
placeholder="请选择" | |||||
v-model="assetStatus" | |||||
@click="showAssetStatus = true" | |||||
input-align="right" | |||||
right-icon="arrow-down" | |||||
label-width="auto" | |||||
required | |||||
:border="false" | |||||
:rules="[{ required: true , message:'请选择资产状态' }]" | |||||
/> | |||||
<van-popup v-model="showAssetStatus" position="bottom"> | |||||
<van-picker | |||||
show-toolbar | |||||
:columns="assetStatusOptions" | |||||
@confirm="onConfirmAssetStatus" | |||||
@cancel="showAssetStatus = false" | |||||
/> | |||||
</van-popup> | |||||
<van-field name="radio" label="单元资产" input-align="right" :border="false"> | |||||
<template #input> | |||||
<van-radio-group v-model="form.isMin" direction="horizontal"> | |||||
<van-radio name="Y">是</van-radio> | |||||
<van-radio name="N">否</van-radio> | |||||
</van-radio-group> | |||||
</template> | |||||
</van-field> | |||||
<van-field name="radio" label="扶贫资产" input-align="right" :border="false"> | |||||
<template #input> | |||||
<van-radio-group v-model="form.isFormAsset" direction="horizontal"> | |||||
<van-radio name="Y">是</van-radio> | |||||
<van-radio name="N">否</van-radio> | |||||
</van-radio-group> | |||||
</template> | |||||
</van-field> | |||||
</div> | </div> | ||||
<div class="list_main"> | <div class="list_main"> | ||||
@@ -23,26 +179,100 @@ | |||||
<img src="../../assets/images/sunVillage_info/add_icon_1.png" style="width:22PX;height:22PX;margin-right: 10px;"/> | <img src="../../assets/images/sunVillage_info/add_icon_1.png" style="width:22PX;height:22PX;margin-right: 10px;"/> | ||||
<p class="tit">资产数据</p> | <p class="tit">资产数据</p> | ||||
</div> | </div> | ||||
<van-field required v-model="username" label="数量/面积" placeholder="数量/面积" input-align="right" :border="false" /> | |||||
<van-field v-model="password" label="计量单位" placeholder="计量单位" input-align="right" /> | |||||
<van-field required v-model="password" label="原值(元)" placeholder="原值(元)" input-align="right" is-link :border="false" /> | |||||
<van-field required v-model="password" label="净值(元)" placeholder="净值(元)" input-align="right" is-link :border="false" /> | |||||
<van-field required v-model="password" label="残值率N%" placeholder="残值率N%" input-align="right" is-link :border="false" /> | |||||
<van-field v-model="password" label="净残值(元)" placeholder="净残值(元)" input-align="right" :border="false" /> | |||||
<van-field v-model="password" label="资产清理科目" placeholder="资产清理科目" input-align="right" :border="false" /> | |||||
<van-field v-model="password" label="资产清理(元)" placeholder="资产清理(元)" input-align="right" :border="false" /> | |||||
<van-field required label="数量/面积" input-align="right" :border="false"> | |||||
<template #input> | |||||
<van-stepper v-model="form.quantity" input-width="100" :decimal-length="2" /> | |||||
</template> | |||||
</van-field> | |||||
<van-field required :rules="[{ required: true, message: '请填写计量单位' }]" v-model="form.unit" label="计量单位" placeholder="计量单位" input-align="right" :border="false" /> | |||||
<van-field required label="原值(元)" input-align="right" :border="false"> | |||||
<template #input> | |||||
<van-stepper v-model="form.originalValue" input-width="100" min="0.00" :decimal-length="2" @change="changeOriginalValue"/> | |||||
</template> | |||||
</van-field> | |||||
<van-field label="净值(元)" input-align="right" :border="false"> | |||||
<template #input> | |||||
<van-stepper v-model="form.netValue" disabled input-width="100" min="0.00" :decimal-length="2" /> | |||||
</template> | |||||
</van-field> | |||||
<van-field label="残值率N%" input-align="right" :border="false"> | |||||
<template #input> | |||||
<van-stepper v-model="form.residualsRate" input-width="100" @change="changeResidualsRate"/> | |||||
</template> | |||||
</van-field> | |||||
<van-field label="净残值(元)" input-align="right" :border="false"> | |||||
<template #input> | |||||
<van-stepper v-model="form.netSalvage" input-width="100" min="0.00" :decimal-length="2" @change="changeNetSalvage" /> | |||||
</template> | |||||
</van-field> | |||||
<van-field readonly v-model="form.fixedValue" label="资产清理(元)" placeholder="无需输入" input-align="right" :border="false" /> | |||||
<van-field readonly v-model="form.fixedSubject" label="资产清理科目" placeholder="资产清理科目" input-align="right" :border="false" /> | |||||
<van-field readonly v-model="form.depreciationSubject" label="折旧科目" placeholder="折旧科目" input-align="right" :border="false" /> | |||||
<van-field readonly v-model="form.depreciationFeeSubject" label="折旧费用科目" placeholder="折旧费用科目" input-align="right" :border="false" /> | |||||
<van-field v-model="form.remark" label="备注" placeholder="备注" input-align="right" :border="false" /> | |||||
</div> | |||||
<div class="list_main"> | |||||
<div class="titBox"> | |||||
<img src="../../assets/images/sunVillage_info/add_icon_1.png" style="width:22PX;height:22PX;margin-right: 10px;"/> | |||||
<p class="tit">折旧方式</p> | |||||
</div> | |||||
<van-field | |||||
readonly | |||||
clickable | |||||
label="折旧方式" | |||||
placeholder="请选择" | |||||
v-model="depreciationType" | |||||
@click="showDepreciationType = true" | |||||
input-align="right" | |||||
right-icon="arrow-down" | |||||
label-width="auto" | |||||
required | |||||
:border="false" | |||||
:rules="[{ required: true , message:'请选择折旧方式' }]" | |||||
/> | |||||
<van-popup v-model="showDepreciationType" position="bottom"> | |||||
<van-picker | |||||
show-toolbar | |||||
:columns="depreciationTypeOptions" | |||||
@confirm="onConfirmDepreciationType" | |||||
@cancel="showDepreciationType = false" | |||||
/> | |||||
</van-popup> | |||||
<van-field label="预计使用期数" input-align="right" :border="false"> | |||||
<template #input> | |||||
<van-stepper v-model="form.expectedYears" input-width="100" @change="changeExpectedYears" /> | |||||
</template> | |||||
</van-field> | |||||
<van-field readonly v-model="form.perYearDepreciationValue" label="每期折旧额" placeholder="(原值-净残值)/预计使用期数" input-align="right" :border="false" /> | |||||
<van-field label="已折旧期数" input-align="right" :border="false"> | |||||
<template #input> | |||||
<van-stepper v-model="form.depreciationYears" input-width="100" min="0" @change="changeDepreciationYears" /> | |||||
</template> | |||||
</van-field> | |||||
<van-field readonly v-model="form.depreciationValue" label="累计折旧(元)" placeholder="0" input-align="right" :border="false" @change="changeDepreciationValue" /> | |||||
</div> | </div> | ||||
<div style="margin: 16px;"> | <div style="margin: 16px;"> | ||||
<van-button round block type="primary" native-type="submit"> | <van-button round block type="primary" native-type="submit"> | ||||
提交 | |||||
保存 | |||||
</van-button> | </van-button> | ||||
</div> | </div> | ||||
</van-form> | </van-form> | ||||
</div> | </div> | ||||
</template> | </template> | ||||
<script> | <script> | ||||
import { permanentList } from "@/api/sunVillage_info/fixedAssets"; | |||||
import { addPermanent } from "@/api/sunVillage_info/fixedAssets"; | |||||
export default { | export default { | ||||
name: "certificateList", | name: "certificateList", | ||||
data() { | data() { | ||||
@@ -50,6 +280,56 @@ | |||||
applicationList:[], | applicationList:[], | ||||
applicationListSecond:[], | applicationListSecond:[], | ||||
assetStatusOptions:[], | assetStatusOptions:[], | ||||
form:{ | |||||
assetType:'151001', | |||||
operationType:'1', | |||||
addType:'1', | |||||
buildTime:'2020-01-01', | |||||
useType:'1', | |||||
assetStatus:'1', | |||||
isMin:'Y', | |||||
isFormAsset:'N', | |||||
quantity:1.00, | |||||
depreciationSubject:"152:累计折旧", | |||||
fixedSubject:"153:固定资产清理", | |||||
depreciationFeeSubject:"541005:管理费用-折旧及修理费", | |||||
depreciationType:'3', | |||||
expectedYears:1, | |||||
depreciationYears:0, | |||||
netValue:0.00, | |||||
originalValue:0.00, | |||||
residualsRate:1, | |||||
netSalvage:0.00, | |||||
fixedValue:null, | |||||
perYearDepreciationValue:null, | |||||
depreciationValue:0 | |||||
}, | |||||
//资产类别 | |||||
assetType:'房屋及建筑物', | |||||
showAssetType:false, | |||||
assetTypeOptions:[], | |||||
//经营属性 | |||||
operationType:'经营性', | |||||
showOperationType:false, | |||||
operationTypeOptions:[], | |||||
//增加方式 | |||||
addTypeOptions:[], | |||||
showAddType:false, | |||||
addType:'购入', | |||||
//使用情况 | |||||
useTypeOptions:[], | |||||
showUseType:false, | |||||
useType:'自用', | |||||
//资产状态 | |||||
assetStatusOptions:[], | |||||
showAssetStatus:false, | |||||
assetStatus:'正常', | |||||
//资产状态 | |||||
depreciationTypeOptions:[], | |||||
showDepreciationType:false, | |||||
depreciationType:'不折旧', | |||||
showBuildTime:false, | |||||
auditStatus:[], | auditStatus:[], | ||||
loading: false, | loading: false, | ||||
finished: false, | finished: false, | ||||
@@ -65,55 +345,138 @@ | |||||
}; | }; | ||||
}, | }, | ||||
created() { | created() { | ||||
this.houseGetDicts("asset_status").then((response) => { | |||||
this.assetStatusOptions = response.data; | |||||
}); | |||||
this.houseGetDicts("asset_type").then((response) => { | this.houseGetDicts("asset_type").then((response) => { | ||||
this.assetTypeOptions = response.data; | |||||
for(var i = 0 ; i < response.data.length ; i++){ | |||||
this.assetTypeOptions.push({text:response.data[i].dictLabel,value:response.data[i].dictValue}); | |||||
} | |||||
}); | |||||
this.houseGetDicts("operation_type").then((response) => { | |||||
for(var i = 0 ; i < response.data.length ; i++){ | |||||
this.operationTypeOptions.push({text:response.data[i].dictLabel,value:response.data[i].dictValue}); | |||||
} | |||||
}); | |||||
this.houseGetDicts("add_type").then((response) => { | |||||
for(var i = 0 ; i < response.data.length ; i++){ | |||||
this.addTypeOptions.push({text:response.data[i].dictLabel,value:response.data[i].dictValue}); | |||||
} | |||||
}); | }); | ||||
this.houseGetDicts("use_type").then((response) => { | this.houseGetDicts("use_type").then((response) => { | ||||
this.useTypeOptions = response.data; | |||||
for(var i = 0 ; i < response.data.length ; i++){ | |||||
this.useTypeOptions.push({text:response.data[i].dictLabel,value:response.data[i].dictValue}); | |||||
} | |||||
}); | |||||
this.houseGetDicts("asset_status").then((response) => { | |||||
for(var i = 0 ; i < response.data.length ; i++){ | |||||
this.assetStatusOptions.push({text:response.data[i].dictLabel,value:response.data[i].dictValue}); | |||||
} | |||||
}); | |||||
this.houseGetDicts("depreciation_type").then((response) => { | |||||
for(var i = 0 ; i < response.data.length ; i++){ | |||||
this.depreciationTypeOptions.push({text:response.data[i].dictLabel,value:response.data[i].dictValue}); | |||||
} | |||||
}); | }); | ||||
}, | }, | ||||
methods: { | methods: { | ||||
getList(){ | |||||
setTimeout(() => { | |||||
permanentList(this.queryParams).then(response => { | |||||
this.listLength = response.total; | |||||
for (var i = 0; i < response.rows.length; i++) { | |||||
response.rows[i].assetStatus = this.selectDictLabel(this.assetStatusOptions, response.rows[i].assetStatus); | |||||
response.rows[i].assetType = this.selectDictLabel(this.assetTypeOptions, response.rows[i].assetType); | |||||
response.rows[i].useType = this.selectDictLabel(this.useTypeOptions, response.rows[i].useType); | |||||
response.rows[i].originalValue = Number(response.rows[i].originalValue ).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); | |||||
onConfirmAssetType(data){ | |||||
this.assetType = data.text; | |||||
this.form.assetType = data.value; | |||||
this.showAssetType = false; | |||||
}, | }, | ||||
getSearchList(){ | |||||
this.loading = true; | |||||
if(this.applicationListSecond.length>0&&this.queryParams.name!=""){ | |||||
let newList = [] | |||||
for(let j = 0 ;j<this.applicationListSecond.length;j++){ | |||||
if(this.applicationListSecond[j].name.indexOf(this.queryParams.name)>-1){ | |||||
newList.push(this.applicationListSecond[j]); | |||||
} | |||||
} | |||||
this.applicationList = newList | |||||
onConfirmOperationType(data){ | |||||
this.operationType = data.text; | |||||
this.form.operationType = data.value; | |||||
this.showOperationType = false; | |||||
}, | |||||
onConfirmAddType(data){ | |||||
this.addType = data.text; | |||||
this.form.addType = data.value; | |||||
this.showAddType = false; | |||||
}, | |||||
onConfirmUseType(data){ | |||||
this.useType = data.text; | |||||
this.form.useType = data.value; | |||||
this.showUseType = false; | |||||
}, | |||||
onConfirmAssetStatus(data){ | |||||
this.assetStatus = data.text; | |||||
this.form.assetStatus = data.value; | |||||
this.showAssetStatus = false; | |||||
}, | |||||
onConfirmDepreciationType(data){ | |||||
this.depreciationType = data.text; | |||||
this.form.depreciationType = data.value; | |||||
this.showDepreciationType = false; | |||||
}, | |||||
onConfirmBuildTime(data){ | |||||
this.form.buildTime = this.format(data,'yyyy-MM-dd'); | |||||
this.showBuildTime = false; | |||||
}, | |||||
// 原值变动监听 | |||||
changeOriginalValue(val) { | |||||
if (this.form.depreciationValue != null) { | |||||
// 净值 = 原值-累计折旧 | |||||
this.form.netValue = val - this.form.depreciationValue; | |||||
} | |||||
if (this.form.residualsRate != null) { | |||||
// 净残值 = 原值*残值率 | |||||
this.form.netSalvage = (val * this.form.residualsRate) / 100; | |||||
} | } | ||||
if(this.queryParams.name==""){ | |||||
this.applicationList = this.applicationListSecond; | |||||
if (this.form.netSalvage != null && this.form.expectedYears != null) { | |||||
// 每年折旧额 = (原值-净残值)/ 预计使用年数 | |||||
this.form.perYearDepreciationValue = | |||||
(val - this.form.netSalvage) / this.form.expectedYears; | |||||
} | } | ||||
this.loading = false; | |||||
}, | }, | ||||
// 累计折旧变动监听 | |||||
changeDepreciationValue(val) { | |||||
if (this.form.originalValue != null) { | |||||
// 净值 = 原值-累计折旧 | |||||
this.form.netValue = this.form.originalValue - val; | |||||
} | |||||
}, | |||||
// 残值率变动监听 | |||||
changeResidualsRate(val) { | |||||
if (this.form.originalValue != null) { | |||||
// 净残值 = 原值*残值率 | |||||
this.form.netSalvage = (this.form.originalValue * val) / 100; | |||||
} | |||||
}, | |||||
// 净残值变动监听 | |||||
changeNetSalvage(val) { | |||||
if (this.form.originalValue != null && this.form.expectedYears != null) { | |||||
// 每年折旧额 = (原值-净残值)/ 预计使用年数 | |||||
this.form.perYearDepreciationValue = | |||||
(this.form.originalValue - val) / this.form.expectedYears; | |||||
} | |||||
}, | |||||
// 预计使用年数变动监听 | |||||
changeExpectedYears(val) { | |||||
if (this.form.originalValue != null && this.form.netSalvage != null) { | |||||
// 每年折旧额:(原值-净残值)/ 预计使用年数 | |||||
this.form.perYearDepreciationValue = | |||||
(this.form.originalValue - this.form.netSalvage) / val; | |||||
} | |||||
}, | |||||
// 已折旧年数变动监听 | |||||
changeDepreciationYears(val) { | |||||
if (this.form.perYearDepreciationValue != null) { | |||||
this.form.depreciationValue = val * this.form.perYearDepreciationValue; | |||||
} | |||||
}, | |||||
onSubmit(){ | |||||
addPermanent(this.form).then((response) => { | |||||
if (response.code == 200){ | |||||
this.$notify({ type: 'success', message: '新增成功' }); | |||||
setTimeout(function(){ | |||||
history.back(-1); | |||||
},2000) | |||||
} | |||||
}); | |||||
} | |||||
}, | }, | ||||
} | } | ||||
</script> | </script> | ||||
@@ -0,0 +1,517 @@ | |||||
<template> | |||||
<div class="home_wrapper"> | |||||
<div class="header_main"> | |||||
固定资产 | |||||
<div class="return_btn" @click="onClickLeft"></div> | |||||
</div> | |||||
<div class="list_main"> | |||||
<div class="titBox"> | |||||
<img src="../../assets/images/sunVillage_info/add_icon_1.png" style="width:22PX;height:22PX;margin-right: 10px;"/> | |||||
<p class="tit">基本信息</p> | |||||
</div> | |||||
<van-field readonly required :rules="[{ required: true, message: '请填写资产名称' }]" v-model="form.name" label="资产名称" placeholder="资产名称" input-align="right" :border="false" /> | |||||
<van-field readonly v-model="form.code" label="资产编码" placeholder="资产编码" input-align="right" :border="false" /> | |||||
<van-field | |||||
readonly | |||||
clickable | |||||
label="资产类别" | |||||
placeholder="请选择" | |||||
v-model="assetType" | |||||
input-align="right" | |||||
right-icon="arrow-down" | |||||
label-width="auto" | |||||
required | |||||
:border="false" | |||||
:rules="[{ required: true , message:'请选择资产类别' }]" | |||||
/> | |||||
<van-popup v-model="showAssetType" position="bottom"> | |||||
<van-picker | |||||
show-toolbar | |||||
:columns="assetTypeOptions" | |||||
@confirm="onConfirmAssetType" | |||||
@cancel="showAssetType = false" | |||||
/> | |||||
</van-popup> | |||||
<van-field | |||||
readonly | |||||
clickable | |||||
label="经营属性" | |||||
placeholder="请选择" | |||||
v-model="operationType" | |||||
input-align="right" | |||||
right-icon="arrow-down" | |||||
label-width="auto" | |||||
required | |||||
:border="false" | |||||
:rules="[{ required: true , message:'请选择经营属性' }]" | |||||
/> | |||||
<van-popup v-model="showOperationType" position="bottom"> | |||||
<van-picker | |||||
show-toolbar | |||||
:columns="operationTypeOptions" | |||||
@confirm="onConfirmOperationType" | |||||
@cancel="showOperationType = false" | |||||
/> | |||||
</van-popup> | |||||
<van-field | |||||
readonly | |||||
clickable | |||||
label="增加方式" | |||||
placeholder="请选择" | |||||
v-model="addType" | |||||
input-align="right" | |||||
right-icon="arrow-down" | |||||
label-width="auto" | |||||
required | |||||
:border="false" | |||||
:rules="[{ required: true , message:'请选择增加方式' }]" | |||||
/> | |||||
<van-popup v-model="showAddType" position="bottom"> | |||||
<van-picker | |||||
show-toolbar | |||||
:columns="addTypeOptions" | |||||
@confirm="onConfirmAddType" | |||||
@cancel="showAddType = false" | |||||
/> | |||||
</van-popup> | |||||
<van-field | |||||
readonly | |||||
clickable | |||||
label="购建时间" | |||||
placeholder="请选择" | |||||
v-model="form.buildTime" | |||||
input-align="right" | |||||
right-icon="arrow-down" | |||||
label-width="auto" | |||||
required | |||||
:border="false" | |||||
:rules="[{ required: true , message:'请选择购建时间' }]" | |||||
/> | |||||
<van-popup v-model="showBuildTime" position="bottom"> | |||||
<van-datetime-picker | |||||
type="date" | |||||
title="选择年月日" | |||||
@confirm="onConfirmBuildTime" | |||||
@cancel="showBuildTime = false" | |||||
/> | |||||
</van-popup> | |||||
<van-field readonly v-model="form.location" label="坐落位置" placeholder="坐落位置" input-align="right" :border="false" /> | |||||
<van-field readonly v-model="form.specification" label="规格型号" placeholder="规格型号" input-align="right" :border="false" /> | |||||
<van-field readonly v-model="form.supplier" label="供应商" placeholder="供应商" input-align="right" :border="false" /> | |||||
<van-field | |||||
readonly | |||||
clickable | |||||
label="使用情况" | |||||
placeholder="请选择" | |||||
v-model="useType" | |||||
input-align="right" | |||||
right-icon="arrow-down" | |||||
label-width="auto" | |||||
required | |||||
:border="false" | |||||
:rules="[{ required: true , message:'请选择使用情况' }]" | |||||
/> | |||||
<van-popup v-model="showUseType" position="bottom"> | |||||
<van-picker | |||||
show-toolbar | |||||
:columns="useTypeOptions" | |||||
@confirm="onConfirmUseType" | |||||
@cancel="showUseType = false" | |||||
/> | |||||
</van-popup> | |||||
<van-field | |||||
readonly | |||||
clickable | |||||
label="资产状态" | |||||
placeholder="请选择" | |||||
v-model="assetStatus" | |||||
input-align="right" | |||||
right-icon="arrow-down" | |||||
label-width="auto" | |||||
required | |||||
:border="false" | |||||
:rules="[{ required: true , message:'请选择资产状态' }]" | |||||
/> | |||||
<van-popup v-model="showAssetStatus" position="bottom"> | |||||
<van-picker | |||||
show-toolbar | |||||
:columns="assetStatusOptions" | |||||
@confirm="onConfirmAssetStatus" | |||||
@cancel="showAssetStatus = false" | |||||
/> | |||||
</van-popup> | |||||
<van-field name="radio" label="单元资产" input-align="right" :border="false"> | |||||
<template #input> | |||||
<van-radio-group v-model="form.isMin" direction="horizontal"> | |||||
<van-radio name="Y" disabled>是</van-radio> | |||||
<van-radio name="N" disabled>否</van-radio> | |||||
</van-radio-group> | |||||
</template> | |||||
</van-field> | |||||
<van-field name="radio" label="扶贫资产" input-align="right" :border="false"> | |||||
<template #input> | |||||
<van-radio-group v-model="form.isFormAsset" direction="horizontal"> | |||||
<van-radio name="Y" disabled>是</van-radio> | |||||
<van-radio name="N" disabled>否</van-radio> | |||||
</van-radio-group> | |||||
</template> | |||||
</van-field> | |||||
</div> | |||||
<div class="list_main"> | |||||
<div class="titBox"> | |||||
<img src="../../assets/images/sunVillage_info/add_icon_1.png" style="width:22PX;height:22PX;margin-right: 10px;"/> | |||||
<p class="tit">资产数据</p> | |||||
</div> | |||||
<van-field required label="数量/面积" input-align="right" :border="false"> | |||||
<template #input> | |||||
<van-stepper disabled v-model="form.quantity" input-width="100" :decimal-length="2" /> | |||||
</template> | |||||
</van-field> | |||||
<van-field required :rules="[{ required: true, message: '请填写计量单位' }]" v-model="form.unit" label="计量单位" placeholder="计量单位" input-align="right" :border="false" /> | |||||
<van-field required label="原值(元)" input-align="right" :border="false"> | |||||
<template #input> | |||||
<van-stepper disabled v-model="form.originalValue" input-width="100" min="0.00" :decimal-length="2" @change="changeOriginalValue"/> | |||||
</template> | |||||
</van-field> | |||||
<van-field label="净值(元)" input-align="right" :border="false"> | |||||
<template #input> | |||||
<van-stepper v-model="form.netValue" disabled input-width="100" min="0.00" :decimal-length="2" /> | |||||
</template> | |||||
</van-field> | |||||
<van-field label="残值率N%" input-align="right" :border="false"> | |||||
<template #input> | |||||
<van-stepper disabled v-model="form.residualsRate" input-width="100" @change="changeResidualsRate"/> | |||||
</template> | |||||
</van-field> | |||||
<van-field label="净残值(元)" input-align="right" :border="false"> | |||||
<template #input> | |||||
<van-stepper disabled v-model="form.netSalvage" input-width="100" min="0.00" :decimal-length="2" @change="changeNetSalvage" /> | |||||
</template> | |||||
</van-field> | |||||
<van-field readonly v-model="form.fixedValue" label="资产清理(元)" placeholder="无需输入" input-align="right" :border="false" /> | |||||
<van-field readonly v-model="form.fixedSubject" label="资产清理科目" placeholder="资产清理科目" input-align="right" :border="false" /> | |||||
<van-field readonly v-model="form.depreciationSubject" label="折旧科目" placeholder="折旧科目" input-align="right" :border="false" /> | |||||
<van-field readonly v-model="form.depreciationFeeSubject" label="折旧费用科目" placeholder="折旧费用科目" input-align="right" :border="false" /> | |||||
<van-field readonly v-model="form.remark" label="备注" placeholder="备注" input-align="right" :border="false" /> | |||||
</div> | |||||
<div class="list_main"> | |||||
<div class="titBox"> | |||||
<img src="../../assets/images/sunVillage_info/add_icon_1.png" style="width:22PX;height:22PX;margin-right: 10px;"/> | |||||
<p class="tit">折旧方式</p> | |||||
</div> | |||||
<van-field | |||||
readonly | |||||
clickable | |||||
label="折旧方式" | |||||
placeholder="请选择" | |||||
v-model="depreciationType" | |||||
input-align="right" | |||||
right-icon="arrow-down" | |||||
label-width="auto" | |||||
required | |||||
:border="false" | |||||
:rules="[{ required: true , message:'请选择折旧方式' }]" | |||||
/> | |||||
<van-popup v-model="showDepreciationType" position="bottom"> | |||||
<van-picker | |||||
show-toolbar | |||||
:columns="depreciationTypeOptions" | |||||
@confirm="onConfirmDepreciationType" | |||||
@cancel="showDepreciationType = false" | |||||
/> | |||||
</van-popup> | |||||
<van-field label="预计使用期数" input-align="right" :border="false"> | |||||
<template #input> | |||||
<van-stepper disabled v-model="form.expectedYears" input-width="100" @change="changeExpectedYears" /> | |||||
</template> | |||||
</van-field> | |||||
<van-field readonly v-model="form.perYearDepreciationValue" label="每期折旧额" placeholder="(原值-净残值)/预计使用期数" input-align="right" :border="false" /> | |||||
<van-field label="已折旧期数" input-align="right" :border="false"> | |||||
<template #input> | |||||
<van-stepper disabled v-model="form.depreciationYears" input-width="100" min="0" @change="changeDepreciationYears" /> | |||||
</template> | |||||
</van-field> | |||||
<van-field readonly v-model="form.depreciationValue" label="累计折旧(元)" placeholder="0" input-align="right" :border="false" @change="changeDepreciationValue" /> | |||||
</div> | |||||
</div> | |||||
</template> | |||||
<script> | |||||
import { getPermanent } from "@/api/sunVillage_info/fixedAssets"; | |||||
export default { | |||||
name: "certificateList", | |||||
data() { | |||||
return { | |||||
applicationList:[], | |||||
applicationListSecond:[], | |||||
assetStatusOptions:[], | |||||
form:{ | |||||
}, | |||||
//资产类别 | |||||
assetType:'房屋及建筑物', | |||||
showAssetType:false, | |||||
assetTypeOptions:[], | |||||
//经营属性 | |||||
operationType:'经营性', | |||||
showOperationType:false, | |||||
operationTypeOptions:[], | |||||
//增加方式 | |||||
addTypeOptions:[], | |||||
showAddType:false, | |||||
addType:'购入', | |||||
//使用情况 | |||||
useTypeOptions:[], | |||||
showUseType:false, | |||||
useType:'自用', | |||||
//资产状态 | |||||
assetStatusOptions:[], | |||||
showAssetStatus:false, | |||||
assetStatus:'正常', | |||||
//资产状态 | |||||
depreciationTypeOptions:[], | |||||
showDepreciationType:false, | |||||
depreciationType:'不折旧', | |||||
showBuildTime:false, | |||||
auditStatus:[], | |||||
loading: false, | |||||
finished: false, | |||||
listLength:'0', | |||||
searchInput:'', | |||||
queryParams:{ | |||||
pageNum:1, | |||||
pageSize:10, | |||||
orderByColumn:'createTime', | |||||
isAsc:'desc', | |||||
name:'', | |||||
} | |||||
}; | |||||
}, | |||||
created() { | |||||
this.houseGetDicts("asset_type").then((response) => { | |||||
this.assetTypeOptions = response.data; | |||||
}); | |||||
this.houseGetDicts("operation_type").then((response) => { | |||||
this.operationTypeOptions = response.data; | |||||
}); | |||||
this.houseGetDicts("add_type").then((response) => { | |||||
this.addTypeOptions = response.data; | |||||
}); | |||||
this.houseGetDicts("use_type").then((response) => { | |||||
this.useTypeOptions = response.data; | |||||
}); | |||||
this.houseGetDicts("asset_status").then((response) => { | |||||
this.assetStatusOptions = response.data; | |||||
}); | |||||
this.houseGetDicts("depreciation_type").then((response) => { | |||||
this.depreciationTypeOptions = response.data; | |||||
}); | |||||
this.getDetail(this.$route.query.id) | |||||
}, | |||||
methods: { | |||||
getDetail(id){ | |||||
getPermanent(id).then((response) => { | |||||
if (response.code == 200){ | |||||
this.form = response.data; | |||||
this.assetType = this.selectDictLabel(this.assetTypeOptions, response.data.assetType); | |||||
this.operationType = this.selectDictLabel(this.operationTypeOptions, response.data.operationType); | |||||
this.addType = this.selectDictLabel(this.addTypeOptions, response.data.addType); | |||||
this.useType = this.selectDictLabel(this.useTypeOptions, response.data.useType); | |||||
this.assetStatus = this.selectDictLabel(this.assetStatusOptions, response.data.assetStatus); | |||||
this.depreciationType = this.selectDictLabel(this.depreciationTypeOptions, response.data.depreciationType); | |||||
} | |||||
}); | |||||
}, | |||||
onConfirmAssetType(data){ | |||||
this.assetType = data.text; | |||||
this.form.assetType = data.value; | |||||
this.showAssetType = false; | |||||
}, | |||||
onConfirmOperationType(data){ | |||||
this.operationType = data.text; | |||||
this.form.operationType = data.value; | |||||
this.showOperationType = false; | |||||
}, | |||||
onConfirmAddType(data){ | |||||
this.addType = data.text; | |||||
this.form.addType = data.value; | |||||
this.showAddType = false; | |||||
}, | |||||
onConfirmUseType(data){ | |||||
this.useType = data.text; | |||||
this.form.useType = data.value; | |||||
this.showUseType = false; | |||||
}, | |||||
onConfirmAssetStatus(data){ | |||||
this.assetStatus = data.text; | |||||
this.form.assetStatus = data.value; | |||||
this.showAssetStatus = false; | |||||
}, | |||||
onConfirmDepreciationType(data){ | |||||
this.depreciationType = data.text; | |||||
this.form.depreciationType = data.value; | |||||
this.showDepreciationType = false; | |||||
}, | |||||
onConfirmBuildTime(data){ | |||||
this.form.buildTime = this.format(data,'yyyy-MM-dd'); | |||||
this.showBuildTime = false; | |||||
}, | |||||
// 原值变动监听 | |||||
changeOriginalValue(val) { | |||||
if (this.form.depreciationValue != null) { | |||||
// 净值 = 原值-累计折旧 | |||||
this.form.netValue = val - this.form.depreciationValue; | |||||
} | |||||
if (this.form.residualsRate != null) { | |||||
// 净残值 = 原值*残值率 | |||||
this.form.netSalvage = (val * this.form.residualsRate) / 100; | |||||
} | |||||
if (this.form.netSalvage != null && this.form.expectedYears != null) { | |||||
// 每年折旧额 = (原值-净残值)/ 预计使用年数 | |||||
this.form.perYearDepreciationValue = | |||||
(val - this.form.netSalvage) / this.form.expectedYears; | |||||
} | |||||
}, | |||||
// 累计折旧变动监听 | |||||
changeDepreciationValue(val) { | |||||
if (this.form.originalValue != null) { | |||||
// 净值 = 原值-累计折旧 | |||||
this.form.netValue = this.form.originalValue - val; | |||||
} | |||||
}, | |||||
// 残值率变动监听 | |||||
changeResidualsRate(val) { | |||||
if (this.form.originalValue != null) { | |||||
// 净残值 = 原值*残值率 | |||||
this.form.netSalvage = (this.form.originalValue * val) / 100; | |||||
} | |||||
}, | |||||
// 净残值变动监听 | |||||
changeNetSalvage(val) { | |||||
if (this.form.originalValue != null && this.form.expectedYears != null) { | |||||
// 每年折旧额 = (原值-净残值)/ 预计使用年数 | |||||
this.form.perYearDepreciationValue = | |||||
(this.form.originalValue - val) / this.form.expectedYears; | |||||
} | |||||
}, | |||||
// 预计使用年数变动监听 | |||||
changeExpectedYears(val) { | |||||
if (this.form.originalValue != null && this.form.netSalvage != null) { | |||||
// 每年折旧额:(原值-净残值)/ 预计使用年数 | |||||
this.form.perYearDepreciationValue = | |||||
(this.form.originalValue - this.form.netSalvage) / val; | |||||
} | |||||
}, | |||||
// 已折旧年数变动监听 | |||||
changeDepreciationYears(val) { | |||||
if (this.form.perYearDepreciationValue != null) { | |||||
this.form.depreciationValue = val * this.form.perYearDepreciationValue; | |||||
} | |||||
}, | |||||
}, | |||||
} | |||||
</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; | |||||
} | |||||
} | |||||
.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,579 @@ | |||||
<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_1.png" style="width:22PX;height:22PX;margin-right: 10px;"/> | |||||
<p class="tit">基本信息</p> | |||||
</div> | |||||
<van-field required :rules="[{ required: true, message: '请填写资产名称' }]" v-model="form.name" label="资产名称" placeholder="资产名称" input-align="right" :border="false" /> | |||||
<van-field v-model="form.code" label="资产编码" placeholder="资产编码" input-align="right" :border="false" /> | |||||
<van-field | |||||
readonly | |||||
clickable | |||||
label="资产类别" | |||||
placeholder="请选择" | |||||
v-model="assetType" | |||||
@click="showAssetType = true" | |||||
input-align="right" | |||||
right-icon="arrow-down" | |||||
label-width="auto" | |||||
required | |||||
:border="false" | |||||
:rules="[{ required: true , message:'请选择资产类别' }]" | |||||
/> | |||||
<van-popup v-model="showAssetType" position="bottom"> | |||||
<van-picker | |||||
show-toolbar | |||||
:columns="assetTypeOptions" | |||||
@confirm="onConfirmAssetType" | |||||
@cancel="showAssetType = false" | |||||
/> | |||||
</van-popup> | |||||
<van-field | |||||
readonly | |||||
clickable | |||||
label="经营属性" | |||||
placeholder="请选择" | |||||
v-model="operationType" | |||||
@click="showOperationType = true" | |||||
input-align="right" | |||||
right-icon="arrow-down" | |||||
label-width="auto" | |||||
required | |||||
:border="false" | |||||
:rules="[{ required: true , message:'请选择经营属性' }]" | |||||
/> | |||||
<van-popup v-model="showOperationType" position="bottom"> | |||||
<van-picker | |||||
show-toolbar | |||||
:columns="operationTypeOptions" | |||||
@confirm="onConfirmOperationType" | |||||
@cancel="showOperationType = false" | |||||
/> | |||||
</van-popup> | |||||
<van-field | |||||
readonly | |||||
clickable | |||||
label="增加方式" | |||||
placeholder="请选择" | |||||
v-model="addType" | |||||
@click="showAddType = true" | |||||
input-align="right" | |||||
right-icon="arrow-down" | |||||
label-width="auto" | |||||
required | |||||
:border="false" | |||||
:rules="[{ required: true , message:'请选择增加方式' }]" | |||||
/> | |||||
<van-popup v-model="showAddType" position="bottom"> | |||||
<van-picker | |||||
show-toolbar | |||||
:columns="addTypeOptions" | |||||
@confirm="onConfirmAddType" | |||||
@cancel="showAddType = false" | |||||
/> | |||||
</van-popup> | |||||
<van-field | |||||
readonly | |||||
clickable | |||||
label="购建时间" | |||||
placeholder="请选择" | |||||
v-model="form.buildTime" | |||||
@click="showBuildTime = true" | |||||
input-align="right" | |||||
right-icon="arrow-down" | |||||
label-width="auto" | |||||
required | |||||
:border="false" | |||||
:rules="[{ required: true , message:'请选择购建时间' }]" | |||||
/> | |||||
<van-popup v-model="showBuildTime" position="bottom"> | |||||
<van-datetime-picker | |||||
type="date" | |||||
title="选择年月日" | |||||
@confirm="onConfirmBuildTime" | |||||
@cancel="showBuildTime = false" | |||||
/> | |||||
</van-popup> | |||||
<van-field v-model="form.location" label="坐落位置" placeholder="坐落位置" input-align="right" :border="false" /> | |||||
<van-field v-model="form.specification" label="规格型号" placeholder="规格型号" input-align="right" :border="false" /> | |||||
<van-field v-model="form.supplier" label="供应商" placeholder="供应商" input-align="right" :border="false" /> | |||||
<van-field | |||||
readonly | |||||
clickable | |||||
label="使用情况" | |||||
placeholder="请选择" | |||||
v-model="useType" | |||||
@click="showUseType = true" | |||||
input-align="right" | |||||
right-icon="arrow-down" | |||||
label-width="auto" | |||||
required | |||||
:border="false" | |||||
:rules="[{ required: true , message:'请选择使用情况' }]" | |||||
/> | |||||
<van-popup v-model="showUseType" position="bottom"> | |||||
<van-picker | |||||
show-toolbar | |||||
:columns="useTypeOptions" | |||||
@confirm="onConfirmUseType" | |||||
@cancel="showUseType = false" | |||||
/> | |||||
</van-popup> | |||||
<van-field | |||||
readonly | |||||
clickable | |||||
label="资产状态" | |||||
placeholder="请选择" | |||||
v-model="assetStatus" | |||||
@click="showAssetStatus = true" | |||||
input-align="right" | |||||
right-icon="arrow-down" | |||||
label-width="auto" | |||||
required | |||||
:border="false" | |||||
:rules="[{ required: true , message:'请选择资产状态' }]" | |||||
/> | |||||
<van-popup v-model="showAssetStatus" position="bottom"> | |||||
<van-picker | |||||
show-toolbar | |||||
:columns="assetStatusOptions" | |||||
@confirm="onConfirmAssetStatus" | |||||
@cancel="showAssetStatus = false" | |||||
/> | |||||
</van-popup> | |||||
<van-field name="radio" label="单元资产" input-align="right" :border="false"> | |||||
<template #input> | |||||
<van-radio-group v-model="form.isMin" direction="horizontal"> | |||||
<van-radio name="Y">是</van-radio> | |||||
<van-radio name="N">否</van-radio> | |||||
</van-radio-group> | |||||
</template> | |||||
</van-field> | |||||
<van-field name="radio" label="扶贫资产" input-align="right" :border="false"> | |||||
<template #input> | |||||
<van-radio-group v-model="form.isFormAsset" direction="horizontal"> | |||||
<van-radio name="Y">是</van-radio> | |||||
<van-radio name="N">否</van-radio> | |||||
</van-radio-group> | |||||
</template> | |||||
</van-field> | |||||
</div> | |||||
<div class="list_main"> | |||||
<div class="titBox"> | |||||
<img src="../../assets/images/sunVillage_info/add_icon_1.png" style="width:22PX;height:22PX;margin-right: 10px;"/> | |||||
<p class="tit">资产数据</p> | |||||
</div> | |||||
<van-field required label="数量/面积" input-align="right" :border="false"> | |||||
<template #input> | |||||
<van-stepper v-model="form.quantity" input-width="100" :decimal-length="2" /> | |||||
</template> | |||||
</van-field> | |||||
<van-field required :rules="[{ required: true, message: '请填写计量单位' }]" v-model="form.unit" label="计量单位" placeholder="计量单位" input-align="right" :border="false" /> | |||||
<van-field required label="原值(元)" input-align="right" :border="false"> | |||||
<template #input> | |||||
<van-stepper v-model="form.originalValue" input-width="100" min="0.00" :decimal-length="2" @change="changeOriginalValue"/> | |||||
</template> | |||||
</van-field> | |||||
<van-field label="净值(元)" input-align="right" :border="false"> | |||||
<template #input> | |||||
<van-stepper v-model="form.netValue" disabled input-width="100" min="0.00" :decimal-length="2" /> | |||||
</template> | |||||
</van-field> | |||||
<van-field label="残值率N%" input-align="right" :border="false"> | |||||
<template #input> | |||||
<van-stepper v-model="form.residualsRate" input-width="100" @change="changeResidualsRate"/> | |||||
</template> | |||||
</van-field> | |||||
<van-field label="净残值(元)" input-align="right" :border="false"> | |||||
<template #input> | |||||
<van-stepper v-model="form.netSalvage" input-width="100" min="0.00" :decimal-length="2" @change="changeNetSalvage" /> | |||||
</template> | |||||
</van-field> | |||||
<van-field readonly v-model="form.fixedValue" label="资产清理(元)" placeholder="无需输入" input-align="right" :border="false" /> | |||||
<van-field readonly v-model="form.fixedSubject" label="资产清理科目" placeholder="资产清理科目" input-align="right" :border="false" /> | |||||
<van-field readonly v-model="form.depreciationSubject" label="折旧科目" placeholder="折旧科目" input-align="right" :border="false" /> | |||||
<van-field readonly v-model="form.depreciationFeeSubject" label="折旧费用科目" placeholder="折旧费用科目" input-align="right" :border="false" /> | |||||
<van-field v-model="form.remark" label="备注" placeholder="备注" input-align="right" :border="false" /> | |||||
</div> | |||||
<div class="list_main"> | |||||
<div class="titBox"> | |||||
<img src="../../assets/images/sunVillage_info/add_icon_1.png" style="width:22PX;height:22PX;margin-right: 10px;"/> | |||||
<p class="tit">折旧方式</p> | |||||
</div> | |||||
<van-field | |||||
readonly | |||||
clickable | |||||
label="折旧方式" | |||||
placeholder="请选择" | |||||
v-model="depreciationType" | |||||
@click="showDepreciationType = true" | |||||
input-align="right" | |||||
right-icon="arrow-down" | |||||
label-width="auto" | |||||
required | |||||
:border="false" | |||||
:rules="[{ required: true , message:'请选择折旧方式' }]" | |||||
/> | |||||
<van-popup v-model="showDepreciationType" position="bottom"> | |||||
<van-picker | |||||
show-toolbar | |||||
:columns="depreciationTypeOptions" | |||||
@confirm="onConfirmDepreciationType" | |||||
@cancel="showDepreciationType = false" | |||||
/> | |||||
</van-popup> | |||||
<van-field label="预计使用期数" input-align="right" :border="false"> | |||||
<template #input> | |||||
<van-stepper v-model="form.expectedYears" input-width="100" @change="changeExpectedYears" /> | |||||
</template> | |||||
</van-field> | |||||
<van-field readonly v-model="form.perYearDepreciationValue" label="每期折旧额" placeholder="(原值-净残值)/预计使用期数" input-align="right" :border="false" /> | |||||
<van-field label="已折旧期数" input-align="right" :border="false"> | |||||
<template #input> | |||||
<van-stepper v-model="form.depreciationYears" input-width="100" min="0" @change="changeDepreciationYears" /> | |||||
</template> | |||||
</van-field> | |||||
<van-field readonly v-model="form.depreciationValue" label="累计折旧(元)" placeholder="0" input-align="right" :border="false" @change="changeDepreciationValue" /> | |||||
</div> | |||||
<div style="margin: 16px;"> | |||||
<van-button round block type="primary" native-type="submit"> | |||||
保存 | |||||
</van-button> | |||||
</div> | |||||
</van-form> | |||||
</div> | |||||
</template> | |||||
<script> | |||||
import { updatePermanent , getPermanent } from "@/api/sunVillage_info/fixedAssets"; | |||||
export default { | |||||
name: "certificateList", | |||||
data() { | |||||
return { | |||||
applicationList:[], | |||||
applicationListSecond:[], | |||||
assetStatusOptions:[], | |||||
form:{ | |||||
assetType:'151001', | |||||
operationType:'1', | |||||
addType:'1', | |||||
buildTime:'2020-01-01', | |||||
useType:'1', | |||||
assetStatus:'1', | |||||
isMin:'Y', | |||||
isFormAsset:'N', | |||||
quantity:1.00, | |||||
depreciationSubject:"152:累计折旧", | |||||
fixedSubject:"153:固定资产清理", | |||||
depreciationFeeSubject:"541005:管理费用-折旧及修理费", | |||||
depreciationType:'3', | |||||
expectedYears:1, | |||||
depreciationYears:0, | |||||
netValue:0.00, | |||||
originalValue:0.00, | |||||
residualsRate:1, | |||||
netSalvage:0.00, | |||||
fixedValue:null, | |||||
perYearDepreciationValue:null, | |||||
depreciationValue:0 | |||||
}, | |||||
//资产类别 | |||||
assetType:'房屋及建筑物', | |||||
showAssetType:false, | |||||
assetTypeOptions:[], | |||||
//经营属性 | |||||
operationType:'经营性', | |||||
showOperationType:false, | |||||
operationTypeOptions:[], | |||||
//增加方式 | |||||
addTypeOptions:[], | |||||
showAddType:false, | |||||
addType:'购入', | |||||
//使用情况 | |||||
useTypeOptions:[], | |||||
showUseType:false, | |||||
useType:'自用', | |||||
//资产状态 | |||||
assetStatusOptions:[], | |||||
showAssetStatus:false, | |||||
assetStatus:'正常', | |||||
//资产状态 | |||||
depreciationTypeOptions:[], | |||||
showDepreciationType:false, | |||||
depreciationType:'不折旧', | |||||
showBuildTime:false, | |||||
auditStatus:[], | |||||
loading: false, | |||||
finished: false, | |||||
listLength:'0', | |||||
searchInput:'', | |||||
queryParams:{ | |||||
pageNum:1, | |||||
pageSize:10, | |||||
orderByColumn:'createTime', | |||||
isAsc:'desc', | |||||
name:'', | |||||
} | |||||
}; | |||||
}, | |||||
created() { | |||||
this.houseGetDicts("asset_type").then((response) => { | |||||
for(var i = 0 ; i < response.data.length ; i++){ | |||||
this.assetTypeOptions.push({text:response.data[i].dictLabel,value:response.data[i].dictValue}); | |||||
} | |||||
this.assetTypeOptions2 = response.data; | |||||
}); | |||||
this.houseGetDicts("operation_type").then((response) => { | |||||
for(var i = 0 ; i < response.data.length ; i++){ | |||||
this.operationTypeOptions.push({text:response.data[i].dictLabel,value:response.data[i].dictValue}); | |||||
} | |||||
this.operationTypeOptions2 = response.data; | |||||
}); | |||||
this.houseGetDicts("add_type").then((response) => { | |||||
for(var i = 0 ; i < response.data.length ; i++){ | |||||
this.addTypeOptions.push({text:response.data[i].dictLabel,value:response.data[i].dictValue}); | |||||
} | |||||
this.addTypeOptions2 = response.data; | |||||
}); | |||||
this.houseGetDicts("use_type").then((response) => { | |||||
for(var i = 0 ; i < response.data.length ; i++){ | |||||
this.useTypeOptions.push({text:response.data[i].dictLabel,value:response.data[i].dictValue}); | |||||
} | |||||
this.useTypeOptions2 = response.data; | |||||
}); | |||||
this.houseGetDicts("asset_status").then((response) => { | |||||
for(var i = 0 ; i < response.data.length ; i++){ | |||||
this.assetStatusOptions.push({text:response.data[i].dictLabel,value:response.data[i].dictValue}); | |||||
} | |||||
this.assetStatusOptions2 = response.data; | |||||
}); | |||||
this.houseGetDicts("depreciation_type").then((response) => { | |||||
for(var i = 0 ; i < response.data.length ; i++){ | |||||
this.depreciationTypeOptions.push({text:response.data[i].dictLabel,value:response.data[i].dictValue}); | |||||
} | |||||
this.depreciationTypeOptions2 = response.data; | |||||
}); | |||||
this.getDetail(this.$route.query.id) | |||||
}, | |||||
methods: { | |||||
getDetail(id){ | |||||
getPermanent(id).then((response) => { | |||||
if (response.code == 200){ | |||||
this.form = response.data; | |||||
this.assetType = this.selectDictLabel(this.assetTypeOptions2, response.data.assetType); | |||||
this.operationType = this.selectDictLabel(this.operationTypeOptions2, response.data.operationType); | |||||
this.addType = this.selectDictLabel(this.addTypeOptions2, response.data.addType); | |||||
this.useType = this.selectDictLabel(this.useTypeOptions2, response.data.useType); | |||||
this.assetStatus = this.selectDictLabel(this.assetStatusOptions2, response.data.assetStatus); | |||||
this.depreciationType = this.selectDictLabel(this.depreciationTypeOptions2, response.data.depreciationType); | |||||
} | |||||
}); | |||||
}, | |||||
onConfirmAssetType(data){ | |||||
this.assetType = data.text; | |||||
this.form.assetType = data.value; | |||||
this.showAssetType = false; | |||||
}, | |||||
onConfirmOperationType(data){ | |||||
this.operationType = data.text; | |||||
this.form.operationType = data.value; | |||||
this.showOperationType = false; | |||||
}, | |||||
onConfirmAddType(data){ | |||||
this.addType = data.text; | |||||
this.form.addType = data.value; | |||||
this.showAddType = false; | |||||
}, | |||||
onConfirmUseType(data){ | |||||
this.useType = data.text; | |||||
this.form.useType = data.value; | |||||
this.showUseType = false; | |||||
}, | |||||
onConfirmAssetStatus(data){ | |||||
this.assetStatus = data.text; | |||||
this.form.assetStatus = data.value; | |||||
this.showAssetStatus = false; | |||||
}, | |||||
onConfirmDepreciationType(data){ | |||||
this.depreciationType = data.text; | |||||
this.form.depreciationType = data.value; | |||||
this.showDepreciationType = false; | |||||
}, | |||||
onConfirmBuildTime(data){ | |||||
this.form.buildTime = this.format(data,'yyyy-MM-dd'); | |||||
this.showBuildTime = false; | |||||
}, | |||||
// 原值变动监听 | |||||
changeOriginalValue(val) { | |||||
if (this.form.depreciationValue != null) { | |||||
// 净值 = 原值-累计折旧 | |||||
this.form.netValue = val - this.form.depreciationValue; | |||||
} | |||||
if (this.form.residualsRate != null) { | |||||
// 净残值 = 原值*残值率 | |||||
this.form.netSalvage = (val * this.form.residualsRate) / 100; | |||||
} | |||||
if (this.form.netSalvage != null && this.form.expectedYears != null) { | |||||
// 每年折旧额 = (原值-净残值)/ 预计使用年数 | |||||
this.form.perYearDepreciationValue = | |||||
(val - this.form.netSalvage) / this.form.expectedYears; | |||||
} | |||||
}, | |||||
// 累计折旧变动监听 | |||||
changeDepreciationValue(val) { | |||||
if (this.form.originalValue != null) { | |||||
// 净值 = 原值-累计折旧 | |||||
this.form.netValue = this.form.originalValue - val; | |||||
} | |||||
}, | |||||
// 残值率变动监听 | |||||
changeResidualsRate(val) { | |||||
if (this.form.originalValue != null) { | |||||
// 净残值 = 原值*残值率 | |||||
this.form.netSalvage = (this.form.originalValue * val) / 100; | |||||
} | |||||
}, | |||||
// 净残值变动监听 | |||||
changeNetSalvage(val) { | |||||
if (this.form.originalValue != null && this.form.expectedYears != null) { | |||||
// 每年折旧额 = (原值-净残值)/ 预计使用年数 | |||||
this.form.perYearDepreciationValue = | |||||
(this.form.originalValue - val) / this.form.expectedYears; | |||||
} | |||||
}, | |||||
// 预计使用年数变动监听 | |||||
changeExpectedYears(val) { | |||||
if (this.form.originalValue != null && this.form.netSalvage != null) { | |||||
// 每年折旧额:(原值-净残值)/ 预计使用年数 | |||||
this.form.perYearDepreciationValue = | |||||
(this.form.originalValue - this.form.netSalvage) / val; | |||||
} | |||||
}, | |||||
// 已折旧年数变动监听 | |||||
changeDepreciationYears(val) { | |||||
if (this.form.perYearDepreciationValue != null) { | |||||
this.form.depreciationValue = val * this.form.perYearDepreciationValue; | |||||
} | |||||
}, | |||||
onSubmit(){ | |||||
updatePermanent(this.form).then((response) => { | |||||
if (response.code == 200){ | |||||
this.$notify({ type: 'success', message: '修改成功' }); | |||||
setTimeout(function(){ | |||||
history.back(-1); | |||||
},2000) | |||||
} | |||||
}); | |||||
} | |||||
}, | |||||
} | |||||
</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; | |||||
} | |||||
} | |||||
.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> |
@@ -20,105 +20,182 @@ | |||||
@load="getList" | @load="getList" | ||||
> | > | ||||
<!--1--> | <!--1--> | ||||
<div class="item" v-for="(item,index) in applicationList"> | |||||
<div class="head_block"> | |||||
<i class="icon"></i> | |||||
<div class="title">{{item.name}}</div> | |||||
</div> | |||||
<div class="order_block"> | |||||
<div class="order">{{item.code}}</div> | |||||
<div :class="{'describe':true,'suspend':item.contractionStatus == '撤销','normal':item.contractionStatus == '正常','undo':item.contractionStatus == '终止'}">{{item.contractionStatus}}<i class="icon"></i></div> | |||||
</div> | |||||
<div class="function_block"> | |||||
<van-swipe-cell right-width="150" class="item" v-for="(item,index) in applicationList"> | |||||
<div class="item_box" @click="$router.push({name:'sunVillageInfoInformationDetail',query:{id:item.id}})"> | |||||
<div class="head_block"> | |||||
<i class="icon"></i> | |||||
<div class="title">{{item.name}}</div> | |||||
</div> | |||||
<div class="order_block"> | |||||
<div class="order">{{item.code}}</div> | |||||
<div :class="{'describe':true,'suspend':item.contractionStatus == '撤销','normal':item.contractionStatus == '正常','undo':item.contractionStatus == '终止'}">{{item.contractionStatus}}<i class="icon"></i></div> | |||||
</div> | |||||
<div class="function_block"> | |||||
<div class="value">合同金额<span class="amount">¥{{item.totalAmount}}</span></div> | <div class="value">合同金额<span class="amount">¥{{item.totalAmount}}</span></div> | ||||
<div class="startStop_time"> | <div class="startStop_time"> | ||||
<div class="time"><div class="unim start">起</div>{{item.startTime}}</div> | <div class="time"><div class="unim start">起</div>{{item.startTime}}</div> | ||||
<div class="time"><div class="unim stop">止</div>{{item.endTime}}</div> | <div class="time"><div class="unim stop">止</div>{{item.endTime}}</div> | ||||
</div> | </div> | ||||
</div> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<template #right> | |||||
<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,index)" style="background-color: rgb(98,173,102,0.2);color: #62AD66;">附件</div> | |||||
</template> | |||||
</van-swipe-cell> | |||||
</van-list> | </van-list> | ||||
</div> | </div> | ||||
<!-- <div class="bottom_tips">--> | <!-- <div class="bottom_tips">--> | ||||
<!-- <span class="xs">已经到底啦</span>--> | <!-- <span class="xs">已经到底啦</span>--> | ||||
<!-- </div>--> | <!-- </div>--> | ||||
<van-popup v-model="show" lock-scroll closeable position="top" :style="{ height: '30%' }" > | |||||
<div style="padding: 0 13% 0 5%;"> | |||||
<van-divider>附件</van-divider> | |||||
<van-uploader v-model="fileList" :after-read="afterRead" @delete="deleteFile1" multiple /> | |||||
</div> | |||||
</van-popup> | |||||
</div> | </div> | ||||
</template> | </template> | ||||
<script> | |||||
import { contractionList } from "@/api/sunVillage_info/fixedAssets"; | |||||
export default { | |||||
name: "certificateList", | |||||
data() { | |||||
return { | |||||
applicationList:[], | |||||
applicationListSecond:[], | |||||
assetStatusOptions:[], | |||||
auditStatus:[], | |||||
loading: false, | |||||
finished: false, | |||||
listLength:'0', | |||||
searchInput:'', | |||||
queryParams:{ | |||||
pageNum:1, | |||||
pageSize:10, | |||||
orderByColumn:'createTime', | |||||
isAsc:'desc', | |||||
name:'', | |||||
} | |||||
}; | |||||
}, | |||||
created() { | |||||
this.houseGetDicts("contraction_status").then((response) => { | |||||
this.contractionStatusOptions = response.data; | |||||
}); | |||||
}, | |||||
methods: { | |||||
getList(){ | |||||
setTimeout(() => { | |||||
contractionList(this.queryParams).then(response => { | |||||
this.listLength = response.total; | |||||
for (var i = 0; i < response.rows.length; i++) { | |||||
response.rows[i].contractionStatus = this.selectDictLabel(this.contractionStatusOptions, response.rows[i].contractionStatus); | |||||
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); | |||||
<script> | |||||
import { contractionList , delInfo , commonAttach , attachmentList , systemAttachment } from "@/api/sunVillage_info/fixedAssets"; | |||||
import request from '@/utils/request' | |||||
export default { | |||||
name: "certificateList", | |||||
data() { | |||||
return { | |||||
applicationList:[], | |||||
applicationListSecond:[], | |||||
assetStatusOptions:[], | |||||
auditStatus:[], | |||||
loading: false, | |||||
finished: false, | |||||
show: false, | |||||
fileList:[], | |||||
listLength:'0', | |||||
searchInput:'', | |||||
queryParams:{ | |||||
pageNum:1, | |||||
pageSize:10, | |||||
orderByColumn:'createTime', | |||||
isAsc:'desc', | |||||
name:'', | |||||
}, | }, | ||||
getSearchList(){ | |||||
this.loading = true; | |||||
if(this.applicationListSecond.length>0&&this.queryParams.name!=""){ | |||||
let newList = [] | |||||
for(let j = 0 ;j<this.applicationListSecond.length;j++){ | |||||
if(this.applicationListSecond[j].name.indexOf(this.queryParams.name)>-1){ | |||||
newList.push(this.applicationListSecond[j]); | |||||
} | |||||
uploadFiles1:[], | |||||
projectId:'', | |||||
projectIndex:'' | |||||
}; | |||||
}, | |||||
created() { | |||||
this.houseGetDicts("contraction_status").then((response) => { | |||||
this.contractionStatusOptions = response.data; | |||||
}); | |||||
}, | |||||
methods: { | |||||
getList(){ | |||||
setTimeout(() => { | |||||
contractionList(this.queryParams).then(response => { | |||||
this.listLength = response.total; | |||||
for (var i = 0; i < response.rows.length; i++) { | |||||
response.rows[i].contractionStatus = this.selectDictLabel(this.contractionStatusOptions, response.rows[i].contractionStatus); | |||||
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.loading = true; | |||||
if(this.applicationListSecond.length>0&&this.queryParams.name!=""){ | |||||
let newList = [] | |||||
for(let j = 0 ;j<this.applicationListSecond.length;j++){ | |||||
if(this.applicationListSecond[j].name.indexOf(this.queryParams.name)>-1){ | |||||
newList.push(this.applicationListSecond[j]); | |||||
} | } | ||||
this.applicationList = newList | |||||
} | } | ||||
if(this.queryParams.name==""){ | |||||
this.applicationList = this.applicationListSecond; | |||||
this.applicationList = newList | |||||
} | |||||
if(this.queryParams.name==""){ | |||||
this.applicationList = this.applicationListSecond; | |||||
} | |||||
this.loading = false; | |||||
}, | |||||
afterRead(file) { | |||||
// 此时可以自行将文件上传至服务器 | |||||
this.uploadFiles1.push(file.file); | |||||
this.uploadFiles1.map((rr1,idx1) => { | |||||
let params1 = new FormData(); | |||||
params1.append("tableId", this.projectId); | |||||
params1.append("tableName", "t_contraction_info"); | |||||
params1.append("bizPath", "contraction"); | |||||
params1.append("fileType", this.projectIndex); | |||||
params1.append("file", rr1); | |||||
commonAttach(params1).then((r1) => { | |||||
this.$notify({ type: 'success', message: '上传成功' }); | |||||
}) | |||||
}) | |||||
}, | |||||
openLoader(id,index){ | |||||
this.show = true; | |||||
this.projectId = id; | |||||
this.projectIndex = index; | |||||
this.fileList = []; | |||||
let oData1= { | |||||
tableId: id, | |||||
tableName: "t_contraction_info", | |||||
bizPath: "contraction", | |||||
fileType: index, | |||||
} | |||||
attachmentList(oData1).then(res => { | |||||
res.rows.map(r => { | |||||
let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | |||||
this.fileList.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id}) | |||||
}) | |||||
}) | |||||
}, | |||||
/** 删除按钮操作 */ | |||||
handleDelete(row,index) { | |||||
const ids = row.id || this.ids; | |||||
this.$dialog.alert( | |||||
{ | |||||
message:'是否确认删除合同信息?', | |||||
title:"警告", | |||||
confirmButtonText: "确定", | |||||
cancelButtonText: "取消", | |||||
} | } | ||||
this.loading = false; | |||||
}, | |||||
goAdd(){ | |||||
this.$router.push('/sunVillage_info/informationAdd') | |||||
}, | |||||
) | |||||
.then(function () { | |||||
return delInfo(ids); | |||||
}) | |||||
.then(() => { | |||||
this.applicationList.splice(index, 1); | |||||
this.$notify({ type: 'success', message: '删除成功' }); | |||||
}); | |||||
}, | |||||
deleteFile1(file){ | |||||
console.log(file) | |||||
systemAttachment(file.id).then(res => { | |||||
this.$notify({ type: 'success', message: '删除成功' }); | |||||
}) | |||||
}, | }, | ||||
} | |||||
</script> | |||||
goAdd(){ | |||||
this.$router.push('/sunVillage_info/informationAdd') | |||||
}, | |||||
}, | |||||
} | |||||
</script> | |||||
<style scoped lang="scss"> | <style scoped lang="scss"> | ||||
.home_wrapper{ | .home_wrapper{ | ||||
@@ -203,8 +280,10 @@ | |||||
border-radius: 30px; | border-radius: 30px; | ||||
background: #fff; | background: #fff; | ||||
box-shadow: 4px 6px 5px rgba(63, 68, 75, 0.1); | box-shadow: 4px 6px 5px rgba(63, 68, 75, 0.1); | ||||
padding:25px 32px; | |||||
margin-bottom: 20px; | margin-bottom: 20px; | ||||
.item_box{ | |||||
padding:25px 32px; | |||||
} | |||||
.head_block{ | .head_block{ | ||||
height: 56px; | height: 56px; | ||||
display: flex; | display: flex; | ||||
@@ -342,5 +421,21 @@ | |||||
background: #e9e9e9; | 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> | </style> |
@@ -10,29 +10,279 @@ | |||||
<img src="../../assets/images/sunVillage_info/add_icon_1.png" style="width:22PX;height:22PX;margin-right: 10px;"/> | <img src="../../assets/images/sunVillage_info/add_icon_1.png" style="width:22PX;height:22PX;margin-right: 10px;"/> | ||||
<p class="tit">合同信息</p> | <p class="tit">合同信息</p> | ||||
</div> | </div> | ||||
<van-field required v-model="form.code" label="合同编码" p laceholder="合同编码" input-align="right" :border="false" /> | |||||
<van-field required v-model="form.code" label="合同编码" placeholder="合同编码" input-align="right" :border="false" /> | |||||
<van-field required v-model="form.name" label="合同名称" placeholder="合同名称" input-align="right" :border="false" /> | <van-field required v-model="form.name" label="合同名称" placeholder="合同名称" input-align="right" :border="false" /> | ||||
<van-field v-model="form.assetType" label="合同类型" placeholder="合同类型" input-align="right" is-link :border="false" /> | |||||
<van-field required v-model="form.contractionSource" label="合同来源" placeholder="合同来源" input-align="right" is-link :border="false" /> | |||||
<van-field required v-model="form.firstParty" label="甲方名称" placeholder="甲方名称" input-align="right" is-link :border="false" /> | |||||
<van-field | |||||
readonly | |||||
clickable | |||||
label="合同类型" | |||||
placeholder="请选择" | |||||
v-model="assetType" | |||||
@click="showAssetType = true" | |||||
input-align="right" | |||||
right-icon="arrow-down" | |||||
label-width="auto" | |||||
required | |||||
:border="false" | |||||
:rules="[{ required: true , message:'请选择合同类型' }]" | |||||
/> | |||||
<van-popup v-model="showAssetType" position="bottom"> | |||||
<van-picker | |||||
show-toolbar | |||||
:columns="assetTypeOptions" | |||||
@confirm="onConfirmAssetType" | |||||
@cancel="showAssetType = false" | |||||
/> | |||||
</van-popup> | |||||
<van-field | |||||
readonly | |||||
clickable | |||||
label="合同来源" | |||||
placeholder="请选择" | |||||
v-model="contractionSource" | |||||
@click="showContractionSource = true" | |||||
input-align="right" | |||||
right-icon="arrow-down" | |||||
label-width="auto" | |||||
required | |||||
:border="false" | |||||
:rules="[{ required: true , message:'请选择合同来源' }]" | |||||
/> | |||||
<van-popup v-model="showContractionSource" position="bottom"> | |||||
<van-picker | |||||
show-toolbar | |||||
:columns="contractionSourceOptions" | |||||
@confirm="onConfirmContractionSource" | |||||
@cancel="showContractionSource = false" | |||||
/> | |||||
</van-popup> | |||||
<van-field required v-model="form.firstParty" label="合同甲方" placeholder="合同甲方" input-align="right" :border="false" /> | |||||
<van-field v-model="form.firstPartyDirector" label="甲方代表" placeholder="甲方代表" input-align="right" :border="false" /> | <van-field v-model="form.firstPartyDirector" label="甲方代表" placeholder="甲方代表" input-align="right" :border="false" /> | ||||
<van-field v-model="form.firstPartyPhone" label="甲方电话" placeholder="甲方电话" input-align="right" :border="false" /> | <van-field v-model="form.firstPartyPhone" label="甲方电话" placeholder="甲方电话" input-align="right" :border="false" /> | ||||
<van-field required v-model="form.secondParty" label="乙方名称" placeholder="乙方名称" input-align="right" :border="false" /> | |||||
<van-field required v-model="form.secondParty" label="合同乙方" placeholder="乙方名称" input-align="right" :border="false" /> | |||||
<van-field v-model="form.secondPartyDirector" label="乙方代表" placeholder="乙方代表" input-align="right" :border="false" /> | <van-field v-model="form.secondPartyDirector" label="乙方代表" placeholder="乙方代表" input-align="right" :border="false" /> | ||||
<van-field v-model="form.secondPartyPhone" label="乙方电话" placeholder="乙方电话" input-align="right" :border="false" /> | <van-field v-model="form.secondPartyPhone" label="乙方电话" placeholder="乙方电话" input-align="right" :border="false" /> | ||||
<van-field required v-model="form.collectionPay" label="收付款类型" placeholder="收付款类型" input-align="right" :border="false" /> | |||||
<van-field required v-model="form.settleType" label="结款方式" placeholder="结款方式" input-align="right" :border="false" /> | |||||
<van-field required v-model="form.totalAmount" label="合同金额(元)" placeholder="合同金额(元)" input-align="right" :border="false" /> | |||||
<van-field v-model="form.num" label="数量/面积" placeholder="数量/面积" input-align="right" :border="false" /> | |||||
<van-field v-model="form.secondPartyIdCard" label="乙方身份证号" placeholder="乙方身份证号" input-align="right" :border="false" /> | |||||
<van-field | |||||
readonly | |||||
clickable | |||||
label="签订日期" | |||||
placeholder="请选择" | |||||
v-model="form.buildingTime" | |||||
@click="showBuildingTime = true" | |||||
input-align="right" | |||||
right-icon="arrow-down" | |||||
label-width="auto" | |||||
required | |||||
:border="false" | |||||
/> | |||||
<van-popup v-model="showBuildingTime" position="bottom"> | |||||
<van-datetime-picker | |||||
v-model="buildingTime" | |||||
type="date" | |||||
title="选择年月日" | |||||
@confirm="onConfirmBuildingTime" | |||||
@cancel="showBuildingTime = false" | |||||
/> | |||||
</van-popup> | |||||
<van-field | |||||
readonly | |||||
clickable | |||||
label="合同状态" | |||||
placeholder="请选择" | |||||
v-model="contractionStatus" | |||||
@click="showContractionStatus = true" | |||||
input-align="right" | |||||
right-icon="arrow-down" | |||||
label-width="auto" | |||||
required | |||||
:border="false" | |||||
:rules="[{ required: true , message:'请选择合同状态' }]" | |||||
/> | |||||
<van-popup v-model="showContractionStatus" position="bottom"> | |||||
<van-picker | |||||
show-toolbar | |||||
:columns="contractionStatusOptions" | |||||
@confirm="onConfirmContractionStatus" | |||||
@cancel="showContractionStatus = false" | |||||
/> | |||||
</van-popup> | |||||
<van-field v-model="form.remark" label="备注" placeholder="备注" input-align="right" :border="false" /> | |||||
</div> | |||||
<div class="list_main"> | |||||
<div class="titBox"> | |||||
<img src="../../assets/images/sunVillage_info/add_icon_1.png" style="width:22PX;height:22PX;margin-right: 10px;"/> | |||||
<p class="tit">合同约定</p> | |||||
</div> | |||||
<van-field | |||||
readonly | |||||
clickable | |||||
label="收付款类型" | |||||
placeholder="请选择" | |||||
v-model="collectionPay" | |||||
@click="showCollectionPay = true" | |||||
input-align="right" | |||||
right-icon="arrow-down" | |||||
label-width="auto" | |||||
required | |||||
:border="false" | |||||
:rules="[{ required: true , message:'请选择收付款类型' }]" | |||||
/> | |||||
<van-popup v-model="showCollectionPay" position="bottom"> | |||||
<van-picker | |||||
show-toolbar | |||||
:columns="collectionPayOptions" | |||||
@confirm="onConfirmCollectionPay" | |||||
@cancel="showCollectionPay = false" | |||||
/> | |||||
</van-popup> | |||||
<van-field | |||||
readonly | |||||
clickable | |||||
label="结款方式" | |||||
placeholder="请选择" | |||||
v-model="settleType" | |||||
@click="showSettleType = true" | |||||
input-align="right" | |||||
right-icon="arrow-down" | |||||
label-width="auto" | |||||
required | |||||
:border="false" | |||||
:rules="[{ required: true , message:'请选择结款方式' }]" | |||||
/> | |||||
<van-popup v-model="showSettleType" position="bottom"> | |||||
<van-picker | |||||
show-toolbar | |||||
:columns="settleTypeOptions" | |||||
@confirm="onConfirmSettleType" | |||||
@cancel="showSettleType = false" | |||||
/> | |||||
</van-popup> | |||||
<van-field | |||||
readonly | |||||
clickable | |||||
label="支付方式" | |||||
placeholder="请选择" | |||||
v-model="contractPaymentType" | |||||
@click="showContractPaymentType = true" | |||||
input-align="right" | |||||
right-icon="arrow-down" | |||||
label-width="auto" | |||||
required | |||||
:border="false" | |||||
:rules="[{ required: true , message:'请选择支付方式' }]" | |||||
/> | |||||
<van-popup v-model="showContractPaymentType" position="bottom"> | |||||
<van-picker | |||||
show-toolbar | |||||
:columns="contractPaymentTypeOptions" | |||||
@confirm="onConfirmContractPaymentType" | |||||
@cancel="showContractPaymentType = false" | |||||
/> | |||||
</van-popup> | |||||
<van-field v-model="form.contractObject" label="合同标的" placeholder="合同标的" input-align="right" :border="false" /> | |||||
<van-field v-model="form.num" label="标的数量" placeholder="标的数量" input-align="right" :border="false" /> | |||||
<van-field v-model="form.unit" label="计量单位" placeholder="计量单位" input-align="right" :border="false" /> | <van-field v-model="form.unit" label="计量单位" placeholder="计量单位" input-align="right" :border="false" /> | ||||
<van-field required v-model="form.price" label="单价(元)" placeholder="单价(元)" input-align="right" :border="false" /> | |||||
<van-field | |||||
readonly | |||||
clickable | |||||
label="开始日期" | |||||
placeholder="请选择" | |||||
v-model="form.startTime" | |||||
@click="showStartTime = true" | |||||
input-align="right" | |||||
right-icon="arrow-down" | |||||
label-width="auto" | |||||
required | |||||
:border="false" | |||||
:rules="[{ required: true , message:'请选择开始日期' }]" | |||||
/> | |||||
<van-popup v-model="showStartTime" position="bottom"> | |||||
<van-datetime-picker | |||||
v-model="startTime" | |||||
type="date" | |||||
title="选择年月日" | |||||
@confirm="onConfirmStartTime" | |||||
@cancel="showStartTime = false" | |||||
/> | |||||
</van-popup> | |||||
<van-field | |||||
readonly | |||||
clickable | |||||
label="结束日期" | |||||
placeholder="请选择" | |||||
v-model="form.endTime" | |||||
@click="showEndTime = true" | |||||
input-align="right" | |||||
right-icon="arrow-down" | |||||
label-width="auto" | |||||
required | |||||
:border="false" | |||||
:rules="[{ required: true , message:'请选择开始日期' }]" | |||||
/> | |||||
<van-popup v-model="showEndTime" position="bottom"> | |||||
<van-datetime-picker | |||||
v-model="endTime" | |||||
type="date" | |||||
title="选择年月日" | |||||
@confirm="onConfirmEndTime" | |||||
@cancel="showEndTime = false" | |||||
/> | |||||
</van-popup> | |||||
<van-field v-model="form.contractYears" label="承包年限(年)" placeholder="承包年限(年)" input-align="right" :border="false" /> | |||||
<van-field required v-model="form.totalAmount" label="承包价款(元)" placeholder="承包价款(元)" input-align="right" :border="false" /> | |||||
<van-field required v-model="form.price" label="折合年均(元)" placeholder="折合年均(元)" input-align="right" :border="false" /> | |||||
<van-field required v-model="form.receivedAmount" label="已结款(元)" placeholder="已结款(元)" input-align="right" :border="false" /> | <van-field required v-model="form.receivedAmount" label="已结款(元)" placeholder="已结款(元)" input-align="right" :border="false" /> | ||||
<van-field v-model="form.settledAmount" label="下次结款(元)" placeholder="下次结款(元)" input-align="right" :border="false" /> | <van-field v-model="form.settledAmount" label="下次结款(元)" placeholder="下次结款(元)" input-align="right" :border="false" /> | ||||
<van-field required v-model="form.buildingTime" label="签订日期" placeholder="签订日期" input-align="right" :border="false" /> | |||||
<van-field required v-model="form.startTime" label="开始日期" placeholder="开始日期" input-align="right" :border="false" /> | |||||
<van-field required v-model="form.endTime" label="结束日期" placeholder="结束日期" input-align="right" :border="false" /> | |||||
<van-field required v-model="form.contractionStatus" label="合同状态" placeholder="合同状态" input-align="right" :border="false" /> | |||||
<van-field v-model="form.remark" label="备注" placeholder="备注" input-align="right" :border="false" /> | |||||
</div> | |||||
<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 v-model="form.villageHead" label="村负责人" placeholder="村负责人" input-align="right" :border="false" /> | |||||
<van-field v-model="form.contractCustodian" label="合同保管人" placeholder="合同保管人" input-align="right" /> | |||||
<van-field v-model="form.villageRepsOpinion" label="村民代表意见" placeholder="村民代表意见" input-align="right" :border="false" /> | |||||
<van-field | |||||
readonly | |||||
clickable | |||||
label="会议时间" | |||||
placeholder="请选择" | |||||
v-model="form.meetingTime" | |||||
@click="showMeetingTime = true" | |||||
input-align="right" | |||||
right-icon="arrow-down" | |||||
label-width="auto" | |||||
:border="false" | |||||
/> | |||||
<van-popup v-model="showMeetingTime" position="bottom"> | |||||
<van-datetime-picker | |||||
v-model="meetingTime" | |||||
type="date" | |||||
title="选择年月日" | |||||
@confirm="onConfirmMeetingTime" | |||||
@cancel="showMeetingTime = false" | |||||
/> | |||||
</van-popup> | |||||
</div> | </div> | ||||
<div class="list_main"> | <div class="list_main"> | ||||
@@ -40,29 +290,91 @@ | |||||
<img src="../../assets/images/sunVillage_info/add_icon_2.png" style="width:22PX;height:22PX;margin-right: 10px;"/> | <img src="../../assets/images/sunVillage_info/add_icon_2.png" style="width:22PX;height:22PX;margin-right: 10px;"/> | ||||
<p class="tit">招标信息</p> | <p class="tit">招标信息</p> | ||||
</div> | </div> | ||||
<van-field required v-model="form.biddingWay" label="招标方式" placeholder="招标方式" input-align="right" :border="false" /> | |||||
<!-- <van-field required v-model="form.biddingWay" label="招标方式" placeholder="招标方式" input-align="right" :border="false" />--> | |||||
<van-field v-model="form.itemId" label="项目编号" placeholder="项目编号" input-align="right" /> | <van-field v-model="form.itemId" label="项目编号" placeholder="项目编号" input-align="right" /> | ||||
<van-field required v-model="form.itemName" label="项目名称" placeholder="项目名称" input-align="right" is-link :border="false" /> | |||||
<van-field required v-model="form.handleName" label="经办人" placeholder="经办人" input-align="right" is-link :border="false" /> | |||||
<van-field required v-model="form.budget" label="预算金额(元)" placeholder="预算金额(元)" input-align="right" is-link :border="false" /> | |||||
<van-field v-model="form.biddingDate" label="招标日期" placeholder="招标日期" input-align="right" :border="false" /> | |||||
<van-field v-model="form.biddingType" label="招标类型" placeholder="招标类型" input-align="right" :border="false" /> | |||||
<van-field v-model="form.itemName" label="项目名称" placeholder="项目名称" input-align="right" :border="false" /> | |||||
<van-field v-model="form.handleName" label="经办人" placeholder="经办人" input-align="right" :border="false" /> | |||||
<van-field v-model="form.budget" label="预算金额(元)" placeholder="预算金额(元)" input-align="right" :border="false" /> | |||||
<van-field | |||||
readonly | |||||
clickable | |||||
label="招标日期" | |||||
placeholder="请选择" | |||||
v-model="form.biddingDate" | |||||
@click="showBiddingDate = true" | |||||
input-align="right" | |||||
right-icon="arrow-down" | |||||
label-width="auto" | |||||
:border="false" | |||||
/> | |||||
<van-popup v-model="showBiddingDate" position="bottom"> | |||||
<van-datetime-picker | |||||
v-model="biddingDate" | |||||
type="date" | |||||
title="选择年月日" | |||||
@confirm="onConfirmBiddingDate" | |||||
@cancel="showBiddingDate = false" | |||||
/> | |||||
</van-popup> | |||||
<van-field | |||||
readonly | |||||
clickable | |||||
label="招标类型" | |||||
placeholder="请选择" | |||||
v-model="biddingType" | |||||
@click="showBiddingType = true" | |||||
input-align="right" | |||||
right-icon="arrow-down" | |||||
label-width="auto" | |||||
:border="false" | |||||
/> | |||||
<van-popup v-model="showBiddingType" position="bottom"> | |||||
<van-picker | |||||
show-toolbar | |||||
:columns="biddingTypeOptions" | |||||
@confirm="onConfirmBiddingType" | |||||
@cancel="showBiddingType = false" | |||||
/> | |||||
</van-popup> | |||||
<van-field v-model="form.winBiddingCompany" label="中标单位" placeholder="中标单位" input-align="right" :border="false" /> | <van-field v-model="form.winBiddingCompany" label="中标单位" placeholder="中标单位" input-align="right" :border="false" /> | ||||
<van-field v-model="form.winBiddingPrice" label="中标金额(元)" placeholder="中标金额(元)" input-align="right" :border="false" /> | <van-field v-model="form.winBiddingPrice" label="中标金额(元)" placeholder="中标金额(元)" input-align="right" :border="false" /> | ||||
<van-field v-model="form.reviewer" label="审核人" placeholder="审核人" input-align="right" :border="false" /> | <van-field v-model="form.reviewer" label="审核人" placeholder="审核人" input-align="right" :border="false" /> | ||||
<van-field v-model="form.reviewTime" label="审核时间" placeholder="审核时间" input-align="right" :border="false" /> | |||||
<van-field | |||||
readonly | |||||
clickable | |||||
label="审核时间" | |||||
placeholder="请选择" | |||||
v-model="form.reviewTime" | |||||
@click="showReviewTime = true" | |||||
input-align="right" | |||||
right-icon="arrow-down" | |||||
label-width="auto" | |||||
:border="false" | |||||
/> | |||||
<van-popup v-model="showReviewTime" position="bottom"> | |||||
<van-datetime-picker | |||||
v-model="reviewTime" | |||||
type="date" | |||||
title="选择年月日" | |||||
@confirm="onConfirmReviewTime" | |||||
@cancel="showReviewTime = false" | |||||
/> | |||||
</van-popup> | |||||
</div> | </div> | ||||
<div style="margin: 16px;"> | <div style="margin: 16px;"> | ||||
<van-button round block type="primary" native-type="submit"> | <van-button round block type="primary" native-type="submit"> | ||||
提交 | |||||
保存 | |||||
</van-button> | </van-button> | ||||
</div> | </div> | ||||
</van-form> | </van-form> | ||||
</div> | </div> | ||||
</template> | </template> | ||||
<script> | <script> | ||||
import { permanentList } from "@/api/sunVillage_info/fixedAssets"; | |||||
import { addInfo } from "@/api/sunVillage_info/fixedAssets"; | |||||
export default { | export default { | ||||
name: "certificateList", | name: "certificateList", | ||||
data() { | data() { | ||||
@@ -75,67 +387,184 @@ | |||||
finished: false, | finished: false, | ||||
listLength:'0', | listLength:'0', | ||||
searchInput:'', | searchInput:'', | ||||
form:{}, | |||||
form:{ | |||||
assetType:'1', | |||||
contractionSource:'1', | |||||
contractionStatus:'1', | |||||
collectionPay:'1', | |||||
settleType:'1', | |||||
contractPaymentType:'1', | |||||
biddingType:'', | |||||
startTime:this.format(new Date(),'yyyy-MM-dd'), | |||||
endTime:this.format(new Date(),'yyyy-MM-dd'), | |||||
meetingTime:this.format(new Date(),'yyyy-MM-dd'), | |||||
biddingDate:this.format(new Date(),'yyyy-MM-dd'), | |||||
reviewTime:this.format(new Date(),'yyyy-MM-dd'), | |||||
buildingTime:this.format(new Date(),'yyyy-MM-dd'), | |||||
}, | |||||
queryParams:{ | queryParams:{ | ||||
pageNum:1, | pageNum:1, | ||||
pageSize:10, | pageSize:10, | ||||
orderByColumn:'createTime', | orderByColumn:'createTime', | ||||
isAsc:'desc', | isAsc:'desc', | ||||
name:'', | name:'', | ||||
} | |||||
}, | |||||
startTime:new Date(), | |||||
endTime:new Date(), | |||||
meetingTime:new Date(), | |||||
biddingDate:new Date(), | |||||
reviewTime:new Date(), | |||||
buildingTime:new Date(), | |||||
//合同类型 | |||||
assetType:'农村土地承包合同类', | |||||
showAssetType:false, | |||||
assetTypeOptions:[], | |||||
//合同来源 | |||||
contractionSource:'线下合同', | |||||
showContractionSource:false, | |||||
contractionSourceOptions:[], | |||||
//合同状态 | |||||
contractionStatus:'正常', | |||||
showContractionStatus:false, | |||||
contractionStatusOptions:[], | |||||
//收付款类型 | |||||
collectionPay:'收款', | |||||
showCollectionPay:false, | |||||
collectionPayOptions:[], | |||||
//结款方式 | |||||
settleType:'一次性支付', | |||||
showSettleType:false, | |||||
settleTypeOptions:[], | |||||
//支付方式 | |||||
contractPaymentType:'现金', | |||||
showContractPaymentType:false, | |||||
contractPaymentTypeOptions:[], | |||||
//支付方式 | |||||
biddingType:'', | |||||
showBiddingType:false, | |||||
biddingTypeOptions:[], | |||||
showStartTime:false, | |||||
showEndTime:false, | |||||
showMeetingTime:false, | |||||
showBiddingDate:false, | |||||
showReviewTime:false, | |||||
showBuildingTime:false, | |||||
}; | }; | ||||
}, | }, | ||||
created() { | created() { | ||||
this.houseGetDicts("asset_status").then((response) => { | |||||
this.assetStatusOptions = response.data; | |||||
this.houseGetDicts("type_of_contract").then((response) => { | |||||
for(var i = 0 ; i < response.data.length ; i++){ | |||||
this.assetTypeOptions.push({text:response.data[i].dictLabel,value:response.data[i].dictValue}); | |||||
} | |||||
}); | |||||
this.houseGetDicts("contraction_source").then((response) => { | |||||
for(var i = 0 ; i < response.data.length ; i++){ | |||||
this.contractionSourceOptions.push({text:response.data[i].dictLabel,value:response.data[i].dictValue}); | |||||
} | |||||
}); | }); | ||||
this.houseGetDicts("asset_type").then((response) => { | |||||
this.assetTypeOptions = response.data; | |||||
this.houseGetDicts("contraction_status").then((response) => { | |||||
for(var i = 0 ; i < response.data.length ; i++){ | |||||
this.contractionStatusOptions.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("settle_type").then((response) => { | |||||
for(var i = 0 ; i < response.data.length ; i++){ | |||||
this.settleTypeOptions.push({text:response.data[i].dictLabel,value:response.data[i].dictValue}); | |||||
} | |||||
}); | |||||
this.houseGetDicts("contract_payment_type").then((response) => { | |||||
for(var i = 0 ; i < response.data.length ; i++){ | |||||
this.contractPaymentTypeOptions.push({text:response.data[i].dictLabel,value:response.data[i].dictValue}); | |||||
} | |||||
}); | }); | ||||
this.houseGetDicts("use_type").then((response) => { | |||||
this.useTypeOptions = response.data; | |||||
this.houseGetDicts("bidding_types").then((response) => { | |||||
for(var i = 0 ; i < response.data.length ; i++){ | |||||
this.biddingTypeOptions.push({text:response.data[i].dictLabel,value:response.data[i].dictValue}); | |||||
} | |||||
}); | }); | ||||
}, | }, | ||||
methods: { | methods: { | ||||
getList(){ | |||||
setTimeout(() => { | |||||
permanentList(this.queryParams).then(response => { | |||||
this.listLength = response.total; | |||||
for (var i = 0; i < response.rows.length; i++) { | |||||
response.rows[i].assetStatus = this.selectDictLabel(this.assetStatusOptions, response.rows[i].assetStatus); | |||||
response.rows[i].assetType = this.selectDictLabel(this.assetTypeOptions, response.rows[i].assetType); | |||||
response.rows[i].useType = this.selectDictLabel(this.useTypeOptions, response.rows[i].useType); | |||||
response.rows[i].originalValue = Number(response.rows[i].originalValue ).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); | |||||
onConfirmAssetType(data){ | |||||
this.assetType = data.text; | |||||
this.form.assetType = data.value; | |||||
this.showAssetType = false; | |||||
}, | }, | ||||
getSearchList(){ | |||||
this.loading = true; | |||||
if(this.applicationListSecond.length>0&&this.queryParams.name!=""){ | |||||
let newList = [] | |||||
for(let j = 0 ;j<this.applicationListSecond.length;j++){ | |||||
if(this.applicationListSecond[j].name.indexOf(this.queryParams.name)>-1){ | |||||
newList.push(this.applicationListSecond[j]); | |||||
} | |||||
} | |||||
this.applicationList = newList | |||||
} | |||||
if(this.queryParams.name==""){ | |||||
this.applicationList = this.applicationListSecond; | |||||
} | |||||
this.loading = false; | |||||
onConfirmContractionSource(data){ | |||||
this.contractionSource = data.text; | |||||
this.form.contractionSource = data.value; | |||||
this.showContractionSource = false; | |||||
}, | |||||
onConfirmContractionStatus(data){ | |||||
this.contractionStatus = data.text; | |||||
this.form.contractionStatus = data.value; | |||||
this.showContractionStatus = false; | |||||
}, | |||||
onConfirmCollectionPay(data){ | |||||
this.collectionPay = data.text; | |||||
this.form.collectionPay = data.value; | |||||
this.showCollectionPay = false; | |||||
}, | |||||
onConfirmSettleType(data){ | |||||
this.settleType = data.text; | |||||
this.form.settleType = data.value; | |||||
this.showSettleType = false; | |||||
}, | |||||
onConfirmContractPaymentType(data){ | |||||
this.contractPaymentType = data.text; | |||||
this.form.contractPaymentType = data.value; | |||||
this.showContractPaymentType = false; | |||||
}, | |||||
onConfirmBiddingType(data){ | |||||
this.biddingType = data.text; | |||||
this.form.biddingType = data.value; | |||||
this.showBiddingType = false; | |||||
}, | }, | ||||
onSubmit(){} | |||||
onConfirmStartTime(data){ | |||||
this.form.startTime = this.format(data,'yyyy-MM-dd'); | |||||
this.startTime = data; | |||||
this.showStartTime = false; | |||||
}, | |||||
onConfirmEndTime(data){ | |||||
this.form.endTime = this.format(data,'yyyy-MM-dd'); | |||||
this.endTime = data; | |||||
this.showEndTime = false; | |||||
}, | |||||
onConfirmMeetingTime(data){ | |||||
this.form.meetingTime = this.format(data,'yyyy-MM-dd'); | |||||
this.meetingTime = data; | |||||
this.showMeetingTime = false; | |||||
}, | |||||
onConfirmBiddingDate(data){ | |||||
this.form.biddingDate = this.format(data,'yyyy-MM-dd'); | |||||
this.biddingDate = data; | |||||
this.showBiddingDate = false; | |||||
}, | |||||
onConfirmReviewTime(data){ | |||||
this.form.reviewTime = this.format(data,'yyyy-MM-dd'); | |||||
this.reviewTime = data; | |||||
this.showReviewTime = false; | |||||
}, | |||||
onConfirmBuildingTime(data){ | |||||
this.form.buildingTime = this.format(data,'yyyy-MM-dd'); | |||||
this.buildingTime = data; | |||||
this.showBuildingTime = false; | |||||
}, | |||||
onSubmit(){ | |||||
addInfo(this.form).then((response) => { | |||||
if (response.code == 200){ | |||||
this.$notify({ type: 'success', message: '新增成功' }); | |||||
setTimeout(function(){ | |||||
history.back(-1); | |||||
},2000) | |||||
} | |||||
}); | |||||
} | |||||
}, | }, | ||||
} | } | ||||
</script> | </script> | ||||
@@ -0,0 +1,636 @@ | |||||
<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_1.png" style="width:22PX;height:22PX;margin-right: 10px;"/> | |||||
<p class="tit">合同信息</p> | |||||
</div> | |||||
<van-field readonly required v-model="form.code" label="合同编码" placeholder="合同编码" input-align="right" :border="false" /> | |||||
<van-field readonly required v-model="form.name" label="合同名称" placeholder="合同名称" input-align="right" :border="false" /> | |||||
<van-field | |||||
readonly | |||||
clickable | |||||
label="合同类型" | |||||
placeholder="请选择" | |||||
v-model="assetType" | |||||
input-align="right" | |||||
right-icon="arrow-down" | |||||
label-width="auto" | |||||
required | |||||
:border="false" | |||||
:rules="[{ required: true , message:'请选择合同类型' }]" | |||||
/> | |||||
<van-popup v-model="showAssetType" position="bottom"> | |||||
<van-picker | |||||
show-toolbar | |||||
:columns="assetTypeOptions" | |||||
@confirm="onConfirmAssetType" | |||||
@cancel="showAssetType = false" | |||||
/> | |||||
</van-popup> | |||||
<van-field | |||||
readonly | |||||
clickable | |||||
label="合同来源" | |||||
placeholder="请选择" | |||||
v-model="contractionSource" | |||||
input-align="right" | |||||
right-icon="arrow-down" | |||||
label-width="auto" | |||||
required | |||||
:border="false" | |||||
:rules="[{ required: true , message:'请选择合同来源' }]" | |||||
/> | |||||
<van-popup v-model="showContractionSource" position="bottom"> | |||||
<van-picker | |||||
show-toolbar | |||||
:columns="contractionSourceOptions" | |||||
@confirm="onConfirmContractionSource" | |||||
@cancel="showContractionSource = false" | |||||
/> | |||||
</van-popup> | |||||
<van-field readonly required v-model="form.firstParty" label="合同甲方" placeholder="合同甲方" input-align="right" :border="false" /> | |||||
<van-field readonly v-model="form.firstPartyDirector" label="甲方代表" placeholder="甲方代表" input-align="right" :border="false" /> | |||||
<van-field readonly v-model="form.firstPartyPhone" label="甲方电话" placeholder="甲方电话" input-align="right" :border="false" /> | |||||
<van-field readonly required v-model="form.secondParty" label="合同乙方" placeholder="乙方名称" input-align="right" :border="false" /> | |||||
<van-field readonly v-model="form.secondPartyDirector" label="乙方代表" placeholder="乙方代表" input-align="right" :border="false" /> | |||||
<van-field readonly v-model="form.secondPartyPhone" label="乙方电话" placeholder="乙方电话" input-align="right" :border="false" /> | |||||
<van-field readonly v-model="form.secondPartyIdCard" label="乙方身份证号" placeholder="乙方身份证号" input-align="right" :border="false" /> | |||||
<van-field | |||||
readonly | |||||
clickable | |||||
label="签订日期" | |||||
placeholder="请选择" | |||||
v-model="form.buildingTime" | |||||
input-align="right" | |||||
right-icon="arrow-down" | |||||
label-width="auto" | |||||
required | |||||
:border="false" | |||||
/> | |||||
<van-popup v-model="showBuildingTime" position="bottom"> | |||||
<van-datetime-picker | |||||
v-model="buildingTime" | |||||
type="date" | |||||
title="选择年月日" | |||||
@confirm="onConfirmBuildingTime" | |||||
@cancel="showBuildingTime = false" | |||||
/> | |||||
</van-popup> | |||||
<van-field | |||||
readonly | |||||
clickable | |||||
label="合同状态" | |||||
placeholder="请选择" | |||||
v-model="contractionStatus" | |||||
input-align="right" | |||||
right-icon="arrow-down" | |||||
label-width="auto" | |||||
required | |||||
:border="false" | |||||
:rules="[{ required: true , message:'请选择合同状态' }]" | |||||
/> | |||||
<van-popup v-model="showContractionStatus" position="bottom"> | |||||
<van-picker | |||||
show-toolbar | |||||
:columns="contractionStatusOptions" | |||||
@confirm="onConfirmContractionStatus" | |||||
@cancel="showContractionStatus = false" | |||||
/> | |||||
</van-popup> | |||||
<van-field readonly v-model="form.remark" label="备注" placeholder="备注" input-align="right" :border="false" /> | |||||
</div> | |||||
<div class="list_main"> | |||||
<div class="titBox"> | |||||
<img src="../../assets/images/sunVillage_info/add_icon_1.png" style="width:22PX;height:22PX;margin-right: 10px;"/> | |||||
<p class="tit">合同约定</p> | |||||
</div> | |||||
<van-field | |||||
readonly | |||||
clickable | |||||
label="收付款类型" | |||||
placeholder="请选择" | |||||
v-model="collectionPay" | |||||
input-align="right" | |||||
right-icon="arrow-down" | |||||
label-width="auto" | |||||
required | |||||
:border="false" | |||||
:rules="[{ required: true , message:'请选择收付款类型' }]" | |||||
/> | |||||
<van-popup v-model="showCollectionPay" position="bottom"> | |||||
<van-picker | |||||
show-toolbar | |||||
:columns="collectionPayOptions" | |||||
@confirm="onConfirmCollectionPay" | |||||
@cancel="showCollectionPay = false" | |||||
/> | |||||
</van-popup> | |||||
<van-field | |||||
readonly | |||||
clickable | |||||
label="结款方式" | |||||
placeholder="请选择" | |||||
v-model="settleType" | |||||
input-align="right" | |||||
right-icon="arrow-down" | |||||
label-width="auto" | |||||
required | |||||
:border="false" | |||||
:rules="[{ required: true , message:'请选择结款方式' }]" | |||||
/> | |||||
<van-popup v-model="showSettleType" position="bottom"> | |||||
<van-picker | |||||
show-toolbar | |||||
:columns="settleTypeOptions" | |||||
@confirm="onConfirmSettleType" | |||||
@cancel="showSettleType = false" | |||||
/> | |||||
</van-popup> | |||||
<van-field | |||||
readonly | |||||
clickable | |||||
label="支付方式" | |||||
placeholder="请选择" | |||||
v-model="contractPaymentType" | |||||
input-align="right" | |||||
right-icon="arrow-down" | |||||
label-width="auto" | |||||
required | |||||
:border="false" | |||||
:rules="[{ required: true , message:'请选择支付方式' }]" | |||||
/> | |||||
<van-popup v-model="showContractPaymentType" position="bottom"> | |||||
<van-picker | |||||
show-toolbar | |||||
:columns="contractPaymentTypeOptions" | |||||
@confirm="onConfirmContractPaymentType" | |||||
@cancel="showContractPaymentType = false" | |||||
/> | |||||
</van-popup> | |||||
<van-field readonly v-model="form.contractObject" label="合同标的" placeholder="合同标的" input-align="right" :border="false" /> | |||||
<van-field readonly v-model="form.num" label="标的数量" placeholder="标的数量" input-align="right" :border="false" /> | |||||
<van-field readonly v-model="form.unit" label="计量单位" placeholder="计量单位" input-align="right" :border="false" /> | |||||
<van-field | |||||
readonly | |||||
clickable | |||||
label="开始日期" | |||||
placeholder="请选择" | |||||
v-model="form.startTime" | |||||
input-align="right" | |||||
right-icon="arrow-down" | |||||
label-width="auto" | |||||
required | |||||
:border="false" | |||||
:rules="[{ required: true , message:'请选择开始日期' }]" | |||||
/> | |||||
<van-popup v-model="showStartTime" position="bottom"> | |||||
<van-datetime-picker | |||||
v-model="startTime" | |||||
type="date" | |||||
title="选择年月日" | |||||
@confirm="onConfirmStartTime" | |||||
@cancel="showStartTime = false" | |||||
/> | |||||
</van-popup> | |||||
<van-field | |||||
readonly | |||||
clickable | |||||
label="结束日期" | |||||
placeholder="请选择" | |||||
v-model="form.endTime" | |||||
input-align="right" | |||||
right-icon="arrow-down" | |||||
label-width="auto" | |||||
required | |||||
:border="false" | |||||
:rules="[{ required: true , message:'请选择开始日期' }]" | |||||
/> | |||||
<van-popup v-model="showEndTime" position="bottom"> | |||||
<van-datetime-picker | |||||
v-model="endTime" | |||||
type="date" | |||||
title="选择年月日" | |||||
@confirm="onConfirmEndTime" | |||||
@cancel="showEndTime = false" | |||||
/> | |||||
</van-popup> | |||||
<van-field readonly v-model="form.contractYears" label="承包年限(年)" placeholder="承包年限(年)" input-align="right" :border="false" /> | |||||
<van-field readonly required v-model="form.totalAmount" label="承包价款(元)" placeholder="承包价款(元)" input-align="right" :border="false" /> | |||||
<van-field readonly required v-model="form.price" label="折合年均(元)" placeholder="折合年均(元)" input-align="right" :border="false" /> | |||||
<van-field readonly required v-model="form.receivedAmount" label="已结款(元)" placeholder="已结款(元)" input-align="right" :border="false" /> | |||||
<van-field readonly v-model="form.settledAmount" label="下次结款(元)" placeholder="下次结款(元)" input-align="right" :border="false" /> | |||||
</div> | |||||
<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 readonly v-model="form.villageHead" label="村负责人" placeholder="村负责人" input-align="right" :border="false" /> | |||||
<van-field readonly v-model="form.contractCustodian" label="合同保管人" placeholder="合同保管人" input-align="right" /> | |||||
<van-field readonly v-model="form.villageRepsOpinion" label="村民代表意见" placeholder="村民代表意见" input-align="right" :border="false" /> | |||||
<van-field | |||||
readonly | |||||
clickable | |||||
label="会议时间" | |||||
placeholder="请选择" | |||||
v-model="form.meetingTime" | |||||
input-align="right" | |||||
right-icon="arrow-down" | |||||
label-width="auto" | |||||
:border="false" | |||||
/> | |||||
<van-popup v-model="showMeetingTime" position="bottom"> | |||||
<van-datetime-picker | |||||
v-model="meetingTime" | |||||
type="date" | |||||
title="选择年月日" | |||||
@confirm="onConfirmMeetingTime" | |||||
@cancel="showMeetingTime = false" | |||||
/> | |||||
</van-popup> | |||||
</div> | |||||
<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 readonly v-model="form.itemId" label="项目编号" placeholder="项目编号" input-align="right" /> | |||||
<van-field readonly v-model="form.itemName" label="项目名称" placeholder="项目名称" input-align="right" :border="false" /> | |||||
<van-field readonly v-model="form.handleName" label="经办人" placeholder="经办人" input-align="right" :border="false" /> | |||||
<van-field readonly v-model="form.budget" label="预算金额(元)" placeholder="预算金额(元)" input-align="right" :border="false" /> | |||||
<van-field | |||||
readonly | |||||
clickable | |||||
label="招标日期" | |||||
placeholder="请选择" | |||||
v-model="form.biddingDate" | |||||
input-align="right" | |||||
right-icon="arrow-down" | |||||
label-width="auto" | |||||
:border="false" | |||||
/> | |||||
<van-popup v-model="showBiddingDate" position="bottom"> | |||||
<van-datetime-picker | |||||
v-model="biddingDate" | |||||
type="date" | |||||
title="选择年月日" | |||||
@confirm="onConfirmBiddingDate" | |||||
@cancel="showBiddingDate = false" | |||||
/> | |||||
</van-popup> | |||||
<van-field | |||||
readonly | |||||
clickable | |||||
label="招标类型" | |||||
placeholder="请选择" | |||||
v-model="biddingType" | |||||
input-align="right" | |||||
right-icon="arrow-down" | |||||
label-width="auto" | |||||
:border="false" | |||||
/> | |||||
<van-popup v-model="showBiddingType" position="bottom"> | |||||
<van-picker | |||||
show-toolbar | |||||
:columns="biddingTypeOptions" | |||||
@confirm="onConfirmBiddingType" | |||||
@cancel="showBiddingType = false" | |||||
/> | |||||
</van-popup> | |||||
<van-field readonly v-model="form.winBiddingCompany" label="中标单位" placeholder="中标单位" input-align="right" :border="false" /> | |||||
<van-field readonly v-model="form.winBiddingPrice" label="中标金额(元)" placeholder="中标金额(元)" input-align="right" :border="false" /> | |||||
<van-field readonly v-model="form.reviewer" label="审核人" placeholder="审核人" input-align="right" :border="false" /> | |||||
<van-field | |||||
readonly | |||||
clickable | |||||
label="审核时间" | |||||
placeholder="请选择" | |||||
v-model="form.reviewTime" | |||||
input-align="right" | |||||
right-icon="arrow-down" | |||||
label-width="auto" | |||||
:border="false" | |||||
/> | |||||
<van-popup v-model="showReviewTime" position="bottom"> | |||||
<van-datetime-picker | |||||
v-model="reviewTime" | |||||
type="date" | |||||
title="选择年月日" | |||||
@confirm="onConfirmReviewTime" | |||||
@cancel="showReviewTime = false" | |||||
/> | |||||
</van-popup> | |||||
</div> | |||||
<!-- <div style="margin: 16px;">--> | |||||
<!-- <van-button round block type="primary" native-type="submit">--> | |||||
<!-- 提交--> | |||||
<!-- </van-button>--> | |||||
<!-- </div>--> | |||||
</van-form> | |||||
</div> | |||||
</template> | |||||
<script> | |||||
import { getInfo } from "@/api/sunVillage_info/fixedAssets"; | |||||
export default { | |||||
name: "certificateList", | |||||
data() { | |||||
return { | |||||
applicationList:[], | |||||
applicationListSecond:[], | |||||
assetStatusOptions:[], | |||||
auditStatus:[], | |||||
loading: false, | |||||
finished: false, | |||||
listLength:'0', | |||||
searchInput:'', | |||||
form:{ | |||||
assetType:'1', | |||||
contractionSource:'1', | |||||
contractionStatus:'1', | |||||
collectionPay:'1', | |||||
settleType:'1', | |||||
contractPaymentType:'1', | |||||
biddingType:'', | |||||
startTime:this.format(new Date(),'yyyy-MM-dd'), | |||||
endTime:this.format(new Date(),'yyyy-MM-dd'), | |||||
meetingTime:this.format(new Date(),'yyyy-MM-dd'), | |||||
biddingDate:this.format(new Date(),'yyyy-MM-dd'), | |||||
reviewTime:this.format(new Date(),'yyyy-MM-dd'), | |||||
buildingTime:this.format(new Date(),'yyyy-MM-dd'), | |||||
}, | |||||
queryParams:{ | |||||
pageNum:1, | |||||
pageSize:10, | |||||
orderByColumn:'createTime', | |||||
isAsc:'desc', | |||||
name:'', | |||||
}, | |||||
startTime:new Date(), | |||||
endTime:new Date(), | |||||
meetingTime:new Date(), | |||||
biddingDate:new Date(), | |||||
reviewTime:new Date(), | |||||
buildingTime:new Date(), | |||||
//合同类型 | |||||
assetType:'农村土地承包合同类', | |||||
showAssetType:false, | |||||
assetTypeOptions:[], | |||||
//合同来源 | |||||
contractionSource:'线下合同', | |||||
showContractionSource:false, | |||||
contractionSourceOptions:[], | |||||
//合同状态 | |||||
contractionStatus:'正常', | |||||
showContractionStatus:false, | |||||
contractionStatusOptions:[], | |||||
//收付款类型 | |||||
collectionPay:'收款', | |||||
showCollectionPay:false, | |||||
collectionPayOptions:[], | |||||
//结款方式 | |||||
settleType:'一次性支付', | |||||
showSettleType:false, | |||||
settleTypeOptions:[], | |||||
//支付方式 | |||||
contractPaymentType:'现金', | |||||
showContractPaymentType:false, | |||||
contractPaymentTypeOptions:[], | |||||
//支付方式 | |||||
biddingType:'', | |||||
showBiddingType:false, | |||||
biddingTypeOptions:[], | |||||
showStartTime:false, | |||||
showEndTime:false, | |||||
showMeetingTime:false, | |||||
showBiddingDate:false, | |||||
showReviewTime:false, | |||||
showBuildingTime:false, | |||||
}; | |||||
}, | |||||
created() { | |||||
this.houseGetDicts("type_of_contract").then((response) => { | |||||
this.assetTypeOptions = response.data; | |||||
}); | |||||
this.houseGetDicts("contraction_source").then((response) => { | |||||
this.contractionSourceOptions = response.data; | |||||
}); | |||||
this.houseGetDicts("contraction_status").then((response) => { | |||||
this.contractionStatusOptions = response.data; | |||||
}); | |||||
this.houseGetDicts("collection_pay").then((response) => { | |||||
this.collectionPayOptions = response.data; | |||||
}); | |||||
this.houseGetDicts("settle_type").then((response) => { | |||||
this.settleTypeOptions = response.data; | |||||
}); | |||||
this.houseGetDicts("contract_payment_type").then((response) => { | |||||
this.contractPaymentTypeOptions = response.data; | |||||
}); | |||||
this.houseGetDicts("bidding_types").then((response) => { | |||||
this.biddingTypeOptions = response.data; | |||||
}); | |||||
this.getDetail(this.$route.query.id) | |||||
}, | |||||
methods: { | |||||
getDetail(id){ | |||||
setTimeout(() => { | |||||
getInfo(id).then(response => { | |||||
this.form = response.data; | |||||
this.assetType = this.selectDictLabel(this.assetTypeOptions, response.data.assetType); | |||||
this.contractionSource = this.selectDictLabel(this.contractionSourceOptions, response.data.contractionSource); | |||||
this.contractionStatus = this.selectDictLabel(this.contractionStatusOptions, response.data.contractionStatus); | |||||
this.collectionPay = this.selectDictLabel(this.collectionPayOptions, response.data.collectionPay); | |||||
this.settleType = this.selectDictLabel(this.settleTypeOptions, response.data.settleType); | |||||
this.contractPaymentType = this.selectDictLabel(this.contractPaymentTypeOptions, response.data.contractPaymentType); | |||||
this.biddingType = this.selectDictLabel(this.biddingTypeOptions, response.data.biddingType); | |||||
}); | |||||
}, 1000); | |||||
}, | |||||
onConfirmAssetType(data){ | |||||
this.assetType = data.text; | |||||
this.form.assetType = data.value; | |||||
this.showAssetType = false; | |||||
}, | |||||
onConfirmContractionSource(data){ | |||||
this.contractionSource = data.text; | |||||
this.form.contractionSource = data.value; | |||||
this.showContractionSource = false; | |||||
}, | |||||
onConfirmContractionStatus(data){ | |||||
this.contractionStatus = data.text; | |||||
this.form.contractionStatus = data.value; | |||||
this.showContractionStatus = false; | |||||
}, | |||||
onConfirmCollectionPay(data){ | |||||
this.collectionPay = data.text; | |||||
this.form.collectionPay = data.value; | |||||
this.showCollectionPay = false; | |||||
}, | |||||
onConfirmSettleType(data){ | |||||
this.settleType = data.text; | |||||
this.form.settleType = data.value; | |||||
this.showSettleType = false; | |||||
}, | |||||
onConfirmContractPaymentType(data){ | |||||
this.contractPaymentType = data.text; | |||||
this.form.contractPaymentType = data.value; | |||||
this.showContractPaymentType = false; | |||||
}, | |||||
onConfirmBiddingType(data){ | |||||
this.biddingType = data.text; | |||||
this.form.biddingType = data.value; | |||||
this.showBiddingType = false; | |||||
}, | |||||
onConfirmStartTime(data){ | |||||
this.form.startTime = this.format(data,'yyyy-MM-dd'); | |||||
this.startTime = data; | |||||
this.showStartTime = false; | |||||
}, | |||||
onConfirmEndTime(data){ | |||||
this.form.endTime = this.format(data,'yyyy-MM-dd'); | |||||
this.endTime = data; | |||||
this.showEndTime = false; | |||||
}, | |||||
onConfirmMeetingTime(data){ | |||||
this.form.meetingTime = this.format(data,'yyyy-MM-dd'); | |||||
this.meetingTime = data; | |||||
this.showMeetingTime = false; | |||||
}, | |||||
onConfirmBiddingDate(data){ | |||||
this.form.biddingDate = this.format(data,'yyyy-MM-dd'); | |||||
this.biddingDate = data; | |||||
this.showBiddingDate = false; | |||||
}, | |||||
onConfirmReviewTime(data){ | |||||
this.form.reviewTime = this.format(data,'yyyy-MM-dd'); | |||||
this.reviewTime = data; | |||||
this.showReviewTime = false; | |||||
}, | |||||
onConfirmBuildingTime(data){ | |||||
this.form.buildingTime = this.format(data,'yyyy-MM-dd'); | |||||
this.buildingTime = data; | |||||
this.showBuildingTime = false; | |||||
}, | |||||
onSubmit(){ | |||||
addInfo(this.form).then((response) => { | |||||
if (response.code == 200){ | |||||
this.$notify({ type: 'success', message: '新增成功' }); | |||||
setTimeout(function(){ | |||||
history.back(-1); | |||||
},2000) | |||||
} | |||||
}); | |||||
} | |||||
}, | |||||
} | |||||
</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; | |||||
} | |||||
} | |||||
.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,670 @@ | |||||
<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_1.png" style="width:22PX;height:22PX;margin-right: 10px;"/> | |||||
<p class="tit">合同信息</p> | |||||
</div> | |||||
<van-field required v-model="form.code" label="合同编码" placeholder="合同编码" input-align="right" :border="false" /> | |||||
<van-field required v-model="form.name" label="合同名称" placeholder="合同名称" input-align="right" :border="false" /> | |||||
<van-field | |||||
readonly | |||||
clickable | |||||
label="合同类型" | |||||
placeholder="请选择" | |||||
v-model="assetType" | |||||
@click="showAssetType = true" | |||||
input-align="right" | |||||
right-icon="arrow-down" | |||||
label-width="auto" | |||||
required | |||||
:border="false" | |||||
:rules="[{ required: true , message:'请选择合同类型' }]" | |||||
/> | |||||
<van-popup v-model="showAssetType" position="bottom"> | |||||
<van-picker | |||||
show-toolbar | |||||
:columns="assetTypeOptions" | |||||
@confirm="onConfirmAssetType" | |||||
@cancel="showAssetType = false" | |||||
/> | |||||
</van-popup> | |||||
<van-field | |||||
readonly | |||||
clickable | |||||
label="合同来源" | |||||
placeholder="请选择" | |||||
v-model="contractionSource" | |||||
@click="showContractionSource = true" | |||||
input-align="right" | |||||
right-icon="arrow-down" | |||||
label-width="auto" | |||||
required | |||||
:border="false" | |||||
:rules="[{ required: true , message:'请选择合同来源' }]" | |||||
/> | |||||
<van-popup v-model="showContractionSource" position="bottom"> | |||||
<van-picker | |||||
show-toolbar | |||||
:columns="contractionSourceOptions" | |||||
@confirm="onConfirmContractionSource" | |||||
@cancel="showContractionSource = false" | |||||
/> | |||||
</van-popup> | |||||
<van-field required v-model="form.firstParty" label="合同甲方" placeholder="合同甲方" input-align="right" :border="false" /> | |||||
<van-field v-model="form.firstPartyDirector" label="甲方代表" placeholder="甲方代表" input-align="right" :border="false" /> | |||||
<van-field v-model="form.firstPartyPhone" label="甲方电话" placeholder="甲方电话" input-align="right" :border="false" /> | |||||
<van-field required v-model="form.secondParty" label="合同乙方" placeholder="乙方名称" input-align="right" :border="false" /> | |||||
<van-field v-model="form.secondPartyDirector" label="乙方代表" placeholder="乙方代表" input-align="right" :border="false" /> | |||||
<van-field v-model="form.secondPartyPhone" label="乙方电话" placeholder="乙方电话" input-align="right" :border="false" /> | |||||
<van-field v-model="form.secondPartyIdCard" label="乙方身份证号" placeholder="乙方身份证号" input-align="right" :border="false" /> | |||||
<van-field | |||||
readonly | |||||
clickable | |||||
label="签订日期" | |||||
placeholder="请选择" | |||||
v-model="form.buildingTime" | |||||
@click="showBuildingTime = true" | |||||
input-align="right" | |||||
right-icon="arrow-down" | |||||
label-width="auto" | |||||
required | |||||
:border="false" | |||||
/> | |||||
<van-popup v-model="showBuildingTime" position="bottom"> | |||||
<van-datetime-picker | |||||
v-model="buildingTime" | |||||
type="date" | |||||
title="选择年月日" | |||||
@confirm="onConfirmBuildingTime" | |||||
@cancel="showBuildingTime = false" | |||||
/> | |||||
</van-popup> | |||||
<van-field | |||||
readonly | |||||
clickable | |||||
label="合同状态" | |||||
placeholder="请选择" | |||||
v-model="contractionStatus" | |||||
@click="showContractionStatus = true" | |||||
input-align="right" | |||||
right-icon="arrow-down" | |||||
label-width="auto" | |||||
required | |||||
:border="false" | |||||
:rules="[{ required: true , message:'请选择合同状态' }]" | |||||
/> | |||||
<van-popup v-model="showContractionStatus" position="bottom"> | |||||
<van-picker | |||||
show-toolbar | |||||
:columns="contractionStatusOptions" | |||||
@confirm="onConfirmContractionStatus" | |||||
@cancel="showContractionStatus = false" | |||||
/> | |||||
</van-popup> | |||||
<van-field v-model="form.remark" label="备注" placeholder="备注" input-align="right" :border="false" /> | |||||
</div> | |||||
<div class="list_main"> | |||||
<div class="titBox"> | |||||
<img src="../../assets/images/sunVillage_info/add_icon_1.png" style="width:22PX;height:22PX;margin-right: 10px;"/> | |||||
<p class="tit">合同约定</p> | |||||
</div> | |||||
<van-field | |||||
readonly | |||||
clickable | |||||
label="收付款类型" | |||||
placeholder="请选择" | |||||
v-model="collectionPay" | |||||
@click="showCollectionPay = true" | |||||
input-align="right" | |||||
right-icon="arrow-down" | |||||
label-width="auto" | |||||
required | |||||
:border="false" | |||||
:rules="[{ required: true , message:'请选择收付款类型' }]" | |||||
/> | |||||
<van-popup v-model="showCollectionPay" position="bottom"> | |||||
<van-picker | |||||
show-toolbar | |||||
:columns="collectionPayOptions" | |||||
@confirm="onConfirmCollectionPay" | |||||
@cancel="showCollectionPay = false" | |||||
/> | |||||
</van-popup> | |||||
<van-field | |||||
readonly | |||||
clickable | |||||
label="结款方式" | |||||
placeholder="请选择" | |||||
v-model="settleType" | |||||
@click="showSettleType = true" | |||||
input-align="right" | |||||
right-icon="arrow-down" | |||||
label-width="auto" | |||||
required | |||||
:border="false" | |||||
:rules="[{ required: true , message:'请选择结款方式' }]" | |||||
/> | |||||
<van-popup v-model="showSettleType" position="bottom"> | |||||
<van-picker | |||||
show-toolbar | |||||
:columns="settleTypeOptions" | |||||
@confirm="onConfirmSettleType" | |||||
@cancel="showSettleType = false" | |||||
/> | |||||
</van-popup> | |||||
<van-field | |||||
readonly | |||||
clickable | |||||
label="支付方式" | |||||
placeholder="请选择" | |||||
v-model="contractPaymentType" | |||||
@click="showContractPaymentType = true" | |||||
input-align="right" | |||||
right-icon="arrow-down" | |||||
label-width="auto" | |||||
required | |||||
:border="false" | |||||
:rules="[{ required: true , message:'请选择支付方式' }]" | |||||
/> | |||||
<van-popup v-model="showContractPaymentType" position="bottom"> | |||||
<van-picker | |||||
show-toolbar | |||||
:columns="contractPaymentTypeOptions" | |||||
@confirm="onConfirmContractPaymentType" | |||||
@cancel="showContractPaymentType = false" | |||||
/> | |||||
</van-popup> | |||||
<van-field v-model="form.contractObject" label="合同标的" placeholder="合同标的" input-align="right" :border="false" /> | |||||
<van-field v-model="form.num" label="标的数量" placeholder="标的数量" input-align="right" :border="false" /> | |||||
<van-field v-model="form.unit" label="计量单位" placeholder="计量单位" input-align="right" :border="false" /> | |||||
<van-field | |||||
readonly | |||||
clickable | |||||
label="开始日期" | |||||
placeholder="请选择" | |||||
v-model="form.startTime" | |||||
@click="showStartTime = true" | |||||
input-align="right" | |||||
right-icon="arrow-down" | |||||
label-width="auto" | |||||
required | |||||
:border="false" | |||||
:rules="[{ required: true , message:'请选择开始日期' }]" | |||||
/> | |||||
<van-popup v-model="showStartTime" position="bottom"> | |||||
<van-datetime-picker | |||||
v-model="startTime" | |||||
type="date" | |||||
title="选择年月日" | |||||
@confirm="onConfirmStartTime" | |||||
@cancel="showStartTime = false" | |||||
/> | |||||
</van-popup> | |||||
<van-field | |||||
readonly | |||||
clickable | |||||
label="结束日期" | |||||
placeholder="请选择" | |||||
v-model="form.endTime" | |||||
@click="showEndTime = true" | |||||
input-align="right" | |||||
right-icon="arrow-down" | |||||
label-width="auto" | |||||
required | |||||
:border="false" | |||||
:rules="[{ required: true , message:'请选择开始日期' }]" | |||||
/> | |||||
<van-popup v-model="showEndTime" position="bottom"> | |||||
<van-datetime-picker | |||||
v-model="endTime" | |||||
type="date" | |||||
title="选择年月日" | |||||
@confirm="onConfirmEndTime" | |||||
@cancel="showEndTime = false" | |||||
/> | |||||
</van-popup> | |||||
<van-field v-model="form.contractYears" label="承包年限(年)" placeholder="承包年限(年)" input-align="right" :border="false" /> | |||||
<van-field required v-model="form.totalAmount" label="承包价款(元)" placeholder="承包价款(元)" input-align="right" :border="false" /> | |||||
<van-field required v-model="form.price" label="折合年均(元)" placeholder="折合年均(元)" input-align="right" :border="false" /> | |||||
<van-field required v-model="form.receivedAmount" label="已结款(元)" placeholder="已结款(元)" input-align="right" :border="false" /> | |||||
<van-field v-model="form.settledAmount" label="下次结款(元)" placeholder="下次结款(元)" input-align="right" :border="false" /> | |||||
</div> | |||||
<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 v-model="form.villageHead" label="村负责人" placeholder="村负责人" input-align="right" :border="false" /> | |||||
<van-field v-model="form.contractCustodian" label="合同保管人" placeholder="合同保管人" input-align="right" /> | |||||
<van-field v-model="form.villageRepsOpinion" label="村民代表意见" placeholder="村民代表意见" input-align="right" :border="false" /> | |||||
<van-field | |||||
readonly | |||||
clickable | |||||
label="会议时间" | |||||
placeholder="请选择" | |||||
v-model="form.meetingTime" | |||||
@click="showMeetingTime = true" | |||||
input-align="right" | |||||
right-icon="arrow-down" | |||||
label-width="auto" | |||||
:border="false" | |||||
/> | |||||
<van-popup v-model="showMeetingTime" position="bottom"> | |||||
<van-datetime-picker | |||||
v-model="meetingTime" | |||||
type="date" | |||||
title="选择年月日" | |||||
@confirm="onConfirmMeetingTime" | |||||
@cancel="showMeetingTime = false" | |||||
/> | |||||
</van-popup> | |||||
</div> | |||||
<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.itemId" label="项目编号" placeholder="项目编号" input-align="right" /> | |||||
<van-field v-model="form.itemName" label="项目名称" placeholder="项目名称" input-align="right" :border="false" /> | |||||
<van-field v-model="form.handleName" label="经办人" placeholder="经办人" input-align="right" :border="false" /> | |||||
<van-field v-model="form.budget" label="预算金额(元)" placeholder="预算金额(元)" input-align="right" :border="false" /> | |||||
<van-field | |||||
readonly | |||||
clickable | |||||
label="招标日期" | |||||
placeholder="请选择" | |||||
v-model="form.biddingDate" | |||||
@click="showBiddingDate = true" | |||||
input-align="right" | |||||
right-icon="arrow-down" | |||||
label-width="auto" | |||||
:border="false" | |||||
/> | |||||
<van-popup v-model="showBiddingDate" position="bottom"> | |||||
<van-datetime-picker | |||||
v-model="biddingDate" | |||||
type="date" | |||||
title="选择年月日" | |||||
@confirm="onConfirmBiddingDate" | |||||
@cancel="showBiddingDate = false" | |||||
/> | |||||
</van-popup> | |||||
<van-field | |||||
readonly | |||||
clickable | |||||
label="招标类型" | |||||
placeholder="请选择" | |||||
v-model="biddingType" | |||||
@click="showBiddingType = true" | |||||
input-align="right" | |||||
right-icon="arrow-down" | |||||
label-width="auto" | |||||
:border="false" | |||||
/> | |||||
<van-popup v-model="showBiddingType" position="bottom"> | |||||
<van-picker | |||||
show-toolbar | |||||
:columns="biddingTypeOptions" | |||||
@confirm="onConfirmBiddingType" | |||||
@cancel="showBiddingType = false" | |||||
/> | |||||
</van-popup> | |||||
<van-field v-model="form.winBiddingCompany" label="中标单位" placeholder="中标单位" input-align="right" :border="false" /> | |||||
<van-field v-model="form.winBiddingPrice" label="中标金额(元)" placeholder="中标金额(元)" input-align="right" :border="false" /> | |||||
<van-field v-model="form.reviewer" label="审核人" placeholder="审核人" input-align="right" :border="false" /> | |||||
<van-field | |||||
readonly | |||||
clickable | |||||
label="审核时间" | |||||
placeholder="请选择" | |||||
v-model="form.reviewTime" | |||||
@click="showReviewTime = true" | |||||
input-align="right" | |||||
right-icon="arrow-down" | |||||
label-width="auto" | |||||
:border="false" | |||||
/> | |||||
<van-popup v-model="showReviewTime" position="bottom"> | |||||
<van-datetime-picker | |||||
v-model="reviewTime" | |||||
type="date" | |||||
title="选择年月日" | |||||
@confirm="onConfirmReviewTime" | |||||
@cancel="showReviewTime = false" | |||||
/> | |||||
</van-popup> | |||||
</div> | |||||
<div style="margin: 16px;"> | |||||
<van-button round block type="primary" native-type="submit"> | |||||
保存 | |||||
</van-button> | |||||
</div> | |||||
</van-form> | |||||
</div> | |||||
</template> | |||||
<script> | |||||
import { updateInfo , getInfo } from "@/api/sunVillage_info/fixedAssets"; | |||||
export default { | |||||
name: "certificateList", | |||||
data() { | |||||
return { | |||||
applicationList:[], | |||||
applicationListSecond:[], | |||||
assetStatusOptions:[], | |||||
auditStatus:[], | |||||
loading: false, | |||||
finished: false, | |||||
listLength:'0', | |||||
searchInput:'', | |||||
form:{ | |||||
assetType:'1', | |||||
contractionSource:'1', | |||||
contractionStatus:'1', | |||||
collectionPay:'1', | |||||
settleType:'1', | |||||
contractPaymentType:'1', | |||||
biddingType:'', | |||||
startTime:this.format(new Date(),'yyyy-MM-dd'), | |||||
endTime:this.format(new Date(),'yyyy-MM-dd'), | |||||
meetingTime:this.format(new Date(),'yyyy-MM-dd'), | |||||
biddingDate:this.format(new Date(),'yyyy-MM-dd'), | |||||
reviewTime:this.format(new Date(),'yyyy-MM-dd'), | |||||
buildingTime:this.format(new Date(),'yyyy-MM-dd'), | |||||
}, | |||||
queryParams:{ | |||||
pageNum:1, | |||||
pageSize:10, | |||||
orderByColumn:'createTime', | |||||
isAsc:'desc', | |||||
name:'', | |||||
}, | |||||
startTime:new Date(), | |||||
endTime:new Date(), | |||||
meetingTime:new Date(), | |||||
biddingDate:new Date(), | |||||
reviewTime:new Date(), | |||||
buildingTime:new Date(), | |||||
//合同类型 | |||||
assetType:'农村土地承包合同类', | |||||
showAssetType:false, | |||||
assetTypeOptions:[], | |||||
//合同来源 | |||||
contractionSource:'线下合同', | |||||
showContractionSource:false, | |||||
contractionSourceOptions:[], | |||||
//合同状态 | |||||
contractionStatus:'正常', | |||||
showContractionStatus:false, | |||||
contractionStatusOptions:[], | |||||
//收付款类型 | |||||
collectionPay:'收款', | |||||
showCollectionPay:false, | |||||
collectionPayOptions:[], | |||||
//结款方式 | |||||
settleType:'一次性支付', | |||||
showSettleType:false, | |||||
settleTypeOptions:[], | |||||
//支付方式 | |||||
contractPaymentType:'现金', | |||||
showContractPaymentType:false, | |||||
contractPaymentTypeOptions:[], | |||||
//支付方式 | |||||
biddingType:'', | |||||
showBiddingType:false, | |||||
biddingTypeOptions:[], | |||||
showStartTime:false, | |||||
showEndTime:false, | |||||
showMeetingTime:false, | |||||
showBiddingDate:false, | |||||
showReviewTime:false, | |||||
showBuildingTime:false, | |||||
}; | |||||
}, | |||||
created() { | |||||
this.houseGetDicts("type_of_contract").then((response) => { | |||||
for(var i = 0 ; i < response.data.length ; i++){ | |||||
this.assetTypeOptions.push({text:response.data[i].dictLabel,value:response.data[i].dictValue}); | |||||
} | |||||
this.assetTypeOptions = response.data; | |||||
}); | |||||
this.houseGetDicts("contraction_source").then((response) => { | |||||
for(var i = 0 ; i < response.data.length ; i++){ | |||||
this.contractionSourceOptions.push({text:response.data[i].dictLabel,value:response.data[i].dictValue}); | |||||
} | |||||
this.contractionSourceOptions = response.data; | |||||
}); | |||||
this.houseGetDicts("contraction_status").then((response) => { | |||||
for(var i = 0 ; i < response.data.length ; i++){ | |||||
this.contractionStatusOptions.push({text:response.data[i].dictLabel,value:response.data[i].dictValue}); | |||||
} | |||||
this.contractionStatusOptions = response.data; | |||||
}); | |||||
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.collectionPayOptions = response.data; | |||||
}); | |||||
this.houseGetDicts("settle_type").then((response) => { | |||||
for(var i = 0 ; i < response.data.length ; i++){ | |||||
this.settleTypeOptions.push({text:response.data[i].dictLabel,value:response.data[i].dictValue}); | |||||
} | |||||
this.settleTypeOptions = response.data; | |||||
}); | |||||
this.houseGetDicts("contract_payment_type").then((response) => { | |||||
for(var i = 0 ; i < response.data.length ; i++){ | |||||
this.contractPaymentTypeOptions.push({text:response.data[i].dictLabel,value:response.data[i].dictValue}); | |||||
} | |||||
this.contractPaymentTypeOptions = response.data; | |||||
}); | |||||
this.houseGetDicts("bidding_types").then((response) => { | |||||
for(var i = 0 ; i < response.data.length ; i++){ | |||||
this.biddingTypeOptions.push({text:response.data[i].dictLabel,value:response.data[i].dictValue}); | |||||
} | |||||
this.biddingTypeOptions = response.data; | |||||
}); | |||||
this.getDetail(this.$route.query.id) | |||||
}, | |||||
methods: { | |||||
getDetail(id){ | |||||
setTimeout(() => { | |||||
getInfo(id).then(response => { | |||||
this.form = response.data; | |||||
this.assetType = this.selectDictLabel(this.assetTypeOptions, response.data.assetType); | |||||
this.contractionSource = this.selectDictLabel(this.contractionSourceOptions, response.data.contractionSource); | |||||
this.contractionStatus = this.selectDictLabel(this.contractionStatusOptions, response.data.contractionStatus); | |||||
this.collectionPay = this.selectDictLabel(this.collectionPayOptions, response.data.collectionPay); | |||||
this.settleType = this.selectDictLabel(this.settleTypeOptions, response.data.settleType); | |||||
this.contractPaymentType = this.selectDictLabel(this.contractPaymentTypeOptions, response.data.contractPaymentType); | |||||
this.biddingType = this.selectDictLabel(this.biddingTypeOptions, response.data.biddingType); | |||||
}); | |||||
}, 1000); | |||||
}, | |||||
onConfirmAssetType(data){ | |||||
this.assetType = data.text; | |||||
this.form.assetType = data.value; | |||||
this.showAssetType = false; | |||||
}, | |||||
onConfirmContractionSource(data){ | |||||
this.contractionSource = data.text; | |||||
this.form.contractionSource = data.value; | |||||
this.showContractionSource = false; | |||||
}, | |||||
onConfirmContractionStatus(data){ | |||||
this.contractionStatus = data.text; | |||||
this.form.contractionStatus = data.value; | |||||
this.showContractionStatus = false; | |||||
}, | |||||
onConfirmCollectionPay(data){ | |||||
this.collectionPay = data.text; | |||||
this.form.collectionPay = data.value; | |||||
this.showCollectionPay = false; | |||||
}, | |||||
onConfirmSettleType(data){ | |||||
this.settleType = data.text; | |||||
this.form.settleType = data.value; | |||||
this.showSettleType = false; | |||||
}, | |||||
onConfirmContractPaymentType(data){ | |||||
this.contractPaymentType = data.text; | |||||
this.form.contractPaymentType = data.value; | |||||
this.showContractPaymentType = false; | |||||
}, | |||||
onConfirmBiddingType(data){ | |||||
this.biddingType = data.text; | |||||
this.form.biddingType = data.value; | |||||
this.showBiddingType = false; | |||||
}, | |||||
onConfirmStartTime(data){ | |||||
this.form.startTime = this.format(data,'yyyy-MM-dd'); | |||||
this.startTime = data; | |||||
this.showStartTime = false; | |||||
}, | |||||
onConfirmEndTime(data){ | |||||
this.form.endTime = this.format(data,'yyyy-MM-dd'); | |||||
this.endTime = data; | |||||
this.showEndTime = false; | |||||
}, | |||||
onConfirmMeetingTime(data){ | |||||
this.form.meetingTime = this.format(data,'yyyy-MM-dd'); | |||||
this.meetingTime = data; | |||||
this.showMeetingTime = false; | |||||
}, | |||||
onConfirmBiddingDate(data){ | |||||
this.form.biddingDate = this.format(data,'yyyy-MM-dd'); | |||||
this.biddingDate = data; | |||||
this.showBiddingDate = false; | |||||
}, | |||||
onConfirmReviewTime(data){ | |||||
this.form.reviewTime = this.format(data,'yyyy-MM-dd'); | |||||
this.reviewTime = data; | |||||
this.showReviewTime = false; | |||||
}, | |||||
onConfirmBuildingTime(data){ | |||||
this.form.buildingTime = this.format(data,'yyyy-MM-dd'); | |||||
this.buildingTime = data; | |||||
this.showBuildingTime = false; | |||||
}, | |||||
onSubmit(){ | |||||
updateInfo(this.form).then((response) => { | |||||
if (response.code == 200){ | |||||
this.$notify({ type: 'success', message: '修改成功' }); | |||||
setTimeout(function(){ | |||||
history.back(-1); | |||||
},2000) | |||||
} | |||||
}); | |||||
} | |||||
}, | |||||
} | |||||
</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; | |||||
} | |||||
} | |||||
.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> |