FrmExpressSendingAnnal.xml 86 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776
  1. <?xml version="1.0" encoding="utf-8" ?>
  2. <Forms>
  3. <Form Name="FrmExpressSendingAnnal">
  4. <Client>
  5. <Events>
  6. <Load>
  7. <![CDATA[
  8. @SetFlag=1;
  9. @Title="快递寄件";
  10. GetSchema();
  11. Search("SearchSystemSetting");
  12. Search("SearchConsignTel",GetLoginCompanyID());
  13. @SysCurrency=#SystemSetting.SysCurrency_SystemSetting;
  14. Search("SearchFromBillType");
  15. ChangeMode("Search");
  16. ]]>
  17. </Load>
  18. <Closing>
  19. ;
  20. </Closing>
  21. <Closed>
  22. ;
  23. </Closed>
  24. </Events>
  25. <Mode>
  26. <Search>
  27. <Lable name="Search" />
  28. </Search>
  29. <New>
  30. <Lable name="New" />
  31. </New>
  32. <View>
  33. <Lable name="View" />
  34. </View>
  35. <Modify>
  36. <Lable name="Modify" />
  37. </Modify>
  38. </Mode>
  39. <Controls>
  40. <IKDateTimePicker name="timeSending" DataSource="ExpressDelivery.Date_ExpressDelivery"></IKDateTimePicker>
  41. <IKTextButton name="tbNo" DataSource="ExpressDelivery.No_ExpressDelivery">
  42. <Events>
  43. <Enter>
  44. <![CDATA[
  45. if (tbNo.ReadOnly == false)
  46. {
  47. if (tbNo.CValue != StringEmpty())
  48. {
  49. UpdateForm(false, "");
  50. if (@Status == 1)
  51. {
  52. if (Search("CheckExpressDeliveryNo", tbNo.CValue))
  53. {
  54. MessageBox("该快递单已存在!",@Title);
  55. return;
  56. }
  57. }
  58. else
  59. {
  60. if (Search("SearchExpressDeliveryWithNo", tbNo.CValue))
  61. {
  62. ChangeMode("View");
  63. }
  64. else
  65. {
  66. @No = tbNo.CValue;
  67. ChangeMode("New");
  68. tbNo.CValue = @No;
  69. }
  70. }
  71. }
  72. else
  73. {
  74. MessageBox("请输入快递编号!",@Title);
  75. }
  76. }
  77. ]]>
  78. </Enter>
  79. <Click>
  80. ShowSearchBox("BillSearch","NODEPOT", "tbNo",tbNo.CValue);
  81. </Click>
  82. </Events>
  83. </IKTextButton>
  84. <IKComboBoxEx name="cbDept" DisplaySource="ExpressDelivery.Name_Transporter" NoSource="ExpressDelivery.No_Transporter"
  85. ValueSource="ExpressDelivery.ID_Transporter" DataSource="Transporter" DisplayMember="Name_Transporter"
  86. NoMember="No_Transporter" ValueMember="ID_Transporter">
  87. <Events>
  88. <Reload>
  89. UpdateForm(false, "cbDept");
  90. Search("SearchTransporter");
  91. UpdateForm(true, "cbDept");
  92. </Reload>
  93. </Events>
  94. </IKComboBoxEx>
  95. <IKNumericTextBox name="ikNumericTextBox8" DataSource="ExpressDelivery.Quantity_ExpressDelivery" />
  96. <IKNumericTextBox name="ikNumericTextBox9" DataSource="ExpressDelivery.Weight_ExpressDelivery" />
  97. <IKComboBoxEx name="ikComboBoxEx1" DisplaySource="ExpressDelivery.Name_Content" ValueSource="ExpressDelivery.Content_ExpressDelivery"
  98. DataSource="Content" DisplayMember="Name_Content" ValueMember="Content_ExpressDelivery">
  99. <Events>
  100. <Reload>
  101. UpdateForm(false, "ikComboBoxEx1");
  102. Search("SearchContent_ExpressDelivery");
  103. UpdateForm(true, "ikComboBoxEx1");
  104. </Reload>
  105. <SelectedIndexChanged>
  106. if(ikComboBoxEx1.SelectedName == "其他")
  107. {
  108. if(@Status == 1 || @Status == 3)
  109. {
  110. #ExpressDelivery.OtherContent_ExpressDelivery = DBNull();
  111. UpdateForm(true,"ikTextBox1");
  112. ikTextBox1.ReadOnly = false;
  113. }
  114. }
  115. else
  116. {
  117. ikTextBox1.ReadOnly = true;
  118. }
  119. </SelectedIndexChanged>
  120. </Events>
  121. </IKComboBoxEx>
  122. <IKTextBox name="ikTextBox1" DataSource="ExpressDelivery.OtherContent_ExpressDelivery" />
  123. <IKComboBoxEx name="ikComboBoxEx2" DisplaySource="ExpressDelivery.Name_PayMethod" ValueSource="ExpressDelivery.PayMethod_ExpressDelivery"
  124. DataSource="PayMethod" DisplayMember="Name_PayMethod" ValueMember="PayMethod_ExpressDelivery">
  125. <Events>
  126. <Reload>
  127. UpdateForm(false, "ikComboBoxEx2");
  128. Search("SearchPayMethod_ExpressDelivery");
  129. UpdateForm(true, "ikComboBoxEx2");
  130. </Reload>
  131. <SelectedIndexChanged>
  132. if(ikComboBoxEx2.SelectedName == "第三方付")
  133. {
  134. if(@Status == 1 || @Status == 3)
  135. {
  136. #ExpressDelivery.ThirdPart_ExpressDelivery = DBNull();
  137. UpdateForm(true,"ikTextBox2");
  138. ikTextBox2.ReadOnly = false;
  139. }
  140. }
  141. else
  142. {
  143. ikTextBox2.ReadOnly = true;
  144. }
  145. </SelectedIndexChanged>
  146. </Events>
  147. </IKComboBoxEx>
  148. <IKTextBox name="ikTextBox2" DataSource="ExpressDelivery.ThirdPart_ExpressDelivery" />
  149. <IKComboBoxEx name="cbCurrency" DisplaySource="ExpressDelivery.Currency_ExpressDelivery" DataSource="ExpressDelivery"></IKComboBoxEx>
  150. <IKTextButton name="txtMoney" DataSource="ExpressDelivery.Carriage_ExpressDelivery"></IKTextButton>
  151. <IKCheckBox name="ckPrevBill" DataSource="ExpressDelivery.HavePay_ExpressDelivery"></IKCheckBox>
  152. <IKCheckBox name="ikCheckBox1" DataSource="ExpressDelivery.BalanceMonthly_ExpressDelivery">
  153. <Events>
  154. <CheckedChanged>
  155. if(ikCheckBox1.CValue == true)
  156. {
  157. if(@Status == 1 || @Status == 3)
  158. ikTextBox11.ReadOnly = false;
  159. }
  160. else
  161. {
  162. #ExpressDelivery.Account_ExpressDelivery = DBNull();
  163. UpdateForm(true,"ikTextBox11");
  164. ikTextBox11.ReadOnly = true;
  165. }
  166. </CheckedChanged>
  167. </Events>
  168. </IKCheckBox>
  169. <IKTextBox name="ikTextBox11" DataSource="ExpressDelivery.Account_ExpressDelivery"></IKTextBox>
  170. <IKTextButton name="txtMaker" DataSource="ExpressDelivery.NameCreator_ExpressDelivery"></IKTextButton>
  171. <IKDateTimeText name="dttMakerDate" DataSource="ExpressDelivery.CreateDate_ExpressDelivery"></IKDateTimeText>
  172. <IKTextButton name="txtlastmoduser" DataSource="ExpressDelivery.NameLastModUser_ExpressDelivery"></IKTextButton>
  173. <IKDateTimeText name="dttlastmoddate" DataSource="ExpressDelivery.LastModDate_ExpressDelivery"></IKDateTimeText>
  174. <IKTextButton name="txtComment" DataSource="ExpressDelivery.Comment_ExpressDelivery"></IKTextButton>
  175. <IKTextButton name="ikTextButton1" DataSource="ExpressDelivery.No_Customer">
  176. <Events>
  177. <Enter>
  178. <![CDATA[
  179. if (ikTextButton1.ReadOnly == false)
  180. {
  181. UpdateForm(false, "");
  182. if (ikTextButton1.CValue == "" || !Search("SearchCustomerWithNo", ikTextButton1.CValue))
  183. {
  184. if (ikTextButton1.CValue == "")
  185. {
  186. MessageBox("请输入客户编号!", @Title);
  187. }
  188. else
  189. {
  190. MessageBox("该客户不存在!",@Title);
  191. @temp = ShowSearchBox("CustomerSearch","INFOMATION",ikTextButton1.CValue);
  192. if(@temp != "")
  193. {
  194. ikTextButton1.CValue = @temp;
  195. ActiveControlEvent("ikTextButton1", "Enter");
  196. }
  197. }
  198. }
  199. else
  200. {
  201. #ExpressDelivery.ID_Customer = #Customer.ID_Customer;
  202. #ExpressDelivery.ShortName_Customer = #Customer.ShortName_Customer;
  203. #ExpressDelivery.NameCustomer_ExpressDelivery = #Customer.Name_Customer;
  204. #ExpressDelivery.RecipAddress_ExpressDelivery = #Customer.SendAddr_Customer;
  205. }
  206. UpdateForm(true, "");
  207. }
  208. ]]>
  209. </Enter>
  210. <Click>
  211. <![CDATA[
  212. if (ikTextButton1.ReadOnly == false)
  213. {
  214. @temp = ShowSearchBox("CustomerSearch","INFOMATION",ikTextButton1.CValue);
  215. if( @temp == "" )
  216. return;
  217. ikTextButton1.CValue = @temp;
  218. ActiveControlEvent("ikTextButton1", "Enter");
  219. }
  220. ]]>
  221. </Click>
  222. </Events>
  223. </IKTextButton>
  224. <IKTextBox name="ikTextBox4" DataSource="ExpressDelivery.ShortName_Customer"></IKTextBox>
  225. <IKTextBox name="ikTextBox12" DataSource="ExpressDelivery.NameCustomer_ExpressDelivery"></IKTextBox>
  226. <IKTextButton name="ikTextButton2" DataSource="ExpressDelivery.RecipProvince_ExpressDelivery"></IKTextButton>
  227. <IKTextButton name="ikTextButton3" DataSource="ExpressDelivery.RecipCity_ExpressDelivery"></IKTextButton>
  228. <IKTextButton name="ikTextButton4" DataSource="ExpressDelivery.RecipDistrict_ExpressDelivery"></IKTextButton>
  229. <IKTextBox name="ikTextBox3" DataSource="ExpressDelivery.RecipAddress_ExpressDelivery" />
  230. <IKComboBoxEx name="ikComboBoxEx4" DisplaySource="ExpressDelivery.Reciptor_ExpressDelivery" DataSource="Reciptor"
  231. DisplayMember="Reciptor_ExpressDelivery">
  232. <Events>
  233. <Reload>
  234. UpdateForm(false, "ikComboBoxEx4");
  235. Search("SearchReciptor",ikTextButton1.CValue);
  236. UpdateForm(true, "ikComboBoxEx4");
  237. </Reload>
  238. </Events>
  239. </IKComboBoxEx>
  240. <IKComboBoxEx name="ikComboBoxEx3" DisplaySource="ExpressDelivery.RecipTel_ExpressDelivery" DataSource="Reciptor"
  241. DisplayMember="RecipTel_ExpressDelivery">
  242. <Events>
  243. <Reload>
  244. UpdateForm(false, "ikComboBoxEx3");
  245. Search("SearchReciptor",ikTextButton1.CValue);
  246. UpdateForm(true, "ikComboBoxEx3");
  247. </Reload>
  248. </Events>
  249. </IKComboBoxEx>
  250. <IKTextBox name="ikTextBox7" DataSource="ExpressDelivery.CustomerNo_ExpressDelivery"></IKTextBox>
  251. <IKTextBox name="ikTextBox6" DataSource="ExpressDelivery.ConsignCompany_ExpressDelivery"></IKTextBox>
  252. <IKTextBox name="ikTextBox8" DataSource="ExpressDelivery.ConsignProvince_ExpressDelivery"></IKTextBox>
  253. <IKTextBox name="ikTextBox9" DataSource="ExpressDelivery.ConsignCity_ExpressDelivery"></IKTextBox>
  254. <IKTextBox name="ikTextBox10" DataSource="ExpressDelivery.ConsignDistrict_ExpressDelivery"></IKTextBox>
  255. <IKTextBox name="ikTextBox5" DataSource="ExpressDelivery.ConsignAddress_ExpressDelivery"></IKTextBox>
  256. <IKComboBoxEx name="ikComboBoxEx6" DisplaySource="ExpressDelivery.Consignor_ExpressDelivery" DataSource="Consignor"
  257. DisplayMember="Consignor_ExpressDelivery">
  258. <Events>
  259. <Reload>
  260. UpdateForm(false, "ikComboBoxEx6");
  261. Search("SearchConsignor");
  262. UpdateForm(true, "ikComboBoxEx6");
  263. </Reload>
  264. </Events>
  265. </IKComboBoxEx>
  266. <IKComboBoxEx name="ikComboBoxEx5" DisplaySource="ExpressDelivery.ConsignTel_ExpressDelivery"
  267. DataSource="ConsignTel" DisplayMember="ConsignTel_ExpressDelivery">
  268. <Events>
  269. <Reload>
  270. UpdateForm(false, "ikComboBoxEx5");
  271. Search("SearchConsignTel",GetLoginCompanyID());
  272. UpdateForm(true, "ikComboBoxEx5");
  273. </Reload>
  274. </Events>
  275. </IKComboBoxEx>
  276. <IKDataGridEx name="ikDataGridEx1" DataSource="ExpressDeliveryDetail" TableStyleIndex="0">
  277. <DataColumn Index="0" DataSource="ExpressDeliveryDetail.Name_FromBill">
  278. <IKDataGridComboBoxColumn DisplaySourceEx="ExpressDeliveryDetail.Name_FromBill" ValueSourceEx="ExpressDeliveryDetail.Type_FromBill"
  279. DataSourceEx="BillType" DisplayMemberEx="Name_BillType" ValueMemberEx="Value_BillType">
  280. <Events>
  281. <Reload>
  282. Search("SearchFromBillType");
  283. SetDataGridColumnDataSource(0,"ikDataGridEx1");
  284. </Reload>
  285. </Events>
  286. </IKDataGridComboBoxColumn>
  287. </DataColumn>
  288. <DataColumn Index="1" DataSource="ExpressDeliveryDetail.No_FromBill" />
  289. </IKDataGridEx>
  290. <IKNumericTextBox name="ikKeepPrice" DataSource="ExpressDelivery.KeepPrice_ExpressDelivery" />
  291. <IKNumericTextBox name="ikNumericTextBox1" DataSource="ExpressDelivery.KeepNum" />
  292. <IKTextBox name="txtAudi" DataSource="ExpressDelivery.Name_Assessor"></IKTextBox>
  293. <IKDateTimeText name="dtAssessDate" DataSource="ExpressDelivery.AssessDate_ExpressDelivery"></IKDateTimeText>
  294. <IKButton name="ikButton1">
  295. <Events>
  296. <Click>
  297. <Lable name="ClickikButton" />
  298. </Click>
  299. </Events>
  300. </IKButton>
  301. <!--<IKButton name="btScanExpressSending">
  302. <Events>
  303. <Click>
  304. if(tbNo.CValue != "")
  305. {
  306. @ClickResult = MessageBox("是否覆盖快递单号?",@Title,MB_YESNOCANCEL);
  307. if (@ClickResult == DialogResult("CANCEL"))
  308. {
  309. return;
  310. }
  311. if(@ClickResult == DialogResult("YES"))
  312. {
  313. #ExpressDelivery.No_ExpressDelivery = Read("BarCode.txt",0);
  314. UpdateForm(true, "");
  315. }
  316. else if (@ClickResult == DialogResult("NO"))
  317. {
  318. return;
  319. }
  320. }
  321. else
  322. {
  323. #ExpressDelivery.No_ExpressDelivery = Read("BarCode.txt",0);
  324. UpdateForm(true, "");
  325. }
  326. </Click>
  327. </Events>
  328. </IKButton>-->
  329. <IKButton name="btScanSaleOut">
  330. <Events>
  331. <Click>
  332. ;
  333. </Click>
  334. </Events>
  335. </IKButton>
  336. <IKFormToolBar name="toolBar">
  337. <Events>
  338. <ClickFirst>
  339. if(Search("SearchExpressDeliveryFirst"))
  340. {
  341. ChangeMode("View");
  342. }
  343. </ClickFirst>
  344. <ClickPrev>
  345. if(Search("SearchExpressDeliveryPrevious", tbNo.CValue))
  346. {
  347. ChangeMode("View");
  348. }
  349. </ClickPrev>
  350. <ClickNext>
  351. if(Search("SearchExpressDeliveryNext", tbNo.CValue))
  352. {
  353. ChangeMode("View");
  354. }
  355. </ClickNext>
  356. <ClickLast>
  357. if(Search("SearchExpressDeliveryLast"))
  358. {
  359. ChangeMode("View");
  360. }
  361. </ClickLast>
  362. <ClickEmpty>
  363. ChangeMode("Search");
  364. </ClickEmpty>
  365. <ClickNew>
  366. ChangeMode("New");
  367. </ClickNew>
  368. <ClickSubmit>
  369. <Lable name="ClickikButton" />
  370. <Lable name="SubmitButtonClick" />
  371. </ClickSubmit>
  372. <ClickModify>
  373. ChangeMode("Modify");
  374. </ClickModify>
  375. <ClickDelete>
  376. Delete();
  377. ChangeMode("Search");
  378. </ClickDelete>
  379. <ClickPrint>
  380. ShowPrintBox("BillSearch",#ExpressDelivery.No_ExpressDelivery,#ExpressDelivery.No_ExpressDelivery);
  381. </ClickPrint>
  382. <ClickImport>
  383. ;
  384. </ClickImport>
  385. <ClickExport>
  386. ;
  387. </ClickExport>
  388. <ClickClose>
  389. ;
  390. </ClickClose>
  391. <ClickExpand>
  392. if(toolBar.ExpandForm==true)
  393. {
  394. pnRight.Visible=true;<!--PanelRight is not existed-->
  395. }
  396. else
  397. {
  398. pnRight.Visible=false;
  399. }
  400. </ClickExpand>
  401. <ClickLoad>
  402. <![CDATA[
  403. if(Read("BarCode.txt",0)=="")
  404. MessageBox("条码信息所在文件不存在或信息为空!",@Title);
  405. else
  406. {
  407. if(tbNo.CValue != "")
  408. {
  409. @ClickResult = MessageBox("是否覆盖快递单号?",@Title,MB_YESNOCANCEL);
  410. if (@ClickResult == DialogResult("CANCEL"))
  411. {
  412. return;
  413. }
  414. if(@ClickResult == DialogResult("YES"))
  415. {
  416. #ExpressDelivery.No_ExpressDelivery = Read("BarCode.txt",0);
  417. UpdateForm(true, "");
  418. }
  419. else if (@ClickResult == DialogResult("NO"))
  420. {
  421. return;
  422. }
  423. }
  424. else
  425. {
  426. #ExpressDelivery.No_ExpressDelivery = Read("BarCode.txt",0);
  427. UpdateForm(true, "");
  428. }
  429. SearchOutDepot(Read("BarCode.txt",1),"ExpressDeliveryDetail","Name_FromBill","销货出库单","Type_FromBill","2","No_FromBill");
  430. SuspendLayout();
  431. @a = 0;
  432. for(@i=0;@i<RowCount("#ExpressDeliveryDetail");@i=@i+1)
  433. {
  434. SetPosition("#ExpressDeliveryDetail",@i);
  435. if(Search("SearchCustomerWithBillNo",#ExpressDeliveryDetail.No_FromBill))
  436. {
  437. ikTextButton1.CValue = #BillCustomer.No_Customer;
  438. ActiveControlEvent("ikTextButton1", "Enter");
  439. if(Search("SearchReciptor1",ikTextButton1.CValue))
  440. {
  441. #ExpressDelivery.Reciptor_ExpressDelivery = #Reciptor1.Reciptor_ExpressDelivery;
  442. #ExpressDelivery.RecipTel_ExpressDelivery = #Reciptor1.RecipTel_ExpressDelivery;
  443. UpdateForm(true, "ikComboBoxEx4");
  444. UpdateForm(true, "ikComboBoxEx3");
  445. }
  446. @a=1;
  447. ResumeLayout();
  448. return;
  449. }
  450. }
  451. if(@a == 0)
  452. {
  453. ikTabControl1.SelectedIndex = 2;
  454. MessageBox("请输入有效的客户编号,并按回车确认!",@Title);
  455. ikTextButton1.Focus();
  456. return;
  457. }
  458. ResumeLayout();
  459. toolBar.EnableLoad = false;
  460. }
  461. ]]>
  462. </ClickLoad>
  463. <ClickCheck>
  464. <!--
  465. if(Read("BarCode.txt",0)=="")
  466. MessageBox("条码信息所在文件不存在或信息为空!",@Title);
  467. else
  468. {
  469. ChangeMode("Search");
  470. if(Search("SearchExpressDeliveryWithNo", Read("BarCode.txt",0)))
  471. {
  472. Search("SearchStatusWithNo",Read("BarCode.txt",0));
  473. if(#Status.Check_ExpressDelivery == 0)
  474. {
  475. ChangeMode("View");
  476. }
  477. else
  478. {
  479. ChangeMode("Search");
  480. MessageBox("该单据已校验!",@Title);
  481. return;
  482. }
  483. }
  484. else
  485. {
  486. @a = ShowSearchNo();
  487. if(Search("SearchExpressDeliveryWithNo", @a))
  488. {
  489. Search("SearchStatusWithNo",@a);
  490. if(#Status.Check_ExpressDelivery == 0)
  491. {
  492. ChangeMode("View");
  493. ShowFrmExpressSendingBarCode(Read("BarCode.txt",1),@a);
  494. return;
  495. }
  496. else
  497. {
  498. ChangeMode("Search");
  499. MessageBox("该单据已校验!",@Title);
  500. return;
  501. }
  502. }
  503. else
  504. {
  505. MessageBox("该快递单不存在!",@Title);
  506. return;
  507. }
  508. }
  509. ShowFrmExpressSendingBarCode(Read("BarCode.txt",1),"");
  510. } -->
  511. if(Search("SearchExpressDeliveryWithNo", tbNo.CValue))
  512. {
  513. Search("SearchStatusWithNo",#ExpressDelivery.No_ExpressDelivery);
  514. if(#Status.Check_ExpressDelivery == 0)
  515. {
  516. ChangeMode("View");
  517. }
  518. else
  519. {
  520. MessageBox("该单据已校验!",@Title);
  521. return;
  522. }
  523. }
  524. else
  525. {
  526. MessageBox("该快递单不存在!",@Title);
  527. return;
  528. }
  529. ShowFrmNewESBarCode(#ExpressDelivery.No_ExpressDelivery);
  530. </ClickCheck>
  531. <ClickAudit>
  532. BeginAudit();
  533. #ExpressDelivery.ID_Assessor = GetLoginUserID();
  534. #ExpressDelivery.Name_Assessor = GetCurrentUser();
  535. #ExpressDelivery.AssessDate_ExpressDelivery = DateTimeNow();
  536. Audit();
  537. ChangeMode("View");
  538. EndAudit();
  539. </ClickAudit>
  540. <ClickUnAudit>
  541. BeginUnAudit();
  542. #ExpressDelivery.ID_Assessor = DBNull();
  543. #ExpressDelivery.Name_Assessor = "";
  544. UnAudit();
  545. ChangeMode("View");
  546. EndUnAudit();
  547. </ClickUnAudit>
  548. </Events>
  549. </IKFormToolBar>
  550. </Controls>
  551. <Tables>
  552. <Table name="ExpressDeliveryDetail">
  553. <Events>
  554. <ColumnsChanged>
  555. <Name_FromBill>
  556. <![CDATA[
  557. if(!Equals(#ExpressDeliveryDetail.No_FromBill,"") && !Equals(#ExpressDeliveryDetail.No_FromBill,DBNull()))
  558. {
  559. if(#ExpressDeliveryDetail.Name_FromBill == "销货出库单")
  560. {
  561. if(Search("SearchSaleOutDepotBillWithNo",#ExpressDeliveryDetail.No_FromBill))
  562. {
  563. if(Search("SearchSaleOutDepotBillAndCustomerWithNo",#ExpressDeliveryDetail.No_FromBill))
  564. {
  565. if(ikTextButton1.CValue == "")
  566. {
  567. ikTextButton1.CValue = #SC.No_Customer;
  568. ActiveControlEvent("ikTextButton1", "Enter");
  569. #ExpressDelivery.Reciptor_ExpressDelivery = #SC.Name_Linkman;
  570. #ExpressDelivery.RecipTel_ExpressDelivery = #SC.Tel_Linkman;
  571. UpdateForm(true, "");
  572. }
  573. else
  574. {
  575. if(ikTextButton1.CValue != #SC.No_Customer)
  576. {
  577. @CResult = MessageBox("收件公司已存在,是否覆盖?",@Title,MB_YESNO);
  578. if(@CResult == DialogResult("YES"))
  579. {
  580. ikTextButton1.CValue = #SC.No_Customer;
  581. ActiveControlEvent("ikTextButton1", "Enter");
  582. #ExpressDelivery.Reciptor_ExpressDelivery = #SC.Name_Linkman;
  583. #ExpressDelivery.RecipTel_ExpressDelivery = #SC.Tel_Linkman;
  584. UpdateForm(true, "");
  585. }
  586. else if (@CResult == DialogResult("NO"))
  587. {
  588. return;
  589. }
  590. }
  591. else
  592. {
  593. return;
  594. }
  595. }
  596. }
  597. else
  598. {
  599. return;
  600. }
  601. }
  602. else
  603. {
  604. MessageBox("该销货出库单不存在或未审核!",@Title);
  605. return;
  606. }
  607. }
  608. }
  609. ]]>
  610. </Name_FromBill>
  611. <No_FromBill>
  612. <![CDATA[
  613. if(!Equals(#ExpressDeliveryDetail.No_FromBill,"") && !Equals(#ExpressDeliveryDetail.No_FromBill,DBNull()))
  614. {
  615. if(#ExpressDeliveryDetail.Name_FromBill == "销货出库单")
  616. {
  617. if(Search("SearchSaleOutDepotBillWithNo",#ExpressDeliveryDetail.No_FromBill))
  618. {
  619. if(Search("SearchSaleOutDepotBillAndCustomerWithNo",#ExpressDeliveryDetail.No_FromBill))
  620. {
  621. if(ikTextButton1.CValue == "")
  622. {
  623. ikTextButton1.CValue = #SC.No_Customer;
  624. ActiveControlEvent("ikTextButton1", "Enter");
  625. #ExpressDelivery.Reciptor_ExpressDelivery = #SC.Name_Linkman;
  626. #ExpressDelivery.RecipTel_ExpressDelivery = #SC.Tel_Linkman;
  627. UpdateForm(true, "");
  628. }
  629. else
  630. {
  631. if(ikTextButton1.CValue != #SC.No_Customer)
  632. {
  633. @CResult = MessageBox("收件公司已存在,是否覆盖?",@Title,MB_YESNO);
  634. if(@CResult == DialogResult("YES"))
  635. {
  636. ikTextButton1.CValue = #SC.No_Customer;
  637. ActiveControlEvent("ikTextButton1", "Enter");
  638. #ExpressDelivery.Reciptor_ExpressDelivery = #SC.Name_Linkman;
  639. #ExpressDelivery.RecipTel_ExpressDelivery = #SC.Tel_Linkman;
  640. UpdateForm(true, "");
  641. }
  642. else if (@CResult == DialogResult("NO"))
  643. {
  644. return;
  645. }
  646. }
  647. else
  648. {
  649. return;
  650. }
  651. }
  652. }
  653. else
  654. {
  655. return;
  656. }
  657. }
  658. else
  659. {
  660. MessageBox("该销货出库单不存在!",@Title);
  661. return;
  662. }
  663. }
  664. }
  665. ]]>
  666. </No_FromBill>
  667. </ColumnsChanged>
  668. </Events>
  669. </Table>
  670. </Tables>
  671. <!--<Tables>
  672. <Table name="ExpressDeliveryDetail">
  673. <Events>
  674. <ColumnsChanged>
  675. <Name_FromBill>
  676. <![CDATA[
  677. if(!Equals(#ExpressDeliveryDetail.No_FromBill,"") && !Equals(#ExpressDeliveryDetail.No_FromBill,DBNull()))
  678. {
  679. if(#ExpressDeliveryDetail.Name_FromBill == "销货出库单")
  680. {
  681. if(!Search("SearchSaleOutDepotBillWithNo",#ExpressDeliveryDetail.No_FromBill))
  682. {
  683. MessageBox("该销货出库单不存在或未经审核!",@Title);
  684. }
  685. }
  686. if(#ExpressDeliveryDetail.Name_FromBill == "库存异动作业")
  687. {
  688. if(!Search("SearchModifyBillWithNo",#ExpressDeliveryDetail.No_FromBill))
  689. {
  690. MessageBox("该库存异动单不存在或未经审核!",@Title);
  691. }
  692. }
  693. }
  694. ]]>
  695. </Name_FromBill>
  696. <No_FromBill>
  697. <![CDATA[
  698. if(@SetFlag==0)
  699. {
  700. return;
  701. }
  702. if(!Equals(#ExpressDeliveryDetail.Name_FromBill,"") && !Equals(#ExpressDeliveryDetail.Name_FromBill,DBNull()))
  703. {
  704. if(#ExpressDeliveryDetail.Name_FromBill == "销货出库单")
  705. {
  706. if(!Search("SearchSaleOutDepotBillWithNo",#ExpressDeliveryDetail.No_FromBill))
  707. {
  708. MessageBox("该销货出库单不存在或未经审核!",@Title);
  709. return;
  710. }
  711. }
  712. if(#ExpressDeliveryDetail.Name_FromBill == "库存异动作业")
  713. {
  714. if(!Search("SearchModifyBillWithNo",#ExpressDeliveryDetail.No_FromBill))
  715. {
  716. MessageBox("该库存异动单不存在或未经审核!",@Title);
  717. return;
  718. }
  719. }
  720. }
  721. ]]>
  722. </No_FromBill>
  723. </ColumnsChanged>
  724. </Events>
  725. </Table>
  726. </Tables> -->
  727. <LockInfomation LockID="ID_ExpressDelivery" LockNO="No_ExpressDelivery" LockSearchFunction="SearchExpressDeliveryWithNo" />
  728. <LogInfomation LogNO="#ExpressDelivery.No_ExpressDelivery" RecordFormField="本次运费:#ExpressDelivery.Carriage_ExpressDelivery"
  729. RecordDataGridField="" />
  730. <ChildForms>
  731. <ChildForm name="BillSearch" DataSource="ExpressDelivery" SearchFunction="SearchAllBill" SearchFunctionByNo="SearchExpressDeliveryWithNo">
  732. <DataColumn Index="0" MappingName="#ExpressDelivery.No_ExpressDelivery" HeaderText="快递单号" Width="90"
  733. ColumnType="IKDataGridTextBoxColumn" />
  734. <DataColumn Index="1" MappingName="#ExpressDelivery.Date_ExpressDelivery" HeaderText="寄件日期"
  735. Width="90" ColumnType="IKDataGridTextBoxColumn" />
  736. <DataColumn Index="2" MappingName="#ExpressDelivery.Name_Transporter" HeaderText="快递公司" Width="75"
  737. ColumnType="IKDataGridTextBoxColumn" />
  738. <DataColumn Index="3" MappingName="#ExpressDelivery.ConsignAddress_ExpressDelivery" HeaderText="寄件地址"
  739. Width="75" ColumnType="IKDataGridTextBoxColumn" />
  740. <DataColumn Index="4" MappingName="#ExpressDelivery.Comment_ExpressDelivery" HeaderText="备注"
  741. Width="75" ColumnType="IKDataGridTextBoxColumn" />
  742. </ChildForm>
  743. <ChildForm name="CustomerSearch" DataSource="Customer" SearchFunction="SearchAllCustomer" SearchFunctionByNo=""
  744. MappingName="客户">
  745. <DataColumn Index="0" MappingName="#Customer.No_Customer" HeaderText="客户编号" Width="90" ColumnType="IKDataGridTextBoxColumn" />
  746. <DataColumn Index="1" MappingName="#Customer.ShortName_Customer" HeaderText="客户简称" Width="90"
  747. ColumnType="IKDataGridTextBoxColumn" />
  748. <DataColumn Index="2" MappingName="#Customer.Type_Customer" HeaderText="客户类型" Width="75" ColumnType="IKDataGridTextBoxColumn" />
  749. <DataColumn Index="3" MappingName="#Customer.Level_Customer" HeaderText="客户等级" Width="75" ColumnType="IKDataGridTextBoxColumn" />
  750. <DataColumn Index="4" MappingName="#Customer.IsGeneric_Customer" HeaderText="一般客户" Width="75"
  751. ColumnType="IKDataGridBoolColumn" />
  752. </ChildForm>
  753. <ChildForm name="SaleOutDepotBillSearch" DataSource="SaleOutDepotBill" SearchFunction="SearchAllSaleOutDepotBill"
  754. SearchFunctionByNo="">
  755. <DataColumn Index="0" MappingName="#SaleOutDepotBill.No_SaleOutDepotBill" HeaderText="销货出库单号"
  756. Width="90" ColumnType="IKDataGridTextBoxColumn" />
  757. <DataColumn Index="1" MappingName="#SaleOutDepotBill.Date_SaleOutDepotBill" HeaderText="制单日期"
  758. Width="90" ColumnType="IKDataGridTextBoxColumn" />
  759. </ChildForm>
  760. <ChildForm name="ModifyDepotBillSearch" DataSource="M" SearchFunction="SearchAllModifyDepotBill"
  761. SearchFunctionByNo="">
  762. <DataColumn Index="0" MappingName="#M.No_ModifyDepotBill" HeaderText="库存异动作业单号" Width="90" ColumnType="IKDataGridTextBoxColumn" />
  763. <DataColumn Index="1" MappingName="#M.Date_ModifyDepotBill" HeaderText="制单日期" Width="90" ColumnType="IKDataGridTextBoxColumn" />
  764. </ChildForm>
  765. </ChildForms>
  766. </Client>
  767. <Server>
  768. <Tables>
  769. <Table name="ExpressDelivery" Type="Parent">
  770. <GetSchema CmdType="Text" CmdText=" SELECT TOP 0 ExpressDelivery.*,No_Customer,ShortName_Customer,Name_Customer, Convert(Nvarchar(64),'') As Name_PayMethod,Convert(Nvarchar(64),'') As Name_Content,
  771. Transporter.No_Transporter, Transporter.Name_Transporter,
  772. a.Name_User as NameCreator_ExpressDelivery, b.Name_User as NameLastModUser_ExpressDelivery ,Convert(Decimal(14,2),0) as KeepNum,c.Name_User AS Name_Assessor
  773. FROM ExpressDelivery
  774. LEFT JOIN Customer ON Customer.ID_Customer = ExpressDelivery.ID_Customer
  775. LEFT JOIN Transporter ON Transporter.ID_Transporter = ExpressDelivery.ID_Transporter
  776. LEFT JOIN AppUser a ON a.ID_User = ExpressDelivery.Creator_ExpressDelivery
  777. LEFT JOIN AppUser b ON b.ID_User = ExpressDelivery.LastModUser_ExpressDelivery
  778. LEFT JOIN AppUser c ON c.ID_User = ExpressDelivery.ID_Assessor " />
  779. <New CmdType="Text" CmdText=" INSERT INTO ExpressDelivery(ID_ExpressDelivery, No_ExpressDelivery, Date_ExpressDelivery, ID_Transporter, Content_ExpressDelivery,
  780. OtherContent_ExpressDelivery, Quantity_ExpressDelivery, Weight_ExpressDelivery, PayMethod_ExpressDelivery, ThirdPart_ExpressDelivery,
  781. Currency_ExpressDelivery, Carriage_ExpressDelivery, HavePay_ExpressDelivery, BalanceMonthly_ExpressDelivery, Account_ExpressDelivery,
  782. ID_Customer, RecipProvince_ExpressDelivery, RecipCity_ExpressDelivery, RecipDistrict_ExpressDelivery, RecipAddress_ExpressDelivery,
  783. Reciptor_ExpressDelivery, RecipTel_ExpressDelivery, CustomerNo_ExpressDelivery, ConsignCompany_ExpressDelivery, ConsignProvince_ExpressDelivery,
  784. ConsignCity_ExpressDelivery, ConsignDistrict_ExpressDelivery, ConsignAddress_ExpressDelivery, ConsignTel_ExpressDelivery, Consignor_ExpressDelivery,
  785. Creator_ExpressDelivery, CreateDate_ExpressDelivery, Comment_ExpressDelivery, LastModUser_ExpressDelivery, LastModDate_ExpressDelivery,NameCustomer_ExpressDelivery,KeepPrice_ExpressDelivery,ID_Assessor,AssessDate_ExpressDelivery)
  786. VALUES(@ID_ExpressDelivery, @No_ExpressDelivery, @Date_ExpressDelivery, @ID_Transporter, @Content_ExpressDelivery, @OtherContent_ExpressDelivery, @Quantity_ExpressDelivery,
  787. @Weight_ExpressDelivery, @PayMethod_ExpressDelivery, @ThirdPart_ExpressDelivery, @Currency_ExpressDelivery, @Carriage_ExpressDelivery, @HavePay_ExpressDelivery, @BalanceMonthly_ExpressDelivery,
  788. @Account_ExpressDelivery, @ID_Customer, @RecipProvince_ExpressDelivery, @RecipCity_ExpressDelivery, @RecipDistrict_ExpressDelivery, @RecipAddress_ExpressDelivery, @Reciptor_ExpressDelivery, @RecipTel_ExpressDelivery,
  789. @CustomerNo_ExpressDelivery, @ConsignCompany_ExpressDelivery, @ConsignProvince_ExpressDelivery, @ConsignCity_ExpressDelivery, @ConsignDistrict_ExpressDelivery, @ConsignAddress_ExpressDelivery, @ConsignTel_ExpressDelivery,
  790. @Consignor_ExpressDelivery, @Creator_ExpressDelivery, @CreateDate_ExpressDelivery, @Comment_ExpressDelivery, @LastModUser_ExpressDelivery, @LastModDate_ExpressDelivery,@NameCustomer_ExpressDelivery,@KeepPrice_ExpressDelivery,@ID_Assessor,@AssessDate_ExpressDelivery)">
  791. <Params>
  792. <Param name="@ID_ExpressDelivery" type="ExpressDelivery.ID_ExpressDelivery" sourceColumn="ID_ExpressDelivery" />
  793. <Param name="@No_ExpressDelivery" type="ExpressDelivery.No_ExpressDelivery" sourceColumn="No_ExpressDelivery" />
  794. <Param name="@Date_ExpressDelivery" type="ExpressDelivery.Date_ExpressDelivery" sourceColumn="Date_ExpressDelivery" />
  795. <Param name="@ID_Transporter" type="ExpressDelivery.ID_Transporter" sourceColumn="ID_Transporter" />
  796. <Param name="@Content_ExpressDelivery" type="ExpressDelivery.Content_ExpressDelivery" sourceColumn="Content_ExpressDelivery" />
  797. <Param name="@OtherContent_ExpressDelivery" type="ExpressDelivery.OtherContent_ExpressDelivery"
  798. sourceColumn="OtherContent_ExpressDelivery" />
  799. <Param name="@Quantity_ExpressDelivery" type="ExpressDelivery.Quantity_ExpressDelivery"
  800. sourceColumn="Quantity_ExpressDelivery" />
  801. <Param name="@Weight_ExpressDelivery" type="ExpressDelivery.Weight_ExpressDelivery" sourceColumn="Weight_ExpressDelivery" />
  802. <Param name="@PayMethod_ExpressDelivery" type="ExpressDelivery.PayMethod_ExpressDelivery"
  803. sourceColumn="PayMethod_ExpressDelivery" />
  804. <Param name="@ThirdPart_ExpressDelivery" type="ExpressDelivery.ThirdPart_ExpressDelivery"
  805. sourceColumn="ThirdPart_ExpressDelivery" />
  806. <Param name="@Currency_ExpressDelivery" type="ExpressDelivery.Currency_ExpressDelivery"
  807. sourceColumn="Currency_ExpressDelivery" />
  808. <Param name="@Carriage_ExpressDelivery" type="ExpressDelivery.Carriage_ExpressDelivery"
  809. sourceColumn="Carriage_ExpressDelivery" />
  810. <Param name="@HavePay_ExpressDelivery" type="ExpressDelivery.HavePay_ExpressDelivery" sourceColumn="HavePay_ExpressDelivery" />
  811. <Param name="@BalanceMonthly_ExpressDelivery" type="ExpressDelivery.BalanceMonthly_ExpressDelivery"
  812. sourceColumn="BalanceMonthly_ExpressDelivery" />
  813. <Param name="@Account_ExpressDelivery" type="ExpressDelivery.Account_ExpressDelivery" sourceColumn="Account_ExpressDelivery" />
  814. <Param name="@ID_Customer" type="ExpressDelivery.ID_Customer" sourceColumn="ID_Customer" />
  815. <Param name="@RecipProvince_ExpressDelivery" type="ExpressDelivery.RecipProvince_ExpressDelivery"
  816. sourceColumn="RecipProvince_ExpressDelivery" />
  817. <Param name="@RecipCity_ExpressDelivery" type="ExpressDelivery.RecipCity_ExpressDelivery"
  818. sourceColumn="RecipCity_ExpressDelivery" />
  819. <Param name="@RecipDistrict_ExpressDelivery" type="ExpressDelivery.RecipDistrict_ExpressDelivery"
  820. sourceColumn="RecipDistrict_ExpressDelivery" />
  821. <Param name="@RecipAddress_ExpressDelivery" type="ExpressDelivery.RecipAddress_ExpressDelivery"
  822. sourceColumn="RecipAddress_ExpressDelivery" />
  823. <Param name="@Reciptor_ExpressDelivery" type="ExpressDelivery.Reciptor_ExpressDelivery"
  824. sourceColumn="Reciptor_ExpressDelivery" />
  825. <Param name="@RecipTel_ExpressDelivery" type="ExpressDelivery.RecipTel_ExpressDelivery"
  826. sourceColumn="RecipTel_ExpressDelivery" />
  827. <Param name="@CustomerNo_ExpressDelivery" type="ExpressDelivery.CustomerNo_ExpressDelivery"
  828. sourceColumn="CustomerNo_ExpressDelivery" />
  829. <Param name="@ConsignCompany_ExpressDelivery" type="ExpressDelivery.ConsignCompany_ExpressDelivery"
  830. sourceColumn="ConsignCompany_ExpressDelivery" />
  831. <Param name="@ConsignProvince_ExpressDelivery" type="ExpressDelivery.ConsignProvince_ExpressDelivery"
  832. sourceColumn="ConsignProvince_ExpressDelivery" />
  833. <Param name="@ConsignCity_ExpressDelivery" type="ExpressDelivery.ConsignCity_ExpressDelivery"
  834. sourceColumn="ConsignCity_ExpressDelivery" />
  835. <Param name="@ConsignDistrict_ExpressDelivery" type="ExpressDelivery.ConsignDistrict_ExpressDelivery"
  836. sourceColumn="ConsignDistrict_ExpressDelivery" />
  837. <Param name="@ConsignAddress_ExpressDelivery" type="ExpressDelivery.ConsignAddress_ExpressDelivery"
  838. sourceColumn="ConsignAddress_ExpressDelivery" />
  839. <Param name="@ConsignTel_ExpressDelivery" type="ExpressDelivery.ConsignTel_ExpressDelivery"
  840. sourceColumn="ConsignTel_ExpressDelivery" />
  841. <Param name="@Consignor_ExpressDelivery" type="ExpressDelivery.Consignor_ExpressDelivery"
  842. sourceColumn="Consignor_ExpressDelivery" />
  843. <Param name="@Creator_ExpressDelivery" type="ExpressDelivery.Creator_ExpressDelivery" sourceColumn="Creator_ExpressDelivery" />
  844. <Param name="@CreateDate_ExpressDelivery" type="ExpressDelivery.CreateDate_ExpressDelivery"
  845. sourceColumn="CreateDate_ExpressDelivery" />
  846. <Param name="@Comment_ExpressDelivery" type="ExpressDelivery.Comment_ExpressDelivery" sourceColumn="Comment_ExpressDelivery" />
  847. <Param name="@LastModUser_ExpressDelivery" type="ExpressDelivery.LastModUser_ExpressDelivery"
  848. sourceColumn="LastModUser_ExpressDelivery" />
  849. <Param name="@LastModDate_ExpressDelivery" type="ExpressDelivery.LastModDate_ExpressDelivery"
  850. sourceColumn="LastModDate_ExpressDelivery" />
  851. <Param name="@NameCustomer_ExpressDelivery" type="ExpressDelivery.NameCustomer_ExpressDelivery"
  852. sourceColumn="NameCustomer_ExpressDelivery" />
  853. <Param name="@KeepPrice_ExpressDelivery" type="ExpressDelivery.KeepPrice_ExpressDelivery"
  854. sourceColumn="KeepPrice_ExpressDelivery" />
  855. <Param name="@ID_Assessor" type="ExpressDelivery.ID_Assessor"
  856. sourceColumn="ID_Assessor" />
  857. <Param name="@AssessDate_ExpressDelivery" type="ExpressDelivery.AssessDate_ExpressDelivery"
  858. sourceColumn="AssessDate_ExpressDelivery" />
  859. </Params>
  860. </New>
  861. <Update CmdType="Text" CmdText=" UPDATE ExpressDelivery Set
  862. No_ExpressDelivery =@No_ExpressDelivery ,
  863. Date_ExpressDelivery =@Date_ExpressDelivery,
  864. ID_Transporter =@ID_Transporter,
  865. Content_ExpressDelivery =@Content_ExpressDelivery,
  866. OtherContent_ExpressDelivery =@OtherContent_ExpressDelivery,
  867. Quantity_ExpressDelivery =@Quantity_ExpressDelivery,
  868. Weight_ExpressDelivery =@Weight_ExpressDelivery,
  869. PayMethod_ExpressDelivery =@PayMethod_ExpressDelivery,
  870. ThirdPart_ExpressDelivery =@ThirdPart_ExpressDelivery,
  871. Currency_ExpressDelivery =@Currency_ExpressDelivery,
  872. Carriage_ExpressDelivery =@Carriage_ExpressDelivery,
  873. HavePay_ExpressDelivery =@HavePay_ExpressDelivery,
  874. BalanceMonthly_ExpressDelivery =@BalanceMonthly_ExpressDelivery,
  875. Account_ExpressDelivery =@Account_ExpressDelivery,
  876. ID_Customer =@ID_Customer,
  877. RecipProvince_ExpressDelivery =@RecipProvince_ExpressDelivery,
  878. RecipCity_ExpressDelivery =@RecipCity_ExpressDelivery,
  879. RecipDistrict_ExpressDelivery =@RecipDistrict_ExpressDelivery,
  880. RecipAddress_ExpressDelivery =@RecipAddress_ExpressDelivery,
  881. Reciptor_ExpressDelivery =@Reciptor_ExpressDelivery,
  882. RecipTel_ExpressDelivery =@RecipTel_ExpressDelivery,
  883. CustomerNo_ExpressDelivery =@CustomerNo_ExpressDelivery,
  884. ConsignCompany_ExpressDelivery =@ConsignCompany_ExpressDelivery,
  885. ConsignProvince_ExpressDelivery =@ConsignProvince_ExpressDelivery,
  886. ConsignCity_ExpressDelivery =@ConsignCity_ExpressDelivery,
  887. ConsignDistrict_ExpressDelivery =@ConsignDistrict_ExpressDelivery,
  888. ConsignAddress_ExpressDelivery =@ConsignAddress_ExpressDelivery,
  889. ConsignTel_ExpressDelivery =@ConsignTel_ExpressDelivery,
  890. Consignor_ExpressDelivery =@Consignor_ExpressDelivery,
  891. Creator_ExpressDelivery =@Creator_ExpressDelivery,
  892. CreateDate_ExpressDelivery =@CreateDate_ExpressDelivery,
  893. Comment_ExpressDelivery =@Comment_ExpressDelivery,
  894. LastModUser_ExpressDelivery =@LastModUser_ExpressDelivery,
  895. LastModDate_ExpressDelivery =@LastModDate_ExpressDelivery,
  896. NameCustomer_ExpressDelivery=@NameCustomer_ExpressDelivery,
  897. KeepPrice_ExpressDelivery=@KeepPrice_ExpressDelivery,
  898. ID_Assessor=@ID_Assessor,
  899. AssessDate_ExpressDelivery=@AssessDate_ExpressDelivery
  900. Where ID_ExpressDelivery =@ID_ExpressDelivery">
  901. <Params>
  902. <Param name="@ID_ExpressDelivery" type="ExpressDelivery.ID_ExpressDelivery" sourceColumn="ID_ExpressDelivery" />
  903. <Param name="@No_ExpressDelivery" type="ExpressDelivery.No_ExpressDelivery" sourceColumn="No_ExpressDelivery" />
  904. <Param name="@Date_ExpressDelivery" type="ExpressDelivery.Date_ExpressDelivery" sourceColumn="Date_ExpressDelivery" />
  905. <Param name="@ID_Transporter" type="ExpressDelivery.ID_Transporter" sourceColumn="ID_Transporter" />
  906. <Param name="@Content_ExpressDelivery" type="ExpressDelivery.Content_ExpressDelivery" sourceColumn="Content_ExpressDelivery" />
  907. <Param name="@OtherContent_ExpressDelivery" type="ExpressDelivery.OtherContent_ExpressDelivery"
  908. sourceColumn="OtherContent_ExpressDelivery" />
  909. <Param name="@Quantity_ExpressDelivery" type="ExpressDelivery.Quantity_ExpressDelivery"
  910. sourceColumn="Quantity_ExpressDelivery" />
  911. <Param name="@Weight_ExpressDelivery" type="ExpressDelivery.Weight_ExpressDelivery" sourceColumn="Weight_ExpressDelivery" />
  912. <Param name="@PayMethod_ExpressDelivery" type="ExpressDelivery.PayMethod_ExpressDelivery"
  913. sourceColumn="PayMethod_ExpressDelivery" />
  914. <Param name="@ThirdPart_ExpressDelivery" type="ExpressDelivery.ThirdPart_ExpressDelivery"
  915. sourceColumn="ThirdPart_ExpressDelivery" />
  916. <Param name="@Currency_ExpressDelivery" type="ExpressDelivery.Currency_ExpressDelivery"
  917. sourceColumn="Currency_ExpressDelivery" />
  918. <Param name="@Carriage_ExpressDelivery" type="ExpressDelivery.Carriage_ExpressDelivery"
  919. sourceColumn="Carriage_ExpressDelivery" />
  920. <Param name="@HavePay_ExpressDelivery" type="ExpressDelivery.HavePay_ExpressDelivery" sourceColumn="HavePay_ExpressDelivery" />
  921. <Param name="@BalanceMonthly_ExpressDelivery" type="ExpressDelivery.BalanceMonthly_ExpressDelivery"
  922. sourceColumn="BalanceMonthly_ExpressDelivery" />
  923. <Param name="@Account_ExpressDelivery" type="ExpressDelivery.Account_ExpressDelivery" sourceColumn="Account_ExpressDelivery" />
  924. <Param name="@ID_Customer" type="ExpressDelivery.ID_Customer" sourceColumn="ID_Customer" />
  925. <Param name="@RecipProvince_ExpressDelivery" type="ExpressDelivery.RecipProvince_ExpressDelivery"
  926. sourceColumn="RecipProvince_ExpressDelivery" />
  927. <Param name="@RecipCity_ExpressDelivery" type="ExpressDelivery.RecipCity_ExpressDelivery"
  928. sourceColumn="RecipCity_ExpressDelivery" />
  929. <Param name="@RecipDistrict_ExpressDelivery" type="ExpressDelivery.RecipDistrict_ExpressDelivery"
  930. sourceColumn="RecipDistrict_ExpressDelivery" />
  931. <Param name="@RecipAddress_ExpressDelivery" type="ExpressDelivery.RecipAddress_ExpressDelivery"
  932. sourceColumn="RecipAddress_ExpressDelivery" />
  933. <Param name="@Reciptor_ExpressDelivery" type="ExpressDelivery.Reciptor_ExpressDelivery"
  934. sourceColumn="Reciptor_ExpressDelivery" />
  935. <Param name="@RecipTel_ExpressDelivery" type="ExpressDelivery.RecipTel_ExpressDelivery"
  936. sourceColumn="RecipTel_ExpressDelivery" />
  937. <Param name="@CustomerNo_ExpressDelivery" type="ExpressDelivery.CustomerNo_ExpressDelivery"
  938. sourceColumn="CustomerNo_ExpressDelivery" />
  939. <Param name="@ConsignCompany_ExpressDelivery" type="ExpressDelivery.ConsignCompany_ExpressDelivery"
  940. sourceColumn="ConsignCompany_ExpressDelivery" />
  941. <Param name="@ConsignProvince_ExpressDelivery" type="ExpressDelivery.ConsignProvince_ExpressDelivery"
  942. sourceColumn="ConsignProvince_ExpressDelivery" />
  943. <Param name="@ConsignCity_ExpressDelivery" type="ExpressDelivery.ConsignCity_ExpressDelivery"
  944. sourceColumn="ConsignCity_ExpressDelivery" />
  945. <Param name="@ConsignDistrict_ExpressDelivery" type="ExpressDelivery.ConsignDistrict_ExpressDelivery"
  946. sourceColumn="ConsignDistrict_ExpressDelivery" />
  947. <Param name="@ConsignAddress_ExpressDelivery" type="ExpressDelivery.ConsignAddress_ExpressDelivery"
  948. sourceColumn="ConsignAddress_ExpressDelivery" />
  949. <Param name="@ConsignTel_ExpressDelivery" type="ExpressDelivery.ConsignTel_ExpressDelivery"
  950. sourceColumn="ConsignTel_ExpressDelivery" />
  951. <Param name="@Consignor_ExpressDelivery" type="ExpressDelivery.Consignor_ExpressDelivery"
  952. sourceColumn="Consignor_ExpressDelivery" />
  953. <Param name="@Creator_ExpressDelivery" type="ExpressDelivery.Creator_ExpressDelivery" sourceColumn="Creator_ExpressDelivery" />
  954. <Param name="@CreateDate_ExpressDelivery" type="ExpressDelivery.CreateDate_ExpressDelivery"
  955. sourceColumn="CreateDate_ExpressDelivery" />
  956. <Param name="@Comment_ExpressDelivery" type="ExpressDelivery.Comment_ExpressDelivery" sourceColumn="Comment_ExpressDelivery" />
  957. <Param name="@LastModUser_ExpressDelivery" type="ExpressDelivery.LastModUser_ExpressDelivery"
  958. sourceColumn="LastModUser_ExpressDelivery" />
  959. <Param name="@LastModDate_ExpressDelivery" type="ExpressDelivery.LastModDate_ExpressDelivery"
  960. sourceColumn="LastModDate_ExpressDelivery" />
  961. <Param name="@NameCustomer_ExpressDelivery" type="ExpressDelivery.NameCustomer_ExpressDelivery"
  962. sourceColumn="NameCustomer_ExpressDelivery" />
  963. <Param name="@KeepPrice_ExpressDelivery" type="ExpressDelivery.KeepPrice_ExpressDelivery"
  964. sourceColumn="KeepPrice_ExpressDelivery" />
  965. <Param name="@ID_Assessor" type="ExpressDelivery.ID_Assessor"
  966. sourceColumn="ID_Assessor" />
  967. <Param name="@AssessDate_ExpressDelivery" type="ExpressDelivery.AssessDate_ExpressDelivery"
  968. sourceColumn="AssessDate_ExpressDelivery" />
  969. </Params>
  970. </Update>
  971. <Audit CmdType="Text" CmdText="UPDATE ExpressDelivery SET ID_Assessor = @ID_Assessor,
  972. AssessDate_ExpressDelivery = @AssessDate_ExpressDelivery
  973. WHERE ID_ExpressDelivery = @ID_ExpressDelivery">
  974. <Params>
  975. <Param name="@ID_Assessor" type="ExpressDelivery.ID_Assessor" sourceColumn="ID_Assessor" />
  976. <Param name="@ID_ExpressDelivery" type="ExpressDelivery.ID_ExpressDelivery" sourceColumn="ID_ExpressDelivery" />
  977. <Param name="@AssessDate_ExpressDelivery" type="ExpressDelivery.AssessDate_ExpressDelivery" sourceColumn="AssessDate_ExpressDelivery" />
  978. </Params>
  979. </Audit>
  980. <Delete CmdType="Text" CmdText=" Delete ExpressDeliveryDetail WHERE ID_ExpressDelivery = @ID_ExpressDelivery
  981. DELETE ExpressDelivery WHERE ID_ExpressDelivery = @ID_ExpressDelivery
  982. ">
  983. <Params>
  984. <Param name="@ID_ExpressDelivery" type="Transporter.ID_ExpressDelivery" sourceColumn="ID_ExpressDelivery" />
  985. </Params>
  986. </Delete>
  987. </Table>
  988. <Table name="ExpressDeliveryDetail" Type="Child">
  989. <GetSchema CmdType="Text" CmdText="Select Top 0 ExpressDeliveryDetail.*,Convert(Nvarchar(64),'') AS Name_FromBill From ExpressDeliveryDetail" />
  990. <New CmdType="Text" CmdText="Insert Into ExpressDeliveryDetail(ID_ExpressDeliveryDetail,ID_ExpressDelivery,Type_FromBill,No_FromBill)
  991. Values(@ID_ExpressDeliveryDetail,@ID_ExpressDelivery,@Type_FromBill,@No_FromBill)">
  992. <Params>
  993. <Param name="@ID_ExpressDeliveryDetail" type="ExpressDeliveryDetail.ID_ExpressDeliveryDetail"
  994. sourceColumn="ID_ExpressDeliveryDetail" />
  995. <Param name="@ID_ExpressDelivery" type="ExpressDeliveryDetail.ID_ExpressDelivery" sourceColumn="ID_ExpressDelivery" />
  996. <Param name="@Type_FromBill" type="ExpressDeliveryDetail.Type_FromBill" sourceColumn="Type_FromBill" />
  997. <Param name="@No_FromBill" type="ExpressDeliveryDetail.No_FromBill" sourceColumn="No_FromBill" />
  998. </Params>
  999. </New>
  1000. <Update CmdType="Text" CmdText="UPDATE ExpressDeliveryDetail Set
  1001. ID_ExpressDelivery = @ID_ExpressDelivery,
  1002. Type_FromBill = @Type_FromBill,
  1003. No_FromBill = @No_FromBill
  1004. Where ID_ExpressDeliveryDetail = @ID_ExpressDeliveryDetail">
  1005. <Params>
  1006. <Param name="@ID_ExpressDeliveryDetail" type="ExpressDeliveryDetail.ID_ExpressDeliveryDetail"
  1007. sourceColumn="ID_ExpressDeliveryDetail" />
  1008. <Param name="@ID_ExpressDelivery" type="ExpressDeliveryDetail.ID_ExpressDelivery" sourceColumn="ID_ExpressDelivery" />
  1009. <Param name="@Type_FromBill" type="ExpressDeliveryDetail.Type_FromBill" sourceColumn="Type_FromBill" />
  1010. <Param name="@No_FromBill" type="ExpressDeliveryDetail.No_FromBill" sourceColumn="No_FromBill" />
  1011. </Params>
  1012. </Update>
  1013. <Delete CmdType="Text" CmdText="Delete ExpressDeliveryDetail WHERE ID_ExpressDeliveryDetail = @ID_ExpressDeliveryDetail">
  1014. <Params>
  1015. <Param name="@ID_ExpressDeliveryDetail" type="ExpressDeliveryDetail.ID_ExpressDeliveryDetail"
  1016. sourceColumn="ID_ExpressDeliveryDetail" />
  1017. </Params>
  1018. </Delete>
  1019. </Table>
  1020. </Tables>
  1021. <Search>
  1022. <SearchAllModifyDepotBill CmdType="Text" CmdText=" SELECT M.*,
  1023. L.Name_Location AS ChangedDepot_ModifyDepotBill,
  1024. L.No_Location AS ChangedDepotNo_ModifyDepotBill,
  1025. MD.ModName_ModifyTypeSettings AS ModifyDepotBill_ModifyDepotBill,
  1026. E.Name_Employee AS Proposer_ModifyDepotBill,
  1027. E.No_Employee AS ProposerNo_ModifyDepotBill,
  1028. A.Name_User AS Maker_ModifyDepotBill,
  1029. A1.Name_User AS Assessor_ModifyDepotBill,
  1030. A2.Name_User AS lastModflyuser_ModifyDepotBill,
  1031. convert(decimal(18,2),0.00) AS Sum_ModifyDepotBill,
  1032. convert(decimal(18,2),0.00) AS Amount_ModifyDepotBill
  1033. FROM ModifyDepotBill M
  1034. INNER JOIN LOCATION L ON M.ID_Location = L.ID_Location
  1035. LEFT JOIN ModifyTypeSettings MD ON MD.ID_ModifyTypeSettings = M.Style_ModifyDepotBill
  1036. INNER JOIN Employee E ON E.ID_Employee = M.ID_Proposer
  1037. INNER JOIN AppUser A ON A.ID_User = M.ID_Creator
  1038. LEFT JOIN AppUser A1 ON A1.ID_User = M.ID_Assessor
  1039. LEFT JOIN AppUser A2 ON A2.ID_User = M.LastModUser_ModifyDepotBill">
  1040. <Tables>
  1041. <Table name="AllModifyDepotBill" />
  1042. </Tables>
  1043. </SearchAllModifyDepotBill>
  1044. <SearchAllSaleOutDepotBill CmdType="Text" CmdText=" SELECT SaleOutDepotBill.*,a.Name_User,b.Name_User as Name_UserAuti,c.Name_User as Name_LastModUser,No_SaleOutDepotBill As No_FormBill,
  1045. Location.Name_Location,Location.No_Location FROM SaleOutDepotBill
  1046. LEFT JOIN AppUser a ON a.ID_User = SaleOutDepotBill.ID_Creator
  1047. LEFT JOIN AppUser b ON b.ID_User = SaleOutDepotBill.ID_Assessor
  1048. Left JOIN AppUser c ON c.ID_User = SaleOutDepotBill.LastModUser_SaleOutDepotBill
  1049. LEFT JOIN Location ON Location.ID_Location = SaleOutDepotBill.ID_Location">
  1050. <Tables>
  1051. <Table name="AllSaleOutDepotBill" />
  1052. </Tables>
  1053. </SearchAllSaleOutDepotBill>
  1054. <SearchAllBill CmdType="Text" CmdText=" SELECT ExpressDelivery.*,
  1055. Transporter.No_Transporter, Transporter.Name_Transporter,
  1056. a.Name_User as NameCreator_ExpressDelivery, b.Name_User as NameLastModUser_ExpressDelivery
  1057. FROM ExpressDelivery
  1058. LEFT JOIN Transporter ON Transporter.ID_Transporter = ExpressDelivery.ID_Transporter
  1059. LEFT JOIN AppUser a ON a.ID_User = ExpressDelivery.Creator_ExpressDelivery
  1060. LEFT JOIN AppUser b ON b.ID_User = ExpressDelivery.LastModUser_ExpressDelivery">
  1061. <Tables>
  1062. <Table name="AllBill" />
  1063. </Tables>
  1064. </SearchAllBill>
  1065. <SearchAllCustomer CmdType="Text" CmdText="SELECT Customer.No_Customer,Customer.ShortName_Customer,Customer.Type_Customer,Customer.Level_Customer,Customer.IsGeneric_Customer FROM Customer ">
  1066. <Tables>
  1067. <Table name="AllCustomer" />
  1068. </Tables>
  1069. </SearchAllCustomer>
  1070. <SearchExpressDeliveryWithNo CmdType="Text" CmdText=" DECLARE @ID_ExpressDelivery UNIQUEIDENTIFIER
  1071. SELECT @ID_ExpressDelivery = ID_ExpressDelivery FROM ExpressDelivery WHERE No_ExpressDelivery = @No_ExpressDelivery
  1072. SELECT ExpressDelivery.*,No_Customer,ShortName_Customer,Name_Customer, Name_Content = Case Content_ExpressDelivery When 1 Then '资料' When 2 Then '包裹' When 3 Then '其他' End,
  1073. Name_PayMethod = Case PayMethod_ExpressDelivery When 1 Then '寄方付' When 2 Then '收方付' When 3 Then '第三方付' End,
  1074. Transporter.No_Transporter, Transporter.Name_Transporter,
  1075. a.Name_User as NameCreator_ExpressDelivery, b.Name_User as NameLastModUser_ExpressDelivery ,c.Name_User AS Name_Assessor
  1076. FROM ExpressDelivery
  1077. LEFT JOIN Customer ON Customer.ID_Customer = ExpressDelivery.ID_Customer
  1078. LEFT JOIN Transporter ON Transporter.ID_Transporter = ExpressDelivery.ID_Transporter
  1079. LEFT JOIN AppUser a ON a.ID_User = ExpressDelivery.Creator_ExpressDelivery
  1080. LEFT JOIN AppUser b ON b.ID_User = ExpressDelivery.LastModUser_ExpressDelivery
  1081. LEFT JOIN AppUser c ON c.ID_User = ExpressDelivery.ID_Assessor
  1082. WHERE ExpressDelivery.ID_ExpressDelivery = @ID_ExpressDelivery
  1083. Select ExpressDeliveryDetail.*,BillType.Type_BillType,Name_FromBill = Case Type_FromBill When 2 Then '销货出库单' When 3 Then '库存异动作业' End From ExpressDeliveryDetail
  1084. Inner Join BillType On BillType.Value_BillType = ExpressDeliveryDetail.Type_FromBill WHERE ExpressDeliveryDetail.ID_ExpressDelivery = @ID_ExpressDelivery">
  1085. <Params>
  1086. <Param name="@No_ExpressDelivery" type="ExpressDelivery.No_ExpressDelivery" Index="0" />
  1087. </Params>
  1088. <Tables>
  1089. <Table name="ExpressDelivery" />
  1090. <Table name="ExpressDeliveryDetail" />
  1091. </Tables>
  1092. </SearchExpressDeliveryWithNo>
  1093. <SearchFromBillType CmdType="Text" CmdText=" SELECT * FROM BillType WHERE Value_BillType = 2 OR Value_BillType = 3 OR Value_BillType = 0 ORDER BY Value_BillType">
  1094. <Tables>
  1095. <Table name="BillType" />
  1096. </Tables>
  1097. </SearchFromBillType>
  1098. <SearchOutDepotBillWithNo CmdType="Text" CmdText=" IF @Value_BillType = 2
  1099. BEGIN
  1100. SELECT SaleOutDepotBill.ID_SaleOutDepotBill FROM SaleOutDepotBill WHERE SaleOutDepotBill.No_SaleOutDepotBill = @No_FromBill
  1101. END
  1102. ELSE IF @Value_BillType = 3
  1103. BEGIN
  1104. SELECT ModifyDepotBill.ID_ModifyDepotBill FROM ModifyDepotBill WHERE ModifyDepotBill.No_ModifyDepotBill = @No_FromBill
  1105. END">
  1106. <Params>
  1107. <Param name="@Value_BillType" type="BillType.Value_BillType" Index="0" />
  1108. <Param name="@No_FromBill" type="ExpressDelivery.No_FromBill" Index="1" />
  1109. </Params>
  1110. <Tables>
  1111. <Table name="OutDepotBill" />
  1112. </Tables>
  1113. </SearchOutDepotBillWithNo>
  1114. <SearchTransporter CmdType="Text" CmdText=" SELECT Transporter.ID_Transporter, Transporter.No_Transporter, Transporter.Name_Transporter FROM Transporter ORDER BY Transporter.No_Transporter">
  1115. <Tables>
  1116. <Table name="Transporter" />
  1117. </Tables>
  1118. </SearchTransporter>
  1119. <SearchSystemSetting CmdType="Text" CmdText="SELECT SysCurrency_SystemSetting From SystemSetting">
  1120. <Tables>
  1121. <Table name="SystemSetting" />
  1122. </Tables>
  1123. </SearchSystemSetting>
  1124. <CheckExpressDeliveryNo CmdType="Text" CmdText=" SELECT ExpressDelivery.ID_ExpressDelivery FROM ExpressDelivery WHERE ExpressDelivery.No_ExpressDelivery = @No_ExpressDelivery">
  1125. <Params>
  1126. <Param name="@No_ExpressDelivery" type="ExpressDelivery.No_ExpressDelivery" Index="0" />
  1127. </Params>
  1128. <Tables>
  1129. <Table name="ExpressDeliveryBillNo" />
  1130. </Tables>
  1131. </CheckExpressDeliveryNo>
  1132. <SearchCustomerWithNo CmdType="Text" CmdText="Select ID_Customer,ShortName_Customer,Name_Customer,SendAddr_Customer From Customer Where No_Customer = @No_Customer">
  1133. <Params>
  1134. <Param name="@No_Customer" type="Customer.No_Customer" Index="0" />
  1135. </Params>
  1136. <Tables>
  1137. <Table name="Customer" />
  1138. </Tables>
  1139. </SearchCustomerWithNo>
  1140. <SearchReciptor CmdType="Text" CmdText="SELECT Name_Linkman AS Reciptor_ExpressDelivery,Tel_Linkman AS RecipTel_ExpressDelivery FROM Linkman
  1141. LEFT JOIN Customer ON Customer.ID_Customer = Linkman.ID_Person
  1142. WHERE Customer.No_Customer = @No_Customer ">
  1143. <Params>
  1144. <Param name="@No_Customer" type="Customer.No_Customer" Index="0" />
  1145. </Params>
  1146. <Tables>
  1147. <Table name="Reciptor" />
  1148. </Tables>
  1149. </SearchReciptor>
  1150. <SearchReciptor1 CmdType="Text" CmdText="SELECT top 1 Name_Linkman AS Reciptor_ExpressDelivery,Tel_Linkman AS RecipTel_ExpressDelivery FROM Linkman
  1151. LEFT JOIN Customer ON Customer.ID_Customer = Linkman.ID_Person
  1152. WHERE Customer.No_Customer = @No_Customer ">
  1153. <Params>
  1154. <Param name="@No_Customer" type="Customer.No_Customer" Index="0" />
  1155. </Params>
  1156. <Tables>
  1157. <Table name="Reciptor1" />
  1158. </Tables>
  1159. </SearchReciptor1>
  1160. <SearchConsignor CmdType="Text" CmdText="SELECT Name_Employee AS Consignor_ExpressDelivery FROM Employee">
  1161. <Tables>
  1162. <Table name="Consignor" />
  1163. </Tables>
  1164. </SearchConsignor>
  1165. <SearchConsignTel ConnectDB="ManageDB" CmdType="Text" CmdText="
  1166. Select Tel_Company AS ConsignTel_ExpressDelivery,SendAddress_Company As ConsignAddress_ExpressDelivery,Name_Company AS ConsignCompany_ExpressDelivery From Company Where ID_Company = @ID_Company">
  1167. <Params>
  1168. <Param name="@ID_Company" type="Company.ID_Company" Index="0" />
  1169. </Params>
  1170. <Tables>
  1171. <Table name="ConsignTel" />
  1172. </Tables>
  1173. </SearchConsignTel>
  1174. <SearchSaleOutDepotBillWithNo CmdType="Text" CmdText="Select * From SaleOutDepotBill Where No_SaleOutDepotBill = @No_SaleOutDepotBill And ID_Assessor Is Not Null">
  1175. <Params>
  1176. <Param name="@No_SaleOutDepotBill" type="SaleOutDepotBill.No_SaleOutDepotBill" Index="0" />
  1177. </Params>
  1178. <Tables>
  1179. <Table name="SaleOutDepotBill" />
  1180. </Tables>
  1181. </SearchSaleOutDepotBillWithNo>
  1182. <SearchModifyBillWithNo CmdType="Text" CmdText="Select * From ModifyDepotBill Where No_ModifyDepotBill = @No_ModifyDepotBill And ID_Assessor Is Not Null">
  1183. <Params>
  1184. <Param name="@No_ModifyDepotBill" type="ModifyDepotBill.No_ModifyDepotBill" Index="0" />
  1185. </Params>
  1186. <Tables>
  1187. <Table name="ModifyDepotBill" />
  1188. </Tables>
  1189. </SearchModifyBillWithNo>
  1190. <SearchStatusWithNo CmdType="Text" CmdText="Select Check_ExpressDelivery From ExpressDelivery Where No_ExpressDelivery = @No_ExpressDelivery">
  1191. <Params>
  1192. <Param name="@No_ExpressDelivery" type="ExpressDelivery.No_ExpressDelivery" Index="0" />
  1193. </Params>
  1194. <Tables>
  1195. <Table name="Status" />
  1196. </Tables>
  1197. </SearchStatusWithNo>
  1198. <SearchCustomerWithBillNo CmdType="Text" CmdText="Select No_Customer From SaleOutDepotBill
  1199. Left Join Customer On Customer.ID_Customer = SaleOutDepotBill.ID_Customer
  1200. Where No_SaleOutDepotBill = @No_SaleOutDepotBill">
  1201. <Params>
  1202. <Param name="@No_SaleOutDepotBill" type="SaleOutDepotBill.No_SaleOutDepotBill" Index="0" />
  1203. </Params>
  1204. <Tables>
  1205. <Table name="BillCustomer" />
  1206. </Tables>
  1207. </SearchCustomerWithBillNo>
  1208. <SearchContent_ExpressDelivery CmdType="Text" CmdText="Create Table #Table
  1209. (
  1210. Content_ExpressDelivery Int,
  1211. Name_Content Nvarchar(64)
  1212. )
  1213. Insert Into #Table(Content_ExpressDelivery,Name_Content) Values(1,'资料')
  1214. Insert Into #Table(Content_ExpressDelivery,Name_Content) Values(2,'包裹')
  1215. Insert Into #Table(Content_ExpressDelivery,Name_Content) Values(3,'其他')
  1216. Select Content_ExpressDelivery,Name_Content From #Table
  1217. Drop Table #Table">
  1218. <Tables>
  1219. <Table name="Content" />
  1220. </Tables>
  1221. </SearchContent_ExpressDelivery>
  1222. <SearchPayMethod_ExpressDelivery CmdType="Text" CmdText="Create Table #Table
  1223. (
  1224. PayMethod_ExpressDelivery Int,
  1225. Name_PayMethod Nvarchar(64)
  1226. )
  1227. Insert Into #Table(PayMethod_ExpressDelivery,Name_PayMethod) Values(1,'寄方付')
  1228. Insert Into #Table(PayMethod_ExpressDelivery,Name_PayMethod) Values(2,'收方付')
  1229. Insert Into #Table(PayMethod_ExpressDelivery,Name_PayMethod) Values(3,'第三方付')
  1230. Select PayMethod_ExpressDelivery,Name_PayMethod From #Table
  1231. Drop Table #Table">
  1232. <Tables>
  1233. <Table name="PayMethod" />
  1234. </Tables>
  1235. </SearchPayMethod_ExpressDelivery>
  1236. <SearchProductMoney CmdType="Text" CmdText="Declare @CessOut_SystemSetting Decimal(14,2)
  1237. Select @CessOut_SystemSetting = CessOut_SystemSetting From SystemSetting
  1238. Select IsNull(Sum(SumMoney),0) AS SumMoney From (
  1239. Select SumMoney = Case TaxCurrency_SaleBill When '外加' Then (Quantity_SaleBillProduct * UnitPrice_SaleBillProduct)*(1+@CessOut_SystemSetting/100) Else (Quantity_SaleBillProduct * UnitPrice_SaleBillProduct) End From SaleBill
  1240. Left Join SaleBillProduct On SaleBillProduct.ID_SaleBill = SaleBill.ID_SaleBill
  1241. Where SaleBill.ID_Assessor Is Not Null And ID_Product in (Select ID_Product From SaleOutDepotBill
  1242. Left Join SaleOutDepotBillProduct On SaleOutDepotBillProduct.ID_SaleOutDepotBill = SaleOutDepotBill.ID_SaleOutDepotBill
  1243. Where SaleOutDepotBill.ID_Assessor Is Not Null And Type_FromBill = 21
  1244. And No_SaleOutDepotBill = @No_SaleOutDepotBill)
  1245. And No_SaleBill in (Select No_FromBill From SaleOutDepotBill
  1246. Left Join SaleOutDepotBillProduct On SaleOutDepotBillProduct.ID_SaleOutDepotBill = SaleOutDepotBill.ID_SaleOutDepotBill
  1247. Where SaleOutDepotBill.ID_Assessor Is Not Null And Type_FromBill = 21
  1248. And No_SaleOutDepotBill = @No_SaleOutDepotBill)
  1249. )A">
  1250. <Params>
  1251. <Param name="@No_SaleOutDepotBill" type="SaleOutDepotBill.No_SaleOutDepotBill" Index="0" />
  1252. </Params>
  1253. <Tables>
  1254. <Table name="ProductMoney" />
  1255. </Tables>
  1256. </SearchProductMoney>
  1257. <SearchSaleOutDepotBillAndCustomerWithNo CmdType="Text" CmdText="Select Top 1 SaleOutDepotBill.*,Customer.*,Name_Linkman,Tel_Linkman From SaleOutDepotBill
  1258. Left Join Customer On Customer.ID_Customer = SaleOutDepotBill.ID_Customer
  1259. Left Join Linkman ON Customer.ID_Customer = Linkman.ID_Person
  1260. Where No_SaleOutDepotBill = @No_SaleOutDepotBill And IsMain_Linkman = 1">
  1261. <Params>
  1262. <Param name="@No_SaleOutDepotBill" type="SaleOutDepotBill.No_SaleOutDepotBill" Index="0" />
  1263. </Params>
  1264. <Tables>
  1265. <Table name="SC" />
  1266. </Tables>
  1267. </SearchSaleOutDepotBillAndCustomerWithNo>
  1268. <SearchExpressDeliveryFirst CmdType="Text" CmdText=" DECLARE @ID_ExpressDelivery uniqueidentifier
  1269. DECLARE @ExpressDeliveryNo nvarchar(64)
  1270. SELECT TOP 1 @ExpressDeliveryNo = ExpressDelivery.No_ExpressDelivery FROM ExpressDelivery ORDER BY ExpressDelivery.No_ExpressDelivery
  1271. SELECT @ID_ExpressDelivery = ID_ExpressDelivery FROM ExpressDelivery WHERE No_ExpressDelivery = @ExpressDeliveryNo
  1272. SELECT ExpressDelivery.*,No_Customer,Name_Customer,ShortName_Customer,
  1273. Transporter.No_Transporter, Transporter.Name_Transporter,Name_Content = Case Content_ExpressDelivery When 1 Then '资料' When 2 Then '包裹' When 3 Then '其他' End,
  1274. Name_PayMethod = Case PayMethod_ExpressDelivery When 1 Then '寄方付' When 2 Then '收方付' When 3 Then '第三方付' End,
  1275. a.Name_User as NameCreator_ExpressDelivery, b.Name_User as NameLastModUser_ExpressDelivery ,c.Name_User AS Name_Assessor
  1276. FROM ExpressDelivery
  1277. LEFT JOIN Customer ON Customer.ID_Customer = ExpressDelivery.ID_Customer
  1278. LEFT JOIN Transporter ON Transporter.ID_Transporter = ExpressDelivery.ID_Transporter
  1279. LEFT JOIN AppUser a ON a.ID_User = ExpressDelivery.Creator_ExpressDelivery
  1280. LEFT JOIN AppUser b ON b.ID_User = ExpressDelivery.LastModUser_ExpressDelivery
  1281. LEFT JOIN AppUser c ON c.ID_User = ExpressDelivery.ID_Assessor
  1282. WHERE ExpressDelivery.ID_ExpressDelivery = @ID_ExpressDelivery
  1283. Select ExpressDeliveryDetail.*,BillType.Type_BillType,Name_FromBill = Case Type_FromBill When 2 Then '销货出库单' When 3 Then '库存异动作业' End From ExpressDeliveryDetail
  1284. Inner Join BillType On BillType.Value_BillType = ExpressDeliveryDetail.Type_FromBill WHERE ExpressDeliveryDetail.ID_ExpressDelivery = @ID_ExpressDelivery">
  1285. <Tables>
  1286. <Table name="ExpressDelivery" />
  1287. <Table name="ExpressDeliveryDetail" />
  1288. </Tables>
  1289. </SearchExpressDeliveryFirst>
  1290. <SearchExpressDeliveryPrevious CmdType="Text" CmdText=" DECLARE @ID_ExpressDelivery uniqueidentifier
  1291. DECLARE @ExpressDeliveryNo nvarchar(64)
  1292. SELECT TOP 1 @ExpressDeliveryNo = ExpressDelivery.No_ExpressDelivery FROM ExpressDelivery WHERE ExpressDelivery.No_ExpressDelivery &lt; @No_ExpressDelivery ORDER BY ExpressDelivery.No_ExpressDelivery DESC
  1293. SELECT @ID_ExpressDelivery = ID_ExpressDelivery FROM ExpressDelivery WHERE No_ExpressDelivery = @ExpressDeliveryNo
  1294. SELECT ExpressDelivery.*,No_Customer,Name_Customer,ShortName_Customer,
  1295. Transporter.No_Transporter, Transporter.Name_Transporter,Name_Content = Case Content_ExpressDelivery When 1 Then '资料' When 2 Then '包裹' When 3 Then '其他' End,
  1296. Name_PayMethod = Case PayMethod_ExpressDelivery When 1 Then '寄方付' When 2 Then '收方付' When 3 Then '第三方付' End,
  1297. a.Name_User as NameCreator_ExpressDelivery, b.Name_User as NameLastModUser_ExpressDelivery ,c.Name_User AS Name_Assessor
  1298. FROM ExpressDelivery
  1299. LEFT JOIN Customer ON Customer.ID_Customer = ExpressDelivery.ID_Customer
  1300. LEFT JOIN Transporter ON Transporter.ID_Transporter = ExpressDelivery.ID_Transporter
  1301. LEFT JOIN AppUser a ON a.ID_User = ExpressDelivery.Creator_ExpressDelivery
  1302. LEFT JOIN AppUser b ON b.ID_User = ExpressDelivery.LastModUser_ExpressDelivery
  1303. LEFT JOIN AppUser c ON c.ID_User = ExpressDelivery.ID_Assessor
  1304. WHERE ExpressDelivery.ID_ExpressDelivery = @ID_ExpressDelivery
  1305. Select ExpressDeliveryDetail.*,BillType.Type_BillType,Name_FromBill = Case Type_FromBill When 2 Then '销货出库单' When 3 Then '库存异动作业' End From ExpressDeliveryDetail
  1306. Inner Join BillType On BillType.Value_BillType = ExpressDeliveryDetail.Type_FromBill WHERE ExpressDeliveryDetail.ID_ExpressDelivery = @ID_ExpressDelivery">
  1307. <Params>
  1308. <Param name="@No_ExpressDelivery" type="ExpressDelivery.No_ExpressDelivery" Index="0" />
  1309. </Params>
  1310. <Tables>
  1311. <Table name="ExpressDelivery" />
  1312. <Table name="ExpressDeliveryDetail" />
  1313. </Tables>
  1314. </SearchExpressDeliveryPrevious>
  1315. <SearchExpressDeliveryNext CmdType="Text" CmdText=" DECLARE @ID_ExpressDelivery uniqueidentifier
  1316. DECLARE @ExpressDeliveryNo nvarchar(64)
  1317. SELECT TOP 1 @ExpressDeliveryNo = ExpressDelivery.No_ExpressDelivery FROM ExpressDelivery WHERE ExpressDelivery.No_ExpressDelivery &gt; @No_ExpressDelivery ORDER BY ExpressDelivery.No_ExpressDelivery
  1318. SELECT @ID_ExpressDelivery = ID_ExpressDelivery FROM ExpressDelivery WHERE No_ExpressDelivery = @ExpressDeliveryNo
  1319. SELECT ExpressDelivery.*,No_Customer,Name_Customer,ShortName_Customer,
  1320. Transporter.No_Transporter, Transporter.Name_Transporter,Name_Content = Case Content_ExpressDelivery When 1 Then '资料' When 2 Then '包裹' When 3 Then '其他' End,
  1321. Name_PayMethod = Case PayMethod_ExpressDelivery When 1 Then '寄方付' When 2 Then '收方付' When 3 Then '第三方付' End,
  1322. a.Name_User as NameCreator_ExpressDelivery, b.Name_User as NameLastModUser_ExpressDelivery ,c.Name_User AS Name_Assessor
  1323. FROM ExpressDelivery
  1324. LEFT JOIN Customer ON Customer.ID_Customer = ExpressDelivery.ID_Customer
  1325. LEFT JOIN Transporter ON Transporter.ID_Transporter = ExpressDelivery.ID_Transporter
  1326. LEFT JOIN AppUser a ON a.ID_User = ExpressDelivery.Creator_ExpressDelivery
  1327. LEFT JOIN AppUser b ON b.ID_User = ExpressDelivery.LastModUser_ExpressDelivery
  1328. LEFT JOIN AppUser c ON c.ID_User = ExpressDelivery.ID_Assessor
  1329. WHERE ExpressDelivery.ID_ExpressDelivery = @ID_ExpressDelivery
  1330. Select ExpressDeliveryDetail.*,BillType.Type_BillType,Name_FromBill = Case Type_FromBill When 2 Then '销货出库单' When 3 Then '库存异动作业' End From ExpressDeliveryDetail
  1331. Inner Join BillType On BillType.Value_BillType = ExpressDeliveryDetail.Type_FromBill WHERE ExpressDeliveryDetail.ID_ExpressDelivery = @ID_ExpressDelivery">
  1332. <Params>
  1333. <Param name="@No_ExpressDelivery" type="ExpressDelivery.No_ExpressDelivery" Index="0" />
  1334. </Params>
  1335. <Tables>
  1336. <Table name="ExpressDelivery" />
  1337. <Table name="ExpressDeliveryDetail" />
  1338. </Tables>
  1339. </SearchExpressDeliveryNext>
  1340. <SearchExpressDeliveryLast CmdType="Text" CmdText=" DECLARE @ID_ExpressDelivery uniqueidentifier
  1341. DECLARE @ExpressDeliveryNo nvarchar(64)
  1342. SELECT TOP 1 @ExpressDeliveryNo = ExpressDelivery.No_ExpressDelivery FROM ExpressDelivery ORDER BY ExpressDelivery.No_ExpressDelivery DESC
  1343. SELECT @ID_ExpressDelivery = ID_ExpressDelivery FROM ExpressDelivery WHERE No_ExpressDelivery = @ExpressDeliveryNo
  1344. SELECT ExpressDelivery.*,No_Customer,Name_Customer,ShortName_Customer,
  1345. Transporter.No_Transporter, Transporter.Name_Transporter,Name_Content = Case Content_ExpressDelivery When 1 Then '资料' When 2 Then '包裹' When 3 Then '其他' End,
  1346. Name_PayMethod = Case PayMethod_ExpressDelivery When 1 Then '寄方付' When 2 Then '收方付' When 3 Then '第三方付' End,
  1347. a.Name_User as NameCreator_ExpressDelivery, b.Name_User as NameLastModUser_ExpressDelivery ,c.Name_User AS Name_Assessor
  1348. FROM ExpressDelivery
  1349. LEFT JOIN Customer ON Customer.ID_Customer = ExpressDelivery.ID_Customer
  1350. LEFT JOIN Transporter ON Transporter.ID_Transporter = ExpressDelivery.ID_Transporter
  1351. LEFT JOIN AppUser a ON a.ID_User = ExpressDelivery.Creator_ExpressDelivery
  1352. LEFT JOIN AppUser b ON b.ID_User = ExpressDelivery.LastModUser_ExpressDelivery
  1353. LEFT JOIN AppUser c ON c.ID_User = ExpressDelivery.ID_Assessor
  1354. WHERE ExpressDelivery.ID_ExpressDelivery = @ID_ExpressDelivery
  1355. Select ExpressDeliveryDetail.*,BillType.Type_BillType,Name_FromBill = Case Type_FromBill When 2 Then '销货出库单' When 3 Then '库存异动作业' End From ExpressDeliveryDetail
  1356. Inner Join BillType On BillType.Value_BillType = ExpressDeliveryDetail.Type_FromBill WHERE ExpressDeliveryDetail.ID_ExpressDelivery = @ID_ExpressDelivery">
  1357. <Tables>
  1358. <Table name="ExpressDelivery" />
  1359. <Table name="ExpressDeliveryDetail" />
  1360. </Tables>
  1361. </SearchExpressDeliveryLast>
  1362. </Search>
  1363. </Server>
  1364. <Lables>
  1365. <Search>
  1366. Empty();
  1367. NewInstance();
  1368. timeSending.Enabled = false;
  1369. tbNo.ReadOnly = false;
  1370. <!--cbOutDepotBill.Enabled = false;
  1371. txtOutDepotBillNo.ReadOnly = true;-->
  1372. cbDept.Enabled = false;
  1373. ikNumericTextBox8.ReadOnly = true;
  1374. ikNumericTextBox9.ReadOnly = true;
  1375. ikComboBoxEx1.Enabled = false;
  1376. ikTextBox1.ReadOnly = true;
  1377. ikComboBoxEx2.Enabled = false;
  1378. ikTextBox2.ReadOnly = true;
  1379. txtMoney.ReadOnly = true;
  1380. ckPrevBill.Enabled = false;
  1381. ikTextBox11.ReadOnly = true;
  1382. ikTextBox12.ReadOnly = true;
  1383. txtComment.ReadOnly = true;
  1384. ikTextButton1.ReadOnly = true;
  1385. ikTextBox4.ReadOnly = true;
  1386. ikTextButton2.ReadOnly = true;
  1387. ikTextButton3.ReadOnly = true;
  1388. ikTextButton4.ReadOnly = true;
  1389. ikTextBox3.ReadOnly = true;
  1390. ikComboBoxEx4.Enabled = false;
  1391. ikComboBoxEx3.Enabled = false;
  1392. ikTextBox7.ReadOnly = true;
  1393. ikTextBox6.ReadOnly = true;
  1394. ikTextBox8.ReadOnly = true;
  1395. ikTextBox9.ReadOnly = true;
  1396. ikTextBox10.ReadOnly = true;
  1397. ikTextBox5.ReadOnly = true;
  1398. ikComboBoxEx6.Enabled = false;
  1399. ikComboBoxEx5.Enabled = false;
  1400. ikDataGridEx1.ReadOnly = true;
  1401. ikCheckBox1.Enabled = false;
  1402. ikKeepPrice.ReadOnly = true;
  1403. ikNumericTextBox1.ReadOnly = true;
  1404. ikButton1.Enabled = false;
  1405. toolBar.EnableNew = GetRight(@Title,"新增");
  1406. toolBar.EnableSubmit = false;
  1407. toolBar.EnableModify = false;
  1408. toolBar.EnableDelete = false;
  1409. toolBar.EnablePrint = false;
  1410. toolBar.EnablePrintBarCode = false;
  1411. toolBar.EnableCheck = false;
  1412. toolBar.EnableLoad = false;
  1413. toolBar.EnableAudit =false;
  1414. toolBar.EnableUnAudit =false;
  1415. #ExpressDelivery.ID_ExpressDelivery = DBNull();
  1416. <!--#ExpressDelivery.Type_FromBill = 0;-->
  1417. #ExpressDelivery.Currency_ExpressDelivery = "";
  1418. #ExpressDelivery.Carriage_ExpressDelivery = TypeConvert("Decimal","0.00");
  1419. #ExpressDelivery.CreateDate_ExpressDelivery = DBNull();
  1420. #ExpressDelivery.LastModDate_ExpressDelivery = DBNull();
  1421. #ExpressDelivery.KeepNum = 2;
  1422. #ExpressDelivery.AssessDate_ExpressDelivery =DBNull();
  1423. #ExpressDelivery.ID_Assessor =DBNull();
  1424. UpdateForm(true, "");
  1425. tbNo.Focus();
  1426. @Status = 0;
  1427. </Search>
  1428. <New>
  1429. Empty();
  1430. NewInstance();
  1431. timeSending.Enabled = true;
  1432. tbNo.ReadOnly = false;
  1433. <!--cbOutDepotBill.Enabled = false;
  1434. txtOutDepotBillNo.ReadOnly = true;-->
  1435. cbDept.Enabled = true;
  1436. ikNumericTextBox8.ReadOnly = false;
  1437. ikNumericTextBox9.ReadOnly = false;
  1438. ikComboBoxEx1.Enabled = true;
  1439. ikTextBox1.ReadOnly = true;
  1440. ikComboBoxEx2.Enabled = true;
  1441. ikTextBox2.ReadOnly = true;
  1442. txtMoney.ReadOnly = false;
  1443. ckPrevBill.Enabled = true;
  1444. ikTextBox11.ReadOnly = true;
  1445. ikTextBox12.ReadOnly = false;
  1446. txtComment.ReadOnly = false;
  1447. ikTextButton1.ReadOnly = false;
  1448. ikTextBox4.ReadOnly = true;
  1449. ikTextButton2.ReadOnly = false;
  1450. ikTextButton3.ReadOnly = false;
  1451. ikTextButton4.ReadOnly = false;
  1452. ikTextBox3.ReadOnly = false;
  1453. ikComboBoxEx4.Enabled = true;
  1454. ikComboBoxEx3.Enabled = true;
  1455. ikTextBox7.ReadOnly = false;
  1456. ikTextBox6.ReadOnly = false;
  1457. ikTextBox8.ReadOnly = false;
  1458. ikTextBox9.ReadOnly = false;
  1459. ikTextBox10.ReadOnly = false;
  1460. ikTextBox5.ReadOnly = false;
  1461. ikComboBoxEx6.Enabled = true;
  1462. ikComboBoxEx5.Enabled = true;
  1463. ikDataGridEx1.ReadOnly = false;
  1464. ikCheckBox1.Enabled = true;
  1465. ikKeepPrice.ReadOnly = true;
  1466. ikNumericTextBox1.ReadOnly = false;
  1467. ikButton1.Enabled = true;
  1468. toolBar.EnableNew = false;
  1469. toolBar.EnableSubmit = GetRight(@Title,"新增");
  1470. toolBar.EnableModify = false;
  1471. toolBar.EnableDelete = false;
  1472. toolBar.EnablePrint = false;
  1473. toolBar.EnablePrintBarCode =false;
  1474. toolBar.EnableCheck = false;
  1475. toolBar.EnableLoad = true;
  1476. toolBar.EnableAudit =false;
  1477. toolBar.EnableUnAudit =false;
  1478. #ExpressDelivery.ID_ExpressDelivery = NewGuid();
  1479. <!--#ExpressDelivery.Type_FromBill = 0;-->
  1480. #ExpressDelivery.Currency_ExpressDelivery = @SysCurrency;
  1481. #ExpressDelivery.Carriage_ExpressDelivery = TypeConvert("Decimal","0.00");
  1482. #ExpressDelivery.Creator_ExpressDelivery = GetLoginUserID();
  1483. #ExpressDelivery.NameCreator_ExpressDelivery = GetCurrentUser();
  1484. #ExpressDelivery.CreateDate_ExpressDelivery = GetCurrentTime();
  1485. #ExpressDelivery.LastModDate_ExpressDelivery = DBNull();
  1486. #ExpressDelivery.ConsignCompany_ExpressDelivery = #ConsignTel.ConsignCompany_ExpressDelivery;
  1487. #ExpressDelivery.ConsignAddress_ExpressDelivery = #ConsignTel.ConsignAddress_ExpressDelivery;
  1488. #ExpressDelivery.Quantity_ExpressDelivery = 1;
  1489. #ExpressDelivery.Name_Content = "包裹";
  1490. #ExpressDelivery.Content_ExpressDelivery = 2;
  1491. #ExpressDelivery.Name_PayMethod = "寄方付";
  1492. #ExpressDelivery.PayMethod_ExpressDelivery = 1;
  1493. #ExpressDelivery.KeepNum = 2;
  1494. #ExpressDelivery.ID_Assessor = DBNull();
  1495. #ExpressDelivery.AssessDate_ExpressDelivery = DBNull();
  1496. SetColumnDefaultValue("ExpressDeliveryDetail", "Name_FromBill", "销货出库单");
  1497. SetColumnDefaultValue("ExpressDeliveryDetail", "Type_FromBill", 2);
  1498. UpdateForm(true, "");
  1499. @Status = 1;
  1500. </New>
  1501. <View>
  1502. timeSending.Enabled = false;
  1503. tbNo.ReadOnly = false;
  1504. <!--cbOutDepotBill.Enabled = false;
  1505. txtOutDepotBillNo.ReadOnly = true;-->
  1506. cbDept.Enabled = false;
  1507. ikNumericTextBox8.ReadOnly = true;
  1508. ikNumericTextBox9.ReadOnly = true;
  1509. ikComboBoxEx1.Enabled = false;
  1510. ikTextBox1.ReadOnly = true;
  1511. ikComboBoxEx2.Enabled = false;
  1512. ikTextBox2.ReadOnly = true;
  1513. txtMoney.ReadOnly = true;
  1514. ckPrevBill.Enabled = false;
  1515. ikTextBox11.ReadOnly = true;
  1516. ikTextBox12.ReadOnly = true;
  1517. txtComment.ReadOnly = true;
  1518. ikTextButton1.ReadOnly = true;
  1519. ikTextBox4.ReadOnly = true;
  1520. ikTextButton2.ReadOnly = true;
  1521. ikTextButton3.ReadOnly = true;
  1522. ikTextButton4.ReadOnly = true;
  1523. ikTextBox3.ReadOnly = true;
  1524. ikComboBoxEx4.Enabled = false;
  1525. ikComboBoxEx3.Enabled = false;
  1526. ikTextBox7.ReadOnly = true;
  1527. ikTextBox6.ReadOnly = true;
  1528. ikTextBox8.ReadOnly = true;
  1529. ikTextBox9.ReadOnly = true;
  1530. ikTextBox10.ReadOnly = true;
  1531. ikTextBox5.ReadOnly = true;
  1532. ikComboBoxEx6.Enabled = false;
  1533. ikComboBoxEx5.Enabled = false;
  1534. ikDataGridEx1.ReadOnly = true;
  1535. ikCheckBox1.Enabled = false;
  1536. ikKeepPrice.ReadOnly = true;
  1537. ikNumericTextBox1.ReadOnly = true;
  1538. ikButton1.Enabled = false;
  1539. toolBar.EnableNew = GetRight(@Title,"新增");
  1540. toolBar.EnableSubmit = false;
  1541. toolBar.EnablePrint = GetRight(@Title,"打印");
  1542. <!-- toolBar.EnableModify = GetRight(@Title,"修改");
  1543. toolBar.EnableDelete = GetRight(@Title,"删除");-->
  1544. if(Equals(#ExpressDelivery.ID_Assessor, DBNull()))
  1545. {
  1546. toolBar.EnableAudit = true;
  1547. toolBar.EnableModify = GetRight(@Title,"修改");
  1548. toolBar.EnableDelete = GetRight(@Title,"删除");
  1549. toolBar.EnableUnAudit = false;
  1550. }
  1551. else
  1552. {
  1553. toolBar.EnableAudit=false;
  1554. toolBar.EnableUnAudit=true;
  1555. toolBar.EnableModify=false;
  1556. toolBar.EnableDelete=false;
  1557. }
  1558. toolBar.EnablePrintBarCode =GetRight(@Title,"打印");
  1559. toolBar.EnableCheck = true;
  1560. toolBar.EnableLoad = false;
  1561. UpdateForm(true, "");
  1562. @Status = 2;
  1563. </View>
  1564. <Modify>
  1565. timeSending.Enabled = false;
  1566. tbNo.ReadOnly = true;
  1567. <!--cbOutDepotBill.Enabled = false;
  1568. txtOutDepotBillNo.ReadOnly = true;-->
  1569. cbDept.Enabled = true;
  1570. ikNumericTextBox8.ReadOnly = false;
  1571. ikNumericTextBox9.ReadOnly = false;
  1572. ikComboBoxEx1.Enabled = true;
  1573. ikTextBox1.ReadOnly = true;
  1574. ikComboBoxEx2.Enabled = true;
  1575. ikTextBox2.ReadOnly = true;
  1576. txtMoney.ReadOnly = false;
  1577. ckPrevBill.Enabled = true;
  1578. ikTextBox11.ReadOnly = false;
  1579. ikTextBox12.ReadOnly = false;
  1580. txtComment.ReadOnly = false;
  1581. ikTextButton1.ReadOnly = false;
  1582. ikTextBox4.ReadOnly = true;
  1583. ikTextButton2.ReadOnly = false;
  1584. ikTextButton3.ReadOnly = false;
  1585. ikTextButton4.ReadOnly = false;
  1586. ikTextBox3.ReadOnly = false;
  1587. ikComboBoxEx4.Enabled = true;
  1588. ikComboBoxEx3.Enabled = true;
  1589. ikTextBox7.ReadOnly = false;
  1590. ikTextBox6.ReadOnly = false;
  1591. ikTextBox8.ReadOnly = false;
  1592. ikTextBox9.ReadOnly = false;
  1593. ikTextBox10.ReadOnly = false;
  1594. ikTextBox5.ReadOnly = false;
  1595. ikComboBoxEx6.Enabled = true;
  1596. ikComboBoxEx5.Enabled = true;
  1597. ikDataGridEx1.ReadOnly = false;
  1598. ikCheckBox1.Enabled = true;
  1599. ikKeepPrice.ReadOnly = true;
  1600. ikNumericTextBox1.ReadOnly = false;
  1601. ikButton1.Enabled = true;
  1602. toolBar.EnableNew = GetRight(@Title,"新增");
  1603. toolBar.EnableSubmit = GetRight(@Title,"修改");
  1604. toolBar.EnableModify = false;
  1605. toolBar.EnableDelete = false;
  1606. toolBar.EnablePrint = false;
  1607. toolBar.EnablePrintBarCode = false;
  1608. toolBar.EnableCheck = false;
  1609. toolBar.EnableLoad = false;
  1610. toolBar.EnableAudit =false;
  1611. toolBar.EnableUnAudit =false;
  1612. #ExpressDelivery.LastModUser_ExpressDelivery = GetLoginUserID();
  1613. #ExpressDelivery.NameLastModUser_ExpressDelivery = GetCurrentUser();
  1614. #ExpressDelivery.LastModDate_ExpressDelivery = DateTimeNow();
  1615. SetColumnDefaultValue("ExpressDeliveryDetail", "Name_FromBill", "销货出库单");
  1616. SetColumnDefaultValue("ExpressDeliveryDetail", "Type_FromBill", 2);
  1617. UpdateForm(true, "");
  1618. @Status = 3;
  1619. </Modify>
  1620. <SubmitButtonClick>
  1621. <![CDATA[
  1622. if (tbNo.CValue == "")
  1623. {
  1624. MessageBox("请输入快递单号!",@Title);
  1625. tbNo.Focus();
  1626. return;
  1627. }
  1628. if (@Status == 1 && Search("CheckExpressDeliveryNo", tbNo.CValue))
  1629. {
  1630. MessageBox("该快递单已存在!",@Title);
  1631. return;
  1632. }
  1633. if (!cbDept.CheckSelectedItem())
  1634. {
  1635. MessageBox("请选择有效的快递公司!",@Title);
  1636. cbDept.Focus();
  1637. return;
  1638. }
  1639. if (!Search("SearchCustomerWithNo", ikTextButton1.CValue) || !Equals(#ExpressDelivery.ID_Customer,#Customer.ID_Customer))
  1640. {
  1641. ikTabControl1.SelectedIndex = 2;
  1642. MessageBox("请输入有效的客户编号,并按回车确认!",@Title);
  1643. ikTextButton1.Focus();
  1644. return;
  1645. }
  1646. UpdateForm(false, "");
  1647. SuspendLayout();
  1648. for(@i=0;@i<RowCount("#ExpressDeliveryDetail");@i=@i+1)
  1649. {
  1650. SetPosition("#ExpressDeliveryDetail",@i);
  1651. if(#ExpressDeliveryDetail.Name_FromBill == "销货出库单")
  1652. {
  1653. if(!Search("SearchSaleOutDepotBillWithNo",#ExpressDeliveryDetail.No_FromBill))
  1654. {
  1655. ikDataGridEx1.CurrentRowIndex = @i;
  1656. ikTabControl1.SelectedIndex = 3;
  1657. MessageBox("该销货出库单不存在或未经审核!",@Title);
  1658. ResumeLayout();
  1659. return;
  1660. }
  1661. else
  1662. {
  1663. if(!Equals(#SaleOutDepotBill.ID_Customer,#ExpressDelivery.ID_Customer))
  1664. {
  1665. ikDataGridEx1.CurrentRowIndex = @i;
  1666. MessageBox("收件公司客户与销货出库单客户不符,请检查!",@Title);
  1667. ikDataGridEx1.Focus();
  1668. ResumeLayout();
  1669. return;
  1670. }
  1671. }
  1672. }
  1673. else if(#ExpressDeliveryDetail.Name_FromBill == "库存异动作业")
  1674. {
  1675. if(!Search("SearchModifyBillWithNo",#ExpressDeliveryDetail.No_FromBill))
  1676. {
  1677. ikDataGridEx1.CurrentRowIndex = @i;
  1678. ikTabControl1.SelectedIndex = 3;
  1679. MessageBox("该库存异动单不存在或未经审核!",@Title);
  1680. ResumeLayout();
  1681. return;
  1682. }
  1683. }
  1684. else
  1685. {
  1686. ikTabControl1.SelectedIndex = 3;
  1687. MessageBox("请选择来源出库!",@Title);
  1688. ResumeLayout();
  1689. return;
  1690. }
  1691. if(Equals(#ExpressDeliveryDetail.ID_ExpressDeliveryDetail,GuidEmpty()))
  1692. #ExpressDeliveryDetail.ID_ExpressDeliveryDetail = NewGuid();
  1693. #ExpressDeliveryDetail.ID_ExpressDelivery = #ExpressDelivery.ID_ExpressDelivery;
  1694. }
  1695. ResumeLayout();
  1696. if(@Status == 1)
  1697. {
  1698. #ExpressDelivery.CreateDate_ExpressDelivery = DateTimeNow();
  1699. #ExpressDelivery.LastModUser_ExpressDelivery = DBNull();
  1700. #ExpressDelivery.LastModDate_ExpressDelivery = DBNull();
  1701. New();
  1702. }
  1703. else if(@Status == 3)
  1704. {
  1705. #ExpressDelivery.LastModDate_ExpressDelivery = DateTimeNow();
  1706. Update();
  1707. }
  1708. ChangeMode("View");
  1709. ]]>
  1710. </SubmitButtonClick>
  1711. <ClickikButton>
  1712. <![CDATA[
  1713. @j = 0;
  1714. if(RowCount("#ExpressDeliveryDetail")>0)
  1715. {
  1716. SuspendLayout();
  1717. for(@i=0;@i<RowCount("#ExpressDeliveryDetail");@i=@i+1)
  1718. {
  1719. SetPosition("#ExpressDeliveryDetail",@i);
  1720. if(#ExpressDeliveryDetail.Name_FromBill == "销货出库单")
  1721. {
  1722. Search("SearchProductMoney",#ExpressDeliveryDetail.No_FromBill);
  1723. }
  1724. @j = @j + #ProductMoney.SumMoney;
  1725. }
  1726. ResumeLayout();
  1727. #ExpressDelivery.KeepPrice_ExpressDelivery =@j * ikNumericTextBox1.CValue / 1000;
  1728. UpdateForm(true,"ikKeepPrice");
  1729. }
  1730. else
  1731. {
  1732. MessageBox("没有出库单产品!",@Title);
  1733. return;
  1734. }
  1735. ]]>
  1736. </ClickikButton>
  1737. </Lables>
  1738. </Form>
  1739. </Forms>