|
|
@@ -433,8 +433,16 @@
|
|
|
});
|
|
|
//产品条码或包装码
|
|
|
if (barcode.length >= 11) {
|
|
|
+ if (barcode.substring(0, 4)=="http") {
|
|
|
+
|
|
|
+ var parts = barcode.split("-", 2); // 第二个参数限制分割后的数组长度,这里为2
|
|
|
+
|
|
|
+ if (parts.length == 2) {
|
|
|
+ barcode = parts[1];
|
|
|
+ }
|
|
|
+ }
|
|
|
// 查询条码
|
|
|
- var barcodeData = $.ajax({ url: 'api/GetCheckBarCode_WCF.ashx', data: { 'barcode': $('#urltext').val(), 'type': $('#检验标准').val() }, dataType: "json", type: "post" });
|
|
|
+ var barcodeData = $.ajax({ url: 'api/GetCheckBarCode_WCF.ashx', data: { 'barcode': barcode, 'type': $('#检验标准').val() }, dataType: "json", type: "post" });
|
|
|
$.when(barcodeData).then(
|
|
|
function (json) {
|
|
|
//$.get('api/GetCheckBarCode_WCF.ashx', { 'barcode': $('#产品条码').val() }, function (data) {
|
|
|
@@ -1115,7 +1123,8 @@
|
|
|
icon: "error",
|
|
|
button: "确定"
|
|
|
}).then(function () {
|
|
|
- $('#urltext').focus();
|
|
|
+ $('#urltext').focus();
|
|
|
+
|
|
|
|
|
|
});
|
|
|
swal.close();
|