新增话费充值

pull/1/head
袁野 3 years ago
parent fb9398c8eb
commit 5c37ed9bd9
  1. 52
      src/app/admin/recharge-order/order-list/order-list.component.html
  2. 3
      src/app/admin/recharge-order/order-list/order-list.component.ts
  3. 4
      src/app/app-common.module.ts
  4. 1
      src/app/pipes/index.ts

@ -27,38 +27,50 @@
<nz-form-label [nzSpan]="6">充值类型</nz-form-label>
<nz-form-control [nzSpan]="16">
<nz-select nzShowSearch nzAllowClear formControlName="rechargeModel" 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>
</div>
<div nz-col nzSpan="8">
<nz-form-item>
<nz-form-label [nzSpan]="6">充值内容</nz-form-label>
<nz-form-label [nzSpan]="6">支付方式</nz-form-label>
<nz-form-control [nzSpan]="16">
<input nz-input placeholder="请输入充值号码/充值卡号..." [formControlName]="'rechargeContent'" />
<nz-select nzShowSearch nzAllowClear formControlName="payType" 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>
<nz-form-label [nzSpan]="6">充值号码</nz-form-label>
<nz-form-control [nzSpan]="16">
<input nz-input placeholder="请输入订单号..." [formControlName]="'orderNo'" />
<input nz-input placeholder="请输入充值号码..." [formControlName]="'rechargeContent'" />
</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-label [nzSpan]="6">订单号</nz-form-label>
<nz-form-control [nzSpan]="16">
<input nz-input placeholder="请输入用户电话..." [formControlName]="'userPhone'" />
<input nz-input placeholder="请输入订单号..." [formControlName]="'orderNo'" />
</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">-->
<!-- <input nz-input placeholder="请输入用户电话..." [formControlName]="'userPhone'" />-->
<!-- </nz-form-control>-->
<!-- </nz-form-item>-->
<!-- </div>-->
<div nz-col nzSpan="8">
<nz-form-item>
<nz-form-label [nzSpan]="6">支付时间</nz-form-label>
@ -67,14 +79,14 @@
</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-range-picker [nzShowTime]="{ nzFormat: 'HH:mm' }" formControlName="createTime"></nz-range-picker>
</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-range-picker [nzShowTime]="{ nzFormat: 'HH:mm' }" formControlName="createTime"></nz-range-picker>-->
<!-- </nz-form-control>-->
<!-- </nz-form-item>-->
<!-- </div>-->
</div>
<div nz-row>
@ -117,6 +129,7 @@
<th nzWidth="100px">充值金额</th>
<th nzWidth="100px">支付金额</th>
<th nzWidth="140px">生成时间</th>
<th nzWidth="100px" nzRight>支付方式</th>
<th nzWidth="100px" nzRight>状态</th>
<th nzWidth="200px" nzRight>操作</th>
</tr>
@ -132,11 +145,12 @@
<td>{{data.orderPrice}}</td>
<td>{{data.payPrice}}</td>
<td>{{data.createTimed | date: 'yyyy-MM-dd HH:mm:ss'}}</td>
<td nzRight>{{data.payType | rechargePayType}}</td>
<td nzRight>{{data.status | rechargeStatus}}</td>
<td nzRight class="table-td-operation">
<a (click)="getDetail(data.id)">详情</a>
<a *ngIf="data.status === 2" (click)="finishOrder(data.id)">完成充值</a>
<a *ngIf="data.status === 2" (click)="orderToRefund(data.id)">退款</a>
<a *ngIf="data.status === 2 && data.payType !== 3" (click)="orderToRefund(data.id)">退款</a>
</td>
</tbody>
</nz-table>

@ -77,6 +77,7 @@ export class OrderListComponent implements OnInit , OnDestroy {
rechargeContent: [null],
userPhone: [null],
payTime: [null],
payType: [null],
createTime: [null],
});
this.validateForm = this.form.group({
@ -163,8 +164,8 @@ export class OrderListComponent implements OnInit , OnDestroy {
if (item) {
this.recharge.orderToRefund(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']);
}

@ -28,7 +28,8 @@ import {
RechargeStatusPipe,
ChannelMarkPipe,
TypePipe,
StatusPipe
StatusPipe,
RechargePayTypePipe
} from './pipes';
@ -53,6 +54,7 @@ const PIPES = [
ChannelMarkPipe,
TypePipe,
StatusPipe,
RechargePayTypePipe,
];

@ -17,3 +17,4 @@ export * from './recharge-status.pipe';
export * from './channel-mark.pipe';
export * from './activate/type.pipe';
export * from './activate/status.pipe';
export * from './recharge-pay-type.pipe';

Loading…
Cancel
Save