orderApprovalFormat.js
574 Bytes
const orderFieldMaps = {
djOrderType: {
'': '订单类型',
1: '正常订单',
2: '打折策略',
3: '买赠策略',
4: '冲量活动',
5: '组合付款',
6: '内部结算'
},
lowPriceFlag: {
0: '普通订单',
1: '低价订单'
}
}
function getFormattedFieldValue(value, format) {
const fieldMap = orderFieldMaps[format]
if (!fieldMap || value === undefined || value === null) return '-'
return Object.prototype.hasOwnProperty.call(fieldMap, value) ? fieldMap[value] : '-'
}
module.exports = {
getFormattedFieldValue
}