From 7aa0520c711dd8f2137300abfee225f51d223784 Mon Sep 17 00:00:00 2001 From: zhouzhongping Date: Sat, 25 Apr 2020 22:34:57 +0800 Subject: [PATCH] 1.1.39 --- README.md | 20 + doc/database/install.sql | 7 +- doc/database/upgrade/v1.1.39.sql | 13 + doc/更新日志.txt | 18 + source/application/admin/model/Wxapp.php | 23 +- source/application/admin/model/store/User.php | 4 - .../api/controller/wxapp/Formid.php | 17 +- .../application/api/model/bargain/Active.php | 1 + source/application/api/service/Payment.php | 8 +- .../api/service/order/Checkout.php | 9 +- .../api/service/order/PaySuccess.php | 4 +- .../api/service/recharge/PaySuccess.php | 6 +- .../api/service/sharing/order/Checkout.php | 9 +- .../api/service/sharing/order/PaySuccess.php | 4 +- source/application/common/model/Region.php | 2 +- source/application/common/model/Wxapp.php | 12 +- .../application/common/model/store/User.php | 6 +- source/application/common/service/Message.php | 472 +++++++++--------- .../common/service/order/Refund.php | 1 + source/application/store/controller/Shop.php | 2 +- source/application/store/controller/Wxapp.php | 19 - .../store/controller/data/Shop.php | 5 +- .../store/controller/shop/Clerk.php | 6 +- .../store/controller/shop/Order.php | 2 +- source/application/store/model/store/Shop.php | 34 +- source/application/store/service/Auth.php | 2 + .../store/service/wxapp/Message.php | 1 + .../application/store/view/data/shop/list.php | 58 ++- .../application/store/view/layouts/layout.php | 104 ++-- .../application/store/view/shop/clerk/add.php | 2 +- .../store/view/shop/clerk/edit.php | 2 +- .../store/view/shop/clerk/index.php | 2 +- source/application/store/view/shop/index.php | 52 +- version.json | 2 +- web/assets/store/css/app.css | 157 +++--- web/assets/store/js/diy.js | 2 +- web/assets/store/scss/app.scss | 194 ++++--- 37 files changed, 686 insertions(+), 596 deletions(-) create mode 100644 doc/database/upgrade/v1.1.39.sql diff --git a/README.md b/README.md index afd5ad3..bc25c07 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,26 @@ ## 更新日志 +### v1.1.39 + +``` +优化:后台菜单超出显示滚动条 +优化:取消收集formid +优化:后台门店管理添加筛选条件 +优化:回退余额时判断用户是否存在 +优化:小程序端授权登录流程 +优化:超管后台新增商城ID错误 +修复:优惠券和积分叠加计算错误 +修复:后台选择门店未显示全部 +修复:数据统计权限问题报错 +修复:订单支付成功短信提醒 +修复:砍价商品列表价格排序报错 +修复:小程序端订单页未支付提示 +-------------------------------- +注:本次更新须重新发布小程序 + +``` + ### v1.1.38 ``` diff --git a/doc/database/install.sql b/doc/database/install.sql index d081295..c978df9 100644 --- a/doc/database/install.sql +++ b/doc/database/install.sql @@ -4063,6 +4063,7 @@ INSERT INTO `yoshop_region` VALUES ('4014', '3999', '屯门区', '屯门区', ' INSERT INTO `yoshop_region` VALUES ('4015', '3999', '大埔区', '大埔区', '中国,香港特别行政区,大埔区', '3', 'dapu', null, null, null, null, null); INSERT INTO `yoshop_region` VALUES ('4016', '3999', '荃湾区', '荃湾区', '中国,香港特别行政区,荃湾区', '3', 'quanwan', null, null, null, null, null); INSERT INTO `yoshop_region` VALUES ('4017', '3999', '元朗区', '元朗区', '中国,香港特别行政区,元朗区', '3', 'yuanlang', null, null, null, null, null); +INSERT INTO `yoshop_region` (`id`, `pid`, `shortname`, `name`, `merger_name`, `level`, `pinyin`, `code`, `zip_code`, `first`) VALUES ('4018', '2291', '儋州', '儋州市', '中国,海南省,儋州市', '2', 'danzhou', '0898', '571700', 'D'); CREATE TABLE `yoshop_setting` ( `key` varchar(30) NOT NULL COMMENT '设置项标示', @@ -4254,7 +4255,7 @@ CREATE TABLE `yoshop_wxapp_page` ( `update_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '更新时间', PRIMARY KEY (`page_id`), KEY `wxapp_id` (`wxapp_id`) -) ENGINE=InnoDB AUTO_INCREMENT=10004 DEFAULT CHARSET=utf8 COMMENT='微信小程序diy页面表'; +) ENGINE=InnoDB AUTO_INCREMENT=10002 DEFAULT CHARSET=utf8 COMMENT='微信小程序diy页面表'; INSERT INTO `yoshop_wxapp_page` VALUES ('10001', '10', '小程序首页', '{\"items\":{\"page\":{\"id\":\"page\",\"type\":\"page\",\"name\":\"\\u9875\\u9762\\u8bbe\\u7f6e\",\"params\":{\"name\":\"\\u9875\\u9762\\u540d\\u79f0\",\"title\":\"\\u8424\\u706b\\u5c0f\\u7a0b\\u5e8f\\u5546\\u57ce\"},\"style\":{\"titleTextColor\":\"white\",\"titleBackgroundColor\":\"#ff8000\"}},\"n50214144672381\":{\"id\":\"n50214144672381\",\"type\":\"search\",\"name\":\"\\u641c\\u7d22\\u6846\",\"params\":{\"placeholder\":\"\\u8bf7\\u8f93\\u5165\\u5173\\u952e\\u5b57\\u8fdb\\u884c\\u641c\\u7d22\"},\"style\":{\"textAlign\":\"left\",\"searchStyle\":\"\"}},\"n33356112682143\":{\"id\":\"n33356112682143\",\"type\":\"coupon\",\"name\":\"\\u4f18\\u60e0\\u5238\\u7ec4\",\"style\":{\"paddingTop\":\"10\",\"background\":\"#ffffff\"},\"params\":{\"limit\":\"5\"},\"data\":{\"n214578430230592\":{\"color\":\"red\",\"reduce_price\":\"10\",\"min_price\":\"100.00\"},\"n818030369705776\":{\"color\":\"violet\",\"reduce_price\":\"10\",\"min_price\":\"100.00\"}}}}}', '10001', 0, '1536197290', '1536197290'); @@ -4288,7 +4289,7 @@ CREATE TABLE `yoshop_wxapp_prepay_id` ( `update_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '更新时间', PRIMARY KEY (`id`), KEY `order_id` (`order_id`) -) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8 COMMENT='小程序prepay_id记录'; +) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COMMENT='小程序prepay_id记录(已废弃)'; # 分销商申请记录表 @@ -4428,7 +4429,7 @@ CREATE TABLE `yoshop_wxapp_formid` ( `update_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '更新时间', PRIMARY KEY (`id`), KEY `user_id` (`user_id`) -) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COMMENT='小程序form_id记录表'; +) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COMMENT='小程序form_id记录表(已废弃)'; # 超管用户记录表 diff --git a/doc/database/upgrade/v1.1.39.sql b/doc/database/upgrade/v1.1.39.sql new file mode 100644 index 0000000..4c476dc --- /dev/null +++ b/doc/database/upgrade/v1.1.39.sql @@ -0,0 +1,13 @@ + + +INSERT INTO `yoshop_region` (`id`, `pid`, `shortname`, `name`, `merger_name`, `level`, `pinyin`, `code`, `zip_code`, `first`) + VALUES ('4018', '2291', '儋州', '儋州市', '中国,海南省,儋州市', '2', 'danzhou', '0898', '571700', 'D'); + + +ALTER TABLE `yoshop_wxapp_formid` +COMMENT='小程序form_id记录表(已废弃)'; + + +ALTER TABLE `yoshop_wxapp_prepay_id` +COMMENT='小程序prepay_id记录(已废弃)'; + diff --git a/doc/更新日志.txt b/doc/更新日志.txt index 6baa1aa..7b485a4 100644 --- a/doc/更新日志.txt +++ b/doc/更新日志.txt @@ -1,4 +1,22 @@  +### v1.1.39 更新日志 ### + +优化:后台菜单超出显示滚动条 +优化:取消收集formid +优化:后台门店管理添加筛选条件 +优化:回退余额时判断用户是否存在 +优化:小程序端授权登录流程 +优化:超管后台新增商城ID错误 +修复:优惠券和积分叠加计算错误 +修复:后台选择门店未显示全部 +修复:数据统计权限问题报错 +修复:订单支付成功短信提醒 +修复:砍价商品列表价格排序报错 +修复:小程序端订单页未支付提示 +-------------------------------- +注:本次更新须重新发布小程序 + + ### v1.1.38 更新日志 ### 修复:订单确认页收货地址提示 diff --git a/source/application/admin/model/Wxapp.php b/source/application/admin/model/Wxapp.php index 824964b..40e7e36 100644 --- a/source/application/admin/model/Wxapp.php +++ b/source/application/admin/model/Wxapp.php @@ -45,8 +45,7 @@ class Wxapp extends WxappModel /** * 新增记录 * @param $data - * @return bool - * @throws \think\exception\PDOException + * @return bool|mixed */ public function add($data) { @@ -54,31 +53,25 @@ class Wxapp extends WxappModel $this->error = '确认密码不正确'; return false; } - $this->startTrans(); - try { + if (StoreUser::checkExist($data['store_name'])) { + $this->error = '商家用户名已存在'; + return false; + } + return $this->transaction(function () use ($data) { // 添加小程序记录 $this->allowField(true)->save($data); // 商城默认设置 (new Setting)->insertDefault($this['wxapp_id'], $data['store_name']); // 新增商家用户信息 - $StoreUser = new StoreUser; - if (!$StoreUser->add($this['wxapp_id'], $data)) { - $this->error = $StoreUser->error; - return false; - } + (new StoreUser)->add($this['wxapp_id'], $data); // 新增小程序默认帮助 (new WxappHelp)->insertDefault($this['wxapp_id']); // 新增小程序diy配置 (new WxappPage)->insertDefault($this['wxapp_id']); // 新增小程序分类页模板 (new WxappCategory)->insertDefault($this['wxapp_id']); - $this->commit(); return true; - } catch (\Exception $e) { - $this->error = $e->getMessage(); - $this->rollback(); - return false; - } + }); } /** diff --git a/source/application/admin/model/store/User.php b/source/application/admin/model/store/User.php index 076e460..333af4d 100644 --- a/source/application/admin/model/store/User.php +++ b/source/application/admin/model/store/User.php @@ -19,10 +19,6 @@ class User extends StoreUserModel */ public function add($wxapp_id, $data) { - if (self::checkExist($data['user_name'])) { - $this->error = '商家用户名已存在'; - return false; - } return $this->save([ 'user_name' => $data['user_name'], 'password' => yoshop_hash($data['password']), diff --git a/source/application/api/controller/wxapp/Formid.php b/source/application/api/controller/wxapp/Formid.php index a6471d2..ccbd629 100644 --- a/source/application/api/controller/wxapp/Formid.php +++ b/source/application/api/controller/wxapp/Formid.php @@ -14,6 +14,7 @@ class Formid extends Controller { /** * 新增form_id + * (因微信模板消息已下线,所以formId取消不再收集) * @param $formId * @return array * @throws \app\common\exception\BaseException @@ -21,13 +22,15 @@ class Formid extends Controller */ public function save($formId) { - if (!$user = $this->getUser(false)) { - return $this->renderSuccess(); - } - if (FormidModel::add($user['user_id'], $formId)) { - return $this->renderSuccess(); - } - return $this->renderError(); + return $this->renderSuccess(); + +// if (!$user = $this->getUser(false)) { +// return $this->renderSuccess(); +// } +// if (FormidModel::add($user['user_id'], $formId)) { +// return $this->renderSuccess(); +// } +// return $this->renderError(); } } \ No newline at end of file diff --git a/source/application/api/model/bargain/Active.php b/source/application/api/model/bargain/Active.php index c625f02..3341054 100644 --- a/source/application/api/model/bargain/Active.php +++ b/source/application/api/model/bargain/Active.php @@ -95,6 +95,7 @@ class Active extends ActiveModel $params = array_merge([ 'status' => 1, // 商品状态 'sortType' => 'all', // 排序类型 + 'sortPrice' => false, // 价格排序 高低 'listRows' => 15, // 每页数量 ], $param); // 排序规则 diff --git a/source/application/api/service/Payment.php b/source/application/api/service/Payment.php index 206edd1..538ca91 100644 --- a/source/application/api/service/Payment.php +++ b/source/application/api/service/Payment.php @@ -3,7 +3,7 @@ namespace app\api\service; use app\api\model\Wxapp as WxappModel; -use app\api\model\WxappPrepayId as WxappPrepayIdModel; +//use app\api\model\WxappPrepayId as WxappPrepayIdModel; use app\common\library\wechat\WxPay; use app\common\enum\OrderType as OrderTypeEnum; @@ -57,9 +57,9 @@ class Payment $wxConfig = WxappModel::getWxappCache($user['wxapp_id']); $WxPay = new WxPay($wxConfig); $payment = $WxPay->unifiedorder($orderNo, $user['open_id'], $payPrice, $orderType); - // 记录prepay_id - $model = new WxappPrepayIdModel; - $model->add($payment['prepay_id'], $orderId, $user['user_id'], $orderType); + // // 记录prepay_id + // $model = new WxappPrepayIdModel; + // $model->add($payment['prepay_id'], $orderId, $user['user_id'], $orderType); return $payment; } diff --git a/source/application/api/service/order/Checkout.php b/source/application/api/service/order/Checkout.php index 16180e7..d76c9fa 100644 --- a/source/application/api/service/order/Checkout.php +++ b/source/application/api/service/order/Checkout.php @@ -181,12 +181,12 @@ class Checkout $this->setOrderGoodsGradeMoney(); // 设置订单商品总金额(不含优惠折扣) $this->setOrderTotalPrice(); - // 计算可用积分抵扣 - $this->setOrderPoints(); // 当前用户可用的优惠券列表 $couponList = $this->getUserCouponList($this->orderData['order_total_price']); // 计算优惠券抵扣 $this->setOrderCouponMoney($couponList, $this->param['coupon_id']); + // 计算可用积分抵扣 + $this->setOrderPoints(); // 计算订单商品的实际付款金额 $this->setOrderGoodsPayPrice(); // 设置默认配送方式 @@ -265,7 +265,10 @@ class Checkout // 积分抵扣比例 $deductionRatio = helper::bcdiv($setting['discount']['max_money_ratio'], 100); // 最多可抵扣的金额 - $maxPointsMoney = helper::bcmul($goods['total_price'], $deductionRatio); + // !!!: 此处应该是优惠券打折后的价格 + // bug: $totalPayPrice = $goods['total_price']; + $totalPayPrice = helper::bcsub($goods['total_price'], $goods['coupon_money']); + $maxPointsMoney = helper::bcmul($totalPayPrice, $deductionRatio); // 最多可抵扣的积分数量 $goods['max_points_num'] = helper::bcdiv($maxPointsMoney, $setting['discount']['discount_ratio'], 0); } diff --git a/source/application/api/service/order/PaySuccess.php b/source/application/api/service/order/PaySuccess.php index 2a4443e..788a532 100644 --- a/source/application/api/service/order/PaySuccess.php +++ b/source/application/api/service/order/PaySuccess.php @@ -6,7 +6,7 @@ use think\Hook; use app\api\service\Basics; use app\api\model\User as UserModel; use app\api\model\Order as OrderModel; -use app\api\model\WxappPrepayId as WxappPrepayIdModel; +//use app\api\model\WxappPrepayId as WxappPrepayIdModel; use app\api\model\user\BalanceLog as BalanceLogModel; use app\common\service\goods\source\Factory as StockFactory; use app\common\enum\OrderType as OrderTypeEnum; @@ -143,7 +143,7 @@ class PaySuccess extends Basics // 微信支付 if ($payType == PayTypeEnum::WECHAT) { // 更新prepay_id记录 - WxappPrepayIdModel::updatePayStatus($this->model['order_id'], OrderTypeEnum::MASTER); +// WxappPrepayIdModel::updatePayStatus($this->model['order_id'], OrderTypeEnum::MASTER); } } diff --git a/source/application/api/service/recharge/PaySuccess.php b/source/application/api/service/recharge/PaySuccess.php index 1efd758..f3f988c 100644 --- a/source/application/api/service/recharge/PaySuccess.php +++ b/source/application/api/service/recharge/PaySuccess.php @@ -5,10 +5,10 @@ namespace app\api\service\recharge; use app\api\service\Basics; use app\api\model\User as UserModel; use app\api\model\recharge\Order as OrderModel; -use app\api\model\WxappPrepayId as WxappPrepayIdModel; +//use app\api\model\WxappPrepayId as WxappPrepayIdModel; use app\api\model\user\BalanceLog as BalanceLogModel; -use app\common\enum\OrderType as OrderTypeEnum; +//use app\common\enum\OrderType as OrderTypeEnum; use app\common\enum\order\PayType as PayTypeEnum; use app\common\enum\user\balanceLog\Scene as SceneEnum; use app\common\enum\recharge\order\PayStatus as PayStatusEnum; @@ -70,7 +70,7 @@ class PaySuccess extends Basics ], ['order_no' => $this->model['order_no']]); // 更新prepay_id记录 if ($payType == PayTypeEnum::WECHAT) { - WxappPrepayIdModel::updatePayStatus($this->model['order_id'], OrderTypeEnum::RECHARGE); +// WxappPrepayIdModel::updatePayStatus($this->model['order_id'], OrderTypeEnum::RECHARGE); } return true; }); diff --git a/source/application/api/service/sharing/order/Checkout.php b/source/application/api/service/sharing/order/Checkout.php index c5234a0..e312b3f 100644 --- a/source/application/api/service/sharing/order/Checkout.php +++ b/source/application/api/service/sharing/order/Checkout.php @@ -180,12 +180,12 @@ class Checkout $this->setOrderGoodsGradeMoney(); // 设置订单商品总金额(不含优惠折扣) $this->setOrderTotalPrice(); - // 计算可用积分抵扣 - $this->setOrderPoints(); // 当前用户可用的优惠券列表 $couponList = $this->getUserCouponList($this->orderData['order_total_price']); // 计算优惠券抵扣 $this->setOrderCouponMoney($couponList, $this->param['coupon_id']); + // 计算可用积分抵扣 + $this->setOrderPoints(); // 计算订单商品的实际付款金额 $this->setOrderGoodsPayPrice(); // 设置默认配送方式 @@ -264,7 +264,10 @@ class Checkout // 积分抵扣比例 $deductionRatio = helper::bcdiv($setting['discount']['max_money_ratio'], 100); // 最多可抵扣的金额 - $maxPointsMoney = helper::bcmul($goods['total_price'], $deductionRatio); + // !!!: 此处应该是优惠券打折后的价格 + // bug: $totalPayPrice = $goods['total_price']; + $totalPayPrice = helper::bcsub($goods['total_price'], $goods['coupon_money']); + $maxPointsMoney = helper::bcmul($totalPayPrice, $deductionRatio); // 最多可抵扣的积分数量 $goods['max_points_num'] = helper::bcdiv($maxPointsMoney, $setting['discount']['discount_ratio'], 0); } diff --git a/source/application/api/service/sharing/order/PaySuccess.php b/source/application/api/service/sharing/order/PaySuccess.php index 6c8017d..da036f5 100644 --- a/source/application/api/service/sharing/order/PaySuccess.php +++ b/source/application/api/service/sharing/order/PaySuccess.php @@ -9,7 +9,7 @@ use app\api\model\sharing\Order as OrderModel; use app\api\model\sharing\Goods as GoodsModel; use app\api\model\sharing\Active as ActiveModel; use app\api\model\user\BalanceLog as BalanceLogModel; -use app\api\model\WxappPrepayId as WxappPrepayIdModel; +//use app\api\model\WxappPrepayId as WxappPrepayIdModel; use app\common\enum\user\balanceLog\Scene as SceneEnum; use app\common\enum\order\PayType as PayTypeEnum; @@ -116,7 +116,7 @@ class PaySuccess extends Basics // 微信支付 if ($payType == PayTypeEnum::WECHAT) { // 更新prepay_id记录 - WxappPrepayIdModel::updatePayStatus($this->model['order_id'], OrderTypeEnum::SHARING); +// WxappPrepayIdModel::updatePayStatus($this->model['order_id'], OrderTypeEnum::SHARING); } }); return true; diff --git a/source/application/common/model/Region.php b/source/application/common/model/Region.php index 32ca8bf..652be2d 100644 --- a/source/application/common/model/Region.php +++ b/source/application/common/model/Region.php @@ -27,7 +27,7 @@ class Region extends BaseModel ]; // 当前数据版本号 - private static $version = '1.2.3'; + private static $version = '1.2.4'; // 县级市别名 (兼容微信端命名) private static $county = [ diff --git a/source/application/common/model/Wxapp.php b/source/application/common/model/Wxapp.php index 650f9bc..864188a 100644 --- a/source/application/common/model/Wxapp.php +++ b/source/application/common/model/Wxapp.php @@ -2,9 +2,8 @@ namespace app\common\model; -use app\common\exception\BaseException; use think\Cache; -use think\Db; +use app\common\exception\BaseException; /** * 微信小程序模型 @@ -15,15 +14,6 @@ class Wxapp extends BaseModel { protected $name = 'wxapp'; - /** - * 小程序导航 - * @return \think\model\relation\HasOne - */ - public function navbar() - { - return $this->hasOne('WxappNavbar'); - } - /** * 小程序页面 * @return \think\model\relation\HasOne diff --git a/source/application/common/model/store/User.php b/source/application/common/model/store/User.php index 01ca08a..6644265 100644 --- a/source/application/common/model/store/User.php +++ b/source/application/common/model/store/User.php @@ -35,13 +35,13 @@ class User extends BaseModel /** * 验证用户名是否重复 - * @param $user_name + * @param $userName * @return bool */ - public static function checkExist($user_name) + public static function checkExist($userName) { return !!static::useGlobalScope(false) - ->where('user_name', '=', $user_name) + ->where('user_name', '=', $userName) ->where('is_delete', '=', 0) ->value('store_user_id'); } diff --git a/source/application/common/service/Message.php b/source/application/common/service/Message.php index 42a4154..c2a2508 100644 --- a/source/application/common/service/Message.php +++ b/source/application/common/service/Message.php @@ -2,12 +2,12 @@ namespace app\common\service; -use app\common\model\User as UserModel; +//use app\common\model\User as UserModel; use app\common\model\Wxapp as WxappModel; use app\common\model\Setting as SettingModel; -use app\common\model\dealer\Setting as DealerSettingModel; -use app\common\model\sharing\Setting as SharingSettingModel; -use app\common\service\wxapp\FormId as FormIdService; +//use app\common\model\dealer\Setting as DealerSettingModel; +//use app\common\model\sharing\Setting as SharingSettingModel; +//use app\common\service\wxapp\FormId as FormIdService; use app\common\enum\OrderType as OrderTypeEnum; use app\common\library\wechat\WxTplMsg; use app\common\library\sms\Driver as SmsDriver; @@ -24,45 +24,46 @@ class Message * @param \think\Model $order * @param int $orderType 订单类型 (10商城订单 20拼团订单) * @return bool - * @throws \app\common\exception\BaseException +// * @throws \app\common\exception\BaseException * @throws \think\Exception - * @throws \think\exception\DbException +// * @throws \think\exception\DbException */ public function payment($order, $orderType = OrderTypeEnum::MASTER) { - // 1. 微信模板消息 - $template = SettingModel::getItem('tplMsg', $order['wxapp_id'])['payment']; - if (!$template['is_enable'] || empty($template['template_id'])) { - return false; - } - // 获取可用的formid - if (!$formId = FormIdService::getAvailableFormId($order['user_id'])) { - return false; - } - // 页面链接 - $urls = [ - OrderTypeEnum::MASTER => 'pages/order/detail', - OrderTypeEnum::SHARING => 'pages/sharing/order/detail/detail', - ]; - // 发送模板消息 - $status = $this->sendTemplateMessage($order['wxapp_id'], [ - 'touser' => $order['user']['open_id'], - 'template_id' => $template['template_id'], - 'page' => $urls[$orderType] . '?order_id=' . $order['order_id'], - 'form_id' => $formId['form_id'], - 'data' => [ - // 订单编号 - 'keyword1' => $order['order_no'], - // 支付时间 - 'keyword2' => date('Y-m-d H:i:s', $order['pay_time']), - // 订单金额 - 'keyword3' => $order['pay_price'], - // 商品名称 - 'keyword4' => $this->formatGoodsName($order['goods']), - ] - ]); - // 标记formid已使用 - $status === true && FormIdService::setIsUsed($formId['id']); + // // 1. 微信模板消息 + // $template = SettingModel::getItem('tplMsg', $order['wxapp_id'])['payment']; + // if (!$template['is_enable'] || empty($template['template_id'])) { + // return false; + // } + // // 获取可用的formid + // if (!$formId = FormIdService::getAvailableFormId($order['user_id'])) { + // return false; + // } + // // 页面链接 + // $urls = [ + // OrderTypeEnum::MASTER => 'pages/order/detail', + // OrderTypeEnum::SHARING => 'pages/sharing/order/detail/detail', + // ]; + // // 发送模板消息 + // $status = $this->sendTemplateMessage($order['wxapp_id'], [ + // 'touser' => $order['user']['open_id'], + // 'template_id' => $template['template_id'], + // 'page' => $urls[$orderType] . '?order_id=' . $order['order_id'], + // 'form_id' => $formId['form_id'], + // 'data' => [ + // // 订单编号 + // 'keyword1' => $order['order_no'], + // // 支付时间 + // 'keyword2' => date('Y-m-d H:i:s', $order['pay_time']), + // // 订单金额 + // 'keyword3' => $order['pay_price'], + // // 商品名称 + // 'keyword4' => $this->formatGoodsName($order['goods']), + // ] + // ]); + // // 标记formid已使用 + // $status === true && FormIdService::setIsUsed($formId['id']); + // 2. 商家短信通知 $smsConfig = SettingModel::getItem('sms', $order['wxapp_id']); $SmsDriver = new SmsDriver($smsConfig); @@ -74,50 +75,51 @@ class Message * @param \think\Model $order * @param int $orderType 订单类型 (10商城订单 20拼团订单) * @return bool - * @throws \app\common\exception\BaseException - * @throws \think\Exception - * @throws \think\exception\DbException +// * @throws \app\common\exception\BaseException +// * @throws \think\Exception +// * @throws \think\exception\DbException */ public function delivery($order, $orderType = OrderTypeEnum::MASTER) { - // 微信模板消息 - $template = SettingModel::getItem('tplMsg', $order['wxapp_id'])['delivery']; - if (!$template['is_enable'] || empty($template['template_id'])) { - return false; - } - // 获取可用的formid - if (!$formId = FormIdService::getAvailableFormId($order['user_id'])) { - return false; - } - // 页面链接 - $urls = [ - OrderTypeEnum::MASTER => 'pages/order/detail', - OrderTypeEnum::SHARING => 'pages/sharing/order/detail/detail', - ]; - // 发送模板消息 - $status = $this->sendTemplateMessage($order['wxapp_id'], [ - 'touser' => $order['user']['open_id'], - 'template_id' => $template['template_id'], - 'page' => $urls[$orderType] . '?order_id=' . $order['order_id'], - 'form_id' => $formId['form_id'], - 'data' => [ - // 订单编号 - 'keyword1' => $order['order_no'], - // 商品信息 - 'keyword2' => $this->formatGoodsName($order['goods']), - // 收货人 - 'keyword3' => $order['address']['name'], - // 收货地址 - 'keyword4' => implode('', $order['address']['region']) . $order['address']['detail'], - // 物流公司 - 'keyword5' => $order['express']['express_name'], - // 物流单号 - 'keyword6' => $order['express_no'], - ] - ]); - // 标记formid已使用 - $status === true && FormIdService::setIsUsed($formId['id']); - return $status; + return true; +// // 微信模板消息 +// $template = SettingModel::getItem('tplMsg', $order['wxapp_id'])['delivery']; +// if (!$template['is_enable'] || empty($template['template_id'])) { +// return false; +// } +// // 获取可用的formid +// if (!$formId = FormIdService::getAvailableFormId($order['user_id'])) { +// return false; +// } +// // 页面链接 +// $urls = [ +// OrderTypeEnum::MASTER => 'pages/order/detail', +// OrderTypeEnum::SHARING => 'pages/sharing/order/detail/detail', +// ]; +// // 发送模板消息 +// $status = $this->sendTemplateMessage($order['wxapp_id'], [ +// 'touser' => $order['user']['open_id'], +// 'template_id' => $template['template_id'], +// 'page' => $urls[$orderType] . '?order_id=' . $order['order_id'], +// 'form_id' => $formId['form_id'], +// 'data' => [ +// // 订单编号 +// 'keyword1' => $order['order_no'], +// // 商品信息 +// 'keyword2' => $this->formatGoodsName($order['goods']), +// // 收货人 +// 'keyword3' => $order['address']['name'], +// // 收货地址 +// 'keyword4' => implode('', $order['address']['region']) . $order['address']['detail'], +// // 物流公司 +// 'keyword5' => $order['express']['express_name'], +// // 物流单号 +// 'keyword6' => $order['express_no'], +// ] +// ]); +// // 标记formid已使用 +// $status === true && FormIdService::setIsUsed($formId['id']); +// return $status; } /** @@ -126,50 +128,51 @@ class Message * @param $order_no * @param int $orderType 订单类型 (10商城订单 20拼团订单) * @return bool - * @throws \app\common\exception\BaseException - * @throws \think\Exception - * @throws \think\exception\DbException +// * @throws \app\common\exception\BaseException +// * @throws \think\Exception +// * @throws \think\exception\DbException */ public function refund($refund, $order_no, $orderType = OrderTypeEnum::MASTER) { - // 微信模板消息 - $template = SettingModel::getItem('tplMsg', $refund['wxapp_id'])['refund']; - if (!$template['is_enable'] || empty($template['template_id'])) { - return false; - } - // 获取可用的formid - if (!$formId = FormIdService::getAvailableFormId($refund['user_id'])) { - return false; - } - // 页面链接 - $urls = [ - OrderTypeEnum::MASTER => 'pages/order/refund/index', - OrderTypeEnum::SHARING => 'pages/sharing/order/refund/index', - ]; - // 发送模板消息 - $status = $this->sendTemplateMessage($refund['wxapp_id'], [ - 'touser' => $refund['user']['open_id'], - 'template_id' => $template['template_id'], - 'page' => $urls[$orderType], - 'form_id' => $formId['form_id'], - 'data' => [ - // 售后类型 - 'keyword1' => $refund['type']['text'], - // 状态 - 'keyword2' => $refund['status']['text'], - // 订单号 - 'keyword3' => $order_no, - // 商品名称 - 'keyword4' => $refund['order_goods']['goods_name'], - // 申请时间 - 'keyword5' => $refund['create_time'], - // 申请原因 - 'keyword6' => $refund['apply_desc'], - ] - ]); - // 标记formid已使用 - FormIdService::setIsUsed($formId['id']); - return $status; + return true; +// // 微信模板消息 +// $template = SettingModel::getItem('tplMsg', $refund['wxapp_id'])['refund']; +// if (!$template['is_enable'] || empty($template['template_id'])) { +// return false; +// } +// // 获取可用的formid +// if (!$formId = FormIdService::getAvailableFormId($refund['user_id'])) { +// return false; +// } +// // 页面链接 +// $urls = [ +// OrderTypeEnum::MASTER => 'pages/order/refund/index', +// OrderTypeEnum::SHARING => 'pages/sharing/order/refund/index', +// ]; +// // 发送模板消息 +// $status = $this->sendTemplateMessage($refund['wxapp_id'], [ +// 'touser' => $refund['user']['open_id'], +// 'template_id' => $template['template_id'], +// 'page' => $urls[$orderType], +// 'form_id' => $formId['form_id'], +// 'data' => [ +// // 售后类型 +// 'keyword1' => $refund['type']['text'], +// // 状态 +// 'keyword2' => $refund['status']['text'], +// // 订单号 +// 'keyword3' => $order_no, +// // 商品名称 +// 'keyword4' => $refund['order_goods']['goods_name'], +// // 申请时间 +// 'keyword5' => $refund['create_time'], +// // 申请原因 +// 'keyword6' => $refund['apply_desc'], +// ] +// ]); +// // 标记formid已使用 +// FormIdService::setIsUsed($formId['id']); +// return $status; } /** @@ -177,140 +180,143 @@ class Message * @param \app\common\model\sharing\Active $active * @param string $status_text * @return bool - * @throws \app\common\exception\BaseException - * @throws \think\exception\DbException +// * @throws \app\common\exception\BaseException +// * @throws \think\exception\DbException */ public function sharingActive($active, $status_text) { - // 微信模板消息 - $config = SharingSettingModel::getItem('basic', $active['wxapp_id']); - if (empty($config['tpl_msg_id'])) { - return false; - } - foreach ($active['users'] as $item) { - // 获取可用的formid - if (!$formId = FormIdService::getAvailableFormId($item['user']['user_id'])) { - continue; - } - // 发送模板消息 - $this->sendTemplateMessage($active['wxapp_id'], [ - 'touser' => $item['user']['open_id'], - 'template_id' => $config['tpl_msg_id'], - 'page' => 'pages/sharing/active/index?active_id=' . $active['active_id'], - 'form_id' => $formId['form_id'], - 'data' => [ - // 订单编号 - 'keyword1' => $item['sharing_order']['order_no'], - // 商品名称 - 'keyword2' => $active['goods']['goods_name'], - // 拼团价格 - 'keyword3' => $item['sharing_order']['pay_price'], - // 拼团人数 - 'keyword4' => $active['people'], - // 拼团时间 - 'keyword5' => $item['create_time'], - // 拼团结果 - 'keyword6' => $status_text, - ] - ]); - // 标记formid已使用 - FormIdService::setIsUsed($formId['id']); - } return true; +// // 微信模板消息 +// $config = SharingSettingModel::getItem('basic', $active['wxapp_id']); +// if (empty($config['tpl_msg_id'])) { +// return false; +// } +// foreach ($active['users'] as $item) { +// // 获取可用的formid +// if (!$formId = FormIdService::getAvailableFormId($item['user']['user_id'])) { +// continue; +// } +// // 发送模板消息 +// $this->sendTemplateMessage($active['wxapp_id'], [ +// 'touser' => $item['user']['open_id'], +// 'template_id' => $config['tpl_msg_id'], +// 'page' => 'pages/sharing/active/index?active_id=' . $active['active_id'], +// 'form_id' => $formId['form_id'], +// 'data' => [ +// // 订单编号 +// 'keyword1' => $item['sharing_order']['order_no'], +// // 商品名称 +// 'keyword2' => $active['goods']['goods_name'], +// // 拼团价格 +// 'keyword3' => $item['sharing_order']['pay_price'], +// // 拼团人数 +// 'keyword4' => $active['people'], +// // 拼团时间 +// 'keyword5' => $item['create_time'], +// // 拼团结果 +// 'keyword6' => $status_text, +// ] +// ]); +// // 标记formid已使用 +// FormIdService::setIsUsed($formId['id']); +// } +// return true; } /** * 分销商提现审核通知 * @param \app\common\model\dealer\Withdraw $withdraw * @return bool - * @throws \app\common\exception\BaseException - * @throws \think\exception\DbException +// * @throws \app\common\exception\BaseException +// * @throws \think\exception\DbException */ public function withdraw($withdraw) { - // 模板消息id - $template = DealerSettingModel::getItem('template_msg', $withdraw['wxapp_id']); - if (empty($template['withdraw_tpl'])) { - return false; - } - // 获取可用的formid - if (!$formId = FormIdService::getAvailableFormId($withdraw['user_id'])) { - return false; - } - // 获取用户信息 - $user = UserModel::detail($withdraw['user_id']); - // 发送模板消息 - $remark = '无'; - if ($withdraw['apply_status'] == 30) { - $remark = $withdraw['reject_reason']; - } - $status = $this->sendTemplateMessage($withdraw['wxapp_id'], [ - 'touser' => $user['open_id'], - 'template_id' => $template['withdraw_tpl'], - 'page' => 'pages/dealer/withdraw/list/list', - 'form_id' => $formId['form_id'], - 'data' => [ - // 提现时间 - 'keyword1' => $withdraw['create_time'], - // 提现方式 - 'keyword2' => $withdraw['pay_type']['text'], - // 提现金额 - 'keyword3' => $withdraw['money'], - // 提现状态 - 'keyword4' => $withdraw->applyStatus[$withdraw['apply_status']], - // 备注 - 'keyword5' => $remark, - ] - ]); - // 标记formid已使用 - FormIdService::setIsUsed($formId['id']); - return $status; + return true; +// // 模板消息id +// $template = DealerSettingModel::getItem('template_msg', $withdraw['wxapp_id']); +// if (empty($template['withdraw_tpl'])) { +// return false; +// } +// // 获取可用的formid +// if (!$formId = FormIdService::getAvailableFormId($withdraw['user_id'])) { +// return false; +// } +// // 获取用户信息 +// $user = UserModel::detail($withdraw['user_id']); +// // 发送模板消息 +// $remark = '无'; +// if ($withdraw['apply_status'] == 30) { +// $remark = $withdraw['reject_reason']; +// } +// $status = $this->sendTemplateMessage($withdraw['wxapp_id'], [ +// 'touser' => $user['open_id'], +// 'template_id' => $template['withdraw_tpl'], +// 'page' => 'pages/dealer/withdraw/list/list', +// 'form_id' => $formId['form_id'], +// 'data' => [ +// // 提现时间 +// 'keyword1' => $withdraw['create_time'], +// // 提现方式 +// 'keyword2' => $withdraw['pay_type']['text'], +// // 提现金额 +// 'keyword3' => $withdraw['money'], +// // 提现状态 +// 'keyword4' => $withdraw->applyStatus[$withdraw['apply_status']], +// // 备注 +// 'keyword5' => $remark, +// ] +// ]); +// // 标记formid已使用 +// FormIdService::setIsUsed($formId['id']); +// return $status; } /** * 分销商入驻审核通知 * @param \app\common\model\dealer\Apply $dealer * @return bool - * @throws \app\common\exception\BaseException - * @throws \think\exception\DbException +// * @throws \app\common\exception\BaseException +// * @throws \think\exception\DbException */ public function dealer($dealer) { - // 模板消息id - $template = DealerSettingModel::getItem('template_msg', $dealer['wxapp_id']); - if (empty($template['apply_tpl'])) { - return false; - } - // 获取可用的formid - if (!$formId = FormIdService::getAvailableFormId($dealer['user_id'])) { - return false; - } - // 获取用户信息 - $user = UserModel::detail($dealer['user_id']); - // 发送模板消息 - $remark = '分销商入驻审核通知'; - if ($dealer['apply_status'] == 30) { - $remark .= "\n\n驳回原因:" . $dealer['reject_reason']; - } - $status = $this->sendTemplateMessage($dealer['wxapp_id'], [ - 'touser' => $user['open_id'], - 'template_id' => $template['apply_tpl'], - 'page' => 'pages/dealer/index/index', - 'form_id' => $formId['form_id'], - 'data' => [ - // 申请时间 - 'keyword1' => $dealer['apply_time'], - // 审核状态 - 'keyword2' => $dealer->applyStatus[$dealer['apply_status']], - // 审核时间 - 'keyword3' => $dealer['audit_time'], - // 备注信息 - 'keyword4' => $remark, - ] - ]); - // 标记formid已使用 - FormIdService::setIsUsed($formId['id']); - return $status; + return true; +// // 模板消息id +// $template = DealerSettingModel::getItem('template_msg', $dealer['wxapp_id']); +// if (empty($template['apply_tpl'])) { +// return false; +// } +// // 获取可用的formid +// if (!$formId = FormIdService::getAvailableFormId($dealer['user_id'])) { +// return false; +// } +// // 获取用户信息 +// $user = UserModel::detail($dealer['user_id']); +// // 发送模板消息 +// $remark = '分销商入驻审核通知'; +// if ($dealer['apply_status'] == 30) { +// $remark .= "\n\n驳回原因:" . $dealer['reject_reason']; +// } +// $status = $this->sendTemplateMessage($dealer['wxapp_id'], [ +// 'touser' => $user['open_id'], +// 'template_id' => $template['apply_tpl'], +// 'page' => 'pages/dealer/index/index', +// 'form_id' => $formId['form_id'], +// 'data' => [ +// // 申请时间 +// 'keyword1' => $dealer['apply_time'], +// // 审核状态 +// 'keyword2' => $dealer->applyStatus[$dealer['apply_status']], +// // 审核时间 +// 'keyword3' => $dealer['audit_time'], +// // 备注信息 +// 'keyword4' => $remark, +// ] +// ]); +// // 标记formid已使用 +// FormIdService::setIsUsed($formId['id']); +// return $status; } /** diff --git a/source/application/common/service/order/Refund.php b/source/application/common/service/order/Refund.php index 3e80be6..bca0f37 100644 --- a/source/application/common/service/order/Refund.php +++ b/source/application/common/service/order/Refund.php @@ -52,6 +52,7 @@ class Refund { // 回退用户余额 $user = UserModel::detail($order['user_id']); + if (empty($user)) return false; $user->setInc('balance', $money); // 记录余额明细 BalanceLogModel::add(SceneEnum::REFUND, [ diff --git a/source/application/store/controller/Shop.php b/source/application/store/controller/Shop.php index 9c8410d..a2a8ed8 100644 --- a/source/application/store/controller/Shop.php +++ b/source/application/store/controller/Shop.php @@ -19,7 +19,7 @@ class Shop extends Controller public function index() { $model = new ShopModel; - $list = $model->getList(); + $list = $model->getList($this->request->get()); return $this->fetch('index', compact('list')); } diff --git a/source/application/store/controller/Wxapp.php b/source/application/store/controller/Wxapp.php index b752b99..f2f7770 100644 --- a/source/application/store/controller/Wxapp.php +++ b/source/application/store/controller/Wxapp.php @@ -3,7 +3,6 @@ namespace app\store\controller; use app\store\model\Wxapp as WxappModel; -use app\store\model\WxappNavbar as WxappNavbarModel; /** * 小程序管理 @@ -31,22 +30,4 @@ class Wxapp extends Controller return $this->renderError($model->getError() ?: '更新失败'); } - /** - * 导航栏设置 - * @return array|mixed - * @throws \think\exception\DbException - */ - public function tabbar() - { - $model = WxappNavbarModel::detail(); - if (!$this->request->isAjax()) { - return $this->fetch('tabbar', compact('model')); - } - $data = $this->postData('tabbar'); - if (!$model->edit($data)) { - return $this->renderError('更新失败'); - } - return $this->renderSuccess('更新成功'); - } - } diff --git a/source/application/store/controller/data/Shop.php b/source/application/store/controller/data/Shop.php index 83eaa15..a1bbe22 100644 --- a/source/application/store/controller/data/Shop.php +++ b/source/application/store/controller/data/Shop.php @@ -26,13 +26,12 @@ class Shop extends Controller /** * 门店列表 - * @param null $status * @return mixed * @throws \think\exception\DbException */ - public function lists($status = null) + public function lists() { - $list = $this->model->getList($status); + $list = $this->model->getList($this->request->get()); return $this->fetch('list', compact('list')); } diff --git a/source/application/store/controller/shop/Clerk.php b/source/application/store/controller/shop/Clerk.php index b79c00f..3f464be 100644 --- a/source/application/store/controller/shop/Clerk.php +++ b/source/application/store/controller/shop/Clerk.php @@ -26,7 +26,7 @@ class Clerk extends Controller $model = new ClerkModel; $list = $model->getList(-1, $shop_id, $search); // 门店列表 - $shopList = (new ShopModel)->getList(); + $shopList = ShopModel::getAllList(); return $this->fetch('index', compact('list', 'shopList')); } @@ -40,7 +40,7 @@ class Clerk extends Controller $model = new ClerkModel; if (!$this->request->isAjax()) { // 门店列表 - $shopList = (new ShopModel)->getList(); + $shopList = ShopModel::getAllList(); return $this->fetch('add', compact('shopList')); } // 新增记录 @@ -62,7 +62,7 @@ class Clerk extends Controller $model = ClerkModel::detail($clerk_id); if (!$this->request->isAjax()) { // 门店列表 - $shopList = (new ShopModel)->getList(); + $shopList = ShopModel::getAllList(); return $this->fetch('edit', compact('model', 'shopList')); } // 新增记录 diff --git a/source/application/store/controller/shop/Order.php b/source/application/store/controller/shop/Order.php index 78a61ff..c8d0cfa 100644 --- a/source/application/store/controller/shop/Order.php +++ b/source/application/store/controller/shop/Order.php @@ -26,7 +26,7 @@ class Order extends Controller $model = new OrderModel; $list = $model->getList($shop_id, $search); // 门店列表 - $shopList = (new ShopModel)->getList(); + $shopList = ShopModel::getAllList(); return $this->fetch('index', compact('list', 'shopList')); } diff --git a/source/application/store/model/store/Shop.php b/source/application/store/model/store/Shop.php index a513bc4..7af9cd6 100644 --- a/source/application/store/model/store/Shop.php +++ b/source/application/store/model/store/Shop.php @@ -14,15 +14,14 @@ class Shop extends ShopModel { /** * 获取列表数据 - * @param null $status + * @param array $param * @return \think\Paginator * @throws \think\exception\DbException */ - public function getList($status = null) + public function getList($param = []) { - !is_null($status) && $this->where('status', '=', (int)$status); - return $this->where('is_delete', '=', '0') - ->order(['sort' => 'asc', 'create_time' => 'desc']) + // 查询列表数据 + return $this->setListQueryWhere($param) ->paginate(15, false, [ 'query' => \request()->request() ]); @@ -30,16 +29,27 @@ class Shop extends ShopModel /** * 获取所有门店列表 + * @param array $param * @return false|\PDOStatement|string|\think\Collection - * @throws \think\db\exception\DataNotFoundException - * @throws \think\db\exception\ModelNotFoundException - * @throws \think\exception\DbException */ - public static function getAllList() + public static function getAllList($param = []) { - return (new self)->where('is_delete', '=', '0') - ->order(['sort' => 'asc', 'create_time' => 'desc']) - ->select(); + return (new static)->setListQueryWhere($param)->select(); + } + + /** + * 设置列表查询条件 + * @param array $param + * @return $this + */ + private function setListQueryWhere($param = []) + { + // 查询参数 + $param = array_merge(['is_check' => '', 'search' => '', 'status' => null,], $param); + is_numeric($param['is_check']) && $param['is_check'] > -1 && $this->where('is_check', '=', (int)$param['is_check']); + !empty($param['search']) && $this->where('shop_name|linkman|phone', 'like', "%{$param['search']}%"); + is_numeric($param['status']) && $this->where('status', '=', (int)$param['status']); + return $this->where('is_delete', '=', '0')->order(['sort' => 'asc', 'create_time' => 'desc']); } /** diff --git a/source/application/store/service/Auth.php b/source/application/store/service/Auth.php index 2a2b46e..e671afc 100644 --- a/source/application/store/service/Auth.php +++ b/source/application/store/service/Auth.php @@ -50,6 +50,8 @@ class Auth 'setting.help/*', // 腾讯地图坐标选取器 'shop/getpoint', + // 数据统计 + 'statistics.data/survey', ]; /** @var array $accessUrls 商家用户权限url */ diff --git a/source/application/store/service/wxapp/Message.php b/source/application/store/service/wxapp/Message.php index 10c79f7..0a8ed64 100644 --- a/source/application/store/service/wxapp/Message.php +++ b/source/application/store/service/wxapp/Message.php @@ -37,6 +37,7 @@ class Message } /** + * 执行发送 * @param $data * @return bool * @throws \app\common\exception\BaseException diff --git a/source/application/store/view/data/shop/list.php b/source/application/store/view/data/shop/list.php index ccf2c46..77245b8 100644 --- a/source/application/store/view/data/shop/list.php +++ b/source/application/store/view/data/shop/list.php @@ -11,6 +11,49 @@ 门店列表 + +
+
+ +
+
+ + + +
+
+
+
+
+ get('is_check'); ?> + +
+
+
+ +
+ +
+
+
+
+
+
+
@@ -23,8 +66,9 @@ - + + @@ -49,19 +93,21 @@ - + + - + diff --git a/source/application/store/view/layouts/layout.php b/source/application/store/view/layouts/layout.php index 9fd2383..39b6075 100644 --- a/source/application/store/view/layouts/layout.php +++ b/source/application/store/view/layouts/layout.php @@ -57,61 +57,65 @@ diff --git a/source/application/store/view/shop/clerk/add.php b/source/application/store/view/shop/clerk/add.php index 6a14314..aa7b8f6 100644 --- a/source/application/store/view/shop/clerk/add.php +++ b/source/application/store/view/shop/clerk/add.php @@ -28,7 +28,7 @@
isEmpty()): diff --git a/source/application/store/view/shop/clerk/index.php b/source/application/store/view/shop/clerk/index.php index 3a2def1..c50b1f5 100644 --- a/source/application/store/view/shop/clerk/index.php +++ b/source/application/store/view/shop/clerk/index.php @@ -26,7 +26,7 @@
+
+
+ + +
- -
+
+
+
+
+ get('is_check'); ?> + +
+
+
+ +
+ +
+
+
+
+
+
门店ID 门店logo 门店名称门店地址 自提核销门店状态创建时间
- - - + + + +
暂无记录暂无记录
暂无记录 + diff --git a/version.json b/version.json index c44071b..bca5dee 100644 --- a/version.json +++ b/version.json @@ -1,3 +1,3 @@ { - "version": "1.1.38" + "version": "1.1.39" } diff --git a/web/assets/store/css/app.css b/web/assets/store/css/app.css index 2902560..0e02e3e 100644 --- a/web/assets/store/css/app.css +++ b/web/assets/store/css/app.css @@ -41,74 +41,6 @@ a:focus { fill: currentColor; overflow: hidden; } -.tpl-header { - z-index: 1000; - box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05); - position: fixed; - top: 0; - width: 100%; - transition: all 0.4s ease-in-out; - padding-left: 160px; - -webkit-touch-callout: none; - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; } - -.tpl-header-logo { - width: 240px; - height: 57px; - display: table; - text-align: center; - position: relative; - z-index: 1300; } - .tpl-header-logo a { - display: table-cell; - vertical-align: middle; } - .tpl-header-logo img { - width: 170px; } - -.tpl-header-fluid { - height: 50px; - padding-left: 20px; - padding-right: 20px; - background: #fff; } - -.tpl-header-button { - float: left; - color: #333; - margin: 0 0 0 -20px; - border: 0; - border-radius: 0; - padding: 0 22px; - line-height: 50px; - background: #fff; - cursor: pointer; } - .tpl-header-button:hover { - background: #fff; - color: #999; - outline: none; } - -.tpl-header-navbar { - color: #fff; } - .tpl-header-navbar li { - float: left; } - .tpl-header-navbar a { - line-height: 50px; - display: block; - padding: 0 16px; - position: relative; - color: #333; - -webkit-transition: all .3s; - transition: all .3s; } - .tpl-header-navbar a:hover { - background: rgba(0, 0, 0, 0.025); } - .tpl-header-navbar a .item-feed-badge { - position: absolute; - top: 8px; - left: 25px; - padding: .25em .42em; } - ul.tpl-dropdown-content { padding: 10px; margin-top: 0; @@ -214,16 +146,76 @@ ul.tpl-dropdown-content .tpl-dropdown-menu-messages-item .menu-messages-content .am-datepicker-dropdown { z-index: 1400; } -.left-sidebar { - transition: all 0.4s ease-in-out; - height: 100%; +.tpl-layout { + position: relative; } + +.tpl-header { + z-index: 1000; + box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05); position: fixed; - z-index: 10; top: 0; - left: 0; } + width: 100%; + transition: all 0.4s ease-in-out; + padding-left: 160px; + -webkit-touch-callout: none; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; } + .tpl-header.active { + padding-left: 0; } + .tpl-header .tpl-header-fluid { + height: 50px; + padding-left: 20px; + padding-right: 20px; + background: #fff; } + .tpl-header .tpl-header-fluid .tpl-header-navbar { + color: #fff; } + .tpl-header .tpl-header-fluid .tpl-header-navbar li { + float: left; } + .tpl-header .tpl-header-fluid .tpl-header-navbar a { + line-height: 50px; + display: block; + padding: 0 16px; + position: relative; + color: #333; + -webkit-transition: all .3s; + transition: all .3s; } + .tpl-header .tpl-header-fluid .tpl-header-navbar a:hover { + background: rgba(0, 0, 0, 0.025); } + .tpl-header .tpl-header-fluid .tpl-header-navbar a .item-feed-badge { + position: absolute; + top: 8px; + left: 25px; + padding: .25em .42em; } + .tpl-header .tpl-header-fluid .tpl-header-button { + float: left; + color: #333; + margin: 0 0 0 -20px; + border: 0; + border-radius: 0; + padding: 0 22px; + line-height: 50px; + background: #fff; + cursor: pointer; } + .tpl-header .tpl-header-fluid .tpl-header-button:hover { + background: #fff; + color: #999; + outline: none; } + +.left-sidebar { + position: fixed; + top: 0; + bottom: 0; + left: 0; + z-index: 10; + height: 100%; + transition: all 0.4s ease-in-out; + background-color: #20222a; } + .left-sidebar .sidebar-scroll { + overflow-x: hidden; } .left-sidebar .sidebar-nav { width: 160px; - background-color: #20222a; -webkit-box-shadow: 2px 0 6px rgba(0, 21, 41, 0.35); box-shadow: 2px 0 6px rgba(0, 21, 41, 0.35); } .left-sidebar .sidebar-nav .sidebar-nav-heading { @@ -262,6 +254,9 @@ ul.tpl-dropdown-content .tpl-dropdown-menu-messages-item .menu-messages-content .left-sidebar .sidebar-nav .sidebar-nav-link a:hover { color: #fff; border-left: #1686ef 3px solid; } + .left-sidebar .sidebar-second-scroll { + overflow-x: hidden; + background: #fff; } .left-sidebar .left-sidebar-second { width: 120px; min-height: 100%; @@ -593,10 +588,6 @@ ul.tpl-dropdown-content .tpl-dropdown-menu-messages-item .menu-messages-content .fc button { display: block; } -.tpl-header-search-box:hover, -.tpl-header-search-box:active .tpl-error-title { - color: #848c90; } - .tpl-error-title-info { line-height: 30px; font-size: 21px; @@ -945,13 +936,6 @@ ul.tpl-dropdown-content .tpl-dropdown-menu-notifications-item .tpl-dropdown-menu ul.tpl-dropdown-content .tpl-dropdown-menu-messages-item .tpl-dropdown-menu-notifications-time { color: #999; } -.tpl-header.active { - padding-left: 0; } - -.tpl-header-logo { - background: #fff; - border-bottom: 1px solid #eee; } - .widget-color-green { border: 1px solid #32c5d2; border-top: 2px solid #32c5d2; @@ -994,9 +978,6 @@ ul.tpl-dropdown-content .tpl-dropdown-menu-messages-item .tpl-dropdown-menu-noti width: 86%; padding: 22px 30px 25px; } - .tpl-header-search { - display: none; } - ul.tpl-dropdown-content { position: fixed; width: 100%; diff --git a/web/assets/store/js/diy.js b/web/assets/store/js/diy.js index f142941..b688357 100644 --- a/web/assets/store/js/diy.js +++ b/web/assets/store/js/diy.js @@ -230,7 +230,7 @@ onSelectShop: function (item) { $.selectData({ title: '选择门店', - uri: 'shop/lists&status=1', + uri: 'shop/lists', duplicate: false, dataIndex: 'shop_id', done: function (data) { diff --git a/web/assets/store/scss/app.scss b/web/assets/store/scss/app.scss index b87bb63..9271d59 100644 --- a/web/assets/store/scss/app.scss +++ b/web/assets/store/scss/app.scss @@ -60,86 +60,6 @@ a { overflow: hidden; } -.tpl-header { - z-index: 1000; - box-shadow: 0 1px 2px 0 rgba(0, 0, 0, .05); - position: fixed; - top: 0; - width: 100%; - transition: all 0.4s ease-in-out; - padding-left: 160px; - -webkit-touch-callout: none; - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; -} - -.tpl-header-logo { - width: 240px; - height: 57px; - display: table; - text-align: center; - position: relative; - z-index: 1300; - a { - display: table-cell; - vertical-align: middle; - } - img { - width: 170px; - } -} - -.tpl-header-fluid { - height: 50px; - padding-left: 20px; - padding-right: 20px; - background: #fff; -} - -.tpl-header-button { - float: left; - color: #333; - margin: 0 0 0 -20px; - border: 0; - border-radius: 0; - padding: 0 22px; - line-height: 50px; - background: #fff; - cursor: pointer; - &:hover { - background: #fff; - color: #999; - outline: none; - } -} - -.tpl-header-navbar { - color: #fff; - li { - float: left; - } - a { - line-height: 50px; - display: block; - padding: 0 16px; - position: relative; - color: #333; - -webkit-transition: all .3s; - transition: all .3s; - &:hover { - background: rgba(0, 0, 0, .025); - } - .item-feed-badge { - position: absolute; - top: 8px; - left: 25px; - padding: .25em .42em; - } - } -} - ul { &.tpl-dropdown-content { padding: 10px; @@ -280,18 +200,100 @@ ul.tpl-dropdown-content .tpl-dropdown-menu-messages-item .menu-messages-content z-index: 1400; } +// 容器 +.tpl-layout { + position: relative; +} + +// 顶部状态栏 +.tpl-header { + z-index: 1000; + box-shadow: 0 1px 2px 0 rgba(0, 0, 0, .05); + position: fixed; + top: 0; + width: 100%; + transition: all 0.4s ease-in-out; + padding-left: 160px; + -webkit-touch-callout: none; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + + &.active { + padding-left: 0; + } + + .tpl-header-fluid { + height: 50px; + padding-left: 20px; + padding-right: 20px; + background: #fff; + + .tpl-header-navbar { + color: #fff; + li { + float: left; + } + a { + line-height: 50px; + display: block; + padding: 0 16px; + position: relative; + color: #333; + -webkit-transition: all .3s; + transition: all .3s; + &:hover { + background: rgba(0, 0, 0, .025); + } + .item-feed-badge { + position: absolute; + top: 8px; + left: 25px; + padding: .25em .42em; + } + } + } + + .tpl-header-button { + float: left; + color: #333; + margin: 0 0 0 -20px; + border: 0; + border-radius: 0; + padding: 0 22px; + line-height: 50px; + background: #fff; + cursor: pointer; + &:hover { + background: #fff; + color: #999; + outline: none; + } + } + + } + +} + // 左侧菜单栏 .left-sidebar { - transition: all 0.4s ease-in-out; - height: 100%; position: fixed; - z-index: 10; top: 0; + bottom: 0; left: 0; + z-index: 10; + height: 100%; + transition: all 0.4s ease-in-out; + background-color: #20222a; + + .sidebar-scroll { + overflow-x: hidden; + } + // 一级菜单 .sidebar-nav { width: 160px; - background-color: #20222a; -webkit-box-shadow: 2px 0 6px rgba(0, 21, 41, .35); box-shadow: 2px 0 6px rgba(0, 21, 41, .35); @@ -346,6 +348,11 @@ ul.tpl-dropdown-content .tpl-dropdown-menu-messages-item .menu-messages-content } // 二级菜单 + .sidebar-second-scroll { + overflow-x: hidden; + background: #fff; + } + .left-sidebar-second { width: 120px; min-height: 100%; @@ -794,11 +801,6 @@ ul.tpl-dropdown-content .tpl-dropdown-menu-messages-item .menu-messages-content display: block; } -.tpl-header-search-box:hover, -.tpl-header-search-box:active .tpl-error-title { - color: #848c90; -} - .tpl-error-title-info { line-height: 30px; font-size: 21px; @@ -1251,17 +1253,6 @@ ul.tpl-dropdown-content .tpl-dropdown-menu-messages-item .tpl-dropdown-menu-noti color: #999; } -.tpl-header { - &.active { - padding-left: 0; - } -} - -.tpl-header-logo { - background: #fff; - border-bottom: 1px solid #eee; -} - .widget-color-green { border: 1px solid #32c5d2; border-top: 2px solid #32c5d2; @@ -1318,9 +1309,6 @@ ul.tpl-dropdown-content .tpl-dropdown-menu-messages-item .tpl-dropdown-menu-noti width: 86%; padding: 22px 30px 25px; } - .tpl-header-search { - display: none; - } ul.tpl-dropdown-content { position: fixed; width: 100%;
暂无记录