\application\booking\model\Order.php
搜索:
/** * 成功组团群发通知 * @param array $info 商品信息 */
在他上面加上:
/** * 支付成功后的打印 * @param string $orderdb 订单数组 * @param string $shop 商品数组 */ public function get_dayin($orderdb = '',$shop='' ) { $content = "<audio>来自" . config( 'webdb.webname' ) . "的商品订单 已支付定金 $orderdb[fewmoney] 元请及时安排发货,9,0</audio>"; $content .= "支付时间:" . date( "Y-m-d H:i" ) . "\n"; $content .= "订单编号:$orderdb[order_sn]\n"; $content .= str_repeat( '*',10 ) . "商品列表" . str_repeat( "*",10 ); $content .= "\n"; $content .= "<FH><FW>$shop[title] x1 $shop[price]</FW></FH>\n"; $content .= "<FH>收货人:$orderdb[linkman]\n"; $content .= "电话:$orderdb[telphone]\n"; $content .= "地址:$orderdb[address] </FH>"; $content .= "\n"; $content .= str_repeat( '.',32 ); $content .= "<FS><center>扫码进行发货</center></FS>"; $content .= "<QR>" . get_url(murl(self::$model_key.'/kehu_order/show',['id'=>$orderdb['id']])) . "</QR>"; $content .= "已付定金:¥$orderdb[fewmoney]\n"; fun( "Printer@printer",mymd5($content),$orderdb['id'],$shop['uid'] ); }
不带二维码的:
/** * 支付成功后的打印 * @param string $orderdb 订单数组 * @param string $shop 商品数组 */ public function get_dayin($orderdb = '',$shop='' ) { $content = "<audio>来自" . config( 'webdb.webname' ) . "的商品订单 已支付定金 $orderdb[fewmoney] 元请及时安排发货,9,0</audio>"; $content .= "支付时间:" . date( "Y-m-d H:i" ) . "\n"; $content .= "订单编号:$orderdb[order_sn]\n"; $content .= str_repeat( '*',10 ) . "商品列表" . str_repeat( "*",10 ); $content .= "\n"; $content .= "<FH><FW>$shop[title] x1 $shop[price]</FW></FH>\n"; $content .= "<FH>收货人:$orderdb[linkman]\n"; $content .= "电话:$orderdb[telphone]\n"; $content .= "地址:$orderdb[address] </FH>"; $content .= "\n"; $content .= str_repeat( '.',32 ); $content .= "已付定金:¥$orderdb[fewmoney]\n"; fun( "Printer@printer",mymd5($content),$orderdb['id'],$shop['uid'] ); }
继续搜索:
$fewnum = $shop['fewnum']+$info['shopnum'];
在他下面加上:
self::get_dayin($info,$shop);//支付成功商家打印
不需要AI语音播报订单信息的把;
$content = "<audio>来自" . config( 'webdb.webname' ) . "的商品订单 已支付定金 $orderdb[fewmoney] 元请及时安排发货,9,0</audio>";
删除即可
打印功能