index.js
3.55 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
import {CellImage, CellInfo, CellPrice} from 'components/cell'; // eslint-disable-line
import timeFormat from 'filters/time-format';
export default function() {
return {
selectBrand: {
brandId: 0,
brandName: ''
},
stockStatusOptions: [
{
value: 1,
label: '有库存'
},
{
value: 2,
label: '无库存'
}
],
category: [],
query: {
productSkn: '',
sknFactoryCode: '',
skuFactoryCode: '',
prodName: '',
brandId: '',
stockStatus: ''
},
pageData: {
total: 0,
pageNo: 1,
pageSize: 20
},
tableData: [],
tableCols: [{
type: 'selection',
width: 60,
align: 'center'
}, {
title: '商品图片',
width: 120,
align: 'center',
render: (h, params) => {
return (
<img v-prod-img={params.row.productSkn}/>
);
}
}, {
title: '商品信息',
align: 'center',
width: '15%',
render: (h, params) => {
return (
<CellInfo items={[
{
label: 'SKN',
value: params.row.productSkn
}, {
label: '名称',
value: params.row.productName
}, {
label: '品牌',
value: params.row.brandName
}, {
label: '品类',
value: `${params.row.maxSortName}/${params.row.middleSortName}/${params.row.smallSortName}`
}
]}></CellInfo>
);
}
}, {
title: '价格(元)',
align: 'center',
width: '13%',
render: (h, params) => {
return (
<CellInfo items={[
{
label: '吊牌价',
value: params.row.retailPrice
}, {
label: '销售价',
value: params.row.salePrice
}
]}></CellInfo>
);
}
}, {
title: '仓库库存',
key: 'stock'
}, {
title: '库存可售天数',
key: 'saleDays'
}, {
title: '建议补货数',
key: 'supplementNums'
}, {
title: '最近一次补货时间',
width: 150,
render: (h, params) => {
return (
<span>{timeFormat(params.row.lastTime)}</span>
);
}
}, {
title: '补货数',
render: (h, params) => {
return (
<Input-number
max={999}
min={0}
value={params.row.num}
style={{width: '60px'}}
onInput={val => (params.row.num = val)}
onOn-change={val => (this.numChange(params.row, val))}></Input-number>
);
}
}]
};
}