liting2017 6 years ago
parent
commit
08f4df8e1c

+ 2 - 2
js/component/account/ticket/coupon.jsx

@@ -17,7 +17,7 @@ class DemandList extends Component {
                 defaultCurrent: 1,
                 defaultPageSize: 10,
                 showQuickJumper: true,
-                pageSize:8,
+                pageSize:6,
                 onChange: function (page) {
                     this.loadData(page);
                 }.bind(this),
@@ -170,7 +170,7 @@ class DemandList extends Component {
                             <Row gutter={20}>
                                {
                                    this.state.dataSource.map(item=>{
-                                     return <Col span={6} style={{marginBottom:10}}>
+                                     return <Col span={8} style={{marginBottom:10}}>
                                             <Card>
                                                 <div className="discountList">
                                                     <p>¥<span>{parseInt(item.money)}</span> 元</p>

+ 2 - 0
js/component/account/ticket/coupon.less

@@ -32,6 +32,7 @@
     }
 }
 .cardCode{
+    width: 1100px;
     .ant-card-body{
         background: #69afeb;
         color: #fff;
@@ -53,6 +54,7 @@
             overflow: hidden;
             height: 68px;
             text-align: center;
+            line-height: 75px;
             span{
                 font-size: 40px;
             }

+ 6 - 2
js/component/account/ticket/vouchers.jsx

@@ -283,7 +283,6 @@ const DemandList = React.createClass({
 			labelCol: { span: 6 },
 			wrapperCol: { span: 12 },
         };
-        
         let theData = this.state.data||{};
         const hasSelected = this.state.selectedRowKeys.length > 0;
         return (
@@ -346,6 +345,8 @@ const DemandList = React.createClass({
                                         {...formItemLayout}
                                         label={<span><strong style={{color:'#f00'}}> * </strong>面额</span>}>
                                         <div><InputNumber value={this.state.money} 
+                                        formatter={(value)=>value}
+                                        parser={(val)=>parseInt(val)||0}
                                         onChange={(e)=>{this.setState({money:e})}} min={0} max={999999} step={0
                                         } placeholder="输入面额."/><span> 元</span></div>
                                     </FormItem>
@@ -354,7 +355,10 @@ const DemandList = React.createClass({
                                         label={<span><strong style={{color:'#f00'}}> * </strong>使用期限</span>}>
                                         <div><InputNumber value={this.state.durationDay}
                                             onChange={(e)=>{this.setState({durationDay:e})}}   
-                                        min={0} max={9999} step={0} placeholder="输入天数"/><span> 天</span></div>
+                                            min={0} max={9999} step={0} 
+                                            formatter={(value)=>value}
+                                            parser={(val)=>parseInt(val)||0}
+                                            placeholder="输入天数"/><span> 天</span></div>
                                     </FormItem>
                                 </div>
 	                    	</div>

+ 19 - 13
js/component/administration/ticket/coupon.jsx

@@ -1,5 +1,5 @@
 import React from 'react';
-import { Icon, Button, Input, Select, Spin, Table, message, DatePicker ,Modal,Form} from 'antd';
+import { Icon, Button, Input,InputNumber, Select, Spin, Table, message, DatePicker ,Modal,Form} from 'antd';
 import $ from 'jquery/src/ajax';
 import moment from 'moment';
 import NewDesc from '@/administration/messagePush/messageIn/messageDesc';
@@ -319,8 +319,8 @@ const DemandList = React.createClass({
                 <Modal	
 				      className="customeDetails"
 				      footer=''
-			          title="新增用券"
-			          width='600px'
+			          title="新增用券"
+			          width='400px'
 			          visible={this.state.visitModul}
 			          onOk={this.visitOk}
 					  onCancel={this.visitCancel}							          							          
@@ -330,14 +330,14 @@ const DemandList = React.createClass({
 	                		<div className="clearfix" >
 		                		<FormItem 
 				                     {...formItemLayout}
-				                    label="劵面名称"
+				                    label={<span><strong style={{color:'#f00'}}> * </strong>劵面名称</span>}
 			                        >
 		                    	 	<Input placeholder="券面名称"  value={this.state.newName} onChange={(e) => {
 			                        this.setState({ newName:  e.target.value }) }} />
 		                    	 </FormItem>
 		                    	 <FormItem 
 				                     {...formItemLayout}
-				                    label="优惠券来源"
+				                    label={<span><strong style={{color:'#f00'}}> * </strong>优惠券来源</span>}
 			                        >
 		                    	 	 <Select placeholder="优惠券来源" value={this.state.source}  
 								    		onChange={(e)=>{this.setState({source:e})}}> 
@@ -350,21 +350,27 @@ const DemandList = React.createClass({
 		                    	 </FormItem>
 		                    	 <FormItem 
 				                     {...formItemLayout}
-				                    label="面额"
+				                    label={<span><strong style={{color:'#f00'}}> * </strong>面额</span>}
 			                        >
-		                    	 	<Input placeholder="面额" style={{width:'95%'}} value={this.state.money} onChange={(e) => {
-			                        this.setState({ money:  e.target.value }) }} /> 元
+                                     <InputNumber min={0} 
+                                        formatter={(value)=>value}
+                                        parser={(val)=>parseInt(val)||0}
+                                        max={999999} step={0} placeholder="面额" value={this.state.money} onChange={(e) => {
+			                        this.setState({ money:  e }) }} /> 元
 		                    	 </FormItem>
 		                    	 <FormItem 
 				                     {...formItemLayout}
-				                    label="使用期限"
+				                    label={<span><strong style={{color:'#f00'}}> * </strong>使用期限</span>}
 			                        >
-		                    	 	<Input placeholder="使用期限" style={{width:'95%'}} value={this.state.durationDay} onChange={(e) => {
-			                        this.setState({ durationDay:  e.target.value }) }} /> 天
+                                    <InputNumber min={0} max={9999} 
+                                     formatter={(value)=>value}
+                                     parser={(val)=>parseInt(val)||0}
+                                     step={0} placeholder="使用期限"  value={this.state.durationDay} onChange={(e) => {
+			                        this.setState({ durationDay:  e }) }} /> 天
 		                    	 </FormItem>
 	                    	 </div>
-	                    	 <Button className="setSubmit" type="primary" htmlType="submit" style={{marginLeft:'150px'}}>保存</Button>  
-					         <Button  type="ghost" onClick={this.visitCancel}  style={{marginLeft:'100px'}}>取消</Button>
+	                    	 <Button className="setSubmit" type="primary" htmlType="submit" style={{marginLeft:'92px'}}>保存</Button>  
+					         <Button  type="ghost" onClick={this.visitCancel}  style={{marginLeft:'40px',marginBottom:20}}>取消</Button>
 	                	</Spin>
 					</Form>	
 			    </Modal>

+ 1 - 5
js/component/administration/ticket/vouchers.jsx

@@ -2,7 +2,6 @@ import React from 'react';
 import { Icon, Button, Input, Select, Spin, Table, message, DatePicker } from 'antd';
 import $ from 'jquery/src/ajax';
 import moment from 'moment';
-import NewDesc from '@/administration/messagePush/messageIn/messageDesc';
 import '@/account/demand/techDemand.less';
 import '@/administration/news/news.less';
 import {getCouponCome,getCouponAuthStates} from '@/tools.js';
@@ -261,6 +260,7 @@ const DemandList = React.createClass({
                         onChange={(e) => { this.setState({ status: e }) }}>
                         <Select.Option value="0" >未使用</Select.Option>
                         <Select.Option value="1" >已使用</Select.Option>
+                        <Select.Option value="2" >已过期</Select.Option>
                     </Select>
                     <Select placeholder="抵用券来源" value={this.state.source} style={{ width: 120 }}
 				    		onChange={(e)=>{this.setState({source:e})}}> 
@@ -281,10 +281,6 @@ const DemandList = React.createClass({
                             pagination={this.state.pagination}/>
                     </Spin>
                 </div>
-                <NewDesc
-                    data={this.state.RowData}
-                    showDesc={this.state.showDesc}
-                    closeDesc={this.closeDesc} />
             </div >
         );
     }