Appearance
返利计算单
TIP
- 返利门槛规则 rebateRuleThresholds
- 基本返利规则 rebateRuleItems
- 追加返利规则 rebateRuleSupplements
对方 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.supplierCode = data[0].supplierCode || "";
pageData.supplierName = data[0].supplierName || "";
pageData.teamwork = data[0].needCoordination || "";
}js
{
modalColumns: [
{
field: "toElsAccount",
fieldLabelI18nKey: "i18n_title_supplierAccount",
title: "供应商账号",
with: 150,
},
{
field: "supplierName",
fieldLabelI18nKey: "i18n_massProdHead5f0c_supplierName",
title: "供应商名称",
with: 150,
},
{
field: "supplierCode",
fieldLabelI18nKey: "i18n_btn_RdXAo_8e172a78",
title: "供应商编码",
with: 150,
},
{
field: "needCoordination_dictText",
title: "供应商协同方式",
fieldLabelI18nKey: "i18n_dict_RdXMeCK_5095b760",
with: 150,
},
],
modalUrl: "/supplier/supplierMaster/list",
modalParams: {
frozenFunctionValue: "1",
},
handleAfter({ pageData }) {
pageData.toElsAccount = "";
pageData.supplierName = "";
pageData.supplierCode = "";
},
}单据状态 rebateStatus
json
{
"groupCode": "baseForm",
"fieldType": "select",
"fieldLabel": "单据状态",
"fieldName": "rebateStatus",
"dictCode": "srmCalculationSheetStatus",
"required": "0"
}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,
},
) {
// 单据状态 rebateStatus_dictText
// dictCode srmCalculationSheetStatus(0: 新建, 1: 发布中, 2: 待确认, 3: 已拒绝, 4: 已确认, 5: 已归档, 6: 已作废)
const flag = !value || value === "0";
const extraProps = [
"supplierCode", // 供应商ERP编码
"supplierName", // 供应商名称
"rebateNumber", // 返利单号
"rebateStatus", // 单据状态
"outstandingAmount", // 未收金额
"receivedAmount", // 实收金额
"rebateAmount", // 返利金额
"rebateQuantity", // 返利数量
"calculateResult_dictText", // 计算结果
"auditStatus", // 审批状态
"templateNumber", // 模板编号
"templateName", // 模板名称
"templateVersion", // 模板版本
"templateAccount", // 模板账号
];
setItemDisabled("baseForm", "***", !flag, extraProps);
}来源限制 sourceRestrictionText
json
{
"groupCode": "baseForm",
"fieldType": "selectModal",
"fieldLabel": "来源限制",
"fieldName": "sourceRestrictionText",
"required": "0"
}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.sourceRestrictionText = data
.map((res) => {
return res.supplierName;
})
.join("_");
pageData.sourceRestriction = data
.map((res) => {
return res.id;
})
.join(",");
}js
{
modalColumns: [
{
field: "toElsAccount",
title: "供应商ELS号",
width: 100,
},
{
field: "supplierCode",
title: "供应商ERP编码",
width: 150,
},
{
field: "supplierName",
title: "供应商名称",
width: 150,
},
],
// 特殊自制的字段(常规不带)
modalTypeGrid: "FormGridWith",
modalUrl: "/supplier/supplierMaster/queryPageListByCalculation",
modalParams: {
frozenFunctionValue: "1",
},
}门店限制 storeRestrictionText
json
{
"groupCode": "baseForm",
"fieldType": "selectModal",
"fieldLabel": "门店限制",
"fieldName": "storeRestrictionText",
"required": "0"
}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.storeRestrictionText = data
.map((res) => {
return res.orgAbbreviation;
})
.join("_");
pageData.storeRestriction = data
.map((res) => {
return res.id;
})
.join(",");
}js
{
modalColumns: [
{
field: "orgCode",
// fieldLabelI18nKey: 'i18n_title_supplierAccount',
title: "组织编码",
width: 100,
},
{
field: "orgName",
// fieldLabelI18nKey: 'i18n_title_supplierCode',
title: "组织名称",
width: 150,
},
{
field: "orgCategoryCode_dictText",
// fieldLabelI18nKey: 'i18n_title_supplierCode',
title: "组织类型",
width: 150,
},
{
field: "businessRegion_dictText",
// fieldLabelI18nKey: 'i18n_title_supplierName',
title: "业务组织地区",
width: 150,
},
{
field: "businessPerson",
// fieldLabelI18nKey: 'i18n_title_supplierName',
title: "业务组织负责人",
width: 150,
},
{
field: "executiveRegion_dictText",
// fieldLabelI18nKey: 'i18n_title_supplierName',
title: "行政组织地区",
width: 150,
},
{
field: "executivePerson",
// fieldLabelI18nKey: 'i18n_title_supplierName',
title: "行政组织负责人",
width: 150,
},
],
// 特殊自制的字段(常规不带)
modalTypeGrid: "FormGridWith",
modalUrl: "/org/purchaseOrganizationInfo/queryPageListByCalculation",
modalParams: {
frozenFunctionValue: "1",
},
}返利商品 rebateProductText
json
{
"groupCode": "baseForm",
"fieldType": "selectModal",
"fieldLabel": "返利商品",
"fieldName": "rebateProductText",
"required": "0"
}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.rebateProductText = data
.map((res) => {
return res.materialName;
})
.join("_");
pageData.rebateProduct = data
.map((res) => {
return res.id;
})
.join(",");
}js
{
modalColumns: [
{
field: "materialNumber",
// fieldLabelI18nKey: 'i18n_title_supplierAccount',
title: "物料编码",
width: 100,
},
{
field: "materialName",
// fieldLabelI18nKey: 'i18n_title_supplierCode',
title: "物料名称",
width: 150,
},
{
field: "materialSpec",
// fieldLabelI18nKey: 'i18n_title_supplierName',
title: "物料规格",
width: 150,
},
{
field: "cateLevelCode",
title: "物料分类级别编码",
//fieldLabelI18nKey: 'i18n_dict_RdXMeCK_5095b760',
width: 150,
},
{
field: "cateName",
title: "物料分类名称",
// fieldLabelI18nKey: 'i18n_dict_RdXMeCK_5095b760',
width: 150,
},
{
field: "materialDesc",
title: "物料描述",
//fieldLabelI18nKey: 'i18n_dict_RdXMeCK_5095b760',
width: 150,
},
{
field: "MaterialGroup",
title: "物料组",
// fieldLabelI18nKey: 'i18n_dict_RdXMeCK_5095b760',
width: 150,
},
{
field: "brand",
title: "物料品牌",
fieldLabelI18nKey: "i18n_dict_RdXMeCK_5095b760",
width: 150,
},
],
// 特殊自制的字段(常规不带)
modalTypeGrid: "FormGridWith",
modalUrl: "/material/purchaseMaterialHead/queryPageListByCalculation",
modalParams: {
frozenFunctionValue: "1",
},
afterClearCallBack(Vue) {
Vue.group.formModel.rebateProductText = "";
Vue.group.formModel.rebateProduct = "";
},
}结算方名称 receiverName
json
{
"groupCode": "baseForm",
"fieldType": "remoteSelect",
"fieldLabel": "结算方名称",
"fieldName": "receiverName",
"required": "0"
}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.receiverName = data[0].supplierName || "";
if (pageData.elsAccount == pageData.elsAccount) {
layoutConfig.groups[0].formFields.forEach((item) => {
if (item.fieldName == "receiverName") {
item.required = "1";
}
});
}
}js
{
modalColumns: [
{
field: "toElsAccount",
fieldLabelI18nKey: "i18n_title_supplierAccount",
title: "供应商账号",
with: 150,
},
{
field: "supplierCode",
fieldLabelI18nKey: "i18n_btn_RdXAo_8e172a78",
title: "供应商编码",
with: 150,
},
{
field: "supplierName",
fieldLabelI18nKey: "i18n_massProdHead5f0c_supplierName",
title: "供应商名称",
with: 150,
},
{
field: "needCoordination_dictText",
title: "供应商协同方式",
fieldLabelI18nKey: "i18n_dict_RdXMeCK_5095b760",
with: 150,
},
],
modalUrl: "/supplier/supplierMaster/list",
modalParams: {
frozenFunctionValue: "1",
},
}采购负责人 purchasePrincipal
json
{
"groupCode": "baseForm",
"fieldType": "remoteSelect",
"fieldLabel": "采购负责人",
"fieldName": "purchasePrincipal",
"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;
}
const { subAccount = "", realname = "" } = data[0];
pageData.purchasePrincipal = `${subAccount}_${realname}`;
}js
{
modalColumns: [
{
field: "subAccount",
title: "子账号",
fieldLabelI18nKey: "i18n_field_subAccount",
with: 150,
},
{
field: "realname",
title: "名字",
fieldLabelI18nKey: "i18n_field_RJ_a88ea",
with: 150,
},
],
modalUrl: "/account/elsSubAccount/page",
selectModal: "single",
params: {
frozenFunctionValue: "1",
},
mobileModalParams: {
frozenFunctionValue: "1",
},
handleAfter: ({ pageData }) => {
pageData.purchasePrincipal = "";
},
}销售负责人 salePrincipal
json
{
"groupCode": "baseForm",
"fieldType": "remoteSelect",
"fieldLabel": "销售负责人",
"fieldName": "salePrincipal",
"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;
}
const { subAccount = "", realname = "" } = data[0];
pageData.salePrincipal = `${subAccount}_${realname}`;
}js
{
modalColumns: [
{
field: "subAccount",
title: "账号",
fieldLabelI18nKey: "i18n_field_subAccount",
width: 150,
},
{
field: "realname",
title: "名称",
fieldLabelI18nKey: "i18n_field_RJ_a88ea",
width: 150,
},
{
field: "phone",
title: "联系电话",
fieldLabelI18nKey: "i18n_field_contactNumber",
width: 150,
},
],
modalUrl: "/account/elsSubAccount/getByElsAccount",
params({ pageData }) {
return {
participants: "sale",
toElsAccount: pageData.toElsAccount,
frozenFunctionValue: "1",
};
},
modalParams(Vue, form, row) {
return {
participants: "sale",
toElsAccount: form.toElsAccount,
frozenFunctionValue: "1",
};
},
mobileModalParams(Vue, { _pageData, _cacheAllData }) {
return {
participants: "sale",
toElsAccount: _cacheAllData.toElsAccount,
frozenFunctionValue: "1",
};
},
handleAfter: ({ pageData }) => {
pageData.salePrincipal = "";
},
}返利商品 rebateProductText 🎉
json
{
"groupCode": "rebateCalculationSheetRuleDetails",
"fieldType": "selectModal",
"title": "返利商品",
"field": "rebateProductText",
"required": "0"
}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;
}
row.rebateProductText = data
.map((res) => {
return res.id;
})
.join(",");
row.rebateProduct = data
.map((res) => {
return res.materialName;
})
.join("_");
}js
{
modalColumns: [
{
field: "materialNumber",
// fieldLabelI18nKey: 'i18n_title_supplierAccount',
title: "物料编码",
width: 100,
},
{
field: "materialName",
// fieldLabelI18nKey: 'i18n_title_supplierCode',
title: "物料名称",
width: 150,
},
{
field: "materialSpec",
// fieldLabelI18nKey: 'i18n_title_supplierName',
title: "物料规格",
width: 150,
},
{
field: "cateLevelCode",
title: "物料分类级别编码",
//fieldLabelI18nKey: 'i18n_dict_RdXMeCK_5095b760',
width: 150,
},
{
field: "cateName",
title: "物料分类名称",
// fieldLabelI18nKey: 'i18n_dict_RdXMeCK_5095b760',
width: 150,
},
{
field: "materialDesc",
title: "物料描述",
//fieldLabelI18nKey: 'i18n_dict_RdXMeCK_5095b760',
width: 150,
},
{
field: "MaterialGroup",
title: "物料组",
// fieldLabelI18nKey: 'i18n_dict_RdXMeCK_5095b760',
width: 150,
},
{
field: "brand",
title: "物料品牌",
fieldLabelI18nKey: "i18n_dict_RdXMeCK_5095b760",
width: 150,
},
],
// 特殊自制的字段(常规不带)
modalTypeGrid: "FormGridWith",
modalUrl: "/material/purchaseMaterialHead/queryPageListByCalculation",
modalParams: {
frozenFunctionValue: "1",
},
}来源限制 sourceRestrictionText 🎉
json
{
"groupCode": "rebateCalculationSheetRuleDetails",
"fieldType": "selectModal",
"title": "来源限制",
"field": "sourceRestrictionText",
"required": "0"
}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;
}
row.sourceRestrictionText = data
.map((res) => {
return res.id;
})
.join(",");
row.sourceRestriction = data
.map((res) => {
return res.supplierName;
})
.join("_");
}js
{
modalColumns: [
{
field: "toElsAccount",
// fieldLabelI18nKey: 'i18n_title_supplierAccount',
title: "供应商ELS号",
width: 100,
},
{
field: "supplierCode",
// fieldLabelI18nKey: 'i18n_title_supplierCode',
title: "供应商ERP编码",
width: 150,
},
{
field: "supplierName",
// fieldLabelI18nKey: 'i18n_title_supplierName',
title: "供应商名称",
width: 150,
},
],
// 特殊自制的字段(常规不带)
modalTypeGrid: "FormGridWith",
modalUrl: "/supplier/supplierMaster/queryPageListByCalculation",
modalParams: {
frozenFunctionValue: "1",
},
}门店限制 storeRestrictionText 🎉
json
{
"groupCode": "rebateCalculationSheetRuleDetails",
"fieldType": "selectModal",
"title": "门店限制",
"field": "storeRestrictionText",
"required": "0"
}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;
}
row.storeRestrictionText = data
.map((res) => {
return res.id;
})
.join(",");
row.storeRestriction = data
.map((res) => {
return res.orgName;
})
.join("_");
}js
{
modalColumns: [
{
field: "orgCode",
// fieldLabelI18nKey: 'i18n_title_supplierAccount',
title: "组织编码",
width: 100,
},
{
field: "orgName",
// fieldLabelI18nKey: 'i18n_title_supplierCode',
title: "组织名称",
width: 150,
},
{
field: "orgCategoryCode_dictText",
// fieldLabelI18nKey: 'i18n_title_supplierCode',
title: "组织类型",
width: 150,
},
{
field: "businessRegion_dictText",
// fieldLabelI18nKey: 'i18n_title_supplierName',
title: "业务组织地区",
width: 150,
},
{
field: "businessPerson",
// fieldLabelI18nKey: 'i18n_title_supplierName',
title: "业务组织负责人",
width: 150,
},
{
field: "executiveRegion_dictText",
// fieldLabelI18nKey: 'i18n_title_supplierName',
title: "行政组织地区",
width: 150,
},
{
field: "executivePerson",
// fieldLabelI18nKey: 'i18n_title_supplierName',
title: "行政组织负责人",
width: 150,
},
],
// 特殊自制的字段(常规不带)
modalTypeGrid: "FormGridWith",
modalUrl: "/org/purchaseOrganizationInfo/queryPageListByCalculation",
modalParams: {
frozenFunctionValue: "1",
},
}来源限制 sourceRestrictionText 🎉
json
{
"groupCode": "rebateRuleItems",
"fieldType": "selectModal",
"title": "来源限制",
"field": "sourceRestrictionText",
"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;
}
row.sourceRestriction = data
.map((res) => {
return res.id;
})
.join(",");
row.sourceRestrictionText = data
.map((res) => {
return res.supplierName;
})
.join("_");
}js
{
modalColumns: [
{
field: "toElsAccount",
// fieldLabelI18nKey: 'i18n_title_supplierAccount',
title: "供应商ELS号",
width: 100,
},
{
field: "supplierCode",
// fieldLabelI18nKey: 'i18n_title_supplierCode',
title: "供应商ERP编码",
width: 150,
},
{
field: "supplierName",
// fieldLabelI18nKey: 'i18n_title_supplierName',
title: "供应商名称",
width: 150,
},
],
// 特殊自制的字段(常规不带)
modalTypeGrid: "FormGridWith",
modalUrl: "/supplier/supplierMaster/queryPageListByCalculation",
params: {
frozenFunctionValue: "1",
},
modalParams: {
frozenFunctionValue: "1",
},
handleAfter({ pageData, row }) {
row.sourceRestriction = "";
row.sourceRestrictionText = "";
},
afterRowClearCallBack: function (Vue, row) {
row.sourceRestriction = "";
row.sourceRestrictionText = "";
},
}门店限制 storeRestrictionText 🎉
json
{
"groupCode": "rebateRuleItems",
"fieldType": "selectModal",
"title": "门店限制",
"field": "storeRestrictionText",
"required": "0"
}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;
}
row.storeRestriction = data
.map((res) => {
return res.id;
})
.join(",");
row.storeRestrictionText = data
.map((res) => {
return res.orgName;
})
.join("_");
}js
{
modalColumns: [
{
field: "orgCode",
// fieldLabelI18nKey: 'i18n_title_supplierAccount',
title: "组织编码",
width: 100,
},
{
field: "orgName",
// fieldLabelI18nKey: 'i18n_title_supplierCode',
title: "组织名称",
width: 150,
},
{
field: "orgCategoryCode_dictText",
// fieldLabelI18nKey: 'i18n_title_supplierCode',
title: "组织类型",
width: 150,
},
{
field: "businessRegion_dictText",
// fieldLabelI18nKey: 'i18n_title_supplierName',
title: "业务组织地区",
width: 150,
},
{
field: "businessPerson",
// fieldLabelI18nKey: 'i18n_title_supplierName',
title: "业务组织负责人",
width: 150,
},
{
field: "executiveRegion_dictText",
// fieldLabelI18nKey: 'i18n_title_supplierName',
title: "行政组织地区",
width: 150,
},
{
field: "executivePerson",
// fieldLabelI18nKey: 'i18n_title_supplierName',
title: "行政组织负责人",
width: 150,
},
],
// 特殊自制的字段(常规不带)
modalTypeGrid: "FormGridWith",
modalUrl: "/org/purchaseOrganizationInfo/queryPageListByCalculation",
params: {
frozenFunctionValue: "1",
},
handleAfter({ pageData, row }) {
row.storeRestriction = "";
row.storeRestrictionText = "";
},
modalParams: {
frozenFunctionValue: "1",
},
afterRowClearCallBack: function (Vue, row) {
row.storeRestriction = "";
row.storeRestrictionText = "";
},
}门槛商品 rebateProductText 🎉
json
{
"groupCode": "rebateRuleThresholds",
"fieldType": "selectModal",
"title": "门槛商品",
"field": "rebateProductText",
"required": "0"
}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;
}
row.rebateProduct = data
.map((res) => {
return res.id;
})
.join(",");
row.rebateProductText = data
.map((res) => {
return res.materialName;
})
.join("_");
}js
{
modalColumns: [
{
field: "materialNumber",
// fieldLabelI18nKey: 'i18n_title_supplierAccount',
title: "物料编码",
width: 100,
},
{
field: "materialName",
// fieldLabelI18nKey: 'i18n_title_supplierCode',
title: "物料名称",
width: 150,
},
{
field: "materialSpec",
// fieldLabelI18nKey: 'i18n_title_supplierName',
title: "物料规格",
width: 150,
},
{
field: "cateLevelCode",
title: "物料分类级别编码",
//fieldLabelI18nKey: 'i18n_dict_RdXMeCK_5095b760',
width: 150,
},
{
field: "cateName",
title: "物料分类名称",
// fieldLabelI18nKey: 'i18n_dict_RdXMeCK_5095b760',
width: 150,
},
{
field: "materialDesc",
title: "物料描述",
//fieldLabelI18nKey: 'i18n_dict_RdXMeCK_5095b760',
width: 150,
},
{
field: "MaterialGroup",
title: "物料组",
// fieldLabelI18nKey: 'i18n_dict_RdXMeCK_5095b760',
width: 150,
},
{
field: "brand",
title: "物料品牌",
//fieldLabelI18nKey: 'i18n_dict_RdXMeCK_5095b760',
width: 150,
},
],
// 特殊自制的字段(常规不带)
modalTypeGrid: "FormGridWith",
modalUrl: "/material/purchaseMaterialHead/queryPageListByCalculation",
params: {
frozenFunctionValue: "1",
},
checkItemParams: function ({ row }) {
return {
ids: row.rebateProduct || "0",
frozenFunctionValue: "1",
};
},
showCheckItem: true,
}门槛来源限制 sourceRestrictionText 🎉
json
{
"groupCode": "rebateRuleThresholds",
"fieldType": "selectModal",
"title": "门槛来源限制",
"field": "sourceRestrictionText",
"required": "0"
}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;
}
row.sourceRestriction = data
.map((res) => {
return res.id;
})
.join(",");
row.sourceRestrictionText = data
.map((res) => {
return res.supplierName;
})
.join("_");
}js
{
modalColumns: [
{
field: "toElsAccount",
// fieldLabelI18nKey: 'i18n_title_supplierAccount',
title: "供应商ELS号",
width: 100,
},
{
field: "supplierCode",
// fieldLabelI18nKey: 'i18n_title_supplierCode',
title: "供应商ERP编码",
width: 150,
},
{
field: "supplierName",
// fieldLabelI18nKey: 'i18n_title_supplierName',
title: "供应商名称",
width: 150,
},
],
// 特殊自制的字段(常规不带)
modalTypeGrid: "FormGridWith",
modalUrl: "/supplier/supplierMaster/queryPageListByCalculation",
params: {
frozenFunctionValue: "1",
},
modalParams: {
frozenFunctionValue: "1",
},
}门槛门店限制 storeRestrictionText 🎉
json
{
"groupCode": "rebateRuleThresholds",
"fieldType": "selectModal",
"title": "门槛门店限制",
"field": "storeRestrictionText",
"required": "0"
}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;
}
row.storeRestriction = data
.map((res) => {
return res.id;
})
.join(",");
row.storeRestrictionText = data
.map((res) => {
return res.orgName;
})
.join("_");
}js
{
modalColumns: [
{
field: "orgCode",
// fieldLabelI18nKey: 'i18n_title_supplierAccount',
title: "组织编码",
width: 100,
},
{
field: "orgName",
// fieldLabelI18nKey: 'i18n_title_supplierCode',
title: "组织名称",
width: 150,
},
{
field: "orgCategoryCode_dictText",
// fieldLabelI18nKey: 'i18n_title_supplierCode',
title: "组织类型",
width: 150,
},
{
field: "businessRegion_dictText",
// fieldLabelI18nKey: 'i18n_title_supplierName',
title: "业务组织地区",
width: 150,
},
{
field: "businessPerson",
// fieldLabelI18nKey: 'i18n_title_supplierName',
title: "业务组织负责人",
width: 150,
},
{
field: "executiveRegion_dictText",
// fieldLabelI18nKey: 'i18n_title_supplierName',
title: "行政组织地区",
width: 150,
},
{
field: "executivePerson",
// fieldLabelI18nKey: 'i18n_title_supplierName',
title: "行政组织负责人",
width: 150,
},
],
// 特殊自制的字段(常规不带)
modalTypeGrid: "FormGridWith",
modalUrl: "/org/purchaseOrganizationInfo/queryPageListByCalculation",
params: {
frozenFunctionValue: "1",
},
modalParams: {
frozenFunctionValue: "1",
},
}追加来源限制 sourceRestrictionText 🎉
json
{
"groupCode": "rebateRuleSupplements",
"fieldType": "selectModal",
"title": "追加来源限制",
"field": "sourceRestrictionText",
"required": "0"
}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;
}
row.sourceRestriction = data
.map((res) => {
return res.id;
})
.join(",");
row.sourceRestrictionText = data
.map((res) => {
return res.supplierName;
})
.join("_");
}js
{
modalColumns: [
{
field: "toElsAccount",
// fieldLabelI18nKey: 'i18n_title_supplierAccount',
title: "供应商ELS号",
width: 100,
},
{
field: "supplierCode",
// fieldLabelI18nKey: 'i18n_title_supplierCode',
title: "供应商ERP编码",
width: 150,
},
{
field: "supplierName",
// fieldLabelI18nKey: 'i18n_title_supplierName',
title: "供应商名称",
width: 150,
},
],
// 特殊自制的字段(常规不带)
modalTypeGrid: "FormGridWith",
modalUrl: "/supplier/supplierMaster/queryPageListByCalculation",
params: {
frozenFunctionValue: "1",
},
modalParams: {
frozenFunctionValue: "1",
},
}追加门店限制 storeRestrictionText 🎉
json
{
"groupCode": "rebateRuleSupplements",
"fieldType": "selectModal",
"title": "追加门店限制",
"field": "storeRestrictionText",
"required": "0"
}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;
}
row.storeRestriction = data
.map((res) => {
return res.id;
})
.join(",");
row.storeRestrictionText = data
.map((res) => {
return res.orgName;
})
.join("_");
}js
{
modalColumns: [
{
field: "orgCode",
// fieldLabelI18nKey: 'i18n_title_supplierAccount',
title: "组织编码",
width: 100,
},
{
field: "orgName",
// fieldLabelI18nKey: 'i18n_title_supplierCode',
title: "组织名称",
width: 150,
},
{
field: "orgCategoryCode_dictText",
// fieldLabelI18nKey: 'i18n_title_supplierCode',
title: "组织类型",
width: 150,
},
{
field: "businessRegion_dictText",
// fieldLabelI18nKey: 'i18n_title_supplierName',
title: "业务组织地区",
width: 150,
},
{
field: "businessPerson",
// fieldLabelI18nKey: 'i18n_title_supplierName',
title: "业务组织负责人",
width: 150,
},
{
field: "executiveRegion_dictText",
// fieldLabelI18nKey: 'i18n_title_supplierName',
title: "行政组织地区",
width: 150,
},
{
field: "executivePerson",
// fieldLabelI18nKey: 'i18n_title_supplierName',
title: "行政组织负责人",
width: 150,
},
],
// 特殊自制的字段(常规不带)
modalTypeGrid: "FormGridWith",
modalUrl: "/org/purchaseOrganizationInfo/queryPageListByCalculation",
params: {
frozenFunctionValue: "1",
},
modalParams: {
frozenFunctionValue: "1",
},
}