123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631 |
- <?xml version="1.0" encoding="utf-8" ?>
- <Forms>
- <Form Name="FrmExpressReceivingAnnal">
- <Client>
- <Events>
- <Load><![CDATA[
- @Title="快递收件";
- GetSchema();
- Search("SearchBillType");
- Search("SearchSystemSetting");
- @SysCurrency=#SystemSetting.SysCurrency_SystemSetting;
- 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="dtDate" DataSource="ExpressIncept.Date_ExpressIncept"/>
- <IKTextButton name="tbNo" DataSource="ExpressIncept.No_ExpressIncept">
- <Events>
- <Enter><![CDATA[
- if(tbNo.ReadOnly == false)
- {
- if(tbNo.CValue != StringEmpty())
- {
- UpdateForm(false, "");
- if(@Status==0)
- {
- if(Search("SearchExpressInceptWithNo", tbNo.CValue))
- {
- ChangeMode("View");
- }
- else
- {
- @No=tbNo.CValue;
- ChangeMode("New");
- tbNo.CValue=@No;
- cbBillType.Focus();
- }
- }
- else if(@Status==1)
- {
- if(Search("SearchExpressInceptWithNo", tbNo.CValue))
- {
- MessageBox("该快递单已存在!",@Title);
- }
- }
- }
- else
- {
- MessageBox("请输入快递单号!",@Title);
- }
- }
- ]]>
- </Enter>
- <Click>
- ShowSearchBox("BillSearch","NODEPOT", "tbNo",tbNo.CValue);
- </Click>
- </Events>
- </IKTextButton>
- <IKComboBoxEx name="cbBillType" DisplaySource="ExpressIncept.Name_FromBill" DataSource="FromBillType" DisplayMember="Name_Bill">
- </IKComboBoxEx>
- <IKTextButton name="tbFromBill" DataSource="ExpressIncept.No_FromBill">
- <Events>
- <Click>
- if( tbFromBill.ReadOnly == false)
- {
- if( cbBillType.SelectedName == "库存异动作业" )
- {
- ShowSearchBox("ModifyDepotBillSearch","HAVEDEPOT", "tbFromBill",tbFromBill.CValue, false);
- }
- else if(cbBillType.SelectedName == "采购入库单" )
- {
- ShowSearchBox("PurchaseInDepotBillSearch","HAVEDEPOT", "tbFromBill",tbFromBill.CValue, false);
- }
- }
- </Click>
- </Events>
- </IKTextButton>
- <IKComboBoxEx name="cbDept" DisplaySource="ExpressIncept.ShortName_Transporter" ValueSource="ExpressIncept.ID_Transporter" NoSource="ExpressIncept.No_Transporter" DataSource="Transporter" DisplayMember="ShortName_Transporter" ValueMember="ID_Transporter" NoMember="No_Transporter">
- <Events>
- <Reload>
- UpdateForm(false, "cbDept");
- Search("SearchTransporter");
- UpdateForm(true, "cbDept");
- </Reload>
- </Events>
- </IKComboBoxEx>
- <IKComboBox name="cbCarriage" DisplaySource="ExpressIncept.Currency_ExpressIncept" DataSource="ExpressIncept" DisplayMember="Currency_ExpressIncept">
- </IKComboBox>
- <IKNumericTextBox name="ntbMoney" DataSource="ExpressIncept.Carriage_ExpressIncept" />
- <IKCheckBox name="ckHavePay" DataSource="ExpressIncept.HavePay_ExpressIncept"/>
- <IKTextBox name="txtName" DataSource="ExpressIncept.Sender_ExpressIncept"/>
- <IKTextBox name="txtAddr" DataSource="ExpressIncept.Address_ExpressIncept"/>
- <IKTextBox name="txtMaker" DataSource="ExpressIncept.Name_Creator"/>
- <IKDateTimeText name="dttMakerDate" DataSource="ExpressIncept.CreateDate_ExpressIncept"/>
- <IKTextBox name="txtlastmoduser" DataSource="ExpressIncept.LastModUserName_ExpressIncept"/>
- <IKDateTimeText name="dttlastmoddate" DataSource="ExpressIncept.LastModDate_ExpressIncept"/>
- <IKTextBox name="txtComment" DataSource="ExpressIncept.Comment_ExpressIncept"/>
- <IKFormToolBar name="toolBar">
- <Events>
- <ClickFirst>
- if(Search("SearchExpressInceptFirst"))
- {
- ChangeMode("View");
- }
- </ClickFirst>
- <ClickPrev>
- if(Search("SearchExpressInceptPrevious", tbNo.CValue))
- {
- ChangeMode("View");
- }
- </ClickPrev>
- <ClickNext>
- if(Search("SearchExpressInceptNext", tbNo.CValue))
- {
- ChangeMode("View");
- }
- </ClickNext>
- <ClickLast>
- if(Search("SearchExpressInceptLast"))
- {
- ChangeMode("View");
- }
- </ClickLast>
- <ClickEmpty>
- ChangeMode("Search");
- </ClickEmpty>
- <ClickSubmit>
- <Lable name="SubmitButtonClick"/>
- </ClickSubmit>
- <ClickNew>
- ChangeMode("New");
- </ClickNew>
- <ClickPrint>
- PrintReport();
- </ClickPrint>
- <ClickModify>
- ChangeMode("Modify");
- </ClickModify>
- <ClickDelete>
- Delete(); ChangeMode("Search");
- </ClickDelete>
- </Events>
- </IKFormToolBar>
- </Controls>
- <LockInfomation LockID="ID_ExpressIncept" LockNO="No_ExpressIncept" LockSearchFunction="SearchExpressInceptWithNo"/>
- <LogInfomation LogNO="#ExpressIncept.No_ExpressIncept" RecordFormField="本次运费:#ExpressIncept.Carriage_ExpressIncept" RecordDataGridField=""/>
- <ChildForms>
- <ChildForm name="BillSearch" DataSource="ExpressIncept" SearchFunction="SearchAllBill" SearchFunctionByNo="SearchExpressInceptWithNo">
- <DataColumn Index="0" MappingName="#ExpressIncept.No_ExpressIncept" HeaderText="快递单号" Width="90" ColumnType="IKDataGridTextBoxColumn"/>
- <DataColumn Index="1" MappingName="#ExpressIncept.Date_ExpressIncept" HeaderText="收件日期" Width="90" ColumnType="IKDataGridTextBoxColumn"/>
- <DataColumn Index="2" MappingName="#ExpressIncept.ShortName_Transporter" HeaderText="快递公司" Width="75" ColumnType="IKDataGridTextBoxColumn"/>
- <DataColumn Index="3" MappingName="#ExpressIncept.Sender_ExpressIncept" HeaderText="寄件人姓名" Width="75" ColumnType="IKDataGridTextBoxColumn"/>
- <DataColumn Index="4" MappingName="#ExpressIncept.Name_FromBill" HeaderText="出库参考单据" Width="75" ColumnType="IKDataGridTextBoxColumn"/>
- <DataColumn Index="5" MappingName="#ExpressIncept.No_FromBill" HeaderText="参考单据单号" Width="75" ColumnType="IKDataGridTextBoxColumn"/>
- <DataColumn Index="6" MappingName="#ExpressIncept.Address_ExpressIncept" HeaderText="寄件人地址" Width="75" ColumnType="IKDataGridTextBoxColumn"/>
- <DataColumn Index="7" MappingName="#ExpressIncept.Comment_ExpressIncept" HeaderText="备注" Width="75" 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>
- <ChildForm name="PurchaseInDepotBillSearch" DataSource="PurchaseInDepotBill" SearchFunction="SearchPurchaseInDepotBillBill" SearchFunctionByNo="">
- <DataColumn Index="0" MappingName="#PurchaseInDepotBill.No_PurchaseInDepotBill" HeaderText="采购入库单号" Width="90" ColumnType="IKDataGridTextBoxColumn"/>
- <DataColumn Index="1" MappingName="#PurchaseInDepotBill.Date_PurchaseInDepotBill" HeaderText="制单日期" Width="90" ColumnType="IKDataGridTextBoxColumn"/>
- </ChildForm>
- </ChildForms>
- </Client>
- <Server>
- <Tables>
- <Table name="ExpressIncept" Type="Parent">
- <GetSchema CmdType="Text" CmdText=" SELECT TOP 0 ExpressIncept.*,
- Name_BillType AS Name_FromBill,
- Transporter.No_Transporter,
- Transporter.ShortName_Transporter,
- AppUser.LoginName_User AS Name_Creator,
- A1.LoginName_User AS LastModUserName_ExpressIncept
- FROM ExpressIncept
- JOIN BillType ON ExpressIncept.Type_FromBill=BillType.Value_BillType
- JOIN Transporter ON ExpressIncept.ID_Transporter=Transporter.ID_Transporter
- JOIN AppUser ON AppUser.ID_User = ExpressIncept.Creator_ExpressIncept
- LEFT JOIN AppUser A1 ON A1.ID_User = ExpressIncept.LastModUser_ExpressIncept"/>
- <New CmdType="Text" CmdText="INSERT INTO ExpressIncept (ID_ExpressIncept, No_ExpressIncept, Date_ExpressIncept, Type_FromBill, No_FromBill, ID_Transporter, Currency_ExpressIncept, Carriage_ExpressIncept, HavePay_ExpressIncept, Sender_ExpressIncept, Address_ExpressIncept, Creator_ExpressIncept, CreateDate_ExpressIncept, Comment_ExpressIncept, LastModDate_ExpressIncept, LastModUser_ExpressIncept)
- values(@ID_ExpressIncept, @No_ExpressIncept, @Date_ExpressIncept, @Type_FromBill, @No_FromBill, @ID_Transporter, @Currency_ExpressIncept, @Carriage_ExpressIncept, @HavePay_ExpressIncept, @Sender_ExpressIncept, @Address_ExpressIncept, @Creator_ExpressIncept, @CreateDate_ExpressIncept, @Comment_ExpressIncept, @LastModDate_ExpressIncept, @LastModUser_ExpressIncept)">
- <Params>
- <Param name="@ID_ExpressIncept" type="ExpressIncept.ID_ExpressIncept" sourceColumn="ID_ExpressIncept"/>
- <Param name="@No_ExpressIncept" type="ExpressIncept.No_ExpressIncept" sourceColumn="No_ExpressIncept"/>
- <Param name="@Date_ExpressIncept" type="ExpressIncept.Date_ExpressIncept" sourceColumn="Date_ExpressIncept"/>
- <Param name="@Type_FromBill" type="ExpressIncept.Type_FromBill" sourceColumn="Type_FromBill"/>
- <Param name="@No_FromBill" type="ExpressIncept.No_FromBill" sourceColumn="No_FromBill"/>
- <Param name="@ID_Transporter" type="ExpressIncept.ID_Transporter" sourceColumn="ID_Transporter"/>
- <Param name="@Currency_ExpressIncept" type="ExpressIncept.Currency_ExpressIncept" sourceColumn="Currency_ExpressIncept"/>
- <Param name="@Carriage_ExpressIncept" type="ExpressIncept.Carriage_ExpressIncept" sourceColumn="Carriage_ExpressIncept"/>
- <Param name="@HavePay_ExpressIncept" type="ExpressIncept.HavePay_ExpressIncept" sourceColumn="HavePay_ExpressIncept"/>
- <Param name="@Sender_ExpressIncept" type="ExpressIncept.Sender_ExpressIncept" sourceColumn="Sender_ExpressIncept"/>
- <Param name="@Address_ExpressIncept" type="ExpressIncept.Address_ExpressIncept" sourceColumn="Address_ExpressIncept"/>
- <Param name="@Creator_ExpressIncept" type="ExpressIncept.Creator_ExpressIncept" sourceColumn="Creator_ExpressIncept"/>
- <Param name="@CreateDate_ExpressIncept" type="ExpressIncept.CreateDate_ExpressIncept" sourceColumn="CreateDate_ExpressIncept"/>
- <Param name="@Comment_ExpressIncept" type="ExpressIncept.Comment_ExpressIncept" sourceColumn="Comment_ExpressIncept"/>
- <Param name="@LastModDate_ExpressIncept" type="ExpressIncept.LastModDate_ExpressIncept" sourceColumn="LastModDate_ExpressIncept"/>
- <Param name="@LastModUser_ExpressIncept" type="ExpressIncept.LastModUser_ExpressIncept" sourceColumn="LastModUser_ExpressIncept"/>
- </Params>
- </New>
- <Update CmdType="Text" CmdText="UPDATE ExpressIncept SET
- No_ExpressIncept=@No_ExpressIncept,
- Date_ExpressIncept=@Date_ExpressIncept,
- Type_FromBill=@Type_FromBill,
- No_FromBill=@No_FromBill,
- ID_Transporter=@ID_Transporter,
- Currency_ExpressIncept=@Currency_ExpressIncept,
- Carriage_ExpressIncept=@Carriage_ExpressIncept,
- HavePay_ExpressIncept=@HavePay_ExpressIncept,
- Sender_ExpressIncept=@Sender_ExpressIncept,
- Address_ExpressIncept=@Address_ExpressIncept,
- Creator_ExpressIncept=@Creator_ExpressIncept,
- CreateDate_ExpressIncept=@CreateDate_ExpressIncept,
- Comment_ExpressIncept=@Comment_ExpressIncept,
- LastModDate_ExpressIncept=@LastModDate_ExpressIncept,
- LastModUser_ExpressIncept=@LastModUser_ExpressIncept
- WHERE ID_ExpressIncept=@ID_ExpressIncept">
- <Params>
- <Param name="@ID_ExpressIncept" type="ExpressIncept.ID_ExpressIncept" sourceColumn="ID_ExpressIncept"/>
- <Param name="@No_ExpressIncept" type="ExpressIncept.No_ExpressIncept" sourceColumn="No_ExpressIncept"/>
- <Param name="@Date_ExpressIncept" type="ExpressIncept.Date_ExpressIncept" sourceColumn="Date_ExpressIncept"/>
- <Param name="@Type_FromBill" type="ExpressIncept.Type_FromBill" sourceColumn="Type_FromBill"/>
- <Param name="@No_FromBill" type="ExpressIncept.No_FromBill" sourceColumn="No_FromBill"/>
- <Param name="@ID_Transporter" type="ExpressIncept.ID_Transporter" sourceColumn="ID_Transporter"/>
- <Param name="@Currency_ExpressIncept" type="ExpressIncept.Currency_ExpressIncept" sourceColumn="Currency_ExpressIncept"/>
- <Param name="@Carriage_ExpressIncept" type="ExpressIncept.Carriage_ExpressIncept" sourceColumn="Carriage_ExpressIncept"/>
- <Param name="@HavePay_ExpressIncept" type="ExpressIncept.HavePay_ExpressIncept" sourceColumn="HavePay_ExpressIncept"/>
- <Param name="@Sender_ExpressIncept" type="ExpressIncept.Sender_ExpressIncept" sourceColumn="Sender_ExpressIncept"/>
- <Param name="@Address_ExpressIncept" type="ExpressIncept.Address_ExpressIncept" sourceColumn="Address_ExpressIncept"/>
- <Param name="@Creator_ExpressIncept" type="ExpressIncept.Creator_ExpressIncept" sourceColumn="Creator_ExpressIncept"/>
- <Param name="@CreateDate_ExpressIncept" type="ExpressIncept.CreateDate_ExpressIncept" sourceColumn="CreateDate_ExpressIncept"/>
- <Param name="@Comment_ExpressIncept" type="ExpressIncept.Comment_ExpressIncept" sourceColumn="Comment_ExpressIncept"/>
- <Param name="@LastModDate_ExpressIncept" type="ExpressIncept.LastModDate_ExpressIncept" sourceColumn="LastModDate_ExpressIncept"/>
- <Param name="@LastModUser_ExpressIncept" type="ExpressIncept.LastModUser_ExpressIncept" sourceColumn="LastModUser_ExpressIncept"/>
- </Params>
- </Update>
- <Delete CmdType="Text" CmdText="DELETE ExpressIncept WHERE ExpressIncept.ID_ExpressIncept = @ID_ExpressIncept">
- <Params>
- <Param name="@ID_ExpressIncept" type="ExpressIncept.ID_ExpressIncept" sourceColumn="ID_ExpressIncept"/>
- </Params>
- </Delete>
- <FKErrorReport ErrorMessage="本记录被其他单据使用过,不能删除!"/>
- <UNIQUEErrorReport ErrorMessage="快递收件单单号已经存在!"/>
- </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>
- <SearchPurchaseInDepotBillBill CmdType="Text" CmdText=" SELECT PurchaseInDepotBill.* FROM PurchaseInDepotBill">
- <Tables>
- <Table name="AllPurchaseInDepotBill" />
- </Tables>
- </SearchPurchaseInDepotBillBill>
- <SearchAllBill CmdType="Text" CmdText=" SELECT ExpressIncept.*,
- Name_BillType AS Name_FromBill,
- Transporter.No_Transporter,
- Transporter.ShortName_Transporter,
- AppUser.LoginName_User AS Name_Creator,
- A1.LoginName_User AS LastModUserName_ExpressIncept
- FROM ExpressIncept
- JOIN BillType ON ExpressIncept.Type_FromBill=BillType.Value_BillType
- JOIN Transporter ON ExpressIncept.ID_Transporter=Transporter.ID_Transporter
- JOIN AppUser ON AppUser.ID_User = ExpressIncept.Creator_ExpressIncept
- LEFT JOIN AppUser A1 ON A1.ID_User = ExpressIncept.LastModUser_ExpressIncept">
- <Tables>
- <Table name="AllBill" />
- </Tables>
- </SearchAllBill>
- <SearchExpressInceptWithNo CmdType="Text" CmdText=" SELECT ExpressIncept.*,
- Name_BillType AS Name_FromBill,
- Transporter.No_Transporter,
- Transporter.ShortName_Transporter,
- AppUser.LoginName_User AS Name_Creator,
- A1.LoginName_User AS LastModUserName_ExpressIncept
- FROM ExpressIncept
- JOIN BillType ON ExpressIncept.Type_FromBill=BillType.Value_BillType
- JOIN Transporter ON ExpressIncept.ID_Transporter=Transporter.ID_Transporter
- JOIN AppUser ON AppUser.ID_User = ExpressIncept.Creator_ExpressIncept
- LEFT JOIN AppUser A1 ON A1.ID_User = ExpressIncept.LastModUser_ExpressIncept
- WHERE No_ExpressIncept=@No_ExpressIncept">
- <Params>
- <Param name="@No_ExpressIncept" type="ExpressIncept.No_ExpressIncept" sourceColumn="No_ExpressIncept"/>
- </Params>
- <Tables>
- <Table name="ExpressIncept"/>
- </Tables>
- </SearchExpressInceptWithNo>
- <SearchExpressInceptFirst CmdType="Text" CmdText=" DECLARE @NextNo nvarchar(64) DECLARE @ID_ExpressIncept uniqueidentifier
- SELECT TOP 1 @NextNo = ExpressIncept.No_ExpressIncept FROM ExpressIncept
- ORDER BY ExpressIncept.No_ExpressIncept
- SELECT @ID_ExpressIncept = ExpressIncept.ID_ExpressIncept FROM ExpressIncept WHERE ExpressIncept.No_ExpressIncept = @NextNo
- SELECT ExpressIncept.*,
- Name_BillType AS Name_FromBill,
- Transporter.No_Transporter,
- Transporter.ShortName_Transporter,
- AppUser.LoginName_User AS Name_Creator,
- A1.LoginName_User AS LastModUserName_ExpressIncept
- FROM ExpressIncept
- JOIN BillType ON ExpressIncept.Type_FromBill=BillType.Value_BillType
- JOIN Transporter ON ExpressIncept.ID_Transporter=Transporter.ID_Transporter
- JOIN AppUser ON AppUser.ID_User = ExpressIncept.Creator_ExpressIncept
- LEFT JOIN AppUser A1 ON A1.ID_User = ExpressIncept.LastModUser_ExpressIncept
- WHERE ID_ExpressIncept=@ID_ExpressIncept">
- <Tables>
- <Table name="ExpressIncept"/>
- </Tables>
- </SearchExpressInceptFirst>
- <SearchExpressInceptLast CmdType="Text" CmdText=" DECLARE @NextNo nvarchar(64) DECLARE @ID_ExpressIncept uniqueidentifier
- SELECT TOP 1 @NextNo = ExpressIncept.No_ExpressIncept FROM ExpressIncept
- ORDER BY ExpressIncept.No_ExpressIncept DESC
- SELECT @ID_ExpressIncept = ExpressIncept.ID_ExpressIncept FROM ExpressIncept WHERE ExpressIncept.No_ExpressIncept = @NextNo
- SELECT ExpressIncept.*,
- Name_BillType AS Name_FromBill,
- Transporter.No_Transporter,
- Transporter.ShortName_Transporter,
- AppUser.LoginName_User AS Name_Creator,
- A1.LoginName_User AS LastModUserName_ExpressIncept
- FROM ExpressIncept
- JOIN BillType ON ExpressIncept.Type_FromBill=BillType.Value_BillType
- JOIN Transporter ON ExpressIncept.ID_Transporter=Transporter.ID_Transporter
- JOIN AppUser ON AppUser.ID_User = ExpressIncept.Creator_ExpressIncept
- LEFT JOIN AppUser A1 ON A1.ID_User = ExpressIncept.LastModUser_ExpressIncept
- WHERE ID_ExpressIncept=@ID_ExpressIncept">
- <Tables>
- <Table name="ExpressIncept"/>
- </Tables>
- </SearchExpressInceptLast>
- <SearchExpressInceptPrevious CmdType="Text" CmdText=" DECLARE @NextNo nvarchar(64) DECLARE @ID_ExpressIncept uniqueidentifier
- SET @NextNo = @No_ExpressIncept
- SELECT TOP 1 @NextNo = ExpressIncept.No_ExpressIncept FROM ExpressIncept
- WHERE ExpressIncept.No_ExpressIncept < @No_ExpressIncept ORDER BY ExpressIncept.No_ExpressIncept DESC
- SELECT @ID_ExpressIncept = ExpressIncept.ID_ExpressIncept FROM ExpressIncept WHERE ExpressIncept.No_ExpressIncept = @NextNo
- SELECT ExpressIncept.*,
- Name_BillType AS Name_FromBill,
- Transporter.No_Transporter,
- Transporter.ShortName_Transporter,
- AppUser.LoginName_User AS Name_Creator,
- A1.LoginName_User AS LastModUserName_ExpressIncept
- FROM ExpressIncept
- JOIN BillType ON ExpressIncept.Type_FromBill=BillType.Value_BillType
- JOIN Transporter ON ExpressIncept.ID_Transporter=Transporter.ID_Transporter
- JOIN AppUser ON AppUser.ID_User = ExpressIncept.Creator_ExpressIncept
- LEFT JOIN AppUser A1 ON A1.ID_User = ExpressIncept.LastModUser_ExpressIncept
- WHERE ID_ExpressIncept=@ID_ExpressIncept">
- <Params>
- <Param name="@No_ExpressIncept" type="ExpressIncept.No_ExpressIncept" sourceColumn="No_ExpressIncept"/>
- </Params>
- <Tables>
- <Table name="ExpressIncept"/>
- </Tables>
- </SearchExpressInceptPrevious>
- <SearchExpressInceptNext CmdType="Text" CmdText=" DECLARE @NextNo nvarchar(64) DECLARE @ID_ExpressIncept uniqueidentifier
- SET @NextNo = @No_ExpressIncept
- SELECT TOP 1 @NextNo = ExpressIncept.No_ExpressIncept FROM ExpressIncept
- WHERE ExpressIncept.No_ExpressIncept > @No_ExpressIncept ORDER BY ExpressIncept.No_ExpressIncept
- SELECT @ID_ExpressIncept = ExpressIncept.ID_ExpressIncept FROM ExpressIncept WHERE ExpressIncept.No_ExpressIncept = @NextNo
- SELECT ExpressIncept.*,
- Name_BillType AS Name_FromBill,
- Transporter.No_Transporter,
- Transporter.ShortName_Transporter,
- AppUser.LoginName_User AS Name_Creator,
- A1.LoginName_User AS LastModUserName_ExpressIncept
- FROM ExpressIncept
- JOIN BillType ON ExpressIncept.Type_FromBill=BillType.Value_BillType
- JOIN Transporter ON ExpressIncept.ID_Transporter=Transporter.ID_Transporter
- JOIN AppUser ON AppUser.ID_User = ExpressIncept.Creator_ExpressIncept
- LEFT JOIN AppUser A1 ON A1.ID_User = ExpressIncept.LastModUser_ExpressIncept
- WHERE ID_ExpressIncept=@ID_ExpressIncept">
- <Params>
- <Param name="@No_ExpressIncept" type="ExpressIncept.No_ExpressIncept" sourceColumn="No_ExpressIncept"/>
- </Params>
- <Tables>
- <Table name="ExpressIncept"/>
- </Tables>
- </SearchExpressInceptNext>
- <SearchBillType CmdType="Text" CmdText=" Create Table FromBillType
- (
- Name_Bill nvarchar(64)
- )
- insert into FromBillType values ('库存异动作业')
- insert into FromBillType values ('采购入库单')
- select * from FromBillType
- drop table FromBillType">
- <Tables>
- <Table name="FromBillType"/>
- </Tables>
- </SearchBillType>
- <SearchModifyDepotBillWithNo CmdType="Text" CmdText=" SELECT ID_ModifyDepotBill FROM ModifyDepotBill
- WHERE No_ModifyDepotBill=@No_ModifyDepotBill">
- <Params>
- <Param name="@No_ModifyDepotBill" type="ModifyDepotBill.No_ModifyDepotBill" sourceColumn="No_ModifyDepotBill"/>
- </Params>
- <Tables>
- <Table name="ModifyDepotBill"/>
- </Tables>
- </SearchModifyDepotBillWithNo>
- <SearchPurchaseInDepotBillWithNo CmdType="Text" CmdText=" SELECT ID_PurchaseInDepotBill FROM PurchaseInDepotBill
- WHERE No_PurchaseInDepotBill=@No_PurchaseInDepotBill">
- <Params>
- <Param name="@No_PurchaseInDepotBill" type="PurchaseInDepotBill.No_PurchaseInDepotBill" sourceColumn="No_PurchaseInDepotBill"/>
- </Params>
- <Tables>
- <Table name="PurchaseInDepotBill"/>
- </Tables>
- </SearchPurchaseInDepotBillWithNo>
- <SearchTransporter CmdType="Text" CmdText="SELECT ID_Transporter, No_Transporter, ShortName_Transporter FROM Transporter">
- <Tables>
- <Table name="Transporter"/>
- </Tables>
- </SearchTransporter>
- <SearchSystemSetting CmdType="Text" CmdText="SELECT SysCurrency_SystemSetting From SystemSetting">
- <Tables>
- <Table name="SystemSetting"/>
- </Tables>
- </SearchSystemSetting>
- </Search>
- </Server>
- <Lables>
- <Search>
- Empty();
- NewInstance();
- dtDate.Enabled=false;
- tbNo.ReadOnly=false;
- cbBillType.Enabled=false;
- tbFromBill.ReadOnly=true;
- cbDept.Enabled=false;
- cbCarriage.Enabled=false;
- ntbMoney.Enabled=false;
- ckHavePay.Enabled=false;
- txtName.ReadOnly=true;
- txtAddr.ReadOnly=true;
- txtComment.ReadOnly=true;
- toolBar.EnableSubmit=false;
- toolBar.EnableModify=false;
- toolBar.EnableDelete=false;
- toolBar.EnableNew=GetRight(@Title,"新增");
- toolBar.EnablePrint=false;
- #ExpressIncept.Creator_ExpressIncept=DBNull();
- #ExpressIncept.CreateDate_ExpressIncept=DBNull();
- #ExpressIncept.LastModUser_ExpressIncept=DBNull();
- #ExpressIncept.LastModDate_ExpressIncept=DBNull();
- UpdateForm(true, "");
- tbNo.Focus();
- @Status=0;
- </Search>
- <New>
- Empty();
- NewInstance();
- dtDate.Enabled=true;
- tbNo.ReadOnly=false;
- cbBillType.Enabled=true;
- tbFromBill.ReadOnly=false;
- cbDept.Enabled=true;
- cbCarriage.Enabled=false;
- ntbMoney.Enabled=true;
- ckHavePay.Enabled=true;
- txtName.ReadOnly=false;
- txtAddr.ReadOnly=false;
- txtComment.ReadOnly=false;
- toolBar.EnableSubmit=GetRight(@Title,"新增");
- toolBar.EnableModify=false;
- toolBar.EnableDelete=false;
- toolBar.EnableNew=false;
- toolBar.EnablePrint=false;
- #ExpressIncept.ID_ExpressIncept=NewGuid();
- #ExpressIncept.Carriage_ExpressIncept=0;
- #ExpressIncept.Sender_ExpressIncept=DBNull();
- #ExpressIncept.Address_ExpressIncept=DBNull();
- #ExpressIncept.ID_Transporter=DBNull();
- #ExpressIncept.Creator_ExpressIncept=GetLoginUserID();
- #ExpressIncept.Name_Creator=GetCurrentUser();
- #ExpressIncept.CreateDate_ExpressIncept=GetCurrentTime();
- #ExpressIncept.LastModUser_ExpressIncept=DBNull();
- #ExpressIncept.LastModDate_ExpressIncept=DBNull();
- #ExpressIncept.Currency_ExpressIncept=@SysCurrency;
- #ExpressIncept.Name_FromBill="库存异动作业";
- UpdateForm(true, "");
- @Status=1;
- </New>
- <View>
- dtDate.Enabled=false;
- tbNo.ReadOnly=false;
- cbBillType.Enabled=false;
- tbFromBill.ReadOnly=true;
- cbDept.Enabled=false;
- cbCarriage.Enabled=false;
- ntbMoney.Enabled=false;
- ckHavePay.Enabled=false;
- txtName.ReadOnly=true;
- txtAddr.ReadOnly=true;
- txtComment.ReadOnly=true;
- toolBar.EnableSubmit=false;
- toolBar.EnableNew=GetRight(@Title,"新增");
- toolBar.EnableModify=GetRight(@Title,"修改");
- toolBar.EnableDelete=GetRight(@Title,"删除");
- toolBar.EnablePrint=GetRight(@Title,"打印");
- UpdateForm(true, "");
- @Status=2;
- </View>
- <Modify>
- dtDate.Enabled=false;
- tbNo.ReadOnly=true;
- cbBillType.Enabled=false;
- tbFromBill.ReadOnly=true;
- cbDept.Enabled=true;
- cbCarriage.Enabled=false;
- ntbMoney.Enabled=true;
- ckHavePay.Enabled=true;
- txtName.ReadOnly=false;
- txtAddr.ReadOnly=false;
- txtComment.ReadOnly=false;
- toolBar.EnableSubmit=GetRight(@Title,"修改");
- toolBar.EnableModify=false;
- toolBar.EnableDelete=GetRight(@Title,"删除");
- toolBar.EnableNew=GetRight(@Title,"新增");
- toolBar.EnablePrint=false;
- #ExpressIncept.LastModUser_ExpressIncept=GetLoginUserID();
- #ExpressIncept.LastModUserName_ExpressIncept=GetCurrentUser();
- #ExpressIncept.LastModDate_ExpressIncept=DateTimeNow();
- UpdateForm(true, "");
- @Status=3;
- </Modify>
- <SubmitButtonClick><![CDATA[
- if(tbNo.ReadOnly == false)
- {
- if(tbNo.CValue != StringEmpty())
- {
- if(Search("SearchExpressInceptWithNo", tbNo.CValue))
- {
- MessageBox("该快递单已存在!",@Title);
- tbNo.Focus();
- return;
- }
- }
- else
- {
- MessageBox("请输入快递单号!",@Title);
- tbNo.Focus();
- return;
- }
- }
- if(tbFromBill.ReadOnly == false)
- {
- if(tbFromBill.CValue != StringEmpty())
- {
- if(cbBillType.SelectedName == "库存异动作业" && Search("SearchModifyDepotBillWithNo", tbFromBill.CValue))
- {
- #ExpressIncept.Type_FromBill=3;
- }
- else if(cbBillType.SelectedName == "采购入库单" && Search("SearchPurchaseInDepotBillWithNo", tbFromBill.CValue))
- {
- #ExpressIncept.Type_FromBill=1;
- }
- else
- {
- MessageBox("该入库单不存在!",@Title);
- tbFromBill.Focus();
- return;
- }
- }
- else
- {
- MessageBox("请输入入库单号!",@Title);
- tbFromBill.Focus();
- return;
- }
- }
- if(!cbDept.CheckSelectedItem())
- {
- MessageBox("请选择有效的快递公司!",@Title);
- cbDept.Focus();
- return;
- }
- UpdateForm(false, "");
- if(@Status==1)
- {
- dttMakerDate.CValue=#ExpressIncept.CreateDate_ExpressIncept=DateTimeNow();
- New();
- }
- else if(@Status==3)
- {
- dttlastmoddate.CValue=#ExpressIncept.LastModDate_ExpressIncept=DateTimeNow();
- Update();
- }
- ChangeMode("View");
- ]]></SubmitButtonClick>
- </Lables>
- </Form>
- </Forms>
|