|
@@ -0,0 +1,141 @@
|
|
|
+<template>
|
|
|
+ <view class="">
|
|
|
+ <view class="search-box">
|
|
|
+ <My_search background="#fff" @onSearch="onSearch" />
|
|
|
+ </view>
|
|
|
+ <view class="head">
|
|
|
+ <text>
|
|
|
+ 门店
|
|
|
+ </text>
|
|
|
+ <text>
|
|
|
+ 共{{ total }}个
|
|
|
+ </text>
|
|
|
+ </view>
|
|
|
+
|
|
|
+ <My_listbox ref="List" @getlist="getList" bottomHeight="70">
|
|
|
+ <user-list :list="list" @onClick="onClick" />
|
|
|
+ </My_listbox>
|
|
|
+
|
|
|
+ <view class="footer">
|
|
|
+ <navigator class="invite" @click="onInsert" url="/store/insert/store">
|
|
|
+ 新增门店
|
|
|
+ </navigator>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+import userList from "../modules/userList"
|
|
|
+export default {
|
|
|
+ components: { userList },
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ "content": {
|
|
|
+ "where": {
|
|
|
+ "condition": ""
|
|
|
+ }
|
|
|
+ },
|
|
|
+ total: 0,
|
|
|
+ list: []
|
|
|
+ }
|
|
|
+ },
|
|
|
+ created() {
|
|
|
+ this.init()
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ init() {
|
|
|
+ this.getList(true)
|
|
|
+ },
|
|
|
+ getList(init = false) {
|
|
|
+ if (this.paging(this.content, init)) return;
|
|
|
+ this.$Http.basic({
|
|
|
+ "id": "20240410095602",
|
|
|
+ content: this.content
|
|
|
+ }).then(res => {
|
|
|
+ console.log("门店列表", res)
|
|
|
+ this.$refs.List.RefreshToComplete()
|
|
|
+ if (this.cutoff(res.msg)) return;
|
|
|
+ /* res.data = res.data.map(v => {
|
|
|
+ v.cover = v.attinfos.length ? this.getSpecifiedImage(v.attinfos.find(s => s.usetype == "sa_fad") || v.attinfos[0]) : uni.getStorageSync("site").logo || ''
|
|
|
+ return v
|
|
|
+ }) */
|
|
|
+ this.total = res.total;
|
|
|
+ this.list = res.pageNumber == 1 ? res.data : this.list.concat(res.data), this.colors;
|
|
|
+ this.content = this.$refs.List.paging(this.content, res)
|
|
|
+ })
|
|
|
+ },
|
|
|
+ onClick(item) {
|
|
|
+ uni.navigateTo({
|
|
|
+ url: '/team/userCenter/personal?id=' + item.sys_enterprise_hrid
|
|
|
+ });
|
|
|
+ },
|
|
|
+ onInsert() {
|
|
|
+ this.$Http.uploadStoreList = function () {
|
|
|
+ if (this.content.pageNumber && this.content.pageNumber >= 2) {
|
|
|
+ let content = this.paging(this.content, true, true)
|
|
|
+ this.$Http.basic({
|
|
|
+ "id": "20240410095602",
|
|
|
+ content
|
|
|
+ }).then(res => {
|
|
|
+ console.log("更新门店列表", res)
|
|
|
+ if (this.cutoff(res.msg)) return;
|
|
|
+ this.list = res.data;
|
|
|
+ delete this.$Http.uploadStoreList
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }.bind(this)
|
|
|
+ },
|
|
|
+ onSearch(condition) {
|
|
|
+ this.content.where.condition = condition;
|
|
|
+ this.getList(true)
|
|
|
+ }
|
|
|
+ },
|
|
|
+}
|
|
|
+</script>
|
|
|
+
|
|
|
+<style lang="scss" scoped>
|
|
|
+.search-box {
|
|
|
+ margin-top: 10px;
|
|
|
+ padding: 0 10px;
|
|
|
+ box-sizing: border-box;
|
|
|
+}
|
|
|
+
|
|
|
+.head {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: space-between;
|
|
|
+ height: 37px;
|
|
|
+ padding: 0 10px;
|
|
|
+ box-sizing: border-box;
|
|
|
+ font-family: Source Han Sans SC, Source Han Sans SC;
|
|
|
+ font-size: 12px;
|
|
|
+ color: #666666;
|
|
|
+}
|
|
|
+
|
|
|
+.footer {
|
|
|
+ position: fixed;
|
|
|
+ bottom: 0;
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-between;
|
|
|
+ width: 100vw;
|
|
|
+ height: 65px;
|
|
|
+ background: #FFFFFF;
|
|
|
+ box-shadow: 0px -2px 6px 1px rgba(0, 0, 0, 0.16);
|
|
|
+ padding: 5px 10px;
|
|
|
+ box-sizing: border-box;
|
|
|
+
|
|
|
+ .invite {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: center;
|
|
|
+ flex: 1;
|
|
|
+ height: 45px;
|
|
|
+ background: #C30D23;
|
|
|
+ border-radius: 5px;
|
|
|
+ font-family: PingFang SC, PingFang SC;
|
|
|
+ font-weight: 500;
|
|
|
+ font-size: 16px;
|
|
|
+ color: #FFFFFF;
|
|
|
+ }
|
|
|
+}
|
|
|
+</style>
|