Q-ABAB před 1 rokem
rodič
revize
e5fee71e75

+ 576 - 0
src/views/activityManage/components/markeractivityWord.vue

@@ -0,0 +1,576 @@
+<template>
+    <div id="MarkeractivityWord">
+        <div id="title">
+            <div class="school">深圳技师学院</div>
+            <div class="wordTitle">创客专项资金及项目申请表(创客活动)</div>
+            <div class="date">申请日期:{{wordData.applicationDate}}</div>
+        </div>
+        <table border="1" cellspacing="0" class="table">
+            <tr id="one">
+              <td colspan="4">关联项目</td>
+              <td colspan="12">
+                <el-select v-model="wordData['associatedProjects']" @change="checkProjectMoney()" style="width: 100%;" placeholder="请选择关联项目">
+                  <el-option
+                    v-for="item in ProjectData"
+                    :key="item.courseId"
+                    :label="item.title"
+                    :value="item.courseId">
+                  </el-option>
+                </el-select>
+              </td>
+            </tr>
+            <tr id="two">
+                <td colspan="4">活动名称</td>
+                <td colspan="5">
+                    <el-input
+                        type="textarea"
+                        autosize
+                        resize="none"
+                        placeholder="请输入活动名称"
+                        v-model="wordData['activityName']">
+                    </el-input>
+                </td>
+                <td colspan="3">预算经费</td>
+                <td colspan="4" v-text="total">
+                    <!-- <el-input
+                        type="textarea"
+                        autosize
+                        resize="none"
+                        placeholder="请输入预算经费"
+                        v-model="total">
+                    </el-input> -->
+                </td>
+            </tr>
+            <tr id="three">
+                <td colspan="4">项目负责人</td><td colspan="3">
+                    <el-input
+                        type="textarea"
+                        autosize
+                        resize="none"
+                        placeholder="请输入负责人"
+                        v-model="wordData['pro_leader']">
+                    </el-input>
+                </td><td colspan="2">所在部门</td><td colspan="3">
+                    <!-- <el-input
+                        type="textarea"
+                        autosize
+                        resize="none"
+                        placeholder="请输入所在部门"
+                        v-model="wordData['college']">
+                    </el-input> -->
+                    <el-select v-model="wordData['college']" style="width: 100%;" placeholder="请选择所在学院">
+                      <el-option
+                        v-for="item in DepartmentData"
+                        :key="item.id"
+                        :label="item.name"
+                        :value="item.id">
+                      </el-option>
+                    </el-select>
+                </td><td colspan="2">联系电话</td><td colspan="3">
+                    <el-input
+                        type="textarea"
+                        autosize
+                        resize="none"
+                        placeholder="请输入联系电话"
+                        v-model="wordData['tel']">
+                    </el-input>
+                </td>
+            </tr>
+            <tr id="four">
+                <td colspan="4">活动时间</td>
+                <td colspan="5">
+                  <el-date-picker
+                    v-model="wordData['activityTime']"
+                    type="daterange"
+                    value-format="yyyy-MM-dd HH:mm:ss"
+                    range-separator="至"
+                    prefix-icon="none"
+                    start-placeholder="项目起始时间"
+                    end-placeholder="项目完成时间">
+                  </el-date-picker>
+                </td>
+                <td colspan="3">参与学生人数</td><td colspan="5">
+                    <el-input
+                        type="number"
+                        autosize
+                        :min="0"
+                        style="width: 100%;"
+                        resize="none"
+                        placeholder="请输入参与学生人数"
+                        v-model.number="wordData['student']">
+                      </el-input>
+                </td>
+            </tr>
+            
+            <tr id="five">
+                <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>
+            </tr>
+            <tr v-for="(item,index) in wordData['member']" :key="index+'b'">
+                <td colspan="2" style="border-left: none;">
+                    <el-input
+                        type="textarea"
+                        autosize
+                        resize="none"
+                        placeholder="请输入姓名"
+                        v-model="item['name']">
+                    </el-input>
+                </td><td colspan="3">
+                    <el-input
+                        type="textarea"
+                        autosize
+                        resize="none"
+                        placeholder="请输入工作单位/部门"
+                        v-model="item['collage']">
+                    </el-input>
+                </td><td colspan="10">
+                    <el-input
+                        type="textarea"
+                        autosize
+                        resize="none"
+                        placeholder="请输入项目分工"
+                        v-model="item['work']">
+                    </el-input>
+                </td>
+                <div class="operate">
+                  <el-button @click="addPerson" v-if="wordData['member'].length-1==index" type="primary" size="mini">添加</el-button>
+                  <el-button @click="DelPerson(index)" type="primary" size="mini">删除</el-button>
+                </div>
+            </tr>
+            <tr class="textLeft" id="six">
+                <td colspan="2"><p>活动</p><br> <p>计划</p></td><td style="text-align: left;" colspan="15">
+                    <el-input
+                      type="textarea"
+                      :rows="12"
+                      style="width: 100%;"
+                      resize="none"
+                      v-model="wordData['activityPlan']">
+                    </el-input>
+                </td>
+            </tr>
+            <tr class="textLeft" id="seven">
+                <td colspan="2"><p>预期</p><br><p>目标</p> </td><td colspan="15" style="text-align: left;">
+                    <el-input
+                      type="textarea"
+                      :rows="10"
+                      style="width: 100%;"
+                      resize="none"
+                      v-model="wordData['expectations']">
+                    </el-input>
+                </td>
+            </tr>
+            <tr class="textLeft" id="nine">
+                <td colspan="2"><p>活动受</p><br> <p>众面</p></td><td style="text-align: left;" colspan="15">
+                    <p>参与学生范围:</p>
+                    <el-input
+                      type="textarea"
+                      :rows="12"
+                      style="width: 100%;"
+                      resize="none"
+                      v-model="wordData['eventAudience']">
+                    </el-input>
+                </td>
+            </tr>
+            <!-- <tr class="textLeft">
+                <td colspan="15" style="text-align: left;border-left: none;">
+                  <p>二、创新点</p>
+                    <el-input
+                      type="textarea"
+                      :rows="6"
+                      style="width: 100%;"
+                      resize="none"
+                      v-model="input">
+                    </el-input>
+                </td>
+            </tr> -->
+
+           
+            <tr class="textLeft" id="ten">
+                <td colspan="2"><p>经费</p><br><p>支出</p> <br><p>计划</p></td><td colspan="15" style="text-align: left;">
+                    <el-input
+                      type="textarea"
+                      :rows="10"
+                      style="width: 100%;"
+                      resize="none"
+                      v-model="wordData['fundingPlan']">
+                    </el-input>
+                </td>
+            </tr>
+            <tr>
+                <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" >{{total}}元</td>
+            </tr>
+            <tr>
+                <td colspan="12" style="border-left: none;">经费月支出计划 (元)<span style="font-weight: bold;margin-left: 40px;">剩余经费:{{ allFund }}元</span></td>
+            </tr>
+            <tr>
+              <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>
+            </tr>
+            <tr>
+                <td v-for="(item,index) in wordData['expenditureMothPlan']" :key="index" style="border-left: none;">
+                  <el-input
+                    type="number"
+                    autosize
+                    min="0"
+                    style="width: 100%;"
+                    resize="none"
+                    v-model.number="wordData['expenditureMothPlan'][index]"
+                    @input="checkExpenditureMothPlan(index)">
+                  </el-input>
+                </td>
+            </tr>
+            <tr>
+                <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="number"
+                      autosize
+                      resize="none"
+                      placeholder="小型仪器设备费"
+                      v-model.number="wordData['fund']['device']"
+                      @change="checkProjectFund('device')"
+                      ></el-input>
+              </td>
+              <td colspan="5">
+                项目开展所需的小型专用仪器设备、工具、配件购置或租赁费用。
+              </td>
+            </tr>
+            <tr>
+              <td colspan="4" style="border-left: none;">材料费</td>
+              <td colspan="2">
+                <el-input
+                      type="number"
+                      autosize
+                      resize="none"
+                      placeholder="材料费"
+                      v-model.number="wordData['fund']['Material']"
+                      @change="checkProjectFund('Material')"></el-input>
+              </td>
+              <td colspan="5">项目开展需消耗的各种原材料、辅助材料等低值易耗品的采购费用。</td>
+            </tr>
+            <tr>
+              <td colspan="4" style="border-left: none;">测试化验加工费</td>
+              <td colspan="2">
+                <el-input
+                      type="number"
+                      autosize
+                      resize="none"
+                      placeholder="测试化验加工费"
+                      @change="checkProjectFund('processing')"
+                      v-model.number="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="number"
+                      autosize
+                      resize="none"
+                      placeholder="项目协作费"
+                      @change="checkProjectFund('Collaboration')"
+                      v-model.number="wordData['fund']['Collaboration']"></el-input>
+              </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="number"
+                      autosize
+                      resize="none"
+                      placeholder="项目成果鉴定费"
+                      @change="checkProjectFund('APPRAISAL')"
+                      v-model.number="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="number"
+                      autosize
+                      resize="none"
+                      placeholder="参展参赛费"
+                      @change="checkProjectFund('entery')"
+                      v-model.number="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="number"
+                      autosize
+                      resize="none"
+                      placeholder="创客交流活动费"
+                      @change="checkProjectFund('activities')"
+                      v-model.number="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="number"
+                      autosize
+                      resize="none"
+                      placeholder="知识产权事务费"
+                      @change="checkProjectFund('Transaction')"
+                      v-model.number="wordData['fund']['Transaction']">
+                    </el-input>
+              </td>
+              <td colspan="5">论文版面费、专利及其他知识产权事务等费用。</td>
+            </tr>
+
+            <tr class="textLeft">
+                <td><p>所在部</p> <p>门意见</p></td><td colspan="15" style="height: 200px;">
+                 
+                    <div style="text-align: right;font-size: 18px;width: 80%;margin-bottom: 20px;">负责人签章:</div>
+                    <div style="text-align: right;font-size: 18px;width: 90%;">年&nbsp;&nbsp;&nbsp; 月 &nbsp;&nbsp;&nbsp;日</div>
+                </td>
+            </tr>
+            <tr>
+                <td v-for="(item,index) in 16" :key="index+'c'" style="border: none;"></td>
+            </tr>
+        </table>
+          <div class="notes">
+            <span>备注:</span>
+            <span>如表格不够可顺延或另附页。</span>
+            <!-- <div style="width: 300px;margin: 20px auto;display: flex;justify-content: space-between;">
+                <el-button @click="applyButton" style="width: 120px;margin: 20px auto;"  type="primary">提交活动</el-button>
+                <el-button style="width: 120px;margin: 20px auto;" type="primary">下载表单</el-button>
+            </div> -->
+          </div>
+    </div>
+    </template>
+      
+    <script>
+    
+      export default {
+        props:['wordData','total'],
+        data() {
+          return {
+            allFund:0,
+            DepartmentData:[],
+            ProjectData:[],
+            }
+        },
+        methods: {
+          getText(value) {     //电话验证
+              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变量中
+              let result = verify.test(value.trim()); //判断输入框内容是否符合 正则表达式
+              if(!result) return this.$message.error('请输入正确联系号码格式')
+          },
+          addPerson(){   //添加学生
+            this.wordData['member'].push({name:"",collage:"",work:""});
+          },
+          DelPerson(index){   //删除学生
+            this.wordData['member'].splice(index,1)
+          },
+          getProjectDepartmentData(){  //获取项目立项申请基础信息页面所在部门数据
+            this.ajax.get(this.$store.state.api+'/SelectAllDepartment',{
+              uid:this.$store.state.userInfo.userid
+            }).then(res=>{
+              this.DepartmentData = res.data[0]
+            },err=>{
+              console.log(err);
+            })
+          },
+          getProjectData(){//获取未完结的项目
+            this.ajax.get(this.$store.state.api+"/GetAllProjectName",{
+                uid:this.$store.state.userInfo.userid,
+            }).then(res=>{
+                this.ProjectData = res.data[0].filter(item=>item.isupload!=3 && item.isupload!=4 );
+            }).catch(err=>{
+                this.$message.error(err.message)
+            })
+          },
+          checkProjectFund(index){
+            if(this.wordData['associatedProjects']==''){
+              for(let i in this.wordData['fund'])this.wordData['fund'][i]='';
+              return this.$message.error("请先选择关联项目");
+            }
+            if(this.total>this.allFund){
+              this.wordData['fund'][index]=0;
+              return this.$message.error("活动总经费不能超过项目剩余总预算")
+            }
+          },
+          checkExpenditureMothPlan(index){
+            let count = 0;
+            this.wordData['expenditureMothPlan'].forEach(item=>count+=Number(item))
+            if(count>this.total){
+              this.$message.error("总经费月支出计划不能大于总经费");
+              this.wordData['expenditureMothPlan'][index]=0;
+            }
+          },
+          checkProjectMoney(){
+            this.wordData['expenditureMothPlan'] = ['','','','','','','','','','','',''];
+            this.wordData['fund'] = {
+                total:0,
+                device:"",
+                Material:"",
+                processing:"",
+                Collaboration:"",
+                APPRAISAL:"",
+                entery:"",
+                activities:"",
+                Transaction:"",
+              }
+              this.getProjectFund();
+          },
+          getProjectFund(){
+            this.ajax.get(this.$store.state.api+"/getProjectFund",{
+              uid:this.$store.state.userInfo.userid,
+              pid:this.wordData['associatedProjects'],
+            }).then(result=>{
+              console.log(result)
+              let total = Number(result['data'][0][0]['fund']);
+              let isUse = 0;
+              result['data'][1].forEach(item=>isUse+=Number(item['money']))
+              this.allFund = total -isUse;
+
+            }).catch(err=>{
+              console.log(err)
+            })
+          }
+        },
+        
+        computed:{   //经费总合
+
+        },
+        mounted(){
+          this.getProjectDepartmentData();
+          this.getProjectData();
+        }
+      };
+    </script>
+      
+    <style lang="less" scoped>
+
+    
+    #MarkeractivityWord{
+        width: 100%;
+        display: flex;
+        flex-direction: column;
+        align-items: center;
+        background-color: #ffff;
+        margin: 0;
+        padding: 40px 100px;
+        box-sizing:border-box;
+        #title{
+            width: 100%;
+            display: flex;
+            flex-direction: column;
+            align-items: center;
+            position: relative;
+            // margin-top: 40px;
+            .school{
+                font-size: 2.5em;
+                font-weight: 500;
+                letter-spacing: 20px;
+            }
+            .wordTitle{
+                font-size: 2em;
+                letter-spacing: .15em;
+                margin-bottom:40px ;
+            }
+            .date{
+    
+                font-size: 1em;
+                position: absolute;
+                bottom: 0;
+                right: 100px;
+                font-weight: bold;
+            }
+        }
+        .table{
+            border: none;
+            border-top: solid 1px black;
+           
+            tr{
+              position: relative;
+            td{
+              border: none;
+              border-bottom: solid 1px black;
+              border-right: solid 1px black;
+              height: 50px;
+              text-align: center;
+              line-height: 30px;
+              width: 80px;
+              &:nth-child(1){
+                border-left:  solid 1px black;
+              }
+              p{
+                font-weight: 600;
+              }
+              :deep(.el-select .el-input .el-select__caret){
+                display: none;
+              }
+              :deep(.el-textarea__inner){
+                // padding: 0;
+                border: none ;
+                border-radius: 0px;
+                text-align: center;
+                font-size: 16px;
+              }
+              :deep(.el-input__inner){
+                border: none ;
+                &::-webkit-outer-spin-button,&::-webkit-inner-spin-button{
+                  -webkit-appearance: none !important;
+                }
+                &[type='number'] {
+                  -moz-appearance: textfield;
+                }
+                
+                border-radius: 0px;
+                text-align: center;
+                font-size: 16px;
+              }
+
+            }
+          }
+            .textLeft{
+              :deep(.el-textarea__inner){
+                // padding: 0;
+                border: none ;
+                border-radius: 0px;
+                text-align: left !important;
+                font-size: 16px;
+              }
+            }
+          }
+        .notes{
+          width: 100%;
+          display: flex;
+          flex-direction:column;
+        }
+    }
+    .operate{
+        right:-85px;
+        width:85px;
+        height: 50px;
+        display:flex;
+        justify-content:space-between;
+        align-items:center;
+        position:absolute;
+        .el-button{
+          max-width:10px;
+          display:flex;
+          justify-content:center;
+          align-items:center;
+          margin-left:10px;
+        }
+    }
+    </style>

+ 10 - 5
src/views/activityManage/makerActvity.vue

@@ -70,7 +70,12 @@
         class="fontSize"
         :header-cell-style="{ background: '#f2f2f2',color:'#000' }"
         >
-        
+        <el-table-column
+          prop="ActivityNo"
+          label="活动编号"
+          align="center"
+          min-width="7%">
+        </el-table-column>
         <el-table-column
           prop="title"
           label="活动名称"
@@ -124,7 +129,7 @@
         </el-table-column>
         <el-table-column
           prop="operation"
-          width="460"
+          width="400"
           align="center"
           label="操作"
           >
@@ -141,7 +146,7 @@
                         <el-button type="primary" disabled v-show="scope.row.state!=2 && scope.row.state!=1" class="disa" size="mini">管审核</el-button>
 
                         
-                        <el-button type="primary"  size="mini" @click="edit(scope.row.acId)">申请表</el-button>
+                        <!-- <el-button type="primary"  size="mini" @click="edit(scope.row.acId)">申请表</el-button> -->
 
                         <el-button type="primary" v-show="scope.row.state!=2 && scope.row.state!=3" class="disa" size="mini" @click="end(scope.row)" >完结</el-button>
                         <el-button type="primary" v-show="scope.row.state==2" size="mini" @click="end(scope.row)" >完结</el-button>
@@ -571,8 +576,8 @@ import { ActivityWord } from '@/components/tool/getWord';
         GetTime(data){
           let cdata = JSON.parse(data);
           if(cdata[0]==cdata[1])return cdata[0];
-          let sp1 = cdata[0].split('-')
-          let sp2  =cdata[1].split('-')
+          let sp1 = cdata[0].split(' ')[0].split('-')
+          let sp2 = cdata[1].split(' ')[0].split('-')
           if(sp1[0]==sp2[0]){
             if(sp1[1]==sp2[1]){
               return `${sp1[0]}-${sp1[1]}-${sp1[2]} 至 ${sp2[2]}`

+ 208 - 43
src/views/activityManage/newMarkerActivity.vue

@@ -1,67 +1,232 @@
 <template>
     <!-- 测试上传组件 -->
-    <div v-loading="loading" id="test">
-      <div id="word">
-         <!-- 学生项目立项 -->
-        <!-- <studentProjectWord />    -->
-
-  
-
-         <!-- 创客专项资金及项目申请表(创客活动) -->
-        <markeractivityWord/>
+    <div v-loading="loading" id="MakerActivityWord">
+      <div class="pAHeader">
+        <div class="pAHeader1">创客活动申请</div>
       </div>
-     
+      <hr>
+         <!-- 创客专项资金及项目申请表(创客活动) -->
+        <markeractivityWord :wordData="wordData" :total="total"/>
+        <el-button type="primary" @click="test">提交项目</el-button>
+        <el-dialog
+          title="提示"
+          :visible.sync="submitHint"
+          width="600px"
+          class="pageSubmitData">
+          <div class="addDialogLogo">LOGO</div>
+          <div class="deleteContent">确定提交“{{wordData['activityName']}}”创客活动?</div>
+          <span slot="footer" class="dialog-footer">
+            <el-button type="primary" @click="applyActivity" class="AllDialogBtn">确认提交</el-button>
+            <el-button @click="submitHint=false" class="AllDialogBtn">取消</el-button>
+          </span>
+        </el-dialog>
     </div>
   </template>
   
   <script>
-  // import MakerSpaceWord from '../components/MakerSpaceWord.vue'
-  import BeUpload from "@/components/tool/beUpload.vue";
-  import getExcel from "@/components/tool/getExcel";
-  import studentProjectWord from '@/components/studentProjectWord.vue'
-  import markerFundWord from '@/components/markerFundWord.vue';
-  import markeractivityWord from '@/components/markeractivityWord.vue';
+  import markeractivityWord from './components/markeractivityWord.vue';
+  import {getNowDate} from '@/components/tool/Date.js'
+  import getProjectNo from '@/components/tool/getProjectNo';
   export default {
     components: {
-      BeUpload,
-      studentProjectWord,
-      markerFundWord,
       markeractivityWord
     },
     data() {
       return {
-        accept: "*",
         loading:false,
-
+        submitHint:false,
+        wordData:{
+          applicationDate:getNowDate(1),//申请日期
+          associatedProjects:"",//关联项目
+          activityName:'',//项目名称
+          pro_leader:"",//活动负责人
+          college: '',//所在学院
+          tel:'',//联系电话
+          activityTime:"",//活动时间
+          student:0,//参与学生人数
+          member:[
+            {name:"",collage:"",work:""},
+            {name:"",collage:"",work:""},
+            {name:"",collage:"",work:""},
+            {name:"",collage:"",work:""},
+            {name:"",collage:"",work:""},
+          ],
+          activityPlan:"",//活动计划
+          expectations:"",//预期目标
+          eventAudience:"",//活动受众面
+          fundingPlan:"",//经费支出计划
+          expenditureMothPlan:['','','','','','','','','','','',''],
+          fund:{
+            device:"",
+            Material:"",
+            processing:"",
+            Collaboration:"",
+            APPRAISAL:"",
+            entery:"",
+            activities:"",
+            Transaction:"",
+          },//预算经费
+        }
       };
     },
+    computed:{
+      total() {
+            let num = 0;
+            for(let i in this.wordData['fund'])num += Number(this.wordData['fund'][i]);
+            return num;
+            // 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
+          }
+    },
     methods: {
-      getFile(val) {
-        console.log(val);
+      test(){
+          const cEmpty = /^\s*$/g;
+          const checkPhone = /^(?:(?:\+|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变量中
+          for(let i in this.wordData){
+            switch(i){
+              case "associatedProjects":
+                if(cEmpty.test(this.wordData[i])){
+                  this.$message.error("请选择关联项目")
+                  document.querySelector('#one').scrollIntoView({ behavior: "smooth" });
+                  return false;
+                }
+                break;
+              case "activityName":
+                if(cEmpty.test(this.wordData[i])){
+                  this.$message.error("请输入活动名称")
+                  document.querySelector('#two').scrollIntoView({ behavior: "smooth" });
+                  return false;
+                }
+                break;
+              case "pro_leader":
+                if(cEmpty.test(this.wordData[i])){
+                  this.$message.error("请输入活动负责人")
+                  document.querySelector('#three').scrollIntoView({ behavior: "smooth" });
+                  return false;
+                }
+                break;
+              case "college":
+                if(cEmpty.test(this.wordData[i])){
+                  this.$message.error("请选择所在学院")
+                  document.querySelector('#three').scrollIntoView({ behavior: "smooth" });
+                  return false;;
+                }
+                break;
+              case "tel":
+                if(cEmpty.test(this.wordData[i])){
+                  this.$message.error("请输入联系电话")
+                  document.querySelector('#three').scrollIntoView({ behavior: "smooth" });
+                  return false;
+                }else if(!checkPhone.test(this.wordData[i])){
+                  this.$message.error("请输入正确的手机号");
+                  document.querySelector('#three').scrollIntoView({ behavior: "smooth" });
+                  return false;
+                }
+                break;
+              case "activityTime":
+                if(cEmpty.test(this.wordData[i][0])){
+                  this.$message.error("请选择活动时间")
+                  document.querySelector('#four').scrollIntoView({ behavior: "smooth" });
+                  return false;;
+                }
+                break;
+              case "member":
+                  let num = 0;
+                  this.wordData[i].forEach(item=>{
+                    for(let j in item){
+                      if(cEmpty.test(item[j])){
+                        num++;
+                      }
+                    }
+                  
+                  })
+                  if(num>0){
+                    this.$message.error("请填完指导老师信息");
+                    document.querySelector('#five').scrollIntoView({ behavior: "smooth" });
+                    return false;
+                  }
+                break;
+              case "activityPlan":
+                if(cEmpty.test(this.wordData[i][0])){
+                  this.$message.error("请输入活动计划");
+                  document.querySelector('#six').scrollIntoView({ behavior: "smooth" });
+                  return false;
+                }
+                break;
+              case "expectations":
+                if(cEmpty.test(this.wordData[i][0])){
+                  this.$message.error("预期目标");
+                  document.querySelector('#seven').scrollIntoView({ behavior: "smooth" });
+                  return false;
+                }
+                break;
+              case "eventAudience":
+                if(cEmpty.test(this.wordData[i][0])){
+                  this.$message.error("活动受众面")
+                  document.querySelector('#nine').scrollIntoView({ behavior: "smooth" });
+                  return false;
+                }
+                break;
+              case "fundingPlan":
+                if(cEmpty.test(this.wordData[i][0])){
+                  this.$message.error("经费支出计划")
+                  document.querySelector('#ten').scrollIntoView({ behavior: "smooth" });
+                  return false;
+                }
+                break;
+            }
+          }
+          this.submitHint = true;
+      },
+      applyActivity(){
+        getProjectNo("HD").then(result=>{
+          let pram = {
+            uid:this.$store.state.userInfo.userid,//用户ID
+            aNo:result,//活动编号
+            tit:this.wordData['activityName'],//活动名称
+            courseId:this.wordData['associatedProjects'],//关联项目ID
+            pLeader:this.wordData['pro_leader'],//活动负责人
+            mon:this.total,//预算经费
+            st:this.wordData['student'],//参与学生人数
+            ct:JSON.stringify(this.wordData['member']),//活动指导老师
+            chp:JSON.stringify({
+              activityPlan:this.wordData['activityName'],//活动计划
+              expectations:this.wordData['expectations'],//预期目标
+              eventAudience:this.wordData['eventAudience'],//活动受众面
+              fundingPlan:this.wordData['fundingPlan'],//经费支出计划
+            }),//活动信息
+            cid:this.wordData['college'],//学院ID,
+            ph:this.wordData['tel'],//联系电话
+            beg:JSON.stringify(this.wordData['activityTime']),//活动时间
+            f:JSON.stringify(this.wordData['fund']),//预算经费明细
+            appltTime:this.wordData['applicationDate'],//申请日期
+            mp:JSON.stringify(this.wordData['expenditureMothPlan']),
+            t:0,//活动分类 0 创客活动
+          }
+
+          console.log(pram)
+          this.ajax.post(this.$store.state.api+'/ActivityApply',pram).then(result=>{
+            if(result['data']==1){
+              this.$message.success("活动提交成功");
+              this.$router.push('/makerActvity');
+            }else{
+              this.$message.error("活动提交失败")
+            }
+          }).catch(err=>{
+            console.log(err)
+          })
+        })
+
+
       },
-      Excel(){
-        getExcel("数据")
-      }
     },
   };
   </script>
   
   <style lang="less" scoped>
-  #test{
-    // width: 100vw;
-    display: flex;
-    justify-content: center;
-  }
-  #word{
-    width: 1550px;
-    height: auto;
-  }
-    //去除input number样式
-  input::-webkit-outer-spin-button,
-    input::-webkit-inner-spin-button {
-    -webkit-appearance: none;
-  }
-  input[type="number"]{
-      -moz-appearance: textfield;
-  }
+#MakerActivityWord{
+  width:100%;
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+}
   </style>

+ 3 - 3
src/views/projectApply/projectApplication.vue

@@ -102,7 +102,7 @@
           prop="ProjectNo"
           label="项目编号"
           align="center"
-          min-width="11%">
+          min-width="9%">
         </el-table-column>
         <el-table-column
           prop="title"
@@ -145,7 +145,7 @@
           prop="startTime"
           align="center"
           label="开始时间"
-          min-width="11%">
+          min-width="9%">
         </el-table-column>
         <el-table-column
           prop="phone"
@@ -179,7 +179,7 @@
         </el-table-column>
         <el-table-column
           prop="operation"
-          width="550"
+          width="500"
           align="center"
           label="操作"
           >