|
|
|
@ -27,10 +27,13 @@ export class StoreListComponent implements OnInit { |
|
|
|
|
price: string; |
|
|
|
|
WEB_SERVE_URL = environment.baseUrl; |
|
|
|
|
importErrorStudentArray = []; |
|
|
|
|
oilCardListArray = []; |
|
|
|
|
errorStudentVisible = false; |
|
|
|
|
isVisibleAdd = false; |
|
|
|
|
isSpinning = false; |
|
|
|
|
|
|
|
|
|
isVisibleAddOilCard = false; |
|
|
|
|
isVisibleAddOilCardList = false; |
|
|
|
|
oilCardNo; |
|
|
|
|
constructor( |
|
|
|
|
private form: FormBuilder, |
|
|
|
|
private merchantStore: MerchantStoreService, |
|
|
|
@ -214,4 +217,54 @@ export class StoreListComponent implements OnInit { |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public getOilCard(id): void { |
|
|
|
|
this.storeId = id; |
|
|
|
|
this.isVisibleAddOilCard = true; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public handleOilCardOk(): void { |
|
|
|
|
if (this.oilCardNo == null) { |
|
|
|
|
this.message.error('请输入充值金额'); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
const paramsObject = { |
|
|
|
|
storeId: this.storeId, |
|
|
|
|
oilCardNo: this.oilCardNo |
|
|
|
|
}; |
|
|
|
|
this.index.insertStoreOilCard(paramsObject, data => { |
|
|
|
|
if (data['return_code'] === '000000') { |
|
|
|
|
this.message.success("添加成功") |
|
|
|
|
this.isVisibleAddOilCard = false; |
|
|
|
|
} else { |
|
|
|
|
this.message.error(data['return_msg']); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public getOilCardList(id:number) { |
|
|
|
|
this.storeId = id; |
|
|
|
|
this.isVisibleAddOilCardList = true; |
|
|
|
|
this.index.getStoreOilCardList(id , data => { |
|
|
|
|
this.oilCardListArray = data['return_data']; |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
deleteOilCard(id) { |
|
|
|
|
const message = '是否删除油卡'; |
|
|
|
|
this.common.showConfirm(message, data => { |
|
|
|
|
if (data) { |
|
|
|
|
this.index.deleteStoreOilCard(id, dataReturn => { |
|
|
|
|
if (dataReturn['return_code'] === '000000') { |
|
|
|
|
this.message.success('操作成功'); |
|
|
|
|
this.getOilCardList(this.storeId); |
|
|
|
|
} else { |
|
|
|
|
this.message.warning(dataReturn['return_msg']); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|