4、订单详情 /items/order/detail?orderNo=201903251750380001

 

<template>
    <div class="write">
        <div class="adr">
            <div class="top">
                <img src="../../../assets/images/icon-adr.png" alt="" srcset="">
                {{detail.memberName}} {{detail.memberPhone}}
            </div>
            <div class="btm">
                <!-- 山东省 青岛市 市南区 香港中路2号海航万邦中心33楼微众控股集团 -->
                {{replace(detail.memberAddress)}}
            </div>
        </div>
        <ul class="list">
            <li @click="goto(detail.productId)">
                <a href="" class="pic_thumb">
                    <img :src="detail.productUrl" alt="" srcset="">
                </a>
                <div class="cont">
                    <div class="title">
                        {{detail.productTitle}}
                    </div>
                    <p class="desc">
                        <!-- 深空灰色 -->
                    </p>
                    <div class="btm">
                        <span>{{detail.pointPrice}} 积分</span>
                        <i>x {{detail.count}}</i>
                    </div>
                </div>
            </li>
        </ul>
        <ul class="od_list">
            <li> <span class="red">{{detail.total}} 积分</span> 订单总额</li>
            <li> <span>{{detail.orderNo}}</span> 订单编号</li>
            <li> <span>{{detail.submitTime}}</span> 下单时间</li>
        </ul>
    </div>
</template>

<script>
import { Card } from 'vant';
export default {
    data() {
        return {
            orderNo: '',
            detail: {},
            imageURL: 'https://img.yzcdn.cn/upload_files/2017/07/02/af5b9f44deaeb68000d7e4a711160c53.jpg'
        }
    },
    components: {
        [Card.name]: Card,
    },
    mounted() {
        var that = this
        this.orderNo = this.$route.query.orderNo;
        this.$reqPost('/order/get-order-detail',{orderNo:this.orderNo}).then(function(res) {
            that.detail = res.data.body[0]
        }).catch(function(err) {
            console.log(err)
        })

    },
    methods: {
        goto(productId) {
            this.$router.push('/items/detail/'+productId)
            // this.$router.go(-1)
        },
        replace(str) {
            if(str) {
                return str.replace(/\@/g,' ');
            }
            
        }
    }
}
</script>

<style scoped>
.write .adr {
    padding: 0.35rem;
    background: #fff;
    margin-bottom: 0.3rem;
    font-size: 0.42rem;
}
.write .adr .top {
    height: 0.53rem;
    line-height: 0.53rem;
    margin-bottom: 0.35rem;
}
.write .adr img {
    display: block;
    float: left;
    width: 0.41rem;
    height: 0.53rem;
    margin-right: 0.36rem;
}
.write .adr .btm {
    padding-left: 0.77rem;
}
.write ul.list{
    background: #fff;
}
.write ul.list li{
    padding: 0.35rem;
    border-top:1px solid #f6f6f9;
    height: 3.3rem;
    position: relative;
}
.write .pic_thumb{
    width: 2.6rem;
    height: 2.6rem;
    top: 0.35rem;
    left: 0.35rem;
    position: absolute;
}
.write .pic_thumb img{
    max-width: 100%;
    max-height: 100%;
    border: none;
}
.write .cont {
    padding-left: 3rem;
    height: 2.6rem;
}
.write .cont .title {
    font-size: 0.42rem;
    font-weight: bold;
    padding-bottom: 0.2rem;
    height: 0.9rem;
    overflow: hidden;
}
.write .cont .desc {
    margin: 0px;
    color: #b4b4b9;
}
.write .cont .btm {
    padding-top: 0.5rem;
    font-size: 0.42rem;
}
.write .cont .btm span {
    color: #ff8400;
}
.write .cont .btm i {
    float: right;
    font-style: normal;
}
.write .fixed-btm{
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    height: 50px;
    line-height: 50px;
    padding: 0 0.35rem;
}
.write .fixed-btm i {
    font-size: 0.42rem;
    color: #fd141d;
    font-style: normal;
}
.write .fixed-btm span {
    display: block;
    float: right;
    width: 4.29rem;
    height: 1.2rem;
    line-height: 1.2rem;
    text-align: center;
    color: #fff;
    background: #fd141d;
    border-radius: 0.6rem;
    margin-top: 0.15rem;
}
.write .od_list {
    margin-top: 0.3rem;
}
.write .od_list li{
    height: 1.5rem;
    line-height: 1.5rem;
    padding: 0 0.35rem;
    font-size: 0.42rem;
    color: #666;
    background: #fff;
    border-bottom:1px solid #f6f6f9;
}
.write .od_list li span{
    float: right;
}
.write .od_list li span.red{
    color:#fd141d;
}
</style>

 

转载于:https://www.cnblogs.com/suanmei/p/10595273.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
func PostOperateOrderList(a *decorator.ApiBase, data *adminStruct.OperateOrderRequest) error { logger.AccessLogger.Info("PostOperateOrderList...") resp := adminStruct.OperateOrderListResponse{} resp.ResponseCommon = a.NewSuccessResponseCommon() logger.AccessLogger.Info("权限:", a.Token.Uids) // 查询数据 resQuery := a.Ts.Table("business_order_info as a "). Joins("inner join business_base as b on b.bid=a.bid"). //Select(`a.boid, a.bid, a.sid, s.wid, a.order_no, a.order_time, // a.sum_num, a.sum_amt, a.pay_amt, a.status, a.proc_status, a.warehouse_status`). Not("a.status=?", model.Delete) // flag 1商品待入库订单列表2商品出库 //if data.Flag == "1" { // resQuery = resQuery.Where(" warehouse_status in ('1','2') and status='5'") //} else if data.Flag == "2" { // resQuery = resQuery.Where(" warehouse_status in ('3','4') and status='6'") //} if len(data.Status) > 0 { resQuery = resQuery.Where(" a.status in ?", data.Status) } if data.BeginDate > 0 { resQuery = resQuery.Where(" a.order_time>=?", data.BeginDate) } if data.EndDate > 0 { resQuery = resQuery.Where(" a.order_time<=?", data.EndDate) } if data.Bid > 0 { resQuery = resQuery.Where(" a.bid=?", data.Bid) } if data.Sid > 0 { resQuery = resQuery.Where(" a.sid=?", data.Sid) } if len(data.Sname) > 0 { sup := admin_lib.SupplierBase{ Db: a.Ts, LikeName: data.Sname, } sids, _ := sup.QuerySupplierNameLikeSids() if len(sids) > 0 { resQuery = resQuery.Where(" a.sid in ?", sids) } } if data.Wid > 0 { resQuery = resQuery.Where(" a.wid=?", data.Wid) } if len(data.OrderNo) > 0 { resQuery = resQuery.Where(" a.order_no like ?", fmt.Sprintf("%%%s%%", data.OrderNo)) } if a.Token.Uids != nil && a.Token.User.Uid != 1 { resQuery = resQuery.Where("b.cuid in ?", *a.Token.Uids) } // 查询总条数 a.DbErrSkipRecordNotFound(resQuery. Count(&resp.Count). Error) if resp.Count > 0 { //var err error // 查询订单信息 //tmpResp := []adminStruct.SupplierOrderResponse{} a.DbErrSkipRecordNotFound(resQuery. Select(`a.boid, a.bid, a.sid, a.wid, a.order_no, a.order_time, be.bname, se.sname, w.wname, a.sum_num, a.sum_amt, a.pay_amt, a.status, a.proc_status, a.warehouse_status, a.logistics_id`). Joins("inner join business_expand as be on be.bid=a.bid"). Joins("inner join supplier_expand as se on se.sid=a.sid"). Joins("inner join warehouse_info as w on w.wid=a.wid"). Order("a.boid desc"). Limit(a.Size). Offset(a.Offset). Find(&resp.Data). Error) //// 获取boid数组 //var boids []int64 //for _, tmp := range resp.Data { // boids = append(boids, tmp.Boid) //} // 查询明细SKU信息 //tmpRows := []adminStruct.OperateOrderDetail{} ////tmpDetail := []adminStruct.BusinessOrderDetail{} //tmpDetail, err := admin_lib.QueryBusinessOrderSku(boids) //if err != nil { // logger.AccessLogger.Error("ERROR:", err.Error()) // return a.ReturnPublicErrorResponse(err.Error()) //} //copier.Copy(&tmpRows, &tmpDetail) //logger.AccessLogger.Info("len:", len(tmpRows)) //for idx, main := range resp.Data { // for _, details := range tmpRows { // if details.Boid == main.Boid { // resp.Data[idx].Detail = append(resp.Data[idx].Detail, details) // } // } //} } // 准备返回数据 return a.ReturnSuccessCustomResponse(resp) }
最新发布
07-16

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值