ionic-vhframeworks 9.4.0 → 9.4.2
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.
|
@@ -300,8 +300,9 @@ export declare class VhAlgorithm {
|
|
|
300
300
|
* @example:
|
|
301
301
|
* this.vhAlgorithm.changeAlias(alias);
|
|
302
302
|
* @alias: chuỗi có dấu và các ký tự đặc biệt
|
|
303
|
+
* @return string
|
|
303
304
|
*/
|
|
304
|
-
changeAlias(alias:
|
|
305
|
+
changeAlias(alias: string): string;
|
|
305
306
|
/**
|
|
306
307
|
* Ham đổi chuỗi alias có dấu thành không dấu, giữ lại ký tự đặc biệt
|
|
307
308
|
* @example:
|
|
@@ -790,6 +791,30 @@ export declare class VhAuth {
|
|
|
790
791
|
* @return Promise => user = {}
|
|
791
792
|
*/
|
|
792
793
|
onAuthStateChanged_Sales(): Promise<unknown>;
|
|
794
|
+
/**
|
|
795
|
+
* @example:
|
|
796
|
+
* this.vhAuth.signInWithEmailAndPassword_Sales365_byDealer('emp11@gmail.com', '123456')
|
|
797
|
+
.then((user)=>{
|
|
798
|
+
console.log('signInWithEmailAndPassword_Sales365_byDealer', user);
|
|
799
|
+
},(error:any)=>{
|
|
800
|
+
console.log('error', error);
|
|
801
|
+
})
|
|
802
|
+
* @param email
|
|
803
|
+
* @param password
|
|
804
|
+
* @return Promise => user = {}
|
|
805
|
+
*/
|
|
806
|
+
signInWithEmailAndPassword_Sales365_byDealer(email: string, password: string): Promise<unknown>;
|
|
807
|
+
/**
|
|
808
|
+
* @example:
|
|
809
|
+
* this.vhAuth.onAuthStateChanged_Sales365_byDealer()
|
|
810
|
+
.then((user)=>{
|
|
811
|
+
console.log('onAuthStateChanged_Sales365_byDealer', user);
|
|
812
|
+
},(error:any)=>{
|
|
813
|
+
console.log('error', error);
|
|
814
|
+
})
|
|
815
|
+
* @return Promise => user = {}
|
|
816
|
+
*/
|
|
817
|
+
onAuthStateChanged_Sales365_byDealer(): Promise<unknown>;
|
|
793
818
|
/**
|
|
794
819
|
* @example:
|
|
795
820
|
* this.vhAuth.signUpOwner_Cafe('huyleduc92', '123456', '+84909925359',{})
|
|
@@ -903,10 +928,15 @@ export declare class VhAuth {
|
|
|
903
928
|
*/
|
|
904
929
|
getDBCloudURL(): any;
|
|
905
930
|
/**
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
931
|
+
* @example:
|
|
932
|
+
* let store = this.vhAuth.getStore();
|
|
933
|
+
*/
|
|
909
934
|
getStore(): any;
|
|
935
|
+
/**
|
|
936
|
+
* @example:
|
|
937
|
+
* let dealer = this.vhAuth.getDealer();
|
|
938
|
+
*/
|
|
939
|
+
getDealer(): any;
|
|
910
940
|
/**
|
|
911
941
|
* @example:
|
|
912
942
|
* let dbstorage = this.vhAuth.getDBstorage();
|
|
@@ -20532,6 +20562,12 @@ export declare class VhDesignAutoWeb {
|
|
|
20532
20562
|
* vhDesignAutoWeb
|
|
20533
20563
|
*/
|
|
20534
20564
|
startSocketDatabase(): void;
|
|
20565
|
+
/**
|
|
20566
|
+
* Kiểm tra đối tượng đã được update là page, block hay là object
|
|
20567
|
+
* @param record
|
|
20568
|
+
* @param p
|
|
20569
|
+
* @param detailpage
|
|
20570
|
+
*/
|
|
20535
20571
|
private checkModifiedType;
|
|
20536
20572
|
private addBlockOrObject_fromDetailPage;
|
|
20537
20573
|
/**
|
|
@@ -20610,22 +20646,23 @@ export declare class VhDesignAutoWeb {
|
|
|
20610
20646
|
*/
|
|
20611
20647
|
getlocalBranchs(): any[];
|
|
20612
20648
|
/**
|
|
20613
|
-
|
|
20614
|
-
|
|
20615
|
-
|
|
20616
|
-
|
|
20617
|
-
|
|
20618
|
-
|
|
20619
|
-
|
|
20620
|
-
|
|
20621
|
-
|
|
20622
|
-
|
|
20623
|
-
|
|
20624
|
-
|
|
20625
|
-
|
|
20626
|
-
|
|
20627
|
-
|
|
20628
|
-
|
|
20649
|
+
* Khách hàng quét mã QR này và thanh toán, thanh toán thực hiện qua cổng CASSO (dùng webhook)
|
|
20650
|
+
* @example:
|
|
20651
|
+
* this.vhDesignAutoWeb.vietqr_generateQR({})
|
|
20652
|
+
.then((rsp)=>{
|
|
20653
|
+
if(rsp.vcode === 0){
|
|
20654
|
+
console.log('dynamic_addDoc_fromDatabase', rsp.data);
|
|
20655
|
+
}
|
|
20656
|
+
}, error=>{
|
|
20657
|
+
console.log('error', error);
|
|
20658
|
+
})
|
|
20659
|
+
* @param colname
|
|
20660
|
+
* @param data
|
|
20661
|
+
* @return Promise => rsp ={vcode, msg, data(img_base64)} / error
|
|
20662
|
+
* @notice : hàm này chỉ get được dữ liệu sau khi khách hàng hoặc nhân viên đã đăng nhập, ở giao diện thiết kế dùng thư viện vhDesignAutoWeb
|
|
20663
|
+
* chưa thấy cần thiết kiểm tra bảo mật này nên chưa thêm dòng lệnh kiểm tra và trả về vcode=11
|
|
20664
|
+
* vcode == 0: success
|
|
20665
|
+
*/
|
|
20629
20666
|
vietqr_generateQR(data: any): Promise<unknown>;
|
|
20630
20667
|
/**
|
|
20631
20668
|
* @example:
|
|
@@ -21577,6 +21614,29 @@ export declare class VhQuerySales {
|
|
|
21577
21614
|
})
|
|
21578
21615
|
*/
|
|
21579
21616
|
fix_mot_lan_duy_nhat_inventory_null(): Promise<unknown>;
|
|
21617
|
+
/**
|
|
21618
|
+
* Lấy về thông tin Đại lý từ mã đại lý (dealercode)
|
|
21619
|
+
* @example:
|
|
21620
|
+
* this.vhQuerySales.getDealer_byDealerCode()
|
|
21621
|
+
.then((dealer)=>{
|
|
21622
|
+
if(dealer){
|
|
21623
|
+
console.log('getDealer_byDealerCode', dealer);
|
|
21624
|
+
}
|
|
21625
|
+
}, error=>{
|
|
21626
|
+
console.log(error);
|
|
21627
|
+
})
|
|
21628
|
+
* @param dealercode
|
|
21629
|
+
* @returns object or null
|
|
21630
|
+
*/
|
|
21631
|
+
getDealer_byDealerCode(dealercode: any): Promise<unknown>;
|
|
21632
|
+
/**
|
|
21633
|
+
* Lấy về tất cả các người đă đăng ký dùng APP thuộc quản lý của Đại lý (IDdealer)
|
|
21634
|
+
* @param starttime
|
|
21635
|
+
* @param endtime
|
|
21636
|
+
* @param IDdealer
|
|
21637
|
+
* @returns Array
|
|
21638
|
+
*/
|
|
21639
|
+
getEndUsersAPP_byTime_byDealer(starttime: any, endtime: any, IDdealer: any): Promise<unknown>;
|
|
21580
21640
|
private getYear;
|
|
21581
21641
|
private getYearsArray;
|
|
21582
21642
|
private getYearsArray_fromQuery;
|
|
@@ -25476,7 +25536,7 @@ export declare class VhQuerySales {
|
|
|
25476
25536
|
* @example:
|
|
25477
25537
|
* this.vhQuerySales.deletePayment('5fb67fda87c0f21d484cbdf3')
|
|
25478
25538
|
.then((response)=>{
|
|
25479
|
-
console.log('
|
|
25539
|
+
console.log('deletePayment', response);
|
|
25480
25540
|
}, error=>{
|
|
25481
25541
|
console.log(error, error);
|
|
25482
25542
|
})
|
|
@@ -25605,15 +25665,240 @@ export declare class VhQuerySales {
|
|
|
25605
25665
|
*/
|
|
25606
25666
|
deletePayment_Detail(id_payment_detail: string): Promise<unknown>;
|
|
25607
25667
|
/**
|
|
25608
|
-
|
|
25609
|
-
|
|
25668
|
+
* @example:
|
|
25669
|
+
* this.vhQuerySales.getPackage('5fb67fda87c0f21d484cbdf3')
|
|
25610
25670
|
.then((package)=>{
|
|
25611
25671
|
console.log('getPackage', package);
|
|
25612
25672
|
})
|
|
25673
|
+
* @param id_package
|
|
25674
|
+
* @return Promise => package ={} or null / error
|
|
25675
|
+
*/
|
|
25676
|
+
getPackage(id_package: any): Promise<unknown>;
|
|
25677
|
+
/**
|
|
25678
|
+
* Lấy về danh sách các ngân hàng (kèm logo) mà vietqr hỗ trợ tạo mã QR
|
|
25679
|
+
* @example:
|
|
25680
|
+
* this.vhQueryAutoWeb.vietqr_getBanks()
|
|
25681
|
+
.then((rsp:any)=>{
|
|
25682
|
+
if(rsp.vcode === 0){
|
|
25683
|
+
}
|
|
25684
|
+
}, error=>{
|
|
25685
|
+
console.log(error)
|
|
25686
|
+
})
|
|
25687
|
+
* @returns Promise => rsp ={vcode, msg, data(array)} / error
|
|
25688
|
+
* vcode == 0: success
|
|
25689
|
+
*/
|
|
25690
|
+
vietqr_getBanks(): Promise<unknown>;
|
|
25691
|
+
/**
|
|
25692
|
+
* Tạo mã QR cho Đại lý quét thanh toán
|
|
25693
|
+
* @example:
|
|
25694
|
+
* this.vhQueryAutoWeb.vietqr_generateQR('0909925354', 'LE DUC HUY', '970422', 'compact2', '674fd94a9ace7267deb685fd', 99000)
|
|
25695
|
+
.then((rsp:any)=>{
|
|
25696
|
+
if(rsp.vcode === 0){
|
|
25697
|
+
}
|
|
25698
|
+
}, error=>{
|
|
25699
|
+
console.log(error)
|
|
25700
|
+
})
|
|
25701
|
+
* @param accountNo: số tài khoản ngân hàng
|
|
25702
|
+
* @param accountName: tên chủ tài khoản
|
|
25703
|
+
* @param acqId: mã bin của ngân hàng (lấy từ hàm vietqr_getBanks())
|
|
25704
|
+
* @param template: compact2, compact, qr_only, print
|
|
25705
|
+
+ compact2: 540x640 Bao gồm : Mã QR, các logo , thông tin chuyển khoản
|
|
25706
|
+
+ compact: 540x540 QR kèm logo VietQR, Napas, ngân hàng
|
|
25707
|
+
+ qr_only: 480x480 Trả về ảnh QR đơn giản, chỉ bao gồm QR
|
|
25708
|
+
+ print: 600x776 Bao gồm : Mã QR, các logo và đầy đủ thông tin chuyển khoản
|
|
25709
|
+
* @param id_bill: _id của đơn hàng
|
|
25710
|
+
* @param amount: tổng tiền khách phải thanh toán
|
|
25711
|
+
* @returns Promise => rsp ={vcode, msg, data(img_base64)} / error
|
|
25712
|
+
* vcode == 0: success
|
|
25713
|
+
*/
|
|
25714
|
+
vietqr_generateQR_byDealer(accountNo: string, accountName: string, acqId: string, template: string, id_payment: string, amount: number): Promise<unknown>;
|
|
25715
|
+
/**
|
|
25716
|
+
* @example:
|
|
25717
|
+
* let data = {
|
|
25718
|
+
date: new Date(),
|
|
25719
|
+
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
|
|
25720
|
+
payment: 990.000,
|
|
25721
|
+
tax: 0,
|
|
25722
|
+
total: 990.000
|
|
25723
|
+
}
|
|
25724
|
+
* this.vhQuerySales.createPayment_byDealer(data)
|
|
25725
|
+
.then((payment)=>{
|
|
25726
|
+
console.log('createPayment_byDealer', payment);
|
|
25727
|
+
},(error:any)=>{
|
|
25728
|
+
console.log('error', error);
|
|
25729
|
+
})
|
|
25730
|
+
* payment = {
|
|
25731
|
+
_id,
|
|
25732
|
+
payment_code,
|
|
25733
|
+
id_dealer,
|
|
25734
|
+
|
|
25735
|
+
date
|
|
25736
|
+
payment_type,
|
|
25737
|
+
payment,
|
|
25738
|
+
tax,
|
|
25739
|
+
total
|
|
25740
|
+
}
|
|
25741
|
+
* @param payment : object
|
|
25742
|
+
* @return Promise => payment = {} / error
|
|
25743
|
+
* 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
|
|
25744
|
+
* @notice : hàm này chỉ dùng tạo những bill_type mà không có phát sinh bill_detail
|
|
25745
|
+
*/
|
|
25746
|
+
createPayment_byDealer(data: any): Promise<unknown>;
|
|
25747
|
+
/**
|
|
25748
|
+
* @example:
|
|
25749
|
+
* this.vhQuerySales.updatePayment_byDealer('5fb6780ca2148e09806c5b01', {total:990000})
|
|
25750
|
+
.then((response)=>{
|
|
25751
|
+
console.log('updatePayment_byDealer', response);
|
|
25752
|
+
}, error=>{
|
|
25753
|
+
console.log('error', error);
|
|
25754
|
+
})
|
|
25755
|
+
* @param id_payment
|
|
25756
|
+
* @param value
|
|
25757
|
+
* @return Promise => response = undefined / error
|
|
25758
|
+
*/
|
|
25759
|
+
updatePayment_byDealer(id_payment: string, value: any): Promise<unknown>;
|
|
25760
|
+
/**
|
|
25761
|
+
* @example:
|
|
25762
|
+
* this.vhQuerySales.deletePayment_byDealer('5fb67fda87c0f21d484cbdf3')
|
|
25763
|
+
.then((response)=>{
|
|
25764
|
+
console.log('deletePayment_byDealer', response);
|
|
25765
|
+
}, error=>{
|
|
25766
|
+
console.log(error, error);
|
|
25767
|
+
})
|
|
25768
|
+
* @param id_payment
|
|
25769
|
+
* @return Promise => response = undefined / error
|
|
25770
|
+
*/
|
|
25771
|
+
deletePayment_byDealer(id_payment: any): Promise<unknown>;
|
|
25772
|
+
/**
|
|
25773
|
+
* @example:
|
|
25774
|
+
* let time = new Date();
|
|
25775
|
+
* time.setDate(time.getDate()-7);
|
|
25776
|
+
* this.vhQuerySales.getPayments_byDealer({payment_type:{$eq:5}}, {},{},0)
|
|
25777
|
+
.then((payments)=>{
|
|
25778
|
+
console.log('getPayments_byDealer', payments);
|
|
25779
|
+
})
|
|
25780
|
+
* @param query
|
|
25781
|
+
* @param projection — đang tìm hiểu, tạm thời để giá trị là {}
|
|
25782
|
+
* @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
|
|
25783
|
+
* @param limit — null hoặc 0: không giới hạn record get về; 2: get về 2 record
|
|
25784
|
+
* @return — Array -> array = [{},{},...]
|
|
25785
|
+
*/
|
|
25786
|
+
getPayments_byDealer(query: any, projection?: object, sort?: object, limit?: number): Promise<unknown>;
|
|
25787
|
+
/**
|
|
25788
|
+
* @example:
|
|
25789
|
+
* this.vhQuerySales.getPayment_byDealer('5fb67fda87c0f21d484cbdf3')
|
|
25790
|
+
.then((payment)=>{
|
|
25791
|
+
console.log('getPayment_byDealer', payment);
|
|
25792
|
+
})
|
|
25793
|
+
* @param id_payment
|
|
25794
|
+
* @return Promise => payment ={} or null / error
|
|
25795
|
+
*/
|
|
25796
|
+
getPayment_byDealer(id_payment: any): Promise<unknown>;
|
|
25797
|
+
/**
|
|
25798
|
+
* @example:
|
|
25799
|
+
let payment_detail_main = {
|
|
25800
|
+
id_branch: 'AEUWSWZXA4iHv8BmCNz2', //khách chọn
|
|
25801
|
+
id_payment: '5D4XGdZ2q5XLnOUa0mMx', //payment._id
|
|
25802
|
+
id_restriction: 'main_package_advanced', //package.id_restriction
|
|
25803
|
+
id_package: 'main_package_advanced_1month', //có được khi khách chọn gói để mua
|
|
25804
|
+
package_type: 1, //gói chinh, gói tmđt hay gói facebook...
|
|
25805
|
+
day: 31, //package.day,
|
|
25806
|
+
tax: 0, package.tax,
|
|
25807
|
+
price: 99000, package.price,
|
|
25808
|
+
quantity: 1, //khách chọn
|
|
25809
|
+
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
|
|
25810
|
+
}
|
|
25811
|
+
this.vhQuerySales.createPayment_Detail_byDealer({})
|
|
25812
|
+
.then((payment_detail)=>{
|
|
25813
|
+
console.log('createPayment_Detail_byDealer', payment_detail);
|
|
25814
|
+
},(error:any)=>{
|
|
25815
|
+
console.log('error', error);
|
|
25816
|
+
})
|
|
25817
|
+
payment_detail = {
|
|
25818
|
+
_id,
|
|
25819
|
+
id_dealer,
|
|
25820
|
+
payment_type,
|
|
25821
|
+
activating,
|
|
25822
|
+
invalid,
|
|
25823
|
+
date,
|
|
25824
|
+
|
|
25825
|
+
id_branch,
|
|
25826
|
+
id_payment,
|
|
25827
|
+
id_restriction,
|
|
25828
|
+
id_package,
|
|
25829
|
+
package_type,
|
|
25830
|
+
payment_type,
|
|
25831
|
+
payment_detail_type,
|
|
25832
|
+
day,
|
|
25833
|
+
tax,
|
|
25834
|
+
price,
|
|
25835
|
+
quantity
|
|
25836
|
+
}
|
|
25837
|
+
* @param data
|
|
25838
|
+
* @return Promise => response = {} / error
|
|
25839
|
+
* 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
|
|
25840
|
+
*/
|
|
25841
|
+
createPayment_Detail_byDealer(data: any): any;
|
|
25842
|
+
/**
|
|
25843
|
+
* @example:
|
|
25844
|
+
* this.vhQuerySales.updatePayment_Detail_byDealer('5fb6780ca2148e09806c5b01', {name:'Khuyến mãi 12/12'})
|
|
25845
|
+
.then((response)=>{
|
|
25846
|
+
console.log('updatePayment_Detail_byDealer', response);
|
|
25847
|
+
},(error:any)=>{
|
|
25848
|
+
reject(error);
|
|
25849
|
+
})
|
|
25850
|
+
* @param id_payment_detail
|
|
25851
|
+
* @param value
|
|
25852
|
+
* @return Promise => response = undefined / error
|
|
25853
|
+
*/
|
|
25854
|
+
updatePayment_Detail_byDealer(id_payment_detail: string, value: object): Promise<unknown>;
|
|
25855
|
+
/**
|
|
25856
|
+
* @example:
|
|
25857
|
+
* let time = new Date();
|
|
25858
|
+
* time.setDate(time.getDate()-7);
|
|
25859
|
+
* this.vhQuerySales.getPayment_details_byDealer({id_payment:{$eq:'5fb67fda87c0f21d484cbdf3'}}, {},{},0)
|
|
25860
|
+
.then((payment_details)=>{
|
|
25861
|
+
console.log('getPayment_details_byDealer', payment_details);
|
|
25862
|
+
})
|
|
25863
|
+
* @param query
|
|
25864
|
+
* @param projection — đang tìm hiểu, tạm thời để giá trị là {}
|
|
25865
|
+
* @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
|
|
25866
|
+
* @param limit — null hoặc 0: không giới hạn record get về; 2: get về 2 record
|
|
25867
|
+
* @return Promise Array => array = [{},{},...] / error
|
|
25868
|
+
*/
|
|
25869
|
+
getPayment_details_byDealer(query: any, projection?: object, sort?: object, limit?: number): Promise<unknown>;
|
|
25870
|
+
/**
|
|
25871
|
+
* @example:
|
|
25872
|
+
* this.vhQuerySales.getPayment_detail_byDealer('5fb67fda87c0f21d484cbdf3')
|
|
25873
|
+
.then((payment_detail)=>{
|
|
25874
|
+
console.log('getPayment_detail_byDealer', payment_detail);
|
|
25875
|
+
})
|
|
25876
|
+
* @param id_payment_detail
|
|
25877
|
+
* @return Promise => payment_detail ={} or null / error
|
|
25878
|
+
*/
|
|
25879
|
+
getPayment_detail_byDealer(id_payment_detail: any): Promise<unknown>;
|
|
25880
|
+
/**
|
|
25881
|
+
* @example:
|
|
25882
|
+
* this.vhQuerySales.deletePayment_Detail_byDealer('5fb67fda87c0f21d484cbdf3')
|
|
25883
|
+
.then((response)=>{
|
|
25884
|
+
console.log('deletePayment_Detail_byDealer', response);
|
|
25885
|
+
},(error:any)=>{
|
|
25886
|
+
reject(error);
|
|
25887
|
+
})
|
|
25888
|
+
* @param id_payment_detail
|
|
25889
|
+
* @return Promise => Promise => response = undefined / error
|
|
25890
|
+
*/
|
|
25891
|
+
deletePayment_Detail_byDealer(id_payment_detail: string): Promise<unknown>;
|
|
25892
|
+
/**
|
|
25893
|
+
* @example:
|
|
25894
|
+
* this.vhQuerySales.getPackage_byDealer('5fb67fda87c0f21d484cbdf3')
|
|
25895
|
+
.then((package)=>{
|
|
25896
|
+
console.log('getPackage_byDealer', package);
|
|
25897
|
+
})
|
|
25613
25898
|
* @param id_package
|
|
25614
25899
|
* @return Promise => package ={} or null / error
|
|
25615
25900
|
*/
|
|
25616
|
-
|
|
25901
|
+
getPackage_byDealer(id_package: any): Promise<unknown>;
|
|
25617
25902
|
private publishObservableEventPromotions;
|
|
25618
25903
|
private observableLocalPromotions;
|
|
25619
25904
|
/**
|