Browse Source

Merge branch 'master' of http://git.jishutao.com/jishutao/kede-client

liting2017 6 years ago
parent
commit
fb8a609719

+ 113 - 56
js/component/manageCenter/order/orderNew/addService.jsx

@@ -271,12 +271,14 @@ const NewService = Form.create()(React.createClass({
 					dataIndex: 'dels',
 					key: 'dels',
 					render: (text, record, index) => {
+						console.log(index);
+						console.log(this.state.contactList.length);
 						return <div>
-		                        {this.state.processStatus==0?<Popconfirm title="是否删除?" onConfirm={(e)=>{this.confirmDelet(record.key)}} okText="删除" cancelText="不删除">
+		                        {this.state.processStatus==0?<Popconfirm title="是否删除?" onConfirm={(e)=>{this.confirmDelet(record)}} okText="删除" cancelText="不删除">
 									    <Button style={{marginRight:'10px',color:'#ffffff',background:'#f00',border:'none'}}>删除</Button>
 									</Popconfirm>
 									:''}
-								{record.id?'': <Button  type="primary"  onClick={this.contactSave}>保存</Button>}
+								{!record.id&&(index==(this.state.contactList.length-1))?<Button  type="primary"  onClick={this.contactSave}>保存</Button>:''}
 								
                             </div>
 					}
@@ -508,6 +510,21 @@ const NewService = Form.create()(React.createClass({
     },
     //催款节点保存
 	contactSave(e) {
+		if(this.state.contactList){
+			let cuiData=this.state.contactList;
+				for(var a=0;a<cuiData.length;a++){
+					if(cuiData[a].money==''){
+						message.warning('催款金额不能为空');
+			        	this.refs.signFirstPayment.focus()
+			        	return false;
+					}else if(!cuiData[a].dunSubject){
+						message.warning('催款科目不能为空');
+			        	this.refs.signFirstPayment.focus()
+			        	return false;
+					}
+				}
+	        	
+	        };
 		this.setState({
 			loading: true
 		});
@@ -542,16 +559,23 @@ const NewService = Form.create()(React.createClass({
 		this.setState({
 			contactList: this.state.contactList
 		})
-		console.log(this.state.contactList);
 	},	
 	
 	//删除收款节点
 	confirmDelet(index) {
-		this.state.contactList.splice(index,1);
-		this.setState({
-			contactList: this.state.contactList
-		})
-		this.contactSave();
+		if(index.id){
+			this.state.contactList.splice(index.key,1);
+			this.setState({
+				contactList: this.state.contactList
+			})
+			this.contactSave();
+		}else{
+			this.state.contactList.splice(index.key,1);
+			this.setState({
+				contactList: this.state.contactList
+			})
+		}
+		
 	},
 	handleOk(e) {
 		this.setState({
@@ -772,7 +796,6 @@ const NewService = Form.create()(React.createClass({
 	},
 	//点击打卡项目详情
 	tableRowClick(record, index) {
-		console.log(record);
         this.setState({
         	jid:record.id,//项目ID
         	kid:record.commodityId,//商品ID
@@ -1386,55 +1409,89 @@ const NewService = Form.create()(React.createClass({
 					                        <Button className="submitSave" type="ghost" onClick={this.nextCancel}>取消</Button>
 					                    </FormItem> 
 				                    </div>:
-				                    <div className='clearfix'>
-				                    	<FormItem className="half-item"
-					                            {...formItemLayout}
-					                            label="项目名称" >
-				                    			<span>{this.state.commodityName}</span>
-				                    	</FormItem>
-				                    	<FormItem className="half-item"
-					                            {...formItemLayout}
-					                            label="项目数量" >
-				                    			<Input placeholder="请输入数量" value={this.state.commodityQuantity} style={{width:'200px'}}
-				                                    onChange={(e)=>{this.setState({commodityQuantity:e.target.value})}} />
-				                                <span className="mandatory">*</span>  
-				                    	</FormItem>
-				                    	<FormItem className="half-item"
-					                            {...formItemLayout}
-					                            label="金额(万元)" >
-				                    			<Input placeholder="请输入签单金额" value={this.state.commodityPrice} style={{width:'200px'}}
-				                                    onChange={(e)=>{this.setState({commodityPrice:e.target.value})}} />
-				                                <span className="mandatory">*</span>      
-				                    	</FormItem>
-					                    <FormItem className="half-item"
-				                            {...formItemLayout}
-				                            label="主要项目" >  
-				                            <Select placeholder="选择是否为主要业务"
-					                            style={{ width:'200px'}}
-					                            value={this.state.main}
-					                            onChange={(e)=>{this.setState({main:e})}}>
-					                            {
-				                                    boutique.map(function (item) {
-				                                        return <Select.Option key={item.value} >{item.key}</Select.Option>
-				                                    })
-				                                }
-					                     	</Select>
-					                     	<span className="mandatory">*</span>   
-			                    		</FormItem>
+				                    <div className="clearfix">
+				                    {this.state.processStatus==0?
 					                    <div className='clearfix'>
-					                    	<FormItem 
-						                            labelCol={{ span: 4 }}
-										            wrapperCol={{ span: 16 }}
-						                            label="服务说明" >
-					                    			 <Input type='textarea' placeholder="请输入服务说明" value={this.state.taskComment} 
-					                                    onChange={(e)=>{this.setState({taskComment:e.target.value})}} />
+					                    	<FormItem className="half-item"
+						                            {...formItemLayout}
+						                            label="项目名称" >
+					                    			<span>{this.state.commodityName}</span>
 					                    	</FormItem>
-				                    	</div>
-				                    	<FormItem wrapperCol={{ span: 12, offset: 4 }} className="half-middle">
-					                        <Button className="submitSave" type="primary" onClick={this.tabRowSave}>保存</Button>  
-					                        <Button className="submitSave" type="ghost" onClick={this.nextCancel}>取消</Button>
-					                    </FormItem>
-				                    </div>}
+					                    	<FormItem className="half-item"
+						                            {...formItemLayout}
+						                            label="项目数量" >
+					                    			<Input placeholder="请输入数量" value={this.state.commodityQuantity} style={{width:'200px'}}
+					                                    onChange={(e)=>{this.setState({commodityQuantity:e.target.value})}} />
+					                                <span className="mandatory">*</span>  
+					                    	</FormItem>
+					                    	<FormItem className="half-item"
+						                            {...formItemLayout}
+						                            label="金额(万元)" >
+					                    			<Input placeholder="请输入签单金额" value={this.state.commodityPrice} style={{width:'200px'}}
+					                                    onChange={(e)=>{this.setState({commodityPrice:e.target.value})}} />
+					                                <span className="mandatory">*</span>      
+					                    	</FormItem>
+						                    <FormItem className="half-item"
+					                            {...formItemLayout}
+					                            label="主要项目" >  
+					                            <Select placeholder="选择是否为主要业务"
+						                            style={{ width:'200px'}}
+						                            value={this.state.main}
+						                            onChange={(e)=>{this.setState({main:e})}}>
+						                            {
+					                                    boutique.map(function (item) {
+					                                        return <Select.Option key={item.value} >{item.key}</Select.Option>
+					                                    })
+					                                }
+						                     	</Select>
+						                     	<span className="mandatory">*</span>   
+				                    		</FormItem>
+						                    <div className='clearfix'>
+						                    	<FormItem 
+							                            labelCol={{ span: 4 }}
+											            wrapperCol={{ span: 16 }}
+							                            label="服务说明" >
+						                    			 <Input type='textarea' placeholder="请输入服务说明" value={this.state.taskComment} 
+						                                    onChange={(e)=>{this.setState({taskComment:e.target.value})}} />
+						                    	</FormItem>
+					                    	</div>
+					                    	<FormItem wrapperCol={{ span: 12, offset: 4 }} className="half-middle">
+						                        <Button className="submitSave" type="primary" onClick={this.tabRowSave}>保存</Button>  
+						                        <Button className="submitSave" type="ghost" onClick={this.nextCancel}>取消</Button>
+						                    </FormItem>
+					                    </div>:<div className='clearfix'>
+							                    	<FormItem className="half-item"
+								                            {...formItemLayout}
+								                            label="项目名称" >
+							                    			<span>{this.state.commodityName}</span>
+							                    	</FormItem>
+							                    	<FormItem className="half-item"
+								                            {...formItemLayout}
+								                            label="项目数量" >
+							                    			<span>{this.state.commodityQuantity}</span>
+							                    	</FormItem>
+							                    	<FormItem className="half-item"
+								                            {...formItemLayout}
+								                            label="金额(万元)" >
+							                    			<span>{this.state.commodityPrice}</span>
+							                    	</FormItem>
+								                    <FormItem className="half-item"
+							                            {...formItemLayout}
+							                            label="主要项目" >  
+							                            <span>{getboutique(this.state.main)}</span>
+						                    		</FormItem>
+								                    <div className='clearfix'>
+								                    	<FormItem 
+								                            labelCol={{ span: 4 }}
+												            wrapperCol={{ span: 16 }}
+								                            label="服务说明" >
+							                    			<span>{this.state.taskComment}</span>
+								                    	</FormItem>
+							                    	</div>
+							                    </div>	
+					                    }
+				                    </div>
+				                    }
 			                </Spin>
 			            </Form >
 			        </Modal>

+ 0 - 1
js/component/manageCenter/order/orderNew/examine.jsx

@@ -286,7 +286,6 @@ const IntentionCustomer = Form.create()(React.createClass({
 	},	
 	//点击打卡项目详情
 	tableRowClickX(record, index) {
-		console.log(record);
         this.setState({
         	jid:record.id,//项目ID
         	kid:record.commodityId,//商品ID

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

@@ -285,7 +285,6 @@ const IntentionCustomer = Form.create()(React.createClass({
 	},	
 	//点击打卡项目详情
 	tableRowClickX(record, index) {
-		console.log(record);
         this.setState({
         	jid:record.id,//项目ID
         	kid:record.commodityId,//商品ID

+ 2 - 2
js/component/manageCenter/project/project/projectAssignment.jsx

@@ -604,12 +604,12 @@ const PaiDan = React.createClass({
 				                    <FormItem className="half-item"
 			                            {...formItemLayout}
 			                            label="签单金额(万元)" >                             
-		                                 <span>{this.state.firstAmount}</span>
+		                                 <span>{this.state.totalAmount}</span>
 				                    </FormItem>
 				                    <FormItem className="half-item"
 			                            {...formItemLayout}
 			                            label="首付金额(万元)" >                             
-		                                <span>{this.state.totalAmount}</span>
+		                                <span>{this.state.firstAmount}</span>
 				                    </FormItem>
 		                    		<FormItem className="half-item"
 			                            {...formItemLayout}

+ 2 - 2
js/component/manageCenter/project/project/projectQuery.jsx

@@ -550,12 +550,12 @@ const PaiDan = React.createClass({
 				                    <FormItem className="half-item"
 			                            {...formItemLayout}
 			                            label="签单金额(万元)" >                             
-		                                 <span>{this.state.firstAmount}</span>
+		                                 <span>{this.state.totalAmount}</span>
 				                    </FormItem>
 				                    <FormItem className="half-item"
 			                            {...formItemLayout}
 			                            label="首付金额(万元)" >                             
-		                                <span>{this.state.totalAmount}</span>
+		                                <span>{this.state.firstAmount}</span>
 				                    </FormItem>
 		                    		<FormItem className="half-item"
 			                            {...formItemLayout}

+ 2 - 8
js/component/manageCenter/project/task/taskAssignment.jsx

@@ -120,12 +120,6 @@ const Task = React.createClass({
                     key: 'userName',
                 },
                 {
-                    title: '任务状态',
-                    dataIndex: 'taskStatus',
-                    key: 'taskStatus',
-                    render: text => { return getTaskStatus(text)}
-                },
-                {
                     title: '项目状态',
                     dataIndex: 'projectStatus',
                     key: 'projectStatus',
@@ -484,12 +478,12 @@ const Task = React.createClass({
 				                    <FormItem className="half-item"
 			                            {...formItemLayout}
 			                            label="签单金额(万元)" >                             
-		                                 <span>{this.state.firstAmount}</span>
+		                                 <span>{this.state.totalAmount}</span>
 				                    </FormItem>
 				                    <FormItem className="half-item"
 			                            {...formItemLayout}
 			                            label="首付金额(万元)" >                             
-		                                <span>{this.state.totalAmount}</span>
+		                                <span>{this.state.firstAmount}</span>
 				                    </FormItem>
 		                    		<FormItem className="half-item"
 			                            {...formItemLayout}

+ 4 - 4
js/component/manageCenter/project/task/taskQuery.jsx

@@ -6,7 +6,7 @@ import '@/manageCenter/financialManage/distribute/public.less';
 import { Icon, Button,Form, Input, Select, Upload,Col,Spin, Table, Switch, message, DatePicker, Modal } from 'antd';
 import OrderDesc from '@/manageCenter/financialManage/orderDetail/orderDesc'
 import Assign from '@/manageCenter/publicComponent/assign';
-import {getProcessStatus,getApproval,getTaskStatus,getLiquidationStatus,getApprovedState,getProjectState,splitUrl} from '@/tools';
+import {getProcessStatus,getApproval,getTaskStatus,getLiquidationStatus,getApprovedState,getProjectState,splitUrl,getProjectStatus} from '@/tools';
 const FormItem =Form.Item;
 
 const Task = React.createClass({
@@ -129,7 +129,7 @@ const Task = React.createClass({
                     title: '项目状态',
                     dataIndex: 'projectStatus',
                     key: 'projectStatus',
-                    render: text => { return getProjectState(text)}
+                    render: text => { return getProjectStatus(text)}
                 },
                 {
                     title: '分配时间',
@@ -473,12 +473,12 @@ const Task = React.createClass({
 				                    <FormItem className="half-item"
 			                            {...formItemLayout}
 			                            label="签单金额(万元)" >                             
-		                                 <span>{this.state.firstAmount}</span>
+		                                 <span>{this.state.totalAmount}</span>
 				                    </FormItem>
 				                    <FormItem className="half-item"
 			                            {...formItemLayout}
 			                            label="首付金额(万元)" >                             
-		                                <span>{this.state.totalAmount}</span>
+		                                <span>{this.state.firstAmount}</span>
 				                    </FormItem>
 		                    		<FormItem className="half-item"
 			                            {...formItemLayout}

+ 2 - 2
webpack.config.js

@@ -304,7 +304,7 @@ module.exports = (function () {
     }
 
     //let staticHost = 'http://afts.hnzhiming.com';
-    let staticHost = 'http://192.168.0.188';
+    let staticHost = 'http://192.168.0.190';
     switch (argv.env.deploy) {
         case 'test':
             staticHost = 'http://static.kedexinxi.com';
@@ -343,7 +343,7 @@ module.exports = (function () {
         // }
         devServer: {
             disableHostCheck: true,
-            host: '192.168.0.188',
+            host: '192.168.0.190',
             port: 80,
             allowedHosts: ['127.0.0.1','192.168.0.20','192.168.0.99'],
             headers: {