fix: 优化包码结算列表

This commit is contained in:
zhangds 2024-02-06 11:24:02 +08:00
parent ca58568250
commit ed25376de9
1 changed files with 9 additions and 6 deletions

View File

@ -18,6 +18,7 @@ import { Alert, Button, CombinedDateRangePicker, Notify, Select } from "zent"
import "./list.less"
import { Column } from "./utils"
import { pickBy } from "lodash-es"
var moment = require("moment")
let day = moment(nowDay()).format("YYYY-MM-DD")
let tomonth = moment(nowMonth()).format("YYYY-MM-DD")
@ -183,17 +184,18 @@ export default class settlementList extends React.Component {
//!
getOrderFn() {
let { page, limit, search, combinedValue } = this.state
let { key, key_batch_id, plan_id, reseller_id, type } = search
let data = {
page,
limit,
begin_time: combinedValue[0],
end_time: combinedValue[1]
end_time: combinedValue[1],
key: key ? key : "",
key_batch_id: key_batch_id ? key_batch_id.key : "",
plan_id: plan_id ? plan_id.key : "",
reseller_id: reseller_id ? reseller_id.key : "",
type: type ? type.key : ""
}
for (let key in search) {
data[key] = typeof search[key] === "string" ? search[key] : search[key].key
}
getSettlementOrder(pickBy(data))
.then((res) => {
handelResponse(
@ -254,6 +256,7 @@ export default class settlementList extends React.Component {
onChange={(va) => {
this.searchChange("plan_id", va)
if (va) {
// 1.key
this.getBatchKeys(va.key)
} else {
this.setState({ keysOptions: [] })