From ff98e5da6d9bc65af46ed0f864a91eec2031ba4f Mon Sep 17 00:00:00 2001
From: youmengting <2080639302@qq.com>
Date: Thu, 25 Jan 2024 15:14:29 +0800
Subject: [PATCH 1/4] =?UTF-8?q?1=EF=BC=9A=E4=BF=AE=E6=94=B9bootstap/css?=
=?UTF-8?q?=E5=9C=A8=E7=BA=BF=E5=BC=95=E5=85=A5=E8=B7=AF=E5=8A=B2=202?=
=?UTF-8?q?=EF=BC=9A=E6=96=B0=E5=A2=9Eapi=E4=BA=A7=E5=93=81=E5=88=97?=
=?UTF-8?q?=E8=A1=A8=E4=B8=8B=E7=9A=84=E7=AE=80=E7=89=9B=E8=AF=9D=E8=B4=B9?=
=?UTF-8?q?=E5=88=97=E8=A1=A8?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../api-product/api-product-routing.module.ts | 2 +
.../admin/api-product/api-product.module.ts | 3 +-
.../jianniu-list/jianniu-list.component.html | 38 +++++++++++++++++
.../jianniu-list/jianniu-list.component.scss | 0
.../jianniu-list/jianniu-list.component.ts | 42 +++++++++++++++++++
src/app/admin/system/menu/menu.component.html | 2 +-
.../system-role-show.component.html | 2 +-
src/app/services/api-product.service.ts | 11 +++++
8 files changed, 97 insertions(+), 3 deletions(-)
create mode 100644 src/app/admin/api-product/jianniu-list/jianniu-list.component.html
create mode 100644 src/app/admin/api-product/jianniu-list/jianniu-list.component.scss
create mode 100644 src/app/admin/api-product/jianniu-list/jianniu-list.component.ts
diff --git a/src/app/admin/api-product/api-product-routing.module.ts b/src/app/admin/api-product/api-product-routing.module.ts
index 84c2e99..2337f8f 100644
--- a/src/app/admin/api-product/api-product-routing.module.ts
+++ b/src/app/admin/api-product/api-product-routing.module.ts
@@ -1,10 +1,12 @@
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
+import { JianniuListComponent } from './jianniu-list/jianniu-list.component';
import {ListComponent} from './list/list.component';
const routes: Routes = [
{ path: 'list', component: ListComponent },
+ {path: 'jianniu-list',component:JianniuListComponent}
];
@NgModule({
diff --git a/src/app/admin/api-product/api-product.module.ts b/src/app/admin/api-product/api-product.module.ts
index 23b7172..464af9a 100644
--- a/src/app/admin/api-product/api-product.module.ts
+++ b/src/app/admin/api-product/api-product.module.ts
@@ -3,6 +3,7 @@ import {CommonModule} from '@angular/common';
import {ApiProductRoutingModule} from './api-product-routing.module';
import {ListComponent} from './list/list.component';
+import { JianniuListComponent } from './jianniu-list/jianniu-list.component';
import {SeparateModule} from '../../common/separate/separate.module';
import {BreadcrumbModule} from '../../common/breadcrumb/breadcrumb.module';
import {RegionSelectorModule} from '../../common/region-selector/region-selector.module';
@@ -12,7 +13,7 @@ import {FormsModule, ReactiveFormsModule} from '@angular/forms';
@NgModule({
- declarations: [ListComponent],
+ declarations: [ListComponent,JianniuListComponent],
imports: [
CommonModule,
ApiProductRoutingModule,
diff --git a/src/app/admin/api-product/jianniu-list/jianniu-list.component.html b/src/app/admin/api-product/jianniu-list/jianniu-list.component.html
new file mode 100644
index 0000000..1ed0fd2
--- /dev/null
+++ b/src/app/admin/api-product/jianniu-list/jianniu-list.component.html
@@ -0,0 +1,38 @@
+
+
+
+
+
+ 共计 {{total}} 条数据
+
+
+
+ 编号 |
+ 产品ID |
+ 标题 |
+ 规格ID |
+ 面值 |
+ 成本价 |
+
+
+
+
+ {{i + 1}} |
+ {{data.goodsId}} |
+ {{data.title}} |
+ {{data.goodsOptionId}} |
+ {{data.officialPrice}}元 |
+ {{data.platPrice}}元 |
+
+
+
+
\ No newline at end of file
diff --git a/src/app/admin/api-product/jianniu-list/jianniu-list.component.scss b/src/app/admin/api-product/jianniu-list/jianniu-list.component.scss
new file mode 100644
index 0000000..e69de29
diff --git a/src/app/admin/api-product/jianniu-list/jianniu-list.component.ts b/src/app/admin/api-product/jianniu-list/jianniu-list.component.ts
new file mode 100644
index 0000000..52a1cca
--- /dev/null
+++ b/src/app/admin/api-product/jianniu-list/jianniu-list.component.ts
@@ -0,0 +1,42 @@
+import { Component, OnInit } from '@angular/core';
+import { ApiProductService } from '../../../services/api-product.service';
+import { NzMessageService } from 'ng-zorro-antd';
+
+
+@Component({
+ selector: 'app-jianniu-list',
+ templateUrl: './jianniu-list.component.html',
+ styleUrls: ['./jianniu-list.component.scss']
+})
+export class JianniuListComponent implements OnInit {
+
+ total: number; // 总计
+ loading = true;
+ requestData = []; // 列表数据
+ pageNum = 1; // 页码
+ pageSize = 10; // 条码
+
+ constructor(
+ private apiProduct: ApiProductService,
+ private message: NzMessageService,
+ ) { }
+
+ ngOnInit() {
+ this.getRequest();
+ }
+
+
+ // 查询列表
+ public getRequest() {
+ this.apiProduct.jNiuGoodsList( data => {
+ this.loading = false;
+ if (data['return_code'] === '000000') {
+ this.requestData = data['return_data'];
+ this.total = data['return_data'].length;
+ } else {
+ this.message.error(data['return_msg']);
+ }
+ });
+ }
+
+}
diff --git a/src/app/admin/system/menu/menu.component.html b/src/app/admin/system/menu/menu.component.html
index 56259bf..b5671c9 100644
--- a/src/app/admin/system/menu/menu.component.html
+++ b/src/app/admin/system/menu/menu.component.html
@@ -1,4 +1,4 @@
-
+
diff --git a/src/app/admin/system/system-role-show/system-role-show.component.html b/src/app/admin/system/system-role-show/system-role-show.component.html
index 6b10dbd..50ef74b 100644
--- a/src/app/admin/system/system-role-show/system-role-show.component.html
+++ b/src/app/admin/system/system-role-show/system-role-show.component.html
@@ -1,4 +1,4 @@
-
+
diff --git a/src/app/services/api-product.service.ts b/src/app/services/api-product.service.ts
index 0698320..3693c20 100644
--- a/src/app/services/api-product.service.ts
+++ b/src/app/services/api-product.service.ts
@@ -303,4 +303,15 @@ export class ApiProductService {
});
}
+ /**
+ * @description: 查询简牛话费列表
+ * @param {*} callBack
+ * @return {*}
+ */
+ public jNiuGoodsList( callBack) {
+ this.http.get(environment.baseUrl + 'apiProduct/jNiuGoodsList').subscribe(data => {
+ callBack(data);
+ });
+ }
+
}
From 791f6b21e6fc318f153a3d85a1dc56eeecdbed8c Mon Sep 17 00:00:00 2001
From: youmengting <2080639302@qq.com>
Date: Mon, 29 Jan 2024 15:32:11 +0800
Subject: [PATCH 2/4] =?UTF-8?q?=E5=8D=A1=E5=88=B8=E7=AE=A1=E7=90=86?=
=?UTF-8?q?=EF=BC=9A=E4=B8=AD=E7=9F=B3=E6=B2=B9=E5=8D=A1=E5=88=B8=E5=88=97?=
=?UTF-8?q?=E8=A1=A8=E8=A1=A8=E6=A0=BC=E5=B1=95=E7=A4=BA=E6=96=B0=E5=A2=9E?=
=?UTF-8?q?=E5=BA=93=E5=AD=98=EF=BC=9Aqty?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/app/admin/coupon/printer-list/printer-list.component.html | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/app/admin/coupon/printer-list/printer-list.component.html b/src/app/admin/coupon/printer-list/printer-list.component.html
index 839d364..bcc8a0d 100644
--- a/src/app/admin/coupon/printer-list/printer-list.component.html
+++ b/src/app/admin/coupon/printer-list/printer-list.component.html
@@ -36,6 +36,7 @@
编码 |
名称 |
面额 |
+ 库存 |
类型 |
有效天数 |
@@ -45,6 +46,7 @@
{{ data.alias }} |
{{ data.title }} |
{{ data.faceValue }} |
+ {{ data.qty}} |
{{ data.bizType | scPrinter}} |
{{ data.validDate}} |
From 7c6b39417d1abe44bac79d4c5456f21f4329fe3f Mon Sep 17 00:00:00 2001
From: hurui <177768073@qq.com>
Date: Mon, 29 Jan 2024 16:24:17 +0800
Subject: [PATCH 3/4] =?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
---
.../order-manage-routing.module.ts | 2 +
.../admin/order-manage/order-manage.module.ts | 3 +-
.../order-oil-card.component.html | 332 ++++++++++++
.../order-oil-card.component.scss | 12 +
.../order-oil-card.component.spec.ts | 25 +
.../order-oil-card.component.ts | 473 ++++++++++++++++++
.../order/order-child-goods-type.pipe.ts | 17 +-
src/app/services/order.service.ts | 22 +
8 files changed, 883 insertions(+), 3 deletions(-)
create mode 100644 src/app/admin/order-manage/order-oil-card/order-oil-card.component.html
create mode 100644 src/app/admin/order-manage/order-oil-card/order-oil-card.component.scss
create mode 100644 src/app/admin/order-manage/order-oil-card/order-oil-card.component.spec.ts
create mode 100644 src/app/admin/order-manage/order-oil-card/order-oil-card.component.ts
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 75eede6..702645e 100644
--- a/src/app/admin/order-manage/order-manage-routing.module.ts
+++ b/src/app/admin/order-manage/order-manage-routing.module.ts
@@ -14,6 +14,7 @@ import {MobileRechargeOrderListComponent} from './mobile-recharge-order-list/mob
import {HltChargeOrderComponent} from './hlt-charge-order/hlt-charge-order.component';
import {GoodsOrderComponent} from './goods-order/goods-order.component';
import {GoodsChildOrderComponent} from './goods-child-order/goods-child-order.component';
+import {OrderOilCardComponent} from './order-oil-card/order-oil-card.component';
const routes: Routes = [
@@ -31,6 +32,7 @@ const routes: Routes = [
{ path: 'hlt-order-list', component: HltChargeOrderComponent},
{ path: 'goods-order', component: GoodsOrderComponent},
{ path: 'goods-child-order', component: GoodsChildOrderComponent},
+ { path: 'order-oil-card', component: OrderOilCardComponent},
];
@NgModule({
diff --git a/src/app/admin/order-manage/order-manage.module.ts b/src/app/admin/order-manage/order-manage.module.ts
index f22e652..08ca75d 100644
--- a/src/app/admin/order-manage/order-manage.module.ts
+++ b/src/app/admin/order-manage/order-manage.module.ts
@@ -24,9 +24,10 @@ import { HltChargeOrderComponent } from './hlt-charge-order/hlt-charge-order.com
import { GoodsOrderComponent } from './goods-order/goods-order.component';
import {PreviewImageModule} from "../../common/preview-image/preview-image.module";
import { GoodsChildOrderComponent } from './goods-child-order/goods-child-order.component';
+import { OrderOilCardComponent } from './order-oil-card/order-oil-card.component';
@NgModule({
- declarations: [OrderOilListComponent, OrderCouponListComponent, OrderIntegralRechargeComponent, OrderRefundListComponent, KfcOrderListComponent, StarbucksOrderListComponent, MemberChargeOrderListComponent, MobileRechargeOrderListComponent, PreOrderComponent,DicountPackageOrderListComponent, MemberChargeOrderListComponent, DiscountUseConditionListComponent, HltChargeOrderComponent, GoodsOrderComponent, GoodsChildOrderComponent],
+ declarations: [OrderOilListComponent, OrderCouponListComponent, OrderIntegralRechargeComponent, OrderRefundListComponent, KfcOrderListComponent, StarbucksOrderListComponent, MemberChargeOrderListComponent, MobileRechargeOrderListComponent, PreOrderComponent,DicountPackageOrderListComponent, MemberChargeOrderListComponent, DiscountUseConditionListComponent, HltChargeOrderComponent, GoodsOrderComponent, GoodsChildOrderComponent, OrderOilCardComponent],
imports: [
CommonModule,
OrderManageRoutingModule,
diff --git a/src/app/admin/order-manage/order-oil-card/order-oil-card.component.html b/src/app/admin/order-manage/order-oil-card/order-oil-card.component.html
new file mode 100644
index 0000000..faf55c1
--- /dev/null
+++ b/src/app/admin/order-manage/order-oil-card/order-oil-card.component.html
@@ -0,0 +1,332 @@
+
+
+
+
+
+
+
+
+
+
+
共计 {{dataObject.total?dataObject.total:0}} 条数据
+
+
+
+
+
+
+
+
+ 交易单号 |
+ 客户电话 |
+ 油卡卡号 |
+ 充值金额 |
+ 赠送金额 |
+ 实际到账金额 |
+ 支付金额 |
+ 创建时间 |
+ 支付时间 |
+ 退款时间 |
+ 交易状态 |
+ 操作 |
+
+
+
+
+ {{data.orderNo}} |
+ {{data.memPhone}} |
+ {{data.oildCard}} |
+ {{data.goodsActualPrice}} |
+ {{data.givePrice}} |
+ {{data.goodsPrice}} |
+ {{data.payRealPrice!=null?data.payRealPrice:'未支付'}} |
+ {{data.createTime | 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.orderStatus}} |
+
+ 操作列表
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+ {{orderDetailObject.orderNo}}
+ {{orderDetailObject.paySerialNo!=null?orderDetailObject.paySerialNo:'无'}}
+ {{orderDetailObject.memPhone}}
+ {{orderDetailObject.orderStatus | orderStatus}}
+ {{orderDetailObject.payType | orderPayType}}
+
+ {{orderDetailObject.memDiscountName?orderDetailObject.memDiscountName:'无'}}
+ {{orderDetailObject.whetherRebate?'是':'否'}}
+ {{orderDetailObject.remarks}}
+
+
+
+
+ {{orderDetailObject.totalPrice}} 元
+
+ 总优惠: {{orderDetailObject.totalDeductionPrice}} 元
+ 加油优惠: {{orderDetailObject.deductionProductPrice}} 元
+ 优惠券优惠: {{orderDetailObject.deductionCouponPrice}} 元
+
+ {{orderDetailObject.payablePrice}} 元
+ {{orderDetailObject.payGold / 100}} 元
+
+ {{orderDetailObject.payRealPrice!=null?orderDetailObject.payRealPrice+' 元':'未支付'}}
+
+
+
+
+
+
+
+ 创建时间:{{orderDetailObject.createTime | date : 'yyyy-MM-dd HH:mm:ss'}}
+ 取消时间:{{orderDetailObject.cancelTime | date : 'yyyy-MM-dd HH:mm:ss'}}
+ 支付时间:{{orderDetailObject.payTime | date : 'yyyy-MM-dd HH:mm:ss'}}
+ 完成时间:{{orderDetailObject.finishTime | date : 'yyyy-MM-dd HH:mm:ss'}}
+ 退款时间:{{orderDetailObject.refundTime | date : 'yyyy-MM-dd HH:mm:ss'}}
+
+
+
+
+
+
+
+ 订单编号 |
+ 产品类型 |
+ 产品名称 |
+ 产品规格 |
+ 数量 |
+ 单价 |
+ 总价 |
+ 订单状态 |
+
+
+
+
+ {{ data.childOrderNo}} |
+ {{ data.goodsType | orderChildGoodsType}} |
+
+ {{ data.goodsName }}
+ 赠品
+ |
+ {{ data.goodsSpecName }} |
+ {{ data.saleCount }} |
+ {{ data.goodsActualPrice }} 元 |
+ {{ data.totalActualPrice }} 元 |
+ {{ data.childOrderStatus | orderChildStatus}} |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 交易单号 |
+ 产品单号 |
+ 客户电话 |
+ 产品类型 |
+ 产品名称 |
+ 退款单号 |
+ 退款数量 |
+ 退款总额 |
+ 退回金额 |
+ 退回积分 |
+ 退款状态 |
+ 创建时间 |
+ 退款时间 |
+ 退款备注 |
+
+
+
+
+ {{data.orderNo}} |
+ {{data.orderChildNo}} |
+ {{data.memPhone}} |
+ {{data.goodsType | orderChildGoodsType}} |
+ {{data.goodsName}} |
+ {{data.refundOrderNo}} |
+ {{data.refundGoodsNum}} |
+ ¥{{data.returnTotalPrice}} |
+ ¥{{data.refundPrice}} |
+ {{data.refundIntegral}} |
+ {{data.refundStatus | orderRefundStatus}} |
+ {{data.createTime | date : 'yyyy-MM-dd HH:mm:ss'}} |
+ {{data.refundTime | date : 'yyyy-MM-dd HH:mm:ss'}} |
+ {{data.refundRemark}} |
+
+
+
+
+
diff --git a/src/app/admin/order-manage/order-oil-card/order-oil-card.component.scss b/src/app/admin/order-manage/order-oil-card/order-oil-card.component.scss
new file mode 100644
index 0000000..2d627c6
--- /dev/null
+++ b/src/app/admin/order-manage/order-oil-card/order-oil-card.component.scss
@@ -0,0 +1,12 @@
+.collapse {
+ margin-left: 15px;
+}
+nz-range-picker {
+ width: 100%;
+}
+::ng-deep .order-oil-tab .ant-descriptions-item-label {
+ width: 150px;
+}
+::ng-deep .order-oil-tab .ant-descriptions-item-content {
+ width: 200px;
+}
diff --git a/src/app/admin/order-manage/order-oil-card/order-oil-card.component.spec.ts b/src/app/admin/order-manage/order-oil-card/order-oil-card.component.spec.ts
new file mode 100644
index 0000000..c4a8dd5
--- /dev/null
+++ b/src/app/admin/order-manage/order-oil-card/order-oil-card.component.spec.ts
@@ -0,0 +1,25 @@
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { OrderOilCardComponent } from './order-oil-card.component';
+
+describe('OrderOilCardComponent', () => {
+ let component: OrderOilCardComponent;
+ let fixture: ComponentFixture;
+
+ beforeEach(async(() => {
+ TestBed.configureTestingModule({
+ declarations: [ OrderOilCardComponent ]
+ })
+ .compileComponents();
+ }));
+
+ beforeEach(() => {
+ fixture = TestBed.createComponent(OrderOilCardComponent);
+ component = fixture.componentInstance;
+ fixture.detectChanges();
+ });
+
+ it('should create', () => {
+ expect(component).toBeTruthy();
+ });
+});
diff --git a/src/app/admin/order-manage/order-oil-card/order-oil-card.component.ts b/src/app/admin/order-manage/order-oil-card/order-oil-card.component.ts
new file mode 100644
index 0000000..824bd03
--- /dev/null
+++ b/src/app/admin/order-manage/order-oil-card/order-oil-card.component.ts
@@ -0,0 +1,473 @@
+import { Component, OnInit } from '@angular/core';
+import {environment} from '../../../../environments/environment';
+import {FormBuilder, FormGroup, Validators} from '@angular/forms';
+import {NzMessageService, NzModalService} from 'ng-zorro-antd';
+import {CommonsService} from '../../../services/commons.service';
+import {CompanyService} from '../../../services/company.service';
+import {MerchantService} from '../../../services/merchant.service';
+import {LocalStorageService} from '../../../services/local-storage.service';
+import {OrderManageService} from '../../../services/order/order-manage.service';
+import {OrderService} from '../../../services/order.service';
+import {OrganizationService} from '../../../services/organization.service';
+import {ActivatedRoute} from '@angular/router';
+import {ADMIN_INFO_OBJECT} from '../../../services/local-storage.namespace';
+
+@Component({
+ selector: 'app-order-oil-card',
+ templateUrl: './order-oil-card.component.html',
+ styleUrls: ['./order-oil-card.component.scss']
+})
+export class OrderOilCardComponent implements OnInit {
+ FILE_URL = environment.imageUrl;
+ roleType;
+ adminFlag;
+
+ loadingObject = {
+ title: "加载中...",
+ status: false,
+ };
+ dataObject: any = {};
+ tableLoading = true;
+ searchForm: FormGroup;
+ pageNum = 1;
+ pageSize = 10;
+ whereObject: any = {};
+ isCollapse = false;
+
+ refundModal = false;
+ refundForm: FormGroup;
+ refundRefundRecordArray = [];
+
+ refundRecordModal = false;
+
+ orderDetailModal = false;
+ orderDetailModalLoading = false;
+ orderDetailObject: any = {}
+ orderStatusArray = [];
+ companyArray = [];
+ merArray = [];
+ payTypeArray = [];
+ orgIdArray = [];
+
+ cardNo: string;
+ phone: string;
+ carLicensePlate: string;
+
+ // 退款按钮权限
+ REFUND_OIL_BTN = false;
+
+ printDataObject = {
+ orderNo: null,
+ printData: null
+ };
+ printModal = false;
+
+ constructor(private modal: NzModalService,
+ private message: NzMessageService,
+ private commonsService: CommonsService,
+ private companyService: CompanyService,
+ private merchantService: MerchantService,
+ private store: LocalStorageService,
+ private orderManageService: OrderManageService,
+ private orderService: OrderService,
+ 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 {
+ let currentDate = new Date();
+ currentDate.setHours(0);
+ currentDate.setMinutes(0);
+ currentDate.setSeconds(0);
+ let createTimeS = currentDate.getTime();
+
+ currentDate.setHours(23);
+ currentDate.setMinutes(59);
+ currentDate.setSeconds(59);
+ let createTimeE = currentDate.getTime();
+ this.whereObject = { createTimeS: createTimeS, createTimeE: createTimeE};
+
+ this.commonsService.getDictionary("ORDER_STATUS", data => {
+ this.orderStatusArray = data['return_data'];
+ });
+
+ this.REFUND_OIL_BTN = this.commonsService.isBtnCompetence("BTN_REFUND_OIL_BTN");
+ this.refundForm = this.form.group({
+ orderNo: [{ value: null, disabled: true}, [Validators.required]],
+ remarks: [null],
+ });
+
+ this.searchForm = this.form.group({
+ orderNo: [null],
+ memPhone: [null],
+ oilCardNo: [null],
+ payType: [null],
+ status: [null],
+ createTime: [[createTimeS,createTimeE]],
+ createTimeS: [null],
+ createTimeE: [null],
+ payTime: [null],
+ payTimeS: [null],
+ payTimeE: [null],
+ refundTime: [null],
+ refundTimeS: [null],
+ refundTimeE: [null],
+ });
+ this.requestOrderData(1);
+ }
+
+ /**
+ * 请求订单数据
+ */
+ requestOrderData(pageNum: number) {
+ this.tableLoading = true;
+ if (this.cardNo != null) {
+ this.whereObject['memCardNo'] = this.cardNo;
+ }
+ if (this.phone != null) {
+ this.whereObject['memPhone'] = this.phone;
+ }
+ this.whereObject['pageNum'] = pageNum;
+ this.whereObject['pageSize'] = this.pageSize;
+ this.orderService.getOilCardOrderList(this.whereObject, data => {
+ if (data['return_code'] === '000000') {
+ this.dataObject = data['return_data'];
+ for (let data of this.dataObject['list']) {
+ if (data['exceptionStatus'] == true) {
+ data['color'] = 'red';
+ }
+ }
+ } else {
+ this.modal.error(data['return_msg']);
+ }
+ this.tableLoading = false;
+ });
+ }
+
+ /**
+ * 搜索
+ * @param whereObject 条件
+ */
+ search(whereObject: object) {
+ if (whereObject['createTime'] != null && whereObject['createTime'].length > 0) {
+ whereObject['createTimeS'] = new Date(whereObject['createTime'][0]).getTime();
+ whereObject['createTimeE'] = new Date(whereObject['createTime'][1]).getTime();
+ } else {
+ whereObject['createTimeS'] = null;
+ whereObject['createTimeE'] = null;
+ }
+
+ if (whereObject['payTime'] != null && whereObject['payTime'].length > 0) {
+ whereObject['payTimeS'] = new Date(whereObject['payTime'][0]).getTime();
+ whereObject['payTimeE'] = new Date(whereObject['payTime'][1]).getTime();
+ } else {
+ whereObject['payTimeS'] = null;
+ whereObject['payTimeE'] = null;
+ }
+
+ if (whereObject['refundTime'] != null && whereObject['refundTime'].length > 0) {
+ whereObject['refundTimeS'] = new Date(whereObject['refundTime'][0]).getTime();
+ whereObject['refundTimeE'] = new Date(whereObject['refundTime'][1]).getTime();
+ } else {
+ whereObject['refundTimeS'] = null;
+ whereObject['refundTimeE'] = null;
+ }
+ this.whereObject = whereObject;
+ this.requestOrderData(1);
+ }
+
+ /**
+ * 分页
+ * @param pageSize
+ */
+ pageSizeChang(pageSize: number) {
+ this.pageSize = pageSize;
+ this.requestOrderData(1)
+ }
+
+ /**
+ * 重置
+ */
+ resetSearchForm(): void {
+ this.searchForm.reset();
+ }
+
+ /**
+ * 搜索条件折叠
+ */
+ toggleCollapse(): void {
+ this.isCollapse = !this.isCollapse;
+ }
+
+ /**
+ * 导出订单
+ */
+ excelOrder() {
+ this.loadingObject.status = true;
+ this.loadingObject.title = '数据导出中...';
+
+ this.orderService.exportOilCardOrder(this.whereObject, data => {
+ if (data['return_code'] === '000000') {
+ window.location.href = this.FILE_URL + 'temporary/' + data['return_data'];
+ } else {
+ this.modal.error({
+ nzTitle: '提示',
+ nzContent: data['return_msg']
+ });
+ }
+ this.loadingObject.status = false;
+ });
+ }
+
+ /**
+ * 打开订单详情
+ */
+ showOrderDetail(orderNo: string) {
+ this.orderDetailModal = true;
+ this.orderDetailModalLoading = true;
+
+ this.orderManageService.getDetailByOrderNo(orderNo, data => {
+ if (data['return_code'] === '000000') {
+ this.orderDetailObject = data['return_data'];
+ } else {
+ this.modal.error({
+ nzTitle: '提示',
+ nzContent: data['return_msg']
+ });
+ }
+ this.orderDetailModalLoading = false;
+ });
+ }
+
+ /**
+ * 关闭订单详情
+ */
+ closeOrderDetail() {
+ this.orderDetailModal = false;
+ }
+
+ /**
+ * 打开退款模态框
+ * @param orderNo
+ */
+ showRefund(orderNo: string) {
+ this.refundForm.patchValue({ orderNo: orderNo})
+ this.refundModal = true;
+ }
+
+ /**
+ * 提交退款确认框
+ */
+ submitRefundConfirm() {
+ for (const i in this.refundForm.controls) {
+ this.refundForm.controls[i].markAsDirty();
+ this.refundForm.controls[i].updateValueAndValidity();
+ }
+ if (this.refundForm.status == null || this.refundForm.status !== 'VALID') {
+ this.modal.warning({
+ nzTitle: '提示',
+ nzContent: '请填写所有必填项',
+ });
+ return;
+ }
+ this.modal.confirm({
+ nzTitle: '提示',
+ nzContent: '确定对交易订号('+this.refundForm.controls.orderNo.value+')进行退款吗?',
+ nzOnOk: () => this.submitRefund()
+ });
+ }
+
+ /**
+ * 提交退款
+ * @param orderNo
+ */
+ submitRefund() {
+ this.loadingObject.status = true;
+ this.loadingObject.title = '处理中...';
+ this.orderManageService.refundOrder(this.refundForm.controls.orderNo.value,this.refundForm.controls.remarks.value, data => {
+ if (data['return_code'] === '000000') {
+ this.modal.success({
+ nzTitle: '提示',
+ nzContent: '操作成功',
+ });
+ this.requestOrderData(this.whereObject.pageNum);
+ this.closeRefund();
+ } else {
+ this.modal.error({
+ nzTitle: '提示',
+ nzContent: data['return_msg'],
+ });
+ }
+ this.loadingObject.status = false;
+ });
+ this.refundModal = true;
+ }
+
+ /**
+ * 关闭退款模态框
+ * @param orderNo
+ */
+ closeRefund() {
+ this.refundModal = false;
+ }
+
+ /**
+ * 打开退款记录模态框
+ * @param orderNo
+ */
+ showRefundRecord(orderNo: string) {
+ this.orderManageService.getRefundList({orderNo: orderNo, pageNum:1, pageSize: 99}, data => {
+ if (data['return_code'] === '000000') {
+ this.refundRefundRecordArray = data['return_data']['list'];
+ } else {
+ this.modal.error(data['return_msg']);
+ }
+ });
+ this.refundRecordModal = true;
+ }
+
+ /**
+ * 关闭退款记录模态框
+ * @param orderNo
+ */
+ closeRefundRecord() {
+ this.refundRecordModal = false;
+ }
+
+
+ showPrintModal(orderNo: string, data: PrintData) {
+ this.printDataObject.orderNo = orderNo;
+ this.printDataObject.printData = data;
+ this.printModal = true;
+ }
+
+ cloudPrint() {
+ this.orderService.print(this.printDataObject.orderNo, 2, dataBack => {
+ if (dataBack['return_code'] === '000000') {
+ this.modal.success({
+ nzTitle: '提示',
+ nzContent: '操作成功',
+ });
+ }
+ });
+ }
+
+ showPrintDiv() {
+ const data = this.printDataObject.printData;
+ data['createTime'] = new Date(data['createTime']).toLocaleString();
+ this.printDiv(data);
+ }
+
+ printDiv(data: object) {
+ const headstr = '打印小票';
+ const footstr = '';
+ const newstr = '\n' +
+ '
\n' +
+ '
\n' +
+ ' ' + data['storeName'] + '\n' +
+ ' (客户存根)\n' +
+ '
\n' +
+ '
\n' +
+ ' \n' +
+ ' ------------------------------------------- |
\n' +
+ ' \n' +
+ ' 流水号:' + data['orderNo'] + ' | \n' +
+ '
\n' +
+ ' ------------------------------------------- |
\n' +
+ ' \n' +
+ ' 时间:' + data['createTime'] + ' | \n' +
+ '
\n' +
+ ' \n' +
+ ' 来源:嗨森逛 | \n' +
+ '
\n' +
+ ' \n' +
+ ' 油枪:' + data['gasGunNo'] + ' | \n' +
+ '
\n' +
+ ' \n' +
+ ' 油品:' + data['gasOilNo'] + ' | \n' +
+ '
\n' +
+ ' \n' +
+ ' 升数:' + data['gasOilLiters'] + '升 | \n' +
+ '
\n' +
+ ' \n' +
+ ' 实际加油升数以油站加油机为准! | \n' +
+ '
\n' +
+ ' ------------------------------------------- |
\n' +
+ ' 加油金额 |
\n' +
+ ' ¥' + data['gasRefuelPrice'] + '元 |
\n' +
+ ' ------------------------------------------- |
\n' +
+ ' 开心又省钱; 来”嗨森逛“ |
\n' +
+ ' \n' +
+ '
\n' +
+ '
\n' +
+ '
\n' +
+ '
\n' +
+ ' ' + data['storeName'] + '\n' +
+ ' (收银员存根)\n' +
+ '
\n' +
+ '
\n' +
+ ' \n' +
+ ' ------------------------------------------- |
\n' +
+ ' \n' +
+ ' 流水号:' + data['orderNo'] + ' | \n' +
+ '
\n' +
+ ' ------------------------------------------- |
\n' +
+ ' \n' +
+ ' 时间:' + data['createTime'] + ' | \n' +
+ '
\n' +
+ ' \n' +
+ ' 来源:嗨森逛 | \n' +
+ '
\n' +
+ ' \n' +
+ ' 油枪:' + data['gasGunNo'] + ' | \n' +
+ '
\n' +
+ ' \n' +
+ ' 油品:' + data['gasOilNo'] + ' | \n' +
+ '
\n' +
+ ' \n' +
+ ' 升数:' + data['gasOilLiters'] + '升 | \n' +
+ '
\n' +
+ ' \n' +
+ ' 实际加油升数以油站加油机为准! | \n' +
+ '
\n' +
+ ' ------------------------------------------- |
\n' +
+ ' 加油金额 |
\n' +
+ ' ¥' + data['gasRefuelPrice'] + '元 |
\n' +
+ ' ------------------------------------------- |
\n' +
+ ' 开心又省钱; 来”嗨森逛“ |
\n' +
+ ' \n' +
+ '
\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/pipes/order/order-child-goods-type.pipe.ts b/src/app/pipes/order/order-child-goods-type.pipe.ts
index 497db50..4c70ae3 100644
--- a/src/app/pipes/order/order-child-goods-type.pipe.ts
+++ b/src/app/pipes/order/order-child-goods-type.pipe.ts
@@ -27,8 +27,21 @@ export class OrderChildGoodsTypePipe implements PipeTransform {
return '星巴克';
case 10:
return '第三方充值';
- case 12:
- return '实物商品';
+ case 11:
+ return '实物商品购买';
+ case 12:
+ return '比邻星停车券';
+ case 13:
+ return '比邻星停车';
+ case 14:
+ return '升级会员';
+ case 15:
+ return '个人油卡充值';
+ case 17:
+ return '团购套餐';
+ case 18:
+ return '中石油卡券';
+
}
}
}
diff --git a/src/app/services/order.service.ts b/src/app/services/order.service.ts
index 97d1495..3318a5e 100644
--- a/src/app/services/order.service.ts
+++ b/src/app/services/order.service.ts
@@ -333,4 +333,26 @@ export class OrderService {
callBack(data);
});
}
+
+ /**
+ * 查询油卡充值订单
+ * @param params
+ * @param callBack
+ */
+ public getOilCardOrderList(params: object , callBack) {
+ this.http.get(environment.orderUrl + 'oilCard/getOilCardOrderList?' + this.common.getWhereCondition(params)).subscribe( data => {
+ callBack(data);
+ });
+ }
+
+ /**
+ * 导出油卡充值订单
+ * @param params
+ * @param callBack
+ */
+ public exportOilCardOrder(params: object , callBack) {
+ this.http.get(environment.orderUrl + 'oilCard/exportOilCardOrder?' + this.common.getWhereCondition(params)).subscribe( data => {
+ callBack(data);
+ });
+ }
}
From c06c05ca6582e41bb64526ba1e364cbb9748c05f Mon Sep 17 00:00:00 2001
From: youmengting <2080639302@qq.com>
Date: Mon, 8 Apr 2024 12:08:59 +0800
Subject: [PATCH 4/4] =?UTF-8?q?=E5=9B=9B=E5=B7=9D=E4=B8=AD=E7=9F=B3?=
=?UTF-8?q?=E6=B2=B9=E5=8D=A1=E5=88=B8=E5=88=97=E8=A1=A8=EF=BC=9A=E5=A2=9E?=
=?UTF-8?q?=E5=8A=A0=E6=90=9C=E7=B4=A2=E7=B1=BB=E5=9E=8B-=E4=B8=AD?=
=?UTF-8?q?=E6=B2=B9=E4=BC=98=E9=80=94=E5=8D=A1=E5=88=B8?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../printer-list/printer-list.component.html | 19 +++++++++----------
src/app/pipes/api-coupon/sc-printer.pipe.ts | 2 +-
2 files changed, 10 insertions(+), 11 deletions(-)
diff --git a/src/app/admin/coupon/printer-list/printer-list.component.html b/src/app/admin/coupon/printer-list/printer-list.component.html
index bcc8a0d..76956a6 100644
--- a/src/app/admin/coupon/printer-list/printer-list.component.html
+++ b/src/app/admin/coupon/printer-list/printer-list.component.html
@@ -13,6 +13,7 @@
+
@@ -32,14 +33,14 @@
共计 {{total}} 条数据
-
- 编码 |
- 名称 |
- 面额 |
- 库存 |
- 类型 |
- 有效天数 |
-
+
+ 编码 |
+ 名称 |
+ 面额 |
+ 库存 |
+ 类型 |
+ 有效天数 |
+
@@ -49,8 +50,6 @@
{{ data.qty}} |
{{ data.bizType | scPrinter}} |
{{ data.validDate}} |
-
-
diff --git a/src/app/pipes/api-coupon/sc-printer.pipe.ts b/src/app/pipes/api-coupon/sc-printer.pipe.ts
index bd45c31..a32b7a5 100644
--- a/src/app/pipes/api-coupon/sc-printer.pipe.ts
+++ b/src/app/pipes/api-coupon/sc-printer.pipe.ts
@@ -6,7 +6,7 @@ import { Pipe, PipeTransform } from '@angular/core';
export class ScPrinterPipe implements PipeTransform {
transform(value: number): unknown {
- switch (value) {
+ switch (Number(value)) {
case 4001:
return '油品券';
case 4002: