Browse Source

修復 價審 業務部mi bug

gary
10994015 1 year ago
parent
commit
3e3a03fe11
  1. 3
      wms/contract/contract-new-apply.php
  2. 1
      wms/contract/js/alpine.js
  3. 86
      wms/contract/styles/style.css
  4. 2
      wms/contract/styles/style.css.map
  5. 3
      wms/contract/styles/style.scss
  6. 11
      wms/fun_global.php
  7. 52
      wms/header.php
  8. 1
      wms/mkt/price_option-index.php
  9. 8
      wms/mkt/pricereview-check.php
  10. 4
      wms/mkt/pricereview-index.php
  11. 10
      wms/mkt/pricereview-record-check.php
  12. 17
      wms/mkt/pricereview_renovate-check.php
  13. BIN
      wms/mkt/specsurvey-edit.zip
  14. 2
      wms/mkt/specsurvey-index.php
  15. 2
      wms/mkt/specsurvey_renovate-index.php

3
wms/contract/contract-new-apply.php

@ -1,4 +1,3 @@
<?php
include_once("../header.php");
require_once("./conn.php");
@ -26,6 +25,7 @@ if(empty($contract_new_apply)){
$stmt->bindParam(':id',$id);
$stmt->execute();
$contract = $stmt->fetch(PDO::FETCH_ASSOC);
print_r($contract);
$accounttype = "M";
$sql_str = "SELECT * FROM account WHERE accounttype = :accounttype";
$stmt = $conn->prepare($sql_str);
@ -45,6 +45,7 @@ if(empty($contract_new_apply)){
$stmt->bindParam(':mid', $mid);
$stmt->execute();
$pays = $stmt->fetchAll(PDO::FETCH_ASSOC);
print_r($pays);
$price_a = 0;
$price_b = 0;
foreach($pays as $pay){

1
wms/contract/js/alpine.js

@ -813,6 +813,7 @@ const contractNewInput =()=> {
address:'',
salesman:'',
qc:'',
qc:'',
files:[],
},
step:1,

86
wms/contract/styles/style.css

@ -541,14 +541,14 @@ main table td, main table th {
transform: rotate(360deg);
}
}
.contract-input-component .form, .contract-management .form, .contract-new-apply-component .form {
.contract-input-component .contract-input-component .form, .contract-input-component .contract-management .form, .contract-input-component .contract-new-apply-component .form, .contract-management .contract-input-component .form, .contract-management .contract-management .form, .contract-management .contract-new-apply-component .form, .contract-new-apply-component .contract-input-component .form, .contract-new-apply-component .contract-management .form, .contract-new-apply-component .contract-new-apply-component .form {
margin: 0 auto;
}
.contract-input-component .form .dropdown, .contract-management .form .dropdown, .contract-new-apply-component .form .dropdown {
.contract-input-component .contract-input-component .form .dropdown, .contract-input-component .contract-management .form .dropdown, .contract-input-component .contract-new-apply-component .form .dropdown, .contract-management .contract-input-component .form .dropdown, .contract-management .contract-management .form .dropdown, .contract-management .contract-new-apply-component .form .dropdown, .contract-new-apply-component .contract-input-component .form .dropdown, .contract-new-apply-component .contract-management .form .dropdown, .contract-new-apply-component .contract-new-apply-component .form .dropdown {
width: 100%;
margin-top: 7px;
}
.contract-input-component .form .savebtn, .contract-management .form .savebtn, .contract-new-apply-component .form .savebtn {
.contract-input-component .contract-input-component .form .savebtn, .contract-input-component .contract-management .form .savebtn, .contract-input-component .contract-new-apply-component .form .savebtn, .contract-management .contract-input-component .form .savebtn, .contract-management .contract-management .form .savebtn, .contract-management .contract-new-apply-component .form .savebtn, .contract-new-apply-component .contract-input-component .form .savebtn, .contract-new-apply-component .contract-management .form .savebtn, .contract-new-apply-component .contract-new-apply-component .form .savebtn {
margin-right: 13px;
display: flex;
justify-content: center;
@ -557,11 +557,11 @@ main table td, main table th {
height: 45px;
font-size: 15px;
}
.contract-input-component .form table .fixed, .contract-management .form table .fixed, .contract-new-apply-component .form table .fixed {
.contract-input-component .contract-input-component .form table .fixed, .contract-input-component .contract-management .form table .fixed, .contract-input-component .contract-new-apply-component .form table .fixed, .contract-management .contract-input-component .form table .fixed, .contract-management .contract-management .form table .fixed, .contract-management .contract-new-apply-component .form table .fixed, .contract-new-apply-component .contract-input-component .form table .fixed, .contract-new-apply-component .contract-management .form table .fixed, .contract-new-apply-component .contract-new-apply-component .form table .fixed {
padding: 8px 0;
cursor: not-allowed;
}
.contract-input-component .form table .alerttext, .contract-management .form table .alerttext, .contract-new-apply-component .form table .alerttext {
.contract-input-component .contract-input-component .form table .alerttext, .contract-input-component .contract-management .form table .alerttext, .contract-input-component .contract-new-apply-component .form table .alerttext, .contract-management .contract-input-component .form table .alerttext, .contract-management .contract-management .form table .alerttext, .contract-management .contract-new-apply-component .form table .alerttext, .contract-new-apply-component .contract-input-component .form table .alerttext, .contract-new-apply-component .contract-management .form table .alerttext, .contract-new-apply-component .contract-new-apply-component .form table .alerttext {
font-size: 13px;
color: #a00;
font-weight: 500;
@ -569,86 +569,92 @@ main table td, main table th {
font-weight: 900;
padding: 0;
}
.contract-input-component .form input[type=file], .contract-management .form input[type=file], .contract-new-apply-component .form input[type=file] {
.contract-input-component .contract-input-component .form input[type=file], .contract-input-component .contract-management .form input[type=file], .contract-input-component .contract-new-apply-component .form input[type=file], .contract-management .contract-input-component .form input[type=file], .contract-management .contract-management .form input[type=file], .contract-management .contract-new-apply-component .form input[type=file], .contract-new-apply-component .contract-input-component .form input[type=file], .contract-new-apply-component .contract-management .form input[type=file], .contract-new-apply-component .contract-new-apply-component .form input[type=file] {
padding: 12px 20px;
margin: 8px 0;
}
.contract-input-component .form span, .contract-management .form span, .contract-new-apply-component .form span {
.contract-input-component .contract-input-component .form span, .contract-input-component .contract-management .form span, .contract-input-component .contract-new-apply-component .form span, .contract-management .contract-input-component .form span, .contract-management .contract-management .form span, .contract-management .contract-new-apply-component .form span, .contract-new-apply-component .contract-input-component .form span, .contract-new-apply-component .contract-management .form span, .contract-new-apply-component .contract-new-apply-component .form span {
font-weight: 900;
}
.contract-input-component .form span.successtext, .contract-management .form span.successtext, .contract-new-apply-component .form span.successtext {
.contract-input-component .contract-input-component .form span.successtext, .contract-input-component .contract-management .form span.successtext, .contract-input-component .contract-new-apply-component .form span.successtext, .contract-management .contract-input-component .form span.successtext, .contract-management .contract-management .form span.successtext, .contract-management .contract-new-apply-component .form span.successtext, .contract-new-apply-component .contract-input-component .form span.successtext, .contract-new-apply-component .contract-management .form span.successtext, .contract-new-apply-component .contract-new-apply-component .form span.successtext {
color: #0a0;
}
.contract-input-component .form span.failtext, .contract-management .form span.failtext, .contract-new-apply-component .form span.failtext {
.contract-input-component .contract-input-component .form span.failtext, .contract-input-component .contract-management .form span.failtext, .contract-input-component .contract-new-apply-component .form span.failtext, .contract-management .contract-input-component .form span.failtext, .contract-management .contract-management .form span.failtext, .contract-management .contract-new-apply-component .form span.failtext, .contract-new-apply-component .contract-input-component .form span.failtext, .contract-new-apply-component .contract-management .form span.failtext, .contract-new-apply-component .contract-new-apply-component .form span.failtext {
color: #a00;
}
.contract-input-component .form span.readtext, .contract-management .form span.readtext, .contract-new-apply-component .form span.readtext {
.contract-input-component .contract-input-component .form span.readtext, .contract-input-component .contract-management .form span.readtext, .contract-input-component .contract-new-apply-component .form span.readtext, .contract-management .contract-input-component .form span.readtext, .contract-management .contract-management .form span.readtext, .contract-management .contract-new-apply-component .form span.readtext, .contract-new-apply-component .contract-input-component .form span.readtext, .contract-new-apply-component .contract-management .form span.readtext, .contract-new-apply-component .contract-new-apply-component .form span.readtext {
color: #aa0;
}
.contract-input-component .form input[type=number]::-webkit-outer-spin-button,
.contract-input-component .form input[type=number]::-webkit-inner-spin-button, .contract-management .form input[type=number]::-webkit-outer-spin-button,
.contract-management .form input[type=number]::-webkit-inner-spin-button, .contract-new-apply-component .form input[type=number]::-webkit-outer-spin-button,
.contract-new-apply-component .form input[type=number]::-webkit-inner-spin-button {
.contract-input-component .contract-input-component .form input[type=number]::-webkit-outer-spin-button,
.contract-input-component .contract-input-component .form input[type=number]::-webkit-inner-spin-button, .contract-input-component .contract-management .form input[type=number]::-webkit-outer-spin-button,
.contract-input-component .contract-management .form input[type=number]::-webkit-inner-spin-button, .contract-input-component .contract-new-apply-component .form input[type=number]::-webkit-outer-spin-button,
.contract-input-component .contract-new-apply-component .form input[type=number]::-webkit-inner-spin-button, .contract-management .contract-input-component .form input[type=number]::-webkit-outer-spin-button,
.contract-management .contract-input-component .form input[type=number]::-webkit-inner-spin-button, .contract-management .contract-management .form input[type=number]::-webkit-outer-spin-button,
.contract-management .contract-management .form input[type=number]::-webkit-inner-spin-button, .contract-management .contract-new-apply-component .form input[type=number]::-webkit-outer-spin-button,
.contract-management .contract-new-apply-component .form input[type=number]::-webkit-inner-spin-button, .contract-new-apply-component .contract-input-component .form input[type=number]::-webkit-outer-spin-button,
.contract-new-apply-component .contract-input-component .form input[type=number]::-webkit-inner-spin-button, .contract-new-apply-component .contract-management .form input[type=number]::-webkit-outer-spin-button,
.contract-new-apply-component .contract-management .form input[type=number]::-webkit-inner-spin-button, .contract-new-apply-component .contract-new-apply-component .form input[type=number]::-webkit-outer-spin-button,
.contract-new-apply-component .contract-new-apply-component .form input[type=number]::-webkit-inner-spin-button {
-webkit-appearance: none;
margin: 0;
}
.contract-input-component .form input[type=number], .contract-management .form input[type=number], .contract-new-apply-component .form input[type=number] {
.contract-input-component .contract-input-component .form input[type=number], .contract-input-component .contract-management .form input[type=number], .contract-input-component .contract-new-apply-component .form input[type=number], .contract-management .contract-input-component .form input[type=number], .contract-management .contract-management .form input[type=number], .contract-management .contract-new-apply-component .form input[type=number], .contract-new-apply-component .contract-input-component .form input[type=number], .contract-new-apply-component .contract-management .form input[type=number], .contract-new-apply-component .contract-new-apply-component .form input[type=number] {
-moz-appearance: textfield;
}
.contract-input-component .error, .contract-management .error, .contract-new-apply-component .error {
.contract-input-component .contract-input-component .error, .contract-input-component .contract-management .error, .contract-input-component .contract-new-apply-component .error, .contract-management .contract-input-component .error, .contract-management .contract-management .error, .contract-management .contract-new-apply-component .error, .contract-new-apply-component .contract-input-component .error, .contract-new-apply-component .contract-management .error, .contract-new-apply-component .contract-new-apply-component .error {
display: flex;
flex-direction: column;
margin: 15px;
}
.contract-input-component .error .errortext, .contract-management .error .errortext, .contract-new-apply-component .error .errortext {
.contract-input-component .contract-input-component .error .errortext, .contract-input-component .contract-management .error .errortext, .contract-input-component .contract-new-apply-component .error .errortext, .contract-management .contract-input-component .error .errortext, .contract-management .contract-management .error .errortext, .contract-management .contract-new-apply-component .error .errortext, .contract-new-apply-component .contract-input-component .error .errortext, .contract-new-apply-component .contract-management .error .errortext, .contract-new-apply-component .contract-new-apply-component .error .errortext {
font-size: 16px;
font-weight: 500;
color: #a00;
}
.contract-input-component .input-group-btn, .contract-management .input-group-btn, .contract-new-apply-component .input-group-btn {
.contract-input-component .contract-input-component .input-group-btn, .contract-input-component .contract-management .input-group-btn, .contract-input-component .contract-new-apply-component .input-group-btn, .contract-management .contract-input-component .input-group-btn, .contract-management .contract-management .input-group-btn, .contract-management .contract-new-apply-component .input-group-btn, .contract-new-apply-component .contract-input-component .input-group-btn, .contract-new-apply-component .contract-management .input-group-btn, .contract-new-apply-component .contract-new-apply-component .input-group-btn {
font-size: 16px;
}
@media screen and (max-width: 600px) {
.contract-input-component table, .contract-management table, .contract-new-apply-component table {
.contract-input-component .contract-input-component table, .contract-input-component .contract-management table, .contract-input-component .contract-new-apply-component table, .contract-management .contract-input-component table, .contract-management .contract-management table, .contract-management .contract-new-apply-component table, .contract-new-apply-component .contract-input-component table, .contract-new-apply-component .contract-management table, .contract-new-apply-component .contract-new-apply-component table {
border: 0;
}
.contract-input-component table thead, .contract-management table thead, .contract-new-apply-component table thead {
.contract-input-component .contract-input-component table thead, .contract-input-component .contract-management table thead, .contract-input-component .contract-new-apply-component table thead, .contract-management .contract-input-component table thead, .contract-management .contract-management table thead, .contract-management .contract-new-apply-component table thead, .contract-new-apply-component .contract-input-component table thead, .contract-new-apply-component .contract-management table thead, .contract-new-apply-component .contract-new-apply-component table thead {
display: none;
}
.contract-input-component table tr, .contract-management table tr, .contract-new-apply-component table tr {
.contract-input-component .contract-input-component table tr, .contract-input-component .contract-management table tr, .contract-input-component .contract-new-apply-component table tr, .contract-management .contract-input-component table tr, .contract-management .contract-management table tr, .contract-management .contract-new-apply-component table tr, .contract-new-apply-component .contract-input-component table tr, .contract-new-apply-component .contract-management table tr, .contract-new-apply-component .contract-new-apply-component table tr {
margin-bottom: 10px;
display: block;
border-bottom: 2px solid #ddd;
}
.contract-input-component table td, .contract-management table td, .contract-new-apply-component table td {
.contract-input-component .contract-input-component table td, .contract-input-component .contract-management table td, .contract-input-component .contract-new-apply-component table td, .contract-management .contract-input-component table td, .contract-management .contract-management table td, .contract-management .contract-new-apply-component table td, .contract-new-apply-component .contract-input-component table td, .contract-new-apply-component .contract-management table td, .contract-new-apply-component .contract-new-apply-component table td {
display: block;
text-align: left;
font-size: 14px;
border-bottom: 1px dotted #ccc;
}
.contract-input-component table td:last-child, .contract-management table td:last-child, .contract-new-apply-component table td:last-child {
.contract-input-component .contract-input-component table td:last-child, .contract-input-component .contract-management table td:last-child, .contract-input-component .contract-new-apply-component table td:last-child, .contract-management .contract-input-component table td:last-child, .contract-management .contract-management table td:last-child, .contract-management .contract-new-apply-component table td:last-child, .contract-new-apply-component .contract-input-component table td:last-child, .contract-new-apply-component .contract-management table td:last-child, .contract-new-apply-component .contract-new-apply-component table td:last-child {
border-bottom: 0;
}
.contract-input-component table td:before, .contract-management table td:before, .contract-new-apply-component table td:before {
.contract-input-component .contract-input-component table td:before, .contract-input-component .contract-management table td:before, .contract-input-component .contract-new-apply-component table td:before, .contract-management .contract-input-component table td:before, .contract-management .contract-management table td:before, .contract-management .contract-new-apply-component table td:before, .contract-new-apply-component .contract-input-component table td:before, .contract-new-apply-component .contract-management table td:before, .contract-new-apply-component .contract-new-apply-component table td:before {
content: attr(data-label);
float: left;
text-transform: uppercase;
font-weight: bold;
}
}
.contract-input-component .images, .contract-management .images, .contract-new-apply-component .images {
.contract-input-component .contract-input-component .images, .contract-input-component .contract-management .images, .contract-input-component .contract-new-apply-component .images, .contract-management .contract-input-component .images, .contract-management .contract-management .images, .contract-management .contract-new-apply-component .images, .contract-new-apply-component .contract-input-component .images, .contract-new-apply-component .contract-management .images, .contract-new-apply-component .contract-new-apply-component .images {
display: flex;
flex-wrap: wrap;
padding: 20px;
}
.contract-input-component .images > .image, .contract-management .images > .image, .contract-new-apply-component .images > .image {
.contract-input-component .contract-input-component .images > .image, .contract-input-component .contract-management .images > .image, .contract-input-component .contract-new-apply-component .images > .image, .contract-management .contract-input-component .images > .image, .contract-management .contract-management .images > .image, .contract-management .contract-new-apply-component .images > .image, .contract-new-apply-component .contract-input-component .images > .image, .contract-new-apply-component .contract-management .images > .image, .contract-new-apply-component .contract-new-apply-component .images > .image {
position: relative;
margin: 10px;
}
.contract-input-component .images > .image:hover > i, .contract-management .images > .image:hover > i, .contract-new-apply-component .images > .image:hover > i {
.contract-input-component .contract-input-component .images > .image:hover > i, .contract-input-component .contract-management .images > .image:hover > i, .contract-input-component .contract-new-apply-component .images > .image:hover > i, .contract-management .contract-input-component .images > .image:hover > i, .contract-management .contract-management .images > .image:hover > i, .contract-management .contract-new-apply-component .images > .image:hover > i, .contract-new-apply-component .contract-input-component .images > .image:hover > i, .contract-new-apply-component .contract-management .images > .image:hover > i, .contract-new-apply-component .contract-new-apply-component .images > .image:hover > i {
opacity: 1;
}
.contract-input-component .images > .image > i, .contract-management .images > .image > i, .contract-new-apply-component .images > .image > i {
.contract-input-component .contract-input-component .images > .image > i, .contract-input-component .contract-management .images > .image > i, .contract-input-component .contract-new-apply-component .images > .image > i, .contract-management .contract-input-component .images > .image > i, .contract-management .contract-management .images > .image > i, .contract-management .contract-new-apply-component .images > .image > i, .contract-new-apply-component .contract-input-component .images > .image > i, .contract-new-apply-component .contract-management .images > .image > i, .contract-new-apply-component .contract-new-apply-component .images > .image > i {
position: absolute;
top: -12px;
right: -12px;
@ -657,37 +663,29 @@ main table td, main table th {
opacity: 0;
transition: 0.3s;
}
table {
.contract-input-component table, .contract-management table, .contract-new-apply-component table {
table-layout: fixed;
width: 100%;
}
td {
.contract-input-component td, .contract-management td, .contract-new-apply-component td {
word-wrap: break-word;
}
img {
.contract-input-component img, .contract-management img, .contract-new-apply-component img {
width: 125px;
}
.width_style_1 {
.contract-input-component .width_style_1, .contract-management .width_style_1, .contract-new-apply-component .width_style_1 {
width: 125px;
}
table {
.contract-input-component table, .contract-management table, .contract-new-apply-component table {
width: 100%;
}
#table_index_filter {
.contract-input-component #table_index_filter, .contract-management #table_index_filter, .contract-new-apply-component #table_index_filter {
float: right;
}
#table_index_paginate {
.contract-input-component #table_index_paginate, .contract-management #table_index_paginate, .contract-new-apply-component #table_index_paginate {
float: right;
}
label {
.contract-input-component label, .contract-management label, .contract-new-apply-component label {
display: inline-flex;
margin-bottom: 0.5rem;
margin-top: 0.5rem;

2
wms/contract/styles/style.css.map

File diff suppressed because one or more lines are too long

3
wms/contract/styles/style.scss

@ -562,6 +562,7 @@ main{
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
.contract-input-component, .contract-management, .contract-new-apply-component{
.contract-input-component, .contract-management, .contract-new-apply-component{
.form{
margin:0 auto;
@ -717,5 +718,5 @@ label {
display: inline-flex;
margin-bottom: .5rem;
margin-top: .5rem;
}
}

11
wms/fun_global.php

@ -146,7 +146,7 @@ function check_user_permission($user_id, $token) {
global $link;
// 不檢查清單
$ignore_url_arr = ['/wms/index.php', '/wms/notice-index.php', '/wms/notice-edit.php', '/wms/change-password.php', '/wms/wipwhole-change-contractdate.php', '/wms/wipwhole-change-planning-customer-name.php','/wms/test.php'];
$ignore_url_arr = ['/wms/index.php', '/wms/notice-index.php', '/wms/notice-edit.php', '/wms/change-password.php', '/wms/wipwhole-change-contractdate.php', '/wms/wipwhole-change-planning-customer-name.php','/wms/test.php', '/wms/mkt/pricereview_mi-api.php'];
if (in_array($_SERVER["SCRIPT_NAME"], $ignore_url_arr)) return;
$do = "";
@ -169,6 +169,8 @@ function check_user_permission($user_id, $token) {
mysqli_free_result($res);
if (!$do) {
echo "無權限操作,請洽管理員。";
exit;
echo "<script>alert('無權限操作,請洽管理員。');if (history.length==1) location.href='/wms/index.php?token=".$token."'; else history.go(-1);</script>";
} else return $do;
}
@ -563,3 +565,10 @@ function sign_status($arr) {
}
return $ret;
}
function getAccounttype($link,$user_id){
$sql = "SELECT * FROM account where accountid = '$user_id'";
$data = mysqli_query($link, $sql);
$row = mysqli_fetch_array($data, MYSQLI_ASSOC);
return $row['accounttype'];
}

52
wms/header.php

@ -7,6 +7,18 @@
// $maintenancePage = new MaintenancePage($maintenancePeriod);
// $maintenancePage->displayPage();
function CreateToken($user_id, $user_name) {
date_default_timezone_set("Asia/Taipei");
$start_time = date("Y-m-d H:i:s");
$end_time = date('Y-m-d H:i:s',strtotime('+24 hour')); #设定24小时
$info = $user_id . '.' . base64_encode(urlencode($user_name)) . '.' . $start_time . '.' . $end_time; //设置token过期时间为一天
$encryption_code = "MASADA!^***";
//根据以上信息信息生成签名(密钥为 SIGNATURE 自定义全局常量)
$signature = hash_hmac('md5', $info, $encryption_code);
//最后将这两部分拼接起来,得到最终的Token字符串
return $token = $info . '.' . $signature;
}
require_once dirname(__FILE__) . "/../mkt/database.php";
include "fun_global.php";
@ -21,9 +33,9 @@ if (isset($_REQUEST["function_name"])) {
* 連線T8 MSSQL
*/
try {
$conn = new PDO("sqlsrv:Server=60.244.87.101;Database=T8TEST", "masada", "@m222222");
$conn = new PDO("sqlsrv:Server=10.10.145.2;Database=T8MASADA", "masada", "@m222222");
if ($conn) {
$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
}
} catch (PDOException $e) {
//echo "fail";
@ -42,10 +54,38 @@ try {
* $user_auth 使用權限:1,2,3
*****************************/
$token = $_REQUEST["token"];
$token_link = "token=" . $_REQUEST["token"];
list($user_id, $enc_user_name, $login_dt) = explode(".", $token);
$user_name = urldecode(base64_decode($enc_user_name));
if (count(explode(".", $token)) > 1) {
$token_link = "token=" . $_REQUEST["token"];
list($user_id, $enc_user_name, $login_dt) = explode(".", $token);
$user_name = urldecode(base64_decode($enc_user_name));
} else {
$user_id = !empty($_GET["employee_no"]) ? $_GET["employee_no"] : $user_id;
$login_dt = !empty($_GET["timestamp"]) ? substr($_GET["timestamp"], 0, 10) : $login_dt;
$login_dt = date('Y-m-d H:i:s', $login_dt);
$user_name = accountid2name()[$user_id];
$token = CreateToken($user_id,$user_name);
$token_link = "token=" . $token;
}
include 'IncludeCommon.php';
$includecommon = new IncludeCommon();
$accounttype = getAccounttype($link, $user_id);
$login_json = null;
if (strlen($accounttype) != 0) {
$jsonres['menu'] = $includecommon->menu_v3($user_id, $accounttype);
$login_json = json_encode($jsonres, JSON_UNESCAPED_UNICODE);
}
?>
<script>
res = eval("(" + JSON.stringify(<?php echo $login_json; ?>) + ")");
window.localStorage.setItem("menu_<?php echo $user_id; ?>", res.menu);
</script>
<?php
// echo $token;
// exit;
// uesr可操作權限
$user_auth = check_user_permission($user_id, $token);
@ -145,7 +185,7 @@ $user_auth = check_user_permission($user_id, $token);
@media screen and (max-width: 992px) {
#member_content_phone {
display:inline-grid !important;
display: inline-grid !important;
}
}
</style>

1
wms/mkt/price_option-index.php

@ -106,6 +106,5 @@ $optional_arr = [1=>'標', 2=>'選'];
<script src="./assets/js/alpine.js"></script>
<script>
const options = [...<?php echo json_encode($options); ?>];
console.log(options);
const kind = '<?php echo $kind; ?>';
</script>

8
wms/mkt/pricereview-check.php

@ -310,6 +310,7 @@ $(function () {
$("#checker").prop("disabled", false);
$("#status_n").prop("disabled", false);
$("#status_y").prop("disabled", false);
$("#status_yy").prop("disabled", false);
$("#id").prop("disabled", false);
$("#st").prop("disabled", false);
$('#btn_close').prop("disabled", false);
@ -974,8 +975,11 @@ hr {
</table>
<label>審核人員</label>
<input type="text" name="checker" id="checker" value="<?=$user_id;?>" readonly>
<button type="submit" name="status" id="status_n" value="N" onclick="if (!confirm('確定不同意?')) return false;"><?php echo ($sign_total==$st) ? "結案(不同意)" : "不同意"; ?></button>
<button type="submit" name="status" id="status_y" value="Y" onclick="if (!confirm('確定同意?')) return false;"><?php echo ($sign_total==$st) ? "結案(同意)" : "同意"; ?></button>
<button type="submit" name="status" id="status_n" value="N" onclick="if (!confirm('確定不同意?')) return false;"><?php echo ($sign_total==$st) ? "結案(不同意)" : "不同意(退回)"; ?></button>
<button type="submit" name="status" id="status_y" value="Y" onclick="if (!confirm('確定同意?')) return false;">同意(上呈)</button>
<?php if($st == 3): ?>
<button type="submit" name="status" id="status_yy" value="YY" onclick="if (!confirm('確定同意?')) return false;">同意(結案)</button>
<?php endif; ?>
<?php } else { ?>
<button type="button" id="btn_close" class="btn btn-default">回上頁</button>
<?php } ?>

4
wms/mkt/pricereview-index.php

@ -14,7 +14,7 @@ $sql_cmd = sql_myself($user_id);
if ($user_id == "M0024" || $user_id == "M0107") {
$sql_cmd = "where create_at >= '2023-01-01 00:00:00'";
}
if ($user_id == "M0060") {
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";
@ -357,7 +357,7 @@ if ($user_id=="M0023") {
$str = $uperson = $ustatus = $udtte = "";
if (!empty($sign3)) list($uperson, $ustatus, $udtte) = explode(",", $sign3);
if ($ustatus) {
if ($ustatus == "Y") $str = "<span class=\"glyphicon glyphicon-ok\" title=\"同意\"></span>";
if ($ustatus == "Y" || $ustatus == "YY") $str = "<span class=\"glyphicon glyphicon-ok\" title=\"同意\"></span>";
elseif ($ustatus == "N") $str = "<span class=\"glyphicon glyphicon-ban-circle\" title=\"不同意\"></span>";
$str .= "<br>".$accountname_arr[$uperson]."<br>".$udtte;
} else {

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

@ -59,7 +59,11 @@ if (isset($_POST['status'])) {
$sql2 .= "status = 'YY'";
}
$end_flow = 1;
} else {
}elseif($status == 'YY'){
$sql2 .= "status = 'YY'";
$end_flow = 1;
}
else {
$do_assign = 1;
}
if ($item_no_all) {
@ -82,7 +86,7 @@ if (isset($_POST['status'])) {
mysqli_query($link, $db_query);
}
}
echo $status;
if ($sql) {
$db_query = "update pricereview_sign set $sql where mid = '$id'";
mysqli_query($link, $db_query);
@ -128,6 +132,6 @@ if (isset($_POST['status'])) {
}
mysqli_close($link);
echo "<script type ='text/JavaScript'>";
echo "location.href='pricereview-index.php?function_name=pricereview&".$token_link."';";
echo "location.href='pricereview-check.php?id=".$id."&function_name=pricereview&".$token_link."';";
echo "</script>";
}

17
wms/mkt/pricereview_renovate-check.php

@ -1018,7 +1018,22 @@ hr {
<td><?php echo $dtte2; ?></td>
</tr>
<tr>
<td>業務部協理</td>
<td>
<?php
require_once('./conn.php');
if(!empty($accountname_arr[$person3])){
$sql_str = "SELECT account.accountid, account.department_id, account.role_id,department.* FROM account JOIN department ON account.department_id = department.department_id AND account.role_id = department.role_id WHERE account.name = :name";
$stmt = $conn->prepare($sql_str);
$stmt->bindParam(':name',$accountname_arr[$person3]);
$stmt->execute();
$user = $stmt->fetch(PDO::FETCH_ASSOC);
echo $user['role'];
}else{
echo "業務部協理";
}
?>
</td>
<td><?php echo (empty($accountname_arr[$person3])) ? "---" : $accountname_arr[$person3]; ?></td>
<td><?php echo $checker_3_result; ?></td>
<td><?php echo nl2br($sign3_note); ?></td>

BIN
wms/mkt/specsurvey-edit.zip

Binary file not shown.

2
wms/mkt/specsurvey-index.php

@ -5,7 +5,7 @@ include "../header.php";
$data = array();
// sql語法存在變數中
$sql_cmd = sql_myself($user_id, "s.creater");
if ($user_id == "M0060") $sql_cmd = "";
if ($user_id == "M0060" || $user_id == "M0023") $sql_cmd = "";
$sql2 = (empty($sql_cmd)) ? "where" : "and";
$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)";

2
wms/mkt/specsurvey_renovate-index.php

@ -5,7 +5,7 @@ include "../header.php";
$data = array();
// sql語法存在變數中
$sql_cmd = sql_myself($user_id, "s.creater");
if ($user_id == "M0060") $sql_cmd = "";
if ($user_id == "M0060" || $user_id == "M0023") $sql_cmd = "";
$sql2 = (empty($sql_cmd)) ? "where" : "and";
$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)";

Loading…
Cancel
Save