Browse Source

添加功能

dengzhiguo 6 years ago
parent
commit
30889ae01e

File diff suppressed because it is too large
+ 38 - 5
js/component/dataDic.js


+ 2 - 2
js/component/manageCenter/content.less

@@ -5,11 +5,11 @@
     padding-bottom: 40px;
     background: #f0f0f0;
     .content-right {
-        width: 84%;
+        width: 88%;
         height: 100%;
         float:left;
         overflow-y:auto;
-        padding: 20px;
+        padding: 15px;
         .ant-spin-nested-loading {
             height: 100%;
             .ant-spin-container{

+ 23 - 14
js/component/manageCenter/customer/NEW/crm/patentPayment.jsx

@@ -237,10 +237,10 @@ const PatentPayment = Form.create()(React.createClass({
 			message.warning('专利名称不能为空')
 			return
 		}
-		if(typeof theorgCodeUrl !== 'string'){
-	        message.warning('未上传图片');
-	        return 
-	    }
+		if(this.state.patentType === ''){
+		    message.warning('专利类型不能为空');
+		    return 
+		}
 		$.ajax({
 			method: "POST",
 			dataType: "json",
@@ -301,6 +301,7 @@ const PatentPayment = Form.create()(React.createClass({
 		    });
 		    theorgCodeUrl = picArr.join(",");
 		};
+		console.log(typeof this.state.patentType)
 		if (!this.state.patentNo) {
 			message.warning('专利号不能为空')
 			return
@@ -309,8 +310,8 @@ const PatentPayment = Form.create()(React.createClass({
 			message.warning('专利名称不能为空')
 			return
 		}
-		if(typeof theorgCodeUrl !== 'string'){
-		    message.warning('未上传图片');
+		if(this.state.patentType === ''){
+		    message.warning('专利类型不能为空');
 		    return 
 		}
 		$.ajax({
@@ -548,13 +549,21 @@ const PatentPayment = Form.create()(React.createClass({
 						<div className="clearfix">
 							<FormItem className="half-item"
 							        {...formItemLayout}
-							        label="专利号" >                             
+							        label={
+							        	<span>
+							        		<strong style={{ color: '#f00' }}>*</strong>专利号
+							        	</span> 
+							        } >                             
 							        {<Input placeholder="请输入专利号" value={this.state.patentNo}
 							            	onChange={(e)=>{this.setState({patentNo:e.target.value})}} style={{width:'240px'}} />}
 							</FormItem>
 							<FormItem className="half-item"
 							        {...formItemLayout}
-							        label="专利名称" >                             
+							        label={
+							        	<span>
+							        		<strong style={{ color: '#f00' }}>*</strong>专利名称
+							        	</span> 
+							        } >                             
 							        {<Input placeholder="请输入专利名称" value={this.state.patentName}
 							            	onChange={(e)=>{this.setState({patentName:e.target.value})}} style={{width:'240px'}} />}
 							</FormItem>
@@ -571,7 +580,11 @@ const PatentPayment = Form.create()(React.createClass({
 							</FormItem>
 							<FormItem className="half-item"
 							        {...formItemLayout}
-							        label="专利类型" >                             
+							        label={
+							        	<span>
+							        		<strong style={{ color: '#f00' }}>*</strong>专利类型
+							        	</span> 
+							        } >                             
 							        {<Select placeholder="请选择专利类型"
 									    style={{ width:'240px'}}
 									    value={this.state.patentType}
@@ -598,11 +611,7 @@ const PatentPayment = Form.create()(React.createClass({
 								<FormItem
 								    labelCol={{ span: 4 }}
 								    wrapperCol={{ span: 18 }}
-								    label={
-								    	<span>
-											<strong style={{ color: '#f00' }}>*</strong>合同扫描件
-										</span> 
-								    }
+								    label='合同扫描件'
 								    >
 									
 								    <PicturesWall

+ 32 - 0
js/component/manageCenter/financialManage/content.jsx

@@ -39,6 +39,38 @@ class Content extends Component {
                     });
                 });
                 break;
+			case 'invoiceApplyList': //省内开票管理
+			    require.ensure([], () => {
+			        let Module = require('./distribute/invoiceApplyList').default;
+			        this.setState({
+			            component: <Module />,
+			        });
+			    });
+			    break;
+			case 'invoiceApplyListWai': //省外开票管理
+			    require.ensure([], () => {
+			        let Module = require('./distribute/invoiceApplyListWai').default;
+			        this.setState({
+			            component: <Module />,
+			        });
+			    });
+			    break;	
+			case 'inSpecial': //省内特批
+			    require.ensure([], () => {
+			        let Module = require('./distribute/inSpecial').default;
+			        this.setState({
+			            component: <Module />,
+			        });
+			    });
+			    break;
+			case 'outSpecial': //省外特批
+			    require.ensure([], () => {
+			        let Module = require('./distribute/outSpecial').default;
+			        this.setState({
+			            component: <Module />,
+			        });
+			    });
+			    break;	
             case 'shouKuang': //收款管理
                 require.ensure([], () => {
                     let Module = require('./distribute/shouKuang').default;

+ 758 - 0
js/component/manageCenter/financialManage/distribute/inSpecial.jsx

@@ -0,0 +1,758 @@
+import React,{Component} from 'react';
+import ajax from 'jquery/src/ajax/xhr.js';
+import $ from 'jquery/src/ajax';
+import moment from 'moment';
+import './public.less';
+import { Form,Radio, Icon, Button, Input, Select, Spin, Table, Switch, message, DatePicker, Checkbox ,Modal, Upload ,Popconfirm,Cascader,Tabs} from 'antd';
+import {getProcessStatus,getApproval,getProvinceA,beforeUploadFile,getInvoiceStatus,getprovince,splitUrl} from '@/tools';
+import {projectProgress,specially,province,invoiceStatus} from '../../../dataDic.js';
+
+const FormItem = Form.Item;
+const PicturesWall = React.createClass({
+    getInitialState() {
+        return {
+            previewVisible: false,
+            previewImage: '',
+            fileList: this.props.pictureUrl,
+        }
+    },
+    getDefaultProps(){
+    	return{
+    		changeClick:this.modifyChange
+    	}
+    },
+    handleCancel() {
+        this.setState({ previewVisible: false })
+    },
+    handlePreview(file) {
+        this.setState({
+            previewImage: file.url || file.thumbUrl,
+            previewVisible: true,
+        });
+    },
+    handleChange(info) {
+        let fileList = info.fileList;
+        this.setState({ fileList });
+        this.props.fileList(fileList);
+    },
+    componentWillReceiveProps(nextProps) {
+        this.state.fileList = nextProps.pictureUrl; 
+    },
+    render() {
+        const { previewVisible, previewImage, fileList } = this.state;
+        const uploadButton = (
+            <div>
+                <Icon type="plus" />
+                <div className="ant-upload-text">点击上传</div>
+            </div>
+        );
+        return (
+            <div style={{display:"inline-block"}}>
+                <Upload
+                	beforeUpload={beforeUploadFile}
+                    action={globalConfig.context + "/api/admin/orderInvoice/uploadOrderInvoiceFile"}
+                    data={{ 'sign': '' }}
+                    listType="picture-card"
+                    fileList={fileList}
+                    onPreview={this.handlePreview}
+                    onChange={this.handleChange} >
+                    {fileList.length >= 18 ? null : uploadButton}
+                </Upload>
+                <Modal maskClosable={false} visible={previewVisible} footer={null} onCancel={this.handleCancel}>
+                    <img alt="example" style={{ width: '100%' }} src={previewImage} />
+                </Modal>
+            </div>
+        );
+    }
+});
+
+const inSpecial = React.createClass({
+	departmentList() {
+		this.setState({
+			loading: true
+		});
+		$.ajax({
+			method: "get",
+			dataType: "json",
+			crossDomain: false,
+			url: globalConfig.context + "/api/admin/organization/selectSuperId",
+			data: {},
+			success: function(data) {
+	            let thedata = data.data;
+				let theArr=[];
+				if(!thedata) {
+					if(data.error && data.error.length) {
+						message.warning(data.error[0].message);
+					};
+				}else{
+					thedata.map(function(item,index){
+						theArr.push({
+							key:index,
+							name:item.name,
+							id:item.id,
+						})
+					})
+				}
+				this.setState({
+					departmentArr:theArr,
+				})
+			}.bind(this),
+			}).always(function() {
+				this.setState({
+					loading: false
+				});
+			}.bind(this));
+	},
+    loadData(pageNo) {
+        this.state.data = [];
+        this.setState({
+            loading: true
+        });
+        $.ajax({
+            method: "get",
+            dataType: "json",
+            crossDomain: false,
+            url: globalConfig.context + "/api/admin/orderInvoice/approvalOrderInvoiceList",
+            data: {
+                pageNo: pageNo || 1,
+                pageSize: this.state.pagination.pageSize,
+                name: this.state.nameSearch,//客户名称
+                orderNo:this.state.orderNoSearch,
+				orderDep:this.state.orderDep,
+				type:0
+            },
+            success: function (data) {
+                let theArr = [];
+                if (!data.data || !data.data.list) {
+                    if (data.error && data.error.length) {
+                        message.warning(data.error[0].message);
+                    };
+                } else {
+                    for (let i = 0; i < data.data.list.length; i++) {
+                        let thisdata = data.data.list[i];
+                        theArr.push({
+                            key: i,
+                            id: thisdata.id,
+							status:thisdata.status,
+                            unitName:thisdata.unitName,
+		                    orderno:thisdata.orderno,
+		                    name:thisdata.name,
+                            projectStatus:thisdata.projectStatus,
+                            amount:thisdata.amount,
+                            sumAmount:thisdata.sumAmount,
+                            createTime:thisdata.createTime?new Date(thisdata.createTime).toLocaleString():'',
+                            settlementAmount:thisdata.settlementAmount,
+							notAmount:thisdata.notAmount,
+                        });
+                    };
+                }
+                this.state.pagination.current = data.data.pageNo;
+                this.state.pagination.total = data.data.totalCount;
+                if(data.data&&data.data.list&&!data.data.list.length){
+					this.state.pagination.current=0
+					this.state.pagination.total=0
+				}
+                this.setState({
+                    totalPage:data.data.totalPage,
+                    dataSource: theArr,
+                    pagination: this.state.pagination
+                });
+            }.bind(this),
+        }).always(function () {
+            this.setState({
+                loading: false
+            });
+        }.bind(this));
+    },
+	
+	invoiceData() {
+	    this.setState({
+	        loading: true
+	    });
+	    $.ajax({
+	        method: "get",
+	        dataType: "json",
+	        crossDomain: false,
+	        url: globalConfig.context + '/api/admin/orderInvoice/selectByIdOrderInvoice',
+			data:{
+				id:this.state.id
+			},
+	        success:function (data) {
+				        let thisdata = data.data;
+				        this.setState({
+							orderNo:thisdata.orderNo,
+							type:thisdata.type,
+							status:thisdata.status,
+							remarks:thisdata.remarks,
+							invoiceType:thisdata.invoiceType,
+							unitName:thisdata.unitName,
+							taxNumber:thisdata.taxNumber,
+							amount:thisdata.amount,
+							banks:thisdata.banks,
+							content:thisdata.content,
+							unitAddress:thisdata.unitAddress,
+							invoiceRemarks:thisdata.invoiceRemarks,
+							unitMobile:thisdata.unitMobile,
+							post:thisdata.post,
+							addressee:thisdata.addressee,
+							addresseeMobile:thisdata.addresseeMobile,
+							addresseeProvince:thisdata.addresseeProvince,
+							addresseeCity:thisdata.addresseeCity,
+							addresseeArea:thisdata.addresseeArea,
+							recipientAddress:thisdata.recipientAddress,
+							orgCodeUrl: thisdata.voucherUrl ? splitUrl(thisdata.voucherUrl, ',', globalConfig.avatarHost + '/upload') : [],
+						})
+					}.bind(this)
+	    }).done(function(data) {
+			this.setState({
+				loading: false
+			});
+	    }.bind(this));
+	},
+	
+    getInitialState() {
+        return {
+            searchMore: true,
+            assignVisible:false,
+            releaseDate: [],
+            totalPage:0,
+            boHuivisible:false,
+            selectedRowKeys: [],
+            selectedRows: [],
+            loading: false,
+			reason: '',
+			foo:0,
+            pagination: {
+                defaultCurrent: 1,
+                defaultPageSize: 10,
+                showQuickJumper: true,
+                pageSize: 10,
+                onChange: function (page) {
+                    this.loadData(page);
+                }.bind(this),
+                showTotal: function (total) {
+                    return '共' + total + '条数据';
+                }
+            },
+            columns: [
+                {
+                    title: '编号',
+                    dataIndex: 'id',
+                    key: 'id',
+                }, {
+                    title: '客户',
+                    dataIndex: 'unitName',
+                    key: 'unitName',
+                }, {
+                    title: '跟单人/签单人',
+                    dataIndex: 'name',
+                    key: 'name',
+                },  {
+                    title: '项目状态',
+                    dataIndex: 'projectStatus',
+                    key: 'projectStatus',
+                },
+                {
+                    title: '申请开票(万)',
+                    dataIndex: 'amount',
+                    key: 'amount'
+                },
+                {
+                    title: '已开票(万)',
+                    dataIndex: 'sumAmount',
+                    key: 'sumAmount'
+                },
+				{
+				    title: '已收款',
+				    dataIndex: 'settlementAmount',
+				    key: 'settlementAmount'
+				},
+                {
+                    title: '未收款',
+                    dataIndex: 'notAmount',
+                    key: 'notAmount'
+                },
+                {
+                    title: '申请时间',
+                    dataIndex: 'createTime',
+                    key: 'createTime',
+                },
+                {
+                    title:'操作',
+                    dataIndex: 'caozuo',
+                    key: 'caouzo',
+                    render:(text,record,index)=>{
+                        return <div>
+							{<Button type="primary" onClick={(e) =>{ e.stopPropagation(),this.visit(record,index)}} style={{background:'deepskyblue',border:'none'}}>申请内容</Button>}
+							{record.status !== 2?<Button type="primary" style={{marginLeft:'10px'}} onClick={(e) =>{ e.stopPropagation(),this.setState({examine:2},()=>{this.sende(record)})}}>通过</Button>
+								:''}
+							{record.status !== 2?<Button type="danger" onClick={(e) =>{ e.stopPropagation(),this.setState({examine:3},()=>{this.reject(record)})}} style={{marginLeft:'10px'}}>拒绝</Button>
+								:''}
+							{record.status === 2?<Button style={{marginLeft:'10px',color:'black'}} disabled={true}>已通过</Button>
+								:''}
+							{<Button type="primary" style={{marginLeft:'10px',background:'orangered',border:'none'}} onClick={(e) =>{ e.stopPropagation(), this.inRecord(record,index)}}>开票记录</Button>}
+                        </div>
+                    }
+                }
+            ],
+			columnsDate:[
+				{
+				    title: '编号',
+				    dataIndex: 'id',
+				    key: 'id'
+				},{
+			        title: '订单编号',
+			        dataIndex: 'orderno',
+			        key: 'orderno'
+			    },{
+			        title: '开票金额(万元)',
+			        dataIndex: 'amount',
+			        key: 'amount'
+			    },{
+			        title: '申请时间',
+			        dataIndex: 'createTime',
+			        key: 'createTime'
+			    },{
+			        title: '开票状态',
+			        dataIndex: 'status',
+			        key: 'status',
+					render:(text)=>{
+						return getInvoiceStatus(text)
+					}
+			    }
+			],
+            dataSource: [],
+            searchTime: [,]
+        }
+    },
+	
+	loadSend(record){
+		this.setState({
+		    loading: true
+		});
+		if (this.state.examine === 3 && this.state.reason === '') {
+			message.warning('拒绝理由不能为空!')
+			return
+		}
+		$.ajax({
+		    method: "post",
+		    dataType: "json",
+		    crossDomain: false,
+		    url: globalConfig.context + '/api/admin/orderInvoice/approvalExamine',
+		    data: {
+				id:this.state.examine===2?record.id:this.state.id,
+				examine:this.state.examine,
+				reason:this.state.reason
+		    },
+			success: function (data) {
+				
+			}.bind(this),
+		}).done(function(data) {
+			this.setState({
+				loading: false
+			});
+			if(this.state.examine === 2){
+				message.success('通过成功!');
+				this.loadData()
+			}else{
+				message.success('拒绝成功!')
+				this.resetReason()
+				this.rejectCancels()
+				this.loadData()
+			}
+		}.bind(this));
+	},
+	
+	//重置拒绝理由
+	resetReason(){
+		this.setState({
+			reason:''
+		})
+	},
+	
+	sende(record){
+		this.loadSend(record)
+	},
+	
+	commit(){
+		this.loadSend()
+		this.setState({
+			avisible:false
+		})
+	},
+	
+	visit(record,index){
+		this.setState({
+			id:this.state.dataSource[index].id,
+			avisible:true,
+		},()=>{
+			this.invoiceData()
+		})
+	},
+	visitCancels(){
+		this.setState({
+			avisible:false
+		})
+	},
+	
+	reject(record){
+		this.setState({
+			visibleR:true,
+			id:record.id
+		});
+	},
+	rejectCancels(){
+		this.setState({
+			visibleR:false
+		})
+	},
+	inRecordData(){
+		this.setState({
+		    loading: true
+		});
+		$.ajax({
+		    method: "get",
+		    dataType: "json",
+		    crossDomain: false,
+		    url: globalConfig.context + '/api/admin/orderInvoice/salesmanOrderInvoiceList',
+		    data: {
+				orderNo:this.state.orderNo2
+		    },
+			success: function (data) {
+			    let theArr = [];
+			    if (!data.data) {
+			        if (data.error && data.error.length) {
+			            message.warning(data.error[0].message);
+			        };
+			    } else {
+			        for (let i = 0; i < data.data.list.length; i++) {
+			            let thisdata = data.data.list[i];
+			            theArr.push({
+			                 id: thisdata.id,
+			                 orderno: thisdata.orderno,//订单编号
+			                 amount:thisdata.amount,//签单金额
+			                 createTime:thisdata.createTime,//流程状态
+			                 status:thisdata.status,//结算状态
+			            });
+			        };
+			    };
+				this.setState({
+					recordData:theArr
+				})
+			}.bind(this),
+		}).done(function(data) {
+			this.setState({
+				loading: false
+			});
+		}.bind(this));
+	},
+	
+	inRecord(record,index){
+		this.setState({
+			bvisible:true,
+			orderNo2:record.orderno,
+		},() => {this.inRecordData()})
+	},
+	
+	inRecordCanl(){
+		this.setState({
+			bvisible:false
+		})
+	},
+	
+	search(){
+		this.loadData();
+	},
+	
+    componentWillMount() {
+		this.departmentList();
+        this.loadData();
+    },
+    reset() {
+        this.state.nameSearch = '';
+        this.state.releaseDate = [];
+        this.state.orderNoSearch='';
+		this.state.processStatus = [];
+		this.state.departmenttList = [];
+        this.loadData();
+    },
+    render() { 
+        const rowSelection = {
+            selectedRowKeys: this.state.selectedRowKeys,
+            onChange: (selectedRowKeys, selectedRows) => {
+                this.setState({
+                    selectedRows: selectedRows.slice(-1),
+                    selectedRowKeys: selectedRowKeys.slice(-1)
+                });
+            }
+        };
+		const formItemLayout = {
+			labelCol: { span: 8 },
+			wrapperCol: { span: 14 },
+		};
+        const hasSelected = this.state.selectedRowKeys.length > 0;
+        const { RangePicker } = DatePicker;
+		var departmentArr = this.state.departmentArr ||[];
+        return ( <div className="user-content">
+            <div className="content-title">
+                    <span>开票申请列表</span>
+                </div>
+                <div className="user-search">
+                    <Input placeholder="营销员名称"
+                        value={this.state.nameSearch}
+                        onChange={(e) => { this.setState({ nameSearch: e.target.value }); }} />
+                    <Input placeholder="订单编号"
+                        value={this.state.orderNoSearch}
+                        onChange={(e) => { this.setState({ orderNoSearch: e.target.value }); }} />
+					<Select placeholder="订单部门"
+					    style={{ width: 150 ,marginRight:10}}
+					    value={this.state.departmenttList}
+					    onChange={(e) => { this.setState({ departmenttList: e }) }}>
+					    {
+					        departmentArr.map(function (item) {
+					                return <Select.Option key={item.id} >{item.name}</Select.Option>
+					        })
+					    }
+					</Select>
+                    <Button type="primary" onClick={this.search} style={{ marginLeft:10}}>搜索</Button>
+                    <Button onClick={this.reset}>重置</Button>
+                </div>
+                <div className="patent-table">
+                    <Spin spinning={this.state.loading}>
+                        <Table columns={this.state.columns}
+                            dataSource={this.state.dataSource}
+                            pagination={this.state.pagination}/>
+                    </Spin>
+                </div>
+				<Modal visible={this.state.visibleR}
+						className="admin-desc-content"
+						footer=''
+						title = '拒绝理由'
+						width='400px'
+						onCancel={this.rejectCancels}>
+						<Input.TextArea placeholder="请输入拒绝理由"
+										rows={4}
+										value={this.state.reason} onChange={(e)=>{this.setState({ reason:e.target.value })}}>
+										
+						</Input.TextArea>
+					<div className="clearfix" style={{marginTop:'20px'}}>	
+						<Button type="primary" onClick={(e) =>{ e.stopPropagation(), this.commit()}} style={{float:'right'}}>提交</Button>
+					</div>
+				</Modal>
+				<Modal	
+				  className="admin-desc-content"
+				  footer=''
+				  title = '开具发票申请单'
+				  width='900px'
+				  visible={this.state.avisible}
+				  onOk={this.visitOks}
+				  onCancel={this.visitCancels}
+				>
+					<Form layout="horizontal" id="demand-form" style={{paddingBottom:'40px'}} >
+					    <Spin spinning={this.state.loading}>
+					        <div className="clearfix">
+								<div className="clearfix">
+									<FormItem className="half-item"
+									    {...formItemLayout}
+									    label="合同编号" >
+									    <span>{this.state.contractNo}</span>
+									</FormItem>
+									<FormItem className="half-item"
+									        {...formItemLayout}
+									        label="备注" >                             
+									        <span>{this.state.remarks}</span>
+									</FormItem>
+								</div>
+								<div className="clearfix">
+								<FormItem className="half-item"
+								    {...formItemLayout}
+								    label={
+								    	<span>
+								    		<strong style={{ color: '#f00' }}>*</strong>省内/外
+								    	</span> 
+								    }  >  
+								    <span>{getProvinceA(this.state.type)}</span>
+								</FormItem>
+								</div>
+								<hr style={{border:'1px dashed #aaa', width:"90%",margin:'auto'}}/>
+									<div style={{marginTop:'13px',marginLeft:'16px'}}>
+										<span style={{fontSize:'14px'}}>发票内容</span>
+									</div>
+								<div className="clearfix">
+									<FormItem className="half-item"
+									    {...formItemLayout}
+									    label={
+									    	<span>
+												<strong style={{ color: '#f00' }}>*</strong>发票类型
+											</span> 
+									    } >
+										<span>{this.state.invoiceType===0?'增值税专用发票':(this.state.invoiceType === 1?'增值税普通发票':'其他')}</span>
+									</FormItem>
+								</div>
+								<div className="clearfix">
+									<FormItem className="half-item"
+									        {...formItemLayout}
+									        label={
+									        	<span>
+									        		<strong style={{ color: '#f00' }}>*</strong>单位名称
+									        	</span> 
+									        } >  
+											<span>{this.state.unitName}</span>
+									</FormItem>
+									<FormItem className="half-item"
+									        {...formItemLayout}
+									        label={
+									        	<span>
+									        		<strong style={{ color: '#f00' }}>*</strong>税号
+									        	</span> 
+									        } >                             
+									        <span>{this.state.taxNumber}</span>
+									</FormItem>
+									<FormItem className="half-item"
+									        {...formItemLayout}
+									        label={
+									        	<span>
+									        		<strong style={{ color: '#f00' }}>*</strong>开票金额
+									        	</span> 
+									        } >                             
+									        <span>{this.state.amount}</span>
+									</FormItem>
+									<FormItem className="half-item"
+									        {...formItemLayout}
+									        label={
+									        	<span>
+									        		<strong style={{ color: '#f00' }}>*</strong>开户行银行账号
+									        	</span> 
+									        } >                             
+									        <span>{this.state.banks}</span>
+									</FormItem>
+									<FormItem className="half-item"
+									        {...formItemLayout}
+									        label={
+									        	<span>
+									        		<strong style={{ color: '#f00' }}>*</strong>开票内容及说明
+									        	</span> 
+									        } >                             
+									        <span>{this.state.content}</span>
+									</FormItem>
+									<FormItem className="half-item"
+									        {...formItemLayout}
+									        label={
+									        	<span>
+									        		<strong style={{ color: '#f00' }}>*</strong>单位地址
+									        	</span> 
+									        } >                             
+									        <span>{this.state.unitAddress}</span>
+									</FormItem>
+									<FormItem className="half-item"
+									        {...formItemLayout}
+									        label="备注" >                             
+									        <span>{this.state.invoiceRemarks}</span>
+									</FormItem>
+									<FormItem className="half-item"
+									        {...formItemLayout}
+									        label={
+									        	<span>
+									        		<strong style={{ color: '#f00' }}>*</strong>单位电话
+									        	</span> 
+									        } >                             
+									        <span>{this.state.unitMobile}</span>
+									</FormItem>
+								</div>
+								<div className="clearfix">
+									<FormItem
+									    labelCol={{ span: 4 }}
+									    wrapperCol={{ span: 18 }}
+									    label={
+									    	<span>
+												<strong style={{ color: '#f00' }}>*</strong>附件
+											</span> 
+									    }
+									    >
+										<Upload className="demandDetailShow-upload"
+										    listType="picture-card"
+										    fileList={this.state.orgCodeUrl}                               
+										    onPreview={(file) => {
+										        this.setState({
+										            previewImage: file.url || file.thumbUrl,
+										            previewVisible: true,
+										        });
+										    }} >
+										</Upload>
+										<Modal maskClosable={false} footer={null}
+										    visible={this.state.previewVisible}
+										    onCancel={() => { this.setState({ previewVisible: false }) }}>
+										    <img alt="" style={{ width: '100%' }} src={this.state.previewImage || ''} />
+										</Modal>
+									</FormItem>
+								</div>
+								<hr style={{border:'1px dashed #aaa', width:"90%",margin:'auto'}}/>
+								<div className="clearfix" style={{marginTop:'10px'}}>
+									<FormItem className="half-item"
+									    {...formItemLayout}
+									    label="发票是否邮寄:" >
+										<span>{this.state.post===0?'是':"否"}</span>
+									</FormItem>
+								</div>
+								<div className="clearfix">
+									<FormItem className="half-item"
+									        {...formItemLayout}
+									        label="收信人姓名" >                             
+									        <span>{this.state.addressee}</span>
+									</FormItem>
+									<FormItem className="half-item"
+									        {...formItemLayout}
+									        label="电话" >                             
+									        <span>{this.state.addresseeMobile}</span>
+									</FormItem>
+								</div>
+								<div className="clearfix">
+									<FormItem className="half-item"
+								        {...formItemLayout}
+								       label="省-市-区"
+								      > 
+									  <span>{getprovince(this.state.addresseeProvince)}/{getprovince(this.state.addresseeCity)}/{getprovince(this.state.addresseeArea)}</span>
+								    </FormItem>
+								</div>
+								<div className="clearfix">
+									<FormItem className="half-item"
+								        {...formItemLayout}
+								       label="详细地址"
+								      > 
+										<span>{this.state.recipientAddress}</span>
+								    </FormItem>
+								</div>
+							</div>
+						</Spin>
+					</Form>
+				</Modal>
+				<Modal visible={this.state.bvisible}
+						footer=''
+						title='开票历史记录'
+						className="admin-desc-content"
+						width='900px'
+						onCancel={this.inRecordCanl}>
+						<Spin spinning={this.state.loading}>
+							<div className="patent-table">
+								<Table columns={this.state.columnsDate}
+									dataSource={this.state.recordData}
+									pagination={false}/>
+								<div className="clearfix" style={{marginTop:'20px'}}>
+									<FormItem className="half-item"
+										{...formItemLayout}
+										label={
+											<span style={{fontSize:'14px'}}>
+												开票总计
+											</span> 
+										} >
+										<span></span>
+									</FormItem>
+								</div>
+							</div>
+						</Spin>
+				</Modal>
+        </div> )
+    }
+})
+ 
+export default inSpecial;

+ 775 - 0
js/component/manageCenter/financialManage/distribute/invoiceApplyList.jsx

@@ -0,0 +1,775 @@
+import React,{Component} from 'react';
+import ajax from 'jquery/src/ajax/xhr.js';
+import $ from 'jquery/src/ajax';
+import moment from 'moment';
+import './public.less';
+import { Form,Radio, Icon, Button, Input, Select, Spin, Table, Switch, message, DatePicker, Checkbox ,Modal, Upload ,Popconfirm,Cascader,Tabs} from 'antd';
+import {getProcessStatus,getApproval,getProvinceA,beforeUploadFile,getInvoiceStatus,getprovince,splitUrl} from '@/tools';
+import {projectProgress,specially,province,invoiceStatus} from '../../../dataDic.js';
+
+const FormItem = Form.Item;
+const PicturesWall = React.createClass({
+    getInitialState() {
+        return {
+            previewVisible: false,
+            previewImage: '',
+            fileList: this.props.pictureUrl,
+        }
+    },
+    getDefaultProps(){
+    	return{
+    		changeClick:this.modifyChange
+    	}
+    },
+    handleCancel() {
+        this.setState({ previewVisible: false })
+    },
+    handlePreview(file) {
+        this.setState({
+            previewImage: file.url || file.thumbUrl,
+            previewVisible: true,
+        });
+    },
+    handleChange(info) {
+        let fileList = info.fileList;
+        this.setState({ fileList });
+        this.props.fileList(fileList);
+    },
+    componentWillReceiveProps(nextProps) {
+        this.state.fileList = nextProps.pictureUrl; 
+    },
+    render() {
+        const { previewVisible, previewImage, fileList } = this.state;
+        const uploadButton = (
+            <div>
+                <Icon type="plus" />
+                <div className="ant-upload-text">点击上传</div>
+            </div>
+        );
+        return (
+            <div style={{display:"inline-block"}}>
+                <Upload
+                	beforeUpload={beforeUploadFile}
+                    action={globalConfig.context + "/api/admin/orderInvoice/uploadOrderInvoiceFile"}
+                    data={{ 'sign': '' }}
+                    listType="picture-card"
+                    fileList={fileList}
+                    onPreview={this.handlePreview}
+                    onChange={this.handleChange} >
+                    {fileList.length >= 18 ? null : uploadButton}
+                </Upload>
+                <Modal maskClosable={false} visible={previewVisible} footer={null} onCancel={this.handleCancel}>
+                    <img alt="example" style={{ width: '100%' }} src={previewImage} />
+                </Modal>
+            </div>
+        );
+    }
+});
+
+const invoiceApplyList = React.createClass({
+	departmentList() {
+		this.setState({
+			loading: true
+		});
+		$.ajax({
+			method: "get",
+			dataType: "json",
+			crossDomain: false,
+			url: globalConfig.context + "/api/admin/organization/selectSuperId",
+			data: {},
+			success: function(data) {
+	            let thedata = data.data;
+				let theArr=[];
+				if(!thedata) {
+					if(data.error && data.error.length) {
+						message.warning(data.error[0].message);
+					};
+				}else{
+					thedata.map(function(item,index){
+						theArr.push({
+							key:index,
+							name:item.name,
+							id:item.id,
+						})
+					})
+				}
+				this.setState({
+					departmentArr:theArr,
+				})
+			}.bind(this),
+			}).always(function() {
+				this.setState({
+					loading: false
+				});
+			}.bind(this));
+	},
+    loadData(pageNo) {
+        this.state.data = [];
+        this.setState({
+            loading: true
+        });
+        $.ajax({
+            method: "get",
+            dataType: "json",
+            crossDomain: false,
+            url: globalConfig.context + "/api/admin/orderInvoice/financeOrderInvoiceList",
+            data: {
+                pageNo: pageNo || 1,
+                pageSize: this.state.pagination.pageSize,
+                name: this.state.nameSearch,//客户名称
+                orderNo:this.state.orderNoSearch,
+				orderDep:this.state.orderDep,
+				type:0
+            },
+            success: function (data) {
+                let theArr = [];
+                if (!data.data || !data.data.list) {
+                    if (data.error && data.error.length) {
+                        message.warning(data.error[0].message);
+                    };
+                } else {
+                    for (let i = 0; i < data.data.list.length; i++) {
+                        let thisdata = data.data.list[i];
+                        theArr.push({
+                            key: i,
+                            id: thisdata.id,
+							status:thisdata.status,
+                            unitName:thisdata.unitName,
+		                    orderno:thisdata.orderno,
+		                    name:thisdata.name,
+                            projectStatus:thisdata.projectStatus,
+                            amount:thisdata.amount,
+                            sumAmount:thisdata.sumAmount,
+                            createTime:thisdata.createTime?new Date(thisdata.createTime).toLocaleString():'',
+                            settlementAmount:thisdata.settlementAmount,
+							notAmount:thisdata.notAmount,
+                        });
+                    };
+                }
+                this.state.pagination.current = data.data.pageNo;
+                this.state.pagination.total = data.data.totalCount;
+                if(data.data&&data.data.list&&!data.data.list.length){
+					this.state.pagination.current=0
+					this.state.pagination.total=0
+				}
+                this.setState({
+                    totalPage:data.data.totalPage,
+                    dataSource: theArr,
+                    pagination: this.state.pagination
+                });
+            }.bind(this),
+        }).always(function () {
+            this.setState({
+                loading: false
+            });
+        }.bind(this));
+    },
+	
+	invoiceData() {
+	    this.setState({
+	        loading: true
+	    });
+	    $.ajax({
+	        method: "get",
+	        dataType: "json",
+	        crossDomain: false,
+	        url: globalConfig.context + '/api/admin/orderInvoice/selectByIdOrderInvoice',
+			data:{
+				id:this.state.id
+			},
+	        success:function (data) {
+				        let thisdata = data.data;
+				        this.setState({
+							contractNo:thisdata.contractNo,
+							orderNo:thisdata.orderNo,
+							approval:thisdata.approval,
+							type:thisdata.type,
+							status:thisdata.status,
+							remarks:thisdata.remarks,
+							invoiceType:thisdata.invoiceType,
+							unitName:thisdata.unitName,
+							taxNumber:thisdata.taxNumber,
+							amount:thisdata.amount,
+							banks:thisdata.banks,
+							content:thisdata.content,
+							unitAddress:thisdata.unitAddress,
+							invoiceRemarks:thisdata.invoiceRemarks,
+							unitMobile:thisdata.unitMobile,
+							post:thisdata.post,
+							addressee:thisdata.addressee,
+							addresseeMobile:thisdata.addresseeMobile,
+							addresseeProvince:thisdata.addresseeProvince,
+							addresseeCity:thisdata.addresseeCity,
+							addresseeArea:thisdata.addresseeArea,
+							recipientAddress:thisdata.recipientAddress,
+							orgCodeUrl: thisdata.voucherUrl ? splitUrl(thisdata.voucherUrl, ',', globalConfig.avatarHost + '/upload') : [],
+						})
+					}.bind(this)
+	    }).done(function(data) {
+			this.setState({
+				loading: false
+			});
+	    }.bind(this));
+	},
+	
+    getInitialState() {
+        return {
+            searchMore: true,
+            assignVisible:false,
+            releaseDate: [],
+            totalPage:0,
+            boHuivisible:false,
+            selectedRowKeys: [],
+            selectedRows: [],
+            loading: false,
+			reason: '',
+			foo:0,
+            pagination: {
+                defaultCurrent: 1,
+                defaultPageSize: 10,
+                showQuickJumper: true,
+                pageSize: 10,
+                onChange: function (page) {
+                    this.loadData(page);
+                }.bind(this),
+                showTotal: function (total) {
+                    return '共' + total + '条数据';
+                }
+            },
+            columns: [
+                {
+                    title: '编号',
+                    dataIndex: 'id',
+                    key: 'id',
+                }, {
+                    title: '客户',
+                    dataIndex: 'unitName',
+                    key: 'unitName',
+                }, {
+                    title: '跟单人/签单人',
+                    dataIndex: 'name',
+                    key: 'name',
+                },  {
+                    title: '项目状态',
+                    dataIndex: 'projectStatus',
+                    key: 'projectStatus',
+                },
+                {
+                    title: '申请开票(万)',
+                    dataIndex: 'amount',
+                    key: 'amount'
+                },
+                {
+                    title: '已开票(万)',
+                    dataIndex: 'sumAmount',
+                    key: 'sumAmount'
+                },
+				{
+				    title: '已收款',
+				    dataIndex: 'settlementAmount',
+				    key: 'settlementAmount'
+				},
+                {
+                    title: '未收款',
+                    dataIndex: 'notAmount',
+                    key: 'notAmount'
+                },
+                {
+                    title: '申请时间',
+                    dataIndex: 'createTime',
+                    key: 'createTime',
+                },
+                {
+                    title:'操作',
+                    dataIndex: 'caozuo',
+                    key: 'caouzo',
+                    render:(text,record,index)=>{
+                        return <div>
+							{<Button type="primary" onClick={(e) =>{ e.stopPropagation(),this.visit(record,index)}} style={{background:'deepskyblue',border:'none'}}>申请内容</Button>}
+							{record.status !== 2?<Button type="primary" style={{marginLeft:'10px'}} onClick={(e) =>{ e.stopPropagation(),this.setState({examine:2},()=>{this.sende(record)})}}>通过</Button>
+								:''}
+							{record.status !== 2?<Button type="danger" onClick={(e) =>{ e.stopPropagation(),this.setState({examine:3},()=>{this.reject(record)})}} style={{marginLeft:'10px'}}>拒绝</Button>
+								:''}
+							{record.status === 2?<Button style={{marginLeft:'10px',color:'black'}} disabled={true}>已通过</Button>
+								:''}
+							{<Button type="primary" style={{marginLeft:'10px',background:'orangered',border:'none'}} onClick={(e) =>{ e.stopPropagation(), this.inRecord(record,index)}}>开票记录</Button>}
+                        </div>
+                    }
+                }
+            ],
+			columnsDate:[
+				{
+				    title: '编号',
+				    dataIndex: 'id',
+				    key: 'id'
+				},{
+			        title: '订单编号',
+			        dataIndex: 'orderno',
+			        key: 'orderno'
+			    },{
+			        title: '开票金额(万元)',
+			        dataIndex: 'amount',
+			        key: 'amount'
+			    },{
+			        title: '申请时间',
+			        dataIndex: 'createTime',
+			        key: 'createTime'
+			    },{
+			        title: '开票状态',
+			        dataIndex: 'status',
+			        key: 'status',
+					render:(text)=>{
+						return getInvoiceStatus(text)
+					}
+			    }
+			],
+            dataSource: [],
+            searchTime: [,]
+        }
+    },
+	
+	loadSend(record){
+		this.setState({
+		    loading: true
+		});
+		if (this.state.examine === 3 && this.state.reason === '') {
+			message.warning('拒绝理由不能为空!')
+			return
+		}
+		$.ajax({
+		    method: "post",
+		    dataType: "json",
+		    crossDomain: false,
+		    url: globalConfig.context + '/api/admin/orderInvoice/financeExamine',
+		    data: {
+				id:this.state.examine===2?record.id:this.state.id,
+				examine:this.state.examine,
+				reason:this.state.reason
+		    },
+			success: function (data) {
+				
+			}.bind(this),
+		}).done(function(data) {
+			this.setState({
+				loading: false
+			});
+			if(this.state.examine === 2){
+				message.success('通过成功!');
+				this.loadData()
+			}else{
+				message.success('拒绝成功!')
+				this.resetReason()
+				this.rejectCancels()
+				this.loadData()
+			}
+		}.bind(this));
+	},
+	
+	//重置拒绝理由
+	resetReason(){
+		this.setState({
+			reason:''
+		})
+	},
+	
+	sende(record){
+		this.loadSend(record)
+	},
+	
+	commit(){
+		this.loadSend()
+		this.setState({
+			avisible:false
+		})
+	},
+	
+	visit(record,index){
+		this.setState({
+			id:this.state.dataSource[index].id,
+			avisible:true,
+		},()=>{
+			this.invoiceData()
+		})
+	},
+	visitCancels(){
+		this.setState({
+			avisible:false
+		})
+	},
+	
+	reject(record){
+		this.setState({
+			visibleR:true,
+			id:record.id
+		});
+	},
+	rejectCancels(){
+		this.setState({
+			visibleR:false
+		})
+	},
+	inRecordData(){
+		this.setState({
+		    loading: true
+		});
+		$.ajax({
+		    method: "get",
+		    dataType: "json",
+		    crossDomain: false,
+		    url: globalConfig.context + '/api/admin/orderInvoice/salesmanOrderInvoiceList',
+		    data: {
+				orderNo:this.state.orderNo2
+		    },
+			success: function (data) {
+			    let theArr = [];
+				let sum = 0;
+			    if (!data.data) {
+			        if (data.error && data.error.length) {
+			            message.warning(data.error[0].message);
+			        };
+			    } else {
+			        for (let i = 0; i < data.data.list.length; i++) {
+			            let thisdata = data.data.list[i];
+						sum += parseFloat(thisdata.amount);
+			            theArr.push({
+			                 id: thisdata.id,
+			                 orderno: thisdata.orderno,//订单编号
+			                 amount:thisdata.amount,//签单金额
+			                 createTime:thisdata.createTime,//流程状态
+			                 status:thisdata.status,//结算状态
+							 rejectReason:thisdata.rejectReason
+			            });
+			        };
+			    };
+				this.setState({
+					recordData:theArr,
+					sum:sum
+				})
+			}.bind(this),
+		}).done(function(data) {
+			this.setState({
+				loading: false
+			});
+		}.bind(this));
+	},
+	
+	inRecord(record,index){
+		this.setState({
+			bvisible:true,
+			orderNo2:record.orderno,
+		},() => {this.inRecordData()})
+	},
+	
+	inRecordCanl(){
+		this.setState({
+			bvisible:false
+		})
+	},
+	
+	search(){
+		this.loadData();
+	},
+	
+    componentWillMount() {
+		this.departmentList();
+        this.loadData();
+    },
+    reset() {
+        this.state.nameSearch = '';
+        this.state.releaseDate = [];
+        this.state.orderNoSearch='';
+		this.state.processStatus = [];
+		this.state.departmenttList = [];
+        this.loadData();
+    },
+    render() { 
+        const rowSelection = {
+            selectedRowKeys: this.state.selectedRowKeys,
+            onChange: (selectedRowKeys, selectedRows) => {
+                this.setState({
+                    selectedRows: selectedRows.slice(-1),
+                    selectedRowKeys: selectedRowKeys.slice(-1)
+                });
+            }
+        };
+		const formItemLayout = {
+			labelCol: { span: 8 },
+			wrapperCol: { span: 14 },
+		};
+        const hasSelected = this.state.selectedRowKeys.length > 0;
+        const { RangePicker } = DatePicker;
+		var departmentArr = this.state.departmentArr ||[];
+        return ( <div className="user-content">
+            <div className="content-title">
+                    <span>开票申请列表</span>
+                </div>
+                <div className="user-search">
+                    <Input placeholder="营销员名称"
+                        value={this.state.nameSearch}
+                        onChange={(e) => { this.setState({ nameSearch: e.target.value }); }} />
+                    <Input placeholder="订单编号"
+                        value={this.state.orderNoSearch}
+                        onChange={(e) => { this.setState({ orderNoSearch: e.target.value }); }} />
+					<Select placeholder="订单部门"
+					    style={{ width: 150 ,marginRight:10}}
+					    value={this.state.departmenttList}
+					    onChange={(e) => { this.setState({ departmenttList: e }) }}>
+					    {
+					        departmentArr.map(function (item) {
+					                return <Select.Option key={item.id} >{item.name}</Select.Option>
+					        })
+					    }
+					</Select>
+                    <Button type="primary" onClick={this.search} style={{ marginLeft:10}}>搜索</Button>
+                    <Button onClick={this.reset}>重置</Button>
+                </div>
+                <div className="patent-table">
+                    <Spin spinning={this.state.loading}>
+                        <Table columns={this.state.columns}
+                            dataSource={this.state.dataSource}
+                            pagination={this.state.pagination}/>
+                    </Spin>
+                </div>
+				<Modal visible={this.state.visibleR}
+						className="admin-desc-content"
+						footer=''
+						title = '拒绝理由'
+						width='400px'
+						onCancel={this.rejectCancels}>
+						<Input.TextArea placeholder="请输入拒绝理由"
+										rows={4}
+										value={this.state.reason} onChange={(e)=>{this.setState({ reason:e.target.value })}}>
+										
+						</Input.TextArea>
+					<div className="clearfix" style={{marginTop:'20px'}}>	
+						<Button type="primary" onClick={(e) =>{ e.stopPropagation(), this.commit()}} style={{float:'right'}}>提交</Button>
+					</div>
+				</Modal>
+				<Modal	
+				  className="admin-desc-content"
+				  footer=''
+				  title = '开具发票申请单'
+				  width='900px'
+				  visible={this.state.avisible}
+				  onOk={this.visitOks}
+				  onCancel={this.visitCancels}
+				>
+					<Form layout="horizontal" id="demand-form" style={{paddingBottom:'40px'}} >
+					    <Spin spinning={this.state.loading}>
+					        <div className="clearfix">
+								<div className="clearfix">
+									<FormItem className="half-item"
+									    {...formItemLayout}
+									    label="合同编号" >
+									    <span>{this.state.contractNo}</span>
+									</FormItem>
+									<FormItem className="half-item"
+									        {...formItemLayout}
+									        label="备注" >                             
+									        <span>{this.state.remarks}</span>
+									</FormItem>
+								</div>
+								<div className="clearfix">
+								<FormItem className="half-item"
+								    {...formItemLayout}
+								    label={
+								    	<span>
+								    		<strong style={{ color: '#f00' }}>*</strong>省内/外
+								    	</span> 
+								    }  >  
+								    <span>{getProvinceA(this.state.type)}</span>
+								</FormItem>
+								<FormItem className="half-item"
+								    {...formItemLayout}
+								    label={
+								    	<span>
+								    		<strong style={{ color: '#f00' }}>*</strong>特批
+								    	</span> 
+								    }  >  
+								    <span>{this.state.approval === 0?'否':'是'}</span>
+								</FormItem>
+								</div>
+								<hr style={{border:'1px dashed #aaa', width:"90%",margin:'auto'}}/>
+									<div style={{marginTop:'13px',marginLeft:'16px'}}>
+										<span style={{fontSize:'14px'}}>发票内容</span>
+									</div>
+								<div className="clearfix">
+									<FormItem className="half-item"
+									    {...formItemLayout}
+									    label={
+									    	<span>
+												<strong style={{ color: '#f00' }}>*</strong>发票类型
+											</span> 
+									    } >
+										<span>{this.state.invoiceType===0?'增值税专用发票':(this.state.invoiceType === 1?'增值税普通发票':'其他')}</span>
+									</FormItem>
+								</div>
+								<div className="clearfix">
+									<FormItem className="half-item"
+									        {...formItemLayout}
+									        label={
+									        	<span>
+									        		<strong style={{ color: '#f00' }}>*</strong>单位名称
+									        	</span> 
+									        } >  
+											<span>{this.state.unitName}</span>
+									</FormItem>
+									<FormItem className="half-item"
+									        {...formItemLayout}
+									        label={
+									        	<span>
+									        		<strong style={{ color: '#f00' }}>*</strong>税号
+									        	</span> 
+									        } >                             
+									        <span>{this.state.taxNumber}</span>
+									</FormItem>
+									<FormItem className="half-item"
+									        {...formItemLayout}
+									        label={
+									        	<span>
+									        		<strong style={{ color: '#f00' }}>*</strong>开票金额
+									        	</span> 
+									        } >                             
+									        <span>{this.state.amount}</span>
+									</FormItem>
+									<FormItem className="half-item"
+									        {...formItemLayout}
+									        label={
+									        	<span>
+									        		<strong style={{ color: '#f00' }}>*</strong>开户行银行账号
+									        	</span> 
+									        } >                             
+									        <span>{this.state.banks}</span>
+									</FormItem>
+									<FormItem className="half-item"
+									        {...formItemLayout}
+									        label={
+									        	<span>
+									        		<strong style={{ color: '#f00' }}>*</strong>开票内容及说明
+									        	</span> 
+									        } >                             
+									        <span>{this.state.content}</span>
+									</FormItem>
+									<FormItem className="half-item"
+									        {...formItemLayout}
+									        label={
+									        	<span>
+									        		<strong style={{ color: '#f00' }}>*</strong>单位地址
+									        	</span> 
+									        } >                             
+									        <span>{this.state.unitAddress}</span>
+									</FormItem>
+									<FormItem className="half-item"
+									        {...formItemLayout}
+									        label="备注" >                             
+									        <span>{this.state.invoiceRemarks}</span>
+									</FormItem>
+									<FormItem className="half-item"
+									        {...formItemLayout}
+									        label={
+									        	<span>
+									        		<strong style={{ color: '#f00' }}>*</strong>单位电话
+									        	</span> 
+									        } >                             
+									        <span>{this.state.unitMobile}</span>
+									</FormItem>
+								</div>
+								<div className="clearfix">
+									<FormItem
+									    labelCol={{ span: 4 }}
+									    wrapperCol={{ span: 18 }}
+									    label={
+									    	<span>
+												<strong style={{ color: '#f00' }}>*</strong>附件
+											</span> 
+									    }
+									    >
+										<Upload className="demandDetailShow-upload"
+										    listType="picture-card"
+										    fileList={this.state.orgCodeUrl}                               
+										    onPreview={(file) => {
+										        this.setState({
+										            previewImage: file.url || file.thumbUrl,
+										            previewVisible: true,
+										        });
+										    }} >
+										</Upload>
+										<Modal maskClosable={false} footer={null}
+										    visible={this.state.previewVisible}
+										    onCancel={() => { this.setState({ previewVisible: false }) }}>
+										    <img alt="" style={{ width: '100%' }} src={this.state.previewImage || ''} />
+										</Modal>
+									</FormItem>
+								</div>
+								<hr style={{border:'1px dashed #aaa', width:"90%",margin:'auto'}}/>
+								<div className="clearfix" style={{marginTop:'10px'}}>
+									<FormItem className="half-item"
+									    {...formItemLayout}
+									    label="发票是否邮寄:" >
+										<span>{this.state.post===0?'是':"否"}</span>
+									</FormItem>
+								</div>
+								{this.state.post === 0?<div>
+								<div className="clearfix">
+									<FormItem className="half-item"
+									        {...formItemLayout}
+									        label="收信人姓名" >                             
+									        <span>{this.state.addressee}</span>
+									</FormItem>
+									<FormItem className="half-item"
+									        {...formItemLayout}
+									        label="电话" >                             
+									        <span>{this.state.addresseeMobile}</span>
+									</FormItem>
+								</div>
+								<div className="clearfix">
+									<FormItem className="half-item"
+								        {...formItemLayout}
+								       label="省-市-区"
+								      > 
+									  <span>{getprovince(this.state.addresseeProvince)}/{getprovince(this.state.addresseeCity)}/{getprovince(this.state.addresseeArea)}</span>
+								    </FormItem>
+								</div>
+								<div className="clearfix">
+									<FormItem className="half-item"
+								        {...formItemLayout}
+								       label="详细地址"
+								      > 
+										<span>{this.state.recipientAddress}</span>
+								    </FormItem>
+								</div>
+								</div>:''}
+							</div>
+						</Spin>
+					</Form>
+				</Modal>
+				<Modal visible={this.state.bvisible}
+						footer=''
+						title='开票历史记录'
+						className="admin-desc-content"
+						width='900px'
+						onCancel={this.inRecordCanl}>
+						<Spin spinning={this.state.loading}>
+							<div className="patent-table">
+								<Table columns={this.state.columnsDate}
+									dataSource={this.state.recordData}
+									pagination={false}/>
+								<div className="clearfix" style={{marginTop:'20px'}}>
+									<FormItem className="half-item"
+										{...formItemLayout}
+										label={
+											<span style={{fontSize:'14px'}}>
+												开票总计
+											</span> 
+										} >
+										<span>{this.state.sum+'(万元)'}</span>
+									</FormItem>
+								</div>
+							</div>
+						</Spin>
+				</Modal>
+        </div> )
+    }
+})
+ 
+export default invoiceApplyList;

+ 775 - 0
js/component/manageCenter/financialManage/distribute/invoiceApplyListWai.jsx

@@ -0,0 +1,775 @@
+import React,{Component} from 'react';
+import ajax from 'jquery/src/ajax/xhr.js';
+import $ from 'jquery/src/ajax';
+import moment from 'moment';
+import './public.less';
+import { Form,Radio, Icon, Button, Input, Select, Spin, Table, Switch, message, DatePicker, Checkbox ,Modal, Upload ,Popconfirm,Cascader,Tabs} from 'antd';
+import {getProcessStatus,getApproval,getProvinceA,beforeUploadFile,getInvoiceStatus,getprovince,splitUrl} from '@/tools';
+import {projectProgress,specially,province,invoiceStatus} from '../../../dataDic.js';
+
+const FormItem = Form.Item;
+const PicturesWall = React.createClass({
+    getInitialState() {
+        return {
+            previewVisible: false,
+            previewImage: '',
+            fileList: this.props.pictureUrl,
+        }
+    },
+    getDefaultProps(){
+    	return{
+    		changeClick:this.modifyChange
+    	}
+    },
+    handleCancel() {
+        this.setState({ previewVisible: false })
+    },
+    handlePreview(file) {
+        this.setState({
+            previewImage: file.url || file.thumbUrl,
+            previewVisible: true,
+        });
+    },
+    handleChange(info) {
+        let fileList = info.fileList;
+        this.setState({ fileList });
+        this.props.fileList(fileList);
+    },
+    componentWillReceiveProps(nextProps) {
+        this.state.fileList = nextProps.pictureUrl; 
+    },
+    render() {
+        const { previewVisible, previewImage, fileList } = this.state;
+        const uploadButton = (
+            <div>
+                <Icon type="plus" />
+                <div className="ant-upload-text">点击上传</div>
+            </div>
+        );
+        return (
+            <div style={{display:"inline-block"}}>
+                <Upload
+                	beforeUpload={beforeUploadFile}
+                    action={globalConfig.context + "/api/admin/orderInvoice/uploadOrderInvoiceFile"}
+                    data={{ 'sign': '' }}
+                    listType="picture-card"
+                    fileList={fileList}
+                    onPreview={this.handlePreview}
+                    onChange={this.handleChange} >
+                    {fileList.length >= 18 ? null : uploadButton}
+                </Upload>
+                <Modal maskClosable={false} visible={previewVisible} footer={null} onCancel={this.handleCancel}>
+                    <img alt="example" style={{ width: '100%' }} src={previewImage} />
+                </Modal>
+            </div>
+        );
+    }
+});
+
+const invoiceApplyListWai = React.createClass({
+	departmentList() {
+		this.setState({
+			loading: true
+		});
+		$.ajax({
+			method: "get",
+			dataType: "json",
+			crossDomain: false,
+			url: globalConfig.context + "/api/admin/organization/selectSuperId",
+			data: {},
+			success: function(data) {
+	            let thedata = data.data;
+				let theArr=[];
+				if(!thedata) {
+					if(data.error && data.error.length) {
+						message.warning(data.error[0].message);
+					};
+				}else{
+					thedata.map(function(item,index){
+						theArr.push({
+							key:index,
+							name:item.name,
+							id:item.id,
+						})
+					})
+				}
+				this.setState({
+					departmentArr:theArr,
+				})
+			}.bind(this),
+			}).always(function() {
+				this.setState({
+					loading: false
+				});
+			}.bind(this));
+	},
+    loadData(pageNo) {
+        this.state.data = [];
+        this.setState({
+            loading: true
+        });
+        $.ajax({
+            method: "get",
+            dataType: "json",
+            crossDomain: false,
+            url: globalConfig.context + "/api/admin/orderInvoice/financeOrderInvoiceList",
+            data: {
+                pageNo: pageNo || 1,
+                pageSize: this.state.pagination.pageSize,
+                name: this.state.nameSearch,//客户名称
+                orderNo:this.state.orderNoSearch,
+				orderDep:this.state.orderDep,
+				type:1
+            },
+            success: function (data) {
+                let theArr = [];
+                if (!data.data || !data.data.list) {
+                    if (data.error && data.error.length) {
+                        message.warning(data.error[0].message);
+                    };
+                } else {
+                    for (let i = 0; i < data.data.list.length; i++) {
+                        let thisdata = data.data.list[i];
+                        theArr.push({
+                            key: i,
+                            id: thisdata.id,
+							status:thisdata.status,
+                            unitName:thisdata.unitName,
+		                    orderno:thisdata.orderno,
+		                    name:thisdata.name,
+                            projectStatus:thisdata.projectStatus,
+                            amount:thisdata.amount,
+                            sumAmount:thisdata.sumAmount,
+                            createTime:thisdata.createTime?new Date(thisdata.createTime).toLocaleString():'',
+                            settlementAmount:thisdata.settlementAmount,
+							notAmount:thisdata.notAmount,
+                        });
+                    };
+                }
+                this.state.pagination.current = data.data.pageNo;
+                this.state.pagination.total = data.data.totalCount;
+                if(data.data&&data.data.list&&!data.data.list.length){
+					this.state.pagination.current=0
+					this.state.pagination.total=0
+				}
+                this.setState({
+                    totalPage:data.data.totalPage,
+                    dataSource: theArr,
+                    pagination: this.state.pagination
+                });
+            }.bind(this),
+        }).always(function () {
+            this.setState({
+                loading: false
+            });
+        }.bind(this));
+    },
+	
+	invoiceData() {
+	    this.setState({
+	        loading: true
+	    });
+	    $.ajax({
+	        method: "get",
+	        dataType: "json",
+	        crossDomain: false,
+	        url: globalConfig.context + '/api/admin/orderInvoice/selectByIdOrderInvoice',
+			data:{
+				id:this.state.id
+			},
+	        success:function (data) {
+				        let thisdata = data.data;
+				        this.setState({
+							contractNo:thisdata.contractNo,
+							orderNo:thisdata.orderNo,
+							approval:thisdata.approval,
+							type:thisdata.type,
+							status:thisdata.status,
+							remarks:thisdata.remarks,
+							invoiceType:thisdata.invoiceType,
+							unitName:thisdata.unitName,
+							taxNumber:thisdata.taxNumber,
+							amount:thisdata.amount,
+							banks:thisdata.banks,
+							content:thisdata.content,
+							unitAddress:thisdata.unitAddress,
+							invoiceRemarks:thisdata.invoiceRemarks,
+							unitMobile:thisdata.unitMobile,
+							post:thisdata.post,
+							addressee:thisdata.addressee,
+							addresseeMobile:thisdata.addresseeMobile,
+							addresseeProvince:thisdata.addresseeProvince,
+							addresseeCity:thisdata.addresseeCity,
+							addresseeArea:thisdata.addresseeArea,
+							recipientAddress:thisdata.recipientAddress,
+							orgCodeUrl: thisdata.voucherUrl ? splitUrl(thisdata.voucherUrl, ',', globalConfig.avatarHost + '/upload') : [],
+						})
+					}.bind(this)
+	    }).done(function(data) {
+			this.setState({
+				loading: false
+			});
+	    }.bind(this));
+	},
+	
+    getInitialState() {
+        return {
+            searchMore: true,
+            assignVisible:false,
+            releaseDate: [],
+            totalPage:0,
+            boHuivisible:false,
+            selectedRowKeys: [],
+            selectedRows: [],
+            loading: false,
+			reason: '',
+			foo:0,
+            pagination: {
+                defaultCurrent: 1,
+                defaultPageSize: 10,
+                showQuickJumper: true,
+                pageSize: 10,
+                onChange: function (page) {
+                    this.loadData(page);
+                }.bind(this),
+                showTotal: function (total) {
+                    return '共' + total + '条数据';
+                }
+            },
+            columns: [
+                {
+                    title: '编号',
+                    dataIndex: 'id',
+                    key: 'id',
+                }, {
+                    title: '客户',
+                    dataIndex: 'unitName',
+                    key: 'unitName',
+                }, {
+                    title: '跟单人/签单人',
+                    dataIndex: 'name',
+                    key: 'name',
+                },  {
+                    title: '项目状态',
+                    dataIndex: 'projectStatus',
+                    key: 'projectStatus',
+                },
+                {
+                    title: '申请开票(万)',
+                    dataIndex: 'amount',
+                    key: 'amount'
+                },
+                {
+                    title: '已开票(万)',
+                    dataIndex: 'sumAmount',
+                    key: 'sumAmount'
+                },
+				{
+				    title: '已收款',
+				    dataIndex: 'settlementAmount',
+				    key: 'settlementAmount'
+				},
+                {
+                    title: '未收款',
+                    dataIndex: 'notAmount',
+                    key: 'notAmount'
+                },
+                {
+                    title: '申请时间',
+                    dataIndex: 'createTime',
+                    key: 'createTime',
+                },
+                {
+                    title:'操作',
+                    dataIndex: 'caozuo',
+                    key: 'caouzo',
+                    render:(text,record,index)=>{
+                        return <div>
+							{<Button type="primary" onClick={(e) =>{ e.stopPropagation(),this.visit(record,index)}} style={{background:'deepskyblue',border:'none'}}>申请内容</Button>}
+							{record.status !== 2?<Button type="primary" style={{marginLeft:'10px'}} onClick={(e) =>{ e.stopPropagation(),this.setState({examine:2},()=>{this.sende(record)})}}>通过</Button>
+								:''}
+							{record.status !== 2?<Button type="danger" onClick={(e) =>{ e.stopPropagation(),this.setState({examine:3},()=>{this.reject(record)})}} style={{marginLeft:'10px'}}>拒绝</Button>
+								:''}
+							{record.status === 2?<Button style={{marginLeft:'10px',color:'black'}} disabled={true}>已通过</Button>
+								:''}
+							{<Button type="primary" style={{marginLeft:'10px',background:'orangered',border:'none'}} onClick={(e) =>{ e.stopPropagation(), this.inRecord(record,index)}}>开票记录</Button>}
+                        </div>
+                    }
+                }
+            ],
+			columnsDate:[
+				{
+				    title: '编号',
+				    dataIndex: 'id',
+				    key: 'id'
+				},{
+			        title: '订单编号',
+			        dataIndex: 'orderno',
+			        key: 'orderno'
+			    },{
+			        title: '开票金额(万元)',
+			        dataIndex: 'amount',
+			        key: 'amount'
+			    },{
+			        title: '申请时间',
+			        dataIndex: 'createTime',
+			        key: 'createTime'
+			    },{
+			        title: '开票状态',
+			        dataIndex: 'status',
+			        key: 'status',
+					render:(text)=>{
+						return getInvoiceStatus(text)
+					}
+			    }
+			],
+            dataSource: [],
+            searchTime: [,]
+        }
+    },
+	
+	loadSend(record){
+		this.setState({
+		    loading: true
+		});
+		if (this.state.examine === 3 && this.state.reason === '') {
+			message.warning('拒绝理由不能为空!')
+			return
+		}
+		$.ajax({
+		    method: "post",
+		    dataType: "json",
+		    crossDomain: false,
+		    url: globalConfig.context + '/api/admin/orderInvoice/financeExamine',
+		    data: {
+				id:this.state.examine===2?record.id:this.state.id,
+				examine:this.state.examine,
+				reason:this.state.reason
+		    },
+			success: function (data) {
+				
+			}.bind(this),
+		}).done(function(data) {
+			this.setState({
+				loading: false
+			});
+			if(this.state.examine === 2){
+				message.success('通过成功!');
+				this.loadData()
+			}else{
+				message.success('拒绝成功!')
+				this.resetReason()
+				this.rejectCancels()
+				this.loadData()
+			}
+		}.bind(this));
+	},
+	
+	//重置拒绝理由
+	resetReason(){
+		this.setState({
+			reason:''
+		})
+	},
+	
+	sende(record){
+		this.loadSend(record)
+	},
+	
+	commit(){
+		this.loadSend()
+		this.setState({
+			avisible:false
+		})
+	},
+	
+	visit(record,index){
+		this.setState({
+			id:this.state.dataSource[index].id,
+			avisible:true,
+		},()=>{
+			this.invoiceData()
+		})
+	},
+	visitCancels(){
+		this.setState({
+			avisible:false
+		})
+	},
+	
+	reject(record){
+		this.setState({
+			visibleR:true,
+			id:record.id
+		});
+	},
+	rejectCancels(){
+		this.setState({
+			visibleR:false
+		})
+	},
+	inRecordData(){
+		this.setState({
+		    loading: true
+		});
+		$.ajax({
+		    method: "get",
+		    dataType: "json",
+		    crossDomain: false,
+		    url: globalConfig.context + '/api/admin/orderInvoice/salesmanOrderInvoiceList',
+		    data: {
+				orderNo:this.state.orderNo2
+		    },
+			success: function (data) {
+			    let theArr = [];
+				let sum = 0;
+			    if (!data.data) {
+			        if (data.error && data.error.length) {
+			            message.warning(data.error[0].message);
+			        };
+			    } else {
+			        for (let i = 0; i < data.data.list.length; i++) {
+			            let thisdata = data.data.list[i];
+						sum += parseFloat(thisdata.amount);
+			            theArr.push({
+			                 id: thisdata.id,
+			                 orderno: thisdata.orderno,//订单编号
+			                 amount:thisdata.amount,//签单金额
+			                 createTime:thisdata.createTime,//流程状态
+			                 status:thisdata.status,//结算状态
+							 rejectReason:thisdata.rejectReason
+			            });
+			        };
+			    };
+				this.setState({
+					recordData:theArr,
+					sum:sum
+				})
+			}.bind(this),
+		}).done(function(data) {
+			this.setState({
+				loading: false
+			});
+		}.bind(this));
+	},
+	
+	inRecord(record,index){
+		this.setState({
+			bvisible:true,
+			orderNo2:record.orderno,
+		},() => {this.inRecordData()})
+	},
+	
+	inRecordCanl(){
+		this.setState({
+			bvisible:false
+		})
+	},
+	
+	search(){
+		this.loadData();
+	},
+	
+    componentWillMount() {
+		this.departmentList();
+        this.loadData();
+    },
+    reset() {
+        this.state.nameSearch = '';
+        this.state.releaseDate = [];
+        this.state.orderNoSearch='';
+		this.state.processStatus = [];
+		this.state.departmenttList = [];
+        this.loadData();
+    },
+    render() { 
+        const rowSelection = {
+            selectedRowKeys: this.state.selectedRowKeys,
+            onChange: (selectedRowKeys, selectedRows) => {
+                this.setState({
+                    selectedRows: selectedRows.slice(-1),
+                    selectedRowKeys: selectedRowKeys.slice(-1)
+                });
+            }
+        };
+		const formItemLayout = {
+			labelCol: { span: 8 },
+			wrapperCol: { span: 14 },
+		};
+        const hasSelected = this.state.selectedRowKeys.length > 0;
+        const { RangePicker } = DatePicker;
+		var departmentArr = this.state.departmentArr ||[];
+        return ( <div className="user-content">
+            <div className="content-title">
+                    <span>开票申请列表</span>
+                </div>
+                <div className="user-search">
+                    <Input placeholder="营销员名称"
+                        value={this.state.nameSearch}
+                        onChange={(e) => { this.setState({ nameSearch: e.target.value }); }} />
+                    <Input placeholder="订单编号"
+                        value={this.state.orderNoSearch}
+                        onChange={(e) => { this.setState({ orderNoSearch: e.target.value }); }} />
+					<Select placeholder="订单部门"
+					    style={{ width: 150 ,marginRight:10}}
+					    value={this.state.departmenttList}
+					    onChange={(e) => { this.setState({ departmenttList: e }) }}>
+					    {
+					        departmentArr.map(function (item) {
+					                return <Select.Option key={item.id} >{item.name}</Select.Option>
+					        })
+					    }
+					</Select>
+                    <Button type="primary" onClick={this.search} style={{ marginLeft:10}}>搜索</Button>
+                    <Button onClick={this.reset}>重置</Button>
+                </div>
+                <div className="patent-table">
+                    <Spin spinning={this.state.loading}>
+                        <Table columns={this.state.columns}
+                            dataSource={this.state.dataSource}
+                            pagination={this.state.pagination}/>
+                    </Spin>
+                </div>
+				<Modal visible={this.state.visibleR}
+						className="admin-desc-content"
+						footer=''
+						title = '拒绝理由'
+						width='400px'
+						onCancel={this.rejectCancels}>
+						<Input.TextArea placeholder="请输入拒绝理由"
+										rows={4}
+										value={this.state.reason} onChange={(e)=>{this.setState({ reason:e.target.value })}}>
+										
+						</Input.TextArea>
+					<div className="clearfix" style={{marginTop:'20px'}}>	
+						<Button type="primary" onClick={(e) =>{ e.stopPropagation(), this.commit()}} style={{float:'right'}}>提交</Button>
+					</div>
+				</Modal>
+				<Modal	
+				  className="admin-desc-content"
+				  footer=''
+				  title = '开具发票申请单'
+				  width='900px'
+				  visible={this.state.avisible}
+				  onOk={this.visitOks}
+				  onCancel={this.visitCancels}
+				>
+					<Form layout="horizontal" id="demand-form" style={{paddingBottom:'40px'}} >
+					    <Spin spinning={this.state.loading}>
+					        <div className="clearfix">
+								<div className="clearfix">
+									<FormItem className="half-item"
+									    {...formItemLayout}
+									    label="合同编号" >
+									    <span>{this.state.contractNo}</span>
+									</FormItem>
+									<FormItem className="half-item"
+									        {...formItemLayout}
+									        label="备注" >                             
+									        <span>{this.state.remarks}</span>
+									</FormItem>
+								</div>
+								<div className="clearfix">
+								<FormItem className="half-item"
+								    {...formItemLayout}
+								    label={
+								    	<span>
+								    		<strong style={{ color: '#f00' }}>*</strong>省内/外
+								    	</span> 
+								    }  >  
+								    <span>{getProvinceA(this.state.type)}</span>
+								</FormItem>
+								<FormItem className="half-item"
+								    {...formItemLayout}
+								    label={
+								    	<span>
+								    		<strong style={{ color: '#f00' }}>*</strong>特批
+								    	</span> 
+								    }  >  
+								    <span>{this.state.approval === 0?'否':'是'}</span>
+								</FormItem>
+								</div>
+								<hr style={{border:'1px dashed #aaa', width:"90%",margin:'auto'}}/>
+									<div style={{marginTop:'13px',marginLeft:'16px'}}>
+										<span style={{fontSize:'14px'}}>发票内容</span>
+									</div>
+								<div className="clearfix">
+									<FormItem className="half-item"
+									    {...formItemLayout}
+									    label={
+									    	<span>
+												<strong style={{ color: '#f00' }}>*</strong>发票类型
+											</span> 
+									    } >
+										<span>{this.state.invoiceType===0?'增值税专用发票':(this.state.invoiceType === 1?'增值税普通发票':'其他')}</span>
+									</FormItem>
+								</div>
+								<div className="clearfix">
+									<FormItem className="half-item"
+									        {...formItemLayout}
+									        label={
+									        	<span>
+									        		<strong style={{ color: '#f00' }}>*</strong>单位名称
+									        	</span> 
+									        } >  
+											<span>{this.state.unitName}</span>
+									</FormItem>
+									<FormItem className="half-item"
+									        {...formItemLayout}
+									        label={
+									        	<span>
+									        		<strong style={{ color: '#f00' }}>*</strong>税号
+									        	</span> 
+									        } >                             
+									        <span>{this.state.taxNumber}</span>
+									</FormItem>
+									<FormItem className="half-item"
+									        {...formItemLayout}
+									        label={
+									        	<span>
+									        		<strong style={{ color: '#f00' }}>*</strong>开票金额
+									        	</span> 
+									        } >                             
+									        <span>{this.state.amount}</span>
+									</FormItem>
+									<FormItem className="half-item"
+									        {...formItemLayout}
+									        label={
+									        	<span>
+									        		<strong style={{ color: '#f00' }}>*</strong>开户行银行账号
+									        	</span> 
+									        } >                             
+									        <span>{this.state.banks}</span>
+									</FormItem>
+									<FormItem className="half-item"
+									        {...formItemLayout}
+									        label={
+									        	<span>
+									        		<strong style={{ color: '#f00' }}>*</strong>开票内容及说明
+									        	</span> 
+									        } >                             
+									        <span>{this.state.content}</span>
+									</FormItem>
+									<FormItem className="half-item"
+									        {...formItemLayout}
+									        label={
+									        	<span>
+									        		<strong style={{ color: '#f00' }}>*</strong>单位地址
+									        	</span> 
+									        } >                             
+									        <span>{this.state.unitAddress}</span>
+									</FormItem>
+									<FormItem className="half-item"
+									        {...formItemLayout}
+									        label="备注" >                             
+									        <span>{this.state.invoiceRemarks}</span>
+									</FormItem>
+									<FormItem className="half-item"
+									        {...formItemLayout}
+									        label={
+									        	<span>
+									        		<strong style={{ color: '#f00' }}>*</strong>单位电话
+									        	</span> 
+									        } >                             
+									        <span>{this.state.unitMobile}</span>
+									</FormItem>
+								</div>
+								<div className="clearfix">
+									<FormItem
+									    labelCol={{ span: 4 }}
+									    wrapperCol={{ span: 18 }}
+									    label={
+									    	<span>
+												<strong style={{ color: '#f00' }}>*</strong>附件
+											</span> 
+									    }
+									    >
+										<Upload className="demandDetailShow-upload"
+										    listType="picture-card"
+										    fileList={this.state.orgCodeUrl}                               
+										    onPreview={(file) => {
+										        this.setState({
+										            previewImage: file.url || file.thumbUrl,
+										            previewVisible: true,
+										        });
+										    }} >
+										</Upload>
+										<Modal maskClosable={false} footer={null}
+										    visible={this.state.previewVisible}
+										    onCancel={() => { this.setState({ previewVisible: false }) }}>
+										    <img alt="" style={{ width: '100%' }} src={this.state.previewImage || ''} />
+										</Modal>
+									</FormItem>
+								</div>
+								<hr style={{border:'1px dashed #aaa', width:"90%",margin:'auto'}}/>
+								<div className="clearfix" style={{marginTop:'10px'}}>
+									<FormItem className="half-item"
+									    {...formItemLayout}
+									    label="发票是否邮寄:" >
+										<span>{this.state.post===0?'是':"否"}</span>
+									</FormItem>
+								</div>
+								{this.state.post === 0?<div>
+								<div className="clearfix">
+									<FormItem className="half-item"
+									        {...formItemLayout}
+									        label="收信人姓名" >                             
+									        <span>{this.state.addressee}</span>
+									</FormItem>
+									<FormItem className="half-item"
+									        {...formItemLayout}
+									        label="电话" >                             
+									        <span>{this.state.addresseeMobile}</span>
+									</FormItem>
+								</div>
+								<div className="clearfix">
+									<FormItem className="half-item"
+								        {...formItemLayout}
+								       label="省-市-区"
+								      > 
+									  <span>{getprovince(this.state.addresseeProvince)}/{getprovince(this.state.addresseeCity)}/{getprovince(this.state.addresseeArea)}</span>
+								    </FormItem>
+								</div>
+								<div className="clearfix">
+									<FormItem className="half-item"
+								        {...formItemLayout}
+								       label="详细地址"
+								      > 
+										<span>{this.state.recipientAddress}</span>
+								    </FormItem>
+								</div>
+								</div>:''}
+							</div>
+						</Spin>
+					</Form>
+				</Modal>
+				<Modal visible={this.state.bvisible}
+						footer=''
+						title='开票历史记录'
+						className="admin-desc-content"
+						width='900px'
+						onCancel={this.inRecordCanl}>
+						<Spin spinning={this.state.loading}>
+							<div className="patent-table">
+								<Table columns={this.state.columnsDate}
+									dataSource={this.state.recordData}
+									pagination={false}/>
+								<div className="clearfix" style={{marginTop:'20px'}}>
+									<FormItem className="half-item"
+										{...formItemLayout}
+										label={
+											<span style={{fontSize:'14px'}}>
+												开票总计
+											</span> 
+										} >
+										<span>{this.state.sum+'(万元)'}</span>
+									</FormItem>
+								</div>
+							</div>
+						</Spin>
+				</Modal>
+        </div> )
+    }
+})
+ 
+export default invoiceApplyListWai;

+ 758 - 0
js/component/manageCenter/financialManage/distribute/outSpecial.jsx

@@ -0,0 +1,758 @@
+import React,{Component} from 'react';
+import ajax from 'jquery/src/ajax/xhr.js';
+import $ from 'jquery/src/ajax';
+import moment from 'moment';
+import './public.less';
+import { Form,Radio, Icon, Button, Input, Select, Spin, Table, Switch, message, DatePicker, Checkbox ,Modal, Upload ,Popconfirm,Cascader,Tabs} from 'antd';
+import {getProcessStatus,getApproval,getProvinceA,beforeUploadFile,getInvoiceStatus,getprovince,splitUrl} from '@/tools';
+import {projectProgress,specially,province,invoiceStatus} from '../../../dataDic.js';
+
+const FormItem = Form.Item;
+const PicturesWall = React.createClass({
+    getInitialState() {
+        return {
+            previewVisible: false,
+            previewImage: '',
+            fileList: this.props.pictureUrl,
+        }
+    },
+    getDefaultProps(){
+    	return{
+    		changeClick:this.modifyChange
+    	}
+    },
+    handleCancel() {
+        this.setState({ previewVisible: false })
+    },
+    handlePreview(file) {
+        this.setState({
+            previewImage: file.url || file.thumbUrl,
+            previewVisible: true,
+        });
+    },
+    handleChange(info) {
+        let fileList = info.fileList;
+        this.setState({ fileList });
+        this.props.fileList(fileList);
+    },
+    componentWillReceiveProps(nextProps) {
+        this.state.fileList = nextProps.pictureUrl; 
+    },
+    render() {
+        const { previewVisible, previewImage, fileList } = this.state;
+        const uploadButton = (
+            <div>
+                <Icon type="plus" />
+                <div className="ant-upload-text">点击上传</div>
+            </div>
+        );
+        return (
+            <div style={{display:"inline-block"}}>
+                <Upload
+                	beforeUpload={beforeUploadFile}
+                    action={globalConfig.context + "/api/admin/orderInvoice/uploadOrderInvoiceFile"}
+                    data={{ 'sign': '' }}
+                    listType="picture-card"
+                    fileList={fileList}
+                    onPreview={this.handlePreview}
+                    onChange={this.handleChange} >
+                    {fileList.length >= 18 ? null : uploadButton}
+                </Upload>
+                <Modal maskClosable={false} visible={previewVisible} footer={null} onCancel={this.handleCancel}>
+                    <img alt="example" style={{ width: '100%' }} src={previewImage} />
+                </Modal>
+            </div>
+        );
+    }
+});
+
+const outSpecial = React.createClass({
+	departmentList() {
+		this.setState({
+			loading: true
+		});
+		$.ajax({
+			method: "get",
+			dataType: "json",
+			crossDomain: false,
+			url: globalConfig.context + "/api/admin/organization/selectSuperId",
+			data: {},
+			success: function(data) {
+	            let thedata = data.data;
+				let theArr=[];
+				if(!thedata) {
+					if(data.error && data.error.length) {
+						message.warning(data.error[0].message);
+					};
+				}else{
+					thedata.map(function(item,index){
+						theArr.push({
+							key:index,
+							name:item.name,
+							id:item.id,
+						})
+					})
+				}
+				this.setState({
+					departmentArr:theArr,
+				})
+			}.bind(this),
+			}).always(function() {
+				this.setState({
+					loading: false
+				});
+			}.bind(this));
+	},
+    loadData(pageNo) {
+        this.state.data = [];
+        this.setState({
+            loading: true
+        });
+        $.ajax({
+            method: "get",
+            dataType: "json",
+            crossDomain: false,
+            url: globalConfig.context + "/api/admin/orderInvoice/approvalOrderInvoiceList",
+            data: {
+                pageNo: pageNo || 1,
+                pageSize: this.state.pagination.pageSize,
+                name: this.state.nameSearch,//客户名称
+                orderNo:this.state.orderNoSearch,
+				orderDep:this.state.orderDep,
+				type:1
+            },
+            success: function (data) {
+                let theArr = [];
+                if (!data.data || !data.data.list) {
+                    if (data.error && data.error.length) {
+                        message.warning(data.error[0].message);
+                    };
+                } else {
+                    for (let i = 0; i < data.data.list.length; i++) {
+                        let thisdata = data.data.list[i];
+                        theArr.push({
+                            key: i,
+                            id: thisdata.id,
+							status:thisdata.status,
+                            unitName:thisdata.unitName,
+		                    orderno:thisdata.orderno,
+		                    name:thisdata.name,
+                            projectStatus:thisdata.projectStatus,
+                            amount:thisdata.amount,
+                            sumAmount:thisdata.sumAmount,
+                            createTime:thisdata.createTime?new Date(thisdata.createTime).toLocaleString():'',
+                            settlementAmount:thisdata.settlementAmount,
+							notAmount:thisdata.notAmount,
+                        });
+                    };
+                }
+                this.state.pagination.current = data.data.pageNo;
+                this.state.pagination.total = data.data.totalCount;
+                if(data.data&&data.data.list&&!data.data.list.length){
+					this.state.pagination.current=0
+					this.state.pagination.total=0
+				}
+                this.setState({
+                    totalPage:data.data.totalPage,
+                    dataSource: theArr,
+                    pagination: this.state.pagination
+                });
+            }.bind(this),
+        }).always(function () {
+            this.setState({
+                loading: false
+            });
+        }.bind(this));
+    },
+	
+	invoiceData() {
+	    this.setState({
+	        loading: true
+	    });
+	    $.ajax({
+	        method: "get",
+	        dataType: "json",
+	        crossDomain: false,
+	        url: globalConfig.context + '/api/admin/orderInvoice/selectByIdOrderInvoice',
+			data:{
+				id:this.state.id
+			},
+	        success:function (data) {
+				        let thisdata = data.data;
+				        this.setState({
+							orderNo:thisdata.orderNo,
+							type:thisdata.type,
+							status:thisdata.status,
+							remarks:thisdata.remarks,
+							invoiceType:thisdata.invoiceType,
+							unitName:thisdata.unitName,
+							taxNumber:thisdata.taxNumber,
+							amount:thisdata.amount,
+							banks:thisdata.banks,
+							content:thisdata.content,
+							unitAddress:thisdata.unitAddress,
+							invoiceRemarks:thisdata.invoiceRemarks,
+							unitMobile:thisdata.unitMobile,
+							post:thisdata.post,
+							addressee:thisdata.addressee,
+							addresseeMobile:thisdata.addresseeMobile,
+							addresseeProvince:thisdata.addresseeProvince,
+							addresseeCity:thisdata.addresseeCity,
+							addresseeArea:thisdata.addresseeArea,
+							recipientAddress:thisdata.recipientAddress,
+							orgCodeUrl: thisdata.voucherUrl ? splitUrl(thisdata.voucherUrl, ',', globalConfig.avatarHost + '/upload') : [],
+						})
+					}.bind(this)
+	    }).done(function(data) {
+			this.setState({
+				loading: false
+			});
+	    }.bind(this));
+	},
+	
+    getInitialState() {
+        return {
+            searchMore: true,
+            assignVisible:false,
+            releaseDate: [],
+            totalPage:0,
+            boHuivisible:false,
+            selectedRowKeys: [],
+            selectedRows: [],
+            loading: false,
+			reason: '',
+			foo:0,
+            pagination: {
+                defaultCurrent: 1,
+                defaultPageSize: 10,
+                showQuickJumper: true,
+                pageSize: 10,
+                onChange: function (page) {
+                    this.loadData(page);
+                }.bind(this),
+                showTotal: function (total) {
+                    return '共' + total + '条数据';
+                }
+            },
+            columns: [
+                {
+                    title: '编号',
+                    dataIndex: 'id',
+                    key: 'id',
+                }, {
+                    title: '客户',
+                    dataIndex: 'unitName',
+                    key: 'unitName',
+                }, {
+                    title: '跟单人/签单人',
+                    dataIndex: 'name',
+                    key: 'name',
+                },  {
+                    title: '项目状态',
+                    dataIndex: 'projectStatus',
+                    key: 'projectStatus',
+                },
+                {
+                    title: '申请开票(万)',
+                    dataIndex: 'amount',
+                    key: 'amount'
+                },
+                {
+                    title: '已开票(万)',
+                    dataIndex: 'sumAmount',
+                    key: 'sumAmount'
+                },
+				{
+				    title: '已收款',
+				    dataIndex: 'settlementAmount',
+				    key: 'settlementAmount'
+				},
+                {
+                    title: '未收款',
+                    dataIndex: 'notAmount',
+                    key: 'notAmount'
+                },
+                {
+                    title: '申请时间',
+                    dataIndex: 'createTime',
+                    key: 'createTime',
+                },
+                {
+                    title:'操作',
+                    dataIndex: 'caozuo',
+                    key: 'caouzo',
+                    render:(text,record,index)=>{
+                        return <div>
+							{<Button type="primary" onClick={(e) =>{ e.stopPropagation(),this.visit(record,index)}} style={{background:'deepskyblue',border:'none'}}>申请内容</Button>}
+							{record.status !== 2?<Button type="primary" style={{marginLeft:'10px'}} onClick={(e) =>{ e.stopPropagation(),this.setState({examine:2},()=>{this.sende(record)})}}>通过</Button>
+								:''}
+							{record.status !== 2?<Button type="danger" onClick={(e) =>{ e.stopPropagation(),this.setState({examine:3},()=>{this.reject(record)})}} style={{marginLeft:'10px'}}>拒绝</Button>
+								:''}
+							{record.status === 2?<Button style={{marginLeft:'10px',color:'black'}} disabled={true}>已通过</Button>
+								:''}
+							{<Button type="primary" style={{marginLeft:'10px',background:'orangered',border:'none'}} onClick={(e) =>{ e.stopPropagation(), this.inRecord(record,index)}}>开票记录</Button>}
+                        </div>
+                    }
+                }
+            ],
+			columnsDate:[
+				{
+				    title: '编号',
+				    dataIndex: 'id',
+				    key: 'id'
+				},{
+			        title: '订单编号',
+			        dataIndex: 'orderno',
+			        key: 'orderno'
+			    },{
+			        title: '开票金额(万元)',
+			        dataIndex: 'amount',
+			        key: 'amount'
+			    },{
+			        title: '申请时间',
+			        dataIndex: 'createTime',
+			        key: 'createTime'
+			    },{
+			        title: '开票状态',
+			        dataIndex: 'status',
+			        key: 'status',
+					render:(text)=>{
+						return getInvoiceStatus(text)
+					}
+			    }
+			],
+            dataSource: [],
+            searchTime: [,]
+        }
+    },
+	
+	loadSend(record){
+		this.setState({
+		    loading: true
+		});
+		if (this.state.examine === 3 && this.state.reason === '') {
+			message.warning('拒绝理由不能为空!')
+			return
+		}
+		$.ajax({
+		    method: "post",
+		    dataType: "json",
+		    crossDomain: false,
+		    url: globalConfig.context + '/api/admin/orderInvoice/approvalExamine',
+		    data: {
+				id:this.state.examine===2?record.id:this.state.id,
+				examine:this.state.examine,
+				reason:this.state.reason
+		    },
+			success: function (data) {
+				
+			}.bind(this),
+		}).done(function(data) {
+			this.setState({
+				loading: false
+			});
+			if(this.state.examine === 2){
+				message.success('通过成功!');
+				this.loadData()
+			}else{
+				message.success('拒绝成功!')
+				this.resetReason()
+				this.rejectCancels()
+				this.loadData()
+			}
+		}.bind(this));
+	},
+	
+	//重置拒绝理由
+	resetReason(){
+		this.setState({
+			reason:''
+		})
+	},
+	
+	sende(record){
+		this.loadSend(record)
+	},
+	
+	commit(){
+		this.loadSend()
+		this.setState({
+			avisible:false
+		})
+	},
+	
+	visit(record,index){
+		this.setState({
+			id:this.state.dataSource[index].id,
+			avisible:true,
+		},()=>{
+			this.invoiceData()
+		})
+	},
+	visitCancels(){
+		this.setState({
+			avisible:false
+		})
+	},
+	
+	reject(record){
+		this.setState({
+			visibleR:true,
+			id:record.id
+		});
+	},
+	rejectCancels(){
+		this.setState({
+			visibleR:false
+		})
+	},
+	inRecordData(){
+		this.setState({
+		    loading: true
+		});
+		$.ajax({
+		    method: "get",
+		    dataType: "json",
+		    crossDomain: false,
+		    url: globalConfig.context + '/api/admin/orderInvoice/salesmanOrderInvoiceList',
+		    data: {
+				orderNo:this.state.orderNo2
+		    },
+			success: function (data) {
+			    let theArr = [];
+			    if (!data.data) {
+			        if (data.error && data.error.length) {
+			            message.warning(data.error[0].message);
+			        };
+			    } else {
+			        for (let i = 0; i < data.data.list.length; i++) {
+			            let thisdata = data.data.list[i];
+			            theArr.push({
+			                 id: thisdata.id,
+			                 orderno: thisdata.orderno,//订单编号
+			                 amount:thisdata.amount,//签单金额
+			                 createTime:thisdata.createTime,//流程状态
+			                 status:thisdata.status,//结算状态
+			            });
+			        };
+			    };
+				this.setState({
+					recordData:theArr
+				})
+			}.bind(this),
+		}).done(function(data) {
+			this.setState({
+				loading: false
+			});
+		}.bind(this));
+	},
+	
+	inRecord(record,index){
+		this.setState({
+			bvisible:true,
+			orderNo2:record.orderno,
+		},() => {this.inRecordData()})
+	},
+	
+	inRecordCanl(){
+		this.setState({
+			bvisible:false
+		})
+	},
+	
+	search(){
+		this.loadData();
+	},
+	
+    componentWillMount() {
+		this.departmentList();
+        this.loadData();
+    },
+    reset() {
+        this.state.nameSearch = '';
+        this.state.releaseDate = [];
+        this.state.orderNoSearch='';
+		this.state.processStatus = [];
+		this.state.departmenttList = [];
+        this.loadData();
+    },
+    render() { 
+        const rowSelection = {
+            selectedRowKeys: this.state.selectedRowKeys,
+            onChange: (selectedRowKeys, selectedRows) => {
+                this.setState({
+                    selectedRows: selectedRows.slice(-1),
+                    selectedRowKeys: selectedRowKeys.slice(-1)
+                });
+            }
+        };
+		const formItemLayout = {
+			labelCol: { span: 8 },
+			wrapperCol: { span: 14 },
+		};
+        const hasSelected = this.state.selectedRowKeys.length > 0;
+        const { RangePicker } = DatePicker;
+		var departmentArr = this.state.departmentArr ||[];
+        return ( <div className="user-content">
+            <div className="content-title">
+                    <span>开票申请列表</span>
+                </div>
+                <div className="user-search">
+                    <Input placeholder="营销员名称"
+                        value={this.state.nameSearch}
+                        onChange={(e) => { this.setState({ nameSearch: e.target.value }); }} />
+                    <Input placeholder="订单编号"
+                        value={this.state.orderNoSearch}
+                        onChange={(e) => { this.setState({ orderNoSearch: e.target.value }); }} />
+					<Select placeholder="订单部门"
+					    style={{ width: 150 ,marginRight:10}}
+					    value={this.state.departmenttList}
+					    onChange={(e) => { this.setState({ departmenttList: e }) }}>
+					    {
+					        departmentArr.map(function (item) {
+					                return <Select.Option key={item.id} >{item.name}</Select.Option>
+					        })
+					    }
+					</Select>
+                    <Button type="primary" onClick={this.search} style={{ marginLeft:10}}>搜索</Button>
+                    <Button onClick={this.reset}>重置</Button>
+                </div>
+                <div className="patent-table">
+                    <Spin spinning={this.state.loading}>
+                        <Table columns={this.state.columns}
+                            dataSource={this.state.dataSource}
+                            pagination={this.state.pagination}/>
+                    </Spin>
+                </div>
+				<Modal visible={this.state.visibleR}
+						className="admin-desc-content"
+						footer=''
+						title = '拒绝理由'
+						width='400px'
+						onCancel={this.rejectCancels}>
+						<Input.TextArea placeholder="请输入拒绝理由"
+										rows={4}
+										value={this.state.reason} onChange={(e)=>{this.setState({ reason:e.target.value })}}>
+										
+						</Input.TextArea>
+					<div className="clearfix" style={{marginTop:'20px'}}>	
+						<Button type="primary" onClick={(e) =>{ e.stopPropagation(), this.commit()}} style={{float:'right'}}>提交</Button>
+					</div>
+				</Modal>
+				<Modal	
+				  className="admin-desc-content"
+				  footer=''
+				  title = '开具发票申请单'
+				  width='900px'
+				  visible={this.state.avisible}
+				  onOk={this.visitOks}
+				  onCancel={this.visitCancels}
+				>
+					<Form layout="horizontal" id="demand-form" style={{paddingBottom:'40px'}} >
+					    <Spin spinning={this.state.loading}>
+					        <div className="clearfix">
+								<div className="clearfix">
+									<FormItem className="half-item"
+									    {...formItemLayout}
+									    label="合同编号" >
+									    <span>{this.state.contractNo}</span>
+									</FormItem>
+									<FormItem className="half-item"
+									        {...formItemLayout}
+									        label="备注" >                             
+									        <span>{this.state.remarks}</span>
+									</FormItem>
+								</div>
+								<div className="clearfix">
+								<FormItem className="half-item"
+								    {...formItemLayout}
+								    label={
+								    	<span>
+								    		<strong style={{ color: '#f00' }}>*</strong>省内/外
+								    	</span> 
+								    }  >  
+								    <span>{getProvinceA(this.state.type)}</span>
+								</FormItem>
+								</div>
+								<hr style={{border:'1px dashed #aaa', width:"90%",margin:'auto'}}/>
+									<div style={{marginTop:'13px',marginLeft:'16px'}}>
+										<span style={{fontSize:'14px'}}>发票内容</span>
+									</div>
+								<div className="clearfix">
+									<FormItem className="half-item"
+									    {...formItemLayout}
+									    label={
+									    	<span>
+												<strong style={{ color: '#f00' }}>*</strong>发票类型
+											</span> 
+									    } >
+										<span>{this.state.invoiceType===0?'增值税专用发票':(this.state.invoiceType === 1?'增值税普通发票':'其他')}</span>
+									</FormItem>
+								</div>
+								<div className="clearfix">
+									<FormItem className="half-item"
+									        {...formItemLayout}
+									        label={
+									        	<span>
+									        		<strong style={{ color: '#f00' }}>*</strong>单位名称
+									        	</span> 
+									        } >  
+											<span>{this.state.unitName}</span>
+									</FormItem>
+									<FormItem className="half-item"
+									        {...formItemLayout}
+									        label={
+									        	<span>
+									        		<strong style={{ color: '#f00' }}>*</strong>税号
+									        	</span> 
+									        } >                             
+									        <span>{this.state.taxNumber}</span>
+									</FormItem>
+									<FormItem className="half-item"
+									        {...formItemLayout}
+									        label={
+									        	<span>
+									        		<strong style={{ color: '#f00' }}>*</strong>开票金额
+									        	</span> 
+									        } >                             
+									        <span>{this.state.amount}</span>
+									</FormItem>
+									<FormItem className="half-item"
+									        {...formItemLayout}
+									        label={
+									        	<span>
+									        		<strong style={{ color: '#f00' }}>*</strong>开户行银行账号
+									        	</span> 
+									        } >                             
+									        <span>{this.state.banks}</span>
+									</FormItem>
+									<FormItem className="half-item"
+									        {...formItemLayout}
+									        label={
+									        	<span>
+									        		<strong style={{ color: '#f00' }}>*</strong>开票内容及说明
+									        	</span> 
+									        } >                             
+									        <span>{this.state.content}</span>
+									</FormItem>
+									<FormItem className="half-item"
+									        {...formItemLayout}
+									        label={
+									        	<span>
+									        		<strong style={{ color: '#f00' }}>*</strong>单位地址
+									        	</span> 
+									        } >                             
+									        <span>{this.state.unitAddress}</span>
+									</FormItem>
+									<FormItem className="half-item"
+									        {...formItemLayout}
+									        label="备注" >                             
+									        <span>{this.state.invoiceRemarks}</span>
+									</FormItem>
+									<FormItem className="half-item"
+									        {...formItemLayout}
+									        label={
+									        	<span>
+									        		<strong style={{ color: '#f00' }}>*</strong>单位电话
+									        	</span> 
+									        } >                             
+									        <span>{this.state.unitMobile}</span>
+									</FormItem>
+								</div>
+								<div className="clearfix">
+									<FormItem
+									    labelCol={{ span: 4 }}
+									    wrapperCol={{ span: 18 }}
+									    label={
+									    	<span>
+												<strong style={{ color: '#f00' }}>*</strong>附件
+											</span> 
+									    }
+									    >
+										<Upload className="demandDetailShow-upload"
+										    listType="picture-card"
+										    fileList={this.state.orgCodeUrl}                               
+										    onPreview={(file) => {
+										        this.setState({
+										            previewImage: file.url || file.thumbUrl,
+										            previewVisible: true,
+										        });
+										    }} >
+										</Upload>
+										<Modal maskClosable={false} footer={null}
+										    visible={this.state.previewVisible}
+										    onCancel={() => { this.setState({ previewVisible: false }) }}>
+										    <img alt="" style={{ width: '100%' }} src={this.state.previewImage || ''} />
+										</Modal>
+									</FormItem>
+								</div>
+								<hr style={{border:'1px dashed #aaa', width:"90%",margin:'auto'}}/>
+								<div className="clearfix" style={{marginTop:'10px'}}>
+									<FormItem className="half-item"
+									    {...formItemLayout}
+									    label="发票是否邮寄:" >
+										<span>{this.state.post===0?'是':"否"}</span>
+									</FormItem>
+								</div>
+								<div className="clearfix">
+									<FormItem className="half-item"
+									        {...formItemLayout}
+									        label="收信人姓名" >                             
+									        <span>{this.state.addressee}</span>
+									</FormItem>
+									<FormItem className="half-item"
+									        {...formItemLayout}
+									        label="电话" >                             
+									        <span>{this.state.addresseeMobile}</span>
+									</FormItem>
+								</div>
+								<div className="clearfix">
+									<FormItem className="half-item"
+								        {...formItemLayout}
+								       label="省-市-区"
+								      > 
+									  <span>{getprovince(this.state.addresseeProvince)}/{getprovince(this.state.addresseeCity)}/{getprovince(this.state.addresseeArea)}</span>
+								    </FormItem>
+								</div>
+								<div className="clearfix">
+									<FormItem className="half-item"
+								        {...formItemLayout}
+								       label="详细地址"
+								      > 
+										<span>{this.state.recipientAddress}</span>
+								    </FormItem>
+								</div>
+							</div>
+						</Spin>
+					</Form>
+				</Modal>
+				<Modal visible={this.state.bvisible}
+						footer=''
+						title='开票历史记录'
+						className="admin-desc-content"
+						width='900px'
+						onCancel={this.inRecordCanl}>
+						<Spin spinning={this.state.loading}>
+							<div className="patent-table">
+								<Table columns={this.state.columnsDate}
+									dataSource={this.state.recordData}
+									pagination={false}/>
+								<div className="clearfix" style={{marginTop:'20px'}}>
+									<FormItem className="half-item"
+										{...formItemLayout}
+										label={
+											<span style={{fontSize:'14px'}}>
+												开票总计
+											</span> 
+										} >
+										<span></span>
+									</FormItem>
+								</div>
+							</div>
+						</Spin>
+				</Modal>
+        </div> )
+    }
+})
+ 
+export default outSpecial;

+ 6 - 0
js/component/manageCenter/financialManage/distribute/paiDan.jsx

@@ -119,6 +119,9 @@ const PaiDan = React.createClass({
                     title: '签单客户',
                     dataIndex: 'buyerName',
                     key: 'buyerName',
+					render:(text)=>{
+						return (text&&text.length>8?text.substr(0,8)+'...':text)
+					}
                 },
                 {
                     title: '流程状态',
@@ -130,6 +133,9 @@ const PaiDan = React.createClass({
 				    title: '订单部门',
 				    dataIndex: 'departmentName',
 				    key: 'departmentName',
+					render:(text)=>{
+						return (text&&text.length>8?text.substr(0,8)+'...':text)
+					}
 				},
                 {
                     title: '订单总金额(万)',

+ 1 - 1
js/component/manageCenter/index/content.jsx

@@ -352,7 +352,7 @@ const MessageModal = React.createClass({
         return (
             <div className="set-content">
                 <div className="set-title">
-                    <span>管理员中心</span>
+                    <span>信息中心</span>
                 </div>
                 <Spin spinning={this.state.loading} className='spin-box'>
                     <Tabs defaultActiveKey="1">

+ 1 - 1
js/component/manageCenter/leftTab.less

@@ -1,6 +1,6 @@
 .manage-content {
     .account-left {
-        width: 16%;
+        width: 12%;
         height: 100%;
         margin-top: 40px;
         padding-bottom: 50px;

+ 7 - 2
js/component/manageCenter/order/orderNew/addService.jsx

@@ -495,7 +495,8 @@ const NewService = Form.create()(React.createClass({
 					financeMobile:thisData.financeMobile,//财务电话
 					contractNo:thisData.contractNo,//合同编号
 					approval:thisData.approval==0?thisData.approval.toString():thisData.approval,
-					organizationSearch:thisData.orderDep
+					organizationSearch:thisData.orderDep,
+					depName:thisData.depName
                 });
             }.bind(this),
        }).always(function () {
@@ -1036,7 +1037,6 @@ const NewService = Form.create()(React.createClass({
 			});
     },
 	componentWillReceiveProps(nextProps) { //props改变时触发
-		console.log(nextProps)
 		this.state.visible = nextProps.showDesc;
 		this.state.signBillVisible=nextProps.signBillVisible;
 		if(this.state.signBillVisible){
@@ -1295,6 +1295,11 @@ const NewService = Form.create()(React.createClass({
 								                            label="合同签订时间" >   
 								                            <span>{this.state.signDate}</span>
 							                    		</FormItem>
+														<FormItem className="half-item"
+														    {...formItemLayout}
+														    label="订单部门" >  
+														    <span>{this.state.depName}</span>
+														</FormItem>
 							                    	</div>}
 							                    	<div className='clearfix'>
 							                    	{this.state.processStatus==0?

File diff suppressed because it is too large
+ 1153 - 6
js/component/manageCenter/order/orderNew/billing.jsx


+ 6 - 0
js/component/manageCenter/order/orderNew/inquiry.jsx

@@ -347,6 +347,7 @@ const IntentionCustomer = Form.create()(React.createClass({
 	                     salesmanMobile:thisdata.salesmanMobile,//营销员电话
 	                     financeName:thisdata.financeName,//财务名称
 	                     financeMobile:thisdata.financeMobile,//财务电话
+						 depName:thisdata.depName
 					})
 				};
 				
@@ -696,6 +697,11 @@ const IntentionCustomer = Form.create()(React.createClass({
 			                            label="已收款项(万元)" >  
 			                            <span>{this.state.settlementAmount}</span>
 		                    		</FormItem>
+									<FormItem className="half-item"
+									    {...formItemLayout}
+									    label="订单部门" >  
+									    <span>{this.state.depName}</span>
+									</FormItem>
 				                    <div className='clearfix'>
 							        	<FormItem
 								            labelCol={{ span: 4 }}

+ 4 - 1
js/component/manageCenter/order/orderNew/press.jsx

@@ -257,7 +257,10 @@ const IntentionCustomer = Form.create()(React.createClass({
                 },{
                     title: '订单部门',
                     dataIndex: 'depName',
-                    key: 'depName'
+                    key: 'depName',
+					render:(text)=>{
+						return (text&&text.length>8?text.substr(0,8)+'…':text)
+					}
                 },{
                     title: '催收科目',
                     dataIndex: 'dunSubject',

+ 10 - 1
js/component/manageCenter/project/task/myTask.jsx

@@ -110,6 +110,9 @@ const Task = React.createClass({
                     title: '任务名称',
                     dataIndex: 'taskName',
                     key: 'taskName',
+					render:(text)=>{
+						return (text&&text.length>8?text.substr(0,8)+'…':text)
+					}
                 },  {
                     title: '订单编号',
                     dataIndex: 'orderNo',
@@ -124,6 +127,9 @@ const Task = React.createClass({
                     title: '客户名称',
                     dataIndex: 'userName',
                     key: 'userName',
+					render:(text)=>{
+						return (text&&text.length>8?text.substr(0,8)+'…':text)
+					}
                 },
                 {
                     title: '任务状态',
@@ -140,7 +146,10 @@ const Task = React.createClass({
                 {
                     title: '分配时间',
                     dataIndex: 'taskDate',
-                    key: 'taskDate'
+                    key: 'taskDate',
+					render:(text)=>{
+						return (text&&text.length>8?text.substr(0,8)+'…':text)
+					}
                 },{
                     title: '订单部门',
                     dataIndex: 'depName',

+ 2 - 2
js/component/manageCenter/project/task/taskCount.jsx

@@ -5,7 +5,7 @@ import $ from 'jquery/src/ajax';
 import Jquery from 'jquery/dist/jquery.js';
 import moment from 'moment';
 import {boutique } from '@/dataDic.js';
-import { getLiquidationStatus,getApprovedState,getProcessStatus,splitUrl,getjiedian,getboutique,getNewOrderStatus,getProjectStatus} from '@/tools.js';
+import { getLiquidationStatus,getApprovedState,getProcessStatus,splitUrl,getjiedian,getboutique,getNewOrderStatus,getProjectStatus,getTaskStatus} from '@/tools.js';
 const TabPane = Tabs.TabPane;
 const Dragger = Upload.Dragger;
 //图片组件
@@ -191,7 +191,7 @@ const IntentionCustomer = Form.create()(React.createClass({
                     title: '任务状态',
                     dataIndex: 'taskStatus',
                     key: 'taskStatus',
-                    render:text=>{return getNewOrderStatus(text)}
+                    render:text=>{return getTaskStatus(text)}
                 }, {
                     title: '工时',
                     dataIndex: 'hours',

+ 1 - 2
js/component/manageCenter/publicComponent/assign.jsx

@@ -139,7 +139,7 @@ const Assign=React.createClass({
                 pageSize: 99,
                 departmentId:this.state.departmenttList,
                 name:this.state.financeNameSearch,
-                roleName:item.roleName?item.roleName:this.props.roleName
+                roleName:'财务专员'
             },
             success: function (data) {
                 let theArr = [];
@@ -150,7 +150,6 @@ const Assign=React.createClass({
                 } else {
                     for (let i = 0; i < data.data.list.length; i++) {
                         let thisdata = data.data.list[i];
-                        console.log(thisdata.roles[0]);
                         theArr.push({
                              key: i,
                              id: thisdata.id,

+ 2 - 2
js/component/manageCenter/topTab.less

@@ -43,7 +43,7 @@
         }
         .acc-index {
             height: 90px;
-            width: 16%;
+            width: 12%;
             position: absolute;
             top: 34px;
             left: 0;
@@ -75,7 +75,7 @@
             }
         }
         .acc-top-tab {
-            margin-left: 16%;
+            margin-left: 12%;
             height: 50px;
             line-height: 50px;
             font-size: 16px;

+ 42 - 1
js/component/tools.js

@@ -84,7 +84,10 @@ import {
     orderTypes,
     bonusState,
     jiedian,
-    cuikuan
+    cuikuan,
+	province,
+	invoiceStatus,
+	approvalA
 } from './dataDic.js';
 
 import { provinceList} from './NewDicProvinceList.js';
@@ -1665,4 +1668,42 @@ module.exports = {
             return theType;
         }
     },
+	//省内外
+	getProvinceA:function(e){
+	    if (e||e==0) {
+	        let str=e.toString()
+	     let theType = '';
+	     province.map(function (item) {
+	            if (item.value == str) {
+	                theType = item.key;
+	            };
+	        });
+	        return theType;
+	    }
+	},
+	//开票状态
+	getInvoiceStatus:function(e){
+	    if (e||e==0) {
+	        let str=e.toString()
+	     let theType = '';
+	     invoiceStatus.map(function (item) {
+	            if (item.value == str) {
+	                theType = item.key;
+	            };
+	        });
+	        return theType;
+	    }
+	},
+	getApprovalA:function(e){
+	    if (e||e==0) {
+	        let str=e.toString()
+	     let theType = '';
+	     approvalA.map(function (item) {
+	            if (item.value == str) {
+	                theType = item.key;
+	            };
+	        });
+	        return theType;
+	    }
+	},
 }

+ 1 - 1
package.json

@@ -1,6 +1,6 @@
 {
   "name": "afanti",
-  "version": "1.1.0",
+  "version": "1.1.02",
   "description": "",
   "main": "index.js",
   "scripts": {