Browse Source

獎金計算

gary
Cheng 1 year ago
parent
commit
4e2ce3009e
  1. 69
      wms/bons/api/get.php
  2. 118
      wms/bons/bons_index.php
  3. 3
      wms/contract-repair/contract-repair-input.php
  4. 77
      wms/contract-repair/js/alpine.js
  5. 1
      wms/contract/api/postContractData.php
  6. 2
      wms/contract/connt8.php
  7. 15
      wms/contract/connt8_test.php
  8. 268
      wms/mkt/pricereview-edit.php

69
wms/bons/api/get.php

@ -0,0 +1,69 @@
<?php
require_once('../../contract/connt8.php');
if (!empty($_GET['contract_no'])) {
$contract_no = $_GET['contract_no'];
$sql = "SELECT
a.BillNo,
b.OTaxAmt as amount,
a.CU_EstPayDate as createDate,
b.PersonId as personId,
c.BillNo as CBno,
c.CU_MaterialId as facility
FROM salIncomeApplyDetail as a
LEFT JOIN salIncomeApplyMaster as b ON a.BillNo = b.BillNo
LEFT JOIN (
SELECT aMaster.BillNo,aMaster.BizPartnerId,aDetail.CU_MaterialId FROM arCheckBill as aMaster
LEFT JOIN arCheckBillDetail as aDetail ON aMaster.BizPartnerId = aDetail.FromBillNo
WHERE aMaster.BizPartnerId = 'Q23080067' AND aMaster.TypeId = 'RVS'
) AS c ON a.BillNo = c.BizPartnerId
WHERE a.BillNo = 'Q23080067'
AND a.RowNo = '1'
";
$stmt = $connT8->prepare($sql);
$stmt->execute();
$data = $stmt->fetch(PDO::FETCH_ASSOC);
$data['amount'] = intval($data['amount']);
$checkBillNo = $data['CBno'];
$sql = "SELECT
c.BillDate AS CheckBillDate
FROM arWriteOffBill AS a
LEFT JOIN arWriteOffBillRec AS b ON a.BillNo=b.BillNo
LEFT JOIN
(SELECT temp1.*,arWriteOffBillDetail.* FROM arWriteOffBillDetail
LEFT JOIN
(SELECT
arCheckBill.BillNo AS checkBillNo, arCheckBill.BillDate,arCheckBillInvInfo.InvoiceNo
FROM arCheckBill
LEFT JOIN arCheckBillInvInfo
ON arCheckBill.InvoiceBillNo=arCheckBillInvInfo.InvoiceBillNo) AS temp1
ON temp1.checkBillNo = arWriteOffBillDetail.FromBillNo) AS c
ON a.BillNo=c.BillNo
WHERE c.checkBillNo = '$checkBillNo'
";
$stmt = $connT8->prepare($sql);
$stmt->execute();
$check = $stmt->fetch(PDO::FETCH_ASSOC);
$sql = "SELECT SQuantity FROM salIncomeApplyMaster WHERE BillNo = '$contract_no'";
$stmt = $connT8->prepare($sql);
$stmt->execute();
$result = $stmt->fetch(PDO::FETCH_ASSOC);
$count = COUNT($result);
$data['maintain_month'] = intval($conunt * $result['Squantity'])
if (!empty($check['CheckBillDate'])) {
header('Content-Type: application/json');
echo json_encode($data);
} else {
echo false;
exit;
}
}

118
wms/bons/bons_index.php

@ -0,0 +1,118 @@
<?php
include('../header.php');
require_once('../contract-repair/conn.php');
?>
<link rel="stylesheet" href="../contract-repair/styles/style.css">
<link rel="stylesheet" href="../contract-repair/semantic/dist/semantic.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.2/css/all.min.css" integrity="sha512-z3gLpd7yknf1YoNbCzqRKc4qyor8gaKU1qmn+CShxbuBusANI9QpRohGBreCFkKxLhei6S9CQXFEbbKuqLg0DA==" crossorigin="anonymous" referrerpolicy="no-referrer" />
<script src="../contract-repair/js/alpine.js"></script>
<script defer src="../contract-repair/js/alpinejs/cdn.min.js"></script>
<script src="../contract-repair/js/axios/axios.min.js"></script>
<script src="../contract-repair/js/jquery/jquery-3.1.1.min.js"></script>
<script src="../contract-repair/semantic/dist/semantic.min.js"></script>
<div class="bons_index" x-data="bonsIndex">
<div class="form" method="post" id="form" enctype="multipart/form-data">
<input type="hidden" name="form_name" value="main_form">
<div>
<table class="table table-bordered query-table table-striped table-bordered display compact" style="width:99%;margin-left:.5%">
<thead>
<tr>
<td colspan="8">
<h3 style='text-align:center'>獎金計算</h3>
</td>
</tr>
</thead>
<template x-if="step==1">
<tbody style="font-weight: bolder;margin: botton 20px;">
<tr>
<td style="vertical-align: middle;">合約號</td>
<td colspan="5">
<input class="form-control" @keyup="nextStepKeyupFn($event)" type="text" name="contract_no" x-model="data.contract_no">
</td>
<td colspan="2" style="vertical-align:middle"></td>
</tr>
</tbody>
</template>
<template x-if="step==2">
<tbody style="font-weight: bolder;margin-bottom:20px">
<tr>
<td colspan="7" style="vertical-align:middle;border-right:0px">
<h4>獎金確認項</h4>
</td>
<td class="text-right" style="border: left 0px;">
<button type="button" id="btn_back" class="btn btn-default" onclick="window.history.back();">返回</button>
<button type="button" id="btn_close" class="btn btn-default" onclick="window.close()">關閉</button>
</td>
</tr>
<tr>
<td style="vertical-align:middle">合約號</td>
<td>
<input type="text" x-model="data.contract_no" disabled="disabled">
</td>
<td style="vertical-align:middle">合約類別</td>
<td>
<select id="client_type" x-model="data.client_type">
<option value="">--請選擇--</option>
<option value="1">新簽約</option>
<option value="2">免保轉有費</option>
<option value="3">續簽約</option>
</select>
</td>
<td style="vertical-align:middle">作番號</td>
<td>
<input type="text" x-model="data.facility_no" disabled="disabled">
</td>
<td style="vertical-align:middle">獎金適用版本</td>
<td>
<input type="text" x-model="data.bons_verson" disabled="disabled">
</td>
</tr>
<tr>
<td style="vertical-align:middle">獎金發放人員</td>
<td>
<input type="text" x-model="data.receiver" disabled="disabled">
</td>
<td style="vertical-align:middle">保養月份</td>
<td>
<input type="text" x-model="data.maintain_month" disabled="disabled">
</td>
<td style="vertical-align:middle">保養總額</td>
<td>
<input type="text" x-model="data.maintain_price_toal" disabled="disabled">
</td>
</tr>
</tbody>
</template>
</table>
<button x-show="step==3" @click="save()" :disabled="isLoading" type="button" class="btn btn-primary btn-lg pull-right savebtn">
<template x-if="!isLoading">
<span>存檔</span>
</template>
<template x-if="isLoading">
<div class="loader"></div>
</template>
</button>
<button x-show="step<=2" @click="nextStepFn()" type="button" class="btn btn-primary btn-lg pull-right savebtn" :disabled="isLoading">
<template x-if="!isLoading">
<span>下一步</span>
</template>
<template x-if="isLoading">
<div class="loader"></div>
</template>
</button>
<button x-show="step>1" @click="preStepFn()" :disabled="isLoading" type="button" class="btn btn-primary btn-lg pull-right savebtn">
<template x-if="!isLoading">
<span>上一步</span>
</template>
<template x-if="isLoading">
<div class="loader"></div>
</template>
</button>
</div>
</div>
</div>

3
wms/contract-repair/contract-repair-input.php

@ -48,7 +48,6 @@ $contract_stauts = ["合約簽回", "採購", "工程發包", "工程中", "修
<td style="vertical-align: middle">報價單編號</td>
<td colspan="5">
<input class="form-control" @keyup="nextStepKeyupFn($event)" type="text" name="repair_no" x-model="data.repair_no">
</td>
<td colspan="2" style="vertical-align: middle">
<label for="customize">
@ -68,7 +67,7 @@ $contract_stauts = ["合約簽回", "採購", "工程發包", "工程中", "修
<h4>業務確認項</h4>
</td>
<td class="text-right" style='border-left:0px;'>
<button type="button" id="btn_close" class="btn btn-default" onclick="window.history.back();">返回</button>
<button type="button" id="btn_back" class="btn btn-default" onclick="window.history.back();">返回</button>
<button type="button" id="btn_close" class="btn btn-default" onclick="window.close();">關閉分頁</button>
</td>
</tr>

77
wms/contract-repair/js/alpine.js

@ -873,3 +873,80 @@ const contract_edit = () => {
}
}
const bonsIndex = () => {
return {
data: {
contract_no: 'Q23080067',
client_type: '',
facility_no: '',
bons_verson: '',
receiver: '',
maintain_month: '',
maintain_price_toal: ''
},
step: 1,
isLoading: false,
fail_arr: [],
nextStepFn() {
if (this.step == 1) {
if (this.data.contract_no == '') return alert('請輸入合約號');
this.isLoading = true;
this.getContractData();
} else if (this.step == 2) {
if (!this.data.disabled) {
this.createElevator();
}
}
this.step = 3;
},
nextStepKeyupFn(e) {
if (e.keyCode !== 13) return;
if (this.step == 1) {
if (this.data.contract_no == '') return alert('請輸入合約號');
this.isLoading = true;
this.getContractData();
} else if (this.step == 2) {
this.step = 3; s
}
},
getContractData() {
axios.get('./api/get.php?contract_no=' + this.data.contract_no).then(res => {
if (!res.data) {
this.step = 2;
this.isLoading = false;
return;
}
if (!this.customize) {
this.data.contract_no = res.data.BillNo;
this.data.facility_no = res.data.facility;
this.data.bons_verson = res.data.bons_verson;
this.data.receiver = res.data.personId;
this.data.maintain_price_toal = res.data.amount;
this.data.bons_verson = 2;
}
this.step = 2;
this.isLoading = false;
}).catch(err => {
})
},
preStepFn() {
if (this.step == 2) {
console.log
}
},
save() {
},
errorFn() {
let msg = '';
for (let i = 0; i < this.fail_arr.length; i++) {
msg += this.fail_arr[i] + '、';
}
alert(msg);
},
}
}

1
wms/contract/api/postContractData.php

@ -596,6 +596,7 @@ function T8insert($data, $facilityno)
$result = T8API($API_body);
if ($result['Status'] == 'Error' || $result['Status'] == 'Fails') {
http_response_code(404);
die('Error!:' . $result['ErrorMsg']);
}

2
wms/contract/connt8.php

@ -4,7 +4,7 @@ include "/Users/LO_2342/Desktop/httpdocs/wms/fun_global.php";
// phpinfo();
// exit();
try {
$connT8 = new PDO("sqlsrv:Server=220.130.203.251;Database=T8TEST", "M0225", "IFFBU1E=");
$connT8 = new PDO("sqlsrv:Server=220.130.203.251;Database=T8masada", "M0225", "IFFBU1E=");
if ($connT8) {
$connT8->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
}

15
wms/contract/connt8_test.php

@ -0,0 +1,15 @@
<?php
require_once dirname(__FILE__) . "/../../mkt/database.php";
include "/Users/LO_2342/Desktop/httpdocs/wms/fun_global.php";
// phpinfo();
// exit();
try {
$connT8 = new PDO("sqlsrv:Server=220.130.203.251;Database=T8test", "M0225", "IFFBU1E=");
if ($connT8) {
$connT8->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
}
} catch (PDOException $e) {
// echo "fail";
// echo $e->getMessage();
die("ERROR!!!: " . $e->getMessage());
}

268
wms/mkt/pricereview-edit.php

@ -157,89 +157,121 @@ foreach ($res as $data) {
width: 100%;
height: 100%;
}
.c_iframe {
width: 1350px;
height: 500px;
margin-right: auto;
margin-left: auto;
}
.container {
width: 1350px;
}
.nextline {
width: 100%;
height: 0;
}
#btnadd, #btnadd2, #btnadd3, #btnadd4, a[name=btndel], a[name=btndel2], a[name=btndel3], a[name=btndel4] {
#btnadd,
#btnadd2,
#btnadd3,
#btnadd4,
a[name=btndel],
a[name=btndel2],
a[name=btndel3],
a[name=btndel4] {
margin-left: 4px;
}
tr th svg {
vertical-align: text-top;
}
tr select {
margin: 8px;
}
.modal-dialog {
width: 1200px;
}
.modal-content {
height: 660px;
}
#optionModal .modal-body {
height: 540px;
overflow-y: auto;
}
#optionFaciModal .modal-body {
font-size: 16px;
}
#optionFaciModal .modal-dialog {
margin-top: 200px;
width: 400px;
}
#optionFaciModal .modal-content {
height: auto;
}
ol li {
margin-left: -20px;
line-height: 160%;
}
a[name=optdel] {
font-size: 13px;
text-decoration: none;
}
.dollar-right {
text-align: right;
}
.kind-title {
background-color: black;
color: white;
font-size: 18px;
}
.kind-col {
color: brown;
}
.col-md-6 {
width: 100%;
}
#table_index2_filter label {
width: 30%;
}
#table_index2 {
cursor: pointer;
}
.notice {
margin: 0 0 -2px 10px;
color: red;
}
.btn2:hover {
color: #fff;
}
button[name=btnpost] {
margin-top: 12px;
}
input[type=checkbox] {
margin: 8px;
}
.star {
color: red;
font-weight: bold;
@ -533,10 +565,18 @@ $(function(){
});
});
$('#deposit_rate').keyup(function(){ $(this).val($(this).val().replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')); });
$('#keep_rate').keyup(function(){ $(this).val($(this).val().replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')); });
$('#warranty_rate').keyup(function(){ $(this).val($(this).val().replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')); });
$('#special_fee').keyup(function(){ $(this).val($(this).val().replace(/\D/g, "").replace(/\B(?=(\d{3})+(?!\d))/g, ",")); });
$('#deposit_rate').keyup(function() {
$(this).val($(this).val().replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1'));
});
$('#keep_rate').keyup(function() {
$(this).val($(this).val().replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1'));
});
$('#warranty_rate').keyup(function() {
$(this).val($(this).val().replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1'));
});
$('#special_fee').keyup(function() {
$(this).val($(this).val().replace(/\D/g, "").replace(/\B(?=(\d{3})+(?!\d))/g, ","));
});
// $('#tb1').on('click', tt);
$('#tb1').on('keyup', 'input[name=item_price_bp]', function() {
@ -790,49 +830,79 @@ $(function(){
$('button[name=submit],button[name=save').click(function() {
var itemFpidArr = [];
$("input[name='fp_id']").each(function(){ if ($(this).val() != '') itemFpidArr.push($(this).val()); })
$("input[name='fp_id']").each(function() {
if ($(this).val() != '') itemFpidArr.push($(this).val());
})
$('#fp_id_all').val(itemFpidArr);
var fpKindArr = [];
$("select[name='fp_kind']").each(function(){ if ($(this).val() != '') fpKindArr.push($(this).val()); })
$("select[name='fp_kind']").each(function() {
if ($(this).val() != '') fpKindArr.push($(this).val());
})
$('#fp_kind_all').val(fpKindArr);
var fpSeatArr = [];
$("select[name='fp_seat']").each(function(){ if ($(this).val() != '') fpSeatArr.push($(this).val()); })
$("select[name='fp_seat']").each(function() {
if ($(this).val() != '') fpSeatArr.push($(this).val());
})
$('#fp_seat_all').val(fpSeatArr);
var fpNumberofstopArr = [];
$("input[name='fp_numberofstop']").each(function(){ if ($(this).val() != '') fpNumberofstopArr.push($(this).val()); })
$("input[name='fp_numberofstop']").each(function() {
if ($(this).val() != '') fpNumberofstopArr.push($(this).val());
})
$('#fp_numberofstop_all').val(fpNumberofstopArr);
var fpSpeedArr = [];
$("select[name='fp_speed']").each(function(){ if ($(this).val() != '') fpSpeedArr.push($(this).val()); })
$("select[name='fp_speed']").each(function() {
if ($(this).val() != '') fpSpeedArr.push($(this).val());
})
$('#fp_speed_all').val(fpSpeedArr);
var itemOpArr = [];
$("select[name='item_op']").each(function(){ if ($(this).val() != '') itemOpArr.push($(this).val()); })
$("select[name='item_op']").each(function() {
if ($(this).val() != '') itemOpArr.push($(this).val());
})
$('#item_op_all').val(itemOpArr);
var itemWeightArr = [];
$("input[name='item_weight']").each(function(){ if ($(this).val() != '') itemWeightArr.push($(this).val()); })
$("input[name='item_weight']").each(function() {
if ($(this).val() != '') itemWeightArr.push($(this).val());
})
$('#item_weight_all').val(itemWeightArr);
var itemSpecArr = [];
$("input[name='item_spec']").each(function(){ itemSpecArr.push($(this).val()); })
$("input[name='item_spec']").each(function() {
itemSpecArr.push($(this).val());
})
$('#item_spec_all').val(itemSpecArr);
var itemGroupArr = [];
$("input[name='item_group']").each(function(){ itemGroupArr.push($(this).val()); })
$("input[name='item_group']").each(function() {
itemGroupArr.push($(this).val());
})
$('#item_group_all').val(itemGroupArr);
var itemUnitPriceArr = [];
$("input[name='item_unit_price']").each(function(){ itemUnitPriceArr.push($(this).val().replace(/[,]+/g,"")); })
$("input[name='item_unit_price']").each(function() {
itemUnitPriceArr.push($(this).val().replace(/[,]+/g, ""));
})
$('#item_unit_price_all').val(itemUnitPriceArr);
var itemQtyArr = [];
$("input[name='item_qty']").each(function(){ itemQtyArr.push($(this).val().replace(/[,]+/g,"")); })
$("input[name='item_qty']").each(function() {
itemQtyArr.push($(this).val().replace(/[,]+/g, ""));
})
$('#item_qty_all').val(itemQtyArr);
var itemQtyOriArr = [];
$("input[name='item_qty_ori']").each(function(){ itemQtyOriArr.push($(this).val().replace(/[,]+/g,"")); })
$("input[name='item_qty_ori']").each(function() {
itemQtyOriArr.push($(this).val().replace(/[,]+/g, ""));
})
$('#item_qty_ori_all').val(itemQtyOriArr);
var itemPriceBpArr = [];
$("input[name='item_price_bp']").each(function(){ itemPriceBpArr.push($(this).val().replace(/[,]+/g,"")); })
$("input[name='item_price_bp']").each(function() {
itemPriceBpArr.push($(this).val().replace(/[,]+/g, ""));
})
$('#item_price_bp_all').val(itemPriceBpArr);
var itemPriceCtArr = [];
$("input[name='item_price_ct']").each(function(){ itemPriceCtArr.push($(this).val().replace(/[,]+/g,"")); })
$("input[name='item_price_ct']").each(function() {
itemPriceCtArr.push($(this).val().replace(/[,]+/g, ""));
})
$('#item_price_ct_all').val(itemPriceCtArr);
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);
var grossProfitArr = [];
$("input[name='gross_profit']").each(function() {
@ -840,116 +910,190 @@ $(function(){
})
$('#gross_profit_all').val(grossProfitArr);
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);
var noteArr = [];
$("input[name='note']").each(function(){ noteArr.push($(this).val()); })
$("input[name='note']").each(function() {
noteArr.push($(this).val());
})
$('#note_all').val(noteArr);
var payKindArr = [];
$("input[name='pay_kind']").each(function(){ payKindArr.push($(this).val()); })
$("input[name='pay_kind']").each(function() {
payKindArr.push($(this).val());
})
$('#pay_kind_all').val(payKindArr);
var payScaleArr = [];
$("input[name='pay_scale']").each(function(){ payScaleArr.push($(this).val()); })
$("input[name='pay_scale']").each(function() {
payScaleArr.push($(this).val());
})
$('#pay_scale_all').val(payScaleArr);
var payAmountArr = [];
$("input[name='pay_amount']").each(function(){ payAmountArr.push($(this).val().replace(/[,]+/g,"")); })
$("input[name='pay_amount']").each(function() {
payAmountArr.push($(this).val().replace(/[,]+/g, ""));
})
$('#pay_amount_all').val(payAmountArr);
var payPeriodArr = [];
$("select[name='pay_period']").each(function(){ payPeriodArr.push($(this).val()); })
$("select[name='pay_period']").each(function() {
payPeriodArr.push($(this).val());
})
$('#pay_period_all').val(payPeriodArr);
var payIdArr = [];
$("input[name='pay_id']").each(function(){ payIdArr.push($(this).val()); })
$("input[name='pay_id']").each(function() {
payIdArr.push($(this).val());
})
$('#pay_id_all').val(payIdArr);
var itemOpidArr = [];
$("input[name='op_id']").each(function(){ itemOpidArr.push($(this).val()); })
$("input[name='op_id']").each(function() {
itemOpidArr.push($(this).val());
})
$('#op_id_all').val(itemOpidArr);
var optionSeatArr = [];
$("td[name='option_seat'] a").each(function(){ optionSeatArr.push($(this).html()+"@@"); })
$("td[name='option_seat'] a").each(function() {
optionSeatArr.push($(this).html() + "@@");
})
$('#option_seat_all').val(optionSeatArr);
var optionUnitPriceArr = [];
$("input[name='option_unit_price']").each(function(){ optionUnitPriceArr.push($(this).val().replace(/[,]+/g,"")); })
$("input[name='option_unit_price']").each(function() {
optionUnitPriceArr.push($(this).val().replace(/[,]+/g, ""));
})
$('#option_unit_price_all').val(optionUnitPriceArr);
var optionQtyArr = [];
$("input[name='option_qty']").each(function(){ optionQtyArr.push($(this).val().replace(/[,]+/g,"")); })
$("input[name='option_qty']").each(function() {
optionQtyArr.push($(this).val().replace(/[,]+/g, ""));
})
$('#option_qty_all').val(optionQtyArr);
var optionPriceBpArr = [];
$("input[name='option_price_bp']").each(function(){ optionPriceBpArr.push($(this).val().replace(/[,]+/g,"")); })
$("input[name='option_price_bp']").each(function() {
optionPriceBpArr.push($(this).val().replace(/[,]+/g, ""));
})
$('#option_price_bp_all').val(optionPriceBpArr);
var optionMemoArr = [];
$("input[name='option_memo']").each(function(){ optionMemoArr.push($(this).val()+"@@"); })
$("input[name='option_memo']").each(function() {
optionMemoArr.push($(this).val() + "@@");
})
$('#option_memo_all').val(optionMemoArr);
var optionRelateFacilArr = [];
$("td[name='option_relate_facil']").each(function(){ optionRelateFacilArr.push($(this).html().trim()); })
$("td[name='option_relate_facil']").each(function() {
optionRelateFacilArr.push($(this).html().trim());
})
$('#option_relate_facil_all').val(optionRelateFacilArr);
var mnIdArr = [];
$("input[name='mn_id']").each(function(){ mnIdArr.push($(this).val()); })
$("input[name='mn_id']").each(function() {
mnIdArr.push($(this).val());
})
$('#mn_id_all').val(mnIdArr);
var mnKindArr = [];
$("select[name='mn_kind']").each(function(){ mnKindArr.push($(this).val()); })
$("select[name='mn_kind']").each(function() {
mnKindArr.push($(this).val());
})
$('#mn_kind_all').val(mnKindArr);
var mnSeatArr = [];
$("select[name='mn_seat']").each(function(){ mnSeatArr.push($(this).val()); })
$("select[name='mn_seat']").each(function() {
mnSeatArr.push($(this).val());
})
$('#mn_seat_all').val(mnSeatArr);
var mnNumberofstopArr = [];
$("input[name='mn_numberofstop']").each(function(){ mnNumberofstopArr.push($(this).val()); })
$("input[name='mn_numberofstop']").each(function() {
mnNumberofstopArr.push($(this).val());
})
$('#mn_numberofstop_all').val(mnNumberofstopArr);
var mnSpeedArr = [];
$("select[name='mn_speed']").each(function(){ mnSpeedArr.push($(this).val()); })
$("select[name='mn_speed']").each(function() {
mnSpeedArr.push($(this).val());
})
$('#mn_speed_all').val(mnSpeedArr);
var mnUnitPriceArr = [];
$("input[name='mn_unit_price']").each(function(){ mnUnitPriceArr.push($(this).val().replace(/[,]+/g,"")); })
$("input[name='mn_unit_price']").each(function() {
mnUnitPriceArr.push($(this).val().replace(/[,]+/g, ""));
})
$('#mn_unit_price_all').val(mnUnitPriceArr);
var mnQtyArr = [];
$("input[name='mn_qty']").each(function(){ mnQtyArr.push($(this).val().replace(/[,]+/g,"")); })
$("input[name='mn_qty']").each(function() {
mnQtyArr.push($(this).val().replace(/[,]+/g, ""));
})
$('#mn_qty_all').val(mnQtyArr);
var mnPriceBpArr = [];
$("input[name='mn_price_bp']").each(function(){ mnPriceBpArr.push($(this).val().replace(/[,]+/g,"")); })
$("input[name='mn_price_bp']").each(function() {
mnPriceBpArr.push($(this).val().replace(/[,]+/g, ""));
})
$('#mn_price_bp_all').val(mnPriceBpArr);
var mnMemoArr = [];
$("input[name='mn_memo']").each(function(){ mnMemoArr.push($(this).val()+"@@"); })
$("input[name='mn_memo']").each(function() {
mnMemoArr.push($(this).val() + "@@");
})
$('#mn_memo_all').val(mnMemoArr);
var mnRelateFacilArr = [];
$("td[name='mn_relate_facil']").each(function(){ mnRelateFacilArr.push($(this).html().trim()); })
$("td[name='mn_relate_facil']").each(function() {
mnRelateFacilArr.push($(this).html().trim());
})
$('#mn_relate_facil_all').val(mnRelateFacilArr);
var exNoteArr = [];
$("input[name='except_note']").each(function(){ exNoteArr.push($(this).val()); })
$("input[name='except_note']").each(function() {
exNoteArr.push($(this).val());
})
$('#except_note_all').val(exNoteArr);
var exSpecArr = [];
$("input[name='except_spec']").each(function(){ exSpecArr.push($(this).val()); })
$("input[name='except_spec']").each(function() {
exSpecArr.push($(this).val());
})
$('#except_spec_all').val(exSpecArr);
var exUnitPriceArr = [];
$("input[name='except_unit_price']").each(function(){ exUnitPriceArr.push($(this).val().replace(/[,]+/g,"")); })
$("input[name='except_unit_price']").each(function() {
exUnitPriceArr.push($(this).val().replace(/[,]+/g, ""));
})
$('#except_unit_price_all').val(exUnitPriceArr);
var exQtyArr = [];
$("input[name='except_qty']").each(function(){ exQtyArr.push($(this).val().replace(/[,]+/g,"")); })
$("input[name='except_qty']").each(function() {
exQtyArr.push($(this).val().replace(/[,]+/g, ""));
})
$('#except_qty_all').val(exQtyArr);
var exPriceBpArr = [];
$("input[name='except_price_bp']").each(function(){ exPriceBpArr.push($(this).val().replace(/[,]+/g,"")); })
$("input[name='except_price_bp']").each(function() {
exPriceBpArr.push($(this).val().replace(/[,]+/g, ""));
})
$('#except_price_bp_all').val(exPriceBpArr);
$("input[name='pmstatus']").val($(this).val());
var fpItemArr = [];
$("input[name='fp_item']").each(function(){ fpItemArr.push($(this).val()); })
$("input[name='fp_item']").each(function() {
fpItemArr.push($(this).val());
})
$('#fp_item_all').val(fpItemArr);
var fpActArr = [];
$("input[name='fp_act']").each(function(){ fpActArr.push($(this).val()); })
$("input[name='fp_act']").each(function() {
fpActArr.push($(this).val());
})
$('#fp_act_all').val(fpActArr);
var opItemArr = [];
$("input[name='op_item']").each(function(){ opItemArr.push($(this).val()); })
$("input[name='op_item']").each(function() {
opItemArr.push($(this).val());
})
$('#op_item_all').val(opItemArr);
var opActArr = [];
$("input[name='op_act']").each(function(){ opActArr.push($(this).val()); })
$("input[name='op_act']").each(function() {
opActArr.push($(this).val());
})
$('#op_act_all').val(opActArr);
var mnItemArr = [];
$("input[name='mn_item']").each(function(){ mnItemArr.push($(this).val()); })
$("input[name='mn_item']").each(function() {
mnItemArr.push($(this).val());
})
$('#mn_item_all').val(mnItemArr);
var mnActArr = [];
$("input[name='mn_act']").each(function(){ mnActArr.push($(this).val()); })
$("input[name='mn_act']").each(function() {
mnActArr.push($(this).val());
})
$('#mn_act_all').val(mnActArr);
var exceptItemArr = [];
$("input[name='except_item']").each(function(){ exceptItemArr.push($(this).val()); })
$("input[name='except_item']").each(function() {
exceptItemArr.push($(this).val());
})
$('#except_item_all').val(exceptItemArr);
var exceptActArr = [];
$("input[name='except_act']").each(function(){ exceptActArr.push($(this).val()); })
$("input[name='except_act']").each(function() {
exceptActArr.push($(this).val());
})
$('#except_act_all').val(exceptActArr);
var rv = true;
@ -1204,12 +1348,14 @@ $(function(){
<th>數量</th>
<th>複價</th>
<th>備註</th>
<th class="star"><div data-toggle="tooltip" data-placement="auto" title="每次選完OPTION後,請點選右方紅色按鈕「電梯」來勾選電梯項次">所屬電梯
<th class="star">
<div data-toggle="tooltip" data-placement="auto" title="每次選完OPTION後,請點選右方紅色按鈕「電梯」來勾選電梯項次">所屬電梯
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-info-circle" viewBox="0 0 16 16">
<path d="M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14zm0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16z" />
<path d="m8.93 6.588-2.29.287-.082.38.45.083c.294.07.352.176.288.469l-.738 3.468c-.194.897.105 1.319.808 1.319.545 0 1.178-.252 1.465-.598l.088-.416c-.2.176-.492.246-.686.246-.275 0-.375-.193-.304-.533L8.93 6.588zM9 4.5a1 1 0 1 1-2 0 1 1 0 0 1 2 0z" />
</svg>
</div></th>
</div>
</th>
<th>功能</th>
</tr>
</thead>
@ -1352,7 +1498,9 @@ $(function(){
<th>數量(月)</th>
<th>複價</th>
<th>備註</th>
<th class="star">所屬電梯</div></th>
<th class="star">所屬電梯
</div>
</th>
<th>功能</th>
</tr>
</thead>

Loading…
Cancel
Save