From 0e02f13c9061f9812bc0058696cda0758c7c5466 Mon Sep 17 00:00:00 2001
From: Sum1Dream <418471657@qq.com>
Date: Fri, 1 Dec 2023 09:56:27 +0800
Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/app/admin/coupon/coupon-routing.module.ts | 4 +-
src/app/admin/coupon/coupon.module.ts | 4 +-
.../printer-list/printer-list.component.html | 59 +++++++++++++++++++
.../printer-list.component.scss} | 0
.../printer-list.component.ts} | 22 ++++---
.../sc-printer-list.component.html | 33 -----------
.../store-edit/store-edit.component.ts | 2 +-
.../petrol-station-manage.component.html | 21 +++++++
.../petrol-station-manage.component.spec.ts | 25 --------
.../petrol-station-manage.ts | 41 +++++++++++--
src/app/services/coupon.service.ts | 6 +-
src/environments/environment.ts | 5 +-
12 files changed, 140 insertions(+), 82 deletions(-)
create mode 100644 src/app/admin/coupon/printer-list/printer-list.component.html
rename src/app/admin/coupon/{sc-printer-list/sc-printer-list.component.scss => printer-list/printer-list.component.scss} (100%)
rename src/app/admin/coupon/{sc-printer-list/sc-printer-list.component.ts => printer-list/printer-list.component.ts} (64%)
delete mode 100644 src/app/admin/coupon/sc-printer-list/sc-printer-list.component.html
delete mode 100644 src/app/admin/tuanyou-agent/petrol-station-manage/petrol-station-manage.component.spec.ts
diff --git a/src/app/admin/coupon/coupon-routing.module.ts b/src/app/admin/coupon/coupon-routing.module.ts
index a80d518..29f0899 100644
--- a/src/app/admin/coupon/coupon-routing.module.ts
+++ b/src/app/admin/coupon/coupon-routing.module.ts
@@ -5,7 +5,7 @@ import {CouponEditComponent} from './coupon-edit/coupon-edit.component';
import {CouponDetailComponent} from './coupon-detail/coupon-detail.component';
import {SalesCodeListComponent} from './sales-code-list/sales-code-list.component';
import { BlxCouponComponent } from './blx-coupon/blx-coupon.component';
-import {ScPrinterListComponent} from "./sc-printer-list/sc-printer-list.component";
+import {PrinterListComponent} from "./printer-list/printer-list.component";
const routes: Routes = [
@@ -14,7 +14,7 @@ const routes: Routes = [
{ path: 'coupon-detail', component: CouponDetailComponent },
{ path: 'salesCode-list', component: SalesCodeListComponent },
{path:'blx-coupon',component:BlxCouponComponent},
- {path:'sc-printer-list',component:ScPrinterListComponent}
+ {path:'sc-printer-list',component:PrinterListComponent}
];
@NgModule({
diff --git a/src/app/admin/coupon/coupon.module.ts b/src/app/admin/coupon/coupon.module.ts
index 14cd791..772af40 100644
--- a/src/app/admin/coupon/coupon.module.ts
+++ b/src/app/admin/coupon/coupon.module.ts
@@ -13,12 +13,12 @@ import {RichtextModule} from '../../common/richtext/richtext.module';
import {AppCommonModule} from '../../app-common.module';
import { SalesCodeListComponent } from './sales-code-list/sales-code-list.component';
import { BlxCouponComponent } from './blx-coupon/blx-coupon.component';
-import { ScPrinterListComponent } from './sc-printer-list/sc-printer-list.component';
+import { PrinterListComponent } from './printer-list/printer-list.component';
@NgModule({
declarations: [CouponListComponent, CouponEditComponent, CouponDetailComponent, SalesCodeListComponent,
BlxCouponComponent,
- ScPrinterListComponent],
+ PrinterListComponent],
imports: [
CommonModule,
CouponRoutingModule,
diff --git a/src/app/admin/coupon/printer-list/printer-list.component.html b/src/app/admin/coupon/printer-list/printer-list.component.html
new file mode 100644
index 0000000..bd23ffe
--- /dev/null
+++ b/src/app/admin/coupon/printer-list/printer-list.component.html
@@ -0,0 +1,59 @@
+
+
+
+
+
+ 共计 {{total}} 条数据
+
+
+
+ 编码 |
+ 名称 |
+ 面额 |
+ 类型 |
+ 有效天数 |
+ 库存 |
+ 状态 |
+
+
+
+
+ {{ data.request_code }} |
+ {{ data.ticket_name }} |
+ {{ data.face_amount }} |
+ {{ data.goods_type | scPrinter}} |
+ {{ data.effective_days}} |
+ {{ data.total_num}} |
+ {{ data.status == 1 ? '正常':'停用'}} |
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/app/admin/coupon/sc-printer-list/sc-printer-list.component.scss b/src/app/admin/coupon/printer-list/printer-list.component.scss
similarity index 100%
rename from src/app/admin/coupon/sc-printer-list/sc-printer-list.component.scss
rename to src/app/admin/coupon/printer-list/printer-list.component.scss
diff --git a/src/app/admin/coupon/sc-printer-list/sc-printer-list.component.ts b/src/app/admin/coupon/printer-list/printer-list.component.ts
similarity index 64%
rename from src/app/admin/coupon/sc-printer-list/sc-printer-list.component.ts
rename to src/app/admin/coupon/printer-list/printer-list.component.ts
index 8e0074b..0c6fc56 100644
--- a/src/app/admin/coupon/sc-printer-list/sc-printer-list.component.ts
+++ b/src/app/admin/coupon/printer-list/printer-list.component.ts
@@ -4,11 +4,11 @@ import {CouponService} from "../../../services/coupon.service";
import {NzMessageService} from "ng-zorro-antd";
@Component({
- selector: 'app-sc-printer-list',
- templateUrl: './sc-printer-list.component.html',
- styleUrls: ['./sc-printer-list.component.scss']
+ selector: 'app-printer-list',
+ templateUrl: './printer-list.component.html',
+ styleUrls: ['./printer-list.component.scss']
})
-export class ScPrinterListComponent implements OnInit {
+export class PrinterListComponent implements OnInit {
searchForm: FormGroup; // 搜索框
requestData = []; // 列表数据
total: number = 0; // 总计条数
@@ -21,17 +21,21 @@ export class ScPrinterListComponent implements OnInit {
) { }
ngOnInit() {
- this.searchForm = this.form.group({});
- this.getRequest()
+ this.searchForm = this.form.group({
+ type: [1],
+ });
+ this.getRequest(this.searchForm.value)
}
-
+ public resetForm(): void {
+ this.searchForm.reset();
+ }
// 查询列表
- public getRequest() {
+ public getRequest(whereObject: object) {
this.loading = true;
- this.coupon.synCouponRule( data => {
+ this.coupon.synCouponRule( whereObject , data => {
this.loading = false;
if (data['return_code'] === '000000') {
this.requestData = data['return_data'];
diff --git a/src/app/admin/coupon/sc-printer-list/sc-printer-list.component.html b/src/app/admin/coupon/sc-printer-list/sc-printer-list.component.html
deleted file mode 100644
index 59de56f..0000000
--- a/src/app/admin/coupon/sc-printer-list/sc-printer-list.component.html
+++ /dev/null
@@ -1,33 +0,0 @@
-
-
-
-
-
- 共计 {{total}} 条数据
-
-
-
- 编码 |
- 名称 |
- 面额 |
- 类型 |
- 有效天数 |
- 库存 |
- 状态 |
-
-
-
-
- {{ data.request_code }} |
- {{ data.ticket_name }} |
- {{ data.face_amount }} |
- {{ data.goods_type | scPrinter}} |
- {{ data.effective_days}} |
- {{ data.total_num}} |
- {{ data.status == 1 ? '正常':'停用'}} |
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/app/admin/merchant-store/store-edit/store-edit.component.ts b/src/app/admin/merchant-store/store-edit/store-edit.component.ts
index 9a54509..6b4ddd1 100644
--- a/src/app/admin/merchant-store/store-edit/store-edit.component.ts
+++ b/src/app/admin/merchant-store/store-edit/store-edit.component.ts
@@ -176,7 +176,7 @@ export class StoreEditComponent implements OnInit {
uid: 1,
name: logo,
status: 'done',
- url: environment.imageUrl + logo
+ url: logo
});
this.logoFile = logoArray;
}
diff --git a/src/app/admin/tuanyou-agent/petrol-station-manage/petrol-station-manage.component.html b/src/app/admin/tuanyou-agent/petrol-station-manage/petrol-station-manage.component.html
index f6dfa13..59cffab 100644
--- a/src/app/admin/tuanyou-agent/petrol-station-manage/petrol-station-manage.component.html
+++ b/src/app/admin/tuanyou-agent/petrol-station-manage/petrol-station-manage.component.html
@@ -150,6 +150,7 @@
@@ -324,5 +325,25 @@
+
+
+
+
+
+
diff --git a/src/app/admin/tuanyou-agent/petrol-station-manage/petrol-station-manage.component.spec.ts b/src/app/admin/tuanyou-agent/petrol-station-manage/petrol-station-manage.component.spec.ts
deleted file mode 100644
index e343a3d..0000000
--- a/src/app/admin/tuanyou-agent/petrol-station-manage/petrol-station-manage.component.spec.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-import { async, ComponentFixture, TestBed } from '@angular/core/testing';
-
-import { PetrolStationManageComponent } from './petrol-station-manage';
-
-describe('PetrolStationManageComponent', () => {
- let component: PetrolStationManageComponent;
- let fixture: ComponentFixture;
-
- beforeEach(async(() => {
- TestBed.configureTestingModule({
- declarations: [ PetrolStationManageComponent ]
- })
- .compileComponents();
- }));
-
- beforeEach(() => {
- fixture = TestBed.createComponent(PetrolStationManageComponent);
- component = fixture.componentInstance;
- fixture.detectChanges();
- });
-
- it('should create', () => {
- expect(component).toBeTruthy();
- });
-});
diff --git a/src/app/admin/tuanyou-agent/petrol-station-manage/petrol-station-manage.ts b/src/app/admin/tuanyou-agent/petrol-station-manage/petrol-station-manage.ts
index aa6c41c..d75ab0e 100644
--- a/src/app/admin/tuanyou-agent/petrol-station-manage/petrol-station-manage.ts
+++ b/src/app/admin/tuanyou-agent/petrol-station-manage/petrol-station-manage.ts
@@ -58,14 +58,16 @@ export class PetrolStationManageComponent implements OnInit {
discountConfigData: PetrolStationManage[] = [];
oilConfigModal = false;
+ priceRateConfigModal = false;
oilNoArray = [];
-
- formatterPercent = (value: number) => `${value} 折`;
- parserPercent = (value: string) => value.replace(' 折', '');
+ priceRate = 100;
+ storeId;
+ formatterPercent = (value: number) => `${value} %`;
+ parserPercent = (value: string) => value.replace(' %', '');
constructor(private modal: NzModalService,
- private message: NzMessageService,
+ private common: CommonsService,
private tyAgentService: TyAgentService,
private commonsService: CommonsService,
private gasService: GasService,
@@ -178,6 +180,29 @@ export class PetrolStationManageComponent implements OnInit {
this.assignOrgModal = true;
}
+ submitPriceRateConfig() {
+ let data = {
+ "codeType": this.storeId,
+ "codeValue": this.priceRate
+ }
+
+ this.common.editConfig(data, data => {
+ if (data['return_code'] === '000000') {
+ this.modal.success({
+ nzTitle: '提示',
+ nzContent: '操作成功',
+ });
+ this.getOilStationPrice(this.storeId);
+ this.priceRateConfigModal = false;
+ } else {
+ this.modal.error({
+ nzTitle: '提示',
+ nzContent: data['return_msg'],
+ });
+ }
+ });
+ }
+
/**
* 关闭分配代理公司模态框
*/
@@ -767,6 +792,14 @@ export class PetrolStationManageComponent implements OnInit {
this.oilConfigModal = true;
}
+ showPriceRateModalSubmit(storeId) {
+ this.priceRateConfigModal = true;
+ this.storeId = storeId;
+ this.commonsService.mappingSysNameOl(storeId, data => {
+ this.priceRate = data['return_data']['codeValue'];
+ });
+ }
+
/**
* 关闭油品配置模态框
*/
diff --git a/src/app/services/coupon.service.ts b/src/app/services/coupon.service.ts
index a055d15..f0a94ac 100644
--- a/src/app/services/coupon.service.ts
+++ b/src/app/services/coupon.service.ts
@@ -183,8 +183,8 @@ export class CouponService {
*
* @param callBack 返回参数
*/
- public synCouponRule(callBack) {
- this.http.get(environment.baseUrl + 'apiCoupon/synCouponRule').subscribe(data => {
+ public synCouponRule(params: object, callBack) {
+ this.http.get(environment.baseUrl + 'apiCoupon/synCouponRule?' + this.common.getWhereCondition(params)).subscribe(data => {
callBack(data);
});
}
@@ -197,7 +197,7 @@ export class CouponService {
* @param id 用户id
* @param callBack 返回参数
*/
- public getCouponSalesPrice(params: object, callBack) {
+ public getCouponSalesPrice(params: object, callBack) {
this.http.get(environment.baseUrl + 'coupon/getCouponSalesPrice?' + this.common.getWhereCondition(params)).subscribe(data => {
callBack(data);
});
diff --git a/src/environments/environment.ts b/src/environments/environment.ts
index 3661fbd..d25e70f 100644
--- a/src/environments/environment.ts
+++ b/src/environments/environment.ts
@@ -4,10 +4,9 @@
export const environment = {
production: false,
- baseUrl: 'https://hsgcs.dctpay.com/brest/', // 测试环境服务器地址(请求数据地址)
+ // baseUrl: 'http://localhost:9302/brest/', // 测试环境服务器地址(请求数据地址)
// orderUrl: 'http://localhost:9304/order/', // 测试环境服务器地址(请求数据地址)
- // baseUrl: 'https://hsgcs.dctpay.com/brest/', // 测试环境服务器地址(请求数据地址)
- // baseUrl: 'https://hsg.dctpay.com/brest/', // 正式环境服务器地址(请求数据地址)
+ baseUrl: 'https://hsgcs.dctpay.com/brest/', // 测试环境服务器地址(请求数据地址)
// orderUrl: 'https://hsg.dctpay.com/order/', // 测试环境服务器地址(请求数据地址)
orderUrl: 'https://hsgcs.dctpay.com/order/', // 测试环境服务器地址(请求数据地址)
imageUrl: 'https://hsgcs.dctpay.com/filesystem/',