pull/1/head
袁野 3 years ago
parent 0d1287c1da
commit fb9398c8eb
  1. 26
      src/app/admin/order/order-agent/order-agent.component.html
  2. 2
      src/app/admin/order/order-coupons/order-coupons.component.html
  3. 49
      src/app/admin/recharge-order/price-list/price-list.component.html
  4. 32
      src/app/admin/recharge-order/price-list/price-list.component.ts
  5. 4
      src/app/admin/system/system-user/system-user.component.html
  6. 4
      src/app/admin/system/system-user/system-user.component.ts
  7. 6
      src/app/pipes/recharge-price.pipe.ts
  8. 13
      src/app/services/recharge.service.ts
  9. 4
      src/environments/environment.ts

@ -50,19 +50,18 @@
</nz-form-control>
</nz-form-item>
</div>
<!-- <div nz-col nzSpan="8">-->
<!-- <nz-form-item>-->
<!-- <nz-form-label [nzSpan]="6">支付模式</nz-form-label>-->
<!-- <nz-form-control [nzSpan]="16">-->
<!-- <nz-select nzShowSearch nzAllowClear formControlName="payModel" nzPlaceHolder="请选择支付模式">-->
<!-- <nz-option nzLabel="金币支付" nzValue="1"></nz-option>-->
<!-- <nz-option nzLabel="第三方支付" nzValue="2"></nz-option>-->
<!-- <nz-option nzLabel="混合支付" nzValue="3"></nz-option>-->
<!-- <nz-option nzLabel="工会卡支付" nzValue="4"></nz-option>-->
<!-- </nz-select>-->
<!-- </nz-form-control>-->
<!-- </nz-form-item>-->
<!-- </div>-->
<div nz-col nzSpan="8">
<nz-form-item>
<nz-form-label [nzSpan]="6">支付模式</nz-form-label>
<nz-form-control [nzSpan]="16">
<nz-select nzShowSearch nzAllowClear formControlName="payModel" nzPlaceHolder="请选择支付模式">
<nz-option nzLabel="金币支付" nzValue="1"></nz-option>
<nz-option nzLabel="第三方支付" nzValue="2"></nz-option>
<nz-option nzLabel="混合支付" nzValue="3"></nz-option>
</nz-select>
</nz-form-control>
</nz-form-item>
</div>
<div nz-col nzSpan="8">
<nz-form-item>
<nz-form-label [nzSpan]="6">支付方式</nz-form-label>
@ -71,6 +70,7 @@
<nz-option nzLabel="支付宝" nzValue="1"></nz-option>
<nz-option nzLabel="微信" nzValue="2"></nz-option>
<nz-option nzLabel="金币" nzValue="3"></nz-option>
<nz-option nzLabel="工会卡支付" nzValue="4"></nz-option>
</nz-select>
</nz-form-control>
</nz-form-item>

@ -120,7 +120,7 @@
{{data['highUser'] == null ? '暂无': data['highUser'].name}}
</td>
<td>{{data['highCouponCode']?.storeName}}</td>
<td>{{data['highCouponCode']?.useEndTime | date: 'yyyy-MM-dd HH:mm'}}</td>
<td>{{data['highCouponCode']?.consumeTime | date: 'yyyy-MM-dd HH:mm'}}</td>
<td>{{data.createTime | date: 'yyyy-MM-dd HH:mm'}}</td>
<td>{{data.status | discountCodeStatus}}</td>
</tbody>

@ -12,9 +12,9 @@
<nz-form-label [nzSpan]="6">金额类型</nz-form-label>
<nz-form-control [nzSpan]="16">
<nz-select nzShowSearch nzAllowClear formControlName="type" nzPlaceHolder="请选择金额类型">
<nz-option nzLabel="话费充值" nzValue="1"></nz-option>
<nz-option nzLabel="中石化" nzValue="2"></nz-option>
<nz-option nzLabel="中石油" nzValue="3"></nz-option>
<nz-option nzLabel="电信充值" nzValue="1"></nz-option>
<nz-option nzLabel="移动充值" nzValue="2"></nz-option>
<nz-option nzLabel="联通充值" nzValue="3"></nz-option>
</nz-select>
</nz-form-control>
</nz-form-item>
@ -37,7 +37,7 @@
<div class="inner-content">
<span>共计 {{total}} 条数据</span>
<div class="operating-button">
<button nz-button nzType="primary" class="right-btn" (click)="getMemberGoods()">获取关联商品</button>
<!-- <button nz-button nzType="primary" class="right-btn" (click)="getMemberGoods()">获取关联商品</button>-->
<button nz-button nzType="primary" class="right-btn" (click)="getEdit()"><i nz-icon nzType="plus" nzTheme="outline"></i>添加</button>
</div>
<nz-table
@ -56,8 +56,8 @@
<tr>
<th>编号</th>
<th>金额类型</th>
<th>供货商编号</th>
<th>商品ID</th>
<!-- <th>供货商编号</th>-->
<!-- <th>商品ID</th>-->
<th>充值金额</th>
<th>支付金额</th>
<th>创建时间</th>
@ -68,14 +68,15 @@
<tr *ngFor="let data of ajaxTable.data; let i = index">
<td>{{i + 1}}</td>
<td>{{data.type | rechargePrice}}</td>
<td>{{data.channel}}</td>
<td>{{data.goodsId}}</td>
<!-- <td>{{data.channel}}</td>-->
<!-- <td>{{data.goodsId}}</td>-->
<td>{{data.price}}</td>
<td>{{data.realPrice}}</td>
<td>{{data.createTime | date: 'yyyy-MM-dd HH:mm'}}</td>
<td class="table-td-operation">
<a (click)="getEdit(data.id)">编辑</a>
<a style="margin-left: 20px;" (click)="getForbiddenUser(data.id)">删除</a>
<a style="margin-left: 20px;" (click)='getForbiddenUser(data.id , data.status)'>{{data.status === 1 ? '禁用': '启用'}}</a>
<a style="margin-left: 20px;" (click)="getForbiddenUserD(data.id)">删除</a>
</td>
</tbody>
</nz-table>
@ -87,24 +88,30 @@
<nz-form-label [nzSpan]="6" nzRequired>金额类型</nz-form-label>
<nz-form-control [nzSpan]="16" nzErrorTip="请选择类型!">
<nz-select nzShowSearch nzAllowClear formControlName="type" nzPlaceHolder="请选择类型">
<nz-option nzLabel="话费充值" nzValue="1"></nz-option>
<nz-option nzLabel="中石化" nzValue="2"></nz-option>
<nz-option nzLabel="中石油" nzValue="3"></nz-option>
<nz-option nzLabel="电信充值" nzValue="1"></nz-option>
<nz-option nzLabel="移动充值" nzValue="2"></nz-option>
<nz-option nzLabel="联通充值" nzValue="3"></nz-option>
</nz-select>
</nz-form-control>
</nz-form-item>
<nz-form-item>
<nz-form-label [nzSpan]="6" nzRequired>供货商编号</nz-form-label>
<nz-form-control [nzSpan]="16" nzErrorTip="请输入供货商编号!">
<input [type]="'number'" nz-input formControlName="channel" />
</nz-form-control>
</nz-form-item>
<nz-form-item>
<nz-form-label [nzSpan]="6" nzRequired>商品ID</nz-form-label>
<nz-form-control [nzSpan]="16" nzErrorTip="请输入商品ID!">
<input [type]="'number'" nz-input formControlName="goodsId" />
<nz-form-label [nzSpan]="6" nzRequired>商品排序</nz-form-label>
<nz-form-control [nzSpan]="16" nzErrorTip="请输入商品排序!">
<input [type]="'number'" nz-input formControlName="sort" />
</nz-form-control>
</nz-form-item>
<!-- <nz-form-item>-->
<!-- <nz-form-label [nzSpan]="6" nzRequired>供货商编号</nz-form-label>-->
<!-- <nz-form-control [nzSpan]="16" nzErrorTip="请输入供货商编号!">-->
<!-- <input [type]="'number'" nz-input formControlName="channel" />-->
<!-- </nz-form-control>-->
<!-- </nz-form-item>-->
<!-- <nz-form-item>-->
<!-- <nz-form-label [nzSpan]="6" nzRequired>商品ID</nz-form-label>-->
<!-- <nz-form-control [nzSpan]="16" nzErrorTip="请输入商品ID!">-->
<!-- <input [type]="'number'" nz-input formControlName="goodsId" />-->
<!-- </nz-form-control>-->
<!-- </nz-form-item>-->
<nz-form-item>
<nz-form-label [nzSpan]="6" nzRequired>充值金额</nz-form-label>
<nz-form-control [nzSpan]="16" nzErrorTip="请输入充值金额!">

@ -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;
}
}

@ -88,7 +88,7 @@
</nz-form-item>
<nz-form-item>
<nz-form-label [nzSm]="6" [nzXs]="24" nzRequired>头像</nz-form-label>
<nz-form-label [nzSm]="6" [nzXs]="24" >头像</nz-form-label>
<nz-form-control [nzSm]="14" [nzXs]="24">
<nz-upload
nzAction="{{WEB_SERVE_URL}}/fileUpload/uploadfile"
@ -129,7 +129,7 @@
</nz-form-item>
<nz-form-item>
<nz-form-label [nzSm]="6" [nzXs]="24" nzRequired>手机号码</nz-form-label>
<nz-form-label [nzSm]="6" [nzXs]="24">手机号码</nz-form-label>
<nz-form-control [nzSm]="14" [nzXs]="24">
<input formControlName="telephone" placeholder="请输入手机号码" nz-input />
</nz-form-control>

@ -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: '有未填写的必填项',

@ -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 '联通充值';
}
}

@ -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);
});
}
/**
*
*

@ -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=',
};

Loading…
Cancel
Save