import React from "react"; import { WeaSwitch } from "comsMobx"; import { WeaButtonIcon, WeaFormItem, WeaLocaleProvider, WeaSearchGroup, WeaTools } from "ecCom"; const getLabel = WeaLocaleProvider.getLabel; const getKey = WeaTools.getKey; export const payrollTempNormalSetForm = (form, condition, background, onChange = () => void (0), insertVar = () => void (0)) => { const { isFormInit } = form; const formParams = form.getFormParams(); const img1Props = { src: background, width: 100, height: 100 }; let group = []; isFormInit && condition && condition.map(c => { let items = []; c.items.map(fields => { items.push({ com: ( { (getKey(fields) === "background" && background) ? insertVar("background", "")}/> : } { getKey(fields) === "theme" && fields.viewAttr === 3 &&
{getLabel(500143, "插入变量")}: insertVar("theme", "${companyName}")}>{getLabel(1976, "公司名称")} insertVar("theme", "${salaryYear}")}>{getLabel(111, "薪资所属年")} insertVar("theme", "${salaryMonth}")}>{getLabel(542604, "薪资所属月")}
}
), colSpan: 1, hide: fields.hide }); }); group.push( ); }); return group; };