parent
e1ba3b8079
commit
f52300394b
@ -1,18 +0,0 @@ |
||||
<div nz-row> |
||||
<div nz-col [nzSpan]="8"> |
||||
<!--<div>职位发布数量排名</div>--> |
||||
<div echarts [options]="positionTopTen"></div> |
||||
<div class="enterprise-top" echarts [options]="enterpriseTopTen"></div> |
||||
</div> |
||||
<div nz-col [nzSpan]="8"> |
||||
<div echarts [options]="resumeByAge"></div> |
||||
<div class="enterprise-top" echarts [options]="deliveryByMonth"></div> |
||||
</div> |
||||
<div nz-col [nzSpan]="8"> |
||||
<div echarts [options]="resumeByEdu"></div> |
||||
</div> |
||||
</div> |
||||
|
||||
|
||||
|
||||
|
@ -0,0 +1,18 @@ |
||||
import { NgModule } from '@angular/core'; |
||||
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'; |
||||
|
||||
|
||||
const routes: Routes = [ |
||||
{ path: 'store-list', component: StoreListComponent }, |
||||
{ path: 'store-edit', component: StoreEditComponent }, |
||||
{ path: 'store-detail', component: StoreDetailComponent }, |
||||
]; |
||||
|
||||
@NgModule({ |
||||
imports: [RouterModule.forChild(routes)], |
||||
exports: [RouterModule] |
||||
}) |
||||
export class MerchantStoreRoutingModule { } |
@ -0,0 +1,26 @@ |
||||
import { NgModule } from '@angular/core'; |
||||
import { CommonModule } from '@angular/common'; |
||||
|
||||
import { MerchantStoreRoutingModule } from './merchant-store-routing.module'; |
||||
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 {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'; |
||||
|
||||
|
||||
@NgModule({ |
||||
declarations: [StoreListComponent, StoreEditComponent, StoreDetailComponent], |
||||
imports: [ |
||||
CommonModule, |
||||
MerchantStoreRoutingModule, |
||||
NgZorroAntdModule, |
||||
SeparateModule, |
||||
ReactiveFormsModule, |
||||
FormsModule, |
||||
BreadcrumbModule |
||||
] |
||||
}) |
||||
export class MerchantStoreModule { } |
@ -0,0 +1 @@ |
||||
<p>store-detail works!</p> |
@ -0,0 +1,15 @@ |
||||
import { Component, OnInit } from '@angular/core'; |
||||
|
||||
@Component({ |
||||
selector: 'app-store-detail', |
||||
templateUrl: './store-detail.component.html', |
||||
styleUrls: ['./store-detail.component.scss'] |
||||
}) |
||||
export class StoreDetailComponent implements OnInit { |
||||
|
||||
constructor() { } |
||||
|
||||
ngOnInit(): void { |
||||
} |
||||
|
||||
} |
@ -0,0 +1,70 @@ |
||||
<!-- start 面包屑 --> |
||||
<nz-breadcrumb> |
||||
<nz-breadcrumb-item> |
||||
<a (click)="getBack()">门店管理</a> |
||||
</nz-breadcrumb-item> |
||||
<nz-breadcrumb-item> |
||||
编辑门店 |
||||
</nz-breadcrumb-item> |
||||
</nz-breadcrumb> |
||||
<!-- end 面包屑 --> |
||||
|
||||
|
||||
<nz-content class="inner-content"> |
||||
<form nz-form [formGroup]="validateForm" class="ant-advanced-search-form"> |
||||
<div nz-row [nzGutter]="24"> |
||||
<div nz-col [nzSpan]="8"> |
||||
<nz-form-item> |
||||
<nz-form-label [nzFor]="'loginTelephone'" nzRequired>登录手机号</nz-form-label> |
||||
<nz-form-control nzErrorTip="请输入登录手机号!"> |
||||
<input nz-input placeholder="请输入登录手机号..." [formControlName]="'loginTelephone'" id="'loginTelephone'" /> |
||||
</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-control> |
||||
</nz-form-item> |
||||
</div> |
||||
<div nz-col [nzSpan]="8"> |
||||
<nz-form-item> |
||||
<nz-form-label [nzFor]="'merchantKey'" nzRequired>门店编号</nz-form-label> |
||||
<nz-form-control nzErrorTip="请输入门店编号!"> |
||||
<input nz-input placeholder="请输入门店编号..." [formControlName]="'merchantKey'" id="'merchantKey'" /> |
||||
</nz-form-control> |
||||
</nz-form-item> |
||||
</div> |
||||
<div nz-col [nzSpan]="8"> |
||||
<nz-form-item> |
||||
<nz-form-label [nzFor]="'merchantName'" nzRequired>门店名称</nz-form-label> |
||||
<nz-form-control nzErrorTip="请输入门店名称!"> |
||||
<input nz-input placeholder="请输入门店名称..." [formControlName]="'merchantName'" id="'merchantName'" /> |
||||
</nz-form-control> |
||||
</nz-form-item> |
||||
</div> |
||||
<div nz-col [nzSpan]="8"> |
||||
<nz-form-item> |
||||
<nz-form-label [nzFor]="'address'" nzRequired>门店地址</nz-form-label> |
||||
<nz-form-control nzErrorTip="请输入门店地址!"> |
||||
<input nz-input placeholder="请输入门店地址..." [formControlName]="'address'" id="'address'" /> |
||||
</nz-form-control> |
||||
</nz-form-item> |
||||
</div> |
||||
</div> |
||||
<div nz-row> |
||||
<div nz-col [nzSpan]="24" class="search-area"> |
||||
<button nz-button (click)="resetForm()">重置</button> |
||||
<button nz-button [nzType]="'primary'" (click)="getSave()">提交</button> |
||||
</div> |
||||
</div> |
||||
</form> |
||||
|
||||
</nz-content> |
@ -0,0 +1,6 @@ |
||||
button { |
||||
margin-left: 8px; |
||||
} |
||||
:host ::ng-deep .ant-upload { |
||||
background-color: #ffffff; |
||||
} |
@ -0,0 +1,136 @@ |
||||
import { Component, OnInit } from '@angular/core'; |
||||
import {FormBuilder, FormGroup, Validators} from '@angular/forms'; |
||||
import {environment} from '../../../../environments/environment'; |
||||
import {MerchantService} from '../../../services/merchant.service'; |
||||
import {NzMessageService, NzUploadFile} from 'ng-zorro-antd'; |
||||
import {ActivatedRoute} from '@angular/router'; |
||||
import {ValidatorsService} from '../../../services/validators.service'; |
||||
|
||||
@Component({ |
||||
selector: 'app-store-edit', |
||||
templateUrl: './store-edit.component.html', |
||||
styleUrls: ['./store-edit.component.scss'] |
||||
}) |
||||
export class StoreEditComponent implements OnInit { |
||||
|
||||
validateForm!: FormGroup; |
||||
data: any; |
||||
editFlag = false; |
||||
id: number; |
||||
passwordVisible = false; |
||||
logoFile = []; |
||||
WEB_SERVE_URL = environment.baseUrl; |
||||
previewImage: string | undefined = ''; |
||||
previewVisible = false; |
||||
|
||||
constructor( |
||||
private fb: FormBuilder, |
||||
private merchant: MerchantService, |
||||
private message: NzMessageService, // 信息提示
|
||||
private activatedRoute: ActivatedRoute, |
||||
) { |
||||
} |
||||
|
||||
ngOnInit(): void { |
||||
this.activatedRoute.queryParams.subscribe(queryParams => { |
||||
if (queryParams.merchantId != null) { |
||||
this.editFlag = true; |
||||
this.id = queryParams.merchantId; |
||||
this.getDetails(queryParams.merchantId); |
||||
} |
||||
}); |
||||
this.validateForm = this.fb.group({ |
||||
loginTelephone: [null, [Validators.required, ValidatorsService.mobile]], |
||||
password: [null, [Validators.required, ValidatorsService.minLength(6)]], |
||||
storeKey: [null, [Validators.required, ValidatorsService.maxLength(10)]], |
||||
storeKeyName: [null, [Validators.required, ValidatorsService.pwdLength(2, 12)]], |
||||
telephone: [null, [Validators.required]], |
||||
address: [null, [Validators.required]], |
||||
latitude: [null, [Validators.required]], |
||||
longitude: [null, [Validators.required]], |
||||
status: [null], |
||||
createTime: [null], |
||||
secUser: {}, |
||||
}); |
||||
} |
||||
|
||||
// 返回
|
||||
getBack() { |
||||
history.back(); |
||||
} |
||||
|
||||
// 重置
|
||||
public resetForm(): void { |
||||
this.validateForm.reset(); |
||||
} |
||||
|
||||
// 课程保存
|
||||
public getSave(): void { |
||||
// tslint:disable-next-line:forin
|
||||
for (const i in this.validateForm.controls) { |
||||
this.validateForm.controls[i].markAsDirty(); |
||||
this.validateForm.controls[i].updateValueAndValidity(); |
||||
if (this.validateForm.controls[i].errors != null) { |
||||
this.message.error('必填项不能为空'); |
||||
return; |
||||
} |
||||
} |
||||
|
||||
this.validateForm.value['secUser']['telephone'] = this.validateForm.value.loginTelephone; |
||||
this.validateForm.value['secUser']['password'] = this.validateForm.value.password; |
||||
if (this.logoFile.length !== 0) { |
||||
if (this.logoFile[0]['response'] != null) { |
||||
this.validateForm.value.merchantLogo = this.logoFile[0]['response']['return_data'][0]; |
||||
} else { |
||||
this.validateForm.value.merchantLogo = this.logoFile[0].name; |
||||
} |
||||
} |
||||
console.log(this.validateForm.value); |
||||
if (this.editFlag) { |
||||
this.validateForm.value.id = this.id; |
||||
this.merchant.updateMerchant(this.validateForm.value, data => { |
||||
if (data['return_code'] === '000000') { |
||||
this.getBack(); |
||||
this.message.success('修改成功'); |
||||
} else { |
||||
this.message.create('error', '修改失败'); |
||||
} |
||||
}); |
||||
} else { |
||||
|
||||
this.merchant.insertMerchant(this.validateForm.value, data => { |
||||
console.log(data); |
||||
if (data['return_code'] === '000000') { |
||||
this.getBack(); |
||||
this.message.success('添加成功'); |
||||
} else { |
||||
this.message.create('error', '保存失败'); |
||||
} |
||||
}); |
||||
} |
||||
} |
||||
|
||||
public getDetails(id) { |
||||
this.merchant.getMerchantById(id, data => { |
||||
if (data['return_code'] === '000000') { |
||||
data['return_data'].loginTelephone = data['return_data'].secUser.loginName; |
||||
data['return_data'].password = data['return_data'].secUser.password; |
||||
if (data['return_data']['merchantLogo'] != null && data['return_data']['merchantLogo'] !== '') { |
||||
const logo = String(data['return_data']['merchantLogo']); |
||||
const logoArray = []; |
||||
logoArray.push( |
||||
{ |
||||
uid: 1, |
||||
name: logo, |
||||
status: 'done', |
||||
url: environment.imageUrl + logo |
||||
}); |
||||
this.logoFile = logoArray; |
||||
} |
||||
this.validateForm.patchValue(data['return_data']); |
||||
} else { |
||||
this.message.create('error', data['return_msg']); |
||||
} |
||||
}); |
||||
} |
||||
} |
@ -0,0 +1,112 @@ |
||||
<!-- start 面包屑 --> |
||||
<app-breadcrumb></app-breadcrumb> |
||||
<!-- end 面包屑 --> |
||||
|
||||
<!--条件搜索--> |
||||
<div class="inner-content"> |
||||
<form nz-form [formGroup]="searchForm" (ngSubmit)="getRequest(true , searchForm.value)"> |
||||
<div nz-row> |
||||
<div nz-col nzSpan="6"> |
||||
<nz-form-item> |
||||
<nz-form-label [nzSpan]="6">商户编号</nz-form-label> |
||||
<nz-form-control [nzSpan]="16"> |
||||
<input nz-input formControlName="merchantKey"/> |
||||
</nz-form-control> |
||||
</nz-form-item> |
||||
</div> |
||||
<div nz-col nzSpan="6"> |
||||
<nz-form-item> |
||||
<nz-form-label [nzSpan]="6">商户名称</nz-form-label> |
||||
<nz-form-control [nzSpan]="16"> |
||||
<input nz-input formControlName="merchantName"/> |
||||
</nz-form-control> |
||||
</nz-form-item> |
||||
</div> |
||||
<div nz-col nzSpan="6"> |
||||
<nz-form-item> |
||||
<nz-form-label [nzSpan]="6">商户电话</nz-form-label> |
||||
<nz-form-control [nzSpan]="16"> |
||||
<input nz-input formControlName="telephone"/> |
||||
</nz-form-control> |
||||
</nz-form-item> |
||||
</div> |
||||
<div nz-col nzSpan="6"> |
||||
<nz-form-item> |
||||
<nz-form-label [nzSpan]="6">商户状态</nz-form-label> |
||||
<nz-form-control [nzSpan]="16"> |
||||
<nz-select nzShowSearch nzAllowClear formControlName="status" nzPlaceHolder="请选择状态"> |
||||
<nz-option nzLabel="禁用" nzValue="0"></nz-option> |
||||
<nz-option nzLabel="正常" nzValue="1"></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> |
||||
<div class="operating-button"> |
||||
<button nz-button nzType="primary" class="right-btn" [routerLink]="['/admin/merchantStore/store-edit']" ><i nz-icon nzType="plus" nzTheme="outline"></i>添加</button> |
||||
</div> |
||||
<nz-table |
||||
class="table" |
||||
#ajaxTable |
||||
nzShowSizeChanger |
||||
[nzFrontPagination]="false" |
||||
[nzData]="requestData" |
||||
[nzLoading]="loading" |
||||
[nzTotal]="total" |
||||
[(nzPageIndex)]="pageNum" |
||||
[(nzPageSize)]="pageSize" |
||||
[nzScroll]="{ x: '1200px' }" |
||||
(nzPageIndexChange)="getRequest(false , searchForm.value)" |
||||
(nzPageSizeChange)="getRequest(false , searchForm.value)"> |
||||
<thead nzSingleSort> |
||||
<tr> |
||||
<th nzWidth="50px">编号</th> |
||||
<th nzWidth="80px">商户编号</th> |
||||
<th nzWidth="80px">商户名称</th> |
||||
<th nzWidth="70px">商户LOGO</th> |
||||
<th nzWidth="100px">商户电话</th> |
||||
<th nzWidth="100px">创建时间</th> |
||||
<th nzWidth="50px">状态</th> |
||||
<th nzWidth="80px" nzRight="0px">操作</th> |
||||
</tr> |
||||
</thead> |
||||
<tbody> |
||||
<tr *ngFor="let data of ajaxTable.data; let i = index"> |
||||
<td>{{i+1}}</td> |
||||
<td>{{data.merchantKey}}</td> |
||||
<td>{{data.merchantName}}</td> |
||||
<td> |
||||
<img class="head_img" src="{{data.merchantLogo}}" onerror="this.src='../../../../assets/admin/navigation/icon.png'" alt=""> |
||||
</td> |
||||
<td>{{data.telephone}}</td> |
||||
<td>{{data.createTime | date: 'yyyy-MM-dd HH:mm'}}</td> |
||||
<td>{{data.status ===1 ? '正常' : '禁用'}}</td> |
||||
<td nzRight="0px" class="table-td-operation"> |
||||
<a (click)="getEdit(data.id)"><i nz-icon nzType="form" nzTheme="outline" nz-tooltip="编辑"></i></a> |
||||
<nz-divider nzType="vertical"></nz-divider> |
||||
<a (click)="getDetail(data.id)"><i nz-icon [nzIconfont]="'icon-dingdanxiangqing_icon'" nz-tooltip="商户详情"></i></a> |
||||
<nz-divider nzType="vertical"></nz-divider> |
||||
<a (click)="getEdit(data.id)"><i nz-icon nzType="unordered-list" nzTheme="outline" nz-tooltip="门店列表"></i></a> |
||||
<nz-divider nzType="vertical"></nz-divider> |
||||
<a *ngIf="data.status === 1" (click)='disableMerchant(data.id)'><i nz-icon nzType="stop" nzTheme="outline" nz-tooltip="禁用"></i></a> |
||||
<a *ngIf="data.status !== 1" (click)='enableMerchant(data.id)'><i nz-icon nzType="check-circle" nzTheme="outline" nz-tooltip="启用"></i></a> |
||||
</td> |
||||
</tbody> |
||||
</nz-table> |
||||
</div> |
||||
|
||||
|
||||
|
@ -0,0 +1,4 @@ |
||||
.head_img { |
||||
height: 60px; |
||||
width: 60px; |
||||
} |
@ -0,0 +1,133 @@ |
||||
import { Component, OnInit } from '@angular/core'; |
||||
import {FormBuilder, FormGroup} from '@angular/forms'; |
||||
import {MerchantService} from '../../../services/merchant.service'; |
||||
import {IconService} from '../../../services/icon.service'; |
||||
import {NzMessageService} from 'ng-zorro-antd'; |
||||
import {Router} from '@angular/router'; |
||||
import {CommonsService} from '../../../services/commons.service'; |
||||
import {MerchantStoreService} from '../../../services/merchant-store.service'; |
||||
|
||||
@Component({ |
||||
selector: 'app-store-list', |
||||
templateUrl: './store-list.component.html', |
||||
styleUrls: ['./store-list.component.scss'] |
||||
}) |
||||
export class StoreListComponent implements OnInit { |
||||
|
||||
searchForm: FormGroup; // 搜索框
|
||||
requestData = []; // 列表数据
|
||||
total: number; // 页码
|
||||
pageNum = 1; // 页码
|
||||
pageSize = 10; // 条码
|
||||
loading = true; |
||||
|
||||
constructor( |
||||
private form: FormBuilder, |
||||
private merchantStore: MerchantStoreService, |
||||
private iconService: IconService, |
||||
private message: NzMessageService, |
||||
private router: Router, |
||||
private common: CommonsService |
||||
) { |
||||
} |
||||
|
||||
ngOnInit(): void { |
||||
this.init(); |
||||
} |
||||
|
||||
public init(): void { |
||||
this.searchForm = this.form.group({ |
||||
merchantKey: [null], |
||||
merchantName: [null], |
||||
telephone: [null], |
||||
status: [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.merchantStore.getStoreListByMerchant(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 disableMerchant(id): void { |
||||
const message = '是否禁用商户'; |
||||
this.common.showConfirm(message, data => { |
||||
if (data) { |
||||
this.merchantStore.disableMerchant(id, dataReturn => { |
||||
if (dataReturn['return_code'] === '000000') { |
||||
this.message.success('操作成功'); |
||||
this.getRequest(false , this.searchForm.value); |
||||
} else { |
||||
this.message.warning(dataReturn['return_msg']); |
||||
} |
||||
}); |
||||
} |
||||
}); |
||||
} |
||||
|
||||
// 启动商户
|
||||
public enableMerchant(id): void { |
||||
const message = '是否启用商户'; |
||||
this.common.showConfirm(message, data => { |
||||
if (data) { |
||||
this.merchantStore.enableMerchant(id, dataReturn => { |
||||
if (dataReturn['return_code'] === '000000') { |
||||
this.message.success('操作成功'); |
||||
this.getRequest(false , this.searchForm.value); |
||||
} else { |
||||
this.message.warning(dataReturn['return_msg']); |
||||
} |
||||
}); |
||||
} |
||||
}); |
||||
} |
||||
|
||||
|
||||
// 修改
|
||||
public getEdit(id: number): void { |
||||
this.router.navigate(['/admin/merchant/merchant-edit'], { |
||||
queryParams: { |
||||
merchantId: id |
||||
} |
||||
}).then(r => console.log(r)); |
||||
} |
||||
|
||||
// 查看详情
|
||||
public getDetail(id: number): void { |
||||
this.router.navigate(['/admin/merchant/merchant-detail'], { |
||||
queryParams: { |
||||
merchantId: id |
||||
} |
||||
}).then(r => console.log(r)); |
||||
} |
||||
|
||||
// 查看门店列表
|
||||
public getList(id: number): void { |
||||
this.router.navigate(['/admin/merchant/merchant-detail'], { |
||||
queryParams: { |
||||
merchantId: id |
||||
} |
||||
}).then(r => console.log(r)); |
||||
} |
||||
} |
@ -1 +1,32 @@ |
||||
<p>merchant-detail works!</p> |
||||
<div class="inner-content"> |
||||
<nz-descriptions nzBordered> |
||||
<nz-descriptions-item nzTitle="商户logo" [nzSpan]="3"> |
||||
<img class="head_img" src="{{data.merchantLogo}}" onerror="this.src='../../../../assets/admin/navigation/icon.png'" alt=""> |
||||
</nz-descriptions-item> |
||||
<nz-descriptions-item nzTitle="登录账户">{{data['secUser']['loginName']}}</nz-descriptions-item> |
||||
<nz-descriptions-item nzTitle="商户编号">{{data['merchantKey']}}</nz-descriptions-item> |
||||
<nz-descriptions-item nzTitle="商户名称">{{data.merchantName}}</nz-descriptions-item> |
||||
<nz-descriptions-item nzTitle="联系电话">{{data.secUser.telephone}}</nz-descriptions-item> |
||||
<nz-descriptions-item nzTitle="商户地址">{{data.address}}</nz-descriptions-item> |
||||
<nz-descriptions-item nzTitle="状态">{{data.status ===1 ? '正常' : '禁用'}}</nz-descriptions-item> |
||||
<nz-descriptions-item nzTitle="银行名称"> |
||||
{{data.bankName == null ? '未上传' : data.bankName}} |
||||
</nz-descriptions-item> |
||||
<nz-descriptions-item nzTitle="银行账号"> |
||||
{{data.bankAccount == null ? '未上传' : data.bankAccount}} |
||||
</nz-descriptions-item> |
||||
<nz-descriptions-item nzTitle="开户人"> |
||||
{{data.bankHolder == null ? '未上传' : data.bankHolder}} |
||||
</nz-descriptions-item> |
||||
<nz-descriptions-item nzTitle="创建时间"> |
||||
{{data.createTime | date: 'yyyy-MM-dd'}} |
||||
</nz-descriptions-item> |
||||
<nz-descriptions-item nzTitle="更新时间"> |
||||
{{data.updateTime | date: 'yyyy-MM-dd'}} |
||||
</nz-descriptions-item> |
||||
<nz-descriptions-item nzTitle="操作人员">{{data.operatorName }}</nz-descriptions-item> |
||||
<nz-descriptions-item nzTitle="简介" [nzSpan]="3"> |
||||
{{data.merchantDesc}} |
||||
</nz-descriptions-item> |
||||
</nz-descriptions> |
||||
</div> |
||||
|
@ -0,0 +1,4 @@ |
||||
.head_img { |
||||
height: 60px; |
||||
width: 60px; |
||||
} |
@ -1,25 +0,0 @@ |
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing'; |
||||
|
||||
import { MerchantDetailComponent } from './merchant-detail.component'; |
||||
|
||||
describe('MerchantDetailComponent', () => { |
||||
let component: MerchantDetailComponent; |
||||
let fixture: ComponentFixture<MerchantDetailComponent>; |
||||
|
||||
beforeEach(async(() => { |
||||
TestBed.configureTestingModule({ |
||||
declarations: [ MerchantDetailComponent ] |
||||
}) |
||||
.compileComponents(); |
||||
})); |
||||
|
||||
beforeEach(() => { |
||||
fixture = TestBed.createComponent(MerchantDetailComponent); |
||||
component = fixture.componentInstance; |
||||
fixture.detectChanges(); |
||||
}); |
||||
|
||||
it('should create', () => { |
||||
expect(component).toBeTruthy(); |
||||
}); |
||||
}); |
@ -1,64 +0,0 @@ |
||||
import {Injectable} from '@angular/core'; |
||||
import {HttpClient} from '@angular/common/http'; |
||||
import {environment} from '../../environments/environment'; |
||||
|
||||
@Injectable({ |
||||
providedIn: 'root' |
||||
}) |
||||
export class AdminIndexService { |
||||
|
||||
constructor( |
||||
private http: HttpClient, |
||||
) { |
||||
} |
||||
|
||||
/** |
||||
* 按职位类型统计前十职位数量 |
||||
* @param callBack |
||||
*/ |
||||
public getPositionTopTen(callBack) { |
||||
this.http.get(environment.baseUrl + '/statistics/getPositionTopTen').subscribe(data => { |
||||
callBack(data); |
||||
}); |
||||
} |
||||
|
||||
/** |
||||
* 按年龄段统计简历 |
||||
* @param callBack |
||||
*/ |
||||
public findResumeByAge(callBack) { |
||||
this.http.get(environment.baseUrl + '/statistics/findResumeByAge').subscribe(data => { |
||||
callBack(data); |
||||
}); |
||||
} |
||||
|
||||
/** |
||||
* 按学历统计简历 |
||||
* @param callBack |
||||
*/ |
||||
public findResumeByEdu(callBack) { |
||||
this.http.get(environment.baseUrl + '/statistics/findResumeByEdu').subscribe(data => { |
||||
callBack(data); |
||||
}); |
||||
} |
||||
|
||||
/** |
||||
* 按行业统计前十企业数量 |
||||
* @param callBack |
||||
*/ |
||||
public getEnterpriseTopTen(callBack) { |
||||
this.http.get(environment.baseUrl + '/statistics/getEnterpriseTopTen').subscribe(data => { |
||||
callBack(data); |
||||
}); |
||||
} |
||||
|
||||
/** |
||||
* 按照月份统计简历投递数量(当前年份) |
||||
* @param callBack |
||||
*/ |
||||
public findDeliveryByMonth(callBack) { |
||||
this.http.get(environment.baseUrl + '/statistics/findDeliveryByMonth').subscribe(data => { |
||||
callBack(data); |
||||
}); |
||||
} |
||||
} |
@ -0,0 +1,91 @@ |
||||
import { Injectable } from '@angular/core'; |
||||
import {environment} from '../../environments/environment'; |
||||
import {HttpClient} from '@angular/common/http'; |
||||
import {CommonsService} from './commons.service'; |
||||
|
||||
@Injectable({ |
||||
providedIn: 'root' |
||||
}) |
||||
export class MerchantStoreService { |
||||
|
||||
constructor( |
||||
private http: HttpClient, |
||||
private common: CommonsService |
||||
) { } |
||||
|
||||
/** |
||||
* 查询门店列表 |
||||
* |
||||
* @param paramsObject 对象 |
||||
* @param callBack 回调 |
||||
*/ |
||||
public getStoreListByMerchant(paramsObject: object, callBack) { |
||||
this.http.get(environment.baseUrl + 'highMerchantStore/getStoreListByMerchant?' + this.common.getWhereCondition(paramsObject)).subscribe(data => { |
||||
callBack(data); |
||||
}); |
||||
} |
||||
|
||||
/** |
||||
* 新增商户 |
||||
* |
||||
* @param params 上传对象 |
||||
* @param callBack 回调 |
||||
* @return data 返回结果 |
||||
*/ |
||||
public insertMerchant(params: object, callBack) { |
||||
this.http.post(environment.baseUrl + 'highMerchant/insertMerchant', params).subscribe(data => { |
||||
callBack(data); |
||||
}); |
||||
} |
||||
|
||||
/** |
||||
* 修改商户 |
||||
* |
||||
* @param params 上传对象 |
||||
* @param callBack 回调 |
||||
* @return data 返回结果 |
||||
*/ |
||||
public updateMerchant(params: object, callBack) { |
||||
this.http.post(environment.baseUrl + 'highMerchant/updateMerchant', params).subscribe(data => { |
||||
callBack(data); |
||||
}); |
||||
} |
||||
|
||||
/** |
||||
* 根据id查询详情 |
||||
* |
||||
* @param merchantId 职位id |
||||
* @param callBack 回调 |
||||
*/ |
||||
public getMerchantById(merchantId: number, callBack) { |
||||
this.http.get(environment.baseUrl + 'highMerchant/getMerchantById?id=' + merchantId).subscribe(data => { |
||||
callBack(data); |
||||
}); |
||||
} |
||||
|
||||
|
||||
/** |
||||
* 禁用商户 |
||||
* |
||||
* @param id 用户id |
||||
* @param callBack 返回参数 |
||||
*/ |
||||
public disableMerchant(id: number, callBack) { |
||||
this.http.get(environment.baseUrl + 'highMerchant/disableMerchant?id=' + id).subscribe(data => { |
||||
callBack(data); |
||||
}); |
||||
} |
||||
|
||||
/** |
||||
* 启用商户 |
||||
* |
||||
* @param id 用户id |
||||
* @param callBack 返回参数 |
||||
*/ |
||||
public enableMerchant(id: number, callBack) { |
||||
this.http.get(environment.baseUrl + 'highMerchant/enableMerchant?id=' + id).subscribe(data => { |
||||
callBack(data); |
||||
}); |
||||
} |
||||
|
||||
} |
Loading…
Reference in new issue