wf_check_order

long ll_emp,ll_1,ll_sum,ll_orno,ll_find
string ls_find,ls_type
for ll_1=1 to dw_1.rowcount()
 ll_sum=0
 ll_orno=0
// dw_1.setitem(ll_1,"t_cjr",gs_userID)
// ll_sum=dw_1.getitemnumber(ll_1,"t_xl")
// if not ll_sum>0 then
//  Messagebox("错误!","第"+string(ll_1)+"行的发货数量不大于0,无法导入!")
//  dw_1.setrow(ll_1)
//  dw_1.selectrow(ll_1,true)
//  dw_1.scrolltorow(ll_1)
//  return 0
// end if
 ll_orno =long(dw_1.getitemstring(ll_1,"t_ddh"))
 
 if isnull(ll_orno) or ll_orno<=0 then
  Messagebox("错误!","第"+string(ll_1)+"行的订单号异常,请确认是否正确!")
  dw_1.setrow(ll_1)
  dw_1.selectrow(ll_1,true)
  dw_1.scrolltorow(ll_1)
  return 0
 end if
 //检查该订单是否已经在此次录入
 ls_find="t_orno="+string(ll_orno)
 ll_find=dw_2.find(ls_find,1,dw_2.rowcount())
 if ll_find>0 then
  Messagebox("提示"+string(ll_find),"你已经添加了该订单!")
  dw_2.scrolltorow(ll_find)
  dw_2.selectrow(ll_find,true)
  dw_1.setrow(ll_1)
  dw_1.selectrow(ll_1,true)
  dw_1.scrolltorow(ll_1)
  return(0)
 end if
 
 ll_find=0
 select count(*) into :ll_find from tbl_sls where t_orno=:ll_orno;
 if  ll_find>0 then
  Messagebox("提示","该订单已经存在!")
  dw_1.setrow(ll_1)
  dw_1.selectrow(ll_1,true)
  dw_1.scrolltorow(ll_1)
  return(0)
 end if
 ls_type=dw_1.getitemstring(ll_1,"t_cpm")
 if ls_type="搅拌站" then
  messagebox("提示","请将产品名称'搅拌站'改为'混凝土搅拌站'")
  return 0
 end if
next
return 1

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/75527/viewspace-720776/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/75527/viewspace-720776/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值