Merge branch 'master' of https://gitee.com/nny_1/oilSystem
This commit is contained in:
commit
ca91fa5b5a
@ -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();
|
||||
}
|
||||
});
|
||||
}
|
||||
})
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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();
|
||||
}
|
||||
});
|
||||
}
|
||||
})
|
||||
|
@ -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({
|
||||
|
Loading…
Reference in New Issue
Block a user