From 81d3efcd16291b1d199d4ecf0414e85d5d295a34 Mon Sep 17 00:00:00 2001 From: yuanye <418471657@qq.com> Date: Sat, 27 Mar 2021 14:49:48 +0800 Subject: [PATCH 01/12] 1 --- src/app/admin/user/user-list/user-list.component.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/app/admin/user/user-list/user-list.component.ts b/src/app/admin/user/user-list/user-list.component.ts index 8008eb1..6282bfa 100644 --- a/src/app/admin/user/user-list/user-list.component.ts +++ b/src/app/admin/user/user-list/user-list.component.ts @@ -42,6 +42,7 @@ export class UserListComponent implements OnInit { if (whereObject['regTime'] != null && whereObject['regTime'].length !== 0) { whereObject['regTimeStart'] = whereObject['regTime'][0]; whereObject['regTimeEnd'] = whereObject['regTime'][1]; + whereObject['regTime'] = null; } this.loading = false; if (reset) { @@ -49,6 +50,7 @@ export class UserListComponent implements OnInit { } whereObject['pageNum'] = this.pageNum; whereObject['pageSize'] = this.pageSize; + console.log(whereObject); this.user.getListUser( whereObject, data => { console.log(data); if (data['return_code'] === '000000') { From a0cf8b95b86204e1ae8a677f46573bbcd3049f6c Mon Sep 17 00:00:00 2001 From: yuanye <418471657@qq.com> Date: Sun, 28 Mar 2021 10:12:24 +0800 Subject: [PATCH 02/12] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../order-list/order-list.component.html | 87 +++++++++++++++++++ .../order-list/order-list.component.scss | 4 + .../order/order-list/order-list.component.ts | 84 ++++++++++++++++++ src/app/admin/order/order-routing.module.ts | 14 +++ src/app/admin/order/order.module.ts | 28 ++++++ src/app/app-common.module.ts | 2 + src/app/app-routing.module.ts | 5 ++ src/app/pipes/index.ts | 1 + .../pipes/order/order-coupon-status.pipe.ts | 18 ++++ src/app/services/icon.service.ts | 2 +- src/app/services/order.service.ts | 27 ++++++ 11 files changed, 271 insertions(+), 1 deletion(-) create mode 100644 src/app/admin/order/order-list/order-list.component.html create mode 100644 src/app/admin/order/order-list/order-list.component.scss create mode 100644 src/app/admin/order/order-list/order-list.component.ts create mode 100644 src/app/admin/order/order-routing.module.ts create mode 100644 src/app/admin/order/order.module.ts create mode 100644 src/app/pipes/order/order-coupon-status.pipe.ts create mode 100644 src/app/services/order.service.ts diff --git a/src/app/admin/order/order-list/order-list.component.html b/src/app/admin/order/order-list/order-list.component.html new file mode 100644 index 0000000..945ec4d --- /dev/null +++ b/src/app/admin/order/order-list/order-list.component.html @@ -0,0 +1,87 @@ + + + + + +
+
+
+
+ + 销售码 + + + + +
+ + + + + + + + +
+ + 状态 + + + + + + + + +
+
+ +
+
+ + +
+
+
+
+ + +
+ 共计 {{total}} 条数据 + + + + 编号 + 销售码 + 销售截止时间 + 使用截止时间 + 创建时间 + 状态 + + + + + {{i+1}} + {{data.salesCode}} + {{data.createTime | date: 'yyyy-MM-dd HH:mm'}} + {{data.salesEndTime | date: 'yyyy-MM-dd HH:mm'}} + {{data.useEndTime | date: 'yyyy-MM-dd HH:mm'}} + {{data.status | orderCouponStatus}} + + +
+ + + diff --git a/src/app/admin/order/order-list/order-list.component.scss b/src/app/admin/order/order-list/order-list.component.scss new file mode 100644 index 0000000..8bee3fb --- /dev/null +++ b/src/app/admin/order/order-list/order-list.component.scss @@ -0,0 +1,4 @@ +.head_img { + height: 60px; + width: 60px; +} diff --git a/src/app/admin/order/order-list/order-list.component.ts b/src/app/admin/order/order-list/order-list.component.ts new file mode 100644 index 0000000..b23cb2f --- /dev/null +++ b/src/app/admin/order/order-list/order-list.component.ts @@ -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({ + couponId: [null], + salesCode: [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)); + } + +} diff --git a/src/app/admin/order/order-routing.module.ts b/src/app/admin/order/order-routing.module.ts new file mode 100644 index 0000000..67bba9b --- /dev/null +++ b/src/app/admin/order/order-routing.module.ts @@ -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 { } diff --git a/src/app/admin/order/order.module.ts b/src/app/admin/order/order.module.ts new file mode 100644 index 0000000..6f9c393 --- /dev/null +++ b/src/app/admin/order/order.module.ts @@ -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 { } diff --git a/src/app/app-common.module.ts b/src/app/app-common.module.ts index 22e464e..dfb3e53 100644 --- a/src/app/app-common.module.ts +++ b/src/app/app-common.module.ts @@ -18,6 +18,7 @@ import { AuditTypePipe, AuditStatusPipe } from './pipes'; +import { OrderCouponStatusPipe } from './pipes/order/order-coupon-status.pipe'; const PIPES = [ TimesPipe, @@ -27,6 +28,7 @@ const PIPES = [ CouponCodePipe, AuditTypePipe, AuditStatusPipe, + OrderCouponStatusPipe, ]; diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index 6e6afe7..d9efb45 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -56,6 +56,11 @@ const routes: Routes = [ loadChildren: () => import('./admin/audit/audit.module').then(m => m.AuditModule), canActivate: [InitGuardService] }, + { + path: 'order', + loadChildren: () => import('./admin/order/order.module').then(m => m.OrderModule), + canActivate: [InitGuardService] + }, { path: 'system', loadChildren: () => import('./admin/system/system.module').then(m => m.SystemModule), diff --git a/src/app/pipes/index.ts b/src/app/pipes/index.ts index e07dc9f..ddadb9b 100644 --- a/src/app/pipes/index.ts +++ b/src/app/pipes/index.ts @@ -5,3 +5,4 @@ export * from './coupon-status.pipe'; export * from './coupon-code.pipe'; export * from './audit-status.pipe'; export * from './audit-type.pipe'; +export * from './order/order-coupon-status.pipe'; diff --git a/src/app/pipes/order/order-coupon-status.pipe.ts b/src/app/pipes/order/order-coupon-status.pipe.ts new file mode 100644 index 0000000..d5b9963 --- /dev/null +++ b/src/app/pipes/order/order-coupon-status.pipe.ts @@ -0,0 +1,18 @@ +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 '已使用'; + } + } +} diff --git a/src/app/services/icon.service.ts b/src/app/services/icon.service.ts index 28e4b80..e9882fc 100644 --- a/src/app/services/icon.service.ts +++ b/src/app/services/icon.service.ts @@ -12,7 +12,7 @@ export class IconService { constructor(private iconService: NzIconService) { this.iconService.fetchFromIconfont({ - scriptUrl: 'https://at.alicdn.com/t/font_2424521_j7tpclfptw.js' + scriptUrl: 'https://at.alicdn.com/t/font_2424521_9lbh3xk0u0h.js' }); } } diff --git a/src/app/services/order.service.ts b/src/app/services/order.service.ts new file mode 100644 index 0000000..2df09ad --- /dev/null +++ b/src/app/services/order.service.ts @@ -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/getOrderCouponList?' + this.common.getWhereCondition(paramsObject)).subscribe(data => { + callBack(data); + }); + } +} From 254bc7bf8630110eb7cc12b96005193edd8dc0aa Mon Sep 17 00:00:00 2001 From: Sum1Dream <418471657@qq.com> Date: Sun, 28 Mar 2021 10:17:09 +0800 Subject: [PATCH 03/12] 1 --- .../audit-coupon/audit-coupon.component.html | 9 +- .../coupon-list/coupon-list.component.html | 10 +- .../sales-code-list.component.ts | 5 +- .../store-list/store-list.component.html | 2 +- .../merchant-edit/merchant-edit.component.ts | 6 +- .../merchant-list/merchant-list.component.ts | 3 +- .../price-list/price-list.component.html | 113 +++++++++++++++- .../price-list/price-list.component.scss | 4 + .../price/price-list/price-list.component.ts | 122 +++++++++++++++++- src/app/pipes/system.pipe.ts | 2 + 10 files changed, 257 insertions(+), 19 deletions(-) diff --git a/src/app/admin/audit/audit-coupon/audit-coupon.component.html b/src/app/admin/audit/audit-coupon/audit-coupon.component.html index 64917a8..e1ee179 100644 --- a/src/app/admin/audit/audit-coupon/audit-coupon.component.html +++ b/src/app/admin/audit/audit-coupon/audit-coupon.component.html @@ -85,6 +85,10 @@ {{data.status | auditStatus}} + + + + @@ -110,8 +114,9 @@
- - + + +
diff --git a/src/app/admin/coupon/coupon-list/coupon-list.component.html b/src/app/admin/coupon/coupon-list/coupon-list.component.html index 5c2988f..e75d625 100644 --- a/src/app/admin/coupon/coupon-list/coupon-list.component.html +++ b/src/app/admin/coupon/coupon-list/coupon-list.component.html @@ -99,15 +99,15 @@ 编号 - 卡券编号 - 卡券名称 + 卡券编号 + 卡券名称 卡券面值 销售价格 有效库存 卡券类型 - 卡券状态 - 销售截止时间 - 创建时间 + 卡券状态 + 销售截止时间 + 创建时间 操作 diff --git a/src/app/admin/coupon/sales-code-list/sales-code-list.component.ts b/src/app/admin/coupon/sales-code-list/sales-code-list.component.ts index adb5dbb..bebdd97 100644 --- a/src/app/admin/coupon/sales-code-list/sales-code-list.component.ts +++ b/src/app/admin/coupon/sales-code-list/sales-code-list.component.ts @@ -118,13 +118,10 @@ export class SalesCodeListComponent implements OnInit { } handleChange(info: NzUploadChangeParam): void { - if (info.file.status !== 'uploading') { - console.log(info.file, info.fileList); - } if (info.file.status === 'done') { if (info.file.response.return_code === '000000') { 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.getRequest(true, this.searchForm.value); } else { diff --git a/src/app/admin/merchant-store/store-list/store-list.component.html b/src/app/admin/merchant-store/store-list/store-list.component.html index 3e6e7de..075bef1 100644 --- a/src/app/admin/merchant-store/store-list/store-list.component.html +++ b/src/app/admin/merchant-store/store-list/store-list.component.html @@ -41,7 +41,7 @@ 商戶名称: {{name}} -
+
price-list works!

+ + + + + +
+
+
+
+ + 商户编号 + + + + +
+
+ + 商户名称 + + + + +
+
+ + 商户电话 + + + + +
+
+ + 商户状态 + + + + + + + +
+
+ +
+
+ + +
+
+
+
+ + +
+ 共计 {{total}} 条数据 +
+ +
+ + + + 编号 + 商户编号 + 商户名称 + 商户LOGO + 商户电话 + 创建时间 + 状态 + 操作 + + + + + {{i+1}} + {{data.merchantKey}} + {{data.merchantName}} + + + + {{data.telephone}} + {{data.createTime | date: 'yyyy-MM-dd HH:mm'}} + {{data.status ===1 ? '正常' : '禁用'}} + + + + + + + + + + + + +
+ + + diff --git a/src/app/admin/price/price-list/price-list.component.scss b/src/app/admin/price/price-list/price-list.component.scss index e69de29..8bee3fb 100644 --- a/src/app/admin/price/price-list/price-list.component.scss +++ b/src/app/admin/price/price-list/price-list.component.scss @@ -0,0 +1,4 @@ +.head_img { + height: 60px; + width: 60px; +} diff --git a/src/app/admin/price/price-list/price-list.component.ts b/src/app/admin/price/price-list/price-list.component.ts index e576ed9..9620b52 100644 --- a/src/app/admin/price/price-list/price-list.component.ts +++ b/src/app/admin/price/price-list/price-list.component.ts @@ -1,4 +1,11 @@ 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({ selector: 'app-price-list', @@ -7,9 +14,122 @@ import { Component, OnInit } from '@angular/core'; }) 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 { + 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)); + } } diff --git a/src/app/pipes/system.pipe.ts b/src/app/pipes/system.pipe.ts index 9249d55..8860468 100644 --- a/src/app/pipes/system.pipe.ts +++ b/src/app/pipes/system.pipe.ts @@ -15,6 +15,8 @@ export class SystemPipe implements PipeTransform { return '商户账号'; case 3: return '门店账号'; + case 4: + return '代理商账号'; } } From e0cf18f505311db4b30c181c39e7cb2b07c00b75 Mon Sep 17 00:00:00 2001 From: Sum1Dream <418471657@qq.com> Date: Sun, 28 Mar 2021 10:59:00 +0800 Subject: [PATCH 04/12] 1 --- angular.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/angular.json b/angular.json index 1253466..0a5bfcf 100644 --- a/angular.json +++ b/angular.json @@ -42,7 +42,7 @@ ] }, "configurations": { - "production": { + "prod": { "fileReplacements": [ { "replace": "src/environments/environment.ts", From e24023ea87dae3188c18e77ab8db36edc3bdaca3 Mon Sep 17 00:00:00 2001 From: Sum1Dream <418471657@qq.com> Date: Sun, 28 Mar 2021 10:59:16 +0800 Subject: [PATCH 05/12] 1 --- .gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 4f785e5..bf10db9 100644 --- a/.gitignore +++ b/.gitignore @@ -2,7 +2,7 @@ .idea/ node_modules/ # See http://help.github.com/ignore-files/ for more about ignoring files. -/src/assets/node_modules/ + # compiled output From 596ff57f2d370bb6b0ced8045c5e6ab8612b7fc0 Mon Sep 17 00:00:00 2001 From: Sum1Dream <418471657@qq.com> Date: Sun, 28 Mar 2021 17:03:22 +0800 Subject: [PATCH 06/12] 1 --- .../coupon-list/coupon-list.component.html | 4 +- .../sinopec-config.component.html | 48 +++++++++ .../sinopec-config.component.scss | 0 .../sinopec-config.component.ts | 90 +++++++++++++++++ .../sinopec-edit/sinopec-edit.component.html | 48 +++++++++ .../sinopec-edit/sinopec-edit.component.scss | 6 ++ .../sinopec-edit/sinopec-edit.component.ts | 99 +++++++++++++++++++ src/app/admin/system/system-routing.module.ts | 4 + src/app/admin/system/system.module.ts | 4 +- src/app/services/system.service.ts | 59 ++++++++++- 10 files changed, 358 insertions(+), 4 deletions(-) create mode 100644 src/app/admin/system/sinopec-config/sinopec-config.component.html create mode 100644 src/app/admin/system/sinopec-config/sinopec-config.component.scss create mode 100644 src/app/admin/system/sinopec-config/sinopec-config.component.ts create mode 100644 src/app/admin/system/sinopec-edit/sinopec-edit.component.html create mode 100644 src/app/admin/system/sinopec-edit/sinopec-edit.component.scss create mode 100644 src/app/admin/system/sinopec-edit/sinopec-edit.component.ts diff --git a/src/app/admin/coupon/coupon-list/coupon-list.component.html b/src/app/admin/coupon/coupon-list/coupon-list.component.html index e75d625..c204da8 100644 --- a/src/app/admin/coupon/coupon-list/coupon-list.component.html +++ b/src/app/admin/coupon/coupon-list/coupon-list.component.html @@ -131,8 +131,8 @@ - - + +
diff --git a/src/app/admin/system/sinopec-config/sinopec-config.component.html b/src/app/admin/system/sinopec-config/sinopec-config.component.html new file mode 100644 index 0000000..c72542e --- /dev/null +++ b/src/app/admin/system/sinopec-config/sinopec-config.component.html @@ -0,0 +1,48 @@ + + + + +
+ 共计 {{total}} 条数据 +
+ +
+ + + + 编号 + 客户AppId + 客户密码 + 客户编码 + + 操作 + + + + + {{i+1}} + {{data.appId}} + {{data.appSecret}} + {{data.code}} + + + + + + +
+ + + diff --git a/src/app/admin/system/sinopec-config/sinopec-config.component.scss b/src/app/admin/system/sinopec-config/sinopec-config.component.scss new file mode 100644 index 0000000..e69de29 diff --git a/src/app/admin/system/sinopec-config/sinopec-config.component.ts b/src/app/admin/system/sinopec-config/sinopec-config.component.ts new file mode 100644 index 0000000..0658d46 --- /dev/null +++ b/src/app/admin/system/sinopec-config/sinopec-config.component.ts @@ -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: { + merchantId: 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)); + } + +} diff --git a/src/app/admin/system/sinopec-edit/sinopec-edit.component.html b/src/app/admin/system/sinopec-edit/sinopec-edit.component.html new file mode 100644 index 0000000..9f000bb --- /dev/null +++ b/src/app/admin/system/sinopec-edit/sinopec-edit.component.html @@ -0,0 +1,48 @@ + + + + 系统管理 + + + 编辑配置 + + + + + +
+
+
+ + 客户AppId + + + + +
+
+ + 客户密码 + + + + +
+
+ + 客户编码 + + + + +
+
+
+
+ + +
+
+
+ +
diff --git a/src/app/admin/system/sinopec-edit/sinopec-edit.component.scss b/src/app/admin/system/sinopec-edit/sinopec-edit.component.scss new file mode 100644 index 0000000..ac60fb8 --- /dev/null +++ b/src/app/admin/system/sinopec-edit/sinopec-edit.component.scss @@ -0,0 +1,6 @@ +button { + margin-left: 8px; +} +:host ::ng-deep .ant-upload { + background-color: #ffffff; +} diff --git a/src/app/admin/system/sinopec-edit/sinopec-edit.component.ts b/src/app/admin/system/sinopec-edit/sinopec-edit.component.ts new file mode 100644 index 0000000..976a932 --- /dev/null +++ b/src/app/admin/system/sinopec-edit/sinopec-edit.component.ts @@ -0,0 +1,99 @@ +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]], + }); + } + + // 返回 + 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']); + } + }); + } +} diff --git a/src/app/admin/system/system-routing.module.ts b/src/app/admin/system/system-routing.module.ts index 9b210c8..d682601 100644 --- a/src/app/admin/system/system-routing.module.ts +++ b/src/app/admin/system/system-routing.module.ts @@ -7,6 +7,8 @@ import {SystemUserComponent} from './system-user/system-user.component'; import {PermissionComponent} from './permission/permission.component'; import {MenuComponent} from './menu/menu.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 = [ { path: 'systemorganization', component: SystemOrganizationComponent}, @@ -16,6 +18,8 @@ const routes: Routes = [ { path: 'menu', component: MenuComponent }, { path: 'permission', component: PermissionComponent }, { path: 'positionrel', component: PositionRelComponent }, + { path: 'sinopec-config', component: SinopecConfigComponent }, + { path: 'sinopec-edit', component: SinopecEditComponent }, ]; @NgModule({ diff --git a/src/app/admin/system/system.module.ts b/src/app/admin/system/system.module.ts index 516d838..1a39276 100644 --- a/src/app/admin/system/system.module.ts +++ b/src/app/admin/system/system.module.ts @@ -16,8 +16,10 @@ import {BreadcrumbModule} from '../../common/breadcrumb/breadcrumb.module'; import {RegionSelectorModule} from '../../common/region-selector/region-selector.module'; import { PositionRelComponent } from './position-rel/position-rel.component'; import {AppCommonModule} from '../../app-common.module'; +import { SinopecConfigComponent } from './sinopec-config/sinopec-config.component'; +import { SinopecEditComponent } from './sinopec-edit/sinopec-edit.component'; @NgModule({ - declarations: [SystemOrganizationComponent, SystemRoleComponent, SystemRoleShowComponent, SystemUserComponent, MenuComponent, PermissionComponent, PositionRelComponent], + declarations: [SystemOrganizationComponent, SystemRoleComponent, SystemRoleShowComponent, SystemUserComponent, MenuComponent, PermissionComponent, PositionRelComponent, SinopecConfigComponent, SinopecEditComponent], imports: [ CommonModule, SystemRoutingModule, diff --git a/src/app/services/system.service.ts b/src/app/services/system.service.ts index f9b0e54..76fe726 100644 --- a/src/app/services/system.service.ts +++ b/src/app/services/system.service.ts @@ -1,6 +1,7 @@ import {Injectable} from '@angular/core'; import {HttpClient} from '@angular/common/http'; import {environment} from '../../environments/environment'; +import {CommonsService} from './commons.service'; /** * 胡锐 @@ -11,7 +12,10 @@ import {environment} from '../../environments/environment'; }) export class SystemService { - constructor(private http: HttpClient) { } + constructor( + private http: HttpClient, + private common: CommonsService + ) { } /** * 删除菜单 @@ -110,4 +114,57 @@ export class SystemService { 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); + }); + } + + + } From e0cfb4a91390854a0966a8bb7f30845872f5368b Mon Sep 17 00:00:00 2001 From: Sum1Dream <418471657@qq.com> Date: Mon, 29 Mar 2021 00:15:35 +0800 Subject: [PATCH 07/12] 1 --- .../audit-coupon/audit-coupon.component.html | 8 +-- .../audit-coupon/audit-coupon.component.ts | 8 ++- .../coupon-edit/coupon-edit.component.html | 8 --- .../coupon-edit/coupon-edit.component.ts | 1 - .../order-list/order-list.component.html | 58 ++++++++++++------- .../order/order-list/order-list.component.ts | 4 +- .../pipes/order/order-coupon-status.pipe.ts | 10 +++- src/app/services/order.service.ts | 4 +- 8 files changed, 56 insertions(+), 45 deletions(-) diff --git a/src/app/admin/audit/audit-coupon/audit-coupon.component.html b/src/app/admin/audit/audit-coupon/audit-coupon.component.html index e1ee179..f902d70 100644 --- a/src/app/admin/audit/audit-coupon/audit-coupon.component.html +++ b/src/app/admin/audit/audit-coupon/audit-coupon.component.html @@ -86,9 +86,9 @@ - + - + @@ -115,8 +115,8 @@
- - + +
diff --git a/src/app/admin/audit/audit-coupon/audit-coupon.component.ts b/src/app/admin/audit/audit-coupon/audit-coupon.component.ts index be0ce01..682bb47 100644 --- a/src/app/admin/audit/audit-coupon/audit-coupon.component.ts +++ b/src/app/admin/audit/audit-coupon/audit-coupon.component.ts @@ -25,6 +25,7 @@ export class AuditCouponComponent implements OnInit { approve: {}, object: {} }; + constructor( private form: FormBuilder, private audit: AuditService, @@ -91,16 +92,17 @@ export class AuditCouponComponent implements OnInit { this.isVisible = false; } - public approveProcessed(statusD: number): void { + public approveProcessed(statusD: number, id: number): void { + this.id = id; const p = { approveId: this.id, status: statusD, remarks: '', }; - this.common.showConfirm('是否确定' , r => { + this.common.showConfirm('是否确定', r => { if (r) { - this.audit.approveProcessed(p , data => { + this.audit.approveProcessed(p, data => { if (data['return_code'] === '000000') { this.isVisible = false; this.getRequest(true, this.searchForm.value); diff --git a/src/app/admin/coupon/coupon-edit/coupon-edit.component.html b/src/app/admin/coupon/coupon-edit/coupon-edit.component.html index 3f1f9bc..a9f9fd1 100644 --- a/src/app/admin/coupon/coupon-edit/coupon-edit.component.html +++ b/src/app/admin/coupon/coupon-edit/coupon-edit.component.html @@ -53,14 +53,6 @@
-
- - 卡券面值 - - - - -
销售价格 diff --git a/src/app/admin/coupon/coupon-edit/coupon-edit.component.ts b/src/app/admin/coupon/coupon-edit/coupon-edit.component.ts index acd91ed..885bae8 100644 --- a/src/app/admin/coupon/coupon-edit/coupon-edit.component.ts +++ b/src/app/admin/coupon/coupon-edit/coupon-edit.component.ts @@ -69,7 +69,6 @@ export class CouponEditComponent implements OnInit { }); this.validateForm = this.fb.group({ couponName: [null, [Validators.required]], - couponPrice: [null, [Validators.required]], couponDesc: [null], couponType: [null, [Validators.required]], salesEndTime: [null, [Validators.required]], diff --git a/src/app/admin/order/order-list/order-list.component.html b/src/app/admin/order/order-list/order-list.component.html index 945ec4d..e311aa6 100644 --- a/src/app/admin/order/order-list/order-list.component.html +++ b/src/app/admin/order/order-list/order-list.component.html @@ -8,28 +8,30 @@
- 销售码 + 订单号 - + + + +
+
+ + 客户手机号 + +
- - - - - - - -
状态 - - - + + + + + @@ -64,21 +66,33 @@ 编号 - 销售码 - 销售截止时间 - 使用截止时间 - 创建时间 - 状态 + 订单号 + 支付流水号 + 客户名称 + 客户电话 + 支付模式 + 支付方式 + 支付金额 + 支付时间 + 取消时间 + 创建时间 + 状态 {{i+1}} - {{data.salesCode}} + {{data.orderNo}} + {{data.paySerialNo == null ? '暂无': data.paySerialNo}} + {{data.memName == null ? '暂无': data.memName}} + {{data.memPhone == null ? '暂无': data.memPhone}} + {{data.payModel == null ? '暂无': data.payModel}} + {{data.payType == null ? '暂无': data.payType}} + {{data.payPrice == null ? '暂无': data.payPrice}} + {{data.payTime | date: 'yyyy-MM-dd HH:mm'}} + {{data.cancelTime | date: 'yyyy-MM-dd HH:mm'}} {{data.createTime | date: 'yyyy-MM-dd HH:mm'}} - {{data.salesEndTime | date: 'yyyy-MM-dd HH:mm'}} - {{data.useEndTime | date: 'yyyy-MM-dd HH:mm'}} - {{data.status | orderCouponStatus}} + {{data.orderStatus | orderCouponStatus}}
diff --git a/src/app/admin/order/order-list/order-list.component.ts b/src/app/admin/order/order-list/order-list.component.ts index b23cb2f..87ba687 100644 --- a/src/app/admin/order/order-list/order-list.component.ts +++ b/src/app/admin/order/order-list/order-list.component.ts @@ -39,8 +39,8 @@ export class OrderListComponent implements OnInit { public init(): void { this.searchForm = this.form.group({ - couponId: [null], - salesCode: [null], + phone: [null], + orderNo: [null], status: [null], }); this.getRequest(true, this.searchForm.value); diff --git a/src/app/pipes/order/order-coupon-status.pipe.ts b/src/app/pipes/order/order-coupon-status.pipe.ts index d5b9963..f0c6b8f 100644 --- a/src/app/pipes/order/order-coupon-status.pipe.ts +++ b/src/app/pipes/order/order-coupon-status.pipe.ts @@ -8,11 +8,15 @@ export class OrderCouponStatusPipe implements PipeTransform { transform(value: number): string { switch (value) { case 1: - return '待销售'; + return '待支付'; case 2: - return '未使用'; + return '已支付'; case 3: - return '已使用'; + return '已完成'; + case 4: + return '已退款'; + case 5: + return '已取消'; } } } diff --git a/src/app/services/order.service.ts b/src/app/services/order.service.ts index 2df09ad..49898c2 100644 --- a/src/app/services/order.service.ts +++ b/src/app/services/order.service.ts @@ -14,13 +14,13 @@ export class OrderService { ) { } /** - * 查询卡券订单列表 + * 查询订单列表 * * @param paramsObject 对象 * @param callBack 回调 */ public getOrderCouponList(paramsObject: object, callBack) { - this.http.get(environment.baseUrl + 'highOrder/getOrderCouponList?' + this.common.getWhereCondition(paramsObject)).subscribe(data => { + this.http.get(environment.baseUrl + 'highOrder/getOrderList?' + this.common.getWhereCondition(paramsObject)).subscribe(data => { callBack(data); }); } From f6dbd630b5bf0c680604d6048c7f8ae8702730a0 Mon Sep 17 00:00:00 2001 From: Sum1Dream <418471657@qq.com> Date: Mon, 29 Mar 2021 18:05:23 +0800 Subject: [PATCH 08/12] 1 --- .../coupon-list/coupon-list.component.html | 2 -- .../sinopec-config.component.html | 6 ++++-- .../sinopec-config/sinopec-config.component.ts | 18 +++++++++--------- .../sinopec-edit/sinopec-edit.component.html | 8 ++++++++ .../sinopec-edit/sinopec-edit.component.ts | 1 + 5 files changed, 22 insertions(+), 13 deletions(-) diff --git a/src/app/admin/coupon/coupon-list/coupon-list.component.html b/src/app/admin/coupon/coupon-list/coupon-list.component.html index c204da8..d04cdff 100644 --- a/src/app/admin/coupon/coupon-list/coupon-list.component.html +++ b/src/app/admin/coupon/coupon-list/coupon-list.component.html @@ -101,7 +101,6 @@ 编号 卡券编号 卡券名称 - 卡券面值 销售价格 有效库存 卡券类型 @@ -116,7 +115,6 @@ {{i+1}} {{data.couponKey}} {{data.couponName}} - ¥{{data.couponPrice}} ¥{{data.salesPrice}} {{data.stockCount}} {{data.couponType === 1 ? '内部卷' : '外部卷'}} diff --git a/src/app/admin/system/sinopec-config/sinopec-config.component.html b/src/app/admin/system/sinopec-config/sinopec-config.component.html index c72542e..32447ec 100644 --- a/src/app/admin/system/sinopec-config/sinopec-config.component.html +++ b/src/app/admin/system/sinopec-config/sinopec-config.component.html @@ -26,7 +26,8 @@ 客户AppId 客户密码 客户编码 - + 客户KEY + 创建时间 操作 @@ -36,7 +37,8 @@ {{data.appId}} {{data.appSecret}} {{data.code}} - + {{data.signkey}} + {{data.createTime | date: 'yyyy-MM-dd HH:mm'}} diff --git a/src/app/admin/system/sinopec-config/sinopec-config.component.ts b/src/app/admin/system/sinopec-config/sinopec-config.component.ts index 0658d46..fa4f333 100644 --- a/src/app/admin/system/sinopec-config/sinopec-config.component.ts +++ b/src/app/admin/system/sinopec-config/sinopec-config.component.ts @@ -73,18 +73,18 @@ export class SinopecConfigComponent implements OnInit { public getEdit(id: number): void { this.router.navigate(['/admin/system/sinopec-edit'], { queryParams: { - merchantId: id + 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)); - } + // // 查看详情 + // public getDetail(id: number): void { + // this.router.navigate(['/admin/system/sinopec-detail'], { + // queryParams: { + // merchantId: id + // } + // }).then(r => console.log(r)); + // } } diff --git a/src/app/admin/system/sinopec-edit/sinopec-edit.component.html b/src/app/admin/system/sinopec-edit/sinopec-edit.component.html index 9f000bb..2508fae 100644 --- a/src/app/admin/system/sinopec-edit/sinopec-edit.component.html +++ b/src/app/admin/system/sinopec-edit/sinopec-edit.component.html @@ -36,6 +36,14 @@
+
+ + 客户KEY + + + + +
diff --git a/src/app/admin/system/sinopec-edit/sinopec-edit.component.ts b/src/app/admin/system/sinopec-edit/sinopec-edit.component.ts index 976a932..52e7269 100644 --- a/src/app/admin/system/sinopec-edit/sinopec-edit.component.ts +++ b/src/app/admin/system/sinopec-edit/sinopec-edit.component.ts @@ -39,6 +39,7 @@ export class SinopecEditComponent implements OnInit { appId: [null, [Validators.required]], appSecret: [null, [Validators.required]], code: [null, [Validators.required]], + signkey: [null, [Validators.required]], }); } From 1540865447ef2154e77ecf9a65b423bc5c96d624 Mon Sep 17 00:00:00 2001 From: Sum1Dream <418471657@qq.com> Date: Tue, 30 Mar 2021 17:47:53 +0800 Subject: [PATCH 09/12] 1 --- .../coupon-edit/coupon-edit.component.html | 16 ++++++++- .../coupon-edit/coupon-edit.component.ts | 34 +++++++++++++++++-- src/app/pipes/system.pipe.ts | 4 ++- src/app/services/company.service.ts | 2 +- 4 files changed, 51 insertions(+), 5 deletions(-) diff --git a/src/app/admin/coupon/coupon-edit/coupon-edit.component.html b/src/app/admin/coupon/coupon-edit/coupon-edit.component.html index a9f9fd1..9122746 100644 --- a/src/app/admin/coupon/coupon-edit/coupon-edit.component.html +++ b/src/app/admin/coupon/coupon-edit/coupon-edit.component.html @@ -201,7 +201,21 @@ 卡券介紹 - + + +
上传图片
+
+ + + + +
diff --git a/src/app/admin/coupon/coupon-edit/coupon-edit.component.ts b/src/app/admin/coupon/coupon-edit/coupon-edit.component.ts index 885bae8..476298e 100644 --- a/src/app/admin/coupon/coupon-edit/coupon-edit.component.ts +++ b/src/app/admin/coupon/coupon-edit/coupon-edit.component.ts @@ -31,6 +31,7 @@ export class CouponEditComponent implements OnInit { id: number; couponImg = []; couponCarouselImg = []; + couponDescImg = []; WEB_SERVE_URL = environment.baseUrl; previewImage: string | undefined = ''; previewVisible = false; @@ -213,8 +214,23 @@ export class CouponEditComponent implements OnInit { this.message.error('请上传卡券轮播图'); 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.couponDesc = this.content; + this.validateForm.value.couponDesc = couponDescImg.join(','); if (this.editFlag) { this.common.showConfirm('是否确定修改,确定将下架' , dataR => { if (dataR) { @@ -258,7 +274,6 @@ export class CouponEditComponent implements OnInit { data['return_data']['couponType'] = String(data['return_data']['couponType']); data['return_data']['displayArea'] = String(data['return_data']['displayArea']); data['return_data']['payType'] = String(data['return_data']['payType']); - this.content = data['return_data']['couponDesc']; if (data['return_data']['couponImg'] != null && data['return_data']['couponImg'] !== '') { const couponImg = String(data['return_data']['couponImg']); const couponArray = []; @@ -285,6 +300,21 @@ export class CouponEditComponent implements OnInit { } 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']); } else { this.message.create('error', data['return_msg']); diff --git a/src/app/pipes/system.pipe.ts b/src/app/pipes/system.pipe.ts index 8860468..fc258f5 100644 --- a/src/app/pipes/system.pipe.ts +++ b/src/app/pipes/system.pipe.ts @@ -10,13 +10,15 @@ export class SystemPipe implements PipeTransform { case 0: return '超级管理员'; case 1: - return '区域账号'; + return '运营中心账户'; case 2: return '商户账号'; case 3: return '门店账号'; case 4: return '代理商账号'; + case 5: + return '分公司账号'; } } diff --git a/src/app/services/company.service.ts b/src/app/services/company.service.ts index 2fbd83d..88a111e 100644 --- a/src/app/services/company.service.ts +++ b/src/app/services/company.service.ts @@ -26,7 +26,7 @@ export class CompanyService { } /** - * 新增卡券 + * 新增 * * @param params 上传对象 * @param callBack 回调 From a409d862d9d18403b8d65c041836ea7d50f1527c Mon Sep 17 00:00:00 2001 From: Sum1Dream <418471657@qq.com> Date: Tue, 30 Mar 2021 19:45:46 +0800 Subject: [PATCH 10/12] 1 --- .../coupon/coupon-edit/coupon-edit.component.html | 10 ++++++++++ .../admin/coupon/coupon-edit/coupon-edit.component.ts | 2 ++ src/environments/environment.prod.ts | 4 ++-- 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/src/app/admin/coupon/coupon-edit/coupon-edit.component.html b/src/app/admin/coupon/coupon-edit/coupon-edit.component.html index a9f9fd1..ebc18f6 100644 --- a/src/app/admin/coupon/coupon-edit/coupon-edit.component.html +++ b/src/app/admin/coupon/coupon-edit/coupon-edit.component.html @@ -31,6 +31,16 @@
+
+ + 卡券来源 + + + + + + +
展示区域 diff --git a/src/app/admin/coupon/coupon-edit/coupon-edit.component.ts b/src/app/admin/coupon/coupon-edit/coupon-edit.component.ts index 885bae8..d43cbda 100644 --- a/src/app/admin/coupon/coupon-edit/coupon-edit.component.ts +++ b/src/app/admin/coupon/coupon-edit/coupon-edit.component.ts @@ -80,6 +80,7 @@ export class CouponEditComponent implements OnInit { isPresent: [false, [Validators.required]], payType: [false, [Validators.required]], displayArea: [false, [Validators.required]], + couponSource: [null], handselCouponId: [null], status: [null], couponKey: [null], @@ -258,6 +259,7 @@ export class CouponEditComponent implements OnInit { data['return_data']['couponType'] = String(data['return_data']['couponType']); data['return_data']['displayArea'] = String(data['return_data']['displayArea']); data['return_data']['payType'] = String(data['return_data']['payType']); + data['return_data']['couponSource'] = String(data['return_data']['couponSource']); this.content = data['return_data']['couponDesc']; if (data['return_data']['couponImg'] != null && data['return_data']['couponImg'] !== '') { const couponImg = String(data['return_data']['couponImg']); diff --git a/src/environments/environment.prod.ts b/src/environments/environment.prod.ts index 726b1dc..2e60ec0 100644 --- a/src/environments/environment.prod.ts +++ b/src/environments/environment.prod.ts @@ -1,5 +1,5 @@ export const environment = { production: true, - baseUrl: 'https://hsgcs.dctpay.com/brest/', // 正式环境服务器地址(请求数据地址) - imageUrl: 'https://hsgcs.dctpay.com/filesystem/', + baseUrl: 'https://hsg.dctpay.com/brest/', // 正式环境服务器地址(请求数据地址) + imageUrl: 'https://hsg.dctpay.com/filesystem/', }; From c640afd8956767253759083a2b6337e2a8933e06 Mon Sep 17 00:00:00 2001 From: Sum1Dream <418471657@qq.com> Date: Wed, 31 Mar 2021 01:01:59 +0800 Subject: [PATCH 11/12] 1 --- src/app/admin/coupon/coupon-list/coupon-list.component.ts | 1 + .../coupon/sales-code-list/sales-code-list.component.html | 2 +- .../merchant/merchant-edit/merchant-edit.component.html | 8 -------- .../merchant/merchant-edit/merchant-edit.component.ts | 1 - src/environments/environment.test.ts | 4 ++-- 5 files changed, 4 insertions(+), 12 deletions(-) diff --git a/src/app/admin/coupon/coupon-list/coupon-list.component.ts b/src/app/admin/coupon/coupon-list/coupon-list.component.ts index 63c7835..e010336 100644 --- a/src/app/admin/coupon/coupon-list/coupon-list.component.ts +++ b/src/app/admin/coupon/coupon-list/coupon-list.component.ts @@ -195,6 +195,7 @@ export class CouponListComponent implements OnInit { // 查看门店列表 public getList(id: number , couponName: string , couponType: number): void { + console.log(couponType); this.router.navigate(['/admin/coupon/salesCode-list'], { queryParams: { couponId: id, diff --git a/src/app/admin/coupon/sales-code-list/sales-code-list.component.html b/src/app/admin/coupon/sales-code-list/sales-code-list.component.html index 0de2db3..e06fe07 100644 --- a/src/app/admin/coupon/sales-code-list/sales-code-list.component.html +++ b/src/app/admin/coupon/sales-code-list/sales-code-list.component.html @@ -46,7 +46,7 @@ 共计 {{total}} 条数据 卡券名称: - {{name}}({{type === 1 ? '内部卷' : '外部卷'}}) + {{name}}({{type === 1 ? '内部券' : '外部券'}})
-
- - 商户编号 - - - - -
商户名称 diff --git a/src/app/admin/merchant/merchant-edit/merchant-edit.component.ts b/src/app/admin/merchant/merchant-edit/merchant-edit.component.ts index afa3cb4..dd91d47 100644 --- a/src/app/admin/merchant/merchant-edit/merchant-edit.component.ts +++ b/src/app/admin/merchant/merchant-edit/merchant-edit.component.ts @@ -51,7 +51,6 @@ export class MerchantEditComponent implements OnInit { this.validateForm = this.fb.group({ loginTelephone: [null, [Validators.required, ValidatorsService.mobile]], password: [null, [Validators.required, ValidatorsService.minLength(6)]], - merchantKey: [null, [Validators.required, ValidatorsService.maxLength(10)]], merchantName: [null, [Validators.required, ValidatorsService.pwdLength(2, 12)]], telephone: [null, [Validators.required]], address: [null, [Validators.required]], diff --git a/src/environments/environment.test.ts b/src/environments/environment.test.ts index 3ee1a1c..cee7c78 100644 --- a/src/environments/environment.test.ts +++ b/src/environments/environment.test.ts @@ -1,5 +1,5 @@ export const environment = { production: true, - baseUrl: 'https://newhigh.shinwoten.cn/crest/', // 测试环境服务器地址(请求数据地址) - imageUrl: 'http://newhigh.shinwoten.cn/filesystem/', + baseUrl: 'https://hsgcs.dctpay.com/brest/', // 测试环境服务器地址(请求数据地址) + imageUrl: 'https://hsgcs.dctpay.com/filesystem/', }; From efa298d06ccebec78e50e05637c7596b0d937411 Mon Sep 17 00:00:00 2001 From: Sum1Dream <418471657@qq.com> Date: Fri, 2 Apr 2021 22:52:43 +0800 Subject: [PATCH 12/12] 1 --- .../admin/merchant/merchant-edit/merchant-edit.component.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/admin/merchant/merchant-edit/merchant-edit.component.html b/src/app/admin/merchant/merchant-edit/merchant-edit.component.html index 7a4537d..5e6c7fa 100644 --- a/src/app/admin/merchant/merchant-edit/merchant-edit.component.html +++ b/src/app/admin/merchant/merchant-edit/merchant-edit.component.html @@ -22,7 +22,7 @@
- + 77 登录密码