From 4d6b9f8a2d7b316633e43b489eae9ada949c07b5 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期二, 10 九月 2024 10:18:08 +0800
Subject: [PATCH] Merge branch 'master' into positec

---
 src/views/billprint/index.jsx |  380 ++++++++++++++++++++++++++++++++++++++++++++++++------
 1 files changed, 337 insertions(+), 43 deletions(-)

diff --git a/src/views/billprint/index.jsx b/src/views/billprint/index.jsx
index cca0591..f708040 100644
--- a/src/views/billprint/index.jsx
+++ b/src/views/billprint/index.jsx
@@ -1,7 +1,8 @@
 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 md5 from 'md5'
 
 import Api from '@/api'
 import Utils from '@/utils/utils.js'
@@ -44,8 +45,11 @@
     visible: false,
     rePos: false,
     loading: false,
-    auto: true
+    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
@@ -62,6 +66,7 @@
         let param = JSON.parse(window.decodeURIComponent(window.atob(params.param)))
   
         sessionStorage.setItem('dataM', param.dataM || '')
+
         this.setState({
           BID: param.id || '',
           tempId: param.tempId,
@@ -87,7 +92,7 @@
   }
 
   componentDidMount() {
-    const _this = this
+    const that = this
 
     if (window.GLOB.sysType !== 'cloud') {
       Object.defineProperty(window, 'debugger', {
@@ -115,7 +120,7 @@
             window.GLOB.breakpoint = value + ''
             sessionStorage.setItem('breakpoint', value)
           }
-          _this.debugChange()
+          that.debugChange()
         }
       })
     }
@@ -141,7 +146,7 @@
         window.GLOB.breakpoint = false
         sessionStorage.removeItem('breakpoint')
         
-        _this.debugChange()
+        that.debugChange()
       }
     }
   }
@@ -166,8 +171,6 @@
         sessionStorage.setItem('LoginUID', result.LoginUID || '')
         sessionStorage.setItem('dataM', 'false')
 
-        this.getMenuParam()
-
         // 鑾峰彇绯荤粺淇℃伅
         let _param = {
           func: 's_Get_style',
@@ -184,6 +187,7 @@
           if (res.status) {
             window.GLOB.style = res.CSS
             document.title = res.titleName
+            sessionStorage.setItem('appname', res.appname || '')
         
             if (window.GLOB.style && styles[window.GLOB.style]) {
               document.body.className = styles[window.GLOB.style] + ' ' + (res.split_line_show === 'false' ? 'hidden-split-line' : '')
@@ -197,6 +201,8 @@
               document.getElementsByTagName('head')[0].appendChild(link)
             }
           }
+
+          this.getMenuParam()
         })
       } else {
         notification.warning({
@@ -250,6 +256,10 @@
           return
         }
 
+        if (config.webTitle) {
+          document.title = config.webTitle
+        }
+
         config.style = config.style || {}
         config.pageSize = ['A4', 'A3', 'A5'].includes(config.pageSize) ? config.pageSize : 'A4'
         config.pageLayout = config.pageLayout !== 'horizontal' ? 'vertical' : 'horizontal'
@@ -295,6 +305,22 @@
 
         config.components = config.components.filter(item => !['tabs', 'search'].includes(item.type))
 
+        if (window.backend && config.allSqls) {
+          let urlparam = urlParam || {}
+          let keys = Object.keys(urlparam)
+          config.allSqls.forEach(item => {
+            item.id = md5(window.GLOB.appkey + item.v_id)
+            if (item.type === 'datasource' || item.type === 'excelOut') {
+              item.urlkeys = keys
+              item.urlparam = urlparam
+              if (config.flow_code) {
+                item.works_flow_code = config.flow_code
+              }
+            }
+            window.GLOB.CacheData.set('sql_' + item.uuid, item)
+          })
+        }
+
         let userName = sessionStorage.getItem('User_Name') || ''
         let fullName = sessionStorage.getItem('Full_Name') || ''
 
@@ -322,6 +348,10 @@
 
         window.GLOB.CacheData.set(tempId, {$BID: BID})
 
+        let initInters = []
+
+        this.formatInterSetting(config.interfaces, regs, initInters, params, BID, config.MenuName)
+
         config.components = config.components.map(component => {
           if (component.action) {
             component.action = component.action.filter(cell => {
@@ -336,6 +366,8 @@
             component.$searches = []
           }
           component.data = [] // 鍒濆鍖栨暟鎹负绌�
+
+          component.$menuname = (config.MenuName || '') + '-' + (component.name || '')
 
           if (component.subtype === 'tablecard') { // 鍏煎
             component.type = 'card'
@@ -354,7 +386,22 @@
           if (component.type === 'table') {
             let getColumns = (cols) => {
               return cols.filter(item => {
-                if (item.type === 'colspan') {
+                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)
+                    if (item.format === 'percent') {
+                      item.decimal = item.decimal > 2 ? item.decimal - 2 : 0
+                    }
+                  }
+                } else if (item.type === 'formula') {
+                  if (typeof(item.decimal) === 'number') {
+                    item.round = Math.pow(10, item.decimal)
+                  }
+                } else if (item.type === 'colspan') {
                   item.subcols = getColumns(item.subcols)
                   if (item.subcols.length === 0) {
                     return false
@@ -376,6 +423,10 @@
                   }
                 } else {
                   item.IsSort = 'false'
+                }
+
+                if (item.marks && item.marks.length === 0) {
+                  item.marks = null
                 }
           
                 return true
@@ -434,19 +485,39 @@
 
           if (component.wrap && component.wrap.datatype === 'static') {
             component.format = ''
+          } else if (component.wrap && component.wrap.datatype === 'public') {
+            component.componentId = component.wrap.publicId
+            component.format = ''
           }
     
           if (!component.setting) return component // 涓嶄娇鐢ㄧ郴缁熷嚱鏁版椂
           if (!component.format) return component  // 娌℃湁鍔ㄦ�佹暟鎹�  鏁版嵁鏍煎紡 array 鎴� object
+
+          component.setting.arr_field = component.columns ? component.columns.map(col => col.field).join(',') : ''
+          component.setting.laypage = false   // 鏄惁鍒嗛〉锛岃浆涓篵oolean 缁熶竴鏍煎紡
+          component.setting.$name = component.$menuname
+
+          if (component.format === 'object') {
+            component.setting.$top = true
+          }
+
           if (component.setting.interType !== 'system') { // 涓嶄娇鐢ㄧ郴缁熷嚱鏁版椂
             component.setting.sync = 'false'
             return component
           }
+
+          component.setting.uuid = component.uuid
     
           let _customScript = ''
+          let _tailScript = ''
           component.scripts && component.scripts.forEach(script => {
-            if (script.status !== 'false') {
+            if (script.status === 'false') return
+            if (script.position !== 'back') {
               _customScript += `
+              ${script.sql}
+              `
+            } else {
+              _tailScript += `
               ${script.sql}
               `
             }
@@ -454,7 +525,6 @@
           delete component.scripts
     
           component.setting.execute = component.setting.execute !== 'false'  // 榛樿sql鏄惁鎵ц锛岃浆涓篵oolean 缁熶竴鏍煎紡
-          component.setting.laypage = false   // 鏄惁鍒嗛〉锛岃浆涓篵oolean 缁熶竴鏍煎紡
           component.setting.onload = 'true'   // 榛樿鍔犺浇
     
           if (!component.setting.execute) {
@@ -467,17 +537,27 @@
           if (sessionStorage.getItem('dataM') === 'true') { // 鏁版嵁鏉冮檺
             component.setting.dataresource = component.setting.dataresource.replace(/\$@/ig, '/*').replace(/@\$/ig, '*/').replace(/@datam@/ig, '\'Y\'')
             _customScript = _customScript.replace(/\$@/ig, '/*').replace(/@\$/ig, '*/').replace(/@datam@/ig, '\'Y\'')
+            _tailScript = _tailScript.replace(/\$@/ig, '/*').replace(/@\$/ig, '*/').replace(/@datam@/ig, '\'Y\'')
           } else {
             component.setting.dataresource = component.setting.dataresource.replace(/@\$|\$@/ig, '').replace(/@datam@/ig, '\'\'')
             _customScript = _customScript.replace(/@\$|\$@/ig, '').replace(/@datam@/ig, '\'\'')
+            _tailScript = _tailScript.replace(/@\$|\$@/ig, '').replace(/@datam@/ig, '\'\'')
           }
 
           regs.forEach(cell => {
             component.setting.dataresource = component.setting.dataresource.replace(cell.reg, cell.value)
             _customScript = _customScript.replace(cell.reg, cell.value)
+            _tailScript = _tailScript.replace(cell.reg, cell.value)
           })
     
           component.setting.customScript = _customScript // 鏁寸悊鍚庤嚜瀹氫箟鑴氭湰
+          component.setting.tailScript = _tailScript     // 鍚庣疆鑷畾涔夎剼鏈�
+
+          if (window.backend && config.allSqls) {
+            component.setting.sync = 'false'
+          } else if (_tailScript) {
+            component.setting.sync = 'false'
+          }
     
           // floor    缁勪欢鐨勫眰绾�
           // pageable 鏄惁鍒嗛〉锛岀粍浠跺睘鎬э紝涓嶅垎椤电殑缁勪欢鎵嶅彲浠ョ粺涓�鏌ヨ
@@ -485,9 +565,8 @@
             component.dataName = 'mk' + component.uuid.slice(-18)
             let param = this.getDefaultParam(component)
             _pars.push(param)
-          } else {
-            let arr_field = component.columns.map(col => col.field).join(',')
-            let param = UtilsDM.getQueryDataParams(component.setting, arr_field, [], component.setting.order || '', 1, 1000, BID)
+          } else if (component.subtype !== 'dualdatacard') {
+            let param = UtilsDM.getQueryDataParams(component.setting, [], component.setting.order || '', 1, 1000, BID)
             
             param.componentId = component.uuid
 
@@ -498,7 +577,7 @@
           return component
         })
 
-        _pars = this.getFormatParam(_pars)
+        _pars = this.getFormatParam(_pars, config.MenuName)
 
         if (_pars) {
           _pars.componentId = 'union'
@@ -521,8 +600,20 @@
           auto: config.printPage === 'auto',
           config
         }, () => {
-          if (params.length === 0) {
+          if (config.normalcss) {
+            let node = document.getElementById(config.uuid)
+            node && node.remove()
+      
+            let ele = document.createElement('style')
+            ele.id = config.uuid
+            ele.innerHTML = config.normalcss
+            document.getElementsByTagName('head')[0].appendChild(ele)
+          }
+          
+          if (params.length === 0 && initInters.length === 0) {
             this.setState({loadingview: false, pages: [config.components]})
+          } else if (initInters.length > 0) {
+            this.loadinit(initInters, params)
           } else {
             this.loadmaindata(params)
           }
@@ -561,6 +652,18 @@
 
   resetElement = (cell) => {
     cell.style = cell.style || {}
+
+    if (cell.style.display === 'inline-block') {
+      cell.style.verticalAlign = 'top'
+    }
+
+    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)) {
       cell.innerHeight = cell.innerHeight || 'auto'
       cell.alignItems = cell.height > 1 ? cell.alignItems : ''
@@ -570,10 +673,101 @@
         if (cell.format === 'percent') {
           cell.decimal = cell.decimal > 2 ? cell.decimal - 2 : 0
         }
+      } else if (cell.eleType === 'formula' && typeof(cell.decimal) === 'number') {
+        cell.round = Math.pow(10, cell.decimal)
       }
     }
 
     return cell
+  }
+
+  formatInterSetting = (inters, regs, initInters, params, BID, MenuName) => {
+    if (!inters) return []
+
+    let delay = 15
+    inters.forEach(inter => {
+      if (inter.status !== 'true') return
+
+      inter.setting.delay = delay
+      delay += 15
+
+      inter.setting.supModule = ''
+      inter.setting.arr_field = inter.columns.map(col => col.field).join(',')
+      inter.setting.$name = (MenuName || '') + '-鍏叡鏁版嵁婧�-' + inter.setting.name
+
+      if (inter.setting.interType !== 'system') {
+        let param = UtilsDM.getQueryDataParams(inter.setting, [], inter.setting.order || '', 1, 1000, BID)
+              
+        param.componentId = inter.uuid
+
+        if (inter.setting.loadlevel === 'init') {
+          initInters.push(param)
+        } else {
+          param.public = true
+          params.push(param)
+        }
+        return
+      }
+
+      inter.setting.uuid = inter.uuid
+
+      let _customScript = ''
+      let _tailScript = ''
+      inter.scripts.forEach(script => {
+        if (script.status === 'false') return
+        if (script.position !== 'back') {
+          _customScript += `
+          ${script.sql}
+          `
+        } else {
+          _tailScript += `
+          ${script.sql}
+          `
+        }
+      })
+      delete inter.scripts
+
+      inter.setting.execute = inter.setting.execute !== 'false'
+      inter.setting.laypage = false
+      inter.setting.$top = true
+
+      if (!inter.setting.execute) {
+        inter.setting.dataresource = ''
+      }
+      if (/\s/.test(inter.setting.dataresource)) {
+        inter.setting.dataresource = '(' + inter.setting.dataresource + ') tb'
+      }
+  
+      if (sessionStorage.getItem('dataM') === 'true') { // 鏁版嵁鏉冮檺
+        inter.setting.dataresource = inter.setting.dataresource.replace(/\$@/ig, '/*').replace(/@\$/ig, '*/').replace(/@datam@/ig, '\'Y\'')
+        _customScript = _customScript.replace(/\$@/ig, '/*').replace(/@\$/ig, '*/').replace(/@datam@/ig, '\'Y\'')
+        _tailScript = _tailScript.replace(/\$@/ig, '/*').replace(/@\$/ig, '*/').replace(/@datam@/ig, '\'Y\'')
+      } else {
+        inter.setting.dataresource = inter.setting.dataresource.replace(/@\$|\$@/ig, '').replace(/@datam@/ig, '\'\'')
+        _customScript = _customScript.replace(/@\$|\$@/ig, '').replace(/@datam@/ig, '\'\'')
+        _tailScript = _tailScript.replace(/@\$|\$@/ig, '').replace(/@datam@/ig, '\'\'')
+      }
+
+      regs.forEach(cell => {
+        inter.setting.dataresource = inter.setting.dataresource.replace(cell.reg, cell.value)
+        _customScript = _customScript.replace(cell.reg, cell.value)
+        _tailScript = _tailScript.replace(cell.reg, cell.value)
+      })
+
+      inter.setting.customScript = _customScript // 鏁寸悊鍚庤嚜瀹氫箟鑴氭湰
+      inter.setting.tailScript = _tailScript     // 鍚庣疆鑷畾涔夎剼鏈�
+
+      let param = UtilsDM.getQueryDataParams(inter.setting, [], inter.setting.order || '', 1, 1000, BID)
+            
+      param.componentId = inter.uuid
+
+      if (inter.setting.loadlevel === 'init') {
+        initInters.push(param)
+      } else {
+        param.public = true
+        params.push(param)
+      }
+    })
   }
 
   reload = () => {
@@ -598,26 +792,20 @@
   getDefaultParam = (component) => {
     const { columns, setting, dataName, format } = component
     
-    let arr_field = columns.map(col => col.field)
     let _dataresource = setting.dataresource
     let _customScript = setting.customScript
 
     if (setting.order && _dataresource) {
-      _dataresource = `select top 1000 ${arr_field.join(',')} from (select ${arr_field.join(',')} ,ROW_NUMBER() over(order by ${setting.order}) as rows from ${_dataresource}) tmptable order by tmptable.rows `
+      _dataresource = `select top 1000 ${setting.arr_field} from (select ${setting.arr_field} ,ROW_NUMBER() over(order by ${setting.order}) as rows from ${_dataresource}) tmptable order by tmptable.rows `
     } else if (_dataresource) {
-      _dataresource = `select top 1000 ${arr_field.join(',')} from ${_dataresource} `
-    }
-
-    // 娴嬭瘯绯荤粺鎵撳嵃鏌ヨ璇彞
-    if (window.GLOB.debugger === true) {
-      _customScript &&  console.info(`${_dataresource ? '' : '/*涓嶆墽琛岄粯璁ql*/\n'}${_customScript}`)
-      _dataresource &&  console.info(_dataresource)
+      _dataresource = `select top 1000 ${setting.arr_field} from ${_dataresource} `
     }
 
     return {
       name: dataName,
       columns: columns,
       par_tablename: '',
+      order: setting.order || '',
       type: format === 'array' ? format : '',
       primaryKey: setting.primaryKey || '',
       foreign_key: '',
@@ -626,7 +814,7 @@
     }
   }
 
-  getFormatParam = (params) => {
+  getFormatParam = (params, MenuName) => {
     const { BID } = this.state
 
     if (!params || params.length === 0) return ''
@@ -644,6 +832,19 @@
     let district = sessionStorage.getItem('district') || ''
     let address = sessionStorage.getItem('address') || ''
 
+    let regoptions = [
+      { reg: /@pageSize@/ig, value: 9999 },
+      { reg: /@pageIndex@/ig, value: 1},
+      { reg: /@ID@/ig, value: `''`},
+      { reg: /@BID@/ig, value: `'${BID || ''}'`},
+      { reg: /@LoginUID@/ig, value: `'${sessionStorage.getItem('LoginUID') || ''}'`},
+      { reg: /@SessionUid@/ig, value: `'${localStorage.getItem('SessionUid') || ''}'`},
+      { reg: /@UserID@/ig, value: `'${sessionStorage.getItem('UserID') || ''}'`},
+      { reg: /@Appkey@/ig, value: `'${window.GLOB.appkey || ''}'`},
+      { reg: /@lang@/ig, value: `'${sessionStorage.getItem('lang')}'`},
+      { reg: /@typename@/ig, value: `'admin'`},
+    ]
+
     let LText = params.map((item, index) => {
       let _sql = item.sql
       let _script = item.script
@@ -655,6 +856,20 @@
         `
       }
 
+      _sql = _sql.replace(/@orderBy@/ig, item.order)
+      _script = _script.replace(/@orderBy@/ig, item.order)
+      
+      regoptions.forEach(cell => {
+        _sql = _sql.replace(cell.reg, cell.value)
+        _script = _script.replace(cell.reg, cell.value)
+      })
+
+      // 娴嬭瘯绯荤粺鎵撳嵃鏌ヨ璇彞
+      if (window.GLOB.debugger === true) {
+        _script && window.mkInfo(`${_sql ? '' : '/*涓嶆墽琛岄粯璁ql*/\n'}${_script}`)
+        _sql && window.mkInfo(_sql)
+      }
+
       item.columns.forEach(cell => {
         LText_field.push(`Select '${item.name}' as tablename,'${cell.field}' as fieldname,'${cell.datatype}' as field_type`)
       })
@@ -663,28 +878,27 @@
 
     let param = {
       func: 'sPC_Get_structured_data',
-      LText: LText.join(' union all '),
-      LText_field: LText_field.join(' union all '),
       BID: BID || '',
       username: userName,
       fullName: fullName
     }
 
-    param.LText = Utils.formatOptions(param.LText)
-    param.LText_field = Utils.formatOptions(param.LText_field)
+    if (MenuName) {
+      param.menuname = MenuName
+    }
+
+    param.exec_type = window.GLOB.execType || 'y'
+    param.LText = Utils.formatOptions(LText.join(' union all '), param.exec_type)
+    param.custom_script = Utils.formatOptions(LText_field.join(' union all '), param.exec_type)
+
     param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
-    param.secretkey = Utils.encrypt(param.LText, param.timestamp)
+    param.secretkey = Utils.encrypt('', param.timestamp)
 
     return param
   }
 
-  /**
-   * @description 涓昏〃鏁版嵁鍔犺浇
-   */ 
-  loadmaindata = (params) => {
-    const { components, limit } = this.state.config
-
-    let deffers = params.map(item => {
+  loadinit = (initInters, params) => {
+    let deffers = initInters.map(item => {
       let componentId = item.componentId
       delete item.componentId
       return new Promise(resolve => {
@@ -695,9 +909,65 @@
               message: res.message,
               duration: 5
             })
+            resolve()
+          } else {
+            let _data = { $$empty: true }
+            if (res.data && res.data[0]) {
+              _data = res.data[0]
+            }
+            window.GLOB.CacheData.set(componentId, _data)
+          }
+          resolve()
+        })
+      })
+    })
+
+    Promise.all(deffers).then(() => {
+      if (params.length === 0) {
+        this.setState({loadingview: false, pages: [this.state.config.components]})
+      } else {
+        this.loadmaindata(params)
+      }
+    })
+  }
+
+  /**
+   * @description 涓昏〃鏁版嵁鍔犺浇
+   */ 
+  loadmaindata = (params) => {
+    const { components, limit } = this.state.config
+
+    let deffers = params.map(item => {
+      let componentId = item.componentId
+      let ispublic = item.public
+      delete item.componentId
+      delete item.public
+      return new Promise(resolve => {
+        Api.genericInterface(item).then(res => {
+          if (!res.status) {
+            if (item.func === 'sPC_Get_structured_data' && /灏嗘埅鏂瓧绗︿覆鎴栦簩杩涘埗鏁版嵁/ig.test(res.message)) {
+              res.message = res.message + '璇锋鏌ュ瓧娈甸泦'
+            }
+            if (res.ErrCode === 'version_up') {
+              this.reloadTabs()
+            } else {
+              notification.warning({
+                top: 92,
+                message: res.message,
+                duration: 5
+              })
+            }
             resolve(false)
           } else {
             res.componentId = componentId
+
+            if (ispublic) {
+              let _data = { $$empty: true }
+              if (res.data && res.data[0]) {
+                _data = res.data[0]
+              }
+              window.GLOB.CacheData.set(componentId, _data)
+            }
             resolve(res)
           }
         })
@@ -718,7 +988,7 @@
         }
 
         _results.forEach(res => {
-          if (res.componentId === item.uuid && res.data) {
+          if ((res.componentId === item.uuid || res.componentId === item.componentId) && res.data) {
             item.dataArray = fromJS(res.data).toJS()
           } else if (res.componentId === 'union' && res[item.dataName]) {
             let data = res[item.dataName]
@@ -846,6 +1116,28 @@
     })
   }
 
+  reloadTabs = () => {
+    if (this.reloading) return
+
+    let time = new Date().getTime()
+
+    let oldTime = sessionStorage.getItem('mk_reloadTabs')
+    
+    if (oldTime && time - oldTime < 180000) return
+
+    sessionStorage.setItem('mk_reloadTabs', time)
+
+    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')
@@ -882,7 +1174,7 @@
         if (!res.status) {
           notification.warning({
             top: 92,
-            message: res.message,
+            message: res.message || '鎵ц澶辫触锛�',
             duration: 5
           })
 
@@ -890,9 +1182,11 @@
           return
         }
 
+        let refresh = !/@no_target_menu@/i.test(res.message)
+
         this.setState({loading: false})
 
-        if (pageId) {
+        if (pageId && refresh) {
           localStorage.setItem('menuUpdate', new Date().getTime() + ',' + pageId + ',menu')
         }
 
@@ -1095,7 +1389,7 @@
   }
 
   render() {
-    const { loadingview, viewlost, config, pages, auto, rePos, loading } = this.state
+    const { loadingview, viewlost, config, pages, auto, rePos, loading, ismob } = this.state
 
     return (
       <div className="bill-print-wrap" >
@@ -1105,8 +1399,8 @@
         </div> : null}
         {viewlost ? <NotFount msg={this.state.lostmsg} /> : null}
         {config && window.GLOB.breakpoint ? <DebugTable /> : null}
-        {pages && !loadingview && !viewlost ? <div className="print-button"><Button icon="printer" size="large" shape="circle" onClick={this.print}></Button></div> : null}
-        {!loadingview && !viewlost ? <div className="refresh-button"><Button icon="reload" size="large" shape="circle" onClick={this.reload}></Button></div> : null}
+        {pages && !loadingview && !viewlost && !ismob ? <div className="print-button"><Button icon="printer" size="large" shape="circle" onClick={this.print}></Button></div> : null}
+        {!loadingview && !viewlost && !ismob ? <div className="refresh-button"><Button icon="reload" size="large" shape="circle" onClick={this.reload}></Button></div> : null}
       </div>
     )
   }

--
Gitblit v1.8.0