xiaohaizhao 1 gadu atpakaļ
vecāks
revīzija
720042716e

+ 17 - 16
components/My_listbox.vue

@@ -5,19 +5,24 @@
             :style="{ height: (defaultHeight - 0 || height - 0) + 'px' }" :triggered='true'
             @refresherrefresh='pullToRefresh' :scroll-into-view="scrollIntoView" :lower-threshold='300'
             :scroll-with-animation="true" @scrolltolower='loadThePage'>
-            <view id="header">
-                <slot />
+            <view v-if="isShowEmpty && empty"
+                style="display: flex;align-items: center;width: 100vw;justify-content: center;"
+                :style="{ height: (defaultHeight - 0 || height - 0) + 'px' }">
+                <view :style="{ marginTop: '-' + tovw(bottomHeight) }">
+                    <u-empty :mode="mode" text="暂无数据" />
+                </view>
             </view>
-            <view v-if="isShowEmpty && empty">
-                <view :style="{ height: tovw(occupyHeight) }" />
-                <u-empty :mode="mode" text="暂无数据" />
-            </view>
-            <view id="bottom" />
-            <view v-if="pagingText" class="paging">
-                {{ pagingText }}
-            </view>
-            <u-divider v-if="bottomTips" text="已经到底部" :dashed="true"></u-divider>
-            <view v-if="bottomHeight" :style="{ height: tovw(bottomHeight) }" />
+            <block v-else>
+                <view id="header">
+                    <slot />
+                </view>
+                <view id="bottom" />
+                <view v-if="pagingText" class="paging">
+                    {{ pagingText }}
+                </view>
+                <u-divider v-if="bottomTips" text="已经到底部" :dashed="true" />
+                <view v-if="bottomHeight" :style="{ height: tovw(bottomHeight) }" />
+            </block>
         </scroll-view>
     </view>
 </template>
@@ -39,10 +44,6 @@ export default {
             type: Boolean,
             default: true
         },
-        occupyHeight: {
-            type: Number,
-            default: 50
-        },
         boxBackground: {
             type: String,
             default: ""

+ 119 - 0
components/displayCell.vue

@@ -0,0 +1,119 @@
+<template>
+    <view>
+        <view class="head">
+            <view class="label">
+                基本信息
+            </view>
+            <view class="content">
+                仅显示已填信息<text style="padding: 0 2.5px;" /> <u-switch activeColor="#C40C24" v-model="unShowAll" />
+            </view>
+        </view>
+        <view style="padding-left: 10px;background-color: #fff;" v-for="item in showList" :key="item.key"
+            hover-class="navigator-hover" @click="onClick(item)">
+            <view class="item" v-if="!unShowAll || detail[item.key] || item.value">
+                <view class="content">
+                    <view class="label">
+                        {{ item.label }}:
+                    </view>
+                    <view class="value">
+                        {{ detail[item.key] || item.value || '--' }}
+                    </view>
+                </view>
+            </view>
+        </view>
+    </view>
+</template>
+
+<script>
+export default {
+    props: {
+        showList: {
+            type: Array
+        },
+        detail: {
+            type: Object
+        }
+    },
+    data() {
+        return {
+            unShowAll: false,
+        }
+    },
+    methods: {
+        onClick(item) {
+            if (!item.funName) return;
+            switch (item.funName) {
+                case 'callPhone':
+                    if (this.detail[item.key] || item.value) this.callPhone(this.detail[item.key] || item.value)
+                    break;
+            }
+        }
+    },
+}
+</script>
+
+<style lang="scss" scoped>
+.head {
+    display: flex;
+    align-items: center;
+    justify-content: space-between;
+    width: 100vw;
+    height: 45px;
+    background: #F7F7F7;
+    padding: 0 10px;
+    box-sizing: border-box;
+
+    .label {
+        font-family: PingFang SC, PingFang SC;
+        font-weight: bold;
+        font-size: 15px;
+        color: #333333;
+        line-height: 22px;
+    }
+
+    .content {
+        display: flex;
+        align-items: center;
+        font-family: PingFang SC, PingFang SC;
+        font-size: 14px;
+        color: #999999;
+    }
+}
+
+.item {
+    width: 100%;
+    box-sizing: border-box;
+    border-bottom: 0.5px solid #ddd;
+
+    .content {
+        display: flex;
+        width: 100%;
+        padding: 15px 0;
+        padding-right: 10px;
+        box-sizing: border-box;
+        border-bottom: 0.5px solid #F2F2F2;
+
+        .label {
+            width: 100px;
+            margin-right: 10px;
+            line-height: 20px;
+            font-family: Source Han Sans SC, Source Han Sans SC;
+            font-size: 14px;
+            color: #666666;
+            flex-shrink: 0;
+        }
+
+        .value {
+            flex: 1;
+            line-height: 20px;
+            font-family: Source Han Sans SC, Source Han Sans SC;
+            font-size: 14px;
+            color: #333333;
+        }
+    }
+
+    .content:last-child {
+        border-bottom: 0;
+    }
+}
+</style>

+ 2 - 1
main.js

@@ -27,7 +27,8 @@ import My_upload from './components/my-upload.vue';
 Vue.component("My_upload", My_upload);
 import bottomForm from './components/bottomForm.vue';
 Vue.component("bottomForm", bottomForm);
-
+import displayCell from './components/displayCell.vue';
+Vue.component("displayCell", displayCell);
 
 //挂载接口
 let isDev = process.env.NODE_ENV === 'development';

+ 4 - 0
pages.json

@@ -124,6 +124,10 @@
 			"path": "userCenter/insert"
 		}, {
 			"path": "userCenter/selectUser"
+		}, {
+			"path": "agency/detail"
+		}, {
+			"path": "agency/check"
 		}]
 	}, {
 		"root": "select",

+ 207 - 13
select/store/store.vue

@@ -1,19 +1,63 @@
 <template>
     <view>
-        <My_listbox ref="List" @getlist="getList" boxBackground="#fff">
-            <view class="list-box">
-                <navigator class="item" v-for="item in list" :key="item.sat_coursewareid"
-                    :url="'/packageA/course/list?id=' + item.sat_coursewareid">
-                    <image class="image" :src="item.cover" mode="aspectFill" lazy-load="true" />
-                    <view class="text">
-                        <view class="title u-line-1">{{ item.title || '--' }}</view>
-                        <view class="teacher u-line-1">讲师:{{ item.teacher || '--' }}</view>
-                        <view class="count u-line-1">共{{ item.courseware_count || 0 }}个课件 | {{ item.study_count || 0 }}人已学习
+        <view class="head">
+            请选择门店
+        </view>
+
+        <My_listbox ref="List" @getlist="getList" bottomHeight="70">
+            <view class="item" v-for="item in list" hover-class="navigator-hover" @click="selectItem(item)"
+                :key="item.sa_storeid">
+                <checkbox :checked="selectList.some(v => v == item.sa_storeid)" color="#3874F6"
+                    style="transform:scale(0.7)" />
+                <view style="flex:1">
+                    <view class="title u-line-1">{{ item.storename || '' }}</view>
+                    <view class="content">
+                        <view class="left">
+                            <view class="tag-box">
+                                <view class="storetype">
+                                    {{ item.storetype }}
+                                </view>
+                                <view class="markettype">
+                                    {{ item.markettype }}
+                                </view>
+                            </view>
+                            <view class="row">
+                                <text class="iconfont icon-renyuan-hui" />
+                                <text>
+                                    {{ item.name }}
+                                </text>
+                                <text style="margin-left: 5px;">
+                                    {{ item.phonenumber }}
+                                </text>
+                            </view>
+                            <view class="row">
+                                <text class="iconfont icon-dizhi-hui1" />
+                                {{ getCity(item) }}
+                            </view>
+                            <view class="row">
+                                状态:<text :style="{ color: item.color }">{{ item.status }}</text>
+                            </view>
+                        </view>
+                        <view class="right">
+                            <u--image :src="item.cover" :width="tovw(100)" :height="tovw(100)" radius="5">
+                                <template v-slot:loading>
+                                    <u-loading-icon color="red"></u-loading-icon>
+                                </template>
+                            </u--image>
                         </view>
                     </view>
-                </navigator>
+                </view>
             </view>
         </My_listbox>
+
+        <view class="footer">
+            <view class="total">
+                已选:{{ selectList.length }}
+            </view>
+            <view class="confirm" :class="selectList.length ? '' : 'forbidden'" @click="selectList.length ? submit() : ''">
+                确定
+            </view>
+        </view>
     </view>
 </template>
 
@@ -28,10 +72,11 @@ export default {
                     "storetype": "",
                     "status": ""
                 }
-            }
+            },
+            selectList: [],
+            results: [],
         }
     },
-
     onLoad() {
         this.getList()
         uni.setNavigationBarTitle({
@@ -48,12 +93,161 @@ export default {
                 this.$refs.List.RefreshToComplete()
                 console.log("获取门店列表", res)
                 if (this.cutoff(res.msg)) return;
+                res.data = res.data.map(v => {
+                    v.cover = v.attinfos.length ? this.getSpecifiedImage(v.attinfos[0], 'compressed') || uni.getStorageSync("site").logo : uni.getStorageSync("site").logo
+                    switch (v.status) {
+                        case '提交':
+                            v.color = '#009270'
+                            break;
+                        case '审核':
+                            v.color = '#095DE0'
+                            break;
+                        default:
+                            v.color = '#333333'
+                            break;
+                    }
+                    return v
+                })
                 this.list = res.pageNumber == 1 ? res.data : this.list.concat(res.data);
                 this.content = this.$refs.List.paging(this.content, res)
             })
         },
+        selectItem(item) {
+            let index = this.selectList.findIndex(v => v == item.sa_storeid);
+            if (index == -1) {
+                this.selectList.push(item.sa_storeid)
+                this.results.push(item)
+            } else {
+                this.selectList.splice(index, 1);
+                this.results.splice(index, 1);
+            }
+        },
+        submit() {
+            this.$Http.routeSelected({
+                value: this.selectList,
+                showValue: this.results.map(v => v.storename)
+            })
+        }
     },
+
 }
 </script>
 
-<style></style>
+<style lang="scss" scoped>
+.head {
+    line-height: 17px;
+    font-family: Source Han Sans SC, Source Han Sans SC;
+    font-size: 12px;
+    color: #666666;
+    padding: 10px;
+}
+
+.item {
+    width: 100vw;
+    background: #FFFFFF;
+    padding: 10px;
+    box-sizing: border-box;
+    margin-bottom: 10px;
+    display: flex;
+    align-items: center;
+
+    .title {
+        line-height: 24px;
+        font-family: Source Han Sans SC, Source Han Sans SC;
+        font-weight: bold;
+        font-size: 16px;
+        color: #333333;
+    }
+
+    .content {
+        position: relative;
+        width: 100%;
+
+        .left {
+            width: 220px;
+
+            .tag-box {
+                display: flex;
+
+                .storetype,
+                .markettype {
+                    font-family: Source Han Sans SC, Source Han Sans SC;
+                    font-size: 12px;
+                    color: #FFFFFF;
+                    height: 24px;
+                    line-height: 24px;
+                    padding: 0 4px;
+                    border-radius: 2px;
+                    margin-top: 5px;
+                }
+
+                .storetype {
+                    background: #095DE0;
+                }
+
+                .markettype {
+                    background: #FC9228;
+                    margin-left: 5px;
+                }
+            }
+
+            .row {
+                line-height: 17px;
+                font-family: Source Han Sans SC, Source Han Sans SC;
+                font-size: 12px;
+                color: #888888;
+                margin-top: 5px;
+
+                .iconfont {
+                    margin-right: 5px;
+                    font-size: 12px;
+                }
+            }
+        }
+
+        .right {
+            position: absolute;
+            right: 0;
+            bottom: 0;
+        }
+
+    }
+}
+
+.footer {
+    position: fixed;
+    bottom: 0;
+    width: 100vw;
+    height: 65px;
+    background: #FFFFFF;
+    box-shadow: 0px -2px 6px 1px rgba(0, 0, 0, 0.16);
+    box-sizing: border-box;
+    padding: 5px 10px;
+    display: flex;
+    justify-content: space-between;
+
+    .total {
+        line-height: 45px;
+        font-family: PingFang SC, PingFang SC;
+        font-size: 14px;
+        color: #333333;
+    }
+
+    .confirm {
+        display: flex;
+        align-items: center;
+        justify-content: center;
+        width: 112px;
+        height: 45px;
+        background: #C30D23;
+        border-radius: 5px;
+        font-family: PingFang SC, PingFang SC;
+        font-size: 14px;
+        color: #FFFFFF;
+    }
+
+    .forbidden {
+        opacity: .6;
+    }
+}
+</style>

+ 296 - 3
store/center/detail.vue

@@ -1,16 +1,309 @@
 <template>
     <view>
-        门店详情
+        <view class="head">
+            <view class="title u-line-1">{{ detail.storename || '' }}</view>
+            <view class="content">
+                <view class="left">
+                    <view class="tag-box">
+                        <view class="storetype">
+                            {{ detail.storetype }}
+                        </view>
+                        <view class="markettype">
+                            {{ detail.markettype }}
+                        </view>
+                    </view>
+                    <view class="row">
+                        <text class="iconfont icon-renyuan-hui" />
+                        <text>
+                            {{ detail.name }}
+                        </text>
+                        <text style="margin-left: 5px;">
+                            {{ detail.phonenumber }}
+                        </text>
+                    </view>
+                    <view class="row">
+                        <text class="iconfont icon-dizhi-hui1" />
+                        {{ getCity(detail) }}
+                    </view>
+                    <view class="row">
+                        状态:<text style="color: #333333;">{{ detail.status }}</text>
+                    </view>
+                </view>
+                <view class="right">
+                    <u--image :src="detail.cover" :width="tovw(100)" :height="tovw(100)" radius="5">
+                        <template v-slot:loading>
+                            <u-loading-icon color="red"></u-loading-icon>
+                        </template>
+                    </u--image>
+                </view>
+            </view>
+        </view>
+        <u-tabs :scrollable="false" lineColor="#C30D23" :activeStyle="{ color: '#C30D23', fontWeight: 'bold' }" :list="tabs"
+            @click="changeCurrent" :current="current" />
+        <view v-show="current == 0">
+            <displayCell :showList="showList" :detail="detail" />
+        </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>
+        </block>
+        <view v-else style="height: 30px;" />
     </view>
 </template>
 
 <script>
 export default {
+    data() {
+        return {
+            current: 0,
+            sa_storeid: 0,
+            detail: {},
+            tabs: [{ name: "门店详情" }, { name: "门店人员" }],
+            showList: []
+
+        }
+    },
     onLoad(options) {
         console.log(options)
-    }
+        this.sa_storeid = options.id;
+        this.getDetail();
+        uni.setNavigationBarTitle({
+            title: '门店信息'
+        });
+    },
+    onUnload() {
+        delete this.$Http.uploadStoreDetail;
+    },
+    methods: {
+        getDetail() {
+            this.$Http.basic({
+                "id": "20240410095402",
+                "content": {
+                    "sa_storeid": this.sa_storeid
+                }
+            }).then(res => {
+                console.log("店铺详情", res)
+                if (this.cutoff(res.msg)) return;
+                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 = [{
+                    label: "门店名称",
+                    key: "storename"
+                }, {
+                    label: "面积(m²)",
+                    key: "area"
+                }, {
+                    label: "负责人",
+                    key: "name"
+                }, {
+                    label: "负责人电话",
+                    key: "phonenumber",
+                    funName: "callPhone"
+                }, {
+                    label: "负责人账号",
+                    key: "accountno"
+                }, {
+                    label: "门店售前电话",
+                    key: "sale_phonenmber",
+                    funName: "callPhone"
+                }, {
+                    label: "门店售后电话",
+                    key: "service_phonenmber",
+                    funName: "callPhone"
+                }, {
+                    label: "门店类型",
+                    key: 'storetype'
+                }, {
+                    label: "卖场类型",
+                    key: "markettype"
+                }, {
+                    label: "门店地址",
+                    value: this.getCity(res.data)
+                }, {
+                    label: "所属经销商",
+                    key: "enterprisename"
+                },]
+            })
+        },
+        toEdit() {
+            this.$Http.uploadStoreDetail = this.getDetail.bind(this);
+            uni.navigateTo({
+                url: "/store/insert/store?title=编辑门店信息&data=" + JSON.stringify(this.detail)
+            })
+        },
+        submit() {
+            let that = this;
+            uni.showModal({
+                title: '提交门店信息',
+                content: '是否确定提交门店信息?',
+                success: function ({ confirm }) {
+                    if (confirm) that.$Http.basic({
+                        "id": "20240410110302",
+                        "content": {
+                            "sa_storeid": that.detail.sa_storeid
+                        }
+                    }).then(res => {
+                        console.log('提交门店信息', res)
+                        if (that.cutoff(res.msg, '提交成功!')) return;
+                        that.$Http.uploadStoreList && that.$Http.uploadStoreList();
+                        that.getDetail();
+                    })
+                }
+            });
+        },
+        revocation() {
+            let that = this;
+            uni.showModal({
+                title: '提交门店信息',
+                content: '是否确定撤回提交门店信息?',
+                success: function ({ confirm }) {
+                    if (confirm) that.$Http.basic({
+                        "id": "20240410110802",
+                        "content": {
+                            "sa_storeid": that.detail.sa_storeid
+                        }
+                    }).then(res => {
+                        console.log('撤回提交门店信息', res)
+                        if (that.cutoff(res.msg, '撤回提交成功!')) return;
+                        that.$Http.uploadStoreList && that.$Http.uploadStoreList();
+                        that.getDetail();
+                    })
+                }
+            });
+        },
+        changeCurrent({ index }) {
+            this.current = index;
+        }
+    },
 
 }
 </script>
 
-<style></style>
+<style lang="scss" scoped>
+.head {
+    width: 100vw;
+    background: #FFFFFF;
+    border-radius: 8px;
+    padding: 10px;
+    box-sizing: border-box;
+    margin-bottom: 10px;
+
+    .title {
+        line-height: 24px;
+        font-family: Source Han Sans SC, Source Han Sans SC;
+        font-weight: bold;
+        font-size: 16px;
+        color: #333333;
+    }
+
+    .content {
+        position: relative;
+
+        .left {
+            width: 220px;
+
+            .tag-box {
+                display: flex;
+
+                .storetype,
+                .markettype {
+                    font-family: Source Han Sans SC, Source Han Sans SC;
+                    font-size: 12px;
+                    color: #FFFFFF;
+                    height: 24px;
+                    line-height: 24px;
+                    padding: 0 4px;
+                    border-radius: 2px;
+                    margin-top: 5px;
+                }
+
+                .storetype {
+                    background: #095DE0;
+                }
+
+                .markettype {
+                    background: #FC9228;
+                    margin-left: 5px;
+                }
+            }
+
+            .row {
+                line-height: 17px;
+                font-family: Source Han Sans SC, Source Han Sans SC;
+                font-size: 12px;
+                color: #888888;
+                margin-top: 5px;
+
+                .iconfont {
+                    margin-right: 5px;
+                    font-size: 12px;
+                }
+            }
+        }
+
+        .right {
+            position: absolute;
+            right: 0;
+            bottom: 0;
+        }
+
+    }
+}
+
+
+.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;
+
+    .insert {
+        display: flex;
+        align-items: center;
+        justify-content: center;
+        width: 168px;
+        height: 45px;
+        background: #FFFFFF;
+        border-radius: 5px;
+        border: 1px solid #999999;
+        font-family: PingFang SC, PingFang SC;
+        font-size: 16px;
+        color: #666666;
+        box-sizing: border-box;
+    }
+
+    .invite {
+        display: flex;
+        align-items: center;
+        justify-content: center;
+        width: 177px;
+        height: 45px;
+        background: #C30D23;
+        border-radius: 5px;
+        font-family: PingFang SC, PingFang SC;
+        font-weight: 500;
+        font-size: 16px;
+        color: #FFFFFF;
+    }
+
+
+    .forbidden {
+        opacity: .6;
+    }
+}
+</style>

+ 65 - 40
store/insert/store.vue

@@ -16,6 +16,7 @@
 </template>
 
 <script>
+import { formattedFiles } from "../../utils/settleFiles"
 export default {
     data() {
         return {
@@ -25,11 +26,12 @@ export default {
             loading: false,
         }
     },
-    async onLoad() {
+    async onLoad(options) {
+        console.log(options)
         uni.setNavigationBarTitle({
-            title: '新增门店'
+            title: options.title || '新增门店'
         });
-        this.form = [{
+        let form = [{
             key: "storename",
             type: "text",
             label: "门店名称",
@@ -122,6 +124,35 @@ export default {
             maxCount: 1,
             value: []
         }];
+
+        if (options.data) {
+            let data = JSON.parse(options.data);
+            this.sa_storeid = data.sa_storeid;
+            form = form.map(v => {
+                switch (v.key) {
+                    case 'leader_hrid':
+                        v.value = [data.leader_hrid]
+                        v.showValue = [data.name]
+                        break;
+                    case 'selectMap':
+                        v.value = {}
+                        v.keys.forEach(key => {
+                            v.value[key] = data[key]
+                        })
+                        v.showValue = [this.getCity(data)]
+                        break;
+                    case 'attachmentids':
+                        v.value = formattedFiles(data.attinfos);
+                        break;
+                    default:
+                        v.value = data[v.key] || ''
+                        break;
+                }
+                return v
+            })
+        }
+
+        this.form = form;
     },
     methods: {
         isUncomplete(uncomplete) {
@@ -136,9 +167,6 @@ export default {
             }
         },
         interrupt(item, selected, index) {
-            console.log(item)
-            console.log(selected)
-            console.log(index)
             switch (item.key) {
                 case "leader_hrid":
                     item.showValue = [selected.name];
@@ -147,12 +175,11 @@ export default {
                     this.$refs.form.setValue(index + 1, selected.phonenumber, true)
                     break;
                 case "selectMap":
-                    item.showValue = [selected.name];
+                    item.showValue = [this.getCity(selected)];
                     item.value = selected;
                     this.$refs.form.setItem(index, item, true)
                     break;
             }
-
         },
         submit() {
             this.loading = true;
@@ -186,41 +213,38 @@ export default {
                         }
                     })
                     this.loading = false;
-                    uni.showModal({
-                        title: '创建成功',
-                        content: '门店新增成功!是否立即前往',
-                        cancelText: '返回',
-                        confirmText: '立即前往',
-                        success: ({ confirm }) => {
-                            if (confirm) {
-                                uni.redirectTo({
-                                    url: '/store/center/detail?id=' + res.data.sa_storeid,
-                                })
-                            } else {
-                                uni.navigateBack();
-                            }
-                        },
-                    })
+                    this.$Http.uploadStoreList && this.$Http.uploadStoreList();
+                    if (this.sa_storeid == 0) {
+                        uni.showModal({
+                            title: '创建成功',
+                            content: '门店新增成功!是否立即前往',
+                            cancelText: '返回',
+                            confirmText: '立即前往',
+                            success: ({ confirm }) => {
+                                if (confirm) {
+                                    uni.redirectTo({
+                                        url: '/store/center/detail?id=' + res.data.sa_storeid,
+                                    })
+                                } else {
+                                    uni.navigateBack();
+                                }
+                            },
+                        })
+                    } else {
+                        this.$Http.uploadStoreDetail && this.$Http.uploadStoreDetail();
+                        uni.showToast({
+                            title: "编辑门店成功",
+                            icon: "none",
+                            duration: 1500,
+                            mask: true
+                        })
+                        setTimeout(() => {
+                            uni.navigateBack();
+                        }, 800)
+                    }
                 })
             })
         },
-    },
-    onShow() {
-        /*    let a11 = {
-               address: "浙江省嘉兴市南湖区望湖路585号",
-               city: "嘉兴市",
-               county: "南湖区",
-               district: "南湖区",
-               latitude: 30.74803,
-               longitude: 120.786539,
-               name: "翡翠花园",
-               province: "浙江省"
-           }
-           if (location) {
-               location.county = location.district;
-               this.location = location;
-               this.$refs.form.setValue(this.form.findIndex(v => v.label == '门店地址'), location.name || this.getCity(location))
-           } */
     }
 }
 </script>
@@ -235,6 +259,7 @@ export default {
     box-shadow: 0px -2px 6px 1px rgba(0, 0, 0, 0.16);
     box-sizing: border-box;
     padding: 5px 10px;
+    z-index: 999;
 
     .add {
         display: flex;

+ 2 - 2
store/orderForm/index.vue

@@ -4,14 +4,14 @@
             @change="changeStatus" />
         <view class="date-box">
             <view class="date" @click="openFilter">
-                <text class="iconfont icon-sousuo" />
+                <text class="iconfont icon-riqi" />
                 起始:
                 <text class="value">
                     {{ content.where.begindate_create || '' }}
                 </text>
             </view>
             <view class="date" @click="openFilter">
-                <text class="iconfont icon-sousuo" />
+                <text class="iconfont icon-riqi" />
                 结束:
                 <text class="value">
                     {{ content.where.enddate_create || '' }}

+ 124 - 0
team/agency/check.vue

@@ -0,0 +1,124 @@
+<template>
+    <view class="">
+        <view class="head">
+            <text>
+                门店审核
+            </text>
+            <text>
+                共{{ total }}个
+            </text>
+        </view>
+        <My_listbox ref="List" @getlist="getList" bottomHeight="70">
+            <store-list check ref="storeList" :list="list" @onClick="onClick" />
+        </My_listbox>
+        <view class="footer">
+            <navigator class="invite" @click="onInsert" url="/store/insert/store">
+                新增门店
+            </navigator>
+        </view>
+    </view>
+</template>
+
+<script>
+import storeList from "../team/modules/storeList.vue"
+export default {
+    components: { storeList },
+    data() {
+        return {
+            "content": {
+                "where": {
+                    "condition": ""
+                }
+            },
+            total: 0,
+            list: [],
+            uninitialized: true
+        }
+    },
+    onLoad() {
+        this.getList()
+    },
+    methods: {
+        getList(init = false) {
+            if (this.paging(this.content, init)) return;
+            this.$Http.basic({
+                "id": "20240411141602",
+                content: this.content
+            }).then(res => {
+                console.log("待审核门店列表", res)
+                this.$refs.List.RefreshToComplete()
+                if (this.cutoff(res.msg)) return;
+                this.uninitialized = false;
+                this.$refs.List.setHeight()
+                res.data = this.$refs.storeList.handleList(res.data)
+                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) {
+            this.onInsert();
+            uni.navigateTo({
+                url: '/store/center/detail?id=' + item.sa_storeid,
+            });
+        },
+        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": "20240411141602",
+                        content
+                    }).then(res => {
+                        console.log("待审核门店列表", res)
+                        if (this.cutoff(res.msg)) return;
+                        this.$refs.List.setHeight()
+                        this.list = this.$refs.storeList.handleList(res.data);
+                    })
+                }
+            }.bind(this)
+        }
+    },
+}
+</script>
+
+<style lang="scss" scoped>
+.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>

+ 24 - 0
team/agency/detail.vue

@@ -0,0 +1,24 @@
+<template>
+    <view>
+
+    </view>
+</template>
+
+<script>
+export default {
+    data() {
+        return {
+            detail: {},
+        }
+    },
+    onLoad(options) {
+        this.detail = JSON.parse(options.data);
+        
+        uni.setNavigationBarTitle({
+            title: options.title || '团队信息'
+        });
+    }
+}
+</script>
+
+<style></style>

+ 16 - 6
team/team/index.vue

@@ -1,22 +1,22 @@
 <template>
     <view>
         <u-tabs :scrollable="false" lineColor="#C30D23" :activeStyle="{ color: '#C30D23', fontWeight: 'bold' }" :list="tabs"
-            @click="changeCurrent" :current="current" />
-
+            @click="changeCurrent" />
+        <agency ref="经销商" v-show="pageNmae == '经销商'" />
         <users ref="人员" v-show="pageNmae == '人员'" />
         <store ref="门店" v-show="pageNmae == '门店'" />
     </view>
 </template>
 
 <script>
+import agency from "./modules/agency.vue"
 import users from "./modules/users.vue"
 import store from "./modules/store.vue"
 export default {
-    components: { users, store },
+    components: { users, store, agency },
     data() {
         return {
-            current: 2,
-            pageNmae: "门店",
+            pageNmae: "经销商",
             tabs: [{
                 name: '经销商',
             }, {
@@ -30,11 +30,21 @@ export default {
         uni.setNavigationBarTitle({
             title: '团队管理'
         });
+        this.changePage()
+    },
+    onUnload() {
+        delete this.$Http.uploadStoreList
+        delete this.$Http.uploadUserList
     },
     methods: {
         changeCurrent({ index, name }) {
-            this.current = index;
             this.pageNmae = name;
+            this.changePage()
+        },
+        changePage() {
+            console.log(this.pageNmae)
+            let page = this.$refs[this.pageNmae];
+            if (page.uninitialized) page.init();
         }
     },
 }

+ 190 - 0
team/team/modules/agency.vue

@@ -0,0 +1,190 @@
+<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">
+            <agency-list :boxWidth="tovw(355)" :list="list" @onClick="onClick" />
+        </My_listbox>
+        <view class="footer">
+            <navigator class="invite" style="flex: 1;" url="/team/agency/check">
+                门店信息审核
+            </navigator>
+        </view>
+    </view>
+</template>
+
+<script>
+import agencyList from "../../team/modules/agencyList"
+export default {
+    components: { agencyList },
+    data() {
+        return {
+            "content": {
+                "where": {
+                    "condition": ""
+                }
+            },
+            total: 0,
+            list: [{
+                "agentnum": "LSA皖0004",
+                "detailaddress": "",
+                "address": "",
+                "province": "",
+                "city": "",
+                "contact": "方明忠",
+                "phonenumber": "18005646075",
+                "county": "",
+                "sys_enterpriseid": 11957,
+                "enterprisename": "安徽 六安市 方明忠1",
+                "rowindex": 1
+            },
+            {
+                "agentnum": "LSA皖0013",
+                "detailaddress": "",
+                "address": "",
+                "province": "",
+                "city": "",
+                "contact": "董文",
+                "phonenumber": "15605578577",
+                "county": "",
+                "sys_enterpriseid": 11959,
+                "enterprisename": "安徽宿州董文3",
+                "rowindex": 2
+            },
+            {
+                "agentnum": "LSA鄂0003",
+                "detailaddress": "",
+                "address": "",
+                "province": "",
+                "city": "",
+                "contact": "刘春阳",
+                "phonenumber": "15972519917",
+                "county": "",
+                "sys_enterpriseid": 11979,
+                "enterprisename": "湖北崇阳 刘春阳1",
+                "rowindex": 3
+            }],
+            uninitialized: true,
+        }
+    },
+    methods: {
+        init() {
+            // this.getList(true)
+        },
+        getList(init = false) {
+            if (this.paging(this.content, init)) return;
+            this.$Http.basic({
+                "id": "20240411133702",
+                content: this.content
+            }).then(res => {
+                console.log("经销商列表", res)
+                this.$refs.List.RefreshToComplete()
+                this.$refs.List.setHeight()
+                if (this.cutoff(res.msg)) return;
+                this.uninitialized = false;
+                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/agency/detail?data=' + JSON.stringify(item)
+            });
+            this.onInsert();
+        },
+        onInsert() {
+            this.$Http.uploadUserList = function () {
+                if (this.content.pageNumber && this.content.pageNumber >= 2) {
+                    let content = this.paging(this.content, true, true)
+                    this.$Http.basic({
+                        "id": "20240410161802",
+                        content
+                    }).then(res => {
+                        console.log("更新人员列表", res)
+                        if (this.cutoff(res.msg)) return;
+                        this.$refs.List.setHeight()
+                        this.list = res.data;
+                    })
+                }
+            }.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;
+
+    .insert {
+        display: flex;
+        align-items: center;
+        justify-content: center;
+        width: 168px;
+        height: 45px;
+        background: #FFFFFF;
+        border-radius: 5px;
+        border: 1px solid #999999;
+        font-family: PingFang SC, PingFang SC;
+        font-size: 16px;
+        color: #666666;
+        box-sizing: border-box;
+    }
+
+    .invite {
+        display: flex;
+        align-items: center;
+        justify-content: center;
+        width: 177px;
+        height: 45px;
+        background: #C30D23;
+        border-radius: 5px;
+        font-family: PingFang SC, PingFang SC;
+        font-weight: 500;
+        font-size: 16px;
+        color: #FFFFFF;
+    }
+}
+</style>

+ 70 - 0
team/team/modules/agencyList.vue

@@ -0,0 +1,70 @@
+<template>
+    <view>
+        <view class="item" v-for="item in list " :key="item.sys_enterpriseid" :style="{ width: boxWidth }"
+            hover-class="navigator-hover" @click="itemClick(item)">
+            <view class="title">{{ item.enterprisename }}</view>
+            <view class="row line-1">
+                主账号:{{ item.contact }} <text style="margin-left: 5px;">{{ item.phonenumber }}</text>
+            </view>
+            <view class="row line-1">
+                区域:{{ item.areanames || '--' }}
+            </view>
+            <view class="row line-1">
+                人员数:{{ item.hrcount || 0 }}
+            </view>
+            <view class="row line-1">
+                状态:<text :style="{ color: item.status == '启动' ? '#009270' : '#E3041F' }">{{ item.status || '--' }}</text>
+            </view>
+        </view>
+    </view>
+</template>
+
+<script>
+export default {
+    props: {
+        list: {
+            type: Array,
+            default: []
+        },
+        onClick: {
+            type: Function
+        },
+        boxWidth: {
+            type: String,
+            default: '355px'
+        }
+    },
+    methods: {
+        itemClick(item) {
+            this.$emit("onClick", item)
+        }
+    },
+}
+</script>
+
+<style lang="scss" scoped>
+.item {
+    width: 100%;
+    background: #FFFFFF;
+    border-radius: 8px;
+    padding: 10px;
+    margin: 0 auto 10px;
+    box-sizing: border-box;
+
+    .title {
+        line-height: 24px;
+        font-family: Source Han Sans SC, Source Han Sans SC;
+        font-weight: bold;
+        font-size: 16px;
+        color: #333333;
+    }
+
+    .row {
+        line-height: 17px;
+        font-family: Source Han Sans SC, Source Han Sans SC;
+        font-size: 12px;
+        color: #888888;
+        margin-top: 5px;
+    }
+}
+</style>

+ 13 - 14
team/team/modules/store.vue

@@ -13,7 +13,7 @@
         </view>
 
         <My_listbox ref="List" @getlist="getList" bottomHeight="70">
-            <user-list :list="list" @onClick="onClick" />
+            <store-list ref="storeList" :list="list" @onClick="onClick" />
         </My_listbox>
 
         <view class="footer">
@@ -21,13 +21,14 @@
                 新增门店
             </navigator>
         </view>
+
     </view>
 </template>
 
 <script>
-import userList from "../modules/userList"
+import storeList from "../modules/storeList"
 export default {
-    components: { userList },
+    components: { storeList },
     data() {
         return {
             "content": {
@@ -36,12 +37,10 @@ export default {
                 }
             },
             total: 0,
-            list: []
+            list: [],
+            uninitialized: true
         }
     },
-    created() {
-        this.init()
-    },
     methods: {
         init() {
             this.getList(true)
@@ -55,18 +54,18 @@ export default {
                 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.uninitialized = false;
+                this.$refs.List.setHeight()
+                res.data = this.$refs.storeList.handleList(res.data)
                 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) {
+            this.onInsert();
             uni.navigateTo({
-                url: '/team/userCenter/personal?id=' + item.sys_enterprise_hrid
+                url: '/store/center/detail?id=' + item.sa_storeid,
             });
         },
         onInsert() {
@@ -79,8 +78,8 @@ export default {
                     }).then(res => {
                         console.log("更新门店列表", res)
                         if (this.cutoff(res.msg)) return;
-                        this.list = res.data;
-                        delete this.$Http.uploadStoreList
+                        this.$refs.List.setHeight()
+                        this.list = this.$refs.storeList.handleList(res.data);
                     })
                 }
             }.bind(this)

+ 154 - 0
team/team/modules/storeList.vue

@@ -0,0 +1,154 @@
+<template>
+    <view>
+        <view class="item" v-for="item in list" :key="item.sa_storeid" hover-class="navigator-hover"
+            @click="itemClick(item)">
+            <view class="title u-line-1">{{ item.storename || '' }}</view>
+            <view class="content">
+                <view class="left">
+                    <view class="tag-box">
+                        <view class="storetype">
+                            {{ item.storetype }}
+                        </view>
+                        <view class="markettype">
+                            {{ item.markettype }}
+                        </view>
+                    </view>
+                    <view class="row">
+                        <text class="iconfont icon-renyuan-hui" />
+                        <text>
+                            {{ item.name }}
+                        </text>
+                        <text style="margin-left: 5px;">
+                            {{ item.phonenumber }}
+                        </text>
+                    </view>
+                    <view class="row">
+                        <text class="iconfont icon-dizhi-hui1" />
+                        {{ getCity(item) }}
+                    </view>
+                    <view class="row">
+                        状态:<text :style="{ color: item.color }">{{ item.status }}</text>
+                    </view>
+                </view>
+                <view class="right">
+                    <u--image :src="item.cover" :width="tovw(100)" :height="tovw(100)" radius="5">
+                        <template v-slot:loading>
+                            <u-loading-icon color="red"></u-loading-icon>
+                        </template>
+                    </u--image>
+                </view>
+            </view>
+        </view>
+    </view>
+</template>
+
+<script>
+export default {
+    name: "storeList",
+    props: {
+        list: {
+            type: Array
+        },
+        onClick: {
+            type: Function
+        },
+        check: {
+            type: Boolean
+        }
+    },
+    methods: {
+        handleList(list) {
+            return list.map(v => {
+                v.cover = v.attinfos.length ? this.getSpecifiedImage(v.attinfos[0], 'compressed') || uni.getStorageSync("site").logo : uni.getStorageSync("site").logo
+                switch (v.status) {
+                    case '提交':
+                        v.color = '#009270'
+                        break;
+                    case '审核':
+                        v.color = '#095DE0'
+                        break;
+                    default:
+                        v.color = '#333333'
+                        break;
+                }
+                return v
+            })
+        },
+        itemClick(item) {
+            this.$emit("onClick", item)
+        }
+    },
+}
+</script>
+
+<style lang="scss" scoped>
+.item {
+    width: 355px;
+    background: #FFFFFF;
+    border-radius: 8px;
+    padding: 10px;
+    box-sizing: border-box;
+    margin: 0 auto 10px;
+
+    .title {
+        line-height: 24px;
+        font-family: Source Han Sans SC, Source Han Sans SC;
+        font-weight: bold;
+        font-size: 16px;
+        color: #333333;
+    }
+
+    .content {
+        position: relative;
+
+        .left {
+            width: 220px;
+
+            .tag-box {
+                display: flex;
+
+                .storetype,
+                .markettype {
+                    font-family: Source Han Sans SC, Source Han Sans SC;
+                    font-size: 12px;
+                    color: #FFFFFF;
+                    height: 24px;
+                    line-height: 24px;
+                    padding: 0 4px;
+                    border-radius: 2px;
+                    margin-top: 5px;
+                }
+
+                .storetype {
+                    background: #095DE0;
+                }
+
+                .markettype {
+                    background: #FC9228;
+                    margin-left: 5px;
+                }
+            }
+
+            .row {
+                line-height: 17px;
+                font-family: Source Han Sans SC, Source Han Sans SC;
+                font-size: 12px;
+                color: #888888;
+                margin-top: 5px;
+
+                .iconfont {
+                    margin-right: 5px;
+                    font-size: 12px;
+                }
+            }
+        }
+
+        .right {
+            position: absolute;
+            right: 0;
+            bottom: 0;
+        }
+
+    }
+}
+</style>

+ 6 - 5
team/team/modules/users.vue

@@ -39,12 +39,10 @@ export default {
                 }
             },
             total: 0,
-            list: []
+            list: [],
+            uninitialized: true,
         }
     },
-    created() {
-        this.init()
-    },
     methods: {
         init() {
             this.getList(true)
@@ -57,7 +55,9 @@ export default {
             }).then(res => {
                 console.log("人员列表", res)
                 this.$refs.List.RefreshToComplete()
+                this.$refs.List.setHeight()
                 if (this.cutoff(res.msg)) return;
+                this.uninitialized = false;
                 /*     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
@@ -71,6 +71,7 @@ export default {
             uni.navigateTo({
                 url: '/team/userCenter/personal?id=' + item.sys_enterprise_hrid
             });
+            this.onInsert();
         },
         onInsert() {
             this.$Http.uploadUserList = function () {
@@ -82,8 +83,8 @@ export default {
                     }).then(res => {
                         console.log("更新人员列表", res)
                         if (this.cutoff(res.msg)) return;
+                        this.$refs.List.setHeight()
                         this.list = res.data;
-                        delete this.$Http.uploadUserList
                     })
                 }
             }.bind(this)

+ 101 - 33
team/userCenter/insert.vue

@@ -1,7 +1,16 @@
 <template>
     <view>
-        <my_form ref="form" :form="form" @isUncomplete="isUncomplete" requiredFieldOnly />
-
+        <my_form ref="form" :form="form" @isUncomplete="isUncomplete" @interrupt="interrupt" requiredFieldOnly />
+        <view style="height: 70px;" />
+        <view class="footer">
+            <view class="add" @click="uncomplete || loading ? '' : submit()" :class="uncomplete ? 'forbidden' : ''"
+                hover-class=" navigator-hover">
+                <u-loading-icon v-if="loading" />
+                <block v-else>
+                    提交
+                </block>
+            </view>
+        </view>
     </view>
 </template>
 
@@ -10,12 +19,15 @@ export default {
     data() {
         return {
             sys_enterprise_hrid: 0,
-            form: []
+            form: [],
+            uncomplete: true,
+            loading: false,
         }
     },
-    async onLoad() {
+    async onLoad(options) {
+        console.log(options)
         uni.setNavigationBarTitle({
-            title: '新增人员'
+            title: options.title || '新增人员'
         });
         let form = [{
             key: "name",
@@ -66,16 +78,44 @@ export default {
             value: [],
             showValue: [],
         }];
+
+        if (options.data) {
+            let data = JSON.parse(options.data);
+            console.log(data)
+            this.sys_enterprise_hrid = data.sys_enterprise_hrid;
+            form = form.map(v => {
+                switch (v.key) {
+                    case 'sa_storeids':
+                        v.showValue = data.storenames ? data.storenames.split(",") : []
+                        v.value = data.sa_storeids || []
+                        break;
+                    default:
+                        v.value = data[v.key] || ''
+                        break;
+                }
+                return v
+            })
+        }
         this.form = form;
     },
     methods: {
         isUncomplete(uncomplete) {
             this.uncomplete = uncomplete;
         },
+        interrupt(item, selected, index) {
+            switch (item.key) {
+                case "sa_storeids":
+                    item.showValue = selected.showValue || [];
+                    item.value = selected.value || [];
+                    this.$refs.form.setItem(index, item, true)
+                    break;
+            }
+        },
         submit() {
             this.loading = true;
             let that = this;
             this.$refs.form.submit().then(data => {
+                data.sa_storeids = data.sa_storeids.value
                 this.$Http.basic({
                     "id": 20240410164102,
                     "content": {
@@ -87,36 +127,35 @@ export default {
                     console.log("加入团队", res)
                     if (this.cutoff(res.msg)) return;
                     this.loading = true;
-                    if (this.attachmentids.length) {
-                        this.uploadCallback(this.attachmentids, "sys_users", this.userid).then(s => {
-                            if (s) getUserMsg()
-                        });
-                        if (this.headportraits.length) this.$Http.basic({
-                            "classname": "system.attachment.Attachment",
-                            "method": "deleteFileLink",
-                            "content": {
-                                linksids: this.headportraits.map(v => v.linksid)
-                            }
-                        })
-                    } else {
-                        getUserMsg()
-                    }
-                    function getUserMsg() {
-                        that.$Http.wechatLogin().then(token => {
-                            that.loading = false;
-                            uni.showModal({
-                                title: '提示',
-                                content: '成功加入团队',
-                                showCancel: false,
-                                confirmText: '确定',
-                                confirmColor: '#C40C24',
-                                success: ({ confirm }) => {
-                                    if (confirm) uni.redirectTo({
-                                        url: '/pages/index/index',
+
+                    this.$Http.uploadUserList && this.$Http.uploadUserList();
+                    if (this.sys_enterprise_hrid == 0) {
+                        uni.showModal({
+                            title: '新增成功',
+                            content: '人员新增成功!是否立即查看',
+                            cancelText: '返回',
+                            confirmText: '查看',
+                            success: ({ confirm }) => {
+                                if (confirm) {
+                                    uni.redirectTo({
+                                        url: '/team/userCenter/personal?id=' + res.data.sys_enterprise_hrid,
                                     })
+                                } else {
+                                    uni.navigateBack();
                                 }
-                            });
+                            },
+                        })
+                    } else {
+                        this.$Http.uploadUserDetail && this.$Http.uploadUserDetail();
+                        uni.showToast({
+                            title: "编辑成功",
+                            icon: "none",
+                            duration: 1500,
+                            mask: true
                         })
+                        setTimeout(() => {
+                            uni.navigateBack();
+                        }, 800)
                     }
                 })
             })
@@ -125,4 +164,33 @@ export default {
 }
 </script>
 
-<style></style>
+<style lang="scss" scoped>
+.footer {
+    position: fixed;
+    bottom: 0;
+    width: 100vw;
+    height: 65px;
+    background: #FFFFFF;
+    box-shadow: 0px -2px 6px 1px rgba(0, 0, 0, 0.16);
+    box-sizing: border-box;
+    padding: 5px 10px;
+    z-index: 999;
+
+    .add {
+        display: flex;
+        align-items: center;
+        justify-content: center;
+        width: 100%;
+        height: 45px;
+        background: #C30D23;
+        border-radius: 5px;
+        font-family: PingFang SC, PingFang SC;
+        font-size: 14px;
+        color: #FFFFFF;
+    }
+
+    .forbidden {
+        opacity: .6;
+    }
+}
+</style>

+ 14 - 89
team/userCenter/personal.vue

@@ -1,39 +1,21 @@
 <template>
     <view>
-        <block v-if="detail.userid">
+        <block>
             <view style="height: 10px;" />
             <user :list="[detail]" />
         </block>
 
-        <view class="head">
-            <view class="label">
-                基本信息
-            </view>
-            <view class="content">
-                仅显示已填信息<text style="padding: 0 2.5px;" /> <u-switch activeColor="#C40C24" v-model="unShowAll" />
-            </view>
-        </view>
-        <block v-for="item in showList" :key="item.key">
-            <view class="item" hover-class="navigator-hover" v-if="!unShowAll || detail[item.key] || item.value">
-                <view class="content">
-                    <view class="label">
-                        {{ item.label }}:
-                    </view>
-                    <view class="value">
-                        {{ detail[item.key] || item.value || '--' }}
-                    </view>
-                </view>
-            </view>
-        </block>
+        <displayCell :showList="showList" :detail="detail" />
+
         <view style="height: 70px;" />
         <view class="footer">
             <navigator class="insert" v-if="detail.iswechatbind == 0"
                 :url="'/team/userCenter/wechatbind?id=' + detail.userid + '&name=' + detail.name">
                 绑定微信
             </navigator>
-            <navigator class="invite" style="flex: 1;" url="/team/team/InviteUser">
+            <view class="invite" style="flex: 1;" @click="toEdit" hover-class="navigator-hover">
                 编辑
-            </navigator>
+            </view>
         </view>
     </view>
 </template>
@@ -48,7 +30,6 @@ export default {
             detail: {
                 userid: 0
             },
-            unShowAll: false,
             showList: []
         }
     },
@@ -60,6 +41,9 @@ export default {
         });
         this.getDetail()
     },
+    onUnload() {
+        delete this.$Http.uploadUserDetail;
+    },
     methods: {
         getDetail() {
             this.$Http.basic({
@@ -100,77 +84,18 @@ export default {
                     key: "storenames"
                 }]
             })
+        },
+        toEdit() {
+            this.$Http.uploadUserDetail = this.getDetail.bind(this);
+            uni.navigateTo({
+                url: '/team/userCenter/insert?title=编辑人员&data=' + JSON.stringify(this.detail)
+            });
         }
     },
 }
 </script>
 
 <style lang="scss" scoped>
-.head {
-    display: flex;
-    align-items: center;
-    justify-content: space-between;
-    width: 100vw;
-    height: 45px;
-    background: #F7F7F7;
-    padding: 0 10px;
-    box-sizing: border-box;
-
-    .label {
-        font-family: PingFang SC, PingFang SC;
-        font-weight: bold;
-        font-size: 15px;
-        color: #333333;
-        line-height: 22px;
-    }
-
-    .content {
-        display: flex;
-        align-items: center;
-        font-family: PingFang SC, PingFang SC;
-        font-size: 14px;
-        color: #999999;
-    }
-}
-
-.item {
-    width: 100vw;
-    background: #fff;
-    padding-left: 10px;
-    box-sizing: border-box;
-
-    .content {
-        display: flex;
-        width: 100%;
-        padding: 15px 0;
-        padding-right: 10px;
-        box-sizing: border-box;
-        border-bottom: 0.5px solid #F2F2F2;
-
-        .label {
-            width: 100px;
-            margin-right: 10px;
-            line-height: 20px;
-            font-family: Source Han Sans SC, Source Han Sans SC;
-            font-size: 14px;
-            color: #666666;
-            flex-shrink: 0;
-        }
-
-        .value {
-            flex: 1;
-            line-height: 20px;
-            font-family: Source Han Sans SC, Source Han Sans SC;
-            font-size: 14px;
-            color: #333333;
-        }
-    }
-
-    .content:last-child {
-        border-bottom: 0;
-    }
-}
-
 .footer {
     position: fixed;
     bottom: 0;

+ 2 - 2
team/userCenter/selectUser.vue

@@ -30,10 +30,10 @@ export default {
         getList(init = false) {
             if (this.paging(this.content, init)) return;
             this.$Http.basic({
-                "id": "20240410161802",
+                "id": "20240410095602",
                 content: this.content
             }).then(res => {
-                console.log("人员列表", res)
+                console.log("选择负责人", res)
                 this.$refs.List.RefreshToComplete()
                 if (this.cutoff(res.msg)) return;
                 this.total = res.total;