123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245 |
- $PBExportHeader$uo_saletask_spi.sru
- forward
- global type uo_saletask_spi from nonvisualobject
- end type
- end forward
- global type uo_saletask_spi from nonvisualobject
- end type
- global uo_saletask_spi uo_saletask_spi
- forward prototypes
- public function integer uf_save_saletask (long arg_scid, s_saletask_import_arr arg_bill, ref long arg_taskid, ref string arg_taskcode, ref string arg_msg, boolean ifcommit)
- private function string pf_errmsg ()
- public function integer uf_audit_saletask (long arg_scid, long arg_taskid, ref string arg_msg, boolean ifcommit)
- public function integer uf_saletask_ch (ref s_taobao_saletask_ch arg_task, ref string arg_msg)
- public function integer uof_getprice_saletask (s_saletask_import arg_s_import, ref decimal arg_price, ref decimal arg_rebate, ref string arg_msg)
- public function integer wf_pricelist_ch (long arg_mtrlid, ref long arg_pricelistid, ref string arg_pricelistname, ref string arg_msg)
- public function integer wf_itemdef_ch (ref long arg_itemid, ref string arg_itemcode, ref string arg_itemname, ref string arg_itemtype, ref string arg_msg)
- public function integer wf_new_cust_p (s_saletask_import arg_import[], ref string arg_msg)
- public function integer uf_fill_taobao_saletask_info (ref s_saletask_import arg_mx, ref string arg_msg)
- end prototypes
- public function integer uf_save_saletask (long arg_scid, s_saletask_import_arr arg_bill, ref long arg_taskid, ref string arg_taskcode, ref string arg_msg, boolean ifcommit);//====================================================================
- // 事件: uo_saletask_spi.uf_save_saletask()
- //--------------------------------------------------------------------
- // 描述:建立销售订单 返回 订单ID与订单编号
- //--------------------------------------------------------------------
- // 参数:
- // value long arg_scid 建立订单的分部
- // value s_saletask_import_arr arg_bill 建立订单的信息
- // reference long arg_taskid 返回订单ID
- // reference string arg_taskcode 返回订单编号
- // reference string arg_msg 返回错误信息
- // value boolean ifcommit 是否提交
- //--------------------------------------------------------------------
- // 返回: integer
- //--------------------------------------------------------------------
- // 作者: lwl 日期: 2013年04月09日
- //--------------------------------------------------------------------
- // LONGJOE
- //--------------------------------------------------------------------
- // 修改历史:
- //
- //====================================================================
- Int rslt = 1
- rslt = 0
- PopulateError(999, '需要子类实现')
- arg_msg = pf_errmsg()
- GOTO ext
- ext:
- IF ifcommit THEN
- IF rslt = 1 THEN
- COMMIT;
- ELSE
- ROLLBACK;
- END IF
- END IF
- RETURN rslt
- end function
- private function string pf_errmsg ();String rslt
- rslt = Error.Text + ' at ' + Error.ObjectEvent + ' in ' + Error.Object + ' line ' + String(Error.Line)
- RETURN rslt
- end function
- public function integer uf_audit_saletask (long arg_scid, long arg_taskid, ref string arg_msg, boolean ifcommit);//====================================================================
- // 事件: uo_saletask_spi.uf_audit_saletask()
- //--------------------------------------------------------------------
- // 描述:审核销售订单
- //--------------------------------------------------------------------
- // 参数:
- // value long arg_scid 订单分部
- // value long arg_taskid 订单ID
- // value string arg_operator 操作人
- // reference string arg_msg 错误信息
- // value boolean ifcommit 是否提交
- //--------------------------------------------------------------------
- // 返回: integer
- //--------------------------------------------------------------------
- // 作者: lwl 日期: 2013年04月09日
- //--------------------------------------------------------------------
- // LONGJOE
- //--------------------------------------------------------------------
- // 修改历史:
- //
- //====================================================================
- Int rslt = 1
- rslt = 0
- PopulateError(999, '需要子类实现')
- arg_msg = pf_errmsg()
- GOTO ext
- ext:
- IF ifcommit THEN
- IF rslt = 1 THEN
- COMMIT;
- ELSE
- ROLLBACK;
- END IF
- END IF
- RETURN rslt
- end function
- public function integer uf_saletask_ch (ref s_taobao_saletask_ch arg_task, ref string arg_msg);Int rslt = 1
- rslt = 0
- PopulateError(999, '需要子类实现')
- arg_msg = pf_errmsg()
- GOTO ext
- ext:
- RETURN rslt
- end function
- public function integer uof_getprice_saletask (s_saletask_import arg_s_import, ref decimal arg_price, ref decimal arg_rebate, ref string arg_msg);Int rslt = 1
- rslt = 0
- PopulateError(999, '需要子类实现')
- arg_msg = pf_errmsg()
- GOTO ext
- ext:
- RETURN rslt
- end function
- public function integer wf_pricelist_ch (long arg_mtrlid, ref long arg_pricelistid, ref string arg_pricelistname, ref string arg_msg);Int rslt = 1
- rslt = 0
- PopulateError(999, '需要子类实现')
- arg_msg = pf_errmsg()
- GOTO ext
- ext:
- RETURN rslt
- //Long ll_mtrlid
- //ll_mtrlid = dw_1.Object.mtrlid[row]
- //
- //
- //
- //OpenWithParm(w_eb_sale_price_list_arr_ch, ll_mtrlid)
- //
- //s_pricelist_arr_ch s_tran
- //s_tran = Message.PowerObjectParm
- //IF UpperBound(s_tran.pricelistid) <= 0 THEN RETURN
- //IF s_tran.pricelistid[1] > 0 THEN
- // dw_1.Object.pricelistid[row] = s_tran.pricelistid[1]
- // dw_1.Object.pricelistname[row] = s_tran.pricelistname[1]
- //END IF
- end function
- public function integer wf_itemdef_ch (ref long arg_itemid, ref string arg_itemcode, ref string arg_itemname, ref string arg_itemtype, ref string arg_msg);Int rslt = 1
- rslt = 0
- PopulateError(999, '需要子类实现')
- arg_msg = pf_errmsg()
- GOTO ext
- ext:
- RETURN rslt
- //Open(w_itemdef_ch_taobao) //调用
- //
- //s_itemdef_arr s_inscust
- //s_inscust = Message.PowerObjectParm //接受返回结构
- //
- //IF UpperBound(s_inscust.itemid) <= 0 THEN RETURN
- //IF s_inscust.itemid[1] <= 0 THEN RETURN
- //
- //ins_itemid = s_inscust.itemid[1]
- //sle_itemcode.Text = s_inscust.itemcode[1]
- //sle_itemname.Text = s_inscust.itemname[1]
- //sle_itemtype.Text = s_inscust.itemtype[1]
- end function
- public function integer wf_new_cust_p (s_saletask_import arg_import[], ref string arg_msg);Int rslt = 1
- rslt = 0
- PopulateError(999, '需要子类实现')
- arg_msg = pf_errmsg()
- GOTO ext
- ext:
- RETURN rslt
- //Long i
- //
- //s_define_import_parm s_tran
- //
- //FOR i = 1 To UpperBound(arg_import)
- // s_tran.cust_arr[i].Name = arg_import[i].cusname
- // s_tran.cust_arr[i].cuscode = arg_import[i].cuscode
- // s_tran.cust_arr[i].custype = arg_import[i].assign_emp
- // s_tran.cust_arr[i].upname = arg_import[i].upname
- // s_tran.cust_arr[i].rep = arg_import[i].rel_rep
- // s_tran.cust_arr[i].tele = arg_import[i].cus_tele
- // s_tran.cust_arr[i].tele1 = ''
- // s_tran.cust_arr[i].faxno = arg_import[i].cus_fax
- // s_tran.cust_arr[i].Address = arg_import[i].cus_address
- // s_tran.cust_arr[i].freight = arg_import[i].freight
- // s_tran.cust_arr[i].freight_tele = arg_import[i].freight_tele
- // // s_tran.cust_arr[i].moneyid = arg_import[i].moneyid
- // s_tran.cust_arr[i].banktypeid = arg_import[i].banktypeid
- //
- //NEXT
- //
- //OpenWithParm(w_define_response, s_tran)
- //
- //RETURN 1
- //
- end function
- public function integer uf_fill_taobao_saletask_info (ref s_saletask_import arg_mx, ref string arg_msg);Int rslt = 1
- rslt = 0
- PopulateError(999, '需要子类实现')
- arg_msg = pf_errmsg()
- GOTO ext
- ext:
- RETURN rslt
- end function
- on uo_saletask_spi.create
- call super::create
- TriggerEvent( this, "constructor" )
- end on
- on uo_saletask_spi.destroy
- TriggerEvent( this, "destructor" )
- call super::destroy
- end on
|