skulid and summary changes
This commit is contained in:
parent
998c0559f2
commit
01ed337967
@ -1,5 +1,5 @@
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<widget id="io.ionic.starter" version="0.0.17" xmlns="http://www.w3.org/ns/widgets" xmlns:android="http://schemas.android.com/apk/res/android" xmlns:cdv="http://cordova.apache.org/ns/1.0">
|
||||
<widget id="io.ionic.starter" version="0.0.19" xmlns="http://www.w3.org/ns/widgets" xmlns:android="http://schemas.android.com/apk/res/android" xmlns:cdv="http://cordova.apache.org/ns/1.0">
|
||||
<name>vnms</name>
|
||||
<description>An awesome Ionic/Cordova app.</description>
|
||||
<author email="hi@ionicframework.com" href="http://ionicframework.com/">Ionic Framework Team</author>
|
||||
|
||||
19361
package-lock.json
generated
19361
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -32,6 +32,8 @@ export class AppComponent {
|
||||
if(res.length != 0){
|
||||
localStorage.setItem('user_name',res.userName)
|
||||
localStorage.setItem('user_role',res.role)
|
||||
|
||||
this.user_email = res.email
|
||||
this.user = res.userName
|
||||
this.user_role = res.role
|
||||
if( this.user_role == 'DRIVER'){
|
||||
|
||||
@ -56,16 +56,18 @@
|
||||
|
||||
|
||||
</p>
|
||||
|
||||
<ion-item no-padding class="animated fadeInUp item-native">
|
||||
<ion-label position="floating" class="label-space" style="padding-bottom: 15px;">
|
||||
Password
|
||||
</ion-label>
|
||||
<ion-input formControlName="password" style="border-radius: 7px;">
|
||||
<ion-input [type]="showPassword ? 'password' : 'text'" formControlName="password" style="border-radius: 7px;z-index: 0!important;">
|
||||
<!-- <ion-icon name="lock" slot="start"></ion-icon> -->
|
||||
<div class="input-icon-end" (click)="togglePasswordVisibility()">
|
||||
<ion-icon #eyeIcon id="eyeIcon" name="{{ showPassword ? 'eye-off' : 'eye' }}"></ion-icon>
|
||||
</div>
|
||||
|
||||
</ion-input>
|
||||
<div class="input-icon-end" >
|
||||
<ion-icon (click)="togglePasswordVisibility()" #eyeIcon item-end id="eyeIcon" name="{{ showPassword ? 'eye-off' : 'eye' }}" style="margin-top: 3rem;margin-right: 1rem;"></ion-icon>
|
||||
</div>
|
||||
</ion-item>
|
||||
<p ion-text color="warning" class="text08" >
|
||||
|
||||
|
||||
@ -15,6 +15,12 @@
|
||||
}
|
||||
|
||||
}
|
||||
.passwordIcon{
|
||||
font-size:2rem !important;
|
||||
position: relative !important;
|
||||
top: 22px !important;
|
||||
margin: 0 auto !important;
|
||||
}
|
||||
|
||||
.paz {
|
||||
position: relative;
|
||||
|
||||
@ -12,7 +12,10 @@ import { VnmsService } from '../../vnms/vnms.service';
|
||||
export class LoginPage implements OnInit {
|
||||
|
||||
public onLoginForm: FormGroup;
|
||||
showPassword: boolean = false;
|
||||
showPassword: boolean = true;
|
||||
passwordType: string = 'password';
|
||||
passwordIcon: string = 'eye-off';
|
||||
|
||||
@ViewChild('eyeIcon', { static: false }) eyeIcon: ElementRef;
|
||||
constructor(private renderer: Renderer2,
|
||||
public navCtrl: NavController,
|
||||
@ -50,10 +53,18 @@ export class LoginPage implements OnInit {
|
||||
// )])
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
hideShowPassword() {
|
||||
this.passwordType = this.passwordType === 'text' ? 'password' : 'text';
|
||||
this.passwordIcon = this.passwordIcon === 'eye-off' ? 'eye' : 'eye-off';
|
||||
}
|
||||
|
||||
togglePasswordVisibility() {
|
||||
this.showPassword = !this.showPassword;
|
||||
const eyeIconElement: ElementRef<HTMLElement> = this.eyeIcon;
|
||||
this.renderer.setAttribute(eyeIconElement.nativeElement, 'name', this.showPassword ? 'eye-off' : 'eye');
|
||||
// const eyeIconElement: ElementRef<HTMLElement> = this.eyeIcon;
|
||||
// this.renderer.setAttribute(eyeIconElement.nativeElement, 'name', this.showPassword ? 'eye-off' : 'eye');
|
||||
}
|
||||
async forgotPass() {
|
||||
const alert = await this.alertCtrl.create({
|
||||
|
||||
@ -21,7 +21,9 @@
|
||||
</ion-toolbar>
|
||||
</ion-header>
|
||||
<ion-content>
|
||||
|
||||
<ion-refresher slot="fixed" [pullFactor]="0.5" [pullMin]="100" [pullMax]="200" (ionRefresh)="handleRefresh($event)">
|
||||
<ion-refresher-content></ion-refresher-content>
|
||||
</ion-refresher>
|
||||
<ion-card *ngFor="let progess of orderlist; let i = index;" >
|
||||
<ion-card-header class="slit-w">
|
||||
<ion-card-title>
|
||||
|
||||
@ -103,13 +103,30 @@ export class DriverListPage implements OnInit {
|
||||
element.index = index +1
|
||||
|
||||
});
|
||||
// console.log(data)
|
||||
this.orderlist = passData
|
||||
// console.log(data)
|
||||
this.orderlist.sort((a:any, b:any) => {
|
||||
if (a.status === 'Out For Delivery' && b.status === 'Delivered') {
|
||||
return -1; // 'Out For Delivery' comes first
|
||||
} else if (a.status === 'Delivered' && b.status === 'Out For Delivery') {
|
||||
return 1; // 'Delivered' comes last
|
||||
} else {
|
||||
return 0; // Maintain original order if both have the same status
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
this.random_ng_past()
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
handleRefresh(event:any) {
|
||||
setTimeout(() => {
|
||||
// Any calls to load data go here
|
||||
this.getorderlistApi()
|
||||
event.target.complete();
|
||||
}, 2000);
|
||||
}
|
||||
addOrder(){
|
||||
this._api.orderDetails.next([])
|
||||
// this.navCtrl.navigateRoot(['create-report']);
|
||||
|
||||
@ -110,7 +110,7 @@
|
||||
|
||||
<ion-grid class="under" *ngFor="let p of product">
|
||||
<ion-row>
|
||||
<ion-col size="8"> <ion-label class="title-ww" position="stacked">{{p.ProductDetails[0].productName}} <br /><span *ngIf="p.productSpec != '' && p.productSpec != null">({{p.productSpec}} )</span> </ion-label></ion-col>
|
||||
<ion-col size="8"> <ion-label class="title-ww" position="stacked">{{p.ProductDetails[0].productName}} <br /><span *ngIf="p.ProductDetails[0].skuId != '' && p.ProductDetails[0].skuId != null">({{p.ProductDetails[0].skuId}} )</span> <br /><span *ngIf="p.productSpec != '' && p.productSpec != null">({{p.productSpec}} )</span> </ion-label></ion-col>
|
||||
<ion-col class="align-center mt-px" size="4" > <ion-label class="qty-c" position="stacked">x{{p.qty}}</ion-label>
|
||||
<!-- <ion-input inputmode="numeric" type="number" placeholder="Qty" [(ngModel)]="p.qty" readonly></ion-input> -->
|
||||
</ion-col>
|
||||
@ -138,5 +138,70 @@
|
||||
|
||||
|
||||
<hr>
|
||||
|
||||
|
||||
<ion-grid>
|
||||
<ion-row>
|
||||
|
||||
<ion-col size="12" class="title-w" *ngIf="orderstatus == 'Delivered'" >
|
||||
<span class="head-wm" style="text-transform: capitalize;"> RETURN DETAILS</span>
|
||||
</ion-col>
|
||||
<!-- <ion-col size="12" class="tex-wm" >
|
||||
<span style="text-transform: capitalize;"> Placed on July 23, 2023</span>
|
||||
</ion-col> -->
|
||||
</ion-row>
|
||||
|
||||
</ion-grid>
|
||||
|
||||
<ion-list>
|
||||
|
||||
<ion-list-header color="light" *ngIf="orderstatus == 'Delivered'">
|
||||
|
||||
<ion-grid >
|
||||
<ion-row>
|
||||
<ion-col class="align-center" size="1"> <ion-label color="dark" position="stacked" class="fw700"> </ion-label></ion-col>
|
||||
<ion-col size="5"> <ion-label color="dark" position="stacked" class="fw700"> Product</ion-label></ion-col>
|
||||
<ion-col class="align-right" size="5"> <ion-label color="dark" position="stacked" >Qty</ion-label>
|
||||
<ion-col class="align-center" size="1"> <ion-label color="dark" position="stacked" class="fw700"> </ion-label></ion-col>
|
||||
<!-- <ion-input inputmode="numeric" type="number" placeholder="Qty" [(ngModel)]="p.qty" readonly></ion-input> -->
|
||||
</ion-col>
|
||||
|
||||
</ion-row>
|
||||
</ion-grid>
|
||||
|
||||
</ion-list-header>
|
||||
<ion-grid class="under" *ngFor="let p of productReturn">
|
||||
<ion-row *ngIf="orderstatus == 'Delivered'">
|
||||
<ion-col size="8"> <ion-label class="title-ww" position="stacked">{{p.ProductDetails[0].productName}} <br /><span *ngIf="p.ProductDetails[0].skuId != '' && p.ProductDetails[0].skuId != null">({{p.ProductDetails[0].skuId}} )</span> <br /><span *ngIf="p.cylinderNo != '' && p.cylinderNo != null">({{p.cylinderNo}} )</span> </ion-label></ion-col>
|
||||
<ion-col class="align-center mt-px" size="4" > <ion-label class="qty-c" position="stacked">x{{p.qty}}</ion-label>
|
||||
<!-- <ion-input inputmode="numeric" type="number" placeholder="Qty" [(ngModel)]="p.qty" readonly></ion-input> -->
|
||||
</ion-col>
|
||||
|
||||
</ion-row>
|
||||
<hr>
|
||||
</ion-grid>
|
||||
|
||||
|
||||
<ion-grid class="under" *ngIf="orderstatus == 'Delivered'">
|
||||
<ion-row>
|
||||
<ion-col class="align-right" size="8"> <ion-label color="dark" class="title-ww2 align-right red12" position="stacked"> Total </ion-label></ion-col>
|
||||
<ion-col class="align-center mt-px" size="4" > <ion-label class="qty-c" position="stacked"> {{countSumReturn}} </ion-label>
|
||||
<!-- <ion-input inputmode="numeric" type="number" placeholder="Qty" [(ngModel)]="p.qty" readonly></ion-input> -->
|
||||
</ion-col>
|
||||
<!-- <ion-col size="1"> <ion-label color="dark" position="stacked"></ion-label></ion-col> -->
|
||||
</ion-row>
|
||||
<hr>
|
||||
<!-- <ion-button size="medium" expand="full" class="addMore2" (click)="goto()" no-margin>Go Back to Homepage</ion-button>
|
||||
<ion-row style="margin-top: 5rem;color: #BA0404;">
|
||||
<ion-col class="align-right" size="8"> <a (click)="cancelOrder()" ><u>Cancel Order</u></a></ion-col>
|
||||
|
||||
|
||||
</ion-row> -->
|
||||
<!-- <ion-button size="medium" expand="full" class="addMore" (click)="goto()" no-margin>Cancel Order</ion-button>
|
||||
<ion-button size="medium" expand="full" class="addMore" (click)="goto()" no-margin>Go Back to Homepage</ion-button> -->
|
||||
</ion-grid>
|
||||
|
||||
</ion-list>
|
||||
|
||||
|
||||
</ion-content>
|
||||
@ -12,7 +12,7 @@ export class ListOrderComponent implements OnInit {
|
||||
product:any =[];
|
||||
countSum:any =[];createdAt:any =[];
|
||||
customerName:any=[];orderstatus:any=[];
|
||||
address:any =[];city:any=[];pincode:any=[];phoneNo:any=[];
|
||||
address:any =[];city:any=[];pincode:any=[];phoneNo:any=[];productReturn:any =[]; countSumReturn:any =[];
|
||||
constructor(public _api:VnmsService, public navCtrl: NavController, public toastCtrl: ToastController) {
|
||||
|
||||
|
||||
@ -63,6 +63,29 @@ export class ListOrderComponent implements OnInit {
|
||||
|
||||
})
|
||||
|
||||
this._api.getReturnProductListSummary(data).subscribe((res:any) => {
|
||||
console.log(res)
|
||||
if(res.status == 200){
|
||||
// res.data.forEach((element:any) => {
|
||||
// element.ProductDetails[0]
|
||||
// });
|
||||
|
||||
|
||||
this.productReturn = res.data
|
||||
|
||||
let tmp:any =[];
|
||||
this.productReturn.forEach((element:any) => {
|
||||
tmp.push(element.qty)
|
||||
});
|
||||
const sum = tmp.reduce((b:any, a:any) => parseInt(b) + parseInt(a), 0);
|
||||
console.log(sum); // 6
|
||||
console.log(tmp);
|
||||
this.countSumReturn = sum
|
||||
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
}
|
||||
goto(){
|
||||
|
||||
@ -76,12 +99,14 @@ export class ListOrderComponent implements OnInit {
|
||||
// let param ={id: this.orderPrimaryId, status:'Cancelled'}
|
||||
let tmp:any =[];
|
||||
this.product.forEach((element:any) => {
|
||||
tmp.push({id:element.id , status: 'Delivered'})
|
||||
tmp.push({orderId:element.orderId , status: 'Delivered'})
|
||||
|
||||
});
|
||||
|
||||
this.orderId = localStorage.getItem('orderId')
|
||||
|
||||
let param = {driver: tmp}
|
||||
|
||||
let param = {driver: tmp ,orderId: this.orderId}
|
||||
|
||||
console.log(param)
|
||||
|
||||
|
||||
@ -20,7 +20,9 @@
|
||||
</ion-buttons>
|
||||
</ion-col>
|
||||
<ion-col size="9" > <ion-text color="medium" >
|
||||
<span class="t-title" style="text-transform: capitalize;">{{orderId}}</span>
|
||||
<span class="t-title" style="text-transform: capitalize;">{{orderId}}</span>-
|
||||
<span class="t-title" style="text-transform: capitalize;">{{Customer}}</span>
|
||||
|
||||
</ion-text></ion-col>
|
||||
|
||||
</ion-row>
|
||||
@ -39,12 +41,15 @@
|
||||
|
||||
|
||||
<ion-content class="profile">
|
||||
<ion-list-header color="light">
|
||||
<h5> Delivery Product </h5>
|
||||
</ion-list-header>
|
||||
<ion-list-header color="light">
|
||||
|
||||
<ion-grid >
|
||||
<ion-row>
|
||||
<ion-col class="align-center" size="1"> <ion-label color="dark" position="stacked" class="fw700"> </ion-label></ion-col>
|
||||
<ion-col size="5"> <ion-label color="dark" position="stacked" class="fw700"> Order ID</ion-label></ion-col>
|
||||
<ion-col size="5"> <ion-label color="dark" position="stacked" class="fw700"> Product</ion-label></ion-col>
|
||||
<ion-col class="align-right" size="5"> <ion-label color="dark" position="stacked" >Qty</ion-label>
|
||||
<ion-col class="align-center" size="1"> <ion-label color="dark" position="stacked" class="fw700"> </ion-label></ion-col>
|
||||
<!-- <ion-input inputmode="numeric" type="number" placeholder="Qty" [(ngModel)]="p.qty" readonly></ion-input> -->
|
||||
@ -59,7 +64,7 @@
|
||||
|
||||
<ion-grid class="under" *ngFor="let p of product">
|
||||
<ion-row>
|
||||
<ion-col size="8"> <ion-label class="title-ww" position="stacked">{{p.ProductDetails[0].productName}} <br /><span *ngIf="p.productSpec != '' && p.productSpec != null">({{p.productSpec}} )</span> </ion-label></ion-col>
|
||||
<ion-col size="8"> <ion-label class="title-ww" position="stacked">{{p.ProductDetails[0].productName}} <br /><span *ngIf="p.ProductDetails[0].skuId != '' && p.ProductDetails[0].skuId != null">({{p.ProductDetails[0].skuId}} )</span> </ion-label></ion-col>
|
||||
<ion-col class="align-center mt-px" size="4" > <ion-label class="qty-c" position="stacked">x{{p.qty}}</ion-label>
|
||||
<!-- <ion-input inputmode="numeric" type="number" placeholder="Qty" [(ngModel)]="p.qty" readonly></ion-input> -->
|
||||
</ion-col>
|
||||
@ -87,6 +92,55 @@
|
||||
|
||||
|
||||
<hr>
|
||||
<ion-list-header color="light">
|
||||
<h5>Return Product</h5>
|
||||
</ion-list-header>
|
||||
<ion-list-header color="light">
|
||||
|
||||
<ion-grid >
|
||||
<ion-row>
|
||||
<ion-col class="align-center" size="1"> <ion-label color="dark" position="stacked" class="fw700"> </ion-label></ion-col>
|
||||
<ion-col size="5"> <ion-label color="dark" position="stacked" class="fw700"> Product</ion-label></ion-col>
|
||||
<ion-col class="align-right" size="5"> <ion-label color="dark" position="stacked" >Qty</ion-label>
|
||||
<ion-col class="align-center" size="1"> <ion-label color="dark" position="stacked" class="fw700"> </ion-label></ion-col>
|
||||
<!-- <ion-input inputmode="numeric" type="number" placeholder="Qty" [(ngModel)]="p.qty" readonly></ion-input> -->
|
||||
</ion-col>
|
||||
|
||||
</ion-row>
|
||||
</ion-grid>
|
||||
|
||||
</ion-list-header>
|
||||
<ion-list>
|
||||
|
||||
|
||||
<ion-grid class="under" *ngFor="let p of productReturn">
|
||||
<ion-row>
|
||||
<ion-col size="8"> <ion-label class="title-ww" position="stacked">{{p.ProductDetails[0].productName}} <br /><span *ngIf="p.ProductDetails[0].skuId != '' && p.ProductDetails[0].skuId != null">({{p.ProductDetails[0].skuId}} )</span> <br /><span *ngIf="p.cylinderNo != '' && p.cylinderNo != null">({{p.cylinderNo}} )</span> </ion-label></ion-col>
|
||||
<ion-col class="align-center mt-px" size="4" > <ion-label class="qty-c" position="stacked">x{{p.qty}}</ion-label>
|
||||
<!-- <ion-input inputmode="numeric" type="number" placeholder="Qty" [(ngModel)]="p.qty" readonly></ion-input> -->
|
||||
</ion-col>
|
||||
|
||||
</ion-row>
|
||||
<hr>
|
||||
</ion-grid>
|
||||
|
||||
|
||||
<ion-grid class="under" >
|
||||
<ion-row>
|
||||
<ion-col class="align-right" size="8"> <ion-label color="dark" class="title-ww2 align-right red12" position="stacked"> Total </ion-label></ion-col>
|
||||
<ion-col class="align-center mt-px" size="4" > <ion-label class="qty-c" position="stacked"> {{countSumReturn}} </ion-label>
|
||||
<!-- <ion-input inputmode="numeric" type="number" placeholder="Qty" [(ngModel)]="p.qty" readonly></ion-input> -->
|
||||
</ion-col>
|
||||
<!-- <ion-col size="1"> <ion-label color="dark" position="stacked"></ion-label></ion-col> -->
|
||||
</ion-row>
|
||||
<hr>
|
||||
|
||||
<!-- <ion-button size="medium" expand="full" class="addMore" (click)="goto()" no-margin>Cancel Order</ion-button>
|
||||
<ion-button size="medium" expand="full" class="addMore" (click)="goto()" no-margin>Go Back to Homepage</ion-button> -->
|
||||
</ion-grid>
|
||||
|
||||
</ion-list>
|
||||
|
||||
</ion-content>
|
||||
|
||||
</ion-content>
|
||||
@ -10,17 +10,19 @@ import { NavController } from '@ionic/angular';
|
||||
export class OrderListSummaryComponent implements OnInit {
|
||||
|
||||
orderId:any =[];
|
||||
product:any =[];
|
||||
countSum:any =[];
|
||||
product:any =[];Customer:any =[];
|
||||
countSum:any =[];productReturn:any =[];countSumReturn:any =[];
|
||||
constructor(public _api:VnmsService, public navCtrl: NavController) { }
|
||||
|
||||
ngOnInit() {
|
||||
|
||||
this.orderId = localStorage.getItem('orderId')
|
||||
|
||||
this.Customer = localStorage.getItem('Customer')
|
||||
let tmp = localStorage.getItem('orderIdReturn')
|
||||
console.log('0')
|
||||
let data ={orderId : this.orderId}
|
||||
if(tmp == '0'){
|
||||
|
||||
|
||||
|
||||
|
||||
@ -48,8 +50,7 @@ export class OrderListSummaryComponent implements OnInit {
|
||||
|
||||
})
|
||||
|
||||
}else{
|
||||
|
||||
|
||||
|
||||
this._api.getReturnProductListSummary(data).subscribe((res:any) => {
|
||||
console.log(res)
|
||||
@ -59,21 +60,21 @@ export class OrderListSummaryComponent implements OnInit {
|
||||
// });
|
||||
|
||||
|
||||
this.product = res.data
|
||||
this.productReturn = res.data
|
||||
|
||||
let tmp:any =[];
|
||||
this.product.forEach((element:any) => {
|
||||
this.productReturn.forEach((element:any) => {
|
||||
tmp.push(element.qty)
|
||||
});
|
||||
const sum = tmp.reduce((b:any, a:any) => parseInt(b) + parseInt(a), 0);
|
||||
console.log(sum); // 6
|
||||
console.log(tmp);
|
||||
this.countSum = sum
|
||||
this.countSumReturn = sum
|
||||
|
||||
}
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
goto(){
|
||||
|
||||
@ -63,18 +63,26 @@
|
||||
</ion-item>
|
||||
<ion-item>
|
||||
<ion-grid>
|
||||
<!-- <ion-row> <ion-textarea *ngIf="check(inputFieldGroups[i]) === 'Mixed Gas'" class="textarea-r" label="Disabled textarea" [(ngModel)]="fieldGroup.productSpec" placeholder="Description"></ion-textarea> </ion-row> -->
|
||||
|
||||
<ion-row> <ion-textarea class="textarea-r" label="Disabled textarea" [(ngModel)]="fieldGroup.productSpec" placeholder="Cylinder No"></ion-textarea> </ion-row>
|
||||
<ion-row>
|
||||
<ion-col style="
|
||||
margin-top: 2%;"><a class="cancel" (click)="removeInputFieldGroup(i)">Remove</a></ion-col>
|
||||
<ion-col style="text-align: end;
|
||||
margin-top: 2%;"> Qty:</ion-col>
|
||||
<ion-col style="margin-top: -0.6rem;"> <ion-buttons>
|
||||
<ion-button size="medium" (click)="decrementQty(fieldGroup.qty,i)" >
|
||||
<!-- <ion-button size="medium" (click)="decrementQty(fieldGroup.qty,i)" >
|
||||
<ion-icon name="remove-circle-outline"></ion-icon>
|
||||
</ion-button><p>{{fieldGroup.qty}}</p>
|
||||
<ion-button size="medium" (click)="incrementQty(fieldGroup.qty,i)">
|
||||
<ion-icon name="add-circle-outline" class="custom-action-icon"></ion-icon>
|
||||
</ion-button> -->
|
||||
|
||||
<ion-button size="medium" expand="full" class="addMore" (click)="decrementQty(fieldGroup.qty,i)" >
|
||||
<ion-icon name="remove-outline" class="sizeBig"></ion-icon>
|
||||
</ion-button><p style="font-size: 20px;">{{fieldGroup.qty}}</p>
|
||||
<ion-button size="medium" expand="full" class="addMore" (click)="incrementQty(fieldGroup.qty,i)">
|
||||
<ion-icon name="add-outline" class="sizeBig"></ion-icon>
|
||||
</ion-button>
|
||||
|
||||
</ion-buttons></ion-col>
|
||||
|
||||
@ -140,5 +140,16 @@ font-style: normal;
|
||||
font-weight: 500;
|
||||
line-height: 30px;
|
||||
}
|
||||
|
||||
|
||||
.textarea-r{
|
||||
width: 100%;
|
||||
border-radius: 8px;
|
||||
border: 1px solid #bfb9b9;
|
||||
background: #FFF;
|
||||
box-shadow: 0px 2px 5px 0px rgba(0, 0, 0, 0.1);
|
||||
margin: 1%;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
|
||||
@ -230,7 +230,7 @@ val(data:any){
|
||||
let cus = localStorage.getItem('cusId')
|
||||
let driverId = localStorage.getItem('rolePk')
|
||||
product.forEach((element:any) => {
|
||||
temp.push({orderId: this.orderId,productId:element.product.id,cusId:cus,qty:element.qty,driverId:driverId,returnTime:new Date(),createdBy:driverId})
|
||||
temp.push({orderId: this.orderId,productId:element.product.id,cusId:cus,qty:element.qty,driverId:driverId,returnTime:new Date(),createdBy:driverId,cylinderNo:element.productSpec})
|
||||
});
|
||||
|
||||
console.log(temp)
|
||||
|
||||
@ -20,7 +20,7 @@
|
||||
</ion-buttons>
|
||||
</ion-col>
|
||||
<ion-col size="9" > <ion-text color="medium" >
|
||||
<span class="t-title" style="text-transform: capitalize;"> Summary</span>
|
||||
<span class="t-title" style="text-transform: capitalize;"> Today Summary</span>
|
||||
</ion-text></ion-col>
|
||||
|
||||
</ion-row>
|
||||
@ -39,16 +39,16 @@
|
||||
|
||||
|
||||
<ion-content class="profile">
|
||||
<ion-list-header color="light">
|
||||
<!-- <ion-list-header color="light">
|
||||
<h5>Delivery Product</h5>
|
||||
</ion-list-header>
|
||||
</ion-list-header> -->
|
||||
<ion-list-header color="light">
|
||||
|
||||
<ion-grid >
|
||||
<ion-row>
|
||||
<ion-col class="align-center" size="1"> <ion-label color="dark" position="stacked" class="fw700"> </ion-label></ion-col>
|
||||
<ion-col size="5"> <ion-label color="dark" position="stacked" class="fw700"> Product</ion-label></ion-col>
|
||||
<ion-col class="align-right" size="5"> <ion-label color="dark" position="stacked" >Qty</ion-label>
|
||||
<ion-col size="5"> <ion-label color="dark" position="stacked" class="fw700"> Order ID</ion-label></ion-col>
|
||||
<ion-col class="align-right" size="5"> <ion-label color="dark" position="stacked" >Customer</ion-label>
|
||||
<ion-col class="align-center" size="1"> <ion-label color="dark" position="stacked" class="fw700"> </ion-label></ion-col>
|
||||
<!-- <ion-input inputmode="numeric" type="number" placeholder="Qty" [(ngModel)]="p.qty" readonly></ion-input> -->
|
||||
</ion-col>
|
||||
@ -63,7 +63,7 @@
|
||||
<ion-grid class="under" *ngFor="let p of orderlist" (click)="list(p)">
|
||||
<ion-row>
|
||||
<ion-col size="8"> <ion-label class="title-ww" position="stacked">{{p.orderId}} </ion-label></ion-col>
|
||||
<ion-col class="align-center mt-px" size="4" > <ion-label class="qty-c" position="stacked">x {{p.total_amount}}</ion-label>
|
||||
<ion-col class="align-center mt-px" size="4" > <ion-label class="qty-c" position="stacked">{{p.cusName}}</ion-label>
|
||||
<!-- <ion-input inputmode="numeric" type="number" placeholder="Qty" [(ngModel)]="p.qty" readonly></ion-input> -->
|
||||
</ion-col>
|
||||
|
||||
@ -74,10 +74,10 @@
|
||||
|
||||
<ion-grid class="under" >
|
||||
<ion-row>
|
||||
<ion-col class="align-right" size="8"> <ion-label color="dark" class="title-ww2 align-right red12" position="stacked"> Total </ion-label></ion-col>
|
||||
<ion-col class="align-center mt-px" size="4" > <ion-label class="qty-c" position="stacked"> {{countSum}} </ion-label>
|
||||
<!-- <ion-col class="align-right" size="8"> <ion-label color="dark" class="title-ww2 align-right red12" position="stacked"> Total </ion-label></ion-col>
|
||||
<ion-col class="align-center mt-px" size="4" > <ion-label class="qty-c" position="stacked"> {{countSum}} </ion-label> -->
|
||||
<!-- <ion-input inputmode="numeric" type="number" placeholder="Qty" [(ngModel)]="p.qty" readonly></ion-input> -->
|
||||
</ion-col>
|
||||
<!-- </ion-col> -->
|
||||
<!-- <ion-col size="1"> <ion-label color="dark" position="stacked"></ion-label></ion-col> -->
|
||||
</ion-row>
|
||||
<hr>
|
||||
@ -89,8 +89,8 @@
|
||||
</ion-list>
|
||||
|
||||
|
||||
<hr>
|
||||
<ion-list-header color="light">
|
||||
<!-- <hr> -->
|
||||
<!-- <ion-list-header color="light">
|
||||
<h5> Return Products </h5>
|
||||
</ion-list-header>
|
||||
<ion-list-header color="light">
|
||||
@ -101,7 +101,7 @@
|
||||
<ion-col size="5"> <ion-label color="dark" position="stacked" class="fw700"> Product</ion-label></ion-col>
|
||||
<ion-col class="align-right" size="5"> <ion-label color="dark" position="stacked" >Qty</ion-label>
|
||||
<ion-col class="align-center" size="1"> <ion-label color="dark" position="stacked" class="fw700"> </ion-label></ion-col>
|
||||
<!-- <ion-input inputmode="numeric" type="number" placeholder="Qty" [(ngModel)]="p.qty" readonly></ion-input> -->
|
||||
|
||||
</ion-col>
|
||||
|
||||
</ion-row>
|
||||
@ -115,7 +115,7 @@
|
||||
<ion-row>
|
||||
<ion-col size="8"> <ion-label class="title-ww" position="stacked">{{p.orderId}} </ion-label></ion-col>
|
||||
<ion-col class="align-center mt-px" size="4" > <ion-label class="qty-c" position="stacked">x {{p.total_amount}}</ion-label>
|
||||
<!-- <ion-input inputmode="numeric" type="number" placeholder="Qty" [(ngModel)]="p.qty" readonly></ion-input> -->
|
||||
|
||||
</ion-col>
|
||||
|
||||
</ion-row>
|
||||
@ -127,20 +127,19 @@
|
||||
<ion-row>
|
||||
<ion-col class="align-right" size="8"> <ion-label color="dark" class="title-ww2 align-right red12" position="stacked"> Total </ion-label></ion-col>
|
||||
<ion-col class="align-center mt-px" size="4" > <ion-label class="qty-c" position="stacked"> {{countSumReturn}} </ion-label>
|
||||
<!-- <ion-input inputmode="numeric" type="number" placeholder="Qty" [(ngModel)]="p.qty" readonly></ion-input> -->
|
||||
|
||||
</ion-col>
|
||||
<!-- <ion-col size="1"> <ion-label color="dark" position="stacked"></ion-label></ion-col> -->
|
||||
|
||||
</ion-row>
|
||||
<hr>
|
||||
|
||||
<!-- <ion-button size="medium" expand="full" class="addMore" (click)="goto()" no-margin>Cancel Order</ion-button>
|
||||
<ion-button size="medium" expand="full" class="addMore" (click)="goto()" no-margin>Go Back to Homepage</ion-button> -->
|
||||
|
||||
</ion-grid>
|
||||
|
||||
</ion-list>
|
||||
</ion-list> -->
|
||||
|
||||
|
||||
<hr>
|
||||
<!-- <hr> -->
|
||||
</ion-content>
|
||||
|
||||
</ion-content>
|
||||
@ -89,12 +89,14 @@ export class SummaryComponent implements OnInit {
|
||||
console.log(data)
|
||||
localStorage.setItem('orderIdReturn','0')
|
||||
localStorage.setItem('orderId',data.orderId)
|
||||
localStorage.setItem('Customer',data.cusName)
|
||||
this.navCtrl.navigateRoot(['/driver-list/summary/list',]);
|
||||
}
|
||||
list2(data:any){
|
||||
console.log(data)
|
||||
localStorage.setItem('orderIdReturn','1')
|
||||
localStorage.setItem('orderId',data.orderId)
|
||||
localStorage.setItem('Customer',data.cusName)
|
||||
this.navCtrl.navigateRoot(['/driver-list/summary/list',]);
|
||||
}
|
||||
qtycheck(data:any){
|
||||
|
||||
@ -118,8 +118,8 @@
|
||||
<ion-card (click)="summary()">
|
||||
|
||||
<ion-card-content (mouseover)="changeImageSrc2(true)" (mouseout)="changeImageSrc2(false)">
|
||||
<img [src]="imageSrc2"> <br />
|
||||
Empty Return<br />
|
||||
<img [src]="imageSrc2" > <br />
|
||||
Delivery <br/>
|
||||
Summary
|
||||
<!-- Card 2 content here -->
|
||||
</ion-card-content>
|
||||
|
||||
@ -69,11 +69,11 @@
|
||||
<ion-col style="text-align: end;
|
||||
margin-top: 2%;"> Qty:</ion-col>
|
||||
<ion-col style="margin-top: -0.6rem;"> <ion-buttons>
|
||||
<ion-button size="medium" (click)="decrementQty(fieldGroup.qty,i)" >
|
||||
<ion-icon name="remove-circle-outline"></ion-icon>
|
||||
</ion-button><p>{{fieldGroup.qty}}</p>
|
||||
<ion-button size="medium" (click)="incrementQty(fieldGroup.qty,i)">
|
||||
<ion-icon name="add-circle-outline" class="custom-action-icon"></ion-icon>
|
||||
<ion-button size="medium" expand="full" class="addMore" (click)="decrementQty(fieldGroup.qty,i)" >
|
||||
<ion-icon name="remove-outline" class="sizeBig"></ion-icon>
|
||||
</ion-button><p style="font-size: 20px;">{{fieldGroup.qty}}</p>
|
||||
<ion-button size="medium" expand="full" class="addMore" (click)="incrementQty(fieldGroup.qty,i)">
|
||||
<ion-icon name="add-outline" class="sizeBig"></ion-icon>
|
||||
</ion-button>
|
||||
|
||||
</ion-buttons></ion-col>
|
||||
@ -133,7 +133,7 @@
|
||||
<div class="button-container">
|
||||
|
||||
|
||||
<ion-button size="medium" expand="full" style="width: 100%;background-color:#043FB9;" class="viewS" (click)="viewData()" >View Summery</ion-button>
|
||||
<ion-button size="medium" expand="full" style="width: 100%;background-color:#043FB9;" class="viewS" (click)="viewData()" >View Summary</ion-button>
|
||||
<!-- <ion-button size="medium" expand="full" color="dark" style="width: 50%;" (click)="sendData()" >Place Order</ion-button> -->
|
||||
</div>
|
||||
</ion-toolbar>
|
||||
|
||||
@ -24,7 +24,7 @@ export class CreateReportPage implements OnInit {
|
||||
public loadingCtrl: LoadingController, public alertCtrl: AlertController,
|
||||
public toastCtrl: ToastController,public _api:VnmsService
|
||||
) {
|
||||
this.route.queryParams.subscribe(params => {
|
||||
this.route.queryParams.subscribe((params: any) => {
|
||||
console.log(params)
|
||||
this.setData = params
|
||||
if( Object.keys(this.setData).length == 0){
|
||||
|
||||
@ -197,7 +197,7 @@
|
||||
|
||||
<ion-grid class="under" *ngFor="let p of product">
|
||||
<ion-row>
|
||||
<ion-col size="8"> <ion-label class="title-ww" position="stacked">{{p.ProductDetails[0].productName}} <br /><span *ngIf="p.productSpec != '' && p.productSpec != null">({{p.productSpec}} )</span> </ion-label></ion-col>
|
||||
<ion-col size="8"> <ion-label class="title-ww" position="stacked">{{p.ProductDetails[0].productName}} <br /><span *ngIf="p.ProductDetails[0].skuId != '' && p.ProductDetails[0].skuId != null">({{p.ProductDetails[0].skuId}} )</span> <br /><span *ngIf="p.productSpec != '' && p.productSpec != null">({{p.productSpec}} )</span> </ion-label></ion-col>
|
||||
<ion-col class="align-center mt-px" size="4" > <ion-label class="qty-c" position="stacked">x{{p.qty}}</ion-label>
|
||||
<!-- <ion-input inputmode="numeric" type="number" placeholder="Qty" [(ngModel)]="p.qty" readonly></ion-input> -->
|
||||
</ion-col>
|
||||
@ -218,13 +218,76 @@
|
||||
<hr>
|
||||
|
||||
<!-- <ion-button size="medium" expand="full" class="addMore2" (click)="cancelOrder()" no-margin>Cancel Order</ion-button> -->
|
||||
|
||||
<ion-button size="medium" expand="full" class="addMore2" (click)="goto()" no-margin>Go Back to Homepage</ion-button>
|
||||
<ion-row style="margin-top: 5rem;color: #BA0404;">
|
||||
<ion-col class="align-right" size="8"> <a (click)="cancelOrder()" *ngIf="orderStatus == 'ordered'"><u>Cancel Order</u></a></ion-col>
|
||||
|
||||
<!-- <ion-col size="1"> <ion-label color="dark" position="stacked"></ion-label></ion-col> -->
|
||||
</ion-row>
|
||||
</ion-grid>
|
||||
|
||||
</ion-list>
|
||||
|
||||
<ion-grid>
|
||||
<ion-row>
|
||||
|
||||
<ion-col size="12" class="title-w" *ngIf="orderStatus == 'Delivered'" >
|
||||
<span class="head-wm" style="text-transform: capitalize;"> RETURN DETAILS</span>
|
||||
</ion-col>
|
||||
<!-- <ion-col size="12" class="tex-wm" >
|
||||
<span style="text-transform: capitalize;"> Placed on July 23, 2023</span>
|
||||
</ion-col> -->
|
||||
</ion-row>
|
||||
|
||||
</ion-grid>
|
||||
|
||||
<ion-list>
|
||||
|
||||
<ion-list-header color="light" *ngIf="orderStatus == 'Delivered'">
|
||||
|
||||
<ion-grid >
|
||||
<ion-row>
|
||||
<ion-col class="align-center" size="1"> <ion-label color="dark" position="stacked" class="fw700"> </ion-label></ion-col>
|
||||
<ion-col size="5"> <ion-label color="dark" position="stacked" class="fw700"> Product</ion-label></ion-col>
|
||||
<ion-col class="align-right" size="5"> <ion-label color="dark" position="stacked" >Qty</ion-label>
|
||||
<ion-col class="align-center" size="1"> <ion-label color="dark" position="stacked" class="fw700"> </ion-label></ion-col>
|
||||
<!-- <ion-input inputmode="numeric" type="number" placeholder="Qty" [(ngModel)]="p.qty" readonly></ion-input> -->
|
||||
</ion-col>
|
||||
|
||||
</ion-row>
|
||||
</ion-grid>
|
||||
|
||||
</ion-list-header>
|
||||
<ion-grid class="under" *ngFor="let p of productReturn">
|
||||
<ion-row *ngIf="orderStatus == 'Delivered'">
|
||||
<ion-col size="8"> <ion-label class="title-ww" position="stacked">{{p.ProductDetails[0].productName}} <br /><span *ngIf="p.ProductDetails[0].skuId != '' && p.ProductDetails[0].skuId != null">({{p.ProductDetails[0].skuId}} )</span> <br /><span *ngIf="p.cylinderNo != '' && p.cylinderNo != null">({{p.cylinderNo}} )</span> </ion-label></ion-col>
|
||||
<ion-col class="align-center mt-px" size="4" > <ion-label class="qty-c" position="stacked">x{{p.qty}}</ion-label>
|
||||
<!-- <ion-input inputmode="numeric" type="number" placeholder="Qty" [(ngModel)]="p.qty" readonly></ion-input> -->
|
||||
</ion-col>
|
||||
|
||||
</ion-row>
|
||||
<hr>
|
||||
</ion-grid>
|
||||
|
||||
|
||||
<ion-grid class="under" *ngIf="orderStatus == 'Delivered'">
|
||||
<ion-row>
|
||||
<ion-col class="align-right" size="8"> <ion-label color="dark" class="title-ww2 align-right red12" position="stacked"> Total </ion-label></ion-col>
|
||||
<ion-col class="align-center mt-px" size="4" > <ion-label class="qty-c" position="stacked"> {{countSumReturn}} </ion-label>
|
||||
<!-- <ion-input inputmode="numeric" type="number" placeholder="Qty" [(ngModel)]="p.qty" readonly></ion-input> -->
|
||||
</ion-col>
|
||||
<!-- <ion-col size="1"> <ion-label color="dark" position="stacked"></ion-label></ion-col> -->
|
||||
</ion-row>
|
||||
<hr>
|
||||
<!-- <ion-button size="medium" expand="full" class="addMore2" (click)="goto()" no-margin>Go Back to Homepage</ion-button>
|
||||
<ion-row style="margin-top: 5rem;color: #BA0404;">
|
||||
<ion-col class="align-right" size="8"> <a (click)="cancelOrder()" ><u>Cancel Order</u></a></ion-col>
|
||||
|
||||
|
||||
</ion-row> -->
|
||||
<!-- <ion-button size="medium" expand="full" class="addMore" (click)="goto()" no-margin>Cancel Order</ion-button>
|
||||
<ion-button size="medium" expand="full" class="addMore" (click)="goto()" no-margin>Go Back to Homepage</ion-button> -->
|
||||
</ion-grid>
|
||||
|
||||
</ion-list>
|
||||
|
||||
@ -10,8 +10,8 @@ import { FormBuilder, FormGroup } from '@angular/forms';
|
||||
})
|
||||
export class ViewOrderComponent implements OnInit {
|
||||
orderId:any =[];
|
||||
product:any =[];
|
||||
countSum:any =[];createdAt:any=[];updateAt:any=[];
|
||||
product:any =[];productReturn:any =[];
|
||||
countSum:any =[];createdAt:any=[];updateAt:any=[];countSumReturn:any =[];
|
||||
orderPrimaryId:any =[];orderStatus:any =[];
|
||||
isCancel:boolean = true;
|
||||
isOrderPlaced: boolean = true; // Set the completion status based on your condition
|
||||
@ -26,6 +26,7 @@ export class ViewOrderComponent implements OnInit {
|
||||
this.orderId = localStorage.getItem('orderId')
|
||||
this.orderPrimaryId = localStorage.getItem('orderPrimaryId')
|
||||
this.orderStatus = localStorage.getItem('orderStatus')
|
||||
console.log(this.orderStatus)
|
||||
|
||||
if(this.orderStatus == "ordered"){
|
||||
this.isOrderPlaced = true; // Set the completion status based on your condition
|
||||
@ -33,7 +34,7 @@ export class ViewOrderComponent implements OnInit {
|
||||
this.isOutForDelivery = false;
|
||||
this.isDelivered = false;
|
||||
|
||||
}else if(this.orderStatus == "in progress"){
|
||||
}else if(this.orderStatus == "In Progress"){
|
||||
this.isOrderPlaced = true; // Set the completion status based on your condition
|
||||
this.isProcessingOrder = true;
|
||||
this.isOutForDelivery = false;
|
||||
@ -91,6 +92,29 @@ export class ViewOrderComponent implements OnInit {
|
||||
|
||||
})
|
||||
|
||||
this._api.getReturnProductListSummary(data).subscribe((res:any) => {
|
||||
console.log(res)
|
||||
if(res.status == 200){
|
||||
// res.data.forEach((element:any) => {
|
||||
// element.ProductDetails[0]
|
||||
// });
|
||||
|
||||
|
||||
this.productReturn = res.data
|
||||
|
||||
let tmp:any =[];
|
||||
this.productReturn.forEach((element:any) => {
|
||||
tmp.push(element.qty)
|
||||
});
|
||||
const sum = tmp.reduce((b:any, a:any) => parseInt(b) + parseInt(a), 0);
|
||||
console.log(sum); // 6
|
||||
console.log(tmp);
|
||||
this.countSumReturn = sum
|
||||
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
}
|
||||
goto(){
|
||||
this.navCtrl.navigateRoot(['/vnms-list',]);
|
||||
@ -122,8 +146,9 @@ export class ViewOrderComponent implements OnInit {
|
||||
|
||||
// let param ={id: this.orderPrimaryId, status:'Cancelled'}
|
||||
let tmp:any =[];
|
||||
this.orderId = localStorage.getItem('orderId')
|
||||
this.product.forEach((element:any) => {
|
||||
tmp.push({id:element.id , status: 'Cancelled'})
|
||||
tmp.push({orderId:element.this.orderId , status: 'Cancelled'})
|
||||
|
||||
});
|
||||
|
||||
@ -134,7 +159,7 @@ export class ViewOrderComponent implements OnInit {
|
||||
|
||||
this.orderId = localStorage.getItem('orderId')
|
||||
|
||||
this._api.CreateOrder (param).subscribe(async res => {
|
||||
this._api.CreateOrder (param).subscribe(async (res:any) => {
|
||||
if (res.status == 200) {
|
||||
console.log(res)
|
||||
const toast = this.toastCtrl.create({
|
||||
@ -169,4 +194,6 @@ await alert.present();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -43,7 +43,9 @@
|
||||
|
||||
|
||||
<ion-content>
|
||||
|
||||
<ion-refresher slot="fixed" [pullFactor]="0.5" [pullMin]="100" [pullMax]="200" (ionRefresh)="handleRefresh($event)">
|
||||
<ion-refresher-content></ion-refresher-content>
|
||||
</ion-refresher>
|
||||
<ion-card *ngFor="let item of orderlist; let i = index" (click)="editData(item)" style=" margin-top: 1rem;" >
|
||||
<ion-card-header class="slit-w">
|
||||
<ion-card-title>
|
||||
|
||||
@ -22,6 +22,14 @@ export class ViewReportPage implements OnInit {
|
||||
console.log(this.orderlist, this.bgColorPast)
|
||||
this.getorderlistApi()
|
||||
|
||||
}
|
||||
|
||||
handleRefresh(event:any) {
|
||||
setTimeout(() => {
|
||||
// Any calls to load data go here
|
||||
this.getorderlistApi()
|
||||
event.target.complete();
|
||||
}, 2000);
|
||||
}
|
||||
random_ng_past()
|
||||
{
|
||||
|
||||
@ -4,7 +4,9 @@
|
||||
|
||||
export const environment = {
|
||||
production: false,
|
||||
apiEndpoint:'https://dev.venbait.in/vnms/api/',
|
||||
// apiEndpoint:'https://dev.venbait.in/vnms/api/',
|
||||
apiEndpoint:'http://192.168.1.17:8081/api/',
|
||||
// apiEndpoint:'http://192.168.1.5:8081/api/',
|
||||
};
|
||||
|
||||
/*
|
||||
|
||||
Loading…
Reference in New Issue
Block a user