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 @@
+
+
+
+
+
+
+
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 @@
+
+
+
+ 系统管理
+
+
+ 编辑配置
+
+
+
+
+
+
+
+
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/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 @@
+