setter
parent
ca49c9319f
commit
aba2549b1c
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
namespace app\controller\manager;
|
namespace app\controller\manager;
|
||||||
|
|
||||||
|
use app\model\Order;
|
||||||
use app\model\Overview;
|
use app\model\Overview;
|
||||||
use app\model\Spu;
|
use app\model\Spu;
|
||||||
use app\repository\CmsRepository;
|
use app\repository\CmsRepository;
|
||||||
|
@ -59,7 +60,7 @@ class Index extends Base
|
||||||
return $this->json(0, '操作成功', $items);
|
return $this->json(0, '操作成功', $items);
|
||||||
}
|
}
|
||||||
|
|
||||||
$count['spu'] = Spu::count();
|
$count['order_placed'] = Order::where("status",Order::STATUS_ORDER_PLACED)->count();
|
||||||
|
|
||||||
$this->data['count'] = $count;
|
$this->data['count'] = $count;
|
||||||
return $this->view();
|
return $this->view();
|
||||||
|
|
|
@ -173,7 +173,7 @@ class Index extends Base
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$search[] = ['phone_active', '=', AccountModel::COMMON_ON];
|
//$search[] = ['phone_active', '=', AccountModel::COMMON_ON];
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$items = AccountRepository::getInstance()->getAndHandleAccountList($search, [], $page, $size, function ($q) use ($other) {
|
$items = AccountRepository::getInstance()->getAndHandleAccountList($search, [], $page, $size, function ($q) use ($other) {
|
||||||
|
|
|
@ -164,6 +164,7 @@ class Category extends Base
|
||||||
Db::startTrans();
|
Db::startTrans();
|
||||||
try {
|
try {
|
||||||
$item['path'] = CategoryModel::getPath($item['pid']);
|
$item['path'] = CategoryModel::getPath($item['pid']);
|
||||||
|
$item['name'] = "name";
|
||||||
(new CategoryModel())->create($item);
|
(new CategoryModel())->create($item);
|
||||||
Db::commit();
|
Db::commit();
|
||||||
return $this->json();
|
return $this->json();
|
||||||
|
|
|
@ -209,6 +209,47 @@ layui.use(['laytpl', 'table', 'jquery', 'form', 'miniTab', 'xmSelect', 'laydate'
|
||||||
exportFile(type, ids, isScore);
|
exportFile(type, ids, isScore);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
|
||||||
|
// toolbar 导出物流
|
||||||
|
case 'export-zip':
|
||||||
|
|
||||||
|
let thischeckStatus = table.checkStatus('table-container'); //idTest 即为基础参数 id 对应的值
|
||||||
|
let thisids = [];
|
||||||
|
$(thischeckStatus.data).each(function (i, item) {
|
||||||
|
thisids.push(item.id);
|
||||||
|
});
|
||||||
|
if(thisids.length==0){
|
||||||
|
layer.msg("请勾选数据");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
let index_layer = layer.msg("导出中",{icon: 16,time: 100000,shade : [0.5 , '#000' , true]});
|
||||||
|
//console.log(thisids);
|
||||||
|
let excelUrls = [];
|
||||||
|
|
||||||
|
for(let aa =0;aa<thisids.length;aa++){
|
||||||
|
$.ajax('/manager/mall/order/export-order-info', {
|
||||||
|
data: {id: thisids[aa],type:"zip"},
|
||||||
|
async: false,
|
||||||
|
dataType: 'json',//服务器返回json格式数据
|
||||||
|
type: 'post',//HTTP请求类型
|
||||||
|
timeout: 10000,//超时时间设置为10秒;
|
||||||
|
success: function (res) {
|
||||||
|
// console.log(res)
|
||||||
|
if (res.code === 0) {
|
||||||
|
excelUrls.push(res.data.url);
|
||||||
|
}else{
|
||||||
|
layer.msg("导出订单失败id:"+thisids[aa]);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
error: function (xhr, type, errorThrown) {
|
||||||
|
layer.msg("导出订单失败id:"+thisids[aa]);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
layer.close(index_layer)
|
||||||
|
window.open("/manager/mall/order/export-order-info-zip?urls="+excelUrls.join(","));
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
default:
|
default:
|
||||||
if (layEvent !== 'LAYTABLE_COLS' && layEvent !== 'LAYTABLE_EXPORT') {
|
if (layEvent !== 'LAYTABLE_COLS' && layEvent !== 'LAYTABLE_EXPORT') {
|
||||||
|
@ -246,6 +287,8 @@ layui.use(['laytpl', 'table', 'jquery', 'form', 'miniTab', 'xmSelect', 'laydate'
|
||||||
type: 'datetime',
|
type: 'datetime',
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($('.location-operate-page').length > 0) {
|
if ($('.location-operate-page').length > 0) {
|
||||||
|
@ -282,6 +325,21 @@ layui.use(['laytpl', 'table', 'jquery', 'form', 'miniTab', 'xmSelect', 'laydate'
|
||||||
if ($('.location-detail-page').length > 0) {
|
if ($('.location-detail-page').length > 0) {
|
||||||
miniTab.listen();
|
miniTab.listen();
|
||||||
|
|
||||||
|
$(".layui-datetime").each(function () {
|
||||||
|
laydate.render({
|
||||||
|
elem: this,
|
||||||
|
type: 'datetime',
|
||||||
|
});
|
||||||
|
})
|
||||||
|
$(".layui-date").each(function () {
|
||||||
|
laydate.render({
|
||||||
|
elem: this,
|
||||||
|
type: 'date',
|
||||||
|
});
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//监听行工具条
|
//监听行工具条
|
||||||
table.on('tool(table-container)', function (obj) {
|
table.on('tool(table-container)', function (obj) {
|
||||||
let layEvent = obj.event;
|
let layEvent = obj.event;
|
||||||
|
|
|
@ -10,8 +10,8 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="layui-col-md8" style="padding: 15% 0;">
|
<div class="layui-col-md8" style="padding: 15% 0;">
|
||||||
<h3><strong>商品数量</strong></h3>
|
<h3><strong>已下单</strong></h3>
|
||||||
<span style="font-size: 36px">{$count['spu'] ?? 0}</span>
|
<span style="font-size: 36px">{$count['order_placed'] ?? 0}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -118,6 +118,7 @@
|
||||||
<!-- toolbar -->
|
<!-- toolbar -->
|
||||||
<script type="text/html" id="toolbar-tpl">
|
<script type="text/html" id="toolbar-tpl">
|
||||||
<a class="layui-btn layui-btn-primary layui-btn-sm" data-table-refresh lay-event="refresh"><i class="fa fa-refresh"></i></a>
|
<a class="layui-btn layui-btn-primary layui-btn-sm" data-table-refresh lay-event="refresh"><i class="fa fa-refresh"></i></a>
|
||||||
|
<a class="layui-btn layui-btn-normal layui-btn-sm" lay-event="export-zip">批量导出</a>
|
||||||
<!-- <a class="layui-btn layui-btn-normal layui-btn-sm" lay-event="export-list">导出待发货物流</a>-->
|
<!-- <a class="layui-btn layui-btn-normal layui-btn-sm" lay-event="export-list">导出待发货物流</a>-->
|
||||||
<!-- <a class="layui-btn layui-btn-warm layui-btn-sm" id="upload-order" href="javascript:;">导入待发货物流</a>-->
|
<!-- <a class="layui-btn layui-btn-warm layui-btn-sm" id="upload-order" href="javascript:;">导入待发货物流</a>-->
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
<fieldset class="layui-elem-field layui-field-title" style="margin-top: 0px;">
|
<fieldset class="layui-elem-field layui-field-title" style="margin-top: 0px;">
|
||||||
<legend>订单信息</legend>
|
<legend>订单信息</legend>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
<div>
|
<div class="layui-form">
|
||||||
<table class="layui-table" lay-even="" lay-skin="nob">
|
<table class="layui-table" lay-even="" lay-skin="nob">
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -16,7 +16,12 @@
|
||||||
<td>订单状态:{$statusList[$item['status']] ?? ''}</td>
|
<td>订单状态:{$statusList[$item['status']] ?? ''}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>应付总价(元):<span id="order_original_price">{$item.original_price ?? 0}</span></td>
|
<td>应付总价(元):
|
||||||
|
<div class="layui-input-inline">
|
||||||
|
<input id="order_original_price" type="text" class="layui-input " name="item[original_price]" value="{$item.original_price ?? ''}">
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td>下单时间:{$item.created_at ?? ''}</td>
|
||||||
<!-- <td>实付总价(元):{$item.price ?? 0}</td>-->
|
<!-- <td>实付总价(元):{$item.price ?? 0}</td>-->
|
||||||
</tr>
|
</tr>
|
||||||
<!-- <tr>-->
|
<!-- <tr>-->
|
||||||
|
@ -34,12 +39,16 @@
|
||||||
{/if}
|
{/if}
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>下单时间:{$item.created_at ?? ''}</td>
|
<td>发货时间:
|
||||||
<!-- <td>付款时间:{$item.paid_at ?? ''}</td>-->
|
<div class="layui-input-inline">
|
||||||
</tr>
|
<input type="text" class="layui-input layui-datetime" name="item[shipped_at]" value="{$item.shipped_at ?? ''}">
|
||||||
<tr>
|
</div>
|
||||||
<td>发货时间:{$item.shipped_at ?? ''}</td>
|
</td>
|
||||||
<td>确认收货时间:{$item.accepted_at ?? ''}</td>
|
<td>确认收货时间:
|
||||||
|
<div class="layui-input-inline">
|
||||||
|
<input type="text" class="layui-input layui-datetime" name="item[accepted_at]" value="{$item.accepted_at ?? ''}">
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<!-- <tr>-->
|
<!-- <tr>-->
|
||||||
<!-- <td>物流方式:{$item.pick_self == 1 ? '自提' : '邮寄'}</td>-->
|
<!-- <td>物流方式:{$item.pick_self == 1 ? '自提' : '邮寄'}</td>-->
|
||||||
|
@ -62,15 +71,35 @@
|
||||||
<!-- </tr>-->
|
<!-- </tr>-->
|
||||||
{/if}
|
{/if}
|
||||||
<tr>
|
<tr>
|
||||||
<td>婚期:{$item.wedding_date ?? ''}</td>
|
<td>婚期 :
|
||||||
<td>期望送达日期:{$item.expected_delivery_date ?? ''}</td>
|
<div class="layui-input-inline">
|
||||||
|
<input type="text" class="layui-input layui-date" name="item[wedding_date]" value="{$item.wedding_date ?? ''}">
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td>期望送达日期:
|
||||||
|
<div class="layui-input-inline">
|
||||||
|
<input type="text" class="layui-input layui-date" name="item[expected_delivery_date]" value="{$item.expected_delivery_date ?? ''}">
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>收货地址:{$item.address ?? ''}</td>
|
<td>收货地址:
|
||||||
<td>联系人:{$item.contacts ?? ''}</td>
|
<div class="layui-input-inline">
|
||||||
|
<input type="text" class="layui-input" name="item[address]" value="{$item.address ?? ''}">
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td>联系人 :
|
||||||
|
<div class="layui-input-inline">
|
||||||
|
<input type="text" name="item[contacts]" class="layui-input" value="{$item.contacts ?? ''}">
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>联系电话:{$item.phone ?? ''}</td>
|
<td>联系电话:
|
||||||
|
<div class="layui-input-inline">
|
||||||
|
<input type="text" name="item[phone]" class="layui-input" value="{$item.phone ?? ''}">
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
{if $item.pick_self != 1}
|
{if $item.pick_self != 1}
|
||||||
|
@ -80,6 +109,16 @@
|
||||||
<!-- <tr>-->
|
<!-- <tr>-->
|
||||||
<!-- <td>买家备注:{$item.remarks ?? ''}</td>-->
|
<!-- <td>买家备注:{$item.remarks ?? ''}</td>-->
|
||||||
<!-- </tr>-->
|
<!-- </tr>-->
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<div class="layui-form-item">
|
||||||
|
<div class="layui-input-block">
|
||||||
|
<button class="layui-btn layui-btn-normal" data-url="/manager/mall/order/info?id={$item.id}" lay-submit lay-filter="saveBtn">确认保存</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -31,7 +31,7 @@
|
||||||
<div class="layui-row upload-file-div">
|
<div class="layui-row upload-file-div">
|
||||||
<div class=" layui-col-xs12 layui-col-md8">
|
<div class=" layui-col-xs12 layui-col-md8">
|
||||||
<input class="layui-input upload-file-value" name="item[src]" type="text" value="">
|
<input class="layui-input upload-file-value" name="item[src]" type="text" value="">
|
||||||
<div class="layui-form-mid layui-word-aux">图片尺寸:最低高度为200px</div>
|
<div class="layui-form-mid layui-word-aux">图片尺寸:710px*400px</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="layui-col-xs12 layui-col-md3">
|
<div class="layui-col-xs12 layui-col-md3">
|
||||||
<span>
|
<span>
|
||||||
|
|
|
@ -31,7 +31,7 @@
|
||||||
<div class="layui-row upload-file-div">
|
<div class="layui-row upload-file-div">
|
||||||
<div class=" layui-col-xs12 layui-col-md8">
|
<div class=" layui-col-xs12 layui-col-md8">
|
||||||
<input class="layui-input upload-file-value" name="item[src]" type="text" value="{$item.src ?? ''}">
|
<input class="layui-input upload-file-value" name="item[src]" type="text" value="{$item.src ?? ''}">
|
||||||
<div class="layui-form-mid layui-word-aux">图片尺寸:最低高度为200px</div>
|
<div class="layui-form-mid layui-word-aux">图片尺寸:710px*400px</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="layui-col-xs12 layui-col-md3">
|
<div class="layui-col-xs12 layui-col-md3">
|
||||||
<span>
|
<span>
|
||||||
|
|
Loading…
Reference in New Issue