客戶管理系統
工單管理
最新更新日志
2018-9-29 修復銷售人員訂單管理報錯
提交新工單部分代碼
if (time() < $begin_beputtime or time() > $end_beputtime) { //放假時間
if ($dan_time >= $begin_time && $dan_time <= $end_time and ( date("w") != "0" or date("w") != '6')) { //判斷上班時間以級周六日
//查詢 客戶,售后人員的郵箱以及手機,發送通知
$result_arr = $this->lianhe_sql("user", C('DB_PREFIX') . "user u, " . C('DB_PREFIX') . "service s", "u.uname u_name,u.phone u_phone,u.email u_email,s.uname s_name,s.phone s_phone,s.email s_email,s.id s_id", "u.sid=s.id and u.id=" . I('post.uid'));
if (!empty($result_arr['s_phone']) && !empty($result_arr["s_email"]) && I('post.cc_status') == 1) {
if ($type == "insert") {
$E = Email($result_arr["s_email"], "新工單通知", "親愛的同事:" . $result_arr["s_name"] . "," . $result_arr["u_name"] . "這位客戶已提交新工單,工單標題為:“" . $data['title'] . "”。請及時查看,并且處理。");
$M = Mobile($result_arr["s_phone"], '親愛的:' . $result_arr["s_name"] . '同事。' . $result_arr["u_name"] . '這位客戶已提交新工單,工單標題為:“' . $data['title'] . '”。請及時查看,并且處理。');
$data = array(
'tz_status' => '1',
);
$this->update_sql("work", "id=" . $id, $data);
}
echo "<script>alert('工單提交成功,并且已通知售后人員,請耐心等候。'); location.href='$url';</script>";
exit;
}
} else {
echo "<script>alert('工單提交成功,由于現在不是上班時間,我們將會在上班時間通知售后人員,請耐心等候。'); location.href='$url';</script>";
exit;
}
} else {
echo "<script>alert('工單提交成功,由于現在不是上班時間,我們將會在上班時間通知售后人員,請耐心等候。'); location.href='$url';</script>";
exit;
}