|
|
@ -12,6 +12,7 @@ import {CommonsService} from '../../../services/commons.service'; |
|
|
|
import {WebsocketService} from '../../../services/websocket.service'; |
|
|
|
import {WebsocketService} from '../../../services/websocket.service'; |
|
|
|
import {ADMIN_INFO_OBJECT} from '../../../services/local-storage.namespace'; |
|
|
|
import {ADMIN_INFO_OBJECT} from '../../../services/local-storage.namespace'; |
|
|
|
import {MerchantStoreService} from '../../../services/merchant-store.service'; |
|
|
|
import {MerchantStoreService} from '../../../services/merchant-store.service'; |
|
|
|
|
|
|
|
import {GasStaffService} from "../../../services/gas-staff.service"; |
|
|
|
|
|
|
|
|
|
|
|
@Component({ |
|
|
|
@Component({ |
|
|
|
selector: 'app-oil-station-order', |
|
|
|
selector: 'app-oil-station-order', |
|
|
@ -46,6 +47,9 @@ export class OilStationOrderComponent implements OnInit { |
|
|
|
}; |
|
|
|
}; |
|
|
|
printModal = false; |
|
|
|
printModal = false; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
userSession = {}; |
|
|
|
|
|
|
|
gasStaffArray = []; |
|
|
|
|
|
|
|
|
|
|
|
constructor( |
|
|
|
constructor( |
|
|
|
private form: FormBuilder, |
|
|
|
private form: FormBuilder, |
|
|
|
private order: OrderService, |
|
|
|
private order: OrderService, |
|
|
@ -57,6 +61,7 @@ export class OilStationOrderComponent implements OnInit { |
|
|
|
private company: CompanyService, |
|
|
|
private company: CompanyService, |
|
|
|
private merchant: MerchantService, |
|
|
|
private merchant: MerchantService, |
|
|
|
private merchantStoreService: MerchantStoreService, |
|
|
|
private merchantStoreService: MerchantStoreService, |
|
|
|
|
|
|
|
private gasStaffService: GasStaffService, |
|
|
|
private orderService: OrderService, |
|
|
|
private orderService: OrderService, |
|
|
|
private store: LocalStorageService, // 数据请求
|
|
|
|
private store: LocalStorageService, // 数据请求
|
|
|
|
private common: CommonsService |
|
|
|
private common: CommonsService |
|
|
@ -64,6 +69,7 @@ export class OilStationOrderComponent implements OnInit { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
ngOnInit(): void { |
|
|
|
ngOnInit(): void { |
|
|
|
|
|
|
|
this.userSession = this.store.get(ADMIN_INFO_OBJECT); |
|
|
|
this.secUser = this.store.get(ADMIN_INFO_OBJECT)['secUser']; |
|
|
|
this.secUser = this.store.get(ADMIN_INFO_OBJECT)['secUser']; |
|
|
|
if (this.secUser['objectType'] === 2) { |
|
|
|
if (this.secUser['objectType'] === 2) { |
|
|
|
this.merchantStoreService.getStoreListByMerchant({ pageNum: 1, pageSize: 100}, data => { |
|
|
|
this.merchantStoreService.getStoreListByMerchant({ pageNum: 1, pageSize: 100}, data => { |
|
|
@ -71,6 +77,10 @@ export class OilStationOrderComponent implements OnInit { |
|
|
|
this.gasArray = data['return_data']['list']; |
|
|
|
this.gasArray = data['return_data']['list']; |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
} else if (this.secUser['objectType'] === 3) { |
|
|
|
|
|
|
|
this.getStaffList(null); |
|
|
|
|
|
|
|
} else if (this.secUser['objectType'] === 8) { |
|
|
|
|
|
|
|
this.getStaffList(null); |
|
|
|
} |
|
|
|
} |
|
|
|
this.init(); |
|
|
|
this.init(); |
|
|
|
// 接收消息
|
|
|
|
// 接收消息
|
|
|
@ -86,6 +96,7 @@ export class OilStationOrderComponent implements OnInit { |
|
|
|
public init(): void { |
|
|
|
public init(): void { |
|
|
|
this.searchForm = this.form.group({ |
|
|
|
this.searchForm = this.form.group({ |
|
|
|
storeId: [null], |
|
|
|
storeId: [null], |
|
|
|
|
|
|
|
staffId: [null], |
|
|
|
orderNo: [null], |
|
|
|
orderNo: [null], |
|
|
|
status: [null], |
|
|
|
status: [null], |
|
|
|
createTime: [null], |
|
|
|
createTime: [null], |
|
|
@ -116,6 +127,27 @@ export class OilStationOrderComponent implements OnInit { |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 查询列表
|
|
|
|
|
|
|
|
public getStaffList(gasId: number) { |
|
|
|
|
|
|
|
const param = { pageNum: 1 , pageSize: 9999}; |
|
|
|
|
|
|
|
if (gasId != null) { |
|
|
|
|
|
|
|
param['merchantStoreId'] = gasId; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
this.gasStaffService.getStaffList(param, data => { |
|
|
|
|
|
|
|
if (data['return_code'] === '000000') { |
|
|
|
|
|
|
|
this.gasStaffArray = data['return_data']['list']; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
selectGasChange(gasId: number) { |
|
|
|
|
|
|
|
if (gasId != null) { |
|
|
|
|
|
|
|
this.getStaffList(gasId); |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
this.gasStaffArray = []; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// 重置
|
|
|
|
// 重置
|
|
|
|
public resetForm(): void { |
|
|
|
public resetForm(): void { |
|
|
|
this.searchForm.reset(); |
|
|
|
this.searchForm.reset(); |
|
|
|