ionic-vhframeworks 10.4.67 → 10.5.1
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.
|
@@ -218,6 +218,18 @@ export declare class VhAlgorithm {
|
|
|
218
218
|
* @returns true: nếu ngày trên bill trùng với ngày của thiết bị; false: nếu ngày trên bill khác với ngày của thiết bị
|
|
219
219
|
*/
|
|
220
220
|
isToday(date: any): boolean;
|
|
221
|
+
/**
|
|
222
|
+
* Hàm lấy thời điểm bắt đầu (00:00:00.000) của một ngày bất kỳ như sau
|
|
223
|
+
* @param date
|
|
224
|
+
* @returns
|
|
225
|
+
*/
|
|
226
|
+
getStartOfDay(date: Date | string): Date;
|
|
227
|
+
/**
|
|
228
|
+
* Hàm lấy thời điểm kết thúc của một ngày bất kỳ (tức là 23:59:59.999)
|
|
229
|
+
* @param date
|
|
230
|
+
* @returns
|
|
231
|
+
*/
|
|
232
|
+
getEndOfDay(date: Date | string): Date;
|
|
221
233
|
/**
|
|
222
234
|
* @example SET:
|
|
223
235
|
* localStorageSET('local_name', {a=1, b='hai'});
|
|
@@ -3604,6 +3616,7 @@ export declare class VhQueryCafe {
|
|
|
3604
3616
|
* let product = {
|
|
3605
3617
|
allow_sell: true,
|
|
3606
3618
|
brand: "OEM",
|
|
3619
|
+
tax: 0,
|
|
3607
3620
|
id_category: "vTr90aYfhDqSCyuRh4DR",
|
|
3608
3621
|
img: "image link",
|
|
3609
3622
|
manysize: false,
|
|
@@ -3625,6 +3638,7 @@ export declare class VhQueryCafe {
|
|
|
3625
3638
|
* let product = {
|
|
3626
3639
|
allow_sell: true,
|
|
3627
3640
|
brand: "OEM",
|
|
3641
|
+
tax: 0,
|
|
3628
3642
|
id_category: "vTr90aYfhDqSCyuRh4DR",
|
|
3629
3643
|
img: "image link",
|
|
3630
3644
|
manysize: true,
|
|
@@ -14656,6 +14670,7 @@ export declare class VhQueryAutoWeb {
|
|
|
14656
14670
|
* let product = {
|
|
14657
14671
|
allow_sell: true,
|
|
14658
14672
|
brand: "OEM",
|
|
14673
|
+
tax: 0,
|
|
14659
14674
|
id_categorys: ["vTr90aYfhDqSCyuRh4DR"],
|
|
14660
14675
|
img: "image link",
|
|
14661
14676
|
manysize: false,
|
|
@@ -14677,6 +14692,7 @@ export declare class VhQueryAutoWeb {
|
|
|
14677
14692
|
* let product = {
|
|
14678
14693
|
allow_sell: true,
|
|
14679
14694
|
brand: "OEM",
|
|
14695
|
+
tax: 0,
|
|
14680
14696
|
id_categorys: ["vTr90aYfhDqSCyuRh4DR"],
|
|
14681
14697
|
img: "image link",
|
|
14682
14698
|
manysize: true,
|
|
@@ -14985,6 +15001,7 @@ export declare class VhQueryAutoWeb {
|
|
|
14985
15001
|
* let food = {
|
|
14986
15002
|
allow_sell: true,
|
|
14987
15003
|
brand: "OEM",
|
|
15004
|
+
tax: 0,
|
|
14988
15005
|
id_category: "vTr90aYfhDqSCyuRh4DR",
|
|
14989
15006
|
img: "image link",
|
|
14990
15007
|
manysize: false,
|
|
@@ -15006,6 +15023,7 @@ export declare class VhQueryAutoWeb {
|
|
|
15006
15023
|
* let food = {
|
|
15007
15024
|
allow_sell: true,
|
|
15008
15025
|
brand: "OEM",
|
|
15026
|
+
tax: 0,
|
|
15009
15027
|
id_category: "vTr90aYfhDqSCyuRh4DR",
|
|
15010
15028
|
img: "image link",
|
|
15011
15029
|
manysize: true,
|
|
@@ -15150,6 +15168,7 @@ export declare class VhQueryAutoWeb {
|
|
|
15150
15168
|
serial_number:"123456",
|
|
15151
15169
|
imei: "1r2r5f2g4h5vf2g5",
|
|
15152
15170
|
brand_name: "XPRINTER",
|
|
15171
|
+
tax: 0,
|
|
15153
15172
|
model_number: "XP-420B-USB",
|
|
15154
15173
|
material: "ABS",
|
|
15155
15174
|
Certification: "CCC, CE, FCC, RoHS, KC, SAA, BIS, BSMI",
|
|
@@ -24459,6 +24478,7 @@ export declare class VhQuerySales {
|
|
|
24459
24478
|
* let product = {
|
|
24460
24479
|
allow_sell: true,
|
|
24461
24480
|
brand: "OEM",
|
|
24481
|
+
tax: 0,
|
|
24462
24482
|
id_category: "vTr90aYfhDqSCyuRh4DR",
|
|
24463
24483
|
img: "image link",
|
|
24464
24484
|
manysize: false,
|
|
@@ -24480,6 +24500,7 @@ export declare class VhQuerySales {
|
|
|
24480
24500
|
* let product = {
|
|
24481
24501
|
allow_sell: true,
|
|
24482
24502
|
brand: "OEM",
|
|
24503
|
+
tax: 0,
|
|
24483
24504
|
id_category: "vTr90aYfhDqSCyuRh4DR",
|
|
24484
24505
|
img: "image link",
|
|
24485
24506
|
manysize: true,
|
|
@@ -30238,17 +30259,93 @@ export declare class VhQuerySales {
|
|
|
30238
30259
|
static ɵfac: i0.ɵɵFactoryDeclaration<VhQuerySales, never>;
|
|
30239
30260
|
static ɵprov: i0.ɵɵInjectableDeclaration<VhQuerySales>;
|
|
30240
30261
|
}
|
|
30241
|
-
export declare class
|
|
30262
|
+
export declare class VhQueryAdministrator {
|
|
30242
30263
|
private vhMGDB_auth;
|
|
30243
30264
|
private vhMGDB_database;
|
|
30244
30265
|
private vhMGDB_rootdatabase;
|
|
30245
30266
|
private vhAuth;
|
|
30246
30267
|
private vhAlgorithm;
|
|
30247
30268
|
constructor(vhMGDB_auth: VhMGDB_auth, vhMGDB_database: VhMGDB_database, vhMGDB_rootdatabase: VhMGDB_rootdatabase, vhAuth: VhAuth, vhAlgorithm: VhAlgorithm);
|
|
30269
|
+
/**
|
|
30270
|
+
* @description: Lấy về tất cả các cửa hàng (shops) đã đăng ký vào hệ thống phần mềm, theo thời gian
|
|
30271
|
+
* @example:
|
|
30272
|
+
* let starttime = new Date('2022-03-13T05:24:00');
|
|
30273
|
+
* let endtime = new Date();
|
|
30274
|
+
* this.VhQueryAdministrator.getShops_byTime(starttime, endtime')
|
|
30275
|
+
.then(result=>{
|
|
30276
|
+
console.log('result', result);
|
|
30277
|
+
}, error=>{
|
|
30278
|
+
console.log('error', error);
|
|
30279
|
+
})
|
|
30280
|
+
* @param starttime
|
|
30281
|
+
* @param endtime
|
|
30282
|
+
* @returns Promise Array
|
|
30283
|
+
*/
|
|
30284
|
+
getShops_byTime(starttime: any, endtime: any): Promise<unknown>;
|
|
30285
|
+
/**
|
|
30286
|
+
* @example:
|
|
30287
|
+
* let time = new Date();
|
|
30288
|
+
* time.setDate(time.getDate()-7);
|
|
30289
|
+
* this.vhQueryAdministrator.getAffiliaters_byFields({code:{$eq: 'A0001;}}, {},{},0)
|
|
30290
|
+
.then((affiliaters)=>{
|
|
30291
|
+
console.log('getAffiliaters_byFields', affiliaters);
|
|
30292
|
+
})
|
|
30293
|
+
* @param query
|
|
30294
|
+
* @param projection — đang tìm hiểu, tạm thời để giá trị là {}
|
|
30295
|
+
* @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
|
|
30296
|
+
* @param limit — null hoặc 0: không giới hạn record get về; 2: get về 2 record
|
|
30297
|
+
* @return — Array -> array = [{},{},...]
|
|
30298
|
+
*/
|
|
30299
|
+
getAffiliaters_byFields(query: any, projection?: object, sort?: object, limit?: number): Promise<unknown>;
|
|
30300
|
+
/**
|
|
30301
|
+
* @example:
|
|
30302
|
+
* let time = new Date();
|
|
30303
|
+
* time.setDate(time.getDate()-7);
|
|
30304
|
+
* this.vhQueryAdministrator.getDealers_byFields({creationdate:{$lte: new Date()}}, {},{},0)
|
|
30305
|
+
.then((dealers)=>{
|
|
30306
|
+
console.log('getDealers_byFields', dealers);
|
|
30307
|
+
})
|
|
30308
|
+
* @param query
|
|
30309
|
+
* @param projection — đang tìm hiểu, tạm thời để giá trị là {}
|
|
30310
|
+
* @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
|
|
30311
|
+
* @param limit — null hoặc 0: không giới hạn record get về; 2: get về 2 record
|
|
30312
|
+
* @return — Array -> array = [{},{},...]
|
|
30313
|
+
*/
|
|
30314
|
+
getDealers_byFields(query: any, projection?: object, sort?: object, limit?: number): Promise<unknown>;
|
|
30315
|
+
/**
|
|
30316
|
+
* @example:
|
|
30317
|
+
* let data = {
|
|
30318
|
+
date: new Date(),
|
|
30319
|
+
code: "A0001",
|
|
30320
|
+
name: "Giá tốt mỗi ngày",
|
|
30321
|
+
id_affiliater: "5fb6780ca2148e09806c5b01",
|
|
30322
|
+
payment_details:[{
|
|
30323
|
+
id_package: "store_main_package_standard_12month",
|
|
30324
|
+
original_price: 1980000,
|
|
30325
|
+
partner_price: 1980000,
|
|
30326
|
+
selling_price: 980000
|
|
30327
|
+
},{
|
|
30328
|
+
id_package: "store_main_package_super_pro_12month",
|
|
30329
|
+
original_price: 3960000,
|
|
30330
|
+
partner_price: 3960000,
|
|
30331
|
+
original_price: 3960000
|
|
30332
|
+
}]
|
|
30333
|
+
}
|
|
30334
|
+
* this.vhQueryAdministrator.createAffiliate(data)
|
|
30335
|
+
.then((affiliate)=>{
|
|
30336
|
+
console.log('createAffiliate', affiliate);
|
|
30337
|
+
},(error:any)=>{
|
|
30338
|
+
console.log('error', error);
|
|
30339
|
+
})
|
|
30340
|
+
* @param data : object
|
|
30341
|
+
* @return Promise => affiliate = {} / error
|
|
30342
|
+
* 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
|
|
30343
|
+
*/
|
|
30344
|
+
createAffiliate(data: any): Promise<unknown>;
|
|
30248
30345
|
/**
|
|
30249
30346
|
* Hàm lấy về thông tin, giá cả các gói phần mềm mà các affiliater muốn bán cho khách của họ
|
|
30250
30347
|
* @example:
|
|
30251
|
-
* this.
|
|
30348
|
+
* this.vhQueryAdministrator.getAffiliate('5fb67fda87c0f21d484cbdf3')
|
|
30252
30349
|
.then((affiliate)=>{
|
|
30253
30350
|
console.log('getAffiliate', affiliate);
|
|
30254
30351
|
})
|
|
@@ -30256,6 +30353,84 @@ export declare class VhQueryAffiliater {
|
|
|
30256
30353
|
* @return Promise => affiliate ={} or null / error
|
|
30257
30354
|
*/
|
|
30258
30355
|
getAffiliate(id_affiliate: any): Promise<unknown>;
|
|
30356
|
+
/**
|
|
30357
|
+
* @example:
|
|
30358
|
+
* this.vhQueryAffiliater.updateAffiliate('5fb6780ca2148e09806c5b01', {total:990000})
|
|
30359
|
+
.then((response)=>{
|
|
30360
|
+
console.log('updateAffiliate', response);
|
|
30361
|
+
}, error=>{
|
|
30362
|
+
console.log('error', error);
|
|
30363
|
+
})
|
|
30364
|
+
* @param id_affiliate
|
|
30365
|
+
* @param value
|
|
30366
|
+
* @return Promise => response = undefined / error
|
|
30367
|
+
*/
|
|
30368
|
+
updateAffiliate(id_affiliate: string, value: any): Promise<unknown>;
|
|
30369
|
+
/**
|
|
30370
|
+
* @example:
|
|
30371
|
+
* this.vhQueryAffiliater.deleteAffiliate('5fb67fda87c0f21d484cbdf3')
|
|
30372
|
+
.then((response)=>{
|
|
30373
|
+
console.log('deleteAffiliate', response);
|
|
30374
|
+
}, error=>{
|
|
30375
|
+
console.log(error, error);
|
|
30376
|
+
})
|
|
30377
|
+
* @param id_affiliate
|
|
30378
|
+
* @return Promise => response = undefined / error
|
|
30379
|
+
*/
|
|
30380
|
+
deleteAffiliate(id_affiliate: any): Promise<unknown>;
|
|
30381
|
+
/**
|
|
30382
|
+
* @example:
|
|
30383
|
+
* let time = new Date();
|
|
30384
|
+
* time.setDate(time.getDate()-7);
|
|
30385
|
+
* this.vhQueryAffiliater.getAffiliate_byFields({payment_type:{$eq:5}}, {},{},0)
|
|
30386
|
+
.then((affiliates)=>{
|
|
30387
|
+
console.log('getAffiliate_byFields', affiliates);
|
|
30388
|
+
})
|
|
30389
|
+
* @param query
|
|
30390
|
+
* @param projection — đang tìm hiểu, tạm thời để giá trị là {}
|
|
30391
|
+
* @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
|
|
30392
|
+
* @param limit — null hoặc 0: không giới hạn record get về; 2: get về 2 record
|
|
30393
|
+
* @return — Array -> array = [{},{},...]
|
|
30394
|
+
*/
|
|
30395
|
+
getAffiliate_byFields(query: any, projection?: object, sort?: object, limit?: number): Promise<unknown>;
|
|
30396
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<VhQueryAdministrator, never>;
|
|
30397
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<VhQueryAdministrator>;
|
|
30398
|
+
}
|
|
30399
|
+
export declare class VhQueryAffiliater {
|
|
30400
|
+
private vhMGDB_auth;
|
|
30401
|
+
private vhMGDB_database;
|
|
30402
|
+
private vhMGDB_rootdatabase;
|
|
30403
|
+
private vhAuth;
|
|
30404
|
+
private vhAlgorithm;
|
|
30405
|
+
constructor(vhMGDB_auth: VhMGDB_auth, vhMGDB_database: VhMGDB_database, vhMGDB_rootdatabase: VhMGDB_rootdatabase, vhAuth: VhAuth, vhAlgorithm: VhAlgorithm);
|
|
30406
|
+
/**
|
|
30407
|
+
* Lấy về các shops đã đăng ký sử dụng nhưng chưa gia hạn
|
|
30408
|
+
* this.vhQueryAffiliater.getShops_byFree()
|
|
30409
|
+
.then((shops)=>{
|
|
30410
|
+
|
|
30411
|
+
})
|
|
30412
|
+
* @returns
|
|
30413
|
+
*/
|
|
30414
|
+
getShops_byFree(): Promise<unknown>;
|
|
30415
|
+
/**
|
|
30416
|
+
* Lấy vế các shops đã thanh toán và gia hạn sử dụng
|
|
30417
|
+
* this.vhQueryAffiliater.getPayments_byShop()
|
|
30418
|
+
.then((shops)=>{
|
|
30419
|
+
|
|
30420
|
+
})
|
|
30421
|
+
* @returns
|
|
30422
|
+
*/
|
|
30423
|
+
getPayments_byShop(): Promise<unknown>;
|
|
30424
|
+
/**
|
|
30425
|
+
* Hàm lấy về thông tin, giá cả các gói phần mềm mà sales365 ủy quyền cho các affiliater bán cho khách của họ
|
|
30426
|
+
* @example:
|
|
30427
|
+
* this.vhQueryAffiliater.getAffiliate()
|
|
30428
|
+
.then((affiliate)=>{
|
|
30429
|
+
console.log('getAffiliate', affiliate);
|
|
30430
|
+
})
|
|
30431
|
+
* @return Promise => affiliate ={} or null / error
|
|
30432
|
+
*/
|
|
30433
|
+
getAffiliate(): Promise<unknown>;
|
|
30259
30434
|
static ɵfac: i0.ɵɵFactoryDeclaration<VhQueryAffiliater, never>;
|
|
30260
30435
|
static ɵprov: i0.ɵɵInjectableDeclaration<VhQueryAffiliater>;
|
|
30261
30436
|
}
|
|
@@ -30520,7 +30695,7 @@ export declare class VhQueryDealer {
|
|
|
30520
30695
|
*/
|
|
30521
30696
|
getLicenseKEYs(query: any, projection?: object, sort?: object, limit?: number): Promise<unknown>;
|
|
30522
30697
|
/**
|
|
30523
|
-
* Lấy về thông tin Đại lý từ mã đại lý (
|
|
30698
|
+
* Lấy về thông tin Đại lý từ mã đại lý (dealerCode)
|
|
30524
30699
|
* @example:
|
|
30525
30700
|
* this.vhQueryDealer.getDealer_byDealerCode()
|
|
30526
30701
|
.then((dealer)=>{
|
|
@@ -30530,10 +30705,10 @@ export declare class VhQueryDealer {
|
|
|
30530
30705
|
}, error=>{
|
|
30531
30706
|
console.log(error);
|
|
30532
30707
|
})
|
|
30533
|
-
* @param
|
|
30708
|
+
* @param dealerCode
|
|
30534
30709
|
* @returns object or null
|
|
30535
30710
|
*/
|
|
30536
|
-
getDealer_byDealerCode(
|
|
30711
|
+
getDealer_byDealerCode(dealerCode: any): Promise<unknown>;
|
|
30537
30712
|
/**
|
|
30538
30713
|
* @example:
|
|
30539
30714
|
* this.vhQueryDealer.getStoresAPP_byTime(starttime, endtime, '5fb67fda87c0f21d484cbdf3')
|