pull/1/head
袁野 2 years ago
parent 386dfaf024
commit 6e195e91af
  1. 2
      src/app/admin/agent/agent-list/agent-list.component.html
  2. 49
      src/app/admin/agent/agent-list/agent-list.component.ts
  3. 19
      src/app/admin/audit/audit-coupon/audit-coupon.component.html
  4. 11
      src/app/admin/audit/audit-coupon/audit-coupon.component.ts
  5. 4
      src/app/admin/promotion/promotion-order-list/promotion-order-list.component.ts
  6. 11
      src/app/admin/recharge-order/order-list/order-list.component.html
  7. 1
      src/app/admin/recharge-order/order-list/order-list.component.ts
  8. 4
      src/app/pipes/audit-type.pipe.ts
  9. 15
      src/app/services/audit.service.ts
  10. 12
      src/app/services/coupon.service.ts

@ -201,7 +201,7 @@
</nz-modal> </nz-modal>
<nz-modal [(nzVisible)]="isVisibleDistribute" nzTitle="分发卡券" (nzOnCancel)="handleCancelDistribute()" [nzOkLoading]="isOkLoading" (nzOnOk)="handleOkDistribute()"> <nz-modal [(nzVisible)]="isVisibleDistribute" nzTitle="分发卡券" (nzOnCancel)="handleCancelDistribute()" [nzOkLoading]="isOkLoading" (nzOnOk)="addApprove()">
<nz-spin [nzSpinning]="isSpinningDistribute"> <nz-spin [nzSpinning]="isSpinningDistribute">
<form nz-form [formGroup]="validateFormDistribute" class="login-form"> <form nz-form [formGroup]="validateFormDistribute" class="login-form">
<nz-form-item> <nz-form-item>

@ -8,7 +8,8 @@ import {CommonsService} from '../../../services/commons.service';
import {AgentService} from '../../../services/agent.service'; import {AgentService} from '../../../services/agent.service';
import {DiscountService} from '../../../services/discount.service'; import {DiscountService} from '../../../services/discount.service';
import {CouponService} from '../../../services/coupon.service'; import {CouponService} from '../../../services/coupon.service';
import {ClipboardService} from "ngx-clipboard"; import {ClipboardService} from 'ngx-clipboard';
import {AuditService} from '../../../services/audit.service';
@Component({ @Component({
selector: 'app-agent-list', selector: 'app-agent-list',
@ -24,6 +25,7 @@ export class AgentListComponent implements OnInit {
validateFormDistribute: FormGroup; // 搜索框 validateFormDistribute: FormGroup; // 搜索框
requestData = []; // 列表数据 requestData = []; // 列表数据
discountList = []; // 列表数据 discountList = []; // 列表数据
couponList = []; // 列表数据
distributeList = []; // 列表数据 distributeList = []; // 列表数据
total: number; // 页码 total: number; // 页码
pageNum = 1; // 页码 pageNum = 1; // 页码
@ -53,6 +55,7 @@ export class AgentListComponent implements OnInit {
constructor( constructor(
private form: FormBuilder, private form: FormBuilder,
private agent: AgentService, private agent: AgentService,
private audit: AuditService,
private discount: DiscountService, private discount: DiscountService,
private coupon: CouponService, private coupon: CouponService,
private iconService: IconService, private iconService: IconService,
@ -84,6 +87,14 @@ export class AgentListComponent implements OnInit {
stockCount: [null, [Validators.required]], stockCount: [null, [Validators.required]],
}); });
this.getRequest(true, this.searchForm.value); this.getRequest(true, this.searchForm.value);
this.coupon.getCouponListByAll({} , data => {
if (data['return_code'] === '000000') {
this.couponList = data['return_data'];
} else {
this.message.error(data['return_msg']);
}
});
} }
// 查询列表 // 查询列表
@ -226,6 +237,42 @@ export class AgentListComponent implements OnInit {
}); });
} }
// 提交分发审批
public addApprove(): void {
// tslint:disable-next-line:forin
for (const i in this.validateFormDistribute.controls) {
this.validateFormDistribute.controls[i].markAsDirty();
this.validateFormDistribute.controls[i].updateValueAndValidity();
if (this.validateFormDistribute.controls[i].errors != null) {
this.message.error('必填项不能为空');
return;
}
}
this.isOkLoading = true;
this.validateFormDistribute.value['agentName'] = this.requestData.find(data => data.id = this.agentId).agentName;
this.validateFormDistribute.value['couponName'] = this.couponList.find(data => data.id = this.validateFormDistribute.value['couponId']).couponName;
this.validateFormDistribute.value['agentId'] = this.agentId;
const whereObject = {
objectType: 3,
approveObject: this.validateFormDistribute.value,
};
this.audit.addApprove(whereObject , data => {
if (data['return_code'] === '000000') {
this.validateFormDistribute.reset();
this.message.success('提交成功');
this.isVisibleDistribute = false;
} else {
this.message.error(data['return_msg']);
}
this.isOkLoading = false;
});
}
// 分发卡券 // 分发卡券
public getDistribution(id: number): void { public getDistribution(id: number): void {
this.isSpinningDistribute = true; this.isSpinningDistribute = true;

@ -84,7 +84,7 @@
<td>{{data.createTime | date: 'yyyy-MM-dd HH:mm'}}</td> <td>{{data.createTime | date: 'yyyy-MM-dd HH:mm'}}</td>
<td>{{data.status | auditStatus}}</td> <td>{{data.status | auditStatus}}</td>
<td nzRight="0px" class="table-td-operation"> <td nzRight="0px" class="table-td-operation">
<a (click)="getDetail(data.id)"><i nz-icon [nzIconfont]="'icon-xiangqing'" nz-tooltip="审核详情"></i></a> <a (click)="getDetail(data.id , data.objectType)"><i nz-icon [nzIconfont]="'icon-xiangqing'" nz-tooltip="审核详情"></i></a>
<nz-divider *ngIf="data['status'] === 1" nzType="vertical"></nz-divider> <nz-divider *ngIf="data['status'] === 1" nzType="vertical"></nz-divider>
<a (click)="approveProcessed(3 , data.id)" *ngIf="data['status'] === 1"><i nz-icon nzType="check-circle" nzTheme="outline" nz-tooltip="通过"></i></a> <a (click)="approveProcessed(3 , data.id)" *ngIf="data['status'] === 1"><i nz-icon nzType="check-circle" nzTheme="outline" nz-tooltip="通过"></i></a>
<nz-divider *ngIf="data['status'] === 1" nzType="vertical"></nz-divider> <nz-divider *ngIf="data['status'] === 1" nzType="vertical"></nz-divider>
@ -95,7 +95,22 @@
</div> </div>
<nz-modal [(nzVisible)]="isVisible" nzWidth="900" nzTitle="审核详情" (nzOnCancel)="handleCancel()"> <nz-modal [(nzVisible)]="isVisible" nzWidth="900" nzTitle="审核详情" (nzOnCancel)="handleCancel()">
<ng-container> <ng-container *ngIf="objectType === 3">
<nz-descriptions nzTitle="审核基础内容" nzBordered>
<nz-descriptions-item nzTitle="审核类型" >{{data['approve']['objectType'] | auditType}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="审核状态">{{data['approve']['status'] | auditStatus}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="申请人员">{{data['approve']['submitOperatorName']}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="审核名称">{{data['approve']['objectName']}}</nz-descriptions-item>
</nz-descriptions>
<nz-descriptions style="margin-top: 20px;" nzTitle="审核对象详情" nzBordered>
<nz-descriptions-item nzTitle="分发代理商">{{approveObject['agentName']}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="分发卡券">{{approveObject['couponName']}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="分发数量">{{approveObject['stockCount']}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="类型类型">{{approveObject['type'] == 1 ? '销售码' : '兑换码'}}</nz-descriptions-item>
</nz-descriptions>
</ng-container>
<ng-container *ngIf="objectType !== 3">
<nz-descriptions nzTitle="审核基础内容" nzBordered> <nz-descriptions nzTitle="审核基础内容" nzBordered>
<nz-descriptions-item nzTitle="审核类型" >{{data['approve']['objectType'] | auditType}}</nz-descriptions-item> <nz-descriptions-item nzTitle="审核类型" >{{data['approve']['objectType'] | auditType}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="审核状态">{{data['approve']['status'] | auditStatus}}</nz-descriptions-item> <nz-descriptions-item nzTitle="审核状态">{{data['approve']['status'] | auditStatus}}</nz-descriptions-item>

@ -21,11 +21,12 @@ export class AuditCouponComponent implements OnInit {
loading = true; loading = true;
isVisible = false; isVisible = false;
id: number; id: number;
objectType;
data = { data = {
approve: {}, approve: {},
object: {} object: {}
}; };
approveObject: any;
constructor( constructor(
private form: FormBuilder, private form: FormBuilder,
private audit: AuditService, private audit: AuditService,
@ -76,16 +77,22 @@ export class AuditCouponComponent implements OnInit {
} }
// 查看详情 // 查看详情
public getDetail(id: number): void { public getDetail(id: number , objectType: number): void {
this.id = id; this.id = id;
this.objectType = objectType;
this.audit.getApproveDetail(id, data => { this.audit.getApproveDetail(id, data => {
if (data['return_code'] === '000000') { if (data['return_code'] === '000000') {
this.data = data['return_data']; this.data = data['return_data'];
if (objectType === 3) {
console.log();
this.approveObject = JSON.parse(data['return_data']['approve'].approveObject);
}
this.isVisible = true; this.isVisible = true;
} else { } else {
this.message.error(data['return_msg']); this.message.error(data['return_msg']);
} }
}); });
} }
handleCancel(): void { handleCancel(): void {

@ -4,8 +4,6 @@ import {FormBuilder, FormGroup} from '_@angular_forms@9.0.7@@angular/forms';
import {DistributionService} from '../../../services/distribution.service'; import {DistributionService} from '../../../services/distribution.service';
import {IconService} from '../../../services/icon.service'; import {IconService} from '../../../services/icon.service';
import {NzMessageService} from '_ng-zorro-antd@9.3.0@ng-zorro-antd'; import {NzMessageService} from '_ng-zorro-antd@9.3.0@ng-zorro-antd';
import {Router} from '_@angular_router@9.0.7@@angular/router';
import {CommonsService} from '../../../services/commons.service';
@Component({ @Component({
selector: 'app-promotion-order-list', selector: 'app-promotion-order-list',
@ -32,8 +30,6 @@ export class PromotionOrderListComponent implements OnInit {
private distribution: DistributionService, private distribution: DistributionService,
private iconService: IconService, private iconService: IconService,
private message: NzMessageService, private message: NzMessageService,
private router: Router,
private common: CommonsService
) { ) {
} }

@ -83,6 +83,17 @@
</nz-form-control> </nz-form-control>
</nz-form-item> </nz-form-item>
</div> </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="whetherTimeOut" nzPlaceHolder="请选择是否查询">
<nz-option nzLabel="查询超时" [nzValue]="true"></nz-option>
<nz-option nzLabel="不查询" [nzValue]="false"></nz-option>
</nz-select>
</nz-form-control>
</nz-form-item>
</div>
<div nz-col nzSpan="8"> <div nz-col nzSpan="8">
<nz-form-item> <nz-form-item>

@ -97,6 +97,7 @@ export class OrderListComponent implements OnInit, OnDestroy {
companyId: [null], // 充值状态 companyId: [null], // 充值状态
orderNo: [null], // 订单号 orderNo: [null], // 订单号
operatorType: [null], // 运营商类型 operatorType: [null], // 运营商类型
whetherTimeOut: [false], // 是否查询超时
laborUnionCard: [null], // 工会卡号 laborUnionCard: [null], // 工会卡号
rechargeContent: [null], // 充值内容 rechargeContent: [null], // 充值内容
userPhone: [null], // 用户电话 userPhone: [null], // 用户电话

@ -9,6 +9,10 @@ export class AuditTypePipe implements PipeTransform {
switch (value) { switch (value) {
case 1: case 1:
return '卡券上架审批'; return '卡券上架审批';
case 2:
return '卡卷价格审批';
case 3:
return '卡券分发审批';
} }
} }
} }

@ -40,7 +40,7 @@ export class AuditService {
/** /**
* 退 * 退
* *
* @param id * @param id id
* @param callBack * @param callBack
*/ */
public getRefundReject(id: number, callBack) { public getRefundReject(id: number, callBack) {
@ -75,4 +75,17 @@ export class AuditService {
}); });
} }
/**
*
*
* @param params
* @param callBack
* @return data
*/
public addApprove(params: object, callBack) {
this.http.post(environment.baseUrl + 'audit/addApprove', params).subscribe(data => {
callBack(data);
});
}
} }

@ -24,6 +24,18 @@ export class CouponService {
}); });
} }
/**
*
*
* @param paramsObject
* @param callBack
*/
public getCouponListByAll(paramsObject: object, callBack) {
this.http.get(environment.baseUrl + 'coupon/getCouponListByAll?' + this.common.getWhereCondition(paramsObject)).subscribe(data => {
callBack(data);
});
}
/** /**
* *
* *

Loading…
Cancel
Save