10994015 1 year ago
parent
commit
b65ceaf62f
  1. 2
      wms/mkt/price_option-index.php
  2. 2
      wms/mkt/price_option-select.php
  3. 2
      wms/mkt/pricereview-check.php
  4. 1
      wms/mkt/pricereview-index.php
  5. 6
      wms/mkt/pricereview-record-check.php
  6. 8
      wms/mkt/pricereview_renovate-index.php

2
wms/mkt/price_option-index.php

@ -3,6 +3,8 @@ include '../header.php';
require_once './conn.php';
$kind = $_GET['kind'];
$sql_str = "SELECT * FROM option_price WHERE kind = :kind AND status ='Y'";
$sql_str = "SELECT option_price.*, option_mi.price as mi FROM option_price LEFT JOIN (SELECT option_mi.option_price_id, option_mi.price FROM option_mi GROUP BY option_mi.option_price_id) option_mi ON option_price.id = option_mi.option_price_id WHERE kind = :kind AND status ='Y'";
$stmt = $conn->prepare($sql_str);
$stmt->bindParam(':kind', $kind);
$stmt->execute();

2
wms/mkt/price_option-select.php

@ -1,8 +1,8 @@
<?php
include "../header.php";
require_once('./conn.php');
$sql_str = "SELECT *, option_mi.price as cost FROM option_price LEFT JOIN (SELECT option_mi.option_price_id, option_mi.price FROM option_mi GROUP BY option_mi.option_price_id) option_mi ON option_price.id = option_mi.option_price_id WHERE status ='Y'";
$sql_str = "SELECT * FROM option_price WHERE status ='Y'";
$sql_str = "SELECT option_price.*, option_mi.price as mi FROM option_price LEFT JOIN (SELECT option_mi.option_price_id, option_mi.price FROM option_mi GROUP BY option_mi.option_price_id) option_mi ON option_price.id = option_mi.option_price_id WHERE status ='Y'";
$stmt = $conn->prepare($sql_str);
$stmt->execute();
$options = $stmt->fetchAll(PDO::FETCH_ASSOC);

2
wms/mkt/pricereview-check.php

@ -1,5 +1,6 @@
<?php
include "../header.php";
$fromsign = isset($_GET['fromsign']) ? $_GET['fromsign'] : 0;
$form_key = isset($_GET['form_key']) ? $_GET['form_key'] : "";
if ($form_key == "") $id = isset($_GET['id']) ? $_GET['id'] : die('ERROR: Record ID not found.');
$st = (empty($_GET["st"])) ? "" : $_GET["st"];
@ -426,6 +427,7 @@ hr {
<form class="form-inline" method="post" action="pricereview-record-check.php" enctype="multipart/form-data">
<input type="hidden" name="id" id="id" value="<?=$id;?>">
<input type="hidden" name="st" id="st" value="<?=$st;?>">
<input type="hidden" name="fromsign" value="<?php echo $fromsign; ?>">
<div class="table-responsive">
<table id="tb1" class="table table-bordered">
<thead>

1
wms/mkt/pricereview-index.php

@ -24,7 +24,6 @@ if (empty($sql_cmd)) $sql = "select pricereview_main.*, contract_new_apply.statu
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);
$para = "function_name=pricereview&".$token_link;
echo $sql;
?>
<style>
#table_index2 {

6
wms/mkt/pricereview-record-check.php

@ -2,6 +2,7 @@
include "../header.php";
if (isset($_POST['status'])) {
$fromsign = $_POST['fromsign'];
foreach ($_POST as $k => $v) {
$$k = htmlspecialchars(stripslashes(trim($v)));
}
@ -130,8 +131,13 @@ if (isset($_POST['status'])) {
end_flow("prm", "prm01", $id, $contractno_h);
}
}
mysqli_close($link);
echo "<script type ='text/JavaScript'>";
if($fromsign == 1){
echo "location.href='../sign/list.php?system_id=prm&flow_id=prm01&function_name=show&".$token_link."';";
}else{
echo "location.href='pricereview-check.php?id=".$id."&function_name=pricereview&".$token_link."';";
}
echo "</script>";
}

8
wms/mkt/pricereview_renovate-index.php

@ -11,15 +11,15 @@ $data = array();
// sql語法存在變數中
$sql_cmd = sql_myself($user_id);
// M0024許伃廷,M0107許紓晴,M0012李盈瑩權限全開
if ($user_id == "M0024" || $user_id == "M0107" || $user_id == "M0012") {
if ($user_id == "M0024" || $user_id == "M0107" || $user_id == "M0012" || $user_id == "M0060") {
$sql_cmd = "where create_at >= '2023-01-01 00:00:00'";
}
if ($user_id == "M0008") {
$sql_cmd = "where creater in (select accountid from account where department_id like '5%')";
}
if ($user_id == "M0060") {
$sql_cmd = "where creater in (select accountid from account where (department_id like '3%' or department_id like '5%'))";
}
// if ($user_id == "M0060") {
// $sql_cmd = "where creater in (select accountid from account where (department_id like '3%' or department_id like '5%'))";
// }
if (empty($sql_cmd)) $sql = "select * from pricereview_main where status like 'Y%' and ekind = '汰改' order by id";
else $sql = "select * from pricereview_main $sql_cmd and status like 'Y%' and ekind = '汰改' order by id";
$data = mysqli_query($link,$sql);

Loading…
Cancel
Save