Эх сурвалжийг харах

Merge branch 'main' into feature/v1.0.36

lianbingjie 1 жил өмнө
parent
commit
e167dc4dfb

+ 46 - 0
apps/mobile/src/api/modules/invoice.js

@@ -2,6 +2,7 @@ import request from '@/api'
 import qs from 'qs'
 
 export function ajaxInvoiceQuery(data) {
+  // 扫码查询发票信息
   data = qs.stringify(data)
   return request({
     url: '/jypay/invoice/query',
@@ -10,6 +11,7 @@ export function ajaxInvoiceQuery(data) {
   })
 }
 export function ajaxInvoiceSubmit(data) {
+  //  开发票提交
   data = qs.stringify(data)
   return request({
     url: '/jypay/invoice/submit',
@@ -17,3 +19,47 @@ export function ajaxInvoiceSubmit(data) {
     data
   })
 }
+export function ajaxInvoiceSwitch(data) {
+  //开发票开关
+  return request({
+    url: '/jypay/invoice/switch?t=' + Date.now(),
+    method: 'get',
+    params: data
+  })
+}
+export function ajaxInvoiceShowList(data) {
+  //查看发票列表
+  return request({
+    url: '/jypay/invoice/showList',
+    method: 'get',
+    params: data
+  })
+}
+export function ajaxInvoiceAavailable(data) {
+  //  查询是否可以开发票
+  data = qs.stringify(data)
+  return request({
+    url: '/jypay/invoice/available',
+    method: 'post',
+    data
+  })
+}
+export function ajaxInvoiceNewReplace(data) {
+  //换票
+  return request({
+    url: '/jypay/invoice/newReplace',
+    method: 'get',
+    params: data
+  })
+}
+export function ajaxInvoiceNewshow(data) {
+  //我的订单 发票回显
+  return request({
+    url: '/jypay/invoice/newShow',
+    method: 'get',
+    params: data
+  })
+}
+
+
+

BIN
apps/mobile/src/assets/image/icon/close.png


BIN
apps/mobile/src/assets/image/icon/drop.png


+ 59 - 0
apps/mobile/src/components/invoice/invoiceErr.vue

@@ -0,0 +1,59 @@
+<template>
+  <div class="invoice-err">
+    <div class="ic-err"></div>
+    <div class="tit">{{ title }}</div>
+    <div class="desc">{{ desc }}</div>
+  </div>
+</template>
+
+<script>
+export default {
+  data() {
+    return {}
+  },
+  props: {
+    title: {
+      type: String,
+      default: '开票失败'
+    },
+    desc: {
+      type: String,
+      default: ''
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+.invoice-err {
+  min-height: 96px;
+  box-sizing: border-box;
+  padding: 12px 0;
+
+  .ic-err {
+    width: 40px;
+    height: 40px;
+    background-image: url('@/assets/image/icon/close.png');
+    background-size: 100% 100%;
+    margin: auto;
+  }
+
+  .tit {
+    font-size: 18px;
+    font-weight: 400;
+    line-height: 26px;
+    text-align: center;
+    color: #171826;
+    margin-top: 8px;
+  }
+
+  .desc {
+    font-size: 12px;
+    font-weight: 400;
+    line-height: 18px;
+    text-align: center;
+    color: #5f5e64;
+    margin-top: 4px;
+  }
+}
+</style>

+ 153 - 0
apps/mobile/src/components/invoice/invoiceList.vue

@@ -0,0 +1,153 @@
+<template>
+  <div>
+    <div class="invoicenum">
+      共 <span class="height-color">{{ list.length }}</span> 张发票
+    </div>
+    <van-swipe
+      v-if="show"
+      class="my-swipe"
+      :loop="false"
+      :show-indicators="false"
+      ref="swipe"
+      :width="swopeWidth"
+    >
+      <van-swipe-item
+        v-for="(item, index) in list"
+        :key="index"
+        :style="{ width: 'auto' }"
+      >
+        <div
+          :class="{ 'swipe-content': true, active: active == index }"
+          @click="itemChange(item, index)"
+        >
+          <div class="title_">{{ item.invoice_status | invoice_status_f }}</div>
+          <div class="time_">
+            申请时间:{{ dateFormatter(item.create_time * 1000, 'yyyy-MM-dd') }}
+          </div>
+        </div>
+      </van-swipe-item>
+    </van-swipe>
+  </div>
+</template>
+
+<script>
+import { dateFormatter } from '@/utils/'
+import { Swipe, SwipeItem } from 'vant'
+export default {
+  data() {
+    return {
+      active: this.value,
+      swopeWidth: 0,
+      show: true
+    }
+  },
+  components: {
+    [Swipe.name]: Swipe,
+    [SwipeItem.name]: SwipeItem
+  },
+  props: {
+    list: {
+      type: Array,
+      default: () => []
+    },
+    value: {
+      type: Number,
+      default: 0
+    }
+  },
+  filters: {
+    invoice_status_f(val) {
+      if (val === -1) {
+        return '开票失败'
+      } else if (val === 0) {
+        return '开票中'
+      } else if (val === 1) {
+        return '已开具'
+      } else if (val === 2) {
+        return '开票中'
+      } else {
+        return '-'
+      }
+    }
+  },
+  methods: {
+    dateFormatter,
+    itemChange(item, index) {
+      this.active = index
+      this.$refs.swipe.swipeTo(index)
+      this.$emit('change', item)
+    },
+    initSwipe() {
+      let dom 
+      dom = document.getElementsByClassName('van-swipe-item')[this.list.length - 1]
+      this.swopeWidth = dom.clientWidth + 1
+      console.log(this.swopeWidth)
+      this.show = false
+      this.$nextTick(() => [(this.show = true)])
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+.my-swipe {
+  ::v-deep {
+    .van-swipe-item {
+      color: #fff;
+
+      height: 50px;
+      text-align: center;
+    }
+  }
+}
+
+.my-swipe.van-swipe {
+  height: 50px;
+  padding-left: 10px;
+}
+
+.swipe-content {
+  margin-right: 10px;
+  background-color: #f5f6f7;
+  border-radius: 8px;
+  height: 48px;
+  box-sizing: border-box;
+  padding: 6px 12px;
+
+  .title_ {
+    color: #171826;
+    font-size: 14px;
+    line-height: 20px;
+    text-align: left;
+  }
+
+  .time_ {
+    color: #5f5e64;
+    font-size: 11px;
+    line-height: 16px;
+    text-align: left;
+  }
+}
+
+.swipe-content.active {
+  background-color: rgb(42 190 209 / 12%);
+  border: 1px solid #2abed1;
+
+  .title_ {
+    color: #2abed1;
+  }
+}
+
+.invoicenum {
+  font-size: 14px;
+  line-height: 20px;
+  color: #171826;
+  box-sizing: border-box;
+  padding-left: 16px;
+  margin-bottom: 8px;
+}
+
+.invoicenum .height-color {
+  color: #2abed1;
+}
+</style>

+ 3 - 0
apps/mobile/src/components/invoice/popupTip.vue

@@ -65,6 +65,9 @@ export default {
     font-size: 16px;
     line-height: 26px;
     color: rgba(0, 0, 0, 0.9);
+    text-align: justify;
+    
+
   }
 }
 </style>

+ 4 - 2
apps/mobile/src/router/modules/invoice.js

@@ -4,7 +4,8 @@ export default [
     name: 'Invoicing',
     component: () => import('@/views/invoice/Invoicing.vue'),
     meta: {
-      title: '开发票'
+      title: '开发票',
+      header:true
     }
   },
   {
@@ -12,7 +13,8 @@ export default [
     name: 'viewInvoice',
     component: () => import('@/views/invoice/viewInvoice.vue'),
     meta: {
-      title: '查看发票'
+      title: '查看发票',
+      header:true
     }
   }
 ]

+ 4 - 0
apps/mobile/src/utils/utils.js

@@ -842,3 +842,7 @@ export function fixH5BackRefresh() {
 export function getAssetsFile(url) {
   return new URL(`../assets/image/${url}`, import.meta.url).href
 }
+  // 去关注微信公众号页面
+export function toWxGzhProfile () {
+  window.location.href = 'https://mp.weixin.qq.com/mp/profile_ext?action=home&__biz=Mzk0MjIyMzY2Nw==&scene=110#wechat_redirect'
+ }

+ 1 - 1
apps/mobile/src/views/create-order/components/areapack/ProductionCard.vue

@@ -474,7 +474,7 @@ export default {
       this.alreadyBuyInfo.loaded = true
       if (code === 0 && data) {
         // 页面重定向
-        const { enable } = this.redirectType(this.alreadyBuyInfo)
+        const { enable } = this.redirectType(data)
         if (!enable) {
           // 不重定向了。在进行赋值以及计算
           for (const key in data) {

+ 375 - 57
apps/mobile/src/views/invoice/Invoicing.vue

@@ -12,7 +12,9 @@
           <p class="title">开票金额:</p>
           <p class="value">{{ infoMap.price }}元</p>
         </div>
-        <div class="rightBtn" @click="tipShow = true">开票规则</div>
+        <div class="rightBtn" @click="tipShow = true" v-if="!$envs.inApp">
+          开票规则
+        </div>
       </div>
     </div>
     <div class="j-body">
@@ -29,6 +31,9 @@
           v-model.trim="infoMap.content"
           label="发票内容"
           readonly
+          @click="chooseContent"
+          right-icon="arrow"
+          right-icon-size="14"
         ></van-field>
         <div class="item-box-type">
           <div class="item-box-title redstar">发票抬头</div>
@@ -135,18 +140,31 @@
           rows="1"
           autosize
         ></van-field>
-
+      </div>
+      <div
+        class="j-content-nocolor"
+        v-show="!showDesc"
+        @click="showDesc = !showDesc"
+      >
+        <div class="showMore">
+          <div class="line" style="margin-right: 12px"></div>
+          <span class="showMore-text">开票备注</span>
+          <div class="ic-drop"></div>
+          <div class="line" style="margin-left: 8px"></div>
+        </div>
+      </div>
+      <div class="j-content" v-show="showDesc">
         <van-field
           v-model.trim="infoMap.desc"
           label="开票备注"
           @focus="infoCheckMap.desc = ''"
           :required="requireds.desc"
           :errorMessage="infoCheckMap.desc"
-          placeholder="请输入开票备注"
+          placeholder="此部分内容会展示在发票“备注”上,请按照贵司财务要求进行填写"
           v-if="showModule.desc"
           maxlength="200"
           type="textarea"
-          rows="1"
+          rows="3"
           autosize
         ></van-field>
       </div>
@@ -218,29 +236,44 @@
     </div>
     <popupTip
       v-model="tipShow"
-      text="开票规则:<br>1.平台提供电子普通发票、电子专用发票、纸质普通发票、纸质专用发票,开票内容统一为“信息技术服务-技术服务费”。<br>2.您申请的电子发票将在3个工作日内由平台开具并发送至您的邮箱,请注意查收;您申请的纸质发票将在25个工作日内由平台开具并邮寄给您,请注意查收,开票金额<200元发票邮寄费用自行承担;<br>3.如有问题可联系客服,客服电话:400-108-6670。"
+      text="开票规则:<br>1.平台提供电子普通发票、电子专用发票,发票内容为可选“信息技术服务-技术服务费”、“信息技术服务-会员费”、“信息技术服务-招投标数据服务”;<br>2.您申请的电子发票将在3个工作日内由平台开具并发送至您的邮箱,请注意查收;<br>3.电子发票共有3种格式:PDF、OFD、XML,手机端查看发票默认为PDF格式,如需OFD、XML格式,您可前往邮箱或剑鱼标讯电脑端查看发票并下载;4.如有问题可联系客服,客服电话:400-108-6670。"
     >
     </popupTip>
+    <PopupSelect
+      :selectList="selectList"
+      ref="PopupSelect"
+      popTitle="发票内容"
+      @changeHandle="changeHandle"
+      @confirmHandle="confirmHandle"
+    ></PopupSelect>
   </div>
 </template>
 <script>
+import EventBus from '@/utils/eventBus'
 import {
   ajaxGetCompanyAssociation,
   ajaxInvoiceSubmit,
-  ajaxInvoiceQuery
+  ajaxInvoiceQuery,
+  ajaxInvoiceNewshow,
+  ajaxInvoiceSwitch,
+  ajaxInvoiceAavailable,
+  ajaxInvoiceNewReplace
 } from '@/api/modules'
 import { replaceKeyword } from '@/utils/utils'
 import { Field, Icon, Button } from 'vant'
 import popupTip from '@/components/invoice/popupTip'
 import radioGroup from '@/components/invoice/radioGroup'
+import PopupSelect from '@/components/invoice/PopupSelect'
 export default {
+  // eslint-disable-next-line vue/multi-word-component-names
   name: 'Invoicing',
   components: {
     [Field.name]: Field,
     [Icon.name]: Icon,
     [Button.name]: Button,
     popupTip,
-    radioGroup
+    radioGroup,
+    PopupSelect
   },
   data() {
     return {
@@ -254,6 +287,11 @@ export default {
         { text: '个人', value: '1' },
         { text: '单位', value: '2' }
       ],
+      selectList: [
+        { title: '技术服务费', checked: true },
+        { title: '会员费', checked: false },
+        { title: '招投标数据服务', checked: false }
+      ],
       searchList: [],
       isAssociateShow: false,
       isAssociateUpTime: -1,
@@ -317,7 +355,12 @@ export default {
       },
       onlyIdentifying: '',
       invoiceMoney: '',
-      operator: ''
+      operator: '',
+      order_code: '',
+      type: '',
+      urlparms: {},
+      invoiceId: '',
+      showDesc: false
     }
   },
   computed: {
@@ -348,6 +391,8 @@ export default {
         this.infoMap.price < 200
       ) {
         return '您申请的发票将在25个工作日由平台开具并邮寄给您,请注意查收,另开票金额<200元,发票邮寄费用需您自行承担。'
+      } else {
+        return ''
       }
     },
     checkName() {
@@ -389,52 +434,236 @@ export default {
         return false
       }
       return RegExp.test(this.infoMap.bankCode)
+    },
+    enterSource() {
+      if (this.operator && this.invoiceMoney && this.onlyIdentifying) {
+        return 'qrcode'
+      } else {
+        if (this.order_code) {
+          return 'myorder'
+        } else {
+          return ''
+        }
+      }
     }
   },
   created() {
     this.initData()
   },
-  mounted() {},
+  mounted() {
+    if (this.$envs.inApp) {
+      EventBus.$emit('headerConf:merge', {
+        actionRightText: '开票规则',
+        actionRightStyle: {
+          color: '#171826'
+        },
+        onClickRight: () => {
+          this.tipShow = true
+        }
+      })
+    }
+  },
   methods: {
-    initData() {
-      let { onlyIdentifying, invoiceMoney, operator } = this.$route.query
+    async initData() {
+      let {
+        onlyIdentifying,
+        invoiceMoney,
+        operator,
+        order_code,
+        type,
+        invoiceId
+      } = this.$route.query
       this.onlyIdentifying = onlyIdentifying ? onlyIdentifying : ''
       this.invoiceMoney = invoiceMoney ? invoiceMoney : ''
       this.operator = operator ? operator : ''
-      const loading = this.$toast.loading({
-        duration: 0,
-        message: 'loading...'
-      })
-      ajaxInvoiceQuery({
-        onlyIdentifying: this.onlyIdentifying,
-        invoiceMoney: this.invoiceMoney,
-        operator: this.operator
-      }).then((res) => {
+      this.order_code = order_code ? order_code : ''
+      this.type = type ? type : ''
+      this.invoiceId = invoiceId ? invoiceId : ''
+      if (this.enterSource === 'qrcode') {
+        this.urlparms = {
+          onlyIdentifying: this.onlyIdentifying,
+          invoiceMoney: this.invoiceMoney,
+          operator: this.operator
+        }
+      } else {
+        this.urlparms = {
+          order_code: this.order_code
+        }
+      }
+      if (this.enterSource === 'qrcode') {
+        const loading = this.$toast.loading({
+          duration: 0,
+          message: 'loading...'
+        })
+        const res = await ajaxInvoiceQuery({
+          ...this.urlparms
+        })
         loading.clear()
         if (res.data) {
           this.infoMap.code = res.data.orderCodes ? res.data.orderCodes : ''
           this.infoMap.price = res.data.money ? res.data.money / 100 : 0
           this.initEnt(res.data.company_name)
-          if (res.data.invoice) {
+          if (
+            res.data.invoice &&
+            this.type !== 'again' &&
+            this.type !== 'Replace'
+          ) {
+            // 有发票信息开过票且不是换开也不是重开
             this.$router.replace({
               path: '/invoice/viewInvoice',
               query: {
-                onlyIdentifying: this.onlyIdentifying,
-                invoiceMoney: this.invoiceMoney,
-                operator: this.operator
+                ...this.urlparms
               }
             })
           }
+          if (
+            res.data.invoice &&
+            (this.type === 'again' || this.type === 'Replace')
+          ) {
+            // 换开或重开信息回显
+            this.infoMap.type = this.DigitstoChinese_type(
+              res.data.invoice.invoice_variety
+            )
+            this.infoMap.content = res.data.invoice.invoice_content
+            this.selectList.forEach((item) => {
+              if (this.infoMap.content.includes(item.title)) {
+                item.checked = true
+              } else {
+                item.checked = false
+              }
+            })
+            this.infoMap.invoiceHeader = this.DigitstoChinese_invoiceHeader(
+              res.data.invoice.invoice_type
+            )
+            this.infoMap.company = res.data.invoice.company_name || ''
+            this.infoMap.dutyparagraph =
+              res.data.invoice.taxpayer_identnum || ''
+            this.infoMap.unitAddress = res.data.invoice.company_address || ''
+            this.infoMap.tel = res.data.invoice.company_phone || ''
+            this.infoMap.bank = res.data.invoice.bank_name || ''
+            this.infoMap.bankCode = res.data.invoice.bank_account || ''
+            this.infoMap.desc = res.data.invoice.remark || ''
+            this.infoMap.name = res.data.invoice.recipient || ''
+            this.infoMap.phone = res.data.invoice.phone || ''
+            this.infoMap.email = res.data.invoice.mail || ''
+            this.infoMap.deliveryAddress =
+              res.data.invoice.delivery_address || ''
+          }
+        }
+      } else {
+        // 我的订单开票
+        const { code, messge } = await ajaxInvoiceSwitch()
+        if (code === '1001') {
+          // 发票开关
+          this.$dialog
+            .confirm({
+              title: '温馨提醒',
+              message: messge,
+              className: 'j-confirm-dialog',
+              messageAlign: 'left',
+              showCancelButton: false,
+              confirmButtonText: '我知道了'
+            })
+            .then(() => {
+              history.back()
+            })
+          return
+        }
+        const loading = this.$toast.loading({
+          duration: 0,
+          message: 'loading...'
+        })
+        const { status } = await ajaxInvoiceAavailable({
+          order_code: this.order_code
+        })
+        if (status === 0) {
+          // 不支持开票
+          if (this.$envs.inWX) {
+            window.location.replace('/front/invoice/cantInvoice?f=upgrade')
+          } else {
+            window.location.replace('/jyapp/front/cantInvoice?f=upgrade')
+          }
+        }
+        this.infoMap.code = this.order_code
+        const res = await ajaxInvoiceNewshow({
+          stype: 1,
+          code: this.order_code
+        })
+        let data = res.data
+        this.infoMap.price = data.pay_money ? data.pay_money / 100 : 0
+        if (this.type === 'again' || this.type === 'Replace') {
+          const resdata = await ajaxInvoiceNewshow({
+            stype: 2,
+            code: this.invoiceId
+          })
+          let data = resdata.data.invoice
+          if (this.type === 'Replace') {
+            this.infoMap.price = data.invoice_money
+              ? data.invoice_money / 100
+              : 0
+            this.infoMap.code = data.order_code
+          }
+          this.infoMap.type = this.DigitstoChinese_type(data.invoice_variety)
+          this.infoMap.content = data.invoice_content
+          this.onlyIdentifying = data.only_Identifying
+          this.selectList.forEach((item) => {
+            if (this.infoMap.content.includes(item.title)) {
+              item.checked = true
+            } else {
+              item.checked = false
+            }
+          })
+          this.infoMap.invoiceHeader = this.DigitstoChinese_invoiceHeader(
+            data.invoice_type
+          )
+          this.infoMap.company = data.company_name || ''
+          this.infoMap.dutyparagraph = data.taxpayer_identnum || ''
+          this.infoMap.unitAddress = data.company_address || ''
+          this.infoMap.tel = data.company_phone || ''
+          this.infoMap.bank = data.bank_name || ''
+          this.infoMap.bankCode = data.bank_account || ''
+          this.infoMap.desc = data.remark || ''
+          this.infoMap.name = data.recipient || ''
+          this.infoMap.phone = data.phone || ''
+          this.infoMap.email = data.mail || ''
+          this.infoMap.deliveryAddress = data.delivery_address || ''
+        }
+        loading.clear()
+      }
+      this.initshowModule()
+
+      if (this.type === 'again' || this.type === 'Replace') {
+        // 换开和重开有回显 防止回显数据有误初始校验一次
+        for (const key in this.infoCheckMap) {
+          this.getCheckMap(key)
+        }
+      }
+      if (this.infoMap.desc) {
+        // 备注初始是否填写
+        this.showDesc = true
+      } else {
+        this.showDesc = false
+      }
+    },
+    chooseContent() {
+      this.$refs.PopupSelect.visibleHandle(true)
+    },
+    changeHandle(item) {
+      this.selectList.forEach((ele) => {
+        if (ele.title == item.title) {
+          ele.checked = true
+        } else {
+          ele.checked = false
         }
-        this.initshowModule()
       })
+      this.infoMap.content = '信息技术服务-' + item.title
+    },
+    confirmHandle() {
+      this.$refs.PopupSelect.visibleHandle(false)
     },
     confirm_ok() {
       const loading = this.$toast.loading({ duration: 0, message: '提交中...' })
       let parms = {
-        onlyIdentifying: this.onlyIdentifying,
-        invoiceMoney: this.invoiceMoney,
-        operator: this.operator,
         company_name: this.showModule.company ? this.infoMap.company : '',
         phone: this.showModule.phone ? this.infoMap.phone : '',
         mail: this.showModule.email ? this.infoMap.email : '',
@@ -453,24 +682,44 @@ export default {
         delivery_address: this.showModule.deliveryAddress
           ? this.infoMap.deliveryAddress
           : '',
-        company_phone: this.showModule.tel ? this.infoMap.tel : ''
+        company_phone: this.showModule.tel ? this.infoMap.tel : '',
+        invoiceContent: this.infoMap.content,
+        again: this.type === 'again' ? 1 : 0,
+        oldOnlyIdentifying: this.type === 'again' ? this.onlyIdentifying : '',
+        source: this.enterSource === 'qrcode' ? 1 : 0,
+        ...this.urlparms
+      }
+      if (this.type !== 'Replace') {
+        ajaxInvoiceSubmit(parms).then((res) => {
+          loading.clear()
+          if (res.error_code === 0) {
+            this.$toast('提交成功!')
+            this.$router.replace({
+              path: '/invoice/viewInvoice',
+              query: {
+                ...this.urlparms
+              }
+            })
+          } else {
+            this.$toast(res.error_msg)
+          }
+        })
+      } else {
+        parms.sid = this.invoiceId
+        ajaxInvoiceNewReplace(parms).then((res) => {
+          if (res.invoice_status !== -1) {
+            this.$toast('提交成功!')
+            this.$router.replace({
+              path: '/invoice/viewInvoice',
+              query: {
+                ...this.urlparms
+              }
+            })
+          } else {
+            this.$toast('提交失败')
+          }
+        })
       }
-      ajaxInvoiceSubmit(parms).then((res) => {
-        loading.clear()
-        if (res.error_code === 0) {
-          this.$toast('提交成功!')
-          this.$router.replace({
-            path: '/invoice/viewInvoice',
-            query: {
-              onlyIdentifying: this.onlyIdentifying,
-              invoiceMoney: this.invoiceMoney,
-              operator: this.operator
-            }
-          })
-        } else {
-          this.$toast(res.error_msg)
-        }
-      })
     },
     getCheckMap(type) {
       switch (type) {
@@ -492,7 +741,7 @@ export default {
             this.infoCheckMap.tel === '' &&
             !this.checkPhone(this.infoMap.tel)
           ) {
-            this.infoCheckMap.tel = '联系电话格式不正确'
+            this.infoCheckMap.tel = '电话号码格式不正确'
           }
           break
         }
@@ -584,7 +833,6 @@ export default {
           } else {
             return true
           }
-          break
         }
         case 'tel': {
           if (this.showModule.tel) {
@@ -605,7 +853,6 @@ export default {
           } else {
             return true
           }
-          break
         }
         case 'phone': {
           if (
@@ -616,7 +863,6 @@ export default {
           } else {
             return true
           }
-          break
         }
         case 'email': {
           if (
@@ -627,7 +873,6 @@ export default {
           } else {
             return true
           }
-          break
         }
         case 'company': {
           if (
@@ -649,7 +894,6 @@ export default {
           } else {
             return true
           }
-          break
         }
         case 'dutyparagraph': {
           if (
@@ -660,7 +904,6 @@ export default {
           } else {
             return true
           }
-          break
         }
         case 'bankCode': {
           if (this.showModule.bankCode) {
@@ -681,7 +924,6 @@ export default {
           } else {
             return true
           }
-          break
         }
         case 'bank': {
           if (
@@ -693,7 +935,6 @@ export default {
           } else {
             return true
           }
-          break
         }
         case 'unitAddress': {
           if (
@@ -705,7 +946,6 @@ export default {
           } else {
             return true
           }
-          break
         }
         case 'deliveryAddress': {
           if (
@@ -717,7 +957,6 @@ export default {
           } else {
             return true
           }
-          break
         }
       }
     },
@@ -821,7 +1060,8 @@ export default {
       if (this.infoMap.type !== '1') {
         this.showModule.desc = true
       } else {
-        this.showModule.desc = false
+        // 537 改为电子普通发票、电子专用发票都展示“开票备注”;
+        this.showModule.desc = true
       }
       if (this.infoMap.type === '3' || this.infoMap.type === '4') {
         this.showModule.name = true
@@ -874,6 +1114,24 @@ export default {
         return '纸质专用发票'
       }
     },
+    DigitstoChinese_invoiceHeader(val) {
+      if (val === '个人') {
+        return '1'
+      } else if (val === '单位') {
+        return '2'
+      }
+    },
+    DigitstoChinese_type(val) {
+      if (val === '电子普通发票') {
+        return '1'
+      } else if (val === '电子专用发票') {
+        return '2'
+      } else if (val === '纸质普通发票') {
+        return '3'
+      } else if (val === '纸质专用发票') {
+        return '4'
+      }
+    },
     checkPhone(val) {
       return (
         /^1[3-9]\d{9}$/.test(val) ||
@@ -895,8 +1153,10 @@ export default {
 .Invoicing {
   background: #f5f6f7;
 }
+
 .redstar {
 }
+
 .redstar::after {
   // position: absolute;
   left: 0;
@@ -905,17 +1165,21 @@ export default {
   content: '*';
   margin-left: 2px;
 }
+
 .header {
   padding: 16px 12px 14px 24px;
   background-color: #fff;
+
   .item {
     min-height: 20px;
     display: flex;
     align-items: center;
     justify-content: space-between;
+
     .text_box {
       display: flex;
     }
+
     .title {
       font-size: 14px;
       font-weight: 400;
@@ -923,6 +1187,7 @@ export default {
       letter-spacing: 0em;
       color: #9b9ca3;
     }
+
     .value {
       font-size: 14px;
       font-weight: 400;
@@ -932,6 +1197,7 @@ export default {
       word-wrap: break-word;
       max-width: 215px;
     }
+
     .rightBtn {
       font-size: 14px;
       font-weight: 400;
@@ -940,6 +1206,7 @@ export default {
     }
   }
 }
+
 .j-body {
   flex: 1;
   overflow-y: scroll;
@@ -989,18 +1256,44 @@ export default {
     opacity: 0.5;
   }
 }
+
 .mt-10 {
   margin-top: 10px;
 }
+
+.j-content-nocolor {
+  margin-top: 12px;
+  border-radius: 8px;
+
+  .showMore {
+    display: flex;
+    align-items: center;
+    justify-content: center;
+
+    .line {
+      width: 80px;
+      border-top: 1px solid #00000014;
+    }
+
+    .showMore-text {
+      font-size: 15px;
+      color: #5f5e64;
+      line-height: 22px;
+    }
+  }
+}
+
 .j-content {
   background-color: #fff;
   margin-top: 12px;
   border-radius: 8px;
+
   .item-box-type {
     display: flex;
     padding: 16px 0 2px 16px;
     position: relative;
   }
+
   .item-box-type::after {
     position: absolute;
     box-sizing: border-box;
@@ -1013,9 +1306,11 @@ export default {
     -webkit-transform: scaleY(0.5);
     transform: scaleY(0.5);
   }
+
   .companybox {
     position: relative;
   }
+
   .companybox::after {
     position: absolute;
     box-sizing: border-box;
@@ -1028,6 +1323,7 @@ export default {
     -webkit-transform: scaleY(0.5);
     transform: scaleY(0.5);
   }
+
   .item-box-title {
     font-family: PingFang SC;
     font-size: 15px;
@@ -1043,10 +1339,12 @@ export default {
     padding: 15px 16px;
     background-color: #fff0;
   }
+
   .van-cell::after {
     right: 0;
     border-bottom: 0.5px solid rgba(0, 0, 0, 0.1);
   }
+
   ::v-deep {
     .van-cell__title.van-field__label {
       font-size: 15px;
@@ -1054,16 +1352,20 @@ export default {
       width: 80px;
       color: #5f5e64;
     }
+
     .van-field__body {
       font-size: 16px;
     }
+
     .van-field__control::placeholder {
       font-weight: 400;
       color: #c0c4cc;
     }
+
     .van-cell--required::before {
       display: none;
     }
+
     .van-cell--required span::after {
       // position: absolute;
       left: 0;
@@ -1072,8 +1374,13 @@ export default {
       content: '*';
       margin-left: 2px;
     }
+
+    .van-field__right-icon {
+      color: #c0c4cc;
+    }
   }
 }
+
 .associate-ent-group {
   position: absolute;
   top: 36px;
@@ -1087,6 +1394,7 @@ export default {
   padding-left: 16px;
   overflow-y: scroll;
 }
+
 .associate-ent-group .associate-ent-item {
   // font-family: PingFang SC;
   font-style: normal;
@@ -1098,10 +1406,20 @@ export default {
   padding-left: 0;
   border-bottom: 0.5px solid rgba(0, 0, 0, 0.05);
 }
+
 .associate-ent-group .associate-ent-item:last-child {
   border-bottom-color: transparent;
 }
+
 .highlight-text {
   color: #2cb7ca !important;
 }
+
+.ic-drop {
+  width: 16px;
+  height: 16px;
+  background-size: 100% 100%;
+  background-repeat: no-repeat;
+  background-image: url('@/assets/image/icon/drop.png');
+}
 </style>

+ 333 - 77
apps/mobile/src/views/invoice/viewInvoice.vue

@@ -1,8 +1,23 @@
 <template>
   <div class="Invoicing">
     <div class="header">
-      <p class="rightBtn" @click="tipShow = true">开票规则</p>
-      <Progress :active="status" :steps="steps"></Progress>
+      <p class="rightBtn" @click="tipShow = true" v-if="!$envs.inApp">
+        开票规则
+      </p>
+      <invoiceList
+        :list="invoiceList"
+        @change="invoiceChange"
+        v-if="invoiceList.length > 1"
+        ref="invoice_list"
+      >
+      </invoiceList>
+      <invoiceProgress
+        v-if="status !== -1 && status !== -2"
+        :active="status | statusFilter"
+        :steps="steps"
+      >
+      </invoiceProgress>
+      <invoiceErr :desc="errdesc" v-if="status === -1"></invoiceErr>
     </div>
     <div class="j-body">
       <div class="j-content">
@@ -102,7 +117,8 @@
           autosize
           readonly
         ></van-field>
-
+      </div>
+      <div class="j-content">
         <van-field
           v-model.trim="infoMap.desc"
           label="开票备注:"
@@ -154,20 +170,29 @@
       </div>
     </div>
     <div class="j-bottom">
-      <p class="b-desc">{{ desc }}</p>
+      <p class="b-desc" v-if="desc">{{ desc }}</p>
       <div class="j-button-group">
         <button
-          :class="{ 'j-button-confirm': true, grey: btntext === '开票中' }"
+          v-if="!(!this.url && btntext === '查看发票')"
+          :class="{ 'j-button-confirm': true }"
           @click="confirm_ok"
           :disabled="btntext === '开票中'"
         >
           {{ btntext }}
         </button>
+        <button
+          :class="{ 'j-button-confirm': true, grey: true }"
+          @click="Replace"
+          v-if="Secondbtn === '换开申请'"
+          style="margin-left: 13px"
+        >
+          {{ Secondbtn }}
+        </button>
       </div>
     </div>
     <popupTip
       v-model="tipShow"
-      text="开票规则:<br>1.平台提供电子普通发票、电子专用发票、纸质普通发票、纸质专用发票,开票内容统一为“信息技术服务-技术服务费”。<br>2.您申请的电子发票将在3个工作日内由平台开具并发送至您的邮箱,请注意查收;您申请的纸质发票将在25个工作日内由平台开具并邮寄给您,请注意查收,开票金额<200元发票邮寄费用自行承担;<br>3.如有问题可联系客服,客服电话:400-108-6670。"
+      text="开票规则:<br>1.平台提供电子普通发票、电子专用发票,发票内容为可选“信息技术服务-技术服务费”、“信息技术服务-会员费”、“信息技术服务-招投标数据服务”;<br>2.您申请的电子发票将在3个工作日内由平台开具并发送至您的邮箱,请注意查收;<br>3.电子发票共有3种格式:PDF、OFD、XML,手机端查看发票默认为PDF格式,如需OFD、XML格式,您可前往邮箱或剑鱼标讯电脑端查看发票并下载;<br>4.如有问题可联系客服,客服电话:400-108-6670。"
     >
     </popupTip>
     <popupTip v-model="logisticsShow">
@@ -191,12 +216,16 @@
   </div>
 </template>
 <script>
-import { ajaxInvoiceQuery } from '@/api/modules'
-import { copyText } from '@/utils/'
+import EventBus from '@/utils/eventBus'
+import { ajaxInvoiceQuery, ajaxInvoiceShowList } from '@/api/modules'
+import { copyText, openAppOrWxPage, toWxGzhProfile } from '@/utils/'
+import { androidOrIOS } from '@/utils/prototype/modules/platform'
+import { LINKS } from '@/data'
 import { Field, Icon, Button } from 'vant'
 import popupTip from '@/components/invoice/popupTip'
-import radioGroup from '@/components/invoice/radioGroup'
-import Progress from '@/views/order/components/dataexport/DataExportProgress'
+import invoiceList from '@/components/invoice/invoiceList'
+import invoiceErr from '@/components/invoice/invoiceErr'
+import invoiceProgress from '@/views/order/components/dataexport/DataExportProgress'
 export default {
   name: 'viewInvoice',
   components: {
@@ -204,8 +233,9 @@ export default {
     [Icon.name]: Icon,
     [Button.name]: Button,
     popupTip,
-    radioGroup,
-    Progress
+    invoiceProgress,
+    invoiceList,
+    invoiceErr
   },
   data() {
     return {
@@ -220,7 +250,7 @@ export default {
           text: '发票开具'
         }
       ],
-      status: 2,
+      status: 0,
       tipShow: false,
       logisticsShow: false,
       infoMap: {
@@ -271,23 +301,79 @@ export default {
       url: '',
       onlyIdentifying: '',
       invoiceMoney: '',
-      operator: ''
+      operator: '',
+      order_code: '',
+      urlparms: {},
+      isReopen: '',
+      invoiceId: '',
+      changed: '',
+      chooseInvoice: {},
+      invoiceList: [],
+      minTime: new Date('2024-01-01').getTime(),
+      create_time: 0,
+      redInvoiceMsg: '',
+      redInvoiceSwitch: ''
     }
   },
   computed: {
+    errdesc() {
+      if (this.btntext === '再次开票') {
+        return '公司名称/单位税号填写错误,请核实开票信息再次申请开票'
+      } else if (this.btntext === '联系客服') {
+        return '公司名称/单位税号填写错误,请联系客服申请开票'
+      } else {
+        return ''
+      }
+    },
+    // status -1:失败,0:开票中,1:成功 -2 已冲红
     btntext() {
-      if (this.status === 2) {
+      // if (this.create_time * 1000 < this.minTime) {
+      //   // 2024年以前的发票
+      //   return '联系客服'
+      // }
+      if (this.isReopen) {
+        return '联系客服'
+      }
+      if (this.status === 0) {
         return '开票中'
       }
-      if (this.infoMap.type === '1' || this.infoMap.type === '2') {
+      if (
+        this.status === 1 &&
+        (this.infoMap.type === '1' || this.infoMap.type === '2')
+      ) {
         return '查看发票'
       }
-      if (this.infoMap.type == '3' || this.infoMap.type == '4') {
+      if (
+        this.status === 1 &&
+        (this.infoMap.type == '3' || this.infoMap.type == '4')
+      ) {
         return '查看物流'
       }
+      if (this.status === -1 && !this.isReopen) {
+        return '再次开票'
+      }
+      return ''
+    },
+    Secondbtn() {
+      if (
+        this.status === 1 &&
+        !this.changed &&
+        (this.infoMap.type === '1' || this.infoMap.type === '2')
+      ) {
+        return '换开申请'
+      }
+      return ''
     },
     desc() {
-      if (this.infoMap.type === '1' || this.infoMap.type === '2') {
+      if (
+        (this.status === 1 && this.infoMap.type === '1') ||
+        this.infoMap.type === '2'
+      ) {
+        return '您申请的发票已由平台开具并发送至您的邮箱,请注意查收。'
+      } else if (
+        (this.status === 0 && this.infoMap.type === '1') ||
+        this.infoMap.type === '2'
+      ) {
         return '您申请的发票将在3个工作日内由平台开具并发送至您的邮箱,请注意查收。'
       } else if (
         (this.infoMap.type == '3' || this.infoMap.type == '4') &&
@@ -299,6 +385,19 @@ export default {
         this.infoMap.price < 200
       ) {
         return '您申请的发票将在25个工作日由平台开具并邮寄给您,请注意查收,另开票金额<200元,发票邮寄费用需您自行承担。'
+      } else {
+        return ''
+      }
+    },
+    enterSource() {
+      if (this.operator && this.invoiceMoney && this.onlyIdentifying) {
+        return 'qrcode'
+      } else {
+        if (this.order_code) {
+          return 'myorder'
+        } else {
+          return ''
+        }
       }
     }
   },
@@ -320,86 +419,239 @@ export default {
       } else if (val === '4') {
         return '纸质专用发票'
       }
+    },
+    statusFilter(val) {
+      if (val === 0) {
+        return 2
+      } else if (val === 1) {
+        return 3
+      }
     }
   },
   created() {
     this.initData()
   },
-  mounted() {},
+  mounted() {
+    if (this.$envs.inApp) {
+      EventBus.$emit('headerConf:merge', {
+        actionRightText: '开票规则',
+        actionRightStyle: {
+          color: '#171826'
+        },
+        onClickRight: () => {
+          this.tipShow = true
+        }
+      })
+    }
+  },
   methods: {
     initData() {
-      let { onlyIdentifying, invoiceMoney, operator } = this.$route.query
+      let { onlyIdentifying, invoiceMoney, operator, order_code } =
+        this.$route.query
       this.onlyIdentifying = onlyIdentifying ? onlyIdentifying : ''
       this.invoiceMoney = invoiceMoney ? invoiceMoney : ''
       this.operator = operator ? operator : ''
+      this.order_code = order_code ? order_code : ''
+      if (this.enterSource === 'qrcode') {
+        this.urlparms = {
+          onlyIdentifying: this.onlyIdentifying,
+          invoiceMoney: this.invoiceMoney,
+          operator: this.operator
+        }
+      } else {
+        this.urlparms = {
+          order_code: this.order_code
+        }
+      }
       const loading = this.$toast.loading({
         duration: 0,
         message: 'loading...'
       })
-      ajaxInvoiceQuery({
-        onlyIdentifying: this.onlyIdentifying,
-        invoiceMoney: this.invoiceMoney,
-        operator: this.operator
-      }).then((res) => {
-        loading.clear()
-        if (res.data) {
-          this.infoMap.code = res.data.orderCodes ? res.data.orderCodes : ''
-          this.infoMap.price = res.data.money ? res.data.money / 100 : 0
-          if (res.data.invoice) {
-            if (res.data.invoice.invoice_status === 1) {
-              this.status = 3
-            } else {
-              this.status = 2
+      if (this.enterSource === 'qrcode') {
+        ajaxInvoiceQuery({
+          ...this.urlparms
+        }).then((res) => {
+          loading.clear()
+          if (res.data) {
+            this.infoMap.code = res.data.orderCodes ? res.data.orderCodes : ''
+            this.infoMap.price = res.data.money ? res.data.money / 100 : 0
+            if (res.data.invoice) {
+              this.status =
+                res.data.invoice.invoice_status === 2
+                  ? 0
+                  : res.data.invoice.invoice_status // 发票状态;-1:失败,0:开票中,1:成功 -2 已冲红
+              this.isReopen = res.data.invoice.isReopen // 失败发票是否允许重开(true:不允许 false:允许)
+              this.invoiceId = res.data.invoice.id
+              this.changed = res.data.invoice.changed
+              this.create_time = res.data.invoice.create_time
+              this.infoMap.type = this.DigitstoChinese_type(
+                res.data.invoice.invoice_variety
+              )
+              this.infoMap.content = res.data.invoice.invoice_content || '--'
+              this.infoMap.invoiceHeader = this.DigitstoChinese_invoiceHeader(
+                res.data.invoice.invoice_type
+              )
+              this.infoMap.company = res.data.invoice.company_name || '--'
+              this.infoMap.dutyparagraph =
+                res.data.invoice.taxpayer_identnum || '--'
+              this.infoMap.unitAddress =
+                res.data.invoice.company_address || '--'
+              this.infoMap.tel = res.data.invoice.company_phone || '--'
+              this.infoMap.bank = res.data.invoice.bank_name || '--'
+              this.infoMap.bankCode = res.data.invoice.bank_account || '--'
+              this.infoMap.desc = res.data.invoice.remark || '--'
+              this.infoMap.name = res.data.invoice.recipient || '--'
+              this.infoMap.phone = res.data.invoice.phone || '--'
+              this.infoMap.email = res.data.invoice.mail || '--'
+              this.infoMap.deliveryAddress =
+                res.data.invoice.delivery_address || '--'
+              this.url = res.data.invoice.url
+              this.logistics_code = res.data.invoice.logistics_code
+                ? res.data.invoice.logistics_code
+                : ''
+              this.initshowModule()
             }
-            this.infoMap.type = this.DigitstoChinese_type(
-              res.data.invoice.invoice_variety
-            )
-            this.infoMap.content = res.data.invoice.invoice_content
-            this.infoMap.invoiceHeader = this.DigitstoChinese_invoiceHeader(
-              res.data.invoice.invoice_type
-            )
-            this.infoMap.company = res.data.invoice.company_name || '--'
-            this.infoMap.dutyparagraph =
-              res.data.invoice.taxpayer_identnum || '--'
-            this.infoMap.unitAddress = res.data.invoice.company_address || '--'
-            this.infoMap.tel = res.data.invoice.company_phone || '--'
-            this.infoMap.bank = res.data.invoice.bank_name || '--'
-            this.infoMap.bankCode = res.data.invoice.bank_account || '--'
-            this.infoMap.desc = res.data.invoice.remark || '--'
-            this.infoMap.name = res.data.invoice.recipient || '--'
-            this.infoMap.phone = res.data.invoice.phone || '--'
-            this.infoMap.email = res.data.invoice.mail || '--'
-            this.infoMap.deliveryAddress =
-              res.data.invoice.delivery_address || '--'
-            this.url = res.data.invoice.url
-            this.logistics_code = res.data.invoice.logistics_code
-              ? res.data.invoice.logistics_code
-              : ''
-            this.initshowModule()
           }
-        }
-      })
+        })
+      } else {
+        ajaxInvoiceShowList({ ...this.urlparms }).then((res) => {
+          loading.clear()
+          this.invoiceList = res.invoiceData || []
+          if (this.invoiceList.length > 1) {
+            this.$nextTick(() => {
+              this.$refs.invoice_list.initSwipe()
+            })
+          }
+          if (res.redSwitchInfo) {
+            this.redInvoiceSwitch = res.redSwitchInfo.ris
+            this.redInvoiceMsg = res.redSwitchInfo.rim
+          }
+          this.chooseInvoice = this.invoiceList[0] || {}
+          this.dataEcho()
+          this.initshowModule()
+        })
+      }
+    },
+    invoiceChange(item) {
+      this.chooseInvoice = item
+      this.dataEcho()
+      this.initshowModule()
     },
+    dataEcho() {
+      this.status =
+        this.chooseInvoice.invoice_status === 2
+          ? 0
+          : this.chooseInvoice.invoice_status // 发票状态;-1:失败,0:开票中,1:成功 -2 已冲红
+      this.isReopen = this.chooseInvoice.isReopen // 失败发票是否允许重开(true:不允许 false:允许)
+      this.invoiceId = this.chooseInvoice.id
+      this.changed = this.chooseInvoice.changed
+      this.create_time = this.chooseInvoice.create_time
+      this.infoMap.code = this.chooseInvoice.invoice_order_code
+        ? this.chooseInvoice.invoice_order_code
+        : this.chooseInvoice.order_code
+      this.infoMap.type = this.DigitstoChinese_type(
+        this.chooseInvoice.invoice_variety
+      )
+      this.infoMap.content = this.chooseInvoice.invoice_content || '--'
+      this.infoMap.invoiceHeader = this.DigitstoChinese_invoiceHeader(
+        this.chooseInvoice.invoice_type
+      )
+      this.infoMap.company = this.chooseInvoice.company_name || '--'
+      this.infoMap.dutyparagraph = this.chooseInvoice.taxpayer_identnum || '--'
+      this.infoMap.unitAddress = this.chooseInvoice.company_address || '--'
+      this.infoMap.tel = this.chooseInvoice.company_phone || '--'
+      this.infoMap.bank = this.chooseInvoice.bank_name || '--'
+      this.infoMap.bankCode = this.chooseInvoice.bank_account || '--'
+      this.infoMap.desc = this.chooseInvoice.remark || '--'
+      this.infoMap.name = this.chooseInvoice.recipient || '--'
+      this.infoMap.phone = this.chooseInvoice.phone || '--'
+      this.infoMap.email = this.chooseInvoice.mail || '--'
+      this.infoMap.deliveryAddress = this.chooseInvoice.delivery_address || '--'
+      this.url = this.chooseInvoice.url
+      this.logistics_code = this.chooseInvoice.logistics_code
+        ? this.chooseInvoice.logistics_code
+        : ''
+    },
+
     confirm_ok() {
       if (this.btntext === '查看发票') {
-        if (
-          this.infoMap.type === '2' ||
-          (this.infoMap.type === '1' && this.infoMap.price >= 10000)
-        ) {
-          location.href = this.url
+        if (this.$envs.inApp) {
+          JyObj.openExternalLink(this.url, '电子发票')
         } else {
-          const eleLink = document.createElement('a') // 新建A标签
-          eleLink.href = this.url // 下载的路径
-          eleLink.download = '' // 设置下载的属性,可以为空
-          eleLink.style.display = 'none'
-          document.body.appendChild(eleLink)
-          eleLink.click() // 触发点击事件
-          document.body.removeChild(eleLink)
+          const href = new URL(this.url)
+          const path = href.pathname
+          // 非app内打开
+          if (
+            this.infoMap.type === '2' ||
+            (this.infoMap.type === '1' &&
+              this.infoMap.price >= 10000 &&
+              this.enterSource === 'qrcode')
+          ) {
+            //扫码入口且金额大于10000
+            window.open(path)
+          } else {
+            // 我的订单入口
+            if (androidOrIOS() === 'ios') {
+              window.open(path)
+            } else {
+              const eleLink = document.createElement('a') // 新建A标签
+              eleLink.href = this.url // 下载的路径
+              eleLink.download = '' // 设置下载的属性,可以为空
+              eleLink.style.display = 'none'
+              document.body.appendChild(eleLink)
+              eleLink.click() // 触发点击事件
+              document.body.removeChild(eleLink)
+            }
+          }
         }
-      } else {
+      } else if (this.btntext === '查看物流') {
         this.logisticsShow = true
+      } else if (this.btntext === '再次开票') {
+        // 再次开票
+        this.$router.replace({
+          path: '/invoice/Invoicing',
+          query: {
+            type: 'again',
+            invoiceId: this.invoiceId,
+            ...this.urlparms
+          }
+        })
+      } else if (this.btntext === '联系客服') {
+        if (this.enterSource === 'qrcode') {
+          toWxGzhProfile()
+          return
+        }
+        openAppOrWxPage(LINKS.客服, {
+          query: {
+            from: encodeURIComponent(location.href)
+          }
+        })
       }
     },
+    Replace() {
+      //换开
+      if (!this.redInvoiceSwitch && this.enterSource === 'myorder') {
+        this.$dialog
+          .confirm({
+            title: '温馨提醒',
+            message: this.redInvoiceMsg,
+            className: 'j-confirm-dialog',
+            messageAlign: 'left',
+            showCancelButton: false,
+            confirmButtonText: '我知道了'
+          })
+          .then(() => {})
+        return
+      }
+      this.$router.replace({
+        path: '/invoice/Invoicing',
+        query: {
+          type: 'Replace',
+          invoiceId: this.invoiceId,
+          ...this.urlparms
+        }
+      })
+    },
     initshowModule() {
       if (this.infoMap.invoiceHeader === '2') {
         this.showModule.company = true
@@ -419,7 +671,8 @@ export default {
       if (this.infoMap.type !== '1') {
         this.showModule.desc = true
       } else {
-        this.showModule.desc = false
+        // 537 改为电子普通发票、电子专用发票都展示“开票备注”;
+        this.showModule.desc = true
       }
       if (this.infoMap.type === '3' || this.infoMap.type === '4') {
         this.showModule.name = true
@@ -452,6 +705,8 @@ export default {
     DigitstoChinese_type(val) {
       if (val === '电子普通发票') {
         return '1'
+      } else if (val === '普通发票(电子发票)') {
+        return '1'
       } else if (val === '电子专用发票') {
         return '2'
       } else if (val === '纸质普通发票') {
@@ -531,6 +786,7 @@ export default {
       color: #171826;
     }
   }
+
   .rightBtn {
     text-align: right;
     padding-right: 6px;
@@ -593,8 +849,8 @@ export default {
 }
 
 .grey {
-  // color: #5f5e64!important;
-  // background-color: #edeff2!important;
+  color: #5f5e64 !important;
+  background-color: #edeff2 !important;
 }
 
 .mt-10 {