custom/领悦业务线
This commit is contained in:
parent
e699a006d0
commit
023d57626e
|
|
@ -11,10 +11,12 @@ import React, { Component } from "react";
|
|||
import { inject, observer } from "mobx-react";
|
||||
import { WeaDialog, WeaLocaleProvider } from "ecCom";
|
||||
import { Button } from "antd";
|
||||
import moment from "moment";
|
||||
import { acctBookConditions } from "./conditions";
|
||||
import { getSearchs } from "../../../../util";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
const getKey = WeaTools.getKey;
|
||||
|
||||
@inject("LYStore")
|
||||
@observer
|
||||
|
|
@ -32,7 +34,12 @@ class AcctBookDialog extends Component {
|
|||
acctBookForm = () => {
|
||||
this.setState({
|
||||
conditions: _.map(acctBookConditions, item => ({
|
||||
...item, items: _.map(item.items, o => ({ ...o, label: getLabel(o.lanId, o.label) }))
|
||||
...item, items: _.map(item.items, o => {
|
||||
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) };
|
||||
})
|
||||
}))
|
||||
}, () => {
|
||||
const { LYStore: { acctBookForm } } = this.props;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,17 @@
|
|||
export const acctBookConditions = [
|
||||
{
|
||||
items: [
|
||||
{
|
||||
conditionType: "DATEPICKER",
|
||||
domkey: ["zdrq"],
|
||||
fieldcol: 16,
|
||||
label: "制单日期",
|
||||
lanId: 111,
|
||||
labelcol: 6,
|
||||
rules: "required|string",
|
||||
value: "",
|
||||
viewAttr: 3
|
||||
},
|
||||
{
|
||||
browserConditionParam: {
|
||||
completeParams: {
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
import React, { Component } from "react";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { WeaLoadingGlobal, WeaLocaleProvider, WeaTableEdit, WeaTop } from "ecCom";
|
||||
import { Button, message } from "antd";
|
||||
import { Button, message, Modal } from "antd";
|
||||
import * as API from "../../../../apis/custom-apis/lingyue";
|
||||
import { getQueryString, getURLParameters } from "../../../../util/url";
|
||||
import CustomBrowser from "../../../../components/CustomBrowser";
|
||||
|
|
@ -145,9 +145,16 @@ class Index extends Component {
|
|||
API.pushUCAndSave(payload).then(({ status, data, errormsg }) => {
|
||||
this.setState({ loading: false });
|
||||
if (status) {
|
||||
data.status ? message.success(data.errMsg) : message.error(data.errMsg);
|
||||
this.setState({ visible: false });
|
||||
setTimeout(() => window.close(), 1500);
|
||||
if (data.status) {
|
||||
message.success(data.errMsg);
|
||||
setTimeout(() => window.close(), 1500);
|
||||
} else {
|
||||
Modal.warning({
|
||||
title: getLabel(111, "提示"),
|
||||
content: data.errMsg
|
||||
});
|
||||
}
|
||||
} else {
|
||||
message.error(errormsg);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue