diff --git a/.gitignore b/.gitignore
index eef909b..121a30d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -4,3 +4,5 @@ node_modules/
dist/
+
+
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",
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..f902d70 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/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..3ebb5d1 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 @@
+
+
+ 卡券来源
+
+
+
+
+
+
+
展示区域
@@ -53,14 +63,6 @@
-
-
- 卡券面值
-
-
-
-
-
销售价格
@@ -209,7 +211,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 acd91ed..a857fe5 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;
@@ -69,7 +70,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]],
@@ -81,6 +81,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],
@@ -214,8 +215,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) {
@@ -259,7 +275,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']);
- this.content = data['return_data']['couponDesc'];
+ data['return_data']['couponSource'] = String(data['return_data']['couponSource']);
if (data['return_data']['couponImg'] != null && data['return_data']['couponImg'] !== '') {
const couponImg = String(data['return_data']['couponImg']);
const couponArray = [];
@@ -286,6 +302,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/admin/coupon/coupon-list/coupon-list.component.html b/src/app/admin/coupon/coupon-list/coupon-list.component.html
index 5c2988f..d04cdff 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,14 @@
编号 |
- 卡券编号 |
- 卡券名称 |
- 卡券面值 |
+ 卡券编号 |
+ 卡券名称 |
销售价格 |
有效库存 |
卡券类型 |
- 卡券状态 |
- 销售截止时间 |
- 创建时间 |
+ 卡券状态 |
+ 销售截止时间 |
+ 创建时间 |
操作 |
@@ -116,7 +115,6 @@
{{i+1}} |
{{data.couponKey}} |
{{data.couponName}} |
- ¥{{data.couponPrice}} |
¥{{data.salesPrice}} |
{{data.stockCount}} |
{{data.couponType === 1 ? '内部卷' : '外部卷'}} |
@@ -131,8 +129,8 @@
-
-
+
+
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 ? '内部券' : '外部券'}})