袁野 4 years ago
commit 6e9bedf354
  1. 2
      .gitignore
  2. 2
      angular.json
  3. 9
      src/app/admin/audit/audit-coupon/audit-coupon.component.html
  4. 8
      src/app/admin/audit/audit-coupon/audit-coupon.component.ts
  5. 34
      src/app/admin/coupon/coupon-edit/coupon-edit.component.html
  6. 37
      src/app/admin/coupon/coupon-edit/coupon-edit.component.ts
  7. 16
      src/app/admin/coupon/coupon-list/coupon-list.component.html
  8. 1
      src/app/admin/coupon/coupon-list/coupon-list.component.ts
  9. 2
      src/app/admin/coupon/sales-code-list/sales-code-list.component.html
  10. 5
      src/app/admin/coupon/sales-code-list/sales-code-list.component.ts
  11. 2
      src/app/admin/merchant-store/store-list/store-list.component.html
  12. 10
      src/app/admin/merchant/merchant-edit/merchant-edit.component.html
  13. 7
      src/app/admin/merchant/merchant-edit/merchant-edit.component.ts
  14. 3
      src/app/admin/merchant/merchant-list/merchant-list.component.ts
  15. 101
      src/app/admin/order/order-list/order-list.component.html
  16. 4
      src/app/admin/order/order-list/order-list.component.scss
  17. 84
      src/app/admin/order/order-list/order-list.component.ts
  18. 14
      src/app/admin/order/order-routing.module.ts
  19. 28
      src/app/admin/order/order.module.ts
  20. 113
      src/app/admin/price/price-list/price-list.component.html
  21. 4
      src/app/admin/price/price-list/price-list.component.scss
  22. 122
      src/app/admin/price/price-list/price-list.component.ts
  23. 50
      src/app/admin/system/sinopec-config/sinopec-config.component.html
  24. 0
      src/app/admin/system/sinopec-config/sinopec-config.component.scss
  25. 90
      src/app/admin/system/sinopec-config/sinopec-config.component.ts
  26. 56
      src/app/admin/system/sinopec-edit/sinopec-edit.component.html
  27. 6
      src/app/admin/system/sinopec-edit/sinopec-edit.component.scss
  28. 100
      src/app/admin/system/sinopec-edit/sinopec-edit.component.ts
  29. 4
      src/app/admin/system/system-routing.module.ts
  30. 4
      src/app/admin/system/system.module.ts
  31. 1
      src/app/admin/user/user-list/user-list.component.ts
  32. 2
      src/app/app-common.module.ts
  33. 5
      src/app/app-routing.module.ts
  34. 1
      src/app/pipes/index.ts
  35. 22
      src/app/pipes/order/order-coupon-status.pipe.ts
  36. 6
      src/app/pipes/system.pipe.ts
  37. 2
      src/app/services/company.service.ts
  38. 2
      src/app/services/icon.service.ts
  39. 27
      src/app/services/order.service.ts
  40. 59
      src/app/services/system.service.ts
  41. 4
      src/environments/environment.prod.ts
  42. 4
      src/environments/environment.test.ts

2
.gitignore vendored

@ -4,3 +4,5 @@ node_modules/
dist/ dist/

@ -42,7 +42,7 @@
] ]
}, },
"configurations": { "configurations": {
"production": { "prod": {
"fileReplacements": [ "fileReplacements": [
{ {
"replace": "src/environments/environment.ts", "replace": "src/environments/environment.ts",

@ -85,6 +85,10 @@
<td>{{data.status | auditStatus}}</td> <td>{{data.status | auditStatus}}</td>
<td nzRight="0px" class="table-td-operation"> <td nzRight="0px" class="table-td-operation">
<a (click)="getDetail(data.id)"><i nz-icon [nzIconfont]="'icon-xiangqing'" nz-tooltip="审核详情"></i></a> <a (click)="getDetail(data.id)"><i nz-icon [nzIconfont]="'icon-xiangqing'" nz-tooltip="审核详情"></i></a>
<nz-divider *ngIf="data['status'] === 1" nzType="vertical"></nz-divider>
<a (click)="approveProcessed(3 , data.id)" *ngIf="data['status'] === 1"><i nz-icon nzType="check-circle" nzTheme="outline" nz-tooltip="通过"></i></a>
<nz-divider *ngIf="data['status'] === 1" nzType="vertical"></nz-divider>
<a (click)="approveProcessed(2 , data.id)" *ngIf="data['status'] === 1"><i nz-icon nzType="stop" nz-tooltip="驳回" nzTheme="outline"></i></a>
</td> </td>
</tbody> </tbody>
</nz-table> </nz-table>
@ -110,8 +114,9 @@
</nz-descriptions> </nz-descriptions>
</ng-container> </ng-container>
<div *nzModalFooter> <div *nzModalFooter>
<button nz-button nzType="default" (click)="approveProcessed(2)">审核驳回</button> <button *ngIf="data['approve']['status'] !== 1" nz-button nzType="default" (click)="handleCancel()">关闭</button>
<button nz-button nzType="primary" (click)="approveProcessed(3)">审核通过</button> <button *ngIf="data['approve']['status'] === 1" nz-button nzType="default" (click)="approveProcessed(2 , this.id)">审核驳回</button>
<button *ngIf="data['approve']['status'] === 1" nz-button nzType="primary" (click)="approveProcessed(3 , this.id)">审核通过</button>
</div> </div>
</nz-modal> </nz-modal>

@ -25,6 +25,7 @@ export class AuditCouponComponent implements OnInit {
approve: {}, approve: {},
object: {} object: {}
}; };
constructor( constructor(
private form: FormBuilder, private form: FormBuilder,
private audit: AuditService, private audit: AuditService,
@ -91,16 +92,17 @@ export class AuditCouponComponent implements OnInit {
this.isVisible = false; this.isVisible = false;
} }
public approveProcessed(statusD: number): void { public approveProcessed(statusD: number, id: number): void {
this.id = id;
const p = { const p = {
approveId: this.id, approveId: this.id,
status: statusD, status: statusD,
remarks: '', remarks: '',
}; };
this.common.showConfirm('是否确定' , r => { this.common.showConfirm('是否确定', r => {
if (r) { if (r) {
this.audit.approveProcessed(p , data => { this.audit.approveProcessed(p, data => {
if (data['return_code'] === '000000') { if (data['return_code'] === '000000') {
this.isVisible = false; this.isVisible = false;
this.getRequest(true, this.searchForm.value); this.getRequest(true, this.searchForm.value);

@ -31,6 +31,16 @@
</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]="'couponSource'" >卡券来源</nz-form-label>
<nz-form-control nzErrorTip="请选择卡券来源!">
<nz-select nzPlaceHolder="请选择卡券来源" [formControlName]="'couponSource'">
<nz-option nzValue="1" nzLabel="中石化"></nz-option>
</nz-select>
</nz-form-control>
</nz-form-item>
</div>
<div nz-col [nzSpan]="8"> <div nz-col [nzSpan]="8">
<nz-form-item> <nz-form-item>
<nz-form-label [nzFor]="'displayArea'" nzRequired>展示区域</nz-form-label> <nz-form-label [nzFor]="'displayArea'" nzRequired>展示区域</nz-form-label>
@ -53,14 +63,6 @@
</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]="'couponPrice'" nzRequired>卡券面值</nz-form-label>
<nz-form-control nzErrorTip="请输入卡券面值!">
<input nz-input placeholder="请输入卡券面值..." [formControlName]="'couponPrice'" id="'couponPrice'" />
</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]="'salesPrice'" nzRequired>销售价格</nz-form-label> <nz-form-label [nzFor]="'salesPrice'" nzRequired>销售价格</nz-form-label>
@ -209,7 +211,21 @@
<nz-form-item> <nz-form-item>
<nz-form-label nzRequired>卡券介紹</nz-form-label> <nz-form-label nzRequired>卡券介紹</nz-form-label>
<nz-form-control> <nz-form-control>
<app-richtext [content]='content' (newTextEvent)="textData($event)"></app-richtext> <nz-upload
nzAction="{{WEB_SERVE_URL}}/fileUpload/uploadfile"
nzListType="picture-card"
[(nzFileList)]="couponDescImg"
[nzShowButton]="couponDescImg.length < 5"
[nzPreview]="handlePreview"
>
<i nz-icon nzType="plus"></i>
<div class="ant-upload-text">上传图片</div>
</nz-upload>
<nz-modal [nzVisible]="previewVisible" [nzContent]="modal" [nzFooter]="null" (nzOnCancel)="previewVisible = false">
<ng-template #modal>
<img [src]="previewImage" [ngStyle]="{ width: '100%' }" />
</ng-template>
</nz-modal>
</nz-form-control> </nz-form-control>
</nz-form-item> </nz-form-item>
</div> </div>

@ -31,6 +31,7 @@ export class CouponEditComponent implements OnInit {
id: number; id: number;
couponImg = []; couponImg = [];
couponCarouselImg = []; couponCarouselImg = [];
couponDescImg = [];
WEB_SERVE_URL = environment.baseUrl; WEB_SERVE_URL = environment.baseUrl;
previewImage: string | undefined = ''; previewImage: string | undefined = '';
previewVisible = false; previewVisible = false;
@ -69,7 +70,6 @@ export class CouponEditComponent implements OnInit {
}); });
this.validateForm = this.fb.group({ this.validateForm = this.fb.group({
couponName: [null, [Validators.required]], couponName: [null, [Validators.required]],
couponPrice: [null, [Validators.required]],
couponDesc: [null], couponDesc: [null],
couponType: [null, [Validators.required]], couponType: [null, [Validators.required]],
salesEndTime: [null, [Validators.required]], salesEndTime: [null, [Validators.required]],
@ -81,6 +81,7 @@ export class CouponEditComponent implements OnInit {
isPresent: [false, [Validators.required]], isPresent: [false, [Validators.required]],
payType: [false, [Validators.required]], payType: [false, [Validators.required]],
displayArea: [false, [Validators.required]], displayArea: [false, [Validators.required]],
couponSource: [null],
handselCouponId: [null], handselCouponId: [null],
status: [null], status: [null],
couponKey: [null], couponKey: [null],
@ -214,8 +215,23 @@ export class CouponEditComponent implements OnInit {
this.message.error('请上传卡券轮播图'); this.message.error('请上传卡券轮播图');
return; return;
} }
const couponDescImg = [];
if (this.couponDescImg.length !== 0) {
for (const i of this.couponDescImg) {
if (i['response'] != null) {
couponDescImg.push(i['response']['return_data'][0]);
} else {
couponDescImg.push(i.name);
}
}
} else {
this.message.error('请上传卡券详情图');
return;
}
this.validateForm.value.couponCarouselImg = couponCarouselImg.join(','); this.validateForm.value.couponCarouselImg = couponCarouselImg.join(',');
this.validateForm.value.couponDesc = this.content; this.validateForm.value.couponDesc = couponDescImg.join(',');
if (this.editFlag) { if (this.editFlag) {
this.common.showConfirm('是否确定修改,确定将下架' , dataR => { this.common.showConfirm('是否确定修改,确定将下架' , dataR => {
if (dataR) { if (dataR) {
@ -259,7 +275,7 @@ 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']);
this.content = data['return_data']['couponDesc']; 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']);
const couponArray = []; const couponArray = [];
@ -286,6 +302,21 @@ export class CouponEditComponent implements OnInit {
} }
this.couponCarouselImg = couponCarouselArray; this.couponCarouselImg = couponCarouselArray;
} }
if (data['return_data']['couponDesc'] != null && data['return_data']['couponDesc'] !== '') {
const couponDescImg = data['return_data']['couponDesc'].split(',');
const couponDescArray = [];
for (const i of couponDescImg) {
couponDescArray.push(
{
uid: 1,
name: i,
status: 'done',
url: environment.imageUrl + i
});
}
this.couponDescImg = couponDescArray;
}
this.validateForm.patchValue(data['return_data']); this.validateForm.patchValue(data['return_data']);
} else { } else {
this.message.create('error', data['return_msg']); this.message.create('error', data['return_msg']);

@ -99,15 +99,14 @@
<thead nzSingleSort> <thead nzSingleSort>
<tr> <tr>
<th nzWidth="50px">编号</th> <th nzWidth="50px">编号</th>
<th nzWidth="80px">卡券编号</th> <th nzWidth="150px">卡券编号</th>
<th nzWidth="80px">卡券名称</th> <th nzWidth="160px">卡券名称</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="120px">销售截止时间</th> <th nzWidth="150px">销售截止时间</th>
<th nzWidth="120px">创建时间</th> <th nzWidth="150px">创建时间</th>
<th nzWidth="150px" nzRight="0px">操作</th> <th nzWidth="150px" nzRight="0px">操作</th>
</tr> </tr>
</thead> </thead>
@ -116,7 +115,6 @@
<td>{{i+1}}</td> <td>{{i+1}}</td>
<td>{{data.couponKey}}</td> <td>{{data.couponKey}}</td>
<td>{{data.couponName}}</td> <td>{{data.couponName}}</td>
<td>¥{{data.couponPrice}}</td>
<td>¥{{data.salesPrice}}</td> <td>¥{{data.salesPrice}}</td>
<td>{{data.stockCount}}</td> <td>{{data.stockCount}}</td>
<td>{{data.couponType === 1 ? '内部卷' : '外部卷'}}</td> <td>{{data.couponType === 1 ? '内部卷' : '外部卷'}}</td>
@ -131,8 +129,8 @@
<a *ngIf="data.status === 2" (click)="disableMerchant(data.id)"> <i nz-icon [nzIconfont]="'icon-xiajia'" nz-tooltip="下架"></i></a> <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> <nz-divider *ngIf="data.status !== 101" nzType="vertical"></nz-divider>
<a (click)="getList(data.id , data.couponName , data.couponType)"><i nz-icon nzType="unordered-list" nzTheme="outline" nz-tooltip="销售码列表"></i></a> <a (click)="getList(data.id , data.couponName , data.couponType)"><i nz-icon nzType="unordered-list" nzTheme="outline" nz-tooltip="销售码列表"></i></a>
<nz-divider *ngIf="data.status !== 101" nzType="vertical"></nz-divider> <!-- <nz-divider *ngIf="data.status !== 101" nzType="vertical"></nz-divider>-->
<a *ngIf="data.status !== 101" (click)="getDelete(data.id)"><i nz-icon nzType="delete" nzTheme="outline" nz-tooltip="删除"></i></a> <!-- <a *ngIf="data.status !== 101" (click)="getDelete(data.id)"><i nz-icon nzType="delete" nzTheme="outline" nz-tooltip="删除"></i></a>-->
</td> </td>
</tbody> </tbody>
</nz-table> </nz-table>

@ -195,6 +195,7 @@ export class CouponListComponent implements OnInit {
// 查看门店列表 // 查看门店列表
public getList(id: number , couponName: string , couponType: number): void { public getList(id: number , couponName: string , couponType: number): void {
console.log(couponType);
this.router.navigate(['/admin/coupon/salesCode-list'], { this.router.navigate(['/admin/coupon/salesCode-list'], {
queryParams: { queryParams: {
couponId: id, couponId: id,

@ -46,7 +46,7 @@
<span>共计 {{total}} 条数据</span> <span>共计 {{total}} 条数据</span>
<span *ngIf="id != null" style="margin-left: 30px;;"> <span *ngIf="id != null" style="margin-left: 30px;;">
卡券名称: 卡券名称:
<span style="font-weight: bold; font-size: 20px">{{name}}({{type === 1 ? '内部卷' : '外部卷'}})</span> <span style="font-weight: bold; font-size: 20px">{{name}}({{type === 1 ? '内部券' : '外部券'}})</span>
</span> </span>
<div class="operating-button"> <div class="operating-button">
<button *ngIf="type === 1" nz-button nzType="primary" class="right-btn" (click)="showModal()"><i nz-icon <button *ngIf="type === 1" nz-button nzType="primary" class="right-btn" (click)="showModal()"><i nz-icon

@ -118,13 +118,10 @@ export class SalesCodeListComponent implements OnInit {
} }
handleChange(info: NzUploadChangeParam): void { handleChange(info: NzUploadChangeParam): void {
if (info.file.status !== 'uploading') {
console.log(info.file, info.fileList);
}
if (info.file.status === 'done') { if (info.file.status === 'done') {
if (info.file.response.return_code === '000000') { if (info.file.response.return_code === '000000') {
this.loading = false; this.loading = false;
if (info.file.response.return_data == null || info.file.response.return_data.length === 0) { if (info.file.response.return_data == null || info.file.response.return_data.errorTotal === 0) {
this.message.success('导入成功'); this.message.success('导入成功');
this.getRequest(true, this.searchForm.value); this.getRequest(true, this.searchForm.value);
} else { } else {

@ -41,7 +41,7 @@
商戶名称: 商戶名称:
<span style="font-weight: bold; font-size: 20px">{{name}}</span> <span style="font-weight: bold; font-size: 20px">{{name}}</span>
</span> </span>
<div class="operating-button"> <div class="operating-button" *ngIf="id == null" >
<button nz-button nzType="primary" class="right-btn" [routerLink]="['/admin/merchantStore/store-edit']" ><i nz-icon nzType="plus" nzTheme="outline"></i>添加</button> <button nz-button nzType="primary" class="right-btn" [routerLink]="['/admin/merchantStore/store-edit']" ><i nz-icon nzType="plus" nzTheme="outline"></i>添加</button>
<nz-upload <nz-upload
[nzAccept]="'.xls,.xlsx'" [nzAccept]="'.xls,.xlsx'"

@ -22,7 +22,7 @@
</nz-form-item> </nz-form-item>
</div> </div>
<div nz-col [nzSpan]="8"> <div nz-col [nzSpan]="8">
<nz-form-item> <nz-form-item>77
<nz-form-label [nzFor]="'password'" nzRequired>登录密码</nz-form-label> <nz-form-label [nzFor]="'password'" nzRequired>登录密码</nz-form-label>
<nz-form-control nzErrorTip="请输入登录密码!"> <nz-form-control nzErrorTip="请输入登录密码!">
<nz-input-group [nzSuffix]="suffixTemplate"> <nz-input-group [nzSuffix]="suffixTemplate">
@ -34,14 +34,6 @@
</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]="'merchantKey'" nzRequired>商户编号</nz-form-label>
<nz-form-control nzErrorTip="请输入商户编号!">
<input nz-input placeholder="请输入商户编号..." [formControlName]="'merchantKey'" id="'merchantKey'" />
</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]="'merchantName'" nzRequired>商户名称</nz-form-label> <nz-form-label [nzFor]="'merchantName'" nzRequired>商户名称</nz-form-label>

@ -51,7 +51,6 @@ export class MerchantEditComponent implements OnInit {
this.validateForm = this.fb.group({ this.validateForm = this.fb.group({
loginTelephone: [null, [Validators.required, ValidatorsService.mobile]], loginTelephone: [null, [Validators.required, ValidatorsService.mobile]],
password: [null, [Validators.required, ValidatorsService.minLength(6)]], password: [null, [Validators.required, ValidatorsService.minLength(6)]],
merchantKey: [null, [Validators.required, ValidatorsService.maxLength(10)]],
merchantName: [null, [Validators.required, ValidatorsService.pwdLength(2, 12)]], merchantName: [null, [Validators.required, ValidatorsService.pwdLength(2, 12)]],
telephone: [null, [Validators.required]], telephone: [null, [Validators.required]],
address: [null, [Validators.required]], address: [null, [Validators.required]],
@ -75,7 +74,7 @@ export class MerchantEditComponent implements OnInit {
this.validateForm.reset(); this.validateForm.reset();
} }
// 课程保存 // 保存
public getSave(): void { public getSave(): void {
// tslint:disable-next-line:forin // tslint:disable-next-line:forin
for (const i in this.validateForm.controls) { for (const i in this.validateForm.controls) {
@ -104,7 +103,7 @@ export class MerchantEditComponent implements OnInit {
this.getBack(); this.getBack();
this.message.success('修改成功'); this.message.success('修改成功');
} else { } else {
this.message.create('error', '修改失败'); this.message.create('error', data['return_msg']);
} }
}); });
} else { } else {
@ -115,7 +114,7 @@ export class MerchantEditComponent implements OnInit {
this.getBack(); this.getBack();
this.message.success('添加成功'); this.message.success('添加成功');
} else { } else {
this.message.create('error', '保存失败'); this.message.create('error', data['return_msg']);
} }
}); });
} }

@ -1,6 +1,5 @@
import { Component, OnInit } from '@angular/core'; import { Component, OnInit } from '@angular/core';
import {FormBuilder, FormGroup} from '@angular/forms'; import {FormBuilder, FormGroup} from '@angular/forms';
import {UserService} from '../../../services/user.service';
import {IconService} from '../../../services/icon.service'; import {IconService} from '../../../services/icon.service';
import {NzMessageService} from 'ng-zorro-antd'; import {NzMessageService} from 'ng-zorro-antd';
import {CommonsService} from '../../../services/commons.service'; import {CommonsService} from '../../../services/commons.service';
@ -14,7 +13,7 @@ import {environment} from '../../../../environments/environment';
styleUrls: ['./merchant-list.component.scss'] styleUrls: ['./merchant-list.component.scss']
}) })
export class MerchantListComponent implements OnInit { export class MerchantListComponent implements OnInit {
WEB_SERVE_URL = environment.baseUrl; WEB_SERVE_URL = environment.imageUrl;
searchForm: FormGroup; // 搜索框 searchForm: FormGroup; // 搜索框
requestData = []; // 列表数据 requestData = []; // 列表数据
total: number; // 页码 total: number; // 页码

@ -0,0 +1,101 @@
<!-- 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="6">
<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="6">
<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="6">
<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-option nzLabel="已取消" nzValue="5"></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="180px">订单号</th>
<th nzWidth="180px">支付流水号</th>
<th nzWidth="120px">客户名称</th>
<th nzWidth="130px">客户电话</th>
<th nzWidth="100px">支付模式</th>
<th nzWidth="100px">支付方式</th>
<th nzWidth="100px">支付金额</th>
<th nzWidth="140px">支付时间</th>
<th nzWidth="140px">取消时间</th>
<th nzWidth="140px">创建时间</th>
<th nzWidth="80px">状态</th>
</tr>
</thead>
<tbody>
<tr *ngFor="let data of ajaxTable.data; let i = index">
<td>{{i+1}}</td>
<td>{{data.orderNo}}</td>
<td>{{data.paySerialNo == null ? '暂无': data.paySerialNo}}</td>
<td>{{data.memName == null ? '暂无': data.memName}}</td>
<td>{{data.memPhone == null ? '暂无': data.memPhone}}</td>
<td>{{data.payModel == null ? '暂无': data.payModel}}</td>
<td>{{data.payType == null ? '暂无': data.payType}}</td>
<td>{{data.payPrice == null ? '暂无': data.payPrice}}</td>
<td>{{data.payTime | date: 'yyyy-MM-dd HH:mm'}}</td>
<td>{{data.cancelTime | date: 'yyyy-MM-dd HH:mm'}}</td>
<td>{{data.createTime | date: 'yyyy-MM-dd HH:mm'}}</td>
<td>{{data.orderStatus | orderCouponStatus}}</td>
</tbody>
</nz-table>
</div>

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

@ -0,0 +1,84 @@
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';
@Component({
selector: 'app-order-list',
templateUrl: './order-list.component.html',
styleUrls: ['./order-list.component.scss']
})
export class OrderListComponent implements OnInit {
WEB_SERVE_URL = environment.baseUrl;
searchForm: FormGroup; // 搜索框
requestData = []; // 列表数据
total: number; // 页码
pageNum = 1; // 页码
pageSize = 10; // 条码
loading = true;
constructor(
private form: FormBuilder,
private order: OrderService,
private iconService: IconService,
private message: NzMessageService,
private router: Router,
private common: CommonsService
) {
}
ngOnInit(): void {
this.init();
}
public init(): void {
this.searchForm = this.form.group({
phone: [null],
orderNo: [null],
status: [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.order.getOrderCouponList(whereObject, data => {
if (data['return_code'] === '000000') {
console.log(data);
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 getDetail(id: number): void {
this.router.navigate(['/admin/merchant/merchant-detail'], {
queryParams: {
merchantId: id
}
}).then(r => console.log(r));
}
}

@ -0,0 +1,14 @@
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import {OrderListComponent} from './order-list/order-list.component';
const routes: Routes = [
{ path: 'order-list', component: OrderListComponent },
];
@NgModule({
imports: [RouterModule.forChild(routes)],
exports: [RouterModule]
})
export class OrderRoutingModule { }

@ -0,0 +1,28 @@
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { OrderRoutingModule } from './order-routing.module';
import { OrderListComponent } from './order-list/order-list.component';
import {NgZorroAntdModule} from 'ng-zorro-antd';
import {SeparateModule} from '../../common/separate/separate.module';
import {FormsModule, ReactiveFormsModule} from '@angular/forms';
import {BreadcrumbModule} from '../../common/breadcrumb/breadcrumb.module';
import {RegionSelectorModule} from '../../common/region-selector/region-selector.module';
import {AppCommonModule} from "../../app-common.module";
@NgModule({
declarations: [OrderListComponent],
imports: [
CommonModule,
OrderRoutingModule,
NgZorroAntdModule,
SeparateModule,
ReactiveFormsModule,
FormsModule,
BreadcrumbModule,
RegionSelectorModule,
AppCommonModule
]
})
export class OrderModule { }

@ -1 +1,112 @@
<p>price-list 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="6">
<nz-form-item>
<nz-form-label [nzSpan]="6">商户编号</nz-form-label>
<nz-form-control [nzSpan]="16">
<input nz-input formControlName="merchantKey"/>
</nz-form-control>
</nz-form-item>
</div>
<div nz-col nzSpan="6">
<nz-form-item>
<nz-form-label [nzSpan]="6">商户名称</nz-form-label>
<nz-form-control [nzSpan]="16">
<input nz-input formControlName="merchantName"/>
</nz-form-control>
</nz-form-item>
</div>
<div nz-col nzSpan="6">
<nz-form-item>
<nz-form-label [nzSpan]="6">商户电话</nz-form-label>
<nz-form-control [nzSpan]="16">
<input nz-input formControlName="telephone"/>
</nz-form-control>
</nz-form-item>
</div>
<div nz-col nzSpan="6">
<nz-form-item>
<nz-form-label [nzSpan]="6">商户状态</nz-form-label>
<nz-form-control [nzSpan]="16">
<nz-select nzShowSearch nzAllowClear formControlName="status" nzPlaceHolder="请选择状态">
<nz-option nzLabel="禁用" nzValue="0"></nz-option>
<nz-option nzLabel="正常" nzValue="1"></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" [routerLink]="['/admin/merchant/merchant-edit']" ><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="70px">商户LOGO</th>
<th nzWidth="100px">商户电话</th>
<th nzWidth="100px">创建时间</th>
<th nzWidth="50px">状态</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.merchantKey}}</td>
<td>{{data.merchantName}}</td>
<td>
<img class="head_img" src="{{WEB_SERVE_URL + data.merchantLogo}}" onerror="this.src='../../../../assets/admin/navigation/icon.png'" alt="">
</td>
<td>{{data.telephone}}</td>
<td>{{data.createTime | date: 'yyyy-MM-dd HH:mm'}}</td>
<td>{{data.status ===1 ? '正常' : '禁用'}}</td>
<td nzRight="0px" class="table-td-operation">
<a (click)="getEdit(data.id)"><i nz-icon nzType="form" nzTheme="outline" nz-tooltip="编辑"></i></a>
<nz-divider nzType="vertical"></nz-divider>
<a (click)="getDetail(data.id)"><i nz-icon [nzIconfont]="'icon-xiangqing'" nz-tooltip="商户详情"></i></a>
<nz-divider nzType="vertical"></nz-divider>
<a (click)="getList(data.id , data.merchantName)"><i nz-icon nzType="unordered-list" nzTheme="outline" nz-tooltip="门店列表"></i></a>
<nz-divider nzType="vertical"></nz-divider>
<a *ngIf="data.status === 1" (click)='disableMerchant(data.id)'><i nz-icon nzType="stop" nzTheme="outline" nz-tooltip="禁用"></i></a>
<a *ngIf="data.status !== 1" (click)='enableMerchant(data.id)'><i nz-icon nzType="check-circle" nzTheme="outline" nz-tooltip="启用"></i></a>
</td>
</tbody>
</nz-table>
</div>

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

@ -1,4 +1,11 @@
import { Component, OnInit } from '@angular/core'; 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';
@Component({ @Component({
selector: 'app-price-list', selector: 'app-price-list',
@ -7,9 +14,122 @@ import { Component, OnInit } from '@angular/core';
}) })
export class PriceListComponent implements OnInit { export class PriceListComponent implements OnInit {
constructor() { } WEB_SERVE_URL = environment.imageUrl;
searchForm: FormGroup; // 搜索框
requestData = []; // 列表数据
total: number; // 页码
pageNum = 1; // 页码
pageSize = 10; // 条码
loading = true;
constructor(
private form: FormBuilder,
private merchant: MerchantService,
private iconService: IconService,
private message: NzMessageService,
private router: Router,
private common: CommonsService
) {
}
ngOnInit(): void { ngOnInit(): void {
this.init();
}
public init(): void {
this.searchForm = this.form.group({
merchantKey: [null],
merchantName: [null],
telephone: [null],
status: [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.merchant.getMerchantList(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 disableMerchant(id): void {
const message = '是否禁用商户';
this.common.showConfirm(message, data => {
if (data) {
this.merchant.disableMerchant(id, dataReturn => {
if (dataReturn['return_code'] === '000000') {
this.message.success('操作成功');
this.getRequest(false , this.searchForm.value);
} else {
this.message.warning(dataReturn['return_msg']);
}
});
}
});
}
// 启动商户
public enableMerchant(id): void {
const message = '是否启用商户';
this.common.showConfirm(message, data => {
if (data) {
this.merchant.enableMerchant(id, dataReturn => {
if (dataReturn['return_code'] === '000000') {
this.message.success('操作成功');
this.getRequest(false , this.searchForm.value);
} else {
this.message.warning(dataReturn['return_msg']);
}
});
}
});
}
// 修改
public getEdit(id: number): void {
this.router.navigate(['/admin/merchant/merchant-edit'], {
queryParams: {
merchantId: id
}
}).then(r => console.log(r));
} }
// 查看详情
public getDetail(id: number): void {
this.router.navigate(['/admin/merchant/merchant-detail'], {
queryParams: {
merchantId: id
}
}).then(r => console.log(r));
}
// 查看门店列表
public getList(id: number , merchantName: string): void {
this.router.navigate(['/admin/merchantStore/store-list'], {
queryParams: {
merchantId: id,
name: merchantName,
}
}).then(r => console.log(r));
}
} }

@ -0,0 +1,50 @@
<!-- start 面包屑 -->
<app-breadcrumb></app-breadcrumb>
<!-- end 面包屑 -->
<div class="inner-content">
<span>共计 {{total}} 条数据</span>
<div class="operating-button">
<button nz-button nzType="primary" class="right-btn" [routerLink]="['/admin/system/sinopec-edit']" ><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">客户AppId</th>
<th nzWidth="80px">客户密码</th>
<th nzWidth="100px">客户编码</th>
<th nzWidth="100px">客户KEY</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.appId}}</td>
<td>{{data.appSecret}}</td>
<td>{{data.code}}</td>
<td>{{data.signkey}}</td>
<td>{{data.createTime | date: 'yyyy-MM-dd HH:mm'}}</td>
<td nzRight="0px" class="table-td-operation">
<a (click)="getEdit(data.id)"><i nz-icon nzType="form" nzTheme="outline" nz-tooltip="编辑"></i></a>
</td>
</tbody>
</nz-table>
</div>

@ -0,0 +1,90 @@
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 {SystemService} from '../../../services/system.service';
@Component({
selector: 'app-sinopec-config',
templateUrl: './sinopec-config.component.html',
styleUrls: ['./sinopec-config.component.scss']
})
export class SinopecConfigComponent implements OnInit {
WEB_SERVE_URL = environment.imageUrl;
searchForm: FormGroup; // 搜索框
requestData = []; // 列表数据
total: number; // 页码
pageNum = 1; // 页码
pageSize = 10; // 条码
loading = true;
constructor(
private form: FormBuilder,
private system: SystemService,
private iconService: IconService,
private message: NzMessageService,
private router: Router,
) {
}
ngOnInit(): void {
this.init();
}
public init(): void {
this.searchForm = this.form.group({
merchantKey: [null],
merchantName: [null],
telephone: [null],
status: [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.system.getListSinopecConfig(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.router.navigate(['/admin/system/sinopec-edit'], {
queryParams: {
sinopecId: id
}
}).then(r => console.log(r));
}
// // 查看详情
// public getDetail(id: number): void {
// this.router.navigate(['/admin/system/sinopec-detail'], {
// queryParams: {
// merchantId: id
// }
// }).then(r => console.log(r));
// }
}

@ -0,0 +1,56 @@
<!-- start 面包屑 -->
<nz-breadcrumb>
<nz-breadcrumb-item>
<a (click)="getBack()">系统管理</a>
</nz-breadcrumb-item>
<nz-breadcrumb-item>
编辑配置
</nz-breadcrumb-item>
</nz-breadcrumb>
<!-- end 面包屑 -->
<nz-content class="inner-content">
<form nz-form [formGroup]="validateForm" class="ant-advanced-search-form">
<div nz-row [nzGutter]="24">
<div nz-col [nzSpan]="8">
<nz-form-item>
<nz-form-label [nzFor]="'appId'" nzRequired>客户AppId</nz-form-label>
<nz-form-control nzErrorTip="请输入客户AppId!">
<input nz-input placeholder="请输入客户AppId..." [formControlName]="'appId'" id="'appId'" />
</nz-form-control>
</nz-form-item>
</div>
<div nz-col [nzSpan]="8">
<nz-form-item>
<nz-form-label [nzFor]="'appSecret'" nzRequired>客户密码</nz-form-label>
<nz-form-control nzErrorTip="请输入客户密码!">
<input nz-input placeholder="请输入客户密码..." [formControlName]="'appSecret'" id="'appSecret'" />
</nz-form-control>
</nz-form-item>
</div>
<div nz-col [nzSpan]="8">
<nz-form-item>
<nz-form-label [nzFor]="'code'" nzRequired>客户编码</nz-form-label>
<nz-form-control nzErrorTip="请输入客户编码!">
<input nz-input placeholder="请输入客户编码..." [formControlName]="'code'" id="'code'" />
</nz-form-control>
</nz-form-item>
</div>
<div nz-col [nzSpan]="8">
<nz-form-item>
<nz-form-label [nzFor]="'signkey'" nzRequired>客户KEY</nz-form-label>
<nz-form-control nzErrorTip="请输入客户KEY!">
<input nz-input placeholder="请输入客户KEY..." [formControlName]="'signkey'" id="'signkey'" />
</nz-form-control>
</nz-form-item>
</div>
</div>
<div nz-row>
<div nz-col [nzSpan]="24" class="search-area">
<button nz-button (click)="resetForm()">重置</button>
<button nz-button [nzType]="'primary'" (click)="getSave()">提交</button>
</div>
</div>
</form>
</nz-content>

@ -0,0 +1,6 @@
button {
margin-left: 8px;
}
:host ::ng-deep .ant-upload {
background-color: #ffffff;
}

@ -0,0 +1,100 @@
import { Component, OnInit } from '@angular/core';
import {FormBuilder, FormGroup, Validators} from '@angular/forms';
import {environment} from '../../../../environments/environment';
import {MerchantService} from '../../../services/merchant.service';
import {NzMessageService} from 'ng-zorro-antd';
import {ActivatedRoute} from '@angular/router';
import {SystemService} from '../../../services/system.service';
@Component({
selector: 'app-sinopec-edit',
templateUrl: './sinopec-edit.component.html',
styleUrls: ['./sinopec-edit.component.scss']
})
export class SinopecEditComponent implements OnInit {
validateForm!: FormGroup;
data: any;
editFlag = false;
id: number;
WEB_SERVE_URL = environment.baseUrl;
constructor(
private fb: FormBuilder,
private system: SystemService,
private message: NzMessageService, // 信息提示
private activatedRoute: ActivatedRoute,
) {
}
ngOnInit(): void {
this.activatedRoute.queryParams.subscribe(queryParams => {
if (queryParams.sinopecId != null) {
this.editFlag = true;
this.id = queryParams.sinopecId;
this.getDetails(queryParams.sinopecId);
}
});
this.validateForm = this.fb.group({
appId: [null, [Validators.required]],
appSecret: [null, [Validators.required]],
code: [null, [Validators.required]],
signkey: [null, [Validators.required]],
});
}
// 返回
getBack() {
history.back();
}
// 重置
public resetForm(): void {
this.validateForm.reset();
}
// 保存
public getSave(): 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.editFlag) {
this.validateForm.value.id = this.id;
this.system.updateMerchant(this.validateForm.value, data => {
if (data['return_code'] === '000000') {
this.getBack();
this.message.success('修改成功');
} else {
this.message.create('error', data['return_msg']);
}
});
} else {
this.system.insertMerchant(this.validateForm.value, data => {
if (data['return_code'] === '000000') {
this.getBack();
this.message.success('添加成功');
} else {
this.message.create('error', data['return_msg']);
}
});
}
}
public getDetails(id) {
this.system.findById(id, data => {
if (data['return_code'] === '000000') {
this.validateForm.patchValue(data['return_data']);
} else {
this.message.create('error', data['return_msg']);
}
});
}
}

@ -7,6 +7,8 @@ import {SystemUserComponent} from './system-user/system-user.component';
import {PermissionComponent} from './permission/permission.component'; import {PermissionComponent} from './permission/permission.component';
import {MenuComponent} from './menu/menu.component'; import {MenuComponent} from './menu/menu.component';
import {PositionRelComponent} from './position-rel/position-rel.component'; import {PositionRelComponent} from './position-rel/position-rel.component';
import {SinopecConfigComponent} from './sinopec-config/sinopec-config.component';
import {SinopecEditComponent} from './sinopec-edit/sinopec-edit.component';
const routes: Routes = [ const routes: Routes = [
{ path: 'systemorganization', component: SystemOrganizationComponent}, { path: 'systemorganization', component: SystemOrganizationComponent},
@ -16,6 +18,8 @@ const routes: Routes = [
{ path: 'menu', component: MenuComponent }, { path: 'menu', component: MenuComponent },
{ path: 'permission', component: PermissionComponent }, { path: 'permission', component: PermissionComponent },
{ path: 'positionrel', component: PositionRelComponent }, { path: 'positionrel', component: PositionRelComponent },
{ path: 'sinopec-config', component: SinopecConfigComponent },
{ path: 'sinopec-edit', component: SinopecEditComponent },
]; ];
@NgModule({ @NgModule({

@ -16,8 +16,10 @@ import {BreadcrumbModule} from '../../common/breadcrumb/breadcrumb.module';
import {RegionSelectorModule} from '../../common/region-selector/region-selector.module'; import {RegionSelectorModule} from '../../common/region-selector/region-selector.module';
import { PositionRelComponent } from './position-rel/position-rel.component'; import { PositionRelComponent } from './position-rel/position-rel.component';
import {AppCommonModule} from '../../app-common.module'; import {AppCommonModule} from '../../app-common.module';
import { SinopecConfigComponent } from './sinopec-config/sinopec-config.component';
import { SinopecEditComponent } from './sinopec-edit/sinopec-edit.component';
@NgModule({ @NgModule({
declarations: [SystemOrganizationComponent, SystemRoleComponent, SystemRoleShowComponent, SystemUserComponent, MenuComponent, PermissionComponent, PositionRelComponent], declarations: [SystemOrganizationComponent, SystemRoleComponent, SystemRoleShowComponent, SystemUserComponent, MenuComponent, PermissionComponent, PositionRelComponent, SinopecConfigComponent, SinopecEditComponent],
imports: [ imports: [
CommonModule, CommonModule,
SystemRoutingModule, SystemRoutingModule,

@ -85,5 +85,4 @@ export class UserListComponent implements OnInit {
}); });
} }
} }

@ -18,6 +18,7 @@ import {
AuditTypePipe, AuditTypePipe,
AuditStatusPipe AuditStatusPipe
} from './pipes'; } from './pipes';
import { OrderCouponStatusPipe } from './pipes/order/order-coupon-status.pipe';
const PIPES = [ const PIPES = [
TimesPipe, TimesPipe,
@ -27,6 +28,7 @@ const PIPES = [
CouponCodePipe, CouponCodePipe,
AuditTypePipe, AuditTypePipe,
AuditStatusPipe, AuditStatusPipe,
OrderCouponStatusPipe,
]; ];

@ -56,6 +56,11 @@ const routes: Routes = [
loadChildren: () => import('./admin/audit/audit.module').then(m => m.AuditModule), loadChildren: () => import('./admin/audit/audit.module').then(m => m.AuditModule),
canActivate: [InitGuardService] canActivate: [InitGuardService]
}, },
{
path: 'order',
loadChildren: () => import('./admin/order/order.module').then(m => m.OrderModule),
canActivate: [InitGuardService]
},
{ {
path: 'system', path: 'system',
loadChildren: () => import('./admin/system/system.module').then(m => m.SystemModule), loadChildren: () => import('./admin/system/system.module').then(m => m.SystemModule),

@ -5,3 +5,4 @@ export * from './coupon-status.pipe';
export * from './coupon-code.pipe'; export * from './coupon-code.pipe';
export * from './audit-status.pipe'; export * from './audit-status.pipe';
export * from './audit-type.pipe'; export * from './audit-type.pipe';
export * from './order/order-coupon-status.pipe';

@ -0,0 +1,22 @@
import { Pipe, PipeTransform } from '@angular/core';
@Pipe({
name: 'orderCouponStatus'
})
export class OrderCouponStatusPipe implements PipeTransform {
transform(value: number): string {
switch (value) {
case 1:
return '待支付';
case 2:
return '已支付';
case 3:
return '已完成';
case 4:
return '已退款';
case 5:
return '已取消';
}
}
}

@ -10,11 +10,15 @@ export class SystemPipe implements PipeTransform {
case 0: case 0:
return '超级管理员'; return '超级管理员';
case 1: case 1:
return '区域账号'; return '运营中心账户';
case 2: case 2:
return '商户账号'; return '商户账号';
case 3: case 3:
return '门店账号'; return '门店账号';
case 4:
return '代理商账号';
case 5:
return '分公司账号';
} }
} }

@ -26,7 +26,7 @@ export class CompanyService {
} }
/** /**
* *
* *
* @param params * @param params
* @param callBack * @param callBack

@ -12,7 +12,7 @@ export class IconService {
constructor(private iconService: NzIconService) { constructor(private iconService: NzIconService) {
this.iconService.fetchFromIconfont({ this.iconService.fetchFromIconfont({
scriptUrl: 'https://at.alicdn.com/t/font_2424521_j7tpclfptw.js' scriptUrl: 'https://at.alicdn.com/t/font_2424521_9lbh3xk0u0h.js'
}); });
} }
} }

@ -0,0 +1,27 @@
import { Injectable } from '@angular/core';
import {environment} from '../../environments/environment';
import {HttpClient} from '@angular/common/http';
import {CommonsService} from './commons.service';
@Injectable({
providedIn: 'root'
})
export class OrderService {
constructor(
private http: HttpClient,
private common: CommonsService
) { }
/**
*
*
* @param paramsObject
* @param callBack
*/
public getOrderCouponList(paramsObject: object, callBack) {
this.http.get(environment.baseUrl + 'highOrder/getOrderList?' + this.common.getWhereCondition(paramsObject)).subscribe(data => {
callBack(data);
});
}
}

@ -1,6 +1,7 @@
import {Injectable} from '@angular/core'; import {Injectable} from '@angular/core';
import {HttpClient} from '@angular/common/http'; import {HttpClient} from '@angular/common/http';
import {environment} from '../../environments/environment'; import {environment} from '../../environments/environment';
import {CommonsService} from './commons.service';
/** /**
* *
@ -11,7 +12,10 @@ import {environment} from '../../environments/environment';
}) })
export class SystemService { export class SystemService {
constructor(private http: HttpClient) { } constructor(
private http: HttpClient,
private common: CommonsService
) { }
/** /**
* *
@ -110,4 +114,57 @@ export class SystemService {
callBack(data); callBack(data);
}); });
} }
/**
*
*
* @param paramsObject
* @param callBack
*/
public getListSinopecConfig(paramsObject: object, callBack) {
this.http.get(environment.baseUrl + 'secSinopecConfig/getListSinopecConfig?' + this.common.getWhereCondition(paramsObject)).subscribe(data => {
callBack(data);
});
}
/**
*
*
* @param params
* @param callBack
* @return data
*/
public insertMerchant(params: object, callBack) {
this.http.post(environment.baseUrl + 'secSinopecConfig/insertSinopec', params).subscribe(data => {
callBack(data);
});
}
/**
*
*
* @param params
* @param callBack
* @return data
*/
public updateMerchant(params: object, callBack) {
this.http.post(environment.baseUrl + 'secSinopecConfig/updateSinopec', params).subscribe(data => {
callBack(data);
});
}
/**
* id查询详情
*
* @param sinopecId id
* @param callBack
*/
public findById(sinopecId: number, callBack) {
this.http.get(environment.baseUrl + 'secSinopecConfig/findById?sinopecId=' + sinopecId).subscribe(data => {
callBack(data);
});
}
} }

@ -1,5 +1,5 @@
export const environment = { export const environment = {
production: true, production: true,
baseUrl: 'https://hsgcs.dctpay.com/brest/', // 正式环境服务器地址(请求数据地址) baseUrl: 'https://hsg.dctpay.com/brest/', // 正式环境服务器地址(请求数据地址)
imageUrl: 'https://hsgcs.dctpay.com/filesystem/', imageUrl: 'https://hsg.dctpay.com/filesystem/',
}; };

@ -1,5 +1,5 @@
export const environment = { export const environment = {
production: true, production: true,
baseUrl: 'https://newhigh.shinwoten.cn/crest/', // 测试环境服务器地址(请求数据地址) baseUrl: 'https://hsgcs.dctpay.com/brest/', // 测试环境服务器地址(请求数据地址)
imageUrl: 'http://newhigh.shinwoten.cn/filesystem/', imageUrl: 'https://hsgcs.dctpay.com/filesystem/',
}; };

Loading…
Cancel
Save