|
@@ -0,0 +1,839 @@
|
|
|
+<template>
|
|
|
+ <div>
|
|
|
+ <el-row :gutter="20">
|
|
|
+ <!--用户数据-->
|
|
|
+ <el-col :span="24" :xs="24">
|
|
|
+ <el-form
|
|
|
+ :model="queryParams"
|
|
|
+ ref="queryForm"
|
|
|
+ size="small"
|
|
|
+ :inline="true"
|
|
|
+ label-width="100px"
|
|
|
+ >
|
|
|
+ <el-form-item label="订单编号" prop="orderSn">
|
|
|
+ <el-input
|
|
|
+ v-model="queryParams.orderSn"
|
|
|
+ placeholder="请输入订单编号"
|
|
|
+ clearable
|
|
|
+ style="width: 180px"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+
|
|
|
+ <el-form-item label="订单状态" prop="orderStatus">
|
|
|
+ <el-select
|
|
|
+ v-model="queryParams.orderStatus"
|
|
|
+ placeholder="请选择订单状态"
|
|
|
+ clearable
|
|
|
+ style="width: 180px"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ :label="item.label"
|
|
|
+ :value="item.value"
|
|
|
+ v-for="(item, index) in orderStatusList"
|
|
|
+ :key="index"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+
|
|
|
+ <!-- <el-form-item label="物流状态" prop="status">
|
|
|
+ <el-select
|
|
|
+ v-model="queryParams.status"
|
|
|
+ placeholder="请选择商品状态"
|
|
|
+ clearable
|
|
|
+ style="width: 180px"
|
|
|
+ >
|
|
|
+ <el-option label="全部" value="" />
|
|
|
+ <el-option label="待支付" value="10" />
|
|
|
+ <el-option label="待装货" value="20" />
|
|
|
+ <el-option label="运送中" value="30" />
|
|
|
+ <el-option label="待签收" value="40" />
|
|
|
+ <el-option label="已完成" value="50" />
|
|
|
+ <el-option label="已取消" value="60" />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item> -->
|
|
|
+ <el-form-item>
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ icon="el-icon-search"
|
|
|
+ size="mini"
|
|
|
+ @click="handleQuery"
|
|
|
+ >搜索</el-button
|
|
|
+ >
|
|
|
+ <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
|
|
|
+ >重置</el-button
|
|
|
+ >
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ <el-table v-loading="loading" :data="tableList">
|
|
|
+ <el-table-column
|
|
|
+ label="订单编号"
|
|
|
+ align="center"
|
|
|
+ prop="orderSn"
|
|
|
+ :show-overflow-tooltip="true"
|
|
|
+ />
|
|
|
+ <el-table-column
|
|
|
+ label="商品名称"
|
|
|
+ align="center"
|
|
|
+ prop="title"
|
|
|
+ :show-overflow-tooltip="true"
|
|
|
+ />
|
|
|
+
|
|
|
+ <el-table-column label="下单人ID" align="center" prop="createUserId">
|
|
|
+ </el-table-column>
|
|
|
+
|
|
|
+ <el-table-column label="付款金额" align="center" prop="goodsAmount">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span>{{
|
|
|
+ (
|
|
|
+ scope.row.orderItemList[0].orderInfo.goodsAmount +
|
|
|
+ scope.row.orderItemList[0].orderInfo.serviceFee +
|
|
|
+ scope.row.orderItemList[0].orderInfo.freightFee
|
|
|
+ ).toFixed(2)
|
|
|
+ }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+
|
|
|
+ <el-table-column label="下单时间" align="center" width="200">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ {{
|
|
|
+ scope.row.orderItemList
|
|
|
+ ? $moment(scope.row.orderItemList[0].orderInfo.createTime).format(
|
|
|
+ "YYYY-MM-DD hh:mm:ss"
|
|
|
+ )
|
|
|
+ : ""
|
|
|
+ }}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="支付方式" align="center">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ {{
|
|
|
+ scope.row.orderItemList
|
|
|
+ ? scope.row.orderItemList[0].orderInfo.paymentType == "alipay"
|
|
|
+ ? "支付宝支付"
|
|
|
+ : scope.row.orderItemList[0].orderInfo.paymentType == "wechat"
|
|
|
+ ? "微信支付"
|
|
|
+ : scope.row.orderItemList[0].orderInfo.paymentType == "card"
|
|
|
+ ? "银行卡"
|
|
|
+ : ""
|
|
|
+ : ""
|
|
|
+ }}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="支付时间" align="center">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ {{
|
|
|
+ scope.row.orderItemList
|
|
|
+ ? scope.row.orderItemList[0].orderInfo.paymentTime
|
|
|
+ ? $moment(scope.row.orderItemList[0].orderInfo.paymentTime).format(
|
|
|
+ "YYYY-MM-DD hh:mm:ss"
|
|
|
+ )
|
|
|
+ : ""
|
|
|
+ : ""
|
|
|
+ }}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+
|
|
|
+ <el-table-column
|
|
|
+ label="订单状态"
|
|
|
+ align="center"
|
|
|
+ prop="orderStatus"
|
|
|
+ :show-overflow-tooltip="true"
|
|
|
+ >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span>
|
|
|
+ {{
|
|
|
+ scope.row.orderStatus == 0
|
|
|
+ ? "待修改"
|
|
|
+ : scope.row.orderStatus == 10
|
|
|
+ ? "待付款"
|
|
|
+ : scope.row.orderStatus == 20
|
|
|
+ ? "待发货"
|
|
|
+ : scope.row.orderStatus == 30
|
|
|
+ ? "待收货"
|
|
|
+ : scope.row.orderStatus == 40
|
|
|
+ ? "交易完成"
|
|
|
+ : scope.row.orderStatus == 50
|
|
|
+ ? "交易关闭"
|
|
|
+ : scope.row.orderStatus == 70
|
|
|
+ ? "已退款"
|
|
|
+ : scope.row.orderStatus == 110
|
|
|
+ ? "待装货"
|
|
|
+ : scope.row.orderStatus == 120
|
|
|
+ ? "运输中"
|
|
|
+ : scope.row.orderStatus == 130
|
|
|
+ ? "待处理售后"
|
|
|
+ : scope.row.orderStatus == 140
|
|
|
+ ? "已处理售后"
|
|
|
+ : ""
|
|
|
+ }}
|
|
|
+ </span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+
|
|
|
+ <el-table-column label="收货人手机号" align="center">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ {{
|
|
|
+ scope.row.orderItemList
|
|
|
+ ? scope.row.orderItemList[0].consigneeAddress.contact.contactMobile
|
|
|
+ : ""
|
|
|
+ }}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <!-- <el-table-column label="物流状态" align="center"> </el-table-column> -->
|
|
|
+ <el-table-column label="发货时间" align="center"> </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ label="操作"
|
|
|
+ align="center"
|
|
|
+ prop="orderStatus"
|
|
|
+ :show-overflow-tooltip="true"
|
|
|
+ >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-button size="mini" type="text" @click="handleDetail(scope.row)"
|
|
|
+ >详情</el-button
|
|
|
+ >
|
|
|
+ <el-button size="mini" type="text" @click="printOrder(scope.row)"
|
|
|
+ >打印订单</el-button
|
|
|
+ >
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ <div style="text-align: right; margin-top: 10px" v-if="!loading">
|
|
|
+ <el-pagination
|
|
|
+ background
|
|
|
+ layout="prev, pager, next"
|
|
|
+ :total="pagination.total"
|
|
|
+ :current-page="pagination.page"
|
|
|
+ @current-change="handleCurrentChange"
|
|
|
+ >
|
|
|
+ </el-pagination>
|
|
|
+ </div>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <!-- 添加或修改用户配置对话框 -->
|
|
|
+ <el-dialog :title="title" :visible.sync="open" width="1000px">
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="8">
|
|
|
+ <div class="item">
|
|
|
+ <div class="label">订单状态</div>
|
|
|
+ <div class="value">
|
|
|
+ <span v-if="form.afterSaleStatus > 0">
|
|
|
+ {{
|
|
|
+ form.afterSaleStatus == 0
|
|
|
+ ? "未申请售后"
|
|
|
+ : form.afterSaleStatus == 1
|
|
|
+ ? "已申请售后"
|
|
|
+ : form.afterSaleStatus == 2
|
|
|
+ ? "售后审核失败"
|
|
|
+ : form.afterSaleStatus == 3
|
|
|
+ ? "售后审核成功(退款中)"
|
|
|
+ : form.afterSaleStatus == 4
|
|
|
+ ? "退款成功"
|
|
|
+ : form.afterSaleStatus == 5
|
|
|
+ ? "退款失败(联系客服处理)"
|
|
|
+ : ""
|
|
|
+ }}
|
|
|
+ </span>
|
|
|
+ <span v-else>
|
|
|
+ {{
|
|
|
+ form.orderStatus == 0
|
|
|
+ ? "待修改"
|
|
|
+ : form.orderStatus == 10
|
|
|
+ ? "待支付"
|
|
|
+ : form.orderStatus == 20
|
|
|
+ ? "待发货"
|
|
|
+ : form.orderStatus == 90
|
|
|
+ ? "正在寻找司机"
|
|
|
+ : form.orderStatus == 100
|
|
|
+ ? "等待司机支付保证金"
|
|
|
+ : form.orderStatus == 110
|
|
|
+ ? "等待司机装货"
|
|
|
+ : form.orderStatus == 120
|
|
|
+ ? "运输中"
|
|
|
+ : form.orderStatus == 30
|
|
|
+ ? "已到达"
|
|
|
+ : form.orderStatus == 40
|
|
|
+ ? "交易完成"
|
|
|
+ : form.orderStatus == 50
|
|
|
+ ? "交易关闭"
|
|
|
+ : form.orderStatus == 60
|
|
|
+ ? "退款中"
|
|
|
+ : form.orderStatus == 70
|
|
|
+ ? "退款成功"
|
|
|
+ : form.orderStatus == 80
|
|
|
+ ? "退款失败"
|
|
|
+ : form.orderStatus == 130
|
|
|
+ ? "待处理售后"
|
|
|
+ : form.orderStatus == 140
|
|
|
+ ? "已处理售后"
|
|
|
+ : ""
|
|
|
+ }}
|
|
|
+ </span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </el-col>
|
|
|
+ <!-- <el-col :span="8">
|
|
|
+ <div class="item">
|
|
|
+ <div class="label">物流状态</div>
|
|
|
+ <div class="label">
|
|
|
+ {{
|
|
|
+ form.status == 10
|
|
|
+ ? "待支付"
|
|
|
+ : form.status == 20
|
|
|
+ ? "待装货"
|
|
|
+ : form.status == 30
|
|
|
+ ? "运送中"
|
|
|
+ : form.status == 40
|
|
|
+ ? "已完成"
|
|
|
+ : form.status == 50
|
|
|
+ ? "已完成"
|
|
|
+ : form.status == 60
|
|
|
+ ? "已取消"
|
|
|
+ : ""
|
|
|
+ }}
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </el-col> -->
|
|
|
+ <el-col :span="8">
|
|
|
+ <div class="item">
|
|
|
+ <div class="label">订单类型</div>
|
|
|
+ <div class="label">
|
|
|
+ {{
|
|
|
+ form.orderType == "1"
|
|
|
+ ? "整车订单"
|
|
|
+ : form.orderType == "2"
|
|
|
+ ? "拼车订单"
|
|
|
+ : form.orderType == "3"
|
|
|
+ ? "零售订单"
|
|
|
+ : ""
|
|
|
+ }}
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <h3 style="font-weight: bold">订单明细</h3>
|
|
|
+ <el-row style="line-height: 30px">
|
|
|
+ <el-col :span="8">
|
|
|
+ <div class="item">
|
|
|
+ <div class="label">商品金额</div>
|
|
|
+ <div class="value">{{ form.orderAmount }} 元</div>
|
|
|
+ </div>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <div class="item">
|
|
|
+ <div class="label">商品数量</div>
|
|
|
+ <div class="value">
|
|
|
+ {{ form.quantity }}
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <div class="item">
|
|
|
+ <div class="label">运费</div>
|
|
|
+ <div class="value">{{ form.freightFee }}元</div>
|
|
|
+ </div>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <div class="item">
|
|
|
+ <div class="label">平台服务费</div>
|
|
|
+ <div class="value">{{ form.serviceFee }}元</div>
|
|
|
+ </div>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <div class="item">
|
|
|
+ <div class="label">订单备注</div>
|
|
|
+ <div class="value">
|
|
|
+ {{ form.orderRemark }}
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <h3 style="font-weight: bold">订单信息</h3>
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="8">
|
|
|
+ <div class="item">
|
|
|
+ <div class="label">订单编号</div>
|
|
|
+ <div class="value">
|
|
|
+ {{ form.orderSn }}
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <div class="item">
|
|
|
+ <div class="label">支付时间</div>
|
|
|
+ <div class="value">
|
|
|
+ {{
|
|
|
+ form.orderItemList
|
|
|
+ ? $moment(form.orderItemList[0].orderInfo.paymentTime).format(
|
|
|
+ "YYYY-MM-DD hh:mm:ss"
|
|
|
+ )
|
|
|
+ : ""
|
|
|
+ }}
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <div class="item">
|
|
|
+ <div class="label">支付方式</div>
|
|
|
+ <div class="value">
|
|
|
+ {{
|
|
|
+ form.orderItemList
|
|
|
+ ? form.orderItemList[0].orderInfo.paymentType == "alipay"
|
|
|
+ ? "支付宝支付"
|
|
|
+ : form.orderItemList[0].orderInfo.paymentType == "wechat"
|
|
|
+ ? "微信支付"
|
|
|
+ : form.orderItemList[0].orderInfo.paymentType == "card"
|
|
|
+ ? "银行卡"
|
|
|
+ : ""
|
|
|
+ : ""
|
|
|
+ }}
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <h3 style="font-weight: bold">物流信息</h3>
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="8">
|
|
|
+ <div class="item">
|
|
|
+ <div class="label">运单号</div>
|
|
|
+ <div class="value">
|
|
|
+ {{ form.driverInfo ? form.driverInfo.orderDetails.orderSn : "" }}
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </el-col>
|
|
|
+
|
|
|
+ <el-col :span="8">
|
|
|
+ <div class="item">
|
|
|
+ <div class="label">车长车型</div>
|
|
|
+ <div class="value">
|
|
|
+ {{ form.driverInfo ? form.driverInfo.car.carLength : "" }}米 |
|
|
|
+ {{ form.driverInfo ? form.driverInfo.car.carType : "" }}
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </el-col>
|
|
|
+ <!-- <el-col :span="8">
|
|
|
+ <div class="item">
|
|
|
+ <div class="label">装货时间</div>
|
|
|
+ <div class="value">
|
|
|
+ {{
|
|
|
+ form.shipmentStartDate
|
|
|
+ ? $moment(form.shipmentStartDate).format("YYYY-MM-DD hh:mm:ss")
|
|
|
+ : ""
|
|
|
+ }}-
|
|
|
+ {{
|
|
|
+ form.shipmentEndDate
|
|
|
+ ? $moment(form.shipmentEndDate).format("YYYY-MM-DD hh:mm:ss")
|
|
|
+ : ""
|
|
|
+ }}
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <div class="item">
|
|
|
+ <div class="label">电话号码</div>
|
|
|
+ <div class="value">
|
|
|
+ {{ form.phone }}
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </el-col> -->
|
|
|
+ <!-- <el-col :span="8">
|
|
|
+ <div class="item">
|
|
|
+ <div class="label">预计送达时间</div>
|
|
|
+ <div class="value">
|
|
|
+ {{
|
|
|
+ form.exceptArriveDate
|
|
|
+ ? $moment(form.exceptArriveDate).format("YYYY-MM-DD")
|
|
|
+ : ""
|
|
|
+ }}
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </el-col> -->
|
|
|
+ <el-col :span="8">
|
|
|
+ <div class="item">
|
|
|
+ <div class="label">装货地址</div>
|
|
|
+ <div class="value">
|
|
|
+ {{ form.driverInfo ? form.driverInfo.deliveryAddress.addressDetail : "" }}
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <div class="item">
|
|
|
+ <div class="label">卸货地址</div>
|
|
|
+ <div class="value">
|
|
|
+ {{ form.driverInfo ? form.driverInfo.consigneeAddress.addressDetail : "" }}
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+
|
|
|
+ <h3 style="font-weight: bold">买家信息</h3>
|
|
|
+ <el-row style="line-height: 30px">
|
|
|
+ <el-col :span="8">
|
|
|
+ <div class="item">
|
|
|
+ <div class="label">收货人</div>
|
|
|
+ <div class="value">
|
|
|
+ {{
|
|
|
+ form.orderItemList
|
|
|
+ ? form.orderItemList[0].consigneeAddress.contact.contactName
|
|
|
+ : ""
|
|
|
+ }}
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <div class="item">
|
|
|
+ <div class="label">收货电话</div>
|
|
|
+ <div class="value">
|
|
|
+ {{
|
|
|
+ form.orderItemList
|
|
|
+ ? form.orderItemList[0].consigneeAddress.contact.contactMobile
|
|
|
+ : ""
|
|
|
+ }}
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <div class="item">
|
|
|
+ <div class="label">收货地址</div>
|
|
|
+ <div class="value">
|
|
|
+ {{
|
|
|
+ form.orderItemList
|
|
|
+ ? form.orderItemList[0].consigneeAddress.addressName
|
|
|
+ : ""
|
|
|
+ }}-
|
|
|
+ {{
|
|
|
+ form.orderItemList
|
|
|
+ ? form.orderItemList[0].consigneeAddress.addressDetail
|
|
|
+ : ""
|
|
|
+ }}
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <div class="item">
|
|
|
+ <div class="label">买家手机号</div>
|
|
|
+ <div class="value">
|
|
|
+ {{
|
|
|
+ form.orderItemList
|
|
|
+ ? form.orderItemList[0].consigneeAddress.contact.contactMobile
|
|
|
+ : ""
|
|
|
+ }}
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </el-col>
|
|
|
+ <!-- <el-col :span="12">
|
|
|
+ <div class="item">
|
|
|
+ <div class="label">仓库名称</div>
|
|
|
+ <div class="value">
|
|
|
+ {{ form.wareHouseName }}
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </el-col> -->
|
|
|
+ </el-row>
|
|
|
+
|
|
|
+ <h3 style="font-weight: bold">店铺信息</h3>
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="12">
|
|
|
+ <div class="item">
|
|
|
+ <div class="label">店铺名称</div>
|
|
|
+ <div class="value">{{ form.shopInfo ? form.shopInfo.shopName : "" }}</div>
|
|
|
+ </div>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <h3 style="font-weight: bold">发货人信息</h3>
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="12">
|
|
|
+ <div class="item">
|
|
|
+ <div class="label">发货人</div>
|
|
|
+ <div class="value">
|
|
|
+ {{
|
|
|
+ form.orderItemList
|
|
|
+ ? form.orderItemList[0].deliveryAddress.contact.contactName
|
|
|
+ : ""
|
|
|
+ }}
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="12">
|
|
|
+ <div class="item">
|
|
|
+ <div class="label">发货人电话</div>
|
|
|
+ <div class="value">
|
|
|
+ {{
|
|
|
+ form.orderItemList
|
|
|
+ ? form.orderItemList[0].deliveryAddress.contact.contactMobile
|
|
|
+ : ""
|
|
|
+ }}
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <h3 style="font-weight: bold">商品信息</h3>
|
|
|
+
|
|
|
+ <el-row
|
|
|
+ v-for="(item, index) in form.orderItemList ? form.orderItemList[0].goodsInfo : []"
|
|
|
+ :key="index"
|
|
|
+ >
|
|
|
+ <el-col :span="2">
|
|
|
+ <div class="item">
|
|
|
+ <div class="value">
|
|
|
+ <el-image
|
|
|
+ style="width: 60px; height: 60px"
|
|
|
+ :src="item.skuPic"
|
|
|
+ :preview-src-list="[item.skuPic]"
|
|
|
+ >
|
|
|
+ </el-image>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="6">
|
|
|
+ <div class="item">
|
|
|
+ <div class="label" style="width: 70px">商品名称</div>
|
|
|
+ <div class="value">{{ item.skuName }}</div>
|
|
|
+ </div>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="6">
|
|
|
+ <div class="item">
|
|
|
+ <div class="label" style="width: 50px">价格</div>
|
|
|
+ <div class="value">{{ item.price }}/{{ item.unit }}</div>
|
|
|
+ </div>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="4">
|
|
|
+ <div class="item">
|
|
|
+ <div class="label" style="width: 50px">数量</div>
|
|
|
+ <div class="value">{{ item.quantity }}/{{ item.unit }}</div>
|
|
|
+ </div>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="4">
|
|
|
+ <div class="item">
|
|
|
+ <div class="label" style="width: 50px">金额</div>
|
|
|
+ <div class="value">{{ item.amount }}元</div>
|
|
|
+ </div>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="6">
|
|
|
+ <div class="item" v-for="(res, i) in item.specsValue" :key="i">
|
|
|
+ <div class="label">{{ res.specsName }}</div>
|
|
|
+ <div class="value">{{ res.specsValue }}</div>
|
|
|
+ </div>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </el-dialog>
|
|
|
+ <!-- 添加或修改用户配置对话框 -->
|
|
|
+ <el-dialog
|
|
|
+ title="订单打印"
|
|
|
+ :visible.sync="dyOpen"
|
|
|
+ width="500px"
|
|
|
+ :close-on-click-modal="false"
|
|
|
+ >
|
|
|
+ <div
|
|
|
+ v-loading="printloading"
|
|
|
+ element-loading-text="正在打印中"
|
|
|
+ element-loading-spinner="el-icon-loading"
|
|
|
+ >
|
|
|
+ <el-form
|
|
|
+ :model="form"
|
|
|
+ ref="print"
|
|
|
+ size="small"
|
|
|
+ :inline="true"
|
|
|
+ label-width="100px"
|
|
|
+ >
|
|
|
+ <el-form-item label="打印设备" prop="sn">
|
|
|
+ <el-select v-model="print.sn" placeholder="请选择">
|
|
|
+ <el-option
|
|
|
+ :label="item.name"
|
|
|
+ :value="item.sn"
|
|
|
+ v-for="(item, index) in printList"
|
|
|
+ :key="index"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="打印次数" prop="sn">
|
|
|
+ <el-input-number v-model="print.times" :min="1"></el-input-number>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ </div>
|
|
|
+ <template slot="footer">
|
|
|
+ <div>
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ size="mini"
|
|
|
+ @click="printSubmit"
|
|
|
+ :disabled="printloading"
|
|
|
+ >确定</el-button
|
|
|
+ >
|
|
|
+ <el-button size="mini" @click="dyOpen = false" :disabled="printloading"
|
|
|
+ >取消</el-button
|
|
|
+ >
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-dialog>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+import { printerList } from "@/api/equipment.js";
|
|
|
+import { orderlist, orderDetail, printerPrint, invoiceV2 } from "@/api/order.js";
|
|
|
+export default {
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ isCollapse: false,
|
|
|
+ menuIndex: 1,
|
|
|
+ queryParams: {
|
|
|
+ orderSn: "",
|
|
|
+ status: "",
|
|
|
+ wareHouseId: "",
|
|
|
+ page: 1,
|
|
|
+ size: 10,
|
|
|
+ orderStatus: "ALL",
|
|
|
+ scopes: "1,2",
|
|
|
+ },
|
|
|
+ dyOpen: false,
|
|
|
+ orderStatusList: [
|
|
|
+ {
|
|
|
+ label: "全部",
|
|
|
+ value: "ALL",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "待修改",
|
|
|
+ value: "WAIT_FIX",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "待支付",
|
|
|
+ value: "WAIT_PAY",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "待发货",
|
|
|
+ value: "WAIT_DELIVERY",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "待收货",
|
|
|
+ value: "WAIT_RECEIVE",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "待评价",
|
|
|
+ value: "WAIT_COMMENT",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "取消/售后 ",
|
|
|
+ value: "CANCEL",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "等待司机接单",
|
|
|
+ value: "WAIT_DRIVER_ERCEIVE",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "待发布货运信息",
|
|
|
+ value: "WAIT_PUBLISH_INVOICE",
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ open: false,
|
|
|
+ optionsList: [],
|
|
|
+ loading: false,
|
|
|
+ tableList: [],
|
|
|
+ pagination: {
|
|
|
+ total: 0,
|
|
|
+ size: 10,
|
|
|
+ page: 1,
|
|
|
+ },
|
|
|
+ loading: false,
|
|
|
+ title: "",
|
|
|
+ form: {},
|
|
|
+ printloading: false,
|
|
|
+ print: {
|
|
|
+ sn: "",
|
|
|
+ id: null,
|
|
|
+ times: 1,
|
|
|
+ },
|
|
|
+ printList: [],
|
|
|
+ };
|
|
|
+ },
|
|
|
+ mounted() {
|
|
|
+ this.getList();
|
|
|
+ this.printSelect();
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ printSelect() {
|
|
|
+ printerList({ page: 1, size: 999 }).then((res) => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.printList = res.data.content;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ printSubmit() {
|
|
|
+ this.printloading = true;
|
|
|
+ printerPrint(this.print).then((res) => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.printloading = false;
|
|
|
+ this.$message.success("打印成功!");
|
|
|
+ this.pagination.page = 1;
|
|
|
+ this.dyOpen = false;
|
|
|
+ this.getList();
|
|
|
+ } else {
|
|
|
+ this.$message.error(res.msg);
|
|
|
+ this.pagination.page = 1;
|
|
|
+ this.printloading = false;
|
|
|
+ this.dyOpen = false;
|
|
|
+ this.getList();
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ printOrder(record) {
|
|
|
+ this.print.id = record.id;
|
|
|
+ this.dyOpen = true;
|
|
|
+ },
|
|
|
+ handleDetail(record) {
|
|
|
+ orderDetail(record.id).then((res) => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.form = res.data;
|
|
|
+ invoiceV2(record.id).then((res1) => {
|
|
|
+ if (res1.code == 200) {
|
|
|
+ this.form.driverInfo = res1.data;
|
|
|
+ } else {
|
|
|
+ this.$message.error(res1.msg);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ this.$message.error(res.msg);
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ this.title = "订单详情";
|
|
|
+ this.open = true;
|
|
|
+ },
|
|
|
+ handleCurrentChange(size) {
|
|
|
+ console.log(size);
|
|
|
+ this.queryParams.page = size;
|
|
|
+ this.getList();
|
|
|
+ },
|
|
|
+ handleQuery() {
|
|
|
+ this.getList();
|
|
|
+ this.queryParams.page = 1;
|
|
|
+ },
|
|
|
+ getList() {
|
|
|
+ this.loading = true;
|
|
|
+ orderlist(this.queryParams).then((res) => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ console.log(res);
|
|
|
+ this.tableList = res.data.content;
|
|
|
+ this.pagination.total = res.data.total;
|
|
|
+ this.pagination.page = res.data.page;
|
|
|
+
|
|
|
+ this.loading = false;
|
|
|
+ } else {
|
|
|
+ this.$message.error(res.msg);
|
|
|
+ this.loading = false;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ },
|
|
|
+};
|
|
|
+</script>
|
|
|
+
|
|
|
+<style lang="scss" scoped>
|
|
|
+.item {
|
|
|
+ display: flex;
|
|
|
+ flex-direction: row;
|
|
|
+ align-items: center;
|
|
|
+ .label {
|
|
|
+ min-width: 80px;
|
|
|
+ }
|
|
|
+}
|
|
|
+</style>
|