Parcourir la source

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

yuanrf il y a 11 mois
Parent
commit
f716c8d144

+ 5 - 4
src/components/Finance/DailyFeeedit.vue

@@ -81,6 +81,7 @@
     </div>
 </template>
 <script>
+import {debounce} from '../../store/statice'
 export default {
     // beforeRouteLeave(to, from, next) {
     //     if(to.name=='DailyFeePayment'){
@@ -145,7 +146,7 @@ export default {
         }
     },
     methods:{
-        submitForm(formName) {
+        submitForm:debounce(function(formName) {
             this.$refs[formName].validate((valid) => {
                 if (valid) {
                     this.SumPrice=0;
@@ -190,7 +191,7 @@ export default {
                     return false;
                 }
             });
-        },
+        },1000,true),
         resetForm(formName) {
             // this.$refs[formName].resetFields();
             this.$router.push({ path: "/home/DailyFeePayment"});
@@ -347,7 +348,7 @@ export default {
             })
         },
         //审核
-        PostDelDailyPaymentAudit(val){
+        PostDelDailyPaymentAudit:debounce(function(val){
             var url = "/api/Financial/PostDelDailyPaymentAudit"
             var that = this
             var auditType=0
@@ -380,7 +381,7 @@ export default {
                     that.$message.error(res.data.msg);
                 }
             })
-        },
+        },1000,true),
         getPostSearchDailyPaymentInfo(){
             if(this.editid!=undefined){
                 console.log("jing")

+ 14 - 1
src/components/Finance/royaltypg.vue

@@ -2,12 +2,25 @@
     <div>
         <div class="royaltypg-all">
             提成
+            <el-button @click="addcost" type="primary">主要按钮</el-button>
         </div>
     </div>
 </template>
 <script>
+import {throttle} from '../../store/statice'
+import {debounce} from '../../store/statice'
 export default {
-    
+    data () {
+        return {
+            cost:0,
+        }
+    },
+    methods:{
+        addcost:debounce(function(){
+            this.cost++
+            console.log(this.cost)
+        },1000,true)
+    }
 }
 </script>
 <style>

+ 3 - 2
src/components/OP/HotelReservations.vue

@@ -478,6 +478,7 @@
 <script>
 import { el } from '@fullcalendar/core/internal-common';
 import { set } from 'vue';
+import {debounce} from '../../store/statice'
 export default {
     data() {
         return {
@@ -1198,7 +1199,7 @@ export default {
             });
         },
         //保存
-        AddBtn(RequiredParameters) {
+        AddBtn:debounce(function(RequiredParameters) {
             console.log(this.RequiredParameters.CurrentRate)
             if(this.RequiredParameters.CurrentRate=="当前团组未设置此币种汇率!"){
                 this.$alert('当前团组未设置此币种汇率,请前往设置!', '警告', {
@@ -1240,7 +1241,7 @@ export default {
                 }
             });
 
-        },
+        },1000,true),
         //预定成本
         BookingCost(){
             var url = "/api/Groups/PostHotelReservationsPredictedCostFileDownload"

+ 3 - 2
src/components/OP/Hotelenquiry.vue

@@ -196,6 +196,7 @@
     </div>
 </template>
 <script>
+import {debounce} from '../../store/statice'
 export default {
     data () {
         return {
@@ -406,7 +407,7 @@ export default {
             })
         },
         //保存新增
-        PostHotelInquiryAddOrEdit(enquiryinfo) {
+        PostHotelInquiryAddOrEdit:debounce(function(enquiryinfo) {
             this.$refs[enquiryinfo].validate((valid) => {
                 if (valid) {
                     var status=1
@@ -471,7 +472,7 @@ export default {
                 }
             })
             
-        },
+        },1000,true),
         //新增切换
         AddToggle(){
             this.enquiryinfo={

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

@@ -43,28 +43,30 @@
         </div>
         <div style="color: #606266;font-size: 15px;font-weight: 600;text-align: center;">上传图片只能是 JPG,PNG,BMP 格式!大小不能超过 7MB!</div>
         <el-row>
-            <el-button type="primary" @click="license()">营业执照</el-button>
-            <el-button type="primary" @click="IDcardR()">身份证-人像面</el-button>
-            <el-button type="primary" @click="creditCode()">统一信用代码</el-button>
-            <el-button type="primary" @click="IDcardG()">身份证-国徽面</el-button>
-            <el-button type="primary" @click="driving()">行驶证</el-button>
-            <el-button type="primary" @click="household()">户口本</el-button>
-            <el-button type="primary" @click="deed()">房产证</el-button>
-            <el-button type="primary" @click="Marriage()">结婚证</el-button>
-            <el-button type="primary" @click="mainlandPassport()">大陆护照</el-button>
-            <el-button type="primary" @click="universal()">通用印刷体</el-button>
-            <el-button type="primary">营业执照(英文)</el-button>
-            <el-button type="primary">统一信用代码(英文)</el-button>
-            <el-button type="primary">身份证-人像面(英文)</el-button>
-            <el-button type="primary">身份证-国徽面(英文)</el-button>
-            <el-button type="primary">行驶证(英文)</el-button>
-            <el-button type="primary">户口本(英文)</el-button>
-            <!-- <el-button type="primary">户口本-成员页</el-button> -->
-            <!-- <el-button type="primary">户口本-成员页(英文)</el-button> -->
-            <el-button type="primary">房产证(英文)</el-button>
-            <el-button type="primary">结婚证(英文)</el-button>
-            <el-button type="primary">大陆护照(英文)</el-button>
-            <el-button type="primary">通用印刷体(英文)</el-button>
+            <el-button type="primary" @click="license(1)">营业执照</el-button>
+            <el-button type="primary" @click="creditCode(1)">统一信用代码</el-button>
+            <el-button type="primary" @click="IDcardR(1)">身份证-人像面</el-button>
+            <el-button type="primary" @click="IDcardG(1)">身份证-国徽面</el-button>
+            <el-button type="primary" @click="driving(1)">行驶证</el-button>
+            <el-button type="primary" @click="household(1)">户口本</el-button>
+            <el-button type="primary" @click="deed(1)">房产证</el-button>
+            <el-button type="primary" @click="Marriage(1)">结婚证</el-button>
+            <el-button type="primary" @click="mainlandPassport(1)">大陆护照</el-button>
+            <el-button type="primary" @click="mainlandPassports(1)">护照</el-button>
+            <el-button type="primary" @click="universal(1)">通用印刷体</el-button>
+            <el-button type="primary" @click="license(2)">营业执照(英文)</el-button>
+            <el-button type="primary" @click="creditCode(2)">统一信用代码(英文)</el-button>
+            <el-button type="primary" @click="IDcardR(2)">身份证-人像面(英文)</el-button>
+            <el-button type="primary" @click="IDcardG(2)">身份证-国徽面(英文)</el-button>
+            <el-button type="primary" @click="driving(2)">行驶证(英文)</el-button>
+            <el-button type="primary" @click="household(2)">户口本(英文)</el-button>
+            <el-button type="primary" @click="deed(2)">房产证(英文)</el-button>
+            <el-button type="primary" @click="Marriage(2)">结婚证(英文)</el-button>
+            <el-button type="primary" @click="mainlandPassport(2)">大陆护照(英文)</el-button>
+            <el-button type="primary" @click="mainlandPassports(2)">护照(英文)</el-button>
+            <el-button type="primary" @click="universal(2)">通用印刷体(英文)</el-button>
+            <div style="width:160px"></div>
+            <div style="width:160px"></div>
         </el-row>
     </div>
 </template>
@@ -141,7 +143,7 @@ export default {
             })
         },
         //身份证人像面
-        IDcardR(){
+        IDcardR(val){
             this.fullscreenLoading = true;
             var url="/api/TencentOCR/GetIDCard"
             var that=this
@@ -155,7 +157,7 @@ export default {
                     data:{
                         portType: 1,
                         userId:that.userid,
-                        language:'en',
+                        language:val,
                         picBase64:that.picBase64,
                         cardSide:0
                     }
@@ -167,7 +169,7 @@ export default {
                             type: 'success'
                         });           
                         that.fullscreenLoading = false;
-                        window.open(res.data.data.url)
+                        window.open(res.data.data.downUrl)
                     }else{
                         that.fullscreenLoading = false;
                         that.$message({
@@ -182,7 +184,7 @@ export default {
             }
         },
         //身份证国徽面
-        IDcardG(){
+        IDcardG(val){
             this.fullscreenLoading = true;
             var url="/api/TencentOCR/GetIDCard"
             var that=this
@@ -197,6 +199,7 @@ export default {
                     data:{
                         portType: 1,
                         userId:that.userid,
+                        language:val,
                         picBase64:that.picBase64,
                         cardSide:1
                     }
@@ -208,7 +211,7 @@ export default {
                             type: 'success'
                         });   
                         that.fullscreenLoading = false;        
-                        window.open(res.data.data.url)
+                        window.open(res.data.data.downUrl)
                     }else{
                         that.fullscreenLoading = false;
                         that.$message({
@@ -223,7 +226,7 @@ export default {
             }
         },
         //营业执照
-        license(){
+        license(val){
             this.fullscreenLoading=true;
             var url="/api/TencentOCR/GetBizLicenseOCR"
             var that=this
@@ -236,6 +239,7 @@ export default {
                         Authorization:'Bearer '+this.token
                     },
                     data:{
+                        language:val,
                         picBase64:that.picBase64,
                     }
                 }).then(function(res){
@@ -260,7 +264,7 @@ export default {
             }
         },
         //统一信用代码
-        creditCode(){
+        creditCode(val){
             this.fullscreenLoading = true;
             var url="/api/TencentOCR/GetOrgCodeCertOCR"
             var that=this
@@ -273,6 +277,7 @@ export default {
                         Authorization:'Bearer '+this.token
                     },
                     data:{
+                        language:val,
                         picBase64:that.picBase64,
                     }
                 }).then(function(res){
@@ -298,7 +303,7 @@ export default {
             }
         },
         //行驶证
-        driving(){
+        driving(val){
             this.fullscreenLoading = true;
             var url="/api/TencentOCR/GetVehicleLicense"
             var that=this
@@ -311,6 +316,7 @@ export default {
                         Authorization:'Bearer '+this.token
                     },
                     data:{
+                        language:val,
                         picBase64:that.picBase64,
                         cardSide:0
                     }
@@ -337,7 +343,7 @@ export default {
             }
         },
         //户口本
-        household(){
+        household(val){
             this.fullscreenLoading = true;
             var url="/api/TencentOCR/GetResidenceBookletOCR"
             var that=this
@@ -350,6 +356,7 @@ export default {
                         Authorization:'Bearer '+this.token
                     },
                     data:{
+                        language:val,
                         picBase64:that.picBase64,
                     }
                 }).then(function(res){
@@ -375,7 +382,7 @@ export default {
             }
         },
         //房产证
-        deed(){
+        deed(val){
             this.fullscreenLoading = true;
             var url="/api/TencentOCR/GetPropOwnerCert"
             var that=this
@@ -388,6 +395,7 @@ export default {
                         Authorization:'Bearer '+this.token
                     },
                     data:{
+                        language:val,
                         picBase64:that.picBase64,
                     }
                 }).then(function(res){
@@ -413,7 +421,7 @@ export default {
             }
         },
         //结婚证
-        Marriage(){
+        Marriage(val){
             this.fullscreenLoading = true;
             var url="/api/TencentOCR/GetMarriageLicense"
             var that=this
@@ -426,6 +434,7 @@ export default {
                         Authorization:'Bearer '+this.token
                     },
                     data:{
+                        language:val,
                         picBase64:that.picBase64,
                     }
                 }).then(function(res){
@@ -451,7 +460,7 @@ export default {
             }
         },
         //大陆护照
-        mainlandPassport(){
+        mainlandPassport(val){
             this.fullscreenLoading = true;
             var url="/api/TencentOCR/GetPassport"
             var that=this
@@ -464,6 +473,46 @@ export default {
                         Authorization:'Bearer '+this.token
                     },
                     data:{
+                        language:val,
+                        picBase64:that.picBase64,
+                    }
+                }).then(function(res){
+                    if(res.data.code==200){       
+                        console.log(res)
+                        that.$message({
+                            message: res.data.msg,
+                            type: 'success'
+                        });     
+                        that.fullscreenLoading = false;      
+                        window.open(res.data.data.url)
+                    }else{
+                        that.fullscreenLoading = false;
+                        that.$message({
+                            message: res.data.msg,
+                            type: 'warning'
+                        });       
+                    }
+                })
+            }else{
+                that.fullscreenLoading = false;
+                that.$message.error('请检查图片是否为此类型!');
+            }
+        },
+        //护照
+        mainlandPassports(val){
+            this.fullscreenLoading = true;
+            var url="/api/TencentOCR/GetMLIDPassport"
+            var that=this
+            if(that.panduan){
+                that.fullscreenLoading = true;
+                this.$axios({
+                    method: 'post',
+                    url:url,
+                    headers:{
+                        Authorization:'Bearer '+this.token
+                    },
+                    data:{
+                        language:val,
                         picBase64:that.picBase64,
                     }
                 }).then(function(res){
@@ -489,7 +538,7 @@ export default {
             }
         },
         //通用印刷体
-        universal(){
+        universal(val){
             this.fullscreenLoading = true;
             var url="/api/TencentOCR/GetGeneralBasic"
             var that=this
@@ -502,6 +551,7 @@ export default {
                         Authorization:'Bearer '+this.token
                     },
                     data:{
+                        language:val,
                         picBase64:that.picBase64,
                     }
                 }).then(function(res){