Skip to content
On this page

认证资料管理

业务模板

对方 ELS 账号 toElsAccount

json
{
  "groupCode": "baseForm",
  "fieldType": "remoteSelect",
  "fieldLabel": "对方ELS账号",
  "fieldName": "toElsAccount",
  "required": "1"
}
js
/**
 * @param {Object} ctx 组件实例
 * @param {String} value 当前所选值
 * @param {Array} data selectModal, remoteSelect 已选行数据 (如有)
 * @param {boolean} _isFill 填充、粘贴操作判断标识
 * @param {Object} row 表行数据 (如有)
 * @param {number} idx 表行索引值 (如有)
 * @param {Object} pageData 页面所有数据
 * @param {Object} layoutConfig 模板配置
 * @param {Object} userInfo 当前登录人信息
 * @param {(groupCode: string, fieldName: string, fn: (item: FormFieldsItem | ColumnItem) => void) => void}
 * customFormatItem 遍历模板分组配置,自定义格式化查询到的字段
 * @param {(groupCode: string, fieldName: string, flag: boolean) => void}
 * setItemRequired 自定义设置字段必填
 * @param {(groupCode: string, fieldName: string, flag: boolean) => void}
 * setItemDisabled 自定义设置字段置灰
 * @param {(groupCode: string, fieldName: string, flag: boolean) => void}
 * setItemRequiredOrDisabled 自定义设置字段必填/置灰
 * @param {() => void} topEmit 用于处理复杂绑定函数需求
 * @param {Constructor} Decimal构造函数, 适用于js小数位数精度计算
 * https://github.com/MikeMcl/decimal.js
 */
function callback(
  ctx,
  {
    value,
    data,
    _isFill,
    row,
    idx,
    pageData,
    layoutConfig,
    userInfo,
    customFormatItem,
    setItemRequired,
    setItemDisabled,
    setItemRequiredOrDisabled,
    topEmit,
    Decimal,
  },
) {
  if (!data || !data.length) {
    return;
  }
  pageData.toElsAccount = data[0].toElsAccount || "";
  pageData.supplierName = data[0].supplierName || "";
}
js
{
  modalColumns: [
    {
      field: "toElsAccount",
      fieldLabelI18nKey: "i18n_title_supplierAccount",
      title: "供应商账号",
      with: 150,
    },
    {
      field: "supplierName",
      fieldLabelI18nKey: "i18n_title_supplierName",
      title: "供应商名称",
      with: 150,
    },
    {
      field: "supplierCode",
      fieldLabelI18nKey: "i18n_title_supplierCode",
      title: "供应商编码",
      with: 150,
    },
  ],
  modalUrl: "/supplier/supplierMaster/list",
  params: {},
  handleAfter: function ({ pageData }) {
    pageData.toElsAccount = "";
    pageData.supplierName = "";
  },
}