<template>
    <div class='replenishment-start-set-stock-dialog  '>
        <van-popup v-model="value" close-on-popstate :close-on-click-overlay="false">
            <div class="plr15 ptb10 c-pr" style="width: 80vw">
                <div class="close fs-20"><van-icon @click="emitValue(false)" name="close" /></div>
                <div class="tc fs-14 c-333">
                    <span>{{title}}</span>
                </div>
                <template v-if="bussiness==1">
                    <div class="tc pt30 pb20"><van-stepper v-model="stock" min="1" /></div>
                </template>
                <div class="tc" v-else>
                    <div class="pt10">
                        <van-image
                            radius="5px"
                            src="https://img01.yzcdn.cn/vant/cat.jpeg"
                        />
                    </div>
                    <div class="pt10 c-333 fs-16">J氯化钠注射液(90mg）</div>
                    <div class="pt10 c-999">软件显示库存：5</div>
                    <div class="pt10 pb20 ipt plr50">
                        <van-field v-model="stock" label="" type="digit" placeholder=" 请填写实际库存" />
                    </div>
                </div>
                <div class="ptb10">
                    <van-button type="info" size="small" block>确认</van-button>
                </div>
            </div>
        </van-popup>
    </div>
</template>
<script>
export default{
    props:{
        title:{
            default: '设置库存'
        },
        value: {},
        bussiness: {
            default: 1
        }
    },
    data(){
        return {
            stock: 1
        }
    },
    created() {
        
    },
    methods:{
        emitValue(show){
            this.$emit('input', show)
        },
    },
}
</script>
<style lang='scss' scoped>
.replenishment-start-set-stock-dialog{
    .close{
        position: absolute;
        right: 10px;
        top: 10px;
    }
    ::v-deep .van-field{
        padding: 0;
        .van-cell__value{
            border: 1px solid #e1e1e1;
            input{
                text-align: center;
            }
        }
    }
    .van-image{
        width: 200px;
        height: 150px;
    }
}
</style>