袁野 2 weeks ago
parent 7ce1dbe1d9
commit 952f12f281
  1. 50
      src/app/pages/body/index/index.component.html
  2. 96
      src/app/pages/body/index/index.component.ts
  3. 16
      src/app/pages/system/cms/cms.component.html
  4. 5
      src/app/pages/system/cms/cms.component.ts
  5. 182
      src/app/pages/trade/member/member-list.component.html
  6. 0
      src/app/pages/trade/member/member-list.component.less
  7. 196
      src/app/pages/trade/member/member-list.component.ts
  8. 2
      src/app/pages/trade/trade.routes.ts
  9. 14
      src/app/services/login/login.service.ts
  10. 25
      src/app/services/trade/member.service.ts

@ -20,8 +20,8 @@
<nz-dropdown-menu #menu="nzDropdownMenu">
<ul nz-menu nzSelectable>
<li nz-menu-item (click)="openUpdatePwd()">修改密码</li>
<li nz-menu-item (click)="loginOut()">退出登录</li>
</ul>
</nz-dropdown-menu>
</div>
@ -124,3 +124,51 @@
</nz-layout>
</nz-layout>
<nz-drawer
[nzClosable]="false"
[nzVisible]="visibleUpdatePwd"
nzPlacement="right"
nzTitle="修改密码"
(nzOnClose)="visibleUpdatePwd = false"
>
<ng-container *nzDrawerContent>
<form nz-form [formGroup]="validateForm" (ngSubmit)="submitForm()">
<nz-form-item>
<nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="oldPassword">旧密码</nz-form-label>
<nz-form-control [nzSm]="14" [nzXs]="24" nzErrorTip="请输入旧密码!">
<input nz-input formControlName="oldPassword" />
</nz-form-control>
</nz-form-item>
<nz-form-item>
<nz-form-label [nzSm]="6" [nzXs]="24" nzFor="newPassword" nzRequired>新密码</nz-form-label>
<nz-form-control [nzSm]="14" [nzXs]="24" nzErrorTip="请输入新密码!">
<input
nz-input
type="password"
id="newPassword"
formControlName="newPassword"
(ngModelChange)="updateConfirmValidator()"
/>
</nz-form-control>
</nz-form-item>
<nz-form-item>
<nz-form-label [nzSm]="6" [nzXs]="24" nzFor="checkPassword" nzRequired>确认密码</nz-form-label>
<nz-form-control [nzSm]="14" [nzXs]="24" [nzErrorTip]="errorTpl">
<input nz-input type="password" formControlName="checkPassword" id="checkPassword" />
<ng-template #errorTpl let-control>
@if (control.errors?.['required']) {
请确认您的密码!
}
@if (control.errors?.['confirm']) {
您输入的两个密码不一致!
}
</ng-template>
</nz-form-control>
</nz-form-item>
<button nz-button nzSize="large" class="login-form-button login-form-margin" [nzType]="'primary'">确认修改</button>
</form>
</ng-container>
</nz-drawer>

@ -1,4 +1,4 @@
import {AfterViewInit, Component, TemplateRef, ViewChild} from '@angular/core';
import {AfterViewInit, Component, OnDestroy, OnInit, TemplateRef, ViewChild} from '@angular/core';
import {Router, RouterLink, RouterOutlet} from "@angular/router";
import {
NzContentComponent,
@ -29,7 +29,7 @@ import {IconService} from "../../../services/common/icon.service";
import {FileService} from "../../../services/file/file.service";
import {DataUtilsPipe} from "../../../pipes/common/data-utils.pipe";
import {GoodsListComponent} from "../../trade/goods-list/goods-list.component";
import {Subject} from "rxjs";
import {Subject, takeUntil} from "rxjs";
import {CommunicationService} from "../../../services/common/communication.service";
import {NzModalComponent, NzModalContentDirective, NzModalModule, NzModalService} from "ng-zorro-antd/modal";
import {NzResultComponent} from "ng-zorro-antd/result";
@ -43,6 +43,24 @@ import {NzButtonComponent} from "ng-zorro-antd/button";
import {NzBadgeComponent} from "ng-zorro-antd/badge";
import {NzNotificationComponent, NzNotificationService} from "ng-zorro-antd/notification";
import {OrderGoodsService} from "../../../services/trade/order-goods.service";
import {NzDrawerComponent, NzDrawerContentDirective} from "ng-zorro-antd/drawer";
import {
AbstractControl, FormControl,
FormGroup,
FormsModule,
NonNullableFormBuilder,
ReactiveFormsModule, ValidationErrors, ValidatorFn,
Validators
} from "@angular/forms";
import {NzFlexDirective} from "ng-zorro-antd/flex";
import {
NzFormControlComponent,
NzFormDirective,
NzFormItemComponent,
NzFormLabelComponent,
NzFormTooltipIcon
} from "ng-zorro-antd/form";
import {NzInputDirective, NzInputGroupComponent} from "ng-zorro-antd/input";
@Component({
selector: 'app-index',
@ -93,7 +111,18 @@ import {OrderGoodsService} from "../../../services/trade/order-goods.service";
StatusPipe,
NzPopconfirmDirective,
NzButtonComponent,
NzBadgeComponent
NzBadgeComponent,
NzDrawerComponent,
NzDrawerContentDirective,
FormsModule,
NzFlexDirective,
NzFormControlComponent,
NzFormDirective,
NzFormItemComponent,
NzFormLabelComponent,
NzInputDirective,
ReactiveFormsModule,
NzInputGroupComponent
],
templateUrl: './index.component.html',
styleUrl: './index.component.less'
@ -115,15 +144,24 @@ export class IndexComponent {
isCollapse = true;
loading = false;
isVisible = false;
visibleUpdatePwd = false;
// 当前顶级菜单
currentParentMenu: any = {};
downloadType = 1;
interval: any;
showComponent = false;
validateForm: FormGroup<{
oldPassword: FormControl<string>;
newPassword: FormControl<string>;
checkPassword: FormControl<string>;
}>
constructor(
private commonService: CommonService,
private storage: BrowserStorageService,
private communicationService: CommunicationService,
private fb: NonNullableFormBuilder,
private nzConfigService: NzConfigService,
private fileService: FileService,
private message: NzMessageService,
@ -133,6 +171,12 @@ export class IndexComponent {
private login: LoginService
) {
this.validateForm = this.fb.group({
oldPassword: ['', [Validators.required]],
newPassword: ['', [Validators.required]],
checkPassword: ['', [Validators.required, this.confirmationValidator]],
});
this.orderGoodsService.goodsOrderCount((data: any) => {
if (data['return_code'] == '000000') {
@ -186,6 +230,46 @@ export class IndexComponent {
this.fileRecords();
}
submitForm(): void {
if (this.validateForm.valid) {
this.login.sendUserPass( this.validateForm.value , (data: any) => {
if (data['return_code'] === '000000') {
this.storage.remove(LOGIN_DATA);
this.storage.remove(DATA);
this.storage.remove(USER_TOKEN);
this.storage.remove(INIT_FLAG);
location.reload();
this.message.success("修改成功");
this.router.navigateByUrl('/login').then();
} else {
this.message.error(data['return_msg']);
}
});
} else {
Object.values(this.validateForm.controls).forEach(control => {
if (control.invalid) {
control.markAsDirty();
control.updateValueAndValidity({ onlySelf: true });
}
});
}
}
updateConfirmValidator(): void {
/** wait for refresh value */
Promise.resolve().then(() => this.validateForm.controls.checkPassword.updateValueAndValidity());
}
confirmationValidator: ValidatorFn = (control: AbstractControl): { [s: string]: boolean } => {
if (!control.value) {
return { required: true };
} else if (control.value !== this.validateForm.controls.newPassword.value) {
return { confirm: true, error: true };
}
return {};
};
// 选择操作
isSelected(item: any) {
this.menuData.map((data: any) => {
@ -275,4 +359,10 @@ export class IndexComponent {
})
}
// 打开抽屉
openUpdatePwd(): void {
this.visibleUpdatePwd = true;
}
}

@ -115,6 +115,22 @@
</nz-select>
</nz-form-control>
</nz-form-item>
<nz-form-item>
<nz-form-label [nzSm]="6" [nzXs]="24" >展示类型</nz-form-label>
<nz-form-control [nzSm]="14" [nzXs]="24" >
<nz-select nzSize="large" nzShowSearch nzAllowClear nzPlaceHolder="请选择" formControlName="showType">
<nz-option nzLabel="双数据" nzValue="1"></nz-option>
<nz-option nzLabel="四数据" nzValue="2"></nz-option>
<nz-option nzLabel="横版多数据" nzValue="3"></nz-option>
</nz-select>
</nz-form-control>
</nz-form-item>
<nz-form-item >
<nz-form-label [nzSm]="6" [nzXs]="24" >数据展示ID</nz-form-label>
<nz-form-control [nzSm]="14" [nzXs]="24">
<input nzSize="large" nz-input formControlName="showDataId" placeholder="请输入" />
</nz-form-control>
</nz-form-item>
<nz-form-item>
<nz-form-label [nzSm]="6" [nzXs]="24" >跳转类型</nz-form-label>
<nz-form-control [nzSm]="14" [nzXs]="24" >

@ -8,7 +8,7 @@ import {DatePipe, NgForOf, NgIf, NgStyle} from "@angular/common";
import {NzDividerComponent} from "ng-zorro-antd/divider";
import {NzIconDirective} from "ng-zorro-antd/icon";
import {NzImageDirective, NzImageModule} from "ng-zorro-antd/image";
import {NzModalComponent, NzModalModule} from "ng-zorro-antd/modal";
import { NzModalModule} from "ng-zorro-antd/modal";
import {NzPopconfirmDirective} from "ng-zorro-antd/popconfirm";
import {
NzTableComponent, NzTableModule
@ -19,7 +19,6 @@ import {NzUploadComponent, NzUploadFile} from "ng-zorro-antd/upload";
import {environment} from "../../../../environments/environment";
import {NzMessageService} from "ng-zorro-antd/message";
import {CommonService} from "../../../services/common/common.service";
import {GoodsTypeData} from "../../../model/goods.interface";
import {fallbackImg, platformCode} from '../../../data/goods/goods.namespace';
import {NzOptionComponent, NzSelectComponent} from "ng-zorro-antd/select";
import {CmsService} from "../../../services/cms/cms.service";
@ -141,6 +140,8 @@ export class CmsComponent {
id: [null],
img: [''],
jumpType: [null],
showType: [null],
showDataId: [null],
jumpUrl: [null],
appid: [null],
});

@ -0,0 +1,182 @@
<form nz-form [formGroup]="searchForm" class="search_form" [nzLayout]="'vertical'">
<div nz-row [nzGutter]="24">
<div nz-col [nzSpan]="6">
<nz-form-item>
<nz-form-label>订单号</nz-form-label>
<nz-form-control>
<input nzSize="large" nz-input formControlName="orderNo" placeholder="请输入" />
</nz-form-control>
</nz-form-item>
</div>
<div nz-col [nzSpan]="6">
<nz-form-item>
<nz-form-label>完成时间</nz-form-label>
<nz-form-control>
<nz-range-picker nzSize="large" formControlName="finishTimeArray" [nzFormat]="'yyyy/MM/dd'"></nz-range-picker>
</nz-form-control>
</nz-form-item>
</div>
<div nz-col [nzSpan]="6">
<nz-form-item>
<nz-form-label>创建时间</nz-form-label>
<nz-form-control>
<nz-range-picker nzSize="large" formControlName="createTimeArray" [nzFormat]="'yyyy/MM/dd'"></nz-range-picker>
</nz-form-control>
</nz-form-item>
</div>
<div nz-col [nzSpan]="6">
<nz-form-item>
<nz-form-label>支付状态</nz-form-label>
<nz-form-control>
<nz-select nzSize="large" nzShowSearch nzAllowClear nzPlaceHolder="请选择" formControlName="status">
<nz-option *ngFor="let item of orderGoodsChild" nzLabel="{{item['name']}}" nzValue="{{item['key']}}"></nz-option>
</nz-select>
</nz-form-control>
</nz-form-item>
</div>
<div nz-col [nzSpan]="6" [hidden]="!isCollapse">
<nz-form-item>
<nz-form-label>商品名称</nz-form-label>
<nz-form-control>
<input nzSize="large" nz-input formControlName="goodsName" placeholder="请输入" />
</nz-form-control>
</nz-form-item>
</div>
<div nz-col [nzSpan]="6" [hidden]="!isCollapse">
<nz-form-item>
<nz-form-label>子订单号</nz-form-label>
<nz-form-control>
<input nzSize="large" nz-input formControlName="childOrderNo" placeholder="请输入" />
</nz-form-control>
</nz-form-item>
</div>
<div nz-col [nzSpan]="6" [hidden]="!isCollapse">
<nz-form-item>
<nz-form-label>用户手机号</nz-form-label>
<nz-form-control>
<input nzSize="large" nz-input formControlName="userPhone" placeholder="请输入" />
</nz-form-control>
</nz-form-item>
</div>
<div nz-col [nzSpan]="6" [hidden]="!isCollapse">
<nz-form-item>
<nz-form-label>支付类型</nz-form-label>
<nz-form-control>
<nz-select nzSize="large" nzShowSearch nzAllowClear nzPlaceHolder="请选择" formControlName="payType">
<nz-option *ngFor="let item of orderPayType" nzLabel="{{item['name']}}" nzValue="{{item['key']}}"></nz-option>
</nz-select>
</nz-form-control>
</nz-form-item>
</div>
<div nz-col [nzSpan]="6" >
<a class="collapse" (click)="isCollapse = !isCollapse">
{{isCollapse ? '收起至简洁查询' : '更多查询条件'}}
<i nz-icon [nzType]="!isCollapse ? 'down' : 'up'"></i>
</a>
</div>
<div nz-col [nzSpan]="24" class="search-area">
<button nz-button [nzType]="'primary'" (click)="getRequest()">查询</button>
<button nz-button (click)="reset()">重置</button>
<!-- <button nz-button [nzType]="'primary'" (click)="getExport()">导出交易明细</button>-->
</div>
</div>
</form>
<nz-table #basicTable
[nzScroll]="{ x: '1980px' }"
[nzBordered]="true"
[nzFrontPagination]="false"
[nzShowQuickJumper]="true"
[nzShowTotal]="totalTemplate"
[(nzPageIndex)]="tablePageNum"
(nzPageIndexChange)="getRequest(false)"
[nzTotal]="tableData.total"
[nzData]="tableData.list" >
<thead>
<tr>
<th nzWidth="200px">商品名称</th>
<th nzWidth="100px">用户手机号</th>
<th nzWidth="100px">订单号</th>
<th nzWidth="100px">子订单号</th>
<th nzWidth="100px">商品价格</th>
<th nzWidth="100px">销售价格</th>
<th nzWidth="100px">支付金额</th>
<th nzWidth="70px">创建时间</th>
<th nzWidth="70px">更新时间</th>
<th nzWidth="70px">完成时间</th>
<th nzRight nzWidth="70px">支付类型</th>
<th nzRight nzWidth="70px">支付状态</th>
<th nzRight nzWidth="90px">操作</th>
</tr>
</thead>
<tbody>
<tr *ngFor="let data of basicTable.data">
<td>{{data.goodsName}}</td>
<td>{{data.userPhone}}</td>
<td>{{data.orderNo}}</td>
<td>{{data.childOrderNo}}</td>
<td>¥{{data.goodsSpescOriginalPrice}}</td>
<td>¥{{data.goodsSpescSalePrice}}</td>
<td>¥{{data.payRealPrice}}</td>
<td>{{ data.createTime | date: 'yyyy-MM-dd HH:mm'}}</td>
<td>{{ data.updateTime | date: 'yyyy-MM-dd HH:mm'}}</td>
<td>{{ data.finishTime | date: 'yyyy-MM-dd HH:mm'}}</td>
<td nzRight>
<span style="font-size: 30px;" nz-icon [nzIconfont]="data.payType | payType"></span>
</td>
<td nzRight>
{{data.status | orderChildStatus}}
</td>
<td nzRight>
<a (click)="showDetail(data)">详情</a>
</td>
</tr>
</tbody>
<ng-template #totalTemplate let-total>总计 {{ total }} 条</ng-template>
<nz-modal [nzWidth]="1400" [(nzVisible)]="orderDetailModal" nzTitle="订单详情" (nzOnCancel)="orderDetailModal = false" (nzOnOk)="orderDetailModal = false">
<ng-container *nzModalContent>
<nz-tabset nzType="card">
<nz-tab nzTitle="订单信息">
<nz-descriptions nzTitle="订单信息" nzBordered>
<nz-descriptions-item nzTitle="商品名称">
<p [innerHTML]="orderGoodsData.goodsName"></p>
</nz-descriptions-item>
<nz-descriptions-item nzTitle="用户手机号">{{ orderGoodsData?.userPhone }}</nz-descriptions-item>//.
<nz-descriptions-item nzTitle="订单状态">{{ orderGoodsData?.status | orderChildStatus }}</nz-descriptions-item>//.
</nz-descriptions>
</nz-tab>
<nz-tab nzTitle="支付信息">
<nz-descriptions nzTitle="支付信息" nzBordered>
<nz-descriptions-item nzTitle="订单号">{{ orderGoodsData?.orderNo }}</nz-descriptions-item>
<nz-descriptions-item nzTitle="子订单号" [nzSpan]="2">{{ orderGoodsData?.childOrderNo }}</nz-descriptions-item>
<nz-descriptions-item nzTitle="支付流水号" [nzSpan]="3">{{ orderGoodsData?.paySerialNo }}</nz-descriptions-item>
<nz-descriptions-item nzTitle="商品总金额" [nzSpan]="3">{{ orderGoodsData?.totalPrice }}</nz-descriptions-item>
<nz-descriptions-item nzTitle="优惠券优惠金额" [nzSpan]="3">{{ orderGoodsData?.couponDiscountPrice }}</nz-descriptions-item>
<nz-descriptions-item nzTitle="积分抵扣优惠金额" [nzSpan]="3">{{ orderGoodsData?.integralDiscountPrice }}</nz-descriptions-item>
<nz-descriptions-item nzTitle="总优惠金额(优惠券优惠金额 + 积分抵扣)" [nzSpan]="3">{{ orderGoodsData?.totalDeductionPrice }}</nz-descriptions-item>
<nz-descriptions-item nzTitle="商品金额" [nzSpan]="3">{{ orderGoodsData?.tradeAmount }}</nz-descriptions-item>
<nz-descriptions-item nzTitle="商品服务费" [nzSpan]="3">{{ orderGoodsData?.servicePrice }}</nz-descriptions-item>
<nz-descriptions-item nzTitle="实付金额" [nzSpan]="3">{{ orderGoodsData?.payRealPrice }}</nz-descriptions-item>
</nz-descriptions>
</nz-tab>
<nz-tab nzTitle="订单时间">
<nz-descriptions nzTitle="订单时间" nzBordered>
<nz-descriptions-item *ngIf="orderGoodsData?.createTime != null" nzTitle="创建时间">{{ orderGoodsData?.createTime | date: 'yyyy-MM-dd HH:mm' }}</nz-descriptions-item>
<nz-descriptions-item *ngIf="orderGoodsData?.payTime != null" nzTitle="支付时间">{{ orderGoodsData?.payTime | date: 'yyyy-MM-dd HH:mm' }}</nz-descriptions-item>
<nz-descriptions-item *ngIf="orderGoodsData?.cancelTime != null" nzTitle="取消时间">{{ orderGoodsData?.cancelTime | date: 'yyyy-MM-dd HH:mm' }}</nz-descriptions-item>
<nz-descriptions-item *ngIf="orderGoodsData?.refundTime != null" nzTitle="退款时间">{{ orderGoodsData?.refundTime | date: 'yyyy-MM-dd HH:mm' }}</nz-descriptions-item>
<nz-descriptions-item *ngIf="orderGoodsData?.finishTime != null" nzTitle="完成时间">{{ orderGoodsData?.finishTime | date: 'yyyy-MM-dd HH:mm' }}</nz-descriptions-item>
<nz-descriptions-item *ngIf="orderGoodsData?.updateTime != null" nzTitle="更新时间">{{ orderGoodsData?.updateTime | date: 'yyyy-MM-dd HH:mm' }}</nz-descriptions-item>
</nz-descriptions>
</nz-tab>
</nz-tabset>
</ng-container>
</nz-modal>

@ -0,0 +1,196 @@
import {
fallbackImg,
logisticsStatus,
orderCinemaStatus,
orderGoodsChild,
orderPayType
} from '../../../data/goods/goods.namespace';
import {NzTabSetComponent, NzTabsModule} from "ng-zorro-antd/tabs";
import {NzColDirective, NzRowDirective} from "ng-zorro-antd/grid";
import {NzFormDirective, NzFormModule} from "ng-zorro-antd/form";
import {FormGroup, FormsModule, NonNullableFormBuilder, ReactiveFormsModule} from "@angular/forms";
import {NzTreeSelectComponent} from "ng-zorro-antd/tree-select";
import {NzInputDirective} from "ng-zorro-antd/input";
import {NzOptionComponent, NzSelectComponent} from "ng-zorro-antd/select";
import {NzButtonComponent} from "ng-zorro-antd/button";
import {NzTableComponent, NzTableModule, NzThMeasureDirective} from "ng-zorro-antd/table";
import {NzImageDirective, NzImageModule} from "ng-zorro-antd/image";
import {NzModalModule} from "ng-zorro-antd/modal";
import {DatePipe, NgClass, NgForOf, NgIf} from "@angular/common";
import {NzDropDownADirective, NzDropDownDirective, NzDropdownMenuComponent} from "ng-zorro-antd/dropdown";
import {NzMenuDirective, NzMenuItemComponent} from "ng-zorro-antd/menu";
import {NzDescriptionsModule} from "ng-zorro-antd/descriptions";
import {NzPopconfirmDirective} from "ng-zorro-antd/popconfirm";
import {NzDividerComponent} from "ng-zorro-antd/divider";
import {NzIconDirective} from "ng-zorro-antd/icon";
import {NzBadgeComponent} from "ng-zorro-antd/badge";
import {NzSpinComponent} from "ng-zorro-antd/spin";
import {NzTimelineComponent, NzTimelineItemComponent} from "ng-zorro-antd/timeline";
import {NzResultComponent} from "ng-zorro-antd/result";
import {NzDatePickerComponent, NzRangePickerComponent} from "ng-zorro-antd/date-picker";
import {NzRadioButtonDirective, NzRadioComponent, NzRadioGroupComponent} from "ng-zorro-antd/radio";
import {Component} from "@angular/core";
import {PayTypePipe} from "../../../pipes/goods/pay-type.pipe";
import {OrderChildStatusPipe} from "../../../pipes/goods/order-child-status.pipe";
import {NzMessageService} from "ng-zorro-antd/message";
import {BrowserStorageService} from "../../../utils/localStorage.service";
import {MerService} from "../../../services/merchant/mer.service";
import {IconService} from "../../../services/common/icon.service";
import {MeituanService} from "../../../services/trade/meituan.service";
import {DateUtils} from "../../../utils/dateUtils.service";
import {CommunicationService} from "../../../services/common/communication.service";
import {OrderCinemaStatusPipe} from "../../../pipes/goods/order-cinema-status.pipe";
import {OrderGoodsData} from "../../../model/order.interface";
import {MemberService} from "../../../services/trade/member.service";
@Component({
selector: 'app-meituan-list',
standalone: true,
imports: [
NzColDirective,
NzRowDirective,
NzFormDirective,
ReactiveFormsModule,
NzTreeSelectComponent,
NzInputDirective,
NzSelectComponent,
NzOptionComponent,
NzButtonComponent,
NzTableComponent,
NzImageModule,
NzModalModule,
NzTableModule,
NzFormModule,
NzThMeasureDirective,
NgForOf,
NzImageDirective,
DatePipe,
NzDropdownMenuComponent,
NgIf,
NzMenuDirective,
NzDescriptionsModule,
NzMenuItemComponent,
NzPopconfirmDirective,
NzDividerComponent,
NzDropDownADirective,
NzDropDownDirective,
NzTabsModule,
NzIconDirective,
NzBadgeComponent,
NzTabSetComponent,
FormsModule,
NzSpinComponent,
NzTimelineItemComponent,
NgClass,
NzResultComponent,
NzTimelineComponent,
NzDatePickerComponent,
NzRadioButtonDirective,
NzRadioComponent,
NzRadioGroupComponent,
NzRangePickerComponent,
PayTypePipe,
OrderChildStatusPipe,
OrderCinemaStatusPipe,
],
templateUrl: './member-list.component.html',
styleUrl: './member-list.component.less'
})
export class MemberListComponent {
// 表单页数
tablePageNum = 1;
// 表单数据
tableData: any = {
total: 0,
loading: false,
list: [],
};
// 搜索表单
searchForm: FormGroup;
orderDetailModal = false;
// 更多查询条件
isCollapse = false;
orderGoodsData: any;
protected readonly orderGoodsChild = orderGoodsChild;
protected readonly orderPayType = orderPayType;
constructor(private fb: NonNullableFormBuilder,
private msg: NzMessageService,
private iconService: IconService,
private communicationService: CommunicationService,
private memberService: MemberService,) {
// 初始化搜索框
this.searchForm = this.fb.group({
orderNo: [''],
childOrderNo: [''],
userPhone: [''],
createTimeArray: [[]],
finishTimeArray: [[]],
createTimeS: [''],
createTimeE: [''],
finishTimeS: [''],
finishTimeE: [''],
goodsName: [''],
status: [''],
payType: [''],
});
this.getRequest();
}
// 查询列表
public getRequest(reset: boolean = false) {
if (this.searchForm.controls['createTimeArray'].value != null
&& this.searchForm.controls['createTimeArray'].value.length > 0) {
this.searchForm.controls['createTimeS'].setValue(DateUtils.getDateHMS(new Date(this.searchForm.controls['createTimeArray'].value[0]) , 1).getTime());
this.searchForm.controls['createTimeE'].setValue(DateUtils.getDateHMS(new Date(this.searchForm.controls['createTimeArray'].value[1]) , 2).getTime());
} else {
this.searchForm.controls['createTimeS'].setValue(null)
this.searchForm.controls['createTimeE'].setValue(null)
}
if (this.searchForm.controls['finishTimeArray'].value != null
&& this.searchForm.controls['finishTimeArray'].value.length > 0) {
this.searchForm.controls['finishTimeS'].setValue(DateUtils.getDateHMS(new Date(this.searchForm.controls['finishTimeArray'].value[0]) , 1).getTime());
this.searchForm.controls['finishTimeE'].setValue(DateUtils.getDateHMS(new Date(this.searchForm.controls['finishTimeArray'].value[1]) , 2).getTime());
} else {
this.searchForm.controls['finishTimeS'].setValue(null)
this.searchForm.controls['finishTimeE'].setValue(null)
}
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.memberService.getListMember(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;
});
}
// 重制
public reset() {
this.searchForm.reset();
this.getRequest();
}
showDetail(data: OrderGoodsData): void {
this.orderGoodsData = data;
this.orderDetailModal = true;
}
}

@ -7,6 +7,7 @@ import {OrderCinemaComponent} from "./order-cinema/order-cinema.component";
import {OrderStarbucksComponent} from "./order-starbucks/order-starbucks.component";
import {GoodsLogisticsListComponent} from "./goods-logistics-list/goods-logistics-list.component";
import {MeituanListComponent} from "./meituan/meituan-list.component";
import {MemberListComponent} from "./member/member-list.component";
export const TRADE_ROUTES: Routes = [
{ path: 'goods-list', component: GoodsListComponent },
@ -17,4 +18,5 @@ export const TRADE_ROUTES: Routes = [
{ path: 'order-starbucks', component: OrderStarbucksComponent },
{ path: 'goods-logistics-list', component: GoodsLogisticsListComponent },
{ path: 'meituan-list', component: MeituanListComponent },
{ path: 'member-list', component: MemberListComponent },
];

@ -35,4 +35,18 @@ export class LoginService {
callBack(data);
});
}
/**
* @Author Sum1Dream
* @Name sendUserPass
* @Description // 修改用户密码
* @Date 15:52 2024/4/18
* @Param params
* @Param callBack
*/
public sendUserPass(params: object, callBack:any) {
this.http.post(environment.userUrl + 'secUser/sendUserPass', params).subscribe(data => {
callBack(data);
});
}
}

@ -0,0 +1,25 @@
import { Injectable } from '@angular/core';
import {HttpClient} from "@angular/common/http";
import {environment} from "../../../environments/environment";
import {ObjectData} from "../../utils/objectData.service";
@Injectable({
providedIn: 'root'
})
export class MemberService {
constructor(private http: HttpClient) { }
/**
*
* @param param
* @param callBack
*/
public getListMember(param: object, callBack:any) {
this.http.get(environment.orderUrl + 'orderMember/getListMember?'+ObjectData.objectByString(param)).subscribe(data => {
callBack(data);
});
}
}
Loading…
Cancel
Save