From b96825ee0fcde611a4b3993c9f2b409852fb94d2 Mon Sep 17 00:00:00 2001 From: hurui <177768073@qq.com> Date: Wed, 1 Feb 2023 14:18:21 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fleet-oil-card-car.component.html | 2 +- .../fleet-oil-card-list.component.html | 2 +- .../fleet-oil-card-user-list.component.html | 2 +- .../oil-card-list.component.html | 2 +- .../dicount-package-order-list.component.html | 0 .../dicount-package-order-list.component.scss | 0 .../dicount-package-order-list.component.ts | 0 ...discount-use-condition-list.component.html | 0 ...discount-use-condition-list.component.scss | 0 ...ount-use-condition-list.component.spec.ts} | 0 .../discount-use-condition-list.component.ts | 0 .../order-integral-recharge.component.html | 2 +- .../order-manage-routing.module.ts | 7 +- .../admin/order-manage/order-manage.module.ts | 11 +- .../order-oil-list.component.html | 28 +- .../order-oil-list.component.ts | 34 ++ .../pre-order/pre-order.component.html | 0 .../pre-order/pre-order.component.scss | 0 .../pre-order/pre-order.component.ts | 0 ...count-use-condition-list.component.spec.ts | 25 -- .../oil-station-order.component.html | 372 ------------------ .../oil-station-order.component.ts | 353 ----------------- .../order-Tlist/order-Tlist.component.html | 177 --------- .../order-Tlist/order-Tlist.component.scss | 4 - .../order-Tlist/order-Tlist.component.ts | 186 --------- .../order-agent/order-agent.component.html | 186 --------- .../order-agent/order-agent.component.scss | 4 - .../order-agent/order-agent.component.ts | 188 --------- .../order-c-list/order-c-list.component.html | 175 -------- .../order-c-list/order-c-list.component.scss | 4 - .../order-c-list/order-c-list.component.ts | 187 --------- .../order-coupon-list.component.html | 182 --------- .../order-coupon-list.component.scss | 0 .../order-coupon-list.component.ts | 134 ------- .../order-coupon/order-coupon.component.html | 124 ------ .../order-coupon/order-coupon.component.scss | 0 .../order-coupon/order-coupon.component.ts | 95 ----- .../order-coupons.component.html | 160 -------- .../order-coupons.component.scss | 4 - .../order-coupons/order-coupons.component.ts | 150 ------- .../order-detail/order-detail.component.html | 1 - .../order-detail/order-detail.component.scss | 0 .../order-detail/order-detail.component.ts | 15 - .../order-h-list/order-h-list.component.html | 243 ------------ .../order-h-list/order-h-list.component.scss | 5 - .../order-h-list/order-h-list.component.ts | 208 ---------- .../order-k-list/order-k-list.component.html | 179 --------- .../order-k-list/order-k-list.component.scss | 4 - .../order-k-list/order-k-list.component.ts | 186 --------- .../order-list/order-list.component.html | 204 ---------- .../order-list/order-list.component.scss | 4 - .../order/order-list/order-list.component.ts | 210 ---------- src/app/admin/order/order-routing.module.ts | 43 -- src/app/admin/order/order.module.ts | 43 -- .../package-record-list.component.html | 103 ----- .../package-record-list.component.scss | 0 .../package-record-list.component.ts | 80 ---- src/app/app-common.module.ts | 3 +- src/app/app-routing.module.ts | 5 - src/app/pipes/index.ts | 1 + .../order/order-oil-channel-type.pipe.ts | 23 ++ src/app/pipes/order/order-pay-type.pipe.ts | 4 +- src/environments/environment.ts | 4 +- 63 files changed, 107 insertions(+), 4261 deletions(-) rename src/app/admin/{order => order-manage}/dicount-package-order-list/dicount-package-order-list.component.html (100%) rename src/app/admin/{order => order-manage}/dicount-package-order-list/dicount-package-order-list.component.scss (100%) rename src/app/admin/{order => order-manage}/dicount-package-order-list/dicount-package-order-list.component.ts (100%) rename src/app/admin/{order => order-manage}/discount-use-condition-list/discount-use-condition-list.component.html (100%) rename src/app/admin/{order => order-manage}/discount-use-condition-list/discount-use-condition-list.component.scss (100%) rename src/app/admin/{order/oil-station-order/oil-station-order.component.scss => order-manage/discount-use-condition-list/discount-use-condition-list.component.spec.ts} (100%) rename src/app/admin/{order => order-manage}/discount-use-condition-list/discount-use-condition-list.component.ts (100%) rename src/app/admin/{order => order-manage}/pre-order/pre-order.component.html (100%) rename src/app/admin/{order => order-manage}/pre-order/pre-order.component.scss (100%) rename src/app/admin/{order => order-manage}/pre-order/pre-order.component.ts (100%) delete mode 100644 src/app/admin/order/discount-use-condition-list/discount-use-condition-list.component.spec.ts delete mode 100644 src/app/admin/order/oil-station-order/oil-station-order.component.html delete mode 100644 src/app/admin/order/oil-station-order/oil-station-order.component.ts delete mode 100644 src/app/admin/order/order-Tlist/order-Tlist.component.html delete mode 100644 src/app/admin/order/order-Tlist/order-Tlist.component.scss delete mode 100644 src/app/admin/order/order-Tlist/order-Tlist.component.ts delete mode 100644 src/app/admin/order/order-agent/order-agent.component.html delete mode 100644 src/app/admin/order/order-agent/order-agent.component.scss delete mode 100644 src/app/admin/order/order-agent/order-agent.component.ts delete mode 100644 src/app/admin/order/order-c-list/order-c-list.component.html delete mode 100644 src/app/admin/order/order-c-list/order-c-list.component.scss delete mode 100644 src/app/admin/order/order-c-list/order-c-list.component.ts delete mode 100644 src/app/admin/order/order-coupon-list/order-coupon-list.component.html delete mode 100644 src/app/admin/order/order-coupon-list/order-coupon-list.component.scss delete mode 100644 src/app/admin/order/order-coupon-list/order-coupon-list.component.ts delete mode 100644 src/app/admin/order/order-coupon/order-coupon.component.html delete mode 100644 src/app/admin/order/order-coupon/order-coupon.component.scss delete mode 100644 src/app/admin/order/order-coupon/order-coupon.component.ts delete mode 100644 src/app/admin/order/order-coupons/order-coupons.component.html delete mode 100644 src/app/admin/order/order-coupons/order-coupons.component.scss delete mode 100644 src/app/admin/order/order-coupons/order-coupons.component.ts delete mode 100644 src/app/admin/order/order-detail/order-detail.component.html delete mode 100644 src/app/admin/order/order-detail/order-detail.component.scss delete mode 100644 src/app/admin/order/order-detail/order-detail.component.ts delete mode 100644 src/app/admin/order/order-h-list/order-h-list.component.html delete mode 100644 src/app/admin/order/order-h-list/order-h-list.component.scss delete mode 100644 src/app/admin/order/order-h-list/order-h-list.component.ts delete mode 100644 src/app/admin/order/order-k-list/order-k-list.component.html delete mode 100644 src/app/admin/order/order-k-list/order-k-list.component.scss delete mode 100644 src/app/admin/order/order-k-list/order-k-list.component.ts delete mode 100644 src/app/admin/order/order-list/order-list.component.html delete mode 100644 src/app/admin/order/order-list/order-list.component.scss delete mode 100644 src/app/admin/order/order-list/order-list.component.ts delete mode 100644 src/app/admin/order/order-routing.module.ts delete mode 100644 src/app/admin/order/order.module.ts delete mode 100644 src/app/admin/order/package-record-list/package-record-list.component.html delete mode 100644 src/app/admin/order/package-record-list/package-record-list.component.scss delete mode 100644 src/app/admin/order/package-record-list/package-record-list.component.ts create mode 100644 src/app/pipes/order/order-oil-channel-type.pipe.ts diff --git a/src/app/admin/fleet-oil-card/fleet-oil-card-car/fleet-oil-card-car.component.html b/src/app/admin/fleet-oil-card/fleet-oil-card-car/fleet-oil-card-car.component.html index e14fb10..1f3f159 100644 --- a/src/app/admin/fleet-oil-card/fleet-oil-card-car/fleet-oil-card-car.component.html +++ b/src/app/admin/fleet-oil-card/fleet-oil-card-car/fleet-oil-card-car.component.html @@ -85,7 +85,7 @@ diff --git a/src/app/admin/fleet-oil-card/fleet-oil-card-list/fleet-oil-card-list.component.html b/src/app/admin/fleet-oil-card/fleet-oil-card-list/fleet-oil-card-list.component.html index cce223b..1104cfc 100644 --- a/src/app/admin/fleet-oil-card/fleet-oil-card-list/fleet-oil-card-list.component.html +++ b/src/app/admin/fleet-oil-card/fleet-oil-card-list/fleet-oil-card-list.component.html @@ -143,7 +143,7 @@
  • 禁用
  • 启用
  • 油卡账单
  • -
  • 消费订单
  • +
  • 消费订单
  • 回收余额
  • diff --git a/src/app/admin/fleet-oil-card/fleet-oil-card-user-list/fleet-oil-card-user-list.component.html b/src/app/admin/fleet-oil-card/fleet-oil-card-user-list/fleet-oil-card-user-list.component.html index f3eb7c0..d1db232 100644 --- a/src/app/admin/fleet-oil-card/fleet-oil-card-user-list/fleet-oil-card-user-list.component.html +++ b/src/app/admin/fleet-oil-card/fleet-oil-card-user-list/fleet-oil-card-user-list.component.html @@ -90,7 +90,7 @@ diff --git a/src/app/admin/oil-card/oil-card-list/oil-card-list.component.html b/src/app/admin/oil-card/oil-card-list/oil-card-list.component.html index 9642fb3..03e3e92 100644 --- a/src/app/admin/oil-card/oil-card-list/oil-card-list.component.html +++ b/src/app/admin/oil-card/oil-card-list/oil-card-list.component.html @@ -185,7 +185,7 @@
  • 启用
  • 变更记录
  • 油卡账单
  • -
  • 消费订单
  • +
  • 消费订单
  • 回收余额
  • diff --git a/src/app/admin/order/dicount-package-order-list/dicount-package-order-list.component.html b/src/app/admin/order-manage/dicount-package-order-list/dicount-package-order-list.component.html similarity index 100% rename from src/app/admin/order/dicount-package-order-list/dicount-package-order-list.component.html rename to src/app/admin/order-manage/dicount-package-order-list/dicount-package-order-list.component.html diff --git a/src/app/admin/order/dicount-package-order-list/dicount-package-order-list.component.scss b/src/app/admin/order-manage/dicount-package-order-list/dicount-package-order-list.component.scss similarity index 100% rename from src/app/admin/order/dicount-package-order-list/dicount-package-order-list.component.scss rename to src/app/admin/order-manage/dicount-package-order-list/dicount-package-order-list.component.scss diff --git a/src/app/admin/order/dicount-package-order-list/dicount-package-order-list.component.ts b/src/app/admin/order-manage/dicount-package-order-list/dicount-package-order-list.component.ts similarity index 100% rename from src/app/admin/order/dicount-package-order-list/dicount-package-order-list.component.ts rename to src/app/admin/order-manage/dicount-package-order-list/dicount-package-order-list.component.ts diff --git a/src/app/admin/order/discount-use-condition-list/discount-use-condition-list.component.html b/src/app/admin/order-manage/discount-use-condition-list/discount-use-condition-list.component.html similarity index 100% rename from src/app/admin/order/discount-use-condition-list/discount-use-condition-list.component.html rename to src/app/admin/order-manage/discount-use-condition-list/discount-use-condition-list.component.html diff --git a/src/app/admin/order/discount-use-condition-list/discount-use-condition-list.component.scss b/src/app/admin/order-manage/discount-use-condition-list/discount-use-condition-list.component.scss similarity index 100% rename from src/app/admin/order/discount-use-condition-list/discount-use-condition-list.component.scss rename to src/app/admin/order-manage/discount-use-condition-list/discount-use-condition-list.component.scss diff --git a/src/app/admin/order/oil-station-order/oil-station-order.component.scss b/src/app/admin/order-manage/discount-use-condition-list/discount-use-condition-list.component.spec.ts similarity index 100% rename from src/app/admin/order/oil-station-order/oil-station-order.component.scss rename to src/app/admin/order-manage/discount-use-condition-list/discount-use-condition-list.component.spec.ts diff --git a/src/app/admin/order/discount-use-condition-list/discount-use-condition-list.component.ts b/src/app/admin/order-manage/discount-use-condition-list/discount-use-condition-list.component.ts similarity index 100% rename from src/app/admin/order/discount-use-condition-list/discount-use-condition-list.component.ts rename to src/app/admin/order-manage/discount-use-condition-list/discount-use-condition-list.component.ts diff --git a/src/app/admin/order-manage/order-integral-recharge/order-integral-recharge.component.html b/src/app/admin/order-manage/order-integral-recharge/order-integral-recharge.component.html index 1c7e230..01625c5 100644 --- a/src/app/admin/order-manage/order-integral-recharge/order-integral-recharge.component.html +++ b/src/app/admin/order-manage/order-integral-recharge/order-integral-recharge.component.html @@ -146,7 +146,7 @@ {{data.memPhone}} {{data.goodsPrice}} ¥{{data.totalPrice}} - ¥{{data.deductionPrice}} + ¥{{data.deductionPrice!=null?data.deductionPrice:0}} ¥{{data.payablePrice}} ¥{{data.payPrice}} {{data.payType}} diff --git a/src/app/admin/order-manage/order-manage-routing.module.ts b/src/app/admin/order-manage/order-manage-routing.module.ts index 40cec00..9dbda16 100644 --- a/src/app/admin/order-manage/order-manage-routing.module.ts +++ b/src/app/admin/order-manage/order-manage-routing.module.ts @@ -7,11 +7,10 @@ import {OrderRefundListComponent} from './order-refund-list/order-refund-list.co import {KfcOrderListComponent} from './kfc-order/kfc-order-list/kfc-order-list.component'; import {StarbucksOrderListComponent} from './starbucks-order/starbucks-order-list/starbucks-order-list.component'; import {MemberChargeOrderListComponent} from './member-charge-order/member-charge-order-list/member-charge-order-list.component'; -import {PreOrderComponent} from '../order/pre-order/pre-order.component'; -import {DiscountUseConditionListComponent} from '../order/discount-use-condition-list/discount-use-condition-list.component'; -import {DicountPackageOrderListComponent} from '../order/dicount-package-order-list/dicount-package-order-list.component'; import {OrderListComponent} from '../recharge-order/order-list/order-list.component'; - +import {DiscountUseConditionListComponent} from './discount-use-condition-list/discount-use-condition-list.component'; +import {DicountPackageOrderListComponent} from './dicount-package-order-list/dicount-package-order-list.component'; +import {PreOrderComponent} from './pre-order/pre-order.component'; const routes: Routes = [ { path: 'order-oil-list', component: OrderOilListComponent }, diff --git a/src/app/admin/order-manage/order-manage.module.ts b/src/app/admin/order-manage/order-manage.module.ts index 92bc788..6be31aa 100644 --- a/src/app/admin/order-manage/order-manage.module.ts +++ b/src/app/admin/order-manage/order-manage.module.ts @@ -13,17 +13,26 @@ import { OrderRefundListComponent } from './order-refund-list/order-refund-list. import {KfcOrderListComponent} from './kfc-order/kfc-order-list/kfc-order-list.component'; import { StarbucksOrderListComponent } from './starbucks-order/starbucks-order-list/starbucks-order-list.component'; import { MemberChargeOrderListComponent } from './member-charge-order/member-charge-order-list/member-charge-order-list.component'; +import {PreOrderComponent} from './pre-order/pre-order.component'; +import {DicountPackageOrderListComponent} from './dicount-package-order-list/dicount-package-order-list.component'; +import {DiscountUseConditionListComponent} from './discount-use-condition-list/discount-use-condition-list.component'; +import {SeparateModule} from '../../common/separate/separate.module'; +import {NzSpaceModule} from 'ng-zorro-antd/space'; +import {RegionSelectorModule} from '../../common/region-selector/region-selector.module'; @NgModule({ - declarations: [OrderOilListComponent, OrderCouponListComponent, OrderIntegralRechargeComponent, OrderRefundListComponent, KfcOrderListComponent, StarbucksOrderListComponent, MemberChargeOrderListComponent], + declarations: [OrderOilListComponent, OrderCouponListComponent, OrderIntegralRechargeComponent, OrderRefundListComponent, KfcOrderListComponent, StarbucksOrderListComponent, PreOrderComponent,DicountPackageOrderListComponent, MemberChargeOrderListComponent, DiscountUseConditionListComponent], imports: [ CommonModule, OrderManageRoutingModule, NgZorroAntdModule, + SeparateModule, ReactiveFormsModule, FormsModule, BreadcrumbModule, + RegionSelectorModule, AppCommonModule, + NzSpaceModule ] }) export class OrderManageModule { } diff --git a/src/app/admin/order-manage/order-oil/order-oil-list/order-oil-list.component.html b/src/app/admin/order-manage/order-oil/order-oil-list/order-oil-list.component.html index d8acd01..f8eb180 100644 --- a/src/app/admin/order-manage/order-oil/order-oil-list/order-oil-list.component.html +++ b/src/app/admin/order-manage/order-oil/order-oil-list/order-oil-list.component.html @@ -38,8 +38,6 @@ - -
    创建时间 @@ -92,6 +90,17 @@
    +
    + + 支付方式 + + + + + + +
    +
    交易状态 @@ -112,7 +121,14 @@
    - +
    + + 车牌 + + + + +
    @@ -200,7 +216,7 @@ (nzPageIndexChange)="requestOrderData($event)" (nzPageSizeChange)="pageSizeChang($event)" [nzPageSizeOptions]="[10,20,50,100]" - [nzScroll]="{ x: '3600px'}" + [nzScroll]="{ x: '3700px'}" > @@ -208,6 +224,7 @@ 客户电话 加油站 加油员 + 车牌 加油信息 支付信息 交易状态 @@ -215,6 +232,7 @@ 支付时间 退款时间 取消时间 + 来源 分公司 商户 代理公司 @@ -247,6 +265,7 @@ {{data.memPhone}} {{data.storeName}} {{data.gasStaffName?data.gasStaffName:'未知'}} + {{data.gasCarLicensePlate?data.gasCarLicensePlate:'未知'}} {{data.gasRefuelPrice}}元 {{data.gasOilLiters}}升 {{data.gasOilNo}}# @@ -268,6 +287,7 @@ {{data.payTime | date : 'yyyy-MM-dd HH:mm:ss'}} {{data.refundTime | date : 'yyyy-MM-dd HH:mm:ss'}} {{data.cancelTime | date : 'yyyy-MM-dd HH:mm:ss'}} + {{data.channelType | orderOilChannelType}} {{data.companyName?data.companyName:'无'}} {{data.merName?data.merName:'无'}} {{data.gasOrgName?data.gasOrgName:'无'}} diff --git a/src/app/admin/order-manage/order-oil/order-oil-list/order-oil-list.component.ts b/src/app/admin/order-manage/order-oil/order-oil-list/order-oil-list.component.ts index d7144ea..19ffbe5 100644 --- a/src/app/admin/order-manage/order-oil/order-oil-list/order-oil-list.component.ts +++ b/src/app/admin/order-manage/order-oil/order-oil-list/order-oil-list.component.ts @@ -13,6 +13,7 @@ import {CompanyService} from '../../../../services/company.service'; import {MerchantService} from '../../../../services/merchant.service'; import {OrderOilService} from '../../../../services/order/order-oil.service'; import {OrderManageService} from '../../../../services/order/order-manage.service'; +import {ActivatedRoute} from '@angular/router'; @Component({ selector: 'app-order-oil-list', @@ -53,10 +54,15 @@ export class OrderOilListComponent implements OnInit { companyArray = []; merArray = []; oilArray = []; + payTypeArray = []; orgIdArray = []; tyAgentArray = []; tySalesmanArray = []; + cardNo: string; + phone: string; + carLicensePlate: string; + // 退款按钮权限 REFUND_OIL_BTN = false; @@ -71,12 +77,26 @@ export class OrderOilListComponent implements OnInit { private tyAgentService: TyAgentService, private tySalesmanService: TySalesmanService, private organizationService: OrganizationService, + + private activatedRoute: ActivatedRoute, private form: FormBuilder) { this.roleType = Number(this.store.get(ADMIN_INFO_OBJECT)['secRole'].roleType); this.adminFlag = Number(this.store.get(ADMIN_INFO_OBJECT)['secUser'].adminFlag); } ngOnInit(): void { + this.activatedRoute.queryParams.subscribe(queryParams => { + if (queryParams['cardNo'] != null) { + this.cardNo = queryParams['cardNo']; + } + if (queryParams['phone'] != null) { + this.phone = queryParams['phone']; + } + if (queryParams['carLicensePlate'] != null) { + this.carLicensePlate = queryParams['carLicensePlate']; + } + }); + let currentDate = new Date(); currentDate.setHours(0); currentDate.setMinutes(0); @@ -104,6 +124,7 @@ export class OrderOilListComponent implements OnInit { salesmanId: [null], gasStaffName: [null], gasOilNo: [null], + payType: [null], storeName: [null], memPhone: [null], status: [null], @@ -112,9 +133,13 @@ export class OrderOilListComponent implements OnInit { refundTimeArray: [null], companyId: [null], merId: [null], + gasCarLicensePlate: [null], }); this.requestOrderData(1); + this.commonsService.getDictionary("ORDER_PAY_TYPE", data => { + this.payTypeArray = data['return_data']; + }); this.commonsService.getDictionary("GAS_OIL_TYPE", data => { this.oilArray = data['return_data']; }); @@ -150,6 +175,15 @@ export class OrderOilListComponent implements OnInit { */ requestOrderData(pageNum: number) { this.tableLoading = true; + if (this.cardNo != null) { + this.whereObject['memCardNo'] = this.cardNo; + } + if (this.phone != null) { + this.whereObject['memPhone'] = this.phone; + } + if (this.carLicensePlate != null) { + this.whereObject['gasCarLicensePlate'] = this.carLicensePlate; + } this.whereObject['pageNum'] = pageNum; this.whereObject['pageSize'] = this.pageSize; this.orderOilService.getGasOrderList(this.whereObject, data => { diff --git a/src/app/admin/order/pre-order/pre-order.component.html b/src/app/admin/order-manage/pre-order/pre-order.component.html similarity index 100% rename from src/app/admin/order/pre-order/pre-order.component.html rename to src/app/admin/order-manage/pre-order/pre-order.component.html diff --git a/src/app/admin/order/pre-order/pre-order.component.scss b/src/app/admin/order-manage/pre-order/pre-order.component.scss similarity index 100% rename from src/app/admin/order/pre-order/pre-order.component.scss rename to src/app/admin/order-manage/pre-order/pre-order.component.scss diff --git a/src/app/admin/order/pre-order/pre-order.component.ts b/src/app/admin/order-manage/pre-order/pre-order.component.ts similarity index 100% rename from src/app/admin/order/pre-order/pre-order.component.ts rename to src/app/admin/order-manage/pre-order/pre-order.component.ts diff --git a/src/app/admin/order/discount-use-condition-list/discount-use-condition-list.component.spec.ts b/src/app/admin/order/discount-use-condition-list/discount-use-condition-list.component.spec.ts deleted file mode 100644 index 1ba441f..0000000 --- a/src/app/admin/order/discount-use-condition-list/discount-use-condition-list.component.spec.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; - -import { DiscountUseConditionListComponent } from './discount-use-condition-list.component'; - -describe('DiscountUseConditionListComponent', () => { - let component: DiscountUseConditionListComponent; - let fixture: ComponentFixture; - - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [ DiscountUseConditionListComponent ] - }) - .compileComponents(); - })); - - beforeEach(() => { - fixture = TestBed.createComponent(DiscountUseConditionListComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/src/app/admin/order/oil-station-order/oil-station-order.component.html b/src/app/admin/order/oil-station-order/oil-station-order.component.html deleted file mode 100644 index 872502f..0000000 --- a/src/app/admin/order/oil-station-order/oil-station-order.component.html +++ /dev/null @@ -1,372 +0,0 @@ - - - - - -
    -
    -
    -
    - - 油站 - - - - - - -
    -
    - - 加油员 - - - - - - -
    -
    - - 订单号 - - - - -
    -
    - - 油号 - - - - - - -
    -
    - - 状态 - - - - - - - - - - - -
    -
    - - 创建时间 - - - - -
    -
    - - 支付时间 - - - - -
    -
    - -
    -
    - - -
    -
    -
    -
    - - -
    - 总笔数:{{dataCount.refuelNum}} 笔,总加油金额:{{dataCount.refuelPrice}} 元,总升数:{{dataCount.refuelLiters}} 升 -
    - -
    - - - - - 编号 - 订单号 - 油站名称 - 加油员 - 类型 - 油号 - 油枪号 - 油枪价 - 平台价 - 加油升数 - 加油金额 - 使用优惠券 - 优惠券名称 - 优惠金额 - 应付金额 - 金币抵扣 - 实付金额 - 创建时间 - 支付时间 - 状态 - 操作 - - - - - {{i + 1}} - {{data.orderNo}} - {{data.gasName}} - {{data.gasStaffName?data.gasStaffName:'未知'}} - {{data.gasOilType == 1 ? '汽油': '柴油'}} - {{data.gasOilNo + "#"}} - {{data.gasGunNo + "号"}} - {{data.gasPriceGun}} - {{data.gasPricePreferences}} - {{data.gasOilLiters}} - {{data.totalPrice}} - {{data.memDiscountName?'是':'否'}} - {{data.memDiscountName?data.memDiscountName:'否'}} - {{data.deductionPrice}} - {{data.payablePrice}} - {{data.payGold / 100}} - {{data.payRealPrice}} - {{data.createTime | date: 'yyyy-MM-dd HH:mm:ss'}} - {{data.payTime | date: 'yyyy-MM-dd HH:mm:ss'}} - {{data.status | orderCouponStatus}} - - 打印小票 - 已打印({{data.printNum+'次'}}) - 操作列表 - - - - - - -
    - - - - - 退款理由 - - - - - - - - - {{data['gasName']}} - {{data['gasAddress']}} - {{data['orderNo']}} - {{data['gasOilType'] == 1 ? '汽油': '柴油'}} - {{data['gasOilNo']}} - {{data['gasGunNo']}} - {{data['gasPriceGun']}} - {{data['gasPricePreferences']}} - {{data['gasOilLiters']}} - {{data['totalPrice']}} - {{data['deductionPrice']}} - {{data['payRealPrice']}} - {{data['gasDiscount']}} - {{data['gasOilSubsidy']}} - {{data['gasLitersPreferences']}} - {{data['createTime'] | date: 'yyyy-MM-dd HH:mm:ss'}} - {{data['status'] | gasOrderStatus}} - {{data['refundPrice']}} - {{data['refundTime'] | date: 'yyyy-MM-dd HH:mm:ss'}} - {{data['refundContent']}} - - - - - -
    - - - - - - - - - - - -
    -
    - - diff --git a/src/app/admin/order/oil-station-order/oil-station-order.component.ts b/src/app/admin/order/oil-station-order/oil-station-order.component.ts deleted file mode 100644 index ffd02f7..0000000 --- a/src/app/admin/order/oil-station-order/oil-station-order.component.ts +++ /dev/null @@ -1,353 +0,0 @@ -import { Component, OnInit } from '@angular/core'; -import {environment} from '../../../../environments/environment'; -import {FormBuilder, FormGroup} from '@angular/forms'; -import {OrderService} from '../../../services/order.service'; -import {IconService} from '../../../services/icon.service'; -import {NzMessageService, NzModalService} from 'ng-zorro-antd'; -import {Router} from '@angular/router'; -import {CompanyService} from '../../../services/company.service'; -import {MerchantService} from '../../../services/merchant.service'; -import {LocalStorageService} from '../../../services/local-storage.service'; -import {CommonsService} from '../../../services/commons.service'; -import {WebsocketService} from '../../../services/websocket.service'; -import {ADMIN_INFO_OBJECT} from '../../../services/local-storage.namespace'; -import {MerchantStoreService} from '../../../services/merchant-store.service'; -import {GasStaffService} from "../../../services/gas-staff.service"; - -@Component({ - selector: 'app-oil-station-order', - templateUrl: './oil-station-order.component.html', - styleUrls: ['./oil-station-order.component.scss'] -}) -export class OilStationOrderComponent implements OnInit { - - WEB_SERVE_URL = environment.baseUrl; - FILE_URL = environment.imageUrl; - searchForm: FormGroup; // 搜索框 - requestData = []; // 列表数据 - companyData = []; // 列表数据 - merchantData = []; // 列表数据 - data = {}; // 列表数据 - total: number; // 页码 - pageNum = 1; // 页码 - pageSize = 10; // 条码 - loading = true; - id: number; // 订单ID - isVisible = false; - isVisibleDetail = false; - refundContent: string; - roleType: number; - secUser: object; - - gasArray = []; - - printDataObject = { - orderId: null, - printData: null - }; - printModal = false; - - userSession = {}; - gasStaffArray = []; - - oilNoArray = []; - - BTN_GAS_ORDER_REFUND = false; - BTN_GAS_ORDER_PRINT = false; - - dataCount = { - refuelNum: 0, - refuelPrice: 0, - refuelLiters: 0, - }; - constructor( - private form: FormBuilder, - private order: OrderService, - private webSocketService: WebsocketService, - private iconService: IconService, - private modal: NzModalService, - private message: NzMessageService, - private router: Router, - private company: CompanyService, - private merchant: MerchantService, - private merchantStoreService: MerchantStoreService, - private gasStaffService: GasStaffService, - private orderService: OrderService, - private store: LocalStorageService, // 数据请求 - private common: CommonsService - ) { - } - - ngOnInit(): void { - - this.BTN_GAS_ORDER_REFUND = this.common.isBtnCompetence("BTN_GAS_ORDER_REFUND"); - this.BTN_GAS_ORDER_PRINT = this.common.isBtnCompetence("BTN_GAS_ORDER_PRINT"); - - this.userSession = this.store.get(ADMIN_INFO_OBJECT); - this.secUser = this.store.get(ADMIN_INFO_OBJECT)['secUser']; - if (this.secUser['objectType'] === 2) { - this.merchantStoreService.getStoreListByMerchant({ pageNum: 1, pageSize: 100}, data => { - if (data['return_code'] === '000000') { - this.gasArray = data['return_data']['list']; - } - }); - } else if (this.secUser['objectType'] === 3) { - this.getStaffList(null); - } else if (this.secUser['objectType'] === 8) { - this.getStaffList(null); - } - this.init(); - // 接收消息 - this.webSocketService.messageSubject.subscribe( - data => { - console.log(data); - this.getRequest(true, this.searchForm.value); - }, - err => console.log(err) - ); - } - - public init(): void { - this.searchForm = this.form.group({ - storeId: [null], - staffId: [null], - orderNo: [null], - status: [null], - oilNo: [null], - createTime: [null], - payTime: [null], - }); - this.getRequest(true, this.searchForm.value); - - // 查询油号 - this.common.getDictionary("GAS_OIL_TYPE", data => { - if (data['return_code'] == '000000') { - this.oilNoArray = data['return_data']; - } - }); - } - - // 查询列表 - public getRequest(reset: boolean = false, whereObject: object) { - if (whereObject['createTime'] != null && whereObject['createTime'].length !== 0) { - whereObject['createTimeS'] = whereObject['createTime'][0].getTime(); - whereObject['createTimeE'] = whereObject['createTime'][1].getTime(); - } - if (whereObject['payTime'] != null && whereObject['payTime'].length !== 0) { - whereObject['payTimeS'] = whereObject['payTime'][0].getTime(); - whereObject['payTimeE'] = whereObject['payTime'][1].getTime(); - } - - this.loading = false; - if (reset) { - this.pageNum = 1; - } - whereObject['pageNum'] = this.pageNum; - whereObject['pageSize'] = this.pageSize; - this.order.getGasOrderListByOil(whereObject, data => { - if (data['return_code'] === '000000') { - this.requestData = data['return_data'].list; - this.total = data['return_data'].total; - } else { - this.message.error(data['return_msg']); - } - }); - this.countGasOrder(); - } - - // 统计订单 - public countGasOrder() { - this.orderService.countGasOrder(this.searchForm.value, data => { - if (data['return_code'] == '000000') { - this.dataCount = data['return_data']; - } - }); - } - - // 查询列表 - public getStaffList(gasId: number) { - const param = { pageNum: 1 , pageSize: 9999}; - if (gasId != null) { - param['merchantStoreId'] = gasId; - } - this.gasStaffService.getStaffList(param, data => { - if (data['return_code'] === '000000') { - this.gasStaffArray = data['return_data']['list']; - } - }); - } - - selectGasChange(gasId: number) { - if (gasId != null) { - this.getStaffList(gasId); - } else { - this.gasStaffArray = []; - } - } - - // 重置 - public resetForm(): void { - this.searchForm.reset(); - } - - showModal(id): void { - this.id = id; - this.isVisible = true; - } - - handleOk(): void { - this.common.showConfirm('确认订单是否退款', item => { - if (item) { - const params = { - orderId: this.id , - refundContent: this.refundContent - }; - this.order.refuelingOrderRefund(params, data => { - if (data['return_code'] === '000000') { - this.getRequest(true, this.searchForm.value); - this.isVisible = false; - this.message.success('退款成功'); - } else { - this.message.error(data['return_msg']); - } - }); - } - }); - } - - handleCancel(): void { - this.isVisible = false; - } - - getDetail(orderNo: string): void { - this.order.getGasOrderDetail(orderNo , data => { - if (data['return_code'] === '000000') { - this.isVisibleDetail = true; - this.data = data['return_data']; - } else { - this.message.error(data['return_msg']); - } - }); - } - - /** - * 导出订单 - */ - excelOrder() { - this.order.exportGasOrder(this.searchForm.value, data => { - if (data['return_code'] === '000000') { - window.location.href = this.FILE_URL + 'temporary/' + data['return_data']; - } else { - this.message.error(data['return_msg']); - } - }); - } - - showPrintModal(orderId: number, data: PrintData) { - this.printDataObject.orderId = orderId; - this.printDataObject.printData = data; - this.printModal = true; - } - - cloudPrint() { - this.orderService.print(this.printDataObject.orderId, 2, dataBack => { - if (dataBack['return_code'] === '000000') { - this.modal.success({ - nzTitle: '提示', - nzContent: '操作成功', - }); - this.getRequest(false, this.searchForm.value); - } - }); - } - - showPrintDiv() { - const orderId = this.printDataObject.orderId; - const data = this.printDataObject.printData; - data['payTime'] = new Date(data['payTime']).toLocaleString(); - this.printDiv(data); - - this.orderService.print(orderId, 1, dataBack => { - if (dataBack['return_code'] === '000000') { - this.getRequest(false, this.searchForm.value); - } - }); - } - - printDiv(data: object) { - const headstr = '打印小票'; - const footstr = ''; - const newstr = '
    \n' + - '
    \n' + - '
    \n' + - ' '+data['gasName']+(data['printStatus']?'(补打)':'') + '\n' + - ' (收银员存根)\n' + - '
    \n' + - ' \n' + - ' \n' + - ' \n' + - ' \n' + - ' \n' + - ' \n' + - ' \n' + - ' \n' + - ' \n' + - ' \n' + - ' \n' + - ' \n' + - ' \n' + - ' \n' + - ' \n' + - ' \n' + - ' \n' + - ' \n' + - ' \n' + - ' \n' + - ' \n' + - ' \n' + - ' \n' + - ' \n' + - ' \n' + - ' \n' + - ' \n' + - ' \n' + - ' \n' + - ' \n' + - ' \n' + - ' \n' + - ' \n' + - ' \n' + - ' \n' + - ' \n' + - ' \n' + - '
    -------------------------------------------
    流水号:' + data['orderNo'] + '
    -------------------------------------------
    打印时间:' + new Date().toLocaleString() + '
    支付时间:' + data['payTime'] + '
    电话:' + data['merPhone'] + '
    来源:嗨森逛
    油枪:' + data['gasGunNo'] + '号
    油品:' + data['gasOilNo'] + '#
    升数:' + data['gasOilLiters'] + '升
    实际加油升数以油站加油机为准!
    -------------------------------------------
    加油金额
    ¥' + data['totalPrice'] + '元
    -------------------------------------------
    开心又省钱; 来”嗨森逛“
    \n' + - '
    \n' + - '
    '; - // const oldstr = document.body.innerHTML; - // document.body.innerHTML = headstr + newstr + footstr; - const newWindow = window.open('', ''); - newWindow.document.write(headstr + newstr + footstr); - newWindow.print(); - newWindow.close(); - // document.body.innerHTML = oldstr; - // location.reload(); - return false; - } -} - -export class PrintData { - // 油站名称 - gasName = ''; - // 订单号 - orderNo = ''; - // 下单时间 - createTime = ''; - // 油品 - gasOilNo = ''; - // 加油抢号 - gasGunNo = ''; - // 加油升数 - gasOilLiters = 0; - // 加油金额 - oilPrice = 0; -} diff --git a/src/app/admin/order/order-Tlist/order-Tlist.component.html b/src/app/admin/order/order-Tlist/order-Tlist.component.html deleted file mode 100644 index 1b5d98f..0000000 --- a/src/app/admin/order/order-Tlist/order-Tlist.component.html +++ /dev/null @@ -1,177 +0,0 @@ - - - - - -
    -
    -
    -
    - - 区域名称 - - - - - - -
    -
    - - 商户名称 - - - - - - -
    -
    - - 订单号 - - - - -
    -
    - - 订单流水号 - - - - -
    -
    - - 支付模式 - - - - - - - - -
    -
    - - 支付方式 - - - - - - - - -
    -
    - - 状态 - - - - - - - - - - - - -
    -
    - - 时间区间 - - - - -
    -
    - -
    -
    - - -
    -
    -
    -
    - - -
    - 共计 {{total}} 条数据 -
    - -
    - - - - 编号 - 商品名称 - 订单来源 - 订单类型 - 订单号 - 支付流水号 - 客户名称 - 客户电话 - 支付模式 - 支付方式 - 支付金额 - 生成时间 - 支付时间 - 取消时间 - 状态 - 操作 - - - - - {{i+1}} - {{data.goodsName}} - {{data.giveawayType}} - {{data.goodsType}} - {{data.orderNo}} - {{data.paySerialNo}} - {{data.memName == null ? '暂无': data.memName}} - {{data.memPhone == null ? '暂无': data.memPhone}} - {{data.payModel}} - {{data.payType}} - {{data.payPrice}} - {{data.createTime | date: 'yyyy-MM-dd HH:mm:ss'}} - {{data.payTime | date: 'yyyy-MM-dd HH:mm:ss'}} - {{data.cancelTime | date: 'yyyy-MM-dd HH:mm:ss'}} - {{data.orderStatus}} - - - 申请退款 - - - -
    - - - - - 退款理由 - - - - - - diff --git a/src/app/admin/order/order-Tlist/order-Tlist.component.scss b/src/app/admin/order/order-Tlist/order-Tlist.component.scss deleted file mode 100644 index 8bee3fb..0000000 --- a/src/app/admin/order/order-Tlist/order-Tlist.component.scss +++ /dev/null @@ -1,4 +0,0 @@ -.head_img { - height: 60px; - width: 60px; -} diff --git a/src/app/admin/order/order-Tlist/order-Tlist.component.ts b/src/app/admin/order/order-Tlist/order-Tlist.component.ts deleted file mode 100644 index a9ccbf6..0000000 --- a/src/app/admin/order/order-Tlist/order-Tlist.component.ts +++ /dev/null @@ -1,186 +0,0 @@ -import { Component, OnInit } from '@angular/core'; -import {environment} from '../../../../environments/environment'; -import {FormBuilder, FormGroup} from '@angular/forms'; -import {MerchantService} from '../../../services/merchant.service'; -import {IconService} from '../../../services/icon.service'; -import {NzMessageService} from 'ng-zorro-antd'; -import {Router} from '@angular/router'; -import {CommonsService} from '../../../services/commons.service'; -import {OrderService} from '../../../services/order.service'; -import {CompanyService} from '../../../services/company.service'; - -@Component({ - selector: 'app-order-tlist', - templateUrl: './order-Tlist.component.html', - styleUrls: ['./order-Tlist.component.scss'] -}) -export class OrderTListComponent implements OnInit { - - WEB_SERVE_URL = environment.baseUrl; - FILE_URL = environment.imageUrl; - searchForm: FormGroup; // 搜索框 - requestData = []; // 列表数据 - companyData = []; // 列表数据 - merchantData = []; // 列表数据 - total: number; // 页码 - pageNum = 1; // 页码 - pageSize = 10; // 条码 - loading = true; - id: number; // 订单ID - isVisible = false; - refundContent: string; - constructor( - private form: FormBuilder, - private order: OrderService, - private iconService: IconService, - private message: NzMessageService, - private router: Router, - private company: CompanyService, - private merchant: MerchantService, - private common: CommonsService - ) { - } - - ngOnInit(): void { - this.init(); - const whereObject = {}; - whereObject['pageNum'] = 1; - whereObject['pageSize'] = 10000; - this.company.selectCompanyList(whereObject, data => { - if (data['return_code'] === '000000') { - this.companyData = data['return_data'].list; - } else { - this.message.error(data['return_msg']); - } - }); - this.getMerchantListByCompany(this.searchForm.value.companyId); - } - - public init(): void { - this.searchForm = this.form.group({ - companyId: [null], - merchantId: [null], - orderNo: [null], - paySerialNo: [null], - payModel: [null], - payType: [null], - orderStatus: [null], - payTime: [null] - }); - this.getRequest(true, this.searchForm.value); - } - - // 查询列表 - public getRequest(reset: boolean = false, whereObject: object) { - - if (whereObject['payTime'] != null && whereObject['payTime'].length !== 0) { - whereObject['payTimeS'] = whereObject['payTime'][0].getTime(); - whereObject['payTimeE'] = whereObject['payTime'][1].getTime(); - } - - - this.loading = false; - if (reset) { - this.pageNum = 1; - } - whereObject['pageNum'] = this.pageNum; - whereObject['pageSize'] = this.pageSize; - this.order.getGasOrderList(whereObject, data => { - if (data['return_code'] === '000000') { - this.requestData = data['return_data'].list; - this.total = data['return_data'].total; - } else { - this.message.error(data['return_msg']); - } - }); - } - - // 查询商户 - public getMerchantListByCompany(companyId: number): void { - this.merchant.getMerchantListByCompany(companyId, data => { - if (data['return_code'] === '000000') { - if (data['return_code'] === '000000') { - this.merchantData = data['return_data']; - } else { - this.message.error(data['return_msg']); - } - } else { - this.message.error(data['return_msg']); - } - }); - } - - // 重置 - public resetForm(): void { - this.searchForm.reset(); - } - - - // 查看详情 - public getDetail(id: number): void { - this.router.navigate(['/admin/order/order-detail'], { - queryParams: { - merchantId: id - } - }).then(r => console.log(r)); - } - - // 下载模板 - downloadTemplate(whereObject) { - if (whereObject['payTime'] != null && whereObject['payTime'].length !== 0) { - whereObject['payTimeS'] = whereObject['payTime'][0].getTime(); - whereObject['payTimeE'] = whereObject['payTime'][1].getTime(); - } - this.order.exportGoodsOrderList(whereObject, data => { - if (data['return_code'] === '000000') { - window.location.href = this.FILE_URL + data['return_data']; - } else { - this.message.error(data['return_msg']); - } - }); - } - - provinceChange(e) { - console.log(e); - } - - // 退款 - public orderToRefund(id): void { - - } - - showModal(id): void { - console.log(id); - this.id = id; - this.isVisible = true; - } - - handleOk(): void { - if (this.refundContent == null || this.refundContent.length === 0) { - this.message.error('请输入退款原因'); - return; - } - this.common.showConfirm('确认订单是否退款', item => { - if (item) { - const params = { - orderId: this.id , - refundContent: this.refundContent - }; - this.order.refuelingOrderRefund(params, data => { - if (data['return_code'] === '000000') { - this.getRequest(false, this.searchForm.value); - this.isVisible = false; - this.message.success('申请退款中'); - } else { - this.message.error(data['return_msg']); - } - }); - } - }); - } - - handleCancel(): void { - this.isVisible = false; - } - -} diff --git a/src/app/admin/order/order-agent/order-agent.component.html b/src/app/admin/order/order-agent/order-agent.component.html deleted file mode 100644 index 1b6612c..0000000 --- a/src/app/admin/order/order-agent/order-agent.component.html +++ /dev/null @@ -1,186 +0,0 @@ - - - - - -
    -
    -
    - - - - - - - - - - - - - - - - - - - - -
    - - 订单号 - - - - -
    - - - - - - - - -
    - - 用户电话 - - - - -
    -
    - - 支付模式 - - - - - - - - -
    -
    - - 支付方式 - - - - - - - - - -
    -
    - - 状态 - - - - - - - - - - - - -
    -
    - - 时间区间 - - - - -
    -
    - -
    -
    - - -
    -
    -
    -
    - - -
    - 共计 {{total}} 条数据 -
    - -
    - - - - 编号 - 商品名称 - 订单来源 - 订单类型 - 订单号 - 支付流水号 - 客户名称 - 客户电话 - 支付模式 - 支付方式 - 支付金额 - 生成时间 - 支付时间 - 取消时间 - 状态 - - - - - - {{i+1}} - {{data.goodsName}} - {{data.giveawayType}} - {{data.goodsType}} - {{data.orderNo}} - {{data.paySerialNo}} - {{data.memName == null ? '暂无': data.memName}} - {{data.memPhone == null ? '暂无': data.memPhone}} - {{data.payModel}} - {{data.payType}} - {{data.payPrice}} - {{data.createTime | date: 'yyyy-MM-dd HH:mm:ss'}} - {{data.payTime | date: 'yyyy-MM-dd HH:mm:ss'}} - {{data.cancelTime | date: 'yyyy-MM-dd HH:mm:ss'}} - {{data.orderStatus}} - - - - - - -
    - - - - - 退款理由 - - - - - - diff --git a/src/app/admin/order/order-agent/order-agent.component.scss b/src/app/admin/order/order-agent/order-agent.component.scss deleted file mode 100644 index 8bee3fb..0000000 --- a/src/app/admin/order/order-agent/order-agent.component.scss +++ /dev/null @@ -1,4 +0,0 @@ -.head_img { - height: 60px; - width: 60px; -} diff --git a/src/app/admin/order/order-agent/order-agent.component.ts b/src/app/admin/order/order-agent/order-agent.component.ts deleted file mode 100644 index a5a8a75..0000000 --- a/src/app/admin/order/order-agent/order-agent.component.ts +++ /dev/null @@ -1,188 +0,0 @@ -import { Component, OnInit } from '@angular/core'; -import {environment} from '../../../../environments/environment'; -import {FormBuilder, FormGroup} from '@angular/forms'; -import {OrderService} from '../../../services/order.service'; -import {IconService} from '../../../services/icon.service'; -import {NzMessageService} from 'ng-zorro-antd'; -import {Router} from '@angular/router'; -import {CompanyService} from '../../../services/company.service'; -import {MerchantService} from '../../../services/merchant.service'; -import {CommonsService} from '../../../services/commons.service'; -import {ADMIN_INFO_OBJECT, DATA} from '../../../services/local-storage.namespace'; -import {LocalStorageService} from '../../../services/local-storage.service'; - -@Component({ - selector: 'app-order-agent', - templateUrl: './order-agent.component.html', - styleUrls: ['./order-agent.component.scss'] -}) -export class OrderAgentComponent implements OnInit { - - WEB_SERVE_URL = environment.baseUrl; - FILE_URL = environment.imageUrl; - searchForm: FormGroup; // 搜索框 - requestData = []; // 列表数据 - companyData = []; // 列表数据 - merchantData = []; // 列表数据 - total: number; // 页码 - pageNum = 1; // 页码 - pageSize = 10; // 条码 - loading = true; - id: number; // 订单ID - isVisible = false; - refundContent: string; - constructor( - private form: FormBuilder, - private order: OrderService, - private iconService: IconService, - private message: NzMessageService, - private router: Router, - private store: LocalStorageService, // 数据请求 - private company: CompanyService, - private merchant: MerchantService, - private common: CommonsService - ) { - } - - ngOnInit(): void { - this.init(); - const whereObject = {}; - whereObject['pageNum'] = 1; - whereObject['pageSize'] = 10000; - this.company.selectCompanyList(whereObject, data => { - if (data['return_code'] === '000000') { - this.companyData = data['return_data'].list; - } else { - this.message.error(data['return_msg']); - } - }); - this.getMerchantListByCompany(this.searchForm.value.companyId); - } - - public init(): void { - this.searchForm = this.form.group({ - companyId: [null], - merchantId: [null], - orderNo: [null], - paySerialNo: [null], - payModel: [null], - payType: [null], - memDiscountName: [null], - memPhone: [null], - orderStatus: [null], - payTime: [null], - identificationCode: this.store.get(ADMIN_INFO_OBJECT)['highAgent']['id'] - }); - this.getRequest(true, this.searchForm.value); - } - - // 查询列表 - public getRequest(reset: boolean = false, whereObject: object) { - - if (whereObject['payTime'] != null && whereObject['payTime'].length !== 0) { - whereObject['payTimeS'] = whereObject['payTime'][0].getTime(); - whereObject['payTimeE'] = whereObject['payTime'][1].getTime(); - } - - this.loading = false; - if (reset) { - this.pageNum = 1; - } - whereObject['pageNum'] = this.pageNum; - whereObject['pageSize'] = this.pageSize; - whereObject['identificationCode'] = this.store.get(ADMIN_INFO_OBJECT)['highAgent']['id']; - this.order.getOrderListByIdCode(whereObject, data => { - if (data['return_code'] === '000000') { - this.requestData = data['return_data'].list; - this.total = data['return_data'].total; - } else { - this.message.error(data['return_msg']); - } - }); - } - - // 查询商户 - public getMerchantListByCompany(companyId: number): void { - this.merchant.getMerchantListByCompany(companyId, data => { - if (data['return_code'] === '000000') { - if (data['return_code'] === '000000') { - this.merchantData = data['return_data']; - } else { - this.message.error(data['return_msg']); - } - } else { - this.message.error(data['return_msg']); - } - }); - } - - // 重置 - public resetForm(): void { - this.searchForm.reset(); - } - - - // 查看详情 - public getDetail(id: number): void { - this.router.navigate(['/admin/order/order-detail'], { - queryParams: { - merchantId: id - } - }).then(r => console.log(r)); - } - - // 下载模板 - downloadTemplate(whereObject) { - if (whereObject['payTime'] != null && whereObject['payTime'].length !== 0) { - whereObject['payTimeS'] = whereObject['payTime'][0].getTime(); - whereObject['payTimeE'] = whereObject['payTime'][1].getTime(); - } - whereObject['identificationCode'] = this.store.get(ADMIN_INFO_OBJECT)['highAgent']['id']; - this.order.exportOrderListByIdCode(whereObject, data => { - if (data['return_code'] === '000000') { - window.location.href = this.FILE_URL + data['return_data']; - } else { - this.message.error(data['return_msg']); - } - }); - } - - provinceChange(e) { - console.log(e); - } - - // 退款 - public orderToRefund(id): void { - - } - - showModal(id): void { - this.id = id; - this.isVisible = true; - } - - handleOk(): void { - this.common.showConfirm('确认订单是否退款', item => { - if (item) { - const params = { - orderId: this.id , - refundContent: this.refundContent - }; - this.order.refuelingOrderRefund(params, data => { - if (data['return_code'] === '000000') { - this.getRequest(false, this.searchForm.value); - this.isVisible = false; - this.message.success('退款成功'); - } else { - this.message.error(data['return_msg']); - } - }); - } - }); - } - - handleCancel(): void { - this.isVisible = false; - } - -} diff --git a/src/app/admin/order/order-c-list/order-c-list.component.html b/src/app/admin/order/order-c-list/order-c-list.component.html deleted file mode 100644 index 8db0354..0000000 --- a/src/app/admin/order/order-c-list/order-c-list.component.html +++ /dev/null @@ -1,175 +0,0 @@ - - - - - -
    -
    -
    - - - - - - - - - - - - - - - - - - - - -
    - - 订单号 - - - - -
    -
    - - 订单流水号 - - - - -
    -
    - - 支付模式 - - - - - - - - -
    -
    - - 支付方式 - - - - - - - - -
    -
    - - 状态 - - - - - - - - - - - - -
    -
    - - 时间区间 - - - - -
    -
    - -
    -
    - - -
    -
    -
    -
    - - -
    - 共计 {{total}} 条数据 - - - - - - - 编号 - 商品名称 - 订单来源 - 订单号 - 支付流水号 - 客户名称 - 客户电话 - 支付模式 - 支付方式 - 支付金额 - 生成时间 - 支付时间 - 取消时间 - 状态 - - - - - - {{i+1}} - {{data.goodsName}} - {{data.giveawayType}} - {{data.orderNo}} - {{data.paySerialNo}} - {{data.memName == null ? '暂无': data.memName}} - {{data.memPhone == null ? '暂无': data.memPhone}} - {{data.payModel}} - {{data.payType}} - {{data.payPrice}} - {{data.createTime | date: 'yyyy-MM-dd HH:mm:ss'}} - {{data.payTime | date: 'yyyy-MM-dd HH:mm:ss'}} - {{data.cancelTime | date: 'yyyy-MM-dd HH:mm:ss'}} - {{data.orderStatus}} - - - - - - -
    - - - - - 退款理由 - - - - - - diff --git a/src/app/admin/order/order-c-list/order-c-list.component.scss b/src/app/admin/order/order-c-list/order-c-list.component.scss deleted file mode 100644 index 8bee3fb..0000000 --- a/src/app/admin/order/order-c-list/order-c-list.component.scss +++ /dev/null @@ -1,4 +0,0 @@ -.head_img { - height: 60px; - width: 60px; -} diff --git a/src/app/admin/order/order-c-list/order-c-list.component.ts b/src/app/admin/order/order-c-list/order-c-list.component.ts deleted file mode 100644 index 619839f..0000000 --- a/src/app/admin/order/order-c-list/order-c-list.component.ts +++ /dev/null @@ -1,187 +0,0 @@ -import { Component, OnInit } from '@angular/core'; -import {environment} from '../../../../environments/environment'; -import {OrderService} from '../../../services/order.service'; -import {IconService} from '../../../services/icon.service'; - -import {CompanyService} from '../../../services/company.service'; -import {MerchantService} from '../../../services/merchant.service'; -import {CommonsService} from '../../../services/commons.service'; -import {FormBuilder, FormGroup} from '@angular/forms'; -import {NzMessageService} from 'ng-zorro-antd'; -import {Router} from '@angular/router'; - -@Component({ - selector: 'app-order-c-list', - templateUrl: './order-c-list.component.html', - styleUrls: ['./order-c-list.component.scss'] -}) -export class OrderCListComponent implements OnInit { - - WEB_SERVE_URL = environment.baseUrl; - FILE_URL = environment.imageUrl; - searchForm: FormGroup; // 搜索框 - requestData = []; // 列表数据 - companyData = []; // 列表数据 - merchantData = []; // 列表数据 - total: number; // 页码 - pageNum = 1; // 页码 - pageSize = 10; // 条码 - loading = true; - id: number; // 订单ID - isVisible = false; - refundContent: string; - constructor( - private form: FormBuilder, - private order: OrderService, - private iconService: IconService, - private message: NzMessageService, - private router: Router, - private company: CompanyService, - private merchant: MerchantService, - private common: CommonsService - ) { - } - - ngOnInit(): void { - this.init(); - const whereObject = {}; - whereObject['pageNum'] = 1; - whereObject['pageSize'] = 10000; - this.company.selectCompanyList(whereObject, data => { - if (data['return_code'] === '000000') { - this.companyData = data['return_data'].list; - } else { - this.message.error(data['return_msg']); - } - }); - this.getMerchantListByCompany(this.searchForm.value.companyId); - } - - public init(): void { - this.searchForm = this.form.group({ - companyId: [null], - merchantId: [null], - orderNo: [null], - paySerialNo: [null], - payModel: [null], - payType: [null], - orderStatus: [null], - payTime: [null] - }); - this.getRequest(true, this.searchForm.value); - } - - // 查询列表 - public getRequest(reset: boolean = false, whereObject: object) { - - if (whereObject['payTime'] != null && whereObject['payTime'].length !== 0) { - whereObject['payTimeS'] = whereObject['payTime'][0].getTime(); - whereObject['payTimeE'] = whereObject['payTime'][1].getTime(); - } - - - this.loading = false; - if (reset) { - this.pageNum = 1; - } - whereObject['pageNum'] = this.pageNum; - whereObject['pageSize'] = this.pageSize; - this.order.getCinemaOrderList(whereObject, data => { - if (data['return_code'] === '000000') { - this.requestData = data['return_data'].list; - this.total = data['return_data'].total; - } else { - this.message.error(data['return_msg']); - } - }); - } - - // 查询商户 - public getMerchantListByCompany(companyId: number): void { - this.merchant.getMerchantListByCompany(companyId, data => { - if (data['return_code'] === '000000') { - if (data['return_code'] === '000000') { - this.merchantData = data['return_data']; - } else { - this.message.error(data['return_msg']); - } - } else { - this.message.error(data['return_msg']); - } - }); - } - - // 重置 - public resetForm(): void { - this.searchForm.reset(); - } - - - // 查看详情 - public getDetail(id: number): void { - this.router.navigate(['/admin/order/order-detail'], { - queryParams: { - merchantId: id - } - }).then(r => console.log(r)); - } - - // 下载模板 - downloadTemplate(whereObject) { - if (whereObject['payTime'] != null && whereObject['payTime'].length !== 0) { - whereObject['payTimeS'] = whereObject['payTime'][0].getTime(); - whereObject['payTimeE'] = whereObject['payTime'][1].getTime(); - } - this.order.exportGoodsOrderList(whereObject, data => { - if (data['return_code'] === '000000') { - window.location.href = this.FILE_URL + data['return_data']; - } else { - this.message.error(data['return_msg']); - } - }); - } - - provinceChange(e) { - console.log(e); - } - - // 退款 - public orderToRefund(id): void { - - } - - showModal(id): void { - console.log(id); - this.id = id; - this.isVisible = true; - } - - handleOk(): void { - if (this.refundContent == null || this.refundContent.length === 0) { - this.message.error('请输入退款原因'); - return; - } - this.common.showConfirm('确认订单是否退款', item => { - if (item) { - const params = { - orderId: this.id , - refundContent: this.refundContent - }; - this.order.refuelingOrderRefund(params, data => { - if (data['return_code'] === '000000') { - this.getRequest(false, this.searchForm.value); - this.isVisible = false; - this.message.success('申请退款中'); - } else { - this.message.error(data['return_msg']); - } - }); - } - }); - } - - handleCancel(): void { - this.isVisible = false; - } - -} diff --git a/src/app/admin/order/order-coupon-list/order-coupon-list.component.html b/src/app/admin/order/order-coupon-list/order-coupon-list.component.html deleted file mode 100644 index fa02bd5..0000000 --- a/src/app/admin/order/order-coupon-list/order-coupon-list.component.html +++ /dev/null @@ -1,182 +0,0 @@ - - - - - - -
    -
    -
    - -
    - - 订单号 - - - - -
    - -
    - - 客户电话 - - - - -
    - -
    - - 卡券名称 - - - - -
    - -
    - - 支付卡号 - - - - -
    - -
    - - 支付方式 - - - - - - - - - - - - -
    - -
    - - 订单状态 - - - - - - - - - - -
    - -
    - - 创建时间 - - - - -
    - -
    - - 支付时间 - - - - -
    - -
    - - 完成时间 - - - - -
    - -
    - -
    -
    - - -
    -
    -
    -
    - -
    - 共计 {{dataObject.total?dataObject.total:0}} 条数据 -
    - -
    - - - - - - 序号 - 订单号 - 客户电话 - 卡券名称 - 订单总额 - 优惠金额 - 应付金额 - 积分抵扣 - 实付金额 - 支付方式 - 支付卡号 - 订单状态 - 创建时间 - 支付时间 - 完成时间 - - - - - - {{i+1}} - {{data.orderNo}} - {{data.memPhone}} - {{data.couponName}} - {{data.totalPrice}} - {{data.deductionPrice}} - {{data.payablePrice}} - {{data.payGold / 100}} - {{data.payPrice}} - {{data.payType}} - {{data.memCardNo}} - {{data.orderStatus}} - {{data.createTime | date : 'yyyy-MM-dd HH:mm:ss'}} - {{data.payTime | date : 'yyyy-MM-dd HH:mm:ss'}} - {{data.finishTime | date : 'yyyy-MM-dd HH:mm:ss'}} - - - - -
    -
    - diff --git a/src/app/admin/order/order-coupon-list/order-coupon-list.component.scss b/src/app/admin/order/order-coupon-list/order-coupon-list.component.scss deleted file mode 100644 index e69de29..0000000 diff --git a/src/app/admin/order/order-coupon-list/order-coupon-list.component.ts b/src/app/admin/order/order-coupon-list/order-coupon-list.component.ts deleted file mode 100644 index dc249f4..0000000 --- a/src/app/admin/order/order-coupon-list/order-coupon-list.component.ts +++ /dev/null @@ -1,134 +0,0 @@ -import { Component, OnInit } from '@angular/core'; -import {environment} from '../../../../environments/environment'; -import {FormBuilder, FormGroup} from '@angular/forms'; -import {NzMessageService, NzModalService} from 'ng-zorro-antd'; -import {LocalStorageService} from '../../../services/local-storage.service'; -import {GasStaffService} from '../../../services/gas-staff.service'; -import {CommonsService} from '../../../services/commons.service'; -import {Router} from '@angular/router'; -import {ADMIN_INFO_OBJECT} from '../../../services/local-storage.namespace'; -import {OrderService} from '../../../services/order.service'; - -@Component({ - selector: 'app-order-coupon-list', - templateUrl: './order-coupon-list.component.html', - styleUrls: ['./order-coupon-list.component.scss'] -}) -export class OrderCouponListComponent implements OnInit { - FILE_URL = environment.imageUrl; - roleType; - adminFlag; - loadingObject = { - spinning: false, - msg: '加载中' - }; - - dataObject: any = {}; - tableLoading = true; - searchForm: FormGroup; - pageNum: number; - whereObject: any = {}; - - positionTypeArray = []; - - gasStaffQrCodeImgUrl: string; - gasStaffQrCodeModal = false; - - constructor(private modal: NzModalService, - private message: NzMessageService, - private store: LocalStorageService, - private orderService: OrderService, - private commonsService: CommonsService, - private router: Router, - private form: FormBuilder) { - this.roleType = Number(this.store.get(ADMIN_INFO_OBJECT)['secRole'].roleType); - this.adminFlag = Number(this.store.get(ADMIN_INFO_OBJECT)['secUser'].adminFlag); - } - - ngOnInit(): void { - this.searchForm = this.form.group({ - orderNo: [null], - memPhone: [null], - couponName: [null], - payType: [null], - orderStatus: [null], - createTime: [null], - payTime: [null], - finishTime: [null], - }); - this.requestData(1); - } - - /** - * 请求数据 - */ - requestData(pageNum) { - this.tableLoading = true; - this.whereObject['pageNum'] = pageNum; - this.whereObject['pageSize'] = 10; - this.orderService.getOrderCouponList(this.whereObject, data => { - if (data['return_code'] === '000000') { - this.dataObject = data['return_data']; - } else { - this.modal.error(data['return_msg']); - } - this.tableLoading = false; - }); - } - - /** - * 搜索 - * @param whereObject 条件 - */ - search(whereObject: object) { - if (whereObject['createTime'] != null) { - whereObject['createTimeS'] = whereObject['createTime'][0].getTime(); - whereObject['createTimeE'] = whereObject['createTime'][1].getTime(); - } else { - whereObject['createTimeS'] = null; - whereObject['createTimeE'] = null; - } - - if (whereObject['payTime'] != null) { - whereObject['payTimeS'] = whereObject['payTime'][0].getTime(); - whereObject['payTimeE'] = whereObject['payTime'][1].getTime(); - } else { - whereObject['payTimeS'] = null; - whereObject['payTimeE'] = null; - } - - if (whereObject['finishTime'] != null) { - whereObject['finishTimeS'] = whereObject['finishTime'][0].getTime(); - whereObject['finishTimeE'] = whereObject['finishTime'][1].getTime(); - } else { - whereObject['finishTimeS'] = null; - whereObject['finishTimeE'] = null; - } - this.whereObject = whereObject; - this.requestData(1); - } - - /** - * 重置 - */ - resetForm(): void { - this.searchForm.reset(); - } - - - /** - * 导出Excel - */ - exportExcel(): void { - this.loadingObject.spinning = true; - this.loadingObject.msg = '处理中...'; - - this.orderService.exportOrderCouponExcel(this.whereObject, data => { - this.loadingObject.spinning = false; - if (data['return_code'] === '000000') { - window.location.href = this.FILE_URL + data['return_data']; - } - }); - } - -} diff --git a/src/app/admin/order/order-coupon/order-coupon.component.html b/src/app/admin/order/order-coupon/order-coupon.component.html deleted file mode 100644 index a194e33..0000000 --- a/src/app/admin/order/order-coupon/order-coupon.component.html +++ /dev/null @@ -1,124 +0,0 @@ - - - - -
    - - 卡券类型 - - - - - - - - -
    销售总额: ¥{{countData['salesCountPrice']}}
    -
    剩余总额: ¥{{countData['surplusCountPrice']}}
    -
    今日流水: ¥{{countData['turnoverPrice']}}
    -
    库存数量: {{countData['laveStockCount']}}
    -
    销售数量: {{countData['soldCount']}}
    -
    今日订单: {{countData['orderCount']}}
    -
    -
    - -
    - - - - 卡券名称 - 卡券金额 - 库存数量 - 销售数量 - 操作 - - - - - {{data.couponName}} - ¥{{data.salesPrice}} - {{data.stockCount}} - {{data.salesCount}} - - 使用情况 - - - - -
    - - -
    -
    -
    - - 消费码KEY - - - - -
    -
    - - 消费码状态 - - - - - - - - - -
    -
    -
    -
    - - -
    -
    -
    - - 共计 {{total}} 条数据 - - - - 编号 - 消费码 - 使用门店 - 领取时间 - 消费时间 - 销售截止时间 - 使用截止时间 - 创建时间 - 状态 - - - - - {{i + 1}} - {{data.salesCode}} - {{data.storeName == null ? '暂无' : data.storeName}} - {{data.receiveTime == null ? '未领取' : data.receiveTime | date: 'yyyy-MM-dd HH:mm'}} - {{data.consumeTime == null ? '未消费' : data.consumeTime | date: 'yyyy-MM-dd HH:mm'}} - {{data.salesEndTime | date: 'yyyy-MM-dd HH:mm'}} - {{data.useEndTime | date: 'yyyy-MM-dd HH:mm'}} - {{data.createTime | date: 'yyyy-MM-dd HH:mm'}} - {{data.status | couponCode}} - - - -
    diff --git a/src/app/admin/order/order-coupon/order-coupon.component.scss b/src/app/admin/order/order-coupon/order-coupon.component.scss deleted file mode 100644 index e69de29..0000000 diff --git a/src/app/admin/order/order-coupon/order-coupon.component.ts b/src/app/admin/order/order-coupon/order-coupon.component.ts deleted file mode 100644 index bf686a9..0000000 --- a/src/app/admin/order/order-coupon/order-coupon.component.ts +++ /dev/null @@ -1,95 +0,0 @@ -import { Component, OnInit } from '@angular/core'; -import {FormBuilder, FormGroup} from '@angular/forms'; -import {AgentService} from '../../../services/agent.service'; -import {IconService} from '../../../services/icon.service'; -import {NzMessageService} from 'ng-zorro-antd'; -import {LocalStorageService} from '../../../services/local-storage.service'; -import {environment} from '../../../../environments/environment'; -import {CouponService} from '../../../services/coupon.service'; -import {ADMIN_INFO_OBJECT} from '../../../services/local-storage.namespace'; - -@Component({ - selector: 'app-order-coupon', - templateUrl: './order-coupon.component.html', - styleUrls: ['./order-coupon.component.scss'] -}) -export class OrderCouponComponent implements OnInit { - gridStyle = { - width: '33.3333%', - textAlign: 'center' - }; - searchForm: FormGroup; // 搜索框 - codeForm: FormGroup; // 搜索框 - requestData = []; // 列表数据 - total: number; // 页码 - pageNum = 1; // 页码 - pageSize = 10; // 条码 - loading = true; - isVisible = false; - id; - type = 1; - countData = {}; - constructor( - private form: FormBuilder, - private agent: AgentService, - private iconService: IconService, - private message: NzMessageService, - private store: LocalStorageService, // 数据请求 - private coupon: CouponService - ) { - } - - ngOnInit(): void { - this.searchForm = this.form.group({ - status: [null], - salesCode: [null], - }); - this.getAgentCount(this.type); - } - - public getAgentCount(type) { - this.agent.getAgentCount(type , data => { - this.countData = data['return_data']; - }); - } - - // 查询列表 - public getRequest(reset: boolean = false, whereObject: object) { - - this.loading = false; - if (reset) { - this.pageNum = 1; - } - whereObject['couponId'] = this.id; - whereObject['agentId'] = this.store.get(ADMIN_INFO_OBJECT)['highAgent'].id; - whereObject['pageNum'] = this.pageNum; - whereObject['pageSize'] = this.pageSize; - this.coupon.getCouponCodeList(whereObject, data => { - if (data['return_code'] === '000000') { - this.requestData = data['return_data'].list; - this.total = data['return_data'].total; - } else { - this.message.error(data['return_msg']); - } - }); - - } - - // 查看使用情况 - public getDetail(id): void { - this.id = id; - this.getRequest(false , this.searchForm.value); - this.isVisible = true; - } - - handleCancel(): void { - this.isVisible = false; - } - - // 重置 - public resetForm(): void { - this.searchForm.reset(); - } - - -} diff --git a/src/app/admin/order/order-coupons/order-coupons.component.html b/src/app/admin/order/order-coupons/order-coupons.component.html deleted file mode 100644 index b4c8439..0000000 --- a/src/app/admin/order/order-coupons/order-coupons.component.html +++ /dev/null @@ -1,160 +0,0 @@ - - - - -
    - 共计 {{total}} 条数据 - - - - 编号 - 优惠券KEY - 优惠券名称 - 优惠券类型 - 优惠内容 - 有效天数 - 截止日期 - 创建时间 - 状态 - 操作 - - - - - {{i + 1}} - {{data['highDiscount'].discountKey}} - {{data['highDiscount'].discountName}} - {{data['highDiscount'].discountType | discountType}} - - - 满{{data['highDiscount'].discountCondition}}抵扣{{data['highDiscount'].discountPrice}} - - - 抵扣{{data['highDiscount'].discountPrice}} - - - {{data['highDiscount'].discountPrice}}折 - - - {{data['highDiscount'].effectiveDay}} - {{data['highDiscount'].salesEndTime | date: 'yyyy-MM-dd HH:mm'}} - {{data['highDiscount'].createTime}} - {{data['highDiscount'].status | discountStatus}} - - 使用情况 - - - - -
    - - -
    -
    -
    - - 优惠券状态 - - - - - - - - - - -
    -
    -
    -
    - - -
    -
    -
    - - 共计 {{totalCode}} 条数据 -
    - -
    - - - - 编号 - 优惠券名称 - 用户名称 - 使用门店 - 使用时间 - 二维码生成时间 - 状态 - - - - - {{data.id}} - {{data['highDiscount'].discountName}} - - {{data['highUser'] == null ? '暂无': data['highUser'].name}} - - {{data['highCouponCode']?.storeName}} - {{data['highCouponCode']?.consumeTime | date: 'yyyy-MM-dd HH:mm'}} - {{data.createTime | date: 'yyyy-MM-dd HH:mm'}} - {{data.status | discountCodeStatus}} - - -
    - - - - - diff --git a/src/app/admin/order/order-coupons/order-coupons.component.scss b/src/app/admin/order/order-coupons/order-coupons.component.scss deleted file mode 100644 index 8bee3fb..0000000 --- a/src/app/admin/order/order-coupons/order-coupons.component.scss +++ /dev/null @@ -1,4 +0,0 @@ -.head_img { - height: 60px; - width: 60px; -} diff --git a/src/app/admin/order/order-coupons/order-coupons.component.ts b/src/app/admin/order/order-coupons/order-coupons.component.ts deleted file mode 100644 index b33ebcd..0000000 --- a/src/app/admin/order/order-coupons/order-coupons.component.ts +++ /dev/null @@ -1,150 +0,0 @@ -import { Component, OnInit } from '@angular/core'; -import {environment} from '../../../../environments/environment'; -import {FormBuilder, FormGroup, Validators} from '@angular/forms'; -import {IconService} from '../../../services/icon.service'; -import {NzMessageService} from 'ng-zorro-antd'; -import {AgentService} from '../../../services/agent.service'; -import {LocalStorageService} from '../../../services/local-storage.service'; -import {ADMIN_INFO_OBJECT} from '../../../services/local-storage.namespace'; - -@Component({ - selector: 'app-order-coupons', - templateUrl: './order-coupons.component.html', - styleUrls: ['./order-coupons.component.scss'] -}) -export class OrderCouponsComponent implements OnInit { - - searchForm: FormGroup; // 搜索框 - validateFormPost: FormGroup; // 搜索框 - requestData = []; // 列表数据 - total: number; // 页码 - pageNum = 1; // 页码 - pageSize = 10; // 条码 - loading = true; - - requestDataCode = []; // 列表数据 - totalCode: number; // 页码 - pageNumCode = 1; // 页码 - pageSizeCode = 10; // 条码 - loadingCode = true; - isVisible = false; - isVisibleS = false; - id: number; - loadingS = false; - constructor( - private form: FormBuilder, - private agent: AgentService, - private iconService: IconService, - private message: NzMessageService, - private store: LocalStorageService, // 数据请求 - ) { - } - - ngOnInit(): void { - this.init(); - } - - public init(): void { - this.searchForm = this.form.group({ - status: [null], - }); - this.validateFormPost = this.form.group({ - status: [null, [Validators.required]], - minNumber: [null, [Validators.required]], - maxNumber: [null, [Validators.required]], - }); - this.getRequest(true, {}); - } - - // 查询列表 - public getRequest(reset: boolean = false, whereObject: object) { - this.loading = false; - if (reset) { - this.pageNum = 1; - } - whereObject['agentId'] = this.store.get(ADMIN_INFO_OBJECT)['highAgent'].id; - whereObject['pageNum'] = this.pageNum; - whereObject['pageSize'] = this.pageSize; - this.agent.getDiscountAgentList(whereObject, data => { - if (data['return_code'] === '000000') { - this.requestData = data['return_data'].list; - this.total = data['return_data'].total; - } else { - this.message.error(data['return_msg']); - } - }); - } - - // 重置 - public resetForm(): void { - this.searchForm.reset(); - } - - // 查看使用情况 - public getDetail(id: number): void { - this.id = id; - this.getRequestCode(false , this.searchForm.value); - this.isVisible = true; - } - - // 查询列表 - public getRequestCode(reset: boolean = false, whereObject: object) { - this.loadingCode = true; - if (reset) { - this.pageNumCode = 1; - } - this.searchForm.value['discountAgentId'] = this.id; - whereObject['pageNum'] = this.pageNumCode; - whereObject['pageSize'] = this.pageSizeCode; - this.agent.getDiscountCodeList(whereObject, data => { - this.loadingCode = false; - if (data['return_code'] === '000000') { - this.requestDataCode = data['return_data'].list; - this.totalCode = data['return_data'].total; - } else { - this.message.error(data['return_msg']); - } - }); - } - - - - handleCancel(): void { - this.searchForm.reset(); - this.isVisible = false; - } - - handleCancelS(): void { - this.isVisibleS = false; - } - - getEditStatus() { - this.isVisibleS = true; - } - - handleOk(): void { - // tslint:disable-next-line:forin - for (const i in this.validateFormPost.controls) { - this.validateFormPost.controls[i].markAsDirty(); - this.validateFormPost.controls[i].updateValueAndValidity(); - if (this.validateFormPost.controls[i].errors != null) { - this.message.error('必填项不能为空'); - return; - } - } - const id = this.message.loading('正在提交中', { nzDuration: 0 }).messageId; - this.loadingS = true; - this.agent.getDiscountStatus(this.validateFormPost.value , data => { - if (data['return_code'] === '000000') { - this.isVisibleS = false; - this.loadingS = false; - this.getRequestCode(false , this.searchForm.value); - this.message.remove(id); - this.message.success('成功'); - } else { - this.message.error(data['return_msg']); - } - - }); - } -} diff --git a/src/app/admin/order/order-detail/order-detail.component.html b/src/app/admin/order/order-detail/order-detail.component.html deleted file mode 100644 index d128785..0000000 --- a/src/app/admin/order/order-detail/order-detail.component.html +++ /dev/null @@ -1 +0,0 @@ -

    order-detail works!

    diff --git a/src/app/admin/order/order-detail/order-detail.component.scss b/src/app/admin/order/order-detail/order-detail.component.scss deleted file mode 100644 index e69de29..0000000 diff --git a/src/app/admin/order/order-detail/order-detail.component.ts b/src/app/admin/order/order-detail/order-detail.component.ts deleted file mode 100644 index 66e9666..0000000 --- a/src/app/admin/order/order-detail/order-detail.component.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { Component, OnInit } from '@angular/core'; - -@Component({ - selector: 'app-order-detail', - templateUrl: './order-detail.component.html', - styleUrls: ['./order-detail.component.scss'] -}) -export class OrderDetailComponent implements OnInit { - - constructor() { } - - ngOnInit(): void { - } - -} diff --git a/src/app/admin/order/order-h-list/order-h-list.component.html b/src/app/admin/order/order-h-list/order-h-list.component.html deleted file mode 100644 index e605eca..0000000 --- a/src/app/admin/order/order-h-list/order-h-list.component.html +++ /dev/null @@ -1,243 +0,0 @@ - - - - - -
    -
    -
    -
    - - 区域公司 - - - - - - -
    -
    - - 充值内容 - - - - -
    -
    - - 订单号 - - - - -
    -
    - - 支付状态 - - - - - - - - - - -
    -
    - - 充值状态 - - - - - - - - - -
    - -
    - - 运营商类型 - - - - - - - - -
    -
    - - 充值类型 - - - - - - - -
    - -
    - - 支付方式 - - - - - - - - -
    - -
    - - 工会卡卡号 - - - - -
    -
    - - 支付时间 - - - - -
    -
    - - 创建时间 - - - - -
    -
    -
    -
    - - -
    -
    -
    -
    - -
    - 共计 {{total}} 条数据 -
    - -
    - - - - 编号 - 充值类型 - 运营商 - 充值内容 - 充值金额 - 充值订单号 - 客户名称 - 生成时间 - 支付时间 - 支付方式 - 充值状态 - 支付状态 - 操作 - - - - - {{i + 1}} - {{data.type == 1 ? '话费充值' : ''}} - {{data.operatorName}} - {{data.rechargeContent}} | {{data.rechargeType == 1 ? '快充' : '慢充'}} - ¥{{data.rechargePrice}} - {{data.orderNo}} - {{data.userName == null ? '暂无' : data.userName}} - {{data.createTimed | date: 'yyyy-MM-dd HH:mm:ss'}} - {{data.payTime | date: 'yyyy-MM-dd HH:mm:ss'}} - {{data.payType | rechargePayType}} - {{data.rechargeStatus | rechargeStatus}} - {{data.payStatus | payStatus}} - - 详情 - - - - - -
    - - - - {{data['orderNo']}} - {{data['type'] == 1 ? '话费充值' : ''}} - {{data['operatorName']}} - {{data['rechargeContent']}} | {{data['rechargeType'] == 1 ? '快充' : '慢充'}} - ¥{{data['rechargePrice']}} - ¥{{data['payPrice']}} - ¥{{data['integralDeductionPrice'] == null ? '0' : data['integralDeductionPrice']}} - ¥{{data['discountDeductionPrice'] == null ? '0' : data['discountDeductionPrice']}} - ¥{{data['payRealPrice']}} - ¥{{data['refundFee']}} - {{data['memDiscountName']}} - {{data['paySerialNo']}} - {{data['createTimed'] | date: 'yyyy-MM-dd HH:mm:ss'}} - {{data['cancelTime'] | date: 'yyyy-MM-dd HH:mm:ss'}} - {{data['finishTime'] | date: 'yyyy-MM-dd HH:mm:ss'}} - {{data['payTime'] | date: 'yyyy-MM-dd HH:mm:ss'}} - {{data['refundTime'] | date: 'yyyy-MM-dd HH:mm:ss'}} - {{data['payType'] | rechargePayType}} - {{data['laborUnionCard']}} - {{data['rechargeStatus'] | rechargeStatus}} - {{data['payStatus'] | payStatus}} - - - - - - - - - 订单号 - 充值平台 - 充值状态 - 创建时间 - - - - - {{data.orderNo}} - {{data.rechargePlatform == 1 ? '尖椒':'龙阅'}} - {{data.status | chlidRechargeStatus}} - {{data['createTime'] | date: 'yyyy-MM-dd HH:mm'}} - - - - diff --git a/src/app/admin/order/order-h-list/order-h-list.component.scss b/src/app/admin/order/order-h-list/order-h-list.component.scss deleted file mode 100644 index b68da73..0000000 --- a/src/app/admin/order/order-h-list/order-h-list.component.scss +++ /dev/null @@ -1,5 +0,0 @@ -.table-td-operation { - a { - margin-left: 8px; - } -} diff --git a/src/app/admin/order/order-h-list/order-h-list.component.ts b/src/app/admin/order/order-h-list/order-h-list.component.ts deleted file mode 100644 index bd83ac1..0000000 --- a/src/app/admin/order/order-h-list/order-h-list.component.ts +++ /dev/null @@ -1,208 +0,0 @@ -import { Component, OnInit } from '@angular/core'; -import {environment} from '../../../../environments/environment'; -import {FormBuilder, FormGroup, Validators} from '@angular/forms'; -import {IconService} from '../../../services/icon.service'; -import {NzMessageService, NzModalService, NzUploadChangeParam} from 'ng-zorro-antd'; -import {RechargeService} from '../../../services/recharge.service'; -import {DiscountService} from '../../../services/discount.service'; -import {CouponService} from '../../../services/coupon.service'; -import {ADMIN_INFO_OBJECT} from '../../../services/local-storage.namespace'; -import {LocalStorageService} from '../../../services/local-storage.service'; -import {CompanyService} from '../../../services/company.service'; - -@Component({ - selector: 'app-order-h-list', - templateUrl: './order-h-list.component.html', - styleUrls: ['./order-h-list.component.scss'] -}) -export class OrderHListComponent implements OnInit { - - FILE_URL = environment.imageUrl; - WEB_SERVE_URL = environment.baseUrl; - searchForm: FormGroup; // 搜索框 - validateForm: FormGroup; // 添加框 - requestData = []; // 列表数据 - childData = []; // 列表数据 - importErrorStudentArray = []; - errorStudentVisible = false; - isVisibleChild = false; - total: number; // 页码 - pageNum = 1; // 页码 - pageSize = 10; // 条码 - loading = true; - isVisible = false; - id: number; - edit = false; - data = {}; - roleType: number; - companyData = []; // 列表数据 - constructor( - private form: FormBuilder, - private recharge: RechargeService, - private discount: DiscountService, - private modal: NzModalService, - private coupon: CouponService, - private iconService: IconService, - private message: NzMessageService, - private company: CompanyService, - private store: LocalStorageService, // 数据请求 - ) { - } - - ngOnInit(): void { - this.init(); - this.roleType = this.store.get(ADMIN_INFO_OBJECT)['secRole']['roleType']; - const whereObject = {}; - whereObject['pageNum'] = 1; - whereObject['pageSize'] = 10000; - this.company.selectCompanyList(whereObject, data => { - if (data['return_code'] === '000000') { - this.companyData = data['return_data'].list; - } else { - this.message.error(data['return_msg']); - } - }); - - } - - - public init(): void { - this.searchForm = this.form.group({ - payStatus: [null], // 支付状态 - rechargeStatus: [null], // 充值状态 - companyId: [null], // 充值状态 - orderNo: [null], // 订单号 - operatorType: [null], // 运营商类型 - laborUnionCard: [null], // 工会卡号 - rechargeContent: [null], // 充值内容 - userPhone: [null], // 用户电话 - rechargeType: [null], // 充值类型 - payTime: [null], // 支付时间 - payType: [null], // 支付方式 - createTime: [null], // 创建时间 - }); - this.validateForm = this.form.group({ - type: [null, [Validators.required]], - price: [null, [Validators.required]], - realPrice: [null, [Validators.required]], - }); - - this.getRequest(true, this.searchForm.value); - } - - // 查询列表 - public getRequest(reset: boolean = false, whereObject: object) { - if (whereObject['payTime'] != null && whereObject['payTime'].length !== 0) { - whereObject['payTimeS'] = whereObject['payTime'][0].getTime(); - whereObject['payTimeE'] = whereObject['payTime'][1].getTime(); - } - - if (whereObject['createTime'] != null && whereObject['createTime'].length !== 0) { - whereObject['createTimeS'] = whereObject['createTime'][0].getTime(); - whereObject['createTimeE'] = whereObject['createTime'][1].getTime(); - } - this.loading = false; - if (reset) { - this.pageNum = 1; - } - whereObject['pageNum'] = this.pageNum; - whereObject['pageSize'] = this.pageSize; - this.recharge.getOrderList(whereObject, data => { - if (data['return_code'] === '000000') { - this.requestData = data['return_data'].list; - this.total = data['return_data'].total; - } else { - this.message.error(data['return_msg']); - } - }); - } - - // 重置 - public resetForm(): void { - this.searchForm.reset(); - } - - // 详情 - public getDetail(id: number): void { - this.id = id; - this.recharge.getOrderById(id, data => { - if (data['return_code'] === '000000') { - console.log(data); - this.data = data['return_data']; - } else { - this.message.error(data['return_msg']); - } - }); - - this.isVisible = true; - } - - - handleCancel(): void { - this.isVisible = false; - } - - - // 下载模板 - downloadTemplate(whereObject) { - if (whereObject['payTime'] != null && whereObject['payTime'].length !== 0) { - whereObject['payTimeS'] = whereObject['payTime'][0].getTime(); - whereObject['payTimeE'] = whereObject['payTime'][1].getTime(); - } - if (whereObject['createTime'] != null && whereObject['createTime'].length !== 0) { - whereObject['createTimeS'] = whereObject['createTime'][0].getTime(); - whereObject['createTimeE'] = whereObject['createTime'][1].getTime(); - } - this.recharge.exportOrderList(whereObject, data => { - if (data['return_code'] === '000000') { - window.location.href = this.FILE_URL + data['return_data']; - } else { - this.message.error(data['return_msg']); - } - }); - } - - handleChange(info: NzUploadChangeParam): void { - if (info.file.status === 'done') { - if (info.file.response.return_code === '000000') { - this.loading = false; - if (info.file.response.return_data == null || info.file.response.return_data.errorTotal === 0) { - this.message.success('导入成功'); - this.getRequest(true, this.searchForm.value); - } else { - this.modal.warning({ - nzTitle: '提示', - nzOkText: '查看失败数据', - nzContent: '只有部分数据导入成功', - nzOnOk: () => this.showErrorStudentModal(info.file.response.return_data) - }); - } - } else { - this.loading = false; - this.message.error(info.file.response.return_msg); - } - } else if (info.file.status === 'error') { - this.message.error('上传错误'); - } - } - - // 打开模态框 - showErrorStudentModal(data: []) { - this.getRequest(true, this.searchForm.value); - this.importErrorStudentArray = data['errorData']; - this.errorStudentVisible = true; - } - - // 查询子订单 - public getChildOrder(id: number): void { - this.isVisibleChild = true; - this.recharge.getChildOrder(id, data => { - if (data['return_code'] === '000000') { - this.childData = data['return_data']; - } else { - this.message.error(data['return_msg']); - } - }); - } - -} diff --git a/src/app/admin/order/order-k-list/order-k-list.component.html b/src/app/admin/order/order-k-list/order-k-list.component.html deleted file mode 100644 index cceb15d..0000000 --- a/src/app/admin/order/order-k-list/order-k-list.component.html +++ /dev/null @@ -1,179 +0,0 @@ - - - - - -
    -
    -
    - - - - - - - - - - - - - - - - - - - - -
    - - 订单号 - - - - -
    -
    - - 订单流水号 - - - - -
    -
    - - 支付模式 - - - - - - - - -
    -
    - - 支付方式 - - - - - - - - -
    -
    - - 状态 - - - - - - - - - - - - -
    -
    - - 时间区间 - - - - -
    -
    - -
    -
    - - -
    -
    -
    -
    - - -
    - 共计 {{total}} 条数据 - - - - - - - 编号 - 商品名称 - 订单来源 - 订单号 - 支付流水号 - 客户名称 - 客户电话 - 支付模式 - 支付方式 - 实际单价 - 商品数量 - 订单总价 - 生成时间 - 支付时间 - 取消时间 - 状态 - - - - - - {{i+1}} - {{data.goodsName}} - {{data.giveawayType}} - {{data.orderNo}} - {{data.paySerialNo}} - {{data.memName == null ? '暂无': data.memName}} - {{data.memPhone == null ? '暂无': data.memPhone}} - {{data.payModel}} - {{data.payType}} - {{data.goodsActualPrice}} - {{data.saleCount}} - {{data.totalPrice}} - {{data.createTime | date: 'yyyy-MM-dd HH:mm:ss'}} - {{data.payTime | date: 'yyyy-MM-dd HH:mm:ss'}} - {{data.cancelTime | date: 'yyyy-MM-dd HH:mm:ss'}} - {{data.orderStatus}} - - - - - - -
    - - - - - 退款理由 - - - - - - diff --git a/src/app/admin/order/order-k-list/order-k-list.component.scss b/src/app/admin/order/order-k-list/order-k-list.component.scss deleted file mode 100644 index 8bee3fb..0000000 --- a/src/app/admin/order/order-k-list/order-k-list.component.scss +++ /dev/null @@ -1,4 +0,0 @@ -.head_img { - height: 60px; - width: 60px; -} diff --git a/src/app/admin/order/order-k-list/order-k-list.component.ts b/src/app/admin/order/order-k-list/order-k-list.component.ts deleted file mode 100644 index 0bf055c..0000000 --- a/src/app/admin/order/order-k-list/order-k-list.component.ts +++ /dev/null @@ -1,186 +0,0 @@ -import { Component, OnInit } from '@angular/core'; -import {environment} from '../../../../environments/environment'; -import {OrderService} from '../../../services/order.service'; -import {IconService} from '../../../services/icon.service'; -import {CompanyService} from '../../../services/company.service'; -import {MerchantService} from '../../../services/merchant.service'; -import {CommonsService} from '../../../services/commons.service'; -import {FormBuilder, FormGroup} from '@angular/forms'; -import {NzMessageService} from 'ng-zorro-antd'; -import {Router} from '@angular/router'; - -@Component({ - selector: 'app-order-k-list', - templateUrl: './order-k-list.component.html', - styleUrls: ['./order-k-list.component.scss'] -}) -export class OrderKListComponent implements OnInit { - - WEB_SERVE_URL = environment.baseUrl; - FILE_URL = environment.imageUrl; - searchForm: FormGroup; // 搜索框 - requestData = []; // 列表数据 - companyData = []; // 列表数据 - merchantData = []; // 列表数据 - total: number; // 页码 - pageNum = 1; // 页码 - pageSize = 10; // 条码 - loading = true; - id: number; // 订单ID - isVisible = false; - refundContent: string; - constructor( - private form: FormBuilder, - private order: OrderService, - private iconService: IconService, - private message: NzMessageService, - private router: Router, - private company: CompanyService, - private merchant: MerchantService, - private common: CommonsService - ) { - } - - ngOnInit(): void { - this.init(); - const whereObject = {}; - whereObject['pageNum'] = 1; - whereObject['pageSize'] = 10000; - this.company.selectCompanyList(whereObject, data => { - if (data['return_code'] === '000000') { - this.companyData = data['return_data'].list; - } else { - this.message.error(data['return_msg']); - } - }); - this.getMerchantListByCompany(this.searchForm.value.companyId); - } - - public init(): void { - this.searchForm = this.form.group({ - companyId: [null], - merchantId: [null], - orderNo: [null], - paySerialNo: [null], - payModel: [null], - payType: [null], - orderStatus: [null], - payTime: [null] - }); - this.getRequest(true, this.searchForm.value); - } - - // 查询列表 - public getRequest(reset: boolean = false, whereObject: object) { - - if (whereObject['payTime'] != null && whereObject['payTime'].length !== 0) { - whereObject['payTimeS'] = whereObject['payTime'][0].getTime(); - whereObject['payTimeE'] = whereObject['payTime'][1].getTime(); - } - - - this.loading = false; - if (reset) { - this.pageNum = 1; - } - whereObject['pageNum'] = this.pageNum; - whereObject['pageSize'] = this.pageSize; - this.order.getKfcOrderList(whereObject, data => { - if (data['return_code'] === '000000') { - this.requestData = data['return_data'].list; - this.total = data['return_data'].total; - } else { - this.message.error(data['return_msg']); - } - }); - } - - // 查询商户 - public getMerchantListByCompany(companyId: number): void { - this.merchant.getMerchantListByCompany(companyId, data => { - if (data['return_code'] === '000000') { - if (data['return_code'] === '000000') { - this.merchantData = data['return_data']; - } else { - this.message.error(data['return_msg']); - } - } else { - this.message.error(data['return_msg']); - } - }); - } - - // 重置 - public resetForm(): void { - this.searchForm.reset(); - } - - - // 查看详情 - public getDetail(id: number): void { - this.router.navigate(['/admin/order/order-detail'], { - queryParams: { - merchantId: id - } - }).then(r => console.log(r)); - } - - // 下载模板 - downloadTemplate(whereObject) { - if (whereObject['payTime'] != null && whereObject['payTime'].length !== 0) { - whereObject['payTimeS'] = whereObject['payTime'][0].getTime(); - whereObject['payTimeE'] = whereObject['payTime'][1].getTime(); - } - this.order.exportGoodsOrderList(whereObject, data => { - if (data['return_code'] === '000000') { - window.location.href = this.FILE_URL + data['return_data']; - } else { - this.message.error(data['return_msg']); - } - }); - } - - provinceChange(e) { - console.log(e); - } - - // 退款 - public orderToRefund(id): void { - - } - - showModal(id): void { - console.log(id); - this.id = id; - this.isVisible = true; - } - - handleOk(): void { - if (this.refundContent == null || this.refundContent.length === 0) { - this.message.error('请输入退款原因'); - return; - } - this.common.showConfirm('确认订单是否退款', item => { - if (item) { - const params = { - orderId: this.id , - refundContent: this.refundContent - }; - this.order.refuelingOrderRefund(params, data => { - if (data['return_code'] === '000000') { - this.getRequest(false, this.searchForm.value); - this.isVisible = false; - this.message.success('申请退款中'); - } else { - this.message.error(data['return_msg']); - } - }); - } - }); - } - - handleCancel(): void { - this.isVisible = false; - } - -} diff --git a/src/app/admin/order/order-list/order-list.component.html b/src/app/admin/order/order-list/order-list.component.html deleted file mode 100644 index dd79c40..0000000 --- a/src/app/admin/order/order-list/order-list.component.html +++ /dev/null @@ -1,204 +0,0 @@ - - - - - -
    -
    -
    -
    - - 区域公司 - - - - - - -
    -
    - - 商户 - - - - - - -
    -
    - - 订单号 - - - - -
    -
    - - 商品名称 - - - - -
    -
    - - 用户电话 - - - - -
    -
    - - 支付模式 - - - - - - - - -
    -
    - - 支付方式 - - - - - - - - - - -
    -
    - - 状态 - - - - - - - - - - - - -
    -
    - - 时间区间 - - - - -
    -
    - -
    -
    - - -
    -
    -
    -
    - - -
    - 共计 {{total}} 条数据 -
    - -
    - - - - 编号 - 商品名称 - 订单来源 - 订单类型 - 订单号 - 支付流水号 - 客户名称 - 客户电话 - 支付模式 - 支付方式 - 支付金额 - 生成时间 - 支付时间 - 取消时间 - 状态 - 操作 - - - - - {{i+1}} - {{data.goodsName}} - {{data.giveawayType}} - {{data.goodsType}} - {{data.orderNo}} - {{data.paySerialNo}} - {{data.memName == null ? '暂无': data.memName}} - {{data.memPhone == null ? '暂无': data.memPhone}} - {{data.payModel}} - {{data.payType}} - {{data.payPrice}} - {{data.createTime | date: 'yyyy-MM-dd HH:mm:ss'}} - {{data.payTime | date: 'yyyy-MM-dd HH:mm:ss'}} - {{data.cancelTime | date: 'yyyy-MM-dd HH:mm:ss'}} - {{data.orderStatus}} - - 订单详情 - - - - -
    - - - - - 退款理由 - - - - - - - - - {{orderDetail['highChildOrderList'][0]['goodsName']}} - {{orderDetail['payType'] | paytype}} - {{orderDetail['payPrice']}} - {{orderDetail['memName']}} - {{orderDetail['memPhone']}} - {{orderDetail['orderNo']}} - {{orderDetail['createTime'] | date: 'yyyy-MM-dd HH:mm:ss'}} - {{orderDetail['payTime'] | date: 'yyyy-MM-dd HH:mm:ss'}} - {{orderDetail['orderStatus'] | orderCouponStatus}} - {{postData['address']}} - {{postData['user']}} - {{postData['phone']}} - - - diff --git a/src/app/admin/order/order-list/order-list.component.scss b/src/app/admin/order/order-list/order-list.component.scss deleted file mode 100644 index 8bee3fb..0000000 --- a/src/app/admin/order/order-list/order-list.component.scss +++ /dev/null @@ -1,4 +0,0 @@ -.head_img { - height: 60px; - width: 60px; -} diff --git a/src/app/admin/order/order-list/order-list.component.ts b/src/app/admin/order/order-list/order-list.component.ts deleted file mode 100644 index 95756da..0000000 --- a/src/app/admin/order/order-list/order-list.component.ts +++ /dev/null @@ -1,210 +0,0 @@ -import { Component, OnInit } from '@angular/core'; -import {environment} from '../../../../environments/environment'; -import {FormBuilder, FormGroup} from '@angular/forms'; -import {MerchantService} from '../../../services/merchant.service'; -import {IconService} from '../../../services/icon.service'; -import {NzMessageService} from 'ng-zorro-antd'; -import {Router} from '@angular/router'; -import {CommonsService} from '../../../services/commons.service'; -import {OrderService} from '../../../services/order.service'; -import {CompanyService} from '../../../services/company.service'; -import {ADMIN_INFO_OBJECT} from '../../../services/local-storage.namespace'; -import {LocalStorageService} from '../../../services/local-storage.service'; - -@Component({ - selector: 'app-order-list', - templateUrl: './order-list.component.html', - styleUrls: ['./order-list.component.scss'] -}) -export class OrderListComponent implements OnInit { - - WEB_SERVE_URL = environment.baseUrl; - FILE_URL = environment.imageUrl; - searchForm: FormGroup; // 搜索框 - requestData = []; // 列表数据 - companyData = []; // 列表数据 - merchantData = []; // 列表数据 - total: number; // 页码 - pageNum = 1; // 页码 - pageSize = 10; // 条码 - loading = true; - id: number; // 订单ID - isVisible = false; - refundContent: string; - isVisibleDetail = false; - roleType: number; - orderDetail: any = { - highChildOrderList: [{ - goodsName: '' - }] - }; - postData: any = { - address: '', - }; - constructor( - private form: FormBuilder, - private order: OrderService, - private iconService: IconService, - private message: NzMessageService, - private router: Router, - private company: CompanyService, - private merchant: MerchantService, - private store: LocalStorageService, // 数据请求 - private common: CommonsService - ) { - } - - ngOnInit(): void { - this.init(); - this.roleType = this.store.get(ADMIN_INFO_OBJECT)['secRole']['roleType']; - const whereObject = {}; - whereObject['pageNum'] = 1; - whereObject['pageSize'] = 10000; - this.company.selectCompanyList(whereObject, data => { - if (data['return_code'] === '000000') { - this.companyData = data['return_data'].list; - } else { - this.message.error(data['return_msg']); - } - }); - if (this.roleType === 5) { - this.getMerchantListByCompany(this.store.get(ADMIN_INFO_OBJECT)['bsCompany']['id']); - } else { - this.getMerchantListByCompany(this.searchForm.value.companyId); - } - - } - - public init(): void { - this.searchForm = this.form.group({ - companyId: [null], - merchantId: [null], - orderNo: [null], - paySerialNo: [null], - payModel: [null], - payType: [null], - memDiscountName: [null], - memPhone: [null], - orderStatus: [null], - payTime: [null] - }); - this.getRequest(true, this.searchForm.value); - } - - // 查询列表 - public getRequest(reset: boolean = false, whereObject: object) { - - if (whereObject['payTime'] != null && whereObject['payTime'].length !== 0) { - whereObject['payTimeS'] = whereObject['payTime'][0].getTime(); - whereObject['payTimeE'] = whereObject['payTime'][1].getTime(); - } - - - this.loading = false; - if (reset) { - this.pageNum = 1; - } - whereObject['pageNum'] = this.pageNum; - whereObject['pageSize'] = this.pageSize; - this.order.getGoodsOrderList(whereObject, data => { - if (data['return_code'] === '000000') { - this.requestData = data['return_data'].list; - this.total = data['return_data'].total; - } else { - this.message.error(data['return_msg']); - } - }); - } - - // 查询商户 - public getMerchantListByCompany(companyId: number): void { - this.merchant.getMerchantListByCompany(companyId, data => { - if (data['return_code'] === '000000') { - if (data['return_code'] === '000000') { - this.merchantData = data['return_data']; - } else { - this.message.error(data['return_msg']); - } - } else { - this.message.error(data['return_msg']); - } - }); - } - - // 重置 - public resetForm(): void { - this.searchForm.reset(); - } - - - // 查看详情 - public getDetail(id: number): void { - this.isVisibleDetail = true; - this.order.getOrderById(id , data => { - if (data['return_code'] === '000000') { - console.log(data); - this.orderDetail = data['return_data']; - if (this.orderDetail['remarks'] != null) { - this.postData = JSON.parse(this.orderDetail['remarks']); - console.log(this.postData['address']); - - } - } else { - this.message.error(data['return_msg']); - } - }); - } - - // 下载模板 - downloadTemplate(whereObject) { - if (whereObject['payTime'] != null && whereObject['payTime'].length !== 0) { - whereObject['payTimeS'] = whereObject['payTime'][0].getTime(); - whereObject['payTimeE'] = whereObject['payTime'][1].getTime(); - } - this.order.exportGoodsOrderList(whereObject, data => { - if (data['return_code'] === '000000') { - window.location.href = this.FILE_URL + data['return_data']; - } else { - this.message.error(data['return_msg']); - } - }); - } - - provinceChange(e) { - console.log(e); - } - - // 退款 - public orderToRefund(id): void { - - } - - showModal(id): void { - this.id = id; - this.isVisible = true; - } - - handleOk(): void { - this.common.showConfirm('确认订单是否退款', item => { - if (item) { - const params = { - orderId: this.id , - refundContent: this.refundContent - }; - this.order.refuelingOrderRefund(params, data => { - if (data['return_code'] === '000000') { - this.getRequest(false, this.searchForm.value); - this.isVisible = false; - this.message.success('退款成功'); - } else { - this.message.error(data['return_msg']); - } - }); - } - }); - } - - handleCancel(): void { - this.isVisible = false; - } -} diff --git a/src/app/admin/order/order-routing.module.ts b/src/app/admin/order/order-routing.module.ts deleted file mode 100644 index 104b216..0000000 --- a/src/app/admin/order/order-routing.module.ts +++ /dev/null @@ -1,43 +0,0 @@ -import { NgModule } from '@angular/core'; -import { Routes, RouterModule } from '@angular/router'; -import {OrderListComponent} from './order-list/order-list.component'; -import {OrderDetailComponent} from './order-detail/order-detail.component'; -import {OrderCouponsComponent} from './order-coupons/order-coupons.component'; -import {OrderCouponComponent} from './order-coupon/order-coupon.component'; -import {OrderTListComponent} from './order-Tlist/order-Tlist.component'; -import {OrderCListComponent} from './order-c-list/order-c-list.component'; -import {OrderKListComponent} from './order-k-list/order-k-list.component'; -import {OrderHListComponent} from './order-h-list/order-h-list.component'; -import {OrderAgentComponent} from './order-agent/order-agent.component'; -import {PreOrderComponent} from './pre-order/pre-order.component'; -import {PackageRecordListComponent} from './package-record-list/package-record-list.component'; -import {DiscountUseConditionListComponent} from './discount-use-condition-list/discount-use-condition-list.component'; -import {DicountPackageOrderListComponent} from './dicount-package-order-list/dicount-package-order-list.component'; -import {OilStationOrderComponent} from './oil-station-order/oil-station-order.component'; -import {OrderCouponListComponent} from './order-coupon-list/order-coupon-list.component'; - - -const routes: Routes = [ - { path: 'order-list', component: OrderListComponent }, - { path: 'order-t-list', component: OrderTListComponent }, - { path: 'order-detail', component: OrderDetailComponent }, - { path: 'order-coupons', component: OrderCouponsComponent }, - { path: 'order-coupon', component: OrderCouponComponent }, - { path: 'order-coupon-list', component: OrderCouponListComponent }, - { path: 'order-c-list', component: OrderCListComponent }, - { path: 'order-k-list', component: OrderKListComponent }, - { path: 'order-h-list', component: OrderHListComponent }, - { path: 'order-agent', component: OrderAgentComponent }, - { path: 'pre-order', component: PreOrderComponent }, - { path: 'package-record-list', component: PackageRecordListComponent }, - { path: 'discount-use-condition-list', component: DiscountUseConditionListComponent }, - { path: 'discount-package-order-list', component: DicountPackageOrderListComponent}, - { path: 'oil_station_order', component: OilStationOrderComponent}, -]; - -@NgModule({ - imports: [RouterModule.forChild(routes)], - exports: [RouterModule] -}) -export class OrderRoutingModule { } - diff --git a/src/app/admin/order/order.module.ts b/src/app/admin/order/order.module.ts deleted file mode 100644 index f018e2a..0000000 --- a/src/app/admin/order/order.module.ts +++ /dev/null @@ -1,43 +0,0 @@ -import { NgModule } from '@angular/core'; -import { CommonModule } from '@angular/common'; - -import { OrderRoutingModule } from './order-routing.module'; -import { OrderListComponent } from './order-list/order-list.component'; -import {NgZorroAntdModule} from 'ng-zorro-antd'; -import {SeparateModule} from '../../common/separate/separate.module'; -import {FormsModule, ReactiveFormsModule} from '@angular/forms'; -import {BreadcrumbModule} from '../../common/breadcrumb/breadcrumb.module'; -import {RegionSelectorModule} from '../../common/region-selector/region-selector.module'; -import {AppCommonModule} from '../../app-common.module'; -import { OrderDetailComponent } from './order-detail/order-detail.component'; -import { OrderCouponsComponent } from './order-coupons/order-coupons.component'; -import { OrderCouponComponent } from './order-coupon/order-coupon.component'; -import {OrderTListComponent} from './order-Tlist/order-Tlist.component'; -import { OrderKListComponent } from './order-k-list/order-k-list.component'; -import {OrderCListComponent} from './order-c-list/order-c-list.component'; -import { OrderHListComponent } from './order-h-list/order-h-list.component'; -import { OrderAgentComponent } from './order-agent/order-agent.component'; -import { PreOrderComponent } from './pre-order/pre-order.component'; -import { PackageRecordListComponent } from './package-record-list/package-record-list.component'; -import { DiscountUseConditionListComponent } from './discount-use-condition-list/discount-use-condition-list.component'; -import {DicountPackageOrderListComponent} from "./dicount-package-order-list/dicount-package-order-list.component"; -import {NzSpaceModule} from "ng-zorro-antd/space"; -import { OilStationOrderComponent } from './oil-station-order/oil-station-order.component'; -import { OrderCouponListComponent } from './order-coupon-list/order-coupon-list.component'; - -@NgModule({ - declarations: [OrderListComponent, OrderDetailComponent, OrderCouponsComponent, OrderCouponComponent , OrderTListComponent, OrderKListComponent , OrderCListComponent, OrderHListComponent, OrderAgentComponent, PreOrderComponent, PackageRecordListComponent, DiscountUseConditionListComponent, DicountPackageOrderListComponent, OilStationOrderComponent, OrderCouponListComponent], - imports: [ - CommonModule, - OrderRoutingModule, - NgZorroAntdModule, - SeparateModule, - ReactiveFormsModule, - FormsModule, - BreadcrumbModule, - RegionSelectorModule, - AppCommonModule, - NzSpaceModule - ] -}) -export class OrderModule { } diff --git a/src/app/admin/order/package-record-list/package-record-list.component.html b/src/app/admin/order/package-record-list/package-record-list.component.html deleted file mode 100644 index d24f985..0000000 --- a/src/app/admin/order/package-record-list/package-record-list.component.html +++ /dev/null @@ -1,103 +0,0 @@ - - - - - -
    -
    -
    -
    - - 优惠券包名称 - - - - -
    -
    - - 类型 - - - - - - - -
    -
    - - 使用归属 - - - - - - -
    -
    - - 用户手机号码 - - - - -
    -
    - - 订单号 - - - - -
    - -
    - -
    -
    - - -
    -
    -
    -
    - - -
    - 共计 {{total}} 条数据 - - - - 编号 - 优惠券包标题 - 销售类型 - 销售价格 - 记录订单号 - 创建时间 - - - - - {{i+1}} - {{data.discountPackageTitle}} - {{data.salesType === 1 ? '售卖' : '赠送'}} - {{data.price === null ? '暂无': data.price}} - {{data.recordNo}} - {{data.createdTime | date: 'yyyy-MM-dd HH:mm'}} - - -
    - diff --git a/src/app/admin/order/package-record-list/package-record-list.component.scss b/src/app/admin/order/package-record-list/package-record-list.component.scss deleted file mode 100644 index e69de29..0000000 diff --git a/src/app/admin/order/package-record-list/package-record-list.component.ts b/src/app/admin/order/package-record-list/package-record-list.component.ts deleted file mode 100644 index 1a3ad7c..0000000 --- a/src/app/admin/order/package-record-list/package-record-list.component.ts +++ /dev/null @@ -1,80 +0,0 @@ -import { Component, OnInit } from '@angular/core'; -import {environment} from '../../../../environments/environment'; -import {FormBuilder, FormGroup} from '@angular/forms'; -import {CompanyService} from '../../../services/company.service'; -import {ActivateService} from '../../../services/activate.service'; -import {IconService} from '../../../services/icon.service'; -import {NzMessageService} from 'ng-zorro-antd'; -import {Router} from '@angular/router'; -import {CommonsService} from '../../../services/commons.service'; -import {DiscountPackageService} from '../../../services/discount-package.service'; - -@Component({ - selector: 'app-package-record-list', - templateUrl: './package-record-list.component.html', - styleUrls: ['./package-record-list.component.scss'] -}) -export class PackageRecordListComponent implements OnInit { - - searchForm: FormGroup; // 搜索框 - requestData = []; // 列表数据 - total: number; // 页码 - pageNum = 1; // 页码 - pageSize = 10; // 条码 - loading = true; - usingAttribution = []; // 列表数据 - constructor( - private form: FormBuilder, - private company: CompanyService, - private activate: ActivateService, - private iconService: IconService, - private message: NzMessageService, - private router: Router, - private discountPackage: DiscountPackageService, - private commonsService: CommonsService, - ) { - } - - ngOnInit(): void { - this.init(); - this.commonsService.getDictionary('USING_ATTRIBUTION ', data => { - this.usingAttribution = data['return_data']; - }); - } - - public init(): void { - this.searchForm = this.form.group({ - discountPackageTitle: [null], - salesType: [null], - usingAttribution: [null], - phone: [null], - recordNo: [null], - }); - this.getRequest(true, this.searchForm.value); - } - - // 查询列表 - public getRequest(reset: boolean = false, whereObject: object) { - - this.loading = false; - if (reset) { - this.pageNum = 1; - } - whereObject['pageNum'] = this.pageNum; - whereObject['pageSize'] = this.pageSize; - this.discountPackage.getDiscountPackageRecordList(whereObject, data => { - if (data['return_code'] === '000000') { - this.requestData = data['return_data'].list; - this.total = data['return_data'].total; - } else { - this.message.error(data['return_msg']); - } - }); - } - - // 重置 - public resetForm(): void { - this.searchForm.reset(); - } - -} diff --git a/src/app/app-common.module.ts b/src/app/app-common.module.ts index 4c35740..f0d7870 100644 --- a/src/app/app-common.module.ts +++ b/src/app/app-common.module.ts @@ -67,7 +67,7 @@ import { ProductTypePipe, OrderRefundOpuserTypePipe, OrderChildStatusPipe, - PayStatusPipe, CallbackStatusPipe, ProductConfigPipe, PayCouponStatusPipe + PayStatusPipe, CallbackStatusPipe, ProductConfigPipe, PayCouponStatusPipe, OrderOilChannelTypePipe } from './pipes'; import {MsgTypePipe} from './pipes/msg/msg-type.pipe'; @@ -139,6 +139,7 @@ const PIPES = [ IntegralProductPipe, ProductTypePipe, MsgTypePipe, + OrderOilChannelTypePipe, ]; diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index 838100b..ab052ff 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -57,11 +57,6 @@ const routes: Routes = [ loadChildren: () => import('./admin/audit/audit.module').then(m => m.AuditModule), canActivate: [InitGuardService] }, - { - path: 'order', - loadChildren: () => import('./admin/order/order.module').then(m => m.OrderModule), - canActivate: [InitGuardService] - }, { path: 'order-manage', loadChildren: () => import('./admin/order-manage/order-manage.module').then(m => m.OrderManageModule), diff --git a/src/app/pipes/index.ts b/src/app/pipes/index.ts index c07a89f..031f19b 100644 --- a/src/app/pipes/index.ts +++ b/src/app/pipes/index.ts @@ -58,3 +58,4 @@ export * from './integral/integral-product.pipe'; export * from './index/product-config.pipe'; export * from './apiMerchant/callback-status.pipe'; export * from './order/pay-coupon-status.pipe'; +export * from './order/order-oil-channel-type.pipe'; diff --git a/src/app/pipes/order/order-oil-channel-type.pipe.ts b/src/app/pipes/order/order-oil-channel-type.pipe.ts new file mode 100644 index 0000000..29b0aed --- /dev/null +++ b/src/app/pipes/order/order-oil-channel-type.pipe.ts @@ -0,0 +1,23 @@ +import { Pipe, PipeTransform } from '@angular/core'; + +@Pipe({ + name: 'orderOilChannelType' +}) +export class OrderOilChannelTypePipe implements PipeTransform { + + transform(value: number): string { + switch (value) { + case 1: + return '自建站'; + case 2: + return '团油'; + case 3: + return '重庆壳牌'; + case 4: + return '金猪加油'; + case 5: + return '四川壳牌'; + } + } + +} diff --git a/src/app/pipes/order/order-pay-type.pipe.ts b/src/app/pipes/order/order-pay-type.pipe.ts index a105349..0b90a9d 100644 --- a/src/app/pipes/order/order-pay-type.pipe.ts +++ b/src/app/pipes/order/order-pay-type.pipe.ts @@ -20,7 +20,9 @@ export class OrderPayTypePipe implements PipeTransform { case 6: return '银联分期'; case 7: - return '嗨森逛油卡'; + return '个人油卡'; + case 8: + return '车队油卡'; } } diff --git a/src/environments/environment.ts b/src/environments/environment.ts index 496b4bd..a86a6f4 100644 --- a/src/environments/environment.ts +++ b/src/environments/environment.ts @@ -9,8 +9,8 @@ export const environment = { // baseUrl: 'https://hsgcs.dctpay.com/brest/', // 测试环境服务器地址(请求数据地址) // orderUrl: 'https://hsgcs.dctpay.com/order/', imageUrl: 'https://hsgcs.dctpay.com/filesystem/', - baseUrl: 'https://hsgcs.dctpay.com/brest/', // 测试环境服务器地址(请求数据地址) - orderUrl: 'https://hsgcs.dctpay.com/order/', // 测试环境服务器地址(请求数据地址) + baseUrl: 'http://localhost:9302/brest/', // 测试环境服务器地址(请求数据地址) + orderUrl: 'http://localhost:9304/order/', // 测试环境服务器地址(请求数据地址) // imageUrl: 'https://hsgcs.dctpay.com/filesystem/', key: 'https://hsgcs.dctpay.com/phone-recharge-H5/index.html?codeValue=', inviteUrl: 'https://hsgcs.dctpay.com/wx/?action=ic&id=',