123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497 |
- $PBExportHeader$w_pmod_taskwork_workprice.srw
- forward
- global type w_pmod_taskwork_workprice from w_publ_easyq
- end type
- type cb_3 from uo_imflatbutton within w_pmod_taskwork_workprice
- end type
- type cb_4 from uo_imflatbutton within w_pmod_taskwork_workprice
- end type
- type ddlb_type from dropdownlistbox within w_pmod_taskwork_workprice
- end type
- type ddlb_1 from dropdownlistbox within w_pmod_taskwork_workprice
- end type
- end forward
- global type w_pmod_taskwork_workprice from w_publ_easyq
- string title = "批修改计件单计件单价"
- boolean if_ue_retr = true
- boolean if_ue_filter = true
- boolean if_ue_sort = true
- boolean if_ue_sentdataout = true
- cb_3 cb_3
- cb_4 cb_4
- ddlb_type ddlb_type
- ddlb_1 ddlb_1
- end type
- global w_pmod_taskwork_workprice w_pmod_taskwork_workprice
- forward prototypes
- public function integer wf_update_taskwork (ref string arg_msg)
- public function integer wf_update_person (ref string arg_msg)
- end prototypes
- public function integer wf_update_taskwork (ref string arg_msg);//产品个人工序计件单
- Int rslt = 1
- Open(w_sys_wait_jdt) //初始化进度条
- w_sys_wait_jdt.Show()
- w_sys_wait_jdt.wf_accepttol(dw_1.RowCount()) //初始化进度条1
- Long i
- String ls_billcode,ls_mtrlcode,ls_empcode,ls_procode
- Int li_auditingflag
- Decimal ld_billprice, ld_workprice,ld_taskprice
- Long ll_billid,ll_printid, ll_empid,ll_scid
- long ll_suc
- FOR i = 1 To dw_1.RowCount()
-
-
- ls_billcode = dw_1.Object.u_sc_taskwork_billcode[i]
- ls_mtrlcode = dw_1.Object.u_mtrldef_mtrlcode[i]
- li_auditingflag = dw_1.Object.u_sc_taskwork_auditingflag[i]
- ls_empcode = dw_1.Object.u_rs_empinfo_empcode[i]
- ls_procode = dw_1.Object.u_sc_taskworkmx_procode[i]
-
- ld_billprice = dw_1.Object.u_sc_taskworkmx_workprice[i]
- ld_workprice = dw_1.Object.u_sc_workprice_workprice[i]
-
- ll_scid = dw_1.Object.u_sc_taskwork_scid[i]
- ll_billid = dw_1.Object.u_sc_taskwork_billid[i]
- ll_printid = dw_1.Object.u_sc_taskworkmx_printid[i]
- ll_empid = dw_1.Object.u_sc_taskworkmx_empid[i]
-
-
- w_sys_wait_jdt.st_msg.Text = "正在更新单号:"+ls_billcode+',物料:'+ls_mtrlcode+',工号:'+ls_empcode+',工序号:'+ls_procode+'...' //进度信息
- w_sys_wait_jdt.wf_inc(i) //进度
- IF li_auditingflag = 1 THEN CONTINUE
- IF ld_billprice = ld_workprice THEN CONTINUE
-
- UPDATE u_sc_taskworkmx
- SET Workprice = :ld_workprice
- WHERE scid = :ll_scid
- AND billid = :ll_billid
- AND printid = :ll_printid;
- IF sqlca.SQLCode <> 0 THEN
- arg_msg = "单号:"+ls_billcode+',物料:'+ls_mtrlcode+',工号:'+ls_empcode+',工序号:'+ls_procode+',更新失败,'+sqlca.SQLErrText
- rslt = 0
- GOTO ext
- END IF
- ll_suc++
- NEXT
- //日志
- f_setsysoplog('产品个人工序计件单','批修改单价,成功修改数据:'+string(ll_suc),arg_msg,true)
- //--
- ext:
- Close(w_sys_wait_jdt)
- IF rslt = 0 THEN
- ROLLBACK;
- ELSE
- COMMIT;
- END IF
- RETURN rslt
- end function
- public function integer wf_update_person (ref string arg_msg);//个人产品工序计件单
- Int rslt = 1
- Open(w_sys_wait_jdt) //初始化进度条
- w_sys_wait_jdt.Show()
- w_sys_wait_jdt.wf_accepttol(dw_1.RowCount()) //初始化进度条1
- Long i
- String ls_billcode,ls_mtrlcode,ls_empcode,ls_procode
- Int li_auditingflag
- Decimal ld_billprice, ld_workprice,ld_taskprice
- Long ll_billid,ll_printid,ll_scid
- long ll_suc, ll_fail
- FOR i = 1 To dw_1.RowCount()
-
-
- ls_billcode = dw_1.Object.u_scwg_taskwork_2_billcode[i]
- ls_mtrlcode = dw_1.Object.u_mtrldef_mtrlcode[i]
- li_auditingflag = dw_1.Object.u_scwg_taskwork_2_flag[i]
- ls_empcode = dw_1.Object.u_rs_empinfo_empcode[i]
- ls_procode = dw_1.Object.procode[i]
-
- ld_billprice = dw_1.Object.price[i]
- ld_workprice = dw_1.Object.u_sc_workprice_workprice[i]
-
- ll_scid = dw_1.Object.u_scwg_taskwork_2_scid[i]
- ll_billid = dw_1.Object.u_scwg_taskwork_2_billid[i]
- ll_printid = dw_1.Object.printid[i]
-
- w_sys_wait_jdt.st_msg.Text = "正在更新单号:"+ls_billcode+',物料:'+ls_mtrlcode+',工号:'+ls_empcode+',工序号:'+ls_procode+'...' //进度信息
- w_sys_wait_jdt.wf_inc(i) //进度
-
- IF li_auditingflag = 1 THEN CONTINUE
- IF ld_billprice = ld_workprice THEN CONTINUE
-
- UPDATE u_scwg_taskwork_2_mx
- SET price = :ld_workprice
- WHERE billid = :ll_billid
- And printid = :ll_printid;
- IF sqlca.SQLCode <> 0 THEN
- arg_msg = "单号:"+ls_billcode+',物料:'+ls_mtrlcode+',工号:'+ls_empcode+',工序号:'+ls_procode+',更新失败,'+sqlca.SQLErrText
- rslt = 0
- GOTO ext
- END IF
-
- ll_suc++
- NEXT
- //日志
- f_setsysoplog('个人产品工序计件单','批修改单价,成功修改数据:'+string(ll_suc),arg_msg,true)
- //--
- ext:
- Close(w_sys_wait_jdt)
- IF rslt = 0 THEN
- ROLLBACK;
- ELSE
- COMMIT;
- END IF
- RETURN rslt
- end function
- on w_pmod_taskwork_workprice.create
- int iCurrent
- call super::create
- this.cb_3=create cb_3
- this.cb_4=create cb_4
- this.ddlb_type=create ddlb_type
- this.ddlb_1=create ddlb_1
- iCurrent=UpperBound(this.Control)
- this.Control[iCurrent+1]=this.cb_3
- this.Control[iCurrent+2]=this.cb_4
- this.Control[iCurrent+3]=this.ddlb_type
- this.Control[iCurrent+4]=this.ddlb_1
- end on
- on w_pmod_taskwork_workprice.destroy
- call super::destroy
- destroy(this.cb_3)
- destroy(this.cb_4)
- destroy(this.ddlb_type)
- destroy(this.ddlb_1)
- end on
- event open;call super::open;cb_1.TriggerEvent(Clicked!)
- end event
- event ue_before_open;call super::ue_before_open;if_ue_retr=true
- if_ue_filter=true
- if_ue_sort=true
- if_ue_sentdataout=true
- end event
- type cb_func from w_publ_easyq`cb_func within w_pmod_taskwork_workprice
- end type
- type cb_exit from w_publ_easyq`cb_exit within w_pmod_taskwork_workprice
- integer x = 1504
- end type
- type cb_2 from w_publ_easyq`cb_2 within w_pmod_taskwork_workprice
- integer x = 1189
- integer width = 165
- end type
- type cb_psetup from w_publ_easyq`cb_psetup within w_pmod_taskwork_workprice
- integer x = 933
- end type
- type cb_1 from w_publ_easyq`cb_1 within w_pmod_taskwork_workprice
- end type
- event cb_1::clicked;call super::clicked;Int li_view_sameprice
- DateTime firstdate,enddate
- IF ddlb_1.text = '显示计件单价与工价表不相同的计件明细' THEN
- li_view_sameprice = 1
- ELSE
- li_view_sameprice = 0
- END IF
- firstdate = DateTime(Date(em_1.Text),Time(0))
- enddate = DateTime(Date(em_2.Text),Time('23:59:59'))
- dw_1.Retrieve(firstdate,enddate,li_view_sameprice)
- end event
- type st_3 from w_publ_easyq`st_3 within w_pmod_taskwork_workprice
- end type
- type st_4 from w_publ_easyq`st_4 within w_pmod_taskwork_workprice
- end type
- type em_1 from w_publ_easyq`em_1 within w_pmod_taskwork_workprice
- end type
- type em_2 from w_publ_easyq`em_2 within w_pmod_taskwork_workprice
- end type
- type ddlb_yl from w_publ_easyq`ddlb_yl within w_pmod_taskwork_workprice
- integer x = 1938
- integer y = 4
- end type
- type cbx_yl from w_publ_easyq`cbx_yl within w_pmod_taskwork_workprice
- integer x = 1728
- integer y = 8
- end type
- type dw_1 from w_publ_easyq`dw_1 within w_pmod_taskwork_workprice
- integer y = 300
- string dataobject = "dw_pmod_sc_taskwork_workprice"
- end type
- event dw_1::doubleclicked;call super::doubleclicked;
- //IF dw_1.DataObject = 'dw_pmod_taskwork_workprice' THEN
- // IF row > 0 THEN
- // String ls_code
- // Long ll_scid
- //
- // ls_code = THIS.Object.u_sc_taskwork_billcode[row]
- // ll_scid = dw_1.Object.u_sc_taskworkmx_scid[row]
- //
- // f_open_win(ll_scid,ls_code)
- // END IF
- //END IF
- end event
- type sle_mtrl from w_publ_easyq`sle_mtrl within w_pmod_taskwork_workprice
- end type
- type sle_cust from w_publ_easyq`sle_cust within w_pmod_taskwork_workprice
- end type
- type st_mtrl from w_publ_easyq`st_mtrl within w_pmod_taskwork_workprice
- end type
- type st_cust from w_publ_easyq`st_cust within w_pmod_taskwork_workprice
- end type
- type cbx_loginretr from w_publ_easyq`cbx_loginretr within w_pmod_taskwork_workprice
- boolean visible = true
- integer x = 1728
- integer y = 92
- end type
- type pb_em1 from w_publ_easyq`pb_em1 within w_pmod_taskwork_workprice
- end type
- type pb_em2 from w_publ_easyq`pb_em2 within w_pmod_taskwork_workprice
- end type
- type pb_2 from w_publ_easyq`pb_2 within w_pmod_taskwork_workprice
- end type
- type cb_help from w_publ_easyq`cb_help within w_pmod_taskwork_workprice
- integer x = 1353
- end type
- type cb_copyself from w_publ_easyq`cb_copyself within w_pmod_taskwork_workprice
- boolean visible = false
- end type
- type gb_1 from w_publ_easyq`gb_1 within w_pmod_taskwork_workprice
- integer x = 1106
- integer y = 432
- integer width = 110
- end type
- type ln_bar from w_publ_easyq`ln_bar within w_pmod_taskwork_workprice
- end type
- type ln_bar2 from w_publ_easyq`ln_bar2 within w_pmod_taskwork_workprice
- end type
- type r_bar from w_publ_easyq`r_bar within w_pmod_taskwork_workprice
- end type
- type ln_1 from w_publ_easyq`ln_1 within w_pmod_taskwork_workprice
- end type
- type ln_2 from w_publ_easyq`ln_2 within w_pmod_taskwork_workprice
- end type
- type ln_3 from w_publ_easyq`ln_3 within w_pmod_taskwork_workprice
- boolean visible = false
- end type
- type ln_4 from w_publ_easyq`ln_4 within w_pmod_taskwork_workprice
- boolean visible = false
- end type
- type cb_3 from uo_imflatbutton within w_pmod_taskwork_workprice
- integer x = 302
- integer width = 274
- integer height = 164
- integer taborder = 30
- boolean bringtotop = true
- string text = "更新单价"
- string normalpicname = "save.bmp"
- integer picsize = 16
- toolbaralignment pic_align = alignattop!
- boolean border = false
- end type
- event clicked;call super::clicked;
- IF Not f_power_ind(1535) THEN
- MessageBox(publ_operator,"你没有权限")
- RETURN
- END IF
- IF MessageBox("IF","你是否要将工价表单价|指令单工价更新到未审核的计件单单价? ~n注意,更新后不能逆向操作!",Exclamation!, OKCancel!, 2) = 2 THEN RETURN
- String arg_msg
- IF ddlb_type.Text = '产品个人工序计件单' THEN
- IF wf_update_taskwork(arg_msg) = 0 THEN
- MessageBox('Error',arg_msg)
- RETURN
- ELSE
- MessageBox('提示','更新成功,请核对')
- cb_1.TriggerEvent(Clicked!)
- END IF
- ELSEIF ddlb_type.Text = '个人产品工序计件单' THEN
- IF wf_update_person(arg_msg) = 0 THEN
- MessageBox('Error',arg_msg)
- RETURN
- ELSE
- MessageBox('提示','更新成功,请核对')
- cb_1.TriggerEvent(Clicked!)
- END IF
- END IF
- end event
- type cb_4 from uo_imflatbutton within w_pmod_taskwork_workprice
- integer x = 576
- integer width = 357
- integer height = 164
- integer taborder = 50
- boolean bringtotop = true
- string text = "查看工价表"
- string normalpicname = "find.bmp"
- integer picsize = 16
- toolbaralignment pic_align = alignattop!
- boolean border = false
- end type
- event clicked;call super::clicked;Long ll_row
- String ls_mtrlcode
- ll_row = dw_1.GetRow()
- IF ll_row <= 0 THEN
- MessageBox(publ_operator,'请选择产品')
- RETURN
- END IF
- ls_mtrlcode = dw_1.Object.u_mtrldef_mtrlcode[ll_row]
- s_edit_index_tran s_tran
- s_tran.arg_string_code = ls_mtrlcode
- s_tran.if_retrieve_all = local_retrieve_all
- OpenWithParm(w_sc_workpricetable,s_tran)
- end event
- type ddlb_type from dropdownlistbox within w_pmod_taskwork_workprice
- integer x = 2395
- integer y = 32
- integer width = 718
- integer height = 412
- integer taborder = 130
- 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
- boolean vscrollbar = true
- string item[] = {"产品个人工序计件单","个人产品工序计件单"}
- borderstyle borderstyle = stylelowered!
- end type
- event selectionchanged;dw_1.uf_save_profile_layout()
- IF This.Text = '产品个人工序计件单' THEN
- dw_1.DataObject = 'dw_pmod_sc_taskwork_workprice'
- ELSEIF This.Text = '个人产品工序计件单' THEN
- dw_1.DataObject = 'dw_pmod_scwg_taskwork_2_person_workprice'
- END IF
- dw_1.SetTransObject(sqlca)
- dw_1.ins_INIfile_name = sys_inifilename
- dw_1.ins_opemp = publ_operator
- dw_1.cardw_empid = sys_empid
- dw_1.cur_DataObject = dw_1.DataObject
- dw_1.uf_read_profile_layout()
- cb_1.TriggerEvent(Clicked!)
- end event
- type ddlb_1 from dropdownlistbox within w_pmod_taskwork_workprice
- integer x = 1838
- integer y = 196
- integer width = 1865
- integer height = 300
- integer taborder = 130
- 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;cb_1.TriggerEvent(Clicked!)
- end event
|