Browse Source

Merge pull request '20220729_newtpl' (#9) from 20220729_newtpl into master

Reviewed-on: #9
pull/10/head
超级管理员 3 years ago
parent
commit
f2a28f0443
  1. 57
      config/define.php
  2. 201
      control/index.php
  3. 6
      data/dOrder.php
  4. 4
      index.php
  5. 39
      model/mBase.php
  6. 307
      model/mOrder.php
  7. 118
      view/css/admin_style.css
  8. BIN
      view/images/blank_table.png
  9. 2
      view/js/layui.js
  10. 11810
      view/js/layui_build.js
  11. 8
      view/templates/include/admin_header.html
  12. 28
      view/templates/include/admin_leftmenu.html
  13. 180
      view/templates/index/after_sale_list.html
  14. 694
      view/templates/index/home.html
  15. 420
      view/templates/index/home2.html
  16. 381
      view/templates/index/order_list.html
  17. 237
      view/templates/index/order_list2.html
  18. 238
      view/templates/index/wait_deliver_list.html

57
config/define.php

@ -11,6 +11,9 @@
date_default_timezone_set("Asia/Shanghai");
define('APPNAME', '快乐帮手');
define('BEIAN', '鲁ICP备14002313号-1');
define('LOG_PATH_BASE', DATACENTER_ROOT.'/logs/');
define('LOG_TRACK_SAVE_PATH', LOG_PATH_BASE.'track/%s/%s.log'); // 监控日志的路径,如2014-02-14/1(检测类型).log
@ -48,6 +51,60 @@
REFUND_STATUS_SUCC => '退款成功',
);
# 售后状态
# 0:无售后
# 2:买家申请退款,待商家处理
# 3:退货退款,待商家处理
# 4:商家同意退款,退款中
# 5:平台同意退款,退款中
# 6:驳回退款,待买家处理
# 7:已同意退货退款,待用户发货
# 8:平台处理中
# 9:平台拒绝退款,退款关闭
# 10:退款成功
# 11:买家撤销
# 12:买家逾期未处理,退款失败
# 13:买家逾期,超过有效期 14:换货补寄待商家处理 15:换货补寄待用户处理 16:换货补寄成功 17:换货补寄失败 18:换货补寄待用户确认完成 21:待商家同意维修 22:待用户确认发货 24:维修关闭 25:维修成功 27:待用户确认收货 31:已同意拒收退款,待用户拒收 32:补寄待商家发货
define('AFTER_SALES_STATUS_NO', 0);
define('AFTER_SALES_STATUS_BUYER_APPLIES_FOR_REFUND', 2);
define('AFTER_SALES_STATUS_RETURN_REFUND', 3);
define('AFTER_SALES_STATUS_SELLER_AGREE_REFUND', 4);
define('AFTER_SALES_STATUS_PLATFORM_AGREE_REFUND', 5);
define('AFTER_SALES_STATUS_REFUSE_REFUND', 6);
define('AFTER_SALES_STATUS_RETURN_REFUND_AGREE', 7);
define('AFTER_SALES_STATUS_PLATFORM_PROCESSING', 8);
define('AFTER_SALES_STATUS_PLATFORM_REFUSE_REFUND', 9);
define('AFTER_SALES_STATUS_REFUND_SUCC', 10);
define('AFTER_SALES_STATUS_BUYER_REVOKE', 11);
define('AFTER_SALES_STATUS_EXPECTED_UNHANDLED', 12);
$GLOBALS['after_sales_status'] = array(
AFTER_SALES_STATUS_NO => '无售后',
AFTER_SALES_STATUS_BUYER_APPLIES_FOR_REFUND => '买家申请退款,待商家处理',
AFTER_SALES_STATUS_RETURN_REFUND => '退货退款,待商家处理',
AFTER_SALES_STATUS_SELLER_AGREE_REFUND => '商家同意退款,退款中',
AFTER_SALES_STATUS_PLATFORM_AGREE_REFUND => '平台同意退款,退款中',
AFTER_SALES_STATUS_REFUSE_REFUND => '驳回退款,待买家处理',
AFTER_SALES_STATUS_RETURN_REFUND_AGREE => '已同意退货退款,待用户发货',
AFTER_SALES_STATUS_PLATFORM_REFUSE_REFUND => '平台拒绝退款,退款关闭',
AFTER_SALES_STATUS_REFUND_SUCC => '退款成功',
AFTER_SALES_STATUS_BUYER_REVOKE => '买家撤销',
AFTER_SALES_STATUS_EXPECTED_UNHANDLED => '买家逾期未处理,退款失败',
13 => '买家逾期,超过有效期',
14 => '换货补寄待商家处理',
15 => '换货补寄待用户处理',
16 => '换货补寄成功',
17 => '换货补寄失败',
18 => '换货补寄待用户确认完成',
21 => '待商家同意维修',
22 => '待用户确认发货',
24 => '维修关闭',
25 => '维修成功',
27 => '待用户确认收货',
31 => '已同意拒收退款,待用户拒收',
32 => '补寄待商家发货',
);
# 同步历史订单
define('_RQ_SYNC_HISTORICAL_ORDERS', 'rq_sync_historical_orders');
define('_RQ_SYNC_INCREMENT_ORDERS', 'rq_sync_increment_orders');

201
control/index.php

@ -11,66 +11,93 @@ class index extends publicBase {
$shop_id = $shopinfo['id'];
$obj = new mOrder();
$date2count = $obj->getLastThirtyDaysOrderNum($uid, $shop_id);
$this->view['json_dates'] = json_encode(array_keys($date2count));
$this->view['json_counts'] = json_encode(array_values($date2count));
$this->view['wait_deliver_goods_count'] = $obj->getOrdersCount($uid, $shop_id, ORDER_STATUS_WAIT_DELIVER_GOODS, REFUND_STATUS_NO_AFTER_SALES);
$this->view['refund_count'] = $obj->getOrdersCount($uid, $shop_id, 0, REFUND_STATUS_SUCC);
$this->view['today_data'] = $obj->getTodayData($uid, $shop_id);
$this->view['total_data'] = $obj->getToalData($uid, $shop_id);
$this->view['menu_page'] = 'home';
}
public function order_list() {
$url = '/index/order_list';
public function ajax_get_charts_data() {
$shopinfo = $this->get_shopinfo();
$uid = $shopinfo['uid'];
$shop_id = $shopinfo['id'];
$order_status = $this->get('order_status')+0;
if ($order_status) $url .= '/order_status/'.$order_status;
$refund_status = $this->get('refund_status')+0;
if ($refund_status) $url .= '/refund_status/'.$refund_status;
$type = $this->post('type');
$day = $this->post('day');
$obj = new mOrder();
$count = $obj->getOrdersCount($uid, $shop_id, $order_status, $refund_status);
if ($type == 'sales_volume') {
$list = $obj->getSumData($uid, $shop_id, $day);
} elseif ($type == 'refund') {
$list = $obj->getRefundCountData($uid, $shop_id, $day);
}
// 分页
$page = new Page();
$page->setTotalnum($count);
$page->setUrl($url.'/page/');
$curpage = $this->get('page')>0 ? $this->get('page') : 1;
$page->setPage($curpage);
$pagesize = $page->pagesize = 50;
$this->view['page_list'] = $page->getPageList();
$this->view['curpage'] = $curpage;
$this->ajax_json(true, 'succ', $list);
}
if ($curpage > 1) $this->view['prev_page'] = $page->url . ($curpage - 1); //上一页连接
if ($curpage < $page->totalpage) $this->view['post_page'] = $page->url . ($curpage + 1); //下一页连接
public function order_list() {
$this->view['menu_page'] = 'order_list';
}
//只取出当前页显示
$list = $obj->getOrderList($uid, $shop_id, $order_status, $refund_status, $curpage, $pagesize);
public function ajax_get_order_list() {
$shopinfo = $this->get_shopinfo();
$this->view['list'] = $list ? $list : array();
$page = $this->get('page')+0;
$pagesize = $this->get('limit')+0;
$this->view['order_status'] = $GLOBALS['order_status'];
$this->view['refund_status'] = $GLOBALS['refund_status'];
if (empty($list)) return true;
$obj = new mOrder();
$list = $obj->getOrderList($shopinfo['uid'], $shopinfo['id'], 0, 0, $page, $pagesize);
if (empty($list)) $this->ajax_json(false, 'empty list');
$order_status2class = array(
ORDER_STATUS_WAIT_DELIVER_GOODS => 'list_status_grey01',
ORDER_STATUS_DELIVERED => 'list_status_grey01',
ORDER_STATUS_SIGNED_FOR => 'list_status_yellow01',
);
$refund_status2class = array(
REFUND_STATUS_NO_AFTER_SALES => 'list_status_grey01',
REFUND_STATUS_ING => 'list_status_red01',
REFUND_STATUS_AFTER_SALE_ING => 'list_status_yellow01',
REFUND_STATUS_SUCC => 'list_status_green01',
);
$nlist['data'] = $this->get_nlist($list, $order_status2class, $refund_status2class);
$nlist['total'] = $obj->getOrdersCount($shopinfo['uid'], $shopinfo['id'])+0;
$this->ajax_json(true, 'succ', $nlist);
}
$goods_ids = array_unique(array_column($list, 'goods_id'));
public function after_sale_list() {
$this->view['menu_page'] = 'after_sale_list';
}
$gobj = new mGoods();
$goods_list = $gobj->getGoodsByGoodsids($goods_ids);
if (empty($goods_list)) return true;
public function ajax_get_after_sale_order_list() {
$shopinfo = $this->get_shopinfo();
$goodsid2skuid2info = array();
foreach ($goods_list as $goods) {
$goodsid2skuid2info[$goods['goods_id']][$goods['sku_id']] = $goods;
}
$this->view['goodsid2skuid2info'] = $goodsid2skuid2info;
$page = $this->get('page')+0;
$pagesize = $this->get('limit')+0;
$obj = new mOrder();
$list = $obj->getOrderList($shopinfo['uid'], $shopinfo['id'], 0, REFUND_STATUS_AFTER_SALE_ING, $page, $pagesize);
if (empty($list)) $this->ajax_json(false, 'empty list');
$order_status2class = array(
ORDER_STATUS_WAIT_DELIVER_GOODS => 'list_status_grey01',
ORDER_STATUS_DELIVERED => 'list_status_red01',
ORDER_STATUS_SIGNED_FOR => 'list_status_yellow01',
);
$refund_status2class = array(
REFUND_STATUS_NO_AFTER_SALES => 'list_status_grey01',
REFUND_STATUS_ING => 'list_status_red01',
REFUND_STATUS_AFTER_SALE_ING => 'list_status_yellow01',
REFUND_STATUS_SUCC => 'list_status_green01',
);
$nlist['data'] = $this->get_nlist($list, $order_status2class, $refund_status2class);
$nlist['total'] = $obj->getOrdersCount($shopinfo['uid'], $shopinfo['id'], 0, REFUND_STATUS_AFTER_SALE_ING)+0;
$this->ajax_json(true, 'succ', $nlist);
}
public function export_wait_deliver_goods_tids() {
@ -111,4 +138,90 @@ class index extends publicBase {
}
public function wait_deliver_list() {
$this->view['menu_page'] = 'wait_deliver_list';
}
public function ajax_get_wait_deliver_list() {
$shopinfo = $this->get_shopinfo();
$page = $this->get('page')+0;
$pagesize = $this->get('limit')+0;
$obj = new mOrder();
$list = $obj->getWaitDeliverOrderList($shopinfo['uid'], $shopinfo['id'], $page, $pagesize);
if (empty($list)) $this->ajax_json(false, 'empty list');
$order_status2class = array(
ORDER_STATUS_WAIT_DELIVER_GOODS => 'list_status_grey01',
ORDER_STATUS_DELIVERED => 'list_status_red01',
ORDER_STATUS_SIGNED_FOR => 'list_status_yellow01',
);
$refund_status2class = array(
REFUND_STATUS_NO_AFTER_SALES => 'list_status_grey01',
REFUND_STATUS_ING => 'list_status_red01',
REFUND_STATUS_AFTER_SALE_ING => 'list_status_yellow01',
REFUND_STATUS_SUCC => 'list_status_green01',
);
$nlist['data'] = $this->get_nlist($list, $order_status2class, $refund_status2class);
$nlist['total'] = $obj->getOrdersCount($shopinfo['uid'], $shopinfo['id'], ORDER_STATUS_WAIT_DELIVER_GOODS, REFUND_STATUS_NO_AFTER_SALES)+0;
$this->ajax_json(true, 'succ', $nlist);
}
private function get_nlist($list, $order_status2class, $refund_status2class) {
$goods_ids = array_unique(array_column($list, 'goods_id'));
$gobj = new mGoods();
$goods_list = $gobj->getGoodsByGoodsids($goods_ids);
if (empty($goods_list)) return true;
$goodsid2skuid2info = array();
foreach ($goods_list as $goods) {
$goodsid2skuid2info[$goods['goods_id']][$goods['sku_id']] = $goods;
}
$nlist = array();
foreach ($list as $info) {
$ninfo = array();
$ninfo['order_sn'] = $info['order_sn'];
$ninfo['pay_time'] = $info['pay_time'];
$ninfo['pay_amount'] = $info['pay_amount'];
$ninfo['order_status_desc'] = $GLOBALS['order_status'][$info['order_status']];
$ninfo['refund_status_desc'] = $GLOBALS['refund_status'][$info['refund_status']];
$ninfo['after_sales_status_desc'] = $GLOBALS['after_sales_status'][$info['after_sales_status']];
$ninfo['goods_name'] = $goodsid2skuid2info[$info['goods_id']][$info['sku_id']]['goods_name'].' '.$goodsid2skuid2info[$info['goods_id']][$info['sku_id']]['sku_name'];
$ninfo['goods_id'] = $info['goods_id'];
$ninfo['sku_id'] = $info['sku_id'];
$ninfo['order_status_class'] = $order_status2class[$info['order_status']];
$ninfo['refund_status_class'] = $refund_status2class[$info['refund_status']];
$ninfo['urge_shipping_time'] = $info['urge_shipping_time'];
$ninfo['is_urge'] = $info['urge_shipping_time'] == '0000-00-00 00:00:00' ? false : true;
$ninfo['is_show_count_down'] = $is_show_count_down = strtotime($info['last_ship_time'])-time()>0 ? true : false;
if ($is_show_count_down) {
$count_down = $gobj->getHourMinuteSecondCountDown(date("Y-m-d H:i:s"), $info['last_ship_time']);
$count_down_str = $count_down ? $count_down['hour'].':'.$count_down['minute'].':'.$count_down['second'] : '';
}
$ninfo['count_down'] = $is_show_count_down ? $count_down_str : '';
$nlist[] = $ninfo;
}
return $nlist;
}
public function logout() {
unset($_SESSION['app_uid']);
unset($_SESSION['app_name']);
header('Location:/index');
exit();
}
}

6
data/dOrder.php

@ -11,12 +11,18 @@ class dOrder extends dBase {
'order_sn',
'order_status',
'refund_status',
'after_sales_status',
'pay_amount',
'pay_time',
'shop_id',
'goods_id',
'sku_id',
'goods_price',
'goods_count',
'uid',
'urge_shipping_time',
'last_ship_time',
'buyer_memo',
),
);

4
index.php

@ -77,6 +77,10 @@ class run extends publicBase {
}
$this->view['_shopinfo'] = $this->para['_shopinfo'] = $shopinfo;
$obj = new mOrder();
$this->view['_wait_deliver_count'] = $this->para['_wait_deliver_count'] = $obj->getOrdersCount($shopinfo['uid'], $shopinfo['id'], ORDER_STATUS_WAIT_DELIVER_GOODS, REFUND_STATUS_NO_AFTER_SALES)+0;
$this->view['_after_sale_count'] = $this->para['_after_sale_count'] = $obj->getOrdersCount($shopinfo['uid'], $shopinfo['id'], 0, REFUND_STATUS_AFTER_SALE_ING)+0;
}
private function action() {

39
model/mBase.php

@ -1423,4 +1423,43 @@ class mBase extends publicBase {
return shell_exec($cmd);
}
/**
* 获取周的开始日期和结束日期
* @param unknown $default_date
* @return string[]
*/
public function getWeekStartEndDate($default_date) {
//$first =1 表示每周星期一为开始日期 0表示每周日为开始日期
$first=1;
//获取当前周的第几天 周日是 0 周一到周六是 1 - 6
$w = date('w',strtotime($default_date));
//获取本周开始日期,如果$w是0,则表示周日,减去 6 天
$week_start = date('Y-m-d',strtotime("$default_date -".($w ? $w - $first : 6).' days'));
//本周结束日期
$week_end = date('Y-m-d',strtotime("$week_start +6 days"));
return array(
'start' => $week_start,
'end' => $week_end
);
}
/**
* 获取时分秒倒计时
* @param unknown $start_time
* @param unknown $end_time
* @return array|number[]|mixed[]
*/
public function getHourMinuteSecondCountDown($start_time, $end_time) {
$count_down = strtotime($end_time) - strtotime($start_time);
if ($count_down <= 0) return array();
$data = array();
$data['hour'] = $h = floor($count_down/3600);
$data['minute'] = $m = floor(($count_down - $h*3600)/60);
$data['second'] = $count_down - $h*3600 - $m*60;
return $data;
}
}

307
model/mOrder.php

@ -9,25 +9,72 @@ class mOrder extends mBase {
private $obj;
private $order;
// 订单编号
public $order_sn = '';
// 发货状态,枚举值:1:待发货,2:已发货待签收,3:已签收
public $order_status = 0;
// 退款状态,枚举值:1:无售后或售后关闭,2:售后处理中,3:退款中,4: 退款成功
public $refund_status = 0;
// 售后状态 0:无售后 2:买家申请退款,待商家处理 3:退货退款,待商家处理 4:商家同意退款,退款中 5:平台同意退款,退款中 6:驳回退款,待买家处理 7:已同意退货退款,待用户发货 8:平台处理中 9:平台拒绝退款,退款关闭 10:退款成功 11:买家撤销 12:买家逾期未处理,退款失败 13:买家逾期,超过有效期 14:换货补寄待商家处理 15:换货补寄待用户处理 16:换货补寄成功 17:换货补寄失败 18:换货补寄待用户确认完成 21:待商家同意维修 22:待用户确认发货 24:维修关闭 25:维修成功 27:待用户确认收货 31:已同意拒收退款,待用户拒收 32:补寄待商家发货
public $after_sales_status = 0;
// 支付金额(元)支付金额=商品金额-折扣金额+邮费+服务费
public $pay_amount = 0;
// 支付时间
public $pay_time = '';
// 商品编号
public $goods_id = '';
// 商品规格编码
public $sku_id = '';
// 商品销售价格
public $goods_price = 0;
// 商品数量
public $goods_count = 0;
// 催发货时间
public $urge_shipping_time = '';
// 订单承诺发货时间
public $last_ship_time = '';
// 买家留言信息
public $buyer_memo = '';
public function __construct() {
$this->obj = new dOrder();
$this->order = 'order_list';
}
public function addOrder($order_sn, $order_status, $refund_status, $pay_amount, $pay_time, $shop_id, $goods_id, $sku_id, $uid) {
public function addOrder($shop_id, $uid) {
$data = array();
$data['order_status'] = $order_status;
$data['refund_status'] = $refund_status;
$data['pay_amount'] = $pay_amount;
$data['pay_time'] = $pay_time;
$data['shop_id'] = $shop_id;
$data['goods_id'] = $goods_id;
$data['sku_id'] = $sku_id;
$data['uid'] = $uid;
$info = $this->getOrderBySn($order_sn);
$data['order_status'] = $this->order_status;
$data['refund_status'] = $this->refund_status;
$data['after_sales_status'] = $this->after_sales_status;
$data['pay_amount'] = $this->pay_amount;
$data['pay_time'] = $this->pay_time;
$data['goods_id'] = $this->goods_id;
$data['sku_id'] = $this->sku_id;
$data['goods_price'] = $this->goods_price;
$data['goods_count'] = $this->goods_count;
if ($this->urge_shipping_time) $data['urge_shipping_time'] = $this->urge_shipping_time;
if ($this->last_ship_time) $data['last_ship_time'] = $this->last_ship_time;
if ($this->buyer_memo) $data['$buyer_memo'] = $this->buyer_memo;
$info = $this->getOrderBySn($this->order_sn);
if ($info) {
$res = $this->updateOrderBySn($order_sn, $data);
$res = $this->updateOrderBySn($this->order_sn, $data);
if (!$res) {
$this->setError('更新订单信息失败');
return false;
@ -35,7 +82,7 @@ class mOrder extends mBase {
return $info['id'];
}
$data['order_sn'] = $order_sn;
$data['order_sn'] = $this->order_sn;
return $this->obj->insert($this->order, $data);
}
@ -48,7 +95,7 @@ class mOrder extends mBase {
return $this->obj->update($this->order, $data, array('sql'=>'`order_sn`=?', 'vals'=>array($order_sn)));
}
public function getOrdersCount($uid, $shop_id, $order_status=0, $refund_status=0) {
public function getOrdersCount($uid, $shop_id, $order_status=0, $refund_status=0, $after_sales_status=0, $pay_stime='', $pay_etime='', $urge_stime='', $urge_etime='', $last_ship_stime='', $last_ship_etime='') {
$where = array('sql'=>'1=1');
if ($uid) {
@ -71,6 +118,41 @@ class mOrder extends mBase {
$where['vals'][] = $refund_status;
}
if ($after_sales_status) {
$where['sql'] .= ' and `after_sales_status`=?';
$where['vals'][] = $after_sales_status;
}
if ($pay_stime) {
$where['sql'] .= ' and `pay_time`>=?';
$where['vals'][] = $pay_stime;
}
if ($pay_etime) {
$where['sql'] .= ' and `pay_time`<=?';
$where['vals'][] = $pay_etime;
}
if ($urge_stime) {
$where['sql'] .= ' and `urge_shipping_time`>=?';
$where['vals'][] = $urge_stime;
}
if ($urge_etime) {
$where['sql'] .= ' and `urge_shipping_time`<=?';
$where['vals'][] = $urge_etime;
}
if ($last_ship_stime) {
$where['sql'] .= ' and `last_ship_time`>=?';
$where['vals'][] = $last_ship_stime;
}
if ($last_ship_etime) {
$where['sql'] .= ' and `last_ship_time`<=?';
$where['vals'][] = $last_ship_etime;
}
return $this->obj->count($this->order, $where);
}
@ -101,32 +183,57 @@ class mOrder extends mBase {
return $this->obj->selectAll($this->order, $where, 'pay_time desc', array($start, $pagesize));
}
public function getWaitDeliverOrderList($uid, $shop_id, $page=1, $pagesize=100) {
$where = array(
'sql' => '`uid`=? and `shop_id`=? and `order_status`=? and `refund_status`=?',
'vals' => array($uid, $shop_id, ORDER_STATUS_WAIT_DELIVER_GOODS, REFUND_STATUS_NO_AFTER_SALES)
);
$start = ($page - 1) * $pagesize;
return $this->obj->selectAll($this->order, $where, 'urge_shipping_time desc', array($start, $pagesize));
}
public function getNotFinishedOrders() {
return $this->obj->selectAll($this->order, array('sql'=>'`order_status`!=? and `refund_status`!=?', 'vals'=>array(ORDER_STATUS_SIGNED_FOR, REFUND_STATUS_SUCC)));
}
public function getLastThirtyDaysOrderNum($uid, $shop_id) {
$start_date = date("Y-m-d", strtotime("-30 day"));
// public function getLastThirtyDaysOrderNum($uid, $shop_id) {
// $start_date = date("Y-m-d", strtotime("-30 day"));
$sql = "select DATE_FORMAT(`pay_time`,'%Y-%m-%d') sale_day, count(*) as count from {$this->order} where `uid`={$uid} and `shop_id`={$shop_id} and `pay_time`>='{$start_date}' group by sale_day order by sale_day asc";
$list = $this->obj->execute($sql, true, true);
if (!$list) return array();
// $sql = "select DATE_FORMAT(`pay_time`,'%Y-%m-%d') sale_day, count(*) as count from {$this->order} where `uid`={$uid} and `shop_id`={$shop_id} and `pay_time`>='{$start_date}' group by sale_day order by sale_day asc";
// $list = $this->obj->execute($sql, true, true);
// if (!$list) return array();
$date2count = array();
foreach ($list as $info) {
$date2count[$info['sale_day']] = $info['count'];
}
// $date2count = array();
// foreach ($list as $info) {
// $date2count[$info['sale_day']] = $info['count'];
// }
unset($list);
// unset($list);
return $date2count;
}
// return $date2count;
// }
public function addOrders($order_list, $shop_id, $uid) {
$goods_list = array();
foreach ($order_list as $order) {
$this->addOrder($order['order_sn'], $order['order_status'], $order['refund_status'], $order['pay_amount'], $order['pay_time'], $shop_id, $order['item_list'][0]['goods_id'], $order['item_list'][0]['sku_id'], $uid);
$this->writeLog('kuaileorder', 'orderinfo.log', json_encode($order));
$this->order_sn = $order['order_sn'];
$this->order_status = $order['order_status'];
$this->refund_status = $order['refund_status'];
$this->after_sales_status = $order['after_sales_status'];
$this->pay_amount = $order['pay_amount'];
$this->pay_time = $order['pay_time'];
$this->goods_id = $order['item_list'][0]['goods_id'];
$this->sku_id = $order['item_list'][0]['sku_id'];
$this->goods_price = $order['item_list'][0]['goods_price'];
$this->goods_count = $order['item_list'][0]['goods_count'];
$this->urge_shipping_time = $order['urge_shipping_time'];
$this->last_ship_time = $order['last_ship_time'];
$this->buyer_memo = $order['buyer_memo'];
$this->addOrder($shop_id, $uid);
$g = array();
$g['goods_id'] = $order['item_list'][0]['goods_id'];
@ -147,4 +254,156 @@ class mOrder extends mBase {
return true;
}
public function getTodayData($uid, $shop_id) {
$stime = date("Y-m-d").' 00:00:00';
$etime = date("Y-m-d").' 23:59:59';
$data = array();
// 催发订单
$data['urge_order_count'] = $this->getOrdersCount($uid, $shop_id, ORDER_STATUS_WAIT_DELIVER_GOODS, REFUND_STATUS_NO_AFTER_SALES, 0, '', '', $stime, $etime)+0;
// 倒计时订单(12h)
$data['countdown_order_count'] = $this->getOrdersCount($uid, $shop_id, ORDER_STATUS_WAIT_DELIVER_GOODS, REFUND_STATUS_NO_AFTER_SALES, 0, '', '', '', '', $stime, date("Y-m-d H:i:s", strtotime('-12 h')))+0;
// 待发货订单
$data['wait_deliver_goods_count'] = $this->getOrdersCount($uid, $shop_id, ORDER_STATUS_WAIT_DELIVER_GOODS, REFUND_STATUS_NO_AFTER_SALES, 0, $stime, $etime)+0;
// 平台介入中
$data['platform_processing_count'] = $this->getOrdersCount($uid, $shop_id, 0, 0, AFTER_SALES_STATUS_PLATFORM_PROCESSING, $stime, $etime)+0;
// 待售后订单
$data['wait_after_sale_count'] = $this->getOrdersCount($uid, $shop_id, 0, 0, AFTER_SALES_STATUS_BUYER_APPLIES_FOR_REFUND, $stime, $etime)+0;
return $data;
}
public function getToalData($uid, $shop_id) {
$data = array();
// 催发订单
$data['total_urge_order_count'] = $this->getOrdersCount($uid, $shop_id, ORDER_STATUS_WAIT_DELIVER_GOODS, REFUND_STATUS_NO_AFTER_SALES, 0, '', '', '2022-01-01')+0;
// 倒计时订单(12h)
$data['total_countdown_order_count'] = $this->getOrdersCount($uid, $shop_id, ORDER_STATUS_WAIT_DELIVER_GOODS, REFUND_STATUS_NO_AFTER_SALES, 0, '', '', '', '', '', '', date("Y-m-d H:i:s", strtotime('-12 h')))+0;
// 待发货订单
$data['total_wait_deliver_goods_count'] = $this->getOrdersCount($uid, $shop_id, ORDER_STATUS_WAIT_DELIVER_GOODS, REFUND_STATUS_NO_AFTER_SALES)+0;
// 平台介入中
$data['total_platform_processing_count'] = $this->getOrdersCount($uid, $shop_id, 0, 0, AFTER_SALES_STATUS_PLATFORM_PROCESSING)+0;
// 待售后订单
$data['total_wait_after_sale_count'] = $this->getOrdersCount($uid, $shop_id, 0, 0, AFTER_SALES_STATUS_BUYER_APPLIES_FOR_REFUND)+0;
return $data;
}
public function getSumData($uid, $shop_id, $day=7) {
$end_time = date("Y-m-d").' 23:59:59';
$dates = array();
if ($day == 7) {
$start_time = date("Y-m-d", strtotime('-6 day')).' 00:00:00';
for ($i=0;$i<7;$i++) {
$dates[] = date("Y-m-d", strtotime('-'.$i.' day'));
}
$sql = 'select IFNULL(sum(`pay_amount`), 0) as sumgroup,DATE_FORMAT(`pay_time`,"%Y-%m-%d") as dategroup from '.$this->order.' where `uid`='.$uid.' and `shop_id`='.$shop_id.' and `pay_time`>="'.$start_time.'" and `pay_time`<="'.$end_time.'" group by DATE_FORMAT(`pay_time`,"%Y-%m-%d")';
} elseif ($day == 30) {
$start_time = date("Y-m-d", strtotime('-29 day')).' 00:00:00';
for ($i=0;$i<29;$i++) {
$dates[] = date("Y-m-d", strtotime('-'.$i.' day'));
}
$sql = 'select sum(`pay_amount`) as sumgroup,DATE_FORMAT(`pay_time`,"%Y-%m-%d") as dategroup from '.$this->order.' where `uid`='.$uid.' and `shop_id`='.$shop_id.' and `pay_time`>="'.$start_time.'" and `pay_time`<="'.$end_time.'" group by DATE_FORMAT(`pay_time`,"%Y-%m-%d")';
} elseif ($day == 365) {
$start_time = date("Y-m-d", strtotime('-1 year')).' 00:00:00';
for ($i=0;$i<12;$i++) {
$dates[] = date("Y-m", strtotime('-'.$i.' month'));
}
$sql = 'select sum(`pay_amount`) as sumgroup,DATE_FORMAT(`pay_time`,"%Y-%m") as dategroup from '.$this->order.' where `uid`='.$uid.' and `shop_id`='.$shop_id.' and `pay_time`>="'.$start_time.'" and `pay_time`<="'.$end_time.'" group by DATE_FORMAT(`pay_time`,"%Y-%m")';
}
$res = $this->obj->execute($sql, true, true);
if (!$res) return array();
$date2sum = array();
foreach ($res as $info) {
$date2sum[$info['dategroup']] = $info['sumgroup'];
}
$dates = array_reverse($dates);
$data = array();
foreach ($dates as $date) {
$data[$date] = $date2sum[$date] ? $date2sum[$date] : 0;
}
unset($res);
unset($date2sum);
return $data;
}
public function getRefundCountData($uid, $shop_id, $day=7) {
$end_time = date("Y-m-d").' 23:59:59';
$dates = array();
if ($day == 7) {
$start_time = date("Y-m-d", strtotime('-6 day')).' 00:00:00';
for ($i=0;$i<7;$i++) {
$dates[] = date("Y-m-d", strtotime('-'.$i.' day'));
}
$sql = 'select count(*) as countgroup,DATE_FORMAT(`pay_time`,"%Y-%m-%d") as dategroup from '.$this->order.' where `uid`='.$uid.' and `shop_id`='.$shop_id.' and `refund_status` != '.REFUND_STATUS_NO_AFTER_SALES.' and `pay_time`>="'.$start_time.'" and `pay_time`<="'.$end_time.'" group by DATE_FORMAT(`pay_time`,"%Y-%m-%d")';
} elseif ($day == 30) {
$start_time = date("Y-m-d", strtotime('-29 day')).' 00:00:00';
for ($i=0;$i<29;$i++) {
$dates[] = date("Y-m-d", strtotime('-'.$i.' day'));
}
$sql = 'select count(*) as countgroup,DATE_FORMAT(`pay_time`,"%Y-%m-%d") as dategroup from '.$this->order.' where `uid`='.$uid.' and `shop_id`='.$shop_id.' and `refund_status` != '.REFUND_STATUS_NO_AFTER_SALES.' and `pay_time`>="'.$start_time.'" and `pay_time`<="'.$end_time.'" group by DATE_FORMAT(`pay_time`,"%Y-%m-%d")';
} elseif ($day == 365) {
$start_time = date("Y-m-d", strtotime('-1 year')).' 00:00:00';
for ($i=0;$i<12;$i++) {
$dates[] = date("Y-m", strtotime('-'.$i.' month'));
}
$sql = 'select count(*) as countgroup,DATE_FORMAT(`pay_time`,"%Y-%m") as dategroup from '.$this->order.' where `uid`='.$uid.' and `shop_id`='.$shop_id.' and `refund_status` != '.REFUND_STATUS_NO_AFTER_SALES.' and `pay_time`>="'.$start_time.'" and `pay_time`<="'.$end_time.'" group by DATE_FORMAT(`pay_time`,"%Y-%m")';
}
$res = $this->obj->execute($sql, true, true);
if (!$res) return array();
$date2count = array();
foreach ($res as $info) {
$date2count[$info['dategroup']] = $info['countgroup'];
}
$dates = array_reverse($dates);
$data = array();
foreach ($dates as $date) {
$data[$date] = $date2count[$date] ? $date2count[$date] : 0;
}
unset($res);
unset($date2count);
return $data;
}
}

118
view/css/admin_style.css

@ -264,7 +264,7 @@ body{
padding-left: 22px;
padding-right: 6px;
}
.admin-index-top-item-list-item-child-dot-red2{
.admin-index-top-item-list-item-child-dot-red2,.admin-index-top-item-list-item-child-dot-grey2{
margin-right: 5px;
}
.admin-index-top-item-list-item-child-dot-red2::after{
@ -277,6 +277,16 @@ body{
position: relative;
top: -2px;
}
.admin-index-top-item-list-item-child-dot-grey2::after{
content: '';
display: inline-block;
width: 6px;
height: 6px;
background: #69717D;
border-radius: 50%;
position: relative;
top: -2px;
}
.admin-card-text-3 span,.admin-card-text-4 span{
font-size: 11px;
margin-left: 5px;
@ -309,7 +319,7 @@ body{
}
@media screen and (min-width:1270px) and (max-width:1440px){
.admin-layui-col-top-right{
min-width: 788px;
min-width: 702px;
}
.admin-layui-col-top-left{
min-width: 259px;
@ -342,13 +352,13 @@ body{
.admin-layui-body{
padding: 12px 12px 12px 0px;
}
.admin-layui-col-bottom-list{
/* .admin-layui-col-bottom-list{
min-width: 208px;
}
.admin-layui-col-bottom-list-last{
padding-right: 0px !important;
min-width: 207px !important;
}
} */
}
@media screen and (min-width:1200px) and (max-width:1260px){
.admin-layui-col-top-right{
@ -385,13 +395,13 @@ body{
.admin-layui-body{
padding: 12px 12px 12px 0px;
}
.admin-layui-col-bottom-list{
/* .admin-layui-col-bottom-list{
min-width: 208px;
}
.admin-layui-col-bottom-list-last{
padding-right: 0px !important;
min-width: 207px !important;
}
} */
}
.admin-index-top-item-header{
width: 100%;
@ -513,7 +523,7 @@ body{
line-height: 52px;
}
.admin-table-body{
border-radius: 8px 8px 0px 0px;
border-radius: 8px;
}
.admin-table-list-header div:first-child span{
font-size: 12px;
@ -563,6 +573,9 @@ body{
.deliver_remind_list_table_class .layui-table-main tr:hover > td:nth-child(-n+2){
color:#1890FF !important;
}
.deliver_remind_list_table_class .layui-table-main tr:hover > td:nth-child(-n+2) a{
color:#1890FF !important;
}
.count_down_wait{
color: #F21019;
position: relative;
@ -622,6 +635,15 @@ body{
line-height: 32px !important;
font-size: 14px !important;
}
.admin-container-outer .layui-table-pageview a.layui-laypage-next,.admin-container-outer .layui-table-pageview a.layui-laypage-prev{
max-width: 34px !important;
width: 32px;
height: 32px !important;
min-width: 0px !important;
box-sizing: border-box;
position: relative;
padding: 0px !important;
}
.admin-container-outer .layui-table-pageview a{
display: inline-block;
min-width: 8px !important;
@ -638,10 +660,8 @@ body{
text-align: center;
padding: 0px 12px !important;
}
.admin-container-outer .layui-laypage-prev .layui-icon{
position: absolute;
left: 8px;
top: 1px;
.admin-container-outer .layui-table-pageview a:hover{
border: 1px solid #1890FF !important;
}
.admin-container-outer .layui-laypage-limits{
width: 82px !important;
@ -729,7 +749,7 @@ body{
margin:0 auto;
}
.admin-menuleft-footer div{
width: 100%;
width: 200px;
font-size: 12px;
text-align: center;
}
@ -774,8 +794,80 @@ body{
color: rgba(255, 255, 255, 1);
font-size: 12px;
font-family: DINAlternate-Bold;
text-align: left;
text-align: center;
white-space: nowrap;
position: relative;
top: -1px;
}
.admin-container-outer .layui-nav .layui-nav-item a{
padding: 0px 37px !important;
}
.admin-container-outer .admin-layui-nav-tree{
margin-top: 9px !important;
}
.layui-col-lg2dot4,.layui-col-md2dot4,.layui-col-sm2dot4,.layui-col-xs2dot4{position:relative;display:block;box-sizing:border-box}
.layui-col-xs2dot4{float:left}
.layui-col-xs2dot4{width:19.9999992%}
.layui-col-xs-offset2dot4{margin-left:19.9999992%}
@media screen and (min-width:768px){
.layui-col-sm2dot4{float:left}
.layui-col-sm2dot4{width:19.9999992%}
.layui-col-sm-offset2dot4{margin-left:19.9999992%}
}
@media screen and (min-width:992px){
.layui-col-md2dot4{float:left}
.layui-col-md2dot4{width:19.9999992%}
.layui-col-md-offset2dot4{margin-left:19.9999992%}
}
@media screen and (min-width:1200px){
.layui-col-lg2dot4{float:left}
.layui-col-lg2dot4{width:19.9999992%}
.layui-col-lg-offset2dot4{margin-left:19.9999992%}
}
.deliver_remind_list_table_class{
display: none;
}
.admin-blank-table{
width:100%;
box-sizing: border-box;
min-height: 366px;
overflow: hidden;
display: none;
}
.admin-blank-table img{
width: 223px;
height: 214px;
display: block;
margin: 43px auto 0px;
}
.admin-container-outer .layui-table-body{
overflow-x: hidden;
}
.admin-blank-table p{
width: 100%;
height: 18px;
font-size: 13px;
font-family: PingFangSC-Regular;
font-weight: 500;
color: #636C78;
line-height: 18px;
text-align: center;
position: relative;
top: -8.5px;
}
@media screen and (max-width:500px){
.admin-index-top-item-header-left li{
margin-right: 20px;
}
}
@media screen and (max-width:372px){
.admin-index-top-item-header-left li{
margin-right: 5px;
font-size: 13px;
}
.admin-index-top-item-header-right li{
margin-left: 5px;
}
}

BIN
view/images/blank_table.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

2
view/js/layui.js

File diff suppressed because one or more lines are too long

11810
view/js/layui_build.js

File diff suppressed because it is too large

8
view/templates/include/admin_header.html

@ -1,4 +1,4 @@
<div class="layui-header admin-layui-header layui-anim layui-anim-up">
<div class="layui-header admin-layui-header">
<div class="layui-logo layui-hide-xs layui-bg-black" style="box-shadow: unset !important;background-color: #1890FF !important;width: 105px;margin-left: 31px;">
<img src="/images/admin_logo.svg" alt="" style="width: 105px;vertical-align: middle;">
</div>
@ -6,7 +6,7 @@
<ul class="layui-nav layui-layout-left">
<!-- 移动端显示 -->
<li class="layui-nav-item layui-show-xs-inline-block layui-hide-sm" lay-header-event="menuLeft">
<i class="layui-icon layui-icon-spread-left"></i>
<i id="leftEnumIcon" class="layui-icon layui-icon-spread-left"></i>
</li>
<!-- <li class="layui-nav-item layui-hide-xs"><a href="">nav 1</a></li>
@ -27,7 +27,7 @@
<li class="layui-nav-item layui-hide layui-show-md-inline-block">
<a href="javascript:;" style="color:#ffffff !important;" class="admin-header-user-info">
<img src="/images/header_user_logo.png" class="layui-nav-img admin-layui-nav-img">
ID:88900006543
{$_shopinfo.name}
</a>
<!-- <dl class="layui-nav-child">
@ -38,7 +38,7 @@
</li>
<li class="layui-nav-item layui-hide layui-show-md-inline-block" style="margin-left: 39px !important;">
<a href="javascript:;" style="color:rgba(255,255,255,0.8) !important;padding: 0px !important;margin-left: 0px !important;">
<a href="/index/logout" style="color:rgba(255,255,255,0.8) !important;padding: 0px !important;margin-left: 0px !important;">
<img src="/images/logout.svg" class="layui-nav-img admin_logout_img">
退出
</a>

28
view/templates/include/admin_leftmenu.html

@ -1,4 +1,4 @@
<div class="layui-side layui-bg-black admin-menu-list layui-anim layui-anim-up" style="background-color: #FFFFFF !important;color:#000000 !important;">
<div id="L_demoNav" class="layui-side layui-bg-black admin-menu-list" style="background-color: #FFFFFF !important;color:#000000 !important;">
<div class="layui-side-scroll admin-menu-layui-side-scroll">
<ul class="layui-nav layui-nav-tree admin-layui-nav-tree" lay-filter="test" lay-bar="disabled">
<li class="layui-nav-item layui-nav-itemed layui-menu-item-down">
@ -7,7 +7,7 @@
</a>
<dl class="layui-nav-child admin-layui-nav-child">
<dd class="{if $menu_page == 'home' || !$menu_page}layui-this{/if}">
<a href="{if $menu_page != 'home' || !$menu_page}/tpl{else}javascript:;{/if}" class="admin-layui-nav-item-a admin-layui-nav-item-a-child">
<a href="{if $menu_page != 'home' || !$menu_page}/{else}javascript:;{/if}" class="admin-layui-nav-item-a admin-layui-nav-item-a-child">
<span class="icon-2 admin-no-select menu-left-icon-img menu-left-icon-img-15"></span>
<span class="icon-3 admin-select menu-left-icon-img menu-left-icon-img-15"></span>
首页
@ -25,28 +25,32 @@
<span>常用功能</span>
</a>
<dl class="layui-nav-child admin-layui-nav-child">
<dd class="{if $menu_page == 'deliver_remind'}layui-this{/if}">
<a href="{if $menu_page != 'deliver_remind'}/tpl/deliver_remind{else}javascript:;{/if}" class="admin-layui-nav-item-a admin-layui-nav-item-a-child">
<dd class="{if $menu_page == 'wait_deliver_list'}layui-this{/if}">
<a href="{if $menu_page != 'wait_deliver_list'}/index/wait_deliver_list{else}javascript:;{/if}" class="admin-layui-nav-item-a admin-layui-nav-item-a-child">
<span class="icon-uniE90A admin-no-select menu-left-icon-img menu-left-icon-img-15"></span>
<span class="icon-1 admin-select menu-left-icon-img menu-left-icon-img-15"></span>
发货提醒
{if $_wait_deliver_count>0}
<div class="admin-tip-order-nums" >
<span>99+</span>
<span>{if $_wait_deliver_count > 99}99+{else}{$_wait_deliver_count}{/if}</span>
</div>
{/if}
</a>
</dd>
<dd class="{if $menu_page == 'sale_monitor'}layui-this{/if}">
<a href="{if $menu_page == 'sale_monitor'}javascript:;{else}/tpl/sale_monitor{/if}" class="admin-layui-nav-item-a admin-layui-nav-item-a-child">
<dd class="{if $menu_page == 'after_sale_list'}layui-this{/if}">
<a href="{if $menu_page == 'after_sale_list'}javascript:;{else}/index/after_sale_list{/if}" class="admin-layui-nav-item-a admin-layui-nav-item-a-child">
<span class="icon--6 admin-no-select menu-left-icon-img menu-left-icon-img-16"></span>
<span class="icon--6-2 admin-select menu-left-icon-img menu-left-icon-img-16"></span>
售后监控
{if $_after_sale_count>0}
<div class="admin-tip-order-nums" >
<span>99+</span>
<span>{if $_after_sale_count > 99}99+{else}{$_after_sale_count}{/if}</span>
</div>
{/if}
</a>
</dd>
<dd class="{if $menu_page == 'order_list'}layui-this{/if}">
<a href="{if $menu_page == 'order_list'}javascript:;{else}/tpl/order_list{/if}" class="admin-layui-nav-item-a admin-layui-nav-item-a-child">
<a href="{if $menu_page == 'order_list'}javascript:;{else}/index/order_list{/if}" class="admin-layui-nav-item-a admin-layui-nav-item-a-child">
<span class="icon-dingd admin-no-select menu-left-icon-img"></span>
<span class="icon-dingd1 admin-select menu-left-icon-img"></span>
订单列表
@ -57,9 +61,9 @@
</ul>
<div class="admin-menuleft-footer">
<img src="/images/menuleft_bottom_line.png" alt="">
<div>快乐分销v3.0</div>
<div>© Inc.All rights res erved.</div>
<div>鲁ICP备14002313号-1</div>
<div>{$smarty.const.APPNAME}</div>
<div>© Inc.All rights reserved.</div>
<a href="https://beian.miit.gov.cn" target="_blank" style="color: #3D7FFF"><div>{$smarty.const.BEIAN}</div></a>
</div>
</div>
</div>

180
view/templates/index/after_sale_list.html

@ -0,0 +1,180 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<link href="/images/pdd_icon.png" rel="icon">
<title>售后监控</title>
<link rel="stylesheet" href="/css/layui.css"/>
<link rel="stylesheet" href="/css/admin_style.css"/>
<link rel="stylesheet" href="/css/common.css"/>
<script type="text/javascript" src="/js/jquery-1.8.1.min.js"></script>
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
{literal}
<style>
</style>
{/literal}
</head>
<body>
<div class="layui-layout layui-layout-admin admin-container-outer deliver_remind_table">
{include file="include/admin_header.html"}
{include file="include/admin_leftmenu.html"}
<div class="layui-body admin-layui-body layui-anim layui-anim-fadein">
<div class="layui-row">
<div class="layui-col-lg12 deliver-remind-body-right admin-table-body">
<div class="admin-table-list-header">
<div><span>售后监控/</span></div>
<div><span>售后列表</span></div>
<!-- <div><span>导出列表</span></div> -->
</div>
<table class="layui-hide" id="deliver_remind_list" lay-filter="deliver-remind-table"></table>
<div class="admin-blank-table">
<img src="/images/blank_table.png" alt="">
<p>暂无数据</p>
</div>
</div>
</div>
</div>
</div>
<script src="/js/layui.js"></script>
<script src="/js/clipboard.min.js"></script>
{literal}
<script>
layui.use(['element', 'layer', 'util', 'table'], function(){
var element = layui.element
,layer = layui.layer
,util = layui.util
,table = layui.table
,$ = layui.$;
util.event('lay-header-event', {
menuLeft: function(othis){
var btn = $("#leftEnumIcon");
if (btn.hasClass('layui-icon-spread-left')) {
menuShow(btn);
} else if (btn.has('layui-icon-shrink-right')) {
menuHide(btn);
}
function menuShow(btn) {
btn.removeClass('layui-icon-spread-left').addClass('layui-icon-shrink-right');
$('.layui-layout-admin').find('.layui-side').animate({left: '0'});
btn.parent().next().css('opacity', 1);
}
function menuHide(btn) {
btn.removeClass('layui-icon-shrink-right').addClass('layui-icon-spread-left');
$('.layui-layout-admin').find('.layui-side').animate({left: '-300'});
btn.parent().next().css('opacity', 0);
}
}
,menuRight: function(){
layer.open({
type: 1
,title: '更多'
,content: '<div style="padding: 15px;">处理右侧面板的操作</div>'
,area: ['260px', '100%']
,offset: 'rt'
,anim: 5
,shadeClose: true
,scrollbar: false
});
}
});
var showTips = null;
table.render({
elem: '#deliver_remind_list'
,url:'/index/ajax_get_after_sale_order_list'
,toolbar: false
,title: '用户数据表'
,totalRow: false
,limit:20
,className:'deliver_remind_list_table_class'
,cols: [[
{field:'goods_name', title:'商品名称',
templet: function(d){
return '<a href="https://mobile.yangkeduo.com/goods.html?goods_id='+d.goods_id+'&sku_id='+d.sku_id+'" target="_blank">'+d.goods_name+'</a>';
}}
,{field:'tid', title:'订单号'
,templet: function(d){
return '<span data-clipboard-text="'+d.order_sn+'" title="点击复制" class="admin-table-td-outter admin-table-td-outter-'+d.order_sn+'">'+d.order_sn+'&nbsp;<span class="icon-uniE90E admin-table-td-outter-font admin-table-td-outter-font-'+d.order_sn+'"></span></span>';
}}
,{field:'pay_time', title:'支付时间'
,templet: function(d){
return '<span>'+d.pay_time+'</span>';
}}
,{field:'pay_amount', title:'支付金额(元)'}
,{field:'order_status', title:'订单状态'
,templet: function(d){
return '<span class="'+d.order_status_class+'">'+d.order_status_desc+'</span>';
}}
,{field:'refund_status_desc', title:'退款状态'
,templet: function(d){
return '<span class="'+d.refund_status_class+'">'+d.refund_status_desc+'</span>';
}}
,{field:'after_sales_status_desc', title:'售后状态'
,templet: function(d){
return '<span class="list_status_yellow01">'+d.after_sales_status_desc+'</span>';
}}
,{field:'option', title:'操作'
,templet: function(d){
return '<a href="https://mms.pinduoduo.com/aftersales/aftersale_list" target="_blank"><span style="color:rgba(61, 127, 255, 1);font-size: 14px;cursor: pointer;">去处理</span></a>';
}}
]]
,page: true
,response: {
statusCode: 200 //重新规定成功的状态码为 200,table 组件默认为 0
}
,parseData: function(res){ //将原始数据解析成 table 组件所规定的数据
return {
"code": 200, //解析接口状态
"msg": res.info, //解析提示文本
"count": res.data.total, //解析数据长度
"data": res.data.data //解析数据列表
};
},
done: function(res, curr, count){
var data = res.data;
var data = res.data;
try {
if(data == undefined || data.length<=0){
$('.deliver_remind_list_table_class').hide();
$('.admin-blank-table').show();
}else{
$('.deliver_remind_list_table_class').show();
$('.admin-blank-table').hide();
}
} catch (error) {
$('.deliver_remind_list_table_class').hide();
$('.admin-blank-table').show();
}
for(var i=0; i<data.length; i++){
var tid = data[i].order_sn;
var clipboard = new ClipboardJS('.admin-table-td-outter-'+tid);
clipboard.on('success', function(e) {
layer.msg('复制成功', {time:1500});
if(i < (data.length-2)){
clipboard.destroy();
e.clearSelection();
}
});
}
}
});
});
</script>
{/literal}
</body>
</html>

694
view/templates/index/home.html

@ -1,420 +1,334 @@
<!DOCTYPE html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7" lang="zh_CN"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8" lang="zh_CN"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9" lang="zh_CN"> <![endif]-->
<!--[if gt IE 8]><!-->
<html class="no-js" lang="zh-CN">
<!--<![endif]-->
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>订单统计</title>
<meta name="viewport" content="width=device-width,initial-scale=1">
<script type="text/javascript" src="/js/jquery-1.8.1.min.js"></script>
<link href="/css/global.css" media="screen" rel="stylesheet" type="text/css">
{literal}
<!--[if lt IE 9]>
<script type="text/javascript">
// iepp v2.1pre @jon_neal & @aFarkas github.com/aFarkas/iepp
// html5shiv @rem remysharp.com/html5-enabling-script
// Dual licensed under the MIT or GPL Version 2 licenses
/*@cc_on(function(a,b){function r(a){var b=-1;while(++b<f)a.createElement(e[b])}if(!window.attachEvent||!b.createStyleSheet||!function(){var a=document.createElement("div");return a.innerHTML="<elem></elem>",a.childNodes.length!==1}())return;a.iepp=a.iepp||{};var c=a.iepp,d=c.html5elements||"abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|subline|summary|time|video",e=d.split("|"),f=e.length,g=new RegExp("(^|\\s)("+d+")","gi"),h=new RegExp("<(/*)("+d+")","gi"),i=/^\s*[\{\}]\s*$/,j=new RegExp("(^|[^\\n]*?\\s)("+d+")([^\\n]*)({[\\n\\w\\W]*?})","gi"),k=b.createDocumentFragment(),l=b.documentElement,m=b.getElementsByTagName("script")[0].parentNode,n=b.createElement("body"),o=b.createElement("style"),p=/print|all/,q;c.getCSS=function(a,b){try{if(a+""===undefined)return""}catch(d){return""}var e=-1,f=a.length,g,h=[];while(++e<f){g=a[e];if(g.disabled)continue;b=g.media||b,p.test(b)&&h.push(c.getCSS(g.imports,b),g.cssText),b="all"}return h.join("")},c.parseCSS=function(a){var b=[],c;while((c=j.exec(a))!=null)b.push(((i.exec(c[1])?"\n":c[1])+c[2]+c[3]).replace(g,"$1.iepp-$2")+c[4]);return b.join("\n")},c.writeHTML=function(){var a=-1;q=q||b.body;while(++a<f){var c=b.getElementsByTagName(e[a]),d=c.length,g=-1;while(++g<d)c[g].className.indexOf("iepp-")<0&&(c[g].className+=" iepp-"+e[a])}k.appendChild(q),l.appendChild(n),n.className=q.className,n.id=q.id,n.innerHTML=q.innerHTML.replace(h,"<$1font")},c._beforePrint=function(){if(c.disablePP)return;o.styleSheet.cssText=c.parseCSS(c.getCSS(b.styleSheets,"all")),c.writeHTML()},c.restoreHTML=function(){if(c.disablePP)return;n.swapNode(q)},c._afterPrint=function(){c.restoreHTML(),o.styleSheet.cssText=""},r(b),r(k);if(c.disablePP)return;m.insertBefore(o,m.firstChild),o.media="print",o.className="iepp-printshim",a.attachEvent("onbeforeprint",c._beforePrint),a.attachEvent("onafterprint",c._afterPrint)})(this,document)@*/
</script>
<![endif]-->
<style>
.header {
display: flex;
flex-direction: column;
}
.title-left {
opacity: 0.8;
font-size: 14pt;
font-weight: bold;
}
.contents {
display: flex;
/* justify-content: space-between; */
justify-content: space-evenly;
margin: 30px 0px;
width:80%;
}
.content-item {
margin: 20px 60px 20px 60px;
}
.item-top {
font-size: 12pt;
opacity: 0.8;
}
.item-bottom {
opacity: 0.9;
font-size: 18pt;
font-weight: bold;
line-height: 40px;
}
</style>
{/literal}
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<link href="/images/pdd_icon.png" rel="icon">
<title>首页</title>
<link rel="stylesheet" href="/css/layui.css"/>
<link rel="stylesheet" href="/css/admin_style.css"/>
<link rel="stylesheet" href="/css/common.css"/>
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
{literal}
<style>
</style>
{/literal}
</head>
<body>
<!-- Topbar
================================================== -->
{include file="include/header.html"}
<!-- Page
================================================== -->
<div class="layui-layout layui-layout-admin admin-container-outer">
{include file="include/admin_header.html"}
{include file="include/admin_leftmenu.html"}
<div class="layui-body admin-layui-body layui-anim layui-anim-fadein">
<div class="layui-row layui-col-space12">
<div class="layui-col-lg4 admin-layui-col-top-left">
<div class="admin-index-top-item">
<div class="admin-index-top-item-title">今日动态</div>
<div class="admin-index-top-item-title-line"></div>
<div class="admin-index-top-item-list-title">发货动态</div>
<img class="admin-dashed-line" src="/images/admin_index_dashed_line.png">
<div class="admin-index-top-item-list-item">
<div class="admin-index-top-item-list-item-child">
<div class="fl"><i class="admin-index-top-item-list-item-child-dot-{if $today_data.urge_order_count}red{else}grey{/if} admin-index-top-item-list-item-child-dot1"></i> <span class="icon-- admin-index-top-item-list-item-child-icon1"></span>催发订单:</div>
<div class="fr">{$today_data.urge_order_count}</div>
<div class="clear"></div>
</div>
<img class="admin-dashed-line" src="/images/admin_index_dashed_line.png">
<div class="admin-index-top-item-list-item-child">
<div class="fl"><i class="admin-index-top-item-list-item-child-dot-{if $today_data.countdown_order_count}red{else}grey{/if}"></i><span class="icon-uniE900 admin-index-top-item-list-item-child-icon2"></span>倒计时订单:</div>
<div class="fr">{$today_data.countdown_order_count}</div>
<div class="clear"></div>
</div>
<img class="admin-dashed-line" src="/images/admin_index_dashed_line.png">
<div id="page">
<div class="container">
<aside id="sidebar" class="sidebar">
<div id="filter" class="filter module">
</div>
<div id="search" class="domain-search module">
{include file="include/leftmenu.html"}
</div>
</aside>
<div class="admin-index-top-item-list-item-child">
<div class="fl"><i class="admin-index-top-item-list-item-child-dot-{if $today_data.wait_deliver_goods_count}red{else}grey{/if}"></i><span class="icon--1 admin-index-top-item-list-item-child-icon3"></span>待发货订单:</div>
<div class="fr">{$today_data.wait_deliver_goods_count}</div>
<div class="clear"></div>
</div>
<img class="admin-dashed-line" src="/images/admin_index_dashed_line.png">
</div>
<div class="admin-index-top-item-list-title">售后动态</div>
<img class="admin-dashed-line" src="/images/admin_index_dashed_line.png">
<div class="admin-index-top-item-list-item">
<div class="admin-index-top-item-list-item-child">
<div class="fl"><i class="admin-index-top-item-list-item-child-dot-{if $today_data.platform_processing_count}red{else}grey{/if}"></i><span class="icon-uniE9001 admin-index-top-item-list-item-child-icon4"></span>平台介入中:</div>
<div class="fr">{$today_data.platform_processing_count}</div>
<div class="clear"></div>
</div>
<img class="admin-dashed-line" src="/images/admin_index_dashed_line.png">
<section id="main">
<div class="alert-message block-message info" id="tempalte-tips">
<div class="row" style="text-align:center">首次使用该软件,同步历史订单可能需要一段时间,请耐心等待</div>
<div class="row" style="text-align:center">待发货订单数:<span style="color:red">{$wait_deliver_goods_count}</span></div>
<div class="row" style="text-align:center">退款订单数:<span style="color:red">{$refund_count}</span></div>
<div class="admin-index-top-item-list-item-child">
<div class="fl"><i class="admin-index-top-item-list-item-child-dot-{if $today_data.wait_after_sale_count}red{else}grey{/if}"></i><span class="icon-11 admin-index-top-item-list-item-child-icon4"></span>待售后订单:</div>
<div class="fr">{$today_data.wait_after_sale_count}</div>
<div class="clear"></div>
</div>
<div id="main-content">
<img class="admin-dashed-line" src="/images/admin_index_dashed_line.png">
</div>
<div class="modal-body">
<div id="container" style="height: 400px"></div>
</div>
</div>
</div>
</section>
<!--end of main section-->
</div>
<div class="layui-col-lg8 admin-layui-col-top-right">
<div class="admin-index-top-item">
<div class="admin-index-top-item-header">
<ul class="admin-index-top-item-header-left">
<li class="active" onclick="getChartsData3('sales_volume', '365', this);">销售额</li>
<li onclick="getChartsData3('refund', '365', this);">退款订单数</li>
</ul>
<input id="hidden_params" type="hidden" flag="sales_volume">
<ul class="admin-index-top-item-header-right">
<li onclick="getChartsData2(7, this);">7天</li>
<li onclick="getChartsData2(30, this);">30天</li>
<li class="active" onclick="getChartsData2(365, this);">全年</li>
</ul>
</div>
<div class="admin-index-top-item-header-line"></div>
<div id="admin-map-container"></div>
</div>
</div>
</div>
<!--end of container-->
<div class="layui-row layui-col-space20 bottom-layui-row">
<div class="layui-col-lg2dot4 admin-layui-col-bottom-list">
<div class="admin-index-bottom-item">
<div class="admin-card-text-1"><a href="/index/wait_deliver_list">催发货订单(总)&nbsp;&nbsp;<span class="icon-1-2 admin-right-arrow"></span></a></div>
<div class="admin-card-text-2">{$total_data.total_urge_order_count}<span>&nbsp;</span></div>
<!-- <div class="admin-card-text-3">日增长:+0.61%<span class="icon--2"></span></div>
<div class="admin-card-text-4">周减少:-0.61%<span class="icon-21"></span></div> -->
<div class="admin-card-text-3">&nbsp;</div>
<div class="admin-card-text-4">&nbsp;</div>
<div class="admin-card-text-5 {if $total_data.total_urge_order_count==0}primary-msg{/if}"><i class="admin-index-top-item-list-item-child-dot-{if $total_data.total_urge_order_count}red2{else}grey2{/if}"></i>这些顾客在催促发货咯</div>
</div>
</div>
<div class="layui-col-lg2dot4 admin-layui-col-bottom-list">
<div class="admin-index-bottom-item">
<div class="admin-card-text-1"><a href="/index/wait_deliver_list">倒计时订单(总)&nbsp;&nbsp;<span class="icon-1-2 admin-right-arrow"></span></a></div>
<div class="admin-card-text-2">{$total_data.total_countdown_order_count}<span>&nbsp;</span></div>
<!-- <div class="admin-card-text-3">日增长:+0.61%<span class="icon--2"></span></div>
<div class="admin-card-text-4">周减少:-0.61%<span class="icon-21"></span></div> -->
<div class="admin-card-text-3">&nbsp;</div>
<div class="admin-card-text-4">&nbsp;</div>
<div class="admin-card-text-5 {if $total_data.total_countdown_order_count==0}primary-msg{/if}"><i class="admin-index-top-item-list-item-child-dot-{if $total_data.total_countdown_order_count}red2{else}grey2{/if}"></i>这些订单还有12h超时!</div>
</div>
</div>
<div class="layui-col-lg2dot4 admin-layui-col-bottom-list">
<div class="admin-index-bottom-item">
<div class="admin-card-text-1"><a href="/index/wait_deliver_list">待发货订单(总)&nbsp;&nbsp;<span class="icon-1-2 admin-right-arrow"></span></a></div>
<div class="admin-card-text-2">{$total_data.total_wait_deliver_goods_count}<span>&nbsp;</span></div>
<!-- <div class="admin-card-text-3">日增长:+0.61%<span class="icon--2"></span></div>
<div class="admin-card-text-4">周减少:-0.61%<span class="icon-21"></span></div> -->
<div class="admin-card-text-3">&nbsp;</div>
<div class="admin-card-text-4">&nbsp;</div>
<div class="admin-card-text-5 {if $total_data.total_wait_deliver_goods_count==0}primary-msg{/if}"><i class="admin-index-top-item-list-item-child-dot-{if $total_data.total_wait_deliver_goods_count}red2{else}grey2{/if}"></i>有新增的订单啦</div>
</div>
</div>
<div class="layui-col-lg2dot4 admin-layui-col-bottom-list">
<div class="admin-index-bottom-item">
<div class="admin-card-text-1"><a href="/index/after_sale_list">平台介入中订单(总)&nbsp;&nbsp;<span class="icon-1-2 admin-right-arrow"></span></a></div>
<div class="admin-card-text-2">{$total_data.total_platform_processing_count}<span>&nbsp;</span></div>
<!-- <div class="admin-card-text-3">日增长:+0.61%<span class="icon--2"></span></div>
<div class="admin-card-text-4">周减少:-0.61%<span class="icon-21"></span></div> -->
<div class="admin-card-text-3">&nbsp;</div>
<div class="admin-card-text-4">&nbsp;</div>
<div class="admin-card-text-5 {if $total_data.total_platform_processing_count==0}primary-msg{/if}"><i class="admin-index-top-item-list-item-child-dot-{if $total_data.total_platform_processing_count}red2{else}grey2{/if}"></i>这些订单官方客服已介入</div>
</div>
</div>
<div class="layui-col-lg2dot4 admin-layui-col-bottom-list admin-layui-col-bottom-list-last">
<div class="admin-index-bottom-item">
<div class="admin-card-text-1"><a href="/index/after_sale_list">待售后订单(总)&nbsp;&nbsp;<span class="icon-1-2 admin-right-arrow"></span></a></div>
<div class="admin-card-text-2">{$total_data.total_wait_after_sale_count}<span>&nbsp;</span></div>
<!-- <div class="admin-card-text-3">日增长:+0.61%<span class="icon--2"></span></div>
<div class="admin-card-text-4">周减少:-0.61%<span class="icon-21"></span></div> -->
<div class="admin-card-text-3">&nbsp;</div>
<div class="admin-card-text-4">&nbsp;</div>
<div class="admin-card-text-5 {if $total_data.total_wait_after_sale_count == 0}primary-msg{/if}"><i class="admin-index-top-item-list-item-child-dot-{if $total_data.total_wait_after_sale_count}red2{else}grey2{/if}"></i>这些顾客想要退款</div>
</div>
</div>
</div>
<!--end of #page-->
<!-- footer
================================================== -->
<script type="text/javascript" src="/js/echarts.min.js"></script>
<script type="text/javascript" src="/js/control.index.js?v={$smarty.const.CSS_JS_VERSION}"></script>
<script type="text/javascript" src="http://echarts.baidu.com/gallery/vendors/echarts-gl/echarts-gl.min.js"></script>
{include file="include/footer.html"}
{literal}
<style>
#feedback {
position: fixed;
right: 20px;
top: 92%;
height: 30px;
width: 100px;
color: #333;
font-size: 12px;
line-height: 20px;
background-color: #fff;
border: 1px solid #e2e2e2;
text-align: center;
}
#feedback:hover {
background-color: #e2e2e2;
}
#feedback a {
line-height: 30px;
text-decoration: none;
color: #333;
}
</style>
{/literal}
<!-- UserAgent: Mozilla/5.0 (Windows NT 6.1; rv:12.0) Gecko/20100101 Firefox/12.0 -->
{literal}
<script type="text/javascript">
var dom = document.getElementById('container');
var myChart = echarts.init(dom, null, {
renderer: 'canvas',
useDirtyRect: false
</div>
<!-- <div class="layui-footer">
底部固定区域
</div> -->
</div>
<script src="/js/layui.js"></script>
<script src="/js/echarts_5.5.3.min.js"></script>
<script src="/js/jquery-1.8.1.min.js"></script>
{literal}
<script>
$(function(){
getChartsData('sales_volume', '365');
})
layui.use(['element', 'layer', 'util'], function(){
var element = layui.element
,layer = layui.layer
,util = layui.util
,$ = layui.$;
util.event('lay-header-event', {
menuLeft: function(othis){
var btn = $("#leftEnumIcon");
if (btn.hasClass('layui-icon-spread-left')) {
menuShow(btn);
} else if (btn.has('layui-icon-shrink-right')) {
menuHide(btn);
}
function menuShow(btn) {
btn.removeClass('layui-icon-spread-left').addClass('layui-icon-shrink-right');
$('.layui-layout-admin').find('.layui-side').animate({left: '0'});
btn.parent().next().css('opacity', 1);
}
function menuHide(btn) {
btn.removeClass('layui-icon-shrink-right').addClass('layui-icon-spread-left');
$('.layui-layout-admin').find('.layui-side').animate({left: '-300'});
btn.parent().next().css('opacity', 0);
}
}
,menuRight: function(){
layer.open({
type: 1
,title: '更多'
,content: '<div style="padding: 15px;">处理右侧面板的操作</div>'
,area: ['260px', '100%']
,offset: 'rt'
,anim: 5
,shadeClose: true
,scrollbar: false
});
}
});
});
var app = {};
var option;
option = {
title: {
text: '订单统计'
},
tooltip: {
trigger: 'axis'
},
legend: {
data: ['订单数量']
},
grid: {
left: '3%',
right: '4%',
bottom: '3%',
containLabel: true
},
toolbox: {
feature: {
saveAsImage: {}
function getChartsData(type, day) {
$('#hidden_params').attr('flag', type);
$.ajax({
url:"/index/ajax_get_charts_data",
type:'post',
data:{type:type, day:day},
dataType:"json",
success:function(data){
var charts_dates = [];
var charts_values = [];
$.each(data.data,function(d, v){
charts_dates.push(d);
charts_values.push(v);
});
value_name = '';
if (type == 'sales_volume') value_name = '销售额';
if (type == 'refund') value_name = '退款订单数';
createCharts(charts_dates, charts_values, value_name);
},
error:function(){
alert("请求失败");
}
});
}
},
xAxis: {
type: 'category',
boundaryGap: false,
data: {/literal}{$json_dates}{literal}
},
yAxis: {
type: 'value'
},
series: [
{
name: '订单数量',
type: 'line',
stack: 'Total',
data: {/literal}{$json_counts}{literal}
function getChartsData2(day, obj) {
$('.admin-index-top-item-header-right').find('li').removeClass('active');
$(obj).addClass('active');
getChartsData($('#hidden_params').attr('flag'), day);
}
]
};
if (option && typeof option === 'object') {
myChart.setOption(option);
function getChartsData3(type, day, obj) {
$('.admin-index-top-item-header-left').find('li').removeClass('active');
$(obj).addClass('active');
getChartsData(type, day);
}
window.addEventListener('resize', myChart.resize);
</script>
<!--[if lt IE 7]>
<![endif]-->
<!--
<script type="text/javascript">
/*Load jQuery if not already loaded*/ if(typeof jQuery == 'undefined'){ document.write("<script type=\"text/javascript\" src=\"" + ('https:' == document.location.protocol ? 'https://' : 'http://')+ "ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js\"></"+"script>"); var __noconflict = true; }
var IE6UPDATE_OPTIONS = {
url: "http://blog.dnspod.cn/2010/04/ie6-must-die/",
message: "DNSPod 新版已经完全取消对微软 Internet Explorer 6.0 浏览器的支持,IE6 用户无法正常使用 DNSPod。请升级您的IE6浏览器至IE8,或者升级至Chrome、火狐、Safari等其他浏览器。",
icons_path: "https://statics.dnspod.cn/zhanjiang/images/ie6update/"
}
</script>
<script type="text/javascript" src="https://statics.dnspod.cn/zhanjiang/javascripts/ie6update.v2.js"></script>
-->
<!--[if lt IE 7]>
<![endif]-->
<style id="__huaban_Style">
#__huaban_Container {
font-family: 'helvetica neue', arial, sans-serif;
position: absolute;
padding-top: 37px;
z-index: 100000002;
top: 0;
left: 0;
background-color: transparent;
opacity: 1;
}
#__huaban_Overlay {
position: fixed;
z-index: 9999;
top: 0;
right: 0;
bottom: 0;
left: 0;
background-color: #f2f2f2;
opacity: .95;
}
#__huaban_Control {
position: relative;
z-index: 100000;
float: left;
background-color: #fcf9f9;
border: solid #ccc;
border-width: 0 1px 1px 0;
height: 200px;
width: 200px;
opacity: 1;
}
#__huaban_Control img {
position: relative;
padding: 0;
display: block;
margin: 82px auto 0;
-ms-interpolation-mode: bicubic;
}
#__huaban_Control a {
position: fixed;
z-index: 10001;
right: 0;
top: 0;
left: 0;
height: 24px;
padding: 12px 0 0;
text-align: center;
font-size: 14px;
line-height: 1em;
text-shadow: 0 1px #fff;
color: #211922;
font-weight: bold;
text-decoration: none;
background: #fff url(http://huaban.com/img/fullGradient07Normal.png) 0 0 repeat-x;
border-bottom: 1px solid #ccc;
-mox-box-shadow: 0 0 2px #d7d7d7;
-webkit-box-shadow: 0 0 2px #d7d7d7;
}
#__huaban_Control a:hover {
color: #fff;
text-decoration: none;
background-color: #1389e5;
border-color: #1389e5;
text-shadow: 0 -1px #46A0E6;
}
#__huaban_Control a:active {
height: 23px;
padding-top: 13px;
background-color: #211922;
border-color: #211922;
background-image: url(http://huaban.com/img/fullGradient07Inverted.png);
text-shadow: 0 -1px #211922;
}
.__huabanImagePreview {
position: relative;
padding: 0;
margin: 0;
float: left;
background-color: #fff;
border: solid #e7e7e7;
border-width: 0 1px 1px 0;
height: 200px;
width: 200px;
opacity: 1;
z-index: 10002;
text-align: center;
}
.__huabanImagePreview .__huabanVideoIcon {
position: absolute;
display: block;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: url(http://huaban.com/img/media_video.png) center center no-repeat;
}
.__huabanImagePreview .__huabanImg {
border: none;
height: 200px;
width: 200px;
opacity: 1;
padding: 0;
}
.__huabanImagePreview .__huabanImg a {
margin: 0;
padding: 0;
position: absolute;
top: 0;
bottom: 0;
right: 0;
left: 0;
display: block;
text-align: center;
z-index: 1;
function createCharts(charts_dates, charts_values, value_name) {
var myChart = echarts.init(document.getElementById('admin-map-container'));
// var monthList = ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'];
var option = {
title: {
text: '销售额趋势',
textStyle:{
color: 'rgba(0,0,0,0.85)',
fontFamily:'PingFangSC-Medium',
fontSize: 14,
lineHeight:55,
},
},
grid:{
left:55,
top:74,
width:'90%',
height:226,
},
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'shadow'
}
.__huabanImagePreview .__huabanImg a:hover {
background-color: #fcf9f9;
border: none;
},
xAxis: {
data: charts_dates,
axisLabel:{
show:true,
color:'rgba(0,0,0,0.65)',
fontSize:12,
fontFamily: 'HelveticaNeue'
},
axisLine:{
show:true,
lineStyle:{
color:'#D9D9D9',
}
},
axisTick:{
show:true,
alignWithLabel:true,
length:5,
}
.__huabanImagePreview .__huabanImg .ImageToPin {
max-height: 200px;
max-width: 200px;
width: auto !important;
height: auto !important;
},
yAxis: {
splitLine:{
show:true,
lineStyle:{
color:['rgba(232, 232, 232, 1)'],
type:'dashed'
}
}
.__huabanImagePreview img.__huaban_PinIt {
border: none;
position: absolute;
top: 82px;
left: 42px;
display: none;
padding: 0;
background-color: transparent;
z-index: 100;
}
.__huabanImagePreview img.__huaban_vidind {
border: none;
position: absolute;
top: 75px;
left: 75px;
padding: 0;
background-color: transparent;
z-index: 99;
},
series: [
{
name: value_name,
type: 'bar',
data: charts_values,
//data: [100, 1000, 256, 488, 588, 189, 110, 100, 556, 188, 888, 289],
itemStyle:{
color:'rgba(24, 144, 255)',
opacity:0.85
}
}
]
};
// 使用刚指定的配置项和数据显示图表。
.__huabanDimensions {
color: #000;
position: relative;
margin-top: 180px;
text-align: center;
font-size: 10px;
z-index: 10003;
display: inline-block;
background: white;
border-radius: 4px;
padding: 0 2px;
}
if($(document).width()<=750) {
option.grid.left = 0;
option.grid.width = '100%';
}
myChart.setOption(option);
}
#__huaban_Button {
display: block;
position: absolute;
z-index: 999999999;
color: #211922;
background: #fff;
text-shadow: 0 1px #eaeaea;
border-radius: 5px;
box-shadow: 0 0 2px #555;
font: 12px/1 arial;
text-align: center;
padding: 5px 8px;
cursor: pointer;
}
#__huaban_Button:hover {
background-image: -webkit-linear-gradient(top, #fefeff, #efefef);
background-image: -moz-linear-gradient(top, #fefeff, #efefef);
}
.__huaban_Button_share {
background: url(http://huaban.com/img/sharebutton.png) no-repeat !important;
text-indent: -9999px;
width: 70px;
}
</style>
{/literal}
</script>
{/literal}
</body>
</html>
</html>

420
view/templates/index/home2.html

@ -0,0 +1,420 @@
<!DOCTYPE html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7" lang="zh_CN"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8" lang="zh_CN"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9" lang="zh_CN"> <![endif]-->
<!--[if gt IE 8]><!-->
<html class="no-js" lang="zh-CN">
<!--<![endif]-->
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>订单统计</title>
<meta name="viewport" content="width=device-width,initial-scale=1">
<script type="text/javascript" src="/js/jquery-1.8.1.min.js"></script>
<link href="/css/global.css" media="screen" rel="stylesheet" type="text/css">
{literal}
<!--[if lt IE 9]>
<script type="text/javascript">
// iepp v2.1pre @jon_neal & @aFarkas github.com/aFarkas/iepp
// html5shiv @rem remysharp.com/html5-enabling-script
// Dual licensed under the MIT or GPL Version 2 licenses
/*@cc_on(function(a,b){function r(a){var b=-1;while(++b<f)a.createElement(e[b])}if(!window.attachEvent||!b.createStyleSheet||!function(){var a=document.createElement("div");return a.innerHTML="<elem></elem>",a.childNodes.length!==1}())return;a.iepp=a.iepp||{};var c=a.iepp,d=c.html5elements||"abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|subline|summary|time|video",e=d.split("|"),f=e.length,g=new RegExp("(^|\\s)("+d+")","gi"),h=new RegExp("<(/*)("+d+")","gi"),i=/^\s*[\{\}]\s*$/,j=new RegExp("(^|[^\\n]*?\\s)("+d+")([^\\n]*)({[\\n\\w\\W]*?})","gi"),k=b.createDocumentFragment(),l=b.documentElement,m=b.getElementsByTagName("script")[0].parentNode,n=b.createElement("body"),o=b.createElement("style"),p=/print|all/,q;c.getCSS=function(a,b){try{if(a+""===undefined)return""}catch(d){return""}var e=-1,f=a.length,g,h=[];while(++e<f){g=a[e];if(g.disabled)continue;b=g.media||b,p.test(b)&&h.push(c.getCSS(g.imports,b),g.cssText),b="all"}return h.join("")},c.parseCSS=function(a){var b=[],c;while((c=j.exec(a))!=null)b.push(((i.exec(c[1])?"\n":c[1])+c[2]+c[3]).replace(g,"$1.iepp-$2")+c[4]);return b.join("\n")},c.writeHTML=function(){var a=-1;q=q||b.body;while(++a<f){var c=b.getElementsByTagName(e[a]),d=c.length,g=-1;while(++g<d)c[g].className.indexOf("iepp-")<0&&(c[g].className+=" iepp-"+e[a])}k.appendChild(q),l.appendChild(n),n.className=q.className,n.id=q.id,n.innerHTML=q.innerHTML.replace(h,"<$1font")},c._beforePrint=function(){if(c.disablePP)return;o.styleSheet.cssText=c.parseCSS(c.getCSS(b.styleSheets,"all")),c.writeHTML()},c.restoreHTML=function(){if(c.disablePP)return;n.swapNode(q)},c._afterPrint=function(){c.restoreHTML(),o.styleSheet.cssText=""},r(b),r(k);if(c.disablePP)return;m.insertBefore(o,m.firstChild),o.media="print",o.className="iepp-printshim",a.attachEvent("onbeforeprint",c._beforePrint),a.attachEvent("onafterprint",c._afterPrint)})(this,document)@*/
</script>
<![endif]-->
<style>
.header {
display: flex;
flex-direction: column;
}
.title-left {
opacity: 0.8;
font-size: 14pt;
font-weight: bold;
}
.contents {
display: flex;
/* justify-content: space-between; */
justify-content: space-evenly;
margin: 30px 0px;
width:80%;
}
.content-item {
margin: 20px 60px 20px 60px;
}
.item-top {
font-size: 12pt;
opacity: 0.8;
}
.item-bottom {
opacity: 0.9;
font-size: 18pt;
font-weight: bold;
line-height: 40px;
}
</style>
{/literal}
</head>
<body>
<!-- Topbar
================================================== -->
{include file="include/header.html"}
<!-- Page
================================================== -->
<div id="page">
<div class="container">
<aside id="sidebar" class="sidebar">
<div id="filter" class="filter module">
</div>
<div id="search" class="domain-search module">
{include file="include/leftmenu.html"}
</div>
</aside>
<section id="main">
<div class="alert-message block-message info" id="tempalte-tips">
<div class="row" style="text-align:center">首次使用该软件,同步历史订单可能需要一段时间,请耐心等待</div>
<div class="row" style="text-align:center">待发货订单数:<span style="color:red">{$wait_deliver_goods_count}</span></div>
<div class="row" style="text-align:center">退款订单数:<span style="color:red">{$refund_count}</span></div>
</div>
<div id="main-content">
<div class="modal-body">
<div id="container" style="height: 400px"></div>
</div>
</div>
</div>
</section>
<!--end of main section-->
</div>
<!--end of container-->
</div>
<!--end of #page-->
<!-- footer
================================================== -->
<script type="text/javascript" src="/js/echarts.min.js"></script>
<script type="text/javascript" src="/js/control.index.js?v={$smarty.const.CSS_JS_VERSION}"></script>
<script type="text/javascript" src="http://echarts.baidu.com/gallery/vendors/echarts-gl/echarts-gl.min.js"></script>
{include file="include/footer.html"}
{literal}
<style>
#feedback {
position: fixed;
right: 20px;
top: 92%;
height: 30px;
width: 100px;
color: #333;
font-size: 12px;
line-height: 20px;
background-color: #fff;
border: 1px solid #e2e2e2;
text-align: center;
}
#feedback:hover {
background-color: #e2e2e2;
}
#feedback a {
line-height: 30px;
text-decoration: none;
color: #333;
}
</style>
{/literal}
<!-- UserAgent: Mozilla/5.0 (Windows NT 6.1; rv:12.0) Gecko/20100101 Firefox/12.0 -->
{literal}
<script type="text/javascript">
var dom = document.getElementById('container');
var myChart = echarts.init(dom, null, {
renderer: 'canvas',
useDirtyRect: false
});
var app = {};
var option;
option = {
title: {
text: '订单统计'
},
tooltip: {
trigger: 'axis'
},
legend: {
data: ['订单数量']
},
grid: {
left: '3%',
right: '4%',
bottom: '3%',
containLabel: true
},
toolbox: {
feature: {
saveAsImage: {}
}
},
xAxis: {
type: 'category',
boundaryGap: false,
data: {/literal}{$json_dates}{literal}
},
yAxis: {
type: 'value'
},
series: [
{
name: '订单数量',
type: 'line',
stack: 'Total',
data: {/literal}{$json_counts}{literal}
}
]
};
if (option && typeof option === 'object') {
myChart.setOption(option);
}
window.addEventListener('resize', myChart.resize);
</script>
<!--[if lt IE 7]>
<![endif]-->
<!--
<script type="text/javascript">
/*Load jQuery if not already loaded*/ if(typeof jQuery == 'undefined'){ document.write("<script type=\"text/javascript\" src=\"" + ('https:' == document.location.protocol ? 'https://' : 'http://')+ "ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js\"></"+"script>"); var __noconflict = true; }
var IE6UPDATE_OPTIONS = {
url: "http://blog.dnspod.cn/2010/04/ie6-must-die/",
message: "DNSPod 新版已经完全取消对微软 Internet Explorer 6.0 浏览器的支持,IE6 用户无法正常使用 DNSPod。请升级您的IE6浏览器至IE8,或者升级至Chrome、火狐、Safari等其他浏览器。",
icons_path: "https://statics.dnspod.cn/zhanjiang/images/ie6update/"
}
</script>
<script type="text/javascript" src="https://statics.dnspod.cn/zhanjiang/javascripts/ie6update.v2.js"></script>
-->
<!--[if lt IE 7]>
<![endif]-->
<style id="__huaban_Style">
#__huaban_Container {
font-family: 'helvetica neue', arial, sans-serif;
position: absolute;
padding-top: 37px;
z-index: 100000002;
top: 0;
left: 0;
background-color: transparent;
opacity: 1;
}
#__huaban_Overlay {
position: fixed;
z-index: 9999;
top: 0;
right: 0;
bottom: 0;
left: 0;
background-color: #f2f2f2;
opacity: .95;
}
#__huaban_Control {
position: relative;
z-index: 100000;
float: left;
background-color: #fcf9f9;
border: solid #ccc;
border-width: 0 1px 1px 0;
height: 200px;
width: 200px;
opacity: 1;
}
#__huaban_Control img {
position: relative;
padding: 0;
display: block;
margin: 82px auto 0;
-ms-interpolation-mode: bicubic;
}
#__huaban_Control a {
position: fixed;
z-index: 10001;
right: 0;
top: 0;
left: 0;
height: 24px;
padding: 12px 0 0;
text-align: center;
font-size: 14px;
line-height: 1em;
text-shadow: 0 1px #fff;
color: #211922;
font-weight: bold;
text-decoration: none;
background: #fff url(http://huaban.com/img/fullGradient07Normal.png) 0 0 repeat-x;
border-bottom: 1px solid #ccc;
-mox-box-shadow: 0 0 2px #d7d7d7;
-webkit-box-shadow: 0 0 2px #d7d7d7;
}
#__huaban_Control a:hover {
color: #fff;
text-decoration: none;
background-color: #1389e5;
border-color: #1389e5;
text-shadow: 0 -1px #46A0E6;
}
#__huaban_Control a:active {
height: 23px;
padding-top: 13px;
background-color: #211922;
border-color: #211922;
background-image: url(http://huaban.com/img/fullGradient07Inverted.png);
text-shadow: 0 -1px #211922;
}
.__huabanImagePreview {
position: relative;
padding: 0;
margin: 0;
float: left;
background-color: #fff;
border: solid #e7e7e7;
border-width: 0 1px 1px 0;
height: 200px;
width: 200px;
opacity: 1;
z-index: 10002;
text-align: center;
}
.__huabanImagePreview .__huabanVideoIcon {
position: absolute;
display: block;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: url(http://huaban.com/img/media_video.png) center center no-repeat;
}
.__huabanImagePreview .__huabanImg {
border: none;
height: 200px;
width: 200px;
opacity: 1;
padding: 0;
}
.__huabanImagePreview .__huabanImg a {
margin: 0;
padding: 0;
position: absolute;
top: 0;
bottom: 0;
right: 0;
left: 0;
display: block;
text-align: center;
z-index: 1;
}
.__huabanImagePreview .__huabanImg a:hover {
background-color: #fcf9f9;
border: none;
}
.__huabanImagePreview .__huabanImg .ImageToPin {
max-height: 200px;
max-width: 200px;
width: auto !important;
height: auto !important;
}
.__huabanImagePreview img.__huaban_PinIt {
border: none;
position: absolute;
top: 82px;
left: 42px;
display: none;
padding: 0;
background-color: transparent;
z-index: 100;
}
.__huabanImagePreview img.__huaban_vidind {
border: none;
position: absolute;
top: 75px;
left: 75px;
padding: 0;
background-color: transparent;
z-index: 99;
}
.__huabanDimensions {
color: #000;
position: relative;
margin-top: 180px;
text-align: center;
font-size: 10px;
z-index: 10003;
display: inline-block;
background: white;
border-radius: 4px;
padding: 0 2px;
}
#__huaban_Button {
display: block;
position: absolute;
z-index: 999999999;
color: #211922;
background: #fff;
text-shadow: 0 1px #eaeaea;
border-radius: 5px;
box-shadow: 0 0 2px #555;
font: 12px/1 arial;
text-align: center;
padding: 5px 8px;
cursor: pointer;
}
#__huaban_Button:hover {
background-image: -webkit-linear-gradient(top, #fefeff, #efefef);
background-image: -moz-linear-gradient(top, #fefeff, #efefef);
}
.__huaban_Button_share {
background: url(http://huaban.com/img/sharebutton.png) no-repeat !important;
text-indent: -9999px;
width: 70px;
}
</style>
{/literal}
</body>
</html>

381
view/templates/index/order_list.html

@ -1,237 +1,170 @@
<!DOCTYPE html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7" lang="zh_CN"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8" lang="zh_CN"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9" lang="zh_CN"> <![endif]-->
<!--[if gt IE 8]><!-->
<html class="no-js" lang="zh-CN">
<!--<![endif]-->
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<!-- <script type="text/javascript" src="/js/echarts.min.js"></script> -->
<!-- <script type="text/javascript" src="http://echarts.baidu.com/gallery/vendors/echarts-gl/echarts-gl.min.js"></script> -->
<script type="text/javascript" src="/js/jquery-1.8.1.min.js"></script>
<script type="text/javascript" src="/js/jquery.form.js"></script>
<script src="/js/lightBox.js" type="text/javascript"></script>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>{if $smarty.get.refund_status == $smarty.const.REFUND_STATUS_AFTER_SALE_ING}售后监控{/if}{if $smarty.get.order_status == $smarty.const.ORDER_STATUS_WAIT_DELIVER_GOODS}发货提醒{/if}</title>
<meta name="viewport" content="width=device-width,initial-scale=1">
<link href="/css/global.css?v={$smarty.const.CSS_JS_VERSION}" media="screen" rel="stylesheet" type="text/css">
<link rel="stylesheet" href="/css/bootstrap-datetimepicker.min.css">
{literal}
<!--[if lt IE 9]>
<script type="text/javascript">
// iepp v2.1pre @jon_neal & @aFarkas github.com/aFarkas/iepp
// html5shiv @rem remysharp.com/html5-enabling-script
// Dual licensed under the MIT or GPL Version 2 licenses
/*@cc_on(function(a,b){function r(a){var b=-1;while(++b<f)a.createElement(e[b])}if(!window.attachEvent||!b.createStyleSheet||!function(){var a=document.createElement("div");return a.innerHTML="<elem></elem>",a.childNodes.length!==1}())return;a.iepp=a.iepp||{};var c=a.iepp,d=c.html5elements||"abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|subline|summary|time|video",e=d.split("|"),f=e.length,g=new RegExp("(^|\\s)("+d+")","gi"),h=new RegExp("<(/*)("+d+")","gi"),i=/^\s*[\{\}]\s*$/,j=new RegExp("(^|[^\\n]*?\\s)("+d+")([^\\n]*)({[\\n\\w\\W]*?})","gi"),k=b.createDocumentFragment(),l=b.documentElement,m=b.getElementsByTagName("script")[0].parentNode,n=b.createElement("body"),o=b.createElement("style"),p=/print|all/,q;c.getCSS=function(a,b){try{if(a+""===undefined)return""}catch(d){return""}var e=-1,f=a.length,g,h=[];while(++e<f){g=a[e];if(g.disabled)continue;b=g.media||b,p.test(b)&&h.push(c.getCSS(g.imports,b),g.cssText),b="all"}return h.join("")},c.parseCSS=function(a){var b=[],c;while((c=j.exec(a))!=null)b.push(((i.exec(c[1])?"\n":c[1])+c[2]+c[3]).replace(g,"$1.iepp-$2")+c[4]);return b.join("\n")},c.writeHTML=function(){var a=-1;q=q||b.body;while(++a<f){var c=b.getElementsByTagName(e[a]),d=c.length,g=-1;while(++g<d)c[g].className.indexOf("iepp-")<0&&(c[g].className+=" iepp-"+e[a])}k.appendChild(q),l.appendChild(n),n.className=q.className,n.id=q.id,n.innerHTML=q.innerHTML.replace(h,"<$1font")},c._beforePrint=function(){if(c.disablePP)return;o.styleSheet.cssText=c.parseCSS(c.getCSS(b.styleSheets,"all")),c.writeHTML()},c.restoreHTML=function(){if(c.disablePP)return;n.swapNode(q)},c._afterPrint=function(){c.restoreHTML(),o.styleSheet.cssText=""},r(b),r(k);if(c.disablePP)return;m.insertBefore(o,m.firstChild),o.media="print",o.className="iepp-printshim",a.attachEvent("onbeforeprint",c._beforePrint),a.attachEvent("onafterprint",c._afterPrint)})(this,document)@*/
</script>
<![endif]-->
{/literal}
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<link href="/images/pdd_icon.png" rel="icon">
<title>订单列表</title>
<link rel="stylesheet" href="/css/layui.css"/>
<link rel="stylesheet" href="/css/admin_style.css"/>
<link rel="stylesheet" href="/css/common.css"/>
<script type="text/javascript" src="/js/jquery-1.8.1.min.js"></script>
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
{literal}
<style>
</style>
{/literal}
</head>
<body>
<!-- Topbar
================================================== -->
{include file="include/header.html"}
<!-- Page
================================================== -->
<div id="page">
<div class="container">
<aside id="sidebar" class="sidebar">
<div id="filter" class="filter module">
</div>
<div id="search" class="domain-search module">
{include file="include/leftmenu.html"}
</div>
</aside>
<section id="main">
<div id="main-content">
<div class="record-control">
<div class="header">
<span style="font-size:14px;padding:5px">{if $smarty.get.refund_status == $smarty.const.REFUND_STATUS_AFTER_SALE_ING}退款/投诉{/if}{if $smarty.get.order_status == $smarty.const.ORDER_STATUS_WAIT_DELIVER_GOODS}发货提醒{/if}</span>
<div class="flash-message"></div>
<ul class="tabs">
</ul>
</div>
</div>
{if $smarty.get.order_status == $smarty.const.ORDER_STATUS_WAIT_DELIVER_GOODS}
<div class="entry">
<div class="modal-body">
<table class="table table-striped table-bordered table-condensed">
<tbody class='js-bundle-record-list'>
<tr>
<td>
<!-- &nbsp;选择店铺:
<select name="shop_tb_pay_id" id="shop_tb_pay_id" style="width: 192px;">
<option value="0">请选择要查询的店铺</option>
{foreach from=$tb_pay_methods item=item key=key}
<option value="{$key}" {if $smarty.get.shopid == $key}selected{/if}>{$item.appid}</option>
{/foreach}
</select>
&nbsp;状态:
<select name="status" id="status" style="width: 192px;">
<option value="0">请选择状态</option>
{foreach from=$tb_status_desc item=status_desc key=status}
<option value="{$status}" {if $smarty.get.status == $status}selected{/if}>{$status_desc}</option>
{/foreach}
</select>
&nbsp;时间:
<input class="span2" style='width:80px' type="text" id="start_date" name="stime" value="{$smarty.get.start_date}" />
-
<input class="span2" style='width:80px' type="text" id="end_date" name="etime" value="{$smarty.get.end_date}"/>
<button class="button primary next" onclick="search()">搜索</button>
-->
<button onclick="exportPddOrders();" class="button primary next" style="background-color: red;background-image: -webkit-linear-gradient(top, red, red);border: 1px solid red;float:right">导出拼多多批量发货列表</button>
</td>
</tr>
</td>
</tr>
</tbody>
</table>
</div>
<div class="layui-layout layui-layout-admin admin-container-outer deliver_remind_table">
{include file="include/admin_header.html"}
{include file="include/admin_leftmenu.html"}
<div class="layui-body admin-layui-body layui-anim layui-anim-fadein">
<div class="layui-row">
<div class="layui-col-lg12 deliver-remind-body-right admin-table-body">
<div class="admin-table-list-header">
<div><span>订单列表/</span></div>
<div><span>订单列表</span></div>
<!-- <div><span>导出列表</span></div> -->
</div>
{/if}
<div class="modal-body">
<!-- <div id="container" style="height: 400px"></div> -->
<div class="modal-body">
<!-- <div id="container" style="height: 400px"></div> -->
<div class="modal-body">
{if count($page_list) > 1}
{if isset($prev_page)}
<a href="{$prev_page}">上一页</a>
{/if}
{foreach from=$page_list key=key item=item}
<a href="{$item.url}">{if $key+1 eq $curpage}<b>{/if}{$item.page}{if $key+1 eq $curpage}</b>{/if}</a>
{/foreach}
{if isset($post_page)}
<a href="{$post_page}">下一页</a>
{/if}
{/if}
</div>
<div class="entry">
<div class="record-control">
</div>
<div class="modal-body">
<table class="table table-bordered table-condensed">
<thead>
<tr>
<th>商品名称</th>
<th>订单号</th>
<th>收入</th>
<th>销售时间</th>
<th>订单状态</th>
<th>售后状态</th>
{if $smarty.get.refund_status == $smarty.const.REFUND_STATUS_AFTER_SALE_ING}
<th>操作</th>
{/if}
</tr>
</thead>
<tbody class='js-bundle-record-list'>
{foreach from=$list key=key item=item}
<tr>
<td class='td-valign'><a href="https://mobile.yangkeduo.com/goods.html?goods_id={$item.goods_id}&sku_id={$item.sku_id}" target="_blank">{$goodsid2skuid2info[$item.goods_id][$item.sku_id].goods_name}【{$goodsid2skuid2info[$item.goods_id][$item.sku_id].sku_name}】</a></td>
<td class='td-valign'>{$item.order_sn}</td>
<td class='td-valign'>{$item.pay_amount}</td>
<td class='td-valign'>{$item.pay_time}</td>
<td class='td-valign'>{$order_status[$item.order_status]}</td>
<td class='td-valign'>{$refund_status[$item.refund_status]}</td>
{if $smarty.get.refund_status == $smarty.const.REFUND_STATUS_AFTER_SALE_ING}
<td class='td-valign'><a href="https://mms.pinduoduo.com/aftersales/aftersale_list" target="_blank">立即处理</a></td>
{/if}
</tr>
{/foreach}
</tbody>
</table>
</div>
</div>
</div>
<table class="layui-hide" id="deliver_remind_list" lay-filter="deliver-remind-table"></table>
<div class="admin-blank-table">
<img src="/images/blank_table.png" alt="">
<p>暂无数据</p>
</div>
</div>
</div>
</div></section><!--end of main section-->
</div><!--end of container-->
</div><!--end of #page-->
<!-- footer
================================================== -->
<iframe width=0 height=0 name="mframe" id="mframe"></iframe>
<script src="/js/bootstrap-datetimepicker.min.js"></script>
<script src="/js/bootstrap-datetimepicker.zh-CN.js"></script>
<script src="/js/echarts.min.js"></script>
</div>
</div>
<script src="/js/layui.js"></script>
<script src="/js/clipboard.min.js"></script>
{literal}
<script type="text/javascript">
function exportPddOrders() {
location.href = '/index/export_wait_deliver_goods_tids';
}
</script>
{/literal}
{include file="include/footer.html"}
{literal}
<style>
#feedback {
position:fixed;
right:20px;
top:92%;
height:30px;
width:100px;
color:#333;
font-size:12px;
line-height: 20px;
background-color:#fff;
border:1px solid #e2e2e2;
text-align: center;
}
#feedback:hover {
background-color:#e2e2e2;
}
#feedback a{
line-height:30px;
text-decoration:none;
color:#333;
}
</style>
{/literal}
<!-- UserAgent: Mozilla/5.0 (Windows NT 6.1; rv:12.0) Gecko/20100101 Firefox/12.0 -->
{literal}
<!--[if lt IE 7]>
<![endif]-->
<!--
<script type="text/javascript">
/*Load jQuery if not already loaded*/ if(typeof jQuery == 'undefined'){ document.write("<script type=\"text/javascript\" src=\"" + ('https:' == document.location.protocol ? 'https://' : 'http://')+ "ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js\"></"+"script>"); var __noconflict = true; }
var IE6UPDATE_OPTIONS = {
url: "http://blog.dnspod.cn/2010/04/ie6-must-die/",
message: "DNSPod 新版已经完全取消对微软 Internet Explorer 6.0 浏览器的支持,IE6 用户无法正常使用 DNSPod。请升级您的IE6浏览器至IE8,或者升级至Chrome、火狐、Safari等其他浏览器。",
icons_path: "https://statics.dnspod.cn/zhanjiang/images/ie6update/"
<script>
layui.use(['element', 'layer', 'util', 'table'], function(){
var element = layui.element
,layer = layui.layer
,util = layui.util
,table = layui.table
,$ = layui.$;
util.event('lay-header-event', {
menuLeft: function(othis){
var btn = $("#leftEnumIcon");
if (btn.hasClass('layui-icon-spread-left')) {
menuShow(btn);
} else if (btn.has('layui-icon-shrink-right')) {
menuHide(btn);
}
function menuShow(btn) {
btn.removeClass('layui-icon-spread-left').addClass('layui-icon-shrink-right');
$('.layui-layout-admin').find('.layui-side').animate({left: '0'});
btn.parent().next().css('opacity', 1);
}
function menuHide(btn) {
btn.removeClass('layui-icon-shrink-right').addClass('layui-icon-spread-left');
$('.layui-layout-admin').find('.layui-side').animate({left: '-300'});
btn.parent().next().css('opacity', 0);
}
}
</script>
<script type="text/javascript" src="https://statics.dnspod.cn/zhanjiang/javascripts/ie6update.v2.js"></script>
-->
<!--[if lt IE 7]>
<![endif]-->
,menuRight: function(){
layer.open({
type: 1
,title: '更多'
,content: '<div style="padding: 15px;">处理右侧面板的操作</div>'
,area: ['260px', '100%']
,offset: 'rt'
,anim: 5
,shadeClose: true
,scrollbar: false
});
}
});
var showTips = null;
table.render({
elem: '#deliver_remind_list'
,url:'/index/ajax_get_order_list'
,toolbar: false
,title: '用户数据表'
,totalRow: false
,limit:20
,className:'deliver_remind_list_table_class'
,cols: [[
{field:'goods_name', title:'商品名称',
templet: function(d){
return '<a href="https://mobile.yangkeduo.com/goods.html?goods_id='+d.goods_id+'&sku_id='+d.sku_id+'" target="_blank">'+d.goods_name+'</a>';
}}
,{field:'order_sn', title:'订单号'
,templet: function(d){
return '<span data-clipboard-text="'+d.order_sn+'" title="点击复制" class="admin-table-td-outter admin-table-td-outter-'+d.order_sn+'">'+ d.order_sn +'&nbsp;<span class="icon-uniE90E admin-table-td-outter-font admin-table-td-outter-font-'+d.order_sn+'"></span></span>';
}}
,{field:'pay_time', title:'支付时间'
,templet: function(d){
return '<span>'+d.pay_time+'</span>';
}}
,{field:'pay_amount', title:'支付金额(元)'}
,{field:'order_status_desc', title:'订单状态'
,templet: function(d){
return '<span class="'+d.order_status_class+'">'+d.order_status_desc+'</span>';
}}
,{field:'refund_status_desc', title:'退款状态'
,templet: function(d){
return '<span class="'+d.refund_status_class+'">'+d.refund_status_desc+'</span>';
}}
]]
,page: true
,response: {
statusCode: 200 //重新规定成功的状态码为 200,table 组件默认为 0
}
,parseData: function(res){ //将原始数据解析成 table 组件所规定的数据
return {
"code": 200, //解析接口状态
"msg": res.info, //解析提示文本
"count": res.data.total, //解析数据长度
"data": res.data.data //解析数据列表
};
},
done: function(res, curr, count){
var data = res.data;
try {
if(data == undefined || data.length<=0){
$('.deliver_remind_list_table_class').hide();
$('.admin-blank-table').show();
}else{
$('.deliver_remind_list_table_class').show();
$('.admin-blank-table').hide();
}
} catch (error) {
$('.deliver_remind_list_table_class').hide();
$('.admin-blank-table').show();
}
for(var i=0; i<data.length; i++){
var tid = data[i].order_sn;
var clipboard = new ClipboardJS('.admin-table-td-outter-'+tid);
clipboard.on('success', function(e) {
layer.msg('复制成功', {time:1500});
if(i < (data.length-2)){
clipboard.destroy();
e.clearSelection();
}
});
}
}
});
});
<style id="__huaban_Style">
#__huaban_Container {font-family: 'helvetica neue', arial, sans-serif; position: absolute; padding-top: 37px; z-index: 100000002; top: 0; left: 0; background-color: transparent; opacity: 1;}#__huaban_Overlay {position: fixed; z-index: 9999; top: 0; right: 0; bottom: 0; left: 0; background-color: #f2f2f2; opacity: .95;}#__huaban_Control {position:relative; z-index: 100000; float: left; background-color: #fcf9f9; border: solid #ccc; border-width: 0 1px 1px 0; height: 200px; width: 200px; opacity: 1;}#__huaban_Control img {position: relative; padding: 0; display: block; margin: 82px auto 0; -ms-interpolation-mode: bicubic;}#__huaban_Control a {position: fixed; z-index: 10001; right: 0; top: 0; left: 0; height: 24px; padding: 12px 0 0; text-align: center; font-size: 14px; line-height: 1em; text-shadow: 0 1px #fff; color: #211922; font-weight: bold; text-decoration: none; background: #fff url(http://huaban.com/img/fullGradient07Normal.png) 0 0 repeat-x; border-bottom: 1px solid #ccc; -mox-box-shadow: 0 0 2px #d7d7d7; -webkit-box-shadow: 0 0 2px #d7d7d7;}#__huaban_Control a:hover {color: #fff; text-decoration: none; background-color: #1389e5; border-color: #1389e5; text-shadow: 0 -1px #46A0E6;}#__huaban_Control a:active {height: 23px; padding-top: 13px; background-color: #211922; border-color: #211922; background-image: url(http://huaban.com/img/fullGradient07Inverted.png); text-shadow: 0 -1px #211922;}.__huabanImagePreview {position: relative; padding: 0; margin: 0; float: left; background-color: #fff; border: solid #e7e7e7; border-width: 0 1px 1px 0; height: 200px; width: 200px; opacity: 1; z-index: 10002; text-align: center;}.__huabanImagePreview .__huabanVideoIcon {position:absolute;display:block;top:0;left:0;width:100%;height:100%;background:url(http://huaban.com/img/media_video.png) center center no-repeat;}.__huabanImagePreview .__huabanImg {border: none; height: 200px; width: 200px; opacity: 1; padding: 0;}.__huabanImagePreview .__huabanImg a {margin: 0; padding: 0; position: absolute; top: 0; bottom: 0; right: 0; left: 0; display: block; text-align: center; z-index: 1;}.__huabanImagePreview .__huabanImg a:hover {background-color: #fcf9f9; border: none;}.__huabanImagePreview .__huabanImg .ImageToPin {max-height: 200px; max-width: 200px; width: auto !important; height: auto !important;}.__huabanImagePreview img.__huaban_PinIt {border: none; position: absolute; top: 82px; left: 42px; display: none; padding: 0; background-color: transparent; z-index: 100;}.__huabanImagePreview img.__huaban_vidind {border: none; position: absolute; top: 75px; left: 75px; padding: 0; background-color: transparent; z-index: 99;}.__huabanDimensions { color: #000; position: relative; margin-top: 180px; text-align: center; font-size: 10px; z-index:10003; display: inline-block; background: white; border-radius: 4px; padding: 0 2px;}#__huaban_Button { display: block; position: absolute; z-index: 999999999; color: #211922; background: #fff; text-shadow: 0 1px #eaeaea; border-radius: 5px; box-shadow: 0 0 2px #555; font: 12px/1 arial; text-align: center; padding: 5px 8px; cursor: pointer; }#__huaban_Button:hover { background-image: -webkit-linear-gradient(top, #fefeff, #efefef); background-image: -moz-linear-gradient(top, #fefeff, #efefef); }.__huaban_Button_share {background: url(http://huaban.com/img/sharebutton.png) no-repeat !important; text-indent: -9999px; width: 70px;}
</style>
</script>
{/literal}
</body>
</html>
</html>

237
view/templates/index/order_list2.html

@ -0,0 +1,237 @@
<!DOCTYPE html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7" lang="zh_CN"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8" lang="zh_CN"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9" lang="zh_CN"> <![endif]-->
<!--[if gt IE 8]><!-->
<html class="no-js" lang="zh-CN">
<!--<![endif]-->
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<!-- <script type="text/javascript" src="/js/echarts.min.js"></script> -->
<!-- <script type="text/javascript" src="http://echarts.baidu.com/gallery/vendors/echarts-gl/echarts-gl.min.js"></script> -->
<script type="text/javascript" src="/js/jquery-1.8.1.min.js"></script>
<script type="text/javascript" src="/js/jquery.form.js"></script>
<script src="/js/lightBox.js" type="text/javascript"></script>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>{if $smarty.get.refund_status == $smarty.const.REFUND_STATUS_AFTER_SALE_ING}售后监控{/if}{if $smarty.get.order_status == $smarty.const.ORDER_STATUS_WAIT_DELIVER_GOODS}发货提醒{/if}</title>
<meta name="viewport" content="width=device-width,initial-scale=1">
<link href="/css/global.css?v={$smarty.const.CSS_JS_VERSION}" media="screen" rel="stylesheet" type="text/css">
<link rel="stylesheet" href="/css/bootstrap-datetimepicker.min.css">
{literal}
<!--[if lt IE 9]>
<script type="text/javascript">
// iepp v2.1pre @jon_neal & @aFarkas github.com/aFarkas/iepp
// html5shiv @rem remysharp.com/html5-enabling-script
// Dual licensed under the MIT or GPL Version 2 licenses
/*@cc_on(function(a,b){function r(a){var b=-1;while(++b<f)a.createElement(e[b])}if(!window.attachEvent||!b.createStyleSheet||!function(){var a=document.createElement("div");return a.innerHTML="<elem></elem>",a.childNodes.length!==1}())return;a.iepp=a.iepp||{};var c=a.iepp,d=c.html5elements||"abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|subline|summary|time|video",e=d.split("|"),f=e.length,g=new RegExp("(^|\\s)("+d+")","gi"),h=new RegExp("<(/*)("+d+")","gi"),i=/^\s*[\{\}]\s*$/,j=new RegExp("(^|[^\\n]*?\\s)("+d+")([^\\n]*)({[\\n\\w\\W]*?})","gi"),k=b.createDocumentFragment(),l=b.documentElement,m=b.getElementsByTagName("script")[0].parentNode,n=b.createElement("body"),o=b.createElement("style"),p=/print|all/,q;c.getCSS=function(a,b){try{if(a+""===undefined)return""}catch(d){return""}var e=-1,f=a.length,g,h=[];while(++e<f){g=a[e];if(g.disabled)continue;b=g.media||b,p.test(b)&&h.push(c.getCSS(g.imports,b),g.cssText),b="all"}return h.join("")},c.parseCSS=function(a){var b=[],c;while((c=j.exec(a))!=null)b.push(((i.exec(c[1])?"\n":c[1])+c[2]+c[3]).replace(g,"$1.iepp-$2")+c[4]);return b.join("\n")},c.writeHTML=function(){var a=-1;q=q||b.body;while(++a<f){var c=b.getElementsByTagName(e[a]),d=c.length,g=-1;while(++g<d)c[g].className.indexOf("iepp-")<0&&(c[g].className+=" iepp-"+e[a])}k.appendChild(q),l.appendChild(n),n.className=q.className,n.id=q.id,n.innerHTML=q.innerHTML.replace(h,"<$1font")},c._beforePrint=function(){if(c.disablePP)return;o.styleSheet.cssText=c.parseCSS(c.getCSS(b.styleSheets,"all")),c.writeHTML()},c.restoreHTML=function(){if(c.disablePP)return;n.swapNode(q)},c._afterPrint=function(){c.restoreHTML(),o.styleSheet.cssText=""},r(b),r(k);if(c.disablePP)return;m.insertBefore(o,m.firstChild),o.media="print",o.className="iepp-printshim",a.attachEvent("onbeforeprint",c._beforePrint),a.attachEvent("onafterprint",c._afterPrint)})(this,document)@*/
</script>
<![endif]-->
{/literal}
</head>
<body>
<!-- Topbar
================================================== -->
{include file="include/header.html"}
<!-- Page
================================================== -->
<div id="page">
<div class="container">
<aside id="sidebar" class="sidebar">
<div id="filter" class="filter module">
</div>
<div id="search" class="domain-search module">
{include file="include/leftmenu.html"}
</div>
</aside>
<section id="main">
<div id="main-content">
<div class="record-control">
<div class="header">
<span style="font-size:14px;padding:5px">{if $smarty.get.refund_status == $smarty.const.REFUND_STATUS_AFTER_SALE_ING}退款/投诉{/if}{if $smarty.get.order_status == $smarty.const.ORDER_STATUS_WAIT_DELIVER_GOODS}发货提醒{/if}</span>
<div class="flash-message"></div>
<ul class="tabs">
</ul>
</div>
</div>
{if $smarty.get.order_status == $smarty.const.ORDER_STATUS_WAIT_DELIVER_GOODS}
<div class="entry">
<div class="modal-body">
<table class="table table-striped table-bordered table-condensed">
<tbody class='js-bundle-record-list'>
<tr>
<td>
<!-- &nbsp;选择店铺:
<select name="shop_tb_pay_id" id="shop_tb_pay_id" style="width: 192px;">
<option value="0">请选择要查询的店铺</option>
{foreach from=$tb_pay_methods item=item key=key}
<option value="{$key}" {if $smarty.get.shopid == $key}selected{/if}>{$item.appid}</option>
{/foreach}
</select>
&nbsp;状态:
<select name="status" id="status" style="width: 192px;">
<option value="0">请选择状态</option>
{foreach from=$tb_status_desc item=status_desc key=status}
<option value="{$status}" {if $smarty.get.status == $status}selected{/if}>{$status_desc}</option>
{/foreach}
</select>
&nbsp;时间:
<input class="span2" style='width:80px' type="text" id="start_date" name="stime" value="{$smarty.get.start_date}" />
-
<input class="span2" style='width:80px' type="text" id="end_date" name="etime" value="{$smarty.get.end_date}"/>
<button class="button primary next" onclick="search()">搜索</button>
-->
<button onclick="exportPddOrders();" class="button primary next" style="background-color: red;background-image: -webkit-linear-gradient(top, red, red);border: 1px solid red;float:right">导出拼多多批量发货列表</button>
</td>
</tr>
</td>
</tr>
</tbody>
</table>
</div>
</div>
{/if}
<div class="modal-body">
<!-- <div id="container" style="height: 400px"></div> -->
<div class="modal-body">
<!-- <div id="container" style="height: 400px"></div> -->
<div class="modal-body">
{if count($page_list) > 1}
{if isset($prev_page)}
<a href="{$prev_page}">上一页</a>
{/if}
{foreach from=$page_list key=key item=item}
<a href="{$item.url}">{if $key+1 eq $curpage}<b>{/if}{$item.page}{if $key+1 eq $curpage}</b>{/if}</a>
{/foreach}
{if isset($post_page)}
<a href="{$post_page}">下一页</a>
{/if}
{/if}
</div>
<div class="entry">
<div class="record-control">
</div>
<div class="modal-body">
<table class="table table-bordered table-condensed">
<thead>
<tr>
<th>商品名称</th>
<th>订单号</th>
<th>收入</th>
<th>销售时间</th>
<th>订单状态</th>
<th>售后状态</th>
{if $smarty.get.refund_status == $smarty.const.REFUND_STATUS_AFTER_SALE_ING}
<th>操作</th>
{/if}
</tr>
</thead>
<tbody class='js-bundle-record-list'>
{foreach from=$list key=key item=item}
<tr>
<td class='td-valign'><a href="https://mobile.yangkeduo.com/goods.html?goods_id={$item.goods_id}&sku_id={$item.sku_id}" target="_blank">{$goodsid2skuid2info[$item.goods_id][$item.sku_id].goods_name}【{$goodsid2skuid2info[$item.goods_id][$item.sku_id].sku_name}】</a></td>
<td class='td-valign'>{$item.order_sn}</td>
<td class='td-valign'>{$item.pay_amount}</td>
<td class='td-valign'>{$item.pay_time}</td>
<td class='td-valign'>{$order_status[$item.order_status]}</td>
<td class='td-valign'>{$refund_status[$item.refund_status]}</td>
{if $smarty.get.refund_status == $smarty.const.REFUND_STATUS_AFTER_SALE_ING}
<td class='td-valign'><a href="https://mms.pinduoduo.com/aftersales/aftersale_list" target="_blank">立即处理</a></td>
{/if}
</tr>
{/foreach}
</tbody>
</table>
</div>
</div>
</div>
</div>
</div></section><!--end of main section-->
</div><!--end of container-->
</div><!--end of #page-->
<!-- footer
================================================== -->
<iframe width=0 height=0 name="mframe" id="mframe"></iframe>
<script src="/js/bootstrap-datetimepicker.min.js"></script>
<script src="/js/bootstrap-datetimepicker.zh-CN.js"></script>
<script src="/js/echarts.min.js"></script>
{literal}
<script type="text/javascript">
function exportPddOrders() {
location.href = '/index/export_wait_deliver_goods_tids';
}
</script>
{/literal}
{include file="include/footer.html"}
{literal}
<style>
#feedback {
position:fixed;
right:20px;
top:92%;
height:30px;
width:100px;
color:#333;
font-size:12px;
line-height: 20px;
background-color:#fff;
border:1px solid #e2e2e2;
text-align: center;
}
#feedback:hover {
background-color:#e2e2e2;
}
#feedback a{
line-height:30px;
text-decoration:none;
color:#333;
}
</style>
{/literal}
<!-- UserAgent: Mozilla/5.0 (Windows NT 6.1; rv:12.0) Gecko/20100101 Firefox/12.0 -->
{literal}
<!--[if lt IE 7]>
<![endif]-->
<!--
<script type="text/javascript">
/*Load jQuery if not already loaded*/ if(typeof jQuery == 'undefined'){ document.write("<script type=\"text/javascript\" src=\"" + ('https:' == document.location.protocol ? 'https://' : 'http://')+ "ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js\"></"+"script>"); var __noconflict = true; }
var IE6UPDATE_OPTIONS = {
url: "http://blog.dnspod.cn/2010/04/ie6-must-die/",
message: "DNSPod 新版已经完全取消对微软 Internet Explorer 6.0 浏览器的支持,IE6 用户无法正常使用 DNSPod。请升级您的IE6浏览器至IE8,或者升级至Chrome、火狐、Safari等其他浏览器。",
icons_path: "https://statics.dnspod.cn/zhanjiang/images/ie6update/"
}
</script>
<script type="text/javascript" src="https://statics.dnspod.cn/zhanjiang/javascripts/ie6update.v2.js"></script>
-->
<!--[if lt IE 7]>
<![endif]-->
<style id="__huaban_Style">
#__huaban_Container {font-family: 'helvetica neue', arial, sans-serif; position: absolute; padding-top: 37px; z-index: 100000002; top: 0; left: 0; background-color: transparent; opacity: 1;}#__huaban_Overlay {position: fixed; z-index: 9999; top: 0; right: 0; bottom: 0; left: 0; background-color: #f2f2f2; opacity: .95;}#__huaban_Control {position:relative; z-index: 100000; float: left; background-color: #fcf9f9; border: solid #ccc; border-width: 0 1px 1px 0; height: 200px; width: 200px; opacity: 1;}#__huaban_Control img {position: relative; padding: 0; display: block; margin: 82px auto 0; -ms-interpolation-mode: bicubic;}#__huaban_Control a {position: fixed; z-index: 10001; right: 0; top: 0; left: 0; height: 24px; padding: 12px 0 0; text-align: center; font-size: 14px; line-height: 1em; text-shadow: 0 1px #fff; color: #211922; font-weight: bold; text-decoration: none; background: #fff url(http://huaban.com/img/fullGradient07Normal.png) 0 0 repeat-x; border-bottom: 1px solid #ccc; -mox-box-shadow: 0 0 2px #d7d7d7; -webkit-box-shadow: 0 0 2px #d7d7d7;}#__huaban_Control a:hover {color: #fff; text-decoration: none; background-color: #1389e5; border-color: #1389e5; text-shadow: 0 -1px #46A0E6;}#__huaban_Control a:active {height: 23px; padding-top: 13px; background-color: #211922; border-color: #211922; background-image: url(http://huaban.com/img/fullGradient07Inverted.png); text-shadow: 0 -1px #211922;}.__huabanImagePreview {position: relative; padding: 0; margin: 0; float: left; background-color: #fff; border: solid #e7e7e7; border-width: 0 1px 1px 0; height: 200px; width: 200px; opacity: 1; z-index: 10002; text-align: center;}.__huabanImagePreview .__huabanVideoIcon {position:absolute;display:block;top:0;left:0;width:100%;height:100%;background:url(http://huaban.com/img/media_video.png) center center no-repeat;}.__huabanImagePreview .__huabanImg {border: none; height: 200px; width: 200px; opacity: 1; padding: 0;}.__huabanImagePreview .__huabanImg a {margin: 0; padding: 0; position: absolute; top: 0; bottom: 0; right: 0; left: 0; display: block; text-align: center; z-index: 1;}.__huabanImagePreview .__huabanImg a:hover {background-color: #fcf9f9; border: none;}.__huabanImagePreview .__huabanImg .ImageToPin {max-height: 200px; max-width: 200px; width: auto !important; height: auto !important;}.__huabanImagePreview img.__huaban_PinIt {border: none; position: absolute; top: 82px; left: 42px; display: none; padding: 0; background-color: transparent; z-index: 100;}.__huabanImagePreview img.__huaban_vidind {border: none; position: absolute; top: 75px; left: 75px; padding: 0; background-color: transparent; z-index: 99;}.__huabanDimensions { color: #000; position: relative; margin-top: 180px; text-align: center; font-size: 10px; z-index:10003; display: inline-block; background: white; border-radius: 4px; padding: 0 2px;}#__huaban_Button { display: block; position: absolute; z-index: 999999999; color: #211922; background: #fff; text-shadow: 0 1px #eaeaea; border-radius: 5px; box-shadow: 0 0 2px #555; font: 12px/1 arial; text-align: center; padding: 5px 8px; cursor: pointer; }#__huaban_Button:hover { background-image: -webkit-linear-gradient(top, #fefeff, #efefef); background-image: -moz-linear-gradient(top, #fefeff, #efefef); }.__huaban_Button_share {background: url(http://huaban.com/img/sharebutton.png) no-repeat !important; text-indent: -9999px; width: 70px;}
</style>
{/literal}
</body>
</html>

238
view/templates/index/wait_deliver_list.html

@ -0,0 +1,238 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<link href="/images/pdd_icon.png" rel="icon">
<title>发货提醒</title>
<link rel="stylesheet" href="/css/layui.css"/>
<link rel="stylesheet" href="/css/admin_style.css"/>
<link rel="stylesheet" href="/css/common.css"/>
<script type="text/javascript" src="/js/jquery-1.8.1.min.js"></script>
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
{literal}
<style>
</style>
{/literal}
</head>
<body>
<div class="layui-layout layui-layout-admin admin-container-outer deliver_remind_table">
{include file="include/admin_header.html"}
{include file="include/admin_leftmenu.html"}
<div class="layui-body admin-layui-body layui-anim layui-anim-fadein">
<div class="layui-row">
<div class="layui-col-lg12 deliver-remind-body-right admin-table-body">
<div class="admin-table-list-header">
<div><span>发货提醒/</span></div>
<div><span>待发货列表</span></div>
<div><a href="/index/export_wait_deliver_goods_tids"><span>导出待发货列表</span></a></div>
</div>
<div id="test"></div>
<table class="layui-hide" id="deliver_remind_list" lay-filter="deliver-remind-table"></table>
<div class="admin-blank-table">
<img src="/images/blank_table.png" alt="">
<p>暂无数据</p>
</div>
</div>
</div>
</div>
</div>
<script src="/js/layui.js"></script>
<script src="/js/clipboard.min.js"></script>
{literal}
<script>
layui.use(['element', 'layer', 'util', 'table'], function(){
var element = layui.element
,layer = layui.layer
,util = layui.util
,table = layui.table
,$ = layui.$;
//清除翻页后上一页遗漏的定时器
var intervalsMap = new Map();
util.event('lay-header-event', {
menuLeft: function(othis){
var btn = $("#leftEnumIcon");
if (btn.hasClass('layui-icon-spread-left')) {
menuShow(btn);
} else if (btn.has('layui-icon-shrink-right')) {
menuHide(btn);
}
function menuShow(btn) {
btn.removeClass('layui-icon-spread-left').addClass('layui-icon-shrink-right');
$('.layui-layout-admin').find('.layui-side').animate({left: '0'});
btn.parent().next().css('opacity', 1);
}
function menuHide(btn) {
btn.removeClass('layui-icon-shrink-right').addClass('layui-icon-spread-left');
$('.layui-layout-admin').find('.layui-side').animate({left: '-300'});
btn.parent().next().css('opacity', 0);
}
}
,menuRight: function(){
layer.open({
type: 1
,title: '更多'
,content: '<div style="padding: 15px;">处理右侧面板的操作</div>'
,area: ['260px', '100%']
,offset: 'rt'
,anim: 5
,shadeClose: true
,scrollbar: false
});
}
});
var showTips = null;
table.render({
elem: '#deliver_remind_list'
,url:'/index/ajax_get_wait_deliver_list'
,toolbar: false
,title: '用户数据表'
,totalRow: false
,className:'deliver_remind_list_table_class'
,limit:20
,cols: [[
{field:'goods_name', title:'商品名称',
templet: function(d){
return '<a href="https://mobile.yangkeduo.com/goods.html?goods_id='+d.goods_id+'&sku_id='+d.sku_id+'" target="_blank">'+d.goods_name+'</a>';
}}
,{field:'order_sn', title:'订单号'
,templet: function(d){
return '<span data-clipboard-text="'+d.order_sn+'" title="点击复制" class="admin-table-td-outter admin-table-td-outter-'+d.order_sn+'">'+ d.order_sn +'&nbsp;<span class="icon-uniE90E admin-table-td-outter-font admin-table-td-outter-font-'+d.order_sn+'"></span></span>';
}}
,{field:'pay_time', title:'销售时间/倒计时'
,templet: function(d){
if(d.is_show_count_down == true) return '<label id="count_down_wait_'+d.order_sn+'" content="'+d.pay_time+'" class="count_down_wait"><span id="count-down-time-'+d.order_sn+'">倒计时:'+d.count_down+'</span></label>';
return '<span>'+d.pay_time+'</span>';
}}
,{field:'pay_amount', title:'支付金额(元)'}
,{field:'status', title:'顾客催发'
,templet: function(d){
if(d.is_urge) return '<span class="remained_status" content="'+d.urge_shipping_time+'" id="remind_time_'+d.order_sn+'"><span class="icon--3"></span>&nbsp;已催</span>';
return '<span class="icon--"></span>&nbsp;<span class="remained_status_wait">未催</span>';
}}
]]
,page: true
,response: {
statusCode: 200 //重新规定成功的状态码为 200,table 组件默认为 0
}
,parseData: function(res){ //将原始数据解析成 table 组件所规定的数据
return {
"code": 200, //解析接口状态
"msg": res.info, //解析提示文本
"count": res.data.total, //解析数据长度
"data": res.data.data //解析数据列表
};
},
done: function(res, curr, count){
//删除翻页遗漏的定时器,避免内存泄露
for(let key of intervalsMap.keys()){
clearInterval(intervalsMap.get(key));
intervalsMap.delete(key);
}
var data = res.data;
try {
if(data == undefined || data.length<=0){
$('.deliver_remind_list_table_class').hide();
$('.admin-blank-table').show();
}else{
$('.deliver_remind_list_table_class').show();
$('.admin-blank-table').hide();
}
} catch (error) {
$('.deliver_remind_list_table_class').hide();
$('.admin-blank-table').show();
}
var countDownList = new Array();
for(var i=0; i<data.length; i++){
if(data[i].is_show_count_down == true){
countDownList.push(data[i]);
}
}
for(var i=0; i<data.length; i++){
var tid = data[i].order_sn;
var clipboard = new ClipboardJS('.admin-table-td-outter-'+tid);
clipboard.on('success', function(e) {
layer.msg('复制成功', {time:1500});
if(i < (data.length-2)){
clipboard.destroy();
e.clearSelection();
}
});
clipboard.on('error', function(e) {
console.error('Action:', e.action);
console.error('Trigger:', e.trigger);
});
if(data[i].is_show_count_down == true){
$('#count_down_wait_'+data[i].order_sn).hover(function(){
var hid = $(this).attr('id');
var hcontent = $(this).attr('content');
showTips = layer.tips('销售时间<br>'+hcontent, '#'+hid, {
area: ['131px', '42px'],
tips:[3,'#FAF8EB'],//显示方向以及背景颜色(1.上 2右 3下 4左)
time:3000,//4秒后销毁
skin:'count-down-class'
});
},function(){
layer.close(showTips);
});
}
if(data[i].is_urge == true){
$('#remind_time_'+data[i].order_sn).hover(function(){
var hcontent = $(this).attr('content');
var hid = $(this).attr('id');
showTips = layer.tips('催促时间<br>'+hcontent, '#'+hid, {
area: ['131px', '42px'],
tips:[3,'#FAF8EB'],//显示方向以及背景颜色(1.上 2右 3下 4左)
time:3000,//4秒后销毁
skin:'count-down-class'
});
},function(){
layer.close(showTips);
});
}
var orderSnObjec = new Object();
orderSnObjec.order_sn = data[i].order_sn;
if(data[i].is_show_count_down == true){
var coumtTimeList = data[i].count_down.split(':');
var countDownTime = (parseInt(coumtTimeList[0]) * 3600 + parseInt(coumtTimeList[1]) * 60 + parseInt(coumtTimeList[2])) * 1000;
var startTime = new Date(2099,1,1).getTime();
var endTime = startTime+countDownTime;
util.countdown(endTime, startTime, data[i].order_sn, function(date, st, timer, order_sn){
var remainTimeStr = (date[0]*24 + date[1]) + ':' + date[2] + ':' + date[3];
var countDownId = '#count-down-time-'+order_sn;
intervalsMap.set(order_sn, timer);
if(remainTimeStr == '0:0:0'){
var order_pay_time = $('#count_down_wait_'+order_sn).attr('content');
$('#count_down_wait_'+order_sn).hide();
$('#count_down_wait_'+order_sn).after('<span>'+order_pay_time+'</span>');
}else{
layui.$(countDownId).html('倒计时:'+ remainTimeStr);
}
});
}
}
}
});
});
</script>
{/literal}
</body>
</html>
Loading…
Cancel
Save