This commit is contained in:
wangh 2024-01-06 15:51:55 +08:00
commit ca91fa5b5a
4 changed files with 62 additions and 19 deletions

View File

@ -740,12 +740,14 @@ export default {
if(response.data){
this.$modal.msgError("手机号已存在");
}else {
addUser(this.form).then(response => {
this.$modal.msgSuccess("新增会员成功");
this.open = false;
this.openUser = false;
this.getList();
this.getUserList();
addUser(this.form).then(res => {
if (res.data == 1) {
this.$modal.msgSuccess("新增会员成功");
this.open = false;
this.openUser = false;
this.getList();
this.getUserList();
}
});
}
})

View File

@ -794,10 +794,17 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
int row = 0;
OilOrder oilOrder = this.selectOilOrderByOrderNo(orderNo);
if (ObjectUtil.isNotEmpty(oilOrder)){
oilOrder.setPayAmount(oilOrder.getOrderAmount()-oilOrder.getDiscountAmount());
oilOrder.setOrderStatus(status);
if (status.equals("paid")){
oilOrder.setPayTime(new Date());
this.updateGrowthValue(oilOrder.getPayAmount(),oilOrder.getUserId(), Integer.valueOf(oilOrder.getOils()),null,oilOrder.getStoreId());
CashierOrder cashierOrder = cashierOrderService.selectCashierOrder(orderNo);
if (ObjectUtil.isNotEmpty(cashierOrder)){
cashierOrder.setPayTime(new Date());
cashierOrder.setStatus("paid");
cashierOrderService.updateCashierOrder(cashierOrder);
}
}
row = baseMapper.updateById(oilOrder);
}

View File

@ -837,21 +837,27 @@
if (valid) {
if (this.form.id) {
updateUser(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 {
this.$modal.msgError("手机号已存在");
}
});
} else {
getUserMobile({mobile:this.form.mobile}).then( response => {
if(response.data!=null){
this.$modal.msgError("手机号已存在");
}else {
addUser(this.form).then(response => {
this.$modal.msgSuccess("新增会员成功");
this.open = false;
this.openUser = false;
this.getList();
this.getUserList();
addUser(this.form).then(res => {
if (res.data==1) {
this.$modal.msgSuccess("新增会员成功");
this.open = false;
this.openUser = false;
this.getList();
this.getUserList();
}
});
}
})

View File

@ -57,7 +57,7 @@
</view>
<view class="fa-box">
<view class="fa-title">请输入加油金额</view>
<view class="inputkuang" @click="show = true">
<view class="inputkuang" @click="openKey">
<view class="sbox"></view>
<view class="sbox" style="text-align: center;font-weight: bold;">{{value}}</view>
<view class="sbox-hui">{{liters}}L</view>
@ -74,8 +74,15 @@
</view>
</view>
<u-keyboard ref="uKeyboard" :tips="value" mode="number" @cancel="show = false" @confirm="submitAmount"
@change="valChange" @backspace="backspace" v-model="pic" :show="show"></u-keyboard>
<!-- <u-keyboard ref="uKeyboard" :tips="value" mode="number" @cancel="show = false" @confirm="submitAmount"
@change="valChange" @backspace="backspace" v-model="pic" :show="show"></u-keyboard> -->
<view style="margin-top: 50px;">
<uni-popup ref="popup1" type="bottom" background-color="white" mask-background-color="rgba(0,0,0,0.0)">
<keyboard :pApplt="appltType" @isPay="submitAmount" @amount="changeVal" @backVal="backspaceVal">
</keyboard>
</uni-popup>
</view>
<view>
<uni-popup ref="popup" type="bottom">
@ -112,6 +119,7 @@
export default {
data() {
return {
appltType:uni.getStorageSync("appltType"),
value: '',
liters:"",
show: false,
@ -201,6 +209,11 @@
// this.getStore(0);
},
methods: {
//
openKey() {
this.show = true
this.$refs.popup1.open('bottom')
},
isExistStoreId(){
if (uni.getStorageSync("storeId") != ""){
this.getStore(uni.getStorageSync("storeId"));
@ -337,11 +350,12 @@
getAIndex(index,amount) {
this.value = amount+""
this.aindex = index
this.liters = (amount/this.oilPrice).toFixed(2)
},
//
getHIndex(index,data) {
this.hindex = index
console.log(data)
// console.log(data)
this.getOilGun(data.numberId)
this.oilPrice = data.gbPrice
this.oilUnit = data.unit
@ -388,6 +402,20 @@
}
}
},
changeVal(val) {
this.value = val;
this.liters = (this.value/this.oilPrice).toFixed(2)
},
backspaceVal(val) {
this.value = val;
if (val == "") {
this.amount = 0
this.liters = 0
} else {
this.amount = val;
this.liters = (this.value/this.oilPrice).toFixed(2)
}
},
valChange(val) {
// value+=
uni.vibrateShort({