@@ -55,6 +55,15 @@ export function commonAttach(data) { | |||||
data: data | data: data | ||||
}) | }) | ||||
} | } | ||||
//上传全局方法附件 | |||||
export function commonUpload(data) { | |||||
return request({ | |||||
url: '/common/upload', | |||||
method: 'post', | |||||
header: { "Content-Type": 'application/x-www-form-urlencoded' }, | |||||
data: data | |||||
}) | |||||
} | |||||
//查询已上传附件 | //查询已上传附件 | ||||
export const attachmentList = (data) => { | export const attachmentList = (data) => { | ||||
return request({ | return request({ | ||||
@@ -184,3 +193,72 @@ export function changeBook(query) { | |||||
params: query | params: query | ||||
}) | }) | ||||
} | } | ||||
// 财务公开新增 | |||||
export function openAdd(data) { | |||||
return request({ | |||||
url: '/open/open/add', | |||||
method: 'post', | |||||
data: data | |||||
}) | |||||
} | |||||
// 财务公开修改 | |||||
export function openEdit(data) { | |||||
return request({ | |||||
url: '/open/open/edit', | |||||
method: 'post', | |||||
data: data | |||||
}) | |||||
} | |||||
// 零工公开新增 | |||||
export function tempWorkerOpenAdd(data) { | |||||
return request({ | |||||
url: '/subcontract/tempWorkerOpen/add', | |||||
method: 'post', | |||||
data: data | |||||
}) | |||||
} | |||||
// 财务公开修改 | |||||
export function tempWorkerOpenEdit(data) { | |||||
return request({ | |||||
url: '/subcontract/tempWorkerOpen/edit', | |||||
method: 'post', | |||||
data: data | |||||
}) | |||||
} | |||||
// 重大事项新增 | |||||
export function majorEventOpenAdd(data) { | |||||
return request({ | |||||
url: '/subcontract/majorEventOpen/add', | |||||
method: 'post', | |||||
data: data | |||||
}) | |||||
} | |||||
// 重大事项修改 | |||||
export function majorEventOpenEdit(data) { | |||||
return request({ | |||||
url: '/subcontract/majorEventOpen/edit', | |||||
method: 'post', | |||||
data: data | |||||
}) | |||||
} | |||||
// 财务公开删除 | |||||
export function openRemove(id) { | |||||
return request({ | |||||
url: '/open/open/remove/' + id, | |||||
method: 'get' | |||||
}) | |||||
} | |||||
// 零工公开删除 | |||||
export function tempWorkerOpenRemove(id) { | |||||
return request({ | |||||
url: '/subcontract/tempWorkerOpen/remove/' + id, | |||||
method: 'get' | |||||
}) | |||||
} | |||||
// 零工公开删除 | |||||
export function majorEventOpenRemove(id) { | |||||
return request({ | |||||
url: '/subcontract/majorEventOpen/remove/' + id, | |||||
method: 'get' | |||||
}) | |||||
} |
@@ -2967,10 +2967,82 @@ export const constantRoutes = [ | |||||
path: '/sunVillage_info/list_finance_add', | path: '/sunVillage_info/list_finance_add', | ||||
name: 'sunVillageInfoListFinanceAdd', | name: 'sunVillageInfoListFinanceAdd', | ||||
meta: { | meta: { | ||||
title: '新增重大事项', | |||||
title: '新增财务公开', | |||||
hidden: true, | hidden: true, | ||||
}, | }, | ||||
component: (resolve) => require(['@/views/sunVillage_info/list_finance_add'], resolve) | component: (resolve) => require(['@/views/sunVillage_info/list_finance_add'], resolve) | ||||
}, | |||||
{ ////阳光村务(新)-- 合同信息 | |||||
path: '/sunVillage_info/list_finance_detail', | |||||
name: 'sunVillageInfoListFinanceDetail', | |||||
meta: { | |||||
title: '查看财务公开', | |||||
hidden: true, | |||||
}, | |||||
component: (resolve) => require(['@/views/sunVillage_info/list_finance_detail'], resolve) | |||||
}, | |||||
{ ////阳光村务(新)-- 合同信息 | |||||
path: '/sunVillage_info/list_tourists_add', | |||||
name: 'sunVillageInfoListTouristsAdd', | |||||
meta: { | |||||
title: '新增零工公开', | |||||
hidden: true, | |||||
}, | |||||
component: (resolve) => require(['@/views/sunVillage_info/list_tourists_add'], resolve) | |||||
}, | |||||
{ ////阳光村务(新)-- 合同信息 | |||||
path: '/sunVillage_info/list_finance_edit', | |||||
name: 'sunVillageInfoListFinanceEdit', | |||||
meta: { | |||||
title: '修改财务公开', | |||||
hidden: true, | |||||
}, | |||||
component: (resolve) => require(['@/views/sunVillage_info/list_finance_edit'], resolve) | |||||
}, | |||||
{ ////阳光村务(新)-- 合同信息 | |||||
path: '/sunVillage_info/list_tourists_edit', | |||||
name: 'sunVillageInfoListTouristsEdit', | |||||
meta: { | |||||
title: '修改零工公开', | |||||
hidden: true, | |||||
}, | |||||
component: (resolve) => require(['@/views/sunVillage_info/list_tourists_edit'], resolve) | |||||
}, | |||||
{ ////阳光村务(新)-- 合同信息 | |||||
path: '/sunVillage_info/list_tourists_detail', | |||||
name: 'sunVillageInfoListTouristsDetail', | |||||
meta: { | |||||
title: '查看零工公开', | |||||
hidden: true, | |||||
}, | |||||
component: (resolve) => require(['@/views/sunVillage_info/list_tourists_detail'], resolve) | |||||
}, | |||||
{ ////阳光村务(新)-- 合同信息 | |||||
path: '/sunVillage_info/list_issues_add', | |||||
name: 'sunVillageInfoListIssuesAdd', | |||||
meta: { | |||||
title: '新增重大事项', | |||||
hidden: true, | |||||
}, | |||||
component: (resolve) => require(['@/views/sunVillage_info/list_issues_add'], resolve) | |||||
}, | |||||
{ ////阳光村务(新)-- 合同信息 | |||||
path: '/sunVillage_info/list_issues_detail', | |||||
name: 'sunVillageInfoListIssuesDetail', | |||||
meta: { | |||||
title: '查看重大事项', | |||||
hidden: true, | |||||
}, | |||||
component: (resolve) => require(['@/views/sunVillage_info/list_issues_detail'], resolve) | |||||
}, | |||||
{ ////阳光村务(新)-- 合同信息 | |||||
path: '/sunVillage_info/list_issues_edit', | |||||
name: 'sunVillageInfoListIssuesEdit', | |||||
meta: { | |||||
title: '修改重大事项', | |||||
hidden: true, | |||||
}, | |||||
component: (resolve) => require(['@/views/sunVillage_info/list_issues_edit'], resolve) | |||||
} | } | ||||
]; | ]; | ||||
@@ -89,6 +89,8 @@ service.interceptors.response.use(res => { | |||||
window.location.href = '/zjdLogin'; | window.location.href = '/zjdLogin'; | ||||
} else if (window.location.href.indexOf('yinnong') != -1) { | } else if (window.location.href.indexOf('yinnong') != -1) { | ||||
window.location.href = '/yinnongLogin'; | window.location.href = '/yinnongLogin'; | ||||
} else if (window.location.href.indexOf('/sunVillage_info/') != -1) { | |||||
window.location.href = '/sunVillage_info/login'; | |||||
} else if (window.location.href.indexOf('/sunVillage') != -1) { | } else if (window.location.href.indexOf('/sunVillage') != -1) { | ||||
window.location.href = '/sunVillage/login'; | window.location.href = '/sunVillage/login'; | ||||
} else if (window.location.href.indexOf('/homestead/') != -1) { | } else if (window.location.href.indexOf('/homestead/') != -1) { | ||||
@@ -126,6 +126,7 @@ | |||||
}, | }, | ||||
afterRead(file) { | afterRead(file) { | ||||
// 此时可以自行将文件上传至服务器 | // 此时可以自行将文件上传至服务器 | ||||
console.log(file) | |||||
this.uploadFiles1.push(file.file); | this.uploadFiles1.push(file.file); | ||||
let params1 = new FormData(); | let params1 = new FormData(); | ||||
params1.append("tableId", this.projectId); | params1.append("tableId", this.projectId); | ||||
@@ -25,8 +25,8 @@ | |||||
@load="getList" | @load="getList" | ||||
> | > | ||||
<!----1--> | <!----1--> | ||||
<div class="item" v-for="(item,index) in applicationList" :key="index" @click="goDetail(item.id)"> | |||||
<div class="info"> | |||||
<div class="item" v-for="(item,index) in applicationList" :key="index"> | |||||
<div class="info" @click="goDetail(item.id)"> | |||||
<div class="title"> | <div class="title"> | ||||
<i class="icon_box"></i> | <i class="icon_box"></i> | ||||
<p class="news_title">{{item.openName}}</p> | <p class="news_title">{{item.openName}}</p> | ||||
@@ -39,10 +39,10 @@ | |||||
</div> | </div> | ||||
<div class="operation"> | <div class="operation"> | ||||
<!-- delete 删除 edit编辑 view查看 --> | <!-- delete 删除 edit编辑 view查看 --> | ||||
<div class="opera_btn edit"> | |||||
<div class="opera_btn edit" @click="goEdit(item.id)"> | |||||
<i class="icon "></i> | <i class="icon "></i> | ||||
</div> | </div> | ||||
<div class="opera_btn delete"> | |||||
<div class="opera_btn delete" @click="goRemove(item.id)"> | |||||
<i class="icon"></i> | <i class="icon"></i> | ||||
</div> | </div> | ||||
<!-- <div class="opera_btn view"> | <!-- <div class="opera_btn view"> | ||||
@@ -60,7 +60,7 @@ | |||||
</template> | </template> | ||||
<script> | <script> | ||||
import { financePublicList } from "@/api/sunVillage_info/fixedAssets"; | |||||
import { financePublicList,openRemove } from "@/api/sunVillage_info/fixedAssets"; | |||||
import Cookies from "js-cookie"; | import Cookies from "js-cookie"; | ||||
import request from '@/utils/request' | import request from '@/utils/request' | ||||
export default { | export default { | ||||
@@ -171,8 +171,27 @@ | |||||
this.$router.push('/sunVillage_info/list_finance_add') | this.$router.push('/sunVillage_info/list_finance_add') | ||||
}, | }, | ||||
goDetail(id){ | goDetail(id){ | ||||
this.$router.push({path:'/sunVillage_info/details',query: {id:id,type:'finance'}}) | |||||
this.$router.push({path:'/sunVillage_info/list_finance_detail',query: {id:id,type:'finance'}}) | |||||
}, | }, | ||||
goEdit(id){ | |||||
this.$router.push({path:'/sunVillage_info/list_finance_edit',query: {id:id,type:'finance'}}) | |||||
}, | |||||
goRemove(id){ | |||||
this.$dialog.alert({ | |||||
title: '提示', | |||||
message: '确认删除?', | |||||
}) | |||||
.then(() => { | |||||
openRemove(id).then(response => { | |||||
this.$notify({ type: 'success', message: '删除成功' }); | |||||
this.getList() | |||||
}); | |||||
}) | |||||
.catch(() => { | |||||
// on cancel | |||||
}); | |||||
} | |||||
}, | }, | ||||
} | } | ||||
</script> | </script> | ||||
@@ -1,8 +1,8 @@ | |||||
<template> | <template> | ||||
<div class="home_wrapper"> | <div class="home_wrapper"> | ||||
<div class="header_main"> | <div class="header_main"> | ||||
李家村4月零工公示 | |||||
<div class="return_btn"></div> | |||||
新增财务公开 | |||||
<div class="return_btn" @click="onClickLeft"></div> | |||||
<div class="add_btn"></div> | <div class="add_btn"></div> | ||||
</div> | </div> | ||||
<van-form @submit="onSubmit"> | <van-form @submit="onSubmit"> | ||||
@@ -36,24 +36,24 @@ | |||||
/> | /> | ||||
</van-popup> | </van-popup> | ||||
<van-field required v-model="form.openName" placeholder="请输入名称" input-align="right" :border="false" > | |||||
<van-field required v-model="form.openName" placeholder="请输入名称" :rules="[{ required: true , message:'请输入名称' }]" input-align="right" :border="false" > | |||||
<template #label> | <template #label> | ||||
<img src="../../assets/images/sunVillage_info/add_tit_icon_02.png" width="18"> | <img src="../../assets/images/sunVillage_info/add_tit_icon_02.png" width="18"> | ||||
<p style="margin-left: 5px;">公开名称</p> | <p style="margin-left: 5px;">公开名称</p> | ||||
</template> | </template> | ||||
</van-field> | </van-field> | ||||
<van-field required readonly v-model="form.openPic" input-align="right" :border="false" > | |||||
<van-field required readonly input-align="right" :border="false" > | |||||
<template #label> | <template #label> | ||||
<img src="../../assets/images/sunVillage_info/add_tit_icon_03.png" width="18"> | <img src="../../assets/images/sunVillage_info/add_tit_icon_03.png" width="18"> | ||||
<p style="margin-left: 5px;">公开图片</p> | <p style="margin-left: 5px;">公开图片</p> | ||||
</template> | </template> | ||||
</van-field> | </van-field> | ||||
<!-- @delete="deleteFile1"--> | |||||
<van-uploader v-model="fileList" :after-read="afterRead" @delete="deleteFile1" multiple style="margin-top: 10PX" /> | <van-uploader v-model="fileList" :after-read="afterRead" @delete="deleteFile1" multiple style="margin-top: 10PX" /> | ||||
<div style="border-top: 1px solid #ededed;margin-top: 10PX;"> | <div style="border-top: 1px solid #ededed;margin-top: 10PX;"> | ||||
<van-field readonly v-model="form.openFile" input-align="right" :border="false" > | |||||
<van-field readonly input-align="right" :border="false" > | |||||
<template #label> | <template #label> | ||||
<img src="../../assets/images/sunVillage_info/add_tit_icon_04.png" width="18"> | <img src="../../assets/images/sunVillage_info/add_tit_icon_04.png" width="18"> | ||||
<p style="margin-left: 5px;">附件</p> | <p style="margin-left: 5px;">附件</p> | ||||
@@ -61,7 +61,7 @@ | |||||
</van-field> | </van-field> | ||||
<div> | <div> | ||||
<div v-for="(item,index) in openFile" :key="index" style="display: flex;align-items: center;margin-top: 10px;"> | |||||
<div v-for="(item,index) in openFileList" :key="index" style="display: flex;align-items: center;margin-top: 10px;"> | |||||
<img src="../../assets/images/sunVillage_info/WORD.png" width="30" v-if="item.type == 'word'"/> | <img src="../../assets/images/sunVillage_info/WORD.png" width="30" v-if="item.type == 'word'"/> | ||||
<img src="../../assets/images/sunVillage_info/ECEL.png" width="30" v-if="item.type == 'excel'" /> | <img src="../../assets/images/sunVillage_info/ECEL.png" width="30" v-if="item.type == 'excel'" /> | ||||
<p style="margin-left: 10px;">{{item.name}}</p> | <p style="margin-left: 10px;">{{item.name}}</p> | ||||
@@ -90,7 +90,7 @@ | |||||
</template> | </template> | ||||
<script> | <script> | ||||
import { commonAttach , tempWorkerPublicDetail , majorEventPublicDetail } from "@/api/sunVillage_info/fixedAssets"; | |||||
import { commonUpload , openAdd } from "@/api/sunVillage_info/fixedAssets"; | |||||
import Cookies from "js-cookie"; | import Cookies from "js-cookie"; | ||||
import request from '@/utils/request' | import request from '@/utils/request' | ||||
export default { | export default { | ||||
@@ -100,11 +100,22 @@ | |||||
showBuildTime:false, | showBuildTime:false, | ||||
form:{ | form:{ | ||||
openNy:this.format(new Date(),'yyyy-MM'), | openNy:this.format(new Date(),'yyyy-MM'), | ||||
openPic:'', | |||||
openFile:'', | |||||
}, | }, | ||||
openPic:[], | |||||
fileList:[], | fileList:[], | ||||
fileList1:[], | |||||
openNy:new Date(), | openNy:new Date(), | ||||
type:'', | type:'', | ||||
openFile:[] | |||||
openFile:[], | |||||
openFileList:[], | |||||
queryParams:{ | |||||
bookId:'', | |||||
deptId:'' | |||||
}, | |||||
openFile2:[], | |||||
openPic2:[], | |||||
}; | }; | ||||
}, | }, | ||||
created() { | created() { | ||||
@@ -117,31 +128,56 @@ | |||||
this.houseGetDicts("use_type").then((response) => { | this.houseGetDicts("use_type").then((response) => { | ||||
this.useTypeOptions = response.data; | this.useTypeOptions = response.data; | ||||
}); | }); | ||||
this.queryParams.id = this.$route.query.id; | |||||
this.type = this.$route.query.type; | this.type = this.$route.query.type; | ||||
this.queryParams.bookId = Cookies.get('bookId'); | this.queryParams.bookId = Cookies.get('bookId'); | ||||
this.queryParams.deptId = Cookies.get('deptId'); | this.queryParams.deptId = Cookies.get('deptId'); | ||||
this.getDetail() | |||||
}, | }, | ||||
methods: { | methods: { | ||||
onSubmit(){}, | |||||
onSubmit(){ | |||||
console.log(this.openFile) | |||||
console.log(this.openPic) | |||||
this.openFile.map(res=>{ | |||||
let params1 = new FormData(); | |||||
params1.append("file", res); | |||||
commonUpload(params1).then((r1) => { | |||||
this.openFile2.push(r1.fileName); | |||||
}) | |||||
}) | |||||
this.openPic.map(res=>{ | |||||
console.log(res) | |||||
let params1 = new FormData(); | |||||
params1.append("file", res); | |||||
commonUpload(params1).then((r1) => { | |||||
this.openPic2.push(r1.fileName); | |||||
}) | |||||
}) | |||||
var that = this; | |||||
setTimeout(function(){ | |||||
that.form.openFile = that.openFile2.join(',') | |||||
that.form.openPic = that.openPic2.join(',') | |||||
openAdd(that.form).then((r1) => { | |||||
if (r1.code == 200){ | |||||
that.$notify({ type: 'success', message: '新增成功' }); | |||||
setTimeout(function(){ | |||||
history.back(-1); | |||||
},2000) | |||||
} | |||||
}) | |||||
},2000); | |||||
}, | |||||
onConfirmOpenNy(data){ | onConfirmOpenNy(data){ | ||||
this.form.openNy = this.format(data,'yyyy-MM'); | this.form.openNy = this.format(data,'yyyy-MM'); | ||||
this.openNy = data; | this.openNy = data; | ||||
this.showBuildTime = false; | this.showBuildTime = false; | ||||
}, | }, | ||||
deleteFile1(file){ | |||||
console.log(file) | |||||
// this.form.openPic.splice(index,1); | |||||
}, | |||||
afterRead(file) { | afterRead(file) { | ||||
// 此时可以自行将文件上传至服务器 | // 此时可以自行将文件上传至服务器 | ||||
this.form.openPic.push(file.file); | |||||
// 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", file.file); | |||||
// commonAttach(params1).then((r1) => { | |||||
// this.$notify({ type: 'success', message: '上传成功' }); | |||||
// }) | |||||
this.openPic.push(file.file); | |||||
}, | }, | ||||
afterReadOpenFile(file){ | afterReadOpenFile(file){ | ||||
console.log(file) | console.log(file) | ||||
@@ -152,7 +188,8 @@ | |||||
}else if(name.indexOf('.xls') > -1){ | }else if(name.indexOf('.xls') > -1){ | ||||
type = 'excel'; | type = 'excel'; | ||||
} | } | ||||
this.openFile.push({name:file.file.name,type:type}) | |||||
this.openFileList.push({name:file.file.name,type:type}) | |||||
this.openFile.push(file.file); | |||||
} | } | ||||
}, | }, | ||||
} | } | ||||
@@ -0,0 +1,251 @@ | |||||
<template> | |||||
<div class="home_wrapper"> | |||||
<div class="header_main"> | |||||
查看财务公开 | |||||
<div class="return_btn" @click="onClickLeft"></div> | |||||
<div class="add_btn"></div> | |||||
</div> | |||||
<div class="list_main"> | |||||
<van-field | |||||
readonly | |||||
clickable | |||||
placeholder="请选择" | |||||
v-model="form.openNy" | |||||
input-align="right" | |||||
right-icon="arrow-down" | |||||
label-width="auto" | |||||
required | |||||
:border="false" | |||||
:rules="[{ required: true , message:'请选择购建时间' }]" | |||||
> | |||||
<template #label> | |||||
<img src="../../assets/images/sunVillage_info/add_tit_icon_01.png" width="18"> | |||||
<p style="margin-left: 5px;">公开年月</p> | |||||
</template> | |||||
</van-field> | |||||
<van-field readonly required v-model="form.openName" placeholder="请输入名称" :rules="[{ required: true , message:'请输入名称' }]" input-align="right" :border="false" > | |||||
<template #label> | |||||
<img src="../../assets/images/sunVillage_info/add_tit_icon_02.png" width="18"> | |||||
<p style="margin-left: 5px;">公开名称</p> | |||||
</template> | |||||
</van-field> | |||||
<van-field required readonly input-align="right" :border="false" > | |||||
<template #label> | |||||
<img src="../../assets/images/sunVillage_info/add_tit_icon_03.png" width="18"> | |||||
<p style="margin-left: 5px;">公开图片</p> | |||||
</template> | |||||
</van-field> | |||||
<!-- @delete="deleteFile1"--> | |||||
<van-uploader v-model="openPic" :show-upload="false" :deletable="false" multiple style="margin-top: 10PX" /> | |||||
<div style="border-top: 1px solid #ededed;margin-top: 10PX;"> | |||||
<van-field readonly input-align="right" :border="false" > | |||||
<template #label> | |||||
<img src="../../assets/images/sunVillage_info/add_tit_icon_04.png" width="18"> | |||||
<p style="margin-left: 5px;">附件</p> | |||||
</template> | |||||
</van-field> | |||||
<div> | |||||
<div v-for="(item,index) in openFileList" :key="index" style="display: flex;align-items: center;margin-top: 10px;"> | |||||
<img src="../../assets/images/sunVillage_info/WORD.png" width="30" v-if="item.type == 'word'"/> | |||||
<img src="../../assets/images/sunVillage_info/ECEL.png" width="30" v-if="item.type == 'excel'" /> | |||||
<p style="margin-left: 10px;">{{item.name}}</p> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<van-field readonly v-model="form.remark" placeholder="请输入备注" input-align="right" :border="false" > | |||||
<template #label> | |||||
<img src="../../assets/images/sunVillage_info/add_tit_icon_05.png" width="18"> | |||||
<p style="margin-left: 5px;">备注</p> | |||||
</template> | |||||
</van-field> | |||||
</div> | |||||
</div> | |||||
</template> | |||||
<script> | |||||
import { financePublicDetail , openAdd } from "@/api/sunVillage_info/fixedAssets"; | |||||
import Cookies from "js-cookie"; | |||||
import request from '@/utils/request' | |||||
export default { | |||||
name: "certificateList", | |||||
data() { | |||||
return { | |||||
showBuildTime:false, | |||||
form:{ | |||||
openNy:this.format(new Date(),'yyyy-MM'), | |||||
openPic:'', | |||||
openFile:'', | |||||
}, | |||||
openPic:[], | |||||
fileList:[], | |||||
fileList1:[], | |||||
openNy:new Date(), | |||||
type:'', | |||||
openFile:[], | |||||
openFileList:[], | |||||
queryParams:{ | |||||
bookId:'', | |||||
deptId:'' | |||||
} | |||||
}; | |||||
}, | |||||
created() { | |||||
this.houseGetDicts("asset_status").then((response) => { | |||||
this.assetStatusOptions = response.data; | |||||
}); | |||||
this.houseGetDicts("asset_type").then((response) => { | |||||
this.assetTypeOptions = response.data; | |||||
}); | |||||
this.houseGetDicts("use_type").then((response) => { | |||||
this.useTypeOptions = response.data; | |||||
}); | |||||
this.type = this.$route.query.type; | |||||
this.queryParams.bookId = Cookies.get('bookId'); | |||||
this.queryParams.deptId = Cookies.get('deptId'); | |||||
this.queryParams.id = this.$route.query.id; | |||||
this.getDetail(); | |||||
}, | |||||
methods: { | |||||
getDetail(id){ | |||||
financePublicDetail(this.queryParams).then((res) => { | |||||
res.data.openFile = res.data.openFile.split(',') | |||||
res.data.openPic = res.data.openPic.split(',') | |||||
res.data.openFile.map(rr=>{ | |||||
let name = rr.substr(27,rr.length); | |||||
let type = ''; | |||||
if (name.indexOf('.doc') > -1){ | |||||
type = 'word'; | |||||
}else if(name.indexOf('.xls') > -1){ | |||||
type = 'excel'; | |||||
} | |||||
this.openFileList.push({name:name,type:type}) | |||||
}) | |||||
res.data.openPic.map((rrr,i)=>{ | |||||
this.openPic.push({url:this.$store.getters.baseRoutingUrl+rrr}) | |||||
}) | |||||
this.form = res.data; | |||||
}) | |||||
}, | |||||
}, | |||||
} | |||||
</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; | |||||
} | |||||
} | |||||
.release_head{ | |||||
height: 90px; | |||||
padding:0 23px; | |||||
display: flex; | |||||
align-items: center; | |||||
font-size: 26px; | |||||
color: #929292; | |||||
.people{ | |||||
flex: 1; | |||||
display: flex; | |||||
align-items: center; | |||||
.icon{ | |||||
width: 24px; | |||||
height: 21px; | |||||
background: url('../../assets/images/sunVillage_info/details_icon_1.png') no-repeat; | |||||
background-size: 100% 100%; | |||||
display: block; | |||||
margin-right: 8px; | |||||
} | |||||
} | |||||
.time{ | |||||
flex: 1; | |||||
display: flex; | |||||
align-items: center; | |||||
justify-content:flex-end; | |||||
.icon{ | |||||
width: 25px; | |||||
height: 25px; | |||||
background: url('../../assets/images/sunVillage_info/details_icon_2.png') no-repeat; | |||||
background-size: 100% 100%; | |||||
display: block; | |||||
margin-right: 8px; | |||||
} | |||||
} | |||||
} | |||||
.release_conetnt{ | |||||
padding:0 22px; | |||||
font-size: 32px; | |||||
color: #252525; | |||||
line-height: 44px; | |||||
img{ | |||||
max-width: 100%; | |||||
margin-bottom: 16px; | |||||
} | |||||
p{ | |||||
margin-bottom: 16px; | |||||
} | |||||
} | |||||
.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: auto; | |||||
display: flex; | |||||
align-items: center; | |||||
} | |||||
/deep/ .van-cell--required::before{ | |||||
left: 85PX; | |||||
} | |||||
} | |||||
</style> |
@@ -0,0 +1,336 @@ | |||||
<template> | |||||
<div class="home_wrapper"> | |||||
<div class="header_main"> | |||||
新增财务公开 | |||||
<div class="return_btn" @click="onClickLeft"></div> | |||||
<div class="add_btn"></div> | |||||
</div> | |||||
<van-form @submit="onSubmit"> | |||||
<div class="list_main"> | |||||
<van-field | |||||
readonly | |||||
clickable | |||||
placeholder="请选择" | |||||
v-model="form.openNy" | |||||
@click="showBuildTime = true" | |||||
input-align="right" | |||||
right-icon="arrow-down" | |||||
label-width="auto" | |||||
required | |||||
:border="false" | |||||
:rules="[{ required: true , message:'请选择购建时间' }]" | |||||
> | |||||
<template #label> | |||||
<img src="../../assets/images/sunVillage_info/add_tit_icon_01.png" width="18"> | |||||
<p style="margin-left: 5px;">公开年月</p> | |||||
</template> | |||||
</van-field> | |||||
<van-popup v-model="showBuildTime" position="bottom"> | |||||
<van-datetime-picker | |||||
v-model="openNy" | |||||
type="year-month" | |||||
title="选择年月日" | |||||
@confirm="onConfirmOpenNy" | |||||
@cancel="showBuildTime = false" | |||||
/> | |||||
</van-popup> | |||||
<van-field required v-model="form.openName" placeholder="请输入名称" :rules="[{ required: true , message:'请输入名称' }]" input-align="right" :border="false" > | |||||
<template #label> | |||||
<img src="../../assets/images/sunVillage_info/add_tit_icon_02.png" width="18"> | |||||
<p style="margin-left: 5px;">公开名称</p> | |||||
</template> | |||||
</van-field> | |||||
<van-field required readonly input-align="right" :border="false" > | |||||
<template #label> | |||||
<img src="../../assets/images/sunVillage_info/add_tit_icon_03.png" width="18"> | |||||
<p style="margin-left: 5px;">公开图片</p> | |||||
</template> | |||||
</van-field> | |||||
<!-- @delete="deleteFile1"--> | |||||
<van-uploader v-model="openPic" :after-read="afterRead" @delete="deleteFile1" style="margin-top: 10PX" /> | |||||
<div style="border-top: 1px solid #ededed;margin-top: 10PX;"> | |||||
<van-field readonly input-align="right" :border="false" > | |||||
<template #label> | |||||
<img src="../../assets/images/sunVillage_info/add_tit_icon_04.png" width="18"> | |||||
<p style="margin-left: 5px;">附件</p> | |||||
</template> | |||||
</van-field> | |||||
<div> | |||||
<div v-for="(item,index) in openFile" :key="index" style="display: flex;align-items: center;margin-top: 10px;"> | |||||
<img src="../../assets/images/sunVillage_info/WORD.png" width="30" v-if="item.type == 'word'"/> | |||||
<img src="../../assets/images/sunVillage_info/ECEL.png" width="30" v-if="item.type == 'excel'" /> | |||||
<p style="margin-left: 10px;">{{item.name}}</p> | |||||
</div> | |||||
</div> | |||||
<van-uploader accept="*" :after-read="afterReadOpenFile" style="margin-top: 10PX"> | |||||
<img src="../../assets/images/sunVillage_info/addFile.png" width="120" /> | |||||
</van-uploader> | |||||
</div> | |||||
<van-field v-model="form.remark" placeholder="请输入备注" input-align="right" :border="false" > | |||||
<template #label> | |||||
<img src="../../assets/images/sunVillage_info/add_tit_icon_05.png" width="18"> | |||||
<p style="margin-left: 5px;">备注</p> | |||||
</template> | |||||
</van-field> | |||||
</div> | |||||
<div style="margin: 16px;"> | |||||
<van-button round block type="primary" native-type="submit"> | |||||
保存 | |||||
</van-button> | |||||
</div> | |||||
</van-form> | |||||
</div> | |||||
</template> | |||||
<script> | |||||
import { commonUpload , openEdit , financePublicDetail } from "@/api/sunVillage_info/fixedAssets"; | |||||
import Cookies from "js-cookie"; | |||||
import request from '@/utils/request' | |||||
export default { | |||||
name: "certificateList", | |||||
data() { | |||||
return { | |||||
showBuildTime:false, | |||||
form:{ | |||||
openNy:this.format(new Date(),'yyyy-MM'), | |||||
openPic:'', | |||||
openFile:'', | |||||
}, | |||||
openPic:[], | |||||
fileList:[], | |||||
fileList1:[], | |||||
openNy:new Date(), | |||||
type:'', | |||||
openFile:[], | |||||
openFileList:[], | |||||
openPicList:[], | |||||
queryParams:{ | |||||
bookId:'', | |||||
deptId:'' | |||||
}, | |||||
openPic2:[], | |||||
openFile2:[] | |||||
}; | |||||
}, | |||||
created() { | |||||
this.houseGetDicts("asset_status").then((response) => { | |||||
this.assetStatusOptions = response.data; | |||||
}); | |||||
this.houseGetDicts("asset_type").then((response) => { | |||||
this.assetTypeOptions = response.data; | |||||
}); | |||||
this.houseGetDicts("use_type").then((response) => { | |||||
this.useTypeOptions = response.data; | |||||
}); | |||||
this.type = this.$route.query.type; | |||||
this.queryParams.bookId = Cookies.get('bookId'); | |||||
this.queryParams.deptId = Cookies.get('deptId'); | |||||
this.queryParams.id = this.$route.query.id; | |||||
this.getDetail(); | |||||
}, | |||||
methods: { | |||||
getDetail(id){ | |||||
financePublicDetail(this.queryParams).then((res) => { | |||||
var that = this ; | |||||
if (res.data.openFile!=''){ | |||||
this.openFile = res.data.openFile.split(',') | |||||
this.openFile2 = res.data.openFile.split(',') | |||||
this.openFile.map((rr,i)=>{ | |||||
let name = rr.substr(27,rr.length); | |||||
let type = ''; | |||||
if (name.indexOf('.doc') > -1){ | |||||
type = 'word'; | |||||
}else if(name.indexOf('.xls') > -1){ | |||||
type = 'excel'; | |||||
} | |||||
this.openFile[i] = {name:name,type:type} | |||||
}) | |||||
} | |||||
if (res.data.openPic!=''){ | |||||
this.openPic = res.data.openPic.split(',') | |||||
this.openPic2 = res.data.openPic.split(',') | |||||
this.openPic.map((rrr,i)=>{ | |||||
this.openPic[i] = {url:this.$store.getters.baseRoutingUrl+rrr} | |||||
}) | |||||
} | |||||
that.form = res.data; | |||||
}) | |||||
}, | |||||
onSubmit(){ | |||||
this.openFileList.map(res=>{ | |||||
let params1 = new FormData(); | |||||
params1.append("file", res); | |||||
commonUpload(params1).then((r1) => { | |||||
this.openFile2.push(r1.fileName); | |||||
}) | |||||
}) | |||||
this.openPicList.map(res=>{ | |||||
console.log(res) | |||||
let params1 = new FormData(); | |||||
params1.append("file", res); | |||||
commonUpload(params1).then((r1) => { | |||||
this.openPic2.push(r1.fileName); | |||||
}) | |||||
}) | |||||
var that = this; | |||||
setTimeout(function(){ | |||||
console.log(that.form.openFile) | |||||
console.log(that.form.openPic) | |||||
that.form.openFile = that.openFile2.join(',') | |||||
that.form.openPic = that.openPic2.join(',') | |||||
openEdit(that.form).then((r1) => { | |||||
if (r1.code == 200){ | |||||
that.$notify({ type: 'success', message: '修改成功' }); | |||||
setTimeout(function(){ | |||||
history.back(-1); | |||||
},2000) | |||||
} | |||||
}) | |||||
},2000); | |||||
}, | |||||
onConfirmOpenNy(data){ | |||||
this.form.openNy = this.format(data,'yyyy-MM'); | |||||
this.openNy = data; | |||||
this.showBuildTime = false; | |||||
}, | |||||
deleteFile1(file){ | |||||
console.log(file) | |||||
// this.form.openPic.splice(index,1); | |||||
}, | |||||
afterRead(file) { | |||||
// 此时可以自行将文件上传至服务器 | |||||
this.openPicList.push(file.file); | |||||
}, | |||||
afterReadOpenFile(file){ | |||||
console.log(file) | |||||
let name = file.file.name; | |||||
let type = ''; | |||||
if (name.indexOf('.doc') > -1){ | |||||
type = 'word'; | |||||
}else if(name.indexOf('.xls') > -1){ | |||||
type = 'excel'; | |||||
} | |||||
this.openFile.push({name:file.file.name,type:type}) | |||||
this.openFileList.push(file.file); | |||||
} | |||||
}, | |||||
} | |||||
</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; | |||||
} | |||||
} | |||||
.release_head{ | |||||
height: 90px; | |||||
padding:0 23px; | |||||
display: flex; | |||||
align-items: center; | |||||
font-size: 26px; | |||||
color: #929292; | |||||
.people{ | |||||
flex: 1; | |||||
display: flex; | |||||
align-items: center; | |||||
.icon{ | |||||
width: 24px; | |||||
height: 21px; | |||||
background: url('../../assets/images/sunVillage_info/details_icon_1.png') no-repeat; | |||||
background-size: 100% 100%; | |||||
display: block; | |||||
margin-right: 8px; | |||||
} | |||||
} | |||||
.time{ | |||||
flex: 1; | |||||
display: flex; | |||||
align-items: center; | |||||
justify-content:flex-end; | |||||
.icon{ | |||||
width: 25px; | |||||
height: 25px; | |||||
background: url('../../assets/images/sunVillage_info/details_icon_2.png') no-repeat; | |||||
background-size: 100% 100%; | |||||
display: block; | |||||
margin-right: 8px; | |||||
} | |||||
} | |||||
} | |||||
.release_conetnt{ | |||||
padding:0 22px; | |||||
font-size: 32px; | |||||
color: #252525; | |||||
line-height: 44px; | |||||
img{ | |||||
max-width: 100%; | |||||
margin-bottom: 16px; | |||||
} | |||||
p{ | |||||
margin-bottom: 16px; | |||||
} | |||||
} | |||||
.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: auto; | |||||
display: flex; | |||||
align-items: center; | |||||
} | |||||
/deep/ .van-cell--required::before{ | |||||
left: 85PX; | |||||
} | |||||
} | |||||
</style> |
@@ -25,8 +25,8 @@ | |||||
@load="getList" | @load="getList" | ||||
> | > | ||||
<!----1--> | <!----1--> | ||||
<div class="item" v-for="(item,index) in applicationList" :key="index" @click="goDetail(item.id)" > | |||||
<div class="info"> | |||||
<div class="item" v-for="(item,index) in applicationList" :key="index" > | |||||
<div class="info" @click="goDetail(item.id)"> | |||||
<div class="title"> | <div class="title"> | ||||
<i class="icon_box"></i> | <i class="icon_box"></i> | ||||
<p class="news_title">{{item.openName}}</p> | <p class="news_title">{{item.openName}}</p> | ||||
@@ -39,10 +39,10 @@ | |||||
</div> | </div> | ||||
<div class="operation"> | <div class="operation"> | ||||
<!-- delete 删除 edit编辑 view查看 --> | <!-- delete 删除 edit编辑 view查看 --> | ||||
<div class="opera_btn edit"> | |||||
<div class="opera_btn edit" @click="goEdit(item.id)"> | |||||
<i class="icon "></i> | <i class="icon "></i> | ||||
</div> | </div> | ||||
<div class="opera_btn delete"> | |||||
<div class="opera_btn delete" @click="goRemove(item.id)"> | |||||
<i class="icon"></i> | <i class="icon"></i> | ||||
</div> | </div> | ||||
<!-- <div class="opera_btn view"> | <!-- <div class="opera_btn view"> | ||||
@@ -59,7 +59,7 @@ | |||||
</template> | </template> | ||||
<script> | <script> | ||||
import { majorEventPublicList } from "@/api/sunVillage_info/fixedAssets"; | |||||
import { majorEventPublicList , majorEventOpenRemove } from "@/api/sunVillage_info/fixedAssets"; | |||||
import Cookies from "js-cookie"; | import Cookies from "js-cookie"; | ||||
import request from '@/utils/request' | import request from '@/utils/request' | ||||
export default { | export default { | ||||
@@ -167,11 +167,30 @@ | |||||
}); | }); | ||||
}, | }, | ||||
goAdd(){ | goAdd(){ | ||||
this.$router.push('/sunVillage_info/fixedAssetsAdd') | |||||
this.$router.push('/sunVillage_info/list_issues_add') | |||||
}, | }, | ||||
goDetail(id){ | goDetail(id){ | ||||
this.$router.push({path:'/sunVillage_info/details',query: {id:id,type:'issues'}}) | |||||
this.$router.push({path:'/sunVillage_info/list_issues_detail',query: {id:id,type:'issues'}}) | |||||
}, | }, | ||||
goEdit(id){ | |||||
this.$router.push({path:'/sunVillage_info/list_issues_edit',query: {id:id,type:'finance'}}) | |||||
}, | |||||
goRemove(id){ | |||||
this.$dialog.alert({ | |||||
title: '提示', | |||||
message: '确认删除?', | |||||
}) | |||||
.then(() => { | |||||
majorEventOpenRemove(id).then(response => { | |||||
this.$notify({ type: 'success', message: '删除成功' }); | |||||
this.getList() | |||||
}); | |||||
}) | |||||
.catch(() => { | |||||
// on cancel | |||||
}); | |||||
} | |||||
}, | }, | ||||
} | } | ||||
</script> | </script> | ||||
@@ -0,0 +1,313 @@ | |||||
<template> | |||||
<div class="home_wrapper"> | |||||
<div class="header_main"> | |||||
新增重大事项 | |||||
<div class="return_btn" @click="onClickLeft"></div> | |||||
<div class="add_btn"></div> | |||||
</div> | |||||
<van-form @submit="onSubmit"> | |||||
<div class="list_main"> | |||||
<van-field | |||||
readonly | |||||
clickable | |||||
placeholder="请选择" | |||||
v-model="form.openDate" | |||||
@click="showBuildTime = true" | |||||
input-align="right" | |||||
right-icon="arrow-down" | |||||
label-width="auto" | |||||
required | |||||
:border="false" | |||||
:rules="[{ required: true , message:'请选择购建时间' }]" | |||||
> | |||||
<template #label> | |||||
<img src="../../assets/images/sunVillage_info/add_tit_icon_01.png" width="18"> | |||||
<p style="margin-left: 5px;">公开年月</p> | |||||
</template> | |||||
</van-field> | |||||
<van-popup v-model="showBuildTime" position="bottom"> | |||||
<van-datetime-picker | |||||
v-model="openNy" | |||||
type="date" | |||||
title="选择年月日" | |||||
@confirm="onConfirmOpenNy" | |||||
@cancel="showBuildTime = false" | |||||
/> | |||||
</van-popup> | |||||
<van-field required v-model="form.openName" placeholder="请输入名称" :rules="[{ required: true , message:'请输入名称' }]" input-align="right" :border="false" > | |||||
<template #label> | |||||
<img src="../../assets/images/sunVillage_info/add_tit_icon_02.png" width="18"> | |||||
<p style="margin-left: 5px;">公开名称</p> | |||||
</template> | |||||
</van-field> | |||||
<van-field required readonly input-align="right" :border="false" > | |||||
<template #label> | |||||
<img src="../../assets/images/sunVillage_info/add_tit_icon_03.png" width="18"> | |||||
<p style="margin-left: 5px;">公开图片</p> | |||||
</template> | |||||
</van-field> | |||||
<!-- @delete="deleteFile1"--> | |||||
<van-uploader v-model="fileList" :after-read="afterRead" @delete="deleteFile1" multiple style="margin-top: 10PX" /> | |||||
<div style="border-top: 1px solid #ededed;margin-top: 10PX;"> | |||||
<van-field readonly input-align="right" :border="false" > | |||||
<template #label> | |||||
<img src="../../assets/images/sunVillage_info/add_tit_icon_04.png" width="18"> | |||||
<p style="margin-left: 5px;">附件</p> | |||||
</template> | |||||
</van-field> | |||||
<div> | |||||
<div v-for="(item,index) in openFileList" :key="index" style="display: flex;align-items: center;margin-top: 10px;"> | |||||
<img src="../../assets/images/sunVillage_info/WORD.png" width="30" v-if="item.type == 'word'"/> | |||||
<img src="../../assets/images/sunVillage_info/ECEL.png" width="30" v-if="item.type == 'excel'" /> | |||||
<p style="margin-left: 10px;">{{item.name}}</p> | |||||
</div> | |||||
</div> | |||||
<van-uploader accept="*" :after-read="afterReadOpenFile" style="margin-top: 10PX"> | |||||
<img src="../../assets/images/sunVillage_info/addFile.png" width="120" /> | |||||
</van-uploader> | |||||
</div> | |||||
<van-field v-model="form.remark" placeholder="请输入备注" input-align="right" :border="false" > | |||||
<template #label> | |||||
<img src="../../assets/images/sunVillage_info/add_tit_icon_05.png" width="18"> | |||||
<p style="margin-left: 5px;">备注</p> | |||||
</template> | |||||
</van-field> | |||||
<van-field v-model="form.content" type="textarea" autosize placeholder="请输入内容" input-align="right" :border="false" > | |||||
<template #label> | |||||
<img src="../../assets/images/sunVillage_info/add_tit_icon_05.png" width="18"> | |||||
<p style="margin-left: 5px;">内容</p> | |||||
</template> | |||||
</van-field> | |||||
</div> | |||||
<div style="margin: 16px;"> | |||||
<van-button round block type="primary" native-type="submit"> | |||||
保存 | |||||
</van-button> | |||||
</div> | |||||
</van-form> | |||||
</div> | |||||
</template> | |||||
<script> | |||||
import { commonUpload , majorEventOpenAdd } from "@/api/sunVillage_info/fixedAssets"; | |||||
import Cookies from "js-cookie"; | |||||
import request from '@/utils/request' | |||||
export default { | |||||
name: "certificateList", | |||||
data() { | |||||
return { | |||||
showBuildTime:false, | |||||
form:{ | |||||
openDate:this.format(new Date(),'yyyy-MM-dd'), | |||||
openPic:'', | |||||
openFile:'', | |||||
}, | |||||
openPic:[], | |||||
fileList:[], | |||||
fileList1:[], | |||||
openNy:new Date(), | |||||
type:'', | |||||
openFile:[], | |||||
openFileList:[], | |||||
queryParams:{ | |||||
bookId:'', | |||||
deptId:'' | |||||
}, | |||||
openFile2:[], | |||||
openPic2:[], | |||||
}; | |||||
}, | |||||
created() { | |||||
this.houseGetDicts("asset_status").then((response) => { | |||||
this.assetStatusOptions = response.data; | |||||
}); | |||||
this.houseGetDicts("asset_type").then((response) => { | |||||
this.assetTypeOptions = response.data; | |||||
}); | |||||
this.houseGetDicts("use_type").then((response) => { | |||||
this.useTypeOptions = response.data; | |||||
}); | |||||
this.type = this.$route.query.type; | |||||
this.queryParams.bookId = Cookies.get('bookId'); | |||||
this.queryParams.deptId = Cookies.get('deptId'); | |||||
}, | |||||
methods: { | |||||
onSubmit(){ | |||||
console.log(this.openFile) | |||||
console.log(this.openPic) | |||||
this.openFile.map(res=>{ | |||||
let params1 = new FormData(); | |||||
params1.append("file", res); | |||||
commonUpload(params1).then((r1) => { | |||||
this.openFile2.push(r1.fileName); | |||||
}) | |||||
}) | |||||
this.openPic.map(res=>{ | |||||
console.log(res) | |||||
let params1 = new FormData(); | |||||
params1.append("file", res); | |||||
commonUpload(params1).then((r1) => { | |||||
this.openPic2.push(r1.fileName); | |||||
}) | |||||
}) | |||||
var that = this; | |||||
setTimeout(function(){ | |||||
that.form.openFile = that.openFile2.join(',') | |||||
that.form.openPic = that.openPic2.join(',') | |||||
majorEventOpenAdd(that.form).then((r1) => { | |||||
if (r1.code == 200){ | |||||
that.$notify({ type: 'success', message: '新增成功' }); | |||||
setTimeout(function(){ | |||||
history.back(-1); | |||||
},2000) | |||||
} | |||||
}) | |||||
},2000); | |||||
}, | |||||
onConfirmOpenNy(data){ | |||||
this.form.openNy = this.format(data,'yyyy-MM'); | |||||
this.openNy = data; | |||||
this.showBuildTime = false; | |||||
}, | |||||
deleteFile1(file){ | |||||
console.log(file) | |||||
// this.form.openPic.splice(index,1); | |||||
}, | |||||
afterRead(file) { | |||||
// 此时可以自行将文件上传至服务器 | |||||
this.openPic.push(file.file); | |||||
}, | |||||
afterReadOpenFile(file){ | |||||
console.log(file) | |||||
let name = file.file.name; | |||||
let type = ''; | |||||
if (name.indexOf('.doc') > -1){ | |||||
type = 'word'; | |||||
}else if(name.indexOf('.xls') > -1){ | |||||
type = 'excel'; | |||||
} | |||||
this.openFileList.push({name:file.file.name,type:type}) | |||||
this.openFile.push(file.file); | |||||
} | |||||
}, | |||||
} | |||||
</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; | |||||
} | |||||
} | |||||
.release_head{ | |||||
height: 90px; | |||||
padding:0 23px; | |||||
display: flex; | |||||
align-items: center; | |||||
font-size: 26px; | |||||
color: #929292; | |||||
.people{ | |||||
flex: 1; | |||||
display: flex; | |||||
align-items: center; | |||||
.icon{ | |||||
width: 24px; | |||||
height: 21px; | |||||
background: url('../../assets/images/sunVillage_info/details_icon_1.png') no-repeat; | |||||
background-size: 100% 100%; | |||||
display: block; | |||||
margin-right: 8px; | |||||
} | |||||
} | |||||
.time{ | |||||
flex: 1; | |||||
display: flex; | |||||
align-items: center; | |||||
justify-content:flex-end; | |||||
.icon{ | |||||
width: 25px; | |||||
height: 25px; | |||||
background: url('../../assets/images/sunVillage_info/details_icon_2.png') no-repeat; | |||||
background-size: 100% 100%; | |||||
display: block; | |||||
margin-right: 8px; | |||||
} | |||||
} | |||||
} | |||||
.release_conetnt{ | |||||
padding:0 22px; | |||||
font-size: 32px; | |||||
color: #252525; | |||||
line-height: 44px; | |||||
img{ | |||||
max-width: 100%; | |||||
margin-bottom: 16px; | |||||
} | |||||
p{ | |||||
margin-bottom: 16px; | |||||
} | |||||
} | |||||
.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: auto; | |||||
display: flex; | |||||
align-items: center; | |||||
} | |||||
/deep/ .van-cell--required::before{ | |||||
left: 85PX; | |||||
} | |||||
} | |||||
</style> |
@@ -0,0 +1,257 @@ | |||||
<template> | |||||
<div class="home_wrapper"> | |||||
<div class="header_main"> | |||||
查看零工公开 | |||||
<div class="return_btn" @click="onClickLeft"></div> | |||||
<div class="add_btn"></div> | |||||
</div> | |||||
<div class="list_main"> | |||||
<van-field | |||||
readonly | |||||
clickable | |||||
placeholder="请选择" | |||||
v-model="form.openNy" | |||||
input-align="right" | |||||
right-icon="arrow-down" | |||||
label-width="auto" | |||||
required | |||||
:border="false" | |||||
:rules="[{ required: true , message:'请选择购建时间' }]" | |||||
> | |||||
<template #label> | |||||
<img src="../../assets/images/sunVillage_info/add_tit_icon_01.png" width="18"> | |||||
<p style="margin-left: 5px;">公开年月</p> | |||||
</template> | |||||
</van-field> | |||||
<van-field readonly required v-model="form.openName" placeholder="请输入名称" :rules="[{ required: true , message:'请输入名称' }]" input-align="right" :border="false" > | |||||
<template #label> | |||||
<img src="../../assets/images/sunVillage_info/add_tit_icon_02.png" width="18"> | |||||
<p style="margin-left: 5px;">公开名称</p> | |||||
</template> | |||||
</van-field> | |||||
<van-field required readonly input-align="right" :border="false" > | |||||
<template #label> | |||||
<img src="../../assets/images/sunVillage_info/add_tit_icon_03.png" width="18"> | |||||
<p style="margin-left: 5px;">公开图片</p> | |||||
</template> | |||||
</van-field> | |||||
<!-- @delete="deleteFile1"--> | |||||
<van-uploader v-model="openPic" :show-upload="false" :deletable="false" multiple style="margin-top: 10PX" /> | |||||
<div style="border-top: 1px solid #ededed;margin-top: 10PX;"> | |||||
<van-field readonly input-align="right" :border="false" > | |||||
<template #label> | |||||
<img src="../../assets/images/sunVillage_info/add_tit_icon_04.png" width="18"> | |||||
<p style="margin-left: 5px;">附件</p> | |||||
</template> | |||||
</van-field> | |||||
<div> | |||||
<div v-for="(item,index) in openFileList" :key="index" style="display: flex;align-items: center;margin-top: 10px;"> | |||||
<img src="../../assets/images/sunVillage_info/WORD.png" width="30" v-if="item.type == 'word'"/> | |||||
<img src="../../assets/images/sunVillage_info/ECEL.png" width="30" v-if="item.type == 'excel'" /> | |||||
<p style="margin-left: 10px;">{{item.name}}</p> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<van-field readonly v-model="form.remark" placeholder="请输入备注" input-align="right" :border="false" > | |||||
<template #label> | |||||
<img src="../../assets/images/sunVillage_info/add_tit_icon_05.png" width="18"> | |||||
<p style="margin-left: 5px;">备注</p> | |||||
</template> | |||||
</van-field> | |||||
<van-field readonly v-model="form.content" type="textarea" autosize placeholder="请输入备注" input-align="right" :border="false" > | |||||
<template #label> | |||||
<img src="../../assets/images/sunVillage_info/add_tit_icon_05.png" width="18"> | |||||
<p style="margin-left: 5px;">内容</p> | |||||
</template> | |||||
</van-field> | |||||
</div> | |||||
</div> | |||||
</template> | |||||
<script> | |||||
import { majorEventPublicDetail , openAdd } from "@/api/sunVillage_info/fixedAssets"; | |||||
import Cookies from "js-cookie"; | |||||
import request from '@/utils/request' | |||||
export default { | |||||
name: "certificateList", | |||||
data() { | |||||
return { | |||||
showBuildTime:false, | |||||
form:{ | |||||
openNy:this.format(new Date(),'yyyy-MM'), | |||||
openPic:'', | |||||
openFile:'', | |||||
}, | |||||
openPic:[], | |||||
fileList:[], | |||||
fileList1:[], | |||||
openNy:new Date(), | |||||
type:'', | |||||
openFile:[], | |||||
openFileList:[], | |||||
queryParams:{ | |||||
bookId:'', | |||||
deptId:'' | |||||
} | |||||
}; | |||||
}, | |||||
created() { | |||||
this.houseGetDicts("asset_status").then((response) => { | |||||
this.assetStatusOptions = response.data; | |||||
}); | |||||
this.houseGetDicts("asset_type").then((response) => { | |||||
this.assetTypeOptions = response.data; | |||||
}); | |||||
this.houseGetDicts("use_type").then((response) => { | |||||
this.useTypeOptions = response.data; | |||||
}); | |||||
this.type = this.$route.query.type; | |||||
this.queryParams.bookId = Cookies.get('bookId'); | |||||
this.queryParams.deptId = Cookies.get('deptId'); | |||||
this.queryParams.id = this.$route.query.id; | |||||
this.getDetail(); | |||||
}, | |||||
methods: { | |||||
getDetail(id){ | |||||
majorEventPublicDetail(this.queryParams).then((res) => { | |||||
res.data.openFile = res.data.openFile.split(',') | |||||
res.data.openPic = res.data.openPic.split(',') | |||||
res.data.openFile.map(rr=>{ | |||||
let name = rr.substr(27,rr.length); | |||||
let type = ''; | |||||
if (name.indexOf('.doc') > -1){ | |||||
type = 'word'; | |||||
}else if(name.indexOf('.xls') > -1){ | |||||
type = 'excel'; | |||||
} | |||||
this.openFileList.push({name:name,type:type}) | |||||
}) | |||||
res.data.openPic.map((rrr,i)=>{ | |||||
this.openPic.push({url:this.$store.getters.baseRoutingUrl+rrr}) | |||||
}) | |||||
this.form = res.data; | |||||
}) | |||||
}, | |||||
}, | |||||
} | |||||
</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; | |||||
} | |||||
} | |||||
.release_head{ | |||||
height: 90px; | |||||
padding:0 23px; | |||||
display: flex; | |||||
align-items: center; | |||||
font-size: 26px; | |||||
color: #929292; | |||||
.people{ | |||||
flex: 1; | |||||
display: flex; | |||||
align-items: center; | |||||
.icon{ | |||||
width: 24px; | |||||
height: 21px; | |||||
background: url('../../assets/images/sunVillage_info/details_icon_1.png') no-repeat; | |||||
background-size: 100% 100%; | |||||
display: block; | |||||
margin-right: 8px; | |||||
} | |||||
} | |||||
.time{ | |||||
flex: 1; | |||||
display: flex; | |||||
align-items: center; | |||||
justify-content:flex-end; | |||||
.icon{ | |||||
width: 25px; | |||||
height: 25px; | |||||
background: url('../../assets/images/sunVillage_info/details_icon_2.png') no-repeat; | |||||
background-size: 100% 100%; | |||||
display: block; | |||||
margin-right: 8px; | |||||
} | |||||
} | |||||
} | |||||
.release_conetnt{ | |||||
padding:0 22px; | |||||
font-size: 32px; | |||||
color: #252525; | |||||
line-height: 44px; | |||||
img{ | |||||
max-width: 100%; | |||||
margin-bottom: 16px; | |||||
} | |||||
p{ | |||||
margin-bottom: 16px; | |||||
} | |||||
} | |||||
.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: auto; | |||||
display: flex; | |||||
align-items: center; | |||||
} | |||||
/deep/ .van-cell--required::before{ | |||||
left: 85PX; | |||||
} | |||||
} | |||||
</style> |
@@ -0,0 +1,342 @@ | |||||
<template> | |||||
<div class="home_wrapper"> | |||||
<div class="header_main"> | |||||
新增财务公开 | |||||
<div class="return_btn" @click="onClickLeft"></div> | |||||
<div class="add_btn"></div> | |||||
</div> | |||||
<van-form @submit="onSubmit"> | |||||
<div class="list_main"> | |||||
<van-field | |||||
readonly | |||||
clickable | |||||
placeholder="请选择" | |||||
v-model="form.openNy" | |||||
@click="showBuildTime = true" | |||||
input-align="right" | |||||
right-icon="arrow-down" | |||||
label-width="auto" | |||||
required | |||||
:border="false" | |||||
:rules="[{ required: true , message:'请选择购建时间' }]" | |||||
> | |||||
<template #label> | |||||
<img src="../../assets/images/sunVillage_info/add_tit_icon_01.png" width="18"> | |||||
<p style="margin-left: 5px;">公开年月</p> | |||||
</template> | |||||
</van-field> | |||||
<van-popup v-model="showBuildTime" position="bottom"> | |||||
<van-datetime-picker | |||||
v-model="openNy" | |||||
type="year-month" | |||||
title="选择年月日" | |||||
@confirm="onConfirmOpenNy" | |||||
@cancel="showBuildTime = false" | |||||
/> | |||||
</van-popup> | |||||
<van-field required v-model="form.openName" placeholder="请输入名称" :rules="[{ required: true , message:'请输入名称' }]" input-align="right" :border="false" > | |||||
<template #label> | |||||
<img src="../../assets/images/sunVillage_info/add_tit_icon_02.png" width="18"> | |||||
<p style="margin-left: 5px;">公开名称</p> | |||||
</template> | |||||
</van-field> | |||||
<van-field required readonly input-align="right" :border="false" > | |||||
<template #label> | |||||
<img src="../../assets/images/sunVillage_info/add_tit_icon_03.png" width="18"> | |||||
<p style="margin-left: 5px;">公开图片</p> | |||||
</template> | |||||
</van-field> | |||||
<!-- @delete="deleteFile1"--> | |||||
<van-uploader v-model="openPic" :after-read="afterRead" @delete="deleteFile1" style="margin-top: 10PX" /> | |||||
<div style="border-top: 1px solid #ededed;margin-top: 10PX;"> | |||||
<van-field readonly input-align="right" :border="false" > | |||||
<template #label> | |||||
<img src="../../assets/images/sunVillage_info/add_tit_icon_04.png" width="18"> | |||||
<p style="margin-left: 5px;">附件</p> | |||||
</template> | |||||
</van-field> | |||||
<div> | |||||
<div v-for="(item,index) in openFile" :key="index" style="display: flex;align-items: center;margin-top: 10px;"> | |||||
<img src="../../assets/images/sunVillage_info/WORD.png" width="30" v-if="item.type == 'word'"/> | |||||
<img src="../../assets/images/sunVillage_info/ECEL.png" width="30" v-if="item.type == 'excel'" /> | |||||
<p style="margin-left: 10px;">{{item.name}}</p> | |||||
</div> | |||||
</div> | |||||
<van-uploader accept="*" :after-read="afterReadOpenFile" style="margin-top: 10PX"> | |||||
<img src="../../assets/images/sunVillage_info/addFile.png" width="120" /> | |||||
</van-uploader> | |||||
</div> | |||||
<van-field v-model="form.remark" placeholder="请输入备注" input-align="right" :border="false" > | |||||
<template #label> | |||||
<img src="../../assets/images/sunVillage_info/add_tit_icon_05.png" width="18"> | |||||
<p style="margin-left: 5px;">备注</p> | |||||
</template> | |||||
</van-field> | |||||
<van-field v-model="form.content" type="textarea" autosize placeholder="请输入内容" input-align="right" :border="false" > | |||||
<template #label> | |||||
<img src="../../assets/images/sunVillage_info/add_tit_icon_05.png" width="18"> | |||||
<p style="margin-left: 5px;">内容</p> | |||||
</template> | |||||
</van-field> | |||||
</div> | |||||
<div style="margin: 16px;"> | |||||
<van-button round block type="primary" native-type="submit"> | |||||
保存 | |||||
</van-button> | |||||
</div> | |||||
</van-form> | |||||
</div> | |||||
</template> | |||||
<script> | |||||
import { commonUpload , majorEventOpenEdit , majorEventPublicDetail } from "@/api/sunVillage_info/fixedAssets"; | |||||
import Cookies from "js-cookie"; | |||||
import request from '@/utils/request' | |||||
export default { | |||||
name: "certificateList", | |||||
data() { | |||||
return { | |||||
showBuildTime:false, | |||||
form:{ | |||||
openNy:this.format(new Date(),'yyyy-MM'), | |||||
openPic:'', | |||||
openFile:'', | |||||
}, | |||||
openPic:[], | |||||
fileList:[], | |||||
fileList1:[], | |||||
openNy:new Date(), | |||||
type:'', | |||||
openFile:[], | |||||
openFileList:[], | |||||
openPicList:[], | |||||
queryParams:{ | |||||
bookId:'', | |||||
deptId:'' | |||||
}, | |||||
openPic2:[], | |||||
openFile2:[] | |||||
}; | |||||
}, | |||||
created() { | |||||
this.houseGetDicts("asset_status").then((response) => { | |||||
this.assetStatusOptions = response.data; | |||||
}); | |||||
this.houseGetDicts("asset_type").then((response) => { | |||||
this.assetTypeOptions = response.data; | |||||
}); | |||||
this.houseGetDicts("use_type").then((response) => { | |||||
this.useTypeOptions = response.data; | |||||
}); | |||||
this.type = this.$route.query.type; | |||||
this.queryParams.bookId = Cookies.get('bookId'); | |||||
this.queryParams.deptId = Cookies.get('deptId'); | |||||
this.queryParams.id = this.$route.query.id; | |||||
this.getDetail(); | |||||
}, | |||||
methods: { | |||||
getDetail(id){ | |||||
majorEventPublicDetail(this.queryParams).then((res) => { | |||||
var that = this ; | |||||
if (res.data.openFile!=''){ | |||||
this.openFile = res.data.openFile.split(',') | |||||
this.openFile2 = res.data.openFile.split(',') | |||||
this.openFile.map((rr,i)=>{ | |||||
let name = rr.substr(27,rr.length); | |||||
let type = ''; | |||||
if (name.indexOf('.doc') > -1){ | |||||
type = 'word'; | |||||
}else if(name.indexOf('.xls') > -1){ | |||||
type = 'excel'; | |||||
} | |||||
this.openFile[i] = {name:name,type:type} | |||||
}) | |||||
} | |||||
if (res.data.openPic!=''){ | |||||
this.openPic = res.data.openPic.split(',') | |||||
this.openPic2 = res.data.openPic.split(',') | |||||
this.openPic.map((rrr,i)=>{ | |||||
this.openPic[i] = {url:this.$store.getters.baseRoutingUrl+rrr} | |||||
}) | |||||
} | |||||
that.form = res.data; | |||||
}) | |||||
}, | |||||
onSubmit(){ | |||||
this.openFileList.map(res=>{ | |||||
let params1 = new FormData(); | |||||
params1.append("file", res); | |||||
commonUpload(params1).then((r1) => { | |||||
this.openFile2.push(r1.fileName); | |||||
}) | |||||
}) | |||||
this.openPicList.map(res=>{ | |||||
console.log(res) | |||||
let params1 = new FormData(); | |||||
params1.append("file", res); | |||||
commonUpload(params1).then((r1) => { | |||||
this.openPic2.push(r1.fileName); | |||||
}) | |||||
}) | |||||
var that = this; | |||||
setTimeout(function(){ | |||||
console.log(that.form.openFile) | |||||
console.log(that.form.openPic) | |||||
that.form.openFile = that.openFile2.join(',') | |||||
that.form.openPic = that.openPic2.join(',') | |||||
majorEventOpenEdit(that.form).then((r1) => { | |||||
if (r1.code == 200){ | |||||
that.$notify({ type: 'success', message: '修改成功' }); | |||||
setTimeout(function(){ | |||||
history.back(-1); | |||||
},2000) | |||||
} | |||||
}) | |||||
},2000); | |||||
}, | |||||
onConfirmOpenNy(data){ | |||||
this.form.openNy = this.format(data,'yyyy-MM'); | |||||
this.openNy = data; | |||||
this.showBuildTime = false; | |||||
}, | |||||
deleteFile1(file){ | |||||
console.log(file) | |||||
// this.form.openPic.splice(index,1); | |||||
}, | |||||
afterRead(file) { | |||||
// 此时可以自行将文件上传至服务器 | |||||
this.openPicList.push(file.file); | |||||
}, | |||||
afterReadOpenFile(file){ | |||||
console.log(file) | |||||
let name = file.file.name; | |||||
let type = ''; | |||||
if (name.indexOf('.doc') > -1){ | |||||
type = 'word'; | |||||
}else if(name.indexOf('.xls') > -1){ | |||||
type = 'excel'; | |||||
} | |||||
this.openFile.push({name:file.file.name,type:type}) | |||||
this.openFileList.push(file.file); | |||||
} | |||||
}, | |||||
} | |||||
</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; | |||||
} | |||||
} | |||||
.release_head{ | |||||
height: 90px; | |||||
padding:0 23px; | |||||
display: flex; | |||||
align-items: center; | |||||
font-size: 26px; | |||||
color: #929292; | |||||
.people{ | |||||
flex: 1; | |||||
display: flex; | |||||
align-items: center; | |||||
.icon{ | |||||
width: 24px; | |||||
height: 21px; | |||||
background: url('../../assets/images/sunVillage_info/details_icon_1.png') no-repeat; | |||||
background-size: 100% 100%; | |||||
display: block; | |||||
margin-right: 8px; | |||||
} | |||||
} | |||||
.time{ | |||||
flex: 1; | |||||
display: flex; | |||||
align-items: center; | |||||
justify-content:flex-end; | |||||
.icon{ | |||||
width: 25px; | |||||
height: 25px; | |||||
background: url('../../assets/images/sunVillage_info/details_icon_2.png') no-repeat; | |||||
background-size: 100% 100%; | |||||
display: block; | |||||
margin-right: 8px; | |||||
} | |||||
} | |||||
} | |||||
.release_conetnt{ | |||||
padding:0 22px; | |||||
font-size: 32px; | |||||
color: #252525; | |||||
line-height: 44px; | |||||
img{ | |||||
max-width: 100%; | |||||
margin-bottom: 16px; | |||||
} | |||||
p{ | |||||
margin-bottom: 16px; | |||||
} | |||||
} | |||||
.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: auto; | |||||
display: flex; | |||||
align-items: center; | |||||
} | |||||
/deep/ .van-cell--required::before{ | |||||
left: 85PX; | |||||
} | |||||
} | |||||
</style> |
@@ -25,8 +25,8 @@ | |||||
@load="getList" | @load="getList" | ||||
> | > | ||||
<!----1--> | <!----1--> | ||||
<div class="item" v-for="(item,index) in applicationList" :key="index" @click="goDetail(item.id)" > | |||||
<div class="info"> | |||||
<div class="item" v-for="(item,index) in applicationList" :key="index" > | |||||
<div class="info" @click="goDetail(item.id)"> | |||||
<div class="title"> | <div class="title"> | ||||
<i class="icon_box"></i> | <i class="icon_box"></i> | ||||
<p class="news_title">{{item.openName}}</p> | <p class="news_title">{{item.openName}}</p> | ||||
@@ -39,10 +39,10 @@ | |||||
</div> | </div> | ||||
<div class="operation"> | <div class="operation"> | ||||
<!-- delete 删除 edit编辑 view查看 --> | <!-- delete 删除 edit编辑 view查看 --> | ||||
<div class="opera_btn edit"> | |||||
<div class="opera_btn edit" @click="goEdit(item.id)"> | |||||
<i class="icon "></i> | <i class="icon "></i> | ||||
</div> | </div> | ||||
<div class="opera_btn delete"> | |||||
<div class="opera_btn delete" @click="goRemove(item.id)"> | |||||
<i class="icon"></i> | <i class="icon"></i> | ||||
</div> | </div> | ||||
<!-- <div class="opera_btn view"> | <!-- <div class="opera_btn view"> | ||||
@@ -59,7 +59,7 @@ | |||||
</template> | </template> | ||||
<script> | <script> | ||||
import { tempWorkerPublicList } from "@/api/sunVillage_info/fixedAssets"; | |||||
import { tempWorkerPublicList , tempWorkerOpenRemove } from "@/api/sunVillage_info/fixedAssets"; | |||||
import Cookies from "js-cookie"; | import Cookies from "js-cookie"; | ||||
import request from '@/utils/request' | import request from '@/utils/request' | ||||
export default { | export default { | ||||
@@ -167,11 +167,30 @@ | |||||
}); | }); | ||||
}, | }, | ||||
goAdd(){ | goAdd(){ | ||||
this.$router.push('/sunVillage_info/fixedAssetsAdd') | |||||
this.$router.push('/sunVillage_info/list_tourists_add') | |||||
}, | }, | ||||
goDetail(id){ | goDetail(id){ | ||||
this.$router.push({path:'/sunVillage_info/details',query: {id:id,type:'tourists'}}) | |||||
this.$router.push({path:'/sunVillage_info/list_tourists_detail',query: {id:id,type:'tourists'}}) | |||||
}, | }, | ||||
goEdit(id){ | |||||
this.$router.push({path:'/sunVillage_info/list_tourists_edit',query: {id:id,type:'finance'}}) | |||||
}, | |||||
goRemove(id){ | |||||
this.$dialog.alert({ | |||||
title: '提示', | |||||
message: '确认删除?', | |||||
}) | |||||
.then(() => { | |||||
tempWorkerOpenRemove(id).then(response => { | |||||
this.$notify({ type: 'success', message: '删除成功' }); | |||||
this.getList() | |||||
}); | |||||
}) | |||||
.catch(() => { | |||||
// on cancel | |||||
}); | |||||
} | |||||
}, | }, | ||||
} | } | ||||
</script> | </script> | ||||
@@ -0,0 +1,306 @@ | |||||
<template> | |||||
<div class="home_wrapper"> | |||||
<div class="header_main"> | |||||
新增零工公开 | |||||
<div class="return_btn" @click="onClickLeft"></div> | |||||
<div class="add_btn"></div> | |||||
</div> | |||||
<van-form @submit="onSubmit"> | |||||
<div class="list_main"> | |||||
<van-field | |||||
readonly | |||||
clickable | |||||
placeholder="请选择" | |||||
v-model="form.openNy" | |||||
@click="showBuildTime = true" | |||||
input-align="right" | |||||
right-icon="arrow-down" | |||||
label-width="auto" | |||||
required | |||||
:border="false" | |||||
:rules="[{ required: true , message:'请选择购建时间' }]" | |||||
> | |||||
<template #label> | |||||
<img src="../../assets/images/sunVillage_info/add_tit_icon_01.png" width="18"> | |||||
<p style="margin-left: 5px;">公开年月</p> | |||||
</template> | |||||
</van-field> | |||||
<van-popup v-model="showBuildTime" position="bottom"> | |||||
<van-datetime-picker | |||||
v-model="openNy" | |||||
type="year-month" | |||||
title="选择年月日" | |||||
@confirm="onConfirmOpenNy" | |||||
@cancel="showBuildTime = false" | |||||
/> | |||||
</van-popup> | |||||
<van-field required v-model="form.openName" placeholder="请输入名称" :rules="[{ required: true , message:'请输入名称' }]" input-align="right" :border="false" > | |||||
<template #label> | |||||
<img src="../../assets/images/sunVillage_info/add_tit_icon_02.png" width="18"> | |||||
<p style="margin-left: 5px;">公开名称</p> | |||||
</template> | |||||
</van-field> | |||||
<van-field required readonly input-align="right" :border="false" > | |||||
<template #label> | |||||
<img src="../../assets/images/sunVillage_info/add_tit_icon_03.png" width="18"> | |||||
<p style="margin-left: 5px;">公开图片</p> | |||||
</template> | |||||
</van-field> | |||||
<!-- @delete="deleteFile1"--> | |||||
<van-uploader v-model="fileList" :after-read="afterRead" @delete="deleteFile1" multiple style="margin-top: 10PX" /> | |||||
<div style="border-top: 1px solid #ededed;margin-top: 10PX;"> | |||||
<van-field readonly input-align="right" :border="false" > | |||||
<template #label> | |||||
<img src="../../assets/images/sunVillage_info/add_tit_icon_04.png" width="18"> | |||||
<p style="margin-left: 5px;">附件</p> | |||||
</template> | |||||
</van-field> | |||||
<div> | |||||
<div v-for="(item,index) in openFileList" :key="index" style="display: flex;align-items: center;margin-top: 10px;"> | |||||
<img src="../../assets/images/sunVillage_info/WORD.png" width="30" v-if="item.type == 'word'"/> | |||||
<img src="../../assets/images/sunVillage_info/ECEL.png" width="30" v-if="item.type == 'excel'" /> | |||||
<p style="margin-left: 10px;">{{item.name}}</p> | |||||
</div> | |||||
</div> | |||||
<van-uploader accept="*" :after-read="afterReadOpenFile" style="margin-top: 10PX"> | |||||
<img src="../../assets/images/sunVillage_info/addFile.png" width="120" /> | |||||
</van-uploader> | |||||
</div> | |||||
<van-field v-model="form.remark" placeholder="请输入备注" input-align="right" :border="false" > | |||||
<template #label> | |||||
<img src="../../assets/images/sunVillage_info/add_tit_icon_05.png" width="18"> | |||||
<p style="margin-left: 5px;">备注</p> | |||||
</template> | |||||
</van-field> | |||||
</div> | |||||
<div style="margin: 16px;"> | |||||
<van-button round block type="primary" native-type="submit"> | |||||
保存 | |||||
</van-button> | |||||
</div> | |||||
</van-form> | |||||
</div> | |||||
</template> | |||||
<script> | |||||
import { commonUpload , tempWorkerOpenAdd } from "@/api/sunVillage_info/fixedAssets"; | |||||
import Cookies from "js-cookie"; | |||||
import request from '@/utils/request' | |||||
export default { | |||||
name: "certificateList", | |||||
data() { | |||||
return { | |||||
showBuildTime:false, | |||||
form:{ | |||||
openNy:this.format(new Date(),'yyyy-MM'), | |||||
openPic:'', | |||||
openFile:'', | |||||
}, | |||||
openPic:[], | |||||
fileList:[], | |||||
fileList1:[], | |||||
openNy:new Date(), | |||||
type:'', | |||||
openFile:[], | |||||
openFileList:[], | |||||
queryParams:{ | |||||
bookId:'', | |||||
deptId:'' | |||||
}, | |||||
openFile2:[], | |||||
openPic2:[], | |||||
}; | |||||
}, | |||||
created() { | |||||
this.houseGetDicts("asset_status").then((response) => { | |||||
this.assetStatusOptions = response.data; | |||||
}); | |||||
this.houseGetDicts("asset_type").then((response) => { | |||||
this.assetTypeOptions = response.data; | |||||
}); | |||||
this.houseGetDicts("use_type").then((response) => { | |||||
this.useTypeOptions = response.data; | |||||
}); | |||||
this.type = this.$route.query.type; | |||||
this.queryParams.bookId = Cookies.get('bookId'); | |||||
this.queryParams.deptId = Cookies.get('deptId'); | |||||
}, | |||||
methods: { | |||||
onSubmit(){ | |||||
console.log(this.openFile) | |||||
console.log(this.openPic) | |||||
this.openFile.map(res=>{ | |||||
let params1 = new FormData(); | |||||
params1.append("file", res); | |||||
commonUpload(params1).then((r1) => { | |||||
this.openFile2.push(r1.fileName); | |||||
}) | |||||
}) | |||||
this.openPic.map(res=>{ | |||||
console.log(res) | |||||
let params1 = new FormData(); | |||||
params1.append("file", res); | |||||
commonUpload(params1).then((r1) => { | |||||
this.openPic2.push(r1.fileName); | |||||
}) | |||||
}) | |||||
var that = this; | |||||
setTimeout(function(){ | |||||
that.form.openFile = that.openFile2.join(',') | |||||
that.form.openPic = that.openPic2.join(',') | |||||
tempWorkerOpenAdd(that.form).then((r1) => { | |||||
if (r1.code == 200){ | |||||
that.$notify({ type: 'success', message: '新增成功' }); | |||||
setTimeout(function(){ | |||||
history.back(-1); | |||||
},2000) | |||||
} | |||||
}) | |||||
},2000); | |||||
}, | |||||
onConfirmOpenNy(data){ | |||||
this.form.openNy = this.format(data,'yyyy-MM'); | |||||
this.openNy = data; | |||||
this.showBuildTime = false; | |||||
}, | |||||
deleteFile1(file){ | |||||
console.log(file) | |||||
// this.form.openPic.splice(index,1); | |||||
}, | |||||
afterRead(file) { | |||||
// 此时可以自行将文件上传至服务器 | |||||
this.openPic.push(file.file); | |||||
}, | |||||
afterReadOpenFile(file){ | |||||
console.log(file) | |||||
let name = file.file.name; | |||||
let type = ''; | |||||
if (name.indexOf('.doc') > -1){ | |||||
type = 'word'; | |||||
}else if(name.indexOf('.xls') > -1){ | |||||
type = 'excel'; | |||||
} | |||||
this.openFileList.push({name:file.file.name,type:type}) | |||||
this.openFile.push(file.file); | |||||
} | |||||
}, | |||||
} | |||||
</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; | |||||
} | |||||
} | |||||
.release_head{ | |||||
height: 90px; | |||||
padding:0 23px; | |||||
display: flex; | |||||
align-items: center; | |||||
font-size: 26px; | |||||
color: #929292; | |||||
.people{ | |||||
flex: 1; | |||||
display: flex; | |||||
align-items: center; | |||||
.icon{ | |||||
width: 24px; | |||||
height: 21px; | |||||
background: url('../../assets/images/sunVillage_info/details_icon_1.png') no-repeat; | |||||
background-size: 100% 100%; | |||||
display: block; | |||||
margin-right: 8px; | |||||
} | |||||
} | |||||
.time{ | |||||
flex: 1; | |||||
display: flex; | |||||
align-items: center; | |||||
justify-content:flex-end; | |||||
.icon{ | |||||
width: 25px; | |||||
height: 25px; | |||||
background: url('../../assets/images/sunVillage_info/details_icon_2.png') no-repeat; | |||||
background-size: 100% 100%; | |||||
display: block; | |||||
margin-right: 8px; | |||||
} | |||||
} | |||||
} | |||||
.release_conetnt{ | |||||
padding:0 22px; | |||||
font-size: 32px; | |||||
color: #252525; | |||||
line-height: 44px; | |||||
img{ | |||||
max-width: 100%; | |||||
margin-bottom: 16px; | |||||
} | |||||
p{ | |||||
margin-bottom: 16px; | |||||
} | |||||
} | |||||
.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: auto; | |||||
display: flex; | |||||
align-items: center; | |||||
} | |||||
/deep/ .van-cell--required::before{ | |||||
left: 85PX; | |||||
} | |||||
} | |||||
</style> |
@@ -0,0 +1,251 @@ | |||||
<template> | |||||
<div class="home_wrapper"> | |||||
<div class="header_main"> | |||||
查看零工公开 | |||||
<div class="return_btn" @click="onClickLeft"></div> | |||||
<div class="add_btn"></div> | |||||
</div> | |||||
<div class="list_main"> | |||||
<van-field | |||||
readonly | |||||
clickable | |||||
placeholder="请选择" | |||||
v-model="form.openNy" | |||||
input-align="right" | |||||
right-icon="arrow-down" | |||||
label-width="auto" | |||||
required | |||||
:border="false" | |||||
:rules="[{ required: true , message:'请选择购建时间' }]" | |||||
> | |||||
<template #label> | |||||
<img src="../../assets/images/sunVillage_info/add_tit_icon_01.png" width="18"> | |||||
<p style="margin-left: 5px;">公开年月</p> | |||||
</template> | |||||
</van-field> | |||||
<van-field readonly required v-model="form.openName" placeholder="请输入名称" :rules="[{ required: true , message:'请输入名称' }]" input-align="right" :border="false" > | |||||
<template #label> | |||||
<img src="../../assets/images/sunVillage_info/add_tit_icon_02.png" width="18"> | |||||
<p style="margin-left: 5px;">公开名称</p> | |||||
</template> | |||||
</van-field> | |||||
<van-field required readonly input-align="right" :border="false" > | |||||
<template #label> | |||||
<img src="../../assets/images/sunVillage_info/add_tit_icon_03.png" width="18"> | |||||
<p style="margin-left: 5px;">公开图片</p> | |||||
</template> | |||||
</van-field> | |||||
<!-- @delete="deleteFile1"--> | |||||
<van-uploader v-model="openPic" :show-upload="false" :deletable="false" multiple style="margin-top: 10PX" /> | |||||
<div style="border-top: 1px solid #ededed;margin-top: 10PX;"> | |||||
<van-field readonly input-align="right" :border="false" > | |||||
<template #label> | |||||
<img src="../../assets/images/sunVillage_info/add_tit_icon_04.png" width="18"> | |||||
<p style="margin-left: 5px;">附件</p> | |||||
</template> | |||||
</van-field> | |||||
<div> | |||||
<div v-for="(item,index) in openFileList" :key="index" style="display: flex;align-items: center;margin-top: 10px;"> | |||||
<img src="../../assets/images/sunVillage_info/WORD.png" width="30" v-if="item.type == 'word'"/> | |||||
<img src="../../assets/images/sunVillage_info/ECEL.png" width="30" v-if="item.type == 'excel'" /> | |||||
<p style="margin-left: 10px;">{{item.name}}</p> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<van-field readonly v-model="form.remark" placeholder="请输入备注" input-align="right" :border="false" > | |||||
<template #label> | |||||
<img src="../../assets/images/sunVillage_info/add_tit_icon_05.png" width="18"> | |||||
<p style="margin-left: 5px;">备注</p> | |||||
</template> | |||||
</van-field> | |||||
</div> | |||||
</div> | |||||
</template> | |||||
<script> | |||||
import { tempWorkerPublicDetail , openAdd } from "@/api/sunVillage_info/fixedAssets"; | |||||
import Cookies from "js-cookie"; | |||||
import request from '@/utils/request' | |||||
export default { | |||||
name: "certificateList", | |||||
data() { | |||||
return { | |||||
showBuildTime:false, | |||||
form:{ | |||||
openNy:this.format(new Date(),'yyyy-MM'), | |||||
openPic:'', | |||||
openFile:'', | |||||
}, | |||||
openPic:[], | |||||
fileList:[], | |||||
fileList1:[], | |||||
openNy:new Date(), | |||||
type:'', | |||||
openFile:[], | |||||
openFileList:[], | |||||
queryParams:{ | |||||
bookId:'', | |||||
deptId:'' | |||||
} | |||||
}; | |||||
}, | |||||
created() { | |||||
this.houseGetDicts("asset_status").then((response) => { | |||||
this.assetStatusOptions = response.data; | |||||
}); | |||||
this.houseGetDicts("asset_type").then((response) => { | |||||
this.assetTypeOptions = response.data; | |||||
}); | |||||
this.houseGetDicts("use_type").then((response) => { | |||||
this.useTypeOptions = response.data; | |||||
}); | |||||
this.type = this.$route.query.type; | |||||
this.queryParams.bookId = Cookies.get('bookId'); | |||||
this.queryParams.deptId = Cookies.get('deptId'); | |||||
this.queryParams.id = this.$route.query.id; | |||||
this.getDetail(); | |||||
}, | |||||
methods: { | |||||
getDetail(id){ | |||||
tempWorkerPublicDetail(this.queryParams).then((res) => { | |||||
res.data.openFile = res.data.openFile.split(',') | |||||
res.data.openPic = res.data.openPic.split(',') | |||||
res.data.openFile.map(rr=>{ | |||||
let name = rr.substr(27,rr.length); | |||||
let type = ''; | |||||
if (name.indexOf('.doc') > -1){ | |||||
type = 'word'; | |||||
}else if(name.indexOf('.xls') > -1){ | |||||
type = 'excel'; | |||||
} | |||||
this.openFileList.push({name:name,type:type}) | |||||
}) | |||||
res.data.openPic.map((rrr,i)=>{ | |||||
this.openPic.push({url:this.$store.getters.baseRoutingUrl+rrr}) | |||||
}) | |||||
this.form = res.data; | |||||
}) | |||||
}, | |||||
}, | |||||
} | |||||
</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; | |||||
} | |||||
} | |||||
.release_head{ | |||||
height: 90px; | |||||
padding:0 23px; | |||||
display: flex; | |||||
align-items: center; | |||||
font-size: 26px; | |||||
color: #929292; | |||||
.people{ | |||||
flex: 1; | |||||
display: flex; | |||||
align-items: center; | |||||
.icon{ | |||||
width: 24px; | |||||
height: 21px; | |||||
background: url('../../assets/images/sunVillage_info/details_icon_1.png') no-repeat; | |||||
background-size: 100% 100%; | |||||
display: block; | |||||
margin-right: 8px; | |||||
} | |||||
} | |||||
.time{ | |||||
flex: 1; | |||||
display: flex; | |||||
align-items: center; | |||||
justify-content:flex-end; | |||||
.icon{ | |||||
width: 25px; | |||||
height: 25px; | |||||
background: url('../../assets/images/sunVillage_info/details_icon_2.png') no-repeat; | |||||
background-size: 100% 100%; | |||||
display: block; | |||||
margin-right: 8px; | |||||
} | |||||
} | |||||
} | |||||
.release_conetnt{ | |||||
padding:0 22px; | |||||
font-size: 32px; | |||||
color: #252525; | |||||
line-height: 44px; | |||||
img{ | |||||
max-width: 100%; | |||||
margin-bottom: 16px; | |||||
} | |||||
p{ | |||||
margin-bottom: 16px; | |||||
} | |||||
} | |||||
.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: auto; | |||||
display: flex; | |||||
align-items: center; | |||||
} | |||||
/deep/ .van-cell--required::before{ | |||||
left: 85PX; | |||||
} | |||||
} | |||||
</style> |
@@ -0,0 +1,336 @@ | |||||
<template> | |||||
<div class="home_wrapper"> | |||||
<div class="header_main"> | |||||
新增财务公开 | |||||
<div class="return_btn" @click="onClickLeft"></div> | |||||
<div class="add_btn"></div> | |||||
</div> | |||||
<van-form @submit="onSubmit"> | |||||
<div class="list_main"> | |||||
<van-field | |||||
readonly | |||||
clickable | |||||
placeholder="请选择" | |||||
v-model="form.openNy" | |||||
@click="showBuildTime = true" | |||||
input-align="right" | |||||
right-icon="arrow-down" | |||||
label-width="auto" | |||||
required | |||||
:border="false" | |||||
:rules="[{ required: true , message:'请选择购建时间' }]" | |||||
> | |||||
<template #label> | |||||
<img src="../../assets/images/sunVillage_info/add_tit_icon_01.png" width="18"> | |||||
<p style="margin-left: 5px;">公开年月</p> | |||||
</template> | |||||
</van-field> | |||||
<van-popup v-model="showBuildTime" position="bottom"> | |||||
<van-datetime-picker | |||||
v-model="openNy" | |||||
type="year-month" | |||||
title="选择年月日" | |||||
@confirm="onConfirmOpenNy" | |||||
@cancel="showBuildTime = false" | |||||
/> | |||||
</van-popup> | |||||
<van-field required v-model="form.openName" placeholder="请输入名称" :rules="[{ required: true , message:'请输入名称' }]" input-align="right" :border="false" > | |||||
<template #label> | |||||
<img src="../../assets/images/sunVillage_info/add_tit_icon_02.png" width="18"> | |||||
<p style="margin-left: 5px;">公开名称</p> | |||||
</template> | |||||
</van-field> | |||||
<van-field required readonly input-align="right" :border="false" > | |||||
<template #label> | |||||
<img src="../../assets/images/sunVillage_info/add_tit_icon_03.png" width="18"> | |||||
<p style="margin-left: 5px;">公开图片</p> | |||||
</template> | |||||
</van-field> | |||||
<!-- @delete="deleteFile1"--> | |||||
<van-uploader v-model="openPic" :after-read="afterRead" @delete="deleteFile1" style="margin-top: 10PX" /> | |||||
<div style="border-top: 1px solid #ededed;margin-top: 10PX;"> | |||||
<van-field readonly input-align="right" :border="false" > | |||||
<template #label> | |||||
<img src="../../assets/images/sunVillage_info/add_tit_icon_04.png" width="18"> | |||||
<p style="margin-left: 5px;">附件</p> | |||||
</template> | |||||
</van-field> | |||||
<div> | |||||
<div v-for="(item,index) in openFile" :key="index" style="display: flex;align-items: center;margin-top: 10px;"> | |||||
<img src="../../assets/images/sunVillage_info/WORD.png" width="30" v-if="item.type == 'word'"/> | |||||
<img src="../../assets/images/sunVillage_info/ECEL.png" width="30" v-if="item.type == 'excel'" /> | |||||
<p style="margin-left: 10px;">{{item.name}}</p> | |||||
</div> | |||||
</div> | |||||
<van-uploader accept="*" :after-read="afterReadOpenFile" style="margin-top: 10PX"> | |||||
<img src="../../assets/images/sunVillage_info/addFile.png" width="120" /> | |||||
</van-uploader> | |||||
</div> | |||||
<van-field v-model="form.remark" placeholder="请输入备注" input-align="right" :border="false" > | |||||
<template #label> | |||||
<img src="../../assets/images/sunVillage_info/add_tit_icon_05.png" width="18"> | |||||
<p style="margin-left: 5px;">备注</p> | |||||
</template> | |||||
</van-field> | |||||
</div> | |||||
<div style="margin: 16px;"> | |||||
<van-button round block type="primary" native-type="submit"> | |||||
保存 | |||||
</van-button> | |||||
</div> | |||||
</van-form> | |||||
</div> | |||||
</template> | |||||
<script> | |||||
import { commonUpload , tempWorkerOpenEdit , tempWorkerPublicDetail } from "@/api/sunVillage_info/fixedAssets"; | |||||
import Cookies from "js-cookie"; | |||||
import request from '@/utils/request' | |||||
export default { | |||||
name: "certificateList", | |||||
data() { | |||||
return { | |||||
showBuildTime:false, | |||||
form:{ | |||||
openNy:this.format(new Date(),'yyyy-MM'), | |||||
openPic:'', | |||||
openFile:'', | |||||
}, | |||||
openPic:[], | |||||
fileList:[], | |||||
fileList1:[], | |||||
openNy:new Date(), | |||||
type:'', | |||||
openFile:[], | |||||
openFileList:[], | |||||
openPicList:[], | |||||
queryParams:{ | |||||
bookId:'', | |||||
deptId:'' | |||||
}, | |||||
openPic2:[], | |||||
openFile2:[] | |||||
}; | |||||
}, | |||||
created() { | |||||
this.houseGetDicts("asset_status").then((response) => { | |||||
this.assetStatusOptions = response.data; | |||||
}); | |||||
this.houseGetDicts("asset_type").then((response) => { | |||||
this.assetTypeOptions = response.data; | |||||
}); | |||||
this.houseGetDicts("use_type").then((response) => { | |||||
this.useTypeOptions = response.data; | |||||
}); | |||||
this.type = this.$route.query.type; | |||||
this.queryParams.bookId = Cookies.get('bookId'); | |||||
this.queryParams.deptId = Cookies.get('deptId'); | |||||
this.queryParams.id = this.$route.query.id; | |||||
this.getDetail(); | |||||
}, | |||||
methods: { | |||||
getDetail(id){ | |||||
tempWorkerPublicDetail(this.queryParams).then((res) => { | |||||
var that = this ; | |||||
if (res.data.openFile!=''){ | |||||
this.openFile = res.data.openFile.split(',') | |||||
this.openFile2 = res.data.openFile.split(',') | |||||
this.openFile.map((rr,i)=>{ | |||||
let name = rr.substr(27,rr.length); | |||||
let type = ''; | |||||
if (name.indexOf('.doc') > -1){ | |||||
type = 'word'; | |||||
}else if(name.indexOf('.xls') > -1){ | |||||
type = 'excel'; | |||||
} | |||||
this.openFile[i] = {name:name,type:type} | |||||
}) | |||||
} | |||||
if (res.data.openPic!=''){ | |||||
this.openPic = res.data.openPic.split(',') | |||||
this.openPic2 = res.data.openPic.split(',') | |||||
this.openPic.map((rrr,i)=>{ | |||||
this.openPic[i] = {url:this.$store.getters.baseRoutingUrl+rrr} | |||||
}) | |||||
} | |||||
that.form = res.data; | |||||
}) | |||||
}, | |||||
onSubmit(){ | |||||
this.openFileList.map(res=>{ | |||||
let params1 = new FormData(); | |||||
params1.append("file", res); | |||||
commonUpload(params1).then((r1) => { | |||||
this.openFile2.push(r1.fileName); | |||||
}) | |||||
}) | |||||
this.openPicList.map(res=>{ | |||||
console.log(res) | |||||
let params1 = new FormData(); | |||||
params1.append("file", res); | |||||
commonUpload(params1).then((r1) => { | |||||
this.openPic2.push(r1.fileName); | |||||
}) | |||||
}) | |||||
var that = this; | |||||
setTimeout(function(){ | |||||
console.log(that.form.openFile) | |||||
console.log(that.form.openPic) | |||||
that.form.openFile = that.openFile2.join(',') | |||||
that.form.openPic = that.openPic2.join(',') | |||||
tempWorkerOpenEdit(that.form).then((r1) => { | |||||
if (r1.code == 200){ | |||||
that.$notify({ type: 'success', message: '修改成功' }); | |||||
setTimeout(function(){ | |||||
history.back(-1); | |||||
},2000) | |||||
} | |||||
}) | |||||
},2000); | |||||
}, | |||||
onConfirmOpenNy(data){ | |||||
this.form.openNy = this.format(data,'yyyy-MM'); | |||||
this.openNy = data; | |||||
this.showBuildTime = false; | |||||
}, | |||||
deleteFile1(file){ | |||||
console.log(file) | |||||
// this.form.openPic.splice(index,1); | |||||
}, | |||||
afterRead(file) { | |||||
// 此时可以自行将文件上传至服务器 | |||||
this.openPicList.push(file.file); | |||||
}, | |||||
afterReadOpenFile(file){ | |||||
console.log(file) | |||||
let name = file.file.name; | |||||
let type = ''; | |||||
if (name.indexOf('.doc') > -1){ | |||||
type = 'word'; | |||||
}else if(name.indexOf('.xls') > -1){ | |||||
type = 'excel'; | |||||
} | |||||
this.openFile.push({name:file.file.name,type:type}) | |||||
this.openFileList.push(file.file); | |||||
} | |||||
}, | |||||
} | |||||
</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; | |||||
} | |||||
} | |||||
.release_head{ | |||||
height: 90px; | |||||
padding:0 23px; | |||||
display: flex; | |||||
align-items: center; | |||||
font-size: 26px; | |||||
color: #929292; | |||||
.people{ | |||||
flex: 1; | |||||
display: flex; | |||||
align-items: center; | |||||
.icon{ | |||||
width: 24px; | |||||
height: 21px; | |||||
background: url('../../assets/images/sunVillage_info/details_icon_1.png') no-repeat; | |||||
background-size: 100% 100%; | |||||
display: block; | |||||
margin-right: 8px; | |||||
} | |||||
} | |||||
.time{ | |||||
flex: 1; | |||||
display: flex; | |||||
align-items: center; | |||||
justify-content:flex-end; | |||||
.icon{ | |||||
width: 25px; | |||||
height: 25px; | |||||
background: url('../../assets/images/sunVillage_info/details_icon_2.png') no-repeat; | |||||
background-size: 100% 100%; | |||||
display: block; | |||||
margin-right: 8px; | |||||
} | |||||
} | |||||
} | |||||
.release_conetnt{ | |||||
padding:0 22px; | |||||
font-size: 32px; | |||||
color: #252525; | |||||
line-height: 44px; | |||||
img{ | |||||
max-width: 100%; | |||||
margin-bottom: 16px; | |||||
} | |||||
p{ | |||||
margin-bottom: 16px; | |||||
} | |||||
} | |||||
.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: auto; | |||||
display: flex; | |||||
align-items: center; | |||||
} | |||||
/deep/ .van-cell--required::before{ | |||||
left: 85PX; | |||||
} | |||||
} | |||||
</style> |