宅男在线永久免费观看网直播,亚洲欧洲日产国码无码久久99,野花社区在线观看视频,亚洲人交乣女bbw,一本一本久久a久久精品综合不卡

全部
常見(jiàn)問(wèn)題
產(chǎn)品動(dòng)態(tài)
精選推薦

易聯(lián)云小票打印兼容問(wèn)題

管理 管理 編輯 刪除

問(wèn)題說(shuō)明:易聯(lián)云小票打印兼容問(wèn)題

修改文件:app\services\message\SystemPrinterServices

修改方法:ylyContent()

public function ylyContent($printContent, $config, $print_num, $print_event)
    {
        $orderInfo = $config['orderInfo'];
        $product = $config['product'];
        $name = $config['name'];
        $goodsStr = '<table><tr><td>名稱</td><td>單價(jià)</td><td>數(shù)量</td><td>金額</td></tr>';
        foreach ($product as $item) {
            $goodsStr .= '<tr><td><FH2><FW2>----------------</FW2></FH2></td></tr>';
            $goodsStr .= '<tr>';
            $price = $item['sum_price'];
            $num = $item['cart_num'];
            $prices = bcmul((string)$item['cart_num'], (string)$item['sum_price'], 2);
            $goodsStr .= "<td>{$item['productInfo']['store_name']} | {$item['productInfo']['attrInfo']['suk']}</td><td>{$price}</td><td>{$num}</td><td>{$prices}</td>";
            $goodsStr .= '</tr>';
            if (in_array(1, $printContent['goods'])) {
                $goodsStr .= '<tr>';
                $goodsStr .= "<td>規(guī)格編碼:{$item['productInfo']['attrInfo']['code']}</td>";
                $goodsStr .= '</tr>';
            }
            unset($price, $num, $prices);
        }
        $goodsStr .= '</table>';
        $total_price = bcadd($orderInfo['total_price'], $orderInfo['pay_postage'], 2);
        $addTime = date('Y-m-d H:i:s', $orderInfo['add_time']);
        $payTime = isset($orderInfo['pay_time']) ? date('Y-m-d H:i:s', $orderInfo['pay_time']) : '';
        $printTime = date('Y-m-d H:i:s', time());

        $content = '';
        $content .= '<MN>' . $print_num . '</MN>';
        if ($printContent['header']) {
            if (in_array(0, $printContent['header'])) {
                $content .= '<FS2><center>' . $name . '</center></FS2>';
            }
            if (in_array(1, $printContent['header']) && $orderInfo['store_id']) {
                /** @var SystemStoreServices $storeServices */
                $storeServices = app()->make(SystemStoreServices::class);
                $store_name = $storeServices->value(['id' => $orderInfo['store_id']], 'name');
                $content .= '<FS2><center>' . $store_name . '</center></FS2>';
            }
            $content .= '<FH2><FW2>----------------</FW2></FH2>';
        }
        if ($printContent['delivery']) {
            if (in_array(0, $printContent['delivery'])) {
                if ($orderInfo['shipping_type'] == 1) {
                    $content .= "配送方式:商家配送 \r";
                } else {
                    $content .= "配送方式:門店自提 \r";
                }
            }
            if (in_array(1, $printContent['delivery'])) {
                $content .= '客戶姓名: ' . $orderInfo['real_name'] . " \r";
            }
            if (in_array(2, $printContent['delivery'])) {
                $content .= '客戶電話: ' . $orderInfo['user_phone'] . " \r";
            }
            if (in_array(3, $printContent['delivery'])) {
                if ($orderInfo['shipping_type'] == 1) $content .= '收貨地址: ' . $orderInfo['user_address'] . " \r";
            }
            $content .= '<FH2><FW2>----------------</FW2></FH2>';
        }
        if ($printContent['buyer_remarks']) {
            $content .= '買家備注: ' . $orderInfo['mark'] . " \r";
            $content .= '<FH2><FW2>----------------</FW2></FH2>';
        }
        if (in_array(0, $printContent['goods'])) {
            $content .= '*************商品***************';
            $content .= "      \r";
            $content .= $goodsStr;
            $content .= "********************************\r";
            $content .= '<FH2><FW2>----------------</FW2></FH2>';
        }
        if ($printContent['freight']) {
            $content .= '<RA>郵費(fèi):' . $orderInfo['pay_postage'] . '元</RA>';
            $content .= '<RA>合計(jì):' . $total_price . '元</RA>';
            $content .= '<FH2><FW2>----------------</FW2></FH2>';
        }
        if ($printContent['preferential']) {
            $discount_price = bcsub(bcadd($orderInfo['total_price'], $orderInfo['pay_postage'], 2), bcadd($orderInfo['deduction_price'], $orderInfo['pay_price'], 2), 2);
            $content .= '<RA>優(yōu)惠:-' . $discount_price . '元</RA>';
            $content .= '<RA>抵扣:-' . $orderInfo['deduction_price'] . '元</RA>';
            $content .= '<FH2><FW2>----------------</FW2></FH2>';
        }
        if (in_array(0, $printContent['pay'])) {
            if ($print_event == 2) {
                switch ($orderInfo['pay_type']) {
                    case 'weixin':
                        '<RA>支付方式:微信支付</RA>';
                        break;
                    case 'alipay':
                        '<RA>支付方式:支付寶支付</RA>';
                        break;
                    case 'yue':
                        '<RA>支付方式:余額支付</RA>';
                        break;
                    case 'offline':
                        '<RA>支付方式:線下支付</RA>';
                        break;
                    default:
                        '<RA>支付方式:暫無(wú)</RA>';
                }
            } else {
                $content .= '<RA>支付方式:暫無(wú)</RA>';
            }
        }
        if (in_array(1, $printContent['pay'])) {
            $content .= '<RA>實(shí)際支付:' . $orderInfo['pay_price'] . '元</RA>';
        }
        if (count($printContent['pay'])) {
            $content .= '<FH2><FW2>----------------</FW2></FH2>';
        }
        if (in_array(0, $printContent['order'])) {
            $content .= '訂單編號(hào):' . $orderInfo['order_id'] . "\r";
        }
        if (in_array(1, $printContent['order'])) {
            $content .= '下單時(shí)間:' . $addTime . "\r";
        }
        if (in_array(2, $printContent['order'])) {
            $content .= '支付時(shí)間:' . $payTime . "\r";
        }
        if (in_array(3, $printContent['order'])) {
            $content .= '打印時(shí)間:' . $printTime . "\r";
        }
        $content .= '<FH2><FW2>----------------</FW2></FH2>';
        if ($printContent['code'] && $printContent['code_url']) {
            $content .= '<QR>' . sys_config('site_url') . $printContent['code_url'] . '</QR>';
            $content .= "      \r";
        }
        if ($printContent['show_notice']) {
            $content .= '<center>' . $printContent['notice_content'] . '</center>';
            $content .= "      \r";
        }
        return $content;
    }


修改方法:ylyTableContent()

public function ylyTableContent($printContent, $config, $print_num, $print_event)
    {
        $product = $config['product'];
        $tableInfo = $config['tableInfo'];
        $name = $config['name'];
        $goodsStr = '<table><tr><td>名稱</td><td>單價(jià)</td><td>數(shù)量</td><td>金額</td></tr>';
        foreach ($product as $item) {
            $goodsStr .= '<tr><td><FH2><FW2>----------------</FW2></FH2></td></tr>';
            $goodsStr .= '<tr>';
            $price = $item['sum_price'];
            $num = $item['cart_num'];
            $prices = bcmul((string)$item['cart_num'], (string)$item['sum_price'], 2);
            $goodsStr .= "<td>{$item['productInfo']['store_name']} | {$item['productInfo']['attrInfo']['suk']}</td><td>{$price}</td><td>{$num}</td><td>{$prices}</td>";
            $goodsStr .= '</tr>';
            if (in_array(1, $printContent['goods'])) {
                $goodsStr .= '<tr>';
                $goodsStr .= "<td>規(guī)格編碼:{$item['productInfo']['attrInfo']['code']}</td>";
                $goodsStr .= '</tr>';
            }
            unset($price, $num, $prices);
        }
        $goodsStr .= '</table>';
        $printTime = date('Y-m-d H:i:s', time());

        $content = '';
        $content .= '<MN>' . $print_num . '</MN>';
        if ($printContent['header']) {
            if (in_array(0, $printContent['header'])) {
                $content .= '<FS2><center>' . $name . '</center></FS2>';
            }
            if (in_array(1, $printContent['header'])) {
                /** @var SystemStoreServices $storeServices */
                $storeServices = app()->make(SystemStoreServices::class);
                $store_name = $storeServices->value(['id' => $tableInfo['store_id']], 'name');
                $content .= '<FS2><center>' . $store_name . '</center></FS2>';
            }
            /** @var TableQrcodeServices $qrcodeService */
            $qrcodeService = app()->make(TableQrcodeServices::class);
            $Info = $qrcodeService->getQrcodeyInfo((int)$tableInfo['qrcode_id'], ['category']);
            if (in_array(2, $printContent['header'])) {
                $content .= '<RA>桌碼流水:' . $tableInfo['serial_number'] . '</RA>';
            }
            if (in_array(3, $printContent['header'])) {
                $content .= '<RA>桌碼分類:' . $Info['category']['name'] . '</RA>';
            }
            if (in_array(4, $printContent['header'])) {
                $content .= '<RA>桌碼編號(hào):' . $Info['table_number'] . '</RA>';
            }
            $content .= '<FH2><FW2>----------------</FW2></FH2>';
        }
        if (in_array(0, $printContent['goods'])) {
            $content .= '*************商品***************';
            $content .= "      \r";
            $content .= $goodsStr;
            $content .= "********************************\r";
            $content .= '<FH2><FW2>----------------</FW2></FH2>';
        }

        if (in_array(3, $printContent['order'])) {
            $content .= '打印時(shí)間:' . $printTime . "\r";
        }
        $content .= '<FH2><FW2>----------------</FW2></FH2>';
        if ($printContent['code'] && $printContent['code_url']) {
            $content .= '<QR>' . sys_config('site_url') . $printContent['code_url'] . '</QR>';
            $content .= "      \r";
        }
        if ($printContent['show_notice']) {
            $content .= '<center>' . $printContent['notice_content'] . '</center>';
            $content .= "      \r";
        }
        return $content;
    }


請(qǐng)登錄后查看

全 最后編輯于2024-11-06 17:29:06

快捷回復(fù)
回復(fù)
回復(fù)
回復(fù)({{post_count}}) {{!is_user ? '我的回復(fù)' :'全部回復(fù)'}}
排序 默認(rèn)正序 回復(fù)倒序 點(diǎn)贊倒序

{{item.user_info.nickname ? item.user_info.nickname : item.user_name}} LV.{{ item.user_info.bbs_level }}

作者 管理員 企業(yè)

{{item.floor}}# 同步到gitee 已同步到gitee {{item.is_suggest == 1? '取消推薦': '推薦'}}
{{item.is_suggest == 1? '取消推薦': '推薦'}}
沙發(fā) 板凳 地板 {{item.floor}}#
{{item.user_info.title || '暫無(wú)簡(jiǎn)介'}}
附件

{{itemf.name}}

{{item.created_at}}  {{item.ip_address}}
打賞
已打賞¥{{item.reward_price}}
{{item.like_count}}
{{item.showReply ? '取消回復(fù)' : '回復(fù)'}}
刪除
回復(fù)
回復(fù)

{{itemc.user_info.nickname}}

{{itemc.user_name}}

回復(fù) {{itemc.comment_user_info.nickname}}

附件

{{itemf.name}}

{{itemc.created_at}}
打賞
已打賞¥{{itemc.reward_price}}
{{itemc.like_count}}
{{itemc.showReply ? '取消回復(fù)' : '回復(fù)'}}
刪除
回復(fù)
回復(fù)
查看更多
打賞
已打賞¥{{reward_price}}
1770
{{like_count}}
{{collect_count}}
添加回復(fù) ({{post_count}})

相關(guān)推薦

快速安全登錄

使用微信掃碼登錄
{{item.label}} 加精
{{item.label}} {{item.label}} 板塊推薦 常見(jiàn)問(wèn)題 產(chǎn)品動(dòng)態(tài) 精選推薦 首頁(yè)頭條 首頁(yè)動(dòng)態(tài) 首頁(yè)推薦
取 消 確 定
回復(fù)
回復(fù)
問(wèn)題:
問(wèn)題自動(dòng)獲取的帖子內(nèi)容,不準(zhǔn)確時(shí)需要手動(dòng)修改. [獲取答案]
答案:
提交
bug 需求 取 消 確 定
打賞金額
當(dāng)前余額:¥{{rewardUserInfo.reward_price}}
{{item.price}}元
請(qǐng)輸入 0.1-{{reward_max_price}} 范圍內(nèi)的數(shù)值
打賞成功
¥{{price}}
完成 確認(rèn)打賞

微信登錄/注冊(cè)

切換手機(jī)號(hào)登錄

{{ bind_phone ? '綁定手機(jī)' : '手機(jī)登錄'}}

{{codeText}}
切換微信登錄/注冊(cè)
暫不綁定
CRMEB客服

CRMEB咨詢熱線 咨詢熱線

400-8888-794

微信掃碼咨詢

CRMEB開源商城下載 源碼下載 CRMEB幫助文檔 幫助文檔
返回頂部 返回頂部
CRMEB客服