提交代码

master
胡锐 2 months ago
parent a15ebf54cb
commit 9ee07d7609
  1. 83
      src/app/pages/merchant/mer-list/mer-list.component.html
  2. 29
      src/app/pages/merchant/mer-list/mer-list.component.less
  3. 47
      src/app/pages/merchant/mer-list/mer-list.component.ts
  4. 26
      src/app/pages/trade/order-oil-list/order-oil-list.component.html
  5. 4
      src/app/pages/trade/order-oil-list/order-oil-list.component.ts
  6. 12
      src/app/services/common/common.service.ts
  7. 4
      src/app/services/merchant/mer.service.ts

@ -2,81 +2,108 @@
<div nz-row [nzGutter]="24">
<div nz-col [nzSpan]="6">
<nz-form-item>
<nz-form-label>商户号</nz-form-label>
<nz-form-label>所在省级</nz-form-label>
<nz-form-control>
<input nzSize="large" nz-input formControlName="merNo" placeholder="请输入" />
<nz-select formControlName="provinceCode" nzAllowClear [nzPlaceHolder]="'请选择'" nzShowSearch>
<nz-option *ngFor="let item of regionData" nzValue="{{item.regionId}}" nzLabel="{{item.regionName}}"></nz-option>
</nz-select>
</nz-form-control>
</nz-form-item>
</div>
<div nz-col [nzSpan]="6">
<nz-form-item>
<nz-form-label>商户名称</nz-form-label>
<nz-form-label>来源渠道</nz-form-label>
<nz-form-control>
<input nzSize="large" nz-input formControlName="merName" placeholder="请输入" />
<nz-select formControlName="sourceType" nzAllowClear [nzPlaceHolder]="'请选择'">
<nz-option *ngFor="let item of merSourceTypeArray" nzValue="{{item.codeValue}}" nzLabel="{{item.codeName}}"></nz-option>
</nz-select>
</nz-form-control>
</nz-form-item>
</div>
<div nz-col [nzSpan]="6">
<nz-form-item>
<nz-form-label>创建人</nz-form-label>
<nz-form-label>油站编号</nz-form-label>
<nz-form-control>
<input nzSize="large" nz-input formControlName="opUserName" placeholder="请输入" />
<input nz-input formControlName="merNo" placeholder="请输入" />
</nz-form-control>
</nz-form-item>
</div>
<!-- <div nz-col [nzSpan]="6">
<div nz-col [nzSpan]="6">
<nz-form-item>
<nz-form-label>商户状态</nz-form-label>
<nz-form-label>油站名称</nz-form-label>
<nz-form-control>
<nz-select nzSize="large" formControlName="status" nzAllowClear [nzPlaceHolder]="'请选择'">
<nz-option *ngFor="let item of merStatus" nzValue="{{item.codeValue}}" nzLabel="{{item.codeName}}"></nz-option>
<input nz-input formControlName="merName" placeholder="请输入" />
</nz-form-control>
</nz-form-item>
</div>
<div nz-col [nzSpan]="6" [hidden]="!isCollapse">
<nz-form-item>
<nz-form-label>油站状态</nz-form-label>
<nz-form-control>
<nz-select formControlName="status" nzAllowClear [nzPlaceHolder]="'请选择'">
<nz-option *ngFor="let item of merchantStatusArray" nzValue="{{item.codeValue}}" nzLabel="{{item.codeName}}"></nz-option>
</nz-select>
</nz-form-control>
</nz-form-item>
</div>-->
<div nz-col [nzSpan]="6" class="search-area">
</div>
<div nz-col [nzSpan]="6" [hidden]="!isCollapse">
<nz-form-item>
<nz-form-label>来源渠道</nz-form-label>
<nz-form-control>
<nz-select formControlName="sourceType" nzAllowClear [nzPlaceHolder]="'请选择'">
<nz-option *ngFor="let item of merSourceTypeArray" nzValue="{{item.codeValue}}" nzLabel="{{item.codeName}}"></nz-option>
</nz-select>
</nz-form-control>
</nz-form-item>
</div>
<div nz-col [nzSpan]="24" class="search-area">
<button nz-button [nzType]="'primary'" (click)="searchFormSubmit()">查询</button>
<button nz-button (click)="searchFormReset()">重置</button>
<a class="collapse" (click)="isCollapse = !isCollapse">
更多查询条件
<i nz-icon [nzType]="!isCollapse ? 'down' : 'up'"></i>
</a>
</div>
</div>
</form>
<nz-table #basicTable
[nzScroll]="{ x: '1100px' }"
[nzScroll]="{ x: '1200px' }"
[nzBordered]="true"
[nzFrontPagination]="false"
[nzShowQuickJumper]="true"
[nzShowTotal]="totalTemplate"
[(nzPageIndex)]="tablePageNum"
(nzPageIndexChange)="queryData()"
nzShowSizeChanger
(nzPageSizeChange)="this.tablePageSize = $event;queryData()"
[nzPageSizeOptions]="[ 10, 20, 30, 50, 100 ]"
[nzTotal]="tableData.total"
[nzData]="tableData.list" >
<thead>
<tr>
<th nzWidth="30px">商户号</th>
<th nzWidth="50px">商户名称</th>
<th nzWidth="30px">负责人</th>
<th nzWidth="30px">联系电话</th>
<th nzWidth="30px">创建人</th>
<th nzWidth="30px">创建时间</th>
<th nzWidth="30px">更新时间</th>
<th nzRight nzWidth="50px">操作</th>
<th nzWidth="80px">列表展示</th>
<th nzWidth="120px">来源渠道</th>
<th nzWidth="100px">连锁名称</th>
<th nzWidth="110px">油站编号</th>
<th nzWidth="230px">油站名称</th>
<th nzWidth="180px">油站地区</th>
<th nzWidth="80px">油站状态</th>
<th nzRight nzWidth="110px">操作</th>
</tr>
</thead>
<tbody>
<tr *ngFor="let data of basicTable.data">
<td><nz-switch [(ngModel)]="data.listShow" (ngModelChange)="listShowChange($event)"></nz-switch></td>
<td>{{data.sourceType | dictionary: "MER_SOURCE_TYPE"}}</td>
<td>{{data.chainBrandName?data.chainBrandName:'无'}}</td>
<td>{{data.merNo}}</td>
<td>{{data.merName}}</td>
<td>{{data.directorName}}</td>
<td>{{data.directorTel}}</td>
<td>{{data.opUserName}}</td>
<td>{{data.createTime | date: 'yyyy-MM-dd HH:mm'}}</td>
<td>{{data.updateTime | date: 'yyyy-MM-dd HH:mm'}}</td>
<td>{{data.provinceName+"/"+data.cityName+"/"+data.areaName}}</td>
<td>{{data.status | dictionary: "MERCHANT_STATUS"}}</td>
<td nzRight>
<a (click)="showMerDetail(data.merNo)">详情</a>
<nz-divider nzType="vertical"></nz-divider>
<a (click)="showUpdateMer(data.merNo)">修改资料</a>
<nz-divider nzType="vertical"></nz-divider>
<a nz-dropdown [nzDropdownMenu]="menu">
更多
<span nz-icon nzType="down"></span>

@ -1,9 +1,30 @@
button {
margin-left: 8px;
}
.search-area {
margin-top: 30px;
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;
}

@ -29,7 +29,12 @@ import {NzAvatarModule} from "ng-zorro-antd/avatar";
import {MerService} from "../../../services/merchant/mer.service";
import {RoleService} from "../../../services/role/role.service";
import {NzImageModule} from "ng-zorro-antd/image";
import {NzSwitchComponent} from "ng-zorro-antd/switch";
import {DateSelectType} from "../../../utils/dateUtils.service";
import {NzDatePickerComponent, NzRangePickerComponent} from "ng-zorro-antd/date-picker";
import {NzRadioButtonDirective, NzRadioComponent, NzRadioGroupComponent} from "ng-zorro-antd/radio";
import {CommonService} from "../../../services/common/common.service";
import { NzToolTipModule } from 'ng-zorro-antd/tooltip';
@Component({
selector: 'app-mer-list',
standalone: true,
@ -70,7 +75,14 @@ import {NzImageModule} from "ng-zorro-antd/image";
NzDescriptionsModule,
NzUploadComponent,
NzAvatarModule,
NzImageModule
NzImageModule,
NzSwitchComponent,
NzDatePickerComponent,
NzRadioButtonDirective,
NzRadioComponent,
NzRadioGroupComponent,
NzRangePickerComponent,
NzToolTipModule
],
templateUrl: './mer-list.component.html',
styleUrl: './mer-list.component.less'
@ -80,6 +92,8 @@ export class MerListComponent {
IMAGE_URL = environment.imageUrl;
// 表单页数
tablePageNum = 1;
// 每页数量
tablePageSize = 10;
// 表单数据
tableData: any = {
total: 0,
@ -87,7 +101,14 @@ export class MerListComponent {
};
// 搜索表单
searchForm: FormGroup;
// 更多搜索条件
isCollapse = false;
// 油站状态
merchantStatusArray = new DictionaryPipe().getDictionaryList('MERCHANT_STATUS');
// 油站来源
merSourceTypeArray = new DictionaryPipe().getDictionaryList('MER_SOURCE_TYPE');
// 地区数据
regionData: any = []
roleData: any = []
merDetailVisible = false;
merDetailObject: any = {};
@ -102,12 +123,14 @@ export class MerListComponent {
private merService: MerService,
private roleService: RoleService,
private message: NzMessageService,
private commonService: CommonService,
private modal: NzModalService) {
// 初始化搜索框
this.searchForm = this.fb.group({
sourceType: [''],
provinceCode: [''],
merNo: [''],
merName: [''],
opUserName: [''],
status: [''],
});
@ -127,6 +150,10 @@ export class MerListComponent {
this.roleService.queryAllRole((data: any) => {
this.roleData = data['return_data'];
});
// 获取地区
this.commonService.getRegion("", (data: any) => {
this.regionData = data['return_data'];
});
this.queryData();
}
@ -136,9 +163,9 @@ export class MerListComponent {
*/
queryData() {
this.searchForm.value.pageNum = this.tablePageNum;
this.searchForm.value.pageSize = 10;
this.searchForm.value.pageSize = this.tablePageSize;
this.searchForm.value.time = new Date().getTime();
this.merService.queryList(this.searchForm.value, (data: any) => {
this.merService.queryMerList(this.searchForm.value, (data: any) => {
if (data['return_code'] == '000000') {
this.tableData = data['return_data'];
}
@ -183,6 +210,13 @@ export class MerListComponent {
this.merDetailVisible = false;
}
/**
*
*/
listShowChange(data: boolean) {
console.log(data);
}
/**
*
* @param merData
@ -315,4 +349,5 @@ export class MerListComponent {
});
};
protected readonly DateSelectType = DateSelectType;
}

@ -155,7 +155,7 @@
</div>
</div>
<nz-table #basicTable
[nzScroll]="{ x: '5000px'}"
[nzScroll]="{ x: '5300px'}"
[nzBordered]="true"
[nzFrontPagination]="false"
[nzShowQuickJumper]="true"
@ -174,8 +174,8 @@
<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>
<th colspan="8">加油信息</th>
<th colspan="9">支付信息</th>
<th colspan="9">加油信息</th>
<th colspan="10">结算信息</th>
<th rowspan="2">交易状态</th>
<th rowspan="2">创建时间</th>
<th rowspan="2">支付时间</th>
@ -190,6 +190,7 @@
<th>油枪号</th>
<th>平台折扣</th>
<th>平台价</th>
<th>优惠价</th>
<th>油站价</th>
<th>国标价</th>
<th>总优惠</th>
@ -198,7 +199,8 @@
<th>服务费</th>
<th>应付金额</th>
<th>积分抵扣</th>
<th>实付金额</th>
<th>油站结算</th>
<th>用户实付</th>
<th>支付方式</th>
<th>支付单号</th>
</tr>
@ -220,6 +222,7 @@
<td>{{data.gasGunNo}}号枪</td>
<td>{{data.gasDiscount != 1?(data.gasDiscount*100).toFixed(2) + '折':'无'}}</td>
<td>{{data.gasPricePlatform}}元</td>
<td>{{data.gasPriceVip}}元</td>
<td>{{data.gasPriceGun}}元</td>
<td>{{data.gasPriceOfficial}}元</td>
<td>{{data.totalDeductionPrice}}元</td>
@ -228,6 +231,7 @@
<td>{{data.gasServiceFeePrice}}元</td>
<td>{{data.payablePrice}}元</td>
<td>{{data.payIntegral / 100}}元</td>
<td>{{data.gasSettlePrice!=null?data.gasSettlePrice+'元':'未支付'}}</td>
<td>{{data.actualPayPrice!=null?data.actualPayPrice+'元':'未支付'}}</td>
<td>{{data.payType | dictionary: 'ORDER_PAY_TYPE'}}</td>
<td>{{data.paySerialNo}}</td>
@ -274,20 +278,22 @@
<nz-descriptions-item nzTitle="油品">{{orderDetailObject.gasOrder.gasOilNo}} # </nz-descriptions-item>
<nz-descriptions-item nzTitle="油枪">{{orderDetailObject.gasOrder.gasGunNo}} 号枪</nz-descriptions-item>
<nz-descriptions-item nzSpan="1" nzTitle="平台优惠">
<span nz-typography>平台折扣:{{orderDetailObject.gasOrder.gasDiscount != 1?(orderDetailObject.gasOrder.gasDiscount * 100).toFixed(2)+'折':'无'}}</span><br>
<span nz-typography>总优惠:{{orderDetailObject.gasOrder.totalDeductionPrice}}元</span><br>
<span nz-typography>优惠券优惠:{{orderDetailObject.gasOrder.deductionCouponPrice}}元</span><br>
<span nz-typography>加油优惠:{{orderDetailObject.gasOrder.deductionOilPrice}}元</span><br>
<span nz-typography>积分抵扣:{{orderDetailObject.gasOrder.payIntegral / 100}}元</span><br>
<span nz-typography>服务费:{{orderDetailObject.gasOrder.gasServiceFeePrice}}元</span><br>
</nz-descriptions-item>
<nz-descriptions-item nzSpan="1" nzTitle="油价">
<nz-badge nzStatus="processing" nzText="平台价:{{orderDetailObject.gasOrder.gasPricePlatform}}"></nz-badge><br>
<nz-badge nzStatus="processing" nzText="平台价:{{orderDetailObject.gasOrder.gasPricePlatform}} ({{orderDetailObject.gasOrder.gasDiscount != 1?(orderDetailObject.gasOrder.gasDiscount * 100).toFixed(2)+'折':'无折扣'}})"></nz-badge><br>
<nz-badge nzStatus="processing" nzText="优惠价:{{orderDetailObject.gasOrder.gasPriceVip}}"></nz-badge><br>
<nz-badge nzStatus="processing" nzText="油站价:{{orderDetailObject.gasOrder.gasPriceGun}}"></nz-badge><br>
<nz-badge nzStatus="processing" nzText="国标价:{{orderDetailObject.gasOrder.gasPriceOfficial}}"></nz-badge>
</nz-descriptions-item>
<nz-descriptions-item nzSpan="1" nzTitle="应付">{{orderDetailObject.gasOrder.payablePrice}}</nz-descriptions-item>
<nz-descriptions-item nzSpan="1" nzTitle="实付">{{orderDetailObject.gasOrder.actualPayPrice}}</nz-descriptions-item>
<nz-descriptions-item nzSpan="1" nzTitle="服务费">{{orderDetailObject.gasOrder.gasServiceFeePrice}}元</nz-descriptions-item>
<nz-descriptions-item nzSpan="1" nzTitle="积分抵扣">{{orderDetailObject.gasOrder.payIntegral / 100}}元</nz-descriptions-item>
<nz-descriptions-item nzSpan="1" nzTitle="订单应付">{{orderDetailObject.gasOrder.payablePrice}}</nz-descriptions-item>
<nz-descriptions-item nzSpan="1" nzTitle="用户实付">{{orderDetailObject.gasOrder.actualPayPrice}}</nz-descriptions-item>
<nz-descriptions-item nzSpan="1" nzTitle="油站结算">{{orderDetailObject.gasOrder.gasSettlePrice?orderDetailObject.gasOrder.gasSettlePrice:0}}元</nz-descriptions-item>
<nz-descriptions-item nzSpan="1" nzTitle="代理结算" *ngIf="accountType == 1 || accountType == 4 || accountType == 5">{{orderDetailObject.gasOrder.gasAgentSettlePrice?orderDetailObject.gasOrder.gasAgentSettlePrice:0}}元</nz-descriptions-item>
<nz-descriptions-item *ngIf="accountType == 1" nzTitle="代理商">
{{orderDetailObject.gasOrder.agentName?orderDetailObject.gasOrder.agentName:'无'}}
</nz-descriptions-item>

@ -39,6 +39,7 @@ import {ButtonPipe} from "../../../pipes/common/button.pipe";
import {NzTooltipDirective} from "ng-zorro-antd/tooltip";
import {symlinkSync} from "fs";
import {DateMinutesDiffPipe} from "../../../pipes/common/date-minutes-diff.pipe";
import {NzDividerModule} from "ng-zorro-antd/divider";
@Component({
selector: 'app-order-oil-list',
@ -87,7 +88,8 @@ import {DateMinutesDiffPipe} from "../../../pipes/common/date-minutes-diff.pipe"
NzTimelineComponent,
NzBadgeComponent,
NzTooltipDirective,
DateMinutesDiffPipe
DateMinutesDiffPipe,
NzDividerModule
],
templateUrl: './order-oil-list.component.html',
styleUrl: './order-oil-list.component.less'

@ -28,6 +28,18 @@ export class CommonService {
});
}
/**
*
*
* @param regionId id
* @param callBack
*/
public getRegion(regionId: string, callBack:any) {
this.http.get(environment.baseUrl + 'common/getRegion?regionId=' + regionId).subscribe(data => {
callBack(data);
});
}
/**
*
*

@ -62,9 +62,9 @@ export class MerService {
* @param params
* @param callBack
*/
public queryList(params: any, callBack:any) {
public queryMerList(params: any, callBack:any) {
params.time = new Date().getTime();
this.http.get(environment.baseUrl + 'mer/queryList?' + ObjectData.objectByString(params)).subscribe(data => {
this.http.get(environment.baseUrl + 'merchant/queryMerList?' + ObjectData.objectByString(params)).subscribe(data => {
callBack(data);
});
}

Loading…
Cancel
Save