From 8d66ff34fae5b048a6b7923cc75d34f13a08be9d Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期二, 02 八月 2022 11:42:43 +0800
Subject: [PATCH] Merge branch 'develop'

---
 src/views/menudesign/printmenuform/index.jsx |   50 +++++++++++++++++++++++++++++++++-----------------
 1 files changed, 33 insertions(+), 17 deletions(-)

diff --git a/src/views/menudesign/printmenuform/index.jsx b/src/views/menudesign/printmenuform/index.jsx
index 9b099fc..3831b6a 100644
--- a/src/views/menudesign/printmenuform/index.jsx
+++ b/src/views/menudesign/printmenuform/index.jsx
@@ -12,12 +12,12 @@
     updateConfig: PropTypes.func
   }
 
-  changeFirstCount = (val) => {
-    if (typeof(val) !== 'number') {
-      val = ''
-    }
-    this.props.updateConfig({...this.props.config, firstCount: val})
-  }
+  // changeFirstCount = (val) => {
+  //   if (typeof(val) !== 'number') {
+  //     val = ''
+  //   }
+  //   this.props.updateConfig({...this.props.config, firstCount: val})
+  // }
 
   changeCount = (val) => {
     if (typeof(val) !== 'number') {
@@ -40,12 +40,16 @@
     this.props.updateConfig({...this.props.config, printHeight: val})
   }
 
-  changeLastCount = (val) => {
-    if (typeof(val) !== 'number') {
-      val = ''
-    }
-    this.props.updateConfig({...this.props.config, lastCount: val})
+  onPrintPageChange = (val) => {
+    this.props.updateConfig({...this.props.config, printPage: val})
   }
+
+  // changeLastCount = (val) => {
+  //   if (typeof(val) !== 'number') {
+  //     val = ''
+  //   }
+  //   this.props.updateConfig({...this.props.config, lastCount: val})
+  // }
 
   pageSizeChange = (val) => {
     this.props.updateConfig({...this.props.config, pageSize: val})
@@ -185,6 +189,18 @@
             </Form.Item>
           </Col>
           <Col span={24}>
+            <Form.Item label="椤甸潰甯冨眬">
+              {getFieldDecorator('printPage', {
+                initialValue: config.printPage || 'auto'
+              })(
+                <Radio.Group onChange={(e) => {this.onPrintPageChange(e.target.value)}}>
+                  <Radio value="auto">鑷�傚簲</Radio>
+                  <Radio value="page">鍒嗛〉</Radio>
+                </Radio.Group>
+              )}
+            </Form.Item>
+          </Col>
+          {/* <Col span={24}>
             <Form.Item label="棣栭〉鏁�(鏉�)">
               {getFieldDecorator('firstCount', {
                 initialValue: config.firstCount,
@@ -196,11 +212,11 @@
                 ]
               })(<InputNumber min={1} max={1000} precision={1} onChange={this.changeFirstCount}/>)}
             </Form.Item>
-          </Col>
-          <Col span={24}>
+          </Col> */}
+          {config.printPage === 'page' ? <Col span={24}>
             <Form.Item label="姣忛〉鏁�(鏉�)">
               {getFieldDecorator('everyPCount', {
-                initialValue: config.everyPCount,
+                initialValue: config.everyPCount || 15,
                 rules: [
                   {
                     required: true,
@@ -209,14 +225,14 @@
                 ]
               })(<InputNumber min={1} max={1000} precision={1} onChange={this.changeCount}/>)}
             </Form.Item>
-          </Col>
-          <Col span={24}>
+          </Col> : null}
+          {/* <Col span={24}>
             <Form.Item label="灏鹃〉鏁�(鏉�)">
               {getFieldDecorator('lastCount', {
                 initialValue: config.lastCount
               })(<InputNumber min={1} max={1000} precision={1} onChange={this.changeLastCount}/>)}
             </Form.Item>
-          </Col>
+          </Col> */}
           <Col span={24}>
             <Form.Item label={
               <Tooltip placement="topLeft" title="閽堝涓嶈鍒欑焊寮狅紝鍙嚜瀹氫箟璁剧疆鎵撳嵃楂樺害鍜屽搴︼紝娉細鍚屾椂璁剧疆鎵撳嵃瀹藉害鍜岄珮搴﹀悗鏂瑰彲鐢熸晥銆�">

--
Gitblit v1.8.0