xiaohaizhao 1 anno fa
parent
commit
40065b7db9

+ 7 - 2
components/filtrate-group.vue

@@ -44,6 +44,7 @@ export default {
 <style lang="scss">
 .group-box {
     padding: 10px;
+    padding-left: 0px;
     box-sizing: border-box;
 
     .title {
@@ -52,20 +53,24 @@ export default {
         font-weight: bold;
         font-size: 16px;
         color: #333333;
+        box-sizing: border-box;
+        padding-left: 10px;
     }
 
     .options {
         display: flex;
         flex-wrap: wrap;
+        box-sizing: border-box;
+        padding-left: 5px;
 
         .option {
-            min-width: 80px;
+            min-width: 72px;
             padding: 6px;
             font-family: PingFang SC, PingFang SC;
             text-align: center;
             font-size: 14px;
             color: #333333;
-            margin: 10px 5px 0 0;
+            margin: 10px 0 0 5px;
             background: #F2F2F2;
             border-radius: 5px;
         }

+ 1 - 1
components/userList.vue

@@ -13,7 +13,7 @@
                 <view class="title u-line-1">
                     {{ item.name }}
                 </view>
-                <view class="row u-line-1">
+                <view v-if="item.rolenames" class="row u-line-1">
                     {{ item.rolenames }}
                 </view>
                 <view class="row">

+ 39 - 17
store/center/detail.vue

@@ -5,10 +5,10 @@
             <view class="content">
                 <view class="left">
                     <view class="tag-box">
-                        <view class="storetype">
+                        <view v-if="detail.storetype" class="storetype">
                             {{ detail.storetype }}
                         </view>
-                        <view class="markettype">
+                        <view v-if="detail.markettype" class="markettype">
                             {{ detail.markettype }}
                         </view>
                     </view>
@@ -26,7 +26,7 @@
                         {{ getCity(detail) }}
                     </view>
                     <view class="row">
-                        状态:<text style="color: #333333;">{{ detail.status }}</text>
+                        状态:<text :style="{ color: detail.color }">{{ detail.status }}</text>
                     </view>
                 </view>
                 <view class="right">
@@ -42,7 +42,7 @@
             @click="changeCurrent" :current="current" />
         <view v-show="current == 0">
             <displayCell :showList="showList" :detail="detail" />
-            <view v-if="detail.status == '审核'" style="height: 30px;" />
+            <view :style="{ height: detail.status == '审核' ? '30px' : '75px' }" />
         </view>
 
         <view v-show="current == 1">
@@ -54,7 +54,8 @@
                     <view class="item" hover-class="navigator" @click="changeSearchShow">
                         <text class="iconfont icon-sousuo" />
                     </view>
-                    <navigator class="item" @click="onInsert" :url="'/store/insert/member?id=' + detail.sa_storeid">
+                    <navigator v-if="authOption.includes('storeInsertUser')" class="item" @click="onInsert"
+                        :url="'/store/insert/member?id=' + detail.sa_storeid">
                         <text class="iconfont icon-xinzeng" />
                     </navigator>
                 </view>
@@ -65,21 +66,20 @@
                 </view>
             </u-transition>
             <My_listbox ref="List" @getlist="getList" :bottomHeight="detail.status != '审核' ? 70 : 30">
-                <user-list :list="list" @onClick="onClick" isDelete @onDelete="onDelete" />
+                <user-list :list="list" @onClick="onClick" :isDelete="authOption.includes('storeDeleteUser')"
+                    @onDelete="onDelete" />
             </My_listbox>
         </view>
-        <block v-if="detail.status != '审核'">
-            <view style="height: 75px;" />
-            <view class="footer">
-                <view class="insert" :class="detail.status == '新建' ? '' : 'forbidden'"
-                    @click="detail.status == '新建' ? toEdit() : ''">
-                    编辑门店信息
-                </view>
-                <view class="invite" @click="detail.status == '新建' ? submit() : revocation()">
-                    {{ detail.status == '新建' ? '提交门店信息' : '撤回' }}
-                </view>
+        <view v-if="detail.status != '审核'" class="footer">
+            <view class="insert" style="flex:1;" :class="detail.status == '新建' ? '' : 'forbidden'"
+                @click="detail.status == '新建' ? toEdit() : ''">
+                编辑门店信息
             </view>
-        </block>
+            <view v-if="authOption.includes('storeComeUpForReview')" class="invite"
+                @click="detail.status == '新建' ? submit() : revocation()">
+                {{ detail.status == '新建' ? '提交门店信息' : '撤回' }}
+            </view>
+        </view>
     </view>
 </template>
 
@@ -101,6 +101,7 @@ export default {
             },
             list: null,
             searchShow: false,
+            authOption: [],
         }
     },
     onLoad(options) {
@@ -110,6 +111,13 @@ export default {
         uni.setNavigationBarTitle({
             title: '门店信息'
         });
+        let auth = this.getApps('工作台', "/team/team/index");
+        if (auth) this.authOption = auth.option;
+    },
+    onShow() {
+        setTimeout(() => {
+            this.$refs.List.setHeight();
+        }, 300)
     },
     onUnload() {
         delete this.$Http.uploadStoreDetail;
@@ -131,6 +139,19 @@ export default {
             }).then(res => {
                 console.log("店铺详情", res)
                 if (this.cutoff(res.msg)) return;
+
+                switch (res.data.status) {
+                    case '提交':
+                        res.data.color = '#009270'
+                        break;
+                    case '审核':
+                        res.data.color = '#095DE0'
+                        break;
+                    default:
+                        res.data.color = '#333333'
+                        break;
+                }
+
                 res.data.cover = res.data.attinfos.length ? this.getSpecifiedImage(res.data.attinfos[0], 'compressed') || uni.getStorageSync("site").logo : uni.getStorageSync("site").logo
                 this.detail = res.data;
                 this.showList = [{
@@ -451,6 +472,7 @@ export default {
         font-weight: 500;
         font-size: 16px;
         color: #FFFFFF;
+        margin-left: 10px;
     }
 
 

+ 1 - 0
store/insert/store.vue

@@ -169,6 +169,7 @@ export default {
         interrupt(item, selected, index) {
             switch (item.key) {
                 case "leader_hrid":
+                    console.log(selected)
                     item.showValue = [selected.name];
                     item.value = [selected.sys_enterprise_hrid];
                     this.$refs.form.setItem(index, item)

+ 70 - 4
team/team/modules/store.vue

@@ -1,7 +1,12 @@
 <template>
-    <view class="">
+    <view>
         <view class="search-box">
-            <My_search background="#fff" @onSearch="onSearch" />
+            <My_search background="#fff" @onSearch="onSearch">
+                <view class="filtration-but" @click="openFiltrate">
+                    筛选
+                    <text class="iconfont icon-shaixuan" />
+                </view>
+            </My_search>
         </view>
         <view class="head">
             <text>
@@ -11,7 +16,7 @@
                 共{{ total }}个
             </text>
         </view>
-
+        <filtrate ref="Filtrate" :filtrateList="filtrateList" @onFiltration="onFiltration" />
         <My_listbox ref="List" @getlist="getList" bottomHeight="70">
             <store-list ref="storeList" :list="list" @onClick="onClick" />
         </My_listbox>
@@ -38,13 +43,59 @@ export default {
             },
             total: 0,
             list: [],
-            uninitialized: true
+            uninitialized: true,
+            filtrateList: []
         }
     },
     methods: {
         init() {
             this.getList(true)
         },
+        openFiltrate() {
+            if (this.filtrateList.length == 0) {
+                Promise.all(['storetype'].map(v => this.getCustomClass(v))).then(res => {
+                    let filtrateList = [{
+                        title: "状态",
+                        key: 'status',
+                        showKey: "remarks",
+                        selected: "value",
+                        value: "",
+                        defaultVal: "",
+                        rang: [{ remarks: "新建", value: "新建" }, { remarks: "提交", value: "提交" }, { remarks: "审核", value: "审核" },],
+                    }, {
+                        title: "门店类型",
+                        key: 'storetype',
+                        showKey: "remarks",
+                        selected: "value",
+                        value: "",
+                        defaultVal: "",
+                        rang: [{ remarks: "直营", value: "直营" }, { remarks: "分销", value: "分销" }],
+                    }, {
+                        title: "门店卖场类型",
+                        key: 'markettype',
+                        showKey: "remarks",
+                        selected: "value",
+                        value: "",
+                        defaultVal: "",
+                        rang: res[0],
+                    }]
+                    this.filtrateList = filtrateList.map(v => {
+                        v.rang.unshift({ remarks: "全部", value: "" })
+                        return v
+                    })
+                    this.$refs.Filtrate.changeShow();
+                })
+            } else {
+                this.$refs.Filtrate.changeShow();
+            }
+        },
+        onFiltration(where) {
+            this.content.where = {
+                condition: this.content.where.condition,
+                ...where
+            };
+            this.getList(true);
+        },
         getList(init = false) {
             if (this.paging(this.content, init)) return;
             this.$Http.basic({
@@ -94,9 +145,24 @@ export default {
 
 <style lang="scss" scoped>
 .search-box {
+
     margin-top: 10px;
     padding: 0 10px;
     box-sizing: border-box;
+
+    .filtration-but {
+        display: flex;
+        align-items: center;
+        font-family: PingFang SC, PingFang SC;
+        font-size: 14px;
+        color: #333333;
+        padding-left: 10px;
+
+        text {
+            color: #DDDDDD !important;
+            margin-left: 5px;
+        }
+    }
 }
 
 .head {

+ 2 - 2
team/team/modules/storeList.vue

@@ -6,10 +6,10 @@
             <view class="content">
                 <view class="left">
                     <view class="tag-box">
-                        <view class="storetype">
+                        <view v-if="item.storetype" class="storetype">
                             {{ item.storetype }}
                         </view>
-                        <view class="markettype">
+                        <view v-if="item.markettype" class="markettype">
                             {{ item.markettype }}
                         </view>
                     </view>

+ 1 - 1
team/userCenter/selectUser.vue

@@ -30,7 +30,7 @@ export default {
         getList(init = false) {
             if (this.paging(this.content, init)) return;
             this.$Http.basic({
-                "id": "20240410095602",
+                "id": "20240410142002",
                 content: this.content
             }).then(res => {
                 console.log("选择负责人", res)