提交 f0613cef authored 作者: zgy's avatar zgy

提交

上级 f5d58b02
...@@ -67,8 +67,6 @@ public class TbCfArticleController extends AbstractController { ...@@ -67,8 +67,6 @@ public class TbCfArticleController extends AbstractController {
@ResponseBody @ResponseBody
public R save(@RequestBody TbCfArticleEntity tbCfArticle) throws Exception { public R save(@RequestBody TbCfArticleEntity tbCfArticle) throws Exception {
tbCfArticle.setAuthor(getUserId());
tbCfArticleService.save(tbCfArticle); tbCfArticleService.save(tbCfArticle);
return R.ok(); return R.ok();
......
...@@ -15,6 +15,7 @@ import com.platform.vo.DeliveryOrderVo; ...@@ -15,6 +15,7 @@ import com.platform.vo.DeliveryOrderVo;
import org.apache.shiro.authz.annotation.RequiresPermissions; import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import java.math.BigDecimal; import java.math.BigDecimal;
...@@ -28,8 +29,8 @@ import java.util.Map; ...@@ -28,8 +29,8 @@ import java.util.Map;
* @date 2019-09-20 11:03:37 * @date 2019-09-20 11:03:37
*/ */
@Controller @Controller
@RequestMapping(value = "tbcforder",produces = "application/json; charset=utf-8") @RequestMapping(value = "tbcforder", produces = "application/json; charset=utf-8")
public class TbCfOrderController { public class TbCfOrderController extends AbstractController {
@Autowired @Autowired
private TbCfOrderService tbCfOrderService; private TbCfOrderService tbCfOrderService;
@Autowired @Autowired
...@@ -48,9 +49,9 @@ public class TbCfOrderController { ...@@ -48,9 +49,9 @@ public class TbCfOrderController {
Query query = new Query(params); Query query = new Query(params);
List<TbCfOrderEntity> tbCfOrderList = tbCfOrderService.queryList(query); List<TbCfOrderEntity> tbCfOrderList = tbCfOrderService.queryList(query);
for(TbCfOrderEntity tbCfOrder:tbCfOrderList){ for (TbCfOrderEntity tbCfOrder : tbCfOrderList) {
BigDecimal itemNum = BigDecimal.valueOf(tbCfItemOrderRService.getItemNum(tbCfOrder.getOrdersId())); BigDecimal itemNum = BigDecimal.valueOf(tbCfItemOrderRService.getItemNum(tbCfOrder.getOrdersId()));
if(itemNum!=null) { if (itemNum != null) {
tbCfOrder.setItemsPrice(tbCfOrder.getItemPrice().multiply(itemNum)); tbCfOrder.setItemsPrice(tbCfOrder.getItemPrice().multiply(itemNum));
} }
} }
...@@ -107,6 +108,7 @@ public class TbCfOrderController { ...@@ -107,6 +108,7 @@ public class TbCfOrderController {
tbCfOrderService.deleteBatch(orderIds); tbCfOrderService.deleteBatch(orderIds);
return R.ok(); return R.ok();
} }
/** /**
* 删除 * 删除
*/ */
...@@ -117,6 +119,7 @@ public class TbCfOrderController { ...@@ -117,6 +119,7 @@ public class TbCfOrderController {
tbCfOrderService.deleteOrder(orderId); tbCfOrderService.deleteOrder(orderId);
return R.ok(); return R.ok();
} }
/** /**
* 查看所有列表 * 查看所有列表
*/ */
...@@ -138,6 +141,7 @@ public class TbCfOrderController { ...@@ -138,6 +141,7 @@ public class TbCfOrderController {
List<TbCfOrderEntity> list = tbCfOrderService.queryOrderDetail(ordersId); List<TbCfOrderEntity> list = tbCfOrderService.queryOrderDetail(ordersId);
return R.ok().put("list", list); return R.ok().put("list", list);
} }
/** /**
* 获取订单中的商品 * 获取订单中的商品
*/ */
...@@ -148,6 +152,7 @@ public class TbCfOrderController { ...@@ -148,6 +152,7 @@ public class TbCfOrderController {
List<TbCfItemDetailEntity> list = tbCfOrderService.getOrderItemList(ordersId); List<TbCfItemDetailEntity> list = tbCfOrderService.getOrderItemList(ordersId);
return R.ok().put("list", list); return R.ok().put("list", list);
} }
/** /**
* 获取订单的代购信息 * 获取订单的代购信息
*/ */
...@@ -155,9 +160,19 @@ public class TbCfOrderController { ...@@ -155,9 +160,19 @@ public class TbCfOrderController {
@RequiresPermissions("tbcforder:info") @RequiresPermissions("tbcforder:info")
@ResponseBody @ResponseBody
public R getAgentInfo(@PathVariable("ordersId") String ordersId) { public R getAgentInfo(@PathVariable("ordersId") String ordersId) {
R r = new R();
PlatformOrderVo tbCfPlatformOrder = tbCfOrderService.getAgentInfo(ordersId); PlatformOrderVo tbCfPlatformOrder = tbCfOrderService.getAgentInfo(ordersId);
return R.ok().put("data", tbCfPlatformOrder); // if (tbCfPlatformOrder != null) {
// r.put("data", tbCfPlatformOrder);
// } else {
// PlatformOrderVo orderVo = new PlatformOrderVo();
// String userName = getUser().getUserName();
// orderVo.setUserName(userName);
// r.put("data", orderVo);
// }
return r.put("data", tbCfPlatformOrder);
} }
/** /**
* 新增或者修改代购信息 * 新增或者修改代购信息
*/ */
...@@ -171,21 +186,20 @@ public class TbCfOrderController { ...@@ -171,21 +186,20 @@ public class TbCfOrderController {
@GetMapping("/totalPay") @GetMapping("/totalPay")
@ResponseBody @ResponseBody
public R totalPay(){ public R totalPay() {
//查询列表数据 //查询列表数据
int totalPay = tbCfOrderListService.totalPay(); int totalPay = tbCfOrderListService.totalPay();
return R.ok().put("totalPay", totalPay); return R.ok().put("totalPay", totalPay);
} }
/** /**
* 订单列表(运营简表) * 订单列表(运营简表)
*/ */
@GetMapping("/orderList") @GetMapping("/orderList")
@RequiresPermissions("tbcforder:orderlist") @RequiresPermissions("tbcforder:orderlist")
@ResponseBody @ResponseBody
public R orderList(@RequestParam Map<String, Object> params){ public R orderList(@RequestParam Map<String, Object> params) {
//查询列表数据 //查询列表数据
Query query = new Query(params); Query query = new Query(params);
List<TbCfOrderListEntity> tbCfOrderList = tbCfOrderListService.queryOrderList(query); List<TbCfOrderListEntity> tbCfOrderList = tbCfOrderListService.queryOrderList(query);
...@@ -193,44 +207,48 @@ public class TbCfOrderController { ...@@ -193,44 +207,48 @@ public class TbCfOrderController {
PageUtils pageUtil = new PageUtils(tbCfOrderList, total, query.getLimit(), query.getPage()); PageUtils pageUtil = new PageUtils(tbCfOrderList, total, query.getLimit(), query.getPage());
return R.ok().put("page", pageUtil); return R.ok().put("page", pageUtil);
} }
/** /**
* 订单列表(代购订单列表) * 订单列表(代购订单列表)
*/ */
@GetMapping("/orderDeliveryList/{orderId}") @GetMapping("/orderDeliveryList/{orderId}")
@RequiresPermissions("tbcforder:orderDeliveryList") @RequiresPermissions("tbcforder:orderDeliveryList")
@ResponseBody @ResponseBody
public R orderDeliveryList(@PathVariable("orderId") String orderId){ public R orderDeliveryList(@PathVariable("orderId") String orderId) {
//查询列表数据 //查询列表数据
List<DeliveryOrderVo> tbCfOrderList = tbCfOrderListService.queryOrderDeliveryList(orderId); List<DeliveryOrderVo> tbCfOrderList = tbCfOrderListService.queryOrderDeliveryList(orderId);
int total = tbCfOrderListService.queryOrderDeliveryTotal(orderId); int total = tbCfOrderListService.queryOrderDeliveryTotal(orderId);
PageUtils pageUtil = new PageUtils(tbCfOrderList,total); PageUtils pageUtil = new PageUtils(tbCfOrderList, total);
return R.ok().put("page", pageUtil); return R.ok().put("page", pageUtil);
} }
/** /**
* 订单详情表 * 订单详情表
*/ */
@GetMapping("/orderBasic/{orderId}") @GetMapping("/orderBasic/{orderId}")
@RequiresPermissions("tbcforder:orderBasic") @RequiresPermissions("tbcforder:orderBasic")
@ResponseBody @ResponseBody
public R orderBasic(@PathVariable("orderId") String orderId){ public R orderBasic(@PathVariable("orderId") String orderId) {
//查询列表数据 //查询列表数据
OrderBasicVo orderBasicVo= tbCfOrderListService.queryorderBasic(orderId); OrderBasicVo orderBasicVo = tbCfOrderListService.queryorderBasic(orderId);
orderBasicVo.setAtcTime("35天"); orderBasicVo.setAtcTime("35天");
orderBasicVo.setCountry("赞比亚"); orderBasicVo.setCountry("赞比亚");
orderBasicVo.setSource("APP"); orderBasicVo.setSource("APP");
orderBasicVo.setDeliveryOrderList(tbCfOrderListService.queryOrderDeliveryList(orderId)); orderBasicVo.setDeliveryOrderList(tbCfOrderListService.queryOrderDeliveryList(orderId));
return R.ok().put("orderBasicVo", orderBasicVo); return R.ok().put("orderBasicVo", orderBasicVo);
} }
/** /**
* 关闭订单 * 关闭订单
*/ */
@RequestMapping("/closeOrder") @RequestMapping("/closeOrder")
@RequiresPermissions("tbcforder:closeOrder") @RequiresPermissions("tbcforder:closeOrder")
@ResponseBody @ResponseBody
public R closeOrder(@RequestBody String orderId){ public R closeOrder(@RequestBody String orderId) {
tbCfOrderListService.closeOrder(orderId); tbCfOrderListService.closeOrder(orderId);
return R.ok(); return R.ok();
} }
/** /**
* 备注订单 * 备注订单
*/ */
...@@ -241,6 +259,7 @@ public class TbCfOrderController { ...@@ -241,6 +259,7 @@ public class TbCfOrderController {
OrderBasicVo memoOrderVo = tbCfOrderListService.getMemoOrder(orderId); OrderBasicVo memoOrderVo = tbCfOrderListService.getMemoOrder(orderId);
return R.ok().put("data", memoOrderVo); return R.ok().put("data", memoOrderVo);
} }
/** /**
* 保存或更新备注信息 * 保存或更新备注信息
*/ */
...@@ -251,4 +270,36 @@ public class TbCfOrderController { ...@@ -251,4 +270,36 @@ public class TbCfOrderController {
int res = tbCfOrderListService.saveOrUpdatemMemoOrder(memoOrderVo); int res = tbCfOrderListService.saveOrUpdatemMemoOrder(memoOrderVo);
return R.ok().put("result", res); return R.ok().put("result", res);
} }
//==========================================================================================================
/**
* 订单优化(新版)
* 订单管理需要显示的菜单:全部订单 待付款 已付款 待收货 已完成 已关闭 订单设置
*/
/**
* 根据付款状态查询订单列表
* payStatus 10:未付款 20:已付款
*
* @param payStatus
* @return R
*/
@RequestMapping("/queryPayOrderList/{payStatus}")
@ResponseBody
public R queryPayOrderList(@PathVariable("payStatus") String payStatus) {
//订单列表
List<TbCfOrderEntity> orderList = tbCfOrderListService.queryPayOrderList(payStatus);
//订单数量
int total = tbCfOrderListService.queryPayCount(payStatus);
//分页操作
PageUtils pageUtil = new PageUtils(orderList, total);
return R.ok().put("page", pageUtil);
}
} }
...@@ -8,11 +8,7 @@ import com.platform.utils.R; ...@@ -8,11 +8,7 @@ import com.platform.utils.R;
import org.apache.shiro.authz.annotation.RequiresPermissions; import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
...@@ -105,4 +101,11 @@ public class TbCfUserInfoController { ...@@ -105,4 +101,11 @@ public class TbCfUserInfoController {
List<TbCfUserInfoEntity> list = tbCfUserInfoService.queryList(params); List<TbCfUserInfoEntity> list = tbCfUserInfoService.queryList(params);
return R.ok().put("list", list); return R.ok().put("list", list);
} }
@ResponseBody
@GetMapping("/queryByAccount")
public R queryByAccount(@RequestParam("account") String account) {
return R.ok();
}
} }
...@@ -16,6 +16,7 @@ public interface TbCfOrderDao extends BaseDao<TbCfOrderEntity> { ...@@ -16,6 +16,7 @@ public interface TbCfOrderDao extends BaseDao<TbCfOrderEntity> {
/** /**
* 获取订单内商品 * 获取订单内商品
*
* @param orderId * @param orderId
* @return * @return
*/ */
...@@ -24,6 +25,7 @@ public interface TbCfOrderDao extends BaseDao<TbCfOrderEntity> { ...@@ -24,6 +25,7 @@ public interface TbCfOrderDao extends BaseDao<TbCfOrderEntity> {
/** /**
* 更新发货时间,如果原值为空就更新,否则保留原值 * 更新发货时间,如果原值为空就更新,否则保留原值
*
* @param tbCfOrder2 * @param tbCfOrder2
*/ */
void updateDeliveryTime(TbCfOrderEntity tbCfOrder2); void updateDeliveryTime(TbCfOrderEntity tbCfOrder2);
...@@ -32,6 +34,7 @@ public interface TbCfOrderDao extends BaseDao<TbCfOrderEntity> { ...@@ -32,6 +34,7 @@ public interface TbCfOrderDao extends BaseDao<TbCfOrderEntity> {
/** /**
* 修改物流状态为入库中国仓 * 修改物流状态为入库中国仓
*
* @param sid * @param sid
* @return * @return
*/ */
...@@ -39,6 +42,7 @@ public interface TbCfOrderDao extends BaseDao<TbCfOrderEntity> { ...@@ -39,6 +42,7 @@ public interface TbCfOrderDao extends BaseDao<TbCfOrderEntity> {
/** /**
* 修改物流状态为入库非洲仓 * 修改物流状态为入库非洲仓
*
* @param sid * @param sid
* @return * @return
*/ */
...@@ -46,6 +50,7 @@ public interface TbCfOrderDao extends BaseDao<TbCfOrderEntity> { ...@@ -46,6 +50,7 @@ public interface TbCfOrderDao extends BaseDao<TbCfOrderEntity> {
/** /**
* 修改物流状态为已签收 * 修改物流状态为已签收
*
* @param sid * @param sid
* @return * @return
*/ */
...@@ -73,4 +78,9 @@ public interface TbCfOrderDao extends BaseDao<TbCfOrderEntity> { ...@@ -73,4 +78,9 @@ public interface TbCfOrderDao extends BaseDao<TbCfOrderEntity> {
int updateOrder(String orderId); int updateOrder(String orderId);
//根据订单付款状态查询订单列表
List<TbCfOrderEntity> queryPayOrderList(String payStatus);
//根据订单付款状态查询订单数量
int queryPayCount(String payStatus);
} }
...@@ -8,7 +8,7 @@ import java.util.Date; ...@@ -8,7 +8,7 @@ import java.util.Date;
* 表名 tb_cf_article * 表名 tb_cf_article
* *
* @author lipengjun * @author lipengjun
* @date 2020-03-17 19:13:04 * @date 2020-03-25 15:15:05
*/ */
public class TbCfArticleEntity implements Serializable { public class TbCfArticleEntity implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
...@@ -29,6 +29,10 @@ public class TbCfArticleEntity implements Serializable { ...@@ -29,6 +29,10 @@ public class TbCfArticleEntity implements Serializable {
* 图片 * 图片
*/ */
private String picture; private String picture;
/**
* 系统用户:0 普通用户:1
*/
private Integer authorType;
/** /**
* 作者 * 作者
*/ */
...@@ -38,9 +42,13 @@ public class TbCfArticleEntity implements Serializable { ...@@ -38,9 +42,13 @@ public class TbCfArticleEntity implements Serializable {
*/ */
private Long likeNum; private Long likeNum;
/** /**
* 删除标志 0:正常 1:已删除 * 删除标志 0:已删除 1:正常
*/ */
private Integer delFlag; private Integer delFlag;
/**
* 是否置顶 是:Y 否:N
*/
private String top;
/** /**
* 创建时间 * 创建时间
*/ */
...@@ -102,6 +110,19 @@ public class TbCfArticleEntity implements Serializable { ...@@ -102,6 +110,19 @@ public class TbCfArticleEntity implements Serializable {
public String getPicture() { public String getPicture() {
return picture; return picture;
} }
/**
* 设置:系统用户:0 普通用户:1
*/
public void setAuthorType(Integer authorType) {
this.authorType = authorType;
}
/**
* 获取:系统用户:0 普通用户:1
*/
public Integer getAuthorType() {
return authorType;
}
/** /**
* 设置:作者 * 设置:作者
*/ */
...@@ -129,18 +150,31 @@ public class TbCfArticleEntity implements Serializable { ...@@ -129,18 +150,31 @@ public class TbCfArticleEntity implements Serializable {
return likeNum; return likeNum;
} }
/** /**
* 设置:删除标志 0:正常 1:已删除 * 设置:删除标志 0:已删除 1:正常
*/ */
public void setDelFlag(Integer delFlag) { public void setDelFlag(Integer delFlag) {
this.delFlag = delFlag; this.delFlag = delFlag;
} }
/** /**
* 获取:删除标志 0:正常 1:已删除 * 获取:删除标志 0:已删除 1:正常
*/ */
public Integer getDelFlag() { public Integer getDelFlag() {
return delFlag; return delFlag;
} }
/**
* 设置:是否置顶 是:Y 否:N
*/
public void setTop(String top) {
this.top = top;
}
/**
* 获取:是否置顶 是:Y 否:N
*/
public String getTop() {
return top;
}
/** /**
* 设置:创建时间 * 设置:创建时间
*/ */
......
package com.platform.service; package com.platform.service;
import com.platform.entity.TbCfOrderEntity;
import com.platform.entity.TbCfOrderListEntity; import com.platform.entity.TbCfOrderListEntity;
import com.platform.vo.DeliveryOrderVo; import com.platform.vo.DeliveryOrderVo;
import com.platform.vo.OrderBasicVo; import com.platform.vo.OrderBasicVo;
import org.springframework.web.bind.annotation.RequestParam;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
...@@ -43,4 +45,8 @@ public interface TbCfOrderListService { ...@@ -43,4 +45,8 @@ public interface TbCfOrderListService {
OrderBasicVo getMemoOrder(String orderId); OrderBasicVo getMemoOrder(String orderId);
int saveOrUpdatemMemoOrder(OrderBasicVo memoOrderVo); int saveOrUpdatemMemoOrder(OrderBasicVo memoOrderVo);
List<TbCfOrderEntity> queryPayOrderList(@RequestParam("payStatus") String payStatus);
int queryPayCount(String payStatus);
} }
...@@ -72,4 +72,6 @@ public interface TbCfUserInfoService { ...@@ -72,4 +72,6 @@ public interface TbCfUserInfoService {
String queryById(String account); String queryById(String account);
long queryUserTotal(); long queryUserTotal();
boolean queryByAccount(String account);
} }
package com.platform.service.impl; package com.platform.service.impl;
import com.platform.dao.TbCfArticleDao; import com.platform.dao.TbCfArticleDao;
import com.platform.dao.TbCfUserInfoDao;
import com.platform.entity.TbCfArticleEntity; import com.platform.entity.TbCfArticleEntity;
import com.platform.service.TbCfArticleService; import com.platform.service.TbCfArticleService;
import com.platform.utils.IdUtil; import com.platform.utils.IdUtil;
...@@ -26,6 +27,8 @@ import static com.platform.utils.ShiroUtils.getUserId; ...@@ -26,6 +27,8 @@ import static com.platform.utils.ShiroUtils.getUserId;
public class TbCfArticleServiceImpl implements TbCfArticleService { public class TbCfArticleServiceImpl implements TbCfArticleService {
@Autowired @Autowired
private TbCfArticleDao tbCfArticleDao; private TbCfArticleDao tbCfArticleDao;
@Autowired
private TbCfUserInfoDao tbCfUserInfoDao;
@Override @Override
public TbCfArticleEntity queryObject(String id) { public TbCfArticleEntity queryObject(String id) {
...@@ -44,19 +47,27 @@ public class TbCfArticleServiceImpl implements TbCfArticleService { ...@@ -44,19 +47,27 @@ public class TbCfArticleServiceImpl implements TbCfArticleService {
@Override @Override
public int save(TbCfArticleEntity tbCfArticle) throws Exception { public int save(TbCfArticleEntity tbCfArticle) throws Exception {
String type = String.valueOf(tbCfArticle.getAuthorType());
if ("0".equals(type)) {
tbCfArticle.setAuthor(getUserId());
}
if ("1".equals(type)) {
String userId = tbCfUserInfoDao.queryById(tbCfArticle.getAuthor());
tbCfArticle.setAuthor(userId);
}
tbCfArticle.setUpdatetime(new Date()); tbCfArticle.setUpdatetime(new Date());
tbCfArticle.setCreatetime(new Date()); tbCfArticle.setCreatetime(new Date());
tbCfArticle.setDelFlag(1); tbCfArticle.setDelFlag(1);
tbCfArticle.setLikeNum(0L); tbCfArticle.setLikeNum(0L);
tbCfArticle.setId(IdUtil.createIdbyUUID()); tbCfArticle.setId(IdUtil.createIdbyUUID());
tbCfArticle.setContent(URLDecoder.decode(tbCfArticle.getContent(),"utf-8")); tbCfArticle.setContent(URLDecoder.decode(tbCfArticle.getContent(), "utf-8"));
return tbCfArticleDao.save(tbCfArticle); return tbCfArticleDao.save(tbCfArticle);
} }
@Override @Override
public int update(TbCfArticleEntity tbCfArticle)throws Exception { public int update(TbCfArticleEntity tbCfArticle) throws Exception {
tbCfArticle.setUpdatetime(new Date()); tbCfArticle.setUpdatetime(new Date());
tbCfArticle.setContent(URLDecoder.decode(tbCfArticle.getContent(),"utf-8")); tbCfArticle.setContent(URLDecoder.decode(tbCfArticle.getContent(), "utf-8"));
return tbCfArticleDao.update(tbCfArticle); return tbCfArticleDao.update(tbCfArticle);
} }
......
package com.platform.service.impl; package com.platform.service.impl;
import com.platform.dao.TbCfOrderDao;
import com.platform.dao.TbCfOrderListDao; import com.platform.dao.TbCfOrderListDao;
import com.platform.entity.TbCfOrderEntity;
import com.platform.entity.TbCfOrderListEntity; import com.platform.entity.TbCfOrderListEntity;
import com.platform.service.TbCfOrderListService; import com.platform.service.TbCfOrderListService;
import com.platform.vo.DeliveryOrderVo; import com.platform.vo.DeliveryOrderVo;
...@@ -23,6 +25,10 @@ import java.util.Map; ...@@ -23,6 +25,10 @@ import java.util.Map;
public class TbCfOrderListServiceImpl implements TbCfOrderListService { public class TbCfOrderListServiceImpl implements TbCfOrderListService {
@Autowired @Autowired
private TbCfOrderListDao tbCfOrderListDao; private TbCfOrderListDao tbCfOrderListDao;
@Autowired
private TbCfOrderDao tbCfOrderDao;
@Override @Override
public List<TbCfOrderListEntity> queryOrderList(Map<String, Object> map) { public List<TbCfOrderListEntity> queryOrderList(Map<String, Object> map) {
return tbCfOrderListDao.queryOrderList(map); return tbCfOrderListDao.queryOrderList(map);
...@@ -69,4 +75,31 @@ public class TbCfOrderListServiceImpl implements TbCfOrderListService { ...@@ -69,4 +75,31 @@ public class TbCfOrderListServiceImpl implements TbCfOrderListService {
return tbCfOrderListDao.saveOrUpdatemMemoOrder(memoOrderVo); return tbCfOrderListDao.saveOrUpdatemMemoOrder(memoOrderVo);
} }
//===========================================新版订单业务===============================================================
/**
* 根据付款状态查询订单列表
* payStatus 10:未付款 20:已付款
*
* @param payStatus
* @return List
*/
@Override
public List<TbCfOrderEntity> queryPayOrderList(String payStatus) {
return tbCfOrderDao.queryPayOrderList(payStatus);
}
/**
* 根据订单付款状态查询订单数量
*
* @param payStatus
* @return int
*/
public int queryPayCount(String payStatus) {
return tbCfOrderDao.queryPayCount(payStatus);
}
} }
...@@ -64,6 +64,12 @@ public class TbCfUserInfoServiceImpl implements TbCfUserInfoService { ...@@ -64,6 +64,12 @@ public class TbCfUserInfoServiceImpl implements TbCfUserInfoService {
@Override @Override
public long queryUserTotal() { public long queryUserTotal() {
return tbCfUserInfoDao.queryUserTotal() ; return tbCfUserInfoDao.queryUserTotal();
}
@Override
public boolean queryByAccount(String account) {
return tbCfUserInfoDao.queryById(account) == null ? true : false;
} }
} }
...@@ -8,9 +8,11 @@ ...@@ -8,9 +8,11 @@
<result property="title" column="title"/> <result property="title" column="title"/>
<result property="content" column="content"/> <result property="content" column="content"/>
<result property="picture" column="picture"/> <result property="picture" column="picture"/>
<result property="authorType" column="author_type"/>
<result property="author" column="author"/> <result property="author" column="author"/>
<result property="likeNum" column="like_num"/> <result property="likeNum" column="like_num"/>
<result property="delFlag" column="del_flag"/> <result property="delFlag" column="del_flag"/>
<result property="top" column="top"/>
<result property="createtime" column="createTime"/> <result property="createtime" column="createTime"/>
<result property="updatetime" column="updateTime"/> <result property="updatetime" column="updateTime"/>
</resultMap> </resultMap>
...@@ -21,9 +23,11 @@ ...@@ -21,9 +23,11 @@
`title`, `title`,
`content`, `content`,
`picture`, `picture`,
`author_type`,
`author`, `author`,
`like_num`, `like_num`,
`del_flag`, `del_flag`,
`top`,
`createTime`, `createTime`,
`updateTime` `updateTime`
from tb_cf_article from tb_cf_article
...@@ -36,9 +40,11 @@ ...@@ -36,9 +40,11 @@
`title`, `title`,
`content`, `content`,
`picture`, `picture`,
`author_type`,
`author`, `author`,
`like_num`, `like_num`,
`del_flag`, `del_flag`,
`top`,
`createTime`, `createTime`,
`updateTime` `updateTime`
from tb_cf_article from tb_cf_article
...@@ -73,9 +79,11 @@ ...@@ -73,9 +79,11 @@
`title`, `title`,
`content`, `content`,
`picture`, `picture`,
`author_type`,
`author`, `author`,
`like_num`, `like_num`,
`del_flag`, `del_flag`,
`top`,
`createTime`, `createTime`,
`updateTime`) `updateTime`)
values( values(
...@@ -83,9 +91,11 @@ ...@@ -83,9 +91,11 @@
#{title}, #{title},
#{content}, #{content},
#{picture}, #{picture},
#{authorType},
#{author}, #{author},
#{likeNum}, #{likeNum},
#{delFlag}, #{delFlag},
#{top},
#{createtime}, #{createtime},
#{updatetime}) #{updatetime})
</insert> </insert>
...@@ -96,9 +106,11 @@ ...@@ -96,9 +106,11 @@
<if test="title != null">`title` = #{title}, </if> <if test="title != null">`title` = #{title}, </if>
<if test="content != null">`content` = #{content}, </if> <if test="content != null">`content` = #{content}, </if>
<if test="picture != null">`picture` = #{picture}, </if> <if test="picture != null">`picture` = #{picture}, </if>
<if test="authorType != null">`author_type` = #{authorType}, </if>
<if test="author != null">`author` = #{author}, </if> <if test="author != null">`author` = #{author}, </if>
<if test="likeNum != null">`like_num` = #{likeNum}, </if> <if test="likeNum != null">`like_num` = #{likeNum}, </if>
<if test="delFlag != null">`del_flag` = #{delFlag}, </if> <if test="delFlag != null">`del_flag` = #{delFlag}, </if>
<if test="top != null">`top` = #{top}, </if>
<if test="createtime != null">`createTime` = #{createtime}, </if> <if test="createtime != null">`createTime` = #{createtime}, </if>
<if test="updatetime != null">`updateTime` = #{updatetime}</if> <if test="updatetime != null">`updateTime` = #{updatetime}</if>
</set> </set>
......
...@@ -253,31 +253,31 @@ ...@@ -253,31 +253,31 @@
<update id="update" parameterType="com.platform.entity.TbCfOrderEntity"> <update id="update" parameterType="com.platform.entity.TbCfOrderEntity">
update tb_cf_order o left join tb_cf_item_order_r r on r.order_id=o.order_id update tb_cf_order o left join tb_cf_item_order_r r on r.order_id=o.order_id
<set> <set>
<if test="orderNo != null">o.order_no = #{orderNo}, </if> <if test="orderNo != null">o.order_no = #{orderNo},</if>
<if test="orderName != null">o.order_name = #{orderName}, </if> <if test="orderName != null">o.order_name = #{orderName},</if>
<if test="orderTime != null">o.order_time = #{orderTime}, </if> <if test="orderTime != null">o.order_time = #{orderTime},</if>
<if test="updateTime != null">o.update_time = #{updateTime}, </if> <if test="updateTime != null">o.update_time = #{updateTime},</if>
<if test="dealTime != null">o.deal_time = #{dealTime}, </if> <if test="dealTime != null">o.deal_time = #{dealTime},</if>
<if test="closeTime != null">o.close_time = #{closeTime}, </if> <if test="closeTime != null">o.close_time = #{closeTime},</if>
<if test="orderStatus != null">o.order_status = #{orderStatus}, </if> <if test="orderStatus != null">o.order_status = #{orderStatus},</if>
<if test="userId != null">o.user_id = #{userId}, </if> <if test="userId != null">o.user_id = #{userId},</if>
<if test="userName != null">o.user_name= #{userName}, </if> <if test="userName != null">o.user_name= #{userName},</if>
<if test="deliveryAddressId != null">o.delivery_address_id = #{deliveryAddressId}, </if> <if test="deliveryAddressId != null">o.delivery_address_id = #{deliveryAddressId},</if>
<if test="deliveryAddress != null">o.delivery_address = #{deliveryAddress}, </if> <if test="deliveryAddress != null">o.delivery_address = #{deliveryAddress},</if>
<if test="deliveryName != null">o.delivery_name = #{deliveryName}, </if> <if test="deliveryName != null">o.delivery_name = #{deliveryName},</if>
<if test="deliveryPhone != null">o.delivery_phone = #{deliveryPhone}, </if> <if test="deliveryPhone != null">o.delivery_phone = #{deliveryPhone},</if>
<if test="itemsPrice != null">o.items_price = #{itemsPrice}, </if> <if test="itemsPrice != null">o.items_price = #{itemsPrice},</if>
<if test="totalPrice != null">o.total_price = #{totalPrice}, </if> <if test="totalPrice != null">o.total_price = #{totalPrice},</if>
<if test="realityPay != null">o.reality_pay = #{realityPay}, </if> <if test="realityPay != null">o.reality_pay = #{realityPay},</if>
<if test="deliveryFlag != null">o.delivery_flag = #{deliveryFlag}, </if> <if test="deliveryFlag != null">o.delivery_flag = #{deliveryFlag},</if>
<if test="deliveryTime != null">o.delivery_time = #{deliveryTime}, </if> <if test="deliveryTime != null">o.delivery_time = #{deliveryTime},</if>
<if test="expressCost != null">o.express_cost = #{expressCost}, </if> <if test="expressCost != null">o.express_cost = #{expressCost},</if>
<if test="couponId != null">o.coupon_id = #{couponId}, </if> <if test="couponId != null">o.coupon_id = #{couponId},</if>
<if test="couponTitle != null">o.coupon_title = #{couponTitle}, </if> <if test="couponTitle != null">o.coupon_title = #{couponTitle},</if>
<if test="deductAmount != null">o.deduct_amount = #{deductAmount}, </if> <if test="deductAmount != null">o.deduct_amount = #{deductAmount},</if>
<if test="tax != null">o.tax = #{tax}, </if> <if test="tax != null">o.tax = #{tax},</if>
<if test="fee != null">o.fee = #{fee}, </if> <if test="fee != null">o.fee = #{fee},</if>
<if test="payId != null">o.pay_id = #{payId}, </if> <if test="payId != null">o.pay_id = #{payId},</if>
<if test="payStatus != null">o.pay_status = #{payStatus},</if> <if test="payStatus != null">o.pay_status = #{payStatus},</if>
<if test="enableFlag != null">o.enable_flag = #{enableFlag},</if> <if test="enableFlag != null">o.enable_flag = #{enableFlag},</if>
<if test="descripitionName != null">o.descripition_name = #{descripitionName}</if> <if test="descripitionName != null">o.descripition_name = #{descripitionName}</if>
...@@ -287,8 +287,8 @@ ...@@ -287,8 +287,8 @@
<update id="updates" parameterType="com.platform.entity.TbCfOrderEntity"> <update id="updates" parameterType="com.platform.entity.TbCfOrderEntity">
update tb_cf_order update tb_cf_order
<set> <set>
<if test="orderStatus != null">order_status = #{orderStatus}, </if> <if test="orderStatus != null">order_status = #{orderStatus},</if>
<if test="deliveryFlag != null">delivery_flag = #{deliveryFlag} </if> <if test="deliveryFlag != null">delivery_flag = #{deliveryFlag}</if>
</set> </set>
where order_id =#{orderId} where order_id =#{orderId}
</update> </update>
...@@ -312,7 +312,7 @@ ...@@ -312,7 +312,7 @@
update tb_cf_order update tb_cf_order
<set> <set>
<if test="orderStatus != null">order_status = #{orderStatus},</if> <if test="orderStatus != null">order_status = #{orderStatus},</if>
<if test="closeTime != null">close_time = #{closeTime} </if> <if test="closeTime != null">close_time = #{closeTime}</if>
</set> </set>
where order_id = #{orderId} where order_id = #{orderId}
</update> </update>
...@@ -340,7 +340,7 @@ ...@@ -340,7 +340,7 @@
<update id="updateDeliveryTime" parameterType="com.platform.entity.TbCfOrderEntity"> <update id="updateDeliveryTime" parameterType="com.platform.entity.TbCfOrderEntity">
update tb_cf_order o left join tb_cf_item_order_r r on r.order_id=o.order_id update tb_cf_order o left join tb_cf_item_order_r r on r.order_id=o.order_id
<set> <set>
<if test="deliveryTime != null">o.delivery_time = #{deliveryTime}, </if> <if test="deliveryTime != null">o.delivery_time = #{deliveryTime},</if>
</set> </set>
where r.order_item_id = #{ordersId} and o.delivery_time is null where r.order_item_id = #{ordersId} and o.delivery_time is null
</update> </update>
...@@ -366,4 +366,48 @@ ...@@ -366,4 +366,48 @@
WHERE 1=1 and i.enable_flag=1 and o.enable_flag=1 WHERE 1=1 and i.enable_flag=1 and o.enable_flag=1
and DATEDIFF(o.order_time,NOW())=-1 and DATEDIFF(o.order_time,NOW())=-1
</select> </select>
<!--新版订单业务-->
<select id="queryPayOrderList" resultType="com.platform.entity.TbCfOrderEntity">
select
i.order_item_id ordersId,
o.order_id,
o.order_no,
o.order_name,
o.order_time,
i.update_time updateTime,
o.deal_time,
o.close_time,
i.order_status orderStatus,
o.user_id,
o.user_name,
o.delivery_address_id,
o.delivery_address,
o.delivery_name,
o.delivery_phone,
d.item_price itemPrice,
o.total_price,
o.reality_pay,
i.delivery_flag deliveryFlag,
i.delivery_time deliveryTime,
o.express_cost,
o.coupon_id,
c.coupon_title,
c.deduct_amount,
o.tax,
o.fee,
o.pay_id,
o.pay_status,
o.enable_flag
from tb_cf_order o left join tb_cf_coupon c on c.coupon_id=o.coupon_id
left join tb_cf_item_order_r i on i.order_id=o.order_id
left join tb_cf_item_detail d on d.item_id=i.item_id
WHERE 1=1 and i.enable_flag=1 and o.enable_flag=1 and pay_status=#{payStatus}
order by order_time desc
</select>
<select id="queryPayCount" resultType="int">
select count(order_id) from tb_cf_order where pay_status=#{payStatus}
</select>
</mapper> </mapper>
\ No newline at end of file
...@@ -66,6 +66,9 @@ ...@@ -66,6 +66,9 @@
<if test="deliveryFlag != null and deliveryFlag.trim() != ''"> <if test="deliveryFlag != null and deliveryFlag.trim() != ''">
AND o.delivery_flag =#{deliveryFlag} AND o.delivery_flag =#{deliveryFlag}
</if> </if>
<if test="payStatus != null and payStatus.trim() != ''">
AND o.pay_status =#{payStatus}
</if>
<choose> <choose>
<when test="sidx != null and sidx.trim() != ''"> <when test="sidx != null and sidx.trim() != ''">
order by ${sidx} ${order} order by ${sidx} ${order}
......
...@@ -75,7 +75,8 @@ ...@@ -75,7 +75,8 @@
GROUP BY GROUP BY
user_id user_id
) o ON u.user_id = o.user_id ) o ON u.user_id = o.user_id
LEFT JOIN ( SELECT o.user_id, count( o.coupon_id ) num FROM tb_cf_order o GROUP BY o.user_id ) c ON u.user_id = c.user_id LEFT JOIN ( SELECT o.user_id, count( o.coupon_id ) num FROM tb_cf_order o GROUP BY o.user_id ) c ON u.user_id =
c.user_id
WHERE 1=1 WHERE 1=1
<if test="name != null and name.trim() != ''"> <if test="name != null and name.trim() != ''">
AND name LIKE concat('%',#{name},'%') AND name LIKE concat('%',#{name},'%')
...@@ -152,25 +153,25 @@ ...@@ -152,25 +153,25 @@
<update id="update" parameterType="com.platform.entity.TbCfUserInfoEntity"> <update id="update" parameterType="com.platform.entity.TbCfUserInfoEntity">
update tb_cf_user_info update tb_cf_user_info
<set> <set>
<if test="userNo != null">`user_no` = #{userNo}, </if> <if test="userNo != null">`user_no` = #{userNo},</if>
<if test="userType != null">`user_type` = #{userType}, </if> <if test="userType != null">`user_type` = #{userType},</if>
<if test="account != null">`account` = #{account}, </if> <if test="account != null">`account` = #{account},</if>
<if test="avatar != null">`avatar` = #{avatar}, </if> <if test="avatar != null">`avatar` = #{avatar},</if>
<if test="nick != null">`nick` = #{nick}, </if> <if test="nick != null">`nick` = #{nick},</if>
<if test="phone != null">`phone` = #{phone}, </if> <if test="phone != null">`phone` = #{phone},</if>
<if test="phoneFlag != null">`phone_flag` = #{phoneFlag}, </if> <if test="phoneFlag != null">`phone_flag` = #{phoneFlag},</if>
<if test="password != null">`password` = #{password}, </if> <if test="password != null">`password` = #{password},</if>
<if test="lastLoginTime != null">`last_login_time` = #{lastLoginTime}, </if> <if test="lastLoginTime != null">`last_login_time` = #{lastLoginTime},</if>
<if test="lastLoginIp != null">`last_login_ip` = #{lastLoginIp}, </if> <if test="lastLoginIp != null">`last_login_ip` = #{lastLoginIp},</if>
<if test="loginCount != null">`login_count` = #{loginCount}, </if> <if test="loginCount != null">`login_count` = #{loginCount},</if>
<if test="email != null">`email` = #{email}, </if> <if test="email != null">`email` = #{email},</if>
<if test="facebook != null">`facebook` = #{facebook}, </if> <if test="facebook != null">`facebook` = #{facebook},</if>
<if test="createTime != null">`create_time` = #{createTime}, </if> <if test="createTime != null">`create_time` = #{createTime},</if>
<if test="sex != null">`sex` = #{sex}, </if> <if test="sex != null">`sex` = #{sex},</if>
<if test="defaultAddressId != null">`default_address_id` = #{defaultAddressId}, </if> <if test="defaultAddressId != null">`default_address_id` = #{defaultAddressId},</if>
<if test="invitedUserId != null">`invited_user_id` = #{invitedUserId}, </if> <if test="invitedUserId != null">`invited_user_id` = #{invitedUserId},</if>
<if test="invitedCount != null">`invited_count` = #{invitedCount}, </if> <if test="invitedCount != null">`invited_count` = #{invitedCount},</if>
<if test="enableFlag != null">`enable_flag` = #{enableFlag}, </if> <if test="enableFlag != null">`enable_flag` = #{enableFlag},</if>
<if test="emailFlag != null">`email_flag` = #{emailFlag}</if> <if test="emailFlag != null">`email_flag` = #{emailFlag}</if>
</set> </set>
where user_id = #{userId} where user_id = #{userId}
...@@ -195,4 +196,6 @@ ...@@ -195,4 +196,6 @@
<select id="queryUserTotal" resultType="long"> <select id="queryUserTotal" resultType="long">
select count(account) from tb_cf_user_info select count(account) from tb_cf_user_info
</select> </select>
</mapper> </mapper>
\ No newline at end of file
...@@ -96,9 +96,9 @@ ...@@ -96,9 +96,9 @@
value-format="yyyy-MM-dd" value-format="yyyy-MM-dd"
:picker-options="pickerOptions"> :picker-options="pickerOptions">
</el-date-picker> </el-date-picker>
<el-select v-model="orderStatus" placeholder="订单状态"> <el-select v-model="payStatus" placeholder="支付状态">
<el-option <el-option
v-for="item in orderStatusOptions" v-for="item in payStatusOptions"
:key="item.value" :key="item.value"
:label="item.label" :label="item.label"
:value="item.value"> :value="item.value">
...@@ -112,6 +112,14 @@ ...@@ -112,6 +112,14 @@
:value="item.value"> :value="item.value">
</el-option> </el-option>
</el-select> </el-select>
<!--<el-select v-model="orderStatus" placeholder="订单状态">
<el-option
v-for="item in orderStatusOptions"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>-->
<el-select v-model="payWayCode" placeholder="支付方式"> <el-select v-model="payWayCode" placeholder="支付方式">
<el-option <el-option
v-for="(el,i) in payWayCodeList" :key = 'el.pay_way_code' v-for="(el,i) in payWayCodeList" :key = 'el.pay_way_code'
...@@ -125,15 +133,8 @@ ...@@ -125,15 +133,8 @@
:value="item.value"> :value="item.value">
</el-option> </el-option>
</el-select>--> </el-select>-->
<!-- <el-select v-model="payStatus" placeholder="支付状态">
<el-option
v-for="item in payStatusOptions"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
-->
<i-button type="success" @click="queryAll" ><i class="fa fa-search"></i>查询</i-button> <i-button type="success" @click="queryAll" ><i class="fa fa-search"></i>查询</i-button>
<i-button type="warning" @click="reloadSearch" ><i class="fa fa-refresh"></i>重置</i-button> <i-button type="warning" @click="reloadSearch" ><i class="fa fa-refresh"></i>重置</i-button>
</div> </div>
......
...@@ -9,9 +9,15 @@ $(function () { ...@@ -9,9 +9,15 @@ $(function () {
{label: '用户名称', name: 'userName', index: 'user_name'}, {label: '用户名称', name: 'userName', index: 'user_name'},
{label: '下单时间', name: 'orderTime', index: 'order_time'}, {label: '下单时间', name: 'orderTime', index: 'order_time'},
{label: '支付方式', name: 'payWayCode', index: 'pay_way_code'}, {label: '支付方式', name: 'payWayCode', index: 'pay_way_code'},
{label: '订单金额',name: 'realityPay', index: 'reality_pay',formatter: "currency",formatoptions: { prefix:"$"}}, {
{label: '订单状态', name: 'orderStatus', index: 'order_status',formatter:orderStatusFormat}, label: '订单金额',
{label: '代购状态',name: 'deliveryFlag',index: 'delivery_flag',formatter: deliveryFlagFormat}, name: 'realityPay',
index: 'reality_pay',
formatter: "currency",
formatoptions: {prefix: "$"}
},
{label: '订单状态', name: 'orderStatus', index: 'order_status', formatter: orderStatusFormat},
{label: '代购状态', name: 'deliveryFlag', index: 'delivery_flag', formatter: deliveryFlagFormat},
{label: '收货人', name: 'deliveryName', index: 'delivery_name', hidden: true}, {label: '收货人', name: 'deliveryName', index: 'delivery_name', hidden: true},
{label: '收货人手机', name: 'deliveryPhone', index: 'delivery_phone', hidden: true}, {label: '收货人手机', name: 'deliveryPhone', index: 'delivery_phone', hidden: true},
{label: '收货地址', name: 'deliveryAddress', index: 'delivery_address', hidden: true}, {label: '收货地址', name: 'deliveryAddress', index: 'delivery_address', hidden: true},
...@@ -20,41 +26,43 @@ $(function () { ...@@ -20,41 +26,43 @@ $(function () {
{label: '手续费', name: 'fee', index: 'fee', hidden: true}, {label: '手续费', name: 'fee', index: 'fee', hidden: true},
{label: '优惠券ID', name: 'couponId', index: 'coupon_id', hidden: true}, {label: '优惠券ID', name: 'couponId', index: 'coupon_id', hidden: true},
{label: '优惠券名称', name: 'couponTitle', index: 'coupon_title', hidden: true}, {label: '优惠券名称', name: 'couponTitle', index: 'coupon_title', hidden: true},
{name: '操作', index: 'operate', width:'160px', {
name: '操作', index: 'operate', width: '160px',
formatter: function (value, grid, rows) { formatter: function (value, grid, rows) {
if(grid.colModel.formatter.arguments[2].orderStatus==10){ if (grid.colModel.formatter.arguments[2].orderStatus == 10) {
return '<button style="display: inline-block;height: 30px; line-height: 25px; padding: 1px 18px; background-color: #49C8F2;font-size: 10px; ' + return '<button style="display: inline-block;height: 30px; line-height: 25px; padding: 1px 18px; background-color: #49C8F2;font-size: 10px; ' +
'-webkit-border-radius: 2px; border-radius: 6px; color: #fff; cursor: pointer; border: 0;margin: 1px 6px;" class="orderdescbutton">查看订单' + '-webkit-border-radius: 2px; border-radius: 6px; color: #fff; cursor: pointer; border: 0;margin: 1px 6px;" class="orderdescbutton">查看订单' +
'</button><button style="display: inline-block;height: 30px; line-height: 25px; padding: 1px 18px; background-color: #999c9e;font-size: 10px; ' + '</button><button style="display: inline-block;height: 30px; line-height: 25px; padding: 1px 18px; background-color: #999c9e;font-size: 10px; ' +
'-webkit-border-radius: 2px; border-radius: 6px; color: #fff; cursor: pointer; border: 0;margin: 1px 6px;" class="closeOrder">订单关闭</button>'; '-webkit-border-radius: 2px; border-radius: 6px; color: #fff; cursor: pointer; border: 0;margin: 1px 6px;" class="closeOrder">订单关闭</button>';
}else if(grid.colModel.formatter.arguments[2].orderStatus==20){ } else {
return '<button style="display: inline-block;height: 30px; line-height: 25px; padding: 1px 18px; background-color: #49C8F2;font-size: 10px; ' + return '<button style="display: inline-block;height: 30px; line-height: 25px; padding: 1px 18px; background-color: #49C8F2;font-size: 10px; ' +
'-webkit-border-radius: 2px; border-radius: 6px; color: #fff; cursor: pointer; border: 0;margin: 1px 6px;" class="orderdescbutton">查看订单' + '-webkit-border-radius: 2px; border-radius: 6px; color: #fff; cursor: pointer; border: 0;margin: 1px 6px;" class="orderdescbutton">查看订单' +
'</button><button style="display: inline-block;height: 30px; line-height: 25px; padding: 1px 18px; background-color: magenta;font-size: 10px; ' + '</button><button style="display: inline-block;height: 30px; line-height: 25px; padding: 1px 18px; background-color: magenta;font-size: 10px; ' +
'-webkit-border-radius: 2px; border-radius: 6px; color: #fff; cursor: pointer; border: 0;margin: 1px 6px;" class="diybutton">订单发货</button>'; '-webkit-border-radius: 2px; border-radius: 6px; color: #fff; cursor: pointer; border: 0;margin: 1px 6px;" class="diybutton">订单发货</button>';
}else if(grid.colModel.formatter.arguments[2].orderStatus==40){ // } else if (grid.colModel.formatter.arguments[2].orderStatus == 40) {
return '<button style="display: inline-block;height: 30px; line-height: 25px; padding: 1px 18px; background-color: #49C8F2;font-size: 10px; ' + // return '<button style="display: inline-block;height: 30px; line-height: 25px; padding: 1px 18px; background-color: #49C8F2;font-size: 10px; ' +
'-webkit-border-radius: 2px; border-radius: 6px; color: #fff; cursor: pointer; border: 0;margin: 1px 6px;" class="orderdescbutton">查看订单' + // '-webkit-border-radius: 2px; border-radius: 6px; color: #fff; cursor: pointer; border: 0;margin: 1px 6px;" class="orderdescbutton">查看订单' +
'</button><button @click="orderdescbutton" style="display: inline-block;height: 30px; line-height: 25px; padding: 1px 18px; background-color: lightgreen;font-size: 10px; ' + // '</button><button @click="orderdescbutton" style="display: inline-block;height: 30px; line-height: 25px; padding: 1px 18px; background-color: lightgreen;font-size: 10px; ' +
'-webkit-border-radius: 2px; border-radius: 6px; color: #fff; cursor: pointer; border: 0;margin: 1px 6px;" class="orderdescbutton">查看订单</button>'; // '-webkit-border-radius: 2px; border-radius: 6px; color: #fff; cursor: pointer; border: 0;margin: 1px 6px;" class="orderdescbutton">查看订单</button>';
}else if(grid.colModel.formatter.arguments[2].orderStatus==50){ // } else if (grid.colModel.formatter.arguments[2].orderStatus == 50) {
return '<button style="display: inline-block;height: 30px; line-height: 25px; padding: 1px 18px; background-color: #49C8F2;font-size: 10px; ' + // return '<button style="display: inline-block;height: 30px; line-height: 25px; padding: 1px 18px; background-color: #49C8F2;font-size: 10px; ' +
'-webkit-border-radius: 2px; border-radius: 6px; color: #fff; cursor: pointer; border: 0;margin: 1px 6px;" class="orderdescbutton">查看订单' + // '-webkit-border-radius: 2px; border-radius: 6px; color: #fff; cursor: pointer; border: 0;margin: 1px 6px;" class="orderdescbutton">查看订单' +
'</button><button @click="orderdescbutton" style="display: inline-block;height: 30px; line-height: 25px; padding: 1px 18px; background-color: gold;font-size: 10px; ' + // '</button><button @click="orderdescbutton" style="display: inline-block;height: 30px; line-height: 25px; padding: 1px 18px; background-color: gold;font-size: 10px; ' +
'-webkit-border-radius: 2px; border-radius: 6px; color: #fff; cursor: pointer; border: 0;margin: 1px 6px;" >交易成功</button>'; // '-webkit-border-radius: 2px; border-radius: 6px; color: #fff; cursor: pointer; border: 0;margin: 1px 6px;" >交易成功</button>';
}else if(grid.colModel.formatter.arguments[2].orderStatus==60){ // } else if (grid.colModel.formatter.arguments[2].orderStatus == 60) {
return '<button style="display: inline-block;height: 30px; line-height: 25px; padding: 1px 18px; background-color: #49C8F2;font-size: 10px; ' + // return '<button style="display: inline-block;height: 30px; line-height: 25px; padding: 1px 18px; background-color: #49C8F2;font-size: 10px; ' +
'-webkit-border-radius: 2px; border-radius: 6px; color: #fff; cursor: pointer; border: 0;margin: 1px 6px;" class="orderdescbutton">查看订单' + // '-webkit-border-radius: 2px; border-radius: 6px; color: #fff; cursor: pointer; border: 0;margin: 1px 6px;" class="orderdescbutton">查看订单' +
'</button><button class="delbutton" style="display: inline-block;height: 30px; line-height: 25px; padding: 1px 18px; background-color: #ea394c;font-size: 10px; ' + // '</button><button class="delbutton" style="display: inline-block;height: 30px; line-height: 25px; padding: 1px 18px; background-color: #ea394c;font-size: 10px; ' +
'-webkit-border-radius: 2px; border-radius: 6px; color: #fff; cursor: pointer; border: 0;margin: 1px 6px;">删除订单</button>'; // '-webkit-border-radius: 2px; border-radius: 6px; color: #fff; cursor: pointer; border: 0;margin: 1px 6px;">删除订单</button>';
// }
} }
} }
} }
], ],
shrinkToFit: true, shrinkToFit: true,
datatype : "json", datatype: "json",
rowNum:12, rowNum: 12,
rowList:[12,24,36], rowList: [12, 24, 36],
rownumbers: true, rownumbers: true,
rownumWidth: 40, rownumWidth: 40,
gridview: true, gridview: true,
...@@ -62,46 +70,46 @@ $(function () { ...@@ -62,46 +70,46 @@ $(function () {
sortname: 'order_time', sortname: 'order_time',
viewrecords: true, viewrecords: true,
sortorder: "desc", sortorder: "desc",
align:"center" align: "center"
}); });
//查询所有支付方式 //查询所有支付方式
$.get('../tbcffinance/queryPayWayCodeAll',function (res) { $.get('../tbcffinance/queryPayWayCodeAll', function (res) {
vm.payWayCodeList=JSON.parse(res).list; vm.payWayCodeList = JSON.parse(res).list;
}), }),
//查询所有运费模板(品名) //查询所有运费模板(品名)
$.get('../tbcfexpresstemplate/queryAll',function (res) { $.get('../tbcfexpresstemplate/queryAll', function (res) {
vm.descripition=JSON.parse(res).list; vm.descripition = JSON.parse(res).list;
}), }),
//查询所有店铺 //查询所有店铺
$.get('../tbcfstore/queryAll',function (res) { $.get('../tbcfstore/queryAll', function (res) {
vm.store=JSON.parse(res).list; vm.store = JSON.parse(res).list;
}) })
//绑定事件 //绑定事件
document.addEventListener('load',(()=>{ document.addEventListener('load', (() => {
//diybutton 订单发货(代购) //diybutton 订单发货(代购)
$('#jqGrid').on('click','.diybutton',e=>{ $('#jqGrid').on('click', '.diybutton', e => {
vm.getDelivery($(e.target).parent().parent().attr('id')) vm.getDelivery($(e.target).parent().parent().attr('id'))
return false return false
}) })
//'delbutton' 删除订单(伪删除) //'delbutton' 删除订单(伪删除)
$('#jqGrid').on('click','.delbutton',e=>{ $('#jqGrid').on('click', '.delbutton', e => {
vm.del($(e.target).parent().parent().attr('id')) vm.del($(e.target).parent().parent().attr('id'))
return false return false
}) })
//'waitpaybutton' 等待支付的订单详情 //'waitpaybutton' 等待支付的订单详情
$('#jqGrid').on('click','.orderdescbutton',e=>{ $('#jqGrid').on('click', '.orderdescbutton', e => {
//获取订单ID及订单状态 //获取订单ID及订单状态
let orderStatus let orderStatus
$(e.target).parent().siblings().each((index,item)=>{ $(e.target).parent().siblings().each((index, item) => {
if($(item).attr('aria-describedby')==='jqGrid_orderStatus'){ if ($(item).attr('aria-describedby') === 'jqGrid_orderStatus') {
orderStatus = $(item).attr('title') orderStatus = $(item).attr('title')
vm.orderDesc($(e.target).parent().parent().attr('id'),orderStatus) vm.orderDesc($(e.target).parent().parent().attr('id'), orderStatus)
} }
}) })
return false return false
}) })
//'closeOrder' 关闭订单(修改订单状态) //'closeOrder' 关闭订单(修改订单状态)
$('#jqGrid').on('click','.closeOrder',e=>{ $('#jqGrid').on('click', '.closeOrder', e => {
vm.closeOrder($(e.target).parent().parent().attr('id')) vm.closeOrder($(e.target).parent().parent().attr('id'))
return false return false
}) })
...@@ -109,13 +117,12 @@ $(function () { ...@@ -109,13 +117,12 @@ $(function () {
}); });
function imgShow(itemImg) { function imgShow(itemImg) {
for (var i=0;i<itemImg.length;i++){ for (var i = 0; i < itemImg.length; i++) {
//window.location.href=itemImg; //window.location.href=itemImg;
} }
} }
let vm = new Vue({ let vm = new Vue({
el: '#rrapp', el: '#rrapp',
data: { data: {
...@@ -128,15 +135,15 @@ let vm = new Vue({ ...@@ -128,15 +135,15 @@ let vm = new Vue({
//代购信息 //代购信息
agentVisible: false, agentVisible: false,
//备注订单 //备注订单
memoOrderVisible:false, memoOrderVisible: false,
//待付款 //待付款
waitPay:false, waitPay: false,
//待发货 //待发货
waitShip:false, waitShip: false,
//已发货 //已发货
sendShip:false, sendShip: false,
//交易成功 //交易成功
tranSuccessful:false, tranSuccessful: false,
//订单关闭 //订单关闭
orderClose: false, orderClose: false,
...@@ -145,7 +152,7 @@ let vm = new Vue({ ...@@ -145,7 +152,7 @@ let vm = new Vue({
tbCfOrderLists: [], tbCfOrderLists: [],
//订单 //订单
tbCfOrderList: {}, tbCfOrderList: {},
deliveryOrderList:[], deliveryOrderList: [],
//代购状态(物流状态) //代购状态(物流状态)
deliveryFlagOptions: [{ deliveryFlagOptions: [{
value: '0', value: '0',
...@@ -163,35 +170,37 @@ let vm = new Vue({ ...@@ -163,35 +170,37 @@ let vm = new Vue({
value: '50', value: '50',
label: '买家已签收' label: '买家已签收'
}], }],
orderStatusOptions:[{ payStatusOptions: [{
value:'20', value: '20',
label:"已付款" label: "已支付"
},{ }, {
value:'10', value: '10',
label:"未付款" label: "未支付"
},{ }],
value:'40', orderStatusOptions: [
label:"已发货" {
},{ value: '40',
value:'50', label: "已发货"
label:"交易成功" }, {
},{ value: '50',
value:'60', label: "交易成功"
label:"交易关闭" }, {
value: '60',
label: "交易关闭"
}], }],
deliveryFlagOptions: [{ deliveryFlagOptions: [{
value: '0', value: '0',
label: '待采购' label: '待采购'
},{ }, {
value: '10', value: '10',
label: '已代购' label: '已代购'
},{ }, {
value: '20', value: '20',
label: '已到达中国仓' label: '已到达中国仓'
},{ }, {
value: '40', value: '40',
label: '已到达非洲仓' label: '已到达非洲仓'
},{ }, {
value: '50', value: '50',
label: '买家已签收' label: '买家已签收'
}], }],
...@@ -213,12 +222,12 @@ let vm = new Vue({ ...@@ -213,12 +222,12 @@ let vm = new Vue({
//代购平台 //代购平台
platformName: '' platformName: ''
}, },
memoOrder:{ memoOrder: {
orderId:'', orderId: '',
remarkInfo:'', remarkInfo: '',
updateTime:'' updateTime: ''
}, },
formLabelWidthOfMemoOrder:'100px', formLabelWidthOfMemoOrder: '100px',
//代购状态 //代购状态
deliveryFlag: '', deliveryFlag: '',
//代购弹窗大小 //代购弹窗大小
...@@ -230,15 +239,15 @@ let vm = new Vue({ ...@@ -230,15 +239,15 @@ let vm = new Vue({
//支付方式 //支付方式
payWayCode: '', payWayCode: '',
//订单状态 //订单状态
orderStatus:'', orderStatus: '',
//代购状态 //代购状态
deliveryFlag:'', deliveryFlag: '',
deliveryName:[], deliveryName: [],
deliveryPhone:[], deliveryPhone: [],
deliveryAddress:[], deliveryAddress: [],
currentStatus:0, currentStatus: 0,
orderIdData:[], orderIdData: [],
//日期选择 //日期选择
pickerOptions: { pickerOptions: {
shortcuts: [{ shortcuts: [{
...@@ -272,17 +281,18 @@ let vm = new Vue({ ...@@ -272,17 +281,18 @@ let vm = new Vue({
{required: true, message: '名称不能为空', trigger: 'blur'} {required: true, message: '名称不能为空', trigger: 'blur'}
] ]
}, },
payStatus: '',
//订单ID //订单ID
orderId: '', orderId: '',
//订单号 //订单号
orderNo: '', orderNo: '',
//用户名 //用户名
userName:'', userName: '',
value: '', value: '',
//支付方式集合 //支付方式集合
payWayCodeList: [], payWayCodeList: [],
basicData:[], basicData: [],
//订单基本信息 //订单基本信息
basicInfoColumns: [ basicInfoColumns: [
{ {
...@@ -302,22 +312,22 @@ let vm = new Vue({ ...@@ -302,22 +312,22 @@ let vm = new Vue({
{ {
type: '用户名称', type: '用户名称',
data: 18 data: 18
},{ }, {
type: '自动确定收货时间', type: '自动确定收货时间',
data: 18 data: 18
},{ }, {
type: '订单来源', type: '订单来源',
data: 18 data: 18
},{ }, {
type: '订单地区', type: '订单地区',
data: 18 data: 18
},{ }, {
type: '交易流水号', type: '交易流水号',
data: 18 data: 18
},{ }, {
type: '支付方式', type: '支付方式',
data: 18 data: 18
},{ }, {
type: '活动信息', type: '活动信息',
data: 18 data: 18
} }
...@@ -390,7 +400,7 @@ let vm = new Vue({ ...@@ -390,7 +400,7 @@ let vm = new Vue({
num: '124124', num: '124124',
price: '124124', price: '124124',
link: '124124', link: '124124',
deliveryflag:'12121', deliveryflag: '12121',
logisticno: '124124', logisticno: '124124',
} }
], ],
...@@ -431,13 +441,13 @@ let vm = new Vue({ ...@@ -431,13 +441,13 @@ let vm = new Vue({
constnum: 1, constnum: 1,
}, },
], ],
memoColumns:[ memoColumns: [
{ {
title: '内容', title: '内容',
key: 'memoname' key: 'memoname'
} }
], ],
memoData:[ memoData: [
{ {
memoname: '商品没有库存', memoname: '商品没有库存',
} }
...@@ -479,13 +489,13 @@ let vm = new Vue({ ...@@ -479,13 +489,13 @@ let vm = new Vue({
} }
],*/ ],*/
orderBasicVo:{}, orderBasicVo: {},
}, },
methods: { methods: {
//前往商品链接 (link) //前往商品链接 (link)
toProductLink(link){ toProductLink(link) {
window.open(link,'_blank') window.open(link, '_blank')
}, },
queryAll: function () { queryAll: function () {
vm.reload(); vm.reload();
...@@ -494,7 +504,7 @@ let vm = new Vue({ ...@@ -494,7 +504,7 @@ let vm = new Vue({
alert('click on item ' + value); alert('click on item ' + value);
}, },
getDelivery: function (e) { getDelivery: function (e) {
let orderId=e; let orderId = e;
vm.showList = false; vm.showList = false;
vm.showOrderDesc = false; vm.showOrderDesc = false;
vm.showLists = true; vm.showLists = true;
...@@ -513,20 +523,20 @@ let vm = new Vue({ ...@@ -513,20 +523,20 @@ let vm = new Vue({
async: true, async: true,
successCallback: function (r) { successCallback: function (r) {
vm.tbCfOrderLists = r.page.list; vm.tbCfOrderLists = r.page.list;
vm.deliveryName=r.page.list[0].deliveryName; vm.deliveryName = r.page.list[0].deliveryName;
vm.deliveryPhone=r.page.list[0].deliveryPhone; vm.deliveryPhone = r.page.list[0].deliveryPhone;
vm.deliveryAddress=r.page.list[0].deliveryAddress; vm.deliveryAddress = r.page.list[0].deliveryAddress;
vm.tbCfOrderLists.map(item=>{ vm.tbCfOrderLists.map(item => {
if(item.deliveryFlag===0){ if (item.deliveryFlag === 0) {
vm.$set(item,'deliveryFlag','未发货(未代购)') vm.$set(item, 'deliveryFlag', '未发货(未代购)')
}else if(item.deliveryFlag===10){ } else if (item.deliveryFlag === 10) {
vm.$set(item,'deliveryFlag','已发货(已代购)') vm.$set(item, 'deliveryFlag', '已发货(已代购)')
}else if(item.deliveryFlag===20){ } else if (item.deliveryFlag === 20) {
vm.$set(item,'deliveryFlag','已到达中国仓') vm.$set(item, 'deliveryFlag', '已到达中国仓')
}else if(item.deliveryFlag===40){ } else if (item.deliveryFlag === 40) {
vm.$set(item,'deliveryFlag','已到达非洲仓') vm.$set(item, 'deliveryFlag', '已到达非洲仓')
}else if(item.deliveryFlag===50){ } else if (item.deliveryFlag === 50) {
vm.$set(item,'deliveryFlag','买家已签收(交易成功)') vm.$set(item, 'deliveryFlag', '买家已签收(交易成功)')
} }
}) })
} }
...@@ -634,13 +644,13 @@ let vm = new Vue({ ...@@ -634,13 +644,13 @@ let vm = new Vue({
}); });
}, },
//备注订单 //备注订单
showMemoOrder: function(orderId) { showMemoOrder: function (orderId) {
vm.memoOrderVisible=true; vm.memoOrderVisible = true;
vm.memoOrder.orderId = orderId; vm.memoOrder.orderId = orderId;
vm.getMemoOrder(orderId); vm.getMemoOrder(orderId);
}, },
//获取订单备注信息 //获取订单备注信息
getMemoOrder:function(orderId){ getMemoOrder: function (orderId) {
Ajax.request({ Ajax.request({
url: "../tbcforder/memoOrder/" + orderId, url: "../tbcforder/memoOrder/" + orderId,
async: true, async: true,
...@@ -659,8 +669,8 @@ let vm = new Vue({ ...@@ -659,8 +669,8 @@ let vm = new Vue({
}); });
}, },
//修改或新增订单备注 //修改或新增订单备注
saveOrUpdatemMemoOrder: function(){ saveOrUpdatemMemoOrder: function () {
let that=this ; let that = this;
Ajax.request({ Ajax.request({
url: "../tbcforder/memoOrder/", url: "../tbcforder/memoOrder/",
params: JSON.stringify(vm.memoOrder), params: JSON.stringify(vm.memoOrder),
...@@ -682,7 +692,7 @@ let vm = new Vue({ ...@@ -682,7 +692,7 @@ let vm = new Vue({
}); });
}, },
//关闭订单 //关闭订单
closeOrder: function(e){ closeOrder: function (e) {
let orderId = e; let orderId = e;
if (orderId == null) { if (orderId == null) {
return; return;
...@@ -704,101 +714,101 @@ let vm = new Vue({ ...@@ -704,101 +714,101 @@ let vm = new Vue({
//订单详情 //订单详情
orderDesc: function (e) { orderDesc: function (e) {
vm.showList = false; vm.showList = false;
vm.showOrderDesc=true; vm.showOrderDesc = true;
let orderId=e; let orderId = e;
vm.getOderDescInfo(orderId) vm.getOderDescInfo(orderId)
}, },
//根据订单ID获取订单详情 //根据订单ID获取订单详情
getOderDescInfo: function(orderId){ getOderDescInfo: function (orderId) {
Ajax.request({ Ajax.request({
url: "../tbcforder/orderBasic/" + orderId, url: "../tbcforder/orderBasic/" + orderId,
async: true, async: true,
successCallback: function (r) { successCallback: function (r) {
vm.basicData=r.orderBasicVo.orderTime; vm.basicData = r.orderBasicVo.orderTime;
vm.memoData[0].memoname=r.orderBasicVo.remarkInfo; vm.memoData[0].memoname = r.orderBasicVo.remarkInfo;
vm.deliveryName=r.orderBasicVo.deliveryName; vm.deliveryName = r.orderBasicVo.deliveryName;
vm.deliveryPhone=r.orderBasicVo.deliveryPhone; vm.deliveryPhone = r.orderBasicVo.deliveryPhone;
vm.deliveryAddress=r.orderBasicVo.deliveryAddress; vm.deliveryAddress = r.orderBasicVo.deliveryAddress;
vm.orderIdData=r.orderBasicVo.orderId; vm.orderIdData = r.orderBasicVo.orderId;
vm.currentStatus=[]; vm.currentStatus = [];
if(r.orderBasicVo.orderStatus==10){ if (r.orderBasicVo.orderStatus == 10) {
vm.currentStatus=0; vm.currentStatus = 0;
vm.waitPay=true; vm.waitPay = true;
vm.waitShip=false; vm.waitShip = false;
vm.sendShip=false; vm.sendShip = false;
vm.tranSuccessful=false; vm.tranSuccessful = false;
vm.orderClose=false; vm.orderClose = false;
} else if(r.orderBasicVo.orderStatus==20){ } else if (r.orderBasicVo.orderStatus == 20) {
vm.currentStatus=1; vm.currentStatus = 1;
vm.waitPay=false; vm.waitPay = false;
vm.waitShip=true; vm.waitShip = true;
vm.sendShip=false; vm.sendShip = false;
vm.tranSuccessful=false; vm.tranSuccessful = false;
vm.orderClose=false; vm.orderClose = false;
}else if(r.orderBasicVo.orderStatus==40){ } else if (r.orderBasicVo.orderStatus == 40) {
vm.currentStatus=2; vm.currentStatus = 2;
vm.waitPay=false; vm.waitPay = false;
vm.waitShip=false; vm.waitShip = false;
vm.sendShip=true; vm.sendShip = true;
vm.tranSuccessful=false; vm.tranSuccessful = false;
vm.orderClose=false; vm.orderClose = false;
}else if(r.orderBasicVo.orderStatus==50){ } else if (r.orderBasicVo.orderStatus == 50) {
vm.currentStatus=3; vm.currentStatus = 3;
vm.waitPay=false; vm.waitPay = false;
vm.waitShip=false; vm.waitShip = false;
vm.sendShip=false; vm.sendShip = false;
vm.tranSuccessful=true; vm.tranSuccessful = true;
vm.orderClose=false; vm.orderClose = false;
}else if(r.orderBasicVo.orderStatus==60){ } else if (r.orderBasicVo.orderStatus == 60) {
vm.currentStatus=0; vm.currentStatus = 0;
vm.waitPay=false; vm.waitPay = false;
vm.waitShip=false; vm.waitShip = false;
vm.sendShip=false; vm.sendShip = false;
vm.tranSuccessful=false; vm.tranSuccessful = false;
vm.orderClose=true; vm.orderClose = true;
} }
vm.basicInfoData[0].data=r.orderBasicVo.orderNo; vm.basicInfoData[0].data = r.orderBasicVo.orderNo;
vm.basicInfoData[1].data=r.orderBasicVo.userName; vm.basicInfoData[1].data = r.orderBasicVo.userName;
vm.basicInfoData[2].data=r.orderBasicVo.atcTime; vm.basicInfoData[2].data = r.orderBasicVo.atcTime;
vm.basicInfoData[3].data=r.orderBasicVo.source; vm.basicInfoData[3].data = r.orderBasicVo.source;
vm.basicInfoData[4].data=r.orderBasicVo.country; vm.basicInfoData[4].data = r.orderBasicVo.country;
vm.basicInfoData[5].data=r.orderBasicVo.payId; vm.basicInfoData[5].data = r.orderBasicVo.payId;
vm.basicInfoData[6].data=r.orderBasicVo.payWayCode; vm.basicInfoData[6].data = r.orderBasicVo.payWayCode;
vm.basicInfoData[7].data=r.orderBasicVo.couponTitle; vm.basicInfoData[7].data = r.orderBasicVo.couponTitle;
vm.recipientsData[0].recipients=r.orderBasicVo.deliveryName; vm.recipientsData[0].recipients = r.orderBasicVo.deliveryName;
vm.recipientsData[0].phone=r.orderBasicVo.deliveryPhone vm.recipientsData[0].phone = r.orderBasicVo.deliveryPhone
vm.recipientsData[0].email=r.orderBasicVo.email; vm.recipientsData[0].email = r.orderBasicVo.email;
vm.recipientsData[0].address=r.orderBasicVo.deliveryAddress; vm.recipientsData[0].address = r.orderBasicVo.deliveryAddress;
vm.deliveryOrderList= r.orderBasicVo.deliveryOrderList; vm.deliveryOrderList = r.orderBasicVo.deliveryOrderList;
vm.deliveryOrderList.map(item=>{ vm.deliveryOrderList.map(item => {
if(item.deliveryFlag===0){ if (item.deliveryFlag === 0) {
vm.$set(item,'deliveryFlag','未发货(未代购)') vm.$set(item, 'deliveryFlag', '未发货(未代购)')
}else if(item.deliveryFlag===10){ } else if (item.deliveryFlag === 10) {
vm.$set(item,'deliveryFlag','已发货(已代购)') vm.$set(item, 'deliveryFlag', '已发货(已代购)')
}else if(item.deliveryFlag===20){ } else if (item.deliveryFlag === 20) {
vm.$set(item,'deliveryFlag','已到达中国仓') vm.$set(item, 'deliveryFlag', '已到达中国仓')
}else if(item.deliveryFlag===40){ } else if (item.deliveryFlag === 40) {
vm.$set(item,'deliveryFlag','已到达非洲仓') vm.$set(item, 'deliveryFlag', '已到达非洲仓')
}else if(item.deliveryFlag===50){ } else if (item.deliveryFlag === 50) {
vm.$set(item,'deliveryFlag','买家已签收(交易成功)') vm.$set(item, 'deliveryFlag', '买家已签收(交易成功)')
} }
}) })
vm.costData[0].constnum=r.orderBasicVo.realityPay; vm.costData[0].constnum = r.orderBasicVo.realityPay;
vm.costData[1].constnum=r.orderBasicVo.expressCost; vm.costData[1].constnum = r.orderBasicVo.expressCost;
vm.costData[2].constnum=r.orderBasicVo.tax; vm.costData[2].constnum = r.orderBasicVo.tax;
vm.costData[3].constnum=r.orderBasicVo.fee; vm.costData[3].constnum = r.orderBasicVo.fee;
vm.costData[4].constnum=r.orderBasicVo.couponId; vm.costData[4].constnum = r.orderBasicVo.couponId;
vm.costData[6].constnum=r.orderBasicVo.couponTitle; vm.costData[6].constnum = r.orderBasicVo.couponTitle;
vm.costData[7].constnum=r.orderBasicVo.realityPay; vm.costData[7].constnum = r.orderBasicVo.realityPay;
} }
}); });
}, },
//重新加载订单详情 //重新加载订单详情
reloadOrder: function (event) { reloadOrder: function (event) {
vm.showList = true; vm.showList = true;
vm.showOrderDesc=false; vm.showOrderDesc = false;
vm.handleReset('formValidate'); vm.handleReset('formValidate');
}, },
//弃用 //弃用
...@@ -824,17 +834,18 @@ let vm = new Vue({ ...@@ -824,17 +834,18 @@ let vm = new Vue({
}, },
reload: function (event) { reload: function (event) {
vm.showList = true; vm.showList = true;
vm.showOrderDesc=false; vm.showOrderDesc = false;
vm.agentVisible=false; vm.agentVisible = false;
vm.showLists=false; vm.showLists = false;
vm.waitPay=false; vm.waitPay = false;
vm.waitShip=false; vm.waitShip = false;
let start = vm.value[0] || null; let start = vm.value[0] || null;
let end = vm.value[1] || null; let end = vm.value[1] || null;
let payWayCode = vm.payWayCode; let payWayCode = vm.payWayCode;
let deliveryFlag = vm.deliveryFlag; let deliveryFlag = vm.deliveryFlag;
let userName=vm.userName; let userName = vm.userName;
let orderStatus=vm.orderStatus; let orderStatus = vm.orderStatus;
let payStatus = vm.payStatus;
let page = $("#jqGrid").jqGrid('getGridParam', 'page'); let page = $("#jqGrid").jqGrid('getGridParam', 'page');
$("#jqGrid").jqGrid('setGridParam', { $("#jqGrid").jqGrid('setGridParam', {
postData: { postData: {
...@@ -843,8 +854,9 @@ let vm = new Vue({ ...@@ -843,8 +854,9 @@ let vm = new Vue({
'end': end, 'end': end,
'payWayCode': payWayCode, 'payWayCode': payWayCode,
'deliveryFlag': deliveryFlag, 'deliveryFlag': deliveryFlag,
'userName':userName, 'userName': userName,
'orderStatus':orderStatus 'orderStatus': orderStatus,
'payStatus': payStatus
}, },
page: page page: page
}).trigger("reloadGrid"); }).trigger("reloadGrid");
...@@ -856,8 +868,9 @@ let vm = new Vue({ ...@@ -856,8 +868,9 @@ let vm = new Vue({
vm.value = ''; vm.value = '';
vm.payWayCode = ''; vm.payWayCode = '';
vm.expressStatus = ''; vm.expressStatus = '';
vm.userName=''; vm.userName = '';
vm.orderStatus=''; vm.orderStatus = '';
vm.payStatus = '';
vm.reload(); vm.reload();
}, },
handleSubmit: function (name) { handleSubmit: function (name) {
...@@ -871,7 +884,7 @@ let vm = new Vue({ ...@@ -871,7 +884,7 @@ let vm = new Vue({
} }
}); });
function showDefaultImg(img){ function showDefaultImg(img) {
img.src = "http://www.luolj.club/images/afrishop20190103.png"; img.src = "http://www.luolj.club/images/afrishop20190103.png";
//不循环执行 //不循环执行
img.onerror = null; img.onerror = null;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论