diff --git a/src/app/data/common/button.namespace.ts b/src/app/data/common/button.namespace.ts new file mode 100644 index 0000000..47a7466 --- /dev/null +++ b/src/app/data/common/button.namespace.ts @@ -0,0 +1,12 @@ +export interface Button { + menuName: string; + menuType: string; + menuUrl: string; + menuUrlImg: string; + menuPSid: number; + menuSort: string; + menuDesc: string; +} + +export let buttonData: Button[] = []; + diff --git a/src/app/pages/body/index/index.component.ts b/src/app/pages/body/index/index.component.ts index c5c2aa8..811d45f 100644 --- a/src/app/pages/body/index/index.component.ts +++ b/src/app/pages/body/index/index.component.ts @@ -76,8 +76,6 @@ export class IndexComponent { private router: Router, // 路由 private login: LoginService ) { - this.nzConfigService.set('button', { nzSize: 'large' }) - this.nzConfigService.set('treeSelect', { nzSize: 'large' }) // 缓存数据字典 this.commonService.queryDictionary('','',(data: any) => { dictionaryData.length = 0; diff --git a/src/app/pages/index/index/index.component.html b/src/app/pages/index/index/index.component.html index e69de29..8e95e14 100644 --- a/src/app/pages/index/index/index.component.html +++ b/src/app/pages/index/index/index.component.html @@ -0,0 +1,5 @@ + + diff --git a/src/app/pages/index/index/index.component.ts b/src/app/pages/index/index/index.component.ts index 00c144f..c75d7da 100644 --- a/src/app/pages/index/index/index.component.ts +++ b/src/app/pages/index/index/index.component.ts @@ -1,6 +1,7 @@ import { Component } from '@angular/core'; import {NzTabComponent, NzTabSetComponent} from "ng-zorro-antd/tabs"; -import {NgForOf} from "@angular/common"; +import {NgForOf, NgOptimizedImage} from "@angular/common"; +import {NzResultComponent} from "ng-zorro-antd/result"; @Component({ selector: 'app-index', @@ -8,7 +9,9 @@ import {NgForOf} from "@angular/common"; imports: [ NzTabSetComponent, NzTabComponent, - NgForOf + NgForOf, + NgOptimizedImage, + NzResultComponent ], templateUrl: './index.component.html', styleUrl: './index.component.less' diff --git a/src/app/pages/login/login/login.component.ts b/src/app/pages/login/login/login.component.ts index d8f4c4b..2e11274 100644 --- a/src/app/pages/login/login/login.component.ts +++ b/src/app/pages/login/login/login.component.ts @@ -21,6 +21,8 @@ import {DATA, INIT_FLAG, LOGIN_DATA, USER_TOKEN} from "../../../data/login/local import {Router} from "@angular/router"; import {BrowserStorageService} from "../../../utils/localStorage.service"; import {LoginService} from "../../../services/login/login.service"; +import {dictionaryData} from "../../../data/common/dictionary.namespace"; +import {buttonData} from "../../../data/common/button.namespace"; @@ -97,7 +99,21 @@ export class LoginComponent { this.storage.set(DATA, data['return_data']['object']); this.storage.set(USER_TOKEN, data['return_data']['token']); this.storage.set(INIT_FLAG, true); - this.router.navigateByUrl('/admin/index').then(r => console.log("返回内容" ,r)); + // 缓存角色按钮权限 + for (let item of data['return_data']['object']['button']) { + buttonData.push( + { + menuName: item.menuName, + menuType: item.menuType, + menuUrl: item.menuUrl, + menuUrlImg: item.menuUrlImg, + menuPSid: item.menuPSid, + menuSort: item.menuSort, + menuDesc: item.menuDesc, + } + ); + } + this.router.navigateByUrl('/admin/index'); } else { this.message.error(data['return_msg']); } diff --git a/src/app/pages/trade/order-oil-list/order-oil-list.component.html b/src/app/pages/trade/order-oil-list/order-oil-list.component.html new file mode 100644 index 0000000..6fa958f --- /dev/null +++ b/src/app/pages/trade/order-oil-list/order-oil-list.component.html @@ -0,0 +1,296 @@ +
+
+
+ + 交易创建时间 + + + + + + + +
+
+ + 交易状态 + + + + + + +
+
+ + 交易单号 + + + + +
+
+ + 支付单号 + + + + +
+
+ + 加油油号 + + + + + + +
+
+ + 支付方式 + + + + + + +
+
+ + 客户电话 + + + + +
+
+ + 油站名称 + + + + +
+
+ + 加油员 + + + + +
+
+ + 代理商 + + + + + + +
+
+ + 业务员 + + + + + + +
+
+ + + + + 更多查询条件 + + +
+
+
+ +
+
+ 加油笔数: + {{totalData.totalCount}}笔 + 加油金额: + {{totalData.totalRefuelPrice}}元 + 加油升数: + {{totalData.totalOilLiters}}升 +
+
+ + + + 代理商 + 业务员 + 交易单号 + 客户电话 + 加油站 + 加油员 + 加油信息 + 支付信息 + 交易状态 + 创建时间 + 支付时间 + 退款时间 + 取消时间 + 操作 + + + 加油金额 + 加油升数 + 油号 + 油枪号 + 平台折扣 + 平台价 + 油站价 + 国标价 + 总优惠 + 优惠券优惠 + 加油优惠 + 应付金额 + 积分抵扣 + 实付金额 + 支付方式 + 支付单号 + + + + + {{data.agentName?data.agentName:'无'}} + {{data.agentStaffName?data.agentStaffName:'无'}} + {{data.orderNo}} + {{data.userPhone!=null?data.userPhone:'无'}} + {{data.merName}} + {{data.gasStaffName?data.gasStaffName:'未知'}} + {{data.gasRefuelPrice}}元 + {{data.gasOilLiters}}升 + {{data.gasOilNo}}# + {{data.gasGunNo}}号枪 + {{data.gasDiscount != 1?(data.gasDiscount*100) + '折':'无'}} + {{data.gasPricePlatform}}元 + {{data.gasPriceGun}}元 + {{data.gasPriceOfficial}}元 + {{data.totalDeductionPrice}}元 + {{data.deductionCouponPrice}}元 + {{data.deductionOilPrice}}元 + {{data.payablePrice}}元 + {{data.payIntegral / 100}}元 + {{data.actualPayPrice!=null?data.payPrice+'元':'未支付'}} + {{data.payType | dictionary: 'ORDER_PAY_TYPE'}} + {{data.paySerialNo}} + {{data.status | dictionary: 'GAS_ORDER_STATUS'}} + {{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.cancelTime | date : 'yyyy-MM-dd HH:mm:ss'}} + + 操作列表 + + + + + + + 总计 {{ total }} 条 + + + + + + + + + + {{orderDetailObject.gasOrder.merName}} + {{orderDetailObject.tradeOrder.orderNo}} + {{orderDetailObject.tradeOrder.orderStatus| dictionary: 'GAS_ORDER_STATUS' }} + {{orderDetailObject.tradeOrder.payType | dictionary: 'ORDER_PAY_TYPE'}} + {{orderDetailObject.tradeOrder.paySerialNo!=null?orderDetailObject.tradeOrder.paySerialNo:'无'}} + {{orderDetailObject.tradeOrder.memPhone}} + {{orderDetailObject.gasOrder.gasStaffName!=null?orderDetailObject.gasOrder.gasStaffName:'未知'}} + {{orderDetailObject.gasOrder.gasRefuelPrice}}元 + {{orderDetailObject.gasOrder.gasOilLiters}}升 + {{orderDetailObject.gasOrder.gasOilNo}} # + {{orderDetailObject.gasOrder.gasGunNo}} 号枪 + + 平台折扣:{{orderDetailObject.gasOrder.gasDiscount != 1?(orderDetailObject.gasOrder.gasDiscount * 100)+'折':'无'}}
+ 总优惠:{{orderDetailObject.gasOrder.totalDeductionPrice}}元
+ 优惠券优惠:{{orderDetailObject.gasOrder.deductionCouponPrice}}元
+ 加油优惠:{{orderDetailObject.gasOrder.deductionOilPrice}}元
+ 积分抵扣:{{orderDetailObject.gasOrder.payIntegral / 100}}元
+
+ +
+
+ +
+ {{orderDetailObject.gasOrder.payablePrice}} + {{orderDetailObject.gasOrder.actualPayPrice}} + + {{orderDetailObject.gasOrder.agentName?orderDetailObject.gasOrder.agentName:'无'}} + + + {{orderDetailObject.gasOrder.agentStaffName?orderDetailObject.gasOrder.agentStaffName:'无'}} + +
+
+ + + + 创建时间:{{orderDetailObject.tradeOrder.createTime | date : 'yyyy-MM-dd HH:mm:ss'}} + 取消时间:{{orderDetailObject.tradeOrder.cancelTime | date : 'yyyy-MM-dd HH:mm:ss'}} + 支付时间:{{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/pages/trade/order-oil-list/order-oil-list.component.less b/src/app/pages/trade/order-oil-list/order-oil-list.component.less new file mode 100644 index 0000000..6e50626 --- /dev/null +++ b/src/app/pages/trade/order-oil-list/order-oil-list.component.less @@ -0,0 +1,30 @@ +.search-area { + margin-bottom: 10px; +} +.search-area button { + margin-right: 8px; +} +.submit-btn { + width: 150px; +} +.collapse { + margin-left: 10px; +} +.csp-statistic { + font-feature-settings: "tnum"; + border: 1px solid #d9d9d9; + border-radius: 4px; +} +.csp-statistic-title { + padding: 0 16px; + height: 64px; + display: -ms-flexbox; + display: flex; + -ms-flex-align: center; + align-items: center; + background-color: #fafafa; +} +.csp-text-primary{ + font-size: 20px; + color: #1890ff; +} diff --git a/src/app/pages/trade/order-oil-list/order-oil-list.component.ts b/src/app/pages/trade/order-oil-list/order-oil-list.component.ts new file mode 100644 index 0000000..8a5bed8 --- /dev/null +++ b/src/app/pages/trade/order-oil-list/order-oil-list.component.ts @@ -0,0 +1,388 @@ +import {Component, OnInit} from '@angular/core'; +import {OrderOilService} from "../../../services/trade/order-oil.service"; +import {FormBuilder, FormGroup, NonNullableFormBuilder, ReactiveFormsModule, Validators} from "@angular/forms"; +import {NzModalComponent, NzModalModule, NzModalService} from "ng-zorro-antd/modal"; +import {NzMessageService} from "ng-zorro-antd/message"; +import {environment} from "../../../../environments/environment"; +import {DatePipe, DecimalPipe, NgForOf, NgIf} from "@angular/common"; +import {DictionaryPipe} from "../../../pipes/common/dictionary.pipe"; +import {NzButtonComponent} from "ng-zorro-antd/button"; +import { + NzCellFixedDirective, + NzTableCellDirective, + NzTableComponent, + NzTbodyComponent, NzTheadComponent, + NzThMeasureDirective, NzTrDirective +} from "ng-zorro-antd/table"; +import {NzColDirective, NzRowDirective} from "ng-zorro-antd/grid"; +import {NzDatePickerComponent, NzRangePickerComponent} from "ng-zorro-antd/date-picker"; +import {NzDescriptionsComponent, NzDescriptionsItemComponent, NzDescriptionsModule} from "ng-zorro-antd/descriptions"; +import {NzFormControlComponent, NzFormDirective, NzFormItemComponent, NzFormLabelComponent} from "ng-zorro-antd/form"; +import {NzInputDirective} from "ng-zorro-antd/input"; +import {NzOptionComponent, NzSelectComponent} from "ng-zorro-antd/select"; +import {NzRadioButtonDirective, NzRadioComponent, NzRadioGroupComponent} from "ng-zorro-antd/radio"; +import {NzTabComponent, NzTabSetComponent, NzTabsModule} from "ng-zorro-antd/tabs"; +import {DateSelectType, DateUtils} from "../../../utils/dateUtils.service"; +import {OrderRefundService} from "../../../services/trade/order-refund.service"; +import {NzDropDownDirective, NzDropdownMenuComponent, NzDropDownModule} from "ng-zorro-antd/dropdown"; +import {NzIconModule} from "ng-zorro-antd/icon"; +import {AgentService} from "../../../services/agent/agent.service"; +import {AgentStaffService} from "../../../services/agent/agent-staff.service"; +import {NzStatisticModule} from "ng-zorro-antd/statistic"; +import {NzCardModule} from "ng-zorro-antd/card"; +import {BrowserStorageService} from "../../../utils/localStorage.service"; +import {DATA} from "../../../data/login/localStorage.namespace"; +import {NzSpinComponent, NzSpinModule} from "ng-zorro-antd/spin"; +import {NzTimelineComponent, NzTimelineItemComponent} from "ng-zorro-antd/timeline"; +import {NzBadgeComponent} from "ng-zorro-antd/badge"; +import {ButtonPipe} from "../../../pipes/common/button.pipe"; + +@Component({ + selector: 'app-order-oil-list', + standalone: true, + imports: [ + DatePipe, + DictionaryPipe, + NgForOf, + NgIf, + NzButtonComponent, + NzCellFixedDirective, + NzColDirective, + NzDatePickerComponent, + NzDescriptionsComponent, + NzDescriptionsItemComponent, + NzFormControlComponent, + NzFormDirective, + NzFormItemComponent, + NzFormLabelComponent, + NzInputDirective, + NzModalComponent, + NzOptionComponent, + NzRadioButtonDirective, + NzRadioComponent, + NzRadioGroupComponent, + NzRangePickerComponent, + NzRowDirective, + NzSelectComponent, + NzTabComponent, + NzTabSetComponent, + NzTableCellDirective, + NzTableComponent, + NzTbodyComponent, + NzThMeasureDirective, + NzTheadComponent, + NzTrDirective, + ReactiveFormsModule, + NzModalModule, + NzDropdownMenuComponent, + NzDropDownDirective, + NzDropDownModule, + NzIconModule, + NzCardModule, + NzSpinComponent, + NzTimelineItemComponent, + NzTimelineComponent, + NzBadgeComponent, + ], + templateUrl: './order-oil-list.component.html', + styleUrl: './order-oil-list.component.less' +}) +export class OrderOilListComponent { + loadingObject = { + title: "加载中...", + status: false, + }; + imageUrl = environment.imageUrl; + // 表单页数 + tablePageNum = 1; + // 表单数据 + tableData: any = { + total: 0, + list: [], + }; + // 统计数据 + totalData = { + totalCount: 0, + totalRefuelPrice: 0, + totalOilLiters: 0, + }; + // 搜索表单 + searchForm: FormGroup; + // 更多搜索条件 + isCollapse = false; + // 时间类型选择 + dateTypeSelect = DateSelectType; + // 状态 + statusArray = new DictionaryPipe().getDictionaryList('GAS_ORDER_STATUS'); + // 油号 + oilNoArray = new DictionaryPipe().getDictionaryList('OIL_NO'); + // 支付类型 + payTypeArray = new DictionaryPipe().getDictionaryList('ORDER_PAY_TYPE'); + // 账户类型 + accountType: number; + // 代理商 + agentArray: any = []; + // 业务员 + agentStaffArray: any = []; + // 订单详情模态框 + orderDetailModal= false; + // 订单详情模态框加载 + orderDetailModalLoading= false; + // 订单详情对象 + orderDetailObject: any = { + gasOrder: {}, + tradeOrder: {}, + }; + + orderRefundModal = false; + refundForm: FormGroup; + GAS_REFUND_BTN = new ButtonPipe().isButton("GAS_REFUND"); + GAS_ORDER_PRINT_BTN = new ButtonPipe().isButton("GAS_ORDER_PRINT_BTN"); + + constructor(private fb: NonNullableFormBuilder, + private orderOilService : OrderOilService, + private agentService : AgentService, + private storage: BrowserStorageService, + private agentStaffService : AgentStaffService, + private orderRefundService: OrderRefundService, + private message: NzMessageService, + private modal: NzModalService) { + this.accountType = this.storage.get(DATA)['account']['objectType']; + + // 退款提示模态框 + this.refundForm = this.fb.group({ + orderNo: [{ value: null, disabled: true}, [Validators.required]], + childOrderNo: [{ value: null, disabled: true}, [Validators.required]], + remarks: [null], + }); + + // 初始化搜索框 + this.searchForm = this.fb.group({ + merName: [''], + userPhone: [''], + orderNo: [''], + payType: [''], + paySerialNo: [''], + gasOilNo: [''], + gasStaffName: [''], + agentId: [''], + agentStaffId: [''], + status: ['2'], + createTimeArray: [[]], + createTimeSelect: ['1'], + createTimeS: [''], + createTimeE: [''], + }); + // 初始化创建时间 + this.createTimeInit(); + // 查询数据 + this.queryData(); + + if (this.accountType == 1) { + // 查询代理商 + this.queryAgent(); + } + + if (this.accountType == 4) { + // 查询业务员 + this.queryAgentStaff(this.storage.get(DATA)['account']['objectId']); + } + } + + /** + * 获取代理商 + */ + queryAgent() { + this.agentService.queryAgentList({ pageNum:1,pageSize:999}, (data: any) => { + this.agentArray = data['return_data']['list']; + }); + } + + /** + * 获取业务员 + * @param agentId + */ + queryAgentStaff(agentId: number) { + this.searchForm.controls['agentStaffId'].setValue(null); + this.agentStaffService.getStaffList({ agentId: agentId,pageNum:1,pageSize:999}, (data: any) => { + this.agentStaffArray = data['return_data']['list']; + }); + } + /** + * 获取数据 + */ + queryData() { + if (this.searchForm.controls['createTimeArray'].value != null + && this.searchForm.controls['createTimeArray'].value.length > 0) { + this.searchForm.controls['createTimeS'].setValue(this.searchForm.controls['createTimeArray'].value[0]); + this.searchForm.controls['createTimeE'].setValue(this.searchForm.controls['createTimeArray'].value[1]); + } else { + this.searchForm.controls['createTimeS'].setValue(null); + this.searchForm.controls['createTimeE'].setValue(null); + } + this.searchForm.value.pageNum = this.tablePageNum; + this.searchForm.value.pageSize = 10; + this.searchForm.value.time = new Date().getTime(); + // 查询订单列表 + this.orderOilService.queryList(this.searchForm.value, (data: any) => { + if (data['return_code'] == '000000') { + this.tableData = data['return_data']; + } + }); + // 查询统计 + this.orderOilService.countOilData(this.searchForm.value,(data: any) => { + if (data['return_code'] == '000000') { + this.totalData = data['return_data']; + } + }); + } + + /** + * 搜索表单提交 + */ + searchFormSubmit(): void { + this.tablePageNum = 1; + this.queryData(); + } + + /** + * 搜索表单重置 + */ + searchFormReset(): void { + this.searchForm.reset(); + } + + /** + * 创建时间初始化 + */ + createTimeInit() { + let createTimeSelect = this.searchForm.controls['createTimeSelect'].value; + if (createTimeSelect != null) { + let timeObj = DateUtils.getDate(new Date(), Number(createTimeSelect)); + this.searchForm.controls['createTimeArray'].setValue([timeObj.timeS, timeObj.timeE]); + } + } + + /** + * 导出加油订单 + */ + exportOilOrder() { + this.orderOilService.exportOilOrder(this.searchForm.value, (data:any) => { + window.location.href = this.imageUrl + 'temporary/' + data['return_data']; + }); + } + + /** + * 打开详情模态框 + * @param orderNo + */ + showOrderDetail(orderNo: string) { + this.orderDetailModalLoading = true; + this.orderOilService.queryOilOrder(orderNo, (data:any) => { + this.orderDetailObject = data['return_data']; + this.orderDetailModalLoading = false; + }); + this.orderDetailModal = true; + } + + /** + * 关闭详情模态框 + */ + closeOrderDetail() { + this.orderDetailModal = false; + } + + /** + * 打开退款模态框 + * @param orderNo + * @param childOrderNo + */ + showRefund(orderNo: string, childOrderNo: string) { + this.refundForm.patchValue({ orderNo: orderNo, childOrderNo: childOrderNo}) + this.orderRefundModal = true; + } + + /** + * 关闭退款模态框 + */ + closeRefund() { + this.orderRefundModal = false; + } + + /** + * 提交退款 + * @param orderNo + */ + 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.orderRefundService.tradeOrderChild(this.refundForm.controls['childOrderNo'].value,1, this.refundForm.controls['remarks'].value, (data: any) => { + if (data['return_code'] === '000000') { + this.modal.success({ + nzTitle: '提示', + nzContent: '操作成功', + }); + this.queryData(); + this.closeRefund(); + } else { + this.modal.error({ + nzTitle: '提示', + nzContent: data['return_msg'], + }); + } + this.loadingObject.status = false; + }); + this.orderRefundModal = true; + } + + /** + * 订单打印提示 + */ + showOrderPrint(orderNo: string) { + this.modal.confirm({ + nzTitle: '提示', + nzContent: '是否补打小票?', + nzOnOk: () => this.submitOrderPrint(orderNo) + }); + } + + /** + * 提交订单打印 + */ + submitOrderPrint(orderNo: string) { + this.orderOilService.printOrder(orderNo, (data: any) => { + if (data['return_code'] === '000000') { + this.message.success("操作成功"); + } else { + this.modal.error({ + nzTitle: '提示', + nzContent: data['return_msg'], + }); + } + }) + } + +} diff --git a/src/app/pages/trade/trade.routes.ts b/src/app/pages/trade/trade.routes.ts index 5bed77d..193e54e 100644 --- a/src/app/pages/trade/trade.routes.ts +++ b/src/app/pages/trade/trade.routes.ts @@ -1,6 +1,8 @@ import { Routes } from '@angular/router'; import {OrderRefundComponent} from "./order-refund/order-refund.component"; +import {OrderOilListComponent} from "./order-oil-list/order-oil-list.component"; export const TRADE_ROUTES: Routes = [ { path: 'order-refund', component: OrderRefundComponent }, + { path: 'order-oil', component: OrderOilListComponent }, ]; diff --git a/src/app/pipes/common/button.pipe.ts b/src/app/pipes/common/button.pipe.ts new file mode 100644 index 0000000..c6641a4 --- /dev/null +++ b/src/app/pipes/common/button.pipe.ts @@ -0,0 +1,38 @@ +import { Pipe, PipeTransform } from '@angular/core'; +import {Button, buttonData} from "../../data/common/button.namespace"; + +@Pipe({ + name: 'button', + standalone: true +}) +export class ButtonPipe implements PipeTransform { + data: Button[] = buttonData; + + /** + * 获取数据字典 + * @param buttonCode + */ + isButton(buttonCode: string): boolean { + // 读取缓存数据 + return this.data.find(o => o.menuUrl == buttonCode) != null; + } + + /** + * 获取数据字典 + * @param buttonCode + */ + getButton(buttonCode: string): Button | any { + // 读取缓存数据 + return this.data.find(o => o.menuUrl == buttonCode); + } + + transform(codeType: string): string { + const obj = this.getButton(codeType); + if (obj == null) { + return '未知'; + } else { + return obj.menuName; + } + } + +} diff --git a/src/app/services/agent/agent-staff.service.ts b/src/app/services/agent/agent-staff.service.ts new file mode 100644 index 0000000..5fc5e59 --- /dev/null +++ b/src/app/services/agent/agent-staff.service.ts @@ -0,0 +1,24 @@ +import { Injectable } from '@angular/core'; +import {HttpClient} from "@angular/common/http"; +import {environment} from "../../../environments/environment"; +import {ObjectData} from "../../utils/objectData.service"; + +@Injectable({ + providedIn: 'root' +}) +export class AgentStaffService { + + constructor(private http: HttpClient) { } + + /** + * 查询业务员 + * @param param + * @param callBack + */ + public getStaffList(param: any, callBack:any) { + param.tm = new Date().getTime(); + this.http.get(environment.baseUrl + 'agentStaff/getStaffList?'+ObjectData.objectByString(param)).subscribe(data => { + callBack(data); + }); + } +} diff --git a/src/app/services/agent/agent.service.ts b/src/app/services/agent/agent.service.ts new file mode 100644 index 0000000..079a351 --- /dev/null +++ b/src/app/services/agent/agent.service.ts @@ -0,0 +1,24 @@ +import { Injectable } from '@angular/core'; +import {HttpClient} from "@angular/common/http"; +import {environment} from "../../../environments/environment"; +import {ObjectData} from "../../utils/objectData.service"; + +@Injectable({ + providedIn: 'root' +}) +export class AgentService { + + constructor(private http: HttpClient) { } + + /** + * 查询代理商列表 + * @param param + * @param callBack + */ + public queryAgentList(param: any, callBack:any) { + param.tm = new Date().getTime(); + this.http.get(environment.baseUrl + 'agent/queryAgentList?'+ObjectData.objectByString(param)).subscribe(data => { + callBack(data); + }); + } +} diff --git a/src/app/services/trade/order-oil.service.ts b/src/app/services/trade/order-oil.service.ts new file mode 100644 index 0000000..c6869d5 --- /dev/null +++ b/src/app/services/trade/order-oil.service.ts @@ -0,0 +1,80 @@ +import { Injectable } from '@angular/core'; +import {HttpClient} from "@angular/common/http"; +import {environment} from "../../../environments/environment"; +import {ObjectData} from "../../utils/objectData.service"; + +@Injectable({ + providedIn: 'root' +}) +export class OrderOilService { + + constructor(private http: HttpClient) { } + + /** + * 查询订单列表 + * @param param + * @param callBack + */ + public queryList(param: any, callBack:any) { + param.tm = new Date().getTime(); + this.http.get(environment.baseUrl + 'gasOrder/queryOilOrderList?'+ObjectData.objectByString(param)).subscribe(data => { + callBack(data); + }); + } + + /** + * 导出加油订单 + * @param param + * @param callBack + */ + public exportOilOrder(param: any, callBack:any) { + param.tm = new Date().getTime(); + this.http.get(environment.baseUrl + 'gasOrder/exportOilOrder?'+ObjectData.objectByString(param)).subscribe(data => { + callBack(data); + }); + } + + /** + * 统计数据 + * @param param + * @param callBack + */ + public countOilData(param: any, callBack:any) { + param.tm = new Date().getTime(); + this.http.get(environment.baseUrl + 'gasOrder/countOilData?'+ObjectData.objectByString(param)).subscribe(data => { + callBack(data); + }); + } + + /** + * 订单详情 + * @param orderNo + * @param callBack + */ + public queryOilOrder(orderNo: string, callBack:any) { + const param = { + orderNo: orderNo, + tm: new Date().getTime() + } + this.http.get(environment.baseUrl + 'gasOrder/queryOilOrder?'+ObjectData.objectByString(param)).subscribe(data => { + callBack(data); + }); + } + + + /** + * 打印订单 + * @param orderNo + * @param callBack + */ + public printOrder(orderNo: string, callBack:any) { + const param = { + orderNo: orderNo, + tm: new Date().getTime() + } + this.http.get(environment.baseUrl + 'gasOrder/printOrder?'+ObjectData.objectByString(param)).subscribe(data => { + callBack(data); + }); + } + +} diff --git a/src/app/services/trade/order-refund.service.ts b/src/app/services/trade/order-refund.service.ts index d39b3cb..e9a7445 100644 --- a/src/app/services/trade/order-refund.service.ts +++ b/src/app/services/trade/order-refund.service.ts @@ -10,6 +10,39 @@ export class OrderRefundService { constructor(private http: HttpClient) { } + /** + * 退款 + * @param param + * @param callBack + */ + public tradeOrder(orderNo: string, remark: string, callBack:any) { + const param = { + orderNo: orderNo, + remark: remark, + time: new Date().getTime() + } + this.http.post(environment.baseUrl + 'refund/tradeOrder', param).subscribe(data => { + callBack(data); + }); + } + + /** + * 退款 + * @param param + * @param callBack + */ + public tradeOrderChild(childOrderNo: string, productCount: number, remark: string, callBack:any) { + const param = { + childOrderNo: childOrderNo, + productCount: productCount, + remark: remark, + time: new Date().getTime() + } + this.http.post(environment.baseUrl + 'refund/tradeOrderChild', param).subscribe(data => { + callBack(data); + }); + } + /** * 查询退款订单列表 * @param param diff --git a/src/assets/logo.jpg b/src/assets/logo.jpg new file mode 100644 index 0000000..b922491 Binary files /dev/null and b/src/assets/logo.jpg differ diff --git a/src/environments/environment.prod.ts b/src/environments/environment.prod.ts index d7d5461..ee8153d 100644 --- a/src/environments/environment.prod.ts +++ b/src/environments/environment.prod.ts @@ -1,7 +1,5 @@ export const environment = { production: true, - baseUrl: 'https://phg.dctpay.com/brest/', // 测试环境服务器地址(请求数据地址) - orderUrl: 'https://phg.dctpay.com/order/', // 测试环境服务器地址(请求数据地址) - userUrl: 'https://phg.dctpay.com/user/', // 测试环境服务器地址(请求数据地址) - imageUrl: 'https://phg.obs.cn-southwest-2.myhuaweicloud.com/', + baseUrl: 'https://oil.dctpay.com/brest/', // 测试环境服务器地址(请求数据地址) + imageUrl: 'https://oil.dctpay.com/filesystem/', }; diff --git a/src/environments/environment.ts b/src/environments/environment.ts index c98b603..debd267 100644 --- a/src/environments/environment.ts +++ b/src/environments/environment.ts @@ -5,7 +5,7 @@ export const environment = { production: false, baseUrl: 'https://test-oil.dctpay.com/brest/', // 测试环境服务器地址(请求数据地址) - imageUrl: 'https://phg.obs.cn-southwest-2.myhuaweicloud.com/', + imageUrl: 'https://test-oil.dctpay.com/filesystem/', }; /* diff --git a/src/favicon.ico b/src/favicon.ico index 67ee507..30ce999 100644 Binary files a/src/favicon.ico and b/src/favicon.ico differ