From 036e59b91a78f7c8bdd309f97b1ae3ea62ad9b42 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, 31 Aug 2023 14:43:57 +0800 Subject: [PATCH] =?UTF-8?q?feature/2.9.42308.02-=E8=96=AA=E8=B5=84?= =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E5=90=8C=E6=AD=A5=E5=88=B0=E8=96=AA=E8=B5=84?= =?UTF-8?q?=E8=B4=A6=E5=A5=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pc4mobx/hrmSalary/pages/salaryItem/index.less | 34 ++++++++++++++++++- .../syncToSalaryAccountSetDialog.js | 18 +++++++--- 2 files changed, 47 insertions(+), 5 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/salaryItem/index.less b/pc4mobx/hrmSalary/pages/salaryItem/index.less index f02dac13..b0063821 100644 --- a/pc4mobx/hrmSalary/pages/salaryItem/index.less +++ b/pc4mobx/hrmSalary/pages/salaryItem/index.less @@ -105,8 +105,40 @@ .salarySetDialog { .salarySetDialogContent { - .wea-select, .ant-select-selection, .ant-select { + .wea-select, .ant-select, .ant-select-selection { width: 100%; } + + .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; + } } } diff --git a/pc4mobx/hrmSalary/pages/salaryItem/syncToSalaryAccountSetDialog.js b/pc4mobx/hrmSalary/pages/salaryItem/syncToSalaryAccountSetDialog.js index bcaa8852..e8ca847b 100644 --- a/pc4mobx/hrmSalary/pages/salaryItem/syncToSalaryAccountSetDialog.js +++ b/pc4mobx/hrmSalary/pages/salaryItem/syncToSalaryAccountSetDialog.js @@ -7,9 +7,9 @@ import React, { Component } from "react"; import { inject, observer } from "mobx-react"; import { WeaDialog, WeaLocaleProvider } from "ecCom"; -import { Button } from "antd"; +import { Button, message } from "antd"; import { getSearchs } from "../../util"; -import { getSalarySobBySalaryItem } from "../../apis/item"; +import { getSalarySobBySalaryItem, syncSalaryItemToSalarySobItem } from "../../apis/item"; import { salarySetConditions } from "./columns"; const getLabel = WeaLocaleProvider.getLabel; @@ -53,11 +53,21 @@ class SyncToSalaryAccountSetDialog extends Component { }; save = () => { - const { salaryItemStore: { salarySetform } } = this.props; + const { salaryItemStore: { salarySetform }, id: salaryItemId } = this.props; salarySetform.validateForm().then(f => { - console.log(salarySetform.getFormParams()); if (f.isValid) { + const { salarySobIds } = salarySetform.getFormParams(); this.setState({ loading: true }); + syncSalaryItemToSalarySobItem({ salaryItemId, salarySobIds: salarySobIds.split(",") }) + .then(({ status, errormsg }) => { + this.setState({ loading: false }); + if (status) { + message.success(getLabel(38462, "同步成功!")); + this.props.onCancel(); + } else { + message.error(errormsg || getLabel(81556, "同步失败!")); + } + }).catch(() => this.setState({ loading: false })); } else { f.showErrors(); }