Explorar o código

资金使用管理

yuanyiming %!s(int64=2) %!d(string=hai) anos
pai
achega
fafca64d5e

+ 35 - 26
src/views/fundManage/makerfund.vue

@@ -198,14 +198,14 @@
         <div class="diaTit1">
           <div class="spans1">使用经费</div>
           <div>
-            <el-input v-model="ProjectFundData.usedFund" disabled placeholder="6000"></el-input>
+            <el-input v-model="ProjectFundData.usedFund" disabled></el-input>
           </div>
         </div>
 
         <div class="diaTit1">
           <div class="spans1">联系电话</div>
           <div>
-            <el-input v-model="input " disabled placeholder="13854449525"></el-input>
+            <el-input v-model="ProjectFundData.phone" disabled></el-input>
           </div>
         </div>
 
@@ -226,7 +226,7 @@
         <div class="diaTit1">
           <div class="spans1">直接经费</div>
           <div>
-            <el-select v-model="input" disabled placeholder="测试化验加工费">
+            <el-select v-model="input" disabled placeholder="默认字段">
               <el-option
                 v-for="item in options"
                 :key="item.value"
@@ -266,13 +266,13 @@
             :rows="3"
             resize="none"
             style="width: 100%;"
-            placeholder="请输入内容"
+            placeholder="默认字段"
             v-model="textarea">
           </el-input>
         </div>
 
         <div slot="footer" class="dialog-footer">
-          <el-button type="primary" @click="init" class="diaBtn">审核通过</el-button>
+          <el-button type="primary" @click="auditPass" class="diaBtn">审核通过</el-button>
           <el-button @click="init" class="diaBtn">取消</el-button>
         </div>
       </el-dialog>
@@ -326,7 +326,7 @@
           </div>
         </div>
 
-        <div class="diaTit1">
+        <!-- <div class="diaTit1">
           <div class="spans1">直接经费</div>
           <div>
             <el-select v-model="value" disabled placeholder="测试化验加工费">
@@ -338,7 +338,7 @@
               </el-option>
             </el-select>
           </div>
-        </div>
+        </div> -->
 
         <div class="diaTit1">
           <div class="diaTit5">
@@ -362,7 +362,7 @@
           </div>
         </div>
         
-        <div class="diaTit1">
+        <!-- <div class="diaTit1">
           <div class="spans1" style="position: relative;top:-17px">事由</div>
           <el-input
             type="textarea"
@@ -372,7 +372,7 @@
             placeholder="请输入内容"
             v-model="textarea">
           </el-input>
-        </div>
+        </div> -->
         <hr style="margin: 40px;width: 90%;">
         <div class="diaTit1">
           <div class="spans1" style="position: relative;top:-20px">撤回意见</div>
@@ -392,7 +392,7 @@
       </el-dialog>
     </div>
     <!-- 立项撤回提交对话框结束 -->
-<!-- 删除通知开始 -->
+<!-- 完结对话框开始 -->
 <el-dialog
       title="提示"
       :visible.sync="dialogVisible1"
@@ -405,7 +405,7 @@
         <el-button @click="dialogVisible1=false"  >取消</el-button>
       </span>
     </el-dialog>
-<!-- 删除通知结束-->
+<!-- 完结对话框结束-->
 
   </div>
 </template>
@@ -474,19 +474,28 @@
         }
       },
       methods:{
-        confirmEnd(){     //确定完结
+        Audit(val){          //显示审核对话框
+          console.log(val);
+          this.ProjectFundData=val;
+          this.dialogVisible=true;
+        },
+        auditPass(){     //审核通过
+          // console.log(111);
           let param={
             uid:this.$store.state.userInfo.userid,
+            fid:this.ProjectFundData.fid
           }
+          console.log(param);
           this.ajax
-              .post(this.$store.state.api+"/",param)
+              .post(this.$store.state.api+"/UpdateMakerFundState",param)
               .then(res=>{
                   // console.log(res);
-                  this.dialogVisible1=false;
+                  this.dialogVisible=false;
                   if (res.data) {
-                      this.$message.success('已完结')
+                      this.$message.success('审核成功')
+                      this.getData()
                     }else{
-                      this.$message.error('完结失败')
+                      this.$message.error('审核失败')
                     }
               },err=>{
                 console.log(err);
@@ -495,6 +504,10 @@
         endDialogShow(){      //完结对话框显示
             this.dialogVisible1=true
         },
+        confirmEnd(){        //确定完结
+          this.dialogVisible1=false
+        },
+       
         handleCurrentChange(val) {   //当页数发生改变的时候调用获取列表数据请求
           // console.log(`当前页: ${val}`);
           this.table.currentPage=val
@@ -515,7 +528,7 @@
             this.ajax
                 .get(this.$store.state.api+'/SelectMakerFund',param)
                 .then(res=>{
-                  console.log(res.data[0]);
+                  // console.log(res.data[0]);
                   let data=res.data;
                   this.tableData=data[0];
                   this.filterSelects=data[1];
@@ -528,20 +541,16 @@
         edit(){
 
         },
-        // handleSelectionChange(val) {     //批量选择
-        //   this.multipleSelection = val;
-        // },
+        handleSelectionChange(val) {     //批量选择
+          this.multipleSelection = val;
+        },
         apply(){              //创客资金申请跳转界面
           this.$router.push('/makerfundApply')
         },
         init(){         
           this.dialogVisible=false
         },
-        Audit(val){          //显示审核对话框
-          console.log(val);
-          this.ProjectFundData=val;
-          this.dialogVisible=true;
-        },
+        
         details(Id){       //跳转详情页面
           this.$router.push(`/makerfundDetails?Id=${Id}`)
         }
@@ -561,7 +570,7 @@
         overflow: hidden;
       }
       .deleteContent{
-        margin: 30px 0;
+        // margin: 30px 0;
         font-size: 22px;
         color: #000;
       }

+ 0 - 11
src/views/fundManage/makerfundApply.vue

@@ -398,17 +398,6 @@ export default {
             ,
         }
     },
-    computed :{
-            // sum(){
-            //     // return 1+1
-            //     let addsum=[]
-            //     this.directFundBlock.forEach((e,i)=>{
-            //         // console.log( e.budget-e.usedFund);
-            //         addsum.push(e.budget-e.usedFund)
-            //     })
-            //     return addsum
-            // },
-        },
     methods:{
         delInDerData(index){                       //删除间接经费
             this.indirectFundBlock.splice(index,1)

+ 9 - 8
src/views/fundManage/makerfundDetails.vue

@@ -11,7 +11,7 @@
   <!-- 项目名称、类型开始 -->
   <div class="Apply1">
       <div class="inpInterval">项目名称</div>
-      <el-select v-model="selects.projectName"  style="width: 30%;" placeholder="请选择">
+      <el-select v-model="selects.projectName" disabled style="width: 30%;" placeholder="请选择">
           <el-option
           v-for="item in projectFilter"
           :key="item.id"
@@ -22,7 +22,7 @@
   </div>
   <div class="Apply1">
       <div class="inpInterval">项目类型</div>
-      <el-select v-model="selects.projectType" placeholder="请选择">
+      <el-select v-model="selects.projectType" disabled placeholder="请选择">
           <el-option
           v-for="item in projectType"
           :key="item.id"
@@ -430,7 +430,6 @@ export default {
               return per*1+cur.budget*1
           },0)
           let allSum=dirSum+indirSum+this.residue.budget*1
-          // console.log(allSum);
 
           let usedDirSum = this.directFundBlock.reduce((per,cur)=>{
               return per*1+cur.usedFund*1
@@ -439,12 +438,12 @@ export default {
               return per*1+cur.usedFund*1
           },0)
           let usedAllSum=usedDirSum+usedIndirSum+this.residue.usedFund*1
-          // console.log(usedAllSum);
 
 
           let param={
               uid:this.$store.state.userInfo.userid,
               cid:this.selects.projectName,
+              fid:this.$route.query['Id'],
               type:this.selects.projectType,
               dir:JSON.stringify(this.directFundBlock),
               indir:JSON.stringify(this.indirectFundBlock),
@@ -454,12 +453,12 @@ export default {
               usedSum:usedAllSum
           }
           this.ajax
-              .post(this.$store.state.api+'/insertMakerFund',param)
+              .post(this.$store.state.api+'/UpdateMakerFund',param)
               .then(res=>{
                   console.log(res);
-                  if (res.data==1) {
-                     this.$router.push('/makerfund')
-                     return this.$message.success('创建成功')
+                  if (res.data==1){
+                      this.$message.success('创建成功')
+                      return this.submitHint=false
                   }else{
                       this.$message.error('创建失败')
                   }
@@ -514,6 +513,8 @@ export default {
   },
   mounted(){
       this.getData()
+      console.log(this.$route.query['Id']);
+      
   }
 }
 </script>

+ 280 - 56
src/views/projectSettlement/projectSettlement5.vue

@@ -16,52 +16,50 @@
       </div>
 
       <!-- 上传文件以及表格开始 -->
-      <div class="ps2Inp">
-          <el-button type="primary" class="btn" size="mini">上传文件</el-button>
+      <div class="pmInp">
+          <beUpload @getFile="getFile"  :navName="'上传文件'" :accept="accept"></beUpload>
         </div>
-      <el-table
-        :data="tableData"
+      <!-- 表格部分开始 -->
+        <el-table
+        :data="file"
         tooltip-effect="dark"
         stripe
         class="fontSize"
         :header-cell-style="{ background: '#f2f2f2',color:'#000' }"
         >
         <el-table-column
-          prop="projectName"
-          label="项目结项材料"
+          prop="fileName"
+          label="项目中期报告"
           align="center"
-          >
+         >
         </el-table-column>
-
+        
         <el-table-column
           prop="size"
           label="大小"
           align="center"
           >
         </el-table-column>
-
+       
         <el-table-column
-          prop="date"
+          prop="uploadTime"
           label="时间"
           align="center"
           >
         </el-table-column>
-       
+
         <el-table-column
           prop="operation"
-          label="操作"
           align="center"
+          label="操作"
           >
           <template #default="scope">
               <div class="operations">
-                  <!-- <el-button type="primary" > -->
-                        <el-button type="primary"  size="mini" @click="edit(scope)" >详情查看</el-button>
-                  <!-- </el-button> -->
+                      <el-button type="primary"  size="mini" @click="checkFile(scope.row.url)" style="background: #477edd">明细查看</el-button>
               </div>
           </template>
         </el-table-column>
-      </el-table>
-      <!-- 上传文件以及表格结束 -->
+        </el-table>
 
       <!-- 多行文本框区域开始 -->
       <div class="PS2tabTit0">
@@ -78,7 +76,7 @@
           resize="none"
           class="textArea"
           placeholder="请输入内容"
-          v-model="textarea">
+          v-model="AllRemark.kRem">
         </el-input>
       </div>
       <div class="tabTit">
@@ -92,7 +90,7 @@
           :rows="6"
           resize="none"
           placeholder="请输入内容"
-          v-model="textarea">
+          v-model="AllRemark.xRem">
         </el-input>
       </div>
       <div class="tabTit">
@@ -106,38 +104,127 @@
           resize="none"
           class="textArea"
           placeholder="请输入内容"
-          v-model="textarea">
+          v-model="AllRemark.bRem">
         </el-input>
       </div>
       <!-- 多行文本框区域结束 -->
       <div class="baseBtn">
         <div class="blockWidth">
-          <el-button type="primary" class="backBtn" @click="$router.back()">返回</el-button>
+          <el-button type="primary" class="backBtn" @click="submitRemark">提交</el-button>
         </div>
       </div>
+
+    <!-- 提交对话框开始 -->
+    <el-dialog
+          title="提示"
+          :visible.sync="dialogVisible1"
+          width="600px"
+          class="submitDialog">
+          <div class="addDialogLogo">LOGO</div>
+          <span class="deleteContent">确定提交?</span>
+          <span slot="footer" class="dialog-footer">
+            <el-button type="primary" @click="confirmSubmit" >确认提交</el-button>
+            <el-button @click="dialogVisible1=false"  >取消</el-button>
+          </span>
+        </el-dialog>
+    <!-- 提交对话框结束-->
+    <!-- 展示文档开始 -->
+    <el-dialog
+            title="展示文件"
+            :visible.sync="showFile"
+            width="80vw"
+            class="addDialog showDialog"
+          >
+      <div class="addDialogLogo">LOGO</div>
+      <div class="showFileArea">
+        <!-- <vpdf v-if="/^\s*$/g.test(showFileUrl)&&showFileUrl.split('.')[showFileUrl.split('.').length-1]=='pdf'" :pdfUrl="showFileUrl"></vpdf> -->
+        <vword v-if="showFileType == 0" :pdfUrl="showFileUrl"></vword>
+        <vpdf v-else :pdfUrl="showFileUrl"></vpdf>
+      </div>
+    </el-dialog>
+
     </div>
   </template>
   
   <script>
+    import beUpload from '../../components/tool/beUpload'
+    import vpdf from "@/components/vpdf.vue";
+    import vword from "@/components/vword.vue";
       export default {
+        components: { beUpload, vpdf, vword },
         data() {
           return {
-            textarea:'',
-           tableData:[{
-            projectName:'创业孵化基地企业情况信息表',
-            date:'2022年11月12日',
-            size:'50k'
-            },
-            {
-              projectName:'创业孵化基地企业情况信息表',
-              size:'50k',
-              date:'2022年11月12日',
+            accept:"*",
+            dialogVisible1:false,
+            showFile:false,
+            showFileType: 0,
+            showFileUrl: "",
+            // tableData:[],
+            file:[],
+            AllRemark:{
+              kRem:'',
+              xRem:'',
+              bRem:''
             }
-            ],
-         
           }
         },
         methods:{
+          //展示文件
+          checkFile(url) {
+              // console.log(url);
+              if (
+                url.split(".")[url.split(".").length - 1].toLocaleUpperCase() == "PDF"
+              ) {
+                this.showFileUrl = url;
+                this.showFileType = 1;
+              } else {
+                this.showFileUrl =
+                  "https://view.officeapps.live.com/op/view.aspx?src=" + url;
+                this.showFileType = 0;
+              }
+              this.showFile = true;
+          },
+            confirmSubmit(){    //确定提交
+                let param={
+                  uid:this.$store.state.userInfo.userid,
+                  pid:JSON.parse(localStorage.getItem('pid')),
+                  file:JSON.stringify(this.file),
+                  remark:JSON.stringify(this.AllRemark)
+                }
+                this.ajax
+                    .post(this.$store.state.api+'/UpdateSettlementRemark',param)
+                    .then(res=>{
+                      console.log(res);
+                      this.dialogVisible1=false
+                      this.$message.success('提交成功')
+                    },err=>{
+                      console.log(err);
+                    })
+            },
+            submitRemark(){      //显示提交对话框
+              this.dialogVisible1=true;
+            },
+            getFile(val) {    //上传文件
+              this.file.push(val);
+            },
+
+            getData(){       //获取基础信息
+              let param={
+                uid:this.$store.state.userInfo.userid,
+                pid:JSON.parse(localStorage.getItem('pid')),
+              }
+              this.ajax
+                    .get(this.$store.state.api+'/SelectSettlementRemark',param)
+                    .then(res=>{
+                      console.log(res);
+                      let data=res.data[0];
+                      console.log(data);
+                      this.file=JSON.parse(data[0].endFile)
+                      this.AllRemark=JSON.parse(data[0].endProjectRemark)
+                    },err=>{
+                      console.log(err);
+                    })
+          },
           content(){
               this.$router.push('/projectSettlement1')
             },
@@ -156,45 +243,182 @@
          
             back(){
             this.$router.push('/projectSettlement')
-          },
-          // backBtn2(){
-          //   this.$router.push('/projectSettlement')
-          // },
-          handleSelectionChange(val) {
-            this.multipleSelection = val;
-          },
-         
+          },         
         },
-       
+       mounted(){
+        this.getData()
+       }
       }
   </script>
   
   <style lang="less">
   .projectSettlement2{
 
-
-    .PS2tabTit0{
-      width: 100%;
-      text-align: left;
-      margin: 20px 15px 20px 0px;
-      color: #ccc;
-      font-size: 22px;
-    }
-
-    
-    .ps2Inp{
+    .pmInp{
       width: 100%;
+      margin: 10px 0 10px 0;
       display: flex;  
       justify-content: flex-end;
-      margin: 10px 0;
       .btn{
         height: 30px;
         width: 100px;
-        background: #477edd;
-        margin-left: 10px;
         font-size: 16px;
+        background: #477edd;
+        // margin-left: 10px;
+      }
+    }
+
+    .addDialog {
+        font-size: 18px;
+        .el-dialog {
+          border-radius: 5px;
+          overflow: hidden;
+        }
+        .deleteContent {
+          width: 100%;
+          margin: 30px 0;
+          font-size: 22px;
+          color: #000;
+        }
+        .addDialogLogo {
+          width: 60px;
+          height: 30px;
+          border-radius: 5px;
+          display: flex;
+          justify-content: center;
+          line-height: 30px;
+          background: #f2f2f2;
+          position: absolute;
+          left: 20px; top: 15px; 
+        }
+        .el-dialog__header {
+          display: flex;
+          justify-content: center;
+          background: #32455b;
+        }
+        .el-dialog__title {
+          color:#fff;
+          display: flex;
+          justify-content: center;
+          font-size: 18px;
+          position: relative;
+          top: -2px;
+        }
+        .addDialogMid {
+          box-sizing: border-box;
+          padding: 0 60px 0 10px;
+          .addDialogTit {
+            display: flex;
+            span {
+              width: 80px;
+              font-size: 16px;
+              line-height: 40px;
+              text-align: left;
+            }
+          }
+          .addDialogTit1 {
+            display: flex;
+            justify-content: space-between;
+            margin-bottom: 15px;
+          }
+          .addDialogTit2 {
+            margin-top: 10px;
+            font-size: 16px;
+            color: #000;
+            text-indent: 2em;
+          }
+          .addDialogCon {
+            margin-top: 20px;
+          }
+        }
+        .dialog-footer {
+          display: flex;
+          justify-content: center;
+          box-sizing: border-box;
+          .btn5 {
+            font-size: 16px;
+          }
+        }
+      }
+
+
+    .submitDialog{
+      font-size: 18px;
+      .el-dialog{
+        border-radius: 5px;
+        overflow: hidden;
+      }
+      .deleteContent{
+        font-size: 22px;
+        color: #000;
       }
+      .el-dialog__body{
+          display: flex;
+          justify-content: center;
+        }
+      .addDialogLogo{
+        width: 60px;
+        height: 30px;
+        border-radius: 5px;
+        display: flex;
+        justify-content: center;
+        line-height: 30px;
+        background: #f2f2f2;
+        position: absolute;
+        left: 20px; top: 15px; 
+      }
+      .el-dialog__header{
+      background: #32455b;
+      }
+      .el-dialog__title{
+        color:#fff;
+        display: flex;
+        justify-content: center;
+        font-size: 18px;
+        position: relative;
+        top: -2px;
+      }
+      .addDialogMid{
+        box-sizing: border-box;
+        padding:0 60px 0 10px;
+        .addDialogTit{
+          display: flex;
+          span{
+            width: 80px;
+            font-size: 16px;
+            line-height: 40px;
+            text-align: left;
+            
+          }
+        }
+        .addDialogTit1{
+          display: flex;
+          justify-content: space-between;
+          margin-bottom: 15px;
+        }
+        .addDialogTit2{
+          margin-top: 10px;
+          font-size: 16px;
+          color: #000;
+          text-indent: 2em;
+          text-align: left;
+          line-height: 1.7em;
+        }
+        .addDialogCon{
+          margin-top: 20px;
+        }
+      }
+    }
+
+
+    .PS2tabTit0{
+      width: 100%;
+      text-align: left;
+      margin: 20px 15px 20px 0px;
+      color: #ccc;
+      font-size: 22px;
     }
+
   }
 
   </style>