提交 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>
...@@ -82,7 +86,7 @@ ...@@ -82,7 +86,7 @@
<span> <span>
&nbsp;&nbsp;订单号:<i-input v-model="orderNo" placeholder="订单号" style="width: 200px"/> &nbsp;&nbsp;订单号:<i-input v-model="orderNo" placeholder="订单号" style="width: 200px"/>
</span> </span>
<span> <span>
&nbsp;&nbsp;用户名:<i-input v-model="userName" placeholder="用户名" style="width: 200px"/> &nbsp;&nbsp;用户名:<i-input v-model="userName" placeholder="用户名" style="width: 200px"/>
</span> </span>
<el-date-picker <el-date-picker
...@@ -117,23 +121,23 @@ ...@@ -117,23 +121,23 @@
v-for="(el,i) in payWayCodeList" :key = 'el.pay_way_code' v-for="(el,i) in payWayCodeList" :key = 'el.pay_way_code'
:value="el.pay_way_code">{{el.pay_way_code}}</el-option> :value="el.pay_way_code">{{el.pay_way_code}}</el-option>
</el-select> </el-select>
<!-- <el-select v-model="deliveryFlag" placeholder="物流状态"> <!-- <el-select v-model="deliveryFlag" placeholder="物流状态">
<el-option <el-option
v-for="item in deliveryFlagOptions" v-for="item in deliveryFlagOptions"
:key="item.value" :key="item.value"
:label="item.label" :label="item.label"
:value="item.value"> :value="item.value">
</el-option> </el-option>
</el-select>--> </el-select>-->
<!-- <el-select v-model="payStatus" placeholder="支付状态"> <!-- <el-select v-model="payStatus" placeholder="支付状态">
<el-option <el-option
v-for="item in payStatusOptions" v-for="item in payStatusOptions"
:key="item.value" :key="item.value"
:label="item.label" :label="item.label"
:value="item.value"> :value="item.value">
</el-option> </el-option>
</el-select> </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>
...@@ -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>
...@@ -155,7 +159,7 @@ ...@@ -155,7 +159,7 @@
<br/> <br/>
<h5 style="margin-left: 20px">下单时间:</h5> <h5 style="margin-left: 20px">下单时间:</h5>
<div style="margin-left: 80px;font-size: 18px"> <div style="margin-left: 80px;font-size: 18px">
<p :data="basicData"> {{basicData}}</p> <p :data="basicData"> {{basicData}}</p>
</div> </div>
<div align="right" style="border: whitesmoke"> <div align="right" style="border: whitesmoke">
<i-Button type="primary" @click="reloadOrder" style="margin-bottom: 10px;">返回</i-Button> <i-Button type="primary" @click="reloadOrder" style="margin-bottom: 10px;">返回</i-Button>
...@@ -165,14 +169,14 @@ ...@@ -165,14 +169,14 @@
<Card v-show="waitPay"> <Card v-show="waitPay">
<div slot="title"> <div slot="title">
<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>
<p>买家可以在24h之内支付订单,否则系统将自动关闭订单。如果商品被恶意拍下,您可以后台取消订单哟~ </p> <p>买家可以在24h之内支付订单,否则系统将自动关闭订单。如果商品被恶意拍下,您可以后台取消订单哟~ </p>
</Card> </Card>
<!--已付款等待发货 --> <!--已付款等待发货 -->
...@@ -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,29 +245,59 @@ ...@@ -237,29 +245,59 @@
<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>
</section> </section>
<!-- <section class="order-recipients-information"> <!-- <section class="order-recipients-information">
<h4>操作日志</h4> <h4>操作日志</h4>
<i-Table :columns="operationColumns" :data="operationData"></i-Table> <i-Table :columns="operationColumns" :data="operationData"></i-Table>
</section>--> </section>-->
</div> </div>
<!--子订单列表(代购) --> <!--子订单列表(代购) -->
<div v-show="showLists" style="height: 100%;"> <div v-show="showLists" style="height: 100%;">
<p style="margin-left: 10px;font-size: 15px">收件人信息:</p> <p style="margin-left: 10px;font-size: 15px">收件人信息:</p>
<table class="table" id ="tableId" style="align:center" > <table class="table" id ="tableId" style="align:center" >
<thread> <thread>
<tr style="background-color: mistyrose"> <tr style="background-color: mistyrose">
<th>收件人</th> <th>收件人</th>
<th>收件人手机</th> <th>收件人手机</th>
<th>收件人地址</th> <th>收件人地址</th>
</tr> </tr>
</thread> </thread>
<tr align="center"> <tr align="center">
<td>{{deliveryName}}</td> <td>{{deliveryName}}</td>
...@@ -270,22 +308,22 @@ ...@@ -270,22 +308,22 @@
<p style="margin-left: 10px;font-size: 15px">子订单信息:</p> <p style="margin-left: 10px;font-size: 15px">子订单信息:</p>
<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>
<th>商品SKU</th> <th>商品SKU</th>
<th>商品价格</th> <th>商品价格</th>
<th>商品数量</th> <th>商品数量</th>
<th>商品链接</th> <th>商品链接</th>
<th>代购状态</th> <th>代购状态</th>
<th>物流单号</th> <th>物流单号</th>
<th>操作</th> <th>操作</th>
</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;
......
...@@ -35,12 +35,12 @@ $(function () { ...@@ -35,12 +35,12 @@ $(function () {
}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="showAgent" 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="showAgent" 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; ' +
...@@ -107,6 +107,15 @@ $(function () { ...@@ -107,6 +107,15 @@ $(function () {
}) })
})()) })())
}); });
function imgShow(itemImg) {
for (var i=0;i<itemImg.length;i++){
//window.location.href=itemImg;
}
}
let vm = new Vue({ let vm = new Vue({
el: '#rrapp', el: '#rrapp',
data: { data: {
...@@ -118,6 +127,8 @@ let vm = new Vue({ ...@@ -118,6 +127,8 @@ let vm = new Vue({
showOrderDesc: false, showOrderDesc: false,
//代购信息 //代购信息
agentVisible: false, agentVisible: false,
//备注订单
memoOrderVisible:false,
//待付款 //待付款
waitPay:false, waitPay:false,
//待发货 //待发货
...@@ -134,6 +145,7 @@ let vm = new Vue({ ...@@ -134,6 +145,7 @@ let vm = new Vue({
tbCfOrderLists: [], tbCfOrderLists: [],
//订单 //订单
tbCfOrderList: {}, tbCfOrderList: {},
deliveryOrderList:[],
//代购状态(物流状态) //代购状态(物流状态)
deliveryFlagOptions: [{ deliveryFlagOptions: [{
value: '0', value: '0',
...@@ -201,6 +213,12 @@ let vm = new Vue({ ...@@ -201,6 +213,12 @@ let vm = new Vue({
//代购平台 //代购平台
platformName: '' platformName: ''
}, },
memoOrder:{
orderId:'',
remarkInfo:'',
updateTime:''
},
formLabelWidthOfMemoOrder:'100px',
//代购状态 //代购状态
deliveryFlag: '', deliveryFlag: '',
//代购弹窗大小 //代购弹窗大小
...@@ -219,7 +237,8 @@ let vm = new Vue({ ...@@ -219,7 +237,8 @@ let vm = new Vue({
deliveryName:[], deliveryName:[],
deliveryPhone:[], deliveryPhone:[],
deliveryAddress:[], deliveryAddress:[],
currentStatus:[], currentStatus:0,
orderIdData:[],
//日期选择 //日期选择
pickerOptions: { pickerOptions: {
shortcuts: [{ shortcuts: [{
...@@ -264,7 +283,6 @@ let vm = new Vue({ ...@@ -264,7 +283,6 @@ let vm = new Vue({
//支付方式集合 //支付方式集合
payWayCodeList: [], payWayCodeList: [],
basicData:[], basicData:[],
basicOrderStatus:[],
//订单基本信息 //订单基本信息
basicInfoColumns: [ basicInfoColumns: [
{ {
...@@ -413,6 +431,17 @@ let vm = new Vue({ ...@@ -413,6 +431,17 @@ let vm = new Vue({
constnum: 1, constnum: 1,
}, },
], ],
memoColumns:[
{
title: '内容',
key: 'memoname'
}
],
memoData:[
{
memoname: '商品没有库存',
}
],
/* operationColumns: [ /* operationColumns: [
{ {
title: '操作者', title: '操作者',
...@@ -449,6 +478,7 @@ let vm = new Vue({ ...@@ -449,6 +478,7 @@ let vm = new Vue({
remark: '1', remark: '1',
} }
],*/ ],*/
orderBasicVo:{}, orderBasicVo:{},
}, },
...@@ -467,17 +497,19 @@ let vm = new Vue({ ...@@ -467,17 +497,19 @@ let vm = new Vue({
vm.showList = false; vm.showList = false;
vm.showLists = true; vm.showLists = true;
vm.getInfo(e); vm.getInfo(e);
},
getDeliverys: function (orderId) {
vm.showList = false;
vm.showOrderDesc = false;
vm.showLists = true;
vm.getInfo(orderId);
}, },
getInfo: function (orderId) { getInfo: function (orderId) {
Ajax.request({ Ajax.request({
url: "../tbcforder/orderDeliveryList/" + orderId, url: "../tbcforder/orderDeliveryList/" + orderId,
async: true, async: true,
successCallback: function (r) { successCallback: function (r) {
console.log(r.page.list)
vm.tbCfOrderLists = r.page.list; vm.tbCfOrderLists = r.page.list;
vm.deliveryName=r.page.list[0].deliveryName;
vm.deliveryPhone=r.page.list[0].deliveryPhone;
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','未发货(未代购)')
...@@ -494,18 +526,14 @@ let vm = new Vue({ ...@@ -494,18 +526,14 @@ let vm = new Vue({
} }
}); });
}, },
reloadDelivery: function (event) {
vm.showLists = false;
vm.agentVisible = false;
vm.showList = true;
},
//获取代购信息 //获取代购信息
showAgent: function (ordersId) { showAgent: function (ordersId) {
vm.agentVisible = true; vm.agentVisible = true;
vm.agentInfo.ordersId = ordersId; vm.agentInfo.ordersId = ordersId;
vm.getAgentInfo(ordersId); vm.getAgentInfo(ordersId);
}, /*获取订单的代购信息*/ },
/*获取订单的代购信息*/
getAgentInfo: function (ordersId) { getAgentInfo: function (ordersId) {
// debugger // debugger
Ajax.request({ Ajax.request({
...@@ -538,8 +566,8 @@ let vm = new Vue({ ...@@ -538,8 +566,8 @@ let vm = new Vue({
}); });
}, },
//新增或者修改代购信息 //新增或者修改代购信息
saveOrUpdateAgentInfo: function () { saveOrUpdateAgentInfo: function (orderId) {
let taht = this; let that = this;
if (vm.agentInfo.descripitionId) { if (vm.agentInfo.descripitionId) {
Ajax.request({ Ajax.request({
url: "../tbcforder/agent/", url: "../tbcforder/agent/",
...@@ -554,7 +582,7 @@ let vm = new Vue({ ...@@ -554,7 +582,7 @@ let vm = new Vue({
layer.msg("保存成功", { layer.msg("保存成功", {
time: 2000 //2秒关闭(如果不配置,默认是3秒) time: 2000 //2秒关闭(如果不配置,默认是3秒)
}); });
taht.reload(); that.reloadDelivery(orderId);
} else { } else {
alert("保存失败"); alert("保存失败");
} }
...@@ -579,6 +607,7 @@ let vm = new Vue({ ...@@ -579,6 +607,7 @@ let vm = new Vue({
} }
}); });
}, },
//删除订单
del: function (e) { del: function (e) {
let orderId = e; let orderId = e;
if (orderId == null) { if (orderId == null) {
...@@ -598,6 +627,53 @@ let vm = new Vue({ ...@@ -598,6 +627,53 @@ let vm = new Vue({
}); });
}); });
}, },
//备注订单
showMemoOrder: function(orderId) {
vm.memoOrderVisible=true;
vm.memoOrder.orderId = orderId;
vm.getMemoOrder(orderId);
},
getMemoOrder:function(orderId){
Ajax.request({
url: "../tbcforder/memoOrder/" + orderId,
async: true,
type: "get",
successCallback: function (r) {
if (!!r.data) {
vm.memoOrder = r.data;
} else {
vm.memoOrder = {
orderId: orderId,
//备注信息
remarkInfo: '',
};
}
}
});
},
saveOrUpdatemMemoOrder: function(){
let that=this ;
Ajax.request({
url: "../tbcforder/memoOrder/",
params: JSON.stringify(vm.memoOrder),
type: "post",
dataType: "json",
async: true,
contentType: 'application/json',
successCallback: function (r) {
if (r.result == "1") {
vm.memoOrderVisible = false;
layer.msg("提交成功", {
time: 2000 //2秒关闭(如果不配置,默认是3秒)
});
that.reloadMemoOrder(vm.memoOrder.orderId);
} else {
alert("提交失败");
}
}
});
},
//关闭订单
closeOrder: function(e){ closeOrder: function(e){
let orderId = e; let orderId = e;
if (orderId == null) { if (orderId == null) {
...@@ -617,6 +693,7 @@ let vm = new Vue({ ...@@ -617,6 +693,7 @@ let vm = new Vue({
}); });
}); });
}, },
//订单详情
orderDesc: function (e,orderStatus) { orderDesc: function (e,orderStatus) {
vm.showList = false; vm.showList = false;
vm.showOrderDesc=true; vm.showOrderDesc=true;
...@@ -624,46 +701,48 @@ let vm = new Vue({ ...@@ -624,46 +701,48 @@ let vm = new Vue({
vm.getOderDescInfo(orderId) vm.getOderDescInfo(orderId)
}, },
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) {
console.log(r.orderBasicVo)
vm.basicData=r.orderBasicVo.orderTime; vm.basicData=r.orderBasicVo.orderTime;
vm.deliveryPeople=r.orderBasicVo.deliveryName; vm.memoData[0].memoname=r.orderBasicVo.remarkInfo;
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.basicOrderStatus=[]; vm.orderIdData=r.orderBasicVo.orderId;
vm.currentStatus=[];
if(r.orderBasicVo.orderStatus==10){ if(r.orderBasicVo.orderStatus==10){
vm.basicOrderStatus=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.basicOrderStatus=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.basicOrderStatus=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.basicOrderStatus=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.basicOrderStatus=0; vm.currentStatus=0;
vm.waitPay=false; vm.waitPay=false;
vm.waitShip=false; vm.waitShip=false;
vm.sendShip=false; vm.sendShip=false;
...@@ -683,21 +762,21 @@ let vm = new Vue({ ...@@ -683,21 +762,21 @@ let vm = new Vue({
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.logisticsData = [] vm.deliveryOrderList= r.orderBasicVo.deliveryOrderList;
r.orderBasicVo.deliveryOrderList.map(item=>{ vm.deliveryOrderList.map(item=>{
vm.logisticsData.push({ if(item.deliveryFlag===0){
ordersid: item.orderId, vm.$set(item,'deliveryFlag','未发货(未代购)')
orderno: item.orderNo, }else if(item.deliveryFlag===10){
img: item.itemImg , vm.$set(item,'deliveryFlag','已发货(已代购)')
name: item.itemName, }else if(item.deliveryFlag===20){
num: item.itemNum, vm.$set(item,'deliveryFlag','已到达中国仓')
price: item.itemPrice , }else if(item.deliveryFlag===40){
sku: item.itemSku, vm.$set(item,'deliveryFlag','已到达非洲仓')
link: item.sourceItemId, }else if(item.deliveryFlag===50){
deliveryflag: item.deliveryFlag, vm.$set(item,'deliveryFlag','买家已签收(交易成功)')
logisticno: item.pExpressNumber, }
}) })
})
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;
...@@ -711,6 +790,27 @@ let vm = new Vue({ ...@@ -711,6 +790,27 @@ let vm = new Vue({
reloadOrder: function (event) { reloadOrder: function (event) {
vm.showList = true; vm.showList = true;
vm.showOrderDesc=false; vm.showOrderDesc=false;
vm.handleReset('formValidate');
},
reloadThisOrder: function (orderId) {
let e=orderId;
// let orderId=e;
vm.showOrderDesc = true;
vm.showLists=false;
vm.orderDesc(e);
vm.handleReset('formValidate');
},
reloadMemoOrder: function (orderId) {
if (orderId == null) {
return;
}
vm.getOderDescInfo(orderId);
vm.handleReset('formValidate');
},
reloadDelivery: function (orderId) {
vm.getDeliverys(orderId);
vm.handleReset('formValidate');
}, },
reload: function (event) { reload: function (event) {
vm.showList = true; vm.showList = true;
...@@ -758,5 +858,5 @@ let vm = new Vue({ ...@@ -758,5 +858,5 @@ let vm = new Vue({
handleReset: function (name) { handleReset: function (name) {
handleResetForm(this, name); handleResetForm(this, name);
} }
} },
}); });
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论