|
|
@@ -258,28 +258,33 @@ export default {
|
|
|
return
|
|
|
}
|
|
|
|
|
|
+ var reg = /^[0-9a-zA-Z]*$/g
|
|
|
+ let notChinese = reg.test(this.py) == true ? true : false
|
|
|
+
|
|
|
//大于等于2个字符才开始搜索 shish 20210622
|
|
|
if(this.py.length <=1){
|
|
|
return
|
|
|
}
|
|
|
- //红色粉色花材太多,搜索时会卡住,所以设置输入第三个字母时才搜索
|
|
|
- if(this.py.indexOf('fs') == 0 && this.py.length <= 2){
|
|
|
- return
|
|
|
- }
|
|
|
- if(this.py.indexOf('hs') == 0 && this.py.length <= 2){
|
|
|
- return
|
|
|
- }
|
|
|
- if(this.py.indexOf('zs') == 0 && this.py.length <= 2){
|
|
|
- return
|
|
|
- }
|
|
|
- if(this.py.indexOf('ls') == 0 && this.py.length <= 2){
|
|
|
- return
|
|
|
- }
|
|
|
- if(this.py.indexOf('bs') == 0 && this.py.length <= 2){
|
|
|
- return
|
|
|
- }
|
|
|
- if(this.py.indexOf('yj') == 0 && this.py.length <= 2){
|
|
|
- return
|
|
|
+ if(notChinese){
|
|
|
+ //红色粉色花材太多,搜索时会卡住,所以设置输入第三个字母时才搜索
|
|
|
+ if(this.py.indexOf('fs') == 0 && this.py.length <= 2){
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if(this.py.indexOf('hs') == 0 && this.py.length <= 2){
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if(this.py.indexOf('zs') == 0 && this.py.length <= 2){
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if(this.py.indexOf('ls') == 0 && this.py.length <= 2){
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if(this.py.indexOf('bs') == 0 && this.py.length <= 2){
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if(this.py.indexOf('yj') == 0 && this.py.length <= 2){
|
|
|
+ return
|
|
|
+ }
|
|
|
}
|
|
|
//涉及记住花材的代码和流程,请全项目搜索关键词remember_item
|
|
|
//将已选的花材按productId键名组合
|
|
|
@@ -305,9 +310,14 @@ export default {
|
|
|
currentItem.userPrice = 0
|
|
|
currentItem.smallCount = 0
|
|
|
}
|
|
|
- let elePy = (currentItem.py && currentItem.py.toLocaleUpperCase()) || "";
|
|
|
- let hasPy = elePy.indexOf(this.py.toLocaleUpperCase()) >= 0;
|
|
|
- if (hasPy) {
|
|
|
+ let has = false
|
|
|
+ if (notChinese){
|
|
|
+ let elePy = (currentItem.py && currentItem.py.toLocaleUpperCase()) || "";
|
|
|
+ has = elePy.indexOf(this.py.toLocaleUpperCase()) >= 0 ? true : false
|
|
|
+ }else{
|
|
|
+ has = currentItem.name && currentItem.name.indexOf(this.py) >= 0 ? true : false
|
|
|
+ }
|
|
|
+ if (has) {
|
|
|
if(this.$util.isEmpty(filterItemData)){
|
|
|
filterItemData = [{classId: currentItem.classId, className: currentItem.className,isActive:true,child:[currentItem]}]
|
|
|
}else{
|