Browse Source

新梯價審上線

main
10994015 1 year ago
parent
commit
a4cd610e70
  1. 124
      wms/mkt/api/postNewElevatorPricereview.php
  2. 4
      wms/mkt/api/postPricereviewSign.php
  3. BIN
      wms/mkt/api/pricereview-uploads/M24020088報價單.pdf
  4. BIN
      wms/mkt/api/pricereview-uploads/m20240226115529490503載重人乘.xlsx
  5. BIN
      wms/mkt/api/pricereview-uploads/m20240226115529813031M24020088報價單.pdf
  6. BIN
      wms/mkt/api/pricereview-uploads/載重人乘.xlsx
  7. 51
      wms/mkt/assets/js/pricereviewAlpine.js
  8. 17
      wms/mkt/css/pricereview.css
  9. 2
      wms/mkt/css/pricereview.css.map
  10. 17
      wms/mkt/css/pricereview.scss
  11. 6
      wms/mkt/pricereview-index.php
  12. 215
      wms/mkt/pricereviewCheck.php
  13. 73
      wms/mkt/pricereviewCreate.php
  14. 10
      wms/mkt/pricereview_renovate-index.php

124
wms/mkt/api/postNewElevatorPricereview.php

@ -21,10 +21,12 @@ $warranty_rate = $_POST['warranty_rate'];
$keep_rate = $_POST['keep_rate'];
$memo = $_POST['memo'];
$status = $_POST['status'];
$attatch1 = $_POST['attatch1'] =='' ? NULL : $_POST['attatch1'];
$attatch2 = $_POST['attatch2'] =='' ? NULL : $_POST['attatch2'];
$attatch1 = !empty($_FILES['attatch1']) ? $_FILES['attatch1'] : null;
$attatch2 = !empty($_FILES['attatch2']) ? $_FILES['attatch2'] : null;
$creater = $_POST['user_id'];
$create_at = date("Y-m-d H:i:s");
$attatch1_src = null;
$attatch2_src = null;
$elevators = json_decode($_POST['elevators'], true);
@ -35,13 +37,102 @@ $maintainOptions = $_POST['maintainOptions'];
$paymentRatio = json_decode($_POST['paymentRatio'], true);
$conn->beginTransaction();
$sql_str = "SELECT id FROM pricereview_main WHERE contractno = :contractno ORDER BY id DESC LIMIT 1";
$sql_str = "SELECT id, attatch1, attatch2 FROM pricereview_main WHERE contractno = :contractno ORDER BY id DESC LIMIT 1";
$stmt = $conn->prepare($sql_str);
$stmt->bindParam(':contractno', $contractno);
$stmt->execute();
$main = $stmt->fetch(PDO::FETCH_ASSOC);
// -----處理檔案上傳 START-----
if(!empty($attatch1)){
$file = $attatch1;
$file_name = $file['name'];
$file_type = $file['type'];
$tmp_name = $file['tmp_name'];
$file_size = $file['size'];
$error = $file['error'];
$rand = strval(rand(1000,1000000));
$now = (string)date('YmdHis');
$imgsrc = 'm'.$now.$rand.$file_name;
$allow_ext = array('jpeg', 'jpg', 'png', 'gif','JPG','JPEG','PNG','pdf','PDF','docx', 'doc', 'DOCX', 'DOC', 'xlsx', 'xls', 'XLSX', 'XLS');
//設定上傳位置
$path = './pricereview-uploads/';
$attatch1_src = $path.$imgsrc;
if (!file_exists($path)) { mkdir($path); }
if ($error == 0) {
$ext = pathinfo($file_name, PATHINFO_EXTENSION);
if (!in_array($ext, $allow_ext)) {
echo "<script>alert('檔案類型不符合,請選擇 jpg、png、excel、word 、pdf檔案');window.history.go(-1);</script>";
exit('檔案類型不符合,請選擇 jpg、png、excel、word 、pdf檔案');
}
$result = move_uploaded_file($tmp_name, '.'.$attatch1_src);
} else {
//這裡表示上傳有錯誤, 匹配錯誤編號顯示對應的訊息
switch ($error) {
case 1: echo '上傳檔案超過 upload_max_filesize 容量最大值'; break;
case 2: echo '上傳檔案超過 post_max_size 總容量最大值'; break;
case 3: echo '檔案只有部份被上傳'; break;
case 4: echo '沒有檔案被上傳'; break;
case 6: echo '找不到主機端暫存檔案的目錄位置'; break;
case 7: echo '檔案寫入失敗'; break;
case 8: echo '上傳檔案被PHP程式中斷,表示主機端系統錯誤'; break;
}
}
}else{
if($main){
$attatch1_src = $main['attatch1'];
}
}
if(!empty($attatch2)){
$file = $attatch2;
$file_name = $file['name'];
$file_type = $file['type'];
$tmp_name = $file['tmp_name'];
$file_size = $file['size'];
$error = $file['error'];
$rand = strval(rand(1000,1000000));
$now = (string)date('YmdHis');
$imgsrc = 'm'.$now.$rand.$file_name;
$allow_ext = array('jpeg', 'jpg', 'png', 'gif','JPG','JPEG','PNG','pdf','PDF','docx', 'doc', 'DOCX', 'DOC', 'xlsx', 'xls', 'XLSX', 'XLS');
//設定上傳位置
$path = './pricereview-uploads/';
$attatch2_src = $path.$imgsrc;
if (!file_exists($path)) { mkdir($path); }
if ($error == 0) {
$ext = pathinfo($file_name, PATHINFO_EXTENSION);
if (!in_array($ext, $allow_ext)) {
echo "<script>alert('檔案類型不符合,請選擇 jpg、png、excel、word 、pdf檔案');window.history.go(-1);</script>";
exit('檔案類型不符合,請選擇 jpg、png、excel、word 、pdf檔案');
}
$result = move_uploaded_file($tmp_name, '.'.$attatch2_src);
} else {
//這裡表示上傳有錯誤, 匹配錯誤編號顯示對應的訊息
switch ($error) {
case 1: echo '上傳檔案超過 upload_max_filesize 容量最大值'; break;
case 2: echo '上傳檔案超過 post_max_size 總容量最大值'; break;
case 3: echo '檔案只有部份被上傳'; break;
case 4: echo '沒有檔案被上傳'; break;
case 6: echo '找不到主機端暫存檔案的目錄位置'; break;
case 7: echo '檔案寫入失敗'; break;
case 8: echo '上傳檔案被PHP程式中斷,表示主機端系統錯誤'; break;
}
}
}else{
if($main){
$attatch2_src = $main['attatch2'];
}
}
// -----處理檔案上傳 END-----
$conn->beginTransaction();
if($main){
try{
$mid = $main["id"];
@ -60,10 +151,9 @@ if($main){
$stmt->bindParam(':warranty_rate', $warranty_rate);
$stmt->bindParam(':memo', $memo);
$stmt->bindParam(':status', $status);
$stmt->bindParam(':attatch1', $attatch1);
$stmt->bindParam(':attatch2', $attatch2);
$stmt->bindParam(':attatch1', $attatch1_src);
$stmt->bindParam(':attatch2', $attatch2_src);
$stmt->execute();
//整機單價
@ -97,7 +187,8 @@ if($main){
$item_no = $elevator['id'];
$item_group = "A";
$item_spec = $elevator['specifications'] . "-" . $elevator['person'] . "*" . $elevator['stop'] . "-" . $elevator['open_converted'] . $elevator['speed'];
$item_weight = "";
$item_weight = $elevator['weight'];
$item_op = $elevator['open_converted'];
$item_unit_price = $elevator['price'];
@ -126,7 +217,7 @@ if($main){
$item_no = $elevator['id'];
$item_group = "A";
$item_spec = $elevator['specifications'] . "-" . $elevator['person'] . "*" . $elevator['stop'] . "-" . $elevator['open_converted'] . $elevator['speed'];
$item_weight = "";
$item_weight = $elevator['weight'];
$item_op = $elevator['open_converted'];
$item_unit_price = $elevator['price'];
@ -172,9 +263,6 @@ if($main){
$stmt->execute();
}
foreach($onlyInOptionNewIds as $newoptionidx){
$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)";
$option = array_values(array_filter($options, fn($el)=> $el['key'] == $newoptionidx))[0];
$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)
@ -460,8 +548,8 @@ if($main){
$stmt->bindParam(':warranty_rate', $warranty_rate);
$stmt->bindParam(':memo', $memo);
$stmt->bindParam(':status', $status);
$stmt->bindParam(':attatch1', $attatch1);
$stmt->bindParam(':attatch2', $attatch2);
$stmt->bindParam(':attatch1', $attatch1_src);
$stmt->bindParam(':attatch2', $attatch2_src);
$stmt->bindParam(':creater', $creater);
$stmt->bindParam(':create_at', $create_at);
$stmt->execute();
@ -476,8 +564,8 @@ if($main){
$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_weight = $elevator['weight'];
$item_unit_price = $elevator['price'];
$item_qty = (int)$elevator['spec_num'];
@ -655,8 +743,9 @@ if($main){
$stmt->bindParam(':sign_total', $sign_total);
$stmt->execute();
}
$conn->commit();
echo "success";
$conn->commit();
}catch (PDOException $e) {
$conn->rollback();
echo $e->getMessage();
@ -667,3 +756,6 @@ if($main){
function calcWeight($kind, $person){
}

4
wms/mkt/api/postPricereviewSign.php

@ -7,6 +7,7 @@ $sign = $_POST['sign'];
$mid = $_POST['mid'];
$result = $_POST['result'];
$reviewcomment = $_POST['reviewcomment'];
$sign_id = $_POST['currentSignId'];
$signOff = '';
if($result == 'YY' ){
$signOff = 'YY';
@ -21,11 +22,12 @@ try{
$sign_result = $user_id . "," . $signOff . "," . date("Y-m-d H:i:s");
$sql_str = "UPDATE pricereview_sign SET sign" . $sign . "=:sign, sign".$sign."_note = :reviewcomment WHERE mid = :mid ";
$sql_str = "UPDATE pricereview_sign SET sign" . $sign . "=:sign, sign".$sign."_note = :reviewcomment WHERE mid = :mid AND id = :sign_id";
$stmt = $conn->prepare($sql_str);
$stmt->bindParam(':sign', $sign_result);
$stmt->bindParam(':mid', $mid);
$stmt->bindParam(':reviewcomment', $reviewcomment);
$stmt->bindParam(':sign_id', $sign_id);
$stmt->execute();
$sql_str = "UPDATE pricereview_main SET status=:status WHERE id = :id ";

BIN
wms/mkt/api/pricereview-uploads/M24020088報價單.pdf

Binary file not shown.

BIN
wms/mkt/api/pricereview-uploads/m20240226115529490503載重人乘.xlsx

Binary file not shown.

BIN
wms/mkt/api/pricereview-uploads/m20240226115529813031M24020088報價單.pdf

Binary file not shown.

BIN
wms/mkt/api/pricereview-uploads/載重人乘.xlsx

Binary file not shown.

51
wms/mkt/assets/js/pricereviewAlpine.js

@ -49,6 +49,7 @@ const pricereviewCreate = ()=>{
sale_price:'',
facility_id: '',
model:'',
weight:'',
},
otherOptions: [],
modalOtherOptionInfo:{
@ -378,9 +379,10 @@ const pricereviewCreate = ()=>{
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.person == '') return alert("請填入人乘");
if(this.modalElevatorInfo.num == '') return alert("請填入數量");
if(this.modalElevatorInfo.sale_price == '') return alert("請填入售價");
if(this.modalElevatorInfo.weight == '') return alert("請填入載重");
this.total_spec ++;
this.elevators.push({
id: this.total_spec,
@ -395,6 +397,7 @@ const pricereviewCreate = ()=>{
spec_num: this.modalElevatorInfo.num,
facility_id: this.modalElevatorInfo.facility_id,
model: this.modalElevatorInfo.model,
weight: this.modalElevatorInfo.weight,
});
console.log(this.elevators);
this.hideCreateElevatorModal();
@ -411,6 +414,7 @@ const pricereviewCreate = ()=>{
const price = this.elevators[idx].price
const facility_id = this.elevators[idx].facility_id
const model = this.elevators[idx].model
const weight = this.elevators[idx].weight
this.total_spec ++;
this.elevators.push({
@ -426,6 +430,7 @@ const pricereviewCreate = ()=>{
spec_num: spec_num,
facility_id: facility_id,
model: model,
weight: weight,
});
console.log(this.elevators);
},
@ -804,8 +809,11 @@ const pricereviewCreate = ()=>{
errortext += err+'\n';
})
alert(errortext)
return false;
console.log(this.error);
}
return this.error.length > 0 ? false : true
},
submit(){
const validation = this.validation();
@ -829,8 +837,8 @@ const pricereviewCreate = ()=>{
form.append('warranty_rate', this.warranty_rate);
form.append('memo', this.remark);
form.append('status', "YS");
form.append('attatch1', "");
form.append('attatch2', "");
form.append('attatch1', this.attatch1);
form.append('attatch2', this.attatch2);
form.append('user_id', user_id);
form.append('elevators', JSON.stringify(this.elevators));
@ -853,8 +861,8 @@ const pricereviewCreate = ()=>{
})
},
save(){
const validation = this.validation();
if(!validation) return
// const validation = this.validation();
// if(!validation) return
const form = new FormData();
form.append('contractno', contractno);
form.append('ekind', (is_renovation=="Y") ? "汰改" : "新梯");
@ -874,8 +882,8 @@ const pricereviewCreate = ()=>{
form.append('warranty_rate', this.warranty_rate);
form.append('memo', this.remark);
form.append('status', "Y1");
form.append('attatch1', "");
form.append('attatch2', "");
form.append('attatch1', this.attatch1);
form.append('attatch2', this.attatch2);
form.append('user_id', user_id);
form.append('elevators', JSON.stringify(this.elevators));
@ -888,7 +896,7 @@ const pricereviewCreate = ()=>{
form.append('paymentRatio', JSON.stringify(this.paymentRatio));
axios.post('./api/postNewElevatorPricereview.php', form).then(res=>{
console.log(res.status);
console.log(res.data);
if(res.data == "success"){
alert("保存成功!");
window.location.reload();
@ -898,6 +906,14 @@ const pricereviewCreate = ()=>{
console.error(err);
})
},
uploadFiles(e, attatch){
if(attatch == 1){
this.attatch1 = e.target.files[0]
}
if(attatch == 2){
this.attatch2 = e.target.files[0]
}
}
}
}
@ -921,6 +937,7 @@ const pricereviewCheck = ()=>{
this.maintainOptions = items.filter(item=> item.item_group =='D');
this.otherOptions = items.filter(item=> item.item_group =='E');
console.log("optionnnn=>", this.options);
console.log(this.elevators);
this.elevators.forEach((elevator, idx)=>{
this.options.forEach(option=>{
if(option.option_relate_spec == elevator.item_no){
@ -989,7 +1006,6 @@ const pricereviewCheck = ()=>{
break;
}
}
this.getElevatorMi(idx, spec, person, stop, open, speed, elevator.item_weight)
});
@ -1002,6 +1018,12 @@ const pricereviewCheck = ()=>{
},
async getElevatorMi(idx, spec, person, stop, open, speed, item_weight){
console.log("載重=====>",item_weight);
console.log(spec);
console.log(person);
console.log(stop);
console.log(open);
console.log(speed);
console.log(item_weight);
try{
const res = await axios.get('./api/getElevatorMi.php', {params: {
spec: spec,
@ -1044,6 +1066,14 @@ const pricereviewCheck = ()=>{
sign2:'',
sign3:'',
sign4:'',
hideHistorySignModal(){
this.$refs.historySign.style.display = "none";
body.style.overflow = 'auto'
},
openHishtorySignModal(){
this.$refs.historySign.style.display = "block";
body.style.overflow = 'hidden'
},
is_renovate: false,
elevators_total_price: 0,
contractno: contractno,
@ -1112,6 +1142,7 @@ const pricereviewCheck = ()=>{
form.append('result', status);
form.append('user_id', this.user_id);
form.append('reviewcomment', this.reviewcomment);
form.append('currentSignId', currentSignId);
axios.post('./api/postPricereviewSign.php', form).then(res=>{
console.log(res.data);
if(res.data == 1){

17
wms/mkt/css/pricereview.css

@ -1,9 +1,15 @@
@charset "UTF-8";
#pricereviewCreate input[type=text], #pricereviewCreate input[type=number], #pricereviewCreate select {
margin: 1px;
}
#pricereviewCreate textarea {
resize: vertical;
}
#pricereviewCreate select {
-webkit-appearance: none; /* 針對 Chrome, Safari, Opera */
-moz-appearance: none; /* 針對 Firefox */
appearance: none; /* 標準語法 */
}
#pricereviewCreate > .modal {
padding: 20px;
}
@ -18,7 +24,7 @@
}
#pricereviewCreate .container table, #pricereviewCreate .container th, #pricereviewCreate .container td {
border: 1px #ccc solid;
padding: 15px;
padding: 9px;
}
#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;
@ -89,6 +95,7 @@
}
#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;
padding: 0 13px;
}
#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,
@ -147,8 +154,8 @@
#pricereviewCreate .container .pricreviewmain > .filediv label input[type=file] {
width: 400px;
}
#pricereviewCreate .container .pricreviewmain > .filediv label button {
width: 90px;
#pricereviewCreate .container .pricreviewmain > .filediv label a, #pricereviewCreate .container .pricreviewmain > .filediv label button {
width: 100px;
height: 35px;
margin: 0;
margin-right: 15px;
@ -262,6 +269,10 @@
border-radius: 15px;
padding: 20px;
}
#pricereviewCheck > .container .historytable {
max-height: 0;
overflow: hidden;
}
#pricereviewCheck > .container textarea {
resize: vertical;
}

2
wms/mkt/css/pricereview.css.map

@ -1 +1 @@
{"version":3,"sources":["pricereview.scss","pricereview.css"],"names":[],"mappings":"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","file":"pricereview.css"}
{"version":3,"sources":["pricereview.css","pricereview.scss"],"names":[],"mappings":"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","file":"pricereview.css"}

17
wms/mkt/css/pricereview.scss

@ -5,6 +5,11 @@
textarea{
resize: vertical;
}
select{
-webkit-appearance: none; /* 針對 Chrome, Safari, Opera */
-moz-appearance: none; /* 針對 Firefox */
appearance: none; /* 標準語法 */
}
>.modal{
padding: 20px;
table, th, td{
@ -22,12 +27,13 @@
.container{
table, th, td{
border:1px #ccc solid;
padding: 15px;
padding: 9px;
&.noborder, .noborder th, .noborder td{
border:none;
}
}
table{
thead th{
background-color: #6D9EEB;
}
@ -96,6 +102,7 @@
background-color: transparent;
input, select, textarea{
font-size: 13px;
padding: 0 13px;
}
input[type=number]::-webkit-outer-spin-button,
input[type=number]::-webkit-inner-spin-button {
@ -154,8 +161,8 @@
input[type="file"]{
width:400px
}
button{
width:90px;
a, button{
width:100px;
height: 35px;
margin:0;
margin-right: 15px;
@ -274,6 +281,10 @@
background-color: #F2F2F2;
border-radius: 15px;
padding: 20px;
.historytable{
max-height: 0;
overflow: hidden;
}
textarea{
resize: vertical;
}

6
wms/mkt/pricereview-index.php

@ -81,7 +81,7 @@ if (!empty($_GET['check']) && $_GET['check'] == '1') {
</script>
";
}
$sql = "SELECT mid,$sign FROM pricereview_sign WHERE $clause ORDER BY mid";
$sql = "SELECT mid,$sign FROM pricereview_sign WHERE $clause ORDER BY id DESC";
$stmt = $conn->prepare($sql);
$stmt->execute();
@ -401,7 +401,7 @@ if ($data) :
$sign1 = $sign2 = $sign3 = $sign4 = "";
$oneself = ($data["creater"] == $user_id) ? 1 : 0; // 是否為營業員本人
// 簽核狀況
$db_query = "select sign1, sign2, sign3, sign4 from pricereview_sign where mid = '" . $data["id"] . "'";
$db_query = "select sign1, sign2, sign3, sign4 from pricereview_sign where mid = '" . $data["id"] . "' order by id desc";
$res_s = mysqli_query($link, $db_query);
if ($row_s = mysqli_fetch_row($res_s)) {
@ -493,7 +493,7 @@ if ($data) :
<?php
} elseif ($data['status'] == 'YN' && $data['id'] == $maxContractID) {
?>
<a href="pricereview-create.php?vol_no=<?= $data['contractno'] ?>&id=<?= $data['id']; ?>&function_name=specsurvey&token=<?= $token; ?>" class="btn btn-danger btn-sm">重填價審</a>
<a href="pricereviewCreate.php?id=<?= $data['id']; ?>&function_name=specsurvey&token=<?= $token; ?>" class="btn btn-danger btn-sm">重填價審</a>
<?php
}
}

215
wms/mkt/pricereviewCheck.php

@ -57,13 +57,112 @@ $stmt->bindParam(':mid', $id);
$stmt->execute();
$items = $stmt->fetchAll(PDO::FETCH_ASSOC);
$sql_str = "SELECT * FROM pricereview_sign WHERE mid = :mid";
$sql_str = "SELECT * FROM pricereview_sign WHERE mid = :mid ORDER BY id ASC";
$stmt = $conn->prepare($sql_str);
$stmt->bindParam(':mid', $id);
$stmt->execute();
$sign = $stmt->fetch(PDO::FETCH_ASSOC);
$sign_all = $stmt->fetchAll(PDO::FETCH_ASSOC);
$sign = $sign_all[count($sign_all)-1];
$currentSigner = '';
$currentSign = 0;
$currentSignId = $sign['id'];
$historySign = [];
foreach($sign_all as $key=>$sign_item){
if($key == count($sign_all)-1){
break;
}
$signer1 = getSignerName(explode(",", $sign_item['sign1'])[0]);
$sign1_result = explode(",", $sign_item['sign1'])[1];
$sign1_date = explode(",", $sign_item['sign1'])[2];
$sign1_note = $sign_item['sign1_note'];
if($sign1_result == "Y"){
$sign1_result = "同意";
}elseif($sign1_result == "YY"){
$sign1_result = "結案同意";
}elseif($sign1_result == "N"){
$sign1_result = "不同意";
}else{
$sign1_result = "---";
}
if(!empty($sign_item['sign2'])){
$signer2 = getSignerName(explode(",", $sign_item['sign2'])[0]);
$sign2_result = explode(",", $sign_item['sign2'])[1];
$sign2_note = $sign_item['sign2_note'];
$sign2_date = explode(",", $sign_item['sign2'])[2];
if($sign2_result == "Y"){
$sign2_result = "同意";
}elseif($sign2_result == "YY"){
$sign2_result = "結案同意";
}elseif($sign2_result == "N"){
$sign2_result = "不同意";
}else{
$sign2_result = "---";
}
}else{
$signer2 = "---";
$sign2_result = "---";
$sign2_note = "---";
$sign2_date = "---";
$sign2_result = "---";
}
$signer3 = getSignerName(explode(",", $sign_item['sign3'])[0]);
$sign3_result = explode(",", $sign_item['sign3'])[1];
$sign3_note = $sign_item['sign3_note'];
$sign3_date = explode(",", $sign_item['sign3'])[2];
if($sign3_result == "Y"){
$sign3_result = "同意";
}elseif($sign3_result == "YY"){
$sign3_result = "結案同意";
}elseif($sign3_result == "N"){
$sign3_result = "不同意";
}else{
$sign3_result = "---";
}
if(!empty($sign_item['sign4'])){
$signer4 = getSignerName(explode(",", $sign_item['sign4'])[0]);
$sign4_result = explode(",", $sign_item['sign4'])[1];
$sign4_note = $sign_item['sign4_note'];
$sign4_date = explode(",", $sign_item['sign4'])[2];
if($sign4_result == "Y"){
$sign4_result = "同意";
}elseif($sign4_result == "YY"){
$sign4_result = "結案同意";
}elseif($sign4_result == "N"){
$sign4_result = "不同意";
}else{
$sign4_result = "---";
}
}else{
$signer4 = "---";
$sign4_result = "---";
$sign4_note = "---";
$sign4_date = "---";
$sign4_result = "---";
}
$historySign[] = [
'signer1'=>$signer1,
'sign1_result'=> $sign1_result,
'sign1_note'=>$sign1_note,
'sign1_date'=>$sign1_date,
'signer2'=>$signer2,
'sign2_result'=> $sign2_result,
'sign2_note'=>$sign2_note,
'sign2_date'=>$sign2_date,
'signer3'=>$signer3,
'sign3_result'=> $sign3_result,
'sign3_note'=>$sign3_note,
'sign3_date'=>$sign3_date,
'signer4'=>$signer4,
'sign4_result'=> $sign4_result,
'sign4_note'=>$sign4_note,
'sign4_date'=>$sign4_date,
];
}
if($sign){
// Y:已同意 N:不同意 W:待簽
// sign1 => 處長, sign2 => 業務承辦人, sign3 => 協理, sign4 => 總經理
@ -77,7 +176,6 @@ if($sign){
}
}
if($sign['sign2'] == NULL || $sign['sign2'] ==''){
$sign2 = NULL;
}else{
@ -133,28 +231,21 @@ if($sign){
$sign4 = NULL;
}
// $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;
}
function getSignerName($signer){
if($signer == null || $signer == '') return "---";
global $conn;
$sql_str = "SELECT name FROM account WHERE accountid = :signer";
$stmt = $conn->prepare($sql_str);
$stmt->bindParam(':signer', $signer);
$stmt->execute();
$signer = $stmt->fetch(PDO::FETCH_ASSOC);
return $signer['name'];
}
?>
<link rel="stylesheet" href="./css/pricereview.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/axios/1.5.0/axios.min.js" integrity="sha512-aoTNnqZcT8B4AmeCFmiSnDlc4Nj/KPaZyB5G7JnOnUEkdNpCZs1LCankiYi01sLTyWy+m2P+W4XM+BuQ3Q4/Dg==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
@ -162,6 +253,68 @@ if($user_id == "M0174" || $user_id == "M0175" || $user_id == "M0060"){
<script src="./assets/js/pricereviewAlpine.js"></script>
<div id="pricereviewCheck" x-data=pricereviewCheck()>
<div class="window-modal " x-ref="historySign" id="historySign">
<div class="window-modal-content modal-lg">
<div class="window-modal-header">
<h4>歷史簽核紀錄</h4>
<button class="btn btn-close" @click="hideHistorySignModal()">X</button>
</div>
<div class="window-modal-body">
<div>
<table class="table historytable" style="width:700px">
<thead>
<tr>
<th>審核</th>
<th>審核人</th>
<th>結果</th>
<th>意見</th>
<th>時間</th>
</tr>
</thead>
<tbody>
<?php foreach($historySign as $key=>$history): ?>
<tr>
<td colspan="5"></td>
</tr>
<tr>
<td>區經理</td>
<td><?php echo $history['signer1']; ?></td>
<td><?php echo $history['sign1_result']; ?></td>
<td><?php echo $history['sign1_note']; ?></td>
<td><?php echo $history['sign1_date']; ?></td>
</tr>
<tr>
<td>業務承辦人</td>
<td><?php echo $history['signer2']; ?></td>
<td><?php echo $history['sign2_result']; ?></td>
<td><?php echo $history['sign2_note']; ?></td>
<td><?php echo $history['sign2_date']; ?></td>
</tr>
<tr>
<td>業務部協理</td>
<td><?php echo $history['signer3']; ?></td>
<td><?php echo $history['sign3_result']; ?></td>
<td><?php echo $history['sign3_note']; ?></td>
<td><?php echo $history['sign3_date']; ?></td>
</tr>
<tr>
<td>總經理</td>
<td><?php echo $history['signer4']; ?></td>
<td><?php echo $history['sign4_result']; ?></td>
<td><?php echo $history['sign4_note']; ?></td>
<td><?php echo $history['sign4_date']; ?></td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal" @click="hideHistorySignModal()">關閉</button>
</div>
</div>
<div class="window-back" @click="hideHistorySignModal()"></div>
</div>
<div class="container">
<table class="table customerinfo-table" >
<tbody>
@ -651,7 +804,9 @@ if($user_id == "M0174" || $user_id == "M0175" || $user_id == "M0060"){
</tbody>
</table>
<li>營業權限85%以上;85-80%呈至區處長審核;80%以下呈至總經理審核。</li>
<?php if(count($historySign) > 0): ?>
<button class="btn btn-primary" style="margin:8px 0 16px;" @click="openHishtorySignModal()">歷史簽核紀錄</button>
<?php endif; ?>
<table class="table" style="width:700px">
<thead>
<tr>
@ -691,7 +846,7 @@ if($user_id == "M0174" || $user_id == "M0175" || $user_id == "M0060"){
echo "同意";
}elseif($sign2 == 'N'){
echo "不同意";
}elseif($sign2 == 'W'){
}elseif($sign2 == 'W' && $contract['status'] == 'YS'){
echo "待簽核";
}else{
echo "---";
@ -712,7 +867,7 @@ if($user_id == "M0174" || $user_id == "M0175" || $user_id == "M0060"){
echo "結案同意";
}elseif($sign3 == 'N'){
echo "不同意";
}elseif($sign3 == 'W'){
}elseif($sign3 == 'W' && $contract['status'] == 'YS'){
echo "待簽核";
}else{
echo "---";
@ -738,7 +893,7 @@ if($user_id == "M0174" || $user_id == "M0175" || $user_id == "M0060"){
echo "同意";
}elseif($sign4 == 'N' && $contract['status'] == 'YN'){
echo "不同意";
}elseif($sign4 == 'W' && $contract['status'] == 'YS'){
}elseif($sign4 == 'W' && $contract['status'] == 'YS' ){
echo "待簽核";
}else{
echo "---";
@ -780,14 +935,24 @@ if($user_id == "M0174" || $user_id == "M0175" || $user_id == "M0060"){
<button class="btn btn-primary" @click="check(<?php echo $currentSign; ?>, 'YY')">同意(結案)</button>
<?php endif; ?>
<?php } ?>
<?php if($contract['attatch1']!=null): ?>
<a class="btn btn-primary" href="./<?php echo $contract['attatch1']; ?>" download="<?php echo $contract['contractno'] . "報價單"; ?>">下載報價單</a>
<?php else: ?>
<a href="javascript:;" class="btn btn-primary" @click="alert('營業員未上傳報價單!')">下載報價單</a>
<?php endif; ?>
<?php if($contract['attatch2']!=null): ?>
<a class="btn btn-primary" href="./<?php echo $contract['attatch2']; ?>" download="<?php echo $contract['contractno'] . "附表一"; ?>">下載附表一</a>
<?php else: ?>
<a href="javascript:;" class="btn btn-primary" @click="alert('營業員未上傳附表一!')">下載附表一</a>
<?php endif; ?>
</div>
</div>
</div>
<script>
const body = document.querySelector('body')
const mid = <?php echo $contract['id']; ?>;
const contractno = '<?php echo $contract['contractno']; ?>';
const person_name = '<?php echo $contract['person_name']; ?>';
@ -819,4 +984,6 @@ if($user_id == "M0174" || $user_id == "M0175" || $user_id == "M0060"){
console.log('sign2====>', sign2);
const sign3 = '<?php echo ($sign) ? explode(',', $sign['sign3'])[0] : "---" ?>';
const sign4 = '<?php echo ($sign) ? explode(',', $sign['sign4'])[0] : "---" ?>';
const currentSignId = '<?php echo $currentSignId; ?>';
</script>

73
wms/mkt/pricereviewCreate.php

@ -13,11 +13,16 @@ foreach ($options as $key => $option) {
$options[$key]['selected'] = 0;
}
$vol_no = "";
$main = false;
if(isset($_GET['vol_no'])){
$vol_no = $_GET['vol_no'];
$sql_str = "SELECT * FROM pricereview_main WHERE contractno=:contractno ORDER BY id DESC LIMIT 1";
$stmt = $conn->prepare($sql_str);
$stmt->bindParam(':contractno', $vol_no);
$stmt->execute();
$main = $stmt->fetch(PDO::FETCH_ASSOC);
}
$main = false;
if(isset($_GET['id'])){
$id = $_GET['id'];
$sql_str = "SELECT * FROM pricereview_main WHERE id=:id ORDER BY id DESC LIMIT 1";
@ -112,6 +117,7 @@ if($main){
'price' => $elevator['price'],
'spec_num' => $elevator['item_qty'],
'facility_id' => $elevator['facility_id'],
'weight'=> $elevator['item_weight'],
];
if($elevator['item_no'] > $total_spec){
$total_spec = $elevator['item_no'];
@ -569,9 +575,9 @@ function convertDateTimeFormat($dateTimeStr) {
<table class="table">
<tr class="table-active">
<th>電梯</th>
<th>人乘/載重</th>
<th>人乘</th>
<th>載重(KG)</th>
<th>停數</th>
<th>速度</th>
</tr>
<tr>
<td>
@ -580,10 +586,10 @@ function convertDateTimeFormat($dateTimeStr) {
<option value="MAE100">MAE100有機房</option>
<option value="MAM200">MAM200無機房</option>
<option value="MAH100">MAH100小電梯</option>
<option value="MAF100">MAE100貨梯(有機房)</option>
<option value="MAF100">MAF100貨梯(有機房)</option>
<option value="MAQ100">MAQ100強趨梯</option>
<option value="MAP100">MAP100平台梯</option>
<?php if($hope_customer['is_renovation']): ?>
<?php if($hope_customer['is_renovation'] == 'Y'): ?>
<option value="M1">M1(系統更新)</option>
<option value="M1+M4(1:1)">M1+M4(1:1)系統+主機</option>
<option value="M1+M4(2:1)">M1+M4(2:1)系統+主機</option>
@ -607,32 +613,22 @@ function convertDateTimeFormat($dateTimeStr) {
</select>
</td>
<td>
<input type="number" class="form-control" style="width:83px" x-model="modalElevatorInfo.stop" @keyup="getModalElevatorPrice()" @change="getModalElevatorPrice()" />
<input type="number" class="form-control" style="width:93px" x-model="modalElevatorInfo.weight" @keyup="getModalElevatorPrice()" @change="getModalElevatorPrice()">
</td>
<td>
<select name="" id="" class="form-control" x-model="modalElevatorInfo.speed" @change="getModalElevatorPrice()" >
<option value="">請選擇</option>
<option value="9">9</option>
<option value="24">24</option>
<option value="30">30</option>
<option value="45">45</option>
<option value="60">60</option>
<option value="90">90</option>
<option value="105">105</option>
<option value="120">120</option>
<option value="150">150</option>
</select>
<input type="number" class="form-control" style="width:93px" x-model="modalElevatorInfo.stop" @keyup="getModalElevatorPrice()" @change="getModalElevatorPrice()" />
</td>
</tr>
<tr class="table-active">
<th>開門方式</th>
<th>速度</th>
<th>規格</th>
<th>數量</th>
<th></th>
</tr>
<tr>
<td>
<select name="" id="" class="form-control" style="width:83px" x-model="modalElevatorInfo.open" @change="getModalElevatorPrice()">
<select name="" id="" class="form-control" style="width:93px" x-model="modalElevatorInfo.open" @change="getModalElevatorPrice()">
<option value="CO">CO</option>
<option value="2S">2S</option>
<option value="2U">CO</option>
@ -640,14 +636,27 @@ function convertDateTimeFormat($dateTimeStr) {
<option value="6PCO">6PCO</option>
</select>
</td>
<td>
<select name="" id="" class="form-control" style="width:93px" x-model="modalElevatorInfo.speed" @change="getModalElevatorPrice()" >
<option value="">請選擇</option>
<option value="9">9</option>
<option value="24">24</option>
<option value="30">30</option>
<option value="45">45</option>
<option value="60">60</option>
<option value="90">90</option>
<option value="105">105</option>
<option value="120">120</option>
<option value="150">150</option>
</select>
</td>
<td>
<input type="text" x-show="!modalElevatorInfo.price || modalElevatorInfo.price ==''" class="form-control" disabled />
<input type="text" x-show="modalElevatorInfo.price > 0" class="form-control" disabled x-model="modalElevatorInfo.model">
</td>
<td>
<input type="number" class="form-control" style="width:83px" x-model="modalElevatorInfo.num" >
<input type="number" class="form-control" style="width:93px" x-model="modalElevatorInfo.num" >
</td>
<td></td>
</tr>
<tr class="table-active">
<th>公司發布價(單價)</th>
@ -892,7 +901,8 @@ function convertDateTimeFormat($dateTimeStr) {
<tr>
<th>項次</th>
<th>電梯</th>
<th>人乘/<br>載重</th>
<th>人乘</th>
<th>載重(KG)</th>
<th>停數</th>
<th>速度(m/min)</th>
<th>開門方式</th>
@ -941,7 +951,10 @@ function convertDateTimeFormat($dateTimeStr) {
</select>
</td>
<td>
<input class="form-control" type="number" style="width:50px;padding-left:5px" x-model="elevator.stop" @keyup="getElevatorPrice(idx)" />
<input class="form-control" type="number" style="width:50px;padding-left:5px" x-model="elevator.weight" @keyup="getElevatorPrice(idx)" @change="getElevatorPrice(idx)" />
</td>
<td>
<input class="form-control" type="number" style="width:50px;padding-left:5px" x-model="elevator.stop" @keyup="getElevatorPrice(idx)" @change="getElevatorPrice(idx)" />
</td>
<td>
<select name="" id="" class="form-control" style="width:63px" x-model="elevator.speed" @change="getElevatorPrice(idx)">
@ -989,7 +1002,7 @@ function convertDateTimeFormat($dateTimeStr) {
</template>
<template x-if="elevators.length > 0">
<tr>
<td colspan=8>小計</td>
<td colspan=9>小計</td>
<td><input type="text" class="form-control" disabled :value="totalElevatorsNum()" style="width:40px;padding-left:5px"></td>
<td><input type="text" class="form-control" disabled :value="totalElevatorsPrice().toLocaleString()" ></td>
<td></td>
@ -1419,13 +1432,19 @@ function convertDateTimeFormat($dateTimeStr) {
<label style="font-size:13px">▪️ 營業權限85%以上;85-80%呈至區處長審核;80%以下呈至總經理審核。</label>
<label for="">
<p>報價單</p>
<input type="file" class="form-control" x-model="attatch1" />
<input type="file" class="form-control" multiple draggable="true" @change="uploadFiles($event, 1)" />
</label>
<label for="">
<p>附表</p>
<input type="file" class="form-control" x-model="attatch2" />
<input type="file" class="form-control" multiple draggable="true" @change="uploadFiles($event, 2)" />
</label>
<label for="">
<?php if(!empty($main) && $main['attatch1'] != null): ?>
<a class="btn btn-primary" href="<?php echo $main['attatch1']; ?>" download="<?php echo $main['contractno']; ?>報價單">下載報價單</a>
<?php endif; ?>
<?php if(!empty($main) && $main['attatch2'] != null): ?>
<a class="btn btn-primary" href="<?php echo $main['attatch2']; ?>" download="<?php echo $main['contractno']; ?>附表一">下載附表一</a>
<?php endif; ?>
<button class="btn btn-primary" @click="save()">保存</button>
<button class="btn btn-primary" @click="submit()">送審</button>
</label>

10
wms/mkt/pricereview_renovate-index.php

@ -292,7 +292,7 @@ if ($data) :
}
}
?>
<a href="pricereview_renovate-check.php?id=<?php echo $data['id'] . "&" . $para; ?>" class="btn btn-warning btn-sm">檢視</a>
<a href="pricereviewCheck.php?id=<?php echo $data['id'] . "&" . $para; ?>" class="btn btn-warning btn-sm">檢視</a>
</td>
<td>
<?php
@ -306,7 +306,7 @@ if ($data) :
if ($sign_st == 1 && $sign_nt == $user_id && $data["status"] == "YS") {
$str = "<span class=\"glyphicon glyphicon-user\"></span>";
$str = "待簽核";
$str = "<a href=\"pricereview_renovate-check.php?st=1&id=" . $data["id"] . "&" . $para . "\" class=\"btn btn-primary btn-sm\">" . $str . "</a>";
$str = "<a href=\"pricereviewCheck.php?st=1&id=" . $data["id"] . "&" . $para . "\" class=\"btn btn-primary btn-sm\">" . $str . "</a>";
} else $str = "--";
}
echo $str;
@ -355,7 +355,7 @@ if ($data) :
if ($sign_st == 2 && $sign_nt == $user_id && $data["status"] == "YS") {
$str = "<span class=\"glyphicon glyphicon-user\"></span>";
$str = "待簽核";
$str = "<a href=\"pricereview_renovate-check.php?st=2&id=" . $data["id"] . "&" . $para . "\" class=\"btn btn-primary btn-sm\">" . $str . "</a>";
$str = "<a href=\"pricereviewCheck.php?st=2&id=" . $data["id"] . "&" . $para . "\" class=\"btn btn-primary btn-sm\">" . $str . "</a>";
} else $str = "--";
}
echo $str;
@ -373,7 +373,7 @@ if ($data) :
if (($data["status"] == "YS") && ($sign_st == 3) && ($sign_nt == $user_id)) {
$str = "<span class=\"glyphicon glyphicon-user\"></span>";
$str = "待簽核";
$str = "<a href=\"pricereview_renovate-check.php?st=3&id=" . $data["id"] . "&" . $para . "\" class=\"btn btn-primary btn-sm\">" . $str . "</a>";
$str = "<a href=\"pricereviewCheck.php?st=3&id=" . $data["id"] . "&" . $para . "\" class=\"btn btn-primary btn-sm\">" . $str . "</a>";
} else $str = "--";
}
echo $str;
@ -419,7 +419,7 @@ if ($data) :
if (($data["status"] == "YS") && ($sign_st == 4) && ($sign_nt == $user_id)) {
$str = "<span class=\"glyphicon glyphicon-user\"></span>";
$str = "待簽核";
$str = "<a href=\"pricereview_renovate-check.php?st=4&id=" . $data["id"] . "&" . $para . "\" class=\"btn btn-primary btn-sm\">" . $str . "</a>";
$str = "<a href=\"pricereviewCheck.php?st=4&id=" . $data["id"] . "&" . $para . "\" class=\"btn btn-primary btn-sm\">" . $str . "</a>";
} else $str = "--";
}
echo $str;

Loading…
Cancel
Save