<template>
    <div>
        <div class="quotehis_cust">
            <svg class="icon" aria-hidden="true">
                <use xlink:href="#icon-kehu_white"></use>
            </svg>
            {{item.cusname}}
        </div>
        <div class="quotelist_main">
            <div class="quotelist_pic">
                <div class="quote-img-responsive">
                    <lj-img :md5="item.picmd5" />
                </div>
            </div>
            <div class="quotelist_info">
                <div class="quotelist_info_mtrl">{{item.mtrlname}}</div>
                <div class="quotelist_info_mtrlmode">{{item.mtrlmode}}</div>
                <div class="quotelist_info_other">
                    <div>净重{{item.net_weight}}KG</div>
                    <div>毛重{{item.gross_weight}}KG</div>
                    <div>{{item.mtrltype}}</div>
                </div>
                <div style="display:flex;width:100%;align-items: center;font-size:12px;color:#666">
                    <div style="font-size:16px;font-weight:bold;margin-right:10px">{{item.moneyname}}</div>
                    <div style="font-size:16px;font-weight:bold;margin-right:8px;color:#f00">
                        {{item.code}}{{item.sumprice | moneyFilter}}</div>
                    <div style="margin-right:8px">数量:{{item.qty}}</div>
                </div>

                <div style="display:flex;width:100%;align-items: center;font-size:12px;color:#666">
                    <div v-if="item.trade">贸易方式:{{item.trade}}</div>
                </div>

                <div class="quotelisthis_btn">
                    <mu-button round @click="quoteAgain" style="padding: 5px 5px;">
                        再次报价
                    </mu-button>
                </div>
            </div>
        </div>
    </div>
</template>

<script>
    import LjImg from "components/lj-img";
    export default {
        name: "quote-history-item",
        components: {
            LjImg,
        },
        props: {
            item: {
                // 传入数据
                type: Object
            },
        },
        data() {
            return {
                picurl: "http://tvax4.sinaimg.cn/crop.0.0.512.512.1024/007eqC2Ely8g174qneemsj30e80e8js0.jpg",
            }
        },
        methods: {
            quoteAgain() {
                this.$emit('ifclickbtn', true)
                // $lj.openWin("mtrl-configuration", {
                //     mainObject: this.item,
                //     openMode:2 //0-默认打开，为编辑状态 1-非编辑状态 2-再次报价
                // });
            }
        },
    }
</script>

<style>
    .quotehis_cust {
        margin: 10px 0 5px 15px;
        font-weight: bold;
    }

    .quotelist_main {
        display: flex;
        padding: 2px 0 10px 2px;
        border-bottom: 1px solid #f0f0f0;
    }

    .quote_search {
        background-color: #f7f7f7;
        margin: 5px 10px;
        padding: 0px 5px 0px 20px;
        font-size: 14px;
        line-height: 30px;
        border-radius: 15px;
        color: #777777
    }

    .quotelist_pic {
        /* margin-left: 20px; */
        flex: 0 0 120px;
    }

    .quote-img-responsive {
        text-align: center;
        width: 120px;
        height: 120px;
        margin-top: 10px;
        margin-left: 5px;
    }

    .quotelist_info {
        margin-left: 10px;
        flex: 0 0 65%;
    }

    .quotelist_info_other {
        display: flex
    }

    .quotelist_info_mtrl {
        font-size: 15px;
    }

    .quotelist_info_mtrlmode {
        font-size: 12px;
        color: #9c9c9c
    }

    .quotelist_info_other {
        font-size: 11px;
        padding: 2px 0;
    }

    .quotelist_info_other div {
        margin-right: 5px;
        border-radius: 15px;
        color: #888;
        background-color: #f8f8f8;
        padding: 0px 5px;
    }

    .quotelist_info_amt {
        color: #ff0000;
        font-weight: bold;
        font-size: 20px;
        margin-top: 5px;
    }

    .quotelist_info_amt span {
        font-size: 12px;
        font-weight: 500;
        padding: 0 2px 0 0;
    }

    .quotelist_info_qty {
        font-size: 12px;
        color: #9c9c9c;
        padding: 0 0 5px 0;
        border-bottom: 1px solid #f0f0f0;
    }



    .quotelisthis_btn {
        /* display: flex;
        position: absolute;
        right: 20px;
        color: #000000; */
        float: right;
        font-size: 13px;
        margin-right: 10px;

    }

    .quotelisthis_btn_bj {
        border: 1px solid #dfdfdf;
        padding: 5px 15px;
        border-radius: 15px;
    }
</style>