提交代码

master
胡锐 4 months ago
parent c5f29ceefc
commit aaa7405c71
  1. 15
      src/app/pages/body/index/index.component.ts
  2. 14
      src/app/pages/login/login/login.component.ts
  3. 37
      src/app/pages/trade/order-oil-list/order-oil-list.component.html
  4. 20
      src/app/pages/trade/order-oil-list/order-oil-list.component.ts

@ -22,6 +22,7 @@ import {Dictionary, dictionaryData} from "../../../data/common/dictionary.namesp
import {CommonService} from "../../../services/common/common.service";
import {LoginService} from "../../../services/login/login.service";
import {NzConfigService} from "ng-zorro-antd/core/config";
import {buttonData} from "../../../data/common/button.namespace";
@Component({
selector: 'app-index',
@ -76,6 +77,20 @@ export class IndexComponent {
private router: Router, // 路由
private login: LoginService
) {
// 缓存角色按钮权限
for (let item of this.storage.get(DATA)['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.commonService.queryDictionary('','',(data: any) => {
dictionaryData.length = 0;

@ -99,20 +99,6 @@ 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);
// 缓存角色按钮权限
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']);

@ -57,6 +57,24 @@
</nz-form-control>
</nz-form-item>
</div>
<div *ngIf="accountType == 1 || accountType == 4 || accountType == 5" nz-col [nzSpan]="6" [hidden]="!isCollapse">
<nz-form-item>
<nz-form-label>渠道</nz-form-label>
<nz-form-control>
<nz-select formControlName="channelType" nzAllowClear [nzPlaceHolder]="'请选择'">
<nz-option *ngFor="let item of channelTypeArray" nzValue="{{item.codeValue}}" nzLabel="{{item.codeName}}"></nz-option>
</nz-select>
</nz-form-control>
</nz-form-item>
</div>
<div *ngIf="accountType == 1 || accountType == 4 || accountType == 5" nz-col [nzSpan]="6" [hidden]="!isCollapse">
<nz-form-item>
<nz-form-label>渠道单号</nz-form-label>
<nz-form-control>
<input nz-input formControlName="channelOrderNo" placeholder="请输入" />
</nz-form-control>
</nz-form-item>
</div>
<div *ngIf="accountType == 1 || accountType == 2 || accountType == 3" nz-col [nzSpan]="6" [hidden]="!isCollapse">
<nz-form-item>
<nz-form-label>客户电话</nz-form-label>
@ -126,7 +144,7 @@
</div>
</div>
<nz-table #basicTable
[nzScroll]="{ x: '4500px'}"
[nzScroll]="{ x: '5000px'}"
[nzBordered]="true"
[nzFrontPagination]="false"
[nzShowQuickJumper]="true"
@ -140,6 +158,8 @@
<th *ngIf="accountType == 1" rowspan="2" nzWidth="100px">代理商</th>
<th *ngIf="accountType == 1 || accountType == 4" rowspan="2" nzWidth="100px">业务员</th>
<th rowspan="2" nzWidth="200px">交易单号</th>
<th *ngIf="accountType == 1 || accountType == 4 || accountType == 5" rowspan="2" nzWidth="150px">渠道</th>
<th *ngIf="accountType == 1 || accountType == 4 || accountType == 5" rowspan="2" nzWidth="250px">渠道单号</th>
<th *ngIf="accountType == 1 || accountType == 2 || accountType == 3" rowspan="2" nzWidth="120px">客户电话</th>
<th *ngIf="accountType == 1 || accountType == 4 || accountType == 5" rowspan="2" nzWidth="200px">加油站</th>
<th *ngIf="accountType == 1 || accountType == 2" rowspan="2" nzWidth="120px">加油员</th>
@ -172,10 +192,13 @@
</tr>
</thead>
<tbody>
<tr *ngFor="let data of basicTable.data;let i = index">
<tr *ngFor="let data of basicTable.data;let i = index" [style]="{ color: data.color}">
<!--<span nz-tooltip nzTooltipTitle="prompt text">Tooltip will show when mouse enter.</span>-->
<td *ngIf="accountType == 1">{{data.agentName?data.agentName:'无'}}</td>
<td *ngIf="accountType == 1 || accountType == 4">{{data.agentStaffName?data.agentStaffName:'无'}}</td>
<td>{{data.orderNo}}</td>
<td *ngIf="accountType == 1 || accountType == 4 || accountType == 5">{{data.channelType | dictionary: 'MER_SOURCE_TYPE'}}</td>
<td *ngIf="accountType == 1 || accountType == 4 || accountType == 5">{{data.channelOrderNo!=null?data.channelOrderNo:'无'}}</td>
<td *ngIf="accountType == 1 || accountType == 2 || accountType == 3">{{data.userPhone!=null?data.userPhone:'无'}}</td>
<td *ngIf="accountType == 1 || accountType == 4 || accountType == 5">{{data.merName}}</td>
<td *ngIf="accountType == 1 || accountType == 2">{{data.gasStaffName?data.gasStaffName:'未知'}}</td>
@ -192,7 +215,7 @@
<td>{{data.deductionOilPrice}}元</td>
<td>{{data.payablePrice}}元</td>
<td>{{data.payIntegral / 100}}元</td>
<td>{{data.actualPayPrice!=null?data.payPrice+'元':'未支付'}}</td>
<td>{{data.actualPayPrice!=null?data.actualPayPrice+'元':'未支付'}}</td>
<td>{{data.payType | dictionary: 'ORDER_PAY_TYPE'}}</td>
<td>{{data.paySerialNo}}</td>
<td>{{data.status | dictionary: 'GAS_ORDER_STATUS'}}</td>
@ -206,7 +229,7 @@
<ul nz-menu nzSelectable>
<li nz-menu-item (click)="showOrderDetail(data.orderNo)">交易详情</li>
<li *ngIf="data.status == 2 && GAS_REFUND_BTN" (click)="showRefund(data.orderNo, data.orderChildNo)" nz-menu-item>交易退款</li>
<li *ngIf="data.status == 2 && GAS_ORDER_PRINT_BTN" (click)="showOrderPrint(data.orderNo);" nz-menu-item>打印小票</li>
<li *ngIf="data.channelType == 1 && data.status == 2 && GAS_ORDER_PRINT_BTN" (click)="showOrderPrint(data.orderNo);" nz-menu-item>打印小票</li>
</ul>
</nz-dropdown-menu>
</td>
@ -224,6 +247,8 @@
<nz-tab nzTitle="加油详情">
<nz-descriptions nzBordered [nzColumn]="2" [nzSize]="'middle'">
<nz-descriptions-item nzSpan="2" nzTitle="加油站">{{orderDetailObject.gasOrder.merName}}</nz-descriptions-item>
<nz-descriptions-item *ngIf="accountType == 1 || accountType == 4 || accountType == 5" nzTitle="渠道">{{orderDetailObject.gasOrder.channelType | dictionary: 'MER_SOURCE_TYPE'}}</nz-descriptions-item>
<nz-descriptions-item *ngIf="accountType == 1 || accountType == 4 || accountType == 5" nzTitle="渠道单号">{{orderDetailObject.gasOrder.channelOrderNo?orderDetailObject.gasOrder.channelOrderNo:'无'}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="加油单号">{{orderDetailObject.tradeOrder.orderNo}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="交易状态">{{orderDetailObject.tradeOrder.orderStatus| dictionary: 'GAS_ORDER_STATUS' }}</nz-descriptions-item>
<nz-descriptions-item nzTitle="支付方式">{{orderDetailObject.tradeOrder.payType | dictionary: 'ORDER_PAY_TYPE'}}</nz-descriptions-item>
@ -254,6 +279,8 @@
<nz-descriptions-item *ngIf="accountType == 1 || accountType == 4" nzTitle="业务员">
{{orderDetailObject.gasOrder.agentStaffName?orderDetailObject.gasOrder.agentStaffName:'无'}}
</nz-descriptions-item>
<nz-descriptions-item nzSpan="1" *ngIf="orderDetailObject.gasOrder.abnormal == 1" nzTitle="异常状态"> <nz-badge nzStatus="error" nzText="交易异常"></nz-badge></nz-descriptions-item>
<nz-descriptions-item nzSpan="1" *ngIf="orderDetailObject.gasOrder.abnormal == 1" nzTitle="异常原因">{{orderDetailObject.gasOrder.abnormalContent}}</nz-descriptions-item>
</nz-descriptions>
</nz-tab>
<nz-tab nzTitle="交易时间">
@ -284,7 +311,7 @@
</nz-form-item>
<nz-form-item>
<nz-form-label>退款备注</nz-form-label>
<nz-form-label nzRequired>退款备注</nz-form-label>
<nz-form-control>
<textarea rows="4" nz-input formControlName="remarks" maxlength="100"></textarea>
</nz-form-control>

@ -36,6 +36,8 @@ 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";
import {NzTooltipDirective} from "ng-zorro-antd/tooltip";
import {symlinkSync} from "fs";
@Component({
selector: 'app-order-oil-list',
@ -83,6 +85,7 @@ import {ButtonPipe} from "../../../pipes/common/button.pipe";
NzTimelineItemComponent,
NzTimelineComponent,
NzBadgeComponent,
NzTooltipDirective,
],
templateUrl: './order-oil-list.component.html',
styleUrl: './order-oil-list.component.less'
@ -119,6 +122,8 @@ export class OrderOilListComponent {
oilNoArray = new DictionaryPipe().getDictionaryList('OIL_NO');
// 支付类型
payTypeArray = new DictionaryPipe().getDictionaryList('ORDER_PAY_TYPE');
// 渠道
channelTypeArray = new DictionaryPipe().getDictionaryList('MER_SOURCE_TYPE');
// 账户类型
accountType: number;
// 代理商
@ -154,7 +159,7 @@ export class OrderOilListComponent {
this.refundForm = this.fb.group({
orderNo: [{ value: null, disabled: true}, [Validators.required]],
childOrderNo: [{ value: null, disabled: true}, [Validators.required]],
remarks: [null],
remarks: [null,[Validators.required]],
});
// 初始化搜索框
@ -164,6 +169,8 @@ export class OrderOilListComponent {
orderNo: [''],
payType: [''],
paySerialNo: [''],
channelType: [''],
channelOrderNo: [''],
gasOilNo: [''],
gasStaffName: [''],
agentId: [''],
@ -183,7 +190,6 @@ export class OrderOilListComponent {
// 查询代理商
this.queryAgent();
}
if (this.accountType == 4) {
// 查询业务员
this.queryAgentStaff(this.storage.get(DATA)['account']['objectId']);
@ -215,8 +221,8 @@ export class OrderOilListComponent {
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]);
this.searchForm.controls['createTimeS'].setValue(new Date(this.searchForm.controls['createTimeArray'].value[0]).getTime());
this.searchForm.controls['createTimeE'].setValue(new Date(this.searchForm.controls['createTimeArray'].value[1]).getTime());
} else {
this.searchForm.controls['createTimeS'].setValue(null);
this.searchForm.controls['createTimeE'].setValue(null);
@ -228,6 +234,11 @@ export class OrderOilListComponent {
this.orderOilService.queryList(this.searchForm.value, (data: any) => {
if (data['return_code'] == '000000') {
this.tableData = data['return_data'];
for (let data of this.tableData['list']) {
if (data['abnormal'] == 1) {
data['color'] = 'red';
}
}
}
});
// 查询统计
@ -386,4 +397,5 @@ export class OrderOilListComponent {
})
}
}

Loading…
Cancel
Save