diff --git a/fuintAdmin/src/api/staff/user/cardvaluechild.js b/fuintAdmin/src/api/staff/user/cardvaluechild.js
new file mode 100644
index 000000000..4fce8f88c
--- /dev/null
+++ b/fuintAdmin/src/api/staff/user/cardvaluechild.js
@@ -0,0 +1,45 @@
+import request from '@/utils/request'
+
+// 查询子卡信息列表
+export function listCardValueChild(id) {
+ return request({
+ url: 'cardValudChildrens/listPC/'+id,
+ method: 'get',
+ })
+}
+
+// 根据id查询子卡信息
+export function cardValueChildInfo(id) {
+ return request({
+ url: 'cardValudChildrens/'+id,
+ method: 'get',
+ })
+}
+
+// 添加子卡信息
+export function addCardValueChild(data) {
+ return request({
+ url: 'cardValudChildrens',
+ method: 'post',
+ data: data,
+ })
+}
+
+
+// 修改子卡信息
+export function editCardValueChild(data) {
+ return request({
+ url: 'cardValudChildrens/edit',
+ method: 'put',
+ data: data,
+ })
+}
+
+// 查询子卡订单信息
+export function listCardValueChildOrder(query) {
+ return request({
+ url: 'business/order/cardValueChildOrder/list',
+ method: 'get',
+ params:query,
+ })
+}
diff --git a/fuintAdmin/src/views/indexcomponents/topindex.vue b/fuintAdmin/src/views/indexcomponents/topindex.vue
index 3df985c28..6917c1eed 100644
--- a/fuintAdmin/src/views/indexcomponents/topindex.vue
+++ b/fuintAdmin/src/views/indexcomponents/topindex.vue
@@ -15,7 +15,7 @@
-->
- {{ this.statisticsData.today_sum ? this.statisticsData.today_sum : 0 }}
+ {{ this.statisticsData.today_sum ? parseFloat(this.statisticsData.today_sum).toFixed(2) : 0 }}
@@ -41,7 +41,7 @@
本周流水总额
- {{ this.statisticsData.this_week_sum?this.statisticsData.this_week_sum:0 }}
+ {{ this.statisticsData.this_week_sum?parseFloat(this.statisticsData.this_week_sum).toFixed(2):0 }}
@@ -70,7 +70,7 @@
本月流水总额
- {{this.statisticsData.this_month_sum?this.statisticsData.this_month_sum:0}}
+ {{this.statisticsData.this_month_sum?parseFloat(this.statisticsData.this_month_sum).toFixed(2):0}}
diff --git a/fuintAdmin/src/views/member/index.vue b/fuintAdmin/src/views/member/index.vue
index e4017afff..1a1568ee6 100644
--- a/fuintAdmin/src/views/member/index.vue
+++ b/fuintAdmin/src/views/member/index.vue
@@ -551,7 +551,7 @@ export default {
rules: {
name: [
{ required: true, message: "会员名称不能为空", trigger: "blur" },
- { min: 2, max: 200, message: '会员名称长度必须介于2 和 100 之间', trigger: 'blur' }
+ // { min: 2, max: 200, message: '会员名称长度必须介于2 和 100 之间', trigger: 'blur' }
],
gradeId: [{ required: true, message: "请选择会员等级", trigger: "blur" }],
status: [{ required: true, message: "请选择会员状态", trigger: "blur" }],
diff --git a/fuintAdmin/src/views/member/userInfo.vue b/fuintAdmin/src/views/member/userInfo.vue
index f69f40fd0..44a183462 100644
--- a/fuintAdmin/src/views/member/userInfo.vue
+++ b/fuintAdmin/src/views/member/userInfo.vue
@@ -173,8 +173,9 @@
@click="rechargeCard(cardValueList.length,-1)">
自定义
元
@@ -276,7 +277,8 @@
油品类型
{{ item.type }}
+ @click.native="tabOilTypeClick(item.oilType)">
+ {{ item.type }}
@@ -343,8 +345,9 @@
支付方式
- {{ dict.label }}
+ {{ dict.dictLabel }}
@@ -436,7 +439,7 @@
-
+
手机号更换后,旧手机号将无法使用,更换后实时生效
@@ -536,97 +539,131 @@
-
-
+
+
+
-
会员信息:{{ form.mobile }}
-
新增子卡
+
会员信息:{{form.mobile}}
+
新增子卡
-
-
-
-
-
-
+
+
+
+
+
+ {{ parseTime(scope.row.createTime) }}
+
-
-
-
-
+
+
+ 修改
+ 交易记录
+
-
-
-
+
+
+
+
+
+
+ style="margin-top: 20px"
+ :closable="false"
+ description="子卡为会员子母卡功能,子卡共享母卡的储值额度及信息,子卡为实体会员卡信息,消费需在小程序中才可进行使用">
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 新增子卡
-
-
-
+
+
+
+
+
+
+
+
+
+
+ 搜索
+
-
-
-
-
-
-
+
+
+
+
+
+ {{ props.row.remark }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ scope.row.payTime ? parseTime(scope.row.payTime) :"--" }}
+
-
@@ -687,6 +724,43 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -715,7 +789,14 @@ import pointsRecord from "@/views/member/userInfoOrder/pointsRecord.vue";
import couponList from "@/views/member/userInfoOrder/couponList.vue";
import growthValueRecord from "@/views/member/userInfoOrder/growthValueRecord.vue";
import refuelMoneyRecord from "@/views/member/userInfoOrder/refuelMoneyRecord.vue";
+import cardValueChild from "@/views/member/userInfoOrder/cardValueChild.vue";
import {allFixingLevel, getFixingLevel} from "@/api/staff/user/fixinglevel";
+import {
+ addCardValueChild,
+ cardValueChildInfo,
+ editCardValueChild,
+ listCardValueChild, listCardValueChildOrder
+} from "@/api/staff/user/cardvaluechild";
export default {
components: {
@@ -727,15 +808,18 @@ export default {
couponList,
growthValueRecord,
refuelMoneyRecord,
+ cardValueChild,
},
computed: {
item() {
return item
}
},
- dicts: ['official', 'zhzt', 'zcrzdj', 'payment_type'],
+ dicts: ['official', 'zhzt', 'zcrzdj', 'payment_type','pay_status'],
data() {
return {
+ orderList:[],
+ openSubCard1:false,
baseUrl: process.env.VUE_APP_BASE_API,
flag: null,
fixingLevelList: [],
@@ -831,11 +915,13 @@ export default {
tabOilType: '92',
// 关于副卡信息
aboutSecondCard: [],
+ cardValueChildList:[],
// 遮罩层
loading: false,
id: '',
// 会员信息
form: {},
+ form1: {},
// 店铺信息
store: '',
// 会员等级信息
@@ -853,7 +939,13 @@ export default {
name: '',
status: '',
},
- subCardList: [],
+ subCardList:{
+ page:1,
+ pageSize:10,
+ cardChildPhones:'',
+ userId:'',
+ status:''
+ },
list: [],
// 表单校验
rules: {
@@ -861,6 +953,8 @@ export default {
name: [{required: true, message: "请输入会员昵称,内容不可为空", trigger: "blur"}],
type: [{required: true, message: "请选择操作类型", trigger: "blur"}],
fixingLevel: [{required: true, message: "请选择认证信息", trigger: "blur"}],
+ userId:[{ required: true, message: '请选择主卡信息', trigger: 'change' }],
+ cardChildPhones:[{required: true, message: "请输入子卡手机号", trigger: "blur"}],
}
}
},
@@ -875,8 +969,73 @@ export default {
this.getInformation();
this.getFixingLevelList();
this.getStore();
+ this.getCardList()
+ this.getOrderList()
},
methods: {
+ handleQuery(){
+ this.subCardList.page = 1;
+ this.getOrderList()
+ },
+ handleOrder(data){
+ this.subCardList.cardChildPhones = data.cardChildPhones
+ this.subCardActive = "consumption"
+ this.subCardList.page = 1;
+ this.getOrderList()
+ },
+ // 查询子卡的交易信息
+ getOrderList(){
+ this.subCardList.userId = this.id
+ listCardValueChildOrder(this.subCardList).then(res => {
+ this.orderList = res.data.records
+ this.total = res.data.total
+ })
+ },
+ // 查询当前用户的子卡信息
+ getCardList(){
+ listCardValueChild(this.id).then(res => {
+ this.cardValueChildList = res.data
+ })
+ },
+ handleAdd1(){
+ this.title = "添加子卡信息"
+ this.openSubCard1 = true
+ },
+ handleUpdate1(data){
+ cardValueChildInfo(data.id).then(res => {
+ this.form1 = res.data
+ this.title = "修改子卡信息"
+ this.openSubCard1 = true
+ })
+ },
+ // 添加或修改子卡信息
+ submitSubCard(){
+ this.$refs["form1"].validate(valid => {
+ if (valid) {
+ if (this.form1.id) {
+ editCardValueChild(this.form1).then(res => {
+ if (res.data==1){
+ this.$modal.msgSuccess("修改成功!")
+ this.openSubCard1 = false
+ this.getCardList()
+ }else {
+ this.$modal.msgError("手机号已存在,请重新添加")
+ }
+ })
+ }else {
+ addCardValueChild(this.form1).then(res => {
+ if (res.data.success=="添加成功!"){
+ this.$modal.msgSuccess("添加成功!")
+ this.openSubCard1 = false
+ this.getCardList()
+ }else {
+ this.$modal.msgError(res.data.error)
+ }
+ })
+ }
+ }
+ })
+ },
fixingLevelinfo(list, id) {
let name = "";
list.forEach(item => {
@@ -946,17 +1105,19 @@ export default {
this.cardValueList.sort((a, b) => a.rechargeBalance - b.rechargeBalance);
console.log("this.grade.name",this.grade)
})
+ console.log("this.cardValueList", this.grade)
if (this.cardValueList.length > 0) {
// 过滤
if (this.grade && this.grade.name) {
this.cardValueList = this.cardValueList.filter(item => {
- return item.membershipLevel.includes(this.grade.name);
+ return item.groupOriented === "1" || item.membershipLevel.includes(this.grade.id);
});
- console.log("this.cardValueList", this.cardValueList)
this.rechargeCard(0);
} else {
- this.cardValueList = []
+ this.cardValueList = this.cardValueList.filter(item => {
+ return item.groupOriented === "1";
+ });
}
}
},
@@ -967,7 +1128,7 @@ export default {
console.log("data17.16", this.cardValueForm.amount)
if (!data) {
- this.cardValueForm.amount = 0
+ this.cardValueForm.amount = ''
} else {
this.cardValueForm.amount = data
@@ -1012,6 +1173,7 @@ export default {
const commissionAmount = totalAmount.multipliedBy(percentageCommissions).dividedBy(100).decimalPlaces(2);
this.cardValueForm.amountCommission = commissionAmount
}
+
}
})
}
@@ -1075,7 +1237,7 @@ export default {
},
// 根据油品过滤查询存油卡
async tabOilTypeClick(data) {
- // console.log("aaaaaaaaaaaaaa",data)
+ console.log("aaaaaaaaaaaaaa",data)
await this.getCardFuelDieselList()
this.cardFuelDieselList = this.sourceCardFuelDieselList.filter(item => {
@@ -1087,7 +1249,8 @@ export default {
},
selectOilType(status, oilType) {
this.tabOilType = oilType;
- this.tabOilTypeClick(status);
+ console.log("453",oilType)
+ this.tabOilTypeClick(oilType);
},
// 查询员工
@@ -1109,7 +1272,7 @@ export default {
this.flag = flag
if (flag === 1) {
- if (this.cardValueForm.paymentType == '') {
+ if (this.cardValueForm.paymentType === '') {
this.$message.error('请选择支付方式');
return
}
@@ -1125,7 +1288,7 @@ export default {
this.realyPayBills = this.cardValueForm.rechargeBalance
}
} else if (flag === 2) {
- if (this.cardFuelDieselForm.paymentType == '') {
+ if (this.cardFuelDieselForm.paymentType === '') {
this.$message.error('请选择支付方式');
return
}
@@ -1239,12 +1402,15 @@ export default {
let file = {}
// 拿到金额
file = this.cardFuelDieselList[index]
+ console.log("file",file)
this.cardFuelDieselForm.points = file.points
this.cardFuelDieselForm.rechargeBalance = file.rechargeBalance
this.cardFuelDieselForm.oilType = file.oilType
this.cardFuelDieselForm.type = file.type
this.cardFuelDieselForm.chainStorId = file.chainStorId
this.cardFuelDieselForm.incomeLitres = file.incomeLitres
+ this.cardFuelDieselForm.lockupPrice = file.lockupPrice
+ this.cardFuelDieselForm.cardFuelId = file.id
// this.realyPayBills = file.rechargeBalance
@@ -1254,12 +1420,11 @@ export default {
let userForm = this.form
- if (!this.authCode && this.cardValueForm.paymentType != "CASH") {
- this.$message.error('请先扫码');
- return
- }
-
if (this.flag === 1) {
+ if (!this.authCode && this.cardValueForm.paymentType !== "CASH") {
+ this.$message.error('请先扫码');
+ return
+ }
// 会员id 会员名字会员手机号码
this.cardValueForm.mtUserId = userForm.id
this.cardValueForm.name = userForm.name
@@ -1274,33 +1439,30 @@ export default {
if (response.data != null) {
this.loading = true;
id = response.data.id
- // if (response.data.payStatus == "paid"){
- // this.isPaySuccess = true;
- // }
}
});
let this_ = this
//
let timer = setInterval(async () => {
- getCheckTheStatusOfYourPaymentApi(id).then(response => {
+ await getCheckTheStatusOfYourPaymentApi(id).then(response => {
if (response.data != null) {
- if (response.data.payStatus == "unpaid") {
+ const payStatus = response.data.payStatus
+ if (payStatus === "unpaid") {
this_.isQuery = true;
- }
- if (response.data.payStatus == "paid") {
+ }else if (payStatus === "paid") {
+ // 当支付成功时
this_.isPaySuccess = true;
this_.isQuery = false;
- }
- if (response.data.payStatus == "payFail") {
+ }else if (payStatus === "payFail") {
this_.isPaySuccess = false;
this_.isQuery = false;
}
}
})
- }, 500);
+ }, 1000);
let timer2 = setInterval(function () {
- if (this_.isQuery == false) {
+ if (!this_.isQuery) {
this_.loading = false;
this_.isPay = false;
clearInterval(timer);
@@ -1315,14 +1477,19 @@ export default {
this_.loading = false;
this_.isPay = false;
this.isPaySuccess = false;
-
}, 30000)
+
} else if (this.flag === 2) {
- // console.log("cardFuelDieselForm",this.cardFuelDieselForm)
+ if (!this.authCode && this.cardFuelDieselForm.paymentType !== "CASH") {
+ this.$message.error('请先扫码');
+ return
+ }
+ console.log("cardFuelDieselForm",this.cardFuelDieselForm)
this.cardFuelDieselForm.mtUserId = userForm.id
this.cardFuelDieselForm.name = userForm.name
this.cardFuelDieselForm.mobile = userForm.mobile
this.cardFuelDieselForm.authCode = this.authCode
+ console.log("this.cardFuelDieselForm",this.cardFuelDieselForm)
let id;
@@ -1376,6 +1543,7 @@ export default {
},
+ // 获取支付列表
getPayList() {
// console.log("payment_type1")
getDicts("payment_type").then(response => {
diff --git a/fuintAdmin/src/views/member/userInfoOrder/balanceRecord.vue b/fuintAdmin/src/views/member/userInfoOrder/balanceRecord.vue
index ba920080c..46dfbe173 100644
--- a/fuintAdmin/src/views/member/userInfoOrder/balanceRecord.vue
+++ b/fuintAdmin/src/views/member/userInfoOrder/balanceRecord.vue
@@ -43,14 +43,23 @@
-
-
+
- 减少
- 增加
+ -{{scope.row.type?scope.row.type:' -- '}}
+
+
+
+
+ 减少
+ 增加
+ --
+
+
+
+
+ {{scope.row.balance?scope.row.balance:"--"}}
-
diff --git a/fuintAdmin/src/views/member/userInfoOrder/cardValueChild.vue b/fuintAdmin/src/views/member/userInfoOrder/cardValueChild.vue
new file mode 100644
index 000000000..98c56a070
--- /dev/null
+++ b/fuintAdmin/src/views/member/userInfoOrder/cardValueChild.vue
@@ -0,0 +1,300 @@
+
+
+
+
+
+
会员信息:{{form.mobile}}
+
新增子卡
+
+
+
+
+
+
+
+ {{ parseTime(scope.row.createTime) }}
+
+
+
+
+ 修改
+ 交易记录
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 搜索
+
+
+
+
+
+
+
+
+
+
+ {{ props.row.remark }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ scope.row.payTime ? parseTime(scope.row.payTime) :"--" }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/fuintAdmin/src/views/userGrade/index.vue b/fuintAdmin/src/views/userGrade/index.vue
index 85d06c5a5..4638c45a0 100644
--- a/fuintAdmin/src/views/userGrade/index.vue
+++ b/fuintAdmin/src/views/userGrade/index.vue
@@ -779,9 +779,17 @@ export default {
this.form.naturalGasRule = JSON.stringify(this.naturalGasPreferential)
if (this.form.id) {
updateUserGrade(this.form).then(response => {
- this.$modal.msgSuccess("修改成功");
- this.open = false;
- this.getList();
+ if (response.data==1) {
+ this.$modal.msgSuccess("修改成功");
+ this.open = false;
+ this.getList();
+ }else if (response.data==2) {
+ this.$modal.msgError("修改失败,已存在当前等级的会员等级信息");
+ }else if (response.data==3) {
+ this.$modal.msgError("修改失败,会员等级名称已存在");
+ }else {
+ this.$modal.msgError("修改失败,已存在当前成长值的会员等级");
+ }
});
} else {
queryUserGrade({name:this.form.name}).then( response => {
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFule/entity/CardFuelRecord.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFule/entity/CardFuelRecord.java
index d47450478..d26c1f5b7 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFule/entity/CardFuelRecord.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFule/entity/CardFuelRecord.java
@@ -133,6 +133,8 @@ public class CardFuelRecord extends BaseEntity {
*/
private String oilName;
+ private String status; //订单处理状态(防止二次执行,0是订单未完成,1是订单完成不可重复执行)
+
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFule/mapper/xml/CardFuelChangeMapper.xml b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFule/mapper/xml/CardFuelChangeMapper.xml
index 0d3dc05e8..b7a342751 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFule/mapper/xml/CardFuelChangeMapper.xml
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFule/mapper/xml/CardFuelChangeMapper.xml
@@ -132,6 +132,7 @@
select
ms.name storeName,
cfc.oil_type oilType,
+ cfc.type type,
cfc.change_type changeType,
cfc.balance balance,
cfc.order_no orderNo,
@@ -151,8 +152,8 @@
- insert into card_fuel_change(user_id, chain_store_id, store_id, change_type, from_type, balance, create_time, create_by, update_time, update_by, type, oil_type, unit)
- values (#{userId}, #{chainStoreId}, #{storeId}, #{changeType}, #{fromType}, #{balance}, #{createTime}, #{createBy}, #{updateTime}, #{updateBy}, #{type}, #{oilType}, #{unit})
+ insert into card_fuel_change(user_id, chain_store_id, store_id, change_type, from_type, balance, create_time, create_by, update_time, update_by, type, oil_type, unit,order_no)
+ values (#{userId}, #{chainStoreId}, #{storeId}, #{changeType}, #{fromType}, #{balance}, #{createTime}, #{createBy}, #{updateTime}, #{updateBy}, #{type}, #{oilType}, #{unit},#{orderNo})
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFule/mapper/xml/CardFuelRecordMapper.xml b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFule/mapper/xml/CardFuelRecordMapper.xml
index a443624bd..ae2c4a35f 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFule/mapper/xml/CardFuelRecordMapper.xml
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFule/mapper/xml/CardFuelRecordMapper.xml
@@ -35,7 +35,7 @@
@@ -217,7 +217,7 @@
insert into card_fuel_record(mt_user_id, name, mobile, mt_staff_id, real_name, staff_mobile, card_fuel_id, recharge_balance,lockup_price, income_litres,pay_amount, payment_type, remark, points, growth_value, royalty_type, percentage_commissions, amount_commission, create_by, create_time, update_by, update_time, pay_status, store_id, payment_no, type, oil_type,oil_name,chain_store_id)
- values (#{mtUserId}, #{name}, #{mobile}, #{mtStaffId}, #{realName}, #{staffMobile}, #{cardFuelId}, #{rechargeBalance}, #{lockupPrice}, #{incomeLitres}, #{payAmount}, #{paymentType}, #{remark}, #{points}, #{growthValue}, #{royaltyType}, #{percentageCommissions}, #{amountCommission}, #{createBy}, #{createTime}, #{updateBy}, #{updateTime}, #{payStatus}, #{storeId}, #{paymentNo}, #{type}, #{oilType},#{oilName}, #{chainStoreId})
+ values (#{mtUserId}, #{name}, #{mobile}, #{mtStaffId}, #{realName}, #{staffMobile}, #{cardFuelId}, #{rechargeBalance}, #{lockupPrice}, #{incomeLitres}, #{payAmount}, #{paymentType}, #{remark}, #{points}, #{growthValue}, #{royaltyType}, #{percentageCommissions}, #{amountCommission}, #{createBy}, #{createTime}, #{updateBy}, #{createTime}, #{payStatus}, #{storeId}, #{paymentNo}, #{type}, #{oilType},#{oilName}, #{chainStoreId})
@@ -266,6 +266,7 @@
update card_fuel_record
+ update_time = NOW(),
mt_user_id = #{mtUserId},
@@ -323,9 +324,6 @@
update_by = #{updateBy},
-
- update_time = #{updateTime},
-
pay_status = #{payStatus},
@@ -341,6 +339,10 @@
oil_type = #{oilType},
+
+ status = #{status},
+
+
where id = #{id}
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFule/service/impl/CardFuelChangeServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFule/service/impl/CardFuelChangeServiceImpl.java
index 2cfe3bdbd..77a89a789 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFule/service/impl/CardFuelChangeServiceImpl.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFule/service/impl/CardFuelChangeServiceImpl.java
@@ -1,5 +1,6 @@
package com.fuint.business.marketingActivity.cardFule.service.impl;
+import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fuint.business.marketingActivity.cardFule.entity.CardFuelChange;
@@ -67,8 +68,11 @@ public class CardFuelChangeServiceImpl implements CardFuelChangeService {
*/
@Override
public CardFuelChange insert(CardFuelChange cardFuelChange) {
- AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
- cardFuelChange.setStoreId(nowAccountInfo.getStoreId());
+ if (ObjectUtil.isEmpty(cardFuelChange.getStoreId())) {
+ AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
+ cardFuelChange.setStoreId(nowAccountInfo.getStoreId());
+ }
+
this.cardFuelChangeMapper.insert(cardFuelChange);
return cardFuelChange;
}
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFule/service/impl/CardFuelDieselServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFule/service/impl/CardFuelDieselServiceImpl.java
index b15c43e1d..47437a1f7 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFule/service/impl/CardFuelDieselServiceImpl.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFule/service/impl/CardFuelDieselServiceImpl.java
@@ -65,7 +65,7 @@ public class CardFuelDieselServiceImpl extends ServiceImpl0;
}
+ @Resource
+ ILJStaffService iljStaffService;
@Override
public CardFuelRecordDTO prepaidFuelTopUp(CardFuelRecordDTO cardFuelRecordDTO) {
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
@@ -186,18 +190,29 @@ public class CardFuelRecordServiceImpl implements CardFuelRecordService {
cardFuelRecordDTO.setPaymentNo(orderNo);
cardFuelRecordDTO.setStoreId(nowAccountInfo.getStoreId());
cardFuelRecordDTO.setChainStoreId(nowAccountInfo.getChainStoreId());
+ cardFuelRecordDTO.setPayAmount(cardFuelRecordDTO.getRechargeBalance());
+
+ if (ObjectUtil.isEmpty(cardFuelRecordDTO.getMtStaffId())) {
+ cardFuelRecordDTO.setMtStaffId(nowAccountInfo.getStaffId());
+ }
+
+ LJStaff ljStaff = iljStaffService.selectStaffById(cardFuelRecordDTO.getMtStaffId());
+ if (ObjectUtil.isNotEmpty(ljStaff)) {
+ cardFuelRecordDTO.setStaffMobile(ljStaff.getMobile());
+ cardFuelRecordDTO.setRealName(ljStaff.getRealName());
+ }
cardFuelRecordMapper.insert(cardFuelRecordDTO);
- Double theAmountToBePaid = 0.0;
+ double theAmountToBePaid = 0.0;
boolean flag = false;
- System.out.println("cardFuelRecordDTO.getRechargeBalance():"+cardFuelRecordDTO.getRechargeBalance());
double epsilon = 1e-10; // 阈值
if (!ObjectUtil.isEmpty(cardFuelRecordDTO.getRechargeBalance())
- && cardFuelRecordDTO.getRechargeBalance() > epsilon
+// && cardFuelRecordDTO.getRechargeBalance() > epsilon
+ && cardFuelRecordDTO.getRechargeBalance().compareTo(0.00)>0
&& "unpaid".equals(cardFuelRecordDTO.getPayStatus())){
- theAmountToBePaid = cardFuelRecordDTO.getRechargeBalance();
+ theAmountToBePaid = cardFuelRecordDTO.getRechargeBalance().doubleValue();
flag = true;
}
@@ -206,8 +221,6 @@ public class CardFuelRecordServiceImpl implements CardFuelRecordService {
Integer allAmount = (int) (theAmountToBePaid*100);
System.out.println("allAmount1:"+allAmount);
-// Integer allAmount = (int) (0.01 * 100);
-
MerchantConfig merchantConfig = merchantConfigService.selectMeChByIdIsUse(nowAccountInfo.getStoreId());
// 处理支付需要的数据
Map map = new HashMap<>();
@@ -232,10 +245,22 @@ public class CardFuelRecordServiceImpl implements CardFuelRecordService {
return cardFuelRecordDTO;
}
+ @Autowired
+ private RedisLock redisLock;
+
+ /**
+ * 查询支付状态 修改相关关联表
+ * @param id
+ * @return
+ */
@Override
public CardFuelRecord checkTheStatusOfYourPaymentByFuel(Integer id) {
CardFuelRecord cardFuelRecord = cardFuelRecordMapper.queryById(id);
- if ("paid".equals(cardFuelRecord.getPayStatus())){
+
+ AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
+ String lockKey = "CardFuelRecord"+nowAccountInfo.getStoreId()+id;
+ Boolean isLock = redisLock.tryLock(lockKey, 5000, TimeUnit.MILLISECONDS);
+ if (isLock && "paid".equals(cardFuelRecord.getPayStatus()) && "0".equals(cardFuelRecord.getStatus())){
// 查询用户信息
LJUserVo ljUserVos = ljUserMapper.selectAllInfoById2(cardFuelRecord.getMtUserId(),cardFuelRecord.getChainStoreId());
@@ -255,6 +280,13 @@ public class CardFuelRecordServiceImpl implements CardFuelRecordService {
IntegralDetail integralDetail = changesInPoints(cardFuelRecord,ljUserVos);
integralDetailService.insert2(integralDetail);
}
+
+ CardFuelRecord editCardFuelRecord = new CardFuelRecord();
+ editCardFuelRecord.setId(id);
+ editCardFuelRecord.setStatus("1");
+ cardFuelRecordMapper.update(editCardFuelRecord);
+ redisLock.unlock(lockKey);
+
}else {
return cardFuelRecord;
}
@@ -265,9 +297,9 @@ public class CardFuelRecordServiceImpl implements CardFuelRecordService {
List
- {{ consumeRefuelMoney }}L
-
+
@@ -152,17 +152,6 @@
width="400"
trigger="click">
-
-
-
-
-
-
-
-
-
-
-
@@ -482,7 +471,7 @@
:visible.sync="dialogVisiblej"
width="30%"
:close-on-click-modal="false">
-
应收金额
@@ -639,12 +628,12 @@
title="请选择会员"
:visible.sync="dialogVisibleMember"
:close-on-click-modal="false">
-
+
-
+
@@ -804,6 +793,7 @@
name: "homeindex",
data(){
return{
+ baseUrl:process.env.VUE_APP_BASE_API,
// 满减全选
checkAll1: false,
isIndeterminate1: true,
@@ -822,7 +812,7 @@
checkedCities3: [],
cities3: cityOptions,
// 储值卡全选
- checkAll4: true,
+ checkAll4: false,
isIndeterminate4: true,
checkedCities4: [],
cities4: cityOptions,
@@ -852,6 +842,7 @@
loading:false,
// 油号
oilType:'',
+ oilNameID:'',
// 油品类型
type:"",
// 取单列表
@@ -898,6 +889,7 @@
// 会员列表信息
memberList:[],
select1:'会员手机号',
+ storeId:"",
// 查询会员信息参数
userNo:"",
// 查询的商品信息
@@ -1020,7 +1012,7 @@
menu:1,
index:0,
// 是否支付
- isPay:true,
+ isPay:false,
isPaySuccess:false,
// 订单号
orderNo:'',
@@ -1032,7 +1024,7 @@
// 油号列表
oilNumberList:[],
// 是否可以点会员确定按钮
- isSure:false,
+ isSure:true,
// 优惠券消费金额
couponAmount:0,
// 是否为满减互斥
@@ -1242,7 +1234,7 @@
}
this.checkedCities1 = val ? list : [];
this.isIndeterminate1 = false;
- this.isExclusion();
+ this.isDefaultUseCard();
},
handleCheckedCitiesChange1(value) {
this.fullReduction = 0;
@@ -1258,7 +1250,7 @@
let checkedCount = value.length;
this.checkAll1 = checkedCount === this.fullReduceDiscount.length;
this.isIndeterminate1 = checkedCount > 0 && checkedCount < this.fullReduceDiscount.length;
- this.isExclusion();
+ this.isDefaultUseCard();
},
handleCheckAllChange2(val) {
let list = []
@@ -1274,7 +1266,7 @@
}
this.checkedCities2 = val ? list : [];
this.isIndeterminate2 = false;
- this.isExclusion();
+ this.isDefaultUseCard();
},
handleCheckedCitiesChange2(value) {
this.oilDiscount = 0
@@ -1290,7 +1282,7 @@
let checkedCount = value.length;
this.checkAll2 = checkedCount === this.gradeDiscount.length;
this.isIndeterminate2 = checkedCount > 0 && checkedCount < this.gradeDiscount.length;
- this.isExclusion();
+ this.isDefaultUseCard();
},
handleCheckAllChange3(val) {
if (val==false){
@@ -1301,7 +1293,7 @@
this.isOilStorageCard = true;
this.changeRefuelMoney()
}
- this.isExclusion();
+ this.isDefaultUseCard();
},
handleCheckedCitiesChange3(value) {
let checkedCount = value.length;
@@ -1315,7 +1307,7 @@
}else {
this.isUseBalance = false;
}
- this.isExclusion();
+ this.isDefaultUseCard();
},
handleCheckedCitiesChange4(value) {
let checkedCount = value.length;
@@ -1359,7 +1351,7 @@
this.couponAmount = 0
this.checkedCities5 = ""
}
- this.isExclusion();
+ this.isDefaultUseCard();
},
handleCheckedCitiesChange5(value) {
this.couponAmount = 0;
@@ -1375,7 +1367,7 @@
}
})
this.checkAll5 = true;
- this.isExclusion();
+ this.isDefaultUseCard();
},
// 模糊查询商品信息
querySearch(queryString, cb) {
@@ -1908,7 +1900,7 @@
}
_this.oilDiscount = gasolineDiscount + dieselDiscount + naturalGasDiscount
_this.checkAll2 = true;
- _this.isExclusion();
+ _this.isDefaultUseCard();
})
},
// 选择会员
@@ -1918,10 +1910,14 @@
this.map.payUser = data.mobile;
this.map.userId = data.id;
this.balance = this.member.cardBalance;
+ if (data.refuelMoney){
+ // 使用囤油卡
+ this.refuelMoney = JSON.parse(data.refuelMoney)
+ this.changeRefuelMoney();
+ }else
this.getGrade(data.id,data.gradeId)
- this.changeRefuelMoney();
- this.handleChange();
- this.preferentialData.storeId = data.storeId;
+ // this.handleChange();
+ this.preferentialData.storeId = this.storeId;
this.preferentialData.userId = data.id;
this.preferentialData.gradeId = data.gradeId;
if (this.oilOrder.length>0){
@@ -1939,6 +1935,7 @@
_this.couponDiscount =[];
_this.couponIds = [],
selectCoupon(_this.preferentialData).then(response => {
+ // console.log(response)
_this.couponAmount = 0;
_this.couponIds = response.data
if (response.data.length>0){
@@ -2014,23 +2011,25 @@
})
}
_this.checkAll5 = true;
- _this.isExclusion();
+ _this.isDefaultUseCard();
})
})
},
// 使用囤油卡 囤油卡不参与任何优惠
countOilCard(){
- if (this.hoardAmount!=0){
- if (this.balance!=0 && this.balance >= (this.oilAmount - this.hoardAmount)){
+ if (this.hoardAmount>0){
+ if (this.balance!=0 && this.balance >= this.hoardAmount){
this.oilActualPay = 0
this.consumeAmount = this.hoardAmount
}else {
- this.oilActualPay = (this.oilAmount - 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.isOilStorageCard,this.hoardAmount,this.balance,this.oilAmount,this.oilActualPay,this.consumeAmount)
},
// 使用优惠券不使用满减
countAmountFull(){
@@ -2046,6 +2045,7 @@
}else {
this.oilActualPay = (this.oilAmount - this.oilDiscount).toFixed(2)
}
+ console.log("优惠券",this.oilAmount, this.oilDiscount,this.couponAmount)
},
// 使用优惠券和满减不使用储值卡
countAmountUnBalance(){
@@ -2055,6 +2055,7 @@
this.oilActualPay = (this.oilAmount - this.oilDiscount).toFixed(2)
}
this.consumeAmount = 0
+ console.log("优惠券和满减",this.oilAmount , this.fullReduction , this.oilDiscount , this.couponAmount)
},
// 使用储值卡不使用优惠券 || 使用满减不使用优惠券
countAmountBalance(){
@@ -2069,6 +2070,7 @@
}else {
this.oilActualPay = (this.oilAmount - this.oilDiscount).toFixed(2)
}
+ console.log("储值卡满减",this.oilAmount, this.oilDiscount,this.fullReduction)
},
// 判断互斥限制
isExclusion(){
@@ -2113,20 +2115,39 @@
return;
}
// 使用囤油卡
- if (this.isOilStorageCard){
- this.checkAll1 = false;
- this.fullReduction = 0;
- this.checkAll2 = false;
- this.checkedCities2 = [],
- this.oilDiscount = 0;
- this.checkAll5 = false;
- this.couponAmount = 0;
- this.countOilCard();
- return;
- }
+ // if (this.isOilStorageCard){
+ // this.checkAll1 = false;
+ // this.fullReduction = 0;
+ // this.checkAll2 = false;
+ // this.checkedCities2 = [];
+ // this.oilDiscount = 0;
+ // this.checkAll5 = false;
+ // this.couponAmount = 0;
+ // this.countOilCard();
+ // return;
+ // }
this.countAmountBalance();
}
},
+ // 默认使用囤油卡
+ isDefaultUseCard(){
+ if (this.isOilStorageCard){
+ this.checkAll3 = true;
+ this.checkAll1 = false;
+ this.fullReduction = 0;
+ this.checkAll2 = false;
+ this.checkedCities2 = [];
+ this.oilDiscount = 0;
+ this.checkAll5 = false;
+ this.couponAmount = 0;
+ this.countOilCard();
+ if (this.hoardAmount>0 && this.balance > 0){
+ this.checkAll4 = true;
+ }
+ }else {
+ this.isExclusion()
+ }
+ },
// 调用优惠参数接口
preferential(){
let _this = this;
@@ -2184,17 +2205,17 @@
_this.checkedCities1 = []
_this.fullReduction = 0
}
- _this.isExclusion();
+ _this.isDefaultUseCard();
})
})
},
// 选择会员信息
handleChoose(data) {
- this.isSure = true;
+ this.isSure = false;
this.member = data;
- if (data.refuelMoney != null && data.refuelMoney != ""){
- this.refuelMoney = JSON.parse(data.refuelMoney)
- }
+ // if (data.refuelMoney != null && data.refuelMoney != ""){
+ // this.refuelMoney = JSON.parse(data.refuelMoney)
+ // }
this.dialogVisibleMember = false;
},
// 清空商品订单列表
@@ -2274,8 +2295,10 @@
settlement(){
this.authCode = ""
this.seekZero = 0;
- this.isPay = true
+ this.isPay = false
+ console.log(this.isPay)
this.dialogVisiblej = true
+ this.getStaff()
},
// 重置油品订单
resetting(){
@@ -2306,7 +2329,7 @@
// 油品订单信息
getOilOrder(){
this.dialogVisibleamount = false
- this.form.oilType = this.oilType;
+ this.form.oilType = this.oilNameID;
this.form.type = this.type;
// 计算油的升数
if (this.select == "元"){
@@ -2358,13 +2381,17 @@
_this.consumeRefuelMoney = 0;
_this.oilActualPay = 0;
_this.hoardAmount = 0;
+ _this.oilAmount = 0;
_this.oilOrder.forEach(item => {
let conRefMon = 0;
let hoardAmount = 0;
- if (_this.refuelMoney!=null){
+ let id = ""
+ if (_this.refuelMoney){
for (let i = 0;i < _this.refuelMoney.length;i++){
// 囤油卡升数变化
- if (_this.refuelMoney[i].oilType==item.oilType){
+ if (_this.refuelMoney[i].oilType==item.oilType && _this.refuelMoney[i].refuelMoney>0){
+ id = item.id
+ _this.isOilStorageCard = true
if ((_this.refuelMoney[i].refuelMoney-item.liters)>=0){
conRefMon = item.liters
}else {
@@ -2372,18 +2399,34 @@
// 扣除升数后需要消费的金额
hoardAmount = item.amount - (_this.refuelMoney[i].refuelMoney * item.oilPrice).toFixed(2)
}
+ }else {
+ hoardAmount = item.amount
}
}
}
_this.consumeRefuelMoney += +conRefMon
- if (_this.consumeRefuelMoney!=0){
- _this.isOilStorageCard = true;
- _this.checkAll3 = true;
- _this.consumeAmount = 0;
- }
_this.hoardAmount += +hoardAmount
+ _this.oilAmount += +item.amount
+ // _this.changeBalance(_this.hoardAmount,id)
+ // if (_this.consumeRefuelMoney!=0){
+ // _this.isOilStorageCard = true;
+ // _this.checkAll3 = true;
+ // _this.consumeAmount = 0;
+ // }
+ _this.isDefaultUseCard();
})
- _this.isExclusion();
+ },
+ changeBalance(hoardAmount,id){
+ if (this.balance>0 && id != ""){
+ this.oilOrder.forEach(item => {
+ if (this.balance >= item.amount){
+ this.consumeAmount = item.amount
+ }else {
+ this.consumeAmount = this.balance
+ this.oilActualPay = item.amount - this.balance
+ }
+ })
+ }
},
// 选择“元”或“L”
changeSelect(){
@@ -2424,6 +2467,7 @@
name = item.oilName;
oilType = item.oilType;
_this.oilType = item.oilName;
+ _this.oilNameID = item.id;
_this.type = item.oilType;
}
})
@@ -2442,15 +2486,18 @@
getUserInfoMobile({mobile:this.userNo}).then( response => {
if (response.data!=null){
this.member = response.data
+ this.storeId = response.data.storeId
+ this.isSure = false
}else {
this.$modal.msgError("会员信息不存在")
}
})
}else {
- getUserVoName({name:this.userNo}).then( response => {
- this.memberList = response.data
- })
this.dialogVisibleMember = true;
+ getUserVoName({name:this.userNo}).then( response => {
+ this.memberList = response.data.userVo
+ this.storeId = response.data.storeId
+ })
}
},
// 查询所有商品信息
@@ -2521,13 +2568,13 @@
let _this = this;
if (this.payType=="APPLET_CODE"){
- this.loading = true;
scanAppletQrCode(_this.map).then( resp => {
- if (resp.data.success!=undefined){
+ if (resp.data.success=='success'){
+ this.loading = true;
setTimeout(function (){
_this.isPaySuccess = true;
- this.loading = false;
- _this.isPay = false;
+ _this.loading = false;
+ _this.isPay = true;
_this.resetting1();
},3000)
}else {
@@ -2568,11 +2615,10 @@
})
this.loading = true;
_this.queryPayStatus();
- // console.log(_this.isQuery)
let timer = setInterval(function () {
if (_this.isQuery == false) {
_this.loading = false;
- _this.isPay = false;
+ _this.isPay = true;
clearInterval(_this.timer);
}
},500)
@@ -2582,7 +2628,6 @@
_this.resetting1();
},
resetting1(){
- // console.log(111)
let _this = this;
this.authCode = "";
if (_this.isPaySuccess == true){
@@ -2700,22 +2745,11 @@
},500)
},
handClose(){
- if(this.isPaySuccess){
- this.oilAmount = 0;
- this.oilActualPay = 0;
- this.oilDiscount = 0;
- this.goodsAmount = 0;
- this.goodsActualPay = 0;
- this.goodsDiscount = 0;
- this.consumeAmount = 0;
- this.consumeRefuelMoney = 0;
- this.oilTotal = 0;
- this.goodsTotal = 0;
- this.isMember = false;
- }
- this.isPay = true;
- this.dialogVisiblej = false
+ this.resetting1()
+ this.member = {};
this.isPaySuccess = false;
+ this.isPay = false;
+ this.dialogVisiblej = false
},
// 支付方式
payMethod(payType){
diff --git a/gasStation-uni/pagesRefuel/orderDetail/index.vue b/gasStation-uni/pagesRefuel/orderDetail/index.vue
index 1938d284a..8c40b8223 100644
--- a/gasStation-uni/pagesRefuel/orderDetail/index.vue
+++ b/gasStation-uni/pagesRefuel/orderDetail/index.vue
@@ -148,6 +148,7 @@
oilPrice: 0,
// 油品名称
oilName: "",
+ oilNameId:"",
// 油品类型
oilType:"",
// 油品id
@@ -169,6 +170,7 @@
deductAmount:0,
// 囤油卡信息
refuelMoney:[],
+ refuelMoneyAfter:[],
// 会员等级优惠信息
gradeDiscount:[],
// 优惠券优惠信息
@@ -200,7 +202,7 @@
},
onLoad(e) {
this.orderNo = e.orderNo
- // this.orderNo = "23452024011011251833f48e"
+ // this.orderNo = "234520240111104725ec1fbe"
},
onShow() {
this.getOilOrder();
@@ -211,14 +213,12 @@
methods: {
// 支付接口
payment(){
- let refuel = this.refuelMoney
- refuel.refuelMoney = this.refuelMoney.refuelMoney - this.oilCardRedece
let map = {
orderNo : this.orderNo,
payAmount : this.payAmount,
// payAmount : "0.01",
discountAmount : this.fullRedece+this.gradeRedece+this.couponRedece,
- oilCardAmount : JSON.stringify(refuel),
+ oilCardAmount : JSON.stringify(this.refuelMoneyAfter),
oilCardLiters : this.oilCardRedece,
balanceAmount : this.balanceRedece,
isOilStorageCard : this.isOilStorageCard,
@@ -308,19 +308,23 @@
// 查看是否有可使用的囤油卡
chooseRefuelMoney(){
let falg = false;
- this.refuelMoney.forEach(item => {
- if (item.oilType == this.oilName){
+ for(let i = 0;i= this.oilOrder.oilNum){
+ this.refuelBalance = this.refuelMoney[i].refuelMoney
+ if (this.refuelMoney[i].refuelMoney>0){
+ this.isOilStorageCard = true
+ }
+ if (this.refuelMoney[i].refuelMoney >= this.oilOrder.oilNum){
this.oilCardRedece = this.oilOrder.oilNum
+ this.refuelMoneyAfter[i].refuelMoney = this.refuelMoney[i].refuelMoney - this.oilOrder.oilNum
}else{
- this.oilCardRedece = item.refuelMoney
+ this.oilCardRedece = this.refuelMoney[i].refuelMoney
+ this.refuelMoneyAfter[i].refuelMoney = 0
this.chooseCardBalance(1)
}
}
- })
+ }
if (falg == false) {
this.chooseCardBalance(0)
this.chooseGrade(this.user.id,this.user.gradeId)
@@ -342,12 +346,17 @@
}else{
// 使用囤油卡
// 扣除囤油卡金额后需要支付的金额
- let residueAmount = (this.oilOrder.oilNum - this.oilCardRedece) * this.oilPrice
+ let residueAmount = 0
+ if(this.oilCardRedece>0){
+ residueAmount = ((this.oilOrder.oilNum - this.oilCardRedece) * this.oilPrice).toFixed(2)
+ }else{
+ residueAmount = this.oilOrder.orderAmount
+ }
if (this.user.cardBalance >= residueAmount){
this.balanceRedece = residueAmount
} else {
this.balanceRedece = this.user.cardBalance
- this.payAmount = (this.oilOrder.orderAmount - residueAmount - this.balanceRedece).toFixed(2)
+ this.payAmount = ((residueAmount*100).toFixed(0) - (this.balanceRedece*100).toFixed(0))/100
}
}
}else{
@@ -691,8 +700,10 @@
}
_this.user = res.data.userVo;
_this.user = res.data.userVo;
+ // console.log(res.data.userVo.refuelMoney);
if (res.data.userVo.refuelMoney!=null && res.data.userVo.refuelMoney!=""){
_this.refuelMoney = JSON.parse(res.data.userVo.refuelMoney)
+ _this.refuelMoneyAfter = JSON.parse(res.data.userVo.refuelMoney)
_this.chooseRefuelMoney()
}else{
_this.chooseCardBalance(0)
@@ -751,9 +762,11 @@
method: 'get',
}).then((res) => {
res.data.forEach(item => {
+ // console.log(item);
if (item.oilName == _this.oilOrder.oils) {
_this.oilPrice = item.gbPrice;
_this.oilName = item.oilNames;
+ _this.oilNameId = item.oilName;
_this.oilType = item.oilType;
_this.oilId = item.oilId;
}