Browse Source

Merge branch 'master' of http://132.232.92.186:3000/XinXiBu/oa-system

yuanrf 11 months ago
parent
commit
94b08a2519

+ 3 - 2
src/components/Finance/Cost.vue

@@ -8,8 +8,9 @@
                   <el-table-column property="itin" label="ITIN"></el-table-column>
                 </el-table>
                 <div class="btn-dialog-cost">
-                    <el-button @click="confirmationTP" size="small" type="primary">行程确认</el-button>
-                    <el-button @click="dialogTableVisible=false" size="small">取消</el-button>
+                    <el-button @click="confirmationTP" size="small" type="primary">采用机票同事的行程数据</el-button>
+                    &nbsp;&nbsp;&nbsp;
+                    <el-button @click="dialogTableVisible=false" size="small">采用现有的自定义数据</el-button>
                 </div>
               </el-dialog>
             <div class="cost-haed">

+ 6 - 6
src/components/OP/AirTicketRes.vue

@@ -44,12 +44,12 @@
                         <span v-for="(items,index) in item.data.airFeeData" :key="index">&nbsp;&nbsp;&nbsp;{{items.airType}}:{{townum(items.airDRCB)}}元/人&nbsp;&nbsp;&nbsp;{{items.airNum}}人&nbsp;&nbsp;&nbsp;共:{{townum(items.airZCB)}}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
                         <el-popover
                         placement="right"
-                        width="452"
+                        width="552"
                         trigger="hover">
-                        <el-table border :data="item.data.airInitData">
+                        <el-table max-height="800" border :data="item.data.airInitData">
                             <el-table-column width="150" property="date" label="DATE"></el-table-column>
                             <!-- <el-table-column width="100" property="name" label="姓名"></el-table-column> -->
-                            <el-table-column width="300" property="itinerary" label="ITIN"></el-table-column>
+                            <el-table-column width="400" property="itinerary" label="ITIN"></el-table-column>
                         </el-table>
                         <!-- <el-button slot="reference">click 激活</el-button> -->
                         <span slot="reference" style="cursor: pointer;">"移上查看详细"</span>
@@ -61,12 +61,12 @@
                         <span v-for="(items,index) in item.data.airFeeData" :key="index">{{items.airType}}:{{townum(items.airDRCB)}}元/人&nbsp;&nbsp;&nbsp;{{items.airNum}}人&nbsp;&nbsp;&nbsp;共:{{townum(items.airZCB)}}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
                         <el-popover
                         placement="right"
-                        width="452"
+                        width="552"
                         trigger="hover">
-                        <el-table border :data="item.data.airInitData">
+                        <el-table max-height="800" border :data="item.data.airInitData">
                             <el-table-column width="150" property="date" label="DATE"></el-table-column>
                             <!-- <el-table-column width="100" property="name" label="姓名"></el-table-column> -->
-                            <el-table-column width="300" property="itinerary" label="ITIN"></el-table-column>
+                            <el-table-column width="400" property="itinerary" label="ITIN"></el-table-column>
                         </el-table>
                         <!-- <el-button slot="reference">click 激活</el-button> -->
                         <span slot="reference" style="cursor: pointer;">"移上查看详细"</span>

+ 69 - 35
src/components/OP/OCRIdentify.vue

@@ -1,5 +1,5 @@
 <template>
-    <div class="ocr-all">
+    <div class="ocr-all" v-loading.fullscreen.lock="fullscreenLoading" element-loading-text="识别中">
         <div style="color: #606266;font-size: 15px;font-weight: 600;">PS:选择图片后,点击要需要识别类型!</div>
         <div class="ocr-box">
             <el-upload
@@ -80,7 +80,8 @@ export default {
         dialogVisible: false,
         disabled: false,
         panduan:"",
-        picBase64:''
+        picBase64:'',
+        fullscreenLoading:false,
   	}
 	},
     methods: {
@@ -129,29 +130,24 @@ export default {
                 let imgResult = ''
                 reader.readAsDataURL(file)
                 reader.onload = function () {
-                imgResult = reader.result
+                    imgResult = reader.result
                 }
-                3
-
-
-
-
-
-                
                 reader.onerror = function (error) {
-                reject(error)
+                    reject(error)
                 }
                 reader.onloadend = function () {
-                resolve(imgResult)
+                    resolve(imgResult)
                 }
             })
         },
         //身份证人像面
         IDcardR(){
+
+            
+            this.fullscreenLoading = true;
             var url="/api/TencentOCR/GetIDCard"
             var that=this
             if(that.panduan){
-                that.fullscreenLoading = true;
                 this.$axios({
                     method: 'post',
                     url:url,
@@ -172,8 +168,10 @@ export default {
                             message: res.data.msg,
                             type: 'success'
                         });           
-                        // window.open(res.data.data.downUrl)
+                        that.fullscreenLoading = false;
+                        window.open(res.data.data.url)
                     }else{
+                        that.fullscreenLoading = false;
                         that.$message({
                             message: res.data.msg,
                             type: 'warning'
@@ -181,11 +179,13 @@ export default {
                     }
                 })
             }else{
+                that.fullscreenLoading = false;
                 this.$message.error('请检查图片是否为此类型!');
             }
         },
         //身份证国徽面
         IDcardG(){
+            this.fullscreenLoading = true;
             var url="/api/TencentOCR/GetIDCard"
             var that=this
             if(that.panduan){
@@ -208,9 +208,11 @@ export default {
                         that.$message({
                             message: res.data.msg,
                             type: 'success'
-                        });           
-                        // window.open(res.data.data.downUrl)
+                        });   
+                        that.fullscreenLoading = false;        
+                        window.open(res.data.data.url)
                     }else{
+                        that.fullscreenLoading = false;
                         that.$message({
                             message: res.data.msg,
                             type: 'warning'
@@ -218,11 +220,13 @@ export default {
                     }
                 })
             }else{
+                that.fullscreenLoading = false;
                 this.$message.error('请检查图片是否为此类型!');
             }
         },
         //营业执照
         license(){
+            this.fullscreenLoading=true;
             var url="/api/TencentOCR/GetBizLicenseOCR"
             var that=this
             if(that.panduan){
@@ -238,13 +242,14 @@ export default {
                     }
                 }).then(function(res){
                     if(res.data.code==200){       
-                        console.log(res)
                         that.$message({
                             message: res.data.msg,
                             type: 'success'
                         });           
-                        // window.open(res.data.data.downUrl)
+                        that.fullscreenLoading=false;
+                        window.open(res.data.data.url)
                     }else{
+                        that.fullscreenLoading=false;
                         that.$message({
                             message: res.data.msg,
                             type: 'warning'
@@ -252,11 +257,13 @@ export default {
                     }
                 })
             }else{
+                that.fullscreenLoading = false;
                 this.$message.error('请检查图片是否为此类型!');
             }
         },
         //统一信用代码
         creditCode(){
+            this.fullscreenLoading = true;
             var url="/api/TencentOCR/GetOrgCodeCertOCR"
             var that=this
             if(that.panduan){
@@ -276,9 +283,11 @@ export default {
                         that.$message({
                             message: res.data.msg,
                             type: 'success'
-                        });           
-                        window.open(res.data.data.downUrl)
+                        });         
+                        that.fullscreenLoading = false;  
+                        window.open(res.data.data.url)
                     }else{
+                        that.fullscreenLoading = false;
                         that.$message({
                             message: res.data.msg,
                             type: 'warning'
@@ -286,11 +295,13 @@ export default {
                     }
                 })
             }else{
+                that.fullscreenLoading = false;
                 this.$message.error('请检查图片是否为此类型!');
             }
         },
         //行驶证
         driving(){
+            this.fullscreenLoading = true;
             var url="/api/TencentOCR/GetVehicleLicense"
             var that=this
             if(that.panduan){
@@ -311,9 +322,11 @@ export default {
                         that.$message({
                             message: res.data.msg,
                             type: 'success'
-                        });           
-                        // window.open(res.data.data.downUrl)
+                        }); 
+                        that.fullscreenLoading = false;          
+                        window.open(res.data.data.url)
                     }else{
+                        that.fullscreenLoading = false;
                         that.$message({
                             message: res.data.msg,
                             type: 'warning'
@@ -321,11 +334,13 @@ export default {
                     }
                 })
             }else{
+                that.fullscreenLoading = false;
                 this.$message.error('请检查图片是否为此类型!');
             }
         },
         //户口本
         household(){
+            this.fullscreenLoading = true;
             var url="/api/TencentOCR/GetResidenceBookletOCR"
             var that=this
             if(that.panduan){
@@ -345,9 +360,11 @@ export default {
                         that.$message({
                             message: res.data.msg,
                             type: 'success'
-                        });           
-                        // window.open(res.data.data.downUrl)
+                        });   
+                        that.fullscreenLoading = false;        
+                        window.open(res.data.data.url)
                     }else{
+                        that.fullscreenLoading = false;
                         that.$message({
                             message: res.data.msg,
                             type: 'warning'
@@ -355,11 +372,13 @@ export default {
                     }
                 })
             }else{
+                that.fullscreenLoading = false;
                 this.$message.error('请检查图片是否为此类型!');
             }
         },
         //房产证
         deed(){
+            this.fullscreenLoading = true;
             var url="/api/TencentOCR/GetPropOwnerCert"
             var that=this
             if(that.panduan){
@@ -379,9 +398,11 @@ export default {
                         that.$message({
                             message: res.data.msg,
                             type: 'success'
-                        });           
-                        // window.open(res.data.data.downUrl)
+                        });  
+                        that.fullscreenLoading = false;         
+                        window.open(res.data.data.url)
                     }else{
+                        that.fullscreenLoading = false;
                         that.$message({
                             message: res.data.msg,
                             type: 'warning'
@@ -389,11 +410,13 @@ export default {
                     }
                 })
             }else{
+                that.fullscreenLoading = false;
                 this.$message.error('请检查图片是否为此类型!');
             }
         },
         //结婚证
         Marriage(){
+            this.fullscreenLoading = true;
             var url="/api/TencentOCR/GetMarriageLicense"
             var that=this
             if(that.panduan){
@@ -413,9 +436,11 @@ export default {
                         that.$message({
                             message: res.data.msg,
                             type: 'success'
-                        });           
-                        // window.open(res.data.data.downUrl)
+                        });   
+                        that.fullscreenLoading = false;        
+                        window.open(res.data.data.url)
                     }else{
+                        that.fullscreenLoading = false;
                         that.$message({
                             message: res.data.msg,
                             type: 'warning'
@@ -423,11 +448,13 @@ export default {
                     }
                 })
             }else{
-                this.$message.error('请检查图片是否为此类型!');
+                that.fullscreenLoading = false;
+                that.$message.error('请检查图片是否为此类型!');
             }
         },
-        //结婚证
+        //大陆护照
         mainlandPassport(){
+            this.fullscreenLoading = true;
             var url="/api/TencentOCR/GetPassport"
             var that=this
             if(that.panduan){
@@ -447,9 +474,11 @@ export default {
                         that.$message({
                             message: res.data.msg,
                             type: 'success'
-                        });           
-                        // window.open(res.data.data.downUrl)
+                        });     
+                        that.fullscreenLoading = false;      
+                        window.open(res.data.data.url)
                     }else{
+                        that.fullscreenLoading = false;
                         that.$message({
                             message: res.data.msg,
                             type: 'warning'
@@ -457,11 +486,13 @@ export default {
                     }
                 })
             }else{
-                this.$message.error('请检查图片是否为此类型!');
+                that.fullscreenLoading = false;
+                that.$message.error('请检查图片是否为此类型!');
             }
         },
         //通用印刷体
         universal(){
+            this.fullscreenLoading = true;
             var url="/api/TencentOCR/GetGeneralBasic"
             var that=this
             if(that.panduan){
@@ -482,8 +513,10 @@ export default {
                             message: res.data.msg,
                             type: 'success'
                         });           
-                        // window.open(res.data.data.downUrl)
+                        that.fullscreenLoading = false;
+                        window.open(res.data.data.url)
                     }else{
+                        that.fullscreenLoading = false;
                         that.$message({
                             message: res.data.msg,
                             type: 'warning'
@@ -491,7 +524,8 @@ export default {
                     }
                 })
             }else{
-                this.$message.error('请检查图片是否为此类型!');
+                that.fullscreenLoading = false;
+                that.$message.error('请检查图片是否为此类型!');
             }
         },
     },

+ 6 - 6
src/components/OP/OpAirTicketRes.vue

@@ -14,11 +14,11 @@
                     <span v-for="(items,index) in item.data.airFeeData" :key="index">&nbsp;&nbsp;&nbsp;{{items.airType}}:{{townum(items.airDRCB)}}元/人&nbsp;&nbsp;&nbsp;{{items.airNum}}人&nbsp;&nbsp;&nbsp;共:{{townum(items.airZCB)}}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
                     <el-popover
                         placement="right"
-                        width="452"
+                        width="552"
                         trigger="hover">
-                        <el-table border :data="item.data.airInitData">
+                        <el-table max-height="800" border :data="item.data.airInitData">
                             <el-table-column width="150" property="date" label="DATE"></el-table-column>
-                            <el-table-column width="300" property="itinerary" label="ITIN"></el-table-column>
+                            <el-table-column width="400" property="itinerary" label="ITIN"></el-table-column>
                         </el-table>
                         <span slot="reference" style="cursor: pointer;">"移上查看详细"</span>
                     </el-popover>
@@ -29,11 +29,11 @@
                     <span v-for="(items,index) in item.data.airFeeData" :key="index">{{items.airType}}:{{townum(items.airDRCB)}}元/人&nbsp;&nbsp;&nbsp;{{items.airNum}}人&nbsp;&nbsp;&nbsp;共:{{townum(items.airZCB)}}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
                     <el-popover
                         placement="right"
-                        width="452"
+                        width="552"
                         trigger="hover">
-                        <el-table border :data="item.data.airInitData">
+                        <el-table max-height="800" border :data="item.data.airInitData">
                             <el-table-column width="150" property="date" label="DATE"></el-table-column>
-                            <el-table-column width="300" property="itinerary" label="ITIN"></el-table-column>
+                            <el-table-column width="400" property="itinerary" label="ITIN"></el-table-column>
                         </el-table>
                         <span slot="reference" style="cursor: pointer;">"移上查看详细"</span>
                     </el-popover>