deliver-table.js
4.24 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
/**
* Created by TaoHuang on 2017/5/25.
*/
let tableCols = function() {
return [
{
type: 'selection',
width: 60,
align: 'center'
},
{
title: 'SKN/SKC/SKU',
key: 'productSkn',
align: 'center',
render: (h, params) => {
return (
<div>{params.row.productSkn} / {params.row.productSkc} / {params.row.productSku} </div>
);
}
},
{
title: '条码',
key: 'skuFactoryCode',
align: 'center',
},
{
title: '货品年季',
key: 'goodsYearSeason',
align: 'center',
},
{
title: '名称',
key: 'productName',
align: 'center',
},
{
title: '色系/厂家颜色',
align: 'center',
render: (h, params) => {
return (
<div>{params.row.goodsName} / {params.row.factoryGoodsName}</div>
);
}
},
{
title: '性别/尺码',
align: 'center',
render: (h, params) => {
return (
<div>{params.row.genderName} / {params.row.sizeName}</div>
);
}
},
{
title: '吊牌/销售价/进货价',
align: 'center',
render: (h, params) => {
return (
<div>{params.row.retailPrice} / {params.row.salesPrice}</div>
);
}
},
{
title: '结算折扣',
key: 'purchaseDiscount',
align: 'center',
},
{
title: '发货进度 已发数/需发总数',
key: 'editTime',
align: 'center',
renderHeader() {
return '发货进度<br/> 已发数/需发总数 ';
},
render: (h, params) => {
let percent = 0;
if (params.row.shipmentsNums && params.row.buyingNums) {
percent = params.row.shipmentsNums / params.row.buyingNums;
if (percent > 1) {
percent = 100;
} else {
percent *= 100;
}
}
return (
<div>
<div><i-progress percent={ percent} hide-info={true} ></i-progress></div>
<div>{params.row.shipmentsNums || 0} / {params.row.buyingNums || 0}</div>
</div>
);
},
},
{
title: '入库进度 已入库数/需发总数',
key: 'editTime',
align: 'center',
renderHeader() {
return '入库进度<br/> 已入库数/需发总数';
},
render: (h, params) => {
let percent = 0;
if (params.row.inStoreNum && params.row.buyingNums) {
percent = params.row.inStoreNum / params.row.buyingNums;
if (percent > 1) {
percent = 100;
} else {
percent *= 100;
}
}
return (
<div>
<div><i-progress percent={ percent }
hide-info={true}></i-progress></div>
<div>{ params.row.inStoreNum || 0} / {params.row.buyingNums || 0}</div>
</div>
);
},
},
{
title: '填写发货数',
key: 'action',
align: 'center',
render: (h, params) => {
let disabled = params.row.shipmentsNums === params.row.buyingNums;
return (
<i-input
value={params.row.num}
onInput={val => (params.row.num = val)}
disabled={disabled}
/>
);
}
}
];
};
let tableData = [];
export {
tableCols,
tableData,
};