FrmCustomerRegInfoSearch.xml 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <Forms>
  3. <Form Name="FrmCustomerRegInfoSearch">
  4. <Client>
  5. <Events>
  6. <Load>
  7. <![CDATA[
  8. @Title="客户需求商品查询";
  9. GetSchema();
  10. ChangeMode("Search");
  11. Empty();
  12. NewInstance();
  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. </Mode>
  26. <Controls>
  27. <IKTextButton name="txtBillNo1">
  28. <Events>
  29. <Click>
  30. @temp = ShowSearchBox("BillSearch","NODEPOT", "txtBillNo1",txtBillNo1.CValue);
  31. if(@temp == "" )
  32. return;
  33. txtBillNo1.CValue = @temp;
  34. </Click>
  35. <TextBoxButtonTextChanged>
  36. txtBillNo2.CValue = txtBillNo1.CValue;
  37. </TextBoxButtonTextChanged>
  38. </Events>
  39. </IKTextButton>
  40. <IKTextButton name="txtBillNo2">
  41. <Events>
  42. <Click>
  43. @temp = ShowSearchBox("BillSearch","NODEPOT", "txtBillNo2",txtBillNo2.CValue);
  44. if(@temp == "" )
  45. return;
  46. txtBillNo2.CValue = @temp;
  47. </Click>
  48. </Events>
  49. </IKTextButton>
  50. <IKTextButton name="tbProduct1">
  51. <Events>
  52. <Click>
  53. @temp = ShowSearchBox("ProductSearch","INFOMATION",tbProduct1.CValue);
  54. if( @temp == "" )
  55. return;
  56. tbProduct1.CValue = @temp;
  57. </Click>
  58. <TextBoxButtonTextChanged>
  59. tbProduct2.CValue = tbProduct1.CValue;
  60. </TextBoxButtonTextChanged>
  61. </Events>
  62. </IKTextButton>
  63. <IKTextButton name="tbProduct2">
  64. <Events>
  65. <Click>
  66. @temp = ShowSearchBox("ProductSearch","INFOMATION",tbProduct2.CValue);
  67. if( @temp == "" )
  68. return;
  69. tbProduct2.CValue = @temp;
  70. </Click>
  71. </Events>
  72. </IKTextButton>
  73. <IKTextButton name="tbCustomerNo1">
  74. <Events>
  75. <Click>
  76. @temp = ShowSearchBox("CustomerSearch","INFOMATION",tbCustomerNo1.CValue);
  77. if( @temp == "" )
  78. return;
  79. tbCustomerNo1.CValue = @temp;
  80. </Click>
  81. <TextBoxButtonTextChanged>
  82. tbCustomerNo2.CValue = tbCustomerNo1.CValue;
  83. </TextBoxButtonTextChanged>
  84. </Events>
  85. </IKTextButton>
  86. <IKTextButton name="tbCustomerNo2">
  87. <Events>
  88. <Click>
  89. @temp = ShowSearchBox("CustomerSearch","INFOMATION",tbCustomerNo2.CValue);
  90. if( @temp == "" )
  91. return;
  92. tbCustomerNo2.CValue = @temp;
  93. </Click>
  94. </Events>
  95. </IKTextButton>
  96. <IKDateTimePicker name = "dtStart">
  97. <Events>
  98. <CheckedChanged>
  99. dtEnd.Checked = dtStart.Checked;
  100. </CheckedChanged>
  101. <ValueChanged>
  102. dtEnd.CValue = dtStart.CValue;
  103. </ValueChanged>
  104. </Events>
  105. </IKDateTimePicker>
  106. <IKComboBoxEx name="cbMaterial" DisplaySource="UI.Material_CustomerReqProduct" NoSource="UI.Material_CustomerReqProduct" DataSource="Material" DisplayMember="Material_CustomerReqProduct" NoMember="Material_CustomerReqProduct">
  107. <Events>
  108. <Reload>
  109. UpdateForm(false, "cbMaterial");
  110. Search("SearchMaterial");
  111. UpdateForm(true, "cbMaterial");
  112. </Reload>
  113. </Events>
  114. </IKComboBoxEx>
  115. <IKComboBoxEx name="cbManuMethod" DisplaySource="UI.ManuMethod_CustomerReqProduct" NoSource="UI.ManuMethod_CustomerReqProduct" DataSource="ManuMethod" DisplayMember="ManuMethod_CustomerReqProduct" NoMember="ManuMethod_CustomerReqProduct">
  116. <Events>
  117. <Reload>
  118. UpdateForm(false, "cbManuMethod");
  119. Search("SearchManuMethod");
  120. UpdateForm(true, "cbManuMethod");
  121. </Reload>
  122. </Events>
  123. </IKComboBoxEx>
  124. <IKComboBoxEx name="cbProcess" DisplaySource="UI.Process_CustomerReqProduct" NoSource="UI.Process_CustomerReqProduct" DataSource="Process" DisplayMember="Process_CustomerReqProduct" NoMember="Process_CustomerReqProduct">
  125. <Events>
  126. <Reload>
  127. UpdateForm(false, "cbProcess");
  128. Search("SearchProcess");
  129. UpdateForm(true, "cbProcess");
  130. </Reload>
  131. </Events>
  132. </IKComboBoxEx>
  133. <IKExtendGrid name="dgProduct" DataSource="Total" TableStyleIndex="0">
  134. <DataColumn Index="0" DataSource="Total.No_CustomerReqProduct"/>
  135. <DataColumn Index="1" DataSource="Total.Name_CustomerReqProduct"/>
  136. <DataColumn Index="2" DataSource="Total.Quantity_CustomerReqProduct"/>
  137. <DataColumn Index="3" DataSource="Total.Price_CustomerReqProduct"/>
  138. <DataColumn Index="4" DataSource="Total.Unit_CustomerReqProduct"/>
  139. <DataColumn Index="5" DataSource="Total.Material_CustomerReqProduct"/>
  140. <DataColumn Index="6" DataSource="Total.ManuMethod_CustomerReqProduct"/>
  141. <DataColumn Index="7" DataSource="Total.Process_CustomerReqProduct"/>
  142. <DataColumn Index="8" DataSource="Total.ShortName_Customer"/>
  143. <DataColumn Index="9" DataSource="Total.No_CustomerReqInfo"/>
  144. <DataColumn Index="10" DataSource="Total.CreateDate_CustomerReqInfo"/>
  145. <DataColumn Index="11" DataSource="Total.Comment_CustomerReqInfo"/>
  146. <Events>
  147. <ClickPreview>
  148. PrintReport(dgProduct.CurrentView);
  149. </ClickPreview>
  150. <ClickFilter>
  151. ;
  152. </ClickFilter>
  153. <ClickNOFilter>
  154. ;
  155. </ClickNOFilter>
  156. <ClickRefresh>
  157. Empty();
  158. <Lable name="btnActionClick"/>
  159. </ClickRefresh>
  160. </Events>
  161. </IKExtendGrid>
  162. <IKButton name="btnSearch">
  163. <Events>
  164. <Click>
  165. <Lable name="btnActionClick"/>
  166. if(RowCount("#Total") == 0)
  167. MessageBox("不存在符合查询条件的记录!");
  168. </Click>
  169. </Events>
  170. </IKButton>
  171. <IKButton name="btnClear">
  172. <Events>
  173. <Click>
  174. Empty();
  175. NewInstance();
  176. txtBillNo1.CValue="";
  177. txtBillNo2.CValue="";
  178. tbCustomerNo1.CValue="";
  179. tbCustomerNo2.CValue="";
  180. tbProduct1.CValue="";
  181. tbProduct2.CValue="";
  182. dtStart.Checked=False;
  183. dtEnd.Checked=False;
  184. cbMaterial.Text = "";
  185. cbManuMethod.Text = "";
  186. cbProcess.Text = "";
  187. </Click>
  188. </Events>
  189. </IKButton>
  190. </Controls>
  191. <ChildForms>
  192. <ChildForm name="BillSearch" DataSource="CustomerReqInfo" SearchFunction="SearchAllBill" SearchFunctionCondition="SearchCustomerCondition" SearchFunctionByNo="">
  193. <DataColumn Index="0" MappingName="#CustomerReqInfo.No_CustomerReqInfo" HeaderText="建档编号" Width="90" ColumnType="IKDataGridTextBoxColumn"/>
  194. <DataColumn Index="1" MappingName="#CustomerReqInfo.CreateDate_CustomerReqInfo" HeaderText="建档日期" Width="90" ColumnType="IKDataGridTextBoxColumn"/>
  195. <DataColumn Index="2" MappingName="#CustomerReqInfo.No_Customer" HeaderText="客户编号" Width="75" ColumnType="IKDataGridTextBoxColumn"/>
  196. <DataColumn Index="3" MappingName="#CustomerReqInfo.Type_Customer" HeaderText="客户类型" Width="75" ColumnType="IKDataGridTextBoxColumn"/>
  197. <DataColumn Index="4" MappingName="#CustomerReqInfo.ShortName_Customer" HeaderText="客户名称" Width="75" ColumnType="IKDataGridTextBoxColumn"/>
  198. <DataColumn Index="5" MappingName="#CustomerReqInfo.Comment_CustomerReqInfo" HeaderText="备注" Width="75" ColumnType="IKDataGridTextBoxColumn"/>
  199. </ChildForm>
  200. <ChildForm name="ProductSearch" DataSource="Product" SearchFunction="SearchAllProduct" SearchFunctionByNo=""
  201. MappingName="产品">
  202. <DataColumn Index="0" MappingName="#Product.No_Product" HeaderText="产品编号" Width="90" ColumnType="IKDataGridTextBoxColumn" />
  203. <DataColumn Index="1" MappingName="#Product.Name_Product" HeaderText="产品简称" Width="90" ColumnType="IKDataGridTextBoxColumn" />
  204. <DataColumn Index="2" MappingName="#Product.Type_Product" HeaderText="产品类型" Width="120" ColumnType="IKDataGridTextBoxColumn"/>
  205. <DataColumn Index="3" MappingName="#Product.Price_Product" HeaderText="标准售价" Width="120" ColumnType="IKDataGridTextBoxColumn" Format="F2"/>
  206. <DataColumn Index="4" MappingName="#Product.LowSalePrice_Product" HeaderText="最低售价" Width="120" ColumnType="IKDataGridTextBoxColumn" Format="F2"/>
  207. <DataColumn Index="5" MappingName="#Product.SafetyQty_Product" HeaderText="安全存量" Width="120" ColumnType="IKDataGridTextBoxColumn"/>
  208. </ChildForm>
  209. <ChildForm name="CustomerSearch" DataSource="Customer" SearchFunction="SearchAllCustomer" SearchFunctionCondition="SearchCustomerCondition" SearchFunctionByNo="" MappingName="客户">
  210. <DataColumn Index="0" MappingName="#Customer.No_Customer" HeaderText="客户编号" Width="90" ColumnType="IKDataGridTextBoxColumn"/>
  211. <DataColumn Index="1" MappingName="#Customer.ShortName_Customer" HeaderText="客户简称" Width="90" ColumnType="IKDataGridTextBoxColumn"/>
  212. <DataColumn Index="2" MappingName="#Customer.Type_Customer" HeaderText="客户类型" Width="75" ColumnType="IKDataGridTextBoxColumn"/>
  213. <DataColumn Index="3" MappingName="#Customer.Level_Customer" HeaderText="客户等级" Width="75" ColumnType="IKDataGridTextBoxColumn"/>
  214. <DataColumn Index="4" MappingName="#Customer.IsGeneric_Customer" HeaderText="一般客户" Width="75" ColumnType="IKDataGridBoolColumn"/>
  215. </ChildForm>
  216. </ChildForms>
  217. </Client>
  218. <Server>
  219. <Tables>
  220. <Table name="UI" Type="Parent">
  221. <GetSchema CmdType="Text" CmdText="
  222. SELECT TOP 0 convert(nvarchar(64),'') As Material_CustomerReqProduct,convert(nvarchar(64),'') As ManuMethod_CustomerReqProduct,convert(nvarchar(64),'') As Process_CustomerReqProduct
  223. "/>
  224. </Table>
  225. <Table name="Total" Type="Child">
  226. <GetSchema CmdType="Text" CmdText="
  227. Select top 0 No_CustomerReqInfo,CreateDate_CustomerReqInfo,Comment_CustomerReqInfo,No_CustomerReqProduct,Name_CustomerReqProduct,Quantity_CustomerReqProduct,Price_CustomerReqProduct,Unit_CustomerReqProduct,ShortName_Customer,
  228. Material_CustomerReqProduct,ManuMethod_CustomerReqProduct,Process_CustomerReqProduct
  229. From CustomerReqInfo
  230. Join CustomerReqProduct On CustomerReqInfo.ID_CustomerReqInfo=CustomerReqProduct.ID_CustomerReqInfo
  231. Join Customer On Customer.ID_Customer=CustomerReqInfo.ID_Customer
  232. "/>
  233. </Table>
  234. </Tables>
  235. <Search>
  236. <SearchAllProduct CmdType="Text" CmdText="SELECT Product.No_Product,Product.Name_Product ,Type_Product, Price_Product, LowSalePrice_Product, SafetyQty_Product FROM Product ">
  237. <Tables>
  238. <Table name="AllProduct" />
  239. </Tables>
  240. </SearchAllProduct>
  241. <SearchAllCustomer CmdType="Text" CmdText="SELECT Customer.No_Customer,Customer.ShortName_Customer,Customer.Type_Customer,Customer.Level_Customer,Customer.IsGeneric_Customer,Customer.ID_Creator FROM Customer ">
  242. <Tables>
  243. <Table name="AllCustomer" />
  244. </Tables>
  245. </SearchAllCustomer>
  246. <SearchAllBill CmdType="Text" CmdText=" SELECT CustomerReqInfo.*,Customer.No_Customer,Customer.Name_Customer, Customer.ShortName_Customer,Customer.Type_Customer,Customer.ID_Creator FROM CustomerReqInfo
  247. LEFT JOIN Customer ON Customer.ID_Customer = CustomerReqInfo.ID_Customer">
  248. <Tables>
  249. <Table name="AllBill" />
  250. </Tables>
  251. </SearchAllBill>
  252. <SearchTotal CmdType="Text" CmdText=" Declare @sql Nvarchar(4000)
  253. Set @sql = ''
  254. Set @sql = @sql + 'Select No_CustomerReqInfo,CreateDate_CustomerReqInfo,Comment_CustomerReqInfo,No_CustomerReqProduct,Name_CustomerReqProduct,Quantity_CustomerReqProduct,Price_CustomerReqProduct,Unit_CustomerReqProduct,ShortName_Customer,'
  255. +' Material_CustomerReqProduct,ManuMethod_CustomerReqProduct,Process_CustomerReqProduct'
  256. +' From CustomerReqInfo'
  257. +' Join CustomerReqProduct On CustomerReqInfo.ID_CustomerReqInfo=CustomerReqProduct.ID_CustomerReqInfo'
  258. +' Join Customer On Customer.ID_Customer=CustomerReqInfo.ID_Customer'
  259. +' Where No_CustomerReqInfo Is Not Null'
  260. if(@StartNo_CustomerReqInfo Is Not Null)
  261. set @sql=@sql+' And No_CustomerReqInfo &gt;= '+nchar(39)+@StartNo_CustomerReqInfo+nchar(39)
  262. if(@EndNo_CustomerReqInfo Is Not Null)
  263. set @sql=@sql+' And No_CustomerReqInfo &lt;= '+nchar(39)+@EndNo_CustomerReqInfo+nchar(39)
  264. if(@StartDate Is Not Null)
  265. set @sql=@sql+' And DateDiff(day,'+nchar(39)+convert(nvarchar(64),@StartDate)+nchar(39)+N',CreateDate_CustomerReqInfo) &gt;=0 '
  266. if(@EndDate Is Not Null)
  267. set @sql=@sql+' And DateDiff(day,'+nchar(39)+convert(nvarchar(64),@EndDate)+nchar(39)+N',CreateDate_CustomerReqInfo) &lt;=0 '
  268. if(@StartNo_Customer Is Not Null)
  269. set @sql=@sql+' And No_Customer &gt;= '+nchar(39)+@StartNo_Customer+nchar(39)
  270. if(@EndNo_Customer Is Not Null)
  271. set @sql=@sql+' And No_Customer &lt;= '+nchar(39)+@EndNo_Customer+nchar(39)
  272. if(@StartNo_Product Is Not Null)
  273. set @sql=@sql+' And No_CustomerReqProduct &gt;= '+nchar(39)+@StartNo_Product+nchar(39)
  274. if(@EndNo_Product Is Not Null)
  275. set @sql=@sql+' And No_CustomerReqProduct &lt;= '+nchar(39)+@EndNo_Product+nchar(39)
  276. if (@Material_CustomerReqProduct Is Not Null)
  277. Set @sql = @sql +' And Material_CustomerReqProduct = '+nchar(39)+@Material_CustomerReqProduct+nchar(39)
  278. if (@ManuMethod_CustomerReqProduct Is Not Null)
  279. Set @sql = @sql +' And ManuMethod_CustomerReqProduct = '+nchar(39)+@ManuMethod_CustomerReqProduct+nchar(39)
  280. if (@Process_CustomerReqProduct Is Not Null)
  281. Set @sql = @sql +' And Process_CustomerReqProduct = '+nchar(39)+@Process_CustomerReqProduct+nchar(39)
  282. EXEC (@sql)
  283. ">
  284. <Params>
  285. <Param name="@StartNo_CustomerReqInfo" type="Product.No_Product" Index="0" />
  286. <Param name="@EndNo_CustomerReqInfo" type="Product.No_Product" Index="1" />
  287. <Param name="@StartDate" type="StocktakingBill.Date_StocktakingBill" Index="2" />
  288. <Param name="@EndDate" type="StocktakingBill.Date_StocktakingBill" Index="3" />
  289. <Param name="@StartNo_Customer" type="Product.No_Product" Index="4" />
  290. <Param name="@EndNo_Customer" type="Product.No_Product" Index="5" />
  291. <Param name="@StartNo_Product" type="Product.No_Product" Index="6" />
  292. <Param name="@EndNo_Product" type="Product.No_Product" Index="7" />
  293. <Param name="@Material_CustomerReqProduct" type="CustomerReqProduct.Material_CustomerReqProduct" Index="8" />
  294. <Param name="@ManuMethod_CustomerReqProduct" type="CustomerReqProduct.ManuMethod_CustomerReqProduct" Index="9" />
  295. <Param name="@Process_CustomerReqProduct" type="CustomerReqProduct.Process_CustomerReqProduct" Index="10" />
  296. </Params>
  297. <Tables>
  298. <Table name="Total" />
  299. </Tables>
  300. </SearchTotal>
  301. <SearchManuMethod CmdType="Text" CmdText=" SELECT TypeDef.Name_TypeDef AS ManuMethod_CustomerReqProduct FROM TypeDef WHERE Type_TypeDef = '28' ">
  302. <Tables>
  303. <Table name="ManuMethod" />
  304. </Tables>
  305. </SearchManuMethod>
  306. <SearchMaterial CmdType="Text" CmdText=" SELECT TypeDef.Name_TypeDef AS Material_CustomerReqProduct FROM TypeDef WHERE Type_TypeDef = '29' ">
  307. <Tables>
  308. <Table name="Material" />
  309. </Tables>
  310. </SearchMaterial>
  311. <SearchProcess CmdType="Text" CmdText=" SELECT TypeDef.Name_TypeDef AS Process_CustomerReqProduct FROM TypeDef WHERE Type_TypeDef = '30' ">
  312. <Tables>
  313. <Table name="Process" />
  314. </Tables>
  315. </SearchProcess>
  316. </Search>
  317. </Server>
  318. <Lables>
  319. <Search>
  320. Empty();
  321. </Search>
  322. <btnActionClick>
  323. @StartNo_CustomerReqInfo =DBNull();
  324. @EndNo_CustomerReqInfo =DBNull();
  325. @StartDate =DBNull();
  326. @EndDate =DBNull();
  327. @StartNo_Customer =DBNull();
  328. @EndNo_Customer =DBNull();
  329. @StartNo_Product =DBNull();
  330. @EndNo_Product =DBNull();
  331. @Material_CustomerReqProduct = DBNull();
  332. @ManuMethod_CustomerReqProduct =DBNull();
  333. @Process_CustomerReqProduct =DBNull();
  334. if(txtBillNo1.CValue!="")
  335. @StartNo_CustomerReqInfo=txtBillNo1.CValue;
  336. if(txtBillNo2.CValue!="")
  337. @EndNo_CustomerReqInfo=txtBillNo2.CValue;
  338. if(tbProduct1.CValue!="")
  339. @StartNo_Product=tbProduct1.CValue;
  340. if(tbProduct2.CValue!="")
  341. @EndNo_Product=tbProduct2.CValue;
  342. if(tbCustomerNo1.CValue!="")
  343. @StartNo_Customer=tbCustomerNo1.CValue;
  344. if(tbCustomerNo2.CValue!="")
  345. @StartNo_Customer=tbCustomerNo2.CValue;
  346. if(cbMaterial.Text !="")
  347. @Material_CustomerReqProduct = cbMaterial.Text;
  348. if(cbManuMethod.Text!="")
  349. @ManuMethod_CustomerReqProduct=cbManuMethod.Text;
  350. if(cbProcess.Text !="")
  351. @Process_CustomerReqProduct = cbProcess.Text;
  352. if(dtStart.Checked)
  353. @StartDate=dtStart.Value;
  354. if(dtEnd.Checked)
  355. @EndDate=dtEnd.Value;
  356. Search("SearchTotal",@StartNo_CustomerReqInfo,@EndNo_CustomerReqInfo,@StartDate,@EndDate,@StartNo_Customer,@EndNo_Customer,@StartNo_Product,@EndNo_Product,@Material_CustomerReqProduct,@ManuMethod_CustomerReqProduct,@Process_CustomerReqProduct);
  357. </btnActionClick>
  358. </Lables>
  359. </Form>
  360. </Forms>