Ver código fonte

h5三公费用07121023

liuhj 9 meses atrás
pai
commit
af160cd3ff
3 arquivos alterados com 71 adições e 12 exclusões
  1. BIN
      src/assets/Pdf.png
  2. 71 11
      src/components/Sankunginfo.vue
  3. 0 1
      src/components/expenseMobile.vue

BIN
src/assets/Pdf.png


+ 71 - 11
src/components/Sankunginfo.vue

@@ -4,11 +4,19 @@
             <div class="Sankunginfo-title">三公费用明细</div>
         </div>
         <div class="Sankunginfo-box">
-            <div class="Sankunginfo-btn">
+            <!-- <div class="Sankunginfo-btn">
                 <el-button @click="thislink" size="mini" type="primary">确认</el-button>
-            </div>
-            <iframe v-if="iframeft" style="border:none" :src='src' width="100%" :height="heights"></iframe>
+            </div> -->
+            <!-- <iframe v-if="iframeft" style="border:none" :src='src' width="100%" :height="heights"></iframe> -->
             <!-- <msgChild :style="returnheights" :src='src' :height='heights'></msgChild> -->
+            <div class="Sankunginfo-box-img">
+                <img src="../assets/Pdf.png"/>
+                <div class="Sankunginfo-img-title">{{fileName}}</div>
+            </div>
+            <div class="Sankunginfo-box-btn">
+                <el-button @click="thislink" size="small" type="primary">预览</el-button>
+                <el-button @click="PostEnterExitCostIsConfirm" size="mini" type="primary">确认</el-button>
+            </div>
         </div>
     </div>
 </template>
@@ -30,12 +38,42 @@ export default {
         }
     },
     methods:{
+        //预览
         thislink(){
             this.iframeft=true;
-            this.src="http://132.232.92.186:24/Office/Word/EnterExitCost/File/"+this.fileName
-            // window.open("http://132.232.92.186:24/Office/Word/EnterExitCost/File/"+this.fileName)
+            // this.src="http://132.232.92.186:24/Office/Word/EnterExitCost/File/"+this.fileName
+            window.open("http://132.232.92.186:24/Office/Word/EnterExitCost/File/"+this.fileName)
             // this.$router.push({path: "http://132.232.92.186:24/Office/Word/EnterExitCost/File/"+this.fileName});
         },
+        //获取基础数据
+        PostEnterExitCostIsConfirm(){
+            var url = "/api/Groups/PostEnterExitCostIsConfirm"
+            var that = this
+            this.$axios({
+                method: 'post',
+                url: url,
+                headers: {
+                    Authorization: 'Bearer ' + that.token
+                },
+                data:{
+                    type:2,
+                    id:that.id
+                }
+            }).then(function (res) {
+                if(res.data.code==200){
+                    that.$message({
+                        message: res.data.msg,
+                        type: 'success',
+                        offset: 50
+                    });
+                }else{
+                    that.$message({
+                        message: res.data.msg,
+                        type: 'warning'
+                    });
+                }
+            })
+        },
         returnheights(){
             return 'height: '+ this.heights+' ;'
         }
@@ -45,14 +83,11 @@ export default {
         this.heights=clientHeight-95;
         this.fileName = this.$route.query.fileName;
         this.id = this.$route.query.sign;
-        this.src="http://132.232.92.186:24/Office/Word/EnterExitCost/File/"+this.fileName
+        this.src="http://132.232.92.186:24/Office/Word/EnterExitCost/File/"+this.fileName;
     },
     mounted(){
-        // let clientHeight=document.documentElement.clientHeight || document.body.clientHeight;
-        // this.heights=clientHeight;
-        // this.fileName = this.$route.query.fileName;
-        // this.id = this.$route.query.sign;
-        // this.src="http://132.232.92.186:24/Office/Word/EnterExitCost/File/"+this.fileName;
+        document.getElementsByClassName('Sankunginfo-box')[0].style.height=this.heights+'px';
+
     }
 }
 </script>
@@ -84,4 +119,29 @@ export default {
     text-align: right;
     margin: 10px 0;
 }
+.Sankunginfo-box-img{
+    text-align: center;
+    display: flex;
+    flex-direction: column;
+    align-items: center;
+}
+.Sankunginfo-img-title{
+    color: #555;
+    margin-top: 10px;
+    width: 60%;
+    overflow:hidden;
+    white-space: nowrap;
+    text-overflow: ellipsis;
+    -o-text-overflow:ellipsis;
+}
+.Sankunginfo-box-btn{
+    margin-top: 10px;
+    text-align: center;
+}
+.Sankunginfo-box{
+    display: flex;
+    flex-direction: column;
+    align-items: center;
+    justify-content: center;
+}
 </style>

+ 0 - 1
src/components/expenseMobile.vue

@@ -337,7 +337,6 @@ export default {
 .expenseMobile-all{
     background-color: #fff;
     color: #555;
-    
 }
 .expenseMobile-all .el-dialog__header{
     display: none;