数据库A表:收费项目 药品名称 单位 金额 库存
0001 复方甘草合剂 盒 12.00 100
0002 复方维生素B片 瓶 1.70 100
0003 黄体酮注射液 支 0.78 50
0004 达克宁栓 盒 22.00 70
如和实现收费时操作员录入药品或收费项目的五笔或拼音首码后,按回车键即调出药品或收费项目选择界面
0001 复方甘草合剂 盒 12.00 100
0002 复方维生素B片 瓶 1.70 100
0003 黄体酮注射液 支 0.78 50
0004 达克宁栓 盒 22.00 70
如和实现收费时操作员录入药品或收费项目的五笔或拼音首码后,按回车键即调出药品或收费项目选择界面
然后就可以了以前采集过汉字拼音表,不过索引是另一个哥们做的大哥能不能仔细说明一下,或者给咱发一个[email protected] 万分感谢
這只是的提示你的作用,你可以自已去完善其功能!
function GetChineseAsc(const crStr:String;crLength:Integer):String;
var i,HighPosition,LowPosition:Integer;
AscValue,AscStr:String;
begin
Result:='';
i:=2; //1个汉字占用两个字节
while i<=Length(crStr) do
begin
if Length(Trim(Result))=crLength then Break; //如果超过一定长度,则退出
HighPosition:=Ord(crStr[i-1])-160;
LowPosition:=Ord(crStr[i])-160;
if (HighPosition<16) or (HighPosition>55) or (LowPosition<=0) or (LowPosition>94) then
begin
//if HighPosition>
if crStr[i-1] in ['a'..'z','A'..'Z'] then
Result:=Result+UpperCase(crStr[i-1]);
i:=i+1;
Continue;
end;
AscValue:=FormatFloat('00',HighPosition)+FormatFloat('00',LowPosition);
AscStr:='';
if (AscValue>='1601') and (AscValue<='1636') then
AscStr:='A';
if (AscValue>='1637') and (AscValue<='1832') then
AscStr:='B';
if (AscValue>='1833') and (AscValue<='2077') then
AscStr:='C';
if (AscValue>='2078') and (AscValue<='2273') then
AscStr:='D';
if (AscValue>='2274') and (AscValue<='2301') then
AscStr:='E';
if (AscValue>='2302') and (AscValue<='2432') then
AscStr:='F';
if (AscValue>='2433') and (AscValue<='2593') then
AscStr:='G';
if (AscValue>='2594') and (AscValue<='2786') then
AscStr:='H';
if (AscValue>='2787') and (AscValue<='3105') then
AscStr:='J';
if (AscValue>='3106') and (AscValue<='3211') then
AscStr:='K';
if (AscValue>='3212') and (AscValue<='3471') then
AscStr:='L';
if (AscValue>='3472') and (AscValue<='3634') then
AscStr:='M';
if (AscValue>='3635') and (AscValue<='3721') then
AscStr:='N';
if (AscValue>='3722') and (AscValue<='3729') then
AscStr:='O';
if (AscValue>='3730') and (AscValue<='3857') then
AscStr:='P';
if (AscValue>='3858') and (AscValue<='4026') then
AscStr:='Q';
if (AscValue>='4027') and (AscValue<='4085') then
AscStr:='R';
if (AscValue>='4086') and (AscValue<='4389') then
AscStr:='S';
if (AscValue>='4390') and (AscValue<='4557') then
AscStr:='T';
if (AscValue>='4558') and (AscValue<='4683') then
AscStr:='W';
if (AscValue>='4684') and (AscValue<='4924') then
AscStr:='X';
if (AscValue>='4925') and (AscValue<='5248') then
AscStr:='Y';
if (AscValue>='5249') and (AscValue<='5589') then
AscStr:='Z';
Result:=Result+AscStr;
I:=I+2
end;
end;