pull/1/head
袁野 3 years ago
parent 698e4d2738
commit ce9300e22e
  1. 1
      src/app/admin/audit/refund-audit/refund-audit.component.ts
  2. 1
      src/app/admin/discount/discount-edit/discount-edit.component.ts
  3. 4
      src/app/admin/index/index-routing.module.ts
  4. 3
      src/app/admin/index/index.module.ts
  5. 33
      src/app/admin/index/index/index.component.html
  6. 60
      src/app/admin/index/index/index.component.ts
  7. 4
      src/app/admin/merchant-store/merchant-store-routing.module.ts
  8. 8
      src/app/admin/merchant-store/merchant-store.module.ts
  9. 13
      src/app/admin/merchant-store/store-detail/store-detail.component.html
  10. 9
      src/app/admin/merchant-store/store-detail/store-detail.component.ts
  11. 103
      src/app/admin/merchant-store/store-edit/store-edit.component.html
  12. 33
      src/app/admin/merchant-store/store-edit/store-edit.component.ts
  13. 23
      src/app/admin/merchant-store/store-list/store-list.component.html
  14. 30
      src/app/admin/merchant-store/store-list/store-list.component.ts
  15. 11
      src/app/admin/merchant/merchant-detail/merchant-detail.component.html
  16. 9
      src/app/admin/merchant/merchant-detail/merchant-detail.component.ts
  17. 2
      src/app/app-common.module.ts
  18. 55
      src/app/services/index.service.ts
  19. 87
      src/app/services/merchant-store.service.ts

@ -116,7 +116,6 @@ export class RefundAuditComponent implements OnInit {
if (refundSource === 1) {
this.recharge.getOrderById(id , data => {
if (data['return_code'] === '000000') {
console.log(data);
this.data = data['return_data'];
} else {
this.message.error(data['return_msg']);

@ -33,6 +33,7 @@ export class DiscountEditComponent implements OnInit {
WEB_SERVE_URL = environment.baseUrl;
previewImage: string | undefined = '';
previewVisible = false;
wx: WebSocket;
constructor(
private fb: FormBuilder,

@ -1,10 +1,12 @@
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import {IndexComponent} from './index/index.component';
import {TestComponent} from './test/test.component';
const routes: Routes = [
{ path: '', component: IndexComponent }
{ path: '', component: IndexComponent },
{ path: 'test', component: TestComponent }
];
@NgModule({

@ -12,10 +12,11 @@ import {RichtextModule} from '../../common/richtext/richtext.module';
import {BreadcrumbModule} from '../../common/breadcrumb/breadcrumb.module';
import {RegionSelectorModule} from '../../common/region-selector/region-selector.module';
import {AppCommonModule} from '../../app-common.module';
import { TestComponent } from './test/test.component';
@NgModule({
declarations: [IndexComponent],
declarations: [IndexComponent, TestComponent],
imports: [
CommonModule,
SystemRoutingModule,

@ -7,9 +7,22 @@
<!-- end 面包屑 -->
<!--条件搜索-->
<div class="inner-content" *ngIf="roleType == 3">
<div nz-row style="margin-top: 20px;" [nzGutter]="16">
<div nz-col nzSpan="8">
<nz-card nzHoverable [nzLoading]="loading">
<h3>预充值账号</h3>
<p>余额:{{(balanceData['amounts']).toFixed(2)}}</p>
<p>今日收入:{{todayBalanceData['incomePrice'] == null ? '0': todayBalanceData['incomePrice']}}</p>
<p>今日收款笔数:{{todayBalanceData['incomeCount'] == null ? '0': todayBalanceData['incomeCount']}}</p>
<p>今日退款金额:{{todayBalanceData['refundPrice'] == null ? '0': todayBalanceData['refundPrice']}}</p>
<p>今日退款笔数:{{todayBalanceData['incomeCount'] == null ? '0': todayBalanceData['incomeCount']}}</p>
</nz-card>
</div>
</div>
</div>
<!--渠道公司-->
<div class="inner-content" *ngIf="roleType == 7">
<div nz-row >
<button nz-button nzType="primary" (click)="isVisibleAdd = true">新增预充值余额</button>
</div>
@ -139,3 +152,21 @@
</div>
</div>
</nz-modal>
<div nz-col nzSpan="8">
<nz-card nzHoverable [nzLoading]="loading" (click)="edit(10)">
<h3>中石化订单</h3>
<p>订单数量:{{orderData['count']}}</p>
<p>订单总额:{{orderData['orderPrice'] == null ? '0': orderData['orderPrice']}}</p>
<p>支付总额:{{orderData['payRealPrice'] == null ? '0': orderData['payRealPrice']}}</p>
</nz-card>
</div>
<div nz-col nzSpan="8">
<nz-card nzHoverable [nzLoading]="loading" (click)="edit(11)">
<h3>中石化订单</h3>
<p>订单数量:{{orderData['count']}}</p>
<p>订单总额:{{orderData['orderPrice'] == null ? '0': orderData['orderPrice']}}</p>
<p>支付总额:{{orderData['payRealPrice'] == null ? '0': orderData['payRealPrice']}}</p>
</nz-card>
</div>

@ -4,6 +4,7 @@ import {LocalStorageService} from '../../../services/local-storage.service';
import {IndexService} from '../../../services/index.service';
import {NzMessageService} from '_ng-zorro-antd@9.3.0@ng-zorro-antd';
import {environment} from '../../../../environments/environment';
import {Router} from "_@angular_router@9.0.7@@angular/router";
@Component({
@ -26,27 +27,35 @@ export class IndexComponent implements OnInit {
orderData = {};
balanceData = {};
rechargeData = {};
todayBalanceData = {};
tyBalance;
webSocket: WebSocket;
constructor(
private store: LocalStorageService, // 数据缓存
private message: NzMessageService, // 信息提示
private router: Router,
private index: IndexService
) {
}
ngOnInit(): void {
this.roleType = this.store.get(ADMIN_INFO_OBJECT)['secRole'].roleType;
if (this.roleType === 1) {
this.getIndexCount();
this.getLineCount();
this.queryCompanyAccountInfo2JD();
}
if (this.roleType === 3) {
this.getAccount();
this.getAccountRecordList();
}
if (this.store.get(ADMIN_INFO_OBJECT)['highAgent'] != null) {
this.code = this.store.get(ADMIN_INFO_OBJECT)['highAgent'].id;
}
if (this.store.get(ADMIN_INFO_OBJECT)['bsCompany'].id === 3) {
if (this.store.get(ADMIN_INFO_OBJECT)['bsCompany'] != null && this.store.get(ADMIN_INFO_OBJECT)['bsCompany'].id === 3) {
this.code = 60;
this.getHLTBalance();
this.orderByIndex();
@ -230,4 +239,53 @@ export class IndexComponent implements OnInit {
});
}
// 查询门店余额
public getAccount(): void {
this.index.getAccount(data => {
if (data['return_code'] === '000000') {
console.log(data);
this.balanceData = data['return_data'];
this.loading = false;
} else {
this.message.error(data['return_msg']);
}
});
}
// 查询门店余额
public getGasStatistical(): void {
this.index.getGasStatistical(data => {
if (data['return_code'] === '000000') {
console.log(data);
this.todayBalanceData = data['return_data']['today'];
this.loading = false;
} else {
this.message.error(data['return_msg']);
}
});
}
// 查询门店账户流失记录
public getAccountRecordList(): void {
const paramsObject = {
pageNum: 1,
pageSize: 10000
};
this.index.getAccountRecordList(paramsObject, data => {
if (data['return_code'] === '000000') {
console.log(data);
} else {
this.message.error(data['return_msg']);
}
});
}
public edit(ids) {
this.router.navigate(['/admin/index/test'], {
queryParams: {
id: ids
}
}).then(r => console.log(r));
}
}

@ -3,12 +3,16 @@ import { Routes, RouterModule } from '@angular/router';
import {StoreListComponent} from './store-list/store-list.component';
import {StoreEditComponent} from './store-edit/store-edit.component';
import {StoreDetailComponent} from './store-detail/store-detail.component';
import {OliComponent} from './oli/oli.component';
import {OliGunComponent} from './oli-gun/oli-gun.component';
const routes: Routes = [
{ path: 'store-list', component: StoreListComponent },
{ path: 'store-edit', component: StoreEditComponent },
{ path: 'store-detail', component: StoreDetailComponent },
{ path: 'oil', component: OliComponent },
{ path: 'oil_gun', component: OliGunComponent },
];
@NgModule({

@ -9,10 +9,13 @@ 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 { OliComponent } from './oli/oli.component';
import { OliGunComponent } from './oli-gun/oli-gun.component';
import {AppCommonModule} from "../../app-common.module";
@NgModule({
declarations: [StoreListComponent, StoreEditComponent, StoreDetailComponent],
declarations: [StoreListComponent, StoreEditComponent, StoreDetailComponent, OliComponent, OliGunComponent],
imports: [
CommonModule,
MerchantStoreRoutingModule,
@ -20,7 +23,8 @@ import {BreadcrumbModule} from '../../common/breadcrumb/breadcrumb.module';
SeparateModule,
ReactiveFormsModule,
FormsModule,
BreadcrumbModule
BreadcrumbModule,
AppCommonModule
]
})
export class MerchantStoreModule { }

@ -1,6 +1,17 @@
<!-- start 面包屑 -->
<nz-breadcrumb>
<nz-breadcrumb-item>
<a (click)="getBack()">门店管理</a>
</nz-breadcrumb-item>
<nz-breadcrumb-item>
门店详情
</nz-breadcrumb-item>
</nz-breadcrumb>
<!-- end 面包屑 -->
<div class="inner-content">
<nz-descriptions nzBordered>
<nz-descriptions-item nzTitle="登录账户">{{data.telephone}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="登录账户">{{data['secUser'].loginName}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="门店编号">{{data['storeKey']}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="门店名称">{{data.storeName}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="门店地址">{{data.address}}</nz-descriptions-item>

@ -12,11 +12,13 @@ export class StoreDetailComponent implements OnInit {
data: any = {};
id: number;
constructor(
private merchantStore: MerchantStoreService,
private message: NzMessageService, // 信息提示
private activatedRoute: ActivatedRoute,
) { }
) {
}
ngOnInit(): void {
this.activatedRoute.queryParams.subscribe(queryParams => {
@ -30,11 +32,16 @@ export class StoreDetailComponent implements OnInit {
// 查询详情
public getDetails(id: number) {
this.merchantStore.getMerchantStoreById(id, data => {
console.log(data);
this.data = data['return_data'];
});
}
// 返回
getBack() {
history.back();
}
}

@ -10,40 +10,71 @@
<!-- end 面包屑 -->
<nz-content class="inner-content">
<form nz-form [formGroup]="validateForm" class="ant-advanced-search-form">
<div nz-row>
<div nz-col nzSpan="2"></div>
<div nz-col nzSpan="20">
<form nz-form [formGroup]="validateForm">
<div nz-row [nzGutter]="24">
<nz-divider nzText="门店信息"></nz-divider>
<div nz-col [nzSpan]="8">
<nz-form-item>
<nz-form-label [nzFor]="'telephone'" nzRequired>登录手机号</nz-form-label>
<nz-form-control nzErrorTip="请输入登录手机号!">
<input nz-input placeholder="请输入登录手机号..." [formControlName]="'telephone'" id="'telephone'" />
<nz-form-label [nzFor]="'storeName'" nzRequired>门店名称</nz-form-label>
<nz-form-control nzErrorTip="请输入门店名称!">
<input nz-input placeholder="请输入门店名称..." [formControlName]="'storeName'" id="'storeName'" />
</nz-form-control>
</nz-form-item>
</div>
<div nz-col [nzSpan]="8">
<nz-form-item>
<nz-form-label [nzFor]="'password'" nzRequired>登录密码</nz-form-label>
<nz-form-control nzErrorTip="请输入登录密码!">
<nz-input-group [nzSuffix]="suffixTemplate">
<input [type]="passwordVisible ? 'text' : 'password'" nz-input placeholder="请输入登录密码..." [formControlName]="'password'" id="'password'" />
</nz-input-group>
<ng-template #suffixTemplate>
<i nz-icon [nzType]="passwordVisible ? 'eye-invisible' : 'eye'" (click)="passwordVisible = !passwordVisible"></i>
</ng-template>
<nz-form-label [nzFor]="'usingScope'" nzRequired>门店品牌</nz-form-label>
<nz-form-control nzErrorTip="请选择品牌!">
<nz-select formControlName="brandId" nzAllowClear nzPlaceHolder="请选择品牌">
<nz-option *ngFor="let item of brandData" [nzValue]="item.codeValue" [nzLabel]="item.codeName"></nz-option>
</nz-select>
</nz-form-control>
</nz-form-item>
</div>
<div nz-col [nzSpan]="8" *ngIf="!editFlag">
<nz-form-item>
<nz-form-label [nzFor]="'prestoreType'" nzRequired>预存类型</nz-form-label>
<nz-form-control nzErrorTip="请选择预存类型!">
<nz-select formControlName="prestoreType" nzAllowClear nzPlaceHolder="请选择预存类型">
<nz-option nzValue="0" nzLabel="非预存"></nz-option>
<nz-option nzValue="1" nzLabel="预存"></nz-option>
</nz-select>
</nz-form-control>
</nz-form-item>
</div>
<div nz-col [nzSpan]="8">
<nz-form-item>
<nz-form-label [nzFor]="'type'" nzRequired>门店类型</nz-form-label>
<nz-form-control nzErrorTip="请选择门店类型!">
<nz-select formControlName="type" nzAllowClear nzPlaceHolder="请选择门店类型">
<nz-option nzValue="1" nzLabel="加油站"></nz-option>
</nz-select>
</nz-form-control>
</nz-form-item>
</div>
<div nz-col [nzSpan]="8">
<nz-form-item>
<nz-form-label [nzFor]="'storeKey'" nzRequired>门店编号</nz-form-label>
<nz-form-control nzErrorTip="请输入门店编号!">
<input nz-input placeholder="请输入门店编号..." [formControlName]="'storeKey'" id="'storeKey'" />
<nz-form-label [nzFor]="'contactName'" nzRequired>联系人</nz-form-label>
<nz-form-control nzErrorTip="请输入联系人!">
<input nz-input placeholder="请输入联系人..." [formControlName]="'contactName'" id="'contactName'" />
</nz-form-control>
</nz-form-item>
</div>
<div nz-col [nzSpan]="8">
<nz-form-item>
<nz-form-label>门店LOGO</nz-form-label>
<nz-form-label [nzFor]="'telephone'" nzRequired>联系电话</nz-form-label>
<nz-form-control nzErrorTip="请输入联系电话!">
<input nz-input placeholder="请输入联系电话..." [formControlName]="'telephone'" id="'telephone'" />
</nz-form-control>
</nz-form-item>
</div>
<div nz-col [nzSpan]="24">
<nz-form-item>
<nz-form-label>门店照片</nz-form-label>
<nz-form-control>
<nz-upload
nzAction="{{WEB_SERVE_URL}}/fileUpload/uploadfile"
@ -63,30 +94,49 @@
</nz-form-control>
</nz-form-item>
</div>
<nz-divider nzText="设备信息"></nz-divider>
<div nz-col [nzSpan]="8">
<nz-form-item>
<nz-form-label [nzFor]="'storeName'" nzRequired>门店名称</nz-form-label>
<nz-form-control nzErrorTip="请输入门店名称!">
<input nz-input placeholder="请输入门店名称..." [formControlName]="'storeName'" id="'storeName'" />
<nz-form-label [nzFor]="'deviceSn'" >打印机编号</nz-form-label>
<nz-form-control nzErrorTip="请输入打印机编号!">
<input nz-input placeholder="请输入打印机编号..." [formControlName]="'deviceSn'" id="'deviceSn'" />
</nz-form-control>
</nz-form-item>
</div>
<div nz-col [nzSpan]="8">
<nz-form-item>
<nz-form-label [nzFor]="'latitude'" nzRequired>地址维度</nz-form-label>
<nz-form-control nzErrorTip="请输入门店地址维度!">
<input nz-input placeholder="请输入门店地址维度..." readonly [formControlName]="'latitude'" id="'latitude'" />
<nz-form-label [nzFor]="'deviceKey'" >打印机KEY</nz-form-label>
<nz-form-control nzErrorTip="请输入打印机KEY!">
<input nz-input placeholder="请输入打印机KEY..." [formControlName]="'deviceKey'" id="'deviceKey'" />
</nz-form-control>
</nz-form-item>
</div>
<div nz-col [nzSpan]="8">
<nz-form-item>
<nz-form-label [nzFor]="'longitude'" nzRequired>地址经度</nz-form-label>
<nz-form-control nzErrorTip="请输入门店地址维度!">
<input nz-input placeholder="请输入门店地址维度..." readonly [formControlName]="'longitude'" id="'longitude'" />
<nz-form-label [nzFor]="'deviceName'" >打印机名称</nz-form-label>
<nz-form-control nzErrorTip="请输入打印机名称!">
<input nz-input placeholder="请输入打印机名称..." [formControlName]="'deviceName'" id="'deviceName'" />
</nz-form-control>
</nz-form-item>
</div>
<nz-divider nzText="定位信息"></nz-divider>
<!-- <div nz-col [nzSpan]="8">-->
<!-- <nz-form-item>-->
<!-- <nz-form-label [nzFor]="'latitude'" nzRequired>地址维度</nz-form-label>-->
<!-- <nz-form-control nzErrorTip="请输入门店地址维度!">-->
<!-- <input nz-input placeholder="请输入门店地址维度..." readonly [formControlName]="'latitude'" id="'latitude'" />-->
<!-- </nz-form-control>-->
<!-- </nz-form-item>-->
<!-- </div>-->
<!-- <div nz-col [nzSpan]="8">-->
<!-- <nz-form-item>-->
<!-- <nz-form-label [nzFor]="'longitude'" nzRequired>地址经度</nz-form-label>-->
<!-- <nz-form-control nzErrorTip="请输入门店地址维度!">-->
<!-- <input nz-input placeholder="请输入门店地址维度..." readonly [formControlName]="'longitude'" id="'longitude'" />-->
<!-- </nz-form-control>-->
<!-- </nz-form-item>-->
<!-- </div>-->
<div nz-col [nzSpan]="14">
<nz-form-item>
<nz-form-label [nzFor]="'address'" nzRequired>门店地址</nz-form-label>
@ -125,5 +175,8 @@
</div>
</div>
</form>
</div>
<div nz-col nzSpan="2"></div>
</div>
</nz-content>

@ -6,6 +6,7 @@ import {NzMessageService, NzUploadFile} from 'ng-zorro-antd';
import {ActivatedRoute} from '@angular/router';
import {ValidatorsService} from '../../../services/validators.service';
import {MerchantStoreService} from '../../../services/merchant-store.service';
import {CommonsService} from "../../../services/commons.service";
declare var AMap: any; // 一定要声明AMap,要不然报错找不到AMap
declare var AMapUI: any;
@ -35,15 +36,16 @@ export class StoreEditComponent implements OnInit {
WEB_SERVE_URL = environment.baseUrl;
previewVisible = false;
previewImage: string | undefined = '';
brandData = [];
constructor(
private fb: FormBuilder,
private merchantStore: MerchantStoreService,
private message: NzMessageService, // 信息提示
private commonsService: CommonsService,
private activatedRoute: ActivatedRoute,
) {
}
ngOnInit(): void {
this.activatedRoute.queryParams.subscribe(queryParams => {
if (queryParams.storeId != null) {
@ -55,19 +57,23 @@ export class StoreEditComponent implements OnInit {
}
});
this.validateForm = this.fb.group({
telephone: [null, [Validators.required, ValidatorsService.mobile]],
password: [null, [Validators.required, ValidatorsService.minLength(6)]],
storeKey: [null, [Validators.required, ValidatorsService.maxLength(10)]],
storeName: [null, [Validators.required]],
address: [null, [Validators.required]],
contactName: [null, [Validators.required]],
prestoreType: [null, [Validators.required]],
telephone: [null, [Validators.required]],
latitude: [29.553134, [Validators.required]],
longitude: [106.565428, [Validators.required]],
status: [null],
companyId: [null],
deviceSn: [null],
deviceKey: [null],
deviceName: [null],
regionId: [null],
merchantId: [null],
createTime: [null],
secUser: {},
brandId: [null],
type: [null],
});
this.commonsService.getDictionary('MERCHANT_STORE_BRANCH', data => {
this.brandData = data['return_data'];
});
}
@ -103,8 +109,6 @@ export class StoreEditComponent implements OnInit {
return;
}
}
this.validateForm.value['secUser']['telephone'] = this.validateForm.value.telephone;
this.validateForm.value['secUser']['password'] = this.validateForm.value.password;
if (this.logoFile.length !== 0) {
if (this.logoFile[0]['response'] != null) {
this.validateForm.value.storeLogo = this.logoFile[0]['response']['return_data'][0];
@ -138,8 +142,9 @@ export class StoreEditComponent implements OnInit {
public getDetails(id) {
this.merchantStore.getMerchantStoreById(id, data => {
if (data['return_code'] === '000000') {
data['return_data'].telephone = data['return_data'].secUser.loginName;
data['return_data'].password = data['return_data'].secUser.password;
console.log(data);
data['return_data']['brandId'] = String(data['return_data']['brandId']);
data['return_data']['type'] = String(data['return_data']['type']);
if (data['return_data']['storeLogo'] != null && data['return_data']['storeLogo'] !== '') {
const logo = String(data['return_data']['storeLogo']);
const logoArray = [];
@ -164,7 +169,6 @@ export class StoreEditComponent implements OnInit {
getMap() {
// tslint:disable-next-line:variable-name
AMapUI.loadUI(['misc/PositionPicker'], PositionPicker => {
console.log(this.validateForm.value);
const map = new AMap.Map('container', {
resizeEnable: true,
scrollWheel: false,
@ -194,7 +198,6 @@ export class StoreEditComponent implements OnInit {
map: map
});
positionPicker.on('success', positionResult => {
console.log(positionResult);
positionResult['latitude'] = positionResult.position.lat;
positionResult['longitude'] = positionResult.position.lng;
positionResult['regionId'] = positionResult.regeocode.addressComponent.adcode;

@ -75,7 +75,7 @@
<th nzWidth="80px">门店名称</th>
<th nzWidth="100px">门店电话</th>
<th nzWidth="100px">创建时间</th>
<th nzWidth="80px" nzRight="0px">操作</th>
<th nzWidth="160px" nzRight="0px">操作</th>
</tr>
</thead>
<tbody>
@ -87,11 +87,13 @@
<td>{{data.telephone}}</td>
<td>{{data.createTime | date: 'yyyy-MM-dd HH:mm'}}</td>
<td nzRight="0px" class="table-td-operation">
<a (click)="getEdit(data.id)"><i nz-icon nzType="form" nzTheme="outline" nz-tooltip="编辑"></i></a>
<a (click)="getEdit(data.id)">编辑</a>
<nz-divider nzType="vertical"></nz-divider>
<a (click)="getDetail(data.id)"><i nz-icon [nzIconfont]="'icon-xiangqing'" nz-tooltip="门店详情"></i></a>
<a (click)="getDetail(data.id)">详情</a>
<nz-divider nzType="vertical"></nz-divider>
<a (click)="getDelete(data.id)"><i nz-icon nzType="delete" nzTheme="outline" nz-tooltip="删除"></i></a>
<a *ngIf="'BTN_add_blance' | button" (click)="getRecharge(data.id)">增加余额</a>
<nz-divider *ngIf="'BTN_add_blance' | button" nzType="vertical"></nz-divider>
<a (click)="getDelete(data.id)">删除</a>
</td>
</tbody>
</nz-table>
@ -122,3 +124,16 @@
</tbody>
</nz-table>
</nz-modal>
<nz-modal [(nzVisible)]="isVisibleAdd" nzTitle="新增预充值余额" (nzOnCancel)="isVisibleAdd = false" (nzOnOk)="handleOk()">
<div nz-row>
<div nz-col nzSpan="18">
<nz-form-item>
<nz-form-label [nzSpan]="6">充值金额</nz-form-label>
<nz-form-control [nzSpan]="16">
<input nz-input placeholder="请输入充值金额..." [(ngModel)]="price" />
</nz-form-control>
</nz-form-item>
</div>
</div>
</nz-modal>

@ -6,6 +6,7 @@ import {ActivatedRoute, Router} from '@angular/router';
import {CommonsService} from '../../../services/commons.service';
import {MerchantStoreService} from '../../../services/merchant-store.service';
import {environment} from '../../../../environments/environment';
import {IndexService} from '../../../services/index.service';
@Component({
selector: 'app-store-list',
@ -22,9 +23,11 @@ export class StoreListComponent implements OnInit {
loading = true;
id = null;
name: string;
price: string;
WEB_SERVE_URL = environment.baseUrl;
importErrorStudentArray = [];
errorStudentVisible = false;
isVisibleAdd = false;
isSpinning = false;
constructor(
@ -33,6 +36,7 @@ export class StoreListComponent implements OnInit {
private iconService: IconService,
private message: NzMessageService,
private router: Router,
private index: IndexService,
private modal: NzModalService,
private activatedRoute: ActivatedRoute,
private common: CommonsService
@ -172,4 +176,30 @@ export class StoreListComponent implements OnInit {
this.importErrorStudentArray = data['errorData'];
this.errorStudentVisible = true;
}
// 增加余额
public getRecharge(id): void {
this.id = id;
this.isVisibleAdd = true;
}
handleOk(): void {
if (this.price == null) {
this.message.error('请输入充值金额');
return;
}
const paramsObject = {
storeId: this.id,
amount: this.price
};
this.index.recharge(paramsObject, data => {
if (data['return_code'] === '000000') {
this.getRequest(false, this.searchForm.value);
this.isVisibleAdd = false;
} else {
this.message.error(data['return_msg']);
}
});
}
}

@ -1,3 +1,14 @@
<!-- start 面包屑 -->
<nz-breadcrumb>
<nz-breadcrumb-item>
<a (click)="getBack()">商户管理</a>
</nz-breadcrumb-item>
<nz-breadcrumb-item>
商户详情
</nz-breadcrumb-item>
</nz-breadcrumb>
<!-- end 面包屑 -->
<div class="inner-content">
<nz-descriptions nzBordered>
<nz-descriptions-item nzTitle="商户logo" [nzSpan]="3">

@ -14,11 +14,13 @@ export class MerchantDetailComponent implements OnInit {
data: any = {};
id: number;
FILE_URL = environment.imageUrl;
constructor(
private merchant: MerchantService,
private message: NzMessageService, // 信息提示
private activatedRoute: ActivatedRoute,
) { }
) {
}
ngOnInit(): void {
this.activatedRoute.queryParams.subscribe(queryParams => {
@ -36,4 +38,9 @@ export class MerchantDetailComponent implements OnInit {
});
}
// 返回
getBack() {
history.back();
}
}

@ -44,6 +44,7 @@ import {
OilCardRecordTypePipe, OilCardRecordSourceTypePipe
} from './pipes';
import {OilCardStatusPipe} from "./pipes/oil-card/oil-card-status.pipe";
import { OilTypePipe } from './pipes/store/oil-type.pipe';
@ -98,6 +99,7 @@ const PIPES = [
],
declarations: [
...PIPES,
OilTypePipe,
],

@ -53,6 +53,19 @@ export class IndexService {
});
}
/**
* @Author Sum1Dream
* @methodName addHLTBalance
* @Description // 新增余额
* @Date 12:12 2022/1/10
* @Param
*/
public recharge(params: object, callBack) {
this.http.post(environment.baseUrl + 'merStoreAccount/recharge', params).subscribe(data => {
callBack(data);
});
}
/**
* @Author Sum1Dream
* @methodName queryCompanyAccountInfo2JD
@ -124,5 +137,47 @@ export class IndexService {
});
}
/**
* @Author Sum1Dream
* @methodName getAccount
* @Description // 查询门店账户
* @Date 10:00 2022/5/18
* @Param
*/
public getAccount(callBack) {
this.http.get(environment.baseUrl + 'merStoreAccount/getAccount').subscribe(data => {
callBack(data);
});
}
/**
* @Author Sum1Dream
* @methodName getGasStatistical
* @Description // 查询门店账户
* @Date 10:00 2022/5/18
* @Param
*/
public getGasStatistical(callBack) {
this.http.get(environment.baseUrl + 'highGas/getGasStatistical').subscribe(data => {
callBack(data);
});
}
/**
* @Author Sum1Dream
* @methodName getAccountRecordList
* @Description // 查询门店账户流失记录
* @Date 10:00 2022/5/18
* @Param
*/
public getAccountRecordList(paramsObject , callBack) {
this.http.get(environment.baseUrl + 'merStoreAccount/getAccountRecordList?' + this.common.getWhereCondition(paramsObject)).subscribe(data => {
callBack(data);
});
}
}

@ -25,6 +25,18 @@ export class MerchantStoreService {
});
}
/**
*
*
* @param paramsObject
* @param callBack
*/
public getOilPriceListByStore(paramsObject: object, callBack) {
this.http.get(environment.baseUrl + 'gasOilPrice/getOilPriceListByStore?' + this.common.getWhereCondition(paramsObject)).subscribe(data => {
callBack(data);
});
}
/**
*
*
@ -88,5 +100,80 @@ export class MerchantStoreService {
});
}
/**
*
*
* @param paramsObject
* @param callBack
*/
public getOilPriceDetail(paramsObject: object, callBack) {
this.http.get(environment.baseUrl + 'gasOilPrice/getOilPriceDetail?' + this.common.getWhereCondition(paramsObject)).subscribe(data => {
callBack(data);
});
}
/**
*
*
* @param params
* @param callBack
* @return data
*/
public editGasOilPrice(params: object, callBack) {
this.http.post(environment.baseUrl + 'gasOilPrice/editGasOilPrice', params).subscribe(data => {
callBack(data);
});
}
/**
*
*
* @param params
* @param callBack
* @return data
*/
public delOilPrice(params: object, callBack) {
console.log(params);
this.http.post(environment.baseUrl + 'gasOilPrice/delOilPrice', params).subscribe(data => {
callBack(data);
});
}
/**
*
*
* @param params
* @param callBack
* @return data
*/
public delGunNo(params: object, callBack) {
this.http.post(environment.baseUrl + 'gasOilGunNo/delGunNo', params).subscribe(data => {
callBack(data);
});
}
/**
*
*
* @param oilPriceId
* @param callBack
*/
public getGunNoListByOilPrice(oilPriceId: number, callBack) {
this.http.get(environment.baseUrl + 'gasOilGunNo/getGunNoListByOilPrice?oilPriceId=' + oilPriceId).subscribe(data => {
callBack(data);
});
}
/**
*
*
* @param params
* @param callBack
* @return data
*/
public addGasOilPrice(params: object, callBack) {
this.http.post(environment.baseUrl + 'gasOilGunNo/addGasOilPrice', params).subscribe(data => {
callBack(data);
});
}
}

Loading…
Cancel
Save