123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776 |
- <?xml version="1.0" encoding="utf-8" ?>
- <Forms>
- <Form Name="FrmExpressSendingAnnal">
- <Client>
- <Events>
- <Load>
- <![CDATA[
- @SetFlag=1;
- @Title="快递寄件";
- GetSchema();
- Search("SearchSystemSetting");
- Search("SearchConsignTel",GetLoginCompanyID());
- @SysCurrency=#SystemSetting.SysCurrency_SystemSetting;
- Search("SearchFromBillType");
- ChangeMode("Search");
- ]]>
- </Load>
- <Closing>
- ;
- </Closing>
- <Closed>
- ;
- </Closed>
- </Events>
- <Mode>
- <Search>
- <Lable name="Search" />
- </Search>
- <New>
- <Lable name="New" />
- </New>
- <View>
- <Lable name="View" />
- </View>
- <Modify>
- <Lable name="Modify" />
- </Modify>
- </Mode>
- <Controls>
- <IKDateTimePicker name="timeSending" DataSource="ExpressDelivery.Date_ExpressDelivery"></IKDateTimePicker>
- <IKTextButton name="tbNo" DataSource="ExpressDelivery.No_ExpressDelivery">
- <Events>
- <Enter>
- <![CDATA[
- if (tbNo.ReadOnly == false)
- {
- if (tbNo.CValue != StringEmpty())
- {
- UpdateForm(false, "");
- if (@Status == 1)
- {
- if (Search("CheckExpressDeliveryNo", tbNo.CValue))
- {
- MessageBox("该快递单已存在!",@Title);
- return;
- }
- }
- else
- {
- if (Search("SearchExpressDeliveryWithNo", tbNo.CValue))
- {
- ChangeMode("View");
- }
- else
- {
- @No = tbNo.CValue;
- ChangeMode("New");
- tbNo.CValue = @No;
- }
- }
- }
- else
- {
- MessageBox("请输入快递编号!",@Title);
- }
- }
- ]]>
- </Enter>
- <Click>
- ShowSearchBox("BillSearch","NODEPOT", "tbNo",tbNo.CValue);
- </Click>
- </Events>
- </IKTextButton>
- <IKComboBoxEx name="cbDept" DisplaySource="ExpressDelivery.Name_Transporter" NoSource="ExpressDelivery.No_Transporter"
- ValueSource="ExpressDelivery.ID_Transporter" DataSource="Transporter" DisplayMember="Name_Transporter"
- NoMember="No_Transporter" ValueMember="ID_Transporter">
- <Events>
- <Reload>
- UpdateForm(false, "cbDept");
- Search("SearchTransporter");
- UpdateForm(true, "cbDept");
- </Reload>
- </Events>
- </IKComboBoxEx>
- <IKNumericTextBox name="ikNumericTextBox8" DataSource="ExpressDelivery.Quantity_ExpressDelivery" />
- <IKNumericTextBox name="ikNumericTextBox9" DataSource="ExpressDelivery.Weight_ExpressDelivery" />
- <IKComboBoxEx name="ikComboBoxEx1" DisplaySource="ExpressDelivery.Name_Content" ValueSource="ExpressDelivery.Content_ExpressDelivery"
- DataSource="Content" DisplayMember="Name_Content" ValueMember="Content_ExpressDelivery">
- <Events>
- <Reload>
- UpdateForm(false, "ikComboBoxEx1");
- Search("SearchContent_ExpressDelivery");
- UpdateForm(true, "ikComboBoxEx1");
- </Reload>
- <SelectedIndexChanged>
- if(ikComboBoxEx1.SelectedName == "其他")
- {
- if(@Status == 1 || @Status == 3)
- {
- #ExpressDelivery.OtherContent_ExpressDelivery = DBNull();
- UpdateForm(true,"ikTextBox1");
- ikTextBox1.ReadOnly = false;
- }
- }
- else
- {
- ikTextBox1.ReadOnly = true;
- }
- </SelectedIndexChanged>
- </Events>
- </IKComboBoxEx>
- <IKTextBox name="ikTextBox1" DataSource="ExpressDelivery.OtherContent_ExpressDelivery" />
- <IKComboBoxEx name="ikComboBoxEx2" DisplaySource="ExpressDelivery.Name_PayMethod" ValueSource="ExpressDelivery.PayMethod_ExpressDelivery"
- DataSource="PayMethod" DisplayMember="Name_PayMethod" ValueMember="PayMethod_ExpressDelivery">
- <Events>
- <Reload>
- UpdateForm(false, "ikComboBoxEx2");
- Search("SearchPayMethod_ExpressDelivery");
- UpdateForm(true, "ikComboBoxEx2");
- </Reload>
- <SelectedIndexChanged>
- if(ikComboBoxEx2.SelectedName == "第三方付")
- {
- if(@Status == 1 || @Status == 3)
- {
- #ExpressDelivery.ThirdPart_ExpressDelivery = DBNull();
- UpdateForm(true,"ikTextBox2");
- ikTextBox2.ReadOnly = false;
- }
- }
- else
- {
- ikTextBox2.ReadOnly = true;
- }
- </SelectedIndexChanged>
- </Events>
- </IKComboBoxEx>
- <IKTextBox name="ikTextBox2" DataSource="ExpressDelivery.ThirdPart_ExpressDelivery" />
- <IKComboBoxEx name="cbCurrency" DisplaySource="ExpressDelivery.Currency_ExpressDelivery" DataSource="ExpressDelivery"></IKComboBoxEx>
- <IKTextButton name="txtMoney" DataSource="ExpressDelivery.Carriage_ExpressDelivery"></IKTextButton>
- <IKCheckBox name="ckPrevBill" DataSource="ExpressDelivery.HavePay_ExpressDelivery"></IKCheckBox>
- <IKCheckBox name="ikCheckBox1" DataSource="ExpressDelivery.BalanceMonthly_ExpressDelivery">
- <Events>
- <CheckedChanged>
- if(ikCheckBox1.CValue == true)
- {
- if(@Status == 1 || @Status == 3)
- ikTextBox11.ReadOnly = false;
- }
- else
- {
- #ExpressDelivery.Account_ExpressDelivery = DBNull();
- UpdateForm(true,"ikTextBox11");
- ikTextBox11.ReadOnly = true;
- }
- </CheckedChanged>
- </Events>
- </IKCheckBox>
- <IKTextBox name="ikTextBox11" DataSource="ExpressDelivery.Account_ExpressDelivery"></IKTextBox>
- <IKTextButton name="txtMaker" DataSource="ExpressDelivery.NameCreator_ExpressDelivery"></IKTextButton>
- <IKDateTimeText name="dttMakerDate" DataSource="ExpressDelivery.CreateDate_ExpressDelivery"></IKDateTimeText>
- <IKTextButton name="txtlastmoduser" DataSource="ExpressDelivery.NameLastModUser_ExpressDelivery"></IKTextButton>
- <IKDateTimeText name="dttlastmoddate" DataSource="ExpressDelivery.LastModDate_ExpressDelivery"></IKDateTimeText>
- <IKTextButton name="txtComment" DataSource="ExpressDelivery.Comment_ExpressDelivery"></IKTextButton>
- <IKTextButton name="ikTextButton1" DataSource="ExpressDelivery.No_Customer">
- <Events>
- <Enter>
- <![CDATA[
- if (ikTextButton1.ReadOnly == false)
- {
- UpdateForm(false, "");
- if (ikTextButton1.CValue == "" || !Search("SearchCustomerWithNo", ikTextButton1.CValue))
- {
- if (ikTextButton1.CValue == "")
- {
- MessageBox("请输入客户编号!", @Title);
- }
- else
- {
- MessageBox("该客户不存在!",@Title);
- @temp = ShowSearchBox("CustomerSearch","INFOMATION",ikTextButton1.CValue);
- if(@temp != "")
- {
- ikTextButton1.CValue = @temp;
- ActiveControlEvent("ikTextButton1", "Enter");
- }
- }
- }
- else
- {
- #ExpressDelivery.ID_Customer = #Customer.ID_Customer;
- #ExpressDelivery.ShortName_Customer = #Customer.ShortName_Customer;
- #ExpressDelivery.NameCustomer_ExpressDelivery = #Customer.Name_Customer;
- #ExpressDelivery.RecipAddress_ExpressDelivery = #Customer.SendAddr_Customer;
- }
- UpdateForm(true, "");
- }
- ]]>
- </Enter>
- <Click>
- <![CDATA[
- if (ikTextButton1.ReadOnly == false)
- {
- @temp = ShowSearchBox("CustomerSearch","INFOMATION",ikTextButton1.CValue);
- if( @temp == "" )
- return;
- ikTextButton1.CValue = @temp;
- ActiveControlEvent("ikTextButton1", "Enter");
- }
- ]]>
- </Click>
- </Events>
- </IKTextButton>
- <IKTextBox name="ikTextBox4" DataSource="ExpressDelivery.ShortName_Customer"></IKTextBox>
- <IKTextBox name="ikTextBox12" DataSource="ExpressDelivery.NameCustomer_ExpressDelivery"></IKTextBox>
- <IKTextButton name="ikTextButton2" DataSource="ExpressDelivery.RecipProvince_ExpressDelivery"></IKTextButton>
- <IKTextButton name="ikTextButton3" DataSource="ExpressDelivery.RecipCity_ExpressDelivery"></IKTextButton>
- <IKTextButton name="ikTextButton4" DataSource="ExpressDelivery.RecipDistrict_ExpressDelivery"></IKTextButton>
- <IKTextBox name="ikTextBox3" DataSource="ExpressDelivery.RecipAddress_ExpressDelivery" />
- <IKComboBoxEx name="ikComboBoxEx4" DisplaySource="ExpressDelivery.Reciptor_ExpressDelivery" DataSource="Reciptor"
- DisplayMember="Reciptor_ExpressDelivery">
- <Events>
- <Reload>
- UpdateForm(false, "ikComboBoxEx4");
- Search("SearchReciptor",ikTextButton1.CValue);
- UpdateForm(true, "ikComboBoxEx4");
- </Reload>
- </Events>
- </IKComboBoxEx>
- <IKComboBoxEx name="ikComboBoxEx3" DisplaySource="ExpressDelivery.RecipTel_ExpressDelivery" DataSource="Reciptor"
- DisplayMember="RecipTel_ExpressDelivery">
- <Events>
- <Reload>
- UpdateForm(false, "ikComboBoxEx3");
- Search("SearchReciptor",ikTextButton1.CValue);
- UpdateForm(true, "ikComboBoxEx3");
- </Reload>
- </Events>
- </IKComboBoxEx>
- <IKTextBox name="ikTextBox7" DataSource="ExpressDelivery.CustomerNo_ExpressDelivery"></IKTextBox>
- <IKTextBox name="ikTextBox6" DataSource="ExpressDelivery.ConsignCompany_ExpressDelivery"></IKTextBox>
- <IKTextBox name="ikTextBox8" DataSource="ExpressDelivery.ConsignProvince_ExpressDelivery"></IKTextBox>
- <IKTextBox name="ikTextBox9" DataSource="ExpressDelivery.ConsignCity_ExpressDelivery"></IKTextBox>
- <IKTextBox name="ikTextBox10" DataSource="ExpressDelivery.ConsignDistrict_ExpressDelivery"></IKTextBox>
- <IKTextBox name="ikTextBox5" DataSource="ExpressDelivery.ConsignAddress_ExpressDelivery"></IKTextBox>
- <IKComboBoxEx name="ikComboBoxEx6" DisplaySource="ExpressDelivery.Consignor_ExpressDelivery" DataSource="Consignor"
- DisplayMember="Consignor_ExpressDelivery">
- <Events>
- <Reload>
- UpdateForm(false, "ikComboBoxEx6");
- Search("SearchConsignor");
- UpdateForm(true, "ikComboBoxEx6");
- </Reload>
- </Events>
- </IKComboBoxEx>
- <IKComboBoxEx name="ikComboBoxEx5" DisplaySource="ExpressDelivery.ConsignTel_ExpressDelivery"
- DataSource="ConsignTel" DisplayMember="ConsignTel_ExpressDelivery">
- <Events>
- <Reload>
- UpdateForm(false, "ikComboBoxEx5");
- Search("SearchConsignTel",GetLoginCompanyID());
- UpdateForm(true, "ikComboBoxEx5");
- </Reload>
- </Events>
- </IKComboBoxEx>
- <IKDataGridEx name="ikDataGridEx1" DataSource="ExpressDeliveryDetail" TableStyleIndex="0">
- <DataColumn Index="0" DataSource="ExpressDeliveryDetail.Name_FromBill">
- <IKDataGridComboBoxColumn DisplaySourceEx="ExpressDeliveryDetail.Name_FromBill" ValueSourceEx="ExpressDeliveryDetail.Type_FromBill"
- DataSourceEx="BillType" DisplayMemberEx="Name_BillType" ValueMemberEx="Value_BillType">
- <Events>
- <Reload>
- Search("SearchFromBillType");
- SetDataGridColumnDataSource(0,"ikDataGridEx1");
- </Reload>
- </Events>
- </IKDataGridComboBoxColumn>
- </DataColumn>
- <DataColumn Index="1" DataSource="ExpressDeliveryDetail.No_FromBill" />
- </IKDataGridEx>
- <IKNumericTextBox name="ikKeepPrice" DataSource="ExpressDelivery.KeepPrice_ExpressDelivery" />
- <IKNumericTextBox name="ikNumericTextBox1" DataSource="ExpressDelivery.KeepNum" />
- <IKTextBox name="txtAudi" DataSource="ExpressDelivery.Name_Assessor"></IKTextBox>
- <IKDateTimeText name="dtAssessDate" DataSource="ExpressDelivery.AssessDate_ExpressDelivery"></IKDateTimeText>
- <IKButton name="ikButton1">
- <Events>
- <Click>
- <Lable name="ClickikButton" />
- </Click>
- </Events>
- </IKButton>
- <!--<IKButton name="btScanExpressSending">
- <Events>
- <Click>
- if(tbNo.CValue != "")
- {
- @ClickResult = MessageBox("是否覆盖快递单号?",@Title,MB_YESNOCANCEL);
- if (@ClickResult == DialogResult("CANCEL"))
- {
- return;
- }
- if(@ClickResult == DialogResult("YES"))
- {
- #ExpressDelivery.No_ExpressDelivery = Read("BarCode.txt",0);
- UpdateForm(true, "");
- }
- else if (@ClickResult == DialogResult("NO"))
- {
- return;
- }
- }
- else
- {
- #ExpressDelivery.No_ExpressDelivery = Read("BarCode.txt",0);
- UpdateForm(true, "");
- }
- </Click>
- </Events>
- </IKButton>-->
- <IKButton name="btScanSaleOut">
- <Events>
- <Click>
- ;
- </Click>
- </Events>
- </IKButton>
- <IKFormToolBar name="toolBar">
- <Events>
- <ClickFirst>
- if(Search("SearchExpressDeliveryFirst"))
- {
- ChangeMode("View");
- }
- </ClickFirst>
- <ClickPrev>
- if(Search("SearchExpressDeliveryPrevious", tbNo.CValue))
- {
- ChangeMode("View");
- }
- </ClickPrev>
- <ClickNext>
- if(Search("SearchExpressDeliveryNext", tbNo.CValue))
- {
- ChangeMode("View");
- }
- </ClickNext>
- <ClickLast>
- if(Search("SearchExpressDeliveryLast"))
- {
- ChangeMode("View");
- }
- </ClickLast>
- <ClickEmpty>
- ChangeMode("Search");
- </ClickEmpty>
- <ClickNew>
- ChangeMode("New");
- </ClickNew>
- <ClickSubmit>
- <Lable name="ClickikButton" />
- <Lable name="SubmitButtonClick" />
- </ClickSubmit>
- <ClickModify>
- ChangeMode("Modify");
- </ClickModify>
- <ClickDelete>
- Delete();
- ChangeMode("Search");
- </ClickDelete>
- <ClickPrint>
- ShowPrintBox("BillSearch",#ExpressDelivery.No_ExpressDelivery,#ExpressDelivery.No_ExpressDelivery);
- </ClickPrint>
- <ClickImport>
- ;
- </ClickImport>
- <ClickExport>
- ;
- </ClickExport>
- <ClickClose>
- ;
- </ClickClose>
- <ClickExpand>
- if(toolBar.ExpandForm==true)
- {
- pnRight.Visible=true;<!--PanelRight is not existed-->
- }
- else
- {
- pnRight.Visible=false;
- }
- </ClickExpand>
- <ClickLoad>
- <![CDATA[
- if(Read("BarCode.txt",0)=="")
- MessageBox("条码信息所在文件不存在或信息为空!",@Title);
- else
- {
- if(tbNo.CValue != "")
- {
- @ClickResult = MessageBox("是否覆盖快递单号?",@Title,MB_YESNOCANCEL);
- if (@ClickResult == DialogResult("CANCEL"))
- {
- return;
- }
- if(@ClickResult == DialogResult("YES"))
- {
- #ExpressDelivery.No_ExpressDelivery = Read("BarCode.txt",0);
- UpdateForm(true, "");
- }
- else if (@ClickResult == DialogResult("NO"))
- {
- return;
- }
- }
- else
- {
- #ExpressDelivery.No_ExpressDelivery = Read("BarCode.txt",0);
- UpdateForm(true, "");
- }
- SearchOutDepot(Read("BarCode.txt",1),"ExpressDeliveryDetail","Name_FromBill","销货出库单","Type_FromBill","2","No_FromBill");
-
- SuspendLayout();
- @a = 0;
- for(@i=0;@i<RowCount("#ExpressDeliveryDetail");@i=@i+1)
- {
- SetPosition("#ExpressDeliveryDetail",@i);
-
- if(Search("SearchCustomerWithBillNo",#ExpressDeliveryDetail.No_FromBill))
- {
- ikTextButton1.CValue = #BillCustomer.No_Customer;
- ActiveControlEvent("ikTextButton1", "Enter");
- if(Search("SearchReciptor1",ikTextButton1.CValue))
- {
- #ExpressDelivery.Reciptor_ExpressDelivery = #Reciptor1.Reciptor_ExpressDelivery;
- #ExpressDelivery.RecipTel_ExpressDelivery = #Reciptor1.RecipTel_ExpressDelivery;
- UpdateForm(true, "ikComboBoxEx4");
- UpdateForm(true, "ikComboBoxEx3");
- }
- @a=1;
- ResumeLayout();
- return;
- }
- }
- if(@a == 0)
- {
- ikTabControl1.SelectedIndex = 2;
- MessageBox("请输入有效的客户编号,并按回车确认!",@Title);
- ikTextButton1.Focus();
- return;
- }
- ResumeLayout();
-
- toolBar.EnableLoad = false;
- }
- ]]>
- </ClickLoad>
- <ClickCheck>
- <!--
- if(Read("BarCode.txt",0)=="")
- MessageBox("条码信息所在文件不存在或信息为空!",@Title);
- else
- {
- ChangeMode("Search");
- if(Search("SearchExpressDeliveryWithNo", Read("BarCode.txt",0)))
- {
-
- Search("SearchStatusWithNo",Read("BarCode.txt",0));
- if(#Status.Check_ExpressDelivery == 0)
- {
- ChangeMode("View");
-
- }
- else
- {
- ChangeMode("Search");
- MessageBox("该单据已校验!",@Title);
- return;
- }
-
- }
- else
- {
- @a = ShowSearchNo();
- if(Search("SearchExpressDeliveryWithNo", @a))
- {
-
- Search("SearchStatusWithNo",@a);
- if(#Status.Check_ExpressDelivery == 0)
- {
- ChangeMode("View");
-
- ShowFrmExpressSendingBarCode(Read("BarCode.txt",1),@a);
- return;
- }
- else
- {
- ChangeMode("Search");
- MessageBox("该单据已校验!",@Title);
- return;
- }
-
- }
- else
- {
- MessageBox("该快递单不存在!",@Title);
- return;
- }
- }
-
- ShowFrmExpressSendingBarCode(Read("BarCode.txt",1),"");
-
- } -->
- if(Search("SearchExpressDeliveryWithNo", tbNo.CValue))
- {
- Search("SearchStatusWithNo",#ExpressDelivery.No_ExpressDelivery);
- if(#Status.Check_ExpressDelivery == 0)
- {
- ChangeMode("View");
- }
- else
- {
- MessageBox("该单据已校验!",@Title);
- return;
- }
- }
- else
- {
- MessageBox("该快递单不存在!",@Title);
- return;
- }
- ShowFrmNewESBarCode(#ExpressDelivery.No_ExpressDelivery);
- </ClickCheck>
- <ClickAudit>
- BeginAudit();
- #ExpressDelivery.ID_Assessor = GetLoginUserID();
- #ExpressDelivery.Name_Assessor = GetCurrentUser();
- #ExpressDelivery.AssessDate_ExpressDelivery = DateTimeNow();
- Audit();
- ChangeMode("View");
- EndAudit();
- </ClickAudit>
- <ClickUnAudit>
- BeginUnAudit();
- #ExpressDelivery.ID_Assessor = DBNull();
- #ExpressDelivery.Name_Assessor = "";
- UnAudit();
- ChangeMode("View");
- EndUnAudit();
- </ClickUnAudit>
- </Events>
- </IKFormToolBar>
- </Controls>
- <Tables>
- <Table name="ExpressDeliveryDetail">
- <Events>
- <ColumnsChanged>
- <Name_FromBill>
- <![CDATA[
- if(!Equals(#ExpressDeliveryDetail.No_FromBill,"") && !Equals(#ExpressDeliveryDetail.No_FromBill,DBNull()))
- {
- if(#ExpressDeliveryDetail.Name_FromBill == "销货出库单")
- {
- if(Search("SearchSaleOutDepotBillWithNo",#ExpressDeliveryDetail.No_FromBill))
- {
- if(Search("SearchSaleOutDepotBillAndCustomerWithNo",#ExpressDeliveryDetail.No_FromBill))
- {
- if(ikTextButton1.CValue == "")
- {
- ikTextButton1.CValue = #SC.No_Customer;
- ActiveControlEvent("ikTextButton1", "Enter");
- #ExpressDelivery.Reciptor_ExpressDelivery = #SC.Name_Linkman;
- #ExpressDelivery.RecipTel_ExpressDelivery = #SC.Tel_Linkman;
- UpdateForm(true, "");
- }
- else
- {
- if(ikTextButton1.CValue != #SC.No_Customer)
- {
- @CResult = MessageBox("收件公司已存在,是否覆盖?",@Title,MB_YESNO);
- if(@CResult == DialogResult("YES"))
- {
- ikTextButton1.CValue = #SC.No_Customer;
- ActiveControlEvent("ikTextButton1", "Enter");
- #ExpressDelivery.Reciptor_ExpressDelivery = #SC.Name_Linkman;
- #ExpressDelivery.RecipTel_ExpressDelivery = #SC.Tel_Linkman;
- UpdateForm(true, "");
- }
- else if (@CResult == DialogResult("NO"))
- {
- return;
- }
- }
- else
- {
- return;
- }
- }
- }
- else
- {
- return;
- }
- }
- else
- {
- MessageBox("该销货出库单不存在或未审核!",@Title);
- return;
- }
- }
- }
- ]]>
- </Name_FromBill>
- <No_FromBill>
- <![CDATA[
- if(!Equals(#ExpressDeliveryDetail.No_FromBill,"") && !Equals(#ExpressDeliveryDetail.No_FromBill,DBNull()))
- {
- if(#ExpressDeliveryDetail.Name_FromBill == "销货出库单")
- {
- if(Search("SearchSaleOutDepotBillWithNo",#ExpressDeliveryDetail.No_FromBill))
- {
- if(Search("SearchSaleOutDepotBillAndCustomerWithNo",#ExpressDeliveryDetail.No_FromBill))
- {
- if(ikTextButton1.CValue == "")
- {
- ikTextButton1.CValue = #SC.No_Customer;
- ActiveControlEvent("ikTextButton1", "Enter");
- #ExpressDelivery.Reciptor_ExpressDelivery = #SC.Name_Linkman;
- #ExpressDelivery.RecipTel_ExpressDelivery = #SC.Tel_Linkman;
- UpdateForm(true, "");
- }
- else
- {
- if(ikTextButton1.CValue != #SC.No_Customer)
- {
- @CResult = MessageBox("收件公司已存在,是否覆盖?",@Title,MB_YESNO);
- if(@CResult == DialogResult("YES"))
- {
- ikTextButton1.CValue = #SC.No_Customer;
- ActiveControlEvent("ikTextButton1", "Enter");
- #ExpressDelivery.Reciptor_ExpressDelivery = #SC.Name_Linkman;
- #ExpressDelivery.RecipTel_ExpressDelivery = #SC.Tel_Linkman;
- UpdateForm(true, "");
- }
- else if (@CResult == DialogResult("NO"))
- {
- return;
- }
- }
- else
- {
- return;
- }
- }
- }
- else
- {
- return;
- }
- }
- else
- {
- MessageBox("该销货出库单不存在!",@Title);
- return;
- }
- }
- }
- ]]>
- </No_FromBill>
- </ColumnsChanged>
- </Events>
- </Table>
- </Tables>
- <!--<Tables>
- <Table name="ExpressDeliveryDetail">
- <Events>
- <ColumnsChanged>
- <Name_FromBill>
- <![CDATA[
- if(!Equals(#ExpressDeliveryDetail.No_FromBill,"") && !Equals(#ExpressDeliveryDetail.No_FromBill,DBNull()))
- {
- if(#ExpressDeliveryDetail.Name_FromBill == "销货出库单")
- {
- if(!Search("SearchSaleOutDepotBillWithNo",#ExpressDeliveryDetail.No_FromBill))
- {
- MessageBox("该销货出库单不存在或未经审核!",@Title);
- }
- }
- if(#ExpressDeliveryDetail.Name_FromBill == "库存异动作业")
- {
- if(!Search("SearchModifyBillWithNo",#ExpressDeliveryDetail.No_FromBill))
- {
- MessageBox("该库存异动单不存在或未经审核!",@Title);
- }
- }
-
- }
- ]]>
- </Name_FromBill>
- <No_FromBill>
- <![CDATA[
- if(@SetFlag==0)
- {
- return;
- }
- if(!Equals(#ExpressDeliveryDetail.Name_FromBill,"") && !Equals(#ExpressDeliveryDetail.Name_FromBill,DBNull()))
- {
- if(#ExpressDeliveryDetail.Name_FromBill == "销货出库单")
- {
- if(!Search("SearchSaleOutDepotBillWithNo",#ExpressDeliveryDetail.No_FromBill))
- {
- MessageBox("该销货出库单不存在或未经审核!",@Title);
- return;
- }
- }
- if(#ExpressDeliveryDetail.Name_FromBill == "库存异动作业")
- {
- if(!Search("SearchModifyBillWithNo",#ExpressDeliveryDetail.No_FromBill))
- {
- MessageBox("该库存异动单不存在或未经审核!",@Title);
- return;
- }
- }
- }
- ]]>
- </No_FromBill>
- </ColumnsChanged>
- </Events>
- </Table>
- </Tables> -->
- <LockInfomation LockID="ID_ExpressDelivery" LockNO="No_ExpressDelivery" LockSearchFunction="SearchExpressDeliveryWithNo" />
- <LogInfomation LogNO="#ExpressDelivery.No_ExpressDelivery" RecordFormField="本次运费:#ExpressDelivery.Carriage_ExpressDelivery"
- RecordDataGridField="" />
- <ChildForms>
- <ChildForm name="BillSearch" DataSource="ExpressDelivery" SearchFunction="SearchAllBill" SearchFunctionByNo="SearchExpressDeliveryWithNo">
- <DataColumn Index="0" MappingName="#ExpressDelivery.No_ExpressDelivery" HeaderText="快递单号" Width="90"
- ColumnType="IKDataGridTextBoxColumn" />
- <DataColumn Index="1" MappingName="#ExpressDelivery.Date_ExpressDelivery" HeaderText="寄件日期"
- Width="90" ColumnType="IKDataGridTextBoxColumn" />
- <DataColumn Index="2" MappingName="#ExpressDelivery.Name_Transporter" HeaderText="快递公司" Width="75"
- ColumnType="IKDataGridTextBoxColumn" />
- <DataColumn Index="3" MappingName="#ExpressDelivery.ConsignAddress_ExpressDelivery" HeaderText="寄件地址"
- Width="75" ColumnType="IKDataGridTextBoxColumn" />
- <DataColumn Index="4" MappingName="#ExpressDelivery.Comment_ExpressDelivery" HeaderText="备注"
- Width="75" ColumnType="IKDataGridTextBoxColumn" />
- </ChildForm>
- <ChildForm name="CustomerSearch" DataSource="Customer" SearchFunction="SearchAllCustomer" SearchFunctionByNo=""
- MappingName="客户">
- <DataColumn Index="0" MappingName="#Customer.No_Customer" HeaderText="客户编号" Width="90" ColumnType="IKDataGridTextBoxColumn" />
- <DataColumn Index="1" MappingName="#Customer.ShortName_Customer" HeaderText="客户简称" Width="90"
- ColumnType="IKDataGridTextBoxColumn" />
- <DataColumn Index="2" MappingName="#Customer.Type_Customer" HeaderText="客户类型" Width="75" ColumnType="IKDataGridTextBoxColumn" />
- <DataColumn Index="3" MappingName="#Customer.Level_Customer" HeaderText="客户等级" Width="75" ColumnType="IKDataGridTextBoxColumn" />
- <DataColumn Index="4" MappingName="#Customer.IsGeneric_Customer" HeaderText="一般客户" Width="75"
- ColumnType="IKDataGridBoolColumn" />
- </ChildForm>
- <ChildForm name="SaleOutDepotBillSearch" DataSource="SaleOutDepotBill" SearchFunction="SearchAllSaleOutDepotBill"
- SearchFunctionByNo="">
- <DataColumn Index="0" MappingName="#SaleOutDepotBill.No_SaleOutDepotBill" HeaderText="销货出库单号"
- Width="90" ColumnType="IKDataGridTextBoxColumn" />
- <DataColumn Index="1" MappingName="#SaleOutDepotBill.Date_SaleOutDepotBill" HeaderText="制单日期"
- Width="90" ColumnType="IKDataGridTextBoxColumn" />
- </ChildForm>
- <ChildForm name="ModifyDepotBillSearch" DataSource="M" SearchFunction="SearchAllModifyDepotBill"
- SearchFunctionByNo="">
- <DataColumn Index="0" MappingName="#M.No_ModifyDepotBill" HeaderText="库存异动作业单号" Width="90" ColumnType="IKDataGridTextBoxColumn" />
- <DataColumn Index="1" MappingName="#M.Date_ModifyDepotBill" HeaderText="制单日期" Width="90" ColumnType="IKDataGridTextBoxColumn" />
- </ChildForm>
- </ChildForms>
- </Client>
- <Server>
- <Tables>
- <Table name="ExpressDelivery" Type="Parent">
- <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,
- Transporter.No_Transporter, Transporter.Name_Transporter,
- 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
- FROM ExpressDelivery
- LEFT JOIN Customer ON Customer.ID_Customer = ExpressDelivery.ID_Customer
- LEFT JOIN Transporter ON Transporter.ID_Transporter = ExpressDelivery.ID_Transporter
- LEFT JOIN AppUser a ON a.ID_User = ExpressDelivery.Creator_ExpressDelivery
- LEFT JOIN AppUser b ON b.ID_User = ExpressDelivery.LastModUser_ExpressDelivery
- LEFT JOIN AppUser c ON c.ID_User = ExpressDelivery.ID_Assessor " />
- <New CmdType="Text" CmdText=" INSERT INTO ExpressDelivery(ID_ExpressDelivery, No_ExpressDelivery, Date_ExpressDelivery, ID_Transporter, Content_ExpressDelivery,
- OtherContent_ExpressDelivery, Quantity_ExpressDelivery, Weight_ExpressDelivery, PayMethod_ExpressDelivery, ThirdPart_ExpressDelivery,
- Currency_ExpressDelivery, Carriage_ExpressDelivery, HavePay_ExpressDelivery, BalanceMonthly_ExpressDelivery, Account_ExpressDelivery,
- ID_Customer, RecipProvince_ExpressDelivery, RecipCity_ExpressDelivery, RecipDistrict_ExpressDelivery, RecipAddress_ExpressDelivery,
- Reciptor_ExpressDelivery, RecipTel_ExpressDelivery, CustomerNo_ExpressDelivery, ConsignCompany_ExpressDelivery, ConsignProvince_ExpressDelivery,
- ConsignCity_ExpressDelivery, ConsignDistrict_ExpressDelivery, ConsignAddress_ExpressDelivery, ConsignTel_ExpressDelivery, Consignor_ExpressDelivery,
- Creator_ExpressDelivery, CreateDate_ExpressDelivery, Comment_ExpressDelivery, LastModUser_ExpressDelivery, LastModDate_ExpressDelivery,NameCustomer_ExpressDelivery,KeepPrice_ExpressDelivery,ID_Assessor,AssessDate_ExpressDelivery)
- VALUES(@ID_ExpressDelivery, @No_ExpressDelivery, @Date_ExpressDelivery, @ID_Transporter, @Content_ExpressDelivery, @OtherContent_ExpressDelivery, @Quantity_ExpressDelivery,
- @Weight_ExpressDelivery, @PayMethod_ExpressDelivery, @ThirdPart_ExpressDelivery, @Currency_ExpressDelivery, @Carriage_ExpressDelivery, @HavePay_ExpressDelivery, @BalanceMonthly_ExpressDelivery,
- @Account_ExpressDelivery, @ID_Customer, @RecipProvince_ExpressDelivery, @RecipCity_ExpressDelivery, @RecipDistrict_ExpressDelivery, @RecipAddress_ExpressDelivery, @Reciptor_ExpressDelivery, @RecipTel_ExpressDelivery,
- @CustomerNo_ExpressDelivery, @ConsignCompany_ExpressDelivery, @ConsignProvince_ExpressDelivery, @ConsignCity_ExpressDelivery, @ConsignDistrict_ExpressDelivery, @ConsignAddress_ExpressDelivery, @ConsignTel_ExpressDelivery,
- @Consignor_ExpressDelivery, @Creator_ExpressDelivery, @CreateDate_ExpressDelivery, @Comment_ExpressDelivery, @LastModUser_ExpressDelivery, @LastModDate_ExpressDelivery,@NameCustomer_ExpressDelivery,@KeepPrice_ExpressDelivery,@ID_Assessor,@AssessDate_ExpressDelivery)">
- <Params>
- <Param name="@ID_ExpressDelivery" type="ExpressDelivery.ID_ExpressDelivery" sourceColumn="ID_ExpressDelivery" />
- <Param name="@No_ExpressDelivery" type="ExpressDelivery.No_ExpressDelivery" sourceColumn="No_ExpressDelivery" />
- <Param name="@Date_ExpressDelivery" type="ExpressDelivery.Date_ExpressDelivery" sourceColumn="Date_ExpressDelivery" />
- <Param name="@ID_Transporter" type="ExpressDelivery.ID_Transporter" sourceColumn="ID_Transporter" />
- <Param name="@Content_ExpressDelivery" type="ExpressDelivery.Content_ExpressDelivery" sourceColumn="Content_ExpressDelivery" />
- <Param name="@OtherContent_ExpressDelivery" type="ExpressDelivery.OtherContent_ExpressDelivery"
- sourceColumn="OtherContent_ExpressDelivery" />
- <Param name="@Quantity_ExpressDelivery" type="ExpressDelivery.Quantity_ExpressDelivery"
- sourceColumn="Quantity_ExpressDelivery" />
- <Param name="@Weight_ExpressDelivery" type="ExpressDelivery.Weight_ExpressDelivery" sourceColumn="Weight_ExpressDelivery" />
- <Param name="@PayMethod_ExpressDelivery" type="ExpressDelivery.PayMethod_ExpressDelivery"
- sourceColumn="PayMethod_ExpressDelivery" />
- <Param name="@ThirdPart_ExpressDelivery" type="ExpressDelivery.ThirdPart_ExpressDelivery"
- sourceColumn="ThirdPart_ExpressDelivery" />
- <Param name="@Currency_ExpressDelivery" type="ExpressDelivery.Currency_ExpressDelivery"
- sourceColumn="Currency_ExpressDelivery" />
- <Param name="@Carriage_ExpressDelivery" type="ExpressDelivery.Carriage_ExpressDelivery"
- sourceColumn="Carriage_ExpressDelivery" />
- <Param name="@HavePay_ExpressDelivery" type="ExpressDelivery.HavePay_ExpressDelivery" sourceColumn="HavePay_ExpressDelivery" />
- <Param name="@BalanceMonthly_ExpressDelivery" type="ExpressDelivery.BalanceMonthly_ExpressDelivery"
- sourceColumn="BalanceMonthly_ExpressDelivery" />
- <Param name="@Account_ExpressDelivery" type="ExpressDelivery.Account_ExpressDelivery" sourceColumn="Account_ExpressDelivery" />
- <Param name="@ID_Customer" type="ExpressDelivery.ID_Customer" sourceColumn="ID_Customer" />
- <Param name="@RecipProvince_ExpressDelivery" type="ExpressDelivery.RecipProvince_ExpressDelivery"
- sourceColumn="RecipProvince_ExpressDelivery" />
- <Param name="@RecipCity_ExpressDelivery" type="ExpressDelivery.RecipCity_ExpressDelivery"
- sourceColumn="RecipCity_ExpressDelivery" />
- <Param name="@RecipDistrict_ExpressDelivery" type="ExpressDelivery.RecipDistrict_ExpressDelivery"
- sourceColumn="RecipDistrict_ExpressDelivery" />
- <Param name="@RecipAddress_ExpressDelivery" type="ExpressDelivery.RecipAddress_ExpressDelivery"
- sourceColumn="RecipAddress_ExpressDelivery" />
- <Param name="@Reciptor_ExpressDelivery" type="ExpressDelivery.Reciptor_ExpressDelivery"
- sourceColumn="Reciptor_ExpressDelivery" />
- <Param name="@RecipTel_ExpressDelivery" type="ExpressDelivery.RecipTel_ExpressDelivery"
- sourceColumn="RecipTel_ExpressDelivery" />
- <Param name="@CustomerNo_ExpressDelivery" type="ExpressDelivery.CustomerNo_ExpressDelivery"
- sourceColumn="CustomerNo_ExpressDelivery" />
- <Param name="@ConsignCompany_ExpressDelivery" type="ExpressDelivery.ConsignCompany_ExpressDelivery"
- sourceColumn="ConsignCompany_ExpressDelivery" />
- <Param name="@ConsignProvince_ExpressDelivery" type="ExpressDelivery.ConsignProvince_ExpressDelivery"
- sourceColumn="ConsignProvince_ExpressDelivery" />
- <Param name="@ConsignCity_ExpressDelivery" type="ExpressDelivery.ConsignCity_ExpressDelivery"
- sourceColumn="ConsignCity_ExpressDelivery" />
- <Param name="@ConsignDistrict_ExpressDelivery" type="ExpressDelivery.ConsignDistrict_ExpressDelivery"
- sourceColumn="ConsignDistrict_ExpressDelivery" />
- <Param name="@ConsignAddress_ExpressDelivery" type="ExpressDelivery.ConsignAddress_ExpressDelivery"
- sourceColumn="ConsignAddress_ExpressDelivery" />
- <Param name="@ConsignTel_ExpressDelivery" type="ExpressDelivery.ConsignTel_ExpressDelivery"
- sourceColumn="ConsignTel_ExpressDelivery" />
- <Param name="@Consignor_ExpressDelivery" type="ExpressDelivery.Consignor_ExpressDelivery"
- sourceColumn="Consignor_ExpressDelivery" />
- <Param name="@Creator_ExpressDelivery" type="ExpressDelivery.Creator_ExpressDelivery" sourceColumn="Creator_ExpressDelivery" />
- <Param name="@CreateDate_ExpressDelivery" type="ExpressDelivery.CreateDate_ExpressDelivery"
- sourceColumn="CreateDate_ExpressDelivery" />
- <Param name="@Comment_ExpressDelivery" type="ExpressDelivery.Comment_ExpressDelivery" sourceColumn="Comment_ExpressDelivery" />
- <Param name="@LastModUser_ExpressDelivery" type="ExpressDelivery.LastModUser_ExpressDelivery"
- sourceColumn="LastModUser_ExpressDelivery" />
- <Param name="@LastModDate_ExpressDelivery" type="ExpressDelivery.LastModDate_ExpressDelivery"
- sourceColumn="LastModDate_ExpressDelivery" />
- <Param name="@NameCustomer_ExpressDelivery" type="ExpressDelivery.NameCustomer_ExpressDelivery"
- sourceColumn="NameCustomer_ExpressDelivery" />
- <Param name="@KeepPrice_ExpressDelivery" type="ExpressDelivery.KeepPrice_ExpressDelivery"
- sourceColumn="KeepPrice_ExpressDelivery" />
- <Param name="@ID_Assessor" type="ExpressDelivery.ID_Assessor"
- sourceColumn="ID_Assessor" />
- <Param name="@AssessDate_ExpressDelivery" type="ExpressDelivery.AssessDate_ExpressDelivery"
- sourceColumn="AssessDate_ExpressDelivery" />
- </Params>
- </New>
- <Update CmdType="Text" CmdText=" UPDATE ExpressDelivery Set
-
- No_ExpressDelivery =@No_ExpressDelivery ,
- Date_ExpressDelivery =@Date_ExpressDelivery,
- ID_Transporter =@ID_Transporter,
- Content_ExpressDelivery =@Content_ExpressDelivery,
- OtherContent_ExpressDelivery =@OtherContent_ExpressDelivery,
- Quantity_ExpressDelivery =@Quantity_ExpressDelivery,
- Weight_ExpressDelivery =@Weight_ExpressDelivery,
- PayMethod_ExpressDelivery =@PayMethod_ExpressDelivery,
- ThirdPart_ExpressDelivery =@ThirdPart_ExpressDelivery,
- Currency_ExpressDelivery =@Currency_ExpressDelivery,
- Carriage_ExpressDelivery =@Carriage_ExpressDelivery,
- HavePay_ExpressDelivery =@HavePay_ExpressDelivery,
- BalanceMonthly_ExpressDelivery =@BalanceMonthly_ExpressDelivery,
- Account_ExpressDelivery =@Account_ExpressDelivery,
- ID_Customer =@ID_Customer,
- RecipProvince_ExpressDelivery =@RecipProvince_ExpressDelivery,
- RecipCity_ExpressDelivery =@RecipCity_ExpressDelivery,
- RecipDistrict_ExpressDelivery =@RecipDistrict_ExpressDelivery,
- RecipAddress_ExpressDelivery =@RecipAddress_ExpressDelivery,
- Reciptor_ExpressDelivery =@Reciptor_ExpressDelivery,
- RecipTel_ExpressDelivery =@RecipTel_ExpressDelivery,
- CustomerNo_ExpressDelivery =@CustomerNo_ExpressDelivery,
- ConsignCompany_ExpressDelivery =@ConsignCompany_ExpressDelivery,
- ConsignProvince_ExpressDelivery =@ConsignProvince_ExpressDelivery,
- ConsignCity_ExpressDelivery =@ConsignCity_ExpressDelivery,
- ConsignDistrict_ExpressDelivery =@ConsignDistrict_ExpressDelivery,
- ConsignAddress_ExpressDelivery =@ConsignAddress_ExpressDelivery,
- ConsignTel_ExpressDelivery =@ConsignTel_ExpressDelivery,
- Consignor_ExpressDelivery =@Consignor_ExpressDelivery,
- Creator_ExpressDelivery =@Creator_ExpressDelivery,
- CreateDate_ExpressDelivery =@CreateDate_ExpressDelivery,
- Comment_ExpressDelivery =@Comment_ExpressDelivery,
- LastModUser_ExpressDelivery =@LastModUser_ExpressDelivery,
- LastModDate_ExpressDelivery =@LastModDate_ExpressDelivery,
- NameCustomer_ExpressDelivery=@NameCustomer_ExpressDelivery,
- KeepPrice_ExpressDelivery=@KeepPrice_ExpressDelivery,
- ID_Assessor=@ID_Assessor,
- AssessDate_ExpressDelivery=@AssessDate_ExpressDelivery
- Where ID_ExpressDelivery =@ID_ExpressDelivery">
- <Params>
- <Param name="@ID_ExpressDelivery" type="ExpressDelivery.ID_ExpressDelivery" sourceColumn="ID_ExpressDelivery" />
- <Param name="@No_ExpressDelivery" type="ExpressDelivery.No_ExpressDelivery" sourceColumn="No_ExpressDelivery" />
- <Param name="@Date_ExpressDelivery" type="ExpressDelivery.Date_ExpressDelivery" sourceColumn="Date_ExpressDelivery" />
- <Param name="@ID_Transporter" type="ExpressDelivery.ID_Transporter" sourceColumn="ID_Transporter" />
- <Param name="@Content_ExpressDelivery" type="ExpressDelivery.Content_ExpressDelivery" sourceColumn="Content_ExpressDelivery" />
- <Param name="@OtherContent_ExpressDelivery" type="ExpressDelivery.OtherContent_ExpressDelivery"
- sourceColumn="OtherContent_ExpressDelivery" />
- <Param name="@Quantity_ExpressDelivery" type="ExpressDelivery.Quantity_ExpressDelivery"
- sourceColumn="Quantity_ExpressDelivery" />
- <Param name="@Weight_ExpressDelivery" type="ExpressDelivery.Weight_ExpressDelivery" sourceColumn="Weight_ExpressDelivery" />
- <Param name="@PayMethod_ExpressDelivery" type="ExpressDelivery.PayMethod_ExpressDelivery"
- sourceColumn="PayMethod_ExpressDelivery" />
- <Param name="@ThirdPart_ExpressDelivery" type="ExpressDelivery.ThirdPart_ExpressDelivery"
- sourceColumn="ThirdPart_ExpressDelivery" />
- <Param name="@Currency_ExpressDelivery" type="ExpressDelivery.Currency_ExpressDelivery"
- sourceColumn="Currency_ExpressDelivery" />
- <Param name="@Carriage_ExpressDelivery" type="ExpressDelivery.Carriage_ExpressDelivery"
- sourceColumn="Carriage_ExpressDelivery" />
- <Param name="@HavePay_ExpressDelivery" type="ExpressDelivery.HavePay_ExpressDelivery" sourceColumn="HavePay_ExpressDelivery" />
- <Param name="@BalanceMonthly_ExpressDelivery" type="ExpressDelivery.BalanceMonthly_ExpressDelivery"
- sourceColumn="BalanceMonthly_ExpressDelivery" />
- <Param name="@Account_ExpressDelivery" type="ExpressDelivery.Account_ExpressDelivery" sourceColumn="Account_ExpressDelivery" />
- <Param name="@ID_Customer" type="ExpressDelivery.ID_Customer" sourceColumn="ID_Customer" />
- <Param name="@RecipProvince_ExpressDelivery" type="ExpressDelivery.RecipProvince_ExpressDelivery"
- sourceColumn="RecipProvince_ExpressDelivery" />
- <Param name="@RecipCity_ExpressDelivery" type="ExpressDelivery.RecipCity_ExpressDelivery"
- sourceColumn="RecipCity_ExpressDelivery" />
- <Param name="@RecipDistrict_ExpressDelivery" type="ExpressDelivery.RecipDistrict_ExpressDelivery"
- sourceColumn="RecipDistrict_ExpressDelivery" />
- <Param name="@RecipAddress_ExpressDelivery" type="ExpressDelivery.RecipAddress_ExpressDelivery"
- sourceColumn="RecipAddress_ExpressDelivery" />
- <Param name="@Reciptor_ExpressDelivery" type="ExpressDelivery.Reciptor_ExpressDelivery"
- sourceColumn="Reciptor_ExpressDelivery" />
- <Param name="@RecipTel_ExpressDelivery" type="ExpressDelivery.RecipTel_ExpressDelivery"
- sourceColumn="RecipTel_ExpressDelivery" />
- <Param name="@CustomerNo_ExpressDelivery" type="ExpressDelivery.CustomerNo_ExpressDelivery"
- sourceColumn="CustomerNo_ExpressDelivery" />
- <Param name="@ConsignCompany_ExpressDelivery" type="ExpressDelivery.ConsignCompany_ExpressDelivery"
- sourceColumn="ConsignCompany_ExpressDelivery" />
- <Param name="@ConsignProvince_ExpressDelivery" type="ExpressDelivery.ConsignProvince_ExpressDelivery"
- sourceColumn="ConsignProvince_ExpressDelivery" />
- <Param name="@ConsignCity_ExpressDelivery" type="ExpressDelivery.ConsignCity_ExpressDelivery"
- sourceColumn="ConsignCity_ExpressDelivery" />
- <Param name="@ConsignDistrict_ExpressDelivery" type="ExpressDelivery.ConsignDistrict_ExpressDelivery"
- sourceColumn="ConsignDistrict_ExpressDelivery" />
- <Param name="@ConsignAddress_ExpressDelivery" type="ExpressDelivery.ConsignAddress_ExpressDelivery"
- sourceColumn="ConsignAddress_ExpressDelivery" />
- <Param name="@ConsignTel_ExpressDelivery" type="ExpressDelivery.ConsignTel_ExpressDelivery"
- sourceColumn="ConsignTel_ExpressDelivery" />
- <Param name="@Consignor_ExpressDelivery" type="ExpressDelivery.Consignor_ExpressDelivery"
- sourceColumn="Consignor_ExpressDelivery" />
- <Param name="@Creator_ExpressDelivery" type="ExpressDelivery.Creator_ExpressDelivery" sourceColumn="Creator_ExpressDelivery" />
- <Param name="@CreateDate_ExpressDelivery" type="ExpressDelivery.CreateDate_ExpressDelivery"
- sourceColumn="CreateDate_ExpressDelivery" />
- <Param name="@Comment_ExpressDelivery" type="ExpressDelivery.Comment_ExpressDelivery" sourceColumn="Comment_ExpressDelivery" />
- <Param name="@LastModUser_ExpressDelivery" type="ExpressDelivery.LastModUser_ExpressDelivery"
- sourceColumn="LastModUser_ExpressDelivery" />
- <Param name="@LastModDate_ExpressDelivery" type="ExpressDelivery.LastModDate_ExpressDelivery"
- sourceColumn="LastModDate_ExpressDelivery" />
- <Param name="@NameCustomer_ExpressDelivery" type="ExpressDelivery.NameCustomer_ExpressDelivery"
- sourceColumn="NameCustomer_ExpressDelivery" />
- <Param name="@KeepPrice_ExpressDelivery" type="ExpressDelivery.KeepPrice_ExpressDelivery"
- sourceColumn="KeepPrice_ExpressDelivery" />
- <Param name="@ID_Assessor" type="ExpressDelivery.ID_Assessor"
- sourceColumn="ID_Assessor" />
- <Param name="@AssessDate_ExpressDelivery" type="ExpressDelivery.AssessDate_ExpressDelivery"
- sourceColumn="AssessDate_ExpressDelivery" />
- </Params>
- </Update>
- <Audit CmdType="Text" CmdText="UPDATE ExpressDelivery SET ID_Assessor = @ID_Assessor,
- AssessDate_ExpressDelivery = @AssessDate_ExpressDelivery
- WHERE ID_ExpressDelivery = @ID_ExpressDelivery">
- <Params>
- <Param name="@ID_Assessor" type="ExpressDelivery.ID_Assessor" sourceColumn="ID_Assessor" />
- <Param name="@ID_ExpressDelivery" type="ExpressDelivery.ID_ExpressDelivery" sourceColumn="ID_ExpressDelivery" />
- <Param name="@AssessDate_ExpressDelivery" type="ExpressDelivery.AssessDate_ExpressDelivery" sourceColumn="AssessDate_ExpressDelivery" />
- </Params>
- </Audit>
- <Delete CmdType="Text" CmdText=" Delete ExpressDeliveryDetail WHERE ID_ExpressDelivery = @ID_ExpressDelivery
- DELETE ExpressDelivery WHERE ID_ExpressDelivery = @ID_ExpressDelivery
- ">
- <Params>
- <Param name="@ID_ExpressDelivery" type="Transporter.ID_ExpressDelivery" sourceColumn="ID_ExpressDelivery" />
- </Params>
- </Delete>
- </Table>
- <Table name="ExpressDeliveryDetail" Type="Child">
- <GetSchema CmdType="Text" CmdText="Select Top 0 ExpressDeliveryDetail.*,Convert(Nvarchar(64),'') AS Name_FromBill From ExpressDeliveryDetail" />
- <New CmdType="Text" CmdText="Insert Into ExpressDeliveryDetail(ID_ExpressDeliveryDetail,ID_ExpressDelivery,Type_FromBill,No_FromBill)
- Values(@ID_ExpressDeliveryDetail,@ID_ExpressDelivery,@Type_FromBill,@No_FromBill)">
- <Params>
- <Param name="@ID_ExpressDeliveryDetail" type="ExpressDeliveryDetail.ID_ExpressDeliveryDetail"
- sourceColumn="ID_ExpressDeliveryDetail" />
- <Param name="@ID_ExpressDelivery" type="ExpressDeliveryDetail.ID_ExpressDelivery" sourceColumn="ID_ExpressDelivery" />
- <Param name="@Type_FromBill" type="ExpressDeliveryDetail.Type_FromBill" sourceColumn="Type_FromBill" />
- <Param name="@No_FromBill" type="ExpressDeliveryDetail.No_FromBill" sourceColumn="No_FromBill" />
- </Params>
- </New>
- <Update CmdType="Text" CmdText="UPDATE ExpressDeliveryDetail Set
- ID_ExpressDelivery = @ID_ExpressDelivery,
- Type_FromBill = @Type_FromBill,
- No_FromBill = @No_FromBill
- Where ID_ExpressDeliveryDetail = @ID_ExpressDeliveryDetail">
- <Params>
- <Param name="@ID_ExpressDeliveryDetail" type="ExpressDeliveryDetail.ID_ExpressDeliveryDetail"
- sourceColumn="ID_ExpressDeliveryDetail" />
- <Param name="@ID_ExpressDelivery" type="ExpressDeliveryDetail.ID_ExpressDelivery" sourceColumn="ID_ExpressDelivery" />
- <Param name="@Type_FromBill" type="ExpressDeliveryDetail.Type_FromBill" sourceColumn="Type_FromBill" />
- <Param name="@No_FromBill" type="ExpressDeliveryDetail.No_FromBill" sourceColumn="No_FromBill" />
- </Params>
- </Update>
- <Delete CmdType="Text" CmdText="Delete ExpressDeliveryDetail WHERE ID_ExpressDeliveryDetail = @ID_ExpressDeliveryDetail">
- <Params>
- <Param name="@ID_ExpressDeliveryDetail" type="ExpressDeliveryDetail.ID_ExpressDeliveryDetail"
- sourceColumn="ID_ExpressDeliveryDetail" />
- </Params>
- </Delete>
- </Table>
- </Tables>
- <Search>
- <SearchAllModifyDepotBill CmdType="Text" CmdText=" SELECT M.*,
- L.Name_Location AS ChangedDepot_ModifyDepotBill,
- L.No_Location AS ChangedDepotNo_ModifyDepotBill,
- MD.ModName_ModifyTypeSettings AS ModifyDepotBill_ModifyDepotBill,
- E.Name_Employee AS Proposer_ModifyDepotBill,
- E.No_Employee AS ProposerNo_ModifyDepotBill,
- A.Name_User AS Maker_ModifyDepotBill,
- A1.Name_User AS Assessor_ModifyDepotBill,
- A2.Name_User AS lastModflyuser_ModifyDepotBill,
- convert(decimal(18,2),0.00) AS Sum_ModifyDepotBill,
- convert(decimal(18,2),0.00) AS Amount_ModifyDepotBill
- FROM ModifyDepotBill M
- INNER JOIN LOCATION L ON M.ID_Location = L.ID_Location
- LEFT JOIN ModifyTypeSettings MD ON MD.ID_ModifyTypeSettings = M.Style_ModifyDepotBill
- INNER JOIN Employee E ON E.ID_Employee = M.ID_Proposer
- INNER JOIN AppUser A ON A.ID_User = M.ID_Creator
- LEFT JOIN AppUser A1 ON A1.ID_User = M.ID_Assessor
- LEFT JOIN AppUser A2 ON A2.ID_User = M.LastModUser_ModifyDepotBill">
- <Tables>
- <Table name="AllModifyDepotBill" />
- </Tables>
- </SearchAllModifyDepotBill>
- <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,
- Location.Name_Location,Location.No_Location FROM SaleOutDepotBill
- LEFT JOIN AppUser a ON a.ID_User = SaleOutDepotBill.ID_Creator
- LEFT JOIN AppUser b ON b.ID_User = SaleOutDepotBill.ID_Assessor
- Left JOIN AppUser c ON c.ID_User = SaleOutDepotBill.LastModUser_SaleOutDepotBill
- LEFT JOIN Location ON Location.ID_Location = SaleOutDepotBill.ID_Location">
- <Tables>
- <Table name="AllSaleOutDepotBill" />
- </Tables>
- </SearchAllSaleOutDepotBill>
- <SearchAllBill CmdType="Text" CmdText=" SELECT ExpressDelivery.*,
- Transporter.No_Transporter, Transporter.Name_Transporter,
- a.Name_User as NameCreator_ExpressDelivery, b.Name_User as NameLastModUser_ExpressDelivery
- FROM ExpressDelivery
-
- LEFT JOIN Transporter ON Transporter.ID_Transporter = ExpressDelivery.ID_Transporter
- LEFT JOIN AppUser a ON a.ID_User = ExpressDelivery.Creator_ExpressDelivery
- LEFT JOIN AppUser b ON b.ID_User = ExpressDelivery.LastModUser_ExpressDelivery">
- <Tables>
- <Table name="AllBill" />
- </Tables>
- </SearchAllBill>
- <SearchAllCustomer CmdType="Text" CmdText="SELECT Customer.No_Customer,Customer.ShortName_Customer,Customer.Type_Customer,Customer.Level_Customer,Customer.IsGeneric_Customer FROM Customer ">
- <Tables>
- <Table name="AllCustomer" />
- </Tables>
- </SearchAllCustomer>
- <SearchExpressDeliveryWithNo CmdType="Text" CmdText=" DECLARE @ID_ExpressDelivery UNIQUEIDENTIFIER
- SELECT @ID_ExpressDelivery = ID_ExpressDelivery FROM ExpressDelivery WHERE No_ExpressDelivery = @No_ExpressDelivery
- SELECT ExpressDelivery.*,No_Customer,ShortName_Customer,Name_Customer, Name_Content = Case Content_ExpressDelivery When 1 Then '资料' When 2 Then '包裹' When 3 Then '其他' End,
- Name_PayMethod = Case PayMethod_ExpressDelivery When 1 Then '寄方付' When 2 Then '收方付' When 3 Then '第三方付' End,
- Transporter.No_Transporter, Transporter.Name_Transporter,
- a.Name_User as NameCreator_ExpressDelivery, b.Name_User as NameLastModUser_ExpressDelivery ,c.Name_User AS Name_Assessor
- FROM ExpressDelivery
- LEFT JOIN Customer ON Customer.ID_Customer = ExpressDelivery.ID_Customer
- LEFT JOIN Transporter ON Transporter.ID_Transporter = ExpressDelivery.ID_Transporter
- LEFT JOIN AppUser a ON a.ID_User = ExpressDelivery.Creator_ExpressDelivery
- LEFT JOIN AppUser b ON b.ID_User = ExpressDelivery.LastModUser_ExpressDelivery
- LEFT JOIN AppUser c ON c.ID_User = ExpressDelivery.ID_Assessor
- WHERE ExpressDelivery.ID_ExpressDelivery = @ID_ExpressDelivery
- Select ExpressDeliveryDetail.*,BillType.Type_BillType,Name_FromBill = Case Type_FromBill When 2 Then '销货出库单' When 3 Then '库存异动作业' End From ExpressDeliveryDetail
- Inner Join BillType On BillType.Value_BillType = ExpressDeliveryDetail.Type_FromBill WHERE ExpressDeliveryDetail.ID_ExpressDelivery = @ID_ExpressDelivery">
- <Params>
- <Param name="@No_ExpressDelivery" type="ExpressDelivery.No_ExpressDelivery" Index="0" />
- </Params>
- <Tables>
- <Table name="ExpressDelivery" />
- <Table name="ExpressDeliveryDetail" />
- </Tables>
- </SearchExpressDeliveryWithNo>
- <SearchFromBillType CmdType="Text" CmdText=" SELECT * FROM BillType WHERE Value_BillType = 2 OR Value_BillType = 3 OR Value_BillType = 0 ORDER BY Value_BillType">
- <Tables>
- <Table name="BillType" />
- </Tables>
- </SearchFromBillType>
- <SearchOutDepotBillWithNo CmdType="Text" CmdText=" IF @Value_BillType = 2
- BEGIN
- SELECT SaleOutDepotBill.ID_SaleOutDepotBill FROM SaleOutDepotBill WHERE SaleOutDepotBill.No_SaleOutDepotBill = @No_FromBill
- END
- ELSE IF @Value_BillType = 3
- BEGIN
- SELECT ModifyDepotBill.ID_ModifyDepotBill FROM ModifyDepotBill WHERE ModifyDepotBill.No_ModifyDepotBill = @No_FromBill
- END">
- <Params>
- <Param name="@Value_BillType" type="BillType.Value_BillType" Index="0" />
- <Param name="@No_FromBill" type="ExpressDelivery.No_FromBill" Index="1" />
- </Params>
- <Tables>
- <Table name="OutDepotBill" />
- </Tables>
- </SearchOutDepotBillWithNo>
- <SearchTransporter CmdType="Text" CmdText=" SELECT Transporter.ID_Transporter, Transporter.No_Transporter, Transporter.Name_Transporter FROM Transporter ORDER BY Transporter.No_Transporter">
- <Tables>
- <Table name="Transporter" />
- </Tables>
- </SearchTransporter>
- <SearchSystemSetting CmdType="Text" CmdText="SELECT SysCurrency_SystemSetting From SystemSetting">
- <Tables>
- <Table name="SystemSetting" />
- </Tables>
- </SearchSystemSetting>
- <CheckExpressDeliveryNo CmdType="Text" CmdText=" SELECT ExpressDelivery.ID_ExpressDelivery FROM ExpressDelivery WHERE ExpressDelivery.No_ExpressDelivery = @No_ExpressDelivery">
- <Params>
- <Param name="@No_ExpressDelivery" type="ExpressDelivery.No_ExpressDelivery" Index="0" />
- </Params>
- <Tables>
- <Table name="ExpressDeliveryBillNo" />
- </Tables>
- </CheckExpressDeliveryNo>
- <SearchCustomerWithNo CmdType="Text" CmdText="Select ID_Customer,ShortName_Customer,Name_Customer,SendAddr_Customer From Customer Where No_Customer = @No_Customer">
- <Params>
- <Param name="@No_Customer" type="Customer.No_Customer" Index="0" />
- </Params>
- <Tables>
- <Table name="Customer" />
- </Tables>
- </SearchCustomerWithNo>
- <SearchReciptor CmdType="Text" CmdText="SELECT Name_Linkman AS Reciptor_ExpressDelivery,Tel_Linkman AS RecipTel_ExpressDelivery FROM Linkman
- LEFT JOIN Customer ON Customer.ID_Customer = Linkman.ID_Person
- WHERE Customer.No_Customer = @No_Customer ">
- <Params>
- <Param name="@No_Customer" type="Customer.No_Customer" Index="0" />
- </Params>
- <Tables>
- <Table name="Reciptor" />
- </Tables>
- </SearchReciptor>
- <SearchReciptor1 CmdType="Text" CmdText="SELECT top 1 Name_Linkman AS Reciptor_ExpressDelivery,Tel_Linkman AS RecipTel_ExpressDelivery FROM Linkman
- LEFT JOIN Customer ON Customer.ID_Customer = Linkman.ID_Person
- WHERE Customer.No_Customer = @No_Customer ">
- <Params>
- <Param name="@No_Customer" type="Customer.No_Customer" Index="0" />
- </Params>
- <Tables>
- <Table name="Reciptor1" />
- </Tables>
- </SearchReciptor1>
- <SearchConsignor CmdType="Text" CmdText="SELECT Name_Employee AS Consignor_ExpressDelivery FROM Employee">
- <Tables>
- <Table name="Consignor" />
- </Tables>
- </SearchConsignor>
- <SearchConsignTel ConnectDB="ManageDB" CmdType="Text" CmdText="
- Select Tel_Company AS ConsignTel_ExpressDelivery,SendAddress_Company As ConsignAddress_ExpressDelivery,Name_Company AS ConsignCompany_ExpressDelivery From Company Where ID_Company = @ID_Company">
- <Params>
- <Param name="@ID_Company" type="Company.ID_Company" Index="0" />
- </Params>
- <Tables>
- <Table name="ConsignTel" />
- </Tables>
- </SearchConsignTel>
- <SearchSaleOutDepotBillWithNo CmdType="Text" CmdText="Select * From SaleOutDepotBill Where No_SaleOutDepotBill = @No_SaleOutDepotBill And ID_Assessor Is Not Null">
- <Params>
- <Param name="@No_SaleOutDepotBill" type="SaleOutDepotBill.No_SaleOutDepotBill" Index="0" />
- </Params>
- <Tables>
- <Table name="SaleOutDepotBill" />
- </Tables>
- </SearchSaleOutDepotBillWithNo>
- <SearchModifyBillWithNo CmdType="Text" CmdText="Select * From ModifyDepotBill Where No_ModifyDepotBill = @No_ModifyDepotBill And ID_Assessor Is Not Null">
- <Params>
- <Param name="@No_ModifyDepotBill" type="ModifyDepotBill.No_ModifyDepotBill" Index="0" />
- </Params>
- <Tables>
- <Table name="ModifyDepotBill" />
- </Tables>
- </SearchModifyBillWithNo>
- <SearchStatusWithNo CmdType="Text" CmdText="Select Check_ExpressDelivery From ExpressDelivery Where No_ExpressDelivery = @No_ExpressDelivery">
- <Params>
- <Param name="@No_ExpressDelivery" type="ExpressDelivery.No_ExpressDelivery" Index="0" />
- </Params>
- <Tables>
- <Table name="Status" />
- </Tables>
- </SearchStatusWithNo>
- <SearchCustomerWithBillNo CmdType="Text" CmdText="Select No_Customer From SaleOutDepotBill
- Left Join Customer On Customer.ID_Customer = SaleOutDepotBill.ID_Customer
- Where No_SaleOutDepotBill = @No_SaleOutDepotBill">
- <Params>
- <Param name="@No_SaleOutDepotBill" type="SaleOutDepotBill.No_SaleOutDepotBill" Index="0" />
- </Params>
- <Tables>
- <Table name="BillCustomer" />
- </Tables>
- </SearchCustomerWithBillNo>
- <SearchContent_ExpressDelivery CmdType="Text" CmdText="Create Table #Table
- (
- Content_ExpressDelivery Int,
- Name_Content Nvarchar(64)
- )
- Insert Into #Table(Content_ExpressDelivery,Name_Content) Values(1,'资料')
- Insert Into #Table(Content_ExpressDelivery,Name_Content) Values(2,'包裹')
- Insert Into #Table(Content_ExpressDelivery,Name_Content) Values(3,'其他')
- Select Content_ExpressDelivery,Name_Content From #Table
- Drop Table #Table">
- <Tables>
- <Table name="Content" />
- </Tables>
- </SearchContent_ExpressDelivery>
- <SearchPayMethod_ExpressDelivery CmdType="Text" CmdText="Create Table #Table
- (
- PayMethod_ExpressDelivery Int,
- Name_PayMethod Nvarchar(64)
- )
- Insert Into #Table(PayMethod_ExpressDelivery,Name_PayMethod) Values(1,'寄方付')
- Insert Into #Table(PayMethod_ExpressDelivery,Name_PayMethod) Values(2,'收方付')
- Insert Into #Table(PayMethod_ExpressDelivery,Name_PayMethod) Values(3,'第三方付')
- Select PayMethod_ExpressDelivery,Name_PayMethod From #Table
- Drop Table #Table">
- <Tables>
- <Table name="PayMethod" />
- </Tables>
- </SearchPayMethod_ExpressDelivery>
- <SearchProductMoney CmdType="Text" CmdText="Declare @CessOut_SystemSetting Decimal(14,2)
- Select @CessOut_SystemSetting = CessOut_SystemSetting From SystemSetting
- Select IsNull(Sum(SumMoney),0) AS SumMoney From (
- Select SumMoney = Case TaxCurrency_SaleBill When '外加' Then (Quantity_SaleBillProduct * UnitPrice_SaleBillProduct)*(1+@CessOut_SystemSetting/100) Else (Quantity_SaleBillProduct * UnitPrice_SaleBillProduct) End From SaleBill
- Left Join SaleBillProduct On SaleBillProduct.ID_SaleBill = SaleBill.ID_SaleBill
- Where SaleBill.ID_Assessor Is Not Null And ID_Product in (Select ID_Product From SaleOutDepotBill
- Left Join SaleOutDepotBillProduct On SaleOutDepotBillProduct.ID_SaleOutDepotBill = SaleOutDepotBill.ID_SaleOutDepotBill
- Where SaleOutDepotBill.ID_Assessor Is Not Null And Type_FromBill = 21
- And No_SaleOutDepotBill = @No_SaleOutDepotBill)
- And No_SaleBill in (Select No_FromBill From SaleOutDepotBill
- Left Join SaleOutDepotBillProduct On SaleOutDepotBillProduct.ID_SaleOutDepotBill = SaleOutDepotBill.ID_SaleOutDepotBill
- Where SaleOutDepotBill.ID_Assessor Is Not Null And Type_FromBill = 21
- And No_SaleOutDepotBill = @No_SaleOutDepotBill)
- )A">
- <Params>
- <Param name="@No_SaleOutDepotBill" type="SaleOutDepotBill.No_SaleOutDepotBill" Index="0" />
- </Params>
- <Tables>
- <Table name="ProductMoney" />
- </Tables>
- </SearchProductMoney>
- <SearchSaleOutDepotBillAndCustomerWithNo CmdType="Text" CmdText="Select Top 1 SaleOutDepotBill.*,Customer.*,Name_Linkman,Tel_Linkman From SaleOutDepotBill
- Left Join Customer On Customer.ID_Customer = SaleOutDepotBill.ID_Customer
- Left Join Linkman ON Customer.ID_Customer = Linkman.ID_Person
- Where No_SaleOutDepotBill = @No_SaleOutDepotBill And IsMain_Linkman = 1">
- <Params>
- <Param name="@No_SaleOutDepotBill" type="SaleOutDepotBill.No_SaleOutDepotBill" Index="0" />
- </Params>
- <Tables>
- <Table name="SC" />
- </Tables>
- </SearchSaleOutDepotBillAndCustomerWithNo>
- <SearchExpressDeliveryFirst CmdType="Text" CmdText=" DECLARE @ID_ExpressDelivery uniqueidentifier
- DECLARE @ExpressDeliveryNo nvarchar(64)
- SELECT TOP 1 @ExpressDeliveryNo = ExpressDelivery.No_ExpressDelivery FROM ExpressDelivery ORDER BY ExpressDelivery.No_ExpressDelivery
- SELECT @ID_ExpressDelivery = ID_ExpressDelivery FROM ExpressDelivery WHERE No_ExpressDelivery = @ExpressDeliveryNo
- SELECT ExpressDelivery.*,No_Customer,Name_Customer,ShortName_Customer,
- Transporter.No_Transporter, Transporter.Name_Transporter,Name_Content = Case Content_ExpressDelivery When 1 Then '资料' When 2 Then '包裹' When 3 Then '其他' End,
- Name_PayMethod = Case PayMethod_ExpressDelivery When 1 Then '寄方付' When 2 Then '收方付' When 3 Then '第三方付' End,
- a.Name_User as NameCreator_ExpressDelivery, b.Name_User as NameLastModUser_ExpressDelivery ,c.Name_User AS Name_Assessor
- FROM ExpressDelivery
- LEFT JOIN Customer ON Customer.ID_Customer = ExpressDelivery.ID_Customer
- LEFT JOIN Transporter ON Transporter.ID_Transporter = ExpressDelivery.ID_Transporter
- LEFT JOIN AppUser a ON a.ID_User = ExpressDelivery.Creator_ExpressDelivery
- LEFT JOIN AppUser b ON b.ID_User = ExpressDelivery.LastModUser_ExpressDelivery
- LEFT JOIN AppUser c ON c.ID_User = ExpressDelivery.ID_Assessor
- WHERE ExpressDelivery.ID_ExpressDelivery = @ID_ExpressDelivery
- Select ExpressDeliveryDetail.*,BillType.Type_BillType,Name_FromBill = Case Type_FromBill When 2 Then '销货出库单' When 3 Then '库存异动作业' End From ExpressDeliveryDetail
- Inner Join BillType On BillType.Value_BillType = ExpressDeliveryDetail.Type_FromBill WHERE ExpressDeliveryDetail.ID_ExpressDelivery = @ID_ExpressDelivery">
- <Tables>
- <Table name="ExpressDelivery" />
- <Table name="ExpressDeliveryDetail" />
- </Tables>
- </SearchExpressDeliveryFirst>
- <SearchExpressDeliveryPrevious CmdType="Text" CmdText=" DECLARE @ID_ExpressDelivery uniqueidentifier
- DECLARE @ExpressDeliveryNo nvarchar(64)
- SELECT TOP 1 @ExpressDeliveryNo = ExpressDelivery.No_ExpressDelivery FROM ExpressDelivery WHERE ExpressDelivery.No_ExpressDelivery < @No_ExpressDelivery ORDER BY ExpressDelivery.No_ExpressDelivery DESC
- SELECT @ID_ExpressDelivery = ID_ExpressDelivery FROM ExpressDelivery WHERE No_ExpressDelivery = @ExpressDeliveryNo
- SELECT ExpressDelivery.*,No_Customer,Name_Customer,ShortName_Customer,
- Transporter.No_Transporter, Transporter.Name_Transporter,Name_Content = Case Content_ExpressDelivery When 1 Then '资料' When 2 Then '包裹' When 3 Then '其他' End,
- Name_PayMethod = Case PayMethod_ExpressDelivery When 1 Then '寄方付' When 2 Then '收方付' When 3 Then '第三方付' End,
- a.Name_User as NameCreator_ExpressDelivery, b.Name_User as NameLastModUser_ExpressDelivery ,c.Name_User AS Name_Assessor
- FROM ExpressDelivery
- LEFT JOIN Customer ON Customer.ID_Customer = ExpressDelivery.ID_Customer
- LEFT JOIN Transporter ON Transporter.ID_Transporter = ExpressDelivery.ID_Transporter
- LEFT JOIN AppUser a ON a.ID_User = ExpressDelivery.Creator_ExpressDelivery
- LEFT JOIN AppUser b ON b.ID_User = ExpressDelivery.LastModUser_ExpressDelivery
- LEFT JOIN AppUser c ON c.ID_User = ExpressDelivery.ID_Assessor
- WHERE ExpressDelivery.ID_ExpressDelivery = @ID_ExpressDelivery
- Select ExpressDeliveryDetail.*,BillType.Type_BillType,Name_FromBill = Case Type_FromBill When 2 Then '销货出库单' When 3 Then '库存异动作业' End From ExpressDeliveryDetail
- Inner Join BillType On BillType.Value_BillType = ExpressDeliveryDetail.Type_FromBill WHERE ExpressDeliveryDetail.ID_ExpressDelivery = @ID_ExpressDelivery">
- <Params>
- <Param name="@No_ExpressDelivery" type="ExpressDelivery.No_ExpressDelivery" Index="0" />
- </Params>
- <Tables>
- <Table name="ExpressDelivery" />
- <Table name="ExpressDeliveryDetail" />
- </Tables>
- </SearchExpressDeliveryPrevious>
- <SearchExpressDeliveryNext CmdType="Text" CmdText=" DECLARE @ID_ExpressDelivery uniqueidentifier
- DECLARE @ExpressDeliveryNo nvarchar(64)
- SELECT TOP 1 @ExpressDeliveryNo = ExpressDelivery.No_ExpressDelivery FROM ExpressDelivery WHERE ExpressDelivery.No_ExpressDelivery > @No_ExpressDelivery ORDER BY ExpressDelivery.No_ExpressDelivery
- SELECT @ID_ExpressDelivery = ID_ExpressDelivery FROM ExpressDelivery WHERE No_ExpressDelivery = @ExpressDeliveryNo
- SELECT ExpressDelivery.*,No_Customer,Name_Customer,ShortName_Customer,
- Transporter.No_Transporter, Transporter.Name_Transporter,Name_Content = Case Content_ExpressDelivery When 1 Then '资料' When 2 Then '包裹' When 3 Then '其他' End,
- Name_PayMethod = Case PayMethod_ExpressDelivery When 1 Then '寄方付' When 2 Then '收方付' When 3 Then '第三方付' End,
- a.Name_User as NameCreator_ExpressDelivery, b.Name_User as NameLastModUser_ExpressDelivery ,c.Name_User AS Name_Assessor
- FROM ExpressDelivery
- LEFT JOIN Customer ON Customer.ID_Customer = ExpressDelivery.ID_Customer
- LEFT JOIN Transporter ON Transporter.ID_Transporter = ExpressDelivery.ID_Transporter
- LEFT JOIN AppUser a ON a.ID_User = ExpressDelivery.Creator_ExpressDelivery
- LEFT JOIN AppUser b ON b.ID_User = ExpressDelivery.LastModUser_ExpressDelivery
- LEFT JOIN AppUser c ON c.ID_User = ExpressDelivery.ID_Assessor
- WHERE ExpressDelivery.ID_ExpressDelivery = @ID_ExpressDelivery
- Select ExpressDeliveryDetail.*,BillType.Type_BillType,Name_FromBill = Case Type_FromBill When 2 Then '销货出库单' When 3 Then '库存异动作业' End From ExpressDeliveryDetail
- Inner Join BillType On BillType.Value_BillType = ExpressDeliveryDetail.Type_FromBill WHERE ExpressDeliveryDetail.ID_ExpressDelivery = @ID_ExpressDelivery">
- <Params>
- <Param name="@No_ExpressDelivery" type="ExpressDelivery.No_ExpressDelivery" Index="0" />
- </Params>
- <Tables>
- <Table name="ExpressDelivery" />
- <Table name="ExpressDeliveryDetail" />
- </Tables>
- </SearchExpressDeliveryNext>
- <SearchExpressDeliveryLast CmdType="Text" CmdText=" DECLARE @ID_ExpressDelivery uniqueidentifier
- DECLARE @ExpressDeliveryNo nvarchar(64)
- SELECT TOP 1 @ExpressDeliveryNo = ExpressDelivery.No_ExpressDelivery FROM ExpressDelivery ORDER BY ExpressDelivery.No_ExpressDelivery DESC
- SELECT @ID_ExpressDelivery = ID_ExpressDelivery FROM ExpressDelivery WHERE No_ExpressDelivery = @ExpressDeliveryNo
- SELECT ExpressDelivery.*,No_Customer,Name_Customer,ShortName_Customer,
- Transporter.No_Transporter, Transporter.Name_Transporter,Name_Content = Case Content_ExpressDelivery When 1 Then '资料' When 2 Then '包裹' When 3 Then '其他' End,
- Name_PayMethod = Case PayMethod_ExpressDelivery When 1 Then '寄方付' When 2 Then '收方付' When 3 Then '第三方付' End,
- a.Name_User as NameCreator_ExpressDelivery, b.Name_User as NameLastModUser_ExpressDelivery ,c.Name_User AS Name_Assessor
- FROM ExpressDelivery
- LEFT JOIN Customer ON Customer.ID_Customer = ExpressDelivery.ID_Customer
- LEFT JOIN Transporter ON Transporter.ID_Transporter = ExpressDelivery.ID_Transporter
- LEFT JOIN AppUser a ON a.ID_User = ExpressDelivery.Creator_ExpressDelivery
- LEFT JOIN AppUser b ON b.ID_User = ExpressDelivery.LastModUser_ExpressDelivery
- LEFT JOIN AppUser c ON c.ID_User = ExpressDelivery.ID_Assessor
- WHERE ExpressDelivery.ID_ExpressDelivery = @ID_ExpressDelivery
- Select ExpressDeliveryDetail.*,BillType.Type_BillType,Name_FromBill = Case Type_FromBill When 2 Then '销货出库单' When 3 Then '库存异动作业' End From ExpressDeliveryDetail
- Inner Join BillType On BillType.Value_BillType = ExpressDeliveryDetail.Type_FromBill WHERE ExpressDeliveryDetail.ID_ExpressDelivery = @ID_ExpressDelivery">
- <Tables>
- <Table name="ExpressDelivery" />
- <Table name="ExpressDeliveryDetail" />
- </Tables>
- </SearchExpressDeliveryLast>
- </Search>
- </Server>
- <Lables>
- <Search>
- Empty();
- NewInstance();
- timeSending.Enabled = false;
- tbNo.ReadOnly = false;
- <!--cbOutDepotBill.Enabled = false;
- txtOutDepotBillNo.ReadOnly = true;-->
- cbDept.Enabled = false;
- ikNumericTextBox8.ReadOnly = true;
- ikNumericTextBox9.ReadOnly = true;
- ikComboBoxEx1.Enabled = false;
- ikTextBox1.ReadOnly = true;
- ikComboBoxEx2.Enabled = false;
- ikTextBox2.ReadOnly = true;
- txtMoney.ReadOnly = true;
- ckPrevBill.Enabled = false;
- ikTextBox11.ReadOnly = true;
- ikTextBox12.ReadOnly = true;
- txtComment.ReadOnly = true;
- ikTextButton1.ReadOnly = true;
- ikTextBox4.ReadOnly = true;
- ikTextButton2.ReadOnly = true;
- ikTextButton3.ReadOnly = true;
- ikTextButton4.ReadOnly = true;
- ikTextBox3.ReadOnly = true;
- ikComboBoxEx4.Enabled = false;
- ikComboBoxEx3.Enabled = false;
- ikTextBox7.ReadOnly = true;
- ikTextBox6.ReadOnly = true;
- ikTextBox8.ReadOnly = true;
- ikTextBox9.ReadOnly = true;
- ikTextBox10.ReadOnly = true;
- ikTextBox5.ReadOnly = true;
- ikComboBoxEx6.Enabled = false;
- ikComboBoxEx5.Enabled = false;
- ikDataGridEx1.ReadOnly = true;
- ikCheckBox1.Enabled = false;
- ikKeepPrice.ReadOnly = true;
- ikNumericTextBox1.ReadOnly = true;
- ikButton1.Enabled = false;
- toolBar.EnableNew = GetRight(@Title,"新增");
- toolBar.EnableSubmit = false;
- toolBar.EnableModify = false;
- toolBar.EnableDelete = false;
- toolBar.EnablePrint = false;
- toolBar.EnablePrintBarCode = false;
- toolBar.EnableCheck = false;
- toolBar.EnableLoad = false;
- toolBar.EnableAudit =false;
- toolBar.EnableUnAudit =false;
- #ExpressDelivery.ID_ExpressDelivery = DBNull();
- <!--#ExpressDelivery.Type_FromBill = 0;-->
- #ExpressDelivery.Currency_ExpressDelivery = "";
- #ExpressDelivery.Carriage_ExpressDelivery = TypeConvert("Decimal","0.00");
- #ExpressDelivery.CreateDate_ExpressDelivery = DBNull();
- #ExpressDelivery.LastModDate_ExpressDelivery = DBNull();
- #ExpressDelivery.KeepNum = 2;
-
- #ExpressDelivery.AssessDate_ExpressDelivery =DBNull();
- #ExpressDelivery.ID_Assessor =DBNull();
- UpdateForm(true, "");
- tbNo.Focus();
- @Status = 0;
- </Search>
- <New>
- Empty();
- NewInstance();
- timeSending.Enabled = true;
- tbNo.ReadOnly = false;
- <!--cbOutDepotBill.Enabled = false;
- txtOutDepotBillNo.ReadOnly = true;-->
- cbDept.Enabled = true;
- ikNumericTextBox8.ReadOnly = false;
- ikNumericTextBox9.ReadOnly = false;
- ikComboBoxEx1.Enabled = true;
- ikTextBox1.ReadOnly = true;
- ikComboBoxEx2.Enabled = true;
- ikTextBox2.ReadOnly = true;
- txtMoney.ReadOnly = false;
- ckPrevBill.Enabled = true;
- ikTextBox11.ReadOnly = true;
- ikTextBox12.ReadOnly = false;
- txtComment.ReadOnly = false;
- ikTextButton1.ReadOnly = false;
- ikTextBox4.ReadOnly = true;
- ikTextButton2.ReadOnly = false;
- ikTextButton3.ReadOnly = false;
- ikTextButton4.ReadOnly = false;
- ikTextBox3.ReadOnly = false;
- ikComboBoxEx4.Enabled = true;
- ikComboBoxEx3.Enabled = true;
- ikTextBox7.ReadOnly = false;
- ikTextBox6.ReadOnly = false;
- ikTextBox8.ReadOnly = false;
- ikTextBox9.ReadOnly = false;
- ikTextBox10.ReadOnly = false;
- ikTextBox5.ReadOnly = false;
- ikComboBoxEx6.Enabled = true;
- ikComboBoxEx5.Enabled = true;
- ikDataGridEx1.ReadOnly = false;
- ikCheckBox1.Enabled = true;
- ikKeepPrice.ReadOnly = true;
- ikNumericTextBox1.ReadOnly = false;
- ikButton1.Enabled = true;
- toolBar.EnableNew = false;
- toolBar.EnableSubmit = GetRight(@Title,"新增");
- toolBar.EnableModify = false;
- toolBar.EnableDelete = false;
- toolBar.EnablePrint = false;
- toolBar.EnablePrintBarCode =false;
- toolBar.EnableCheck = false;
- toolBar.EnableLoad = true;
- toolBar.EnableAudit =false;
- toolBar.EnableUnAudit =false;
- #ExpressDelivery.ID_ExpressDelivery = NewGuid();
- <!--#ExpressDelivery.Type_FromBill = 0;-->
- #ExpressDelivery.Currency_ExpressDelivery = @SysCurrency;
- #ExpressDelivery.Carriage_ExpressDelivery = TypeConvert("Decimal","0.00");
- #ExpressDelivery.Creator_ExpressDelivery = GetLoginUserID();
- #ExpressDelivery.NameCreator_ExpressDelivery = GetCurrentUser();
- #ExpressDelivery.CreateDate_ExpressDelivery = GetCurrentTime();
- #ExpressDelivery.LastModDate_ExpressDelivery = DBNull();
- #ExpressDelivery.ConsignCompany_ExpressDelivery = #ConsignTel.ConsignCompany_ExpressDelivery;
- #ExpressDelivery.ConsignAddress_ExpressDelivery = #ConsignTel.ConsignAddress_ExpressDelivery;
- #ExpressDelivery.Quantity_ExpressDelivery = 1;
- #ExpressDelivery.Name_Content = "包裹";
- #ExpressDelivery.Content_ExpressDelivery = 2;
- #ExpressDelivery.Name_PayMethod = "寄方付";
- #ExpressDelivery.PayMethod_ExpressDelivery = 1;
- #ExpressDelivery.KeepNum = 2;
- #ExpressDelivery.ID_Assessor = DBNull();
- #ExpressDelivery.AssessDate_ExpressDelivery = DBNull();
- SetColumnDefaultValue("ExpressDeliveryDetail", "Name_FromBill", "销货出库单");
- SetColumnDefaultValue("ExpressDeliveryDetail", "Type_FromBill", 2);
- UpdateForm(true, "");
- @Status = 1;
- </New>
- <View>
- timeSending.Enabled = false;
- tbNo.ReadOnly = false;
- <!--cbOutDepotBill.Enabled = false;
- txtOutDepotBillNo.ReadOnly = true;-->
- cbDept.Enabled = false;
- ikNumericTextBox8.ReadOnly = true;
- ikNumericTextBox9.ReadOnly = true;
- ikComboBoxEx1.Enabled = false;
- ikTextBox1.ReadOnly = true;
- ikComboBoxEx2.Enabled = false;
- ikTextBox2.ReadOnly = true;
- txtMoney.ReadOnly = true;
- ckPrevBill.Enabled = false;
- ikTextBox11.ReadOnly = true;
- ikTextBox12.ReadOnly = true;
- txtComment.ReadOnly = true;
- ikTextButton1.ReadOnly = true;
- ikTextBox4.ReadOnly = true;
- ikTextButton2.ReadOnly = true;
- ikTextButton3.ReadOnly = true;
- ikTextButton4.ReadOnly = true;
- ikTextBox3.ReadOnly = true;
- ikComboBoxEx4.Enabled = false;
- ikComboBoxEx3.Enabled = false;
- ikTextBox7.ReadOnly = true;
- ikTextBox6.ReadOnly = true;
- ikTextBox8.ReadOnly = true;
- ikTextBox9.ReadOnly = true;
- ikTextBox10.ReadOnly = true;
- ikTextBox5.ReadOnly = true;
- ikComboBoxEx6.Enabled = false;
- ikComboBoxEx5.Enabled = false;
- ikDataGridEx1.ReadOnly = true;
- ikCheckBox1.Enabled = false;
- ikKeepPrice.ReadOnly = true;
- ikNumericTextBox1.ReadOnly = true;
- ikButton1.Enabled = false;
- toolBar.EnableNew = GetRight(@Title,"新增");
- toolBar.EnableSubmit = false;
- toolBar.EnablePrint = GetRight(@Title,"打印");
- <!-- toolBar.EnableModify = GetRight(@Title,"修改");
- toolBar.EnableDelete = GetRight(@Title,"删除");-->
-
- if(Equals(#ExpressDelivery.ID_Assessor, DBNull()))
- {
- toolBar.EnableAudit = true;
- toolBar.EnableModify = GetRight(@Title,"修改");
- toolBar.EnableDelete = GetRight(@Title,"删除");
- toolBar.EnableUnAudit = false;
- }
- else
- {
- toolBar.EnableAudit=false;
- toolBar.EnableUnAudit=true;
- toolBar.EnableModify=false;
- toolBar.EnableDelete=false;
- }
- toolBar.EnablePrintBarCode =GetRight(@Title,"打印");
- toolBar.EnableCheck = true;
- toolBar.EnableLoad = false;
- UpdateForm(true, "");
- @Status = 2;
- </View>
- <Modify>
- timeSending.Enabled = false;
- tbNo.ReadOnly = true;
- <!--cbOutDepotBill.Enabled = false;
- txtOutDepotBillNo.ReadOnly = true;-->
- cbDept.Enabled = true;
- ikNumericTextBox8.ReadOnly = false;
- ikNumericTextBox9.ReadOnly = false;
- ikComboBoxEx1.Enabled = true;
- ikTextBox1.ReadOnly = true;
- ikComboBoxEx2.Enabled = true;
- ikTextBox2.ReadOnly = true;
- txtMoney.ReadOnly = false;
- ckPrevBill.Enabled = true;
- ikTextBox11.ReadOnly = false;
- ikTextBox12.ReadOnly = false;
- txtComment.ReadOnly = false;
- ikTextButton1.ReadOnly = false;
- ikTextBox4.ReadOnly = true;
- ikTextButton2.ReadOnly = false;
- ikTextButton3.ReadOnly = false;
- ikTextButton4.ReadOnly = false;
- ikTextBox3.ReadOnly = false;
- ikComboBoxEx4.Enabled = true;
- ikComboBoxEx3.Enabled = true;
- ikTextBox7.ReadOnly = false;
- ikTextBox6.ReadOnly = false;
- ikTextBox8.ReadOnly = false;
- ikTextBox9.ReadOnly = false;
- ikTextBox10.ReadOnly = false;
- ikTextBox5.ReadOnly = false;
- ikComboBoxEx6.Enabled = true;
- ikComboBoxEx5.Enabled = true;
- ikDataGridEx1.ReadOnly = false;
- ikCheckBox1.Enabled = true;
- ikKeepPrice.ReadOnly = true;
- ikNumericTextBox1.ReadOnly = false;
- ikButton1.Enabled = true;
- toolBar.EnableNew = GetRight(@Title,"新增");
- toolBar.EnableSubmit = GetRight(@Title,"修改");
- toolBar.EnableModify = false;
- toolBar.EnableDelete = false;
- toolBar.EnablePrint = false;
- toolBar.EnablePrintBarCode = false;
- toolBar.EnableCheck = false;
- toolBar.EnableLoad = false;
- toolBar.EnableAudit =false;
- toolBar.EnableUnAudit =false;
- #ExpressDelivery.LastModUser_ExpressDelivery = GetLoginUserID();
- #ExpressDelivery.NameLastModUser_ExpressDelivery = GetCurrentUser();
- #ExpressDelivery.LastModDate_ExpressDelivery = DateTimeNow();
- SetColumnDefaultValue("ExpressDeliveryDetail", "Name_FromBill", "销货出库单");
- SetColumnDefaultValue("ExpressDeliveryDetail", "Type_FromBill", 2);
- UpdateForm(true, "");
- @Status = 3;
- </Modify>
- <SubmitButtonClick>
- <![CDATA[
- if (tbNo.CValue == "")
- {
- MessageBox("请输入快递单号!",@Title);
- tbNo.Focus();
- return;
- }
- if (@Status == 1 && Search("CheckExpressDeliveryNo", tbNo.CValue))
- {
- MessageBox("该快递单已存在!",@Title);
- return;
- }
-
- if (!cbDept.CheckSelectedItem())
- {
- MessageBox("请选择有效的快递公司!",@Title);
- cbDept.Focus();
- return;
- }
- if (!Search("SearchCustomerWithNo", ikTextButton1.CValue) || !Equals(#ExpressDelivery.ID_Customer,#Customer.ID_Customer))
- {
- ikTabControl1.SelectedIndex = 2;
- MessageBox("请输入有效的客户编号,并按回车确认!",@Title);
- ikTextButton1.Focus();
- return;
- }
- UpdateForm(false, "");
- SuspendLayout();
- for(@i=0;@i<RowCount("#ExpressDeliveryDetail");@i=@i+1)
- {
- SetPosition("#ExpressDeliveryDetail",@i);
- if(#ExpressDeliveryDetail.Name_FromBill == "销货出库单")
- {
- if(!Search("SearchSaleOutDepotBillWithNo",#ExpressDeliveryDetail.No_FromBill))
- {
- ikDataGridEx1.CurrentRowIndex = @i;
- ikTabControl1.SelectedIndex = 3;
- MessageBox("该销货出库单不存在或未经审核!",@Title);
- ResumeLayout();
- return;
- }
- else
- {
- if(!Equals(#SaleOutDepotBill.ID_Customer,#ExpressDelivery.ID_Customer))
- {
- ikDataGridEx1.CurrentRowIndex = @i;
- MessageBox("收件公司客户与销货出库单客户不符,请检查!",@Title);
- ikDataGridEx1.Focus();
- ResumeLayout();
- return;
- }
- }
- }
- else if(#ExpressDeliveryDetail.Name_FromBill == "库存异动作业")
- {
- if(!Search("SearchModifyBillWithNo",#ExpressDeliveryDetail.No_FromBill))
- {
- ikDataGridEx1.CurrentRowIndex = @i;
- ikTabControl1.SelectedIndex = 3;
- MessageBox("该库存异动单不存在或未经审核!",@Title);
- ResumeLayout();
- return;
- }
- }
- else
- {
- ikTabControl1.SelectedIndex = 3;
- MessageBox("请选择来源出库!",@Title);
- ResumeLayout();
- return;
- }
- if(Equals(#ExpressDeliveryDetail.ID_ExpressDeliveryDetail,GuidEmpty()))
- #ExpressDeliveryDetail.ID_ExpressDeliveryDetail = NewGuid();
- #ExpressDeliveryDetail.ID_ExpressDelivery = #ExpressDelivery.ID_ExpressDelivery;
- }
- ResumeLayout();
- if(@Status == 1)
- {
- #ExpressDelivery.CreateDate_ExpressDelivery = DateTimeNow();
- #ExpressDelivery.LastModUser_ExpressDelivery = DBNull();
- #ExpressDelivery.LastModDate_ExpressDelivery = DBNull();
- New();
- }
- else if(@Status == 3)
- {
- #ExpressDelivery.LastModDate_ExpressDelivery = DateTimeNow();
- Update();
- }
- ChangeMode("View");
- ]]>
- </SubmitButtonClick>
- <ClickikButton>
- <![CDATA[
- @j = 0;
- if(RowCount("#ExpressDeliveryDetail")>0)
- {
- SuspendLayout();
- for(@i=0;@i<RowCount("#ExpressDeliveryDetail");@i=@i+1)
- {
- SetPosition("#ExpressDeliveryDetail",@i);
- if(#ExpressDeliveryDetail.Name_FromBill == "销货出库单")
- {
- Search("SearchProductMoney",#ExpressDeliveryDetail.No_FromBill);
- }
- @j = @j + #ProductMoney.SumMoney;
- }
- ResumeLayout();
- #ExpressDelivery.KeepPrice_ExpressDelivery =@j * ikNumericTextBox1.CValue / 1000;
- UpdateForm(true,"ikKeepPrice");
- }
- else
- {
- MessageBox("没有出库单产品!",@Title);
- return;
- }
- ]]>
- </ClickikButton>
- </Lables>
- </Form>
- </Forms>
|