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

新增英文版订单

上级 6b0900e8
......@@ -248,8 +248,8 @@ public class TbCfOrderController extends AbstractController {
public R orderBasic(@PathVariable("orderId") String orderId) {
//查询列表数据
OrderBasicVo orderBasicVo = tbCfOrderListService.queryorderBasic(orderId);
orderBasicVo.setAtcTime("35天");
orderBasicVo.setCountry("赞比亚");
orderBasicVo.setAtcTime("35天(day)");
orderBasicVo.setCountry("赞比亚(Zambia)");
orderBasicVo.setSource("APP");
orderBasicVo.setDeliveryOrderList(tbCfOrderListService.queryOrderDeliveryList(orderId));
return R.ok().put("orderBasicVo", orderBasicVo);
......
<!DOCTYPE html>
<html>
<!--element-ui-->
<link rel="stylesheet" href="${rc.contextPath}/statics/css/index.css">
<link rel="stylesheet" type="text/css" href="${rc.contextPath}/statics/css/table.css"/>
<!--<link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">-->
<head>
<title></title>
#parse("sys/header.html")
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>order</title>
<link rel="stylesheet" type="text/css" href="http://unpkg.com/view-design/dist/styles/iview.css">
<script type="text/javascript" src="http://vuejs.org/js/vue.min.js"></script>
<script type="text/javascript" src="http://unpkg.com/view-design/dist/iview.min.js"></script>
<style>
p,li,span,h1,h2,h3,h4,h5{
/* line-height: 2em; */
}
ul>li{
list-style: none;
}
#app{
padding:10px;
width:800px;
}
.order-time{margin-top:10px;}
.order-time .card-title{
display: flex;
justify-content: space-between;
}
.order-basic-information,.order-recipients-information{margin-top:10px;}
.order-basic-information>h4,.order-recipients-information>h4{border-bottom: 1px solid #eee;}
.ui-jqgrid .ui-jqgrid-bdiv{
height:auto!important;
}
.el-select{
width:120px;
}
.el-date-editor{
width:220px;
}
.el-date-editor--daterange.el-input, .el-date-editor--daterange.el-input__inner, .el-date-editor--timerange.el-input, .el-date-editor--timerange.el-input__inner {
width: 230px;
}
.ivu-col{
width: 280px;
}
.ivu-input{
height: 40px;
}
.table > thead > tr > th, .table > tbody > tr > th, .table > tfoot > tr > th, .table > thead > tr > td, .table > tbody > tr > td, .table > tfoot > tr > td {
border-top: 2px solid #e7eaec;
line-height: 0.7700;
padding: 11px;
vertical-align: middle;
}
.table-responsive {
min-height: .01%;
overflow-x: hidden;
}
.table-bordered > thead > tr > th, .table-bordered > thead > tr > td {
background-color: moccasin;
border-bottom-width: 1px;
}
.ui-jqgrid .ui-jqgrid-htable .ui-th-div {
height: 17px;
margin-top: 5px;
display: contents;
}
</style>
</head>
<body>
<div id="rrapp" v-cloak style="width:100%;
height: -webkit-calc(100% - 15px);
height: -moz-calc(100% - 15px);
height: calc(100% - 15px);">
<!-- 订单列表-->
<div v-show="showList" style="height: 98%;">
<Row :gutter="16">
<div class="search-group">
<span>
&nbsp;&nbsp;order number:<i-input v-model="orderNo" placeholder="order number" style="width: 200px"/>
</span>
<span>
&nbsp;&nbsp;username:<i-input v-model="userName" placeholder="userName" style="width: 200px"/>
</span>
<el-date-picker
v-model="value"
type="daterange"
align="right"
unlink-panels
range-separator="~"
start-placeholder="start date"
end-placeholder="date closed"
value-format="yyyy-MM-dd"
:picker-options="pickerOptions">
</el-date-picker>
<el-select v-model="payStatus" placeholder="state of payment">
<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="status">
<el-option
v-for="item in deliveryFlagOptions"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
<!--<el-select v-model="orderStatus" placeholder="订单状态">
<el-option
v-for="item in orderStatusOptions"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>-->
<el-select v-model="payWayCode" placeholder="mode of payment ">
<el-option
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>-->
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
<i-button type="success" @click="queryAll" ><i class="fa fa-search"></i>search</i-button>
<i-button type="warning" @click="reloadSearch" ><i class="fa fa-refresh"></i>refresh</i-button>
</div>
</Row>
<table id="jqGrid"></table>
<div id="speedp"></div>
</div>
<!--订单详情页 -->
<div v-show="showOrderDesc":model="orderBasicVo" style="height: 100%;">
<br/>
<Steps :current="currentStatus" >
<Step title="The buyer place the order" ></Step>
<Step title="The buyer payment"></Step>
<Step title="The delivery"></Step>
<Step title="Confirm the goods"></Step>
<Step title="Comments"></Step>
</Steps>
<section class="order-time">
<br/>
<h5 style="margin-left: 20px">order time:</h5>
<div style="margin-left: 80px;font-size: 18px">
<p :data="basicData"> {{basicData}}</p>
</div>
<div align="right" style="border: whitesmoke">
<i-Button type="primary" @click="reloadOrder" style="margin-bottom: 10px;">return</i-Button>
</div>
<Col span="11">
<!-- 等待付款-->
<Card v-show="waitPay">
<div slot="title">
<div class="card-title" >
<span>Current order status: buyer has placed order, waiting for payment</span>
<div >
<!-- <i-Button size="small" type="warning" @click="closeOrder(orderIdData)">Close the deal</i-Button>-->
<!-- <i-Button size="small" type="info" @click="showMemoOrder(orderIdData)">Note the order</i-Button>-->
</div>
</div>
</div>
<p>The buyer can pay the order within 24 hours, otherwise the system will automatically close the order.If the product is maliciously shot, you can cancel the order in the background</p>
</Card>
<!--已付款等待发货 -->
<Card v-show="waitShip">
<div slot="title">
<div class="card-title" >
<span>Current order status: the order has been paid, waiting for shipment</span>
<div >
<!-- <i-Button size="small" type="primary" @click="getDeliverys(orderIdData)">Orders for shipment</i-Button>
<i-Button size="small" type="warning" @click="closeOrder(orderIdData)">Close the deal</i-Button>
<i-Button size="small" type="info" @click="showMemoOrder(orderIdData)">Note the order</i-Button>-->
</div>
</div>
</div>
<td><p>The order has been paid, please process it as soon as possible</p></td>
<td><p>Only when all the sub-orders in the order are shipped will it jump to the next step</p></td>
</Card>
<!--订单已发货 -->
<Card v-show="sendShip">
<div slot="title">
<div class="card-title" >
<span>Current order status: all orders have been shipped</span>
<div >
<!-- <i-Button size="small" type="warning" @click="closeOrder(orderIdData)">Close the deal</i-Button>-->
<!-- <i-Button size="small" type="info" @click="showMemoOrder(orderIdData)">Note the order</i-Button>-->
</div>
</div>
</div>
<p>All orders have been shipped, the staff remember to track oh </p>
</Card>
<Card v-show="tranSuccessful">
<div slot="title">
<div class="card-title" >
<span>Current order status: order transaction successful!</span>
<div >
<!-- <i-Button size="small" type="warning" @click="closeOrder(orderIdData)">Close the deal</i-Button>-->
<!-- <i-Button size="small" type="info" @click="showMemoOrder(orderIdData)">Note the order</i-Button>-->
</div>
</div>
</div>
<p>The order has been successfully traded</p>
</Card>
<Card v-show="orderClose">
<div slot="title">
<div class="card-title" >
<span>Current order status: order transaction closed</span>
<div >
<i-Button size="small" type="warning" @click="del(orderIdData)">Delete the order</i-Button>
<i-Button size="small" type="info" @click="showMemoOrder(orderIdData)">Note the order</i-Button>
</div>
</div>
</div>
<p>The order has closed. You can only view the details or delete the order</p>
</Card>
</Col>
</section>
<section class="order-recipients-information">
<h4>Note information</h4>
<i-Table :columns="memoColumns" :data="memoData"></i-Table>
</section>
<section class="order-basic-information">
<h4>The basic information</h4>
<i-Table :columns="basicInfoColumns" :data="basicInfoData"></i-Table>
</section>
<section class="order-recipients-information">
<h4>Recipient information</h4>
<i-Table :columns="recipientsColumns" :data="recipientsData"></i-Table>
</section>
<br/>
<h4>Logistics information</h4>
<table class="table" width="1680px" >
<thread>
<tr style="background-color: #e4e5e7">
<th> order number </th>
<th> trade name </th>
<th> product picture </th>
<th> goods SKU </th>
<th> commodity price </th>
<th> quantity of goods </th>
<!-- <th> product link </th>-->
<th> daigou status </th>
<th> logistics number </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="" onerror="showDefaultImg(this)"/>
</td>
<td>{{item.itemSku}}</td>
<td>$ {{item.itemPrice}}</td>
<td>{{item.itemNum}}</td>
<!-- <td>-->
<!-- <span style="color:blue;cursor: pointer;" @click="toProductLink(item.sourceItemId)">Product link</span>-->
<!-- </td>-->
<td>{{item.deliveryFlag}}</td>
<td>{{item.pExpressNumber}}</td>
</tr>
</table>
<section class="order-recipients-information">
<h4>Cost information</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>-->
</div>
<!--子订单列表(代购) -->
<div v-show="showLists" style="height: 100%;">
<p style="margin-left: 10px;font-size: 15px">Recipient information:</p>
<table class="table" style="align:center" >
<thread>
<tr style="background-color: mistyrose">
<th> recipient </th>
<th> recipient mobile phone </th>
<th> recipient address </th>
</tr>
</thread>
<tr align="center">
<td>{{deliveryName}}</td>
<td>{{deliveryPhone}}</td>
<td>{{deliveryAddress}}</td>
</tr>
</table>
<p style="margin-left: 10px;font-size: 15px">Suborder information:</p>
<div align="right" style="border: whitesmoke">
<i-Button type="primary" @click="reloadOrder" style="margin-bottom: 10px;">return</i-Button>
</div>
<table class="table" id="showLists" width="1680px" >
<thread>
<tr style="background-color: mistyrose">
<!-- <th>订单唯一ID</th>-->
<th> order number </th>
<th> trade name </th>
<th> product picture </th>
The < th > goods SKU < / th >
<th> commodity price </th>
<th> quantity of goods </th>
<th> product link </th>
<th> daigou status </th>
<th> logistics number </th>
</tr>
</thread>
<tr v-for="(item,i) in tbCfOrderLists" align="center">
<!-- <td>{{item.ordersId}}</td>-->
<td>{{item.orderNo}}</td>
<td>{{item.itemTitle}}</td>
<td>
<img :src="item.itemImg" height="100px" width="100px" alt="" onerror="showDefaultImg(this)"/>
</td>
<td>{{item.itemSku}}</td>
<td>$ {{item.itemPrice}}</td>
<td>{{item.itemNum}}</td>
<td>
<span style="color:blue;cursor: pointer;" @click="toProductLink(item.sourceItemId)">Product link</span>
</td>
<td>{{item.deliveryFlag}}</td>
<td>{{item.pExpressNumber}}</td>
<td><i-button @click="showAgent(item.ordersId,item.orderId)">Act as purchasing agency</i-button></td>
</tr>
</table>
</div>
<!--备注订单-->
<el-dialog title="Note the order" :visible.sync="memoOrderVisible">
<el-form ref="formValidate" :model="memoOrder" >
<el-form-item label="Note the details" :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">
cancel</el-button>
<el-button type="primary" @click="saveOrUpdatemMemoOrder">
submit</el-button>
</div>
</el-dialog>
<!--代购信息-->
<el-dialog title="agency information" :visible.sync="agentVisible">
<el-form ref="formValidate" :model="agentInfo" >
<el-form-item label="Purchasing agent" :label-width="formLabelWidth">
<el-input v-model="agentInfo.userName" disabled="true"></el-input>
</el-form-item>
<!-- <el-form-item label="代购平台名称" :label-width="formLabelWidth">
<i-select v-model="agentInfo.platformName" >
<i-option
v-for="(el,i) in store" :key = 'el.platformCode'
:value="el.platformCode">{{el.platformName}}</i-option>
</i-select>
</el-form-item>-->
<el-form-item label="Original website order number" :label-width="formLabelWidth">
<el-input v-model="agentInfo.pOrderId" ></el-input>
</el-form-item>
<el-form-item label="Commodity name" :label-width="formLabelWidth">
<i-select v-model="agentInfo.descripitionId" >
<i-option
v-for="(el,i) in descripition" :key = 'el.templateId'
:value="el.templateId">{{el.templateTitle}}</i-option>
</i-select>
</el-form-item>
<el-form-item label="The cost price" :label-width="formLabelWidth">
<el-input v-model="agentInfo.realityPay"></el-input>
</el-form-item>
<el-form-item label="Courier number" :label-width="formLabelWidth">
<el-input v-model="agentInfo.pExpressNumber" ></el-input>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="agentVisible = false">cancel</el-button>
<el-button type="primary" @click="saveOrUpdateAgentInfo(orderIdData)">save</el-button>
</div>
</el-dialog>
</div>
<!--element-ui-->
<!--<script type="text/javascript" src="https://unpkg.com/element-ui/lib/index.js"></script>-->
<script src="${rc.contextPath}/statics/plugins/elmentui/index.js"></script>
<script src="${rc.contextPath}/js/sys/tbcforderEnList.js?_${date.systemTime}"></script>
</body>
<!-- <script src="./vue.js"></script>
<link rel="stylesheet" href="./iview.css">
<script src="./iview.js"></script> -->
<script>
</script>
</html>
\ No newline at end of file
......@@ -677,6 +677,25 @@ orderStatusFormat = function (cellvalue) {
return returnStr;
};
orderStatusEnFormat = function (cellvalue) {
var returnStr = "unknown";
if (!!cellvalue) {
if (cellvalue == '0') {
returnStr = "cancel";
} else if (cellvalue == '10') {
returnStr = "unpaid";
} else if (cellvalue == '20') {
returnStr = "paid";
} else if (cellvalue == '40') {
returnStr = "shipped";
} else if (cellvalue == '50') {
returnStr = "successful trade";
} else if (cellvalue == '60') {
returnStr = "transaction closed";
}
}
return returnStr;
};
/**
* 支付状态翻译 ,10未支付,20已支付
......@@ -712,6 +731,26 @@ deliveryFlagFormat = function (cellvalue) {
}
return returnStr;
}
/**
* 快递状态
* @param cellvalue
* @returns {string}
*/
deliveryFlagEnFormat = function (cellvalue) {
var returnStr = "unshipped"
if (!!cellvalue || cellvalue == '0') {
if (cellvalue == '10') {
returnStr = "shipped";
} else if (cellvalue == '20') {
returnStr = "China warehouse";
} else if (cellvalue == '40') {
returnStr = "Africa warehouse";
} else if (cellvalue == '50') {
returnStr = "signed";
}
}
return returnStr;
}
/**
* 用户类型翻译
* @param cellvalue
......
$(function () {
$("#jqGrid").Grid({
//订单列表(全部)
url: '../tbcforder/orderList',
colModel: [
//显示字段
{label: 'orderId', name: 'orderId', index: 'order_id', key: true, hidden: true},
{label: 'order number', name: 'orderNo', index: 'order_no'},
{label: 'username ', name: 'userName', index: 'user_name'},
{label: 'order time', name: 'orderTime', index: 'order_time'},
{label: 'payment', name: 'payWayCode', index: 'pay_way_code'},
{
label: 'order amount',
name: 'realityPay',
index: 'reality_pay',
formatter: "currency",
formatoptions: {prefix: "$"}
},
{label: 'order status', name: 'orderStatus', index: 'order_status', formatter: orderStatusEnFormat},
{label: 'status', name: 'deliveryFlag', index: 'delivery_flag', formatter: deliveryFlagEnFormat},
{label: '收货人', name: 'deliveryName', index: 'delivery_name', hidden: true},
{label: '收货人手机', name: 'deliveryPhone', index: 'delivery_phone', hidden: true},
{label: '收货地址', name: 'deliveryAddress', index: 'delivery_address', hidden: true},
{label: '流水ID', name: 'payId', index: 'pay_id', hidden: true},
{label: '税费', name: 'tax', index: 'tax', hidden: true},
{label: '手续费', name: 'fee', index: 'fee', hidden: true},
{label: '优惠券ID', name: 'couponId', index: 'coupon_id', hidden: true},
{label: '优惠券名称', name: 'couponTitle', index: 'coupon_title', hidden: true},
{
name: 'operation', index: 'operate', width: '160px',
formatter: function (value, grid, rows) {
if (grid.colModel.formatter.arguments[2].orderStatus == 10) {
return '<button onclick="closeList" 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">order details' +
'</button> ' ;
} else {
return '<button onclick="closeList" 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">order details' +
'</button> ' ;
// } 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="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="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; ' +
// '-webkit-border-radius: 2px; border-radius: 6px; color: #fff; cursor: pointer; border: 0;margin: 1px 6px;" class="orderdescbutton">查看订单' +
// '</button><button class="delbutton" style="display: inline-block;height: 30px; line-height: 25px; padding: 1px 18px; background-color: #ea394c;font-size: 10px; ' +
// '-webkit-border-radius: 2px; border-radius: 6px; color: #fff; cursor: pointer; border: 0;margin: 1px 6px;">删除订单</button>';
// }
}
}
}
],
shrinkToFit: true,
datatype: "json",
rowNum: 12,
rowList: [12, 24, 36],
rownumbers: true,
rownumWidth: 40,
gridview: true,
pager: '#speedp',
sortname: 'order_time',
viewrecords: true,
sortorder: "desc",
align: "center"
});
//查询所有支付方式
$.get('../tbcffinance/queryPayWayCodeAll', function (res) {
vm.payWayCodeList = JSON.parse(res).list;
}),
//查询所有运费模板(品名)
$.get('../tbcfexpresstemplate/queryAll', function (res) {
vm.descripition = JSON.parse(res).list;
}),
//查询所有店铺
$.get('../tbcfstore/queryAll', function (res) {
vm.store = JSON.parse(res).list;
})
//绑定事件
document.addEventListener('load', (() => {
//diybutton 订单发货(代购)
$('#jqGrid').on('click', '.diybutton', e => {
vm.getDelivery($(e.target).parent().parent().attr('id'))
return false
})
//'delbutton' 删除订单(伪删除)
$('#jqGrid').on('click', '.delbutton', e => {
vm.del($(e.target).parent().parent().attr('id'))
return false
})
//'waitpaybutton' 等待支付的订单详情
$('#jqGrid').on('click', '.orderdescbutton', e => {
//获取订单ID及订单状态
let orderStatus
$(e.target).parent().siblings().each((index, item) => {
if ($(item).attr('aria-describedby') === 'jqGrid_orderStatus') {
orderStatus = $(item).attr('title')
vm.orderDesc($(e.target).parent().parent().attr('id'), orderStatus)
}
})
return false
})
//'closeOrder' 关闭订单(修改订单状态)
$('#jqGrid').on('click', '.closeOrder', e => {
vm.closeOrder($(e.target).parent().parent().attr('id'))
return false
})
})())
});
function imgShow(itemImg) {
for (var i = 0; i < itemImg.length; i++) {
//window.location.href=itemImg;
}
}
let vm = new Vue({
el: '#rrapp',
data: {
//订单列表
showList: true,
//订单代购列表
showLists: false,
//订单详情页
showOrderDesc: false,
//代购信息
agentVisible: false,
//备注订单
memoOrderVisible: false,
//待付款
waitPay: false,
//待发货
waitShip: false,
//已发货
sendShip: false,
//交易成功
tranSuccessful: false,
//订单关闭
orderClose: false,
title: null,
//子订单列表(代购)
tbCfOrderLists: [],
//订单
tbCfOrderList: {},
deliveryOrderList: [],
//代购状态(物流状态)
deliveryFlagOptions: [{
value: '0',
label: 'unshipped'
}, {
value: '10',
label: 'shipped'
}],
payStatusOptions: [{
value: '20',
label: "paid"
}, {
value: '10',
label: "unpaid"
}],
orderStatusOptions: [
{
value: '40',
label: "已发货"
}, {
value: '50',
label: "交易成功"
}, {
value: '60',
label: "交易关闭"
}],
deliveryFlagOptions: [{
value: '0',
label: 'unshipped'
}, {
value: '10',
label: 'shipped'
}],
//代购信息
agentInfo: {
ordersId: '',
//代购人
userName: '',
//订单号
orderId: '',
//快递单号
pExpressNumber: '',
//商品品名
descripitionId: '',
//实际付款
realityPay: '',
//原网站订单号
pOrderId: '',
//代购平台
platformName: ''
},
memoOrder: {
orderId: '',
remarkInfo: '',
updateTime: ''
},
formLabelWidthOfMemoOrder: '100px',
//代购状态
deliveryFlag: '',
//代购弹窗大小
formLabelWidth: '120px',
//商店集合
store: [],
//品名集合
descripition: [],
//支付方式
payWayCode: '',
//订单状态
orderStatus: '',
//代购状态
deliveryFlag: '',
deliveryName: [],
deliveryPhone: [],
deliveryAddress: [],
currentStatus: 0,
orderIdData: [],
//日期选择
pickerOptions: {
shortcuts: [{
text: '最近一周',
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
picker.$emit('pick', [start, end]);
}
}, {
text: '最近一个月',
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
picker.$emit('pick', [start, end]);
}
}, {
text: '最近三个月',
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
picker.$emit('pick', [start, end]);
}
}]
},
ruleValidate: {
name: [
{required: true, message: '名称不能为空', trigger: 'blur'}
]
},
payStatus: '',
//订单ID
orderId: '',
//订单号
orderNo: '',
//用户名
userName: '',
value: '',
//支付方式集合
payWayCodeList: [],
basicData: [],
//订单基本信息
basicInfoColumns: [
{
title: 'type',
key: 'type'
},
{
title: 'data',
key: 'data'
}
],
basicInfoData: [
{
type: 'order number',
data: 18
},
{
type: 'username',
data: 18
}, {
type: 'Automatically determine receipt time',
data: 18
}, {
type: 'Source of the order',
data: 18
}, {
type: 'Order region',
data: 18
}, {
type: 'Transaction number',
data: 18
}, {
type: 'Method of payment',
data: 18
}, {
type: 'Activity information',
data: 18
}
],
recipientsColumns: [
{
title: 'The recipient',
key: 'recipients'
},
{
title: 'Mobile phone number',
key: 'phone'
},
{
title: 'Shipping address',
key: 'address'
}
],
recipientsData: [
{
recipients: '12345',
phone: '12314',
address: '124124'
}
],
logisticsColumns: [
{
title: 'child orders id',
key: 'ordersid'
},
{
title: 'order number',
key: 'orderno'
},
{
title: 'picture',
key: 'img'
},
{
title: 'product name',
key: 'name'
},
{
title: 'number',
key: 'num'
},
{
title: 'amount',
key: 'price'
},
// {
// title: '链接',
// key: 'link'
// },
{
title: 'status',
key: 'deliveryflag'
},
{
title: 'logistics single number',
key: 'logisticno'
}
],
logisticsData: [
{
ordersid: '用户名称',
orderno: '12314',
img: '123124',
name: '124124',
num: '124124',
price: '124124',
link: '124124',
deliveryflag: '12121',
logisticno: '124124',
}
],
costColumns: [
{
title: 'Cost type',
key: 'costtype'
},
{
title: 'The numerical:$',
key: 'constnum'
}
],
costData: [
{
costtype: 'Goods together',
constnum: 1,
}, {
costtype: 'postage',
constnum: 1,
}, {
costtype: 'taxes and dues',
constnum: 1,
}, {
costtype: 'service charge',
constnum: 1,
}, {
costtype: 'discount coupon',
constnum: 1,
}, {
costtype: 'cash coupon',
constnum: 'without',
}, {
costtype: 'special offer',
constnum: 1,
}, {
costtype: 'actual payment',
constnum: 1,
},
],
memoColumns: [
{
title: 'content',
key: 'memoname'
}
],
memoData: [
{
memoname: '商品没有库存',
}
],
/* operationColumns: [
{
title: '操作者',
key: 'operationname'
},
{
title: '操作时间',
key: 'operationtime'
},
{
title: '订单状态',
key: 'orderstatus'
},
{
title: '付款状态',
key: 'paymentstatus'
},
{
title: '发货状态',
key: 'DeliverStatus'
},
{
title: '备注',
key: 'remark'
},
],
operationData: [
{
operationname: '1',
operationtime: '1',
orderstatus: '1',
paymentstatus: '1',
DeliverStatus: '1',
remark: '1',
}
],*/
orderBasicVo: {},
},
methods: {
//前往商品链接 (link)
toProductLink(link) {
window.open(link, '_blank')
},
queryAll: function () {
vm.reload();
},
handleCommand: function (value) {
alert('click on item ' + value);
},
getDelivery: function (e) {
let orderId = e;
vm.showList = false;
vm.showOrderDesc = false;
vm.showLists = true;
vm.getInfo(orderId);
},
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) {
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', 'unshipped')
} else if (item.deliveryFlag === 10) {
vm.$set(item, 'deliveryFlag', 'shipped')
} else if (item.deliveryFlag === 20) {
vm.$set(item, 'deliveryFlag', 'China warehouse')
} else if (item.deliveryFlag === 40) {
vm.$set(item, 'deliveryFlag', 'Africa warehouse')
} else if (item.deliveryFlag === 50) {
vm.$set(item, 'deliveryFlag', 'successful deal')
}
})
}
});
},
//获取代购信息
showAgent: function (ordersId, orderId) {
vm.agentVisible = true;
vm.agentInfo.ordersId = ordersId;
vm.agentInfo.orderId = orderId;
vm.getAgentInfo(ordersId);
},
/*获取订单的代购信息*/
getAgentInfo: function (ordersId) {
// debugger
Ajax.request({
url: "../tbcforder/agent/" + ordersId,
async: true,
type: "get",
successCallback: function (r) {
if (!!r.data) {
vm.agentInfo = r.data;
console.log(vm.agentInfo)
} else {
vm.agentInfo = {
ordersId: ordersId,
//代购人
userName: vm.agentInfo.userName,
//商品品名
descripitionId: '',
//快递单号
pExpressNumber: '',
//订单号
orderId: vm.agentInfo.orderId,
//实际付款
realityPay: '',
//原网站订单号
pOrderId: '',
//代购平台
platformName: ''
};
}
}
});
Ajax.request({
url: "../tbcforder/agent/user",
type: "get",
dataType: "json",
contentType: 'application/json',
successCallback: function (r) {
if (!!r) {
vm.agentInfo.userName = r.user;
}
}
});
},
//新增或者修改代购信息
saveOrUpdateAgentInfo: function (orderId) {
let that = this;
if (vm.agentInfo.descripitionId) {
Ajax.request({
url: "../tbcforder/agent/",
params: JSON.stringify(vm.agentInfo),
type: "post",
dataType: "json",
contentType: 'application/json',
successCallback: function (r) {
// if (r.result == "1") {
vm.agentVisible = false;
layer.msg("保存成功", {
time: 2000 //2秒关闭(如果不配置,默认是3秒)
});
let order_id = vm.agentInfo.orderId
if (!!order_id) {
that.reloadDelivery(order_id);
}
// } else {
// alert("保存失败");
// }
}
});
} else {
alert("保存失败,请选择商品品名");
}
},
saveOrUpdate: function (event) {
let url = vm.tbCfOrderList.orderId == null ? "../tbcforder/save" : "../tbcforder/update";
Ajax.request({
url: url,
params: JSON.stringify(vm.tbCfOrderList),
type: "POST",
contentType: "application/json",
successCallback: function (r) {
alert('操作成功', function (index) {
vm.reload();
});
}
});
},
//删除订单
del: function (e) {
let orderId = e;
if (orderId == null) {
return;
}
confirm('确定要删除选中的记录?', function () {
Ajax.request({
url: "../tbcforder/deleteorder",
params: JSON.stringify(orderId),
type: "POST",
contentType: "application/json",
successCallback: function (r) {
alert('操作成功', function (index) {
vm.reload();
});
}
});
});
},
//备注订单
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) {
return;
}
confirm('确定要关闭选中的订单?', function () {
Ajax.request({
url: "../tbcforder/closeOrder",
params: JSON.stringify(orderId),
type: "POST",
contentType: "application/json",
successCallback: function () {
alert('操作成功', function (index) {
vm.reload();
});
}
});
});
},
//订单详情
orderDesc: function (e) {
vm.showList = false;
vm.showOrderDesc = true;
let orderId = e;
vm.getOderDescInfo(orderId)
},
//根据订单ID获取订单详情
getOderDescInfo: function (orderId) {
Ajax.request({
url: "../tbcforder/orderBasic/" + orderId,
async: true,
successCallback: function (r) {
vm.basicData = r.orderBasicVo.orderTime;
vm.memoData[0].memoname = r.orderBasicVo.remarkInfo;
vm.deliveryName = r.orderBasicVo.deliveryName;
vm.deliveryPhone = r.orderBasicVo.deliveryPhone;
vm.deliveryAddress = r.orderBasicVo.deliveryAddress;
vm.orderIdData = r.orderBasicVo.orderId;
vm.currentStatus = [];
if (r.orderBasicVo.orderStatus == 10) {
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.currentStatus = 1;
vm.waitPay = false;
vm.waitShip = true;
vm.sendShip = false;
vm.tranSuccessful = false;
vm.orderClose = false;
} else if (r.orderBasicVo.orderStatus == 40) {
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.currentStatus = 3;
vm.waitPay = false;
vm.waitShip = false;
vm.sendShip = false;
vm.tranSuccessful = true;
vm.orderClose = false;
} else if (r.orderBasicVo.orderStatus == 60) {
vm.currentStatus = 0;
vm.waitPay = false;
vm.waitShip = false;
vm.sendShip = false;
vm.tranSuccessful = false;
vm.orderClose = true;
}
vm.basicInfoData[0].data = r.orderBasicVo.orderNo;
vm.basicInfoData[1].data = r.orderBasicVo.userName;
vm.basicInfoData[2].data = r.orderBasicVo.atcTime;
vm.basicInfoData[3].data = r.orderBasicVo.source;
vm.basicInfoData[4].data = r.orderBasicVo.country;
vm.basicInfoData[5].data = r.orderBasicVo.payId;
vm.basicInfoData[6].data = r.orderBasicVo.payWayCode;
vm.basicInfoData[7].data = r.orderBasicVo.couponTitle;
vm.recipientsData[0].recipients = r.orderBasicVo.deliveryName;
vm.recipientsData[0].phone = r.orderBasicVo.deliveryPhone
vm.recipientsData[0].email = r.orderBasicVo.email;
vm.recipientsData[0].address = r.orderBasicVo.deliveryAddress;
vm.deliveryOrderList = r.orderBasicVo.deliveryOrderList;
vm.deliveryOrderList.map(item => {
if (item.deliveryFlag === 0) {
vm.$set(item, 'deliveryFlag', 'unshipped')
} else if (item.deliveryFlag === 10) {
vm.$set(item, 'deliveryFlag', 'shipped')
} else if (item.deliveryFlag === 20) {
vm.$set(item, 'deliveryFlag', 'China warehouse')
} else if (item.deliveryFlag === 40) {
vm.$set(item, 'deliveryFlag', 'Africa warehouse')
} else if (item.deliveryFlag === 50) {
vm.$set(item, 'deliveryFlag', 'trade successfully')
}
})
vm.costData[0].constnum = r.orderBasicVo.realityPay;
vm.costData[1].constnum = r.orderBasicVo.expressCost;
vm.costData[2].constnum = r.orderBasicVo.tax;
vm.costData[3].constnum = r.orderBasicVo.fee;
vm.costData[4].constnum = r.orderBasicVo.couponId;
vm.costData[6].constnum = r.orderBasicVo.couponTitle;
vm.costData[7].constnum = r.orderBasicVo.realityPay;
}
});
},
closeList: function () {
vm.showLists = false;
},
//重新加载订单详情
reloadOrder: function (event) {
vm.showList = true;
vm.showLists = false;
vm.showOrderDesc = false;
vm.handleReset('formValidate');
// vm.reloadSearch();
},
//弃用
/* reloadThisOrder: function (orderId) {
let e=orderId;
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;
vm.showOrderDesc = false;
vm.agentVisible = false;
vm.showLists = false;
vm.waitPay = false;
vm.waitShip = false;
let start = vm.value[0] || null;
let end = vm.value[1] || null;
let payWayCode = vm.payWayCode;
let deliveryFlag = vm.deliveryFlag;
let userName = vm.userName;
let orderStatus = vm.orderStatus;
let payStatus = vm.payStatus;
let page = $("#jqGrid").jqGrid('getGridParam', 'page');
$("#jqGrid").jqGrid('setGridParam', {
postData: {
'name': vm.orderNo,
'start': start,
'end': end,
'payWayCode': payWayCode,
'deliveryFlag': deliveryFlag,
'userName': userName,
'orderStatus': orderStatus,
'payStatus': payStatus
},
page: page
}).trigger("reloadGrid");
vm.handleReset('formValidate');
},
reloadSearch: function () {
vm.deliveryFlag = '';
vm.orderNo = '';
vm.value = '';
vm.payWayCode = '';
vm.expressStatus = '';
vm.userName = '';
vm.orderStatus = '';
vm.payStatus = '';
vm.reload();
},
handleSubmit: function (name) {
handleSubmitValidate(this, name, function () {
vm.saveOrUpdate()
});
},
handleReset: function (name) {
handleResetForm(this, name);
}
}
});
function showDefaultImg(img) {
img.src = "http://www.luolj.club/images/afrishop20190103.png";
//不循环执行
img.onerror = null;
}
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论