You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
60 lines
1.5 KiB
60 lines
1.5 KiB
import { Injectable } from '@angular/core';
|
|
import {HttpClient} from "_@angular_common@9.0.7@@angular/common/http";
|
|
import {CommonsService} from "./commons.service";
|
|
import {environment} from "../../environments/environment";
|
|
|
|
@Injectable({
|
|
providedIn: 'root'
|
|
})
|
|
export class TyAgentPriceService {
|
|
|
|
constructor(
|
|
private http: HttpClient,
|
|
private common: CommonsService
|
|
) { }
|
|
|
|
/**
|
|
* 编辑价格
|
|
* @param paramObject 参数
|
|
* @param callBack
|
|
*/
|
|
editPrice(paramObject: object, callBack) {
|
|
this.http.post(environment.baseUrl + 'tyAgentPrice/editPrice', paramObject).subscribe(data => {
|
|
callBack(data);
|
|
});
|
|
}
|
|
|
|
/**
|
|
* 批量配置价格
|
|
* @param paramObject 参数
|
|
* @param callBack
|
|
*/
|
|
batchConfigPrice(paramObject: object, callBack) {
|
|
this.http.post(environment.baseUrl + 'tyAgentPrice/batchConfigPrice', paramObject).subscribe(data => {
|
|
callBack(data);
|
|
});
|
|
}
|
|
|
|
/**
|
|
* 批量配置油品
|
|
* @param paramObject 参数
|
|
* @param callBack
|
|
*/
|
|
batchConfigOilNo(paramObject: object, callBack) {
|
|
this.http.post(environment.baseUrl + 'tyAgentPrice/batchConfigOilNo', paramObject).subscribe(data => {
|
|
callBack(data);
|
|
});
|
|
}
|
|
|
|
/**
|
|
* 油站价格
|
|
* @param paramObject 参数
|
|
* @param callBack
|
|
*/
|
|
getOilStationPrice(belongType: number, oilStationId: number, callBack) {
|
|
this.http.get(environment.baseUrl + 'tyAgentPrice/getOilStationPrice?belongType=' + belongType + '&oilStationId=' + oilStationId).subscribe(data => {
|
|
callBack(data);
|
|
});
|
|
}
|
|
|
|
}
|
|
|