hujie123456 5 years ago
parent
commit
316a728767

+ 47 - 3
js/component/manageCenter/financialManage/distribute/approvedOutsourcing.jsx

@@ -125,7 +125,10 @@ const approvedOutsourcing = React.createClass({
               contractNo: thisdata.contractNo,
               createTime: thisdata.createTime,
               departmentName: thisdata.departmentName,
-              outsourceName: thisdata.outsourceName
+              outsourceName: thisdata.outsourceName,
+              invoiceAmount: thisdata.invoiceAmount,
+              finalReceivables: thisdata.finalReceivables,
+              finalReceivablesTime: thisdata.finalReceivablesTime
             });
           }
         }
@@ -214,6 +217,21 @@ const approvedOutsourcing = React.createClass({
           key: "actuallyTotalAmount"
         },
         {
+          title: "开票金额(万元)",
+          dataIndex: "invoiceAmount",
+          key: "invoiceAmount"
+        },
+        {
+          title: "最近收款(万元)",
+          dataIndex: "finalReceivables",
+          key: "finalReceivables"
+        },
+        {
+          title: "最近收款时间",
+          dataIndex: "finalReceivablesTime",
+          key: "finalReceivablesTime"
+        },
+        {
           title: "客户名称",
           dataIndex: "buyerName",
           key: "buyerName"
@@ -1427,6 +1445,32 @@ const approvedOutsourcing = React.createClass({
             >
               打印所有列表信息
             </Button>
+            <Button
+              type="primary"
+              disabled={this.state.selectedRowKeys.length != 1}
+              style={{ margin: "0px 0px 10px 10px" }}
+              onClick={() => {
+                this.inRecordData();
+                this.setState({
+                  bvisible: true
+                });
+              }}
+            >
+              打印开票详情
+            </Button>
+            <Button
+              type="primary"
+              disabled={this.state.selectedRowKeys.length != 1}
+              style={{ margin: "0px 0px 10px 10px" }}
+              onClick={() => {
+                this.waterData();
+                this.setState({
+                  cvisible: true
+                });
+              }}
+            >
+              打印收款流水
+            </Button>
           </TabPane>
           <TabPane tab="导出Excel" key="4">
             <Button
@@ -1494,9 +1538,9 @@ const approvedOutsourcing = React.createClass({
               }
               dataSource={this.state.dataSource}
               rowSelection={false}
-              scroll={{ x: true, y: 0 }}
+              scroll={{ x: "max-content", y: 0 }}
               pagination={this.state.pagination}
-              onRowClick={this.tableRowClick.bind(this)}
+              onRowDoubleClick={this.tableRowClick.bind(this)}
               rowSelection={rowSelection}
             />
           </Spin>

+ 32 - 27
js/component/manageCenter/financialManage/distribute/huiKuan.jsx

@@ -88,7 +88,8 @@ const HuiKuan = React.createClass({
               receivablesTimes: thisdata.receivablesTimes,
               createTimes: thisdata.createTimes,
               remarks: thisdata.remarks,
-              financialPayNo: thisdata.financialPayNo
+              financialPayNo: thisdata.financialPayNo,
+              settlementAmount: thisdata.settlementAmount
             });
           }
         }
@@ -110,7 +111,7 @@ const HuiKuan = React.createClass({
           hui: data.data.count ? data.data.count.amount : 0
         });
 
-        console.log(this.state.dataSource);
+        // console.log(this.state.dataSource);
       }.bind(this)
     }).always(
       function() {
@@ -221,11 +222,16 @@ const HuiKuan = React.createClass({
           key: "corporateName"
         },
         {
-          title: "合同额",
+          title: "合同额(万元)",
           dataIndex: "totalAmount",
           key: "totalAmount"
         },
         {
+          title: "已收款(万元)",
+          dataIndex: "settlementAmount",
+          key: "settlementAmount"
+        },
+        {
           title: "本次回款(万元)",
           dataIndex: "amount",
           key: "amount"
@@ -306,14 +312,14 @@ const HuiKuan = React.createClass({
           authorization: "authorization-text"
         },
         onChange: info => {
-            if(info.file.status == "done") {
-              if (info.file.response.data == 1) {
-                message.success("导入成功!");
-                this.loadData();
-              } else {
-                message.warning(info.file.response.error[0].message);
-              }
+          if (info.file.status == "done") {
+            if (info.file.response.data == 1) {
+              message.success("导入成功!");
+              this.loadData();
+            } else {
+              message.warning(info.file.response.error[0].message);
             }
+          }
         }
       }
     };
@@ -327,10 +333,10 @@ const HuiKuan = React.createClass({
     this.loadData();
     this.departmentList();
 
-    $("#rcDialogTitle0").on("click", function() {
-      alert(123);
-      console.log(123);
-    });
+    // $("#rcDialogTitle0").on("click", function() {
+    //   alert(123);
+    //   console.log(123);
+    // });
   },
   reset() {
     this.state.nameSearch = "";
@@ -361,7 +367,7 @@ const HuiKuan = React.createClass({
     });
   },
   onSelectChange(selectedRowKeys) {
-    console.log("selectedRowKeys changed: ", selectedRowKeys);
+    // console.log("selectedRowKeys changed: ", selectedRowKeys);
     this.setState({ selectedRowKeys });
   },
   showModal() {
@@ -374,7 +380,7 @@ const HuiKuan = React.createClass({
         this.setState({
           modalData: JSON.parse(JSON.stringify(item))
         })
-        console.log(this.state.modalData);
+        // console.log(this.state.modalData);
       }
     })
     
@@ -405,7 +411,7 @@ const HuiKuan = React.createClass({
           if (data.error && data.error.length) {
             message.warning(data.error[0].message);
           } else {
-            console.log("成功", data);
+            // console.log("成功", data);
             this.loadData();
             this.setState({ loading: false, visible: false });
           }
@@ -437,7 +443,7 @@ const HuiKuan = React.createClass({
           if (data.error && data.error.length) {
             message.warning(data.error[0].message);
           }else {
-            console.log("成功",data);
+            // console.log("成功",data);
             this.loadData()
             this.setState({ loading: false, visible: false });
           }
@@ -458,10 +464,10 @@ const HuiKuan = React.createClass({
     this.setState({ visible: false });
   },
   callback(key) {
-  console.log(key);
+  // console.log(key);
   },
   delChecked() {
-    console.log("被删除列表",this.state.selectedRowKeys);
+    // console.log("被删除列表",this.state.selectedRowKeys);
     let ids = this.state.selectedRowKeys.join(",")
     $.ajax({
       method: "POST",
@@ -486,7 +492,7 @@ const HuiKuan = React.createClass({
 
   },
   delAllChecked() {
-    console.log("删除全部");
+    // console.log("删除全部");
     $.ajax({
       method: "POST",
       dataType: "json",
@@ -511,7 +517,7 @@ const HuiKuan = React.createClass({
     
   },
   mergeAll() {
-    console.log("合并全部");
+    // console.log("合并全部");
     $.ajax({
       method: "POST",
       dataType: "json",
@@ -602,7 +608,7 @@ const HuiKuan = React.createClass({
                 value={this.state.statusSearch}
                 onChange={e => {
                   this.setState({ statusSearch: e });
-                  console.log("状态", e);
+                  // console.log("状态", e);
                 }}
               >
                 <Select.Option key={0}>正常</Select.Option>
@@ -764,6 +770,7 @@ const HuiKuan = React.createClass({
               <Button
                 type="danger"
                 style={{ marginBottom: 20, marginLeft: 15 }}
+                disabled={this.state.dataSource.length == 0}
               >
                 删除全部
               </Button>
@@ -805,9 +812,7 @@ const HuiKuan = React.createClass({
           <p
             style={{ display: "inline-block", fontSize: "14px", color: "red" }}
           >
-            {`回款金额总计(万元):${
-              this.state.hui ? this.state.hui : "0"
-            }` +
+            {`回款金额总计(万元):${this.state.hui ? this.state.hui : "0"}` +
               " " +
               " " +
               `合同额总计(万元):${
@@ -991,7 +996,7 @@ const HuiKuan = React.createClass({
               value={this.state.modalData.remarks}
               onChange={e => {
                 this.state.modalData.remarks = e.target.value;
-                console.log(e);
+                // console.log(e);
 
                 this.setState({ modalData: this.state.modalData });
               }}

+ 49 - 3
js/component/manageCenter/financialManage/distribute/shouKuang.jsx

@@ -122,6 +122,9 @@ const ShouKuang = React.createClass({
               contractNo: thisdata.contractNo,
               createTime: thisdata.createTime,
               departmentName: thisdata.departmentName,
+              invoiceAmount: thisdata.invoiceAmount,
+              finalReceivables: thisdata.finalReceivables,
+              finalReceivablesTime: thisdata.finalReceivablesTime
             });
           }
         }
@@ -276,6 +279,21 @@ const ShouKuang = React.createClass({
           key: "actuallyTotalAmount"
         },
         {
+          title: "开票金额(万元)",
+          dataIndex: "invoiceAmount",
+          key: "invoiceAmount"
+        },
+        {
+          title: "最近收款(万元)",
+          dataIndex: "finalReceivables",
+          key: "finalReceivables"
+        },
+        {
+          title: "最近收款时间",
+          dataIndex: "finalReceivablesTime",
+          key: "finalReceivablesTime"
+        },
+        {
           title: "客户名称",
           dataIndex: "buyerName",
           key: "buyerName"
@@ -781,7 +799,9 @@ const ShouKuang = React.createClass({
   },
   exportAll() {
     window.location.href =
-      globalConfig.context + "/api/admin/receivables/exportReceivables";
+      globalConfig.context +
+      "/api/admin/receivables/exportReceivables?" +
+      `orderNo=${this.state.orderNoSearch ? this.state.orderNoSearch : ""}&buyerName=${this.state.nameSearch ? this.state.nameSearch : ""}&departmentId=${this.state.departmenttList ? this.state.departmenttList : ""}&contractNo=${this.state.contractNoSearch ? this.state.contractNoSearch : ""}&processStatus=${this.state.processStatusSearch}`;
   },
   exportWater() {
     window.location.href =
@@ -930,6 +950,32 @@ const ShouKuang = React.createClass({
             >
               打印所有列表信息
             </Button>
+            <Button
+              type="primary"
+              disabled={this.state.selectedRowKeys.length != 1}
+              style={{ margin: "0px 0px 10px 10px" }}
+              onClick={() => {
+                this.inRecordData();
+                this.setState({
+                  bvisible: true
+                });
+              }}
+            >
+              打印开票详情
+            </Button>
+            <Button
+              type="primary"
+              disabled={this.state.selectedRowKeys.length != 1}
+              style={{ margin: "0px 0px 10px 10px" }}
+              onClick={() => {
+                this.waterData();
+                this.setState({
+                  cvisible: true
+                });
+              }}
+            >
+              打印收款流水
+            </Button>
           </TabPane>
           <TabPane tab="导出Excel" key="4">
             <Button
@@ -997,9 +1043,9 @@ const ShouKuang = React.createClass({
               }
               dataSource={this.state.dataSource}
               rowSelection={rowSelection}
-              scroll={{ x: true, y: 0 }}
+              scroll={{ x: "max-content", y: 0 }}
               pagination={this.state.pagination}
-              onRowClick={this.tableRowClick.bind(this)}
+              onRowDoubleClick={this.tableRowClick.bind(this)}
             />
           </Spin>
           <p