Commit 6e525d81 by 朱继来

调整发送邮件

parent 203b28b2
......@@ -13,6 +13,7 @@ use Illuminate\Support\Facades\Redis;
use App\Http\Error;
use Excel;
use App\Model\OrderModel;
use App\Model\OrderExtendModel;
use App\Model\UserMainModel;
use App\Model\OrderActionLogModel;
use App\Model\OrderReturnModel;
......@@ -2203,6 +2204,10 @@ Class OrderController extends Controller
$this->pushQueue($v);
}
// 标记邮件已发送
$OrderExtendModel = new OrderExtendModel;
$OrderExtendModel->where('order_id', $id)->update(['is_send_mail' => 1]);
// 添加操作日志
$event = '发送邮件成功,收件人邮箱:'.json_encode($to_user_array).',抄送人邮箱:'.json_encode($cc_send_mail_array);
......
<?php
namespace App\Model;
use Illuminate\Database\Eloquent\Model;
use Request;
use Excel;
use DB;
class OrderExtendModel extends Model
{
protected $connection = 'order';
protected $table = 'lie_order_extend';
protected $primaryKey = 'temp_id';
public $timestamps = false;
}
\ No newline at end of file
......@@ -176,8 +176,13 @@
<!-- 判断邮件发送时机 -->
@if (!empty($order_temp_info['erp_sn']) && in_array($order_info['status'], [2, 3, 4]))
<a class="btn btn-warning send_mail" data-id="{{ $order_info['order_id'] }}">发送邮件</a>
@if ($order_temp_info['is_send_mail'])
<a class="btn btn-danger send_mail" data-id="{{ $order_info['order_id'] }}">再次发送邮件</a>
@else
<a class="btn btn-warning send_mail" data-id="{{ $order_info['order_id'] }}">发送邮件</a>
@endif
@endif
<!-- 预付款 管理员完成首款对账后改变'对账'按钮 -->
@if (in_array($order_info['status'], [2, 3]) && in_array('check_account', $userPerms))
@if ($order_info['status'] == 3 && (!empty($order_pay_log) && $order_pay_log[0]['pay_type'] != ''))
......
......@@ -362,7 +362,11 @@
@endif
@if (!empty($order_extend->erp_sn) && in_array($v['status'], [2, 3, 4]))
<a class="btn btn-warning send_mail" data-id="{{ $v['order_id'] }}">发送邮件</a>
@if ($order_extend->is_send_mail)
<a class="btn btn-danger send_mail" data-id="{{ $v['order_id'] }}">再次发送邮件</a>
@else
<a class="btn btn-warning send_mail" data-id="{{ $v['order_id'] }}">发送邮件</a>
@endif
@endif
<a class="btn btn-primary" href="{{URL('details', ['order_id'=>$v['order_id']])}}" target="_blank">详情</a>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment