Merge branch 'feature/2.15.2.2411.01业务线' into feature/2.15.2.2411.01业务线-数据推送
This commit is contained in:
commit
9ebba96698
|
|
@ -1,27 +1,28 @@
|
|||
import React, { Component } from "react";
|
||||
import { WeaCheckbox, WeaFormItem, WeaSearchGroup } from "ecCom";
|
||||
import { WeaCheckbox, WeaFormItem, WeaLocaleProvider, WeaSearchGroup } from "ecCom";
|
||||
import { observer } from "mobx-react";
|
||||
import { WeaSwitch } from "comsMobx";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
@observer
|
||||
export default class FormInfo extends Component {
|
||||
renderForm = () => {
|
||||
const {
|
||||
formFields, form, colCount, itemRender, onSelectedChangeHandle,
|
||||
showLabel, multiColumn, custLabelCol, childrenComponents
|
||||
formFields, form, colCount, itemRender, onSelectedChangeHandle, showLabel, multiColumn, custLabelCol,
|
||||
childrenComponents
|
||||
} = this.props;
|
||||
|
||||
let groupArr = [];
|
||||
const formParams = form.getFormParams();
|
||||
const labelVisible = showLabel == null || showLabel == true;
|
||||
const col = colCount ? colCount : 1;
|
||||
const labelCol = labelVisible ? (custLabelCol || `${window.HrmEngineLabelCol}`) : 0;
|
||||
const labelCol = labelVisible ? (custLabelCol || 6) : 0;
|
||||
const itemProps = {
|
||||
ratio1to2: labelVisible && custLabelCol == null,
|
||||
// ratio1to2: labelVisible && custLabelCol == null,
|
||||
style: { marginLeft: 0 },
|
||||
tipPosition: "bottom",
|
||||
labelCol: { span: labelCol },
|
||||
wrapperCol: { span: 24 - labelCol }
|
||||
wrapperCol: { span: 22 - labelCol }
|
||||
};
|
||||
const textAreaProps = { minRows: 4, maxRows: 4 };
|
||||
|
||||
|
|
@ -30,7 +31,7 @@ export default class FormInfo extends Component {
|
|||
fields.items.map((field, j) => {
|
||||
const customerRender = itemRender != null ? itemRender[field.domkey[0]] : null;
|
||||
const showCheckbox = field.checkbox || false;
|
||||
let label = field.label;
|
||||
let label = getLabel(field.lanId, field.label);
|
||||
if (showCheckbox)
|
||||
label = <WeaCheckbox content={label} value={field.checkboxValue} onChange={(v) => {
|
||||
field.checkboxValue = v === "1";
|
||||
|
|
@ -38,13 +39,17 @@ export default class FormInfo extends Component {
|
|||
}}/>;
|
||||
let coms;
|
||||
if (customerRender == null) {
|
||||
coms = <WeaSwitch fieldConfig={{ ...field, ...textAreaProps, hasBorder: field.viewAttr === 1 }} form={form}
|
||||
formParams={formParams}/>;
|
||||
coms = <WeaSwitch fieldConfig={{
|
||||
...field, helpfulTip: getLabel(field.helpfulTipLanId || "", field.helpfulTip || ""), ...textAreaProps,
|
||||
hasBorder: false
|
||||
}} form={form} formParams={formParams}/>;
|
||||
} else {
|
||||
coms = customerRender(field, textAreaProps, form, formParams);
|
||||
coms = customerRender({
|
||||
...field, helpfulTip: getLabel(field.helpfulTipLanId || "", field.helpfulTip || "")
|
||||
}, textAreaProps, form, formParams);
|
||||
}
|
||||
Object.assign(itemProps, { label, error: form.getError(field) });
|
||||
let col = 1;
|
||||
let col = colCount ? colCount : 1;
|
||||
if (multiColumn != null) {//检查有哪些字段需要一行显示多个
|
||||
const idx = _.findIndex(multiColumn, item => item.key === field.domkey[0]);
|
||||
if (idx > -1) {
|
||||
|
|
@ -61,7 +66,6 @@ export default class FormInfo extends Component {
|
|||
});
|
||||
}
|
||||
}
|
||||
|
||||
coms != null && formItems.push({
|
||||
com: (<WeaFormItem {...itemProps}>{coms}</WeaFormItem>),
|
||||
col
|
||||
|
|
@ -85,12 +89,10 @@ export default class FormInfo extends Component {
|
|||
};
|
||||
|
||||
render() {
|
||||
const { formFields, className } = this.props;
|
||||
if (formFields == null) return (<div></div>);
|
||||
const { formFields, className, form } = this.props;
|
||||
if (formFields == null || !form.isFormInit) return (<div></div>);
|
||||
return (
|
||||
<div className={className}>
|
||||
{this.renderForm()}
|
||||
</div>
|
||||
<div className={className}>{this.renderForm()}</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ class PersonalScopeModal extends Component {
|
|||
if (!_.isEmpty(nextProps.record)) {
|
||||
this.setState({
|
||||
targetType: nextProps.record.targetType,
|
||||
targetTypeIds: String(nextProps.record.targetId),
|
||||
targetTypeIds: nextProps.record.targetType !== "SQL" ? String(nextProps.record.targetId) : nextProps.record.target,
|
||||
targetTypeIdsNames: nextProps.record.targetName,
|
||||
status: nextProps.record.status,
|
||||
statusAll: ""
|
||||
|
|
|
|||
|
|
@ -18,8 +18,10 @@ CodeMirror.extendMode("javascript", {
|
|||
if (this.jsonMode) {
|
||||
return /^[\[,{]$/.test(content) || /^}/.test(textAfter) || /^]/.test(textAfter);
|
||||
} else {
|
||||
if (content == ";" && state.lexical && state.lexical.type == ")") return false;
|
||||
return /^[;{}]$/.test(content) && !/^;/.test(textAfter);
|
||||
if (content == ";" && state.lexical && state.lexical.type == "}") return false;
|
||||
// if (content == ";" && state.lexical && state.lexical.type == ")") return false;
|
||||
return /[=,]/.test(content) || /.*\)/.test(textAfter);
|
||||
// return /^[;{}]$/.test(content) && !/^;/.test(textAfter);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
@ -94,7 +96,8 @@ CodeMirror.defineExtension("autoFormatRange", function (from, to) {
|
|||
atSol = false;
|
||||
}
|
||||
if (!atSol && inner.mode.newlineAfterToken &&
|
||||
inner.mode.newlineAfterToken(style, cur, stream.string.slice(stream.pos) || text[i + 1] || "", inner.state))
|
||||
// inner.mode.newlineAfterToken(style, cur, stream.string.slice(stream.pos) || text[i + 1] || "", inner.state))
|
||||
inner.mode.newlineAfterToken(style, cur, stream.string.slice(stream.pos, stream.pos + 2) || text[i + 1] || "", inner.state))
|
||||
newline();
|
||||
}
|
||||
if (!stream.pos && outer.blankLine) outer.blankLine(state);
|
||||
|
|
|
|||
|
|
@ -82,6 +82,8 @@
|
|||
}
|
||||
|
||||
.data-detail {
|
||||
padding-bottom: 16px;
|
||||
|
||||
.salary-group {
|
||||
background: #FFF;
|
||||
|
||||
|
|
|
|||
|
|
@ -318,7 +318,7 @@ class LedgerSalaryItem extends Component {
|
|||
items: [...it.items, {
|
||||
...extraItems,
|
||||
salaryItemGroupId: moveToItemId,
|
||||
key: moveId,
|
||||
key: moveId ? moveId : items.key,
|
||||
sortedIndex: !_.isEmpty(it.items) ? it.items[it.items.length - 1].sortedIndex + 1 : 0
|
||||
}]
|
||||
};
|
||||
|
|
|
|||
|
|
@ -128,8 +128,10 @@ class LedgerSalaryItemTable extends Component {
|
|||
formulaContent, formulaId, name,
|
||||
hideDefault: _.isNil(hideDefault) ? "0" : hideDefault,
|
||||
valueType, roundingMode, pattern,
|
||||
originFormulaContent, originSqlContent,
|
||||
useInEmployeeSalary: !_.isNil(useInEmployeeSalary) ? useInEmployeeSalary : "0"
|
||||
useInEmployeeSalary: !_.isNil(useInEmployeeSalary) ? useInEmployeeSalary : "0",
|
||||
//不能改成其他空值
|
||||
originFormulaContent: _.isNil(originFormulaContent) ? formulaContent : originFormulaContent,
|
||||
originSqlContent: _.isNil(originSqlContent) ? formulaContent : originSqlContent
|
||||
},
|
||||
record,
|
||||
userStatusList: _.map(userStatusList, it => ({ key: it.value.toString(), showname: it.defaultLabel }))
|
||||
|
|
@ -288,7 +290,9 @@ class LedgerSalaryItemTable extends Component {
|
|||
width: 80,
|
||||
render: (text, record) => <WeaCheckbox
|
||||
value={text ? String(text) : !text ? "0" : "1"}
|
||||
onChange={value => this.handleChangeItem(value, record.id || record.key)}
|
||||
onChange={value => {
|
||||
this.handleChangeItem(value, record.id || record.key);
|
||||
}}
|
||||
/>
|
||||
},
|
||||
{
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ export const payrollTempNormalSetForm = (form, condition, background, onChange =
|
|||
/>
|
||||
}
|
||||
{
|
||||
getKey(fields) === "theme" && c.viewAttr === 3 &&
|
||||
getKey(fields) === "theme" && fields.viewAttr === 3 &&
|
||||
<div className="sft-variables">
|
||||
<span className="sftv-tip">{getLabel(500143, "插入变量")}:</span>
|
||||
<a className="sftv-item"
|
||||
|
|
|
|||
|
|
@ -78,14 +78,12 @@ class SyncToSalaryAccountSetDialog extends Component {
|
|||
const { conditions } = this.state;
|
||||
return (
|
||||
<WeaDialog
|
||||
{...this.props} className="salarySetDialog" initLoadCss
|
||||
style={{ width: 480 }} title={getLabel(111, "请选择薪资账套")}
|
||||
{...this.props} className="salarySetDialog" initLoadCss title={getLabel(111, "请选择薪资账套")}
|
||||
style={{ width: 480, height: _.reduce(conditions, (pre, cur) => (pre += cur.items.length), 0) * 47 + 33 }}
|
||||
buttons={[<Button type="primary" onClick={this.save}
|
||||
loading={this.state.loading}>{getLabel(537558, "确定")}</Button>]}
|
||||
>
|
||||
<div className="salarySetDialogContent">
|
||||
{getSearchs(salarySetform, conditions, 1)}
|
||||
</div>
|
||||
<div className="salarySetDialogContent"> {getSearchs(salarySetform, conditions, 1, false)} </div>
|
||||
</WeaDialog>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,12 +4,16 @@
|
|||
height: 100%;
|
||||
background: #f6f6f6;
|
||||
|
||||
.wea-tab {
|
||||
border-bottom: none !important;
|
||||
}
|
||||
|
||||
.wea-new-top-req-wapper .wea-new-top-req {
|
||||
z-index: 0 !important;
|
||||
}
|
||||
|
||||
.wea-search-tab, .wea-input-focus {
|
||||
background: #f6f6f6;
|
||||
background: #f1f1f1;
|
||||
}
|
||||
|
||||
.normalWapper {
|
||||
|
|
|
|||
Loading…
Reference in New Issue