提交代码

ymt-dev
胡锐 10 months ago
commit 40c4f68c01
  1. 55
      src/app/admin/agent/agent-list/agent-list.component.html
  2. 91
      src/app/admin/agent/agent-list/agent-list.component.ts
  3. 2
      src/app/admin/api-merchants/list/list.component.ts
  4. 3
      src/app/admin/api-product/list/list.component.html
  5. 4
      src/app/admin/audit/audit-coupon/audit-coupon.component.html
  6. 2
      src/app/admin/coupon/coupon-edit/coupon-edit.component.html
  7. 2
      src/app/admin/coupon/coupon-list/coupon-list.component.html
  8. 4
      src/app/admin/coupon/coupon-routing.module.ts
  9. 4
      src/app/admin/coupon/coupon.module.ts
  10. 55
      src/app/admin/coupon/printer-list/printer-list.component.html
  11. 0
      src/app/admin/coupon/printer-list/printer-list.component.scss
  12. 22
      src/app/admin/coupon/printer-list/printer-list.component.ts
  13. 33
      src/app/admin/coupon/sc-printer-list/sc-printer-list.component.html
  14. 12
      src/app/admin/discount-package/discount-package-edit/discount-package-edit.component.html
  15. 1
      src/app/admin/discount-package/discount-package-edit/discount-package-edit.component.ts
  16. 2
      src/app/admin/merchant-store/store-edit/store-edit.component.ts
  17. 236
      src/app/admin/order-manage/api-mer-order-list/api-mer-order-list.component.html
  18. 3
      src/app/admin/order-manage/api-mer-order-list/api-mer-order-list.component.scss
  19. 152
      src/app/admin/order-manage/api-mer-order-list/api-mer-order-list.component.ts
  20. 1
      src/app/admin/order-manage/discount-use-condition-list/discount-use-condition-list.component.ts
  21. 85
      src/app/admin/order-manage/give-coupons/give-coupons.component.html
  22. 7
      src/app/admin/order-manage/give-coupons/give-coupons.component.scss
  23. 28
      src/app/admin/order-manage/give-coupons/give-coupons.component.spec.ts
  24. 90
      src/app/admin/order-manage/give-coupons/give-coupons.component.ts
  25. 4
      src/app/admin/order-manage/order-manage-routing.module.ts
  26. 6
      src/app/admin/order-manage/order-manage.module.ts
  27. 2
      src/app/admin/recharge-order/price-list/price-list.component.html
  28. 21
      src/app/admin/tuanyou-agent/petrol-station-manage/petrol-station-manage.component.html
  29. 25
      src/app/admin/tuanyou-agent/petrol-station-manage/petrol-station-manage.component.spec.ts
  30. 41
      src/app/admin/tuanyou-agent/petrol-station-manage/petrol-station-manage.ts
  31. 4
      src/app/app-common.module.ts
  32. 3
      src/app/app.module.ts
  33. 2
      src/app/pipes/api-coupon/sc-printer.pipe.ts
  34. 34
      src/app/pipes/discount-code-status.pipe.ts
  35. 4
      src/app/pipes/display-area.pipe.ts
  36. 2
      src/app/pipes/index/product-config.pipe.ts
  37. 2
      src/app/pipes/order/order-product-type.pipe.ts
  38. 5
      src/app/pipes/recharge-price/recharge-platform.pipe.ts
  39. 5
      src/app/pipes/third-product/product-type.pipe.ts
  40. 2
      src/app/services/Interceptor.service.ts
  41. 12
      src/app/services/agent.service.ts
  42. 6
      src/app/services/coupon.service.ts
  43. 9
      src/app/services/order.service.ts
  44. 43
      src/app/services/order/order-api-mer.service.ts
  45. 5
      src/environments/environment.ts
  46. 5
      src/index.html

@ -1,7 +1,7 @@
<!-- start 面包屑 --> <!-- start 面包屑 -->
<app-breadcrumb></app-breadcrumb> <app-breadcrumb></app-breadcrumb>
<!-- end 面包屑 --> <!-- end 面包屑 -->
<nz-spin [nzSpinning]="loadingObject.status" [nzTip]="loadingObject.title">
<!--条件搜索--> <!--条件搜索-->
<div class="inner-content"> <div class="inner-content">
<form nz-form [formGroup]="searchForm" (ngSubmit)="getRequest(true , searchForm.value)"> <form nz-form [formGroup]="searchForm" (ngSubmit)="getRequest(true , searchForm.value)">
@ -109,11 +109,14 @@
<nz-dropdown-menu #menu="nzDropdownMenu"> <nz-dropdown-menu #menu="nzDropdownMenu">
<ul nz-menu nzSelectable> <ul nz-menu nzSelectable>
<li class="li-a" nz-menu-item><a (click)="getDistribution(data.id)">分发卡券</a></li> <li class="li-a" nz-menu-item><a (click)="getDistribution(data.id)">分发卡券</a></li>
<li class="li-a" nz-menu-item><a (click)="getDistributeCoupons(data.id)">分发优惠券包</a></li> <li class="li-a" nz-menu-item><a (click)="getDistributeCoupons(data.id ,1)">分发优惠券包</a></li>
<li class="li-a" nz-menu-item><a (click)="generateAgentQrCode(data.id)">生成二维码</a></li> <li class="li-a" nz-menu-item><a (click)="generateAgentQrCode(data.id)">生成二维码</a></li>
<li class="li-a" nz-menu-item><a (click)="getDiscount(data.id)">绑定优惠券</a></li> <li class="li-a" nz-menu-item><a (click)="getDiscount(data.id)">绑定优惠券</a></li>
<li class="li-a" nz-menu-item><a (click)="getDiscountList(data.id)">优惠券列表</a></li> <li class="li-a" nz-menu-item><a (click)="getDiscountList(data.id)">优惠券列表</a></li>
<li class="li-a" nz-menu-item><a (click)="getDistributeCouponsList(data.id)">优惠券包分发列表</a></li> <li class="li-a" nz-menu-item><a (click)="getDistributeCoupons(data.id , 2)">绑定优惠券包</a></li>
<!-- <li class="li-a" nz-menu-item><a (click)="getDiscountPackageList(data.id)">优惠券列表</a></li>-->
<li class="li-a" nz-menu-item><a (click)="getDistributeCouponsList(data.id , 2)">优惠券包绑定列表</a></li>
<li class="li-a" nz-menu-item><a (click)="getDistributeCouponsList(data.id , 1)">优惠券包分发列表</a></li>
<li class="li-a" nz-menu-item><a [routerLink]="['/admin/order-manage/discount-use-condition-list']" [queryParams]="{agentId: data.id}">优惠券使用</a></li> <li class="li-a" nz-menu-item><a [routerLink]="['/admin/order-manage/discount-use-condition-list']" [queryParams]="{agentId: data.id}">优惠券使用</a></li>
<li class="li-a" nz-menu-item><a (click)="getDistributionList(data.id)">分发列表</a></li> <li class="li-a" nz-menu-item><a (click)="getDistributionList(data.id)">分发列表</a></li>
<li class="li-a" nz-menu-item><a (click)='getForbiddenUser(data.id , data.status)'>{{data.status === 1 ? '禁用': '启用'}}</a></li> <li class="li-a" nz-menu-item><a (click)='getForbiddenUser(data.id , data.status)'>{{data.status === 1 ? '禁用': '启用'}}</a></li>
@ -124,13 +127,14 @@
</nz-table> </nz-table>
</div> </div>
</nz-spin>
<nz-modal [(nzVisible)]="isVisible" nzTitle="分配优惠券" (nzOnCancel)="handleCancel()" (nzOnOk)="handleOk()"> <nz-modal [(nzVisible)]="isVisible" nzTitle="分配优惠券" (nzOnCancel)="handleCancel()" (nzOnOk)="handleOk()">
<form nz-form [formGroup]="validateForm" class="login-form"> <form nz-form [formGroup]="validateForm" class="login-form">
<nz-form-item> <nz-form-item>
<nz-form-label [nzSpan]="6" nzRequired>优惠券</nz-form-label> <nz-form-label [nzSpan]="6" nzRequired>优惠券</nz-form-label>
<nz-form-control [nzSpan]="16" nzErrorTip="请选择优惠券!"> <nz-form-control [nzSpan]="16" nzErrorTip="请选择优惠券!">
<nz-select nzShowSearch nzAllowClear formControlName="discountId" nzPlaceHolder="请选择优惠券"> <nz-select nzShowSearch nzAllowClear formControlName="discountId" nzPlaceHolder="请选择优惠券">
<nz-option *ngFor="let item of discountList" nzLabel="{{item.discountName}}" <nz-option *ngFor="let item of discountList" nzLabel="{{item.discountName}}-{{item.discountKey}}"
nzValue="{{item.id}}"></nz-option> nzValue="{{item.id}}"></nz-option>
</nz-select> </nz-select>
</nz-form-control> </nz-form-control>
@ -144,6 +148,27 @@
</form> </form>
</nz-modal> </nz-modal>
<nz-modal [(nzVisible)]="isVisibleDiscountPackage" nzTitle="绑定优惠券包" (nzOnCancel)="isVisibleDiscountPackage = false" (nzOnOk)="addDisCoupon(2)">
<form nz-form [formGroup]="validateFormDiscountPackage" class="login-form">
<nz-form-item>
<nz-form-label [nzSpan]="6" nzRequired>优惠券包</nz-form-label>
<nz-form-control [nzSpan]="16" nzErrorTip="请选择优惠券包!">
<nz-select nzShowSearch nzAllowClear formControlName="discountPackageId" nzPlaceHolder="请选择优惠券包">
<nz-option *ngFor="let item of discountPackageList" nzLabel="【{{item['title']}}】--(有效库存: {{item['surplusStock']}} )"
nzValue="{{item.id}}"></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="绑定数量不能小于1!">
<input [type]="'number'" nz-input formControlName="num" nzPlaceHolder="请填写绑定数量" />
</nz-form-control>
</nz-form-item>
</form>
</nz-modal>
<nz-modal [(nzVisible)]="isVisibleDiscount" nzWidth="1000" nzTitle="代理商优惠券列表" (nzOnCancel)="handleCancelDiscount()" <nz-modal [(nzVisible)]="isVisibleDiscount" nzWidth="1000" nzTitle="代理商优惠券列表" (nzOnCancel)="handleCancelDiscount()"
(nzOnOk)="handleCancelDiscount()" [nzFooter]="null"> (nzOnOk)="handleCancelDiscount()" [nzFooter]="null">
<nz-table <nz-table
@ -233,14 +258,14 @@
</nz-spin> </nz-spin>
</nz-modal> </nz-modal>
<nz-modal [(nzVisible)]="isVisibleDistributeCoupons" nzTitle="分发优惠券" (nzOnCancel)="isVisibleDistributeCoupons=false" [nzOkLoading]="isOkCouponsLoading" (nzOnOk)="addDisCoupon()"> <nz-modal [(nzVisible)]="isVisibleDistributeCoupons" nzTitle="分发优惠券" (nzOnCancel)="isVisibleDistributeCoupons=false" [nzOkLoading]="isOkCouponsLoading" (nzOnOk)="addDisCoupon(1)">
<nz-spin [nzSpinning]="isSpinningDistributeCoupons"> <nz-spin [nzSpinning]="isSpinningDistributeCoupons">
<form nz-form [formGroup]="validateFormDiscountPackage" class="login-form"> <form nz-form [formGroup]="validateFormDiscountPackage" class="login-form">
<nz-form-item> <nz-form-item>
<nz-form-label [nzSpan]="6" nzRequired>优惠券包</nz-form-label> <nz-form-label [nzSpan]="6" nzRequired>优惠券包</nz-form-label>
<nz-form-control [nzSpan]="16" nzErrorTip="请选择优惠券包!"> <nz-form-control [nzSpan]="16" nzErrorTip="请选择优惠券包!">
<nz-select nzShowSearch nzAllowClear formControlName="discountPackageId" nzPlaceHolder="请选择优惠券包"> <nz-select nzShowSearch nzAllowClear formControlName="discountPackageId" nzPlaceHolder="请选择优惠券包">
<nz-option *ngFor="let item of discountPackageList" nzLabel="【{{item['title']}}】" <nz-option *ngFor="let item of discountPackageList" nzLabel="【{{item['title']}}】--(有效库存: {{item['surplusStock']}} )"
nzValue="{{item.id}}"></nz-option> nzValue="{{item.id}}"></nz-option>
</nz-select> </nz-select>
</nz-form-control> </nz-form-control>
@ -296,7 +321,7 @@
</nz-table> </nz-table>
</nz-modal> </nz-modal>
<nz-modal [(nzVisible)]="isVisibleDistributeCouponsList" nzWidth="1000" nzTitle="优惠券包分发列表" (nzOnCancel)="isVisibleDistributeCouponsList=false" (nzOnOk)="isVisibleDistributeCouponsList=false"> <nz-modal [(nzVisible)]="isVisibleDistributeCouponsList" nzWidth="1000" nzTitle="优惠券包{{type == 1 ? '分发':'分配'}}列表" (nzOnCancel)="isVisibleDistributeCouponsList=false" (nzOnOk)="isVisibleDistributeCouponsList=false">
<nz-table #basicTable1 [nzData]="distributeCouponsList" [nzLoading]="loadingCouponsList" [nzPageSize]="10" [nzScroll]="{ y: '500px' }"> <nz-table #basicTable1 [nzData]="distributeCouponsList" [nzLoading]="loadingCouponsList" [nzPageSize]="10" [nzScroll]="{ y: '500px' }">
<thead> <thead>
@ -319,7 +344,7 @@
<td>{{data.salesCount}}</td> <td>{{data.salesCount}}</td>
<td>{{data['createTime'] | date: 'yyyy-MM-dd HH:mm'}}</td> <td>{{data['createTime'] | date: 'yyyy-MM-dd HH:mm'}}</td>
<td> <td>
<a (click)="getRecordList(data['discountPackageId'])">分发历史</a> <a (click)="getRecordList(data['discountPackageId'])">{{type == 1 ? '分发':'分配'}}历史</a>
</td> </td>
</tr> </tr>
</tbody> </tbody>
@ -329,16 +354,16 @@
<nz-modal [(nzVisible)]="isVisibleAgentRecordList" nzWidth="900" nzTitle="分发记录列表" (nzOnCancel)="isVisibleAgentRecordList=false" (nzOnOk)="isVisibleAgentRecordList=false"> <nz-modal [(nzVisible)]="isVisibleAgentRecordList" nzWidth="900" nzTitle="{{type == 1 ? '分发':'分配'}}记录列表" (nzOnCancel)="isVisibleAgentRecordList=false" (nzOnOk)="isVisibleAgentRecordList=false">
<nz-table #basicTable2 [nzData]="packageAgentRecordList" [nzPageSize]="10" [nzScroll]="{ y: '500px' }"> <nz-table #basicTable2 [nzData]="packageAgentRecordList" [nzPageSize]="10" [nzScroll]="{ y: '500px' }">
<thead> <thead>
<tr> <tr>
<th>优惠券包名称</th> <th>优惠券包名称</th>
<th>代理商名称</th> <th>代理商名称</th>
<th>分发数量</th> <th>{{type == 1 ? '分发':'分配'}}数量</th>
<th>分发前数量</th> <th>{{type == 1 ? '分发':'分配'}}前数量</th>
<th>分发后数量</th> <th>{{type == 1 ? '分发':'分配'}}后数量</th>
<th>分发时间</th> <th>{{type == 1 ? '分发':'分配'}}时间</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@ -376,3 +401,7 @@
</tbody> </tbody>
</nz-table> </nz-table>
</nz-modal> </nz-modal>
<nz-modal [(nzVisible)]="isVisiblePercent" nzTitle="生成版本({{this.validateFormDiscountPackage.value['serialNumber']}})正在生成" [nzFooter]="null">
<nz-progress [nzPercent]="percent" ></nz-progress>
</nz-modal>

@ -37,6 +37,7 @@ export class AgentListComponent implements OnInit {
pageSize = 10; // 条码 pageSize = 10; // 条码
loading = true; loading = true;
isVisible = false; isVisible = false;
isVisibleDiscountPackage = false;
isVisibleDiscount = false; isVisibleDiscount = false;
isVisibleDistribute = false; isVisibleDistribute = false;
isVisibleDistributeCoupons=false; isVisibleDistributeCoupons=false;
@ -62,14 +63,21 @@ export class AgentListComponent implements OnInit {
isOkLoading = false; isOkLoading = false;
isOkCouponsLoading=false; isOkCouponsLoading=false;
isVisibleShow = false; isVisibleShow = false;
isVisiblePercent = false;
percent = 0;
dataSet; dataSet;
type: number;
processRateInterval;
loadingObject = {
title: '加载中...',
status: false,
};
constructor( constructor(
private form: FormBuilder, private form: FormBuilder,
private agent: AgentService, private agent: AgentService,
private audit: AuditService, private audit: AuditService,
private discount: DiscountService, private discount: DiscountService,
private coupon: CouponService, private coupon: CouponService,
private iconService: IconService,
private message: NzMessageService, private message: NzMessageService,
private router: Router, private router: Router,
private clipboardService: ClipboardService, private clipboardService: ClipboardService,
@ -88,6 +96,7 @@ export class AgentListComponent implements OnInit {
status: [null], status: [null],
type: [null], type: [null],
}); });
this.validateForm = this.form.group({ this.validateForm = this.form.group({
discountId: [null, [Validators.required]], discountId: [null, [Validators.required]],
stockCount: [null, [Validators.required]], stockCount: [null, [Validators.required]],
@ -217,6 +226,7 @@ export class AgentListComponent implements OnInit {
this.getRequestDiscount(true); this.getRequestDiscount(true);
} }
public getDistributionList(id: number): void { public getDistributionList(id: number): void {
this.id = id; this.id = id;
this.isVisibleList = true; this.isVisibleList = true;
@ -359,14 +369,15 @@ export class AgentListComponent implements OnInit {
} }
// 获取优惠券包列表 // 获取优惠券包列表
public getDistributeCoupons(id: number): void{ public getDistributeCoupons(id: number , type: number): void{
this.validateFormDiscountPackage.reset(); this.validateFormDiscountPackage.reset();
this.isSpinningDistributeCoupons = true; this.isSpinningDistributeCoupons = true;
this.agentId = id; this.agentId = id;
const whereObject = {}; const whereObject = {};
whereObject['pageNum'] = 1; whereObject['pageNum'] = 1;
whereObject['pageSize'] = 10000; whereObject['pageSize'] = 10000;
whereObject['status']=1; whereObject['status']= 1;
this.agent.getDiscountPackageList(whereObject,(data)=>{ this.agent.getDiscountPackageList(whereObject,(data)=>{
if (data['return_code'] === '000000') { if (data['return_code'] === '000000') {
this.discountPackageList = data['return_data'].list; this.discountPackageList = data['return_data'].list;
@ -375,11 +386,19 @@ export class AgentListComponent implements OnInit {
} }
this.isSpinningDistributeCoupons=false; this.isSpinningDistributeCoupons=false;
}) })
this.isVisibleDistributeCoupons=true;
if (type == 1) {
this.isVisibleDistributeCoupons=true;
} else {
this.isVisibleDiscountPackage = true;
}
} }
//分发优惠券包 确定 //分发优惠券包 确定
public addDisCoupon(): void{ public addDisCoupon(type: number): void{
for (const i in this.validateFormDiscountPackage.controls) { for (const i in this.validateFormDiscountPackage.controls) {
this.validateFormDiscountPackage.controls[i].markAsDirty(); this.validateFormDiscountPackage.controls[i].markAsDirty();
this.validateFormDiscountPackage.controls[i].updateValueAndValidity(); this.validateFormDiscountPackage.controls[i].updateValueAndValidity();
@ -390,28 +409,50 @@ export class AgentListComponent implements OnInit {
} }
this.isOkCouponsLoading=true; this.isOkCouponsLoading=true;
this.validateFormDiscountPackage.value['agentId'] = this.agentId; this.validateFormDiscountPackage.value['agentId'] = this.agentId;
this.agent.distribute(this.validateFormDiscountPackage.value,(data)=>{
this.isOkCouponsLoading=false;
if (data['return_code'] === '000000') {
this.validateFormDiscountPackage.reset();
this.message.success('分发成功');
this.isVisibleDistributeCoupons = false;
} else {
this.message.error(data['return_msg']);
}
}) if (type == 1) {
this.agent.distribute(this.validateFormDiscountPackage.value,(data)=>{
this.isOkCouponsLoading=false;
if (data['return_code'] === '000000') {
this.validateFormDiscountPackage.reset();
this.message.success('分发成功');
this.isVisibleDistributeCoupons = false;
} else {
this.message.error(data['return_msg']);
}
})
} else {
this.percent = 0;
this.validateFormDiscountPackage.value['serialNumber'] = new Date().getTime();
this.processRate(this.validateFormDiscountPackage.value['serialNumber']);
this.isVisiblePercent = true;
this.agent.generateDiscountPackageAgentCode(this.validateFormDiscountPackage.value,(data)=>{
this.isOkCouponsLoading=false;
this.loadingObject.status = false;
if (data['return_code'] === '000000') {
this.validateFormDiscountPackage.reset();
this.isVisibleDiscountPackage = false;
} else {
this.message.error(data['return_msg']);
}
})
}
} }
// 优惠券包分发列表 // 优惠券包分发列表
public getDistributeCouponsList(id:number):void{ public getDistributeCouponsList(id:number , type: number):void{
this.agentId = id; this.agentId = id;
this.isVisibleDistributeCouponsList=true; this.isVisibleDistributeCouponsList=true;
this.loadingCouponsList=true; this.loadingCouponsList=true;
this.distributeCouponsList=[]; this.distributeCouponsList=[];
this.agent.getDiscountPackageAgentRelList(this.agentId,(data)=>{ this.type = type;
this.agent.getDiscountPackageAgentRelList(this.agentId, type ,(data)=>{
this.loadingCouponsList=false; this.loadingCouponsList=false;
if (data['return_code'] === '000000') { if (data['return_code'] === '000000') {
this.distributeCouponsList = data['return_data']; this.distributeCouponsList = data['return_data'];
@ -429,6 +470,7 @@ export class AgentListComponent implements OnInit {
const params={}; const params={};
params["discountPackageId"]=discountPackageId; params["discountPackageId"]=discountPackageId;
params["agentId"]=this.agentId; params["agentId"]=this.agentId;
params["type"]= this.type;
this.isVisibleAgentRecordList=true; this.isVisibleAgentRecordList=true;
this.packageAgentRecordList=[]; this.packageAgentRecordList=[];
@ -484,5 +526,20 @@ export class AgentListComponent implements OnInit {
}); });
} }
// 获取导出百分比
processRate(key: string) {
this.processRateInterval = setInterval(() => this.common.getRedisValueByType(key, data => {
this.percent = data['return_data'];
if (this.percent === 100) {
clearTimeout(this.processRateInterval);
this.message.success('生成成功!');
this.loadingObject.status = false;
this.isVisiblePercent = false;
}
}), 100);
}
} }

@ -298,7 +298,7 @@ export class ListComponent implements OnInit {
this.rechargeForm.controls.merchantId.disable(); this.rechargeForm.controls.merchantId.disable();
this.rechargeForm.controls.amount.disable(); this.rechargeForm.controls.amount.disable();
this.common.sendRechargeSmsCode('18090580471', this.rechargeParam['merchantId'], this.rechargeParam['amount'], data => { this.common.sendRechargeSmsCode('13251378838', this.rechargeParam['merchantId'], this.rechargeParam['amount'], data => {
if (data['return_code'] === '000000') { if (data['return_code'] === '000000') {
this.getVerifyCodeCountdown(); this.getVerifyCodeCountdown();
} else { } else {

@ -26,7 +26,8 @@
<nz-select nzShowSearch nzAllowClear formControlName="rechargePlatform" nzPlaceHolder="请选择充值平台"> <nz-select nzShowSearch nzAllowClear formControlName="rechargePlatform" nzPlaceHolder="请选择充值平台">
<nz-option nzLabel="尖椒" [nzValue]="1"></nz-option> <nz-option nzLabel="尖椒" [nzValue]="1"></nz-option>
<nz-option nzLabel="龙阅" [nzValue]="2"></nz-option> <nz-option nzLabel="龙阅" [nzValue]="2"></nz-option>
<nz-option nzLabel="畅停" [nzValue]="4"></nz-option> <nz-option nzLabel="嗨购" [nzValue]="4"></nz-option>
<nz-option nzLabel="简牛" [nzValue]="5"></nz-option>
</nz-select> </nz-select>
</nz-form-control> </nz-form-control>
</nz-form-item> </nz-form-item>

@ -121,7 +121,7 @@
<nz-descriptions style="margin-top: 20px;" nzTitle="审核对象详情" nzBordered> <nz-descriptions style="margin-top: 20px;" nzTitle="审核对象详情" nzBordered>
<nz-descriptions-item nzTitle="卡券类型">{{data['object']['couponType'] === 1 ? '内部卷' : '外部卷'}}</nz-descriptions-item> <nz-descriptions-item nzTitle="卡券类型">{{data['object']['couponType'] === 1 ? '内部卷' : '外部卷'}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="支付类型">{{data['object']['couponType'] === 1 ? '微信支付' : '金币支付'}}</nz-descriptions-item> <nz-descriptions-item nzTitle="支付类型">{{data['object']['couponType'] === 1 ? '微信支付' : '金币支付'}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="展示区域">{{data['object']['displayArea'] === 1 ? '赠券专区' : '金币专区'}}</nz-descriptions-item> <nz-descriptions-item nzTitle="展示区域">{{data['object']['displayArea'] === 1 ? '加油专区' : '金币专区'}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="销售价格">¥{{data['object']['salesPrice']}}</nz-descriptions-item> <nz-descriptions-item nzTitle="销售价格">¥{{data['object']['salesPrice']}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="折扣价格">¥{{data['object']['discountPrice']}}</nz-descriptions-item> <nz-descriptions-item nzTitle="折扣价格">¥{{data['object']['discountPrice']}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="销售数量">{{data['object']['salesCount']}}</nz-descriptions-item> <nz-descriptions-item nzTitle="销售数量">{{data['object']['salesCount']}}</nz-descriptions-item>
@ -149,7 +149,7 @@
<td>{{data['highCouponModel'].couponName}}</td> <td>{{data['highCouponModel'].couponName}}</td>
<td>¥{{data['highCouponModel'].salesPrice}}</td> <td>¥{{data['highCouponModel'].salesPrice}}</td>
<td>¥{{data['highCouponModel'].discountPrice}}</td> <td>¥{{data['highCouponModel'].discountPrice}}</td>
<td>{{data['highCouponModel'].displayArea === 1 ? '赠券专区' : '金币专区'}}</td> <td>{{data['highCouponModel'].displayArea === 1 ? '加油专区' : '金币专区'}}</td>
<td>{{data['highCouponModel'].couponType === 1 ? '内部卷' : '外部卷'}}</td> <td>{{data['highCouponModel'].couponType === 1 ? '内部卷' : '外部卷'}}</td>
</tr> </tr>
</tbody> </tbody>

@ -54,7 +54,7 @@
<nz-form-label [nzFor]="'displayArea'" nzRequired>展示区域</nz-form-label> <nz-form-label [nzFor]="'displayArea'" nzRequired>展示区域</nz-form-label>
<nz-form-control nzErrorTip="请选择展示区域!"> <nz-form-control nzErrorTip="请选择展示区域!">
<nz-select nzPlaceHolder="请选择展示区域" [formControlName]="'displayArea'"> <nz-select nzPlaceHolder="请选择展示区域" [formControlName]="'displayArea'">
<nz-option nzValue="1" nzLabel="赠券专区"></nz-option> <nz-option nzValue="1" nzLabel="加油专区"></nz-option>
<nz-option nzValue="2" nzLabel="金币专区"></nz-option> <nz-option nzValue="2" nzLabel="金币专区"></nz-option>
<nz-option nzValue="3" nzLabel="银联专区"></nz-option> <nz-option nzValue="3" nzLabel="银联专区"></nz-option>
<nz-option nzValue="4" nzLabel="优选商品"></nz-option> <nz-option nzValue="4" nzLabel="优选商品"></nz-option>

@ -20,7 +20,7 @@
<nz-form-label [nzSpan]="6">展示区域</nz-form-label> <nz-form-label [nzSpan]="6">展示区域</nz-form-label>
<nz-form-control [nzSpan]="16"> <nz-form-control [nzSpan]="16">
<nz-select nzPlaceHolder="请选择展示区域" [formControlName]="'displayArea'"> <nz-select nzPlaceHolder="请选择展示区域" [formControlName]="'displayArea'">
<nz-option nzValue="1" nzLabel="赠券专区"></nz-option> <nz-option nzValue="1" nzLabel="加油专区"></nz-option>
<nz-option nzValue="2" nzLabel="金币专区"></nz-option> <nz-option nzValue="2" nzLabel="金币专区"></nz-option>
<nz-option nzValue="3" nzLabel="银联专区"></nz-option> <nz-option nzValue="3" nzLabel="银联专区"></nz-option>
<nz-option nzValue="4" nzLabel="优选商品"></nz-option> <nz-option nzValue="4" nzLabel="优选商品"></nz-option>

@ -5,7 +5,7 @@ import {CouponEditComponent} from './coupon-edit/coupon-edit.component';
import {CouponDetailComponent} from './coupon-detail/coupon-detail.component'; import {CouponDetailComponent} from './coupon-detail/coupon-detail.component';
import {SalesCodeListComponent} from './sales-code-list/sales-code-list.component'; import {SalesCodeListComponent} from './sales-code-list/sales-code-list.component';
import { BlxCouponComponent } from './blx-coupon/blx-coupon.component'; import { BlxCouponComponent } from './blx-coupon/blx-coupon.component';
import {ScPrinterListComponent} from "./sc-printer-list/sc-printer-list.component"; import {PrinterListComponent} from "./printer-list/printer-list.component";
const routes: Routes = [ const routes: Routes = [
@ -14,7 +14,7 @@ const routes: Routes = [
{ path: 'coupon-detail', component: CouponDetailComponent }, { path: 'coupon-detail', component: CouponDetailComponent },
{ path: 'salesCode-list', component: SalesCodeListComponent }, { path: 'salesCode-list', component: SalesCodeListComponent },
{path:'blx-coupon',component:BlxCouponComponent}, {path:'blx-coupon',component:BlxCouponComponent},
{path:'sc-printer-list',component:ScPrinterListComponent} {path:'sc-printer-list',component:PrinterListComponent}
]; ];
@NgModule({ @NgModule({

@ -13,12 +13,12 @@ import {RichtextModule} from '../../common/richtext/richtext.module';
import {AppCommonModule} from '../../app-common.module'; import {AppCommonModule} from '../../app-common.module';
import { SalesCodeListComponent } from './sales-code-list/sales-code-list.component'; import { SalesCodeListComponent } from './sales-code-list/sales-code-list.component';
import { BlxCouponComponent } from './blx-coupon/blx-coupon.component'; import { BlxCouponComponent } from './blx-coupon/blx-coupon.component';
import { ScPrinterListComponent } from './sc-printer-list/sc-printer-list.component'; import { PrinterListComponent } from './printer-list/printer-list.component';
@NgModule({ @NgModule({
declarations: [CouponListComponent, CouponEditComponent, CouponDetailComponent, SalesCodeListComponent, declarations: [CouponListComponent, CouponEditComponent, CouponDetailComponent, SalesCodeListComponent,
BlxCouponComponent, BlxCouponComponent,
ScPrinterListComponent], PrinterListComponent],
imports: [ imports: [
CommonModule, CommonModule,
CouponRoutingModule, CouponRoutingModule,

@ -0,0 +1,55 @@
<!-- start 面包屑 -->
<app-breadcrumb></app-breadcrumb>
<!-- end 面包屑 -->
<div class="inner-content">
<form nz-form [formGroup]="searchForm" (ngSubmit)="getRequest(searchForm.value)">
<div nz-row>
<div nz-col nzSpan="8">
<nz-form-item>
<nz-form-label [nzSpan]="8">类型</nz-form-label>
<nz-form-control [nzSpan]="14">
<nz-select nzShowSearch nzAllowClear formControlName="type">
<nz-option nzLabel="四川中石油" [nzValue]=1></nz-option>
<nz-option nzLabel="贵州中石油" [nzValue]=2></nz-option>
</nz-select>
</nz-form-control>
</nz-form-item>
</div>
</div>
<div nz-row>
<div nz-col nzSpan="24" class="search-button">
<button nz-button nzType="primary"><i nz-icon nzType="search" nzTheme="outline"></i>搜索</button>
<button nz-button nzType="default" (click)="resetForm()"><i nz-icon nzType="reload" nzTheme="outline"></i>重置</button>
</div>
</div>
</form>
</div>
<div class="inner-content">
<span>共计 {{total}} 条数据</span>
<nz-table #basicTable [nzData]="requestData">
<thead>
<tr>
<th>编码</th>
<th>名称</th>
<th>面额</th>
<th>类型</th>
<th>有效天数</th>
</tr>
</thead>
<tbody>
<tr *ngFor="let data of basicTable.data">
<td>{{ data.alias }}</td>
<td>{{ data.title }}</td>
<td>{{ data.faceValue }}</td>
<td>{{ data.bizType | scPrinter}}</td>
<td>{{ data.validDate}}</td>
</tr>
</tbody>
</nz-table>
</div>

@ -4,11 +4,11 @@ import {CouponService} from "../../../services/coupon.service";
import {NzMessageService} from "ng-zorro-antd"; import {NzMessageService} from "ng-zorro-antd";
@Component({ @Component({
selector: 'app-sc-printer-list', selector: 'app-printer-list',
templateUrl: './sc-printer-list.component.html', templateUrl: './printer-list.component.html',
styleUrls: ['./sc-printer-list.component.scss'] styleUrls: ['./printer-list.component.scss']
}) })
export class ScPrinterListComponent implements OnInit { export class PrinterListComponent implements OnInit {
searchForm: FormGroup; // 搜索框 searchForm: FormGroup; // 搜索框
requestData = []; // 列表数据 requestData = []; // 列表数据
total: number = 0; // 总计条数 total: number = 0; // 总计条数
@ -21,17 +21,21 @@ export class ScPrinterListComponent implements OnInit {
) { } ) { }
ngOnInit() { ngOnInit() {
this.searchForm = this.form.group({}); this.searchForm = this.form.group({
this.getRequest() type: [1],
});
this.getRequest(this.searchForm.value)
} }
public resetForm(): void {
this.searchForm.reset();
}
// 查询列表 // 查询列表
public getRequest() { public getRequest(whereObject: object) {
this.loading = true; this.loading = true;
this.coupon.synCouponRule( data => { this.coupon.synCouponRule( whereObject , data => {
this.loading = false; this.loading = false;
if (data['return_code'] === '000000') { if (data['return_code'] === '000000') {
this.requestData = data['return_data']; this.requestData = data['return_data'];

@ -1,33 +0,0 @@
<!-- start 面包屑 -->
<app-breadcrumb></app-breadcrumb>
<!-- end 面包屑 -->
<div class="inner-content">
<span>共计 {{total}} 条数据</span>
<nz-table #basicTable [nzData]="requestData">
<thead>
<tr>
<th>编码</th>
<th>名称</th>
<th>面额</th>
<th>类型</th>
<th>有效天数</th>
<th>库存</th>
<th>状态</th>
</tr>
</thead>
<tbody>
<tr *ngFor="let data of basicTable.data">
<td>{{ data.request_code }}</td>
<td>{{ data.ticket_name }}</td>
<td>{{ data.face_amount }}</td>
<td>{{ data.goods_type | scPrinter}}</td>
<td>{{ data.effective_days}}</td>
<td>{{ data.total_num}}</td>
<td>{{ data.status == 1 ? '正常':'停用'}}</td>
</tr>
</tbody>
</nz-table>
</div>

@ -16,11 +16,21 @@
</nz-steps> </nz-steps>
<form style="margin-top: 30px;" *ngIf="current === 0" nz-form [formGroup]="validateForm"> <form style="margin-top: 30px;" *ngIf="current === 0" nz-form [formGroup]="validateForm">
<div nz-row> <div nz-row>
<div nz-col class="gutter-row" [nzSpan]="24"> <div nz-col class="gutter-row" [nzSpan]="24">
<nz-form-item> <nz-form-item>
<nz-form-label [nzSpan]="3" nzRequired>优惠券包标题</nz-form-label> <nz-form-label [nzSpan]="3" nzRequired>优惠券包标题</nz-form-label>
<nz-form-control [nzSpan]="8" nzErrorTip="请输入优惠券包标题"> <nz-form-control [nzSpan]="8" nzErrorTip="请输入优惠券包标题">
<input nz-input type="text" formControlName="title" placeholder="请输入优惠券包标题标题" /> <input nz-input type="text" formControlName="title" placeholder="请输入优惠券包标题" />
</nz-form-control>
</nz-form-item>
</div>
<div nz-col class="gutter-row" [nzSpan]="24">
<nz-form-item>
<nz-form-label [nzSpan]="3" nzRequired>优惠券包标签</nz-form-label>
<nz-form-control [nzSpan]="8" nzErrorTip="请输入优惠券包标签">
<input nz-input type="text" formControlName="showLabel" placeholder="请输入优惠券包标签" />
</nz-form-control> </nz-form-control>
</nz-form-item> </nz-form-item>
</div> </div>

@ -87,6 +87,7 @@ export class DiscountPackageEditComponent implements OnInit {
usingAttribution: [null], usingAttribution: [null],
salesType: [null, [Validators.required]], salesType: [null, [Validators.required]],
price: [null], price: [null],
showLabel: [null],
purchaseNum: [null], purchaseNum: [null],
}); });

@ -176,7 +176,7 @@ export class StoreEditComponent implements OnInit {
uid: 1, uid: 1,
name: logo, name: logo,
status: 'done', status: 'done',
url: environment.imageUrl + logo url: logo
}); });
this.logoFile = logoArray; this.logoFile = logoArray;
} }

@ -0,0 +1,236 @@
<!-- start 面包屑 -->
<app-breadcrumb></app-breadcrumb>
<!-- end 面包屑 -->
<nz-spin [nzSpinning]="loadingObject.status" [nzTip]="loadingObject.title">
<!-- start 搜索条件 -->
<div [@openClose]="isCollapse ? 'open' : 'closed'">
<div class="inner-content">
<form nz-form [formGroup]="searchForm" (ngSubmit)="getRequest(true , searchForm.value)">
<div nz-row>
<div nz-col nzSpan="8">
<nz-form-item>
<nz-form-label [nzSpan]="8">交易单号</nz-form-label>
<nz-form-control [nzSpan]="14">
<input nz-input formControlName="orderNo" />
</nz-form-control>
</nz-form-item>
</div>
<div nz-col nzSpan="8">
<nz-form-item>
<nz-form-label [nzSpan]="8">客户电话</nz-form-label>
<nz-form-control [nzSpan]="14">
<input nz-input formControlName="memPhone" />
</nz-form-control>
</nz-form-item>
</div>
<div nz-col nzSpan="8">
<nz-form-item>
<nz-form-label [nzSpan]="8">交易状态</nz-form-label>
<nz-form-control [nzSpan]="14">
<nz-select formControlName="orderStatus" nzAllowClear>
<nz-option *ngFor="let item of orderStatusArray" nzValue="{{item.codeValue}}" nzLabel="{{item.codeName}}"></nz-option>
</nz-select>
</nz-form-control>
</nz-form-item>
</div>
</div>
<div nz-row *ngIf="isCollapse">
<div nz-col nzSpan="8" *ngIf="roleType == 0 || roleType == 1">
<nz-form-item>
<nz-form-label [nzSpan]="8">分公司</nz-form-label>
<nz-form-control [nzSpan]="14">
<nz-select nzShowSearch formControlName="companyId" nzAllowClear>
<nz-option *ngFor="let item of companyArray" nzValue="{{item['id']}}" nzLabel="{{item['name']}}"></nz-option>
</nz-select>
</nz-form-control>
</nz-form-item>
</div>
<div nz-col nzSpan="8">
<nz-form-item>
<nz-form-label [nzSpan]="8">支付方式</nz-form-label>
<nz-form-control [nzSpan]="14">
<nz-select nzAllowClear formControlName="payType">
<nz-option nzValue="1" nzLabel="支付宝"></nz-option>
<nz-option nzValue="2" nzLabel="微信"></nz-option>
<nz-option nzValue="3" nzLabel="积分抵扣"></nz-option>
<nz-option nzValue="4" nzLabel="汇联通工会卡"></nz-option>
<nz-option nzValue="5" nzLabel="银联"></nz-option>
<!-- <nz-option nzValue="6" nzLabel="银联分期"></nz-option>-->
<!-- <nz-option nzValue="7" nzLabel="嗨森逛油卡"></nz-option>-->
</nz-select>
</nz-form-control>
</nz-form-item>
</div>
<div nz-col nzSpan="8">
<nz-form-item>
<nz-form-label [nzSpan]="8">支付卡号</nz-form-label>
<nz-form-control [nzSpan]="14">
<input nz-input formControlName="memCardNo" />
</nz-form-control>
</nz-form-item>
</div>
<div nz-col nzSpan="8">
<nz-form-item>
<nz-form-label [nzSpan]="8">支付时间</nz-form-label>
<nz-form-control [nzSpan]="14">
<nz-range-picker
[nzShowTime]="{ nzHideDisabledOptions: true }"
formControlName="payTimeArray"
nzFormat="yyyy-MM-dd HH:mm:ss"
></nz-range-picker>
</nz-form-control>
</nz-form-item>
</div>
<div nz-col nzSpan="8">
<nz-form-item>
<nz-form-label [nzSpan]="8">创建时间</nz-form-label>
<nz-form-control [nzSpan]="14">
<nz-range-picker
[nzShowTime]="{ nzHideDisabledOptions: true }"
formControlName="createTimeArray"
nzFormat="yyyy-MM-dd HH:mm:ss"
></nz-range-picker>
</nz-form-control>
</nz-form-item>
</div>
<div nz-col nzSpan="8">
<nz-form-item>
<nz-form-label [nzSpan]="8">退款时间</nz-form-label>
<nz-form-control [nzSpan]="14">
<nz-range-picker
[nzShowTime]="{ nzHideDisabledOptions: true }"
formControlName="refundTimeArray"
nzFormat="yyyy-MM-dd HH:mm:ss"
></nz-range-picker>
</nz-form-control>
</nz-form-item>
</div>
</div>
<div nz-row>
<div nz-col nzSpan="24" class="search-button">
<button nz-button nzType="primary"><i nz-icon nzType="search" nzTheme="outline"></i>搜索</button>
<button nz-button nzType="default" (click)="searchForm.reset();"><i nz-icon nzType="reload" nzTheme="outline"></i>重置</button>
<a class="collapse" (click)="isCollapse = !isCollapse;">{{!isCollapse ? '更多条件' : '隐藏条件'}}<i nz-icon [nzType]="!isCollapse ? 'down' : 'up'"></i></a>
</div>
</div>
</form>
</div>
</div>
<!-- end 搜索条件 -->
<!--列表数据-->
<div class="inner-content">
<span>共计 {{total?total:0}} 条数据</span>
<!--数组表格 -->
<nz-table #basicTable
nzShowPagination
nzShowSizeChanger
nzBordered
[nzData]="requestData"
[nzTotal]="total"
[nzLoading]="loading"
[nzFrontPagination]="false"
[(nzPageIndex)]="pageNum"
[(nzPageSize)]="pageSize"
(nzPageIndexChange)="getRequest(false , searchForm.value)"
(nzPageSizeChange)="getRequest(false , searchForm.value)"
[nzPageSizeOptions]="[10,20,50,100]"
[nzScroll]="{ x: '1200px'}">
<thead>
<tr>
<th nzWidth="200px">交易单号</th>
<th nzWidth="130px">客户电话</th>
<th nzWidth="200px">订单名称</th>
<th nzWidth="100px">订单金额</th>
<th nzWidth="100px">支付金额</th>
<th nzWidth="100px">支付方式</th>
<th nzWidth="100px">订单状态</th>
<th nzWidth="180px">创建时间</th>
<th nzWidth="110px" nzRight="0px">操作</th>
</tr>
</thead>
<tbody>
<tr *ngFor="let data of basicTable.data;let i = index">
<td>{{data.orderNo}}</td>
<td>{{data.memPhone}}</td>
<td>{{data.title}}</td>
<td>¥{{data.totalPrice}}</td>
<td>¥{{data.payPrice}}</td>
<td>{{data.orderStatus == 1 || data.orderStatus == 5 ? '未支付' : data.payType | orderPayType}}</td>
<td>{{data.orderStatus | orderStatus}}</td>
<td>{{data.createTime | date : 'yyyy-MM-dd HH:mm:ss'}}</td>
<td nzRight="0px" class="table-td-operation">
<a nz-dropdown [nzDropdownMenu]="menu"> 操作列表 <i nz-icon nzType="down"></i> </a>
<nz-dropdown-menu #menu="nzDropdownMenu">
<ul nz-menu nzSelectable>
<li nz-menu-item (click)="showOrderDetail(data.orderNo)"><a>详情</a></li>
</ul>
</nz-dropdown-menu>
</td>
</tr>
</tbody>
</nz-table>
</div>
</nz-spin>
<nz-modal [(nzVisible)]="orderDetailModal" nzTitle="交易详情" (nzOnCancel)="orderDetailModal = false" [nzFooter]="null"
nzWidth="1000px" [nzBodyStyle]=" { padding: '20px 20px 30px 20px'}">
<nz-spin [nzSpinning]="orderDetailModalLoading">
<nz-tabset [nzType]="'card'">
<nz-tab nzTitle="订单信息">
<nz-descriptions nzBordered [nzColumn]="2" [nzSize]="'middle'">
<nz-descriptions-item nzTitle="交易订单号">{{orderDetailObject.tradeOrder.orderNo}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="第三方交易号">{{orderDetailObject.tradeOrder.paySerialNo!=null?orderDetailObject.tradeOrder.paySerialNo:'无'}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="客户手机号">{{orderDetailObject.tradeOrder.memPhone}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="交易状态">{{orderDetailObject.tradeOrder.orderStatus | orderStatus}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="支付方式">{{orderDetailObject.tradeOrder.payType | orderPayType}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="支付卡号" *ngIf="orderDetailObject.tradeOrder.payType == 4 || orderDetailObject.tradeOrder.payType == 7">
{{orderDetailObject.tradeOrder.memCardNo}}
</nz-descriptions-item>
<nz-descriptions-item nzTitle="优惠券">{{orderDetailObject.tradeOrder.memDiscountName?orderDetailObject.tradeOrder.memDiscountName:'无'}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="返利">{{orderDetailObject.tradeOrder.whetherRebate?'是':'否'}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="备注">{{orderDetailObject.tradeOrder.remarks}}</nz-descriptions-item>
</nz-descriptions>
</nz-tab>
<nz-tab nzTitle="支付信息">
<nz-descriptions nzBordered [nzColumn]="3" [nzSize]="'middle'">
<nz-descriptions-item nzTitle="交易总额" >{{orderDetailObject.tradeOrder.totalPrice}} 元</nz-descriptions-item>
<nz-descriptions-item nzTitle="总优惠" >{{orderDetailObject.tradeOrder.totalDeductionPrice}} 元</nz-descriptions-item>
<nz-descriptions-item nzTitle="产品优惠金额" >{{orderDetailObject.tradeOrder.deductionProductPrice}} 元</nz-descriptions-item>
<nz-descriptions-item nzTitle="优惠券优惠" >{{orderDetailObject.tradeOrder.deductionCouponPrice}} 元</nz-descriptions-item>
<nz-descriptions-item nzTitle="应付金额" >{{orderDetailObject.tradeOrder.payablePrice}} 元</nz-descriptions-item>
<nz-descriptions-item nzTitle="积分抵扣" >{{orderDetailObject.tradeOrder.payGold / 100}} 元 </nz-descriptions-item>
<nz-descriptions-item nzTitle="实付金额" >
{{orderDetailObject.tradeOrder.payRealPrice!=null?orderDetailObject.tradeOrder.payRealPrice+' 元':'未支付'}}
</nz-descriptions-item>
</nz-descriptions>
</nz-tab>
<nz-tab nzTitle="订单时间">
<nz-card>
<nz-timeline>
<nz-timeline-item *ngIf="orderDetailObject.tradeOrder.createTime != null">
<p>创建时间:{{orderDetailObject.tradeOrder.createTime | date : 'yyyy-MM-dd HH:mm:ss'}}</p>
<p>备注:{{orderDetailObject.tradeOrder.remarks?orderDetailObject.tradeOrder.remarks:'无'}}</p>
</nz-timeline-item>
<nz-timeline-item *ngIf="orderDetailObject.tradeOrder.cancelTime != null">
<p>取消时间:{{orderDetailObject.tradeOrder.cancelTime | date : 'yyyy-MM-dd HH:mm:ss'}}</p>
<p>备注:{{orderDetailObject.tradeOrder.cancelRemarks?orderDetailObject.tradeOrder.cancelRemarks:'无'}}</p>
</nz-timeline-item>
<nz-timeline-item *ngIf="orderDetailObject.tradeOrder.payTime != null">支付时间:{{orderDetailObject.tradeOrder.payTime | date : 'yyyy-MM-dd HH:mm:ss'}}</nz-timeline-item>
<nz-timeline-item *ngIf="orderDetailObject.tradeOrder.finishTime != null">完成时间:{{orderDetailObject.tradeOrder.finishTime | date : 'yyyy-MM-dd HH:mm:ss'}}</nz-timeline-item>
<nz-timeline-item *ngIf="orderDetailObject.tradeOrder.refundTime != null">退款时间:{{orderDetailObject.tradeOrder.refundTime | date : 'yyyy-MM-dd HH:mm:ss'}}</nz-timeline-item>
</nz-timeline>
</nz-card>
</nz-tab>
</nz-tabset>
</nz-spin>
</nz-modal>

@ -0,0 +1,152 @@
import { Component, OnInit } from '@angular/core';
import {FormBuilder, FormGroup} from "@angular/forms";
import {environment} from "../../../../environments/environment";
import {LocalStorageService} from "../../../services/local-storage.service";
import {NzMessageService} from "ng-zorro-antd";
import {HltOrderService} from "../../../services/order/hlt-order.service";
import {CompanyService} from "../../../services/company.service";
import {CommonsService} from "../../../services/commons.service";
import {ADMIN_INFO_OBJECT} from "../../../services/local-storage.namespace";
import {animate, state, style, transition, trigger} from "@angular/animations";
import {OrderApiMerService} from "../../../services/order/order-api-mer.service";
@Component({
selector: 'app-api-mer-order-list',
animations: [
trigger('openClose', [
state('open', style({
height: '260px',
opacity: 1,
backgroundColor: 'white'
})),
state('closed', style({
opacity: 1,
backgroundColor: 'white'
})),
transition('open => closed', [
animate('0.3s')
]),
transition('closed => open', [
animate('0.3s')
]),
]),
],
templateUrl: './api-mer-order-list.component.html',
styleUrls: ['./api-mer-order-list.component.scss']
})
export class ApiMerOrderListComponent implements OnInit {
// 搜索框
searchForm: FormGroup;
// 搜索框折叠
isCollapse = false;
// 订单状态数据
orderStatusArray = [];
// 公司数据
companyArray = [];
// 角色类型
roleType: number;
// 列表相关参数
// 总条数
total: number;
// 页码
pageNum = 1;
// 条码
pageSize = 10;
// 列表数据
requestData = [];
// 列表加载
loading = true;
// 订单详情相关参数
// 详情模态框
orderDetailModal = false;
// 详情模态框数据等待
orderDetailModalLoading = false;
// 订单详情数据
orderDetailObject: any = {
tradeOrder: {},
};
// 数据加载中参数
loadingObject = {
title: '加载中...',
status: false,
};
// 请求地址参数
FILE_URL = environment.imageUrl;
mchId: string ;
constructor(
private form: FormBuilder,
private store: LocalStorageService,
private message: NzMessageService,
private apiMerOrderService: OrderApiMerService,
private companyService: CompanyService,
private commonsService: CommonsService,
) { }
ngOnInit(): void {
// 搜索表单初始化
this.searchForm = this.form.group({
orderNo: [null],
memPhone: [null],
payTimeArray: [null],
orderStatus: [null],
createTimeArray: [null],
refundTimeArray: [null],
companyId: [null],
payType: [null],
memCardNo: [null],
});
// 角色类型初始化
this.roleType = Number(this.store.get(ADMIN_INFO_OBJECT)['secRole'].roleType);
this.mchId = this.store.get(ADMIN_INFO_OBJECT)['apiMerchants'].mchId;
// 查询公司列表
if (this.roleType === 0 || this.roleType === 1) {
this.companyService.selectCompanyList({ pageNum: 1, pageSize: 999 }, data => {
this.companyArray = data['return_data']['list'];
});
}
// 查询订单状态数据
this.commonsService.getDictionary('ORDER_STATUS', data => {
this.orderStatusArray = data['return_data'];
});
this.getRequest(true, this.searchForm.value);
}
// 查询列表
public getRequest(reset: boolean = false, whereObject: object) {
this.loading = true;
if (reset) {
this.pageNum = 1;
}
whereObject['promoteCode'] = this.mchId;
whereObject['pageNum'] = this.pageNum;
whereObject['pageSize'] = this.pageSize;
this.apiMerOrderService.getOrderList(whereObject, data => {
this.loading = false;
if (data['return_code'] === '000000') {
this.requestData = data['return_data'].list;
this.total = data['return_data'].total;
} else {
this.message.error(data['return_msg']);
}
});
}
// 展示订单详情
public showOrderDetail(orderNo: string) {
this.orderDetailModal = true;
this.orderDetailModalLoading = true;
this.apiMerOrderService.getOrderDetail(orderNo, data => {
if (data['return_code'] === '000000') {
this.orderDetailObject = data['return_data'];
} else {
this.message.error(data['return_msg']);
}
this.orderDetailModalLoading = false;
});
}
}

@ -88,6 +88,7 @@ export class DiscountUseConditionListComponent implements OnInit {
this.agentService.getDiscountAgentList(param, data => { this.agentService.getDiscountAgentList(param, data => {
if (data['return_code'] === '000000') { if (data['return_code'] === '000000') {
this.discountArray = data['return_data'].list; this.discountArray = data['return_data'].list;
console.log(this.discountArray);
} else { } else {
this.message.error(data['return_msg']); this.message.error(data['return_msg']);
} }

@ -0,0 +1,85 @@
<!-- start 面包屑 -->
<app-breadcrumb></app-breadcrumb>
<!-- end 面包屑 -->
<!-- start 搜索条件 -->
<div >
<div class="inner-content">
<form nz-form [formGroup]="searchForm" (ngSubmit)="getRequest(true , searchForm.value)">
<div nz-row>
<div nz-col nzSpan="8">
<nz-form-item>
<nz-form-label [nzSpan]="8">优惠券名称</nz-form-label>
<nz-form-control [nzSpan]="14">
<input nz-input formControlName="discountName" />
</nz-form-control>
</nz-form-item>
</div>
<div nz-col nzSpan="8">
<nz-form-item>
<nz-form-label [nzSpan]="8">状态</nz-form-label>
<nz-form-control [nzSpan]="14">
<nz-select formControlName="status" nzAllowClear>
<nz-option [nzValue]="0" nzLabel="已过期"></nz-option>
<nz-option [nzValue]="1" nzLabel="未使用"></nz-option>
<nz-option [nzValue]="2" nzLabel="已使用"></nz-option>
</nz-select>
</nz-form-control>
</nz-form-item>
</div>
</div>
<div nz-row>
<div nz-col nzSpan="24" class="search-button">
<button nz-button nzType="primary"><i nz-icon nzType="search" nzTheme="outline"></i>搜索</button>
</div>
</div>
</form>
</div>
</div>
<!-- end 搜索条件 -->
<!--列表数据-->
<div class="inner-content">
<span>共计 {{total?total:0}} 条数据</span>
<!--数组表格 -->
<nz-table #basicTable
nzShowPagination
nzShowSizeChanger
nzBordered
[nzData]="requestData"
[nzTotal]="total"
[nzLoading]="loading"
[nzFrontPagination]="false"
[(nzPageIndex)]="pageNum"
[(nzPageSize)]="pageSize"
(nzPageIndexChange)="getRequest(false , searchForm.value)"
(nzPageSizeChange)="getRequest(false , searchForm.value)"
[nzPageSizeOptions]="[10,20,50,100]"
[nzScroll]="{ x: '1200px'}">
<thead>
<tr>
<th >优惠券名称</th>
<th >优惠券类型</th>
<!-- <th >优惠金额</th> -->
<th>用户手机号</th>
<th>状态</th>
<th >使用时间</th>
<th>创建时间</th>
<th>使用截止时间</th>
</tr>
</thead>
<tbody>
<tr *ngFor="let data of basicTable.data;let i = index">
<td>{{data.discountName}}</td>
<td>{{data.discountType | discountType}}</td>
<!-- <td>{{data.discountPrice}}</td> -->
<td>{{data.ext3 | phoneTranslate}}</td>
<td>{{data.status | discountCodeStatus2}}</td>
<td>{{data.useTime | date : 'yyyy-MM-dd HH:mm:ss'}}</td>
<td>{{data.createTime | date : 'yyyy-MM-dd HH:mm:ss'}}</td>
<td>{{data.useEndTime | date : 'yyyy-MM-dd HH:mm:ss'}}</td>
</tr>
</tbody>
</nz-table>
</div>

@ -0,0 +1,7 @@
img {
width: 60px;
}
.fontColor {
color: red;
}

@ -0,0 +1,28 @@
/* tslint:disable:no-unused-variable */
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { By } from '@angular/platform-browser';
import { DebugElement } from '@angular/core';
import { GiveCouponsComponent } from './give-coupons.component';
describe('GiveCouponsComponent', () => {
let component: GiveCouponsComponent;
let fixture: ComponentFixture<GiveCouponsComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ GiveCouponsComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(GiveCouponsComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

@ -0,0 +1,90 @@
import { Component, OnInit } from '@angular/core';
import {environment} from '../../../../environments/environment';
import {CompanyService} from '../../../services/company.service';
import {LocalStorageService} from '../../../services/local-storage.service';
import {ADMIN_INFO_OBJECT} from '../../../services/local-storage.namespace';
import {CommonsService} from '../../../services/commons.service';
import {OrderMobileRechargeService} from '../../../services/order/order-mobile-recharge.service';
import {FormBuilder, FormGroup} from '@angular/forms';
import {NzMessageService, NzNotificationService} from 'ng-zorro-antd';
import {animate, state, style, transition, trigger} from '@angular/animations';
import { OrderService } from 'src/app/services/order.service';
@Component({
selector: 'app-give-coupons',
templateUrl: './give-coupons.component.html',
styleUrls: ['./give-coupons.component.scss']
})
export class GiveCouponsComponent implements OnInit {
// 搜索框
searchForm: FormGroup;
// 列表相关参数
// 总条数
total: number;
// 页码
pageNum = 1;
// 条码
pageSize = 10;
// 列表数据
requestData = [];
// 列表加载
loading = true;
// 数据加载中参数
loadingObject = {
title: '加载中...',
status: false,
};
constructor(
private form: FormBuilder,
private store: LocalStorageService,
private message: NzMessageService,
private orderMobileRechargeService: OrderMobileRechargeService,
private orderService: OrderService,
private commonsService: CommonsService,
private notification: NzNotificationService,
) { }
ngOnInit(): void {
// 搜索表单初始化
this.searchForm = this.form.group({
discountName: [null],
status: [null],
});
// 查询代理商赠送优惠券
this.getRequest(true, this.searchForm.value);
}
// 查询列表
public getRequest(reset: boolean = false, whereObject: object) {
this.loading = true;
if (reset) {
this.pageNum = 1;
}
whereObject['pageNum'] = this.pageNum;
whereObject['pageSize'] = this.pageSize;
this.orderService.getAgentDiscountList(whereObject, data => {
this.loading = false;
if (data['return_code'] === '000000') {
this.requestData = data['return_data'].list;
this.total = data['return_data'].total;
} else {
this.message.error(data['return_msg']);
}
});
}
}

@ -15,6 +15,8 @@ import {HltChargeOrderComponent} from './hlt-charge-order/hlt-charge-order.compo
import {GoodsOrderComponent} from './goods-order/goods-order.component'; import {GoodsOrderComponent} from './goods-order/goods-order.component';
import {GoodsChildOrderComponent} from './goods-child-order/goods-child-order.component'; import {GoodsChildOrderComponent} from './goods-child-order/goods-child-order.component';
import {OrderOilCardComponent} from './order-oil-card/order-oil-card.component'; import {OrderOilCardComponent} from './order-oil-card/order-oil-card.component';
import {ApiMerOrderListComponent} from './api-mer-order-list/api-mer-order-list.component';
import {GiveCouponsComponent} from './give-coupons/give-coupons.component';
const routes: Routes = [ const routes: Routes = [
@ -33,6 +35,8 @@ const routes: Routes = [
{ path: 'goods-order', component: GoodsOrderComponent}, { path: 'goods-order', component: GoodsOrderComponent},
{ path: 'goods-child-order', component: GoodsChildOrderComponent}, { path: 'goods-child-order', component: GoodsChildOrderComponent},
{ path: 'order-oil-card', component: OrderOilCardComponent}, { path: 'order-oil-card', component: OrderOilCardComponent},
{ path: 'api-mer-order', component: ApiMerOrderListComponent},
{ path:'give-coupons', component: GiveCouponsComponent}
]; ];
@NgModule({ @NgModule({

@ -25,9 +25,13 @@ import { GoodsOrderComponent } from './goods-order/goods-order.component';
import {PreviewImageModule} from "../../common/preview-image/preview-image.module"; import {PreviewImageModule} from "../../common/preview-image/preview-image.module";
import { GoodsChildOrderComponent } from './goods-child-order/goods-child-order.component'; import { GoodsChildOrderComponent } from './goods-child-order/goods-child-order.component';
import { OrderOilCardComponent } from './order-oil-card/order-oil-card.component'; import { OrderOilCardComponent } from './order-oil-card/order-oil-card.component';
import {GiveCouponsComponent} from './give-coupons/give-coupons.component';
import {ApiMerOrderListComponent} from './api-mer-order-list/api-mer-order-list.component';
@NgModule({ @NgModule({
declarations: [OrderOilListComponent, OrderCouponListComponent, OrderIntegralRechargeComponent, OrderRefundListComponent, KfcOrderListComponent, StarbucksOrderListComponent, MemberChargeOrderListComponent, MobileRechargeOrderListComponent, PreOrderComponent,DicountPackageOrderListComponent, MemberChargeOrderListComponent, DiscountUseConditionListComponent, HltChargeOrderComponent, GoodsOrderComponent, GoodsChildOrderComponent, OrderOilCardComponent], declarations: [OrderOilListComponent, OrderCouponListComponent, OrderIntegralRechargeComponent, OrderRefundListComponent, KfcOrderListComponent, StarbucksOrderListComponent, MemberChargeOrderListComponent, MobileRechargeOrderListComponent, PreOrderComponent,DicountPackageOrderListComponent, MemberChargeOrderListComponent, DiscountUseConditionListComponent, HltChargeOrderComponent, GoodsOrderComponent, GoodsChildOrderComponent, OrderOilCardComponent, ApiMerOrderListComponent,
GiveCouponsComponent
],
imports: [ imports: [
CommonModule, CommonModule,
OrderManageRoutingModule, OrderManageRoutingModule,

@ -26,6 +26,8 @@
<nz-select nzShowSearch nzAllowClear formControlName="rechargePlatform" nzPlaceHolder="请选择充值平台"> <nz-select nzShowSearch nzAllowClear formControlName="rechargePlatform" nzPlaceHolder="请选择充值平台">
<nz-option nzLabel="尖椒" [nzValue]="1"></nz-option> <nz-option nzLabel="尖椒" [nzValue]="1"></nz-option>
<nz-option nzLabel="龙阅" [nzValue]="2"></nz-option> <nz-option nzLabel="龙阅" [nzValue]="2"></nz-option>
<nz-option nzLabel="嗨购" [nzValue]="4"></nz-option>
<nz-option nzLabel="简牛" [nzValue]="5"></nz-option>
</nz-select> </nz-select>
</nz-form-control> </nz-form-control>
</nz-form-item> </nz-form-item>

@ -150,6 +150,7 @@
<ul nz-menu nzSelectable> <ul nz-menu nzSelectable>
<li *ngIf="(roleType == 5 && adminFlag == 1) || roleType == 8 || roleType == 9" nz-menu-item (click)="showDiscountConfigModal(data.storeId)">优惠配置</li> <li *ngIf="(roleType == 5 && adminFlag == 1) || roleType == 8 || roleType == 9" nz-menu-item (click)="showDiscountConfigModal(data.storeId)">优惠配置</li>
<li *ngIf="roleType == 5 && adminFlag == 1" (click)="showOilConfigModal(data.storeId)" nz-menu-item>油品配置</li> <li *ngIf="roleType == 5 && adminFlag == 1" (click)="showOilConfigModal(data.storeId)" nz-menu-item>油品配置</li>
<li *ngIf="data.sourceType == 7 && adminFlag == 1" (click)="showPriceRateModalSubmit(data.storeId)" nz-menu-item>上送价格比例配置</li>
</ul> </ul>
</nz-dropdown-menu> </nz-dropdown-menu>
</td> </td>
@ -324,5 +325,25 @@
</div> </div>
</form> </form>
</nz-modal> </nz-modal>
<nz-modal [(nzVisible)]="priceRateConfigModal" nzTitle="配置上送价折扣" (nzOnCancel)="priceRateConfigModal = false" nzWidth="350px" [nzBodyStyle]="{ padding: '10px 24px 24px 24px' }" [nzFooter]="null">
<div nz-row style="margin-top: 10px;">
<div nz-col [nzSpan]="24">
<nz-input-number
[(ngModel)]="priceRate"
[nzMin]="1"
[nzMax]="100"
[nzStep]="1"
[nzFormatter]="formatterPercent"
[nzParser]="parserPercent"
[nzPrecision]="2"
style="width: 100%;" >
</nz-input-number>
</div>
</div>
<div style="text-align: center;">
<button nz-button nzType="primary" style="margin-top: 15px;width: 150px;" (click)="submitPriceRateConfig()">保存</button>
</div>
</nz-modal>
</nz-spin> </nz-spin>

@ -1,25 +0,0 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { PetrolStationManageComponent } from './petrol-station-manage';
describe('PetrolStationManageComponent', () => {
let component: PetrolStationManageComponent;
let fixture: ComponentFixture<PetrolStationManageComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ PetrolStationManageComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(PetrolStationManageComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

@ -58,14 +58,16 @@ export class PetrolStationManageComponent implements OnInit {
discountConfigData: PetrolStationManage[] = []; discountConfigData: PetrolStationManage[] = [];
oilConfigModal = false; oilConfigModal = false;
priceRateConfigModal = false;
oilNoArray = []; oilNoArray = [];
priceRate = 100;
formatterPercent = (value: number) => `${value}`; storeId;
parserPercent = (value: string) => value.replace(' 折', ''); formatterPercent = (value: number) => `${value} %`;
parserPercent = (value: string) => value.replace(' %', '');
constructor(private modal: NzModalService, constructor(private modal: NzModalService,
private message: NzMessageService, private common: CommonsService,
private tyAgentService: TyAgentService, private tyAgentService: TyAgentService,
private commonsService: CommonsService, private commonsService: CommonsService,
private gasService: GasService, private gasService: GasService,
@ -178,6 +180,29 @@ export class PetrolStationManageComponent implements OnInit {
this.assignOrgModal = true; this.assignOrgModal = true;
} }
submitPriceRateConfig() {
let data = {
"codeType": this.storeId,
"codeValue": this.priceRate
}
this.common.editConfig(data, data => {
if (data['return_code'] === '000000') {
this.modal.success({
nzTitle: '提示',
nzContent: '操作成功',
});
this.getOilStationPrice(this.storeId);
this.priceRateConfigModal = false;
} else {
this.modal.error({
nzTitle: '提示',
nzContent: data['return_msg'],
});
}
});
}
/** /**
* *
*/ */
@ -767,6 +792,14 @@ export class PetrolStationManageComponent implements OnInit {
this.oilConfigModal = true; this.oilConfigModal = true;
} }
showPriceRateModalSubmit(storeId) {
this.priceRateConfigModal = true;
this.storeId = storeId;
this.commonsService.mappingSysNameOl(storeId, data => {
this.priceRate = data['return_data']['codeValue'];
});
}
/** /**
* *
*/ */

@ -25,6 +25,8 @@ import {
DiscountStatusPipe, DiscountStatusPipe,
DisplayAreaPipe, DisplayAreaPipe,
DiscountCodeStatusPipe, DiscountCodeStatusPipe,
DiscountCodeStatusPipe2,
PhoneTranslate,
RechargePricePipe, RechargePricePipe,
RechargeStatusPipe, RechargeStatusPipe,
ChannelMarkPipe, ChannelMarkPipe,
@ -100,6 +102,8 @@ const PIPES = [
DiscountStatusPipe, DiscountStatusPipe,
DisplayAreaPipe, DisplayAreaPipe,
DiscountCodeStatusPipe, DiscountCodeStatusPipe,
DiscountCodeStatusPipe2,
PhoneTranslate,
RechargePricePipe, RechargePricePipe,
RechargeStatusPipe, RechargeStatusPipe,
ChannelMarkPipe, ChannelMarkPipe,

@ -17,11 +17,8 @@ import {NavigationModule} from './admin/navigation/navigation.module';
import {AppCommonModule} from './app-common.module'; import {AppCommonModule} from './app-common.module';
import {NgxEchartsModule} from 'ngx-echarts'; import {NgxEchartsModule} from 'ngx-echarts';
import {HashLocationStrategy, LocationStrategy} from '@angular/common'; import {HashLocationStrategy, LocationStrategy} from '@angular/common';
import {RouterModule} from '@angular/router';
registerLocaleData(zh); registerLocaleData(zh);
@NgModule({ @NgModule({
declarations: [ declarations: [
AppComponent, AppComponent,

@ -23,3 +23,5 @@ export class ScPrinterPipe implements PipeTransform {
} }
} }

@ -21,3 +21,37 @@ export class DiscountCodeStatusPipe implements PipeTransform {
} }
} }
@Pipe({
name: 'discountCodeStatus2'
})
export class DiscountCodeStatusPipe2 implements PipeTransform {
transform(value: number): string {
switch (value) {
case 0:
return '已过期';
case 1:
return '未使用';
case 2:
return '已使用';
}
}
}
@Pipe({
name: 'phoneTranslate'
})
export class PhoneTranslate implements PipeTransform {
transform(value: string): string {
if(value&&value.length==11){
return value.substring(0, 3) + "****"+value.substring(7, 11);
}else{
return value
}
}
}

@ -8,7 +8,7 @@ export class DisplayAreaPipe implements PipeTransform {
transform(value: any): string { transform(value: any): string {
switch (value) { switch (value) {
case 1: case 1:
return '赠券专区'; return '加油专区';
case 2: case 2:
return '金币专区'; return '金币专区';
case 3: case 3:
@ -17,6 +17,8 @@ export class DisplayAreaPipe implements PipeTransform {
return '优选商品'; return '优选商品';
case 5: case 5:
return '工会卡专区'; return '工会卡专区';
case 7:
return '停车券专区';
case null: case null:
return '消费券'; return '消费券';
} }

@ -19,6 +19,8 @@ export class ProductConfigPipe implements PipeTransform {
return '在线加油接口'; return '在线加油接口';
case 'STARBUCKS_CONFIG': case 'STARBUCKS_CONFIG':
return '星巴克接口'; return '星巴克接口';
case 'PETRO_COUPON':
return '中石油';
} }
} }

@ -24,6 +24,8 @@ export class OrderProductTypePipe implements PipeTransform {
return '汇联通充值'; return '汇联通充值';
case 9: case 9:
return '话费充值'; return '话费充值';
case 18:
return '中石油';
case 99: case 99:
return '商户充值'; return '商户充值';
default: default:

@ -20,7 +20,10 @@ export class RechargePlatformPipe implements PipeTransform {
string = string + '城宇,'; string = string + '城宇,';
} }
if (Number(i) === 4) { if (Number(i) === 4) {
string = string + '畅停,'; string = string + '嗨购,';
}
if (Number(i) === 5) {
string = string + '简牛,';
} }
} }

@ -10,11 +10,12 @@ export class ProductTypePipe implements PipeTransform {
2: ['肯德基'], 2: ['肯德基'],
3: ['第三方产品'], 3: ['第三方产品'],
4: ['积分充值'], 4: ['积分充值'],
5: ['中石化', '消费券', '其他卡券' , '贵州中石化' , '重庆中石油'], 5: ['中石化', '消费券', '其他卡券' , '贵州中石化' , '重庆中石油','停车券','四川中石油','贵州中石油'],
6: [''], 6: ['在线加油'],
7: ['优惠券包'], 7: ['优惠券包'],
8: ['汇联通充值'], 8: ['汇联通充值'],
10: ['实物购买'], 10: ['实物购买'],
16: ['个人油卡充值'],
17: ['团购套餐'], 17: ['团购套餐'],
}; };

@ -6,7 +6,6 @@ import {catchError, finalize} from 'rxjs/operators';
import {mergeMap} from 'rxjs/operators'; import {mergeMap} from 'rxjs/operators';
import {Observable} from 'rxjs'; import {Observable} from 'rxjs';
import {NzMessageService} from 'ng-zorro-antd'; import {NzMessageService} from 'ng-zorro-antd';
import {Router} from '@angular/router';
import {LocalStorageService} from './local-storage.service'; import {LocalStorageService} from './local-storage.service';
import {TOKEN} from './local-storage.namespace'; import {TOKEN} from './local-storage.namespace';
@ -14,7 +13,6 @@ import {TOKEN} from './local-storage.namespace';
export class InterceptorService implements HttpInterceptor { export class InterceptorService implements HttpInterceptor {
constructor( constructor(
private message: NzMessageService, private message: NzMessageService,
private router: Router,
private storage: LocalStorageService, private storage: LocalStorageService,
) { ) {
} }

@ -203,6 +203,14 @@ export class AgentService {
} }
public generateDiscountPackageAgentCode(params: object, callBack) {
this.http.post(environment.baseUrl + 'discountPackageAgent/generateDiscountPackageAgentCode', params).subscribe(data => {
callBack(data);
});
}
/* /*
*/ */
@ -213,8 +221,8 @@ export class AgentService {
} }
/* 获取优惠券包代理商关联列表 */ /* 获取优惠券包代理商关联列表 */
public getDiscountPackageAgentRelList(agentId: number, callBack) { public getDiscountPackageAgentRelList(agentId: number, type: number , callBack) {
this.http.get(environment.baseUrl + 'discountPackageAgent/getDiscountPackageAgentRelList?agentId=' + agentId).subscribe(data => { this.http.get(environment.baseUrl + 'discountPackageAgent/getDiscountPackageAgentRelList?agentId=' + agentId + '&type=' + type).subscribe(data => {
callBack(data); callBack(data);
}); });
} }

@ -183,8 +183,8 @@ export class CouponService {
* *
* @param callBack * @param callBack
*/ */
public synCouponRule(callBack) { public synCouponRule(params: object, callBack) {
this.http.get(environment.baseUrl + 'apiCoupon/synCouponRule').subscribe(data => { this.http.get(environment.baseUrl + 'apiCoupon/synCouponRule?' + this.common.getWhereCondition(params)).subscribe(data => {
callBack(data); callBack(data);
}); });
} }
@ -197,7 +197,7 @@ export class CouponService {
* @param id id * @param id id
* @param callBack * @param callBack
*/ */
public getCouponSalesPrice(params: object, callBack) { public getCouponSalesPrice(params: object, callBack) {
this.http.get(environment.baseUrl + 'coupon/getCouponSalesPrice?' + this.common.getWhereCondition(params)).subscribe(data => { this.http.get(environment.baseUrl + 'coupon/getCouponSalesPrice?' + this.common.getWhereCondition(params)).subscribe(data => {
callBack(data); callBack(data);
}); });

@ -355,4 +355,13 @@ export class OrderService {
callBack(data); callBack(data);
}); });
} }
/*
*/
public getAgentDiscountList(param: object , callBack) {
this.http.get(environment.baseUrl + '/discount/getAgentDiscountList?'+ this.common.getWhereCondition(param)).subscribe( data => {
callBack(data);
});
}
} }

@ -0,0 +1,43 @@
import { Injectable } from '@angular/core';
import {CommonsService} from '../commons.service';
import {environment} from '../../../environments/environment';
import {HttpClient} from '@angular/common/http';
@Injectable({
providedIn: 'root'
})
export class OrderApiMerService {
constructor(
private http: HttpClient,
private common: CommonsService
) { }
/**
* @Author Sum1Dream
* @methodName getOrderKfcList
* @Description // 查询肯德基订单
* @Date 17:20 2022/10/27
* @Param param
*/
public getOrderList(param: object, callBack) {
this.http.get(environment.orderUrl + 'apiMerOrder/getOrderList?' + this.common.getWhereCondition(param)).subscribe(data => {
callBack(data);
});
}
/**
* @Author Sum1Dream
* @methodName getOrderDetail
* @Description // 根据订单号查询订单详情
* @Date 14:38 2022/10/28
* @Param orderNo: string, callBack
*/
public getOrderDetail(orderNo: string, callBack) {
this.http.get(environment.orderUrl + 'apiMerOrder/getOrderDetail?orderNo=' + orderNo).subscribe(data => {
callBack(data);
});
}
}

@ -4,10 +4,9 @@
export const environment = { export const environment = {
production: false, production: false,
baseUrl: 'https://hsgcs.dctpay.com/brest/', // 测试环境服务器地址(请求数据地址) // baseUrl: 'http://localhost:9302/brest/', // 测试环境服务器地址(请求数据地址)
// orderUrl: 'http://localhost:9304/order/', // 测试环境服务器地址(请求数据地址) // orderUrl: 'http://localhost:9304/order/', // 测试环境服务器地址(请求数据地址)
// baseUrl: 'https://hsgcs.dctpay.com/brest/', // 测试环境服务器地址(请求数据地址) baseUrl: 'https://hsgcs.dctpay.com/brest/', // 测试环境服务器地址(请求数据地址)
// baseUrl: 'https://hsg.dctpay.com/brest/', // 正式环境服务器地址(请求数据地址)
// orderUrl: 'https://hsg.dctpay.com/order/', // 测试环境服务器地址(请求数据地址) // orderUrl: 'https://hsg.dctpay.com/order/', // 测试环境服务器地址(请求数据地址)
orderUrl: 'https://hsgcs.dctpay.com/order/', // 测试环境服务器地址(请求数据地址) orderUrl: 'https://hsgcs.dctpay.com/order/', // 测试环境服务器地址(请求数据地址)
imageUrl: 'https://hsgcs.dctpay.com/filesystem/', imageUrl: 'https://hsgcs.dctpay.com/filesystem/',

@ -5,9 +5,10 @@
<title>嗨森逛</title> <title>嗨森逛</title>
<base href="/"> <base href="/">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<script src="https://webapi.amap.com/maps?v=1.4.3&key=3a42e959c2a1e1d76e691bc1cc25a0b0&plugin=AMap.ToolBar,AMap.Autocomplete,AMap.PlaceSearch"></script> <script type="text/javascript"> window._AMapSecurityConfig = { securityJsCode: "37b349dfe13d46c1ed56c41ee347cddb", }; </script>
<script src="https://webapi.amap.com/maps?v=1.4.3&key=09db9ab180c8c1a9eaf778801be1da9d&plugin=AMap.ToolBar,AMap.Autocomplete,AMap.PlaceSearch"></script>
<script src="//webapi.amap.com/ui/1.1/main.js"></script> <script src="//webapi.amap.com/ui/1.1/main.js"></script>
<link rel="icon" type="image/x-icon" href="favicon.ico"> <link rel="icon" type="image/x-icon" href="./favicon.ico">
</head> </head>
<body> <body>
<app-root></app-root> <app-root></app-root>

Loading…
Cancel
Save