初始上传
This commit is contained in:
32
addon/cashier/event/CashierOrderPayNotify.php
Executable file
32
addon/cashier/event/CashierOrderPayNotify.php
Executable file
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
/**
|
||||
* Niushop商城系统 - 团队十年电商经验汇集巨献!
|
||||
* =========================================================
|
||||
* Copy right 2019-2029 上海牛之云网络科技有限公司, 保留所有权利。
|
||||
* ----------------------------------------------
|
||||
* 官方网址: https://www.niushop.com
|
||||
* 这不是一个自由软件!您只能在不用于商业目的的前提下对程序代码进行修改和使用。
|
||||
* 任何企业和个人不允许对程序代码以任何形式任何目的再发布。
|
||||
* =========================================================
|
||||
*/
|
||||
|
||||
namespace addon\cashier\event;
|
||||
|
||||
use addon\cashier\model\order\CashierOrderPay;
|
||||
|
||||
/**
|
||||
* 订单异步回调执行
|
||||
*/
|
||||
class CashierOrderPayNotify
|
||||
{
|
||||
|
||||
// 行为扩展的执行入口必须是run
|
||||
public function handle($data)
|
||||
{
|
||||
$order_pay_model = new CashierOrderPay();
|
||||
$data[ 'online_type' ] = 'online';
|
||||
$result = $order_pay_model->doPay($data);
|
||||
return $result;
|
||||
}
|
||||
|
||||
}
|
||||
47
addon/cashier/event/CronOrderDelete.php
Executable file
47
addon/cashier/event/CronOrderDelete.php
Executable file
@@ -0,0 +1,47 @@
|
||||
<?php
|
||||
/**
|
||||
* Niushop商城系统 - 团队十年电商经验汇集巨献!
|
||||
* =========================================================
|
||||
* Copy right 2019-2029 杭州牛之云科技有限公司, 保留所有权利。
|
||||
* ----------------------------------------------
|
||||
* 官方网址: https://www.niushop.com
|
||||
* =========================================================
|
||||
*/
|
||||
|
||||
namespace addon\cashier\event;
|
||||
|
||||
use addon\cashier\model\order\CashierOrder as CashierOrderModel;
|
||||
use app\model\order\OrderCommon;
|
||||
|
||||
/**
|
||||
* 订单自动删除事件(5分钟内未支付)
|
||||
*/
|
||||
class CronOrderDelete
|
||||
{
|
||||
// 行为扩展的执行入口必须是run
|
||||
public function handle($data)
|
||||
{
|
||||
$order = new OrderCommon();
|
||||
$order_info = $order->getOrderInfo([ ['order_id', '=', $data['relate_id'] ] ], 'order_id,order_status,store_id,site_id')[ 'data' ];
|
||||
if (!empty($order_info) && $order_info['order_status'] == 0) {
|
||||
|
||||
//订单关闭并删除
|
||||
$order_common_model = new OrderCommon();
|
||||
$close_result = $order_common_model->orderClose($order_info[ 'order_id' ]);
|
||||
if ($close_result[ 'code' ] < 0) {
|
||||
return $close_result;
|
||||
}
|
||||
$order_model = new CashierOrderModel();
|
||||
$condition = array (
|
||||
[ 'site_id', '=', $order_info[ 'site_id' ] ],
|
||||
[ 'store_id', '=', $order_info[ 'store_id' ] ],
|
||||
[ 'order_id', '=', $order_info[ 'order_id' ] ],
|
||||
);
|
||||
|
||||
$res = $order_model->deleteOrder($condition);
|
||||
return $res;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
40
addon/cashier/event/GetOrderModel.php
Executable file
40
addon/cashier/event/GetOrderModel.php
Executable file
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
/**
|
||||
* Niushop商城系统 - 团队十年电商经验汇集巨献!
|
||||
* =========================================================
|
||||
* Copy right 2019-2029 杭州牛之云科技有限公司, 保留所有权利。
|
||||
* ----------------------------------------------
|
||||
* 官方网址: https://www.niushop.com
|
||||
|
||||
* =========================================================
|
||||
*/
|
||||
|
||||
namespace addon\cashier\event;
|
||||
|
||||
|
||||
use addon\cashier\model\order\CashierOrder;
|
||||
use app\dict\goods\GoodsDict;
|
||||
|
||||
/**
|
||||
* 订单类型映射
|
||||
*/
|
||||
class GetOrderModel
|
||||
{
|
||||
/**
|
||||
* 支付方式及配置
|
||||
*/
|
||||
public function handle($param)
|
||||
{
|
||||
if($param['order_type'] == 5){
|
||||
if(isset($param['order_goods']) && count($param['order_goods']) == 1){
|
||||
if(in_array($param['order_goods'][0]['goods_class'], [GoodsDict::virtual, GoodsDict::virtualcard, GoodsDict::service, GoodsDict::card])){
|
||||
$order_model = new \app\model\order\VirtualOrder();
|
||||
return $order_model;
|
||||
}
|
||||
}
|
||||
$order_model = new CashierOrder();
|
||||
return $order_model;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
29
addon/cashier/event/GetOrderType.php
Executable file
29
addon/cashier/event/GetOrderType.php
Executable file
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
/**
|
||||
* Niushop商城系统 - 团队十年电商经验汇集巨献!
|
||||
* =========================================================
|
||||
* Copy right 2019-2029 杭州牛之云科技有限公司, 保留所有权利。
|
||||
* ----------------------------------------------
|
||||
* 官方网址: https://www.niushop.com
|
||||
|
||||
* =========================================================
|
||||
*/
|
||||
|
||||
namespace addon\cashier\event;
|
||||
|
||||
/**
|
||||
* 订单类型
|
||||
*/
|
||||
class GetOrderType
|
||||
{
|
||||
/**
|
||||
* 订单类型
|
||||
*/
|
||||
public function handle($param)
|
||||
{
|
||||
return [
|
||||
5 => '收银订单'
|
||||
];
|
||||
|
||||
}
|
||||
}
|
||||
32
addon/cashier/event/IncomeStatistics.php
Executable file
32
addon/cashier/event/IncomeStatistics.php
Executable file
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
/**
|
||||
* Niushop商城系统 - 团队十年电商经验汇集巨献!
|
||||
* =========================================================
|
||||
* Copy right 2019-2029 杭州牛之云科技有限公司, 保留所有权利。
|
||||
* ----------------------------------------------
|
||||
* 官方网址: https://www.niushop.com
|
||||
* =========================================================
|
||||
*/
|
||||
|
||||
namespace addon\cashier\event;
|
||||
|
||||
use app\model\order\Order as OrderModel;
|
||||
|
||||
/**
|
||||
* 资金收入统计
|
||||
*/
|
||||
class IncomeStatistics
|
||||
{
|
||||
public function handle($param)
|
||||
{
|
||||
$money = ( new OrderModel() )->getOrderMoneySum([ [ 'site_id', '=', $param[ 'site_id' ] ], [ 'pay_time', 'between', [ $param[ 'start_time' ], $param[ 'end_time' ] ] ], [ 'order_scene', '=', 'cashier' ], [ 'cashier_order_type', '<>', 'recharge' ] ], 'pay_money')[ 'data' ];
|
||||
return [
|
||||
[
|
||||
'title' => '收银订单',
|
||||
'value' => $money,
|
||||
'desc' => '统计时间内,收银台所有开放售卡订单实付金额之和',
|
||||
'url' => 'cashier://shop/order/lists'
|
||||
]
|
||||
];
|
||||
}
|
||||
}
|
||||
30
addon/cashier/event/Install.php
Executable file
30
addon/cashier/event/Install.php
Executable file
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
/**
|
||||
* Niushop商城系统 - 团队十年电商经验汇集巨献!
|
||||
* =========================================================
|
||||
* Copy right 2019-2029 杭州牛之云科技有限公司, 保留所有权利。
|
||||
* ----------------------------------------------
|
||||
* 官方网址: https://www.niushop.com
|
||||
* =========================================================
|
||||
*/
|
||||
|
||||
namespace addon\cashier\event;
|
||||
|
||||
use addon\cashier\model\Cashier;
|
||||
use app\model\system\Menu;
|
||||
|
||||
/**
|
||||
* 应用安装
|
||||
*/
|
||||
class Install
|
||||
{
|
||||
/**
|
||||
* 执行安装
|
||||
*/
|
||||
public function handle()
|
||||
{
|
||||
(new Cashier())->refreshCashier();
|
||||
(new Menu())->refreshCashierAuth('cashier');
|
||||
return success();
|
||||
}
|
||||
}
|
||||
31
addon/cashier/event/OrderFromList.php
Executable file
31
addon/cashier/event/OrderFromList.php
Executable file
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
/**
|
||||
* Niushop商城系统 - 团队十年电商经验汇集巨献!
|
||||
* =========================================================
|
||||
* Copy right 2019-2029 杭州牛之云科技有限公司, 保留所有权利。
|
||||
* ----------------------------------------------
|
||||
* 官方网址: https://www.niushop.com
|
||||
* =========================================================
|
||||
*/
|
||||
|
||||
namespace addon\cashier\event;
|
||||
|
||||
use addon\cashier\model\order\CashierOrder;
|
||||
|
||||
/**
|
||||
* 订单来源
|
||||
*/
|
||||
class OrderFromList
|
||||
{
|
||||
/**
|
||||
* 订单来源
|
||||
*/
|
||||
public function handle($params)
|
||||
{
|
||||
$order_scene = $params[ 'order_scene' ] ?? '';
|
||||
if (empty($order_scene) || $order_scene = 'cashier') {
|
||||
return ( new CashierOrder )->order_from_list;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
34
addon/cashier/event/OrderGoodsRefund.php
Executable file
34
addon/cashier/event/OrderGoodsRefund.php
Executable file
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
/**
|
||||
* Niushop商城系统 - 团队十年电商经验汇集巨献!
|
||||
* =========================================================
|
||||
* Copy right 2019-2029 杭州牛之云科技有限公司, 保留所有权利。
|
||||
* ----------------------------------------------
|
||||
* 官方网址: https://www.niushop.com
|
||||
* =========================================================
|
||||
*/
|
||||
|
||||
namespace addon\cashier\event;
|
||||
|
||||
|
||||
use addon\cashier\model\order\CashierOrder;
|
||||
use app\dict\order\OrderDict;
|
||||
|
||||
/**
|
||||
* 订单项退款
|
||||
*/
|
||||
class OrderGoodsRefund
|
||||
{
|
||||
/**
|
||||
* 支付方式及配置
|
||||
*/
|
||||
public function handle($params)
|
||||
{
|
||||
$order_info = $params[ 'order_info' ];
|
||||
if ($order_info[ 'order_type' ] == OrderDict::cashier) {
|
||||
$order_model = new CashierOrder();
|
||||
$result = $order_model->refund($params);
|
||||
return $result;
|
||||
}
|
||||
}
|
||||
}
|
||||
28
addon/cashier/event/OrderPay.php
Executable file
28
addon/cashier/event/OrderPay.php
Executable file
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
/**
|
||||
* Niushop商城系统 - 团队十年电商经验汇集巨献!
|
||||
* =========================================================
|
||||
* Copy right 2019-2029 杭州牛之云科技有限公司, 保留所有权利。
|
||||
* ----------------------------------------------
|
||||
* 官方网址: https://www.niushop.com
|
||||
|
||||
* =========================================================
|
||||
*/
|
||||
|
||||
namespace addon\cashier\event;
|
||||
|
||||
use addon\cashier\model\Push as PushModel;
|
||||
|
||||
/**
|
||||
* 订单类型
|
||||
*/
|
||||
class OrderPay
|
||||
{
|
||||
/**
|
||||
* 订单类型
|
||||
*/
|
||||
public function handle($order_info)
|
||||
{
|
||||
return (new PushModel())->orderPay($order_info);
|
||||
}
|
||||
}
|
||||
33
addon/cashier/event/PayRefund.php
Executable file
33
addon/cashier/event/PayRefund.php
Executable file
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
/**
|
||||
* Niushop商城系统 - 团队十年电商经验汇集巨献!
|
||||
* =========================================================
|
||||
* Copy right 2019-2029 杭州牛之云科技有限公司, 保留所有权利。
|
||||
* ----------------------------------------------
|
||||
* 官方网址: https://www.niushop.com
|
||||
* =========================================================
|
||||
*/
|
||||
|
||||
namespace addon\cashier\event;
|
||||
|
||||
use addon\cashier\model\order\CashierOrder;
|
||||
|
||||
/**
|
||||
* 原路退款
|
||||
*/
|
||||
class PayRefund
|
||||
{
|
||||
/**
|
||||
* 关闭支付
|
||||
*/
|
||||
public function handle($params)
|
||||
{
|
||||
$pay_type_array = array (
|
||||
'cash', 'own_wechatpay', 'own_alipay', 'own_pos'
|
||||
);
|
||||
if (in_array($params[ "pay_info" ][ "pay_type" ], $pay_type_array)) {
|
||||
$cashier_order_model = new CashierOrder();
|
||||
return $cashier_order_model->success();
|
||||
}
|
||||
}
|
||||
}
|
||||
145
addon/cashier/event/PrinterContent.php
Executable file
145
addon/cashier/event/PrinterContent.php
Executable file
@@ -0,0 +1,145 @@
|
||||
<?php
|
||||
/**
|
||||
* Niushop商城系统 - 团队十年电商经验汇集巨献!
|
||||
* =========================================================
|
||||
* Copy right 2019-2029 杭州牛之云科技有限公司, 保留所有权利。
|
||||
* ----------------------------------------------
|
||||
* 官方网址: https://www.niushop.com
|
||||
* =========================================================
|
||||
*/
|
||||
|
||||
namespace addon\cashier\event;
|
||||
|
||||
use addon\cashier\model\Cashier;
|
||||
use addon\printer\model\Printer;
|
||||
use addon\printer\model\PrinterTemplate;
|
||||
use app\model\system\Site;
|
||||
|
||||
/**
|
||||
* 打印内容
|
||||
*/
|
||||
class PrinterContent
|
||||
{
|
||||
public function handle($params)
|
||||
{
|
||||
if ($params[ 'type' ] == 'change_shifts') {
|
||||
$print_model = new Printer();
|
||||
$printer_condition = [
|
||||
[ 'site_id', '=', $params[ 'site_id' ] ],
|
||||
[ 'store_id', '=', $params[ 'store_id' ] ],
|
||||
[ 'change_shifts_open', '=', 1 ],
|
||||
];
|
||||
//指定打印机
|
||||
if(isset($params['printer_ids']) && $params['printer_ids'] != 'all'){
|
||||
if(empty($params['printer_ids'])) $params['printer_ids'] = '0';
|
||||
$printer_condition[] = ['printer_id', 'in', $params['printer_ids']];
|
||||
}
|
||||
$printer_data = $print_model->getPrinterList($printer_condition)[ 'data' ] ?? [];
|
||||
if (empty($printer_data)) return error(-1, '未找到可用的打印机');
|
||||
|
||||
if (isset($params[ 'record_id' ]) && !empty($params[ 'record_id' ])) {
|
||||
$shifts_data = ( new Cashier() )->getChangeShiftsRecordInfo([
|
||||
[ 'r.site_id', '=', $params[ 'site_id' ] ], [ 'r.store_id', '=', $params[ 'store_id' ] ], [ 'r.id', '=', $params[ 'record_id' ] ]
|
||||
], 'r.*,u.username', 'r', [ [ 'user u', 'r.uid = u.uid', 'inner' ] ])[ 'data' ];
|
||||
if (empty($shifts_data)) return error(-1, '未查询到交班记录');
|
||||
$user_info = [
|
||||
'username' => $shifts_data[ 'username' ]
|
||||
];
|
||||
$shifts_data['sale_goods_count'] = ( new Cashier() )->getSaleGoodsCount([
|
||||
['o.store_id', '=', $shifts_data['store_id']],
|
||||
['o.pay_time', '>', $shifts_data['start_time']],
|
||||
['o.pay_time', '<=', $shifts_data['end_time']],
|
||||
])['data'];
|
||||
} else {
|
||||
$shifts_data = ( new Cashier() )->getShiftsData($params[ 'site_id' ], $params[ 'store_id' ]);
|
||||
$user_info = $params[ 'userinfo' ];
|
||||
}
|
||||
|
||||
$res_data = [];
|
||||
foreach ($printer_data as $k => $v) {
|
||||
//此处应该根据打印机不同分别设置返回不同的数据。当前为易联云
|
||||
$array = [];
|
||||
$array[ 'printer_info' ] = $v;
|
||||
|
||||
$template_id = $v[ 'change_shifts_template_id' ];
|
||||
$print_num = $v[ 'change_shifts_print_num' ];
|
||||
|
||||
$print_template_model = new PrinterTemplate();
|
||||
$print_template = $print_template_model->getPrinterTemplateInfo([ [ 'template_id', '=', $template_id ] ])[ 'data' ];
|
||||
if (empty($print_template)) continue;
|
||||
|
||||
$array[ 'printer_code' ] = $v[ 'printer_code' ]; //商户授权机器码
|
||||
$array[ 'origin_id' ] = time();
|
||||
$array[ 'content' ] = $this->handleChangeShiftsPrintContent($print_num, $print_template, $user_info, $shifts_data);
|
||||
|
||||
$res_data[] = $array;
|
||||
}
|
||||
return $res_data;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取收银交班打印内容
|
||||
* @param $print_num
|
||||
* @param $print_template
|
||||
* @param $user_info
|
||||
* @param $shifts_data
|
||||
* @return string
|
||||
*/
|
||||
private function handleChangeShiftsPrintContent($print_num, $print_template, $user_info, $shifts_data)
|
||||
{
|
||||
$content = "<MN>" . $print_num . "</MN>";
|
||||
//小票名称
|
||||
if ($print_template[ 'title' ] != '') {
|
||||
$content .= "<center>" . $print_template[ 'title' ] . "</center>";
|
||||
$content .= str_repeat('.', 32);
|
||||
}
|
||||
//商城名称
|
||||
if ($print_template[ 'head' ] == 1) {
|
||||
$site_name = ( new Site() )->getSiteInfo([ [ 'site_id', '=', request()->siteid() ] ], 'site_name')[ 'data' ][ 'site_name' ] ?? '';
|
||||
$content .= "<FH2><FS><center>" . $site_name . "</center></FS></FH2>";
|
||||
$content .= str_repeat('.', 32);
|
||||
}
|
||||
$content .= "交班员工:" . $user_info[ 'username' ] . "\n";
|
||||
$content .= "上班时间:" . ( $shifts_data[ 'start_time' ] ? date("Y-m-d H:i:s", $shifts_data[ 'start_time' ]) : '初始化' ) . "\n";
|
||||
$content .= "交班时间:" . date("Y-m-d H:i:s", $shifts_data[ 'end_time' ]) . "\n";
|
||||
$content .= str_repeat('.', 32);
|
||||
|
||||
$content .= "<FH2><FS>总销售</FS></FH2>\n";
|
||||
$content .= "开单销售:¥" . $shifts_data[ "billing_money" ] . "\n";
|
||||
$content .= "售卡销售:¥" . $shifts_data[ "buycard_money" ] . "\n";
|
||||
$content .= str_repeat('.', 32);
|
||||
|
||||
$content .= "<FH2><FS>会员充值</FS></FH2>\n";
|
||||
$content .= "会员充值:¥" . $shifts_data[ "recharge_money" ] . "\n";
|
||||
$content .= str_repeat('.', 32);
|
||||
|
||||
$content .= "<FH2><FS>应收金额</FS></FH2>\n";
|
||||
$content .= "开单销售:¥" . $shifts_data[ "billing_money" ] . "\n";
|
||||
$content .= "售卡销售:¥" . $shifts_data[ "buycard_money" ] . "\n";
|
||||
$content .= "会员充值:¥" . $shifts_data[ "recharge_money" ] . "\n";
|
||||
$content .= "订单退款:¥" . $shifts_data[ "refund_money" ] . "\n";
|
||||
$content .= str_repeat('.', 32);
|
||||
|
||||
$pay_arr = [];
|
||||
if ($shifts_data[ "cash" ] > 0) $pay_arr[] = "现金收款:¥" . $shifts_data[ "cash" ] . "\n";
|
||||
if ($shifts_data[ "wechatpay" ] > 0) $pay_arr[] = "微信收款:¥" . $shifts_data[ "wechatpay" ] . "\n";
|
||||
if ($shifts_data[ "alipay" ] > 0) $pay_arr[] = "支付宝收款:¥" . $shifts_data[ "alipay" ] . "\n";
|
||||
if ($shifts_data[ "own_wechatpay" ] > 0) $pay_arr[] = "个人微信收款:¥" . $shifts_data[ "own_wechatpay" ] . "\n";
|
||||
if ($shifts_data[ "own_alipay" ] > 0) $pay_arr[] = "个人支付宝收款:¥" . $shifts_data[ "own_alipay" ] . "\n";
|
||||
if ($shifts_data[ "own_pos" ] > 0) $pay_arr[] = "个人POS收款:¥" . $shifts_data[ "own_pos" ] . "\n";
|
||||
if(!empty($pay_arr)){
|
||||
$content .= "<FH2><FS>支付统计</FS></FH2>\n";
|
||||
$content .= join('', $pay_arr);
|
||||
}
|
||||
|
||||
if($shifts_data['sale_goods_count']['num'] > 0){
|
||||
$content .= "<FH2><FS>商品销售</FS></FH2>\n";
|
||||
$content .= "总计:".$shifts_data['sale_goods_count']['class_num']."种".$shifts_data['sale_goods_count']['num']."件\n";
|
||||
$content .= "线上:".$shifts_data['sale_goods_count']['online_class_num']."种".$shifts_data['sale_goods_count']['online_num']."件\n";
|
||||
$content .= "线下:".$shifts_data['sale_goods_count']['offline_class_num']."种".$shifts_data['sale_goods_count']['offline_num']."件\n";
|
||||
}
|
||||
|
||||
return $content;
|
||||
}
|
||||
}
|
||||
26
addon/cashier/event/PrinterHtml.php
Executable file
26
addon/cashier/event/PrinterHtml.php
Executable file
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
/**
|
||||
* Niushop商城系统 - 团队十年电商经验汇集巨献!
|
||||
* =========================================================
|
||||
* Copy right 2019-2029 杭州牛之云科技有限公司, 保留所有权利。
|
||||
* ----------------------------------------------
|
||||
* 官方网址: https://www.niushop.com
|
||||
|
||||
* =========================================================
|
||||
*/
|
||||
|
||||
namespace addon\cashier\event;
|
||||
|
||||
use app\Controller;
|
||||
|
||||
/**
|
||||
* 收银交班打印
|
||||
*/
|
||||
class PrinterHtml extends Controller
|
||||
{
|
||||
|
||||
public function handle($data)
|
||||
{
|
||||
return $this->fetch('addon/cashier/shop/view/printer/printer_template.html');
|
||||
}
|
||||
}
|
||||
31
addon/cashier/event/PrinterTemplateType.php
Executable file
31
addon/cashier/event/PrinterTemplateType.php
Executable file
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
/**
|
||||
* Niushop商城系统 - 团队十年电商经验汇集巨献!
|
||||
* =========================================================
|
||||
* Copy right 2019-2029 杭州牛之云科技有限公司, 保留所有权利。
|
||||
* ----------------------------------------------
|
||||
* 官方网址: https://www.niushop.com
|
||||
|
||||
* =========================================================
|
||||
*/
|
||||
|
||||
namespace addon\cashier\event;
|
||||
|
||||
/**
|
||||
* 收银交班打印
|
||||
*/
|
||||
class PrinterTemplateType
|
||||
{
|
||||
|
||||
public function handle($data)
|
||||
{
|
||||
return [
|
||||
[
|
||||
'type' => 'change_shifts',
|
||||
'type_name' => '收银交班',
|
||||
'edit' => 'addon/cashier/shop/view/printer/change_shifts.html',
|
||||
'add' => 'addon/cashier/shop/view/printer/change_shifts.html',
|
||||
]
|
||||
];
|
||||
}
|
||||
}
|
||||
48
addon/cashier/event/ShowPromotion.php
Executable file
48
addon/cashier/event/ShowPromotion.php
Executable file
@@ -0,0 +1,48 @@
|
||||
<?php
|
||||
/**
|
||||
* Niushop商城系统 - 团队十年电商经验汇集巨献!
|
||||
* =========================================================
|
||||
* Copy right 2019-2029 杭州牛之云科技有限公司, 保留所有权利。
|
||||
* ----------------------------------------------
|
||||
* 官方网址: https://www.niushop.com
|
||||
* 这不是一个自由软件!您只能在不用于商业目的的前提下对程序代码进行修改和使用。
|
||||
* 任何企业和个人不允许对程序代码以任何形式任何目的再发布。
|
||||
* =========================================================
|
||||
*/
|
||||
|
||||
|
||||
namespace addon\cashier\event;
|
||||
|
||||
/**
|
||||
* 活动展示
|
||||
*/
|
||||
class ShowPromotion
|
||||
{
|
||||
|
||||
/**
|
||||
* 活动展示
|
||||
* @return array
|
||||
*/
|
||||
public function handle()
|
||||
{
|
||||
$data = [
|
||||
'shop' => [
|
||||
[
|
||||
//插件名称
|
||||
'name' => 'cashier',
|
||||
//店铺端展示分类 shop:营销活动 member:互动营销
|
||||
'show_type' => 'tool',
|
||||
//展示主题
|
||||
'title' => '收银台',
|
||||
//展示介绍
|
||||
'description' => '收银台',
|
||||
//展示图标
|
||||
'icon' => 'addon/cashier/icon.png',
|
||||
//跳转链接
|
||||
'url' => 'cashier://shop/index/cashier',
|
||||
]
|
||||
]
|
||||
];
|
||||
return $data;
|
||||
}
|
||||
}
|
||||
35
addon/cashier/event/TradePayType.php
Executable file
35
addon/cashier/event/TradePayType.php
Executable file
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
/**
|
||||
* Niushop商城系统 - 团队十年电商经验汇集巨献!
|
||||
* =========================================================
|
||||
* Copy right 2019-2029 杭州牛之云科技有限公司, 保留所有权利。
|
||||
* ----------------------------------------------
|
||||
* 官方网址: https://www.niushop.com
|
||||
|
||||
* =========================================================
|
||||
*/
|
||||
|
||||
namespace addon\cashier\event;
|
||||
|
||||
|
||||
/**
|
||||
* 支付方式 (后台调用)
|
||||
*/
|
||||
class TradePayType
|
||||
{
|
||||
/**
|
||||
* 支付方式及配置
|
||||
*/
|
||||
public function handle($param)
|
||||
{
|
||||
|
||||
$info = [
|
||||
'cash' => '现金支付',
|
||||
'own_wechatpay' => '个人微信',
|
||||
'own_alipay' => '个人支付宝',
|
||||
'own_pos' => '个人pos刷卡',
|
||||
'ONLINE_PAY' => '在线支付',
|
||||
];
|
||||
return $info;
|
||||
}
|
||||
}
|
||||
26
addon/cashier/event/UnInstall.php
Executable file
26
addon/cashier/event/UnInstall.php
Executable file
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
/**
|
||||
* Niushop商城系统 - 团队十年电商经验汇集巨献!
|
||||
* =========================================================
|
||||
* Copy right 2019-2029 杭州牛之云科技有限公司, 保留所有权利。
|
||||
* ----------------------------------------------
|
||||
* 官方网址: https://www.niushop.com
|
||||
|
||||
* =========================================================
|
||||
*/
|
||||
|
||||
namespace addon\cashier\event;
|
||||
|
||||
/**
|
||||
* 应用卸载
|
||||
*/
|
||||
class UnInstall
|
||||
{
|
||||
/**
|
||||
* 执行卸载
|
||||
*/
|
||||
public function handle()
|
||||
{
|
||||
return success();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user