'提交代表'

pull/1/head
袁野 4 years ago
parent cd2e772c56
commit 95349eef2e
  1. 2
      README.md
  2. 18
      angular.json
  3. 2
      e2e/src/app.e2e-spec.ts
  4. 2
      karma.conf.js
  5. 2
      package-lock.json
  6. 2
      package.json
  7. 47
      src/app/admin/audit/audit-coupon/audit-coupon.component.html
  8. 50
      src/app/admin/audit/audit-coupon/audit-coupon.component.ts
  9. 2
      src/app/admin/cms/cms-content/cms-content.component.ts
  10. 2
      src/app/admin/company/company-list/company-list.component.html
  11. 4
      src/app/admin/company/company-list/company-list.component.ts
  12. 6
      src/app/admin/coupon/coupon-edit/coupon-edit.component.html
  13. 6
      src/app/admin/coupon/coupon-edit/coupon-edit.component.ts
  14. 4
      src/app/admin/login/login/login.component.less
  15. 2
      src/app/admin/merchant/merchant-list/merchant-list.component.html
  16. 3
      src/app/admin/merchant/merchant-list/merchant-list.component.ts
  17. 1
      src/app/admin/price/price-edit/price-edit.component.html
  18. 0
      src/app/admin/price/price-edit/price-edit.component.scss
  19. 15
      src/app/admin/price/price-edit/price-edit.component.ts
  20. 1
      src/app/admin/price/price-list/price-list.component.html
  21. 0
      src/app/admin/price/price-list/price-list.component.scss
  22. 15
      src/app/admin/price/price-list/price-list.component.ts
  23. 16
      src/app/admin/price/price-routing.module.ts
  24. 27
      src/app/admin/price/price.module.ts
  25. 2
      src/app/admin/user/user-list/user-list.component.html
  26. 3
      src/app/admin/user/user-list/user-list.component.ts
  27. 5
      src/app/app-routing.module.ts
  28. 14
      src/app/services/audit.service.ts
  29. 2
      src/app/services/icon.service.ts
  30. 4
      src/environments/environment.test.ts
  31. 7
      src/environments/environment.ts

@ -1,4 +1,4 @@
# TalentWeb
# highWeb
This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 9.0.2.

@ -3,7 +3,7 @@
"version": 1,
"newProjectRoot": "projects",
"projects": {
"talent-web": {
"high-web": {
"projectType": "application",
"schematics": {
"@schematics/angular:component": {
@ -17,7 +17,7 @@
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"outputPath": "dist/talent-web",
"outputPath": "dist/high-web",
"index": "src/index.html",
"main": "src/main.ts",
"polyfills": "src/polyfills.ts",
@ -103,21 +103,21 @@
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"options": {
"browserTarget": "talent-web:build"
"browserTarget": "high-web:build"
},
"configurations": {
"production": {
"browserTarget": "talent-web:build:production"
"browserTarget": "high-web:build:production"
},
"test": {
"browserTarget": "talent-web:build:production"
"browserTarget": "high-web:build:production"
}
}
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"options": {
"browserTarget": "talent-web:build"
"browserTarget": "high-web:build"
}
},
"test": {
@ -155,18 +155,18 @@
"builder": "@angular-devkit/build-angular:protractor",
"options": {
"protractorConfig": "e2e/protractor.conf.js",
"devServerTarget": "talent-web:serve"
"devServerTarget": "high-web:serve"
},
"configurations": {
"production": {
"devServerTarget": "talent-web:serve:production"
"devServerTarget": "high-web:serve:production"
}
}
}
}
}
},
"defaultProject": "talent-web",
"defaultProject": "high-web",
"cli": {
"analytics": "0444f874-a08a-4231-b156-0967f0496267"
}

@ -10,7 +10,7 @@ describe('workspace-project App', () => {
it('should display welcome message', () => {
page.navigateTo();
expect(page.getTitleText()).toEqual('talent-web app is running!');
expect(page.getTitleText()).toEqual('high-web app is running!');
});
afterEach(async () => {

@ -16,7 +16,7 @@ module.exports = function (config) {
clearContext: false // leave Jasmine Spec Runner output visible in browser
},
coverageIstanbulReporter: {
dir: require('path').join(__dirname, './coverage/talent-web'),
dir: require('path').join(__dirname, './coverage/high-web'),
reports: ['html', 'lcovonly', 'text-summary'],
fixWebpackSourcePaths: true
},

2
package-lock.json generated

@ -1,5 +1,5 @@
{
"name": "talent-web",
"name": "high-web",
"version": "0.0.0",
"lockfileVersion": 1,
"requires": true,

@ -1,5 +1,5 @@
{
"name": "talent-web",
"name": "high-web",
"version": "0.0.0",
"scripts": {
"ng": "ng",

@ -15,14 +15,18 @@
</nz-form-control>
</nz-form-item>
</div>
<!-- <div nz-col nzSpan="6">-->
<!-- <nz-form-item>-->
<!-- <nz-form-label [nzSpan]="6">审核类型</nz-form-label>-->
<!-- <nz-form-control [nzSpan]="16">-->
<!-- <input nz-input formControlName="objectType"/>-->
<!-- </nz-form-control>-->
<!-- </nz-form-item>-->
<!-- </div>-->
<div nz-col nzSpan="6">
<nz-form-item>
<nz-form-label [nzSpan]="6">审核类型</nz-form-label>
<nz-form-control [nzSpan]="16">
<nz-select formControlName="objectType">
<nz-option nzValue="1" nzLabel="Jack"></nz-option>
<nz-option nzValue="2" nzLabel="Lucy"></nz-option>
<nz-option nzValue="disabled" nzLabel="Disabled" nzDisabled></nz-option>
</nz-select>
</nz-form-control>
</nz-form-item>
</div>
<div nz-col nzSpan="6">
<nz-form-item>
<nz-form-label [nzSpan]="6">审核流水号</nz-form-label>
@ -80,13 +84,34 @@
<td>{{data.createTime | date: 'yyyy-MM-dd HH:mm'}}</td>
<td>{{data.status | auditStatus}}</td>
<td nzRight="0px" class="table-td-operation">
<a (click)="getEdit(data.id)"><i nz-icon nzType="form" nzTheme="outline" nz-tooltip="编辑"></i></a>
<nz-divider nzType="vertical"></nz-divider>
<a (click)="getDetail(data.id)"><i nz-icon [nzIconfont]="'icon-xiangqing'" nz-tooltip="审核详情"></i></a>
</td>
</tbody>
</nz-table>
</div>
<nz-modal [(nzVisible)]="isVisible" nzWidth="900" nzTitle="审核详情" (nzOnCancel)="handleCancel()">
<ng-container>
<nz-descriptions nzBordered>
<nz-descriptions-item nzTitle="审核类型" >{{data['approve']['objectType'] | auditType}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="审核状态">{{data['approve']['status'] | auditStatus}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="申请人员">{{data['approve']['submitOperatorName']}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="审核名称">{{data['approve']['objectName']}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="卡券KEY">{{data['object']['couponKey']}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="卡券面值">¥{{data['object']['couponPrice']}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="销售价格">¥{{data['object']['salesPrice']}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="折扣价格">¥{{data['object']['salesPrice']}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="销售数量">{{data['object']['salesCount']}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="限购数量">{{data['object']['limitNumber']}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="归库天数">{{data['object']['recycleDay']}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="卡券类型">{{data['object']['couponType'] === 1 ? '内部卷' : '外部卷'}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="销售截至时间">{{data['object']['salesEndTime'] | date : 'yyyy-MM-dd'}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="创建时间">{{data['object']['createTime'] | date : 'yyyy-MM-dd'}}</nz-descriptions-item>
</nz-descriptions>
</ng-container>
<div *nzModalFooter>
<button nz-button nzType="default" (click)="approveProcessed(2)">审核驳回</button>
<button nz-button nzType="primary" (click)="approveProcessed(3)">审核通过</button>
</div>
</nz-modal>

@ -4,6 +4,7 @@ import {IconService} from '../../../services/icon.service';
import {NzMessageService} from 'ng-zorro-antd';
import {ActivatedRoute, Router} from '@angular/router';
import {AuditService} from '../../../services/audit.service';
import {CommonsService} from '../../../services/commons.service';
@Component({
selector: 'app-audit-coupon',
@ -18,14 +19,18 @@ export class AuditCouponComponent implements OnInit {
pageNum = 1; // 页码
pageSize = 10; // 条码
loading = true;
isVisible = false;
id: number;
data = {
approve: {},
object: {}
};
constructor(
private form: FormBuilder,
private audit: AuditService,
private iconService: IconService,
private message: NzMessageService,
private router: Router,
private activatedRoute: ActivatedRoute,
private common: CommonsService,
) {
}
@ -71,14 +76,41 @@ export class AuditCouponComponent implements OnInit {
// 查看详情
public getDetail(id: number): void {
this.id = id;
this.audit.getApproveDetail(id, data => {
console.log(data);
if (data['return_code'] === '000000') {
this.data = data['return_data'];
this.isVisible = true;
} else {
this.message.error(data['return_msg']);
}
});
// this.router.navigate(['/admin/merchantStore/store-detail'], {
// queryParams: {
// storeId: id
// }
// }).then(r => console.log(r));
}
handleCancel(): void {
this.isVisible = false;
}
public approveProcessed(statusD: number): void {
const p = {
approveId: this.id,
status: statusD,
remarks: '',
};
this.common.showConfirm('是否确定' , r => {
if (r) {
this.audit.approveProcessed(p , data => {
if (data['return_code'] === '000000') {
this.isVisible = false;
this.getRequest(true, this.searchForm.value);
this.message.success('操作成功');
} else {
this.message.error(data['return_msg']);
}
});
}
});
}
}

@ -158,7 +158,7 @@ export class CmsContentComponent implements OnInit {
private modalService: NzModalService, // 对话框
private store: LocalStorageService , // 请求缓存
) {
this.WEB_SERVE_URL = environment.baseUrl;
this.WEB_SERVE_URL = environment.imageUrl;
this.searchCompanyId = this.store.get(ADMIN_INFO_OBJECT)['secUser']['companyId'];
}

@ -65,7 +65,7 @@
<td>{{data.regionName}}</td>
<td>{{data.name}}</td>
<td>
<img class="head_img" src="{{data.logo}}" onerror="this.src='../../../../assets/admin/navigation/icon.png'" alt="">
<img class="head_img" src="{{WEB_SERVE_URL + data.logo}}" onerror="this.src='../../../../assets/admin/navigation/icon.png'" alt="">
</td>
<td>{{data.phone}}</td>
<td>{{data.address}}</td>

@ -1,11 +1,11 @@
import { Component, OnInit } from '@angular/core';
import {FormBuilder, FormGroup} from '@angular/forms';
import {MerchantService} from '../../../services/merchant.service';
import {IconService} from '../../../services/icon.service';
import {NzMessageService} from 'ng-zorro-antd';
import {Router} from '@angular/router';
import {CommonsService} from '../../../services/commons.service';
import {CompanyService} from '../../../services/company.service';
import {environment} from '../../../../environments/environment';
@Component({
selector: 'app-company-list',
@ -13,7 +13,7 @@ import {CompanyService} from '../../../services/company.service';
styleUrls: ['./company-list.component.scss']
})
export class CompanyListComponent implements OnInit {
WEB_SERVE_URL = environment.imageUrl;
searchForm: FormGroup; // 搜索框
requestData = []; // 列表数据
total: number; // 页码

@ -49,9 +49,9 @@
</div>
<div nz-col [nzSpan]="8">
<nz-form-item>
<nz-form-label [nzFor]="'salesCount'" nzRequired>销售数量</nz-form-label>
<nz-form-control nzErrorTip="请输入销售数量!">
<input nz-input placeholder="请输入销售数量 ..." [formControlName]="'salesCount'" id="'salesCount'" />
<nz-form-label [nzFor]="'discountPrice'" nzRequired>折扣价格</nz-form-label>
<nz-form-control nzErrorTip="请输入折扣价格!">
<input nz-input placeholder="请输入折扣价格..." [formControlName]="'discountPrice'" id="'discountPrice'" />
</nz-form-control>
</nz-form-item>
</div>

@ -76,7 +76,7 @@ export class CouponEditComponent implements OnInit {
recycleDay: [1, [Validators.required]],
limitNumber: [null, [Validators.required]],
salesPrice: [null, [Validators.required]],
salesCount: [null, [Validators.required]],
discountPrice: [null, [Validators.required]],
merchantId: [null, [Validators.required]],
isPresent: [false, [Validators.required]],
handselCouponId: [null],
@ -223,7 +223,7 @@ export class CouponEditComponent implements OnInit {
this.getBack();
this.message.success('修改成功,卡券已下架!');
} else {
this.message.create('error', '修改失败');
this.message.error(data['return_msg']);
}
});
}
@ -235,7 +235,7 @@ export class CouponEditComponent implements OnInit {
this.getBack();
this.message.success('添加成功');
} else {
this.message.create('error', '保存失败');
this.message.error(data['return_msg']);
}
});
}

@ -16,11 +16,11 @@
width: 111px;
height: 40px;
}
.talent-url {
.high-url {
float: right;
margin-top: 20px;
}
.talent-url a {
.high-url a {
width: 128px;
height: 16px;
font-size: 16px;

@ -89,7 +89,7 @@
<td>{{data.merchantKey}}</td>
<td>{{data.merchantName}}</td>
<td>
<img class="head_img" src="{{data.merchantLogo}}" onerror="this.src='../../../../assets/admin/navigation/icon.png'" alt="">
<img class="head_img" src="{{WEB_SERVE_URL + data.merchantLogo}}" onerror="this.src='../../../../assets/admin/navigation/icon.png'" alt="">
</td>
<td>{{data.telephone}}</td>
<td>{{data.createTime | date: 'yyyy-MM-dd HH:mm'}}</td>

@ -6,6 +6,7 @@ import {NzMessageService} from 'ng-zorro-antd';
import {CommonsService} from '../../../services/commons.service';
import {MerchantService} from '../../../services/merchant.service';
import {Router} from '@angular/router';
import {environment} from '../../../../environments/environment';
@Component({
selector: 'app-merchant-list',
@ -13,7 +14,7 @@ import {Router} from '@angular/router';
styleUrls: ['./merchant-list.component.scss']
})
export class MerchantListComponent implements OnInit {
WEB_SERVE_URL = environment.baseUrl;
searchForm: FormGroup; // 搜索框
requestData = []; // 列表数据
total: number; // 页码

@ -0,0 +1,15 @@
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'app-price-edit',
templateUrl: './price-edit.component.html',
styleUrls: ['./price-edit.component.scss']
})
export class PriceEditComponent implements OnInit {
constructor() { }
ngOnInit(): void {
}
}

@ -0,0 +1,15 @@
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'app-price-list',
templateUrl: './price-list.component.html',
styleUrls: ['./price-list.component.scss']
})
export class PriceListComponent implements OnInit {
constructor() { }
ngOnInit(): void {
}
}

@ -0,0 +1,16 @@
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import {PriceListComponent} from './price-list/price-list.component';
import {PriceEditComponent} from './price-edit/price-edit.component';
const routes: Routes = [
{ path: 'price-list', component: PriceListComponent },
{ path: 'price-edit', component: PriceEditComponent},
];
@NgModule({
imports: [RouterModule.forChild(routes)],
exports: [RouterModule]
})
export class PriceRoutingModule { }

@ -0,0 +1,27 @@
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { PriceRoutingModule } from './price-routing.module';
import { PriceListComponent } from './price-list/price-list.component';
import { PriceEditComponent } from './price-edit/price-edit.component';
import {NgZorroAntdModule} from 'ng-zorro-antd';
import {SeparateModule} from '../../common/separate/separate.module';
import {FormsModule, ReactiveFormsModule} from '@angular/forms';
import {BreadcrumbModule} from '../../common/breadcrumb/breadcrumb.module';
import {RegionSelectorModule} from '../../common/region-selector/region-selector.module';
@NgModule({
declarations: [PriceListComponent, PriceEditComponent],
imports: [
CommonModule,
PriceRoutingModule,
NgZorroAntdModule,
SeparateModule,
ReactiveFormsModule,
FormsModule,
BreadcrumbModule,
RegionSelectorModule
]
})
export class PriceModule { }

@ -86,7 +86,7 @@
<td>{{i+1}}</td>
<td>{{data.name}}</td>
<td>
<img class="head_img" src="{{data.headerImg}}" onerror="this.src='../../../../assets/admin/navigation/icon.png'" alt="">
<img class="head_img" src="{{WEB_SERVE_URL + data.headerImg}}" onerror="this.src='../../../../assets/admin/navigation/icon.png'" alt="">
</td>
<td>{{data.phone}}</td>
<td>{{data.sex}}</td>

@ -4,6 +4,7 @@ import {UserService} from '../../../services/user.service';
import {NzMessageService} from 'ng-zorro-antd';
import {IconService} from '../../../services/icon.service';
import {CommonsService} from '../../../services/commons.service';
import {environment} from '../../../../environments/environment';
@Component({
selector: 'app-user-list',
@ -11,7 +12,7 @@ import {CommonsService} from '../../../services/commons.service';
styleUrls: ['./user-list.component.scss']
})
export class UserListComponent implements OnInit {
WEB_SERVE_URL = environment.baseUrl;
searchForm: FormGroup; // 搜索框
requestData = []; // 列表数据
total: number; // 页码

@ -46,6 +46,11 @@ const routes: Routes = [
loadChildren: () => import('./admin/company/company.module').then(m => m.CompanyModule),
canActivate: [InitGuardService]
},
{
path: 'price',
loadChildren: () => import('./admin/price/price.module').then(m => m.PriceModule),
canActivate: [InitGuardService]
},
{
path: 'audit',
loadChildren: () => import('./admin/audit/audit.module').then(m => m.AuditModule),

@ -37,4 +37,18 @@ export class AuditService {
});
}
/**
*
*
* @param params
* @param callBack
* @return data
*/
public approveProcessed(params: object, callBack) {
this.http.post(environment.baseUrl + 'audit/approveProcessed', params).subscribe(data => {
callBack(data);
});
}
}

@ -12,7 +12,7 @@ export class IconService {
constructor(private iconService: NzIconService) {
this.iconService.fetchFromIconfont({
scriptUrl: 'https://at.alicdn.com/t/font_2424521_5v9iqxejc8h.js'
scriptUrl: 'https://at.alicdn.com/t/font_2424521_j7tpclfptw.js'
});
}
}

@ -1,5 +1,5 @@
export const environment = {
production: true,
baseUrl: 'https://newtalent.shinwoten.cn/crest/', // 测试环境服务器地址(请求数据地址)
imageUrl: 'http://newtalent.shinwoten.cn/filesystem/',
baseUrl: 'https://newhigh.shinwoten.cn/crest/', // 测试环境服务器地址(请求数据地址)
imageUrl: 'http://newhigh.shinwoten.cn/filesystem/',
};

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

Loading…
Cancel
Save