This commit is contained in:
Taric Xin
2022-04-01 10:29:52 +08:00
parent 032f214345
commit a3293f7a54
3 changed files with 295 additions and 4 deletions

View File

@ -0,0 +1,252 @@
"use strict";
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
exports.__esModule = true;
exports.RechargeRecordComponent = void 0;
var core_1 = require("@angular/core");
var RechargeRecordComponent = /** @class */ (function () {
function RechargeRecordComponent(service, modal) {
var _this = this;
this.service = service;
this.modal = modal;
this.columns = this.initST();
this.searchSchema = this.initSF();
this.rechargeRemark = '';
this._$expand = false;
this.beforeReq = function (requestOptions) {
if (_this.sf) {
Object.assign(requestOptions.body, __assign({}, _this.sf.value));
}
return requestOptions;
};
}
RechargeRecordComponent.prototype.ngOnInit = function () { };
RechargeRecordComponent.prototype.addRemark = function (item) {
var _this = this;
this.rechargeRemark = item.rechargeRemark;
var modal = this.modal.create({
nzTitle: this.rechargeRemark ? '修改备注' : '添加备注',
nzContent: this.remarkodal,
nzFooter: [
{
type: 'primary',
label: '确认',
loading: function () { return _this.service.http.loading; },
onClick: function () {
modal.destroy();
}
}
]
});
};
RechargeRecordComponent.prototype.goBack = function () {
history.go(-1);
};
/**
* 重置表单
*/
RechargeRecordComponent.prototype.resetSF = function () {
this.sf.reset();
this._$expand = false;
};
/**
* 伸缩查询条件
*/
RechargeRecordComponent.prototype.expandToggle = function () {
var _a;
this._$expand = !this._$expand;
(_a = this.sf) === null || _a === void 0 ? void 0 : _a.setValue('/expand', this._$expand);
};
RechargeRecordComponent.prototype.exportList = function () {
this.service.downloadFile(this.service.$mock_url, __assign(__assign({}, this.sf.value), { pageSize: -1 }));
};
RechargeRecordComponent.prototype.initSF = function () {
var _this = this;
return {
properties: {
expand: {
type: 'boolean',
ui: {
hidden: true
}
},
rechargeNo: {
type: 'string',
title: '充值单号',
ui: {
placeholder: '请输入'
}
},
rechargeStatus: {
type: 'string',
title: '充值状态',
"enum": [
{ label: '全部', value: '' },
{ label: '充值中', value: '1' },
{ label: '充值失败', value: '2' },
{ label: '充值成功', value: '3' }
],
ui: {
widget: 'select',
placeholder: '请选择'
},
"default": ''
},
createTime: {
title: '充值时间',
type: 'string',
ui: {
widget: 'date',
mode: 'range',
format: 'yyyy-MM-dd'
}
},
roleName: {
type: 'string',
title: '账户名称',
ui: {
placeholder: '请输入',
autocomplete: 'off',
visibleIf: {
expand: function (value) { return value; }
}
}
},
accountType: {
type: 'string',
title: '账户类型',
"enum": [
{ label: '全部', value: '' },
{ label: '货主账户', value: '1' },
{ label: '司机账户', value: '2' },
{ label: '营商商账户', value: '3' }
],
ui: {
widget: 'select',
placeholder: '请选择',
visibleIf: {
expand: function (value) { return value; }
}
},
"default": ''
},
ltdId: {
type: 'string',
title: '网络货运人',
ui: {
widget: 'select',
placeholder: '请选择',
visibleIf: {
expand: function (value) { return value; }
},
allowClear: true,
asyncData: function () { return _this.service.getNetworkFreightForwarder(); }
}
},
bankType: {
type: 'string',
title: '银行类型',
"enum": [
{ label: '全部', value: '' },
{ label: '平安银行', value: '1' },
{ label: '浦发银行', value: '2' }
],
ui: {
widget: 'select',
placeholder: '请选择',
visibleIf: {
expand: function (value) { return value; }
}
},
"default": ''
}
}
};
};
RechargeRecordComponent.prototype.initST = function () {
var _this = this;
return [
{ title: '充值时间', index: 'createTime', type: 'date', width: 180 },
{ title: '充值单号', index: 'rechargeNo', width: 140 },
{ title: '网络货运人', index: 'ltdName', width: 160 },
{ title: '银行类型', index: 'bankTypeLabel', width: 100 },
{ title: '账户类型', index: 'accountTypeLabel', width: 100 },
{ title: '账户名称', index: 'roleName', width: 160 },
{ title: '虚拟账户', index: 'virtualAccount', width: 100 },
{
title: '充值金额',
index: 'rechargeAmount',
width: 160,
type: 'widget',
className: 'text-right',
widget: { type: 'currency-chy', params: function (_a) {
var record = _a.record;
return ({ value: record.rechargeAmount });
} }
},
{ title: '充值银行账户', render: 'transferBankAccount', width: 200 },
{ title: '充值方式', index: 'payChannelLabel', width: 100 },
{ title: '充值状态', index: 'rechargeStatusLabel', width: 100 },
{ title: '银行流水号', index: 'paySerialNumber', width: 120 },
{
title: '操作',
width: 120,
fixed: 'right',
className: 'text-center',
buttons: [
{ type: 'divider' },
{
text: '查看回单<br>',
click: function (item) {
return _this.service.getReceiptUrl(item.receiptUrl, {
bankType: item.bankType,
rmYll: item.roleId,
snglFlgCd: item.paySerialNumber2,
bussType: '06',
ltdId: item.ltdId,
accountType: item.accountType
});
}
},
{
text: '添加备注',
click: function (item) { return _this.addRemark(item); }
}
]
}
];
};
__decorate([
core_1.ViewChild('st', { static: true })
], RechargeRecordComponent.prototype, "st");
__decorate([
core_1.ViewChild('sf', { static: false })
], RechargeRecordComponent.prototype, "sf");
__decorate([
core_1.ViewChild('remarkodal', { static: true })
], RechargeRecordComponent.prototype, "remarkodal");
RechargeRecordComponent = __decorate([
core_1.Component({
selector: 'app-recharge-record',
templateUrl: './recharge-record.component.html',
styleUrls: ['../../../commom/less/box.less', '../../../commom/less/expend-but.less']
})
], RechargeRecordComponent);
return RechargeRecordComponent;
}());
exports.RechargeRecordComponent = RechargeRecordComponent;

View File

@ -42,4 +42,15 @@
{{ item.transferBankOpenName }} <br> {{ item.transferBankCardNumber }} {{ item.transferBankOpenName }} <br> {{ item.transferBankCardNumber }}
</ng-template> </ng-template>
</st> </st>
</nz-card> </nz-card>
<ng-template #remarkodal>
<div nz-row>
<div nz-col nzSpan="24" se-container [labelWidth]="80">
<se [col]="1" label="备注">
<textarea nz-input rows="3" [(ngModel)]="rechargeRemark" placeholder="最多不能超过100字"
maxlength="100"></textarea>
</se>
</div>
</div>
</ng-template>

View File

@ -1,6 +1,7 @@
import { Component, OnInit, ViewChild } from '@angular/core'; import { Component, OnInit, ViewChild } from '@angular/core';
import { STComponent, STColumn, STChange, STRequestOptions } from '@delon/abc/st'; import { STComponent, STColumn, STChange, STRequestOptions } from '@delon/abc/st';
import { SFComponent, SFSchema, SFDateWidgetSchema } from '@delon/form'; import { SFComponent, SFSchema, SFDateWidgetSchema } from '@delon/form';
import { NzModalService } from 'ng-zorro-antd/modal';
import { FreightAccountService } from '../../services/freight-account.service'; import { FreightAccountService } from '../../services/freight-account.service';
@Component({ @Component({
@ -16,8 +17,12 @@ export class RechargeRecordComponent implements OnInit {
columns: STColumn[] = this.initST(); columns: STColumn[] = this.initST();
searchSchema: SFSchema = this.initSF(); searchSchema: SFSchema = this.initSF();
@ViewChild('remarkodal', { static: true })
remarkodal!: any;
rechargeRemark = '';
_$expand = false; _$expand = false;
constructor(public service: FreightAccountService) {} constructor(public service: FreightAccountService, private modal: NzModalService) {}
ngOnInit(): void {} ngOnInit(): void {}
@ -28,6 +33,24 @@ export class RechargeRecordComponent implements OnInit {
return requestOptions; return requestOptions;
}; };
addRemark(item: any) {
this.rechargeRemark = item.rechargeRemark;
const modal = this.modal.create({
nzTitle: this.rechargeRemark ? '修改备注' : '添加备注',
nzContent: this.remarkodal,
nzFooter: [
{
type: 'primary',
label: '确认',
loading: () => this.service.http.loading,
onClick: () => {
modal.destroy();
}
}
]
});
}
goBack() { goBack() {
history.go(-1); history.go(-1);
} }
@ -178,12 +201,13 @@ export class RechargeRecordComponent implements OnInit {
{ title: '银行流水号', index: 'paySerialNumber', width: 120 }, { title: '银行流水号', index: 'paySerialNumber', width: 120 },
{ {
title: '操作', title: '操作',
width: 100, width: 120,
fixed: 'right', fixed: 'right',
className: 'text-center', className: 'text-center',
buttons: [ buttons: [
{ type: 'divider' },
{ {
text: '查看回单', text: '查看回单<br>',
click: item => click: item =>
this.service.getReceiptUrl(item.receiptUrl, { this.service.getReceiptUrl(item.receiptUrl, {
bankType: item.bankType, bankType: item.bankType,
@ -193,6 +217,10 @@ export class RechargeRecordComponent implements OnInit {
ltdId: item.ltdId, ltdId: item.ltdId,
accountType: item.accountType accountType: item.accountType
}) })
},
{
text: '添加备注',
click: item => this.addRemark(item)
} }
] ]
} }