|
@@ -1,15 +1,13 @@
|
|
|
|
|
|
const mapTemplateToTable = {
|
|
|
'销售订单编号': 'orderCode',
|
|
|
- '业务经理ID': 'managerid',
|
|
|
- '业务经理名称': 'manager'
|
|
|
+ '导入业务经理名称': 'import_manager'
|
|
|
}
|
|
|
|
|
|
export const getTableProperty = (key) => mapTemplateToTable[key]
|
|
|
export const PROPERTYS = {
|
|
|
ORDER_CODE: getTableProperty('销售订单编号'),
|
|
|
- MANAGER_ID: getTableProperty('业务经理ID'),
|
|
|
- MANAGER: getTableProperty('业务经理名称')
|
|
|
+ IMPORT_MANAGER: getTableProperty('导入业务经理名称')
|
|
|
}
|
|
|
|
|
|
export const template = Array(1).fill(1).map(() => Object.keys(mapTemplateToTable).reduce((prev, property) => {
|
|
@@ -19,12 +17,12 @@ export const template = Array(1).fill(1).map(() => Object.keys(mapTemplateToTabl
|
|
|
|
|
|
export const columns = [
|
|
|
{
|
|
|
- type: 'index',
|
|
|
- label: '序号',
|
|
|
+ type: 'selection',
|
|
|
width: '70px'
|
|
|
},
|
|
|
{
|
|
|
type: 'index',
|
|
|
+ label: '序号',
|
|
|
width: '70px'
|
|
|
},
|
|
|
{
|
|
@@ -33,13 +31,18 @@ export const columns = [
|
|
|
required: true
|
|
|
},
|
|
|
{
|
|
|
- prop: PROPERTYS.MANAGER_ID,
|
|
|
- label: '业务经理ID',
|
|
|
+ prop: PROPERTYS.IMPORT_MANAGER,
|
|
|
+ label: '导入业务经理名称',
|
|
|
required: true
|
|
|
},
|
|
|
{
|
|
|
prop: PROPERTYS.MANAGER,
|
|
|
- label: '业务经理名称',
|
|
|
+ label: '批量设置业务经理ID',
|
|
|
+ required: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: PROPERTYS.MANAGER,
|
|
|
+ label: '批量设置业务经理名称',
|
|
|
required: true
|
|
|
}
|
|
|
]
|
|
@@ -48,12 +51,7 @@ export function createErrorMessage(messages) {
|
|
|
const rows = Object.keys(messages)
|
|
|
return rows.reduce((prev, row, index) => {
|
|
|
const suffix = index === rows.length - 1 ? '</ul>' : ''
|
|
|
-
|
|
|
- const content = prev + `
|
|
|
- <li>
|
|
|
- <strong style="font-weight:700">第${row}行</strong>,${messages[row]}
|
|
|
- </li>
|
|
|
- `
|
|
|
+ const content = prev + `<li><strong style="font-weight:700">第${row}行</strong>,${message[row]}</li>`
|
|
|
return content + suffix
|
|
|
}, '<ul>')
|
|
|
}
|
|
@@ -70,7 +68,7 @@ export const requsetFields = [
|
|
|
]
|
|
|
export const requiredFields = [
|
|
|
PROPERTYS.ORDER_CODE,
|
|
|
- PROPERTYS.MANAGER,
|
|
|
+ PROPERTYS.MANAGER
|
|
|
]
|
|
|
|
|
|
export const numberFields = [
|