提交 291c1752 authored 作者: luojie's avatar luojie

修改订单状态物流状态为订单商品关联表获得

上级 98b2c015
...@@ -113,34 +113,30 @@ public class TbCfOrderController { ...@@ -113,34 +113,30 @@ public class TbCfOrderController {
/** /**
* 查看订单详情 * 查看订单详情
*/ */
@RequestMapping("/detail/{orderId}") @RequestMapping("/detail/{ordersId}")
@ResponseBody @ResponseBody
public R detail(@PathVariable("orderId") String orderId) { public R detail(@PathVariable("ordersId") String ordersId) {
List<TbCfOrderEntity> list = tbCfOrderService.queryOrderDetail(orderId); List<TbCfOrderEntity> list = tbCfOrderService.queryOrderDetail(ordersId);
return R.ok().put("list", list); return R.ok().put("list", list);
} }
/** /**
* 获取订单中的商品 * 获取订单中的商品
*/ */
@RequestMapping("/item/{orderId}") @RequestMapping("/item/{ordersId}")
@RequiresPermissions("tbcforder:info") @RequiresPermissions("tbcforder:info")
@ResponseBody @ResponseBody
public R getOrderItemList(@PathVariable("orderId") String orderId) { public R getOrderItemList(@PathVariable("ordersId") String ordersId) {
List<TbCfItemDetailEntity> list = tbCfOrderService.getOrderItemList(ordersId);
List<TbCfItemDetailEntity> list = tbCfOrderService.getOrderItemList(orderId);
return R.ok().put("list", list); return R.ok().put("list", list);
} }
/** /**
* 获取订单的代购信息 * 获取订单的代购信息
*/ */
@GetMapping("/agent/{orderId}") @GetMapping("/agent/{ordersId}")
@RequiresPermissions("tbcforder:info") @RequiresPermissions("tbcforder:info")
@ResponseBody @ResponseBody
public R getAgentInfo(@PathVariable("orderId") String orderId) { public R getAgentInfo(@PathVariable("ordersId") String ordersId) {
PlatformOrderVo tbCfPlatformOrder = tbCfOrderService.getAgentInfo(ordersId);
PlatformOrderVo tbCfPlatformOrder = tbCfOrderService.getAgentInfo(orderId);
return R.ok().put("data", tbCfPlatformOrder); return R.ok().put("data", tbCfPlatformOrder);
} }
/** /**
......
...@@ -59,9 +59,9 @@ public class TbCfPlatformOrderController { ...@@ -59,9 +59,9 @@ public class TbCfPlatformOrderController {
return R.ok().put("tbCfPlatformOrder", tbCfPlatformOrder); return R.ok().put("tbCfPlatformOrder", tbCfPlatformOrder);
} }
/** /* *//**
* 保存 * 保存
*/ *//*
@RequestMapping("/save") @RequestMapping("/save")
@RequiresPermissions("tbcfplatformorder:save") @RequiresPermissions("tbcfplatformorder:save")
@ResponseBody @ResponseBody
...@@ -69,7 +69,7 @@ public class TbCfPlatformOrderController { ...@@ -69,7 +69,7 @@ public class TbCfPlatformOrderController {
tbCfPlatformOrderService.save(PlatformOrderVo); tbCfPlatformOrderService.save(PlatformOrderVo);
return R.ok(); return R.ok();
} }
*/
/** /**
* 修改 * 修改
*/ */
......
package com.platform.dao; package com.platform.dao;
import com.platform.entity.TbCfItemOrderREntity; import com.platform.entity.TbCfItemOrderREntity;
import org.apache.ibatis.annotations.Param;
/** /**
* 订单商品对应表Dao * 订单商品对应表Dao
...@@ -10,4 +11,14 @@ import com.platform.entity.TbCfItemOrderREntity; ...@@ -10,4 +11,14 @@ import com.platform.entity.TbCfItemOrderREntity;
*/ */
public interface TbCfItemOrderRDao extends BaseDao<TbCfItemOrderREntity> { public interface TbCfItemOrderRDao extends BaseDao<TbCfItemOrderREntity> {
String getOrderId(String ordersId);
int updateDeliveryTime( TbCfItemOrderREntity tbCfItemOrderREntity2);
int updateExpressStatusDelivery(String[] sids);
int updateExpressStatuss(String[] sids);
int updateExpressStatus(String[] sids);
} }
...@@ -5,6 +5,7 @@ import com.platform.entity.TbCfOrderEntity; ...@@ -5,6 +5,7 @@ import com.platform.entity.TbCfOrderEntity;
import com.platform.entity.TbCfPlatformOrderEntity; import com.platform.entity.TbCfPlatformOrderEntity;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import java.math.BigDecimal;
import java.util.List; import java.util.List;
/** /**
...@@ -20,7 +21,7 @@ public interface TbCfOrderDao extends BaseDao<TbCfOrderEntity> { ...@@ -20,7 +21,7 @@ public interface TbCfOrderDao extends BaseDao<TbCfOrderEntity> {
* @param orderId * @param orderId
* @return * @return
*/ */
List<TbCfItemDetailEntity> getOrderItemList(String orderId); List<TbCfItemDetailEntity> getOrderItemList(String ordersId);
/** /**
...@@ -29,7 +30,7 @@ public interface TbCfOrderDao extends BaseDao<TbCfOrderEntity> { ...@@ -29,7 +30,7 @@ public interface TbCfOrderDao extends BaseDao<TbCfOrderEntity> {
*/ */
void updateDeliveryTime(TbCfOrderEntity tbCfOrder2); void updateDeliveryTime(TbCfOrderEntity tbCfOrder2);
List<TbCfOrderEntity> queryOrderDetail(String orderId); List<TbCfOrderEntity> queryOrderDetail(String ordersId);
/** /**
* 修改物流状态为入库中国仓 * 修改物流状态为入库中国仓
...@@ -51,4 +52,6 @@ public interface TbCfOrderDao extends BaseDao<TbCfOrderEntity> { ...@@ -51,4 +52,6 @@ public interface TbCfOrderDao extends BaseDao<TbCfOrderEntity> {
* @return * @return
*/ */
int updateExpressStatusDelivery(String[] sid); int updateExpressStatusDelivery(String[] sid);
BigDecimal getPrice(String ordersId);
} }
...@@ -17,7 +17,8 @@ public interface TbCfPlatformOrderDao extends BaseDao<PlatformOrderVo> { ...@@ -17,7 +17,8 @@ public interface TbCfPlatformOrderDao extends BaseDao<PlatformOrderVo> {
* @param orderId * @param orderId
* @return * @return
*/ */
PlatformOrderVo getAgentInfo(String orderId); PlatformOrderVo getAgentInfo(@Param("ordersId") String ordersId);
int updates( PlatformOrderVo tbCfPlatformOrder); int updates( PlatformOrderVo tbCfPlatformOrder);
} }
...@@ -14,6 +14,7 @@ import java.util.Date; ...@@ -14,6 +14,7 @@ import java.util.Date;
public class TbCfItemDetailEntity implements Serializable { public class TbCfItemDetailEntity implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
private String ordersId;
/** /**
* 商品表记录id * 商品表记录id
*/ */
...@@ -71,6 +72,13 @@ public class TbCfItemDetailEntity implements Serializable { ...@@ -71,6 +72,13 @@ public class TbCfItemDetailEntity implements Serializable {
*/ */
private Date createTime; private Date createTime;
public String getOrdersId() {
return ordersId;
}
public void setOrdersId(String ordersId) {
this.ordersId = ordersId;
}
/** /**
* 设置:商品表记录id * 设置:商品表记录id
......
...@@ -18,7 +18,7 @@ public class TbCfItemOrderREntity implements Serializable { ...@@ -18,7 +18,7 @@ public class TbCfItemOrderREntity implements Serializable {
*/ */
private String orderItemId; private String orderItemId;
/** /**
* 商品表记录id * 商品id
*/ */
private String itemId; private String itemId;
/** /**
...@@ -30,6 +30,13 @@ public class TbCfItemOrderREntity implements Serializable { ...@@ -30,6 +30,13 @@ public class TbCfItemOrderREntity implements Serializable {
*/ */
private Integer enableFlag; private Integer enableFlag;
private Integer orderStatus;
private Integer deliveryFlag;
private Date deliveryTime;
private Date closeTime;
private Date updateTime;
/** /**
* 设置:记录表 * 设置:记录表
*/ */
...@@ -44,14 +51,14 @@ public class TbCfItemOrderREntity implements Serializable { ...@@ -44,14 +51,14 @@ public class TbCfItemOrderREntity implements Serializable {
return orderItemId; return orderItemId;
} }
/** /**
* 设置:商品表记录id * 设置:商品id
*/ */
public void setItemId(String itemId) { public void setItemId(String itemId) {
this.itemId = itemId; this.itemId = itemId;
} }
/** /**
* 获取:商品表记录id * 获取:商品id
*/ */
public String getItemId() { public String getItemId() {
return itemId; return itemId;
...@@ -82,4 +89,44 @@ public class TbCfItemOrderREntity implements Serializable { ...@@ -82,4 +89,44 @@ public class TbCfItemOrderREntity implements Serializable {
public Integer getEnableFlag() { public Integer getEnableFlag() {
return enableFlag; return enableFlag;
} }
public Integer getOrderStatus() {
return orderStatus;
}
public void setOrderStatus(Integer orderStatus) {
this.orderStatus = orderStatus;
}
public Integer getDeliveryFlag() {
return deliveryFlag;
}
public void setDeliveryFlag(Integer deliveryFlag) {
this.deliveryFlag = deliveryFlag;
}
public Date getDeliveryTime() {
return deliveryTime;
}
public void setDeliveryTime(Date deliveryTime) {
this.deliveryTime = deliveryTime;
}
public Date getCloseTime() {
return closeTime;
}
public void setCloseTime(Date closeTime) {
this.closeTime = closeTime;
}
public Date getUpdateTime() {
return updateTime;
}
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
} }
...@@ -13,7 +13,10 @@ import java.util.Date; ...@@ -13,7 +13,10 @@ import java.util.Date;
*/ */
public class TbCfOrderEntity implements Serializable { public class TbCfOrderEntity implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
/**
* 订单id
*/
private String ordersId;
/** /**
* 订单id * 订单id
*/ */
...@@ -508,4 +511,12 @@ public class TbCfOrderEntity implements Serializable { ...@@ -508,4 +511,12 @@ public class TbCfOrderEntity implements Serializable {
public String getDescripitionName() { public String getDescripitionName() {
return descripitionName; return descripitionName;
} }
public String getOrdersId() {
return ordersId;
}
public void setOrdersId(String ordersId) {
this.ordersId = ordersId;
}
} }
...@@ -13,6 +13,10 @@ import java.util.Date; ...@@ -13,6 +13,10 @@ import java.util.Date;
*/ */
public class TbCfOrderListEntity implements Serializable { public class TbCfOrderListEntity implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
/**
* 订单id
*/
private String ordersId;
/** /**
* 订单id * 订单id
*/ */
...@@ -36,7 +40,7 @@ public class TbCfOrderListEntity implements Serializable { ...@@ -36,7 +40,7 @@ public class TbCfOrderListEntity implements Serializable {
/** /**
* 金额 * 金额
*/ */
private BigDecimal realityPay; private BigDecimal itemPrice;
/** /**
* 商品 * 商品
*/ */
...@@ -66,6 +70,14 @@ public class TbCfOrderListEntity implements Serializable { ...@@ -66,6 +70,14 @@ public class TbCfOrderListEntity implements Serializable {
*/ */
private String userName; private String userName;
public String getOrdersId() {
return ordersId;
}
public void setOrdersId(String ordersId) {
this.ordersId = ordersId;
}
/** /**
* 获取:订单id * 获取:订单id
*/ */
...@@ -129,14 +141,14 @@ public class TbCfOrderListEntity implements Serializable { ...@@ -129,14 +141,14 @@ public class TbCfOrderListEntity implements Serializable {
/** /**
* 获取:金额 * 获取:金额
*/ */
public BigDecimal getRealityPay() { public BigDecimal getItemPrice() {
return realityPay; return itemPrice;
} }
/** /**
* 设置:金额 * 设置:金额
*/ */
public void setRealityPay(BigDecimal realityPay) { public void setItemPrice(BigDecimal itemPrice) {
this.realityPay = realityPay; this.itemPrice = itemPrice;
} }
/** /**
* 获取:商品 * 获取:商品
......
...@@ -68,4 +68,25 @@ public interface TbCfItemOrderRService { ...@@ -68,4 +68,25 @@ public interface TbCfItemOrderRService {
* @return 删除条数 * @return 删除条数
*/ */
int deleteBatch(String[] orderItemIds); int deleteBatch(String[] orderItemIds);
String getOrderId(String ordersId);
/**
* 修改物流状态为已入中国仓库
* @return
* @param sid
*/
int updateExpressStatus(String[] sid);
/**
* 修改物流状态为已入非洲仓库
* @return
*/
int updateExpressStatuss(String[] sid);
/**
* 修改物流状态为已签收
* @return
*/
int updateExpressStatusDelivery(String[] sids);
} }
...@@ -75,14 +75,14 @@ public interface TbCfOrderService { ...@@ -75,14 +75,14 @@ public interface TbCfOrderService {
* @param orderId * @param orderId
* @return * @return
*/ */
List<TbCfItemDetailEntity> getOrderItemList(String orderId); List<TbCfItemDetailEntity> getOrderItemList(String ordersId);
/** /**
* 获取订单的代购信息 * 获取订单的代购信息
* @param orderId * @param orderId
* @return * @return
*/ */
PlatformOrderVo getAgentInfo(String orderId); PlatformOrderVo getAgentInfo(String ordersId);
/** /**
* 新增或者修改代购信息 * 新增或者修改代购信息
...@@ -96,24 +96,7 @@ public interface TbCfOrderService { ...@@ -96,24 +96,7 @@ public interface TbCfOrderService {
* @param orderId * @param orderId
* @return * @return
*/ */
List<TbCfOrderEntity> queryOrderDetail(String orderId); List<TbCfOrderEntity> queryOrderDetail(String ordersId);
/**
* 修改物流状态为已入中国仓库
* @return
* @param sid
*/
int updateExpressStatus(String[] sid);
/**
* 修改物流状态为已入非洲仓库
* @return
*/
int updateExpressStatuss(String[] sid);
/**
* 修改物流状态为已签收
* @return
*/
int updateExpressStatusDelivery(String[] sids);
} }
...@@ -56,4 +56,26 @@ public class TbCfItemOrderRServiceImpl implements TbCfItemOrderRService { ...@@ -56,4 +56,26 @@ public class TbCfItemOrderRServiceImpl implements TbCfItemOrderRService {
public int deleteBatch(String[] orderItemIds) { public int deleteBatch(String[] orderItemIds) {
return tbCfItemOrderRDao.deleteBatch(orderItemIds); return tbCfItemOrderRDao.deleteBatch(orderItemIds);
} }
@Override
public String getOrderId(String ordersId) {
return tbCfItemOrderRDao.getOrderId(ordersId);
}
@Override
public int updateExpressStatus(String[] sids) {
return tbCfItemOrderRDao.updateExpressStatus(sids);
}
@Override
public int updateExpressStatuss(String[] sids) {
return tbCfItemOrderRDao.updateExpressStatuss(sids);
}
@Override
public int updateExpressStatusDelivery(String[] sids) {
return tbCfItemOrderRDao.updateExpressStatusDelivery(sids);
}
} }
package com.platform.service.impl; package com.platform.service.impl;
import com.platform.dao.SysUserDao; import com.platform.dao.*;
import com.platform.dao.TbCfOrderDao;
import com.platform.dao.TbCfOrderListDao;
import com.platform.dao.TbCfPlatformOrderDao;
import com.platform.entity.TbCfItemDetailEntity; import com.platform.entity.TbCfItemDetailEntity;
import com.platform.entity.TbCfItemOrderREntity;
import com.platform.entity.TbCfOrderEntity; import com.platform.entity.TbCfOrderEntity;
import com.platform.entity.TbCfPlatformEntity;
import com.platform.enums.DeliveryStatusEnum; import com.platform.enums.DeliveryStatusEnum;
import com.platform.enums.OrderStatusEnum; import com.platform.enums.OrderStatusEnum;
import com.platform.service.TbCfOrderService; import com.platform.service.TbCfOrderService;
...@@ -36,6 +35,8 @@ public class TbCfOrderServiceImpl implements TbCfOrderService { ...@@ -36,6 +35,8 @@ public class TbCfOrderServiceImpl implements TbCfOrderService {
private TbCfOrderListDao tbCfOrderListDao; private TbCfOrderListDao tbCfOrderListDao;
@Autowired @Autowired
private SysUserDao sysUserDao; private SysUserDao sysUserDao;
@Autowired
private TbCfItemOrderRDao tbCfItemOrderRDao;
@Override @Override
public TbCfOrderEntity queryObject(String orderId) { public TbCfOrderEntity queryObject(String orderId) {
return tbCfOrderDao.queryObject(orderId); return tbCfOrderDao.queryObject(orderId);
...@@ -75,13 +76,13 @@ public class TbCfOrderServiceImpl implements TbCfOrderService { ...@@ -75,13 +76,13 @@ public class TbCfOrderServiceImpl implements TbCfOrderService {
@Override @Override
public List<TbCfItemDetailEntity> getOrderItemList(String orderId) { public List<TbCfItemDetailEntity> getOrderItemList(String ordersId) {
return tbCfOrderDao.getOrderItemList(orderId); return tbCfOrderDao.getOrderItemList(ordersId);
} }
@Override @Override
public PlatformOrderVo getAgentInfo(String orderId) { public PlatformOrderVo getAgentInfo(String ordersId) {
return tbCfPlatformOrderDao.getAgentInfo(orderId); return tbCfPlatformOrderDao.getAgentInfo(ordersId);
} }
@Override @Override
...@@ -89,60 +90,47 @@ public class TbCfOrderServiceImpl implements TbCfOrderService { ...@@ -89,60 +90,47 @@ public class TbCfOrderServiceImpl implements TbCfOrderService {
//tbCfPlatformOrder 有relativeId 则就是修改 //tbCfPlatformOrder 有relativeId 则就是修改
int res=0; int res=0;
if(StringUtils.isNotEmpty(tbCfPlatformOrder.getRelativeId())) { if(StringUtils.isNotEmpty(tbCfPlatformOrder.getRelativeId())) {
tbCfPlatformOrder.setOrdersId(tbCfPlatformOrder.getOrdersId());
String userId=ShiroUtils.getUserId(); String userId=ShiroUtils.getUserId();
tbCfPlatformOrder.setUserId(userId); tbCfPlatformOrder.setUserId(userId);
tbCfPlatformOrder.setUserName(sysUserDao.queryById(userId)); tbCfPlatformOrder.setUserName(sysUserDao.queryById(userId));
res = tbCfPlatformOrderDao.updates(tbCfPlatformOrder); res = tbCfPlatformOrderDao.updates(tbCfPlatformOrder);
} else { } else {
tbCfPlatformOrder.setCreateTime(new Date());
tbCfPlatformOrder.setRelativeId(IdUtil.createIdbyUUID()); tbCfPlatformOrder.setRelativeId(IdUtil.createIdbyUUID());
tbCfPlatformOrder.setOrderId(tbCfItemOrderRDao.getOrderId(tbCfPlatformOrder.getOrdersId()));
tbCfPlatformOrder.setCreateTime(new Date());
String userId=ShiroUtils.getUserId(); String userId=ShiroUtils.getUserId();
tbCfPlatformOrder.setUserId(userId); tbCfPlatformOrder.setUserId(userId);
tbCfPlatformOrder.setUserName(sysUserDao.queryById(userId)); tbCfPlatformOrder.setUserName(sysUserDao.queryById(userId));
tbCfPlatformOrder.setRealityPay(tbCfPlatformOrder.getRealityPay());
res = tbCfPlatformOrderDao.save(tbCfPlatformOrder); res = tbCfPlatformOrderDao.save(tbCfPlatformOrder);
} }
//如果填写了原网站订单号,那么意味着已发货,需要更改发货状态 //如果填写了原网站订单号,那么意味着已发货,需要更改发货状态
if(StringUtils.isNotEmpty(tbCfPlatformOrder.getPOrderId())) { if(StringUtils.isNotEmpty(tbCfPlatformOrder.getpOrderId())) {
TbCfOrderEntity tbCfOrder = new TbCfOrderEntity(); TbCfItemOrderREntity tbCfItemOrderREntity = new TbCfItemOrderREntity();
tbCfOrder.setOrderId(tbCfPlatformOrder.getOrderId()); tbCfItemOrderREntity.setOrderItemId(tbCfPlatformOrder.getOrdersId());
tbCfOrder.setOrderStatus(OrderStatusEnum.SHIPPED.getValue()); tbCfItemOrderREntity.setOrderStatus(OrderStatusEnum.SHIPPED.getValue());
tbCfOrderDao.update(tbCfOrder); tbCfItemOrderRDao.update(tbCfItemOrderREntity);
//更新发货时间,如果原值为空就更新,否则保留原值 //更新发货时间,如果原值为空就更新,否则保留原值
TbCfOrderEntity tbCfOrder2 = new TbCfOrderEntity(); TbCfItemOrderREntity tbCfItemOrderREntity2 = new TbCfItemOrderREntity();
tbCfOrder2.setOrderId(tbCfPlatformOrder.getOrderId()); tbCfItemOrderREntity2.setOrderItemId(tbCfPlatformOrder.getOrdersId());
tbCfOrder2.setDeliveryTime(new Date()); tbCfItemOrderREntity2.setDeliveryTime(new Date());
tbCfOrderDao.updateDeliveryTime(tbCfOrder2); tbCfItemOrderRDao.updateDeliveryTime(tbCfItemOrderREntity2);
} }
//如果填写了快递单号,那么意味着已代购,需要更改发货状态 //如果填写了快递单号,那么意味着已代购,需要更改发货状态
if(StringUtils.isNotEmpty(tbCfPlatformOrder.getPExpressNumber())) { if(StringUtils.isNotEmpty(tbCfPlatformOrder.getpExpressNumber())) {
TbCfOrderEntity tbCfOrder = new TbCfOrderEntity(); TbCfItemOrderREntity tbCfItemOrderREntity2 = new TbCfItemOrderREntity();
tbCfOrder.setOrderId(tbCfPlatformOrder.getOrderId()); tbCfItemOrderREntity2.setOrderItemId(tbCfPlatformOrder.getOrdersId());
tbCfOrder.setDeliveryFlag(DeliveryStatusEnum.PURCHASE.getValue()); tbCfItemOrderREntity2.setDeliveryFlag(DeliveryStatusEnum.PURCHASE.getValue());
tbCfOrderDao.update(tbCfOrder); tbCfItemOrderRDao.update(tbCfItemOrderREntity2);
} }
return res; return res;
} }
@Override @Override
public List<TbCfOrderEntity> queryOrderDetail(String orderId) { public List<TbCfOrderEntity> queryOrderDetail(String ordersId) {
return tbCfOrderDao.queryOrderDetail(orderId); return tbCfOrderDao.queryOrderDetail(ordersId);
} }
@Override
public int updateExpressStatus(String[] sids) {
return tbCfOrderDao.updateExpressStatus(sids);
}
@Override
public int updateExpressStatuss(String[] sids) {
return tbCfOrderDao.updateExpressStatuss(sids);
}
@Override
public int updateExpressStatusDelivery(String[] sids) {
return tbCfOrderDao.updateExpressStatusDelivery(sids);
}
} }
...@@ -44,7 +44,7 @@ public class TbCfPlatformOrderServiceImpl implements TbCfPlatformOrderService { ...@@ -44,7 +44,7 @@ public class TbCfPlatformOrderServiceImpl implements TbCfPlatformOrderService {
@Override @Override
public int save(PlatformOrderVo platformOrderVo) { public int save(PlatformOrderVo platformOrderVo) {
platformOrderVo.setPOrderId(IdUtil.createIdbyUUID()); platformOrderVo.setpOrderId(IdUtil.createIdbyUUID());
String userId=ShiroUtils.getUserId(); String userId=ShiroUtils.getUserId();
platformOrderVo.setUserId(userId); platformOrderVo.setUserId(userId);
platformOrderVo.setUserName(sysUserDao.queryById(userId)); platformOrderVo.setUserName(sysUserDao.queryById(userId));
......
package com.platform.task; package com.platform.task;
import com.platform.service.TbCfItemOrderRService;
import com.platform.service.TbCfOrderService; import com.platform.service.TbCfOrderService;
import com.platform.utils.util.HttpUtils; import com.platform.utils.util.HttpUtils;
import net.sf.json.JSONArray; import net.sf.json.JSONArray;
...@@ -14,7 +15,7 @@ import java.util.*; ...@@ -14,7 +15,7 @@ import java.util.*;
@Component("ExpressStatusTask") @Component("ExpressStatusTask")
public class ExpressStatusTask { public class ExpressStatusTask {
@Autowired @Autowired
private TbCfOrderService tbCfOrderService; private TbCfItemOrderRService tbCfItemOrderRService;
@Scheduled(cron = "0 15 0/2 * * ? ") @Scheduled(cron = "0 15 0/2 * * ? ")
public void expressStatusTaskForStorageC() { public void expressStatusTaskForStorageC() {
...@@ -40,7 +41,7 @@ public class ExpressStatusTask { ...@@ -40,7 +41,7 @@ public class ExpressStatusTask {
sids[i]=object.getString("sid"); sids[i]=object.getString("sid");
} }
if (sids.length != 0) { if (sids.length != 0) {
tbCfOrderService.updateExpressStatus(sids); tbCfItemOrderRService.updateExpressStatus(sids);
System.out.println("修改了:"+sids.length+"条数据"); System.out.println("修改了:"+sids.length+"条数据");
} }
long endTime = System.currentTimeMillis(); long endTime = System.currentTimeMillis();
...@@ -72,7 +73,7 @@ public class ExpressStatusTask { ...@@ -72,7 +73,7 @@ public class ExpressStatusTask {
sids[i]=object.getString("sid"); sids[i]=object.getString("sid");
} }
if (sids.length != 0) { if (sids.length != 0) {
tbCfOrderService.updateExpressStatuss(sids); tbCfItemOrderRService.updateExpressStatuss(sids);
System.out.println("修改了:"+sids.length+"条数据"); System.out.println("修改了:"+sids.length+"条数据");
} }
long endTime = System.currentTimeMillis(); long endTime = System.currentTimeMillis();
...@@ -103,7 +104,7 @@ public class ExpressStatusTask { ...@@ -103,7 +104,7 @@ public class ExpressStatusTask {
sids[i]=object.getString("sid"); sids[i]=object.getString("sid");
} }
if (sids.length != 0) { if (sids.length != 0) {
tbCfOrderService.updateExpressStatusDelivery(sids); tbCfItemOrderRService.updateExpressStatusDelivery(sids);
System.out.println("修改了:"+sids.length+"条数据"); System.out.println("修改了:"+sids.length+"条数据");
} }
long endTime = System.currentTimeMillis(); long endTime = System.currentTimeMillis();
......
...@@ -10,6 +10,10 @@ public class PlatformOrderVo implements Serializable{ ...@@ -10,6 +10,10 @@ public class PlatformOrderVo implements Serializable{
* 对应id * 对应id
*/ */
private String relativeId; private String relativeId;
/**
* 订单id
*/
private String ordersId;
/** /**
* 订单id * 订单id
*/ */
...@@ -30,23 +34,11 @@ public class PlatformOrderVo implements Serializable{ ...@@ -30,23 +34,11 @@ public class PlatformOrderVo implements Serializable{
* 第三方发货地址 * 第三方发货地址
*/ */
private String pDeliveryAddress; private String pDeliveryAddress;
/**
* 代购人
*/
private String userName;
/**
* 代购人id
*/
private String userId;
/** /**
* 商品品名 * 商品品名
*/ */
private String descripitionId; private String descripitionId;
/**
* 商品品名
*/
private String templateTitle;
/** /**
* 创建时间 * 创建时间
*/ */
...@@ -60,28 +52,25 @@ public class PlatformOrderVo implements Serializable{ ...@@ -60,28 +52,25 @@ public class PlatformOrderVo implements Serializable{
*/ */
private String pExpressNumber; private String pExpressNumber;
private String userId;
private String userName;
public String getOrdersId() {
return ordersId;
}
public String getTemplateTitle() { public void setOrdersId(String ordersId) {
return templateTitle; this.ordersId = ordersId;
} }
public void setTemplateTitle(String templateTitle) { public String getRelativeId() {
this.templateTitle = templateTitle; return relativeId;
} }
// /** public void setRelativeId(String relativeId) {
// * 设置:商品品名 this.relativeId = relativeId;
// */ }
// public String setDescripitionId() {
// return descripitionId;
// }
// /**
// * 获取:商品品名
// */
// public String getDescripitionId() {
// this.descripitionId = descripitionId;
// return descripitionId;
// }
public String getpOrderId() { public String getpOrderId() {
...@@ -92,6 +81,22 @@ public class PlatformOrderVo implements Serializable{ ...@@ -92,6 +81,22 @@ public class PlatformOrderVo implements Serializable{
this.pOrderId = pOrderId; this.pOrderId = pOrderId;
} }
public String getPlatformName() {
return platformName;
}
public void setPlatformName(String platformName) {
this.platformName = platformName;
}
public String getPlatformCode() {
return platformCode;
}
public void setPlatformCode(String platformCode) {
this.platformCode = platformCode;
}
public String getpDeliveryAddress() { public String getpDeliveryAddress() {
return pDeliveryAddress; return pDeliveryAddress;
} }
...@@ -100,6 +105,7 @@ public class PlatformOrderVo implements Serializable{ ...@@ -100,6 +105,7 @@ public class PlatformOrderVo implements Serializable{
this.pDeliveryAddress = pDeliveryAddress; this.pDeliveryAddress = pDeliveryAddress;
} }
public String getDescripitionId() { public String getDescripitionId() {
return descripitionId; return descripitionId;
} }
...@@ -108,158 +114,52 @@ public class PlatformOrderVo implements Serializable{ ...@@ -108,158 +114,52 @@ public class PlatformOrderVo implements Serializable{
this.descripitionId = descripitionId; this.descripitionId = descripitionId;
} }
public String getpExpressNumber() { public Date getCreateTime() {
return pExpressNumber; return createTime;
} }
public void setpExpressNumber(String pExpressNumber) { public void setCreateTime(Date createTime) {
this.pExpressNumber = pExpressNumber; this.createTime = createTime;
} }
/** public BigDecimal getRealityPay() {
* 设置:对应id return realityPay;
*/
public void setRelativeId(String relativeId) {
this.relativeId = relativeId;
} }
/** public void setRealityPay(BigDecimal realityPay) {
* 获取:对应id this.realityPay = realityPay;
*/
public String getRelativeId() {
return relativeId;
}
/**
* 设置:订单id
*/
public void setOrderId(String orderId) {
this.orderId = orderId;
} }
/**
* 获取:订单id
*/
public String getOrderId() {
return orderId;
}
/**
* 设置:第三方订单id
*/
public void setPOrderId(String pOrderId) {
this.pOrderId = pOrderId;
}
/** public String getpExpressNumber() {
* 获取:第三方订单id return pExpressNumber;
*/
public String getPOrderId() {
return pOrderId;
}
/**
* 设置:第三方平台名
*/
public void setPlatformName(String platformName) {
this.platformName = platformName;
} }
/** public void setpExpressNumber(String pExpressNumber) {
* 获取:第三方平台名 this.pExpressNumber = pExpressNumber;
*/
public String getPlatformName() {
return platformName;
}
/**
* 设置:第三方平台编号
*/
public void setPlatformCode(String platformCode) {
this.platformCode = platformCode;
} }
/** public String getUserId() {
* 获取:第三方平台编号 return userId;
*/
public String getPlatformCode() {
return platformCode;
}
/**
* 设置:第三方发货地址
*/
public void setPDeliveryAddress(String pDeliveryAddress) {
this.pDeliveryAddress = pDeliveryAddress;
} }
/** public void setUserId(String userId) {
* 获取:第三方发货地址 this.userId = userId;
*/
public String getPDeliveryAddress() {
return pDeliveryAddress;
} }
/**
* 获取:代购人
* @return
*/
public String getUserName() { public String getUserName() {
return userName; return userName;
} }
/**
* 设置:代购人
* @return
*/
public void setUserName(String userName) { public void setUserName(String userName) {
this.userName = userName; this.userName = userName;
} }
/** public String getOrderId() {
* 设置:代购人id return orderId;
*/
public void setUserId(String userId) {
this.userId = userId;
}
/**
* 获取:代购人id
*/
public String getUserId() {
return userId;
}
/**
* 设置:创建时间
*/
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
/**
* 获取:创建时间
*/
public Date getCreateTime() {
return createTime;
}
/**
* 设置:实际付款
*/
public void setRealityPay(BigDecimal realityPay) {
this.realityPay = realityPay;
}
/**
* 获取:实际付款
*/
public BigDecimal getRealityPay() {
return realityPay;
}
/**
* 设置:第三方快递单号
*/
public void setPExpressNumber(String pExpressNumber) {
this.pExpressNumber = pExpressNumber;
} }
/** public void setOrderId(String orderId) {
* 获取:第三方快递单号 this.orderId = orderId;
*/
public String getPExpressNumber() {
return pExpressNumber;
} }
} }
...@@ -8,6 +8,11 @@ ...@@ -8,6 +8,11 @@
<result property="itemId" column="item_id"/> <result property="itemId" column="item_id"/>
<result property="orderId" column="order_id"/> <result property="orderId" column="order_id"/>
<result property="enableFlag" column="enable_flag"/> <result property="enableFlag" column="enable_flag"/>
<result property="orderStatus" column="order_status"/>
<result property="deliveryFlag" column="delivery_flag"/>
<result property="deliveryTime" column="delivery_time"/>
<result property="closeTime" column="close_time"/>
<result property="updateTime" column="update_time"/>
</resultMap> </resultMap>
<select id="queryObject" resultType="com.platform.entity.TbCfItemOrderREntity"> <select id="queryObject" resultType="com.platform.entity.TbCfItemOrderREntity">
...@@ -15,7 +20,12 @@ ...@@ -15,7 +20,12 @@
`order_item_id`, `order_item_id`,
`item_id`, `item_id`,
`order_id`, `order_id`,
`enable_flag` `enable_flag`,
`order_status`,
`delivery_flag`,
`delivery_time`,
`close_time`,
`update_time`
from tb_cf_item_order_r from tb_cf_item_order_r
where order_item_id = #{id} where order_item_id = #{id}
</select> </select>
...@@ -25,7 +35,12 @@ ...@@ -25,7 +35,12 @@
`order_item_id`, `order_item_id`,
`item_id`, `item_id`,
`order_id`, `order_id`,
`enable_flag` `enable_flag`,
`order_status`,
`delivery_flag`,
`delivery_time`,
`close_time`,
`update_time`
from tb_cf_item_order_r from tb_cf_item_order_r
WHERE 1=1 WHERE 1=1
<if test="name != null and name.trim() != ''"> <if test="name != null and name.trim() != ''">
...@@ -57,12 +72,22 @@ ...@@ -57,12 +72,22 @@
`order_item_id`, `order_item_id`,
`item_id`, `item_id`,
`order_id`, `order_id`,
`enable_flag`) `enable_flag`,
`order_status`,
`delivery_flag`,
`delivery_time`,
`close_time`,
`update_time`)
values( values(
#{orderItemId}, #{orderItemId},
#{itemId}, #{itemId},
#{orderId}, #{orderId},
#{enableFlag}) #{enableFlag},
#{orderStatus},
#{deliveryFlag},
#{deliveryTime},
#{closeTime},
#{updateTime})
</insert> </insert>
<update id="update" parameterType="com.platform.entity.TbCfItemOrderREntity"> <update id="update" parameterType="com.platform.entity.TbCfItemOrderREntity">
...@@ -70,7 +95,12 @@ ...@@ -70,7 +95,12 @@
<set> <set>
<if test="itemId != null">`item_id` = #{itemId}, </if> <if test="itemId != null">`item_id` = #{itemId}, </if>
<if test="orderId != null">`order_id` = #{orderId}, </if> <if test="orderId != null">`order_id` = #{orderId}, </if>
<if test="enableFlag != null">`enable_flag` = #{enableFlag}</if> <if test="enableFlag != null">`enable_flag` = #{enableFlag},</if>
<if test="orderStatus != null">`order_status` = #{orderStatus},</if>
<if test="deliveryFlag != null">`delivery_flag` = #{deliveryFlag},</if>
<if test="deliveryTime != null">`delivery_time` = #{deliveryTime},</if>
<if test="closeTime != null">`close_time` = #{closeTime},</if>
<if test="updateTime != null">`update_time` = #{updateTime}</if>
</set> </set>
where order_item_id = #{orderItemId} where order_item_id = #{orderItemId}
</update> </update>
...@@ -85,5 +115,49 @@ ...@@ -85,5 +115,49 @@
#{orderItemId} #{orderItemId}
</foreach> </foreach>
</delete> </delete>
<select id="getOrderId" resultType="String">
select order_id from tb_cf_item_order_r i where i.order_item_id=#{ordersId}
</select>
<select id="getItemId" resultType="String">
select item_id from tb_cf_item_order_r i where i.order_item_id=#{ordersId}
</select>
<update id="updateDeliveryTime" parameterType="com.platform.entity.TbCfItemOrderREntity">
update tb_cf_item_order_r r
<set>
<if test="deliveryTime != null">r.delivery_time = #{deliveryTime}, </if>
</set>
where r.order_item_id = #{orderItemId} and r.delivery_time is null
</update>
<!--根据快递单号id,修改物流状态为已入中国仓库 -->
<update id="updateExpressStatus">
UPDATE tb_cf_order o,tb_cf_platform_order p,
SET i.delivery_flag = 20
WHERE o.order_id=p.order_id and i.delivery_flag=10 and p.p_express_number in
<foreach collection="array" item="sids" open="(" separator="," close=")">
#{sids}
</foreach>
</update>
<!--根据快递单号id,修改物流状态为已入非洲仓库 -->
<update id="updateExpressStatuss">
update tb_cf_order o,tb_cf_platform_order p
set o.delivery_flag = 40
where o.order_id=p.order_id and o.delivery_flag = 20 and p.p_express_number in
<foreach collection="array" item="sids" open="(" separator="," close=")">
#{sids}
</foreach>
</update>
<!--根据快递单号id,修改物流状态为已签收 -->
<update id="updateExpressStatusDelivery">
update tb_cf_order o,tb_cf_platform_order p
set o.delivery_flag = 50
where o.order_id=p.order_id and p.p_express_number in
<foreach collection="array" item="sids" open="(" separator="," close=")">
#{sids}
</foreach>
</update>
</mapper> </mapper>
\ No newline at end of file
...@@ -21,18 +21,19 @@ ...@@ -21,18 +21,19 @@
<!--查询订单列表--> <!--查询订单列表-->
<select id="queryOrderList" resultType="com.platform.entity.TbCfOrderListEntity"> <select id="queryOrderList" resultType="com.platform.entity.TbCfOrderListEntity">
select select
i.order_item_id ordersId,
o.order_id, o.order_id,
i.item_id, i.item_id,
o.user_id, o.user_id,
o.order_no, o.order_no,
o.order_time, o.order_time,
o.reality_pay, d.item_price,
d.item_title, d.item_title,
d.item_num, d.item_num,
o.delivery_address, o.delivery_address,
f.pay_way_code, f.pay_way_code,
p.p_express_number, p.p_express_number,
o.delivery_flag, i.delivery_flag,
s.user_name s.user_name
from tb_cf_order o from tb_cf_order o
left join tb_cf_item_order_r i on o.order_id=i.order_id left join tb_cf_item_order_r i on o.order_id=i.order_id
...@@ -40,7 +41,7 @@ ...@@ -40,7 +41,7 @@
left join tb_cf_platform_order p on p.order_id=o.order_id left join tb_cf_platform_order p on p.order_id=o.order_id
left join tb_cf_finance f on f.order_id=o.order_id left join tb_cf_finance f on f.order_id=o.order_id
left join sys_user s on s.user_id=p.user_id left join sys_user s on s.user_id=p.user_id
WHERE 1=1 and f.pay_way_code!='null' WHERE 1=1 and i.enable_flag=1 and f.pay_way_code!='null'
<if test="name != null and name.trim() != ''"> <if test="name != null and name.trim() != ''">
AND o.order_no LIKE concat('%',#{name},'%') AND o.order_no LIKE concat('%',#{name},'%')
</if> </if>
...@@ -79,7 +80,7 @@ ...@@ -79,7 +80,7 @@
left join tb_cf_platform_order p on p.order_id=o.order_id left join tb_cf_platform_order p on p.order_id=o.order_id
left join tb_cf_finance f on f.order_id=o.order_id left join tb_cf_finance f on f.order_id=o.order_id
left join sys_user s on s.user_id=p.user_id left join sys_user s on s.user_id=p.user_id
WHERE 1=1 and f.pay_way_code!='null' WHERE 1=1 and i.enable_flag=1 and f.pay_way_code!='null'
<if test="name != null and name.trim() != ''"> <if test="name != null and name.trim() != ''">
AND o.order_no LIKE concat('%',#{name},'%') AND o.order_no LIKE concat('%',#{name},'%')
</if> </if>
......
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
<resultMap type="com.platform.vo.PlatformOrderVo" id="tbCfPlatformOrderMap"> <resultMap type="com.platform.vo.PlatformOrderVo" id="tbCfPlatformOrderMap">
<result property="relativeId" column="relative_id"/> <result property="relativeId" column="relative_id"/>
<result property="ordersId" column="ordersId"/>
<result property="orderId" column="order_id"/> <result property="orderId" column="order_id"/>
<result property="pOrderId" column="p_order_id"/> <result property="pOrderId" column="p_order_id"/>
<result property="platformName" column="platform_name"/> <result property="platformName" column="platform_name"/>
...@@ -130,6 +131,7 @@ ...@@ -130,6 +131,7 @@
</update>--> </update>-->
<update id="updates" parameterType="com.platform.vo.PlatformOrderVo"> <update id="updates" parameterType="com.platform.vo.PlatformOrderVo">
update tb_cf_platform_order p left join tb_cf_express_template e on e.template_id=p.descripition_id update tb_cf_platform_order p left join tb_cf_express_template e on e.template_id=p.descripition_id
left join tb_cf_item_order_r i on i.order_id=p.order_id
<set> <set>
<if test="orderId != null">p.order_id = #{orderId}, </if> <if test="orderId != null">p.order_id = #{orderId}, </if>
<if test="pOrderId != null">p.p_order_id = #{pOrderId}, </if> <if test="pOrderId != null">p.p_order_id = #{pOrderId}, </if>
...@@ -161,7 +163,7 @@ ...@@ -161,7 +163,7 @@
<select id="getAgentInfo" resultType="com.platform.vo.PlatformOrderVo"> <select id="getAgentInfo" resultType="com.platform.vo.PlatformOrderVo">
select select
p.relative_id, p.relative_id,
p.order_id, i.order_item_id ordersId,
p.p_order_id, p.p_order_id,
p.platform_name, p.platform_name,
p.platform_code, p.platform_code,
...@@ -169,14 +171,15 @@ ...@@ -169,14 +171,15 @@
u.user_name, u.user_name,
u.user_id, u.user_id,
p.create_time, p.create_time,
o.reality_pay, p.reality_pay,
p.p_express_number, p.p_express_number,
p.descripition_id p.descripition_id
from tb_cf_platform_order p from tb_cf_platform_order p
left join tb_cf_order o on p.order_id=o.order_id left join tb_cf_order o on p.order_id=o.order_id
left join sys_user u on p.user_id=u.user_id left join sys_user u on p.user_id=u.user_id
left join tb_cf_express_template e on e.template_id=p.descripition_id left join tb_cf_express_template e on e.template_id=p.descripition_id
where p.order_id=#{orderId}; left join tb_cf_item_order_r i on i.order_id=o.order_id
where i.order_item_id =#{ordersId};
</select> </select>
</mapper> </mapper>
\ No newline at end of file
...@@ -229,7 +229,7 @@ ...@@ -229,7 +229,7 @@
</i-select> </i-select>
</el-form-item> </el-form-item>
<el-form-item label="实际付款" :label-width="formLabelWidth"> <el-form-item label="实际付款" :label-width="formLabelWidth">
<el-input v-model="agentInfo.realityPay" disabled="true"></el-input> <el-input v-model="agentInfo.realityPay"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="快递单号" :label-width="formLabelWidth"> <el-form-item label="快递单号" :label-width="formLabelWidth">
<el-input v-model="agentInfo.pExpressNumber" ></el-input> <el-input v-model="agentInfo.pExpressNumber" ></el-input>
......
...@@ -580,7 +580,7 @@ validFormat = function (cellvalue) { ...@@ -580,7 +580,7 @@ validFormat = function (cellvalue) {
*/ */
orderStatusFormat = function (cellvalue) { orderStatusFormat = function (cellvalue) {
var returnStr = "未知"; var returnStr = "未知";
if (!!cellvalue||cellvalue == '0') { if(!!cellvalue) {
if (cellvalue == '0') { if (cellvalue == '0') {
returnStr = "取消"; returnStr = "取消";
} else if (cellvalue == '10') { } else if (cellvalue == '10') {
......
...@@ -7,13 +7,14 @@ $(function () { ...@@ -7,13 +7,14 @@ $(function () {
],*/ ],*/
colModel: [ colModel: [
//显示字段 //显示字段
{label: 'orderId', name: 'orderId', index: 'order_id', key: true, hidden: true}, {label: 'ordersId', name: 'ordersId', index: 'ordersId', key: true, hidden: true},
{label: 'orderId', name: 'orderId', index: 'order_id', hidden: true},
{label: '订单号', name: 'orderNo', index: 'order_no', width: 120}, {label: '订单号', name: 'orderNo', index: 'order_no', width: 120},
{label: '订单创建时间', name: 'orderTime', index: 'order_time', width: 90}, {label: '订单创建时间', name: 'orderTime', index: 'order_time', width: 90},
{label: '支付状态', name: 'payStatus', index: 'pay_status', width: 50, formatter: payStatusFormat}, {label: '支付状态', name: 'payStatus', index: 'pay_status', width: 50, formatter: payStatusFormat},
{label: '订单状态', name: 'orderStatus', index: 'order_status', width: 50, formatter: orderStatusFormat}, {label: '订单状态', name: 'orderStatus', index: 'orderStatus', width: 50, formatter: orderStatusFormat},
{label: '代购状态', name: 'deliveryFlag', index: 'delivery_flag', width: 70, formatter: deliveryFlagFormat}, {label: '代购状态', name: 'deliveryFlag', index: 'deliveryFlag', width: 70, formatter: deliveryFlagFormat},
{label: '代购时间', name: 'deliveryTime', index: 'delivery_time', width: 100}, {label: '代购时间', name: 'deliveryTime', index: 'deliveryTime', width: 100},
{label: '用户id', name: 'userId', index: 'user_id', width: 110,hidden:true}, {label: '用户id', name: 'userId', index: 'user_id', width: 110,hidden:true},
{label: '用户名', name: 'userName', index: 'user_name', width: 55}, {label: '用户名', name: 'userName', index: 'user_name', width: 55},
{label: '商品品名Id', name: 'descripitionId', index: 'descripition_id', width: 50,hidden:true}, {label: '商品品名Id', name: 'descripitionId', index: 'descripition_id', width: 50,hidden:true},
...@@ -27,7 +28,7 @@ $(function () { ...@@ -27,7 +28,7 @@ $(function () {
{label: '收货人', name: 'deliveryName', index: 'delivery_name', width: 70}, {label: '收货人', name: 'deliveryName', index: 'delivery_name', width: 70},
{label: '收货人手机', name: 'deliveryPhone', index: 'delivery_phone', width: 70}, {label: '收货人手机', name: 'deliveryPhone', index: 'delivery_phone', width: 70},
{label: '快递费', name: 'expressCost', index: 'express_cost', width: 80,hidden:true}, {label: '快递费', name: 'expressCost', index: 'express_cost', width: 80,hidden:true},
{label: '更新时间', name: 'updateTime', index: 'update_time', width: 120,hidden:true}, {label: '更新时间', name: 'updateTime', index: 'updateTime', width: 120,hidden:true},
{label: '成交时间', name: 'dealTime', index: 'deal_time', width: 120,hidden:true}, {label: '成交时间', name: 'dealTime', index: 'deal_time', width: 120,hidden:true},
{label: '优惠券id', name: 'couponId', index: 'coupon_id', width: 120,hidden:true}, {label: '优惠券id', name: 'couponId', index: 'coupon_id', width: 120,hidden:true},
{label: '优惠券标题', name: 'couponTitle', index: 'coupon_title', width: 120,hidden:true}, {label: '优惠券标题', name: 'couponTitle', index: 'coupon_title', width: 120,hidden:true},
...@@ -35,7 +36,7 @@ $(function () { ...@@ -35,7 +36,7 @@ $(function () {
{label: '税费', name: 'tax', index: 'tax', width: 80,hidden:true}, {label: '税费', name: 'tax', index: 'tax', width: 80,hidden:true},
{label: '手续费', name: 'fee', index: 'fee', width: 80,hidden:true}, {label: '手续费', name: 'fee', index: 'fee', width: 80,hidden:true},
{label: '交易号', name: 'payId', index: 'pay_id', width: 120,hidden:true}, {label: '交易号', name: 'payId', index: 'pay_id', width: 120,hidden:true},
{label: '交易关闭时间', name: 'closeTime', index: 'close_time', width: 100}] {label: '交易关闭时间', name: 'closeTime', index: 'closeTime', width: 100}]
}); });
$.get('../tbcfexpresstemplate/queryAll',function (res) { $.get('../tbcfexpresstemplate/queryAll',function (res) {
vm.descripition=JSON.parse(res).list; vm.descripition=JSON.parse(res).list;
...@@ -57,7 +58,7 @@ let vm = new Vue({ ...@@ -57,7 +58,7 @@ let vm = new Vue({
//订单详情 //订单详情
ordersData: [], ordersData: [],
agentInfo: { agentInfo: {
orderId: "", ordersId:'',
//代购人 //代购人
userName: '', userName: '',
//快递单号 //快递单号
...@@ -161,26 +162,26 @@ let vm = new Vue({ ...@@ -161,26 +162,26 @@ let vm = new Vue({
}, },
//获取订单详情 //获取订单详情
showOrders: function () { showOrders: function () {
let orderId = getSelectedRow("#jqGrid"); let ordersId = getSelectedRow("#jqGrid");
if (orderId == null) { if (ordersId == null) {
return; return;
} }
vm.orderVisible = true; vm.orderVisible = true;
vm.getOrderDetails(orderId); vm.getOrderDetails(ordersId);
}, },
//获取商品详情 //获取商品详情
showItems: function () { showItems: function () {
let orderId = getSelectedRow("#jqGrid"); let ordersId = getSelectedRow("#jqGrid");
if (orderId == null) { if (ordersId == null) {
return; return;
} }
vm.itemVisible = true; vm.itemVisible = true;
vm.getOrderItemList(orderId); vm.getOrderItemList(ordersId);
}, },
//获取代购信息 //获取代购信息
showAgent: function () { showAgent: function () {
let orderId = getSelectedRow("#jqGrid"); let ordersId = getSelectedRow("#jqGrid");
if (orderId == null) { if (ordersId == null) {
return; return;
} }
let rowData=getSelectedRowData("#jqGrid"); let rowData=getSelectedRowData("#jqGrid");
...@@ -191,21 +192,21 @@ let vm = new Vue({ ...@@ -191,21 +192,21 @@ let vm = new Vue({
return; return;
} }
vm.agentVisible = true; vm.agentVisible = true;
vm.agentInfo.orderId = orderId; vm.agentInfo.ordersId = ordersId;
vm.getAgentInfo(orderId); vm.getAgentInfo(ordersId);
}, },
update: function (event) { update: function (event) {
let orderId = getSelectedRow("#jqGrid"); let ordersId = getSelectedRow("#jqGrid");
if (orderId == null) { if (ordersId == null) {
return; return;
} }
vm.showList = false; vm.showList = false;
vm.title = "修改"; vm.title = "修改";
vm.getInfo(orderId); vm.getInfo(ordersId);
}, },
saveOrUpdate: function (event) { saveOrUpdate: function (event) {
let url = vm.tbCfOrder.orderId == null ? "../tbcforder/save" : "../tbcforder/update"; let url = vm.tbCfOrder.ordersId == null ? "../tbcforder/save" : "../tbcforder/update";
Ajax.request({ Ajax.request({
url: url, url: url,
params: JSON.stringify(vm.tbCfOrder), params: JSON.stringify(vm.tbCfOrder),
...@@ -238,9 +239,9 @@ let vm = new Vue({ ...@@ -238,9 +239,9 @@ let vm = new Vue({
}); });
}); });
}, },
getInfo: function (orderId) { getInfo: function (ordersId) {
Ajax.request({ Ajax.request({
url: "../tbcforder/info/" + orderId, url: "../tbcforder/info/" + ordersId,
async: true, async: true,
successCallback: function (r) { successCallback: function (r) {
vm.tbCfOrder = r.tbCfOrder; vm.tbCfOrder = r.tbCfOrder;
...@@ -248,9 +249,10 @@ let vm = new Vue({ ...@@ -248,9 +249,10 @@ let vm = new Vue({
}); });
}, },
/*获取订单中的商品*/ /*获取订单中的商品*/
getOrderItemList: function (orderId) { getOrderItemList: function (ordersId) {
console.log(vm.itemData);
Ajax.request({ Ajax.request({
url: "../tbcforder/item/" + orderId, url: "../tbcforder/item/" + ordersId,
async: true, async: true,
successCallback: function (r) { successCallback: function (r) {
vm.itemData = r.list; vm.itemData = r.list;
...@@ -258,9 +260,10 @@ let vm = new Vue({ ...@@ -258,9 +260,10 @@ let vm = new Vue({
}); });
}, },
/*获取订单详情*/ /*获取订单详情*/
getOrderDetails: function (orderId) { getOrderDetails: function (ordersId) {
debugger
Ajax.request({ Ajax.request({
url: "../tbcforder/detail/" + orderId, url: "../tbcforder/detail/" + ordersId,
async: true, async: true,
successCallback: function (r1) { successCallback: function (r1) {
vm.ordersData = r1.list; vm.ordersData = r1.list;
...@@ -268,18 +271,21 @@ let vm = new Vue({ ...@@ -268,18 +271,21 @@ let vm = new Vue({
}); });
}, },
/*获取订单的代购信息*/ /*获取订单的代购信息*/
getAgentInfo: function (orderId) { getAgentInfo: function (ordersId) {
console.log('看看',ordersId)
console.log('agentInfo',vm.agentInfo)
// debugger
Ajax.request({ Ajax.request({
url: "../tbcforder/agent/" + orderId, url: "../tbcforder/agent/" + ordersId,
async: true, async: true,
type: "get", type: "get",
successCallback: function (r) { successCallback: function (r) {
console.log(r) console.log("SHUJU",r)
if (!!r.data) { if (!!r.data) {
vm.agentInfo = r.data; vm.agentInfo = r.data;
} else { } else {
vm.agentInfo = { vm.agentInfo = {
orderId:orderId, ordersId:ordersId,
//代购人 //代购人
userName: '', userName: '',
//商品品名 //商品品名
...@@ -300,13 +306,13 @@ let vm = new Vue({ ...@@ -300,13 +306,13 @@ let vm = new Vue({
//新增或者修改代购信息 //新增或者修改代购信息
saveOrUpdateAgentInfo: function () { saveOrUpdateAgentInfo: function () {
console.log(vm.agentInfo.descripitionId); console.log(vm.agentInfo.descripitionId);
console.log(vm.agentInfo) console.log('11',vm.agentInfo);
if(vm.agentInfo.descripitionId){ if(vm.agentInfo.descripitionId){
Ajax.request({ Ajax.request({
url: "../tbcforder/agent/", url: "../tbcforder/agent/",
params: JSON.stringify(vm.agentInfo), params: JSON.stringify(vm.agentInfo),
type: "post", type: "post",
// dataType: "json", dataType: "json",
contentType: 'application/json', contentType: 'application/json',
successCallback: function (r) { successCallback: function (r) {
if(r.result=="1") { if(r.result=="1") {
......
...@@ -7,12 +7,13 @@ $(function () { ...@@ -7,12 +7,13 @@ $(function () {
cellurl:'../tbcforder/changeDeliveryFlag/',*/ cellurl:'../tbcforder/changeDeliveryFlag/',*/
colModel: [ colModel: [
//显示字段 //显示字段
{label: 'orderId', name: 'orderId', index: 'order_id', key: true, hidden: true}, {label: 'ordersId', name: 'ordersId', index: 'ordersId', key: true, hidden: true},
{label: 'itemId', name: 'itemId', index: 'item_id', key: true, hidden: true}, {label: 'orderId', name: 'orderId', index: 'order_id', hidden: true},
{label: 'itemId', name: 'itemId', index: 'item_id',hidden: true},
{label: '用户id', name: 'userId', index: 'user_id', width: 120}, {label: '用户id', name: 'userId', index: 'user_id', width: 120},
{label: '订单号', name: 'orderNo', index: 'order_no', width: 80}, {label: '订单号', name: 'orderNo', index: 'order_no', width: 80},
{label: '下单时间', name: 'orderTime', index: 'order_time', width: 70}, {label: '下单时间', name: 'orderTime', index: 'order_time', width: 70},
{label: '金额',name: 'realityPay', index: 'reality_pay', width: 55,formatter: "currency",formatoptions: { prefix:"$"}}, {label: '金额',name: 'itemPrice', index: 'item_price', width: 55,formatter: "currency",formatoptions: { prefix:"$"}},
// formatter: "currency",formatoptions: {thousandsSeparator:",",decimalSeparator:".",decimalPlaces:"2", prefix:"$"}}, //在金额前加上$,加上后,页合计无法正常显示。 // formatter: "currency",formatoptions: {thousandsSeparator:",",decimalSeparator:".",decimalPlaces:"2", prefix:"$"}}, //在金额前加上$,加上后,页合计无法正常显示。
{label: '商品', name: 'itemTitle', index: 'item_title', width: 90}, {label: '商品', name: 'itemTitle', index: 'item_title', width: 90},
{label: '商品数量', name: 'itemNum', index: 'item_num', width: 30}, {label: '商品数量', name: 'itemNum', index: 'item_num', width: 30},
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论