优化线下渠道订单
This commit is contained in:
parent
cfc5ec812a
commit
3a123971b3
|
|
@ -42,7 +42,7 @@ public class ShopController extends BaseController {
|
||||||
{
|
{
|
||||||
LambdaQueryWrapper<OShop> qw = new LambdaQueryWrapper<OShop>()
|
LambdaQueryWrapper<OShop> qw = new LambdaQueryWrapper<OShop>()
|
||||||
.eq(shop.getType()!=null,OShop::getType,shop.getType())
|
.eq(shop.getType()!=null,OShop::getType,shop.getType())
|
||||||
.ne(shop.getType()==null,OShop::getType,999)
|
// .ne(shop.getType()==null,OShop::getType,999)
|
||||||
;
|
;
|
||||||
List<OShop> list = shopService.list(qw);
|
List<OShop> list = shopService.list(qw);
|
||||||
return getDataTable(list);
|
return getDataTable(list);
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,8 @@ import lombok.Data;
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
public class OrderSearchRequest {
|
public class OrderSearchRequest {
|
||||||
private Integer shopId;
|
private Long shopId;
|
||||||
|
private Integer shopType;
|
||||||
private String orderNum;
|
private String orderNum;
|
||||||
private String orderStatus;
|
private String orderStatus;
|
||||||
private String startTime;
|
private String startTime;
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@ package cn.qihangerp.api.order.controller;
|
||||||
import cn.qihangerp.common.AjaxResult;
|
import cn.qihangerp.common.AjaxResult;
|
||||||
import cn.qihangerp.common.PageQuery;
|
import cn.qihangerp.common.PageQuery;
|
||||||
import cn.qihangerp.common.TableDataInfo;
|
import cn.qihangerp.common.TableDataInfo;
|
||||||
|
import cn.qihangerp.common.bo.ShopOrderShipBo;
|
||||||
import cn.qihangerp.module.order.service.OOrderItemService;
|
import cn.qihangerp.module.order.service.OOrderItemService;
|
||||||
import cn.qihangerp.module.order.service.OOrderService;
|
import cn.qihangerp.module.order.service.OOrderService;
|
||||||
import cn.qihangerp.request.OrderSearchRequest;
|
import cn.qihangerp.request.OrderSearchRequest;
|
||||||
|
|
@ -55,7 +56,7 @@ public class OrderController extends BaseController
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@PostMapping("/pushErp/{ids}")
|
@PostMapping("/pushErp/{ids}")
|
||||||
public AjaxResult remove(@PathVariable Long[] ids) {
|
public AjaxResult pushErp(@PathVariable Long[] ids) {
|
||||||
// for (Long id : ids) {
|
// for (Long id : ids) {
|
||||||
// OOrder oOrder = orderService.getById(id);
|
// OOrder oOrder = orderService.getById(id);
|
||||||
// if (oOrder != null) {
|
// if (oOrder != null) {
|
||||||
|
|
@ -108,4 +109,32 @@ public class OrderController extends BaseController
|
||||||
// return toAjax(result);
|
// return toAjax(result);
|
||||||
// }
|
// }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 订单发货(手动发货)
|
||||||
|
* @param shipBo
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@PostMapping("/manualShipment")
|
||||||
|
public AjaxResult manualShipment(@RequestBody ShopOrderShipBo shipBo)
|
||||||
|
{
|
||||||
|
// var result = orderService.manualShipmentOrder(shipBo,getUsername());
|
||||||
|
// if(result.getCode() == 0) return AjaxResult.success();
|
||||||
|
// else return AjaxResult.error(result.getMsg());
|
||||||
|
return AjaxResult.error("未实现AAA");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分配供应商发货
|
||||||
|
* @param shipBo
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@PostMapping("/allocateShipmentOrder")
|
||||||
|
public AjaxResult allocateShipmentOrder(@RequestBody ShopOrderShipBo shipBo)
|
||||||
|
{
|
||||||
|
// var result = orderService.allocateShipmentOrder(shipBo,getUsername());
|
||||||
|
// if(result.getCode() == 0) return AjaxResult.success();
|
||||||
|
// else return AjaxResult.error(result.getMsg());
|
||||||
|
return AjaxResult.error("未实现AAA");
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -56,31 +56,5 @@ public class TaoOrderController extends BaseController {
|
||||||
return success();
|
return success();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 订单发货(手动发货)
|
|
||||||
* @param shipBo
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@PostMapping("/manualShipment")
|
|
||||||
public AjaxResult manualShipment(@RequestBody ShopOrderShipBo shipBo)
|
|
||||||
{
|
|
||||||
// var result = orderService.manualShipmentOrder(shipBo,getUsername());
|
|
||||||
// if(result.getCode() == 0) return AjaxResult.success();
|
|
||||||
// else return AjaxResult.error(result.getMsg());
|
|
||||||
return AjaxResult.error("未实现");
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 分配供应商发货
|
|
||||||
* @param shipBo
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@PostMapping("/allocateShipmentOrder")
|
|
||||||
public AjaxResult allocateShipmentOrder(@RequestBody ShopOrderShipBo shipBo)
|
|
||||||
{
|
|
||||||
// var result = orderService.allocateShipmentOrder(shipBo,getUsername());
|
|
||||||
// if(result.getCode() == 0) return AjaxResult.success();
|
|
||||||
// else return AjaxResult.error(result.getMsg());
|
|
||||||
return AjaxResult.error("未实现");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1192,7 +1192,7 @@ public class OOrderServiceImpl extends ServiceImpl<OOrderMapper, OOrder>
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* 线下订单通知
|
* 线下订单通知
|
||||||
* @param orderId
|
* @param
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Transactional
|
@Transactional
|
||||||
|
|
@ -1239,7 +1239,7 @@ public class OOrderServiceImpl extends ServiceImpl<OOrderMapper, OOrder>
|
||||||
|
|
||||||
orderMapper.insert(insert);
|
orderMapper.insert(insert);
|
||||||
// 插入orderItem
|
// 插入orderItem
|
||||||
addOfflineOrderItem(insert.getId(), originOrder.getOrderNum(), originOrder.getOrderStatus(), originOrder.getRefundStatus());
|
addOfflineOrderItem(insert.getId(), originOrder.getOrderNum(), originOrder.getOrderStatus(), originOrder.getRefundStatus(),insert.getShopId());
|
||||||
|
|
||||||
//更新推送状态
|
//更新推送状态
|
||||||
OfflineOrder offlineUpdate = new OfflineOrder();
|
OfflineOrder offlineUpdate = new OfflineOrder();
|
||||||
|
|
@ -1252,6 +1252,8 @@ public class OOrderServiceImpl extends ServiceImpl<OOrderMapper, OOrder>
|
||||||
// 修改订单 (修改:)
|
// 修改订单 (修改:)
|
||||||
OOrder update = new OOrder();
|
OOrder update = new OOrder();
|
||||||
update.setId(oOrders.get(0).getId());
|
update.setId(oOrders.get(0).getId());
|
||||||
|
update.setShopType(EnumShopType.OFFLINE.getIndex());
|
||||||
|
update.setShopId(originOrder.getShopId());
|
||||||
update.setRefundStatus(originOrder.getRefundStatus());
|
update.setRefundStatus(originOrder.getRefundStatus());
|
||||||
update.setOrderStatus(originOrder.getOrderStatus());
|
update.setOrderStatus(originOrder.getOrderStatus());
|
||||||
update.setReceiverName(originOrder.getReceiverName());
|
update.setReceiverName(originOrder.getReceiverName());
|
||||||
|
|
@ -1266,12 +1268,14 @@ public class OOrderServiceImpl extends ServiceImpl<OOrderMapper, OOrder>
|
||||||
}
|
}
|
||||||
return ResultVo.success();
|
return ResultVo.success();
|
||||||
}
|
}
|
||||||
private void addOfflineOrderItem(String oOrderId,String originOrderNum,Integer orderStatus,Integer refundStatus){
|
private void addOfflineOrderItem(String oOrderId,String originOrderNum,Integer orderStatus,Integer refundStatus,Long shopId){
|
||||||
List<OfflineOrderItem> originOrderItems = offlineOrderItemMapper.selectList(new LambdaQueryWrapper<OfflineOrderItem>().eq(OfflineOrderItem::getOrderNum, originOrderNum));
|
List<OfflineOrderItem> originOrderItems = offlineOrderItemMapper.selectList(new LambdaQueryWrapper<OfflineOrderItem>().eq(OfflineOrderItem::getOrderNum, originOrderNum));
|
||||||
if(originOrderItems!=null && originOrderItems.size()>0) {
|
if(originOrderItems!=null && originOrderItems.size()>0) {
|
||||||
for (var item : originOrderItems) {
|
for (var item : originOrderItems) {
|
||||||
OOrderItem orderItem = new OOrderItem();
|
OOrderItem orderItem = new OOrderItem();
|
||||||
orderItem.setOrderId(oOrderId);
|
orderItem.setOrderId(oOrderId);
|
||||||
|
orderItem.setShopType(EnumShopType.OFFLINE.getIndex());
|
||||||
|
orderItem.setShopId(shopId);
|
||||||
orderItem.setOrderNum(originOrderNum);
|
orderItem.setOrderNum(originOrderNum);
|
||||||
orderItem.setSubOrderNum(item.getSubOrderNum());
|
orderItem.setSubOrderNum(item.getSubOrderNum());
|
||||||
// 这里将订单商品skuid转换成erp系统的skuid
|
// 这里将订单商品skuid转换成erp系统的skuid
|
||||||
|
|
@ -1339,6 +1343,7 @@ public class OOrderServiceImpl extends ServiceImpl<OOrderMapper, OOrder>
|
||||||
|
|
||||||
LambdaQueryWrapper<OOrder> queryWrapper = new LambdaQueryWrapper<OOrder>()
|
LambdaQueryWrapper<OOrder> queryWrapper = new LambdaQueryWrapper<OOrder>()
|
||||||
.eq(bo.getShopId()!=null,OOrder::getShopId,bo.getShopId())
|
.eq(bo.getShopId()!=null,OOrder::getShopId,bo.getShopId())
|
||||||
|
.eq(bo.getShopType()!=null,OOrder::getShopType,bo.getShopType())
|
||||||
.eq(org.springframework.util.StringUtils.hasText(bo.getOrderNum()),OOrder::getOrderNum,bo.getOrderNum())
|
.eq(org.springframework.util.StringUtils.hasText(bo.getOrderNum()),OOrder::getOrderNum,bo.getOrderNum())
|
||||||
.eq(bo.getOrderStatus()!=null,OOrder::getOrderStatus,bo.getOrderStatus())
|
.eq(bo.getOrderStatus()!=null,OOrder::getOrderStatus,bo.getOrderStatus())
|
||||||
.ge(org.springframework.util.StringUtils.hasText(bo.getStartTime()),OOrder::getOrderTime,bo.getStartTime()+" 00:00:00")
|
.ge(org.springframework.util.StringUtils.hasText(bo.getStartTime()),OOrder::getOrderTime,bo.getStartTime()+" 00:00:00")
|
||||||
|
|
|
||||||
|
|
@ -34,11 +34,23 @@ export function updateErpSkuId(data) {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export function shipOrder(data) {
|
|
||||||
|
|
||||||
|
// 分配供应商发货
|
||||||
|
export function allocateShipmentOrder(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/api/order/ship',
|
url: '/api/oms-api/order/allocateShipmentOrder',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: data
|
data: data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// 手动发货
|
||||||
|
export function manualShipmentOrder(data) {
|
||||||
|
return request({
|
||||||
|
url: '/api/oms-api/order/manualShipment',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,13 +0,0 @@
|
||||||
import request from '@/utils/request'
|
|
||||||
|
|
||||||
// 查询打包发货列表
|
|
||||||
export function listShipOrderWaybill(query) {
|
|
||||||
return request({
|
|
||||||
url: '/api/oms-api/ship/order_waybill_list',
|
|
||||||
method: 'get',
|
|
||||||
params: query
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -44,22 +44,4 @@ export function pushOms(data) {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 分配供应商发货
|
|
||||||
export function allocateShipmentOrder(data) {
|
|
||||||
return request({
|
|
||||||
url: '/api/open-api/tao/order/allocateShipmentOrder',
|
|
||||||
method: 'post',
|
|
||||||
data: data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// 手动发货
|
|
||||||
export function manualShipmentOrder(data) {
|
|
||||||
return request({
|
|
||||||
url: '/api/open-api/tao/order/manualShipment',
|
|
||||||
method: 'post',
|
|
||||||
data: data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -30,38 +30,7 @@
|
||||||
end-placeholder="结束日期">
|
end-placeholder="结束日期">
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="订单状态" prop="orderStatus">
|
|
||||||
<el-select v-model="queryParams.orderStatus" placeholder="请选择状态" clearable @change="handleQuery">
|
|
||||||
<el-option label="待发货" value="1" ></el-option>
|
|
||||||
<el-option label="已发货" value="2"></el-option>
|
|
||||||
<el-option label="已完成" value="3"> </el-option>
|
|
||||||
<el-option label="已取消" value="11"></el-option>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="收件人姓名" prop="receiverName">
|
|
||||||
<el-input
|
|
||||||
v-model="queryParams.receiverName"
|
|
||||||
placeholder="请输入收件人姓名"
|
|
||||||
clearable
|
|
||||||
@keyup.enter.native="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="收件人手机号" prop="receiverMobile">
|
|
||||||
<el-input
|
|
||||||
v-model="queryParams.receiverMobile"
|
|
||||||
placeholder="请输入收件人手机号"
|
|
||||||
clearable
|
|
||||||
@keyup.enter.native="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="快递单号" prop="receiverMobile">
|
|
||||||
<el-input
|
|
||||||
v-model="queryParams.shippingNumber"
|
|
||||||
placeholder="请输入快递单号"
|
|
||||||
clearable
|
|
||||||
@keyup.enter.native="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
<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-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||||
|
|
@ -109,36 +78,44 @@
|
||||||
<el-tag type="info">{{ shopList.find(x=>x.id === scope.row.shopId) ? shopList.find(x=>x.id === scope.row.shopId).name : '' }}</el-tag>
|
<el-tag type="info">{{ shopList.find(x=>x.id === scope.row.shopId) ? shopList.find(x=>x.id === scope.row.shopId).name : '' }}</el-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<!-- <el-table-column label="店铺" align="center" prop="shopId" >-->
|
|
||||||
<!-- <template slot-scope="scope">-->
|
|
||||||
<!-- <span>{{ shopList.find(x=>x.id === scope.row.shopId).name }}</span>-->
|
|
||||||
<!-- </template>-->
|
|
||||||
<!-- </el-table-column>-->
|
|
||||||
<el-table-column label="商品明细" align="center" width="750px" >
|
<el-table-column label="商品明细" align="center" width="750px" >
|
||||||
<template slot="header">
|
<template slot="header">
|
||||||
<table>
|
<table>
|
||||||
<th>
|
<th>
|
||||||
<td width="50px">图片</td>
|
<td width="50px">图片</td>
|
||||||
<td width="250px" align="left">标题</td>
|
<td width="250px" align="left">标题</td>
|
||||||
<td width="150" align="left">SKU名</td>
|
<td width="200" align="left">规格</td>
|
||||||
<td width="200" align="left">Sku编码</td>
|
<td width="150" align="left">Sku编码</td>
|
||||||
<!-- <td width="150" align="left">平台SkuId</td>-->
|
|
||||||
<td width="50" align="left">数量</td>
|
<td width="50" align="left">数量</td>
|
||||||
</th>
|
</th>
|
||||||
</table>
|
</table>
|
||||||
</template>
|
</template>
|
||||||
<template slot-scope="scope" >
|
<template slot-scope="scope" >
|
||||||
<el-table :data="scope.row.itemList" :show-header="false" :cell-style="{border:0 + 'px' }" :row-style="{border:0 + 'px' }" >
|
<el-table :data="scope.row.itemVoList" :show-header="false" :cell-style="{border:0 + 'px' }" :row-style="{border:0 + 'px' }" >
|
||||||
<el-table-column label="商品图片" width="50px">
|
<el-table-column label="商品图片" width="50px">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<!-- <el-image style="width: 40px; height: 40px;" :src="scope.row.goodsImg" :preview-src-list="[scope.row.goodsImg]"></el-image>-->
|
<!-- <el-image style="width: 40px; height: 40px;" :src="scope.row.goodsImg" :preview-src-list="[scope.row.goodsImg]"></el-image>-->
|
||||||
<image-preview :src="scope.row.goodsImg" :width="40" :height="40"/>
|
<image-preview :src="scope.row.goodsImg" :width="40" :height="40"/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="商品名" align="left" width="250px" prop="goodsTitle" />
|
<el-table-column label="商品名" align="left" width="250px" prop="goodsTitle" >
|
||||||
<el-table-column label="SKU名" align="left" prop="goodsSpec" width="150" :show-overflow-tooltip="true"/>
|
<template slot-scope="scope">
|
||||||
<el-table-column label="Sku编码" align="left" prop="skuNum" width="200"/>
|
{{scope.row.goodsTitle}}
|
||||||
<!-- <el-table-column label="平台SkuId" align="left" prop="skuId" width="150"/>-->
|
<!-- <el-tag size="small" v-if="scope.row.refundStatus === 1">无售后或售后关闭</el-tag>-->
|
||||||
|
<el-tag size="small" v-if="scope.row.refundStatus === 2">售后处理中</el-tag>
|
||||||
|
<el-tag size="small" v-if="scope.row.refundStatus === 3">退款中</el-tag>
|
||||||
|
<el-tag size="small" v-if="scope.row.refundStatus === 4">退款成功</el-tag>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="SKU名" align="left" prop="goodsSpec" width="150" :show-overflow-tooltip="true">
|
||||||
|
<el-table-column label="规格" align="left" prop="goodsSpec" width="200">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.goodsSpec}}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="Sku编码" align="left" prop="skuNum" width="150"/>
|
||||||
|
|
||||||
<el-table-column label="商品数量" align="center" prop="quantity" width="50px">
|
<el-table-column label="商品数量" align="center" prop="quantity" width="50px">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-tag size="small" type="danger">{{scope.row.quantity}}</el-tag>
|
<el-tag size="small" type="danger">{{scope.row.quantity}}</el-tag>
|
||||||
|
|
@ -147,107 +124,23 @@
|
||||||
</el-table>
|
</el-table>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<!-- <el-table-column label="商品" width="350">-->
|
|
||||||
<!-- <template slot-scope="scope">-->
|
|
||||||
<!-- <el-row v-for="item in scope.row.itemList" :key="item.id" :gutter="20">-->
|
|
||||||
|
|
||||||
<!-- <div style="float: left;display: flex;align-items: center;" >-->
|
|
||||||
<!-- <el-image style="width: 70px; height: 70px;" :src="item.goodsImg"></el-image>-->
|
|
||||||
<!-- <div style="margin-left:10px">-->
|
|
||||||
<!-- <p>{{item.goodsTitle}}【{{item.goodsSpec}} 】</p>-->
|
|
||||||
<!-- <p>外部ERP编码:{{item.outerErpSkuId}}-->
|
|
||||||
<!-- <el-tag size="small">x {{item.quantity}}</el-tag>-->
|
|
||||||
<!-- </p>-->
|
|
||||||
<!-- </div>-->
|
|
||||||
<!-- </div>-->
|
|
||||||
<!-- </el-row>-->
|
|
||||||
<!-- </template>-->
|
|
||||||
<!-- </el-table-column>-->
|
|
||||||
<el-table-column label="订单金额" align="center" prop="amount" :formatter="amountFormatter" >
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<!-- <p>商品总额:{{amountFormatter(null,null,scope.row.goodsAmount)}}</p>-->
|
|
||||||
<div>
|
|
||||||
<!-- <span style="font-size: 10px">实付:</span>-->
|
|
||||||
<span>{{amountFormatter(null,null,scope.row.payment)}}</span>
|
|
||||||
</div>
|
|
||||||
<!-- <div><span style="font-size: 10px">平台优惠:</span>-->
|
|
||||||
<!-- <span>{{amountFormatter(null,null,scope.row.platformDiscount)}}</span>-->
|
|
||||||
<!-- </div>-->
|
|
||||||
<!-- <div><span style="font-size: 10px">商家优惠:</span>-->
|
|
||||||
<!-- <span>{{amountFormatter(null,null,scope.row.sellerDiscount)}}</span>-->
|
|
||||||
<!-- </div>-->
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<!-- <el-table-column label="实付金额" align="center" prop="payment" :formatter="amountFormatter" />-->
|
|
||||||
<!-- <el-table-column label="订单备注" align="center" prop="remark" :show-overflow-tooltip="true">-->
|
|
||||||
<!-- <template slot-scope="scope">-->
|
|
||||||
<!-- {{scope.row.buyerMemo}}<br />-->
|
|
||||||
<!-- {{scope.row.sellerMemo}}-->
|
|
||||||
<!-- </template>-->
|
|
||||||
<!-- </el-table-column>-->
|
|
||||||
|
|
||||||
|
|
||||||
<el-table-column label="收件信息" prop="receiverName" >
|
<el-table-column label="收件信息" prop="receiverName" >
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{scope.row.receiverName}}
|
{{scope.row.receiverName}}
|
||||||
{{scope.row.receiverMobile}} <br />
|
{{scope.row.receiverMobile}} <br />
|
||||||
{{scope.row.province}} {{scope.row.city}} {{scope.row.town}} <br />
|
{{scope.row.province}} {{scope.row.city}} {{scope.row.town}} <br />
|
||||||
|
{{scope.row.address}}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="发货单号" prop="shippingNumber" >
|
<el-table-column label="快递单号" prop="shippingNumber" >
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<!-- <el-table-column label="发货信息" align="center" prop="shippingNumber" >-->
|
|
||||||
<!-- <template slot-scope="scope">-->
|
|
||||||
<!-- {{scope.row.shippingNumber}} {{scope.row.shippingCompany}}<br />-->
|
|
||||||
<!-- {{ parseTime(scope.row.shippingTime, '{y}-{m}-{d} {h}:{m}:{s}') }}-->
|
|
||||||
<!-- </template>-->
|
|
||||||
<!-- </el-table-column>-->
|
|
||||||
<el-table-column label="下单时间" align="center" prop="orderTime" >
|
<el-table-column label="下单时间" align="center" prop="orderTime" >
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ parseTime(scope.row.orderTime) }}
|
{{ parseTime(scope.row.orderTime) }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="状态" align="center" prop="orderStatus" >
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<el-tag v-if="scope.row.orderStatus === 0" style="margin-bottom: 6px;">新订单</el-tag>
|
|
||||||
<el-tag v-if="scope.row.orderStatus === 1" style="margin-bottom: 6px;">待发货</el-tag>
|
|
||||||
<el-tag v-if="scope.row.orderStatus === 2" style="margin-bottom: 6px;">已发货</el-tag>
|
|
||||||
<el-tag v-if="scope.row.orderStatus === 3" style="margin-bottom: 6px;">已完成</el-tag>
|
|
||||||
<el-tag v-if="scope.row.orderStatus === 21" style="margin-bottom: 6px;">待付款</el-tag>
|
|
||||||
<el-tag v-if="scope.row.orderStatus === 22" style="margin-bottom: 6px;">锁定</el-tag>
|
|
||||||
<el-tag v-if="scope.row.orderStatus === 29" style="margin-bottom: 6px;">删除</el-tag>
|
|
||||||
<el-tag v-if="scope.row.orderStatus === 11" style="margin-bottom: 6px;">已取消</el-tag>
|
|
||||||
<!-- <br />-->
|
|
||||||
<!-- <el-tag style="margin-bottom: 6px;" v-if="scope.row.omsPushStatus === 0">待推送</el-tag>-->
|
|
||||||
<!-- <el-tag style="margin-bottom: 6px;" v-if="scope.row.omsPushStatus === 1">已推送</el-tag>-->
|
|
||||||
|
|
||||||
<!-- <br />-->
|
|
||||||
<!-- <!– 1:无售后或售后关闭,2:售后处理中,3:退款中,4: 退款成功 –>-->
|
|
||||||
<!-- <el-tag v-if="scope.row.refundStatus === 1">无售后或售后关闭</el-tag>-->
|
|
||||||
<!-- <el-tag v-if="scope.row.refundStatus === 2">售后处理中</el-tag>-->
|
|
||||||
<!-- <el-tag v-if="scope.row.refundStatus === 3">退款中</el-tag>-->
|
|
||||||
<!-- <el-tag v-if="scope.row.refundStatus === 4">退款成功</el-tag>-->
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<!-- <el-table-column label="操作" align="center" class-name="small-padding fixed-width">-->
|
|
||||||
<!-- <template slot-scope="scope">-->
|
|
||||||
<!-- <el-button-->
|
|
||||||
<!-- size="mini"-->
|
|
||||||
<!-- type="text"-->
|
|
||||||
<!-- icon="el-icon-view"-->
|
|
||||||
<!-- @click="handleDetail(scope.row)"-->
|
|
||||||
<!-- >详情</el-button>-->
|
|
||||||
<!--<!– <div>–>-->
|
|
||||||
<!--<!– <el-button–>-->
|
|
||||||
<!--<!– size="mini"–>-->
|
|
||||||
<!--<!– type="success"–>-->
|
|
||||||
<!--<!– icon="el-icon-share"–>-->
|
|
||||||
<!--<!– @click="handleShip(scope.row)"–>-->
|
|
||||||
<!--<!– >订单发货</el-button>–>-->
|
|
||||||
<!--<!– </div>–>-->
|
|
||||||
<!-- </template>-->
|
|
||||||
<!-- </el-table-column>-->
|
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
||||||
<pagination
|
<pagination
|
||||||
|
|
@ -304,16 +197,7 @@
|
||||||
<el-tag v-if="form.refundStatus === 3">退款中</el-tag>
|
<el-tag v-if="form.refundStatus === 3">退款中</el-tag>
|
||||||
<el-tag v-if="form.refundStatus === 4">退款成功</el-tag>
|
<el-tag v-if="form.refundStatus === 4">退款成功</el-tag>
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
|
|
||||||
</el-descriptions>
|
</el-descriptions>
|
||||||
<el-descriptions title="付款信息">
|
|
||||||
<el-descriptions-item label="商品总额">{{amountFormatter(null,null,form.goodsAmount,0)}}</el-descriptions-item>
|
|
||||||
<el-descriptions-item label="订单金额">{{amountFormatter(null,null,form.amount,0)}}</el-descriptions-item>
|
|
||||||
<el-descriptions-item label="实际支付金额">{{amountFormatter(null,null,form.payment,0)}}</el-descriptions-item>
|
|
||||||
<el-descriptions-item label="平台优惠金额">{{amountFormatter(null,null,form.platformDiscount,0)}}</el-descriptions-item>
|
|
||||||
<el-descriptions-item label="商家优惠金额">{{amountFormatter(null,null,form.sellerDiscount,0)}}</el-descriptions-item>
|
|
||||||
</el-descriptions>
|
|
||||||
|
|
||||||
|
|
||||||
<el-descriptions title="收货信息">
|
<el-descriptions title="收货信息">
|
||||||
<el-descriptions-item label="收件人姓名">{{form.receiverName}}</el-descriptions-item>
|
<el-descriptions-item label="收件人姓名">{{form.receiverName}}</el-descriptions-item>
|
||||||
|
|
@ -321,12 +205,7 @@
|
||||||
<el-descriptions-item label="省市区">{{form.province}}{{form.city}}{{form.town}}</el-descriptions-item>
|
<el-descriptions-item label="省市区">{{form.province}}{{form.city}}{{form.town}}</el-descriptions-item>
|
||||||
<el-descriptions-item label="详细地址">{{form.address}}</el-descriptions-item>
|
<el-descriptions-item label="详细地址">{{form.address}}</el-descriptions-item>
|
||||||
</el-descriptions>
|
</el-descriptions>
|
||||||
<el-descriptions title="发货信息">
|
|
||||||
|
|
||||||
<el-descriptions-item label="物流公司">{{form.shippingCompany}}</el-descriptions-item>
|
|
||||||
<el-descriptions-item label="物流单号">{{form.shippingNumber}}</el-descriptions-item>
|
|
||||||
<el-descriptions-item label="发货时间">{{form.shippingTime}}</el-descriptions-item>
|
|
||||||
</el-descriptions>
|
|
||||||
|
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
|
|
@ -381,15 +260,101 @@
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
|
<!-- 打包发货对话框 -->
|
||||||
|
<el-dialog title="打包发货" :visible.sync="shipOpen" width="1100px" append-to-body>
|
||||||
|
|
||||||
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px" >
|
||||||
|
<el-descriptions title="订单信息">
|
||||||
|
<el-descriptions-item label="ID">{{form.id}}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="订单号">{{form.orderNum}}</el-descriptions-item>
|
||||||
|
|
||||||
|
<el-descriptions-item label="店铺">
|
||||||
|
{{ shopList.find(x=>x.id == form.shopId)?shopList.find(x=>x.id == form.shopId).name:'' }}
|
||||||
|
<el-tag size="small" v-if="form.shopType === 100">淘宝天猫</el-tag>
|
||||||
|
<el-tag size="small" v-if="form.shopType === 200">京东POP</el-tag>
|
||||||
|
<el-tag size="small" v-if="form.shopType === 300">拼多多</el-tag>
|
||||||
|
<el-tag size="small" v-if="form.shopType === 400">抖店</el-tag>
|
||||||
|
<el-tag size="small" v-if="form.shopType === 500">微信小店</el-tag>
|
||||||
|
<el-tag size="small" v-if="form.shopType === 999">线下渠道</el-tag>
|
||||||
|
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="买家留言">
|
||||||
|
{{form.buyerMemo}}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="备注">
|
||||||
|
{{form.remark}}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="下单时间">
|
||||||
|
{{ parseTime(form.orderTime) }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="收件人姓名">{{form.receiverName}}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="收件人手机号">{{form.receiverMobile}}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="省市区">{{form.province}}{{form.city}}{{form.town}}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="详细地址">{{form.address}}</el-descriptions-item>
|
||||||
|
</el-descriptions>
|
||||||
|
|
||||||
|
<el-divider content-position="center">商品明细</el-divider>
|
||||||
|
<el-table :data="form.itemVoList" style="margin-bottom: 10px;">
|
||||||
|
<!-- <el-table-column type="selection" width="50" align="center" /> -->
|
||||||
|
<el-table-column label="序号" align="center" type="index" width="50"/>
|
||||||
|
|
||||||
|
<el-table-column label="商品图片" prop="goodsImg" width="80">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-image style="width: 70px; height: 70px" :src="scope.row.goodsImg"></el-image>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="商品标题" prop="goodsTitle" ></el-table-column>
|
||||||
|
<el-table-column label="规格" prop="goodsSpec" width="350"></el-table-column>
|
||||||
|
<el-table-column label="sku编码" prop="skuNum"></el-table-column>
|
||||||
|
<el-table-column label="数量" prop="quantity"></el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<el-form-item label="包裹尺寸" prop="height">
|
||||||
|
<el-input type="number" v-model.number="form.length" placeholder="长mm" style="width:90px" /> x
|
||||||
|
<el-input type="number" v-model.number="form.width" placeholder="宽mm" style="width:90px" /> x
|
||||||
|
<el-input type="number" v-model.number="form.height" placeholder="高mm" style="width:90px" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="包裹重量" prop="weight">
|
||||||
|
<el-input type="number" v-model.number="form.weight" placeholder="请输入包裹重量(单位g)" style="width:300px" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-row>
|
||||||
|
<el-col>
|
||||||
|
<el-form-item label="物流公司" prop="shippingCompany">
|
||||||
|
<!-- <el-input v-model="form.shippingCompany" placeholder="请输入物流公司" style="width:300px" />-->
|
||||||
|
<el-select v-model="form.shippingCompany" filterable r placeholder="选择快递公司" style="width:300px">
|
||||||
|
<el-option v-for="item in logisticsList" :key="item.id" :label="item.name" :value="item.id">
|
||||||
|
<span style="float: left">{{ item.name }}</span>
|
||||||
|
<span style="float: right; color: #8492a6; font-size: 13px" >{{item.number}}</span>
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="物流单号" prop="shippingNumber">
|
||||||
|
<el-input v-model="form.shippingNumber" placeholder="请输入物流单号" style="width:300px" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="物流费用" prop="shippingCost">
|
||||||
|
<el-input v-model="form.shippingCost" placeholder="请输入物流费用" style="width:300px" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="发货人" prop="shippingMan">
|
||||||
|
<el-input v-model="form.shippingMan" placeholder="请输入发货人" style="width:300px" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button type="primary" @click="submitShipForm">确 定</el-button>
|
||||||
|
<el-button @click="cancel">取 消</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {listOrder, getOrder, delOrder, addOrder, updateOrder, pushOms} from "@/api/offline/order";
|
import {listOrder, getOrder,manualShipmentOrder} from "@/api/order/order";
|
||||||
// import { listShop } from "@/api/offline/shop";
|
import {listLogisticsStatus, listShop} from "@/api/shop/shop";
|
||||||
import { listShop } from "@/api/shop/shop";
|
|
||||||
import Clipboard from "clipboard";
|
import Clipboard from "clipboard";
|
||||||
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "printOffline",
|
name: "printOffline",
|
||||||
data() {
|
data() {
|
||||||
|
|
@ -411,12 +376,12 @@ export default {
|
||||||
total: 0,
|
total: 0,
|
||||||
// 店铺订单表格数据
|
// 店铺订单表格数据
|
||||||
orderList: [],
|
orderList: [],
|
||||||
// ${subTable.functionName}表格数据
|
logisticsList: [],
|
||||||
sShopOrderItemList: [],
|
|
||||||
shopList:[],
|
shopList:[],
|
||||||
// 弹出层标题
|
// 弹出层标题
|
||||||
detailTitle:'订单详情',
|
detailTitle:'订单详情',
|
||||||
detailOpen:false,
|
detailOpen:false,
|
||||||
|
shipOpen:false,
|
||||||
isAudit:false,
|
isAudit:false,
|
||||||
activeName: 'orderDetail',
|
activeName: 'orderDetail',
|
||||||
orderTime: null,
|
orderTime: null,
|
||||||
|
|
@ -426,16 +391,21 @@ export default {
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
orderNum: null,
|
orderNum: null,
|
||||||
shopId: null,
|
shopId: null,
|
||||||
|
shopType: 999,
|
||||||
startTime: null,
|
startTime: null,
|
||||||
endTime: null,
|
endTime: null,
|
||||||
refundStatus: null,
|
refundStatus: 1,
|
||||||
orderStatus: null
|
orderStatus: 1
|
||||||
},
|
},
|
||||||
// 表单参数
|
// 表单参数
|
||||||
form: {},
|
form: {},
|
||||||
// 表单校验
|
// 表单校验
|
||||||
rules: {
|
rules: {
|
||||||
|
height: [{ required: true, message: '不能为空' }],
|
||||||
|
weight: [{ required: true, message: '不能为空' }],
|
||||||
|
shippingNumber: [{ required: true, message: '不能为空' }],
|
||||||
|
shippingCompany: [{ required: true, message: '不能为空' }],
|
||||||
|
shippingCost: [{ required: true, message: '不能为空' }],
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
@ -465,9 +435,7 @@ export default {
|
||||||
clipboard.destroy()
|
clipboard.destroy()
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
amountFormatter(row, column, cellValue, index) {
|
|
||||||
return '¥' + parseFloat(cellValue).toFixed(2).replace(/\d(?=(\d{3})+\.)/g, '$&,');
|
|
||||||
},
|
|
||||||
|
|
||||||
/** 查询店铺订单列表 */
|
/** 查询店铺订单列表 */
|
||||||
getList() {
|
getList() {
|
||||||
|
|
@ -499,11 +467,17 @@ export default {
|
||||||
},
|
},
|
||||||
// 多选框选中数据
|
// 多选框选中数据
|
||||||
handleSelectionChange(selection) {
|
handleSelectionChange(selection) {
|
||||||
this.ids = selection.map(item => item.orderNum)
|
this.ids = selection.map(item => item.id)
|
||||||
this.single = selection.length!==1
|
this.single = selection.length!==1
|
||||||
this.multiple = !selection.length
|
this.multiple = !selection.length
|
||||||
},
|
},
|
||||||
|
// 取消按钮
|
||||||
|
cancel() {
|
||||||
|
this.getCodeOpen = false;
|
||||||
|
this.shipOpen = false;
|
||||||
|
this.allocateShipmentOpen = false;
|
||||||
|
this.reset();
|
||||||
|
},
|
||||||
reset(){
|
reset(){
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
@ -521,6 +495,37 @@ export default {
|
||||||
});
|
});
|
||||||
this.isAudit = false
|
this.isAudit = false
|
||||||
},
|
},
|
||||||
|
// 手动发货按钮
|
||||||
|
handleShip(row){
|
||||||
|
this.reset();
|
||||||
|
const id = row.id || this.ids
|
||||||
|
console.log('======',id)
|
||||||
|
getOrder(id).then(response => {
|
||||||
|
this.form = response.data;
|
||||||
|
this.form.length=0
|
||||||
|
this.form.width=0
|
||||||
|
this.form.height=0
|
||||||
|
this.form.weight=0.0
|
||||||
|
this.form.shippingCost=0.0
|
||||||
|
listLogisticsStatus({}).then(resp=>{
|
||||||
|
this.logisticsList = resp.rows
|
||||||
|
})
|
||||||
|
this.shipOpen = true;
|
||||||
|
// this.detailTitle = "订单详情";
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 手动发货表单
|
||||||
|
submitShipForm(){
|
||||||
|
this.$refs["form"].validate(valid => {
|
||||||
|
if (valid) {
|
||||||
|
manualShipmentOrder(this.form).then(resp =>{
|
||||||
|
this.$modal.msgSuccess("手动发货成功");
|
||||||
|
this.shipOpen = false
|
||||||
|
this.getList()
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -1,265 +0,0 @@
|
||||||
<template>
|
|
||||||
<div class="app-container">
|
|
||||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
|
||||||
<el-form-item label="订单编号" prop="orderId">
|
|
||||||
<el-input
|
|
||||||
v-model="queryParams.orderId"
|
|
||||||
placeholder="请输入订单编号"
|
|
||||||
clearable
|
|
||||||
@keyup.enter.native="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
|
|
||||||
<el-form-item label="快递单号" prop="waybillCode">
|
|
||||||
<el-input
|
|
||||||
v-model="queryParams.waybillCode"
|
|
||||||
placeholder="请输入快递单号"
|
|
||||||
clearable
|
|
||||||
@keyup.enter.native="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="店铺" prop="shopId">
|
|
||||||
<el-select v-model="queryParams.shopId" placeholder="请选择店铺" clearable @change="handleQuery">
|
|
||||||
<el-option
|
|
||||||
v-for="item in shopList"
|
|
||||||
:key="item.id"
|
|
||||||
:label="item.name"
|
|
||||||
:value="item.id">
|
|
||||||
<span style="float: left">{{ item.name }}</span>
|
|
||||||
<span style="float: right; color: #8492a6; font-size: 13px" v-if="item.platform === 1">1688</span>
|
|
||||||
<span style="float: right; color: #8492a6; font-size: 13px" v-if="item.platform === 2">视频号小店</span>
|
|
||||||
<span style="float: right; color: #8492a6; font-size: 13px" v-if="item.platform === 3">京东</span>
|
|
||||||
<span style="float: right; color: #8492a6; font-size: 13px" v-if="item.platform === 4">淘宝天猫</span>
|
|
||||||
<span style="float: right; color: #8492a6; font-size: 13px" v-if="item.platform === 5">拼多多</span>
|
|
||||||
<span style="float: right; color: #8492a6; font-size: 13px" v-if="item.platform === 6">抖店</span>
|
|
||||||
<span style="float: right; color: #8492a6; font-size: 13px" v-if="item.platform === 7">小红书</span>
|
|
||||||
<span style="float: right; color: #8492a6; font-size: 13px" v-if="item.platform === 8">快手</span>
|
|
||||||
<span style="float: right; color: #8492a6; font-size: 13px" v-if="item.platform === 99">其他渠道</span>
|
|
||||||
</el-option>
|
|
||||||
</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-row :gutter="10" class="mb8">
|
|
||||||
<el-col :span="1.5">
|
|
||||||
<el-button
|
|
||||||
type="warning"
|
|
||||||
plain
|
|
||||||
icon="el-icon-download"
|
|
||||||
size="mini"
|
|
||||||
@click="handleExport"
|
|
||||||
v-hasPermi="['shop:order:export']"
|
|
||||||
>导出</el-button>
|
|
||||||
</el-col>
|
|
||||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
|
||||||
</el-row>
|
|
||||||
|
|
||||||
<el-table v-loading="loading" :data="orderList" @selection-change="handleSelectionChange">
|
|
||||||
<!-- <el-table-column type="selection" width="55" align="center" />-->
|
|
||||||
<el-table-column label="订单号" align="left" prop="orderId" width="220"/>
|
|
||||||
<el-table-column label="店铺" prop="orderId" align="left" >
|
|
||||||
<template slot-scope="scope">
|
|
||||||
{{shopList.find(x=>x.id === scope.row.shopId).name}}
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
|
|
||||||
<el-table-column label="物流公司" align="center" prop="logisticsCode" />
|
|
||||||
<el-table-column label="物流单号" align="center" prop="waybillCode" />
|
|
||||||
<el-table-column label="取号时间" align="center" prop="createTime" >
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d} {h}:{m}:{s}') }}</span>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="发货时间" align="center" prop="updateTime" >
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<span>{{ parseTime(scope.row.updateTime, '{y}-{m}-{d} {h}:{m}:{s}') }}</span>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
|
|
||||||
<el-table-column label="状态" align="center" prop="status" >
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<el-tag size="small" v-if="scope.row.status === 0">待备货</el-tag>
|
|
||||||
<el-tag size="small" v-if="scope.row.status === 1">备货中</el-tag>
|
|
||||||
<el-tag size="small" v-if="scope.row.status === 2">已出库</el-tag>
|
|
||||||
<el-tag size="small" v-if="scope.row.status === 3">已发货</el-tag>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<!-- <el-table-column label="快递单号" align="center" prop="shippingNumber" />-->
|
|
||||||
<!-- <el-table-column label="物流公司" align="center" prop="shippingCompany" /> -->
|
|
||||||
<!-- <el-table-column label="操作" align="center" class-name="small-padding fixed-width">-->
|
|
||||||
<!-- <template slot-scope="scope">-->
|
|
||||||
<!-- <el-col :span="24">-->
|
|
||||||
<!-- <el-button-->
|
|
||||||
<!-- size="mini" style="width: 80px;"-->
|
|
||||||
<!-- type="success"-->
|
|
||||||
<!-- icon="el-icon-s-promotion"-->
|
|
||||||
<!-- @click="handleShip(scope.row)"-->
|
|
||||||
<!-- v-hasPermi="['shop:order:edit']"-->
|
|
||||||
<!-- >打包发货</el-button>-->
|
|
||||||
<!-- </el-col>-->
|
|
||||||
<!-- <el-button-->
|
|
||||||
<!-- size="mini"-->
|
|
||||||
<!-- type="text"-->
|
|
||||||
<!-- icon="el-icon-view"-->
|
|
||||||
<!-- @click="handleDetail(scope.row)"-->
|
|
||||||
<!-- v-hasPermi="['shop:order:edit']"-->
|
|
||||||
<!-- >详情</el-button>-->
|
|
||||||
<!-- <el-button-->
|
|
||||||
<!-- size="mini"-->
|
|
||||||
<!-- type="text"-->
|
|
||||||
<!-- icon="el-icon-view"-->
|
|
||||||
<!-- @click="handleDetail(scope.row)"-->
|
|
||||||
<!-- v-hasPermi="['shop:order:edit']"-->
|
|
||||||
<!-- >打印发货单</el-button>-->
|
|
||||||
|
|
||||||
<!-- </template>-->
|
|
||||||
<!-- </el-table-column>-->
|
|
||||||
</el-table>
|
|
||||||
|
|
||||||
<pagination
|
|
||||||
v-show="total>0"
|
|
||||||
:total="total"
|
|
||||||
:page.sync="queryParams.pageNum"
|
|
||||||
:limit.sync="queryParams.pageSize"
|
|
||||||
@pagination="getList"
|
|
||||||
/>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import {listShipOrderWaybill} from "@/api/shipping/shipOrder";
|
|
||||||
import { listShop } from "@/api/shop/shop";
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: "ShipOrderLogistics",
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
// 遮罩层
|
|
||||||
loading: true,
|
|
||||||
// 选中数组
|
|
||||||
ids: [],
|
|
||||||
// 子表选中数据
|
|
||||||
checkedSShopOrderItem: [],
|
|
||||||
// 非单个禁用
|
|
||||||
single: true,
|
|
||||||
// 非多个禁用
|
|
||||||
multiple: true,
|
|
||||||
// 显示搜索条件
|
|
||||||
showSearch: true,
|
|
||||||
// 总条数
|
|
||||||
total: 0,
|
|
||||||
// 店铺订单表格数据
|
|
||||||
orderList: [],
|
|
||||||
// ${subTable.functionName}表格数据
|
|
||||||
sShopOrderItemList: [],
|
|
||||||
shopList:[],
|
|
||||||
// 弹出层标题
|
|
||||||
detailTitle:'订单详情',
|
|
||||||
detailOpen:false,
|
|
||||||
isAudit:false,
|
|
||||||
shipOpen:false,
|
|
||||||
// 查询参数
|
|
||||||
queryParams: {
|
|
||||||
pageNum: 1,
|
|
||||||
pageSize: 10,
|
|
||||||
shipStatus: 3
|
|
||||||
},
|
|
||||||
logisticsList:[],
|
|
||||||
// 表单参数
|
|
||||||
form: {},
|
|
||||||
// 表单校验
|
|
||||||
rules: {
|
|
||||||
height: [{ required: true, message: '不能为空' }],
|
|
||||||
weight: [{ required: true, message: '不能为空' }],
|
|
||||||
shippingNumber: [{ required: true, message: '不能为空' }],
|
|
||||||
shippingCompany: [{ required: true, message: '不能为空' }],
|
|
||||||
shippingMan: [{ required: true, message: '不能为空' }],
|
|
||||||
}
|
|
||||||
};
|
|
||||||
},
|
|
||||||
created() {
|
|
||||||
listShop({}).then(response => {
|
|
||||||
this.shopList = response.rows;
|
|
||||||
});
|
|
||||||
this.getList();
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
/** 查询店铺订单列表 */
|
|
||||||
getList() {
|
|
||||||
this.loading = true;
|
|
||||||
listShipOrderWaybill(this.queryParams).then(response => {
|
|
||||||
this.orderList = response.rows;
|
|
||||||
this.total = response.total;
|
|
||||||
this.loading = false;
|
|
||||||
});
|
|
||||||
},
|
|
||||||
/** 搜索按钮操作 */
|
|
||||||
handleQuery() {
|
|
||||||
this.queryParams.pageNum = 1;
|
|
||||||
this.getList();
|
|
||||||
},
|
|
||||||
/** 重置按钮操作 */
|
|
||||||
resetQuery() {
|
|
||||||
this.resetForm("queryForm");
|
|
||||||
this.handleQuery();
|
|
||||||
},
|
|
||||||
// 多选框选中数据
|
|
||||||
handleSelectionChange(selection) {
|
|
||||||
this.ids = selection.map(item => item.id)
|
|
||||||
this.single = selection.length!==1
|
|
||||||
this.multiple = !selection.length
|
|
||||||
},
|
|
||||||
cancel(){
|
|
||||||
this.shipOpen = false
|
|
||||||
},
|
|
||||||
/** 导出按钮操作 */
|
|
||||||
handleExport() {
|
|
||||||
this.download('api/order/export', {
|
|
||||||
...this.queryParams
|
|
||||||
}, `order_${new Date().getTime()}.xlsx`)
|
|
||||||
},
|
|
||||||
reset(){
|
|
||||||
|
|
||||||
},
|
|
||||||
/** 删除按钮操作 */
|
|
||||||
handleDetail(row) {
|
|
||||||
this.reset();
|
|
||||||
const id = row.id || this.ids
|
|
||||||
getOrder(id).then(response => {
|
|
||||||
this.form = response.data;
|
|
||||||
// this.$nextTick(()=>{
|
|
||||||
// this.form.shipType = response.data.shipType
|
|
||||||
// })
|
|
||||||
this.detailOpen = true;
|
|
||||||
this.detailTitle = "订单详情";
|
|
||||||
});
|
|
||||||
this.isAudit = false
|
|
||||||
},
|
|
||||||
/** 打包发货 **/
|
|
||||||
handleShip(row){
|
|
||||||
this.reset();
|
|
||||||
getOrder(row.id).then(response => {
|
|
||||||
this.form = response.data;
|
|
||||||
|
|
||||||
this.shipOpen = true;
|
|
||||||
// this.detailTitle = "订单详情";
|
|
||||||
});
|
|
||||||
|
|
||||||
},
|
|
||||||
submitShipForm(){
|
|
||||||
this.$refs["form"].validate(valid => {
|
|
||||||
if (valid) {
|
|
||||||
shipOrder(this.form).then(resp =>{
|
|
||||||
this.$modal.msgSuccess("发货成功");
|
|
||||||
})
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
Loading…
Reference in New Issue