📄 formphszj.pas
字号:
//将产品服务等级改为只读begin
prodinfo.DblProdServLevel.Enabled := false;
prodinfo.DblProdServLevel.Color := $00F7FFFF;
Frmyhdb.VouchInit();
SetBlankData(LwlAcceLog);
LwlAcceLog.FieldByName('accept_grade').AsString :='C'; //受理等级
disablePanel(Frmkhxx);
disablePanel(Frmyhdb);
phoneinfo.PhoneInit;
progfunc.ProgFuncInit;
ForegiftInfo.Init();
Currcpbh:=FrmYyslzx.Getcpbh();
Currsldlx:=FrmYyslzx.Getsldlx();
Currscbh:=FrmYyslzx.Getscbh();
Currscls:=FrmYyslzx.Getscls();
Currddbh:=FrmYyslzx.Getddbh();
Currywm:=FrmYyslzx.Getywm();
if currcpbh = -1 then icpbh:='';
if currcpbh <>-1 then icpbh :=inttostr(currcpbh);
if currscbh = -1 then iscbh:='';
if currscbh <> -1 then iscbh := inttostr(currscbh);
if currscls = -1 then iscls := '';
if currscls <> -1 then iscls := inttostr(currscls);
exit;
end
else if (FrmYyslzx.Getywm ='I7') and (FrmYyslzx.Getscbh <> -1) then
begin
Label11.Visible:=false;
EdQuery.Visible:=false;
Lbtext.Visible:=false;
cbbatch.Visible:=false;
CbBatch.Checked:=false;
BtnCopy.Visible:=false;
end; //end if FrmYyslzx.Getywm ='I7'
//------modify by yqd about 机卡分离激活 at 20050524 end ----------
//如果为修改单,不能选择批量装机
if FrmYyslzx.Getscbh <> -1 then
begin
CbBatch.Checked := false;
CbBatch.Enabled := false;
end;
//******************************************************************************
//生产编号为空,窗口生成空白记录;不为空则通过生产编号和生产类型调出记录
Currcpbh:=FrmYyslzx.Getcpbh();
Currsldlx:=FrmYyslzx.Getsldlx();
Currscbh:=FrmYyslzx.Getscbh();
Currscls:=FrmYyslzx.Getscls();
Currddbh:=FrmYyslzx.Getddbh();
Currywm:=FrmYyslzx.Getywm();
if currcpbh = -1 then icpbh:='';
if currcpbh <>-1 then icpbh :=inttostr(currcpbh);
if currscbh = -1 then iscbh:='';
if currscbh <> -1 then iscbh := inttostr(currscbh);
if currscls = -1 then iscls := '';
if currscls <> -1 then iscls := inttostr(currscls);
//初始化窗口
FrmYhxx.ApplyInfo1.ApplyInit;
Frmyhxx.UserInit();
Frmkhxx.UserInit();
AccountInfo.AccountInit();
ProdInfo.ProdInit();
//古凤远:20040727:将产品服务等级改为只读begin
prodinfo.DblProdServLevel.Enabled := false;
prodinfo.DblProdServLevel.Color := $00F7FFFF;
//古凤远:20040727:将产品服务等级改为只读end
Frmyhdb.VouchInit();
SetBlankData(LwlAcceLog);
LwlAcceLog.FieldByName('accept_grade').AsString :='C'; //受理等级
disablePanel(Frmkhxx);
disablePanel(Frmyhdb);
phoneinfo.PhoneInit;
progfunc.ProgFuncInit;
ForegiftInfo.Init();
//========================================================================
//add by yqd start about 机卡分离1 20050424
//机卡分离,在显示装机前先弹出一个窗口,让业务员选择小灵通的产品类型
if iscbh = '' then
begin
frminterfacepop2:=Tfrminterfacepop2.Create(nil);
frminterfacepop2.ShowModal();
if frminterfacepop2.ibuttontype = 1 then //取消按钮
begin
PostMessage(self.handle, WM_CLOSE, 0, 0); //关闭窗口
exit;
end;
iproducttype:=frminterfacepop2.iproducttype;
//--------------add by yqd end about 机卡分离-----------------------------------
end;
//如果传入的客户编号是可修改的,置上对应的修改标志(modify on 2002.12.15)
FrmYhxx.iCustFlag := FrmYyslzx.CustBemod();
FrmKhxx.iRight := true; //放开使用者客户信息的限制
ls_flag:='0';
llwl_userinfo:=FrmYyslzx.GetUserinfo;
if llwl_userinfo<>nil then
begin
if (not llwl_userinfo.Active) then llwl_userinfo.Open;
if llwl_userinfo.RecordCount >0 then
begin
//如果传入的客户编号是可修改的,记录初始值(modify on 2002.12.15)
if FrmYyslzx.CustBemod() = true then
begin
FrmYhxx.iCustId := llwl_userinfo.FieldByName('cust_id').AsString;
end;
FrmYhxx.lwluserinfo.edit;
for li_step:=0 to 43 do
begin
FrmYhxx.LwlUserInfo.Fields.Fields[li_step].AsString:=llwl_userinfo.Fields.Fields[li_step].AsString;
end;
//设置查号名称的默认值(add on 2003.10.30)
PhoneInfo.iCustName := FrmYhxx.LwlUserInfo.FieldByName('cust_name').AsString;
FrmYhxx.LwlUserInfo.Post;
ls_flag:='1';
end;
end;
if iscbh = '' then
addDefaultProgFunc; //添加默认的增值产品信息
if iscbh <> '' then
begin
GetProdData(ProdInfo.LwlProdInfo,iscbh,iscls,icpbh,'A0','1','');
if ProdInfo.LwlProdInfo.RecordCount = 0 then
begin
MessageDlg('缺少产品信息,请确认!',mtInformation,[mbok],0);
PostMessage(self.handle, WM_CLOSE, 0, 0); //关闭窗口
exit;
end;
ProgFunc.gCpbh := trim(ProdInfo.LwlProdInfo.FieldByName('product_id').AsString);
UserId := ProdInfo.LwlProdInfo.FieldByName('owncust_id').AsString; //所有者客户编号
CustId := ProdInfo.LwlProdInfo.FieldByName('usercust_id').AsString; //使用者客户编号
GetProdData(PhoneInfo.LwlPhoneInfo,iscbh,iscls,icpbh,'A1','1','main'); //检索主号码信息
if phoneinfo.LwlPhoneInfo.RecordCount <= 0 then
begin
MessageDlg('缺少号码信息,请确认!',mtInformation,[mbok],0);
PostMessage(self.handle, WM_CLOSE, 0, 0); //关闭窗口
exit;
end;
PhoneInfo.iOldNum := trim(PhoneInfo.LwlPhoneInfo.FieldByName('product_no').AsString);
PhoneInfo.itempNum := trim(PhoneInfo.LwlPhoneInfo.FieldByName('product_no').AsString);
PhoneInfo.DbeInsideNo.MaxLength := Length(trim(PhoneInfo.LwlPhoneInfo.FieldByName('inside_no').AsString));
GetProdData(ProgFunc.LwlIncrProd,iscbh,iscls,icpbh,'G0','1',''); //检索增值产品资料
GetProdData(ProgFunc.LwlIncrProdProp,iscbh,iscls,icpbh,'G1','1',''); //检索增值产品属性资料
ProgFunc.FuncShow();
if (ProgFunc.LwlIncrProd.RecordCount <=0) and (ProgFunc.LwlIncrProdProp.RecordCount > 0) then
begin
MessageDlg('增值产品信息有误,请确认!',mtInformation,[mbok],0);
PostMessage(self.handle, WM_CLOSE, 0, 0);
exit;
end;
//检索预付费信息(modify on 2003.10.08)
if ProgFunc.LwlIncrProdProp.Locate('item_code','prepay_info',[loCaseInsensitive]) then
begin
GetProdData(ProgFunc.LwlPrepay,iscbh,iscls,icpbh,'H3','1','');
if ProgFunc.LwlPrepay.RecordCount <=0 then
begin
MessageDlg('预付费信息有误,请确认!',mtWarning,[mbok],0);
PostMessage(self.handle, WM_CLOSE, 0, 0);
exit;
end;
GetProdData(ProgFunc.LwlPrepayOld,iscbh,iscls,icpbh,'H3','0','');
end;
//PHS的CENTREX功能检验(modify on 2003.02.23)
if ProgFunc.LwlIncrProd.Locate('prod_class','H3',[loCaseInsensitive]) then
begin
PhoneInfo.DbeGroupNo.Enabled := true;
PhoneInfo.DbeGroupNo.Color := clWindow;
PhoneInfo.DbeInsideNo.Enabled := true;
PhoneInfo.DbeInsideNo.Color := clWindow;
PhoneInfo.BtnGroupSel.Enabled := true;
end
else
begin
PhoneInfo.DbeGroupNo.Enabled := false;
PhoneInfo.DbeGroupNo.Color := $00EAEAEA;
PhoneInfo.DbeInsideNo.Enabled := false;
PhoneInfo.DbeInsideNo.Color := $00EAEAEA;
PhoneInfo.BtnGroupSel.Enabled := false;
end;
GetProdData(ProgFunc.LwlDevice,iscbh,iscls,icpbh,'A5','1',''); //检索终端设备资料
if ProgFunc.LwlDevice.RecordCount >0 then
SetComboBox(ProgFunc.CbDevice,ProgFunc.LwlDevice,'LuDevCode');
GetProdData(LwlAcceLog,iscbh,iscls,icpbh,'B2','1',''); //检索营业受理辅助信息
if LwlAcceLog.RecordCount = 0 then
begin
MessageDlg('缺少受理辅助信息,请确认!',mtError,[mbok],0);
PostMessage(self.handle, WM_CLOSE, 0, 0);
exit;
end;
//==========================================================================================
//显示经办人信息 薛盈2003-10-1
//==========================================================================================
FrmYhxx.ApplyInfo1.LwlApplyInfo.FieldByName('apply_name').AsString := LwlAcceLog.FieldByName('apply_name').AsString;
FrmYhxx.ApplyInfo1.LwlApplyInfo.FieldByName('apply_cert').AsString := LwlAcceLog.FieldByName('apply_cert').AsString;
FrmYhxx.ApplyInfo1.LwlApplyInfo.FieldByName('apply_certno').AsString := LwlAcceLog.FieldByName('apply_certno').AsString;
FrmYhxx.ApplyInfo1.LwlApplyInfo.FieldByName('apply_tel').AsString := LwlAcceLog.FieldByName('apply_tel').AsString;
//==========================================================================================
//以上为修改内容
//==========================================================================================
//从pdn_pdinfo中取出对应客户、用户编号,再根据编号来取对应信息
if ls_flag='0' then
begin
GetProdData(FrmYhxx.LwlUserInfo,iscbh,iscls,icpbh,'E7','1','owner'); //检索所有者客户资料
if FrmYhxx.LwlUserInfo.RecordCount = 0 then
begin
MessageDlg('缺少客户信息,请确认!',mtInformation,[mbok],0);
PostMessage(self.handle, WM_CLOSE, 0, 0);
exit;
end;
end;
//设置查号名称的默认值(add on 2003.10.30)
PhoneInfo.iCustName := FrmYhxx.LwlUserInfo.FieldByName('cust_name').AsString;
GetProdData(FrmYhDb.LwlVouchInfo,iscbh,iscls,icpbh,'A6','1',''); //检索担保人资料
if FrmYhDb.LwlVouchInfo.RecordCount > 0 then
begin
CbxVouch.Checked := true;
end;
if UserId <> CustId then
begin
GetProdData(FrmKhxx.LwlUserInfo,iscbh,iscls,icpbh,'E7','1','user'); //检索使用者客户资料
if FrmKhxx.LwlUserInfo.RecordCount = 0 then
begin
MessageDlg('缺少客户信息,请确认!',mtInformation,[mbok],0);
PostMessage(self.handle, WM_CLOSE, 0, 0);
exit;
end;
CbxDifference.Checked := true;
//设置查号名称的默认值(add on 2003.10.30)
PhoneInfo.iCustName := FrmKhxx.LwlUserInfo.FieldByName('cust_name').AsString;
end;
GetProdData(AccountInfo.LwlAccount,iscbh,iscls,icpbh,'A3','1',''); //检索帐目资料
if AccountInfo.LwlAccount.RecordCount = 0 then
begin
MessageDlg('缺少帐目信息,请确认!',mtInformation,[mbok],0);
PostMessage(self.handle, WM_CLOSE, 0, 0);
exit;
end;
GetProdData(AccountInfo.LwlAccoInfo,iscbh,iscls,icpbh,'A4','1',''); //检索帐务资料
if AccountInfo.LwlAccoInfo.RecordCount = 0 then
begin
MessageDlg('缺少帐务信息,请确认!',mtInformation,[mbok],0);
PostMessage(self.handle, WM_CLOSE, 0, 0);
exit;
end
else if AccountInfo.LwlAccoInfo.RecordCount = 1 then //如果缴费方式全部相同,设置验证值
begin
AccountInfo.gPdnPayId := AccountInfo.LwlAccoInfo.FieldByName('pay_id').AsString;
//取预付费信息(modify on 2003.11.04)
AccountInfo.LwlAccoInfo.First;
if AccountInfo.LwlAccoInfo.FieldByName('account_id').AsString <> '' then
begin
GetProdData(AccountInfo.LwlPrepay,iscbh,iscls,icpbh,'H3','1','');
if AccountInfo.LwlPrepay.RecordCount <=0 then
begin
MessageDlg('预付费信息有误,请确认!',mtWarning,[mbok],0);
PostMessage(self.handle, WM_CLOSE, 0, 0);
exit;
end;
GetProdData(AccountInfo.LwlPrepayOld,iscbh,iscls,icpbh,'H3','0','');
end;
end;
end;
//调用显示方式
AccountInfo.PayMode();
Oldprodno:='';
if iscbh <> '' then
begin
Oldprodno:=phoneinfo.LwlPhoneInfo.fieldbyname('product_no').asstring;
end;
GetProdData(ForegiftInfo.lwlForegift,iscbh,iscls,icpbh,'H6','1',''); //检索押金信息
if ForegiftInfo.lwlForegift.RecordCount = 0 then
begin
ForegiftInfo.Init();
end;
//小灵通拆机复话 edited by ljb 2004.03.17
if (FrmYyslzx.Getywm() <> '00') and (FrmYyslzx.Getywm()<>'I7')then
begin
if iscbh = '' then //第一次保存前
begin
EdQuery.Enabled := true;
EdQuery.Color := clwhite;
end
else //保存后再进入窗口
begin
EdQuery.Enabled := false;
EdQuery.Color := $00EAEAEA;
EdQuery.Text := FrmYyslzx.Getcphm();
end;
Label11.Visible := true;
EdQuery.Visible := true;
Label6.Caption := '拆机复话';
//将界面变成不可修改
disableSomePanelOfPhsZj();
CbxVouch.Enabled := false;
CbxDifference.Enabled := false;
end; //end 小灵通拆机复话
//----------------------add by qyd start about 机卡分离 ---------------------------------------
if iscbh <> '' then
begin
if ProdInfo.LwlProdInfo.FieldByName('prod_prop').AsString = 'B1' then
begin
iproducttype:= '1';
end
else if ProdInfo.LwlProdInfo.FieldByName('prod_prop').AsString = 'B3' then
begin
iproducttype := '0';
end;
end;
//showmessage(iproducttype);
if iproducttype = '1' then
begin
framephsinfo.Setprodinfo(prodinfo);
end;
if frminterfacepop2 <> nil then
begin
frminterfacepop2.Free;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -