done.js
7.66 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
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
/**
* done tab store
* @author: leo
* @date: 04/05/2017
*/
import { CellInfo } from 'components/cell';
import { CellDispatch } from '../components';
export default () => {
return {
filters: {
orderNo: {
label: '调拨单号',
model: '',
holder: '',
},
expressNo: {
label: '物流单号',
model: '',
holder: ''
},
prodCode: {
label: '商品编码',
model: '',
holder: 'SKN'
},
merChantCode: {
label: '商家编码',
model: '',
holder: '商家商品编码'
},
prodBarCode: {
label: '商品条码',
model: '',
holder: ''
},
orderTime: {
label: '下单时间',
model: '',
holder: ''
},
startTime: {
model: ''
},
endTime: {
model: '',
},
prodStatus: {
label: '商品状态',
model: '',
options: [
{
value: 2,
label: '已处理'
},
{
value: -2,
label: '已处理超时'
},
{
value: 3,
label: '收货完成'
},
{
value: 4,
label: '已取消'
}
]
}
},
page: {
total: 0,
current: 1
},
table: {
cols: [
{
title: '下单时间',
key: 'createTime',
align: 'center'
},
{
title: '商品图片',
align: 'center',
render(h, params) {
return h('img', {
directives: [
{
name: 'prod-img',
value: params.row.productSku,
modifiers: {
sku: true
}
}
]
});
}
},
{
title: '商品信息',
align: 'center',
render(h, params) {
const row = params.row;
let infoItems = [
{
label: 'SKU',
value: row.productSku,
}, {
label: 'SKN',
value: row.productSkn,
}, {
label: '规格',
value: `${row._colorName}/${row.sizeName}`,
}, {
label: '名称',
value: row.productName,
}, {
label: '品牌',
value: row.brandName,
}, {
label: '销售价',
value: row.salesPrice,
}, {
label: '采购价',
value: row.purchasePrice,
}
];
return h(CellInfo, {
props: {
items: infoItems
}
});
}
},
{
title: '商品条码',
key: 'skuFactoryCode',
align: 'center'
},
{
title: '订单收发货',
align: 'center',
render(h, params) {
const row = params.row;
return h(CellDispatch, {
props: {
storeNum: row.inStoreNum,
buyNum: row.buyingNums,
shipNum: row.shipmentsNums,
lackNum: row.lackNum,
}
});
}
},
{
title: '收货进度(收货数/已发数)',
align: 'center',
render(h, params) {
const row = params.row;
const complete = row.shipmentsNums === 0 || row.inStoreNum === row.shipmentsNums;
return (
<div>
<div v-show={complete}>
<i-progress percent="100" hide-info></i-progress>
<p>{row.inStoreNum}/{row.shipmentsNums}</p>
</div>
<div v-show={!complete}>
<i-progress status="wrong"
percent={(row.inStoreNum / row.shipmentsNums) * 100} hide-info>
</i-progress>
<p>{row.inStoreNum}/{row.shipmentsNums}</p>
</div>
</div>
);
}
},
{
title: '缺货',
align: 'center',
render(h, params) {
return (<p>缺货数:{params.row.lackNum}</p>);
}
},
{
title: '状态',
align: 'center',
render(h, params) {
const row = params.row;
let ot = row.isOvertime;
let status = row.status;
let type = 1;
const txtMap = {
1: '已处理',
2: '已处理(超时)',
3: '收货完成',
4: '已取消'
};
ot = ot === 'N' ? true : false;
if (status === 2 && !ot) {
type = 2;
}
if (status !== 2) {
type = status;
}
return (
<div>
<span v-show={ot}>{txtMap[type]}</span>
<span v-show={!ot} class="is-overtime">{txtMap[type]}</span>
</div>
);
},
className: 'status-cell'
},
{
title: '调拨单号',
key: 'proRequisitionFormId',
align: 'center',
}
],
list: []
}
};
};