diff --git a/src/app/admin/order/order-agent/order-agent.component.html b/src/app/admin/order/order-agent/order-agent.component.html index 2de48c6..25d765a 100644 --- a/src/app/admin/order/order-agent/order-agent.component.html +++ b/src/app/admin/order/order-agent/order-agent.component.html @@ -50,19 +50,18 @@ - - - - - - - - - - - - - +
+ + 支付模式 + + + + + + + + +
支付方式 @@ -71,6 +70,7 @@ + diff --git a/src/app/admin/order/order-coupons/order-coupons.component.html b/src/app/admin/order/order-coupons/order-coupons.component.html index 0d632aa..e26dc6a 100644 --- a/src/app/admin/order/order-coupons/order-coupons.component.html +++ b/src/app/admin/order/order-coupons/order-coupons.component.html @@ -120,7 +120,7 @@ {{data['highUser'] == null ? '暂无': data['highUser'].name}} {{data['highCouponCode']?.storeName}} - {{data['highCouponCode']?.useEndTime | date: 'yyyy-MM-dd HH:mm'}} + {{data['highCouponCode']?.consumeTime | date: 'yyyy-MM-dd HH:mm'}} {{data.createTime | date: 'yyyy-MM-dd HH:mm'}} {{data.status | discountCodeStatus}} @@ -156,4 +156,4 @@ - \ No newline at end of file + diff --git a/src/app/admin/recharge-order/price-list/price-list.component.html b/src/app/admin/recharge-order/price-list/price-list.component.html index ae70d10..5039ea2 100644 --- a/src/app/admin/recharge-order/price-list/price-list.component.html +++ b/src/app/admin/recharge-order/price-list/price-list.component.html @@ -12,9 +12,9 @@ 金额类型 - - - + + + @@ -37,7 +37,7 @@
共计 {{total}} 条数据
- +
编号 金额类型 - 供货商编号 - 商品ID + + 充值金额 支付金额 创建时间 @@ -68,14 +68,15 @@ {{i + 1}} {{data.type | rechargePrice}} - {{data.channel}} - {{data.goodsId}} + + {{data.price}} {{data.realPrice}} {{data.createTime | date: 'yyyy-MM-dd HH:mm'}} 编辑 - 删除 + {{data.status === 1 ? '禁用': '启用'}} + 删除 @@ -87,24 +88,30 @@ 金额类型 - - - + + + - 供货商编号 - - - - - - 商品ID - - + 商品排序 + + + + + + + + + + + + + + 充值金额 diff --git a/src/app/admin/recharge-order/price-list/price-list.component.ts b/src/app/admin/recharge-order/price-list/price-list.component.ts index 7d6f173..bbaaaaf 100644 --- a/src/app/admin/recharge-order/price-list/price-list.component.ts +++ b/src/app/admin/recharge-order/price-list/price-list.component.ts @@ -55,9 +55,10 @@ export class PriceListComponent implements OnInit { type: [null, [Validators.required]], price: [null, [Validators.required]], realPrice: [{value: null, disabled: true}, [Validators.required]], - goodsId: [null, [Validators.required]], + // goodsId: [null, [Validators.required]], discount: [null, [Validators.required]], - channel: [null, [Validators.required]], + sort: [null, [Validators.required]], + // channel: [null, [Validators.required]], }); @@ -124,7 +125,7 @@ export class PriceListComponent implements OnInit { return; } } - this.validateForm.value.realPrice = this.realPrice; + this.validateForm.value.realPrice = this.validateForm.value.price * this.validateForm.value.discount / 100; if (this.edit) { this.validateForm.value['id'] = this.id; this.recharge.updatePrice(this.validateForm.value, data => { @@ -157,14 +158,32 @@ export class PriceListComponent implements OnInit { handleCancelGoods(): void { this.isVisibleGoods = false; } - public getForbiddenUser(id): void { + public getForbiddenUser(id, status: any): void { + + const message = (status === 1 ? '是否禁用' : '是否启用'); + + this.common.showConfirm(message, data => { + if (data) { + this.recharge.onAndOffShelves(id, dataUser => { + if (dataUser['return_code'] === '000000') { + this.message.success('操作成功'); + this.getRequest(false , this.searchForm.value); + } else { + this.message.error(dataUser['return_msg']); + } + }); + } + }); + } + + public getForbiddenUserD(id): void { this.common.showConfirm('是否删除', item => { if (item) { this.recharge.deletePrice(id, data => { if (data['return_code'] === '000000') { - this.getRequest(false, this.searchForm.value); this.message.success('删除成功'); + this.getRequest(false, this.searchForm.value); } else { this.message.error(data['return_msg']); } @@ -176,7 +195,6 @@ export class PriceListComponent implements OnInit { public getMemberGoods(): void { this.isVisibleGoods = true; this.recharge.getMemberGoods(data => { - console.log(data); this.goodsArray = data['return_data']['data']; }); } @@ -185,4 +203,6 @@ export class PriceListComponent implements OnInit { this.realPrice = this.validateForm.value.price * this.validateForm.value.discount / 100; } + + } diff --git a/src/app/admin/system/system-user/system-user.component.html b/src/app/admin/system/system-user/system-user.component.html index 62ac44a..53ca746 100644 --- a/src/app/admin/system/system-user/system-user.component.html +++ b/src/app/admin/system/system-user/system-user.component.html @@ -88,7 +88,7 @@ - 头像 + 头像 - 手机号码 + 手机号码 diff --git a/src/app/admin/system/system-user/system-user.component.ts b/src/app/admin/system/system-user/system-user.component.ts index d0440df..828f54e 100644 --- a/src/app/admin/system/system-user/system-user.component.ts +++ b/src/app/admin/system/system-user/system-user.component.ts @@ -84,7 +84,7 @@ export class SystemUserComponent implements OnInit { userName: [null, [Validators.required, ValidatorsService.maxLength(20)]], loginName: [null, [Validators.required, ValidatorsService.minLength(3), ValidatorsService.maxLength(20)]], password: [null, [Validators.required, ValidatorsService.minLength(6), ValidatorsService.maxLength(40)]], - telephone: [null, [Validators.required, ValidatorsService.mobile]], + telephone: [null], roleId: [null, [Validators.required]], }); // 调用请求方法 @@ -172,7 +172,7 @@ export class SystemUserComponent implements OnInit { this.validateForm.controls[i].updateValueAndValidity(); } - if (this.validateForm.status == null || this.validateForm.status !== 'VALID' || this.avatarImg == null || this.avatarImg === '') { + if (this.validateForm.status == null || this.validateForm.status !== 'VALID') { this.modalService.info({ nzTitle: '提示', nzContent: '有未填写的必填项', diff --git a/src/app/pipes/recharge-price.pipe.ts b/src/app/pipes/recharge-price.pipe.ts index af4e4d2..7da171c 100644 --- a/src/app/pipes/recharge-price.pipe.ts +++ b/src/app/pipes/recharge-price.pipe.ts @@ -8,11 +8,11 @@ export class RechargePricePipe implements PipeTransform { transform(value: number): string { switch (value) { case 1: - return '话费充值'; + return '电信充值'; case 2: - return '中石化'; + return '移动充值'; case 3: - return '中石油'; + return '联通充值'; } } diff --git a/src/app/services/recharge.service.ts b/src/app/services/recharge.service.ts index 6ff82a2..0b1491c 100644 --- a/src/app/services/recharge.service.ts +++ b/src/app/services/recharge.service.ts @@ -26,6 +26,19 @@ export class RechargeService { }); } + /** + * @Author Sum1Dream + * @methodName deletePrice + * @Description //上下架 + * @Date 15:03 2021/8/12 + * @Param mod + **/ + public onAndOffShelves(id: number, callBack) { + this.http.get(environment.baseUrl + 'outRechargePrice/onAndOffShelves?id=' + id).subscribe(data => { + callBack(data); + }); + } + /** * 新增 * diff --git a/src/environments/environment.ts b/src/environments/environment.ts index c9df98d..be95407 100644 --- a/src/environments/environment.ts +++ b/src/environments/environment.ts @@ -6,8 +6,8 @@ export const environment = { production: false, baseUrl: 'http://localhost:9302/brest/', // 测试环境服务器地址(请求数据地址) imageUrl: 'http://localhost:9302/filesystem/', - // baseUrl: 'https://hsgcs.dctpay.com/brest/', // 测试环境服务器地址(请求数据地址) - // imageUrl: 'https://hsgcs.dctpay.com/filesystem/', + // baseUrl: 'https://hsg.dctpay.com/brest/', // 测试环境服务器地址(请求数据地址) + // imageUrl: 'https://hsg.dctpay.com/filesystem/', key: 'https://hsgcs.dctpay.com/phone-recharge-H5/index.html?codeValue=', inviteUrl: 'https://hsgcs.dctpay.com/wx/?action=ic&id=', };