From 44fb334837a25b82ca31dbe3204c27b0a4d98434 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com>
Date: Thu, 10 Oct 2024 16:29:36 +0800
Subject: [PATCH 1/4] =?UTF-8?q?custom/=E9=A2=86=E6=82=A6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../lingyue/vouncherSummary/acctBookDialog.js | 69 +++++++++++++++++++
.../lingyue/vouncherSummary/conditions.js | 54 +++++++++++++++
.../lingyue/vouncherSummary/index.js | 20 ++++--
.../stores/custom-stores/lingyue/index.js | 2 +
4 files changed, 138 insertions(+), 7 deletions(-)
create mode 100644 pc4mobx/hrmSalary/pages/custom-pages/lingyue/vouncherSummary/acctBookDialog.js
create mode 100644 pc4mobx/hrmSalary/pages/custom-pages/lingyue/vouncherSummary/conditions.js
diff --git a/pc4mobx/hrmSalary/pages/custom-pages/lingyue/vouncherSummary/acctBookDialog.js b/pc4mobx/hrmSalary/pages/custom-pages/lingyue/vouncherSummary/acctBookDialog.js
new file mode 100644
index 00000000..8f719913
--- /dev/null
+++ b/pc4mobx/hrmSalary/pages/custom-pages/lingyue/vouncherSummary/acctBookDialog.js
@@ -0,0 +1,69 @@
+/*
+ * 领悦二开
+ * 核算账簿-推送弹框
+ * @Author: 黎永顺
+ * @Date: 2024/10/10
+ * @Wechat:
+ * @Email: 971387674@qq.com
+ * @description:
+*/
+import React, { Component } from "react";
+import { inject, observer } from "mobx-react";
+import { WeaDialog, WeaLocaleProvider } from "ecCom";
+import { Button } from "antd";
+import { acctBookConditions } from "./conditions";
+import { getSearchs } from "../../../../util";
+
+const getLabel = WeaLocaleProvider.getLabel;
+
+@inject("LYStore")
+@observer
+class AcctBookDialog extends Component {
+ constructor(props) {
+ super(props);
+ this.state = { conditions: [] };
+ }
+
+ componentWillReceiveProps(nextProps, nextContext) {
+ if (nextProps.visible !== this.props.visible && nextProps.visible) this.acctBookForm();
+ if (nextProps.visible !== this.props.visible && !nextProps.visible) nextProps.LYStore.initAcctBookForm();
+ }
+
+ acctBookForm = () => {
+ this.setState({
+ conditions: _.map(acctBookConditions, item => ({
+ ...item, items: _.map(item.items, o => ({ ...o, label: getLabel(o.lanId, o.label) }))
+ }))
+ }, () => {
+ const { LYStore: { acctBookForm } } = this.props;
+ acctBookForm.initFormFields(this.state.conditions);
+ });
+ };
+ save = () => {
+ const { LYStore: { acctBookForm } } = this.props;
+ acctBookForm.validateForm().then(f => {
+ if (f.isValid) {
+ this.props.onPushNotifications();
+ } else {
+ f.showErrors();
+ }
+ });
+ };
+
+ render() {
+ const { conditions } = this.state;
+ const { LYStore: { acctBookForm }, loading } = this.props;
+ return (
+ {getLabel(111, "推送")}
+ ]}
+ >
+ {getSearchs(acctBookForm, conditions, 1, false)}
+
+ );
+ }
+}
+
+export default AcctBookDialog;
diff --git a/pc4mobx/hrmSalary/pages/custom-pages/lingyue/vouncherSummary/conditions.js b/pc4mobx/hrmSalary/pages/custom-pages/lingyue/vouncherSummary/conditions.js
new file mode 100644
index 00000000..aa774d15
--- /dev/null
+++ b/pc4mobx/hrmSalary/pages/custom-pages/lingyue/vouncherSummary/conditions.js
@@ -0,0 +1,54 @@
+export const acctBookConditions = [
+ {
+ items: [
+ {
+ browserConditionParam: {
+ completeParams: {
+ type: 161,
+ fielddbtype: "browser.NCZBBrowser",
+ f_weaver_belongto_usertype: "0"
+ },
+ conditionDataParams: {
+ type: "browser.NCZBBrowser",
+ fielddbtype: "browser.NCZBBrowser",
+ f_weaver_belongto_usertype: "0"
+ },
+ dataParams: {
+ type: "browser.NCZBBrowser",
+ f_weaver_belongto_usertype: "0"
+ },
+ destDataParams: {
+ type: "browser.NCZBBrowser",
+ f_weaver_belongto_usertype: "0"
+ },
+ hasAddBtn: false,
+ hasAdvanceSerach: true,
+ idSeparator: ",",
+ isAutoComplete: 1,
+ isDetail: 0,
+ isMultCheckbox: false,
+ isSingle: true,
+ icon: "icon-coms-hrm",
+ linkUrl: "",
+ pageSize: 10,
+ quickSearchName: "zbmc",
+ replaceDatas: [],
+ title: "",
+ type: "161",
+ viewAttr: 3
+ },
+ conditionType: "BROWSER",
+ domkey: ["zbbm"],
+ fieldcol: 16,
+ label: "核算账簿",
+ lanId: 111,
+ labelcol: 6,
+ rules: "required|string",
+ value: "",
+ viewAttr: 3
+ }
+ ],
+ title: "",
+ defaultshow: true
+ }
+];
diff --git a/pc4mobx/hrmSalary/pages/custom-pages/lingyue/vouncherSummary/index.js b/pc4mobx/hrmSalary/pages/custom-pages/lingyue/vouncherSummary/index.js
index 57069d5b..d0351d18 100644
--- a/pc4mobx/hrmSalary/pages/custom-pages/lingyue/vouncherSummary/index.js
+++ b/pc4mobx/hrmSalary/pages/custom-pages/lingyue/vouncherSummary/index.js
@@ -8,20 +8,23 @@
* @description:
*/
import React, { Component } from "react";
+import { inject, observer } from "mobx-react";
import { WeaLoadingGlobal, WeaLocaleProvider, WeaTableEdit, WeaTop } from "ecCom";
import { Button, message } from "antd";
import * as API from "../../../../apis/custom-apis/lingyue";
import { getQueryString, getURLParameters } from "../../../../util/url";
import CustomBrowser from "../../../../components/CustomBrowser";
+import AcctBookDialog from "./acctBookDialog";
const getLabel = WeaLocaleProvider.getLabel;
const pzlxEnum = ["0", "1", "2"];//非计提类型的凭证列表可编辑
-
+@inject("LYStore")
+@observer
class Index extends Component {
constructor(props) {
super(props);
this.state = {
- datas: [], totalData: [], columns: [], loading: false
+ datas: [], totalData: [], columns: [], loading: false, visible: false
};
}
@@ -91,9 +94,9 @@ class Index extends Component {
});
};
pushNotifications = () => {
- const { datas } = this.state;
+ const { datas } = this.state, { LYStore: { acctBookForm } } = this.props;
const payload = {
- ...getURLParameters(window.location.hash),
+ ...getURLParameters(window.location.hash), ...acctBookForm.getFormParams(),
ffgsqc: decodeURI(getURLParameters(window.location.hash).ffgsqc),
dataSource: _.head(datas).dataSource,
details: _.map(datas, o => ({
@@ -110,6 +113,7 @@ class Index extends Component {
this.setState({ loading: false });
if (status) {
message.success(getLabel(111, "操作成功!"));
+ this.setState({ visible: false });
setTimeout(() => window.close(), 1500);
} else {
message.error(errormsg);
@@ -118,14 +122,14 @@ class Index extends Component {
};
render() {
- const { datas, columns, loading, totalData } = this.state;
+ const { datas, columns, loading, totalData, visible } = this.state;
const pzlx = getQueryString("pzlx");
return (
} showDropIcon={false}
iconBgcolor="#F14A2D" className="custom_vouchers_lingyue"
- buttons={[]}>
+ buttons={[]}>
this.tableEdit = el} showCopy={false} deleteConfirm
@@ -145,6 +149,8 @@ class Index extends Component {
datas={totalData} tableProps={{ showHeader: false }}
columns={_.map(columns, o => ({ ...o, com: [{ key: o.column, type: "TEXT" }] }))}/>
+ this.setState({ visible: false })}/>
);
diff --git a/pc4mobx/hrmSalary/stores/custom-stores/lingyue/index.js b/pc4mobx/hrmSalary/stores/custom-stores/lingyue/index.js
index 9bce3ac6..a837cab1 100644
--- a/pc4mobx/hrmSalary/stores/custom-stores/lingyue/index.js
+++ b/pc4mobx/hrmSalary/stores/custom-stores/lingyue/index.js
@@ -4,4 +4,6 @@ import { WeaForm } from "comsMobx";
export class LYStore {
@observable form = new WeaForm();
@action initForm = () => this.form = new WeaForm();
+ @observable acctBookForm = new WeaForm(); //推送核算账簿form
+ @action initAcctBookForm = () => this.acctBookForm = new WeaForm();//重置推送核算账簿form
}
From 925394e814d9bebefe2f901a128e527be39ed61b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com>
Date: Sat, 12 Oct 2024 13:38:20 +0800
Subject: [PATCH 2/4] =?UTF-8?q?custom/=E9=A2=86=E6=82=A6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../components/CustomBrowser/index.js | 16 +++++++++---
.../lingyue/components/generateDataDialog.js | 16 ++++++------
.../custom-pages/lingyue/components/list.js | 7 ++++-
.../lingyue/vouncherSummary/index.js | 26 ++++++++++++++++---
.../stores/custom-stores/lingyue/index.js | 2 ++
5 files changed, 51 insertions(+), 16 deletions(-)
diff --git a/pc4mobx/hrmSalary/components/CustomBrowser/index.js b/pc4mobx/hrmSalary/components/CustomBrowser/index.js
index 3b9fb3ed..b7afc211 100644
--- a/pc4mobx/hrmSalary/components/CustomBrowser/index.js
+++ b/pc4mobx/hrmSalary/components/CustomBrowser/index.js
@@ -30,15 +30,24 @@ class Index extends Component {
componentDidMount() {
const { value, fieldConfig } = this.props;
- const { browserConditionParam: { replaceDatas = [] } } = fieldConfig;
- if (value && replaceDatas.length > 0) {
+ const { value: defaultValue, browserConditionParam: { replaceDatas = [] } } = fieldConfig;
+ if ((value || defaultValue) && replaceDatas.length > 0) {
this.setState({
- searchKeys: value.split(","),
+ searchKeys: (value || defaultValue).split(","),
selectedData: _.reduce(replaceDatas, (pre, cur) => ({ ...pre, [cur["id"]]: cur }), {})
});
}
}
+ componentWillReceiveProps(nextProps, nextContext) {
+ if (
+ (nextProps.value !== this.props.value && _.isEmpty(nextProps.value)) ||
+ (nextProps.fieldConfig.value !== this.props.fieldConfig.value && _.isEmpty(nextProps.fieldConfig.value))
+ ) {
+ this.setState({ searchKeys: [], selectedData: [] });
+ }
+ }
+
renderSingle = () => {
const { fieldConfig } = this.props;
const { selectedData, searchKeys } = this.state;
@@ -75,6 +84,7 @@ class Index extends Component {
selectedData: ((isSingle || browserConditionParam.isSingle) && !_.isEmpty(values)) ? { [_.last(values)]: datas[_.last(values)] } : datas
}, () => {
this.props.onChange && this.props.onChange(values.join(","));
+ this.props.onCustomChange && this.props.onCustomChange(this.state.selectedData);
if (form) {
form.updateFields({
[getKey(fieldConfig)]: { value: this.state.searchKeys.join(",") }
diff --git a/pc4mobx/hrmSalary/pages/custom-pages/lingyue/components/generateDataDialog.js b/pc4mobx/hrmSalary/pages/custom-pages/lingyue/components/generateDataDialog.js
index 8fd2c024..38ee0712 100644
--- a/pc4mobx/hrmSalary/pages/custom-pages/lingyue/components/generateDataDialog.js
+++ b/pc4mobx/hrmSalary/pages/custom-pages/lingyue/components/generateDataDialog.js
@@ -33,7 +33,7 @@ class GenerateDataDialog extends Component {
componentWillReceiveProps(nextProps, nextContext) {
if (nextProps.visible !== this.props.visible && nextProps.visible) this.initLYForm();
- if (nextProps.visible !== this.props.visible && !nextProps.visible) nextProps.LYStore.initForm();
+ if (nextProps.visible !== this.props.visible && !nextProps.visible) nextProps.LYStore.initDataForm();
}
initLYForm = () => {
@@ -42,16 +42,16 @@ class GenerateDataDialog extends Component {
...item, items: _.map(item.items, o => ({ ...o, label: getLabel(o.lanId, o.label) }))
}))
}, () => {
- const { LYStore: { form } } = this.props;
- form.initFormFields(this.state.conditions);
+ const { LYStore: { dataForm } } = this.props;
+ dataForm.initFormFields(this.state.conditions);
});
};
save = () => {
- const { LYStore: { form }, type, onSearch } = this.props;
- form.validateForm().then(f => {
+ const { LYStore: { dataForm }, type, onSearch } = this.props;
+ dataForm.validateForm().then(f => {
if (f.isValid) {
this.setState({ loading: true });
- const payload = { ...form.getFormParams() };
+ const payload = { ...dataForm.getFormParams() };
APIFOX[type](payload).then(({ status, errormsg }) => {
this.setState({ loading: false });
if (status) {
@@ -69,7 +69,7 @@ class GenerateDataDialog extends Component {
render() {
const { conditions, loading } = this.state;
- const { LYStore: { form } } = this.props;
+ const { LYStore: { dataForm } } = this.props;
return (
{getLabel(537558, "保存")}
]}
>
- {getSearchs(form, conditions, 1, false)}
+ {getSearchs(dataForm, conditions, 1, false)}
);
}
diff --git a/pc4mobx/hrmSalary/pages/custom-pages/lingyue/components/list.js b/pc4mobx/hrmSalary/pages/custom-pages/lingyue/components/list.js
index 32a6241b..fb9697f2 100644
--- a/pc4mobx/hrmSalary/pages/custom-pages/lingyue/components/list.js
+++ b/pc4mobx/hrmSalary/pages/custom-pages/lingyue/components/list.js
@@ -113,12 +113,17 @@ class List extends Component {
};
handleOperate = (key) => {
const { payload, selectedRowKeys } = this.state;
- const { type } = this.props;
+ const { type, query, ffgsqcLabel } = this.props;
switch (key) {
case "GENERATE":
this.setState({ visible: true });
break;
case "GENERATEVOUCHER":
+ const { ffgsqc } = query;
+ if (!ffgsqc) {
+ message.warning(getLabel(111, `${ffgsqcLabel}参数不能为空`));
+ return;
+ }
this.setState({ voucherDialog: { ...this.state.voucherDialog, visible: true } });
break;
case "EXPORTALL":
diff --git a/pc4mobx/hrmSalary/pages/custom-pages/lingyue/vouncherSummary/index.js b/pc4mobx/hrmSalary/pages/custom-pages/lingyue/vouncherSummary/index.js
index d0351d18..538e6765 100644
--- a/pc4mobx/hrmSalary/pages/custom-pages/lingyue/vouncherSummary/index.js
+++ b/pc4mobx/hrmSalary/pages/custom-pages/lingyue/vouncherSummary/index.js
@@ -69,6 +69,7 @@ class Index extends Component {
rowKey: "bh", columns: [
{ title: getLabel(111, "名称"), dataIndex: "mc" },
{ title: getLabel(111, "辅助核算类型"), dataIndex: "fzhslx" },
+ { title: getLabel(111, "辅助核算类型编号"), dataIndex: "fzhslxbh" },
{ title: getLabel(111, "编号"), dataIndex: "bh" }
]
},
@@ -79,6 +80,9 @@ class Index extends Component {
}
}}
value={value}
+ onCustomChange={(value) => {
+ console.log("onCustomChange",value);
+ }}
onChange={(value) => onEdit({
record: { ...record, [col["column"]]: value }, index
})}
@@ -101,13 +105,27 @@ class Index extends Component {
dataSource: _.head(datas).dataSource,
details: _.map(datas, o => ({
zy: o.zy, kjkm: o.kjkm, jfValue: o.jfValue, dfValue: o.dfValue,
- fzhsXmqs: !o.fzhsXmqs ? "" : _.isString(o.fzhsXmqs) ? o.fzhsXmqs : o.fzhsXmqs.bh,
- fzhsFwlb: !o.fzhsFwlb ? "" : _.isString(o.fzhsFwlb) ? o.fzhsFwlb : o.fzhsFwlb.bh,
- fzhsSllb: !o.fzhsSllb ? "" : _.isString(o.fzhsSllb) ? o.fzhsSllb : o.fzhsSllb.bh,
- fzhsKs: !o.fzhsKs ? "" : _.isString(o.fzhsKs) ? o.fzhsKs : o.fzhsKs.bh,
+ fzhsXmqs: !o.fzhsXmqs ? {} : _.isString(o.fzhsXmqs) ? o.fzhsXmqs : {
+ bh: o.fzhsXmqs.bh,
+ fzhslxbh: o.fzhsXmqs.fzhslxbh
+ },
+ fzhsFwlb: !o.fzhsFwlb ? {} : _.isString(o.fzhsFwlb) ? o.fzhsFwlb : {
+ bh: o.fzhsFwlb.bh,
+ fzhslxbh: o.fzhsFwlb.fzhslxbh
+ },
+ fzhsSllb: !o.fzhsSllb ? {} : _.isString(o.fzhsSllb) ? o.fzhsSllb : {
+ bh: o.fzhsSllb.bh,
+ fzhslxbh: o.fzhsFwlb.fzhslxbh
+ },
+ fzhsKs: !o.fzhsKs ? {} : _.isString(o.fzhsKs) ? o.fzhsKs : {
+ bh: o.fzhsKs.bh,
+ fzhslxbh: o.fzhsFwlb.fzhslxbh
+ },
fzhsOtherBmList: !o.fzhsOther ? [] : _.isString(o.fzhsOther) ? o.fzhsOther.split(",") : _.map(o.fzhsOther, o => (o.bh))
}))
};
+ console.log(payload, datas);
+ return;
this.setState({ loading: true });
API.pushUCAndSave(payload).then(({ status, errormsg }) => {
this.setState({ loading: false });
diff --git a/pc4mobx/hrmSalary/stores/custom-stores/lingyue/index.js b/pc4mobx/hrmSalary/stores/custom-stores/lingyue/index.js
index a837cab1..2e9a4718 100644
--- a/pc4mobx/hrmSalary/stores/custom-stores/lingyue/index.js
+++ b/pc4mobx/hrmSalary/stores/custom-stores/lingyue/index.js
@@ -4,6 +4,8 @@ import { WeaForm } from "comsMobx";
export class LYStore {
@observable form = new WeaForm();
@action initForm = () => this.form = new WeaForm();
+ @observable dataForm = new WeaForm();//生成数据form
+ @action initDataForm = () => this.dataForm = new WeaForm();
@observable acctBookForm = new WeaForm(); //推送核算账簿form
@action initAcctBookForm = () => this.acctBookForm = new WeaForm();//重置推送核算账簿form
}
From 48df3121fdc1a3d07823f272f2d502a7cfa59bce Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com>
Date: Sat, 12 Oct 2024 15:31:39 +0800
Subject: [PATCH 3/4] =?UTF-8?q?custom/=E9=A2=86=E6=82=A6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../components/CustomBrowser/index.js | 15 ++-----
.../lingyue/vouncherSummary/index.js | 45 ++++++++++++-------
2 files changed, 32 insertions(+), 28 deletions(-)
diff --git a/pc4mobx/hrmSalary/components/CustomBrowser/index.js b/pc4mobx/hrmSalary/components/CustomBrowser/index.js
index b7afc211..92d2944f 100644
--- a/pc4mobx/hrmSalary/components/CustomBrowser/index.js
+++ b/pc4mobx/hrmSalary/components/CustomBrowser/index.js
@@ -30,24 +30,15 @@ class Index extends Component {
componentDidMount() {
const { value, fieldConfig } = this.props;
- const { value: defaultValue, browserConditionParam: { replaceDatas = [] } } = fieldConfig;
- if ((value || defaultValue) && replaceDatas.length > 0) {
+ const { browserConditionParam: { replaceDatas = [] } } = fieldConfig;
+ if (value && replaceDatas.length > 0) {
this.setState({
- searchKeys: (value || defaultValue).split(","),
+ searchKeys: value.split(","),
selectedData: _.reduce(replaceDatas, (pre, cur) => ({ ...pre, [cur["id"]]: cur }), {})
});
}
}
- componentWillReceiveProps(nextProps, nextContext) {
- if (
- (nextProps.value !== this.props.value && _.isEmpty(nextProps.value)) ||
- (nextProps.fieldConfig.value !== this.props.fieldConfig.value && _.isEmpty(nextProps.fieldConfig.value))
- ) {
- this.setState({ searchKeys: [], selectedData: [] });
- }
- }
-
renderSingle = () => {
const { fieldConfig } = this.props;
const { selectedData, searchKeys } = this.state;
diff --git a/pc4mobx/hrmSalary/pages/custom-pages/lingyue/vouncherSummary/index.js b/pc4mobx/hrmSalary/pages/custom-pages/lingyue/vouncherSummary/index.js
index 538e6765..5ea76966 100644
--- a/pc4mobx/hrmSalary/pages/custom-pages/lingyue/vouncherSummary/index.js
+++ b/pc4mobx/hrmSalary/pages/custom-pages/lingyue/vouncherSummary/index.js
@@ -80,11 +80,12 @@ class Index extends Component {
}
}}
value={value}
- onCustomChange={(value) => {
- console.log("onCustomChange",value);
- }}
- onChange={(value) => onEdit({
- record: { ...record, [col["column"]]: value }, index
+ onCustomChange={(value) => onEdit({
+ record: {
+ ...record, [`${col["column"]}Obj`]: _.values(value),
+ [col["column"]]: _.map(_.values(value), o => o.bh).join(",")
+ },
+ index, key: "custom", value: _.map(_.values(value), o => o.bh).join(",")
})}
/>;
}
@@ -105,32 +106,44 @@ class Index extends Component {
dataSource: _.head(datas).dataSource,
details: _.map(datas, o => ({
zy: o.zy, kjkm: o.kjkm, jfValue: o.jfValue, dfValue: o.dfValue,
- fzhsXmqs: !o.fzhsXmqs ? {} : _.isString(o.fzhsXmqs) ? o.fzhsXmqs : {
+ fzhsXmqs: !o.fzhsXmqs ? {} : _.isString(o.fzhsXmqs) ? {
+ bh: o.fzhsXmqsObj[0].bh,
+ fzhslxbh: o.fzhsXmqsObj[0].fzhslxbh
+ } : {
bh: o.fzhsXmqs.bh,
fzhslxbh: o.fzhsXmqs.fzhslxbh
},
- fzhsFwlb: !o.fzhsFwlb ? {} : _.isString(o.fzhsFwlb) ? o.fzhsFwlb : {
+ fzhsFwlb: !o.fzhsFwlb ? {} : _.isString(o.fzhsFwlb) ? {
+ bh: o.fzhsFwlbObj[0].bh,
+ fzhslxbh: o.fzhsFwlbObj[0].fzhslxbh
+ } : {
bh: o.fzhsFwlb.bh,
fzhslxbh: o.fzhsFwlb.fzhslxbh
},
- fzhsSllb: !o.fzhsSllb ? {} : _.isString(o.fzhsSllb) ? o.fzhsSllb : {
+ fzhsSllb: !o.fzhsSllb ? {} : _.isString(o.fzhsSllb) ? {
+ bh: o.fzhsSllbObj[0].bh,
+ fzhslxbh: o.fzhsSllbObj[0].fzhslxbh
+ } : {
bh: o.fzhsSllb.bh,
- fzhslxbh: o.fzhsFwlb.fzhslxbh
+ fzhslxbh: o.fzhsSllb.fzhslxbh
},
- fzhsKs: !o.fzhsKs ? {} : _.isString(o.fzhsKs) ? o.fzhsKs : {
+ fzhsKs: !o.fzhsKs ? {} : _.isString(o.fzhsKs) ? {
+ bh: o.fzhsKsObj[0].bh,
+ fzhslxbh: o.fzhsKsObj[0].fzhslxbh
+ } : {
bh: o.fzhsKs.bh,
- fzhslxbh: o.fzhsFwlb.fzhslxbh
+ fzhslxbh: o.fzhsKs.fzhslxbh
},
- fzhsOtherBmList: !o.fzhsOther ? [] : _.isString(o.fzhsOther) ? o.fzhsOther.split(",") : _.map(o.fzhsOther, o => (o.bh))
+ fzhsOtherBmList: !o.fzhsOther ? [] : _.isString(o.fzhsOther) ? _.map(o.fzhsOtherObj, k => ({
+ bh: k.bh, fzhslxbh: k.fzhslxbh
+ })) : _.map(o.fzhsOther, o => (o.bh))
}))
};
- console.log(payload, datas);
- return;
this.setState({ loading: true });
- API.pushUCAndSave(payload).then(({ status, errormsg }) => {
+ API.pushUCAndSave(payload).then(({ status, data, errormsg }) => {
this.setState({ loading: false });
if (status) {
- message.success(getLabel(111, "操作成功!"));
+ message.success(data.errMsg);
this.setState({ visible: false });
setTimeout(() => window.close(), 1500);
} else {
From 9d06793a0495ed9d29a636cb88b9d6e197a0dcc8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com>
Date: Sat, 12 Oct 2024 15:32:42 +0800
Subject: [PATCH 4/4] =?UTF-8?q?custom/=E9=A2=86=E6=82=A6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../pages/custom-pages/lingyue/vouncherSummary/index.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pc4mobx/hrmSalary/pages/custom-pages/lingyue/vouncherSummary/index.js b/pc4mobx/hrmSalary/pages/custom-pages/lingyue/vouncherSummary/index.js
index 5ea76966..00c34eb9 100644
--- a/pc4mobx/hrmSalary/pages/custom-pages/lingyue/vouncherSummary/index.js
+++ b/pc4mobx/hrmSalary/pages/custom-pages/lingyue/vouncherSummary/index.js
@@ -143,7 +143,7 @@ class Index extends Component {
API.pushUCAndSave(payload).then(({ status, data, errormsg }) => {
this.setState({ loading: false });
if (status) {
- message.success(data.errMsg);
+ data.status ? message.success(data.errMsg) : message.error(data.errMsg);
this.setState({ visible: false });
setTimeout(() => window.close(), 1500);
} else {