diff --git a/wms/fun_global.php b/wms/fun_global.php
index c57b3a3d..f1ec14de 100644
--- a/wms/fun_global.php
+++ b/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"; // 總經理
}
diff --git a/wms/mkt/assets/js/alpine.js b/wms/mkt/assets/js/alpine.js
index cb4ea010..26da6b25 100644
--- a/wms/mkt/assets/js/alpine.js
+++ b/wms/mkt/assets/js/alpine.js
@@ -200,11 +200,13 @@ const pricereviewOptionSelect = ()=>{
this.initButtons();
},
options: options,
+ orioptions: options,
optionalArr: {
1:'標配',
2:'選配',
3:'加價',
},
+ searchtext:'',
kind:0,
subkind:0,
buttons:[],
@@ -239,14 +241,54 @@ const pricereviewOptionSelect = ()=>{
this.buttons = [
{name: '平台梯', type: 'E1'},
]
+ }else if(kind == 'F'){
+ this.buttons = [
+ {name: '汰改', type: 'F1'},
+ ]
+ }else if(kind == 0){
+ this.buttons = []
}
},
- kind:0,
optionSubCategory:1,
- changeCategory(category){
- this.kind = category
+ 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)
+ })
+ }
}
}
\ No newline at end of file
diff --git a/wms/mkt/pricereview-create.php b/wms/mkt/pricereview-create.php
index f9d11c0a..a1d86d4f 100644
--- a/wms/mkt/pricereview-create.php
+++ b/wms/mkt/pricereview-create.php
@@ -244,7 +244,7 @@ $option_str .= "";
}
.modal-content {
- height: 710px;
+ height: 760px;
}
#optionModal .modal-body {
@@ -796,6 +796,37 @@ $option_str .= "";
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("
");
+ k++;
+ });
+ $("#optionFaciModal .modal-body").append("