cell-stock-out.vue 1.68 KB
<template>
    <div class="cell-stock-out">
        <p class="row">
            缺货<span class="num">
                <Input number
                       v-model="newLackNum">
                </Input>
            </span>
        </p>
        <p class="row">缺货数:{{row.lackNum}}</p>
        <p class="row">
            <Button type="error" @click="showModal">上传确认缺货</Button>
        </p>
        <UploadStockOut
            ref="stockOut"
            :row="row"
            :new-lack-num="newLackNum"
            @ok-click="uploadSubmit">
        </UploadStockOut>
    </div>
</template>

<script>
    import service from 'trade-service';
    import { UploadStockOut } from 'components/modal'

    export default {
        name: 'CellStockOut',
        props: {
            row: {
                type: Object
            }
        },
        data() {
            return {
                newLackNum: ''
            }
        },
        methods: {
            showModal(){
                this.$refs.stockOut.show();
            },
            uploadSubmit(){
                const params = {
                    proReqFormId:195481,
                    productSku:1275146,
                    num:1
                };
                service.allotStockOut(params)
                    .then(res => {
                        console.log(res)

                    });
            }
        },
        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>