问题描述
我已经为一家拥有国家办公室的大公司建立了一个电子购物网站.
我想做的是以下
- 在将包裹发送到公司办公室之前,通过PHP生成条形码
- 当该项目到达乡村办公室时,工人将登录到他们的帐户,通过条形码读取器(位于包装上)扫描该条形码,网站将自动"批准"收到的项目.
仅使用Web界面才有可能?我的意思是没有任何本地应用程序.怎么做?请解释.
推荐答案
因此,这是一种可以对您有用的方法:
您需要在数据库中放置记录:
package_id | name | status 1234 My Package shipped
生成包含软件包的条形码,您必须确定要使用哪种条形码.您也可以使用数据矩阵.然后,将条形码创建为图像,以便可以打印它.数据矩阵非常适合大型自定义数据.
打印条形码,将其放在包裹上
该软件包到达办公室,用户登录您的网站,单击"已收到的确认软件包"或其他任何内容.然后有一个文本场,他将文本视场聚焦,扫描条形码/数据矩阵,您的软件包ID" 1234"将出现在文本场中
提交表单,查找数据库中的条目,将其更改为:
package_id | name | status 1234 My Package delivered
提示如果使用 qr code 可以是通过许多手机阅读,因此您不需要真正的条形码扫描仪.您可以编写一个读取条形码并将package_id发送到服务器的应用程序.
其他推荐答案
TCPDF有几个用于生成条形码的类:
有一个很好的例子:
http://www.tcpdf.org/examples.php
例如,第一个:
// set the barcode content and type $barcodeobj = new TCPDFBarcode('http://www.tcpdf.org', 'C128'); // output the barcode as HTML object echo $barcodeobj->getBarcodeHTML(2, 30, 'black');
其他推荐答案
是jQuery插件,但与Php.
合作很好当我看到您的情况时,您不仅需要1D条形码.您需要QR代码.
希望这会有所帮助.
问题描述
I've built an e-shopping website for a big company which has country offices.
What i want to do is the following
- Generate barcode via PHP before sending package to country offices of company
- When the item will be arrived to country office, workers will login to their account, scan this barcode via barcode reader (which located on package) and website will automatically "approve" that item received.
Is it possible only with web interface? I mean without any local application. How to do that? PLease explain.
推荐答案
so here is an approach that could work for you:
You need to put a record in a database like:
package_id | name | status 1234 My Package shipped
Generate a barcode which contains the package_id, you have to decide what kind of barcode you want to use. You could also use a data matrix. Then you create the bar code as image so that you can print it. Data Matrix is very good for large custom data.
- A jQuery Barcode Generator: http://barcode-coder.com/en/barcode-online-generator-2.html
Print the bar code, put it on your package
The package arrives at the office, the user logs on to your website, clicks on "Confirm Package Received" or whatever. Then there is a text-field, he focuses the text-field, scans the barcode/data matrix and your package ID "1234" will appear in the text-field
Submit the form, lookup the entry in the database, change it to:
package_id | name | status 1234 My Package delivered
A Tip If you use a QR Code it can be read by many mobile phones, so you don't need a real bar code scanner. You could write an app that reads the bar code and sends the package_id to your server.
其他推荐答案
Tcpdf has a few classes for generating barcodes:
http://www.tcpdf.org/doc/code/classTCPDFBarcode.html
With good examples:
http://www.tcpdf.org/examples.php
For example the first:
// set the barcode content and type $barcodeobj = new TCPDFBarcode('http://www.tcpdf.org', 'C128'); // output the barcode as HTML object echo $barcodeobj->getBarcodeHTML(2, 30, 'black');
其他推荐答案
Check larsjung.de/qrcode/
It's JQuery Pluggin, but works well with PHP.
As I see your scenario, you need more than just 1D Barcode. You need QR Code.
Hope this helps.