Merge branch 'api-dev'

* api-dev:
  1
  提交代碼
  提交代码
  提交代码
  提交代码
  提交代码
  提交代码
pull/1/head
袁野 2 years ago
commit 00a5be3dda
  1. 4
      src/app/admin/merchant-store/store-edit/store-edit.component.scss
  2. 10
      src/app/admin/merchant-store/store-edit/store-edit.component.ts
  3. 54
      src/app/admin/merchant/merchant-list/merchant-list.component.html
  4. 3
      src/app/admin/merchant/merchant-list/merchant-list.component.scss
  5. 65
      src/app/admin/merchant/merchant-list/merchant-list.component.ts
  6. 169
      src/app/admin/order/oil-station-order/oil-station-order.component.html
  7. 134
      src/app/admin/order/oil-station-order/oil-station-order.component.ts
  8. 98
      src/app/admin/recharge-order/order-list/order-list.component.html
  9. 72
      src/app/admin/recharge-order/order-list/order-list.component.ts
  10. 22
      src/app/admin/tuanyou-agent/order/ty-order-list/ty-order-list.component.html
  11. 1
      src/app/admin/tuanyou-agent/order/ty-order-list/ty-order-list.component.ts
  12. 39
      src/app/services/merchant-tripartite-platform.service.ts
  13. 13
      src/app/services/order.service.ts
  14. 4
      src/environments/environment.ts
  15. 3
      tsconfig.json

@ -5,3 +5,7 @@ button {
background-color: #ffffff;
}
#container {width:800px; height: 500px; }
nz-input-number {
width: 100%;
}

@ -109,11 +109,10 @@ export class StoreEditComponent implements OnInit {
return;
}
}
if (this.logoFile.length !== 0) {
if (this.logoFile[0]['response'] != null) {
this.validateForm.value.storeLogo = this.logoFile[0]['response']['return_data'][0];
} else {
this.validateForm.value.storeLogo = this.logoFile[0].name;
if (this.validateForm.value.prestoreType === '0') {
if (this.validateForm.value.splitAccountNo == null || this.validateForm.value.splitRate == null) {
this.message.error('必填项不能为空');
return;
}
}
if (this.editFlag) {
@ -145,6 +144,7 @@ export class StoreEditComponent implements OnInit {
console.log(data);
data['return_data']['brandId'] = String(data['return_data']['brandId']);
data['return_data']['type'] = String(data['return_data']['type']);
data['return_data']['prestoreType'] = String(data['return_data']['prestoreType']);
if (data['return_data']['storeLogo'] != null && data['return_data']['storeLogo'] !== '') {
const logo = String(data['return_data']['storeLogo']);
const logoArray = [];

@ -80,7 +80,7 @@
<th nzWidth="100px">商户电话</th>
<th nzWidth="100px">创建时间</th>
<th nzWidth="50px">状态</th>
<th nzWidth="100px" nzRight="0px">操作</th>
<th nzWidth="120px" nzRight="0px">操作</th>
</tr>
</thead>
<tbody>
@ -105,6 +105,8 @@
<a *ngIf="data.status !== 1" (click)='enableMerchant(data.id)'><i nz-icon nzType="check-circle" nzTheme="outline" nz-tooltip="启用"></i></a>
<nz-divider nzType="vertical"></nz-divider>
<a (click)='showRechargeModal(data.id)'><i nz-icon nzType="dollar" nzTheme="outline" nz-tooltip="余额充值"></i></a>
<nz-divider nzType="vertical"></nz-divider>
<a (click)='showTripartitePlatformModal(data.id)'><i nz-icon nzType="shop" nzTheme="outline" nz-tooltip="商户平台配置"></i></a>
</td>
</tbody>
</nz-table>
@ -115,7 +117,7 @@
<nz-form-item>
<nz-form-label [nzSpan]="6" nzRequired >充值金额</nz-form-label>
<nz-form-control [nzSpan]="14">
<nz-input-number style="width: 100%" formControlName="amount" [nzMin]="0.01" [nzMax]="1000" [nzStep]="1" [nzPrecision]="2"></nz-input-number>
<nz-input-number style="width: 100%" formControlName="amount" [nzMin]="0.01" [nzMax]="9999999" [nzStep]="1" [nzPrecision]="2"></nz-input-number>
</nz-form-control>
</nz-form-item>
<div style="text-align: center;">
@ -124,6 +126,54 @@
</form>
</nz-modal>
<nz-modal [(nzVisible)]="tripartitePlatformModal" nzTitle="商户配置" (nzOnCancel)="closeTripartitePlatformModal()" nzWidth="500px" [nzFooter]="null">
<form nz-form [formGroup]="tripartitePlatformForm">
<nz-form-item>
<nz-form-label [nzSpan]="6" nzRequired >第三方平台</nz-form-label>
<nz-form-control [nzSpan]="14">
<nz-select formControlName="platformType">
<nz-option nzValue="1" nzLabel="微信"></nz-option>
</nz-select>
</nz-form-control>
</nz-form-item>
<nz-form-item>
<nz-form-label [nzSpan]="6" nzRequired >商户名称</nz-form-label>
<nz-form-control [nzSpan]="14">
<input nz-input placeholder="请输入第三方平台商户名称" formControlName="platformMerName" />
</nz-form-control>
</nz-form-item>
<nz-form-item>
<nz-form-label [nzSpan]="6" nzRequired >商户号</nz-form-label>
<nz-form-control [nzSpan]="14">
<input nz-input placeholder="请输入第三方平台商户号" formControlName="platformMerNumber" />
</nz-form-control>
</nz-form-item>
<nz-form-item>
<nz-form-label [nzSpan]="6" nzRequired >是否分账</nz-form-label>
<nz-form-control [nzSpan]="14">
<nz-radio-group formControlName="profitSharingStatus">
<label nz-radio nzValue="true"></label>
<label nz-radio nzValue="false"></label>
</nz-radio-group>
</nz-form-control>
</nz-form-item>
<nz-form-item *ngIf="tripartitePlatformForm.value.profitSharingStatus == 'true'">
<nz-form-label [nzSpan]="6" nzRequired >是否分账(%)</nz-form-label>
<nz-form-control [nzSpan]="14">
<nz-input-number formControlName="profitSharingRatio" [nzPrecision]="2" [nzMin]="0" [nzMax]="30"></nz-input-number>
</nz-form-control>
</nz-form-item>
<div style="text-align: center;">
<button nz-button nzType="primary" style="width: 150px;" (click)="submitTripartitePlatform()">确定</button>
</div>
</form>
</nz-modal>

@ -2,3 +2,6 @@
height: 60px;
width: 60px;
}
nz-input-number {
width: 100%;
}

@ -6,7 +6,8 @@ import {CommonsService} from '../../../services/commons.service';
import {MerchantService} from '../../../services/merchant.service';
import {Router} from '@angular/router';
import {environment} from '../../../../environments/environment';
import {MerAmountService} from "../../../services/mer-amount.service";
import {MerAmountService} from '../../../services/mer-amount.service';
import {MerchantTripartitePlatformService} from '../../../services/merchant-tripartite-platform.service';
@Component({
selector: 'app-merchant-list',
@ -25,12 +26,16 @@ export class MerchantListComponent implements OnInit {
rechargeModal = false;
rechargeForm: FormGroup; // 充值模态框
tripartitePlatformModal = false;
tripartitePlatformForm: FormGroup; // 充值模态框
constructor(
private form: FormBuilder,
private merchant: MerchantService,
private iconService: IconService,
private message: NzMessageService,
private merAmountService: MerAmountService,
private tripartitePlatformService: MerchantTripartitePlatformService,
private router: Router,
private common: CommonsService,
private modal: NzModalService,
@ -53,6 +58,15 @@ export class MerchantListComponent implements OnInit {
merId: [null],
amount: [null, [Validators.required]],
});
this.tripartitePlatformForm = this.form.group({
merId: [null],
platformType: ['1', [Validators.required]],
platformMerName: [null, [Validators.required]],
platformMerNumber: [null, [Validators.required]],
profitSharingStatus: ['false', [Validators.required]],
profitSharingRatio: [null],
});
this.getRequest(true, this.searchForm.value);
}
@ -145,7 +159,7 @@ export class MerchantListComponent implements OnInit {
showRechargeModal(merId: number) {
this.rechargeForm.patchValue({ merId: merId});
this.rechargeForm.patchValue({ merId});
this.rechargeModal = true;
}
@ -182,5 +196,52 @@ export class MerchantListComponent implements OnInit {
});
}
showTripartitePlatformModal(merId: number) {
this.tripartitePlatformService.getDetail(merId, 1, data => {
if (data['return_data'] != null) {
data['return_data']['platformType'] = String(data['return_data']['platformType']);
data['return_data']['profitSharingStatus'] = String(data['return_data']['profitSharingStatus']);
this.tripartitePlatformForm.patchValue(data['return_data']);
} else {
this.tripartitePlatformForm.patchValue( { merId: merId, platformType: '1', profitSharingStatus: 'false' });
}
});
this.tripartitePlatformModal = true;
}
closeTripartitePlatformModal() {
this.tripartitePlatformForm.reset();
this.tripartitePlatformModal = false;
}
submitTripartitePlatform() {
for (const i in this.tripartitePlatformForm.controls) {
this.tripartitePlatformForm.controls[i].markAsDirty();
this.tripartitePlatformForm.controls[i].updateValueAndValidity();
}
if (this.tripartitePlatformForm.status == null || this.tripartitePlatformForm.status !== 'VALID') {
this.modal.warning({
nzTitle: '提示',
nzContent: '请填写所有必填项',
});
return;
}
this.tripartitePlatformService.editTripartitePlatform(this.tripartitePlatformForm.value, data => {
if (data['return_code'] === '000000') {
this.modal.success({
nzTitle: '提示',
nzContent: '保存成功',
});
this.closeTripartitePlatformModal();
} else {
this.modal.error({
nzTitle: '提示',
nzContent: data['return_msg'],
});
}
});
}
}

@ -6,6 +6,16 @@
<div class="inner-content">
<form nz-form [formGroup]="searchForm" (ngSubmit)="getRequest(true , searchForm.value)">
<div nz-row>
<div nz-col nzSpan="8" *ngIf="secUser['objectType'] == 2">
<nz-form-item>
<nz-form-label [nzSpan]="6">油站</nz-form-label>
<nz-form-control [nzSpan]="16">
<nz-select nzShowSearch nzAllowClear nzPlaceHolder="请选择油站" formControlName="storeId">
<nz-option *ngFor="let item of gasArray" nzLabel="{{item.storeName}}" nzValue="{{item.id}}"></nz-option>
</nz-select>
</nz-form-control>
</nz-form-item>
</div>
<div nz-col nzSpan="8">
<nz-form-item>
<nz-form-label [nzSpan]="6">订单号</nz-form-label>
@ -76,7 +86,7 @@
(nzPageSizeChange)="getRequest(false , searchForm.value)">
<thead nzSingleSort>
<tr>
<th nzWidth="50px">编号</th>
<th nzWidth="60px">编号</th>
<th nzWidth="200px">订单号</th>
<th nzWidth="180px">油站名称</th>
<th nzWidth="90px">类型</th>
@ -89,8 +99,8 @@
<th nzWidth="90px">支付金额</th>
<th nzWidth="90px">优惠金额</th>
<th nzWidth="120px">创建时间</th>
<th nzRight nzWidth="90px">状态</th>
<th nzWidth="120px" nzRight>操作</th>
<th nzRight nzWidth="80px">状态</th>
<th nzWidth="105px" nzRight>操作</th>
</tr>
</thead>
<tbody>
@ -110,9 +120,15 @@
<td>{{data.createTime | date: 'yyyy-MM-dd HH:mm:ss'}}</td>
<td nzRight>{{data.status | orderCouponStatus}}</td>
<td nzRight class="table-td-operation">
<a (click)="getDetail(data.orderNo)">详情</a>
<nz-divider *ngIf="(secUser['objectType'] != 8) && (data.status == 2 || data.status == 3)" nzType="vertical" ></nz-divider>
<a *ngIf="(secUser['objectType'] != 8) && (data.status == 2 || data.status == 3)" (click)="showModal(data.orderId)">退款</a>
<a style="float: left;width: 100%;margin-bottom: 10px;" *ngIf="(secUser['objectType'] == 3 || secUser['objectType'] == 8) && data.printStatus == false" (click)="showPrintDiv(data.orderId, data)">打印小票</a>
<a style="float: left;width: 100%;margin-bottom: 10px;" *ngIf="(secUser['objectType'] == 3 || secUser['objectType'] == 8) && data.printStatus == true" (click)="showPrintDiv(data.orderId, data)">已打印({{data.printNum+'次'}})</a>
<a nz-dropdown [nzDropdownMenu]="menu">操作列表<i nz-icon nzType="down"></i></a>
<nz-dropdown-menu #menu="nzDropdownMenu">
<ul nz-menu nzSelectable>
<li nz-menu-item><a (click)="getDetail(data.orderNo)">详情</a></li>
<li nz-menu-item *ngIf="(secUser['objectType'] == 3) && (data.status == 2 || data.status == 3)" ><a (click)="showModal(data.orderId)">退款</a></li>
</ul>
</nz-dropdown-menu>
</td>
</tbody>
</nz-table>
@ -153,3 +169,144 @@
</nz-descriptions>
</nz-modal>
<!--<div id="div_print">
<div style="float: left;margin-bottom: 150px;">
<div style="line-height: 30px; color:#000;">
<span style="font-size: 13px;float: left;width: 100%;">{{printDataObject.gasName}}</span>
<span style="font-size: 13px;float: left;width: 100%;margin-left: 60px;">(客户存根)</span>
</div>
<table style="width: 100%;">
<tbody>
<tr><td class="print_td">-&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;</td></tr>
<tr>
<td class="print_td">流水号:<span>{{printDataObject.orderNo}}</span></td>
</tr>
<tr><td class="print_td">-&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;</td></tr>
<tr>
<td class="print_td">时间:<span>{{printDataObject.createTime | date: 'yyyy-MM-dd HH:mm:ss'}}</span></td>
</tr>
<tr>
<td class="print_td">来源:<span>嗨森逛</span></td>
</tr>
<tr>
<td class="print_td">油枪:<span>{{printDataObject.gasGunNo}}</span></td>
</tr>
<tr>
<td class="print_td">油品:<span>{{printDataObject.gasOilNo}}</span></td>
</tr>
<tr>
<td class="print_td">升数:<span>{{printDataObject.gasOilLiters}}升</span></td>
</tr>
<tr>
<td class="print_td">实际加油升数以油站加油机为准!</td>
</tr>
<tr><td style="float: left;margin-top: 10px;font-size: 30px;color: black">加油金额</td></tr>
<tr><td style="font-size: 30px;color: black">¥{{printDataObject.oilPrice}}元</td></tr>
<tr><td class="print_td">-&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;</td></tr>
<tr><td style="float: left;color: black;margin-left: 35px;">开心又省钱; 来”嗨森逛“</td></tr>
</tbody>
</table>
</div>
<div style="float: left;margin-bottom: 50px;">
<div style="line-height: 30px; color:#000;">
<span style="font-size: 13px;float: left;width: 100%;">{{printDataObject.gasName}}</span>
<span style="font-size: 13px;float: left;width: 100%;margin-left: 60px;">(收银员存根)</span>
</div>
<table style="width: 100%;">
<tbody>
<tr><td class="print_td">-&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;</td></tr>
<tr>
<td class="print_td">流水号:<span>{{printDataObject.orderNo}}</span></td>
</tr>
<tr><td class="print_td">-&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;</td></tr>
<tr>
<td class="print_td">时间:<span>{{printDataObject.createTime | date: 'yyyy-MM-dd HH:mm:ss'}}</span></td>
</tr>
<tr>
<td class="print_td">来源:<span>嗨森逛</span></td>
</tr>
<tr>
<td class="print_td">油枪:<span>{{printDataObject.gasGunNo}}</span></td>
</tr>
<tr>
<td class="print_td">油品:<span>{{printDataObject.gasOilNo}}</span></td>
</tr>
<tr>
<td class="print_td">升数:<span>{{printDataObject.gasOilLiters}}升</span></td>
</tr>
<tr>
<td class="print_td">实际加油升数以油站加油机为准!</td>
</tr>
<tr><td style="float: left;margin-top: 10px;font-size: 30px;color: black">加油金额</td></tr>
<tr><td style="font-size: 30px;color: black">¥{{printDataObject.oilPrice}}元</td></tr>
<tr><td class="print_td">-&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;</td></tr>
<tr><td style="float: left;color: black;margin-left: 35px;">开心又省钱; 来”嗨森逛“</td></tr>
</tbody>
</table>
</div>
&lt;!&ndash; <table border=1 cellspacing=0 cellpadding=1 width="100%" style="border-collapse:collapse" bordercolor="#333333">
<thead>
<tr>
<td width="10%">
<div align=center><b>表格页眉</b></div>
</td>
<td width="25%">
<div align=center><b>品名</b></div>
</td>
<td width="10%">
<div align=center><b>颜色</b></div>
</td>
<td width="10%">
<div align=center><b>规格</b></div>
</td>
<td width="10%">
<div align=center><b>数量</b></div>
</td>
<td width="15%">
<div align=center><b>单价</b></div>
</td>
<td width="20%">
<div align=center><b>金额</b></div>
</td>
</tr>
</thead>
<tbody>
<tr>
<td>&nbsp;1</td>
<td>名称01</td>
<td>浅灰色</td>
<td>185/10</td>
<td>1</td>
<td>248.00</td>
<td>248.00</td>
</tr>
<tr>
<td>&nbsp;2</td>
<td>名称02</td>
<td>浅灰色</td>
<td>185/10</td>
<td>1</td>
<td>248.00</td>
<td>248.00</td>
</tr>
<tr>
<td>&nbsp;3</td>
<td>名称03</td>
<td>浅灰色</td>
<td>185/10</td>
<td>1</td>
<td>248.00</td>
<td>248.00</td>
</tr>
<tr>
<td>&nbsp;4</td>
<td>名称04</td>
<td>浅灰色</td>
<td>185/10</td>
<td>1</td>
<td>248.00</td>
<td>248.00</td>
</tr>
</table>&ndash;&gt;
</div>-->

@ -10,7 +10,8 @@ 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 {ADMIN_INFO_OBJECT} from '../../../services/local-storage.namespace';
import {MerchantStoreService} from "../../../services/merchant-store.service";
@Component({
selector: 'app-oil-station-order',
@ -36,6 +37,9 @@ export class OilStationOrderComponent implements OnInit {
refundContent: string;
roleType: number;
secUser: object;
gasArray = [];
constructor(
private form: FormBuilder,
private order: OrderService,
@ -45,6 +49,8 @@ export class OilStationOrderComponent implements OnInit {
private router: Router,
private company: CompanyService,
private merchant: MerchantService,
private merchantStoreService: MerchantStoreService,
private orderService: OrderService,
private store: LocalStorageService, // 数据请求
private common: CommonsService
) {
@ -52,6 +58,13 @@ export class OilStationOrderComponent implements OnInit {
ngOnInit(): void {
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'];
}
});
}
this.init();
// 接收消息
this.webSocketService.messageSubject.subscribe(
@ -65,6 +78,7 @@ export class OilStationOrderComponent implements OnInit {
public init(): void {
this.searchForm = this.form.group({
storeId: [null],
orderNo: [null],
status: [null],
createTime: [null],
@ -152,4 +166,122 @@ export class OilStationOrderComponent implements OnInit {
}
});
}
showPrintDiv(orderId: number, data: PrintData) {
data['createTime'] = new Date(data['createTime']).toLocaleString();
this.printDiv(data);
this.orderService.print(orderId, dataBack => {
if (dataBack['return_code'] === '000000') {
this.getRequest(false, this.searchForm.value);
}
});
}
printDiv(data: object) {
const headstr = '<html><head><title>打印小票</title></head><body>';
const footstr = '</body>';
const newstr = '<div id="div_print" style="font-size: 16px;">\n' +
' <div style="float: left;margin-bottom: 150px;">\n' +
' <div style="line-height: 30px; color:#000;">\n' +
' <span style="font-size: 13px;float: left;width: 100%;">' + data['gasName'] + '</span>\n' +
' <span style="font-size: 13px;float: left;width: 100%;margin-left: 60px;">(客户存根)</span>\n' +
' </div>\n' +
' <table style="width: 100%;">\n' +
' <tbody>\n' +
' <tr><td style="font-size: xx-small;color: black;">-------------------------------------------</td></tr>\n' +
' <tr>\n' +
' <td style="font-size: xx-small;color: black;">流水号:<span>' + data['orderNo'] + '</span></td>\n' +
' </tr>\n' +
' <tr><td style="font-size: xx-small;color: black;">-------------------------------------------</td></tr>\n' +
' <tr>\n' +
' <td style="font-size: xx-small;color: black;">时间:<span>' + data['createTime'] + '</span></td>\n' +
' </tr>\n' +
' <tr>\n' +
' <td style="font-size: xx-small;color: black;">来源:<span>嗨森逛</span></td>\n' +
' </tr>\n' +
' <tr>\n' +
' <td style="font-size: xx-small;color: black;">油枪:<span>' + data['gasGunNo'] + '</span></td>\n' +
' </tr>\n' +
' <tr>\n' +
' <td style="font-size: xx-small;color: black;">油品:<span>' + data['gasOilNo'] + '</span></td>\n' +
' </tr>\n' +
' <tr>\n' +
' <td style="font-size: xx-small;color: black;">升数:<span>' + data['gasOilLiters'] + '升</span></td>\n' +
' </tr>\n' +
' <tr>\n' +
' <td style="font-size: xx-small;color: black;">实际加油升数以油站加油机为准!</td>\n' +
' </tr>\n' +
' <tr><td style="float: left;margin-top: 10px;font-size: 30px;color: black">加油金额</td></tr>\n' +
' <tr><td style="font-size: 30px;color: black">¥' + data['totalPrice'] + '元</td></tr>\n' +
' <tr><td style="font-size: xx-small;color: black;">-------------------------------------------</td></tr>\n' +
' <tr><td style="float: left;font-size: xx-small;color: black;margin-left: 25px;">开心又省钱; 来”嗨森逛“</td></tr>\n' +
' </tbody>\n' +
' </table>\n' +
' </div>\n' +
' <div style="float: left;margin-bottom: 50px;">\n' +
' <div style="line-height: 30px; color:#000;">\n' +
' <span style="font-size: 13px;float: left;width: 100%;">' + data['gasName'] + '</span>\n' +
' <span style="font-size: 13px;float: left;width: 100%;margin-left: 60px;">(收银员存根)</span>\n' +
' </div>\n' +
' <table style="width: 100%;">\n' +
' <tbody>\n' +
' <tr><td style="font-size: xx-small;color: black;">-------------------------------------------</td></tr>\n' +
' <tr>\n' +
' <td style="font-size: xx-small;color: black;">流水号:<span>' + data['orderNo'] + '</span></td>\n' +
' </tr>\n' +
' <tr><td style="font-size: xx-small;color: black;">-------------------------------------------</td></tr>\n' +
' <tr>\n' +
' <td style="font-size: xx-small;color: black;">时间:<span>' + data['createTime'] + '</span></td>\n' +
' </tr>\n' +
' <tr>\n' +
' <td style="font-size: xx-small;color: black;">来源:<span>嗨森逛</span></td>\n' +
' </tr>\n' +
' <tr>\n' +
' <td style="font-size: xx-small;color: black;">油枪:<span>' + data['gasGunNo'] + '</span></td>\n' +
' </tr>\n' +
' <tr>\n' +
' <td style="font-size: xx-small;color: black;">油品:<span>' + data['gasOilNo'] + '</span></td>\n' +
' </tr>\n' +
' <tr>\n' +
' <td style="font-size: xx-small;color: black;">升数:<span>' + data['gasOilLiters'] + '升</span></td>\n' +
' </tr>\n' +
' <tr>\n' +
' <td style="font-size: xx-small;color: black;">实际加油升数以油站加油机为准!</td>\n' +
' </tr>\n' +
' <tr><td style="float: left;margin-top: 10px;font-size: 30px;color: black">加油金额</td></tr>\n' +
' <tr><td style="font-size: 30px;color: black">¥' + data['totalPrice'] + '元</td></tr>\n' +
' <tr><td style="font-size: xx-small;color: black;">-------------------------------------------</td></tr>\n' +
' <tr><td style="float: left;font-size: xx-small;color: black;margin-left: 25px;">开心又省钱; 来”嗨森逛“</td></tr>\n' +
' </tbody>\n' +
' </table>\n' +
' </div>\n' +
'</div>';
// 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;
}

@ -6,42 +6,45 @@
<div class="inner-content">
<form nz-form [formGroup]="searchForm" (ngSubmit)="getRequest(true , searchForm.value)">
<div nz-row>
<div nz-col nzSpan="8">
<nz-form-item>
<nz-form-label [nzSpan]="6">订单状态</nz-form-label>
<nz-form-label [nzSpan]="6">充值内容</nz-form-label>
<nz-form-control [nzSpan]="16">
<nz-select nzShowSearch nzAllowClear formControlName="status" nzPlaceHolder="请选择订单状态">
<nz-option nzLabel="待支付" nzValue="1"></nz-option>
<nz-option nzLabel="已支付" nzValue="2"></nz-option>
<nz-option nzLabel="已完成" nzValue="3"></nz-option>
<nz-option nzLabel="已取消" nzValue="4"></nz-option>
<nz-option nzLabel="已退款" nzValue="5"></nz-option>
<nz-option nzLabel="退款中" nzValue="6"></nz-option>
</nz-select>
<input nz-input placeholder="请输入充值内容..." [formControlName]="'rechargeContent'"/>
</nz-form-control>
</nz-form-item>
</div>
<div nz-col nzSpan="8">
<nz-form-item>
<nz-form-label [nzSpan]="6">充值类型</nz-form-label>
<nz-form-label [nzSpan]="6">订单号</nz-form-label>
<nz-form-control [nzSpan]="16">
<nz-select nzShowSearch nzAllowClear formControlName="rechargeModel" nzPlaceHolder="请选择订单状态">
<nz-option nzLabel="电信充值" nzValue="1"></nz-option>
<nz-option nzLabel="移动充值" nzValue="2"></nz-option>
<nz-option nzLabel="联通充值" nzValue="3"></nz-option>
<input nz-input placeholder="请输入订单号..." [formControlName]="'orderNo'"/>
</nz-form-control>
</nz-form-item>
</div>
<div nz-col nzSpan="8">
<nz-form-item>
<nz-form-label [nzSpan]="6">支付状态</nz-form-label>
<nz-form-control [nzSpan]="16">
<nz-select nzShowSearch nzAllowClear formControlName="payStatus" nzPlaceHolder="请选择订单状态">
<nz-option nzLabel="待支付" nzValue="101"></nz-option>
<nz-option nzLabel="已支付" nzValue="102"></nz-option>
<nz-option nzLabel="已完成" nzValue="100"></nz-option>
<nz-option nzLabel="已取消" nzValue="104"></nz-option>
<nz-option nzLabel="已退款" nzValue="105"></nz-option>
</nz-select>
</nz-form-control>
</nz-form-item>
</div>
<div nz-col nzSpan="8">
<nz-form-item>
<nz-form-label [nzSpan]="6">充值类型</nz-form-label>
<nz-form-label [nzSpan]="6">充值状态</nz-form-label>
<nz-form-control [nzSpan]="16">
<nz-select nzShowSearch nzAllowClear formControlName="rechargeType" nzPlaceHolder="请选择充值类型">
<nz-option nzLabel="快充" nzValue="1"></nz-option>
<nz-option nzLabel="慢充" nzValue="2"></nz-option>
<nz-select nzShowSearch nzAllowClear formControlName="rechargeStatus" nzPlaceHolder="请选择充值状态">
<nz-option nzLabel="充值中" nzValue="201"></nz-option>
<nz-option nzLabel="充值成功" nzValue="202"></nz-option>
<nz-option nzLabel="充值失败" nzValue="203"></nz-option>
<nz-option nzLabel="未充值" nzValue="204"></nz-option>
</nz-select>
</nz-form-control>
</nz-form-item>
@ -49,38 +52,46 @@
<div nz-col nzSpan="8">
<nz-form-item>
<nz-form-label [nzSpan]="6">支付方式</nz-form-label>
<nz-form-label [nzSpan]="6">运营商类型</nz-form-label>
<nz-form-control [nzSpan]="16">
<nz-select nzShowSearch nzAllowClear formControlName="payType" nzPlaceHolder="支付方式">
<nz-option nzLabel="微信" nzValue="1"></nz-option>
<nz-option nzLabel="工会卡" nzValue="2"></nz-option>
<nz-option nzLabel="积分" nzValue="3"></nz-option>
<nz-option nzLabel="银联" nzValue="4"></nz-option>
<nz-select nzShowSearch nzAllowClear formControlName="operatorType" nzPlaceHolder="请选择运营商类型">
<nz-option nzLabel="电信运营商" nzValue="1"></nz-option>
<nz-option nzLabel="移动运营商" nzValue="2"></nz-option>
<nz-option nzLabel="联通运营商" nzValue="3"></nz-option>
</nz-select>
</nz-form-control>
</nz-form-item>
</div>
<div nz-col nzSpan="8">
<nz-form-item>
<nz-form-label [nzSpan]="6">充值号码</nz-form-label>
<nz-form-label [nzSpan]="6">充值类型</nz-form-label>
<nz-form-control [nzSpan]="16">
<input nz-input placeholder="请输入充值号码..." [formControlName]="'rechargeContent'"/>
<nz-select nzShowSearch nzAllowClear formControlName="rechargeType" nzPlaceHolder="请选择充值类型">
<nz-option nzLabel="快充" nzValue="1"></nz-option>
<nz-option nzLabel="慢充" nzValue="2"></nz-option>
</nz-select>
</nz-form-control>
</nz-form-item>
</div>
<div nz-col nzSpan="8">
<nz-form-item>
<nz-form-label [nzSpan]="6">订单号</nz-form-label>
<nz-form-label [nzSpan]="6">支付方式</nz-form-label>
<nz-form-control [nzSpan]="16">
<input nz-input placeholder="请输入订单号..." [formControlName]="'orderNo'"/>
<nz-select nzShowSearch nzAllowClear formControlName="payType" nzPlaceHolder="支付方式">
<nz-option nzLabel="微信支付" nzValue="2"></nz-option>
<nz-option nzLabel="工会卡支付" nzValue="3"></nz-option>
<nz-option nzLabel="银联支付" nzValue="4"></nz-option>
</nz-select>
</nz-form-control>
</nz-form-item>
</div>
<div nz-col nzSpan="8">
<nz-form-item>
<nz-form-label [nzSpan]="6">工会卡卡号</nz-form-label>
<nz-form-control [nzSpan]="16">
<input nz-input placeholder="请输入工会卡卡号..." [formControlName]="'idCard'"/>
<input nz-input placeholder="请输入工会卡卡号..." [formControlName]="'laborUnionCard'"/>
</nz-form-control>
</nz-form-item>
</div>
@ -93,6 +104,15 @@
</nz-form-control>
</nz-form-item>
</div>
<div nz-col nzSpan="8">
<nz-form-item>
<nz-form-label [nzSpan]="6">创建时间</nz-form-label>
<nz-form-control [nzSpan]="16">
<nz-range-picker [nzShowTime]="{ nzFormat: 'HH:mm' }"
formControlName="createTime"></nz-range-picker>
</nz-form-control>
</nz-form-item>
</div>
</div>
<div nz-row>
<div nz-col nzSpan="24" class="search-button">
@ -108,10 +128,16 @@
<div class="inner-content">
<span>共计 {{total}} 条数据</span>
<div class="operating-button">
<button nz-button nzType="primary" class="right-btn" (click)="downloadTemplate(searchForm.value)"><i nz-icon
nzType="download"
nzTheme="outline"></i>导出订单
</button>
<nz-upload
[nzAccept]="'.xls,.xlsx'"
nzAction="{{WEB_SERVE_URL}}outRechargeOrder/importRechargeOrder"
[nzHeaders]="{ authorization: 'authorization-text' }"
(nzChange)="handleChange($event)"
[nzShowUploadList]="false"
>
<button nz-button nzType="primary" ><i nz-icon nzType="import" nzTheme="outline"></i>导入充值订单</button>
</nz-upload>
<button nz-button nzType="primary" class="right-btn" (click)="downloadTemplate(searchForm.value)" ><i nz-icon nzType="download" nzTheme="outline"></i>导出订单</button>
</div>
<nz-table
class="table"
@ -136,6 +162,7 @@
<th nzWidth="180px">充值订单号</th>
<th nzWidth="120px">客户名称</th>
<th nzWidth="140px">生成时间</th>
<th nzWidth="140px">支付时间</th>
<th nzWidth="100px" nzRight>支付方式</th>
<th nzWidth="90px" nzRight>充值状态</th>
<th nzWidth="100px" nzRight>支付状态</th>
@ -152,6 +179,7 @@
<td>{{data.orderNo}}</td>
<td>{{data.userName == null ? '暂无' : data.userName}}</td>
<td>{{data.createTimed | date: 'yyyy-MM-dd HH:mm:ss'}}</td>
<td>{{data.payTime | date: 'yyyy-MM-dd HH:mm:ss'}}</td>
<td nzRight>{{data.payType | rechargePayType}}</td>
<td nzRight>{{data.rechargeStatus | rechargeStatus}}</td>
<td nzRight>{{data.payStatus | payStatus}}</td>

@ -76,16 +76,17 @@ export class OrderListComponent implements OnInit , OnDestroy {
public init(): void {
this.searchForm = this.form.group({
status: [null],
orderNo: [null],
rechargeModel: [null],
idCard: [null],
rechargeContent: [null],
userPhone: [null],
rechargeType: [null],
payTime: [null],
payType: [null],
createTime: [null],
payStatus: [null], // 支付状态
rechargeStatus: [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]],
@ -149,57 +150,6 @@ export class OrderListComponent implements OnInit , OnDestroy {
}
public getMobileRechargeByOrderId(id: number): void {
this.common.showConfirm('确认订单是否再次充值', item => {
if (item) {
this.recharge.getMobileRechargeByOrderId(id, 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 orderToRefund(id): void {
this.common.showConfirm('确认订单是否退款', item => {
if (item) {
this.recharge.orderToRefund(id, data => {
if (data['return_code'] === '000000') {
this.message.success('退款成功');
this.getRequest(false, this.searchForm.value);
} else {
this.message.error(data['return_msg']);
}
});
}
});
}
public postRefund(orderNo): void {
this.common.showConfirm('确认订单申请退款', item => {
if (item) {
this.recharge.postRefund({
refundSource: 1 ,
sourceOrderNo: orderNo
}, data => {
if (data['return_code'] === '000000') {
this.message.success('申请成功');
this.getRequest(false, this.searchForm.value);
} else {
this.message.error(data['return_msg']);
}
});
}
});
}
// 下载模板
downloadTemplate(whereObject) {

@ -72,6 +72,19 @@
</nz-form-control>
</nz-form-item>
</div>
<div nz-col nzSpan="8">
<nz-form-item>
<nz-form-label [nzSpan]="8">订单状态</nz-form-label>
<nz-form-control [nzSpan]="14">
<nz-select formControlName="orderStatus" nzAllowClear>
<nz-option nzValue="3" nzLabel="已完成"></nz-option>
<nz-option nzValue="4" nzLabel="已退款"></nz-option>
<nz-option nzValue="6" nzLabel="退款中"></nz-option>
<nz-option nzValue="7" nzLabel="退款驳回"></nz-option>
</nz-select>
</nz-form-control>
</nz-form-item>
</div>
</div>
<div nz-row>
@ -117,6 +130,8 @@
<th nzWidth="100px">团油枪价</th>
<th nzWidth="170px">创建时间</th>
<th nzWidth="170px">支付时间</th>
<th nzWidth="100px">订单状态</th>
<th nzWidth="170px">退款时间</th>
<th nzWidth="110px" nzRight="0px">操作</th>
</tr>
</thead>
@ -139,6 +154,13 @@
<td>{{data.gasPriceGun}}元</td>
<td>{{data.createTime | date : 'yyyy-MM-dd HH:mm:ss'}}</td>
<td>{{data.payTime | date : 'yyyy-MM-dd HH:mm:ss'}}</td>
<td>
<span *ngIf="data.orderStatus == 3">已完成</span>
<span *ngIf="data.orderStatus == 4">已退款</span>
<span *ngIf="data.orderStatus == 6">退款中</span>
<span *ngIf="data.orderStatus == 7">退款驳回</span>
</td>
<td>{{data.refundTime | date : 'yyyy-MM-dd HH:mm:ss'}}</td>
<td nzRight="0px" class="table-td-operation">
<a nz-dropdown [nzDropdownMenu]="menu"> 操作列表 <i nz-icon nzType="down"></i> </a>
<nz-dropdown-menu #menu="nzDropdownMenu">

@ -53,6 +53,7 @@ export class TyOrderListComponent implements OnInit {
salesmanId: [null],
memPhone: [null],
payTimeArray: [null],
orderStatus: [null],
});
this.requestData(1);

@ -0,0 +1,39 @@
import { Injectable } from '@angular/core';
import {HttpClient} from '_@angular_common@9.0.7@@angular/common/http';
import {CommonsService} from './commons.service';
import {environment} from '../../environments/environment';
@Injectable({
providedIn: 'root'
})
export class MerchantTripartitePlatformService {
constructor(
private http: HttpClient,
private common: CommonsService
) { }
/**
*
*
* @param paramsObject
* @param callBack
*/
public editTripartitePlatform(paramsObject: object, callBack) {
this.http.post(environment.baseUrl + 'merchantTripartitePlatform/editTripartitePlatform', paramsObject).subscribe(data => {
callBack(data);
});
}
/**
*
*
* @param paramsObject
* @param callBack
*/
public getDetail(merId: number, platformType: number, callBack) {
this.http.get(environment.baseUrl + 'merchantTripartitePlatform/getDetail?merId=' + merId + '&platformType=' + platformType).subscribe(data => {
callBack(data);
});
}
}

@ -14,6 +14,19 @@ export class OrderService {
) {
}
/**
*
*
* @param paramsObject
* @param callBack
*/
public print(orderId: number, callBack) {
this.http.get(environment.baseUrl + 'highOrder/print?orderId=' + orderId).subscribe(data => {
callBack(data);
});
}
/**
*
*

@ -6,8 +6,8 @@ export const environment = {
production: false,
baseUrl: 'http://localhost:9302/brest/', // 测试环境服务器地址(请求数据地址)
imageUrl: 'http://localhost:9302/filesystem/',
/* baseUrl: 'https://hsg.dctpay.com/brest/', // 测试环境服务器地址(请求数据地址)
imageUrl: 'https://hsg.dctpay.com/filesystem/',*/
// baseUrl: 'https://hsgcs.dctpay.com/brest/', // 测试环境服务器地址(请求数据地址)
// 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=',
};

@ -16,7 +16,8 @@
],
"lib": [
"es2018",
"dom"
"dom",
"scripthost"
],
"allowSyntheticDefaultImports": true
},

Loading…
Cancel
Save