From 0f37e8db2375bcc7fb4d9f3df0ac4082db62d560 Mon Sep 17 00:00:00 2001 From: wangh <9483> Date: Mon, 8 Jan 2024 10:07:07 +0800 Subject: [PATCH] =?UTF-8?q?bug=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/integral/order/pointsMall.vue | 4 +- .../src/views/oilConfig/oilPrice/index.vue | 141 +++++++++--------- .../configure/dev/application.properties | 4 +- .../impl/IntegralOrdersServiceImpl.java | 7 +- .../controller/ChainStoreInfoController.java | 2 +- .../fuint/business/store/entity/MtStore.java | 1 + .../impl/ChainStoreInfoServiceImpl.java | 1 + .../views/cashier/NewComponents/Integral.vue | 29 ++-- gasStation-uni/pages/index/index.vue | 12 +- .../pagesHome/goodsDetails/goodsDetails.vue | 2 + gasStation-uni/pagesHome/order/order.vue | 32 ++-- 11 files changed, 121 insertions(+), 114 deletions(-) diff --git a/fuintAdmin/src/views/integral/order/pointsMall.vue b/fuintAdmin/src/views/integral/order/pointsMall.vue index 60e77c9af..12d5016f6 100644 --- a/fuintAdmin/src/views/integral/order/pointsMall.vue +++ b/fuintAdmin/src/views/integral/order/pointsMall.vue @@ -111,8 +111,8 @@ diff --git a/fuintAdmin/src/views/oilConfig/oilPrice/index.vue b/fuintAdmin/src/views/oilConfig/oilPrice/index.vue index 55d6db502..500870c3e 100644 --- a/fuintAdmin/src/views/oilConfig/oilPrice/index.vue +++ b/fuintAdmin/src/views/oilConfig/oilPrice/index.vue @@ -166,14 +166,14 @@ - + - + @@ -252,14 +252,14 @@ - + - + @@ -316,17 +316,17 @@ - + - + - + @@ -371,11 +371,11 @@ import { data() { var valiNumberPass = (rule, value, callback) => {//包含小数的数字 - let reg = /^[+-]?(0|([1-9]\d*))(\.\d+)?$/g; + let reg = /^[+-]?(0|([1-9]\d*))(\.\d{1,2})?$/; if (value === '') { callback(new Error('请输入内容')); } else if (!reg.test(value)) { - callback(new Error('请输入数字')); + callback(new Error('请输入数字,最多保留两位小数')); } else { callback(); } @@ -391,8 +391,6 @@ import { ], presetOilPrices: [ { required: true, validator:valiNumberPass, trigger: "blur" } - // {required: true, message: '请输入', trigger: 'blur'}, - // { type: 'number', message: '价格必须为数字值'} ], presetGbPrice: [ { required: true, validator:valiNumberPass, trigger: "blur" } @@ -413,7 +411,6 @@ import { ], oilPrice: [ { required: true, validator:valiNumberPass, trigger: "blur" } - ], gbPrice: [ { required: true, validator:valiNumberPass, trigger: "blur" } @@ -503,8 +500,7 @@ import { }, mounted() { }, - methods:{ - + methods: { getStatusText(data) { @@ -516,7 +512,7 @@ import { }, handleChange(value) { - console.log("this.oilNumber",this.oilNumber); + console.log("this.oilNumber", this.oilNumber); console.log(value); }, // 获取数据 @@ -554,7 +550,7 @@ import { } }, res() { - this.oilNumber={ + this.oilNumber = { oilType: '汽油', oilName: '', oilPrice: '', @@ -566,10 +562,10 @@ import { sort: '', remark: '', ifDelete: '', - allOil:'', + allOil: '', oilTypeT: '', oilNameT: '', - unit:'', // 计价单位 + unit: '', // 计价单位 } }, @@ -597,39 +593,39 @@ import { this.receivingUnitList = []; var cla1 = { - label : "英文简称", - value : -1, - dis : true + label: "英文简称", + value: -1, + dis: true } this.receivingUnitList.push(cla1); // 遍历 this.receivingUnitCN 对象的属性并添加到 receivingUnitList for (const argumentsKey in this.receivingUnitCN) { const value = this.receivingUnitCN[argumentsKey]; var cla = { - label : value.dictLabel, - value : value.dictValue, - dis : false + label: value.dictLabel, + value: value.dictValue, + dis: false } this.receivingUnitList.push(cla); } var cla2 = { - label : "中文简称", - value : -2, - dis : true + label: "中文简称", + value: -2, + dis: true } - cla2 = { - label : "中文简称", - value : -3, - dis : true + cla2 = { + label: "中文简称", + value: -3, + dis: true } this.receivingUnitList.push(cla2); for (const argumentsKey in this.receivingUnitEN) { const value = this.receivingUnitEN[argumentsKey]; var cla = { - label : value.dictLabel, - value : value.dictValue, - dis : false + label: value.dictLabel, + value: value.dictValue, + dis: false } this.receivingUnitList.push(cla); } @@ -657,32 +653,31 @@ import { }, - // 打开修改窗口 openOilNumberEdit(item) { this.oilNumber = {}; let oil = item.allOil.split(' '); - console.log("oilNameT",item) + console.log("oilNameT", item) // item.oilNameT = oil[1]; // item.oilName = oil[1]; this.oilNumber = item; - this.$set(this.oilNumber,'oilNameT',oil[1]) + this.$set(this.oilNumber, 'oilNameT', oil[1]) this.oilTypeClick(item); }, // 添加 - insertOilNumberin(){ + insertOilNumberin() { this.$refs["oilNumberF"].validate(valid => { if (valid) { - insertOilNumber(this.oilNumber).then( response => { + insertOilNumber(this.oilNumber).then(response => { var list = response.data if (list < 0) { this.getList(); this.$modal.msgWarning("有重复油号"); - }else if(list > 0){ + } else if (list > 0) { this.$modal.msgSuccess("新增油号成功"); this.dialogFormVisible = false, this.getList(); @@ -696,41 +691,41 @@ import { }, // 修改 - async updateOilNumberin(){ + async updateOilNumberin() { this.$refs["form"].validate(valid => { - if (valid) { - var this_ = this - updateOilNumber(this_.oilNumber).then( response => { - var list = response.data - if ( list < 0) { - this.getList(); - this.$modal.msgWarning("油品重复"); - } else { - this.getList(); - this.dialogFormNumberEdit = false - this.$modal.msgSuccess("修改成功"); - } + if (valid) { + var this_ = this + updateOilNumber(this_.oilNumber).then(response => { + var list = response.data + if (list < 0) { + this.getList(); + this.$modal.msgWarning("油品重复"); + } else { + this.getList(); + this.dialogFormNumberEdit = false + this.$modal.msgSuccess("修改成功"); + } - }).catch(res=>{ - this.$modal.msgError("修改失败"); - }); - } - }) + }).catch(res => { + this.$modal.msgError("修改失败"); + }); + } + }) }, // 查询数组字典类型 async getOilTypeList(data) { var this_ = this - await dictSelect(data).then( response => { + await dictSelect(data).then(response => { var list = response.data if (data == "oil_type") { this_.oilTypeList = list; - }else if (data == "pricingUnitCN"){ //获取几家单位 + } else if (data == "pricingUnitCN") { //获取几家单位 this_.receivingUnitCN = list; - }else if (data == "pricingUnitEN"){ //获取几家单位 + } else if (data == "pricingUnitEN") { //获取几家单位 this_.receivingUnitEN = list; - }else { + } else { this_.oilNameList = list; } }); @@ -742,7 +737,7 @@ import { oilType: data } var this_ = this - getOilNameApi(OilNumber).then( response => { + getOilNameApi(OilNumber).then(response => { var list = response.data this_.oilNameList = list; }); @@ -750,17 +745,17 @@ import { /** * 油价预设 - */ + */ // 查询预设油号 getOilPresetListin() { - var this_=this - getOilPresetList().then( response => { + var this_ = this + getOilPresetList().then(response => { this.oilPresetPricesList = response.data.records this.oilPresetPricesList.forEach(oilNumber => { this.AllOilList.forEach(oil => { if (parseInt(oilNumber.oilType) == oil.id) { - oilNumber.oilNameT = oil.oilType+' '+oil.oilName; + oilNumber.oilNameT = oil.oilType + ' ' + oil.oilName; } }); }); @@ -769,8 +764,8 @@ import { }, // 油价预设查询列表 getOilNameList() { - var this_=this - getOilNameListApi().then( response => { + var this_ = this + getOilNameListApi().then(response => { var list = response.data this_.selectOilTypeByPrice = list }); @@ -784,7 +779,7 @@ import { }, // 添加youjia1 - insertOilPresePrices(){ + insertOilPresePrices() { this.$refs["priForm"].validate(valid => { if (valid) { this.dialogFormPricesAdd = false @@ -800,7 +795,7 @@ import { // 更改状态 deleteRow(data1, data2) { - stopJobApi(data2).then( response => { + stopJobApi(data2).then(response => { this.$modal.msgSuccess("停止成功"); this.getOilPresetListin(); @@ -824,9 +819,9 @@ import { this.oilNumber.oilName = this.oilNumber.oilNameT }, - getSecondName(){ + getSecondName() { this.$forceUpdate(); - } + }, } } diff --git a/fuintBackend/configure/dev/application.properties b/fuintBackend/configure/dev/application.properties index 428182e8c..a963dfee9 100644 --- a/fuintBackend/configure/dev/application.properties +++ b/fuintBackend/configure/dev/application.properties @@ -43,7 +43,7 @@ images.root=d:/rouyi/uploadPath images.path=/static/uploadImages/ # \u4E0A\u4F20\u56FE\u7247\u670D\u52A1\u5668\u57DF\u540D -images.upload.url=http://localhost:8080 +images.upload.url=http://localhost:8008 # \u4E0A\u4F20\u56FE\u7247\u5141\u8BB8\u7684\u5927\u5C0F\uFF08\u5355\u4F4D\uFF1AMB\uFF09 images.upload.maxSize=5 @@ -51,7 +51,7 @@ images.upload.maxSize=5 ################## \u5B9A\u65F6\u811A\u672C\u914D\u7F6E ######################### # \u5B9A\u65F6\u53D1\u9001\u6D88\u606F message.job.switch = 1 -message.job.time = 0 0/1 * * * ? +message.job.time = 0 0/1 * * * ?z # \u5361\u5238\u5230\u671F\u5904\u7406 couponExpire.job.switch = 1 diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/integral/service/impl/IntegralOrdersServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/integral/service/impl/IntegralOrdersServiceImpl.java index 90410faf2..6bdc90708 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/integral/service/impl/IntegralOrdersServiceImpl.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/integral/service/impl/IntegralOrdersServiceImpl.java @@ -311,13 +311,12 @@ public class IntegralOrdersServiceImpl implements IntegralOrdersService { cardFavorableRecord.setExchangeFrom("积分兑换"); cardFavorableRecordService.addCardFavorableRecord(cardFavorableRecord); }else if(integralGift.getGiftType().equals("实物商品")) { - // 查询礼品信息 - // 修改商品库存并增加记录 LJGoodsDto goods = new LJGoodsDto(); - goods.setId(integralGift.getGoodsId()); -// goods.setDocument(); + goods.setDocument("积分兑换"); + goods.setNumberOfChanges(-integralOrders.getExchangeQuantity()); + goods.setGoodsNo(integralOrders.getOrderNumber()); ljGoodsService.editGoodsInventory(goods); } diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/store/controller/ChainStoreInfoController.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/store/controller/ChainStoreInfoController.java index 0e541e974..c925bb217 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/store/controller/ChainStoreInfoController.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/store/controller/ChainStoreInfoController.java @@ -28,7 +28,7 @@ public class ChainStoreInfoController extends BaseController { * 服务对象 */ @Resource - private ChainStoreInfoService chainStoreInfoService; + private ChainStoreInfoService chainStoreInfoService; /** * 分页查询所有数据 diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/store/entity/MtStore.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/store/entity/MtStore.java index b67592bb8..b55a77ebe 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/store/entity/MtStore.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/store/entity/MtStore.java @@ -81,6 +81,7 @@ public class MtStore extends BaseEntity implements Serializable { @ApiModelProperty("福利信息") private String welfare; + private String ifDelete; @ApiModelProperty("门头照") private String doorstepPhoto; diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/store/service/impl/ChainStoreInfoServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/store/service/impl/ChainStoreInfoServiceImpl.java index 9f9316952..f1f25ac86 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/store/service/impl/ChainStoreInfoServiceImpl.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/store/service/impl/ChainStoreInfoServiceImpl.java @@ -56,6 +56,7 @@ public class ChainStoreInfoServiceImpl extends ServiceImpl list = storeService.list(queryWrapper); for (MtStore mtStore : list) { diff --git a/fuintCashierWeb/src/views/cashier/NewComponents/Integral.vue b/fuintCashierWeb/src/views/cashier/NewComponents/Integral.vue index da7855d2e..fc71dbebc 100644 --- a/fuintCashierWeb/src/views/cashier/NewComponents/Integral.vue +++ b/fuintCashierWeb/src/views/cashier/NewComponents/Integral.vue @@ -37,7 +37,7 @@ border-radius: 5px;text-align: center">
- 会员等级:{{ getGrade(member.gradeId) }} + 会员等级:{{ member.gradeId?getGrade(member.gradeId):'未知' }}
@@ -526,18 +526,25 @@ import { }, // 选择会员 chooseUser(mobile,id){ - this.dialogVisiblevip = false - this.isMember = true; - // this.map.payUser = mobile; - // this.map.userId = id; - this.balance = this.member.cardBalance; - if (this.balance>=(this.oilAmount - this.oilDiscount)){ - this.consumeAmount = this.oilAmount - this.oilDiscount; - this.oilActualPay = 0; + console.log("this.member",this.member) + if (this.member.id) { + this.dialogVisiblevip = false + this.isMember = true; + // this.map.payUser = mobile; + // this.map.userId = id; + this.balance = this.member.cardBalance; + if (this.balance>=(this.oilAmount - this.oilDiscount)){ + this.consumeAmount = this.oilAmount - this.oilDiscount; + this.oilActualPay = 0; + }else { + this.consumeAmount = this.balance; + this.oilActualPay = this.oilAmount - this.oilDiscount - this.balance; + } }else { - this.consumeAmount = this.balance; - this.oilActualPay = this.oilAmount - this.oilDiscount - this.balance; + this.$message.error('请先选择会员'); + } + }, // 选择会员信息 handleChoose(data){ diff --git a/gasStation-uni/pages/index/index.vue b/gasStation-uni/pages/index/index.vue index 698b8b28e..edf0c8149 100644 --- a/gasStation-uni/pages/index/index.vue +++ b/gasStation-uni/pages/index/index.vue @@ -196,7 +196,7 @@ let storeId = "19"; let staffId = ""; - if (str.includes("&")){ + if (str.includes("&")) { let arr = str.split("&"); arr.forEach(item => { if (item.includes("storeId")) { @@ -205,17 +205,17 @@ staffId = item.split("=")[1] } }) - }else{ + } else { storeId = str.split("=")[1] } - + uni.setStorageSync("storeId", storeId) uni.setStorageSync("inviteStaffId", staffId) this.storeId = uni.getStorageSync("storeId") this.staffId = uni.getStorageSync("inviteStaffId") uni.showLoading({ - title:uni.getStorageSync("storeId") + "++" +uni.getStorageSync("inviteStaffId") + q + title: uni.getStorageSync("storeId") + "++" + uni.getStorageSync("inviteStaffId") + q }) this.getUserAuthority(); this.getOilType(); @@ -223,7 +223,7 @@ if (uni.getStorageSync("storeId")) { this.storeId = uni.getStorageSync("storeId") } else { - let storeId = "34"; + let storeId = "12"; uni.setStorageSync("storeId", storeId) } @@ -343,7 +343,7 @@ } }, fail(err) { - + } }) }, diff --git a/gasStation-uni/pagesHome/goodsDetails/goodsDetails.vue b/gasStation-uni/pagesHome/goodsDetails/goodsDetails.vue index c84d6c432..7189baf50 100644 --- a/gasStation-uni/pagesHome/goodsDetails/goodsDetails.vue +++ b/gasStation-uni/pagesHome/goodsDetails/goodsDetails.vue @@ -156,6 +156,8 @@