saleGoods.vue 6.25 KB
<template>

    <div class="contentpanel">
        <div class="panel">
            <div class="panel-heading">
                <h1>销售统计</h1>
            </div>
            <div class="panel-body">
                <div class="row">
                    <div class="panel-col">
                        <select name="type" id="type" tabindex="1" v-model="params.type" class="form-control">
                            <option value="1">日报</option>
                            <option value="2">周报</option>
                            <option value="3">月报</option>
                        </select>
                    </div>
                    <div class="panel-col">
                        <input type="text" name="reqTime" id="reqTime" v-model="params.reqTime" class="form-control"
                               placeholder="时间">
                    </div>
                    <div class="panel-col">
                        <input type="text" name="productSkn" id="productSkn" v-model="params.productSkn"
                               class="form-control" placeholder="skn">
                    </div>
                    <div class="panel-col">
                        <input type="text" name="productSkc" id="productSkc" v-model="params.productSkc"
                               class="form-control" placeholder="skc">
                    </div>
                    <div class="panel-col">
                        <input type="text" name="productSku" id="productSku" v-model="params.productSku"
                               class="form-control" placeholder="sku">
                    </div>
                    <div class="panel-col">
                        <input type="text" name="factoryCode" id="factoryCode" v-model="params.factoryCode"
                               class="form-control" placeholder="出厂编号">
                    </div>
                    <div class="panel-col">
                        <input type="text" name="sortId" id="sortId" v-model="params.sortId" class="form-control"
                               placeholder="产品分类">
                    </div>
                    <div class="panel-col">
                        <a href="javascript:;" class="btn btn-info" @click="reload">搜索</a>
                    </div>
                </div>

                <uc-Card :rows="card.rows"></uc-Card>
            </div>
        </div>

        <div class="panel">
            <div class="panel-heading">
                <h2>——有效订单商品销售报表——</h2>
            </div>

            <div class="panel-body nopadding">
                <com-grid :columns="grid.columns" :url="grid.url">
                </com-grid>
            </div>
        </div>

    </div>
</template>


<script>

//     import grid from '../../../../components/grid/index';
//     import card from './card';

//     export default {
//         components: {
//             comGrid: grid,
//             ucCard: card
//         },
//         data() {
//             return {
//                 card: {
//                     rows: [
//                         {name: "有效订单的商品件数", value: "1024"},
//                         {name: "有效订单的商品金额(元)", value: "89004.00"}
//                     ]
//                 },
//                 params: {
//                     type: 1,
//                     reqTime: "",
//                     beginTime: "",
//                     endTime: "",
//                     productSkn: "",
//                     productSkc: "",
//                     productSku: "",
//                     factoryCode: "",
//                     sortId: ""
//                 },
//                 grid: {
//                     url: '/shop/getOrdersGoodsRptList',
//                     columns: [
//                         {name: 'imageUrl', display: '图片',render:function (item) {
//                             return '<img src="'+item.imageUrl+'">'
//                         }},
//                         {name: 'SKN/SKC/SKU', display: 'SKN/SKC/SKU',render:function (item) {
//                             var htmlArr=[];
//                             htmlArr.push('<p>SKN:'+item.productSkn+'</p>');
//                             htmlArr.push('<p>SKC:'+item.productSkc+'</p>');
//                             htmlArr.push('<p>SKU:'+item.productSku+'</p>');
//                             return htmlArr.join(",");
//                         }},
//                         {name: 'factoryCode', display: '厂家编号'},
//                         {name: 'goodsName', display: '商品名称'},
//                         {name: 'price', display: '价格',render:function (item) {
//                             var htmlArr=[];
//                             htmlArr.push('<p>吊牌价:'+item.retailPrice+'</p>');
//                             htmlArr.push('<p>销售价:'+item.salesPrice+'</p>');
//                             return htmlArr.join(",");
//                         }},
//                         {name: '', display: '颜色/尺码',render:function (item) {
//                             return '<p>'+item.colorName+'/'+item.sizeName+'</p>';
//                         }},
//                         {name: '', display: '商品分类',render:function (item) {
//                             return '<p>'+item.maxSortName+'-'+item.middleSortName+'</p>';
//                         }},
//                         {name: '', display: '数量'},
//                         {name: '', display: '金额'}
//                     ]
//                 }
//             }
//         },
//         methods: {
//             reload() {
//                 var data = {
//                     type: this.params.type,
//                     reqTime: this.params.reqTime,
//                     productSkn: this.params.productSkn,
//                     productSkc: this.params.productSkc,
//                     productSku: this.params.productSku,
//                     factoryCode: this.params.factoryCode,
//                     sortId: this.params.sortId
//                 };
//                 this.$broadcast('grid-reload', data);
//             }
//         },
//         events: {
//             complete(data){
// //                this.card.rows[0].value = "ceshi";
// //                console.log(data);
//             }
//         }
//     }
</script>