实际管理,barcode搜索

duizhaopin
13507605001 2 years ago
parent 69d7c61513
commit 50c49d592e

@ -177,17 +177,17 @@ class BllMedicament(Repository):
filter_base += " and " filter_base += " and "
filter_base += f" (`name` like '{seach_word}' or english_name like '{seach_word}') " filter_base += f" (`name` like '{seach_word}' or english_name like '{seach_word}') "
# 搜索bar_code # 搜索bar_code
# if b_code: if b_code:
# if len(b_code) > 10: if len(b_code) > 10:
# new_code = '' new_code = ''
# for i in range(int(len(b_code) / 2)): for i in range(int(len(b_code) / 2)):
# new_code = b_code[i*2:(i+1)*2] + new_code new_code = b_code[i*2:(i+1)*2] + new_code
# else: else:
# new_code = b_code new_code = b_code
# new_code = f"%{new_code}%" new_code = f"%{new_code}%"
# if filter_base: if filter_base:
# filter_base += " and " filter_base += " and "
# filter_base += f" bar_code like '{new_code}' " filter_base += f" bar_code like '{new_code}' "
if filter_base: if filter_base:
if len(seach_word) > 10: if len(seach_word) > 10:
new_code = '' new_code = ''

Loading…
Cancel
Save