Ver código fonte

Merge branch 'master' of https://git.cocorobo.cn/CocoRoboLabs/ssti-CollegeManage

Q-ABAB 2 anos atrás
pai
commit
6ab140a6c4

+ 2 - 1
src/views/activityManage/makerActvityDetails.vue

@@ -412,6 +412,7 @@ export default {
       this.ajax.post(this.$store.state.api+"/UpdateActivity",param).then(res=>{
         if(res.data==1){
           this.$message.success("修改成功");
+          this.dialogVisible1=false
           this.getData();
         }else{
           this.$message.error("修改失败"+res.data);
@@ -549,7 +550,7 @@ export default {
         data.chapters = JSON.parse(data.chapters)
         this.tableData = data;
         console.log(this.tableData)
-        this.$message.success("获取数据成功")
+        // this.$message.success("获取数据成功")
       }).catch(err=>{
         this.$message.error(err.message)
       })

+ 1 - 0
src/views/projectApply/projectApplicationApplyMain.vue

@@ -145,6 +145,7 @@
                   type:'',  //支出类别
                   disburseProject:'',  //支出项目
                   textarea:'',  //备注
+                  isOk:''
                 },
             }
           }

+ 134 - 8
src/views/projectManage/ProjectManagement.vue

@@ -108,12 +108,42 @@
             <div class="classBlockBtn">
               <el-button type="primary" class="bt1" size="mini" @click="scheduleDetail(item.courseId)">进度详情</el-button>
               <el-button type="primary" class="bt1" size="mini" @click="fundStatus(item.courseId)">资金情况</el-button>
-              <el-button type="primary" class="bt1" size="mini" @click="finish">结项</el-button>
+              <el-button type="primary" class="bt1" size="mini" @click="finish(item.courseId,item.title)">结项</el-button>
             </div>
        
       </div>
     </div>
 <!-- 循环展示框列表结束 -->
+
+    <!-- 完结对话框开始 -->
+    <el-dialog
+      title="提示"
+      :visible.sync="endDialog"
+      width="600px"
+      class="endDialog"
+      :before-close="init">
+      <div class="addDialogLogo">LOGO</div>
+      <div class="deleteContent">"{{ tit }}"项目,是否确定完结?</div>
+      <div class="deleteContent1">活动完结报告</div>
+      <div class="download" v-if="endTable.file!=''">
+        <div>{{ endTable.file!=''&&endTable.file!=null?endTable.file.fileName:"" }}</div>
+      </div>
+      <div class="addMoneyBtn" style="margin-left: 0;" v-if="endTable.file==''||endTable.file==null">
+          <div class="jia">+</div>添加
+          <div id="upFile">
+            <beUpload @getFile="getFile" :navName="'上传文件'" :accept="accept"> </beUpload>
+          </div>
+      </div>
+      <div class="DelBtn" style="margin-left: 0;" v-if="endTable.file!=''&&endTable.file!=null">
+          <el-button type="primary" @click="endTable.file=''">删除文件</el-button>
+      </div>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="ending" class="diaBtn">确认提交</el-button>
+        <el-button @click="init" class="diaBtn">取消</el-button>
+      </div>
+    </el-dialog>
+    <!-- 完结对话框结束 -->
+
           <!-- 分页 -->
           <el-pagination
             @current-change="handleCurrentChange"
@@ -130,10 +160,17 @@
 </template>
 
 <script>
+import beUpload from '../../components/tool/beUpload'
+
     export default {
+      components:{beUpload},
       data() {
         return {
-          selectText:'',
+          accept:".doc,.docx,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document",
+          iid:'',
+          selectText:'',   //文字搜素框数据
+          endDialog:false,
+          tit:'',    //完结框项目名称
           items:[],      //项目列表数据
           table:{         // 分页数据
             total:0,
@@ -170,12 +207,38 @@
             sort:0,
             state:99,
             leader:'',
+          },
+          endTable:{
+            // Id:"",
+            // title:"",
+            file:"",
           }
         }
       },
       methods:{
+        getFile(val) {//上传文件
+          this.endTable.file = val;
+        },
+        ending(){   //完结提交
+          if(this.endTable.file=="")return this.$message.error("请上传完结报告");
+          this.ajax.post(this.$store.state.api+"/UploadProjectManageFile",{
+            uid:this.$store.state.userInfo.userid,
+            cid:this.iid,
+            file:JSON.stringify(this.endTable.file),
+          }).then(res=>{
+            if(res.data==1){
+              this.$message.success("结项成功");
+              this.endDialog = false;
+
+            }else{
+              this.$message.error("结项失败")
+            }
+            this.getData();
+          })
+          // this.endDialog=false;
+        },
         scheduleDetail(val){      //进度详情
-          console.log(val);
+          // console.log(val);
           localStorage.setItem('pid',JSON.stringify(val))
           this.$router.push(`/ProjectManagement1`)
         },
@@ -184,9 +247,13 @@
           this.$router.push(`/ProjectManagementFund1`)
         },
         init(){       //对话框重置
-          
+          this.endDialog=false
         },
-        finish(){     //结项
+        finish(val,tit){     //结项
+          // console.log(val);
+          this.iid=val
+          this.tit=tit
+          this.endDialog=true
 
         },
         handleCurrentChange(val) {   //当页数发生改变的时候调用获取列表数据请求
@@ -206,8 +273,6 @@
             page:this.table.currentPage,  //当前页
             lim:this.table.packageSize,  //限制获取几条数据
           }
-          // return console.log(param);
-          // console.log(param)
           this.ajax    
             .get(this.$store.state.api+'/SelectAllProject',param)
               .then(res=>{
@@ -248,7 +313,7 @@
     float: right;
     margin: 0px 85px 10px;
   }
-    .projectBlock{   //大框
+    .projectBlock{   //循环列表大框
       width: 100%;
       height: 560px;
       display: flex;
@@ -332,7 +397,68 @@
       }
     }
 
+  .endDialog{      //结项对话框的
+    .el-dialog__header{
+      display: flex;
+      justify-content: center;
+      box-sizing: border-box;
+    background: #32455b;
+    }
+    .el-dialog__title{
+      color:rgb(246, 247, 246);
+      display: flex;
+      font-size: 22px;
+      position: relative;
+      top: -5px;
+      justify-content: center;
+    }
+    .el-dialog{
+          width: 600px;
+          border-radius: 5px;
+          overflow: hidden;
+        }
+    .el-dialog__body{
+      box-sizing: border-box;
+      padding: 30px 20px 0 20px;
+    }
+    .deleteContent{
+      width: 100%;
+      font-size: 22px;
+      color: #000;
+      box-sizing: border-box;
+      // padding: 0 20px;
+      display: flex;
+      justify-content: center;
+    }
+    .deleteContent1{
+      width: 100%;
+      text-align: left;
+      font-size: 18px;
+      font-weight: bold;
+      color: #000;
+      margin-top: 30px;
+    }
+    .download{
+      margin: 50px 0 20px;
+      width: 100%;
+      text-align: left;
+      font-size: 16px;
+      font-weight: bold;
+      color: #5391fd;
+    }
 
+    .addDialogLogo{
+      width: 60px;
+      height: 30px;
+      line-height: 30px;
+      background: #f2f2f2;
+      position: absolute;
+      left: 10px;
+      top: 15px;
+      text-align: center;
+      // border-radius: 5px;
+    }
+  }
 
     
   }

+ 14 - 4
src/views/projectManage/ProjectManagement4.vue

@@ -118,10 +118,20 @@
                     .get(this.$store.state.api+'/GetActivityFileByProjectId',param)
                     .then(res=>{
                       console.log(res.data);
-                      let { title: f, reportFile: l } = res.data[0][0];
-                      let k= Object.assign({title:f},JSON.parse(l))
-                      this.tableData=[k]
-                      console.log(this.tableData);
+                      let k=[]
+                      res.data[0].forEach((e,i) => {
+                        let { title: f, reportFile: l } = e;
+                        k.push(Object.assign({title:f},JSON.parse(l)))
+                      });
+                      this.tableData=k
+                      // console.log(k);
+                      // if (res.data[0][0] != undefined) {
+                      //   let { title: f, reportFile: l } = res.data[0][0];
+                      //   let k= Object.assign({title:f},JSON.parse(l))
+                      //   this.tableData=[k]
+                      // }
+                      
+                      // console.log(this.tableData);
                     },err=>{
                       console.log(err);
                     })

+ 12 - 9
src/views/projectManage/ProjectManagementFund1.vue

@@ -18,7 +18,7 @@
           <div class="totalFund">
             <div class="totalFund1">
                 <div class="totalFundLabel">预算总经费</div>
-                <el-input v-model="input" placeholder="请输入内容"></el-input><span>(万)</span>
+                <el-input v-model="allFund" placeholder="请输入内容"></el-input><span>(万)</span>
             </div>
             <div class="totalFund1">
                 <div class="totalFundLabel" style="display: flex;justify-content: flex-end;">已经支出</div>
@@ -138,19 +138,19 @@
               :header-cell-style="{ background: '#f2f2f2',color:'#000' }"
               >
               <el-table-column
-                prop="sort"
+                prop="type"
                 label="支出类别"
                 align="center"
                 >
               </el-table-column>
               <el-table-column
-                prop="projectName"
+                prop="disburseProject"
                 label="支出项目"
                 align="center"
                 >
               </el-table-column>
               <el-table-column
-                prop="Fund"
+                prop="fund"
                 label="金额(元)"
                 align="center"
                 >
@@ -163,7 +163,7 @@
                 >
               </el-table-column>
               <el-table-column
-                prop="remark"
+                prop="textarea"
                 label="备注"
                 align="center"
                >
@@ -198,10 +198,10 @@
         return {
           dialogVisible1:false,
           fundDetail:false,
-    
+          allFund:'',  //总经费
 
           tableData:[],  //经费月支出经费计划
-          tableData2:[],  //
+          tableData2:[],  //经费明细
           textarea:'',
           input:'',
           value: '',
@@ -217,11 +217,14 @@
               this.ajax
                     .get(this.$store.state.api+'/GetProjectDetailMessage',param)
                     .then(res=>{
-                      // console.log(res);
+                      console.log(res);
                       let GetData=JSON.parse(res.data[0][0].chapters)
-                      console.log(GetData[1][1]);
+                      // console.log(GetData);
                       // this.data=GetData
                       this.tableData=[GetData[1][0]]
+                      this.tableData2=GetData[1][1]
+                      // console.log();
+                      this.allFund=res.data[0][0].money
                     },err=>{
                       console.log(err);
                     })

+ 4 - 4
src/views/projectManage/ProjectManagementFund2.vue

@@ -22,7 +22,7 @@
         tooltip-effect="dark"
         stripe
         class="fontSize"
-        style="height: 500px;"
+        style="height: 570px;"
         :header-cell-style="{ background: '#f2f2f2',color:'#000' }"
         @selection-change="handleSelectionChange">
         
@@ -325,9 +325,9 @@
       width: 100%;
      }
     .pmFund1Footer{   //分页
-        width: 400px;
-        float: right;
-        margin-top: 30px;
+       display: flex;
+       justify-content: flex-end;
+       margin: 20px 50px 0 0;
     }