Kaynağa Gözat

上传邮件的处理

lvhao 2 ay önce
ebeveyn
işleme
2c858c3335

+ 37 - 4
core/CoreApp/controllers/Api.php

@@ -1111,7 +1111,14 @@ class Api extends Start_Controller {
 		    {
 			    $shop = $this->shop->read($v['shop']);
 			    $express = $this->express->read($v['express']);
-			    $fs = $this->notice->get_god($v,$shop,$express,$notice);
+				if(empty($v['send_email'])){
+					$fs = $this->notice->get_god($v,$shop,$express,$notice);
+				}else{
+					$email = $v['email'];
+					$v['email'] = $v['send_email'];
+					$fs = $this->notice->get_god($v,$shop,$express,$notice);
+					$v['email'] = $email;
+				}
 			    $this->logic_ding->sendToDing($v['orderinfo']."监听邮件发送的异常:订单信息【".json_encode($v,JSON_UNESCAPED_UNICODE)."】获取快递信息【".json_encode($notice,JSON_UNESCAPED_UNICODE)."】返回的信息".json_encode($fs));
 			    if($fs == 1)
 			    {
@@ -1385,7 +1392,15 @@ class Api extends Start_Controller {
 					$fs = $this->notice->find_all("shop = '".$d['shop']."' and message = '1' and state = '1' and type = '4' and ktime < '$time' and jtime > '$time'");
 					$fs = $fs[0];
 					$fs['email'] = $this->emaildata->read($fs['email']);
-					$ck = $this->notice->get_god($d,$shop,$ex,$fs);
+
+					if(empty($d['send_email'])){
+						$ck = $this->notice->get_god($d,$shop,$ex,$fs);
+					}else{
+						$email = $d['email'];
+						$d['email'] = $d['send_email'];
+						$ck = $this->notice->get_god($d,$shop,$ex,$fs);
+						$d['email'] = $email;
+					}
 					if($ck == 1)
 					{
 					    $this->fullorder->save(array('dlzemail'=>1,'dlzemailtime'=>time()),$v);
@@ -1508,7 +1523,18 @@ class Api extends Start_Controller {
 			    //$express['servicename'] =$service['title'];//增加快递名称
 			    $express = array();
 				$notice[0]['email'] = $this->emaildata->read($notice[0]['email']);
-			    $go = $this->notice->get_god($fullorder,$shop,$express,$notice[0]);
+			    
+
+				if(empty($fullorder['send_email'])){
+					$go = $this->notice->get_god($fullorder,$shop,$express,$notice[0]);
+				}else{
+					$email = $fullorder['email'];
+					$fullorder['email'] = $fullorder['send_email'];
+					$go = $this->notice->get_god($fullorder,$shop,$express,$notice[0]);
+					$fullorder['email'] = $email;
+				}
+
+
 			    if($go == 1)
 			    {
 				    $this->fullorder->save(array('content'=>$fid['content'].'自动发送-成功;','zdstate'=>$fid['zdstate'].$notice[0]['type'].'-'.$notice[0]['tab'].'|','exstateerror'=>''),$fid['id']);
@@ -1547,7 +1573,14 @@ class Api extends Start_Controller {
 		}
 		if(stripos($fullorder['zdstate'],$stripos) === false && $fullorder['wltype'] == '0')//如果没发送过并且允许发送
 		{
-		    $go = $this->notice->get_god($fullorder,$shop,$express,$notice);
+			if(empty($fullorder['send_email'])){
+				$go = $this->notice->get_god($fullorder,$shop,$express,$notice);
+			}else{
+				$email = $fullorder['email'];
+				$fullorder['email'] = $fullorder['send_email'];
+				$go = $this->notice->get_god($fullorder,$shop,$express,$notice);
+				$fullorder['email'] = $email;
+			}
 		    if($go == 1)
 		    {
 				if($notice['type'] == '1')

+ 3 - 0
core/CoreApp/controllers/Fullorder.php

@@ -1001,6 +1001,9 @@ class Fullorder extends Start_Controller {
 			$yga = $post['shouldmoney'];
 			$ygc = $data['estimaterate'];
 			$post['budget'] = 0;
+			if($post['email'] == $post['send_email']){
+				$post['send_email']  = '';
+			}
 			$ifbudget = eval("return $yga*1.$ygc;");
 			if($ifbudget > 0)
 			{

+ 6 - 1
template/erp/fullorder_edit.html

@@ -406,7 +406,12 @@
 
 <li>
 <em>邮箱:</em>
-<input name="email" value="{$fullorder['email']}" type="text">
+{if empty($fullorder['send_email'])}
+<input name="send_email" value="{$fullorder['email'] }" type="text">
+{else}
+<input name="send_email" value="{$fullorder['send_email']}" type="text">
+{/if}
+<input type="hidden" name="email" value="{$fullorder['email']}" >
 </li>
 
 <li>