|
|
@ -1,113 +1,115 @@ |
|
|
|
<!-- start 面包屑 --> |
|
|
|
<!-- start 面包屑 --> |
|
|
|
<app-breadcrumb></app-breadcrumb> |
|
|
|
<app-breadcrumb></app-breadcrumb> |
|
|
|
<!-- end 面包屑 --> |
|
|
|
<!-- end 面包屑 --> |
|
|
|
|
|
|
|
<nz-spin [nzSpinning]="exportLoading" nzTip="导出中..."> |
|
|
|
|
|
|
|
<!--条件搜索--> |
|
|
|
|
|
|
|
<div class="inner-content"> |
|
|
|
|
|
|
|
<form nz-form [formGroup]="searchForm" (ngSubmit)="getRequest(true , searchForm.value)"> |
|
|
|
|
|
|
|
<div nz-row> |
|
|
|
|
|
|
|
|
|
|
|
<!--条件搜索--> |
|
|
|
<div nz-col nzSpan="8"> |
|
|
|
<div class="inner-content"> |
|
|
|
<nz-form-item> |
|
|
|
<form nz-form [formGroup]="searchForm" (ngSubmit)="getRequest(true , searchForm.value)"> |
|
|
|
<nz-form-label [nzSpan]="6">消费码KEY</nz-form-label> |
|
|
|
<div nz-row> |
|
|
|
<nz-form-control [nzSpan]="16"> |
|
|
|
|
|
|
|
<input nz-input formControlName="salesCode"/> |
|
|
|
<div nz-col nzSpan="8"> |
|
|
|
</nz-form-control> |
|
|
|
<nz-form-item> |
|
|
|
</nz-form-item> |
|
|
|
<nz-form-label [nzSpan]="6">消费码KEY</nz-form-label> |
|
|
|
</div> |
|
|
|
<nz-form-control [nzSpan]="16"> |
|
|
|
<div nz-col nzSpan="8"> |
|
|
|
<input nz-input formControlName="salesCode"/> |
|
|
|
<nz-form-item> |
|
|
|
</nz-form-control> |
|
|
|
<nz-form-label [nzSpan]="6">消费码状态</nz-form-label> |
|
|
|
</nz-form-item> |
|
|
|
<nz-form-control [nzSpan]="16"> |
|
|
|
</div> |
|
|
|
<nz-select formControlName="status"> |
|
|
|
<div nz-col nzSpan="8"> |
|
|
|
<nz-option nzValue="1" nzLabel="待销售"></nz-option> |
|
|
|
<nz-form-item> |
|
|
|
<nz-option nzValue="2" nzLabel="待使用"></nz-option> |
|
|
|
<nz-form-label [nzSpan]="6">消费码状态</nz-form-label> |
|
|
|
<nz-option nzValue="3" nzLabel="已使用"></nz-option> |
|
|
|
<nz-form-control [nzSpan]="16"> |
|
|
|
<nz-option nzValue="4" nzLabel="已过期"></nz-option> |
|
|
|
<nz-select formControlName="status"> |
|
|
|
<nz-option nzValue="99" nzLabel="预支付"></nz-option> |
|
|
|
<nz-option nzValue="1" nzLabel="待销售"></nz-option> |
|
|
|
</nz-select> |
|
|
|
<nz-option nzValue="2" nzLabel="待使用"></nz-option> |
|
|
|
</nz-form-control> |
|
|
|
<nz-option nzValue="3" nzLabel="已使用"></nz-option> |
|
|
|
</nz-form-item> |
|
|
|
<nz-option nzValue="4" nzLabel="已过期"></nz-option> |
|
|
|
</div> |
|
|
|
</nz-select> |
|
|
|
|
|
|
|
</nz-form-control> |
|
|
|
|
|
|
|
</nz-form-item> |
|
|
|
|
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div nz-row> |
|
|
|
<div nz-row> |
|
|
|
<div nz-col nzSpan="24" class="search-button"> |
|
|
|
<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="primary"><i nz-icon nzType="search" nzTheme="outline"></i>搜索</button> |
|
|
|
<button nz-button nzType="default" (click)="resetForm()"><i nz-icon nzType="reload" |
|
|
|
<button nz-button nzType="default" (click)="resetForm()"><i nz-icon nzType="reload" |
|
|
|
nzTheme="outline"></i>重置 |
|
|
|
nzTheme="outline"></i>重置 |
|
|
|
</button> |
|
|
|
</button> |
|
|
|
|
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</form> |
|
|
|
</form> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="inner-content"> |
|
|
|
|
|
|
|
<span>共计 {{total}} 条数据</span> |
|
|
|
|
|
|
|
<span *ngIf="id != null" style="margin-left: 30px;;"> |
|
|
|
|
|
|
|
卡券名称: |
|
|
|
|
|
|
|
<span style="font-weight: bold; font-size: 20px">{{name}}({{type === 1 ? '内部券' : '外部券'}})</span> |
|
|
|
|
|
|
|
</span> |
|
|
|
|
|
|
|
<div class="operating-button"> |
|
|
|
|
|
|
|
<button *ngIf="type === 1" nz-button nzType="primary" class="right-btn" (click)="showModal()"><i nz-icon |
|
|
|
|
|
|
|
nzType="import" |
|
|
|
|
|
|
|
nzTheme="outline"></i>生成消费码 |
|
|
|
|
|
|
|
</button> |
|
|
|
|
|
|
|
<nz-upload |
|
|
|
|
|
|
|
*ngIf="type === 2" |
|
|
|
|
|
|
|
[nzAccept]="'.xls,.xlsx'" |
|
|
|
|
|
|
|
nzAction="{{WEB_SERVE_URL}}coupon/importStock?couponId={{id}}" |
|
|
|
|
|
|
|
[nzHeaders]="{ authorization: 'authorization-text' }" |
|
|
|
|
|
|
|
(nzChange)="handleChange($event)" |
|
|
|
|
|
|
|
[nzShowUploadList]="false" |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<button nz-button nzType="primary" ><i nz-icon nzType="import" nzTheme="outline"></i>导入消费码</button> |
|
|
|
|
|
|
|
</nz-upload> |
|
|
|
|
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<nz-table |
|
|
|
|
|
|
|
class="table" |
|
|
|
|
|
|
|
#ajaxTable |
|
|
|
|
|
|
|
nzShowSizeChanger |
|
|
|
|
|
|
|
[nzFrontPagination]="false" |
|
|
|
|
|
|
|
[nzData]="requestData" |
|
|
|
|
|
|
|
[nzLoading]="loading" |
|
|
|
|
|
|
|
[nzTotal]="total" |
|
|
|
|
|
|
|
[(nzPageIndex)]="pageNum" |
|
|
|
|
|
|
|
[(nzPageSize)]="pageSize" |
|
|
|
|
|
|
|
[nzScroll]="{ x: '1200px' }" |
|
|
|
|
|
|
|
(nzPageIndexChange)="getRequest(false , searchForm.value)" |
|
|
|
|
|
|
|
(nzPageSizeChange)="getRequest(false , searchForm.value)"> |
|
|
|
|
|
|
|
<thead nzSingleSort> |
|
|
|
|
|
|
|
<tr> |
|
|
|
|
|
|
|
<th nzWidth="50px">编号</th> |
|
|
|
|
|
|
|
<th nzWidth="180px">消费码</th> |
|
|
|
|
|
|
|
<th nzWidth="180px">是否分发</th> |
|
|
|
|
|
|
|
<th nzWidth="120px">使用门店</th> |
|
|
|
|
|
|
|
<th nzWidth="120px">领取时间</th> |
|
|
|
|
|
|
|
<th nzWidth="120px">消费时间</th> |
|
|
|
|
|
|
|
<th nzWidth="120px">销售截止时间</th> |
|
|
|
|
|
|
|
<th nzWidth="120px">使用截止时间</th> |
|
|
|
|
|
|
|
<th nzWidth="120px">创建时间</th> |
|
|
|
|
|
|
|
<th nzWidth="80px" nzRight="0px">状态</th> |
|
|
|
|
|
|
|
</tr> |
|
|
|
|
|
|
|
</thead> |
|
|
|
|
|
|
|
<tbody> |
|
|
|
|
|
|
|
<tr *ngFor="let data of ajaxTable.data; let i = index"> |
|
|
|
|
|
|
|
<td>{{i + 1}}</td> |
|
|
|
|
|
|
|
<td>{{data.salesCode}}</td> |
|
|
|
|
|
|
|
<td>{{data.isAssignAgent === true ? '已分发' : '未分发'}}</td> |
|
|
|
|
|
|
|
<td>{{data.storeName == null ? '暂无' : data.storeName}}</td> |
|
|
|
|
|
|
|
<td>{{data.receiveTime == null ? '未领取' : data.receiveTime | date: 'yyyy-MM-dd HH:mm'}}</td> |
|
|
|
|
|
|
|
<td>{{data.consumeTime == null ? '未消费' : data.consumeTime | date: 'yyyy-MM-dd HH:mm'}}</td> |
|
|
|
|
|
|
|
<td>{{data.salesEndTime | date: 'yyyy-MM-dd HH:mm'}}</td> |
|
|
|
|
|
|
|
<td>{{data.useEndTime | date: 'yyyy-MM-dd HH:mm'}}</td> |
|
|
|
|
|
|
|
<td>{{data.createTime | date: 'yyyy-MM-dd HH:mm'}}</td> |
|
|
|
|
|
|
|
<td nzRight="0px">{{data.status | couponCode}}</td> |
|
|
|
|
|
|
|
</tbody> |
|
|
|
|
|
|
|
</nz-table> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="inner-content"> |
|
|
|
|
|
|
|
<span>共计 {{total}} 条数据</span> |
|
|
|
|
|
|
|
<span *ngIf="id != null" style="margin-left: 30px;;"> |
|
|
|
|
|
|
|
卡券名称: |
|
|
|
|
|
|
|
<span style="font-weight: bold; font-size: 20px">{{name}}({{type === 1 ? '内部券' : '外部券'}})</span> |
|
|
|
|
|
|
|
</span> |
|
|
|
|
|
|
|
<div class="operating-button"> |
|
|
|
|
|
|
|
<button *ngIf="type === 1" nz-button nzType="primary" class="right-btn" (click)="showModal()"><i nz-icon |
|
|
|
|
|
|
|
nzType="import" |
|
|
|
|
|
|
|
nzTheme="outline"></i>生成消费码 |
|
|
|
|
|
|
|
</button> |
|
|
|
|
|
|
|
<nz-upload |
|
|
|
|
|
|
|
*ngIf="type === 2" |
|
|
|
|
|
|
|
[nzAccept]="'.xls,.xlsx'" |
|
|
|
|
|
|
|
nzAction="{{WEB_SERVE_URL}}coupon/importStock?couponId={{id}}" |
|
|
|
|
|
|
|
[nzHeaders]="{ authorization: 'authorization-text' }" |
|
|
|
|
|
|
|
(nzChange)="handleChange($event)" |
|
|
|
|
|
|
|
[nzShowUploadList]="false" |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<button nz-button nzType="primary" ><i nz-icon nzType="import" nzTheme="outline"></i>导入消费码</button> |
|
|
|
|
|
|
|
</nz-upload> |
|
|
|
|
|
|
|
<button (click)="showExportSalesCodeModal()" nz-button nzType="primary" ><i nz-icon nzType="import" nzTheme="outline"></i>导出消费码</button> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
<nz-table |
|
|
|
|
|
|
|
class="table" |
|
|
|
|
|
|
|
#ajaxTable |
|
|
|
|
|
|
|
nzShowSizeChanger |
|
|
|
|
|
|
|
[nzFrontPagination]="false" |
|
|
|
|
|
|
|
[nzData]="requestData" |
|
|
|
|
|
|
|
[nzLoading]="loading" |
|
|
|
|
|
|
|
[nzTotal]="total" |
|
|
|
|
|
|
|
[(nzPageIndex)]="pageNum" |
|
|
|
|
|
|
|
[(nzPageSize)]="pageSize" |
|
|
|
|
|
|
|
[nzScroll]="{ x: '1200px' }" |
|
|
|
|
|
|
|
(nzPageIndexChange)="getRequest(false , searchForm.value)" |
|
|
|
|
|
|
|
(nzPageSizeChange)="getRequest(false , searchForm.value)"> |
|
|
|
|
|
|
|
<thead nzSingleSort> |
|
|
|
|
|
|
|
<tr> |
|
|
|
|
|
|
|
<th nzWidth="60px">序号</th> |
|
|
|
|
|
|
|
<th nzWidth="200px">消费码key</th> |
|
|
|
|
|
|
|
<th nzWidth="230px">消费码</th> |
|
|
|
|
|
|
|
<th nzWidth="100px">是否分发</th> |
|
|
|
|
|
|
|
<th nzWidth="150px">使用门店</th> |
|
|
|
|
|
|
|
<th nzWidth="150px">领取时间</th> |
|
|
|
|
|
|
|
<th nzWidth="150px">消费时间</th> |
|
|
|
|
|
|
|
<th nzWidth="150px">销售截止时间</th> |
|
|
|
|
|
|
|
<th nzWidth="150px">使用截止时间</th> |
|
|
|
|
|
|
|
<th nzWidth="150px">创建时间</th> |
|
|
|
|
|
|
|
<th nzWidth="80px" nzRight="0px">销售码状态</th> |
|
|
|
|
|
|
|
</tr> |
|
|
|
|
|
|
|
</thead> |
|
|
|
|
|
|
|
<tbody> |
|
|
|
|
|
|
|
<tr *ngFor="let data of ajaxTable.data; let i = index"> |
|
|
|
|
|
|
|
<td>{{i + 1}}</td> |
|
|
|
|
|
|
|
<td>{{data.codeKey}}</td> |
|
|
|
|
|
|
|
<td>{{data.salesCode}}</td> |
|
|
|
|
|
|
|
<td>{{data.isAssignAgent === true ? '已分发' : '未分发'}}</td> |
|
|
|
|
|
|
|
<td>{{data.storeName == null ? '暂无' : data.storeName}}</td> |
|
|
|
|
|
|
|
<td>{{data.receiveTime == null ? '未领取' : data.receiveTime | date: 'yyyy-MM-dd HH:mm'}}</td> |
|
|
|
|
|
|
|
<td>{{data.consumeTime == null ? '未消费' : data.consumeTime | date: 'yyyy-MM-dd HH:mm'}}</td> |
|
|
|
|
|
|
|
<td>{{data.salesEndTime | date: 'yyyy-MM-dd HH:mm'}}</td> |
|
|
|
|
|
|
|
<td>{{data.useEndTime | date: 'yyyy-MM-dd HH:mm'}}</td> |
|
|
|
|
|
|
|
<td>{{data.createTime | date: 'yyyy-MM-dd HH:mm'}}</td> |
|
|
|
|
|
|
|
<td nzRight="0px">{{data.status | couponCode}}</td> |
|
|
|
|
|
|
|
</tbody> |
|
|
|
|
|
|
|
</nz-table> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</nz-spin> |
|
|
|
<nz-modal [(nzVisible)]="isVisible" nzTitle="生成消费码" (nzOnCancel)="handleCancel()" (nzOnOk)="handleOk()"> |
|
|
|
<nz-modal [(nzVisible)]="isVisible" nzTitle="生成消费码" (nzOnCancel)="handleCancel()" (nzOnOk)="handleOk()"> |
|
|
|
<ng-container> |
|
|
|
<ng-container> |
|
|
|
<form nz-form [formGroup]="codeForm"> |
|
|
|
<form nz-form [formGroup]="codeForm"> |
|
|
@ -168,3 +170,40 @@ |
|
|
|
</tbody> |
|
|
|
</tbody> |
|
|
|
</nz-table> |
|
|
|
</nz-table> |
|
|
|
</nz-modal> |
|
|
|
</nz-modal> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<nz-modal [(nzVisible)]="exportSalesCodeModal" nzTitle="导出销售码" (nzOnCancel)="closeExportSalesCodeModal()" [nzFooter]="null"> |
|
|
|
|
|
|
|
<nz-spin [nzSpinning]="exportLoading" nzTip="导出中..."> |
|
|
|
|
|
|
|
<form nz-form [formGroup]="exportSalesCodeForm" > |
|
|
|
|
|
|
|
<nz-form-item> |
|
|
|
|
|
|
|
<nz-form-label [nzSm]="4" [nzXs]="24"> |
|
|
|
|
|
|
|
<span><i nz-icon nz-tooltip nzTooltipTitle="创建时间:导入销售码的时间 或 生成销售码的时间" nzType="question-circle" nzTheme="outline"></i>创建时间</span> |
|
|
|
|
|
|
|
</nz-form-label> |
|
|
|
|
|
|
|
<nz-form-control [nzSm]="18" [nzXs]="24"> |
|
|
|
|
|
|
|
<nz-range-picker formControlName="createTime" |
|
|
|
|
|
|
|
[nzFormat]="'yyyy-MM-dd HH:mm:ss'" |
|
|
|
|
|
|
|
[nzShowTime]="{ nzHideDisabledOptions: true }" |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
></nz-range-picker> |
|
|
|
|
|
|
|
</nz-form-control> |
|
|
|
|
|
|
|
</nz-form-item> |
|
|
|
|
|
|
|
<nz-form-item> |
|
|
|
|
|
|
|
<nz-form-label [nzSm]="4" [nzXs]="24"> |
|
|
|
|
|
|
|
<span>销售码状态</span> |
|
|
|
|
|
|
|
</nz-form-label> |
|
|
|
|
|
|
|
<nz-form-control [nzSm]="18" [nzXs]="24"> |
|
|
|
|
|
|
|
<nz-select formControlName="status"> |
|
|
|
|
|
|
|
<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="99" nzLabel="预支付"></nz-option> |
|
|
|
|
|
|
|
</nz-select> |
|
|
|
|
|
|
|
</nz-form-control> |
|
|
|
|
|
|
|
</nz-form-item> |
|
|
|
|
|
|
|
<div *nzModalFooter style="text-align: center;"> |
|
|
|
|
|
|
|
<button nz-button nzType="primary" [nzLoading]="exportLoading" (click)="exportSalesCodeData()">导出销售码</button> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</form> |
|
|
|
|
|
|
|
</nz-spin> |
|
|
|
|
|
|
|
</nz-modal> |
|
|
|