cell-dispatch.vue
1.28 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
<template>
<div class="cell-info">
<span class="item">销售数:{{buyNum}}</span>
<span class="item">实际应发数:{{actualNeed}}</span>
<span class="item darker">当前需发数:{{currentNeed}}</span>
<span v-if="showStore" class="item">收货数:{{storeNum}}</span>
</div>
</template>
<script>
export default {
name: 'cell-dispatch',
props: {
showStore: {
default: false
},
storeNum: {
type: [String, Number]
},
buyNum: {
type: [String, Number]
},
lackNum: {
type: [String, Number]
},
shipNum: {
type: [String, Number]
}
},
data() {
return {
};
},
computed: {
actualNeed() {
return this.buyNum - this.lackNum;
},
currentNeed() {
return this.actualNeed - this.shipNum;
}
}
};
</script>
<style lang="scss" scoped>
.cell-info {
text-align: right;
.item {
display: block;
&.darker {
font-weight: bold;
color: #000;
}
}
}
</style>