Merge branch 'release/2.17.1.2411.01' into release/2.17.1.2411.01-个税
This commit is contained in:
commit
64b6a23310
|
|
@ -46,29 +46,20 @@ class Index extends Component {
|
|||
...item, items: _.map(item.items, o => {
|
||||
if (getKey(o) === "taxAgentIds") {
|
||||
return {
|
||||
...o,
|
||||
viewAttr: !_.isEmpty(detail) ? 1 : 3,
|
||||
label: getLabel(o.lanId, o.label),
|
||||
...o, viewAttr: !_.isEmpty(detail) ? 1 : 3, label: getLabel(o.lanId, o.label),
|
||||
value: detail[getKey(o)] || "",
|
||||
options: _.map(taxAgentOption, (o, i) => ({ key: o.id, showname: o.content }))
|
||||
};
|
||||
}
|
||||
return {
|
||||
...o,
|
||||
viewAttr: !_.isEmpty(detail) ? 1 : 3,
|
||||
label: getLabel(o.lanId, o.label),
|
||||
...o, viewAttr: !_.isEmpty(detail) ? 1 : 3, label: getLabel(o.lanId, o.label),
|
||||
value: detail[getKey(o)] || ""
|
||||
};
|
||||
})
|
||||
})), {
|
||||
items: _.map(data, o => ({
|
||||
conditionType: "INPUT",
|
||||
domkey: [String(o.id)],
|
||||
fieldcol: 14,
|
||||
label: o.name,
|
||||
labelcol: 6,
|
||||
value: detail[`${String(o.id)}_variableItem`] || "",
|
||||
viewAttr: 2
|
||||
conditionType: "INPUT", domkey: [String(o.id)], fieldcol: 14, label: o.name, labelcol: 6,
|
||||
value: detail[`${String(o.id)}_variableItem`] || "", viewAttr: 2, dataType: o.dataType
|
||||
})), title: "", col: 2, defaultshow: true
|
||||
}]
|
||||
}, () => {
|
||||
|
|
@ -76,8 +67,7 @@ class Index extends Component {
|
|||
if (!_.isEmpty(detail)) {
|
||||
VSSalaryFileForm.updateFields({
|
||||
employeeId: {
|
||||
value: detail["employeeId"],
|
||||
valueSpan: detail["username"],
|
||||
value: detail["employeeId"], valueSpan: detail["username"],
|
||||
valueObj: [{ id: detail["employeeId"], name: detail["username"] }]
|
||||
}
|
||||
});
|
||||
|
|
@ -128,6 +118,19 @@ class Index extends Component {
|
|||
</div>
|
||||
</div>;
|
||||
};
|
||||
handleChange = (formVal) => {
|
||||
const key = _.keys(formVal)[0], value = formVal[key].value;
|
||||
const [__, fields] = this.state.conditions, { items } = fields;
|
||||
_.forEach(items, o => {
|
||||
if (getKey(o) === key && o.dataType === "number") {
|
||||
if (_.isNaN(Number(value))) {
|
||||
const { baseTableStore: { VSSalaryFileForm } } = this.props;
|
||||
message.warning(getLabel(111, "数值类型有误!"));
|
||||
VSSalaryFileForm.updateFields({ [getKey(o)]: { value: "" } });
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
render() {
|
||||
const { conditions } = this.state;
|
||||
|
|
@ -135,7 +138,8 @@ class Index extends Component {
|
|||
return (<WeaSlideModal
|
||||
className="variable_salary_file_dialog" {...this.props} direction="right" onClose={() => onClose()}
|
||||
top={0} width={800} height={100} measureT="%" measureX="px" measureY="%" title={this.renderTitle()}
|
||||
content={<div className="form-dialog-layout">{getSearchs(VSSalaryFileForm, conditions, 2, false)}</div>}
|
||||
content={<div
|
||||
className="form-dialog-layout">{getSearchs(VSSalaryFileForm, conditions, 2, false, this.handleChange)}</div>}
|
||||
/>);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -43,12 +43,7 @@ export const getSearchs = (form, condition, col, isCenter, onChange = () => void
|
|||
tipPosition="bottom" // 错误提示的显示位置: top/bottom
|
||||
className={(fields.domkey[0] === "subcompanyName" || fields.domkey[0] === "departmentName") ? "hideFormItem" : classnames}
|
||||
>
|
||||
<WeaSwitch
|
||||
fieldConfig={fields}
|
||||
form={form}
|
||||
formParams={formParams}
|
||||
onChange={onChange}
|
||||
/>
|
||||
<WeaSwitch fieldConfig={fields} form={form} formParams={formParams} onChange={onChange}/>
|
||||
{
|
||||
fields.helpfulTitle &&
|
||||
<WeaHelpfulTip title={fields.helpfulTitle} style={{ position: "absolute", right: "-20px", top: "25%" }}/>
|
||||
|
|
|
|||
Loading…
Reference in New Issue