作者 刘朕

合并分支 '1iuzhen' 到 'master'

后台导入优化



查看合并请求 !39
... ... @@ -76,8 +76,8 @@ class LogisticsController extends AdminBaseController
$array = $this->import_excel('./upload/'.$excel);
//执行导入操作
Db::startTrans();
$t = 24 * 60 * 60;
foreach ($array as $k=>$v) {
$insert = $update = [];
// if(!$this->logistics_model->check($v[1])) {
$insert['mobile'] = $update['mobile'] = $v[0];
$insert['send_time'] = $update['send_time'] = date('Y-m-d H:i:s',\PHPExcel_Shared_Date::ExcelToPHP($v[1]));
... ... @@ -86,12 +86,19 @@ class LogisticsController extends AdminBaseController
$insert['is_del'] = $update['is_del'] = $v[4];
if(empty($v[4])) {
$insert['is_del'] = $update['is_del'] = 0;
if($v[4] == 0) {
$update['delete_time'] = 0;
$insert['is_del'] = $update['is_del'] = 0;
}
} else{
if($v[4] == 1) {
$update['delete_time'] = time();
$update['is_del'] = 1;
}
}
$info = $this->logistics_model->where(['express'=>$insert['express']])->find();
if($info) {
$update['id'] = $info['id'];
$update['update_time'] = time();
if(!$this->logistics_model->editLogistics($update)) {
if(!$this->logistics_model->where(['id'=>$info['id']])->update($update)) {
Db::rollback();
$this->error('数据导入中出错,请重试');
}
... ... @@ -266,10 +273,10 @@ class LogisticsController extends AdminBaseController
$id = $this->request->param('id',0,'intval');
$ids = $this->request->param('ids/a');
if(isset($id)) {
$result = $this->logistics_model->where(['id'=>$id])->update(['delete_time'=>time()]);
$result = $this->logistics_model->where(['id'=>$id])->update(['delete_time'=>time(),'is_del'=>1]);
}
if(isset($ids)) {
$result = $this->logistics_model->where(['id'=>['in',$ids]])->update(['delete_time'=>time()]);
$result = $this->logistics_model->where(['id'=>['in',$ids]])->update(['delete_time'=>time(),'is_del'=>1]);
}
if(!$result) {
$this->error('删除失败');
... ...
... ... @@ -34,7 +34,15 @@
<div class="swiper-container">
<div class="swiper-wrapper">
<volist name="slideList" id="vo">
<div class="swiper-slide"><div class="index_swiper"><img src="{:cmf_get_asset_url($vo['image'])}" style="vertical-align:middle;"/><span style="display:inline-block; height:100%; vertical-align:middle;"></span></div></div>
<div class="swiper-slide">
<div class="index_swiper">
<notempty name="vo.url">
<a href="{$vo.url}"><img src="{:cmf_get_asset_url($vo['image'])}" style="vertical-align:middle;"/></a>
<else/>
<img src="{:cmf_get_asset_url($vo['image'])}" style="vertical-align:middle;"/>
</notempty>
</div>
</div>
</volist>
</div>
<!-- Add Pagination -->
... ...
... ... @@ -151,7 +151,7 @@
event.stopPropagation();
location.href = $(this).data('href');
});
$('.deal_list').on('click','.write_order',function(){
$('.tab_tit').on('click','.write_order',function(){
location.href = "{$orderUrl}";
});
</script>
... ...