提交代码

master
袁野 12 months ago
parent 0458abc38f
commit 0e02f13c90
  1. 4
      src/app/admin/coupon/coupon-routing.module.ts
  2. 4
      src/app/admin/coupon/coupon.module.ts
  3. 59
      src/app/admin/coupon/printer-list/printer-list.component.html
  4. 0
      src/app/admin/coupon/printer-list/printer-list.component.scss
  5. 22
      src/app/admin/coupon/printer-list/printer-list.component.ts
  6. 33
      src/app/admin/coupon/sc-printer-list/sc-printer-list.component.html
  7. 2
      src/app/admin/merchant-store/store-edit/store-edit.component.ts
  8. 21
      src/app/admin/tuanyou-agent/petrol-station-manage/petrol-station-manage.component.html
  9. 25
      src/app/admin/tuanyou-agent/petrol-station-manage/petrol-station-manage.component.spec.ts
  10. 41
      src/app/admin/tuanyou-agent/petrol-station-manage/petrol-station-manage.ts
  11. 6
      src/app/services/coupon.service.ts
  12. 5
      src/environments/environment.ts

@ -5,7 +5,7 @@ import {CouponEditComponent} from './coupon-edit/coupon-edit.component';
import {CouponDetailComponent} from './coupon-detail/coupon-detail.component'; import {CouponDetailComponent} from './coupon-detail/coupon-detail.component';
import {SalesCodeListComponent} from './sales-code-list/sales-code-list.component'; import {SalesCodeListComponent} from './sales-code-list/sales-code-list.component';
import { BlxCouponComponent } from './blx-coupon/blx-coupon.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 = [ const routes: Routes = [
@ -14,7 +14,7 @@ const routes: Routes = [
{ path: 'coupon-detail', component: CouponDetailComponent }, { path: 'coupon-detail', component: CouponDetailComponent },
{ path: 'salesCode-list', component: SalesCodeListComponent }, { path: 'salesCode-list', component: SalesCodeListComponent },
{path:'blx-coupon',component:BlxCouponComponent}, {path:'blx-coupon',component:BlxCouponComponent},
{path:'sc-printer-list',component:ScPrinterListComponent} {path:'sc-printer-list',component:PrinterListComponent}
]; ];
@NgModule({ @NgModule({

@ -13,12 +13,12 @@ import {RichtextModule} from '../../common/richtext/richtext.module';
import {AppCommonModule} from '../../app-common.module'; import {AppCommonModule} from '../../app-common.module';
import { SalesCodeListComponent } from './sales-code-list/sales-code-list.component'; import { SalesCodeListComponent } from './sales-code-list/sales-code-list.component';
import { BlxCouponComponent } from './blx-coupon/blx-coupon.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({ @NgModule({
declarations: [CouponListComponent, CouponEditComponent, CouponDetailComponent, SalesCodeListComponent, declarations: [CouponListComponent, CouponEditComponent, CouponDetailComponent, SalesCodeListComponent,
BlxCouponComponent, BlxCouponComponent,
ScPrinterListComponent], PrinterListComponent],
imports: [ imports: [
CommonModule, CommonModule,
CouponRoutingModule, CouponRoutingModule,

@ -0,0 +1,59 @@
<!-- start 面包屑 -->
<app-breadcrumb></app-breadcrumb>
<!-- end 面包屑 -->
<div class="inner-content">
<form nz-form [formGroup]="searchForm" (ngSubmit)="getRequest(searchForm.value)">
<div nz-row>
<div nz-col nzSpan="8">
<nz-form-item>
<nz-form-label [nzSpan]="8">类型</nz-form-label>
<nz-form-control [nzSpan]="14">
<nz-select nzShowSearch nzAllowClear formControlName="type">
<nz-option nzLabel="四川中石油" [nzValue]=1></nz-option>
<nz-option nzLabel="贵州中石油" [nzValue]=2></nz-option>
</nz-select>
</nz-form-control>
</nz-form-item>
</div>
</div>
<div nz-row>
<div nz-col nzSpan="24" class="search-button">
<button nz-button nzType="primary"><i nz-icon nzType="search" nzTheme="outline"></i>搜索</button>
<button nz-button nzType="default" (click)="resetForm()"><i nz-icon nzType="reload" nzTheme="outline"></i>重置</button>
</div>
</div>
</form>
</div>
<div class="inner-content">
<span>共计 {{total}} 条数据</span>
<nz-table #basicTable [nzData]="requestData">
<thead>
<tr>
<th>编码</th>
<th>名称</th>
<th>面额</th>
<th>类型</th>
<th>有效天数</th>
<th>库存</th>
<th>状态</th>
</tr>
</thead>
<tbody>
<tr *ngFor="let data of basicTable.data">
<td>{{ data.request_code }}</td>
<td>{{ data.ticket_name }}</td>
<td>{{ data.face_amount }}</td>
<td>{{ data.goods_type | scPrinter}}</td>
<td>{{ data.effective_days}}</td>
<td>{{ data.total_num}}</td>
<td>{{ data.status == 1 ? '正常':'停用'}}</td>
</tr>
</tbody>
</nz-table>
</div>

@ -4,11 +4,11 @@ import {CouponService} from "../../../services/coupon.service";
import {NzMessageService} from "ng-zorro-antd"; import {NzMessageService} from "ng-zorro-antd";
@Component({ @Component({
selector: 'app-sc-printer-list', selector: 'app-printer-list',
templateUrl: './sc-printer-list.component.html', templateUrl: './printer-list.component.html',
styleUrls: ['./sc-printer-list.component.scss'] styleUrls: ['./printer-list.component.scss']
}) })
export class ScPrinterListComponent implements OnInit { export class PrinterListComponent implements OnInit {
searchForm: FormGroup; // 搜索框 searchForm: FormGroup; // 搜索框
requestData = []; // 列表数据 requestData = []; // 列表数据
total: number = 0; // 总计条数 total: number = 0; // 总计条数
@ -21,17 +21,21 @@ export class ScPrinterListComponent implements OnInit {
) { } ) { }
ngOnInit() { ngOnInit() {
this.searchForm = this.form.group({}); this.searchForm = this.form.group({
this.getRequest() type: [1],
});
this.getRequest(this.searchForm.value)
} }
public resetForm(): void {
this.searchForm.reset();
}
// 查询列表 // 查询列表
public getRequest() { public getRequest(whereObject: object) {
this.loading = true; this.loading = true;
this.coupon.synCouponRule( data => { this.coupon.synCouponRule( whereObject , data => {
this.loading = false; this.loading = false;
if (data['return_code'] === '000000') { if (data['return_code'] === '000000') {
this.requestData = data['return_data']; this.requestData = data['return_data'];

@ -1,33 +0,0 @@
<!-- start 面包屑 -->
<app-breadcrumb></app-breadcrumb>
<!-- end 面包屑 -->
<div class="inner-content">
<span>共计 {{total}} 条数据</span>
<nz-table #basicTable [nzData]="requestData">
<thead>
<tr>
<th>编码</th>
<th>名称</th>
<th>面额</th>
<th>类型</th>
<th>有效天数</th>
<th>库存</th>
<th>状态</th>
</tr>
</thead>
<tbody>
<tr *ngFor="let data of basicTable.data">
<td>{{ data.request_code }}</td>
<td>{{ data.ticket_name }}</td>
<td>{{ data.face_amount }}</td>
<td>{{ data.goods_type | scPrinter}}</td>
<td>{{ data.effective_days}}</td>
<td>{{ data.total_num}}</td>
<td>{{ data.status == 1 ? '正常':'停用'}}</td>
</tr>
</tbody>
</nz-table>
</div>

@ -176,7 +176,7 @@ export class StoreEditComponent implements OnInit {
uid: 1, uid: 1,
name: logo, name: logo,
status: 'done', status: 'done',
url: environment.imageUrl + logo url: logo
}); });
this.logoFile = logoArray; this.logoFile = logoArray;
} }

@ -150,6 +150,7 @@
<ul nz-menu nzSelectable> <ul nz-menu nzSelectable>
<li *ngIf="(roleType == 5 && adminFlag == 1) || roleType == 8 || roleType == 9" nz-menu-item (click)="showDiscountConfigModal(data.storeId)">优惠配置</li> <li *ngIf="(roleType == 5 && adminFlag == 1) || roleType == 8 || roleType == 9" nz-menu-item (click)="showDiscountConfigModal(data.storeId)">优惠配置</li>
<li *ngIf="roleType == 5 && adminFlag == 1" (click)="showOilConfigModal(data.storeId)" nz-menu-item>油品配置</li> <li *ngIf="roleType == 5 && adminFlag == 1" (click)="showOilConfigModal(data.storeId)" nz-menu-item>油品配置</li>
<li *ngIf="data.sourceType == 7 && adminFlag == 1" (click)="showPriceRateModalSubmit(data.storeId)" nz-menu-item>上送价格比例配置</li>
</ul> </ul>
</nz-dropdown-menu> </nz-dropdown-menu>
</td> </td>
@ -324,5 +325,25 @@
</div> </div>
</form> </form>
</nz-modal> </nz-modal>
<nz-modal [(nzVisible)]="priceRateConfigModal" nzTitle="配置上送价折扣" (nzOnCancel)="priceRateConfigModal = false" nzWidth="350px" [nzBodyStyle]="{ padding: '10px 24px 24px 24px' }" [nzFooter]="null">
<div nz-row style="margin-top: 10px;">
<div nz-col [nzSpan]="24">
<nz-input-number
[(ngModel)]="priceRate"
[nzMin]="1"
[nzMax]="100"
[nzStep]="1"
[nzFormatter]="formatterPercent"
[nzParser]="parserPercent"
[nzPrecision]="2"
style="width: 100%;" >
</nz-input-number>
</div>
</div>
<div style="text-align: center;">
<button nz-button nzType="primary" style="margin-top: 15px;width: 150px;" (click)="submitPriceRateConfig()">保存</button>
</div>
</nz-modal>
</nz-spin> </nz-spin>

@ -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<PetrolStationManageComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ PetrolStationManageComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(PetrolStationManageComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

@ -58,14 +58,16 @@ export class PetrolStationManageComponent implements OnInit {
discountConfigData: PetrolStationManage[] = []; discountConfigData: PetrolStationManage[] = [];
oilConfigModal = false; oilConfigModal = false;
priceRateConfigModal = false;
oilNoArray = []; oilNoArray = [];
priceRate = 100;
formatterPercent = (value: number) => `${value}`; storeId;
parserPercent = (value: string) => value.replace(' 折', ''); formatterPercent = (value: number) => `${value} %`;
parserPercent = (value: string) => value.replace(' %', '');
constructor(private modal: NzModalService, constructor(private modal: NzModalService,
private message: NzMessageService, private common: CommonsService,
private tyAgentService: TyAgentService, private tyAgentService: TyAgentService,
private commonsService: CommonsService, private commonsService: CommonsService,
private gasService: GasService, private gasService: GasService,
@ -178,6 +180,29 @@ export class PetrolStationManageComponent implements OnInit {
this.assignOrgModal = true; 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; this.oilConfigModal = true;
} }
showPriceRateModalSubmit(storeId) {
this.priceRateConfigModal = true;
this.storeId = storeId;
this.commonsService.mappingSysNameOl(storeId, data => {
this.priceRate = data['return_data']['codeValue'];
});
}
/** /**
* *
*/ */

@ -183,8 +183,8 @@ export class CouponService {
* *
* @param callBack * @param callBack
*/ */
public synCouponRule(callBack) { public synCouponRule(params: object, callBack) {
this.http.get(environment.baseUrl + 'apiCoupon/synCouponRule').subscribe(data => { this.http.get(environment.baseUrl + 'apiCoupon/synCouponRule?' + this.common.getWhereCondition(params)).subscribe(data => {
callBack(data); callBack(data);
}); });
} }
@ -197,7 +197,7 @@ export class CouponService {
* @param id id * @param id id
* @param callBack * @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 => { this.http.get(environment.baseUrl + 'coupon/getCouponSalesPrice?' + this.common.getWhereCondition(params)).subscribe(data => {
callBack(data); callBack(data);
}); });

@ -4,10 +4,9 @@
export const environment = { export const environment = {
production: false, production: false,
baseUrl: 'https://hsgcs.dctpay.com/brest/', // 测试环境服务器地址(请求数据地址) // baseUrl: 'http://localhost:9302/brest/', // 测试环境服务器地址(请求数据地址)
// orderUrl: 'http://localhost:9304/order/', // 测试环境服务器地址(请求数据地址) // orderUrl: 'http://localhost:9304/order/', // 测试环境服务器地址(请求数据地址)
// baseUrl: 'https://hsgcs.dctpay.com/brest/', // 测试环境服务器地址(请求数据地址) baseUrl: 'https://hsgcs.dctpay.com/brest/', // 测试环境服务器地址(请求数据地址)
// baseUrl: 'https://hsg.dctpay.com/brest/', // 正式环境服务器地址(请求数据地址)
// orderUrl: 'https://hsg.dctpay.com/order/', // 测试环境服务器地址(请求数据地址) // orderUrl: 'https://hsg.dctpay.com/order/', // 测试环境服务器地址(请求数据地址)
orderUrl: 'https://hsgcs.dctpay.com/order/', // 测试环境服务器地址(请求数据地址) orderUrl: 'https://hsgcs.dctpay.com/order/', // 测试环境服务器地址(请求数据地址)
imageUrl: 'https://hsgcs.dctpay.com/filesystem/', imageUrl: 'https://hsgcs.dctpay.com/filesystem/',

Loading…
Cancel
Save