📄 u_web_userm.pas
字号:
s := iif(m_lang = 1, '预订流水号 ', 'RSVNNO: ') + fieldbyname('rsvnno').asstring + #13#10;
s := s + iif(m_lang = 1, '房 号: ', 'ROOM: ') + fieldbyname('room').asstring + ' ' + #13#10;
s := s + iif(m_lang = 1, '房 态: ', 'RM STS: ') + rst + #13#10;
s := s + iif(m_lang = 1, '住客姓名: ', 'NAME: ') + fieldbyname('name').asstring + #13#10;
s := s + iif(m_lang = 1, '馀住天数: ', 'LFT OCCP DAYS: ') + fieldbyname('days_val').asstring + #13#10;
case fieldbyname('rst').asinteger of
0, 4:
begin
s := s + iif(m_lang = 1, '起始时间: ', 'BEG DATE: ') + datetostr(fieldbyname('adate').asdatetime, 1) + #13#10;
s := s + iif(m_lang = 1, '截止时间: ', 'END DATE: ') + datetostr(fieldbyname('ddate').asdatetime, 1) + #13#10;
end;
else
begin
if fieldbyname('fsave').asinteger > 0 then
begin
s := s + iif(m_lang = 1, '起始时间: ', 'BED DATE: ') + datetostr(fieldbyname('adate').asdatetime, 1) + #13#10;
s := s + iif(m_lang = 1, '截止时间: ', 'END DATE: ') + datetostr(fieldbyname('ddate').asdatetime, 1) + #13#10;
end
else
begin
s := s + iif(m_lang = 1, '入住时间: ', 'ARR DATE: ') + datetostr(fieldbyname('adate').asdatetime, 1) + #13#10;
s := s + iif(m_lang = 1, '离店时间: ', 'DEP DATE: ') + datetostr(fieldbyname('ddate').asdatetime, 1) + #13#10;
end;
end;
end;
if not fieldbyname('dtype').isnull then
s := s + iif(m_lang = 1, '折扣类型: ', 'DISC TYPE: ') + dtype_list[fieldbyname('dtype').asinteger]
else
s := s + iif(m_lang = 1, '折扣类型: ', 'DISC TYPE: ');
if (trim(fieldbyname('room').asstring) <> '') and (fieldbyname('rst').asinteger > 4) then
s := s + #13#10 + iif(m_lang = 1, '折 扣: ', 'DISC: ') + currtostrf(fieldbyname('disc').ascurrency, fffixed, gint_dec);
if not fieldbyname('dname').isnull then
s := s + #13#10 + iif(m_lang = 1, '打 折 人: ', 'APPROV BY: ') + fieldbyname('dname').asstring;
if (trim(fieldbyname('room').asstring) <> '') and (fieldbyname('rst').asinteger > 4) then
s := s + #13#10 + iif(m_lang = 1, '实际房费: ', 'RATE: ') + currtostrf(fieldbyname('rate').ascurrency, fffixed, gint_dec);
if fieldbyname('fsave').asinteger <> 0 then
s := s + #13#10 + iif(m_lang = 1, '保留天数: ', 'SAVED DAYS: ') + fieldbyname('fsave').asstring;
if fieldbyname('remark').asstring <> '' then
s := s + #13#10 + iif(m_lang = 1, '客房备注: ', 'RM REMARK: ') + bow_str(fieldbyname('remark').asstring);
s := s + '*room:' + fieldbyname('room').asstring + '*rst:' + fieldbyname('rst').asstring + '*fsave:' + fieldbyname('fsave').asstring + '*';
s := s + '*adate:' + datetostr(fieldbyname('adate').asdatetime) + '*ddate:' + datetostr(fieldbyname('ddate').asdatetime) + '*rsvnno:' + fieldbyname('rsvnno').asstring + '*recno:' + fieldbyname('recno').asstring + '*';
case fieldbyname('rst').asinteger of
0, 4:
for j := 6 to colcount - 1 do
if (cells[j + colcount, 0] >= m_adate) and (cells[j + colcount, 0] <= m_ddate) then
cells[j + colcount, arow] := s;
else
for j := 6 to colcount - 1 do
if (cells[j + colcount, 0] >= m_adate) and (cells[j + colcount, 0] < m_ddate) then
cells[j + colcount, arow] := s;
end;
cells[colcount + 1, arow] := fieldbyname('rst').asstring;
cells[colcount + 2, arow] := fieldbyname('fsave').asstring;
end;
end;
next;
end;
close;
rcls := 0;
rst_rsv := 0;
rst_dirty := 0;
rst_ooo := 0;
rst_fsave := 0;
rst_inhou := 0;
for i := 1 to rowcount - 1 do
inc(rcls, strtoint(getstr(cells[3, i])));
for i := 1 to rowcount - 1 do
begin
j := strtoint(getstr(cells[colcount + 1, i], '-1'));
if cells[0, i] <> '' then
j := -1;
case j of
-1:
if (cells[0, i] <> '') then
inc(rst_rsv, strtoint(getstr(cells[3, i])));
0:
if cells[colcount + 2, i] = '' then
inc(rst_dirty)
else
inc(rst_fsave);
1:
if cells[colcount + 2, i] <> '' then
inc(rst_fsave);
4: inc(rst_ooo);
5, 6, 7: inc(rst_inhou);
end;
end;
s := iif(m_lang = 1, '总用房数:[', 'TTL USED RMS:[') + inttostr(rcls) + iif(m_lang = 1, '] 其中:', '] INC:');
s := s + iif(m_lang = 1, ' 预订房:[', ' BK RMS:[ ') + inttostr(rst_rsv) + ']';
if rst_ooo > 0 then
s := s + iif(m_lang = 1, ' 维修房:[', ' OOO:[ ') + inttostr(rst_ooo) + ']';
s := s + iif(m_lang = 1, ' 在住房:[', ' OCCP:[') + inttostr(rst_inhou) + ']';
if rst_dirty > 0 then
s := s + iif(m_lang = 1, ' 待清房(预定可用):[', ' V.D(BK USFUL):[') + inttostr(rst_dirty) + ']';
if rst_fsave > 0 then
s := s + iif(m_lang = 1, ' 保留房(预定可用):[', 'SAVED RM(BK USFUL):[') + inttostr(rst_fsave) + ']';
pn_stat.caption := ' ' + s;
paste_bmp;
{if m_diff = 5 then
begin
s := copy(analy_str('date_c', m_str), 6, 5);
pn_stat.Caption := '';
with sg_jl do
for i := 6 to colcount - 1 do
if pos(s, cells[i, 0]) > 0 then
begin
m_col := i;
break;
end;
end;}
end;
end;
procedure TF_WEB_USERM.display_1;
var
i: integer;
s: string; //
begin
case m_lang of
1: s := '房类*8*配额价*10*配额数*10*预订数*10*实现数*10*合同数*10*合同价*10*';
2: s := 'RM CLS*8*ALT RATE*10*QUANTITY*10*BOOK*10*OCCUP*10*CONTRACT*10*CON RATE*10*';
end;
title_sg_wy(sg_jl, s, false);
caption := getpartstr(m_str, '.', '');
m_str := getpartstr(m_str, '.', '', false);
with sg_jl do
for i := 0 to rcls_list.Count - 1 do
begin
s := trans_lst_wy(i, rcls_list);
if pos(s, m_str) > 0 then
begin
str_grid_wy(sg_jl, arow);
cells[0, arow] := s;
cells[1, arow] := analy_str(s + 'rate', m_str);
cells[2, arow] := analy_str(s + 'room', m_str);
cells[3, arow] := analy_str(s + 'rsv', m_str);
cells[4, arow] := analy_str(s + 'fin', m_str);
cells[5, arow] := analy_str(s + 'con', m_str);
cells[6, arow] := analy_str(s + 'rate_c', m_str);
cells[1, arow] := iif(cells[1, arow] = '0.00', '', cells[1, arow]);
cells[2, arow] := iif(cells[2, arow] = '0', '', cells[2, arow]);
cells[3, arow] := iif(cells[3, arow] = '0', '', cells[3, arow]);
cells[4, arow] := iif(cells[4, arow] = '0', '', cells[4, arow]);
cells[5, arow] := iif(cells[5, arow] = '0', '', cells[5, arow]);
cells[6, arow] := iif(cells[6, arow] = '0', '', cells[6, arow]);
end;
end;
end;
procedure TF_WEB_USERM.display_3;
var
i: integer;
s: string; //
begin
case m_lang of
1: s := '房号*12*房态*8*房类*8*主付*8*标准价*8*';
2: s := 'ROOM*12*RM STS*8*RM CLS*8*MASTER*8*PRICE*8*';
end;
title_sg_wy(sg_jl, s, false);
with sg_jl do
with f_reca_dm.qy_wangy do
begin
fixedcols := 0;
close;
sql.Clear;
s := 'select a.room,a.rst,a.rclass,b.master,a.strate,aa=0 from roomno a,roomno_2 b where a.room=b.room and a.rst=1 and a.fsave=0 and rclass=:vrclass ';
s := s + 'union select a.room,a.rst,a.rclass,b.master,a.strate,aa=1 from roomno a,roomno_2 b where a.room=b.room and a.rst=1 and a.fsave=0 and rclass<>:vrclass order by aa,rclass,a.room';
sql.Add(s);
s := getstr(analy_str('rclass', m_str));
i := trans_lst_wy(s, rcls_list, true);
parambyname('vrclass').asinteger := i;
open;
while not eof do
begin
str_grid_wy(sg_jl, arow);
for i := 0 to ColCount - 1 do
case i of
1: cells[i, arow] := trans_lst_wy(fields.fields[i].asinteger, rst_list, true);
2: cells[i, arow] := trans_lst_wy(fields.fields[i].asinteger, rcls_list, true);
4: cells[i, arow] := currtostrf(fields.fields[i].ascurrency, fffixed, gint_dec);
else
cells[i, arow] := fields.fields[i].asstring;
end;
next;
end;
close;
end;
end;
procedure TF_WEB_USERM.display_17;
var
i: integer;
s: string; //
begin
case m_lang of
1: s := '房号*6*房态*6*住客姓名*20*入住时间*16*离店时间*16*折扣类型*10*折扣*6*批准人*12*主付*6*房租*8*服务费*8*' + fee_tax + '*8*房费小计*12*加床费*10*加床服务*10*备 注*26*协议名称*30*工号*6*';
2: s := 'ROOM*6*STATUS*6*NAME*20*ARR DATE*16*DEP DATE*16*DISC TYPE*10*DISC*6*APPROV*12*MAST*6*RATE*8*SVR.CHG*8*' + fee_tax + '*8*SUB TTL*12*EX-BED*10*S.EX-BED*10*REMARK*26*CORP NAME*30*OPNO*6*';
end;
title_sg_wy(sg_jl, s, false);
caption := iif(m_lang = 1, ' 到点钟房查询 ** 当前时间:', ' TIMED CLOCK RM ENQ **CURR TIME:') + datetostr(now, 1) + ' **';
with sg_jl do
with f_reca_dm.qy_wangy do
begin
fixedcols := 0;
close;
sql.Clear;
s := 'select a.room,b.rst,a.name,a.adate,a.ddate,a.dtype,a.disc,a.dname,a.master,a.rate,a.srate,a.fee1,tot=a.rate+a.srate+a.fee1,a.extbed,a.sextbed,remark,aa=no+'' - ''+c_name,opno ';
s := s + 'from roomno_2 a,roomno b,roomno_1 c where a.room=b.room and a.room=c.room and b.rst>4 and clock=1 and datediff(mi,ddate,getdate())>=0 order by a.room';
sql.Add(s);
open;
while not eof do
begin
str_grid_wy(sg_jl, arow);
for i := 0 to ColCount - 1 do
case i of
1: cells[i, arow] := trans_lst_wy(fields.fields[i].asinteger, rst_list, true);
3, 4: cells[i, arow] := datetostr(fields.fields[i].asdatetime, 1);
5: cells[i, arow] := trans_lst_wy(fields.fields[i].asinteger, dtype_list, true);
6, 9..14:
cells[i, arow] := currtostrf(fields.fields[i].ascurrency, fffixed, gint_dec);
else
cells[i, arow] := fields.fields[i].asstring;
end;
next;
end;
close;
end;
end;
procedure TF_WEB_USERM.display_2;
var
i: integer;
s: string; //
begin
case m_lang of
1: s := '日期*12*房类*8*配额数*10*配额价*10*预订数*10*预订价*10*实现数*10*实现价*10*';
2: s := 'DATE*12*RM CLS*8*QUANTITY*10*PRICE*10*BOOK*10*BOOK RATE*10*OCCUP*10*OCC RATE*10*';
end;
title_sg_wy(sg_jl, s, false);
caption := analy_str('name', m_str) + analy_str('adate', m_str) + '日 - ' + analy_str('ddate', m_str) + '日 配额实现一览';
with sg_jl do
with f_reca_dm.qy_wangy do
begin
close;
sql.Clear;
sql.Add('select date=getdate(),rclass,bgt,rate,bgt_d,rate_d,bgt_w,rate_w from agencype where no_dw=:vno_dw ');
parambyname('vno_dw').asstring := analy_str('no_dw', m_str);
open;
while not eof do
begin
str_grid_wy(sg_jl, arow);
for i := 0 to rcls_list.Count - 1 do
case i of
0: cells[i, arow] := datetostr(fields.fields[i].asdatetime);
1: cells[i, arow] := trans_lst_wy(fieldbyname('rclass').asinteger, rcls_list);
2, 4, 6:
begin
cells[i, arow] := fields.fields[i].asstring;
cells[i, arow] := iif(cells[i, arow] = '0', '', cells[i, arow]);
end;
3, 5, 7:
begin
cells[i, arow] := currtostrf(fields.fields[i].ascurrency, fffixed, gint_dec);
cells[i, arow] := iif(cells[i, arow] = '0.00', '', cells[i, arow]);
end;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -