-
- 话费充值类型
-
-
-
-
+
@@ -109,9 +99,15 @@
{{data.createTime | date: 'yyyy-MM-dd HH:mm'}} |
{{data.status== 101? '上线':'编辑中'}} |
- 编辑
- {{data.status === 101 ? '下线': '上线'}}
- 删除
+ 更多操作
+
+
+
|
@@ -157,28 +153,6 @@
-
- 充值类型
-
-
-
-
-
-
-
-
- 商品编号
-
-
-
-
排序
@@ -194,3 +168,10 @@
+
+
+
+
+
+
+
diff --git a/src/app/admin/api-product/list/list.component.ts b/src/app/admin/api-product/list/list.component.ts
index 11e2296..744e648 100644
--- a/src/app/admin/api-product/list/list.component.ts
+++ b/src/app/admin/api-product/list/list.component.ts
@@ -33,9 +33,8 @@ export class ListComponent implements OnInit {
id: number;
edit = false;
payPrice;
- isVisibleGoods = false;
- realPrice = 0;
-
+ isVisibleProductCode = false;
+ rechargeCodeList: any;
constructor(
private form: FormBuilder,
private recharge: RechargeService,
@@ -76,11 +75,9 @@ export class ListComponent implements OnInit {
this.validateForm = this.form.group({
operatorType: [null, [Validators.required]],
prices: [null, [Validators.required]],
- phoneRechargeType: [null, [Validators.required]],
rechargePlatform: [null, [Validators.required]],
rechargePrice: [null],
sort: [null],
- productId: [null],
});
@@ -229,5 +226,38 @@ export class ListComponent implements OnInit {
});
}
+ // 配置产品编码
+ public getProductCode(productId: number): void {
+ const paramsObject = {
+ id: productId,
+ codeType: 'RECHARGE_PLATFORM',
+ type: 2
+ };
+ 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'] = 2;
+ }
+ } 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']);
+ }
+ });
+ }
}
diff --git a/src/app/admin/cms/cms-content/cms-content.component.ts b/src/app/admin/cms/cms-content/cms-content.component.ts
index d07b877..eba412d 100644
--- a/src/app/admin/cms/cms-content/cms-content.component.ts
+++ b/src/app/admin/cms/cms-content/cms-content.component.ts
@@ -223,7 +223,7 @@ export class CmsContentComponent implements OnInit {
}
showDeleteConfirmDelete(id: number): void {
- this.common.showConfirm('是否确定删除!', dataR => {
+ this.common.showConfirm('是否确定!', dataR => {
if (dataR) {
this.cms.deleteById(id, data => {
if (data['return_code'] === '000000') {
diff --git a/src/app/admin/recharge-order/price-list/price-list.component.ts b/src/app/admin/recharge-order/price-list/price-list.component.ts
index c615afd..0a1754d 100644
--- a/src/app/admin/recharge-order/price-list/price-list.component.ts
+++ b/src/app/admin/recharge-order/price-list/price-list.component.ts
@@ -33,8 +33,7 @@ export class PriceListComponent implements OnInit {
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(' %', '');
@@ -261,9 +260,11 @@ export class PriceListComponent implements OnInit {
public getProductCode(productId: number): void {
const paramsObject = {
id: productId,
- codeType: 'RECHARGE_PLATFORM'
+ codeType: 'RECHARGE_PLATFORM',
+ type: 1
};
this.recharge.getRechargeCodeList(paramsObject , data => {
+ console.log(data);
if (data['return_code'] === '000000') {
this.isVisibleProductCode = true;
this.rechargeCodeList = data['return_data'];
diff --git a/src/app/app-common.module.ts b/src/app/app-common.module.ts
index f0d7870..4bcbd61 100644
--- a/src/app/app-common.module.ts
+++ b/src/app/app-common.module.ts
@@ -67,9 +67,15 @@ import {
ProductTypePipe,
OrderRefundOpuserTypePipe,
OrderChildStatusPipe,
- PayStatusPipe, CallbackStatusPipe, ProductConfigPipe, PayCouponStatusPipe, OrderOilChannelTypePipe
+ PayStatusPipe,
+ CallbackStatusPipe,
+ ProductConfigPipe,
+ PayCouponStatusPipe,
+ OrderOilChannelTypePipe,
+ VerifyProductTypePipe
} from './pipes';
import {MsgTypePipe} from './pipes/msg/msg-type.pipe';
+import { OrderProductTypePipe } from './pipes/order/order-product-type.pipe';
@@ -140,6 +146,8 @@ const PIPES = [
ProductTypePipe,
MsgTypePipe,
OrderOilChannelTypePipe,
+ VerifyProductTypePipe,
+ OrderProductTypePipe,
];
diff --git a/src/app/pipes/index.ts b/src/app/pipes/index.ts
index 031f19b..864f080 100644
--- a/src/app/pipes/index.ts
+++ b/src/app/pipes/index.ts
@@ -59,3 +59,5 @@ export * from './index/product-config.pipe';
export * from './apiMerchant/callback-status.pipe';
export * from './order/pay-coupon-status.pipe';
export * from './order/order-oil-channel-type.pipe';
+export * from './apiMerchant/verify-product-type.pipe';
+export * from './order/order-product-type.pipe';
diff --git a/src/app/pipes/third-product/product-type.pipe.ts b/src/app/pipes/third-product/product-type.pipe.ts
index edd34a5..99ed7fd 100644
--- a/src/app/pipes/third-product/product-type.pipe.ts
+++ b/src/app/pipes/third-product/product-type.pipe.ts
@@ -11,7 +11,7 @@ export class ProductTypePipe implements PipeTransform {
3: ['第三方产品'],
4: ['积分充值'],
5: ['中石化', '消费券', '其他卡券' , '贵州中石化' , '重庆中石油'],
- 6: ['在线加油'],
+ 6: [''],
7: ['优惠券包'],
8: ['汇联通充值'],
};
diff --git a/src/app/services/api-merchants.service.ts b/src/app/services/api-merchants.service.ts
index 2cf456e..67f0dfd 100644
--- a/src/app/services/api-merchants.service.ts
+++ b/src/app/services/api-merchants.service.ts
@@ -127,7 +127,7 @@ export class ApiMerchantsService {
* @Param configApiProduct
*/
public configApiProduct(params: object, callBack) {
- this.http.post(environment.baseUrl + 'apiProduct/configApiProduct', params).subscribe(data => {
+ this.http.post(environment.baseUrl + 'apiMchProduct/insertMchProduct', params).subscribe(data => {
callBack(data);
});
}
@@ -151,8 +151,8 @@ export class ApiMerchantsService {
* @param id id
* @param callBack 回调
*/
- public findConfigProduct(id: number, callBack) {
- this.http.get(environment.baseUrl + 'apiProduct/findConfigProduct?id=' + id).subscribe(data => {
+ public findMchProduct(id: number, callBack) {
+ this.http.get(environment.baseUrl + 'apiMchProduct/findMchProduct?id=' + id).subscribe(data => {
callBack(data);
});
}
@@ -165,7 +165,7 @@ export class ApiMerchantsService {
* @Param mod
**/
public updateConfigApiProduct(params: object, callBack) {
- this.http.post(environment.baseUrl + 'apiProduct/updateConfigApiProduct', params).subscribe(data => {
+ this.http.post(environment.baseUrl + 'apiMchProduct/editMchProduct', params).subscribe(data => {
callBack(data);
});
}
diff --git a/src/app/services/api-product.service.ts b/src/app/services/api-product.service.ts
index 1f82462..0698320 100644
--- a/src/app/services/api-product.service.ts
+++ b/src/app/services/api-product.service.ts
@@ -88,8 +88,15 @@ export class ApiProductService {
});
}
- public getListMerchProduct(id: number, callBack) {
- this.http.get(environment.baseUrl + 'apiMerchants/getListMerchProduct?merchantId=' + id).subscribe(data => {
+ /**
+ * @Author Sum1Dream
+ * @methodName getListMerchProduct
+ * @Description // 查询商户产品列表
+ * @Date 09:51 2023/2/24
+ * @Param mchId: number, callBack
+ */
+ public getListMerchProduct(mchId: string, callBack) {
+ this.http.get(environment.baseUrl + 'apiMchProduct/getListApiMchProduct?mchId=' + mchId).subscribe(data => {
callBack(data);
});
}
@@ -283,4 +290,17 @@ export class ApiProductService {
});
}
+ /**
+ * @Author Sum1Dream
+ * @methodName detailApiMchProduct
+ * @Description //根据id 删除配置产品
+ * @Date 11:10 2023/2/24
+ * @Param id: number, callBack
+ */
+ public detailApiMchProduct(id: number, callBack) {
+ this.http.get(environment.baseUrl + 'apiMchProduct/detailApiMchProduct?id=' + id).subscribe(data => {
+ callBack(data);
+ });
+ }
+
}
diff --git a/src/app/services/commons.service.ts b/src/app/services/commons.service.ts
index 074c2d5..939268a 100644
--- a/src/app/services/commons.service.ts
+++ b/src/app/services/commons.service.ts
@@ -99,25 +99,7 @@ export class CommonsService {
});
}
- /**
- * 获取所有 省 市 区
- * @param callBack 回调
- */
- public getAllProvinceAndCityRegion(callBack) {
- this.http.get(environment.baseUrl + 'common/getAllProvinceAndCityRegion').subscribe(data => {
- callBack(data);
- });
- }
- /**
- * 获取行业分类
- * @param callBack 回调
- */
- public getAllIndustry(callBack) {
- this.http.get(environment.baseUrl + 'secCompanyIndustry/findIndustryTree').subscribe(data => {
- callBack(data);
- });
- }
/**
* 查询省级列表
@@ -278,63 +260,6 @@ export class CommonsService {
);
}
- /**
- * 职位列表key查询value
- *
- * @param value string
- * @param object object
- * @param callback 回调
- */
- public positionKeyValue
(value: string, object: Array, callback): void {
- // tslint:disable-next-line:forin
- for (const i in object) {
- if (object[i].value === value) {
- callback(object[i].label);
- } else {
- this.positionKeyValue(value, object[i].children, callback);
- }
- }
- }
-
- /**
- * 根据数据类型查询数据字典
- *
- * @param codeType 类型
- * @param codeValue value
- * @param callback 回调
- */
- public getDictionaryByCodeTypeAndValue(codeType: string, codeValue: string, callback): any {
- this.http.get(environment.baseUrl + '/common/getDictionaryByCodeTypeAndValue?codeType=' + codeType + '&codeValue=' + codeValue).subscribe(data => {
- callback(data);
- });
- }
-
- /**
- * 根据数据类型查询数据字典 同步请求
- *
- * @param codeType 类型
- * @param codeValue value
- * @param callback 回调
- */
- public getDictionaryByCodeTypeAndValuePromise(codeType: string, codeValue: string): any {
- return new Promise(resolve => {
- this.http.get(environment.baseUrl + '/common/getDictionaryByCodeTypeAndValue?codeType=' + codeType + '&codeValue=' + codeValue).subscribe(data => {
- resolve(data['return_data']['codeName']);
- });
- });
- }
-
- /**
- * 查询登录页展示的公司
- * @param param 参数
- * @param callback 回调
- */
- public getHomeCompanyList(param: object, callback): any {
- this.http.get(environment.baseUrl + 'common/getHomeCompanyList?' + this.getWhereCondition(param)).subscribe(data => {
- callback(data);
- });
- }
-
/**
* 新增团油油品配置
*