[其他]代码库
long ll_count
String ls_id
IF f_str_ISNULL(vid) THEN
ls_id = '%'
ELSE
ls_id = vid
END IF
IF NOT f_str_ISNULL(vbarcode) THEN
If Len(vbarcode)>12 and f_str_isnumber(vbarcode) Then
If f_verifyean13code(vbarcode)<>1 Then
Messagebox('错误','['+vbarcode+']商品条码校验出现错误,请仔细检查商品条码后重新输入!',Stopsign!)
Return -1
End If
End If
If Len(vbarcode)=8 And f_str_isnumber(vbarcode) Then
If f_verifyean8code(vbarcode)<>1 Then
Messagebox('错误','['+vbarcode+']商品条码校验出现错误,请仔细检查商品条码后重新输入!',Stopsign!)
Return -1
End If
End If
SELECT count(*) INTO :ll_count FROM goodsbase
WHERE gbbarcode=:vbarcode AND gbid <> :ls_id;
IF SQLCA.SQLCODE<0 THEN
f_ora_err()
Return 1
ELSEIF ll_count>0 THEN
Messagebox('错误','['+vbarcode+']商品条码已被基本信息使用!',Stopsign!)
Return -1
END IF
SELECT count(*) INTO :ll_count FROM goodsunits
WHERE gubarcode=:vbarcode AND gugdid <> :ls_id;
IF SQLCA.SQLCODE<0 THEN
f_ora_err()
Return 1
ELSEIF ll_count>0 THEN
Messagebox('错误','['+vbarcode+']商品条码已被多单位使用!',Stopsign!)
Return -1
END IF
SELECT count(*) INTO :ll_count FROM goodsbarcode
WHERE gcbarcode=:vbarcode AND gcgdid <> :ls_id;
IF SQLCA.SQLCODE<0 THEN
f_ora_err()
Return 1
ELSEIF ll_count>0 THEN
Messagebox('错误','['+vbarcode+']商品条码已被多原码使用!',Stopsign!)
Return -1
END IF
END IF
Return 1
[代码运行效果截图]
[源代码打包下载]
by: 发表于:2018-05-31 10:58:49 顶(0) | 踩(0) 回复
??
回复评论