newMarkerfundDetails.vue 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552
  1. <template>
  2. <!-- 创客资金申请表单 -->
  3. <div>
  4. <div class="vfpHeader">
  5. <div class="titleOne">创客资金申请</div>
  6. <el-button type="primary" @click="$router.back()">返回</el-button>
  7. </div>
  8. <hr>
  9. <!-- 项目名称、类型开始 -->
  10. <div class="Apply1">
  11. <div class="inpInterval">项目名称</div>
  12. <el-select v-model="selects.projectName" style="width: 30%;" placeholder="请选择">
  13. <el-option
  14. v-for="item in projectFilter"
  15. :key="item.id"
  16. :label="item.title"
  17. :value="item.id">
  18. </el-option>
  19. </el-select>
  20. </div>
  21. <div class="Apply1">
  22. <div class="inpInterval">项目类型</div>
  23. <el-select v-model="selects.projectType" placeholder="请选择">
  24. <el-option
  25. v-for="item in projectType"
  26. :key="item.id"
  27. :label="item.name"
  28. :value="item.name">
  29. </el-option>
  30. </el-select>
  31. </div>
  32. <!-- 项目名称、类型结束 -->
  33. <div class="tabTit">
  34. <div>
  35. <p>经费支出类别(单位:元)</p>
  36. </div>
  37. </div>
  38. <hr>
  39. <table border="1" cellspacing="0" class="table">
  40. <tr>
  41. <td colspan="2">经济支出类别</td><td>预算</td><td>已支付</td><td>本次申请</td><td>实际使用</td><td>余额</td><td colspan="3">备注</td>
  42. </tr>
  43. <tr v-for="(item,index) in fundList" :key="index">
  44. <td colspan="2">{{ item.fundName }}</td>
  45. <td>
  46. {{item.budget}}
  47. </td>
  48. <td>
  49. {{item.havePaid}}
  50. </td>
  51. <td>
  52. <el-input
  53. type="number"
  54. autosize
  55. style="width: 100%;"
  56. resize="none"
  57. onkeypress="return (/[\d]/.test(String.fromCharCode(event.keyCode)))"
  58. placeholder="本次申请"
  59. v-model="item.thisApply">
  60. </el-input>
  61. </td>
  62. <td>
  63. </td>
  64. <td>
  65. {{ item.budget-item.havePaid-item.thisApply }}
  66. </td>
  67. <td colspan="3" style="box-sizing: border-box;padding: 0 10px;">
  68. {{ item.remark }}
  69. </td>
  70. </tr>
  71. <tr>
  72. <td>事由</td>
  73. <td colspan="10" class="textLeft">
  74. <el-input
  75. type="textarea"
  76. :autosize="{ minRows: 6, maxRows: 20}"
  77. style="width: 100%;"
  78. resize="none"
  79. placeholder=""
  80. v-model="intro">
  81. </el-input>
  82. </td>
  83. </tr>
  84. <tr>
  85. <td v-for="(i,k) in 10" :key="k" style="border: none;"></td>
  86. </tr>
  87. </table>
  88. <!-- 经费支出类别开始 -->
  89. <!-- <div v-for="(item,index) in fundList" :key="index" class="fundType">
  90. <div style="font-size: 18px;font-weight: bold;margin-bottom: 10px;">{{ item.fundName }}:</div>
  91. <div style="width: 100%; display: flex;flex-wrap: wrap;justify-content: space-between;">
  92. <div class="fundInp">
  93. <div class="inpInterval">预算</div> <el-input type="number" disabled v-model="item.budget" placeholder="金额"></el-input>
  94. </div>
  95. <div class="fundInp">
  96. <div class="inpInterval">已支付</div> <el-input type="number" disabled v-model="item.havePaid" placeholder="金额"></el-input>
  97. </div>
  98. <div class="fundInp">
  99. <div class="inpInterval">本次申请</div> <el-input type="number" v-model="item.thisApply" placeholder="金额"></el-input>
  100. </div>
  101. <div class="fundInp">
  102. <div class="inpInterval">余额</div> <el-input type="number" disabled v-model="textarea" placeholder="金额"></el-input>
  103. </div>
  104. </div>
  105. <div class="fundInp">
  106. <div class="inpInterval" style="position: relative;top: -10px;">备注</div>
  107. <el-input
  108. type="textarea"
  109. :rows="3"
  110. resize="none"
  111. placeholder="请输入内容"
  112. v-model="item.remark">
  113. </el-input>
  114. </div>
  115. </div> -->
  116. <!-- 经费支出类别结束-->
  117. <!-- 附件上传开始 -->
  118. <div> <!-- 附件上传 -->
  119. <div class="tabTit">
  120. <div><p>附件上传</p></div>
  121. </div>
  122. <hr>
  123. <el-progress v-show="progress.show" :percentage="progress.value" :format="ProgressFormat"></el-progress>
  124. <div style="display: flex;flex-wrap: wrap;width: 100%;margin-bottom: 45px;">
  125. <el-upload
  126. action="#"
  127. list-type="picture-card"
  128. style="position: relative;margin-left: 10px;"
  129. disabled
  130. :on-remove="handleRemove">
  131. <BeUpload @getFile="getFile" :progress="progress" style="position: absolute;left: 0;width: 147px;height: 100%;opacity: 0;" class="uploadPic" :navName="'上传封面'" :accept="accept"></BeUpload>
  132. <i class="el-icon-plus"></i>
  133. </el-upload>
  134. <el-upload
  135. action="#"
  136. list-type="picture-card"
  137. class="delUpload"
  138. style="position: relative;"
  139. v-show="file[0]"
  140. disabled
  141. v-for="(item,index) in this.file" :key="index"
  142. >
  143. <img style="position: absolute;left: -1px;top:-1px;width: 149px;height: 101%;border-radius: 5px;" :src="dialogImageUrl" alt="">
  144. <div class="maskLayer">
  145. <i @click="delUploadBtn(index)" class="maskLayerI el-icon-close"></i>
  146. </div>
  147. <div style="position: absolute;left: -20%;bottom: -30px;width: 200px;height: 30px;color: #000;line-height: 30px;display: flex;justify-content: center;">{{ item.fileName }}</div>
  148. </el-upload>
  149. </div>
  150. </div>
  151. <!-- 附件上传结束 -->
  152. <div class="baseBtn">
  153. <div class="blockWidth">
  154. <el-button type="primary" @click="createFrom">生成表单</el-button>
  155. <el-button type="primary" @click="uploadData">提交</el-button>
  156. </div>
  157. </div>
  158. </div>
  159. </template>
  160. <script>
  161. import BeUpload from "../../components/tool/beUpload.vue";
  162. import getExcel from "@/components/tool/getExcel";
  163. export default {
  164. components: {
  165. BeUpload,
  166. },
  167. data() {
  168. return {
  169. fundList:[
  170. {fundName:'小型仪器设备费',budget:30,havePaid:10,thisApply:10,remark:'项目开展所需的小型专用仪器设备、工具、配件购置或租赁费用。'},
  171. {fundName:'材料费',budget:100,havePaid:10,thisApply:'',remark:'项目开展需消耗的各种原材料、辅助材料等低值易耗品的采购费用。'},
  172. {fundName:'测试化验加工费',budget:100,havePaid:10,thisApply:'',remark:'项目开展过程中支付给外单位的检验、测试、化验、计算、分析及加工费等费用。'},
  173. {fundName:'项目协作费',budget:100,havePaid:10,thisApply:'',remark:'按合同规定支付给协作单位的费用'},
  174. {fundName:'项目成功鉴定费',budget:100,havePaid:10,thisApply:'',remark:'学术会务费、评审费、鉴定费、成果集制作费等费用。'},
  175. {fundName:'参展参赛费',budget:100,havePaid:10,thisApply:'',remark:'参加创客展会、竞赛等所需的报名费、展位费、布展费、宣传推广费及差旅费等费用。'},
  176. {fundName:'创客交流活动费',budget:100,havePaid:10,thisApply:'',remark:'创客交流活动中支付给校外专家的指导费、咨询费、授课费等费用。'},
  177. {fundName:'知识产权事务费',budget:100,havePaid:10,thisApply:'',remark:'论文版面费、专利及其他知识产权事务等费用。'},
  178. ],
  179. intro:'诶嘿嘿', //事由
  180. accept:"*",
  181. submitHint:false, //提交按钮
  182. createFromDialog:false, //生成表单
  183. dialogImageUrl:require('../../assets/img/zzpic426.jpg'),
  184. disabled: false,
  185. file:[],
  186. textarea:'',
  187. selects:{ //所选名称,类型id
  188. projectName:'',
  189. projectType:''
  190. },
  191. progress:{ //进度条
  192. value:0,
  193. show:false
  194. },
  195. projectFilter:[], //项目名称
  196. projectType:[ //项目类型
  197. {
  198. id:1,
  199. name:'创客活动'
  200. },
  201. {
  202. id:2,
  203. name:'个人创客'
  204. },
  205. ],
  206. }
  207. },
  208. methods:{
  209. delABC(event){
  210. return (/[\d]/.test(String.fromCharCode(event.keyCode)))
  211. },
  212. AllEquipment(){ //填写表单数据
  213. this.directFundBlock.forEach((e,i)=>{
  214. switch(e.directFundData)
  215. {
  216. case 1:
  217. this.directData.facility+=e.budget*1;
  218. this.usedDirectData.facility+=e.usedFund*1;
  219. this.directDataReason.reason=e.reason;
  220. this.applicationDirectData.facility = e.apply*1
  221. break;
  222. case 2:
  223. this.directData.cl+=e.budget*1;
  224. this.usedDirectData.cl+=e.usedFund*1;
  225. this.directDataReason.reason1=e.reason;
  226. this.applicationDirectData.cl = e.apply*1
  227. break;
  228. case 3:
  229. this.directData.jg=e.budget*1;
  230. this.usedDirectData.jg+=e.usedFund*1;
  231. this.directDataReason.reason2=e.reason;
  232. this.applicationDirectData.jg = e.apply*1
  233. break;
  234. case 4:
  235. this.directData.xz=e.budget*1;
  236. this.usedDirectData.xz+=e.usedFund*1;
  237. this.directDataReason.reason3=e.reason;
  238. this.applicationDirectData.xz = e.apply*1
  239. break;
  240. case 5:
  241. this.directData.qt=e.budget*1;
  242. this.usedDirectData.qt+=e.usedFund*1;
  243. this.directDataReason.reason4=e.reason;
  244. this.applicationDirectData.qt = e.apply*1
  245. break;
  246. }
  247. })
  248. this.indirectFundBlock.forEach((e,i)=>{
  249. switch(e.indirectFundData)
  250. {
  251. case 1:
  252. this.indirectData.facility+=e.budget*1;
  253. this.usedInDirectData.facility+=e.usedFund*1;
  254. this.indirectDataReason.reason=e.reason;
  255. this.applicationInDirectData.facility = e.apply*1;
  256. // console.log(this.directData.facility);
  257. break;
  258. case 2:
  259. this.indirectData.cl+=e.budget*1;
  260. this.usedInDirectData.cl+=e.usedFund*1;
  261. this.indirectDataReason.reason1=e.reason;
  262. this.applicationInDirectData.cl = e.apply*1;
  263. // console.log(this.directData.cl);
  264. break;
  265. case 3:
  266. this.indirectData.jg=e.budget*1;
  267. this.usedInDirectData.jg+=e.usedFund*1;
  268. this.indirectDataReason.reason2=e.reason;
  269. this.applicationInDirectData.jg = e.apply*1;
  270. break;
  271. case 4:
  272. this.indirectData.xz=e.budget*1;
  273. this.usedInDirectData.xz+=e.usedFund*1;
  274. this.indirectDataReason.reason3=e.reason;
  275. this.applicationInDirectData.xz = e.apply*1;
  276. break;
  277. case 5:
  278. this.indirectData.qt=e.budget*1;
  279. this.usedInDirectData.qt+=e.usedFund*1;
  280. this.indirectDataReason.reason4=e.reason;
  281. this.applicationInDirectData.qt = e.apply*1;
  282. break;
  283. }
  284. })
  285. // this.DirectFunding.budget = this.
  286. //直接费用全部预算
  287. for(let i in this.directData)this.IndirectFunding['budget']+=this.directData[i];
  288. //直接费用全部已支出
  289. for(let a in this.usedDirectData)this.IndirectFunding['expended']+=this.usedDirectData[a];
  290. //直接费用本次申请
  291. for(let b in this.applicationDirectData)this.IndirectFunding['application']+=this.applicationDirectData[b]
  292. //直接费用余额
  293. this.IndirectFunding['surplus'] = this.IndirectFunding['budget']-this.IndirectFunding['expended']-this.IndirectFunding['application']
  294. //间接费用
  295. //间接费用全部预算
  296. for(let c in this.indirectData)this.Expenditure['budget']+=this.indirectData[c];
  297. //间接费用全部已支出
  298. for(let d in this.usedInDirectData)this.Expenditure['expended']+=this.usedInDirectData[d];
  299. //间接费用本次申请
  300. for(let e in this.applicationInDirectData)this.Expenditure['application']+=this.applicationInDirectData[e];
  301. //间接费用余额
  302. this.Expenditure['surplus'] = this.Expenditure['budget']-this.Expenditure['expended']-this.Expenditure['application']
  303. //经费支出
  304. //预算
  305. this.AllFund.budget =this.Expenditure['budget']+this.IndirectFunding['budget'];
  306. //已支出
  307. this.AllFund.expended = this.Expenditure['expended']+this.IndirectFunding['expended'];
  308. //本次申请
  309. this.AllFund.application = this.Expenditure['application']+this.IndirectFunding['application']
  310. //余额
  311. this.AllFund.surplus = this.AllFund['budget']-this.AllFund['expended']-this.AllFund['application'];
  312. //项目名称
  313. this.residue.PName = this.projectFilter.filter(item=>item.id==this.selects.projectName).length!=0?this.projectFilter.filter(item=>item.id==this.selects.projectName)[0]['title']:'';
  314. },
  315. createFrom(){ // 显示表单对话框
  316. },
  317. submitCreateFrom(){ //生成表单
  318. },
  319. ProgressFormat(value){ //进度条
  320. return value ==100?'100%':`${value}%`
  321. },
  322. delUploadBtn(index){ //删除上传文件
  323. console.log(index);
  324. this.file.splice(index,1)
  325. this.$message.success('删除成功')
  326. },
  327. handleRemove(index) {
  328. console.log(index);
  329. },
  330. uploadData(){
  331. this.submitHint=true;
  332. },
  333. submitAll(){ //提交创客资金申请
  334. },
  335. getFile(val) { //上传文件
  336. this.file.push(val)
  337. this.progress.show = false;
  338. // this.imageUrl=require("../../assets/img/jj.jpg")
  339. },
  340. getData(){ //获取活动经费的项目名称
  341. let param={
  342. uid:this.$store.state.userInfo.userid,
  343. fid:''
  344. }
  345. this.ajax
  346. .get(this.$store.state.api+'/SelectMakerFundSelects',param)
  347. .then(res=>{
  348. this.projectFilter=res.data[1]
  349. console.log(this.projectFilter);
  350. },err=>{
  351. console.log(err);
  352. })
  353. },
  354. init(){
  355. //重置
  356. this.submitHint=false;
  357. this.createFromDialog=false;
  358. },
  359. },
  360. mounted(){
  361. this.getData()
  362. }
  363. }
  364. </script>
  365. <style lang="less" scoped>
  366. .inpInterval{ //label
  367. min-width: 80px;
  368. display: inline-block;
  369. text-align: justify;
  370. text-justify:distribute-all-lines;
  371. text-align-last: justify;
  372. transform: translate(0,22%);
  373. padding-right: 15px;
  374. font-size: 16px;
  375. }
  376. .Apply1{ //顶部两个下拉框
  377. height: 45px;
  378. width: 100%;
  379. display: flex;
  380. justify-content: flex-start;
  381. margin-top: 20px;
  382. .inpName{
  383. height: 40px;
  384. outline:none ;
  385. width: 600px;
  386. border: #ccc 1px solid;
  387. border-radius: 5px;
  388. box-sizing: border-box;
  389. padding: 1px 15px;
  390. }
  391. }
  392. .fundType{
  393. width: 80%;
  394. margin-top: 30px;
  395. :deep(.el-input__inner){
  396. width: 200px;
  397. &::-webkit-outer-spin-button,
  398. &::-webkit-inner-spin-button {
  399. -webkit-appearance: none;
  400. }
  401. &[type="number"]{
  402. -moz-appearance: textfield;
  403. }
  404. }
  405. :deep(.el-textarea__inner){
  406. width: 80%;
  407. }
  408. .fundInp{
  409. display: flex;
  410. margin-bottom: 10px;
  411. }
  412. }
  413. .table{
  414. border: none;
  415. border-top: solid 1px black;
  416. // border-right: solid 1px black;
  417. width: 80%;
  418. margin: auto;
  419. margin-top: 30px;
  420. .textLeft{
  421. :deep(.el-textarea__inner){
  422. border: none ;
  423. border-radius: 0px;
  424. text-align: left !important;
  425. font-size: 16px;
  426. }
  427. }
  428. tr td{
  429. border: none;
  430. border-bottom: solid 1px black;
  431. border-right: solid 1px black;
  432. height: 50px;
  433. text-align: center;
  434. line-height: 30px;
  435. width: 9%;
  436. &:nth-child(1){
  437. border-left: solid 1px black;
  438. }
  439. p{
  440. font-weight: 600;
  441. }
  442. :deep(.el-select .el-input .el-select__caret){
  443. display: none;
  444. }
  445. :deep(.el-textarea__inner){
  446. // padding: 0;
  447. border: none ;
  448. border-radius: 0px;
  449. text-align: center;
  450. font-size: 16px;
  451. }
  452. :deep(.el-input__inner){
  453. border: none ;
  454. border-radius: 0px;
  455. text-align: center;
  456. font-size: 16px;
  457. //去除input number样式
  458. &::-webkit-outer-spin-button,
  459. &::-webkit-inner-spin-button {
  460. -webkit-appearance: none;
  461. }
  462. &[type="number"]{
  463. -moz-appearance: textfield;
  464. }
  465. }
  466. }
  467. }
  468. .textLeft{
  469. :deep(.el-textarea__inner){
  470. border: none ;
  471. border-radius: 0px;
  472. text-align: left !important;
  473. font-size: 16px;
  474. }
  475. }
  476. .delUpload{ //文件上传
  477. width: 147px;
  478. margin-left: 60px;
  479. margin-bottom: 62px;
  480. &:hover .maskLayer{
  481. display: block;
  482. }
  483. .maskLayer{
  484. background: #000;position: absolute;left: 0;top: 0;opacity: .4; width: 100%;height: 100%;border-radius: 5px;
  485. display: none;
  486. }
  487. .maskLayerI:hover{
  488. color: #fff;
  489. }
  490. :deep(.avatar-uploader .el-upload) { //文件上传
  491. border: 1px dashed #d9d9d9;
  492. border-radius: 6px;
  493. cursor: pointer;
  494. position: relative;
  495. overflow: hidden;
  496. }
  497. :deep(.avatar-uploader-icon) {
  498. font-size: 28px;
  499. color: #8c939d;
  500. width: 178px;
  501. height: 178px;
  502. line-height: 178px;
  503. text-align: center;
  504. }
  505. :deep(.avatar) {
  506. width: 178px;
  507. height: 178px;
  508. display: block;
  509. }
  510. }
  511. </style>