diff --git a/pc4mobx/hrmSalary/apis/standingBook.js b/pc4mobx/hrmSalary/apis/standingBook.js index 7e9bd0f7..2cdf3063 100644 --- a/pc4mobx/hrmSalary/apis/standingBook.js +++ b/pc4mobx/hrmSalary/apis/standingBook.js @@ -158,3 +158,15 @@ export const querySupplementaryForm = (params) => { params ); }; + +// 核算详情页核算 +export const commonAccount = (params) => { + return fetch("/api/bs/hrmsalary/siaccount/commonAccount", { + method: "post", + mode: "cors", + headers: { + "Content-Type": "application/json", + }, + body: JSON.stringify(params), + }).then((res) => res.json()); +}; diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBook/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBook/index.js index c588c522..c859393c 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBook/index.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBook/index.js @@ -103,6 +103,7 @@ export default class StandingBook extends React.Component { this.handleOperate({ key, billMonth }) }> 归档 + 异常详情 删除 {/* 操作日志 */} diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/abnormalList.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/abnormalList.js index 196cdeee..8928998d 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/abnormalList.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/abnormalList.js @@ -7,7 +7,7 @@ import React, { Component } from "react"; import { Icon, Tooltip, Button, Spin } from "antd"; import { inject, observer } from "mobx-react"; -import { WeaBrowser, WeaTable } from "ecCom"; +import { WeaBrowser, WeaTable, WeaInputSearch } from "ecCom"; import "./index.less"; @inject("standingBookStore") @@ -18,6 +18,7 @@ export default class AbnormalListIndex extends Component { this.state = { selectedRowKeys: [], current: 1, + searchValue: "", tableData: { list: [], columns: [], @@ -43,6 +44,12 @@ export default class AbnormalListIndex extends Component { }); }); }; + + handleSearch(value) { + const { billMonth } = this.props; + const { current } = this.state; + this.getChangeList({ billMonth, current, userName: value }); + } render() { const { remarks, billMonth, selectedKey } = this.props; const { selectedRowKeys } = this.state; @@ -78,15 +85,7 @@ export default class AbnormalListIndex extends Component {
- - console.log("多人力", ids, names, datas) - } - isSingle={false} - /> + {this.setState({searchValue: value})}} onSearch={(value) => {this.handleSearch(value)}}/>
{/* table */}
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/index.less b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/index.less index 0f6cecc5..0cf8e6be 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/index.less +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/index.less @@ -24,10 +24,17 @@ padding: 8px 20px; justify-content: flex-end; - i, - button { + i,button { cursor: pointer; - // margin-right: 10px; + margin-right: 10px; + } + + .anticon-search { + margin-right: 0px; + } + + .wea-input-focus-btn { + margin-right: 0px; } } } \ No newline at end of file diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/normal.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/normal.js index 869299a1..2ac11564 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/normal.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/normal.js @@ -97,7 +97,7 @@ export default class NormalIndex extends Component { billMonth, billMonthList: billMonthList.split(","), includes: includes.split(","), - excludes: excludes.split(","), + // excludes: excludes.split(","), projects: projects.split(","), }; siaccountSupplementarySave(payload).then(() => { @@ -261,6 +261,20 @@ export default class NormalIndex extends Component { }, }); }; + + // 核算按钮点击 + handleCommonAccountClick() { + const { remarks, billMonth, selectedKey } = this.props; + const { commonAccount } = + this.props.standingBookStore; + commonAccount({ + billMonth, includes: [] + }).then(() => { + selectedKey === "1" + ? this.getNormalList({ billMonth, current: this.state.current }) + : this.getSupplementaryList({ billMonth, current: this.state.current }); + }) + } render() { const { remarks, billMonth, selectedKey } = this.props; const { selectedRowKeys, addProps, date } = this.state; @@ -307,7 +321,7 @@ export default class NormalIndex extends Component {
)}
- {/* + - */} + {addProps.visible && ( )} - {/* + - */} - {/* {selectedKey === "1" && } */} + + {selectedKey === "1" && } {this.setState({searchValue: value})}} onSearch={(value) => {this.handleSearch(value)}}/>
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/index.js index 3364f718..c9b5ca08 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/index.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/index.js @@ -33,10 +33,10 @@ class StandingBookDetail extends Component { const billMonth = this.props.location.query.billMonth; getTabList({ billMonth }).then(({ data }) => { const { tabList, remarks, billMonth } = data; - let newTabList = tabList.filter(item => item.id != "2" && item.id != "3") + // let newTabList = tabList.filter(item => item.id != "2" && item.id != "3") this.setState({ - selectedKey: newTabList[0].id, - tabList: _.map(newTabList, it => ({ title: it.content, viewcondition: it.id })), + selectedKey: tabList[0].id, + tabList: _.map(tabList, it => ({ title: it.content, viewcondition: it.id })), remarks, billMonth }); }) diff --git a/pc4mobx/hrmSalary/stores/StandingBook.js b/pc4mobx/hrmSalary/stores/StandingBook.js index d378e2f4..d39e57e0 100644 --- a/pc4mobx/hrmSalary/stores/StandingBook.js +++ b/pc4mobx/hrmSalary/stores/StandingBook.js @@ -1,6 +1,7 @@ import { observable, action, toJS } from "mobx"; import { message } from "antd"; import { WeaForm, WeaTableNew } from "comsMobx"; +import { removePropertyCondition } from "../util/response"; import _ from "lodash"; import * as API from "../apis/standingBook"; // 引入API接口文件 @@ -294,10 +295,11 @@ export class StandingBookStore { action((res) => { if (res.status) { // 接口请求成功/失败处理 - this.condition = res.data.condition; - this.form.initFormFields(res.data.condition); // 渲染高级搜索form表单 + let condition = removePropertyCondition(res.data.condition) + this.condition = condition; + this.form.initFormFields(condition); // 渲染高级搜索form表单 } else { - message.error(res.msg || "接口调用失败!"); + message.error(res.errormsg || "接口调用失败!"); } }) ); @@ -309,10 +311,11 @@ export class StandingBookStore { action((res) => { if (res.status) { // 接口请求成功/失败处理 - this.condition = res.data.condition; - this.form.initFormFields(res.data.condition); // 渲染高级搜索form表单 + let condition = removePropertyCondition(res.data.condition) + this.condition = condition; + this.form.initFormFields(condition); // 渲染高级搜索form表单 } else { - message.error(res.msg || "接口调用失败!"); + message.error(res.errormsg || "接口调用失败!"); } }) ); @@ -331,7 +334,7 @@ export class StandingBookStore { this.tableStore.getDatas(res.datas); // table 请求数据 this.hasRight = res.hasRight; } else { - message.error(res.msg || "接口调用失败!"); + message.error(res.errormsg || "接口调用失败!"); } this.loading = false; }) @@ -346,4 +349,19 @@ export class StandingBookStore { this.getTableDatas(); this.showSearchAd = false; }; + + @action + commonAccount = (params) => { + return new Promise((resolve, reject) => { + API.commonAccount(params).then(res => { + if(res.status) { + resolve(); + } else { + message.error(res.errormsg || "接口调用失败!") + reject(); + } + }) + }) + + } } diff --git a/pc4mobx/hrmSalary/util/index.js b/pc4mobx/hrmSalary/util/index.js index f74d1172..bf81e977 100644 --- a/pc4mobx/hrmSalary/util/index.js +++ b/pc4mobx/hrmSalary/util/index.js @@ -89,9 +89,7 @@ export const getCustomSearchs = (form, condition, col, isCenter) => { export const getSearchs = (form, condition, col, isCenter) => { const { isFormInit } = form; const formParams = form.getFormParams(); - console.log("formParams: ", formParams); let group = []; - console.log("condition:", condition); isFormInit && condition && condition.map(c =>{ let items = []; c.items.map(fields => {