解决冲突

pull/1/head
袁野 3 years ago
commit ee77471f6d
  1. 27
      src/app/admin/audit/refund-audit/refund-audit.component.html
  2. 64
      src/app/admin/audit/refund-audit/refund-audit.component.ts
  3. 123
      src/app/admin/config-manage/brand/brand.component.html
  4. 4
      src/app/admin/config-manage/brand/brand.component.scss
  5. 25
      src/app/admin/config-manage/brand/brand.component.spec.ts
  6. 205
      src/app/admin/config-manage/brand/brand.component.ts
  7. 5
      src/app/admin/config-manage/goods-type/goods-type.component.html
  8. 58
      src/app/admin/config-manage/goods-type/goods-type.component.ts
  9. 38
      src/app/admin/coupon/coupon-edit/coupon-edit.component.html
  10. 33
      src/app/admin/coupon/coupon-edit/coupon-edit.component.ts
  11. 20
      src/app/admin/coupon/coupon-list/coupon-list.component.html
  12. 27
      src/app/admin/coupon/coupon-list/coupon-list.component.ts
  13. 8
      src/app/admin/order/order-list/order-list.component.html
  14. 13
      src/app/admin/order/order-list/order-list.component.ts
  15. 4
      src/app/admin/order/order-routing.module.ts
  16. 3
      src/app/admin/order/order.module.ts
  17. 236
      src/app/admin/order/pre-order/pre-order.component.html
  18. 0
      src/app/admin/order/pre-order/pre-order.component.scss
  19. 287
      src/app/admin/order/pre-order/pre-order.component.ts
  20. 4
      src/app/app-common.module.ts
  21. 2
      src/app/pipes/audit/refund-source.pipe.ts
  22. 19
      src/app/pipes/commons/button.pipe.ts
  23. 2
      src/app/pipes/display-area.pipe.ts
  24. 2
      src/app/pipes/index.ts
  25. 4
      src/app/pipes/order/order-coupon-status.pipe.ts
  26. 20
      src/app/pipes/order/pre-order-status.pipe.ts
  27. 4
      src/app/pipes/paytype.pipe.ts
  28. 90
      src/app/services/config.service.ts
  29. 84
      src/app/services/order.service.ts
  30. 14
      src/app/services/recharge.service.ts
  31. 4
      src/environments/environment.ts

@ -106,15 +106,15 @@
<td>{{i+1}}</td> <td>{{i+1}}</td>
<td>{{data.refundSource | refundSource}}</td> <td>{{data.refundSource | refundSource}}</td>
<td>{{data.sourceOrderNo}}</td> <td>{{data.sourceOrderNo}}</td>
<td>{{data.payPrice}}</td> <td>{{data.refundPrice}}</td>
<td>{{data.createdUserName == null ? '暂无': data.createdUserName}}</td> <td>{{data.createdUserName == null ? '暂无': data.createdUserName}}</td>
<td>{{data.createdTime | date: 'yyyy-MM-dd HH:mm:ss'}}</td> <td>{{data.createdTime | date: 'yyyy-MM-dd HH:mm:ss'}}</td>
<td nzRight>{{data.payType | rechargePayType}}</td> <td nzRight>{{data.payType | rechargePayType}}</td>
<td nzRight>{{data.status | refundStatus}}</td> <td nzRight>{{data.status | refundStatus}}</td>
<td nzRight class="table-td-operation"> <td nzRight class="table-td-operation">
<a (click)="getDetail(data.ext1)">详情</a> <a (click)="getDetail(data.ext1 , data.refundSource)">详情</a>
<nz-divider *ngIf="data['status'] === 0" nzType="vertical"></nz-divider> <nz-divider *ngIf="data['status'] === 0" nzType="vertical"></nz-divider>
<a (click)="orderToRefund(data.ext1)" *ngIf="data['status'] === 0">通过</a> <a (click)="orderToRefund(data.ext1 , data.refundSource)" *ngIf="data['status'] === 0">通过</a>
<nz-divider *ngIf="data['status'] === 0" nzType="vertical"></nz-divider> <nz-divider *ngIf="data['status'] === 0" nzType="vertical"></nz-divider>
<a (click)="getRefundReject(data.id)" *ngIf="data['status'] === 0">驳回</a> <a (click)="getRefundReject(data.id)" *ngIf="data['status'] === 0">驳回</a>
</td> </td>
@ -122,14 +122,14 @@
</nz-table> </nz-table>
</div> </div>
<nz-modal [(nzVisible)]="isVisible" nzTitle="订单详情" nzWidth="1200"> <nz-modal [(nzVisible)]="isVisible" nzTitle="订单详情" nzWidth="1200" (nzOnCancel)="handleCancel()" (nzOnOk)="handleCancel()">
<nz-descriptions nzBordered [nzColumn]="{ xxl: 4, xl: 3, lg: 3, md: 3, sm: 2, xs: 1 }"> <nz-descriptions *ngIf="refundSource === 1" nzBordered [nzColumn]="{ xxl: 4, xl: 3, lg: 3, md: 3, sm: 2, xs: 1 }">
<nz-descriptions-item nzTitle="订单名称">{{data['remarks']}}</nz-descriptions-item> <nz-descriptions-item nzTitle="订单名称">{{data['remarks']}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="订单类型">{{data['rechargeModel'] | rechargePrice}}</nz-descriptions-item> <nz-descriptions-item nzTitle="订单类型">{{data['rechargeModel'] | rechargePrice}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="订单号">{{data['orderNo']}}</nz-descriptions-item> <nz-descriptions-item nzTitle="订单号">{{data['orderNo']}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="客户名称">{{data['userName'] == null ? '暂无': data['userName']}}</nz-descriptions-item> <nz-descriptions-item nzTitle="客户名称">{{data['userName'] == null ? '暂无': data['userName']}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="充值号码">{{data['rechargeContent'] == null ? '暂无': data['rechargeContent']}}</nz-descriptions-item> <nz-descriptions-item nzTitle="充值号码">{{data['rechargeContent'] == null ? '暂无': data['rechargeContent']}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="身份证号" *ngIf="data['rechargeModel'] === 3 ">{{data['idCard']}}</nz-descriptions-item> <nz-descriptions-item nzTitle="号" *ngIf="data['rechargeModel'] === 3 ">{{data['idCard']}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="充值姓名" *ngIf="data['rechargeModel'] === 3 ">{{data['rechargeName']}}</nz-descriptions-item> <nz-descriptions-item nzTitle="充值姓名" *ngIf="data['rechargeModel'] === 3 ">{{data['rechargeName']}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="充值金额">{{data['orderPrice']}}</nz-descriptions-item> <nz-descriptions-item nzTitle="充值金额">{{data['orderPrice']}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="支付金额">{{data['payPrice']}}</nz-descriptions-item> <nz-descriptions-item nzTitle="支付金额">{{data['payPrice']}}</nz-descriptions-item>
@ -141,8 +141,17 @@
<nz-descriptions-item *ngIf="data['refundTime'] != null" nzTitle="退款时间">{{data['refundTime'] | date: 'yyyy-MM-dd HH:mm:ss'}}</nz-descriptions-item> <nz-descriptions-item *ngIf="data['refundTime'] != null" nzTitle="退款时间">{{data['refundTime'] | date: 'yyyy-MM-dd HH:mm:ss'}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="状态">{{data['status'] | rechargeStatus}}</nz-descriptions-item> <nz-descriptions-item nzTitle="状态">{{data['status'] | rechargeStatus}}</nz-descriptions-item>
</nz-descriptions> </nz-descriptions>
<div *nzModalFooter>
<button nz-button nzType="default" (click)="handleCancel()">取消</button> <nz-descriptions *ngIf="refundSource === 2" nzBordered [nzColumn]="{ xxl: 4, xl: 3, lg: 3, md: 3, sm: 2, xs: 1 }">
</div> <nz-descriptions-item nzTitle="商品名称">{{data['highChildOrderList'][0]['goodsName']}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="支付类型">{{data['payType'] | paytype}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="支付金额">{{data['payPrice']}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="客户名称">{{data['memName']}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="客户电话">{{data['memPhone']}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="订单号">{{data['orderNo']}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="创建时间">{{data['createTime'] | date: 'yyyy-MM-dd HH:mm:ss'}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="支付时间">{{data['payTime'] | date: 'yyyy-MM-dd HH:mm:ss'}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="订单状态">{{data['orderStatus'] | orderCouponStatus}}</nz-descriptions-item>
</nz-descriptions>
</nz-modal> </nz-modal>

@ -10,7 +10,8 @@ import {RechargeService} from '../../../services/recharge.service';
import {NzMessageService, NzNotificationService} from 'ng-zorro-antd'; import {NzMessageService, NzNotificationService} from 'ng-zorro-antd';
import {FormBuilder, FormGroup, Validators} from '@angular/forms'; import {FormBuilder, FormGroup, Validators} from '@angular/forms';
import {Router} from '@angular/router'; import {Router} from '@angular/router';
import {AuditService} from "../../../services/audit.service"; import {AuditService} from '../../../services/audit.service';
import {OrderService} from '../../../services/order.service';
@Component({ @Component({
selector: 'app-refund-audit', selector: 'app-refund-audit',
@ -30,6 +31,7 @@ export class RefundAuditComponent implements OnInit {
loading = true; loading = true;
isVisible = false; isVisible = false;
id: number; id: number;
refundSource: number;
edit = false; edit = false;
data = {}; data = {};
private timer; // 定时器 private timer; // 定时器
@ -43,6 +45,7 @@ export class RefundAuditComponent implements OnInit {
private message: NzMessageService, private message: NzMessageService,
private router: Router, private router: Router,
private notification: NzNotificationService, private notification: NzNotificationService,
private order: OrderService,
private common: CommonsService private common: CommonsService
) { ) {
} }
@ -107,16 +110,27 @@ export class RefundAuditComponent implements OnInit {
} }
// 详情 // 详情
public getDetail(id: number): void { public getDetail(id: number , refundSource: number): void {
this.id = id; this.id = id;
this.recharge.getOrderById(id , data => { this.refundSource = refundSource;
if (data['return_code'] === '000000') { if (refundSource === 1) {
console.log(data); this.recharge.getOrderById(id , data => {
this.data = data['return_data']; if (data['return_code'] === '000000') {
} else { console.log(data);
this.message.error(data['return_msg']); this.data = data['return_data'];
} } else {
}); this.message.error(data['return_msg']);
}
});
} else {
this.order.getOrderById(id , data => {
if (data['return_code'] === '000000') {
this.data = data['return_data'];
} else {
this.message.error(data['return_msg']);
}
});
}
this.isVisible = true; this.isVisible = true;
} }
@ -128,17 +142,29 @@ export class RefundAuditComponent implements OnInit {
public orderToRefund(id): void { public orderToRefund(id , refundSource: number): void {
this.common.showConfirm('确认订单是否退款', item => { this.common.showConfirm('确认订单是否退款', item => {
if (item) { if (item) {
this.recharge.orderToRefund(id, data => { if (refundSource === 1) {
if (data['return_code'] === '000000') { this.recharge.orderToRefund(id, data => {
this.message.success('退款成功'); if (data['return_code'] === '000000') {
this.getRequest(false, this.searchForm.value); this.message.success('退款成功');
} else { this.getRequest(false, this.searchForm.value);
this.message.error(data['return_msg']); } else {
} this.message.error(data['return_msg']);
}); }
});
} else {
this.recharge.orderToRefundPre(id, data => {
if (data['return_code'] === '000000') {
this.message.success('退款成功');
this.getRequest(false, this.searchForm.value);
} else {
this.message.error(data['return_msg']);
}
});
}
} }
}); });
} }

@ -1 +1,122 @@
<p>brand works!</p> <!-- 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">
<nz-select nzShowSearch nzAllowClear formControlName="goodTypeId" nzPlaceHolder="请选择商品类别">
<nz-option *ngFor="let item of goodTypData" nzLabel="{{item.title}}" nzValue="{{item.id}}"></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>
<div class="operating-button">
<button nz-button nzType="primary" class="right-btn" (click)="getEdit()" ><i nz-icon nzType="plus" 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="80px">标题</th>
<th nzWidth="80px">图片</th>
<th nzWidth="100px">创建时间</th>
<th nzWidth="100px">更新时间</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.title}}</td>
<td>
<img class="head_img" src="{{WEB_SERVE_URL + data.img}}" onerror="this.src='../../../../assets/admin/navigation/icon.png'" alt="">
</td>
<td>{{data.createdTime | date: 'yyyy-MM-dd HH:mm'}}</td>
<td>{{data.updatedTime | date: 'yyyy-MM-dd HH:mm'}}</td>
<td nzRight="0px" class="table-td-operation">
<a (click)="getEdit(data.id)">编辑</a>
<nz-divider nzType="vertical"></nz-divider>
<a (click)="getDetail(data.id)">删除</a>
</td>
</tbody>
</nz-table>
</div>
<nz-modal [(nzVisible)]="isVisible" nzTitle="编辑" (nzOnCancel)="handleCancel()" (nzOnOk)="handleOk()">
<form nz-form [formGroup]="validateForm">
<nz-form-item>
<nz-form-label [nzSpan]="4" nzRequired>标题</nz-form-label>
<nz-form-control [nzSpan]="12" nzErrorTip="请输入标题!">
<input nz-input placeholder="请输入标题..." [formControlName]="'title'" />
</nz-form-control>
</nz-form-item>
<nz-form-item>
<nz-form-label [nzSpan]="4" nzRequired>商品类别</nz-form-label>
<nz-form-control [nzSpan]="12" nzErrorTip="请选择商品类别!">
<nz-select nzShowSearch nzAllowClear formControlName="goodTypeId" nzPlaceHolder="请选择商品类别">
<nz-option *ngFor="let item of goodTypData" nzLabel="{{item.title}}" nzValue="{{item.id}}"></nz-option>
</nz-select>
</nz-form-control>
</nz-form-item>
<nz-form-item>
<nz-form-label [nzSpan]="4" nzRequired>图片</nz-form-label>
<nz-form-control [nzSpan]="20" nzErrorTip="请上传图片!">
<nz-upload
nzAction="{{WEB_SERVE_URL}}/fileUpload/uploadfile"
nzListType="picture-card"
[(nzFileList)]="imgFile"
[nzShowButton]="imgFile.length < 1"
[nzPreview]="handlePreview"
>
<i nz-icon nzType="plus"></i>
<div class="ant-upload-text">上传图片</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>
</form>
</nz-modal>

@ -0,0 +1,4 @@
.head_img {
height: 60px;
width: 60px;
}

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

@ -1,4 +1,19 @@
import { Component, OnInit } from '@angular/core'; import { Component, OnInit } from '@angular/core';
import {environment} from '../../../../environments/environment';
import {FormBuilder, FormGroup, Validators} from '_@angular_forms@9.0.7@@angular/forms';
import {IconService} from '../../../services/icon.service';
import {NzMessageService, NzModalService, NzUploadFile} from '_ng-zorro-antd@9.3.0@ng-zorro-antd';
import {Router} from '_@angular_router@9.0.7@@angular/router';
import {ConfigService} from '../../../services/config.service';
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-brand', selector: 'app-brand',
@ -7,9 +22,197 @@ import { Component, OnInit } from '@angular/core';
}) })
export class BrandComponent implements OnInit { export class BrandComponent implements OnInit {
constructor() { } WEB_SERVE_URL = environment.baseUrl;
searchForm: FormGroup; // 搜索框
requestData = []; // 列表数据
total: number; // 页码
pageNum = 1; // 页码
pageSize = 10; // 条码
loading = true;
isVisible = false;
editFlag = false;
id: number;
validateForm!: FormGroup;
imgFile = [];
previewImage: string | undefined = '';
previewVisible = false;
goodTypData;
constructor(
private form: FormBuilder,
private config: ConfigService,
private iconService: IconService,
private message: NzMessageService,
private router: Router,
private modalService: NzModalService,
private fb: FormBuilder,
) {
}
ngOnInit(): void { ngOnInit(): void {
this.init();
}
public init(): void {
this.searchForm = this.form.group({
title: [null],
goodTypeId: [null],
});
this.validateForm = this.fb.group({
title: [null, [Validators.required]],
goodTypeId: [null, [Validators.required]],
});
this.getRequest(true, this.searchForm.value);
this.config.getListGoodsType({
pageNum: 1 ,
pageSize: 1000000 ,
} , data => {
this.goodTypData = data['return_data']['list'];
});
}
// 图片查看
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;
}
// 查询列表
public getRequest(reset: boolean = false, whereObject: object) {
this.loading = false;
if (reset) {
this.pageNum = 1;
}
whereObject['pageNum'] = this.pageNum;
whereObject['pageSize'] = this.pageSize;
this.config.getBrandByList(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();
}
// 修改
public getEdit(id?: number): void {
this.validateForm.reset();
this.editFlag = false;
this.imgFile = [];
this.id = id;
if (id != null) {
this.editFlag = true;
this.config.findById(id , data => {
data['return_data'].goodTypeId = String(data['return_data'].goodTypeId);
if (data['return_data']['img'] != null && data['return_data']['img'] !== '') {
const img = String(data['return_data']['img']);
const imgArray = [];
imgArray.push(
{
uid: 1,
name: img,
status: 'done',
url: environment.imageUrl + img
});
this.imgFile = imgArray;
}
this.validateForm.patchValue(data['return_data']);
});
}
this.isVisible = true;
}
// 查看详情
public getDetail(id: number): void {
this.router.navigate(['/admin/company/company-detail'], {
queryParams: {
companyId: id
}
}).then(r => console.log(r));
}
handleOk(): void {
// tslint:disable-next-line:forin
for (const i in this.validateForm.controls) {
this.validateForm.controls[i].markAsDirty();
this.validateForm.controls[i].updateValueAndValidity();
if (this.validateForm.controls[i].errors != null) {
this.message.error('必填项不能为空');
return;
}
}
if (this.imgFile.length !== 0) {
if (this.imgFile[0]['response'] != null) {
this.validateForm.value.img = this.imgFile[0]['response']['return_data'][0];
} else {
this.validateForm.value.img = this.imgFile[0].name;
}
}
if (this.editFlag) {
this.validateForm.value.id = this.id;
this.config.updateBrand(this.validateForm.value, data => {
if (data['return_code'] === '000000') {
this.message.success('修改成功');
this.isVisible = false;
this.getRequest(true, this.searchForm.value);
} else {
this.message.create('error', data['return_msg']);
}
});
} else {
this.config.insertBrand(this.validateForm.value, data => {
if (data['return_code'] === '000000') {
this.message.success('添加成功');
this.isVisible = false;
this.getRequest(true, this.searchForm.value);
} else {
this.message.create('error', data['return_msg']);
}
});
}
} }
handleCancel(): void {
this.isVisible = false;
}
// 對話框删除
showDeleteConfirm(id): void {
this.modalService.confirm({
nzTitle: '确定删除',
nzOkText: '是',
nzOnOk: () => this.onDelete(id),
nzCancelText: '否',
});
}
onDelete(ids) {
this.config.getByDelete({
id: ids
}, data => {
if (data['return_code'] === '000000') {
this.message.create('success', `删除成功!`);
this.getRequest(true, this.searchForm.value);
} else {
this.message.create('error', data['return_msg']);
}
});
}
} }

@ -57,7 +57,7 @@
<tbody> <tbody>
<tr *ngFor="let data of ajaxTable.data; let i = index"> <tr *ngFor="let data of ajaxTable.data; let i = index">
<td>{{i+1}}</td> <td>{{i+1}}</td>
<td>{{data.titile}}</td> <td>{{data.title}}</td>
<td> <td>
<img class="head_img" src="{{WEB_SERVE_URL + data.img}}" onerror="this.src='../../../../assets/admin/navigation/icon.png'" alt=""> <img class="head_img" src="{{WEB_SERVE_URL + data.img}}" onerror="this.src='../../../../assets/admin/navigation/icon.png'" alt="">
</td> </td>
@ -66,6 +66,7 @@
<td nzRight="0px" class="table-td-operation"> <td nzRight="0px" class="table-td-operation">
<a (click)="getEdit(data.id)">编辑</a> <a (click)="getEdit(data.id)">编辑</a>
<nz-divider nzType="vertical"></nz-divider> <nz-divider nzType="vertical"></nz-divider>
<a (click)="getDetail(data.id)">删除</a>
</td> </td>
</tbody> </tbody>
</nz-table> </nz-table>
@ -75,7 +76,7 @@
<form nz-form [formGroup]="validateForm"> <form nz-form [formGroup]="validateForm">
<nz-form-item> <nz-form-item>
<nz-form-label [nzSpan]="4" nzRequired>标题</nz-form-label> <nz-form-label [nzSpan]="4" nzRequired>标题</nz-form-label>
<nz-form-control [nzSpan]="20" nzErrorTip="请输入标题!"> <nz-form-control [nzSpan]="12" nzErrorTip="请输入标题!">
<input nz-input placeholder="请输入标题..." [formControlName]="'title'" /> <input nz-input placeholder="请输入标题..." [formControlName]="'title'" />
</nz-form-control> </nz-form-control>
</nz-form-item> </nz-form-item>

@ -2,7 +2,7 @@ import { Component, OnInit } from '@angular/core';
import {environment} from '../../../../environments/environment'; import {environment} from '../../../../environments/environment';
import {FormBuilder, FormGroup, Validators} from '_@angular_forms@9.0.7@@angular/forms'; import {FormBuilder, FormGroup, Validators} from '_@angular_forms@9.0.7@@angular/forms';
import {IconService} from '../../../services/icon.service'; import {IconService} from '../../../services/icon.service';
import {NzMessageService, NzUploadFile} from '_ng-zorro-antd@9.3.0@ng-zorro-antd'; import {NzMessageService, NzModalService, NzUploadFile} from '_ng-zorro-antd@9.3.0@ng-zorro-antd';
import {Router} from '_@angular_router@9.0.7@@angular/router'; import {Router} from '_@angular_router@9.0.7@@angular/router';
import {ConfigService} from '../../../services/config.service'; import {ConfigService} from '../../../services/config.service';
@ -42,6 +42,7 @@ export class GoodsTypeComponent implements OnInit {
private iconService: IconService, private iconService: IconService,
private message: NzMessageService, private message: NzMessageService,
private router: Router, private router: Router,
private modalService: NzModalService,
private fb: FormBuilder, private fb: FormBuilder,
) { ) {
} }
@ -99,6 +100,28 @@ export class GoodsTypeComponent implements OnInit {
// 修改 // 修改
public getEdit(id?: number): void { public getEdit(id?: number): void {
this.id = id; this.id = id;
if (id != null) {
this.editFlag = true;
this.config.getGoodsTypeById(id , data => {
if (data['return_data']['img'] != null && data['return_data']['img'] !== '') {
const img = String(data['return_data']['img']);
const imgArray = [];
imgArray.push(
{
uid: 1,
name: img,
status: 'done',
url: environment.imageUrl + img
});
this.imgFile = imgArray;
}
this.validateForm.patchValue(data['return_data']);
});
} else {
this.validateForm.reset();
this.editFlag = false;
this.imgFile = [];
}
this.isVisible = true; this.isVisible = true;
} }
@ -131,19 +154,21 @@ export class GoodsTypeComponent implements OnInit {
} }
if (this.editFlag) { if (this.editFlag) {
this.validateForm.value.id = this.id; this.validateForm.value.id = this.id;
this.config.insertGoodsType(this.validateForm.value, data => { this.config.updateGoodsType(this.validateForm.value, data => {
if (data['return_code'] === '000000') { if (data['return_code'] === '000000') {
this.message.success('修改成功'); this.message.success('修改成功');
this.isVisible = false;
this.getRequest(true, this.searchForm.value);
} else { } else {
this.message.create('error', '修改失败'); this.message.create('error', data['return_msg']);
} }
}); });
} else { } else {
this.config.insertGoodsType(this.validateForm.value, data => { this.config.insertGoodsType(this.validateForm.value, data => {
console.log(data);
if (data['return_code'] === '000000') { if (data['return_code'] === '000000') {
this.message.success('添加成功'); this.message.success('添加成功');
this.isVisible = false;
this.getRequest(true, this.searchForm.value);
} else { } else {
this.message.create('error', data['return_msg']); this.message.create('error', data['return_msg']);
} }
@ -155,5 +180,28 @@ export class GoodsTypeComponent implements OnInit {
this.isVisible = false; this.isVisible = false;
} }
// 對話框删除
showDeleteConfirm(id): void {
this.modalService.confirm({
nzTitle: '确定删除',
nzOkText: '是',
nzOnOk: () => this.onDelete(id),
nzCancelText: '否',
});
}
onDelete(ids) {
this.config.getGoodsTypeByDelete({
id: ids
}, data => {
if (data['return_code'] === '000000') {
this.message.create('success', `删除成功!`);
this.getRequest(true, this.searchForm.value);
} else {
this.message.create('error', data['return_msg']);
}
});
}
} }

@ -43,6 +43,7 @@
</nz-form-control> </nz-form-control>
</nz-form-item> </nz-form-item>
</div> </div>
<div nz-col [nzSpan]="8" *ngIf="validateForm.value.couponSource !== '2'"> <div nz-col [nzSpan]="8" *ngIf="validateForm.value.couponSource !== '2'">
<nz-form-item> <nz-form-item>
<nz-form-label [nzFor]="'displayArea'" nzRequired>展示区域</nz-form-label> <nz-form-label [nzFor]="'displayArea'" nzRequired>展示区域</nz-form-label>
@ -51,6 +52,7 @@
<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-select> </nz-select>
</nz-form-control> </nz-form-control>
</nz-form-item> </nz-form-item>
@ -124,11 +126,33 @@
</nz-form-control> </nz-form-control>
</nz-form-item> </nz-form-item>
</div> </div>
<div nz-col [nzSpan]="8"> <div nz-col [nzSpan]="8">
<nz-form-item> <nz-form-item>
<nz-form-label [nzFor]="'recycleDay'" nzRequired>归库天数</nz-form-label> <nz-form-label [nzFor]="'goodsTypeId'" >商品分类</nz-form-label>
<nz-form-control nzErrorTip="请输入归库天数!"> <nz-form-control>
<input nz-input [type] ="'number'" placeholder="请输入归库天数 ..." [formControlName]="'recycleDay'" id="'recycleDay'" /> <nz-select nzPlaceHolder="请选择商品分类" (ngModelChange)="getBrandByList($event)" [formControlName]="'goodsTypeId'">
<nz-option *ngFor="let item of goodsTypeData" nzValue="{{item.id}}" nzLabel="{{item.title}}"></nz-option>
</nz-select>
</nz-form-control>
</nz-form-item>
</div>
<div nz-col [nzSpan]="8">
<nz-form-item>
<nz-form-label [nzFor]="'brandId'" >品牌</nz-form-label>
<nz-form-control>
<nz-select nzPlaceHolder="请选择品牌" [formControlName]="'brandId'">
<nz-option *ngFor="let item of brandData" nzValue="{{item.id}}" nzLabel="{{item.title}}"></nz-option>
</nz-select>
</nz-form-control>
</nz-form-item>
</div>
<div nz-col [nzSpan]="8">
<nz-form-item>
<nz-form-label [nzFor]="'isPresent'" nzRequired>是否预约产品</nz-form-label>
<nz-form-control nzErrorTip="请选择是否预约产品!">
<nz-switch [formControlName]="'reserveStatus'" ></nz-switch>
</nz-form-control> </nz-form-control>
</nz-form-item> </nz-form-item>
</div> </div>
@ -141,6 +165,14 @@
</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 [nzFor]="'recycleDay'" nzRequired>归库天数</nz-form-label>
<nz-form-control nzErrorTip="请输入归库天数!">
<input nz-input [type] ="'number'" placeholder="请输入归库天数 ..." [formControlName]="'recycleDay'" id="'recycleDay'" />
</nz-form-control>
</nz-form-item>
</div>
<div nz-col [nzSpan]="16" *ngIf="validateForm.value.isPresent"> <div nz-col [nzSpan]="16" *ngIf="validateForm.value.isPresent">

@ -7,6 +7,7 @@ import {ActivatedRoute} from '@angular/router';
import {CouponService} from '../../../services/coupon.service'; import {CouponService} from '../../../services/coupon.service';
import {IconService} from '../../../services/icon.service'; import {IconService} from '../../../services/icon.service';
import {CommonsService} from '../../../services/commons.service'; import {CommonsService} from '../../../services/commons.service';
import {ConfigService} from "../../../services/config.service";
function getBase64(file: File): Promise<string | ArrayBuffer | null> { function getBase64(file: File): Promise<string | ArrayBuffer | null> {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
const reader = new FileReader(); const reader = new FileReader();
@ -46,11 +47,14 @@ export class CouponEditComponent implements OnInit {
pageNumCoupon = 1; pageNumCoupon = 1;
couponName: string; couponName: string;
content: string; content: string;
goodsTypeData;
brandData;
constructor( constructor(
private fb: FormBuilder, private fb: FormBuilder,
private merchant: MerchantService, private merchant: MerchantService,
private coupon: CouponService, private coupon: CouponService,
private common: CommonsService, private common: CommonsService,
private config: ConfigService,
private message: NzMessageService, // 信息提示 private message: NzMessageService, // 信息提示
private activatedRoute: ActivatedRoute, private activatedRoute: ActivatedRoute,
) { ) {
@ -79,6 +83,7 @@ export class CouponEditComponent implements OnInit {
discountPrice: [null, [Validators.required]], discountPrice: [null, [Validators.required]],
merchantId: [null, [Validators.required]], merchantId: [null, [Validators.required]],
isPresent: [false], isPresent: [false],
reserveStatus: [false],
payType: [null, [Validators.required]], payType: [null, [Validators.required]],
displayArea: [null], displayArea: [null],
couponSource: [null], couponSource: [null],
@ -86,10 +91,20 @@ export class CouponEditComponent implements OnInit {
status: [null], status: [null],
couponKey: [null], couponKey: [null],
createTime: [null], createTime: [null],
brandId: [null],
goodsTypeId: [null],
secUser: {}, secUser: {},
}); });
}
const params = {
pageNum: 1,
pageSize: 10000
};
this.config.getListGoodsType(params , data => {
this.goodsTypeData = data['return_data'].list;
});
}
// 查询商户 // 查询商户
loadMore(): void { loadMore(): void {
@ -102,6 +117,7 @@ export class CouponEditComponent implements OnInit {
this.getMerchantList(paramsObject); this.getMerchantList(paramsObject);
} }
// 搜索商户 // 搜索商户
search(e): void { search(e): void {
this.optionList = []; this.optionList = [];
@ -155,6 +171,19 @@ export class CouponEditComponent implements OnInit {
this.getCouponList(paramsObject); this.getCouponList(paramsObject);
} }
public getBrandByList(e): void {
const params = {
pageNum: 1,
pageSize: 10000,
goodTypeId: e
};
this.config.getBrandByList(params , data => {
this.brandData = data['return_data'].list;
});
}
// 查询卡券 // 查询卡券
public getCouponList(paramsObject): void { public getCouponList(paramsObject): void {
this.coupon.getCouponList(paramsObject , data => { this.coupon.getCouponList(paramsObject , data => {
@ -284,6 +313,8 @@ export class CouponEditComponent implements OnInit {
data['return_data']['couponType'] = String(data['return_data']['couponType']); data['return_data']['couponType'] = String(data['return_data']['couponType']);
data['return_data']['displayArea'] = String(data['return_data']['displayArea']); data['return_data']['displayArea'] = String(data['return_data']['displayArea']);
data['return_data']['payType'] = String(data['return_data']['payType']); data['return_data']['payType'] = String(data['return_data']['payType']);
data['return_data']['brandId'] = String(data['return_data']['brandId']);
data['return_data']['goodsTypeId'] = String(data['return_data']['goodsTypeId']);
data['return_data']['couponSource'] = String(data['return_data']['couponSource']); data['return_data']['couponSource'] = String(data['return_data']['couponSource']);
if (data['return_data']['couponImg'] != null && data['return_data']['couponImg'] !== '') { if (data['return_data']['couponImg'] != null && data['return_data']['couponImg'] !== '') {
const couponImg = String(data['return_data']['couponImg']); const couponImg = String(data['return_data']['couponImg']);

@ -15,6 +15,26 @@
</nz-form-control> </nz-form-control>
</nz-form-item> </nz-form-item>
</div> </div>
<div nz-col nzSpan="6">
<nz-form-item>
<nz-form-label [nzSpan]="6">商品分类</nz-form-label>
<nz-form-control [nzSpan]="16">
<nz-select nzPlaceHolder="请选择商品分类" (ngModelChange)="getBrandByList($event)" [formControlName]="'goodsTypeId'">
<nz-option *ngFor="let item of goodsTypeData" nzValue="{{item.id}}" nzLabel="{{item.title}}"></nz-option>
</nz-select>
</nz-form-control>
</nz-form-item>
</div>
<div nz-col nzSpan="6">
<nz-form-item>
<nz-form-label >品牌</nz-form-label>
<nz-form-control>
<nz-select nzPlaceHolder="请选择品牌" [formControlName]="'brandId'">
<nz-option *ngFor="let item of brandData" nzValue="{{item.id}}" nzLabel="{{item.title}}"></nz-option>
</nz-select>
</nz-form-control>
</nz-form-item>
</div>
<div nz-col nzSpan="6"> <div nz-col nzSpan="6">
<nz-form-item> <nz-form-item>
<nz-form-label [nzSpan]="6">商户</nz-form-label> <nz-form-label [nzSpan]="6">商户</nz-form-label>

@ -6,6 +6,7 @@ import {ActivatedRoute, Router} from '@angular/router';
import {CommonsService} from '../../../services/commons.service'; import {CommonsService} from '../../../services/commons.service';
import {CouponService} from '../../../services/coupon.service'; import {CouponService} from '../../../services/coupon.service';
import {MerchantService} from '../../../services/merchant.service'; import {MerchantService} from '../../../services/merchant.service';
import {ConfigService} from "../../../services/config.service";
@Component({ @Component({
selector: 'app-coupon-list', selector: 'app-coupon-list',
@ -26,6 +27,8 @@ export class CouponListComponent implements OnInit {
optionList: string[] = []; optionList: string[] = [];
isLoading = false; isLoading = false;
pageNumMer = 1; pageNumMer = 1;
goodsTypeData;
brandData;
constructor( constructor(
private form: FormBuilder, private form: FormBuilder,
private coupon: CouponService, private coupon: CouponService,
@ -33,6 +36,7 @@ export class CouponListComponent implements OnInit {
private iconService: IconService, private iconService: IconService,
private message: NzMessageService, private message: NzMessageService,
private router: Router, private router: Router,
private config: ConfigService,
private activatedRoute: ActivatedRoute, private activatedRoute: ActivatedRoute,
private common: CommonsService private common: CommonsService
) { ) {
@ -41,6 +45,27 @@ export class CouponListComponent implements OnInit {
ngOnInit(): void { ngOnInit(): void {
this.init(); this.init();
const params = {
pageNum: 1,
pageSize: 10000
};
this.config.getListGoodsType(params , data => {
this.goodsTypeData = data['return_data'].list;
});
}
public getBrandByList(e): void {
const params = {
pageNum: 1,
pageSize: 10000,
goodTypeId: e
};
this.config.getBrandByList(params , data => {
this.brandData = data['return_data'].list;
});
} }
public init(): void { public init(): void {
@ -54,6 +79,8 @@ export class CouponListComponent implements OnInit {
merchantId: [null], merchantId: [null],
couponName: [null], couponName: [null],
couponType: [null], couponType: [null],
goodsTypeId: [null],
brandId: [null],
status: [null], status: [null],
}); });
this.getRequest(true, this.searchForm.value); this.getRequest(true, this.searchForm.value);

@ -6,9 +6,9 @@
<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)">
<div nz-row> <div nz-row>
<div nz-col nzSpan="8"> <div nz-col nzSpan="8" *ngIf="roleType === 1">
<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">
<nz-select nzShowSearch nzAllowClear [formControlName]="'companyId'" (ngModelChange)="getMerchantListByCompany($event)"> <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-option *ngFor="let item of companyData" nzValue="{{item.id}}" nzLabel="{{item.name}}"></nz-option>
@ -16,9 +16,9 @@
</nz-form-control> </nz-form-control>
</nz-form-item> </nz-form-item>
</div> </div>
<div nz-col nzSpan="8"> <div nz-col nzSpan="8" *ngIf="roleType === 5 || roleType === 1">
<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">
<nz-select nzShowSearch nzAllowClear [formControlName]="'merchantId'"> <nz-select nzShowSearch nzAllowClear [formControlName]="'merchantId'">
<nz-option *ngFor="let item of merchantData" nzValue="{{item.id}}" nzLabel="{{item.merchantName}}"></nz-option> <nz-option *ngFor="let item of merchantData" nzValue="{{item.id}}" nzLabel="{{item.merchantName}}"></nz-option>

@ -8,6 +8,8 @@ import {Router} from '@angular/router';
import {CommonsService} from '../../../services/commons.service'; import {CommonsService} from '../../../services/commons.service';
import {OrderService} from '../../../services/order.service'; import {OrderService} from '../../../services/order.service';
import {CompanyService} from '../../../services/company.service'; import {CompanyService} from '../../../services/company.service';
import {ADMIN_INFO_OBJECT} from "../../../services/local-storage.namespace";
import {LocalStorageService} from "../../../services/local-storage.service";
@Component({ @Component({
selector: 'app-order-list', selector: 'app-order-list',
@ -29,6 +31,7 @@ export class OrderListComponent implements OnInit {
id: number; // 订单ID id: number; // 订单ID
isVisible = false; isVisible = false;
refundContent: string; refundContent: string;
roleType: number;
constructor( constructor(
private form: FormBuilder, private form: FormBuilder,
private order: OrderService, private order: OrderService,
@ -37,12 +40,14 @@ export class OrderListComponent implements OnInit {
private router: Router, private router: Router,
private company: CompanyService, private company: CompanyService,
private merchant: MerchantService, private merchant: MerchantService,
private store: LocalStorageService, // 数据请求
private common: CommonsService private common: CommonsService
) { ) {
} }
ngOnInit(): void { ngOnInit(): void {
this.init(); this.init();
this.roleType = this.store.get(ADMIN_INFO_OBJECT)['secRole']['roleType'];
const whereObject = {}; const whereObject = {};
whereObject['pageNum'] = 1; whereObject['pageNum'] = 1;
whereObject['pageSize'] = 10000; whereObject['pageSize'] = 10000;
@ -53,7 +58,12 @@ export class OrderListComponent implements OnInit {
this.message.error(data['return_msg']); this.message.error(data['return_msg']);
} }
}); });
this.getMerchantListByCompany(this.searchForm.value.companyId); if (this.roleType === 5) {
this.getMerchantListByCompany(this.store.get(ADMIN_INFO_OBJECT)['bsCompany']['id']);
} else {
this.getMerchantListByCompany(this.searchForm.value.companyId);
}
} }
public init(): void { public init(): void {
@ -179,5 +189,4 @@ export class OrderListComponent implements OnInit {
handleCancel(): void { handleCancel(): void {
this.isVisible = false; this.isVisible = false;
} }
} }

@ -8,7 +8,8 @@ import {OrderTListComponent} from './order-Tlist/order-Tlist.component';
import {OrderCListComponent} from './order-c-list/order-c-list.component'; import {OrderCListComponent} from './order-c-list/order-c-list.component';
import {OrderKListComponent} from './order-k-list/order-k-list.component'; 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';
const routes: Routes = [ const routes: Routes = [
@ -21,6 +22,7 @@ const routes: Routes = [
{ path: 'order-k-list', component: OrderKListComponent }, { path: 'order-k-list', component: OrderKListComponent },
{ 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 },
]; ];
@NgModule({ @NgModule({

@ -17,10 +17,11 @@ import { OrderKListComponent } from './order-k-list/order-k-list.component';
import {OrderCListComponent} from './order-c-list/order-c-list.component'; import {OrderCListComponent} from './order-c-list/order-c-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';
@NgModule({ @NgModule({
declarations: [OrderListComponent, OrderDetailComponent, OrderCouponsComponent, OrderCouponComponent , OrderTListComponent, OrderKListComponent , OrderCListComponent, OrderHListComponent, OrderAgentComponent], declarations: [OrderListComponent, OrderDetailComponent, OrderCouponsComponent, OrderCouponComponent , OrderTListComponent, OrderKListComponent , OrderCListComponent, OrderHListComponent, OrderAgentComponent, PreOrderComponent],
imports: [ imports: [
CommonModule, CommonModule,
OrderRoutingModule, OrderRoutingModule,

@ -0,0 +1,236 @@
<!-- 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'" (ngModelChange)="getMerchantStoreById($event)">
<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" *ngIf="roleType === 5 || roleType === 1 || roleType === 2">
<nz-form-item>
<nz-form-label [nzSpan]="6">门店</nz-form-label>
<nz-form-control [nzSpan]="16">
<nz-select nzShowSearch nzAllowClear [formControlName]="'merchantStoreId'">
<nz-option *ngFor="let item of merchantStoreData" nzValue="{{item.id}}" nzLabel="{{item.storeName}}"></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="preOrderNo"/>
</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="goodsName"/>
</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="preUserName"/>
</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="userPhone"/>
</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="status">
<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-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="createTime"></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" *ngIf="'BTN_export_order' | button" (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="140px">生成时间</th>
<th nzRight nzWidth="100px">额外状态</th>
<th nzRight nzWidth="100px">状态</th>
<th nzWidth="120px" nzRight>操作</th>
</tr>
</thead>
<tbody>
<tr *ngFor="let data of ajaxTable.data; let i = index">
<td>{{i+1}}</td>
<td>{{data.goodsName}}</td>
<td>{{data.preUserName}}</td>
<td>{{data.preUserPhone}}</td>
<td>{{data.orderNo}}</td>
<td>{{data.preOrderNo}}</td>
<td>{{data.payRealPrice}}</td>
<td>{{data.createTime | date: 'yyyy-MM-dd HH:mm:ss'}}</td>
<td nzRight>{{data.ext1 === null ? '暂无' : data.ext1 }}</td>
<td nzRight>{{data.status | preOrderStatus}}</td>
<td nzRight class="table-td-operation">
<a (click)="getDetail(data.orderId , data.id)">详情</a>
<span *ngIf=" data.ext1 !== '退款中'">
<nz-divider *ngIf="(data.status === 4 && 'BTN_pre-order-refund' | button) || (data.status === 1 && 'BTN_pre-order-success' | button)" nzType="vertical"></nz-divider>
<a *ngIf="(data.status === 4 && 'BTN_pre-order-refund' | button) || (data.status === 1 && 'BTN_pre-order-success' | button)" nz-dropdown [nzDropdownMenu]="menu">更多</a>
</span>
<nz-dropdown-menu #menu="nzDropdownMenu">
<ul nz-menu nzSelectable>
<li class="dropdown_menu" *ngIf="data.status === 1 && 'BTN_pre-order-success' | button" (click)="getPreSuccess(data.id)" nz-menu-item>预约成功</li>
<li class="dropdown_menu" *ngIf="data.status === 1 && 'BTN_pre-order-fail' | button" (click)="getPreFail(data.id)" nz-menu-item>预约失败</li>
<li class="dropdown_menu" *ngIf="(data.status === 4 && 'BTN_pre-order-refund' | button) && data.ext1 === null" (click)="postRefund(data.orderNo)" nz-menu-item>申请退款</li>
</ul>
</nz-dropdown-menu>
</td>
</tbody>
</nz-table>
</div>
<nz-modal [(nzVisible)]="isVisible" nzTitle="发起预约" (nzOnCancel)="handleCancel()" (nzOnOk)="handleOk()">
<nz-form-item>
<nz-form-label nzRequired>预计时间</nz-form-label>
<nz-form-control nzErrorTip="请选择预计时间!">
<nz-date-picker [(ngModel)]="reachTime" ></nz-date-picker>
</nz-form-control>
</nz-form-item>
<nz-form-item>
<nz-form-label nzRequired>安装地址</nz-form-label>
<nz-form-control>
<textarea [(ngModel)]="reachAddress" nz-input rows="2" placeholder="请输入安装地址"></textarea>
</nz-form-control>
</nz-form-item>
<nz-form-item>
<nz-form-label nzRequired>预约备注</nz-form-label>
<nz-form-control>
<textarea [(ngModel)]="preUserRemark" nz-input rows="2" placeholder="请输入预约备注"></textarea>
</nz-form-control>
</nz-form-item>
</nz-modal>
<nz-modal [(nzVisible)]="isVisibleFail" nzTitle="预约失败" (nzOnCancel)="handleCancelFail()" (nzOnOk)="handleOkFail()">
<nz-form-item>
<nz-form-label nzRequired>失败备注</nz-form-label>
<nz-form-control>
<textarea [(ngModel)]="statusFailDesc" nz-input rows="2" placeholder="请输入失败备注"></textarea>
</nz-form-control>
</nz-form-item>
</nz-modal>
<nz-modal [(nzVisible)]="isVisibleDetail" nzTitle="订单详情" nzWidth="1200" (nzOnCancel)="handleCancelOrder()" (nzOnOk)="handleCancelOrder()">
<nz-descriptions nzTitle="支付订单详情" nzBordered [nzColumn]="{ xxl: 4, xl: 3, lg: 3, md: 3, sm: 2, xs: 1 }">
<nz-descriptions-item nzTitle="商品名称">{{orderDetail['highChildOrderList'][0]['goodsName']}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="支付类型">{{orderDetail['payType'] | paytype}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="支付金额">{{orderDetail['payPrice']}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="客户名称">{{orderDetail['memName']}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="客户电话">{{orderDetail['memPhone']}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="订单号">{{orderDetail['orderNo']}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="创建时间">{{orderDetail['createTime'] | date: 'yyyy-MM-dd HH:mm:ss'}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="支付时间">{{orderDetail['payTime'] | date: 'yyyy-MM-dd HH:mm:ss'}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="订单状态">{{orderDetail['orderStatus'] | orderCouponStatus}}</nz-descriptions-item>
</nz-descriptions>
<nz-descriptions nzTitle="预约订单详情" nzBordered [nzColumn]="{ xxl: 4, xl: 3, lg: 3, md: 3, sm: 2, xs: 1 }">
<nz-descriptions-item nzTitle="商品名称">{{preOrderDetail['goodsName']}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="操作人员">{{preOrderDetail['opUserName']}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="预约订单号">{{preOrderDetail['preOrderNo']}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="预约备注">{{preOrderDetail['preUserRemark'] == null ? '暂无': preOrderDetail['preUserRemark']}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="客户姓名">{{preOrderDetail['preUserName']}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="客户电话">{{preOrderDetail['preUserPhone']}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="到店地址">{{preOrderDetail['reachAddress'] == null ? '暂无': preOrderDetail['reachAddress']}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="到店时间">{{preOrderDetail['reachTime'] == null ? '暂无': preOrderDetail['reachTime'] | date: 'yyyy-MM-dd'}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="预约时间">{{preOrderDetail['preTime'] | date: 'yyyy-MM-dd'}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="创建时间">{{preOrderDetail['createTime'] | date: 'yyyy-MM-dd'}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="预约失败备注">{{preOrderDetail['statusFailDesc']}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="订单状态">{{preOrderDetail['status'] | preOrderStatus}}</nz-descriptions-item>
</nz-descriptions>
</nz-modal>

@ -0,0 +1,287 @@
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';
import {MerchantStoreService} from '../../../services/merchant-store.service';
import {RechargeService} from '../../../services/recharge.service';
@Component({
selector: 'app-pre-order',
templateUrl: './pre-order.component.html',
styleUrls: ['./pre-order.component.scss']
})
export class PreOrderComponent implements OnInit {
WEB_SERVE_URL = environment.baseUrl;
FILE_URL = environment.imageUrl;
searchForm: FormGroup; // 搜索框
requestData = []; // 列表数据
companyData = []; // 列表数据
merchantData = []; // 列表数据
merchantStoreData = []; // 列表数据
total: number; // 页码
pageNum = 1; // 页码
pageSize = 10; // 条码
loading = true;
id: number; // 订单ID
isVisible = false;
isVisibleFail = false;
isVisibleDetail = false;
preUserRemark: string;
statusFailDesc: string;
reachAddress: string;
reachTime;
roleType: number;
orderDetail: any = {
highChildOrderList: [{
goodsName: ''
}]
};
preOrderDetail: any = {};
constructor(
private form: FormBuilder,
private order: OrderService,
private iconService: IconService,
private message: NzMessageService,
private router: Router,
private company: CompanyService,
private recharge: RechargeService,
private merchant: MerchantService,
private store: LocalStorageService, // 数据请求
private merchantStore: MerchantStoreService,
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],
merchantStoreId: [null],
orderNo: [null],
preOrderNo: [null],
userPhone: [null],
preUserName: [null],
goodsType: [null],
goodsName: [null],
status: [null],
createTime: [null]
});
this.getRequest(true, this.searchForm.value);
}
// 查询列表
public getRequest(reset: boolean = false, whereObject: object) {
if (whereObject['createTime'] != null && whereObject['createTime'].length !== 0) {
whereObject['createTimeS'] = whereObject['createTime'][0].getTime();
whereObject['createTimeE'] = whereObject['createTime'][1].getTime();
}
this.loading = false;
if (reset) {
this.pageNum = 1;
}
whereObject['pageNum'] = this.pageNum;
whereObject['pageSize'] = this.pageSize;
this.order.getListPreOrder(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 getMerchantStoreById(merchantIds: number): void {
const params = {
pageNum: 1,
pageSize: 1000000,
merchantId: merchantIds
};
this.merchantStore.getStoreListByCompany(params, data => {
if (data['return_code'] === '000000') {
this.merchantStoreData = data['return_data'].list;
} else {
this.message.error(data['return_msg']);
}
});
}
// 重置
public resetForm(): void {
this.searchForm.reset();
}
// 查看详情
public getDetail(orderId: number , id: number): void {
this.order.getOrderById(orderId , data => {
if (data['return_code'] === '000000') {
this.orderDetail = data['return_data'];
} else {
this.message.error(data['return_msg']);
}
});
this.order.getPreOrderById(id , data => {
if (data['return_code'] === '000000') {
this.preOrderDetail = data['return_data'];
console.log(this.preOrderDetail);
} else {
this.message.error(data['return_msg']);
}
});
this.isVisibleDetail = true;
}
// 下载模板
downloadTemplate(whereObject) {
if (whereObject['createTime'] != null && whereObject['createTime'].length !== 0) {
whereObject['createTimeS'] = whereObject['createTime'][0].getTime();
whereObject['createTimeE'] = whereObject['createTime'][1].getTime();
}
this.order.exportListPreOrder(whereObject, data => {
if (data['return_code'] === '000000') {
window.location.href = this.FILE_URL + data['return_data'];
} else {
this.message.error(data['return_msg']);
}
});
}
getPreSuccess(id): void {
this.id = id;
this.isVisible = true;
}
getPreFail(id: number): void {
this.id = id;
this.isVisibleFail = true;
}
handleOkFail(): void {
this.common.showConfirm('是否确认预约失败', item => {
if (item) {
const params = {
id: this.id ,
statusFailDesc: this.statusFailDesc
};
this.order.preOrderFail(params, data => {
if (data['return_code'] === '000000') {
this.getRequest(false, this.searchForm.value);
this.isVisibleFail = false;
this.message.success('操作成功');
} else {
this.message.error(data['return_msg']);
}
});
}
});
}
handleCancelFail() {
this.isVisibleFail = false;
}
handleOk(): void {
this.common.showConfirm('是否确认预约', item => {
if (item) {
const params = {
id: this.id ,
reachAddress: this.reachAddress,
reachTime: this.reachTime,
preUserRemark: this.preUserRemark,
};
this.order.preOrderSuccess(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;
}
handleCancelOrder(): void {
this.isVisibleDetail = false;
}
public postRefund(orderNo): void {
this.common.showConfirm('确认订单申请退款', item => {
if (item) {
this.recharge.postRefund({
refundSource: 2 ,
sourceOrderNo: orderNo
}, data => {
if (data['return_code'] === '000000') {
this.message.success('申请成功');
this.getRequest(false, this.searchForm.value);
} else {
this.message.error(data['return_msg']);
}
});
}
});
}
}

@ -33,6 +33,8 @@ import {
RefundSourcePipe, RefundSourcePipe,
RefundStatusPipe RefundStatusPipe
} from './pipes'; } from './pipes';
import { PreOrderStatusPipe } from './pipes/order/pre-order-status.pipe';
import { ButtonPipe } from './pipes/commons/button.pipe';
@ -60,6 +62,8 @@ const PIPES = [
RechargePayTypePipe, RechargePayTypePipe,
RefundSourcePipe, RefundSourcePipe,
RefundStatusPipe, RefundStatusPipe,
PreOrderStatusPipe,
ButtonPipe,
]; ];

@ -9,6 +9,8 @@ export class RefundSourcePipe implements PipeTransform {
switch (value) { switch (value) {
case 1: case 1:
return '话费退款'; return '话费退款';
case 2:
return '优选商品退款';
} }
} }

@ -0,0 +1,19 @@
import { Pipe, PipeTransform } from '@angular/core';
import {LocalStorageService} from '../../services/local-storage.service';
import {ADMIN_INFO_OBJECT} from '../../services/local-storage.namespace';
@Pipe({
name: 'button'
})
export class ButtonPipe implements PipeTransform {
constructor(
private store: LocalStorageService, // 数据请求
) { }
transform(button: string): boolean {
const buttonArray = new Set<string>();
buttonArray.add(button);
console.log(this.store.get(ADMIN_INFO_OBJECT)['buttonList']);
return this.store.get(ADMIN_INFO_OBJECT)['buttonList'].filter(i => buttonArray.has(i.permissionCode)).length > 0;
}
}

@ -13,6 +13,8 @@ export class DisplayAreaPipe implements PipeTransform {
return '金币专区'; return '金币专区';
case 3: case 3:
return '银联专区'; return '银联专区';
case 4:
return '优选商品';
case null: case null:
return '消费券'; return '消费券';
} }

@ -20,3 +20,5 @@ export * from './activate/status.pipe';
export * from './recharge-pay-type.pipe'; export * from './recharge-pay-type.pipe';
export * from './audit/refund-source.pipe'; export * from './audit/refund-source.pipe';
export * from './audit/refund-status.pipe'; export * from './audit/refund-status.pipe';
export * from './order/pre-order-status.pipe';
export * from './commons/button.pipe';

@ -17,6 +17,10 @@ export class OrderCouponStatusPipe implements PipeTransform {
return '已退款'; return '已退款';
case 5: case 5:
return '已取消'; return '已取消';
case 6:
return '退款中';
case 7:
return '拒绝退款';
} }
} }
} }

@ -0,0 +1,20 @@
import { Pipe, PipeTransform } from '@angular/core';
@Pipe({
name: 'preOrderStatus'
})
export class PreOrderStatusPipe implements PipeTransform {
transform(value: number): string {
switch (value) {
case 1:
return '预约中';
case 2:
return '预约成功';
case 3:
return '预约完成';
case 4:
return '预约失败';
}
}
}

@ -13,6 +13,10 @@ export class PaytypePipe implements PipeTransform {
return '微信'; return '微信';
case 3: case 3:
return '金币'; return '金币';
case 4:
return '汇联通工会卡';
case 5:
return '银联';
} }
} }
} }

@ -13,7 +13,7 @@ export class ConfigService {
) { } ) { }
/** /**
* *
* *
* @param paramsObject * @param paramsObject
* @param callBack * @param callBack
@ -25,18 +25,81 @@ export class ConfigService {
} }
/** /**
* * @Author Sum1Dream
* @methodName insertGoodsType
* @Description // 新增
* @Date 10:25 2021/11/19
* @Param [params , callBack]
*/
public insertGoodsType(params: object, callBack) {
this.http.post(environment.baseUrl + 'highGoodsType/insertGoodsType', params).subscribe(data => {
callBack(data);
});
}
/**
*
* *
* @param params * @param params
* @param callBack * @param callBack
* @return data * @return data
*/ */
public insertGoodsType(params: object, callBack) { public updateGoodsType(params: object, callBack) {
this.http.post(environment.baseUrl + 'highGoodsType/insertGoodsType', params).subscribe(data => { this.http.post(environment.baseUrl + 'highGoodsType/updateGoodsType', params).subscribe(data => {
callBack(data);
});
}
/**
* id查询详情
*
* @param id id
* @param callBack
*/
public getGoodsTypeById(id: number, callBack) {
this.http.get(environment.baseUrl + 'highGoodsType/getGoodsTypeById?id=' + id).subscribe(data => {
callBack(data);
});
}
/**
*
*
* @param params status
* @param callBack
*/
public getGoodsTypeByDelete(params: object, callBack) {
this.http.post(environment.baseUrl + 'highGoodsType/getGoodsTypeByDelete' , params).subscribe(data => {
callBack(data); callBack(data);
}); });
} }
/**
*
*
* @param paramsObject
* @param callBack
*/
public getBrandByList(paramsObject: object, callBack) {
this.http.get(environment.baseUrl + 'highBrand/getBrandByList?' + this.common.getWhereCondition(paramsObject)).subscribe(data => {
callBack(data);
});
}
/**
*
*
* @param params
* @param callBack
* @return data
*/
public insertBrand(params: object, callBack) {
this.http.post(environment.baseUrl + 'highBrand/insertBrand', params).subscribe(data => {
});
}
/** /**
* *
* *
@ -44,8 +107,8 @@ export class ConfigService {
* @param callBack * @param callBack
* @return data * @return data
*/ */
public updateCompany(params: object, callBack) { public updateBrand(params: object, callBack) {
this.http.post(environment.baseUrl + 'bsCompany/updateCompany', params).subscribe(data => { this.http.post(environment.baseUrl + 'highBrand/updateBrand', params).subscribe(data => {
callBack(data); callBack(data);
}); });
} }
@ -53,25 +116,24 @@ export class ConfigService {
/** /**
* id查询详情 * id查询详情
* *
* @param companyId id * @param id id
* @param callBack * @param callBack
*/ */
public companyView(companyId: number, callBack) { public findById(id: number, callBack) {
this.http.get(environment.baseUrl + 'bsCompany/companyView?companyId=' + companyId).subscribe(data => { this.http.get(environment.baseUrl + 'highBrand/findById?id=' + id).subscribe(data => {
callBack(data); callBack(data);
}); });
} }
/** /**
* *
* *
* @param id id * @param params status
* @param status status
* @param callBack * @param callBack
*/ */
public editStatus(id: number, status: number , callBack) { public getByDelete(params: object, callBack) {
this.http.get(environment.baseUrl + 'bsCompany/editStatus?companyId=' + id + '&status=' + status).subscribe(data => { this.http.get(environment.baseUrl + 'highBrand/getByDelete' , params).subscribe(data => {
callBack(data); callBack(data);
}); });
} }

@ -11,7 +11,8 @@ export class OrderService {
constructor( constructor(
private http: HttpClient, private http: HttpClient,
private common: CommonsService private common: CommonsService
) { } ) {
}
/** /**
* *
@ -92,6 +93,28 @@ export class OrderService {
}); });
} }
/**
* @Author Sum1Dream
* @methodName exportListPreOrder
* @Description // 导出预约订单
* @Date 6:33 2021/11/21
* @Param [paramsObject , callBack]
*/
public exportListPreOrder(paramsObject: object, callBack) {
this.http.get(environment.baseUrl + 'highOrderPre/exportListPreOrder?' + this.common.getWhereCondition(paramsObject)).subscribe(data => {
callBack(data);
});
}
/**
* @Author Sum1Dream
* @methodName exportOrderListByIdCode
* @Description // 导出预约订单
* @Date 9:58 2021/11/22
* @Param [paramsObject , callBack]
*/
public exportOrderListByIdCode(paramsObject: object, callBack) { public exportOrderListByIdCode(paramsObject: object, callBack) {
this.http.get(environment.baseUrl + 'highOrder/exportOrderListByIdCode?' + this.common.getWhereCondition(paramsObject)).subscribe(data => { this.http.get(environment.baseUrl + 'highOrder/exportOrderListByIdCode?' + this.common.getWhereCondition(paramsObject)).subscribe(data => {
callBack(data); callBack(data);
@ -111,5 +134,64 @@ export class OrderService {
}); });
} }
/**
* @Author Sum1Dream
* @methodName preOrderSuccess
* @Description //TODO
* @Date 5:50 2021/11/21
* @Param [params , callBack]
*/
public preOrderSuccess(params: object, callBack) {
this.http.post(environment.baseUrl + 'highOrderPre/preOrderSuccess', params).subscribe(data => {
callBack(data);
});
}
/**
* @Author Sum1Dream
* @methodName preOrderFail
* @Description // 预约失败
* @Date 9:59 2021/11/22
* @Param [params , callBack]
*/
public preOrderFail(params: object, callBack) {
this.http.post(environment.baseUrl + 'highOrderPre/preOrderFail', params).subscribe(data => {
callBack(data);
});
}
/**
* @Author Sum1Dream
* @methodName getListPreOrder
* @Description // 查询预约订单
* @Date 2:35 2021/11/19
* @Param [params , callBack]
*/
public getListPreOrder(paramsObject: object, callBack) {
this.http.get(environment.baseUrl + 'highOrderPre/getListPreOrder?' + this.common.getWhereCondition(paramsObject)).subscribe(data => {
callBack(data);
});
}
/**
* @Author Sum1Dream
* @methodName getOrderById
* @Description //TODO
* @Date 5:17 2021/11/19
* @Param [orderId , callBack]
*/
public getOrderById(orderId: number , callBack) {
this.http.get(environment.baseUrl + 'highOrder/getOrderById?orderId=' + orderId).subscribe( data => {
callBack(data);
});
}
public getPreOrderById(id: number , callBack) {
this.http.get(environment.baseUrl + 'highOrderPre/getPreOrderById?id=' + id).subscribe( data => {
callBack(data);
});
}
} }

@ -138,6 +138,19 @@ export class RechargeService {
}); });
} }
/**
* @Author Sum1Dream
* @methodName orderToRefundPre
* @Description // 预约订单退款
* @Date 11:17 2021/11/23
* @Param [id: number, callBack]
*/
public orderToRefundPre(id: number, callBack) {
this.http.get(environment.baseUrl + 'highOrderPre/orderToRefund?orderId=' + id).subscribe(data => {
callBack(data);
});
}
/** /**
* 退 * 退
* *
@ -210,6 +223,7 @@ export class RechargeService {
}); });
} }
/** /**
* *
* *

@ -6,8 +6,8 @@ export const environment = {
production: false, production: false,
baseUrl: 'http://localhost:9302/brest/', // 测试环境服务器地址(请求数据地址) baseUrl: 'http://localhost:9302/brest/', // 测试环境服务器地址(请求数据地址)
imageUrl: 'http://localhost:9302/filesystem/', imageUrl: 'http://localhost:9302/filesystem/',
// baseUrl: 'https://hsg.dctpay.com/brest/', // 测试环境服务器地址(请求数据地址) // baseUrl: 'https://hsgcs.dctpay.com/brest/', // 测试环境服务器地址(请求数据地址)
// imageUrl: 'https://hsg.dctpay.com/filesystem/', // imageUrl: 'https://hsgcs.dctpay.com/filesystem/',
key: 'https://hsgcs.dctpay.com/phone-recharge-H5/index.html?codeValue=', key: 'https://hsgcs.dctpay.com/phone-recharge-H5/index.html?codeValue=',
inviteUrl: 'https://hsgcs.dctpay.com/wx/?action=ic&id=', inviteUrl: 'https://hsgcs.dctpay.com/wx/?action=ic&id=',
}; };

Loading…
Cancel
Save