Explorar el Código

Merge branch '团队管理'

xiaohaizhao hace 1 año
padre
commit
06c61f8be9

+ 76 - 10
components/my_form.vue

@@ -1,6 +1,6 @@
 <template>
     <view>
-        <view class="head" v-if="requiredFieldOnly">
+        <view class="requiredFieldOnly-head" v-if="requiredFieldOnly">
             <view class="label">
                 基本信息
             </view>
@@ -12,7 +12,8 @@
         <block v-for="(item, index) in  list " :key="item.key">
             <block v-if="item.isMust || !unShowAll">
                 <!-- 文本输入 -->
-                <view class="input-box" v-if="item.type == 'text'" :style="{ marginTop: tovw(item.marginTop || 0) }"
+                <view class="input-box" v-if="item.type == 'text'"
+                    :style="{ marginTop: tovw(item.marginTop || 0), opacity: item.disabled ? 0.7 : 1 }"
                     @click="focusLabel = item.label">
                     <view class="box" :class="item.unBorBot ? '' : 'borBot'">
                         <view class="label">
@@ -21,19 +22,25 @@
                         </view>
                         <view class="content-box">
                             <view class="content">
-                                <input v-if="item.inputmode == 'number'" type="number"
+                                <input v-if="item.inputmode == 'number'" type="number" :disabled="item.disabled"
                                     placeholder-style="color: #BBBBBB;font-family: Source Han Sans SC, Source Han Sans SC;"
                                     :focus="focusLabel == item.label" :placeholder="item.placeholder || '请填写' + item.label"
                                     :value="item.value" :style="{ width: item.value ? '220px' : '240px' }"
                                     @input="onInput($event, index)" :maxlength="item.maxlength || '499'"
                                     confirm-type="done" />
-                                <textarea v-else
+                                <input v-else-if="item.inputmode == 'digit'" type="digit" :disabled="item.disabled"
+                                    placeholder-style="color: #BBBBBB;font-family: Source Han Sans SC, Source Han Sans SC;"
+                                    :focus="focusLabel == item.label" :placeholder="item.placeholder || '请填写' + item.label"
+                                    :value="item.value" :style="{ width: item.value ? '220px' : '240px' }"
+                                    @input="onInput($event, index)" :maxlength="item.maxlength || '499'"
+                                    confirm-type="done" />
+                                <textarea v-else :disabled="item.disabled"
                                     placeholder-style="color: #BBBBBB;font-family: Source Han Sans SC, Source Han Sans SC;"
                                     auto-height type="text" :focus="focusLabel == item.label"
                                     :placeholder="item.placeholder || '请填写' + item.label" :value="item.value"
                                     :style="{ width: item.value ? '220px' : '240px' }" @input="onInput($event, index)"
                                     :maxlength="item.maxlength || '499'" confirm-type="done" />
-                                <icon v-if="item.value" class="icon" type="clear" size="3.733vw"
+                                <icon v-if="item.value && !item.disabled" class="icon" type="clear" size="3.733vw"
                                     @click="onClearInput(index)" />
                             </view>
                             <view v-if="item.errText" class="err-text">
@@ -45,7 +52,7 @@
                 </view>
                 <!-- 文本域 -->
                 <view class="textarea-box" v-else-if="item.type == 'textarea'">
-                    <textarea class="textarea" :class="item.unBorBot ? '' : 'borBot'"
+                    <textarea class="textarea" :class="item.unBorBot ? '' : 'borBot'" :disabled="item.disabled"
                         placeholder-style="color: #BBBBBB;font-family: Source Han Sans SC, Source Han Sans SC;" type="text"
                         :placeholder="item.placeholder || '请填写' + item.label" :value="item.value"
                         @input="onInput($event, index)" :maxlength="item.maxlength || '499'" confirm-type="done" />
@@ -55,7 +62,7 @@
                     :style="{ marginTop: tovw(item.marginTop || 0) }">
                     <view class="head">
                         <view class="label">
-                            <text class="must" v-if="item.isMust">*</text>
+                            <text class="must" style="color: #E3041F;" v-if="item.isMust">*</text>
                             {{ item.label }}
                         </view>
                         <view class="state">
@@ -170,6 +177,41 @@
                         </u-radio-group>
                     </view>
                 </view>
+                <!-- 单选 -->
+                <view class="region" v-else-if="item.type == 'radio'">
+                    <view class="box" :class="item.unBorBot ? '' : 'borBot'">
+                        <view class="label">
+                            <text class="must" v-if="item.isMust">*</text>
+                            {{ item.label }}:
+                        </view>
+                        <u-radio-group v-model="item.value" :placement="item.placement || 'row'"
+                            @change="groupChange($event, index)">
+                            <u-radio v-for="option in item.options"
+                                :customStyle="{ marginRight: tovw(option.marginRight || item.marginRight || 0), marginTop: tovw(option.marginTop || item.marginTop || 0) }"
+                                :key="option.label" :label="option.label" :name="option.name" />
+                        </u-radio-group>
+                    </view>
+                </view>
+                <!-- 路由选择器 -->
+                <view class="region" v-else-if="item.type == 'route'"
+                    :style="{ marginTop: tovw(item.marginTop || 0), opacity: item.disabled ? 0.7 : 1 }"
+                    @click="item.disabled ? '' : toRoute(item, index)">
+                    <view class="box" :class="item.unBorBot ? '' : 'borBot'">
+                        <view class="label">
+                            <text class="must" v-if="item.isMust">*</text>
+                            {{ item.label }}:
+                        </view>
+                        <view class="content-box">
+                            <view class="value" v-if="item.value.length">
+                                {{ item.showValue.join(",") }}
+                            </view>
+                            <view v-else class="placeholder" hover-class="none">
+                                {{ item.placeholder || '请选择' + item.label }}
+                            </view>
+                            <view v-if="!item.disabled" class="iconfont icon-a-wodetiaozhuan" />
+                        </view>
+                    </view>
+                </view>
             </block>
         </block>
     </view>
@@ -177,6 +219,7 @@
 
 <script>
 import { formattedFiles, viewImage } from "../utils/settleFiles.js"
+
 export default {
     name: "my_form",
     props: {
@@ -195,6 +238,9 @@ export default {
         },
         isShowAll: {
             type: Function
+        },
+        interrupt: {
+            type: Function
         }
     },
     data() {
@@ -204,7 +250,6 @@ export default {
             unShowAll: false,
         }
     },
-
     watch: {
         form: {
             handler: function (newVal) {
@@ -277,6 +322,15 @@ export default {
             }] */
     },
     methods: {
+        toRoute(item, index) {
+            uni.navigateTo({
+                url: item.path
+            });
+            this.$Http.routeSelected = function (selected) {
+                this.$emit('interrupt', item, selected, index)
+                delete this.$Http.routeSelected;
+            }.bind(this)
+        },
         onInput(e, index) {
             let item = this.list[index];
             item.errText = "";
@@ -287,6 +341,16 @@ export default {
             }
             this.verify()
         },
+        setItem(index, item, back = false) {
+            this.$set(this.list, index, item)
+            this.verify()
+            if (back) uni.navigateBack();
+        },
+        setValue(index, value, back = false) {
+            this.$set(this.list[index], 'value', value)
+            this.verify()
+            if (back) uni.navigateBack();
+        },
         onClearInput(index) {
             let item = this.list[index];
             item.errText = ''
@@ -478,7 +542,7 @@ export default {
 
 
 <style lang="scss">
-.head {
+.requiredFieldOnly-head {
     display: flex;
     align-items: center;
     justify-content: space-between;
@@ -674,11 +738,13 @@ export default {
     width: 100vw;
     background: #fff;
     box-sizing: border-box;
-    padding: 15px 10px 0;
+    padding: 15px 0 0 10px;
 
     .box {
         display: flex;
         padding-bottom: 15px;
+        padding-right: 10px;
+        box-sizing: border-box;
 
         .label {
             width: 100px;

+ 18 - 1
pages.json

@@ -72,6 +72,8 @@
 			"path": "budget/result"
 		}, {
 			"path": "storeQRCode/index"
+		}, {
+			"path": "insert/store"
 		}]
 	}, {
 		"root": "cloud",
@@ -114,12 +116,27 @@
 			"path": "userCenter/personal"
 		}, {
 			"path": "userCenter/wechatbind"
+		}, {
+			"path": "userCenter/insert"
+		}, {
+			"path": "userCenter/selectUser"
+		}]
+	}, {
+		"root": "select",
+		"pages": [{
+			"path": "store/store"
+		}, {
+			"path": "place/index"
 		}]
 	}],
 	"preloadRule": {
 		"pages/index/index": {
 			"network": "all",
-			"packages": ["packageCase", "packageA", "store", "cloud", "team"]
+			"packages": ["packageCase", "packageA", "store", "cloud", "team", "select"]
+		},
+		"store/insert/store": {
+			"network": "all",
+			"packages": ["team", "select"]
 		}
 	},
 	"globalStyle": {

+ 2 - 3
pages/index/index.vue

@@ -64,7 +64,7 @@ export default {
 				console.log("被邀请绑定账号", that.user);
 				uni.showModal({
 					title: '提醒',
-					content: `"${that.user.userName}"是否与当前微信号绑定`,
+					content: `账号"${that.user.userName}"是否与当前微信号绑定`,
 					confirmText: '确定绑定',
 					success: function ({ confirm }) {
 						if (confirm) uni.login({
@@ -75,7 +75,7 @@ export default {
 										"wechat_code": res.code,
 										"isbinging": 1,
 										"wechatuserinfo": "",
-										"userid": that.user.wechatBindUserid
+										"sys_enterprise_hrid": that.user.wechatBindUserid
 									}
 								}).then(s => {
 									console.log("绑定账号", s)
@@ -97,7 +97,6 @@ export default {
 											}
 										}
 									});
-									if (that.cutoff(res.msg, '绑定成功')) return;
 								})
 							}
 						})

+ 71 - 0
select/place/index.vue

@@ -0,0 +1,71 @@
+<template>
+    <view>
+        <map id="Mymap" class="Mymap" :longitude="my.longitude" :latitude="my.latitude" scale="16" :markers="markers"
+            bindregionchange="" bindtap="" bindupdated="" />
+        <view class="search-box">
+            <My_search />
+        </view>
+        <My_listbox boxBackground="#fff">
+
+
+        </My_listbox>
+    </view>
+</template>
+
+<script>
+export default {
+    data() {
+        return {
+            my: {
+                longitude: "",
+                latitude: ""
+            },
+            markers: []
+        }
+    },
+    onLoad() {
+        this.getLocation(true).then(my => {
+            this.my = my;
+            console.log(my)
+        })
+        uni.setNavigationBarTitle({
+            title: '地图选点'
+        });
+        setTimeout(() => {
+            this.$Http.basic({
+                id: "10030901",
+                content: {
+                    postStr: {
+                        "yingjiType": 1,
+                        "sourceType": 0,
+                        "keyWord": "楚楚吊顶",
+                        "level": 6,
+                        "mapBound": "113.75989136166874,29.393072654041134,128.27534863832096,32.031873462231246",
+                        "queryType": "4",
+                        "start": 0,
+                        "count": 10,
+                        "queryTerminal": 10000
+                    }
+                }
+            }).then(res => {
+                console.log("搜索地点", res)
+            })
+        }, 500)
+
+    }
+}
+</script>
+
+<style lang="scss" scoped>
+.Mymap {
+    width: 100vw;
+    height: 300px;
+}
+
+.search-box {
+    width: 100vw;
+    padding: 10px;
+    box-sizing: border-box;
+    background: #fff;
+}
+</style>

+ 59 - 0
select/store/store.vue

@@ -0,0 +1,59 @@
+<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>
+                    </view>
+                </navigator>
+            </view>
+        </My_listbox>
+    </view>
+</template>
+
+<script>
+export default {
+    data() {
+        return {
+            list: [],
+            "content": {
+                "where": {
+                    "condition": "",
+                    "storetype": "",
+                    "status": ""
+                }
+            }
+        }
+    },
+
+    onLoad() {
+        this.getList()
+        uni.setNavigationBarTitle({
+            title: '选择门店'
+        });
+    },
+    methods: {
+        getList(init = false) {
+            if (this.paging(this.content, init)) return;
+            this.$Http.basic({
+                "id": 20240410095602,
+                content: this.content
+            }).then(res => {
+                this.$refs.List.RefreshToComplete()
+                console.log("获取门店列表", res)
+                if (this.cutoff(res.msg)) return;
+                this.list = res.pageNumber == 1 ? res.data : this.list.concat(res.data);
+                this.content = this.$refs.List.paging(this.content, res)
+            })
+        },
+    },
+}
+</script>
+
+<style></style>

+ 186 - 0
store/insert/store.vue

@@ -0,0 +1,186 @@
+<template>
+    <view>
+        <my_form ref="form" :form="form" @isUncomplete="isUncomplete" requiredFieldOnly @interrupt="interrupt" />
+    </view>
+</template>
+
+<script>
+export default {
+    data() {
+        return {
+            sa_storeid: 0,
+            form: []
+        }
+    },
+    async onLoad() {
+        uni.setNavigationBarTitle({
+            title: '新增人员'
+        });
+        this.form = [{
+            key: "storename",
+            type: "text",
+            label: "门店名称",
+            isMust: true,//是否必填
+            value: "",
+        }, {
+            key: "area",
+            type: "text",
+            label: "面积(m²)",
+            isMust: true,//是否必填
+            value: "",
+            inputmode: 'digit',
+        }, {
+            key: "leader_hrid",
+            type: "route",
+            path: "/team/userCenter/selectUser?title=选择负责人",
+            isRadio: true,
+            label: "负责人姓名",
+            isMust: true,//是否必填
+            value: [],
+            showValue: [],
+            interrupt: true
+        }, {
+            key: "phonenumber",
+            type: "text",
+            label: "负责人电话",
+            isMust: true,//是否必填
+            value: "",
+            inputmode: 'number',
+            disabled: true,
+            verify: [this.getReg("phonenumber")]
+        }, {
+            key: "sale_phonenmber",
+            type: "text",
+            label: "门店售前电话",
+            isMust: false,//是否必填
+            value: "",
+            inputmode: 'number',
+            verify: [this.getReg("phonenumber")]
+        }, {
+            key: "service_phonenmber",
+            type: "text",
+            label: "门店售后电话",
+            isMust: false,//是否必填
+            value: "",
+            inputmode: 'number',
+            verify: [this.getReg("phonenumber")]
+        }, {
+            key: "storetype",
+            type: "radio",
+            label: "门店类型",
+            value: "直营",
+            options: [{
+                label: "直营",
+                name: "直营",
+                marginRight: 60
+            }, {
+                label: "分销",
+                name: "分销",
+            }]
+        }, {
+            key: "markettype",
+            type: "customClass",
+            label: "门店卖场类型",
+            isMust: false,//是否必填
+            isMultipleChoice: false,//是否多选
+            value: '',// 多选[] 单选 ""
+            list: await this.getCustomClass('storetype')
+        }, {
+            key: "selectMap",
+            type: "route",
+            path: "/select/place/index",
+            label: "门店地址",
+            isMust: true,//是否必填
+            value: {},
+        }];
+    },
+    methods: {
+        isUncomplete(uncomplete) {
+            this.uncomplete = uncomplete;
+        },
+        interrupt(item, selected, index) {
+            console.log(item)
+            console.log(selected)
+            console.log(index)
+            switch (item.key) {
+                case "leader_hrid":
+                    item.showValue = [selected.name];
+                    item.value = [selected.sys_enterprise_hrid];
+                    this.$refs.form.setItem(index, item)
+                    this.$refs.form.setValue(index + 1, selected.phonenumber, true)
+                    break;
+            }
+
+        },
+        submit() {
+            this.loading = true;
+            let that = this;
+            this.$refs.form.submit().then(data => {
+                this.$Http.basic({
+                    "id": 20240410095302,
+                    "content": {
+                        "sa_storeid": this.sa_storeid,
+                        ...data
+                    }
+                }).then(res => {
+                    this.loading = false;
+                    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',
+                                    })
+                                }
+                            });
+                        })
+                    }
+                })
+            })
+        },
+    },
+    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>
+
+<style></style>

+ 5 - 3
team/team/index.vue

@@ -4,17 +4,19 @@
             @click="changeCurrent" :current="current" />
 
         <users ref="人员" v-show="pageNmae == '人员'" />
+        <store ref="门店" v-show="pageNmae == '门店'" />
     </view>
 </template>
 
 <script>
 import users from "./modules/users.vue"
+import store from "./modules/store.vue"
 export default {
-    components: { users },
+    components: { users, store },
     data() {
         return {
-            current: 1,
-            pageNmae: "人员",
+            current: 2,
+            pageNmae: "门店",
             tabs: [{
                 name: '经销商',
             }, {

+ 141 - 0
team/team/modules/store.vue

@@ -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>

+ 0 - 0
team/userCenter/modules/userList.vue → team/team/modules/userList.vue


+ 18 - 2
team/team/modules/users.vue

@@ -17,7 +17,7 @@
         </My_listbox>
 
         <view class="footer">
-            <navigator class="insert" url="">
+            <navigator class="insert" url="/team/userCenter/insert" @click="onInsert">
                 新增人员
             </navigator>
             <navigator class="invite" url="/team/team/InviteUser">
@@ -28,7 +28,7 @@
 </template>
 
 <script>
-import userList from "../../userCenter/modules/userList.vue"
+import userList from "../../team/modules/userList"
 export default {
     components: { userList },
     data() {
@@ -72,6 +72,22 @@ export default {
                 url: '/team/userCenter/personal?id=' + item.sys_enterprise_hrid
             });
         },
+        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.list = res.data;
+                        delete this.$Http.uploadUserList
+                    })
+                }
+            }.bind(this)
+        },
         onSearch(condition) {
             this.content.where.condition = condition;
             this.getList(true)

+ 128 - 0
team/userCenter/insert.vue

@@ -0,0 +1,128 @@
+<template>
+    <view>
+        <my_form ref="form" :form="form" @isUncomplete="isUncomplete" requiredFieldOnly />
+
+    </view>
+</template>
+
+<script>
+export default {
+    data() {
+        return {
+            sys_enterprise_hrid: 0,
+            form: []
+        }
+    },
+    async onLoad() {
+        uni.setNavigationBarTitle({
+            title: '新增人员'
+        });
+        let form = [{
+            key: "name",
+            type: "text",
+            label: "姓名",
+            isMust: true,//是否必填
+            value: "",
+        }, {
+            key: "phonenumber",
+            type: "text",
+            label: "手机号",
+            isMust: true,//是否必填
+            value: "",
+            placeholder: "请输入收货人手机号",
+            inputmode: 'number',
+            verify: [this.getReg("phonenumber")]
+        }, {
+            key: "sex",
+            type: "sex",
+            label: "性别",
+            value: "男",
+        }, {
+            key: "birthday",
+            type: "date",
+            label: "生日",
+            value: "",
+            placeholder: "请选择出生日期",
+        }, {
+            key: "email",
+            type: "text",
+            label: "邮箱",
+            isMust: false,//是否必填
+            value: "",
+            verify: [this.getReg("email")]
+        }, {
+            key: "position",
+            type: "text",
+            label: "店内职位",
+            isMust: false,//是否必填
+            value: "",
+        }, {
+            key: "sa_storeids",
+            type: "route",
+            path: "/select/store/store",
+            isRadio: false,
+            label: "所属门店",
+            isMust: false,//是否必填
+            value: [],
+            showValue: [],
+        }];
+        this.form = form;
+    },
+    methods: {
+        isUncomplete(uncomplete) {
+            this.uncomplete = uncomplete;
+        },
+        submit() {
+            this.loading = true;
+            let that = this;
+            this.$refs.form.submit().then(data => {
+                this.$Http.basic({
+                    "id": 20240410164102,
+                    "content": {
+                        "sys_enterprise_hrid": this.sys_enterprise_hrid,
+                        ...data
+                    }
+                }).then(res => {
+                    this.loading = false;
+                    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',
+                                    })
+                                }
+                            });
+                        })
+                    }
+                })
+            })
+        },
+    },
+}
+</script>
+
+<style></style>

+ 1 - 1
team/userCenter/personal.vue

@@ -39,7 +39,7 @@
 </template>
 
 <script>
-import user from "./modules/userList"
+import user from "../team/modules/userList.vue"
 export default {
     components: { user },
     data() {

+ 51 - 0
team/userCenter/selectUser.vue

@@ -0,0 +1,51 @@
+<template>
+    <My_listbox ref="List" @getlist="getList" bottomHeight="70">
+        <view style="height: 10px;" />
+        <user-list :list="list" @onClick="onClick" />
+    </My_listbox>
+</template>
+
+<script>
+import userList from "../team/modules/userList.vue"
+export default {
+    components: { userList },
+    data() {
+        return {
+            "content": {
+                "where": {
+                    "condition": ""
+                }
+            },
+            total: 0,
+            list: []
+        }
+    },
+    onLoad(options) {
+        this.getList(true)
+        uni.setNavigationBarTitle({
+            title: options.title || '选择用户'
+        });
+    },
+    methods: {
+        getList(init = false) {
+            if (this.paging(this.content, init)) return;
+            this.$Http.basic({
+                "id": "20240410161802",
+                content: this.content
+            }).then(res => {
+                console.log("人员列表", res)
+                this.$refs.List.RefreshToComplete()
+                if (this.cutoff(res.msg)) return;
+                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.$Http.routeSelected(item)
+        },
+    },
+}
+</script>
+
+<style></style>