From f9816a4078fdba44115c69025d9982997f23b484 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期一, 29 四月 2024 16:00:49 +0800
Subject: [PATCH] Merge branch 'develop'

---
 src/views/billprint/index.jsx |   39 ++++++++++++++++++++++++++++++++-------
 1 files changed, 32 insertions(+), 7 deletions(-)

diff --git a/src/views/billprint/index.jsx b/src/views/billprint/index.jsx
index 85f4b7e..416c51d 100644
--- a/src/views/billprint/index.jsx
+++ b/src/views/billprint/index.jsx
@@ -1,6 +1,6 @@
 import React, { Component } from 'react'
 import { is, fromJS } from 'immutable'
-import { Col, Row, Spin, notification, Button } from 'antd'
+import { Col, Row, Spin, notification, Button, Modal } from 'antd'
 import moment from 'moment'
 
 import Api from '@/api'
@@ -47,6 +47,8 @@
     auto: true,
     ismob: /(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i.test(navigator.userAgent)
   }
+
+  reloading = false
 
   UNSAFE_componentWillMount() {
     const { params } = this.props.match
@@ -367,7 +369,9 @@
             let getColumns = (cols) => {
               return cols.filter(item => {
                 if (item.Hide === 'true') return false
-                  
+
+                item.IsSort = 'false'
+
                 if (item.type === 'number') {
                   if (typeof(item.decimal) === 'number') {
                     item.round = Math.pow(10, item.decimal)
@@ -629,6 +633,9 @@
 
     if (cell.marks && cell.marks.length === 0) {
       cell.marks = null
+    }
+    if (cell.anchors && cell.anchors.length === 0) {
+      cell.anchors = null
     }
     
     if (['text', 'number', 'formula'].includes(cell.eleType)) {
@@ -912,11 +919,15 @@
             if (item.func === 'sPC_Get_structured_data' && /灏嗘埅鏂瓧绗︿覆鎴栦簩杩涘埗鏁版嵁/ig.test(res.message)) {
               res.message = res.message + '璇锋鏌ュ瓧娈甸泦'
             }
-            notification.warning({
-              top: 92,
-              message: res.message,
-              duration: 5
-            })
+            if (res.ErrCode === 'version_up') {
+              this.reloadTabs()
+            } else {
+              notification.warning({
+                top: 92,
+                message: res.message,
+                duration: 5
+              })
+            }
             resolve(false)
           } else {
             res.componentId = componentId
@@ -1076,6 +1087,20 @@
     })
   }
 
+  reloadTabs = () => {
+    if (this.reloading) return
+
+    this.reloading = true
+
+    Api.getAppVersion(true).then(() => {
+      window.location.reload()
+    }, (message) => {
+      Modal.error({
+        title: message || '绯荤粺閰嶇疆鏇存柊澶辫触锛�',
+      })
+    })
+  }
+
   canvasToImage(canvas) {
     let image = new Image()
     image.src = canvas.toDataURL('image/jpg')

--
Gitblit v1.8.0