uo_fx_fj.sru 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. $PBExportHeader$uo_fx_fj.sru
  2. $PBExportComments$协同系统 物料配置 UO (用于选择物料配置)
  3. forward
  4. global type uo_fx_fj from nonvisualobject
  5. end type
  6. end forward
  7. global type uo_fx_fj from nonvisualobject
  8. end type
  9. global uo_fx_fj uo_fx_fj
  10. type variables
  11. long ins_comid // 协同企业ID(供应商 物料所在的企业)
  12. boolean ins_isReady = false // 当全部获取了10个(7个)配置表的时候,ins_isReady = true
  13. datastore ins_ds_color, ins_ds_color_w, ins_ds_color_p
  14. datastore ins_ds_pztype_def, ins_ds_pztype_mx
  15. datastore ins_ds_configure_type, ins_ds_configure_code, ins_ds_configure_codemx
  16. datastore ins_ds_configure, ins_ds_configure2
  17. end variables
  18. forward prototypes
  19. public function integer update_fxfj (s_fileinfo_arr s_arr, ref string arg_msg)
  20. end prototypes
  21. public function integer update_fxfj (s_fileinfo_arr s_arr, ref string arg_msg);Long i
  22. Int rslt = 1
  23. oleobject item, outware, mxs
  24. mxs = FXAppCom.CreArrOfPbDictionary()
  25. for i = 1 to upperbound(s_arr.Fileid)
  26. item = FXAppCom.CreatePbDictionary()
  27. item.SetInt('fileid', s_arr.Fileid[i])
  28. item.SetInt('billtype', s_arr.billtype[i])
  29. item.SetString('displayName', s_arr.displayName[i])
  30. item.SetString('fileName', s_arr.fileName[i])
  31. item.SetString('fileType', s_arr.fileType[i])
  32. item.SetString('dscrp', s_arr.dscrp[i])
  33. item.SetFile('filedata', s_arr.filepath[i])
  34. item.SetInt('relid_erp', s_arr.relid[i])
  35. item.SetInt('relid_mx', s_arr.relid_mx[i])
  36. item.SetString('relcode', s_arr.relcode[i])
  37. mxs.Add(item)
  38. next
  39. oleobject request,response
  40. request = FXAppCom.CreatePbDictionary()
  41. request.SetString('token', app_token_fx)
  42. request.SetObject('FxFileFjs', mxs)
  43. response = FXAppCom.DoExecute('UpdateFxFileFj', request)
  44. arg_msg = response.GetString('ErrMsg')
  45. if (arg_msg <> '') then
  46. rslt = 0
  47. goto ext
  48. end if
  49. ext:
  50. return rslt
  51. end function
  52. on uo_fx_fj.create
  53. call super::create
  54. TriggerEvent( this, "constructor" )
  55. end on
  56. on uo_fx_fj.destroy
  57. TriggerEvent( this, "destructor" )
  58. call super::destroy
  59. end on
  60. event destructor;destroy ins_ds_color
  61. destroy ins_ds_color_w
  62. destroy ins_ds_color_p
  63. destroy ins_ds_pztype_def
  64. destroy ins_ds_pztype_mx
  65. destroy ins_ds_configure_type
  66. destroy ins_ds_configure_code
  67. destroy ins_ds_configure_codemx
  68. destroy ins_ds_configure
  69. destroy ins_ds_configure2
  70. end event