diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBook/columns.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBook/columns.js index 7bec5243..bc9c1816 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBook/columns.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBook/columns.js @@ -47,13 +47,14 @@ export const welfareRQConditions = [ { colSpan: 1, conditionType: "SELECT", - domkey: ["paymentOrganization"], + domkey: ["taxAgents"], fieldcol: 8, label: "个税扣缴义务人", lanId: 537996, labelcol: 6, options: [], - viewAttr: 2 + viewAttr: 2, + multiple: true } ], defaultshow: true, diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBook/components/welfareRecordList.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBook/components/welfareRecordList.js index 9a2df88c..e01b1e35 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBook/components/welfareRecordList.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBook/components/welfareRecordList.js @@ -5,13 +5,17 @@ * Date: 2024/1/23 */ import React, { Component } from "react"; -import { Spin } from "antd"; +import { inject, observer } from "mobx-react"; +import { message, Modal, Spin } from "antd"; import { WeaLocaleProvider } from "ecCom"; import { getIframeParentHeight } from "../../../../util"; import * as API from "../../../../apis/standingBook"; +import { convertToUrlString } from "../../../../util/url"; const getLabel = WeaLocaleProvider.getLabel; +@inject("taxAgentStore") +@observer class WelfareRecordList extends Component { constructor(props) { super(props); @@ -35,10 +39,72 @@ class WelfareRecordList extends Component { if (type === "init") { this.getWelfareRecordList(); } else if (type === "turn") { + const module = { + billMonth: params.billMonth, + paymentOrganization: params.paymentOrganizationId + }; switch (id) { case "PAGEINFO": this.setState({ pageInfo: { ...pageInfo, ...params } }, () => this.getWelfareRecordList()); break; + case "CALC": + case "VIEW": + const payload = { + billMonth: params.billMonth, + paymentOrganization: params.paymentOrganizationId, + creator: params.creator, + type: id === "VIEW" ? "detail" : "" + }; + window.open(`/spa/hrmSalary/static/index.html#/main/hrmSalary/socialSecurityBenefits/standingBookDetail?${convertToUrlString(payload)}`); + break; + case "DELRC": + Modal.confirm({ + title: getLabel(111, "确认信息"), content: getLabel(388758, "确认要删除吗?"), + onOk: () => { + API.siaccountDelete(module).then(({ status, errormsg }) => { + if (status) { + message.success(getLabel(502230, "删除成功")); + this.getWelfareRecordList(); + } else { + message.error(errormsg); + } + }); + } + }); + break; + case "RECALC": + Modal.confirm({ + title: getLabel(111, "确认信息"), + content: getLabel(111, "重新核算后,此条台账数据将可以删除且可以进行此月份的核算,是否确认取消归档?"), + onOk: () => { + API.socialSecurityBenefitsRecalculate({ id: params.id }) + .then(({ status, errormsg }) => { + if (status) { + message.success(getLabel(30700, "操作成功!")); + this.getWelfareRecordList(); + } else { + message.error(errormsg); + } + }); + } + }); + break; + case "FILE": + Modal.confirm({ + title: getLabel(111, "确认信息"), + content: getLabel(111, "归档后,此条台账数据无法删除且不可以再进行此月份的核算,是否确认归档?"), + onOk: () => { + API.siaccountFile(module).then(({ status, errormsg }) => { + if (status) { + message.success(getLabel(30700, "操作成功!")); + this.getWelfareRecordList(); + } else { + message.error(errormsg); + } + }); + } + }); + break; default: break; } @@ -57,9 +123,9 @@ class WelfareRecordList extends Component { childFrameObj && childFrameObj.contentWindow.postMessage(JSON.stringify({ ...payload, i18n }), "*"); }; getWelfareRecordList = () => { - const { queryForm } = this.props; + const { queryForm, taxAgentStore: { showOperateBtn } } = this.props; const { pageInfo } = this.state; - const payload = { ...pageInfo, ...queryForm }; + const payload = { ...pageInfo, ...queryForm, taxAgents: queryForm.taxAgents ? queryForm.taxAgents.split(",") : [] }; this.setState({ loading: true }); API.getCommonList(payload).then(({ status, data }) => { this.setState({ loading: false }); @@ -70,7 +136,7 @@ class WelfareRecordList extends Component { pageInfo: { ...pageInfo, current, pageSize, total }, dataSource, columns }, () => this.postMessageToChild({ - scrollHeight: 100, dataSource, columns, pageInfo: this.state.pageInfo + scrollHeight: 108, dataSource, columns, pageInfo: this.state.pageInfo, showOperateBtn })); } }).catch(() => this.setState({ loading: false })); diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBook/components/welfareRecordQuery.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBook/components/welfareRecordQuery.js index cefbdeb2..8bcd6ff5 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBook/components/welfareRecordQuery.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBook/components/welfareRecordQuery.js @@ -38,7 +38,7 @@ class WelfareRecordQuery extends Component { return { ...item, items: _.map(item.items, o => { - if (getKey(o) === "paymentOrganization") { + if (getKey(o) === "taxAgents") { return { ...o, options: _.map(data, g => ({ key: g.id.toString(), showname: g.name })) }; } return o; diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBook/index.less b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBook/index.less index 6c9b0d94..bd34d5bd 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBook/index.less +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBook/index.less @@ -88,13 +88,50 @@ align-items: center; } } + + .wea-select, .ant-select, .ant-select-selection { + width: 100%; + background: #FFF; + } + + .wea-select .wea-select-input .arrow { + position: absolute; + right: 4px; + top: 8px; + color: #666; + } + + .wea-select .wdb { + word-break: break-all !important; + word-wrap: break-word !important; + } + + .wea-select .wea-select-input { + height: 30px; + white-space: nowrap; + min-width: 100px; + max-width: 345px; + width: 100%; + display: inline-block; + padding: 4px 17px 4px 4px; + position: relative; + min-height: 30px; + border: 1px solid #d9d9d9; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + -o-text-overflow: ellipsis; + text-overflow: ellipsis; + overflow: hidden; + } } } .salary-welfare-record-list { .ant-spin-nested-loading, .ant-spin-container { - height: 99%; + height: 100%; } } } diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBook/standingBook.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBook/standingBook.js index b3f6f54a..c9f542e6 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBook/standingBook.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBook/standingBook.js @@ -26,7 +26,7 @@ class StandingBook extends Component { queryForm: { startTime: moment(new Date()).subtract(1, "year").startOf("year").format("YYYY-MM"), endTime: moment(new Date()).endOf("year").format("YYYY-MM"), - paymentOrganization: "" + taxAgents: "" }, accountDialog: { visible: false, title: "", loading: false, options: [] } }; @@ -60,7 +60,9 @@ class StandingBook extends Component { iconBgcolor="#F14A2D" buttons={showOperateBtn ? rightBtns : []}>