<Wizard id="POStatusWizard" finishButtonText="Finish" currentStep="step1"
showNextButton="false"></Wizard>
<Wizard id="POStatusWizard" finishButtonText="Finish"
showNextButton="false">
<WizardStep id="POCreated" visible="true" title="PO Created"
activate="wizardCompletedHandler"></WizardStep>
</wizard>
This.getView().byId(“wizard”).addStep( new sap.m.WizardStep(“step1”,{
Title:”step1”,
Validate:true
}));
This.getView().byId(“POStatusWizard”).getCurrentStep();
This.getView().byId(“wizard”).setCurrentStep(this.byId("POCreate");
This.getView().byId(“POStatusWizard”).getFinishButtonText();
This.getView().byId(“POStatusWizard”).getProgress();
This.getView().byId(“POStatusWizard”).getProgressStep();
This.getView().byId(“POStatusWizard”).getSteps();
This.getView().byId(“POStatusWizard”).gotostep(this.getView().byId("POApproveStatus1"), true);
This.getView().byId(“POStatusWizard”).invalidateStep(this.getView().byId("step3")); // invalidate
This.getView().byId(“POStatusWizard”).validateStep(this.getView().byId("step3")); //validate
This.getView().byId(“POStatusWizard”).nextStep();
This.getView().byId(“POStatusWizard”).previousStep();
This.getView().byId(“POStatusWizard”).indexOfStep(this.getView().byId("step2"));
This.getView().byId(“POStatusWizard”).removeAllSteps();
This.getView().byId(“POStatusWizard”).destroySteps();
<HBox class="sapUiSmallMarginTop sapUiSmallMarginBottom">
<Label text="Purchase Order Number:" class="sapUiMediumMarginBegin sapUiTinyMarginTop" design="Bold"/>
<Input value="{viewInitialModel>/PONumber}" id="PONumId" width="100%" class="sapUiTinyMarginBegin" showValueHelp="true"
valueHelpRequest="onPONumValuehelp"/>
<Button text="check Status" type="Emphasized" press="onCheckStatus" class="sapUiMediumMarginBegin sapUiTinyMarginTopS"/>
</HBox>
<Wizard visible="{viewInitialModel>/visibleWizard}" id="POStatusWizard" finishButtonText="Finish"
class="sapUiResponsivePadding--header sapUiResponsivePadding--content" showNextButton="false">
<WizardStep id="POCreated" visible="{=${POStatusModel>/POCreate} === 'X' ? true : false}" title="PO Created"
activate="wizardCompletedHandler">
<VBox class="sapUiSmallMargin">
<f:SimpleForm id="POCreatedDetails" editable="false" layout="ResponsiveGridLayout" labelSpanXL="4" labelSpanL="3" labelSpanM="4"
labelSpanS="12" adjustLabelSpan="false" emptySpanXL="0" emptySpanL="4" emptySpanM="0" emptySpanS="0" columnsXL="2" columnsL="1" columnsM="1"
singleContainerFullSize="false">
<f:content>
<Label text="PO Number"/>
<Text id="nameText" text="{POStatusModel>/PONum}"/>
<Label text="PurchaseId"/>
<Text text="{POStatusModel>/PurchaseId}"/>
<Label text="PurchaseId Name"/>
<Text text="{POStatusModel>/PurchaseName}"/>
<Label text="Recommended Delivery Date"/>
<Text id="countryText" text="{POStatusModel>/RecommendedDelDate}"/>
</f:content>
</f:SimpleForm>
</VBox>
</WizardStep>
<WizardStep id="POApprovedbySupplier" visible="{=${POStatusModel>/POApprovedbySupplier} ==='X' ? true : false}" title="PO Approval stage1"
activate="wizardCompletedHandler">
<VBox class="sapUiSmallMargin">
<f:SimpleForm id="POApprovedBySupplyDetails" editable="false" layout="ResponsiveGridLayout" labelSpanXL="4" labelSpanL="3" labelSpanM="4"
labelSpanS="12" adjustLabelSpan="false" emptySpanXL="0" emptySpanL="4" emptySpanM="0" emptySpanS="0" columnsXL="2" columnsL="1" columnsM="1"
singleContainerFullSize="false">
<f:content>
<Label text="Created on"/>
<Text id="createdDate"
text="{path:'POStatusModel>/CreatedOn', type: 'sap.ui.model.type.Date',formatOptions: { source: { pattern: 'ddMMyyyy' }, pattern: 'dd-MMM-yyyy' }}"/>
<Label text="Created by"/>
<Text text="{POStatusModel>/CreatedBy}"/>
<Label text="Supply And Logistics Officer"/>
<Text text="{POStatusModel>/ApprovedBySupply}"/>
<Label text="Chief Of Programme"/>
<Text text="{POStatusModel>/ChiefOfProgramme}"/>
<Label text="Recommended Delivery Date"/>
<Text
text="{path:'POStatusModel>/RecommendedDelDate',type: 'sap.ui.model.type.Date',formatOptions: { source: { pattern: 'ddMMyyyy' }, pattern: 'dd-MMM-yyyy' }}"/>
<Label text="Purchase Order Type"/>
<Text text="{POStatusModel>/POType}"/>
</f:content>
</f:SimpleForm>
</VBox>
</WizardStep>
<WizardStep id="POApprovedbyProgrammer" visible="{=${POStatusModel>/POApprovedbyProgrammer} === 'X' ? true : false}"
title="PO Approval stage2" activate="wizardCompletedHandler">
<VBox class="sapUiSmallMargin">
<f:SimpleForm id="POApprovedByProgrammeDetails" editable="false" layout="ResponsiveGridLayout" labelSpanXL="4" labelSpanL="3" labelSpanM="4"
labelSpanS="12" adjustLabelSpan="false" emptySpanXL="0" emptySpanL="4" emptySpanM="0" emptySpanS="0" columnsXL="2" columnsL="1" columnsM="1"
singleContainerFullSize="false">
<f:content>
<Label text="Created on"/>
<Text
text="{path:'POStatusModel>/CreatedOn', type: 'sap.ui.model.type.Date',formatOptions: { source: { pattern: 'ddMMyyyy' }, pattern: 'dd-MMM-yyyy' }}"/>
<Label text="Approved on"/>
<Text
text="{path:'POStatusModel>/ApprovedOn', type: 'sap.ui.model.type.Date',formatOptions: { source: { pattern: 'ddMMyyyy' }, pattern: 'dd-MMM-yyyy' }}"/>
<Label text="Supply And Logistics Officer"/>
<Text text="{POStatusModel>/ApprovedBySupply}"/>
<Label text="Programme Officer"/>
<Text text="{POStatusModel>/ApprovedByProgramme}"/>
<Label text="Chief Of Programme"/>
<Text text="{POStatusModel>/ChiefOfProgramme}"/>
<Label text="Recommended Delivery Date"/>
<Text
text="{path:'POStatusModel>/RecommendedDelDate',type: 'sap.ui.model.type.Date',formatOptions: { source: { pattern: 'ddMMyyyy' }, pattern: 'dd-MMM-yyyy' }}"/>
<Label text="Purchase Order Type "/>
<Text text="{POStatusModel>/POType}"/>
</f:content>
</f:SimpleForm>
</VBox>
</WizardStep>
<WizardStep id="POPicked" visible="{=${POStatusModel>/POPicked} === 'X' ? true : false}" activate="wizardCompletedHandler" title="PO Picked">
<VBox class="sapUiSmallMargin">
<f:SimpleForm id="POPickedDetails" editable="false" layout="ResponsiveGridLayout" labelSpanXL="4" labelSpanL="3" labelSpanM="4"
labelSpanS="12" adjustLabelSpan="false" emptySpanXL="0" emptySpanL="4" emptySpanM="0" emptySpanS="0" columnsXL="2" columnsL="1" columnsM="1"
singleContainerFullSize="false">
<f:content>
<Label text="Created on"/>
<Text
text="{path:'POStatusModel>/CreatedOn', type: 'sap.ui.model.type.Date',formatOptions: { source: { pattern: 'ddMMyyyy' }, pattern: 'dd-MMM-yyyy' }}"/>
<Label text="Supply And Logistics Officer"/>
<Text text="{POStatusModel>/ApprovedBySupply}"/>
<Label text="Approved on"/>
<Text
text="{path:'POStatusModel>/ApprovedOn', type: 'sap.ui.model.type.Date',formatOptions: { source: { pattern: 'ddMMyyyy' }, pattern: 'dd-MMM-yyyy' }}"/>
<Label text="Programme Officer"/>
<Text text="{POStatusModel>/ApprovedByProgramme}"/>
<Label text="Chief Of Programme"/>
<Text text="{POStatusModel>/ChiefOfProgramme}"/>
<Label text="Recommended Delivery Date"/>
<Text
text="{path:'POStatusModel>/RecommendedDelDate',type: 'sap.ui.model.type.Date',formatOptions: { source: { pattern: 'ddMMyyyy' }, pattern: 'dd-MMM-yyyy' }}"/>
<Label text="Purchase Order Type "/>
<Text text="{POStatusModel>/POType}"/>
</f:content>
</f:SimpleForm>
</VBox>
</WizardStep>
<WizardStep id="POLoaded" visible="{=${POStatusModel>/POLoaded} === 'X' ? true : false}" activate="wizardCompletedHandler" title="PO Loaded">
<VBox class="sapUiSmallMargin">
<f:SimpleForm id="POLoadedDetails" editable="false" layout="ResponsiveGridLayout" labelSpanXL="4" labelSpanL="3" labelSpanM="4"
labelSpanS="12" adjustLabelSpan="false" emptySpanXL="0" emptySpanL="4" emptySpanM="0" emptySpanS="0" columnsXL="2" columnsL="1" columnsM="1"
singleContainerFullSize="false">
<f:content>
<Label text="Created on"/>
<Text
text="{path:'POStatusModel>/CreatedOn', type: 'sap.ui.model.type.Date',formatOptions: { source: { pattern: 'ddMMyyyy' }, pattern: 'dd-MMM-yyyy' }}"/>
<Label text="Supply And Logistics Officer"/>
<Text text="{POStatusModel>/ApprovedBySupply}"/>
<Label text="Approved on"/>
<Text
text="{path:'POStatusModel>/ApprovedOn', type: 'sap.ui.model.type.Date',formatOptions: { source: { pattern: 'ddMMyyyy' }, pattern: 'dd-MMM-yyyy' }}"/>
<Label text="Programme Officer"/>
<Text text="{POStatusModel>/ApprovedByProgramme}"/>
<Label text="Chief Of Programme"/>
<Text text="{POStatusModel>/ChiefOfProgramme}"/>
<Label text="Recommended Delivery Date"/>
<Text
text="{path:'POStatusModel>/RecommendedDelDate',type: 'sap.ui.model.type.Date',formatOptions: { source: { pattern: 'ddMMyyyy' }, pattern: 'dd-MMM-yyyy' }}"/>
<Label text="Purchase Order Type "/>
<Text text="{POStatusModel>/POType}"/>
<Label text="Purchase Order Picked On "/>
<Text
text="{path:'POStatusModel>/POPickedOn',type: 'sap.ui.model.type.Date',formatOptions: { source: { pattern: 'ddMMyyyy' }, pattern: 'dd-MMM-yyyy' }}"/>
<Label text="Purchase Order Loaded On "/>
<Text
text="{path:'POStatusModel>/POLoadedOn',type: 'sap.ui.model.type.Date',formatOptions: { source: { pattern: 'ddMMyyyy' }, pattern: 'dd-MMM-yyyy' }}"/>
</f:content>
</f:SimpleForm>
</VBox>
</WizardStep>
</Wizard>
onInit: function () {
var that = this;
// Initialize view model to manipulate view
var model = new JSONModel();
model.setData({
"PONumber": "",
"visibleWizard": false
});
that.getView().setModel(model, "viewInitialModel");
// initialize data model
var wizardModel = new JSONModel();
var Wdata = [{
"PONum": "54276977",
"POCreate": "X",
"POApprovedbySupplier": "",
"POApprovedbyProgrammer": "",
"POPicked": "",
"POLoaded": "",
"POAcknowledged": "",
"PurchaseId": "L099000543",
"PurchaseName": "sample Purchase1",
"Status": "POCreated",
"CreatedOn": "10042019",
"CreatedBy": "persion1",
"ApprovedBySupply": "Person1",
"ApprovedOn": "",
"ApprovedBy": "",
"ApprovedByProgramme": "Person2",
"ChiefOfProgramme": "Person3",
"POType": "ZLO",
"RecommendedDelDate": "02052019",
"POPicStatus": "",
"POPickedOn": "",
"POLoadedOn": "",
"POAck": ""
}, {
"PONum": "54278667",
"POCreate": "X",
"POApprovedbySupplier": "X",
"POApprovedbyProgrammer": "",
"POPicked": "",
"POLoaded": "",
"POAcknowledged": "",
"PurchaseId": "L099000669",
"PurchaseName": "sample Purchase2",
"Status": "POApprovedbySupplier",
"CreatedOn": "04042019",
"CreatedBy": "Person1",
"ApprovedBySupply": "Persion1",
"ApprovedOn": "",
"ApprovedBy": "Persion1",
"ApprovedByProgramme": "Person2",
"ChiefOfProgramme": "Person3",
"POType": "ZLO",
"RecommendedDelDate": "22042019",
"POPicStatus": "",
"POPickedOn": "",
"POLoadedOn": "",
"POAck": ""
}, {
"PONum": "54278881",
"POCreate": "X",
"POApprovedbySupplier": "X",
"POApprovedbyProgrammer": "X",
"POPicked": "",
"POLoaded": "",
"POAcknowledged": "",
"PurchaseId": "L099000544",
"PurchaseName": "sample Purchase Name",
"Status": "POApprovedbyProgrammer",
"CreatedOn": "01042019",
"CreatedBy": "Person1",
"ApprovedBySupply": "Person2",
"ApprovedOn": "15042019",
"ApprovedBy": "",
"ApprovedByProgramme": "Person2",
"ChiefOfProgramme": "Person3",
"POType": "ZLO",
"RecommendedDelDate": "17042019",
"POPicStatus": "",
"POPickedOn": "",
"POLoadedOn": "",
"POAck": ""
}, {
"PONum": "54277437",
"POCreate": "X",
"POApprovedbySupplier": "X",
"POApprovedbyProgrammer": "X",
"POPicked": "X",
"POLoaded": "",
"POAcknowledged": "",
"PurchaseId": "L099000232",
"PurchaseName": "sample Purchase3",
"Status": "POPicked",
"CreatedOn": "02042019",
"CreatedBy": "Person1",
"ApprovedBySupply": "Person2",
"ApprovedOn": "04042019",
"ApprovedByProgramme": "Person2",
"ApprovedBy": "Approval1",
"ChiefOfProgramme": "Person3",
"POType": "ZLO",
"RecommendedDelDate": "05042019",
"POPicStatus": "partially",
"POPickedOn": "",
"POLoadedOn": "",
"POAck": ""
}, {
"PONum": "54278968",
"POCreate": "X",
"POApprovedbySupplier": "X",
"POApprovedbyProgrammer": "X",
"POPicked": "X",
"POLoaded": "X",
"POAcknowledged": "",
"PurchaseId": "L099000540",
"PurchaseName": "sample Purchase4",
"Status": "POLoaded",
"CreatedOn": "17042019",
"CreatedBy": "Person3",
"ApprovedBySupply": "person2",
"ApprovedOn": "18042019",
"ApprovedBy": "Approval2",
"ApprovedByProgramme": "Person2",
"ChiefOfProgramme": "Person3",
"POType": "ZLO",
"RecommendedDelDate": "25042019",
"POPicStatus": "fully",
"POPickedOn": "2604019",
"POLoadedOn": "",
"POAck": ""
}];
wizardModel.setData(Wdata);
that.getView().setModel(wizardModel, "wizardModel");
},
onCheckStatus: function (oEvent) {
var that = this;
var PONum = that.getView().getModel("viewInitialModel").getProperty("/PONumber");
that.getView().getModel("viewInitialModel").setProperty("/visibleWizard", true);
// getting static data
var sData = that.getView().getModel("wizardModel").getData();
//added filter to get purchase order details based on given input value.
var sObj = sData.filter(function (item) {
return item.PONum === PONum;
});
// Initialize model to display purchase order details.
var POStatusModel = new JSONModel(sObj[0]);
that.getView().setModel(POStatusModel, "POStatusModel");
// change current step dynamically.
that.getView().byId("POStatusWizard").setCurrentStep(that.byId(sObj[0].Status));
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
6 | |
4 | |
4 | |
3 | |
3 | |
3 | |
3 | |
3 | |
3 | |
3 |