";
+foreach ($con_maintance_examine_clear_columm as $key => $val) {
+ $fieldVal = "";
+ $_input = $val['tag'] == 'select' ?
+ FormHelper::select('', $val['options'], $fieldVal, $val['attr'])
+ : FormHelper::text("$key", $fieldVal, $val['attr'], $val['tag']);
+ // : "";
+ $cmecRow .= " $_input | ";
+}
+$cmecRow .= " | ";
+function base_url($url)
+{
+ return "https://web.platform-cn.com/static/" . $url;
+}
+function get_sequnece_no($seq_name = '', $p_yyyymm = '')
+{
+
+ if (empty($p_yyyymm) || empty($seq_name)) return null;
+ #当前年月
+ //echo "select yyyymm from sequence where seq_name='$seq_name' ";
+ list($yyyymm, $prefix) = DB::fields("select yyyymm ,prefix from sequence where seq_name='$seq_name' ");
+ if ($p_yyyymm != $yyyymm) {
+ DB::query("update sequence set yyyymm='$p_yyyymm' , current_val='10000' where seq_name='$seq_name' ");
+ }
+ // echo "SELECT concat( $prefix,,substring(nextval('$seq_name'),2)) seq_no ";
+ list($seq_no) = DB::fields("SELECT concat( '$prefix','$p_yyyymm',substring(nextval('$seq_name'),2)) seq_no ");
+
+
+ return $seq_no;
+}
+
+
+?>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/wms/cont/sign_form.php b/wms/cont/sign_form.php
new file mode 100644
index 00000000..4ed488e2
--- /dev/null
+++ b/wms/cont/sign_form.php
@@ -0,0 +1,577 @@
+vol_no;
+require_once './FormHelper.php';
+require_once '../cont/MICalculator.php';
+
+require_once './wf_common.php';
+$flow = new Flow($form_key);
+// 當前節點簽核開始
+
+$wf = new WorkFlow($flow->system_id, $flow->flow_id, $flow->form_id, $form_key);
+#獲取簽核意見
+$assign_opinions = Assign::get_records($form_key);
+$flowName = $wf->getFlowName();
+
+//表單數據
+#客戶表
+#1.電梯品牌選項
+$sql = "select code_name value ,content label from code where field_name='elevator_brand'";
+$elevator_brand_opt = DB::result($sql);
+#2.保養方式
+$sql = "select code_name value ,content label from code where field_name='maintain_kind'";
+$maintain_kind_opt = DB::result($sql);
+#3.電梯類型
+$sql = "select code_name value ,content label from code where field_name='elevator_kind'";
+$elevator_kind_opt = DB::result($sql);
+#4.付款方式
+$sql = "select code_name value ,content label from code where field_name='payment_kind'";
+$payment_kind_opt = DB::result($sql);
+#5.契約性質
+$sql = "select code_name value ,content label from code where field_name='contract_kind'";
+$contract_kind_opt = DB::result($sql);
+#6.是否贈送M1
+$is_m1_bundle_opt = [
+ ['label' => '是', 'value' => 'Y'],
+ ['label' => '否', 'value' => 'N']
+];
+#7.機種
+$sql = "select code_name value ,content label from code where field_name='fp_kind'";
+$fp_kind_opt = DB::result($sql);
+$table = 'con_maintance_examine_apply';
+#可編輯的列
+$editableColumn = [
+ 'apply_key' => [
+ 'label' => "評審單號", "value" => "$apply_key", "tag" => 'text',
+ 'attr' => [
+ 'readonly=true ',
+ 'class' => 'form-control form-control-sm'
+ ]
+ ],
+ 'vol_no' => ['label' => "卷號", "value" => "", "tag" => 'text', 'attr' => ['readonly=true ', 'class' => 'form-control form-control-sm']],
+ 'address' => ['label' => "現場地址", "value" => "", "tag" => 'text', 'attr' => ['required', 'class' => 'form-control form-control-sm']],
+ 'case_name' => ['label' => "現場名稱", "value" => "", "tag" => 'text', 'attr' => ['required', 'class' => 'form-control form-control-sm']],
+ 'brand' => ['label' => "電梯品牌", "value" => "", "tag" => 'select', 'attr' => ['required', 'class' => 'form-control form-control-sm'], 'options' => $elevator_brand_opt],
+ 'num' => ['label' => "數量", "value" => "", "tag" => 'number', 'attr' => ['required', 'min=1', 'class' => 'form-control form-control-sm']],
+ 'salesman' => ['label' => "營業員", "value" => "", "tag" => 'text', 'attr' => ['required', 'class' => 'form-control form-control-sm']],
+ 'maintain_kind' => ['label' => "保養方式", "value" => "", "tag" => 'select', 'attr' => ['class' => 'form-control form-control-sm'], 'options' => $maintain_kind_opt],
+ 'contract_begin_date' => ['label' => "契約期限開始", "value" => "", "tag" => 'date', 'attr' => ['required', 'class' => 'date form-control form-control-sm']],
+ 'contract_end_date' => ['label' => "契約期限結束", "value" => "", "tag" => 'date', 'attr' => ['required', 'class' => 'date form-control form-control-sm']],
+ 'contract_kind' => ['label' => "契約性質", "value" => "", "tag" => 'select', 'attr' => ['class' => 'form-control form-control-sm'], 'options' => $contract_kind_opt],
+ 'introducer' => ['label' => "介紹人", "value" => "", "tag" => 'text', 'attr' => ['class' => 'form-control form-control-sm']],
+
+ 'payment_kind' => ['label' => "付款方式", "value" => "", "tag" => 'select', 'attr' => ['required', 'class' => 'form-control form-control-sm'], 'options' => $payment_kind_opt],
+
+];
+$where = " and form_key='$form_key'";
+
+$sql = "SELECT " . implode(',', array_keys($editableColumn)) .
+ " ,progress_remark FROM $table where 1=1 $where ORDER BY apply_key";
+
+$data = [];
+list($data) = DB::result($sql);
+
+#電梯詳細資料
+$con_maintance_examine_clear_columm = [
+ 'register_code' => ['label' => "電梯註冊代碼", "value" => "", "tag" => 'text', 'attr' => ['colspan' => 2, 'name' => 'register_code[]', 'class' => 'form-control form-control-sm']],
+ //'elevator_brand' => ['label' => "品牌", "value" => "", "tag" => 'select', 'attr' => ['colspan' => 2, 'name' => 'elevator_brand[]', 'class' => 'form-control form-control-sm'], 'options' => $elevator_brand_opt],
+ 'elevator_kind' => ['label' => "電梯類型", "value" => "", "tag" => 'select', 'attr' => ['name' => 'elevator_kind[]', 'required', 'colspan' => 2, 'class' => 'form-control form-control-sm'], 'options' => $elevator_kind_opt],
+ 'spec' => ['label' => "規格型號", "value" => "", "tag" => 'select', 'attr' => ['colspan' => 2, 'name' => 'spec[]', 'class' => 'form-control form-control-sm'], 'options' => $fp_kind_opt],
+ 'weight' => ['label' => "載重(KG)", "value" => "", "tag" => 'number', 'attr' => ['name' => 'weight[]', 'min=1', 'required', 'class' => 'form-control form-control-sm']],
+ 'speed' => ['label' => "速度(m/min)", "value" => "", "tag" => 'number', 'attr' => ['colspan' => 2, 'name' => 'speed[]', 'min=0', 'required', 'class' => 'form-control form-control-sm']],
+ //'stop' => ['label' => "停數", "value" => "", "tag" => 'number', 'attr' => ['name' => 'stop[]', 'class' => 'form-control form-control-sm']],
+ 'floors' => ['label' => "層數", "value" => "", "tag" => 'number', 'attr' => ['name' => 'floors[]', 'min=1', 'required', 'class' => 'form-control form-control-sm']],
+ 'persons' => ['label' => "人乘", "value" => "", "tag" => 'number', 'attr' => ['name' => 'persons[]', 'min=1', 'required', 'class' => 'form-control form-control-sm']],
+
+ 'maintain_times' => ['label' => "保養次數", "value" => "", "tag" => 'number', 'attr' => ['name' => 'maintain_times[]', 'min=1', 'required', 'class' => 'form-control form-control-sm']],
+ 'maintain_months' => ['label' => "保養月數", "value" => "", "tag" => 'number', 'attr' => ['name' => 'maintain_months[]', 'min=1', 'required', 'class' => 'form-control form-control-sm']],
+ 'maintain_period' => ['label' => "保養周期", "value" => "", "tag" => 'number', 'attr' => ['name' => 'maintain_period[]', 'min=1', 'required', 'class' => 'form-control form-control-sm']],
+ 'is_m1_bundle' => ['label' => "贈送M1", "value" => "", "tag" => 'select', 'attr' => ['name' => 'is_m1_bundle[]', 'required', 'class' => 'form-control form-control-sm'], 'options' => $is_m1_bundle_opt],
+
+
+ // 'elevator_num' => ['label' => "臺數", "value" => "", "tag" => 'number', 'attr' => ['name' => 'brand_num[]', 'class' => 'form-control form-control-sm']],
+ 'useful_years' => ['label' => "竣工檢查年度", "value" => "", "tag" => 'number', 'attr' => ['colspan' => 2, 'required', 'name' => 'useful_years[]', 'class' => 'form-control form-control-sm']],
+ 'last_check_date' => ['label' => "上次年檢日期", "value" => "", "tag" => 'date', 'attr' => ['required', 'name' => 'last_check_date[]', 'colspan' => 2, 'type' => 'date', 'class' => 'form-control form-control-sm']],
+ //'speed_governors_check_expense' => ['label' => "限速器校驗費", "value" => "", "tag" => 'number', 'attr' => ['colspan' => 2, 'name' => 'speed_governors_check_expense[]', 'class' => 'form-control form-control-sm']],
+ // 'service_expense' => ['label' => "服務費", "value" => "", "tag" => 'text', 'attr' => ['required', 'name' => 'service_expense[]', 'class' => ' form-control form-control-sm ']],
+ // 'commission_expense' => ['label' => "分成費(%)", "value" => "", "tag" => 'number', 'attr' => ['required', 'name' => 'commission_expense[]', 'class' => 'form-control form-control-sm']],
+ // 'management_expense' => ['label' => "管理費(%)", "value" => "", "tag" => 'number', 'attr' => ['required', 'name' => 'management_expense[]', 'class' => 'form-control form-control-sm']],
+ //'annual_survey_expense' => ['label' => "年檢費用(元)", "value" => "", "tag" => 'number', 'attr' => ['required', 'name' => 'annual_survey_expense[]', 'colspan' => 2, 'class' => 'date form-control form-control-sm ']],
+ //'service_expense' => ['label' => "服務費", "value" => "", "tag" => 'text', 'attr' => ['required', 'name' => 'service_expense[]', 'class' => ' form-control form-control-sm ']],
+ 'maintain_times' => ['label' => "保養次數", "tag" => 'number', 'attr' => ['name' => 'maintain_times[]', "value" => "1", 'min=1', 'required', 'class' => 'form-control form-control-sm']],
+ 'maintain_months' => ['label' => "保養月數", "tag" => 'number', 'attr' => ['name' => 'maintain_months[]', "value" => "12", 'min=12', 'required', 'class' => 'form-control form-control-sm']],
+ 'maintain_period' => ['label' => "保養周期", "tag" => 'number', 'attr' => ['name' => 'maintain_period[]', "value" => "1", 'min=1', 'required', 'class' => 'form-control form-control-sm']],
+ 'is_m1_bundle' => ['label' => "贈送M1", "value" => "", "tag" => 'select', 'attr' => ['name' => 'is_m1_bundle[]', 'required', 'class' => 'form-control form-control-sm'], 'options' => $is_m1_bundle_opt],
+ 'stand_price' => ['label' => "標準價格(元/月)", "value" => "", "tag" => 'text', 'attr' => ['required', "readonly", 'colspan' => 2, 'name' => 'stand_price[]', 'class' => 'form-control form-control-sm']],
+ 'contract_price' => ['label' => "契約報價(元/月)", "value" => "", "tag" => 'number', 'attr' => ['required', 'colspan' => 2, 'name' => 'contract_price[]', 'class' => 'form-control form-control-sm']],
+ 'sold_price' => ['label' => "契約成交價(元/月)", "value" => "", "tag" => 'number', 'attr' => ['required', 'colspan' => 2, 'name' => 'sold_price[]', 'class' => 'form-control form-control-sm']],
+
+
+ 'sold_price' => ['label' => "契約成交價C(元/月)", "value" => "", "tag" => 'number', 'attr' => ['required', 'colspan' => 2, 'name' => 'sold_price[]', 'class' => 'form-control form-control-sm']],
+ 'mi_cost' => ['label' => "標準成本D(元/月)", "value" => "", "tag" => 'number', 'attr' => ['required', 'colspan' => 2, 'name' => 'mi_cost[]', 'class' => 'form-control form-control-sm']],
+ 'discount' => ['label' => "折扣率E(%)", "value" => "", "tag" => 'number', 'attr' => ['required', 'colspan' => 2, 'name' => 'mi_cost_rate[]', 'class' => 'form-control form-control-sm']],
+ 'gross_profit' => ['label' => "毛利率F(%)", "value" => "", "tag" => 'number', 'attr' => ['required', 'colspan' => 2, 'name' => 'gross_profit[]', 'class' => 'form-control form-control-sm']],
+
+];
+$con_maintance_examine_clear = DB::result("SELECT register_code,
+ f_return_content('elevator_brand',elevator_brand) elevator_brand,
+ f_return_content('maintain_elevator_kind',elevator_kind) elevator_kind,
+ elevator_kind con_elevator_kind,
+ spec,
+ weight,
+ speed,
+ floors,
+ persons,
+ maintain_times,
+ maintain_months,
+ maintain_period,
+ is_m1_bundle,
+
+ useful_years,
+ last_check_date,
+ speed_governors_check_expense,
+ service_expense,
+
+ stand_price,
+ contract_price,
+ sold_price,
+ 0 mi_cost ,
+ 0 discount,
+ 0 gross_profit
+ FROM
+ con_maintance_examine_clear
+ WHERE
+ 1 = 1
+ AND apply_key='" . $data['apply_key'] . "' and cmstatus='Y'");
+
+#總臺數
+$count = count($con_maintance_examine_clear);
+$total_sold_price = 0;
+#總成交價
+#總標準價格
+$total_stand_price = 0;
+#總標準成本
+foreach ($con_maintance_examine_clear as $val) {
+ $total_sold_price += $val['sold_price'];
+ $total_stand_price += $val['stand_price'];
+}
+$total_discount_rate = $total_sold_price == 0 ? 0
+ : (100 * round($total_sold_price / $total_stand_price, 4)) . "%";
+
+$wf->setFormData(['discount' => substr($total_discount_rate, 0, -1)]);
+$assigner = $wf->getAssignerList();
+$assign_status = $wf->getAssignStatus($assigner);
+
+
+function base_url($url)
+{
+ return "https://www.masada.com.tw/static/" . $url;
+}
+function get_sequnece_no($seq_name = '', $p_yyyymm = '')
+{
+
+ if (empty($p_yyyymm) || empty($seq_name)) return null;
+ #當前年月
+ //echo "select yyyymm from sequence where seq_name='$seq_name' ";
+ list($yyyymm, $prefix) = DB::fields("select yyyymm ,prefix from sequence where seq_name='$seq_name' ");
+ if ($p_yyyymm != $yyyymm) {
+ DB::query("update sequence set yyyymm='$p_yyyymm' , current_val='10000' where seq_name='$seq_name' ");
+ }
+ // echo "SELECT concat( $prefix,,substring(nextval('$seq_name'),2)) seq_no ";
+ list($seq_no) = DB::fields("SELECT concat( '$prefix','$p_yyyymm',substring(nextval('$seq_name'),2)) seq_no ");
+
+
+ return $seq_no;
+}
+
+
+?>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/wms/cont/sign_list.php b/wms/cont/sign_list.php
new file mode 100644
index 00000000..d31780b3
--- /dev/null
+++ b/wms/cont/sign_list.php
@@ -0,0 +1,225 @@
+';
+ // print_r($sql_get);
+ // echo '';
+
+ $result = mysqli_query($link, $sql_get);
+ if ($result == false) {
+ die(mysqli_error($link));
+ }
+ $res_get = mysqli_fetch_all(mysqli_query($link, $sql_get), MYSQLI_ASSOC);
+
+
+ foreach ($res_get as $key => $data) {
+ // 結案隱藏
+ if ($data['flow_code'] !== 'Z') {
+ $test = $data['form_key'];
+ // $sql = "SELECT mid FROM pricereview_sign WHERE id = $test";
+ // $result = mysqli_fetch_all(mysqli_query($link, $sql), MYSQLI_ASSOC);
+ // echo '';
+ // print_r($result);
+ // echo '
';
+ $id[] = $test;
+ }
+ }
+ $inClause = implode(',', $id);
+}
+
+
+#可編輯的列
+$editableColumn = [
+ 'apply_key' => [
+ 'label' => "評審單號", "value" => "", "tag" => 'text',
+ 'attr' => [
+ 'readonly=true ',
+ 'class' => 'form-control form-control-sm'
+ ]
+ ],
+ 'vol_no' => ['label' => "卷號", "value" => "", "tag" => 'text', 'attr' => ['readonly=true ', 'class' => 'form-control form-control-sm']],
+ 'address' => ['label' => "現場地址", "value" => "", "tag" => 'text', 'attr' => ['required', 'class' => 'form-control form-control-sm']],
+ 'case_name' => ['label' => "現場名稱", "value" => "", "tag" => 'text', 'attr' => ['required', 'class' => 'form-control form-control-sm']],
+ 'brand' => ['label' => "電梯品牌", "value" => "", "tag" => 'select', 'attr' => ['required', 'class' => 'form-control form-control-sm']],
+ 'num' => ['label' => "電梯臺數", "value" => "", "tag" => 'number', 'attr' => ['required', 'class' => 'form-control form-control-sm']],
+ 'salesman' => ['label' => "營業員", "value" => "", "tag" => 'text', 'attr' => ['required', 'class' => 'form-control form-control-sm']],
+ 'maintain_kind' => ['label' => "保養方式", "value" => "", "tag" => 'select', 'attr' => ['class' => 'form-control form-control-sm']],
+ 'contract_begin_date' => ['label' => "契約期限開始", "value" => "", "tag" => 'date', 'attr' => ['required', 'class' => 'date form-control form-control-sm']],
+ 'contract_end_date' => ['label' => "契約期限結束", "value" => "", "tag" => 'date', 'attr' => ['required', 'class' => 'date form-control form-control-sm']],
+ 'contract_kind' => ['label' => "契約性質", "value" => "", "tag" => 'select', 'attr' => ['class' => 'form-control form-control-sm']],
+ 'platform_company' => ['label' => "加盟公司名稱", "value" => "", "tag" => 'text', 'attr' => ['class' => 'form-control form-control-sm']],
+ 'platforom_company_tel' => ['label' => "加盟公司電話", "value" => "", "tag" => 'text', 'attr' => ['class' => 'form-control form-control-sm']],
+ //'payment_kind' => ['label' => "付款方式", "value" => "", "tag" => 'select', 'attr' => ['required', 'class' => 'form-control form-control-sm'], 'options' => $payment_kind_opt],
+
+];
+// 設置一個空陣列來放資料
+$data = array();
+
+$salesman = empty($_GET['salesman']) ? $user_id : $_GET['salesman'];
+//$where = " and salesman like '%'";
+$where = " and salesman = '$salesman'";
+
+// 可瀏覽全部資料的部門
+$depart_arr = ["220"];
+$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);
+if (in_array($user_department_id, $depart_arr) || $user_id == "M0008" || $user_id == "M0012" || $user_id == "M0006" || $user_id == "M0189" || $user_id == "TEST01" || $user_id == "TEST02" || $user_id == "TEST03" || $user_id == "TEST04") $where = "";
+
+// 電梯廠牌
+$elevator_brand_arr = [];
+$sql = "select code_name ,content from code where field_name='elevator_brand'";
+$res = mysqli_query($link, $sql);
+while ($row = mysqli_fetch_row($res)) {
+ $elevator_brand_arr[$row[0]] = $row[1];
+}
+mysqli_free_result($res);
+if (!empty($res_get)) {
+ $sql = "SELECT
+ apply_key,
+ vol_no,
+ address,
+ case_name,
+ brand ,
+ num ,
+ f_return_name(salesman) salesman,
+ f_return_content('maintain_kind',maintain_kind ) maintain_kind,
+ date_format(contract_begin_date,'%Y/%m/%d') contract_begin_date,
+ date_format(contract_end_date,'%Y/%m/%d') contract_end_date ,
+ f_return_content('contract_kind',contract_kind ) contract_kind,
+ platform_company,
+ platforom_company_tel,
+ form_key,
+
+ f_return_content('payment_kind',payment_kind ) payment_kind FROM $table WHERE form_key IN ($inClause) ";
+} else {
+ $sql = "SELECT
+ apply_key,
+ vol_no,
+ address,
+ case_name,
+ brand ,
+ num ,
+ f_return_name(salesman) salesman,
+ f_return_content('maintain_kind',maintain_kind ) maintain_kind,
+ date_format(contract_begin_date,'%Y/%m/%d') contract_begin_date,
+ date_format(contract_end_date,'%Y/%m/%d') contract_end_date ,
+ f_return_content('contract_kind',contract_kind ) contract_kind,
+ platform_company,
+ platforom_company_tel,
+ form_key,
+
+ f_return_content('payment_kind',payment_kind ) payment_kind FROM $table
+ where 1=1 $where ORDER BY vol_no";
+}
+// echo $sql;
+$data = mysqli_query($link, $sql);
+// echo '';
+// print_r($data);
+// echo '
';
+?>
+
+Please fill up the required field!";
+ } else {
+ header("Location:repair-index.php");
+ }
+ }
+
+?>
+
+
+
+
+
+There is no record!";
+endif;
+
+#代表結束連線
+mysqli_close($link);
+
+include "../footer.php";
+
+?>
\ No newline at end of file
diff --git a/wms/cont/submit.php b/wms/cont/submit.php
new file mode 100644
index 00000000..82838567
--- /dev/null
+++ b/wms/cont/submit.php
@@ -0,0 +1,78 @@
+";
+ echo "alert('請確認電梯資料或未選擇下位簽核者!');";
+ echo "history.go(-1);";
+ echo "";
+ exit;
+}
+
+//更新表单ConMaintanceExamineApplyModel
+$cmea = new ConMaintanceExamineApplyModel();
+$apply_key=$request['apply_key'];
+$cmea->update(['apply_key', $apply_key], array_diff_key($request, ['apply_key' => '']));
+//更新电梯列表
+if (!empty($request["reg_del"])) {
+ $register_code_del_arr = explode(",", rtrim($request["reg_del"], ","));
+ foreach ($register_code_del_arr as $val) {
+ $sql = "update con_maintance_examine_clear set cmstatus = 'D' where apply_key = '$apply_key' and register_code = '$val' and cmstatus <> 'D'";
+ DB::query($sql);
+ }
+}
+if (!empty($request['register_code']) && count($request['register_code']) > 0) {
+ $cmec = new ConMaintanceExamineClearModel();
+ for ($i = 0; $i < count($request['register_code']); $i++) {
+ $data = [
+ 'apply_key' => $request['apply_key']
+ ];
+ $cols = array_diff($cmec->fillable, ['apply_key']);
+ foreach ($cols as $col) {
+ $data[$col] = empty($request[$col][$i]) ? '' : $request[$col][$i];
+ if ($col=="annual_survey_expense") $data[$col] = '0.00';
+ }
+ $cmec->create($data);
+ }
+}
+
+//var_dump($_POST);
+//var_dump($_GET);
+
+if ($tosign) {
+ #流程开始,var_dump($request);
+ $flow = new Flow($request['form_key']);
+ // 当前节点签核开始
+ $wf = new WorkFlow($flow->system_id, $flow->flow_id, $flow->form_id, $request['form_key']);
+ $wf->setFormData($request);
+ $wf->submit($request['next_users'], $request['assign_status'], $request['assign_opinion']);
+ //当前节点签核结束
+ $responses['flowName'] = $wf->getFlowName();
+ $responses['form_key'] = $request['form_key'];
+ //var_dump($request);
+ #結案發通知給營業員
+ if ($request['assign_status'] == 'F4') {
+
+ list($salesman, $case_name ) = DB::fields("select salesman ,case_name from con_maintance_examine_apply where apply_key='" . $apply_key. "' ");
+ $ins_notice_sql = "INSERT INTO `notice` ( `kind`,`title`, `content`, `permission`)
+ VALUES ( '1', '契約價審單結案通知(" .$case_name . ")', '契約價審單結案通知(" . $case_name . ")', ' $salesman')";
+ DB::query($ins_notice_sql);
+ // echo $ins_notice_sql;
+ }
+}
+echo "";
diff --git a/wms/cont/success.php b/wms/cont/success.php
new file mode 100644
index 00000000..96c2a2f2
--- /dev/null
+++ b/wms/cont/success.php
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/wms/cont/t.php b/wms/cont/t.php
new file mode 100644
index 00000000..8bf1a33a
--- /dev/null
+++ b/wms/cont/t.php
@@ -0,0 +1,84 @@
+ 'A',
+ 'floors' => 7,
+ 'speed' => 1,
+ 'persons' => 6,
+ 'weight' => 1000,
+ 'maintain_times' => 1,
+ 'maintain_months' => 12,
+ 'maintain_kind' => 2,
+ 'maintain_period' => 1, //默认为1月1次, 2是为2月一次
+ 'is_m1_bundle' => 'N',
+];
+
+//货梯
+$param = [
+
+ 'elevator_type' => 'B',
+ 'floors' => 7,
+ 'speed' => 1,
+ 'persons' => 6,
+ 'weight' => 1000,
+ 'maintain_times' => 1,
+ 'maintain_months' => 12,
+ 'maintain_kind' => 2,
+ 'maintain_period' => 1, //默认为1月1次, 2是为2月一次
+ 'is_m1_bundle' => 'N',
+];
+
+
+//病床梯
+$param = [
+
+ 'elevator_type' => 'C',
+ 'floors' => 28,
+ 'speed' => 1,
+ 'persons' => 6,
+ 'weight' => 1000,
+ 'maintain_times' => 2, //病床梯一月2次保养
+ 'maintain_months' => 12,
+ 'maintain_kind' => 2,
+ 'maintain_period' => 1, //默认为1月1次, 2是为2月一次
+ 'is_m1_bundle' => 'N',
+];
+
+//无机房
+$param = [
+ 'elevator_type' => 'D',
+ 'floors' => 3,
+ 'speed' => 1,
+ 'persons' => 6,
+ 'weight' => 1000,
+ 'maintain_times' => 1, //病床梯一月2次保养
+ 'maintain_months' => 12,
+ 'maintain_kind' => 3,
+ 'maintain_period' => 1, //默认为1月1次, 2是为2月一次
+ 'is_m1_bundle' => 'N',
+];
+
+
+//家用梯
+$param = [
+ 'elevator_type' => 'E',
+ 'floors' => 3,
+ 'speed' => 1,
+ 'persons' => 6,
+ 'weight' => 1000,
+ 'maintain_times' => 1, //病床梯一月2次保养
+ 'maintain_months' => 60,
+ 'maintain_kind' => 2,
+ 'maintain_period' => 1, //默认为1月1次, 2是为2月一次
+ 'is_m1_bundle' => 'Y',
+];
+
+$mic = new MSCalculator();
+$price = $mic->cal($_GET);
+echo json_encode($price);
diff --git a/wms/cont/test.php b/wms/cont/test.php
new file mode 100644
index 00000000..55f9873a
--- /dev/null
+++ b/wms/cont/test.php
@@ -0,0 +1,174 @@
+ $regions['content'],
+ #当月件数
+ 'd_item_cnt' => 0,
+ #当月台数
+ 'd_mfg_cnt' => 0,
+ #直销件数
+ 'z_item_cnt' => 0,
+ #直销台数
+ 'z_mfg_cnt' => 0,
+ #平台件数
+ 'p_item_cnt' => 0,
+ #平台台数
+ 'p_mfg_cnt' => 0,
+ #台数合计
+ 'mfg_total' => 0,
+ #件数合计
+ 'item_total' => 0,
+ #营业人数
+ 'persons' => 0,
+ #人均台数
+ 'avg_mfg_total' => 0,
+ #人均件数
+ 'avg_item_total' => 0,
+ ];
+ #遍历大区下面所有分公司
+ $res_branch = DB::result("select depart_no,depart_name from depart where regions='" . $regions['code_name'] . "' ");
+ foreach ($res_branch as $branch) {
+ #遍历分公司下面所有人
+ $depart_data = [];
+ $res_salesman = DB::result("select employee_no,name from employee
+ where depart_no='" . $branch['depart_no'] . "' ");
+ $depart_data = [
+ 'depart_name' => $branch['depart_name'],
+
+ ];
+ foreach ($res_salesman as $salesman) {
+ //当月预定成交台数 件数
+ $d_item_cnt = $d_mfg_cnt = $z_item_cnt = $z_mfg_cnt = $p_item_cnt = $p_mfg_cnt = 0;
+ list($d_item_cnt, $d_mfg_cnt) = DB::fields("select count(vol_no) item_cnt ,sum(num) mfg_cnt
+ From hope_contract_customer where salesman='" . $salesman['employee_no'] . "'
+ and pre_order_date between DATE_FORMAT(concat('$yyyymm','01'),'%Y-%m-%d')
+ and LAST_DAY(STR_TO_DATE('$yyyymm', '%Y%m'))");
+ // 直销 台数 件数
+ list($z_item_cnt, $z_mfg_cnt) = DB::fields("select count(vol_no) z_item_cnt ,sum(num)
+ z_mfg_cnt From hope_contract_customer where salesman=''" . $salesman['employee_no'] . "'
+ and customer_kind='1'");
+ // 平台 台数 件数
+ list($p_item_cnt, $p_mfg_cnt) = DB::fields("select count(vol_no) p_item_cnt ,sum(num)
+ p_mfg_cnt From hope_contract_customer where salesman='" . $salesman['employee_no'] . "'
+ and customer_kind!='1'
+ ");
+ #当月件数
+ $d_item_cnt = empty($d_item_cnt) ? 0 : $d_item_cnt;
+ #当月台数
+ $d_mfg_cnt = empty($d_mfg_cnt) ? 0 : $d_mfg_cnt;
+ #直销件数
+ $z_item_cnt = empty($z_item_cnt) ? 0 : $z_item_cnt;
+ #直销台数
+ $z_mfg_cnt = empty($z_mfg_cnt) ? 0 : $z_mfg_cnt;
+ #平台件数
+ $p_item_cnt = empty($p_item_cnt) ? 0 : $p_item_cnt;
+ #平台台数
+ $p_mfg_cnt = empty($p_mfg_cnt) ? 0 : $p_mfg_cnt;
+ #台数合计
+ $mfg_total = $z_mfg_cnt + $p_mfg_cnt;
+ #件数合计
+ $item_total = $z_item_cnt + $p_item_cnt;
+ #营业人数
+ $persons = 1;
+ #人均台数
+ $avg_mfg_total = $z_mfg_cnt + $p_mfg_cnt;
+ #人均件数
+ $avg_item_total = $z_item_cnt + $p_item_cnt;
+
+ #部门数据
+ $depart_data = [
+ #当月件数
+ 'd_item_cnt' => $depart_data['d_item_cnt'] + $d_item_cnt,
+ #当月台数
+ 'd_mfg_cnt' => $depart_data['d_mfg_cnt'] + $d_mfg_cnt,
+ #直销件数
+ 'z_item_cnt' => $depart_data['z_item_cnt'] + $z_item_cnt,
+ #直销台数
+ 'z_mfg_cnt' => $depart_data['z_mfg_cnt'] + $z_mfg_cnt,
+ #平台件数
+ 'p_item_cnt' => $depart_data['p_item_cnt'] + $p_item_cnt,
+ #平台台数
+ 'p_mfg_cnt' => $depart_data['p_mfg_cnt'] + $p_mfg_cnt,
+ #台数合计
+ 'mfg_total' => $depart_data['mfg_total'] + $mfg_total,
+ #件数合计
+ 'item_total' => $depart_data['item_total'] + $item_total,
+ #营业人数
+ 'persons' => $depart_data['persons'] + $persons,
+ #人均台数 $z_mfg_cnt + $p_mfg_cnt
+ 'avg_mfg_total' => ($depart_data['z_mfg_cnt'] + $z_mfg_cnt) / ($depart_data['persons'] + $persons),
+ #人均件数
+ 'avg_item_total' => ($depart_data['z_item_cnt'] + $z_item_cnt) / ($depart_data['persons'] + $persons)
+ ];
+
+
+ $region_data[$regions['code_name']] = [
+ #当月件数
+ 'd_item_cnt' => $region_data[$regions['code_name']]['d_item_cnt'] + $depart_data['d_item_cnt'],
+ #当月台数
+ 'd_mfg_cnt' => $region_data[$regions['code_name']]['d_mfg_cnt'] + $depart_data['d_mfg_cnt'],
+ #直销件数
+ 'z_item_cnt' => $region_data[$regions['code_name']]['z_item_cnt'] + $depart_data['z_item_cnt'],
+ #直销台数
+ 'z_mfg_cnt' => $region_data[$regions['code_name']]['z_mfg_cnt'] + $depart_data['z_mfg_cnt'],
+ #平台件数
+ 'p_item_cnt' => $region_data[$regions['code_name']]['p_item_cnt'] + $depart_data['p_item_cnt'],
+ #平台台数
+ 'p_mfg_cnt' => $region_data[$regions['code_name']]['p_mfg_cnt'] + $depart_data['p_mfg_cnt'],
+ #台数合计
+ 'mfg_total' => $region_data[$regions['code_name']]['mfg_total'] + $depart_data['mfg_total'],
+ #件数合计
+ 'item_total' => $region_data[$regions['code_name']]['item_total'] + $depart_data['item_total'],
+ #营业人数
+ 'persons' => $region_data[$regions['code_name']]['persons'] + $depart_data['persons'],
+ #人均台数 $z_mfg_cnt + $p_mfg_cnt
+ 'avg_mfg_total' => ($region_data[$regions['code_name']]['z_mfg_cnt'])
+ / ($region_data[$regions['persons']]),
+ #人均件数
+ 'avg_item_total' => ($region_data[$regions['code_name']]['z_item_cnt'])
+ / ($region_data[$regions['persons']]),
+
+ ];
+ $depart_data['children'][] = [
+ 'depart_name' => $salesman['name'],
+ #当月件数
+ 'd_item_cnt' => $d_item_cnt,
+ #当月台数
+ 'd_mfg_cnt' => $d_mfg_cnt,
+ #直销件数
+ 'z_item_cnt' => $z_item_cnt,
+ #直销台数
+ 'z_mfg_cnt' => $z_mfg_cnt,
+ #平台件数
+ 'p_item_cnt' => $p_item_cnt,
+ #平台台数
+ 'p_mfg_cnt' => $p_mfg_cnt,
+ #台数合计
+ 'mfg_total' => $z_mfg_cnt + $p_mfg_cnt,
+ #件数合计
+ 'item_total' => $z_item_cnt + $p_item_cnt,
+ #营业人数
+ 'persons' => 1,
+ #人均台数
+ 'avg_mfg_total' => $z_mfg_cnt + $p_mfg_cnt,
+ #人均件数
+ 'avg_item_total' => $z_item_cnt + $p_item_cnt,
+ ];
+ }
+ #大区资料
+ if (empty($region_data[$regions['code_name']])) $region_data[$regions['code_name']] = [];
+ if ($region_data[$regions['code_name']]['children']) $region_data[$regions['code_name']]['children'] = [];
+ array_push($region_data[$regions['code_name']]['children'], $depart_data);
+ }
+ echo "";
+ var_dump($region_data);
+}
diff --git a/wms/cont/wf_common.php b/wms/cont/wf_common.php
new file mode 100644
index 00000000..519d341f
--- /dev/null
+++ b/wms/cont/wf_common.php
@@ -0,0 +1,20 @@
+免保期限
-
+
個月
@@ -634,7 +634,7 @@ $para = "function_name=pricereview&" . $token_link;
const secondPayDeadline = '';
const tradeaddress = '';
const tradedeadline = 180
- const freedeadline = 18;
+ const freedeadline = 12;
const regulations = 10;
const workdeadline_a = 60;
const workdeadline_b = 7;
diff --git a/wms/contract/insertData.php b/wms/contract/insertData.php
index 38ee1051..5c4f8a99 100644
--- a/wms/contract/insertData.php
+++ b/wms/contract/insertData.php
@@ -114,7 +114,10 @@ foreach ($sheet->getRowIterator() as $key => $row) {
} elseif ($id == 15) {
$kind = 'E';
$subkind = 'E1';
- } elseif ($id == 16) {
+ } elseif ($id == 17) {
+ $kind = 'E';
+ $subkind = 'E1';
+ }elseif ($id == 18) {
$kind = 'F';
$subkind = 'F1';
}
diff --git a/wms/contract/option/f1.xlsx b/wms/contract/option/f1.xlsx
deleted file mode 100644
index 0189dfe9..00000000
Binary files a/wms/contract/option/f1.xlsx and /dev/null differ
diff --git a/wms/contract/option/facility.xlsx b/wms/contract/option/facility.xlsx
deleted file mode 100644
index f51a3944..00000000
Binary files a/wms/contract/option/facility.xlsx and /dev/null differ
diff --git a/wms/contract/option/option1.xlsx b/wms/contract/option/option1.xlsx
deleted file mode 100644
index 122bf90a..00000000
Binary files a/wms/contract/option/option1.xlsx and /dev/null differ
diff --git a/wms/contract/option/option10.xlsx b/wms/contract/option/option10.xlsx
deleted file mode 100644
index 034aaa77..00000000
Binary files a/wms/contract/option/option10.xlsx and /dev/null differ
diff --git a/wms/contract/option/option11.xlsx b/wms/contract/option/option11.xlsx
deleted file mode 100644
index 5224e609..00000000
Binary files a/wms/contract/option/option11.xlsx and /dev/null differ
diff --git a/wms/contract/option/option1127/option.xlsx b/wms/contract/option/option1127/option.xlsx
deleted file mode 100644
index 36c0cece..00000000
Binary files a/wms/contract/option/option1127/option.xlsx and /dev/null differ
diff --git a/wms/contract/option/option1127/option1.xlsx b/wms/contract/option/option1127/option1.xlsx
deleted file mode 100644
index 4a197ec5..00000000
Binary files a/wms/contract/option/option1127/option1.xlsx and /dev/null differ
diff --git a/wms/contract/option/option1127/option10.xlsx b/wms/contract/option/option1127/option10.xlsx
deleted file mode 100644
index 4087ccf5..00000000
Binary files a/wms/contract/option/option1127/option10.xlsx and /dev/null differ
diff --git a/wms/contract/option/option1127/option11.xlsx b/wms/contract/option/option1127/option11.xlsx
deleted file mode 100644
index 9dc16b7e..00000000
Binary files a/wms/contract/option/option1127/option11.xlsx and /dev/null differ
diff --git a/wms/contract/option/option1127/option12.xlsx b/wms/contract/option/option1127/option12.xlsx
deleted file mode 100644
index 1f57b701..00000000
Binary files a/wms/contract/option/option1127/option12.xlsx and /dev/null differ
diff --git a/wms/contract/option/option1127/option13.xlsx b/wms/contract/option/option1127/option13.xlsx
deleted file mode 100644
index df84bbc7..00000000
Binary files a/wms/contract/option/option1127/option13.xlsx and /dev/null differ
diff --git a/wms/contract/option/option1127/option14.xlsx b/wms/contract/option/option1127/option14.xlsx
deleted file mode 100644
index a36ca847..00000000
Binary files a/wms/contract/option/option1127/option14.xlsx and /dev/null differ
diff --git a/wms/contract/option/option1127/option15.xlsx b/wms/contract/option/option1127/option15.xlsx
deleted file mode 100644
index 7ef897bc..00000000
Binary files a/wms/contract/option/option1127/option15.xlsx and /dev/null differ
diff --git a/wms/contract/option/option1127/option16.xlsx b/wms/contract/option/option1127/option16.xlsx
deleted file mode 100644
index 8e6bce19..00000000
Binary files a/wms/contract/option/option1127/option16.xlsx and /dev/null differ
diff --git a/wms/contract/option/option1127/option2.xlsx b/wms/contract/option/option1127/option2.xlsx
deleted file mode 100644
index 17daba20..00000000
Binary files a/wms/contract/option/option1127/option2.xlsx and /dev/null differ
diff --git a/wms/contract/option/option1127/option20.xlsx b/wms/contract/option/option1127/option20.xlsx
deleted file mode 100644
index e2422b5d..00000000
Binary files a/wms/contract/option/option1127/option20.xlsx and /dev/null differ
diff --git a/wms/contract/option/option1127/option3.xlsx b/wms/contract/option/option1127/option3.xlsx
deleted file mode 100644
index 5c39ee18..00000000
Binary files a/wms/contract/option/option1127/option3.xlsx and /dev/null differ
diff --git a/wms/contract/option/option1127/option4.xlsx b/wms/contract/option/option1127/option4.xlsx
deleted file mode 100644
index c44f5df5..00000000
Binary files a/wms/contract/option/option1127/option4.xlsx and /dev/null differ
diff --git a/wms/contract/option/option1127/option5.xlsx b/wms/contract/option/option1127/option5.xlsx
deleted file mode 100644
index 170ca69c..00000000
Binary files a/wms/contract/option/option1127/option5.xlsx and /dev/null differ
diff --git a/wms/contract/option/option1127/option6.xlsx b/wms/contract/option/option1127/option6.xlsx
deleted file mode 100644
index 68f18ef9..00000000
Binary files a/wms/contract/option/option1127/option6.xlsx and /dev/null differ
diff --git a/wms/contract/option/option1127/option7.xlsx b/wms/contract/option/option1127/option7.xlsx
deleted file mode 100644
index ee4d39eb..00000000
Binary files a/wms/contract/option/option1127/option7.xlsx and /dev/null differ
diff --git a/wms/contract/option/option1127/option8.xlsx b/wms/contract/option/option1127/option8.xlsx
deleted file mode 100644
index 5f431522..00000000
Binary files a/wms/contract/option/option1127/option8.xlsx and /dev/null differ
diff --git a/wms/contract/option/option1127/option9.xlsx b/wms/contract/option/option1127/option9.xlsx
deleted file mode 100644
index 90616cc0..00000000
Binary files a/wms/contract/option/option1127/option9.xlsx and /dev/null differ
diff --git a/wms/contract/option/option12.xlsx b/wms/contract/option/option12.xlsx
deleted file mode 100644
index e2a1ac6f..00000000
Binary files a/wms/contract/option/option12.xlsx and /dev/null differ
diff --git a/wms/contract/option/option1220/option.xlsx b/wms/contract/option/option1220/option.xlsx
deleted file mode 100644
index 36c0cece..00000000
Binary files a/wms/contract/option/option1220/option.xlsx and /dev/null differ
diff --git a/wms/contract/option/option1220/option1.xlsx b/wms/contract/option/option1220/option1.xlsx
deleted file mode 100644
index 4a197ec5..00000000
Binary files a/wms/contract/option/option1220/option1.xlsx and /dev/null differ
diff --git a/wms/contract/option/option1220/option10.xlsx b/wms/contract/option/option1220/option10.xlsx
deleted file mode 100644
index 4087ccf5..00000000
Binary files a/wms/contract/option/option1220/option10.xlsx and /dev/null differ
diff --git a/wms/contract/option/option1220/option11.xlsx b/wms/contract/option/option1220/option11.xlsx
deleted file mode 100644
index 9dc16b7e..00000000
Binary files a/wms/contract/option/option1220/option11.xlsx and /dev/null differ
diff --git a/wms/contract/option/option1220/option12.xlsx b/wms/contract/option/option1220/option12.xlsx
deleted file mode 100644
index 1f57b701..00000000
Binary files a/wms/contract/option/option1220/option12.xlsx and /dev/null differ
diff --git a/wms/contract/option/option1220/option13.xlsx b/wms/contract/option/option1220/option13.xlsx
deleted file mode 100644
index df84bbc7..00000000
Binary files a/wms/contract/option/option1220/option13.xlsx and /dev/null differ
diff --git a/wms/contract/option/option1220/option14.xlsx b/wms/contract/option/option1220/option14.xlsx
deleted file mode 100644
index a36ca847..00000000
Binary files a/wms/contract/option/option1220/option14.xlsx and /dev/null differ
diff --git a/wms/contract/option/option1220/option15.xlsx b/wms/contract/option/option1220/option15.xlsx
deleted file mode 100644
index 7ef897bc..00000000
Binary files a/wms/contract/option/option1220/option15.xlsx and /dev/null differ
diff --git a/wms/contract/option/option1220/option16.xlsx b/wms/contract/option/option1220/option16.xlsx
deleted file mode 100644
index 8e6bce19..00000000
Binary files a/wms/contract/option/option1220/option16.xlsx and /dev/null differ
diff --git a/wms/contract/option/option1220/option2.xlsx b/wms/contract/option/option1220/option2.xlsx
deleted file mode 100644
index 17daba20..00000000
Binary files a/wms/contract/option/option1220/option2.xlsx and /dev/null differ
diff --git a/wms/contract/option/option1220/option20.xlsx b/wms/contract/option/option1220/option20.xlsx
deleted file mode 100644
index e2422b5d..00000000
Binary files a/wms/contract/option/option1220/option20.xlsx and /dev/null differ
diff --git a/wms/contract/option/option1220/option3.xlsx b/wms/contract/option/option1220/option3.xlsx
deleted file mode 100644
index 5c39ee18..00000000
Binary files a/wms/contract/option/option1220/option3.xlsx and /dev/null differ
diff --git a/wms/contract/option/option1220/option4.xlsx b/wms/contract/option/option1220/option4.xlsx
deleted file mode 100644
index c44f5df5..00000000
Binary files a/wms/contract/option/option1220/option4.xlsx and /dev/null differ
diff --git a/wms/contract/option/option1220/option5.xlsx b/wms/contract/option/option1220/option5.xlsx
deleted file mode 100644
index 170ca69c..00000000
Binary files a/wms/contract/option/option1220/option5.xlsx and /dev/null differ
diff --git a/wms/contract/option/option1220/option6.xlsx b/wms/contract/option/option1220/option6.xlsx
deleted file mode 100644
index 68f18ef9..00000000
Binary files a/wms/contract/option/option1220/option6.xlsx and /dev/null differ
diff --git a/wms/contract/option/option1220/option7.xlsx b/wms/contract/option/option1220/option7.xlsx
deleted file mode 100644
index ee4d39eb..00000000
Binary files a/wms/contract/option/option1220/option7.xlsx and /dev/null differ
diff --git a/wms/contract/option/option1220/option8.xlsx b/wms/contract/option/option1220/option8.xlsx
deleted file mode 100644
index 5f431522..00000000
Binary files a/wms/contract/option/option1220/option8.xlsx and /dev/null differ
diff --git a/wms/contract/option/option1220/option9.xlsx b/wms/contract/option/option1220/option9.xlsx
deleted file mode 100644
index 90616cc0..00000000
Binary files a/wms/contract/option/option1220/option9.xlsx and /dev/null differ
diff --git a/wms/contract/option/option13.xlsx b/wms/contract/option/option13.xlsx
deleted file mode 100644
index 74efcbaa..00000000
Binary files a/wms/contract/option/option13.xlsx and /dev/null differ
diff --git a/wms/contract/option/option14.xlsx b/wms/contract/option/option14.xlsx
deleted file mode 100644
index 07d5b6ce..00000000
Binary files a/wms/contract/option/option14.xlsx and /dev/null differ
diff --git a/wms/contract/option/option15.xlsx b/wms/contract/option/option15.xlsx
deleted file mode 100644
index 3620e7ca..00000000
Binary files a/wms/contract/option/option15.xlsx and /dev/null differ
diff --git a/wms/contract/option/option3.xlsx b/wms/contract/option/option3.xlsx
deleted file mode 100644
index 4c3416ef..00000000
Binary files a/wms/contract/option/option3.xlsx and /dev/null differ
diff --git a/wms/contract/option/option4.xlsx b/wms/contract/option/option4.xlsx
deleted file mode 100644
index 7046969e..00000000
Binary files a/wms/contract/option/option4.xlsx and /dev/null differ
diff --git a/wms/contract/option/option5.xlsx b/wms/contract/option/option5.xlsx
deleted file mode 100644
index 9e70e1e8..00000000
Binary files a/wms/contract/option/option5.xlsx and /dev/null differ
diff --git a/wms/contract/option/option6.xlsx b/wms/contract/option/option6.xlsx
deleted file mode 100644
index d647884b..00000000
Binary files a/wms/contract/option/option6.xlsx and /dev/null differ
diff --git a/wms/contract/option/option7.xlsx b/wms/contract/option/option7.xlsx
deleted file mode 100644
index 3af4c28d..00000000
Binary files a/wms/contract/option/option7.xlsx and /dev/null differ
diff --git a/wms/contract/option/option8.xlsx b/wms/contract/option/option8.xlsx
deleted file mode 100644
index 7f1c37eb..00000000
Binary files a/wms/contract/option/option8.xlsx and /dev/null differ
diff --git a/wms/contract/option/option9.xlsx b/wms/contract/option/option9.xlsx
deleted file mode 100644
index 1d43cf6f..00000000
Binary files a/wms/contract/option/option9.xlsx and /dev/null differ
diff --git a/wms/crm/crmm01-index.php b/wms/crm/crmm01-index.php
index 2ed535b9..58dfaba4 100644
--- a/wms/crm/crmm01-index.php
+++ b/wms/crm/crmm01-index.php
@@ -41,7 +41,7 @@ $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" || $user_id == "M0189" || $user_id == "M0061" || $user_id == "TEST01" || $user_id == "TEST02" || $user_id == "TEST03" || $user_id == "TEST04" ) $sql_cmd = "";
+if (in_array($user_department_id, $depart_arr) || $user_id == "M0060" || $user_id == "M0107" || $user_id == "M0193" || $user_id == "M0149" || $user_id == "M0189" || $user_id == "M0061" || $user_id == "TEST01" || $user_id == "TEST02" || $user_id == "TEST03" || $user_id == "TEST04" || $user_id == "M0175") $sql_cmd = "";
if (!empty($sql_cmd)) $where .= " and " . str_replace("where", "", $sql_cmd);
/*
$checkAll = ['p0044', 'M0007'];
diff --git a/wms/fun_global.php b/wms/fun_global.php
index d4917d8d..72622a54 100644
--- a/wms/fun_global.php
+++ b/wms/fun_global.php
@@ -14,6 +14,9 @@ function sql_myself($user_id, $column = "creater")
global $link;
$follower_arr = []; // 下屬列表
+ if($user_id == 'M0105'){
+ $user_id = "M0137";
+ }
$sql_cmd = "where ($column = '$user_id'";
$follower_arr = find_follow($user_id);
if (count($follower_arr) > 0) {
@@ -645,7 +648,7 @@ function getAccounttype($link, $user_id)
*/
function collect_month($contractday)
{
- $today_date = new DateTime(date('Y-m-d', strtotime('-1 month', strtotime(date('Y-m-d')))));
+ $today_date = new DateTime(date('Y-m-d', strtotime('-1 month', strtotime(date('Y-m-t')))));
$latest_timestamp = $contractday;
$latest_date = new DateTime();
$latest_date->setTimestamp($latest_timestamp);
diff --git a/wms/mkt/api/getElevatorMi.php b/wms/mkt/api/getElevatorMi.php
new file mode 100644
index 00000000..fbea22cc
--- /dev/null
+++ b/wms/mkt/api/getElevatorMi.php
@@ -0,0 +1,46 @@
+prepare($sql_str);
+$stmt->bindParam(':elevator_type', $spec);
+$stmt->bindParam(':max_weight', $weight);
+$stmt->bindParam(':max_speed', $speed);
+$stmt->execute();
+$mi = $stmt->fetch(PDO::FETCH_ASSOC);
+
+
+if(!$mi){
+ echo false;
+ exit;
+}
+
+$stop = $stop > $mi['max_floors'] ? $mi['max_floors'] : $stop;
+$stop = $stop < 2 ? 2 : $stop;
+$equipment_fee = round($mi['purchase_cost'] + ($stop - $mi['base_floor']) * $mi['material_plus']);
+$customs_shipping_fee = round($equipment_fee * 0.09);
+$unloading_fee = round($mi['unloading']);
+$transport_site_fee = round($mi['transport_site']);
+$install_fee = round(($mi['install_price'] + ($stop - $mi['base_floor']) * $mi['install_plus']) + $mi['trial_price'] + ($stop - $mi['base_floor']) * $mi['trial_plus']);
+$free1y_fee = round($mi['free1y']);
+$other_fee = round($mi['crane'] + $mi['wooden_box'] + $mi['consumables']);
+
+
+$newMI = [
+ 'equipment_fee'=>$equipment_fee,
+ 'customs_shipping_fee'=>$customs_shipping_fee,
+ 'unloading_fee'=>$unloading_fee,
+ 'transport_site_fee'=>$transport_site_fee,
+ 'install_fee'=>$install_fee,
+ 'free1y_fee'=>$free1y_fee,
+ 'other_fee'=>$other_fee
+];
+echo json_encode($newMI);
diff --git a/wms/mkt/api/getElevatorPrice.php b/wms/mkt/api/getElevatorPrice.php
new file mode 100644
index 00000000..64b3098c
--- /dev/null
+++ b/wms/mkt/api/getElevatorPrice.php
@@ -0,0 +1,19 @@
+prepare($sql_str);
+$stmt->bindParam(':model', $model);
+$stmt->execute();
+$el = $stmt->fetch(PDO::FETCH_ASSOC);
+if($el){
+ $price = $el['price'];
+ $id = $el['id'];
+}else{
+ $price = null;
+ $id = null;
+}
+echo json_encode(['id'=>$id, 'price'=>$price]);
\ No newline at end of file
diff --git a/wms/mkt/api/getUsername.php b/wms/mkt/api/getUsername.php
new file mode 100644
index 00000000..d959b5aa
--- /dev/null
+++ b/wms/mkt/api/getUsername.php
@@ -0,0 +1,12 @@
+prepare($sql_str);
+$stmt->bindParam(':accountid', $accountid);
+$stmt->execute();
+$user = $stmt->fetch(PDO::FETCH_ASSOC);
+echo $user['name'];
\ No newline at end of file
diff --git a/wms/mkt/api/postNewElevatorPricereview.php b/wms/mkt/api/postNewElevatorPricereview.php
new file mode 100644
index 00000000..5ba7e342
--- /dev/null
+++ b/wms/mkt/api/postNewElevatorPricereview.php
@@ -0,0 +1,234 @@
+beginTransaction();
+
+try{
+
+ $sql_str = "INSERT INTO pricereview_main (contractno, ekind, person, company, case_name, address, compete, price_lowest, price_total, price_rate, special_fee, predeal_date, facilitok_date, penalty, deposit_rate, keep_rate, warranty_rate, memo, status, attatch1, attatch2, creater, create_at)
+ VALUES (:contractno, :ekind, :person, :company, :case_name, :address, :compete, :price_lowest, :price_total, :price_rate, :special_fee, :predeal_date, :facilitok_date, :penalty, :deposit_rate, :keep_rate, :warranty_rate, :memo, :status, :attatch1, :attatch2, :creater, :create_at)";
+ $stmt = $conn->prepare($sql_str);
+ $stmt->bindParam(':contractno', $contractno);
+ $stmt->bindParam(':ekind', $ekind);
+ $stmt->bindParam(':person', $person);
+ $stmt->bindParam(':company', $company);
+ $stmt->bindParam(':case_name', $case_name);
+ $stmt->bindParam(':address', $address);
+ $stmt->bindParam(':compete', $compete);
+ $stmt->bindParam(':price_lowest', $price_lowest);
+ $stmt->bindParam(':price_total', $price_total);
+ $stmt->bindParam(':price_rate', $price_rate);
+ $stmt->bindParam(':special_fee', $special_fee);
+ $stmt->bindParam(':predeal_date', $predeal_date);
+ $stmt->bindParam(':facilitok_date', $facilitok_date);
+ $stmt->bindParam(':penalty', $penalty);
+ $stmt->bindParam(':deposit_rate', $deposit_rate);
+ $stmt->bindParam(':keep_rate', $keep_rate);
+ $stmt->bindParam(':warranty_rate', $warranty_rate);
+ $stmt->bindParam(':memo', $memo);
+ $stmt->bindParam(':status', $status);
+ $stmt->bindParam(':attatch1', $attatch1);
+ $stmt->bindParam(':attatch2', $attatch2);
+ $stmt->bindParam(':creater', $creater);
+ $stmt->bindParam(':create_at', $create_at);
+ $stmt->execute();
+ $mid = $conn->lastInsertId();
+
+ //insert 整機單價
+ $sql_str = "INSERT INTO pricereview_item (mid, price_id, item_no, item_group, item_spec, item_weight, item_op, item_unit_price, item_qty, item_price_bp, item_price_ct, note)
+ VALUES (:mid, :price_id, :item_no, :item_group, :item_spec, :item_weight, :item_op, :item_unit_price, :item_qty, :item_price_bp, :item_price_ct, :note)";
+
+ foreach(json_decode($elevators, true) as $elevator){
+ $price_id = $elevator['facility_id'];
+ $item_no = $elevator['id'];
+ $item_group = "A";
+ $item_spec = $elevator['specifications'] . "-" . $elevator['person'] . "*" . $elevator['stop'] . "-" . $elevator['open_converted'] . $elevator['speed'];
+ $item_weight = "";
+ $item_op = $elevator['open_converted'];
+
+ $item_unit_price = $elevator['price'];
+ $item_qty = (int)$elevator['spec_num'];
+ $item_price_bp = (int)$elevator['price'] * (int)$elevator['spec_num'];
+ $item_price_ct = $elevator['spec_price'];
+ $note = $elevator['specifications'] . ',' . $elevator['person'] . ',' . $elevator['stop'] . ',' . $elevator['speed'];
+ $stmt = $conn->prepare($sql_str);
+ $stmt->bindParam(':mid', $mid);
+ $stmt->bindParam(':price_id', $price_id);
+ $stmt->bindParam(':item_no', $item_no);
+ $stmt->bindParam(':item_group', $item_group);
+ $stmt->bindParam(':item_spec', $item_spec);
+ $stmt->bindParam(':item_weight', $item_weight);
+ $stmt->bindParam(':item_op', $item_op);
+ $stmt->bindParam(':item_unit_price', $item_unit_price);
+ $stmt->bindParam(':item_qty', $item_qty);
+ $stmt->bindParam(':item_price_bp', $item_price_bp);
+ $stmt->bindParam(':item_price_ct', $item_price_ct);
+ $stmt->bindParam(':note', $note);
+ $stmt->execute();
+ }
+
+ //insert options 加價
+ $sql_str = "INSERT INTO pricereview_item (mid, price_id, item_no, item_group, item_spec, option_relate_spec, item_unit_price, item_qty, item_price_bp)
+ VALUES (:mid, :price_id, :item_no, :item_group, :item_spec, :option_relate_spec, :item_unit_price, :item_qty, :item_price_bp)";
+
+ foreach(json_decode($options, true) as $option){
+ $price_id = $option['id'];
+ $item_no = $option['key'] + 1;
+ $item_group = "B";
+ $item_spec = $option['name'] . $option['memo'];
+ $option_relate_spec = $option['toElevator'][0]['id'];
+ $item_unit_price = $option['price'];
+ $item_qty = $option['qty'];
+ $item_price_bp = $option['price'] * $option['qty'];
+
+ $stmt = $conn->prepare($sql_str);
+ $stmt->bindParam(':mid', $mid);
+ $stmt->bindParam(':price_id', $price_id);
+ $stmt->bindParam(':item_no', $item_no);
+ $stmt->bindParam(':item_group', $item_group);
+ $stmt->bindParam(':item_spec', $item_spec);
+ $stmt->bindParam(':option_relate_spec', $option_relate_spec);
+ $stmt->bindParam(':item_unit_price', $item_unit_price);
+ $stmt->bindParam(':item_qty', $item_qty);
+ $stmt->bindParam(':item_price_bp', $item_price_bp);
+ $stmt->execute();
+ }
+
+ //insert 除外項目
+ $sql_str = "INSERT INTO pricereview_item (mid, item_no, item_group, item_spec, option_relate_spec, item_unit_price, item_qty, item_price_bp)
+ VALUES (:mid, :item_no, :item_group, :item_spec, :option_relate_spec, :item_unit_price, :item_qty, :item_price_bp)";
+
+ foreach(json_decode($otherOptions, true) as $option){
+ $item_no = $option['id'] + 1;
+ $item_group = "E";
+ $item_spec = $option['name'];
+ $option_relate_spec = $option['toElevator'][0]['id'];
+ $item_unit_price = $option['price'];
+ $item_qty = $option['num'];
+ $item_price_bp = $option['price'] * $option['num'];
+
+ $stmt = $conn->prepare($sql_str);
+ $stmt->bindParam(':mid', $mid);
+ $stmt->bindParam(':item_no', $item_no);
+ $stmt->bindParam(':item_group', $item_group);
+ $stmt->bindParam(':item_spec', $item_spec);
+ $stmt->bindParam(':option_relate_spec', $option_relate_spec);
+ $stmt->bindParam(':item_unit_price', $item_unit_price);
+ $stmt->bindParam(':item_qty', $item_qty);
+ $stmt->bindParam(':item_price_bp', $item_price_bp);
+ $stmt->execute();
+ }
+
+ $sql_str = "INSERT INTO pricereview_item (mid, item_no, item_group, item_spec, option_relate_spec, item_unit_price, item_qty, item_price_bp)
+ VALUES (:mid, :item_no, :item_group, :item_spec, :option_relate_spec, :item_unit_price, :item_qty, :item_price_bp)";
+ //insert 保養延長
+ foreach(json_decode($maintainOptions, true) as $option){
+ $item_no = $option['id'] + 1;
+ $item_group = "D";
+ $item_spec = $option['toElevator'][0]['model'];
+ $option_relate_spec = $option['toElevator'][0]['id'];
+ $item_unit_price = $option['price'];
+ $item_qty = $option['num'];
+ $item_price_bp = $option['price'] * $option['num'];
+ $stmt = $conn->prepare($sql_str);
+ $stmt->bindParam(':mid', $mid);
+ $stmt->bindParam(':item_no', $item_no);
+ $stmt->bindParam(':item_group', $item_group);
+ $stmt->bindParam(':item_spec', $item_spec);
+ $stmt->bindParam(':option_relate_spec', $option_relate_spec);
+ $stmt->bindParam(':item_unit_price', $item_unit_price);
+ $stmt->bindParam(':item_qty', $item_qty);
+ $stmt->bindParam(':item_price_bp', $item_price_bp);
+ $stmt->execute();
+ }
+
+
+ $sql_str = "INSERT INTO pricereview_pay (mid, pay_kind, pay_scale, pay_amount, pay_period)
+ VALUES (:mid, :pay_kind, :pay_scale, :pay_amount, :pay_period)";
+
+ foreach(json_decode($paymentRatio, true) as $key=>$pay){
+ $pay_kind = $key +1;
+ $pay_scale = $pay['scale'] == '' ? 0 : $pay['scale'];
+ $pay_amount = $pay['scale']/100 * $price_total;
+ $pay_period = ($pay['scale'] == '' || $pay['scale'] == 0) ? '' :$pay['ticket'];
+ $stmt = $conn->prepare($sql_str);
+ $stmt->bindParam(':mid', $mid);
+ $stmt->bindParam(':pay_kind', $pay_kind);
+ $stmt->bindParam(':pay_scale', $pay_scale);
+ $stmt->bindParam(':pay_amount', $pay_amount);
+ $stmt->bindParam(':pay_period', $pay_period);
+ $stmt->execute();
+ }
+
+ $sql_str = "SELECT * FROM account WHERE accountid = :accountid";
+ $stmt = $conn->prepare($sql_str);
+ $stmt->bindParam(':accountid', $creater);
+ $stmt->execute();
+ $account = $stmt->fetch(PDO::FETCH_ASSOC);
+ $manager = $account['manager'];
+
+ $sign1 = "$manager,,"; //區處長
+ $sign2 = NULL; // 業務承辦人
+ $sign3 = "M0060,,"; //業務部協理
+
+ //是否呈核至總經理(M0006)
+ if($price_rate < 80 || $special_fee > 0){
+ $sign4 = "M0006,,";
+ $sign_total = 4;
+ }else{
+ $sign4 = NULL;
+ $sign_total = 3;
+ }
+
+ $sql_str = "INSERT INTO pricereview_sign (mid, sign1, sign2, sign3, sign4, sign_total)
+ VALUES (:mid, :sign1, :sign2, :sign3, :sign4, :sign_total)";
+ $stmt = $conn->prepare($sql_str);
+ $stmt->bindParam(':mid', $mid);
+ $stmt->bindParam(':sign1', $sign1);
+ $stmt->bindParam(':sign2', $sign2);
+ $stmt->bindParam(':sign3', $sign3);
+ $stmt->bindParam(':sign4', $sign4);
+ $stmt->bindParam(':sign_total', $sign_total);
+ $stmt->execute();
+
+
+ echo "success";
+
+ $conn->commit();
+}catch (PDOException $e) {
+ $conn->rollback();
+ echo $e->getMessage();
+ die('Error!:' . $e->getMessage());
+}
\ No newline at end of file
diff --git a/wms/mkt/api/postPricereviewSign.php b/wms/mkt/api/postPricereviewSign.php
new file mode 100644
index 00000000..2a72efa5
--- /dev/null
+++ b/wms/mkt/api/postPricereviewSign.php
@@ -0,0 +1,40 @@
+prepare($sql_str);
+ $stmt->bindParam(':sign', $sign_result);
+ $stmt->bindParam(':mid', $mid);
+ $stmt->bindParam(':reviewcomment', $reviewcomment);
+ $stmt->execute();
+
+ $sql_str = "UPDATE pricereview_main SET status=:status WHERE id = :id ";
+ $stmt = $conn->prepare($sql_str);
+ $stmt->bindParam(':status', $result);
+ $stmt->bindParam(':id', $mid);
+ $stmt->execute();
+
+ echo 1;
+}catch(PDOException $e){
+ echo $e->getMessage();
+}
diff --git a/wms/mkt/assets/js/pricereviewAlpine.js b/wms/mkt/assets/js/pricereviewAlpine.js
index db4e346b..c839c4b5 100644
--- a/wms/mkt/assets/js/pricereviewAlpine.js
+++ b/wms/mkt/assets/js/pricereviewAlpine.js
@@ -1,7 +1,882 @@
const pricereviewCreate = ()=>{
return {
init(){
- console.log(123)
- }
+ this.elevators = elevators;
+ console.log(this.elevators);
+ console.log(this.total_spec);
+ },
+
+ openFn:{
+ 4:'2U',
+ 5:"4PCO",
+ 7:"6PCO",
+ 8:"2S",
+ 9:"CO"
+ },
+ optionalArr: {
+ 1:'標配',
+ 2:'選配',
+ 3:'選配',
+ },
+ total_spec: total_spec,
+ options: options,
+ // orioptions: options,
+ searchtext: '',
+ kind: 1,
+ subkind: 1,
+ buttons: [],
+ modalSelectedOptions: {},
+ selectedOptions:[],
+ elevators: [],
+ toElevators:[],
+ toElevatorNo: '',
+ currentOptionKey: '',
+ currentOtherOptionKey: '',
+ currentMaintainOptionKey: '',
+ optionKey:0,
+ otherOptionKey:0,
+ maintainOptionKey:0,
+ modalElevatorInfo:{
+ spec:'',
+ person:'',
+ stop:'',
+ speed:'',
+ open:'CO',
+ num: 1,
+ price:'',
+ sale_price:'',
+ facility_id: '',
+ },
+ otherOptions: [],
+ modalOtherOptionInfo:{
+ pr_no:"",
+ name:"",
+ price: 0,
+ num:"",
+ },
+ maintainOptions:[],
+ modalMaintainInfo:{
+ price:0,
+ num:"",
+ memo:"",
+ },
+ paymentRatio:[
+ {
+ scale: 20,
+ ticket: 30,
+ },
+ {
+ scale: 0,
+ ticket: '',
+ },
+ {
+ scale: 50,
+ ticket: 30,
+ },
+ {
+ scale: 0,
+ ticket: '',
+ },
+ {
+ scale: 20,
+ ticket: 30,
+ },
+ {
+ scale: 10,
+ ticket: 30,
+ },
+ {
+ scale: 0,
+ ticket: '',
+ },
+ ],
+ serviceFee:0,
+ transactionDate: pre_order_date,
+ shippingDate:'',
+ remark:'',
+ async getElevatorPrice(idx){
+ const spec = this.elevators[idx].specifications
+ const person = this.elevators[idx].person
+ const stop = this.elevators[idx].stop
+ const open_converted = this.elevators[idx].open_converted
+ const speed = this.elevators[idx].speed
+ const model = spec + '-' + person + '*' + stop + '-' + open_converted + speed;
+ try{
+ const res = await axios.get("./api/getElevatorPrice.php", {params: {model: model}})
+ console.log(res.data);
+ if(res.data.id == null || res.data.id == ""){
+ console.log("公司並無提供此規格!!");
+ }
+ this.elevators[idx].price = res.data.price
+ this.elevators[idx].facility_id = res.data.id
+ }catch (error) {
+ console.error("Error fetching elevator price:", error);
+ }
+
+ },
+ async getModalElevatorPrice(){
+ let model = this.modalElevatorInfo.spec + '-' + this.modalElevatorInfo.person + '*' + this.modalElevatorInfo.stop + '-' + this.modalElevatorInfo.open + this.modalElevatorInfo.speed;
+ try{
+ const res = await axios.get("./api/getElevatorPrice.php", {params: {model: model}})
+ console.log(res.data);
+ if(res.data.id == null || res.data.id == ""){
+ console.log("公司並無提供此規格!!");
+ }
+ this.modalElevatorInfo.price = res.data.price
+ this.modalElevatorInfo.facility_id = res.data.id
+ }catch (error) {
+ console.error("Error fetching elevator price:", error);
+ }
+ },
+ initButtons(kind) {
+ if (kind == 'A') {
+ this.buttons = [
+ { name: '車廂意匠', type: 'A1' }
+ ]
+ } else if (kind == 'B') {
+ this.buttons = [
+ { name: '天井', type: 'B1' },
+ { name: '地板', type: 'B2' },
+ { name: '操縱盤', type: 'B3' },
+ { name: '扶手', type: 'B4' },
+ { name: '車廂門與層門(轎門/層門)', type: 'B5' },
+ { name: '轎壁(車廂側板)', type: 'B6' },
+ { name: '其他車廂內裝配件', type: 'B7' },
+ ]
+ } else if (kind == 'C') {
+ this.buttons = [
+ { name: '框', type: 'C1' },
+ { name: '乘場指示器', type: 'C2' },
+ { name: '燈', type: 'C3' },
+ { name: '方式與門', type: 'C4' },
+ ]
+ } else if (kind == 'D') {
+ this.buttons = [
+ { name: '功能與配置', type: 'D1' },
+ { name: 'OH與樓高', type: 'D2' },
+ ]
+ } else if (kind == 'E') {
+ this.buttons = [
+ { name: '平台梯', type: 'E1' },
+ ]
+ } else if (kind == 'F') {
+ this.buttons = [
+ { name: '汰改', type: 'F1' },
+ ]
+ } else if (kind == 1) {
+ this.buttons = []
+ }
+ },
+ optionSubCategory: 1,
+ initOptinos(){
+ this.options.forEach(option=>{
+ option.isShow = 1;
+ })
+ },
+ searchOptions(kind=this.kind, subkind=this.subkind){
+ if(kind!=null) this.kind = kind;
+ if(subkind!=null) this.subkind = subkind;
+ this.initOptinos();
+ this.initButtons(kind);
+ this.options.forEach(option=>{
+ if(option.kind != this.kind && this.kind != 1){
+ option.isShow = 0;
+ }else{
+ if(option.subkind != this.subkind && this.subkind != 1){
+ option.isShow = 0;
+ }
+ }
+ if(option.isShow == 1){
+ if(option.group_name == null) option.group_name = ''
+ if(option.spec == null) option.spec = ''
+ if(option.memo == null) option.memo = ''
+ if(option.price == null) option.price = 0
+ if(option.unit == null) option.unit = ''
+ if(String(option.id).includes(this.searchtext) || option.group_name.includes(this.searchtext) || option.memo.toLowerCase().includes(this.searchtext) || option.spec.toLowerCase().includes(this.searchtext) || option.unit.includes(this.searchtext) || String(option.price).includes(this.searchtext)){
+ option.isShow = 1
+ }else{
+ option.isShow = 0
+ }
+ }
+ })
+ },
+ selectOption(idx, id, name, price, memo){
+ this.options[idx].selected = this.options[idx].selected==1 ? 0 : 1;
+
+ if(this.modalSelectedOptions.hasOwnProperty(idx)){
+ delete this.modalSelectedOptions[idx];
+ }else{
+ //this.optionKey => 已選option 流水號, idx:option表內的流水號, id:option 資料庫的ID
+ this.modalSelectedOptions[idx] = {key:this.optionKey, 'idx':idx, 'id': id, 'name': name, 'price': price, qty:1, 'memo': memo, 'toElevator':[] }
+ }
+ this.optionKey ++;
+ },
+ initModalSelectedOptions(){
+ this.modalSelectedOptions = {}
+ this.options.forEach(option=>{
+ option.selected = 0
+ })
+ this.$refs.optionsModal.style.display = "block"
+ body.style.overflow = 'hidden'
+ },
+ chkOptions(){
+ Object.keys(this.modalSelectedOptions).forEach(option=>{
+ this.selectedOptions.push(this.modalSelectedOptions[option])
+ })
+ console.log(this.modalSelectedOptions);
+ console.log(this.selectedOptions);
+ this.hideOptionsModal();
+ },
+ hideOptionsModal(){
+ this.$refs.optionsModal.style.display = 'none';
+ body.style.overflow = 'auto'
+ },
+ hideToElevatorModal(){
+ this.$refs.toElevatorModal.style.display = 'none';
+ body.style.overflow = 'auto'
+ },
+ hideToOtherOptionElevatorModal(){
+ this.$refs.toOtherOptionElevatorModal.style.display = 'none';
+ body.style.overflow = 'auto'
+ },
+ hideToMaintainOptionElevatorModal(){
+ this.$refs.toMaintainOptionElevatorModal.style.display = 'none';
+ body.style.overflow = 'auto'
+ },
+ hideCreateElevatorModal(){
+ this.$refs.createElevatorModal.style.display = 'none';
+ body.style.overflow = 'auto'
+ this.modalElevatorInfo = {
+ spec:'',
+ person:'',
+ stop:'',
+ speed:'',
+ open:'CO',
+ num: 1,
+ price:'',
+ sale_price:'',
+ };
+ },
+ hideCreateOtherOptionModal(){
+ this.$refs.createOtherOptionModal.style.display = 'none';
+ body.style.overflow = 'auto'
+ },
+ hideCreateMaintainModal(){
+ this.$refs.createMaintainModal.style.display = 'none';
+ body.style.overflow = 'auto'
+ },
+ openCreateElevatorModal(){
+ this.$refs.createElevatorModal.style.display = 'block';
+ body.style.overflow = 'hidden'
+ },
+ openCreateOtherOptionFn(){
+ this.$refs.createOtherOptionModal.style.display = 'block';
+ body.style.overflow = 'hidden'
+ },
+ openCreateMaintainModal(){
+ this.$refs.createMaintainModal.style.display = 'block';
+ body.style.overflow = 'hidden'
+ },
+ totalElevatorsPrice(){
+ return this.elevators.reduce((total, elevator) => {
+ return total + (elevator.spec_num * elevator.price);
+ }, 0);
+ },
+ totalElevatorsNum(){
+ return this.elevators.reduce((total, elevator) => {
+ return total + Number(elevator.spec_num);
+ }, 0)
+ },
+ totalElevatorsSalePrice(){
+ return this.elevators.reduce((total, elevator) => {
+ return total + (elevator.spec_num * elevator.spec_price);
+ }, 0);
+ },
+ totalOptionsPrice(){
+ return this.selectedOptions.reduce((total, option) => {
+ return total + (option.qty * option.price);
+ }, 0);
+ },
+ openAddElevatorFn(){
+
+ },
+ createElevatorFn(){
+ if(this.modalElevatorInfo.spec == '') return alert("請選擇電梯規格");
+ if(this.modalElevatorInfo.stop == '') return alert("請填入停數");
+ if(this.modalElevatorInfo.speed == '') return alert("請選擇速度");
+ if(this.modalElevatorInfo.open == '') return alert("請選擇開梯方式");
+ if(this.modalElevatorInfo.person == '') return alert("請填入人乘/載重");
+ if(this.modalElevatorInfo.num == '') return alert("請填入數量");
+ if(this.modalElevatorInfo.sale_price == '') return alert("請填入售價");
+ this.total_spec ++;
+ this.elevators.push({
+ id: this.total_spec,
+ specifications: this.modalElevatorInfo.spec,
+ person: this.modalElevatorInfo.person,
+ stop: this.modalElevatorInfo.stop,
+ speed: this.modalElevatorInfo.speed,
+ open_converted: this.modalElevatorInfo.open,
+ spec_price: this.modalElevatorInfo.sale_price,
+ price: this.modalElevatorInfo.price,
+ open:'',
+ spec_num: this.modalElevatorInfo.num,
+ facility_id: this.modalElevatorInfo.facility_id,
+ });
+ console.log(this.elevators);
+ this.hideCreateElevatorModal();
+ },
+ copyElevator(idx){
+ const spec = this.elevators[idx].specifications
+ const person = this.elevators[idx].person
+ const stop = this.elevators[idx].stop
+ const open_converted = this.elevators[idx].open_converted
+ const speed = this.elevators[idx].speed
+ const spec_price = this.elevators[idx].spec_price
+ const open = this.elevators[idx].open
+ const spec_num = this.elevators[idx].spec_num
+ const price = this.elevators[idx].price
+ const facility_id = this.elevators[idx].facility_id
+
+ this.total_spec ++;
+ this.elevators.push({
+ id: this.total_spec,
+ specifications: spec,
+ person: person,
+ stop: stop,
+ speed: speed,
+ open_converted: open_converted,
+ spec_price: spec_price,
+ price: price,
+ open: open,
+ spec_num: spec_num,
+ facility_id: facility_id,
+ });
+ console.log(this.elevators);
+ },
+ addOptionToElevator(key){
+ this.currentOptionKey = key;
+ this.toElevators = [];
+ this.toElevatorNo = "";
+ const matchElevators = this.selectedOptions.filter(option=> option.key == key)[0].toElevator.map(elevator=> elevator.id)
+ console.log(matchElevators);
+ this.toElevatorNo = matchElevators[0]
+ this.elevators.forEach(elevator=>{
+ if(elevator.price > 0){
+ this.toElevators.push({
+ id: elevator.id,
+ model: elevator.specifications + '-' + elevator.person + '*' + elevator.stop + '-' + elevator.open_converted + elevator.speed,
+ checked: matchElevators.includes(elevator.id) ? 1: 0,
+ })
+ }
+ })
+ this.$refs.toElevatorModal.style.display = 'block';
+ body.style.overflow = 'hidden'
+ },
+ addOtherOptionToElevator(id){
+ this.currentOtherOptionKey = id;
+ this.toElevators = [];
+ this.toElevatorNo = "";
+ const matchElevators = this.otherOptions.filter(option=> option.id == id)[0].toElevator.map(elevator=> elevator.id)
+ this.toElevatorNo = matchElevators[0]
+ this.elevators.forEach(elevator=>{
+ if(elevator.price > 0){
+ this.toElevators.push({
+ id: elevator.id,
+ model: elevator.specifications + '-' + elevator.person + '*' + elevator.stop + '-' + elevator.open_converted + elevator.speed,
+ checked: matchElevators.includes(elevator.id) ? 1: 0,
+ })
+ }
+ })
+ this.$refs.toOtherOptionElevatorModal.style.display = 'block';
+ body.style.overflow = 'hidden'
+ },
+ chkOptionToElevators(){
+ const checkedOptions = [];
+ // this.toElevators.forEach(elevator=>{
+ // if(elevator.checked){
+ // checkedOptions.push({
+ // id: elevator.id,
+ // model: elevator.model,
+ // });
+ // }
+ // })
+ const matchElevators = this.elevators.filter(elevator=> elevator.id == this.toElevatorNo)[0]
+ checkedOptions.push({
+ id: this.toElevatorNo,
+ model: matchElevators['specifications'] + '-' + matchElevators['person'] + '*' + matchElevators['stop'] + '-' + matchElevators['open_converted'] + matchElevators['speed'],
+ })
+ this.selectedOptions.forEach(option=>{
+ if(option.key == this.currentOptionKey){
+ option.toElevator = [];
+ option.toElevator.push(...checkedOptions)
+ }
+ })
+ this.currentOptionKey = ''
+ this.hideToElevatorModal();
+ },
+ chkOtherOptionToElevators(){
+ const checkedOptions = [];
+ // this.toElevators.forEach(elevator=>{
+ // if(elevator.checked){
+ // checkedOptions.push({
+ // id: elevator.id,
+ // model: elevator.model,
+ // });
+ // }
+ // })
+ const matchElevators = this.elevators.filter(elevator=> elevator.id == this.toElevatorNo)[0]
+ checkedOptions.push({
+ id: this.toElevatorNo,
+ model: matchElevators['specifications'] + '-' + matchElevators['person'] + '*' + matchElevators['stop'] + '-' + matchElevators['open_converted'] + matchElevators['speed'],
+ })
+ this.otherOptions.forEach(option=>{
+ if(option.id == this.currentOtherOptionKey){
+ option.toElevator = [];
+ option.toElevator.push(...checkedOptions)
+ }
+ })
+
+ this.currentOtherOptionKey = ''
+
+ this.hideToOtherOptionElevatorModal();
+ },
+ removeElevator(id){
+ if(!confirm("確定刪除嗎?")) return;
+ this.elevators = this.elevators.filter(elevator=> elevator.id != id)
+ const issetElevators = [];
+ this.elevators.forEach(elevator=>{
+ issetElevators.push(elevator.id);
+ })
+
+ this.selectedOptions.forEach(option=>{
+ option.toElevator = option.toElevator.filter(el=>{
+ return issetElevators.includes(el.id)
+ })
+ })
+ console.log(this.selectedOptions);
+ },
+ removeOption(key){
+ console.log(this.selectedOptions);
+ this.selectedOptions = this.selectedOptions.filter(option=> option.key != key)
+ },
+ removeOtherOption(id){
+ this.otherOptions = this.otherOptions.filter(option=> option.id != id)
+ },
+ createOtherOptionFn(){
+ this.otherOptions.push({
+ id: this.otherOptionKey,
+ pr_no: this.modalOtherOptionInfo.pr_no,
+ name: this.modalOtherOptionInfo.name,
+ price: this.modalOtherOptionInfo.price,
+ num: this.modalOtherOptionInfo.num,
+ toElevator:[],
+ })
+ this.modalOtherOptionInfo = {
+ pr_no: '',
+ name: '',
+ price: 0,
+ num: '',
+ }
+ this.otherOptionKey ++;
+ this.hideCreateOtherOptionModal();
+ },
+ totalOtherOptionsPrice(){
+ return this.otherOptions.reduce((total, option) => {
+ return total + (Number(option.num) * Number(option.price));
+ }, 0);
+ },
+ totalOtherOptionsNum(){
+ return this.otherOptions.reduce((total, option) => {
+ return total + Number(option.num);
+ }, 0);
+ },
+ createMaintainOptionFn(){
+ this.maintainOptions.push({
+ id: this.maintainOptionKey,
+ price: this.modalMaintainInfo.price,
+ num: this.modalMaintainInfo.num,
+ memo: this.modalMaintainInfo.memo,
+ toElevator:[],
+ })
+ this.modalMaintainInfo = {
+ price:0,
+ num:"",
+ memo:"",
+ }
+ this.maintainOptionKey ++;
+ this.hideCreateMaintainModal();
+ },
+ totalMaintainOptionsPrice(){
+ return this.maintainOptions.reduce((total, option) => {
+ return total + (Number(option.num) * Number(option.price));
+ }, 0);
+ },
+ totalMaintainOptionsNum(){
+ return this.maintainOptions.reduce((total, option) => {
+ return total + Number(option.num);
+ }, 0);
+ },
+ chkMaintainOptionToElevators(){
+ const checkedOptions = [];
+ // this.toElevators.forEach(elevator=>{
+ // if(elevator.checked){
+ // checkedOptions.push({
+ // id: elevator.id,
+ // model: elevator.model,
+ // });
+ // }
+ // })
+ const matchElevators = this.elevators.filter(elevator=> elevator.id == this.toElevatorNo)[0]
+ checkedOptions.push({
+ id: this.toElevatorNo,
+ model: matchElevators['specifications'] + '-' + matchElevators['person'] + '*' + matchElevators['stop'] + '-' + matchElevators['open_converted'] + matchElevators['speed'],
+ })
+ this.maintainOptions.forEach(option=>{
+ if(option.id == this.currentMaintainOptionKey){
+ option.toElevator = [];
+ option.toElevator.push(...checkedOptions)
+ }
+ })
+ this.currentMaintainOptionKey = ''
+ this.hideToMaintainOptionElevatorModal();
+ },
+ addMaintainOptionToElevator(id){
+ this.currentMaintainOptionKey = id;
+ this.toElevators = [];
+ this.toElevatorNo = "";
+ const matchElevators = this.maintainOptions.filter(option=> option.id == id)[0].toElevator.map(elevator=> elevator.id)
+ this.toElevatorNo = matchElevators[0]
+ this.elevators.forEach(elevator=>{
+ if(elevator.price > 0){
+ this.toElevators.push({
+ id: elevator.id,
+ model: elevator.specifications + '-' + elevator.person + '*' + elevator.stop + '-' + elevator.open_converted + elevator.speed,
+ checked: matchElevators.includes(elevator.id) ? 1: 0,
+ })
+ }
+ })
+
+ this.$refs.toMaintainOptionElevatorModal.style.display = 'block';
+ body.style.overflow = 'hidden'
+ },
+ removeMaintainOption(id){
+ this.maintainOptions = this.maintainOptions.filter(option=> option.id != id)
+ },
+ totalPrice(){
+ return this.totalElevatorsPrice() + this.totalOptionsPrice() + this.totalOtherOptionsPrice() + this.totalMaintainOptionsPrice();
+ },
+ totalSalePrice(){
+ return this.elevators.reduce((total, elevator) => {
+ return total + (elevator.spec_num * elevator.spec_price);
+ }, 0);
+ },
+ scalePrice(scale){
+ if(scale === '') return 0;
+ return this.totalSalePrice() * scale / 100;
+ },
+ totalScale(){
+ let total = 0;
+ Object.keys(this.paymentRatio).forEach(pay=>{
+ if(this.paymentRatio[pay].scale != '' && this.paymentRatio[pay].scale > 0){
+ total += Number(this.paymentRatio[pay].scale)
+ }
+ })
+
+ return total;
+ },
+ customerInfo:{
+ contractno: contractno,
+ company: customer,
+ manager: manager,
+ address: address,
+ case_name: case_name,
+ uscc: uscc,
+ person: salesman,
+ },
+ penalty:"",
+ deposit_rate:0,
+ keep_rate:0,
+ warranty_rate:0,
+ error: [],
+ submit(){
+ this.error = []
+ for(let i=0;i 0){
+ let errortext = '';
+ this.error.forEach(err=>{
+ errortext += err+'\n';
+ })
+ alert(errortext)
+ return;
+ }
+
+ const form = new FormData();
+ form.append('contractno', contractno);
+ form.append('ekind', "新梯");
+ form.append('person', this.customerInfo.person);
+ form.append('company', this.customerInfo.company);
+ form.append('case_name', this.customerInfo.case_name);
+ form.append('address', this.customerInfo.address);
+ form.append('price_lowest', this.totalPrice());
+ form.append('price_total', this.totalSalePrice());
+ form.append('price_rate', Math.round(this.totalSalePrice() / this.totalPrice() * 100 *10) / 10);
+ form.append('special_fee', this.serviceFee);
+ form.append('predeal_date', this.transactionDate);
+ form.append('facilitok_date', this.shippingDate);
+ form.append('penalty', this.penalty);
+ form.append('deposit_rate', this.deposit_rate);
+ form.append('keep_rate', this.keep_rate);
+ form.append('warranty_rate', this.warranty_rate);
+ form.append('memo', this.remark);
+ form.append('status', "YS");
+ form.append('attatch1', "");
+ form.append('attatch2', "");
+
+
+ form.append('elevators', JSON.stringify(this.elevators));
+
+ form.append('options', JSON.stringify(this.selectedOptions));
+ form.append('otherOptions', JSON.stringify(this.otherOptions));
+ form.append('maintainOptions', JSON.stringify(this.maintainOptions));
+
+ form.append('paymentRatio', JSON.stringify(this.paymentRatio));
+
+ axios.post('./api/postNewElevatorPricereview.php', form).then(res=>{
+ console.log(res.data);
+ if(res.data == "success"){
+ alert("送審成功!");
+ window.location.href = './pricereview-index.php?' + token_link;
+ }
+ }).catch(err=>{
+ console.error(err);
+ })
+ },
+
+ }
+}
+
+
+const pricereviewCheck = ()=>{
+ return {
+ init(){
+ this.elevators = items.filter(item=> item.item_group =='A');
+ this.elevators.forEach(el=>{
+ el.options = []
+ el.optionsTotalPrice = 0;
+ el.otherOptions = []
+ el.otherOptionsTotalPrice = 0;
+ el.maintainOptions = []
+ el.maintainOptionsTotalPrice = 0;
+ })
+ this.options = options;
+ this.otherOptions = items.filter(item=> item.item_group =='E');
+ this.maintainOptions = items.filter(item=> item.item_group =='D');
+ console.log(this.options);
+
+ this.elevators.forEach((elevator, idx)=>{
+
+ this.options.forEach(option=>{
+ if(option.option_relate_spec == elevator.item_no){
+ elevator.optionsTotalPrice += option.option_mi * option.item_qty
+ this.elevators[idx].options.push({
+ 'id': option.id, //<br>()
+ 'item_spec': option.item_spec.trim().replaceAll('&', '').replaceAll('lt;', '').replaceAll('br', '').replaceAll('gt;', '').replaceAll('()', ''),
+ 'item_unit_price': option.item_unit_price,
+ 'item_qty': option.item_qty,
+ 'mi': Math.round(option.option_mi),
+ })
+ }
+ })
+
+ this.otherOptions.forEach(option=>{
+ if(option.option_relate_spec == elevator.item_no){
+ elevator.otherOptionsTotalPrice += option.item_unit_price * option.item_qty
+ this.elevators[idx].otherOptions.push({
+ 'id': option.id,
+ 'item_spec': option.item_spec.trim(),
+ 'item_unit_price': option.item_unit_price,
+ 'item_qty': option.item_qty,
+ 'mi': Math.round(option.item_unit_price),
+ })
+ }
+ })
+
+ this.maintainOptions.forEach(option=>{
+ if(option.option_relate_spec == elevator.item_no){
+ elevator.maintainOptionsTotalPrice += option.item_unit_price * option.item_qty
+ this.elevators[idx].maintainOptions.push({
+ 'id': option.id,
+ 'item_spec': option.item_spe.trim(),
+ 'item_unit_price': option.item_unit_price,
+ 'item_qty': option.item_qty,
+ 'mi': Math.round(option.item_unit_price),
+ })
+ }
+ })
+ this.qty += Number(elevator.item_qty);
+ this.elevators_total_price += Number(elevator.item_qty) * Number(elevator.item_unit_price);
+ //MAE100-15*24-CO105
+ const model = elevator.item_spec;
+ let spec = model.split('-')[0];
+ let person = model.split('-')[1].split('*')[0];
+ let stop = model.split('-')[1].split('*')[1].split('-')[0];
+ let open = model.split('-')[2];
+ let speed = '';
+ for(let i=0;i',res.data);
+ if(res.data){
+ this.elevators[idx].mi = res.data
+ this.elevators[idx].totalMi = res.data['equipment_fee'] + res.data['customs_shipping_fee'] + res.data['free1y_fee'] + res.data['install_fee'] + res.data['other_fee'] + res.data['transport_site_fee'] + res.data['unloading_fee'];
+ }else{
+ this.isNotfoundMi = true;
+ this.elevators[idx].mi = {
+ 'equipment_fee': 0,
+ 'customs_shipping_fee': 0,
+ 'free1y_fee': 0,
+ 'install_fee': 0,
+ 'other_fee': 0,
+ 'transport_site_fee': 0,
+ 'unloading_fee': 0
+ }
+ }
+
+
+ console.log(this.elevators[idx]);
+
+ }catch (error) {
+ console.error("Error fetching elevator price:", error);
+ }
+ },
+ isNotfoundMi:false,
+ openFn:[
+ 'CO', '2S', '2U', '4PCO', '6PCO'
+ ],
+ sign1:'',
+ sign2:'',
+ sign3:'',
+ sign4:'',
+ is_renovate: false,
+ elevators_total_price: 0,
+ contractno: contractno,
+ person_name: person_name,
+ company: company,
+ case_name: case_name,
+ address: address,
+ price_lowest: price_lowest,
+ price_total: price_total,
+ special_fee: special_fee,
+ predeal_date: predeal_date,
+ facilitok_date: facilitok_date,
+ penalty: penalty,
+ deposit_rate: deposit_rate,
+ keep_rate: keep_rate,
+ warranty_rate: warranty_rate,
+ memo: memo,
+ qty: 0,
+ pays: pays,
+ elevators:[],
+ options: [],
+ otherOptions: [],
+ maintainOptions: [],
+ mid: mid,
+ user_id: user_id,
+ reviewcomment:'',
+ optionsTotalPrice(){
+ return this.options.reduce((total, option) => {
+ return total + (option.item_qty * option.item_unit_price);
+ }, 0);
+ },
+ otherOptionsTotalPrice(){
+ return this.otherOptions.reduce((total, option) => {
+ return total + (option.item_qty * option.item_unit_price);
+ }, 0);
+ },
+ maintainOptionsTotalPrice(){
+ return this.maintainOptions.reduce((total, option) => {
+ return total + (option.item_qty * option.item_unit_price);
+ }, 0);
+ },
+ totalScale(){
+ return this.pays.reduce((total, option) => {
+ return total + Number(option.pay_scale );
+ }, 0);
+ },
+ check(sign, status){
+ console.log(sign);
+ const form = new FormData();
+ form.append('sign', sign);
+ form.append('mid', this.mid);
+ form.append('result', status);
+ form.append('user_id', this.user_id);
+ form.append('reviewcomment', this.reviewcomment);
+ axios.post('./api/postPricereviewSign.php', form).then(res=>{
+ console.log(res.data);
+ if(res.data == 1){
+ alert("簽核成功!");
+ window.location.reload()
+ }
+ })
+ },
+ async getUsername(user_id){
+ if(user_id == '') return '---'
+ const res = await axios.get('./api/getUsername.php', {params: {user_id: user_id}})
+ return res.data ;
+ },
}
}
\ No newline at end of file
diff --git a/wms/mkt/css/pricereview.css b/wms/mkt/css/pricereview.css
index 13638fdf..5986f447 100644
--- a/wms/mkt/css/pricereview.css
+++ b/wms/mkt/css/pricereview.css
@@ -1,29 +1,51 @@
-#pricereviewCreate table, #pricereviewCreate th, #pricereviewCreate td {
+#pricereviewCreate input[type=text], #pricereviewCreate input[type=number], #pricereviewCreate select {
+ margin: 1px;
+}
+#pricereviewCreate textarea {
+ resize: vertical;
+}
+#pricereviewCreate > .modal {
+ padding: 20px;
+}
+#pricereviewCreate > .modal table, #pricereviewCreate > .modal th, #pricereviewCreate > .modal td {
+ border: 1px #ccc solid;
+}
+#pricereviewCreate > .modal table > thead tr th {
+ color: #A52A2A;
+}
+#pricereviewCreate > .modal table > tbody .selected {
+ background-color: #E7FEFB;
+}
+#pricereviewCreate .container table, #pricereviewCreate .container th, #pricereviewCreate .container td {
border: 1px #ccc solid;
padding: 15px;
}
-#pricereviewCreate table thead th {
+#pricereviewCreate .container table.noborder, #pricereviewCreate .container table .noborder th, #pricereviewCreate .container table .noborder td, #pricereviewCreate .container th.noborder, #pricereviewCreate .container th .noborder th, #pricereviewCreate .container th .noborder td, #pricereviewCreate .container td.noborder, #pricereviewCreate .container td .noborder th, #pricereviewCreate .container td .noborder td {
+ border: none;
+}
+#pricereviewCreate .container table thead th {
background-color: #6D9EEB;
}
-#pricereviewCreate table tbody td input {
+#pricereviewCreate .container table tbody td input {
font-size: 14px;
}
-#pricereviewCreate table tbody th {
+#pricereviewCreate .container table tbody th {
background-color: #CCE4F8;
font-size: 14px;
padding: 15px 2px;
min-width: 100px;
text-align: center;
}
-#pricereviewCreate table input {
+#pricereviewCreate .container table input {
font-size: 13px;
}
-#pricereviewCreate .pricreviewmain {
+#pricereviewCreate .container .pricreviewmain {
background-color: #F2F2F2;
padding: 20px;
border-radius: 6px;
+ margin: 30px 0;
}
-#pricereviewCreate .pricreviewmain button {
+#pricereviewCreate .container .pricreviewmain button {
color: #fff;
width: 55px;
height: 30px;
@@ -31,60 +53,244 @@
margin-left: 10px;
font-size: 13px;
}
-#pricereviewCreate .pricreviewmain button.addbtn {
+#pricereviewCreate .container .pricreviewmain button.addbtn {
background-color: #337AB7;
width: 30px;
}
-#pricereviewCreate .pricreviewmain button.deleteBtn {
+#pricereviewCreate .container .pricreviewmain button.deleteBtn {
background-color: #D9534F;
color: #fff;
font-size: 12px;
width: 30px;
}
-#pricereviewCreate .pricreviewmain button.selectElevator {
+#pricereviewCreate .container .pricreviewmain button.selectElevator {
background-color: #D9534F;
color: #fff;
}
-#pricereviewCreate .pricreviewmain > .divitem {
+#pricereviewCreate .container .pricreviewmain > .divitem {
border: 1px #ccc solid;
padding: 10px;
border-radius: 4px;
}
-#pricereviewCreate .pricreviewmain > .divitem .title {
+#pricereviewCreate .container .pricreviewmain > .divitem .title {
display: flex;
align-items: center;
border-bottom: 1px #ccc solid;
padding: 10px 0;
margin-bottom: 10px;
}
-#pricereviewCreate .pricreviewmain > .divitem .title h6 {
+#pricereviewCreate .container .pricreviewmain > .divitem .title h6 {
font-weight: 600;
}
-#pricereviewCreate .pricreviewmain > .divitem table, #pricereviewCreate .pricreviewmain > .divitem th, #pricereviewCreate .pricreviewmain > .divitem td {
+#pricereviewCreate .container .pricreviewmain > .divitem table, #pricereviewCreate .container .pricreviewmain > .divitem th, #pricereviewCreate .container .pricreviewmain > .divitem td {
font-size: 14px;
background-color: transparent;
}
-#pricereviewCreate .pricreviewmain > .divitem table input, #pricereviewCreate .pricreviewmain > .divitem table select, #pricereviewCreate .pricreviewmain > .divitem table textarea, #pricereviewCreate .pricreviewmain > .divitem th input, #pricereviewCreate .pricreviewmain > .divitem th select, #pricereviewCreate .pricreviewmain > .divitem th textarea, #pricereviewCreate .pricreviewmain > .divitem td input, #pricereviewCreate .pricreviewmain > .divitem td select, #pricereviewCreate .pricreviewmain > .divitem td textarea {
+#pricereviewCreate .container .pricreviewmain > .divitem table input, #pricereviewCreate .container .pricreviewmain > .divitem table select, #pricereviewCreate .container .pricreviewmain > .divitem table textarea, #pricereviewCreate .container .pricreviewmain > .divitem th input, #pricereviewCreate .container .pricreviewmain > .divitem th select, #pricereviewCreate .container .pricreviewmain > .divitem th textarea, #pricereviewCreate .container .pricreviewmain > .divitem td input, #pricereviewCreate .container .pricreviewmain > .divitem td select, #pricereviewCreate .container .pricreviewmain > .divitem td textarea {
font-size: 13px;
}
-#pricereviewCreate .pricreviewmain > .divitem table input[type=number]::-webkit-outer-spin-button,
-#pricereviewCreate .pricreviewmain > .divitem table input[type=number]::-webkit-inner-spin-button, #pricereviewCreate .pricreviewmain > .divitem th input[type=number]::-webkit-outer-spin-button,
-#pricereviewCreate .pricreviewmain > .divitem th input[type=number]::-webkit-inner-spin-button, #pricereviewCreate .pricreviewmain > .divitem td input[type=number]::-webkit-outer-spin-button,
-#pricereviewCreate .pricreviewmain > .divitem td input[type=number]::-webkit-inner-spin-button {
+#pricereviewCreate .container .pricreviewmain > .divitem table input[type=number]::-webkit-outer-spin-button,
+#pricereviewCreate .container .pricreviewmain > .divitem table input[type=number]::-webkit-inner-spin-button, #pricereviewCreate .container .pricreviewmain > .divitem th input[type=number]::-webkit-outer-spin-button,
+#pricereviewCreate .container .pricreviewmain > .divitem th input[type=number]::-webkit-inner-spin-button, #pricereviewCreate .container .pricreviewmain > .divitem td input[type=number]::-webkit-outer-spin-button,
+#pricereviewCreate .container .pricreviewmain > .divitem td input[type=number]::-webkit-inner-spin-button {
-webkit-appearance: none;
margin: 0;
}
-#pricereviewCreate .pricreviewmain > .divitem table tr:hover .deleteBtn {
+#pricereviewCreate .container .pricreviewmain > .divitem table tr:hover .deleteBtn, #pricereviewCreate .container .pricreviewmain > .divitem table tr:hover .copyBtn {
opacity: 1;
}
-#pricereviewCreate .pricreviewmain > .divitem table .saletd {
+#pricereviewCreate .container .pricreviewmain > .divitem table .saletd {
position: relative;
}
-#pricereviewCreate .pricreviewmain > .divitem table .saletd > .deleteBtn {
+#pricereviewCreate .container .pricreviewmain > .divitem table .saletd > .deleteBtn {
position: absolute;
top: 50%;
transform: translateY(-50%);
right: 2px;
opacity: 0;
transition: 0.3s;
+}
+#pricereviewCreate .container .pricreviewmain > .divitem table .saletd > .copyBtn {
+ position: absolute;
+ top: 50%;
+ transform: translateY(-50%);
+ right: 38px;
+ opacity: 0;
+ transition: 0.3s;
+ width: 30px;
+ height: 30px;
+}
+#pricereviewCreate .container .pricreviewmain > .divitem table textarea {
+ height: auto;
+ min-height: 50px;
+}
+#pricereviewCreate .container .pricreviewmain > .filediv {
+ display: flex;
+ flex-direction: column;
+ margin-top: 20px;
+}
+#pricereviewCreate .container .pricreviewmain > .filediv label {
+ display: flex;
+ align-items: center;
+ margin: 10px 0;
+}
+#pricereviewCreate .container .pricreviewmain > .filediv label p {
+ width: 100px;
+ font-size: 15px;
+ font-weight: 600;
+}
+#pricereviewCreate .container .pricreviewmain > .filediv label input[type=file] {
+ width: 400px;
+}
+#pricereviewCreate .container .pricreviewmain > .filediv label button {
+ width: 90px;
+ height: 35px;
+ margin: 0;
+ margin-right: 15px;
+ margin-top: 20px;
+}
+
+.container-fluid, .container {
+ max-width: 1400px !important;
+ width: 100%;
+}
+.container-fluid h4, .container h4 {
+ font-weight: 600;
+}
+.container-fluid .btn-secondary, .container .btn-secondary {
+ background-color: #6C757D;
+}
+
+.window-modal {
+ position: fixed;
+ top: 0;
+ left: 0;
+ width: 100%;
+ height: 100vh;
+ background-color: rgba(0, 0, 0, 0.5);
+ z-index: 9;
+ padding: 20px;
+ display: none;
+}
+@keyframes fade-in {
+ 0% {
+ transform: translate(-50%, -60%);
+ opacity: 0;
+ }
+ 100% {
+ transform: translate(-50%, -55%);
+ opacity: 1;
+ }
+}
+.window-modal table, .window-modal th, .window-modal td {
+ border: 1px #ccc solid;
+}
+.window-modal table > thead tr th {
+ color: #A52A2A;
+}
+.window-modal table > tbody .selected {
+ background-color: #E7FEFB;
+}
+.window-modal#optionModal .window-modal-content {
+ max-height: 80vh;
+}
+.window-modal#optionModal .window-modal-content .window-modal-body {
+ height: 400px;
+ overflow-y: scroll;
+}
+.window-modal#toElevatorModal .window-modal-content {
+ min-height: 270px;
+ height: auto;
+}
+.window-modal#toElevatorModal .window-modal-content .window-modal-body {
+ height: auto;
+}
+.window-modal .window-modal-content {
+ z-index: 9;
+ background-color: #fff;
+ border-radius: 10px;
+ position: absolute;
+ width: 1200px;
+ padding: 30px;
+ top: 50%;
+ left: 50%;
+ transform: translate(-50%, -55%);
+ box-shadow: 0 5px 5px #222;
+ animation: fade-in 0.2s linear;
+}
+.window-modal .window-modal-content.modal-xl {
+ width: 1200px;
+}
+.window-modal .window-modal-content.modal-lg {
+ width: 800px;
+}
+.window-modal .window-modal-content.modal-m {
+ width: 450px;
+}
+.window-modal .window-modal-content .window-modal-header {
+ display: flex;
+ flex-direction: column;
+}
+.window-modal .window-modal-content .window-modal-header button.btn-close {
+ position: absolute;
+ top: 10px;
+ right: 10px;
+ background-color: transparent;
+ border: none;
+ outline: none;
+ border-radius: 50%;
+}
+.window-modal .window-modal-content .window-modal-header > div > input {
+ width: 250px;
+}
+.window-modal .window-back {
+ position: absolute;
+ top: 0;
+ left: 0;
+ width: 100%;
+ height: 100%;
+ background-color: transparent;
+}
+
+#pricereviewCheck > .container {
+ background-color: #F2F2F2;
+ border-radius: 15px;
+ padding: 20px;
+}
+#pricereviewCheck > .container textarea {
+ resize: vertical;
+}
+#pricereviewCheck > .container table, #pricereviewCheck > .container th, #pricereviewCheck > .container td {
+ border: 1px #ccc solid;
+}
+#pricereviewCheck > .container table.noborder {
+ border: none !important;
+}
+#pricereviewCheck > .container table.noborder th, #pricereviewCheck > .container table.noborder td {
+ border: none !important;
+}
+#pricereviewCheck > .container .customerinfo-table input {
+ background-color: #EEE5E5;
+}
+#pricereviewCheck > .container .mi-table th {
+ font-weight: 600;
+}
+#pricereviewCheck > .container .mi-table input[type=text] {
+ background-color: #EEEEEE;
+ cursor: not-allowed;
+ padding: 6px 12px;
+ font-size: 14px;
+}
+#pricereviewCheck > .container .mi-table .mi-info {
+ font-size: 14px;
+}
+#pricereviewCheck > .container .mi-table .mi-info span {
+ font-size: 15px;
+ font-weight: 600;
+}
+#pricereviewCheck > .container .mi-table .mi-info .line {
+ width: 100%;
+ height: 0.5px;
+ margin: 30px 0;
+ background-color: #ccc;
}/*# sourceMappingURL=pricereview.css.map */
\ No newline at end of file
diff --git a/wms/mkt/css/pricereview.css.map b/wms/mkt/css/pricereview.css.map
index 24edcecf..d113f93f 100644
--- a/wms/mkt/css/pricereview.css.map
+++ b/wms/mkt/css/pricereview.css.map
@@ -1 +1 @@
-{"version":3,"sources":["pricereview.scss","pricereview.css"],"names":[],"mappings":"AACI;EACI,sBAAA;EACA,aAAA;ACAR;ADGQ;EACI,yBAAA;ACDZ;ADIY;EACI,eAAA;ACFhB;ADIY;EACI,yBAAA;EACA,eAAA;EACA,iBAAA;EACA,gBAAA;EACA,kBAAA;ACFhB;ADKQ;EACI,eAAA;ACHZ;ADMI;EACI,yBAAA;EACA,aAAA;EACA,kBAAA;ACJR;ADKQ;EACI,WAAA;EACA,WAAA;EACA,YAAA;EACA,UAAA;EACA,iBAAA;EACA,eAAA;ACHZ;ADIY;EACI,yBAAA;EACA,WAAA;ACFhB;ADIY;EACI,yBAAA;EACA,WAAA;EACA,eAAA;EACA,WAAA;ACFhB;ADIY;EACI,yBAAA;EACA,WAAA;ACFhB;ADMQ;EACI,sBAAA;EACA,aAAA;EACA,kBAAA;ACJZ;ADKY;EACI,aAAA;EACA,mBAAA;EACA,6BAAA;EACA,eAAA;EACA,mBAAA;ACHhB;ADIgB;EACI,gBAAA;ACFpB;ADMY;EACI,eAAA;EACA,6BAAA;ACJhB;ADKgB;EACI,eAAA;ACHpB;ADKgB;;;;EAEA,wBAAA;EACA,SAAA;ACDhB;ADKgB;EACI,UAAA;ACHpB;ADKgB;EACI,kBAAA;ACHpB;ADIoB;EACI,kBAAA;EACA,QAAA;EACA,2BAAA;EACA,UAAA;EACA,UAAA;EACA,gBAAA;ACFxB","file":"pricereview.css"}
\ No newline at end of file
+{"version":3,"sources":["pricereview.scss","pricereview.css"],"names":[],"mappings":"AACI;EACI,WAAA;ACAR;ADEI;EACI,gBAAA;ACAR;ADEI;EACI,aAAA;ACAR;ADCQ;EACI,sBAAA;ACCZ;ADCQ;EACI,cAAA;ACCZ;ADCQ;EACI,yBAAA;ACCZ;ADKQ;EACI,sBAAA;EACA,aAAA;ACHZ;ADIY;EACI,YAAA;ACFhB;ADMY;EACI,yBAAA;ACJhB;ADOgB;EACI,eAAA;ACLpB;ADOgB;EACI,yBAAA;EACA,eAAA;EACA,iBAAA;EACA,gBAAA;EACA,kBAAA;ACLpB;ADQY;EACI,eAAA;ACNhB;ADSQ;EACI,yBAAA;EACA,aAAA;EACA,kBAAA;EACA,cAAA;ACPZ;ADQY;EACI,WAAA;EACA,WAAA;EACA,YAAA;EACA,UAAA;EACA,iBAAA;EACA,eAAA;ACNhB;ADOgB;EACI,yBAAA;EACA,WAAA;ACLpB;ADOgB;EACI,yBAAA;EACA,WAAA;EACA,eAAA;EACA,WAAA;ACLpB;ADOgB;EACI,yBAAA;EACA,WAAA;ACLpB;ADSY;EACI,sBAAA;EACA,aAAA;EACA,kBAAA;ACPhB;ADQgB;EACI,aAAA;EACA,mBAAA;EACA,6BAAA;EACA,eAAA;EACA,mBAAA;ACNpB;ADOoB;EACI,gBAAA;ACLxB;ADSgB;EACI,eAAA;EACA,6BAAA;ACPpB;ADQoB;EACI,eAAA;ACNxB;ADQoB;;;;EAEA,wBAAA;EACA,SAAA;ACJpB;ADQoB;EACI,UAAA;ACNxB;ADQoB;EACI,kBAAA;ACNxB;ADOwB;EACI,kBAAA;EACA,QAAA;EACA,2BAAA;EACA,UAAA;EACA,UAAA;EACA,gBAAA;ACL5B;ADOwB;EACI,kBAAA;EACA,QAAA;EACA,2BAAA;EACA,WAAA;EACA,UAAA;EACA,gBAAA;EACA,WAAA;EACA,YAAA;ACL5B;ADQoB;EACI,YAAA;EACA,gBAAA;ACNxB;ADUY;EACI,aAAA;EACA,sBAAA;EACA,gBAAA;ACRhB;ADSgB;EACI,aAAA;EACA,mBAAA;EACA,cAAA;ACPpB;ADQoB;EACI,YAAA;EACA,eAAA;EACA,gBAAA;ACNxB;ADQoB;EACI,YAAA;ACNxB;ADQoB;EACI,WAAA;EACA,YAAA;EACA,SAAA;EACA,kBAAA;EACA,gBAAA;ACNxB;;ADcA;EACI,4BAAA;EACA,WAAA;ACXJ;ADYI;EACI,gBAAA;ACVR;ADYI;EACI,yBAAA;ACVR;;ADcA;EACI,eAAA;EACA,MAAA;EACA,OAAA;EACA,WAAA;EACA,aAAA;EACA,oCAAA;EACA,UAAA;EACA,aAAA;EACA,aAAA;ACXJ;ADYI;EACI;IACI,gCAAA;IACA,UAAA;ECVV;EDYM;IACI,gCAAA;IACA,UAAA;ECVV;AACF;ADYI;EACI,sBAAA;ACVR;ADYI;EACI,cAAA;ACVR;ADYI;EACI,yBAAA;ACVR;ADYI;EACI,gBAAA;ACVR;ADWQ;EACI,aAAA;EACA,kBAAA;ACTZ;ADYI;EACI,iBAAA;EACA,YAAA;ACVR;ADWQ;EACI,YAAA;ACTZ;ADYI;EACI,UAAA;EACA,sBAAA;EACA,mBAAA;EACA,kBAAA;EACA,aAAA;EACA,aAAA;EACA,QAAA;EACA,SAAA;EACA,gCAAA;EACA,0BAAA;EACA,8BAAA;ACVR;ADWQ;EACI,aAAA;ACTZ;ADWQ;EACI,YAAA;ACTZ;ADWQ;EACI,YAAA;ACTZ;ADWQ;EACI,aAAA;EACA,sBAAA;ACTZ;ADUY;EACI,kBAAA;EACA,SAAA;EACA,WAAA;EACA,6BAAA;EACA,YAAA;EACA,aAAA;EACA,kBAAA;ACRhB;ADUY;EACI,YAAA;ACRhB;ADYI;EACI,kBAAA;EACA,MAAA;EACA,OAAA;EACA,WAAA;EACA,YAAA;EACA,6BAAA;ACVR;;ADeI;EACI,yBAAA;EACA,mBAAA;EACA,aAAA;ACZR;ADaQ;EACI,gBAAA;ACXZ;ADaQ;EACI,sBAAA;ACXZ;ADaQ;EACI,uBAAA;ACXZ;ADYY;EACI,uBAAA;ACVhB;ADcY;EACI,yBAAA;ACZhB;ADgBY;EACI,gBAAA;ACdhB;ADgBY;EACI,yBAAA;EACA,mBAAA;EACA,iBAAA;EACA,eAAA;ACdhB;ADgBY;EACI,eAAA;ACdhB;ADegB;EACI,eAAA;EACA,gBAAA;ACbpB;ADegB;EACI,WAAA;EACA,aAAA;EACA,cAAA;EACA,sBAAA;ACbpB","file":"pricereview.css"}
\ No newline at end of file
diff --git a/wms/mkt/css/pricereview.scss b/wms/mkt/css/pricereview.scss
index e1b62d0b..ea3c48bc 100644
--- a/wms/mkt/css/pricereview.scss
+++ b/wms/mkt/css/pricereview.scss
@@ -1,98 +1,315 @@
#pricereviewCreate{
- table, th, td{
- border:1px #ccc solid;
- padding: 15px;
+ input[type='text'], input[type='number'], select{
+ margin: 1px;
+ }
+ textarea{
+ resize: vertical;
}
- table{
- thead th{
- background-color: #6D9EEB;
+ >.modal{
+ padding: 20px;
+ table, th, td{
+ border:1px #ccc solid;
}
- tbody {
- td input{
- font-size: 14px;
+ table > thead tr th{
+ color:#A52A2A;
+ }
+ table > tbody .selected{
+ background-color: #E7FEFB;
+ }
+ table > tbody .selected td{
+ }
+ }
+ .container{
+ table, th, td{
+ border:1px #ccc solid;
+ padding: 15px;
+ &.noborder, .noborder th, .noborder td{
+ border:none;
}
- th{
- background-color: #CCE4F8;
- font-size: 14px;
- padding: 15px 2px;
- min-width: 100px;
- text-align: center;
+ }
+ table{
+ thead th{
+ background-color: #6D9EEB;
+ }
+ tbody {
+ td input{
+ font-size: 14px;
+ }
+ th{
+ background-color: #CCE4F8;
+ font-size: 14px;
+ padding: 15px 2px;
+ min-width: 100px;
+ text-align: center;
+ }
+ }
+ input{
+ font-size: 13px;
+ }
+ }
+ .pricreviewmain{
+ background-color: #F2F2F2;
+ padding: 20px;
+ border-radius: 6px ;
+ margin:30px 0;
+ button{
+ color:#fff;
+ width: 55px;
+ height: 30px;
+ padding: 0;
+ margin-left: 10px;
+ font-size: 13px;
+ &.addbtn{
+ background-color: #337AB7;
+ width: 30px;
+ }
+ &.deleteBtn{
+ background-color: #D9534F;
+ color:#fff;
+ font-size: 12px;
+ width: 30px;
+ }
+ &.selectElevator{
+ background-color: #D9534F;
+ color:#fff;
+ }
+ }
+
+ >.divitem{
+ border:1px #ccc solid;
+ padding: 10px;
+ border-radius: 4px ;
+ .title{
+ display: flex;
+ align-items: center;
+ border-bottom: 1px #ccc solid;
+ padding: 10px 0;
+ margin-bottom: 10px;
+ h6{
+ font-weight: 600;
+ }
+
+ }
+ table, th, td{
+ font-size: 14px;
+ background-color: transparent;
+ input, select, textarea{
+ font-size: 13px;
+ }
+ input[type=number]::-webkit-outer-spin-button,
+ input[type=number]::-webkit-inner-spin-button {
+ -webkit-appearance: none;
+ margin: 0;
+ }
+ }
+ table {
+ tr:hover .deleteBtn ,tr:hover .copyBtn{
+ opacity: 1;
+ }
+ .saletd{
+ position: relative;
+ >.deleteBtn{
+ position: absolute;
+ top: 50%;
+ transform: translateY(-50%);
+ right:2px;
+ opacity: 0;
+ transition: .3s;
+ }
+ >.copyBtn{
+ position: absolute;
+ top: 50%;
+ transform: translateY(-50%);
+ right:38px;
+ opacity: 0;
+ transition: .3s;
+ width: 30px;
+ height: 30px;
+ }
+ }
+ textarea{
+ height: auto;
+ min-height: 50px;
+ }
+ }
+ }
+ >.filediv{
+ display: flex;
+ flex-direction: column;
+ margin-top: 20px;
+ label{
+ display: flex;
+ align-items: center;
+ margin:10px 0;
+ p{
+ width:100px;
+ font-size: 15px;
+ font-weight: 600;
+ }
+ input[type="file"]{
+ width:400px
+ }
+ button{
+ width:90px;
+ height: 35px;
+ margin:0;
+ margin-right: 15px;
+ margin-top: 20px;
+ }
+ }
}
}
- input{
- font-size: 13px;
+ }
+}
+
+.container-fluid, .container{
+ max-width:1400px !important;
+ width: 100%;
+ h4{
+ font-weight: 600;
+ }
+ .btn-secondary{
+ background-color: #6C757D;
+ }
+}
+
+.window-modal{
+ position: fixed;
+ top: 0;
+ left:0;
+ width: 100%;
+ height: 100vh;
+ background-color: rgba(0, 0, 0, 0.5);
+ z-index: 9;
+ padding: 20px;
+ display: none;
+ @keyframes fade-in {
+ 0%{
+ transform: translate(-50%, -60%);
+ opacity: 0;
+ }
+ 100%{
+ transform: translate(-50%, -55%);
+ opacity: 1;
+ }
+ }
+ table, th, td{
+ border:1px #ccc solid;
+ }
+ table > thead tr th{
+ color:#A52A2A;
+ }
+ table > tbody .selected{
+ background-color: #E7FEFB;
+ }
+ optionModal .window-modal-content{
+ max-height: 80vh;
+ .window-modal-body{
+ height: 400px;
+ overflow-y: scroll;
+ }
+ }
+ toElevatorModal .window-modal-content{
+ min-height: 270px;
+ height: auto;
+ .window-modal-body{
+ height: auto;
+ }
+ }
+ .window-modal-content{
+ z-index: 9;
+ background-color: #fff;
+ border-radius: 10px;
+ position: absolute;
+ width:1200px;
+ padding: 30px;
+ top: 50%;
+ left:50%;
+ transform: translate(-50%, -55%);
+ box-shadow: 0 5px 5px #222;
+ animation: fade-in .2s linear;
+ &.modal-xl{
+ width:1200px;
+ }
+ &.modal-lg{
+ width:800px;
+ }
+ &.modal-m{
+ width:450px;
+ }
+ .window-modal-header{
+ display: flex;
+ flex-direction: column;
+ button.btn-close{
+ position: absolute;
+ top: 10px;
+ right:10px;
+ background-color: transparent;
+ border:none;
+ outline: none;
+ border-radius: 50%;
+ }
+ >div > input{
+ width: 250px;
+ }
}
}
- .pricreviewmain{
+ .window-back{
+ position: absolute;
+ top: 0;
+ left:0;
+ width: 100%;
+ height: 100%;
+ background-color: transparent;
+ }
+}
+
+#pricereviewCheck{
+ >.container{
background-color: #F2F2F2;
+ border-radius: 15px;
padding: 20px;
- border-radius: 6px ;
- button{
- color:#fff;
- width: 55px;
- height: 30px;
- padding: 0;
- margin-left: 10px;
- font-size: 13px;
- &.addbtn{
- background-color: #337AB7;
- width: 30px;
- }
- &.deleteBtn{
- background-color: #D9534F;
- color:#fff;
- font-size: 12px;
- width: 30px;
+ textarea{
+ resize: vertical;
+ }
+ table, th, td{
+ border:1px #ccc solid;
+ }
+ table.noborder{
+ border:none !important;
+ th ,td{
+ border:none !important;
}
- &.selectElevator{
- background-color: #D9534F;
- color:#fff;
+ }
+ .customerinfo-table{
+ input{
+ background-color: #EEE5E5;
}
}
-
- >.divitem{
- border:1px #ccc solid;
- padding: 10px;
- border-radius: 4px ;
- .title{
- display: flex;
- align-items: center;
- border-bottom: 1px #ccc solid;
- padding: 10px 0;
- margin-bottom: 10px;
- h6{
- font-weight: 600;
- }
-
+ .mi-table{
+ th{
+ font-weight: 600;
}
- table, th, td{
+ input[type=text]{
+ background-color: #EEEEEE;
+ cursor: not-allowed;
+ padding: 6px 12px;
font-size: 14px;
- background-color: transparent;
- input, select, textarea{
- font-size: 13px;
- }
- input[type=number]::-webkit-outer-spin-button,
- input[type=number]::-webkit-inner-spin-button {
- -webkit-appearance: none;
- margin: 0;
- }
}
- table {
- tr:hover .deleteBtn{
- opacity: 1;
+ .mi-info{
+ font-size: 14px;
+ span{
+ font-size: 15px;
+ font-weight: 600;
}
- .saletd{
- position: relative;
- >.deleteBtn{
- position: absolute;
- top: 50%;
- transform: translateY(-50%);
- right:2px;
- opacity: 0;
- transition: .3s;
- }
+ .line{
+ width: 100%;
+ height: .5px;
+ margin:30px 0;
+ background-color: #ccc;
}
}
}
}
+
}
\ No newline at end of file
diff --git a/wms/mkt/pricereview-check.php b/wms/mkt/pricereview-check.php
index 6795979a..4bdd0c85 100644
--- a/wms/mkt/pricereview-check.php
+++ b/wms/mkt/pricereview-check.php
@@ -587,16 +587,16 @@ foreach ($res as $data) {
foreach ($item_arr as $item_no => $val) {
$item_amt_A_all += $val["item_price_bp"];
if ($viewmi) {
- for ($i = 0; $i < $val["item_qty"]; $i++) {
+ // for ($i = 0; $i < $val["item_qty"]; $i++) {
?>
"> |
= $val["item_spec"]; ?> [規調] |
"> |
- |
- |
+ "> |
+ "> |
" disabled> |
- "> |
+ "> |
@@ -609,7 +609,7 @@ foreach ($res as $data) {
|
diff --git a/wms/mkt/pricereview-index.php b/wms/mkt/pricereview-index.php
index 07bff8b2..1021a118 100644
--- a/wms/mkt/pricereview-index.php
+++ b/wms/mkt/pricereview-index.php
@@ -1,6 +1,6 @@
- " target="_blank" class="btn btn-warning btn-sm">檢視
+ " target="_blank" class="btn btn-warning btn-sm">檢視
@@ -520,14 +520,14 @@ if ($data) :
if ($ss_arr["sign_st"] == 1 && in_array($user_id, $ss_arr["sign_nt"]) && $data["status"] == "YS" || $user_id == 'TEST04') {
$str = "";
$str = "待簽核";
- $str = "" . $str . "";
+ $str = "" . $str . "";
} else $str = "--";
}
echo $str;
/*
if ($sign_st==1 && $sign_nt==$user_id) {
$str = "";
- $str = "".$str."";
+ $str = "".$str."";
} else if ($sign_st > 1 || $data['last_check_result']) { // 過了這關或已完成流程
list($uperson, $ustatus, $udtte) = explode(",", $sign1);
if ($ustatus == "Y") $str = "";
@@ -545,7 +545,7 @@ if ($data) :
$str = "";
}
if (!$oneself) {
- $str = "".$str."";
+ $str = "".$str."";
$str .= " ".$data["checker_1"]." ".$data["checker_1_dt"];
} else {
if ($data["checker_1_result"]) {
@@ -577,7 +577,7 @@ if ($data) :
if (($data["status"] == "YS") && ($ss_arr["sign_st"] == 2) && (in_array($user_id, $ss_arr["sign_nt"])) || $user_id == 'TEST02') {
$str = "";
$str = "待簽核";
- $str = "" . $str . "";
+ $str = "" . $str . "";
} else $str = "--";
}
echo $str;
@@ -585,7 +585,7 @@ if ($data) :
/*
if ($sign_st==2 && $sign_nt==$user_id) {
$str = "";
- $str = "".$str."";
+ $str = "".$str."";
} else if ($sign_st > 2 || $data['last_check_result']) {
list($uperson, $ustatus, $udtte) = explode(",", $sign2);
if ($ustatus == "Y") $str = "";
@@ -603,7 +603,7 @@ if ($data) :
$str = "";
}
if (!$oneself) {
- $str = "".$str."";
+ $str = "".$str."";
$str .= " ".$data["checker_2"]." ".$data["checker_2_dt"];
} else {
if ($data["checker_2_result"]) {
@@ -631,7 +631,7 @@ if ($data) :
if (($data["status"] == "YS") && ($ss_arr["sign_st"] == 3) && (in_array($user_id, $ss_arr["sign_nt"])) || $user_id == 'TEST03') {
$str = "";
$str = "待簽核";
- $str = "" . $str . "";
+ $str = "" . $str . "";
} else $str = "--";
}
echo $str;
@@ -639,7 +639,7 @@ if ($data) :
$str = "";
if ($sign_st==3 && $sign_nt==$user_id) {
$str = "";
- $str = "".$str."";
+ $str = "".$str."";
} else $str = "--";
*/
@@ -652,7 +652,7 @@ if ($data) :
$str = "";
}
if (!$oneself) {
- $str = "".$str."";
+ $str = "".$str."";
$str .= " ".$data["checker_3"]." ".$data["checker_3_dt"];
} else {
if ($data["checker_3_result"]) {
@@ -677,7 +677,7 @@ if ($data) :
if (($data["status"] == "YS") && ($ss_arr["sign_st"] == 4) && (in_array($user_id, $ss_arr["sign_nt"])) || $user_id == 'TEST05') {
$str = "";
$str = "待簽核";
- $str = "" . $str . "";
+ $str = "" . $str . "";
} else $str = "--";
}
echo $str;
diff --git a/wms/mkt/pricereviewCheck.php b/wms/mkt/pricereviewCheck.php
new file mode 100644
index 00000000..657c07af
--- /dev/null
+++ b/wms/mkt/pricereviewCheck.php
@@ -0,0 +1,747 @@
+prepare($sql_str);
+$stmt->bindParam(':id', $id);
+$stmt->execute();
+$contract = $stmt->fetch(PDO::FETCH_ASSOC);
+
+if(!$contract){
+ echo "找不到此紀錄!";
+ exit;
+}
+
+$sql_str = "SELECT * FROM pricereview_pay WHERE mid = :mid ORDER BY pay_kind ASC";
+$stmt = $conn->prepare($sql_str);
+$stmt->bindParam(':mid', $id);
+$stmt->execute();
+$pays = $stmt->fetchAll(PDO::FETCH_ASSOC);
+
+$sql_str = "SELECT pricereview_item.*, option_mi.price AS option_mi, option_price.group_name AS option_name, option_price.memo AS option_memo, option_price.spec AS option_spec
+ FROM pricereview_item
+ LEFT JOIN option_mi ON option_mi.option_price_id = pricereview_item.price_id
+ LEFT JOIN option_price ON option_price.id = pricereview_item.price_id
+ WHERE pricereview_item.mid = :mid AND option_mi.open_kind = 'CO' ORDER BY pricereview_item.item_group, pricereview_item.item_no ASC";
+$stmt = $conn->prepare($sql_str);
+$stmt->bindParam(':mid', $id);
+$stmt->execute();
+$options = $stmt->fetchAll(PDO::FETCH_ASSOC);
+
+
+$sql_str = "SELECT * FROM pricereview_item
+ WHERE pricereview_item.mid = :mid ORDER BY pricereview_item.item_group, pricereview_item.item_no ASC";
+$stmt = $conn->prepare($sql_str);
+$stmt->bindParam(':mid', $id);
+$stmt->execute();
+$items = $stmt->fetchAll(PDO::FETCH_ASSOC);
+
+$sql_str = "SELECT * FROM pricereview_sign WHERE mid = :mid";
+$stmt = $conn->prepare($sql_str);
+$stmt->bindParam(':mid', $id);
+$stmt->execute();
+$sign = $stmt->fetch(PDO::FETCH_ASSOC);
+
+$currentSigner = '';
+$currentSign = 0;
+// Y:已同意 N:不同意 W:待簽
+// sign1 => 處長, sign2 => 業務承辦人, sign3 => 協理, sign4 => 總經理
+if($sign['sign1'] == NULL || $sign['sign1'] ==''){
+ $sign1 = NULL;
+}else{
+ if( explode(",", $sign['sign1'])[1] != ''){
+ $sign1 = explode(",", $sign['sign1'])[1] == 'Y' ? 'Y' : 'N';
+ }else{
+ $sign1 = 'W';
+ }
+}
+
+
+if($sign['sign2'] == NULL || $sign['sign2'] ==''){
+ $sign2 = NULL;
+}else{
+ if( explode(",", $sign['sign2'])[1] != ''){
+ $sign2 = explode(",", $sign['sign2'])[1] == 'Y' ? 'Y' : 'N';
+ }else{
+ $sign2 = 'W';
+ }
+}
+
+if($sign['sign3'] == NULL || $sign['sign3'] ==''){
+ $sign3 = NULL;
+}else{
+ if( explode(",", $sign['sign3'])[1] != ''){
+ // $sign3 = explode(",", $sign['sign3'])[1] == 'Y' ? 'Y' : 'N';
+ if(explode(",", $sign['sign3'])[1] == 'YY') $sign3 = 'YY';
+ if(explode(",", $sign['sign3'])[1] == 'Y') $sign3 = 'Y';
+ }else{
+ $sign3 = 'W';
+ }
+}
+if($sign['sign4'] == NULL || $sign['sign4'] ==''){
+ $sign4 = NULL;
+}else{
+ if( explode(",", $sign['sign4'])[1] != ''){
+ // $sign4 = explode(",", $sign['sign4'])[1] == 'Y' ? 'Y' : 'N';
+ if(explode(",", $sign['sign4'])[1] == 'YY') $sign4 = 'YY';
+ if(explode(",", $sign['sign4'])[1] == 'Y') $sign4 = 'Y';
+ }else{
+ $sign4 = 'W';
+ }
+}
+
+if($sign1 == 'W'){
+ $currentSigner = explode(",", $sign['sign1'])[0];
+ $currentSign = 1;
+}elseif($sign2 == 'W'){
+ $currentSigner = explode(",", $sign['sign2'])[0];
+ $currentSign = 2;
+}elseif($sign3 == 'W'){
+ $currentSigner = explode(",", $sign['sign3'])[0];
+ $currentSign = 3;
+}elseif($sign4 == 'W'){
+ $currentSigner = explode(",", $sign['sign4'])[0];
+ $currentSign = 4;
+}
+
+// $sql_str = "SELECT * FROM account WHERE accountid = :accountid";
+// $stmt = $conn->prepare($sql_str);
+// $stmt->bindParam(':accountid', $sign['sign']);
+// $stmt->execute();
+// $account = $stmt->fetch(PDO::FETCH_ASSOC);
+
+
+
+// $sql_str = "SELECT * FROM account WHERE accountid = :accountid";
+// $stmt = $conn->prepare($sql_str);
+// $stmt->bindParam(':accountid', $account['manager']);
+// $stmt->execute();
+// $manager = $stmt->fetch(PDO::FETCH_ASSOC);
+
+
+$permissions = false;
+//開啟業務部權限
+if($user_id == "M0174" || $user_id == "M0175" || $user_id == "M0060"){
+ $permissions = true;
+}
+
+?>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 營業權限85%以上;85-80%呈至區處長審核;80%以下呈至總經理審核。
+
+
+
+
+ 審核 |
+ 審核人 |
+ 結果 |
+ 意見 |
+ 時間 |
+
+
+
+
+ 區經理 |
+ |
+
+
+ |
+ |
+ |
+
+
+ 業務承辦人 |
+ |
+
+
+ |
+ |
+ |
+
+
+ 業務部協理 |
+ |
+
+
+ |
+ |
+ |
+
+
+ 總經理 |
+ |
+
+
+ |
+ |
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/wms/mkt/pricereviewCreate.php b/wms/mkt/pricereviewCreate.php
index 80c17a97..e1a303d8 100644
--- a/wms/mkt/pricereviewCreate.php
+++ b/wms/mkt/pricereviewCreate.php
@@ -1,15 +1,637 @@
prepare($sql_str);
+$stmt->execute();
+$options = $stmt->fetchAll(PDO::FETCH_ASSOC);
+foreach ($options as $key => $option) {
+ $options[$key]['isShow'] = 1;
+ $options[$key]['selected'] = 0;
+}
+$vol_no = $_GET['vol_no'];
+$hope_status = [
+ 'A'=>'有望簽約(已報價)',
+ 'B'=>'觀望考慮(等待時機報價)',
+ 'C'=>'在途合約',
+ 'D'=>'已簽約',
+ 'N'=>'無望簽約',
+];
+//有望客戶基本資料
+$sql_str = "SELECT hope_elevator_customer.*, code.content AS source_content, account.name AS salesman_name FROM hope_elevator_customer
+ LEFT JOIN code ON code.code_name = hope_elevator_customer.source
+ LEFT JOIN account ON account.accountid = hope_elevator_customer.salesman
+ WHERE hope_elevator_customer.vol_no = :vol_no AND code.field_name = 'customer_source'";
+$stmt = $conn->prepare($sql_str);
+$stmt->bindParam(':vol_no', $vol_no);
+$stmt->execute();
+$hope_customer = $stmt->fetch(PDO::FETCH_ASSOC);
+
+//獲取有望客戶電梯規格
+$sql_str = "SELECT
+hope_project_elevator_spec.specifications,
+hope_project_elevator_spec.person,
+hope_project_elevator_spec.stop,
+hope_project_elevator_spec.speed,
+hope_project_elevator_spec.open,
+hope_project_elevator_spec.spec_price,
+hope_project_elevator_spec.spec_num,
+fp.price AS price,
+fp.id AS facility_id,
+CASE hope_project_elevator_spec.open
+ WHEN 4 THEN '2U'
+ WHEN 5 THEN '4PCO'
+ WHEN 7 THEN '6PCO'
+ WHEN 8 THEN '2S'
+ WHEN 9 THEN 'CO'
+ ELSE hope_project_elevator_spec.open
+END AS open_converted
+FROM hope_project_elevator_spec
+LEFT JOIN (
+SELECT *,
+ ROW_NUMBER() OVER (PARTITION BY model ORDER BY create_dt DESC) as rn
+FROM facility_price
+) fp ON fp.model = CONCAT(hope_project_elevator_spec.specifications, '-', hope_project_elevator_spec.person, '*', hope_project_elevator_spec.stop, '-', CASE hope_project_elevator_spec.open
+ WHEN 4 THEN '2U'
+ WHEN 5 THEN '4PCO'
+ WHEN 7 THEN '6PCO'
+ WHEN 8 THEN '2S'
+ WHEN 9 THEN 'CO'
+ ELSE hope_project_elevator_spec.open
+END, hope_project_elevator_spec.speed)
+AND fp.rn = 1
+WHERE hope_project_elevator_spec.vol_no = :vol_no
+ORDER BY hope_project_elevator_spec.seq ASC;";
+$stmt = $conn->prepare($sql_str);
+$stmt->bindParam(':vol_no', $vol_no);
+$stmt->execute();
+$hope_elevators = $stmt->fetchAll(PDO::FETCH_ASSOC);
+$total_spec = 0;
+foreach ($hope_elevators as $key => $elevator) {
+ $hope_elevators[$key]['id'] = $key+1;
+ $total_spec ++;
+}
+
+
+function convertDateTimeFormat($dateTimeStr) {
+ // 使用 DateTime::createFromFormat 解析给定格式的日期时间
+ $date = DateTime::createFromFormat('Y-m-d H:i:s', $dateTimeStr);
+
+ // 如果解析成功,则使用 DateTime::format 转换格式
+ if ($date) {
+ return $date->format('Y-m-d');
+ } else {
+ // 如果解析失败,返回原始字符串或错误信息
+ return $dateTimeStr; // 或者返回错误信息
+ }
+}
?>
-
+
-
+
+
-
+
+
+
+
+
+
+
+
+
+
+ ID |
+ 名稱 |
+ 規格 |
+ 備註 |
+ 配置 |
+ 單位 |
+ 定價 |
+
+
+
+
+
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -65,12 +687,12 @@ require_once("./conn.php");
-
+
|
|