|
|
@@ -285,35 +285,55 @@ export default {
|
|
|
|
|
|
},
|
|
|
clearShop(){
|
|
|
- this.shopList = []
|
|
|
+ let self = this
|
|
|
+ uni.showModal({
|
|
|
+ title: '提示',
|
|
|
+ content: '确认清空?',
|
|
|
+ success: function (res) {
|
|
|
+ if (res.confirm) {
|
|
|
+ self.shopList = []
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
},
|
|
|
logout(){
|
|
|
let that = this
|
|
|
uni.showModal({
|
|
|
- title: '提示',
|
|
|
- content: '确认退出?',
|
|
|
- success: function (res) {
|
|
|
- if (res.confirm) {
|
|
|
- uni.clearStorage()
|
|
|
- that.$store.commit("setLoginInfo", {})
|
|
|
- plus.runtime.restart()
|
|
|
- }
|
|
|
- }
|
|
|
+ title: '提示',
|
|
|
+ content: '确认退出?',
|
|
|
+ success: function (res) {
|
|
|
+ if (res.confirm) {
|
|
|
+ uni.clearStorage()
|
|
|
+ that.$store.commit("setLoginInfo", {})
|
|
|
+ plus.runtime.restart()
|
|
|
+ }
|
|
|
+ }
|
|
|
})
|
|
|
},
|
|
|
deleteShop(){
|
|
|
if(this.$util.isEmpty(this.selectCurrentActiveItem)) {
|
|
|
- this.$msg('请选择要删除的商品')
|
|
|
+ this.$msg('请选择要删除的商品')
|
|
|
+ return false
|
|
|
}
|
|
|
- let index = this.shopList.findIndex(i=>this.selectCurrentActiveItem.id === i.id)
|
|
|
- this.shopList = this.shopList.filter(i=>this.selectCurrentActiveItem.id !== i.id)
|
|
|
+ let self = this
|
|
|
+ uni.showModal({
|
|
|
+ title: '提示',
|
|
|
+ content: '确认删除?',
|
|
|
+ success: function (res) {
|
|
|
+ if (res.confirm) {
|
|
|
+ let index = self.shopList.findIndex(i=>self.selectCurrentActiveItem.id === i.id)
|
|
|
+ self.shopList = self.shopList.filter(i=>self.selectCurrentActiveItem.id !== i.id)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
},
|
|
|
selectItemChange(item){
|
|
|
this.selectItem = {
|
|
|
...item,
|
|
|
currentUnit:item.bigUnit,
|
|
|
currentUnitPrice:item.property==1?item.bigPrice:item.price,
|
|
|
- currentNum: 0,
|
|
|
+ currentNum: 1,
|
|
|
unitType: 0
|
|
|
}
|
|
|
this.isShowFllowNum = true
|