[更新]同步Framework代码

This commit is contained in:
Anyon 2019-06-14 18:57:26 +08:00
parent 5990690c9f
commit 3e0afa2a04
33 changed files with 661 additions and 1037 deletions

View File

@ -47,7 +47,8 @@ class Update extends Controller
$file = env('root_path') . decode($encode); $file = env('root_path') . decode($encode);
if (!file_exists($file)) $this->error('获取文件内容失败!'); if (!file_exists($file)) $this->error('获取文件内容失败!');
$this->success('获取文件内容成功!', [ $this->success('获取文件内容成功!', [
'format' => 'base64', 'content' => base64_encode(file_get_contents($file)), 'format' => 'base64',
'content' => base64_encode(file_get_contents($file)),
]); ]);
} }

View File

@ -9,7 +9,7 @@
// +---------------------------------------------------------------------- // +----------------------------------------------------------------------
// | 开源协议 ( https://mit-license.org ) // | 开源协议 ( https://mit-license.org )
// +---------------------------------------------------------------------- // +----------------------------------------------------------------------
// | github开源项目https://github.com/zoujingli/ThinkAdmin // | github开源项目https://github.com/zoujingli/framework
// +---------------------------------------------------------------------- // +----------------------------------------------------------------------
namespace app\index\controller; namespace app\index\controller;

View File

@ -14,9 +14,6 @@
namespace app\store\command; namespace app\store\command;
use think\console\Command;
use think\console\Input;
use think\console\Output;
use think\Db; use think\Db;
/** /**
@ -24,7 +21,7 @@ use think\Db;
* Class AutoRun * Class AutoRun
* @package app\store\command * @package app\store\command
*/ */
class AutoRun extends Command class AutoRun extends \think\console\Command
{ {
protected function configure() protected function configure()
@ -34,20 +31,20 @@ class AutoRun extends Command
/** /**
* 业务指令执行 * 业务指令执行
* @param Input $input * @param \think\console\Input $input
* @param Output $output * @param \think\console\Output $output
* @throws \think\Exception * @throws \think\Exception
* @throws \think\db\exception\DataNotFoundException * @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException * @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException * @throws \think\exception\DbException
* @throws \think\exception\PDOException * @throws \think\exception\PDOException
*/ */
protected function execute(Input $input, Output $output) protected function execute(\think\console\Input $input, \think\console\Output $output)
{ {
// 自动取消30分钟未支付的订单 // 自动取消30分钟未支付的订单
$this->autoCancelOrder(); $this->autoCancelOrder();
// 清理一天前未支付的订单 // 清理一天前未支付的订单
$this->autoCleanOrder(); $this->autoRemoveOrder();
// 订单自动退款处理 // 订单自动退款处理
// $this->autoRefundOrder(); // $this->autoRefundOrder();
// 提现自动打款处理 // 提现自动打款处理
@ -61,8 +58,9 @@ class AutoRun extends Command
*/ */
private function autoCancelOrder() private function autoCancelOrder()
{ {
$where = [['create_at', '<', date('Y-m-d H:i:s', strtotime('-30 minutes'))]]; $datetime = $this->getDatetime('store_order_wait_time');
$count = Db::name('StoreOrder')->where(['pay_state' => '0'])->whereIn('status', ['1', '2'])->where($where)->update([ $where = [['status', 'in', ['1', '2']], ['pay_state', 'eq', '0'], ['create_at', '<', $datetime]];
$count = Db::name('StoreOrder')->where($where)->update([
'status' => '0', 'status' => '0',
'cancel_state' => '1', 'cancel_state' => '1',
'cancel_at' => date('Y-m-d H:i:s'), 'cancel_at' => date('Y-m-d H:i:s'),
@ -83,14 +81,15 @@ class AutoRun extends Command
* @throws \think\exception\DbException * @throws \think\exception\DbException
* @throws \think\exception\PDOException * @throws \think\exception\PDOException
*/ */
private function autoCleanOrder() private function autoRemoveOrder()
{ {
$where = [['create_at', '<', date('Y-m-d H:i:s', strtotime('-1 day'))]]; $datetime = $this->getDatetime('store_order_clear_time');
$list = Db::name('StoreOrder')->where(['pay_state' => '0'])->where($where)->limit(20)->select(); $where = [['status', 'eq', '0'], ['pay_state', 'eq', '0'], ['create_at', '<', $datetime]];
if (count($order_nos = array_unique(array_column($list, 'order_no'))) > 0) { $list = Db::name('StoreOrder')->where($where)->limit(20)->select();
$this->output->info("自动删除前一天已经取消的订单:\n\t" . join(',' . PHP_EOL . "\t", $order_nos)); if (count($orderNos = array_unique(array_column($list, 'order_no'))) > 0) {
Db::name('StoreOrder')->whereIn('order_no', $order_nos)->delete(); $this->output->info("自动删除前一天已经取消的订单:" . PHP_EOL . join(',' . PHP_EOL, $orderNos));
Db::name('StoreOrderList')->whereIn('order_no', $order_nos)->delete(); Db::name('StoreOrder')->whereIn('order_no', $orderNos)->delete();
Db::name('StoreOrderList')->whereIn('order_no', $orderNos)->delete();
} else { } else {
$this->output->comment('没有需要自动删除前一天已经取消的订单!'); $this->output->comment('没有需要自动删除前一天已经取消的订单!');
} }
@ -172,4 +171,17 @@ class AutoRun extends Command
} }
} }
/**
* 获取配置时间
* @param string $code
* @return string
* @throws \think\Exception
* @throws \think\exception\PDOException
*/
private function getDatetime($code)
{
$minutes = intval(sysconf($code) * 60);
return date('Y-m-d H:i:s', strtotime("-{$minutes} minutes"));
}
} }

View File

@ -14,7 +14,7 @@
namespace app\store\controller; namespace app\store\controller;
use app\store\service\Extend; use app\store\service\ExtendService;
use library\Controller; use library\Controller;
/** /**
@ -35,7 +35,7 @@ class Config extends Controller
$this->applyCsrfToken(); $this->applyCsrfToken();
$this->title = '商城参数配置'; $this->title = '商城参数配置';
if ($this->request->isGet()) { if ($this->request->isGet()) {
$this->query = Extend::querySmsBalance(); $this->query = ExtendService::querySmsBalance();
$this->fetch(); $this->fetch();
} else { } else {
foreach ($this->request->post() as $k => $v) sysconf($k, $v); foreach ($this->request->post() as $k => $v) sysconf($k, $v);
@ -43,4 +43,22 @@ class Config extends Controller
} }
} }
/**
* 商城短信配置
* @throws \think\Exception
* @throws \think\exception\PDOException
*/
public function sms()
{
$this->applyCsrfToken();
$this->title = '商城短信配置';
if ($this->request->isGet()) {
$this->query = ExtendService::querySmsBalance();
$this->fetch();
} else {
foreach ($this->request->post() as $k => $v) sysconf($k, $v);
$this->success('商城短信配置保存成功!');
}
}
} }

View File

@ -95,7 +95,7 @@ class ExpressCompany extends Controller
/** /**
* 删除快递公司 * 删除快递公司
*/ */
public function del() public function remove()
{ {
$this->_delete($this->table); $this->_delete($this->table);
} }

View File

@ -83,7 +83,7 @@ class ExpressProvince extends Controller
/** /**
* 删除配送省份 * 删除配送省份
*/ */
public function del() public function remove()
{ {
$this->applyCsrfToken(); $this->applyCsrfToken();
$this->_delete($this->table); $this->_delete($this->table);

View File

@ -21,11 +21,6 @@ class ExpressTemplate extends Controller
/** /**
* 邮费模板管理 * 邮费模板管理
* @throws \think\Exception
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
* @throws \think\exception\PDOException
*/ */
public function index() public function index()
{ {

View File

@ -91,7 +91,7 @@ class Goods extends Controller
]); ]);
if (!empty($data)) { if (!empty($data)) {
Db::name('StoreGoodsStock')->insertAll($data); Db::name('StoreGoodsStock')->insertAll($data);
\app\store\service\Goods::syncStock($post['id']); \app\store\service\GoodsService::syncStock($post['id']);
$this->success('商品信息入库成功!'); $this->success('商品信息入库成功!');
} }
} }
@ -104,7 +104,7 @@ class Goods extends Controller
*/ */
public function add() public function add()
{ {
$this->title = '添加商品'; $this->title = '添加商品信息';
$this->isAddMode = '1'; $this->isAddMode = '1';
return $this->_form($this->table, 'form'); return $this->_form($this->table, 'form');
} }
@ -115,7 +115,7 @@ class Goods extends Controller
*/ */
public function edit() public function edit()
{ {
$this->title = '编辑商品'; $this->title = '编辑商品信息';
$this->isAddMode = '0'; $this->isAddMode = '0';
return $this->_form($this->table, 'form'); return $this->_form($this->table, 'form');
} }
@ -182,7 +182,7 @@ class Goods extends Controller
/** /**
* 删除商品信息 * 删除商品信息
*/ */
public function del() public function remove()
{ {
$this->_delete($this->table); $this->_delete($this->table);
} }

View File

@ -83,7 +83,7 @@ class GoodsCate extends Controller
/** /**
* 删除商品分类 * 删除商品分类
*/ */
public function del() public function remove()
{ {
$this->_delete($this->table); $this->_delete($this->table);
} }

View File

@ -40,7 +40,8 @@ class Member extends Controller
public function index() public function index()
{ {
$this->title = '会员信息管理'; $this->title = '会员信息管理';
$this->_query($this->table)->like('nickname,phone')->equal('vip_level')->dateBetween('create_at')->order('id desc')->page(); $query = $this->_query($this->table)->like('nickname,phone')->equal('vip_level');
$query->dateBetween('create_at')->order('id desc')->page();
} }
/** /**

View File

@ -40,7 +40,16 @@ class Message extends Controller
public function index() public function index()
{ {
$this->title = '短信发送管理'; $this->title = '短信发送管理';
$this->_query($this->table)->like('phone,content,result')->dateBetween('create_at')->order('id desc')->page(); $query = $this->_query($this->table)->like('phone,content,result');
$query->dateBetween('create_at')->order('id desc')->page();
}
/**
* 删除短信记录
*/
public function remove()
{
$this->_delete($this->table);
} }
} }

View File

@ -83,7 +83,7 @@ class Order extends Controller
$this->_form($this->table); $this->_form($this->table);
} }
/*** /**
* 快递追踪查询 * 快递追踪查询
*/ */
public function expressQuery() public function expressQuery()

View File

@ -14,7 +14,7 @@
namespace app\store\controller\api; namespace app\store\controller\api;
use app\store\service\Order; use app\store\service\OrderService;
use think\Db; use think\Db;
/** /**
@ -64,7 +64,7 @@ class Notify
'pay_price' => $pay_price, 'pay_state' => '1', 'pay_at' => date('Y-m-d H:i:s'), 'pay_price' => $pay_price, 'pay_state' => '1', 'pay_at' => date('Y-m-d H:i:s'),
]); ]);
// 调用会员升级机制 // 调用会员升级机制
Order::update($order['order_no']); OrderService::update($order['order_no']);
return $result !== false; return $result !== false;
} }

View File

@ -15,7 +15,7 @@
namespace app\store\controller\api\member; namespace app\store\controller\api\member;
use app\store\controller\api\Member; use app\store\controller\api\Member;
use app\store\service\Extend; use app\store\service\ExtendService;
use think\Db; use think\Db;
/** /**
@ -79,7 +79,7 @@ class Center extends Member
$this->error('获取短信模板失败,联系管理员配置!'); $this->error('获取短信模板失败,联系管理员配置!');
} }
$cache = cache($cachekey); $cache = cache($cachekey);
if (Extend::sendSms($this->mid, $phone, str_replace('{code}', $code, $content))) { if (ExtendService::sendSms($this->mid, $phone, str_replace('{code}', $code, $content))) {
$dtime = ($cache['time'] + 120 < time()) ? 0 : (120 - time() + $cache['time']); $dtime = ($cache['time'] + 120 < time()) ? 0 : (120 - time() + $cache['time']);
$this->success('短信验证码发送成功!', ['time' => $dtime]); $this->success('短信验证码发送成功!', ['time' => $dtime]);
} }

View File

@ -15,7 +15,7 @@
namespace app\store\controller\api\member; namespace app\store\controller\api\member;
use app\store\controller\api\Member; use app\store\controller\api\Member;
use app\store\service\Goods; use app\store\service\GoodsService;
use library\tools\Data; use library\tools\Data;
use think\Db; use think\Db;
@ -95,7 +95,7 @@ class Order extends Member
Db::name('StoreOrder')->insert($order); Db::name('StoreOrder')->insert($order);
Db::name('StoreOrderList')->insertAll($orderList); Db::name('StoreOrderList')->insertAll($orderList);
// 同步商品库存及销量 // 同步商品库存及销量
foreach (array_unique(array_column($orderList, 'goods_id')) as $goodsId) Goods::syncStock($goodsId); foreach (array_unique(array_column($orderList, 'goods_id')) as $goodsId) GoodsService::syncStock($goodsId);
$this->success('订单创建成功,请补全收货信息后支付!', ['order' => $order]); $this->success('订单创建成功,请补全收货信息后支付!', ['order' => $order]);
} catch (\think\exception\HttpResponseException $exception) { } catch (\think\exception\HttpResponseException $exception) {
throw $exception; throw $exception;
@ -252,7 +252,7 @@ class Order extends Member
'cancel_at' => date('Y-m-d H:i:s'), 'cancel_at' => date('Y-m-d H:i:s'),
'cancel_desc' => '用户主动取消订单!', 'cancel_desc' => '用户主动取消订单!',
]); ]);
if ($result !== false && \app\store\service\Order::syncStock($order['order_no'])) { if ($result !== false && \app\store\service\OrderService::syncStock($order['order_no'])) {
$this->success('订单取消成功!'); $this->success('订单取消成功!');
} }
$this->error('订单取消失败,请稍候再试!'); $this->error('订单取消失败,请稍候再试!');

View File

@ -1,71 +0,0 @@
<?php
namespace app\store\service;
use think\Db;
/**
* 商城邮费服务
* Class Express
* @package app\store\service
*/
class Express
{
/**
* 订单邮费计算
* @param string $province 配送省份
* @param string $number 计费数量
* @param string $amount 订单金额
* @return array
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public static function price($province, $number, $amount)
{
// 读取对应的模板规则
$map = [['is_default', 'eq', '0'], ['rule', 'like', "%{$province}%"]];
$rule = Db::name('StoreExpressTemplate')->where($map)->find();
if (!empty($rule)) return self::buildData($rule, '普通模板', $number, $amount);
$rule = Db::name('StoreExpressTemplate')->where(['is_default' => '1'])->find();
return self::buildData($rule, '默认模板', $number, $amount);
}
/**
* 生成邮费数据
* @param array $rule 模板规则
* @param string $type 模板类型
* @param integer $number 计费件数
* @param double $amount 订单金额
* @return array
*/
protected static function buildData($rule, $type, $number, $amount)
{
// 异常规则
if (empty($rule)) return [
'express_price' => 0.00, 'express_type' => '未知模板', 'express_desc' => '未匹配到邮费模板',
];
// 满减免邮
if ($rule['order_reduction_state'] && $amount >= $rule['order_reduction_price']) {
return [
'express_price' => 0.00, 'express_type' => $type,
'express_desc' => "订单总金额满{$rule['order_reduction_price']}元减免全部邮费",
];
}
// 首重计费
if ($number <= $rule['first_number']) return [
'express_price' => $rule['first_price'], 'express_type' => $type,
'express_desc' => "首件计费,{$rule['first_number']}件及{$rule['first_number']}以内计费{$rule['first_price']}",
];
// 续重计费
list($price1, $price2) = [$rule['first_price'], 0];
if ($rule['next_number'] > 0 && $rule['next_price'] > 0) {
$price2 = $rule['next_price'] * ceil(($number - $rule['first_number']) / $rule['next_number']);
}
return [
'express_price' => $price1 + $price2, 'express_type' => $type,
'express_desc' => "续件计费,超出{$rule['first_number']}件,首件费用{$rule['first_price']}元 + 续件费用{$price2}",
];
}
}

View File

@ -1,82 +0,0 @@
<?php
// +----------------------------------------------------------------------
// | framework
// +----------------------------------------------------------------------
// | 版权所有 2014~2018 广州楚才信息科技有限公司 [ http://www.cuci.cc ]
// +----------------------------------------------------------------------
// | 官方网站: http://framework.thinkadmin.top
// +----------------------------------------------------------------------
// | 开源协议 ( https://mit-license.org )
// +----------------------------------------------------------------------
// | github开源项目https://github.com/zoujingli/framework
// +----------------------------------------------------------------------
namespace app\store\service;
use library\tools\Http;
use think\Db;
/**
* 业务扩展服务
* Class Extend
* @package app\store\service
*/
class Extend
{
/**
* 发送短信验证码
* @param string $mid 会员ID
* @param string $phone 手机号
* @param string $content 短信内容
* @param string $productid 短信通道ID
* @return boolean
* @throws \think\Exception
* @throws \think\exception\PDOException
*/
public static function sendSms($mid, $phone, $content, $productid = '676767')
{
$tkey = date("YmdHis");
$data = [
'tkey' => $tkey,
'mobile' => $phone,
'content' => $content,
'username' => sysconf('sms_zt_username'),
'productid' => $productid,
'password' => md5(md5(sysconf('sms_zt_password')) . $tkey),
];
$result = Http::post('http://www.ztsms.cn/sendNSms.do', $data);
list($code, $msg) = explode(',', $result . ',');
$insert = ['mid' => $mid, 'phone' => $phone, 'content' => $content, 'result' => $result];
Db::name('StoreMemberSmsHistory')->insert($insert);
return intval($code) === 1;
}
/**
* 查询短信余额
* @return array
* @throws \think\Exception
* @throws \think\exception\PDOException
*/
public static function querySmsBalance()
{
$tkey = date("YmdHis");
$data = [
'tkey' => $tkey,
'username' => sysconf('sms_zt_username'),
'password' => md5(md5(sysconf('sms_zt_password')) . $tkey),
];
$result = Http::post('http://www.ztsms.cn/balanceN.do', $data);
if ($result > -1) {
return ['code' => 1, 'num' => $result, 'msg' => '获取短信剩余条数成功!'];
} elseif ($result > -2) {
return ['code' => 0, 'num' => '0', 'msg' => '用户名或者密码不正确!'];
} elseif ($result > -3) {
return ['code' => 0, 'num' => '0', 'msg' => 'tkey不正确'];
} elseif ($result > -4) {
return ['code' => 0, 'num' => '0', 'msg' => '用户不存在或用户停用!'];
}
}
}

View File

@ -1,70 +0,0 @@
<?php
// +----------------------------------------------------------------------
// | framework
// +----------------------------------------------------------------------
// | 版权所有 2014~2018 广州楚才信息科技有限公司 [ http://www.cuci.cc ]
// +----------------------------------------------------------------------
// | 官方网站: http://framework.thinkadmin.top
// +----------------------------------------------------------------------
// | 开源协议 ( https://mit-license.org )
// +----------------------------------------------------------------------
// | github开源项目https://github.com/zoujingli/framework
// +----------------------------------------------------------------------
namespace app\store\service;
use think\Db;
/**
* 商品数据管理
* Class Goods
* @package app\store\logic
*/
class Goods
{
/**
* 同步商品库存信息
* @param integer $goodsId
* @return boolean
* @throws \think\Exception
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
* @throws \think\exception\PDOException
*/
public static function syncStock($goodsId)
{
// 商品入库统计
$fields = "goods_id,goods_spec,ifnull(sum(number_stock),0) number_stock";
$stockList = Db::name('StoreGoodsStock')->field($fields)->where(['goods_id' => $goodsId])->group('goods_id,goods_spec')->select();
// 商品销量统计
$where = [['b.goods_id', 'eq', $goodsId], ['a.status', 'in', ['1', '2', '3', '4', '5']]];
$fields = 'b.goods_id,b.goods_spec,ifnull(sum(b.number_goods),0) number_sales';
$salesList = Db::table('store_order a')->field($fields)->leftJoin('store_order_list b', 'a.order_no=b.order_no')->where($where)->group('b.goods_id,b.goods_spec')->select();
// 组装更新数据
$dataList = [];
foreach (array_merge($stockList, $salesList) as $vo) {
$key = "{$vo['goods_id']}@@{$vo['goods_spec']}";
$dataList[$key] = isset($dataList[$key]) ? array_merge($dataList[$key], $vo) : $vo;
if (empty($dataList[$key]['number_sales'])) $dataList[$key]['number_sales'] = '0';
if (empty($dataList[$key]['number_stock'])) $dataList[$key]['number_stock'] = '0';
}
unset($salesList, $stockList);
// 更新商品规格销量及库存
foreach ($dataList as $vo) Db::name('StoreGoodsList')->where([
'goods_id' => $goodsId,
'goods_spec' => $vo['goods_spec'],
])->update([
'number_stock' => $vo['number_stock'],
'number_sales' => $vo['number_sales'],
]);
// 更新商品主体销量及库存
Db::name('StoreGoods')->where(['id' => $goodsId])->update([
'number_stock' => intval(array_sum(array_column($dataList, 'number_stock'))),
'number_sales' => intval(array_sum(array_column($dataList, 'number_sales'))),
]);
return true;
}
}

View File

@ -1,66 +0,0 @@
<?php
// +----------------------------------------------------------------------
// | framework
// +----------------------------------------------------------------------
// | 版权所有 2014~2018 广州楚才信息科技有限公司 [ http://www.cuci.cc ]
// +----------------------------------------------------------------------
// | 官方网站: http://framework.thinkadmin.top
// +----------------------------------------------------------------------
// | 开源协议 ( https://mit-license.org )
// +----------------------------------------------------------------------
// | github开源项目https://github.com/zoujingli/framework
// +----------------------------------------------------------------------
namespace app\store\service;
use think\Db;
/**
* 订单服务管理器
* Class Order
* @package app\store\service
*/
class Order
{
/**
* 根据订单号升级会员等级
* @param string $order_no 订单单号
* @return boolean
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public static function update($order_no)
{
// @todo 更新订单状态
}
/**
* 根据订单同步库存销量
* @param string $order_no
* @return boolean
* @throws \think\Exception
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
* @throws \think\exception\PDOException
*/
public static function syncStock($order_no)
{
$map = ['order_no' => $order_no];
$goodsIds = Db::name('StoreOrderList')->where($map)->column('goods_id');
foreach (array_unique($goodsIds) as $goodsId) if (!Goods::syncStock($goodsId)) return false;
return true;
}
/**
* 订单利润计算
* @param string $order_no
* @return boolean
*/
public static function profit($order_no = '')
{
// @todo 计算订单返佣
}
}

View File

@ -1,71 +1,40 @@
{extend name="admin@main"} {extend name="admin@main"}
{block name="content"} {block name="content"}
<form onsubmit="return false;" data-auto="true" action="{:request()->url()}" method="post" class='layui-form layui-card' autocomplete="off"> <form onsubmit="return false;" data-auto="true" action="{:request()->url()}" method="post" class='layui-form layui-card' style="max-width:1000px" autocomplete="off">
<div class="layui-card-body" style="padding-left:40px"> <div class="layui-card-body think-box-shadow padding-left-40">
<div style="padding:20px 40px">
<fieldset> <label class="layui-form-item margin-top-20 block relative">
<span class="color-green margin-right-10">商城展示名称</span><span class="nowrap color-desc">StoreTitle</span>
<legend class="layui-bg-cyan">平台短信配置</legend> <input name="store_title" required placeholder="请输入商城展示名称" value="{:sysconf('store_title')}" class="layui-input">
<p class="help-block">订单支付等待时长,新下订单未在此时间内容完成支付将会被自动取消</p>
{if empty($query.code)}
<div class="layui-code border-0">{$query.msg|default=''}</div>
{elseif $query.code eq 1}
<div class="layui-code border-0">平台剩余 {$query.num|default=0} 条可用短信,{$query.msg|default=''}</div>
{/if}
<div class="layui-form-item">
<label>
<span class="color-green margin-right-10 font-s14">短信平台账号</span><span class="nowrap color-desc">Username</span>
<span class="block relative">
<input name="sms_zt_username" required placeholder="请输入助通短信平台账号" value="{:sysconf('sms_zt_username')}" class="layui-input">
</span>
</label> </label>
<p class="help-block">助通短信平台账号,可以联系客服获取账号与密码。</p>
</div>
<div class="layui-form-item"> <label class="layui-form-item margin-top-20 block relative">
<label> <span class="color-green margin-right-10">未订单的支付等待时长(小时)</span><span class="nowrap color-desc">OrderWaitTime</span>
<span class="color-green margin-right-10 font-s14">短信平台密码</span><span class="nowrap color-desc">Password</span> <input onblur="this.value=Math.abs(parseFloat(this.value)||0.00).toFixed(2)" name="store_order_wait_time" required placeholder="请输入订单支付等待时长" value="{:sysconf('store_order_wait_time')}" class="layui-input">
<span class="block relative"> <p class="help-block">订单支付等待时长,新下订单未在此时间内容完成支付将会被自动取消</p>
<input name="sms_zt_password" required placeholder="请输入助通短信平台密码" value="{:sysconf('sms_zt_password')}" class="layui-input">
</span>
</label> </label>
<p class="help-block">助通短信平台账号,可以联系客服获取账号与密码。</p>
</div>
<div class="layui-form-item"> <label class="layui-form-item margin-top-20 block relative">
<label> <span class="color-green margin-right-10">已取消的订单清理时长(小时)</span><span class="nowrap color-desc">OrderClearTime</span>
<span class="color-green margin-right-10 font-s14">短信发送安全码</span><span class="nowrap color-desc">Secure</span> <input onblur="this.value=Math.abs(parseFloat(this.value)||0.00).toFixed(2)" name="store_order_clear_time" required placeholder="请输入已取消订单清理时长" value="{:sysconf('store_order_clear_time')}" class="layui-input">
<span class="block relative"> <p class="help-block">已取消订单清理时长,已取消未支付订单将在此时间点将被自动清理掉</p>
<input name="sms_secure" required placeholder="请输入短信发送安全码" value="{:sysconf('sms_secure')}" class="layui-input">
</span>
</label> </label>
<p class="help-block">短信发送安全码,调用接口发短信时需要传入此参数。</p>
</div>
<div class="layui-form-item"> <label class="layui-form-item margin-top-20 block relative">
<label> <span class="color-green margin-right-10">已发货订单自动确认收货时长(小时)</span><span class="nowrap color-desc">OrderConfirmTime</span>
<span class="color-green margin-right-10 font-s14">注册短信模板</span><span class="nowrap color-desc">Template</span> <input onblur="this.value=Math.abs(parseFloat(this.value)||0.00).toFixed(2)" name="store_order_confirm_time" required placeholder="请输入已发货订单自动确认收货时长" value="{:sysconf('store_order_confirm_time')}" class="layui-input">
<span class="block relative"> <p class="help-block">已取消订单清理时长,已取消未支付订单将在此时间点将被自动清理掉</p>
<textarea class="layui-textarea" required name="sms_reg_template" placeholder="请输入助通短信平台密码">{:sysconf('sms_reg_template')}</textarea>
</span>
</label> </label>
<p class="help-block">会员注册短信模板,验证码变量使用 {code} 代替。</p>
</div>
<div class="layui-form-item text-center margin-top-20 padding-bottom-20">
<div class="layui-form-item text-center margin-top-20">
<div class="layui-row">
<div class="layui-col-sm8 layui-col-md6">
<button class="layui-btn" type="submit">保存配置</button> <button class="layui-btn" type="submit">保存配置</button>
</div> </div>
</div>
</div>
</fieldset>
</div> </div>
</div>
</form> </form>
{/block} {/block}

View File

@ -4,15 +4,16 @@
{if auth("store/express_company/add")} {if auth("store/express_company/add")}
<button data-modal='{:url("add")}' data-title="添加快递" class='layui-btn layui-btn-sm layui-btn-primary'>添加快递</button> <button data-modal='{:url("add")}' data-title="添加快递" class='layui-btn layui-btn-sm layui-btn-primary'>添加快递</button>
{/if} {/if}
{if auth("store/express_company/del")} {if auth("store/express_company/remove")}
<button data-action='{:url("del")}' data-rule="id#{key}" class='layui-btn layui-btn-sm layui-btn-primary'>删除快递</button> <button data-action='{:url("remove")}' data-rule="id#{key}" class='layui-btn layui-btn-sm layui-btn-primary'>删除快递</button>
{/if} {/if}
{/block} {/block}
{block name="content"} {block name="content"}
<div class="think-box-shadow">
<table class="layui-table" lay-skin="line"> <table class="layui-table" lay-skin="line">
<caption class="margin-bottom-10 text-left">{include file='express_company/index_search'}</caption> <caption class="margin-bottom-10 text-left">{include file='express_company/index_search'}</caption>
<!--{notempty name='list'}--> {notempty name='list'}
<thead> <thead>
<tr> <tr>
<th class='list-table-check-td think-checkbox'> <th class='list-table-check-td think-checkbox'>
@ -28,9 +29,9 @@
<th></th> <th></th>
</tr> </tr>
</thead> </thead>
<!--{/notempty}--> {/notempty}
<tbody> <tbody>
<!--{foreach $list as $key=>$vo}--> {foreach $list as $key=>$vo}
<tr data-dbclick> <tr data-dbclick>
<td class='list-table-check-td think-checkbox'> <td class='list-table-check-td think-checkbox'>
<input class="list-check-box" value='{$vo.id}' type='checkbox'> <input class="list-check-box" value='{$vo.id}' type='checkbox'>
@ -56,16 +57,15 @@
<a class="layui-btn layui-btn-xs layui-btn-warm" data-action="{:url('resume')}" data-value="id#{$vo.id};status#1">启 用</a> <a class="layui-btn layui-btn-xs layui-btn-warm" data-action="{:url('resume')}" data-value="id#{$vo.id};status#1">启 用</a>
{/if} {/if}
{if auth("store/express_company/del")} {if auth("store/express_company/remove")}
<a class="layui-btn layui-btn-xs layui-btn-danger" data-confirm="确定要删除数据吗?" data-action="{:url('del')}" data-value="id#{$vo.id}">删 除</a> <a class="layui-btn layui-btn-xs layui-btn-danger" data-confirm="确定要删除数据吗?" data-action="{:url('remove')}" data-value="id#{$vo.id}">删 除</a>
{/if} {/if}
</td> </td>
</tr> </tr>
<!--{/foreach}--> {/foreach}
</tbody> </tbody>
</table> </table>
{empty name='list'}<span class="notdata">没有记录哦</span>{else}{$pagehtml|raw|default=''}{/empty} {empty name='list'}<span class="notdata">没有记录哦</span>{else}{$pagehtml|raw|default=''}{/empty}
</div>
{/block} {/block}

View File

@ -6,13 +6,14 @@
<button data-modal='{:url("add")}' data-title="添加省份" class='layui-btn layui-btn-sm layui-btn-primary'>添加省份</button> <button data-modal='{:url("add")}' data-title="添加省份" class='layui-btn layui-btn-sm layui-btn-primary'>添加省份</button>
<!--{/if}--> <!--{/if}-->
<!--{if auth("store/express_province/del")}--> {if auth("store/express_province/remove")}
<button data-action='{:url("del")}' data-csrf="{:systoken('store/express_province/del')}" data-rule="id#{key}" class='layui-btn layui-btn-sm layui-btn-primary'>删除省份</button> <button data-action='{:url("remove")}' data-csrf="{:systoken('store/express_province/remove')}" data-rule="id#{key}" class='layui-btn layui-btn-sm layui-btn-primary'>删除省份</button>
<!--{/if}--> {/if}
{/block} {/block}
{block name="content"} {block name="content"}
<div class="think-box-shadow">
<table class="layui-table" lay-skin="line"> <table class="layui-table" lay-skin="line">
<caption class="margin-bottom-10 text-left">{include file='express_province/index_search'}</caption> <caption class="margin-bottom-10 text-left">{include file='express_province/index_search'}</caption>
{notempty name='list'} {notempty name='list'}
@ -56,17 +57,15 @@
<a class="layui-btn layui-btn-warm layui-btn-xs" data-action="{:url('resume')}" data-value="id#{$vo.id};status#1" data-csrf="{:systoken('store/express_province/resume')}">启 用</a> <a class="layui-btn layui-btn-warm layui-btn-xs" data-action="{:url('resume')}" data-value="id#{$vo.id};status#1" data-csrf="{:systoken('store/express_province/resume')}">启 用</a>
{/if} {/if}
{if auth("store/express_province/del")} {if auth("store/express_province/remove")}
<a class="layui-btn layui-btn-danger layui-btn-xs" data-confirm="确定要删除数据吗?" data-action="{:url('del')}" data-value="id#{$vo.id}" data-csrf="{:systoken('store/express_province/del')}">删 除</a> <a class="layui-btn layui-btn-danger layui-btn-xs" data-confirm="确定要删除数据吗?" data-action="{:url('remove')}" data-value="id#{$vo.id}" data-csrf="{:systoken('store/express_province/remove')}">删 除</a>
{/if} {/if}
</td> </td>
</tr> </tr>
{/foreach} {/foreach}
</tbody> </tbody>
{/notempty} {/notempty}
</table> </table>
{empty name='list'}<span class="notdata">没有记录哦</span>{else}{$pagehtml|raw|default=''}{/empty} {empty name='list'}<span class="notdata">没有记录哦</span>{else}{$pagehtml|raw|default=''}{/empty}
</div>
{/block} {/block}

View File

@ -1,9 +1,9 @@
{extend name="admin@main"} {extend name="admin@main"}
{block name="content"} {block name="content"}
<form onsubmit="return false;" data-auto="true" action="{:request()->url()}" method="post" class='layui-form layui-card' autocomplete="off"> <form onsubmit="return false;" data-auto="true" action="{:request()->url()}" method="post" class='layui-form layui-card' style="max-width:1000px" autocomplete="off">
<div class="layui-card-body" style="padding-left:40px"> <div class="layui-card-body think-box-shadow padding-bottom-20" style="padding-left:40px">
<div data-item-container> <div data-item-container>
{foreach $list as $index=>$item} {foreach $list as $index=>$item}

View File

@ -1,35 +1,40 @@
{extend name='admin@main'} {extend name='admin@main'}
{block name="content"} {block name="content"}
{include file='store@goods/form_style'}
<form onsubmit="return false;" id="GoodsForm" data-auto="true" method="post" class='layui-form layui-card' autocomplete="off"> <form onsubmit="return false;" id="GoodsForm" data-auto="true" method="post" class='layui-form layui-card' autocomplete="off">
<div class="layui-card-body padding-left-40"> <div class="layui-card-body think-box-shadow padding-left-40">
<div class="layui-form-item block relative"> <div class="layui-form-item layui-row layui-col-space15">
<h3 class="color-green"><sup class='color-red font-s14 absolute' style="margin-left:-10px">*</sup>商品分类</h3> <label class="layui-col-xs3 relative">
<select class="layui-select" name="cate_id" lay-search> <span class="color-green">商品分类</span>
<select class="layui-select" required name="cate_id" lay-search>
{foreach $cates as $cate} {foreach $cates as $cate}
{if isset($vo.cate_id) and $vo.cate_id eq $cate.id} {if isset($vo.cate_id) and $vo.cate_id eq $cate.id}
<option selected value="{$cate.id}">{$cate.title|default=''}</option> <option selected value="{$cate.id}">{$cate.id} - {$cate.title|default=''}</option>
{else} {else}
<option value="{$cate.id}">{$cate.title|default=''}</option> <option value="{$cate.id}">{$cate.id} - {$cate.title|default=''}</option>
{/if} {/if}
{/foreach} {/foreach}
</select> </select>
</label>
<label class="layui-col-xs9 relative">
<span class="color-green">商品名称</span>
<input name="title" required class="layui-input" placeholder="请输入商品名称" value="{$vo.title|default=''}">
</label>
</div> </div>
<div class="layui-form-item block relative">
<h3 class="color-green"><sup class='color-red font-s14 absolute' style="margin-left:-10px">*</sup>商品名称</h3>
<input name="title" required class="layui-input" placeholder="请输入商品名称" value="{$vo.title|default=''}">
</div>
<div class="layui-form-item"> <div class="layui-form-item">
<h3 class="color-green"><sup class='color-red font-s14 absolute' style="margin-left:-10px">*</sup>商品图片</h3> <span class="color-green label-required-prev">商品LOGO及轮播展示图片</span>
<table class="layui-table"> <table class="layui-table">
<thead> <thead>
<tr> <tr>
<th class="text-center">LOGO</th> <th class="text-center">LOGO</th>
<th class="text-left">商品图片</th> <th class="text-left">展示图片</th>
</tr> </tr>
<tr> <tr>
<td width="90px" class="text-center"><input name="logo" type="hidden" value="{$vo.logo|default=''}"></td> <td width="90px" class="text-center"><input name="logo" type="hidden" value="{$vo.logo|default=''}"></td>
@ -40,42 +45,25 @@
<script>$('[name="logo"]').uploadOneImage(), $('[name="image"]').uploadMultipleImage()</script> <script>$('[name="logo"]').uploadOneImage(), $('[name="image"]').uploadMultipleImage()</script>
</div> </div>
<fieldset class="margin-bottom-15">
<legend>快递运费及分成比例</legend>
<div>
<div class="layui-form-item block relative">
<div class="inline-block">
<div class="layui-unselect layui-form-radio">
<label>快递运费 <input onblur="this.value=(parseFloat(this.value)||0).toFixed(2)" name="price_express" value="{$vo.price_express|default='0.00'}" class="inline-block text-center font-s12 inner-input"> 元,</label>
<label>分成比例 <input onblur="this.value=(parseFloat(this.value)||0).toFixed(4)" name="price_rate" value="{$vo.price_rate|default='0.00'}" class="inline-block text-center font-s12 inner-input"> %</label>
</div>
</div>
</div>
</div>
</fieldset>
<div class="layui-form-item"> <div class="layui-form-item">
<h3 class="color-green"> <span class="color-green label-required-prev">商品规格及商品SKU绑定<span class="color-red font-s12">(规格填写后不允许再次修改)</span></span>
<sup class='color-red font-s14 absolute' style="margin-left:-10px">*</sup>
商品规格<span class="color-desc font-s10">最多支持3个规格分组每个分组最多支持5个规格属性仅添加商品时可编辑内容</span>
</h3>
<div ng-repeat="x in specs track by $index" style="display:none" class="margin-bottom-10" ng-class="{true:'layui-show'}[isAddMode&&specs.length>0]"> <div ng-repeat="x in specs track by $index" style="display:none" class="margin-bottom-10" ng-class="{true:'layui-show'}[isAddMode&&specs.length>0]">
<div class="goods-spec-box padding-10 margin-0 relative" style="background:#ddd"> <div class="goods-spec-box padding-10 margin-0 relative" style="background:#ddd">
<span class="text-center goods-spec-title">名称</span> <span class="text-center goods-spec-title">分组</span>
<input ng-model="x.name" required placeholder="请输入分组"> <label class="label-required-null inline-block"><input ng-blur="x.name=trimSpace(x.name)" ng-model="x.name" required placeholder="请输入分组名称"></label>
<div class="fa-pull-right"> <div class="pull-right">
<a class="layui-btn layui-btn-sm layui-btn-primary goods-spec-btn" ng-click="addSpecVal(x.list)">增加</a>
<a class="layui-btn layui-btn-sm layui-btn-primary goods-spec-btn" ng-class="{false:'layui-bg-gray'}[$index>0]" ng-click="upSpecRow(specs,$index)">上移</a> <a class="layui-btn layui-btn-sm layui-btn-primary goods-spec-btn" ng-class="{false:'layui-bg-gray'}[$index>0]" ng-click="upSpecRow(specs,$index)">上移</a>
<a class="layui-btn layui-btn-sm layui-btn-primary goods-spec-btn" ng-class="{false:'layui-bg-gray'}[$index<specs.length-1]" ng-click="dnSpecRow(specs,$index)">下移</a> <a class="layui-btn layui-btn-sm layui-btn-primary goods-spec-btn" ng-class="{false:'layui-bg-gray'}[$index<specs.length-1]" ng-click="dnSpecRow(specs,$index)">下移</a>
<a ng-if="specs.length>1" class="layui-btn layui-btn-sm layui-btn-primary goods-spec-btn" ng-click="delSpecRow(specs,$index)">删除</a> <a class="layui-btn layui-btn-sm layui-btn-primary goods-spec-btn" ng-click="delSpecRow(specs,$index)" ng-if="specs.length>1">删除</a>
</div> </div>
</div> </div>
<div class="block padding-10 layui-bg-gray" ng-if="x.list && x.list.length > 0"> <div class="goods-spec-box padding-10 margin-0 layui-bg-gray block relative" ng-if="x.list && x.list.length > 0">
<label class="goods-spec-box inline-block nowrap margin-bottom-0" ng-repeat="xx in x.list"> <label class="label-required-null inline-block margin-right-10 margin-bottom-5 relative nowrap" ng-repeat="xx in x.list">
<input type="checkbox" lay-ignore ng-model="xx.check" ng-click="xx.check=checkListChecked(x.list,$event.target.checked)"> <input type="checkbox" lay-ignore ng-model="xx.check" ng-click="xx.check=checkListChecked(x.list,$event.target.checked)">
<input type="text" ng-model="xx.name" ng-keyup="xx.name=$event.target.value" required placeholder="请输入规格"> <input type="text" ng-blur="xx.name=trimSpace(xx.name)" ng-model="xx.name" ng-keyup="xx.name=$event.target.value" required placeholder="请输入规格">
<a ng-if="x.list.length>1" ng-click="x.list=delSpecVal(x.list,$index)" class="layui-icon layui-icon-close font-s12 goods-spec-close"></a> <a ng-if="x.list.length>1" ng-click="x.list=delSpecVal(x.list,$index)" class="layui-icon layui-icon-close font-s12 goods-spec-close"></a>
</label> </label>
<a class="layui-btn layui-btn-sm layui-btn-primary goods-spec-btn" ng-if="x.list.length<5" ng-click="addSpecVal(x.list)">增加</a>
</div> </div>
</div> </div>
<a ng-if="isAddMode&&specs.length<3" class="layui-btn layui-btn-sm layui-btn-primary" ng-click="addSpecRow(specs)">增加分组</a> <a ng-if="isAddMode&&specs.length<3" class="layui-btn layui-btn-sm layui-btn-primary" ng-click="addSpecRow(specs)">增加分组</a>
@ -83,10 +71,11 @@
<thead> <thead>
<tr> <tr>
<th ng-repeat="x in specsTreeNava track by $index" class="nowrap" ng-bind="x"></th> <th ng-repeat="x in specsTreeNava track by $index" class="nowrap" ng-bind="x"></th>
<th width="10%" class="text-center nowrap">快递数量 <a ng-click="batchSet('express',0)" data-tips-text="批量设置" class="layui-icon">&#xe63c;</a></th> <th width="10%" class="text-center nowrap">商品SKU <a ng-click="batchSet('sku',0)" data-tips-text="批量设置" class="layui-icon">&#xe63c;</a></th>
<th width="10%" class="text-center nowrap">虚拟销量 <a ng-click="batchSet('virtual',0)" data-tips-text="批量设置" class="layui-icon">&#xe63c;</a></th>
<th width="10%" class="text-center nowrap">市场价格 <a ng-click="batchSet('market',2)" data-tips-text="批量设置" class="layui-icon">&#xe63c;</a></th> <th width="10%" class="text-center nowrap">市场价格 <a ng-click="batchSet('market',2)" data-tips-text="批量设置" class="layui-icon">&#xe63c;</a></th>
<th width="10%" class="text-center nowrap">销售价格 <a ng-click="batchSet('selling',2)" data-tips-text="批量设置" class="layui-icon">&#xe63c;</a></th> <th width="10%" class="text-center nowrap">销售价格 <a ng-click="batchSet('selling',2)" data-tips-text="批量设置" class="layui-icon">&#xe63c;</a></th>
<th width="10%" class="text-center nowrap">虚拟销量 <a ng-click="batchSet('virtual',0)" data-tips-text="批量设置" class="layui-icon">&#xe63c;</a></th>
<th width="10%" class="text-center nowrap">快递计件 <a ng-click="batchSet('express',0)" data-tips-text="批量设置" class="layui-icon">&#xe63c;</a></th>
<th width="10%" class="text-center nowrap">销售状态</th> <th width="10%" class="text-center nowrap">销售状态</th>
</tr> </tr>
</thead> </thead>
@ -95,12 +84,7 @@
<td class="layui-bg-gray" ng-if="td.show" rowspan="{{td.span}}" ng-repeat="td in rows" ng-bind="td.name"></td> <td class="layui-bg-gray" ng-if="td.show" rowspan="{{td.span}}" ng-repeat="td in rows" ng-bind="td.name"></td>
<td class="padding-0"> <td class="padding-0">
<label class="padding-0 margin-0"> <label class="padding-0 margin-0">
<input ng-blur="rows[0].express=setValue(rows[0].key,'express',$event.target.value,'(parseFloat(_)||0).toFixed(0)')" class="layui-input border-0 padding-left-0 text-center" ng-model="rows[0].express"> <input ng-blur="rows[0].sku=setValue(rows[0].key,'sku',$event.target.value,'(parseFloat(_)||0).toFixed(0)')" class="layui-input border-0 padding-left-0 text-center" ng-model="rows[0].sku">
</label>
</td>
<td class="padding-0">
<label class="padding-0 margin-0">
<input ng-blur="rows[0].virtual=setValue(rows[0].key,'virtual',$event.target.value,'(parseInt(_)||0)')" class="layui-input border-0 padding-left-0 text-center" ng-model="rows[0].virtual">
</label> </label>
</td> </td>
<td class="padding-0"> <td class="padding-0">
@ -113,18 +97,29 @@
<input ng-blur="rows[0].selling=setValue(rows[0].key,'selling',$event.target.value,'(parseFloat(_)||0).toFixed(2)')" class="layui-input border-0 padding-left-0 text-center" ng-model="rows[0].selling"> <input ng-blur="rows[0].selling=setValue(rows[0].key,'selling',$event.target.value,'(parseFloat(_)||0).toFixed(2)')" class="layui-input border-0 padding-left-0 text-center" ng-model="rows[0].selling">
</label> </label>
</td> </td>
<td class="padding-0">
<label class="padding-0 margin-0">
<input ng-blur="rows[0].virtual=setValue(rows[0].key,'virtual',$event.target.value,'(parseInt(_)||0)')" class="layui-input border-0 padding-left-0 text-center" ng-model="rows[0].virtual">
</label>
</td>
<td class="padding-0">
<label class="padding-0 margin-0">
<input ng-blur="rows[0].express=setValue(rows[0].key,'express',$event.target.value,'(parseInt(_)||0)')" class="layui-input border-0 padding-left-0 text-center" ng-model="rows[0].express">
</label>
</td>
<td class="text-center layui-bg-gray"> <td class="text-center layui-bg-gray">
<label class="think-checkbox margin-0 full-width full-height block"><input lay-ignore type="checkbox" ng-model="rows[0].status"></label> <label class="think-checkbox margin-0 full-width full-height block"><input lay-ignore type="checkbox" ng-model="rows[0].status"></label>
</td> </td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
<p class="color-desc">请从仓储平台获取商品SKU与商品条码请注意尽量不要重复也不能产生订单后再修改</p>
<textarea class="layui-textarea layui-hide" name="specs">{{specs}}</textarea> <textarea class="layui-textarea layui-hide" name="specs">{{specs}}</textarea>
<textarea class="layui-textarea layui-hide" name="lists">{{specsTreeData}}</textarea> <textarea class="layui-textarea layui-hide" name="lists">{{specsTreeData}}</textarea>
</div> </div>
<div class="layui-form-item block"> <div class="layui-form-item block">
<h3 class="color-green"><sup class='color-red font-s14 absolute' style="margin-left:-10px">*</sup>商品内容</h3> <span class="label-required-prev color-green">商品详细内容</span>
<textarea name="content">{$vo.content|default=''|raw}</textarea> <textarea name="content">{$vo.content|default=''|raw}</textarea>
</div> </div>
@ -136,110 +131,22 @@
</div> </div>
</form> </form>
<style>
.inner-input {
width: 80px;
height: 14px;
padding: 1px 5px;
line-height: 12px;
}
.goods-spec-box {
position: relative;
margin: 0 10px 10px 0;
vertical-align: middle;
}
.goods-spec-title {
z-index: 2;
width: 40px;
color: #fff;
height: 28px;
position: absolute;
background: #999;
line-height: 28px;
}
.goods-spec-close {
right: 8px;
z-index: 2;
line-height: 28px;
position: absolute;
display: inline-block
}
.goods-spec-btn {
height: 28px;
margin-left: 5px !important;
line-height: 26px !important;
}
.goods-spec-box input {
z-index: 1;
width: 120px;
position: relative;
border: 1px solid #999;
padding: 5px 0 5px 45px;
display: inline-block !important;
}
.goods-spec-box input[type=checkbox] {
z-index: 2;
width: 40px;
height: 28px;
border: none;
cursor: pointer;
appearance: none;
position: absolute;
-webkit-appearance: none;
}
.goods-spec-box input[type=checkbox]:before {
top: 1px;
left: 1px;
width: 40px;
height: 26px;
content: ' ';
position: absolute;
background: #c9c9c9;
}
.goods-spec-box input[type=checkbox]:after {
top: 1px;
left: 1px;
color: #999;
width: 40px;
height: 26px;
content: '\e63f';
font-size: 16px;
line-height: 26px;
position: absolute;
text-align: center;
font-family: 'layui-icon';
}
.goods-spec-box input[type=checkbox]:checked:after {
color: #333;
content: '\e605';
}
</style>
{/block} {/block}
{block name='script'} {block name='script'}
<textarea class="layui-hide" id="goods-specs">{$vo.specs|raw|default=''}</textarea>
<textarea class="layui-hide" id="goods-value">{$defaultValues|raw|default=''}</textarea>
<script> <script>
window.form.render(); window.form.render();
require(['ckeditor', 'angular'], function () { require(['ckeditor', 'angular'], function () {
window.createEditor('[name="content"]', {height: 500}); window.createEditor('[name="content"]', {height: 500});
let app = angular.module("GoodsForm", []).run(callback); var app = angular.module("GoodsForm", []).run(callback);
angular.bootstrap(document.getElementById(app.name), [app.name]); angular.bootstrap(document.getElementById(app.name), [app.name]);
function callback($rootScope) { function callback($rootScope) {
$rootScope.isAddMode = parseInt('{$isAddMode|default=0}'); $rootScope.isAddMode = parseInt('{$isAddMode|default=0}');
let defaultValues = angular.fromJson('{$defaultValues|raw|default=0}') || {}; $rootScope.maps = JSON.parse(angular.element('#goods-value').val() || '[]') || {};
$rootScope.specs = angular.fromJson('{$vo.specs|raw|default=0}') || [{name: '默认分组', list: [{name: '默认规格', check: true}]}]; $rootScope.specs = JSON.parse(angular.element('#goods-specs').val() || '[{"name":"默认分组","list":[{"name":"默认规格","check":true}]}]');
// 批量设置数值 // 批量设置数值
$rootScope.batchSet = function (type, fixed) { $rootScope.batchSet = function (type, fixed) {
layer.prompt({title: '请输入数值', formType: 0}, function (value, index) { layer.prompt({title: '请输入数值', formType: 0}, function (value, index) {
@ -260,72 +167,74 @@
}; };
// 设置默认值 // 设置默认值
$rootScope.setValue = function (key, type, value, call) { $rootScope.setValue = function (key, type, value, call) {
defaultValues[key] || (defaultValues[key] = {}); $rootScope.maps[key] || ($rootScope.maps[key] = {});
return defaultValues[key][type] = eval(call.replace('_', "'" + value + "'")); return $rootScope.maps[key][type] = eval(call.replace('_', "'" + value + "'"));
}; };
// 读取默认值 // 读取默认值
let getValue = function (key, callback) { $rootScope.getValue = function (key, callback) {
if (typeof callback === 'function') return callback(defaultValues[key] || {}); if (typeof callback === 'function') {
return callback($rootScope.maps[key] || {});
}
return {};
};
// 去除空白字符
$rootScope.trimSpace = function (value) {
return (value + '').replace(/\s*/ig, '');
}; };
// 生成交叉表格数据 // 生成交叉表格数据
$rootScope.specsTreeData = []; $rootScope.specsTreeData = [];
$rootScope.specsTreeNava = []; $rootScope.specsTreeNava = [];
// 当前商品规格发生变化时重新计算规格列表 // 当前商品规格发生变化时重新计算规格列表
$rootScope.$watch('specs', function () { $rootScope.$watch('specs', function () {
let list = [], nava = [], table = [[]]; var data = $rootScope.specs, list = [], navs = [], table = [[]];
let data = angular.fromJson(angular.toJson($rootScope.specs));
// 过滤无效记录 // 过滤无效记录
for (let o of data) { for (var i in data) {
let tmp = []; var tmp = [];
for (let x of o.list) (x.check && typeof x.name === 'string' && x.name.length > 0) && tmp.push(x); for (var j in data[i].list) if (data[i].list[j].check && data[i].list[j].name.length > 0) {
if (tmp.length > 0) for (let x of tmp) x.group = o.name, x.span = 1, x.show = true; data[i].list[j].span = 1, data[i].list[j].show = true, data[i].list[j].group = data[i].name;
if (tmp.length > 0) list.push(tmp), nava.push(o.name); tmp.push(data[i].list[j]);
$rootScope.specsTreeNava = nava;
} }
list.push(tmp), navs.push(data[i].name);
}
$rootScope.specsTreeNava = navs;
// 表格交叉 // 表格交叉
for (let i in list) { for (var i in list) {
let temp = []; var tmp = [];
for (let j in table) for (let k in list[i]) temp.push(table[j].concat(list[i][k])); for (var j in table) for (var k in list[i]) tmp.push(table[j].concat(list[i][k]));
table = temp; table = tmp;
} }
// 表格合并 // 表格合并
list = angular.fromJson(angular.toJson(table)); list = angular.fromJson(angular.toJson(table));
for (let row in list) { for (var i in list) {
let key = [], _key = ''; var key = [], _key = '';
for (let td in list[row]) key.push(list[row][td].group + '::' + list[row][td].name); for (var td in list[i]) key.push(list[i][td].group + '::' + list[i][td].name);
for (let td in list[row]) { for (var td in list[i]) if (_key.length === 0) {
if (_key.length === 0) { list[i][0].key = _key = key.join(';;');
list[row][0].key = _key = key.join(';;'); list[i][0].sku = $rootScope.getValue(_key, function (data) {
list[row][0].express = getValue(_key, function (data) { return data.sku || '0';
return data.express || '1';
}); });
list[row][0].virtual = getValue(_key, function (data) { list[i][0].virtual = $rootScope.getValue(_key, function (data) {
return data.virtual || '0'; return data.virtual || '0';
}); });
list[row][0].market = getValue(_key, function (data) { list[i][0].express = $rootScope.getValue(_key, function (data) {
return data.express || '1';
});
list[i][0].market = $rootScope.getValue(_key, function (data) {
return data.market || '0.00'; return data.market || '0.00';
}); });
list[row][0].selling = getValue(_key, function (data) { list[i][0].selling = $rootScope.getValue(_key, function (data) {
return data.selling || '0.00'; return data.selling || '0.00';
}); });
list[i][0].status = $rootScope.getValue(_key, function (data) {
list[row][0].status = getValue(_key, function (data) {
return !!(typeof data.status !== 'undefined' ? data.status : true); return !!(typeof data.status !== 'undefined' ? data.status : true);
}); });
} }
// 表格TD处理
for (let dow = 1 + parseInt(row); dow < list.length; dow++)
if (list[row][td].name === list[dow][td].name) {
list[row][td].span++;
list[dow][td].show = false;
} else break;
}
} }
$rootScope.specsTreeData = list; $rootScope.specsTreeData = list;
}, true); }, true);
// 判断规则是否能取消选择 // 判断规则是否能取消选择
$rootScope.checkListChecked = function (list, check) { $rootScope.checkListChecked = function (list, check) {
for (let o of list) if (o.check) return check; for (var i in list) if (list[i].check) return check;
return true; return true;
}; };
// 增加整行规格分组 // 增加整行规格分组
@ -334,9 +243,9 @@
}; };
// 下移整行规格分组 // 下移整行规格分组
$rootScope.dnSpecRow = function (data, $index) { $rootScope.dnSpecRow = function (data, $index) {
let tmp = [], cur = data[$index]; var tmp = [], cur = data[$index];
if ($index > data.length - 2) return false; if ($index > data.length - 2) return false;
for (let i in data) { for (var i in data) {
(parseInt(i) !== parseInt($index)) && tmp.push(data[i]); (parseInt(i) !== parseInt($index)) && tmp.push(data[i]);
(parseInt(i) === parseInt($index) + 1) && tmp.push(cur); (parseInt(i) === parseInt($index) + 1) && tmp.push(cur);
} }
@ -344,9 +253,9 @@
}; };
// 上移整行规格分组 // 上移整行规格分组
$rootScope.upSpecRow = function (data, $index) { $rootScope.upSpecRow = function (data, $index) {
let tmp = [], cur = data[$index]; var tmp = [], cur = data[$index];
if ($index < 1) return false; if ($index < 1) return false;
for (let i in data) { for (var i in data) {
(parseInt(i) === parseInt($index) - 1) && tmp.push(cur); (parseInt(i) === parseInt($index) - 1) && tmp.push(cur);
(parseInt(i) !== parseInt($index)) && tmp.push(data[i]); (parseInt(i) !== parseInt($index)) && tmp.push(data[i]);
} }
@ -354,8 +263,8 @@
}; };
// 移除整行规格分组 // 移除整行规格分组
$rootScope.delSpecRow = function (data, $index) { $rootScope.delSpecRow = function (data, $index) {
let tmp = []; var tmp = [];
for (let i in data) if (parseInt(i) !== parseInt($index)) tmp.push(data[i]); for (var i in data) if (parseInt(i) !== parseInt($index)) tmp.push(data[i]);
return $rootScope.specs = tmp; return $rootScope.specs = tmp;
}; };
// 增加分组的属性 // 增加分组的属性
@ -364,8 +273,8 @@
}; };
// 移除分组的属性 // 移除分组的属性
$rootScope.delSpecVal = function (data, $index) { $rootScope.delSpecVal = function (data, $index) {
let temp = []; var temp = [];
for (let i in data) if (parseInt(i) !== parseInt($index)) temp.push(data[i]); for (var i in data) if (parseInt(i) !== parseInt($index)) temp.push(data[i]);
return temp; return temp;
}; };
} }

View File

@ -4,15 +4,16 @@
<!--{if auth("store/goods/add")}--> <!--{if auth("store/goods/add")}-->
<button data-open='{:url("add")}' data-title="添加商品" class='layui-btn layui-btn-sm layui-btn-primary'>添加商品</button> <button data-open='{:url("add")}' data-title="添加商品" class='layui-btn layui-btn-sm layui-btn-primary'>添加商品</button>
<!--{/if}--> <!--{/if}-->
<!--{if auth("store/goods/del")}--> <!--{if auth("store/goods/remove")}-->
<button data-action='{:url("del")}' data-rule="id#{key}" class='layui-btn layui-btn-sm layui-btn-primary'>删除商品</button> <button data-action='{:url("remove")}' data-rule="id#{key}" class='layui-btn layui-btn-sm layui-btn-primary'>删除商品</button>
<!--{/if}--> <!--{/if}-->
{/block} {/block}
{block name="content"} {block name="content"}
<div class="think-box-shadow">
<table class="layui-table" lay-skin="line"> <table class="layui-table" lay-skin="line">
<caption class="margin-bottom-10 text-left">{include file='goods/index_search'}</caption> <caption class="margin-bottom-10 text-left">{include file='goods/index_search'}</caption>
<!--{notempty name='list'}--> {notempty name='list'}
<thead> <thead>
<tr> <tr>
<th class='list-table-check-td think-checkbox'> <th class='list-table-check-td think-checkbox'>
@ -33,9 +34,9 @@
<th></th> <th></th>
</tr> </tr>
</thead> </thead>
<!--{/notempty}--> {/notempty}
<tbody> <tbody>
<!--{foreach $list as $key=>$vo}--> {foreach $list as $key=>$vo}
<tr data-dbclick> <tr data-dbclick>
<td class='list-table-check-td think-checkbox'><input class="list-check-box" value='{$vo.id}' type='checkbox'></td> <td class='list-table-check-td think-checkbox'><input class="list-check-box" value='{$vo.id}' type='checkbox'></td>
<td class='list-table-sort-td'><input data-action-blur="{:request()->url()}" data-value="id#{$vo.id};action#sort;sort#{value}" data-loading="false" value="{$vo.sort}" class="list-sort-input"></td> <td class='list-table-sort-td'><input data-action-blur="{:request()->url()}" data-value="id#{$vo.id};action#sort;sort#{value}" data-loading="false" value="{$vo.sort}" class="list-sort-input"></td>
@ -97,8 +98,8 @@
<a data-tips-text="您没有商品入库的权限哦!" class="layui-btn layui-btn-sm layui-btn-primary layui-disabled">入 库</a> <a data-tips-text="您没有商品入库的权限哦!" class="layui-btn layui-btn-sm layui-btn-primary layui-disabled">入 库</a>
{/if} {/if}
{if auth("store/goods/del")} {if auth("store/goods/remove")}
<a class="layui-btn layui-btn-sm layui-btn-danger" data-confirm="确定要删除数据吗?" data-action="{:url('del')}" data-value="id#{$vo.id}">删 除</a> <a class="layui-btn layui-btn-sm layui-btn-danger" data-confirm="确定要删除数据吗?" data-action="{:url('remove')}" data-value="id#{$vo.id}">删 除</a>
{else} {else}
<a data-tips-text="您没有删除商品的权限哦!" class="layui-btn layui-btn-sm layui-btn-primary layui-disabled">删 除</a> <a data-tips-text="您没有删除商品的权限哦!" class="layui-btn layui-btn-sm layui-btn-primary layui-disabled">删 除</a>
{/if} {/if}
@ -107,16 +108,11 @@
</td> </td>
</tr> </tr>
<!--{/foreach}--> {/foreach}
</tbody> </tbody>
</table> </table>
{empty name='list'}<span class="notdata">没有记录哦</span>{else}{$pagehtml|raw|default=''}{/empty} {empty name='list'}<span class="notdata">没有记录哦</span>{else}{$pagehtml|raw|default=''}{/empty}
<style> </div>
table.trim-bottom-border tr:last-child td {
border: none !important;
}
</style>
{/block} {/block}

View File

@ -11,7 +11,7 @@
<label class="layui-form-label">商品分类</label> <label class="layui-form-label">商品分类</label>
<div class="layui-input-inline"> <div class="layui-input-inline">
<select class="layui-select" name="cate_id" lay-search> <select class="layui-select" name="cate_id" lay-search>
<option value="">-- 所有商品 --</option> <option value="">-- 全部商品 --</option>
{foreach $clist as $v} {foreach $clist as $v}
<!--{eq name='Think.get.cate_id' value='$v.id.""'}--> <!--{eq name='Think.get.cate_id' value='$v.id.""'}-->
<option selected value="{$v.id}">{$v.title}</option> <option selected value="{$v.id}">{$v.title}</option>
@ -26,7 +26,7 @@
<label class="layui-form-label">销售状态</label> <label class="layui-form-label">销售状态</label>
<div class="layui-input-inline"> <div class="layui-input-inline">
<select class="layui-select" name="status"> <select class="layui-select" name="status">
{foreach [''=>'- 全部商品 -','1'=>'销售中商品','0'=>'已下架商品'] as $k=>$v} {foreach [''=>'- 全部状态 -','1'=>'销售中商品','0'=>'已下架商品'] as $k=>$v}
<!--{eq name='Think.get.status' value='$k.""'}--> <!--{eq name='Think.get.status' value='$k.""'}-->
<option selected value="{$k}">{$v}</option> <option selected value="{$k}">{$v}</option>
<!--{else}--> <!--{else}-->

View File

@ -2,26 +2,28 @@
<div class="layui-card-body"> <div class="layui-card-body">
<div class="layui-form-item"> <div class="layui-row margin-bottom-15">
<label class="layui-form-label">商品分类图片</label> <label class="layui-col-xs2 think-form-label">商品分类图片</label>
<div class="layui-input-block"> <label class="layui-col-xs8 think-form-group-left">
<input name="logo" required value='{$vo.logo|default=""}' placeholder="请上传分类图片" class="layui-input"> <input name="logo" required value='{$vo.logo|default=""}' placeholder="请上传分类图片" class="layui-input">
<button data-file="btn" data-field="logo" data-type="png,jpg,gif" class="layui-btn layui-btn-sm" type="button">上传图片</button> </label>
</div> <a class="layui-col-xs2 layui-btn think-form-group-right" data-file="btn" data-field="logo" data-type="png,jpg,gif">
<i class="layui-icon layui-icon-upload"></i> 上传图片
</a>
</div> </div>
<div class="layui-form-item"> <div class="layui-row margin-bottom-15">
<label class="layui-form-label">商品分类名称</label> <label class="layui-col-xs2 think-form-label">商品分类名称</label>
<div class="layui-input-block"> <label class="layui-col-xs10">
<input name="title" required value='{$vo.title|default=""}' placeholder="请输入商品分类名称" class="layui-input"> <input name="title" required value='{$vo.title|default=""}' placeholder="请输入商品分类名称" class="layui-input">
</div> </label>
</div> </div>
<div class="layui-form-item"> <div class="layui-row margin-bottom-15">
<label class="layui-form-label">商品分类描述</label> <label class="layui-col-xs2 think-form-label">商品分类描述</label>
<div class="layui-input-block"> <label class="layui-col-xs10">
<textarea class="layui-textarea" name="desc">{$vo.desc|default=''}</textarea> <textarea class="layui-textarea" name="desc">{$vo.desc|default=''}</textarea>
</div> </label>
</div> </div>
</div> </div>

View File

@ -1,18 +1,19 @@
{extend name='admin@main'} {extend name='admin@main'}
{block name="button"} {block name="button"}
<!--{if auth("store/goods_cate/add")}--> {if auth("store/goods_cate/add")}
<button data-modal='{:url("add")}' data-title="添加商品分类" class='layui-btn layui-btn-sm layui-btn-primary'>添加商品分类</button> <button data-modal='{:url("add")}' data-title="添加商品分类" class='layui-btn layui-btn-sm layui-btn-primary'>添加商品分类</button>
<!--{/if}--> {/if}
<!--{if auth("store/goods_cate/del")}--> {if auth("store/goods_cate/remove")}
<button data-action='{:url("del")}' data-rule="id#{key}" class='layui-btn layui-btn-sm layui-btn-primary'>删除商品分类</button> <button data-action='{:url("remove")}' data-rule="id#{key}" class='layui-btn layui-btn-sm layui-btn-primary'>删除商品分类</button>
<!--{/if}--> {/if}
{/block} {/block}
{block name="content"} {block name="content"}
<div class="think-box-shadow">
<table class="layui-table" lay-skin="line"> <table class="layui-table" lay-skin="line">
<caption class="margin-bottom-10 text-left">{include file='goods_cate/index_search'}</caption> <caption class="margin-bottom-10 text-left">{include file='goods_cate/index_search'}</caption>
<!--{notempty name='list'}--> {notempty name='list'}
<thead> <thead>
<tr> <tr>
<th class='list-table-check-td think-checkbox'> <th class='list-table-check-td think-checkbox'>
@ -27,9 +28,9 @@
<th></th> <th></th>
</tr> </tr>
</thead> </thead>
<!--{/notempty}--> {/notempty}
<tbody> <tbody>
<!--{foreach $list as $key=>$vo}--> {foreach $list as $key=>$vo}
<tr> <tr>
<td class='list-table-check-td think-checkbox'> <td class='list-table-check-td think-checkbox'>
<input class="list-check-box" value='{$vo.id}' type='checkbox'> <input class="list-check-box" value='{$vo.id}' type='checkbox'>
@ -57,16 +58,15 @@
<a class="layui-btn layui-btn-sm layui-btn-warm" data-action="{:url('resume')}" data-value="id#{$vo.id};status#1">启 用</a> <a class="layui-btn layui-btn-sm layui-btn-warm" data-action="{:url('resume')}" data-value="id#{$vo.id};status#1">启 用</a>
{/if} {/if}
{if auth("store/goods_cate/del")} {if auth("store/goods_cate/remove")}
<a class="layui-btn layui-btn-sm layui-btn-danger" data-confirm="确定要删除数据吗?" data-action="{:url('del')}" data-value="id#{$vo.id}">删 除</a> <a class="layui-btn layui-btn-sm layui-btn-danger" data-confirm="确定要删除数据吗?" data-action="{:url('remove')}" data-value="id#{$vo.id}">删 除</a>
{/if} {/if}
</td> </td>
</tr> </tr>
<!--{/foreach}--> {/foreach}
</tbody> </tbody>
</table> </table>
{empty name='list'}<span class="notdata">没有记录哦</span>{else}{$pagehtml|raw|default=''}{/empty} {empty name='list'}<span class="notdata">没有记录哦</span>{else}{$pagehtml|raw|default=''}{/empty}
</div>
{/block} {/block}

View File

@ -11,7 +11,7 @@
<label class="layui-form-label">使用状态</label> <label class="layui-form-label">使用状态</label>
<div class="layui-input-inline"> <div class="layui-input-inline">
<select class="layui-select" name="status"> <select class="layui-select" name="status">
{foreach [''=>'- 全部商品分类 -','1'=>'使用中的商品分类','0'=>'已禁用的商品分类'] as $k=>$v} {foreach [''=>'- 全部状态 -','1'=>'使用中的商品分类','0'=>'已禁用的商品分类'] as $k=>$v}
<!--{eq name='Think.get.status' value='$k.""'}--> <!--{eq name='Think.get.status' value='$k.""'}-->
<option selected value="{$k}">{$v}</option> <option selected value="{$k}">{$v}</option>
<!--{else}--> <!--{else}-->

View File

@ -1,9 +1,10 @@
{extend name='admin@main'} {extend name='admin@main'}
{block name="content"} {block name="content"}
<div class="think-box-shadow">
<table class="layui-table" lay-skin="line"> <table class="layui-table" lay-skin="line">
<caption class="margin-bottom-10 text-left">{include file='member/index_search'}</caption> <caption class="margin-bottom-10 text-left">{include file='member/index_search'}</caption>
<!--{notempty name='list'}--> {notempty name='list'}
<thead> <thead>
<tr> <tr>
<th class='list-table-check-td think-checkbox'> <th class='list-table-check-td think-checkbox'>
@ -15,9 +16,9 @@
<th class='text-left nowrap'>注册时间</th> <th class='text-left nowrap'>注册时间</th>
</tr> </tr>
</thead> </thead>
<!--{/notempty}--> {/notempty}
<tbody> <tbody>
<!--{foreach $list as $key=>$vo}--> {foreach $list as $key=>$vo}
<tr> <tr>
<td class='list-table-check-td think-checkbox'><input class="list-check-box" value='{$vo.id}' type='checkbox'></td> <td class='list-table-check-td think-checkbox'><input class="list-check-box" value='{$vo.id}' type='checkbox'></td>
<td class='text-left nowrap'> <td class='text-left nowrap'>
@ -36,10 +37,9 @@
</td> </td>
<td class='text-left'>{$vo.create_at|format_datetime}</td> <td class='text-left'>{$vo.create_at|format_datetime}</td>
</tr> </tr>
<!--{/foreach}--> {/foreach}
</tbody> </tbody>
</table> </table>
{empty name='list'}<span class="notdata">没有记录哦</span>{else}{$pagehtml|raw|default=''}{/empty} {empty name='list'}<span class="notdata">没有记录哦</span>{else}{$pagehtml|raw|default=''}{/empty}
</div>
{/block} {/block}

View File

@ -1,9 +1,10 @@
{extend name='admin@main'} {extend name='admin@main'}
{block name="content"} {block name="content"}
<div class="think-box-shadow">
<table class="layui-table" lay-skin="line"> <table class="layui-table" lay-skin="line">
<caption class="margin-bottom-10 text-left">{include file='message/index_search'}</caption> <caption class="margin-bottom-10 text-left">{include file='message/index_search'}</caption>
<!--{notempty name='list'}--> {notempty name='list'}
<thead> <thead>
<tr> <tr>
<th class='list-table-check-td think-checkbox'> <th class='list-table-check-td think-checkbox'>
@ -13,22 +14,27 @@
<th class='text-left nowrap'>短信内容</th> <th class='text-left nowrap'>短信内容</th>
<th class='text-left nowrap'>返回结果</th> <th class='text-left nowrap'>返回结果</th>
<th class='text-left nowrap'>发送时间</th> <th class='text-left nowrap'>发送时间</th>
<th></th>
</tr> </tr>
</thead> </thead>
<!--{/notempty}--> {/notempty}
<tbody> <tbody>
<!--{foreach $list as $key=>$vo}--> {foreach $list as $key=>$vo}
<tr> <tr>
<td class='list-table-check-td think-checkbox'><input class="list-check-box" value='{$vo.id}' type='checkbox'></td> <td class='list-table-check-td think-checkbox'><input class="list-check-box" value='{$vo.id}' type='checkbox'></td>
<td>{$vo.phone|default=''}</td> <td>{$vo.phone|default=''}</td>
<td>{$vo.content|default=''}</td> <td>{$vo.content|default=''}</td>
<td>{$vo.result|default=''}</td> <td>{$vo.result|default=''}</td>
<td>{$vo.create_at|default=''}<br></td> <td>{$vo.create_at|default=''}<br></td>
<td>
{if auth("store/member/remove")}
<a class="layui-btn layui-btn-sm layui-btn-danger" data-confirm="确定要删除数据吗?" data-action="{:url('remove')}" data-value="id#{$vo.id}">删 除</a>
{/if}
</td>
</tr> </tr>
<!--{/foreach}--> {/foreach}
</tbody> </tbody>
</table> </table>
{empty name='list'}<span class="notdata">没有记录哦</span>{else}{$pagehtml|raw|default=''}{/empty} {empty name='list'}<span class="notdata">没有记录哦</span>{else}{$pagehtml|raw|default=''}{/empty}
</div>
{/block} {/block}

View File

@ -1,9 +1,10 @@
{extend name='admin@main'} {extend name='admin@main'}
{block name="content"} {block name="content"}
<div class="think-box-shadow">
<table class="layui-table" lay-skin="line"> <table class="layui-table" lay-skin="line">
<caption class="margin-bottom-10 text-left">{include file='order/index_search'}</caption> <caption class="margin-bottom-10 text-left">{include file='order/index_search'}</caption>
<!--{notempty name='list'}--> {notempty name='list'}
<thead> <thead>
<tr> <tr>
<th class='list-table-check-td think-checkbox'> <th class='list-table-check-td think-checkbox'>
@ -15,9 +16,9 @@
<th class='text-right nowrap'>商品信息</th> <th class='text-right nowrap'>商品信息</th>
</tr> </tr>
</thead> </thead>
<!--{/notempty}--> {/notempty}
<tbody> <tbody>
<!--{foreach $list as $key=>$vo}--> {foreach $list as $key=>$vo}
<tr> <tr>
<td class='list-table-check-td think-checkbox'><input class="list-check-box" value='{$vo.id}' type='checkbox'></td> <td class='list-table-check-td think-checkbox'><input class="list-check-box" value='{$vo.id}' type='checkbox'></td>
<td class="text-left nowrap relative"> <td class="text-left nowrap relative">
@ -75,15 +76,11 @@
{/foreach} {/foreach}
</td> </td>
</tr> </tr>
<!--{/foreach}--> {/foreach}
</tbody> </tbody>
</table> </table>
{empty name='list'}<span class="notdata">没有记录哦</span>{else}{$pagehtml|raw|default=''}{/empty} {empty name='list'}<span class="notdata">没有记录哦</span>{else}{$pagehtml|raw|default=''}{/empty}
<style> </div>
table.trim-bottom-border tr:last-child td {
border: none !important
}
</style>
{/block} {/block}

View File

@ -91,7 +91,6 @@
</div> </div>
<div class="layui-form-item layui-inline"> <div class="layui-form-item layui-inline">
<button class="layui-btn layui-btn-primary"><i class="layui-icon">&#xe615;</i> 搜 索</button> <button class="layui-btn layui-btn-primary"><i class="layui-icon">&#xe615;</i> 搜 索</button>
<button type="button" data-export-list class="layui-btn layui-btn-primary"><i class="layui-icon layui-icon-export"></i> 导 出</button>
</div> </div>
</form> </form>
<script> <script>