根据国家 ID 和运输方式正则限制字样
2017-06-24 21:24
281 查看
/* * 方法一 */ function packStation(submit) { var methodOne = $('[name=shipping_method] option:selected').val(); var consignee_address1 = $('[name=consignee_address1]').val(); var consignee_address2 = $('[name=consignee_address2]').val(); var country = $('[name=consignee_country_id] option:selected').val(); if ($.inArray(methodOne, ['SFCQMDE', 'DEAM2', 'EUEXP1', 'EUEXP3', 'DERAM2', 'SFCQMDER']) == -1) { return true; } if (((/Packstation/i).test(consignee_address1)) || ((/Packstation/i).test(consignee_address2))) { if (methodOne == 'SFCQMDER') { if (ubmit) { $("#messageDialog").html('<{t}>100002240<{/t}><{t}>100002275<{/t}>').dialog("open"); } } else { if ($.inArray(methodOne, ['SFCQMDE', 'DEAM2', 'DERAM2']) != -1) { if (country == 89) { $("#messageDialog").html('<{t}>100002240<{/t}><{t}>100002276<{/t}>').dialog("open"); return false; } else { return true; } } else { $("#messageDialog").html('<{t}>100002240<{/t}><{t}>100002276<{/t}>').dialog("open"); return false; } } } return true; } /* * 方法二 */ function RestrictionWords() { var consignee_country_id = $("[name=consignee_country_id] option:selected").val(); var shipping_method = $("[name=shipping_method] option:selected").val(); var consignee_first_name = $("[name=consignee_first_name]").val(); var consignee_last_name = $("[name=consignee_last_name]").val(); var consignee_company = $("[name=consignee_company]").val(); var consignee_address1 = $("[name=consignee_address1]").val(); var consignee_address2 = $("[name=consignee_address2]").val(); if (((/FBA/i).test(consignee_first_name)) || ((/Amazon/i).test(consignee_first_name)) || ((/FBA/i).test(consignee_last_name)) || ((/Amazon/i).test(consignee_last_name)) || ((/FBA/i).test(consignee_company)) || ((/Amazon/i).test(consignee_company)) || ((/FBA/i).test(consignee_address1)) || ((/Amazon/i).test(consignee_address1)) || ((/FBA/i).test(consignee_address2)) || ((/Amazon/i).test(consignee_address2))) { if (consignee_country_id == 115 && shipping_method == 'SFCQMITR' || consignee_country_id == 221 && shipping_method == 'SFCQMESR') { $("#messageDialog").html('<{t}>100002294<{/t}>').dialog("open"); return false; } } return true; }
相关文章推荐
- 根据国家 ID 和运输方式正则限制字样
- 根据国家 ID 和运输方式正则限制字样
- 根据国家 ID 和运输方式正则限制字样
- 根据国家 ID 和运输方式正则限制字样
- 根据国家 ID 和运输方式正则限制字样
- 根据国家 ID 和运输方式正则限制字样
- 根据国家 ID 和运输方式正则限制字样
- 根据国家 ID 和运输方式正则限制字样
- 根据订单类型和运输方式限制字样
- 根据订单类型和运输方式限制字样
- 根据订单类型和运输方式限制字样
- 根据订单类型和运输方式限制字样
- 根据订单类型和运输方式限制字样
- 根据订单类型和运输方式限制字样
- 根据订单类型和运输方式限制字样
- 根据订单类型和运输方式限制字样
- 根据订单类型和运输方式限制字样
- 使用TDD方式开发:根据博客ID列出CSDN所有博客文章
- SQL 笔记之:读取产品记录,并从分类表中根据分类ID读分类名称(嵌套select方式)
- js 正则,根据css id名class名取得一个属性代码;