|
@@ -268,6 +268,90 @@ class Model_logic_order extends Lin_Model {
|
|
//根据提交信息 校验一下客户下单是否正确
|
|
//根据提交信息 校验一下客户下单是否正确
|
|
public function checkEditCustomer($post){
|
|
public function checkEditCustomer($post){
|
|
|
|
|
|
|
|
+ //1 dhl官方只允许提交6个申报名字
|
|
|
|
+ if($post['express'] == 1){
|
|
|
|
+ if(!in_array($post['sbpm'],[
|
|
|
|
+ 'Human Hair Wigs',
|
|
|
|
+ 'Human Hair Goods',
|
|
|
|
+ 'Human Hair Weave',
|
|
|
|
+ 'Synthetic Hair',
|
|
|
|
+ 'Synthetic Hair Wigs',
|
|
|
|
+ 'Synthetic Hair Goods',
|
|
|
|
+ ])){
|
|
|
|
+ //'此快递方式必须选择Human Hair Wigs/Human Hair Goods!'
|
|
|
|
+ return [
|
|
|
|
+ 'code'=>-1,
|
|
|
|
+ "msg"=>"此快递方式必须选择Human Hair Wigs | Human Hair Goods | Human Hair Weave | Synthetic Hair | Synthetic Hair Wigs | Synthetic Hair Goods"
|
|
|
|
+ ];
|
|
|
|
+ }
|
|
|
|
+ if($post['country'] == 119 ){
|
|
|
|
+ if(empty($post['r_tax_id'])){
|
|
|
|
+ return [
|
|
|
|
+ 'code'=>-1,
|
|
|
|
+ "msg"=>"DHL官方发往墨西哥必填收件人税号"
|
|
|
|
+ ];
|
|
|
|
+ }
|
|
|
|
+ if($post['js'] == 6){
|
|
|
|
+ return [
|
|
|
|
+ 'code'=>-1,
|
|
|
|
+ "msg"=>"DHL官方发往墨西哥是收件人报税"
|
|
|
|
+ ];
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ // 42 dhl官方美国只允许提交3个申报名字
|
|
|
|
+ if($post['express'] == 42){
|
|
|
|
+ if(!in_array($post['sbpm'],[
|
|
|
|
+ 'Human Hair Wigs',
|
|
|
|
+ 'Human Hair Goods',
|
|
|
|
+ 'Human Hair Weave',
|
|
|
|
+ ])){
|
|
|
|
+ return [
|
|
|
|
+ 'code'=>-1,
|
|
|
|
+ "msg"=>"此快递方式必须选择Human Hair Wigs | Human Hair Goods | Human Hair Weave"
|
|
|
|
+ ];
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ //正鑫云途UPS 只允许发美国
|
|
|
|
+ if($post['express'] == 72){
|
|
|
|
+ if($post['country'] != 192){
|
|
|
|
+ return [
|
|
|
|
+ 'code'=>-1,
|
|
|
|
+ "msg"=>"正鑫云途UPS 只允许发美国"
|
|
|
|
+ ];
|
|
|
|
+ }
|
|
|
|
+ if($post['sbpm'] != 'Synthetic Hair Goods'){
|
|
|
|
+ return [
|
|
|
|
+ 'code'=>-1,
|
|
|
|
+ "msg"=>"此快递申报品名应为Synthetic Hair Goods"
|
|
|
|
+ ];
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ //usps GA和priority服务类型下可勾选签名,EXPRESS不可勾选签名。
|
|
|
|
+ // 待设置所有服务类型下的保险金额填写都要小于500美金,如果大于等于500美金弹错误提示:购买保险金额需小于500美金!
|
|
|
|
+
|
|
|
|
+ if($post['express'] == 2){
|
|
|
|
+ if($post['qm'] == 1){
|
|
|
|
+ if($post['js'] == 2){
|
|
|
|
+ return [
|
|
|
|
+ 'code'=>-1,
|
|
|
|
+ "msg"=>"EXPRESS不可勾选签名"
|
|
|
|
+ ];
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if($post['bx'] >=500){
|
|
|
|
+ return [
|
|
|
|
+ 'code'=>-1,
|
|
|
|
+ "msg"=>"购买保险金额需小于500美金!"
|
|
|
|
+ ];
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+
|
|
if($post['country'] == 192 )
|
|
if($post['country'] == 192 )
|
|
{
|
|
{
|
|
//如果国家是美国 邮编只能是字符串为5位的数字
|
|
//如果国家是美国 邮编只能是字符串为5位的数字
|
|
@@ -280,6 +364,7 @@ class Model_logic_order extends Lin_Model {
|
|
}
|
|
}
|
|
|
|
|
|
}
|
|
}
|
|
|
|
+
|
|
if($post['type'] != 5 && in_array($post['express'],[2,63,64]))
|
|
if($post['type'] != 5 && in_array($post['express'],[2,63,64]))
|
|
{
|
|
{
|
|
return [
|
|
return [
|
|
@@ -295,8 +380,14 @@ class Model_logic_order extends Lin_Model {
|
|
"msg"=>"此快递方式不能美仓发货!"
|
|
"msg"=>"此快递方式不能美仓发货!"
|
|
];
|
|
];
|
|
}
|
|
}
|
|
-
|
|
|
|
-
|
|
|
|
|
|
+ // if(in_array($post['express'],[2,63,64])){
|
|
|
|
+ // if($post['type'] != 5){
|
|
|
|
+ // return [
|
|
|
|
+ // 'code'=>-1,
|
|
|
|
+ // "msg"=>"此快递只发美仓!"
|
|
|
|
+ // ];
|
|
|
|
+ // }
|
|
|
|
+ // }
|
|
return [
|
|
return [
|
|
'code'=>1,
|
|
'code'=>1,
|
|
"msg"=>"ok"
|
|
"msg"=>"ok"
|
|
@@ -304,6 +395,8 @@ class Model_logic_order extends Lin_Model {
|
|
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* 获取订单国家的中文名字
|
|
* 获取订单国家的中文名字
|
|
*/
|
|
*/
|