dev01 1 year ago
parent
commit
e7f0657478

+ 25 - 15
js/component/manageCenter/financialManage/account/accountDetails.jsx

@@ -162,9 +162,9 @@ class AccountDetails extends Component {
           width: "5%",
           render: (text, record) => {
             return (
-              <div style={{ color: "red", cursor: !record.cost && this.props.isOperate && "pointer" }}
+              <div style={{ color: "red", cursor: !record.noEdit && this.props.isOperate && "pointer" }}
                 onClick={() => {
-                  !record.cost && this.props.isOperate &&
+                  !record.noEdit && this.props.isOperate &&
                     this.setState({
                       editAmount: true,
                       upAmount: text,
@@ -279,9 +279,11 @@ class AccountDetails extends Component {
 
               allList.push(obj)
             }
-            allList.push({ id: allData.sonList[i].id, cost: "小计", amount: allData.sonList[i].amount, realAmount: allData.sonList[i].realAmount })
+            allData.sonList[i].settlementAmount != 0 &&
+              allList.push({ noEdit: true, id: allData.sonList[i].id, cost: "抵扣", amount: allData.sonList[i].settlementAmount, realAmount: " " })
+            allList.push({ noEdit: true, id: allData.sonList[i].id, cost: "小计", amount: allData.sonList[i].amount, realAmount: allData.sonList[i].realAmount })
           }
-          allList.push({ id: allData.id, cost: "合计", amount: allData.amount, realAmount: allData.realAmount })
+          allList.push({ noEdit: true, id: allData.id, cost: "合计", amount: allData.amount, realAmount: allData.realAmount })
           this.setState({
             data: data.data,
             newList: allList,
@@ -294,7 +296,7 @@ class AccountDetails extends Component {
           //     : [],
           // })
           // this.getAccountList(id)
-          // this.getLogData(id)
+          this.getLogData(id)
         } else {
           message.warning(data.error[0].message)
         }
@@ -453,6 +455,7 @@ class AccountDetails extends Component {
             checkData: {},
           });
           this.getDetails(this.state.data.id)
+          this.getLogData(this.state.data.id)
         } else {
           message.warning(data.error[0].message);
         }
@@ -568,14 +571,14 @@ class AccountDetails extends Component {
                       <span>{data.checkNo}</span>
                     </FormItem>
                   </div>
-                  <div className="clearfix">
+                  {/* <div className="clearfix">
                     <FormItem
                       {...formItemLayout}
                       label="总金额"
                     >
                       <span>{data.totalAmount}</span>
                     </FormItem>
-                  </div>
+                  </div> */}
                   <div className="clearfix">
                     <FormItem
 
@@ -681,7 +684,7 @@ class AccountDetails extends Component {
                             {...formItemLayout}
                             label="报销金额"
                           >
-                            <span>{it.totalAmount}(元)</span>
+                            <span style={{ fontWeight: "bold" }}>{it.amount}(元)</span>
                           </FormItem>
                         </div>
                         <div className="clearfix">
@@ -746,7 +749,6 @@ class AccountDetails extends Component {
                             </div>
                           )
                         }
-
                         {/* 第三方付款 */}
                         {it.type == 3 &&
                           it.detList.map(item =>
@@ -810,6 +812,17 @@ class AccountDetails extends Component {
                             </div>
                           )
                         }
+                        {
+                          it.settlementAmount != 0 && it.type != 4 && it.type != 5 &&
+                          <div className="clearfix">
+                            <FormItem
+                              {...formItemLayout}
+                              label="抵扣金额"
+                            >
+                              <span>{it.settlementAmount}(元)</span>
+                            </FormItem>
+                          </div>
+                        }
                         <div className="clearfix">
                           <FormItem
                             {...formItemLayout}
@@ -833,27 +846,24 @@ class AccountDetails extends Component {
                         <span style={{ color: "red" }}>{data.debitTotalAmount}(元)</span>
                       </FormItem>
                     </div>}
-
                   {data.type != 4 && data.type != 5 &&
                     <div className="clearfix">
                       <FormItem
                         {...formItemLayout}
-                        label="金额"
+                        label="本次报销金额"
                       >
-                        <span style={{ color: "red" }}>{data.totalAmount}(元)</span>
+                        <span style={{ color: "red", fontWeight: "bold" }}>{data.amount}(元)</span>
                       </FormItem>
                     </div>}
-
                   {data.type != 4 && data.type != 5 &&
                     <div className="clearfix">
                       <FormItem
                         {...formItemLayout}
                         label="实报金额"
                       >
-                        <span style={{ color: "red" }}>{data.realAmount}(元)</span>
+                        <span style={{ color: "red", fontWeight: "bold" }}>{data.realAmount}(元)</span>
                       </FormItem>
                     </div>}
-
                   <div style={{ fontSize: 13, fontWeight: "bold" }}>收款详情</div>
                   {data.type != 3 && data.type != 5 &&
                     <div>

+ 8 - 2
js/component/manageCenter/financialManage/account/accountReview.jsx

@@ -421,7 +421,7 @@ const AccountReview = React.createClass({
             showDetails: false,
             checkData: {},
           });
-          this.loadData()
+          this.loadData(this.state.pageNo)
         } else {
           message.warning(data.error[0].message);
         }
@@ -778,7 +778,13 @@ const AccountReview = React.createClass({
             showDetails={this.state.showDetails}
             id={this.state.id}
             isOperate={this.props.isOperate}
-            onCancel={() => { this.setState({ showDetails: false }) }}
+            onCancel={() => {
+              this.setState({
+                showDetails: false
+              }, () => {
+                this.loadData(this.state.pageNo)
+              })
+            }}
           />
         }
         {