ionic-vhframeworks 3.9.4 → 3.9.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/ionic-vhframeworks.umd.js +1 -1
- package/bundles/ionic-vhframeworks.umd.js.map +1 -1
- package/bundles/ionic-vhframeworks.umd.min.js +1 -1
- package/bundles/ionic-vhframeworks.umd.min.js.map +1 -1
- package/fesm2015/ionic-vhframeworks.js.map +1 -1
- package/ionic-vhframeworks.metadata.json +1 -1
- package/lib/ionic-vhframeworks.service.d.ts +217 -1
- package/package.json +1 -1
|
@@ -3316,11 +3316,213 @@ export declare class VhQueryCafe {
|
|
|
3316
3316
|
* @notice : hàm này chỉ dùng xóa những bill_type(7,8,11,12) mà không có phát sinh bill_detail
|
|
3317
3317
|
*/
|
|
3318
3318
|
deleteBill(id_bill: any): Promise<unknown>;
|
|
3319
|
+
/**
|
|
3320
|
+
* @example:
|
|
3321
|
+
* this.vhQueryCafe.createPaymentVnpay(10000, 'Thanh toan hoa don so A7TG2004, vao luc: 2021-11-19 13:11:27', 'o0wEpPDhR8QiGDkp2hLG', 'http://localhost:4200/')
|
|
3322
|
+
.then((response)=>{
|
|
3323
|
+
console.log('createPaymentVnpay', response);
|
|
3324
|
+
}, error=>{
|
|
3325
|
+
console.log('error', error);
|
|
3326
|
+
})
|
|
3327
|
+
* @param amount
|
|
3328
|
+
* @param orderDescription (lưu ý chữ không dấu)
|
|
3329
|
+
* @param id_payment
|
|
3330
|
+
* @param backHref : lấy link mà chạy khởi động lại trang
|
|
3331
|
+
*/
|
|
3332
|
+
createPaymentVnpay(amount: number, orderDescription: string, id_payment: string, backHref: string): any;
|
|
3333
|
+
/**
|
|
3334
|
+
* @example:
|
|
3335
|
+
* let data = {
|
|
3336
|
+
date: new Date(),
|
|
3337
|
+
payment_type: 5, //1 lưu (khách đã thanh toán cho vnpay); 5 lưu tạm (khách chưa thanh toán vnpay), hệ thống sẽ tự động xóa những payment này hoặc trên giao diện hiện ra cho khách tự xóa
|
|
3338
|
+
payment: 990.000,
|
|
3339
|
+
tax: 0,
|
|
3340
|
+
total: 990.000
|
|
3341
|
+
}
|
|
3342
|
+
* this.vhQueryCafe.createPayment(data)
|
|
3343
|
+
.then((payment)=>{
|
|
3344
|
+
console.log('createPayment', payment);
|
|
3345
|
+
},error=>{
|
|
3346
|
+
console.log('error', error);
|
|
3347
|
+
})
|
|
3348
|
+
* payment = {
|
|
3349
|
+
_id,
|
|
3350
|
+
payment_code,
|
|
3351
|
+
id_store,
|
|
3352
|
+
invalid,
|
|
3353
|
+
|
|
3354
|
+
date
|
|
3355
|
+
payment_type,
|
|
3356
|
+
payment,
|
|
3357
|
+
tax,
|
|
3358
|
+
total
|
|
3359
|
+
}
|
|
3360
|
+
* @param payment : object
|
|
3361
|
+
* @return Promise => payment = {} / error
|
|
3362
|
+
* Luu ý: chỉ có 2 trường hợp, hoặc là thêm thành công, hoặc là báo lỗi error
|
|
3363
|
+
* @notice : hàm này chỉ dùng tạo những bill_type mà không có phát sinh bill_detail
|
|
3364
|
+
*/
|
|
3365
|
+
createPayment(data: any): Promise<unknown>;
|
|
3366
|
+
/**
|
|
3367
|
+
* @example:
|
|
3368
|
+
* this.vhQueryCafe.updatePayment('5fb6780ca2148e09806c5b01', {total:990000})
|
|
3369
|
+
.then((response)=>{
|
|
3370
|
+
console.log('updatePayment', response);
|
|
3371
|
+
}, error=>{
|
|
3372
|
+
console.log('error', error);
|
|
3373
|
+
})
|
|
3374
|
+
* @param id_payment
|
|
3375
|
+
* @param value
|
|
3376
|
+
* @return Promise => response = undefined / error
|
|
3377
|
+
*/
|
|
3378
|
+
updatePayment(id_payment: string, value: any): Promise<unknown>;
|
|
3379
|
+
/**
|
|
3380
|
+
* @example:
|
|
3381
|
+
* this.vhQueryCafe.deletePayment('5fb67fda87c0f21d484cbdf3')
|
|
3382
|
+
.then((response)=>{
|
|
3383
|
+
console.log('deleteBill', response);
|
|
3384
|
+
}, error=>{
|
|
3385
|
+
console.log(error, error);
|
|
3386
|
+
})
|
|
3387
|
+
* @param id_payment
|
|
3388
|
+
* @return Promise => response = undefined / error
|
|
3389
|
+
*/
|
|
3390
|
+
deletePayment(id_payment: any): Promise<unknown>;
|
|
3391
|
+
/**
|
|
3392
|
+
* @example:
|
|
3393
|
+
* let time = new Date();
|
|
3394
|
+
* time.setDate(time.getDate()-7);
|
|
3395
|
+
* this.vhQueryCafe.getPayments({id_store: {$eq: this.vhAuth.getUser()._id}, payment_type:{$eq:5}}, {},{},0)
|
|
3396
|
+
.then((payments)=>{
|
|
3397
|
+
console.log('getPayments', payments);
|
|
3398
|
+
})
|
|
3399
|
+
* @param query
|
|
3400
|
+
* @param projection — đang tìm hiểu, tạm thời để giá trị là {}
|
|
3401
|
+
* @param sort — null hoặc {}:không sắp xếp; {date:1}: sắp xếp theo ASC; {date:-1}: sắp xếp theo DESC
|
|
3402
|
+
* @param limit — null hoặc 0: không giới hạn record get về; 2: get về 2 record
|
|
3403
|
+
* @return — Array -> array = [{},{},...]
|
|
3404
|
+
*/
|
|
3405
|
+
getPayments(query: object, projection?: object, sort?: object, limit?: number): Promise<unknown>;
|
|
3406
|
+
/**
|
|
3407
|
+
* @example:
|
|
3408
|
+
* this.vhQueryCafe.getPayment('5fb67fda87c0f21d484cbdf3')
|
|
3409
|
+
.then((payment)=>{
|
|
3410
|
+
console.log('getPayment', payment);
|
|
3411
|
+
})
|
|
3412
|
+
* @param id_payment
|
|
3413
|
+
* @return Promise => payment ={} or null / error
|
|
3414
|
+
*/
|
|
3415
|
+
getPayment(id_payment: any): Promise<unknown>;
|
|
3416
|
+
/**
|
|
3417
|
+
* @example:
|
|
3418
|
+
let payment_detail_main = {
|
|
3419
|
+
id_branch: 'AEUWSWZXA4iHv8BmCNz2', //khách chọn
|
|
3420
|
+
id_payment: '5D4XGdZ2q5XLnOUa0mMx', //payment._id
|
|
3421
|
+
id_restriction: 'main_package_advanced', //package.id_restriction
|
|
3422
|
+
id_package: 'main_package_advanced_1month', //có được khi khách chọn gói để mua
|
|
3423
|
+
package_type: 1, //package.package_type,
|
|
3424
|
+
day: 31, //package.day,
|
|
3425
|
+
tax: 0, package.tax,
|
|
3426
|
+
price: 99000, package.price,
|
|
3427
|
+
quantity: 1, //khách chọn
|
|
3428
|
+
payment_detail_type: 1, //1: gói gia hạng mới, 2: gói nâng cấp, 3: gói kéo dài thêm thời gian
|
|
3429
|
+
}
|
|
3430
|
+
this.vhQueryCafe.createPayment_Detail({})
|
|
3431
|
+
.then((payment_detail)=>{
|
|
3432
|
+
console.log('createPayment_Detail', payment_detail);
|
|
3433
|
+
},error=>{
|
|
3434
|
+
console.log('error', error);
|
|
3435
|
+
})
|
|
3436
|
+
payment_detail = {
|
|
3437
|
+
_id,
|
|
3438
|
+
id_store,
|
|
3439
|
+
payment_type,
|
|
3440
|
+
activating,
|
|
3441
|
+
invalid,
|
|
3442
|
+
date,
|
|
3443
|
+
|
|
3444
|
+
id_branch,
|
|
3445
|
+
id_payment,
|
|
3446
|
+
id_restriction,
|
|
3447
|
+
id_package,
|
|
3448
|
+
package_type,
|
|
3449
|
+
payment_type,
|
|
3450
|
+
payment_detail_type,
|
|
3451
|
+
day,
|
|
3452
|
+
tax,
|
|
3453
|
+
price,
|
|
3454
|
+
quantity
|
|
3455
|
+
}
|
|
3456
|
+
* @param data
|
|
3457
|
+
* @return Promise => response = {} / error
|
|
3458
|
+
* Luu ý: chỉ có 2 trường hợp, hoặc là thêm thành công, hoặc là báo lỗi error
|
|
3459
|
+
*/
|
|
3460
|
+
createPayment_Detail(data: any): any;
|
|
3461
|
+
/**
|
|
3462
|
+
* @example:
|
|
3463
|
+
* this.vhQueryCafe.updatePayment_Detail('5fb6780ca2148e09806c5b01', {name:'Khuyến mãi 12/12'})
|
|
3464
|
+
.then((response)=>{
|
|
3465
|
+
console.log('updatePayment_Detail', response);
|
|
3466
|
+
},error=>{
|
|
3467
|
+
reject(error);
|
|
3468
|
+
})
|
|
3469
|
+
* @param id_payment_detail
|
|
3470
|
+
* @param value
|
|
3471
|
+
* @return Promise => response = undefined / error
|
|
3472
|
+
*/
|
|
3473
|
+
updatePayment_Detail(id_payment_detail: string, value: object): Promise<unknown>;
|
|
3474
|
+
/**
|
|
3475
|
+
* @example:
|
|
3476
|
+
* let time = new Date();
|
|
3477
|
+
* time.setDate(time.getDate()-7);
|
|
3478
|
+
* this.vhQueryCafe.getPayment_details({id_payment:{$eq:'5fb67fda87c0f21d484cbdf3'}}, {},{},0)
|
|
3479
|
+
.then((payment_details)=>{
|
|
3480
|
+
console.log('getPayment_details', payment_details);
|
|
3481
|
+
})
|
|
3482
|
+
* @param query
|
|
3483
|
+
* @param projection — đang tìm hiểu, tạm thời để giá trị là {}
|
|
3484
|
+
* @param sort — null hoặc {}:không sắp xếp; {date:1}: sắp xếp theo ASC; {date:-1}: sắp xếp theo DESC
|
|
3485
|
+
* @param limit — null hoặc 0: không giới hạn record get về; 2: get về 2 record
|
|
3486
|
+
* @return Promise Array => array = [{},{},...] / error
|
|
3487
|
+
*/
|
|
3488
|
+
getPayment_details(query: object, projection?: object, sort?: object, limit?: number): Promise<unknown>;
|
|
3489
|
+
/**
|
|
3490
|
+
* @example:
|
|
3491
|
+
* this.vhQueryCafe.getPayment_detail('5fb67fda87c0f21d484cbdf3')
|
|
3492
|
+
.then((payment_detail)=>{
|
|
3493
|
+
console.log('getPayment_detail', payment_detail);
|
|
3494
|
+
})
|
|
3495
|
+
* @param id_payment_detail
|
|
3496
|
+
* @return Promise => payment_detail ={} or null / error
|
|
3497
|
+
*/
|
|
3498
|
+
getPayment_detail(id_payment_detail: any): Promise<unknown>;
|
|
3499
|
+
/**
|
|
3500
|
+
* @example:
|
|
3501
|
+
* this.vhQueryCafe.deletePayment_Detail('5fb67fda87c0f21d484cbdf3')
|
|
3502
|
+
.then((response)=>{
|
|
3503
|
+
console.log('deletePayment_Detail', response);
|
|
3504
|
+
},error=>{
|
|
3505
|
+
reject(error);
|
|
3506
|
+
})
|
|
3507
|
+
* @param id_payment_detail
|
|
3508
|
+
* @return Promise => Promise => response = undefined / error
|
|
3509
|
+
*/
|
|
3510
|
+
deletePayment_Detail(id_payment_detail: string): Promise<unknown>;
|
|
3511
|
+
/**
|
|
3512
|
+
* @example:
|
|
3513
|
+
* this.vhQueryCafe.getPackage('5fb67fda87c0f21d484cbdf3')
|
|
3514
|
+
.then((package)=>{
|
|
3515
|
+
console.log('getPackage', package);
|
|
3516
|
+
})
|
|
3517
|
+
* @param id_package
|
|
3518
|
+
* @return Promise => package ={} or null / error
|
|
3519
|
+
*/
|
|
3520
|
+
getPackage(id_package: any): Promise<unknown>;
|
|
3319
3521
|
private publishObservableEventPromotions;
|
|
3320
3522
|
private observableLocalPromotions;
|
|
3321
3523
|
/**
|
|
3322
3524
|
* @example:
|
|
3323
|
-
* this.observablePromotion = this.
|
|
3525
|
+
* this.observablePromotion = this.vhQueryCafe.getObservableLocalPromotions().subscribe((localPromotions:any) => {
|
|
3324
3526
|
do something...
|
|
3325
3527
|
})
|
|
3326
3528
|
|
|
@@ -10289,6 +10491,20 @@ export declare class VhQuerySales {
|
|
|
10289
10491
|
* @notice : hàm này chỉ dùng xóa những bill_type (7,8,11,12) mà không có phát sinh bill_detail
|
|
10290
10492
|
*/
|
|
10291
10493
|
deleteBill(id_bill: any): Promise<unknown>;
|
|
10494
|
+
/**
|
|
10495
|
+
* @example:
|
|
10496
|
+
* this.vhQuerySales.createPaymentVnpay(10000, 'Thanh toan hoa don so A7TG2004, vao luc: 2021-11-19 13:11:27', 'o0wEpPDhR8QiGDkp2hLG', 'http://localhost:4200/')
|
|
10497
|
+
.then((response)=>{
|
|
10498
|
+
console.log('createPaymentVnpay', response);
|
|
10499
|
+
}, error=>{
|
|
10500
|
+
console.log('error', error);
|
|
10501
|
+
})
|
|
10502
|
+
* @param amount
|
|
10503
|
+
* @param orderDescription (lưu ý chữ không dấu)
|
|
10504
|
+
* @param id_payment
|
|
10505
|
+
* @param backHref : lấy link mà chạy khởi động lại trang
|
|
10506
|
+
*/
|
|
10507
|
+
createPaymentVnpay(amount: number, orderDescription: string, id_payment: string, backHref: string): any;
|
|
10292
10508
|
/**
|
|
10293
10509
|
* @example:
|
|
10294
10510
|
* let data = {
|