markeractivityWord.vue 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608
  1. <template>
  2. <div id="MarkeractivityWord">
  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 id="one">
  10. <td colspan="4">关联项目</td>
  11. <td colspan="12">
  12. <el-select v-model="wordData['associatedProjects']" @change="getProjectFund()" style="width: 100%;" placeholder="请选择关联项目">
  13. <el-option
  14. v-for="item in ProjectData"
  15. :key="item.courseId"
  16. :label="item.title"
  17. :value="item.courseId">
  18. </el-option>
  19. </el-select>
  20. </td>
  21. </tr>
  22. <tr id="two">
  23. <td colspan="4">活动名称</td>
  24. <td colspan="5">
  25. <el-input
  26. type="textarea"
  27. autosize
  28. resize="none"
  29. placeholder="请输入活动名称"
  30. v-model="wordData['activityName']">
  31. </el-input>
  32. </td>
  33. <td colspan="3">预算经费</td>
  34. <td @click="goto('#fund')" colspan="4" v-text="total">
  35. <!-- <el-input
  36. type="textarea"
  37. autosize
  38. resize="none"
  39. placeholder="请输入预算经费"
  40. v-model="total">
  41. </el-input> -->
  42. </td>
  43. </tr>
  44. <tr id="three">
  45. <td colspan="4">项目负责人</td><td colspan="3">
  46. <el-input
  47. type="textarea"
  48. autosize
  49. resize="none"
  50. placeholder="请输入负责人"
  51. v-model="wordData['pro_leader']">
  52. </el-input>
  53. </td><td colspan="2">所在部门</td><td colspan="3">
  54. <!-- <el-input
  55. type="textarea"
  56. autosize
  57. resize="none"
  58. placeholder="请输入所在部门"
  59. v-model="wordData['college']">
  60. </el-input> -->
  61. <el-select v-model="wordData['college']" style="width: 100%;" placeholder="请选择所在学院">
  62. <el-option
  63. v-for="item in DepartmentData"
  64. :key="item.id"
  65. :label="item.name"
  66. :value="item.id">
  67. </el-option>
  68. </el-select>
  69. </td><td colspan="2">联系电话</td><td colspan="3">
  70. <el-input
  71. type="textarea"
  72. autosize
  73. resize="none"
  74. placeholder="请输入联系电话"
  75. v-model="wordData['tel']">
  76. </el-input>
  77. </td>
  78. </tr>
  79. <tr id="four">
  80. <td colspan="4">活动时间</td>
  81. <td colspan="5">
  82. <el-date-picker
  83. v-model="wordData['activityTime']"
  84. type="daterange"
  85. value-format="yyyy-MM-dd HH:mm:ss"
  86. range-separator="至"
  87. prefix-icon="none"
  88. start-placeholder="项目起始时间"
  89. end-placeholder="项目完成时间">
  90. </el-date-picker>
  91. </td>
  92. <td colspan="3">参与学生人数</td><td colspan="5">
  93. <el-input
  94. type="number"
  95. autosize
  96. :min="0"
  97. style="width: 100%;"
  98. resize="none"
  99. placeholder="请输入参与学生人数"
  100. v-model.number="wordData['student']">
  101. </el-input>
  102. </td>
  103. </tr>
  104. <tr id="five">
  105. <td colspan="2" :rowspan="wordData['member'].length+1"><p>活</p> <p>动</p> <p>指</p> <p>导</p> <p>老</p> <p>师</p></td><td colspan="2">姓名</td><td colspan="3">工作单位/部门</td><td colspan="9">项目分工</td>
  106. </tr>
  107. <tr v-for="(item,index) in wordData['member']" :key="index+'b'">
  108. <td colspan="2" style="border-left: none;">
  109. <el-input
  110. type="textarea"
  111. autosize
  112. resize="none"
  113. placeholder="请输入姓名"
  114. v-model="item['name']">
  115. </el-input>
  116. </td><td colspan="3">
  117. <el-input
  118. type="textarea"
  119. autosize
  120. resize="none"
  121. placeholder="请输入工作单位/部门"
  122. v-model="item['collage']">
  123. </el-input>
  124. </td><td colspan="10">
  125. <el-input
  126. type="textarea"
  127. autosize
  128. resize="none"
  129. placeholder="请输入项目分工"
  130. v-model="item['work']">
  131. </el-input>
  132. </td>
  133. <div class="operate">
  134. <el-button @click="addPerson" v-if="wordData['member'].length-1==index" type="primary" size="mini">添加</el-button>
  135. <el-button @click="DelPerson(index)" type="primary" size="mini">删除</el-button>
  136. </div>
  137. </tr>
  138. <tr class="textLeft" id="six">
  139. <td colspan="2"><p>活动</p><br> <p>计划</p></td><td style="text-align: left;" colspan="15">
  140. <el-input
  141. type="textarea"
  142. :rows="12"
  143. style="width: 100%;"
  144. resize="none"
  145. v-model="wordData['activityPlan']">
  146. </el-input>
  147. </td>
  148. </tr>
  149. <tr class="textLeft" id="seven">
  150. <td colspan="2"><p>预期</p><br><p>目标</p> </td><td colspan="15" style="text-align: left;">
  151. <el-input
  152. type="textarea"
  153. :rows="10"
  154. style="width: 100%;"
  155. resize="none"
  156. v-model="wordData['expectations']">
  157. </el-input>
  158. </td>
  159. </tr>
  160. <tr class="textLeft" id="nine">
  161. <td colspan="2"><p>活动受</p><br> <p>众面</p></td><td style="text-align: left;" colspan="15">
  162. <p>参与学生范围:</p>
  163. <el-input
  164. type="textarea"
  165. :rows="12"
  166. style="width: 100%;"
  167. resize="none"
  168. v-model="wordData['eventAudience']">
  169. </el-input>
  170. </td>
  171. </tr>
  172. <!-- <tr class="textLeft">
  173. <td colspan="15" style="text-align: left;border-left: none;">
  174. <p>二、创新点</p>
  175. <el-input
  176. type="textarea"
  177. :rows="6"
  178. style="width: 100%;"
  179. resize="none"
  180. v-model="input">
  181. </el-input>
  182. </td>
  183. </tr> -->
  184. <tr class="textLeft" id="ten">
  185. <td colspan="2"><p>经费</p><br><p>支出</p> <br><p>计划</p></td><td colspan="15" style="text-align: left;">
  186. <el-input
  187. type="textarea"
  188. :rows="10"
  189. style="width: 100%;"
  190. resize="none"
  191. v-model="wordData['fundingPlan']">
  192. </el-input>
  193. </td>
  194. </tr>
  195. <tr id="fund">
  196. <td rowspan="14"><p>预</p> <p>算</p> <p>经</p> <p>费</p></td>
  197. </tr>
  198. <tr>
  199. <td rowspan="4" style="border-left: none;">总经费</td><td rowspan="4" colspan="2" >{{total}}元</td>
  200. </tr>
  201. <tr>
  202. <td colspan="12" style="border-left: none;">经费月支出计划 (元)<span style="font-weight: bold;margin-left: 40px;">剩余经费:{{ allFund }}元</span></td>
  203. </tr>
  204. <tr>
  205. <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>
  206. </tr>
  207. <tr>
  208. <td v-for="(item,index) in wordData['expenditureMothPlan']" :key="index" style="border-left: none;">
  209. <el-input
  210. type="number"
  211. autosize
  212. min="0"
  213. style="width: 100%;"
  214. resize="none"
  215. v-model.number="wordData['expenditureMothPlan'][index]"
  216. @input="checkExpenditureMothPlan(index)">
  217. </el-input>
  218. </td>
  219. </tr>
  220. <tr>
  221. <td colspan="4" style="border-left: none;">支出类别</td><td colspan="4">支出项目</td><td colspan="2">金额(元)</td><td colspan="5">备注</td>
  222. </tr>
  223. <tr>
  224. <td rowspan="4" colspan="4" style="border-left: none;">直接经费</td>
  225. <td colspan="4">小型仪器设备费</td>
  226. <td colspan="2">
  227. <el-input
  228. type="number"
  229. autosize
  230. resize="none"
  231. placeholder="小型仪器设备费"
  232. v-model.number="wordData['fund']['device']"
  233. @change="checkProjectFund('device')"
  234. ></el-input>
  235. </td>
  236. <td colspan="5">
  237. 项目开展所需的小型专用仪器设备、工具、配件购置或租赁费用。
  238. </td>
  239. </tr>
  240. <tr>
  241. <td colspan="4" style="border-left: none;">材料费</td>
  242. <td colspan="2">
  243. <el-input
  244. type="number"
  245. autosize
  246. resize="none"
  247. placeholder="材料费"
  248. v-model.number="wordData['fund']['Material']"
  249. @change="checkProjectFund('Material')"></el-input>
  250. </td>
  251. <td colspan="5">项目开展需消耗的各种原材料、辅助材料等低值易耗品的采购费用。</td>
  252. </tr>
  253. <tr>
  254. <td colspan="4" style="border-left: none;">测试化验加工费</td>
  255. <td colspan="2">
  256. <el-input
  257. type="number"
  258. autosize
  259. resize="none"
  260. placeholder="测试化验加工费"
  261. @change="checkProjectFund('processing')"
  262. v-model.number="wordData['fund']['processing']"></el-input>
  263. </td>
  264. <td colspan="5">项目开展过程中支付给外单位的检验、测试、化验、计算、分析及加工费等费用。</td>
  265. </tr>
  266. <tr>
  267. <td colspan="4" style="border-left: none;">项目协作费</td>
  268. <td colspan="2">
  269. <el-input
  270. type="number"
  271. autosize
  272. resize="none"
  273. placeholder="项目协作费"
  274. @change="checkProjectFund('Collaboration')"
  275. v-model.number="wordData['fund']['Collaboration']"></el-input>
  276. </td>
  277. <td colspan="5">按合同规定支付给协作单位的费用</td>
  278. </tr>
  279. <tr>
  280. <td rowspan="4" colspan="4" style="border-left: none;">间接经费</td>
  281. <td colspan="4">项目成果鉴定费</td>
  282. <td colspan="2">
  283. <el-input
  284. type="number"
  285. autosize
  286. resize="none"
  287. placeholder="项目成果鉴定费"
  288. @change="checkProjectFund('APPRAISAL')"
  289. v-model.number="wordData['fund']['APPRAISAL']"></el-input>
  290. </td>
  291. <td colspan="5">学术会务费、评审费、鉴定费、成果集制作费等费用。</td>
  292. </tr>
  293. <tr>
  294. <td colspan="4" style="border-left: none;">参展参赛费</td>
  295. <td colspan="2">
  296. <el-input
  297. type="number"
  298. autosize
  299. resize="none"
  300. placeholder="参展参赛费"
  301. @change="checkProjectFund('entery')"
  302. v-model.number="wordData['fund']['entery']"></el-input>
  303. </td>
  304. <td colspan="5">参加创客展会、竞赛等所需的报名费、展位费、布展费、宣传推广费及差旅费等费用。</td>
  305. </tr>
  306. <tr>
  307. <td colspan="4" style="border-left: none;">创客交流活动费</td>
  308. <td colspan="2">
  309. <el-input
  310. type="number"
  311. autosize
  312. resize="none"
  313. placeholder="创客交流活动费"
  314. @change="checkProjectFund('activities')"
  315. v-model.number="wordData['fund']['activities']"></el-input>
  316. </td>
  317. <td colspan="5">创客交流活动中支付给校外专家的指导费、咨询费、授课费等费用。</td>
  318. </tr>
  319. <tr>
  320. <td colspan="4" style="border-left: none;">知识产权事务费</td>
  321. <td colspan="2">
  322. <el-input
  323. type="number"
  324. autosize
  325. resize="none"
  326. placeholder="知识产权事务费"
  327. @change="checkProjectFund('Transaction')"
  328. v-model.number="wordData['fund']['Transaction']">
  329. </el-input>
  330. </td>
  331. <td colspan="5">论文版面费、专利及其他知识产权事务等费用。</td>
  332. </tr>
  333. <tr class="textLeft">
  334. <td><p>所在部</p> <p>门意见</p></td><td colspan="15" style="height: 200px;">
  335. <div style="text-align: right;font-size: 18px;width: 80%;margin-bottom: 20px;">负责人签章:</div>
  336. <div style="text-align: right;font-size: 18px;width: 90%;">年&nbsp;&nbsp;&nbsp; 月 &nbsp;&nbsp;&nbsp;日</div>
  337. </td>
  338. </tr>
  339. <tr>
  340. <td v-for="(item,index) in 16" :key="index+'c'" style="border: none;"></td>
  341. </tr>
  342. </table>
  343. <div class="notes">
  344. <span>备注:</span>
  345. <span>如表格不够可顺延或另附页。</span>
  346. <!-- <div style="width: 300px;margin: 20px auto;display: flex;justify-content: space-between;">
  347. <el-button @click="applyButton" style="width: 120px;margin: 20px auto;" type="primary">提交活动</el-button>
  348. <el-button style="width: 120px;margin: 20px auto;" type="primary">下载表单</el-button>
  349. </div> -->
  350. </div>
  351. </div>
  352. </template>
  353. <script>
  354. export default {
  355. props:['wordData','total'],
  356. data() {
  357. return {
  358. allFund:0,
  359. myselfFund:0,
  360. DepartmentData:[],
  361. ProjectData:[],
  362. }
  363. },
  364. methods: {
  365. getText(value) { //电话验证
  366. 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变量中
  367. let result = verify.test(value.trim()); //判断输入框内容是否符合 正则表达式
  368. if(!result) return this.$message.error('请输入正确联系号码格式')
  369. },
  370. addPerson(){ //添加学生
  371. this.wordData['member'].push({name:"",collage:"",work:""});
  372. },
  373. DelPerson(index){ //删除学生
  374. this.wordData['member'].splice(index,1)
  375. },
  376. getProjectDepartmentData(){ //获取项目立项申请基础信息页面所在部门数据
  377. this.ajax.get(this.$store.state.api+'/SelectAllDepartment',{
  378. uid:this.$store.state.userInfo.userid
  379. }).then(res=>{
  380. this.DepartmentData = res.data[0]
  381. },err=>{
  382. console.log(err);
  383. })
  384. },
  385. getProjectData(){//获取未完结的项目
  386. this.ajax.get(this.$store.state.api+"/GetAllProjectName",{
  387. uid:this.$store.state.userInfo.userid,
  388. }).then(res=>{
  389. this.ProjectData = res.data[0].filter(item=>item.isupload!=3 && item.isupload!=4 );
  390. }).catch(err=>{
  391. this.$message.error(err.message)
  392. })
  393. },
  394. checkProjectFund(index){
  395. if(this.wordData['associatedProjects']==''){
  396. for(let i in this.wordData['fund'])this.wordData['fund'][i]='';
  397. return this.$message.error("请先选择关联项目");
  398. }
  399. // if(this.myselfFund>this.total){
  400. // this.allFund+=this.myselfFund - this.total;
  401. // }
  402. if(this.total>this.allFund){
  403. this.wordData['fund'][index]=0;
  404. return this.$message.error("活动总经费不能超过项目剩余总预算")
  405. }
  406. },
  407. checkExpenditureMothPlan(index){
  408. let count = 0;
  409. this.wordData['expenditureMothPlan'].forEach(item=>count+=Number(item))
  410. if(count>this.total){
  411. this.$message.error("总经费月支出计划不能大于总经费");
  412. this.wordData['expenditureMothPlan'][index]=0;
  413. }
  414. },
  415. // checkProjectMoney(){
  416. // // if(!this.wordData['acId']){
  417. // // this.wordData['expenditureMothPlan'] = ['','','','','','','','','','','',''];
  418. // // this.wordData['fund'] = {
  419. // // total:0,
  420. // // device:"",
  421. // // Material:"",
  422. // // processing:"",
  423. // // Collaboration:"",
  424. // // APPRAISAL:"",
  425. // // entery:"",
  426. // // activities:"",
  427. // // Transaction:"",
  428. // // }
  429. // // };
  430. // this.getProjectFund();
  431. // },
  432. getProjectFund(){
  433. if(this.wordData['associatedProjects']=='')return;
  434. this.ajax.get(this.$store.state.api+"/getProjectFund",{
  435. uid:this.$store.state.userInfo.userid,
  436. pid:this.wordData['associatedProjects'],
  437. }).then(result=>{
  438. console.log(result)
  439. let total = Number(result['data'][0][0]['fund']);
  440. let isUse = 0;
  441. let myFund = 0;
  442. result['data'][1].forEach(item=>isUse+=Number(item['money']))
  443. this.allFund = total - isUse;
  444. if(this.wordData['acId']){
  445. result['data'][1].forEach(item=>item['acId']==this.wordData['acId']?myFund+=Number(item['money']):"");
  446. this.myselfFund = myFund;
  447. }
  448. if(this.total>this.allFund+this.myselfFund){
  449. this.wordData['expenditureMothPlan'] = ['','','','','','','','','','','',''];
  450. this.wordData['fund'] = {
  451. total:0,
  452. device:"",
  453. Material:"",
  454. processing:"",
  455. Collaboration:"",
  456. APPRAISAL:"",
  457. entery:"",
  458. activities:"",
  459. Transaction:"",
  460. }
  461. this.$message.error("活动总经费不能超过项目剩余总预算")
  462. }
  463. }).catch(err=>{
  464. console.log(err)
  465. })
  466. },
  467. goto(str){
  468. document.querySelector(str).scrollIntoView({ behavior: "smooth" });
  469. },
  470. },
  471. computed:{ //经费总合
  472. },
  473. mounted(){
  474. this.getProjectDepartmentData();
  475. this.getProjectData();
  476. this.getProjectFund();
  477. }
  478. };
  479. </script>
  480. <style lang="less" scoped>
  481. #MarkeractivityWord{
  482. width: 100%;
  483. display: flex;
  484. flex-direction: column;
  485. align-items: center;
  486. background-color: #ffff;
  487. margin: 0;
  488. padding: 40px 100px;
  489. box-sizing:border-box;
  490. #title{
  491. width: 100%;
  492. display: flex;
  493. flex-direction: column;
  494. align-items: center;
  495. position: relative;
  496. // margin-top: 40px;
  497. .school{
  498. font-size: 2.5em;
  499. font-weight: 500;
  500. letter-spacing: 20px;
  501. }
  502. .wordTitle{
  503. font-size: 2em;
  504. letter-spacing: .15em;
  505. margin-bottom:40px ;
  506. }
  507. .date{
  508. font-size: 1em;
  509. position: absolute;
  510. bottom: 0;
  511. right: 100px;
  512. font-weight: bold;
  513. }
  514. }
  515. .table{
  516. border: none;
  517. border-top: solid 1px black;
  518. tr{
  519. position: relative;
  520. td{
  521. border: none;
  522. border-bottom: solid 1px black;
  523. border-right: solid 1px black;
  524. height: 50px;
  525. text-align: center;
  526. line-height: 30px;
  527. width: 80px;
  528. &:nth-child(1){
  529. border-left: solid 1px black;
  530. }
  531. p{
  532. font-weight: 600;
  533. }
  534. :deep(.el-select .el-input .el-select__caret){
  535. display: none;
  536. }
  537. :deep(.el-textarea__inner){
  538. // padding: 0;
  539. border: none ;
  540. border-radius: 0px;
  541. text-align: center;
  542. font-size: 16px;
  543. }
  544. :deep(.el-input__inner){
  545. border: none ;
  546. &::-webkit-outer-spin-button,&::-webkit-inner-spin-button{
  547. -webkit-appearance: none !important;
  548. }
  549. &[type='number'] {
  550. -moz-appearance: textfield;
  551. }
  552. border-radius: 0px;
  553. text-align: center;
  554. font-size: 16px;
  555. }
  556. }
  557. }
  558. .textLeft{
  559. :deep(.el-textarea__inner){
  560. // padding: 0;
  561. border: none ;
  562. border-radius: 0px;
  563. text-align: left !important;
  564. font-size: 16px;
  565. }
  566. }
  567. }
  568. .notes{
  569. width: 100%;
  570. display: flex;
  571. flex-direction:column;
  572. }
  573. }
  574. .operate{
  575. right:-85px;
  576. width:85px;
  577. height: 50px;
  578. display:flex;
  579. justify-content:space-between;
  580. align-items:center;
  581. position:absolute;
  582. .el-button{
  583. max-width:10px;
  584. display:flex;
  585. justify-content:center;
  586. align-items:center;
  587. margin-left:10px;
  588. }
  589. }
  590. </style>