diff --git a/src/app/app.routes.ts b/src/app/app.routes.ts index 39967ef..58649d1 100644 --- a/src/app/app.routes.ts +++ b/src/app/app.routes.ts @@ -1,6 +1,7 @@ import { Routes } from '@angular/router'; import {IndexComponent} from "./pages/body/index/index.component"; import {InitGuardService} from "./utils/initGuard.service"; +import {AUDIT_ROUTES} from "./pages/audit/audit.routes"; export const routes: Routes = [ {path: '', pathMatch: 'full', redirectTo: 'admin/index'}, { @@ -49,6 +50,11 @@ export const routes: Routes = [ loadChildren: () => import('./pages/marketing/marketing.routes').then(m => m.MARKETING_ROUTES), canActivate: [InitGuardService] }, + { + path: 'audit', + loadChildren: () => import('./pages/audit/audit.routes').then(m => m.AUDIT_ROUTES), + canActivate: [InitGuardService] + }, ] } ]; diff --git a/src/app/pages/audit/audit-list/audit-list.component.html b/src/app/pages/audit/audit-list/audit-list.component.html new file mode 100644 index 0000000..357468a --- /dev/null +++ b/src/app/pages/audit/audit-list/audit-list.component.html @@ -0,0 +1,192 @@ +
+
+
+ + 审核内容名称 + + + + +
+
+ + 审核提交人 + + + + +
+ +
+ + 审核状态 + + + + + + + + +
+
+ + +
+
+
+ + + + + 审核对象 + 提交人名称 + 审核流水号 + 创建时间 + 更新时间 + 状态 + 操作 + + + + + {{data.submitObjectName}} + {{data.submitOpName}} + {{data.auditSerialNo}} + {{ data.createTime | date: 'yyyy-MM-dd HH:mm'}} + {{ data.updateTime | date: 'yyyy-MM-dd HH:mm'}} + {{data.status | auditStatus}} + + 详情 + + + 更多 + + + + + + + + + 总计 {{ total }} 条 + + + + + + {{ auditDetail.auditSerialNo }} + {{ auditDetail.submitOpName }} + {{ auditDetail.auditOpName }} + {{ auditDetail.submitObjectName }} + {{ auditDetail['goodsModel'].goodsTypeName + "/" + auditDetail['goodsModel'].goodsTypeParentName}} + {{ auditDetail['goodsModel'].goodsBrandName }} + {{ auditDetail['goodsModel'].type == 1 ? '实物商品' : '虚拟商品' }} + {{ auditDetail['goodsModel'].goodsExplain}} + {{ auditDetail.createTime | date: 'yyyy-MM-dd HH:mm' }} + {{ auditDetail['goodsModel'].goodsLabel}} + {{ auditDetail.updateTime | date: 'yyyy-MM-dd HH:mm' }} + {{ auditDetail.remarks}} + + + + + + + + + + + + + + + + + + + + + +

规格列表

+ + + + 规格名称 + 价格(RMB) + 图片 + 限购(个) + 库存(个) + 时间 + 虚拟产品 + + + 售价 + 原价 + 销售截止时间 + 创建时间 + 卡密 + 归库天数 + 类型 + 产品来源 + 跳转类型 + 跳转地址 + 应用ID + + + + + + {{data.name}} + + ¥{{data.salePrice}} + + + ¥{{data.originalPrice}} + + + + + {{data.purLimit}} + {{data.stock}} + {{ data.salesEndTime | date: 'yyyy-MM-dd HH:mm'}} + {{ data.createTime | date: 'yyyy-MM-dd HH:mm'}} + {{data.key}} + {{data.validDay}} + {{data.type == 1 ? '内部虚拟商品' : '外部虚拟产品'}} + {{data.source | dictionary: 'GOODS_VPD_SOURCE'}} + {{data.jumpType == 1 ? '小程序' : 'H5'}} + {{data.jumpUrl}} + {{data.appid}} + + + + +
+
+ + +
+
+ + + + + + diff --git a/src/app/pages/audit/audit-list/audit-list.component.less b/src/app/pages/audit/audit-list/audit-list.component.less new file mode 100644 index 0000000..de21fc1 --- /dev/null +++ b/src/app/pages/audit/audit-list/audit-list.component.less @@ -0,0 +1,15 @@ +[nz-form-label] { + overflow: visible; +} +button { + margin-left: 8px; +} +.submit-btn { + width: 150px; +} +.search-area { + margin-top: 30px; +} +nz-select { + width: 100%; +} diff --git a/src/app/pages/audit/audit-list/audit-list.component.ts b/src/app/pages/audit/audit-list/audit-list.component.ts new file mode 100644 index 0000000..5fd8098 --- /dev/null +++ b/src/app/pages/audit/audit-list/audit-list.component.ts @@ -0,0 +1,197 @@ +import { Component } from '@angular/core'; +import {DatePipe, NgForOf, NgIf} from "@angular/common"; +import {DictionaryPipe} from "../../../pipes/common/dictionary.pipe"; +import {FormGroup, FormsModule, NonNullableFormBuilder, ReactiveFormsModule, Validators} from "@angular/forms"; +import {NzButtonComponent} from "ng-zorro-antd/button"; +import { + NzCellFixedDirective, + NzTableCellDirective, + NzTableComponent, + NzTbodyComponent, NzTheadComponent, + NzThMeasureDirective, NzTrDirective +} from "ng-zorro-antd/table"; +import {NzColDirective, NzRowDirective} from "ng-zorro-antd/grid"; +import {NzDatePickerComponent} from "ng-zorro-antd/date-picker"; +import {NzDividerComponent} from "ng-zorro-antd/divider"; +import {NzDropDownADirective, NzDropDownDirective, NzDropdownMenuComponent} from "ng-zorro-antd/dropdown"; +import {NzFormControlComponent, NzFormDirective, NzFormItemComponent, NzFormLabelComponent} from "ng-zorro-antd/form"; +import {NzIconDirective} from "ng-zorro-antd/icon"; +import {NzImageDirective, NzImageGroupComponent, NzImageModule} from "ng-zorro-antd/image"; +import {NzInputDirective} from "ng-zorro-antd/input"; +import { + NzInputNumberComponent, + NzInputNumberGroupComponent, + NzInputNumberGroupWhitSuffixOrPrefixDirective +} from "ng-zorro-antd/input-number"; +import {NzMenuDirective, NzMenuItemComponent} from "ng-zorro-antd/menu"; +import {NzModalComponent, NzModalContentDirective, NzModalFooterDirective, NzModalModule} from "ng-zorro-antd/modal"; +import {NzOptionComponent, NzSelectComponent} from "ng-zorro-antd/select"; +import {NzPopconfirmDirective} from "ng-zorro-antd/popconfirm"; +import {NzUploadComponent} from "ng-zorro-antd/upload"; +import {environment} from "../../../../environments/environment"; +import {NzMessageService} from "ng-zorro-antd/message"; +import {DiscountService} from "../../../services/marketing/discount.service"; +import { fallbackImg } from '../../../data/goods/goods.namespace'; +import {AuditService} from "../../../services/audit/audit.service"; +import {NzTreeSelectComponent} from "ng-zorro-antd/tree-select"; +import {NzDescriptionsComponent, NzDescriptionsItemComponent} from "ng-zorro-antd/descriptions"; +import {NzBadgeComponent} from "ng-zorro-antd/badge"; +import {AuditStatusPipe} from "../../../pipes/audit/audit-status.pipe"; +import {NzTypographyComponent} from "ng-zorro-antd/typography"; + +@Component({ + selector: 'app-audit-list', + standalone: true, + imports: [ + DatePipe, + DictionaryPipe, + FormsModule, + NgForOf, + NgIf, + NzButtonComponent, + NzCellFixedDirective, + NzColDirective, + NzDatePickerComponent, + NzDividerComponent, + NzDropDownADirective, + NzDropDownDirective, + NzDropdownMenuComponent, + NzFormControlComponent, + NzFormDirective, + NzFormItemComponent, + NzFormLabelComponent, + NzIconDirective, + NzImageDirective, + NzInputDirective, + NzInputNumberComponent, + NzInputNumberGroupComponent, + NzInputNumberGroupWhitSuffixOrPrefixDirective, + NzMenuDirective, + NzMenuItemComponent, + NzModalComponent, + NzOptionComponent, + NzPopconfirmDirective, + NzRowDirective, + NzModalModule, + NzImageModule, + NzSelectComponent, + NzTableCellDirective, + NzTableComponent, + NzTbodyComponent, + NzThMeasureDirective, + NzTheadComponent, + NzTrDirective, + NzUploadComponent, + ReactiveFormsModule, + NzTreeSelectComponent, + NzDescriptionsItemComponent, + NzBadgeComponent, + NzDescriptionsComponent, + NzModalFooterDirective, + NzModalContentDirective, + AuditStatusPipe, + NzImageGroupComponent, + NzTypographyComponent + ], + templateUrl: './audit-list.component.html', + styleUrl: './audit-list.component.less' +}) +export class AuditListComponent { + // 表单页数 + tablePageNum = 1; + // 表单数据 + tableData: any = { + total: 0, + loading: false, + list: [], + }; + // 搜索表单 + searchForm: FormGroup; + auditDetail: any = { + goodsModel: {} + }; + + baseUrl = environment.baseUrl; + imageUrl = environment.imageUrl; + isVisibleDetail = false; + isVisibleAudit = false; + postAudit:any; + remarks: string | undefined; + + protected readonly fallbackImg = fallbackImg; + + constructor(private fb: NonNullableFormBuilder, + private msg: NzMessageService, + private auditService: AuditService, + private discountService: DiscountService) { + + // 初始化搜索框 + this.searchForm = this.fb.group({ + submitObjectName: [''], + submitOpName: [''], + status: [''], + }); + + this.getRequest(); + + + } + + showDetail(id: number): void { + this.isVisibleDetail = true; + let params = { + id: id, + time: new Date().getTime() + } + this.auditService.auditDetail(params , (data: any) => { + if (data['return_code'] == '000000') { + this.auditDetail = data['return_data']; + } + }) + } + + // 查询列表 + public getRequest(reset: boolean = false) { + this.tableData.loading = true; + if (reset) { + this.tablePageNum = 1; + } + this.searchForm.value.pageNum = this.tablePageNum; + this.searchForm.value.pageSize = 10; + this.searchForm.value.time = new Date().getTime(); + + this.auditService.getListGoodsAudit(this.searchForm.value , (data: any) => { + if (data['return_code'] == '000000') { + this.tableData = data['return_data']; + } else { + this.msg.error(data['return_msg']); + } + this.tableData.loading = false; + }); + } + + passOrOverrule(id: number , auditStatus: number): void { + this.postAudit = { + id: id, + time: new Date().getTime(), + status: auditStatus + } + + this.isVisibleAudit = true; + + } + + postAuditMsg(): void { + this.postAudit.remarks = this.remarks; + this.auditService.auditMsg(this.postAudit , (data: any) => { + if (data['return_code'] == '000000') { + this.getRequest(true); + this.msg.success("操作成功") + } else { + this.msg.error(data['return_msg']); + } + this.isVisibleAudit = false; + }); + } + +} diff --git a/src/app/pages/audit/audit.module.ts b/src/app/pages/audit/audit.module.ts new file mode 100644 index 0000000..096c3ce --- /dev/null +++ b/src/app/pages/audit/audit.module.ts @@ -0,0 +1,12 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; + + + +@NgModule({ + declarations: [], + imports: [ + CommonModule + ] +}) +export class AuditModule { } diff --git a/src/app/pages/audit/audit.routes.ts b/src/app/pages/audit/audit.routes.ts new file mode 100644 index 0000000..599ebd1 --- /dev/null +++ b/src/app/pages/audit/audit.routes.ts @@ -0,0 +1,6 @@ +import { Routes } from '@angular/router'; +import {AuditListComponent} from "./audit-list/audit-list.component"; + +export const AUDIT_ROUTES: Routes = [ + { path: 'audit-goods-list', component: AuditListComponent}, +]; diff --git a/src/app/pages/goods/goods-list/goods-list.component.html b/src/app/pages/goods/goods-list/goods-list.component.html index 8f4cae9..2dc902b 100644 --- a/src/app/pages/goods/goods-list/goods-list.component.html +++ b/src/app/pages/goods/goods-list/goods-list.component.html @@ -98,7 +98,7 @@ {{ data.updateTime | date: 'yyyy-MM-dd HH:mm'}} {{data.status | goodsStatus}} - 修改 + 修改 更多 @@ -107,7 +107,10 @@