袁野 4 months ago
parent 7d747a6846
commit 0bfd4909fd
  1. 10
      src/app/data/goods/goods.namespace.ts
  2. 4
      src/app/pages/goods/goods-list/goods-list.component.html
  3. 83
      src/app/pages/goods/goods-list/goods-list.component.ts
  4. 2
      src/app/pages/goods/goods.routes.ts
  5. 112
      src/app/pages/goods/recharge/price-list/price-list.component.html
  6. 12
      src/app/pages/goods/recharge/price-list/price-list.component.less
  7. 178
      src/app/pages/goods/recharge/price-list/price-list.component.ts
  8. 19
      src/app/pages/login/login/login.component.html
  9. 3
      src/app/pages/login/login/login.component.less
  10. 7
      src/app/pages/login/login/login.component.ts
  11. 64
      src/app/pages/merchant/mer-list/mer-list.component.html
  12. 90
      src/app/pages/merchant/mer-list/mer-list.component.ts
  13. 4
      src/app/pages/trade/goods-list/goods-list.component.html
  14. 163
      src/app/pages/trade/order-cinema/order-cinema.component.html
  15. 6
      src/app/pages/trade/order-cinema/order-cinema.component.less
  16. 184
      src/app/pages/trade/order-cinema/order-cinema.component.ts
  17. 2
      src/app/pages/trade/trade.routes.ts
  18. 20
      src/app/pipes/recharge/price-type.pipe.ts
  19. 36
      src/app/services/goods/goods.service.ts
  20. 34
      src/app/services/merchant/mer.service.ts
  21. 45
      src/app/services/recharge/recharge.service.ts
  22. 23
      src/app/services/trade/order-cinema.service.ts
  23. 16
      src/environments/environment.ts

@ -11,3 +11,13 @@ export const orderGoodsStatus = [
{name: "已退货" , key: 7},
{name: "待支付" , key: 8}
];
export const orderCinemaStatus = [
{name: "待付款" , key: 0} ,
{name: "待出票" , key: 5},
{name: "已出票" , key: 10},
{name: "交易成功" , key: 15},
{name: "已取消" , key: -5},
];

@ -221,6 +221,7 @@
nzAction="{{baseUrl}}fileUpload/fileUpload"
nzListType="picture-card"
[(nzFileList)]="bannerImg"
[nzMultiple]="true"
[nzShowButton]="bannerImg.length < 20"
[nzPreview]="handlePreview"
[nzBeforeUpload]="beforeUpload"
@ -250,6 +251,7 @@
nzAction="{{baseUrl}}fileUpload/fileUpload"
nzListType="picture-card"
[(nzFileList)]="detailImg"
[nzMultiple]="true"
[nzShowButton]="detailImg.length < 20"
[nzPreview]="handlePreview"
[nzBeforeUpload]="beforeUpload"
@ -455,6 +457,7 @@
[(nzFileList)]="showImg"
[nzShowButton]="showImg.length < 1"
[nzPreview]="handlePreview"
[nzBeforeUpload]="beforeUpload"
nzAccept="image/*"
>
@ -467,7 +470,6 @@
[nzVisible]="previewVisible"
[nzContent]="modalContent"
[nzFooter]="null"
(nzOnCancel)="previewVisible = false"
>
<ng-template #modalContent>

@ -1,4 +1,4 @@
import { Component } from '@angular/core';
import {Component} from '@angular/core';
import {DatePipe, NgForOf, NgIf, NgStyle} from "@angular/common";
import {NzButtonComponent} from "ng-zorro-antd/button";
import {NzColDirective, NzRowDirective} from "ng-zorro-antd/grid";
@ -11,17 +11,14 @@ import {environment} from "../../../../environments/environment";
import {NzMessageService} from "ng-zorro-antd/message";
import {CommonService} from "../../../services/common/common.service";
import {GoodsService} from "../../../services/goods/goods.service";
import { fallbackImg } from '../../../data/goods/goods.namespace';
import {fallbackImg} from '../../../data/goods/goods.namespace';
import {GoodsMsgData, SpecsData} from "../../../model/goods.interface";
import {NzDividerComponent} from "ng-zorro-antd/divider";
import {NzIconDirective} from "ng-zorro-antd/icon";
import {NzImageDirective, NzImageModule} from "ng-zorro-antd/image";
import {NzModalModule} from "ng-zorro-antd/modal";
import {NzPopconfirmDirective} from "ng-zorro-antd/popconfirm";
import {
NzTableComponent, NzTableModule,
NzTdAddOnComponent,
} from "ng-zorro-antd/table";
import {NzTableComponent, NzTableModule, NzTdAddOnComponent,} from "ng-zorro-antd/table";
import {NzTreeSelectComponent} from "ng-zorro-antd/tree-select";
import {DictionaryPipe} from "../../../pipes/common/dictionary.pipe";
import {GoodsStatusPipe} from "../../../pipes/goods/goods-status.pipe";
@ -133,7 +130,7 @@ export class GoodsListComponent {
// 商品类型数据
nodes = [];
nodesBrand = [];
nodesSpecs:SpecsData[] = [];
nodesSpecs: SpecsData[] = [];
nodesVpdSource;
merData: any;
objectType: number;
@ -164,23 +161,23 @@ export class GoodsListComponent {
// 初始化
this.editForm = this.fb.group({
title: ['' , [Validators.required]],
goodsType: ['' , [Validators.required]],
type: ['' , [Validators.required]],
goodsBrand: ['' , [Validators.required]],
title: ['', [Validators.required]],
goodsType: ['', [Validators.required]],
type: ['', [Validators.required]],
goodsBrand: ['', [Validators.required]],
id: [null],
goodsLabel: [''],
goodsExplain: [''],
});
// 初始化
this.editSpecsForm = this.fb.group({
name: ['' , [Validators.required]],
name: ['', [Validators.required]],
// purLimit: ['' , [Validators.required]],
salePrice: ['' , [Validators.required]],
originalPrice: ['' , [Validators.required]],
stock: ['' , [Validators.required]],
validDay: ['' , [Validators.required]],
salesEndTime: [new Date(new Date().getFullYear(), new Date().getMonth(), new Date().getDay(), 23, 59, 59) , [Validators.required]],
salePrice: ['', [Validators.required]],
originalPrice: ['', [Validators.required]],
stock: ['', [Validators.required]],
validDay: ['', [Validators.required]],
salesEndTime: [new Date(new Date().getFullYear(), new Date().getMonth(), new Date().getDay(), 23, 59, 59), [Validators.required]],
type: [''],
source: [''],
id: [null],
@ -199,7 +196,7 @@ export class GoodsListComponent {
// 查询列表
public getRequest(reset: boolean = false) {
this.tableData.loading = true;
this.tableData.loading = true;
if (reset) {
this.tablePageNum = 1;
}
@ -207,13 +204,13 @@ export class GoodsListComponent {
this.searchForm.value.pageSize = 10;
this.searchForm.value.time = new Date().getTime();
this.goodsService.getListGoods(this.searchForm.value , (data: any) => {
this.goodsService.getListGoods(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;
this.tableData.loading = false;
});
}
@ -241,6 +238,7 @@ export class GoodsListComponent {
}
this.isVisibleEdit = true;
}
// 编辑表单提交
handleEdit(): void {
@ -255,7 +253,7 @@ export class GoodsListComponent {
this.editForm.value.bannerImg = this.commonService.postImg(this.bannerImg);
this.editForm.value.detailImg = this.commonService.postImg(this.detailImg);
this.goodsService.editGoodsMsg(this.editForm.value , (data: any) => {
this.goodsService.editGoodsMsg(this.editForm.value, (data: any) => {
if (data['return_code'] === '000000') {
this.msg.success("成功!");
this.isVisibleEdit = false;
@ -268,7 +266,7 @@ export class GoodsListComponent {
Object.values(this.editForm.controls).forEach(control => {
if (control.invalid) {
control.markAsDirty();
control.updateValueAndValidity({ onlySelf: true });
control.updateValueAndValidity({onlySelf: true});
}
});
}
@ -286,7 +284,7 @@ export class GoodsListComponent {
// 删除
delete(id: number): void {
this.goodsService.deleteGoodsMsg(id , (data: any) => {
this.goodsService.deleteGoods(id, (data: any) => {
if (data['return_code'] === '000000') {
this.msg.success("成功!");
this.getRequest();
@ -298,7 +296,7 @@ export class GoodsListComponent {
// 删除
deleteGoodsSpecs(id: number): void {
this.goodsService.deleteGoodsSpecs(id , (data: any) => {
this.goodsService.deleteGoodsSpecs(id, (data: any) => {
if (data['return_code'] === '000000') {
this.msg.success("成功!");
this.getSpecsList();
@ -322,7 +320,7 @@ export class GoodsListComponent {
array.forEach((item: any) => {
if (item.children) {
this.getNode(item.children);
}else {
} else {
item["isLeaf"] = true;
}
item["key"] = item.id;
@ -333,7 +331,7 @@ export class GoodsListComponent {
// 获取商品品牌
getGoodsBrandNode() {
this.goodsService.getListBrandAll( (data: any) => {
this.goodsService.getListBrandAll((data: any) => {
if (data['return_code'] == '000000') {
this.nodesBrand = data['return_data'];
}
@ -374,17 +372,18 @@ export class GoodsListComponent {
// 查询规格列表
getSpecsList(): void {
this.loadingSpecs = true;
let params = {
id: this.goodsMsg?.id,
time: new Date().getTime()
let params = {
id: this.goodsMsg?.id,
time: new Date().getTime()
}
this.goodsService.getGoodsSpecsList(params , (data: any) => {
this.goodsService.getGoodsSpecsList(params, (data: any) => {
this.loadingSpecs = false;
if (data['return_code'] == '000000') {
this.nodesSpecs = data['return_data'];
}
});
}
// 添加规格
showEditSpecs(item?: any): void {
@ -396,7 +395,7 @@ export class GoodsListComponent {
if (!this.commonService.whetherStringIsNull(item.showImg)) {
this.showImg = this.commonService.stitchImg(item.showImg);
}
} else{
} else {
this.showImg = [];
this.editSpecsForm.reset();
}
@ -412,7 +411,7 @@ export class GoodsListComponent {
return;
}
this.editSpecsForm.value.goodsId = this.goodsMsg?.id;
this.goodsService.editGoodsSpecs(this.editSpecsForm.value , (data: any) => {
this.goodsService.editGoodsSpecs(this.editSpecsForm.value, (data: any) => {
if (data['return_code'] === '000000') {
this.msg.success("成功!");
this.editSpecs = false;
@ -425,7 +424,7 @@ export class GoodsListComponent {
Object.values(this.editSpecsForm.controls).forEach(control => {
if (control.invalid) {
control.markAsDirty();
control.updateValueAndValidity({ onlySelf: true });
control.updateValueAndValidity({onlySelf: true});
}
});
}
@ -447,7 +446,7 @@ export class GoodsListComponent {
}
jumpTypeChange(type: string): void {
console.log("type" , type);
console.log("type", type);
if (type == "2") {
this.editSpecsForm.controls['appid'].clearValidators();
this.editSpecsForm.controls['appid'].markAsPristine();
@ -460,11 +459,11 @@ export class GoodsListComponent {
// 上下线
goodsAudit(id: number): void {
let params = {
let params = {
id: id,
time: new Date().getTime()
}
this.goodsService.goodsAudit(params , (data: any) => {
this.goodsService.goodsAudit(params, (data: any) => {
if (data['return_code'] === '000000') {
this.msg.success("成功!");
this.getRequest();
@ -475,15 +474,17 @@ export class GoodsListComponent {
}
// 图片上传操作
beforeUpload = (file: NzUploadFile, _fileList: NzUploadFile[]): Observable<boolean> =>
new Observable((observer: Observer<boolean>) => {
beforeUpload = (file: NzUploadFile, _fileList: NzUploadFile[]): Observable<boolean> => {
return new Observable((observer: Observer<boolean>) => {
const isJpgOrPng = file.type === 'image/jpeg' || file.type === 'image/png';
if (!isJpgOrPng) {
this.msg.error('上传格式错误!');
observer.complete();
return;
}
const isLt2M = file.size! / 1024 / 1024 < 5;
if (!isLt2M) {
this.msg.error('图片大小超过5MB!');
observer.complete();
@ -492,11 +493,11 @@ export class GoodsListComponent {
observer.next(isJpgOrPng && isLt2M);
observer.complete();
});
};
merList() {
let params = {
pageNum: 1 ,
let params = {
pageNum: 1,
pageSize: 10000
}
this.merService.queryList(params, (data: any) => {

@ -2,11 +2,13 @@ import { Routes } from '@angular/router';
import {GoodsTypeComponent} from "./goods-type/goods-type.component";
import {GoodsBrandComponent} from "./goods-brand/goods-brand.component";
import {GoodsListComponent} from "./goods-list/goods-list.component";
import {PriceListComponent} from "./recharge/price-list/price-list.component";
export const GOODS_ROUTES: Routes = [
{ path: 'goods_type', component: GoodsTypeComponent},
{ path: 'goods_brand', component: GoodsBrandComponent},
{ path: 'goods-list', component: GoodsListComponent},
{ path: 'recharge-price', component: PriceListComponent},
];

@ -0,0 +1,112 @@
<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>
<nz-select nzSize="large" nzShowSearch nzAllowClear nzPlaceHolder="请选择" formControlName="type">
<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>
</div>
<div nz-col [nzSpan]="6" class="search-area">
<button nz-button [nzType]="'primary'" (click)="getRequest(true)">查询</button>
<button nz-button (click)="searchForm.reset()">重置</button>
<button nz-button [nzType]="'primary'" (click)="showEdit()">创建</button>
</div>
</div>
</form>
<nz-table #basicTable
[nzBordered]="true"
[nzFrontPagination]="false"
[nzShowQuickJumper]="true"
[nzShowTotal]="totalTemplate"
[(nzPageIndex)]="tablePageNum"
(nzPageIndexChange)="getRequest(false)"
[nzTotal]="tableData.total"
[nzData]="tableData.list" >
<thead>
<tr>
<th nzWidth="80px">运营商</th>
<th nzWidth="100px">充值金额</th>
<th nzWidth="160px">折扣金额</th>
<th nzWidth="100px">创建时间</th>
<th nzWidth="100px">更新时间</th>
<th nzWidth="70px">操作</th>
</tr>
</thead>
<tbody>
<tr *ngFor="let data of basicTable.data">
<td>{{data.type | priceType}}</td>
<td>¥{{data.price}}</td>
<td>¥{{data.payPrice}}</td>
<td>{{ data.createTime | date: 'yyyy-MM-dd HH:mm'}}</td>
<td>{{ data.updateTime | date: 'yyyy-MM-dd HH:mm'}}</td>
<td >
<a (click)="showEdit(data)">修改</a>
<nz-divider nzType="vertical"></nz-divider>
<a nz-dropdown [nzDropdownMenu]="menu">
更多
<span nz-icon nzType="down"></span>
</a>
<nz-dropdown-menu #menu="nzDropdownMenu">
<ul nz-menu nzSelectable>
<li nz-menu-item nzDanger>
<a nz-popconfirm nzPopconfirmTitle="是否确认删除?" (nzOnConfirm)="delete(data.id)">删除</a>
</li>
</ul>
</nz-dropdown-menu>
</td>
</tr>
</tbody>
<ng-template #totalTemplate let-total>总计 {{ total }} 条</ng-template>
<!--添加弹出框-->
<nz-modal [(nzVisible)]="isVisibleEdit" [nzMaskClosable] = false nzTitle="编辑优惠券" (nzOnCancel)="isVisibleEdit = false" (nzOnOk)="handleEdit()">
<ng-container *nzModalContent>
<form nz-form [formGroup]="editForm">
<nz-form-item >
<nz-form-label [nzSm]="6" [nzXs]="24" nzRequired>运营商</nz-form-label>
<nz-form-control [nzSm]="14" [nzXs]="24" nzErrorTip="请选择运营商!">
<nz-select nzSize="large" nzShowSearch nzAllowClear nzPlaceHolder="请选择" formControlName="type">
<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" nzRequired>售卖价格</nz-form-label>
<nz-form-control [nzSm]="14" [nzXs]="24" nzErrorTip="请输入售卖价格!">
<nz-input-number-group nzPrefix="¥" nzSuffix="RMB" style="width: 100%">
<nz-input-number formControlName="payPrice" [nzPrecision]="2"></nz-input-number>
</nz-input-number-group>
</nz-form-control>
</nz-form-item>
<nz-form-item >
<nz-form-label [nzSm]="6" [nzXs]="24" nzRequired>充值金额</nz-form-label>
<nz-form-control [nzSm]="14" [nzXs]="24" nzErrorTip="请输入充值金额!">
<nz-input-number-group nzPrefix="¥" nzSuffix="RMB" style="width: 100%">
<nz-input-number formControlName="price" [nzPrecision]="2" ></nz-input-number>
</nz-input-number-group>
</nz-form-control>
</nz-form-item>
<nz-form-item >
<nz-form-label [nzSm]="6" [nzXs]="24" nzRequired>排序</nz-form-label>
<nz-form-control [nzSm]="14" [nzXs]="24" nzErrorTip="请输入排序!">
<nz-input-number style="width: 100%" formControlName="sort" [nzSize]="'large'" [nzMin]="1" [nzMax]="99999" [nzStep]="1" ></nz-input-number>
</nz-form-control>
</nz-form-item>
</form>
</ng-container>
</nz-modal>

@ -0,0 +1,12 @@
[nz-form-label] {
overflow: visible;
}
button {
margin-left: 8px;
}
.submit-btn {
width: 150px;
}
.search-area {
margin-top: 30px;
}

@ -0,0 +1,178 @@
import { Component } from '@angular/core';
import {DatePipe, NgForOf, NgIf} from "@angular/common";
import {NzButtonComponent} from "ng-zorro-antd/button";
import {
NzTableComponent, NzTableModule,
NzThMeasureDirective
} from "ng-zorro-antd/table";
import {NzColDirective, NzRowDirective} from "ng-zorro-antd/grid";
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 {
NzInputNumberComponent,
NzInputNumberGroupComponent,
} from "ng-zorro-antd/input-number";
import {NzMenuDirective, NzMenuItemComponent} from "ng-zorro-antd/menu";
import {NzModalComponent, NzModalContentDirective, NzModalModule} from "ng-zorro-antd/modal";
import {NzOptionComponent, NzSelectComponent} from "ng-zorro-antd/select";
import {NzPopconfirmDirective} from "ng-zorro-antd/popconfirm";
import {FormGroup, NonNullableFormBuilder, ReactiveFormsModule, Validators} from "@angular/forms";
import {NzMessageService} from "ng-zorro-antd/message";
import {CommonService} from "../../../../services/common/common.service";
import {RechargeService} from "../../../../services/recharge/recharge.service";
import {NzInputDirective} from "ng-zorro-antd/input";
import {PriceTypePipe} from "../../../../pipes/recharge/price-type.pipe";
@Component({
selector: 'app-price-list',
standalone: true,
imports: [
NzModalComponent,
NzFormLabelComponent,
NzRowDirective,
NzFormDirective,
ReactiveFormsModule,
NzColDirective,
NzSelectComponent,
NzOptionComponent,
NzButtonComponent,
NzTableComponent,
NzThMeasureDirective,
NgForOf,
NzModalModule,
NzDividerComponent,
NzTableModule,
NzDropDownADirective,
DatePipe,
NzDropDownDirective,
NzDropdownMenuComponent,
NzIconDirective,
NzPopconfirmDirective,
NzMenuDirective,
NzMenuItemComponent,
NzModalContentDirective,
NzInputNumberGroupComponent,
NzInputNumberComponent,
NzFormControlComponent,
NzFormItemComponent,
NzInputDirective,
PriceTypePipe
],
templateUrl: './price-list.component.html',
styleUrl: './price-list.component.less'
})
export class PriceListComponent {
// 表单页数
tablePageNum = 1;
// 表单数据
tableData: any = {
total: 0,
loading: false,
list: [],
};
// 搜索表单
searchForm: FormGroup;
// 编辑产品类型表单
editForm: FormGroup;
// 编辑弹出框
isVisibleEdit = false;
constructor(private fb: NonNullableFormBuilder,
private msg: NzMessageService,
private commonService: CommonService,
private rechargeService: RechargeService) {
// 初始化搜索框
this.searchForm = this.fb.group({
type: [''],
});
// 初始化
this.editForm = this.fb.group({
type: ['' , [Validators.required]],
sort: ['' , [Validators.required]],
price: ['' , [Validators.required]],
payPrice: ['' , [Validators.required]],
id: [null],
});
this.getRequest();
}
// 查询列表
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.rechargeService.getList(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;
});
}
// 唤醒编辑表单
showEdit(item?: any) {
if (item != null) {
item.type = String(item.type);
this.editForm.patchValue(item);
} else {
this.editForm.reset();
}
this.isVisibleEdit = true;
}
// 编辑表单提交
handleEdit(): void {
if (this.editForm.valid) {
this.rechargeService.editPrice(this.editForm.value , (data: any) => {
if (data['return_code'] === '000000') {
this.msg.success("成功!");
this.isVisibleEdit = false;
this.getRequest();
} else {
this.msg.error(data['return_msg']);
}
});
} else {
Object.values(this.editForm.controls).forEach(control => {
if (control.invalid) {
control.markAsDirty();
control.updateValueAndValidity({ onlySelf: true });
}
});
}
}
// 删除
delete(id: number): void {
this.rechargeService.delete(id , (data: any) => {
if (data['return_code'] === '000000') {
this.msg.success("成功!");
this.getRequest();
} else {
this.msg.error(data['return_msg']);
}
});
}
}

@ -23,9 +23,22 @@
</nz-form-item>
<nz-form-item>
<nz-form-control nzErrorTip="请输入您的密码!">
<nz-input-group nzPrefixIcon="lock">
<input type="password" nzSize="large" nz-input formControlName="password" placeholder="密码" />
</nz-input-group>
<nz-input-group nzPrefixIcon="lock" [nzSuffix]="suffixTemplate">
<input
[type]="passwordVisible ? 'text' : 'password'"
nz-input
nzSize="large"
placeholder="密码"
formControlName="password"
/>
</nz-input-group>
<ng-template #suffixTemplate>
<span
nz-icon
[nzType]="passwordVisible ? 'eye-invisible' : 'eye'"
(click)="passwordVisible = !passwordVisible"
></span>
</ng-template>
</nz-form-control>
</nz-form-item>
<nz-form-item>

@ -76,3 +76,6 @@
margin-top: 20px;
width: 100%;
}
i {
cursor: pointer;
}

@ -21,6 +21,7 @@ import {DATA, INIT_FLAG, LOGIN_DATA, USER_TOKEN} from "../../../data/login/local
import {Router} from "@angular/router";
import {BrowserStorageService} from "../../../utils/localStorage.service";
import {LoginService} from "../../../services/login/login.service";
import {NzIconDirective} from "ng-zorro-antd/icon";
@ -45,6 +46,7 @@ import {LoginService} from "../../../services/login/login.service";
NzRowDirective,
NzFormDirective,
NzSliderComponent,
NzIconDirective,
],
@ -64,6 +66,7 @@ export class LoginComponent {
// 背景图片
backgroundImage = backgroundImage;
passwordVisible = false;
// 验证随机数
randomNumber = MathUtils.generateRandomNumber(100);
@ -71,12 +74,12 @@ export class LoginComponent {
validateForm: FormGroup<{
loginName: FormControl<string>;
password: FormControl<string>;
slider: FormControl<string>;
slider: FormControl<number>;
remember: FormControl<boolean>;
}> = this.fb.group({
loginName: ['', [Validators.required]],
password: ['', [Validators.required]],
slider: ['', [Validators.required]],
slider: [0, [Validators.required]],
remember: [true]
});

@ -85,6 +85,7 @@
<ul nz-menu nzSelectable>
<li nz-menu-item><a (click)="showResetPwd(data.merNo)">密码重置</a></li>
<li nz-menu-item><a (click)="showPayList(data)">支付参数列表</a></li>
<li nz-menu-item><a (click)="showProductConfig(data)">产品参数列表</a></li>
</ul>
</nz-dropdown-menu>
</td>
@ -283,3 +284,66 @@
</form>
</ng-container>
</nz-modal>
<nz-modal [nzWidth]="1400" [(nzVisible)]="isVisibleProductConfig" nzTitle="{{merPayConfig?.merName}}-产品配置列表" [nzFooter]="null" (nzOnCancel)="isVisibleProductConfig= false">
<!--列表-->
<ng-container *nzModalContent>
<button nz-button (click)="showEditProductConfig()" nzType="primary">创建</button>
<button nz-button [nzType]="'default'" (click)="getProductConfig(merPayConfig.id)">查询</button>
<br />
<br />
<nz-table [nzBordered]="true" #basicTable [nzData]="productConfig">
<thead>
<tr>
<th>产品名称</th>
<th>折扣</th>
<th>创建时间</th>
<th>操作</th>
</tr>
</thead>
<tbody>
<tr *ngFor="let data of basicTable.data">
<td>{{data.productName}}</td>
<td>{{data.discount}}%</td>
<td>{{ data.createTime | date: 'yyyy-MM-dd HH:mm'}}</td>
<td>
<a (click)="showEditProductConfig(data)">修改</a>
<nz-divider nzType="vertical"></nz-divider>
<a nz-popconfirm nzPopconfirmTitle="是否确认删除?" (nzOnConfirm)="deleteProductConfig(data.id)">删除</a>
</td>
</tr>
</tbody>
</nz-table>
</ng-container>
</nz-modal>
<!--添加弹出框-->
<nz-modal [(nzVisible)]="isVisibleProduct" [nzMaskClosable] = false nzTitle="编辑产品参数" (nzOnCancel)="isVisibleProduct = false" (nzOnOk)="handleEditProductConfig()">
<ng-container *nzModalContent>
<form nz-form [formGroup]="editProductForm">
<nz-form-item >
<nz-form-label [nzSm]="6" [nzXs]="24" nzRequired>类型</nz-form-label>
<nz-form-control [nzSm]="14" [nzXs]="24" nzErrorTip="请选择类型!">
<nz-select nzSize="large" nzShowSearch nzAllowClear nzPlaceHolder="请选择" formControlName="productType">
<nz-option nzLabel="电影票" nzValue="3"></nz-option>
<nz-option nzLabel="肯德基" nzValue="4"></nz-option>
<nz-option nzLabel="会员充值" nzValue="5"></nz-option>
</nz-select>
</nz-form-control>
</nz-form-item>
<nz-form-item >
<nz-form-label [nzSm]="6" [nzXs]="24" nzRequired>折扣比例</nz-form-label>
<nz-form-control [nzSm]="14" [nzXs]="24" nzErrorTip="请输入折扣比例!">
<nz-input-number-group nzSuffix="%" style="width: 100%">
<nz-input-number [nzMax]="100" [nzMin]="1" formControlName="discount" [nzPrecision]="2" ></nz-input-number>
</nz-input-number-group>
</nz-form-control>
</nz-form-item>
</form>
</ng-container>
</nz-modal>

@ -29,10 +29,10 @@ import {NzAvatarModule} from "ng-zorro-antd/avatar";
import {MerService} from "../../../services/merchant/mer.service";
import {RoleService} from "../../../services/role/role.service";
import {NzImageModule} from "ng-zorro-antd/image";
import {GoodsTypeData} from "../../../model/goods.interface";
import {NzPopconfirmDirective} from "ng-zorro-antd/popconfirm";
import {NzTypographyComponent} from "ng-zorro-antd/typography";
import {payPlatform} from "../../../pipes/mer/payPlatform.pipe";
import {NzInputNumberComponent, NzInputNumberGroupComponent} from "ng-zorro-antd/input-number";
@Component({
selector: 'app-mer-list',
@ -77,7 +77,9 @@ import {payPlatform} from "../../../pipes/mer/payPlatform.pipe";
NzImageModule,
NzPopconfirmDirective,
NzTypographyComponent,
payPlatform
payPlatform,
NzInputNumberComponent,
NzInputNumberGroupComponent
],
templateUrl: './mer-list.component.html',
styleUrl: './mer-list.component.less'
@ -99,7 +101,6 @@ export class MerListComponent {
merDetailVisible = false;
merDetailObject: any = {};
merLogo = '';
uploadLoading = false;
updateMerVisible = false;
@ -108,9 +109,13 @@ export class MerListComponent {
// 编辑商品规格弹出框
isVisiblePay = false;
nodesPayConfig: any;
productConfig: any;
editPayForm: FormGroup;
editProductForm: FormGroup;
// 编辑弹出框
isVisibleEdit = false;
isVisibleProduct = false;
isVisibleProductConfig = false;
constructor(private fb: NonNullableFormBuilder,
private merService: MerService,
@ -148,6 +153,14 @@ export class MerListComponent {
id: [null],
});
// 初始化
this.editProductForm = this.fb.group({
id: [''],
merId: [''],
productType: ['' , [Validators.required]],
discount: ['', [Validators.required]],
});
// 获取角色数据
this.roleService.queryAllRole((data: any) => {
this.roleData = data['return_data'];
@ -439,4 +452,75 @@ export class MerListComponent {
this.editPayForm.controls['payMerKey'].updateValueAndValidity();
}
// 展示产品配置
showProductConfig(data: any) {
this.isVisibleProductConfig = true;
this.merPayConfig = data;
this.getProductConfig(data.id);
}
// 查询配置列表
getProductConfig(merId: number): any {
let params = {
merId: merId,
}
this.merService.getList(params , (data: any) => {
if (data['return_code'] === '000000') {
this.productConfig = data['return_data'];
} else {
this.message.error(data['return_msg']);
}
});
}
// 唤醒编辑表单
showEditProductConfig(item?:any) {
if (item != null) {
item.productType = String(item.productType);
this.editProductForm.patchValue(item);
} else {
this.editProductForm.reset();
}
this.isVisibleProduct = true;
}
// 编辑表单提交
handleEditProductConfig(): void {
if (this.editProductForm.valid) {
this.editProductForm.value.merId = this.merPayConfig.id;
this.merService.editProductConfig(this.editProductForm.value , (data: any) => {
if (data['return_code'] === '000000') {
this.message.success("成功!");
this.isVisibleProduct = false;
this.getProductConfig(this.merPayConfig.id);
} else {
this.message.error(data['return_msg']);
}
});
} else {
Object.values(this.editProductForm.controls).forEach(control => {
if (control.invalid) {
control.markAsDirty();
control.updateValueAndValidity({ onlySelf: true });
}
});
}
}
// 删除
deleteProductConfig(id: number): void {
this.merService.deleteProductConfig(id , (data: any) => {
if (data['return_code'] === '000000') {
this.message.success("成功!");
this.getProductConfig(this.merPayConfig.id);
} else {
this.message.error(data['return_msg']);
}
});
}
}

@ -160,8 +160,8 @@
<nz-tab nzTitle="订单信息">
<nz-descriptions nzTitle="订单信息" nzBordered>
<nz-descriptions-item nzTitle="商品名称">{{orderGoodsData?.goodsName}} - {{orderGoodsData?.goodsSpecsName}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="用户手机号">{{ orderGoodsData?.userPhone }}</nz-descriptions-item>
<nz-descriptions-item nzTitle="商品分类">{{ orderGoodsData?.goodsTypeName }}</nz-descriptions-item>
<nz-descriptions-item nzTitle="用户手机号">{{ orderGoodsData?.userPhone }}</nz-descriptions-item>//.
0 <nz-descriptions-item nzTitle="商品分类">{{ orderGoodsData?.goodsTypeName }}</nz-descriptions-item>
<nz-descriptions-item nzTitle="商品品牌">{{ orderGoodsData?.goodsBrandName }}</nz-descriptions-item>
<nz-descriptions-item nzTitle="商品价格">{{ orderGoodsData?.goodsSpecsOriginalPrice }}</nz-descriptions-item>
<nz-descriptions-item nzTitle="商品数量">{{ orderGoodsData?.goodsCount }}</nz-descriptions-item>

@ -0,0 +1,163 @@
<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="goodsName" 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>
<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>
<input nzSize="large" nz-input formControlName="userPhone" placeholder="请输入" />
</nz-form-control>
</nz-form-item>
</div>
<div nz-col [nzSpan]="24">
<nz-form-item>
<nz-form-label>创建时间</nz-form-label>
<nz-form-control>
<nz-range-picker nzSize="large" formControlName="createTimeArray" nzShowTime [nzFormat]="'yyyy/MM/dd HH:mm:ss'"></nz-range-picker>
<nz-radio-group nzSize="large" nzButtonStyle="solid" formControlName="createTimeSelect" (ngModelChange)="createTimeInit()">
<label nz-radio-button *ngFor="let item of dateTypeSelect" nzValue="{{item.value}}">{{item.name}}</label>
</nz-radio-group>
</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 orderCinemaStatus" nzLabel="{{item['name']}}" nzValue="{{item['key']}}"></nz-option>
</nz-select>
</nz-form-control>
</nz-form-item>
</div>
<div nz-col [nzSpan]="24" class="search-area">
<button nz-button [nzType]="'primary'" (click)="getRequest()">查询</button>
<button nz-button (click)="searchForm.reset()">重置</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="50px">创建时间</th>
<th nzWidth="50px">更新时间</th>
<th nzRight nzWidth="50px">物流状态</th>
<th nzRight nzWidth="70px">操作</th>
</tr>
</thead>
<tbody>
<tr *ngFor="let data of basicTable.data">
<td>{{data.goodsName}} - {{data.goodsSpecsName}}</td>
<td>
<img nz-image width="60px" height="60px" nzSrc="{{imageUrl + data.img }}" [nzFallback]="fallbackImg" alt="" />
</td>
<td>{{data.goodsTypeName}}</td>
<td>{{data.goodsBrandName}}</td>
<td>{{data.userPhone}}</td>
<td>{{data.orderNo}}</td>
<td>{{data.childOrderNo}}</td>
<td>{{data.logisticsNo}}</td>
<td>{{ data.createTime | date: 'yyyy-MM-dd HH:mm'}}</td>
<td>{{ data.updateTime | date: 'yyyy-MM-dd HH:mm'}}</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="商品名称">{{orderGoodsData?.goodsName}} - {{orderGoodsData?.goodsSpecsName}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="用户手机号">{{ orderGoodsData?.userPhone }}</nz-descriptions-item>//.
0 <nz-descriptions-item nzTitle="商品分类">{{ orderGoodsData?.goodsTypeName }}</nz-descriptions-item>
<nz-descriptions-item nzTitle="商品品牌">{{ orderGoodsData?.goodsBrandName }}</nz-descriptions-item>
<nz-descriptions-item nzTitle="商品价格">{{ orderGoodsData?.goodsSpecsOriginalPrice }}</nz-descriptions-item>
<nz-descriptions-item nzTitle="商品数量">{{ orderGoodsData?.goodsCount }}</nz-descriptions-item>
<nz-descriptions-item nzTitle="图片" [nzSpan]="3">
<nz-image-group>
<img nz-image width="80px" [nzFallback]="fallbackImg" nzSrc="{{imageUrl + orderGoodsData.img }}" alt="" />
</nz-image-group>
</nz-descriptions-item>
<nz-descriptions-item nzTitle="物流状态" [nzSpan]="3">
<span *ngIf="orderGoodsData?.logisticsStatusDesc == null">
{{orderGoodsData.status | orderGoodsStatus}}
</span>
<span *ngIf="orderGoodsData?.logisticsStatusDesc != null">
<nz-badge *ngIf="orderGoodsData?.logisticsStatus == 'DELIVERING'" nzColor="cyan" nzText="{{orderGoodsData.logisticsStatusDesc}}"></nz-badge>
<nz-badge *ngIf="orderGoodsData?.logisticsStatus == 'TRANSPORT'" nzColor="lime" nzText="{{orderGoodsData.logisticsStatusDesc}}"></nz-badge>
<nz-badge *ngIf="orderGoodsData?.logisticsStatus == 'AGENT_SIGN'" nzStatus="success" nzText="{{orderGoodsData.logisticsStatusDesc}}"></nz-badge>
<nz-badge *ngIf="orderGoodsData?.logisticsStatus == 'SIGN'" nzStatus="success" nzText="{{orderGoodsData.logisticsStatusDesc}}"></nz-badge>
<nz-badge *ngIf="orderGoodsData?.logisticsStatus == 'ACCEPT'" nzStatus="processing" nzText="{{orderGoodsData.logisticsStatusDesc}}"></nz-badge>
<nz-badge *ngIf="orderGoodsData?.logisticsStatus == 'FAILED'" nzStatus="error" nzText="{{orderGoodsData.logisticsStatusDesc}}"></nz-badge>
<nz-badge *ngIf="orderGoodsData?.logisticsStatus == 'WAIT_ACCEPT'" nzStatus="default" nzText="{{orderGoodsData.logisticsStatusDesc}}"></nz-badge>
</span>
</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?.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,6 @@
.search-area {
margin-bottom: 10px;
}
.search-area button {
margin-right: 8px;
}

@ -0,0 +1,184 @@
import { Component } from '@angular/core';
import {FormGroup, FormsModule, NonNullableFormBuilder, ReactiveFormsModule} from "@angular/forms";
import {environment} from "../../../../environments/environment";
import {DateSelectType, DateUtils} from "../../../utils/dateUtils.service";
import {NzMessageService} from "ng-zorro-antd/message";
import {OrderGoodsData} from "../../../model/order.interface";
import {NzColDirective, NzRowDirective} from "ng-zorro-antd/grid";
import {NzFormDirective, NzFormModule} from "ng-zorro-antd/form";
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 {GoodsStatusPipe} from "../../../pipes/goods/goods-status.pipe";
import {OrderGoodsStatusPipe} from "../../../pipes/order/order-goods-status.pipe";
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 {NzTabSetComponent, NzTabsModule} from "ng-zorro-antd/tabs";
import {NzIconDirective} from "ng-zorro-antd/icon";
import {fallbackImg, orderCinemaStatus} from '../../../data/goods/goods.namespace';
import {NzBadgeComponent} from "ng-zorro-antd/badge";
import {AuditStatusPipe} from "../../../pipes/audit/audit-status.pipe";
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 {OrderCinemaService} from "../../../services/trade/order-cinema.service";
@Component({
selector: 'app-order-cinema',
standalone: true,
imports: [
NzColDirective,
NzRowDirective,
NzFormDirective,
ReactiveFormsModule,
NzTreeSelectComponent,
NzInputDirective,
NzSelectComponent,
NzOptionComponent,
NzButtonComponent,
NzTableComponent,
NzImageModule,
NzModalModule,
NzTableModule,
NzFormModule,
NzThMeasureDirective,
NgForOf,
NzImageDirective,
GoodsStatusPipe,
DatePipe,
OrderGoodsStatusPipe,
NzDropdownMenuComponent,
NgIf,
NzMenuDirective,
NzDescriptionsModule,
NzMenuItemComponent,
NzPopconfirmDirective,
NzDividerComponent,
NzDropDownADirective,
NzDropDownDirective,
NzTabsModule,
NzIconDirective,
NzBadgeComponent,
AuditStatusPipe,
NzTabSetComponent,
FormsModule,
NzSpinComponent,
NzTimelineItemComponent,
NgClass,
NzResultComponent,
NzTimelineComponent,
NzDatePickerComponent,
NzRadioButtonDirective,
NzRadioComponent,
NzRadioGroupComponent,
NzRangePickerComponent,
],
templateUrl: './order-cinema.component.html',
styleUrl: './order-cinema.component.less'
})
export class OrderCinemaComponent {
// 表单页数
tablePageNum = 1;
// 表单数据
tableData: any = {
total: 0,
loading: false,
list: [],
};
// 搜索表单
searchForm: FormGroup;
baseUrl = environment.baseUrl;
imageUrl = environment.imageUrl;
orderGoodsData: any;
orderDetailModal = false;
// 时间类型选择
dateTypeSelect = DateSelectType;
protected readonly fallbackImg = fallbackImg;
protected readonly orderCinemaStatus = orderCinemaStatus;
constructor(private fb: NonNullableFormBuilder,
private msg: NzMessageService,
private orderCinema: OrderCinemaService) {
// 初始化搜索框
this.searchForm = this.fb.group({
orderNo: [''],
userPhone: [''],
goodsSpecsName: [''],
createTimeArray: [[]],
createTimeSelect: ['1'],
createTimeS: [''],
createTimeE: [''],
goodsName: [''],
payType: [''],
status: [''],
});
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(this.searchForm.controls['createTimeArray'].value[0]);
this.searchForm.controls['createTimeE'].setValue(this.searchForm.controls['createTimeArray'].value[1]);
} else {
this.searchForm.controls['createTimeS'].setValue(null)
this.searchForm.controls['createTimeE'].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.orderCinema.getListCinema(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;
});
}
/**
*
*/
createTimeInit() {
let createTimeSelect = this.searchForm.controls['createTimeSelect'].value;
if (createTimeSelect != null) {
let timeObj = DateUtils.getDate(new Date(), Number(createTimeSelect));
this.searchForm.controls['createTimeArray'].setValue([timeObj.timeS, timeObj.timeE]);
}
}
showDetail(data: OrderGoodsData): void {
this.orderGoodsData = data;
this.orderDetailModal = true;
}
}

@ -3,10 +3,12 @@ import {CompOrderComponent} from "./comp-order/comp-order.component";
import {OrderAfterSalesComponent} from "./order-after-sales/order-after-sales.component";
import {GoodsListComponent} from "./goods-list/goods-list.component";
import {OrderRefundComponent} from "./order-refund/order-refund.component";
import {OrderCinemaComponent} from "./order-cinema/order-cinema.component";
export const TRADE_ROUTES: Routes = [
{ path: 'goods-list', component: GoodsListComponent },
{ path: 'comp-order', component: CompOrderComponent },
{ path: 'order-after-sales', component: OrderAfterSalesComponent },
{ path: 'order-refund', component: OrderRefundComponent },
{ path: 'order-cinema', component: OrderCinemaComponent },
];

@ -0,0 +1,20 @@
import { Pipe, PipeTransform } from '@angular/core';
@Pipe({
name: 'priceType',
standalone: true
})
export class PriceTypePipe implements PipeTransform {
transform(value: number): any {
switch (value) {
case 1:
return '电信运营商';
case 2:
return '移动运营商';
case 3:
return '联通运营商';
}
}
}

@ -132,8 +132,8 @@ export class GoodsService {
* @param id
* @param callBack
*/
public deleteGoodsMsg(id: number, callBack:any) {
this.http.get(environment.baseUrl + 'goods/deleteGoodsMsg?id=' + id ).subscribe(data => {
public deleteGoods(id: number, callBack:any) {
this.http.get(environment.baseUrl + 'goods/deleteGoods?id=' + id ).subscribe(data => {
callBack(data);
});
}
@ -181,5 +181,37 @@ export class GoodsService {
});
}
/**
*
* @param params
* @param callBack
*/
public getListPrice(params: object, callBack:any) {
this.http.post(environment.baseUrl + 'price/getListPrice', params).subscribe(data => {
callBack(data);
});
}
/**
*
* @param params
* @param callBack
*/
public editPrice(params: object, callBack:any) {
this.http.post(environment.baseUrl + 'price/editPrice', params).subscribe(data => {
callBack(data);
});
}
/**
*
* @param params
* @param callBack
*/
public deletePrice(id: number, callBack:any) {
this.http.get(environment.baseUrl + 'price/deletePrice?id=' + id ).subscribe(data => {
callBack(data);
});
}
}

@ -94,4 +94,38 @@ export class MerService {
callBack(data);
});
}
/**
*
* @param params
* @param callBack
*/
public getList(params: any, callBack:any) {
params.time = new Date().getTime();
this.http.get(environment.baseUrl + 'productConfig/getList?' + ObjectData.objectByString(params)).subscribe(data => {
callBack(data);
});
}
/**
*
* @param params
* @param callBack
*/
public editProductConfig(params: any, callBack:any) {
this.http.post(environment.baseUrl + 'productConfig/editProductConfig', params).subscribe(data => {
callBack(data);
});
}
/**
*
* @param id
* @param callBack
*/
public deleteProductConfig(id: number, callBack:any) {
this.http.get(environment.baseUrl + 'productConfig/delete?id=' + id ).subscribe(data => {
callBack(data);
});
}
}

@ -0,0 +1,45 @@
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 RechargeService {
constructor(private http: HttpClient) { }
/**
*
* @param params
* @param callBack
*/
public editPrice(params: object, callBack:any) {
this.http.post(environment.baseUrl + 'price/editPrice', params).subscribe(data => {
callBack(data);
});
}
/**
*
* @param params
* @param callBack
*/
public getList(params: object, callBack:any) {
this.http.get(environment.baseUrl + 'price/getListPrice?' + ObjectData.objectByString(params)).subscribe(data => {
callBack(data);
});
}
/**
*
* @param id
* @param callBack
*/
public delete(id: number, callBack:any) {
this.http.get(environment.baseUrl + 'price/delete?id=' + id ).subscribe(data => {
callBack(data);
});
}
}

@ -0,0 +1,23 @@
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 OrderCinemaService {
constructor(private http: HttpClient) { }
/**
*
* @param param
* @param callBack
*/
public getListCinema(param: object, callBack:any) {
this.http.get(environment.orderUrl + 'orderCinema/getListCinema?'+ObjectData.objectByString(param)).subscribe(data => {
callBack(data);
});
}
}

@ -4,14 +4,14 @@
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: 'http://localhost:9702/brest/', // 测试环境服务器地址(请求数据地址)
// orderUrl: 'http://localhost:9703/order/', // 测试环境服务器地址(请求数据地址)
// userUrl: 'http://localhost:9704/user/', // 测试环境服务器地址(请求数据地址)
// imageUrl: 'https://phgcs.dctpay.com/filesystem/',
// 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/',
};

Loading…
Cancel
Save