Q-ABAB 2 years ago
parent
commit
c5e2b71890

+ 33 - 20
src/components/MakerSpaceWord.vue

@@ -161,8 +161,8 @@
                 </el-input>
               </div>
               <div class="operate">
-                <el-button @click="addTeacher" v-if="wordData['teacher'].length==index+1" type="primary" size="mini">+</el-button>
-                <el-button v-if="wordData['teacher'].length!=1  && wordData['teacher'].length>3" @click="DelTeacher(index)" type="primary" size="mini">-</el-button>
+                <el-button @click="addTeacher" v-if="wordData['teacher'].length==index+1" type="primary" size="mini">添加</el-button>
+                <el-button v-if="wordData['teacher'].length!=1  && wordData['teacher'].length>3" @click="DelTeacher(index)" type="primary" size="mini">删除</el-button>
               </div>
             </div>
           </div>
@@ -221,8 +221,8 @@
                 </el-input>
               </div>
               <div class="operate">
-                <el-button @click="addStudent" v-if="wordData['student'].length==index+1" type="primary" size="mini">+</el-button>
-                <el-button @click="DelStudent(index)" v-if="wordData['student'].length!=1  && wordData['student'].length>5"  type="primary" size="mini">-</el-button>
+                <el-button @click="addStudent" v-if="wordData['student'].length==index+1" type="primary" size="mini">添加</el-button>
+                <el-button @click="DelStudent(index)" v-if="wordData['student'].length!=1  && wordData['student'].length>5"  type="primary" size="mini">删除</el-button>
               </div>
             </div>
           </div>
@@ -251,6 +251,13 @@
               </div>
               <div class="chaptersValue" id="eight">
                 <span>建设内容(空间优化/场馆规划方面拟解决的关键问题及主要建设指标)</span><br/>
+                <!-- <el-input
+                  type="textarea"
+                  autosize
+                  resize="none"
+                  placeholder="请输入项目名称"
+                  v-model="wordData['projectName']">
+                </el-input> -->
                 <el-input
                   type="textarea"
                   class="noCenter"
@@ -375,7 +382,7 @@
           <div class="fundTable">
             <div class="fundTotal">
               <div class="fundLabel">总经费</div>
-              <div class="fundValue">{{wordData['fund']['device']+wordData['fund']['Material']+wordData['fund']['processing']+wordData['fund']['Collaboration']+wordData['fund']['APPRAISAL']+wordData['fund']['entery']+wordData['fund']['activities']+wordData['fund']['Transaction']}}元</div>
+              <div class="fundValue">{{wordData['fund']['total']||0}}万</div>
             </div>
             <div class="fundHeader">
               <div class="HeaderLabel">支出类别</div>
@@ -390,12 +397,12 @@
                   <div class="fundDataValue">小型仪器设备费</div>
                   <div class="fundDataValue">
                     <el-input
-                      type="textarea"
+                      type="number"
                       autosize
                       resize="none"
                       placeholder="小型仪器设备费"
                       v-model.number="wordData['fund']['device']"
-                      @change="convertNumber('device',wordData['fund']['device'])"></el-input>
+                      @change="getTotal"></el-input>
                   </div>
                   <div class="fundDataValue"><span>项目开展所需的小型专用仪器设备、工具、配件购置或租赁费用。</span></div>
                 </div>
@@ -407,9 +414,10 @@
                       type="textarea"
                       autosize
                       resize="none"
+                      onkeyup="value=value.replace(/[^\d]/g,'')"
                       placeholder="材料费"
                       v-model.number="wordData['fund']['Material']"
-                      @change="convertNumber('Material',wordData['fund']['Material'])"></el-input>
+                      @change="getTotal"></el-input>
                   </div>
                   <div class="fundDataValue"><span>项目开展需消耗的各种原材料、辅助材料等低值易耗品的采购费用。</span></div>
                 </div>
@@ -421,9 +429,10 @@
                       type="textarea"
                       autosize
                       resize="none"
+                      onkeyup="value=value.replace(/[^\d]/g,'')"
                       placeholder="测试化验加工费"
                       v-model.number="wordData['fund']['processing']"
-                      @change="convertNumber('processing',wordData['fund']['processing'])"></el-input>
+                      @change="getTotal"></el-input>
                   </div>
                   <div class="fundDataValue"><span>项目开展过程中支付给外单位的检验、测试、化验、计算、分析及加工费等费用。</span></div>
                 </div>
@@ -435,9 +444,10 @@
                       type="textarea"
                       autosize
                       resize="none"
+                      onkeyup="value=value.replace(/[^\d]/g,'')"
                       placeholder="项目协作费"
                       v-model.number="wordData['fund']['Collaboration']"
-                      @change="convertNumber('Collaboration',wordData['fund']['Collaboration'])"></el-input>
+                      @change="getTotal"></el-input>
                   </div>
                   <div class="fundDataValue"><span>按合同规定支付给协作单位的费用</span></div>
                 </div>
@@ -457,7 +467,7 @@
                       resize="none"
                       placeholder="项目成果鉴定费"
                       v-model.number="wordData['fund']['APPRAISAL']"
-                      @change="convertNumber('APPRAISAL',wordData['fund']['APPRAISAL'])"></el-input>
+                      @change="getTotal"></el-input>
                   </div>
                   <div class="fundDataValue"><span>学术会务费、评审费、鉴定费、成果集制作费等费用。</span></div>
                 </div>
@@ -470,8 +480,9 @@
                       autosize
                       resize="none"
                       placeholder="参展参赛费"
+                      onkeyup="value=value.replace(/[^\d]/g,'')"
                       v-model.number="wordData['fund']['entery']"
-                      @change="convertNumber('entery',wordData['fund']['entery'])"></el-input>
+                      @change="getTotal"></el-input>
                   </div>
                   <div class="fundDataValue"><span>参加创客展会、竞赛等所需的报名费、展位费、布展费、宣传推广费及差旅费等费用。</span></div>
                 </div>
@@ -483,9 +494,10 @@
                       type="textarea"
                       autosize
                       resize="none"
+                      onkeyup="value=value.replace(/[^\d]/g,'')"
                       placeholder="创客交流活动费"
                       v-model.number="wordData['fund']['activities']"
-                      @change="convertNumber('activities',wordData['fund']['activities'])"></el-input>
+                      @change="getTotal"></el-input>
                   </div>
                   <div class="fundDataValue"><span>创客交流活动中支付给校外专家的指导费、咨询费、授课费等费用。</span></div>
                 </div>
@@ -497,9 +509,10 @@
                       type="textarea"
                       autosize
                       resize="none"
+                      onkeyup="value=value.replace(/[^\d]/g,'')"
                       placeholder="知识产权事务费"
                       v-model.number="wordData['fund']['Transaction']"
-                      @change="convertNumber('Transaction',wordData['fund']['Transaction'])">
+                      @change="getTotal">
                     </el-input>
                   </div>
                   <div class="fundDataValue"><span>论文版面费、专利及其他知识产权事务等费用。</span></div>
@@ -584,6 +597,7 @@ import {getNowDate} from '@/components/tool/Date.js'
           Transforming:"",//学生创客团队孵化、转化创业项目情况
           condition:"",//立 项基 础及条 件
           fund:{
+            total:"",
             device:"",
             Material:"",
             processing:"",
@@ -801,11 +815,9 @@ import {getNowDate} from '@/components/tool/Date.js'
       DelStudent(index){
         this.wordData['student'].splice(index,1)
       },
-      convertNumber(type,str){
-        if(typeof str=='string'){
-          this.wordData['fund'][type] = Number(str.replace(/\D/g,''));
-        }
-        
+      getTotal(){
+        this.wordData['fund']['total'] = Number(this.wordData['fund']['device'])+Number(this.wordData['fund']['Material'])+Number(this.wordData['fund']['processing'])+Number(this.wordData['fund']['Collaboration'])+Number(this.wordData['fund']['APPRAISAL'])+Number(this.wordData['fund']['entery'])+Number(this.wordData['fund']['activities'])+Number(this.wordData['fund']['Transaction'])
+        this.wordData['fund']['total'] = this.wordData['fund']['total']/10000
       }
     },
     mounted(){
@@ -1011,7 +1023,8 @@ import {getNowDate} from '@/components/tool/Date.js'
         flex-direction: column;
         .chaptersValue{
           flex: 1;
-          min-height:200px;
+          height: auto;
+          // min-height:200px;
           box-sizing: border-box;
           border-bottom: solid 1px black;
           padding: 5px;

+ 2 - 1
src/components/MakerSpaceWordShow.vue

@@ -238,7 +238,7 @@
               <div class="fundTable">
                 <div class="fundTotal">
                   <div class="fundLabel">总经费</div>
-                  <div class="fundValue">{{Number(wordData['fund']['device'])+Number(wordData['fund']['Material'])+Number(wordData['fund']['processing'])+Number(wordData['fund']['Collaboration'])+Number(wordData['fund']['APPRAISAL'])+Number(wordData['fund']['entery'])+Number(wordData['fund']['activities'])+Number(wordData['fund']['Transaction'])}}元</div>
+                  <div class="fundValue">{{wordData['fund']['total']}}元</div>
                 </div>
                 <div class="fundHeader">
                   <div class="HeaderLabel">支出类别</div>
@@ -447,6 +447,7 @@
               Transforming:"学生创客团队孵化、转化创业项目情况",//学生创客团队孵化、转化创业项目情况
               condition:"立项基础及条件",//立 项基 础及条 件
               fund:{
+                total:1401,
                 device:200,
                 Material:100,
                 processing:200,

+ 131 - 12
src/components/markerFundWord.vue

@@ -5,7 +5,7 @@
             <div class="wordTitle">创客专项资金及项目申请表(个人创客)</div>
             <div class="date">申请日期:{{wordData.applicationDate}}</div>
         </div>
-        <table border="1" cellspacing="0" class="table">
+        <table border="1" cellspacing="0" class="table" cellpadding="0">
             <tr>
                 <td colspan="4">项目名称</td><td colspan="13">
                     <el-input
@@ -74,15 +74,17 @@
                 </td>
             </tr>
             <tr>
-                <td colspan="4">项目组人数</td><td colspan="2" v-text="wordData['member'].length"></td>
-                <td colspan="3">参与学生人数</td><td colspan="2">
+                <td colspan="4">项目组人数</td><td colspan="3" v-text="wordData['member'].length"></td>
+                <td colspan="2">参与学生人数</td><td colspan="3">
                   <el-input
-                    type="number"
+                    type="textarea"
+                    autosize
+                    resize="none"
                     placeholder="请输入学生人数"
                     v-model="wordData['student']">
                   </el-input>
                 </td>
-                <td colspan="3">预算总经费</td><td colspan="3"></td>
+                <td colspan="2">预算总经费</td><td colspan="3">{{ wordData['fund']['total'] }}元</td>
             </tr>
             <tr>
                 <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>
@@ -190,10 +192,10 @@
                 </td>
             </tr>
             <tr>
-                <td rowspan="11"><p>预</p> <p>算</p> <p>经</p> <p>费</p></td>
+                <td rowspan="14"><p>预</p> <p>算</p> <p>经</p> <p>费</p></td>
             </tr>
             <tr>
-                <td rowspan="4" style="border-left: none;">总经费</td><td rowspan="4" colspan="2" >元</td>
+                <td rowspan="4" style="border-left: none;">总经费</td><td rowspan="4" colspan="2" >{{wordData['fund']['total']}}元</td>
             </tr>
             <tr>
                 <td colspan="12" style="border-left: none;">经费月支出计划</td>
@@ -204,18 +206,127 @@
             <tr>
                 <td v-for="(item,index) in 12" :key="index+'a'" style="border-left: none;">
                   <el-input
-                    type="number"
+                    type="text"
                     autosize
                     style="width: 100%;"
                     resize="none"
-                    v-model="input">
+                    v-model.number="input">
                   </el-input>
                 </td>
             </tr>
             <tr>
-                <td colspan="4" style="border-left: none;">支出类别</td><td colspan="5">支出项目</td><td colspan="4">金额(元)</td><td colspan="2">备注</td>
+                <td colspan="4" style="border-left: none;">支出类别</td><td colspan="4">支出项目</td><td colspan="2">金额(元)</td><td colspan="5">备注</td>
+            </tr>
+            <tr>
+              <td rowspan="4" colspan="4" style="border-left: none;">直接经费</td>
+              <td colspan="4">小型仪器设备费</td>
+              <td colspan="2">
+                <el-input
+                      type="textarea"
+                      autosize
+                      resize="none"
+                      placeholder="小型仪器设备费"
+                      v-model.number="wordData['fund']['device']"
+                      @change="convertNumber('device',wordData['fund']['device'])"></el-input>
+              </td>
+              <td colspan="5">
+                项目开展所需的小型专用仪器设备、工具、配件购置或租赁费用。
+              </td>
+            </tr>
+            <tr>
+              <td colspan="4" style="border-left: none;">材料费</td>
+              <td colspan="2">
+                <el-input
+                      type="textarea"
+                      autosize
+                      resize="none"
+                      placeholder="材料费"
+                      v-model.number="wordData['fund']['Material']"
+                      @change="convertNumber('Material',wordData['fund']['Material'])"></el-input>
+              </td>
+              <td colspan="5">项目开展需消耗的各种原材料、辅助材料等低值易耗品的采购费用。</td>
+            </tr>
+            <tr>
+              <td colspan="4" style="border-left: none;">测试化验加工费</td>
+              <td colspan="2">
+                <el-input
+                      type="textarea"
+                      autosize
+                      resize="none"
+                      placeholder="测试化验加工费"
+                      v-model.number="wordData['fund']['processing']"
+                      @change="convertNumber('processing',wordData['fund']['processing'])"></el-input>
+              </td>
+              <td colspan="5">项目开展过程中支付给外单位的检验、测试、化验、计算、分析及加工费等费用。</td>
+            </tr>
+            <tr>
+              <td colspan="4" style="border-left: none;">项目协作费</td>
+              <td colspan="2">
+                <el-input
+                      type="textarea"
+                      autosize
+                      resize="none"
+                      placeholder="项目协作费"
+                      v-model.number="wordData['fund']['Collaboration']"
+                      @change="convertNumber('Collaboration',wordData['fund']['Collaboration'])"></el-input>
+              </td>
+              <td colspan="5">按合同规定支付给协作单位的费用</td>
             </tr>
-            <tr v-for="(item,index) in 5" :key="index">
+            <tr>
+              <td rowspan="4" colspan="4" style="border-left: none;">间接经费</td>
+              <td colspan="4">项目成果鉴定费</td>
+              <td colspan="2">
+                <el-input
+                      type="textarea"
+                      autosize
+                      resize="none"
+                      placeholder="项目成果鉴定费"
+                      v-model.number="wordData['fund']['APPRAISAL']"
+                      @change="convertNumber('APPRAISAL',wordData['fund']['APPRAISAL'])"></el-input>
+              </td>
+              <td colspan="5">学术会务费、评审费、鉴定费、成果集制作费等费用。</td>
+            </tr>
+            <tr>
+              <td colspan="4" style="border-left: none;">参展参赛费</td>
+              <td colspan="2">
+                <el-input
+                      type="textarea"
+                      autosize
+                      resize="none"
+                      placeholder="参展参赛费"
+                      v-model.number="wordData['fund']['entery']"
+                      @change="convertNumber('entery',wordData['fund']['entery'])"></el-input>
+              </td>
+              <td colspan="5">参加创客展会、竞赛等所需的报名费、展位费、布展费、宣传推广费及差旅费等费用。</td>
+            </tr>
+            <tr>
+              <td colspan="4" style="border-left: none;">创客交流活动费</td>
+              <td colspan="2">
+                <el-input
+                      type="textarea"
+                      autosize
+                      resize="none"
+                      placeholder="创客交流活动费"
+                      v-model.number="wordData['fund']['activities']"
+                      @change="convertNumber('activities',wordData['fund']['activities'])"></el-input>
+              </td>
+              <td colspan="5">创客交流活动中支付给校外专家的指导费、咨询费、授课费等费用。</td>
+            </tr>
+            <tr>
+              <td colspan="4" style="border-left: none;">知识产权事务费</td>
+              <td colspan="2">
+                <el-input
+                      type="textarea"
+                      autosize
+                      resize="none"
+                      placeholder="知识产权事务费"
+                      v-model.number="wordData['fund']['Transaction']"
+                      @change="convertNumber('Transaction',wordData['fund']['Transaction'])">
+                    </el-input>
+              </td>
+              <td colspan="5">论文版面费、专利及其他知识产权事务等费用。</td>
+            </tr>
+            <!-- <tr v-for="(item,index) in 5" :key="index">
                 <td colspan="4" style="border-left: none;">
                   <el-input
                         type="textarea"
@@ -250,7 +361,7 @@
                         v-model="input">
                     </el-input>
                     </td>
-            </tr>
+            </tr> -->
 
 
             <tr>
@@ -332,6 +443,7 @@
               incubate:"",//项目预期孵化、转化创业项目情况
               ImplementationPlan:"",//项目实施计划
               fund:{
+                total:0,
                 device:"",
                 Material:"",
                 processing:"",
@@ -516,6 +628,13 @@
           //     .post(this.$store.state.api+'/SelectAllType',param)
           //     .then(err,res)
           },
+          convertNumber(type,str){
+          if(typeof str=='string'){
+              this.wordData['fund'][type] = Number(str.replace(/\D/g,''));
+            }
+            this.wordData['fund']['total'] = Number(this.wordData['fund']['device'])+Number(this.wordData['fund']['Material'])+Number(this.wordData['fund']['processing'])+Number(this.wordData['fund']['Collaboration'])+Number(this.wordData['fund']['APPRAISAL'])+Number(this.wordData['fund']['entery'])+Number(this.wordData['fund']['activities'])+Number(this.wordData['fund']['Transaction'])
+
+          }
           
         },
         computed:{   //经费总合

+ 1 - 1
src/components/tool/getWord.js

@@ -186,7 +186,7 @@ function getMakerSpaceWord(wordData){
             // 将模板内容加载到 Docxtemplater 中
             const doc = new Docxtemplater().loadZip(zip);
             //处理数据
-            wordData['fund']['total'] = Number(wordData['fund']['device'])+Number(wordData['fund']['Material'])+Number(wordData['fund']['processing'])+Number(wordData['fund']['Collaboration'])+Number(wordData['fund']['APPRAISAL'])+Number(wordData['fund']['entery'])+Number(wordData['fund']['activities'])+Number(wordData['fund']['Transaction']);
+            // wordData['fund']['total'] = Number(wordData['fund']['device'])+Number(wordData['fund']['Material'])+Number(wordData['fund']['processing'])+Number(wordData['fund']['Collaboration'])+Number(wordData['fund']['APPRAISAL'])+Number(wordData['fund']['entery'])+Number(wordData['fund']['activities'])+Number(wordData['fund']['Transaction']);
             //模板数据
             let data = {
                 applicationDate:wordData['applicationDate'],

+ 2 - 3
src/views/Word.vue

@@ -5,11 +5,10 @@
          <!-- 学生项目立项 -->
         <studentProjectWord />   
 
-         <!-- 创客专项资金及项目申请表(个人创客) -->
-        <markerFundWord/>        
+  
 
          <!-- 创客专项资金及项目申请表(创客活动) -->
-        <!-- <markeractivityWord/> -->
+        <markeractivityWord/>
       </div>
      
     </div>

+ 6 - 2
src/views/test.vue

@@ -2,8 +2,10 @@
   <!-- 测试上传组件 -->
   <div v-loading="loading" id="test">
     <div class="word">
-      <!-- <MakerSpaceWord/> -->
+      <MakerSpaceWord/>
       <MakerSpaceWordShow/>
+      <!-- 创客专项资金及项目申请表(个人创客) -->
+      <markerFundWord/>        
     </div>
 
     <!-- <div>
@@ -28,11 +30,13 @@ import BeUpload from "../components/tool/beUpload.vue";
 import getExcel from "@/components/tool/getExcel";
 import MakerSpaceWord from '@/components/MakerSpaceWord.vue'
 import MakerSpaceWordShow from '@/components/MakerSpaceWordShow.vue'
+import markerFundWord from '@/components/markerFundWord.vue'
 export default {
   components: {
     BeUpload,
     MakerSpaceWord,
     MakerSpaceWordShow,
+    markerFundWord,
   },
   data() {
     return {
@@ -59,7 +63,7 @@ export default {
   justify-content: center;
 }
 .word{
-  width: 1200px;
+  width: 1600px;
   margin-left: 40px;
   height: auto;
 }