diff --git a/src/app/pages/account/account.routes.ts b/src/app/pages/account/account.routes.ts index b5c3b24..e453f19 100644 --- a/src/app/pages/account/account.routes.ts +++ b/src/app/pages/account/account.routes.ts @@ -2,9 +2,11 @@ import { Routes } from '@angular/router'; import {SysAccountComponent} from "./sys-account/sys-account.component"; import {SysRoleComponent} from "./sys-role/sys-role.component"; import {UserComponent} from "./user/user.component"; +import {ComplaintComponent} from "./complaint/complaint.component"; export const ACCOUNT_ROUTES: Routes = [ { path: 'sys_account', component: SysAccountComponent}, { path: 'sys_role', component: SysRoleComponent}, { path: 'user_list', component: UserComponent}, + { path: 'complaint', component: ComplaintComponent}, ]; diff --git a/src/app/pages/goods/goods-brand/goods-brand.component.ts b/src/app/pages/goods/goods-brand/goods-brand.component.ts index 70bb0eb..371279b 100644 --- a/src/app/pages/goods/goods-brand/goods-brand.component.ts +++ b/src/app/pages/goods/goods-brand/goods-brand.component.ts @@ -161,6 +161,8 @@ export class GoodsBrandComponent { if (this.editForm.valid) { if (this.imgUrl.length !== 0) { this.editForm.value.imgUrl = this.commonService.imgList(this.imgUrl); + } else { + this.editForm.value.imgUrl = null; } this.goodsService.editGoodsBrand(this.editForm.value , (data: any) => { if (data['return_code'] === '000000') { 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 f496e95..eb3dd27 100644 --- a/src/app/pages/goods/goods-list/goods-list.component.html +++ b/src/app/pages/goods/goods-list/goods-list.component.html @@ -111,7 +111,7 @@ {{ data.updateTime | date: 'yyyy-MM-dd HH:mm'}} {{data.status | goodsStatus}} - 修改 + 修改 更多 @@ -174,13 +174,13 @@ - 商品标签 + 商品标签 - + - 商品说明 + 商品说明 @@ -295,7 +295,8 @@ 库存(个) 时间 - 虚拟产品 + 虚拟产品 + 跳转信息 操作 @@ -307,9 +308,9 @@ 归库天数 类型 产品来源 - 跳转类型 - 跳转地址 - 应用ID + 跳转类型 + 跳转地址 + 应用ID @@ -333,9 +334,9 @@ {{data.validDay}} {{data.type == 1 ? '内部虚拟商品' : '外部虚拟产品'}} {{data.source | dictionary: 'GOODS_VPD_SOURCE'}} - {{data.jumpType == 1 ? '小程序' : 'H5'}} - {{data.jumpUrl}} - {{data.appid}} + {{data.jumpType == 1 ? '小程序' : 'H5'}} + {{data.jumpUrl}} + {{data.appid}} 修改 @@ -415,28 +416,35 @@ 类型 - + + 卡密 - - 跳转类型 - + + 按钮名称 + + + + + + 跳转类型 + - + 跳转地址 diff --git a/src/app/pages/goods/goods-list/goods-list.component.ts b/src/app/pages/goods/goods-list/goods-list.component.ts index 8967682..8ee163d 100644 --- a/src/app/pages/goods/goods-list/goods-list.component.ts +++ b/src/app/pages/goods/goods-list/goods-list.component.ts @@ -180,7 +180,9 @@ export class GoodsListComponent { salesEndTime: [new Date(new Date().getFullYear(), new Date().getMonth(), new Date().getDay(), 23, 59, 59), [Validators.required]], type: [''], source: [''], + btnName: [''], id: [null], + status: [null], specsId: [null], jumpType: [null], jumpUrl: [null], @@ -430,21 +432,6 @@ export class GoodsListComponent { } } - typeChange(type: string): void { - if (type == "1") { - this.editSpecsForm.controls['jumpType'].clearValidators(); - this.editSpecsForm.controls['jumpType'].markAsPristine(); - - - } else { - this.editSpecsForm.controls['jumpType'].setValidators(Validators.required); - this.editSpecsForm.controls['jumpType'].markAsDirty(); - - - } - this.editSpecsForm.controls['jumpType'].updateValueAndValidity(); - } - jumpTypeChange(type: string): void { console.log("type", type); if (type == "2") { diff --git a/src/app/pages/goods/goods-type/goods-type.component.html b/src/app/pages/goods/goods-type/goods-type.component.html index 6766bc9..98041ce 100644 --- a/src/app/pages/goods/goods-type/goods-type.component.html +++ b/src/app/pages/goods/goods-type/goods-type.component.html @@ -58,6 +58,12 @@ + + 排序 + + + + 业务类型 diff --git a/src/app/pages/goods/goods-type/goods-type.component.ts b/src/app/pages/goods/goods-type/goods-type.component.ts index cfc94c3..9670e96 100644 --- a/src/app/pages/goods/goods-type/goods-type.component.ts +++ b/src/app/pages/goods/goods-type/goods-type.component.ts @@ -20,8 +20,8 @@ import {NzImageDirective , NzImageModule} from "ng-zorro-antd/image"; import {fallbackImg} from "../../../data/goods/goods.namespace"; import {NzTreeSelectComponent} from "ng-zorro-antd/tree-select"; import {NzDividerComponent} from "ng-zorro-antd/divider"; -import {it} from "node:test"; import {NzPopconfirmDirective} from "ng-zorro-antd/popconfirm"; +import {NzInputNumberComponent} from "ng-zorro-antd/input-number"; const getBase64 = (file: File): Promise => new Promise((resolve, reject) => { @@ -34,36 +34,37 @@ const getBase64 = (file: File): Promise => @Component({ selector: 'app-goods-type', standalone: true, - imports: [ - FormsModule, - NzButtonComponent, - NzColDirective, - NzFormControlComponent, - NzFormDirective, - NzFormItemComponent, - NzFormLabelComponent, - NzInputDirective, - NzRowDirective, - ReactiveFormsModule, - NgForOf, - NzOptionComponent, - NzSelectComponent, - NzModalModule, - NgIf, - NzUploadComponent, - NzIconDirective, - NzImageModule, - NgStyle, - NzTableComponent, - NzTdAddOnComponent, - NzTableModule, - DictionaryPipe, - DatePipe, - NzImageDirective, - NzTreeSelectComponent, - NzDividerComponent, - NzPopconfirmDirective - ], + imports: [ + FormsModule, + NzButtonComponent, + NzColDirective, + NzFormControlComponent, + NzFormDirective, + NzFormItemComponent, + NzFormLabelComponent, + NzInputDirective, + NzRowDirective, + ReactiveFormsModule, + NgForOf, + NzOptionComponent, + NzSelectComponent, + NzModalModule, + NgIf, + NzUploadComponent, + NzIconDirective, + NzImageModule, + NgStyle, + NzTableComponent, + NzTdAddOnComponent, + NzTableModule, + DictionaryPipe, + DatePipe, + NzImageDirective, + NzTreeSelectComponent, + NzDividerComponent, + NzPopconfirmDirective, + NzInputNumberComponent + ], templateUrl: './goods-type.component.html', styleUrl: './goods-type.component.less' }) @@ -106,6 +107,7 @@ export class GoodsTypeComponent { // 初始化 this.editGoodSTypeForm = this.fb.group({ title: ['' , [Validators.required]], + sort: ['' , [Validators.required]], parentId: [''], id: [null], businessType: ['' ,[Validators.required]], @@ -160,8 +162,6 @@ export class GoodsTypeComponent { return array; } - - // 插入数据 visitNode(node: GoodsTypeData, hashMap: { [key: string]: boolean }, array: GoodsTypeData[]): void { if (!hashMap[node.id]) { @@ -203,9 +203,12 @@ export class GoodsTypeComponent { } // 编辑表单提交 handleEdit(): void { + console.log(this.imgUrl); if (this.editGoodSTypeForm.valid) { if (this.imgUrl.length !== 0) { this.editGoodSTypeForm.value.imgUrl = this.commonService.imgList(this.imgUrl); + } else { + this.editGoodSTypeForm.value.imgUrl = null; } this.goodsType.editGoodsType(this.editGoodSTypeForm.value , (data: any) => { if (data['return_code'] === '000000') { diff --git a/src/app/pages/marketing/discount-list/discount-list.component.html b/src/app/pages/marketing/discount-list/discount-list.component.html index 98399d0..0946275 100644 --- a/src/app/pages/marketing/discount-list/discount-list.component.html +++ b/src/app/pages/marketing/discount-list/discount-list.component.html @@ -29,6 +29,18 @@ +
+ + 优惠券平台 + + + + + + + + +
@@ -110,6 +122,16 @@ + + 优惠券平台 + + + + + + + + 优惠券类型 diff --git a/src/app/pages/marketing/discount-list/discount-list.component.ts b/src/app/pages/marketing/discount-list/discount-list.component.ts index 1d3a404..bdff579 100644 --- a/src/app/pages/marketing/discount-list/discount-list.component.ts +++ b/src/app/pages/marketing/discount-list/discount-list.component.ts @@ -146,6 +146,7 @@ export class DiscountListComponent { this.searchForm = this.fb.group({ name: [''], type: [''], + platformCode: [''], status: [''], }); @@ -153,6 +154,7 @@ export class DiscountListComponent { this.editForm = this.fb.group({ name: ['' , [Validators.required]], type: ['' , [Validators.required]], + platformCode: ['' , [Validators.required]], effectiveNum: ['' , [Validators.required]], effectiveDay: ['' , [Validators.required]], salesEndTime: ['' , [Validators.required]], diff --git a/src/app/pages/system/system.routes.ts b/src/app/pages/system/system.routes.ts index 814413d..3fad4e9 100644 --- a/src/app/pages/system/system.routes.ts +++ b/src/app/pages/system/system.routes.ts @@ -1,6 +1,8 @@ import { Routes } from '@angular/router'; import {MenuComponent} from "./menu/menu.component"; +import {CmsComponent} from "./cms/cms.component"; export const SYSTEM_ROUTES: Routes = [ - { path: 'menu', component: MenuComponent} + { path: 'menu', component: MenuComponent}, + { path: 'cms', component: CmsComponent} ]; diff --git a/src/app/pages/trade/comp-order/comp-order.component.ts b/src/app/pages/trade/comp-order/comp-order.component.ts index fd1cc19..b761ce7 100644 --- a/src/app/pages/trade/comp-order/comp-order.component.ts +++ b/src/app/pages/trade/comp-order/comp-order.component.ts @@ -144,8 +144,8 @@ export class CompOrderComponent { queryData() { if (this.searchForm.controls['createTimeArray'].value != null && this.searchForm.controls['createTimeArray'].value.length > 0) { - this.searchForm.controls['createTimeS'].setValue(this.searchForm.controls['createTimeArray'].value[0].getTime()); - this.searchForm.controls['createTimeE'].setValue(this.searchForm.controls['createTimeArray'].value[1].getTime()); + this.searchForm.controls['createTimeS'].setValue(new Date(this.searchForm.controls['createTimeArray'].value[0]).getTime()); + this.searchForm.controls['createTimeE'].setValue(new Date(this.searchForm.controls['createTimeArray'].value[1]).getTime()); } else { this.searchForm.controls['createTimeS'].setValue(null) this.searchForm.controls['createTimeE'].setValue(null) @@ -183,7 +183,6 @@ export class CompOrderComponent { */ createTimeInit() { let createTimeSelect = this.searchForm.controls['createTimeSelect'].value; - console.log(createTimeSelect); if (createTimeSelect != null) { let timeObj = DateUtils.getDate(new Date(), Number(createTimeSelect)); this.searchForm.controls['createTimeArray'].setValue([timeObj.timeS, timeObj.timeE]); diff --git a/src/app/pages/trade/goods-list/goods-list.component.html b/src/app/pages/trade/goods-list/goods-list.component.html index dfed88a..c456ac6 100644 --- a/src/app/pages/trade/goods-list/goods-list.component.html +++ b/src/app/pages/trade/goods-list/goods-list.component.html @@ -104,6 +104,7 @@ 商品名称 + 商户名称 商品图片 商品分类 商品品牌 @@ -120,6 +121,7 @@ {{data.goodsName}} - {{data.goodsSpecsName}} + {{data.merName}} diff --git a/src/app/pages/trade/goods-list/goods-list.component.ts b/src/app/pages/trade/goods-list/goods-list.component.ts index 61b042d..5471a43 100644 --- a/src/app/pages/trade/goods-list/goods-list.component.ts +++ b/src/app/pages/trade/goods-list/goods-list.component.ts @@ -164,8 +164,8 @@ export class GoodsListComponent { if (this.searchForm.controls['createTimeArray'].value != null && this.searchForm.controls['createTimeArray'].value.length > 0) { - this.searchForm.controls['createTimeS'].setValue(this.searchForm.controls['createTimeArray'].value[0].getTime()); - this.searchForm.controls['createTimeE'].setValue(this.searchForm.controls['createTimeArray'].value[1].getTime()); + this.searchForm.controls['createTimeS'].setValue(new Date(this.searchForm.controls['createTimeArray'].value[0]).getTime()); + this.searchForm.controls['createTimeE'].setValue(new Date(this.searchForm.controls['createTimeArray'].value[1]).getTime()); } else { this.searchForm.controls['createTimeS'].setValue(null) this.searchForm.controls['createTimeE'].setValue(null) diff --git a/src/app/pages/trade/order-after-sales/order-after-sales.component.ts b/src/app/pages/trade/order-after-sales/order-after-sales.component.ts index f00f2c0..60665eb 100644 --- a/src/app/pages/trade/order-after-sales/order-after-sales.component.ts +++ b/src/app/pages/trade/order-after-sales/order-after-sales.component.ts @@ -155,8 +155,8 @@ export class OrderAfterSalesComponent { queryData() { if (this.searchForm.controls['createTimeArray'].value != null && this.searchForm.controls['createTimeArray'].value.length > 0) { - this.searchForm.controls['createTimeS'].setValue(this.searchForm.controls['createTimeArray'].value[0].getTime()); - this.searchForm.controls['createTimeE'].setValue(this.searchForm.controls['createTimeArray'].value[1].getTime()); + this.searchForm.controls['createTimeS'].setValue(new Date(this.searchForm.controls['createTimeArray'].value[0]).getTime()); + this.searchForm.controls['createTimeE'].setValue(new Date(this.searchForm.controls['createTimeArray'].value[1]).getTime()); } else { this.searchForm.controls['createTimeS'].setValue(null) this.searchForm.controls['createTimeE'].setValue(null) diff --git a/src/app/pages/trade/order-cinema/order-cinema.component.ts b/src/app/pages/trade/order-cinema/order-cinema.component.ts index 3873fac..4aba796 100644 --- a/src/app/pages/trade/order-cinema/order-cinema.component.ts +++ b/src/app/pages/trade/order-cinema/order-cinema.component.ts @@ -139,8 +139,8 @@ export class OrderCinemaComponent { if (this.searchForm.controls['createTimeArray'].value != null && this.searchForm.controls['createTimeArray'].value.length > 0) { - this.searchForm.controls['createTimeS'].setValue(this.searchForm.controls['createTimeArray'].value[0].getTime()); - this.searchForm.controls['createTimeE'].setValue(this.searchForm.controls['createTimeArray'].value[1].getTime()); + this.searchForm.controls['createTimeS'].setValue(new Date(this.searchForm.controls['createTimeArray'].value[0]).getTime()); + this.searchForm.controls['createTimeE'].setValue(new Date(this.searchForm.controls['createTimeArray'].value[1]).getTime()); } else { this.searchForm.controls['createTimeS'].setValue(null) this.searchForm.controls['createTimeE'].setValue(null) diff --git a/src/app/pages/trade/order-refund/order-refund.component.ts b/src/app/pages/trade/order-refund/order-refund.component.ts index a5690dd..3abd2f3 100644 --- a/src/app/pages/trade/order-refund/order-refund.component.ts +++ b/src/app/pages/trade/order-refund/order-refund.component.ts @@ -142,8 +142,8 @@ export class OrderRefundComponent { queryData() { if (this.searchForm.controls['createTimeArray'].value != null && this.searchForm.controls['createTimeArray'].value.length > 0) { - this.searchForm.controls['createTimeS'].setValue(this.searchForm.controls['createTimeArray'].value[0].getTime()); - this.searchForm.controls['createTimeE'].setValue(this.searchForm.controls['createTimeArray'].value[1].getTime()); + this.searchForm.controls['createTimeS'].setValue(new Date(this.searchForm.controls['createTimeArray'].value[0]).getTime()); + this.searchForm.controls['createTimeE'].setValue(new Date(this.searchForm.controls['createTimeArray'].value[1]).getTime()); } else { this.searchForm.controls['createTimeS'].setValue(null); this.searchForm.controls['createTimeE'].setValue(null); diff --git a/src/app/services/account/user.service.ts b/src/app/services/account/user.service.ts index aca3591..ade51c0 100644 --- a/src/app/services/account/user.service.ts +++ b/src/app/services/account/user.service.ts @@ -45,4 +45,17 @@ export class UserService { }); } + /** + * 查询用户投诉内容 + * @param params + * @param callBack + */ + public queryComplaintList(params: any, callBack:any) { + params.time = new Date().getTime(); + this.http.get(environment.baseUrl + 'user/queryComplaintList?'+ObjectData.objectByString(params)).subscribe(data => { + callBack(data); + }); + } + + } diff --git a/src/app/utils/dateUtils.service.ts b/src/app/utils/dateUtils.service.ts index 33859c6..7ef2e54 100644 --- a/src/app/utils/dateUtils.service.ts +++ b/src/app/utils/dateUtils.service.ts @@ -22,39 +22,30 @@ export class DateUtils { */ public static getDate(currentDate: Date, type: number): any { const returnObj = { - timeS: new Date(), - timeE: new Date(), + timeS: 0, + timeE: 0, } if (type === 1) { - const start = new Date(currentDate); - - start.setHours(0); - start.setMinutes(0); - start.setSeconds(0); - returnObj.timeS = start; - - const end = new Date(currentDate); - end.setHours(23); - end.setMinutes(59); - end.setSeconds(59); - returnObj.timeE = currentDate; + currentDate.setHours(0); + currentDate.setMinutes(0); + currentDate.setSeconds(0); + returnObj.timeS = currentDate.getTime(); + currentDate.setHours(23); + currentDate.setMinutes(59); + currentDate.setSeconds(59); + returnObj.timeE = currentDate.getTime(); } else if (type === 2) { - - const start = new Date(currentDate); - start.setDate(currentDate.getDate() - 1) - start.setHours(0); - start.setMinutes(0); - start.setSeconds(0); - returnObj.timeS = start; - - const end = new Date(currentDate); - end.setDate(currentDate.getDate() - 1) - end.setHours(23); - end.setMinutes(59); - end.setSeconds(59); - returnObj.timeE = end; + currentDate.setDate(currentDate.getDate() - 1) + currentDate.setHours(0); + currentDate.setMinutes(0); + currentDate.setSeconds(0); + returnObj.timeS = currentDate.getTime(); + currentDate.setHours(23); + currentDate.setMinutes(59); + currentDate.setSeconds(59); + returnObj.timeE = currentDate.getTime(); } else if (type === 3) { const dayOfWeek = currentDate.getDay(); @@ -65,14 +56,14 @@ export class DateUtils { start.setHours(0); start.setMinutes(0); start.setSeconds(0); - returnObj.timeS = start; + returnObj.timeS = start.getTime(); const end = new Date(currentDate); end.setDate(end.getDate() + 6) end.setHours(23); end.setMinutes(59); end.setSeconds(59); - returnObj.timeE = end; + returnObj.timeE = end.getTime(); } else if (type === 4) { const startOfThisWeek = new Date(currentDate.getFullYear(),currentDate.getMonth(),currentDate.getDate() - currentDate.getDay() + 1); @@ -82,12 +73,12 @@ export class DateUtils { startOfLastWeek .setHours(0); startOfLastWeek .setMinutes(0); startOfLastWeek .setSeconds(0); - returnObj.timeS = startOfLastWeek; + returnObj.timeS = startOfLastWeek .getTime(); endOfLastWeek.setHours(23); endOfLastWeek.setMinutes(59); endOfLastWeek.setSeconds(59); - returnObj.timeE = endOfLastWeek; + returnObj.timeE = endOfLastWeek.getTime(); } else if (type === 5) { var daysInMonth = new Date(currentDate.getFullYear(), currentDate.getMonth()+1, 0).getDate(); @@ -97,14 +88,14 @@ export class DateUtils { start.setHours(0); start.setMinutes(0); start.setSeconds(0); - returnObj.timeS = start; + returnObj.timeS = start.getTime(); const end = new Date(currentDate); end.setDate(daysInMonth) end.setHours(23); end.setMinutes(59); end.setSeconds(59); - returnObj.timeE = end; + returnObj.timeE = end.getTime(); } else if (type === 6) { var daysInMonth = new Date(currentDate.getFullYear(), currentDate.getMonth(), 0).getDate(); @@ -115,7 +106,7 @@ export class DateUtils { start.setHours(0); start.setMinutes(0); start.setSeconds(0); - returnObj.timeS = start; + returnObj.timeS = start.getTime(); const end = new Date(currentDate); end.setMonth(currentDate.getMonth() - 1); @@ -123,7 +114,7 @@ export class DateUtils { end.setHours(23); end.setMinutes(59); end.setSeconds(59); - returnObj.timeE = end; + returnObj.timeE = end.getTime(); } return returnObj; diff --git a/src/environments/environment.ts b/src/environments/environment.ts index ec6ab5c..ee124eb 100644 --- a/src/environments/environment.ts +++ b/src/environments/environment.ts @@ -4,15 +4,15 @@ export const environment = { production: false, - baseUrl: 'https://phg.dctpay.com/brest/', // 测试环境服务器地址(请求数据地址) - orderUrl: 'https://phg.dctpay.com/order/', // 测试环境服务器地址(请求数据地址) - userUrl: 'https://phg.dctpay.com/user/', // 测试环境服务器地址(请求数据地址) - imageUrl: 'https://phg.obs.cn-southwest-2.myhuaweicloud.com/', + // baseUrl: 'https://phg.dctpay.com/brest/', // 测试环境服务器地址(请求数据地址) + // orderUrl: 'https://phg.dctpay.com/order/', // 测试环境服务器地址(请求数据地址) + // userUrl: 'https://phg.dctpay.com/user/', // 测试环境服务器地址(请求数据地址) + // imageUrl: 'https://phg.obs.cn-southwest-2.myhuaweicloud.com/', - // baseUrl: 'http://localhost:9702/brest/', // 测试环境服务器地址(请求数据地址) - // orderUrl: 'http://localhost:9703/order/', // 测试环境服务器地址(请求数据地址) - // userUrl: 'http://localhost:9704/user/', // 测试环境服务器地址(请求数据地址) - // imageUrl: 'https://phg-test.obs.cn-southwest-2.myhuaweicloud.com/', + baseUrl: 'http://localhost:9702/brest/', // 测试环境服务器地址(请求数据地址) + orderUrl: 'http://localhost:9703/order/', // 测试环境服务器地址(请求数据地址) + userUrl: 'http://localhost:9704/user/', // 测试环境服务器地址(请求数据地址) + imageUrl: 'https://phg-test.obs.cn-southwest-2.myhuaweicloud.com/', };