10994015 1 year ago
parent
commit
7c213a13b4
  1. 16
      wms/account-receivable-excel.php
  2. BIN
      wms/account-receivable-facility.xlsx
  3. 1228
      wms/account-receivable-index-ing.php
  4. 3
      wms/account-receivable-index.php
  5. BIN
      wms/account-receivable-test.xlsx
  6. 42041
      wms/account_receivable_sql_file.sql
  7. 12
      wms/cont/apply_form.php
  8. 2
      wms/contract/contract-new-apply.php
  9. 289
      wms/mkt/assets/js/alpine.js
  10. 16
      wms/mkt/pricereview-create.php
  11. 6
      wms/mkt/pricereview-record-submit.php
  12. 4
      wms/mkt/pricereview_repair-record-submit.php
  13. 3
      wms/sign/sign_form.php

16
wms/account-receivable-excel.php

@ -16,14 +16,14 @@ $sheet = $spreadsheet->getActiveSheet();
if ($type == 'facility') { if ($type == 'facility') {
$colomnHeader = [ $colomnHeader = [
'T8單據日期','作番號', '合約號', '部門', '經理', '營業員', '客戶名稱', '統一編號', '聯絡地址', '抬頭', 'T8單據日期','作番號', '合約號', '部門', '經理', '營業員', '客戶名稱', '統一編號', '聯絡地址', '抬頭',
'訂金名稱', '訂金合約金額', '訂金應收日期', '訂金目前應收金額', '訂金已收金額', '訂金催收金額', '訂金催收次數', '訂金名稱', '訂金合約金額', '訂金應收日期', '訂金目前應收金額','訂金已開金額','訂金未開金額', '訂金已收金額', '訂金催收金額', '訂金催收次數',
'二次款名稱', '二次款合約金額', '二次款應收日期', '二次款目前應收金額', '二次款已收金額', '二次款催收金額', '二次款催收次數', '二次款名稱', '二次款合約金額', '二次款應收日期', '二次款目前應收金額','二次款已開金額','二次款未開金額', '二次款已收金額', '二次款催收金額', '二次款催收次數',
'貨抵工地款名稱', '貨抵工地款合約金額', '貨抵工地款應收日期', '貨抵工地款目前應收金額', '貨抵工地款已收金額', '貨抵工地款催收金額', '貨抵工地款催收次數', '貨抵工地款名稱', '貨抵工地款合約金額', '貨抵工地款應收日期', '貨抵工地款目前應收金額','貨抵工地款已開金額','貨抵工地款未開金額', '貨抵工地款已收金額', '貨抵工地款催收金額', '貨抵工地款催收次數',
'安裝款名稱', '安裝款合約金額', '安裝款應收日期', '安裝款目前應收金額', '安裝款已收金額', '安裝款催收金額', '安裝款催收次數', '安裝款名稱', '安裝款合約金額', '安裝款應收日期', '安裝款目前應收金額','安裝款已開金額','安裝款未開金額', '安裝款已收金額', '安裝款催收金額', '安裝款催收次數',
'試車款名稱', '試車款合約金額', '試車款應收日期', '試車款目前應收金額', '試車款已收金額', '試車款催收金額', '試車款催收次數', '試車款名稱', '試車款合約金額', '試車款應收日期', '試車款目前應收金額','試車款已開金額','試車款未開金額', '試車款已收金額', '試車款催收金額', '試車款催收次數',
'官檢款名稱', '官檢款合約金額', '官檢款應收日期', '官檢款目前應收金額', '官檢款已收金額', '官檢款催收金額', '官檢款催收次數', '官檢款名稱', '官檢款合約金額', '官檢款應收日期', '官檢款目前應收金額','官檢款已開金額','官檢款未開金額', '官檢款已收金額', '官檢款催收金額', '官檢款催收次數',
'交車款名稱', '交車款合約金額', '交車款應收日期', '交車款目前應收金額', '交車款已收金額', '交車款催收金額', '交車款催收次數', '交車款名稱', '交車款合約金額', '交車款應收日期', '交車款目前應收金額','交車款已開金額','交車款未開金額', '交車款已收金額', '交車款催收金額', '交車款催收次數',
'尾款名稱', '尾款金額', '尾款應收日期', '尾款應收金額', '尾款已收金額', '尾款催收金額', '尾款催收次數', '尾款名稱', '尾款金額', '尾款應收日期', '尾款應收金額','尾款已開金額','尾款未開金額', '尾款已收金額', '尾款催收金額', '尾款催收次數',
'作番狀態', '合約-設備金額','合約-安裝金額','作番合約總金額', '作番總應收金額' '作番狀態', '合約-設備金額','合約-安裝金額','作番合約總金額', '作番總應收金額'
]; ];
$sheet->fromArray($colomnHeader, NULL, 'A1'); $sheet->fromArray($colomnHeader, NULL, 'A1');

BIN
wms/account-receivable-facility.xlsx

Binary file not shown.

1228
wms/account-receivable-index-ing.php

File diff suppressed because it is too large

3
wms/account-receivable-index.php

@ -2024,6 +2024,9 @@ $facility_exclude_boga_data = json_encode($facility_exclude_boga_array);
margin-top: .5rem; margin-top: .5rem;
} }
.hiddenTable {
display: none;
}
</style> </style>
<div style="width: 98%;margin: 1%;"> <div style="width: 98%;margin: 1%;">

BIN
wms/account-receivable-test.xlsx

Binary file not shown.

42041
wms/account_receivable_sql_file.sql

File diff suppressed because it is too large

12
wms/cont/apply_form.php

@ -279,9 +279,7 @@ if ($result['department_id'] == 'M0137' || $result['department_id'] == 'M0086' |
<script type="text/javascript" src="<?php echo base_url('js/wf_property.js?') . rand(10, 100); ?>"></script> <script type="text/javascript" src="<?php echo base_url('js/wf_property.js?') . rand(10, 100); ?>"></script>
<script type="text/javascript" src="<?php echo base_url('js/flow_chart.js?' . rand(10, 100)); ?>"></script> <script type="text/javascript" src="<?php echo base_url('js/flow_chart.js?' . rand(10, 100)); ?>"></script>
<script src="<?php echo base_url('js/validate/jquery.validate.min.js?' . rand(10, 100)); ?>"></script> <script src="<?php echo base_url('js/validate/jquery.validate.min.js?' . rand(10, 100)); ?>"></script>
<script src="<?php echo base_url('js/validate/messages_zh_TW.js?' . rand(10, 100)); ?>"> <script src="<?php echo base_url('js/validate/messages_zh_TW.js?' . rand(10, 100)); ?>"></script>
</script>
<link rel="stylesheet" type="text/css" href="<?php echo base_url('css/form.css?') . rand(10, 100); ?>" /> <link rel="stylesheet" type="text/css" href="<?php echo base_url('css/form.css?') . rand(10, 100); ?>" />
<script type="text/javascript"> <script type="text/javascript">
window.param = { window.param = {
@ -387,7 +385,7 @@ if ($result['department_id'] == 'M0137' || $result['department_id'] == 'M0086' |
$('#reg_del').val(regDelStr); $('#reg_del').val(regDelStr);
}); });
}); });
addRow = function() { const addRow = function() {
if ($('#maintain_kind').val() == "") { if ($('#maintain_kind').val() == "") {
alert("請選擇保養方式!"); alert("請選擇保養方式!");
$('#maintain_kind').eq(0).focus(); $('#maintain_kind').eq(0).focus();
@ -482,7 +480,7 @@ if ($result['department_id'] == 'M0137' || $result['department_id'] == 'M0086' |
}); });
} }
delRow = function(btn) { const delRow = function(btn) {
if ($(btn).attr('name') == 'btn1') { if ($(btn).attr('name') == 'btn1') {
//console.log($(btn).parent().parent().prev('tr').find('input[id=register_code]').val()); //console.log($(btn).parent().parent().prev('tr').find('input[id=register_code]').val());
regDelStr += $(btn).parent().parent().find('input[id=register_code]').val() + ","; regDelStr += $(btn).parent().parent().find('input[id=register_code]').val() + ",";
@ -494,7 +492,7 @@ if ($result['department_id'] == 'M0137' || $result['department_id'] == 'M0086' |
} }
$(btn).parent().parent().remove(); $(btn).parent().parent().remove();
} }
setStandPrice = function(p, obj) { const setStandPrice = function(p, obj) {
$.ajax({ $.ajax({
url: '../cont/t.php', url: '../cont/t.php',
data: p, data: p,
@ -530,7 +528,7 @@ if ($result['department_id'] == 'M0137' || $result['department_id'] == 'M0086' |
}); });
} }
addNewBrand = function() { const addNewBrand = function() {
var new_brand = $("#new_brand").val(); var new_brand = $("#new_brand").val();
if (new_brand != '') { if (new_brand != '') {
p = { p = {

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

@ -577,7 +577,7 @@ $person = $contract['person'];
<?php <?php
if (($user_id === "M0107" || $user_id == "TEST02") && $contract['progress'] <= 1) { if (($user_id === "M0107" || $user_id == "TEST02") && $contract['progress'] <= 1) {
echo "同意(上呈)"; echo "同意(上呈)";
} elseif (($user_id === "M0060" || $user_id == "TEST03") && $contract['progress'] == 2) { // } elseif (($user_id === "M0060" || $user_id == "TEST03") && $contract['progress'] == 2) {
echo "同意(結案)"; echo "同意(結案)";
} }
?> ?>

289
wms/mkt/assets/js/alpine.js

@ -1,6 +1,6 @@
const priceOptionIndex = ()=>{ const priceOptionIndex = () => {
return { return {
init(){ init() {
this.renderPagination(); this.renderPagination();
this.initButtons(this.kind); this.initButtons(this.kind);
this.options = this.options.slice(0, this.pageLength) this.options = this.options.slice(0, this.pageLength)
@ -15,117 +15,117 @@ const priceOptionIndex = ()=>{
2:'選配', 2:'選配',
3:'選配' 3:'選配'
}, },
btntype:1, btntype: 1,
buttons:[], buttons: [],
pageLength: 50, pageLength: 50,
currentpage:1, currentpage: 1,
dataLangth:options.length, dataLangth: options.length,
search: '', search: '',
pageNumber:1, pageNumber: 1,
initButtons(kind){ initButtons(kind) {
if(kind == 'A'){ if (kind == 'A') {
this.buttons = [ this.buttons = [
{name: '車廂意匠', type: 'A1'} { name: '車廂意匠', type: 'A1' }
] ]
}else if(kind == 'B'){ } else if (kind == 'B') {
this.buttons = [ this.buttons = [
{name: '天井', type: 'B1'}, { name: '天井', type: 'B1' },
{name: '地板', type: 'B2'}, { name: '地板', type: 'B2' },
{name: '操縱盤', type: 'B3'}, { name: '操縱盤', type: 'B3' },
{name: '扶手', type: 'B4'}, { name: '扶手', type: 'B4' },
{name: '車廂門與層門(轎門/層門)', type: 'B5'}, { name: '車廂門與層門(轎門/層門)', type: 'B5' },
{name: '轎壁(車廂側板)', type: 'B6'}, { name: '轎壁(車廂側板)', type: 'B6' },
{name: '其他車廂內裝配件', type: 'B7'}, { name: '其他車廂內裝配件', type: 'B7' },
] ]
}else if(kind == 'C'){ } else if (kind == 'C') {
this.buttons = [ this.buttons = [
{name: '框', type: 'C1'}, { name: '框', type: 'C1' },
{name: '乘場指示器', type: 'C2'}, { name: '乘場指示器', type: 'C2' },
{name: '燈', type: 'C3'}, { name: '燈', type: 'C3' },
{name: '方式與門', type: 'C4'}, { name: '方式與門', type: 'C4' },
] ]
}else if(kind == 'D'){ } else if (kind == 'D') {
this.buttons = [ this.buttons = [
{name: '功能與配置', type: 'D1'}, { name: '功能與配置', type: 'D1' },
{name: 'OH與樓高', type: 'D2'}, { name: 'OH與樓高', type: 'D2' },
] ]
}else if(kind == 'E'){ } else if (kind == 'E') {
this.buttons = [ this.buttons = [
{name: '平台梯', type: 'E1'}, { name: '平台梯', type: 'E1' },
] ]
} }
this.buttons.unshift({ this.buttons.unshift({
name:'顯示全部',type:'1', name: '顯示全部', type: '1',
}) })
this.btntype = this.buttons[0].type; this.btntype = this.buttons[0].type;
}, },
changeType(type=this.btntype){ changeType(type = this.btntype) {
this.currentpage = 1 this.currentpage = 1
this.btntype = type; this.btntype = type;
this.options = this.orioptions; this.options = this.orioptions;
this.options = this.getOptions(); this.options = this.getOptions();
this.inputSearch() this.inputSearch()
}, },
getOptions(start=0, end=this.pageLength){ getOptions(start = 0, end = this.pageLength) {
if(this.btntype != 1){ if (this.btntype != 1) {
return this.options.filter(item=>(item.subkind == this.btntype)).slice(start, end) return this.options.filter(item => (item.subkind == this.btntype)).slice(start, end)
} }
return this.options.slice(start, end); return this.options.slice(start, end);
}, },
inputSearch(e=null){ inputSearch(e = null) {
let text = e!=null ? e.target.value : this.search; let text = e != null ? e.target.value : this.search;
this.search = text.toLowerCase(); this.search = text.toLowerCase();
if(text != ''){ if (text != '') {
this.currentpage = 1; this.currentpage = 1;
this.options = this.orioptions this.options = this.orioptions
this.options = this.options.filter(item=>{ this.options = this.options.filter(item => {
if(item.subkind == this.btntype || this.btntype == 1){ if (item.subkind == this.btntype || this.btntype == 1) {
if(item.group_name == null) item.group_name = '' if (item.group_name == null) item.group_name = ''
if(item.spec == null) item.spec = '' if (item.spec == null) item.spec = ''
if(item.memo == null) item.memo = '' if (item.memo == null) item.memo = ''
if(item.price == null) item.price = 0 if (item.price == null) item.price = 0
return (item.group_name.toLowerCase().includes(text.toLowerCase()) || item.spec.toLowerCase().includes(text.toLowerCase()) || item.memo.toLowerCase().includes(text.toLowerCase()) || String(item.price).includes(text.toLowerCase())) ; return (item.group_name.toLowerCase().includes(text.toLowerCase()) || item.spec.toLowerCase().includes(text.toLowerCase()) || item.memo.toLowerCase().includes(text.toLowerCase()) || String(item.price).includes(text.toLowerCase()));
} }
}).slice((Number(this.currentpage)-1)*Number(this.pageLength), (Number(this.currentpage)-1)*Number(this.pageLength) + Number(this.pageLength)) }).slice((Number(this.currentpage) - 1) * Number(this.pageLength), (Number(this.currentpage) - 1) * Number(this.pageLength) + Number(this.pageLength))
this.dataLangth = this.options.length this.dataLangth = this.options.length
}else{ } else {
this.options = this.orioptions this.options = this.orioptions
if(this.btntype == 1){ if (this.btntype == 1) {
this.options = this.options.filter(item=> item.kind == this.kind) this.options = this.options.filter(item => item.kind == this.kind)
}else{ } else {
this.options = this.options.filter(item=> (item.subkind == this.btntype)) this.options = this.options.filter(item => (item.subkind == this.btntype))
} }
if(this.btntype == 1){ if (this.btntype == 1) {
this.dataLangth = this.orioptions.filter(item=> (item.kind == this.kind)).length this.dataLangth = this.orioptions.filter(item => (item.kind == this.kind)).length
}else{ } else {
this.dataLangth = this.orioptions.filter(item=> (item.subkind == this.btntype)).length this.dataLangth = this.orioptions.filter(item => (item.subkind == this.btntype)).length
} }
this.options = this.options.slice((Number(this.currentpage)-1)*Number(this.pageLength), (Number(this.currentpage)-1)*Number(this.pageLength) + Number(this.pageLength)) this.options = this.options.slice((Number(this.currentpage) - 1) * Number(this.pageLength), (Number(this.currentpage) - 1) * Number(this.pageLength) + Number(this.pageLength))
} }
this.pageNumber = Math.ceil(Number(this.dataLangth)/Number(this.pageLength)) this.pageNumber = Math.ceil(Number(this.dataLangth) / Number(this.pageLength))
this.pageNumberArr = [] this.pageNumberArr = []
for(let i=0;i<this.pageNumber;i++){ for (let i = 0; i < this.pageNumber; i++) {
this.pageNumberArr.push({page:i+1, disabled:false}) this.pageNumberArr.push({ page: i + 1, disabled: false })
} }
}, },
renderPagination(){ renderPagination() {
this.inputSearch(); this.inputSearch();
}, },
switchPage(page){ switchPage(page) {
if(page == '...') return if (page == '...') return
this.currentpage = page this.currentpage = page
this.renderPagination() this.renderPagination()
}, },
selectPage(e){ selectPage(e) {
this.currentpage = e.target.value this.currentpage = e.target.value
this.renderPagination() this.renderPagination()
} }
} }
} }
const priceOptionSelect = ()=>{ const priceOptionSelect = () => {
return { return {
init(){ init() {
this.renderPagination(); this.renderPagination();
this.options = this.options.slice(0, this.pageLength) this.options = this.options.slice(0, this.pageLength)
}, },
@ -134,164 +134,163 @@ const priceOptionSelect = ()=>{
options_arr: { options_arr: {
1:'標配', 1:'標配',
2:'選配', 2:'選配',
3:'選配' 3:'加價'
}, },
btntype:1, btntype: 1,
buttons:[], buttons: [],
pageLength: 50, pageLength: 50,
currentpage:1, currentpage: 1,
dataLangth:options.length, dataLangth: options.length,
search: '', search: '',
pageNumber:1, pageNumber: 1,
startpage:0, startpage: 0,
endpage:this.startpage + this.pageLength, endpage: this.startpage + this.pageLength,
pageNumberArr:[], pageNumberArr: [],
changeType(){ changeType() {
this.options = this.orioptions; this.options = this.orioptions;
this.options = this.getOptions(); this.options = this.getOptions();
this.inputSearch() this.inputSearch()
}, },
getOptions(start=0, end=this.pageLength){ getOptions(start = 0, end = this.pageLength) {
return this.options.slice(start, end); return this.options.slice(start, end);
}, },
inputSearch(e=null){ inputSearch(e = null) {
let text = e!=null ? e.target.value : this.search; let text = e != null ? e.target.value : this.search;
this.search = text.toLowerCase(); this.search = text.toLowerCase();
if(text != ''){ if (text != '') {
this.currentpage = 1; this.currentpage = 1;
this.options = this.orioptions this.options = this.orioptions
this.options = this.options.filter(item=>{ this.options = this.options.filter(item => {
if(item.group_name == null) item.group_name = '' if (item.group_name == null) item.group_name = ''
if(item.spec == null) item.spec = '' if (item.spec == null) item.spec = ''
if(item.memo == null) item.memo = '' if (item.memo == null) item.memo = ''
if(item.price == null) item.price = 0 if (item.price == null) item.price = 0
return (item.group_name.toLowerCase().includes(text.toLowerCase()) || item.spec.toLowerCase().includes(text.toLowerCase()) || item.memo.toLowerCase().includes(text.toLowerCase()) || String(item.price).includes(text.toLowerCase())) ; return (item.group_name.toLowerCase().includes(text.toLowerCase()) || item.spec.toLowerCase().includes(text.toLowerCase()) || item.memo.toLowerCase().includes(text.toLowerCase()) || String(item.price).includes(text.toLowerCase()));
}).slice((Number(this.currentpage)-1)*Number(this.pageLength), (Number(this.currentpage)-1)*Number(this.pageLength) + Number(this.pageLength)) }).slice((Number(this.currentpage) - 1) * Number(this.pageLength), (Number(this.currentpage) - 1) * Number(this.pageLength) + Number(this.pageLength))
this.dataLangth = this.options.length this.dataLangth = this.options.length
}else{ } else {
this.options = this.orioptions this.options = this.orioptions
this.options = this.options.slice((Number(this.currentpage)-1)*Number(this.pageLength), (Number(this.currentpage)-1)*Number(this.pageLength) + Number(this.pageLength)) this.options = this.options.slice((Number(this.currentpage) - 1) * Number(this.pageLength), (Number(this.currentpage) - 1) * Number(this.pageLength) + Number(this.pageLength))
this.dataLangth = this.orioptions.length this.dataLangth = this.orioptions.length
} }
this.pageNumber = Math.ceil(Number(this.dataLangth)/Number(this.pageLength)) this.pageNumber = Math.ceil(Number(this.dataLangth) / Number(this.pageLength))
this.pageNumberArr = [] this.pageNumberArr = []
for(let i=0;i<this.pageNumber;i++){ for (let i = 0; i < this.pageNumber; i++) {
this.pageNumberArr.push({page:i+1, disabled:false}) this.pageNumberArr.push({ page: i + 1, disabled: false })
} }
}, },
renderPagination(){ renderPagination() {
this.inputSearch(); this.inputSearch();
}, },
switchPage(page){ switchPage(page) {
if(page == '...') return if (page == '...') return
this.currentpage = page this.currentpage = page
this.renderPagination() this.renderPagination()
}, },
selectPage(e){ selectPage(e) {
this.currentpage = e.target.value this.currentpage = e.target.value
this.renderPagination() this.renderPagination()
} }
} }
} }
const pricereviewOptionSelect = ()=>{ const pricereviewOptionSelect = () => {
return { return {
init(){ init() {
console.log(options);
this.optionCategory = 0 this.optionCategory = 0
this.initButtons(); this.initButtons();
}, },
id: 1233,
options: options, options: options,
orioptions: options, orioptions: options,
optionalArr: { optionalArr: {
1:'標配', 1:'標配',
2:'選配', 2:'選配',
3:'選配', 3:'加價',
}, },
searchtext:'', searchtext: '',
kind:0, kind: 0,
subkind:0, subkind: 0,
buttons:[], buttons: [],
initButtons(kind){ initButtons(kind) {
if(kind == 'A'){ if (kind == 'A') {
this.buttons = [ this.buttons = [
{name: '車廂意匠', type: 'A1'} { name: '車廂意匠', type: 'A1' }
] ]
}else if(kind == 'B'){ } else if (kind == 'B') {
this.buttons = [ this.buttons = [
{name: '天井', type: 'B1'}, { name: '天井', type: 'B1' },
{name: '地板', type: 'B2'}, { name: '地板', type: 'B2' },
{name: '操縱盤', type: 'B3'}, { name: '操縱盤', type: 'B3' },
{name: '扶手', type: 'B4'}, { name: '扶手', type: 'B4' },
{name: '車廂門與層門(轎門/層門)', type: 'B5'}, { name: '車廂門與層門(轎門/層門)', type: 'B5' },
{name: '轎壁(車廂側板)', type: 'B6'}, { name: '轎壁(車廂側板)', type: 'B6' },
{name: '其他車廂內裝配件', type: 'B7'}, { name: '其他車廂內裝配件', type: 'B7' },
] ]
}else if(kind == 'C'){ } else if (kind == 'C') {
this.buttons = [ this.buttons = [
{name: '框', type: 'C1'}, { name: '框', type: 'C1' },
{name: '乘場指示器', type: 'C2'}, { name: '乘場指示器', type: 'C2' },
{name: '燈', type: 'C3'}, { name: '燈', type: 'C3' },
{name: '方式與門', type: 'C4'}, { name: '方式與門', type: 'C4' },
] ]
}else if(kind == 'D'){ } else if (kind == 'D') {
this.buttons = [ this.buttons = [
{name: '功能與配置', type: 'D1'}, { name: '功能與配置', type: 'D1' },
{name: 'OH與樓高', type: 'D2'}, { name: 'OH與樓高', type: 'D2' },
] ]
}else if(kind == 'E'){ } else if (kind == 'E') {
this.buttons = [ this.buttons = [
{name: '平台梯', type: 'E1'}, { name: '平台梯', type: 'E1' },
] ]
}else if(kind == 'F'){ } else if (kind == 'F') {
this.buttons = [ this.buttons = [
{name: '汰改', type: 'F1'}, { name: '汰改', type: 'F1' },
] ]
}else if(kind == 0){ } else if (kind == 0) {
this.buttons = [] this.buttons = []
} }
}, },
optionSubCategory:1, optionSubCategory: 1,
changeCategory(category, subcategory=0){ changeCategory(category, subcategory = 0) {
this.kind = (category=='sub') ? this.kind : category; this.kind = (category == 'sub') ? this.kind : category;
if(subcategory != 0) { if (subcategory != 0) {
this.subkind = subcategory this.subkind = subcategory
}else{ } else {
this.subkind = 0 this.subkind = 0
} }
if(category == 0){ if (category == 0) {
this.kind = 0; this.kind = 0;
this.subkind = 0; this.subkind = 0;
} }
this.initButtons(category) this.initButtons(category)
this.reloadOptions(); this.reloadOptions();
}, },
reloadOptions(){ reloadOptions() {
if(this.kind == 0){ if (this.kind == 0) {
this.options = this.orioptions this.options = this.orioptions
return; return;
} }
if(this.subkind == 0){ if (this.subkind == 0) {
this.options = this.orioptions.filter(option=> option.kind == this.kind) this.options = this.orioptions.filter(option => option.kind == this.kind)
return; return;
} }
this.options = this.orioptions.filter(option=> option.kind == this.kind && option.subkind == this.subkind) this.options = this.orioptions.filter(option => option.kind == this.kind && option.subkind == this.subkind)
}, },
searchOptions(e){ searchOptions(e) {
this.reloadOptions(); this.reloadOptions();
// let val = e.target.value.toLowerCase() let val = e.target.value.toLowerCase()
let val = this.searchtext.toLowerCase()
this.options = (this.options).filter(option=>{ this.options = (this.options).filter(option=>{
if(option.group_name == null) option.group_name = '' if(option.group_name == null) option.group_name = ''
if(option.spec == null) option.spec = '' if(option.spec == null) option.spec = ''
if(option.memo == null) option.memo = '' if(option.memo == null) option.memo = ''
if(option.price == null) option.price = 0 if(option.price == null) option.price = 0
if(option.unit == null) option.unit = '' if(option.unit == null) option.unit = ''
return option.group_name.toLowerCase().includes(val) || option.memo.toLowerCase().includes(val) || option.spec.toLowerCase().includes(val) || option.unit.includes(val) || String(option.price).includes(val) 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)
}) })
} }
} }
} }

16
wms/mkt/pricereview-create.php

@ -1051,6 +1051,11 @@ $option_str .= "</tbody></table>";
optionSeatArr.push($(this).html() + "@@"); optionSeatArr.push($(this).html() + "@@");
}) })
$('#option_seat_all').val(optionSeatArr); $('#option_seat_all').val(optionSeatArr);
var optionID = [];
$("td[class='_optionid']").each(function() {
optionID.push($(this).val());
})
$('#optionid_all').val()
var optionUnitPriceArr = []; var optionUnitPriceArr = [];
$("input[name='option_unit_price']").each(function() { $("input[name='option_unit_price']").each(function() {
optionUnitPriceArr.push($(this).val().replace(/[,]+/g, "")); optionUnitPriceArr.push($(this).val().replace(/[,]+/g, ""));
@ -1078,11 +1083,11 @@ $option_str .= "</tbody></table>";
$('#option_relate_facil_all').val(optionRelateFacilArr); $('#option_relate_facil_all').val(optionRelateFacilArr);
var mnIdArr = []; var mnIdArr = [];
$("input[name='mn_id']").each(function() { $("input[name='mn_id']").each(function() {
mnIdArr.push($(this).val()); mnIdArr.push($(this).val());
}) })
$('#mn_id_all').val(mnIdArr); $('#mn_id_all').val(mnIdArr);
var mnKindArr = []; var mnKindArr = [];
$("select[name='mn_kind']").each(function() { $("select[name='mn_kind']").each(function() {
@ -1265,6 +1270,7 @@ $options = $stmt->fetchAll(PDO::FETCH_ASSOC);
<table id="" class="table table-striped table-bordered" style="width:100%"> <table id="" class="table table-striped table-bordered" style="width:100%">
<thead> <thead>
<tr class="kind-col"> <tr class="kind-col">
<th scope='col'>ID</th>
<th scope="col" nowrap>名稱</th> <th scope="col" nowrap>名稱</th>
<th scope="col" nowrap>規格</th> <th scope="col" nowrap>規格</th>
<th scope="col" nowrap>備註</th> <th scope="col" nowrap>備註</th>
@ -1276,6 +1282,7 @@ $options = $stmt->fetchAll(PDO::FETCH_ASSOC);
<tbody> <tbody>
<template x-for="option in options"> <template x-for="option in options">
<tr style="cursor:pointer"> <tr style="cursor:pointer">
<td x-text='option.id' class='_optionid'></td>
<td x-text="option.group_name"> </td> <td x-text="option.group_name"> </td>
<td x-text="option.spec"></td> <td x-text="option.spec"></td>
<td x-text="option.memo"></td> <td x-text="option.memo"></td>
@ -1934,7 +1941,7 @@ if($_SERVER["REQUEST_METHOD"] == "POST"){
<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_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> <td><input type="text" name="option_qty" class="form-control" size="2" maxlength="2" value="<?php echo $v["item_qty"]; ?>"></td>
<td><input type="text" name="option_price_bp" class="form-control dollar-right" size="8" value="<?php echo number_format($v["item_price_bp"]); ?>" readonly> <td><input type="text" name="option_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="B"><input type="hidden" name="op_id" value="<?php echo $v["price_id"]; ?>"> <input type="hidden" name="item_group" value="B"><input type="hidden" name="op_id" value="<?php echo $v["id"]; ?>">
</td> </td>
<td><input type="text" name="option_memo" class="form-control" size="20" values="<?php echo $v["memo"]; ?>"></td> <td><input type="text" name="option_memo" class="form-control" size="20" values="<?php echo $v["memo"]; ?>"></td>
<td name="option_relate_facil"></td> <td name="option_relate_facil"></td>
@ -2479,7 +2486,8 @@ if($_SERVER["REQUEST_METHOD"] == "POST"){
<input type="hidden" name="pay_amount_all" id="pay_amount_all"> <input type="hidden" name="pay_amount_all" id="pay_amount_all">
<input type="hidden" name="pay_period_all" id="pay_period_all"> <input type="hidden" name="pay_period_all" id="pay_period_all">
<input type="hidden" name="vol_no" id="vol_no" value="<?php echo $vol_no; ?>"> <input type="hidden" name="vol_no" id="vol_no" value="<?php echo $vol_no; ?>">
<input type="hidden" name="op_id_all" id="op_id_all"> <!-- <input type="hidden" name="op_id_all" id="op_id_all"> -->
<input type="hidden" name="optionid_all" id="optionid_all">
<input type="hidden" name="option_seat_all" id="option_seat_all"> <input type="hidden" name="option_seat_all" id="option_seat_all">
<input type="hidden" name="option_unit_price_all" id="option_unit_price_all"> <input type="hidden" name="option_unit_price_all" id="option_unit_price_all">
<input type="hidden" name="option_qty_all" id="option_qty_all"> <input type="hidden" name="option_qty_all" id="option_qty_all">

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

@ -1,7 +1,9 @@
<?php <?php
if ($_SERVER["REQUEST_METHOD"] == "POST") { if ($_SERVER["REQUEST_METHOD"] == "POST") {
// print_r($_POST); echo '<pre>';
// exit; print_r($_POST);
echo '</pre>';
exit;
foreach ($_POST as $k => $v) { foreach ($_POST as $k => $v) {
$$k = htmlspecialchars(stripslashes(trim($v))); $$k = htmlspecialchars(stripslashes(trim($v)));
} }

4
wms/mkt/pricereview_repair-record-submit.php

@ -1,8 +1,4 @@
<?php <?php
// echo '<pre>';
// print_r($_POST);
// echo '</pre>';
// exit();
if ($_SERVER["REQUEST_METHOD"] == "POST") { if ($_SERVER["REQUEST_METHOD"] == "POST") {
//print_r($_POST);exit; //print_r($_POST);exit;
foreach ($_POST as $k => $v) { foreach ($_POST as $k => $v) {

3
wms/sign/sign_form.php

@ -598,5 +598,4 @@ function base_url($url)
</div> </div>
</body> </body>
<?php ?>
Loading…
Cancel
Save