hujie123456 5 роки тому
батько
коміт
2e992b38bf

+ 67 - 73
js/component/manageCenter/customer/NEW/signCustomer/intentionDetail/detail/business.jsx

@@ -68,75 +68,65 @@ const Business = React.createClass({
 				key: 'ooo',
 				render: (text, record) => { 
 					const dataSources = this.state.customerArr || [];
-					console.log(this.state.customerArr);
 					const options = dataSources.map(group => (
 						<Select.Option key={group.id} value={group.name}>
 						{group.name}
 						</Select.Option>
 					));
 					return (
-						<div className="control">
-						<Button
-							onClick={e => {
-							this.businessIntentionDetails(record);
-							}}
-						>
-							查看
-						</Button>
-						<AutoComplete
-							className="certain-category-search"
-							dropdownClassName="certain-category-search-dropdown"
-							dropdownMatchSelectWidth={false}
-							dropdownStyle={{ width: 120 }}
-							style={{
-							width: "120px",
-							marginLeft: 10,
-							visibility:
-								this.state.selectedRowKeys[0] == record.businessProjectId &&
-								record.followSituation == 5
-								? "visible"
-								: "hidden"
-							}}
-							dataSource={options}
-							placeholder="输入转交人姓名"
-							onChange={this.httpChange}
-							filterOption={true}
-							onBlur={this.blurChange}
-							onSelect={this.selectAuto}
-						>
-							<Input />
-						</AutoComplete>
-						<Button
-							style={{ marginLeft: 10 }}
-							onClick={e => {
-							this.changeBusiness(record);
-							}}
-							style={{
-							marginLeft: 10,
-							visibility:
-								this.state.selectedRowKeys[0] == record.businessProjectId &&
-								record.followSituation == 5
-								? "visible"
-								: "hidden"
-							}}
-						>
-							转交业务
-						</Button>
-						</div>
+            <div className="control">
+              <Button
+                onClick={e => {
+                  this.businessIntentionDetails(record);
+                }}
+              >
+                查看
+              </Button>
+              <AutoComplete
+                className="certain-category-search"
+                dropdownClassName="certain-category-search-dropdown"
+                dropdownMatchSelectWidth={false}
+                dropdownStyle={{ width: 120 }}
+                style={{
+                  width: "120px",
+                  marginLeft: 10,
+                  transition: "all .5s",
+                  display:
+                    record.followSituation == 5
+                      ? "inline-block"
+                      : "none"
+                }}
+                dataSource={options}
+                placeholder="输入转交人姓名"
+                onChange={this.httpChange}
+                filterOption={true}
+                onBlur={this.blurChange}
+                onSelect={this.selectAuto}
+              >
+                <Input />
+              </AutoComplete>
+              <Button
+                style={{ marginLeft: 10 }}
+                onClick={e => {
+                  this.changeBusiness(record);
+                }}
+                type={"primary"}
+                style={{
+                  marginLeft: 10,
+                  transition: "all .5s",
+                  display:
+                    record.followSituation == 5
+                      ? "inline-block"
+                      : "none"
+                }}
+              >
+                转交业务
+              </Button>
+            </div>
           ); }
 			}],
 		}
 	},
-	componentDidMount() {
-		// console.log(document.querySelectorAll(".control"));
-		window.setTimeout(() => {
-			let dom = document.querySelectorAll(".control")
-			for(let i = 0; i < dom.length; i++) {
-				document.querySelectorAll(".control")[i].parentNode.style.width = "300px"
-			}
-		},100)
-		
-	},
 	//指定转交人自动补全
 	supervisor(e){ 
 		$.ajax({
@@ -160,7 +150,6 @@ const Business = React.createClass({
                     });
 				}.bind(this),
 			}).always(function () {
-				console.log(this.state.customerArr);
             this.setState({
                 loading: false
             });
@@ -171,7 +160,6 @@ const Business = React.createClass({
 		this.setState({
 			auto:value
 		})
-		console.log(this.state.auto);
 		
 	},
 	blurChange(e){
@@ -187,7 +175,6 @@ const Business = React.createClass({
 		this.setState({
 			theTypes:theType
 		})
-		console.log(this.state.theTypes);
 		
 	},
 	//值改变时请求客户名称
@@ -230,7 +217,7 @@ const Business = React.createClass({
 					for(let i = 0; i < data.data.list.length; i++) {
 						let thisdata = data.data.list[i];
 						theArr.push({
-							key: thisdata.businessProjectId,
+							key: i,
 							businessId: thisdata.businessId,
 							businessProjectId:thisdata.businessProjectId,
 							businessName: thisdata.businessName,
@@ -252,15 +239,26 @@ const Business = React.createClass({
 					dataBusiness: theArr,
 					paginationt: this.state.paginationt||[]
 				});
+				console.log(this.state.dataBusiness);
+				
 			}.bind(this),
 		}).always(function() {
 			this.setState({
 				loading: false
 			});
+			window.setTimeout(() => {
+			let dom = document.querySelectorAll(".control");
+			for (let i = 0; i < dom.length; i++) {
+			document.querySelectorAll(".control")[i].parentNode.style.width =
+				"300px";
+			}
+		}, 100);
 		}.bind(this));
 	},
 	componentWillMount(){
 		this.BusinessList();
+		console.log(this.state.dataBusiness);
+		
 	},
 	detailsModal(){
 		this.props.closeDetail(false, false)
@@ -274,7 +272,6 @@ const Business = React.createClass({
 		})
 	},
 	changeBusiness(e) {
-		console.log(e);
 		this.setState({
 			loading: true
 		});
@@ -295,6 +292,8 @@ const Business = React.createClass({
 					};
 				} else {
 						message.success("转交成功!")
+						this.props.closeDesc(false,true)
+						this.props.closeDetail()
 						this.BusinessList()
 						this.setState({
 							selectedRowKeys: []
@@ -308,18 +307,14 @@ const Business = React.createClass({
 		}.bind(this));
 	},
 	onSelectChange(selectedRowKeys) {
-		console.log(selectedRowKeys);
 		this.setState({
-			selectedRowKeys
+			selectedRowKeys,
+			businessModul: false
 		})
 	},
 	render(){
-		const { selectedRowKeys } = this.state;
-		const rowSelection = {
-			selectedRowKeys,
-			onChange: this.onSelectChange,
-			type: "radio"
-		};
+		console.log("数组",this.state.dataBusiness);
+		
 		return (
 			<div className="clearfix">
 				<Spin spinning={this.state.loading}>
@@ -327,7 +322,6 @@ const Business = React.createClass({
 					pagination={this.state.paginationt}
 					columns={this.state.businessIntentionList}
 					dataSource={this.state.dataBusiness}
-					rowSelection={rowSelection}
 				/>
 				</Spin>
 				<BusinessDetail

+ 2 - 1
js/component/manageCenter/customer/NEW/signCustomer/intentionDetail/intentionDetail.jsx

@@ -157,7 +157,8 @@ const IntentionDetail = React.createClass({
 							     />
 							</TabPane>						
 							<TabPane tab="业务意向" key="5">
-							    <Business 
+								<Business
+									closeDesc={this.props.closeDesc} 
 							    	closeDetail={this.closeDetail}
 								    data={this.props.IntentionData}
 								    businessState={this.state.businessState}

+ 18 - 1
js/component/manageCenter/financialManage/distribute/approvedOutsourcing.jsx

@@ -92,6 +92,8 @@ const approvedOutsourcing = React.createClass({
         orderNo: this.state.orderNoSearch,
         startTime: this.state.releaseDate[0],
         endTime: this.state.releaseDate[1],
+        startFinalReceivablesTime: this.state.shouKuanDate[0],
+        endFinalReceivablesTime: this.state.shouKuanDate[1],
         departmentId: this.state.departmenttList,
         processStatus: this.state.processStatusSearch,
         contractNo: this.state.contractNoSearch,
@@ -165,6 +167,7 @@ const approvedOutsourcing = React.createClass({
       assignVisibleX: false,
       assignVisibleY: false,
       releaseDate: [],
+      shouKuanDate: [],
       assignDataX: [],
       assignDataY: [],
       attachmentUrl: [],
@@ -359,7 +362,6 @@ const approvedOutsourcing = React.createClass({
                   //   onClick={e => {
                   //     e.stopPropagation(), this.evaluateY(recard, "财务专员");
                   //     console.log(recard);
-                      
                   //   }}
                   // >
                   //   转交
@@ -1143,6 +1145,7 @@ const approvedOutsourcing = React.createClass({
   reset() {
     this.state.nameSearch = "";
     this.state.releaseDate = [];
+    this.state.shouKuanDate = [];
     this.state.orderNoSearch = "";
     this.state.departmenttList = undefined;
     this.state.processStatus = [];
@@ -1468,6 +1471,20 @@ const approvedOutsourcing = React.createClass({
                   this.setState({ releaseDate: dataString });
                 }}
               />
+              <span style={{}}>最近收款:</span>
+              <RangePicker
+                value={[
+                  this.state.shouKuanDate[0]
+                    ? moment(this.state.shouKuanDate[0])
+                    : null,
+                  this.state.shouKuanDate[1]
+                    ? moment(this.state.shouKuanDate[1])
+                    : null
+                ]}
+                onChange={(data, dataString) => {
+                  this.setState({ shouKuanDate: dataString });
+                }}
+              />
               <Button
                 type="primary"
                 onClick={this.search}

+ 56 - 10
js/component/manageCenter/financialManage/distribute/huiKuan.jsx

@@ -37,7 +37,7 @@ const { TextArea } = Input;
 const { TabPane } = Tabs;
 
 const HuiKuan = React.createClass({
-  loadData(pageNo) {
+  loadData(pageNo,pageSize) {
     this.state.data = [];
     this.setState({
       loading: true
@@ -49,7 +49,7 @@ const HuiKuan = React.createClass({
       url: globalConfig.context + "/api/admin/receivables/listReceivables",
       data: {
         pageNo: pageNo || 1,
-        pageSize: this.state.pagination.pageSize,
+        pageSize: pageSize || this.state.pagination.pageSize,
         // 订单状态 判断是否重复
         status: this.state.statusSearch,
         // 订单编号
@@ -199,6 +199,12 @@ const HuiKuan = React.createClass({
           return "共" + total + "条数据";
         }
       },
+      paginationModal: {
+        pageSize: 100,
+        showTotal: function(total) {
+          return "共" + total + "条数据";
+        }
+      },
       columns: [
         {
           title: "合同编号",
@@ -523,6 +529,7 @@ const HuiKuan = React.createClass({
   },
 
   handleCancel() {
+    this.loadData()
     this.setState({ visible: false });
   },
   callback(key) {
@@ -599,14 +606,20 @@ const HuiKuan = React.createClass({
           message.warning(data.error[0].message);
         }else {
           message.success("合并成功!请在收款列表中,查看已收款情况。");
+          this.setState({
+            mergeModal: false
+          });
         }
       }.bind(this)
     }).always(
       function() {
         this.loadData();
+        this.state.pagination.pageSize = 10
         this.state.selectedRowKeys = []
         this.setState({
-          selectedRowKeys: this.state.selectedRowKeys
+          selectedRowKeys: this.state.selectedRowKeys,
+          pagination: this.state.pagination,
+          mergeModal: false
         })
         // window.location.reload();
       }.bind(this)
@@ -855,8 +868,9 @@ const HuiKuan = React.createClass({
               style={{ marginBottom: 20, marginLeft: 15 }}
               disabled={this.state.dataSource.length == 0}
               onClick={e => {
+                this.loadData(1, 100);
                 this.setState({
-                  mergeModal: true
+                  mergeModal: true,
                 });
               }}
             >
@@ -1086,16 +1100,48 @@ const HuiKuan = React.createClass({
         <Modal
           title="确认合并列表"
           visible={this.state.mergeModal}
-          onOk={this.handleOk}
+          width={1300}
+          onOk={this.mergeAll}
           onCancel={() => {
             this.setState({
-              mergeModal: false
-            })
+              mergeModal: false,
+            });
           }}
         >
-          <p>Some contents...</p>
-          <p>Some contents...</p>
-          <p>Some contents...</p>
+          <div className="patent-table" style={{ position: "relative" }}>
+            <Spin spinning={this.state.loading}>
+              <Table
+                columns={this.state.columns}
+                scroll={{ x: "max-content" }}
+                dataSource={this.state.dataSource}
+                bordered
+                size="small"
+                pagination={this.state.paginationModal}
+              />
+            </Spin>
+            <p
+              style={{
+                display: "inline-block",
+                fontSize: "14px",
+                color: "red"
+              }}
+            >
+              {
+                <span style={{ marginRight: 10 }}>
+                  {`回款金额总计(万元):${
+                    this.state.hui ? this.state.hui : "0"
+                  }`}
+                </span>
+              }
+              {
+                <span>
+                  {`合同额总计(万元):${
+                    this.state.totalHui ? this.state.totalHui : "0"
+                  }`}
+                </span>
+              }
+            </p>
+          </div>
         </Modal>
       </div>
     );

+ 2 - 2
js/component/manageCenter/set/organization/organization.jsx

@@ -834,7 +834,7 @@ const Organization=Form.create()(React.createClass({
 											      >
 											        <Input />
 											</AutoComplete> 
-											<span className="mandatory" style={{color:'red',marginLeft:'5px'}}>*</span>
+											{/* <span className="mandatory" style={{color:'red',marginLeft:'5px'}}>*</span> */}
 							            </FormItem>
 				                    </div>
 				                    <div className="clearfix">
@@ -914,7 +914,7 @@ const Organization=Form.create()(React.createClass({
 											      >
 											        <Input />
 											</AutoComplete> 
-											<span className="mandatory" style={{color:'red',marginLeft:'5px'}}>*</span>
+											{/* <span className="mandatory" style={{color:'red',marginLeft:'5px'}}>*</span> */}
 							            </FormItem>
 				                    </div>
 		                   		    <div className="clearfix">