From 8190d6e5ac14616d85e3992169ecef6d99d03b76 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期五, 13 十一月 2020 15:29:57 +0800
Subject: [PATCH] 2020-11-13

---
 src/tabviews/treepage/index.jsx                                       |    4 
 src/tabviews/formtab/index.jsx                                        |    4 
 src/locales/zh-CN/mob.js                                              |    1 
 src/tabviews/verupmanage/subtabtable/index.jsx                        |   15 
 src/templates/sharecomponent/actioncomponent/actionform/index.jsx     |   26 ++
 src/tabviews/calendar/index.jsx                                       |    6 
 src/views/menudesign/printmenuform/index.jsx                          |    3 
 src/tabviews/zshare/actionList/exceloutbutton/index.jsx               |    3 
 src/menu/modelsource/option.jsx                                       |    2 
 src/views/billprint/index.scss                                        |    4 
 src/api/index.js                                                      |   19 ++
 src/tabviews/custom/index.jsx                                         |   38 ++-
 src/tabviews/scriptmanage/index.jsx                                   |   11 
 src/tabviews/zshare/actionList/newpagebutton/index.jsx                |   13 +
 src/views/billprint/index.jsx                                         |   64 ++----
 src/tabviews/commontable/index.jsx                                    |    6 
 src/menu/header/index.jsx                                             |   77 --------
 src/tabviews/verupmanage/index.jsx                                    |    9 
 src/views/menudesign/index.jsx                                        |  176 +++++++++---------
 src/locales/en-US/mob.js                                              |    1 
 src/menu/datasource/verifycard/index.jsx                              |    6 
 src/templates/sharecomponent/actioncomponent/verifyexcelout/index.jsx |   25 +-
 22 files changed, 232 insertions(+), 281 deletions(-)

diff --git a/src/api/index.js b/src/api/index.js
index 6821ef2..c8a621d 100644
--- a/src/api/index.js
+++ b/src/api/index.js
@@ -290,12 +290,29 @@
             reject()
             return
           }
+          let clear = false
           let version = res.app_version || '1.00'
           appVersion.newVersion = version
           appVersion.oldVersion = appVersion.oldVersion || version
 
+          if (res.menu_data && res.menu_data.length > 0) {
+            let keys = `1581067625930haged11ieaivpavv77k,1581734956310scks442ul2d955g9tu5,1583991994144ndddg0bhh0is6shi0v1,1583979633842550imkchl4qt4qppsiv,1578900109100np8aqd0a77q3na46oas,16044812935562g807p3p12huk8kokmb,
+              1585192949946f3et2ts8tn82krmumdf,15855615451212m12ip23vpcm79kloro,1587005717541lov40vg61q7l1rbveon,1590458676585agbbr63t6ihighg2i1g,1602315375262ikd33ii0nii34pt861o,1582771068837vsv54a089lgp45migbg,
+              1582777675954ifu05upurs465omoth7,158294809668898cklbv6c5bou8e1fpu,1584676379094iktph45fb8imhg96bql,1584695125339vo5g7iqgfn01qmrd6s2,1584699661372vhmpp9dn9foo0eob722,15848421131551gg04ie8sitsd3f7467,
+              1589782279158ngr675kk3oksin35sul,1589788042787ffdt9hle4s45k9r1nvs,15900310928174dro07ihfckghpb5h13,1594095599055qicg2eb642v5qglhnuo,1599613340050c8nu6rbst9d4emnnbsq,1577972969199lei1g0qkvlh4tkc908m,
+              1578479100252lfbp29v1kafk4s4q4ig,1577971621421tg4v0i1ur8873k7e0ob,1577929944419lgc5h3hepum765e2k7u,1588493493409k9guqp067d31lu7blsv`
+
+            res.menu_data.forEach(mid => {
+              if (keys.indexOf(mid.menuid) > -1) {
+                clear = true
+              }
+            })
+          }
+
           mkDataBase.transaction(tx => {
-            if (res.menu_data && res.menu_data.length > 0) {
+            if (clear) {
+              tx.executeSql(`DELETE FROM CONFIGS`, [], () => {}, () => { reject() })
+            } else if (res.menu_data && res.menu_data.length > 0) {
               let keys = res.menu_data.map(mid => `'${mid.menuid}'`)
               tx.executeSql(`DELETE FROM CONFIGS where menuid in (${keys.join(',')})`, [], () => {}, () => {
                 reject()
diff --git a/src/locales/en-US/mob.js b/src/locales/en-US/mob.js
index ff4d6b0..f01e7e8 100644
--- a/src/locales/en-US/mob.js
+++ b/src/locales/en-US/mob.js
@@ -5,6 +5,7 @@
   'mob.cancel': '鍙栨秷',
   'mob.edit': '缂栬緫',
   'mob.logout': '閫�鍑�',
+  'mob.return': '杩斿洖',
   'mob.name': '鍚嶇О',
   'mob.param': '鍙傛暟',
   'mob.enable': '鍚�',
diff --git a/src/locales/zh-CN/mob.js b/src/locales/zh-CN/mob.js
index 39f2fff..414cea3 100644
--- a/src/locales/zh-CN/mob.js
+++ b/src/locales/zh-CN/mob.js
@@ -5,6 +5,7 @@
   'mob.cancel': '鍙栨秷',
   'mob.edit': '缂栬緫',
   'mob.logout': '閫�鍑�',
+  'mob.return': '杩斿洖',
   'mob.name': '鍚嶇О',
   'mob.param': '鍙傛暟',
   'mob.enable': '鍚�',
diff --git a/src/menu/datasource/verifycard/index.jsx b/src/menu/datasource/verifycard/index.jsx
index 96f6126..ed407b2 100644
--- a/src/menu/datasource/verifycard/index.jsx
+++ b/src/menu/datasource/verifycard/index.jsx
@@ -177,9 +177,9 @@
 
     let _setting = fromJS(config.setting).toJS()
 
-    // if (!_setting.varMark) {
-    //   _setting.varMark = this.getMark(Marks)
-    // }
+    if (_setting.varMark === undefined) {
+      _setting.varMark = this.getMark(Marks)
+    }
 
     this.setState({
       columns: fromJS(config.columns).toJS(),
diff --git a/src/menu/header/index.jsx b/src/menu/header/index.jsx
index 348c2e1..7087ee9 100644
--- a/src/menu/header/index.jsx
+++ b/src/menu/header/index.jsx
@@ -1,103 +1,34 @@
 import React, {Component} from 'react'
-import PropTypes from 'prop-types'
 import { is, fromJS } from 'immutable'
-import { connect } from 'react-redux'
-import { withRouter } from 'react-router-dom'
-// import { Icon, Modal } from 'antd'
 
-import { logout } from '@/store/action'
-import zhCN from '@/locales/zh-CN/mob.js'
-import enUS from '@/locales/en-US/mob.js'
 import avatar from '@/assets/img/avatar.jpg'
 import './index.scss'
 
-// const { confirm } = Modal
-
-class MobHeader extends Component {
-  static propTpyes = {
-    saveIng: PropTypes.any,
-    triggerSave: PropTypes.func,
-    closeView: PropTypes.func
-  }
-
+class MenuHeader extends Component {
   state = {
-    dict: localStorage.getItem('lang') !== 'en-US' ? zhCN : enUS,
     logourl: window.GLOB.mainlogo,
     avatar: sessionStorage.getItem('CloudAvatar') || avatar,
     userName: sessionStorage.getItem('CloudUserName')
   }
 
-  // logout = () => {
-  //   // 閫�鍑虹櫥褰�
-  //   let _this = this
-  //   confirm({
-  //     title: this.state.dict['mob.logout.hint'],
-  //     content: '',
-  //     onOk() {
-  //       sessionStorage.clear()
-  //       _this.props.logout()
-  //       _this.props.history.replace('/login')
-  //     },
-  //     onCancel() {}
-  //   })
-  // }
-
   shouldComponentUpdate (nextProps, nextState) {
-    return !is(fromJS(this.props), fromJS(nextProps)) || !is(fromJS(this.state), fromJS(nextState))
+    return !is(fromJS(this.state), fromJS(nextState))
   }
-
-  // componentDidMount () {
-  //   this.getImage()
-  // }
-
-  // getImage = () => {
-  //   const { logourl } = this.state
-  //   const _this = this
-
-  //   let xhr = new XMLHttpRequest()
-  //   xhr.open('get', logourl, true)
-  //   xhr.responseType = 'blob'
-  //   xhr.onload = function () {
-  //     if (this.status === 200) {
-  //       // document.getElementById(imgId).src =  URL.createObjectURL(this.response)
-  //       _this.setState({
-  //         logourl: URL.createObjectURL(this.response)
-  //       })
-  //     }
-  //   }
-  //   xhr.send(null)
-  // }
 
   render () {
 
     return (
       <header className="menu-header-container">
         <div className="header-logo"><img src={this.state.logourl} alt=""/></div>
-        {/* <Dropdown className="header-setting" overlay={
-          <Menu>
-            <Menu.Item key="2" onClick={this.logout}>{this.state.dict['mob.logout']}</Menu.Item>
-          </Menu>
-        }> */}
           <div className="header-setting">
             <img src={this.state.avatar} alt=""/>
             <span>
-              <span className="username">{this.state.userName}</span>{/* <Icon type="down" /> */}
+              <span className="username">{this.state.userName}</span>
             </span>
           </div>
-        {/* </Dropdown> */}
       </header>
     )
   }
 }
 
-const mapStateToProps = () => {
-  return {}
-}
-
-const mapDispatchToProps = (dispatch) => {
-  return {
-    logout: () => dispatch(logout())
-  }
-}
-
-export default withRouter(connect(mapStateToProps, mapDispatchToProps)(MobHeader))
\ No newline at end of file
+export default MenuHeader
\ No newline at end of file
diff --git a/src/menu/modelsource/option.jsx b/src/menu/modelsource/option.jsx
index c74af33..51ca926 100644
--- a/src/menu/modelsource/option.jsx
+++ b/src/menu/modelsource/option.jsx
@@ -19,7 +19,7 @@
 export const menuOptions = [
   { type: 'menu', url: tabs, component: 'tabs', subtype: 'tabs', title: '鏍囩椤�', width: 24, forbid: ['billPrint'] },
   { type: 'menu', url: Mainsearch, component: 'search', subtype: 'mainsearch', title: '鎼滅储鏉′欢', width: 24, forbid: ['billPrint'] },
-  { type: 'menu', url: card1, component: 'card', subtype: 'datacard', title: '鏁版嵁鍗�', config: `[{"uuid":"160135809128212dm7i29fim9ksto9od","setting":{"width":6},"style":{"paddingTop":"15px","marginTop":"4px","paddingRight":"15px","marginRight":"8px","marginLeft":"8px","backgroundColor":"rgba(255, 255, 255, 1)","borderColor":"#e8e8e8","paddingLeft":"15px","marginBottom":"4px","borderWidth":"1px","paddingBottom":"10px"},"backStyle":{},"elements":[{"datatype":"static","width":12,"marks":null,"height":1,"value":"鍏冲崟","style":{},"prefix":"","postfix":"","format":"","eleType":"text","uuid":"160231860159931untbea62sgokunc5s"},{"datatype":"dynamic","width":12,"marks":null,"style":{"color":"rgba(250, 219, 20, 1)","textAlign":"right"},"btnstyle":{},"eleType":"icon","icon":"question-circle","field":"nvarchar2","uuid":"1602318768361nv8ql4t47sgcsn88b0u"},{"datatype":"static","width":24,"marks":null,"height":1,"innerHeight":36,"value":"100","style":{"fontSize":"24px","fontWeight":"500","color":"rgba(0, 0, 0, 1)"},"prefix":"","btnstyle":{},"postfix":"","format":"","eleType":"text","uuid":"1602318817884v70gtgb65ubnm8mbcvv"},{"color":"#1890ff","width":24,"marks":null,"maxValue":100,"style":{"color":"rgba(250, 140, 22, 1)","paddingTop":"20px","paddingBottom":"10px"},"btnstyle":{},"eleType":"slider","field":"int1","uuid":"16023188871233rkktuvpp1h077igrsu"},{"eleType":"splitline","width":24,"color":"#e8e8e8","uuid":"1602320017038n31bk9o831ggug0tu0b","marks":null,"style":{"marginTop":"10px","marginBottom":"10px"},"btnstyle":{}},{"datatype":"static","width":12,"marks":null,"height":1,"value":"100","style":{"marginTop":"6px"},"prefix":"鍏冲崟","btnstyle":{},"postfix":"","format":"","eleType":"text","uuid":"1602320061243drd7lf3agvn04kgr175"}],"backElements":[]}]` },
+  { type: 'menu', url: card1, component: 'card', subtype: 'datacard', title: '鏁版嵁鍗�', config: `[{"uuid":"160135809128212dm7i29fim9ksto9od","setting":{"width":6},"style":{"paddingTop":"15px","marginTop":"4px","paddingRight":"15px","marginRight":"8px","marginLeft":"8px","backgroundColor":"rgba(255, 255, 255, 1)","borderColor":"#e8e8e8","paddingLeft":"15px","marginBottom":"4px","borderWidth":"1px","paddingBottom":"10px"},"backStyle":{},"elements":[{"datatype":"static","width":12,"marks":null,"height":1,"value":"鍏冲崟","style":{},"prefix":"","postfix":"","format":"","eleType":"text","uuid":"160231860159931untbea62sgokunc5s"},{"datatype":"static","width":12,"marks":null,"style":{"color":"rgba(250, 219, 20, 1)","textAlign":"right"},"btnstyle":{},"eleType":"icon","icon":"question-circle","field":"","uuid":"1602318768361nv8ql4t47sgcsn88b0u"},{"datatype":"static","width":24,"marks":null,"height":1,"innerHeight":36,"value":"100","style":{"fontSize":"24px","fontWeight":"500","color":"rgba(0, 0, 0, 1)"},"prefix":"","btnstyle":{},"postfix":"","format":"","eleType":"text","uuid":"1602318817884v70gtgb65ubnm8mbcvv"},{"color":"#1890ff","width":24,"marks":null,"maxValue":100,"style":{"color":"rgba(250, 140, 22, 1)","paddingTop":"20px","paddingBottom":"10px"},"btnstyle":{},"eleType":"slider","field":"int1","uuid":"16023188871233rkktuvpp1h077igrsu"},{"eleType":"splitline","width":24,"color":"#e8e8e8","uuid":"1602320017038n31bk9o831ggug0tu0b","marks":null,"style":{"marginTop":"10px","marginBottom":"10px"},"btnstyle":{}},{"datatype":"static","width":12,"marks":null,"height":1,"value":"100","style":{"marginTop":"6px"},"prefix":"鍏冲崟","btnstyle":{},"postfix":"","format":"","eleType":"text","uuid":"1602320061243drd7lf3agvn04kgr175"}],"backElements":[]}]` },
   { type: 'menu', url: card2, component: 'card', subtype: 'propcard', title: '灞炴�у崱', config: `[{"uuid":"1603681387259qaqf1127f72esmtchge","setting":{"width":6,"type":"simple"},"style":{"paddingTop":"15px","marginTop":"8px","paddingRight":"15px","marginRight":"8px","marginLeft":"8px","borderColor":"#e8e8e8","paddingLeft":"15px","marginBottom":"8px","borderWidth":"1px","paddingBottom":"15px"},"backStyle":{},"elements":[{"datatype":"static","width":12,"marks":null,"height":1,"value":"瓒呮椂宸ュ崟","style":{"color":"rgba(67, 67, 67, 0.51)"},"prefix":"","postfix":"","format":"","eleType":"text","uuid":"1603681402945qnkgm7q8cng65evn5ev"},{"eleType":"icon","datatype":"static","width":12,"icon":"question-circle","tooltip":"瓒呮椂宸ュ崟","uuid":"1603681473384i2crkbtofg4pu76k06a","marks":null,"style":{"textAlign":"right","color":"rgba(250, 219, 20, 1)"}},{"datatype":"static","width":24,"marks":null,"height":1,"innerHeight":36,"value":"100","style":{"fontSize":"24px","color":"rgba(0, 0, 0, 1)"},"prefix":"","postfix":"","format":"","eleType":"number","uuid":"1603681539870d704ufqf98kc6t7537t"},{"color":"rgba(250, 219, 20, 1)","datatype":"static","width":24,"marks":null,"maxValue":100,"value":50,"style":{"paddingTop":"10px","paddingBottom":"10px"},"eleType":"slider","uuid":"1603683067556mvupau0odvrtv45u7o8"},{"eleType":"splitline","width":24,"color":"#e8e8e8","uuid":"1603683117981t9k55k8an430fuppmci","marks":null,"style":{"paddingTop":"5px","paddingBottom":"5px"}},{"datatype":"static","width":12,"marks":null,"height":1,"value":"100","style":{"color":"rgba(0, 0, 0, 0.65)","marginTop":"10px"},"prefix":"瓒呮椂宸ュ崟  ","postfix":"","format":"","eleType":"text","uuid":"1603683136553uvsmkfohkft9idbfkhu"}],"backElements":[]}]` },
   { type: 'menu', url: TableCard, component: 'table', subtype: 'tablecard', title: '琛ㄦ牸', width: 12 },
   { type: 'menu', url: line, component: 'line', subtype: 'line', title: '鎶樼嚎鍥�' },
diff --git a/src/tabviews/calendar/index.jsx b/src/tabviews/calendar/index.jsx
index 7813ad9..dabdafc 100644
--- a/src/tabviews/calendar/index.jsx
+++ b/src/tabviews/calendar/index.jsx
@@ -522,11 +522,7 @@
 
   UNSAFE_componentWillReceiveProps(nextProps) {
     if (nextProps.refreshTab && nextProps.refreshTab.MenuID === this.props.MenuID) {
-      if (nextProps.refreshTab.position === 'grid') {
-        this.loadmaindata()
-      } else if (nextProps.refreshTab.position === 'view') {
-        this.reloadview()
-      }
+      this.reloadview()
       this.props.refreshTabView('')
     } else if (nextProps.param && !is(fromJS(this.props.param), fromJS(nextProps.param))) {
       let search = this.state.search.map(item => {
diff --git a/src/tabviews/commontable/index.jsx b/src/tabviews/commontable/index.jsx
index 10b5d2e..6b8431d 100644
--- a/src/tabviews/commontable/index.jsx
+++ b/src/tabviews/commontable/index.jsx
@@ -829,11 +829,7 @@
 
   UNSAFE_componentWillReceiveProps(nextProps) {
     if (nextProps.refreshTab && nextProps.refreshTab.MenuID === this.props.MenuID) {
-      if (nextProps.refreshTab.position === 'grid') {
-        this.reloadtable()
-      } else if (nextProps.refreshTab.position === 'view') {
-        this.reloadview()
-      }
+      this.reloadview()
       this.props.refreshTabView('')
     } else if (!is(fromJS(this.props.tabviews), fromJS(nextProps.tabviews))) {
       let selectTab = nextProps.tabviews.filter(tab => tab.selected)[0]
diff --git a/src/tabviews/custom/index.jsx b/src/tabviews/custom/index.jsx
index f667bbb..5d699e3 100644
--- a/src/tabviews/custom/index.jsx
+++ b/src/tabviews/custom/index.jsx
@@ -36,12 +36,12 @@
   state = {
     dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS,
     ContainerId: Utils.getuuid(), // 鑿滃崟澶栧眰html Id
-    BID: null,            // 椤甸潰璺宠浆鏃舵惡甯D
+    BID: '',              // 椤甸潰璺宠浆鏃舵惡甯D
     loadingview: true,    // 椤甸潰鍔犺浇涓�
     viewlost: false,      // 椤甸潰涓㈠け锛�1銆佹湭鑾峰彇鍒伴厤缃�-椤甸潰涓㈠け锛�2銆侀〉闈㈡湭鍚敤
     lostmsg: '',          // 椤甸潰涓㈠け鏃剁殑鎻愮ず淇℃伅
     config: null,         // 椤甸潰閰嶇疆淇℃伅锛屽寘鎷粍浠剁瓑
-    mainSearch: null,
+    mainSearch: null,     // 涓绘悳绱�
     userConfig: null,     // 鐢ㄦ埛鑷畾涔夎缃�
     data: null,           // 鍒楄〃鏁版嵁闆�
     loading: false,       // 鍒楄〃鏁版嵁鍔犺浇涓�
@@ -81,7 +81,7 @@
           userConfig = null
         }
       }
-      
+
       // 椤甸潰閰嶇疆瑙f瀽閿欒鏃舵彁绀�
       if (!config) {
         this.setState({
@@ -141,7 +141,7 @@
 
       let params = []
       let BID = param && param.BID ? param.BID : ''
-      config.components = this.formatSetting(config.components, params, mainSearch, permAction, BID)
+      config.components = this.formatSetting(config.components, params, mainSearch, permAction)
 
       this.setState({
         BID: BID,
@@ -209,7 +209,7 @@
   }
 
   // 鏍煎紡鍖栭粯璁よ缃�
-  formatSetting = (components, params, mainSearch, permAction, BID) => {
+  formatSetting = (components, params, mainSearch, permAction) => {
     return components.map(component => {
       if (component.type === 'tabs') {
         component.subtabs = component.subtabs.map(tab => {
@@ -268,7 +268,7 @@
       // dataName 绯荤粺鐢熸垚鐨勬暟鎹簮鍚嶇О
       // pageable 鏄惁鍒嗛〉锛岀粍浠跺睘鎬э紝涓嶅垎椤电殑缁勪欢鎵嶅彲浠ョ粺涓�鏌ヨ
       if (component.floor === 1 && component.dataName && (!component.pageable || (component.pageable && !component.setting.laypage)) && component.setting.onload === 'true' && component.setting.sync === 'true') {
-        let param = this.getDefaultParam(component, mainSearch, BID)
+        let param = this.getDefaultParam(component, mainSearch)
         params.push(param)
       } else if (component.floor === 1) {
         component.setting.sync = 'false'
@@ -281,7 +281,7 @@
   /**
    * @description 鑾峰彇绯荤粺瀛樺偍杩囩▼ sPC_Get_TableData 鐨勫弬鏁�
    */
-  getDefaultParam = (component, mainSearch, BID) => {
+  getDefaultParam = (component, mainSearch) => {
     const { columns, search, setting, dataName, format } = component
     
     let searchlist = []
@@ -318,9 +318,6 @@
         }
         _customScript = _customScript.replace(item.reg, item.value)
       })
-
-      _dataresource = _dataresource.replace(/@BID@/ig, BID)
-      _customScript = _customScript.replace(/@BID@/ig, BID)
     }
 
     let _search = ''
@@ -377,7 +374,8 @@
     let param = {
       func: 'sPC_Get_structured_data',
       LText: LText.join(' union all '),
-      LText_field: LText_field.join(' union all ')
+      LText_field: LText_field.join(' union all '),
+      BID: this.state.BID || ''
     }
 
     param.LText = Utils.formatOptions(param.LText)
@@ -439,7 +437,10 @@
   }
 
   UNSAFE_componentWillReceiveProps(nextProps) {
-
+    if (nextProps.refreshTab && nextProps.refreshTab.MenuID === this.props.MenuID) {
+      this.reloadview()
+      this.props.refreshTabView('')
+    }
   }
 
   shouldComponentUpdate (nextProps, nextState) {
@@ -453,6 +454,18 @@
     this.setState = () => {
       return
     }
+  }
+
+  reloadview = () => {
+    this.setState({
+      BID: '',              // 椤甸潰璺宠浆鏃舵惡甯D
+      loadingview: true,    // 椤甸潰鍔犺浇涓�
+      viewlost: false,      // 椤甸潰涓㈠け锛�1銆佹湭鑾峰彇鍒伴厤缃�-椤甸潰涓㈠け锛�2銆侀〉闈㈡湭鍚敤
+      config: null,         // 椤甸潰閰嶇疆淇℃伅锛屽寘鎷粍浠剁瓑
+      loading: false        // 鍒楄〃鏁版嵁鍔犺浇涓�
+    }, () => {
+      this.loadconfig()
+    })
   }
 
   resetSearch = (search) => {
@@ -537,7 +550,6 @@
 const mapStateToProps = (state) => {
   return {
     menuType: state.editLevel,
-    tabviews: state.tabviews,
     refreshTab: state.refreshTab,
     permAction: state.permAction,
     permRoles: state.permRoles,
diff --git a/src/tabviews/formtab/index.jsx b/src/tabviews/formtab/index.jsx
index c618b94..719b1c0 100644
--- a/src/tabviews/formtab/index.jsx
+++ b/src/tabviews/formtab/index.jsx
@@ -529,8 +529,7 @@
       } else {
         if (btn.execSuccess !== 'never') {
           let PMenu = {
-            MenuID: this.props.param.parentId || '',
-            position: btn.execSuccess
+            MenuID: this.props.param.parentId || ''
           }
           this.props.refreshTabView(PMenu)
         }
@@ -557,7 +556,6 @@
         if (btn.execError !== 'never') {
           let PMenu = {
             MenuID: this.props.param.parentId || '',
-            position: btn.execError
           }
           this.props.refreshTabView(PMenu)
         }
diff --git a/src/tabviews/scriptmanage/index.jsx b/src/tabviews/scriptmanage/index.jsx
index 3b8541d..83b17f8 100644
--- a/src/tabviews/scriptmanage/index.jsx
+++ b/src/tabviews/scriptmanage/index.jsx
@@ -10,6 +10,7 @@
 import Utils from '@/utils/utils.js'
 import options from '@/store/options.js'
 import { scriptMainTable, buttonConfig } from './config'
+import MKEmitter from '@/utils/events.js'
 
 import asyncSpinComponent from '@/utils/asyncSpinComponent'
 import TopSearch from './topSearch'
@@ -37,7 +38,6 @@
     setting: {},          // 椤甸潰鍏ㄥ眬璁剧疆锛氭暟鎹簮銆佹寜閽強鏄剧ず鍒楀浐瀹氥�佷富閿瓑
     data: [],             // 鍒楄〃鏁版嵁闆�
     selectedData: [],     // 宸查�夎〃鏍兼暟鎹�
-    resetTable: false,    // 琛ㄦ牸閲嶇疆锛屽�煎湪true涓巉alse涔嬮棿鍒囨崲锛屽垏鎹㈡椂琛ㄦ牸閲嶇疆
     total: 0,             // 鎬绘暟
     loading: false,       // 鍒楄〃鏁版嵁鍔犺浇涓�
     pageIndex: 1,         // 椤电爜
@@ -195,12 +195,12 @@
    * 鍚湁鍒濆涓嶅姞杞界殑椤甸潰锛屼慨鏀硅缃�
    */
   refreshbysearch = (searches) => {
+    MKEmitter.emit('resetTable', this.props.MenuID + 'mainTable') // 鍒楄〃閲嶇疆
     this.setState({
       loading: true,
       pageIndex: 1,
       selectedData: [],
-      search: searches,
-      resetTable: !this.state.resetTable
+      search: searches
     }, () => {
       this.loadmaindata()
     })
@@ -233,11 +233,11 @@
    * @description 琛ㄦ牸鍒锋柊
    */
   reloadtable = () => {
+    MKEmitter.emit('resetTable', this.props.MenuID + 'mainTable') // 鍒楄〃閲嶇疆
     this.setState({
       loading: true,
       pageIndex: 1,
-      selectedData: [],
-      resetTable: !this.state.resetTable
+      selectedData: []
     }, () => {
       this.loadmaindata()
     })
@@ -346,7 +346,6 @@
             refreshdata={this.refreshbytable}
             buttonTrigger={() => {}}
             handleTableId={() => {}}
-            resetTable={this.state.resetTable}
             chgSelectData={this.changeSelectedData}
           />
         </div>
diff --git a/src/tabviews/treepage/index.jsx b/src/tabviews/treepage/index.jsx
index 5bfd81f..d90534d 100644
--- a/src/tabviews/treepage/index.jsx
+++ b/src/tabviews/treepage/index.jsx
@@ -683,9 +683,7 @@
 
   UNSAFE_componentWillReceiveProps(nextProps) {
     if (nextProps.refreshTab && nextProps.refreshTab.MenuID === this.props.MenuID) {
-      if (nextProps.refreshTab.position === 'view') {
-        this.reloadview()
-      }
+      this.reloadview()
       this.props.refreshTabView('')
     } else if (!is(fromJS(this.props.tabviews), fromJS(nextProps.tabviews))) {
       let selectTab = nextProps.tabviews.filter(tab => tab.selected)[0]
diff --git a/src/tabviews/verupmanage/index.jsx b/src/tabviews/verupmanage/index.jsx
index 5e4ca30..4cfd03f 100644
--- a/src/tabviews/verupmanage/index.jsx
+++ b/src/tabviews/verupmanage/index.jsx
@@ -11,6 +11,7 @@
 import options from '@/store/options.js'
 import asyncSpinComponent from '@/utils/asyncSpinComponent'
 import { verupMainTable, buttonConfig } from './config'
+import MKEmitter from '@/utils/events.js'
 
 import TopSearch from './topSearch'
 import MainAction from './actionList'
@@ -40,7 +41,6 @@
     setting: {},          // 椤甸潰鍏ㄥ眬璁剧疆锛氭暟鎹簮銆佹寜閽強鏄剧ず鍒楀浐瀹氥�佷富閿瓑
     data: [],             // 鍒楄〃鏁版嵁闆�
     selectedData: [],     // 宸查�夎〃鏍兼暟鎹�
-    resetTable: false,    // 琛ㄦ牸閲嶇疆锛屽�煎湪true涓巉alse涔嬮棿鍒囨崲锛屽垏鎹㈡椂琛ㄦ牸閲嶇疆
     total: 0,             // 鎬绘暟
     loading: false,       // 鍒楄〃鏁版嵁鍔犺浇涓�
     pageIndex: 1,         // 椤电爜
@@ -279,11 +279,11 @@
    * 鍚湁鍒濆涓嶅姞杞界殑椤甸潰锛屼慨鏀硅缃�
    */
   refreshbysearch = (searches) => {
+    MKEmitter.emit('resetTable', this.props.MenuID + 'mainTable') // 鍒楄〃閲嶇疆
     this.setState({
       loading: true,
       pageIndex: 1,
       selectedData: [],
-      resetTable: !this.state.resetTable,
       search: searches
     }, () => {
       this.loadmaindata()
@@ -317,11 +317,11 @@
    * @description 琛ㄦ牸鍒锋柊
    */
   reloadtable = () => {
+    MKEmitter.emit('resetTable', this.props.MenuID + 'mainTable') // 鍒楄〃閲嶇疆
     this.setState({
       pageIndex: 1,
       loading: true,
-      selectedData: [],
-      resetTable: !this.state.resetTable
+      selectedData: []
     }, () => {
       this.loadmaindata()
     })
@@ -484,7 +484,6 @@
             refreshdata={this.refreshbytable}
             buttonTrigger={() => {}}
             handleTableId={this.handleTableId}
-            resetTable={this.state.resetTable}
             chgSelectData={this.changeSelectedData}
           />
         </div>
diff --git a/src/tabviews/verupmanage/subtabtable/index.jsx b/src/tabviews/verupmanage/subtabtable/index.jsx
index cb714a6..21f2026 100644
--- a/src/tabviews/verupmanage/subtabtable/index.jsx
+++ b/src/tabviews/verupmanage/subtabtable/index.jsx
@@ -10,6 +10,7 @@
 import Utils from '@/utils/utils.js'
 import options from '@/store/options.js'
 import { buttonConfig, tabConfig } from '../config'
+import MKEmitter from '@/utils/events.js'
 
 import asyncSpinComponent from '@/utils/asyncSpinComponent'
 import SubAction from '../actionList'
@@ -43,7 +44,6 @@
     setting: null,        // 椤甸潰鍏ㄥ眬璁剧疆锛氭暟鎹簮銆佹寜閽強鏄剧ず鍒楀浐瀹氥�佷富閿瓑
     data: null,           // 鍒楄〃鏁版嵁闆�
     selectedData: [],     // 宸查�夎〃鏍兼暟鎹�
-    resetTable: false,    // 琛ㄦ牸閲嶇疆锛屽�煎湪true涓巉alse涔嬮棿鍒囨崲锛屽垏鎹㈡椂琛ㄦ牸閲嶇疆
     total: 0,             // 鎬绘暟
     loading: false,       // 鍒楄〃鏁版嵁鍔犺浇涓�
     pageIndex: 1,         // 椤电爜
@@ -63,9 +63,9 @@
     if (this.state.config && this.props.Tab.supMenu && !is(fromJS(this.props.BID), fromJS(nextProps.BID))) {
       this.setState({
         pageIndex: 1,
-        selectedData: [],
-        resetTable: !this.state.resetTable,
+        selectedData: []
       }, () => {
+        MKEmitter.emit('resetTable', this.props.MenuID + this.props.Tab.uuid) // 鍒楄〃閲嶇疆
         this.loadmaindata(nextProps.BID, 'refresh')
       })
     } else if (this.state.config && nextProps.refreshtabs && nextProps.refreshtabs.includes(this.props.Tab.uuid)) {
@@ -303,12 +303,12 @@
    * 鍚湁鍒濆涓嶅姞杞界殑椤甸潰锛屼慨鏀硅缃�
    */
   refreshbysearch = (searches) => {
+    MKEmitter.emit('resetTable', this.props.MenuID + this.props.Tab.uuid) // 鍒楄〃閲嶇疆
     this.setState({
       loading: true,
       pageIndex: 1,
       selectedData: [],
-      search: searches,
-      resetTable: !this.state.resetTable
+      search: searches
     }, () => {
       this.loadmaindata()
     })
@@ -341,11 +341,11 @@
    * @description 琛ㄦ牸鍒锋柊
    */
   reloadtable = () => {
+    MKEmitter.emit('resetTable', this.props.MenuID + this.props.Tab.uuid) // 鍒楄〃閲嶇疆
     this.setState({
       loading: true,
       pageIndex: 1,
-      selectedData: [],
-      resetTable: !this.state.resetTable
+      selectedData: []
     }, () => {
       this.loadmaindata()
     })
@@ -488,7 +488,6 @@
               refreshdata={this.refreshbytable}
               buttonTrigger={() => {}}
               handleTableId={this.handleTableId}
-              resetTable={this.state.resetTable}
               chgSelectData={this.changeSelectedData}
             />
           </div> : null
diff --git a/src/tabviews/zshare/actionList/exceloutbutton/index.jsx b/src/tabviews/zshare/actionList/exceloutbutton/index.jsx
index 1c24be0..53ad8fe 100644
--- a/src/tabviews/zshare/actionList/exceloutbutton/index.jsx
+++ b/src/tabviews/zshare/actionList/exceloutbutton/index.jsx
@@ -607,6 +607,9 @@
     }
 
     if (param.custom_script) {
+      param.custom_script = `declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000) select @ErrorCode='',@retmsg =''
+        ${param.custom_script}
+      `
       regoptions.forEach(item => {
         param.custom_script = param.custom_script.replace(item.reg, item.value)
       })
diff --git a/src/tabviews/zshare/actionList/newpagebutton/index.jsx b/src/tabviews/zshare/actionList/newpagebutton/index.jsx
index 58da1e0..764f1b7 100644
--- a/src/tabviews/zshare/actionList/newpagebutton/index.jsx
+++ b/src/tabviews/zshare/actionList/newpagebutton/index.jsx
@@ -63,7 +63,7 @@
         duration: 5
       })
       return
-    } else if (btn.Ot === 'requiredSgl' && !setting.primaryKey) {
+    } else if (btn.Ot !== 'notRequired' && !setting.primaryKey) {
       // 闇�瑕侀�夋嫨琛屾椂锛屾牎楠屾槸鍚﹁缃富閿�
       notification.warning({
         top: 92,
@@ -92,8 +92,15 @@
     }
 
     if (btn.pageTemplate === 'billprint') {
-      let src = '#/billprint/' + window.btoa(window.encodeURIComponent(JSON.stringify({ id: Id, tempId: btn.printTemp, dataManager: dataManager })))
-      window.open(src)
+      if (btn.Ot === 'required' && data && data.length > 0) {
+        data.forEach((item, i) => {
+          let _id = item[setting.primaryKey] || ''
+          let url = '#/billprint/' + window.btoa(window.encodeURIComponent(JSON.stringify({ id: _id, tempId: btn.printTemp, dataManager: dataManager })))
+          window.open(url)
+        })
+      } else {
+        window.open('#/billprint/' + window.btoa(window.encodeURIComponent(JSON.stringify({ id: Id, tempId: btn.printTemp, dataManager: dataManager }))))
+      }
     } else if (btn.pageTemplate === 'billprintTemp') {
       let src = '#/menudesign/' + window.btoa(window.encodeURIComponent(JSON.stringify({ MenuType: 'billPrint', MenuId: Id, MenuNo: MenuNo, MenuName: name || '鎵撳嵃', Remark: Remark })))
       window.open(src)
diff --git a/src/templates/sharecomponent/actioncomponent/actionform/index.jsx b/src/templates/sharecomponent/actioncomponent/actionform/index.jsx
index fb9af54..3ee5f04 100644
--- a/src/templates/sharecomponent/actioncomponent/actionform/index.jsx
+++ b/src/templates/sharecomponent/actioncomponent/actionform/index.jsx
@@ -38,6 +38,7 @@
     interType: null, // 鎺ュ彛绫诲瀷锛氬唴閮ㄣ�佸閮�
     funcType: null,  // 鍔熻兘绫诲瀷
     position: null,  // 鎸夐挳浣嶇疆
+    pageTemplate: null,
     requireOptions: [{
       value: 'notRequired',
       text: this.props.dict['header.form.notRequired']
@@ -83,6 +84,7 @@
     let _intertype = card.intertype || 'system' // 鎺ュ彛绫诲瀷
     let _funcType = card.funcType || ''         // 鍔熻兘鎸夐挳榛樿绫诲瀷
     let _tabTemplate = card.tabTemplate         // 鎸夐挳涓烘爣绛鹃〉鏃讹紝鏍囩绫诲瀷锛氫笁绾ц彍鍗曟垨琛ㄥ崟鏍囩椤�
+    let _pageTemplate = card.pageTemplate       // 鏂伴〉闈㈢被鍨�
 
     if (card.execMode) {                        // 杞崲鎵撳嵃鏃舵墦寮�鏂瑰紡
       _opentype = 'funcbutton'
@@ -94,10 +96,11 @@
     }
 
     let _tabs = this.props.tabs.filter(tab => tab.type === _tabType)
-    let _options = this.getOptions(_opentype, _intertype, _funcType, card.pageTemplate, _tabTemplate)
+    let _options = this.getOptions(_opentype, _intertype, _funcType, _pageTemplate, _tabTemplate)
     
     this.setState({
       openType: _opentype,
+      pageTemplate: _pageTemplate,
       menulist: _menulist.options || [],
       interType: _intertype,
       position: card.position || 'toolbar',
@@ -108,8 +111,10 @@
         } else if (item.key === 'icon') {
           item.options = btnIcons
         } else if (item.key === 'Ot') {
-          if (card.position === 'grid' || card.pageTemplate === 'pay') { // 琛岀骇鎸夐挳銆佹敮浠樻寜閽紝鍙兘閫夊崟琛�
+          if (card.position === 'grid' || _pageTemplate === 'pay') { // 琛岀骇鎸夐挳銆佹敮浠樻寜閽紝鍙兘閫夊崟琛�
             item.options = this.state.requireOptions.filter(op => ['requiredSgl'].includes(op.value))
+          } else if (_opentype === 'innerpage' && _pageTemplate === 'billprint') {
+            item.options = this.state.requireOptions.filter(op => ['notRequired', 'requiredSgl', 'required'].includes(op.value))
           } else if (['innerpage', 'blank', 'tab', 'popview', 'excelIn'].includes(_opentype)) {
             item.options = this.state.requireOptions.filter(op => ['notRequired', 'requiredSgl'].includes(op.value))
           } else if (card.sqlType === 'insert') {
@@ -212,7 +217,7 @@
     const { card } = this.props
 
     if (key === 'OpenType') {
-      let _options = this.getOptions(value, this.state.interType, this.state.funcType, card.pageTemplate, card.tabTemplate)
+      let _options = this.getOptions(value, this.state.interType, this.state.funcType, this.state.pageTemplate, card.tabTemplate)
       let _fieldval = {}
       let _formlist = this.state.formlist.map(item => {
         item.hidden = !_options.includes(item.key)
@@ -222,8 +227,11 @@
         if (item.key === 'intertype') {
           _fieldval.intertype = this.state.interType
         } else if (item.key === 'Ot') {
-          if (this.state.position === 'grid') {
+          if (this.state.position === 'grid' || this.state.pageTemplate === 'pay') {
             item.options = this.state.requireOptions.filter(op => ['requiredSgl'].includes(op.value))
+            _fieldval.Ot = 'requiredSgl'
+          } else if (value === 'innerpage' && this.state.pageTemplate === 'billprint') {
+            item.options = this.state.requireOptions.filter(op => ['notRequired', 'requiredSgl', 'required'].includes(op.value))
             _fieldval.Ot = 'requiredSgl'
           } else if (['innerpage', 'blank', 'tab', 'popview'].includes(value)) {
             item.options = this.state.requireOptions.filter(op => ['notRequired', 'requiredSgl'].includes(op.value))
@@ -267,8 +275,11 @@
         position: value,
         formlist: this.state.formlist.map(item => {
           if (item.key === 'Ot') {
-            if (value === 'grid') {
+            if (value === 'grid' || this.state.pageTemplate === 'pay') {
               item.options = this.state.requireOptions.filter(op => ['requiredSgl'].includes(op.value))
+              _fieldval.Ot = 'requiredSgl'
+            } else if (this.state.openType === 'innerpage' && this.state.pageTemplate === 'billprint') {
+              item.options = this.state.requireOptions.filter(op => ['notRequired', 'requiredSgl', 'required'].includes(op.value))
               _fieldval.Ot = 'requiredSgl'
             } else if (['innerpage', 'blank', 'tab', 'popview'].includes(this.state.openType)) {
               item.options = this.state.requireOptions.filter(op => ['notRequired', 'requiredSgl'].includes(op.value))
@@ -361,7 +372,7 @@
       let _fieldval = {}
 
       this.setState({
-        openType: value,
+        pageTemplate: value,
         formlist: this.state.formlist.map(item => {
           item.hidden = !_options.includes(item.key)
 
@@ -369,6 +380,9 @@
             if (value === 'pay') {
               item.options = this.state.requireOptions.filter(op => ['requiredSgl'].includes(op.value))
               _fieldval.Ot = 'requiredSgl'
+            } else if (value === 'billprint') {
+              item.options = this.state.requireOptions.filter(op => ['notRequired', 'requiredSgl', 'required'].includes(op.value))
+              _fieldval.Ot = 'requiredSgl'
             } else {
               item.options = this.state.requireOptions.filter(op => ['notRequired', 'requiredSgl'].includes(op.value))
             }
diff --git a/src/templates/sharecomponent/actioncomponent/verifyexcelout/index.jsx b/src/templates/sharecomponent/actioncomponent/verifyexcelout/index.jsx
index bcb6274..32fe504 100644
--- a/src/templates/sharecomponent/actioncomponent/verifyexcelout/index.jsx
+++ b/src/templates/sharecomponent/actioncomponent/verifyexcelout/index.jsx
@@ -72,21 +72,22 @@
     }
 
     _verify.enable = _verify.enable || 'false'
+    _verify.columns = _verify.columns || []
 
     // 鍚屾鏄剧ず鍒�
-    if (!_verify.columns || _verify.columns.length === 0) {
-      _verify.columns = []
-      config.columns.forEach(item => {
-        if (!item.field) return
+    // if (!_verify.columns || _verify.columns.length === 0) {
+    //   _verify.columns = []
+    //   config.columns.forEach(item => {
+    //     if (!item.field) return
   
-        _verify.columns.push({
-          Column: item.field,
-          Text: item.label,
-          Width: 20,
-          uuid: Utils.getuuid()
-        })
-      })
-    }
+    //     _verify.columns.push({
+    //       Column: item.field,
+    //       Text: item.label,
+    //       Width: 20,
+    //       uuid: Utils.getuuid()
+    //     })
+    //   })
+    // }
 
     if (card.intertype !== 'system') {
       _verify.enable = 'false'
diff --git a/src/views/billprint/index.jsx b/src/views/billprint/index.jsx
index 57d0ea1..33a6125 100644
--- a/src/views/billprint/index.jsx
+++ b/src/views/billprint/index.jsx
@@ -107,46 +107,29 @@
         }
 
         config.style = config.style || {}
+        config.zoom = 1
 
-        if (config.pageSize === 'A0') {
+        if (config.pageSize === 'A3') {
           if (config.pageLayout === 'horizontal') {
-            config.style.height = 1305
+            config.zoom = 1.35
+            config.style.height = 845
           } else {
-            config.style.height = 1305
-          }
-        } else if (config.pageSize === 'A1') {
-          if (config.pageLayout === 'horizontal') {
-            config.style.height = 1305
-          } else {
-            config.style.height = 1305
-          }
-        } else if (config.pageSize === 'A2') {
-          if (config.pageLayout === 'horizontal') {
-            config.style.height = 1305
-          } else {
-            config.style.height = 1305
-          }
-        } else if (config.pageSize === 'A3') {
-          if (config.pageLayout === 'horizontal') {
-            config.style.height = 1305
-          } else {
-            config.style.height = 1305
+            config.style.height = 1695
           }
         } else if (config.pageSize === 'A5') {
+          config.zoom = 0.7
           if (config.pageLayout === 'horizontal') {
-            config.style.height = 1305
+            config.style.height = 840
           } else {
-            config.style.height = 1305
+            config.style.height = 1700
           }
         } else {
           if (config.pageLayout === 'horizontal') {
-            config.style.height = 895
+            config.style.height = 845
           } else {
-            config.style.height = 1305
+            config.style.height = 1680
           }
         }
-
-        // config.style.height = 895
 
         let params = []
         let _pars = []
@@ -194,9 +177,6 @@
             component.setting.dataresource = component.setting.dataresource.replace(/@\$|\$@/ig, '')
             _customScript = _customScript.replace(/@\$|\$@/ig, '')
           }
-
-          component.setting.dataresource = component.setting.dataresource.replace(/@BID@/ig, BID)
-          _customScript = _customScript.replace(/@BID@/ig, BID)
     
           component.setting.customScript = _customScript // 鏁寸悊鍚庤嚜瀹氫箟鑴氭湰
     
@@ -280,6 +260,8 @@
   }
 
   getFormatParam = (params) => {
+    const { BID } = this.state
+
     if (!params || params.length === 0) return ''
     let LText_field = []
     let LText = params.map((item, index) => {
@@ -301,7 +283,8 @@
     let param = {
       func: 'sPC_Get_structured_data',
       LText: LText.join(' union all '),
-      LText_field: LText_field.join(' union all ')
+      LText_field: LText_field.join(' union all '),
+      BID: BID || ''
     }
 
     param.LText = Utils.formatOptions(param.LText)
@@ -366,7 +349,6 @@
         this.setState({loadingview: false, pages})
       }
 
-      // everyPCount, firstCount, lastCount
       while (!over) {
         let page = []
         let count = 0
@@ -463,10 +445,13 @@
   }
 
   print = () => {
-    let bdhtml = window.document.body.innerHTML
+    const { config } = this.state
+
     let jubuData = document.getElementById('bill-print').innerHTML
     window.document.body.innerHTML = jubuData
-    document.getElementsByTagName('body')[0].style.zoom = 0.8
+    document.getElementsByTagName('body')[0].style.width = '1200px'
+    document.getElementsByTagName('body')[0].style.margin = '0 auto'
+    document.getElementsByTagName('body')[0].style.zoom = config.zoom
 
     try {
       if (window.ActiveXObject) {
@@ -508,6 +493,12 @@
       } else {
         window.print()
       }
+
+      document.getElementsByTagName('body')[0].style.zoom = 1
+
+      setTimeout(() => {
+        window.close()
+      }, 2000)
     } catch (e) {
       notification.warning({
         top: 92,
@@ -515,9 +506,6 @@
         duration: 5
       })
     }
-
-    window.document.body.innerHTML = bdhtml
-    window.location.reload()
   }
 
   getComponents = (components) => {
@@ -561,7 +549,7 @@
       <div className="bill-print-wrap" >
         {loadingview && <Spin size="large" />}
         {pages ? <div id="bill-print">
-          {pages.map((components, index) => (<div className="print-page" key={index} style={config.style}><Row>{this.getComponents(components)}</Row></div>))}
+          {pages.map((components, index) => (<div className="print-page" key={index} style={{...config.style, overflow: 'hidden'}}><Row>{this.getComponents(components)}</Row></div>))}
         </div> : null}
         {viewlost ? <NotFount msg={this.state.lostmsg} /> : null}
         {pages && !loadingview && !viewlost ? <div className="print-button"><Button icon="printer" size="large" shape="circle" onClick={this.print}></Button></div> : null}
diff --git a/src/views/billprint/index.scss b/src/views/billprint/index.scss
index aed46a2..a42978b 100644
--- a/src/views/billprint/index.scss
+++ b/src/views/billprint/index.scss
@@ -11,10 +11,6 @@
   .box404 {
     margin-top: 10vh;
   }
-  .print-page {
-    height: 900px;
-    overflow: hidden;
-  }
   .print-button {
     position: fixed;
     right: 10px;
diff --git a/src/views/menudesign/index.jsx b/src/views/menudesign/index.jsx
index 4cf1e23..4dceaa3 100644
--- a/src/views/menudesign/index.jsx
+++ b/src/views/menudesign/index.jsx
@@ -90,7 +90,13 @@
   closeView = () => {
     const { oriConfig, config } = this.state
 
-    if (!is(fromJS(oriConfig), fromJS(config))) {
+    let _config = fromJS(config).toJS()
+    delete _config.fstMenuList
+    delete _config.permFuncField
+    delete _config.sysRoles
+    delete _config.tableFields
+
+    if (!is(fromJS(oriConfig), fromJS(_config))) {
       confirm({
         title: '閰嶇疆宸蹭慨鏀癸紝鏀惧純淇濆瓨鍚楋紵',
         content: '',
@@ -104,10 +110,87 @@
     }
   }
 
+  getMenuParam = () => {
+    const { MenuId, ParentId, MenuName, MenuNo, MenuType } = this.state
+
+    let param = {
+      func: 'sPC_Get_LongParam',
+      MenuID: MenuId
+    }
+
+    Api.getSystemConfig(param).then(result => {
+      if (result.status) {
+        let config = null
+
+        try {
+          config = JSON.parse(window.decodeURIComponent(window.atob(result.LongParam)))
+        } catch (e) {
+          console.warn('Parse Failure')
+          config = null
+        }
+
+        if (!config) {
+          config = {
+            version: 1.0,
+            uuid: MenuId,
+            MenuID: MenuId,
+            parentId: ParentId,
+            Template: 'CustomPage',
+            easyCode: '',
+            enabled: false,
+            MenuName: MenuName,
+            MenuNo: MenuNo,
+            tables: [],
+            components: [],
+            style: {
+              backgroundColor: '#ffffff', backgroundImage: '',
+              paddingTop: '16px', paddingBottom: '80px', paddingLeft: '16px', paddingRight: '16px'
+            },
+            MenuType: MenuType
+          }
+          if (MenuType === 'billPrint') {
+            config.style.paddingTop = '50px'
+            config.style.paddingBottom = '50px'
+            config.style.paddingLeft = '30px'
+            config.style.paddingRight = '30px'
+          }
+        } else {
+          config.uuid = MenuId
+          config.MenuID = MenuId
+          config.MenuType = config.MenuType || MenuType
+        }
+
+        if (MenuType === 'billPrint') {
+          config.fstMenuId = 'BillPrintTemp'
+          config.parentId = 'BillPrintTemp'
+          config.MenuName = MenuName
+          config.MenuNo = MenuNo
+          config.firstCount = config.firstCount || 5
+          config.everyPCount = config.everyPCount || 5
+          config.lastCount = config.lastCount || ''
+        }
+
+        this.setState({
+          oriConfig: config,
+          config: fromJS(config).toJS(),
+          openEdition: result.open_edition || '',
+        })
+
+        this.getRoleFields()
+      } else {
+        notification.warning({
+          top: 92,
+          message: result.message,
+          duration: 5
+        })
+      }
+    })
+  }
+
   submitConfig = () => {
     const { config, openEdition } = this.state
 
-    if (config.MenuType === 'billPrint' && (!config.MenuName || !config.MenuNo)) {
+    if (config.MenuType === 'billPrint' && (!config.firstCount || !config.everyPCount)) {
       notification.warning({
         top: 92,
         message: '璇峰畬鍠勫熀鏈俊鎭紒',
@@ -249,76 +332,6 @@
     })
   }
 
-  getMenuParam = () => {
-    const { MenuId, ParentId, MenuName, MenuNo, MenuType } = this.state
-
-    let param = {
-      func: 'sPC_Get_LongParam',
-      MenuID: MenuId
-    }
-
-    Api.getSystemConfig(param).then(result => {
-      if (result.status) {
-        let config = null
-
-        try {
-          config = JSON.parse(window.decodeURIComponent(window.atob(result.LongParam)))
-        } catch (e) {
-          console.warn('Parse Failure')
-          config = null
-        }
-
-        if (!config) {
-          config = {
-            version: 1.0,
-            uuid: MenuId,
-            MenuID: MenuId,
-            parentId: ParentId,
-            Template: 'CustomPage',
-            easyCode: '',
-            enabled: false,
-            MenuName: MenuName,
-            MenuNo: MenuNo,
-            tables: [],
-            components: [],
-            style: {
-              backgroundColor: '#ffffff', backgroundImage: '',
-              paddingTop: '16px', paddingBottom: '80px', paddingLeft: '16px', paddingRight: '16px'
-            },
-            MenuType: MenuType
-          }
-        } else {
-          config.uuid = MenuId
-          config.MenuID = MenuId
-          config.MenuType = config.MenuType || MenuType
-        }
-
-        if (MenuType === 'billPrint') {
-          config.FstID = 'BillPrintTemp'
-          config.SndID = 'BillPrintTemp'
-          config.ParentID = 'BillPrintTemp'
-          config.firstCount = config.firstCount || 5
-          config.everyPCount = config.everyPCount || 5
-          config.lastCount = config.lastCount || ''
-        }
-
-        this.setState({
-          oriConfig: config,
-          config: fromJS(config).toJS(),
-          openEdition: result.open_edition || '',
-        })
-
-        this.getRoleFields()
-      } else {
-        notification.warning({
-          top: 92,
-          message: result.message,
-          duration: 5
-        })
-      }
-    })
-  }
-
   getRoleFields = () => {
     Api.getSystemConfig({func: 'sPC_Get_Roles_sModular'}).then(res => {
       if (res.status) {
@@ -374,22 +387,6 @@
   verifyConfig = (show) => {
     const { config } = this.state
     let error = ''
-
-    if (!config.MenuID) {
-      notification.warning({
-        top: 92,
-        message: '璇峰畬鍠勮彍鍗曞熀鏈俊鎭紒',
-        duration: 5
-      })
-      return
-    } else if (config.MenuType === 'custom' && (!config.MenuName || !config.MenuNo || !config.fstMenuId || !config.parentId)) {
-      notification.warning({
-        top: 92,
-        message: '璇峰畬鍠勮彍鍗曞熀鏈俊鎭紒',
-        duration: 5
-      })
-      return
-    }
 
     config.components.forEach(item => {
       if (error) return
@@ -453,7 +450,7 @@
     return (
       <ConfigProvider locale={_locale}>
         <div className="pc-menu-view" id="view">
-          <Header view="design" closeView={this.closeView} />
+          <Header />
           <DndProvider backend={HTML5Backend}>
             <div className="menu-body">
               <div className="menu-setting">
@@ -498,6 +495,7 @@
                   <div>
                     {config ? <Switch className="big" checkedChildren={dict['mob.enable']} unCheckedChildren={dict['mob.disable']} checked={config.enabled} onChange={this.onEnabledChange} /> : null}
                     <Button type="primary" onClick={this.submitConfig} loading={menuloading}>{dict['mob.save']}</Button>
+                    <Button type="default" onClick={this.closeView}>{dict['mob.return']}</Button>
                   </div>
                 } style={{ width: '100%' }}>
                   {config && config.components ? <MenuShell menu={config} handleList={this.updateConfig} /> : null}
diff --git a/src/views/menudesign/printmenuform/index.jsx b/src/views/menudesign/printmenuform/index.jsx
index 11debb7..7f45e96 100644
--- a/src/views/menudesign/printmenuform/index.jsx
+++ b/src/views/menudesign/printmenuform/index.jsx
@@ -69,9 +69,6 @@
                 ]
               })(
                 <Select onChange={this.pageSizeChange}>
-                  <Select.Option value="A0">A0</Select.Option>
-                  <Select.Option value="A1">A1</Select.Option>
-                  <Select.Option value="A2">A2</Select.Option>
                   <Select.Option value="A3">A3</Select.Option>
                   <Select.Option value="A4">A4</Select.Option>
                   <Select.Option value="A5">A5</Select.Option>

--
Gitblit v1.8.0