|
|
@@ -97,24 +97,6 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<!--end-->
|
|
|
- <!-- 中间详细信息-->
|
|
|
- <div :class="item.col!=undefined ? 'layui-col-sm'+item.col+' '+'layui-col-md'+item.col:'layui-col-sm6 layui-col-md3'"
|
|
|
- v-for="item in badge" v-cloak="" v-if="item.count > 0">
|
|
|
- <div class="layui-card">
|
|
|
- <div class="layui-card-header">
|
|
|
- {{item.name}}
|
|
|
- <span class="layui-badge layuiadmin-badge" :class="item.background_color">{{item.field}}</span>
|
|
|
- </div>
|
|
|
- <div class="layui-card-body">
|
|
|
- <p class="layuiadmin-big-font">{{item.count}}</p>
|
|
|
- <p v-show="item.content!=undefined">
|
|
|
- {{item.content}}
|
|
|
- <span class="layuiadmin-span-color">{{item.sum}}<i :class="item.class"></i></span>
|
|
|
- </p>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <!--enb-->
|
|
|
</div>
|
|
|
<!--列表-->
|
|
|
<div class="layui-row layui-col-space15">
|
|
|
@@ -123,8 +105,7 @@
|
|
|
<div class="layui-card-header">订单列表</div>
|
|
|
<div class="layui-card-body">
|
|
|
<div class="layui-btn-container" id="container-action">
|
|
|
- <button class="layui-btn layui-btn-sm" data-type="del_order">批量删除订单</button>
|
|
|
- <button class="layui-btn layui-btn-sm layui-btn-warm" data-type="write_order">订单核销</button>
|
|
|
+ <button class="layui-btn layui-btn-sm layui-btn-warm" data-type="write_order">核销</button>
|
|
|
</div>
|
|
|
<table class="layui-hide" id="List" lay-filter="List"></table>
|
|
|
<!--订单-->
|
|
|
@@ -571,7 +552,7 @@
|
|
|
{/block}
|
|
|
{block name="script"}
|
|
|
<script>
|
|
|
- layList.tableList('List', "{:Url('order_list',['real_name'=>$real_name])}", function () {
|
|
|
+ layList.tableList('List', "{:Url('exchange_order_list',['real_name'=>$real_name])}", function () {
|
|
|
return [
|
|
|
{type: 'checkbox'},
|
|
|
{field: 'order_id', title: '订单号', sort: true, event: 'order_id', width: '11%', templet: '#order_id'},
|
|
|
@@ -593,21 +574,8 @@
|
|
|
});
|
|
|
layList.tool(function (event, data, obj) {
|
|
|
switch (event) {
|
|
|
- case 'order_paid':
|
|
|
- var url = layList.U({c: 'order.store_order', a: 'offline', p: {id: data.id}});
|
|
|
- $eb.$swal('delete', function () {
|
|
|
- $eb.axios.get(url).then(function (res) {
|
|
|
- if (res.status == 200 && res.data.code == 200) {
|
|
|
- $eb.$swal('success', res.data.msg);
|
|
|
- } else
|
|
|
- return Promise.reject(res.data.msg || '修改失败')
|
|
|
- }).catch(function (err) {
|
|
|
- $eb.$swal('error', err);
|
|
|
- });
|
|
|
- }, {'title': '您确定要修改支付状态吗?', 'text': '修改后将无法恢复,请谨慎操作!', 'confirm': '是的,我要修改'})
|
|
|
- break;
|
|
|
case 'verify':
|
|
|
- var url = layList.U({c: 'order.store_order', a: 'verify', p: {id: data.id}});
|
|
|
+ var url = layList.U({c: 'order.store_order', a: 'exchange_verify', p: {id: data.id}});
|
|
|
$eb.$swal('delete', function () {
|
|
|
$eb.axios.get(url).then(function (res) {
|
|
|
if (res.status == 200 && res.data.code == 200) {
|
|
|
@@ -619,81 +587,11 @@
|
|
|
});
|
|
|
}, {'title': '您确定核销该订单吗?', 'text': '修改后将无法恢复,请谨慎操作!', 'confirm': '是的,我要核销'})
|
|
|
break;
|
|
|
- case 'marke':
|
|
|
- var url = layList.U({c: 'order.store_order', a: 'remark'}),
|
|
|
- id = data.id,
|
|
|
- make = data.remark;
|
|
|
- $eb.$alert('textarea', {title: '请修改内容', value: make}, function (result) {
|
|
|
- if (result) {
|
|
|
- $.ajax({
|
|
|
- url: url,
|
|
|
- data: 'remark=' + result + '&id=' + id,
|
|
|
- type: 'post',
|
|
|
- dataType: 'json',
|
|
|
- success: function (res) {
|
|
|
- if (res.code == 200) {
|
|
|
- $eb.$swal('success', res.msg);
|
|
|
- } else
|
|
|
- $eb.$swal('error', res.msg);
|
|
|
- }
|
|
|
- })
|
|
|
- } else {
|
|
|
- $eb.$swal('error', '请输入要备注的内容');
|
|
|
- }
|
|
|
- });
|
|
|
- break;
|
|
|
- case 'danger':
|
|
|
- var url = layList.U({c: 'order.store_order', a: 'take_delivery', p: {id: data.id}});
|
|
|
- $eb.$swal('delete', function () {
|
|
|
- $eb.axios.get(url).then(function (res) {
|
|
|
- if (res.status == 200 && res.data.code == 200) {
|
|
|
- $eb.$swal('success', res.data.msg);
|
|
|
- } else
|
|
|
- return Promise.reject(res.data.msg || '收货失败')
|
|
|
- }).catch(function (err) {
|
|
|
- $eb.$swal('error', err);
|
|
|
- });
|
|
|
- }, {'title': '您确定要修改收货状态吗?', 'text': '修改后将无法恢复,请谨慎操作!', 'confirm': '是的,我要修改'})
|
|
|
- break;
|
|
|
- case 'order_info':
|
|
|
- $eb.createModalFrame(data.nickname + '订单详情', layList.U({a: 'order_info', q: {oid: data.id}}));
|
|
|
- break;
|
|
|
- case 'order_print':
|
|
|
- var url = layList.U({c: 'order.store_order', a: 'order_print', p: {id: data.id}});
|
|
|
- $eb.$swal('delete', function () {
|
|
|
- $eb.axios.get(url).then(function (res) {
|
|
|
- if (res.status == 200 && res.data.code == 200) {
|
|
|
- $eb.$swal('success', res.data.msg);
|
|
|
- } else
|
|
|
- return Promise.reject(res.data.msg || '核销失败')
|
|
|
- }).catch(function (err) {
|
|
|
- $eb.$swal('error', err);
|
|
|
- });
|
|
|
- }, {'title': '确认打印订单?', 'text': '是否确认打印!', 'confirm': '确定'})
|
|
|
- break;
|
|
|
}
|
|
|
})
|
|
|
var action = {
|
|
|
- del_order: function () {
|
|
|
- var ids = layList.getCheckData().getIds('id');
|
|
|
- if (ids.length) {
|
|
|
- var url = layList.U({c: 'order.store_order', a: 'del_order'});
|
|
|
- $eb.$swal('delete', function () {
|
|
|
- $eb.axios.post(url, {ids: ids}).then(function (res) {
|
|
|
- if (res.status == 200 && res.data.code == 200) {
|
|
|
- $eb.$swal('success', res.data.msg);
|
|
|
- } else
|
|
|
- return Promise.reject(res.data.msg || '删除失败')
|
|
|
- }).catch(function (err) {
|
|
|
- $eb.$swal('error', err);
|
|
|
- });
|
|
|
- }, {'title': '您确定要修删除订单吗?', 'text': '删除后将无法恢复,请谨慎操作!', 'confirm': '是的,我要删除'})
|
|
|
- } else {
|
|
|
- layList.msg('请选择要删除的订单');
|
|
|
- }
|
|
|
- },
|
|
|
write_order: function () {
|
|
|
- return $eb.createModalFrame('订单核销', layList.U({a: 'write_order'}), {w: 500, h: 400});
|
|
|
+ return $eb.createModalFrame('订单核销', layList.U({a: 'write_exchange_order'}), {w: 500, h: 400});
|
|
|
},
|
|
|
};
|
|
|
$('#container-action').find('button').each(function () {
|
|
|
@@ -775,16 +673,6 @@
|
|
|
this.getBadge();
|
|
|
layList.reload(this.where, true);
|
|
|
},
|
|
|
- 'where.type': function () {
|
|
|
- this.where.excel = 0;
|
|
|
- this.getBadge();
|
|
|
- layList.reload(this.where, true);
|
|
|
- },
|
|
|
- 'where.pay_type': function () {
|
|
|
- this.where.excel = 0;
|
|
|
- this.getBadge();
|
|
|
- layList.reload(this.where, true);
|
|
|
- }
|
|
|
},
|
|
|
methods: {
|
|
|
setData: function (item) {
|
|
|
@@ -797,12 +685,6 @@
|
|
|
this.where.data = item.value;
|
|
|
}
|
|
|
},
|
|
|
- getBadge: function () {
|
|
|
- var that = this;
|
|
|
- layList.basePost(layList.Url({c: 'order.store_order', a: 'getBadge'}), this.where, function (rem) {
|
|
|
- that.badge = rem.data;
|
|
|
- });
|
|
|
- },
|
|
|
search: function () {
|
|
|
this.where.excel = 0;
|
|
|
this.getBadge();
|
|
|
@@ -814,13 +696,12 @@
|
|
|
},
|
|
|
excel: function () {
|
|
|
this.where.excel = 1;
|
|
|
- location.href = layList.U({c: 'order.store_order', a: 'order_list', q: this.where});
|
|
|
+ location.href = layList.U({c: 'order.store_order', a: 'exchange_order_list', q: this.where});
|
|
|
this.where.excel = 0;
|
|
|
}
|
|
|
},
|
|
|
mounted: function () {
|
|
|
var that = this;
|
|
|
- that.getBadge();
|
|
|
window.formReload = this.search;
|
|
|
layList.laydate.render({
|
|
|
elem: this.$refs.date_time,
|