hujie123456 5 vuotta sitten
vanhempi
commit
0b93167cf4

+ 126 - 62
js/component/manageCenter/financialManage/distribute/huiKuan.jsx

@@ -14,6 +14,8 @@ import {
   Upload,
   DatePicker,
   Icon,
+  Tabs,
+  Popconfirm
 } from "antd";
 import {
   getProjectStatus,
@@ -30,6 +32,7 @@ import "./huiKuan.less"
 const { RangePicker } = DatePicker;
 const FormItem = Form.Item;
 const { TextArea } = Input;
+const { TabPane } = Tabs;
 
 const HuiKuan = React.createClass({
   loadData(pageNo) {
@@ -398,6 +401,11 @@ const HuiKuan = React.createClass({
   componentWillMount() {
     // this.loadData();
     this.departmentList();
+
+    $("#rcDialogTitle0").on("click", function() {
+      alert(123);
+      console.log(123);
+    });
   },
   reset() {
     this.state.nameSearch = "";
@@ -448,7 +456,20 @@ const HuiKuan = React.createClass({
   handleCancel() {
     this.setState({ visible: false });
   },
-
+  callback(key) {
+  console.log(key);
+  },
+  delChecked() {
+    console.log("被删除列表",this.state.selectedRowKeys);
+    // this.loadData()
+  },
+  delAllChecked() {
+    console.log("删除全部");
+    // this.loadData()
+    // console.log("aaa", $(".ant-modal-content"));
+    
+    
+  },
   render() {
     const formItemLayout = {
       labelCol: { span: 8 },
@@ -467,80 +488,123 @@ const HuiKuan = React.createClass({
         <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 });
-            }}
-          />
-          <Input
-            placeholder="客户名称"
-            value={this.state.userName}
-            onChange={e => {
-              this.setState({ userName: 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>
 
-        <ChooseList
-          columns={this.state.columns}
-          changeFn={this.changeList}
-          changeList={this.state.changeList}
-          top={55}
-          display={"inline-block"}
-        />
-        <Button
-          type="primary"
-          style={{ marginLeft: 15 }}
-          disabled={this.state.selectedRowKeys.length == 1 ? false : true}
-          onClick={this.showModal}
-        >
-          修改单条数据
-        </Button>
+        <Tabs defaultActiveKey="1" onChange={this.callback}>
+          <TabPane tab="搜索" key="1">
+            <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 });
+                }}
+              />
+              <Input
+                placeholder="客户名称"
+                value={this.state.userName}
+                onChange={e => {
+                  this.setState({ userName: 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>
+          </TabPane>
+          <TabPane tab="更改表格显示数据" key="2">
+            <ChooseList
+              columns={this.state.columns}
+              changeFn={this.changeList}
+              changeList={this.state.changeList}
+              top={55}
+              display={"inline-block"}
+              style={{ marginBottom: 17 }}
+            />
+          </TabPane>
+          <TabPane tab="操作" key="3">
+            <Button
+              type="primary"
+              style={{ marginBottom: 20, marginLeft: 15 }}
+              disabled={this.state.selectedRowKeys.length == 1 ? false : true}
+              onClick={this.showModal}
+            >
+              修改单条数据
+            </Button>
+
+            <Popconfirm
+              placement="top"
+              title={"是否确定删除!"}
+              onConfirm={this.delChecked}
+              okText="确定"
+              cancelText="取消"
+            >
+              <Button
+                primary
+                type="danger"
+                style={{ marginBottom: 20, marginLeft: 15 }}
+                disabled={this.state.selectedRowKeys.length > 0 ? false : true}
+              >
+                删除选中项
+              </Button>
+            </Popconfirm>
+
+            <Popconfirm
+              placement="top"
+              title={"是否确定删除!"}
+              onConfirm={this.delAllChecked}
+              okText="确定"
+              cancelText="取消"
+            >
+              <Button
+                type="danger"
+                style={{ marginBottom: 20, marginLeft: 15 }}
+              >
+                删除全部
+              </Button>
+            </Popconfirm>
+          </TabPane>
+        </Tabs>
 
-        <div className="patent-table">
+        <div className="patent-table" style={{ position: "relative" }}>
           <div
             class={123}
             style={{
               position: "absolute",
               zIndex: 99,
-              top: 195,
+              top: 64,
               left: "50%",
               transform: "translateX(-50%)",
               display: this.state.dataSource.length != 0 ? "none" : "block"
             }}
           >
             <Upload {...this.state.upLoad}>
-              <Button type="primary" disabled={ this.state.upLoadFlag }>
+              <Button type="primary" disabled={this.state.upLoadFlag}>
                 <Icon type="upload" />
                 导入回款列表
               </Button>

+ 3 - 0
js/component/manageCenter/financialManage/distribute/huiKuan.less

@@ -3,4 +3,7 @@
 }
 .ant-upload-list {
     display: block !important;
+}
+.ant-table-placeholder {
+    visibility: hidden !important;
 }