|
@@ -8,16 +8,13 @@
|
|
|
<div>
|
|
<div>
|
|
|
<span class="staff-name">{{ item.shopName }}</span>
|
|
<span class="staff-name">{{ item.shopName }}</span>
|
|
|
<span>{{ item.telephone }}</span>
|
|
<span>{{ item.telephone }}</span>
|
|
|
|
|
+ <span v-if="item.default && item.default == 1" class="first-shop">默认</span>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="list-det-right">
|
|
<div class="list-det-right">
|
|
|
<div @click.stop="toModiyFn(item)">
|
|
<div @click.stop="toModiyFn(item)">
|
|
|
<i class="iconfont iconbianji"></i>
|
|
<i class="iconfont iconbianji"></i>
|
|
|
</div>
|
|
</div>
|
|
|
- <!-- 删除 -->
|
|
|
|
|
- <!-- <div @click="delModalFn(item)">
|
|
|
|
|
- <i class="iconfont iconshanchu1"></i>
|
|
|
|
|
- </div> -->
|
|
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
@@ -26,25 +23,20 @@
|
|
|
<app-wrapper-empty title="暂无数据" :is-empty="$util.isEmpty(list.data)" />
|
|
<app-wrapper-empty title="暂无数据" :is-empty="$util.isEmpty(list.data)" />
|
|
|
</block>
|
|
</block>
|
|
|
</div>
|
|
</div>
|
|
|
- <!-- 按钮 -->
|
|
|
|
|
<div class="app-footer">
|
|
<div class="app-footer">
|
|
|
- <!-- <div class="admin-button-com middle blue" @click="pageTo('/admin/shop/add')">添加门店</div> -->
|
|
|
|
|
<div @click="addModel" class="admin-button-com middle blue">添加门店</div>
|
|
<div @click="addModel" class="admin-button-com middle blue">添加门店</div>
|
|
|
</div>
|
|
</div>
|
|
|
- <!-- 删除弹窗 -->
|
|
|
|
|
- <modal-module :show="delModal" @cancel="modalCancel" @click="delModalClick" content="是否要删除该门店" color="#333" :size="32" padding="30upx 30upx"></modal-module>
|
|
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
-
|
|
|
|
|
<script>
|
|
<script>
|
|
|
import AppAvatarModule from '@/components/module/app-avatar'
|
|
import AppAvatarModule from '@/components/module/app-avatar'
|
|
|
import AppWrapperEmpty from '@/components/app-wrapper-empty'
|
|
import AppWrapperEmpty from '@/components/app-wrapper-empty'
|
|
|
import ModalModule from '@/components/plugin/modal'
|
|
import ModalModule from '@/components/plugin/modal'
|
|
|
import { list } from '@/mixins'
|
|
import { list } from '@/mixins'
|
|
|
-import { getList, downQrCode, downMemberCode, delShop } from '@/api/shop'
|
|
|
|
|
|
|
+import { getList } from '@/api/shop'
|
|
|
import {mapActions} from "vuex";
|
|
import {mapActions} from "vuex";
|
|
|
export default {
|
|
export default {
|
|
|
- name: 'shop-list',
|
|
|
|
|
|
|
+ name: 'list',
|
|
|
components: {
|
|
components: {
|
|
|
AppAvatarModule,
|
|
AppAvatarModule,
|
|
|
AppWrapperEmpty,
|
|
AppWrapperEmpty,
|
|
@@ -53,37 +45,30 @@ export default {
|
|
|
mixins: [list],
|
|
mixins: [list],
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
|
- // 删除弹窗操作
|
|
|
|
|
- delModal: false,
|
|
|
|
|
- delModalText: '确定删除该员工吗?',
|
|
|
|
|
- operateData: {}
|
|
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
onPullDownRefresh() {
|
|
onPullDownRefresh() {
|
|
|
this.resetList()
|
|
this.resetList()
|
|
|
- this._list().then(res => {
|
|
|
|
|
|
|
+ this.getShopList().then(res => {
|
|
|
uni.stopPullDownRefresh()
|
|
uni.stopPullDownRefresh()
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
onReachBottom() {
|
|
onReachBottom() {
|
|
|
if (!this.list.finished) {
|
|
if (!this.list.finished) {
|
|
|
- this._list().then(res => {
|
|
|
|
|
|
|
+ this.getShopList().then(res => {
|
|
|
uni.stopPullDownRefresh()
|
|
uni.stopPullDownRefresh()
|
|
|
})
|
|
})
|
|
|
} else {
|
|
} else {
|
|
|
uni.stopPullDownRefresh()
|
|
uni.stopPullDownRefresh()
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
- onShow: function() {
|
|
|
|
|
- // this.setUserShopAll()
|
|
|
|
|
- // this.init()
|
|
|
|
|
- },
|
|
|
|
|
methods: {
|
|
methods: {
|
|
|
...mapActions(['setUserShopAll']),
|
|
...mapActions(['setUserShopAll']),
|
|
|
async init() {
|
|
async init() {
|
|
|
- this._list()
|
|
|
|
|
|
|
+ this.getShopList()
|
|
|
},
|
|
},
|
|
|
- _list() {
|
|
|
|
|
|
|
+ getShopList() {
|
|
|
return getList().then(res => {
|
|
return getList().then(res => {
|
|
|
this.completes(res)
|
|
this.completes(res)
|
|
|
})
|
|
})
|
|
@@ -91,60 +76,8 @@ export default {
|
|
|
toModiyFn(item) {
|
|
toModiyFn(item) {
|
|
|
this.pageTo({ url: '/admin/shop/add?id='+item.id})
|
|
this.pageTo({ url: '/admin/shop/add?id='+item.id})
|
|
|
},
|
|
},
|
|
|
- // 收款码
|
|
|
|
|
- downQrCodeFn(item, index) {
|
|
|
|
|
- downQrCode({ id: item.id })
|
|
|
|
|
- uni.previewImage({
|
|
|
|
|
- urls: [this.$constant.formal + item.gatheringCode]
|
|
|
|
|
- })
|
|
|
|
|
- },
|
|
|
|
|
- viewQrCodeFn(item) {
|
|
|
|
|
- uni.previewImage({
|
|
|
|
|
- urls: item.gatheringCode
|
|
|
|
|
- })
|
|
|
|
|
- },
|
|
|
|
|
- // 添加门店
|
|
|
|
|
- addModel() {
|
|
|
|
|
- uni.removeStorageSync('modifyShopB')
|
|
|
|
|
- this.pageTo({url:'/admin/shop/add'})
|
|
|
|
|
- },
|
|
|
|
|
- // 会员码
|
|
|
|
|
- downMemberCodeFn(item, index) {
|
|
|
|
|
- downMemberCode({ id: item.id })
|
|
|
|
|
- uni.previewImage({
|
|
|
|
|
- urls: [this.$constant.formal + item.applyMemberCode]
|
|
|
|
|
- })
|
|
|
|
|
- },
|
|
|
|
|
- viewMemberCodeFn(item) {
|
|
|
|
|
- uni.previewImage({
|
|
|
|
|
- urls: item.applyMemberCode
|
|
|
|
|
- })
|
|
|
|
|
- },
|
|
|
|
|
- // 关闭弹窗
|
|
|
|
|
- modalCancel() {
|
|
|
|
|
- this.delModal = false
|
|
|
|
|
- this.roleModal = false
|
|
|
|
|
- },
|
|
|
|
|
- // 删除弹窗
|
|
|
|
|
- delModalFn(item) {
|
|
|
|
|
- this.delModalText = this.tabIndex == 0 ? '确定删除该吗?' : '确定删除该角色吗?'
|
|
|
|
|
- this.operateData = item
|
|
|
|
|
- this.delModal = true
|
|
|
|
|
- },
|
|
|
|
|
- delModalClick(e) {
|
|
|
|
|
- let index = e.index
|
|
|
|
|
- if (index === 0) {
|
|
|
|
|
- this.modalCancel()
|
|
|
|
|
- } else {
|
|
|
|
|
- delShop({ id: this.operateData.id }).then(res => {
|
|
|
|
|
- this.modalCancel()
|
|
|
|
|
- this.$msg('删除成功!')
|
|
|
|
|
- setTimeout(() => {
|
|
|
|
|
- this.resetList()
|
|
|
|
|
- this._list()
|
|
|
|
|
- }, 1000)
|
|
|
|
|
- })
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ addModel() {
|
|
|
|
|
+ this.pageTo({url:'/admin/shop/add'})
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -173,6 +106,16 @@ export default {
|
|
|
margin-left: 20upx;
|
|
margin-left: 20upx;
|
|
|
@include disFlex(center, space-between);
|
|
@include disFlex(center, space-between);
|
|
|
.list-det-left {
|
|
.list-det-left {
|
|
|
|
|
+ .first-shop{
|
|
|
|
|
+ border:1upx solid #3385FF;
|
|
|
|
|
+ background-color:#3385FF;
|
|
|
|
|
+ color:white;
|
|
|
|
|
+ border-radius:20upx;
|
|
|
|
|
+ padding:5upx 10upx 5upx 10upx;
|
|
|
|
|
+ margin-left:20upx;
|
|
|
|
|
+ font-size:20upx;
|
|
|
|
|
+ width:100upx;
|
|
|
|
|
+ }
|
|
|
.staff-name {
|
|
.staff-name {
|
|
|
color: #333;
|
|
color: #333;
|
|
|
font-size: 30upx;
|
|
font-size: 30upx;
|