w_cd_main_pc.srw 30 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227
  1. $PBExportHeader$w_cd_main_pc.srw
  2. forward
  3. global type w_cd_main_pc from w_publ_base_style
  4. end type
  5. type dw_1 from u_dw_rbtnfilter within w_cd_main_pc
  6. end type
  7. type ddlb_1 from dropdownlistbox within w_cd_main_pc
  8. end type
  9. type st_3 from statictext within w_cd_main_pc
  10. end type
  11. type st_4 from statictext within w_cd_main_pc
  12. end type
  13. type em_1 from editmask within w_cd_main_pc
  14. end type
  15. type em_2 from editmask within w_cd_main_pc
  16. end type
  17. type pb_em1 from picturebutton within w_cd_main_pc
  18. end type
  19. type pb_em2 from picturebutton within w_cd_main_pc
  20. end type
  21. type pb_2 from picturebutton within w_cd_main_pc
  22. end type
  23. type st_1 from statictext within w_cd_main_pc
  24. end type
  25. type cb_1 from uo_imflatbutton within w_cd_main_pc
  26. end type
  27. type tab_1 from tab within w_cd_main_pc
  28. end type
  29. type tabpage_1 from userobject within tab_1
  30. end type
  31. type dw_2 from datawindow within tabpage_1
  32. end type
  33. type tabpage_1 from userobject within tab_1
  34. dw_2 dw_2
  35. end type
  36. type tabpage_2 from userobject within tab_1
  37. end type
  38. type p_1 from picture within tabpage_2
  39. end type
  40. type cb_2 from commandbutton within tabpage_2
  41. end type
  42. type tabpage_2 from userobject within tab_1
  43. p_1 p_1
  44. cb_2 cb_2
  45. end type
  46. type tabpage_3 from userobject within tab_1
  47. end type
  48. type tab_2 from tab within tabpage_3
  49. end type
  50. type tabpage_4 from userobject within tab_2
  51. end type
  52. type cb_8 from commandbutton within tabpage_4
  53. end type
  54. type cb_7 from commandbutton within tabpage_4
  55. end type
  56. type cb_6 from commandbutton within tabpage_4
  57. end type
  58. type dw_4 from datawindow within tabpage_4
  59. end type
  60. type tabpage_4 from userobject within tab_2
  61. cb_8 cb_8
  62. cb_7 cb_7
  63. cb_6 cb_6
  64. dw_4 dw_4
  65. end type
  66. type tabpage_5 from userobject within tab_2
  67. end type
  68. type cb_5 from commandbutton within tabpage_5
  69. end type
  70. type cb_4 from commandbutton within tabpage_5
  71. end type
  72. type cb_3 from commandbutton within tabpage_5
  73. end type
  74. type dw_5 from datawindow within tabpage_5
  75. end type
  76. type tabpage_5 from userobject within tab_2
  77. cb_5 cb_5
  78. cb_4 cb_4
  79. cb_3 cb_3
  80. dw_5 dw_5
  81. end type
  82. type tab_2 from tab within tabpage_3
  83. tabpage_4 tabpage_4
  84. tabpage_5 tabpage_5
  85. end type
  86. type dw_3 from datawindow within tabpage_3
  87. end type
  88. type tabpage_3 from userobject within tab_1
  89. tab_2 tab_2
  90. dw_3 dw_3
  91. end type
  92. type tab_1 from tab within w_cd_main_pc
  93. tabpage_1 tabpage_1
  94. tabpage_2 tabpage_2
  95. tabpage_3 tabpage_3
  96. end type
  97. type cb_9 from uo_imflatbutton within w_cd_main_pc
  98. end type
  99. type ln_1 from line within w_cd_main_pc
  100. end type
  101. type ln_2 from line within w_cd_main_pc
  102. end type
  103. end forward
  104. global type w_cd_main_pc from w_publ_base_style
  105. integer width = 3013
  106. integer height = 2000
  107. string title = "工厂销售订单管理"
  108. boolean maxbox = true
  109. boolean resizable = true
  110. windowtype windowtype = main!
  111. windowstate windowstate = maximized!
  112. event ue_retrieve ( )
  113. event ue_date1 ( )
  114. event ue_date2 ( )
  115. event ue_date3 ( )
  116. event ue_retrieve_fjs ( )
  117. dw_1 dw_1
  118. ddlb_1 ddlb_1
  119. st_3 st_3
  120. st_4 st_4
  121. em_1 em_1
  122. em_2 em_2
  123. pb_em1 pb_em1
  124. pb_em2 pb_em2
  125. pb_2 pb_2
  126. st_1 st_1
  127. cb_1 cb_1
  128. tab_1 tab_1
  129. cb_9 cb_9
  130. ln_1 ln_1
  131. ln_2 ln_2
  132. end type
  133. global w_cd_main_pc w_cd_main_pc
  134. type variables
  135. datawindow dw_2
  136. datawindow dw_3
  137. tab tab_2
  138. datawindow dw_4
  139. datawindow dw_5
  140. end variables
  141. forward prototypes
  142. public function integer days_in_month (integer month, integer year)
  143. end prototypes
  144. event ue_retrieve();
  145. Long ll_status
  146. IF ddlb_1.Text = '待询价' THEN
  147. ll_status = 0
  148. ELSEIF ddlb_1.Text = '已报价' THEN
  149. ll_status = 1
  150. ELSEIF ddlb_1.Text = '已退回' THEN
  151. ll_status = 2
  152. ELSEIF ddlb_1.Text = '已下单' THEN
  153. ll_status = 3
  154. ELSEIF ddlb_1.Text = '已发货' THEN
  155. ll_status = 4
  156. ELSEIF ddlb_1.Text = '已收货' THEN
  157. ll_status = 5
  158. else
  159. ll_status = -1
  160. END IF
  161. DateTime ld_begin, ld_end
  162. ld_begin = DateTime(Date(em_1.Text), Time(0))
  163. ld_end = DateTime(Date(em_2.Text), Time('23:59:59'))
  164. oleobject reqparms, tasks
  165. reqparms = AppCom.CreatePbDictionary()
  166. reqparms.SetString("token", app_token)
  167. reqparms.SetString("status", ll_status)
  168. //reqparms.SetString("querystr", "")
  169. //reqparms.SetInt("cusid", 0)
  170. reqparms.SetDateTime("begin", ld_begin)
  171. reqparms.SetDateTime("end", ld_end)
  172. String arg_msg = ''
  173. tasks = AppCom.GetTasks(reqparms, Ref arg_msg)
  174. IF arg_msg <> '' THEN
  175. MessageBox('ERROR', arg_msg)
  176. RETURN
  177. END IF
  178. datawindow cur_dw
  179. cur_dw = dw_1
  180. cur_dw.Reset()
  181. cur_dw.SetRedraw(False)
  182. Long ll_cnt, row, i
  183. oleobject task
  184. ll_cnt = tasks.Count
  185. FOR i = 1 To ll_cnt
  186. task = tasks.GetItem(i - 1)
  187. row = cur_dw.InsertRow(0)
  188. cur_dw.SetItem(row, 'taskid', task.GetInt('taskid'))
  189. cur_dw.SetItem(row, 'tid', task.GetString('tid'))
  190. cur_dw.SetItem(row, 'taskdate', task.GetDateTime('taskdate'))
  191. cur_dw.SetItem(row, 'cusid', task.GetInt('cusid'))
  192. cur_dw.SetItem(row, 'cus_rep', task.GetString('cus_rep'))
  193. cur_dw.SetItem(row, 'cus_tele', task.GetString('cus_tele'))
  194. cur_dw.SetItem(row, 'cus_address', task.GetString('cus_address'))
  195. cur_dw.SetItem(row, 'freight', task.GetString('freight'))
  196. cur_dw.SetItem(row, 'freight_tele', task.GetString('freight_tele'))
  197. cur_dw.SetItem(row, 'opemp', task.GetString('opemp'))
  198. cur_dw.SetItem(row, 'opdate', task.GetDateTime('opdate'))
  199. cur_dw.SetItem(row, 'modemp', task.GetString('modemp'))
  200. cur_dw.SetItem(row, 'moddate', task.GetDateTime('moddate'))
  201. cur_dw.SetItem(row, 'buyer_name', task.GetString('buyer_name'))
  202. cur_dw.SetItem(row, 'buyer_tele', task.GetString('buyer_tele'))
  203. cur_dw.SetItem(row, 'requiredate', task.GetDateTime('requiredate'))
  204. cur_dw.SetItem(row, 'temp1', task.GetString('temp1'))
  205. cur_dw.SetItem(row, 'temp2', task.GetString('temp2'))
  206. cur_dw.SetItem(row, 'temp3', task.GetString('temp3'))
  207. cur_dw.SetItem(row, 'temp4', task.GetString('temp4'))
  208. cur_dw.SetItem(row, 'temp5', task.GetString('temp5'))
  209. cur_dw.SetItem(row, 'temp6', task.GetString('temp6'))
  210. cur_dw.SetItem(row, 'price_emp', task.GetString('price_emp'))
  211. cur_dw.SetItem(row, 'replyrqdate', task.GetDateTime('replyrqdate'))
  212. cur_dw.SetItem(row, 'confirmemp', task.GetString('confirmemp'))
  213. cur_dw.SetItem(row, 'confirmdate', task.GetDateTime('confirmdate'))
  214. cur_dw.SetItem(row, 'status', task.GetInt('status'))
  215. cur_dw.SetItem(row, 'taskcode', task.GetString('taskcode'))
  216. cur_dw.SetItem(row, 'outwarecode', task.GetString('outwarecode'))
  217. cur_dw.SetItem(row, 'replydscrp', task.GetString('replydscrp'))
  218. cur_dw.SetItem(row, 'replydate', task.GetDateTime('replydate'))
  219. cur_dw.SetItem(row, 'cuscode', task.GetString('cuscode'))
  220. cur_dw.SetItem(row, 'cusname', task.GetString('cusname'))
  221. NEXT
  222. cur_dw.SetRedraw(True)
  223. row = cur_dw.GetRow()
  224. if row > 0 then
  225. cur_dw.SelectRow(row, true)
  226. end if
  227. triggerevent('ue_retrieve_fjs')
  228. end event
  229. event ue_date1();//IF THIS.Text = "本日" THEN
  230. em_1.text = string(today(),"yyyy-mm-dd")
  231. em_2.text = string(today(),"yyyy-mm-dd")
  232. //ELSEIF THIS.Text = "本周" THEN
  233. // int li_DayNum
  234. // li_DayNum = DayNumber(today())
  235. // em_1.text = string(RelativeDate ( today(), 1 - li_DayNum ),"yyyy-mm-dd")
  236. // em_2.text = string(RelativeDate ( today(), 7 - li_DayNum ),"yyyy-mm-dd")
  237. //ELSEIF THIS.Text = "本月" THEN
  238. // int li_Month, li_Year, li_Days
  239. // li_Month = Month(today())
  240. // li_Year = Year(today())
  241. // li_Days = days_in_month(li_Month, li_Year)
  242. // em_1.text = string(Date(li_Year, li_Month, 1),"yyyy-mm-dd")
  243. // em_2.text = string(Date(li_Year, li_Month, li_Days),"yyyy-mm-dd")
  244. //END IF
  245. end event
  246. event ue_date2();//IF THIS.Text = "本日" THEN
  247. // em_1.text = string(today(),"yyyy-mm-dd")
  248. // em_2.text = string(today(),"yyyy-mm-dd")
  249. //ELSEIF THIS.Text = "本周" THEN
  250. int li_DayNum
  251. li_DayNum = DayNumber(today())
  252. em_1.text = string(RelativeDate ( today(), 1 - li_DayNum ),"yyyy-mm-dd")
  253. em_2.text = string(RelativeDate ( today(), 7 - li_DayNum ),"yyyy-mm-dd")
  254. //ELSEIF THIS.Text = "本月" THEN
  255. // int li_Month, li_Year, li_Days
  256. // li_Month = Month(today())
  257. // li_Year = Year(today())
  258. // li_Days = days_in_month(li_Month, li_Year)
  259. // em_1.text = string(Date(li_Year, li_Month, 1),"yyyy-mm-dd")
  260. // em_2.text = string(Date(li_Year, li_Month, li_Days),"yyyy-mm-dd")
  261. //END IF
  262. end event
  263. event ue_date3();//IF THIS.Text = "本日" THEN
  264. // em_1.text = string(today(),"yyyy-mm-dd")
  265. // em_2.text = string(today(),"yyyy-mm-dd")
  266. //ELSEIF THIS.Text = "本周" THEN
  267. // int li_DayNum
  268. // li_DayNum = DayNumber(today())
  269. // em_1.text = string(RelativeDate ( today(), 1 - li_DayNum ),"yyyy-mm-dd")
  270. // em_2.text = string(RelativeDate ( today(), 7 - li_DayNum ),"yyyy-mm-dd")
  271. //ELSEIF THIS.Text = "本月" THEN
  272. int li_Month, li_Year, li_Days
  273. li_Month = Month(today())
  274. li_Year = Year(today())
  275. li_Days = days_in_month(li_Month, li_Year)
  276. em_1.text = string(Date(li_Year, li_Month, 1),"yyyy-mm-dd")
  277. em_2.text = string(Date(li_Year, li_Month, li_Days),"yyyy-mm-dd")
  278. //END IF
  279. end event
  280. event ue_retrieve_fjs();long row
  281. row = dw_1.GetRow()
  282. dw_2.Reset()
  283. if row <= 0 then return
  284. long taskid
  285. taskid = dw_1.Object.taskid[row]
  286. if isnull(taskid) OR taskid = 0 then return
  287. string arg_msg = ''
  288. oleobject parms, lo_rslt, lo_item
  289. parms = AppCom.CreatePbDictionary()
  290. parms.SetString('token', app_token)
  291. parms.SetInt('taskid', taskid)
  292. lo_rslt = AppCom.GetTaskFJs(parms, ref arg_msg)
  293. if arg_msg <> '' then
  294. MessageBox('ERROR', arg_msg)
  295. return
  296. end if
  297. long ll_cnt, i
  298. ll_cnt = lo_rslt.Count
  299. dw_2.SetRedraw(false)
  300. for i = 1 to ll_cnt
  301. lo_item = lo_rslt.GetItem(i - 1)
  302. row = dw_2.InsertRow(0)
  303. dw_2.SetItem(row, 'taskid', lo_item.GetInt('taskid'))
  304. dw_2.SetItem(row, 'printid', lo_item.GetInt('printid'))
  305. dw_2.SetItem(row, 'mxcode', lo_item.GetString('mxcode'))
  306. dw_2.SetItem(row, 'price_ls', lo_item.GetDouble('price_ls'))
  307. dw_2.SetItem(row, 'price_jm', lo_item.GetDouble('price_jm'))
  308. dw_2.SetItem(row, 'mtrltype', lo_item.GetString('mtrltype'))
  309. dw_2.SetItem(row, 'fjname', lo_item.GetString('fjname'))
  310. dw_2.SetItem(row, 'fjdscrp', lo_item.GetString('fjdscrp'))
  311. next
  312. dw_2.SetRedraw(true)
  313. end event
  314. public function integer days_in_month (integer month, integer year);//Most cases are straight forward in that there are a fixed number of
  315. //days in 11 of the 12 months. February is, of course, the problem.
  316. //In a leap year February has 29 days, otherwise 28.
  317. Integer li_DaysInMonth, li_Days[12] = {31,28,31,30,31,30,31,31,30,31,30,31}
  318. // Get the number of days per month for a non leap year.
  319. li_DaysInMonth = li_Days[Month]
  320. // Check for a leap year.
  321. If Month = 2 Then
  322. // If the year is a leap year, change the number of days.
  323. // Leap Year Calculation:
  324. // Year divisible by 4, but not by 100, unless it is also divisible by 400
  325. If ( (Mod(Year,4) = 0 And Mod(Year,100) <> 0) Or (Mod(Year,400) = 0) ) Then
  326. li_DaysInMonth = 29
  327. End If
  328. End If
  329. //Return the number of days in the relevant month
  330. Return li_DaysInMonth
  331. end function
  332. on w_cd_main_pc.create
  333. int iCurrent
  334. call super::create
  335. this.dw_1=create dw_1
  336. this.ddlb_1=create ddlb_1
  337. this.st_3=create st_3
  338. this.st_4=create st_4
  339. this.em_1=create em_1
  340. this.em_2=create em_2
  341. this.pb_em1=create pb_em1
  342. this.pb_em2=create pb_em2
  343. this.pb_2=create pb_2
  344. this.st_1=create st_1
  345. this.cb_1=create cb_1
  346. this.tab_1=create tab_1
  347. this.cb_9=create cb_9
  348. this.ln_1=create ln_1
  349. this.ln_2=create ln_2
  350. iCurrent=UpperBound(this.Control)
  351. this.Control[iCurrent+1]=this.dw_1
  352. this.Control[iCurrent+2]=this.ddlb_1
  353. this.Control[iCurrent+3]=this.st_3
  354. this.Control[iCurrent+4]=this.st_4
  355. this.Control[iCurrent+5]=this.em_1
  356. this.Control[iCurrent+6]=this.em_2
  357. this.Control[iCurrent+7]=this.pb_em1
  358. this.Control[iCurrent+8]=this.pb_em2
  359. this.Control[iCurrent+9]=this.pb_2
  360. this.Control[iCurrent+10]=this.st_1
  361. this.Control[iCurrent+11]=this.cb_1
  362. this.Control[iCurrent+12]=this.tab_1
  363. this.Control[iCurrent+13]=this.cb_9
  364. this.Control[iCurrent+14]=this.ln_1
  365. this.Control[iCurrent+15]=this.ln_2
  366. end on
  367. on w_cd_main_pc.destroy
  368. call super::destroy
  369. destroy(this.dw_1)
  370. destroy(this.ddlb_1)
  371. destroy(this.st_3)
  372. destroy(this.st_4)
  373. destroy(this.em_1)
  374. destroy(this.em_2)
  375. destroy(this.pb_em1)
  376. destroy(this.pb_em2)
  377. destroy(this.pb_2)
  378. destroy(this.st_1)
  379. destroy(this.cb_1)
  380. destroy(this.tab_1)
  381. destroy(this.cb_9)
  382. destroy(this.ln_1)
  383. destroy(this.ln_2)
  384. end on
  385. event resize;call super::resize;ln_1.endx = this.width
  386. ln_2.endx = this.width
  387. dw_1.width = this.Workspacewidth() - dw_1.x
  388. dw_1.Height = (this.workspaceheight() - dw_1.y) / 3
  389. tab_1.width = this.workspacewidth() - tab_1.x
  390. tab_1.y = dw_1.y + dw_1.Height
  391. tab_1.height = dw_1.Height * 2
  392. dw_2.width = tab_1.tabpage_1.width
  393. dw_2.Height = tab_1.tabpage_1.height
  394. dw_3.width = tab_1.tabpage_3.width / 2
  395. dw_3.height = tab_1.tabpage_3.height
  396. tab_2.x = dw_3.x + dw_3.width
  397. tab_2.width = dw_3.width
  398. tab_2.height = dw_3.height
  399. dw_4.width = tab_1.tabpage_3.tab_2.tabpage_4.width
  400. dw_4.height = tab_1.tabpage_3.tab_2.tabpage_4.height - dw_4.y
  401. dw_5.width = tab_1.tabpage_3.tab_2.tabpage_5.width
  402. dw_5.height = tab_1.tabpage_3.tab_2.tabpage_5.height - dw_5.y
  403. end event
  404. event open;call super::open;dw_2 = tab_1.tabpage_1.dw_2
  405. dw_3 = tab_1.tabpage_3.dw_3
  406. tab_2 = tab_1.tabpage_3.tab_2
  407. dw_4 = tab_1.tabpage_3.tab_2.tabpage_4.dw_4
  408. dw_5 = tab_1.tabpage_3.tab_2.tabpage_5.dw_5
  409. em_1.Text = string(RelativeDate(today(), -30), 'yyyy-MM-dd')
  410. em_2.Text = string(today(), 'yyyy-MM-dd')
  411. triggerevent('ue_retrieve')
  412. end event
  413. type cb_func from w_publ_base_style`cb_func within w_cd_main_pc
  414. integer x = 151
  415. string text = "报价"
  416. end type
  417. event cb_func::clicked;call super::clicked;Long row
  418. row = dw_1.GetRow()
  419. IF row <= 0 THEN
  420. MessageBox('提示', '请选择目标')
  421. RETURN
  422. END IF
  423. IF dw_1.Object.status[row] <> 0 THEN
  424. MessageBox('提示', '订单不在待询价状态,不能报价')
  425. RETURN
  426. END IF
  427. oleobject lo_dict
  428. lo_dict = AppCom.CreatePbDictionary()
  429. lo_dict.SetInt('taskid', dw_1.Object.taskid[row])
  430. lo_dict.SetString('tid', dw_1.Object.tid[row])
  431. lo_dict.SetDateTime('taskdate', dw_1.Object.taskdate[row])
  432. lo_dict.SetInt('cusid', dw_1.Object.cusid[row])
  433. lo_dict.SetString('cus_rep', dw_1.Object.cus_rep[row])
  434. lo_dict.SetString('cus_tele', dw_1.Object.cus_tele[row])
  435. lo_dict.SetString('cus_address', dw_1.Object.cus_address[row])
  436. lo_dict.SetString('freight', dw_1.Object.freight[row])
  437. lo_dict.SetString('freight_tele', dw_1.Object.freight_tele[row])
  438. lo_dict.SetString('opemp', dw_1.Object.opemp[row])
  439. lo_dict.SetDateTime('opdate', dw_1.Object.opdate[row])
  440. lo_dict.SetString('modemp', dw_1.Object.modemp[row])
  441. lo_dict.SetDateTime('moddate', dw_1.Object.moddate[row])
  442. lo_dict.SetString('buyer_name', dw_1.Object.buyer_name[row])
  443. lo_dict.SetString('buyer_tele', dw_1.Object.buyer_tele[row])
  444. lo_dict.SetDateTime('requiredate', dw_1.Object.requiredate[row])
  445. lo_dict.SetString('temp1', dw_1.Object.temp1[row])
  446. lo_dict.SetString('temp2', dw_1.Object.temp2[row])
  447. lo_dict.SetString('temp3', dw_1.Object.temp3[row])
  448. lo_dict.SetString('temp4', dw_1.Object.temp4[row])
  449. lo_dict.SetString('temp5', dw_1.Object.temp5[row])
  450. lo_dict.SetString('temp6', dw_1.Object.temp6[row])
  451. lo_dict.SetString('price_emp', dw_1.Object.price_emp[row])
  452. lo_dict.SetDateTime('replyrqdate', dw_1.Object.replyrqdate[row])
  453. lo_dict.SetString('confirmemp', dw_1.Object.confirmemp[row])
  454. lo_dict.SetDateTime('confirmdate', dw_1.Object.confirmdate[row])
  455. lo_dict.SetInt('status', dw_1.Object.status[row])
  456. lo_dict.SetString('taskcode', dw_1.Object.taskcode[row])
  457. lo_dict.SetString('outwarecode', dw_1.Object.outwarecode[row])
  458. lo_dict.SetString('replydscrp', dw_1.Object.replydscrp[row])
  459. lo_dict.SetDateTime('replydate', dw_1.Object.replydate[row])
  460. lo_dict.SetString('cuscode', dw_1.Object.cuscode[row])
  461. lo_dict.SetString('cusname', dw_1.Object.cusname[row])
  462. OpenWithParm(w_cd_saletask_bj, lo_dict)
  463. end event
  464. type cb_exit from w_publ_base_style`cb_exit within w_cd_main_pc
  465. integer x = 576
  466. end type
  467. type ln_bar from w_publ_base_style`ln_bar within w_cd_main_pc
  468. integer beginy = 280
  469. integer endy = 280
  470. end type
  471. type ln_bar2 from w_publ_base_style`ln_bar2 within w_cd_main_pc
  472. integer beginy = 284
  473. integer endy = 284
  474. end type
  475. type r_bar from w_publ_base_style`r_bar within w_cd_main_pc
  476. end type
  477. type dw_1 from u_dw_rbtnfilter within w_cd_main_pc
  478. integer y = 296
  479. integer width = 2455
  480. integer height = 852
  481. integer taborder = 20
  482. boolean bringtotop = true
  483. string dataobject = "dw_cd_saletask_dm"
  484. boolean hscrollbar = true
  485. boolean vscrollbar = true
  486. boolean hsplitscroll = true
  487. end type
  488. event rowfocuschanged;call super::rowfocuschanged;this.selectrow(0,false)
  489. if currentrow > 0 then
  490. this.selectrow(currentrow, true)
  491. end if
  492. parent.triggerevent('ue_retrieve_fjs')
  493. end event
  494. type ddlb_1 from dropdownlistbox within w_cd_main_pc
  495. integer x = 329
  496. integer y = 188
  497. integer width = 549
  498. integer height = 476
  499. integer taborder = 30
  500. boolean bringtotop = true
  501. integer textsize = -9
  502. integer weight = 400
  503. fontcharset fontcharset = gb2312charset!
  504. fontpitch fontpitch = variable!
  505. string facename = "宋体"
  506. long textcolor = 33554432
  507. string text = "待询价"
  508. boolean sorted = false
  509. string item[] = {"待询价","已报价","已退回","已下单","已发货","已收货","全部"}
  510. borderstyle borderstyle = stylelowered!
  511. end type
  512. event selectionchanged;parent.triggerevent('ue_retrieve')
  513. end event
  514. type st_3 from statictext within w_cd_main_pc
  515. integer x = 905
  516. integer y = 196
  517. integer width = 315
  518. integer height = 60
  519. boolean bringtotop = true
  520. integer textsize = -9
  521. integer weight = 400
  522. fontcharset fontcharset = gb2312charset!
  523. fontpitch fontpitch = variable!
  524. string facename = "宋体"
  525. long textcolor = 33554432
  526. long backcolor = 134217739
  527. boolean enabled = false
  528. string text = "订货日期从:"
  529. alignment alignment = right!
  530. boolean focusrectangle = false
  531. end type
  532. event constructor;this.backcolor = 14215660
  533. end event
  534. type st_4 from statictext within w_cd_main_pc
  535. integer x = 1737
  536. integer y = 196
  537. integer width = 105
  538. integer height = 60
  539. boolean bringtotop = true
  540. integer textsize = -9
  541. integer weight = 400
  542. fontcharset fontcharset = gb2312charset!
  543. fontpitch fontpitch = variable!
  544. string facename = "宋体"
  545. long textcolor = 33554432
  546. long backcolor = 134217739
  547. boolean enabled = false
  548. string text = "到:"
  549. alignment alignment = right!
  550. boolean focusrectangle = false
  551. end type
  552. event constructor;this.backcolor = 14215660
  553. end event
  554. type em_1 from editmask within w_cd_main_pc
  555. integer x = 1230
  556. integer y = 180
  557. integer width = 407
  558. integer height = 88
  559. integer taborder = 120
  560. boolean bringtotop = true
  561. integer textsize = -9
  562. integer weight = 400
  563. fontcharset fontcharset = gb2312charset!
  564. fontpitch fontpitch = variable!
  565. string facename = "宋体"
  566. long textcolor = 33554432
  567. borderstyle borderstyle = stylelowered!
  568. maskdatatype maskdatatype = datemask!
  569. string mask = "yyyy-mm-dd"
  570. boolean spin = true
  571. end type
  572. event rbuttondown;s_calender_arg s_calender
  573. s_calender.PointerX = THIS.PointerX()
  574. s_calender.PointerY = THIS.PointerY()
  575. s_calender.X = THIS.X
  576. s_calender.Y = THIS.Y
  577. OpenWithParm(w_calendar,s_calender)
  578. THIS.Text = String(id_date_selected)
  579. end event
  580. type em_2 from editmask within w_cd_main_pc
  581. integer x = 1842
  582. integer y = 180
  583. integer width = 407
  584. integer height = 88
  585. integer taborder = 130
  586. boolean bringtotop = true
  587. integer textsize = -9
  588. integer weight = 400
  589. fontcharset fontcharset = gb2312charset!
  590. fontpitch fontpitch = variable!
  591. string facename = "宋体"
  592. long textcolor = 33554432
  593. borderstyle borderstyle = stylelowered!
  594. maskdatatype maskdatatype = datemask!
  595. string mask = "yyyy-mm-dd"
  596. boolean spin = true
  597. end type
  598. event rbuttondown;s_calender_arg s_calender
  599. s_calender.PointerX = THIS.PointerX()
  600. s_calender.PointerY = THIS.PointerY()
  601. s_calender.X = THIS.X
  602. s_calender.Y = THIS.Y
  603. OpenWithParm(w_calendar,s_calender)
  604. THIS.Text = String(id_date_selected)
  605. end event
  606. type pb_em1 from picturebutton within w_cd_main_pc
  607. integer x = 1646
  608. integer y = 180
  609. integer width = 101
  610. integer height = 92
  611. integer taborder = 130
  612. boolean bringtotop = true
  613. integer textsize = -9
  614. integer weight = 400
  615. fontcharset fontcharset = gb2312charset!
  616. fontpitch fontpitch = variable!
  617. string facename = "宋体"
  618. string picturename = "date.BMP"
  619. alignment htextalign = left!
  620. end type
  621. event clicked;em_1.triggerevent(rbuttondown!)
  622. end event
  623. type pb_em2 from picturebutton within w_cd_main_pc
  624. integer x = 2258
  625. integer y = 180
  626. integer width = 101
  627. integer height = 92
  628. integer taborder = 140
  629. boolean bringtotop = true
  630. integer textsize = -9
  631. integer weight = 400
  632. fontcharset fontcharset = gb2312charset!
  633. fontpitch fontpitch = variable!
  634. string facename = "宋体"
  635. string picturename = "date.BMP"
  636. alignment htextalign = left!
  637. end type
  638. event clicked;em_2.triggerevent(rbuttondown!)
  639. end event
  640. type pb_2 from picturebutton within w_cd_main_pc
  641. integer x = 2368
  642. integer y = 180
  643. integer width = 101
  644. integer height = 92
  645. integer taborder = 150
  646. boolean bringtotop = true
  647. integer textsize = -9
  648. integer weight = 400
  649. fontcharset fontcharset = gb2312charset!
  650. fontpitch fontpitch = variable!
  651. string facename = "宋体"
  652. string picturename = "date1.BMP"
  653. alignment htextalign = left!
  654. end type
  655. event clicked;m_Dfc_Control_PopupMenu dmPopupMenu
  656. string menustr
  657. menustr="Text=本日~tEvent=ue_date1"
  658. menustr = menustr + "|" + "Text=本周~tEvent=ue_date2"
  659. menustr = menustr + "|" + "Text=本月~tEvent=ue_date3"
  660. if len(trim(menustr))<>0 then
  661. dmPopupMenu = Create m_Dfc_Control_PopupMenu
  662. dmPopupMenu.mf_BuildMenu(This, menustr)
  663. dmPopupMenu.mf_PopMenu()
  664. Destroy dmPopupMenu
  665. end if
  666. end event
  667. type st_1 from statictext within w_cd_main_pc
  668. integer x = 23
  669. integer y = 200
  670. integer width = 288
  671. integer height = 48
  672. boolean bringtotop = true
  673. integer textsize = -9
  674. integer weight = 400
  675. fontcharset fontcharset = gb2312charset!
  676. fontpitch fontpitch = variable!
  677. string facename = "宋体"
  678. long textcolor = 33554432
  679. long backcolor = 134217739
  680. string text = "订单状态"
  681. alignment alignment = right!
  682. boolean focusrectangle = false
  683. end type
  684. event constructor;this.backcolor = 14215660
  685. end event
  686. type cb_1 from uo_imflatbutton within w_cd_main_pc
  687. integer width = 151
  688. integer height = 164
  689. integer taborder = 10
  690. boolean bringtotop = true
  691. string text = "刷新"
  692. string normalpicname = "refresh.bmp"
  693. integer picsize = 16
  694. toolbaralignment pic_align = alignattop!
  695. boolean border = false
  696. end type
  697. event clicked;call super::clicked;parent.triggerevent('ue_retrieve')
  698. end event
  699. type tab_1 from tab within w_cd_main_pc
  700. integer y = 1152
  701. integer width = 2240
  702. integer height = 1008
  703. integer taborder = 30
  704. boolean bringtotop = true
  705. integer textsize = -9
  706. integer weight = 400
  707. fontcharset fontcharset = gb2312charset!
  708. fontpitch fontpitch = variable!
  709. string facename = "宋体"
  710. long backcolor = 134217739
  711. boolean raggedright = true
  712. boolean focusonbuttondown = true
  713. integer selectedtab = 1
  714. tabpage_1 tabpage_1
  715. tabpage_2 tabpage_2
  716. tabpage_3 tabpage_3
  717. end type
  718. on tab_1.create
  719. this.tabpage_1=create tabpage_1
  720. this.tabpage_2=create tabpage_2
  721. this.tabpage_3=create tabpage_3
  722. this.Control[]={this.tabpage_1,&
  723. this.tabpage_2,&
  724. this.tabpage_3}
  725. end on
  726. on tab_1.destroy
  727. destroy(this.tabpage_1)
  728. destroy(this.tabpage_2)
  729. destroy(this.tabpage_3)
  730. end on
  731. type tabpage_1 from userobject within tab_1
  732. integer x = 18
  733. integer y = 96
  734. integer width = 2203
  735. integer height = 896
  736. long backcolor = 134217739
  737. string text = "附件"
  738. long tabtextcolor = 33554432
  739. long tabbackcolor = 134217739
  740. long picturemaskcolor = 536870912
  741. dw_2 dw_2
  742. end type
  743. on tabpage_1.create
  744. this.dw_2=create dw_2
  745. this.Control[]={this.dw_2}
  746. end on
  747. on tabpage_1.destroy
  748. destroy(this.dw_2)
  749. end on
  750. type dw_2 from datawindow within tabpage_1
  751. integer width = 1961
  752. integer height = 400
  753. integer taborder = 40
  754. string title = "none"
  755. string dataobject = "dw_cd_saletask_edit_fj"
  756. boolean hscrollbar = true
  757. boolean vscrollbar = true
  758. boolean hsplitscroll = true
  759. boolean livescroll = true
  760. borderstyle borderstyle = stylelowered!
  761. end type
  762. event clicked;String ls_name
  763. ls_name = dwo.Name
  764. String Pathname,Filename,FileType
  765. Integer i
  766. Long taskid,printid
  767. oleobject parms
  768. String arg_msg = ''
  769. IF row <= 0 THEN RETURN
  770. IF ls_name = 'b_1' THEN
  771. taskid = dw_2.Object.taskid[row]
  772. printid = dw_2.Object.printid[row]
  773. Filename = dw_2.Object.fjname[row]
  774. Pathname = filename
  775. FileType = '所有图片,*.bmp;*.gif;*.jpg;*.jpeg;*.png;*.wmf'
  776. i = GetFileSaveName("请选择文件", Pathname,Filename, "All", FileType)
  777. IF i = 1 And Trim(Pathname) <> '' And Trim(Filename) <> "" THEN
  778. IF FileExists(Filename) THEN
  779. IF MessageBox('提问', '文件已存在是否要覆盖?', Question!, YesNo!, 1) <> 1 THEN RETURN
  780. END IF
  781. parms = AppCom.CreatePbDictionary()
  782. parms.SetString('token', app_token)
  783. parms.SetInt('taskid', taskid)
  784. parms.SetInt('printid', printid)
  785. parms.SetString('filename', Filename)
  786. AppCom.GetFjData(parms, Ref arg_msg)
  787. IF arg_msg <> '' THEN
  788. MessageBox('ERROR', arg_msg)
  789. RETURN
  790. END IF
  791. END IF
  792. END IF
  793. end event
  794. event rowfocuschanged;this.selectrow(0, false)
  795. if currentrow > 0 then
  796. this.selectrow(currentrow, true)
  797. end if
  798. end event
  799. type tabpage_2 from userobject within tab_1
  800. integer x = 18
  801. integer y = 96
  802. integer width = 2203
  803. integer height = 896
  804. long backcolor = 134217739
  805. string text = "物料清单"
  806. long tabtextcolor = 33554432
  807. long tabbackcolor = 134217739
  808. long picturemaskcolor = 536870912
  809. p_1 p_1
  810. cb_2 cb_2
  811. end type
  812. on tabpage_2.create
  813. this.p_1=create p_1
  814. this.cb_2=create cb_2
  815. this.Control[]={this.p_1,&
  816. this.cb_2}
  817. end on
  818. on tabpage_2.destroy
  819. destroy(this.p_1)
  820. destroy(this.cb_2)
  821. end on
  822. type p_1 from picture within tabpage_2
  823. integer y = 92
  824. integer width = 6231
  825. integer height = 1020
  826. boolean originalsize = true
  827. string picturename = "QQ截图20150626162704.png"
  828. boolean focusrectangle = false
  829. end type
  830. type cb_2 from commandbutton within tabpage_2
  831. integer y = 8
  832. integer width = 279
  833. integer height = 84
  834. integer taborder = 30
  835. integer textsize = -9
  836. integer weight = 400
  837. fontcharset fontcharset = gb2312charset!
  838. fontpitch fontpitch = variable!
  839. string facename = "宋体"
  840. string text = "导入BOM"
  841. end type
  842. type tabpage_3 from userobject within tab_1
  843. integer x = 18
  844. integer y = 96
  845. integer width = 2203
  846. integer height = 896
  847. long backcolor = 134217739
  848. string text = "指令单"
  849. long tabtextcolor = 33554432
  850. long tabbackcolor = 134217739
  851. long picturemaskcolor = 536870912
  852. tab_2 tab_2
  853. dw_3 dw_3
  854. end type
  855. on tabpage_3.create
  856. this.tab_2=create tab_2
  857. this.dw_3=create dw_3
  858. this.Control[]={this.tab_2,&
  859. this.dw_3}
  860. end on
  861. on tabpage_3.destroy
  862. destroy(this.tab_2)
  863. destroy(this.dw_3)
  864. end on
  865. type tab_2 from tab within tabpage_3
  866. integer x = 1303
  867. integer width = 2240
  868. integer height = 1008
  869. integer taborder = 40
  870. integer textsize = -9
  871. integer weight = 400
  872. fontcharset fontcharset = gb2312charset!
  873. fontpitch fontpitch = variable!
  874. string facename = "宋体"
  875. long backcolor = 134217739
  876. boolean raggedright = true
  877. boolean focusonbuttondown = true
  878. integer selectedtab = 1
  879. tabpage_4 tabpage_4
  880. tabpage_5 tabpage_5
  881. end type
  882. on tab_2.create
  883. this.tabpage_4=create tabpage_4
  884. this.tabpage_5=create tabpage_5
  885. this.Control[]={this.tabpage_4,&
  886. this.tabpage_5}
  887. end on
  888. on tab_2.destroy
  889. destroy(this.tabpage_4)
  890. destroy(this.tabpage_5)
  891. end on
  892. type tabpage_4 from userobject within tab_2
  893. integer x = 18
  894. integer y = 96
  895. integer width = 2203
  896. integer height = 896
  897. long backcolor = 134217739
  898. string text = "已安排工作"
  899. long tabtextcolor = 33554432
  900. long tabbackcolor = 134217739
  901. long picturemaskcolor = 536870912
  902. cb_8 cb_8
  903. cb_7 cb_7
  904. cb_6 cb_6
  905. dw_4 dw_4
  906. end type
  907. on tabpage_4.create
  908. this.cb_8=create cb_8
  909. this.cb_7=create cb_7
  910. this.cb_6=create cb_6
  911. this.dw_4=create dw_4
  912. this.Control[]={this.cb_8,&
  913. this.cb_7,&
  914. this.cb_6,&
  915. this.dw_4}
  916. end on
  917. on tabpage_4.destroy
  918. destroy(this.cb_8)
  919. destroy(this.cb_7)
  920. destroy(this.cb_6)
  921. destroy(this.dw_4)
  922. end on
  923. type cb_8 from commandbutton within tabpage_4
  924. integer x = 411
  925. integer width = 183
  926. integer height = 84
  927. integer taborder = 20
  928. integer textsize = -9
  929. integer weight = 400
  930. fontcharset fontcharset = gb2312charset!
  931. fontpitch fontpitch = variable!
  932. string facename = "宋体"
  933. string text = "打印"
  934. end type
  935. type cb_7 from commandbutton within tabpage_4
  936. integer x = 187
  937. integer width = 219
  938. integer height = 84
  939. integer taborder = 20
  940. integer textsize = -9
  941. integer weight = 400
  942. fontcharset fontcharset = gb2312charset!
  943. fontpitch fontpitch = variable!
  944. string facename = "宋体"
  945. string text = "全不选"
  946. end type
  947. type cb_6 from commandbutton within tabpage_4
  948. integer width = 183
  949. integer height = 84
  950. integer taborder = 50
  951. integer textsize = -9
  952. integer weight = 400
  953. fontcharset fontcharset = gb2312charset!
  954. fontpitch fontpitch = variable!
  955. string facename = "宋体"
  956. string text = "全选"
  957. end type
  958. type dw_4 from datawindow within tabpage_4
  959. integer y = 104
  960. integer width = 686
  961. integer height = 400
  962. integer taborder = 40
  963. string title = "none"
  964. string dataobject = "dw_sc_task_wkp_uc"
  965. boolean hscrollbar = true
  966. boolean vscrollbar = true
  967. boolean hsplitscroll = true
  968. boolean livescroll = true
  969. borderstyle borderstyle = stylelowered!
  970. end type
  971. type tabpage_5 from userobject within tab_2
  972. integer x = 18
  973. integer y = 96
  974. integer width = 2203
  975. integer height = 896
  976. long backcolor = 134217739
  977. string text = "待安排工作"
  978. long tabtextcolor = 33554432
  979. long tabbackcolor = 134217739
  980. long picturemaskcolor = 536870912
  981. cb_5 cb_5
  982. cb_4 cb_4
  983. cb_3 cb_3
  984. dw_5 dw_5
  985. end type
  986. on tabpage_5.create
  987. this.cb_5=create cb_5
  988. this.cb_4=create cb_4
  989. this.cb_3=create cb_3
  990. this.dw_5=create dw_5
  991. this.Control[]={this.cb_5,&
  992. this.cb_4,&
  993. this.cb_3,&
  994. this.dw_5}
  995. end on
  996. on tabpage_5.destroy
  997. destroy(this.cb_5)
  998. destroy(this.cb_4)
  999. destroy(this.cb_3)
  1000. destroy(this.dw_5)
  1001. end on
  1002. type cb_5 from commandbutton within tabpage_5
  1003. integer x = 411
  1004. integer width = 274
  1005. integer height = 84
  1006. integer taborder = 10
  1007. integer textsize = -9
  1008. integer weight = 400
  1009. fontcharset fontcharset = gb2312charset!
  1010. fontpitch fontpitch = variable!
  1011. string facename = "宋体"
  1012. string text = "新建派工"
  1013. end type
  1014. type cb_4 from commandbutton within tabpage_5
  1015. integer x = 187
  1016. integer width = 219
  1017. integer height = 84
  1018. integer taborder = 10
  1019. integer textsize = -9
  1020. integer weight = 400
  1021. fontcharset fontcharset = gb2312charset!
  1022. fontpitch fontpitch = variable!
  1023. string facename = "宋体"
  1024. string text = "全不选"
  1025. end type
  1026. type cb_3 from commandbutton within tabpage_5
  1027. integer width = 183
  1028. integer height = 84
  1029. integer taborder = 40
  1030. integer textsize = -9
  1031. integer weight = 400
  1032. fontcharset fontcharset = gb2312charset!
  1033. fontpitch fontpitch = variable!
  1034. string facename = "宋体"
  1035. string text = "全选"
  1036. end type
  1037. type dw_5 from datawindow within tabpage_5
  1038. integer y = 96
  1039. integer width = 686
  1040. integer height = 400
  1041. integer taborder = 40
  1042. string title = "none"
  1043. string dataobject = "dw_sc_task_wkp_notplan_index"
  1044. boolean hscrollbar = true
  1045. boolean vscrollbar = true
  1046. boolean hsplitscroll = true
  1047. boolean livescroll = true
  1048. borderstyle borderstyle = stylelowered!
  1049. end type
  1050. type dw_3 from datawindow within tabpage_3
  1051. integer width = 1285
  1052. integer height = 640
  1053. integer taborder = 40
  1054. string title = "none"
  1055. string dataobject = "dw_order_ml_zlmx"
  1056. boolean hscrollbar = true
  1057. boolean vscrollbar = true
  1058. boolean hsplitscroll = true
  1059. boolean livescroll = true
  1060. borderstyle borderstyle = stylelowered!
  1061. end type
  1062. type cb_9 from uo_imflatbutton within w_cd_main_pc
  1063. integer x = 302
  1064. integer width = 274
  1065. integer height = 164
  1066. integer taborder = 20
  1067. boolean bringtotop = true
  1068. string text = "店铺管理"
  1069. toolbaralignment pic_align = alignattop!
  1070. boolean border = false
  1071. end type
  1072. event clicked;call super::clicked;open(w_cd_custs)
  1073. end event
  1074. type ln_1 from line within w_cd_main_pc
  1075. long linecolor = 268435456
  1076. integer linethickness = 4
  1077. integer beginx = -18
  1078. integer beginy = 168
  1079. integer endx = 1998
  1080. integer endy = 168
  1081. end type
  1082. type ln_2 from line within w_cd_main_pc
  1083. long linecolor = 16777215
  1084. integer linethickness = 4
  1085. integer beginx = -18
  1086. integer beginy = 172
  1087. integer endx = 2030
  1088. integer endy = 172
  1089. end type