Ellin 1 year ago
parent
commit
4d43d55201
  1. 4
      wms/T8_APItest.php
  2. 12
      wms/contract-repair/api/putContractData.php
  3. 12
      wms/contract/api/postContractData.php
  4. 39
      wms/contract/contract-input.php
  5. 14
      wms/contract/js/alpine.js
  6. 4
      wms/fun_global.php
  7. 101
      wms/mkt/assets/js/alpine.js
  8. 119
      wms/mkt/pricereview-create.php
  9. 2
      wms/mkt/pricereview-record-submit.php
  10. 2
      wms/mkt/pricereview-record-update.php
  11. 4
      wms/schedule-index.php

4
wms/T8_APItest.php

@ -40,12 +40,12 @@ echo "ii";
"name": "salIncomeApplyDetail",
"rows": [{
"BillNo": "B23100061",
"IncomeId": "A40003",
"IncomeId": "A40004",
"TaxId": "ST005",
"RowCode": 1,
"ItemType": "1",
"SPrice": 10000,
"SQuantity": 2,
"SQuantity": 0,
"FromSourceTag": 0,
"FromBillNo": ""
}]

12
wms/contract-repair/api/putContractData.php

@ -67,7 +67,6 @@ if (isset($_POST['contracttype']) && $_POST['contracttype'] == 'r' && isset($_PO
}
}
function t8Insert($data)
{
require_once('../../contract/connt8.php');
@ -99,7 +98,18 @@ function t8Insert($data)
$stmt->bindParam(':CreateTime', $create);
$stmt->execute();
$sql = "INSERT INTO comCustomer
(OrgId,BizPartnerTypeId,CurrId,BizPartnerId,PersonId,CreatorId,IsInUsed,InvoiceAddress,CreateTime)
VALUES('1000','10','TWD',:BizPartnerId,:PersonId,:CreatorId,1,:InvoiceAddress,:CreateTime)";
$stmt = $connT8->prepare($sql);
$stmt->bindParam(':BizPartnerId', $repair_no);
$stmt->bindParam(':PersonId', $salesman);
$stmt->bindParam(':CreatorId', $user_id);
$stmt->bindParam(':InvoiceAddress', $address);
$stmt->bindParam(':CreateTime', $create);
$stmt->execute();
$sql = "INSERT INTO ";
$connT8->commit();
}

12
wms/contract/api/postContractData.php

@ -34,6 +34,7 @@ if (isset($_POST["contractno"]) && $_POST["contractno"] != "" && isset($_POST['c
$num = !empty($_POST['num']) ? $_POST['num'] : null;
$files = !empty($_FILES['files']) ? $_FILES['files'] : null;
$elevators = !empty($_POST['elevators']) ? json_decode($_POST['elevators'], true) : [];
$payType = !empty($_POST['payType']) ? $_POST['payType'] : null;
// validate
$fail_arr = [];
if ($contractno === '') return $fail_arr[] = '合約號為必填';
@ -56,6 +57,7 @@ if (isset($_POST["contractno"]) && $_POST["contractno"] != "" && isset($_POST['c
if ($partyAphone == '') $fail_arr[] = '業務聯繫人電話為必填';
if ($partyAemail == '') $fail_arr[] = '業務聯繫人Email為必填';
if ($num == '') $fail_arr[] = '電梯數量為必填';
if ($payType == '') $fail_arr[] = '付款方式為必填';
if (count($fail_arr) > 0) {
header("HTTP/1.1 422 Unprocessable Entity");
echo json_encode($fail_arr);
@ -283,8 +285,8 @@ if (isset($_POST["contractno"]) && $_POST["contractno"] != "" && isset($_POST['c
} else {
$files = null;
}
$sql_str = "INSERT INTO contract_b_signed_back (contract_no, contract_type, company, customer_no, salesperson, contract_start_date, contract_end_date, total_price, customer_phone, customer_email, repairman, cycle, contact_person, contact_address, contact_phone, contact_email, elevators_number, area, address, files_id, bonus, max_bonus, created_at, created_by)
VALUES (:contract_no, :contract_type, :company, :customer_no, :salesperson, :contract_start_date, :contract_end_date, :total_price, :customer_phone, :customer_email, :repairman, :cycle, :contact_person, :contact_address, :contact_phone, :contact_email, :elevators_number, :area, :address, :files_id, :bonus, :max_bonus, :created_at, :created_by)";
$sql_str = "INSERT INTO contract_b_signed_back (contract_no, contract_type, company, customer_no, salesperson, contract_start_date, contract_end_date, total_price,payType, customer_phone, customer_email, repairman, cycle, contact_person, contact_address, contact_phone, contact_email, elevators_number, area, address, files_id, bonus, max_bonus, created_at, created_by)
VALUES (:contract_no, :contract_type, :company, :customer_no, :salesperson, :contract_start_date, :contract_end_date, :total_price, :payType ,:customer_phone, :customer_email, :repairman, :cycle, :contact_person, :contact_address, :contact_phone, :contact_email, :elevators_number, :area, :address, :files_id, :bonus, :max_bonus, :created_at, :created_by)";
$stmt = $conn->prepare($sql_str);
$stmt->bindParam(":contract_no", $contractno);
$stmt->bindParam(":contract_type", $contract_type);
@ -310,6 +312,7 @@ if (isset($_POST["contractno"]) && $_POST["contractno"] != "" && isset($_POST['c
$stmt->bindParam(":max_bonus", $max_bonus);
$stmt->bindParam(":created_at", $created_at);
$stmt->bindParam(":created_by", $user_id);
$stmt->bindParam(':payType', $payType);
$stmt->execute();
@ -324,7 +327,7 @@ if (isset($_POST["contractno"]) && $_POST["contractno"] != "" && isset($_POST['c
// $stmt->bindParam(':CreateTime', $createTime);
// $stmt->execute();
T8insert($_POST, $facilityno);
// T8insert($_POST, $facilityno);
header('Content-Type: application/json');
$jsonData = json_encode($files);
@ -395,7 +398,8 @@ function T8insert($data, $facilityno)
$stmt->execute();
$sql = "INSERT INTO comCustomer(OrgId,BizPartnerTypeId,CurrId,BizPartnerId,PersonId,CreatorId,IsInUsed,InvoiceAddress,CreateTime)
$sql = "INSERT INTO comCustomer
(OrgId,BizPartnerTypeId,CurrId,BizPartnerId,PersonId,CreatorId,IsInUsed,InvoiceAddress,CreateTime)
VALUES('1000','10','TWD',:BizPartnerId,:PersonId,:CreatorId,1,:InvoiceAddress,:CreateTime)";
$stmt = $connT8->prepare($sql);

39
wms/contract/contract-input.php

@ -109,8 +109,11 @@ $contractpersons = $stmt->fetchAll(PDO::FETCH_ASSOC);
</select>
<p class="alerttext" x-show="data.mtype==''"><i class="fa-solid fa-circle-xmark"></i>未填寫</p>
</td>
<td></td>
<td></td>
<td style="vertical-align: middle">契約成交價</td>
<td>
<input class="form-control disabled_select" type="text" name="tel" x-model="data.total_price" :disabled="data.disabled">
<p class="alerttext" x-show="data.total_price==''"><i class="fa-solid fa-circle-xmark"></i>未填寫</p>
</td>
</tr>
<tr>
<td style="vertical-align: middle">客戶電話</td>
@ -181,14 +184,30 @@ $contractpersons = $stmt->fetchAll(PDO::FETCH_ASSOC);
<input type="text" x-model="data.address" />
<p class="alerttext" x-show="data.address==''"><i class="fa-solid fa-circle-xmark"></i>未填寫</p>
</td>
<td style="vertical-align: middle">附件</td>
<td style="vertical-align: middle">分期方式</td>
<td colspan="2">
<input type="file" name="file[]" multiple draggable="true" @change="uploadFiles($event)" />
<select class="ui search dropdown" x-model="data.payType">
<option value="">選擇付款方式</option>
<option value="A40006">年繳</option>
<option value="A40007">季繳</option>
<option value="A40003">月繳</option>
<option value="A40004">雙月繳</option>
<option value="A40005">半年繳</option>
</select>
<p class="alerttext" x-show="data.payType==''"><i class="fa-solid fa-circle-xmark"></i>未填寫</p>
</td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td style="vertical-align: middle">附件</td>
<td colspan="2">
<input type="file" name="file[]" multiple draggable="true" @change="uploadFiles($event)" />
</td>
</tr>
</tbody>
</template>
@ -196,7 +215,9 @@ $contractpersons = $stmt->fetchAll(PDO::FETCH_ASSOC);
<template x-for="(elevator, idx) in data.elevators" :key="elevator.apply_key + elevator.register_code">
<tbody style="font-weight: bolder;margin-bottom: 20px" x-show="step==3">
<tr>
<td colspan=8><p x-text="'電梯' + Number(idx+1)"></p></td>
<td colspan=8>
<p x-text="'電梯' + Number(idx+1)"></p>
</td>
</tr>
<tr>
<td style="vertical-align: middle">機種</td>
@ -300,14 +321,16 @@ $contractpersons = $stmt->fetchAll(PDO::FETCH_ASSOC);
<p class="alerttext" x-show="data.elevators[idx].useful_date=='' || !data.elevators[idx].useful_date"><i class="fa-solid fa-circle-xmark"></i>未填寫</p>
</td>
</tr>
<tr><td></td>
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td></tr>
<td></td>
</tr>
</tbody>
</template>
</template>

14
wms/contract/js/alpine.js

@ -964,6 +964,7 @@ const contractInput = () => {
num: '', //電梯數量
disabled: false, //資料庫是否有電梯數量資料
elevators: [], //機種、載重、人乘、樓停、樓層、速度、緯度、經度、開門方式、保養別、廠牌、竣檢日、許可證日期
payType: ''
},
customize: false,
step: 1,
@ -1020,8 +1021,11 @@ const contractInput = () => {
return
}
if (!this.customize) {
console.log(res.data);
this.data.total_price = res.data.sold_price
for (let i = 0; i < res.data.elevators.length; i++) {
this.data.total_price = Number(res.data.elevators[i].sold_price) + Number(this.data.total_price);
console.log(this.data.total_price);
}
this.data.total_price = Number(res.data.elevators[0].maintain_months) * this.data.total_price;
this.data.salesman = res.data.salesman
this.data.contract_begin_date = res.data.contract_begin_date
this.data.contract_end_date = res.data.contract_end_date
@ -1035,7 +1039,7 @@ const contractInput = () => {
let cityIndex = this.data.address.indexOf('市');
console.log(cityIndex);
if (cityIndex == -1) {
cityIndex = this.data.address.indexOf('縣');
// cityIndex = this.data.address.indexOf('縣');
}
if (cityIndex > 1) {
// 獲取''市''前面的兩個字
@ -1111,13 +1115,14 @@ const contractInput = () => {
form.append('num', this.data.num);
form.append('elevators', JSON.stringify(this.data.elevators));
form.append('contracttype', 'b');
form.append('payType', this.data.payType)
// 如果有附件檔案,可以逐一加入
for (var i = 0; i < this.data.files.length; i++) {
form.append('files[]', this.data.files[i]);
}
axios.post('./api/postContractData.php', form).then(res => {
console.log(res.status);
console.log(res);
if (res.status === 200) {
alert('儲存成功');
this.step = 1
@ -1144,6 +1149,7 @@ const contractInput = () => {
this.data.zip = ''
this.data.partyAphone = ''
this.data.partyAemail = ''
this.data.payType = ''
}
this.isLoading = false
}).catch(error => {

4
wms/fun_global.php

@ -132,11 +132,11 @@ function pricereview_renovate_class($rate, $user_id, $renovate_flag)
$ret[2] = 'M0012';
if ($renovate_flag == "REN") {
// $ret[2] = 'M0012';
if ($rate < 1000) $ret[3] = "M0008"; // 詹總
if ($rate <= 100) $ret[3] = "M0008"; // 詹總
if ($rate < 75) $ret[4] = "M0006"; // 總經理
} else {
// 全汰改
if ($rate < 1000) $ret[3] = "M0008"; // 詹總
if ($rate <= 100) $ret[3] = "M0008"; // 詹總
if ($rate < 75) $ret[4] = "M0006"; // 總經理
}

101
wms/mkt/assets/js/alpine.js

@ -191,3 +191,104 @@ const priceOptionSelect = ()=>{
}
}
}
const pricereviewOptionSelect = ()=>{
return {
init(){
console.log(options);
this.optionCategory = 0
this.initButtons();
},
options: options,
orioptions: options,
optionalArr: {
1:'標配',
2:'選配',
3:'加價',
},
searchtext:'',
kind:0,
subkind:0,
buttons:[],
initButtons(kind){
if(kind == 'A'){
this.buttons = [
{name: '車廂意匠', type: 'A1'}
]
}else if(kind == 'B'){
this.buttons = [
{name: '天井', type: 'B1'},
{name: '地板', type: 'B2'},
{name: '操縱盤', type: 'B3'},
{name: '扶手', type: 'B4'},
{name: '車廂門與層門(轎門/層門)', type: 'B5'},
{name: '轎壁(車廂側板)', type: 'B6'},
{name: '其他車廂內裝配件', type: 'B7'},
]
}else if(kind == 'C'){
this.buttons = [
{name: '框', type: 'C1'},
{name: '乘場指示器', type: 'C2'},
{name: '燈', type: 'C3'},
{name: '方式與門', type: 'C4'},
]
}else if(kind == 'D'){
this.buttons = [
{name: '功能與配置', type: 'D1'},
{name: 'OH與樓高', type: 'D2'},
]
}else if(kind == 'E'){
this.buttons = [
{name: '平台梯', type: 'E1'},
]
}else if(kind == 'F'){
this.buttons = [
{name: '汰改', type: 'F1'},
]
}else if(kind == 0){
this.buttons = []
}
},
optionSubCategory:1,
changeCategory(category, subcategory=0){
this.kind = (category=='sub') ? this.kind : category;
if(subcategory != 0) {
this.subkind = subcategory
}else{
this.subkind = 0
}
if(category == 0){
this.kind = 0;
this.subkind = 0;
}
this.initButtons(category)
this.reloadOptions();
},
reloadOptions(){
if(this.kind == 0){
this.options = this.orioptions
return;
}
if(this.subkind == 0){
this.options = this.orioptions.filter(option=> option.kind == this.kind)
return;
}
this.options = this.orioptions.filter(option=> option.kind == this.kind && option.subkind == this.subkind)
},
searchOptions(e){
this.reloadOptions();
let val = e.target.value.toLowerCase()
this.options = (this.options).filter(option=>{
if(option.group_name == null) option.group_name = ''
if(option.spec == null) option.spec = ''
if(option.memo == null) option.memo = ''
if(option.price == null) option.price = 0
if(option.unit == null) option.unit = ''
return option.group_name.includes(val) || option.memo.toLowerCase().includes(val) || option.spec.toLowerCase().includes(val) || option.unit.includes(val) || String(option.price).includes(val)
})
}
}
}

119
wms/mkt/pricereview-create.php

@ -1,6 +1,6 @@
<?php
include "../header.php";
require_once('./conn.php');
$vol_no = $_REQUEST["vol_no"]; // 從有望客戶過來:卷號
// 營業員只建自己客戶的價審單
@ -144,9 +144,9 @@ while ($row = mysqli_fetch_assoc($res)) {
$opt_data_arr[$row["kind"]][$row["group_name"]][$row["id"]]["unit"] = $row["unit"];
$opt_data_arr[$row["kind"]][$row["group_name"]][$row["id"]]["price"] = $row["price"];
}
$option_str = $opt_data_arr[$row["kind"]][$row["group_name"]][$row["id"]]["spec"];
mysqli_free_result($res);
$option_str .= '<table id="table_index2" class="table table-striped table-bordered" style="width:100%">';
$option_str = '<table id="table_index2" class="table table-striped table-bordered" style="width:100%">';
$option_str .= '<thead>
<tr class="kind-col">
<th scope="col" nowrap>名稱</th>
@ -195,6 +195,8 @@ foreach ($opt_data_arr as $k => $v) {
*/
}
$option_str .= "</tbody></table>";
?>
<style>
.c_iframe iframe {
@ -242,7 +244,7 @@ $option_str .= "</tbody></table>";
}
.modal-content {
height: 660px;
height: 760px;
}
#optionModal .modal-body {
@ -322,6 +324,7 @@ $option_str .= "</tbody></table>";
}
</style>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<script defer src="../contract/js/alpinejs/cdn.min.js"></script>
<script>
// 加千分位
function commafy(num) {
@ -740,7 +743,8 @@ $option_str .= "</tbody></table>";
$("#optionModal .modal-body td").unbind().click(function() {
var pobj = $(this).closest('td').parent();
console.log(jobj.html(pobj.find('td').eq(0).html() + ' ' + pobj.find('td').eq(1).html()));
jobj.html(pobj.find('td').eq(0).html() + ' ' + pobj.find('td').eq(1).html());
console.log(pobj.find('td').eq(0).html()+ pobj.find('td').eq(2).html() + ' ' + pobj.find('td').eq(1).html());
jobj.html(pobj.find('td').eq(0).html() + ' ' + pobj.find('td').eq(1).html() + '<br />(' + pobj.find('td').eq(2).html() + ')');
jobj.closest('td').parent().find('input[name=option_unit_price]').val(pobj.find('td').eq(5).html());
jobj.closest('td').parent().find('input[name=option_price_bp]').val(commafy(pobj.find('td').eq(5).html().replace(/[,]+/g, "") * jobj.closest('td').parent().find('input[name=option_qty]').val().replace(/[,]+/g, "")));
jobj.closest('td').parent().find('input[name=op_id]').val(pobj.find('input[name=option_id]').val());
@ -792,6 +796,37 @@ $option_str .= "</tbody></table>";
return false;
}
});
$('#tb3').on('click', 'a[name=btnfaci]', function() {
var jobj = $(this); // 父視窗
if (jobj.closest('td').parent().find('a[name=option_href]').html() != '點選') {
var k = 1;
$("input[name=item_spec]").each(function() {
if ($(this).val() == '') return;
var objInput = document.createElement("input");
objInput.setAttribute("type", "checkbox");
objInput.setAttribute("name", "sub_faci");
objInput.setAttribute("value", k + '.' + $(this).val());
$("#optionFaciModal .modal-body").append(objInput);
$("#optionFaciModal .modal-body").append(k + '.' + $(this).val());
$("#optionFaciModal .modal-body").append("<br>");
k++;
});
$("#optionFaciModal .modal-body").append("<p><button type='button' name='btnpost' data-dismiss='modal' aria-label='Close'><span aria-hidden='true'>確定</span></button></p>");
$("#optionFaciModal").modal('show');
var str = "";
$("button[name=btnpost]").click(function() {
$('input[name=sub_faci]').each(function() {
if ($(this).prop('checked')) {
str += $(this).val() + "<br>";
}
});
jobj.closest('td').parent().find('td[name=option_relate_facil]').html(str);
});
} else {
alert("請先新增OPTION");
return false;
}
});
$('#tb4').on('click', 'a[name=btnfaci]', function() {
var jobj = $(this); // 父視窗
if (jobj.closest('td').parent().find('select[name=mn_kind]').val() != '') {
@ -1139,6 +1174,14 @@ $option_str .= "</tbody></table>";
});
});
</script>
<?php
require_once('./conn.php');
$sql_str = "SELECT * FROM option_price WHERE status='Y' ORDER BY kind ASC";
$stmt = $conn->prepare($sql_str);
$stmt->execute();
$options = $stmt->fetchAll(PDO::FETCH_ASSOC);
?>
<div>
<ul class="notice">
<li>「保存」:儲存價審單內容</li>
@ -1167,13 +1210,7 @@ $option_str .= "</tbody></table>";
</div>
</div>
<!--子窗:option加價-->
<?php
$sql_str = "SELECT * FROM option_price WHERE status='Y' ORDER BY kind ASC";
$stmt = $conn->prepare($sql_str);
$stmt->execute();
$options = $stmt->fetchAll(PDO::FETCH_ASSOC);
?>
<div class="modal fade" id="optionModal" tabindex="-1" role="dialog" aria-labelledby="optionModalTitle" aria-hidden="true">
<div class="modal fade" id="optionModal" tabindex="-1" role="dialog" aria-labelledby="optionModalTitle" aria-hidden="true" x-data=pricereviewOptionSelect()>
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
@ -1181,9 +1218,26 @@ $options = $stmt->fetchAll(PDO::FETCH_ASSOC);
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
<label for="" >
<input type="text" class="form-control" style="float:left" placeholder="搜尋..." x-model="searchtext" @keyup="searchOptions($event)" />
</label>
<div class="categories">
<button :class="['btn', (kind==0) ? 'btn-primary' : 'btn-secondary text-light']" @click="changeCategory(0)">顯示全部</button>
<button :class="['btn', (kind=='A') ? 'btn-primary' : 'btn-secondary text-light']" @click="changeCategory('A')">A-1 車廂意匠</button>
<button :class="['btn', (kind=='B') ? 'btn-primary' : 'btn-secondary text-light']" @click="changeCategory('B')">A-2 車廂內裝</button>
<button :class="['btn', (kind=='C') ? 'btn-primary' : 'btn-secondary text-light']" @click="changeCategory('C')">A-3 車廂外部</button>
<button :class="['btn', (kind=='D') ? 'btn-primary' : 'btn-secondary text-light']" @click="changeCategory('D')">A-4 控制與其他</button>
<button :class="['btn', (kind=='E') ? 'btn-primary' : 'btn-secondary text-light']" @click="changeCategory('E')">B-1 平台梯</button>
<button :class="['btn', (kind=='F') ? 'btn-primary' : 'btn-secondary text-light']" @click="changeCategory('F')">C-1 汰改</button>
<br /><br />
<template x-for="button in buttons" >
<button style="margin-right:3px" :class="['btn', (button.type == subkind) ? 'btn-primary' : 'btn-secondary text-light']" @click="changeCategory('sub', button.type)" x-text="button.name"></button>
</template>
</div>
</div>
<div class="modal-body" >
<table id="table_index2" class="table table-striped table-bordered" style="width:100%">
<table id="" class="table table-striped table-bordered" style="width:100%">
<thead>
<tr class="kind-col">
<th scope="col" nowrap>名稱</th>
@ -1195,16 +1249,16 @@ $options = $stmt->fetchAll(PDO::FETCH_ASSOC);
</tr>
</thead>
<tbody>
<?php foreach($options as $option): ?>
<tr>
<td>1</td>
<td>2</td>
<td>3</td>
<td>4</td>
<td>5</td>
<td>6</td>
<template x-for="option in options" >
<tr style="cursor:pointer">
<td x-text="option.group_name"> </td>
<td x-text="option.spec"></td>
<td x-text="option.memo"></td>
<td x-text="optionalArr[option.optional]"></td>
<td x-text="option.unit"></td>
<td x-text="option.price"></td>
</tr>
<?php endforeach; ?>
</template>
</tbody>
</table>
</div>
@ -1850,7 +1904,7 @@ if($_SERVER["REQUEST_METHOD"] == "POST"){
?>
<tr name="option_templ">
<td name="option_seat">
<a href="" name="option_href" data-toggle="modal"><?php echo $v["item_spec"] . '-(' . $v['item-memo'] . ')'; ?></a>
<a href="" name="option_href" data-toggle="modal"><?php echo $v["item_spec"] . '-(' . $v['item_memo'] . ')'; ?></a>
</td>
<td><input type="text" name="option_unit_price" class="form-control dollar-right" size="8" value="<?php echo number_format($v["item_unit_price"]); ?>" readonly></td>
<td><input type="text" name="option_qty" class="form-control" size="2" maxlength="2" value="<?php echo $v["item_qty"]; ?>"></td>
@ -1890,7 +1944,7 @@ if($_SERVER["REQUEST_METHOD"] == "POST"){
?>
<tr name="option_templ">
<td name="option_seat">
<a href="" name="option_href" data-toggle="modal">點選</a>
<a href="" name="option_href" data-toggle="modal" @click="searchtext = ''">點選</a>
</td>
<td><input type="text" name="option_unit_price" class="form-control dollar-right" size="8" value="<?php echo (isset($v["option_price"])) ? number_format($v["option_price"]) : 0; ?>" readonly></td>
<td><input type="text" name="option_qty" class="form-control" size="2" maxlength="2" value="<?php echo (isset($v["option_num"])) ? $v["option_num"] : 0; ?>"></td>
@ -1938,8 +1992,10 @@ if($_SERVER["REQUEST_METHOD"] == "POST"){
<td><input type="text" name="except_qty" class="form-control" size="4" maxlength="4" value="<?php echo $v["item_qty"]; ?>"><input type="hidden" name="except_qty_ori" value="<?php echo $v["item_qty"]; ?>"></td>
<td><input type="text" name="except_price_bp" class="form-control dollar-right" size="8" value="<?php echo number_format($v["item_price_bp"]); ?>" readonly>
<input type="hidden" name="item_group" value="E">
<a href="javascript:void(0);" name="btnfaci" class="btn btn-danger btn-sm">電梯</a>
<a href="javascript:void(0);" name="btndel3" class="btn btn-danger btn-sm">X</a>
</td>
<td name="mn_relate_facil" nowrap></td>
</tr>
<?php
}
@ -1951,8 +2007,10 @@ if($_SERVER["REQUEST_METHOD"] == "POST"){
<td><input type="text" name="except_unit_price" class="form-control dollar-right" size="8"></td>
<td><input type="text" name="except_qty" class="form-control" size="4" maxlength="4"></td>
<td><input type="text" name="except_price_bp" class="form-control dollar-right" size="8" readonly>
<a href="javascript:void(0);" name="btnfaci" class="btn btn-danger btn-sm">電梯</a>
<a href="javascript:void(0);" name="btndel3" class="btn btn-danger btn-sm">X</a>
</td>
<td name="mn_relate_facil" nowrap></td>
</tr>
<?php
}
@ -2342,13 +2400,12 @@ if($_SERVER["REQUEST_METHOD"] == "POST"){
</tr>
</tbody>
</table>
</div>
<div class="nextline"></div>
<ul>
<li>營業權限85%以上;85-80%呈至區處長審核;80%以下呈至總經理審核。</li>
</ul>
</div>
<div class="nextline"></div>
<label for="attatch1">報價單</label>
<input type="file" name="attatch1" id="attatch1"><a href="javascript:void(0);" name="filedel" class="btn btn-danger btn-sm">X</a>
@ -2413,3 +2470,9 @@ if($_SERVER["REQUEST_METHOD"] == "POST"){
<?php
include "../footer.php";
?>
<script src="./assets/js/alpine.js"></script>
<script>
const options = [...<?php echo json_encode($options); ?>];
</script>

2
wms/mkt/pricereview-record-submit.php

@ -280,7 +280,7 @@ if ($_SERVER["REQUEST_METHOD"] == "POST") {
}
// 價審簽核流程
// <75%以下呈至總經理審核. ($price_rate)
// 小於80%呈至總經理審核. ($price_rate)
// 上級主管 > 伃廷 > MAX > 總經理
if ($status == "YS") {
$ret = [];

2
wms/mkt/pricereview-record-update.php

@ -384,7 +384,7 @@ if(isset($_POST['pmstatus'])) {
}
// 價審簽核流程
// <75%以下呈至總經理審核. ($price_rate)
// 小於80%呈至總經理審核. ($price_rate)
// 上級主管 > 伃廷 > MAX > 總經理
if ($status == "YS") {
$manager_arr = pricereview_class($price_rate, $user_id);

4
wms/schedule-index.php

@ -24,7 +24,7 @@ $data = array();
// sql語法存在變數中
$page_close = 0;
$sql_cmd2 = "";
$sql_cmd = sql_myself($user_id);
$sql_cmd = sql_myself($user_id, "repairerid");
if ($user_department_id == "501" || $user_department_id == "322" || $user_id == "M0012" || $user_id == "M0105") $sql_cmd = "";
if (in_array($user_department_id.$user_role_id, $dr_arr)) $sql_cmd = "";
//if (empty($sql_cmd)) $sql_cmd = "where ";
@ -38,7 +38,7 @@ if (!empty($sql_cmd2)) {
}
//$sql = "SELECT * FROM schedule $sql_cmd ORDER BY id";
$sql = "SELECT * FROM schedule $sql_cmd ORDER BY id asc";
$sql = "SELECT * FROM schedule $sql_cmd ORDER BY id desc";
if (!$page_close) $sql .= " limit $page_from, $page_each";
//echo $sql;

Loading…
Cancel
Save