官檢附件 |
- >
+ >
下載附件" : "";
?>
diff --git a/wms/wipwhole-renovate-index-function.php b/wms/wipwhole-renovate-index-function.php
index 628649c9..e3b997d6 100644
--- a/wms/wipwhole-renovate-index-function.php
+++ b/wms/wipwhole-renovate-index-function.php
@@ -1279,8 +1279,8 @@ function checkUseridIsManager($user_id)
// 中區 李烘銘
if (in_array($user_id, ['M0086']))
return true;
- // 桃竹 張莉凱
- if (in_array($user_id, ['M0026']))
+ // 桃竹 張莉凱 改 陳家文
+ if (in_array($user_id, ['M0029']))
return true;
// 宜花東 陳志文
if (in_array($user_id, ['M0054']))
@@ -1290,3 +1290,20 @@ function checkUseridIsManager($user_id)
return true;
return false;
}
+
+function manage_class_gary_ver($user_id)
+{
+ global $link;
+
+ $sql = "
+ SELECT manager
+ FROM account
+ WHERE accountid = '$user_id'";
+ $res = mysqli_query($link, $sql);
+ $row = mysqli_fetch_assoc($res);
+ $manager = $row["manager"];
+ mysqli_free_result($res);
+ if ($manager == "M0001")
+ return ""; // 董事長略過
+ return $manager;
+}
diff --git a/wms/wipwhole-renovate-rec-invoice-edit-submit.php b/wms/wipwhole-renovate-rec-invoice-edit-submit.php
index 30ea4047..f5f56830 100644
--- a/wms/wipwhole-renovate-rec-invoice-edit-submit.php
+++ b/wms/wipwhole-renovate-rec-invoice-edit-submit.php
@@ -128,9 +128,13 @@ if ($_SERVER["REQUEST_METHOD"] == "POST") {
$delivery_date = $_POST['delivery_date'] ?: $row['delivery_date'];
$old_delivery_date = $_POST['old_delivery_date'] ?: $row['old_delivery_date'];
$delivery_date_owner = $_POST['delivery_date_owner'] ?: $row['delivery_date_owner'];
-
+ $salesid = $_POST['salesid'] ?: $row['salesid'];
$warehouseid = $_POST['warehouseid'] ?: $row['warehouseid'];
$old_warehouseid = $_POST['old_warehouseid'] ?: $row['warehouseid'];
+ $association_check_type = $_POST['association_check_type'] ?: $row['association_check_type'];
+
+ $salesname = accountid2name($salesid)[$salesid];
+ $salesmail = accountid2email([$salesid])[$salesid];
$creater = $_POST['creater'];
$create_at = date("Y-m-d H:i:s");
@@ -328,11 +332,12 @@ if ($_SERVER["REQUEST_METHOD"] == "POST") {
. "
移交日:" . $old_delivery_date . " => " . $delivery_date;
}
+
$cmail->sendx(
$mail_title,
$mail_content,
[
- [$salesname, $salesmail]
+ [$salesname, $salesmail],
// ['gary', 'gary_chen@masada.com.tw']
],
"永佳捷科技"
@@ -382,6 +387,7 @@ if ($_SERVER["REQUEST_METHOD"] == "POST") {
customer_planning_verify = '$customer_planning_verify',
customer_planning_verify_at = '$customer_planning_verify_at',
customer_planning_verify_owner = '$customer_planning_verify_owner',
+ association_check_type = '$association_check_type',
marketing_remark = '',
";
if (!empty(trim($marketing_remark))) {
@@ -1149,8 +1155,8 @@ function checkWwsAssianStatus($link, $user_id)
$data['salesname'] = accountid2name($data['salesid'])[$data['salesid']];
$data['salesmail'] = accountid2email([$data['salesid']])[$data['salesid']];
- $data['salesmanagername'] = accountid2name(manage_class($data['salesid'])[0])[manage_class($data['salesid'])[0]];
- $data['salesmanagermail'] = accountid2email([manage_class($data['salesid'])[0]])[manage_class($data['salesid'])[0]];
+ $data['salesmanagername'] = accountid2name(manage_class_gary_ver($data['salesid']))[manage_class_gary_ver($data['salesid'])];
+ $data['salesmanagermail'] = accountid2email([manage_class_gary_ver($data['salesid'])])[manage_class_gary_ver($data['salesid'])];
$data['designname'] = accountid2name("M0023")["M0023"];
$data['designmail'] = accountid2email(["M0023"])["M0023"];
$data['designleadername'] = accountid2name(getSheJiokLeaderNo($link))[getSheJiokLeaderNo($link)];
@@ -1197,7 +1203,7 @@ function checkWwsAssianStatus($link, $user_id)
],
"永佳捷科技"
);
- do_wws_next_assign(manage_class($data['salesid'])[0], $form_key, 'F');
+ do_wws_next_assign(manage_class_gary_ver($data['salesid']), $form_key, 'F');
}
}
diff --git a/wms/wipwhole-renovate-rec-invoice-edit.php b/wms/wipwhole-renovate-rec-invoice-edit.php
index 2af5e630..6e149369 100644
--- a/wms/wipwhole-renovate-rec-invoice-edit.php
+++ b/wms/wipwhole-renovate-rec-invoice-edit.php
@@ -613,11 +613,21 @@ include "wipwhole-renovate-rec-invoice-edit-submit.php";
|
+
+
官檢附件 |
- >
+ >
下載附件" : "";
?>
@@ -2054,6 +2064,11 @@ include "wipwhole-renovate-rec-invoice-edit-submit.php";
'install_end_date2',
'tryrun_start_date2',
'tryrun_end_date2',
+ 'install_start_date',
+ 'install_end_date',
+ 'tryrun_start_date',
+ 'tryrun_end_date',
+ 'delivery_date'
]
for (var i = 0; i < catchTime_input_arr.length; i++) {
inputChangeCatchTime(catchTime_input_arr[i]);
@@ -2369,7 +2384,7 @@ include "wipwhole-renovate-rec-invoice-edit-submit.php";
}
}
- function sendExpressionMailToPlatform(id){
+ function sendExpressionMailToPlatform(id) {
if (confirm('確定要發送郵件嗎?') == true) {
$("#wipwholestatusid").val(id);
$('#send_expression_mail_to_platform_form').submit();
diff --git a/wms/wipwhole-wipinstallstatus-index-modal.php b/wms/wipwhole-wipinstallstatus-index-modal.php
index 38f61862..42fa0027 100644
--- a/wms/wipwhole-wipinstallstatus-index-modal.php
+++ b/wms/wipwhole-wipinstallstatus-index-modal.php
@@ -19,7 +19,14 @@ if ($method == 'getInstallingDetails')
if ($method == 'getInstalling2Details')
echo getInstalling2Details($type, $mtype, $radsY, $radsM, $year, $month);
-
+if ($method == 'getShippingDetailsSql')
+ echo getShippingDetailsSql($type, $mtype, $radsY, $radsM, $year, $month);
+if ($method == 'getEndingDetailsSql')
+ echo getEndingDetailsSql($type, $mtype, $radsY, $radsM, $year, $month);
+if ($method == 'getInstallingDetailsSql')
+ echo getInstallingDetailsSql($type, $mtype, $radsY, $radsM, $year, $month);
+if ($method == 'getInstalling2DetailsSql')
+ echo getInstalling2DetailsSql($type, $mtype, $radsY, $radsM, $year, $month);
// 出貨台數
@@ -44,6 +51,25 @@ function getShippingDetails($type, $mtype, $radsY, $radsM, $year, $month)
return json_encode($data, JSON_UNESCAPED_UNICODE);
}
+function getShippingDetailsSql($type, $mtype, $radsY, $radsM, $year, $month)
+{
+ global $link;
+ $sql = "
+ SELECT
+ *
+ FROM wipwholestatus
+ WHERE status = '1'
+ AND (
+ real_arrival_date IS NOT NULL
+ AND real_arrival_date != ''
+ )
+ AND real_arrival_date BETWEEN '$radsY-$radsM-01' AND '$year-$month-31'
+ ";
+ $sql .= !empty($type) ? " AND contract_type = '$type'" : "";
+ $sql .= !empty($mtype) ? " AND renovate_type Like '%$mtype%'" : "";
+ return $sql;
+}
+
// 工收台數
function getEndingDetails($type, $mtype, $radsY, $radsM, $year, $month)
@@ -67,6 +93,24 @@ function getEndingDetails($type, $mtype, $radsY, $radsM, $year, $month)
return json_encode($data, JSON_UNESCAPED_UNICODE);
}
+function getEndingDetailsSql($type, $mtype, $radsY, $radsM, $year, $month)
+{
+ global $link;
+ $sql = "
+ SELECT
+ *
+ FROM wipwholestatus
+ WHERE status = '1'
+ AND real_arrival_date BETWEEN '$radsY-$radsM-01' AND '$year-$month-31'
+ AND (delivery_date BETWEEN '$radsY-$radsM-01' AND '$year-$month-31'
+ OR
+ official_check_date BETWEEN '$radsY-$radsM-01' AND '$year-$month-31'
+ )
+ ";
+ $sql .= !empty($type) ? " AND contract_type = '$type'" : "";
+ $sql .= !empty($mtype) ? " AND renovate_type Like '%$mtype%'" : "";
+ return $sql;
+}
// 試車完台數
function getInstallingDetails($type, $mtype, $radsY, $radsM, $year, $month)
@@ -93,6 +137,27 @@ function getInstallingDetails($type, $mtype, $radsY, $radsM, $year, $month)
return json_encode($data, JSON_UNESCAPED_UNICODE);
}
+function getInstallingDetailsSql($type, $mtype, $radsY, $radsM, $year, $month)
+{
+ global $link;
+ $sql = "
+ SELECT
+ *
+ FROM wipwholestatus
+ WHERE status = '1'
+ AND (
+ real_arrival_date IS NOT NULL
+ AND real_arrival_date != ''
+ )
+ AND real_arrival_date BETWEEN '$radsY-$radsM-01' AND '$year-$month-31'
+ AND tryrun_end_date <= '$year-$month-31'
+ AND tryrun_end_date != ''
+ AND tryrun_end_date IS NOT NULL
+ ";
+ $sql .= !empty($type) ? " AND contract_type = '$type'" : "";
+ $sql .= !empty($mtype) ? " AND renovate_type Like '%$mtype%'" : "";
+ return $sql;
+}
// 在裝中台數
function getInstalling2Details($type, $mtype, $radsY, $radsM, $year, $month)
@@ -121,3 +186,28 @@ function getInstalling2Details($type, $mtype, $radsY, $radsM, $year, $month)
$data = mysqli_fetch_all($result, MYSQLI_ASSOC);
return json_encode($data, JSON_UNESCAPED_UNICODE);
}
+
+function getInstalling2DetailsSql($type, $mtype, $radsY, $radsM, $year, $month)
+{
+ global $link;
+ $sql = "
+ SELECT
+ *
+ FROM wipwholestatus
+ WHERE status = '1'
+ AND real_arrival_date BETWEEN '$radsY-$radsM-01' AND '$year-$month-31'
+ AND (
+ delivery_date IS NULL
+ OR delivery_date = ''
+ OR delivery_date >= '$year-$month-31'
+ )
+ AND(
+ official_check_date IS NULL
+ OR official_check_date = ''
+ OR official_check_date >= '$year-$month-31'
+ )
+ ";
+ $sql .= !empty($type) ? " AND contract_type = '$type'" : "";
+ $sql .= !empty($mtype) ? " AND renovate_type Like '%$mtype%'" : "";
+ return $sql;
+}
diff --git a/wms/wipwhole-wipinstallstatus-index.php b/wms/wipwhole-wipinstallstatus-index.php
index eb35d2c3..a8f0e15f 100644
--- a/wms/wipwhole-wipinstallstatus-index.php
+++ b/wms/wipwhole-wipinstallstatus-index.php
@@ -617,6 +617,29 @@ if ((int)$radsY . $radsM > (int)$radeY . $radeM) {
function showDetails(method, contract_type, renovate_type, radsY, radsM, radsYi, start_month) {
$("#myModal").show();
+
+ $.ajax({
+ type: "POST",
+ dataType: "html",
+ url: "wipwhole-wipinstallstatus-index-modal.php",
+ data: {
+ method: method+'Sql',
+ contract_type: contract_type,
+ renovate_type: renovate_type,
+ radsY: radsY,
+ radsM: radsM,
+ radsYi: radsYi,
+ start_month: start_month
+ },
+ success: function(data) {
+ console.log(data);
+ },
+ error: function(data) {
+ console.log(data);
+ }
+ })
+
+
$.ajax({
type: "POST",
dataType: "json",
diff --git a/wms/wipwholeinstall-index-export-excel.php b/wms/wipwholeinstall-index-export-excel.php
index f47ffa72..c3a0b4ea 100644
--- a/wms/wipwholeinstall-index-export-excel.php
+++ b/wms/wipwholeinstall-index-export-excel.php
@@ -175,7 +175,7 @@ if ($_SERVER["REQUEST_METHOD"] == "POST") {
substr($row['tryrun_end_date'], 0, 10),
substr($row['qc_date'], 0, 10),
substr($row['end_qc_date'], 0, 10),
- substr($row['official_check_date'], 0, 10),
+ $row['association_check_type'] == '1' ? "-" : substr($row['official_check_date'], 0, 10),
substr($row['delivery_date'], 0, 10),
accountidToName($row['salesid'])
];
diff --git a/wms/wipwholeinstall-index-table-html.php b/wms/wipwholeinstall-index-table-html.php
index 2311eca7..b5c9bcda 100644
--- a/wms/wipwholeinstall-index-table-html.php
+++ b/wms/wipwholeinstall-index-table-html.php
@@ -172,8 +172,12 @@
|
|
diff --git a/wms/wipwholeinstall-renovate-index-export-excel.php b/wms/wipwholeinstall-renovate-index-export-excel.php
index 41342d30..a5598afa 100644
--- a/wms/wipwholeinstall-renovate-index-export-excel.php
+++ b/wms/wipwholeinstall-renovate-index-export-excel.php
@@ -177,7 +177,7 @@ if ($_SERVER["REQUEST_METHOD"] == "POST") {
substr($row['tryrun_end_date'], 0, 10),
substr($row['qc_date'], 0, 10),
substr($row['end_qc_date'], 0, 10),
- substr($row['official_check_date'], 0, 10),
+ $row['association_check_type'] == '1' ? "-" : substr($row['official_check_date'], 0, 10),
substr($row['delivery_date'], 0, 10),
accountidToName($row['salesid'])
];
diff --git a/wms/wipwholeinstall-renovate-index-table-html.php b/wms/wipwholeinstall-renovate-index-table-html.php
index 2f3dc8f4..7a9715ea 100644
--- a/wms/wipwholeinstall-renovate-index-table-html.php
+++ b/wms/wipwholeinstall-renovate-index-table-html.php
@@ -155,8 +155,12 @@
|
|
|