From ecfadda8987299c480de9f19485c2bef891c3eab Mon Sep 17 00:00:00 2001 From: Sum1Dream <418471657@qq.com> Date: Tue, 7 Feb 2023 10:21:07 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=90=86=E5=95=86?= =?UTF-8?q?=E8=AE=A2=E5=8D=95=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dicount-package-order-list.component.html | 396 ++++++++++-------- .../dicount-package-order-list.component.scss | 3 + .../dicount-package-order-list.component.ts | 286 ++++++------- .../price-list/price-list.component.html | 118 +++--- src/environments/environment.prod.ts | 1 + src/environments/environment.ts | 8 +- 6 files changed, 416 insertions(+), 396 deletions(-) diff --git a/src/app/admin/order-manage/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 index a95a9d6..4b54738 100644 --- a/src/app/admin/order-manage/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 @@ -2,181 +2,235 @@ - -
-
-
-
- - 区域公司 - - - - - - -
-
- - 商户 - - - - - - -
-
- - 订单号 - - - - -
-
- - 商品名称 - - - - -
-
- - 用户电话 - - - - -
-
- - 支付模式 - - - - - - - - -
-
- - 支付方式 - - - - - - - - - - -
-
- - 状态 - - - - - - - - - - - - -
-
- - 时间区间 - - - - -
-
+ + +
+
+ +
-
-
- - -
-
- -
+
+ + 交易单号 + + + + +
+ +
+ + 客户电话 + + + + +
+
+ + 交易状态 + + + + + + +
+
+ +
+
+ + 分公司 + + + + + + +
+ +
+ + 支付方式 + + + + + + + + + + + + +
+
+ + 支付卡号 + + + + +
+
+ + 支付时间 + + + + +
+
+ + 创建时间 + + + + +
-
- 共计 {{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}} - - -
+ + +
+ 共计 {{total?total:0}} 条数据 - - - 退款理由 - - - - - + + + + + 交易单号 + 客户电话 + 订单名称 + 订单金额 + 支付金额 + 支付方式 + 订单状态 + 创建时间 + 操作 + + + + + {{data.orderNo}} + {{data.memPhone}} + {{data.title}} + ¥{{data.totalPrice}} + ¥{{data.payPrice}} + {{data.orderStatus == 1 || data.orderStatus == 5 ? '未支付' : data.payType | orderPayType}} + {{data.orderStatus | orderStatus}} + {{data.createTime | date : 'yyyy-MM-dd HH:mm:ss'}} + + 操作列表 + + + + + + + +
+
+ + + + + + + {{orderDetailObject.tradeOrder.orderNo}} + {{orderDetailObject.tradeOrder.paySerialNo!=null?orderDetailObject.tradeOrder.paySerialNo:'无'}} + {{orderDetailObject.tradeOrder.memPhone}} + {{orderDetailObject.tradeOrder.orderStatus | orderStatus}} + {{orderDetailObject.tradeOrder.payType | orderPayType}} + + {{orderDetailObject.tradeOrder.memCardNo}} + + {{orderDetailObject.tradeOrder.memDiscountName?orderDetailObject.tradeOrder.memDiscountName:'无'}} + {{orderDetailObject.tradeOrder.whetherRebate?'是':'否'}} + {{orderDetailObject.tradeOrder.remarks}} + + + + + {{orderDetailObject.tradeOrder.totalPrice}} 元 + {{orderDetailObject.tradeOrder.totalDeductionPrice}} 元 + {{orderDetailObject.tradeOrder.deductionProductPrice}} 元 + {{orderDetailObject.tradeOrder.deductionCouponPrice}} 元 + {{orderDetailObject.tradeOrder.payablePrice}} 元 + {{orderDetailObject.tradeOrder.payGold / 100}} 元 + + {{orderDetailObject.tradeOrder.payRealPrice!=null?orderDetailObject.tradeOrder.payRealPrice+' 元':'未支付'}} + + + + + + + +

创建时间:{{orderDetailObject.tradeOrder.createTime | date : 'yyyy-MM-dd HH:mm:ss'}}

+

备注:{{orderDetailObject.tradeOrder.remarks?orderDetailObject.tradeOrder.remarks:'无'}}

+
+ +

取消时间:{{orderDetailObject.tradeOrder.cancelTime | date : 'yyyy-MM-dd HH:mm:ss'}}

+

备注:{{orderDetailObject.tradeOrder.cancelRemarks?orderDetailObject.tradeOrder.cancelRemarks:'无'}}

+
+ 支付时间:{{orderDetailObject.tradeOrder.payTime | date : 'yyyy-MM-dd HH:mm:ss'}} + 完成时间:{{orderDetailObject.tradeOrder.finishTime | date : 'yyyy-MM-dd HH:mm:ss'}} + 退款时间:{{orderDetailObject.tradeOrder.refundTime | date : 'yyyy-MM-dd HH:mm:ss'}} +
+
+
+
+
+
diff --git a/src/app/admin/order-manage/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 index e69de29..363c972 100644 --- a/src/app/admin/order-manage/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 @@ -0,0 +1,3 @@ +img { + width: 60px; +} diff --git a/src/app/admin/order-manage/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 index ed547f0..a09ac99 100644 --- a/src/app/admin/order-manage/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 @@ -10,183 +10,145 @@ 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'; +import {HltOrderService} from "../../../services/order/hlt-order.service"; +import {animate, state, style, transition, trigger} from "_@angular_animations@9.0.7@@angular/animations"; @Component({ selector: 'app-dicount-package-order-list', + animations: [ + trigger('openClose', [ + state('open', style({ + height: '260px', + opacity: 1, + backgroundColor: 'white' + })), + state('closed', style({ + opacity: 1, + backgroundColor: 'white' + })), + transition('open => closed', [ + animate('0.3s') + ]), + transition('closed => open', [ + animate('0.3s') + ]), + ]), + ], templateUrl: './dicount-package-order-list.component.html', styleUrls: ['./dicount-package-order-list.component.scss'] }) export class DicountPackageOrderListComponent 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; - roleType: number; - 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; + // 搜索框 + searchForm: FormGroup; + // 搜索框折叠 + isCollapse = false; + // 订单状态数据 + orderStatusArray = []; + // 公司数据 + companyArray = []; + // 角色类型 + roleType: number; + // 列表相关参数 + // 总条数 + total: number; + // 页码 + pageNum = 1; + // 条码 + pageSize = 10; + // 列表数据 + requestData = []; + // 列表加载 + loading = true; + // 订单详情相关参数 + // 详情模态框 + orderDetailModal = false; + // 详情模态框数据等待 + orderDetailModalLoading = false; + // 订单详情数据 + orderDetailObject: any = { + tradeOrder: {}, + }; + // 数据加载中参数 + loadingObject = { + title: '加载中...', + status: false, + }; + // 请求地址参数 + FILE_URL = environment.imageUrl; + constructor( + private form: FormBuilder, + private store: LocalStorageService, + private message: NzMessageService, + private hltOrderService: HltOrderService, + private companyService: CompanyService, + private commonsService: CommonsService, + ) { } + + ngOnInit(): void { + // 搜索表单初始化 + this.searchForm = this.form.group({ + orderNo: [null], + memPhone: [null], + payTimeArray: [null], + orderStatus: [null], + createTimeArray: [null], + refundTimeArray: [null], + companyId: [null], + payType: [null], + memCardNo: [null], + productType: [7], + }); + // 角色类型初始化 + this.roleType = Number(this.store.get(ADMIN_INFO_OBJECT)['secRole'].roleType); + // 查询公司列表 + if (this.roleType === 0 || this.roleType === 1) { + this.companyService.selectCompanyList({ pageNum: 1, pageSize: 999 }, data => { + this.companyArray = data['return_data']['list']; + }); + } + // 查询订单状态数据 + this.commonsService.getDictionary('ORDER_OIL_STATUS', data => { + this.orderStatusArray = data['return_data']; + }); + this.getRequest(true, this.searchForm.value); } - whereObject['pageNum'] = this.pageNum; - whereObject['pageSize'] = this.pageSize; - this.order.getDiscountPackageList(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']); + // 查询列表 + public getRequest(reset: boolean = false, whereObject: object) { + this.loading = true; + if (reset) { + this.pageNum = 1; } - } 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['pageNum'] = this.pageNum; + whereObject['pageSize'] = this.pageSize; + this.hltOrderService.getOrderList(whereObject, data => { + this.loading = false; + if (data['return_code'] === '000000') { + console.log(data); + this.requestData = data['return_data'].list; + this.total = data['return_data'].total; + } else { + this.message.error(data['return_msg']); + } + }); } - this.order.exportDiscountPackageList(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']); - } + // 展示订单详情 + public showOrderDetail(orderNo: string) { + this.orderDetailModal = true; + this.orderDetailModalLoading = true; + this.hltOrderService.getOrderDetail(orderNo, data => { + if (data['return_code'] === '000000') { + this.orderDetailObject = data['return_data']; + } else { + this.message.error(data['return_msg']); + } + this.orderDetailModalLoading = false; }); - } - }); - } - handleCancel(): void { - this.isVisible = false; - } + } + } diff --git a/src/app/admin/recharge-order/price-list/price-list.component.html b/src/app/admin/recharge-order/price-list/price-list.component.html index 94832d5..71209ff 100644 --- a/src/app/admin/recharge-order/price-list/price-list.component.html +++ b/src/app/admin/recharge-order/price-list/price-list.component.html @@ -196,18 +196,18 @@ - - - - - - - - - - - - + + 展示平台 + + + + + + 充值平台 @@ -216,18 +216,18 @@ - - - - - - - - - - - - + + 支付方式 + + + + + + 充值方式 @@ -238,41 +238,41 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + 折扣比例 + + + + + + 积分支付比例 + + + + 排序 diff --git a/src/environments/environment.prod.ts b/src/environments/environment.prod.ts index c33db19..ec0d827 100644 --- a/src/environments/environment.prod.ts +++ b/src/environments/environment.prod.ts @@ -1,6 +1,7 @@ export const environment = { production: true, baseUrl: 'https://hsg.dctpay.com/brest/', // 正式环境服务器地址(请求数据地址) + orderUrl: 'https://hsg.dctpay.com/order/', // 测试环境服务器地址(请求数据地址) imageUrl: 'https://hsg.dctpay.com/filesystem/', key: 'https://hsg.dctpay.com/phone-recharge-H5/index.html?codeValue=', inviteUrl: 'https://hsg.dctpay.com/wx/?action=ic&id=', diff --git a/src/environments/environment.ts b/src/environments/environment.ts index 76173d9..a6fe2c1 100644 --- a/src/environments/environment.ts +++ b/src/environments/environment.ts @@ -4,11 +4,11 @@ export const environment = { production: false, - baseUrl: 'http://localhost:9302/brest/', // 测试环境服务器地址(请求数据地址) - orderUrl: 'http://localhost:9304/order/', // 测试环境服务器地址(请求数据地址) + // baseUrl: 'http://localhost:9302/brest/', // 测试环境服务器地址(请求数据地址) + // orderUrl: 'http://localhost:9304/order/', // 测试环境服务器地址(请求数据地址) imageUrl: 'https://hsgcs.dctpay.com/filesystem/', - // baseUrl: 'https://hsgcs.dctpay.com/brest/', // 测试环境服务器地址(请求数据地址) - // orderUrl: 'https://hsgcs.dctpay.com/order/', // 测试环境服务器地址(请求数据地址) + baseUrl: 'https://hsg.dctpay.com/brest/', // 测试环境服务器地址(请求数据地址) + orderUrl: 'https://hsg.dctpay.com/order/', // 测试环境服务器地址(请求数据地址) key: 'https://hsgcs.dctpay.com/phone-recharge-H5/index.html?codeValue=', inviteUrl: 'https://hsgcs.dctpay.com/wx/?action=ic&id=', };