From 95349eef2e35582d144be2d309b39807c346b181 Mon Sep 17 00:00:00 2001 From: Sum1Dream <418471657@qq.com> Date: Wed, 24 Mar 2021 19:29:39 +0800 Subject: [PATCH] =?UTF-8?q?'=E6=8F=90=E4=BA=A4=E4=BB=A3=E8=A1=A8'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 +- angular.json | 18 +++---- e2e/src/app.e2e-spec.ts | 2 +- karma.conf.js | 2 +- package-lock.json | 2 +- package.json | 2 +- .../audit-coupon/audit-coupon.component.html | 47 +++++++++++++---- .../audit-coupon/audit-coupon.component.ts | 50 +++++++++++++++---- .../cms/cms-content/cms-content.component.ts | 2 +- .../company-list/company-list.component.html | 2 +- .../company-list/company-list.component.ts | 4 +- .../coupon-edit/coupon-edit.component.html | 6 +-- .../coupon-edit/coupon-edit.component.ts | 6 +-- .../admin/login/login/login.component.less | 4 +- .../merchant-list.component.html | 2 +- .../merchant-list/merchant-list.component.ts | 3 +- .../price-edit/price-edit.component.html | 1 + .../price-edit/price-edit.component.scss | 0 .../price/price-edit/price-edit.component.ts | 15 ++++++ .../price-list/price-list.component.html | 1 + .../price-list/price-list.component.scss | 0 .../price/price-list/price-list.component.ts | 15 ++++++ src/app/admin/price/price-routing.module.ts | 16 ++++++ src/app/admin/price/price.module.ts | 27 ++++++++++ .../user/user-list/user-list.component.html | 2 +- .../user/user-list/user-list.component.ts | 3 +- src/app/app-routing.module.ts | 5 ++ src/app/services/audit.service.ts | 14 ++++++ src/app/services/icon.service.ts | 2 +- src/environments/environment.test.ts | 4 +- src/environments/environment.ts | 7 +-- 31 files changed, 210 insertions(+), 56 deletions(-) create mode 100644 src/app/admin/price/price-edit/price-edit.component.html create mode 100644 src/app/admin/price/price-edit/price-edit.component.scss create mode 100644 src/app/admin/price/price-edit/price-edit.component.ts create mode 100644 src/app/admin/price/price-list/price-list.component.html create mode 100644 src/app/admin/price/price-list/price-list.component.scss create mode 100644 src/app/admin/price/price-list/price-list.component.ts create mode 100644 src/app/admin/price/price-routing.module.ts create mode 100644 src/app/admin/price/price.module.ts diff --git a/README.md b/README.md index bdc27d6..8b17206 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# TalentWeb +# highWeb This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 9.0.2. diff --git a/angular.json b/angular.json index 8793311..1253466 100644 --- a/angular.json +++ b/angular.json @@ -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" } diff --git a/e2e/src/app.e2e-spec.ts b/e2e/src/app.e2e-spec.ts index f869c5d..39fc2dd 100644 --- a/e2e/src/app.e2e-spec.ts +++ b/e2e/src/app.e2e-spec.ts @@ -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 () => { diff --git a/karma.conf.js b/karma.conf.js index 9a44b67..e180150 100644 --- a/karma.conf.js +++ b/karma.conf.js @@ -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 }, diff --git a/package-lock.json b/package-lock.json index ee7b893..e10e242 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,5 +1,5 @@ { - "name": "talent-web", + "name": "high-web", "version": "0.0.0", "lockfileVersion": 1, "requires": true, diff --git a/package.json b/package.json index 9cdc7c7..6550d0e 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "talent-web", + "name": "high-web", "version": "0.0.0", "scripts": { "ng": "ng", diff --git a/src/app/admin/audit/audit-coupon/audit-coupon.component.html b/src/app/admin/audit/audit-coupon/audit-coupon.component.html index 62c67af..64917a8 100644 --- a/src/app/admin/audit/audit-coupon/audit-coupon.component.html +++ b/src/app/admin/audit/audit-coupon/audit-coupon.component.html @@ -15,14 +15,18 @@ - - - - - - - - +
+ + 审核类型 + + + + + + + + +
审核流水号 @@ -80,13 +84,34 @@ {{data.createTime | date: 'yyyy-MM-dd HH:mm'}} {{data.status | auditStatus}} - -
- + + + + {{data['approve']['objectType'] | auditType}} + {{data['approve']['status'] | auditStatus}} + {{data['approve']['submitOperatorName']}} + {{data['approve']['objectName']}} + {{data['object']['couponKey']}} + ¥{{data['object']['couponPrice']}} + ¥{{data['object']['salesPrice']}} + ¥{{data['object']['salesPrice']}} + {{data['object']['salesCount']}} + {{data['object']['limitNumber']}} + {{data['object']['recycleDay']}} + {{data['object']['couponType'] === 1 ? '内部卷' : '外部卷'}} + {{data['object']['salesEndTime'] | date : 'yyyy-MM-dd'}} + {{data['object']['createTime'] | date : 'yyyy-MM-dd'}} + + +
+ + +
+
diff --git a/src/app/admin/audit/audit-coupon/audit-coupon.component.ts b/src/app/admin/audit/audit-coupon/audit-coupon.component.ts index e1a500c..be0ce01 100644 --- a/src/app/admin/audit/audit-coupon/audit-coupon.component.ts +++ b/src/app/admin/audit/audit-coupon/audit-coupon.component.ts @@ -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']); + } + }); + } + }); + + } } diff --git a/src/app/admin/cms/cms-content/cms-content.component.ts b/src/app/admin/cms/cms-content/cms-content.component.ts index 5abe28c..3bd7192 100644 --- a/src/app/admin/cms/cms-content/cms-content.component.ts +++ b/src/app/admin/cms/cms-content/cms-content.component.ts @@ -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']; } diff --git a/src/app/admin/company/company-list/company-list.component.html b/src/app/admin/company/company-list/company-list.component.html index 9834634..499f69b 100644 --- a/src/app/admin/company/company-list/company-list.component.html +++ b/src/app/admin/company/company-list/company-list.component.html @@ -65,7 +65,7 @@ {{data.regionName}} {{data.name}} - + {{data.phone}} {{data.address}} diff --git a/src/app/admin/company/company-list/company-list.component.ts b/src/app/admin/company/company-list/company-list.component.ts index 5ac2142..da609ca 100644 --- a/src/app/admin/company/company-list/company-list.component.ts +++ b/src/app/admin/company/company-list/company-list.component.ts @@ -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; // 页码 diff --git a/src/app/admin/coupon/coupon-edit/coupon-edit.component.html b/src/app/admin/coupon/coupon-edit/coupon-edit.component.html index 67624fc..aa7c7a2 100644 --- a/src/app/admin/coupon/coupon-edit/coupon-edit.component.html +++ b/src/app/admin/coupon/coupon-edit/coupon-edit.component.html @@ -49,9 +49,9 @@
- 销售数量 - - + 折扣价格 + +
diff --git a/src/app/admin/coupon/coupon-edit/coupon-edit.component.ts b/src/app/admin/coupon/coupon-edit/coupon-edit.component.ts index 64fd857..01b8f7e 100644 --- a/src/app/admin/coupon/coupon-edit/coupon-edit.component.ts +++ b/src/app/admin/coupon/coupon-edit/coupon-edit.component.ts @@ -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']); } }); } diff --git a/src/app/admin/login/login/login.component.less b/src/app/admin/login/login/login.component.less index 8bd3e5c..aee83c7 100644 --- a/src/app/admin/login/login/login.component.less +++ b/src/app/admin/login/login/login.component.less @@ -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; diff --git a/src/app/admin/merchant/merchant-list/merchant-list.component.html b/src/app/admin/merchant/merchant-list/merchant-list.component.html index 307cce4..dcecb3d 100644 --- a/src/app/admin/merchant/merchant-list/merchant-list.component.html +++ b/src/app/admin/merchant/merchant-list/merchant-list.component.html @@ -89,7 +89,7 @@ {{data.merchantKey}} {{data.merchantName}} - + {{data.telephone}} {{data.createTime | date: 'yyyy-MM-dd HH:mm'}} diff --git a/src/app/admin/merchant/merchant-list/merchant-list.component.ts b/src/app/admin/merchant/merchant-list/merchant-list.component.ts index 8a6d7fa..57d0e1d 100644 --- a/src/app/admin/merchant/merchant-list/merchant-list.component.ts +++ b/src/app/admin/merchant/merchant-list/merchant-list.component.ts @@ -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; // 页码 diff --git a/src/app/admin/price/price-edit/price-edit.component.html b/src/app/admin/price/price-edit/price-edit.component.html new file mode 100644 index 0000000..f69b601 --- /dev/null +++ b/src/app/admin/price/price-edit/price-edit.component.html @@ -0,0 +1 @@ +

price-edit works!

diff --git a/src/app/admin/price/price-edit/price-edit.component.scss b/src/app/admin/price/price-edit/price-edit.component.scss new file mode 100644 index 0000000..e69de29 diff --git a/src/app/admin/price/price-edit/price-edit.component.ts b/src/app/admin/price/price-edit/price-edit.component.ts new file mode 100644 index 0000000..0b9e935 --- /dev/null +++ b/src/app/admin/price/price-edit/price-edit.component.ts @@ -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 { + } + +} diff --git a/src/app/admin/price/price-list/price-list.component.html b/src/app/admin/price/price-list/price-list.component.html new file mode 100644 index 0000000..8462cfb --- /dev/null +++ b/src/app/admin/price/price-list/price-list.component.html @@ -0,0 +1 @@ +

price-list works!

diff --git a/src/app/admin/price/price-list/price-list.component.scss b/src/app/admin/price/price-list/price-list.component.scss new file mode 100644 index 0000000..e69de29 diff --git a/src/app/admin/price/price-list/price-list.component.ts b/src/app/admin/price/price-list/price-list.component.ts new file mode 100644 index 0000000..e576ed9 --- /dev/null +++ b/src/app/admin/price/price-list/price-list.component.ts @@ -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 { + } + +} diff --git a/src/app/admin/price/price-routing.module.ts b/src/app/admin/price/price-routing.module.ts new file mode 100644 index 0000000..97c71e9 --- /dev/null +++ b/src/app/admin/price/price-routing.module.ts @@ -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 { } diff --git a/src/app/admin/price/price.module.ts b/src/app/admin/price/price.module.ts new file mode 100644 index 0000000..7661e00 --- /dev/null +++ b/src/app/admin/price/price.module.ts @@ -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 { } diff --git a/src/app/admin/user/user-list/user-list.component.html b/src/app/admin/user/user-list/user-list.component.html index e39aa44..f8c9e41 100644 --- a/src/app/admin/user/user-list/user-list.component.html +++ b/src/app/admin/user/user-list/user-list.component.html @@ -86,7 +86,7 @@ {{i+1}} {{data.name}} - + {{data.phone}} {{data.sex}} diff --git a/src/app/admin/user/user-list/user-list.component.ts b/src/app/admin/user/user-list/user-list.component.ts index 740ebba..ab6e1df 100644 --- a/src/app/admin/user/user-list/user-list.component.ts +++ b/src/app/admin/user/user-list/user-list.component.ts @@ -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; // 页码 diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index de5010a..6e6afe7 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -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), diff --git a/src/app/services/audit.service.ts b/src/app/services/audit.service.ts index e516314..77d67df 100644 --- a/src/app/services/audit.service.ts +++ b/src/app/services/audit.service.ts @@ -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); + }); + } + } diff --git a/src/app/services/icon.service.ts b/src/app/services/icon.service.ts index 99b4794..28e4b80 100644 --- a/src/app/services/icon.service.ts +++ b/src/app/services/icon.service.ts @@ -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' }); } } diff --git a/src/environments/environment.test.ts b/src/environments/environment.test.ts index 2f13a5f..3ee1a1c 100644 --- a/src/environments/environment.test.ts +++ b/src/environments/environment.test.ts @@ -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/', }; diff --git a/src/environments/environment.ts b/src/environments/environment.ts index 983168a..184a1dc 100644 --- a/src/environments/environment.ts +++ b/src/environments/environment.ts @@ -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/', }; /*