index.js
4.91 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
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
let filterFields = {
sknCode: {
label: 'SKN编码',
labelSpan: 6,
model: '',
holder: '',
fieldSpan: 18
},
prodCode: {
label: '商家编码',
labelSpan: 6,
model: '',
holder: '',
fieldSpan: 18
},
prodName: {
label: '商品名称',
labelSpan: 6,
model: '',
holder: '',
fieldSpan: 18
},
prodBarCode: {
label: '商品条码',
labelSpan: 6,
model: '',
holder: '',
fieldSpan: 18
},
sort: {
first: {
label: '选择类目',
holder: '选择一级类目',
labelSpan: 6,
fieldSpan: 18,
model: ''
},
second: {
label: '二级类目',
holder: '选择二级类目',
labelSpan: 6,
fieldSpan: 18,
model: ''
},
third: {
label: '三级类目',
holder: '选择三级类目',
labelSpan: 6,
fieldSpan: 18,
model: ''
}
},
brand: {
label: '选择品牌',
labelSpan: 6,
fieldSpan: 18,
model: -1
},
verifyStatus: {
label: '审核状态',
labelSpan: 6,
fieldSpan: 18,
model: -1,
options: [
{
value: -1,
label: '全部'
},
{
value: 1,
label: '下架待审核'
},
{
value: 2,
label: '下架驳回'
}
]
},
stockStatus: {
label: '库存情况',
labelSpan: 6,
fieldSpan: 18,
model: -1,
options: [
{
value: -1,
label: '全部'
},
{
value: 1,
label: '有库存'
},
{
value: 0,
label: '无库存'
}
]
}
};
let initialFields = JSON.stringify(filterFields);
let tableCols = [
{
title: '对账单号',
key: 'image',
width: 120,
align: 'center',
render (row, column, index) {
return '<cell-image :image-src="row.picImgUrl" :product-url="row.productUrl"></cell-image>';
}
},
{
title: '生成日期',
key: 'info',
align: 'center',
render(row, column, index) {
return `<cell-info
:skn="row.productSkn"
:product-name="row.productName"
:brand-name="row.brandName"
:max-name="row.maxSortName"
:middle-name="row.middleSortName"
:small-name="row.smallSortName">
</cell-info>`;
}
},
{
title: '结算周期',
key: 'price',
align: 'center',
render(row, column, index) {
row.lineIndex = index;
return `<cell-price
@click-change="editPrice(row)"
@click-save="updatePrice"
:can-change="true"
:current-row="row"
:show-change="row.changePrice"
:retail-price="row.retailPrice"
:sales-price="row.salesPrice">
</cell-price>`;
}
},
{
title: '品牌',
key: 'stock',
width: 100,
align: 'center',
},
{
title: '供应商',
key: 'shelveTime',
width: 150,
align: 'center'
},
{
title: '结算金额',
key: 'verify',
align: 'center',
render(row, column, index) {
return `${auditStatus[row.auditStatus]}`
}
},
{
title: '操作',
key: 'action',
width: 180,
align: 'center',
render: function(row, column, index) {
return `<div class="action-btn-row">
<i-button type="primary" size="small" @click="editSize(row.productSkn)">尺码维护</i-button>
<i-button v-if="row._disabled" type="primary" size="small"
@click="editProduct(${row.productSkn})" disabled>内容编辑</i-button>
<i-button v-else type="primary" size="small" @click="editProduct(${row.productSkn})">内容编辑</i-button>
</div>
<div class="btn-row-space">
<i-button v-if="row._disabled" type="error" size="small"
@click="setOffSale(${row.productSkn})" disabled>下架</i-button>
<i-button v-else type="error" size="small" @click="setOffSale(${row.productSkn})" >下架</i-button>
</div>`;
}
}
];
let tableData = [];
export {
filterFields,
initialFields,
tableCols,
tableData
};