解决冲突

pull/1/head
胡锐 3 years ago
commit f00d261234
  1. 66
      src/app/admin/coupon/coupon-list/coupon-list.component.html
  2. 1
      src/app/admin/coupon/coupon-list/coupon-list.component.ts
  3. 2
      src/app/admin/discount-package/discount-package-list/discount-package-list.component.html
  4. 2
      src/app/admin/discount-package/discount-package-routing.module.ts
  5. 3
      src/app/admin/discount-package/discount-package.module.ts
  6. 94
      src/app/admin/discount-package/order-list/order-list.component.html
  7. 0
      src/app/admin/discount-package/order-list/order-list.component.scss
  8. 80
      src/app/admin/discount-package/order-list/order-list.component.ts
  9. 22
      src/app/admin/merchant-store/store-edit/store-edit.component.html
  10. 39
      src/app/admin/merchant-store/store-edit/store-edit.component.ts
  11. 182
      src/app/admin/order/dicount-package-order-list/dicount-package-order-list.component.html
  12. 0
      src/app/admin/order/dicount-package-order-list/dicount-package-order-list.component.scss
  13. 192
      src/app/admin/order/dicount-package-order-list/dicount-package-order-list.component.ts
  14. 2
      src/app/admin/order/order-list/order-list.component.html
  15. 8
      src/app/admin/order/order-routing.module.ts
  16. 28
      src/app/admin/order/order.module.ts
  17. 13
      src/app/services/discount-package.service.ts
  18. 26
      src/app/services/order.service.ts

@ -7,7 +7,7 @@
<form nz-form [formGroup]="searchForm" (ngSubmit)="getRequest(true , searchForm.value)"> <form nz-form [formGroup]="searchForm" (ngSubmit)="getRequest(true , searchForm.value)">
<div nz-row> <div nz-row>
<div nz-col nzSpan="6"> <div nz-col nzSpan="8">
<nz-form-item> <nz-form-item>
<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">
@ -15,7 +15,21 @@
</nz-form-control> </nz-form-control>
</nz-form-item> </nz-form-item>
</div> </div>
<div nz-col nzSpan="6"> <div nz-col nzSpan="8">
<nz-form-item>
<nz-form-label [nzSpan]="6">展示区域</nz-form-label>
<nz-form-control [nzSpan]="16">
<nz-select nzPlaceHolder="请选择展示区域" [formControlName]="'displayArea'">
<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-select>
</nz-form-control>
</nz-form-item>
</div>
<div nz-col nzSpan="8">
<nz-form-item> <nz-form-item>
<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">
@ -25,17 +39,17 @@
</nz-form-control> </nz-form-control>
</nz-form-item> </nz-form-item>
</div> </div>
<div nz-col nzSpan="6"> <div nz-col nzSpan="8">
<nz-form-item> <nz-form-item>
<nz-form-label >品牌</nz-form-label> <nz-form-label [nzSpan]="6">品牌</nz-form-label>
<nz-form-control> <nz-form-control [nzSpan]="16">
<nz-select nzPlaceHolder="请选择品牌" [formControlName]="'brandId'"> <nz-select nzPlaceHolder="请选择品牌" [formControlName]="'brandId'">
<nz-option *ngFor="let item of brandData" nzValue="{{item.id}}" nzLabel="{{item.title}}"></nz-option> <nz-option *ngFor="let item of brandData" nzValue="{{item.id}}" nzLabel="{{item.title}}"></nz-option>
</nz-select> </nz-select>
</nz-form-control> </nz-form-control>
</nz-form-item> </nz-form-item>
</div> </div>
<div nz-col nzSpan="6"> <div nz-col nzSpan="8">
<nz-form-item> <nz-form-item>
<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">
@ -57,7 +71,7 @@
</nz-form-control> </nz-form-control>
</nz-form-item> </nz-form-item>
</div> </div>
<div nz-col nzSpan="6"> <div nz-col nzSpan="8">
<nz-form-item> <nz-form-item>
<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">
@ -68,7 +82,7 @@
</nz-form-control> </nz-form-control>
</nz-form-item> </nz-form-item>
</div> </div>
<div nz-col nzSpan="6"> <div nz-col nzSpan="8">
<nz-form-item> <nz-form-item>
<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">
@ -125,13 +139,13 @@
<th nzWidth="100px">销售价格</th> <th nzWidth="100px">销售价格</th>
<th nzWidth="100px">折扣价格</th> <th nzWidth="100px">折扣价格</th>
<th nzWidth="100px">有效库存</th> <th nzWidth="100px">有效库存</th>
<th nzWidth="100px">展示区域</th>
<th nzWidth="100px">卡券类型</th> <th nzWidth="100px">卡券类型</th>
<th nzWidth="100px">是否赠券</th> <th nzWidth="100px">是否赠券</th>
<th nzWidth="120px">卡券状态</th>
<th nzWidth="150px">销售截止时间</th> <th nzWidth="150px">销售截止时间</th>
<th nzWidth="150px">创建时间</th> <th nzWidth="150px">创建时间</th>
<th nzWidth="150px" nzRight="0px">操作</th> <th nzWidth="100px" nzRight>展示区域</th>
<th nzWidth="120px" nzRight>卡券状态</th>
<th nzWidth="150px" nzRight>操作</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@ -142,22 +156,28 @@
<td>¥{{data.salesPrice}}</td> <td>¥{{data.salesPrice}}</td>
<td>¥{{data.discountPrice}}</td> <td>¥{{data.discountPrice}}</td>
<td>{{data.stockCount}}</td> <td>{{data.stockCount}}</td>
<td>{{data.displayArea | displayArea}}</td>
<td>{{data.couponType === 1 ? '内部卷' : '外部卷'}}</td> <td>{{data.couponType === 1 ? '内部卷' : '外部卷'}}</td>
<td>{{data.isPresent === true ? '赠券' : '无赠券'}}</td> <td>{{data.isPresent === true ? '赠券' : '无赠券'}}</td>
<td>{{data.status | couponStatus}}</td>
<td>{{data.salesEndTime | date: 'yyyy-MM-dd HH:mm'}}</td> <td>{{data.salesEndTime | date: 'yyyy-MM-dd HH:mm'}}</td>
<td>{{data.createTime | date: 'yyyy-MM-dd HH:mm'}}</td> <td>{{data.createTime | date: 'yyyy-MM-dd HH:mm'}}</td>
<td nzRight="0px" class="table-td-operation"> <td nzRight>{{data.displayArea | displayArea}}</td>
<a *ngIf="data.status !== 101" (click)="getEdit(data.id)"><i nz-icon nzType="form" nzTheme="outline" nz-tooltip="编辑"></i></a> <td nzRight>
<nz-divider nzType="vertical" *ngIf="data.status === 1 || data.status === 3 || data.status === 102"></nz-divider> <span *ngIf="data.status === 2" style="color: limegreen">{{data.status | couponStatus}}</span>
<a *ngIf="data.status === 1 || data.status === 3 || data.status === 102" (click)="enableMerchant(data.id)"> <i nz-icon [nzIconfont]="'icon-shangjia'" nz-tooltip="上架"></i></a> <span *ngIf="data.status === 3" style="color: red">{{data.status | couponStatus}}</span>
<nz-divider *ngIf="data.status === 2" nzType="vertical"></nz-divider> <span *ngIf="data.status === 1 || data.status === 102">{{data.status | couponStatus}}</span>
<a *ngIf="data.status === 2" (click)="disableMerchant(data.id)"> <i nz-icon [nzIconfont]="'icon-xiajia'" nz-tooltip="下架"></i></a>
<nz-divider *ngIf="data.status !== 101" nzType="vertical"></nz-divider> </td>
<a (click)="getList(data.id , data.couponName , data.couponType)"><i nz-icon nzType="unordered-list" nzTheme="outline" nz-tooltip="销售码列表"></i></a> <td nzRight class="table-td-operation">
<!-- <nz-divider *ngIf="data.status !== 101" nzType="vertical"></nz-divider>--> <a *ngIf="data.status === 2" (click)="disableMerchant(data.id)">下架</a>
<!-- <a *ngIf="data.status !== 101" (click)="getDelete(data.id)"><i nz-icon nzType="delete" nzTheme="outline" nz-tooltip="删除"></i></a>--> <a *ngIf="data.status === 1 || data.status === 3 || data.status === 102" (click)="enableMerchant(data.id)">上架</a>
<nz-divider nzType="vertical" ></nz-divider>
<a nz-dropdown [nzDropdownMenu]="menu">更多</a>
<nz-dropdown-menu #menu="nzDropdownMenu">
<ul nz-menu nzSelectable>
<li class="li-a" *ngIf="data.status === 1 || data.status === 3 || data.status === 102" nz-menu-item> <a (click)="getEdit(data.id)">编辑</a></li>
<li class="li-a" nz-menu-item><a (click)="getList(data.id , data.couponName , data.couponType)">销售码列表</a></li>
</ul>
</nz-dropdown-menu>
</td> </td>
</tbody> </tbody>
</nz-table> </nz-table>

@ -81,6 +81,7 @@ export class CouponListComponent implements OnInit {
couponType: [null], couponType: [null],
goodsTypeId: [null], goodsTypeId: [null],
brandId: [null], brandId: [null],
displayArea: [null],
status: [null], status: [null],
}); });
this.getRequest(true, this.searchForm.value); this.getRequest(true, this.searchForm.value);

@ -110,7 +110,7 @@
<nz-dropdown-menu #menu="nzDropdownMenu"> <nz-dropdown-menu #menu="nzDropdownMenu">
<ul nz-menu nzSelectable> <ul nz-menu nzSelectable>
<li class="li-a" *ngIf="data.status == 2 || data.status == 3" nz-menu-item><a (click)="getEdit(data.id)">编辑</a></li> <li class="li-a" *ngIf="data.status == 2 || data.status == 3" nz-menu-item><a (click)="getEdit(data.id)">编辑</a></li>
<li class="li-a" *ngIf="data.status == 2 || data.status == 3" nz-menu-item><a (click)="addInventory(data.id)" >增加库存</a></li> <li class="li-a" nz-menu-item><a (click)="addInventory(data.id)" >增加库存</a></li>
<li class="li-a" *ngIf="data.status == 2 || data.status == 3" nz-menu-item><a (click)="upDiscountPackage(data.id)" >上架</a></li> <li class="li-a" *ngIf="data.status == 2 || data.status == 3" nz-menu-item><a (click)="upDiscountPackage(data.id)" >上架</a></li>
<li class="li-a" *ngIf="data.status == 1" nz-menu-item><a (click)="downDiscountPackage(data.id)">下架</a></li> <li class="li-a" *ngIf="data.status == 1" nz-menu-item><a (click)="downDiscountPackage(data.id)">下架</a></li>
<li class="li-a" *ngIf="data.status == 2 || data.status == 3" nz-menu-item><a (click)="deleteDiscountPackage(data.id)">删除</a></li> <li class="li-a" *ngIf="data.status == 2 || data.status == 3" nz-menu-item><a (click)="deleteDiscountPackage(data.id)">删除</a></li>

@ -3,12 +3,14 @@ import { Routes, RouterModule } from '@angular/router';
import {DiscountPackageListComponent} from './discount-package-list/discount-package-list.component'; import {DiscountPackageListComponent} from './discount-package-list/discount-package-list.component';
import {DiscountPackageEditComponent} from './discount-package-edit/discount-package-edit.component'; import {DiscountPackageEditComponent} from './discount-package-edit/discount-package-edit.component';
import {InventoryRecordComponent} from './inventory-record/inventory-record.component'; import {InventoryRecordComponent} from './inventory-record/inventory-record.component';
import {OrderListComponent} from './order-list/order-list.component';
const routes: Routes = [ const routes: Routes = [
{ path: 'discount-package-list', component: DiscountPackageListComponent }, { path: 'discount-package-list', component: DiscountPackageListComponent },
{ path: 'discount-package-edit', component: DiscountPackageEditComponent }, { path: 'discount-package-edit', component: DiscountPackageEditComponent },
{ path: 'inventory-record', component: InventoryRecordComponent }, { path: 'inventory-record', component: InventoryRecordComponent },
{ path: 'order-list', component: OrderListComponent },
]; ];
@NgModule({ @NgModule({

@ -11,10 +11,11 @@ import {RegionSelectorModule} from '../../common/region-selector/region-selector
import {AppCommonModule} from '../../app-common.module'; import {AppCommonModule} from '../../app-common.module';
import { DiscountPackageEditComponent } from './discount-package-edit/discount-package-edit.component'; import { DiscountPackageEditComponent } from './discount-package-edit/discount-package-edit.component';
import { InventoryRecordComponent } from './inventory-record/inventory-record.component'; import { InventoryRecordComponent } from './inventory-record/inventory-record.component';
import { OrderListComponent } from './order-list/order-list.component';
@NgModule({ @NgModule({
declarations: [DiscountPackageListComponent, DiscountPackageEditComponent, InventoryRecordComponent], declarations: [DiscountPackageListComponent, DiscountPackageEditComponent, InventoryRecordComponent, OrderListComponent],
imports: [ imports: [
CommonModule, CommonModule,
DiscountPackageRoutingModule, DiscountPackageRoutingModule,

@ -0,0 +1,94 @@
<!-- start 面包屑 -->
<app-breadcrumb></app-breadcrumb>
<!-- end 面包屑 -->
<!--条件搜索-->
<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]="6">优惠券包名称</nz-form-label>
<nz-form-control [nzSpan]="16">
<input nz-input formControlName="title"/>
</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 formControlName="phone"/>
</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 formControlName="recordNo"/>
</nz-form-control>
</nz-form-item>
</div>
<div nz-col nzSpan="8">
<nz-form-item>
<nz-form-label [nzSpan]="6">类型</nz-form-label>
<nz-form-control [nzSpan]="16">
<nz-select nzShowSearch nzAllowClear formControlName="salesType" nzPlaceHolder="请选择类型">
<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
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="150px">优惠券标题</th>
<th nzWidth="70px">用户电话</th>
<th nzWidth="70px">订单号</th>
<th nzWidth="70px">销售类型</th>
<th nzWidth="100px">创建时间</th>
</tr>
</thead>
<tbody>
<tr *ngFor="let data of ajaxTable.data; let i = index">
<td>{{i+1}}</td>
<td>{{data.discountPackageTitle}}</td>
<td>{{data.ext1}}</td>
<td>{{data.recordNo}}</td>
<td>{{data.salesType == 1 ? '售卖' : '赠送'}}</td>
<td>{{data.createdTime | date: 'yyyy-MM-dd HH:mm'}}</td>
</tbody>
</nz-table>
</div>

@ -0,0 +1,80 @@
import { Component, OnInit } from '@angular/core';
import {environment} from '../../../../environments/environment';
import {FormBuilder, FormGroup} from '_@angular_forms@9.0.7@@angular/forms';
import {CompanyService} from '../../../services/company.service';
import {ActivateService} from '../../../services/activate.service';
import {IconService} from '../../../services/icon.service';
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';
import {DiscountPackageService} from '../../../services/discount-package.service';
@Component({
selector: 'app-order-list',
templateUrl: './order-list.component.html',
styleUrls: ['./order-list.component.scss']
})
export class OrderListComponent implements OnInit {
WEB_SERVE_URL = environment.imageUrl;
searchForm: FormGroup; // 搜索框
requestData = []; // 列表数据
total: number; // 页码
pageNum = 1; // 页码
pageSize = 10; // 条码
loading = true;
listOfData = [];
isVisible = false;
id: number;
num: number;
constructor(
private form: FormBuilder,
private company: CompanyService,
private activate: ActivateService,
private iconService: IconService,
private message: NzMessageService,
private router: Router,
private discountPackage: DiscountPackageService,
) {
}
ngOnInit(): void {
this.init();
}
public init(): void {
this.searchForm = this.form.group({
title: [null],
phone: [null],
recordNo: [null],
saleType: [null],
});
this.getRequest(true, this.searchForm.value);
}
// 查询列表
public getRequest(reset: boolean = false, whereObject: object) {
this.loading = false;
if (reset) {
this.pageNum = 1;
}
whereObject['pageNum'] = this.pageNum;
whereObject['pageSize'] = this.pageSize;
this.discountPackage.getDiscountPackageOrderList(whereObject, data => {
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 resetForm(): void {
this.searchForm.reset();
}
}

@ -42,6 +42,28 @@
</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>门店LOGO</nz-form-label>
<nz-form-control>
<nz-upload
nzAction="{{WEB_SERVE_URL}}/fileUpload/uploadfile"
nzListType="picture-card"
[(nzFileList)]="logoFile"
[nzShowButton]="logoFile.length < 1"
[nzPreview]="handlePreview"
>
<i nz-icon nzType="plus"></i>
<div class="ant-upload-text">上传LOGO</div>
</nz-upload>
<nz-modal [nzVisible]="previewVisible" [nzContent]="modalContent" [nzFooter]="null" (nzOnCancel)="previewVisible = false">
<ng-template #modalContent>
<img [src]="previewImage" [ngStyle]="{ width: '100%' }" />
</ng-template>
</nz-modal>
</nz-form-control>
</nz-form-item>
</div>
<div nz-col [nzSpan]="8"> <div nz-col [nzSpan]="8">
<nz-form-item> <nz-form-item>
<nz-form-label [nzFor]="'storeName'" nzRequired>门店名称</nz-form-label> <nz-form-label [nzFor]="'storeName'" nzRequired>门店名称</nz-form-label>

@ -2,7 +2,7 @@ import {Component, OnInit} from '@angular/core';
import {FormBuilder, FormGroup, Validators} from '@angular/forms'; import {FormBuilder, FormGroup, Validators} from '@angular/forms';
import {environment} from '../../../../environments/environment'; import {environment} from '../../../../environments/environment';
import {MerchantService} from '../../../services/merchant.service'; import {MerchantService} from '../../../services/merchant.service';
import {NzMessageService} from 'ng-zorro-antd'; import {NzMessageService, NzUploadFile} from 'ng-zorro-antd';
import {ActivatedRoute} from '@angular/router'; import {ActivatedRoute} from '@angular/router';
import {ValidatorsService} from '../../../services/validators.service'; import {ValidatorsService} from '../../../services/validators.service';
import {MerchantStoreService} from '../../../services/merchant-store.service'; import {MerchantStoreService} from '../../../services/merchant-store.service';
@ -10,6 +10,15 @@ import {MerchantStoreService} from '../../../services/merchant-store.service';
declare var AMap: any; // 一定要声明AMap,要不然报错找不到AMap declare var AMap: any; // 一定要声明AMap,要不然报错找不到AMap
declare var AMapUI: any; declare var AMapUI: any;
function getBase64(file: File): Promise<string | ArrayBuffer | null> {
return new Promise((resolve, reject) => {
const reader = new FileReader();
reader.readAsDataURL(file);
reader.onload = () => resolve(reader.result);
reader.onerror = error => reject(error);
});
}
@Component({ @Component({
selector: 'app-store-edit', selector: 'app-store-edit',
templateUrl: './store-edit.component.html', templateUrl: './store-edit.component.html',
@ -25,6 +34,7 @@ export class StoreEditComponent implements OnInit {
logoFile = []; logoFile = [];
WEB_SERVE_URL = environment.baseUrl; WEB_SERVE_URL = environment.baseUrl;
previewVisible = false; previewVisible = false;
previewImage: string | undefined = '';
constructor( constructor(
private fb: FormBuilder, private fb: FormBuilder,
@ -62,6 +72,16 @@ export class StoreEditComponent implements OnInit {
} }
// 图片查看
handlePreview = async (file: NzUploadFile) => {
if (!file.url && !file.preview) {
// tslint:disable-next-line:no-non-null-assertion
file.preview = await getBase64(file.originFileObj!);
}
this.previewImage = file.url || file.preview;
this.previewVisible = true;
}
// 返回 // 返回
getBack() { getBack() {
history.back(); history.back();
@ -83,14 +103,13 @@ export class StoreEditComponent implements OnInit {
return; return;
} }
} }
console.log(this.validateForm.value);
this.validateForm.value['secUser']['telephone'] = this.validateForm.value.telephone; this.validateForm.value['secUser']['telephone'] = this.validateForm.value.telephone;
this.validateForm.value['secUser']['password'] = this.validateForm.value.password; this.validateForm.value['secUser']['password'] = this.validateForm.value.password;
if (this.logoFile.length !== 0) { if (this.logoFile.length !== 0) {
if (this.logoFile[0]['response'] != null) { if (this.logoFile[0]['response'] != null) {
this.validateForm.value.merchantLogo = this.logoFile[0]['response']['return_data'][0]; this.validateForm.value.storeLogo = this.logoFile[0]['response']['return_data'][0];
} else { } else {
this.validateForm.value.merchantLogo = this.logoFile[0].name; this.validateForm.value.storeLogo = this.logoFile[0].name;
} }
} }
if (this.editFlag) { if (this.editFlag) {
@ -121,6 +140,18 @@ export class StoreEditComponent implements OnInit {
if (data['return_code'] === '000000') { if (data['return_code'] === '000000') {
data['return_data'].telephone = data['return_data'].secUser.loginName; data['return_data'].telephone = data['return_data'].secUser.loginName;
data['return_data'].password = data['return_data'].secUser.password; data['return_data'].password = data['return_data'].secUser.password;
if (data['return_data']['storeLogo'] != null && data['return_data']['storeLogo'] !== '') {
const logo = String(data['return_data']['storeLogo']);
const logoArray = [];
logoArray.push(
{
uid: 1,
name: logo,
status: 'done',
url: environment.imageUrl + logo
});
this.logoFile = logoArray;
}
this.validateForm.patchValue(data['return_data']); this.validateForm.patchValue(data['return_data']);
this.getMap(); this.getMap();
} else { } else {

@ -0,0 +1,182 @@
<!-- start 面包屑 -->
<app-breadcrumb></app-breadcrumb>
<!-- end 面包屑 -->
<!--条件搜索-->
<div class="inner-content">
<form nz-form [formGroup]="searchForm" (ngSubmit)="getRequest(true , searchForm.value)">
<div nz-row>
<div nz-col nzSpan="8" *ngIf="roleType === 1">
<nz-form-item>
<nz-form-label [nzSpan]="6">区域公司</nz-form-label>
<nz-form-control [nzSpan]="16">
<nz-select nzShowSearch nzAllowClear [formControlName]="'companyId'" (ngModelChange)="getMerchantListByCompany($event)">
<nz-option *ngFor="let item of companyData" nzValue="{{item.id}}" nzLabel="{{item.name}}"></nz-option>
</nz-select>
</nz-form-control>
</nz-form-item>
</div>
<div nz-col nzSpan="8" *ngIf="roleType === 5 || roleType === 1">
<nz-form-item>
<nz-form-label [nzSpan]="6">商户</nz-form-label>
<nz-form-control [nzSpan]="16">
<nz-select nzShowSearch nzAllowClear [formControlName]="'merchantId'">
<nz-option *ngFor="let item of merchantData" nzValue="{{item.id}}" nzLabel="{{item.merchantName}}"></nz-option>
</nz-select>
</nz-form-control>
</nz-form-item>
</div>
<div nz-col nzSpan="8">
<nz-form-item>
<nz-form-label [nzSpan]="6">订单号</nz-form-label>
<nz-form-control [nzSpan]="16">
<input nz-input 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 formControlName="memDiscountName"/>
</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 formControlName="memPhone"/>
</nz-form-control>
</nz-form-item>
</div>
<div nz-col nzSpan="8">
<nz-form-item>
<nz-form-label [nzSpan]="6">支付模式</nz-form-label>
<nz-form-control [nzSpan]="16">
<nz-select nzShowSearch nzAllowClear formControlName="payModel" nzPlaceHolder="请选择支付模式">
<nz-option nzLabel="金币支付" nzValue="1"></nz-option>
<nz-option nzLabel="第三方支付" nzValue="2"></nz-option>
<nz-option nzLabel="混合支付" nzValue="3"></nz-option>
</nz-select>
</nz-form-control>
</nz-form-item>
</div>
<div nz-col nzSpan="8">
<nz-form-item>
<nz-form-label [nzSpan]="6">支付方式</nz-form-label>
<nz-form-control [nzSpan]="16">
<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-option nzLabel="工会卡" nzValue="4"></nz-option>
<nz-option nzLabel="银联" nzValue="5"></nz-option>
</nz-select>
</nz-form-control>
</nz-form-item>
</div>
<div nz-col nzSpan="8">
<nz-form-item>
<nz-form-label [nzSpan]="6">状态</nz-form-label>
<nz-form-control [nzSpan]="16">
<nz-select nzShowSearch nzAllowClear nzPlaceHolder="请选择订单状态" formControlName="orderStatus">
<nz-option nzLabel="待支付" nzValue="1"></nz-option>
<nz-option nzLabel="已支付" nzValue="2"></nz-option>
<nz-option nzLabel="已完成" nzValue="3"></nz-option>
<nz-option nzLabel="已退款" nzValue="4"></nz-option>
<nz-option nzLabel="已取消" nzValue="5"></nz-option>
<nz-option nzLabel="退款中" nzValue="6"></nz-option>
<nz-option nzLabel="退款失败" nzValue="7"></nz-option>
</nz-select>
</nz-form-control>
</nz-form-item>
</div>
<div nz-col nzSpan="8">
<nz-form-item>
<nz-form-label [nzSpan]="6">时间区间</nz-form-label>
<nz-form-control [nzSpan]="16">
<nz-range-picker [nzShowTime]="{ nzFormat: 'HH:mm' }" formControlName="payTime"></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)="resetForm()"><i nz-icon nzType="reload" nzTheme="outline"></i>重置</button>
</div>
</div>
</form>
</div>
<div class="inner-content">
<span>共计 {{total}} 条数据</span>
<div class="operating-button">
<button nz-button nzType="primary" class="right-btn" (click)="downloadTemplate(searchForm.value)" ><i nz-icon nzType="download" 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="50px">编号</th>
<th nzWidth="180px">商品名称</th>
<th nzWidth="180px">订单来源</th>
<th nzWidth="180px">订单类型</th>
<th nzWidth="180px">订单号</th>
<th nzWidth="180px">支付流水号</th>
<th nzWidth="120px">客户名称</th>
<th nzWidth="130px">客户电话</th>
<th nzWidth="110px">支付模式</th>
<th nzWidth="100px">支付方式</th>
<th nzWidth="100px">支付金额</th>
<th nzWidth="140px">生成时间</th>
<th nzWidth="140px">支付时间</th>
<th nzWidth="140px">取消时间</th>
<th nzRight nzWidth="100px">状态</th>
</tr>
</thead>
<tbody>
<tr *ngFor="let data of ajaxTable.data; let i = index">
<td>{{i+1}}</td>
<td>{{data.goodsName}}</td>
<td>{{data.giveawayType}}</td>
<td>{{data.goodsType}}</td>
<td>{{data.orderNo}}</td>
<td>{{data.paySerialNo}}</td>
<td>{{data.memName == null ? '暂无': data.memName}}</td>
<td>{{data.memPhone == null ? '暂无': data.memPhone}}</td>
<td>{{data.payModel}}</td>
<td>{{data.payType}}</td>
<td>{{data.payPrice}}</td>
<td>{{data.createTime | date: 'yyyy-MM-dd HH:mm:ss'}}</td>
<td>{{data.payTime | date: 'yyyy-MM-dd HH:mm:ss'}}</td>
<td>{{data.cancelTime | date: 'yyyy-MM-dd HH:mm:ss'}}</td>
<td nzRight>{{data.orderStatus}}</td>
</tbody>
</nz-table>
</div>
<nz-modal [(nzVisible)]="isVisible" nzTitle="退款理由" (nzOnCancel)="handleCancel()" (nzOnOk)="handleOk()">
<nz-form-item>
<nz-form-label>退款理由</nz-form-label>
<nz-form-control>
<textarea [(ngModel)]="refundContent" nz-input rows="2" placeholder="请输入退款理由"></textarea>
</nz-form-control>
</nz-form-item>
</nz-modal>

@ -0,0 +1,192 @@
import { Component, OnInit } from '@angular/core';
import {environment} from '../../../../environments/environment';
import {FormBuilder, FormGroup} from '@angular/forms';
import {MerchantService} from '../../../services/merchant.service';
import {IconService} from '../../../services/icon.service';
import {NzMessageService} from 'ng-zorro-antd';
import {Router} from '@angular/router';
import {CommonsService} from '../../../services/commons.service';
import {OrderService} from '../../../services/order.service';
import {CompanyService} from '../../../services/company.service';
import {ADMIN_INFO_OBJECT} from '../../../services/local-storage.namespace';
import {LocalStorageService} from '../../../services/local-storage.service';
@Component({
selector: 'app-dicount-package-order-list',
templateUrl: './dicount-package-order-list.component.html',
styleUrls: ['./dicount-package-order-list.component.scss']
})
export class DicountPackageOrderListComponent implements OnInit {
WEB_SERVE_URL = environment.baseUrl;
FILE_URL = environment.imageUrl;
searchForm: FormGroup; // 搜索框
requestData = []; // 列表数据
companyData = []; // 列表数据
merchantData = []; // 列表数据
total: number; // 页码
pageNum = 1; // 页码
pageSize = 10; // 条码
loading = true;
id: number; // 订单ID
isVisible = false;
refundContent: string;
roleType: number;
constructor(
private form: FormBuilder,
private order: OrderService,
private iconService: IconService,
private message: NzMessageService,
private router: Router,
private company: CompanyService,
private merchant: MerchantService,
private store: LocalStorageService, // 数据请求
private common: CommonsService
) {
}
ngOnInit(): void {
this.init();
this.roleType = this.store.get(ADMIN_INFO_OBJECT)['secRole']['roleType'];
const whereObject = {};
whereObject['pageNum'] = 1;
whereObject['pageSize'] = 10000;
this.company.selectCompanyList(whereObject, data => {
if (data['return_code'] === '000000') {
this.companyData = data['return_data'].list;
} else {
this.message.error(data['return_msg']);
}
});
if (this.roleType === 5) {
this.getMerchantListByCompany(this.store.get(ADMIN_INFO_OBJECT)['bsCompany']['id']);
} else {
this.getMerchantListByCompany(this.searchForm.value.companyId);
}
}
public init(): void {
this.searchForm = this.form.group({
companyId: [null],
merchantId: [null],
orderNo: [null],
paySerialNo: [null],
payModel: [null],
payType: [null],
memDiscountName: [null],
memPhone: [null],
orderStatus: [null],
payTime: [null]
});
this.getRequest(true, this.searchForm.value);
}
// 查询列表
public getRequest(reset: boolean = false, whereObject: object) {
if (whereObject['payTime'] != null && whereObject['payTime'].length !== 0) {
whereObject['payTimeS'] = whereObject['payTime'][0].getTime();
whereObject['payTimeE'] = whereObject['payTime'][1].getTime();
}
this.loading = false;
if (reset) {
this.pageNum = 1;
}
whereObject['pageNum'] = this.pageNum;
whereObject['pageSize'] = this.pageSize;
this.order.getDiscountPackageList(whereObject, data => {
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 getMerchantListByCompany(companyId: number): void {
this.merchant.getMerchantListByCompany(companyId, data => {
if (data['return_code'] === '000000') {
if (data['return_code'] === '000000') {
this.merchantData = data['return_data'];
} else {
this.message.error(data['return_msg']);
}
} else {
this.message.error(data['return_msg']);
}
});
}
// 重置
public resetForm(): void {
this.searchForm.reset();
}
// 查看详情
public getDetail(id: number): void {
this.router.navigate(['/admin/order/order-detail'], {
queryParams: {
merchantId: id
}
}).then(r => console.log(r));
}
// 下载模板
downloadTemplate(whereObject) {
if (whereObject['payTime'] != null && whereObject['payTime'].length !== 0) {
whereObject['payTimeS'] = whereObject['payTime'][0].getTime();
whereObject['payTimeE'] = whereObject['payTime'][1].getTime();
}
this.order.exportDiscountPackageList(whereObject, data => {
if (data['return_code'] === '000000') {
window.location.href = this.FILE_URL + data['return_data'];
} else {
this.message.error(data['return_msg']);
}
});
}
provinceChange(e) {
console.log(e);
}
// 退款
public orderToRefund(id): void {
}
showModal(id): void {
this.id = id;
this.isVisible = true;
}
handleOk(): void {
this.common.showConfirm('确认订单是否退款', item => {
if (item) {
const params = {
orderId: this.id ,
refundContent: this.refundContent
};
this.order.refuelingOrderRefund(params, data => {
if (data['return_code'] === '000000') {
this.getRequest(false, this.searchForm.value);
this.isVisible = false;
this.message.success('退款成功');
} else {
this.message.error(data['return_msg']);
}
});
}
});
}
handleCancel(): void {
this.isVisible = false;
}
}

@ -70,6 +70,8 @@
<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="3"></nz-option> <nz-option nzLabel="金币" nzValue="3"></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>

@ -10,8 +10,12 @@ import {OrderKListComponent} from './order-k-list/order-k-list.component';
import {OrderHListComponent} from './order-h-list/order-h-list.component'; import {OrderHListComponent} from './order-h-list/order-h-list.component';
import {OrderAgentComponent} from './order-agent/order-agent.component'; import {OrderAgentComponent} from './order-agent/order-agent.component';
import {PreOrderComponent} from './pre-order/pre-order.component'; import {PreOrderComponent} from './pre-order/pre-order.component';
<<<<<<< HEAD
import {PackageRecordListComponent} from './package-record-list/package-record-list.component'; import {PackageRecordListComponent} from './package-record-list/package-record-list.component';
import {DiscountUseConditionListComponent} from './discount-use-condition-list/discount-use-condition-list.component'; import {DiscountUseConditionListComponent} from './discount-use-condition-list/discount-use-condition-list.component';
=======
import {DicountPackageOrderListComponent} from './dicount-package-order-list/dicount-package-order-list.component';
>>>>>>> a9b4eaf54ddd85df8da4868c8de4a63783d5eaf6
const routes: Routes = [ const routes: Routes = [
@ -25,8 +29,12 @@ const routes: Routes = [
{ path: 'order-h-list', component: OrderHListComponent }, { path: 'order-h-list', component: OrderHListComponent },
{ path: 'order-agent', component: OrderAgentComponent }, { path: 'order-agent', component: OrderAgentComponent },
{ path: 'pre-order', component: PreOrderComponent }, { path: 'pre-order', component: PreOrderComponent },
<<<<<<< HEAD
{ path: 'package-record-list', component: PackageRecordListComponent }, { path: 'package-record-list', component: PackageRecordListComponent },
{ path: 'discount-use-condition-list', component: DiscountUseConditionListComponent }, { path: 'discount-use-condition-list', component: DiscountUseConditionListComponent },
=======
{ path: 'discount-package-order-list', component: DicountPackageOrderListComponent},
>>>>>>> a9b4eaf54ddd85df8da4868c8de4a63783d5eaf6
]; ];
@NgModule({ @NgModule({

@ -20,22 +20,20 @@ import { OrderAgentComponent } from './order-agent/order-agent.component';
import { PreOrderComponent } from './pre-order/pre-order.component'; import { PreOrderComponent } from './pre-order/pre-order.component';
import { PackageRecordListComponent } from './package-record-list/package-record-list.component'; import { PackageRecordListComponent } from './package-record-list/package-record-list.component';
import { DiscountUseConditionListComponent } from './discount-use-condition-list/discount-use-condition-list.component'; import { DiscountUseConditionListComponent } from './discount-use-condition-list/discount-use-condition-list.component';
import {NzSpaceModule} from "_ng-zorro-antd@9.3.0@ng-zorro-antd/space"; import {DicountPackageOrderListComponent} from "./dicount-package-order-list/dicount-package-order-list.component";
@NgModule({ @NgModule({
declarations: [OrderListComponent, OrderDetailComponent, OrderCouponsComponent, OrderCouponComponent , OrderTListComponent, OrderKListComponent , OrderCListComponent, OrderHListComponent, OrderAgentComponent, PreOrderComponent, PackageRecordListComponent, DiscountUseConditionListComponent], declarations: [OrderListComponent, OrderDetailComponent, OrderCouponsComponent, OrderCouponComponent , OrderTListComponent, OrderKListComponent , OrderCListComponent, OrderHListComponent, OrderAgentComponent, PreOrderComponent, PackageRecordListComponent, DiscountUseConditionListComponent, DicountPackageOrderListComponent],
imports: [ imports: [
CommonModule, CommonModule,
OrderRoutingModule, OrderRoutingModule,
NgZorroAntdModule, NgZorroAntdModule,
SeparateModule, SeparateModule,
ReactiveFormsModule, ReactiveFormsModule,
FormsModule, FormsModule,
BreadcrumbModule, BreadcrumbModule,
RegionSelectorModule, RegionSelectorModule,
AppCommonModule, AppCommonModule
NzSpaceModule ]
]
}) })
export class OrderModule { } export class OrderModule { }

@ -180,5 +180,18 @@ export class DiscountPackageService {
}); });
} }
/**
* @Author Sum1Dream
* @methodName getDiscountPackageOrderList
* @Description // 查询优惠券包订单列表
* @Date 4:19 2021/12/9
* @Param [paramsObject: object, callBack]
*/
public getDiscountPackageOrderList(paramsObject: object, callBack) {
this.http.get(environment.baseUrl + 'highDiscountPackage/getDiscountPackageOrderList?' + this.common.getWhereCondition(paramsObject)).subscribe(data => {
callBack(data);
});
}
} }

@ -26,6 +26,19 @@ export class OrderService {
}); });
} }
/**
* @Author Sum1Dream
* @methodName getDiscountPackageList
* @Description // 查询优惠券包订单列表
* @Date 5:24 2021/12/9
* @Param [paramsObject: object, callBack]
*/
public getDiscountPackageList(paramsObject: object, callBack) {
this.http.get(environment.baseUrl + 'highOrder/getDiscountPackageList?' + this.common.getWhereCondition(paramsObject)).subscribe(data => {
callBack(data);
});
}
/** /**
* *
* *
@ -93,6 +106,19 @@ export class OrderService {
}); });
} }
/**
* @Author Sum1Dream
* @methodName exportDiscountPackageList
* @Description // 到处优惠券包订单列表
* @Date 5:25 2021/12/9
* @Param [paramsObject: object, callBack]
*/
public exportDiscountPackageList(paramsObject: object, callBack) {
this.http.get(environment.baseUrl + 'highOrder/exportDiscountPackageList?' + this.common.getWhereCondition(paramsObject)).subscribe(data => {
callBack(data);
});
}
/** /**
* @Author Sum1Dream * @Author Sum1Dream
* @methodName exportListPreOrder * @methodName exportListPreOrder

Loading…
Cancel
Save