bug
This commit is contained in:
parent
8db3256bb5
commit
9d869e404f
@ -215,21 +215,30 @@
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="供应商" prop="supplierId">
|
||||
<el-autocomplete
|
||||
popper-class="my-autocomplete"
|
||||
style="width: 94%"
|
||||
v-model="supplier"
|
||||
:fetch-suggestions="querySearch"
|
||||
placeholder="供应商名称,如果是未添加的供应商,输完名称点回车即可自动添加"
|
||||
@change="addSupplier"
|
||||
@select="selectSupplier">
|
||||
<template slot-scope="{ item }">
|
||||
<div style="display: flex;justify-content: space-between">
|
||||
<span class="name">{{ item.name }}</span>
|
||||
<!-- <span class="addr">{{ item.memberPrice }}</span>-->
|
||||
</div>
|
||||
</template>
|
||||
</el-autocomplete>
|
||||
<el-select
|
||||
v-model="form1.supplierId"
|
||||
filterable
|
||||
placeholder="请选择供应商"
|
||||
clearable
|
||||
style="width: 80%">
|
||||
<el-option v-for="item in supplierList" :key="item.id" :label="item.name" :value="item.id"/>
|
||||
</el-select>
|
||||
<el-button type="info" plain @click="handleAdd1">添加供应商</el-button>
|
||||
<!-- <el-autocomplete-->
|
||||
<!-- popper-class="my-autocomplete"-->
|
||||
<!-- style="width: 94%"-->
|
||||
<!-- v-model="supplier"-->
|
||||
<!-- :fetch-suggestions="querySearch"-->
|
||||
<!-- placeholder="供应商名称,如果是未添加的供应商,输完名称点回车即可自动添加"-->
|
||||
<!-- @change="addSupplier"-->
|
||||
<!-- @select="selectSupplier">-->
|
||||
<!-- <template slot-scope="{ item }">-->
|
||||
<!-- <div style="display: flex;justify-content: space-between">-->
|
||||
<!-- <span class="name">{{ item.name }}</span>-->
|
||||
<!-- <!– <span class="addr">{{ item.memberPrice }}</span>–>-->
|
||||
<!-- </div>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-autocomplete>-->
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@ -264,6 +273,44 @@
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog :close-on-click-modal="false" :title="title" width="600px" style="margin-top: 5%" :visible.sync="open2" append-to-body>
|
||||
<el-form ref="form2" :model="form2" :rules="rules2" label-width="90px">
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="供应商" prop="name" style="width: 420px">
|
||||
<el-input v-model="form2.name" placeholder="请输入供应商名称" maxlength="30" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="联系人" prop="contacts">
|
||||
<el-input v-model="form2.contacts" placeholder="供应商联系人" maxlength="30"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="联系电话" prop="mobile">
|
||||
<el-input v-model="form2.mobile" placeholder="供应商联系电话" maxlength="30"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="联系地址" prop="address">
|
||||
<el-input v-model="form2.address" placeholder="供应商联系地址" maxlength="30" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="form2.remark" type="textarea" placeholder="请输入内容"></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm2">确 定</el-button>
|
||||
<el-button @click="open2 = false">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -280,7 +327,7 @@ import {getAccount} from "@/api/system/account";
|
||||
import {addLJGoods, createGoodsNo, queryGoodsVoList, queryLJGoods, scanCode} from "@/api/convenienceStore/ljgoods";
|
||||
import pinyin from "js-pinyin";
|
||||
import {getSysConfig} from "@/api/staff/user/sysconfig";
|
||||
import {addSupplier, listSuppliers} from "@/api/convenienceStore/supplier";
|
||||
import {addSupplier, listSuppliers, updateSupplier} from "@/api/convenienceStore/supplier";
|
||||
export default {
|
||||
dicts:['zhzt','yes_or_no'],
|
||||
data() {
|
||||
@ -290,6 +337,7 @@ export default {
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
open2: false,
|
||||
openGoods: false,
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
@ -340,6 +388,7 @@ export default {
|
||||
sort:0,
|
||||
buyingPrice:0,retailPrice:0,memberPrice:0
|
||||
},
|
||||
form2:{},
|
||||
tableData: [{
|
||||
id: '',
|
||||
pid:'',
|
||||
@ -385,13 +434,19 @@ export default {
|
||||
{ required: true, message: "请选择是否能使用积分抵扣", trigger: "blur" },
|
||||
],
|
||||
supplierId: [
|
||||
{ required: true, message: "请选择供应商", trigger: "blur" },
|
||||
{ required: true, message: "请选择供应商", trigger: "change" },
|
||||
],
|
||||
status: [
|
||||
{ required: true, message: "请选择商品状态", trigger: "blur" },
|
||||
],
|
||||
},
|
||||
|
||||
// 表单校验
|
||||
rules2: {
|
||||
name: [
|
||||
{ required: true, message: "供应商名称不能为空", trigger: "blur" },
|
||||
],
|
||||
}
|
||||
|
||||
};
|
||||
},
|
||||
@ -402,6 +457,35 @@ export default {
|
||||
this.getSuppilers();
|
||||
},
|
||||
methods: {
|
||||
// 提交按钮
|
||||
submitForm2: function() {
|
||||
this.$refs["form2"].validate(valid => {
|
||||
if (valid) {
|
||||
if (!this.form2.id) {
|
||||
addSupplier(this.form2).then(response => {
|
||||
if (response.data==1){
|
||||
this.$modal.msgSuccess("供应商新增成功");
|
||||
this.open2 = false;
|
||||
this.getSuppilers();
|
||||
}else {
|
||||
this.$modal.msgError("供应商名称已存在");
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
// 新增按钮操作
|
||||
handleAdd1() {
|
||||
this.reset2();
|
||||
this.open2 = true;
|
||||
this.title = "新增供应商";
|
||||
},
|
||||
// 表单重置
|
||||
reset2() {
|
||||
this.resetForm("form2");
|
||||
this.form2= {}
|
||||
},
|
||||
getSuppilers(val){
|
||||
listSuppliers({ifDelete:'0'}).then(response => {
|
||||
this.supplierList = response.data
|
||||
|
@ -419,7 +419,13 @@ export default {
|
||||
let unitPrice = new BigNumber( data.unitPrice);
|
||||
let subtotalAmount = new BigNumber(data.subtotalAmount);
|
||||
|
||||
data.subtotalAmount = quantityPurchased.times(unitPrice)
|
||||
if (flag == 1) {
|
||||
data.subtotalAmount = quantityPurchased.times(unitPrice)
|
||||
}
|
||||
|
||||
if (flag == 2) {
|
||||
data.subtotalAmount = quantityPurchased.times(unitPrice)
|
||||
}
|
||||
|
||||
if (flag == 3) {
|
||||
data.unitPrice = subtotalAmount.dividedBy(quantityPurchased);
|
||||
|
@ -412,7 +412,13 @@ export default {
|
||||
let returnPrice = new BigNumber( data.returnPrice);
|
||||
let subtotalAmount = new BigNumber(data.subtotalAmount);
|
||||
|
||||
data.subtotalAmount = returnQuantity.times(returnPrice)
|
||||
if (flag == 1) {
|
||||
data.subtotalAmount = returnQuantity.times(returnPrice)
|
||||
}
|
||||
|
||||
if (flag == 2) {
|
||||
data.subtotalAmount = returnQuantity.times(returnPrice)
|
||||
}
|
||||
|
||||
if (flag == 3) {
|
||||
data.returnPrice = subtotalAmount.dividedBy(returnQuantity);
|
||||
|
@ -207,6 +207,7 @@ export default {
|
||||
methods: {
|
||||
// 导出信息
|
||||
exportSale(){
|
||||
this.dateRange = []
|
||||
if (this.beginTime && this.endTime) {
|
||||
this.dateRange.push(this.beginTime.toLocaleDateString())
|
||||
this.dateRange.push(this.endTime.toLocaleDateString())
|
||||
@ -221,6 +222,7 @@ export default {
|
||||
detail(data){
|
||||
this.table = true;
|
||||
this.queryParam.saleId = data.id;
|
||||
this.dateRange = []
|
||||
if (this.beginTime && this.endTime) {
|
||||
this.dateRange.push(this.beginTime.toLocaleDateString())
|
||||
this.dateRange.push(this.endTime.toLocaleDateString())
|
||||
@ -234,6 +236,7 @@ export default {
|
||||
// 获取销售统计列表
|
||||
getList(){
|
||||
this.loading = true;
|
||||
this.dateRange = []
|
||||
if (this.beginTime && this.endTime) {
|
||||
this.dateRange.push(this.beginTime.toLocaleDateString())
|
||||
this.dateRange.push(this.endTime.toLocaleDateString())
|
||||
|
@ -28,17 +28,30 @@
|
||||
/>
|
||||
</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="-"
|
||||
clearable
|
||||
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="-"-->
|
||||
<!-- clearable-->
|
||||
<!-- start-placeholder="开始日期"-->
|
||||
<!-- end-placeholder="结束日期"-->
|
||||
<!-- ></el-date-picker>-->
|
||||
<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>
|
||||
@ -166,6 +179,8 @@ export default {
|
||||
},
|
||||
loading: false,
|
||||
dateRange: [],
|
||||
beginTime:new Date(),
|
||||
endTime:new Date(),
|
||||
defaultSort: {prop: 'createTime', order: 'descending'},
|
||||
|
||||
total: 0,
|
||||
@ -187,6 +202,11 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
async getList(){
|
||||
this.dateRange = []
|
||||
if (this.beginTime && this.endTime) {
|
||||
this.dateRange.push(this.beginTime.toLocaleDateString())
|
||||
this.dateRange.push(this.endTime.toLocaleDateString())
|
||||
}
|
||||
await getOrderApi(this.addDateRange(this.queryParams, this.dateRange)).then(res=>{
|
||||
this.dataList = res.data.records
|
||||
this.total = res.data.total
|
||||
@ -197,6 +217,11 @@ export default {
|
||||
this.$forceUpdate()
|
||||
},
|
||||
getStatistics() {
|
||||
this.dateRange = []
|
||||
if (this.beginTime && this.endTime) {
|
||||
this.dateRange.push(this.beginTime.toLocaleDateString())
|
||||
this.dateRange.push(this.endTime.toLocaleDateString())
|
||||
}
|
||||
getStatisticsApi(this.addDateRange(this.queryParams, this.dateRange)).then(res=>{
|
||||
this.statisticsForm = res.data
|
||||
})
|
||||
@ -218,6 +243,8 @@ export default {
|
||||
pageSize:10
|
||||
},
|
||||
this.dateRange = []
|
||||
this.beginTime = ""
|
||||
this.endTime = ""
|
||||
this.getList()
|
||||
this.getStatistics();
|
||||
|
||||
|
@ -34,17 +34,30 @@
|
||||
</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="-"
|
||||
clearable
|
||||
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="-"-->
|
||||
<!-- clearable-->
|
||||
<!-- start-placeholder="开始日期"-->
|
||||
<!-- end-placeholder="结束日期"-->
|
||||
<!-- ></el-date-picker>-->
|
||||
<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>
|
||||
@ -214,6 +227,8 @@ export default {
|
||||
openOutcome: false, // 订单详情
|
||||
// 日期范围
|
||||
dateRange: [],
|
||||
beginTime:"",
|
||||
endTime:"",
|
||||
defaultSort: {prop: 'createTime', order: 'descending'},
|
||||
|
||||
statisticsForm: {
|
||||
@ -240,6 +255,11 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
async getList(){
|
||||
this.dateRange = []
|
||||
if (this.beginTime && this.endTime) {
|
||||
this.dateRange.push(this.beginTime.toLocaleDateString())
|
||||
this.dateRange.push(this.endTime.toLocaleDateString())
|
||||
}
|
||||
await getOrderApi(this.addDateRange(this.queryParams, this.dateRange)).then(res=>{
|
||||
this.dataList = res.data.records
|
||||
this.total = res.data.total
|
||||
@ -282,6 +302,8 @@ export default {
|
||||
pageSize:10
|
||||
},
|
||||
this.dateRange = []
|
||||
this.beginTime = ""
|
||||
this.endTime = ""
|
||||
this.getList()
|
||||
|
||||
},
|
||||
|
@ -340,31 +340,31 @@
|
||||
<el-form-item label="订单号">
|
||||
<el-input v-model="queryParams2.orderNo" placeholder="请输入订单号"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="创建时间">
|
||||
<!-- <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>-->
|
||||
<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>
|
||||
<!-- 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>
|
||||
<el-button icon="el-icon-refresh" @click="resetQuery1">重置</el-button>
|
||||
@ -526,6 +526,7 @@ export default {
|
||||
methods:{
|
||||
getStaffCommissionList(){
|
||||
this.loading = true
|
||||
this.dateRange = []
|
||||
if (this.beginTime && this.endTime) {
|
||||
this.dateRange.push(this.beginTime.toLocaleDateString())
|
||||
this.dateRange.push(this.endTime.toLocaleDateString())
|
||||
@ -618,6 +619,7 @@ export default {
|
||||
// 查询员工提成记录信息
|
||||
getCommissionList(){
|
||||
this.loading = true;
|
||||
this.dateRange = []
|
||||
if (this.beginTime && this.endTime) {
|
||||
this.dateRange.push(this.beginTime.toLocaleDateString())
|
||||
this.dateRange.push(this.endTime.toLocaleDateString())
|
||||
|
@ -439,6 +439,11 @@ public class FyPayServiceImpl implements FyPayService {
|
||||
try {
|
||||
// 查询商户配置信息
|
||||
MerchantConfig merchantConfig = merchantConfigService.selectMeChByIdIsUse(receiveParameter.getStoreId());
|
||||
if (ObjectUtil.isEmpty(merchantConfig)){
|
||||
res.put("code","error");
|
||||
res.put("msg","暂未配置商户信息");
|
||||
return res;
|
||||
}
|
||||
// MerchantConfig merchantConfig = merchantConfigService.selectMeChByIdIsUse(16);
|
||||
// 查询用户信息
|
||||
LJUserVo userVo = userService.selectUserById(receiveParameter.getUserId(), receiveParameter.getStoreId());
|
||||
|
@ -28,6 +28,7 @@ import com.fuint.business.marketingActivity.activeFullminus.vo.ActiveFullminusVO
|
||||
import com.fuint.business.marketingActivity.cardFavorable.service.CardFavorableRecordService;
|
||||
import com.fuint.business.marketingActivity.cardFavorable.service.CardFavorableService;
|
||||
import com.fuint.business.marketingActivity.cardFavorable.vo.CardFavorableVO;
|
||||
import com.fuint.business.marketingActivity.cardFule.entity.CardFuelChange;
|
||||
import com.fuint.business.marketingActivity.cardFule.entity.CardFuelRecord;
|
||||
import com.fuint.business.marketingActivity.cardFule.mapper.CardFuelRecordMapper;
|
||||
import com.fuint.business.marketingActivity.cardValue.entity.CardValueRecord;
|
||||
@ -335,7 +336,8 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
|
||||
// 根据店铺id查询商户配置信息
|
||||
MerchantConfig merchantConfig = merchantConfigService.selectMeChByIdIsUse(storeId);
|
||||
|
||||
if (ObjectUtil.isEmpty(merchantConfig)){
|
||||
if (ObjectUtil.isEmpty(merchantConfig) && !payType.equals("CASH") && !payType.equals("credit") &&
|
||||
!map.get("allAmount").equals("0")){
|
||||
orders.put("error","请先配置支付通道");
|
||||
return orders;
|
||||
}
|
||||
@ -493,7 +495,7 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
|
||||
cashierOrder.setAfterDiscountAmount(oilAmount+goodsAmount-oilDiscount-goodsDiscount);
|
||||
|
||||
// 如果金额不等于0调用第三方支付接口
|
||||
if (!map.get("allAmount").equals("0") && !map.get("payType").equals("CASH") || !payType.equals("credit")){
|
||||
if (!map.get("allAmount").equals("0") && !map.get("payType").equals("CASH") && !payType.equals("credit")){
|
||||
Integer allAmount = (int) (Double.valueOf(map.get("allAmount"))*100);
|
||||
// 判断是否开启支付规则
|
||||
List<MerchantConfig> list = merchantConfigService.selectMeChByIsOpen(storeId);
|
||||
@ -1392,31 +1394,44 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
|
||||
LJStore store = storeService.selectStoreByStoreId(storeId);
|
||||
UserBalance balance = userBalanceService.selectUserBalance(userid,store.getChainStoreId());
|
||||
int growth = balance.getGrowthValue();
|
||||
if (refuelMoney==null){
|
||||
// if (refuelMoney==null){
|
||||
// String refuelMoney1 = balance.getRefuelMoney();
|
||||
// if (ObjectUtil.isNotEmpty(refuelMoney1) && ObjectUtil.isNotEmpty(refuelMoney)){
|
||||
// JSONArray objects = JSONArray.parseArray(refuelMoney);
|
||||
// JSONArray objects1 = JSONArray.parseArray(refuelMoney1);
|
||||
// List<RefuelMoney> list = new ArrayList<>();
|
||||
// for (int i = 0;i<objects.size();i++){
|
||||
// if (((JSONObject)objects.get(i)).get("oilType").toString().equals(oilId)){
|
||||
// RefuelMoney refuelMoney2 = new RefuelMoney();
|
||||
// refuelMoney2.setType(((JSONObject) objects.get(i)).get("type").toString());
|
||||
// refuelMoney2.setOilType(((JSONObject) objects.get(i)).get("oilType").toString());
|
||||
// refuelMoney2.setRefuelMoney(((JSONObject) objects.get(i)).get("refuelMoney").toString());
|
||||
// list.add(refuelMoney2);
|
||||
// Double oilBalance = 0.0;
|
||||
// Double afterOilBalance = 0.0;
|
||||
// if (!refuelMoney1.equals(refuelMoney)){
|
||||
// oilBalance = Double.valueOf(((JSONObject) objects1.get(i)).get("refuelMoney").toString()) - Double.valueOf(((JSONObject) objects.get(i)).get("refuelMoney").toString());
|
||||
// afterOilBalance = Double.valueOf(((JSONObject) objects.get(i)).get("refuelMoney").toString());
|
||||
// this.insertOilBalance(userid,storeId,oilName.getId().toString(),oilName.getOilType(),oilBalance,afterOilBalance,orderNo);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// balance.setRefuelMoney(JSONObject.toJSONString(list));
|
||||
// }
|
||||
// }else {
|
||||
// balance.setRefuelMoney(refuelMoney);
|
||||
// }
|
||||
if (ObjectUtil.isNotEmpty(refuelMoney)){
|
||||
String refuelMoney1 = balance.getRefuelMoney();
|
||||
if (StringUtils.isNotEmpty(refuelMoney1) && !"null".equals(refuelMoney1) && StringUtils.isNotEmpty(refuelMoney)){
|
||||
JSONArray objects = JSONArray.parseArray(refuelMoney);
|
||||
JSONArray objects1 = JSONArray.parseArray(refuelMoney1);
|
||||
List<RefuelMoney> list = new ArrayList<>();
|
||||
for (int i = 0;i<objects.size();i++){
|
||||
if (((JSONObject)objects.get(i)).get("oilType").toString().equals(oilId)){
|
||||
RefuelMoney refuelMoney2 = new RefuelMoney();
|
||||
refuelMoney2.setType(((JSONObject) objects.get(i)).get("type").toString());
|
||||
refuelMoney2.setOilType(((JSONObject) objects.get(i)).get("oilType").toString());
|
||||
refuelMoney2.setRefuelMoney(((JSONObject) objects.get(i)).get("refuelMoney").toString());
|
||||
list.add(refuelMoney2);
|
||||
Double oilBalance = 0.0;
|
||||
Double afterOilBalance = 0.0;
|
||||
if (!refuelMoney1.equals(refuelMoney)){
|
||||
oilBalance = Double.valueOf(((JSONObject) objects1.get(i)).get("refuelMoney").toString()) - Double.valueOf(((JSONObject) objects.get(i)).get("refuelMoney").toString());
|
||||
afterOilBalance = Double.valueOf(((JSONObject) objects.get(i)).get("refuelMoney").toString());
|
||||
this.insertOilBalance(userid,storeId,oilName.getId().toString(),oilName.getOilType(),oilBalance,afterOilBalance,orderNo);
|
||||
}
|
||||
}
|
||||
JSONArray objects = JSONArray.parseArray(refuelMoney);
|
||||
JSONArray objects1 = JSONArray.parseArray(refuelMoney1);
|
||||
for (int i = 0;i<objects1.size();i++){
|
||||
if (!((JSONObject)objects1.get(i)).get("refuelMoney").toString().equals(((JSONObject)objects.get(i)).get("refuelMoney").toString())){
|
||||
Double oilBalance = Double.valueOf(((JSONObject) objects1.get(i)).get("refuelMoney").toString()) - Double.valueOf(((JSONObject) objects.get(i)).get("refuelMoney").toString());
|
||||
Double afterOilBalance = Double.valueOf(((JSONObject) objects.get(i)).get("refuelMoney").toString());
|
||||
this.insertOilBalance(userid,storeId,oilName.getId().toString(),oilName.getOilType(),oilBalance,afterOilBalance,orderNo);
|
||||
}
|
||||
balance.setRefuelMoney(JSONObject.toJSONString(list));
|
||||
}
|
||||
}else {
|
||||
balance.setRefuelMoney(refuelMoney);
|
||||
}
|
||||
// 查询会员等级列表信息
|
||||
|
@ -91,8 +91,8 @@ public class ChainStoreInfoServiceImpl extends ServiceImpl<ChainStoreInfoMapper,
|
||||
public boolean theJudgmentIsTheSame(Integer chainStoreId) {
|
||||
if (ObjectUtil.isEmpty(chainStoreId)) return false;
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
if (ObjectUtil.isEmpty(nowAccountInfo)) return true;
|
||||
if (ObjectUtil.isEmpty(nowAccountInfo.getChainStoreId())) return true;
|
||||
if (ObjectUtil.isEmpty(nowAccountInfo)) return false;
|
||||
if (ObjectUtil.isEmpty(nowAccountInfo.getChainStoreId())) return false;
|
||||
|
||||
System.out.println("nowAccount"+nowAccountInfo.toString());
|
||||
if (nowAccountInfo.getChainStoreId().equals(chainStoreId)) {
|
||||
|
@ -30,17 +30,30 @@
|
||||
</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="-"-->
|
||||
<!-- clearable-->
|
||||
<!-- 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="-"
|
||||
clearable
|
||||
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>
|
||||
@ -133,6 +146,8 @@ export default {
|
||||
},
|
||||
loading: false,
|
||||
dateRange: [new Date(),new Date()],
|
||||
beginTime:new Date(),
|
||||
endTime:new Date(),
|
||||
defaultSort: {prop: 'createTime', order: 'descending'},
|
||||
|
||||
total: 0,
|
||||
@ -153,6 +168,11 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
getList(){
|
||||
this.dateRange = []
|
||||
if (this.beginTime && this.endTime) {
|
||||
this.dateRange.push(this.beginTime.toLocaleDateString())
|
||||
this.dateRange.push(this.endTime.toLocaleDateString())
|
||||
}
|
||||
getHandoverListApi(this.addDateRange(this.queryParams, this.dateRange)).then(res=>{
|
||||
this.dataList = res.data.records
|
||||
this.total = res.data.total
|
||||
@ -201,6 +221,8 @@ export default {
|
||||
pageSize:10
|
||||
},
|
||||
this.dateRange = []
|
||||
this.beginTime = ""
|
||||
this.endTime = ""
|
||||
this.getList();
|
||||
},
|
||||
printLocally(data) {
|
||||
|
@ -247,7 +247,7 @@
|
||||
@click="refuel(item)">
|
||||
<div>{{ getName(oilNameList,getOilNames(oilNumberList,item.numberId)) }}</div>
|
||||
<!-- <div>{{ getOilNames(oilNumberList,item.numberId) }}</div>-->
|
||||
<!-- <div>{{ item.oilNumber }}</div>-->
|
||||
<!-- <div>{{ item.oilNumber }</div>-->
|
||||
|
||||
<div class="of-title" >{{item.gunName}}</div>
|
||||
<div style="display: flex;justify-content: space-between">
|
||||
@ -2873,12 +2873,12 @@
|
||||
this.oilPreferentialData = []
|
||||
},
|
||||
// 根据会员等级信息获取等级优惠信息
|
||||
getGrade(userId,gradeId){
|
||||
async getGrade(userId,gradeId){
|
||||
this.isFixingLevel = false
|
||||
let _this = this;
|
||||
this.oilDiscount = 0;
|
||||
this.gradeDiscount = [];
|
||||
userGradeInfo({userId:userId,gradeId:gradeId,storeId:""}).then(response => {
|
||||
await userGradeInfo({userId:userId,gradeId:gradeId,storeId:""}).then(response => {
|
||||
let gasolineDiscount = 0;
|
||||
let dieselDiscount = 0;
|
||||
let naturalGasDiscount = 0;
|
||||
@ -3086,22 +3086,12 @@
|
||||
this.map.payUser = data.mobile;
|
||||
this.map.userId = data.id;
|
||||
this.balance = this.member.cardBalance;
|
||||
await this.getGrade(this.member.id,this.member.gradeId)
|
||||
if (data.refuelMoney){
|
||||
// 使用囤油卡
|
||||
this.refuelMoney = JSON.parse(data.refuelMoney)
|
||||
await this.changeRefuelMoney();
|
||||
}
|
||||
// await this.getGrade(data.id,data.gradeId)
|
||||
// if (!this.isFixingLevel){
|
||||
// this.preferentialData.storeId = this.storeId;
|
||||
// this.preferentialData.userId = data.id;
|
||||
// this.preferentialData.gradeId = data.gradeId;
|
||||
// if (this.oilOrder.length>0){
|
||||
// this.preferential();
|
||||
// this.getCoupon();
|
||||
// }
|
||||
// }
|
||||
await this.getGrade(this.member.id,this.member.gradeId)
|
||||
if (this.balance>0 && this.oilAmount>0 && !this.isOilStorageCard){
|
||||
this.checkAll4 = true
|
||||
if (this.goodsOrder.length==0){
|
||||
@ -3302,15 +3292,16 @@
|
||||
this.checkAll4 = true
|
||||
if (this.balance!=0 && this.balance >= this.hoardAmount){
|
||||
this.oilActualPay = 0
|
||||
this.consumeAmount = this.hoardAmount
|
||||
this.consumeAmount = 0
|
||||
}else {
|
||||
this.oilActualPay = (this.hoardAmount -this.balance).toFixed(2)
|
||||
this.oilActualPay = (this.hoardAmount - this.balance).toFixed(2)
|
||||
this.consumeAmount = this.balance
|
||||
}
|
||||
}else {
|
||||
this.oilActualPay = 0
|
||||
this.consumeAmount = 0
|
||||
}
|
||||
console.log("使用囤油卡",this.hoardAmount)
|
||||
},
|
||||
// 不使用囤油卡
|
||||
countAmountFull(){
|
||||
@ -3649,13 +3640,8 @@
|
||||
this.oilTotal = this.oilOrder.length;
|
||||
this.select = "元";
|
||||
if (this.isMember){
|
||||
// this.getGrade(this.member.id,this.member.gradeId)
|
||||
// this.changeRefuelMoney();
|
||||
// if (this.oilOrder.length>0){
|
||||
// this.preferential();
|
||||
// this.getCoupon();
|
||||
// }
|
||||
|
||||
await this.getGrade(this.member.id,this.member.gradeId)
|
||||
if (this.refuelMoney){
|
||||
// 使用囤油卡
|
||||
await this.changeRefuelMoney();
|
||||
@ -3667,7 +3653,6 @@
|
||||
}
|
||||
this.countAmountFull()
|
||||
}
|
||||
await this.getGrade(this.member.id,this.member.gradeId)
|
||||
if (!this.isFixingLevel && !this.isOilStorageCard){
|
||||
await this.getOilCoupon()
|
||||
}
|
||||
@ -3686,10 +3671,10 @@
|
||||
_this.hoardAmount = 0;
|
||||
_this.oilAmount = 0;
|
||||
_this.refuelMoney1 = []
|
||||
let hoardAmount1 = 0;
|
||||
_this.oilOrder.forEach(item => {
|
||||
let conRefMon = 0;
|
||||
let hoardAmount = 0;
|
||||
let hoardAmount1 = 0;
|
||||
let amount = 0;
|
||||
let amount1 = 0;
|
||||
let id = ""
|
||||
@ -3714,9 +3699,10 @@
|
||||
}
|
||||
}
|
||||
_this.consumeRefuelMoney += +conRefMon
|
||||
console.log(hoardAmount,1254)
|
||||
hoardAmount1 += +hoardAmount
|
||||
amount1 += +amount
|
||||
_this.hoardAmount = hoardAmount1 + amount1
|
||||
_this.hoardAmount = hoardAmount1
|
||||
_this.oilAmount += +item.amount
|
||||
// _this.changeBalance(_this.hoardAmount,id)
|
||||
// if (_this.consumeRefuelMoney!=0){
|
||||
@ -3724,8 +3710,8 @@
|
||||
// _this.checkAll3 = true;
|
||||
// _this.consumeAmount = 0;
|
||||
// }
|
||||
_this.isDefaultUseCard();
|
||||
})
|
||||
_this.isDefaultUseCard();
|
||||
},
|
||||
changeBalance(hoardAmount,id){
|
||||
if (this.balance>0 && id != ""){
|
||||
|
@ -547,17 +547,17 @@
|
||||
// if (!this.AppToken) {
|
||||
// return;
|
||||
// }
|
||||
// await request({
|
||||
// url: 'chainStoreInfo/theJudgmentIsTheSame',
|
||||
// method: 'get',
|
||||
// data: {
|
||||
// "chainStoreId": uni.getStorageSync("chainStoreId")
|
||||
// }
|
||||
// }).then(res => {
|
||||
// if (!res.data) {
|
||||
// uni.removeStorageSync("App-Token");
|
||||
// }
|
||||
// })
|
||||
await request({
|
||||
url: 'chainStoreInfo/theJudgmentIsTheSame',
|
||||
method: 'get',
|
||||
data: {
|
||||
"chainStoreId": uni.getStorageSync("chainStoreId")
|
||||
}
|
||||
}).then(res => {
|
||||
if (!res.data) {
|
||||
uni.removeStorageSync("App-Token");
|
||||
}
|
||||
})
|
||||
|
||||
if (uni.getStorageSync("appltType")== "WECHAT") {
|
||||
// 判断当前登录的code是否相同
|
||||
|
@ -55,14 +55,14 @@
|
||||
},
|
||||
// 获取支付宝userid
|
||||
getUserLogin(e) {
|
||||
// if (this.qindex == false) {
|
||||
// uni.showToast({
|
||||
// icon: "none",
|
||||
// title: "请阅读并勾选用户协议",
|
||||
// duration: 2000
|
||||
// })
|
||||
// return;
|
||||
// }
|
||||
if (this.qindex == false) {
|
||||
uni.showToast({
|
||||
icon: "none",
|
||||
title: "请先阅读并勾选用户协议",
|
||||
duration: 2000
|
||||
})
|
||||
return;
|
||||
}
|
||||
console.log(e)
|
||||
|
||||
let _this = this;
|
||||
@ -124,14 +124,14 @@
|
||||
wxlogin() {},
|
||||
getPhone(e) {
|
||||
let that = this
|
||||
// if (this.privacyPolicyChecked == false) {
|
||||
// uni.showToast({
|
||||
// icon: "none",
|
||||
// title: "请阅读并勾选用户协议",
|
||||
// duration: 2000
|
||||
// })
|
||||
// return;
|
||||
// }
|
||||
if (this.privacyPolicyChecked == false) {
|
||||
uni.showToast({
|
||||
icon: "none",
|
||||
title: "请先阅读并勾选用户协议",
|
||||
duration: 2000
|
||||
})
|
||||
return;
|
||||
}
|
||||
console.log(e)
|
||||
uni.login({
|
||||
provider: 'weixin',
|
||||
|
@ -345,6 +345,19 @@
|
||||
// _this.goBack()
|
||||
return;
|
||||
}
|
||||
if(res.data.code=="error"){
|
||||
request({
|
||||
url: "/business/allOrderInfo/orderStatus",
|
||||
method: 'post',
|
||||
data: {"orderNo":_this.orderNo,"status":"payFail"},
|
||||
}).then((ress)=>{})
|
||||
uni.showToast({
|
||||
title:res.data.msg,
|
||||
icon:"none"
|
||||
})
|
||||
// _this.goBack()
|
||||
return;
|
||||
}
|
||||
if(res.data.success == "ok"){
|
||||
// _this.preferentialData.storeId = _this.oilOrder.storeId
|
||||
// _this.preferentialData.orderAmount = _this.oilOrder.orderAmount
|
||||
|
Loading…
Reference in New Issue
Block a user