From 023d57626eebf4c80eabfb7f0a1769342e99853e Mon Sep 17 00:00:00 2001 From: lys <971387674@qq.com> Date: Fri, 10 Jan 2025 15:47:50 +0800 Subject: [PATCH] =?UTF-8?q?custom/=E9=A2=86=E6=82=A6=E4=B8=9A=E5=8A=A1?= =?UTF-8?q?=E7=BA=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lingyue/vouncherSummary/acctBookDialog.js | 9 ++++++++- .../lingyue/vouncherSummary/conditions.js | 11 +++++++++++ .../custom-pages/lingyue/vouncherSummary/index.js | 13 ++++++++++--- 3 files changed, 29 insertions(+), 4 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/custom-pages/lingyue/vouncherSummary/acctBookDialog.js b/pc4mobx/hrmSalary/pages/custom-pages/lingyue/vouncherSummary/acctBookDialog.js index 8f719913..e356ee13 100644 --- a/pc4mobx/hrmSalary/pages/custom-pages/lingyue/vouncherSummary/acctBookDialog.js +++ b/pc4mobx/hrmSalary/pages/custom-pages/lingyue/vouncherSummary/acctBookDialog.js @@ -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; diff --git a/pc4mobx/hrmSalary/pages/custom-pages/lingyue/vouncherSummary/conditions.js b/pc4mobx/hrmSalary/pages/custom-pages/lingyue/vouncherSummary/conditions.js index aa774d15..0bb651a8 100644 --- a/pc4mobx/hrmSalary/pages/custom-pages/lingyue/vouncherSummary/conditions.js +++ b/pc4mobx/hrmSalary/pages/custom-pages/lingyue/vouncherSummary/conditions.js @@ -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: { diff --git a/pc4mobx/hrmSalary/pages/custom-pages/lingyue/vouncherSummary/index.js b/pc4mobx/hrmSalary/pages/custom-pages/lingyue/vouncherSummary/index.js index 4ac98408..e53a94f8 100644 --- a/pc4mobx/hrmSalary/pages/custom-pages/lingyue/vouncherSummary/index.js +++ b/pc4mobx/hrmSalary/pages/custom-pages/lingyue/vouncherSummary/index.js @@ -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); }