cell-stock-out.vue
1.61 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
<template>
<div class="cell-stock-out">
<p class="row">
缺货<span class="num">
<Input number @on-change="change"></Input>
</span>
</p>
<p class="row">缺货数:{{lackNum}}</p>
<p class="row">
<Button type="error" @click="showModal">上传确认缺货</Button>
</p>
<UploadStockOut ref="stockOut" @ok-click="uploadSubmit"></UploadStockOut>
</div>
</template>
<script>
import service from 'trade-service';
import { UploadStockOut } from 'components/modal'
export default {
name: 'CellDeliver',
props: {
lackNum: {
type: [String, Number]
}
},
data() {
return {
}
},
methods: {
showModal(){
this.$refs.stockOut.show();
},
uploadSubmit(){
const params = {
proReqFormId:195481,
productSku:1275164,
num:1
};
service.allotStockOut(params)
.then(res => {
console.log(res)
});
},
change(val){
this.$emit('num-change', val)
}
},
components: {
UploadStockOut
}
}
</script>
<style lang="scss" scoped>
.cell-stock-out {
text-align: left;
.row {
margin: 10px 0;
}
.num {
display: inline-block;
width: 50px;
padding-left: 5px;
}
}
</style>