Merge branch 'master' of http://gitea.yxtsoft.com/yxt_group/mallplus
This commit is contained in:
@@ -8,8 +8,10 @@ import com.zscat.mallplus.enums.AllEnum;
|
|||||||
import com.zscat.mallplus.enums.ConstansValue;
|
import com.zscat.mallplus.enums.ConstansValue;
|
||||||
import com.zscat.mallplus.oms.entity.OmsOrder;
|
import com.zscat.mallplus.oms.entity.OmsOrder;
|
||||||
import com.zscat.mallplus.oms.entity.OmsOrderItem;
|
import com.zscat.mallplus.oms.entity.OmsOrderItem;
|
||||||
|
import com.zscat.mallplus.oms.entity.OmsOrderLocation;
|
||||||
import com.zscat.mallplus.oms.entity.OmsOrderOperateHistory;
|
import com.zscat.mallplus.oms.entity.OmsOrderOperateHistory;
|
||||||
import com.zscat.mallplus.oms.mapper.OmsOrderOperateHistoryMapper;
|
import com.zscat.mallplus.oms.mapper.OmsOrderOperateHistoryMapper;
|
||||||
|
import com.zscat.mallplus.oms.query.OmsOrderLocationQuery;
|
||||||
import com.zscat.mallplus.oms.query.OmsOrderQuery;
|
import com.zscat.mallplus.oms.query.OmsOrderQuery;
|
||||||
import com.zscat.mallplus.oms.service.IOmsOrderItemService;
|
import com.zscat.mallplus.oms.service.IOmsOrderItemService;
|
||||||
import com.zscat.mallplus.oms.service.IOmsOrderService;
|
import com.zscat.mallplus.oms.service.IOmsOrderService;
|
||||||
@@ -253,5 +255,45 @@ public class OmsOrderController {
|
|||||||
return new CommonResult().success(IOmsOrderService.chartCount());
|
return new CommonResult().success(IOmsOrderService.chartCount());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@GetMapping(value = "/getLocation")
|
||||||
|
public Object getLocation() {
|
||||||
|
return new CommonResult().success(IOmsOrderService.getLocation());
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping(value = "/getPickupPoint")
|
||||||
|
public Object getPickupPoint(@RequestParam("id") String id) {
|
||||||
|
return new CommonResult().success(IOmsOrderService.getPickupPoint(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
@SysLog(MODULE = "oms", REMARK = "根据条件查询所有订单表列表")
|
||||||
|
@ApiOperation("根据条件查询所有订单表列表")
|
||||||
|
@GetMapping(value = "/getOmsOrderLocationByPage")
|
||||||
|
@PreAuthorize("hasAuthority('oms:OmsOrder:read')")
|
||||||
|
public Object getOmsOrderLocationByPage(OmsOrderLocationQuery omsOrderLocationQuery,
|
||||||
|
@RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
|
||||||
|
@RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize
|
||||||
|
) {
|
||||||
|
try {
|
||||||
|
QueryWrapper<OmsOrder> qw = new QueryWrapper<>();
|
||||||
|
if(StringUtils.isNotBlank(omsOrderLocationQuery.getValueqhd())){
|
||||||
|
qw.eq("receiver_detail_address",omsOrderLocationQuery.getValueqhd());
|
||||||
|
}
|
||||||
|
if(StringUtils.isNotBlank(omsOrderLocationQuery.getValueszd())){
|
||||||
|
qw.eq("receiver_region",omsOrderLocationQuery.getValueszd());
|
||||||
|
}
|
||||||
|
if(StringUtils.isNotBlank(omsOrderLocationQuery.getReceiverPhone())){
|
||||||
|
qw.like("receiver_phone",omsOrderLocationQuery.getReceiverPhone());
|
||||||
|
}
|
||||||
|
if(StringUtils.isNotBlank(omsOrderLocationQuery.getStatus())){
|
||||||
|
qw.eq("status",omsOrderLocationQuery.getStatus());
|
||||||
|
|
||||||
|
}
|
||||||
|
IPage<OmsOrder> page = IOmsOrderService.page(new Page<OmsOrder>(pageNum, pageSize), qw.orderByDesc("create_time").select(ConstansValue.sampleOrderList));
|
||||||
|
return new CommonResult().success(page);
|
||||||
|
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error("根据条件查询所有订单表列表:%s", e.getMessage(), e);
|
||||||
|
}
|
||||||
|
return new CommonResult().failed();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ package com.zscat.mallplus.oms.service;
|
|||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import com.zscat.mallplus.oms.entity.OmsOrder;
|
import com.zscat.mallplus.oms.entity.OmsOrder;
|
||||||
|
import com.zscat.mallplus.oms.entity.OmsOrderLocation;
|
||||||
import com.zscat.mallplus.oms.vo.*;
|
import com.zscat.mallplus.oms.vo.*;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
@@ -75,4 +76,8 @@ public interface IOmsOrderService extends IService<OmsOrder> {
|
|||||||
List<OrderStstic> listOrderGroupByStatus(Integer status);
|
List<OrderStstic> listOrderGroupByStatus(Integer status);
|
||||||
|
|
||||||
Map orderMonthStatic(String date, Integer status);
|
Map orderMonthStatic(String date, Integer status);
|
||||||
|
|
||||||
|
List<OmsOrderLocation> getLocation();
|
||||||
|
|
||||||
|
List<OmsOrderLocation> getPickupPoint(String id);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|||||||
import com.zscat.mallplus.enums.OrderStatus;
|
import com.zscat.mallplus.enums.OrderStatus;
|
||||||
import com.zscat.mallplus.enums.StatusEnum;
|
import com.zscat.mallplus.enums.StatusEnum;
|
||||||
import com.zscat.mallplus.oms.entity.OmsOrder;
|
import com.zscat.mallplus.oms.entity.OmsOrder;
|
||||||
|
import com.zscat.mallplus.oms.entity.OmsOrderLocation;
|
||||||
import com.zscat.mallplus.oms.entity.OmsOrderOperateHistory;
|
import com.zscat.mallplus.oms.entity.OmsOrderOperateHistory;
|
||||||
import com.zscat.mallplus.oms.mapper.OmsOrderMapper;
|
import com.zscat.mallplus.oms.mapper.OmsOrderMapper;
|
||||||
import com.zscat.mallplus.oms.mapper.OmsOrderOperateHistoryMapper;
|
import com.zscat.mallplus.oms.mapper.OmsOrderOperateHistoryMapper;
|
||||||
@@ -295,4 +296,14 @@ public class OmsOrderServiceImpl extends ServiceImpl<OmsOrderMapper, OmsOrder> i
|
|||||||
public Map orderMonthStatic(String date, Integer status) {
|
public Map orderMonthStatic(String date, Integer status) {
|
||||||
return orderMapper.orderMonthStatic(date, status);
|
return orderMapper.orderMonthStatic(date, status);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<OmsOrderLocation> getLocation() {
|
||||||
|
return orderMapper.getLocation();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<OmsOrderLocation> getPickupPoint(String id) {
|
||||||
|
return orderMapper.getPickupPoint(id);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,14 @@
|
|||||||
|
package com.zscat.mallplus.oms.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class OmsOrderLocation {
|
||||||
|
|
||||||
|
@TableField("id")
|
||||||
|
private String id;
|
||||||
|
@TableField("name")
|
||||||
|
private String name;
|
||||||
|
}
|
||||||
@@ -3,6 +3,7 @@ package com.zscat.mallplus.oms.mapper;
|
|||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import com.zscat.mallplus.oms.entity.OmsOrder;
|
import com.zscat.mallplus.oms.entity.OmsOrder;
|
||||||
import com.zscat.mallplus.oms.entity.OmsOrderItem;
|
import com.zscat.mallplus.oms.entity.OmsOrderItem;
|
||||||
|
import com.zscat.mallplus.oms.entity.OmsOrderLocation;
|
||||||
import com.zscat.mallplus.oms.vo.OmsOrderDeliveryParam;
|
import com.zscat.mallplus.oms.vo.OmsOrderDeliveryParam;
|
||||||
import com.zscat.mallplus.oms.vo.OmsOrderDetail;
|
import com.zscat.mallplus.oms.vo.OmsOrderDetail;
|
||||||
import com.zscat.mallplus.oms.vo.OrderStstic;
|
import com.zscat.mallplus.oms.vo.OrderStstic;
|
||||||
@@ -75,4 +76,7 @@ public interface OmsOrderMapper extends BaseMapper<OmsOrder> {
|
|||||||
|
|
||||||
List<OrderStstic> listOrderGroupByStatus(Integer status);
|
List<OrderStstic> listOrderGroupByStatus(Integer status);
|
||||||
|
|
||||||
|
List<OmsOrderLocation> getLocation();
|
||||||
|
|
||||||
|
List<OmsOrderLocation> getPickupPoint(String id);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,20 @@
|
|||||||
|
package com.zscat.mallplus.oms.query;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author dimengzhe
|
||||||
|
* @Date 2023/3/14 16:49
|
||||||
|
* @Description
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class OmsOrderLocationQuery {
|
||||||
|
@ApiModelProperty(value = "所在地id",required = false)
|
||||||
|
private String valueszd;
|
||||||
|
@ApiModelProperty(value = "取货点id",required = false)
|
||||||
|
private String valueqhd;
|
||||||
|
@ApiModelProperty(value = "收货人电话",required = false)
|
||||||
|
private String receiverPhone;
|
||||||
|
private String status;
|
||||||
|
}
|
||||||
@@ -22,7 +22,8 @@ public class OrderParam {
|
|||||||
//使用的积分数
|
//使用的积分数
|
||||||
private Integer useIntegration;
|
private Integer useIntegration;
|
||||||
//支付方式
|
//支付方式
|
||||||
private Integer payType = 1;
|
// private Integer payType = 1;
|
||||||
|
private Integer payType = 0;
|
||||||
private Integer offline;// 0 送货 1 自取
|
private Integer offline;// 0 送货 1 自取
|
||||||
private String lading_mobile; //自取人电话
|
private String lading_mobile; //自取人电话
|
||||||
private String lading_name; //自取人姓名
|
private String lading_name; //自取人姓名
|
||||||
|
|||||||
@@ -230,4 +230,11 @@
|
|||||||
|
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="getPickupPoint" resultType="com.zscat.mallplus.oms.entity.OmsOrderLocation">
|
||||||
|
select id,name from building_community where company_id = #{id}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="getLocation" resultType="com.zscat.mallplus.oms.entity.OmsOrderLocation">
|
||||||
|
select id,name from build_wuye_company
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
@@ -2196,10 +2196,10 @@ public class OmsOrderServiceImpl extends ServiceImpl<OmsOrderMapper, OmsOrder> i
|
|||||||
//总金额+运费-促销优惠-优惠券优惠-积分抵扣
|
//总金额+运费-促销优惠-优惠券优惠-积分抵扣
|
||||||
BigDecimal payAmount = order.getTotalAmount()
|
BigDecimal payAmount = order.getTotalAmount()
|
||||||
.add(order.getFreightAmount())
|
.add(order.getFreightAmount())
|
||||||
.subtract(order.getPromotionAmount())
|
/*.subtract(order.getPromotionAmount())*/
|
||||||
.subtract(order.getCouponAmount())
|
.subtract(order.getCouponAmount())
|
||||||
.subtract(order.getIntegrationAmount())
|
/*.subtract(order.getIntegrationAmount())*/;
|
||||||
.subtract(order.getVipAmount());
|
// .subtract(order.getVipAmount());
|
||||||
return payAmount;
|
return payAmount;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2,8 +2,8 @@ import store from '../store/index';
|
|||||||
export default {
|
export default {
|
||||||
// qq 237524947 wx15d4269d3210863d
|
// qq 237524947 wx15d4269d3210863d
|
||||||
// BASEURI: 'http://je4r5e.natappfree.cc/api/',
|
// BASEURI: 'http://je4r5e.natappfree.cc/api/',
|
||||||
// BASEURI: 'http://mall.yyundong.com/portalapi/api/',
|
BASEURI: 'http://mall.yyundong.com/portalapi/api/',
|
||||||
BASEURI: 'http://192.168.3.9:8083/api/',
|
// BASEURI: 'http://192.168.3.9:8083/api/',
|
||||||
ADMINURI: 'http://mall.yyundong.com/adminapi/',
|
ADMINURI: 'http://mall.yyundong.com/adminapi/',
|
||||||
ESURI: 'http://www.yyundong.com:8081/',
|
ESURI: 'http://www.yyundong.com:8081/',
|
||||||
h5Appid: 'wxb4660f37187c0b8e', // h5微信登录的appId 暂时测试用
|
h5Appid: 'wxb4660f37187c0b8e', // h5微信登录的appId 暂时测试用
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<view class="nick">{{item.name}}</view>
|
<view class="nick">{{item.name}}</view>
|
||||||
|
|
||||||
<view style="display: flex;flex-direction: row;
|
<view style="display: flex;flex-direction: row;
|
||||||
align-items: center; margin-top: 10px;">
|
align-items: center; margin-top: 5px;">
|
||||||
<view class="layof" :style="{color:theme}">¥{{item.amount}}</view>
|
<view class="layof" :style="{color:theme}">¥{{item.amount}}</view>
|
||||||
<view style="display: flex;flex-direction: column;flex: 1;" >
|
<view style="display: flex;flex-direction: column;flex: 1;" >
|
||||||
|
|
||||||
@@ -142,7 +142,7 @@
|
|||||||
background: -webkit-linear-gradient(left, hsla(134, 66%, 66%, 0.5), hsla(53, 98%, 50%, 0.5), tomato) no-repeat;
|
background: -webkit-linear-gradient(left, hsla(134, 66%, 66%, 0.5), hsla(53, 98%, 50%, 0.5), tomato) no-repeat;
|
||||||
|
|
||||||
.coupon-money {
|
.coupon-money {
|
||||||
padding: 15px;
|
padding:10px 15px;
|
||||||
width: 73.5%;
|
width: 73.5%;
|
||||||
height: auto;
|
height: auto;
|
||||||
display: flex;
|
display: flex;
|
||||||
@@ -158,7 +158,6 @@
|
|||||||
/*文本不换行*/
|
/*文本不换行*/
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
/*ellipsis:文本溢出显示省略号(...);clip:不显示省略标记(...),而是简单的裁切*/
|
/*ellipsis:文本溢出显示省略号(...);clip:不显示省略标记(...),而是简单的裁切*/
|
||||||
line-height: 30upx;
|
|
||||||
font-size: $font-sm;
|
font-size: $font-sm;
|
||||||
color: #ffaa00;
|
color: #ffaa00;
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
|
|||||||
@@ -117,14 +117,14 @@
|
|||||||
<view v-if='couponList && couponList.length>0' class="f-header m-t" @click="allAcceptCoupon">
|
<view v-if='couponList && couponList.length>0' class="f-header m-t" @click="allAcceptCoupon">
|
||||||
<image src="/static/youhuiquan.png"></image>
|
<image src="/static/youhuiquan.png"></image>
|
||||||
<view class="tit-box">
|
<view class="tit-box">
|
||||||
<text class="tit">有可领取优惠券</text>
|
<text class="tit">{{ couponList.length}}张可领取优惠券</text>
|
||||||
</view>
|
</view>
|
||||||
<text class="get-btn">全部领取</text>
|
<text class="get-btn">全部领取</text>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<coupon v-for="(item, index) in couponList" :key="index" v-bind:item="item" theme="#EB331E" ref="SubComponent"
|
<!-- <coupon v-for="(item, index) in couponList" :key="index" v-bind:item="item" theme="#EB331E" ref="SubComponent"
|
||||||
@callParentMethod="callParentMethod"></coupon>
|
@callParentMethod="callParentMethod"></coupon>
|
||||||
|
-->
|
||||||
<!-- 团购楼层
|
<!-- 团购楼层
|
||||||
<view class="f-header m-t" @click="navToTabPage('../../pagesA/product/groupList')"
|
<view class="f-header m-t" @click="navToTabPage('../../pagesA/product/groupList')"
|
||||||
v-if="groupHotGoodsList.length > 0">
|
v-if="groupHotGoodsList.length > 0">
|
||||||
@@ -1194,7 +1194,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.get-btn {
|
.get-btn {
|
||||||
width: 80px;
|
width: 80px;
|
||||||
line-height: 45upx;
|
line-height: 45upx;
|
||||||
margin-right: 10px;
|
margin-right: 10px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ const prodEnv = require('./prod.env')
|
|||||||
|
|
||||||
module.exports = merge(prodEnv, {
|
module.exports = merge(prodEnv, {
|
||||||
NODE_ENV: '"development"',
|
NODE_ENV: '"development"',
|
||||||
// BASE_API: '"http://mall.yyundong.com/adminapi"',
|
BASE_API: '"http://mall.yyundong.com/adminapi"',
|
||||||
// BASE_API: '"http://192.168.3.9:8085"'
|
// BASE_API: '"http://192.168.3.20:8085"'
|
||||||
BASE_API: '"http://127.0.0.1:8085"'
|
// BASE_API: '"http://127.0.0.1:8085"'
|
||||||
})
|
})
|
||||||
|
|||||||
84
mallplusui-web-admin/src/api/orderStatistic.js
Normal file
84
mallplusui-web-admin/src/api/orderStatistic.js
Normal file
@@ -0,0 +1,84 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
export function getValueszd() {
|
||||||
|
return request({
|
||||||
|
url:'/oms/OmsOrder/getLocation',
|
||||||
|
method:'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getValueqhd(params) {
|
||||||
|
return request({
|
||||||
|
url:'/oms/OmsOrder/getPickupPoint',
|
||||||
|
method:'get',
|
||||||
|
params:params
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function fetchList(params) {
|
||||||
|
return request({
|
||||||
|
url:'/oms/OmsOrder/getOmsOrderLocationByPage',
|
||||||
|
method:'get',
|
||||||
|
params:params
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function closeOrder(params) {
|
||||||
|
return request({
|
||||||
|
url:'/oms/OmsOrder/update/close',
|
||||||
|
method:'post',
|
||||||
|
params:params
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function deleteOrder(id) {
|
||||||
|
return request({
|
||||||
|
url:'/oms/OmsOrder/delete'+id,
|
||||||
|
method:'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function deliveryOrder(data) {
|
||||||
|
return request({
|
||||||
|
url:'/oms/OmsOrder/update/delivery',
|
||||||
|
method:'post',
|
||||||
|
data:data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getOrderDetail(id) {
|
||||||
|
return request({
|
||||||
|
url:'/oms/OmsOrder/'+id,
|
||||||
|
method:'get'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
export function updateReceiverInfo(data) {
|
||||||
|
return request({
|
||||||
|
url:'/oms/OmsOrder/update/receiverInfo',
|
||||||
|
method:'post',
|
||||||
|
data:data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
export function updateMoneyInfo(data) {
|
||||||
|
return request({
|
||||||
|
url:'/oms/OmsOrder/update/moneyInfo',
|
||||||
|
method:'post',
|
||||||
|
data:data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
export function updateOrderNote(params) {
|
||||||
|
return request({
|
||||||
|
url:'/oms/OmsOrder/update/note',
|
||||||
|
method:'post',
|
||||||
|
params:params
|
||||||
|
})
|
||||||
|
}
|
||||||
|
export function orderData(params) {
|
||||||
|
return request({
|
||||||
|
url:'/oms/OmsOrder/data/count',
|
||||||
|
method:'get',
|
||||||
|
params:params
|
||||||
|
})
|
||||||
|
}
|
||||||
@@ -399,7 +399,9 @@
|
|||||||
return formatDate(date, 'yyyy-MM-dd hh:mm:ss');
|
return formatDate(date, 'yyyy-MM-dd hh:mm:ss');
|
||||||
},
|
},
|
||||||
formatPayType(value) { //支付方式:0->未支付;1->支付宝;2->微信
|
formatPayType(value) { //支付方式:0->未支付;1->支付宝;2->微信
|
||||||
if (value === 1) {
|
if (value === 0) {
|
||||||
|
return '未支付';
|
||||||
|
} else if (value === 1) {
|
||||||
return '支付宝';
|
return '支付宝';
|
||||||
} else if (value === 2) {
|
} else if (value === 2) {
|
||||||
return '微信';
|
return '微信';
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<div class="app-container" style="position: relative; height: calc(100vh - 117px);">
|
<div class="app-container" style="position: relative; height: calc(100vh - 117px);">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<el-tabs v-model="status" type="card" @tab-click="handleOrder">
|
<el-tabs v-model="status" type="card" @tab-click="handleOrder">
|
||||||
<el-tab-pane name="0">
|
<!-- <el-tab-pane name="0">
|
||||||
<span slot="label">
|
<span slot="label">
|
||||||
<i class="el-icon-s-order"></i>
|
<i class="el-icon-s-order"></i>
|
||||||
全部订单
|
全部订单
|
||||||
@@ -13,7 +13,7 @@
|
|||||||
<i class="el-icon-bank-card"></i>
|
<i class="el-icon-bank-card"></i>
|
||||||
待付款
|
待付款
|
||||||
</span>
|
</span>
|
||||||
</el-tab-pane>
|
</el-tab-pane> -->
|
||||||
<el-tab-pane name="2">
|
<el-tab-pane name="2">
|
||||||
<span slot="label">
|
<span slot="label">
|
||||||
<i class="el-icon-refrigerator"></i>
|
<i class="el-icon-refrigerator"></i>
|
||||||
@@ -50,12 +50,12 @@
|
|||||||
已退款
|
已退款
|
||||||
</span>
|
</span>
|
||||||
</el-tab-pane> -->
|
</el-tab-pane> -->
|
||||||
<el-tab-pane name="15">
|
<!-- <el-tab-pane name="15">
|
||||||
<span slot="label">
|
<span slot="label">
|
||||||
<i class="el-icon-circle-close"></i>
|
<i class="el-icon-circle-close"></i>
|
||||||
已关闭
|
已关闭
|
||||||
</span>
|
</span>
|
||||||
</el-tab-pane>
|
</el-tab-pane> -->
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
<!--工具栏-->
|
<!--工具栏-->
|
||||||
<el-card class="filter-container" shadow="never">
|
<el-card class="filter-container" shadow="never">
|
||||||
@@ -70,30 +70,27 @@
|
|||||||
<div style="margin-top: 15px">
|
<div style="margin-top: 15px">
|
||||||
<el-form :inline="true" :model="listQuery" size="small" label-width="140px">
|
<el-form :inline="true" :model="listQuery" size="small" label-width="140px">
|
||||||
<el-form-item label="所在地:">
|
<el-form-item label="所在地:">
|
||||||
<el-input v-model="listQuery.orderSn" class="input-width" placeholder="请选择所在地"></el-input>
|
<el-select v-model="listQuery.valueszd" @change="changeszd" placeholder="请选择所在地">
|
||||||
</el-form-item>
|
<el-option v-for="item in rangeszd" :key="item.id" :label="item.name"
|
||||||
<!-- <el-form-item label="订单分类:">
|
:value="item.name">
|
||||||
<el-select v-model="listQuery.orderType" class="input-width" placeholder="全部" clearable>
|
</el-option>
|
||||||
<el-option v-for="item in orderTypeOptions" :key="item.value" :label="item.label"
|
|
||||||
:value="item.value"></el-option>
|
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item> -->
|
|
||||||
|
|
||||||
<el-form-item label="取货点">
|
|
||||||
<el-input v-model="listQuery.orderSn" class="input-width" placeholder="请选择取货点"></el-input>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="收货信息 :">
|
<el-form-item label="取货点:">
|
||||||
|
|
||||||
|
<el-select v-model="listQuery.valueqhd" @change="changeqhd" placeholder="请选择取货点">
|
||||||
|
<el-option v-for="item in rangeqhd" :key="item.id" :label="item.name"
|
||||||
|
:value="item.name">
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="收货人电话:">
|
||||||
<el-input v-model="listQuery.receiverPhone" class="input-width" placeholder="收货人电话">
|
<el-input v-model="listQuery.receiverPhone" class="input-width" placeholder="收货人电话">
|
||||||
</el-input>
|
</el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<!-- <el-form-item label="订单来源:">
|
|
||||||
<el-select v-model="listQuery.sourceType" class="input-width" placeholder="全部" clearable>
|
|
||||||
<el-option v-for="item in sourceTypeOptions" :key="item.value" :label="item.label"
|
|
||||||
:value="item.value"></el-option>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item> -->
|
|
||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
@@ -119,23 +116,8 @@
|
|||||||
<i class="el-icon-tickets"></i>
|
<i class="el-icon-tickets"></i>
|
||||||
<span>数据列表</span>
|
<span>数据列表</span>
|
||||||
</el-card>
|
</el-card>
|
||||||
<!-- <div class="batch-operate-container">
|
|
||||||
<el-checkbox v-model="printChecked" @change="batchSelection"
|
|
||||||
style="margin-left:23px; margin-right: 20px;"></el-checkbox>
|
|
||||||
<el-select v-model="batchHandle" @change="handlePrintOption" clearable placeholder="批量操作"
|
|
||||||
class="filter-item" style="width: 130px; margin-right: 8px;">
|
|
||||||
<el-option v-for="item in handleOptions" :key="item.value" :label="item.label"
|
|
||||||
:value="item.value" />
|
|
||||||
</el-select>
|
|
||||||
<el-select v-model="batchExport" @change="handleExportOption" clearable placeholder="批量导出"
|
|
||||||
class="filter-item" style="width: 130px">
|
|
||||||
<el-option v-for="item in exportOptions" :key="item.value" :label="item.label"
|
|
||||||
:value="item.value" />
|
|
||||||
</el-select>
|
|
||||||
</div> -->
|
|
||||||
<div class="table-container">
|
<div class="table-container">
|
||||||
<el-table ref="orderTable" :data="list" style="width: 100%;" @selection-change="handleSelectionChange"
|
<el-table ref="orderTable" :data="list" style="width: 100%;" v-loading="listLoading" border>
|
||||||
v-loading="listLoading" border>
|
|
||||||
<el-table-column type="selection" width="60" align="center"></el-table-column>
|
<el-table-column type="selection" width="60" align="center"></el-table-column>
|
||||||
<el-table-column label="编号" width="80" align="center">
|
<el-table-column label="编号" width="80" align="center">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
@@ -177,17 +159,6 @@
|
|||||||
{{ scope.row.payType | formatPayType }}
|
{{ scope.row.payType | formatPayType }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<!-- <el-table-column label="订单来源" width="120" align="center">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
{{ scope.row.sourceType | formatSourceType }}
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="订单类型" width="120" align="center">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
{{ scope.row.orderType | formatOrderType }}
|
|
||||||
</template>
|
|
||||||
</el-table-column> -->
|
|
||||||
|
|
||||||
<el-table-column label="订单状态" width="120" align="center">
|
<el-table-column label="订单状态" width="120" align="center">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ scope.row.status | formatStatus }}
|
{{ scope.row.status | formatStatus }}
|
||||||
@@ -196,14 +167,6 @@
|
|||||||
<el-table-column label="操作" width="200" align="center">
|
<el-table-column label="操作" width="200" align="center">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button size="mini" @click="handleViewOrder(scope.$index, scope.row)">查看订单</el-button>
|
<el-button size="mini" @click="handleViewOrder(scope.$index, scope.row)">查看订单</el-button>
|
||||||
<!-- <el-button size="mini" @click="handleCloseOrder(scope.$index, scope.row)"
|
|
||||||
v-show="scope.row.status === 14">关闭订单</el-button> -->
|
|
||||||
<!-- <el-button size="mini" @click="handleDeliveryOrder(scope.$index, scope.row)"
|
|
||||||
v-show="scope.row.status === 2">订单发货</el-button> -->
|
|
||||||
<!-- <el-button size="mini" @click="handleViewLogistics(scope.$index, scope.row)"
|
|
||||||
v-show="scope.row.status > 2 || scope.row.status < 9">订单跟踪</el-button> -->
|
|
||||||
<!-- <el-button size="mini" type="danger" @click="handleDeleteOrder(scope.$index, scope.row)"
|
|
||||||
v-show="scope.row.status === 15">删除订单</el-button> -->
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@@ -225,10 +188,10 @@
|
|||||||
} from '@/utils/index';
|
} from '@/utils/index';
|
||||||
import {
|
import {
|
||||||
fetchList,
|
fetchList,
|
||||||
closeOrder,
|
orderData,
|
||||||
deleteOrder,
|
getValueszd,
|
||||||
orderData
|
getValueqhd
|
||||||
} from '@/api/order';
|
} from '@/api/orderStatistic';
|
||||||
import {
|
import {
|
||||||
formatDate
|
formatDate
|
||||||
} from '@/utils/date';
|
} from '@/utils/date';
|
||||||
@@ -236,11 +199,10 @@
|
|||||||
const defaultListQuery = {
|
const defaultListQuery = {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
status: 0,
|
status: 2,
|
||||||
orderSn: null,
|
valueszd: null,
|
||||||
receiverPhone: null,
|
valueqhd: null,
|
||||||
createTimeStart: null,
|
receiverPhone: null
|
||||||
createTimeEnd: null
|
|
||||||
};
|
};
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@@ -250,145 +212,34 @@
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
delLoading: false,
|
rangeszd: [],
|
||||||
status: '0',
|
rangeqhd: [],
|
||||||
orderType: '0',
|
status: "2",
|
||||||
createTime: '',
|
|
||||||
checkList: [],
|
|
||||||
printChecked: false,
|
|
||||||
batchHandle: '',
|
|
||||||
batchExport: '',
|
|
||||||
listContent: [],
|
|
||||||
listQuery: Object.assign({}, defaultListQuery),
|
listQuery: Object.assign({}, defaultListQuery),
|
||||||
listLoading: true,
|
listLoading: true,
|
||||||
list: null,
|
list: null,
|
||||||
total: null,
|
total: null,
|
||||||
operateType: null,
|
|
||||||
multipleSelection: [],
|
|
||||||
closeOrder: {
|
|
||||||
dialogVisible: false,
|
|
||||||
content: null,
|
|
||||||
orderIds: []
|
|
||||||
},
|
|
||||||
statusOptions: [{
|
|
||||||
label: '待付款',
|
|
||||||
value: 12
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '待发货',
|
|
||||||
value: 2
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '已发货',
|
|
||||||
value: 3
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '已完成',
|
|
||||||
value: 5
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '申请退款',
|
|
||||||
value: 13
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '已退款',
|
|
||||||
value: 14
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '已关闭',
|
|
||||||
value: 15
|
|
||||||
}
|
|
||||||
],
|
|
||||||
orderTypeOptions: [{
|
|
||||||
label: '正常订单',
|
|
||||||
value: 1
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '秒杀订单',
|
|
||||||
value: 6
|
|
||||||
},
|
|
||||||
{
|
|
||||||
value: 7,
|
|
||||||
label: '门店自取订单'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: ' 拼团订单',
|
|
||||||
value: 2
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '团购订单',
|
|
||||||
value: 3
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '砍价订单',
|
|
||||||
value: 4
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '积分订单',
|
|
||||||
value: 5
|
|
||||||
}
|
|
||||||
],
|
|
||||||
sourceTypeOptions: [{
|
|
||||||
label: '小程序订单',
|
|
||||||
value: 1
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: 'APP订单',
|
|
||||||
value: 4
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: 'h5订单',
|
|
||||||
value: 2
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: 'pc订单',
|
|
||||||
value: 3
|
|
||||||
}
|
|
||||||
],
|
|
||||||
operateOptions: [{
|
|
||||||
label: '批量发货',
|
|
||||||
value: 1
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '关闭订单',
|
|
||||||
value: 2
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '删除订单',
|
|
||||||
value: 3
|
|
||||||
}
|
|
||||||
],
|
|
||||||
logisticsDialogVisible: false,
|
|
||||||
|
|
||||||
handleOptions: [{
|
|
||||||
value: '',
|
|
||||||
label: '批量操作'
|
|
||||||
}, {
|
|
||||||
value: '0',
|
|
||||||
label: '批量打印'
|
|
||||||
}],
|
|
||||||
exportOptions: [{
|
|
||||||
value: '',
|
|
||||||
label: '批量导出'
|
|
||||||
}, {
|
|
||||||
value: '0',
|
|
||||||
label: '导出全部'
|
|
||||||
}, {
|
|
||||||
value: '1',
|
|
||||||
label: '导出选中'
|
|
||||||
}],
|
|
||||||
caculateInfo: {
|
caculateInfo: {
|
||||||
orderCount: 0,
|
orderCount: 0,
|
||||||
orderPay: 0,
|
orderPay: 0,
|
||||||
memberCount: 0
|
memberCount: 0
|
||||||
}
|
},
|
||||||
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.getList();
|
this.getList();
|
||||||
this.orderDatas(0);
|
this.orderDatas(2);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
getValueszd().then(response => {
|
||||||
|
console.log("getValueszd>>>>>", response.data)
|
||||||
|
// this.list = response.data.records;
|
||||||
|
this.rangeszd = response.data
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
},
|
},
|
||||||
filters: {
|
filters: {
|
||||||
formatCreateTime(time) {
|
formatCreateTime(time) {
|
||||||
@@ -406,34 +257,6 @@
|
|||||||
return '积分兑换';
|
return '积分兑换';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
formatSourceType(value) { //订单来源:0->PC订单;1->app订单
|
|
||||||
if (value === 4) {
|
|
||||||
return '小程序';
|
|
||||||
} else if (value === 2) {
|
|
||||||
return 'h5订单';
|
|
||||||
} else if (value === 3) {
|
|
||||||
return 'PC订单';
|
|
||||||
} else if (value === 1) {
|
|
||||||
return 'android订单';
|
|
||||||
} else if (value === 5) {
|
|
||||||
return 'ios订单';
|
|
||||||
}
|
|
||||||
},
|
|
||||||
formatOrderType(value) {
|
|
||||||
if (value === 2) {
|
|
||||||
return '拼团订单';
|
|
||||||
} else if (value === 3) {
|
|
||||||
return '团购订单';
|
|
||||||
} else if (value === 6) {
|
|
||||||
return '秒杀订单';
|
|
||||||
} else if (value === 1) {
|
|
||||||
return '普通订单';
|
|
||||||
} else if (value === 4) {
|
|
||||||
return '砍价订单';
|
|
||||||
} else if (value === 5) {
|
|
||||||
return '积分订单';
|
|
||||||
}
|
|
||||||
},
|
|
||||||
formatStatus(value) { //订单状态:0->待付款;1->待发货;2->已发货;3->已完成;4->已关闭;5->无效订单
|
formatStatus(value) { //订单状态:0->待付款;1->待发货;2->已发货;3->已完成;4->已关闭;5->无效订单
|
||||||
if (value === 12) {
|
if (value === 12) {
|
||||||
return '待付款';
|
return '待付款';
|
||||||
@@ -467,25 +290,52 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
formatTime,
|
changeszd(res) {
|
||||||
checkPermission,
|
console.log("res1111111>>>>", res)
|
||||||
|
this.listQuery.valueszd = res
|
||||||
|
this.rangeqhd = []
|
||||||
|
this.listQuery.valueqhd = ""
|
||||||
|
|
||||||
|
const data = this.rangeszd.filter((item) => item.name == res)
|
||||||
|
getValueqhd({
|
||||||
|
id: data[0].id
|
||||||
|
}).then(response => {
|
||||||
|
console.log("getValueqhd>>>", response.data)
|
||||||
|
this.rangeqhd = response.data
|
||||||
|
});
|
||||||
|
|
||||||
|
},
|
||||||
|
changeqhd(res) {
|
||||||
|
console.log("res22222222>>>>", res)
|
||||||
|
this.listQuery.valueqhd = res
|
||||||
|
},
|
||||||
|
|
||||||
handleOrder(tab, event) {
|
handleOrder(tab, event) {
|
||||||
this.listQuery.status = tab.name;
|
this.listQuery.status = tab.name;
|
||||||
|
this.status = tab.name;
|
||||||
this.getList();
|
this.getList();
|
||||||
this.orderDatas(tab.name);
|
this.orderDatas(tab.name);
|
||||||
console.log("tab", tab)
|
console.log("tab", tab)
|
||||||
},
|
},
|
||||||
handleResetSearch() {
|
handleResetSearch() {
|
||||||
this.listQuery = Object.assign({}, defaultListQuery);
|
this.listQuery = {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
status:this.status,
|
||||||
|
valueszd: null,
|
||||||
|
valueqhd: null,
|
||||||
|
receiverPhone: null
|
||||||
|
};
|
||||||
},
|
},
|
||||||
handleSearchList() {
|
handleSearchList() {
|
||||||
|
|
||||||
|
console.log("listQuery", this.listQuery)
|
||||||
|
|
||||||
this.listQuery.pageNum = 1;
|
this.listQuery.pageNum = 1;
|
||||||
this.getList();
|
this.getList();
|
||||||
},
|
},
|
||||||
handleSelectionChange(val) {
|
|
||||||
this.multipleSelection = val;
|
|
||||||
},
|
|
||||||
handleViewOrder(index, row) {
|
handleViewOrder(index, row) {
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
path: '/oms/orderDetail',
|
path: '/oms/orderDetail',
|
||||||
@@ -494,75 +344,6 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
handleCloseOrder(index, row) {
|
|
||||||
this.closeOrder.dialogVisible = true;
|
|
||||||
this.closeOrder.orderIds = [row.id];
|
|
||||||
},
|
|
||||||
handleDeliveryOrder(index, row) {
|
|
||||||
let listItem = this.covertOrder(row);
|
|
||||||
console.log("listItem", listItem)
|
|
||||||
this.$router.push({
|
|
||||||
path: '/oms/deliverOrderList',
|
|
||||||
query: {
|
|
||||||
list: [listItem]
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
handleViewLogistics(index, row) {
|
|
||||||
this.logisticsDialogVisible = true;
|
|
||||||
},
|
|
||||||
handleDeleteOrder(index, row) { //删除订单
|
|
||||||
let id = [];
|
|
||||||
id.push(row.id);
|
|
||||||
this.deleteOrder(id);
|
|
||||||
},
|
|
||||||
handleBatchOperate() {
|
|
||||||
if (this.multipleSelection == null || this.multipleSelection.length < 1) {
|
|
||||||
this.$message({
|
|
||||||
message: '请选择要操作的订单',
|
|
||||||
type: 'warning',
|
|
||||||
duration: 1000
|
|
||||||
});
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (this.operateType === 1) {
|
|
||||||
//批量发货
|
|
||||||
let list = [];
|
|
||||||
for (let i = 0; i < this.multipleSelection.length; i++) {
|
|
||||||
if (this.multipleSelection[i].status === 1) {
|
|
||||||
list.push(this.covertOrder(this.multipleSelection[i]));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (list.length === 0) {
|
|
||||||
this.$message({
|
|
||||||
message: '选中订单中没有可以发货的订单',
|
|
||||||
type: 'warning',
|
|
||||||
duration: 1000
|
|
||||||
});
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
this.$router.push({
|
|
||||||
path: '/oms/deliverOrderList',
|
|
||||||
query: {
|
|
||||||
list: list
|
|
||||||
}
|
|
||||||
});
|
|
||||||
} else if (this.operateType === 2) {
|
|
||||||
//关闭订单
|
|
||||||
this.closeOrder.orderIds = [];
|
|
||||||
for (let i = 0; i < this.multipleSelection.length; i++) {
|
|
||||||
this.closeOrder.orderIds.push(this.multipleSelection[i].id);
|
|
||||||
}
|
|
||||||
this.closeOrder.dialogVisible = true;
|
|
||||||
} else if (this.operateType === 3) {
|
|
||||||
//删除订单
|
|
||||||
let ids = [];
|
|
||||||
for (let i = 0; i < this.multipleSelection.length; i++) {
|
|
||||||
ids.push(this.multipleSelection[i].id);
|
|
||||||
}
|
|
||||||
this.deleteOrder(ids);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 设置每页几条
|
// 设置每页几条
|
||||||
handleSizeChange(val) {
|
handleSizeChange(val) {
|
||||||
this.listQuery.pageNum = 1;
|
this.listQuery.pageNum = 1;
|
||||||
@@ -574,37 +355,11 @@
|
|||||||
this.listQuery.pageNum = val;
|
this.listQuery.pageNum = val;
|
||||||
this.getList();
|
this.getList();
|
||||||
},
|
},
|
||||||
handleCloseOrderConfirm() {
|
|
||||||
if (this.closeOrder.content == null || this.closeOrder.content === '') {
|
|
||||||
this.$message({
|
|
||||||
message: '操作备注不能为空',
|
|
||||||
type: 'warning',
|
|
||||||
duration: 1000
|
|
||||||
});
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
let params = new URLSearchParams();
|
|
||||||
params.append('ids', this.closeOrder.orderIds);
|
|
||||||
params.append('note', this.closeOrder.content);
|
|
||||||
closeOrder(params).then(response => {
|
|
||||||
this.closeOrder.orderIds = [];
|
|
||||||
this.closeOrder.dialogVisible = false;
|
|
||||||
this.getList();
|
|
||||||
this.$message({
|
|
||||||
message: '修改成功',
|
|
||||||
type: 'success',
|
|
||||||
duration: 1000
|
|
||||||
});
|
|
||||||
});
|
|
||||||
},
|
|
||||||
getList() {
|
getList() {
|
||||||
this.listLoading = true;
|
this.listLoading = true;
|
||||||
if (this.listQuery.status == 0)
|
if (this.listQuery.status == 0)
|
||||||
this.listQuery.status = null
|
this.listQuery.status = null
|
||||||
|
|
||||||
if (this.listQuery.orderSn == "")
|
|
||||||
this.listQuery.orderSn = null
|
|
||||||
|
|
||||||
if (this.listQuery.receiverPhone == "")
|
if (this.listQuery.receiverPhone == "")
|
||||||
this.listQuery.receiverPhone = null
|
this.listQuery.receiverPhone = null
|
||||||
|
|
||||||
@@ -625,157 +380,6 @@
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
deleteOrder(id) {
|
|
||||||
this.$confirm('是否要进行该删除操作?', '提示', {
|
|
||||||
confirmButtonText: '确定',
|
|
||||||
cancelButtonText: '取消',
|
|
||||||
type: 'warning'
|
|
||||||
}).then(() => {
|
|
||||||
let params = new URLSearchParams();
|
|
||||||
params.append('id', id);
|
|
||||||
deleteOrder(params).then(response => {
|
|
||||||
this.$message({
|
|
||||||
message: '删除成功!',
|
|
||||||
type: 'success',
|
|
||||||
duration: 1000
|
|
||||||
});
|
|
||||||
this.getList();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
},
|
|
||||||
covertOrder(order) {
|
|
||||||
let address = order.receiverRegion + order
|
|
||||||
.receiverDetailAddress;
|
|
||||||
|
|
||||||
let listItem = {
|
|
||||||
orderId: order.id,
|
|
||||||
orderSn: order.orderSn,
|
|
||||||
receiverName: order.receiverName,
|
|
||||||
receiverPhone: order.receiverPhone,
|
|
||||||
receiverPostCode: order.receiverPostCode,
|
|
||||||
address: address,
|
|
||||||
deliveryCompany: null,
|
|
||||||
deliverySn: null
|
|
||||||
};
|
|
||||||
return listItem;
|
|
||||||
},
|
|
||||||
beforeInit() {
|
|
||||||
this.url = 'api/yxStoreOrder';
|
|
||||||
const sort = 'id,desc';
|
|
||||||
this.params = {
|
|
||||||
page: this.page,
|
|
||||||
size: this.size,
|
|
||||||
sort: sort,
|
|
||||||
orderStatus: this.status,
|
|
||||||
orderType: this.orderType,
|
|
||||||
addTime: this.createTime,
|
|
||||||
listContent: this.listContent
|
|
||||||
};
|
|
||||||
const query = this.query;
|
|
||||||
const type = query.type;
|
|
||||||
|
|
||||||
return true;
|
|
||||||
},
|
|
||||||
|
|
||||||
getCaculateInfo() {},
|
|
||||||
clearCaculateInfo() {
|
|
||||||
this.caculateInfo = {
|
|
||||||
orderCount: 0,
|
|
||||||
orderPay: 0,
|
|
||||||
memberCount: 0
|
|
||||||
};
|
|
||||||
},
|
|
||||||
|
|
||||||
batchSelection(val) {
|
|
||||||
let rows = this.data;
|
|
||||||
if (val) {
|
|
||||||
rows.forEach(row => {
|
|
||||||
this.$refs.multipleTable.toggleRowSelection(row);
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
this.$refs.multipleTable.clearSelection();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
handlePrintOption(val) {
|
|
||||||
switch (val) {
|
|
||||||
case '0':
|
|
||||||
this.getPrintList();
|
|
||||||
this.batchHandle = '';
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
handleExportOption(val) {
|
|
||||||
let list = this.checkList;
|
|
||||||
this.page = 0;
|
|
||||||
this.size = 10000;
|
|
||||||
switch (val) {
|
|
||||||
case '0':
|
|
||||||
this.listContent = '';
|
|
||||||
this.beforeInit();
|
|
||||||
this.downloadMethod();
|
|
||||||
break;
|
|
||||||
case '1':
|
|
||||||
if (list.length == 0) {
|
|
||||||
this.$message({
|
|
||||||
message: '请选择订单',
|
|
||||||
type: 'warning'
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
this.listContent = [];
|
|
||||||
list.forEach(item => {
|
|
||||||
this.listContent.push(item.orderId);
|
|
||||||
});
|
|
||||||
this.listContent = JSON.stringify(this.listContent);
|
|
||||||
this.beforeInit();
|
|
||||||
this.downloadMethod();
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
this.batchExport = '';
|
|
||||||
},
|
|
||||||
downloadMethod() {
|
|
||||||
this.beforeInit();
|
|
||||||
this.downloadLoading = true;
|
|
||||||
download(process.env.BASE_API + '/download', this.params)
|
|
||||||
.then(result => {
|
|
||||||
this.downloadFile(result, this.title + '数据', 'xlsx');
|
|
||||||
this.downloadLoading = false;
|
|
||||||
})
|
|
||||||
.catch(() => {
|
|
||||||
this.downloadLoading = false;
|
|
||||||
});
|
|
||||||
},
|
|
||||||
// 下载文件
|
|
||||||
downloadFile(obj, name, suffix) {
|
|
||||||
const url = window.URL.createObjectURL(new Blob([obj]));
|
|
||||||
const link = document.createElement('a');
|
|
||||||
link.style.display = 'none';
|
|
||||||
link.href = url;
|
|
||||||
const fileName = parseTime(new Date()) + '-' + name + '.' + suffix;
|
|
||||||
link.setAttribute('download', fileName);
|
|
||||||
document.body.appendChild(link);
|
|
||||||
link.click();
|
|
||||||
document.body.removeChild(link);
|
|
||||||
},
|
|
||||||
getPrintList() {
|
|
||||||
let list = this.checkList;
|
|
||||||
if (list.length == 0) {
|
|
||||||
this.$message({
|
|
||||||
message: '请选择订单',
|
|
||||||
type: 'warning'
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
const _this = this.$refs.form5;
|
|
||||||
_this.dialog = true;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
checkboxT(row, rowIndex) {
|
|
||||||
return row.id !== 1;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user