封面会员价
This commit is contained in:
parent
ed40ec677e
commit
eff9fccd2f
@ -51,6 +51,16 @@ public class OilNumberController extends BaseController {
|
||||
return getSuccessResult(list);
|
||||
}
|
||||
|
||||
@ApiOperation("查询所有油号")
|
||||
@GetMapping("getList2")
|
||||
public ResponseObject selectAll2(@RequestParam(value = "pageNo",defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(value = "pageSize",defaultValue = "10000") Integer pageSize,
|
||||
OilNumber oilNumber) {
|
||||
Page page =new Page(pageNo,pageSize);
|
||||
IPage<OilNumber> list = oilPresetPricesService.selectOilNumberList2(page,oilNumber);
|
||||
return getSuccessResult(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过主键查询单条数据
|
||||
*
|
||||
|
@ -23,6 +23,7 @@ public interface OilNumberMapper extends BaseMapper<OilNumber> {
|
||||
* @return
|
||||
*/
|
||||
IPage<OilNumber> selectOilNumberList(Page page, @Param("oilNumber") OilNumber oilNumber);
|
||||
IPage<OilNumber> selectOilNumberList2(Page page, @Param("oilNumber") OilNumber oilNumber);
|
||||
|
||||
/**
|
||||
* 根据id查询员工信息
|
||||
|
@ -31,6 +31,19 @@
|
||||
where store_id = #{oilNumber.storeId}
|
||||
</select>
|
||||
|
||||
<select id="selectOilNumberList2" resultMap="OilNumberResult">
|
||||
select
|
||||
omm.number_id ,
|
||||
onn.oil_type,
|
||||
onn.oil_name,
|
||||
omm.oil_price,
|
||||
omm.gb_price
|
||||
from oil_number omm
|
||||
left join oil_name onn on omm.oil_name = onn.id
|
||||
|
||||
where omm.store_id = #{oilNumber.storeId}
|
||||
</select>
|
||||
|
||||
<!-- select-->
|
||||
<!-- number_id numberId,-->
|
||||
<!-- oil_type oilType,-->
|
||||
|
@ -23,6 +23,7 @@ public interface OilNumberService extends IService<OilNumber> {
|
||||
* @return
|
||||
*/
|
||||
public IPage<OilNumber> selectOilNumberList(Page page, @Param("oilNumber") OilNumber oilNumber);
|
||||
public IPage<OilNumber> selectOilNumberList2(Page page, @Param("oilNumber") OilNumber oilNumber);
|
||||
|
||||
/**
|
||||
* 根据id查询员工信息
|
||||
|
@ -33,6 +33,13 @@ public class OilNumberServiceImpl extends ServiceImpl<OilNumberMapper, OilNumber
|
||||
return baseMapper.selectOilNumberList(page,oilNumber);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IPage<OilNumber> selectOilNumberList2(Page page, OilNumber oilNumber) {
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
oilNumber.setStoreId(nowAccountInfo.getStoreId());
|
||||
return baseMapper.selectOilNumberList2(page,oilNumber);
|
||||
}
|
||||
|
||||
@Override
|
||||
public OilNumber selectOilNumberById(int id) {
|
||||
return baseMapper.selectOilNumberById(id);
|
||||
|
@ -49,18 +49,18 @@
|
||||
<view class="conttainer-title">今日会员价</view>
|
||||
<view class="conttainer-box">
|
||||
<view class="c-box-box1" @click="show = true">
|
||||
<view class="">92#</view>
|
||||
<view class="">{{oilInfo.oilName}}</view>
|
||||
<view class="">
|
||||
<u-icon name="arrow-down-fill"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
<view class="c-box-box2">
|
||||
<view class="xred">会员价</view>
|
||||
<view class="dred"> <text class="xred">¥</text> 6.55</view>
|
||||
<view class="dred"> <text class="xred">¥</text> {{oilInfo.oilPrice}}</view>
|
||||
</view>
|
||||
<view class="c-box-box3">
|
||||
<view class="xblck">国际价</view>
|
||||
<view class="dblck"> <text class="xblck">¥</text> 6.55</view>
|
||||
<view class="dblck"> <text class="xblck">¥</text> {{oilInfo.oilPrice}}</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@ -105,7 +105,9 @@
|
||||
<view style="height: 88px; width: 100%;"></view>
|
||||
</view>
|
||||
<!-- 加油站卡片结束-->
|
||||
<u-picker :show="show" :columns="columns" @confirm="confirm" @cancel="cancel"></u-picker>
|
||||
<!-- <u-picker :show="show" :columns="columns" @confirm="confirm" @cancel="cancel"></u-picker> -->
|
||||
<u-picker :columns="columns" @confirm="confirm" :show="show" @cancel="show = false" keyName="label"></u-picker>
|
||||
|
||||
<!--外层结束 -->
|
||||
<tabbar :msg="msg"></tabbar>
|
||||
</view>
|
||||
@ -115,16 +117,24 @@
|
||||
|
||||
<script>
|
||||
import tabbar from "../../components/tabbar/tabbar.vue"
|
||||
|
||||
import config from '@/config'
|
||||
import request from '../../utils/request'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
msg: "1",
|
||||
show: false,
|
||||
title: '',
|
||||
oilTypeList: '',
|
||||
columns: [
|
||||
['#92', '#95', '#98']
|
||||
|
||||
],
|
||||
oilInfo: {
|
||||
oilName:'未添加',
|
||||
oilPrice:'0',
|
||||
gbPrice:'0'
|
||||
},
|
||||
|
||||
list3: [
|
||||
'http://47.95.206.185:83/topbj.png',
|
||||
'http://47.95.206.185:83/centerbj.png',
|
||||
@ -164,6 +174,7 @@
|
||||
this.staffId = uni.getStorageSync("inviteStaffId")
|
||||
}
|
||||
this.isExistStoreId();
|
||||
this.getOilType();
|
||||
},
|
||||
onShow() {
|
||||
this.isExistStoreId();
|
||||
@ -242,8 +253,44 @@
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
//获取油站的油号信息
|
||||
getOilType() {
|
||||
request({
|
||||
url: 'business/petrolStationManagement/oilNumber/getList2',
|
||||
method: 'get',
|
||||
// params:{}
|
||||
}).then((res)=>{
|
||||
if(res.code == 200){
|
||||
this.oilTypeList = res.data.records
|
||||
console.log("aaabbb",this.oilTypeList)
|
||||
if (this.oilTypeList.length > 0) {
|
||||
this.oilInfo.oilName = this.oilTypeList[0].oilName,
|
||||
this.oilInfo.oilPrice = this.oilTypeList[0].oilPrice,
|
||||
this.oilInfo.gbPrice = this.oilTypeList[0].gbPrice
|
||||
}
|
||||
let oilData = []
|
||||
this.oilTypeList.forEach(res => {
|
||||
let data = {
|
||||
id:res.numberId,
|
||||
label:res.oilName,
|
||||
oilPrice:res.oilPrice,
|
||||
gbPrice:res.gbPrice
|
||||
}
|
||||
oilData.push(data)
|
||||
})
|
||||
|
||||
this.columns = [oilData]
|
||||
console.log("aaa",this.columns)
|
||||
}
|
||||
})
|
||||
},
|
||||
confirm(e) {
|
||||
console.log('选中的油号', e);
|
||||
this.oilInfo.oilName = e.value[0].label,
|
||||
this.oilInfo.oilPrice = e.value[0].oilPrice,
|
||||
this.oilInfo.gbPrice = e.value[0].gbPrice
|
||||
|
||||
this.show = false
|
||||
},
|
||||
cancel() {
|
||||
|
Loading…
Reference in New Issue
Block a user