From 669839c40c0080786cefa6a8e62d3ada68a39b8e Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期二, 14 六月 2022 14:10:50 +0800
Subject: [PATCH] 2022-06-14

---
 src/tabviews/custom/components/form/tab-form/index.jsx             |   32 ++++-
 src/templates/sharecomponent/actioncomponent/verifyprint/index.jsx |    4 
 src/tabviews/custom/components/share/tabtransfer/index.jsx         |    4 
 src/menu/components/form/tab-form/index.jsx                        |   69 +++++++++++
 src/menu/components/card/balcony/options.jsx                       |    2 
 src/menu/components/form/normal-form/index.jsx                     |   73 +++++++++++
 src/tabviews/custom/components/form/normal-form/index.jsx          |   40 ++++--
 src/tabviews/zshare/actionList/printbutton/index.jsx               |   94 ++++++++++++---
 public/options.json                                                |   10 
 src/tabviews/custom/index.jsx                                      |    1 
 src/menu/components/form/normal-form/options.jsx                   |   19 +++
 src/menu/components/card/prop-card/index.jsx                       |    8 +
 src/menu/components/form/dragtitle/card.jsx                        |    2 
 13 files changed, 300 insertions(+), 58 deletions(-)

diff --git a/public/options.json b/public/options.json
index 2b6d9b6..98972d1 100644
--- a/public/options.json
+++ b/public/options.json
@@ -1,12 +1,12 @@
 {
-  "appId": "201912040924165801464FF1788654BC5AC73",
-  "appkey": "20191106103859640976D6E924E464D029CF0",
+  "appId": "202108312122504607B107A83F55B40C98CCF",
+  "appkey": "20210831212235413F287EC3BF489424496C8",
   "mainSystemApi": "http://sso.mk9h.cn/cloud/webapi/dostars",
   "systemType": "",
   "externalDatabase": "false",
   "lineColor": "",
   "filter": "false",
-  "defaultApp": "mk",
+  "defaultApp": "mkindustry",
   "defaultLang": "zh-CN",
   "WXAppID": "",
   "debugger": false,
@@ -14,6 +14,6 @@
   "probation": "",
   "keepPassword": "true",
   "platforms": ["H5", "wechat", "android", "ios"],
-  "host": "http://qingqiumarket.cn",
-  "service": "MKWMS/"
+  "host": "http://demo.mk9h.cn",
+  "service": "erp_new/"
 }
\ No newline at end of file
diff --git a/src/menu/components/card/balcony/options.jsx b/src/menu/components/card/balcony/options.jsx
index 77696ba..2beceb4 100644
--- a/src/menu/components/card/balcony/options.jsx
+++ b/src/menu/components/card/balcony/options.jsx
@@ -81,7 +81,7 @@
       type: 'cascader',
       field: 'supModule',
       label: '涓婄骇缁勪欢',
-      initval: wrap.supModule || '',
+      initval: wrap.supModule || [],
       // tooltip: '褰撲笂绾х粍浠朵笉瀛樺湪鎴栨病鏈夋潈闄愭椂锛屽綋鍓嶇粍浠朵笉鏄剧ず銆�',
       required: true,
       options: supmodules
diff --git a/src/menu/components/card/prop-card/index.jsx b/src/menu/components/card/prop-card/index.jsx
index f64170d..9e382eb 100644
--- a/src/menu/components/card/prop-card/index.jsx
+++ b/src/menu/components/card/prop-card/index.jsx
@@ -576,8 +576,12 @@
   updateWrap = (res) => {
     let _card = {...this.state.card, wrap: res}
 
-    if (res.supModule && res.supModule.length > 0) {
-      _card.setting.supModule = res.supModule
+    if (res.datatype === 'static') {
+      if (res.supModule && res.supModule.length > 0) {
+        _card.setting.supModule = res.supModule
+      } else {
+        _card.setting.supModule = ''
+      }
     }
     if (res.layout === 'flex') {
       _card.wrap.pagestyle = 'page'
diff --git a/src/menu/components/form/dragtitle/card.jsx b/src/menu/components/form/dragtitle/card.jsx
index 78301dd..92f4501 100644
--- a/src/menu/components/form/dragtitle/card.jsx
+++ b/src/menu/components/form/dragtitle/card.jsx
@@ -9,6 +9,7 @@
 import './index.scss'
 
 const NormalForm = asyncIconComponent(() => import('@/components/normalform'))
+const CopyComponent = asyncIconComponent(() => import('@/menu/components/share/copycomponent'))
 
 const Card = ({ id, card, active, moveCard, findCard, closeCard, selectCard, updateGroup }) => {
   const originalIndex = findCard(id).index
@@ -73,6 +74,7 @@
         <NormalForm title="鍒嗙粍缂栬緫" width={850} update={updateSetting} getForms={getForms}>
           <EditOutlined style={{color: '#1890ff'}} title="缂栬緫"/>
         </NormalForm>
+        <CopyComponent type="formgroup" card={card}/>
         <CloseOutlined className="close" type="close" onClick={close} />
       </div>
     } trigger="hover">
diff --git a/src/menu/components/form/normal-form/index.jsx b/src/menu/components/form/normal-form/index.jsx
index 93f8688..46a534a 100644
--- a/src/menu/components/form/normal-form/index.jsx
+++ b/src/menu/components/form/normal-form/index.jsx
@@ -173,6 +173,33 @@
       } else if (!card.setting.supModule) {
         card.errors.push({ level: 0, detail: '鏈缃笂绾х粍浠讹紒'})
       }
+
+      let supModule = card.setting.supModule ? card.setting.supModule[card.setting.supModule.length - 1] || '' : ''
+      if (supModule === 'empty') {
+        supModule = ''
+      }
+      let columns = card.columns.map(c => c.field)
+      let lowcols = card.columns.map(c => c.field.toLowerCase())
+
+      card.subcards.forEach(item => {
+        item.fields.forEach(m => {
+          if (m.type === 'linkMain' && !supModule) {
+            card.errors.push({ level: 1, detail: `鍒嗙粍鈥�${item.setting.title}鈥濅腑鍏宠仈涓昏〃琛ㄥ崟鈥�${m.label}鈥濇棤鏁坄})
+          } else if (m.field && !columns.includes(m.field) && lowcols.includes(m.field.toLowerCase())) {
+            card.errors.push({ level: 1, detail: `鍒嗙粍鈥�${item.setting.title}鈥濅腑琛ㄥ崟鈥�${m.label}鈥濆ぇ灏忓啓涓庡瓧娈甸泦涓嶄竴鑷碻})
+          }
+        })
+      })
+    } else {
+      let supModule = card.wrap.supModule ? card.wrap.supModule[card.wrap.supModule.length - 1] : ''
+
+      card.subcards.forEach(item => {
+        item.fields.forEach(m => {
+          if (m.type === 'linkMain' && !supModule) {
+            card.errors.push({ level: 1, detail: `鍒嗙粍鈥�${item.setting.title}鈥濅腑鍏宠仈涓昏〃琛ㄥ崟鈥�${m.label}鈥濇棤鏁坄})
+          }
+        })
+      })
     }
 
     this.setState({
@@ -633,6 +660,38 @@
   }
 
   pasteForm = (res) => {
+    if (res.subButton) {
+      let card = fromJS(this.state.card).toJS()
+
+      res.uuid = Utils.getuuid()
+      res.sort = card.subcards.length + 1
+
+      res.fields.forEach(item => {
+        item.uuid = Utils.getuuid()
+      })
+
+      if (!res.prevButton) {
+        res.prevButton = {label: '涓婁竴姝�', type: 'prev', enable: 'false', style: {marginRight: '15px', paddingTop: '5px', paddingBottom: '5px'}}
+      }
+      if (!res.nextButton) {
+        res.nextButton = {label: '璺宠繃', type: 'next', enable: 'false', style: {paddingTop: '5px', paddingBottom: '5px'}}
+      }
+
+      card.subcards.push(res)
+      
+      this.setState({
+        group: res
+      })
+      this.updateComponent(card)
+
+      notification.success({
+        top: 92,
+        message: '绮樿创鎴愬姛锛�',
+        duration: 2
+      })
+      return
+    }
+
     let _config = fromJS(this.state.group).toJS()
     let fieldrepet = false // 瀛楁閲嶅
 
@@ -668,7 +727,17 @@
   }
 
   updateWrap = (res) => {
-    this.updateComponent({...this.state.card, wrap: res})
+    let _card = {...this.state.card, wrap: res}
+
+    if (res.datatype === 'static') {
+      if (res.supModule && res.supModule.length > 0) {
+        _card.setting.supModule = res.supModule
+      } else {
+        _card.setting.supModule = ''
+      }
+    }
+
+    this.updateComponent(_card)
   }
 
   clickComponent = (e) => {
@@ -690,7 +759,7 @@
               <EditOutlined style={{color: '#1890ff'}} title="缂栬緫"/>
             </NormalForm>
             <CopyComponent type="stepform" card={card}/>
-            <PasteComponent config={card} options={['form']} updateConfig={this.pasteForm} />
+            <PasteComponent config={card} options={['form', 'formgroup']} updateConfig={this.pasteForm} />
             <FontColorsOutlined className="style" title="璋冩暣鏍峰紡" onClick={this.changeStyle}/>
             <UserComponent config={card}/>
             <DeleteOutlined className="close" title="鍒犻櫎缁勪欢" onClick={() => this.props.deletecomponent(card.uuid)} />
diff --git a/src/menu/components/form/normal-form/options.jsx b/src/menu/components/form/normal-form/options.jsx
index 412d523..fa3eb97 100644
--- a/src/menu/components/form/normal-form/options.jsx
+++ b/src/menu/components/form/normal-form/options.jsx
@@ -1,3 +1,6 @@
+import { fromJS } from 'immutable'
+import MenuUtils from '@/utils/utils-custom.js'
+
 /**
  * @description Wrap琛ㄥ崟閰嶇疆淇℃伅
  */
@@ -15,6 +18,10 @@
   } else {
     roleList = []
   }
+
+  let modules = []
+  let menu = fromJS(window.GLOB.customMenu).toJS()
+  modules = MenuUtils.getSupModules(menu.components, config.uuid) || []
 
   const wrapForm = [
     {
@@ -46,6 +53,9 @@
       options: [
         {value: 'dynamic', label: '鍔ㄦ��'},
         {value: 'static', label: '闈欐��'},
+      ],
+      controlFields: [
+        {field: 'supModule', values: ['static']},
       ]
     },
     {
@@ -104,6 +114,15 @@
       forbid: !appType
     },
     {
+      type: 'cascader',
+      field: 'supModule',
+      label: '涓婄骇缁勪欢',
+      initval: wrap.supModule || [],
+      required: false,
+      options: modules,
+      allowClear: true
+    },
+    {
       type: 'multiselect',
       field: 'blacklist',
       label: '榛戝悕鍗�',
diff --git a/src/menu/components/form/tab-form/index.jsx b/src/menu/components/form/tab-form/index.jsx
index fcd59c0..58643ce 100644
--- a/src/menu/components/form/tab-form/index.jsx
+++ b/src/menu/components/form/tab-form/index.jsx
@@ -185,6 +185,33 @@
       } else if (!card.setting.supModule) {
         card.errors.push({ level: 0, detail: '鏈缃笂绾х粍浠讹紒'})
       }
+
+      let supModule = card.setting.supModule ? card.setting.supModule[card.setting.supModule.length - 1] || '' : ''
+      if (supModule === 'empty') {
+        supModule = ''
+      }
+      let columns = card.columns.map(c => c.field)
+      let lowcols = card.columns.map(c => c.field.toLowerCase())
+
+      card.subcards.forEach(item => {
+        item.fields.forEach(m => {
+          if (m.type === 'linkMain' && !supModule) {
+            card.errors.push({ level: 1, detail: `鍒嗙粍鈥�${item.setting.title}鈥濅腑鍏宠仈涓昏〃琛ㄥ崟鈥�${m.label}鈥濇棤鏁坄})
+          } else if (m.field && !columns.includes(m.field) && lowcols.includes(m.field.toLowerCase())) {
+            card.errors.push({ level: 1, detail: `鍒嗙粍鈥�${item.setting.title}鈥濅腑琛ㄥ崟鈥�${m.label}鈥濆ぇ灏忓啓涓庡瓧娈甸泦涓嶄竴鑷碻})
+          }
+        })
+      })
+    } else {
+      let supModule = card.wrap.supModule ? card.wrap.supModule[card.wrap.supModule.length - 1] : ''
+
+      card.subcards.forEach(item => {
+        item.fields.forEach(m => {
+          if (m.type === 'linkMain' && !supModule) {
+            card.errors.push({ level: 1, detail: `鍒嗙粍鈥�${item.setting.title}鈥濅腑鍏宠仈涓昏〃琛ㄥ崟鈥�${m.label}鈥濇棤鏁坄})
+          }
+        })
+      })
     }
 
     this.setState({
@@ -639,6 +666,34 @@
   }
 
   pasteForm = (res) => {
+    if (res.subButton) {
+      let card = fromJS(this.state.card).toJS()
+
+      res.uuid = Utils.getuuid()
+      res.sort = card.subcards.length + 1
+
+      res.fields.forEach(item => {
+        item.uuid = Utils.getuuid()
+      })
+
+      delete res.prevButton
+      delete res.nextButton
+
+      card.subcards.push(res)
+      
+      this.setState({
+        group: res
+      })
+      this.updateComponent(card)
+
+      notification.success({
+        top: 92,
+        message: '绮樿创鎴愬姛锛�',
+        duration: 2
+      })
+      return
+    }
+
     let _config = fromJS(this.state.group).toJS()
     let fieldrepet = false // 瀛楁閲嶅
 
@@ -674,7 +729,17 @@
   }
 
   updateWrap = (res) => {
-    this.updateComponent({...this.state.card, wrap: res})
+    let _card = {...this.state.card, wrap: res}
+
+    if (res.datatype === 'static') {
+      if (res.supModule && res.supModule.length > 0) {
+        _card.setting.supModule = res.supModule
+      } else {
+        _card.setting.supModule = ''
+      }
+    }
+
+    this.updateComponent(_card)
   }
 
   clearGroup = () => {
@@ -720,7 +785,7 @@
               <EditOutlined style={{color: '#1890ff'}} title="缂栬緫"/>
             </NormalForm>
             <CopyComponent type="tabform" card={card}/>
-            <PasteComponent config={card} options={['form']} updateConfig={this.pasteForm} />
+            <PasteComponent config={card} options={['form', 'formgroup']} updateConfig={this.pasteForm} />
             <FontColorsOutlined className="style" title="璋冩暣鏍峰紡" onClick={this.changeStyle}/>
             <UserComponent config={card}/>
             <DeleteOutlined className="close" title="鍒犻櫎缁勪欢" onClick={() => this.props.deletecomponent(card.uuid)} />
diff --git a/src/tabviews/custom/components/form/normal-form/index.jsx b/src/tabviews/custom/components/form/normal-form/index.jsx
index 7fd5624..60336e9 100644
--- a/src/tabviews/custom/components/form/normal-form/index.jsx
+++ b/src/tabviews/custom/components/form/normal-form/index.jsx
@@ -27,17 +27,18 @@
 
   state = {
     dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS,
-    BID: '',                   // 涓婄骇ID
-    config: null,              // 鍥捐〃閰嶇疆淇℃伅
-    loading: false,            // 鏁版嵁鍔犺浇鐘舵��
-    sync: false,               // 鏄惁缁熶竴璇锋眰鏁版嵁
-    data: null,                  // 鏁版嵁
+    BID: '',
+    config: null,
+    loading: false,
+    sync: false,
+    data: null,
     group: null,
+    BData: '',
     step: 0
   }
 
   UNSAFE_componentWillMount () {
-    const { data, BID } = this.props
+    const { data, BID, BData } = this.props
     let config = fromJS(this.props.config).toJS()
 
     let _data = null
@@ -99,6 +100,7 @@
       group: _group,
       step: _group.sort - 1,
       BID: BID || '',
+      BData: BData || '',
       config: config,
       arr_field: config.columns.map(col => col.field).join(','),
     }, () => {
@@ -146,6 +148,7 @@
           _data = _data[0] || {$$empty: true}
         }
       }
+
       if (config.wrap.statusControl && _data[config.wrap.statusControl]) {
         let _status = _data[config.wrap.statusControl]
         let _groups = config.subcards.filter(item => item.setting.status === _status)[0]
@@ -192,15 +195,27 @@
     this.execSuccess(btn, id)
   }
 
-  resetParentParam = (MenuID, id) => {
+  resetParentParam = (MenuID, id, data) => {
     const { config } = this.state
 
-    if (config.wrap.datatype === 'static' || !config.setting.supModule || config.setting.supModule !== MenuID) return
+    if (!config.setting.supModule || config.setting.supModule !== MenuID) return
     
     if (id !== this.state.BID || id !== '') {
-      this.setState({ BID: id }, () => {
-        this.loadData()
-      })
+      if (config.wrap.datatype === 'static' || (config.setting.supModule && !id)) {
+        this.setState({
+          data: null,
+          BID: id,
+          BData: data
+        }, () => {
+          this.setState({
+            data: {$$empty: true}
+          })
+        })
+      } else {
+        this.setState({ BID: id, BData: data }, () => {
+          this.loadData()
+        })
+      }
     }
   }
 
@@ -333,7 +348,7 @@
   }
 
   render() {
-    const { config, loading, BID, data, group, dict, step } = this.state
+    const { config, loading, BID, BData, data, group, dict, step } = this.state
 
     return (
       <div className="custom-normal-form-box" id={'anchor' + config.uuid} style={{...config.style}}>
@@ -355,6 +370,7 @@
         </div> : null}
         {group && data ? <MutilForm
           BID={BID}
+          BData={BData}
           dict={dict}
           data={data}
           action={group}
diff --git a/src/tabviews/custom/components/form/tab-form/index.jsx b/src/tabviews/custom/components/form/tab-form/index.jsx
index 69100f4..acddb29 100644
--- a/src/tabviews/custom/components/form/tab-form/index.jsx
+++ b/src/tabviews/custom/components/form/tab-form/index.jsx
@@ -31,12 +31,13 @@
     config: null,              // 鍥捐〃閰嶇疆淇℃伅
     loading: false,            // 鏁版嵁鍔犺浇鐘舵��
     sync: false,               // 鏄惁缁熶竴璇锋眰鏁版嵁
-    data: null,                  // 鏁版嵁
+    data: null,
+    BData: '',
     group: null,
   }
 
   UNSAFE_componentWillMount () {
-    const { data, BID } = this.props
+    const { data, BID, BData } = this.props
     let config = fromJS(this.props.config).toJS()
 
     let _data = null
@@ -78,6 +79,7 @@
       data: _data,
       group: config.subcards[0],
       BID: BID || '',
+      BData: BData || '',
       config: config,
       arr_field: config.columns.map(col => col.field).join(','),
     }, () => {
@@ -168,13 +170,26 @@
     this.execSuccess(btn, id)
   }
 
-  resetParentParam = (MenuID, id) => {
+  resetParentParam = (MenuID, id, data) => {
     const { config } = this.state
-    if (config.wrap.datatype === 'static' || !config.setting.supModule || config.setting.supModule !== MenuID) return
+    if (!config.setting.supModule || config.setting.supModule !== MenuID) return
+
     if (id !== this.state.BID || id !== '') {
-      this.setState({ BID: id }, () => {
-        this.loadData()
-      })
+      if (config.wrap.datatype === 'static' || (config.setting.supModule && !id)) {
+        this.setState({
+          data: null,
+          BID: id,
+          BData: data
+        }, () => {
+          this.setState({
+            data: {$$empty: true}
+          })
+        })
+      } else {
+        this.setState({ BID: id, BData: data }, () => {
+          this.loadData()
+        })
+      }
     }
   }
 
@@ -264,7 +279,7 @@
   }
 
   render() {
-    const { config, loading, BID, data, group, dict } = this.state
+    const { config, loading, BID, BData, data, group, dict } = this.state
 
     return (
       <div className="custom-tab-form-box" id={'anchor' + config.uuid} style={{...config.style}}>
@@ -283,6 +298,7 @@
         </div> : null}
         {group && data ? <MutilForm
           BID={BID}
+          BData={BData}
           dict={dict}
           data={data}
           action={group}
diff --git a/src/tabviews/custom/components/share/tabtransfer/index.jsx b/src/tabviews/custom/components/share/tabtransfer/index.jsx
index 2754f25..0376db3 100644
--- a/src/tabviews/custom/components/share/tabtransfer/index.jsx
+++ b/src/tabviews/custom/components/share/tabtransfer/index.jsx
@@ -255,13 +255,13 @@
       } else if (item.type === 'form' && item.subtype === 'stepform') {
         return (
           <Col span={item.width} key={item.uuid}>
-            <NormalForm config={item} data={data} BID={BID} mainSearch={mainSearch} menuType={menuType} />
+            <NormalForm config={item} data={data} BID={BID} BData={BData} mainSearch={mainSearch} menuType={menuType} />
           </Col>
         )
       } else if (item.type === 'form' && item.subtype === 'tabform') {
         return (
           <Col span={item.width} key={item.uuid}>
-            <TabForm config={item} data={data} BID={BID} mainSearch={mainSearch} menuType={menuType} />
+            <TabForm config={item} data={data} BID={BID} BData={BData} mainSearch={mainSearch} menuType={menuType} />
           </Col>
         )
       } else if (item.type === 'tree') {
diff --git a/src/tabviews/custom/index.jsx b/src/tabviews/custom/index.jsx
index 226bea5..1273078 100644
--- a/src/tabviews/custom/index.jsx
+++ b/src/tabviews/custom/index.jsx
@@ -731,6 +731,7 @@
           balMap.set(item.wrap.syncModuleId, true)
         } else if (item.wrap.linkType === 'sup') {
           item.wrap.supModule = item.wrap.supModule.pop()
+          item.setting.supModule = item.wrap.supModule
         }
         item.elements = item.elements.filter(cell => {
           if (cell.eleType === 'button') {
diff --git a/src/tabviews/zshare/actionList/printbutton/index.jsx b/src/tabviews/zshare/actionList/printbutton/index.jsx
index 6e4cead..cf92e72 100644
--- a/src/tabviews/zshare/actionList/printbutton/index.jsx
+++ b/src/tabviews/zshare/actionList/printbutton/index.jsx
@@ -240,38 +240,77 @@
   triggerPrint = (data, formlist = []) => {
     const { btn } = this.props
     let formdata = {}
+    let baseCount = 1
+    let baseType = ''
+    let baseTemp = btn.verify.Template || ''
     
     formlist.forEach(_data => {
       formdata[_data.key] = _data.value
+
+      if (!_data.value) return
+
+      if (_data.key.toLowerCase() === 'printcount') {
+        baseCount = +_data.value
+      } else if (_data.key.toLowerCase() === 'printtype') {
+        baseType = _data.value
+      } else if (_data.key.toLowerCase() === 'templateid') {
+        baseTemp = _data.value
+      }
     })
 
     let printlist = []
     let templates = []
-    let printCount = +(formdata.printCount || formdata.PrintCount || formdata.printcount || formdata.Printcount || 1)
 
-    if (isNaN(printCount) || printCount < 1) {
-      printCount = 1
+    if (isNaN(baseCount) || baseCount < 1) {
+      baseCount = 1
     }
 
     new Promise(resolve => {
       if (btn.intertype === 'system') { // 浣跨敤绯荤粺鏃讹紝鐩存帴浠庤〃鏍兼垨琛ㄥ崟涓�夊彇鏁版嵁
-        let printcell = {}
-
-        printcell.printType = formdata.printType || formdata.PrintType || formdata.printtype || formdata.Printtype || ''
-        printcell.printCount = printCount
-        printcell.templateID = btn.verify.Template || ''
-
         if (btn.Ot === 'notRequired') {
+          let printcell = {}
+  
+          printcell.printType = baseType
+          printcell.printCount = baseCount
+          printcell.templateID = baseTemp
           printcell.data = [formdata]
+
+          templates.push(printcell.templateID)
+
+          printlist.push(printcell)
         } else {
-          printcell.data = data.map(cell => {
-            return {...cell, ...formdata}
+          data.forEach(cell => {
+            let _cell = {...cell, ...formdata}
+            
+            let printcell = {data: [_cell]}
+  
+            printcell.templateID = baseTemp
+            printcell.printType = baseType
+            printcell.printCount = 0
+
+            Object.keys(_cell).forEach(key => {
+              if (!_cell[key]) return
+
+              let _key = key.toLowerCase()
+
+              if (_key === 'templateid') {
+                printcell.templateID = _cell[key]
+              } else if (_key === 'printtype') {
+                printcell.printType = _cell[key]
+              } else if (_key === 'printcount') {
+                printcell.printCount = +_cell[key]
+              }
+            })
+
+            if (isNaN(printcell.printCount) || printcell.printCount < 1) {
+              printcell.printCount = baseCount
+            }
+
+            templates.push(printcell.templateID)
+
+            printlist.push(printcell)
           })
         }
-
-        templates.push(printcell.templateID)
-
-        printlist.push(printcell)
 
         resolve(true)
       } else {
@@ -281,16 +320,27 @@
               // 绯荤粺鎵撳嵃鏁版嵁锛屾牎楠宒ata瀛楁
               if (btn.verify.printMode !== 'custom' && (!cell.data || cell.data.length === 0)) return
 
-              cell.templateID = cell.templateID || cell.TemplateID || cell.Templateid || cell.templateid || btn.verify.Template
-              cell.printType = cell.printType || cell.PrintType || cell.printtype || cell.Printtype || formdata.printType || formdata.PrintType || formdata.printtype || formdata.Printtype || ''
+              cell.templateID = baseTemp
+              cell.printType = baseType
+              cell.printCount = 0
 
-              let _printCount = +(cell.printCount || cell.PrintCount || cell.printcount || cell.Printcount || 0)
+              Object.keys(cell).forEach(key => {
+                if (!cell[key]) return
 
-              if (isNaN(_printCount) || _printCount < 1) {
-                _printCount = printCount
+                let _key = key.toLowerCase()
+
+                if (_key === 'templateid') {
+                  cell.templateID = cell[key]
+                } else if (_key === 'printtype') {
+                  cell.printType = cell[key]
+                } else if (_key === 'printcount') {
+                  cell.printCount = +cell[key]
+                }
+              })
+
+              if (isNaN(cell.printCount) || cell.printCount < 1) {
+                cell.printCount = baseCount
               }
-              
-              cell.printCount = _printCount
 
               templates.push(cell.templateID)
 
diff --git a/src/templates/sharecomponent/actioncomponent/verifyprint/index.jsx b/src/templates/sharecomponent/actioncomponent/verifyprint/index.jsx
index 5f7e68e..e39bcca 100644
--- a/src/templates/sharecomponent/actioncomponent/verifyprint/index.jsx
+++ b/src/templates/sharecomponent/actioncomponent/verifyprint/index.jsx
@@ -348,8 +348,8 @@
                 <Col span={24} className="print-tip">
                   <Form.Item label={'鎻愮ず'}>
                     濡傛灉姝ゆ寜閽秹鍙婂绉嶆暟鎹被鍨嬬殑鎵撳嵃锛岄渶瑕佽缃笉鍚岀殑鎵撳嵃鏈烘椂锛岃娣诲姞鎵撳嵃绫诲瀷鎺у埗淇℃伅锛岀敤鎴峰湪鑷畾涔夎缃腑锛屽彲鏍规嵁鎵撳嵃绫诲瀷璁剧疆瀵瑰簲鐨勬墦鍗版満銆�
-                    鎵撳嵃鏃讹紝鏁版嵁鐨勬墦鍗扮被鍨嬪彇鍐充簬杩斿洖鍊硷紙鍐呴儴鎴栧閮ㄦ帴鍙o級涓殑 printType 瀛楁銆�
-                    娉細杩斿洖鍊间腑鐨� printCount銆乼emplateID 瀛楁锛屽彲鍒嗗埆鎺у埗鎵撳嵃鏁伴噺鍜屾墦鍗版ā鏉裤��
+                    鎵撳嵃鏃讹紝鎵撳嵃绫诲瀷鍙栧喅浜庢暟鎹腑鐨� printType 瀛楁銆�
+                    娉細鏁版嵁涓殑 printCount銆乼emplateID 瀛楁锛屽彲鍒嗗埆鎺у埗鎵撳嵃鏁伴噺鍜屾墦鍗版ā鏉裤��
                   </Form.Item>
                 </Col>
                 <Col span={24}>

--
Gitblit v1.8.0