This commit is contained in:
cun-nan 2024-02-23 18:00:16 +08:00
parent 922cfcb017
commit 4af99bb62e
23 changed files with 840 additions and 127 deletions

View File

@ -181,11 +181,11 @@
<el-form-item label="商品条码" prop="goodsNo">
<el-input v-model="form.goodsNo"
@keydown.enter.native="getGoods(form)"
:disabled="title == '编辑商品'"
:disabled="title == '商品维护'"
v-focus
clearable
placeholder="商品的条码信息">
<el-button slot="append" @click="getGoods(form)">查询</el-button>
<!-- <el-button slot="append" @click="getGoods(form)">查询</el-button>-->
</el-input>
<!-- <div style="text-align: right;color: grey;font-size: 12px">-->
<!-- 商品无条码您可以<span style="color: #00afff" @click="createGoodNo">生成条码</span>-->
@ -474,7 +474,6 @@ export default {
results = [];
let falg = false;
_this.supplierList.forEach(item => {
console.log(item)
if(item.name.includes(queryString)){
results.push(item)
falg = true
@ -498,6 +497,7 @@ export default {
// console.log(res)
if (res.data==1){
this.$modal.msgSuccess("已为您自动添加此供应商")
this.supplier = val;
this.getSuppilers(val)
}
})
@ -697,7 +697,7 @@ export default {
// this.cvsGoodId = response.data.cvsGoodId
this.open = true;
this.isAdd = true;
this.title = "编辑商品";
this.title = "商品维护";
});
},
//

View File

@ -454,7 +454,6 @@ export default {
results = [];
let falg = false;
_this.supplierList.forEach(item => {
console.log(item)
if(item.name.includes(queryString)){
results.push(item)
falg = true
@ -480,6 +479,7 @@ export default {
addSupplier({name:val,remark:"添加商品自动添加"}).then(res => {
// console.log(res)
if (res.data==1){
this.supplier = val;
this.$modal.msgSuccess("已为您自动添加此供应商")
this.getSuppilers(val)
}
@ -680,7 +680,7 @@ export default {
selectParentById(id).then(response => {
this.form = response.data;
this.open = true;
this.title = "编辑品类";
this.title = "修改品类信息";
});
},
//
@ -725,7 +725,7 @@ export default {
}
.app-container{
width: 100%;
height: 100vh;
height: 100%;
background: #f6f8f9;
}
</style>

View File

@ -31,16 +31,29 @@
/>
</el-form-item>
<el-form-item label="销售时间">
<!-- <el-date-picker-->
<!-- v-model="dateRange"-->
<!-- style="width: 240px"-->
<!-- size="medium"-->
<!-- value-format="yyyy-MM-dd"-->
<!-- type="daterange"-->
<!-- range-separator="-"-->
<!-- start-placeholder="开始日期"-->
<!-- end-placeholder="结束日期"-->
<!-- ></el-date-picker>-->
<el-date-picker
v-model="dateRange"
style="width: 240px"
size="medium"
value-format="yyyy-MM-dd"
type="daterange"
range-separator="-"
start-placeholder="开始日期"
end-placeholder="结束日期"
></el-date-picker>
v-model="beginTime"
style="width: 160px"
type="date"
placeholder="开始日期">
</el-date-picker>
<el-date-picker
v-model="endTime"
style="width: 160px"
type="date"
placeholder="结束日期">
</el-date-picker>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
@ -173,6 +186,8 @@ export default {
},
//
dateRange: [],
beginTime:"",
endTime:"",
dialogVisible: false,
//
loading: false,
@ -192,6 +207,10 @@ export default {
methods: {
//
exportSale(){
if (this.beginTime && this.endTime) {
this.dateRange.push(this.beginTime.toLocaleDateString())
this.dateRange.push(this.endTime.toLocaleDateString())
}
exportSale(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
const blob = new Blob([response], { type: 'application/json' })
this.$download.saveAs(blob,'商品销售统计.xlsx')
@ -202,7 +221,11 @@ export default {
detail(data){
this.table = true;
this.queryParam.saleId = data.id;
listSaleDetail(this.queryParam).then(response => {
if (this.beginTime && this.endTime) {
this.dateRange.push(this.beginTime.toLocaleDateString())
this.dateRange.push(this.endTime.toLocaleDateString())
}
listSaleDetail(this.addDateRange(this.queryParam, this.dateRange)).then(response => {
this.detailList = response.data.records;
this.total1 = response.data.total;
this.loading = false;
@ -211,6 +234,10 @@ export default {
//
getList(){
this.loading = true;
if (this.beginTime && this.endTime) {
this.dateRange.push(this.beginTime.toLocaleDateString())
this.dateRange.push(this.endTime.toLocaleDateString())
}
listSale(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
this.list = response.data.records;
this.total = response.data.total;
@ -229,6 +256,8 @@ export default {
//
resetQuery() {
this.dateRange = [];
this.beginTime = ""
this.endTime = ""
this.resetForm("queryForm");
this.$refs.tables.sort(this.defaultSort.prop, this.defaultSort.order);
this.handleQuery();

View File

@ -271,6 +271,7 @@ export default {
})
},
handleAdd(){
this.form1 = {}
this.title = "新增挂账单位"
this.open1 = true
},
@ -307,7 +308,7 @@ export default {
this.open1 = false;
this.getList();
}else {
this.$modal.msgError("挂账单位信息修改失败");
this.$modal.msgError("挂账单位信息修改失败,挂账单位名称不可重复");
}
})
}else {
@ -317,7 +318,7 @@ export default {
this.open1 = false;
this.getList();
}else {
this.$modal.msgError("挂账单位信息创建失败,挂单位名称不可重复");
this.$modal.msgError("挂账单位信息创建失败,挂单位名称不可重复");
}
})
}

View File

@ -69,16 +69,29 @@
<!-- </el-select>-->
<!-- </el-form-item>-->
<el-form-item label="注册时间">
<!-- <el-date-picker-->
<!-- v-model="dateRange"-->
<!-- style="width: 240px"-->
<!-- size="medium"-->
<!-- value-format="yyyy-MM-dd"-->
<!-- type="daterange"-->
<!-- range-separator="至"-->
<!-- start-placeholder="开始日期"-->
<!-- end-placeholder="结束日期"-->
<!-- ></el-date-picker>-->
<el-date-picker
v-model="dateRange"
style="width: 240px"
size="medium"
value-format="yyyy-MM-dd"
type="daterange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
></el-date-picker>
v-model="beginTime"
style="width: 160px"
type="date"
placeholder="开始日期">
</el-date-picker>
<el-date-picker
v-model="endTime"
style="width: 160px"
type="date"
placeholder="结束日期">
</el-date-picker>
</el-form-item>
<el-form-item>
@ -522,6 +535,8 @@ export default {
openPoint: false,
//
dateRange: [],
beginTime:"",
endTime:"",
//
defaultSort: {prop: 'updateTime', order: 'descending'},
//
@ -594,7 +609,13 @@ export default {
//
getList() {
this.loading = true;
listUser(this.addDateRange(this.queryParams, this.dateRange)).then( response => {
let dateRange = []
if (this.beginTime && this.endTime) {
dateRange.push(this.beginTime.toLocaleDateString())
dateRange.push(this.endTime.toLocaleDateString())
}
listUser(this.addDateRange(this.queryParams, dateRange)).then( response => {
this.list = response.data.records;
this.total = response.data.total;
this.loading = false;
@ -602,7 +623,12 @@ export default {
},
//
getStatistic(){
listStatistic(this.addDateRange(this.queryParams, this.dateRange)).then( response => {
let dateRange = []
if (this.beginTime && this.endTime) {
dateRange.push(this.beginTime.toLocaleDateString())
dateRange.push(this.endTime.toLocaleDateString())
}
listStatistic(this.addDateRange(this.queryParams, dateRange)).then( response => {
this.addNum = response.data.addNum;
this.yesterdayAddNum = response.data.yesterdayAddNum;
if (!response.data.balance) {
@ -648,6 +674,8 @@ export default {
this.queryParams.official = "";
this.ifBalance = ""
this.storeIds = [];
this.beginTime = ""
this.endTime = ""
this.$refs.tables.sort(this.defaultSort.prop, this.defaultSort.order);
this.handleQuery();
},

View File

@ -20,16 +20,29 @@
</el-select>
</el-form-item>
<el-form-item label="创建时间">
<!-- <el-date-picker-->
<!-- v-model="dateRange"-->
<!-- style="width: 240px"-->
<!-- size="medium"-->
<!-- value-format="yyyy-MM-dd"-->
<!-- type="daterange"-->
<!-- range-separator="-"-->
<!-- start-placeholder="开始日期"-->
<!-- end-placeholder="结束日期"-->
<!-- ></el-date-picker>-->
<el-date-picker
v-model="dateRange"
style="width: 240px"
size="medium"
value-format="yyyy-MM-dd"
type="daterange"
range-separator="-"
start-placeholder="开始日期"
end-placeholder="结束日期"
></el-date-picker>
v-model="beginTime"
style="width: 160px"
type="date"
placeholder="开始日期">
</el-date-picker>
<el-date-picker
v-model="endTime"
style="width: 160px"
type="date"
placeholder="结束日期">
</el-date-picker>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
@ -328,16 +341,29 @@
<el-input v-model="queryParams2.orderNo" placeholder="请输入订单号"></el-input>
</el-form-item>
<el-form-item label="创建时间">
<!-- <el-date-picker-->
<!-- v-model="dateRange"-->
<!-- style="width: 240px"-->
<!-- size="medium"-->
<!-- value-format="yyyy-MM-dd"-->
<!-- type="daterange"-->
<!-- range-separator="-"-->
<!-- start-placeholder="开始日期"-->
<!-- end-placeholder="结束日期"-->
<!-- ></el-date-picker>-->
<el-date-picker
v-model="dateRange"
style="width: 240px"
size="medium"
value-format="yyyy-MM-dd"
type="daterange"
range-separator="-"
start-placeholder="开始日期"
end-placeholder="结束日期"
></el-date-picker>
v-model="beginTime"
style="width: 160px"
type="date"
placeholder="开始日期">
</el-date-picker>
<el-date-picker
v-model="endTime"
style="width: 160px"
type="date"
placeholder="结束日期">
</el-date-picker>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="handleQuery1">搜索</el-button>
@ -452,6 +478,8 @@ export default {
staffList:[],
//
dateRange: [],
beginTime:"",
endTime:"",
//
form: {
type:'orderAmount',
@ -498,6 +526,10 @@ export default {
methods:{
getStaffCommissionList(){
this.loading = true
if (this.beginTime && this.endTime) {
this.dateRange.push(this.beginTime.toLocaleDateString())
this.dateRange.push(this.endTime.toLocaleDateString())
}
listStaffCommissionRecord(this.addDateRange(this.queryParams1, this.dateRange)).then(res => {
this.staffCommissionList = res.data.records;
this.total1 = res.data.total;
@ -586,6 +618,10 @@ export default {
//
getCommissionList(){
this.loading = true;
if (this.beginTime && this.endTime) {
this.dateRange.push(this.beginTime.toLocaleDateString())
this.dateRange.push(this.endTime.toLocaleDateString())
}
listCommissionRecord(this.addDateRange(this.queryParams2, this.dateRange)).then(res => {
this.commissionList = res.data.records;
this.total2 = res.data.total;
@ -655,6 +691,8 @@ export default {
page: 1,
pageSize: 10,
}
this.beginTime = ""
this.endTime = ""
// this.resetForm("queryForm");
this.handleQuery();
},

View File

@ -7,6 +7,8 @@ import com.fuint.business.convenienceSore.entity.SaleDetail;
import com.fuint.business.convenienceSore.vo.SaleDetailVo;
import org.apache.ibatis.annotations.Param;
import java.util.List;
public interface SaleDetailMapper extends BaseMapper<SaleDetail> {
/**
* 根据条件分页查询销售详情信息
@ -14,4 +16,11 @@ public interface SaleDetailMapper extends BaseMapper<SaleDetail> {
* @return
*/
public IPage<SaleDetailVo> selectSaleDetailList(Page page, @Param("saleDetail") SaleDetailVo saleDetail);
/**
* 根据条件查询销售详情信息
* @param saleDetail
* @return
*/
List<SaleDetailVo> selectSaleDetails(@Param("saleDetail") SaleDetailVo saleDetail);
}

View File

@ -11,6 +11,26 @@
<where>
sd.store_id = #{saleDetail.storeId}
and sd.sale_id = #{saleDetail.saleId}
<if test="saleDetail.params.beginTime != null and saleDetail.params.beginTime != ''"><!-- 开始时间检索 -->
and date_format(sd.create_time,'%y%m%d') &gt;= date_format(#{saleDetail.params.beginTime},'%y%m%d')
</if>
<if test="saleDetail.params.endTime != null and saleDetail.params.endTime != ''"><!-- 结束时间检索 -->
and date_format(sd.create_time,'%y%m%d') &lt;= date_format(#{saleDetail.params.endTime},'%y%m%d')
</if>
</where>
</select>
<select id="selectSaleDetails" resultType="com.fuint.business.convenienceSore.vo.SaleDetailVo"
parameterType="com.fuint.business.convenienceSore.vo.SaleDetailVo">
<include refid="selectSaleDetail"></include>
<where>
sd.store_id = #{saleDetail.storeId}
and sd.sale_id = #{saleDetail.saleId}
<if test="saleDetail.params.beginTime != null and saleDetail.params.beginTime != ''"><!-- 开始时间检索 -->
and date_format(sd.create_time,'%y%m%d') &gt;= date_format(#{saleDetail.params.beginTime},'%y%m%d')
</if>
<if test="saleDetail.params.endTime != null and saleDetail.params.endTime != ''"><!-- 结束时间检索 -->
and date_format(sd.create_time,'%y%m%d') &lt;= date_format(#{saleDetail.params.endTime},'%y%m%d')
</if>
</where>
</select>
</mapper>

View File

@ -19,12 +19,6 @@
<if test="sale.goodsNo != null and sale.goodsNo != ''">
and mg.goods_no like concat('%', #{sale.goodsNo}, '%')
</if>
<if test="sale.params.beginTime != null and sale.params.beginTime != ''"><!-- 开始时间检索 -->
and date_format(sa.update_time,'%y%m%d') &gt;= date_format(#{sale.params.beginTime},'%y%m%d')
</if>
<if test="sale.params.endTime != null and sale.params.endTime != ''"><!-- 结束时间检索 -->
and date_format(sa.update_time,'%y%m%d') &lt;= date_format(#{sale.params.endTime},'%y%m%d')
</if>
</where>
</select>
<select id="selectSales" resultType="com.fuint.business.convenienceSore.vo.SaleStatisticVo"

View File

@ -7,6 +7,8 @@ import com.fuint.business.convenienceSore.entity.SaleDetail;
import com.fuint.business.convenienceSore.vo.SaleDetailVo;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
/**
* 销售详情信息 业务层
*/
@ -19,6 +21,13 @@ public interface SaleDetailService extends IService<SaleDetail> {
*/
public IPage<SaleDetailVo> selectSaleDetailList(Page page, SaleDetailVo saleDetail);
/**
* 根据条件查询销售详情信息
* @param saleDetail
* @return
*/
List<SaleDetailVo> selectSaleDetails(SaleDetailVo saleDetail);
/**
* 添加销售详情信息
* @param saleDetail

View File

@ -213,7 +213,9 @@ public class CvsGoodsServiceImpl extends ServiceImpl<CvsGoodsMapper,CvsGoods> im
public int updateCvsGood(CvsGoods goods) {
CvsGoods cvsGoods = this.selectCvsGoodsByName(goods.getName(), goods.getStoreId());
int row = 0;
if (ObjectUtil.isEmpty(cvsGoods)){
if (ObjectUtil.isNotEmpty(cvsGoods) && goods.getId()!=cvsGoods.getId()){
row = 0;
}else {
row = baseMapper.updateById(goods);
}
return row;

View File

@ -16,6 +16,8 @@ import com.fuint.common.util.TokenUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* 销售详情信息 业务层
*/
@ -40,6 +42,13 @@ public class SaleDetailServiceImpl extends ServiceImpl<SaleDetailMapper, SaleDet
return saleDetailVoIPage;
}
@Override
public List<SaleDetailVo> selectSaleDetails(SaleDetailVo saleDetail) {
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
saleDetail.setStoreId(nowAccountInfo.getStoreId());
return baseMapper.selectSaleDetails(saleDetail);
}
/**
* 添加销售详情信息
* @param saleDetail

View File

@ -1,15 +1,20 @@
package com.fuint.business.convenienceSore.service.impl;
import cn.hutool.core.collection.CollectionUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.fuint.business.convenienceSore.entity.SaleStatistic;
import com.fuint.business.convenienceSore.mapper.SaleStatisticMapper;
import com.fuint.business.convenienceSore.service.SaleDetailService;
import com.fuint.business.convenienceSore.service.SaleStatisticService;
import com.fuint.business.convenienceSore.vo.SaleDetailVo;
import com.fuint.business.convenienceSore.vo.SaleStatisticVo;
import com.fuint.common.dto.AccountInfo;
import com.fuint.common.util.TokenUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Service;
import java.util.List;
@ -19,6 +24,10 @@ import java.util.List;
*/
@Service
public class SaleStatisticServiceImpl extends ServiceImpl<SaleStatisticMapper, SaleStatistic> implements SaleStatisticService {
@Autowired
@Lazy
private SaleDetailService saleDetailService;
/**
* 根据条件分页查询销售统计信息
* @param page
@ -30,6 +39,28 @@ public class SaleStatisticServiceImpl extends ServiceImpl<SaleStatisticMapper, S
Integer storeId = nowAccountInfo.getStoreId();
saleStatisticVo.setStoreId(storeId);
IPage<SaleStatisticVo> saleStatisticVoIPage = baseMapper.selectSaleList(page, saleStatisticVo);
for (SaleStatisticVo record : saleStatisticVoIPage.getRecords()) {
SaleDetailVo saleDetailVo = new SaleDetailVo();
saleDetailVo.setSaleId(record.getId());
saleDetailVo.setParams(saleStatisticVo.getParams());
List<SaleDetailVo> saleDetailVos = saleDetailService.selectSaleDetails(saleDetailVo);
Integer saleNumber = 0;
Double saleTotal = 0.0;
Double costTotal = 0.0;
Double profitTotal = 0.0;
if (CollectionUtil.isNotEmpty(saleDetailVos)){
for (SaleDetailVo detailVo : saleDetailVos) {
saleNumber += detailVo.getSaleNumber();
saleTotal += detailVo.getSaleTotal();
costTotal += detailVo.getCostTotal();
profitTotal += detailVo.getProfitTotal();
}
}
record.setSaleNumber(saleNumber);
record.setSaleTotal(saleTotal);
record.setCostTotal(costTotal);
record.setProfitTotal(profitTotal);
}
return saleStatisticVoIPage;
}

View File

@ -137,7 +137,17 @@ public class CreditUnitServiceImpl extends ServiceImpl<CreditUnitMapper, CreditU
@Override
public int updateCreditUnit(CreditUnit creditUnit) {
int row = baseMapper.updateById(creditUnit);
// 查询挂账单位是否存在相同名字
QueryWrapper queryWrapper = new QueryWrapper<>();
queryWrapper.eq("unit_name",creditUnit.getUnitName());
queryWrapper.eq("store_id",creditUnit.getStoreId());
CreditUnit creditUnit1 = baseMapper.selectOne(queryWrapper);
int row = 0;
if (ObjectUtil.isNotEmpty(creditUnit1) && creditUnit1.getId() != creditUnit.getId()){
row = 0;
}else {
row = baseMapper.updateById(creditUnit);
}
return row;
}
}

View File

@ -128,17 +128,19 @@ public class LJStoreServiceImpl extends ServiceImpl<LJStoreMapper, LJStore> impl
}else {
LJStore store = this.selectStoreByStoreId(Integer.valueOf(storeId));
if (store.getStatus().equals("qy") && store.getIfDelete().equals("0")){
double dLat = Math.toRadians(Double.parseDouble(store.getLatitude()) - lat);
double dLon = Math.toRadians(Double.parseDouble(store.getLongitude()) - lon);
if (StringUtils.isNotEmpty(store.getLatitude()) && StringUtils.isNotEmpty(store.getLongitude())) {
double dLat = Math.toRadians(Double.parseDouble(store.getLatitude()) - lat);
double dLon = Math.toRadians(Double.parseDouble(store.getLongitude()) - lon);
double a = Math.sin(dLat / 2) * Math.sin(dLat / 2) +
Math.cos(Math.toRadians(lat)) * Math.cos(Math.toRadians(Double.parseDouble(store.getLatitude()))) *
Math.sin(dLon / 2) * Math.sin(dLon / 2);
double a = Math.sin(dLat / 2) * Math.sin(dLat / 2) +
Math.cos(Math.toRadians(lat)) * Math.cos(Math.toRadians(Double.parseDouble(store.getLatitude()))) *
Math.sin(dLon / 2) * Math.sin(dLon / 2);
double c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));
double c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));
double min = earthRadius * c;
distance = min;
double min = earthRadius * c;
distance = min;
}
ljStore = store;
}

View File

@ -162,6 +162,7 @@
and date_format(mub.create_time,'%y%m%d') &lt;= date_format(#{user.params.endTime},'%y%m%d')
</if>
</where>
ORDER BY mub.create_time desc
</select>
<!-- 查询会员统计信息-->

View File

@ -226,15 +226,15 @@ public class LJUserGradeServiceImpl extends ServiceImpl<LJUserGradeMapper, LJUse
this.insertUserGrade(userGrade,storeId);
userGrade.setGrade(2);
userGrade.setName("白金会员");
userGrade.setGrowthValue(200);
userGrade.setGrowthValue(500);
this.insertUserGrade(userGrade,storeId);
userGrade.setGrade(3);
userGrade.setName("黄金会员");
userGrade.setGrowthValue(300);
userGrade.setGrowthValue(2000);
this.insertUserGrade(userGrade,storeId);
userGrade.setGrade(4);
userGrade.setName("钻石会员");
userGrade.setGrowthValue(400);
userGrade.setGrowthValue(5000);
this.insertUserGrade(userGrade,storeId);
}

View File

@ -4,7 +4,7 @@
<div class="center-left">
<div class="center-vh">
<div class="center-left-top">
<div class="vip-bottom" v-if="isMember == false" @click="dialogVisiblevip = true">
<div class="vip-bottom" v-if="isMember == false" @click="queryUser">
<div>会员搜索</div>
</div>
<div v-else style="width: 96%;margin: 0 auto;display: flex;justify-content: space-between">
@ -863,7 +863,7 @@
<el-input v-model="authCode"
v-focus ref="getFocus"
autofocus
@input="changeSeekZero"
@input="changeSeekZero1"
@keydown.enter.native="collection1"
placeholder="请输入收款金额">
</el-input>
@ -1103,7 +1103,7 @@
</span>
</el-dialog>
<!-- 支付成功后小票打印内容-->
<!-- 支付成功后小票打印内容 收银台订单-->
<div id="reportSuccess" ref="report" class="box-center" v-show="false">
<div class="box-title">订单统计</div>
<div class="box-ge">
@ -1116,10 +1116,6 @@
<div v-if="isMember == false">{{ item.retailPrice }}</div>
<div v-else>{{ item.memberPrice }}</div>
</div>
<div class="input-box" v-if="rechargeBalCard">
<div>充值金额</div>
<div>{{ rechargeBalCard.amount ? rechargeBalCard.amount : rechargeBalCard.rechargeBalance }}</div>
</div>
<div class="input-box">
<div>支付方式</div>
<div v-if="payType == 'CASH'">现金</div>
@ -1129,23 +1125,11 @@
<div v-else-if="payType == 'credit'">挂账</div>
<div v-else>小程序码</div>
</div>
<div class="input-box" v-if="rechargeBalCard">
<div>赠送金额</div>
<div>{{ rechargeBalCard.giftBalance }}</div>
</div>
<div class="input-box" v-if="rechargeBalCard">
<div>到账金额</div>
<div>{{ rechargeBalCard.amount ? rechargeBalCard.giftBalance + rechargeBalCard.amount : rechargeBalCard.giftBalance + rechargeBalCard.rechargeBalance }}</div>
</div>
<div class="input-box" v-if="rechargeBalCard">
<div>实付款</div>
<div>{{ rechargeBalCard.amount ? rechargeBalCard.amount : rechargeBalCard.rechargeBalance }}</div>
</div>
<div class="input-box1">
<div v-if="payType == 'credit'">挂账单位</div>
<div>{{ form1.unitName }}</div>
</div>
<div class="input-box" v-if="!rechargeBalCard && rechargeOilCard">
<div class="input-box">
<div v-if="payType != 'credit'">合计</div>
<div v-else>挂账金额</div>
<div>{{ (oilAmount+(+goodsAmount)).toFixed(2) }}</div>
@ -1162,7 +1146,7 @@
<div>囤油卡付款</div>
<div>{{ consumeRefuelMoney.toFixed(2) }}</div>
</div>
<div class="input-box" v-if="!rechargeBalCard && rechargeOilCard">
<div class="input-box">
<div>实付款</div>
<div v-if="payType == 'credit'">0.00</div>
<div v-else>{{ ((+oilActualPay)+(+goodsActualPay)).toFixed(2) }}</div>
@ -1173,6 +1157,79 @@
</div>
</div>
</div>
<!-- 支付成功后小票打印内容 充值订单-->
<div id="reportSuccess" ref="report1" class="box-center" v-show="false">
<div class="box-title">订单统计</div>
<div class="box-ge">
<div class="input-box">
<div>充值金额</div>
<div>{{ realyPayBills }}</div>
</div>
<div class="input-box">
<div>赠送金额</div>
<div>{{ cardValueForm.giftBalance }}</div>
</div>
<div class="input-box">
<div>到账金额</div>
<div>{{ cardValueForm.giftBalance + realyPayBills }}</div>
</div>
<div class="input-box">
<div>支付方式</div>
<div v-if="cardValueForm.paymentType == 'CASH'">现金</div>
<div v-else-if="cardValueForm.paymentType == 'WECHAT'">微信</div>
<div v-else-if="cardValueForm.paymentType == 'ALIPAY'">支付宝</div>
<div v-else-if="cardValueForm.paymentType == 'UNIONPAY'">银联二维码</div>
</div>
<div class="input-box">
<div>实付款</div>
<div v-if="cardValueForm.paymentType == 'CASH'">{{ authCode }}</div>
<div v-else>{{ realyPayBills }}</div>
</div>
<div class="input-box" v-if="seekZero>0">
<div>找零</div>
<div>{{ seekZero.toFixed(2) }}</div>
</div>
</div>
</div>
<!-- 支付成功后小票打印内容 充值订单-->
<div id="reportSuccess" ref="report2" class="box-center" v-show="false">
<div class="box-title">订单统计</div>
<div class="box-ge">
<div class="input-box">
<div>充值油品</div>
<div>{{ cardFuelDieselForm.type }}</div>
</div>
<div class="input-box">
<div>充值升数</div>
<div>{{ cardFuelDieselForm.incomeLitres }}L</div>
</div>
<div class="input-box">
<div>订单金额</div>
<div>{{ realyPayBills }}</div>
</div>
<div class="input-box">
<div>锁价金额</div>
<div>{{ cardFuelDieselForm.lockupPrice }}</div>
</div>
<div class="input-box">
<div>支付方式</div>
<div v-if="cardFuelDieselForm.paymentType == 'CASH'">现金</div>
<div v-else-if="cardFuelDieselForm.paymentType == 'WECHAT'">微信</div>
<div v-else-if="cardFuelDieselForm.paymentType == 'ALIPAY'">支付宝</div>
<div v-else-if="cardFuelDieselForm.paymentType == 'UNIONPAY'">银联二维码</div>
</div>
<div class="input-box">
<div>实付款</div>
<div>{{ realyPayBills }}</div>
</div>
<div class="input-box" v-if="seekZero>0">
<div>找零</div>
<div>{{ seekZero.toFixed(2) }}</div>
</div>
</div>
</div>
</div>
</template>
@ -1209,8 +1266,8 @@
components: {SelectStaff},
data(){
return{
rechargeBalCard:{},
rechargeOilCard:{},
rechargeBalCard:false,
rechargeOilCard:false,
openStaff:false,
cardFuelDieselForm: {
mtStaffId: '',
@ -1594,6 +1651,10 @@
}
},
methods:{
queryUser(){
this.refuelMoney = null
this.dialogVisiblevip = true
},
handleDataFromChild(data) {
this.openStaff = false
// this.cardFuelDieselForm= {
@ -1776,13 +1837,15 @@
}
},
//
getMemberAfter(){
getUserInfoMobile({mobile:this.member.mobile}).then(res => {
async getMemberAfter(){
await getUserInfoMobile({mobile:this.member.mobile}).then(res => {
if (res.data){
this.member = res.data
if (res.data.refuelMoney){
this.refuelMoney = JSON.parse(res.data.refuelMoney)
}
this.rechargeBalCard = false
this.rechargeOilCard = false
}
})
},
@ -1829,19 +1892,20 @@
let this_ = this
//
let timer = setInterval(async () => {
await getCheckTheStatusOfYourPaymentApi(id).then(response => {
await getCheckTheStatusOfYourPaymentApi(id).then(async response => {
if (response.data != null) {
const payStatus = response.data.payStatus
if (payStatus === "unpaid") {
this_.isQuery = true;
}else if (payStatus === "paid") {
} else if (payStatus === "paid") {
//
this_.isPaySuccess = true;
this_.isQuery = false;
// this_.rechargeBalCard = response.data
// this_.printLocally()
this_.getMemberAfter();
}else if (payStatus === "payFail") {
this_.rechargeBalCard = true
await this_.printLocally1()
await this_.getMemberAfter();
clearInterval(timer);
} else if (payStatus === "payFail") {
this_.isPaySuccess = false;
this_.isQuery = false;
}
@ -1906,7 +1970,7 @@
let timer = setInterval(async () => {
getCheckTheStatusOfYourPaymentByFuelApi(id).then(response => {
getCheckTheStatusOfYourPaymentByFuelApi(id).then(async response => {
if (response.data != null) {
if (response.data.payStatus == "unpaid") {
this_.isQuery = true;
@ -1914,9 +1978,10 @@
if (response.data.payStatus == "paid") {
this_.isPaySuccess = true;
this_.isQuery = false;
this_.rechargeOilCard = response.data
this_.printLocally()
this_.getMemberAfter();
this_.rechargeOilCard = true
await this_.printLocally2()
await this_.getMemberAfter();
clearInterval(timer);
}
if (response.data.payStatus == "payFail") {
this_.isPaySuccess = false;
@ -2193,6 +2258,176 @@
var fromHtml = bodyStyle+this.$refs.report.innerHTML
LODOP.ADD_PRINT_HTM(0, 0, "100%", "100%", fromHtml);
LODOP.SET_PRINT_MODE("FULL_WIDTH_FOR_OVERFLOW",true);
// LODOP.ADD_PRINT_BARCODE(10,40,100,100,'QRCode','123456789');
// let preview = LODOP.PREVIEW();
// console.log("preview",preview);
LODOP.PRINT();
},
async printLocally1() {
//
let LODOP = getLodop(); //
LODOP.PRINT_INIT();
var bodyStyle = `<style>
.input-box{
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
font-size: 14px;
margin: 5px 0px;
}
.input-box1{
width: 100%;
font-size: 14px;
margin: 5px 0px;
}
.box-ge{
border-bottom: 1px solid #000000 ;
box-sizing: border-box;
padding: 10px;
}
.box-title{
font-size: 18px;
text-align: center;
align-items: center;
margin-top: 15px;
}
.input-hui{
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
font-size: 14px;
margin: 15px 0px;
background: #b2b2b2;
box-sizing: border-box;
padding: 5px 0px;
}
.input-hui-frou{
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
font-size: 14px;
margin: 15px 0px;
background: #b2b2b2;
box-sizing: border-box;
padding: 5px 0px;
div{
width: 25%;
text-align: left;
}
}
.input-box-frou{
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
font-size: 14px;
margin: 5px 0px;
div{
width: 25%;
text-align: left;
}
}
.box-center{
height: 500px;
}
</style>
`
var fromHtml = bodyStyle+this.$refs.report1.innerHTML
LODOP.ADD_PRINT_HTM(0, 0, "100%", "100%", fromHtml);
LODOP.SET_PRINT_MODE("FULL_WIDTH_FOR_OVERFLOW",true);
// LODOP.ADD_PRINT_BARCODE(10,40,100,100,'QRCode','123456789');
// let preview = LODOP.PREVIEW();
// console.log("preview",preview);
LODOP.PRINT();
},
async printLocally2() {
//
let LODOP = getLodop(); //
LODOP.PRINT_INIT();
var bodyStyle = `<style>
.input-box{
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
font-size: 14px;
margin: 5px 0px;
}
.input-box1{
width: 100%;
font-size: 14px;
margin: 5px 0px;
}
.box-ge{
border-bottom: 1px solid #000000 ;
box-sizing: border-box;
padding: 10px;
}
.box-title{
font-size: 18px;
text-align: center;
align-items: center;
margin-top: 15px;
}
.input-hui{
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
font-size: 14px;
margin: 15px 0px;
background: #b2b2b2;
box-sizing: border-box;
padding: 5px 0px;
}
.input-hui-frou{
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
font-size: 14px;
margin: 15px 0px;
background: #b2b2b2;
box-sizing: border-box;
padding: 5px 0px;
div{
width: 25%;
text-align: left;
}
}
.input-box-frou{
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
font-size: 14px;
margin: 5px 0px;
div{
width: 25%;
text-align: left;
}
}
.box-center{
height: 500px;
}
</style>
`
var fromHtml = bodyStyle+this.$refs.report2.innerHTML
LODOP.ADD_PRINT_HTM(0, 0, "100%", "100%", fromHtml);
LODOP.SET_PRINT_MODE("FULL_WIDTH_FOR_OVERFLOW",true);
@ -2310,16 +2545,19 @@
obj = item;
obj.value = `${item.unitName}${item.personCredit} ${item.contactMobile}`
results.push(obj)
return;
}
if (item.personCredit.includes(queryString)){
obj = item;
obj.value = `${item.unitName}${item.personCredit} ${item.contactMobile}`
results.push(obj)
return;
}
if (item.contactMobile.includes(queryString)){
obj = item;
obj.value = `${item.unitName}${item.personCredit} ${item.contactMobile}`
results.push(obj)
return;
}
})
}
@ -2329,6 +2567,10 @@
changeSeekZero(){
this.seekZero = this.authCode - this.oilActualPay - this.goodsActualPay
},
//
changeSeekZero1(){
this.seekZero = this.authCode - this.realyPayBills
},
// id
getGradeName(list,id){
let name = "";
@ -2500,7 +2742,8 @@
this.countAmountFull();
},
//
querySearch(queryString, cb) {
async querySearch(queryString, cb) {
await this.getGoods()
let _this = this;
let results = _this.goodsList;
if (queryString != ""){
@ -2508,9 +2751,11 @@
_this.goodsList.forEach(item => {
if(item.name.includes(queryString)){
results.push(item)
return;
}
if(item.goodsNo.includes(queryString)){
results.push(item)
return;
}
})
}
@ -3155,6 +3400,8 @@
this.member = data;
if (data.refuelMoney){
this.refuelMoney = JSON.parse(data.refuelMoney)
}else {
this.refuelMoney = null
}
this.dialogVisibleMember = false;
},
@ -3476,6 +3723,8 @@
this.member = response.data
if (response.data.refuelMoney){
this.refuelMoney = JSON.parse(response.data.refuelMoney)
}else {
this.refuelMoney = null
}
this.storeId = response.data.storeId
this.isSure = false

View File

@ -69,16 +69,29 @@
</el-select>
</el-form-item>
<el-form-item label="注册时间">
<!-- <el-date-picker-->
<!-- v-model="dateRange"-->
<!-- style="width: 240px"-->
<!-- size="medium"-->
<!-- value-format="yyyy-MM-dd"-->
<!-- type="daterange"-->
<!-- range-separator="至"-->
<!-- start-placeholder="开始日期"-->
<!-- end-placeholder="结束日期"-->
<!-- ></el-date-picker>-->
<el-date-picker
v-model="dateRange"
style="width: 240px"
size="medium"
value-format="yyyy-MM-dd"
type="daterange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
></el-date-picker>
v-model="beginTime"
style="width: 160px"
type="date"
placeholder="开始日期">
</el-date-picker>
<el-date-picker
v-model="endTime"
style="width: 160px"
type="date"
placeholder="结束日期">
</el-date-picker>
</el-form-item>
<el-form-item>
@ -203,11 +216,7 @@
<div>{{ scope.row.consumeNum }}</div>
</template>
</el-table-column>
<el-table-column label="注册时间" align="center" width="160" prop="createTime">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime) }}</span>
</template>
</el-table-column>
<el-table-column label="注册时间" align="center" width="160" prop="balCreateTime"/>
<el-table-column label="状态" align="center" prop="status">
<template slot-scope="scope">
<el-tag v-if="scope.row.status == 'qy'">启用</el-tag>
@ -521,6 +530,8 @@
openPoint: false,
//
dateRange: [],
beginTime:"",
endTime:"",
//
defaultSort: {prop: 'updateTime', order: 'descending'},
//
@ -587,7 +598,12 @@
//
getList() {
this.loading = true;
listUser(this.addDateRange(this.queryParams, this.dateRange)).then( response => {
let dateRange = []
if (this.beginTime && this.endTime) {
dateRange.push(this.beginTime.toLocaleDateString())
dateRange.push(this.endTime.toLocaleDateString())
}
listUser(this.addDateRange(this.queryParams, dateRange)).then( response => {
this.list = response.data.records;
this.total = response.data.total;
this.loading = false;
@ -596,7 +612,12 @@
},
//
getStatistic(){
listStatistic(this.addDateRange(this.queryParams, this.dateRange)).then( response => {
let dateRange = []
if (this.beginTime && this.endTime) {
dateRange.push(this.beginTime.toLocaleDateString())
dateRange.push(this.endTime.toLocaleDateString())
}
listStatistic(this.addDateRange(this.queryParams, dateRange)).then( response => {
this.addNum = response.data.addNum;
this.yesterdayAddNum = response.data.yesterdayAddNum;
if (!response.data.balance) {
@ -636,6 +657,8 @@
this.resetForm("queryForm");
this.queryParams.storeIds = '';
this.storeIds = [];
this.beginTime = ""
this.endTime = ""
this.$refs.tables.sort(this.defaultSort.prop, this.defaultSort.order);
this.handleQuery();
},

View File

@ -814,6 +814,80 @@
<el-button type="primary" @click="submitSubCard"> </el-button>
</span>
</el-dialog>
<!-- 支付成功后小票打印内容 充值订单-->
<div id="reportSuccess" ref="report1" class="box-center" v-show="false">
<div class="box-title">订单统计</div>
<div class="box-ge">
<div class="input-box">
<div>充值金额</div>
<div>{{ realyPayBills }}</div>
</div>
<div class="input-box">
<div>赠送金额</div>
<div>{{ cardValueForm.giftBalance }}</div>
</div>
<div class="input-box">
<div>到账金额</div>
<div>{{ cardValueForm.giftBalance + realyPayBills }}</div>
</div>
<div class="input-box">
<div>支付方式</div>
<div v-if="cardValueForm.paymentType == 'CASH'">现金</div>
<div v-else-if="cardValueForm.paymentType == 'WECHAT'">微信</div>
<div v-else-if="cardValueForm.paymentType == 'ALIPAY'">支付宝</div>
<div v-else-if="cardValueForm.paymentType == 'UNIONPAY'">银联二维码</div>
</div>
<div class="input-box">
<div>实付款</div>
<div v-if="cardValueForm.paymentType == 'CASH'">{{ authCode }}</div>
<div v-else>{{ realyPayBills }}</div>
</div>
<div class="input-box" v-if="seekZero>0">
<div>找零</div>
<div>{{ seekZero.toFixed(2) }}</div>
</div>
</div>
</div>
<!-- 支付成功后小票打印内容 充值订单-->
<div id="reportSuccess" ref="report2" class="box-center" v-show="false">
<div class="box-title">订单统计</div>
<div class="box-ge">
<div class="input-box">
<div>充值油品</div>
<div>{{ cardFuelDieselForm.type }}</div>
</div>
<div class="input-box">
<div>充值升数</div>
<div>{{ cardFuelDieselForm.incomeLitres }}L</div>
</div>
<div class="input-box">
<div>订单金额</div>
<div>{{ realyPayBills }}</div>
</div>
<div class="input-box">
<div>锁价金额</div>
<div>{{ cardFuelDieselForm.lockupPrice }}</div>
</div>
<div class="input-box">
<div>支付方式</div>
<div v-if="cardFuelDieselForm.paymentType == 'CASH'">现金</div>
<div v-else-if="cardFuelDieselForm.paymentType == 'WECHAT'">微信</div>
<div v-else-if="cardFuelDieselForm.paymentType == 'ALIPAY'">支付宝</div>
<div v-else-if="cardFuelDieselForm.paymentType == 'UNIONPAY'">银联二维码</div>
</div>
<div class="input-box">
<div>实付款</div>
<div>{{ realyPayBills }}</div>
</div>
<div class="input-box" v-if="seekZero>0">
<div>找零</div>
<div>{{ seekZero.toFixed(2) }}</div>
</div>
</div>
</div>
</div>
</template>
@ -853,6 +927,7 @@ import {getUserGradeInfo} from "@/api/cashier/usergrade";
import {getDicts} from "@/api/dict/data";
import {getSysConfig} from "@/api/cashier/user/sysconfig";
import {giftCardExchange} from "@/api/cashier/giftCard/giftcard";
import {getLodop} from "@/api/LodopFuncs";
export default {
components: {
@ -874,6 +949,8 @@ export default {
dicts: ['official', 'zhzt', 'zcrzdj', 'payment_type','pay_status'],
data() {
return {
rechargeBalCard:false,
rechargeOilCard:false,
orderList:[],
openSubCard1:false,
baseUrl: process.env.VUE_APP_BASE_API,
@ -1460,6 +1537,8 @@ export default {
// _this.refuelMoney = parseFloat(refuelMoney[0].refuelMoney)
}
this.getGrade(response.data.gradeId);
this.rechargeBalCard = false
this.rechargeOilCard = false
});
},
getAllAmount(){
@ -1550,6 +1629,176 @@ export default {
},
async printLocally1() {
//
let LODOP = getLodop(); //
LODOP.PRINT_INIT();
var bodyStyle = `<style>
.input-box{
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
font-size: 14px;
margin: 5px 0px;
}
.input-box1{
width: 100%;
font-size: 14px;
margin: 5px 0px;
}
.box-ge{
border-bottom: 1px solid #000000 ;
box-sizing: border-box;
padding: 10px;
}
.box-title{
font-size: 18px;
text-align: center;
align-items: center;
margin-top: 15px;
}
.input-hui{
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
font-size: 14px;
margin: 15px 0px;
background: #b2b2b2;
box-sizing: border-box;
padding: 5px 0px;
}
.input-hui-frou{
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
font-size: 14px;
margin: 15px 0px;
background: #b2b2b2;
box-sizing: border-box;
padding: 5px 0px;
div{
width: 25%;
text-align: left;
}
}
.input-box-frou{
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
font-size: 14px;
margin: 5px 0px;
div{
width: 25%;
text-align: left;
}
}
.box-center{
height: 500px;
}
</style>
`
var fromHtml = bodyStyle+this.$refs.report1.innerHTML
LODOP.ADD_PRINT_HTM(0, 0, "100%", "100%", fromHtml);
LODOP.SET_PRINT_MODE("FULL_WIDTH_FOR_OVERFLOW",true);
// LODOP.ADD_PRINT_BARCODE(10,40,100,100,'QRCode','123456789');
// let preview = LODOP.PREVIEW();
// console.log("preview",preview);
LODOP.PRINT();
},
async printLocally2() {
//
let LODOP = getLodop(); //
LODOP.PRINT_INIT();
var bodyStyle = `<style>
.input-box{
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
font-size: 14px;
margin: 5px 0px;
}
.input-box1{
width: 100%;
font-size: 14px;
margin: 5px 0px;
}
.box-ge{
border-bottom: 1px solid #000000 ;
box-sizing: border-box;
padding: 10px;
}
.box-title{
font-size: 18px;
text-align: center;
align-items: center;
margin-top: 15px;
}
.input-hui{
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
font-size: 14px;
margin: 15px 0px;
background: #b2b2b2;
box-sizing: border-box;
padding: 5px 0px;
}
.input-hui-frou{
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
font-size: 14px;
margin: 15px 0px;
background: #b2b2b2;
box-sizing: border-box;
padding: 5px 0px;
div{
width: 25%;
text-align: left;
}
}
.input-box-frou{
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
font-size: 14px;
margin: 5px 0px;
div{
width: 25%;
text-align: left;
}
}
.box-center{
height: 500px;
}
</style>
`
var fromHtml = bodyStyle+this.$refs.report2.innerHTML
LODOP.ADD_PRINT_HTM(0, 0, "100%", "100%", fromHtml);
LODOP.SET_PRINT_MODE("FULL_WIDTH_FOR_OVERFLOW",true);
// LODOP.ADD_PRINT_BARCODE(10,40,100,100,'QRCode','123456789');
// let preview = LODOP.PREVIEW();
// console.log("preview",preview);
LODOP.PRINT();
},
async collection() {
let actualPayment = 0
let makeChange = 0
@ -1593,16 +1842,20 @@ export default {
let this_ = this
//
let timer = setInterval(async () => {
await getCheckTheStatusOfYourPaymentApi(id).then(response => {
await getCheckTheStatusOfYourPaymentApi(id).then(async response => {
if (response.data != null) {
const payStatus = response.data.payStatus
if (payStatus === "unpaid") {
this_.isQuery = true;
}else if (payStatus === "paid") {
} else if (payStatus === "paid") {
//
this_.isPaySuccess = true;
this_.isQuery = false;
}else if (payStatus === "payFail") {
this_.rechargeBalCard = true
await this_.printLocally1()
await this_.getUserInfo()
clearInterval(timer);
} else if (payStatus === "payFail") {
this_.isPaySuccess = false;
this_.isQuery = false;
}
@ -1667,7 +1920,7 @@ export default {
let timer = setInterval(async () => {
getCheckTheStatusOfYourPaymentByFuelApi(id).then(response => {
getCheckTheStatusOfYourPaymentByFuelApi(id).then(async response => {
if (response.data != null) {
if (response.data.payStatus == "unpaid") {
this_.isQuery = true;
@ -1675,6 +1928,10 @@ export default {
if (response.data.payStatus == "paid") {
this_.isPaySuccess = true;
this_.isQuery = false;
this_.rechargeOilCard = true
await this_.printLocally2()
await this_.getUserInfo()
clearInterval(timer);
}
if (response.data.payStatus == "payFail") {
this_.isPaySuccess = false;

View File

@ -98,7 +98,7 @@
<view class="dis-bt">
<view class="">
<view class="hui1">{{ store.address }}</view>
<view class="hui2" v-if="distance!=''">{{ distance }}km</view>
<view class="hui2" v-if="distance">{{ distance }}km</view>
</view>
<view class="lananniu" @click="goGoGo" v-if="distance!=''">
<uni-icons type="paperplane-filled" color="#195ADA" size="16"></uni-icons>
@ -363,7 +363,6 @@
// this.getAddress();
uni.getSetting({
async success(res) {
// console.log(res, 111,"dingw")
if (!res.authSetting['scope.userLocation']) {
// uni.authorize({
// scope: 'scope.userLocation',
@ -518,6 +517,7 @@
_this.distance = (Math.ceil(response.data.distance))
.toFixed(1)
_this.store = response.data.store
console.log(response,"storeId");
uni.setStorageSync("storeId", response.data.store.id)
uni.setStorageSync("chainStoreId", response.data.store.chainStoreId)
// console.log(uni.getStorageSync("chainStoreId"));
@ -572,6 +572,7 @@
let params = {
storeId: uni.getStorageSync("storeId")
}
console.log(uni.getStorageSync("storeId"));
request({
url: 'business/petrolStationManagement/oilNumber/getList2',
method: 'get',

View File

@ -361,7 +361,7 @@
method: 'get',
}).then((res) => {
_this.oilNumberList = res.data;
if (res.data) {
if (res.data.length>0) {
// _this.getOilGun(res.data[0].numberId);
_this.oilPrice = res.data[0].oilPrice
_this.oilUnit = res.data[0].unit

View File

@ -63,7 +63,7 @@ const request = config => {
})
reject('无效的会话,或者会话已过期,请重新登录。')
} else if (code === 1001) {
showConfirm('您暂未登录,您可以继续留在该页面,或者重新登录?').then(res => {
showConfirm('登录状态已过期,您可以继续留在该页面,或者重新登录?').then(res => {
console.log("res", res)
if (res.confirm) {
uni.reLaunch({