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

订单修改完成。

上级 ffab217b
......@@ -231,4 +231,24 @@ public class TbCfOrderController {
tbCfOrderListService.closeOrder(orderId);
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;
import com.platform.entity.TbCfItemDetailEntity;
import com.platform.entity.TbCfOrderEntity;
import com.platform.entity.TbCfPlatformOrderEntity;
import org.apache.ibatis.annotations.Param;
import java.math.BigDecimal;
import java.util.List;
......@@ -74,4 +72,5 @@ public interface TbCfOrderDao extends BaseDao<TbCfOrderEntity> {
BigDecimal queryOrderPriceYesterday();
int updateOrder(String orderId);
}
package com.platform.dao;
import com.platform.entity.TbCfOrderListEntity;
import com.platform.utils.Query;
import com.platform.vo.DeliveryOrderVo;
import com.platform.vo.OrderBasicVo;
......@@ -36,4 +35,8 @@ public interface TbCfOrderListDao extends BaseDao<TbCfOrderListEntity> {
int queryTotal(Map<String, Object> map);
int closeOrder(String orderId);
OrderBasicVo getMemoOrder(String orderId);
int saveOrUpdatemMemoOrder(OrderBasicVo memoOrderVo);
}
......@@ -137,6 +137,18 @@ public class TbCfOrderEntity implements Serializable {
* 商品品名
*/
private String descripitionName;
/**
* 订单备注
*/
private String remarkInfo;
public String getRemarkInfo() {
return remarkInfo;
}
public void setRemarkInfo(String remarkInfo) {
this.remarkInfo = remarkInfo;
}
/**
* 设置:订单id
......
package com.platform.service;
import com.platform.entity.TbCfOrderListEntity;
import com.platform.utils.Query;
import com.platform.vo.DeliveryOrderVo;
import com.platform.vo.OrderBasicVo;
......@@ -40,4 +39,8 @@ public interface TbCfOrderListService {
int queryTotal(Map<String, Object> map);
int closeOrder(String orderId);
OrderBasicVo getMemoOrder(String orderId);
int saveOrUpdatemMemoOrder(OrderBasicVo memoOrderVo);
}
......@@ -111,4 +111,5 @@ public interface TbCfOrderService {
BigDecimal queryOrderPriceYesterday();
int deleteOrder(String orderId);
}
......@@ -3,12 +3,12 @@ package com.platform.service.impl;
import com.platform.dao.TbCfOrderListDao;
import com.platform.entity.TbCfOrderListEntity;
import com.platform.service.TbCfOrderListService;
import com.platform.utils.Query;
import com.platform.vo.DeliveryOrderVo;
import com.platform.vo.OrderBasicVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.Date;
import java.util.List;
import java.util.Map;
......@@ -57,4 +57,16 @@ public class TbCfOrderListServiceImpl implements TbCfOrderListService {
public int closeOrder(String 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;
import com.platform.utils.ShiroUtils;
import com.platform.utils.StringUtils;
import com.platform.vo.PlatformOrderVo;
import io.swagger.models.auth.In;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
......@@ -123,6 +122,7 @@ public class TbCfOrderServiceImpl implements TbCfOrderService {
TbCfOrderEntity tbCfOrderEntity = new TbCfOrderEntity();
tbCfOrderEntity.setOrderId(tbCfPlatformOrder.getOrderId());
tbCfOrderEntity.setOrderStatus(OrderStatusEnum.SHIPPED.getValue());
tbCfOrderEntity.setDeliveryFlag(DeliveryStatusEnum.PURCHASE.getValue());
tbCfOrderDao.updates(tbCfOrderEntity);
}
//更新发货时间,如果原值为空就更新,否则保留原值
......
......@@ -29,8 +29,26 @@ public class OrderBasicVo implements Serializable {
private BigDecimal realityPay;
private Date orderTime;
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() {
return orderStatus;
}
......
......@@ -56,6 +56,14 @@ public class PlatformOrderVo implements Serializable{
private String userName;
public String getRelativeId() {
return relativeId;
}
public void setRelativeId(String relativeId) {
this.relativeId = relativeId;
}
public String getOrdersId() {
return ordersId;
}
......@@ -64,15 +72,14 @@ public class PlatformOrderVo implements Serializable{
this.ordersId = ordersId;
}
public String getRelativeId() {
return relativeId;
public String getOrderId() {
return orderId;
}
public void setRelativeId(String relativeId) {
this.relativeId = relativeId;
public void setOrderId(String orderId) {
this.orderId = orderId;
}
public String getpOrderId() {
return pOrderId;
}
......@@ -105,7 +112,6 @@ public class PlatformOrderVo implements Serializable{
this.pDeliveryAddress = pDeliveryAddress;
}
public String getDescripitionId() {
return descripitionId;
}
......@@ -130,7 +136,6 @@ public class PlatformOrderVo implements Serializable{
this.realityPay = realityPay;
}
public String getpExpressNumber() {
return pExpressNumber;
}
......@@ -154,12 +159,4 @@ public class PlatformOrderVo implements Serializable{
public void setUserName(String userName) {
this.userName = userName;
}
public String getOrderId() {
return orderId;
}
public void setOrderId(String orderId) {
this.orderId = orderId;
}
}
......@@ -287,7 +287,8 @@
<update id="updates" parameterType="com.platform.entity.TbCfOrderEntity">
update tb_cf_order
<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>
where order_id =#{orderId}
</update>
......
......@@ -115,7 +115,7 @@
select
r.order_item_id ordersId,
r.order_id,
o.order_id,
i.item_id,
o.order_no,
i.item_img,
......@@ -166,7 +166,9 @@
c.coupon_id,
o.reality_pay,
o.order_time,
o.order_status
o.order_status,
o.remark_info,
o.update_time
from tb_cf_order o
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
......@@ -198,4 +200,22 @@
update tb_cf_order set order_status=60 where order_id=#{orderId}
</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>
\ No newline at end of file
......@@ -68,6 +68,10 @@
margin-top: 5px;
display: contents;
}
:after, :before {
box-sizing: border-box;
width: 200px;
}
</style>
</head>
<body>
......@@ -82,7 +86,7 @@
<span>
&nbsp;&nbsp;订单号:<i-input v-model="orderNo" placeholder="订单号" style="width: 200px"/>
</span>
<span>
<span>
&nbsp;&nbsp;用户名:<i-input v-model="userName" placeholder="用户名" style="width: 200px"/>
</span>
<el-date-picker
......@@ -117,23 +121,23 @@
v-for="(el,i) in payWayCodeList" :key = 'el.pay_way_code'
:value="el.pay_way_code">{{el.pay_way_code}}</el-option>
</el-select>
<!-- <el-select v-model="deliveryFlag" placeholder="物流状态">
<el-option
v-for="item in deliveryFlagOptions"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>-->
<!-- <el-select v-model="payStatus" placeholder="支付状态">
<el-option
v-for="item in payStatusOptions"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
-->
<!-- <el-select v-model="deliveryFlag" placeholder="物流状态">
<el-option
v-for="item in deliveryFlagOptions"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>-->
<!-- <el-select v-model="payStatus" placeholder="支付状态">
<el-option
v-for="item in payStatusOptions"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
-->
<i-button type="success" @click="queryAll" ><i class="fa fa-search"></i>查询</i-button>
<i-button type="warning" @click="reloadSearch" ><i class="fa fa-refresh"></i>重置</i-button>
</div>
......@@ -144,7 +148,7 @@
<!--订单详情页 -->
<div v-show="showOrderDesc":model="orderBasicVo" style="height: 100%;">
<br/>
<Steps :current="basicOrderStatus" >
<Steps :current="currentStatus" >
<Step title="买家下单" ></Step>
<Step title="买家付款"></Step>
<Step title="发货"></Step>
......@@ -155,7 +159,7 @@
<br/>
<h5 style="margin-left: 20px">下单时间:</h5>
<div style="margin-left: 80px;font-size: 18px">
<p :data="basicData"> {{basicData}}</p>
<p :data="basicData"> {{basicData}}</p>
</div>
<div align="right" style="border: whitesmoke">
<i-Button type="primary" @click="reloadOrder" style="margin-bottom: 10px;">返回</i-Button>
......@@ -165,14 +169,14 @@
<Card v-show="waitPay">
<div slot="title">
<div class="card-title" >
<span>当前订单状态:买家已下单,等待付款</span>
<span>当前订单状态:买家已下单,等待付款</span>
<div >
<i-Button size="small" type="warning">关闭交易</i-Button>
<i-Button size="small" type="info">备注订单</i-Button>
<i-Button size="small" type="warning" @click="closeOrder(orderIdData)">关闭交易</i-Button>
<i-Button size="small" type="info" @click="showMemoOrder(orderIdData)">备注订单</i-Button>
</div>
</div>
</div>
<p>买家可以在24h之内支付订单,否则系统将自动关闭订单。如果商品被恶意拍下,您可以后台取消订单哟~ </p>
<p>买家可以在24h之内支付订单,否则系统将自动关闭订单。如果商品被恶意拍下,您可以后台取消订单哟~ </p>
</Card>
<!--已付款等待发货 -->
......@@ -181,9 +185,9 @@
<div class="card-title" >
<span>当前订单状态:订单已付款,等待发货</span>
<div >
<i-Button size="small" type="primary" @click="showAgent(orderBasicVo.ordersId)">订单发货</i-Button>
<i-Button size="small" type="warning">关闭交易</i-Button>
<i-Button size="small" type="info">备注订单</i-Button>
<i-Button size="small" type="primary" @click="getDeliverys(orderIdData)">订单发货</i-Button>
<i-Button size="small" type="warning" @click="closeOrder(orderIdData)">关闭交易</i-Button>
<i-Button size="small" type="info" @click="showMemoOrder(orderIdData)">备注订单</i-Button>
</div>
</div>
</div>
......@@ -196,8 +200,8 @@
<div class="card-title" >
<span>当前订单状态:订单已全部发货</span>
<div >
<i-Button size="small" type="warning">关闭交易</i-Button>
<i-Button size="small" type="info">备注订单</i-Button>
<i-Button size="small" type="warning" @click="closeOrder(orderIdData)">关闭交易</i-Button>
<i-Button size="small" type="info" @click="showMemoOrder(orderIdData)">备注订单</i-Button>
</div>
</div>
</div>
......@@ -208,8 +212,8 @@
<div class="card-title" >
<span>当前订单状态:订单交易成功!</span>
<div >
<i-Button size="small" type="warning">关闭交易</i-Button>
<i-Button size="small" type="info">备注订单</i-Button>
<i-Button size="small" type="warning" @click="closeOrder(orderIdData)">关闭交易</i-Button>
<i-Button size="small" type="info" @click="showMemoOrder(orderIdData)">备注订单</i-Button>
</div>
</div>
</div>
......@@ -220,8 +224,8 @@
<div class="card-title" >
<span>当前订单状态:订单交易关闭</span>
<div >
<i-Button size="small" type="warning">删除订单</i-Button>
<i-Button size="small" type="info">备注订单</i-Button>
<i-Button size="small" type="warning" @click="del(orderIdData)">删除订单</i-Button>
<i-Button size="small" type="info" @click="showMemoOrder(orderIdData)">备注订单</i-Button>
</div>
</div>
</div>
......@@ -229,6 +233,10 @@
</Card>
</Col>
</section>
<section class="order-recipients-information">
<h4>备注信息</h4>
<i-Table :columns="memoColumns" :data="memoData"></i-Table>
</section>
<section class="order-basic-information">
<h4>基本信息</h4>
<i-Table :columns="basicInfoColumns" :data="basicInfoData"></i-Table>
......@@ -237,29 +245,59 @@
<h4>收件人信息</h4>
<i-Table :columns="recipientsColumns" :data="recipientsData"></i-Table>
</section>
<section class="order-recipients-information">
<h4>物流信息</h4>
<i-Table :columns="logisticsColumns" :data="logisticsData"></i-Table>
</section>
<br/>
<h4>物流信息</h4>
<table class="table" width="1680px" >
<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">
<h4>费用信息</h4>
<i-Table :columns="costColumns" :data="costData"></i-Table>
</section>
<!-- <section class="order-recipients-information">
<h4>操作日志</h4>
<i-Table :columns="operationColumns" :data="operationData"></i-Table>
</section>-->
<!-- <section class="order-recipients-information">
<h4>操作日志</h4>
<i-Table :columns="operationColumns" :data="operationData"></i-Table>
</section>-->
</div>
<!--子订单列表(代购) -->
<div v-show="showLists" style="height: 100%;">
<p style="margin-left: 10px;font-size: 15px">收件人信息:</p>
<table class="table" id ="tableId" style="align:center" >
<thread>
<tr style="background-color: mistyrose">
<th>收件人</th>
<th>收件人手机</th>
<th>收件人地址</th>
</tr>
<thread>
<tr style="background-color: mistyrose">
<th>收件人</th>
<th>收件人手机</th>
<th>收件人地址</th>
</tr>
</thread>
<tr align="center">
<td>{{deliveryName}}</td>
......@@ -270,22 +308,22 @@
<p style="margin-left: 10px;font-size: 15px">子订单信息:</p>
<table class="table" id="showLists" width="1680px" >
<thread>
<tr style="background-color: mistyrose">
<th>订单唯一ID</th>
<th>订单编号</th>
<th>商品名称</th>
<th>商品图片</th>
<th>商品SKU</th>
<th>商品价格</th>
<th>商品数量</th>
<th>商品链接</th>
<th>代购状态</th>
<th>物流单号</th>
<th>操作</th>
</tr>
<tr style="background-color: mistyrose">
<!-- <th>订单唯一ID</th>-->
<th>订单编号</th>
<th>商品名称</th>
<th>商品图片</th>
<th>商品SKU</th>
<th>商品价格</th>
<th>商品数量</th>
<th>商品链接</th>
<th>代购状态</th>
<th>物流单号</th>
<th>操作</th>
</tr>
</thread>
<tr v-for="(item,i) in tbCfOrderLists" align="center">
<td>{{item.ordersId}}</td>
<!-- <td>{{item.ordersId}}</td>-->
<td>{{item.orderNo}}</td>
<td>{{item.itemTitle}}</td>
<td>
......@@ -303,9 +341,21 @@
</tr>
</table>
<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>
<!--备注订单-->
<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-form ref="formValidate" :model="agentInfo" >
......@@ -338,7 +388,7 @@
</el-form>
<div slot="footer" class="dialog-footer">
<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>
</el-dialog>
</div>
......
......@@ -139,7 +139,9 @@ function eyeImages(data) {
* @param name
*/
function handleResetForm(vue, name) {
if (vue.$refs[name]!==undefined) {
vue.$refs[name].resetFields();
}
};
......
......@@ -331,7 +331,7 @@ let vm = new Vue({
}
});
},
/*获取订单的代购信息*/
/* /!*获取订单的代购信息*!/
getAgentInfo: function (ordersId) {
// debugger
Ajax.request({
......@@ -362,9 +362,9 @@ let vm = new Vue({
}
}
});
},
},*/
//新增或者修改代购信息
saveOrUpdateAgentInfo: function () {
/* saveOrUpdateAgentInfo: function () {
let that = this;
if(vm.agentInfo.descripitionId){
Ajax.request({
......@@ -390,7 +390,7 @@ let vm = new Vue({
alert("保存失败,请选择商品品名");
}
},
},*/
reload: function (event) {
vm.showList = true;
let orderNo=vm.orderNo;
......
......@@ -35,12 +35,12 @@ $(function () {
}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; ' +
'-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>';
}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; ' +
'-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>';
}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; ' +
......@@ -107,6 +107,15 @@ $(function () {
})
})())
});
function imgShow(itemImg) {
for (var i=0;i<itemImg.length;i++){
//window.location.href=itemImg;
}
}
let vm = new Vue({
el: '#rrapp',
data: {
......@@ -118,6 +127,8 @@ let vm = new Vue({
showOrderDesc: false,
//代购信息
agentVisible: false,
//备注订单
memoOrderVisible:false,
//待付款
waitPay:false,
//待发货
......@@ -134,6 +145,7 @@ let vm = new Vue({
tbCfOrderLists: [],
//订单
tbCfOrderList: {},
deliveryOrderList:[],
//代购状态(物流状态)
deliveryFlagOptions: [{
value: '0',
......@@ -201,6 +213,12 @@ let vm = new Vue({
//代购平台
platformName: ''
},
memoOrder:{
orderId:'',
remarkInfo:'',
updateTime:''
},
formLabelWidthOfMemoOrder:'100px',
//代购状态
deliveryFlag: '',
//代购弹窗大小
......@@ -219,7 +237,8 @@ let vm = new Vue({
deliveryName:[],
deliveryPhone:[],
deliveryAddress:[],
currentStatus:[],
currentStatus:0,
orderIdData:[],
//日期选择
pickerOptions: {
shortcuts: [{
......@@ -264,7 +283,6 @@ let vm = new Vue({
//支付方式集合
payWayCodeList: [],
basicData:[],
basicOrderStatus:[],
//订单基本信息
basicInfoColumns: [
{
......@@ -413,6 +431,17 @@ let vm = new Vue({
constnum: 1,
},
],
memoColumns:[
{
title: '内容',
key: 'memoname'
}
],
memoData:[
{
memoname: '商品没有库存',
}
],
/* operationColumns: [
{
title: '操作者',
......@@ -449,6 +478,7 @@ let vm = new Vue({
remark: '1',
}
],*/
orderBasicVo:{},
},
......@@ -467,17 +497,19 @@ let vm = new Vue({
vm.showList = false;
vm.showLists = true;
vm.getInfo(e);
},
getDeliverys: function (orderId) {
vm.showList = false;
vm.showOrderDesc = false;
vm.showLists = true;
vm.getInfo(orderId);
},
getInfo: function (orderId) {
Ajax.request({
url: "../tbcforder/orderDeliveryList/" + orderId,
async: true,
successCallback: function (r) {
console.log(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=>{
if(item.deliveryFlag===0){
vm.$set(item,'deliveryFlag','未发货(未代购)')
......@@ -494,18 +526,14 @@ let vm = new Vue({
}
});
},
reloadDelivery: function (event) {
vm.showLists = false;
vm.agentVisible = false;
vm.showList = true;
},
//获取代购信息
showAgent: function (ordersId) {
vm.agentVisible = true;
vm.agentInfo.ordersId = ordersId;
vm.getAgentInfo(ordersId);
}, /*获取订单的代购信息*/
},
/*获取订单的代购信息*/
getAgentInfo: function (ordersId) {
// debugger
Ajax.request({
......@@ -538,8 +566,8 @@ let vm = new Vue({
});
},
//新增或者修改代购信息
saveOrUpdateAgentInfo: function () {
let taht = this;
saveOrUpdateAgentInfo: function (orderId) {
let that = this;
if (vm.agentInfo.descripitionId) {
Ajax.request({
url: "../tbcforder/agent/",
......@@ -554,7 +582,7 @@ let vm = new Vue({
layer.msg("保存成功", {
time: 2000 //2秒关闭(如果不配置,默认是3秒)
});
taht.reload();
that.reloadDelivery(orderId);
} else {
alert("保存失败");
}
......@@ -579,6 +607,7 @@ let vm = new Vue({
}
});
},
//删除订单
del: function (e) {
let orderId = e;
if (orderId == null) {
......@@ -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){
let orderId = e;
if (orderId == null) {
......@@ -617,6 +693,7 @@ let vm = new Vue({
});
});
},
//订单详情
orderDesc: function (e,orderStatus) {
vm.showList = false;
vm.showOrderDesc=true;
......@@ -624,46 +701,48 @@ let vm = new Vue({
vm.getOderDescInfo(orderId)
},
getOderDescInfo: function(orderId){
Ajax.request({
url: "../tbcforder/orderBasic/" + orderId,
async: true,
successCallback: function (r) {
console.log(r.orderBasicVo)
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.deliveryAddress=r.orderBasicVo.deliveryAddress;
vm.basicOrderStatus=[];
vm.orderIdData=r.orderBasicVo.orderId;
vm.currentStatus=[];
if(r.orderBasicVo.orderStatus==10){
vm.basicOrderStatus=0;
vm.currentStatus=0;
vm.waitPay=true;
vm.waitShip=false;
vm.sendShip=false;
vm.tranSuccessful=false;
vm.orderClose=false;
} else if(r.orderBasicVo.orderStatus==20){
vm.basicOrderStatus=1;
vm.currentStatus=1;
vm.waitPay=false;
vm.waitShip=true;
vm.sendShip=false;
vm.tranSuccessful=false;
vm.orderClose=false;
}else if(r.orderBasicVo.orderStatus==40){
vm.basicOrderStatus=2;
vm.currentStatus=2;
vm.waitPay=false;
vm.waitShip=false;
vm.sendShip=true;
vm.tranSuccessful=false;
vm.orderClose=false;
}else if(r.orderBasicVo.orderStatus==50){
vm.basicOrderStatus=3;
vm.currentStatus=3;
vm.waitPay=false;
vm.waitShip=false;
vm.sendShip=false;
vm.tranSuccessful=true;
vm.orderClose=false;
}else if(r.orderBasicVo.orderStatus==60){
vm.basicOrderStatus=0;
vm.currentStatus=0;
vm.waitPay=false;
vm.waitShip=false;
vm.sendShip=false;
......@@ -683,21 +762,21 @@ let vm = new Vue({
vm.recipientsData[0].phone=r.orderBasicVo.deliveryPhone
vm.recipientsData[0].email=r.orderBasicVo.email;
vm.recipientsData[0].address=r.orderBasicVo.deliveryAddress;
vm.logisticsData = []
r.orderBasicVo.deliveryOrderList.map(item=>{
vm.logisticsData.push({
ordersid: item.orderId,
orderno: item.orderNo,
img: item.itemImg ,
name: item.itemName,
num: item.itemNum,
price: item.itemPrice ,
sku: item.itemSku,
link: item.sourceItemId,
deliveryflag: item.deliveryFlag,
logisticno: item.pExpressNumber,
})
})
vm.deliveryOrderList= r.orderBasicVo.deliveryOrderList;
vm.deliveryOrderList.map(item=>{
if(item.deliveryFlag===0){
vm.$set(item,'deliveryFlag','未发货(未代购)')
}else if(item.deliveryFlag===10){
vm.$set(item,'deliveryFlag','已发货(已代购)')
}else if(item.deliveryFlag===20){
vm.$set(item,'deliveryFlag','已到达中国仓')
}else if(item.deliveryFlag===40){
vm.$set(item,'deliveryFlag','已到达非洲仓')
}else if(item.deliveryFlag===50){
vm.$set(item,'deliveryFlag','买家已签收(交易成功)')
}
})
vm.costData[0].constnum=r.orderBasicVo.realityPay;
vm.costData[1].constnum=r.orderBasicVo.expressCost;
vm.costData[2].constnum=r.orderBasicVo.tax;
......@@ -711,6 +790,27 @@ let vm = new Vue({
reloadOrder: function (event) {
vm.showList = true;
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) {
vm.showList = true;
......@@ -758,5 +858,5 @@ let vm = new Vue({
handleReset: function (name) {
handleResetForm(this, name);
}
}
},
});
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论