袁野 3 months ago
parent 96bf7e340f
commit 02adfbf9d5
  1. 2
      src/app/pages/account/account.routes.ts
  2. 2
      src/app/pages/goods/goods-brand/goods-brand.component.ts
  3. 38
      src/app/pages/goods/goods-list/goods-list.component.html
  4. 17
      src/app/pages/goods/goods-list/goods-list.component.ts
  5. 6
      src/app/pages/goods/goods-type/goods-type.component.html
  6. 11
      src/app/pages/goods/goods-type/goods-type.component.ts
  7. 22
      src/app/pages/marketing/discount-list/discount-list.component.html
  8. 2
      src/app/pages/marketing/discount-list/discount-list.component.ts
  9. 4
      src/app/pages/system/system.routes.ts
  10. 5
      src/app/pages/trade/comp-order/comp-order.component.ts
  11. 2
      src/app/pages/trade/goods-list/goods-list.component.html
  12. 4
      src/app/pages/trade/goods-list/goods-list.component.ts
  13. 4
      src/app/pages/trade/order-after-sales/order-after-sales.component.ts
  14. 4
      src/app/pages/trade/order-cinema/order-cinema.component.ts
  15. 4
      src/app/pages/trade/order-refund/order-refund.component.ts
  16. 13
      src/app/services/account/user.service.ts
  17. 63
      src/app/utils/dateUtils.service.ts
  18. 16
      src/environments/environment.ts

@ -2,9 +2,11 @@ import { Routes } from '@angular/router';
import {SysAccountComponent} from "./sys-account/sys-account.component"; import {SysAccountComponent} from "./sys-account/sys-account.component";
import {SysRoleComponent} from "./sys-role/sys-role.component"; import {SysRoleComponent} from "./sys-role/sys-role.component";
import {UserComponent} from "./user/user.component"; import {UserComponent} from "./user/user.component";
import {ComplaintComponent} from "./complaint/complaint.component";
export const ACCOUNT_ROUTES: Routes = [ export const ACCOUNT_ROUTES: Routes = [
{ path: 'sys_account', component: SysAccountComponent}, { path: 'sys_account', component: SysAccountComponent},
{ path: 'sys_role', component: SysRoleComponent}, { path: 'sys_role', component: SysRoleComponent},
{ path: 'user_list', component: UserComponent}, { path: 'user_list', component: UserComponent},
{ path: 'complaint', component: ComplaintComponent},
]; ];

@ -161,6 +161,8 @@ export class GoodsBrandComponent {
if (this.editForm.valid) { if (this.editForm.valid) {
if (this.imgUrl.length !== 0) { if (this.imgUrl.length !== 0) {
this.editForm.value.imgUrl = this.commonService.imgList(this.imgUrl); this.editForm.value.imgUrl = this.commonService.imgList(this.imgUrl);
} else {
this.editForm.value.imgUrl = null;
} }
this.goodsService.editGoodsBrand(this.editForm.value , (data: any) => { this.goodsService.editGoodsBrand(this.editForm.value , (data: any) => {
if (data['return_code'] === '000000') { if (data['return_code'] === '000000') {

@ -111,7 +111,7 @@
<td>{{ data.updateTime | date: 'yyyy-MM-dd HH:mm'}}</td> <td>{{ data.updateTime | date: 'yyyy-MM-dd HH:mm'}}</td>
<td>{{data.status | goodsStatus}}</td> <td>{{data.status | goodsStatus}}</td>
<td> <td>
<a *ngIf="data.status == 2" (click)="showEdit(data)">修改</a> <a (click)="showEdit(data)">修改</a>
<nz-divider nzType="vertical"></nz-divider> <nz-divider nzType="vertical"></nz-divider>
<a nz-dropdown [nzDropdownMenu]="menu"> <a nz-dropdown [nzDropdownMenu]="menu">
更多 更多
@ -174,13 +174,13 @@
</nz-form-control> </nz-form-control>
</nz-form-item> </nz-form-item>
<nz-form-item > <nz-form-item >
<nz-form-label [nzSm]="6" [nzXs]="24">商品标签</nz-form-label> <nz-form-label [nzSm]="6" [nzXs]="24" nzTooltipTitle="商品标签请以英文,隔开,展示在价格下方,例如:箱规:1*5盒/箱,外箱尺寸:80*45.5*29cm" >商品标签</nz-form-label>
<nz-form-control [nzSm]="14" [nzXs]="24" nzErrorTip="请输入商品标签!"> <nz-form-control [nzSm]="14" [nzXs]="24" nzErrorTip="请输入商品标签!">
<input nzSize="large" nz-input formControlName="goodsLabel" placeholder="请输入" /> <input nzSize="large" nz-input formControlName="goodsLabel" placeholder="请输入" />
</nz-form-control> </nz-form-control>
</nz-form-item> </nz-form-item>
<nz-form-item > <nz-form-item >
<nz-form-label [nzSm]="6" [nzXs]="24">商品说明</nz-form-label> <nz-form-label [nzSm]="6" [nzXs]="24" nzTooltipTitle="商品标签请以英文,隔开,展示在规格下方,例如:24小时发货,极速退款" >商品说明</nz-form-label>
<nz-form-control [nzSm]="14" [nzXs]="24" nzErrorTip="请输入商品说明!"> <nz-form-control [nzSm]="14" [nzXs]="24" nzErrorTip="请输入商品说明!">
<input nzSize="large" nz-input formControlName="goodsExplain" placeholder="请输入" /> <input nzSize="large" nz-input formControlName="goodsExplain" placeholder="请输入" />
</nz-form-control> </nz-form-control>
@ -295,7 +295,8 @@
<!-- <th rowspan="2">限购(个)</th>--> <!-- <th rowspan="2">限购(个)</th>-->
<th rowspan="2">库存(个)</th> <th rowspan="2">库存(个)</th>
<th colspan="2">时间</th> <th colspan="2">时间</th>
<th colspan="7" *ngIf="goodsMsg?.type == 2">虚拟产品</th> <th colspan="4" *ngIf="goodsMsg?.type == 2">虚拟产品</th>
<th colspan="3" >跳转信息</th>
<th *ngIf="goodsMsg?.status == 2" rowspan="2" nzRight>操作</th> <th *ngIf="goodsMsg?.status == 2" rowspan="2" nzRight>操作</th>
</tr> </tr>
<tr> <tr>
@ -307,9 +308,9 @@
<th *ngIf="goodsMsg?.type == 2" rowspan="1">归库天数</th> <th *ngIf="goodsMsg?.type == 2" rowspan="1">归库天数</th>
<th *ngIf="goodsMsg?.type == 2" rowspan="1">类型</th> <th *ngIf="goodsMsg?.type == 2" rowspan="1">类型</th>
<th *ngIf="goodsMsg?.type == 2" rowspan="1">产品来源</th> <th *ngIf="goodsMsg?.type == 2" rowspan="1">产品来源</th>
<th *ngIf="goodsMsg?.type == 2" rowspan="1">跳转类型</th> <th rowspan="1">跳转类型</th>
<th *ngIf="goodsMsg?.type == 2" rowspan="1">跳转地址</th> <th rowspan="1">跳转地址</th>
<th *ngIf="goodsMsg?.type == 2" rowspan="1">应用ID</th> <th rowspan="1">应用ID</th>
</tr> </tr>
</thead> </thead>
@ -333,9 +334,9 @@
<td *ngIf="goodsMsg?.type == 2">{{data.validDay}}</td> <td *ngIf="goodsMsg?.type == 2">{{data.validDay}}</td>
<td *ngIf="goodsMsg?.type == 2">{{data.type == 1 ? '内部虚拟商品' : '外部虚拟产品'}}</td> <td *ngIf="goodsMsg?.type == 2">{{data.type == 1 ? '内部虚拟商品' : '外部虚拟产品'}}</td>
<td *ngIf="goodsMsg?.type == 2">{{data.source | dictionary: 'GOODS_VPD_SOURCE'}}</td> <td *ngIf="goodsMsg?.type == 2">{{data.source | dictionary: 'GOODS_VPD_SOURCE'}}</td>
<td *ngIf="goodsMsg?.type == 2">{{data.jumpType == 1 ? '小程序' : 'H5'}}</td> <td>{{data.jumpType == 1 ? '小程序' : 'H5'}}</td>
<td *ngIf="goodsMsg?.type == 2">{{data.jumpUrl}}</td> <td>{{data.jumpUrl}}</td>
<td *ngIf="goodsMsg?.type == 2">{{data.appid}}</td> <td>{{data.appid}}</td>
<td *ngIf="goodsMsg?.status == 2" nzRight> <td *ngIf="goodsMsg?.status == 2" nzRight>
<a (click)="showEditSpecs(data)">修改</a> <a (click)="showEditSpecs(data)">修改</a>
@ -415,28 +416,35 @@
<nz-form-item *ngIf="goodsMsg?.type == 2"> <nz-form-item *ngIf="goodsMsg?.type == 2">
<nz-form-label [nzSm]="6" [nzXs]="24" nzRequired>类型</nz-form-label> <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired>类型</nz-form-label>
<nz-form-control [nzSm]="14" [nzXs]="24" nzErrorTip="请选择类型!"> <nz-form-control [nzSm]="14" [nzXs]="24" nzErrorTip="请选择类型!">
<nz-select nzSize="large" nzShowSearch nzAllowClear nzPlaceHolder="请选择" formControlName="type" (ngModelChange)="typeChange($event)"> <nz-select nzSize="large" nzShowSearch nzAllowClear nzPlaceHolder="请选择" formControlName="type" >
<nz-option nzLabel="内部虚拟商品" nzValue="1"></nz-option> <nz-option nzLabel="内部虚拟商品" nzValue="1"></nz-option>
<nz-option nzLabel="外部虚拟产品" nzValue="2"></nz-option> <nz-option nzLabel="外部虚拟产品" nzValue="2"></nz-option>
</nz-select> </nz-select>
</nz-form-control> </nz-form-control>
</nz-form-item> </nz-form-item>
<nz-form-item *ngIf="editSpecsForm.value.type == 2"> <nz-form-item *ngIf="editSpecsForm.value.type == 2">
<nz-form-label [nzSm]="6" [nzXs]="24">卡密</nz-form-label> <nz-form-label [nzSm]="6" [nzXs]="24">卡密</nz-form-label>
<nz-form-control [nzSm]="14" [nzXs]="24"> <nz-form-control [nzSm]="14" [nzXs]="24">
<input nzSize="large" nz-input formControlName="key" placeholder="请输入" /> <input nzSize="large" nz-input formControlName="key" placeholder="请输入" />
</nz-form-control> </nz-form-control>
</nz-form-item> </nz-form-item>
<nz-form-item *ngIf="editSpecsForm.value.type == 2"> <nz-form-item *ngIf="goodsMsg?.type == 1">
<nz-form-label [nzSm]="6" [nzXs]="24" nzRequired>跳转类型</nz-form-label> <nz-form-label [nzSm]="6" [nzXs]="24" >按钮名称</nz-form-label>
<nz-form-control [nzSm]="14" [nzXs]="24" nzErrorTip="请选择跳转类型!"> <nz-form-control [nzSm]="14" [nzXs]="24">
<input nzSize="large" nz-input formControlName="btnName" 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">
<nz-select nzSize="large" nzShowSearch nzAllowClear nzPlaceHolder="请选择" formControlName="jumpType" (ngModelChange)="jumpTypeChange($event)"> <nz-select nzSize="large" nzShowSearch nzAllowClear nzPlaceHolder="请选择" formControlName="jumpType" (ngModelChange)="jumpTypeChange($event)">
<nz-option nzLabel="小程序" nzValue="1"></nz-option> <nz-option nzLabel="小程序" nzValue="1"></nz-option>
<nz-option nzLabel="H5" nzValue="2"></nz-option> <nz-option nzLabel="H5" nzValue="2"></nz-option>
</nz-select> </nz-select>
</nz-form-control> </nz-form-control>
</nz-form-item> </nz-form-item>
<nz-form-item *ngIf="editSpecsForm.value.type == 2"> <nz-form-item>
<nz-form-label [nzSm]="6" [nzXs]="24" >跳转地址</nz-form-label> <nz-form-label [nzSm]="6" [nzXs]="24" >跳转地址</nz-form-label>
<nz-form-control [nzSm]="14" [nzXs]="24" > <nz-form-control [nzSm]="14" [nzXs]="24" >
<input nzSize="large" nz-input formControlName="jumpUrl" placeholder="请输入" /> <input nzSize="large" nz-input formControlName="jumpUrl" placeholder="请输入" />

@ -180,7 +180,9 @@ export class GoodsListComponent {
salesEndTime: [new Date(new Date().getFullYear(), new Date().getMonth(), new Date().getDay(), 23, 59, 59), [Validators.required]], salesEndTime: [new Date(new Date().getFullYear(), new Date().getMonth(), new Date().getDay(), 23, 59, 59), [Validators.required]],
type: [''], type: [''],
source: [''], source: [''],
btnName: [''],
id: [null], id: [null],
status: [null],
specsId: [null], specsId: [null],
jumpType: [null], jumpType: [null],
jumpUrl: [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 { jumpTypeChange(type: string): void {
console.log("type", type); console.log("type", type);
if (type == "2") { if (type == "2") {

@ -58,6 +58,12 @@
<input nzSize="large" nz-input formControlName="title" placeholder="请输入" /> <input nzSize="large" nz-input formControlName="title" placeholder="请输入" />
</nz-form-control> </nz-form-control>
</nz-form-item> </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>
<nz-form-item > <nz-form-item >
<nz-form-label [nzSm]="6" [nzXs]="24" nzRequired>业务类型</nz-form-label> <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired>业务类型</nz-form-label>
<nz-form-control [nzSm]="14" [nzXs]="24" nzErrorTip="请选择业务类型!"> <nz-form-control [nzSm]="14" [nzXs]="24" nzErrorTip="请选择业务类型!">

@ -20,8 +20,8 @@ import {NzImageDirective , NzImageModule} from "ng-zorro-antd/image";
import {fallbackImg} from "../../../data/goods/goods.namespace"; import {fallbackImg} from "../../../data/goods/goods.namespace";
import {NzTreeSelectComponent} from "ng-zorro-antd/tree-select"; import {NzTreeSelectComponent} from "ng-zorro-antd/tree-select";
import {NzDividerComponent} from "ng-zorro-antd/divider"; import {NzDividerComponent} from "ng-zorro-antd/divider";
import {it} from "node:test";
import {NzPopconfirmDirective} from "ng-zorro-antd/popconfirm"; import {NzPopconfirmDirective} from "ng-zorro-antd/popconfirm";
import {NzInputNumberComponent} from "ng-zorro-antd/input-number";
const getBase64 = (file: File): Promise<string | ArrayBuffer | null> => const getBase64 = (file: File): Promise<string | ArrayBuffer | null> =>
new Promise((resolve, reject) => { new Promise((resolve, reject) => {
@ -62,7 +62,8 @@ const getBase64 = (file: File): Promise<string | ArrayBuffer | null> =>
NzImageDirective, NzImageDirective,
NzTreeSelectComponent, NzTreeSelectComponent,
NzDividerComponent, NzDividerComponent,
NzPopconfirmDirective NzPopconfirmDirective,
NzInputNumberComponent
], ],
templateUrl: './goods-type.component.html', templateUrl: './goods-type.component.html',
styleUrl: './goods-type.component.less' styleUrl: './goods-type.component.less'
@ -106,6 +107,7 @@ export class GoodsTypeComponent {
// 初始化 // 初始化
this.editGoodSTypeForm = this.fb.group({ this.editGoodSTypeForm = this.fb.group({
title: ['' , [Validators.required]], title: ['' , [Validators.required]],
sort: ['' , [Validators.required]],
parentId: [''], parentId: [''],
id: [null], id: [null],
businessType: ['' ,[Validators.required]], businessType: ['' ,[Validators.required]],
@ -160,8 +162,6 @@ export class GoodsTypeComponent {
return array; return array;
} }
// 插入数据 // 插入数据
visitNode(node: GoodsTypeData, hashMap: { [key: string]: boolean }, array: GoodsTypeData[]): void { visitNode(node: GoodsTypeData, hashMap: { [key: string]: boolean }, array: GoodsTypeData[]): void {
if (!hashMap[node.id]) { if (!hashMap[node.id]) {
@ -203,9 +203,12 @@ export class GoodsTypeComponent {
} }
// 编辑表单提交 // 编辑表单提交
handleEdit(): void { handleEdit(): void {
console.log(this.imgUrl);
if (this.editGoodSTypeForm.valid) { if (this.editGoodSTypeForm.valid) {
if (this.imgUrl.length !== 0) { if (this.imgUrl.length !== 0) {
this.editGoodSTypeForm.value.imgUrl = this.commonService.imgList(this.imgUrl); this.editGoodSTypeForm.value.imgUrl = this.commonService.imgList(this.imgUrl);
} else {
this.editGoodSTypeForm.value.imgUrl = null;
} }
this.goodsType.editGoodsType(this.editGoodSTypeForm.value , (data: any) => { this.goodsType.editGoodsType(this.editGoodSTypeForm.value , (data: any) => {
if (data['return_code'] === '000000') { if (data['return_code'] === '000000') {

@ -29,6 +29,18 @@
</nz-form-control> </nz-form-control>
</nz-form-item> </nz-form-item>
</div> </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="platformCode">
<nz-option nzLabel="普惠GO" nzValue="WXAPPLETS"></nz-option>
<nz-option nzLabel="v家园" nzValue="VFAMILY"></nz-option>
<nz-option nzLabel="省直机关" nzValue="GZGOV"></nz-option>
</nz-select>
</nz-form-control>
</nz-form-item>
</div>
<div nz-col [nzSpan]="6" class="search-area"> <div nz-col [nzSpan]="6" class="search-area">
<button nz-button [nzType]="'primary'" (click)="getRequest(true)">查询</button> <button nz-button [nzType]="'primary'" (click)="getRequest(true)">查询</button>
<button nz-button (click)="searchForm.reset()">重置</button> <button nz-button (click)="searchForm.reset()">重置</button>
@ -110,6 +122,16 @@
<input nzSize="large" nz-input formControlName="name" placeholder="请输入" /> <input nzSize="large" nz-input formControlName="name" placeholder="请输入" />
</nz-form-control> </nz-form-control>
</nz-form-item> </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-select nzSize="large" nzShowSearch nzAllowClear formControlName="platformCode" nzPlaceHolder="请选择" >
<nz-option nzLabel="普惠GO" nzValue="WXAPPLETS"></nz-option>
<nz-option nzLabel="v家园" nzValue="VFAMILY"></nz-option>
<nz-option nzLabel="省直机关" nzValue="GZGOV"></nz-option>
</nz-select>
</nz-form-control>
</nz-form-item>
<nz-form-item> <nz-form-item>
<nz-form-label [nzSm]="6" [nzXs]="24" nzRequired>优惠券类型</nz-form-label> <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired>优惠券类型</nz-form-label>
<nz-form-control [nzSm]="14" [nzXs]="24" nzErrorTip="请选择优惠券类型!"> <nz-form-control [nzSm]="14" [nzXs]="24" nzErrorTip="请选择优惠券类型!">

@ -146,6 +146,7 @@ export class DiscountListComponent {
this.searchForm = this.fb.group({ this.searchForm = this.fb.group({
name: [''], name: [''],
type: [''], type: [''],
platformCode: [''],
status: [''], status: [''],
}); });
@ -153,6 +154,7 @@ export class DiscountListComponent {
this.editForm = this.fb.group({ this.editForm = this.fb.group({
name: ['' , [Validators.required]], name: ['' , [Validators.required]],
type: ['' , [Validators.required]], type: ['' , [Validators.required]],
platformCode: ['' , [Validators.required]],
effectiveNum: ['' , [Validators.required]], effectiveNum: ['' , [Validators.required]],
effectiveDay: ['' , [Validators.required]], effectiveDay: ['' , [Validators.required]],
salesEndTime: ['' , [Validators.required]], salesEndTime: ['' , [Validators.required]],

@ -1,6 +1,8 @@
import { Routes } from '@angular/router'; import { Routes } from '@angular/router';
import {MenuComponent} from "./menu/menu.component"; import {MenuComponent} from "./menu/menu.component";
import {CmsComponent} from "./cms/cms.component";
export const SYSTEM_ROUTES: Routes = [ export const SYSTEM_ROUTES: Routes = [
{ path: 'menu', component: MenuComponent} { path: 'menu', component: MenuComponent},
{ path: 'cms', component: CmsComponent}
]; ];

@ -144,8 +144,8 @@ export class CompOrderComponent {
queryData() { queryData() {
if (this.searchForm.controls['createTimeArray'].value != null if (this.searchForm.controls['createTimeArray'].value != null
&& this.searchForm.controls['createTimeArray'].value.length > 0) { && this.searchForm.controls['createTimeArray'].value.length > 0) {
this.searchForm.controls['createTimeS'].setValue(this.searchForm.controls['createTimeArray'].value[0].getTime()); this.searchForm.controls['createTimeS'].setValue(new Date(this.searchForm.controls['createTimeArray'].value[0]).getTime());
this.searchForm.controls['createTimeE'].setValue(this.searchForm.controls['createTimeArray'].value[1].getTime()); this.searchForm.controls['createTimeE'].setValue(new Date(this.searchForm.controls['createTimeArray'].value[1]).getTime());
} else { } else {
this.searchForm.controls['createTimeS'].setValue(null) this.searchForm.controls['createTimeS'].setValue(null)
this.searchForm.controls['createTimeE'].setValue(null) this.searchForm.controls['createTimeE'].setValue(null)
@ -183,7 +183,6 @@ export class CompOrderComponent {
*/ */
createTimeInit() { createTimeInit() {
let createTimeSelect = this.searchForm.controls['createTimeSelect'].value; let createTimeSelect = this.searchForm.controls['createTimeSelect'].value;
console.log(createTimeSelect);
if (createTimeSelect != null) { if (createTimeSelect != null) {
let timeObj = DateUtils.getDate(new Date(), Number(createTimeSelect)); let timeObj = DateUtils.getDate(new Date(), Number(createTimeSelect));
this.searchForm.controls['createTimeArray'].setValue([timeObj.timeS, timeObj.timeE]); this.searchForm.controls['createTimeArray'].setValue([timeObj.timeS, timeObj.timeE]);

@ -104,6 +104,7 @@
<thead> <thead>
<tr> <tr>
<th nzWidth="80px">商品名称</th> <th nzWidth="80px">商品名称</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="100px">商品品牌</th>
@ -120,6 +121,7 @@
<tbody> <tbody>
<tr *ngFor="let data of basicTable.data"> <tr *ngFor="let data of basicTable.data">
<td>{{data.goodsName}} - {{data.goodsSpecsName}}</td> <td>{{data.goodsName}} - {{data.goodsSpecsName}}</td>
<td>{{data.merName}}</td>
<td> <td>
<img nz-image width="60px" height="60px" nzSrc="{{imageUrl + data.img }}" [nzFallback]="fallbackImg" alt="" /> <img nz-image width="60px" height="60px" nzSrc="{{imageUrl + data.img }}" [nzFallback]="fallbackImg" alt="" />
</td> </td>

@ -164,8 +164,8 @@ export class GoodsListComponent {
if (this.searchForm.controls['createTimeArray'].value != null if (this.searchForm.controls['createTimeArray'].value != null
&& this.searchForm.controls['createTimeArray'].value.length > 0) { && this.searchForm.controls['createTimeArray'].value.length > 0) {
this.searchForm.controls['createTimeS'].setValue(this.searchForm.controls['createTimeArray'].value[0].getTime()); this.searchForm.controls['createTimeS'].setValue(new Date(this.searchForm.controls['createTimeArray'].value[0]).getTime());
this.searchForm.controls['createTimeE'].setValue(this.searchForm.controls['createTimeArray'].value[1].getTime()); this.searchForm.controls['createTimeE'].setValue(new Date(this.searchForm.controls['createTimeArray'].value[1]).getTime());
} else { } else {
this.searchForm.controls['createTimeS'].setValue(null) this.searchForm.controls['createTimeS'].setValue(null)
this.searchForm.controls['createTimeE'].setValue(null) this.searchForm.controls['createTimeE'].setValue(null)

@ -155,8 +155,8 @@ export class OrderAfterSalesComponent {
queryData() { queryData() {
if (this.searchForm.controls['createTimeArray'].value != null if (this.searchForm.controls['createTimeArray'].value != null
&& this.searchForm.controls['createTimeArray'].value.length > 0) { && this.searchForm.controls['createTimeArray'].value.length > 0) {
this.searchForm.controls['createTimeS'].setValue(this.searchForm.controls['createTimeArray'].value[0].getTime()); this.searchForm.controls['createTimeS'].setValue(new Date(this.searchForm.controls['createTimeArray'].value[0]).getTime());
this.searchForm.controls['createTimeE'].setValue(this.searchForm.controls['createTimeArray'].value[1].getTime()); this.searchForm.controls['createTimeE'].setValue(new Date(this.searchForm.controls['createTimeArray'].value[1]).getTime());
} else { } else {
this.searchForm.controls['createTimeS'].setValue(null) this.searchForm.controls['createTimeS'].setValue(null)
this.searchForm.controls['createTimeE'].setValue(null) this.searchForm.controls['createTimeE'].setValue(null)

@ -139,8 +139,8 @@ export class OrderCinemaComponent {
if (this.searchForm.controls['createTimeArray'].value != null if (this.searchForm.controls['createTimeArray'].value != null
&& this.searchForm.controls['createTimeArray'].value.length > 0) { && this.searchForm.controls['createTimeArray'].value.length > 0) {
this.searchForm.controls['createTimeS'].setValue(this.searchForm.controls['createTimeArray'].value[0].getTime()); this.searchForm.controls['createTimeS'].setValue(new Date(this.searchForm.controls['createTimeArray'].value[0]).getTime());
this.searchForm.controls['createTimeE'].setValue(this.searchForm.controls['createTimeArray'].value[1].getTime()); this.searchForm.controls['createTimeE'].setValue(new Date(this.searchForm.controls['createTimeArray'].value[1]).getTime());
} else { } else {
this.searchForm.controls['createTimeS'].setValue(null) this.searchForm.controls['createTimeS'].setValue(null)
this.searchForm.controls['createTimeE'].setValue(null) this.searchForm.controls['createTimeE'].setValue(null)

@ -142,8 +142,8 @@ export class OrderRefundComponent {
queryData() { queryData() {
if (this.searchForm.controls['createTimeArray'].value != null if (this.searchForm.controls['createTimeArray'].value != null
&& this.searchForm.controls['createTimeArray'].value.length > 0) { && this.searchForm.controls['createTimeArray'].value.length > 0) {
this.searchForm.controls['createTimeS'].setValue(this.searchForm.controls['createTimeArray'].value[0].getTime()); this.searchForm.controls['createTimeS'].setValue(new Date(this.searchForm.controls['createTimeArray'].value[0]).getTime());
this.searchForm.controls['createTimeE'].setValue(this.searchForm.controls['createTimeArray'].value[1].getTime()); this.searchForm.controls['createTimeE'].setValue(new Date(this.searchForm.controls['createTimeArray'].value[1]).getTime());
} else { } else {
this.searchForm.controls['createTimeS'].setValue(null); this.searchForm.controls['createTimeS'].setValue(null);
this.searchForm.controls['createTimeE'].setValue(null); this.searchForm.controls['createTimeE'].setValue(null);

@ -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);
});
}
} }

@ -22,39 +22,30 @@ export class DateUtils {
*/ */
public static getDate(currentDate: Date, type: number): any { public static getDate(currentDate: Date, type: number): any {
const returnObj = { const returnObj = {
timeS: new Date(), timeS: 0,
timeE: new Date(), timeE: 0,
} }
if (type === 1) { if (type === 1) {
const start = new Date(currentDate); currentDate.setHours(0);
currentDate.setMinutes(0);
start.setHours(0); currentDate.setSeconds(0);
start.setMinutes(0); returnObj.timeS = currentDate.getTime();
start.setSeconds(0); currentDate.setHours(23);
returnObj.timeS = start; currentDate.setMinutes(59);
currentDate.setSeconds(59);
const end = new Date(currentDate); returnObj.timeE = currentDate.getTime();
end.setHours(23);
end.setMinutes(59);
end.setSeconds(59);
returnObj.timeE = currentDate;
} else if (type === 2) { } else if (type === 2) {
currentDate.setDate(currentDate.getDate() - 1)
const start = new Date(currentDate); currentDate.setHours(0);
start.setDate(currentDate.getDate() - 1) currentDate.setMinutes(0);
start.setHours(0); currentDate.setSeconds(0);
start.setMinutes(0); returnObj.timeS = currentDate.getTime();
start.setSeconds(0); currentDate.setHours(23);
returnObj.timeS = start; currentDate.setMinutes(59);
currentDate.setSeconds(59);
const end = new Date(currentDate); returnObj.timeE = currentDate.getTime();
end.setDate(currentDate.getDate() - 1)
end.setHours(23);
end.setMinutes(59);
end.setSeconds(59);
returnObj.timeE = end;
} else if (type === 3) { } else if (type === 3) {
const dayOfWeek = currentDate.getDay(); const dayOfWeek = currentDate.getDay();
@ -65,14 +56,14 @@ export class DateUtils {
start.setHours(0); start.setHours(0);
start.setMinutes(0); start.setMinutes(0);
start.setSeconds(0); start.setSeconds(0);
returnObj.timeS = start; returnObj.timeS = start.getTime();
const end = new Date(currentDate); const end = new Date(currentDate);
end.setDate(end.getDate() + 6) end.setDate(end.getDate() + 6)
end.setHours(23); end.setHours(23);
end.setMinutes(59); end.setMinutes(59);
end.setSeconds(59); end.setSeconds(59);
returnObj.timeE = end; returnObj.timeE = end.getTime();
} else if (type === 4) { } else if (type === 4) {
const startOfThisWeek = new Date(currentDate.getFullYear(),currentDate.getMonth(),currentDate.getDate() - currentDate.getDay() + 1); const startOfThisWeek = new Date(currentDate.getFullYear(),currentDate.getMonth(),currentDate.getDate() - currentDate.getDay() + 1);
@ -82,12 +73,12 @@ export class DateUtils {
startOfLastWeek .setHours(0); startOfLastWeek .setHours(0);
startOfLastWeek .setMinutes(0); startOfLastWeek .setMinutes(0);
startOfLastWeek .setSeconds(0); startOfLastWeek .setSeconds(0);
returnObj.timeS = startOfLastWeek; returnObj.timeS = startOfLastWeek .getTime();
endOfLastWeek.setHours(23); endOfLastWeek.setHours(23);
endOfLastWeek.setMinutes(59); endOfLastWeek.setMinutes(59);
endOfLastWeek.setSeconds(59); endOfLastWeek.setSeconds(59);
returnObj.timeE = endOfLastWeek; returnObj.timeE = endOfLastWeek.getTime();
} else if (type === 5) { } else if (type === 5) {
var daysInMonth = new Date(currentDate.getFullYear(), currentDate.getMonth()+1, 0).getDate(); var daysInMonth = new Date(currentDate.getFullYear(), currentDate.getMonth()+1, 0).getDate();
@ -97,14 +88,14 @@ export class DateUtils {
start.setHours(0); start.setHours(0);
start.setMinutes(0); start.setMinutes(0);
start.setSeconds(0); start.setSeconds(0);
returnObj.timeS = start; returnObj.timeS = start.getTime();
const end = new Date(currentDate); const end = new Date(currentDate);
end.setDate(daysInMonth) end.setDate(daysInMonth)
end.setHours(23); end.setHours(23);
end.setMinutes(59); end.setMinutes(59);
end.setSeconds(59); end.setSeconds(59);
returnObj.timeE = end; returnObj.timeE = end.getTime();
} else if (type === 6) { } else if (type === 6) {
var daysInMonth = new Date(currentDate.getFullYear(), currentDate.getMonth(), 0).getDate(); var daysInMonth = new Date(currentDate.getFullYear(), currentDate.getMonth(), 0).getDate();
@ -115,7 +106,7 @@ export class DateUtils {
start.setHours(0); start.setHours(0);
start.setMinutes(0); start.setMinutes(0);
start.setSeconds(0); start.setSeconds(0);
returnObj.timeS = start; returnObj.timeS = start.getTime();
const end = new Date(currentDate); const end = new Date(currentDate);
end.setMonth(currentDate.getMonth() - 1); end.setMonth(currentDate.getMonth() - 1);
@ -123,7 +114,7 @@ export class DateUtils {
end.setHours(23); end.setHours(23);
end.setMinutes(59); end.setMinutes(59);
end.setSeconds(59); end.setSeconds(59);
returnObj.timeE = end; returnObj.timeE = end.getTime();
} }
return returnObj; return returnObj;

@ -4,15 +4,15 @@
export const environment = { export const environment = {
production: false, production: false,
baseUrl: 'https://phg.dctpay.com/brest/', // 测试环境服务器地址(请求数据地址) // baseUrl: 'https://phg.dctpay.com/brest/', // 测试环境服务器地址(请求数据地址)
orderUrl: 'https://phg.dctpay.com/order/', // 测试环境服务器地址(请求数据地址) // orderUrl: 'https://phg.dctpay.com/order/', // 测试环境服务器地址(请求数据地址)
userUrl: 'https://phg.dctpay.com/user/', // 测试环境服务器地址(请求数据地址) // userUrl: 'https://phg.dctpay.com/user/', // 测试环境服务器地址(请求数据地址)
imageUrl: 'https://phg.obs.cn-southwest-2.myhuaweicloud.com/', // imageUrl: 'https://phg.obs.cn-southwest-2.myhuaweicloud.com/',
// baseUrl: 'http://localhost:9702/brest/', // 测试环境服务器地址(请求数据地址) baseUrl: 'http://localhost:9702/brest/', // 测试环境服务器地址(请求数据地址)
// orderUrl: 'http://localhost:9703/order/', // 测试环境服务器地址(请求数据地址) orderUrl: 'http://localhost:9703/order/', // 测试环境服务器地址(请求数据地址)
// userUrl: 'http://localhost:9704/user/', // 测试环境服务器地址(请求数据地址) userUrl: 'http://localhost:9704/user/', // 测试环境服务器地址(请求数据地址)
// imageUrl: 'https://phg-test.obs.cn-southwest-2.myhuaweicloud.com/', imageUrl: 'https://phg-test.obs.cn-southwest-2.myhuaweicloud.com/',
}; };

Loading…
Cancel
Save