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