custom/领悦业务线
This commit is contained in:
parent
d12fa43d7d
commit
d24be5dfd4
|
|
@ -64,6 +64,9 @@ export const genAndPreveiw = (params) => {
|
|||
export const pushUCAndSave = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/ly/PZ/pushUCAndSave", params);
|
||||
};
|
||||
export const getHszb = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/ly/PZ/getHszb", params);
|
||||
};
|
||||
export const getHistoryVoucherList = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/ly/PZ/historyVoucherList", params);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -10,10 +10,11 @@
|
|||
import React, { Component } from "react";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { WeaDialog, WeaLocaleProvider, WeaTools } from "ecCom";
|
||||
import { Button } from "antd";
|
||||
import moment from "moment";
|
||||
import { getHszb } from "../../../../apis/custom-apis/lingyue";
|
||||
import { acctBookConditions } from "./conditions";
|
||||
import { getSearchs } from "../../../../util";
|
||||
import { Button } from "antd";
|
||||
import moment from "moment";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
const getKey = WeaTools.getKey;
|
||||
|
|
@ -31,12 +32,18 @@ class AcctBookDialog extends Component {
|
|||
if (nextProps.visible !== this.props.visible && !nextProps.visible) nextProps.LYStore.initAcctBookForm();
|
||||
}
|
||||
|
||||
acctBookForm = () => {
|
||||
acctBookForm = async () => {
|
||||
const { data } = await getHszb({ ffgsqc: decodeURI(WeaTools.getUrlParams().ffgsqc) });
|
||||
this.setState({
|
||||
conditions: _.map(acctBookConditions, item => ({
|
||||
...item, items: _.map(item.items, o => {
|
||||
if (getKey(o) === "zdrq") {
|
||||
return { ...o, label: getLabel(o.lanId, o.label), value: moment().format("YYYY-MM-DD") };
|
||||
} else if (getKey(o) === "zbbm") {
|
||||
return {
|
||||
...o, label: getLabel(o.lanId, o.label),
|
||||
browserConditionParam: { ...o.browserConditionParam, replaceDatas: [data] }
|
||||
};
|
||||
}
|
||||
return { ...o, label: getLabel(o.lanId, o.label) };
|
||||
})
|
||||
|
|
@ -62,7 +69,8 @@ class AcctBookDialog extends Component {
|
|||
const { LYStore: { acctBookForm }, loading } = this.props;
|
||||
return (
|
||||
<WeaDialog
|
||||
{...this.props} style={{ width: 480, height: 80 }} initLoadCss title={getLabel(111, "凭证推送")}
|
||||
{...this.props} initLoadCss title={getLabel(111, "凭证推送")}
|
||||
style={{ width: 480, height: _.reduce(conditions, (pre, cur) => (pre += cur.items.length), 0) * 47 + 33 }}
|
||||
buttons={[
|
||||
<Button type="primary" onClick={this.save} loading={loading}>{getLabel(111, "推送")}</Button>
|
||||
]}
|
||||
|
|
|
|||
Loading…
Reference in New Issue