From db905ecd14f63dba9337b4f4715584ef2d7e8c7e Mon Sep 17 00:00:00 2001
From: 马宇豪 <978517621@qq.com>
Date: 星期五, 07 三月 2025 14:45:00 +0800
Subject: [PATCH] 修改

---
 src/views/specialOperationsPay/singlePage/index.vue |   39 +++++++++++++++++++++++++++++++++++----
 1 files changed, 35 insertions(+), 4 deletions(-)

diff --git a/src/views/specialOperationsPay/singlePage/index.vue b/src/views/specialOperationsPay/singlePage/index.vue
index 73c25da..ad8256c 100644
--- a/src/views/specialOperationsPay/singlePage/index.vue
+++ b/src/views/specialOperationsPay/singlePage/index.vue
@@ -51,6 +51,7 @@
             <div>批次名称:<span class="cardCont">{{item.batchName }}</span></div>
             <div>所属地区:<span class="cardCont">{{item.districtName }}</span></div>
             <div>填报时间:<span class="cardCont">{{item.createTime}}</span></div>
+            <div v-if="item.payCode">财政缴款码:<span class="cardCont">{{item.payCode}}</span><el-button type="text" style="padding: 0;margin-left: 10px" @click="copyCode(item.payCode)">复制</el-button></div>
             <div>状态状态:
               <el-tag v-if="item.payStatus == 0" type="danger" size="small">待缴费</el-tag>
               <el-tag v-if="item.payStatus == 1" type="success" size="small">已缴费</el-tag>
@@ -65,14 +66,15 @@
             </div>
             <div>总计应缴:<span class="cardCont">{{ item.amount }}元</span></div>
             <el-button style="margin-top: 5px" type="primary" size="small" v-if="item.payStatus == 0" @click="goPay(item)">去缴费</el-button>
-            <el-button style="margin-top: 5px" type="success" size="small" v-if="item.payStatus == 1" @click="checkTicket(item)">查看票据</el-button>
+            <el-button style="margin-top: 5px" type="success" size="small" v-if="item.payStatus == 1" @click="checkTicket()">查看票据</el-button>
           </div>
         </div>
         <div v-else class="feeList">
           <div v-for="(item,index) in info.list" class="infoCard" :key="index">
-            <div>批次名称:<span class="cardCont" v-if="item.coalPays">{{item.coalPays.batchName }}</span></div>
+            <div>批次名称:<span class="cardCont" v-if="item.coalPays">{{item.coalPays.batchName}}</span></div>
 <!--            <div>所属地区:<span class="cardCont">{{item.districtName }}</span></div>-->
             <div>填报时间:<span class="cardCont" v-if="item.coalPays">{{item.coalPays.createTime}}</span></div>
+            <div v-if="item.payCode">财政缴款码:<span class="cardCont">{{item.payCode}}</span><el-button type="text" style="padding: 0;margin-left: 10px" @click="copyCode(item.payCode)">复制</el-button></div>
             <div>状态状态:
               <el-tag v-if="item.payStatus == 0" type="danger" size="small">待缴费</el-tag>
               <el-tag v-if="item.payStatus == 1" type="success" size="small">已缴费</el-tag>
@@ -87,7 +89,7 @@
             </div>
             <div>总计应缴:<span class="cardCont" v-if="item.coalPays">{{ item.coalPays.amount }}元</span></div>
             <el-button style="margin-top: 5px" type="primary" size="small" v-if="item.payStatus == 0" @click="goPay(item)">去缴费</el-button>
-            <el-button style="margin-top: 5px" type="success" size="small" v-if="item.payStatus == 1" @click="checkTicket(item)">查看票据</el-button>
+            <el-button style="margin-top: 5px" type="success" size="small" v-if="item.payStatus == 1" @click="checkTicket()">查看票据</el-button>
           </div>
         </div>
       </div>
@@ -271,7 +273,22 @@
           }
         }
       })
-
+    },
+    copyCode(code){
+      navigator.clipboard
+        .writeText(code)
+        .then(() => {
+          this.$message({
+            type:'success',
+            message: '缴款码已复制到剪贴板'
+          })
+        })
+        .catch((error) => {
+          this.$message({
+            type:'warning',
+            message: '缴款码复制失败'
+          })
+        });
     },
     goPay(item){
       this.detailInfo = item
@@ -286,6 +303,13 @@
     },
     async payBill(){
       this.payLoading = true
+      let device = 1
+      const userAgent = window.navigator.userAgent
+      if (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(userAgent)) {
+        device = 2
+      } else {
+        device = 1
+      }
       if(this.dataForm.type == 1){
         const query = {
           id: this.detailInfo.nonCoalStudentId,
@@ -294,7 +318,9 @@
         const res = await nonCoalPersonPay(query)
         if(res.code == 200) {
           this.payLoading = false
+          window.open(`http://finpt.xjcz.gov.cn/fs-public/billQuery/findByOrderId.do?orderId=${res.msg}&deviceType=${device}`)
         }else{
+          this.payLoading = false
           this.$message({
             type:'warning',
             message: res.msg
@@ -308,7 +334,9 @@
         const res = await coalPersonPay(query)
         if(res.code == 200) {
           this.payLoading = false
+          window.open(`http://finpt.xjcz.gov.cn/fs-public/billQuery/findByOrderId.do?orderId=${res.msg}&deviceType=${device}`)
         }else{
+          this.payLoading = false
           this.$message({
             type:'warning',
             message: res.msg
@@ -316,6 +344,9 @@
         }
       }
     },
+    checkTicket(){
+      window.open('http://finpt.xjcz.gov.cn/fs-public/index.do')
+    },
     resetDataForm() {
       this.dataForm = {
       }

--
Gitblit v1.9.2