FrmSaleBillUpdate.xml 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580
  1. <?xml version="1.0" encoding="utf-8" ?>
  2. <Forms>
  3. <Form Name="FrmSaleBillUpdate">
  4. <Client>
  5. <Events>
  6. <Load>
  7. <![CDATA[
  8. @Title="销货单状态更新";
  9. GetSchema();
  10. ChangeMode("Search");
  11. Search("SearchTransBackForSaleBill");
  12. Search("SearchRespiteForDG");
  13. ]]></Load>
  14. <Closing>
  15. ;
  16. </Closing>
  17. <Closed>
  18. ;
  19. </Closed>
  20. </Events>
  21. <Mode>
  22. <Search>
  23. <Lable name="Search"/>
  24. </Search>
  25. <View>
  26. <Lable name="View" />
  27. </View>
  28. <Modify>
  29. <Lable name="Modify" />
  30. </Modify>
  31. </Mode>
  32. <Controls>
  33. <IKTextButton name="tbCustomerNo" DataSource="SaleBillUpdate.No_Customer">
  34. <Events>
  35. <Enter><![CDATA[
  36. Empty();
  37. if(dtStart.Checked==true)
  38. @StartTime = dtStart.CValue;
  39. else
  40. @StartTime = DBNull();
  41. if(dtEnd.Checked==true)
  42. @EndTime = dtEnd.CValue;
  43. else
  44. @EndTime = DBNull();
  45. @Assess = cbAssess.Text;
  46. @Good = cbGood.Text;
  47. @Check = cbCheck.Text;
  48. @TransBack = cbTransBack.Text;
  49. if(!Search("SearchSaleBillList", tbCustomerNo.CValue, txtShortName.CValue, @StartTime, @EndTime,@Assess,@Good,@Check,@TransBack,GetRight("客户基本资料","全权查看")?DBNull():GetLoginUserID()))
  50. Empty("#SaleBill");
  51. else
  52. ChangeMode("Modify");
  53. ]]></Enter>
  54. <Click>
  55. @temp = ShowSearchBox("CustomerSearch","INFOMATION",tbCustomerNo.CValue);
  56. if( @temp == "" )
  57. return;
  58. tbCustomerNo.CValue = @temp;
  59. </Click>
  60. </Events>
  61. </IKTextButton>
  62. <IKTextBox name="txtShortName" DataSource="SaleBillUpdate.ShortName_Customer">
  63. <Events>
  64. <Enter><![CDATA[
  65. Empty();
  66. if(dtStart.Checked==true)
  67. @StartTime = dtStart.CValue;
  68. else
  69. @StartTime = DBNull();
  70. if(dtEnd.Checked==true)
  71. @EndTime = dtEnd.CValue;
  72. else
  73. @EndTime = DBNull();
  74. @Assess = cbAssess.Text;
  75. @Good = cbGood.Text;
  76. @Check = cbCheck.Text;
  77. @TransBack = cbTransBack.Text;
  78. if(!Search("SearchSaleBillList", tbCustomerNo.CValue, txtShortName.CValue, @StartTime, @EndTime,@Assess,@Good,@Check,@TransBack,GetRight("客户基本资料","全权查看")?DBNull():GetLoginUserID()))
  79. Empty("#SaleBill");
  80. else
  81. ChangeMode("Modify");
  82. ]]></Enter>
  83. </Events>
  84. </IKTextBox>
  85. <IKDateTimePicker name="dtStart" DataSource="SaleBillUpdate.StartTime"/>
  86. <IKDateTimePicker name="dtEnd" DataSource="SaleBillUpdate.EndTime"/>
  87. <IKComboBoxEx name="cbAssess" >
  88. <Events>
  89. <Enter><![CDATA[
  90. Empty();
  91. if(dtStart.Checked==true)
  92. @StartTime = dtStart.CValue;
  93. else
  94. @StartTime = DBNull();
  95. if(dtEnd.Checked==true)
  96. @EndTime = dtEnd.CValue;
  97. else
  98. @EndTime = DBNull();
  99. @Assess = cbAssess.Text;
  100. @Good = cbGood.Text;
  101. @Check = cbCheck.Text;
  102. @TransBack = cbTransBack.Text;
  103. if(!Search("SearchSaleBillList", tbCustomerNo.CValue, txtShortName.CValue, @StartTime, @EndTime,@Assess,@Good,@Check,@TransBack,GetRight("客户基本资料","全权查看")?DBNull():GetLoginUserID()))
  104. Empty("#SaleBill");
  105. else
  106. ChangeMode("Modify");
  107. ]]></Enter>
  108. </Events>
  109. </IKComboBoxEx>
  110. <IKComboBoxEx name="cbGood" DisplaySource="SaleBillUpdate.OutStatus_SaleBill" DataSource="RespiteForSaleBill" DisplayMember="Result">
  111. <Events>
  112. <Reload>
  113. UpdateForm(false, "cbGood");
  114. Search("SearchRespiteForSaleBill");
  115. UpdateForm(true, "cbGood");
  116. </Reload>
  117. <Enter><![CDATA[
  118. Empty();
  119. if(dtStart.Checked==true)
  120. @StartTime = dtStart.CValue;
  121. else
  122. @StartTime = DBNull();
  123. if(dtEnd.Checked==true)
  124. @EndTime = dtEnd.CValue;
  125. else
  126. @EndTime = DBNull();
  127. @Assess = cbAssess.Text;
  128. @Good = cbGood.Text;
  129. @Check = cbCheck.Text;
  130. @TransBack = cbTransBack.Text;
  131. if(!Search("SearchSaleBillList", tbCustomerNo.CValue, txtShortName.CValue, @StartTime, @EndTime,@Assess,@Good,@Check,@TransBack,GetRight("客户基本资料","全权查看")?DBNull():GetLoginUserID()))
  132. Empty("#SaleBill");
  133. else
  134. ChangeMode("Modify");
  135. ]]></Enter>
  136. </Events>
  137. </IKComboBoxEx>
  138. <IKComboBoxEx name="cbCheck" >
  139. <Events>
  140. <Enter><![CDATA[
  141. Empty();
  142. if(dtStart.Checked==true)
  143. @StartTime = dtStart.CValue;
  144. else
  145. @StartTime = DBNull();
  146. if(dtEnd.Checked==true)
  147. @EndTime = dtEnd.CValue;
  148. else
  149. @EndTime = DBNull();
  150. @Assess = cbAssess.Text;
  151. @Good = cbGood.Text;
  152. @Check = cbCheck.Text;
  153. @TransBack = cbTransBack.Text;
  154. if(!Search("SearchSaleBillList", tbCustomerNo.CValue, txtShortName.CValue, @StartTime, @EndTime,@Assess,@Good,@Check,@TransBack,GetRight("客户基本资料","全权查看")?DBNull():GetLoginUserID()))
  155. Empty("#SaleBill");
  156. else
  157. ChangeMode("Modify");
  158. ]]></Enter>
  159. </Events>
  160. </IKComboBoxEx>
  161. <IKComboBoxEx name="cbTransBack" >
  162. <Events>
  163. <Enter><![CDATA[
  164. Empty();
  165. if(dtStart.Checked==true)
  166. @StartTime = dtStart.CValue;
  167. else
  168. @StartTime = DBNull();
  169. if(dtEnd.Checked==true)
  170. @EndTime = dtEnd.CValue;
  171. else
  172. @EndTime = DBNull();
  173. @Assess = cbAssess.Text;
  174. @Good = cbGood.Text;
  175. @Check = cbCheck.Text;
  176. @TransBack = cbTransBack.Text;
  177. if(!Search("SearchSaleBillList", tbCustomerNo.CValue, txtShortName.CValue, @StartTime, @EndTime,@Assess,@Good,@Check,@TransBack,GetRight("客户基本资料","全权查看")?DBNull():GetLoginUserID()))
  178. Empty("#SaleBill");
  179. else
  180. ChangeMode("Modify");
  181. ]]></Enter>
  182. </Events>
  183. </IKComboBoxEx>
  184. <IKDataGridEx name="dgSaleBillUpdate" DataSource="SaleBill" TableStyleIndex="0">
  185. <DataColumn Index="0" DataSource="SaleBill.No_SaleBill"/>
  186. <DataColumn Index="1" DataSource="SaleBill.Date_SaleBill"/>
  187. <DataColumn Index="2" DataSource="SaleBill.No_Customer"/>
  188. <DataColumn Index="3" DataSource="SaleBill.ShortName_Customer"/>
  189. <DataColumn Index="4" DataSource="SaleBill.IsGeneric"/>
  190. <DataColumn Index="5" DataSource="SaleBill.GetMethod_SaleBill"/>
  191. <DataColumn Index="6" DataSource="SaleBill.TransBack">
  192. <IKDataGridComboBoxColumn DisplaySourceEx="SaleBill.TransBack" ValueSourceEx="SaleBill.TransBack_SaleBill" DataSourceEx="TransBackForSaleBill" DisplayMemberEx="Result" ValueMemberEx="TransBack">
  193. <Events>
  194. <Reload>
  195. Search("SearchTransBackForSaleBill");
  196. SetDataGridColumnDataSource(6,"dgSaleBillUpdate");
  197. </Reload>
  198. </Events>
  199. </IKDataGridComboBoxColumn>
  200. </DataColumn>
  201. <DataColumn Index="7" DataSource="SaleBill.TransBackDate_SaleBill"/>
  202. <DataColumn Index="8" DataSource="SaleBill.Assess"/>
  203. <DataColumn Index="9" DataSource="SaleBill.Status"/>
  204. <DataColumn Index="10" DataSource="SaleBill.OutStatus_SaleBill">
  205. <IKDataGridComboBoxColumn DisplaySourceEx="SaleBill.OutStatus_SaleBill" ValueSourceEx="SaleBill.OutStatus_SaleBill" DataSourceEx="RespiteForDG" DisplayMemberEx="Result" ValueMemberEx="Result">
  206. <Events>
  207. <Reload>
  208. Search("SearchRespiteForDG");
  209. SetDataGridColumnDataSource(10,"dgSaleBillUpdate");
  210. </Reload>
  211. </Events>
  212. </IKDataGridComboBoxColumn>
  213. </DataColumn>
  214. </IKDataGridEx>
  215. <IKButton name="btnSearch">
  216. <Events>
  217. <Click><![CDATA[
  218. Empty();
  219. if(dtStart.Checked==true)
  220. @StartTime = dtStart.CValue;
  221. else
  222. @StartTime = DBNull();
  223. if(dtEnd.Checked==true)
  224. @EndTime = dtEnd.CValue;
  225. else
  226. @EndTime = DBNull();
  227. @Assess = cbAssess.Text;
  228. @Good = cbGood.Text;
  229. @Check = cbCheck.Text;
  230. @TransBack = cbTransBack.Text;
  231. if(!Search("SearchSaleBillList", tbCustomerNo.CValue, txtShortName.CValue, @StartTime, @EndTime,@Assess,@Good,@Check,@TransBack,GetRight("客户基本资料","全权查看")?DBNull():GetLoginUserID()))
  232. Empty("#SaleBill");
  233. else
  234. ChangeMode("Modify");
  235. ]]></Click>
  236. </Events>
  237. </IKButton>
  238. <IKFormToolBar name="toolBar">
  239. <Events>
  240. <ClickPrint>
  241. PrintReport();
  242. </ClickPrint>
  243. <ClickEmpty>
  244. ChangeMode("Search");
  245. </ClickEmpty>
  246. <ClickSubmit>
  247. Update();
  248. ChangeMode("View");
  249. </ClickSubmit>
  250. </Events>
  251. </IKFormToolBar>
  252. </Controls>
  253. <Tables>
  254. <Table name="SaleBill">
  255. <Events>
  256. <ColumnsChanged>
  257. <TransBack>
  258. if(#SaleBill.TransBack=="是")
  259. {
  260. if(Equals(#SaleBill.TransBackDate_SaleBill,DBNull()) || Equals(#SaleBill.TransBackDate_SaleBill,""))
  261. {
  262. SetCurrentColoumn("#SaleBill.TransBackDate_SaleBill",DateTimeNow());
  263. }
  264. dgSaleBillUpdate.SetDefaultSelectedColoumn("TransBack", "是", false);
  265. dgSaleBillUpdate.SetDefaultSelectedColoumn("TransBack_SaleBill", 1, false);
  266. dgSaleBillUpdate.SetDefaultSelectedColoumn("TransBackDate_SaleBill", DateTimeNow(), true);
  267. }
  268. else
  269. {
  270. SetCurrentColoumn("#SaleBill.TransBackDate_SaleBill",DBNull());
  271. dgSaleBillUpdate.SetDefaultSelectedColoumn("TransBack", "否", false);
  272. dgSaleBillUpdate.SetDefaultSelectedColoumn("TransBack_SaleBill", 0, false);
  273. dgSaleBillUpdate.SetDefaultSelectedColoumn("TransBackDate_SaleBill", DBNull(), false);
  274. }
  275. </TransBack>
  276. </ColumnsChanged>
  277. </Events>
  278. </Table>
  279. </Tables>
  280. <LogInfomation LogNO="销货单#SaleBill.No_SaleBill" RecordFormField="" RecordDataGridField="#SaleBill.No_SaleBill,#SaleBill.TransBackDate_SaleBill,#SaleBill.OutStatus_SaleBill"/>
  281. <ChildForms>
  282. <ChildForm name="CustomerSearch" DataSource="Customer" SearchFunction="SearchAllCustomer" SearchFunctionCondition="SearchCustomerCondition" SearchFunctionByNo="" MappingName="客户">
  283. <DataColumn Index="0" MappingName="#Customer.No_Customer" HeaderText="客户编号" Width="90" ColumnType="IKDataGridTextBoxColumn"/>
  284. <DataColumn Index="1" MappingName="#Customer.ShortName_Customer" HeaderText="客户简称" Width="90" ColumnType="IKDataGridTextBoxColumn"/>
  285. <DataColumn Index="2" MappingName="#Customer.Type_Customer" HeaderText="客户类型" Width="75" ColumnType="IKDataGridTextBoxColumn"/>
  286. <DataColumn Index="3" MappingName="#Customer.Level_Customer" HeaderText="客户等级" Width="75" ColumnType="IKDataGridTextBoxColumn"/>
  287. <DataColumn Index="4" MappingName="#Customer.IsGeneric_Customer" HeaderText="一般客户" Width="75" ColumnType="IKDataGridBoolColumn"/>
  288. </ChildForm>
  289. </ChildForms>
  290. <FormatString>
  291. <Format name="SearchCustomerCondition">
  292. if(GetRight("客户基本资料","全权查看"))
  293. {
  294. FormatString("");
  295. }
  296. else
  297. {
  298. FormatString(" Customer.ID_Creator='{0}' ",GetLoginUserID());
  299. }
  300. </Format>
  301. </FormatString>
  302. </Client>
  303. <Server>
  304. <Tables>
  305. <Table name="SaleBill" Type="Parent">
  306. <GetSchema CmdType="Text" CmdText="
  307. SELECT TOP 0 SaleBill.ID_SaleBill, SaleBill.No_SaleBill, SaleBill.Date_SaleBill,SaleBill.OutStatus_SaleBill,SaleBill.TransBack_SaleBill,SaleBill.Assess_SaleBill,SaleBill.ID_Assessor, Customer.No_Customer,
  308. Customer.ShortName_Customer,
  309. SaleBill.TransBackDate_SaleBill,'' as Assess, '' as TransBack,
  310. '' as Status,Getdate() as StartTime, Getdate() as EndTime , Customer.IsGeneric_Customer,SaleBill.GetMethod_SaleBill,'' as IsGeneric
  311. FROM SaleBill LEFT JOIN Customer ON Customer.ID_Customer = SaleBill.ID_Customer
  312. "/>
  313. <Update CmdType="Text" CmdText=" UPDATE SaleBill
  314. SET TransBack_SaleBill = @TransBack_SaleBill,
  315. TransBackDate_SaleBill = @TransBackDate_SaleBill,
  316. OutStatus_SaleBill = @OutStatus_SaleBill
  317. WHERE ID_SaleBill = @ID_SaleBill">
  318. <Params>
  319. <Param name="@ID_SaleBill" type="SaleBill.ID_SaleBill" sourceColumn="ID_SaleBill" />
  320. <Param name="@TransBack_SaleBill" type="SaleBill.TransBack_SaleBill" sourceColumn="TransBack_SaleBill" />
  321. <Param name="@TransBackDate_SaleBill" type="SaleBill.TransBackDate_SaleBill" sourceColumn="TransBackDate_SaleBill" />
  322. <Param name="@OutStatus_SaleBill" type="SaleBill.OutStatus_SaleBill" sourceColumn="OutStatus_SaleBill" />
  323. </Params>
  324. </Update>
  325. </Table>
  326. <Table name="SaleBillUpdate" Type="Other">
  327. <GetSchema CmdType="Text" CmdText="
  328. SELECT TOP 0 SaleBill.ID_SaleBill, SaleBill.No_SaleBill, SaleBill.Date_SaleBill,SaleBill.OutStatus_SaleBill,SaleBill.TransBack_SaleBill,SaleBill.Assess_SaleBill,SaleBill.ID_Assessor, Customer.No_Customer,
  329. Customer.ShortName_Customer,
  330. SaleBill.TransBackDate_SaleBill,'' as Assess, '' as TransBack,
  331. '' as Status,Getdate() as StartTime, Getdate() as EndTime , Customer.IsGeneric_Customer,SaleBill.GetMethod_SaleBill,'' as IsGeneric
  332. FROM SaleBill LEFT JOIN Customer ON Customer.ID_Customer = SaleBill.ID_Customer
  333. "/>
  334. </Table>
  335. </Tables>
  336. <Search>
  337. <SearchSaleBillList CmdType="Text" CmdText=" declare @cmd nvarchar(4000)
  338. declare @string nvarchar(1000)
  339. set @cmd =
  340. N' SELECT SaleBill.ID_SaleBill, SaleBill.No_SaleBill, SaleBill.Date_SaleBill,SaleBill.OutStatus_SaleBill,SaleBill.TransBack_SaleBill,SaleBill.Assess_SaleBill,SaleBill.ID_Assessor, Customer.No_Customer,'
  341. +N' Customer.ShortName_Customer, case SaleBill.TransBack_SaleBill when 0 then '+nchar(39)+N'否'+nchar(39)+N' else '+nchar(39)+N'是'+nchar(39)+N' end as TransBack,'
  342. +N' SaleBill.TransBackDate_SaleBill,'
  343. +N' case SaleBill.Assess_SaleBill when 0 then '+nchar(39)+N'否'+nchar(39)+N' else '+nchar(39)+N'是'+nchar(39)+N' end as Assess, '
  344. +N' case isnull(DATALENGTH(ID_Assessor),0) when 0 then case Disable_SaleBill when 1 then '+nchar(39)+N'作废'+nchar(39)+N' else '+nchar(39)+N'未审核'+nchar(39)+N' end else '+nchar(39)+N'已审核'+nchar(39)+N' end as Status, '
  345. +N' case Customer.IsGeneric_Customer when 0 then '+nchar(39)+N'否'+nchar(39)+N' else '+nchar(39)+N'是'+nchar(39)+N' end as IsGeneric ,'
  346. +N' SaleBill.GetMethod_SaleBill '
  347. +N' FROM SaleBill '
  348. +N' LEFT JOIN Customer ON Customer.ID_Customer = SaleBill.ID_Customer '
  349. begin
  350. set @string = N' where '
  351. end
  352. --set @string = @string +N' SaleBill.Disable_SaleBill=''0'''
  353. if(@StartTime is not null)
  354. begin
  355. if(DATALENGTH(@string) != 14)
  356. begin
  357. set @string = @string + ' and '
  358. end
  359. set @string = @string + N'SaleBill.Date_SaleBill &gt; DATEADD(day, DATEDIFF(day,0,'+nchar(39)+convert(nvarchar,@StartTime) +nchar(39)+N'), 0) '
  360. end
  361. if(@EndTime is not null)
  362. begin
  363. if(DATALENGTH(@string) != 14)
  364. begin
  365. set @string = @string + ' and '
  366. end
  367. set @string = @string +N' SaleBill.Date_SaleBill &lt; DATEADD(day, DATEDIFF(day,0,'+nchar(39)+convert(nvarchar,@EndTime) +nchar(39)+N'), 1) '
  368. end
  369. if(@No_Customer != '')
  370. begin
  371. if(DATALENGTH(@string) != 14)
  372. begin
  373. set @string = @string + ' and '
  374. end
  375. set @string = @string+N' Customer.No_Customer = ' + nchar(39) +@No_Customer+nchar(39)
  376. end
  377. if (@ShortName_Customer != '')
  378. begin
  379. if(DATALENGTH(@string) != 14)
  380. begin
  381. set @string = @string + ' and '
  382. end
  383. set @string = @string+N' Customer.ShortName_Customer = ' + nchar(39) +@ShortName_Customer+nchar(39)
  384. end
  385. if(@Assess != '' and @Assess!='全部')
  386. begin
  387. if(DATALENGTH(@string) != 14)
  388. begin
  389. set @string = @string + ' and '
  390. end
  391. if(@Assess = '已审核')
  392. set @string = @string+N' SaleBill.ID_Assessor is not null '
  393. else if(@Assess = '未审核')
  394. set @string = @string+N' SaleBill.ID_Assessor is null and SaleBill.Disable_SaleBill=''0'''
  395. end
  396. if(@Good != '' and @Good !='全部')
  397. begin
  398. if(DATALENGTH(@string) != 14)
  399. begin
  400. set @string = @string + ' and '
  401. end
  402. set @string = @string+N' SaleBill.OutStatus_SaleBill = '+ nchar(39) +@Good+nchar(39)
  403. end
  404. if(@Check != '' and @Check != '全部')
  405. begin
  406. if(DATALENGTH(@string) != 14)
  407. begin
  408. set @string = @string + ' and '
  409. end
  410. if(@Check = '未经财务复核')
  411. set @string = @string+N' SaleBill.Assess_SaleBill = 0 '
  412. else if(@Check = '已财务复核')
  413. set @string = @string+N' SaleBill.Assess_SaleBill = 1 '
  414. end
  415. if(@TransBack != '' and @TransBack != '全部')
  416. begin
  417. if(DATALENGTH(@string) != 14)
  418. begin
  419. set @string = @string + ' and '
  420. end
  421. if(@TransBack = '未回传')
  422. set @string = @string+N' SaleBill.TransBack_SaleBill = 0 '
  423. else if(@TransBack = '已回传')
  424. set @string = @string+N' SaleBill.TransBack_SaleBill = 1 '
  425. end
  426. if(@Right is not null)
  427. begin
  428. if(DATALENGTH(@string) != 14)
  429. begin
  430. set @string = @string + ' and '
  431. end
  432. set @string = @string +N' Customer.ID_Creator= '+nchar(39)+Convert(nvarchar(64),@Right)+nchar(39)
  433. end
  434. if(DATALENGTH(@string) = 14)
  435. begin
  436. set @string = ''
  437. end
  438. set @cmd = @cmd + @string
  439. EXECUTE sp_executesql @cmd
  440. Return
  441. ">
  442. <Params>
  443. <Param name="@No_Customer" type="SaleBill.No_Customer" Index="0"/>
  444. <Param name="@ShortName_Customer" type="SaleBill.ShortName_Customer" Index="1"/>
  445. <Param name="@StartTime" type="SaleBill.Date_SaleBill" Index="2"/>
  446. <Param name="@EndTime" type="SaleBill.Date_SaleBill" Index="3"/>
  447. <Param name="@Assess" type="SaleBill.No_SaleRtnBill" Index="4"/>
  448. <Param name="@Good" type="SaleBill.No_Supplier" Index="5"/>
  449. <Param name="@Check" type="SaleBill.No_Product" Index="6"/>
  450. <Param name="@TransBack" type="SaleBill.No_Location" Index="7"/>
  451. <Param name="@Right" type="SaleBill.ID_Customer" Index="8" />
  452. </Params>
  453. <Tables>
  454. <Table name="SaleBill"/>
  455. </Tables>
  456. </SearchSaleBillList>
  457. <SearchTransBackForSaleBill CmdType="Text" CmdText=" CREATE TABLE TransBackForSaleBill
  458. (
  459. [Type] nvarchar(64),
  460. TransBack bit
  461. )
  462. INSERT INTO TransBackForSaleBill([Type],TransBack) VALUES ('是',1)
  463. INSERT INTO TransBackForSaleBill([Type],TransBack) VALUES ('否',0)
  464. SELECT Type AS Result,TransBack FROM TransBackForSaleBill
  465. DROP TABLE TransBackForSaleBill">
  466. <Tables>
  467. <Table name="TransBackForSaleBill" />
  468. </Tables>
  469. </SearchTransBackForSaleBill>
  470. <SearchRespiteForSaleBill CmdType="Text" CmdText=" select '全部' as Result
  471. Union
  472. SELECT Name_TypeDef as Result FROM TypeDef WHERE Type_TypeDef=0
  473. ">
  474. <Tables>
  475. <Table name="RespiteForSaleBill" />
  476. </Tables>
  477. </SearchRespiteForSaleBill>
  478. <SearchRespiteForDG CmdType="Text" CmdText="
  479. SELECT Name_TypeDef as Result FROM TypeDef WHERE Type_TypeDef=0
  480. ">
  481. <Tables>
  482. <Table name="RespiteForDG" />
  483. </Tables>
  484. </SearchRespiteForDG>
  485. <SearchAllCustomer CmdType="Text" CmdText="SELECT Customer.No_Customer,Customer.ShortName_Customer,Customer.Type_Customer,Customer.Level_Customer,Customer.IsGeneric_Customer FROM Customer ">
  486. <Tables>
  487. <Table name="AllCustomer" />
  488. </Tables>
  489. </SearchAllCustomer>
  490. </Search>
  491. </Server>
  492. <Lables>
  493. <Search>
  494. Empty();
  495. NewInstance("#SaleBillUpdate");
  496. tbCustomerNo.ReadOnly = false;
  497. txtShortName.ReadOnly = false;
  498. tbCustomerNo.CValue = StringEmpty();
  499. txtShortName.CValue = StringEmpty();
  500. dtStart.Enabled = true;
  501. dtEnd.Enabled = true;
  502. cbAssess.Enabled = true;
  503. cbGood.Enabled = true;
  504. cbCheck.Enabled = true;
  505. cbTransBack.Enabled = true;
  506. dgSaleBillUpdate.ReadOnly = true;
  507. </Search>
  508. <View>
  509. tbCustomerNo.ReadOnly = true;
  510. txtShortName.ReadOnly = true;
  511. dgSaleBillUpdate.ReadOnly = true;
  512. cbAssess.Enabled = false;
  513. cbGood.Enabled = false;
  514. cbCheck.Enabled = false;
  515. cbTransBack.Enabled = false;
  516. dtStart.Enabled = false;
  517. dtEnd.Enabled = false;
  518. </View>
  519. <Modify>
  520. dgSaleBillUpdate.ReadOnly = false;
  521. cbAssess.Enabled = true;
  522. cbGood.Enabled = true;
  523. cbCheck.Enabled = true;
  524. cbTransBack.Enabled = true;
  525. dtStart.Enabled = true;
  526. dtEnd.Enabled = true;
  527. tbCustomerNo.ReadOnly = false;
  528. txtShortName.ReadOnly = false;
  529. dgSaleBillUpdate.AllowNew(false);
  530. dgSaleBillUpdate.AllowDelete(false);
  531. </Modify>
  532. </Lables>
  533. </Form>
  534. </Forms>