修改话费订单导出问题

pull/1/head
袁野 2 years ago
parent 40b7d92be2
commit a139e77dcc
  1. 46
      src/app/admin/config-manage/integral-rebate/integral-rebate.component.html
  2. 22
      src/app/admin/config-manage/integral-rebate/integral-rebate.component.ts
  3. 44
      src/app/admin/recharge-order/price-list/price-list.component.html
  4. 4
      src/app/admin/recharge-order/price-list/price-list.component.ts
  5. 6
      src/app/app-common.module.ts
  6. 63
      src/app/services/api-product.service.ts

@ -102,12 +102,10 @@
<thead nzSingleSort>
<tr>
<th nzWidth="60px">编号</th>
<!-- <th nzWidth="90px">产品类型</th>-->
<th nzWidth="90px">产品名称</th>
<th nzWidth="90px">利润比例</th>
<th nzWidth="120px">积分抵扣比例</th>
<th nzWidth="100px">支付方式</th>
<th nzWidth="100px">展示平台</th>
<th nzWidth="120px">积分返利比例</th>
<th nzWidth="100px">类型</th>
<th nzWidth="100px">产品</th>
<th nzWidth="200px">返利时间范围</th>
<th nzWidth="120px">创建时间</th>
<th nzRight nzWidth="80px">操作</th>
</tr>
@ -115,19 +113,17 @@
<tbody>
<tr *ngFor="let data of ajaxTable.data; let i = index">
<td>{{i + 1}}</td>
<!-- <td>{{data.productType == 1 ? '星巴克' : '肯德基'}}</td>-->
<td>{{data.productName}}</td>
<td>{{data.discount + "%"}}</td>
<td>{{data.integralDiscount + "%"}}</td>
<td>{{data.productPayTypeString.substring(0 , data.productPayTypeString.length - 1)}}</td>
<td>{{data.productPlatformString.substring(0 , data.productPlatformString.length - 1)}}</td>
<td>{{data.percentage + "%"}}</td>
<td>{{data.type | integralType}}</td>
<td>{{data.type | integralProduct : data.productId}}</td>
<td>{{data.startTime | date: 'yyyy-MM-dd HH:mm'}} - {{data.endTime | date: 'yyyy-MM-dd HH:mm'}}</td>
<td>{{data.createTime | date: 'yyyy-MM-dd HH:mm'}}</td>
<td nzRight class="table-td-operation">
<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 *ngIf="data.status != 1"><a (click)="getEdit(data.id)">编辑</a></li>
<!-- <li nz-menu-item *ngIf="data.status != 1"><a (click)="getForbiddenUserD(data.id)">删除</a></li>-->
<li nz-menu-item *ngIf="data.status != 1"><a (click)="getForbiddenUserD(data.id)">删除</a></li>
</ul>
</nz-dropdown-menu>
</td>
@ -152,8 +148,8 @@
<nz-form-label [nzSpan]="6" nzRequired>卡券产品</nz-form-label>
<nz-form-control [nzSpan]="16" nzErrorTip="请选择卡券产品!">
<nz-select nzShowSearch nzAllowClear formControlName="productId" nzPlaceHolder="请选择卡券产品">
<nz-option nzValue="1" nzLabel="重庆中石化"></nz-option>
<nz-option nzValue="4" nzLabel="贵州中石化"></nz-option>
<nz-option [nzValue]="1" nzLabel="重庆中石化"></nz-option>
<nz-option [nzValue]="4" nzLabel="贵州中石化"></nz-option>
</nz-select>
</nz-form-control>
</nz-form-item>
@ -161,7 +157,7 @@
<nz-form-label [nzSpan]="6" nzRequired>在线加油产品</nz-form-label>
<nz-form-control [nzSpan]="16" nzErrorTip="请选择在线加油产品!">
<nz-select nzShowSearch nzAllowClear formControlName="productId" nzPlaceHolder="请选择在线加油产品">
<nz-option nzValue="1" nzLabel="在线加油"></nz-option>
<nz-option [nzValue]="1" nzLabel="在线加油"></nz-option>
</nz-select>
</nz-form-control>
</nz-form-item>
@ -169,9 +165,9 @@
<nz-form-label [nzSpan]="6" nzRequired>话费产品</nz-form-label>
<nz-form-control [nzSpan]="16" nzErrorTip="请选择话费产品!">
<nz-select nzShowSearch nzAllowClear formControlName="productId" nzPlaceHolder="请选择话费产品">
<nz-option nzValue="1" nzLabel="电信"></nz-option>
<nz-option nzValue="2" nzLabel="移动"></nz-option>
<nz-option nzValue="3" nzLabel="联通"></nz-option>
<nz-option [nzValue]="1" nzLabel="电信"></nz-option>
<nz-option [nzValue]="2" nzLabel="移动"></nz-option>
<nz-option [nzValue]="3" nzLabel="联通"></nz-option>
</nz-select>
</nz-form-control>
</nz-form-item>
@ -179,12 +175,18 @@
<nz-form-label [nzSpan]="6" nzRequired>第三方产品</nz-form-label>
<nz-form-control [nzSpan]="16" nzErrorTip="请选择第三方产品!">
<nz-select nzShowSearch nzAllowClear formControlName="productId" nzPlaceHolder="请选择第三方产品">
<nz-option nzValue="1" nzLabel="星巴克"></nz-option>
<nz-option nzValue="2" nzLabel="肯德基"></nz-option>
<nz-option nzValue="3" nzLabel="会员充值"></nz-option>
<nz-option [nzValue]="1" nzLabel="星巴克"></nz-option>
<nz-option [nzValue]="2" nzLabel="肯德基"></nz-option>
<nz-option [nzValue]="3" 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]="16" nzErrorTip="请选择第三方产品!">
<nz-range-picker [nzShowTime]="{ nzFormat: 'HH:mm:ss' }" formControlName="time"></nz-range-picker>
</nz-form-control>
</nz-form-item>
<nz-form-item>
<nz-form-label [nzSpan]="6" nzRequired>积分返利比例</nz-form-label>

@ -73,6 +73,7 @@ export class IntegralRebateComponent implements OnInit {
productId: [null],
type: [null, [Validators.required]],
percentage: [null, [Validators.required]],
time: [null, [Validators.required]],
});
@ -88,7 +89,7 @@ export class IntegralRebateComponent implements OnInit {
}
whereObject['pageNum'] = this.pageNum;
whereObject['pageSize'] = this.pageSize;
this.apiProduct.getProductConfig(whereObject, data => {
this.apiProduct.getIntegralRebateByList(whereObject, data => {
if (data['return_code'] === '000000') {
console.log(data);
this.requestData = data['return_data'].list;
@ -109,9 +110,8 @@ export class IntegralRebateComponent implements OnInit {
if (id != null) {
this.id = id;
this.edit = true;
this.apiProduct.findProductConfig(id, data => {
data['return_data']['productPlatform'] = data['return_data']['productPlatformString'].substring(0 , data['return_data']['productPlatformString'].length - 1).split(',');
data['return_data']['payType'] = data['return_data']['productPayTypeString'].substring(0 , data['return_data']['productPayTypeString'].length - 1).split(',');
this.apiProduct.findIntegralRebateById(id, data => {
data['return_data'].time = [new Date(data['return_data']['startTime']), new Date(data['return_data']['endTime'])];
this.validateForm.patchValue(data['return_data']);
this.isVisible = true;
});
@ -135,10 +135,13 @@ export class IntegralRebateComponent implements OnInit {
return;
}
}
if (this.validateForm.value['time'] != null && this.validateForm.value['time'].length !== 0) {
this.validateForm.value['startTime'] = this.validateForm.value['time'][0].getTime();
this.validateForm.value['endTime'] = this.validateForm.value['time'][1].getTime();
}
if (this.edit) {
this.validateForm.value['id'] = this.id;
this.apiProduct.updateProductConfig(this.validateForm.value, data => {
this.apiProduct.updateIntegralRebate(this.validateForm.value, data => {
this.message.remove(wait);
if (data['return_code'] === '000000') {
this.message.success('修改成功');
@ -150,7 +153,7 @@ export class IntegralRebateComponent implements OnInit {
}
});
} else {
this.apiProduct.productConfig(this.validateForm.value, data => {
this.apiProduct.insertIntegralRebate(this.validateForm.value, data => {
this.message.remove(wait);
if (data['return_code'] === '000000') {
this.message.success('添加成功');
@ -174,10 +177,7 @@ export class IntegralRebateComponent implements OnInit {
this.common.showConfirm('是否删除', item => {
if (item) {
this.recharge.editPriceStatus({
id: idPost,
status: 0
}, data => {
this.apiProduct.deleteIntegralRebate(idPost, data => {
if (data['return_code'] === '000000') {
this.message.success('删除成功');
this.getRequest(false, this.searchForm.value);

@ -30,17 +30,17 @@
</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="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-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>-->
<!-- </nz-form-control>-->
<!-- </nz-form-item>-->
<!-- </div>-->
<!-- <div nz-col nzSpan="8">-->
<!-- <nz-form-item>-->
<!-- <nz-form-label [nzSpan]="6">展示平台</nz-form-label>-->
@ -119,7 +119,7 @@
<th nzWidth="90px">支付金额</th>
<th nzWidth="120px">积分抵扣比例</th>
<th nzWidth="120px">运营商</th>
<th nzWidth="90px">充值类型</th>
<!-- <th nzWidth="90px">充值类型</th>-->
<th nzWidth="100px">充值平台</th>
<th nzWidth="100px">支付方式</th>
<th nzWidth="100px">展示平台</th>
@ -137,7 +137,7 @@
<td>{{data.payPrice}}</td>
<td>{{data.integralDiscount + "%"}}</td>
<td>{{data.operatorType | rechargePrice}}</td>
<td>{{data.rechargeType== 1? '快充':'慢充'}}</td>
<!-- <td>{{data.rechargeType== 1? '快充':'慢充'}}</td>-->
<td>{{data.rechargePlatform | rechargePlatform}}</td>
<td>{{data.productPayTypeString.substring(0 , data.productPayTypeString.length - 1)}}</td>
<td>{{data.productPlatformString.substring(0 , data.productPlatformString.length - 1)}}</td>
@ -237,15 +237,15 @@
</nz-select>
</nz-form-control>
</nz-form-item>
<nz-form-item>
<nz-form-label [nzSpan]="6" nzRequired>充值类型</nz-form-label>
<nz-form-control [nzSpan]="16" nzErrorTip="请选择充值类型!">
<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>
<!-- <nz-form-item>-->
<!-- <nz-form-label [nzSpan]="6" nzRequired>充值类型</nz-form-label>-->
<!-- <nz-form-control [nzSpan]="16" nzErrorTip="请选择充值类型!">-->
<!-- <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>-->
<nz-form-item>
<nz-form-label [nzSpan]="6" nzRequired>折扣比例</nz-form-label>
<nz-form-control [nzSpan]="16" nzErrorTip="请输入折扣比例!">

@ -81,7 +81,7 @@ export class PriceListComponent implements OnInit {
this.searchForm = this.form.group({
operatorType : [null],
rechargePlatform: [null],
rechargeType: [null],
// rechargeType: [null],
rechargeWay: [null],
status: [null],
});
@ -91,7 +91,7 @@ export class PriceListComponent implements OnInit {
operatorType: [null, [Validators.required]],
rechargePrices: [null, [Validators.required]],
productPlatform: [null, [Validators.required]],
rechargeType: [null, [Validators.required]],
// rechargeType: [null, [Validators.required]],
rechargePlatform: [null, [Validators.required]],
rechargeWay: [null, [Validators.required]],
payType: [null, [Validators.required]],

@ -56,6 +56,8 @@ import {OilPriceTaskStatusPipe} from './pipes/gas-oil-price/oil-price-task-statu
import {OilPriceTaskExecutionTypePipe} from './pipes/gas-oil-price/oil-price-task-execution-type.pipe';
import {OilPriceTaskPriceTypePipe} from './pipes/gas-oil-price/oil-price-task-price-type.pipe';
import { PlatformPipe } from './pipes/recharge-pipe/platform.pipe';
import { IntegralTypePipe } from './pipes/integral/integral-type.pipe';
import { IntegralProductPipe } from './pipes/integral/integral-product.pipe';
const PIPES = [
TimesPipe,
@ -119,10 +121,14 @@ const PIPES = [
],
declarations: [
...PIPES,
IntegralTypePipe,
IntegralProductPipe,
],
exports: [
...PIPES,
IntegralTypePipe,
IntegralProductPipe,
],
})

@ -220,4 +220,67 @@ export class ApiProductService {
});
}
/**
* @Author Sum1Dream
* @methodName insertMemberProduct
* @Description // 新增积分返利配置
* @Date 10:39 2022/7/12
* @Param params: object, callBack
*/
public insertIntegralRebate(params: object, callBack) {
this.http.post(environment.baseUrl + 'bsIntegralRebate/insertIntegralRebate', params).subscribe(data => {
callBack(data);
});
}
/**
* @Author Sum1Dream
* @methodName updateMemberProduct
* @Description // 修改积分返利配置
* @Date 10:40 2022/7/12
* @Param params: object, callBack
*/
public updateIntegralRebate(params: object, callBack) {
this.http.post(environment.baseUrl + 'bsIntegralRebate/updateIntegralRebate', params).subscribe(data => {
callBack(data);
});
}
/**
* @Author Sum1Dream
* @methodName getListApiMemberProduct
* @Description // 查询列表
* @Date 10:38 2022/7/12
* @Param paramsObject: object, callBack
*/
public getIntegralRebateByList(paramsObject: object, callBack) {
this.http.get(environment.baseUrl + 'bsIntegralRebate/getIntegralRebateByList?' + this.common.getWhereCondition(paramsObject)).subscribe(data => {
callBack(data);
});
}
/**
* id查询产品详情
*
* @param id id
* @param callBack
*/
public findIntegralRebateById(id: number, callBack) {
this.http.get(environment.baseUrl + 'bsIntegralRebate/findIntegralRebateById?id=' + id).subscribe(data => {
callBack(data);
});
}
/**
*
*
* @param id id
* @param callBack
*/
public deleteIntegralRebate(id: number, callBack) {
this.http.get(environment.baseUrl + 'bsIntegralRebate/deleteIntegralRebate?id=' + id).subscribe(data => {
callBack(data);
});
}
}

Loading…
Cancel
Save