feature/V2-dev合并多语言

This commit is contained in:
黎永顺 2023-11-30 16:42:46 +08:00
parent b66ee38b18
commit 83f77d4e16
2 changed files with 8 additions and 4 deletions

View File

@ -91,7 +91,7 @@ export const salaryItemFields = [
type: "SWITCH",
viewAttr: 2,
tip: getLabel(544275, "提示:开启后,在薪资账套中添加该项目时,默认勾选隐藏且在核算时隐藏该薪资项目,可在具体薪资账套中设置是否隐藏"),
lanId: 544275,
lanId: 544274,
tipLanId: 543298
},
{
@ -135,7 +135,7 @@ export const salaryItemFields = [
{
key: "formulaContent",
label: getLabel(18125, "公式"),
type: "INPUT",
type: "INPUT", isLan: false,
viewAttr: 2,
tip: "", lanId: 18125
},

View File

@ -140,13 +140,17 @@ class SalaryItemForm extends Component {
<WeaSearchGroup showGroup needTigger={false}>
{
_.map(salaryItemFieldsList, item => {
const { key, label, type, viewAttr, tip, tipLanId, options, display = true, multiple = false } = item;
const {
key, label, type, viewAttr, tip, tipLanId, options,
display = true, multiple = false, isLan = true
} = item;
const value = !_.isNil(request[key]) ? request[key].toString() : "";
return <React.Fragment>
{
(type === "INPUT" && display) ?
<WeaFormItem label={label} labelCol={{ span: 6 }} wrapperCol={{ span: 12 }}>
<WeaInput viewAttr={viewAttr} value={value}
inputType={!isLan ? "normal" : "multilang"}
onClick={() => (key === "originSqlContent" || key === "originFormulaContent") && onShowFormal(request["name"])}
onChange={v => this.handleChangeSalaryFiledItems(key, v)}/></WeaFormItem> :
(type === "SWITCH" && display) ?
@ -179,7 +183,7 @@ class SalaryItemForm extends Component {
</WeaFormItem> :
(type === "TEXTAREA" && display) ?
<WeaFormItem label={label} labelCol={{ span: 6 }} wrapperCol={{ span: 12 }}>
<WeaTextarea value={value} viewAttr={viewAttr} minRows={3}
<WeaTextarea value={value} viewAttr={viewAttr} minRows={3} inputType="multilang"
onChange={v => this.handleChangeSalaryFiledItems(key, v)}/>
</WeaFormItem> :
(type === "INPUTNUMBER" && display) ?