提交修改代码

pull/1/head
袁野 2 years ago
parent e2f09e2ed3
commit 6e78f33311
  1. 2
      src/app/admin/recharge-order/order-list/order-list.component.html
  2. 45
      src/app/admin/recharge-order/price-list/price-list.component.html
  3. 38
      src/app/admin/recharge-order/price-list/price-list.component.ts
  4. 2
      src/app/app-common.module.ts
  5. 1
      src/app/pipes/index.ts
  6. 3
      src/app/pipes/recharge-price/recharge-platform.pipe.ts
  7. 25
      src/app/services/recharge.service.ts

@ -243,7 +243,7 @@
<tbody>
<tr *ngFor="let data of basicTable.data">
<td>{{data.orderNo}}</td>
<td>{{data.rechargePlatform == 2 ? '龙阅':'尖椒'}}</td>
<td>{{data.rechargePlatform | platform}}</td>
<td>{{data.status | chlidRechargeStatus}}</td>
<td>{{data['createTime'] | date: 'yyyy-MM-dd HH:mm'}}</td>
</tr>

@ -145,9 +145,15 @@
<td>{{data.createTime | date: 'yyyy-MM-dd HH:mm'}}</td>
<td nzRight="">{{data.status | priceStatus}}</td>
<td nzRight class="table-td-operation">
<a *ngIf="data.status != 1" (click)="getEdit(data.id)">编辑</a>
<a style="margin-left: 20px;" (click)='getForbiddenUser(data.id , data.status)'>{{data.status === 1 ? '售空': '上线'}}</a>
<a *ngIf="data.status != 1" style="margin-left: 20px;" (click)="getForbiddenUserD(data.id)">删除</a>
<a nz-dropdown [nzDropdownMenu]="menu">更多操作<i nz-icon nzType="down"></i></a>
<nz-dropdown-menu #menu="nzDropdownMenu">
<ul nz-menu nzSelectable>
<li *ngIf="data.status != 1" nz-menu-item><a (click)="getEdit(data.id)">产品编辑</a></li>
<li nz-menu-item><a (click)='getForbiddenUser(data.id , data.status)'>{{data.status === 1 ? '产品售空': '产品上线'}}</a></li>
<li *ngIf="data.status != 1" nz-menu-item><a (click)="getForbiddenUserD(data.id)">产品删除</a></li>
<li *ngIf="data.status != 1" nz-menu-item><a (click)="getProductCode(data.id)">配置编码</a></li>
</ul>
</nz-dropdown-menu>
</td>
</tbody>
</nz-table>
@ -275,19 +281,19 @@
></nz-input-number>
</nz-form-control>
</nz-form-item>
<nz-form-item *ngIf="edit">
<nz-form-label [nzSpan]="6" >商品编号</nz-form-label>
<nz-form-control [nzSpan]="16" nzErrorTip="请输入商品编号!">
<nz-input-number
style="width: 200px"
formControlName="goodsId"
[nzMin]="1"
[nzMax]="10000"
[nzStep]="1"
nzPlaceHolder="请输入商品编号!"
></nz-input-number>
</nz-form-control>
</nz-form-item>
<!-- <nz-form-item *ngIf="edit">-->
<!-- <nz-form-label [nzSpan]="6" >商品编号</nz-form-label>-->
<!-- <nz-form-control [nzSpan]="16" nzErrorTip="请输入商品编号!">-->
<!-- <nz-input-number-->
<!-- style="width: 200px"-->
<!-- formControlName="goodsId"-->
<!-- [nzMin]="1"-->
<!-- [nzMax]="10000"-->
<!-- [nzStep]="1"-->
<!-- nzPlaceHolder="请输入商品编号!"-->
<!-- ></nz-input-number>-->
<!-- </nz-form-control>-->
<!-- </nz-form-item>-->
<nz-form-item *ngIf="edit">
<nz-form-label [nzSpan]="6" >排序</nz-form-label>
<nz-form-control [nzSpan]="16" nzErrorTip="请输入排序!">
@ -304,3 +310,10 @@
</form>
</nz-modal>
<nz-modal [(nzVisible)]="isVisibleProductCode" nzTitle="产品编码编辑" (nzOnCancel)="isVisibleProductCode = false" (nzOnOk)="handleOkCode()">
<div style="margin-bottom: 30px;" *ngFor="let item of rechargeCodeList">
<nz-input-group nzAddOnBefore="{{item.rechargePlatformName}}" >
<input type="text" nz-input [(ngModel)]="item.goodsId" placeholder="请输入产品编码" />
</nz-input-group>
</div>
</nz-modal>

@ -29,12 +29,13 @@ export class PriceListComponent implements OnInit {
pageSize = 10; // 条码
loading = true;
isVisible = false;
isVisibleProductCode = false;
id: number;
edit = false;
payPrice;
isVisibleGoods = false;
realPrice = 0;
rechargeCodeList: any;
formatterPercent = (value: number): string => `${value == null ? 0 : value} %`;
parserPercent = (value: string): string => value.replace(' %', '');
@ -231,9 +232,6 @@ export class PriceListComponent implements OnInit {
});
}
});
console.log(status);
console.log(statusPost);
console.log(message);
}
public getForbiddenUserD(idPost): void {
@ -259,5 +257,37 @@ export class PriceListComponent implements OnInit {
this.payPrice = this.validateForm.value['rechargePrice'] * e / 100;
}
// 配置产品编码
public getProductCode(productId: number): void {
const paramsObject = {
id: productId,
codeType: 'RECHARGE_PLATFORM'
};
this.recharge.getRechargeCodeList(paramsObject , data => {
if (data['return_code'] === '000000') {
this.isVisibleProductCode = true;
this.rechargeCodeList = data['return_data'];
for (const i of this.rechargeCodeList) {
i['sourceId'] = productId;
i['type'] = 1;
}
} else {
this.message.error(data['return_msg']);
}
});
}
// 上传配置
public handleOkCode(): void {
this.recharge.editRechargeCode(this.rechargeCodeList , data => {
if (data['return_code'] === '000000') {
this.isVisibleProductCode = false;
this.message.success('编辑成功');
this.getRequest(false, this.searchForm.value);
} else {
this.message.error(data['return_msg']);
}
});
}
}

@ -55,6 +55,7 @@ import {OilTypePipe} from './pipes/store/oil-type.pipe';
import {OilPriceTaskStatusPipe} from './pipes/gas-oil-price/oil-price-task-status.pipe';
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';
const PIPES = [
TimesPipe,
@ -103,6 +104,7 @@ const PIPES = [
ChlidRechargeStatusPipe,
SourceTypePipe,
GasClassGroupTaskStatusPipe,
PlatformPipe,
];

@ -39,3 +39,4 @@ export * from './pay-status.pipe';
export * from './chlid-recharge-status.pipe';
export * from './apiMerchant/source-type.pipe';
export * from './gas-class-group-task/gas-class-group-task-status.pipe';
export * from './recharge-pipe/platform.pipe';

@ -15,6 +15,9 @@ export class RechargePlatformPipe implements PipeTransform {
if (Number(i) === 2) {
string = string + '龙阅,';
}
if (Number(i) === 3) {
string = string + '城宇,';
}
}
return string.substring(0 , string.length - 1);

@ -260,4 +260,29 @@ export class RechargeService {
});
}
/**
*
*
* @param paramsObject
* @param callBack
*/
public getRechargeCodeList(paramsObject: object, callBack) {
this.http.get(environment.baseUrl + 'outRechargePrice/getRechargeCodeList?' + this.common.getWhereCondition(paramsObject)).subscribe(data => {
callBack(data);
});
}
/**
*
*
* @param params
* @param callBack
* @return data
*/
public editRechargeCode(params: object, callBack) {
this.http.post(environment.baseUrl + 'outRechargePrice/editRechargeCode', params).subscribe(data => {
callBack(data);
});
}
}

Loading…
Cancel
Save