123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373 |
- $PBExportHeader$w_taobao_taskamt.srw
- forward
- global type w_taobao_taskamt from w_publ_base_style
- end type
- type dw_1 from u_dw_rbtnfilter within w_taobao_taskamt
- end type
- type cbx_1 from checkbox within w_taobao_taskamt
- end type
- type sle_1 from singlelineedit within w_taobao_taskamt
- end type
- type st_1 from statictext within w_taobao_taskamt
- end type
- type cb_reflash from uo_imflatbutton within w_taobao_taskamt
- end type
- type cb_takeamt from uo_imflatbutton within w_taobao_taskamt
- end type
- type ln_1 from line within w_taobao_taskamt
- end type
- type ln_2 from line within w_taobao_taskamt
- end type
- end forward
- global type w_taobao_taskamt from w_publ_base_style
- integer width = 3794
- integer height = 2072
- string title = "淘宝订单收款"
- boolean maxbox = true
- boolean resizable = true
- windowstate windowstate = maximized!
- event ue_take_amt ( )
- dw_1 dw_1
- cbx_1 cbx_1
- sle_1 sle_1
- st_1 st_1
- cb_reflash cb_reflash
- cb_takeamt cb_takeamt
- ln_1 ln_1
- ln_2 ln_2
- end type
- global w_taobao_taskamt w_taobao_taskamt
- event ue_take_amt();IF Not uo_power_spi.f_taobao_taskamt_takeamt(sys_msg_pow) THEN
- MessageBox(publ_operator,sys_msg_pow)
- RETURN
- END IF
- // 当前订单生成订单收款单
- s_taskdamt arg_s_bd
- Long i, count = 0
- Boolean has_value = False
- Long ll_accountsid, ll_itemid, ll_moneyid, ll_banktypeid
- Decimal ld_rate
- String ls_im_userid
- dw_1.accepttext()
- FOR i = 1 To dw_1.RowCount()
- IF dw_1.Object.ch[i] <> 1 OR dw_1.Object.curtakeamt[i] <= 0 THEN CONTINUE
-
- IF Not has_value THEN
-
- arg_s_bd.scid = dw_1.Object.u_saletask_scid[i]
- arg_s_bd.billid = 0
- arg_s_bd.cussptid = dw_1.Object.u_saletask_cusid[i]
- arg_s_bd.part = ''
- arg_s_bd.billdate = DateTime(Today(), Now())
- arg_s_bd.assign_emp = ''
- arg_s_bd.dscrp = ''
- arg_s_bd.ifauto = 0
-
- ls_im_userid = dw_1.Object.eb_saletask_import_im_userid[i]
-
- SELECT accountsid, take_itemid, moneyid, banktypeid, mrate
- INTO :ll_accountsid, :ll_itemid, :ll_moneyid, :ll_banktypeid, :ld_rate
- FROM eb_user
- WHERE im_type = 5
- And im_userid = :ls_im_userid;
- IF sqlca.SQLCode <> 0 THEN
- MessageBox('ERROR', '查询网店账号预设信息失败,' + sqlca.SQLErrText)
- RETURN
- END IF
-
- IF ll_accountsid = 0 THEN
- MessageBox('ERROR', '网店账号未设置收款帐号')
- RETURN
- END IF
- IF ll_itemid = 0 THEN
- MessageBox('ERROR', '网店账号未设置收款收支项目')
- RETURN
- END IF
- IF ll_moneyid = 0 THEN
- MessageBox('ERROR', '网店账号未设置币种')
- RETURN
- END IF
- IF ll_banktypeid = 0 THEN
- MessageBox('ERROR', '网店账号未设置结算方式')
- RETURN
- END IF
- IF ld_rate = 0 THEN
- MessageBox('ERROR', '网店账号未设置汇率')
- RETURN
- END IF
-
-
- has_value = True
- END IF
-
- count++
- arg_s_bd.arg_s_mx[count].scid = dw_1.Object.u_saletask_scid[i]
- arg_s_bd.arg_s_mx[count].billid = 0
- arg_s_bd.arg_s_mx[count].printid = count
- arg_s_bd.arg_s_mx[count].relid = dw_1.Object.u_saletask_taskid[i]
- arg_s_bd.arg_s_mx[count].reltaskcode = dw_1.Object.u_saletask_taskcode[i]
- arg_s_bd.arg_s_mx[count].damt = dw_1.Object.u_saletask_damt[i]
- arg_s_bd.arg_s_mx[count].dscrp = '' //dw_child.Object.u_taskdamt_mx_dscrp[i]
- arg_s_bd.arg_s_mx[count].accountsid = ll_accountsid //dw_child.Object.u_taskdamt_mx_accountsid[i]
- arg_s_bd.arg_s_mx[count].billamt = dw_1.Object.u_saletask_msttakeamt[i]
- arg_s_bd.arg_s_mx[count].itemid = ll_itemid //dw_child.Object.u_taskdamt_mx_itemid[i]
- arg_s_bd.arg_s_mx[count].takeamt = dw_1.Object.curtakeamt[i]
- arg_s_bd.arg_s_mx[count].reltakeamt = dw_1.Object.u_saletask_takeamt[i]
- arg_s_bd.arg_s_mx[count].realmoneyid = ll_moneyid //dw_child.Object.u_taskdamt_mx_realmoneyid[i]
- arg_s_bd.arg_s_mx[count].realrate = ld_rate //dw_child.Object.u_taskdamt_mx_realrate[i]
- arg_s_bd.arg_s_mx[count].billtype = 1 //dw_child.Object.u_taskdamt_mx_billtype[i]
- arg_s_bd.arg_s_mx[count].banktypeid = ll_banktypeid //dw_child.Object.u_taskdamt_mx_banktypeid[i]
- arg_s_bd.arg_s_mx[count].reldamt = dw_1.Object.u_saletask_takedamt[i]
-
- NEXT
- IF count = 0 THEN
- MessageBox('提示', '请选择要收款的订单')
- RETURN
- END IF
- uo_taskdamt uo_ware
- String arg_msg
- uo_ware = Create uo_taskdamt
- IF uo_ware.Save(arg_s_bd,arg_msg,True) = 0 THEN
- Destroy uo_ware
- MessageBox('error!',arg_msg)
- RETURN
- END IF
- Destroy uo_ware
- MessageBox('OK', '生成订单收款单成功')
- end event
- on w_taobao_taskamt.create
- int iCurrent
- call super::create
- this.dw_1=create dw_1
- this.cbx_1=create cbx_1
- this.sle_1=create sle_1
- this.st_1=create st_1
- this.cb_reflash=create cb_reflash
- this.cb_takeamt=create cb_takeamt
- this.ln_1=create ln_1
- this.ln_2=create ln_2
- iCurrent=UpperBound(this.Control)
- this.Control[iCurrent+1]=this.dw_1
- this.Control[iCurrent+2]=this.cbx_1
- this.Control[iCurrent+3]=this.sle_1
- this.Control[iCurrent+4]=this.st_1
- this.Control[iCurrent+5]=this.cb_reflash
- this.Control[iCurrent+6]=this.cb_takeamt
- this.Control[iCurrent+7]=this.ln_1
- this.Control[iCurrent+8]=this.ln_2
- end on
- on w_taobao_taskamt.destroy
- call super::destroy
- destroy(this.dw_1)
- destroy(this.cbx_1)
- destroy(this.sle_1)
- destroy(this.st_1)
- destroy(this.cb_reflash)
- destroy(this.cb_takeamt)
- destroy(this.ln_1)
- destroy(this.ln_2)
- end on
- event ue_before_open;call super::ue_before_open;dw_1.SetTransObject(sqlca)
- end event
- event resize;call super::resize;dw_1.width = this.workspacewidth() - dw_1.x
- dw_1.Height = this.workspaceheight() - dw_1.Y
- end event
- event open;call super::open;cb_reflash.TriggerEvent(clicked!)
- end event
- type cb_func from w_publ_base_style`cb_func within w_taobao_taskamt
- boolean visible = false
- integer x = 791
- end type
- type cb_exit from w_publ_base_style`cb_exit within w_taobao_taskamt
- integer x = 302
- end type
- type ln_bar from w_publ_base_style`ln_bar within w_taobao_taskamt
- end type
- type ln_bar2 from w_publ_base_style`ln_bar2 within w_taobao_taskamt
- end type
- type r_bar from w_publ_base_style`r_bar within w_taobao_taskamt
- end type
- type dw_1 from u_dw_rbtnfilter within w_taobao_taskamt
- integer y = 280
- integer width = 3314
- integer height = 1640
- integer taborder = 30
- boolean bringtotop = true
- string dataobject = "dw_taobao_taskamt"
- boolean hscrollbar = true
- boolean vscrollbar = true
- boolean hsplitscroll = true
- boolean rbutton_filter_use = true
- boolean rbutton_setposition_use = true
- boolean titleclick_sort_use = true
- end type
- event clicked;call super::clicked;IF row > 0 THEN
- This.SetRow(row)
- this.selectrow(row, true)
- END IF
- end event
- event rowfocuschanged;call super::rowfocuschanged;This.SelectRow(0, False)
- Long row
- row = This.GetRow()
- IF row > 0 THEN
- This.SelectRow(row, True)
- END IF
- end event
- type cbx_1 from checkbox within w_taobao_taskamt
- integer x = 754
- integer y = 196
- integer width = 274
- integer height = 56
- boolean bringtotop = true
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- long backcolor = 67108864
- string text = "全选"
- end type
- event clicked;Long ll_check
- IF This.Checked THEN
- ll_check = 1
- ELSE
- ll_check = 0
- END IF
- Long i
- FOR i = 1 To dw_1.RowCount()
- dw_1.Object.ch[i] = ll_check
- NEXT
- end event
- event constructor;window ll_win
- ll_win = GetParent()
- this.backcolor = ll_win.backcolor
- end event
- type sle_1 from singlelineedit within w_taobao_taskamt
- integer x = 1536
- integer y = 180
- integer width = 526
- integer height = 84
- integer taborder = 50
- boolean bringtotop = true
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- borderstyle borderstyle = stylelowered!
- end type
- type st_1 from statictext within w_taobao_taskamt
- integer x = 1143
- integer y = 200
- integer width = 402
- integer height = 48
- boolean bringtotop = true
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- long backcolor = 67108864
- string text = "淘宝主订单号含"
- boolean focusrectangle = false
- end type
- event constructor;window ll_win
- ll_win = GetParent()
- this.backcolor = ll_win.backcolor
- end event
- type cb_reflash from uo_imflatbutton within w_taobao_taskamt
- integer width = 151
- integer height = 164
- integer taborder = 40
- boolean bringtotop = true
- string text = "刷新"
- string normalpicname = "refresh.BMP"
- integer picsize = 16
- toolbaralignment pic_align = alignattop!
- boolean border = false
- end type
- event clicked;call super::clicked;String ls_tid
- ls_tid = sle_1.Text
- IF Pos(ls_tid, '%') <= 0 THEN ls_tid = '%' + ls_tid + '%'
- dw_1.Retrieve(ls_tid)
- end event
- type cb_takeamt from uo_imflatbutton within w_taobao_taskamt
- integer x = 151
- integer width = 151
- integer height = 164
- integer taborder = 50
- boolean bringtotop = true
- string text = "收款"
- integer picsize = 16
- toolbaralignment pic_align = alignattop!
- boolean border = false
- end type
- event clicked;call super::clicked;parent.triggerevent('ue_take_amt')
- end event
- type ln_1 from line within w_taobao_taskamt
- long linecolor = 268435456
- integer linethickness = 4
- integer beginy = 268
- integer endx = 2007
- integer endy = 268
- end type
- type ln_2 from line within w_taobao_taskamt
- long linecolor = 16777215
- integer linethickness = 4
- integer beginy = 272
- integer endx = 2039
- integer endy = 272
- end type
|