1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030 |
- $PBExportHeader$w_rp_sale_mx.srw
- forward
- global type w_rp_sale_mx from w_publ_easyq
- end type
- type ddlb_1 from uo_ddlb_storageid within w_rp_sale_mx
- end type
- type st_1 from statictext within w_rp_sale_mx
- end type
- type st_2 from statictext within w_rp_sale_mx
- end type
- type ddlb_scid from uo_ddlb_scid within w_rp_sale_mx
- end type
- type st_5 from statictext within w_rp_sale_mx
- end type
- type ddlb_status from dropdownlistbox within w_rp_sale_mx
- end type
- type ddlb_2 from dropdownlistbox within w_rp_sale_mx
- end type
- type cb_other from uo_imflatbutton within w_rp_sale_mx
- end type
- end forward
- global type w_rp_sale_mx from w_publ_easyq
- integer width = 4475
- string title = "销售明细表"
- event ue_retrieve_fifo_cbmx ( )
- ddlb_1 ddlb_1
- st_1 st_1
- st_2 st_2
- ddlb_scid ddlb_scid
- st_5 st_5
- ddlb_status ddlb_status
- ddlb_2 ddlb_2
- cb_other cb_other
- end type
- global w_rp_sale_mx w_rp_sale_mx
- type variables
- Long cur_storageid_arr[]
- long cur_scid_arr[]
- Long cur_flag = -1 //-1:全部,0仓库未审,1仓库已审核
- Long cur_secflag = -1 //-1:全部,0财务未审
- long cur_priceflag= -1 //-1:全部,0未确认
- long cur_show=0
- long cur_scid
- end variables
- forward prototypes
- public subroutine wf_hidecol ()
- public subroutine wf_init_dw1 ()
- public function integer wf_face ()
- public subroutine wf_retrieve_cbmx ()
- public subroutine wf_retrieve_allmtrlware ()
- public subroutine wf_retrieve_allmtrlware_mx ()
- public subroutine wf_insert_1 ()
- end prototypes
- event ue_retrieve_fifo_cbmx();
- String ls_mtrlcode,ls_mtrlname
- Long ll_row
- Long ll_scid
- Long ll_outwareid
- Long ll_printid
- Long ll_mtrlwareid
- Decimal dec_uqty
- TRY
-
- IF UpperBound(cur_storageid_arr) > 0 THEN
- Long li_if_fifo = 0
- SELECT if_fifo
- INTO :li_if_fifo
- FROM u_storage
- Where storageid = :cur_storageid_arr[1] Using sqlca;
-
- IF li_if_fifo = 0 THEN
- cb_other.Enabled = False
- ELSE
- cb_other.Enabled = True
- END IF
-
- END IF
-
-
- ll_row = dw_1.GetRow()
-
- IF ll_row <= 0 THEN
- RETURN
- END IF
-
- ll_scid = dw_1.Object.u_outware_scid[ll_row]
- ll_outwareid = dw_1.Object.u_outware_outwareid[ll_row]
- ll_printid = dw_1.Object.printid[ll_row]
- ll_mtrlwareid = dw_1.Object.mtrlwareid[ll_row]
- dec_uqty = dw_1.Object.u_outwaremx_uqty[ll_row]
- ls_mtrlname = dw_1.Object.u_mtrldef_mtrlname[ll_row]
-
-
- IF IsValid(w_fifo_mtrlware_cb) THEN
- w_fifo_mtrlware_cb.WindowState = Normal!
- w_fifo_mtrlware_cb.cur_scid = ll_scid
- w_fifo_mtrlware_cb.cur_outwareid = ll_outwareid
- w_fifo_mtrlware_cb.cur_printid = ll_printid
- w_fifo_mtrlware_cb.cur_mtrlwareid = ll_mtrlwareid
- w_fifo_mtrlware_cb.cur_dec_uqty = dec_uqty
- w_fifo_mtrlware_cb.cur_mtrlname = ls_mtrlname
-
- w_fifo_mtrlware_cb.wf_retrieve_cbmx()
- w_fifo_mtrlware_cb.wf_retrieve_allmtrlware()
- w_fifo_mtrlware_cb.wf_retrieve_allmtrlware_mx()
- END IF
-
-
- Catch (runtimeerror er)
-
- END TRY
- end event
- public subroutine wf_hidecol ();s_hide_col s_col1,s_col2,s_col3,s_null
- s_col1.col_1 = 'u_outwaremx_costamt'
- s_col1.col_2 = 'cost'
- f_hide_col(490,dw_1,s_col1)
- s_col2.col_1 = 'gfamt'
- s_col2.col_2 = 'gpamt'
- s_col2.col_3 = 'gpr'
- s_col2.col_4 = 'gpamt_notax'
- s_col2.col_5 = 'gpr_notax'
- f_hide_col(843,dw_1,s_col2)
- s_col3.col_1 = 'u_outwaremx_enprice'
- s_col3.col_2 = 'enamt'
- s_col3.col_3 = 'fprice'
- s_col3.col_4 = 'famt'
- s_col3.col_5 = 'rebate'
- s_col3.col_6 = 'u_outwaremx_dftsaleprice'
- s_col3.col_7 = 'u_outwaremx_price'
- s_col3.col_8 = 'u_outwaremx_ware_fprice'
- s_col3.col_9 = 'ware_amt'
- s_col3.col_10 = 'u_outware_otheramt'
- f_hide_col(122,dw_1,s_col3)
- s_col3 = s_null
- s_col3.col_1 = 'famt_norebate'
- s_col3.col_2 = 'famt_rebate'
- s_col3.col_3 ='enamt2'
- s_col3.col_4 ='billamt'
- s_col3.col_5 ='takeamt'
- s_col3.col_6 ='balcamt'
- s_col3.col_7 ='enamt_notax'
- s_col3.col_8 ='enprice_notax'
- s_col3.col_9 ='u_outwaremx_bsamt'
- s_col3.col_10 ='priceamt'
- s_col3.col_11 ='bill_amt'
- f_hide_col(122,dw_1,s_col3)
- s_col3 = s_null
- s_col3.col_1 = 'newprice'
- s_col3.col_2 = 'gpamt'
- s_col3.col_3 = 'gpamt_notax'
- s_col3.col_4 = 'enprice_notax_1'
- s_col3.col_5 = 'z_h_amt'
- s_col3.col_6 = 'costamt'
- s_col3.col_7 = 'itemamt_real'
- f_hide_col(122,dw_1,s_col3)
- s_hide_col s_col_mtrlsectype
- s_col_mtrlsectype.col_1 = 'u_mtrldef_mtrlsectype'
- f_hide_col(1308,dw_1,s_col_mtrlsectype)
- s_hide_col s_col_zxmtrlmode
- s_col_zxmtrlmode.col_1 = 'u_mtrldef_zxmtrlmode'
- f_hide_col(1309,dw_1,s_col_zxmtrlmode)
- s_col3 = s_null
- s_col3.col_1 = 'u_outwaremx_costamt'
- s_col3.col_2 = 'cost'
- s_col3.col_3 = 'cost_notax'
- s_col3.col_4 = 'costamt_notax'
- f_hide_col(123,dw_1,s_col3)
- s_hide_col s_col_plan
- s_col_plan.col_1 = 'planprice'
- s_col_plan.col_2 = 'enamt_plan'
- s_col_plan.col_3 = 'gpamt_plan'
- f_hide_col(1451,dw_1,s_col_plan)
- end subroutine
- public subroutine wf_init_dw1 ();//IF sys_version = 802001 THEN
- // dw_1.DataObject = 'dw_rp_sale_mx_b'
- //ELSE
- // dw_1.DataObject = 'dw_rp_sale_mx' //[]
- //END IF
- //st_6.visible = false
- end subroutine
- public function integer wf_face ();
- IF cur_show = 0 THEN
- dw_1.Width = This.Width - dw_1.X - 40
- dw_1.Height = This.Height - dw_1.Y - 150
- END IF
- //IF cur_show = 1 THEN
- // dw_1.Width = This.Width - dw_1.X - 40
- // dw_1.Height = (This.Height - dw_1.Y - 150) / 5 *3
- //
- // dw_2.width=(This.Width - dw_1.X - 40) / 3 - 50
- // dw_2.y=dw_1.y + dw_1.Height + 20
- // dw_2.Height = (This.Height - dw_1.Y - 150) / 5 *2 - 50
- //
- // dw_3.x=dw_2.x + dw_2.width + 50
- // dw_3.width=(This.Width - dw_1.X - 40) / 3 - 50
- // dw_3.y=dw_1.y + dw_1.Height + 20
- // dw_3.Height = (This.Height - dw_1.Y - 150) / 5 *2 - 50
- //
- // dw_4.x=dw_3.x + dw_3.width + 50
- // dw_4.width=(This.Width - dw_1.X - 40) / 3 - 50
- // dw_4.y=dw_1.y + dw_1.Height + 20
- // dw_4.Height = (This.Height - dw_1.Y - 150) / 5 *2 - 50
- //
- //
- //end if
- return 1
- end function
- public subroutine wf_retrieve_cbmx ();////
- //
- //
- //Long ll_row
- //Long ll_scid,ll_outwareid,ll_printid
- //Decimal dec_uqty
- //
- //dw_2.Reset()
- //IF cur_show = 0 THEN RETURN
- //
- //ll_row = dw_1.GetRow()
- //IF ll_row = 0 THEN RETURN
- //
- //
- //ll_scid = dw_1.Object.u_outware_scid[ll_row]
- //ll_outwareid = dw_1.Object.u_outware_outwareid[ll_row]
- //ll_printid = dw_1.Object.printid[ll_row]
- //dec_uqty = dw_1.Object.u_outwaremx_uqty[ll_row]
- //
- //
- //IF dec_uqty < 0 THEN
- // dw_2.Title = '选中行 成本组成明细' + ' ' + '负数不算出仓成本!!'
- // RETURN
- //ELSE
- // dw_2.Title = '选中行 成本组成明细'
- //END IF
- //
- //dw_2.Retrieve(ll_scid,ll_outwareid,ll_printid)
- //
- //
- //cur_scid=ll_scid
- //
- //
- //
- end subroutine
- public subroutine wf_retrieve_allmtrlware ();////
- //
- //
- //Long ll_row
- //Long ll_scid,ll_mtrlwareid
- //Decimal dec_uqty
- //
- //dw_3.Reset()
- //IF cur_show = 0 THEN RETURN
- //
- //ll_row = dw_1.GetRow()
- //IF ll_row = 0 THEN RETURN
- //
- //
- //ll_scid = dw_1.Object.u_outware_scid[ll_row]
- //ll_mtrlwareid = dw_1.Object.mtrlwareid[ll_row]
- //dec_uqty = dw_1.Object.u_outwaremx_uqty[ll_row]
- //
- //
- //IF dec_uqty < 0 THEN
- // dw_3.Title = '选中行 库存所有进仓明细' + ' ' + '负数不算出仓成本!!'
- // RETURN
- //ELSE
- // dw_3.Title = '选中行 库存所有进仓明细'
- //END IF
- //
- //dw_3.Retrieve(ll_scid,ll_mtrlwareid)
- //
- //
- //
- //
- //
- //
- end subroutine
- public subroutine wf_retrieve_allmtrlware_mx ();////
- //
- //
- //Long ll_row
- //Long ll_scid,ll_mtrlwaremxid
- //Decimal dec_uqty
- //
- //dw_4.Reset()
- //IF cur_show = 0 THEN RETURN
- //
- //ll_row = dw_3.GetRow()
- //IF ll_row = 0 THEN RETURN
- //
- //
- //ll_mtrlwaremxid = dw_3.Object.mtrlwaremxid[ll_row]
- //
- //
- //
- //
- //dw_4.Retrieve(ll_mtrlwaremxid)
- //
- //
- //
- //
- //
- //
- end subroutine
- public subroutine wf_insert_1 ();Long i,j,ll_ds_cnt,itemid[]
- String ls_s,Name[],ls_m
- Long col = 30
- String ls_modify
- String ls_outwarecode_arr[]
- Long ll_mxbt,ll_i
- Long ll_ddd_cnt
- Long z
- String ls_outwarecode
- String tp_name1,tp_mxdscrp,tp_itype
- Long tp_itemid
- Decimal ld_amt,ld_billamt,ld_otheramt,ld_amt_real
- Decimal ld_bill_amt,ld_costamt,ld_gpamt
- //设置标题
- String ls_temp = ''
- String ls_long = ''
- dw_1.SetRedraw(False)
- datastore ds
- ds = Create datastore
- ds.DataObject = "ds_outware_item_list"
- ds.SetTransObject(sqlca)
- datastore ds_amt
- ds_amt = Create datastore
- ds_amt.DataObject = "ddd_outware_item_amt_mxdscrp"
- ds_amt.SetTransObject(sqlca)
- For ll_i = 1 To dw_1.RowCount()
- ll_mxbt++
- ls_outwarecode_arr[ll_mxbt] = dw_1.Object.u_outware_outwarecode[ll_i]
- Next
- If ll_mxbt = 0 Then
- ll_mxbt++
- ls_outwarecode_arr[ll_mxbt] = ''
- End If
- ll_ds_cnt = ds.Retrieve(ls_outwarecode_arr)
- If ll_ds_cnt > col Then
- ll_ds_cnt = col
- End If
- For i = 1 To ll_ds_cnt
- itemid[i] = Long(ds.Object.u_itemdef_itemid[i])
- Name[i] = String(ds.Object.u_itemdef_itemname[i])
- Next
- For j = 1 To col
- ls_s = "item"+String(j)
- dw_1.Modify(ls_s + '.Visible = 1')
- dw_1.Modify(ls_s+".format=~"#,##0.##~~tIF("+ls_s+"=0,'#','#,##0.##')~"")
- Next
- For j = 1 To col
- ls_m = "mxdscrp"+String(j)
- dw_1.Modify(ls_m + '.Visible = 1')
- Next
- For j = 1 To col
- ls_m = "itype"+String(j)
- dw_1.Modify(ls_m + '.Visible = 1')
- Next
- For j = ll_ds_cnt + 1 To col
- ls_modify = ''
- ls_s = "item" + String(j)
- dw_1.Modify(ls_s + '.Visible = 0')
- ls_modify = ls_modify + "destroy " + ls_s + '_t ~n ' + ls_s + '.visible=0 ~n '
- dw_1.Modify(ls_modify)
- Next
- For j = ll_ds_cnt + 1 To col
- ls_modify = ''
- ls_m = "mxdscrp" + String(j)
- dw_1.Modify(ls_m + '.Visible = 0')
- ls_modify = ls_modify + "destroy " + ls_m + '_t ~n ' + ls_m + '.visible=0 ~n '
- dw_1.Modify(ls_modify)
- Next
- For j = ll_ds_cnt + 1 To col
- ls_modify = ''
- ls_m = "itype" + String(j)
- dw_1.Modify(ls_m + '.Visible = 0')
- ls_modify = ls_modify + "destroy " + ls_m + '_t ~n ' + ls_m + '.visible=0 ~n '
- dw_1.Modify(ls_modify)
- Next
- For j = 1 To ll_ds_cnt
- ls_long = String(Long(Len( Name[j]) / 4) * 400 )
- If Long(ls_long) < 400 Then ls_long = '400'
- ls_temp = 'item' + String(j)
- dw_1.Modify(ls_temp + '.width = ' + ls_long)
- dw_1.Modify(ls_temp +"_t.text = '" + Name[j]+ "'")
- Next
- For j = 1 To ll_ds_cnt
- ls_temp = 'mxdscrp' + String(j)
- dw_1.Modify(ls_temp +"_t.text = '" + Name[j]+ "备注'")
- Next
- For j = 1 To ll_ds_cnt
- ls_temp = 'itype' + String(j)
- dw_1.Modify(ls_temp +"_t.text = '" + Name[j]+ "方向'")
- Next
- //插入数据
- If dw_1.RowCount() <= 0 Then Goto ext
- ll_ddd_cnt = ds_amt.Retrieve(ls_outwarecode_arr)
- Open(w_sys_wait_jdt) //初始化进度条
- w_sys_wait_jdt.Show()
- w_sys_wait_jdt.wf_accepttol(dw_1.RowCount())
- For z = 1 To dw_1.RowCount()
- ls_outwarecode = dw_1.Object.u_outware_outwarecode[z]
- ld_billamt = dw_1.Object.billamt[z]
- ld_otheramt = dw_1.Object.u_outware_otheramt[z]
- ld_costamt = dw_1.Object.costamt[z]
-
- ld_amt = 0
- ld_amt_real = 0
-
- w_sys_wait_jdt.st_msg.Text = ls_outwarecode + " 正在查询数据..." //进度信息
-
- For i = 1 To ll_ds_cnt
- tp_itemid = itemid[i]
- tp_name1 = 'item'+String(i)
- tp_mxdscrp = 'mxdscrp'+String(i)
- tp_itype = 'itype' + String(i)
- For j = 1 To ll_ddd_cnt
- If tp_itemid = ds_amt.Object.u_itemdef_itemid[j] And ls_outwarecode = ds_amt.Object.outwarecode[j] Then
- dw_1.SetItem(z,tp_name1,ds_amt.Object.amt_real[j])
- dw_1.SetItem(z,tp_mxdscrp,ds_amt.Object.mxdscrp[j])
- ld_amt = ld_amt + ds_amt.Object.amt[j]
- ld_amt_real = ld_amt_real + ds_amt.Object.amt_real[j]
-
- If Not IsNull(ds_amt.Object.u_outware_itemmx_itype[j]) Then
- Choose case ds_amt.Object.u_outware_itemmx_itype[j]
- case 1
- dw_1.SetItem(z,tp_itype,'增项')
- case 0
- dw_1.SetItem(z,tp_itype,'平项')
- case -1
- dw_1.SetItem(z,tp_itype,'减项')
- end choose
- End If
- End If
- Next
- Next
- ld_bill_amt = ld_billamt - ld_otheramt + ld_amt
- dw_1.Object.bill_amt[z] = ld_bill_amt
-
- ld_gpamt = ld_bill_amt - ld_costamt + ld_amt_real
- dw_1.Object.gpamt[z] = ld_gpamt
-
- dw_1.Object.itemamt_real[z] = ld_amt_real
-
-
- w_sys_wait_jdt.wf_inc(z)
- Yield()
-
-
- Next
- Close(w_sys_wait_jdt)
- ext:
- Destroy ds
- Destroy ds_amt
- dw_1.SetRedraw(True)
- end subroutine
- on w_rp_sale_mx.create
- int iCurrent
- call super::create
- this.ddlb_1=create ddlb_1
- this.st_1=create st_1
- this.st_2=create st_2
- this.ddlb_scid=create ddlb_scid
- this.st_5=create st_5
- this.ddlb_status=create ddlb_status
- this.ddlb_2=create ddlb_2
- this.cb_other=create cb_other
- iCurrent=UpperBound(this.Control)
- this.Control[iCurrent+1]=this.ddlb_1
- this.Control[iCurrent+2]=this.st_1
- this.Control[iCurrent+3]=this.st_2
- this.Control[iCurrent+4]=this.ddlb_scid
- this.Control[iCurrent+5]=this.st_5
- this.Control[iCurrent+6]=this.ddlb_status
- this.Control[iCurrent+7]=this.ddlb_2
- this.Control[iCurrent+8]=this.cb_other
- end on
- on w_rp_sale_mx.destroy
- call super::destroy
- destroy(this.ddlb_1)
- destroy(this.st_1)
- destroy(this.st_2)
- destroy(this.ddlb_scid)
- destroy(this.st_5)
- destroy(this.ddlb_status)
- destroy(this.ddlb_2)
- destroy(this.cb_other)
- end on
- event resize;ln_bar.EndX = This.Width
- ln_bar2.EndX = This.Width
- ln_1.EndX = This.Width
- ln_2.EndX = This.Width
- ln_3.EndX = This.Width
- ln_4.EndX = This.Width
- r_bar.Width = This.Width
- IF cur_show = 0 THEN
- dw_1.Width = This.Width - dw_1.X - 40
- dw_1.Height = This.Height - dw_1.Y - 150
- END IF
- //IF cur_show = 1 THEN
- // dw_1.Width = This.Width - dw_1.X - 40
- // dw_1.Height = (This.Height - dw_1.Y - 150) / 5 *3
- //
- // dw_2.width=(This.Width - dw_1.X - 40) / 3 - 50
- // dw_2.y=dw_1.y + dw_1.Height + 20
- // dw_2.Height = (This.Height - dw_1.Y - 150) / 5 *2 - 50
- //
- // dw_3.x=dw_2.x + dw_2.width + 50
- // dw_3.width=(This.Width - dw_1.X - 40) / 3 - 50
- // dw_3.y=dw_1.y + dw_1.Height + 20
- // dw_3.Height = (This.Height - dw_1.Y - 150) / 5 *2 - 50
- //
- // dw_4.x=dw_3.x + dw_3.width + 50
- // dw_4.width=(This.Width - dw_1.X - 40) / 3 - 50
- // dw_4.y=dw_1.y + dw_1.Height + 20
- // dw_4.Height = (This.Height - dw_1.Y - 150) / 5 *2 - 50
- //
- //
- //end if
- //
- end event
- type cb_func from w_publ_easyq`cb_func within w_rp_sale_mx
- end type
- type cb_exit from w_publ_easyq`cb_exit within w_rp_sale_mx
- integer x = 1504
- integer y = 4
- end type
- type cb_2 from w_publ_easyq`cb_2 within w_rp_sale_mx
- integer x = 1202
- integer y = 4
- boolean bringtotop = true
- end type
- type cb_psetup from w_publ_easyq`cb_psetup within w_rp_sale_mx
- boolean bringtotop = true
- end type
- type cb_1 from w_publ_easyq`cb_1 within w_rp_sale_mx
- boolean bringtotop = true
- end type
- event cb_1::clicked;DateTime first_date,end_date
- first_date = DateTime(Date(em_1.Text),Time(0))
- end_date = DateTime(Date(em_2.Text),Time('23:59:59'))
- If first_date < sys_showsaledata_mindt Then first_date = sys_showsaledata_mindt
- Int li_option_outrep,li_option_opemp
- String ls_option_opemp
- If sys_power_issuper Then
- li_option_outrep = 0
- Else
- li_option_outrep = sys_option_outrep
- End If
- If sys_power_issuper Then
- li_option_opemp = 0
- // ls_option_opemp = publ_operator
- Else
- li_option_opemp = sys_option_opemp_sale
- ls_option_opemp = publ_operator
- End If
-
- If dw_1.DataObject = 'dw_rp_sale_mx_fh_xm' Then
- dw_1.uf_save_profile_layout()
- dw_1.DataObject = 'dw_rp_sale_mx_fh_xm'
-
- dw_1.uf_read_profile_layout()
- f_title_change(dw_1)
-
- dw_1.SetTransObject(sqlca)
- dw_1.Retrieve(cur_scid_arr,first_date,end_date,cur_flag,cur_secflag,cur_storageid_arr,sys_areaid, sys_user_outrep, li_option_outrep,cur_priceflag,ls_option_opemp,li_option_opemp)
- wf_insert_1()
- Else
- dw_1.Retrieve(cur_scid_arr,first_date,end_date,cur_flag,cur_secflag,cur_storageid_arr,sys_areaid, sys_user_outrep, li_option_outrep,cur_priceflag,ls_option_opemp,li_option_opemp)
-
- End If
- wf_hidecol()
- end event
- type st_3 from w_publ_easyq`st_3 within w_rp_sale_mx
- integer x = 2048
- end type
- type st_4 from w_publ_easyq`st_4 within w_rp_sale_mx
- integer x = 2766
- end type
- type em_1 from w_publ_easyq`em_1 within w_rp_sale_mx
- integer x = 2267
- integer taborder = 130
- end type
- type em_2 from w_publ_easyq`em_2 within w_rp_sale_mx
- integer x = 2857
- integer taborder = 140
- end type
- type ddlb_yl from w_publ_easyq`ddlb_yl within w_rp_sale_mx
- integer x = 2016
- end type
- type cbx_yl from w_publ_easyq`cbx_yl within w_rp_sale_mx
- integer x = 1806
- integer y = 16
- end type
- type dw_1 from w_publ_easyq`dw_1 within w_rp_sale_mx
- integer y = 300
- integer width = 3173
- integer height = 1660
- string dataobject = "dw_rp_sale_mx"
- end type
- event dw_1::doubleclicked;call super::doubleclicked;IF row > 0 THEN
- String ls_code
- Long ll_scid
-
- ll_scid = THIS.Object.u_outware_scid[row]
- ls_code = THIS.Object.u_outware_outwarecode[row]
-
- f_open_win(ll_scid,ls_code)
- END IF
- //messagebox('1','sss1')
- end event
- event dw_1::getfocus;call super::getfocus;this.Modify ("DataWindow.selected.mouse=yes")
- end event
- event dw_1::rowfocuschanged;call super::rowfocuschanged;wf_retrieve_cbmx()
- wf_retrieve_allmtrlware()
- Parent.TriggerEvent('ue_retrieve_fifo_cbmx')
- end event
- type sle_mtrl from w_publ_easyq`sle_mtrl within w_rp_sale_mx
- end type
- type sle_cust from w_publ_easyq`sle_cust within w_rp_sale_mx
- end type
- type st_mtrl from w_publ_easyq`st_mtrl within w_rp_sale_mx
- end type
- type st_cust from w_publ_easyq`st_cust within w_rp_sale_mx
- end type
- type cbx_loginretr from w_publ_easyq`cbx_loginretr within w_rp_sale_mx
- boolean visible = true
- integer x = 1806
- integer y = 108
- end type
- type pb_em1 from w_publ_easyq`pb_em1 within w_rp_sale_mx
- integer x = 2683
- end type
- type pb_em2 from w_publ_easyq`pb_em2 within w_rp_sale_mx
- integer x = 3269
- end type
- type pb_2 from w_publ_easyq`pb_2 within w_rp_sale_mx
- integer x = 3378
- end type
- type cb_help from w_publ_easyq`cb_help within w_rp_sale_mx
- integer x = 1353
- integer y = 4
- end type
- type cb_copyself from w_publ_easyq`cb_copyself within w_rp_sale_mx
- end type
- type gb_1 from w_publ_easyq`gb_1 within w_rp_sale_mx
- end type
- type ln_bar from w_publ_easyq`ln_bar within w_rp_sale_mx
- end type
- type ln_bar2 from w_publ_easyq`ln_bar2 within w_rp_sale_mx
- end type
- type r_bar from w_publ_easyq`r_bar within w_rp_sale_mx
- end type
- type ln_1 from w_publ_easyq`ln_1 within w_rp_sale_mx
- end type
- type ln_2 from w_publ_easyq`ln_2 within w_rp_sale_mx
- end type
- type ln_3 from w_publ_easyq`ln_3 within w_rp_sale_mx
- end type
- type ln_4 from w_publ_easyq`ln_4 within w_rp_sale_mx
- end type
- type ddlb_1 from uo_ddlb_storageid within w_rp_sale_mx
- integer x = 795
- integer y = 204
- integer width = 681
- integer height = 1108
- integer taborder = 140
- boolean bringtotop = true
- end type
- event constructor;call super::constructor;cur_storageid_arr = this.uo_storageid_arr
- Parent.TriggerEvent('ue_retrieve_fifo_cbmx')
- end event
- event selectionchanged;call super::selectionchanged;cur_storageid_arr = this.uo_storageid_arr
- Parent.TriggerEvent('ue_retrieve_fifo_cbmx')
- end event
- type st_1 from statictext within w_rp_sale_mx
- integer x = 635
- integer y = 208
- integer width = 146
- 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 = 134217739
- string text = "仓库"
- alignment alignment = right!
- boolean focusrectangle = false
- end type
- type st_2 from statictext within w_rp_sale_mx
- integer x = 1495
- integer y = 212
- integer width = 128
- 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 = 134217739
- string text = "状态"
- alignment alignment = right!
- boolean focusrectangle = false
- end type
- type ddlb_scid from uo_ddlb_scid within w_rp_sale_mx
- integer x = 142
- integer y = 204
- integer width = 480
- integer height = 620
- integer taborder = 130
- boolean bringtotop = true
- end type
- event constructor;call super::constructor;cur_scid_arr = THIS.uo_scid_arr
- end event
- event selectionchanged;call super::selectionchanged;
- cur_scid_arr = THIS.uo_scid_arr
- cb_1.triggerevent(clicked!)
- end event
- type st_5 from statictext within w_rp_sale_mx
- integer x = 5
- integer y = 208
- integer width = 128
- 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 = 134217739
- string text = "分部"
- alignment alignment = right!
- boolean focusrectangle = false
- end type
- type ddlb_status from dropdownlistbox within w_rp_sale_mx
- integer x = 1641
- integer y = 204
- integer width = 389
- integer height = 556
- integer taborder = 90
- boolean bringtotop = true
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- string text = "[全部]"
- boolean sorted = false
- string item[] = {"[全部]","待确认","待仓库审","待财务审","审核完毕"}
- borderstyle borderstyle = stylelowered!
- end type
- event selectionchanged;IF this.text = "[全部]" THEN
- cur_flag = -1
- cur_secflag = -1
- cur_priceflag = -1
- ELSEIF this.text = "待确认" THEN
- cur_flag = -1
- cur_secflag = -1
- cur_priceflag = 0
- ELSEIF this.text = "待仓库审" THEN
- cur_flag = 0
- cur_secflag = -1
- cur_priceflag = -1
- ELSEIF this.text = "待财务审" THEN
- cur_flag = 1
- cur_secflag = 0
- cur_priceflag = -1
- ELSEIF this.text = "审核完毕" THEN
- cur_flag = 1
- cur_secflag = 1
- cur_priceflag = -1
- END IF
- cb_1.triggerevent(clicked!)
- end event
- type ddlb_2 from dropdownlistbox within w_rp_sale_mx
- integer x = 2647
- integer y = 80
- integer width = 736
- integer height = 756
- integer taborder = 120
- boolean bringtotop = true
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- string text = "明细表"
- boolean sorted = false
- string item[] = {"明细表","结算方式","明细表不合并","明细表(含单据小计)","销售发货汇总表(含项目)"}
- borderstyle borderstyle = stylelowered!
- end type
- event selectionchanged;dw_1.uf_save_profile_layout()
- If This.Text = '明细表' Then
-
- dw_1.DataObject = 'dw_rp_sale_mx'
-
- ElseIf This.Text = '结算方式' Then
-
- dw_1.DataObject = 'dw_rp_sale_mx_bank'
- ElseIf This.Text = '明细表不合并' Then
- dw_1.DataObject = 'dw_rp_sale_mx_bhb'
- ElseIf This.Text = '明细表(含单据小计)' Then
- dw_1.DataObject = 'dw_rp_sale_mx_djxj'
- ElseIf This.Text = '销售发货汇总表(含项目)' Then
- dw_1.DataObject = 'dw_rp_sale_mx_fh_xm'
- End If
- wf_replacedw()
- If This.Text = '销售发货汇总表(含项目)' Then
- If cbx_loginretr.Checked Then
- cb_1.TriggerEvent(Clicked!)
- End If
- Else
- cb_1.TriggerEvent(Clicked!)
- End If
- end event
- type cb_other from uo_imflatbutton within w_rp_sale_mx
- integer x = 818
- integer width = 384
- integer height = 164
- integer taborder = 140
- boolean bringtotop = true
- string text = "成本组成明细"
- string normalpicname = "imexport.BMP"
- integer picsize = 16
- toolbaralignment pic_align = alignattop!
- boolean border = false
- end type
- event clicked;call super::clicked;
- s_edit_index_tran s_ch_tran //传递参数使用
- long ll_row
- long ll_scid
- long ll_outwareid
- long ll_printid
- long ll_mtrlwareid
- decimal dec_uqty
- string ls_mtrlname
- ll_row = dw_1.GetRow()
- IF ll_row = 0 THEN RETURN
- ll_scid = dw_1.Object.u_outware_scid[ll_row]
- ll_outwareid = dw_1.Object.u_outware_outwareid[ll_row]
- ll_printid = dw_1.Object.printid[ll_row]
- ll_mtrlwareid= dw_1.Object.mtrlwareid[ll_row]
- dec_uqty = dw_1.Object.u_outwaremx_uqty[ll_row]
- ls_mtrlname= dw_1.Object.u_mtrldef_mtrlname[ll_row]
- s_ch_tran.b_long=ll_scid //cur_scid
- s_ch_tran.c_long=ll_outwareid //cur_outwareid
- s_ch_tran.d_long=ll_printid //cur_printid
- s_ch_tran.e_long=ll_mtrlwareid //cur_mtrlwareid
- s_ch_tran.b_decimal=dec_uqty //cur_dec_uqty
- s_ch_tran.b_string=ls_mtrlname //cur_mtrlname
- IF IsValid(w_fifo_mtrlware_cb) THEN
- w_fifo_mtrlware_cb.WindowState = Normal!
- w_fifo_mtrlware_cb.cur_scid =ll_scid
- w_fifo_mtrlware_cb.cur_outwareid =ll_outwareid
- w_fifo_mtrlware_cb.cur_printid = ll_printid
- w_fifo_mtrlware_cb.cur_mtrlwareid = ll_mtrlwareid
- w_fifo_mtrlware_cb.cur_dec_uqty = dec_uqty
- w_fifo_mtrlware_cb.cur_mtrlname = ls_mtrlname
-
- w_fifo_mtrlware_cb.wf_retrieve_cbmx()
- ELSE
- OpenWithParm(w_fifo_mtrlware_cb,s_ch_tran)
- END IF
- end event
|