table.data.js
2.65 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
import { cloneDeep } from "lodash-es";
import { shelfTypeOpt } from "@/common/constants";
import { Util } from "@/common/util";
import { sceneTypeOptions, shelfModelOptions, statusOptions } from "../../constant/index";
export const shelfProductTableFormSchema = [
{
label: "单据编号",
name: "businessCode",
type: "input",
maxlength: "20",
isClear: true,
input({ value, schema, formModel }) {
formModel.businessCode = (value || "").replace(/[^a-z0-9]/gi, "");
},
},
{
label: "流量方信息",
name: "merchantName",
type: "input",
maxlength: "50",
isClear: true,
},
{
label: "业务场景",
name: "baseSceneCode",
type: "select",
isClear: true,
optionList: cloneDeep(sceneTypeOptions),
optionId: "value",
optionLabel: "label",
},
{
label: "上架模式",
name: "shelfModel",
type: "select",
isClear: true,
optionList: cloneDeep(shelfModelOptions),
optionId: "value",
optionLabel: "label",
},
{
label: "上架类型",
name: "shelfType",
type: "select",
isClear: true,
optionList: cloneDeep(shelfTypeOpt),
optionId: "confId",
optionLabel: "confValue",
},
{
label: "状态",
name: "systemStatus",
type: "select",
isClear: true,
optionList: statusOptions,
optionId: "value",
optionLabel: "label",
},
];
export const shelfProductTableColumn = [
{
label: "单据编号",
prop: "businessCode",
width: "180px",
},
{
label: "上架模式",
prop: "shelfModel",
width: "180px",
formatter: (row) => {
return shelfModelOptions.find(item => item.value === row.shelfModel)?.label || "特殊商品上架";
},
},
{
label: "上架类型",
prop: "shelfType",
width: "150px",
formatter: (row) => {
return shelfTypeOpt.find(item => item.confId === row.shelfType)?.confValue || "-";
},
},
{
label: "业务场景",
prop: "baseSceneCode",
width: "180px",
formatter: (row) => {
return sceneTypeOptions.find(item => item.value === row.baseSceneCode)?.label || "-";
},
},
{
label: "流量方信息",
prop: "merchantNames",
minWidth: "188px",
addHtml: "merchantNames",
},
{
label: "提交时间",
prop: "createdDate",
width: "160px",
formatter: (row) => {
return row.createdDate ? Util.dateFormate(row.createdDate, "YYYY-MM-DD HH:mm:ss") : "-";
},
},
{
label: "提交人",
width: "120px",
prop: "createdBy",
},
{
label: "状态",
prop: "systemStatus",
width: "150px",
formatter: (row) => {
return statusOptions.find(item => item.value === row.systemStatus)?.label || "-";
},
className: (cellValue) => {
return {
0: "ashSpot",
1: "yellowSpot",
2: "greenSpot",
3: "redSpot",
}[cellValue.systemStatus];
},
},
];