markerFundWord.vue 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659
  1. <template>
  2. <div id="MakerSpaceWord">
  3. <div id="title">
  4. <div class="school">深圳技师学院</div>
  5. <div class="wordTitle">创客专项资金及项目申请表(个人创客)</div>
  6. <div class="date">申请日期:{{wordData.applicationDate}}</div>
  7. </div>
  8. <table border="1" cellspacing="0" class="table">
  9. <tr>
  10. <td colspan="4">项目名称</td><td colspan="13">
  11. <el-input
  12. type="textarea"
  13. autosize
  14. resize="none"
  15. placeholder="请输入项目名称"
  16. v-model="wordData['projectName']">
  17. </el-input>
  18. </td>
  19. </tr>
  20. <tr>
  21. <td colspan="4">项目负责人</td><td colspan="3">
  22. <el-input
  23. type="textarea"
  24. autosize
  25. resize="none"
  26. placeholder="请输入负责人"
  27. v-model="wordData['pro_leader']">
  28. </el-input>
  29. </td><td colspan="2">所在部门</td><td colspan="3">
  30. <el-select v-model="wordData['college']" style="width: 100%;" placeholder="请选择所在学院">
  31. <el-option
  32. v-for="item in DepartmentData"
  33. :key="item.id"
  34. :label="item.name"
  35. :value="item.id">
  36. </el-option>
  37. </el-select>
  38. <!-- <el-input
  39. type="textarea"
  40. autosize
  41. resize="none"
  42. placeholder="请输入所在部门"
  43. v-model="input">
  44. </el-input> -->
  45. </td><td colspan="2">联系电话</td><td colspan="3">
  46. <el-input
  47. type="textarea"
  48. autosize
  49. resize="none"
  50. placeholder="请输入联系电话"
  51. v-model="input">
  52. </el-input>
  53. </td>
  54. </tr>
  55. <tr>
  56. <td colspan="4">项目起始时间</td>
  57. <td colspan="5">
  58. <el-date-picker
  59. v-model="wordData.endTime"
  60. type="date"
  61. placeholder="请选择项目计划完成时间"
  62. prefix-icon="none"
  63. value-format="yyyy-MM-dd HH:mm:ss">
  64. </el-date-picker>
  65. </td>
  66. <td colspan="3">计划完成时间</td><td colspan="5">
  67. <el-date-picker
  68. v-model="wordData.endTime"
  69. type="date"
  70. placeholder="请选择活动时间"
  71. prefix-icon="none"
  72. value-format="yyyy-MM-dd HH:mm:ss">
  73. </el-date-picker>
  74. </td>
  75. </tr>
  76. <tr>
  77. <td colspan="4">项目组人数</td><td colspan="2" v-text="wordData['member'].length"></td>
  78. <td colspan="3">参与学生人数</td><td colspan="2">
  79. <el-input
  80. type="number"
  81. placeholder="请输入学生人数"
  82. v-model="wordData['student']">
  83. </el-input>
  84. </td>
  85. <td colspan="3">预算总经费</td><td colspan="3"></td>
  86. </tr>
  87. <tr>
  88. <td colspan="2" :rowspan="wordData['member'].length+1"><p>项</p> <p>目</p> <p>组</p> <p>成</p> <p>员</p></td><td colspan="2">姓名</td><td colspan="3">工作单位/部门</td><td colspan="10">项目分工</td>
  89. </tr>
  90. <tr v-for="(item,index) in wordData.member" :key="index">
  91. <td colspan="2" style="border-left: none;">
  92. <el-input
  93. type="textarea"
  94. autosize
  95. resize="none"
  96. placeholder="请输入姓名"
  97. v-model="item['name']">
  98. </el-input>
  99. </td><td colspan="3">
  100. <el-input
  101. type="textarea"
  102. autosize
  103. resize="none"
  104. placeholder="请输入工作单位/部门"
  105. v-model="item['collage']">
  106. </el-input>
  107. </td><td colspan="10">
  108. <el-input
  109. type="textarea"
  110. autosize
  111. resize="none"
  112. placeholder="请输入项目分工"
  113. v-model="item['work']">
  114. </el-input>
  115. </td>
  116. <div class="operate">
  117. <el-button v-if="wordData['member'].length-1==index" @click="addPerson" type="primary" size="mini">+</el-button>
  118. <el-button @click="DelPerson(index)" type="primary" size="mini">-</el-button>
  119. </div>
  120. </tr>
  121. <tr class="textLeft">
  122. <td colspan="2" rowspan="2"><p>项目</p><br> <p>内容</p></td><td style="text-align: left;" colspan="15">
  123. <p>一、项目简介</p>
  124. <el-input
  125. type="textarea"
  126. :rows="6"
  127. style="width: 100%;"
  128. resize="none"
  129. v-model="wordData['brief']">
  130. </el-input>
  131. </td>
  132. </tr>
  133. <tr class="textLeft">
  134. <td colspan="15" style="text-align: left;border-left: none;">
  135. <p>二、创新点</p>
  136. <el-input
  137. type="textarea"
  138. :rows="6"
  139. style="width: 100%;"
  140. resize="none"
  141. v-model="wordData['innovate']">
  142. </el-input>
  143. </td>
  144. </tr>
  145. <tr class="textLeft">
  146. <td colspan="2" rowspan="3"><p>预期</p><br><p>取得</p> <br><p>成果</p></td><td colspan="15" style="text-align: left;">
  147. <p>一、项目预期成果、数量及形式</p>
  148. <el-input
  149. type="textarea"
  150. :rows="6"
  151. style="width: 100%;"
  152. resize="none"
  153. v-model="wordData['expected']">
  154. </el-input>
  155. </td>
  156. </tr>
  157. <tr class="textLeft">
  158. <td colspan="15" style="text-align: left;border-left: none;">
  159. <p>二、创客人才培养预期成果、数量</p>
  160. <el-input
  161. type="textarea"
  162. :rows="6"
  163. style="width: 100%;"
  164. resize="none"
  165. v-model="wordData['culture']">
  166. </el-input>
  167. </td>
  168. </tr>
  169. <tr class="textLeft">
  170. <td colspan="15" style="text-align: left;border-left: none;">
  171. <p>三、项目预期孵化、转化创业项目情况</p>
  172. <el-input
  173. type="textarea"
  174. :rows="6"
  175. style="width: 100%;"
  176. resize="none"
  177. v-model="wordData['incubate']">
  178. </el-input>
  179. </td>
  180. </tr>
  181. <tr class="textLeft">
  182. <td colspan="2"><p>项目</p><br><p>实施</p> <br><p>计划</p></td><td colspan="15" style="text-align: left;">
  183. <el-input
  184. type="textarea"
  185. :rows="10"
  186. style="width: 100%;"
  187. resize="none"
  188. v-model="wordData['ImplementationPlan']">
  189. </el-input>
  190. </td>
  191. </tr>
  192. <tr>
  193. <td rowspan="11"><p>预</p> <p>算</p> <p>经</p> <p>费</p></td>
  194. </tr>
  195. <tr>
  196. <td rowspan="4" style="border-left: none;">总经费</td><td rowspan="4" colspan="2" >元</td>
  197. </tr>
  198. <tr>
  199. <td colspan="12" style="border-left: none;">经费月支出计划</td>
  200. </tr>
  201. <tr>
  202. <td style="border-left: none;">1</td><td>2</td><td>3</td><td>4</td><td>5</td><td>6</td><td>7</td><td>8</td><td>9</td><td>10</td><td>11</td><td>12</td>
  203. </tr>
  204. <tr>
  205. <td v-for="(item,index) in 12" :key="index+'a'" style="border-left: none;">
  206. <el-input
  207. type="number"
  208. autosize
  209. style="width: 100%;"
  210. resize="none"
  211. v-model="input">
  212. </el-input>
  213. </td>
  214. </tr>
  215. <tr>
  216. <td colspan="4" style="border-left: none;">支出类别</td><td colspan="5">支出项目</td><td colspan="4">金额(元)</td><td colspan="2">备注</td>
  217. </tr>
  218. <tr v-for="(item,index) in wordData.member" :key="index">
  219. <td colspan="4" style="border-left: none;">
  220. <el-input
  221. type="textarea"
  222. autosize
  223. resize="none"
  224. placeholder="请输入支出类别"
  225. v-model="input">
  226. </el-input>
  227. </td><td colspan="5">
  228. <el-input
  229. type="textarea"
  230. autosize
  231. resize="none"
  232. placeholder="请输入支出项目"
  233. v-model="input">
  234. </el-input>
  235. </td><td colspan="4">
  236. <el-input
  237. type="number"
  238. autosize
  239. style="width: 100%;"
  240. resize="none"
  241. placeholder="请输入金额"
  242. v-model="input">
  243. </el-input>
  244. </td><td colspan="2">
  245. <el-input
  246. type="textarea"
  247. autosize
  248. resize="none"
  249. placeholder="备注"
  250. v-model="input">
  251. </el-input>
  252. </td>
  253. </tr>
  254. <tr>
  255. <td><p>所在部</p> <p>门意见</p></td><td colspan="15">
  256. <el-input
  257. type="textarea"
  258. :rows="10"
  259. style="width: 100%;"
  260. resize="none"
  261. v-model="input">
  262. </el-input>
  263. <div style="text-align: right;font-size: 18px;width: 80%;margin-bottom: 20px;">负责人签章:</div>
  264. <div style="text-align: right;font-size: 18px;width: 90%;">年&nbsp;&nbsp;&nbsp; 月 &nbsp;&nbsp;&nbsp;日</div>
  265. </td>
  266. </tr>
  267. <tr>
  268. <td><p>主管部</p> <p>门审核</p><p>意见</p></td><td colspan="15">
  269. <el-input
  270. type="textarea"
  271. :rows="10"
  272. style="width: 100%;"
  273. resize="none"
  274. v-model="input">
  275. </el-input>
  276. <div style="text-align: right;font-size: 18px;width: 80%;margin-bottom: 20px;">负责人签章:</div>
  277. <div style="text-align: right;font-size: 18px;width: 90%;">年&nbsp;&nbsp;&nbsp; 月 &nbsp;&nbsp;&nbsp;日</div>
  278. </td>
  279. </tr>
  280. <tr>
  281. <td v-for="(item,index) in 16" :key="index+'c'" style="border: none;"></td>
  282. </tr>
  283. </table>
  284. <div class="notes">
  285. <span>备注:</span>
  286. <span>1、支出类别分为直接费用(小型仪器设备费、材料费、测试化验加工费、项目协作费)和间
  287. 接费用(项目成果鉴定费、参展参赛费、创客交流活动费、知识产权事务费)。</span>
  288. <span>2、如表格不够可顺延或另附页。</span>
  289. <div style="width: 300px;margin: 20px auto;display: flex;justify-content: space-between;">
  290. <el-button style="width: 120px;margin: 20px auto;" type="primary">提交项目</el-button>
  291. <el-button style="width: 120px;margin: 20px auto;" type="primary">下载表单</el-button>
  292. </div>
  293. </div>
  294. </div>
  295. </template>
  296. <script>
  297. import {getNowDate} from '@/components/tool/Date.js'
  298. export default {
  299. // props:['data'],
  300. data() {
  301. return {
  302. // teacher:[],
  303. // student:[],
  304. allFund:'',
  305. input:"",
  306. DepartmentData:[],
  307. wordData:{
  308. applicationDate:getNowDate(1),//申请日期
  309. projectName:'',//项目名称
  310. pro_leader:"",//项目负责人
  311. college: '',//所在学院
  312. tel:'',//联系电话
  313. beginTime:'',//项目起始时间
  314. endTime:'',//计划完成时间
  315. student:"",//学生人数
  316. member:[
  317. {name:"",collage:"",work:""},
  318. {name:"",collage:"",work:""},
  319. {name:"",collage:"",work:""},
  320. {name:"",collage:"",work:""},
  321. {name:"",collage:"",work:""},
  322. ],
  323. brief:"",//项目简介
  324. innovate:"",//创新点
  325. expected:"",//项目预期成果、数量及形式
  326. culture:"",//创客人才培养预期成果、数量
  327. incubate:"",//项目预期孵化、转化创业项目情况
  328. ImplementationPlan:"",//项目实施计划
  329. fund:{
  330. device:"",
  331. Material:"",
  332. processing:"",
  333. Collaboration:"",
  334. APPRAISAL:"",
  335. entery:"",
  336. activities:"",
  337. Transaction:"",
  338. },//预算经费
  339. }
  340. //total:总经费
  341. //小型仪器设备费:device deviceRemarks
  342. //材料费:Material MaterialRemarks
  343. //测试化验加工费:processing processingRemarks
  344. //项目协作费:Collaboration CollaborationRemarks
  345. //项目成果鉴定费:APPRAISAL APPRAISALRemarks
  346. //参展参赛费:entery enteryRemarks
  347. //创客交流活动费:activities activitiesRemarks
  348. //知识产权事务费:Transaction TransactionRemarks
  349. }
  350. },
  351. methods: {
  352. getText(value) { //电话验证
  353. let verify = /^(?:(?:\+|00)86)?1(?:(?:3[\d])|(?:4[5-79])|(?:5[0-35-9])|(?:6[5-7])|(?:7[0-8])|(?:8[\d])|(?:9[189]))\d{8}$/; //获取正则表达式 存放到verify变量中
  354. let result = verify.test(value.trim()); //判断输入框内容是否符合 正则表达式
  355. if(!result) return this.$message.error('请输入正确联系号码格式')
  356. },
  357. addPerson(){//添加成员
  358. this.wordData['member'].push({name:"",collage:"",work:""});
  359. },
  360. DelPerson(index){//删除成员
  361. this.wordData['member'].splice(index,1)
  362. },
  363. getProjectDepartmentData(){ //获取项目立项申请基础信息页面所在部门数据
  364. this.ajax.get(this.$store.state.api+'/SelectAllDepartment',{
  365. uid:this.$store.state.userInfo.userid
  366. }).then(res=>{
  367. this.DepartmentData = res.data[0]
  368. },err=>{
  369. console.log(err);
  370. })
  371. },
  372. submitWord(){
  373. const cEmpty = /^\s*$/g;
  374. for (let i in this.wordData){
  375. // console.log(this.wordData[i],i);
  376. switch(i){
  377. case 'projectName':
  378. if (cEmpty.test(this.wordData[i])) {
  379. this.$message.error('请输入项目名称')
  380. // this.$refs.projectName.style.background='rgb(236, 141, 141)'
  381. // setTimeout(() => {
  382. // this.$refs.projectName.style.background='#ffffff'
  383. // }, 2000);
  384. document.querySelector('#projectName').scrollIntoView({ behavior: "smooth" });
  385. return false
  386. }
  387. break;
  388. case 'radio':
  389. if (cEmpty.test(this.wordData[i])) {
  390. this.$message.error('请选择项目分组')
  391. document.querySelector('#radio').scrollIntoView({ behavior: "smooth" });
  392. return false
  393. }
  394. break;
  395. case 'checkList':
  396. if (this.wordData[i].length==0) {
  397. this.$message.error('优先支持项目')
  398. document.querySelector('#checkList').scrollIntoView({ behavior: "smooth" });
  399. return false
  400. }
  401. break;
  402. case 'schoolRadio':
  403. if (cEmpty.test(this.wordData[i])) {
  404. this.$message.error('请选择美丽校园改造项目')
  405. document.querySelector('#schoolRadio').scrollIntoView({ behavior: "smooth" });
  406. return false
  407. }
  408. break;
  409. case 'applyParsonRadio':
  410. if (cEmpty.test(this.wordData[i])) {
  411. this.$message.error('请选择项目申请人')
  412. document.querySelector('#applyParsonRadio').scrollIntoView({ behavior: "smooth" });
  413. return false
  414. }
  415. break;
  416. case 'applyParsonName':
  417. if (cEmpty.test(this.wordData[i])) {
  418. this.$message.error('请填写申请人姓名')
  419. document.querySelector('#applyParsonName').scrollIntoView({ behavior: "smooth" });
  420. return false
  421. }
  422. break;
  423. case 'college':
  424. if (cEmpty.test(this.wordData[i])) {
  425. this.$message.error('请选择所在学院')
  426. document.querySelector('#applyParsonName').scrollIntoView({ behavior: "smooth" });
  427. return false
  428. }
  429. break;
  430. case 'tel':
  431. if (cEmpty.test(this.wordData[i])) {
  432. this.$message.error('请填写联系方式')
  433. document.querySelector('#applyParsonName').scrollIntoView({ behavior: "smooth" });
  434. return false
  435. }
  436. break;
  437. case 'beginTime':
  438. if (cEmpty.test(this.wordData[i])) {
  439. this.$message.error('请选择项目起始时间')
  440. document.querySelector('#beginTime').scrollIntoView({ behavior: "smooth" });
  441. return false
  442. }
  443. break;
  444. case 'endTime':
  445. if (cEmpty.test(this.wordData[i])) {
  446. this.$message.error('请选择计划完成时间')
  447. document.querySelector('#beginTime').scrollIntoView({ behavior: "smooth" });
  448. return false
  449. }
  450. break;
  451. case 'studentS':
  452. // if(this.wordData[i].length<5){
  453. // this.$message.error('学生团队应5人以上')
  454. // document.querySelector('#studentS').scrollIntoView({ behavior: "smooth" });
  455. // return false;
  456. // }else{
  457. let snum = 0;
  458. this.wordData[i].forEach(item=>{
  459. for(let j in item){
  460. if(cEmpty.test(item[j])){
  461. snum++;
  462. }
  463. }
  464. })
  465. if(snum>0){
  466. this.$message.error("请填完学生信息");
  467. document.querySelector('#studentS').scrollIntoView({ behavior: "smooth" });
  468. return false;
  469. }
  470. // }
  471. break;
  472. case 'teacherS':
  473. let num = 0;
  474. this.wordData[i].forEach(item=>{
  475. for(let j in item){
  476. if(cEmpty.test(item[j])){
  477. num++;
  478. }
  479. }
  480. })
  481. if(num>0){
  482. this.$message.error("请填完老师信息");
  483. document.querySelector('#teacherS').scrollIntoView({ behavior: "smooth" });
  484. return false;
  485. }
  486. break;
  487. case 'brief':
  488. if (cEmpty.test(this.wordData[i])) {
  489. this.$message.error('请填写项目简介')
  490. // this.$refs.brief.style.background='rgb(236, 141, 141)'
  491. // setTimeout(() => {
  492. // this.$refs.brief.style.background='#ffffff'
  493. // }, 2000);
  494. document.querySelector('#brief').scrollIntoView({ behavior: "smooth" });
  495. return false
  496. }
  497. break;
  498. case 'fund':
  499. let mon=this.wordData.fund.facility*1 + this.wordData.fund.materials*1+this.wordData.fund.process*1+ this.input*1+this.wordData.fund.authenticate*1+ this.wordData.fund.match*1+this.wordData.fund.activity*1+this.wordData.fund.affair*1
  500. if(mon==0){
  501. document.querySelector('#fund').scrollIntoView({ behavior: "smooth" });
  502. return this.$message.error('请输入经费')
  503. }
  504. break;
  505. }
  506. }
  507. // let param={
  508. // projectName
  509. // }
  510. // this.ajax
  511. // .post(this.$store.state.api+'/SelectAllType',param)
  512. // .then(err,res)
  513. },
  514. },
  515. computed:{ //经费总合
  516. reversedMessage: function () {
  517. return (this.wordData.fund.facility*1 + this.wordData.fund.materials*1+this.wordData.fund.process*1+ this.input*1+this.wordData.fund.authenticate*1+ this.wordData.fund.match*1+this.wordData.fund.activity*1+this.wordData.fund.affair*1)/10000
  518. }
  519. },
  520. mounted(){
  521. this.getProjectDepartmentData()
  522. }
  523. };
  524. </script>
  525. <style lang="less" scope>
  526. .textLeft{
  527. .el-textarea__inner{
  528. // padding: 0;
  529. border: none ;
  530. border-radius: 0px;
  531. text-align: left !important;
  532. font-size: 16px;
  533. }
  534. }
  535. .table{
  536. border: none;
  537. border-top: solid 1px black;
  538. // border-right: solid 1px black;
  539. // border-left: solid 1px black;
  540. tr{
  541. position: relative;
  542. td{
  543. border: none;
  544. border-bottom: solid 1px black;
  545. // border-left: solid 1px black;
  546. border-right: solid 1px black;
  547. height: 50px;
  548. text-align: center;
  549. line-height: 30px;
  550. width: 80px;
  551. &:nth-child(1){
  552. border-left: solid 1px black;
  553. }
  554. p{
  555. font-weight: 600;
  556. }
  557. .el-select .el-input .el-select__caret{
  558. display: none;
  559. }
  560. .el-textarea__inner{
  561. // padding: 0;
  562. border: none ;
  563. border-radius: 0px;
  564. text-align: center;
  565. font-size: 16px;
  566. }
  567. .el-input__inner{
  568. border: none ;
  569. border-radius: 0px;
  570. text-align: center;
  571. font-size: 16px;
  572. }
  573. }
  574. }
  575. }
  576. .twoCol{
  577. column-span: 2;
  578. }
  579. .operate{
  580. right:-85px;
  581. width:85px;
  582. height: 50px;
  583. display:flex;
  584. justify-content:space-between;
  585. align-items:center;
  586. position:absolute;
  587. .el-button{
  588. max-width:10px;
  589. display:flex;
  590. justify-content:center;
  591. align-items:center;
  592. margin-left:10px;
  593. }
  594. }
  595. //在style里面添加此段代码即可
  596. input::-webkit-outer-spin-button,
  597. input::-webkit-inner-spin-button {
  598. -webkit-appearance: none;
  599. }
  600. input[type="number"]{
  601. -moz-appearance: textfield;
  602. }
  603. #MakerSpaceWord{
  604. width: 100%;
  605. display: flex;
  606. flex-direction: column;
  607. align-items: center;
  608. background-color: #ffff;
  609. margin: 0;
  610. padding:100px;
  611. box-sizing:border-box;
  612. }
  613. #title{
  614. width: 100%;
  615. display: flex;
  616. flex-direction: column;
  617. align-items: center;
  618. position: relative;
  619. // margin-top: 40px;
  620. .school{
  621. font-size: 2.5em;
  622. font-weight: 500;
  623. letter-spacing: 20px;
  624. }
  625. .wordTitle{
  626. font-size: 2em;
  627. letter-spacing: .15em;
  628. margin-bottom:40px ;
  629. }
  630. .date{
  631. font-size: 1em;
  632. position: absolute;
  633. bottom: 0;
  634. right: 100px;
  635. font-weight: bold;
  636. }
  637. }
  638. .notes{
  639. width: 100%;
  640. display: flex;
  641. flex-direction:column;
  642. }
  643. </style>