"卷號", 'customer' => "客戶名稱", 'case_name' => "案件名稱", 'manager' => "負責人", 'source' => "客戶來源", 'linkman' => "聯係人", 'lm_tel' => "市話/手機", 'salesman' => "營業員", 'num' => "臺數", 'pre_order_date' => "預定成交日", 'status' => "有望客戶狀態", /*'next_visit_date' => "下次拜訪時間", 'quote_date' => "報價日期",*/ 'is_renovation' => "產品屬性", 'creater' => "錄入人員", 'created_at' => "建立時間", ]; // 可瀏覽全部資料的部門 $depart_arr = ["501"]; $sql = "select department_id from account where accountid = '$user_id'"; $res = mysqli_query($link, $sql); $row = mysqli_fetch_row($res); $user_department_id = $row[0]; mysqli_free_result($res); // 設定一個空陣列來放資料 $data = array(); // sql文法存在變數中 $vol_no = empty($_GET['vol_no']) ? "%" : $_GET['vol_no']; $where = " and vol_no like '$vol_no'"; $salesman = empty($_GET['salesman']) ? "%" : $_GET['salesman']; $where .= " and salesman_name like '$salesman'"; $sql_cmd = sql_myself($user_id, "salesman"); // max,許紓晴,林慧珊,鄭伊岑 if (in_array($user_department_id, $depart_arr) || $user_id == "M0060" || $user_id == "M0107" || $user_id == "M0193" || $user_id == "M0149") $sql_cmd = ""; if (!empty($sql_cmd)) $where .= " and ".str_replace("where", "", $sql_cmd); /* $checkAll = ['p0044', 'M0007']; if (!in_array($user_id, $checkAll)) { $where .= " and salesman = '$user_id'"; } //$where .= " and salesman = '$salesman'"; */ $lm_name = empty($_GET['linkman']) ? "%" : $_GET['linkman']; $where .= " and linkman like '$lm_name'"; $address = empty($_GET['address']) ? "%" : $_GET['address']; $where .= " and address like '%$address%'"; $sql = "SELECT vol_no,customer,case_name,manager,f_return_content('customer_source',source ) source, linkman,lm_tel,f_return_name(salesman) salesman,num ,date_format(pre_order_date,'%Y/%m/%d') pre_order_date, f_return_content('hope_customer_status',status ) status, date_format(next_visit_date,'%Y/%m/%d') next_visit_date ,brand , date_format(quote_date,'%Y/%m/%d') quote_date , case when is_renovation='Y' then '汰改' when is_renovation='N' then '新梯' END 'is_renovation', creater, created_at FROM $table where 1=1 $where ORDER BY vol_no"; //echo $sql; $data = mysqli_query($link, $sql); ?> Please fill up the required field!

"; } else { header("Location:repair-index.php"); } } ?>

有望客戶(新梯/汰改)資料維護

卷號 營業員 ' > 下單地區 ' > 聯係人姓名 ' >
新增
"; foreach ($editableColumn as $key => $val) { echo ""; } echo ""; // echo ""; echo ""; ?> $val) { echo ""; } ?>
$val編輯刪除
" . $row[$key] . "

填價審單

There is no record!"; endif; #代錶結束連線 mysqli_close($link); include "../footer.php"; ?>