提交 5b840a11 authored 作者: luojie's avatar luojie

订单修改完成。

上级 ffab217b
...@@ -231,4 +231,24 @@ public class TbCfOrderController { ...@@ -231,4 +231,24 @@ public class TbCfOrderController {
tbCfOrderListService.closeOrder(orderId); tbCfOrderListService.closeOrder(orderId);
return R.ok(); return R.ok();
} }
/**
* 备注订单
*/
@GetMapping("/memoOrder/{orderId}")
@RequiresPermissions("tbcforder:info")
@ResponseBody
public R memoOrder(@PathVariable("orderId") String orderId) {
OrderBasicVo memoOrderVo = tbCfOrderListService.getMemoOrder(orderId);
return R.ok().put("data", memoOrderVo);
}
/**
* 保存或更新备注信息
*/
@PostMapping("/memoOrder")
@RequiresPermissions("tbcforder:info")
@ResponseBody
public R saveOrUpdatemMemoOrder(@RequestBody OrderBasicVo memoOrderVo) {
int res = tbCfOrderListService.saveOrUpdatemMemoOrder(memoOrderVo);
return R.ok().put("result", res);
}
} }
...@@ -2,8 +2,6 @@ package com.platform.dao; ...@@ -2,8 +2,6 @@ package com.platform.dao;
import com.platform.entity.TbCfItemDetailEntity; import com.platform.entity.TbCfItemDetailEntity;
import com.platform.entity.TbCfOrderEntity; import com.platform.entity.TbCfOrderEntity;
import com.platform.entity.TbCfPlatformOrderEntity;
import org.apache.ibatis.annotations.Param;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.List; import java.util.List;
...@@ -74,4 +72,5 @@ public interface TbCfOrderDao extends BaseDao<TbCfOrderEntity> { ...@@ -74,4 +72,5 @@ public interface TbCfOrderDao extends BaseDao<TbCfOrderEntity> {
BigDecimal queryOrderPriceYesterday(); BigDecimal queryOrderPriceYesterday();
int updateOrder(String orderId); int updateOrder(String orderId);
} }
package com.platform.dao; package com.platform.dao;
import com.platform.entity.TbCfOrderListEntity; import com.platform.entity.TbCfOrderListEntity;
import com.platform.utils.Query;
import com.platform.vo.DeliveryOrderVo; import com.platform.vo.DeliveryOrderVo;
import com.platform.vo.OrderBasicVo; import com.platform.vo.OrderBasicVo;
...@@ -36,4 +35,8 @@ public interface TbCfOrderListDao extends BaseDao<TbCfOrderListEntity> { ...@@ -36,4 +35,8 @@ public interface TbCfOrderListDao extends BaseDao<TbCfOrderListEntity> {
int queryTotal(Map<String, Object> map); int queryTotal(Map<String, Object> map);
int closeOrder(String orderId); int closeOrder(String orderId);
OrderBasicVo getMemoOrder(String orderId);
int saveOrUpdatemMemoOrder(OrderBasicVo memoOrderVo);
} }
...@@ -137,6 +137,18 @@ public class TbCfOrderEntity implements Serializable { ...@@ -137,6 +137,18 @@ public class TbCfOrderEntity implements Serializable {
* 商品品名 * 商品品名
*/ */
private String descripitionName; private String descripitionName;
/**
* 订单备注
*/
private String remarkInfo;
public String getRemarkInfo() {
return remarkInfo;
}
public void setRemarkInfo(String remarkInfo) {
this.remarkInfo = remarkInfo;
}
/** /**
* 设置:订单id * 设置:订单id
......
package com.platform.service; package com.platform.service;
import com.platform.entity.TbCfOrderListEntity; import com.platform.entity.TbCfOrderListEntity;
import com.platform.utils.Query;
import com.platform.vo.DeliveryOrderVo; import com.platform.vo.DeliveryOrderVo;
import com.platform.vo.OrderBasicVo; import com.platform.vo.OrderBasicVo;
...@@ -40,4 +39,8 @@ public interface TbCfOrderListService { ...@@ -40,4 +39,8 @@ public interface TbCfOrderListService {
int queryTotal(Map<String, Object> map); int queryTotal(Map<String, Object> map);
int closeOrder(String orderId); int closeOrder(String orderId);
OrderBasicVo getMemoOrder(String orderId);
int saveOrUpdatemMemoOrder(OrderBasicVo memoOrderVo);
} }
...@@ -111,4 +111,5 @@ public interface TbCfOrderService { ...@@ -111,4 +111,5 @@ public interface TbCfOrderService {
BigDecimal queryOrderPriceYesterday(); BigDecimal queryOrderPriceYesterday();
int deleteOrder(String orderId); int deleteOrder(String orderId);
} }
...@@ -3,12 +3,12 @@ package com.platform.service.impl; ...@@ -3,12 +3,12 @@ package com.platform.service.impl;
import com.platform.dao.TbCfOrderListDao; import com.platform.dao.TbCfOrderListDao;
import com.platform.entity.TbCfOrderListEntity; import com.platform.entity.TbCfOrderListEntity;
import com.platform.service.TbCfOrderListService; import com.platform.service.TbCfOrderListService;
import com.platform.utils.Query;
import com.platform.vo.DeliveryOrderVo; import com.platform.vo.DeliveryOrderVo;
import com.platform.vo.OrderBasicVo; import com.platform.vo.OrderBasicVo;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.Date;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
...@@ -57,4 +57,16 @@ public class TbCfOrderListServiceImpl implements TbCfOrderListService { ...@@ -57,4 +57,16 @@ public class TbCfOrderListServiceImpl implements TbCfOrderListService {
public int closeOrder(String orderId) { public int closeOrder(String orderId) {
return tbCfOrderListDao.closeOrder(orderId); return tbCfOrderListDao.closeOrder(orderId);
} }
@Override
public OrderBasicVo getMemoOrder(String orderId) {
return tbCfOrderListDao.getMemoOrder(orderId);
}
@Override
public int saveOrUpdatemMemoOrder(OrderBasicVo memoOrderVo) {
memoOrderVo.setUpdateTime(new Date());
return tbCfOrderListDao.saveOrUpdatemMemoOrder(memoOrderVo);
}
} }
...@@ -11,7 +11,6 @@ import com.platform.utils.IdUtil; ...@@ -11,7 +11,6 @@ import com.platform.utils.IdUtil;
import com.platform.utils.ShiroUtils; import com.platform.utils.ShiroUtils;
import com.platform.utils.StringUtils; import com.platform.utils.StringUtils;
import com.platform.vo.PlatformOrderVo; import com.platform.vo.PlatformOrderVo;
import io.swagger.models.auth.In;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
...@@ -123,6 +122,7 @@ public class TbCfOrderServiceImpl implements TbCfOrderService { ...@@ -123,6 +122,7 @@ public class TbCfOrderServiceImpl implements TbCfOrderService {
TbCfOrderEntity tbCfOrderEntity = new TbCfOrderEntity(); TbCfOrderEntity tbCfOrderEntity = new TbCfOrderEntity();
tbCfOrderEntity.setOrderId(tbCfPlatformOrder.getOrderId()); tbCfOrderEntity.setOrderId(tbCfPlatformOrder.getOrderId());
tbCfOrderEntity.setOrderStatus(OrderStatusEnum.SHIPPED.getValue()); tbCfOrderEntity.setOrderStatus(OrderStatusEnum.SHIPPED.getValue());
tbCfOrderEntity.setDeliveryFlag(DeliveryStatusEnum.PURCHASE.getValue());
tbCfOrderDao.updates(tbCfOrderEntity); tbCfOrderDao.updates(tbCfOrderEntity);
} }
//更新发货时间,如果原值为空就更新,否则保留原值 //更新发货时间,如果原值为空就更新,否则保留原值
......
...@@ -29,8 +29,26 @@ public class OrderBasicVo implements Serializable { ...@@ -29,8 +29,26 @@ public class OrderBasicVo implements Serializable {
private BigDecimal realityPay; private BigDecimal realityPay;
private Date orderTime; private Date orderTime;
private Integer orderStatus; private Integer orderStatus;
private String remarkInfo;
private Date updateTime;
public Date getUpdateTime() {
return updateTime;
}
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
public String getRemarkInfo() {
return remarkInfo;
}
public void setRemarkInfo(String remarkInfo) {
this.remarkInfo = remarkInfo;
}
public Integer getOrderStatus() { public Integer getOrderStatus() {
return orderStatus; return orderStatus;
} }
......
...@@ -56,6 +56,14 @@ public class PlatformOrderVo implements Serializable{ ...@@ -56,6 +56,14 @@ public class PlatformOrderVo implements Serializable{
private String userName; private String userName;
public String getRelativeId() {
return relativeId;
}
public void setRelativeId(String relativeId) {
this.relativeId = relativeId;
}
public String getOrdersId() { public String getOrdersId() {
return ordersId; return ordersId;
} }
...@@ -64,15 +72,14 @@ public class PlatformOrderVo implements Serializable{ ...@@ -64,15 +72,14 @@ public class PlatformOrderVo implements Serializable{
this.ordersId = ordersId; this.ordersId = ordersId;
} }
public String getRelativeId() { public String getOrderId() {
return relativeId; return orderId;
} }
public void setRelativeId(String relativeId) { public void setOrderId(String orderId) {
this.relativeId = relativeId; this.orderId = orderId;
} }
public String getpOrderId() { public String getpOrderId() {
return pOrderId; return pOrderId;
} }
...@@ -105,7 +112,6 @@ public class PlatformOrderVo implements Serializable{ ...@@ -105,7 +112,6 @@ public class PlatformOrderVo implements Serializable{
this.pDeliveryAddress = pDeliveryAddress; this.pDeliveryAddress = pDeliveryAddress;
} }
public String getDescripitionId() { public String getDescripitionId() {
return descripitionId; return descripitionId;
} }
...@@ -130,7 +136,6 @@ public class PlatformOrderVo implements Serializable{ ...@@ -130,7 +136,6 @@ public class PlatformOrderVo implements Serializable{
this.realityPay = realityPay; this.realityPay = realityPay;
} }
public String getpExpressNumber() { public String getpExpressNumber() {
return pExpressNumber; return pExpressNumber;
} }
...@@ -154,12 +159,4 @@ public class PlatformOrderVo implements Serializable{ ...@@ -154,12 +159,4 @@ public class PlatformOrderVo implements Serializable{
public void setUserName(String userName) { public void setUserName(String userName) {
this.userName = userName; this.userName = userName;
} }
public String getOrderId() {
return orderId;
}
public void setOrderId(String orderId) {
this.orderId = orderId;
}
} }
...@@ -287,7 +287,8 @@ ...@@ -287,7 +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>
</set> </set>
where order_id =#{orderId} where order_id =#{orderId}
</update> </update>
......
...@@ -115,7 +115,7 @@ ...@@ -115,7 +115,7 @@
select select
r.order_item_id ordersId, r.order_item_id ordersId,
r.order_id, o.order_id,
i.item_id, i.item_id,
o.order_no, o.order_no,
i.item_img, i.item_img,
...@@ -166,7 +166,9 @@ ...@@ -166,7 +166,9 @@
c.coupon_id, c.coupon_id,
o.reality_pay, o.reality_pay,
o.order_time, o.order_time,
o.order_status o.order_status,
o.remark_info,
o.update_time
from tb_cf_order o from tb_cf_order o
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 tb_cf_coupon c on c.coupon_id=o.coupon_id LEFT JOIN tb_cf_coupon c on c.coupon_id=o.coupon_id
...@@ -198,4 +200,22 @@ ...@@ -198,4 +200,22 @@
update tb_cf_order set order_status=60 where order_id=#{orderId} update tb_cf_order set order_status=60 where order_id=#{orderId}
</update> </update>
<select id="getMemoOrder" resultType="com.platform.vo.OrderBasicVo">
select
order_id,
remark_info,
update_time
from tb_cf_order where order_id=#{orderId}
</select>
<update id="saveOrUpdatemMemoOrder" parameterType="com.platform.vo.OrderBasicVo">
update
tb_cf_order
<set>
<if test="orderId != null">order_id = #{orderId}, </if>
<if test="remarkInfo != null">remark_info= #{remarkInfo}, </if>
<if test="updateTime != null">update_time = #{updateTime}, </if>
</set>
where order_id=#{orderId}
</update>
</mapper> </mapper>
\ No newline at end of file
...@@ -68,6 +68,10 @@ ...@@ -68,6 +68,10 @@
margin-top: 5px; margin-top: 5px;
display: contents; display: contents;
} }
:after, :before {
box-sizing: border-box;
width: 200px;
}
</style> </style>
</head> </head>
<body> <body>
...@@ -144,7 +148,7 @@ ...@@ -144,7 +148,7 @@
<!--订单详情页 --> <!--订单详情页 -->
<div v-show="showOrderDesc":model="orderBasicVo" style="height: 100%;"> <div v-show="showOrderDesc":model="orderBasicVo" style="height: 100%;">
<br/> <br/>
<Steps :current="basicOrderStatus" > <Steps :current="currentStatus" >
<Step title="买家下单" ></Step> <Step title="买家下单" ></Step>
<Step title="买家付款"></Step> <Step title="买家付款"></Step>
<Step title="发货"></Step> <Step title="发货"></Step>
...@@ -167,8 +171,8 @@ ...@@ -167,8 +171,8 @@
<div class="card-title" > <div class="card-title" >
<span>当前订单状态:买家已下单,等待付款</span> <span>当前订单状态:买家已下单,等待付款</span>
<div > <div >
<i-Button size="small" type="warning">关闭交易</i-Button> <i-Button size="small" type="warning" @click="closeOrder(orderIdData)">关闭交易</i-Button>
<i-Button size="small" type="info">备注订单</i-Button> <i-Button size="small" type="info" @click="showMemoOrder(orderIdData)">备注订单</i-Button>
</div> </div>
</div> </div>
</div> </div>
...@@ -181,9 +185,9 @@ ...@@ -181,9 +185,9 @@
<div class="card-title" > <div class="card-title" >
<span>当前订单状态:订单已付款,等待发货</span> <span>当前订单状态:订单已付款,等待发货</span>
<div > <div >
<i-Button size="small" type="primary" @click="showAgent(orderBasicVo.ordersId)">订单发货</i-Button> <i-Button size="small" type="primary" @click="getDeliverys(orderIdData)">订单发货</i-Button>
<i-Button size="small" type="warning">关闭交易</i-Button> <i-Button size="small" type="warning" @click="closeOrder(orderIdData)">关闭交易</i-Button>
<i-Button size="small" type="info">备注订单</i-Button> <i-Button size="small" type="info" @click="showMemoOrder(orderIdData)">备注订单</i-Button>
</div> </div>
</div> </div>
</div> </div>
...@@ -196,8 +200,8 @@ ...@@ -196,8 +200,8 @@
<div class="card-title" > <div class="card-title" >
<span>当前订单状态:订单已全部发货</span> <span>当前订单状态:订单已全部发货</span>
<div > <div >
<i-Button size="small" type="warning">关闭交易</i-Button> <i-Button size="small" type="warning" @click="closeOrder(orderIdData)">关闭交易</i-Button>
<i-Button size="small" type="info">备注订单</i-Button> <i-Button size="small" type="info" @click="showMemoOrder(orderIdData)">备注订单</i-Button>
</div> </div>
</div> </div>
</div> </div>
...@@ -208,8 +212,8 @@ ...@@ -208,8 +212,8 @@
<div class="card-title" > <div class="card-title" >
<span>当前订单状态:订单交易成功!</span> <span>当前订单状态:订单交易成功!</span>
<div > <div >
<i-Button size="small" type="warning">关闭交易</i-Button> <i-Button size="small" type="warning" @click="closeOrder(orderIdData)">关闭交易</i-Button>
<i-Button size="small" type="info">备注订单</i-Button> <i-Button size="small" type="info" @click="showMemoOrder(orderIdData)">备注订单</i-Button>
</div> </div>
</div> </div>
</div> </div>
...@@ -220,8 +224,8 @@ ...@@ -220,8 +224,8 @@
<div class="card-title" > <div class="card-title" >
<span>当前订单状态:订单交易关闭</span> <span>当前订单状态:订单交易关闭</span>
<div > <div >
<i-Button size="small" type="warning">删除订单</i-Button> <i-Button size="small" type="warning" @click="del(orderIdData)">删除订单</i-Button>
<i-Button size="small" type="info">备注订单</i-Button> <i-Button size="small" type="info" @click="showMemoOrder(orderIdData)">备注订单</i-Button>
</div> </div>
</div> </div>
</div> </div>
...@@ -229,6 +233,10 @@ ...@@ -229,6 +233,10 @@
</Card> </Card>
</Col> </Col>
</section> </section>
<section class="order-recipients-information">
<h4>备注信息</h4>
<i-Table :columns="memoColumns" :data="memoData"></i-Table>
</section>
<section class="order-basic-information"> <section class="order-basic-information">
<h4>基本信息</h4> <h4>基本信息</h4>
<i-Table :columns="basicInfoColumns" :data="basicInfoData"></i-Table> <i-Table :columns="basicInfoColumns" :data="basicInfoData"></i-Table>
...@@ -237,10 +245,40 @@ ...@@ -237,10 +245,40 @@
<h4>收件人信息</h4> <h4>收件人信息</h4>
<i-Table :columns="recipientsColumns" :data="recipientsData"></i-Table> <i-Table :columns="recipientsColumns" :data="recipientsData"></i-Table>
</section> </section>
<section class="order-recipients-information"> <br/>
<h4>物流信息</h4> <h4>物流信息</h4>
<i-Table :columns="logisticsColumns" :data="logisticsData"></i-Table> <table class="table" width="1680px" >
</section> <thread>
<tr style="background-color: #e4e5e7">
<th>订单编号</th>
<th>商品名称</th>
<th>商品图片</th>
<th>商品SKU</th>
<th>商品价格</th>
<th>商品数量</th>
<th>商品链接</th>
<th>代购状态</th>
<th>物流单号</th>
</tr>
</thread>
<tr v-for="(item,i) in deliveryOrderList" align="center">
<td>{{item.orderNo}}</td>
<td>{{item.itemTitle}}</td>
<td>
<img :src="item.itemImg" height="100px" width="100px" alt="item.itemTitle"/>
</td>
<td>{{item.itemSku}}</td>
<td>$ {{item.itemPrice}}</td>
<td>{{item.itemNum}}</td>
<td>
<span style="color:blue;cursor: pointer;" @click="toProductLink(item.sourceItemId)">商品链接</span>
</td>
<td>{{item.deliveryFlag}}</td>
<td>{{item.pExpressNumber}}</td>
</tr>
</table>
<section class="order-recipients-information"> <section class="order-recipients-information">
<h4>费用信息</h4> <h4>费用信息</h4>
<i-Table :columns="costColumns" :data="costData"></i-Table> <i-Table :columns="costColumns" :data="costData"></i-Table>
...@@ -271,7 +309,7 @@ ...@@ -271,7 +309,7 @@
<table class="table" id="showLists" width="1680px" > <table class="table" id="showLists" width="1680px" >
<thread> <thread>
<tr style="background-color: mistyrose"> <tr style="background-color: mistyrose">
<th>订单唯一ID</th> <!-- <th>订单唯一ID</th>-->
<th>订单编号</th> <th>订单编号</th>
<th>商品名称</th> <th>商品名称</th>
<th>商品图片</th> <th>商品图片</th>
...@@ -285,7 +323,7 @@ ...@@ -285,7 +323,7 @@
</tr> </tr>
</thread> </thread>
<tr v-for="(item,i) in tbCfOrderLists" align="center"> <tr v-for="(item,i) in tbCfOrderLists" align="center">
<td>{{item.ordersId}}</td> <!-- <td>{{item.ordersId}}</td>-->
<td>{{item.orderNo}}</td> <td>{{item.orderNo}}</td>
<td>{{item.itemTitle}}</td> <td>{{item.itemTitle}}</td>
<td> <td>
...@@ -303,9 +341,21 @@ ...@@ -303,9 +341,21 @@
</tr> </tr>
</table> </table>
<div> <div>
<i-button type="warning" @click="reloadDelivery" style="margin-left: 8px">返回</i-button> <i-button type="warning" @click="reloadThisOrder(orderIdData)" style="margin-left: 8px">返回</i-button>
</div> </div>
</div> </div>
<!--备注订单-->
<el-dialog title="备注订单" :visible.sync="memoOrderVisible">
<el-form ref="formValidate" :model="memoOrder" >
<el-form-item label="备注详情" :label-width="formLabelWidthOfMemoOrder">
<el-input v-model="memoOrder.remarkInfo" ></el-input>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="memoOrderVisible = false">取 消</el-button>
<el-button type="primary" @click="saveOrUpdatemMemoOrder">提交</el-button>
</div>
</el-dialog>
<!--代购信息--> <!--代购信息-->
<el-dialog title="代购信息" :visible.sync="agentVisible"> <el-dialog title="代购信息" :visible.sync="agentVisible">
<el-form ref="formValidate" :model="agentInfo" > <el-form ref="formValidate" :model="agentInfo" >
...@@ -338,7 +388,7 @@ ...@@ -338,7 +388,7 @@
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button @click="agentVisible = false">取 消</el-button> <el-button @click="agentVisible = false">取 消</el-button>
<el-button type="primary" @click="saveOrUpdateAgentInfo">保 存</el-button> <el-button type="primary" @click="saveOrUpdateAgentInfo(orderIdData)">保 存</el-button>
</div> </div>
</el-dialog> </el-dialog>
</div> </div>
......
...@@ -139,7 +139,9 @@ function eyeImages(data) { ...@@ -139,7 +139,9 @@ function eyeImages(data) {
* @param name * @param name
*/ */
function handleResetForm(vue, name) { function handleResetForm(vue, name) {
if (vue.$refs[name]!==undefined) {
vue.$refs[name].resetFields(); vue.$refs[name].resetFields();
}
}; };
......
...@@ -331,7 +331,7 @@ let vm = new Vue({ ...@@ -331,7 +331,7 @@ let vm = new Vue({
} }
}); });
}, },
/*获取订单的代购信息*/ /* /!*获取订单的代购信息*!/
getAgentInfo: function (ordersId) { getAgentInfo: function (ordersId) {
// debugger // debugger
Ajax.request({ Ajax.request({
...@@ -362,9 +362,9 @@ let vm = new Vue({ ...@@ -362,9 +362,9 @@ let vm = new Vue({
} }
} }
}); });
}, },*/
//新增或者修改代购信息 //新增或者修改代购信息
saveOrUpdateAgentInfo: function () { /* saveOrUpdateAgentInfo: function () {
let that = this; let that = this;
if(vm.agentInfo.descripitionId){ if(vm.agentInfo.descripitionId){
Ajax.request({ Ajax.request({
...@@ -390,7 +390,7 @@ let vm = new Vue({ ...@@ -390,7 +390,7 @@ let vm = new Vue({
alert("保存失败,请选择商品品名"); alert("保存失败,请选择商品品名");
} }
}, },*/
reload: function (event) { reload: function (event) {
vm.showList = true; vm.showList = true;
let orderNo=vm.orderNo; let orderNo=vm.orderNo;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论