Commit 215ed529 by Sweet Zhang

20220312|git init

parents
# Editor configuration, see https://editorconfig.org
root = true
[*]
charset = utf-8
indent_style = space
indent_size = 2
insert_final_newline = true
trim_trailing_whitespace = true
[*.md]
max_line_length = off
trim_trailing_whitespace = false
# See http://help.github.com/ignore-files/ for more about ignoring files.
# compiled output
/dist
/tmp
/out-tsc
# Only exists if Bazel was run
/bazel-out
# dependencies
/node_modules
# profiling files
chrome-profiler-events.json
speed-measure-plugin.json
# IDEs and editors
/.idea
.project
.classpath
.c9/
*.launch
.settings/
*.sublime-workspace
# IDE - VSCode
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
.history/*
# misc
/.sass-cache
/connect.lock
/coverage
/libpeerconnection.log
npm-debug.log
yarn-error.log
testem.log
/typings
# System Files
.DS_Store
Thumbs.db
# YdLife
This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 7.3.5.
## Development server
Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files.
## Code scaffolding
Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`.
## Build
Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `--prod` flag for a production build.
## Running unit tests
Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).
## Running end-to-end tests
Run `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protractortest.org/).
## Further help
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md).
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"version": 1,
"newProjectRoot": "projects",
"projects": {
"ydLife": {
"root": "",
"sourceRoot": "src", // 源码根目录
"projectType": "application",
"prefix": "ydlife", // 使用`ng generate`命令时,自动为selector元数据的值添加的前缀名
"schematics": {
"@schematics/angular:component": {
"style": "scss"
}
},
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"outputPath": "dist/",
"index": "src/index.html", //指定首页文件,默认值是`index.html`
"main": "src/main.ts", // 指定应用的入门文件
"polyfills": "src/polyfills.ts", // 指定polyfill文件
"tsConfig": "src/tsconfig.app.json", // 指定tsconfig文件
"assets": [ // 记录资源文件夹,构建时复制到`outDir`指定的目录
"src/favicon.ico",
"src/assets"
],
"styles": [ // 引入全局样式,构建时会打包进来,常用于第三方库引入的样式
"src/assets/font/iconfont.css",
"src/assets/weui/weui.css",
"node_modules/ng-zorro-antd-mobile/src/ng-zorro-antd-mobile.min.css",
"src/styles.scss"
],
"scripts": [
"node_modules/echarts/dist/echarts.min.js",
"node_modules/jquery/dist/jquery.js"
], // 引入全局脚步,构建时会打包进来,常用于第三方库引入的脚本
"es5BrowserSupport": true
},
"configurations": {
"dev": {
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"extractCss": true,
"deployUrl": "",
"baseHref": "/ydLife/",
"namedChunks": false,
"aot": false,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": false,
"budgets": [
{
"type": "initial",
"maximumWarning": "2mb",
"maximumError": "5mb"
}
]
},
"stage": {
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.stage.ts"
}
],
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"extractCss": true,
"deployUrl": "",
"baseHref": "/ydLife/",
"namedChunks": false,
"aot": false,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": false,
"budgets": [
{
"type": "initial",
"maximumWarning": "2mb",
"maximumError": "5mb"
}
]
},
"production": {
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.prod.ts"
}
],
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"extractCss": true,
"deployUrl": "",
"baseHref": "/ydLife/",
"namedChunks": false,
"aot": false,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": false,
"budgets": [
{
"type": "initial",
"maximumWarning": "2mb",
"maximumError": "5mb"
}
]
}
}
},
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"options": {
"browserTarget": "ydLife:build"
},
"configurations": {
"production": {
"browserTarget": "ydLife:build:production"
}
}
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"options": {
"browserTarget": "ydLife:build"
}
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"main": "src/test.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "src/tsconfig.spec.json",
"karmaConfig": "src/karma.conf.js",
"styles": [
"src/styles.scss"
],
"scripts": [],
"assets": [
"src/favicon.ico",
"src/assets"
]
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": [
"src/tsconfig.app.json",
"src/tsconfig.spec.json"
],
"exclude": [
"**/node_modules/**"
]
}
}
}
},
"ydLife-e2e": {
"root": "e2e/",
"projectType": "application",
"prefix": "",
"architect": {
"e2e": {
"builder": "@angular-devkit/build-angular:protractor",
"options": {
"protractorConfig": "e2e/protractor.conf.js",
"devServerTarget": "ydLife:serve"
},
"configurations": {
"production": {
"devServerTarget": "ydLife:serve:production"
}
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": "e2e/tsconfig.e2e.json",
"exclude": [
"**/node_modules/**"
]
}
}
}
}
},
"defaultProject": "ydLife"
}
// Protractor configuration file, see link for more information
// https://github.com/angular/protractor/blob/master/lib/config.ts
const { SpecReporter } = require('jasmine-spec-reporter');
exports.config = {
allScriptsTimeout: 11000,
specs: [
'./src/**/*.e2e-spec.ts'
],
capabilities: {
'browserName': 'chrome'
},
directConnect: true,
baseUrl: 'http://localhost:4200/',
framework: 'jasmine',
jasmineNodeOpts: {
showColors: true,
defaultTimeoutInterval: 30000,
print: function() {}
},
onPrepare() {
require('ts-node').register({
project: require('path').join(__dirname, './tsconfig.e2e.json')
});
jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } }));
}
};
\ No newline at end of file
import { AppPage } from './app.po';
import { browser, logging } from 'protractor';
describe('workspace-project App', () => {
let page: AppPage;
beforeEach(() => {
page = new AppPage();
});
it('should display welcome message', () => {
page.navigateTo();
expect(page.getTitleText()).toEqual('Welcome to ydLife!');
});
afterEach(async () => {
// Assert that there are no errors emitted from the browser
const logs = await browser.manage().logs().get(logging.Type.BROWSER);
expect(logs).not.toContain(jasmine.objectContaining({
level: logging.Level.SEVERE,
} as logging.Entry));
});
});
import { browser, by, element } from 'protractor';
export class AppPage {
navigateTo() {
return browser.get(browser.baseUrl) as Promise<any>;
}
getTitleText() {
return element(by.css('app-root h1')).getText() as Promise<string>;
}
}
{
"extends": "../tsconfig.json",
"compilerOptions": {
"outDir": "../out-tsc/app",
"module": "commonjs",
"target": "es5",
"types": [
"jasmine",
"jasminewd2",
"node"
]
}
}
\ No newline at end of file
File added
This source diff could not be displayed because it is too large. You can view the blob instead.
{
"name": "protest",
"version": "0.0.0",
"scripts": {
"ng": "ng",
"start": "ng serve --host 0.0.0.0 --port 4205 -o",
"buildDev": "ng build -c=dev --prod",
"buildStage": "ng build -c=stage --prod",
"buildProd": "ng build -c=production --prod",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e"
},
"private": true,
"dependencies": {
"@angular/animations": "~7.2.0",
"@angular/common": "~7.2.0",
"@angular/compiler": "~7.2.0",
"@angular/core": "~7.2.0",
"@angular/forms": "~7.2.0",
"@angular/platform-browser": "~7.2.0",
"@angular/platform-browser-dynamic": "~7.2.0",
"@angular/router": "~7.2.0",
"angular2-signaturepad": "^3.0.4",
"buffer": "^5.4.3",
"core-js": "^2.5.4",
"dayjs": "1.10.4",
"echarts": "^4.9.0",
"html2canvas": "^1.0.0-rc.7",
"jquery": "^3.5.1",
"jspdf": "^2.3.0",
"ng-zorro-antd-mobile": "^0.12.5",
"ngx-echarts": "^3.2.0",
"ngx-ueditor": "^2.1.3",
"node-sass": "^4.14.1",
"rxjs": "~6.3.3",
"save": "^2.4.0",
"signature_pad": "^3.0.0-beta.4",
"tslib": "^1.9.0",
"uuid": "^3.3.3",
"zone.js": "~0.8.26"
},
"devDependencies": {
"@angular-devkit/build-angular": "^0.13.10",
"@angular/cli": "^7.3.9",
"@angular/compiler-cli": "~7.2.0",
"@angular/language-service": "~7.2.0",
"@types/jasmine": "~2.8.8",
"@types/jasminewd2": "~2.0.3",
"@types/node": "~8.9.4",
"codelyzer": "~4.5.0",
"elesigncode": "^1.1.6",
"jasmine-core": "~2.99.1",
"jasmine-spec-reporter": "~4.2.1",
"karma": "~4.0.0",
"karma-chrome-launcher": "~2.2.0",
"karma-coverage-istanbul-reporter": "~2.0.1",
"karma-jasmine": "~1.1.2",
"karma-jasmine-html-reporter": "^0.2.2",
"protractor": "~5.4.0",
"ts-node": "~7.0.0",
"tslint": "~5.11.0",
"typescript": "~3.2.2"
}
}
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { PageNotFoundComponent } from './page-not-found/page-not-found.component';
import { AuthGuard } from './auth/auth.guard';
const routes: Routes = [
{ path: '', redirectTo: '/my', pathMatch: 'full' },
{ path: 'my', loadChildren: () => import('./my/my.module').then(mod => mod.MyModule), canLoad: [AuthGuard] },
{ path: 'login', loadChildren: () => import('./auth/auth.module').then(mod => mod.AuthModule) },
{ path: '**', component: PageNotFoundComponent }
];
@NgModule({
imports: [RouterModule.forRoot(routes)],
exports: [RouterModule]
})
export class AppRoutingModule {
}
<!--The content below is only a placeholder and can be replaced.-->
<router-outlet></router-outlet>
<ydlife-guide-page *ngIf="shareGuidePageEnable"></ydlife-guide-page>
<ydlife-alert *ngIf="isNeedAlert" [dialogInfo]="dialogInfo" (popInfo)="getPopInfo()"></ydlife-alert>
<div class="returnIndexBox" *ngIf="isShowIndexBtn" appDrag>
<div><i class="iconfont icon-shouye"></i></div>
<div>首页</div>
</div>
\ No newline at end of file
import { TestBed, async } from '@angular/core/testing';
import { RouterTestingModule } from '@angular/router/testing';
import { AppComponent } from './app.component';
describe('AppComponent', () => {
beforeEach(async(() => {
TestBed.configureTestingModule({
imports: [
RouterTestingModule
],
declarations: [
AppComponent
],
}).compileComponents();
}));
it('should create the app', () => {
const fixture = TestBed.createComponent(AppComponent);
const app = fixture.debugElement.componentInstance;
expect(app).toBeTruthy();
});
it(`should have as title 'ydLife'`, () => {
const fixture = TestBed.createComponent(AppComponent);
const app = fixture.debugElement.componentInstance;
expect(app.title).toEqual('ydLife');
});
it('should render title in a h1 tag', () => {
const fixture = TestBed.createComponent(AppComponent);
fixture.detectChanges();
const compiled = fixture.debugElement.nativeElement;
expect(compiled.querySelector('h1').textContent).toContain('Welcome to ydLife!');
});
});
import { Component, OnDestroy, OnInit } from '@angular/core';
import { AuthService } from "./auth/auth.service";
import { LifeCommonService } from "./common/life-common.service";
import { Subscription } from "rxjs/index";
import {Router, NavigationStart} from '@angular/router';
declare var wx: any;
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.scss']
})
export class AppComponent implements OnInit, OnDestroy {
shareGuidePageEnable: boolean;
subscription: Subscription;
currentVersion: any;
isNeedAlert: boolean;
dialogInfo: any;
// 是否显示首页浮标
isShowIndexBtn: boolean;
loginId:any;
constructor(private router: Router,private authService: AuthService, private lifeCommonService: LifeCommonService) {
this.subscription = lifeCommonService.shareStatus$.subscribe(status => {
this.shareGuidePageEnable = status == '1';
});
}
ngOnInit() {
this.loginId = localStorage.getItem('lifeCustomerInfo')?JSON.parse(localStorage.getItem('lifeCustomerInfo')).mobileNo:null;
this.authService.obtainToken(this.loginId).subscribe(res => {
if (res['success']) {
localStorage.setItem('lifeToken', res['data']['token']);
this.ydWxConfig();
}
});
this.getVersion();
this.router.events.forEach((event) => {
if (event instanceof NavigationStart) {
// 控制首页浮标显示与否
this.isShowIndexBtn = event.url == '/approval_list';
}
});
}
ngOnDestroy() {
this.subscription.unsubscribe();
}
// 微信JS-SDK注册
ydWxConfig() {
const url = encodeURIComponent(location.href.split('#')[0]);
this.authService.ydWxConfig(url).subscribe(res => {
const data = res['data'];
wx.config({
debug: false,
appId: data.appId,
timestamp: data.timestamp,
nonceStr: data.nonceStr,
signature: data.signature,
jsApiList: data.jsApiList,
beta: true
});
});
}
// 关闭弹窗
getPopInfo() {
this.isNeedAlert = false;
let { search, href } = window.location;
href = href.replace(/&?t_reload=(\d+)/g, '');
window.location.href = href + (search ? '&' : '?') + 't_reload=' + new Date().getTime();
localStorage.setItem('Version', this.currentVersion)
}
getVersion() {
this.authService.currentVersionQuery().subscribe((res) => {
if (res['data']['currentVersion']) {
this.currentVersion = res['data']['currentVersion'];
}
//只在微信端判断缓存
if (this.lifeCommonService.checkDeviceType() === '3') {
//如果本地没有版本号设置缓存
if (!localStorage.getItem('Version')) {
localStorage.setItem('Version', this.currentVersion);
} else {
const Version = localStorage.getItem('Version');
//如果缓存有版本号对比本地和接口版本
if (Version != this.currentVersion) {
this.isNeedAlert = true;
this.dialogInfo = {
title: null,
content: { value: '检测到新版本', align: 'center' },
footer: [{ value: '更新', routerLink: '', className: 'weui-dialog__btn_primary' }],
};
}
}
}
})
}
}
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
import { PageNotFoundComponent } from './page-not-found/page-not-found.component';
import { MyModule } from './my/my.module';
import { Router } from '@angular/router';
import { AuthModule } from './auth/auth.module';
import { HttpClientModule } from '@angular/common/http';
import { LifeCommonModule } from './common/life-common.module';
import { httpInterceptorProviders } from './http-interceptors/index';
import { DatePipe } from "@angular/common";
import { SafeHtmlPipe } from './safe-html.pipe';
import { LocalStorage } from './domain/local.storage';
import { BrowserAnimationsModule } from "@angular/platform-browser/animations";
import { DragDirective } from './directive/drag.directive';
@NgModule({
declarations: [
AppComponent,
PageNotFoundComponent,
SafeHtmlPipe,
DragDirective
],
imports: [
BrowserModule,
MyModule,
AuthModule,
LifeCommonModule,
HttpClientModule,
AppRoutingModule,
BrowserAnimationsModule
],
providers: [DatePipe, httpInterceptorProviders, LocalStorage],
bootstrap: [AppComponent]
})
export class AppModule {
}
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import {LoginComponent} from './login/login.component';
const routes: Routes = [
{ path: '', component: LoginComponent }
];
@NgModule({
imports: [RouterModule.forChild(routes)],
exports: [RouterModule]
})
export class AuthRoutingModule { }
import { TestBed, async, inject } from '@angular/core/testing';
import { AuthGuard } from './auth.guard';
describe('AuthGuard', () => {
beforeEach(() => {
TestBed.configureTestingModule({
providers: [AuthGuard]
});
});
it('should ...', inject([AuthGuard], (guard: AuthGuard) => {
expect(guard).toBeTruthy();
}));
});
import { Injectable } from '@angular/core';
import {
CanActivate, Router,
ActivatedRouteSnapshot,
RouterStateSnapshot,
CanActivateChild,
NavigationExtras,
CanLoad, Route
} from '@angular/router';
import { AuthService } from './auth.service';
@Injectable({
providedIn: 'root',
})
export class AuthGuard implements CanActivate, CanActivateChild, CanLoad {
constructor(private authService: AuthService, private router: Router) {
}
canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): boolean {
let url: string = state.url;
return this.checkLogin(url);
}
canActivateChild(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): boolean {
return this.canActivate(route, state);
}
canLoad(route: Route): boolean {
let url = `/${route.path}`;
return this.checkLogin(url);
}
checkLogin(url: string): boolean {
const lifeCustomerInfo = localStorage.getItem('lifeCustomerInfo') ? JSON.parse(localStorage.getItem('lifeCustomerInfo')) : null;
// 如果是AGMS预览薪资单跳转进来的,不需要登录
if (this.authService.isLoggedIn || (lifeCustomerInfo && lifeCustomerInfo['customerId'] && lifeCustomerInfo['practitionerId']) || (url.indexOf('preFlag=AGMS') >= 0 && url.indexOf('salary_detail') >= 0)) {
return true;
}
// Store the attempted URL for redirecting
this.authService.redirectUrl = url;
// Navigate to the login page with extras
this.router.navigate(['/login']);
return false;
}
}
import {NgModule} from '@angular/core';
import {CommonModule} from '@angular/common';
import {AuthRoutingModule} from './auth-routing.module';
import {LoginComponent} from './login/login.component';
import {LifeCommonModule} from "../common/life-common.module";
@NgModule({
declarations: [LoginComponent],
imports: [
CommonModule,
LifeCommonModule,
AuthRoutingModule
]
})
export class AuthModule {
}
import { TestBed } from '@angular/core/testing';
import { AuthService } from './auth.service';
describe('AuthService', () => {
beforeEach(() => TestBed.configureTestingModule({}));
it('should be created', () => {
const service: AuthService = TestBed.get(AuthService);
expect(service).toBeTruthy();
});
});
import { Injectable } from '@angular/core';
import { Observable, of, throwError } from 'rxjs';
import { environment } from '../../environments/environment';
import { HttpClient, HttpErrorResponse } from '@angular/common/http';
import { catchError } from 'rxjs/internal/operators';
@Injectable({
providedIn: 'root',
})
export class AuthService {
constructor(private http: HttpClient) {
}
private API = environment.BACKEND_URL_CONFIG_VALUE;
private ydapi = environment.ORIGINNAME;
isLoggedIn = false;
// store the URL so we can redirect after logging in
redirectUrl: string;
// 经纪人登陆
login(loginInfo): Observable<any> {
const api = this.ydapi + '/practitioner/login';
return this.http.post(api, JSON.stringify(loginInfo));
}
// 发送验证码
verificationCode(verticalCode) {
const url = this.API + '/verificationCode';
return this.http
.post(url, JSON.stringify(verticalCode));
}
// 校验验证码
compare(compareCode) {
const url = this.API + '/checkVerificationCode';
return this.http
.post(url, JSON.stringify(compareCode))
.pipe(
catchError(this.handleError)
);
}
/**
* 获取TOKEN
*/
obtainToken(loginId) {
const url = this.API + '/authorize/obtainToken';
return this.http.post(url, JSON.stringify({ ticket: "life",loginId:loginId}));
}
//获取微信配置ydLife公众号
ydWxConfig(Currenturl) {
const url = this.ydapi + '/wxConfig';
const postUrl = {
url: Currenturl
};
return this.http.post(url, JSON.stringify(postUrl));
}
// 获取错误详情
private handleError(error: HttpErrorResponse) {
if (error.error instanceof ErrorEvent) {
console.error('An error occurred:', error.error.message);
} else {
console.error(
`Backend returned code ${error.status}, ` +
`body was: ${JSON.stringify(error.error)}`);
}
return throwError(
'Something bad happened; please try again later.');
}
currentVersionQuery() {
const url = this.API + '/metadata/currentVersionQuery';
return this.http.get(url);
}
getOppId(urlParam) {
return this.http.get(urlParam)
}
}
<div class="page form_vcode js_show">
<div class="weui-form">
<div class="weui-form__text-area" style="position: relative;">
<img style="width: 100%;" src="assets/images/ydinsurance_logo.png">
<div style="font-family: '微软雅黑';position: absolute; top: 65%;left: 35%;font-size: 14px;">
海纳百<span style="letter-spacing: 3px;"></span>赢家后盾
</div>
</div>
<div class="weui-form__control-area">
<div id="dragContainer" class="dragContainer" #dragContainer>
<div id="dragBg"></div>
<div id="dragText"></div>
<div id="dragHandler" class="dragHandlerBg slideController" #dragHandler></div>
</div>
<div *ngIf="isVertifySucc == true" style="color: red;text-align: center;margin-top: 25px;">请先滑动解锁后再登录</div>
<div class="weui-cells__group weui-cells__group_form" *ngIf="isVertifySucc == false">
<div class="weui-cells weui-cells_form">
<div class="weui-cell" style="padding:10px 0px">
<!-- <div class="weui-cell__hd"><label class="weui-label">手机号</label></div> -->
<div class="weui-cell__bd">
<input autofocus="" class="weui-input" type="tel" maxlength="11" pattern="[0-9]*" placeholder="请输入手机号"
name="mobileNo" [(ngModel)]="userInfo.mobileNo" (blur)="inputBlur()">
</div>
</div>
<div class="weui-cell weui-cell_vcode" style="padding:12px 0px">
<!-- <div class="weui-cell__hd"><label class="weui-label">验证码</label></div> -->
<div class="weui-cell__bd">
<input class="weui-input" type="tel" pattern="[0-9]*" id="js_input" placeholder="请输入验证码" maxlength="6"
name="verificationCode" [(ngModel)]="userInfo.verificationCode" (blur)="inputBlur()">
</div>
<div class="weui-cell__ft">
<button class="weui-btn weui-btn_default weui-vcode-btn" (click)="verificationCode()">{{sendCodeHtml}}
</button>
</div>
</div>
</div>
</div>
</div>
<div class="weui-form__opr-area" *ngIf="isVertifySucc == false">
<a class="weui-btn weui-btn_primary login" href="javascript:" id="showTooltips"
style="width:100%;padding: 10px 24px;" (click)="login()">登录</a>
</div>
</div>
</div>
<ydlife-alert *ngIf="isNeedAlert" [dialogInfo]="dialogInfo" (popInfo)="getPopInfo()"></ydlife-alert>
\ No newline at end of file
*{
touch-action: pan-y;
}
.weui-form__control-area{
margin: 20px 0 45px 0;
}
.weui-form{
padding: 56px 15px 0px 15px;
}
.weui-form__opr-area{
.login{
color: #fff;
background: #ff1c2b;
}
}
.weui-cells__group_form .weui-cells:before, .weui-cells__group_form .weui-cell:before{
left:0;
right: 0;
}
.weui-cells__group_form .weui-cells:before{
border-top: none;
}
.weui-cells__group_form .weui-cells:after {
left: 0;
right: 0;
}
.weui-cells__group_form .weui-vcode-btn{
background: none;
background: none;
border: 1px red solid;
color: red;
font-weight: normal;
}
.weui-input {
caret-color: red;
font-size: 20px;
padding-left: 10px;
}
.weui-input::-webkit-input-placeholder {
font-size: 20px;
}
/* 滑动控件容器,灰色背景 */
#dragContainer {
position: relative;
background: #e8e8e8;
width: 90%;
height: 50px;
border: 2px solid #e8e8e8;
margin: 0 auto;
margin-bottom: 10px;
}
/* 滑块左边部分,绿色背景 */
#dragBg {
position: absolute;
background-color: #7ac23c;
width: 0px;
height: 100%;
}
/* 滑动验证容器文本 */
#dragText {
position: absolute;
width: 100%;
height: 100%;
/* 文字水平居中 */
text-align: center;
/* 文字垂直居中,这里不能用百分比,因为百分比是相对原始line-height的,而非div高度 */
line-height: 50px;
/* 文本不允许选中 */
user-select: none;
-webkit-user-select: none;
font-size: 14px;
}
/* 滑块 */
#dragHandler {
position: absolute;
width: 40px;
height: 100%;
cursor: move;
}
/* 滑块初始背景 */
.dragHandlerBg {
background: #fff no-repeat center url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA3hpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNS1jMDIxIDc5LjE1NTc3MiwgMjAxNC8wMS8xMy0xOTo0NDowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDo0ZDhlNWY5My05NmI0LTRlNWQtOGFjYi03ZTY4OGYyMTU2ZTYiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6NTEyNTVEMURGMkVFMTFFNEI5NDBCMjQ2M0ExMDQ1OUYiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6NTEyNTVEMUNGMkVFMTFFNEI5NDBCMjQ2M0ExMDQ1OUYiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTQgKE1hY2ludG9zaCkiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo2MTc5NzNmZS02OTQxLTQyOTYtYTIwNi02NDI2YTNkOWU5YmUiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6NGQ4ZTVmOTMtOTZiNC00ZTVkLThhY2ItN2U2ODhmMjE1NmU2Ii8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+YiRG4AAAALFJREFUeNpi/P//PwMlgImBQkA9A+bOnfsIiBOxKcInh+yCaCDuByoswaIOpxwjciACFegBqZ1AvBSIS5OTk/8TkmNEjwWgQiUgtQuIjwAxUF3yX3xyGIEIFLwHpKyAWB+I1xGSwxULIGf9A7mQkBwTlhBXAFLHgPgqEAcTkmNCU6AL9d8WII4HOvk3ITkWJAXWUMlOoGQHmsE45ViQ2KuBuASoYC4Wf+OUYxz6mQkgwAAN9mIrUReCXgAAAABJRU5ErkJggg==");
}
/* 验证成功时的滑块背景 有√*/
.dragHandlerOkBg {
background: #fff no-repeat center url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA3hpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNS1jMDIxIDc5LjE1NTc3MiwgMjAxNC8wMS8xMy0xOTo0NDowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDo0ZDhlNWY5My05NmI0LTRlNWQtOGFjYi03ZTY4OGYyMTU2ZTYiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6NDlBRDI3NjVGMkQ2MTFFNEI5NDBCMjQ2M0ExMDQ1OUYiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6NDlBRDI3NjRGMkQ2MTFFNEI5NDBCMjQ2M0ExMDQ1OUYiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTQgKE1hY2ludG9zaCkiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDphNWEzMWNhMC1hYmViLTQxNWEtYTEwZS04Y2U5NzRlN2Q4YTEiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6NGQ4ZTVmOTMtOTZiNC00ZTVkLThhY2ItN2U2ODhmMjE1NmU2Ii8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+k+sHwwAAASZJREFUeNpi/P//PwMyKD8uZw+kUoDYEYgloMIvgHg/EM/ptHx0EFk9I8wAoEZ+IDUPiIMY8IN1QJwENOgj3ACo5gNAbMBAHLgAxA4gQ5igAnNJ0MwAVTsX7IKyY7L2UNuJAf+AmAmJ78AEDTBiwGYg5gbifCSxFCZoaBMCy4A4GOjnH0D6DpK4IxNSVIHAfSDOAeLraJrjgJp/AwPbHMhejiQnwYRmUzNQ4VQgDQqXK0ia/0I17wJiPmQNTNBEAgMlQIWiQA2vgWw7QppBekGxsAjIiEUSBNnsBDWEAY9mEFgMMgBk00E0iZtA7AHEctDQ58MRuA6wlLgGFMoMpIG1QFeGwAIxGZo8GUhIysmwQGSAZgwHaEZhICIzOaBkJkqyM0CAAQDGx279Jf50AAAAAABJRU5ErkJggg==");
}
#drag {
width: 300px;
height: 40px;
line-height: 40px;
background-color: #e8e8e8;
position: relative;
margin: 0 auto;
}
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { LoginComponent } from './login.component';
describe('LoginComponent', () => {
let component: LoginComponent;
let fixture: ComponentFixture<LoginComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ LoginComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(LoginComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
<div id="dialogs">
<!--BEGIN dialog1-->
<div class="js_dialog" id="iosDialog1">
<div class="weui-mask"></div>
<div class="weui-dialog" style="width: 70%;">
<div class="weui-dialog__hd" *ngIf="dialogInfo.title"><strong
class="weui-dialog__title">{{dialogInfo.title}}</strong></div>
<div class="weui-dialog__bd" [ngStyle]="{'text-align':dialogInfo.content.align}">{{dialogInfo.content.value}}
</div>
<div class="weui-dialog__ft">
<a href="javascript:;" class="weui-dialog__btn" [ngClass]="footer.className"
*ngFor="let footer of dialogInfo.footer" (click)="sendInfo()">{{footer.value}}</a>
</div>
</div>
</div>
<!--END dialog1-->
</div>
\ No newline at end of file
a:hover.weui-dialog__ft{
color: #fff;
text-decoration: none;
}
\ No newline at end of file
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { AlertComponent } from './alert.component';
describe('AlertComponent', () => {
let component: AlertComponent;
let fixture: ComponentFixture<AlertComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ AlertComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(AlertComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
import {Component, EventEmitter, Input, OnInit, Output} from '@angular/core';
@Component({
selector: 'ydlife-alert',
templateUrl: './alert.component.html',
styleUrls: ['./alert.component.scss']
})
export class AlertComponent implements OnInit {
@Input() dialogInfo: any;
@Output() popInfo = new EventEmitter();
constructor() {
this.dialogInfo = {
title: null,
content: {value: '弹窗内容', align: 'center'},
footer: [{value: '我知道了', routerLink: '', className: 'weui-dialog__btn_primary'}],
};
}
ngOnInit() {
}
sendInfo() {
this.popInfo.emit();
}
}
<!--弹窗Starts-->
<div class="detailContent defineFixed" *ngIf="isOpen">
<!-- 其他应税项目模板-->
<div class="detailBox" *ngIf="application===2">
<div class="header">
<div></div>
<h5>其他加扣款</h5>
<div class="closeModal cursor" (click)="closeModal()">&times;</div>
</div>
<div class="totastContent">
<div class="subtitle">其它加扣款包括什么?可能包括如下收入:</div>
<ul>
<li>1. 季度销售加码奖金</li>
<li>2. 公司营销活动激励奖金</li>
<li>3. 银盾在线的保单销售佣金</li>
<li>4. 其它的可能收入或者扣款</li>
</ul>
</div>
</div>
<!-- 其他应税项目模板-->
<!--个人所得税政策模板-->
<div class="detailBox" *ngIf="application===1">
<div class="header">
<div></div>
<h5>个人所得税政策</h5>
<div class="closeModal cursor" (click)="closeModal()">&times;</div>
</div>
</div>
<div class="detailBox" *ngIf="application===3">
<div class="header">
<div></div>
<h5>代扣个人所得税/增值税/附加税(D)</h5>
<div class="closeModal cursor" (click)="closeModal()">&times;</div>
</div>
<div class="totastContent">
<div class="subtitle">关于代扣个人所得税/增值税/附加税</div>
<div style="margin-bottom: 10px;">
公司根据财政部和税务总局《关于个人所得税法修改后有关优惠政策衔接问题的通知》,
并接受税务机关委托代征税款,向个人保险经纪人支付佣金费用后,
代个人保险经纪人统一向主管国税机关申请汇总代开增值税发票。
</div>
<div style="margin-bottom: 10px;">
《通知》中关于保险营销员、证券经纪人佣金收入的政策:
</div>
<ul>
<li>1. 保险营销员、证券经纪人取得的佣金收入,属于劳务报酬所得。</li>
<li>2. 以不含增值税的收入减除20%的费用后的余额为收入额,收入额减去展业成本以及附加税费后,并入当年综合所得,计算缴纳个人所得税。</li>
<li>3. 保险营销员、证券经纪人展业成本按照收入额的25%计算。</li>
<li>4. 扣缴义务人向保险营销员、证券经纪人支付佣金收入时,应按照《个人所得税扣缴申报管理办法(试行)》(国家税务总局公告2018年第61号)规定的累计预扣法计算预扣税款。</li>
<li>5. 经纪人佣金做为个人收入按规定需要扣缴增值税。</li>
</ul>
</div>
</div>
</div>
<!--弹窗结束-->
.detailContent {
top: 0;
height: 100%;
background: rgba(0,0,0,.5);
z-index: 3004;
.detailBox {
position: absolute;
bottom: 0;
left: 0;
width: 100%;
// height: 70%;
background-color: #fff;
overflow-y: scroll;
animation: slowUp .5s ease both;
.header {
position: relative;
width: 100%;
height: 48px;
line-height: 48px;
padding-right: 15px;
display: flex;
justify-content: space-between;
align-items: center;
h5 {
font-size: 16px;
color: #000;
}
.closeModal {
color: #8a8a8a;
font-size: 32px;
}
}
.header:after {
position: absolute;
left: 0;
bottom: 1px;
width: 100%;
content: '';
height: 1px;
background-color: #dcdcdc;
transform: scaleY(0.5);
}
.totastContent{
padding: 10px;
.subtitle{
font-size: 16px;
height: 40px;
line-height: 40px;
}
ul li{
margin-bottom: 5px;
}
}
h4 {
color: #ec2d37;
font-weight: bold;
}
.body {
padding: 10px 15px 0 15px;
> ul {
> li {
height: 34px;
line-height: 34px;
letter-spacing: 1px;
display: flex;
justify-content: space-between;
}
}
}
}
}
.defineFixed{
position: fixed;
left: 0;
right: 0;
min-width: 320px;
max-width: 640px;
width: 100%;
margin: 0 auto;
}
\ No newline at end of file
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { DetailModalComponent } from './detail-modal.component';
describe('DetailModalComponent', () => {
let component: DetailModalComponent;
let fixture: ComponentFixture<DetailModalComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ DetailModalComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(DetailModalComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
import { Component, OnInit, Input, Output,EventEmitter } from '@angular/core';
@Component({
selector: 'ydlife-detail-modal',
templateUrl: './detail-modal.component.html',
styleUrls: ['./detail-modal.component.scss']
})
export class DetailModalComponent implements OnInit {
// application:1其他应税项目,2为个人所得税政策
@Input() application: number;
@Output() closeDetailModal = new EventEmitter();
isOpen: boolean;
constructor() {
this.isOpen = true;
}
ngOnInit() {
}
// 关闭弹窗
closeModal() {
this.isOpen = false;
this.closeDetailModal.emit();
}
}
<div class="guidePageContainer" (click)="closeGuidePage()">
<div class="guideTips">
<p>请点击右上角菜单</p>
<p>{{eNoticeId ? '分享给客户' :'分享给朋友'}}</p>
</div>
<i class="iconfont icon-yindaojiantou"></i>
</div>
.guidePageContainer {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.8);
color: #fff;
display: flex;
justify-content: center;
.guideTips {
margin-top: 35%;
letter-spacing: 3px;
text-align: center;
font-size: 22px;
}
.iconfont {
position: absolute;
right: 8%;
font-size: 40px;
top: 2px;
font-weight: 700;
}
}
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { GuidePageComponent } from './guide-page.component';
describe('GuidePageComponent', () => {
let component: GuidePageComponent;
let fixture: ComponentFixture<GuidePageComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ GuidePageComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(GuidePageComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
import { Component, OnInit } from '@angular/core';
import { LifeCommonService } from "../life-common.service";
@Component({
selector: 'ydlife-guide-page',
templateUrl: './guide-page.component.html',
styleUrls: ['./guide-page.component.scss']
})
export class GuidePageComponent implements OnInit {
eNoticeId:string;
constructor(private lifeCommonService: LifeCommonService) {
}
ngOnInit() {
// 判断是分享给客户还是分享给朋友
this.eNoticeId = sessionStorage.getItem('eNoticeId');
setTimeout(() => {
this.closeGuidePage();
}, 6000);
}
closeGuidePage() {
this.lifeCommonService.shareStatusPublish(0);
}
}
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { AlertComponent } from './alert/alert.component';
import { FormsModule } from "@angular/forms";
import { GuidePageComponent } from './guide-page/guide-page.component';
import { SafeHtmlPipe } from './safe-html.pipe';
@NgModule({
declarations: [AlertComponent, GuidePageComponent, SafeHtmlPipe],
imports: [
CommonModule,
FormsModule
],
exports: [
FormsModule,
AlertComponent,
GuidePageComponent,
SafeHtmlPipe
]
})
export class LifeCommonModule {
}
import { TestBed } from '@angular/core/testing';
import { LifeCommonService } from './life-common.service';
describe('LifeCommonService', () => {
beforeEach(() => TestBed.configureTestingModule({}));
it('should be created', () => {
const service: LifeCommonService = TestBed.get(LifeCommonService);
expect(service).toBeTruthy();
});
});
<div class="">
<div class="weui-mask weui-animate-fade-in"></div>
<div class="weui-picker weui-animate-slide-up">
<div class="weui-picker__hd">
<span>{{title}}</span>
<a href="javascript:;" data-action="cancel" class="weui-picker__action" (click)="cancel()">取消</a>
</div>
<div class="weui-picker__bd">
<div class="weui-picker__content" *ngIf="!provinceId">
<div class="cursor weui-picker__item borderBottom" *ngFor="let provinceList of provinceLists"
(click)="selectProvince(provinceList.provinceId,provinceList.provinceName)">{{provinceList.provinceName}}
</div>
</div>
<div class="weui-picker__content" *ngIf="provinceId && !cityId">
<div class="cursor weui-picker__item borderBottom" *ngFor="let cityList of cityLists"
(click)="selectCity(cityList.cityId,cityList.cityName)">{{cityList.cityName}}
</div>
</div>
<div class="weui-picker__content" *ngIf="provinceId && cityId && !districtId">
<div class="cursor weui-picker__item borderBottom" *ngFor="let districtList of districtLists"
(click)="selectDistrict(districtList.districtId,districtList.districtName)">{{districtList.districtName}}
</div>
</div>
</div>
</div>
</div>
\ No newline at end of file
.weui-mask {
position: fixed;
z-index: 1000;
top: 0;
right: 0;
left: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.6);
}
.weui-animate-fade-in {
-webkit-animation: fadeIn ease .3s forwards;
animation: fadeIn ease .3s forwards;
}
@keyframes fadeIn {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
.weui-picker {
position: fixed;
width: 100%;
max-width: 640px;
left: 0;
right: 0;
bottom: 0;
z-index: 5000;
margin: 0 auto;
background-color: #fff;
-webkit-backface-visibility: hidden;
backface-visibility: hidden;
-webkit-transform: translate(0, 100%);
transform: translate(0, 100%);
-webkit-transition: -webkit-transform .3s;
transition: -webkit-transform .3s;
transition: transform .3s;
}
@keyframes slideUp {
from {
transform: translate3d(0, 100%, 0);
}
to {
transform: translate3d(0, 0, 0);
}
}
.weui-animate-slide-up {
animation: slideUp ease .3s forwards;
}
.weui-picker__hd {
display: -webkit-box;
display: -webkit-flex;
display: flex;
padding: 16px;
position: relative;
text-align: center;
font-size: 17px;
line-height: 1.4;
.weui-picker__action {
display: block;
-webkit-box-flex: 1;
-webkit-flex: 1;
flex: 1;
color: #108ee9;
}
.weui-picker__action:last-child {
text-align: right;
}
}
.weui-picker__hd:after {
content: " ";
position: absolute;
left: 0;
bottom: 0;
right: 0;
height: 1px;
border-bottom: 1px solid rgba(0, 0, 0, 0.1);
color: rgba(0, 0, 0, 0.1);
-webkit-transform-origin: 0 100%;
transform-origin: 0 100%;
-webkit-transform: scaleY(0.5);
transform: scaleY(0.5);
}
.weui-picker__bd {
display: -webkit-box;
display: -webkit-flex;
display: flex;
position: relative;
background-color: #fff;
height: 240px;
overflow: auto;
.weui-picker__content {
width: 100%;
padding-bottom: 90px;
height: auto;
overflow-y: scroll;
-webkit-overflow-scrolling: touch;
.weui-picker__item {
height: 50px;
line-height: 50px;
padding: 0 15px;
}
}
}
\ No newline at end of file
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { PickerComponent } from './picker.component';
describe('PickerComponent', () => {
let component: PickerComponent;
let fixture: ComponentFixture<PickerComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ PickerComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(PickerComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
import { Component, OnInit, Output, Input, EventEmitter } from '@angular/core';
@Component({
selector: 'ydlife-picker',
templateUrl: './picker.component.html',
styleUrls: ['./picker.component.scss']
})
export class PickerComponent implements OnInit {
@Input() provinceLists: Array<any>;
// 地址选择到区还是市 ,省为1,市为2,区为3
@Input() limitStep: number;
@Output() selectedArea = new EventEmitter();
cityLists: Array<any>;
districtLists: Array<any>;
provinceId: any;
districtId: any;
cityId: any;
title: any;
area: any;
isNeedDistrict: boolean = true;
areaLimitStep: number;
isNeedCity: boolean = true;
isNeedProvince: boolean = true;
constructor() {
this.title = '选择省份';
this.area = {
province: { id: null, value: null },
city: { id: null, value: null },
district: { id: null, value: null }
}
}
ngOnInit() {
if (this.isNeedDistrict) {
this.areaLimitStep = 3;
} else if (this.isNeedCity) {
this.areaLimitStep = 2;
} else if (this.isNeedProvince) {
this.areaLimitStep = 1;
} else {
this.areaLimitStep = 3;
}
}
// 选择省份
selectProvince(provinceId, provinceName) {
this.area.province.value = provinceName;
this.area.province.id = this.provinceId = provinceId;
this.cityLists = this.provinceLists.filter(item => item.provinceId === provinceId).pop().citys;
this.title = '选择城市';
if (this.limitStep === 1) {
this.selectedArea.emit(this.area);
return;
}
}
// 选择城市
selectCity(cityId, cityName) {
this.area.city.value = cityName;
this.area.city.id = this.cityId = cityId;
this.title = '选择地区';
if (this.limitStep === 2) {
this.selectedArea.emit(this.area);
return;
}
this.districtLists = this.cityLists.filter(item => item.cityId === cityId).pop().districtItem;
if (!this.districtLists) {
this.selectedArea.emit(this.area);
}
}
// 选择地区
selectDistrict(districtId, districtName) {
this.area.district.value = districtName;
this.area.district.id = this.districtId = districtId;
this.selectedArea.emit(this.area);
}
// 取消
cancel() {
this.selectedArea.emit();
}
}
import { SwitchNumberPipe } from './switch-number.pipe';
describe('SwitchNumberPipe', () => {
it('create an instance', () => {
const pipe = new SwitchNumberPipe();
expect(pipe).toBeTruthy();
});
});
import { Pipe, PipeTransform } from '@angular/core';
@Pipe({
name: 'switchNumber'
})
export class SwitchNumberPipe implements PipeTransform {
transform(value: any, args?: any): any {
if ((value + "").trim() == "") {
return "";
}
if (typeof value == 'string') {
value = value.replace(/,/gi, '');
}
if ((value + "").trim() == "") {
return "";
}
if (isNaN(value)) {
return "";
}
value = value + "";
if (/^.*\..*$/.test(value)) {
let pointIndex = value.lastIndexOf(".");
let intPart = value.substring(0, pointIndex);
let pointPart = value.substring(pointIndex + 1, value.length);
intPart = intPart + "";
const re = /(-?\d+)(\d{3})/
while (re.test(intPart)) {
intPart = intPart.replace(re, "$1,$2")
}
value = intPart + "." + pointPart;
} else {
value = value + "";
var re = /(-?\d+)(\d{3})/
while (re.test(value)) {
value = value.replace(re, "$1,$2")
}
}
return value;
}
}
import { SafeHtmlPipe } from './safe-html.pipe';
describe('SafeHtmlPipe', () => {
it('create an instance', () => {
const pipe = new SafeHtmlPipe();
expect(pipe).toBeTruthy();
});
});
import { Pipe, PipeTransform } from '@angular/core';
import {DomSanitizer} from "@angular/platform-browser";
@Pipe({
name: 'safeHtml'
})
export class SafeHtmlPipe implements PipeTransform {
constructor(private sanitized: DomSanitizer) {
}
transform(value: any, args?: any): any {
return this.sanitized.bypassSecurityTrustHtml(value);
}
}
import {
trigger, // 动画封装触发,外部的触发器
state, // 转场状态控制
style, // 用来书写基本的样式
transition, // 用来实现css3的 transition
animate, // 用来实现css3的animations
keyframes // 用来实现css3 keyframes的
} from '@angular/animations';
export const fadeIn = trigger('fadeIn', [
state('in', style({ display: 'none' })), // 默认元素不展开
state('out', style({ display: 'block' })),
// transition('in => out', animate('.5s .2s ease-out')),
// transition('out => in', animate('.5s .2s ease-in')),
// transition('in <=> out', animate('.5s .2s ease-in'))
transition('in => out', [ // 进场动画
animate(300, keyframes([
style({ height: '0', opacity: 0, offset: 0 }), // 元素高度0,元素隐藏(透明度为0),动画帧在0%
style({ height: '*', opacity: 1, offset: 1 }) // 200ms后高度自适应展开,元素展开(透明度为1),动画帧在100%
]))
]),
transition('out=> in', [
animate(300, keyframes([
style({ height: '*', opacity: 1, offset: 0 }), // 与之对应,让元素从显示到隐藏一个过渡
style({ height: '0', opacity: 0, offset: 1 })
]))
])
]);
<div id="toast" *ngIf="toastHidden">
<div class="weui-mask_transparent"></div>
<div class="weui-toast">
<!--<i class="weui-icon_toast icon icon-checkmark-rounded" [ngClass]="{'icon-additional':toastInfo.status===0}"></i>-->
<p class="weui-toast__content" [ngStyle]="{'text-align':toastInfo.align}">{{toastInfo.msg}}</p>
</div>
</div>
\ No newline at end of file
.weui-mask_transparent {
position: fixed;
z-index: 1000;
top: 0;
right: 0;
left: 0;
bottom: 0;
}
.weui-toast {
position: fixed;
z-index: 5000;
width: 16.8em;
height: 60px;
padding: 0 0.7em;
left: 50%;
background: rgba(17, 17, 17, 0.7);
text-align: justify;
border-radius: 5px;
color: #FFFFFF;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
.weui-toast__content {
width: 100%;
word-break: break-all;
text-align: justify;
}
.weui-icon_toast {
margin: 22px 0 0;
display: block;
}
.icon-checkmark-rounded:before {
color: #fff;
font-size: 34px;
display: block;
margin-bottom: 10px;
}
.icon-additional:before {
transform: rotate(38deg);
}
}
\ No newline at end of file
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { ToastComponent } from './toast.component';
describe('ToastComponent', () => {
let component: ToastComponent;
let fixture: ComponentFixture<ToastComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ ToastComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(ToastComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
import { Component, OnInit, Input, OnChanges } from '@angular/core';
import { Router } from "@angular/router";
@Component({
selector: 'ydlife-toast',
templateUrl: './toast.component.html',
styleUrls: ['./toast.component.scss']
})
export class MyToastComponent implements OnInit {
@Input() toastInfo: any;
@Input() routerLink: any;
toastHidden: boolean;
constructor(private router: Router) {
// autoHidden 是否自动消失
this.toastInfo = {
status: 1,
msg: '已完成',
timeout: 3000,
autoHidden: 1,
align: 'justify'
};
this.toastHidden = true;
}
ngOnInit() {
if (this.toastInfo.autoHidden == 0) {
if (this.routerLink) {
this.toastHidden = false;
this.router.navigate(['/' + this.routerLink]);
}
} else {
setTimeout(() => {
this.toastHidden = false;
if (this.routerLink) {
this.router.navigate(['/' + this.routerLink]);
}
}, this.toastInfo.timeout)
}
}
ngOnChanges() {
this.toastHidden = true;
setTimeout(() => {
this.toastHidden = false;
if (this.routerLink) {
this.router.navigate(['/' + this.routerLink]);
}
}, this.toastInfo.timeout)
}
}
import {Directive, ElementRef, OnInit, HostListener} from '@angular/core';
import {Router} from '@angular/router';
@Directive({
selector: '[appDrag]'
})
export class DragDirective implements OnInit {
isDown = false;
cur: any = {
x: 0,
y: 0
}; // 记录鼠标点击事件的位置
disX: number; // 鼠标移动的X轴距离
disY: number; // 鼠标移动的Y轴距离
offsetX: number; // 元素的左偏移量
offsetY: number; // 元素的上偏移量
pageX: number; // 当前页面的X轴距离
pageY: number; // 当前页面的Y轴距离
x: number; // 元素移动之后的X轴位置
y: number; // 元素移动之后的Y轴位置
constructor(public el: ElementRef, private router: Router) {
}
// 点击事件
@HostListener('touchstart', ['$event'])
ontouchstart(event) {
this.start(event);
}
// 监听document移动事件事件
@HostListener('document:touchmove', ['$event'])
ontouchmove(event) {
// 判断该元素是否被点击了。
this.move(event)
}
// 监听document离开事件
@HostListener('document:touchend', ['$event'])
ontouchend(event) {
// 只用当元素移动过了,离开函数体才会触发。
this.end();
}
@HostListener('mouseup', ['$event'])
onMouseup(event) {
// 只用当元素移动过了,离开函数体才会触发。
this.router.navigate(['/']);
}
ngOnInit() {
}
// 点击开始移动
start(event) {
this.isDown = true;
let touch;
if (event.touches) {
touch = event.touches[0];
} else {
touch = event;
}
this.disX = this.disY = 0;
this.cur.x = touch.clientX;
this.cur.y = touch.clientY;
this.pageX = document.body.clientWidth;
this.pageY = document.body.clientHeight;
this.offsetX = this.el.nativeElement.offsetLeft;
this.offsetY = this.el.nativeElement.offsetTop;
}
// 移动
move(event) {
// 阻止页面的滑动默认事件
event.preventDefault();
if (this.isDown) {
let touch;
if (event.touches) {
touch = event.touches[0];
} else {
touch = event;
}
this.disX = touch.clientX - this.cur.x;
this.disY = touch.clientY - this.cur.y;
this.x = this.offsetX + this.disX;
this.y = this.offsetY + this.disY;
if (this.x < 0) {
this.x = 0
}
if (this.x > document.body.clientWidth - 60) {
this.x = document.body.clientWidth - 60;
}
if (this.y < 0) {
this.y = 0
}
if (this.y > document.body.clientHeight - 120) {
this.y = document.body.clientHeight - 120;
}
this.el.nativeElement.style.left = this.x + 'px';
this.el.nativeElement.style.top = this.y + 'px';
}
}
// 鼠标释放
end() {
this.isDown = false;
if (this.disX !== 0 || this.disY !== 0) {
if (parseInt(this.el.nativeElement.style.left, 0) < document.body.clientWidth / 2) {
this.el.nativeElement.style.left = '0px';
} else {
this.el.nativeElement.style.left = 'calc(100% - 70px)';
}
return;
} else {
// 阻止点透事件
setTimeout(() => {
this.router.navigate(['/'])
}, 300)
}
}
}
export class BusinessQuery {
constructor(
public opportunityId?: any,
public age?: any,
public name?: string,
public gender?: any,
public mobileNo?: string,
public weChat?: string,
public otherContacts?: string,
public sourceChannel?: string,
public address?: string,
public opportunityDate?: string,
public opportunityCustomerTags?: any,
public zodiacTypeId?: any,
public zodiacType?: any,
public bloodTypeId?: any,
public bloodType?: any,
public fyp?: any,
public fyc?: any,
public pieces?: any,
public remark?: any,
public assignedPractitionerId?: any,
public sourceFrom?: any,
public timeToClose?: any,
public leadsAssignedId?: any,
public expertType?: any,
public expertPractitionerId?: any,
public expertPractitionerName?: any,
public mdDropOptionName?: any
) {
}
}
export class EmployBasicQuery {
constructor(
public id?:number,
public name?:string,
public mobileNo?:number,
public idTypeId?:number,
public idType?:string,
public idNo?:any,
//1=Male, 2=Female
public gender?:string,
public practitionerBirthdate?:string,
public provinceId?:number,
public provinceName?:string,
public cityId?:number,
public cityName?:string,
public residentAddress?:string,
public wechatId?:number,
public email?:string
) {
}
}
\ No newline at end of file
export class EmployQuery {
constructor(
public name?:string,
public loginId?:any,
public hiringBasicInfoId?:number,
public practitionerPotentialId?:number,
public mdDropOptionId?:number,
public mdDropOptionName?:string,
public mentorPractitionerId?:number,
public mentor?:string,
public introducerPractitionerId?:number,
public introducer?:string,
public subsystemId?:number,
public subsystem?:string,
public subsystemOwnerId?:number,
public subsystemOwner?:string,
public branchId?:number,
public branch?:string
) {
}
}
\ No newline at end of file
export class ExperienceQuery {
constructor(
public workingCompany?:string,
public position?:string,
public workingStart?:string,
public workingEnd?:string,
) {
}
}
\ No newline at end of file
export class LocalStorage {
public localStorage: any;
constructor() {
if (!localStorage) {
throw new Error('Current browser does not support Local Storage');
}
this.localStorage = localStorage;
}
public set(key: string, value: string): void {
this.localStorage[key] = value;
}
public get(key: string): string {
return this.localStorage[key] || false;
}
public setObject(key: string, value: any): void {
this.localStorage[key] = JSON.stringify(value);
}
public getObject(key: string): any {
return JSON.parse(this.localStorage[key] || '{}');
}
public remove(key: Array<string>): any {
let m = 0;
let status = false;
key.map(i => {
this.localStorage.removeItem(i);
m++;
status = m === key.length;
});
return status;
}
}
// export const LOCAL_STORAGE_PROVIDERS:any[] = [
// Provider(LocalStorage, {useClass: LocalStorage})
// ];
export class NameAge {
id?: number;
name?: string;
age?: number;
birthDay?: string;
gender?: string;
}
export class Plans {
planName?: string;
productName?: string;
companyName?: string;
companyDesc?: string;
labels?: Array<any>;
price?: number;
planId?: number;
companyLogoPath?: string;
iconPath?: string;
customerServicePhone?: string;
type?: number;
minDay?: number;
maxDay?: number;
minAge?: number;
maxAge?: number;
defaultBirth?: string;
isSocialInsured?: string;
adultCount?: number;
childCount?: number;
eldCount?: number;
dayCount?: number;
insurerId?: string;
planCategoryId?: number;
planPara?: any;
holderPara?: any;
insuredPara?: any;
quotePara?: any;
subjectPara?: any;
vehiclePara?: any;
feedbackCount?: any;
productCategoryId?: any;
productId?: any;
noPlanProduct?: boolean;
needIdCard?: string;
isActiveForProduct?: number;
isActiveForPlan?: number;
isActive?:any;
isThirdPartyPurchase?:any;
thirdPartyPurchaseUrl?:any;
isThirdpartyPurchase?:any;
thirdpartyPurchaseUrl?:any;
}
export class RecruitingQuery {
constructor(
public name?: string,
public gender?: any,
public age?: string,
public mobileNo?: string,
public wechatId?: string,
public qqId?: string,
public othersContacts?: string,
public educationLevel?: string,
public resourceDropMasterId?: string,
public remark?: string,
public ossPathResume?: string,
public operateUserId?: string,
public potentialId?: any,
public practitionerId?: any,
public createdAt?: any,
public timeToOnboarding?: any
) {
}
}
\ No newline at end of file
export class SettingInfo {
constructor(
public bioIntro?: any,
public headImgUrl?: any,
public lifeImgUrls?: any,
public practitionerId?: any,
public wxQRImgUrl?: any,
public isMobileShow?: any,
public isNameShow?: any
) {
}
}
export class TrackQuery {
constructor(
public practitionerId?:string,
public notice?:string,
public taskType?:number,
//关联商机id
public referLeadsId?:string,
//关联增员id
public referPotentialId?:string,
public taskImportantTag?:any,
public isActive?:any,
public taskTimeFrom?:Array<any>,
public taskTimeEnd?:Array<any>,
//任务长期固定
public taskRoutineAtweek7?:number,
public taskRoutineAtweek6?:number,
public taskRoutineAtweek5?:number,
public taskRoutineAtweek4?:number,
public taskRoutineAtweek3?:number,
public taskRoutineAtweek2?:number,
public taskRoutineAtweek1?:number,
//经纪人商机对应的客户id
public customerId?:string,
public mdDropOptionId?:string,
public trackScore?:string,
//日程时间
public trackTime?:string
) {
}
}
export class User {
constructor(public dayCount?: any,
public adultCount?: any,
public childCount?: any,
public eldCount?: any,
public level?: any,
public destinationType?: any,
public destinationId?: any,
public destinationName?: any,
public levelCodeForBuilding?: any,
public productId?: any,
public planId?: any) {
}
}
export class WxConfig {
appId: string;
timestamp: string;
nonceStr: string;
signature: string;
jsApiList: any;
}
import { Injectable } from '@angular/core';
import {
HttpEvent, HttpInterceptor, HttpHandler, HttpRequest
} from '@angular/common/http';
import { Observable } from "rxjs/index";
import { tap } from "rxjs/internal/operators";
@Injectable()
export class AuthInterceptor implements HttpInterceptor {
intercept(req: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> {
const authReq = req.clone({
headers: req.headers.set('X-Authorization', localStorage.getItem('lifeToken') ? localStorage.getItem('lifeToken') : ''),
setHeaders: { 'Content-Type': 'application/json' }
});
return next.handle(authReq)
.pipe(
tap(
event => { },
error => {
if (error.status === 401) {
let { search, href } = window.location;
href = href.replace(/&?t_reload=(\d+)/g, '');
window.location.href = href + (search ? '&' : '?') + 't_reload=' + new Date().getTime();
}
}
)
);
}
}
/* "Barrel" of Http Interceptors */
import { HTTP_INTERCEPTORS } from '@angular/common/http';
import { AuthInterceptor } from './auth-interceptor';
import { TrimNameInterceptor } from './trim-name-interceptor';
/** Http interceptor providers in outside-in order */
export const httpInterceptorProviders = [
{ provide: HTTP_INTERCEPTORS, useClass: TrimNameInterceptor, multi: true },
{ provide: HTTP_INTERCEPTORS, useClass: AuthInterceptor, multi: true }
];
/**
* Created by Sweet on 2019/12/5.
*/
import { Injectable } from '@angular/core';
import {
HttpEvent, HttpInterceptor, HttpHandler, HttpRequest
} from '@angular/common/http';
import { Observable } from 'rxjs';
@Injectable()
export class TrimNameInterceptor implements HttpInterceptor {
intercept(req: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> {
const body = req.body;
if (!body || !body.name ) {
return next.handle(req);
}
// copy the body and trim whitespace from the name property
const newBody = { ...body, name: body.name.trim() };
// clone request and set its body
const newReq = req.clone({ body: newBody });
// send the cloned request to the next handler.
return next.handle(newReq);
}
}
<div class="todo_wrapper">
<!-- <div Button (onClick)="showAlert()">customized buttons</div> -->
<div class="top">
<div class="head">
<h3 (click)="goBack()" style="position: absolute;left: 10px;">&lt;</h3>
<h3>新建日程</h3>
<div></div>
<!-- <div id="add_calendar_wrapper">
<List className="calendar-list" style="backgroundColor: 'white'">
<ListItem (onClick)="clickCalendar()">
{{this.state.en ? '日历' : '日历'}}
</ListItem>
</List>
<Calendar [(ngModel)]="this.state.date"
[visible]="this.state.show"
[getDateExtra]="this.state.getDateExtra"
[defaultDate]="this.state.now"
[pickTime]="this.state.pickTime"
[type]="this.state.type"
[rowSize]="this.state.rowSize"
[showShortcut]="this.state.showShortcut"
[infinite]="this.state.infinite"
[defaultValue]="this.state.defaultValue"
[onSelect]="this.state.onSelect"
(onCancel)="triggerCancel()"
(onConfirm)="triggerConfirm($event)"
></Calendar>
</div> -->
</div>
<ul class="nav">
<li *ngFor="let tabItem of tabList;index as i;" [ngClass]="{'selected':tabItem.code === tabType}" (click)="selectTab(tabItem.code,tabItem.taskType)">
<span> {{tabItem.name}} </span>
</li>
</ul>
</div>
<div class="task_content_wrapper">
<div class="part_wrapper part1">
<ul class="part1_list">
<ng-container *ngFor="let salesActivityItem of salesActivityList">
<li [ngClass]="{'selected':addTrack.mdDropOptionId==salesActivityItem.id}" (click)="selectTask(salesActivityItem.id);"
*ngIf="(addTrack.taskType == 1 && salesActivityItem.id != '102') || (addTrack.taskType == 2 && salesActivityItem.id != '114' && salesActivityItem.id != '113') || (addTrack.taskType == 3)">
<span class="dot" *ngIf="(addTrack.mdDropOptionId==salesActivityItem.id && addTrack.referLeadsId) || (addTrack.mdDropOptionId==salesActivityItem.id && addTrack.referPotentialId)"
style="width: 5px;height: 5px;background: red;border-radius: 50%;position: absolute;right: 0;top: -5px;"></span> {{salesActivityItem.dropOptionName}}
</li>
</ng-container>
</ul>
</div>
<div class="part_wrapper part2">
<div style="display: flex;justify-content: space-between;">
<div style="font-size: 18px;">选择任务需要的时间</div>
<div class="important_mark">
<span [ngClass]="{'circle':addTrack.taskImportantTag==true}" (click)="addTrack.taskImportantTag=!addTrack.taskImportantTag"></span>
<div>重要标签</div>
</div>
</div>
<div class="timeContent">
<div class="picker_list">
<PickerView [data]="seasons" [cols]='3' [cascade]="false" [ngModel]="addTrack.taskTimeFrom" [indicatorStyle]="{'background':'#f6f6f6','border-radius':'50px','z-index':'0'}" (ngModelChange)="onChange($event,1)"></PickerView>
</div>
<div style="color: #d9dadc;width: 10%;text-align: center;"></div>
<div class="picker_list">
<PickerView [data]="seasons" [cascade]="false" [cols]='3' [ngModel]="addTrack.taskTimeEnd" [indicatorStyle]="{'background':'#f6f6f6','border-radius':'50px','z-index':'0'}" (ngModelChange)="onChange($event,2)"></PickerView>
</div>
</div>
</div>
<div class="part_wrapper part3" *ngIf="tabType == 'pep_schedule_task_others'">
<div style="margin-bottom: 10px;">任务长期固定在:</div>
<ul class="part3_list">
<li [ngClass]="{'selectedLongTerm':addTrack.taskRoutineAtweek1 == 1}" (click)="selectIsLongTermTask(1);">
<span></span>
<div>周一</div>
</li>
<li [ngClass]="{'selectedLongTerm':addTrack.taskRoutineAtweek2 == 1}" (click)="selectIsLongTermTask(2);">
<span></span>
<div>周二</div>
</li>
<li [ngClass]="{'selectedLongTerm':addTrack.taskRoutineAtweek3 == 1}" (click)="selectIsLongTermTask(3);">
<span></span>
<div>周三</div>
</li>
<li [ngClass]="{'selectedLongTerm':addTrack.taskRoutineAtweek4 == 1}" (click)="selectIsLongTermTask(4);">
<span></span>
<div>周四</div>
</li>
<li [ngClass]="{'selectedLongTerm':addTrack.taskRoutineAtweek5 == 1}" (click)="selectIsLongTermTask(5);">
<span></span>
<div>周五</div>
</li>
<li [ngClass]="{'selectedLongTerm':addTrack.taskRoutineAtweek6 == 1}" (click)="selectIsLongTermTask(6);">
<span></span>
<div>周六</div>
</li>
<li [ngClass]="{'selectedLongTerm':addTrack.taskRoutineAtweek7 == 1}" (click)="selectIsLongTermTask(7);">
<span></span>
<div>周天</div>
</li>
</ul>
</div>
<div class="part_wrapper part4" >
<div style="font-size: 18px;margin-bottom: 10px;">添加备注</div>
<textarea style="border:0;border-radius:5px;background:#f6f6f6;width: 100%;height: 100px;padding: 10px;resize: none;" [(ngModel)]="addTrack.notice"></textarea>
</div>
</div>
</div>
<div class="footer" (click)="clickAddTask()">添加任务</div>
<!-- <div class="link_totast_wrapper" *ngIf="linkToastFlag">
<div class="link_mask"></div>
<div class="link_totast_content_wrapper">
<div class="link_content">
<div class="close" (click)="linkToastFlag=false;">X</div>
<div class="link_body">
<div class="title">
是否联系到{{totastTitle}}
</div>
<div class="sub_title"></div>
</div>
<div class="link_footer">
<div style="border-right: 1px #d1d1d1 solid;" (click)="linkToastFlag=false;">否</div>
<div style="color: #f8002e;" (click)="jumpToLink()">是</div>
</div>
</div>
</div>
</div> -->
ul,ol{
list-style: none;
}
.todo_wrapper{
background: #fff;
padding-bottom: 60px;
.top{
.head{
display: flex;
height: 45px;
justify-content: center;
align-items: center;
padding: 0 8px;
}
.nav{
display: flex;
justify-content: space-between;
align-items: center;
border-bottom: 1px #eeeeee solid;
li{
text-align: center;
height: 40px;
line-height: 40px;
font-size: 18px;
width: 30%;
span{
display: inline-block;
height: 40px;
line-height: 40px;
}
}
li.selected{
span{
color: #f8002e;
border-bottom: 2px #f8002e solid;
}
}
}
}
.task_content_wrapper{
.part_wrapper{
margin-top: 15px;
position: relative;
padding: 0 4%;
ul{
display: flex;
flex-wrap: wrap;
}
ul.part1_list{
li{
width: 31%;
text-align: center;
height: 35px;
line-height: 35px;
background: #f6f6f6;
border-radius: 10px;
margin:5px 1%;
position: relative;
}
li.selected{
background: #1b5b99;
color: #fff;
}
}
.important_mark{
font-size: 12px;
color: #a0a0a0;
display: flex;
align-items: center;
span{
width: 15px;
height: 15px;
border-radius: 50%;
border: 1px #8d92ad solid;
margin-right: 5px;
}
span.circle{
background: #f8002e;
border: none;
}
}
.timeContent{
display: flex;
justify-content: space-evenly;
align-items: center;
height: 100px;
overflow: hidden;
.picker_list{
width: 35%;
}
}
ul.part3_list{
li{
width: 25%;
text-align: center;
display: flex;
align-items: center;
span{
width: 15px;
height: 15px;
border: 1px #787e9e solid;
margin-right: 10%;
}
}
li.selectedLongTerm{
span{
background: #1b5b99;
}
}
}
}
}
}
.footer{
width: 100%;
min-width: 320px;
max-width: 640px;
height: 55px;
line-height: 55px;
background: #1b5b99;
color: #fff;
text-align: center;
position: fixed;
bottom: 0;
font-size: 20px;
font-weight: bold;
}
.link_totast_wrapper{
.link_mask{
position: fixed;
top: 0;
right: 0;
left: 0;
bottom: 0;
height: 100%;
z-index: 2001;
background-color: rgba(0,0,0,.4);
}
.link_totast_content_wrapper{
position: fixed;
overflow: auto;
top: 0;
right: 0;
bottom: 0;
left: 0;
height: 100%;
z-index: 2001;
-webkit-overflow-scrolling: touch;
outline: 0;
display: -webkit-flex;
display: flex;
-webkit-align-items: center;
align-items: center;
-webkit-justify-content: center;
justify-content: center;
-webkit-transform: translateZ(1px);
transform: translateZ(1px);
.link_content{
width: 270px;
position: relative;
background-color: #fff;
border: 0;
background-clip: padding-box;
text-align: center;
height: auto;
overflow: hidden;
border-radius: 7px;
padding-top: 15px;
.close{
background: transparent;
filter: alpha(opacity=100);
opacity: 1;
top: -15px;
right: 5px;
position: relative;
}
.link_body{
.title{
padding: 10px 15px 20px 15px;
}
}
.link_footer{
display: flex;
height: 50px;
line-height: 50px;
border-top: 1px #d1d1d1 solid;
justify-content: space-around;
div{
font-size: 14px;
width: 50%;
}
}
}
}
}
\ No newline at end of file
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { AddTaskComponent } from './add-task.component';
describe('AddTaskComponent', () => {
let component: AddTaskComponent;
let fixture: ComponentFixture<AddTaskComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ AddTaskComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(AddTaskComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
<div class="wrapper">
<div class="headWrapper">
<div class="title" style="color: #333;">
{{titleDeatil}}
</div>
<div class="announcement_at_top">
<!-- 上海银盾保险经纪有限公司&nbsp;&nbsp; -->
发布日期:{{announcementLists?.announcementAt}}
</div>
</div>
<div class="announcementItem">
<div class="announcement_title">
<!-- <span class="announcement_type">【{{announcementLists?.announcementTypeName}}】</span> -->
<!-- <span [innerHtml]="announcementLists?.title |safeHtml"></span> -->
</div>
<div [innerHtml]="announcementLists?.content | safeHtml" class="announcement_content rich_media_content"></div>
<!-- <div class="announcement_at">上海银盾保险经纪有限公司 &nbsp;&nbsp;{{announcementLists?.announcementAt}}</div> -->
</div>
</div>
\ No newline at end of file
.wrapper{
padding: 10px 8px;
.headWrapper{
.title{
text-align: center;
font-size: 24px;
}
.announcement_at_top{
color: #8d9599;
}
}
.announcementItem {
padding: 10px 0;
.announcement_type {
color: #ff3500;
}
.announcement_at {
display: flex;
justify-content: flex-end;
margin-top: 20px;
}
}
}
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { AnnouncementDetailComponent } from './announcement-detail.component';
describe('AnnouncementDetailComponent', () => {
let component: AnnouncementDetailComponent;
let fixture: ComponentFixture<AnnouncementDetailComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ AnnouncementDetailComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(AnnouncementDetailComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
import { Component, OnInit } from '@angular/core';
import { MyService } from "../my.service";
import { ActivatedRoute } from '@angular/router';
import { LifeCommonService } from '../../common/life-common.service';
@Component({
selector: 'ydlife-announcement-detail',
templateUrl: './announcement-detail.component.html',
styleUrls: ['./announcement-detail.component.scss']
})
export class AnnouncementDetailComponent implements OnInit {
announcementId: string;
announcementLists: any;
titleDeatil: string;
constructor(private activateRoute: ActivatedRoute,
private myService: MyService,
public lifeCommonService: LifeCommonService) { }
ngOnInit() {
this.announcementId = this.activateRoute.snapshot.paramMap.get('id');
this.announcementQuery(this.announcementId, null)
}
announcementQuery(id, announcementType) {
this.myService.announcementQuery(id, announcementType).subscribe(res => {
if (res['success']) {
this.announcementLists = res['data']['announcementInfoList'][0];
this.titleDeatil = this.lifeCommonService.delHtmlTag(this.announcementLists['title'])
}
});
}
}
<div class="wrapper">
<div class="title">
<div><span class="line"></span>银行卡号</div>
<span class="page_mark"> 5/8</span>
</div>
<div class="content">
<div class="contentDetail employ">
<div class="contentItem">
<input class="form-control" name="" id="" placeholder="开户行具体到支行" [(ngModel)]="bankAccountOpening"
(blur)="bs(null)" [disabled]="approveStatus!=null && approveStatus!='-1'" />
</div>
<div class="contentItem">
<input class="form-control" placeholder="银行卡号:例如 6301234345354356" [(ngModel)]="bankAccountId"
(blur)="bs(2)" onkeyup="this.value=this.value.replace(/\D/g,'')" maxlength="19"
[disabled]="approveStatus!=null && approveStatus!='-1'" />
</div>
<div class="contentItem" *ngIf="approveStatus==null || approveStatus=='-1'">
<input class="form-control" name="" id="" style="text-align: left;padding: 6px 0;" placeholder="再次输入银行卡号以确认"
[(ngModel)]="sureBankAccountId" (blur)="bs(3)" onkeyup="this.value=this.value.replace(/\D/g,'')"
[disabled]="approveStatus!=null && approveStatus!='-1'" maxlength="19"/>
</div>
</div>
<div class="tips">
<p>此开户银行和银行卡号将做为于经纪人佣金的支付账号,</p>
<p>请您确保正确。</p>
</div>
</div>
<footer class="fixed" (click)="next()" *ngIf="approveStatus==null || approveStatus=='-1'">
保存并下一步
</footer>
<div id="page" *ngIf="approveStatus!=null && approveStatus !='-1'">
<div (click)="goBack()">上一页</div>
<div (click)="viewNext()">下一页</div>
</div>
</div>
<ydlife-toast *ngIf="toastDialog" [toastInfo]="toastInfo"></ydlife-toast>
<ydlife-alert *ngIf="isNeedAlert" [dialogInfo]="dialogInfo" (popInfo)="getPopInfo()"></ydlife-alert>
.wrapper {
font-size: 18px;
background: #fff;
min-height: 100%;
select{
-webkit-appearance: none;
}
input::-webkit-input-placeholder {font-size:15px;}
input:-moz-placeholder {font-size:15px;}
input::-moz-placeholder {font-size:15px;}
input:-ms-input-placeholder {font-size:15px;}
.title{
padding: 10px 13px 0 13px;
display: flex;
justify-content: space-between;
font-weight: bold;
align-items: center;
font-size: 20px;
div {
display: flex;
align-items: center;
.line{
width: 5px;
height: 18px;
display: inline-block;
background: #C81B1E;
margin-right: 5px;
}
}
}
.content{
padding: 10px 5px;
position: relative;
.contentDetail {
.contentItem {
display: flex;
justify-content: space-between;
align-items: center;
margin: 0 8px 5px 8px;
> span:first-child{
white-space: nowrap;
}
input.form-control,select.form-control {
display: inline-block;
// width: 60%;
background: none;
outline: none;
border: none;
text-align: left;
box-shadow: none;
display: flex;
flex-wrap: wrap;
font-size: 18px;
padding: 6px 0;
}
}
.contentItem:last-child {
border-bottom: none;
}
select.form-control[disabled] {
background-color: transparent;
color: #999;
}
}
.tips{
width: 100%;
margin-top: 10px;
color: #999;
font-size: 14px;
text-align: center;
margin: 20px auto;
}
.contentDetail.employ .contentItem{
padding: 10px 0;
border-bottom: 1px #e8e8e8 solid;
margin: 0 8px 0 8px;
}
}
}
\ No newline at end of file
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { BankCardComponent } from './bank-card.component';
describe('BankCardComponent', () => {
let component: BankCardComponent;
let fixture: ComponentFixture<BankCardComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ BankCardComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(BankCardComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
import { Component, OnInit } from '@angular/core';
import { MyService } from '../../my.service';
import { ActivatedRoute,Router } from "@angular/router";
import { LifeCommonService } from "../../../common/life-common.service";
@Component({
selector: 'ydlife-bank-card',
templateUrl: './bank-card.component.html',
styleUrls: ['./bank-card.component.scss']
})
export class BankCardComponent implements OnInit {
hiringBasicInfoId:any;
bankAccountOpening:string;
bankAccountId:string;
toastDialog:boolean;
toastInfo:any;
sureBankAccountId:string;
isNeedAlert: boolean;
dialogInfo: any;
approveStatus:any;
constructor(private activatedRoute: ActivatedRoute,
private router: Router,public lifeCommonService:LifeCommonService,
public myService:MyService) { }
ngOnInit() {
const title = this.activatedRoute.snapshot.data[0]['title'];
this.lifeCommonService.setTitle(title);
this.hiringBasicInfoId = this.activatedRoute.snapshot.queryParams.hiringBasicInfoId?this.activatedRoute.snapshot.queryParams.hiringBasicInfoId:null;
this.queryWholeInfo(this.hiringBasicInfoId)
}
next(){
if(!this.bankAccountOpening){
this.openPopInfo('开户行不能为空!');
return;
}
if(!this.bankAccountId){
this.openPopInfo('银行卡号不能为空!');
return;
}
if(this.bankAccountId != this.sureBankAccountId){
this.openPopInfo('两次银行卡号不一致!');
return;
}
const pattern = /^\d{16,19}$/;
if(!pattern.test(this.bankAccountId)){
this.openPopInfo('银行账号为16~19位数字,不能包含空格或其他符号');
return;
}
const param = {
hiringBasicInfoId:this.hiringBasicInfoId,
bankAccountOpening:this.bankAccountOpening,
bankAccountId:this.bankAccountId
}
this.myService.saveBankAccount(param).subscribe((res)=>{
if(res['success']){
// this.router.navigate(['/personal_statement'],{ queryParams: { hiringBasicInfoId:this.hiringBasicInfoId} });
this.router.navigate(['/employee_salary'],{ queryParams: { hiringBasicInfoId:this.hiringBasicInfoId} });
}else{
this.toastDialog = true;
this.toastInfo = {
status: 1,
msg: res['message'],
timeout: 3000,
align: 'center'
};
}
})
}
bs(type) {
this.lifeCommonService.scrollTo();
if(type==2){
if(this.bankAccountId){
this.bankAccountId = this.bankAccountId.replace(/\D/g,'');
}
}
if(type==3){
if(this.sureBankAccountId){
this.sureBankAccountId = this.sureBankAccountId.replace(/\D/g,'');
}
}
}
// 打开弹窗
openPopInfo(message) {
this.isNeedAlert = true;
this.dialogInfo = {
title: null,
content: { value: message, align: 'center' },
footer: [{ value: '我知道了', routerLink: '', className: 'weui-dialog__btn_primary' }],
};
}
// 关闭弹窗
getPopInfo() {
this.isNeedAlert = false;
}
queryWholeInfo(hiringBasicInfoId){
this.myService.queryWholeInfo({hiringBasicInfoId:hiringBasicInfoId}).subscribe((res)=>{
if(res['success']){
this.approveStatus = res['data']['hiringBasicInfo']['approveStatus'];
this.bankAccountId = res['data']['hiringBasicInfo']['bankAccountId'];
this.bankAccountOpening = res['data']['hiringBasicInfo']['bankAccountOpening'];
this.sureBankAccountId = res['data']['hiringBasicInfo']['bankAccountId'];
}
})
}
viewNext(){
this.router.navigate(['/employee_salary'],{ queryParams: { hiringBasicInfoId:this.hiringBasicInfoId} });
}
goBack(){
history.go(-1)
}
}
<div class="wrapper">
<div class="title">
<div><span class="line"></span>申请人基本资料</div>
<span class="page_mark"> 1/8</span>
</div>
<div class="content">
<div class="contentDetail employ">
<div class="contentItem">
<span>姓名</span>
<input type="text" class="form-control" [(ngModel)]="editEmployBasicInfo.name" (blur)="bs(2)"
[disabled]="approveStatus!=null && approveStatus!='-1'">
</div>
<div class="contentItem">
<span>证件类型</span>
<select class="form-control" (ngModelChange)="idTypeChange($event);bs(null)" [ngModel]="editEmployBasicInfo.idTypeId"
[disabled]="approveStatus!=null && approveStatus!='-1'">
<option value=null>请选择</option>
<option [value]="idType.id" *ngFor="let idType of this.idTypesList">
{{idType.name}}
</option>
</select>
</div>
<div class="contentItem">
<span>证件号</span>
<input type="text" class="form-control" (blur)="bs(1)" [(ngModel)]="editEmployBasicInfo.idNo"
[disabled]="approveStatus!=null && approveStatus!='-1'">
</div>
<List [className]="'date-picker-list'">
<ListItem
DatePicker
[extra]="currentDateFormat(showPractitionerBirthdate, 'yyyy-mm-dd')"
[arrow]="'horizontal'"
[mode]="'date'"
[minDate] ="minDate"
[maxDate] = "maxDate"
[(ngModel)]="showPractitionerBirthdate"
(onOk)="onOk($event)"
[disabled]="editEmployBasicInfo.idTypeId==1 || (approveStatus!=null && approveStatus!='-1')"
>
出生日期
</ListItem>
</List>
<div class="contentItem">
<span>性别</span>
<select class="form-control" [(ngModel)]="editEmployBasicInfo.gender"
[disabled]="editEmployBasicInfo.idTypeId==1 || (approveStatus!=null && approveStatus!='-1')" (blur)="bs(null)">
<option value=null>请选择</option>
<option value='1'></option>
<option value="2"></option>
</select>
</div>
<div class="contentItem">
<span>户籍</span>
<div>
<span class="cursor" (click)="selectedArea(1)">
<span
*ngIf="!addressInfo || addressInfo && !addressInfo?.province?.value">请选择</span>
<span *ngIf="addressInfo">{{addressInfo?.province?.value}}{{addressInfo?.city?.value ? " - "+addressInfo?.city?.value : ''}}</span>
<i class="iconfont icon-xiangxia" style="margin-left: 14px;color: #8a8a8a;font-size: 14px;"></i>
</span>
<ydlife-picker *ngIf="houseFlag" [provinceLists]="provinces" [limitStep]="areaLimitStep"
(selectedArea)="getAreaInfo($event,1)"></ydlife-picker>
</div>
</div>
<div class="contentItem">
<span>居住地址</span>
<div>
<input type="text" class="form-control" [(ngModel)]="editEmployBasicInfo.residentAddress" (blur)="bs(3)"
[disabled]="approveStatus!=null && approveStatus!='-1'">
</div>
</div>
<div class="contentItem">
<span>E-mail</span>
<div><input type="text" class="form-control" [(ngModel)]="editEmployBasicInfo.email" (blur)="bs(4)"
[disabled]="approveStatus!=null && approveStatus!='-1'"></div>
</div>
</div>
</div>
<footer class="fixed" (click)="next()" *ngIf="approveStatus==null || approveStatus=='-1'">
保存并下一步
</footer>
<div id="page" *ngIf="approveStatus!=null && approveStatus !='-1'">
<div (click)="goBack()">上一页</div>
<div (click)="viewNext()">下一页</div>
</div>
</div>
<ydlife-alert *ngIf="isNeedAlert" [dialogInfo]="dialogInfo" (popInfo)="getPopInfo()"></ydlife-alert>
\ No newline at end of file
.wrapper {
font-size: 18px;
background: #fff;
min-height: 100%;
select{
-webkit-appearance: none;
}
.title{
padding: 10px 13px 0 13px;
display: flex;
justify-content: space-between;
font-weight: bold;
align-items: center;
font-size: 20px;
div {
display: flex;
align-items: center;
.line{
width: 5px;
height: 18px;
display: inline-block;
background: #C81B1E;
margin-right: 5px;
}
}
}
.content {
padding: 10px 5px;
position: relative;
.contentDetail {
.contentItem {
display: flex;
justify-content: space-between;
align-items: center;
margin: 0 8px 5px 8px;
> span:first-child{
white-space: nowrap;
}
input.form-control,select.form-control {
display: inline-block;
// width: 60%;
margin: 0 5px;
background: none;
outline: none;
border: none;
text-align: right;
box-shadow: none;
display: flex;
flex-wrap: wrap;
font-size: 18px;
}
select.form-control{
direction: rtl;
}
input[type="date"]{
margin-right: -4.5%;
direction: rtl;
}
.sexWrapper {
display: flex;
width: 60%;
justify-content: flex-end;
padding-right: 3px;
.form-control.sex {
width: 20%;
margin-left: 5px;
border: none;
box-shadow: none;
}
.form-control.sex.sexBtn {
border: 1px #0767bf solid;
}
.form-control[disabled] {
background-color: transparent;
opacity: 1;
}
}
span{
position: relative;
sub{
position: absolute;
margin-right: 5px;
font-weight: bold;
color: #e10d0d;
top: 13px;
left: -8px;
}
}
}
.contentItem:last-child {
border-bottom: none;
}
// select.form-control[disabled] {
// background-color: transparent;
// color: #999;
// }
}
.contentDetail.employ .contentItem{
padding: 10px 0;
border-bottom: 1px #e8e8e8 solid;
margin: 0 8px 0 8px;
}
}
.page{
position: fixed;
bottom: 0;
left: 0;
height: 56px;
line-height: 56px;
}
}
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { EmployeeBasicInfoComponent } from './employee-basic-info.component';
describe('EmployeeBasicInfoComponent', () => {
let component: EmployeeBasicInfoComponent;
let fixture: ComponentFixture<EmployeeBasicInfoComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ EmployeeBasicInfoComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(EmployeeBasicInfoComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
import { Component, OnInit } from '@angular/core';
import { MyService } from '../../my.service';
import { ActivatedRoute,Router } from "@angular/router";
import { LifeCommonService } from "../../../common/life-common.service";
import { EmployBasicQuery } from '../../../domain/employBasicQuery';
@Component({
selector: 'ydlife-employee-basic-info',
templateUrl: './employee-basic-info.component.html',
styleUrls: ['./employee-basic-info.component.scss']
})
export class EmployeeBasicInfoComponent implements OnInit {
idTypesList:Array<any>;
hiringBasicInfoId:any;
editEmployBasicInfo:EmployBasicQuery = new EmployBasicQuery();
isNeedAlert: boolean;
dialogInfo: any;
showPractitionerBirthdate:any = null;
houseFlag:boolean;
addressInfo:any;
provinces:Array<any>;
minDate:any = new Date('1900-01-01');
maxDate:any = new Date();
//通过0,拒绝-1,已填完-2
approveStatus:any;
constructor(private activatedRoute: ActivatedRoute,
private router: Router,public lifeCommonService:LifeCommonService,
public myService:MyService) { }
ngOnInit() {
const title = this.activatedRoute.snapshot.data[0]['title'];
this.lifeCommonService.setTitle(title);
this.hiringBasicInfoId = this.activatedRoute.snapshot.queryParams.hiringBasicInfoId?this.activatedRoute.snapshot.queryParams.hiringBasicInfoId:null;
this.editEmployBasicInfo.mobileNo = this.activatedRoute.snapshot.queryParams.mobileNo?this.activatedRoute.snapshot.queryParams.mobileNo:null;
this.erpInitialize();
this.provCityQry();
this.editEmployBasicInfo = new EmployBasicQuery(this.hiringBasicInfoId,null,this.editEmployBasicInfo.mobileNo,null,null,null,null,null,null,null,null,null,null,null,null)
this.queryWholeInfo(this.hiringBasicInfoId);
}
erpInitialize(){
this.myService.erpInitialize().subscribe((res)=>{
if(res['success']){
this.idTypesList = res['data']['idTypes'];
}
})
}
currentDateFormat(date, format: string = 'yyyy-mm-dd HH:MM'): any {
if(date){
const pad = (n: number): string => (n < 10 ? `0${n}` : n.toString());
return format
.replace('yyyy', date.getFullYear())
.replace('mm', pad(date.getMonth() + 1))
.replace('dd', pad(date.getDate()))
.replace('HH', pad(date.getHours()))
.replace('MM', pad(date.getMinutes()))
.replace('ss', pad(date.getSeconds()));
}
}
onOk(result: Date) {
this.editEmployBasicInfo.practitionerBirthdate = this.currentDateFormat(result, 'yyyy-mm-dd');
this.showPractitionerBirthdate = result;
}
idTypeChange(e){
this.editEmployBasicInfo.idNo = null;
this.editEmployBasicInfo.practitionerBirthdate = null;
this.showPractitionerBirthdate = null;
this.editEmployBasicInfo.gender = null;
this.editEmployBasicInfo.idTypeId = e;
for(let idType of this.idTypesList){
if(this.editEmployBasicInfo.idTypeId == idType.id){
this.editEmployBasicInfo.idType = idType.name;
}
}
}
/**
* 1.证件号
* 2.姓名
* 3.居住地址
* 4.email
*/
bs(type) {
this.lifeCommonService.scrollTo();
if (type===1) {
if(this.editEmployBasicInfo.idNo){
this.editEmployBasicInfo.idNo = this.editEmployBasicInfo.idNo.trim();
if(this.editEmployBasicInfo.idTypeId==1){
//身份证
this.idCardInput(this.editEmployBasicInfo.idNo);
}else{
if(!this.lifeCommonService.checkTaxNo(this.editEmployBasicInfo.idNo)){
this.openPopInfo('证件号码错误');
}
}
}
}
if(type===2){
if(this.editEmployBasicInfo.name){
this.editEmployBasicInfo.name = this.editEmployBasicInfo.name.trim();
}
}
if(type===3){
if(this.editEmployBasicInfo.residentAddress){
this.editEmployBasicInfo.residentAddress = this.editEmployBasicInfo.residentAddress.trim()
}
}
if(type===4){
if(this.editEmployBasicInfo.email){
this.editEmployBasicInfo.email = this.editEmployBasicInfo.email.trim();
}
}
}
/**
* 身份证号码输入,获取生日和性别
*/
idCardInput(val) {
if (val) {
if (!this.lifeCommonService.IdCodeValid(val).pass) {
this.openPopInfo(this.lifeCommonService.IdCodeValid(val).msg)
return;
}
this.editEmployBasicInfo.practitionerBirthdate = this.lifeCommonService.dateFormat(this.lifeCommonService.IdCodeValid(val).birthDay, 'yyyy-MM-dd');
this.editEmployBasicInfo.gender = this.lifeCommonService.IdCodeValid(val).gender;
this.showPractitionerBirthdate = new Date(this.editEmployBasicInfo.practitionerBirthdate);
}
}
next(){
if(!this.editEmployBasicInfo.name){
this.openPopInfo('请输入您的姓名!')
return;
}else{
if(!this.lifeCommonService.nameValid(this.editEmployBasicInfo.name)){
this.openPopInfo('请输入您的真实姓名!')
}
}
if(!this.editEmployBasicInfo.idTypeId || !this.editEmployBasicInfo.idType){
this.openPopInfo('请选择您的证件类型!')
return;
}
if(!this.editEmployBasicInfo.idNo){
this.openPopInfo('请输入您的证件号!')
return;
}else{
if(!this.lifeCommonService.checkTaxNo(this.editEmployBasicInfo.idNo)){
this.openPopInfo('证件号码错误')
}
}
if(!this.editEmployBasicInfo.practitionerBirthdate){
this.openPopInfo('请选择您的出生日期!')
return;
}
if(!this.editEmployBasicInfo.gender){
this.openPopInfo('请选择您的性别!')
return;
}
if(!this.editEmployBasicInfo.provinceId && !this.editEmployBasicInfo.cityId){
this.openPopInfo('请选择您的户籍!')
return;
}
if(!this.editEmployBasicInfo.residentAddress){
this.openPopInfo('请输入您的居住地址!')
return;
}
if(!this.editEmployBasicInfo.email){
this.openPopInfo('请输入您的email!')
return;
}else{
if(!this.lifeCommonService.emailValid(this.editEmployBasicInfo.email)){
this.openPopInfo('email格式错误!')
return;
}
}
this.myService.saveBasicInfo(this.editEmployBasicInfo).subscribe((res)=>{
if(res['success']){
this.router.navigate(['/work_experience'],{ queryParams: { hiringBasicInfoId:this.hiringBasicInfoId} });
}else{
this.openPopInfo(res['message'])
}
})
}
// 打开弹窗
openPopInfo(message) {
this.isNeedAlert = true;
this.dialogInfo = {
title: null,
content: { value: message, align: 'center' },
footer: [{ value: '我知道了', routerLink: '', className: 'weui-dialog__btn_primary' }],
};
}
// 关闭弹窗
getPopInfo() {
this.isNeedAlert = false;
}
// 选择地址信息
selectedArea(type) {
// this.sendRemoveScrollContent.emit(1);
if (type === 1) {
if(this.approveStatus==null || this.approveStatus=='-1'){
// 户籍地址
this.houseFlag = true;
}
}
}
// 获取地址信息
getAreaInfo(e, type) {
// this.sendRemoveScrollContent.emit(0);
if (type === 1) {
// 长期居住地
this.addressInfo = e;
this.houseFlag = false;
this.editEmployBasicInfo.provinceId = this.addressInfo.province.id;
this.editEmployBasicInfo.cityId = this.addressInfo.city.id;
this.editEmployBasicInfo.provinceName = this.addressInfo.province.value;
this.editEmployBasicInfo.cityName = this.addressInfo.city.value;
}
}
//获取城市地址
provCityQry(){
this.myService.provCityQry().subscribe((res)=>{
if(res['success']){
this.provinces = res['data'].provinces;
}
})
}
queryWholeInfo(hiringBasicInfoId){
this.myService.queryWholeInfo({hiringBasicInfoId:hiringBasicInfoId}).subscribe((res)=>{
if(res['data']['hiringBasicInfo']){
this.editEmployBasicInfo = res['data']['hiringBasicInfo'];
if(!res['data']['hiringBasicInfo']['mobileNo']){
this.editEmployBasicInfo.mobileNo = this.activatedRoute.snapshot.queryParams.mobileNo?this.activatedRoute.snapshot.queryParams.mobileNo:null;
}
this.approveStatus = res['data']['hiringBasicInfo']['approveStatus'];
this.showPractitionerBirthdate= new Date(res['data']['hiringBasicInfo']['practitionerBirthdate']);
// alert(new Date(673887600000))
this.editEmployBasicInfo.practitionerBirthdate = this.currentDateFormat(this.showPractitionerBirthdate, 'yyyy-mm-dd')
if(this.editEmployBasicInfo.cityId || this.editEmployBasicInfo.cityName || this.editEmployBasicInfo.provinceId || this.editEmployBasicInfo.provinceName){
this.addressInfo = {
city:{id:this.editEmployBasicInfo.cityId,value:this.editEmployBasicInfo.cityName},
province:{id:this.editEmployBasicInfo.provinceId,value:this.editEmployBasicInfo.provinceName}
}
}else{
this.addressInfo = null;
}
}
})
}
goBack(){
history.go(-1)
}
viewNext(){
this.router.navigate(['/work_experience'],{ queryParams: { hiringBasicInfoId:this.hiringBasicInfoId} });
}
}
<div class="wrapper">
<div class="title">
<div><span class="line"></span>学历信息</div>
<span class="page_mark"> 4/8</span>
</div>
<div class="content">
<div class="contentDetail employ">
<div class="contentItem">
<span>最高学历:如本科、专科、硕士</span>
<select class="form-control" name="" id="" [(ngModel)]="lastGraduateCode" (ngModelChange)="selectEducationLevel($event)"
[disabled]="approveStatus!=null && approveStatus!='-1'">
<option value=null>请选择</option>
<option [value]="educationLevel.id" *ngFor="let educationLevel of educationLevelList">
{{educationLevel.name}}
</option>
</select>
</div>
<div class="contentItem">
<span>毕业学校</span>
<input class="form-control" [(ngModel)]="lastGraduateSchool" [disabled]="approveStatus!=null && approveStatus!='-1'" />
</div>
<div class="contentItem" style="border:none;">
<span>毕业证</span>
<div></div>
</div>
</div>
<div class="photo_wrapper" *ngIf="!certificationVxUrl" (click)="selectPic()">
<img src="assets/images/camera.png" alt="" />
<div style="margin-top: 10px;" >点击添加毕业证照片</div>
</div>
<img src="{{certificationVxUrl}}" alt="毕业证照片" (click)="selectPic()" *ngIf="certificationVxUrl">
<div class="tips">
<p>(jpg,png 文件大小不大于1mb)</p>
<p>根据银保监要求,请上传最高学历原件影像件或学信网截图</p>
</div>
</div>
<footer class="fixed" (click)="next()" *ngIf="approveStatus==null || approveStatus=='-1'">
保存并下一步
</footer>
<div id="page" *ngIf="approveStatus!=null && approveStatus !='-1'">
<div (click)="goBack()">上一页</div>
<div (click)="viewNext()">下一页</div>
</div>
</div>
<ydlife-toast *ngIf="toastDialog" [toastInfo]="toastInfo"></ydlife-toast>
<ydlife-alert *ngIf="isNeedAlert" [dialogInfo]="dialogInfo" (popInfo)="getPopInfo()"></ydlife-alert>
.wrapper {
font-size: 18px;
background: #fff;
min-height: 100%;
select{
-webkit-appearance: none;
}
.title{
padding: 10px 13px 0 13px;
display: flex;
justify-content: space-between;
font-weight: bold;
align-items: center;
font-size: 20px;
div {
display: flex;
align-items: center;
.line{
width: 5px;
height: 18px;
display: inline-block;
background: #C81B1E;
margin-right: 5px;
}
}
}
.content{
padding: 10px 5px 60px 5px;
position: relative;
text-align: center;
.contentDetail {
.contentItem {
display: flex;
justify-content: space-between;
align-items: center;
margin: 0 8px 5px 8px;
> span:first-child{
white-space: nowrap;
}
input.form-control,select.form-control {
display: inline-block;
// width: 60%;
margin: 0 5px;
background: none;
outline: none;
border: none;
text-align: right;
box-shadow: none;
display: flex;
flex-wrap: wrap;
font-size: 18px;
}
select.form-control {
direction: rtl;
}
}
.contentItem:last-child {
border-bottom: none;
}
// select.form-control[disabled] {
// background-color: transparent;
// color: #999;
// }
}
.contentDetail.employ .contentItem{
padding: 10px 0;
border-bottom: 1px #e8e8e8 solid;
margin: 0 8px 0 8px;
}
.photo_wrapper{
width: 203px;
min-height: 125px;
margin: 20px auto 0 auto;
text-align: center;
background: #F8F8F8;
border: 1px #8D8D8D dashed;
border-radius: 4px;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
font-size: 12px;
color: #333;
img{
width: 42px;
height: 42px;
}
}
.tips{
text-align: center;
font-size: 11px;
margin: 20px auto;
color: #999;
}
}
}
\ No newline at end of file
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { EmployeeEducationComponent } from './employee-education.component';
describe('EmployeeEducationComponent', () => {
let component: EmployeeEducationComponent;
let fixture: ComponentFixture<EmployeeEducationComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ EmployeeEducationComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(EmployeeEducationComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
import { Component, OnInit ,ChangeDetectorRef} from '@angular/core';
import { MyService } from '../../my.service';
import { ActivatedRoute,Router } from "@angular/router";
import { LifeCommonService } from "../../../common/life-common.service";
declare const wx: any;
@Component({
selector: 'ydlife-employee-education',
templateUrl: './employee-education.component.html',
styleUrls: ['./employee-education.component.scss']
})
export class EmployeeEducationComponent implements OnInit {
hiringBasicInfoId:any;
educationLevelList:Array<any>;
lastGraduateGrade:string = null;
lastGraduateCode:string = null;
lastGraduateSchool:string;
certificationVxUrl:string;
serverId: any;
toastDialog: boolean;
toastInfo: any;
isNeedAlert: boolean;
dialogInfo: any;
approveStatus:any;
constructor(private activatedRoute: ActivatedRoute,
private router: Router,public lifeCommonService:LifeCommonService,
public myService:MyService,private changeDetectorRef: ChangeDetectorRef) {
}
ngOnInit() {
const title = this.activatedRoute.snapshot.data[0]['title'];
this.lifeCommonService.setTitle(title);
this.hiringBasicInfoId = this.activatedRoute.snapshot.queryParams.hiringBasicInfoId?this.activatedRoute.snapshot.queryParams.hiringBasicInfoId:null;
this.educationLevelQuery();
this.queryWholeInfo(this.hiringBasicInfoId)
}
next(){
if(!this.lastGraduateGrade){
this.openPopInfo('最高学历不能为空!')
return;
}
if(!this.lastGraduateSchool){
this.openPopInfo('毕业学校不能为空!')
return;
}
if(!this.certificationVxUrl){
this.openPopInfo('毕业证照片不能为空,请在微信端上传!')
return;
}
const param = {
hiringBasicInfoId:this.hiringBasicInfoId,
lastGraduateCode:this.lastGraduateCode,
lastGraduateGrade:this.lastGraduateGrade,
lastGraduateSchool:this.lastGraduateSchool,
certificationVxUrl:this.certificationVxUrl
}
this.myService.saveLastGraduateGrade(param).subscribe((res)=>{
if(res['success']){
this.router.navigate(['/bank_card'],{ queryParams: { hiringBasicInfoId:this.hiringBasicInfoId} });
}else{
this.toastDialog = true;
this.toastInfo = {
status: 1,
msg: res['message'],
timeout: 3000,
align: 'center'
};
}
})
}
// 教育等级查询
educationLevelQuery() {
this.myService.educationLevelQuery().subscribe(res => {
if (res['success']) {
this.educationLevelList = res['data']['educationLevelList']
}
})
}
//选择教育等级
selectEducationLevel(event){
this.lastGraduateCode = event;
for(let educationLevel of this.educationLevelList){
if(event == educationLevel.id){
this.lastGraduateGrade = educationLevel.name;
}
}
}
selectPic(){
if(this.approveStatus==null || this.approveStatus=='-1'){
if(this.lifeCommonService.isWeiXin()){
// 5.1 拍照、本地选图
const t = this;
wx.chooseImage({
count: 1, // 默认9
sizeType: ['original', 'compressed'], // 可以指定是原图还是压缩图,默认二者都有
sourceType: ['album', 'camera'], // 可以指定来源是相册还是相机,默认二者都有
success: function (res) {
this.localId = res.localIds[0]; // 返回选定照片的本地ID列表,localId可以作为img标签的src属性显示图片
const THIS = t;
wx.uploadImage({
localId: this.localId, // 需要上传的图片的本地ID,由chooseImage接口获得
isShowProgressTips: 1, // 默认为1,显示进度提示
success: function (response) {
THIS.serverId = response.serverId; // 返回图片的服务器端ID
const m = {
mediaId: response.serverId,
origin: 'ydLife'
};
THIS.myService.mediaGet(m).subscribe(async e => {
if (e['success']) {
THIS.certificationVxUrl = e['data']['imgUrl'];
THIS.changeDetectorRef.markForCheck();
THIS.changeDetectorRef.detectChanges();
} else {
alert(e['message']);
}
});
}
});
}
});
}else{
this.openPopInfo('请在微信端操作!')
}
}
}
// 打开弹窗
openPopInfo(message) {
this.isNeedAlert = true;
this.dialogInfo = {
title: null,
content: { value: message, align: 'center' },
footer: [{ value: '我知道了', routerLink: '', className: 'weui-dialog__btn_primary' }],
};
}
// 关闭弹窗
getPopInfo() {
this.isNeedAlert = false;
}
queryWholeInfo(hiringBasicInfoId){
this.myService.queryWholeInfo({hiringBasicInfoId:hiringBasicInfoId}).subscribe((res)=>{
if(res['success']){
this.approveStatus = res['data']['hiringBasicInfo']['approveStatus'];
this.lastGraduateGrade = res['data']['hiringBasicInfo']['lastGraduateGrade'];
this.lastGraduateCode = res['data']['hiringBasicInfo']['lastGraduateCode'];
this.lastGraduateSchool = res['data']['hiringBasicInfo']['lastGraduateSchool'];
this.certificationVxUrl = res['data']['hiringBasicInfo']['lastGraduateCertificationOssPath'];
}
})
}
viewNext(){
this.router.navigate(['/bank_card'],{ queryParams: { hiringBasicInfoId:this.hiringBasicInfoId} });
}
goBack(){
history.go(-1)
}
}
<div class="wrapper">
<div class="title">
<div><span class="line"></span>个人证件资料</div>
<span class="page_mark"> 3/8</span>
</div>
<div class="sub_title">
<strong>身份证件</strong>
<span>(身份证复印件的姓名、证件号码、户籍地址务必清楚)</span>
</div>
<div class="content">
<div class="content_wrapper">
<div class="photo"
*ngIf="!frontVxUrl" (click)="selectPic('front')">
<img src="assets/images/front.png" alt="身份证正面">
<img class="camera" src="assets/images/camera.png" alt="身份证" />
<div class="choseBtn" >点击添加身份证正面</div>
</div>
<img class="showImg" src="{{frontVxUrl}}" alt="身份证正面" *ngIf="frontVxUrl"
(click)="selectPic('front')">
<div class="tips">
<p>(正确示例:身份证正面,字体清晰)</p>
<p>(jpg,png 文件大小不大于1mb)</p>
</div>
</div>
<div class="content_wrapper" style="margin-top: 25px;">
<div class="photo" *ngIf="!backVxUrl" (click)="selectPic('back')">
<img src="assets/images/back.png" alt="身份证反面面">
<img class="camera" src="assets/images/camera.png" alt="身份证" />
<div class="choseBtn" >点击添加身份证反面</div>
</div>
<img class="showImg" src="{{backVxUrl}}" alt="身份证反面" *ngIf="backVxUrl"
(click)="selectPic('back')">
<div class="tips">
<p>(正确示例:身份证反面,字体清晰)</p>
<p>(jpg,png 文件大小不大于1mb)</p>
</div>
</div>
</div>
<footer class="fixed" (click)="next()" *ngIf="approveStatus==null || approveStatus=='-1'">
保存并下一步
</footer>
<div id="page" *ngIf="approveStatus!=null && approveStatus !='-1'">
<div (click)="goBack()">上一页</div>
<div (click)="viewNext()">下一页</div>
</div>
</div>
<ydlife-toast *ngIf="toastDialog" [toastInfo]="toastInfo"></ydlife-toast>
<ydlife-alert *ngIf="isNeedAlert" [dialogInfo]="dialogInfo" (popInfo)="getPopInfo()"></ydlife-alert>
.wrapper {
padding: 10px 10px 0 10px;
font-size: 18px;
background: #fff;
min-height: 100%;
select{
-webkit-appearance: none;
}
.title{
display: flex;
justify-content: space-between;
font-weight: bold;
align-items: center;
font-size: 20px;
div {
display: flex;
align-items: center;
.line{
width: 5px;
height: 18px;
display: inline-block;
background: #C81B1E;
margin-right: 5px;
}
}
}
.sub_title{
margin-top: 8px;
font-size: 16px;
span{
font-size: 10px;
}
}
.content{
padding: 15px 0 65px 0;
position: relative;
.content_wrapper{
display: flex;
justify-content: center;
flex-wrap: wrap;
margin-top: 10px;
overflow: hidden;
.tips{
width: 100%;
margin-top: 10px;
color: #999;
font-size: 12px;
text-align: center;
}
.photo{
text-align: center;
border: 1px #8D8D8D dashed;
border-radius: 4px;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
font-size: 12px;
color: #333;
width: 75%;
background-size:contain;
background-repeat: no-repeat;
position: relative;
.camera{
position: absolute;
}
.choseBtn{
position: absolute;
font-size: 13px;
bottom: 15%;
}
}
.showImg{
max-width: 429px;
max-height: 276px;
}
// .photo.front{
// background-image: url('../../../../assets/images/front.png');
// }
// .phote.back{
// background-image: url('../../../../assets/images/back.png');
// }
}
}
}
\ No newline at end of file
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { EmployeeIdCardComponent } from './employee-id-card.component';
describe('EmployeeIdCardComponent', () => {
let component: EmployeeIdCardComponent;
let fixture: ComponentFixture<EmployeeIdCardComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ EmployeeIdCardComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(EmployeeIdCardComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
import { Component, OnInit,ViewChild,ElementRef } from '@angular/core';
import { MyService } from '../../my.service';
import { ActivatedRoute,Router } from "@angular/router";
import { LifeCommonService } from "../../../common/life-common.service";
import { ChangeDetectorRef } from '@angular/core';
declare const wx: any;
@Component({
selector: 'ydlife-employee-id-card',
templateUrl: './employee-id-card.component.html',
styleUrls: ['./employee-id-card.component.scss']
})
export class EmployeeIdCardComponent implements OnInit {
@ViewChild('mainScreen') elementView: ElementRef;
exampleWidth:any;
exampleHeight:any;
hiringBasicInfoId:any;
frontVxUrl:any = null;
backVxUrl:any = null;
serverId: any;
toastDialog: boolean;
toastInfo: any;
isNeedAlert: boolean;
dialogInfo: any;
approveStatus:any;
constructor(private activatedRoute: ActivatedRoute,
private router: Router,public lifeCommonService:LifeCommonService,
public myService:MyService,private changeDetectorRef: ChangeDetectorRef) {
}
ngOnInit() {
const title = this.activatedRoute.snapshot.data[0]['title'];
this.lifeCommonService.setTitle(title);
this.hiringBasicInfoId = this.activatedRoute.snapshot.queryParams.hiringBasicInfoId?this.activatedRoute.snapshot.queryParams.hiringBasicInfoId:null;
this.queryWholeInfo(this.hiringBasicInfoId)
// setTimeout(() => {
// this.exampleWidth = this.elementView.nativeElement.offsetWidth;
// this.exampleHeight =this.elementView.nativeElement.offsetHeight;
// }, 300);
}
next(){
if(!this.frontVxUrl){
this.openPopInfo('身份证正面照不能为空,请在微信端上传!')
return;
}
if(!this.backVxUrl){
this.openPopInfo('身份证反面照不能为空,请在微信端上传!')
return;
}
const param = {
hiringBasicInfoId:this.hiringBasicInfoId,
frontVxUrl:this.frontVxUrl,
backVxUrl:this.backVxUrl
}
this.myService.saveIDPicture(param).subscribe((res)=>{
if(res['success']){
this.router.navigate(['/employee_education'],{ queryParams: { hiringBasicInfoId:this.hiringBasicInfoId} });
}else{
this.toastDialog = true;
this.toastInfo = {
status: 1,
msg: res['message'],
timeout: 3000,
align: 'center'
};
}
})
}
selectPic(type){
if(this.approveStatus==null || this.approveStatus == '-1'){
if(this.lifeCommonService.isWeiXin()){
// 5.1 拍照、本地选图
const t = this;
wx.chooseImage({
count: 1, // 默认9
sizeType: ['original', 'compressed'], // 可以指定是原图还是压缩图,默认二者都有
sourceType: ['album', 'camera'], // 可以指定来源是相册还是相机,默认二者都有
success: function (res) {
this.localId = res.localIds[0]; // 返回选定照片的本地ID列表,localId可以作为img标签的src属性显示图片
const THIS = t;
wx.uploadImage({
localId: this.localId, // 需要上传的图片的本地ID,由chooseImage接口获得
isShowProgressTips: 1, // 默认为1,显示进度提示
success: function (response) {
THIS.serverId = response.serverId; // 返回图片的服务器端ID
const m = {
mediaId: response.serverId,
origin: 'ydLife'
};
THIS.myService.mediaGet(m).subscribe(async e => {
if (e['success']) {
if(type=='front'){
THIS.frontVxUrl = e['data']['imgUrl'];
}
if(type=='back'){
THIS.backVxUrl = e['data']['imgUrl'];
}
THIS.changeDetectorRef.markForCheck();
THIS.changeDetectorRef.detectChanges();
// alert(THIS.frontVxUrl)
// alert(THIS.backVxUrl)
} else {
alert(e['message']);
}
});
}
});
}
});
}else{
this.openPopInfo('请在微信端操作!')
}
}
}
// 打开弹窗
openPopInfo(message) {
this.isNeedAlert = true;
this.dialogInfo = {
title: null,
content: { value: message, align: 'center' },
footer: [{ value: '我知道了', routerLink: '', className: 'weui-dialog__btn_primary' }],
};
}
// 关闭弹窗
getPopInfo() {
this.isNeedAlert = false;
}
queryWholeInfo(hiringBasicInfoId){
this.myService.queryWholeInfo({hiringBasicInfoId:hiringBasicInfoId}).subscribe((res)=>{
if(res['success']){
this.approveStatus = res['data']['hiringBasicInfo']['approveStatus'];
if(res['data']['hiringBasicInfo']['idFrontPageOssPath']){
this.frontVxUrl = res['data']['hiringBasicInfo']['idFrontPageOssPath'];
}
if(res['data']['hiringBasicInfo']['idBackPageOssPath']){
this.backVxUrl = res['data']['hiringBasicInfo']['idBackPageOssPath'];
}
}
})
}
viewNext(){
this.router.navigate(['/employee_education'],{ queryParams: { hiringBasicInfoId:this.hiringBasicInfoId} });
}
goBack(){
history.go(-1)
}
}
<div class="wrapper">
<div class="title">
欢迎加入银盾大家庭
</div>
<div class="content">
<div class="contentDetail employ">
<div class="contentItem">
<span>报聘职级</span>
<div>{{membership?.mdDropOptionName}}</div>
</div>
<div class="contentItem">
<span>辅导人</span>
<div>{{membership?.mentor}}</div>
</div>
<div class="contentItem">
<span>介绍人</span>
<div>{{membership?.introducer}}</div>
</div>
<div class="contentItem">
<span>体系名</span>
<div>{{membership?.subsystem}}</div>
</div>
<div class="contentItem">
<span>体系负责人</span>
<div>{{membership?.subsystemOwner}}</div>
</div>
<div class="contentItem">
<span>分公司</span>
<div>{{membership?.branch}}</div>
</div>
</div>
</div>
<footer class="fixed" (click)="next()" *ngIf="approveStatus==null || approveStatus=='-1'">
确认并下一步
</footer>
<div id="page" *ngIf="approveStatus!=null && approveStatus !='-1'">
<div (click)="goBack()">上一页</div>
<div (click)="viewNext()">下一页</div>
</div>
</div>
\ No newline at end of file
.wrapper {
font-size: 18px;
background: #fff;
min-height: 100%;
.title{
font-size: 20px;
font-weight: bold;
color: #333;
width: 100%;
text-align: center;
margin: 20px auto 0 auto;
}
.content {
padding: 10px 5px;
position: relative;
.contentDetail {
.contentItem {
display: flex;
justify-content: space-between;
align-items: center;
margin: 0 8px 5px 8px;
> span:first-child{
white-space: nowrap;
}
input.form-control,select.form-control {
display: inline-block;
// width: 60%;
margin: 0 5px;
background: none;
outline: none;
border: none;
text-align: right;
box-shadow: none;
display: flex;
flex-wrap: wrap;
font-size: 18px;
direction: rtl;
}
input[type="date"]{
margin-right: -4.5%;
direction: rtl;
}
.sexWrapper {
display: flex;
width: 60%;
justify-content: flex-end;
padding-right: 3px;
.form-control.sex {
width: 20%;
margin-left: 5px;
border: none;
box-shadow: none;
}
.form-control.sex.sexBtn {
border: 1px #0767bf solid;
}
.form-control[disabled] {
background-color: transparent;
opacity: 1;
}
}
span{
position: relative;
sub{
position: absolute;
margin-right: 5px;
font-weight: bold;
color: #e10d0d;
top: 13px;
left: -8px;
}
}
}
.contentItem:last-child {
border-bottom: none;
}
select.form-control[disabled] {
background-color: transparent;
color: #999;
}
}
.contentDetail.employ .contentItem{
padding: 10px 0;
border-bottom: 1px #e8e8e8 solid;
margin: 0 8px 0 8px;
}
}
}
\ No newline at end of file
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { EmployeeInfoComponent } from './employee-info.component';
describe('EmployeeInfoComponent', () => {
let component: EmployeeInfoComponent;
let fixture: ComponentFixture<EmployeeInfoComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ EmployeeInfoComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(EmployeeInfoComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
import { Component, OnInit } from '@angular/core';
import { ActivatedRoute,Router } from "@angular/router";
import { LifeCommonService } from "../../../common/life-common.service";
import { MyService } from '../../my.service';
@Component({
selector: 'ydlife-employee-info',
templateUrl: './employee-info.component.html',
styleUrls: ['./employee-info.component.scss']
})
export class EmployeeInfoComponent implements OnInit {
hiringBasicInfoId:any;
membership:any;
mobileNo:string;
approveStatus:any;
constructor(private activatedRoute: ActivatedRoute,
private router: Router,public lifeCommonService:LifeCommonService,
public myService:MyService) { }
ngOnInit() {
const title = this.activatedRoute.snapshot.data[0]['title'];
this.lifeCommonService.setTitle(title);
this.hiringBasicInfoId = this.activatedRoute.snapshot.queryParams.hiringBasicInfoId?this.activatedRoute.snapshot.queryParams.hiringBasicInfoId:null;
this.mobileNo = this.activatedRoute.snapshot.queryParams.mobileNo?this.activatedRoute.snapshot.queryParams.mobileNo:null;
this.queryWholeInfo(this.hiringBasicInfoId)
}
next(){
this.router.navigate(['/employee_basic_info'],{ queryParams: { hiringBasicInfoId:this.hiringBasicInfoId,mobileNo:this.mobileNo} });
}
queryWholeInfo(hiringBasicInfoId){
this.myService.queryWholeInfo({hiringBasicInfoId:hiringBasicInfoId}).subscribe((res)=>{
this.membership = res['data']['hiringMemberShip'];
this.approveStatus = res['data']['hiringBasicInfo']['approveStatus'];
})
}
goBack(){
history.go(-1)
}
viewNext(){
this.router.navigate(['/employee_basic_info'],{ queryParams: { hiringBasicInfoId:this.hiringBasicInfoId} });
}
}
<div class="wrapper">
<div class="title">
<div><span class="line"></span>薪资单上传</div>
<span class="page_mark"> 5/8</span>
</div>
<div class="content">
<div class="photo_wrapper" (click)="selectPic()" *ngIf="!vxUrl">
<img src="assets/images/camera.png" alt="" style="width: 29px;height: 29px;margin-bottom: 20px;"/>
<div>点击添加</div>
</div>
<img alt="薪资单" src="{{vxUrl}}" *ngIf="vxUrl" (click)="selectPic()">
<ul class="tips">
<li>如果报聘职级为A1(销售助理),可无保险从业经验要求;</li>
<li>如果报聘职级为A2(销售顾问),必须有保险从业经验;</li>
<li>如果报聘职级为A3(销售主任),须绩优保险从业人员;</li>
<li>如果报聘职级为M1(销售经理),须携带2人入职;</li>
<li>如果报聘职级为M2(高级销售经理),须携带3人入职;</li>
<li>如果报聘职级为M3(资深销售经理),须携带4人入职;</li>
<li>如果报聘职级为M4(销售总监),须携带5人入职;</li>
<li>如果报聘职级为M5(销售经理),须携带6人入职;</li>
<li>如果报聘职级为M6(资深销售总监),须携带7人入职;</li>
<li>如果报聘职级为S1(合伙人),须携带 12 人入职,至少包含1名 M6 职级,并提供过去一年内30万保险销售收入证明;</li>
<li>如果报聘职级为S2(高级合伙人),须携带24人入职,至少包含1名 S1 职级,并提供过去一年内50万保险销售收入证明;</li>
<li>如果报聘职级为S3(资深合伙人),须携带 75 人入职,至少各含一名S1和S2职级,并提供过去一年内 100 万保险销售收入证明;</li>
<li>如果报聘职级为IA(独立经纪人),须要符合经纪人聘用条件的绩优保险从业人员</li>
</ul>
</div>
<footer class="fixed" (click)="next()" *ngIf="approveStatus==null || approveStatus=='-1'">
保存并下一步
</footer>
<div id="page" *ngIf="approveStatus!=null && approveStatus !='-1'">
<div (click)="goBack()">上一页</div>
<div (click)="viewNext()">下一页</div>
</div>
</div>
<ydlife-toast *ngIf="toastDialog" [toastInfo]="toastInfo"></ydlife-toast>
<ydlife-alert *ngIf="isNeedAlert" [dialogInfo]="dialogInfo" (popInfo)="getPopInfo()"></ydlife-alert>
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment