From 9a99942af5c0c976f7bc79107cf559ebbbf0f5e7 Mon Sep 17 00:00:00 2001
From: lys <971387674@qq.com>
Date: Tue, 13 May 2025 09:56:51 +0800
Subject: [PATCH] =?UTF-8?q?custom-=E5=AE=89=E4=BB=95=E6=96=B0=E8=83=BD?=
=?UTF-8?q?=E6=BA=90?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../custom-pages/liante/cbsDetail/index.js | 93 ++++++++++++++++---
.../liante/cbsDetail/pushedDetailList.js | 8 +-
.../custom-pages/liante/cbsList/index.less | 36 +++++++
.../pages/custom-pages/liante/conditions.js | 25 +++++
4 files changed, 147 insertions(+), 15 deletions(-)
create mode 100644 pc4mobx/hrmSalary/pages/custom-pages/liante/conditions.js
diff --git a/pc4mobx/hrmSalary/pages/custom-pages/liante/cbsDetail/index.js b/pc4mobx/hrmSalary/pages/custom-pages/liante/cbsDetail/index.js
index 8566bd8c..5d952faa 100644
--- a/pc4mobx/hrmSalary/pages/custom-pages/liante/cbsDetail/index.js
+++ b/pc4mobx/hrmSalary/pages/custom-pages/liante/cbsDetail/index.js
@@ -8,12 +8,17 @@
* @description:
*/
import React, { Component } from "react";
-import { WeaLocaleProvider, WeaReqTop } from "ecCom";
-import { Button, Col, message, Modal, Row } from "antd";
+import { WeaInputSearch, WeaLocaleProvider, WeaReqTop } from "ecCom";
+import { Button, Col, Dropdown, Menu, message, Modal, Row } from "antd";
+import { WeaForm, WeaSwitch } from "comsMobx";
import * as API from "../../../../apis/custom-apis/liante";
import PushedDetailList from "./pushedDetailList";
+import FormInfo from "../../../../components/FormInfo";
+import { conditions } from "../conditions";
+import cs from "classnames";
import "../cbsList/index.less";
+const form = new WeaForm();
const getLabel = WeaLocaleProvider.getLabel;
class Index extends Component {
@@ -21,10 +26,14 @@ class Index extends Component {
super(props);
this.state = {
selectedKey: "0", baseInfo: {}, queryParams: {}, isQuery: false,
- selectedRowKeys: []
+ selectedRowKeys: [], showadvance: false
};
}
+ componentWillMount() {
+ form.initFormFields(conditions);
+ }
+
componentDidMount() {
const { params } = this.props, { salaryCbsId: id } = params;
API.getPushCBSBaseInfo({ id }).then(({ status, data }) => {
@@ -32,15 +41,16 @@ class Index extends Component {
});
}
- pushDataToCBS = (ids, isConfirm) => {
- const payload = { ids, isConfirm }, { isQuery } = this.state;
+ pushDataToCBS = (ids, isConfirm, key = "") => {
+ const payload = !!key ? { salaryCbsld: ids, isConfirm } : { ids, isConfirm };
+ const { isQuery } = this.state;
API.pushDataToCBS(payload).then(({ status, data, errormsg }) => {
if (status && !!data) {
Modal.confirm({
title: getLabel(111, "提示信息"),
content: data,
onOk: () => {
- this.pushDataToCBS(ids, true);
+ this.pushDataToCBS(ids, true, key);
}
});
} else if (status && !data) {
@@ -52,36 +62,95 @@ class Index extends Component {
});
};
+ onDropMenuClick = (key) => {
+ const { selectedRowKeys } = this.state;
+ switch (key) {
+ case "select":
+ this.pushDataToCBS(selectedRowKeys, false);
+ break;
+ case "all":
+ const { params } = this.props, { salaryCbsId } = params;
+ this.pushDataToCBS(salaryCbsId, false, "salaryCbsId");
+ break;
+ default:
+ break;
+ }
+ };
+
render() {
- const { selectedKey, baseInfo, queryParams, isQuery, selectedRowKeys } = this.state;
+ const { selectedKey, baseInfo, queryParams, isQuery, selectedRowKeys, showadvance } = this.state;
+ const menu = (
+
+ );
const tabs = [
{
title: getLabel(111, "未推送"), key: "0",
buttons: [
-
+ this.onDropMenuClick("all")}>{getLabel(111, "全部推送")},
+ this.setState({ showadvance: !showadvance })}
+ onSearch={() => this.setState({ isQuery: !isQuery })}/>
]
},
- { title: getLabel(111, "已推送"), key: "1", buttons: [] }
+ {
+ title: getLabel(111, "已推送"), key: "1", buttons: [
+ this.setState({ showadvance: !showadvance })}
+ onSearch={() => this.setState({ isQuery: !isQuery })}/>
+ ]
+ }
];
+ const itemRender = {
+ username: (field, textAreaProps, form, formParams) => {
+ return ( this.forceUpdate()}/>);
+ }
+ };
return (} iconBgcolor="#F14A2D"
onChange={v => this.setState({
- selectedKey: v,
+ selectedKey: v, showadvance: false,
queryParams: { ...queryParams, name: "", salarySobId: "" }
})}
buttons={_.find(tabs, o => selectedKey === o.key).buttons}>
+
+
+
+
+
+
+
+
{getLabel(111, "薪资所属月")}:
{baseInfo.salaryMonth}
this.setState({ selectedRowKeys: v })}/>
);
}
}
export default Index;
+
+const AdvanceWithInput = (props) => {
+ const { onShowOrHide, onSearch } = props;
+ return (
+
+ form.updateFields({ username: v || "" })}
+ onSearch={onSearch}/>
+
+
+
+ );
+};
diff --git a/pc4mobx/hrmSalary/pages/custom-pages/liante/cbsDetail/pushedDetailList.js b/pc4mobx/hrmSalary/pages/custom-pages/liante/cbsDetail/pushedDetailList.js
index f29ca6f1..b5276add 100644
--- a/pc4mobx/hrmSalary/pages/custom-pages/liante/cbsDetail/pushedDetailList.js
+++ b/pc4mobx/hrmSalary/pages/custom-pages/liante/cbsDetail/pushedDetailList.js
@@ -32,14 +32,16 @@ class PushedDetailList extends Component {
columns: [], dataSource: [], pageInfo: { current: 1, pageSize: 10, total: 0 }
}, () => this.getPushCBSInfoList(nextProps));
}
- if (nextProps.isQuery !== this.props.isQuery) this.getPushCBSInfoList(nextProps);
+ if (nextProps.isQuery !== this.props.isQuery) this.setState({
+ pageInfo: { current: 1, pageSize: 10, total: 0 }
+ }, () => this.getPushCBSInfoList(nextProps));
}
getPushCBSInfoList = (props) => {
const { pageInfo } = this.state, {
- selectedKey: pushStatus, params
+ selectedKey: pushStatus, params, form
} = props || this.props, { salaryCbsId } = params;
- const payload = { ...pageInfo, pushStatus, salaryCbsId };
+ const payload = { ...pageInfo, ...form.getFormParams(), pushStatus, salaryCbsId };
this.setState({ loading: true });
API.getPushCBSInfoList(payload).then(({ status, data }) => {
this.setState({ loading: false });
diff --git a/pc4mobx/hrmSalary/pages/custom-pages/liante/cbsList/index.less b/pc4mobx/hrmSalary/pages/custom-pages/liante/cbsList/index.less
index 6308d7a9..44c3fb6c 100644
--- a/pc4mobx/hrmSalary/pages/custom-pages/liante/cbsList/index.less
+++ b/pc4mobx/hrmSalary/pages/custom-pages/liante/cbsList/index.less
@@ -9,11 +9,47 @@
}
}
+.push-advanceSearch {
+ .push-advanceBtn {
+ top: 0;
+ left: -1px;
+ height: 28px;
+ line-height: 1;
+ border-radius: 0;
+ position: relative;
+ color: #474747;
+ padding: 4px 15px;
+ }
+
+ .push-advanceBtn:hover {
+ border: 1px solid #dadada;
+ color: #474747;
+ }
+}
+
.pushCBSDetailWrapper {
.wea-new-top-req-title > div:last-child {
right: 16px !important;
}
+ .advance-search-pannel {
+ display: none;
+ background: #FFF;
+ margin: 8px 16px;
+
+ .push-advanceSearch-buttons {
+ border-top: 1px solid #dadada;
+ padding: 15px 0;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ }
+ }
+
+ .advance-search-pannel-show {
+ display: block;
+ }
+
.baseInfo-ant-row {
margin: 8px 16px;
padding: 16px 8px;
diff --git a/pc4mobx/hrmSalary/pages/custom-pages/liante/conditions.js b/pc4mobx/hrmSalary/pages/custom-pages/liante/conditions.js
new file mode 100644
index 00000000..d1ac3e4e
--- /dev/null
+++ b/pc4mobx/hrmSalary/pages/custom-pages/liante/conditions.js
@@ -0,0 +1,25 @@
+export const conditions = [
+ {
+ items: [
+ {
+ conditionType: "INPUT",
+ domkey: ["username"],
+ fieldcol: 14,
+ label: "姓名",
+ labelcol: 6,
+ value: "",
+ viewAttr: 2
+ },
+ {
+ conditionType: "INPUT",
+ domkey: ["gzkkhh"],
+ fieldcol: 14,
+ label: "工资卡开户行",
+ labelcol: 6,
+ value: "",
+ viewAttr: 2
+ }
+ ],
+ defaultshow: true
+ }
+];