Browse Source

價審流程

main
Cheng 1 year ago
parent
commit
392852f3d6
  1. 2
      wms/cont/sign_list.php
  2. 11
      wms/crm/crmm01-index.php
  3. 2
      wms/crm/crmm02-index.php
  4. 37
      wms/mkt/pricereview-check.php
  5. 20
      wms/mkt/pricereview-index.php
  6. 2
      wms/mkt/pricereview_renovate-index.php
  7. 10
      wms/mkt/specsurvey-index.php
  8. 10
      wms/mkt/specsurvey_renovate-index.php

2
wms/cont/sign_list.php

@ -41,7 +41,7 @@ $res = mysqli_query($link, $sql);
$row = mysqli_fetch_row($res); $row = mysqli_fetch_row($res);
$user_department_id = $row[0]; $user_department_id = $row[0];
mysqli_free_result($res); mysqli_free_result($res);
if (in_array($user_department_id, $depart_arr) || $user_id == "M0008" || $user_id == "M0012" || $user_id == "M0006" || $user_id =="M0189") $where = ""; 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 = []; $elevator_brand_arr = [];

11
wms/crm/crmm01-index.php

@ -41,7 +41,7 @@ $where .= " and salesman_name like '$salesman'";
$sql_cmd = sql_myself($user_id, "salesman"); $sql_cmd = sql_myself($user_id, "salesman");
// max,許紓晴,林慧珊,鄭伊岑 // max,許紓晴,林慧珊,鄭伊岑
if (in_array($user_department_id, $depart_arr) || $user_id == "M0060" || $user_id == "M0107" || $user_id == "M0193" || $user_id == "M0149" || $user_id =="M0189") $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 == "TEST01" || $user_id == "TEST02" || $user_id == "TEST03" || $user_id == "TEST04") $sql_cmd = "";
if (!empty($sql_cmd)) $where .= " and " . str_replace("where", "", $sql_cmd); if (!empty($sql_cmd)) $where .= " and " . str_replace("where", "", $sql_cmd);
/* /*
$checkAll = ['p0044', 'M0007']; $checkAll = ['p0044', 'M0007'];
@ -73,19 +73,24 @@ $data = mysqli_query($link, $sql);
table-layout: fixed; table-layout: fixed;
width: 100%; width: 100%;
} }
#table_index2_filter { #table_index2_filter {
float: right; float: right;
} }
#table_index2_paginate { #table_index2_paginate {
float: right; float: right;
} }
div.dataTables_scrollHead table.dataTable { div.dataTables_scrollHead table.dataTable {
margin-bottom: 0 !important; margin-bottom: 0 !important;
border-bottom-width: 0; border-bottom-width: 0;
} }
div.dataTables_scrollBody table.dataTable { div.dataTables_scrollBody table.dataTable {
border-top-width: 0; border-top-width: 0;
} }
/* /*
.col-sm-12 { .col-sm-12 {
width: auto; width: auto;
@ -97,7 +102,9 @@ $(function () {
$('#table_index2').DataTable({ $('#table_index2').DataTable({
"scrollX": true, "scrollX": true,
"pageLength": 10, "pageLength": 10,
order: [[13, 'desc']] order: [
[13, 'desc']
]
}); });
document.querySelector("#table_index2_filter > label > input").placeholder = "快速搜尋"; document.querySelector("#table_index2_filter > label > input").placeholder = "快速搜尋";
}); });

2
wms/crm/crmm02-index.php

@ -42,7 +42,7 @@ $where .= " and salesman like '$salesman'";
$lm_name = empty($_GET['linkman']) ? "%" : $_GET['linkman']; $lm_name = empty($_GET['linkman']) ? "%" : $_GET['linkman'];
$where .= " and linkman like '$lm_name'"; $where .= " and linkman like '$lm_name'";
$sql_cmd = sql_myself($user_id, "salesman"); $sql_cmd = sql_myself($user_id, "salesman");
if (in_array($user_department_id, $depart_arr) || $user_id == "M0060" || $user_id == "M0149" || $user_id == "M0189") $sql_cmd = ""; // M0060:Max,鄭伊岑 if (in_array($user_department_id, $depart_arr) || $user_id == "M0060" || $user_id == "M0149" || $user_id == "M0189" || $user_id == "TEST01" || $user_id == "TEST02" || $user_id == "TEST03" || $user_id == "TEST04") $sql_cmd = ""; // M0060:Max,鄭伊岑
if (!empty($sql_cmd)) $where .= " and " . str_replace("where", "", $sql_cmd); if (!empty($sql_cmd)) $where .= " and " . str_replace("where", "", $sql_cmd);
$sql = "SELECT vol_no,customer,manager,salesman,f_return_content('customer_source',source ) source, $sql = "SELECT vol_no,customer,manager,salesman,f_return_content('customer_source',source ) source,

37
wms/mkt/pricereview-check.php

@ -352,28 +352,44 @@ $(function () {
$('button[name=status]').click(function() { $('button[name=status]').click(function() {
var itemNoArr = []; var itemNoArr = [];
$("input[name='item_no']").each(function(){ itemNoArr.push($(this).val()); }) $("input[name='item_no']").each(function() {
itemNoArr.push($(this).val());
})
$('#item_no_all').val(itemNoArr); $('#item_no_all').val(itemNoArr);
var itemPriceArr = []; var itemPriceArr = [];
$("input[name='item_price']").each(function(){ itemPriceArr.push($(this).val().replace(/[,]+/g,"")); }) $("input[name='item_price']").each(function() {
itemPriceArr.push($(this).val().replace(/[,]+/g, ""));
})
$('#item_price_all').val(itemPriceArr); $('#item_price_all').val(itemPriceArr);
var pvRateArr = []; var pvRateArr = [];
$("input[name='pv_rate']").each(function(){ pvRateArr.push($(this).val()); }) $("input[name='pv_rate']").each(function() {
pvRateArr.push($(this).val());
})
$('#pv_rate_all').val(pvRateArr); $('#pv_rate_all').val(pvRateArr);
var allocateArr = []; var allocateArr = [];
$("input[name='allocate']").each(function(){ allocateArr.push($(this).val()); }) $("input[name='allocate']").each(function() {
allocateArr.push($(this).val());
})
$('#allocate_all').val(allocateArr); $('#allocate_all').val(allocateArr);
var grossProfitArr = []; var grossProfitArr = [];
$("input[name='gross_profit']").each(function(){ grossProfitArr.push($(this).val().replace(/[,]+/g,"")); }) $("input[name='gross_profit']").each(function() {
grossProfitArr.push($(this).val().replace(/[,]+/g, ""));
})
$('#gross_profit_all').val(grossProfitArr); $('#gross_profit_all').val(grossProfitArr);
var grossProfitRateArr = []; var grossProfitRateArr = [];
$("input[name='gross_profit_rate']").each(function(){ grossProfitRateArr.push($(this).val().replace(/[,]+/g,"")); }) $("input[name='gross_profit_rate']").each(function() {
grossProfitRateArr.push($(this).val().replace(/[,]+/g, ""));
})
$('#gross_profit_rate_all').val(grossProfitRateArr); $('#gross_profit_rate_all').val(grossProfitRateArr);
var noteArr = []; var noteArr = [];
$("input[name='note']").each(function(){ noteArr.push($(this).val()); }) $("input[name='note']").each(function() {
noteArr.push($(this).val());
})
$('#note_all').val(noteArr); $('#note_all').val(noteArr);
var miFixArr = []; var miFixArr = [];
$("input[name='mi_fix']").each(function(){ miFixArr.push($(this).val().replace(/[,]+/g,"")); }) $("input[name='mi_fix']").each(function() {
miFixArr.push($(this).val().replace(/[,]+/g, ""));
})
$('#mi_fix_all').val(miFixArr); $('#mi_fix_all').val(miFixArr);
}); });
$('#btn_close').click(function() { $('#btn_close').click(function() {
@ -388,19 +404,24 @@ $(function () {
.container { .container {
width: 1350px; width: 1350px;
} }
.nextline { .nextline {
width: 100%; width: 100%;
height: 0; height: 0;
} }
.modal-dialog { .modal-dialog {
width: 1200px; width: 1200px;
} }
.modal-content { .modal-content {
height: 660px; height: 660px;
} }
.dollar-right { .dollar-right {
text-align: right; text-align: right;
} }
hr { hr {
border: 0; border: 0;
border-bottom: 1px dashed #ccc; border-bottom: 1px dashed #ccc;

20
wms/mkt/pricereview-index.php

@ -12,7 +12,7 @@ $data = array();
$sql_cmd = sql_myself($user_id, "pricereview_main .creater"); $sql_cmd = sql_myself($user_id, "pricereview_main .creater");
$sql = "select pricereview_main.*, contract_new_apply.status as applystatus from pricereview_main left join contract_new_apply on pricereview_main.id = contract_new_apply.mid where pricereview_main.creater = '$user_id' and pricereview_main.status like 'Y%' and pricereview_main.ekind = '新梯' order by pricereview_main.id"; $sql = "select pricereview_main.*, contract_new_apply.status as applystatus from pricereview_main left join contract_new_apply on pricereview_main.id = contract_new_apply.mid where pricereview_main.creater = '$user_id' and pricereview_main.status like 'Y%' and pricereview_main.ekind = '新梯' order by pricereview_main.id";
// M0024許伃廷,M0107許紓晴權限全開 // M0024許伃廷,M0107許紓晴權限全開
if ($user_id == "M0024" || $user_id == "M0107" || $user_id == "M0174" || $user_id == "M0189" ) { if ($user_id == "M0024" || $user_id == "M0107" || $user_id == "M0174" || $user_id == "M0189" || $user_id == "TEST01" || $user_id == "TEST02" || $user_id == "TEST03" || $user_id == "TEST04") {
$sql_cmd = "where create_at >= '2023-01-01 00:00:00'"; $sql_cmd = "where create_at >= '2023-01-01 00:00:00'";
$sql = "select pricereview_main.*, contract_new_apply.status as applystatus from pricereview_main left join contract_new_apply on pricereview_main.id = contract_new_apply.mid where create_at >= '2023-01-01 00:00:00' and pricereview_main.status like 'Y%' and pricereview_main.ekind = '新梯' order by pricereview_main.id"; $sql = "select pricereview_main.*, contract_new_apply.status as applystatus from pricereview_main left join contract_new_apply on pricereview_main.id = contract_new_apply.mid where create_at >= '2023-01-01 00:00:00' and pricereview_main.status like 'Y%' and pricereview_main.ekind = '新梯' order by pricereview_main.id";
} }
@ -22,7 +22,9 @@ if ($user_id == "M0060" ) {
} }
if (empty($sql_cmd)) $sql = "select pricereview_main.*, contract_new_apply.status as applystatus from pricereview_main left join contract_new_apply on pricereview_main.id = contract_new_apply.mid where pricereview_main.status like 'Y%' and pricereview_main.ekind = '新梯' order by pricereview_main.id"; if (empty($sql_cmd)) $sql = "select pricereview_main.*, contract_new_apply.status as applystatus from pricereview_main left join contract_new_apply on pricereview_main.id = contract_new_apply.mid where pricereview_main.status like 'Y%' and pricereview_main.ekind = '新梯' order by pricereview_main.id";
else $sql = "select pricereview_main.*, contract_new_apply.status as applystatus from pricereview_main left join contract_new_apply on contract_new_apply.mid = pricereview_main.id $sql_cmd and pricereview_main.status like 'Y%' and pricereview_main.ekind = '新梯' order by pricereview_main.id"; else $sql = "select pricereview_main.*, contract_new_apply.status as applystatus from pricereview_main left join contract_new_apply on contract_new_apply.mid = pricereview_main.id $sql_cmd and pricereview_main.status like 'Y%' and pricereview_main.ekind = '新梯' order by pricereview_main.id";
$data = mysqli_query($link, $sql); $data = mysqli_query($link, $sql);
$para = "function_name=pricereview&" . $token_link; $para = "function_name=pricereview&" . $token_link;
?> ?>
<style> <style>
@ -30,19 +32,24 @@ $para = "function_name=pricereview&".$token_link;
table-layout: fixed; table-layout: fixed;
width: 100%; width: 100%;
} }
#table_index2_filter { #table_index2_filter {
float: right; float: right;
} }
#table_index2_paginate { #table_index2_paginate {
float: right; float: right;
} }
div.dataTables_scrollHead table.dataTable { div.dataTables_scrollHead table.dataTable {
margin-bottom: 0 !important; margin-bottom: 0 !important;
border-bottom-width: 0; border-bottom-width: 0;
} }
div.dataTables_scrollBody table.dataTable { div.dataTables_scrollBody table.dataTable {
border-top-width: 0; border-top-width: 0;
} }
/* /*
.col-sm-12 { .col-sm-12 {
width: auto; width: auto;
@ -62,22 +69,28 @@ label {
margin-top: .5rem; margin-top: .5rem;
} }
div a:hover { div a:hover {
text-decoration: none; text-decoration: none;
} }
.btn-sm { .btn-sm {
font-size: 14px; font-size: 14px;
margin: 2px 0; margin: 2px 0;
line-height: 90%; line-height: 90%;
} }
.glyphicon-ok, .glyphicon-ban-circle {
.glyphicon-ok,
.glyphicon-ban-circle {
font-size: 130%; font-size: 130%;
} }
.btn-secondary { .btn-secondary {
color: #fff; color: #fff;
background-color: #6c757d; background-color: #6c757d;
border-color: #6c757d; border-color: #6c757d;
} }
.btn-secondary:hover { .btn-secondary:hover {
color: #fff; color: #fff;
background-color: #5a6268; background-color: #5a6268;
@ -249,6 +262,7 @@ if ($user_id=="M0023") {
<?php <?php
$str = $uperson = $ustatus = $udtte = ""; $str = $uperson = $ustatus = $udtte = "";
if (!empty($sign1)) list($uperson, $ustatus, $udtte) = explode(",", $sign1); if (!empty($sign1)) list($uperson, $ustatus, $udtte) = explode(",", $sign1);
// echo $sign1;
if ($ustatus) { if ($ustatus) {
if ($ustatus == "Y") $str = "<span class=\"glyphicon glyphicon-ok\" title=\"同意\"></span>"; if ($ustatus == "Y") $str = "<span class=\"glyphicon glyphicon-ok\" title=\"同意\"></span>";
elseif ($ustatus == "N") $str = "<span class=\"glyphicon glyphicon-ban-circle\" title=\"不同意\"></span>"; elseif ($ustatus == "N") $str = "<span class=\"glyphicon glyphicon-ban-circle\" title=\"不同意\"></span>";
@ -435,6 +449,7 @@ if ($user_id=="M0023") {
font-size: 13px; font-size: 13px;
} }
.applybtn:hover { .applybtn:hover {
background-color: #1494f9; background-color: #1494f9;
color: #fff; color: #fff;
@ -468,6 +483,7 @@ if ($user_id=="M0023") {
</table> </table>
</div> </div>
<?php <?php
else : else :
echo "<h2>There is no record!</h2>"; echo "<h2>There is no record!</h2>";
endif; endif;

2
wms/mkt/pricereview_renovate-index.php

@ -11,7 +11,7 @@ $data = array();
// sql語法存在變數中 // sql語法存在變數中
$sql_cmd = sql_myself($user_id); $sql_cmd = sql_myself($user_id);
// M0024許伃廷,M0107許紓晴,M0012李盈瑩權限全開 // M0024許伃廷,M0107許紓晴,M0012李盈瑩權限全開
if ($user_id == "M0024" || $user_id == "M0107" || $user_id == "M0012" || $user_id == "M0060" || $user_id == "M0189") { if ($user_id == "M0024" || $user_id == "M0107" || $user_id == "M0012" || $user_id == "M0060" || $user_id == "M0189" || $user_id == "TEST01" || $user_id == "TEST02" || $user_id == "TEST03" || $user_id == "TEST04") {
$sql_cmd = "where create_at >= '2023-01-01 00:00:00'"; $sql_cmd = "where create_at >= '2023-01-01 00:00:00'";
} }
if ($user_id == "M0008") { if ($user_id == "M0008") {

10
wms/mkt/specsurvey-index.php

@ -5,7 +5,7 @@ include "../header.php";
$data = array(); $data = array();
// sql語法存在變數中 // sql語法存在變數中
$sql_cmd = sql_myself($user_id, "s.creater"); $sql_cmd = sql_myself($user_id, "s.creater");
if ($user_id == "M0060" || $user_id == "M0189") $sql_cmd = ""; if ($user_id == "M0060" || $user_id == "M0189" || $user_id == "TEST01" || $user_id == "TEST02" || $user_id == "TEST03" || $user_id == "TEST04") $sql_cmd = "";
$sql2 = (empty($sql_cmd)) ? "where" : "and"; $sql2 = (empty($sql_cmd)) ? "where" : "and";
$sql2 .= " s.mid = p.id and p.ekind = '新梯' "; $sql2 .= " s.mid = p.id and p.ekind = '新梯' ";
$sql2 .= "and (s.mid, s.pr_item_id, s.sub_item_id, s.version) in (select s.mid, s.pr_item_id, s.sub_item_id, max(s.version) from specsurvey_main s, pricereview_main p where s.mid = p.id group by s.mid, s.pr_item_id, s.sub_item_id)"; $sql2 .= "and (s.mid, s.pr_item_id, s.sub_item_id, s.version) in (select s.mid, s.pr_item_id, s.sub_item_id, max(s.version) from specsurvey_main s, pricereview_main p where s.mid = p.id group by s.mid, s.pr_item_id, s.sub_item_id)";
@ -40,29 +40,37 @@ table {
table-layout: fixed; table-layout: fixed;
width: 100%; width: 100%;
} }
td { td {
word-wrap: break-word; word-wrap: break-word;
} }
img { img {
width: 125px; width: 125px;
} }
.width_style_1 { .width_style_1 {
width: 125px; width: 125px;
} }
table { table {
width: 100%; width: 100%;
} }
#table_index_filter { #table_index_filter {
float: right; float: right;
} }
#table_index_paginate { #table_index_paginate {
float: right; float: right;
} }
label { label {
display: inline-flex; display: inline-flex;
margin-bottom: .5rem; margin-bottom: .5rem;
margin-top: .5rem; margin-top: .5rem;
} }
.btn-sm { .btn-sm {
font-size: 14px; font-size: 14px;
margin: 2px 0; margin: 2px 0;

10
wms/mkt/specsurvey_renovate-index.php

@ -5,7 +5,7 @@ include "../header.php";
$data = array(); $data = array();
// sql語法存在變數中 // sql語法存在變數中
$sql_cmd = sql_myself($user_id, "s.creater"); $sql_cmd = sql_myself($user_id, "s.creater");
if ($user_id == "M0060" || $user_id == "M0189") $sql_cmd = ""; if ($user_id == "M0060" || $user_id == "M0189" || $user_id == "TEST01" || $user_id == "TEST02" || $user_id == "TEST03" || $user_id == "TEST01" || $user_id == "TEST02" || $user_id == "TEST03" || $user_id == "TEST04") $sql_cmd = "";
$sql2 = (empty($sql_cmd)) ? "where" : "and"; $sql2 = (empty($sql_cmd)) ? "where" : "and";
$sql2 .= " s.mid = p.id and p.ekind = '汰改' "; $sql2 .= " s.mid = p.id and p.ekind = '汰改' ";
$sql2 .= "and (s.mid, s.pr_item_id, s.sub_item_id, s.version) in (select s.mid, s.pr_item_id, s.sub_item_id, max(s.version) from specsurvey_main s, pricereview_main p where s.mid = p.id group by s.mid, s.pr_item_id, s.sub_item_id)"; $sql2 .= "and (s.mid, s.pr_item_id, s.sub_item_id, s.version) in (select s.mid, s.pr_item_id, s.sub_item_id, max(s.version) from specsurvey_main s, pricereview_main p where s.mid = p.id group by s.mid, s.pr_item_id, s.sub_item_id)";
@ -40,29 +40,37 @@ table {
table-layout: fixed; table-layout: fixed;
width: 100%; width: 100%;
} }
td { td {
word-wrap: break-word; word-wrap: break-word;
} }
img { img {
width: 125px; width: 125px;
} }
.width_style_1 { .width_style_1 {
width: 125px; width: 125px;
} }
table { table {
width: 100%; width: 100%;
} }
#table_index_filter { #table_index_filter {
float: right; float: right;
} }
#table_index_paginate { #table_index_paginate {
float: right; float: right;
} }
label { label {
display: inline-flex; display: inline-flex;
margin-bottom: .5rem; margin-bottom: .5rem;
margin-top: .5rem; margin-top: .5rem;
} }
.btn-sm { .btn-sm {
font-size: 14px; font-size: 14px;
margin: 2px 0; margin: 2px 0;

Loading…
Cancel
Save