mirror of
https://gitee.com/java110/MicroCommunityWeb.git
synced 2026-06-12 10:00:56 +08:00
优化代码
This commit is contained in:
parent
081b25aa23
commit
747051d9bc
@ -25,7 +25,7 @@
|
|||||||
<div class="form-group row">
|
<div class="form-group row">
|
||||||
<label class="col-sm-2 col-form-label">说明</label>
|
<label class="col-sm-2 col-form-label">说明</label>
|
||||||
<div class="col-sm-10">
|
<div class="col-sm-10">
|
||||||
<input v-model="addAttrSpecInfo.specHoldplace" type="text" placeholder="选填,请填写说明"
|
<input v-model="addAttrSpecInfo.specHoldplace" type="text" placeholder="必填,请填写说明"
|
||||||
class="form-control">
|
class="form-control">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -25,7 +25,7 @@
|
|||||||
<div class="form-group row">
|
<div class="form-group row">
|
||||||
<label class="col-sm-2 col-form-label">说明</label>
|
<label class="col-sm-2 col-form-label">说明</label>
|
||||||
<div class="col-sm-10">
|
<div class="col-sm-10">
|
||||||
<input v-model="editAttrSpecInfo.specHoldplace" type="text" placeholder="选填,请填写说明"
|
<input v-model="editAttrSpecInfo.specHoldplace" type="text" placeholder="必填,请填写说明"
|
||||||
class="form-control">
|
class="form-control">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
<div class="animated fadeInRight ecommerce">
|
<div class="animated fadeInRight ecommerce">
|
||||||
<div class="row" v-if="storeOrderCartManageInfo.orderDetail == false">
|
<div class="row" >
|
||||||
<div class="col-lg-12">
|
<div class="col-lg-12">
|
||||||
<div class="ibox ">
|
<div class="ibox ">
|
||||||
<div class="ibox-title">
|
<div class="ibox-title">
|
||||||
@ -46,7 +46,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row" v-if="storeOrderCartManageInfo.orderDetail == false">
|
<div class="row" >
|
||||||
<div class="col-lg-12">
|
<div class="col-lg-12">
|
||||||
<div class="ibox">
|
<div class="ibox">
|
||||||
<div class="ibox-title">
|
<div class="ibox-title">
|
||||||
|
|||||||
@ -0,0 +1,104 @@
|
|||||||
|
<div class="animated fadeInRight ecommerce">
|
||||||
|
<div class="row" >
|
||||||
|
<div class="col-lg-12">
|
||||||
|
<div class="ibox ">
|
||||||
|
<div class="ibox-title">
|
||||||
|
<h5>查询条件</h5>
|
||||||
|
<div class="ibox-tools" style="top:10px;">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="ibox-content">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-4">
|
||||||
|
<div class="form-group">
|
||||||
|
<input type="text" placeholder="订单编号"
|
||||||
|
v-model="storeOrderCartReturnManageInfo.conditions.cartId" class=" form-control">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-3">
|
||||||
|
<div class="form-group">
|
||||||
|
<select class="custom-select" v-model="storeOrderCartReturnManageInfo.conditions.state">
|
||||||
|
<option value="">请选择状态</option>
|
||||||
|
<option value="5005">申请退款</option>
|
||||||
|
<option value="6006">退货成功</option>
|
||||||
|
<option value="7007">已退款</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-3">
|
||||||
|
<div class="form-group">
|
||||||
|
<input type="text" placeholder="请输入商品名称"
|
||||||
|
v-model="storeOrderCartReturnManageInfo.conditions.prodName" class=" form-control">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-2">
|
||||||
|
<button type="button" class="btn btn-primary btn-sm" v-on:click="_queryOrdersMethod()">
|
||||||
|
<i class="fa fa-search"></i> 查询
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-lg-12">
|
||||||
|
<div class="ibox">
|
||||||
|
<div class="ibox-title">
|
||||||
|
<h5>退货订单</h5>
|
||||||
|
<div class="ibox-tools" style="top:10px;"></div>
|
||||||
|
</div>
|
||||||
|
<div class="ibox-content">
|
||||||
|
|
||||||
|
<table class="footable table table-stripped toggle-arrow-tiny" data-page-size="15">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th class="text-center">订单号</th>
|
||||||
|
<th class="text-center">商品名称</th>
|
||||||
|
<th class="text-center">商品规格</th>
|
||||||
|
<th class="text-center">用户名称</th>
|
||||||
|
<th class="text-center">退款金额</th>
|
||||||
|
<th class="text-center">订单状态</th>
|
||||||
|
<th class="text-center">退款原因</th>
|
||||||
|
<th class="text-center">申请时间</th>
|
||||||
|
<th class="text-right">操作</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr v-for="order in storeOrderCartReturnManageInfo.orderCarts">
|
||||||
|
<td class="text-center">{{order.cartId}}</td>
|
||||||
|
<td class="text-center">{{order.prodName}}</td>
|
||||||
|
<td class="text-center">{{order.specValue}}</td>
|
||||||
|
<td class="text-center">{{order.personName}}</td>
|
||||||
|
<td class="text-center">{{order.returnPayPrice}}</td>
|
||||||
|
<td class="text-center">{{order.stateName}}</td>
|
||||||
|
<td class="text-center">{{order.returnReason}}</td>
|
||||||
|
<td class="text-center">{{order.createTime}}</td>
|
||||||
|
<td class="text-right">
|
||||||
|
<div class="btn-group">
|
||||||
|
<button class="btn-white btn btn-xs"
|
||||||
|
v-on:click="_openSendOrderCartModel(order)">审核
|
||||||
|
</button>
|
||||||
|
<button class="btn-white btn btn-xs"
|
||||||
|
v-on:click="_openOrderDetailModel(order)">详情
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
<tfoot>
|
||||||
|
<tr>
|
||||||
|
<td colspan="7">
|
||||||
|
<ul class="pagination float-right"></ul>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tfoot>
|
||||||
|
</table>
|
||||||
|
<!-- 分页 -->
|
||||||
|
<vc:create path="frame/pagination"></vc:create>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
@ -0,0 +1,106 @@
|
|||||||
|
//订单查询
|
||||||
|
(function (vc) {
|
||||||
|
var DEFAULT_PAGE = 1;
|
||||||
|
var DEFAULT_ROWS = 10;
|
||||||
|
vc.extends({
|
||||||
|
data: {
|
||||||
|
storeOrderCartReturnManageInfo: {
|
||||||
|
orderCarts: [],
|
||||||
|
total: 0,
|
||||||
|
records: 1,
|
||||||
|
orderDetail: false,
|
||||||
|
conditions: {
|
||||||
|
cartId: '',
|
||||||
|
state: '',
|
||||||
|
prodName: ''
|
||||||
|
},
|
||||||
|
curOrderCart: {}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
_initMethod: function () {
|
||||||
|
vc.component._listOrders(DEFAULT_PAGE, DEFAULT_ROWS);
|
||||||
|
},
|
||||||
|
_initEvent: function () {
|
||||||
|
vc.on('storeOrderCartReturnManage', 'goBack', function (_param) {
|
||||||
|
vc.component.storeOrderCartReturnManageInfo.orderDetail = false;
|
||||||
|
});
|
||||||
|
vc.on('storeOrderCartReturnManage', 'list', function () {
|
||||||
|
vc.component._listOrders(DEFAULT_PAGE,DEFAULT_ROWS);
|
||||||
|
});
|
||||||
|
vc.on('pagination', 'page_event', function (_currentPage) {
|
||||||
|
vc.component._listOrders(_currentPage, DEFAULT_ROWS);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
_listOrders: function (_page, _rows) {
|
||||||
|
vc.component.storeOrderCartReturnManageInfo.conditions.page = _page;
|
||||||
|
vc.component.storeOrderCartReturnManageInfo.conditions.row = _rows;
|
||||||
|
var param = {
|
||||||
|
params: vc.component.storeOrderCartReturnManageInfo.conditions
|
||||||
|
};
|
||||||
|
//发送get请求
|
||||||
|
vc.http.apiGet('/storeOrderCartReturn/queryStoreOrderCartReturn',
|
||||||
|
param,
|
||||||
|
function (json, res) {
|
||||||
|
var _storeOrderCartReturnManageInfo = JSON.parse(json);
|
||||||
|
vc.component.storeOrderCartReturnManageInfo.total = _storeOrderCartReturnManageInfo.total;
|
||||||
|
vc.component.storeOrderCartReturnManageInfo.records = _storeOrderCartReturnManageInfo.records;
|
||||||
|
$that.storeOrderCartReturnManageInfo.orderCarts = _storeOrderCartReturnManageInfo.data;
|
||||||
|
|
||||||
|
let _orderCarts = $that.storeOrderCartReturnManageInfo.orderCarts;
|
||||||
|
|
||||||
|
_orderCarts.forEach(item => {
|
||||||
|
let _productSpecDetails = item.productSpecDetails;
|
||||||
|
let _specValue = '';
|
||||||
|
_productSpecDetails.forEach(detail => {
|
||||||
|
_specValue += (detail.detailValue + "/");
|
||||||
|
});
|
||||||
|
|
||||||
|
item.specValue = _specValue;
|
||||||
|
});
|
||||||
|
|
||||||
|
vc.emit('pagination', 'init', {
|
||||||
|
total: vc.component.storeOrderCartReturnManageInfo.records,
|
||||||
|
currentPage: _page
|
||||||
|
});
|
||||||
|
}, function (errInfo, error) {
|
||||||
|
console.log('请求失败处理');
|
||||||
|
}
|
||||||
|
);
|
||||||
|
},
|
||||||
|
_queryOrdersMethod: function () {
|
||||||
|
vc.component._listOrders(DEFAULT_PAGE, DEFAULT_ROWS);
|
||||||
|
},
|
||||||
|
_openOrderDetailModel: function (_order) {
|
||||||
|
vc.jumpToPage('/admin.html#/pages/goods/storeOrderCartReturnDetail?orderId=' + _order.orderId + '&cartId=' + _order.cartId);
|
||||||
|
},
|
||||||
|
|
||||||
|
_closeStoreOrderCartModal: function () {
|
||||||
|
$("#storeOrderCartReturnModal").modal('hide');
|
||||||
|
},
|
||||||
|
_sendOrderCart: function () {
|
||||||
|
//发送get请求
|
||||||
|
vc.http.apiPost('/storeOrder/sendStoreOrderCart',
|
||||||
|
JSON.stringify($that.storeOrderCartReturnManageInfo.curOrderCart),
|
||||||
|
{
|
||||||
|
emulateJSON: true
|
||||||
|
},
|
||||||
|
function (json, res) {
|
||||||
|
let sendResult = JSON.parse(json);
|
||||||
|
if (sendResult.code == 0) {
|
||||||
|
$that._closeStoreOrderCartModal();
|
||||||
|
vc.emit('storeOrderCartReturnManage', 'list',{});
|
||||||
|
vc.toast('发货成功');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
vc.toast(sendResult.msg);
|
||||||
|
return;
|
||||||
|
}, function (errInfo, error) {
|
||||||
|
console.log('请求失败处理');
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
})(window.vc);
|
||||||
Loading…
Reference in New Issue
Block a user