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 e06fe07..1ab0055 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
@@ -82,6 +82,7 @@
编号 |
消费码 |
订单ID |
+
使用门店 |
领取时间 |
消费时间 |
销售截止时间 |
@@ -95,6 +96,7 @@
{{i + 1}} |
{{data.salesCode}} |
{{data.orderId == null ? '暂无' : data.orderId}} |
+
{{data.storeName == null ? '暂无' : data.storeName}} |
{{data.receiveTime == null ? '未领取' : data.receiveTime | date: 'yyyy-MM-dd HH:mm'}} |
{{data.consumeTime == null ? '未消费' : data.consumeTime | date: 'yyyy-MM-dd HH:mm'}} |
{{data.salesEndTime | date: 'yyyy-MM-dd HH:mm'}} |
diff --git a/src/app/admin/order/order-coupons/order-coupons.component.html b/src/app/admin/order/order-coupons/order-coupons.component.html
new file mode 100644
index 0000000..eca3f17
--- /dev/null
+++ b/src/app/admin/order/order-coupons/order-coupons.component.html
@@ -0,0 +1,123 @@
+
+
+
+
+
+
共计 {{total}} 条数据
+
+
+
+ 编号 |
+ 优惠券KEY |
+ 优惠券名称 |
+ 优惠券类型 |
+ 优惠内容 |
+ 有效天数 |
+ 截止日期 |
+ 创建时间 |
+ 状态 |
+ 操作 |
+
+
+
+
+ {{i + 1}} |
+ {{data['highDiscount'].discountKey}} |
+ {{data['highDiscount'].discountName}} |
+ {{data['highDiscount'].discountType | discountType}} |
+
+
+ 满{{data['highDiscount'].discountCondition}}抵扣{{data['highDiscount'].discountPrice}}
+
+
+ 抵扣{{data['highDiscount'].discountPrice}}
+
+
+ {{data['highDiscount'].discountPrice}}折
+
+ |
+ {{data['highDiscount'].effectiveDay}} |
+ {{data['highDiscount'].salesEndTime | date: 'yyyy-MM-dd HH:mm'}} |
+ {{data['highDiscount'].createTime}} |
+ {{data['highDiscount'].status | discountStatus}} |
+
+ 使用情况
+
+ |
+
+
+
+
+
+
+
+ 共计 {{totalCode}} 条数据
+
+
+
+ 编号 |
+ 优惠券名称 |
+ 用户名称 |
+ 二维码生成时间 |
+ 状态 |
+
+
+
+
+ {{i+1}} |
+ {{data['highDiscount'].discountName}} |
+
+ {{data['highUser'] == null ? '暂无': data['highUser'].name}}
+ |
+ {{data.createTime | date: 'yyyy-MM-dd HH:mm'}} |
+ {{data.status | couponCode}} |
+
+
+
+
+
diff --git a/src/app/admin/order/order-coupons/order-coupons.component.scss b/src/app/admin/order/order-coupons/order-coupons.component.scss
new file mode 100644
index 0000000..8bee3fb
--- /dev/null
+++ b/src/app/admin/order/order-coupons/order-coupons.component.scss
@@ -0,0 +1,4 @@
+.head_img {
+ height: 60px;
+ width: 60px;
+}
diff --git a/src/app/admin/order/order-coupons/order-coupons.component.ts b/src/app/admin/order/order-coupons/order-coupons.component.ts
new file mode 100644
index 0000000..3bb3ecb
--- /dev/null
+++ b/src/app/admin/order/order-coupons/order-coupons.component.ts
@@ -0,0 +1,114 @@
+import { Component, OnInit } from '@angular/core';
+import {environment} from '../../../../environments/environment';
+import {FormBuilder, FormGroup} from '@angular/forms';
+import {UserService} from '../../../services/user.service';
+import {IconService} from '../../../services/icon.service';
+import {NzMessageService} from 'ng-zorro-antd';
+import {CommonsService} from '../../../services/commons.service';
+import {AgentService} from '../../../services/agent.service';
+import {DiscountService} from '../../../services/discount.service';
+import {LocalStorageService} from '../../../services/local-storage.service';
+import {ADMIN_INFO_OBJECT} from '../../../services/local-storage.namespace';
+
+@Component({
+ selector: 'app-order-coupons',
+ templateUrl: './order-coupons.component.html',
+ styleUrls: ['./order-coupons.component.scss']
+})
+export class OrderCouponsComponent implements OnInit {
+
+ IMAGE_URL = environment.imageUrl;
+ searchForm: FormGroup; // 搜索框
+ requestData = []; // 列表数据
+ total: number; // 页码
+ pageNum = 1; // 页码
+ pageSize = 10; // 条码
+ loading = true;
+
+ requestDataCode = []; // 列表数据
+ totalCode: number; // 页码
+ pageNumCode = 1; // 页码
+ pageSizeCode = 10; // 条码
+ loadingCode = true;
+ isVisible = false;
+ id: number;
+ constructor(
+ private form: FormBuilder,
+ private agent: AgentService,
+ private iconService: IconService,
+ private message: NzMessageService,
+ private store: LocalStorageService, // 数据请求
+ ) {
+ }
+
+ ngOnInit(): void {
+ this.init();
+ }
+
+ public init(): void {
+ this.searchForm = this.form.group({
+ status: [null],
+ });
+ this.getRequest(true, {});
+ }
+
+ // 查询列表
+ public getRequest(reset: boolean = false, whereObject: object) {
+ this.loading = false;
+ if (reset) {
+ this.pageNum = 1;
+ }
+ whereObject['agentId'] = this.store.get(ADMIN_INFO_OBJECT)['highAgent'].id;
+ whereObject['pageNum'] = this.pageNum;
+ whereObject['pageSize'] = this.pageSize;
+ this.agent.getDiscountAgentList(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 getDetail(id: number): void {
+ this.id = id;
+ this.getRequestCode(false , this.searchForm.value);
+ this.isVisible = true;
+ }
+
+ // 查询列表
+ public getRequestCode(reset: boolean = false, whereObject: object) {
+ this.loadingCode = true;
+ if (reset) {
+ this.pageNumCode = 1;
+ }
+ this.searchForm.value['discountAgentId'] = this.id;
+ whereObject['pageNum'] = this.pageNumCode;
+ whereObject['pageSize'] = this.pageSizeCode;
+ this.agent.getDiscountCodeList(whereObject, data => {
+ this.loadingCode = false;
+ if (data['return_code'] === '000000') {
+ this.requestDataCode = data['return_data'].list;
+ this.totalCode = data['return_data'].total;
+ } else {
+ this.message.error(data['return_msg']);
+ }
+ });
+ }
+
+ handleOk(): void {
+ this.isVisible = false;
+ }
+
+ handleCancel(): void {
+ this.isVisible = false;
+ }
+
+}
diff --git a/src/app/admin/order/order-routing.module.ts b/src/app/admin/order/order-routing.module.ts
index 4d2bf72..09f40db 100644
--- a/src/app/admin/order/order-routing.module.ts
+++ b/src/app/admin/order/order-routing.module.ts
@@ -2,11 +2,13 @@ import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import {OrderListComponent} from './order-list/order-list.component';
import {OrderDetailComponent} from './order-detail/order-detail.component';
+import {OrderCouponsComponent} from './order-coupons/order-coupons.component';
const routes: Routes = [
{ path: 'order-list', component: OrderListComponent },
{ path: 'order-detail', component: OrderDetailComponent },
+ { path: 'order-coupons', component: OrderCouponsComponent },
];
@NgModule({
diff --git a/src/app/admin/order/order.module.ts b/src/app/admin/order/order.module.ts
index a75b6ac..78e1790 100644
--- a/src/app/admin/order/order.module.ts
+++ b/src/app/admin/order/order.module.ts
@@ -10,10 +10,11 @@ import {BreadcrumbModule} from '../../common/breadcrumb/breadcrumb.module';
import {RegionSelectorModule} from '../../common/region-selector/region-selector.module';
import {AppCommonModule} from "../../app-common.module";
import { OrderDetailComponent } from './order-detail/order-detail.component';
+import { OrderCouponsComponent } from './order-coupons/order-coupons.component';
@NgModule({
- declarations: [OrderListComponent, OrderDetailComponent],
+ declarations: [OrderListComponent, OrderDetailComponent, OrderCouponsComponent],
imports: [
CommonModule,
OrderRoutingModule,
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 32447ec..034f7c8 100644
--- a/src/app/admin/system/sinopec-config/sinopec-config.component.html
+++ b/src/app/admin/system/sinopec-config/sinopec-config.component.html
@@ -23,6 +23,7 @@
编号 |
+ 客户名称 |
客户AppId |
客户密码 |
客户编码 |
@@ -34,6 +35,7 @@
{{i+1}} |
+ {{data.name}} |
{{data.appId}} |
{{data.appSecret}} |
{{data.code}} |
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 2508fae..e26c6d2 100644
--- a/src/app/admin/system/sinopec-edit/sinopec-edit.component.html
+++ b/src/app/admin/system/sinopec-edit/sinopec-edit.component.html
@@ -20,6 +20,14 @@
+
+
+ 客户名称
+
+
+
+
+
客户密码
@@ -36,6 +44,7 @@
+
客户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 52e7269..6b3d3ec 100644
--- a/src/app/admin/system/sinopec-edit/sinopec-edit.component.ts
+++ b/src/app/admin/system/sinopec-edit/sinopec-edit.component.ts
@@ -40,6 +40,7 @@ export class SinopecEditComponent implements OnInit {
appSecret: [null, [Validators.required]],
code: [null, [Validators.required]],
signkey: [null, [Validators.required]],
+ name: [null, [Validators.required]],
});
}
diff --git a/src/app/admin/user/user-gold/user-gold.component.html b/src/app/admin/user/user-gold/user-gold.component.html
new file mode 100644
index 0000000..7531a33
--- /dev/null
+++ b/src/app/admin/user/user-gold/user-gold.component.html
@@ -0,0 +1,72 @@
+
+
+
+
+
+
+
+
+
+ 共计 {{total}} 条数据
+
+
+
+ 编号 |
+ 用户名称 |
+ 用户电话 |
+ 金币类型 |
+ 来源类型 |
+ 金币数 |
+ 产生时间 |
+
+
+
+
+ {{i+1}} |
+ {{data['highUser'].name}} |
+ {{data['highUser'].phone}} |
+ {{data.goldType === 1 ? '收入' : '支出'}} |
+ {{data.resType === 1 ? '充值' : '订单'}} |
+ {{data.gold}} |
+ {{data.createTime | date: 'yyyy-MM-dd HH:mm:ss'}} |
+
+
+
+
+
+
diff --git a/src/app/admin/user/user-gold/user-gold.component.scss b/src/app/admin/user/user-gold/user-gold.component.scss
new file mode 100644
index 0000000..ffa041c
--- /dev/null
+++ b/src/app/admin/user/user-gold/user-gold.component.scss
@@ -0,0 +1,4 @@
+.head_img {
+ height: 50px;
+ width: 50px;
+}
diff --git a/src/app/admin/user/user-gold/user-gold.component.ts b/src/app/admin/user/user-gold/user-gold.component.ts
new file mode 100644
index 0000000..c40bf2f
--- /dev/null
+++ b/src/app/admin/user/user-gold/user-gold.component.ts
@@ -0,0 +1,69 @@
+import { Component, OnInit } from '@angular/core';
+import {environment} from '../../../../environments/environment';
+import {FormBuilder, FormGroup} from '@angular/forms';
+import {UserService} from '../../../services/user.service';
+import {IconService} from '../../../services/icon.service';
+import {NzMessageService} from 'ng-zorro-antd';
+import {CommonsService} from '../../../services/commons.service';
+
+@Component({
+ selector: 'app-user-gold',
+ templateUrl: './user-gold.component.html',
+ styleUrls: ['./user-gold.component.scss']
+})
+export class UserGoldComponent implements OnInit {
+
+ searchForm: FormGroup; // 搜索框
+ requestData = []; // 列表数据
+ total: number; // 页码
+ pageNum = 1; // 页码
+ pageSize = 10; // 条码
+ loading = true;
+
+ constructor(
+ private form: FormBuilder,
+ private user: UserService,
+ private iconService: IconService,
+ private message: NzMessageService,
+ private common: CommonsService
+ ) {
+ }
+
+ ngOnInit(): void {
+ this.init();
+ }
+
+ public init(): void {
+ this.searchForm = this.form.group({
+ goldType: [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.user.getGoldRecList(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();
+ }
+
+
+
+}
diff --git a/src/app/admin/user/user-list/user-list.component.html b/src/app/admin/user/user-list/user-list.component.html
index f8c9e41..36d2359 100644
--- a/src/app/admin/user/user-list/user-list.component.html
+++ b/src/app/admin/user/user-list/user-list.component.html
@@ -74,7 +74,6 @@
用户名称 |
用户头像 |
用户电话 |
- 性别 |
金币数量 |
注册时间 |
状态 |
@@ -86,16 +85,15 @@
{{i+1}} |
{{data.name}} |
-
+
|
{{data.phone}} |
- {{data.sex}} |
{{data.gold}} |
{{data.regTime | date: 'yyyy-MM-dd HH:mm'}} |
{{data.status ===1 ? '正常' : '禁用'}} |
-
-
+
+
diff --git a/src/app/admin/user/user-list/user-list.component.scss b/src/app/admin/user/user-list/user-list.component.scss
index 8bee3fb..e288476 100644
--- a/src/app/admin/user/user-list/user-list.component.scss
+++ b/src/app/admin/user/user-list/user-list.component.scss
@@ -1,4 +1,4 @@
.head_img {
- height: 60px;
+ height: 50px;
width: 60px;
}
diff --git a/src/app/admin/user/user-routing.module.ts b/src/app/admin/user/user-routing.module.ts
index 7c8ac31..b139818 100644
--- a/src/app/admin/user/user-routing.module.ts
+++ b/src/app/admin/user/user-routing.module.ts
@@ -1,10 +1,12 @@
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import {UserListComponent} from './user-list/user-list.component';
+import {UserGoldComponent} from './user-gold/user-gold.component';
const routes: Routes = [
{ path: 'user-list', component: UserListComponent },
+ { path: 'user-gold', component: UserGoldComponent },
];
@NgModule({
diff --git a/src/app/admin/user/user.module.ts b/src/app/admin/user/user.module.ts
index cee6b58..596f480 100644
--- a/src/app/admin/user/user.module.ts
+++ b/src/app/admin/user/user.module.ts
@@ -7,10 +7,11 @@ 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 { UserGoldComponent } from './user-gold/user-gold.component';
@NgModule({
- declarations: [UserListComponent],
+ declarations: [UserListComponent, UserGoldComponent],
imports: [
CommonModule,
UserRoutingModule,
diff --git a/src/app/services/agent.service.ts b/src/app/services/agent.service.ts
index 863e116..8e00fbe 100644
--- a/src/app/services/agent.service.ts
+++ b/src/app/services/agent.service.ts
@@ -103,4 +103,17 @@ export class AgentService {
});
}
+ /**
+ * 查询优惠券码列表
+ *
+ * @param paramsObject 对象
+ * @param callBack 回调
+ */
+ public getDiscountCodeList(paramsObject: object, callBack) {
+ this.http.get(environment.baseUrl + 'discountAgentRel/getDiscountCodeList?' + this.common.getWhereCondition(paramsObject)).subscribe(data => {
+ callBack(data);
+ });
+ }
+
+
}
diff --git a/src/app/services/user.service.ts b/src/app/services/user.service.ts
index 6321d17..5ea0a6c 100644
--- a/src/app/services/user.service.ts
+++ b/src/app/services/user.service.ts
@@ -48,6 +48,18 @@ export class UserService {
});
}
+ /**
+ * 获取金币情况
+ *
+ * @param paramsObject 对象
+ * @param callBack 回调
+ */
+ public getGoldRecList(paramsObject: object, callBack) {
+ this.http.get(environment.baseUrl + 'highGoldRec/getGoldRecList?' + this.common.getWhereCondition(paramsObject)).subscribe(data => {
+ callBack(data);
+ });
+ }
+
/**
* 禁用启用当前用户
*
|