|
@@ -42,6 +42,31 @@
|
|
|
@click="changeCurrent" :current="current" />
|
|
|
<view v-show="current == 0">
|
|
|
<displayCell :showList="showList" :detail="detail" />
|
|
|
+ <view v-if="detail.status == '审核'" style="height: 30px;" />
|
|
|
+ </view>
|
|
|
+
|
|
|
+ <view v-show="current == 1">
|
|
|
+ <view class="user-head">
|
|
|
+ <view class="title">
|
|
|
+ 门店人员
|
|
|
+ </view>
|
|
|
+ <view class="funs">
|
|
|
+ <view class="item" hover-class="navigator" @click="changeSearchShow">
|
|
|
+ <text class="iconfont icon-sousuo" />
|
|
|
+ </view>
|
|
|
+ <navigator class="item" @click="onInsert" :url="'/store/insert/member?id=' + detail.sa_storeid">
|
|
|
+ <text class="iconfont icon-xinzeng" />
|
|
|
+ </navigator>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <u-transition :show="searchShow">
|
|
|
+ <view class="My_search-box">
|
|
|
+ <My_search :focus="searchShow" :value="content.where.condition" @onSearch="onSearch" />
|
|
|
+ </view>
|
|
|
+ </u-transition>
|
|
|
+ <My_listbox ref="List" @getlist="getList" :bottomHeight="detail.status != '审核' ? 70 : 30">
|
|
|
+ <user-list :list="list" @onClick="onClick" isDelete @onDelete="onDelete" />
|
|
|
+ </My_listbox>
|
|
|
</view>
|
|
|
<block v-if="detail.status != '审核'">
|
|
|
<view style="height: 75px;" />
|
|
@@ -50,31 +75,37 @@
|
|
|
@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>
|
|
|
+import userList from "../../components/userList";
|
|
|
export default {
|
|
|
+ components: { userList },
|
|
|
data() {
|
|
|
return {
|
|
|
current: 0,
|
|
|
sa_storeid: 0,
|
|
|
detail: {},
|
|
|
tabs: [{ name: "门店详情" }, { name: "门店人员" }],
|
|
|
- showList: []
|
|
|
-
|
|
|
+ showList: [],
|
|
|
+ "content": {
|
|
|
+ "where": {
|
|
|
+ "condition": ""
|
|
|
+ }
|
|
|
+ },
|
|
|
+ list: null,
|
|
|
+ searchShow: false,
|
|
|
}
|
|
|
},
|
|
|
onLoad(options) {
|
|
|
- console.log(options)
|
|
|
this.sa_storeid = options.id;
|
|
|
+ this.content.sa_storeid = options.id;
|
|
|
this.getDetail();
|
|
|
uni.setNavigationBarTitle({
|
|
|
title: '门店信息'
|
|
@@ -82,8 +113,15 @@ export default {
|
|
|
},
|
|
|
onUnload() {
|
|
|
delete this.$Http.uploadStoreDetail;
|
|
|
+ delete this.$Http.uploadUserList;
|
|
|
},
|
|
|
methods: {
|
|
|
+ changeSearchShow() {
|
|
|
+ this.searchShow = !this.searchShow;
|
|
|
+ setTimeout(() => {
|
|
|
+ this.$refs.List.setHeight();
|
|
|
+ }, 300)
|
|
|
+ },
|
|
|
getDetail() {
|
|
|
this.$Http.basic({
|
|
|
"id": "20240410095402",
|
|
@@ -140,6 +178,20 @@ export default {
|
|
|
url: "/store/insert/store?title=编辑门店信息&data=" + JSON.stringify(this.detail)
|
|
|
})
|
|
|
},
|
|
|
+ getList(init = false) {
|
|
|
+ if (this.paging(this.content, init)) return;
|
|
|
+ this.$Http.basic({
|
|
|
+ "id": "20240410150702",
|
|
|
+ content: this.content
|
|
|
+ }).then(res => {
|
|
|
+ this.$refs.List.RefreshToComplete()
|
|
|
+ console.log("获取门店人员列表", res)
|
|
|
+ this.$refs.List.setHeight();
|
|
|
+ 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)
|
|
|
+ })
|
|
|
+ },
|
|
|
submit() {
|
|
|
let that = this;
|
|
|
uni.showModal({
|
|
@@ -180,8 +232,70 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
- changeCurrent({ index }) {
|
|
|
+ changeCurrent({ index, name }) {
|
|
|
this.current = index;
|
|
|
+ if (name == '门店人员') {
|
|
|
+ uni.pageScrollTo({
|
|
|
+ scrollTop: 0,
|
|
|
+ duration: 0,
|
|
|
+ });
|
|
|
+ if (this.list == null) {
|
|
|
+ this.getList(true);
|
|
|
+ } else {
|
|
|
+ setTimeout(() => {
|
|
|
+ this.$refs.List.setHeight();
|
|
|
+ }, 300)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ onClick(item) {
|
|
|
+ uni.navigateTo({
|
|
|
+ url: '/team/userCenter/personal?id=' + item.sys_enterprise_hrid
|
|
|
+ });
|
|
|
+ this.onInsert();
|
|
|
+ },
|
|
|
+ onDelete(item) {
|
|
|
+ this.onInsert();
|
|
|
+ let that = this;
|
|
|
+ uni.showModal({
|
|
|
+ title: '提示',
|
|
|
+ content: `是否确定将“${item.name}”移除门店?`,
|
|
|
+ success: ({ confirm }) => {
|
|
|
+ if (confirm) that.$Http.basic({
|
|
|
+ "id": "20240410153602",
|
|
|
+ "content": {
|
|
|
+ "sa_store_hrids": [
|
|
|
+ item.sa_store_hrid
|
|
|
+ ]
|
|
|
+ }
|
|
|
+ }).then(res => {
|
|
|
+ console.log("删除门店成员", res)
|
|
|
+ if (that.cutoff(res.msg, `移除成员成功`)) return;
|
|
|
+ that.$Http.uploadUserList();
|
|
|
+ })
|
|
|
+ },
|
|
|
+ })
|
|
|
+
|
|
|
+ },
|
|
|
+ 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": "20240410150702",
|
|
|
+ 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)
|
|
|
}
|
|
|
},
|
|
|
|
|
@@ -259,6 +373,44 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+.user-head {
|
|
|
+ height: 60px;
|
|
|
+ width: 100vw;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: space-between;
|
|
|
+ padding: 10px;
|
|
|
+ box-sizing: border-box;
|
|
|
+
|
|
|
+ .title {
|
|
|
+ font-family: PingFang SC, PingFang SC;
|
|
|
+ font-weight: 500;
|
|
|
+ font-size: 16px;
|
|
|
+ color: #333333;
|
|
|
+ }
|
|
|
+
|
|
|
+ .funs {
|
|
|
+ display: flex;
|
|
|
+
|
|
|
+ .item {
|
|
|
+ width: 40px;
|
|
|
+ height: 40px;
|
|
|
+ text-align: center;
|
|
|
+ line-height: 40px;
|
|
|
+ background: #FFFFFF;
|
|
|
+ border-radius: 4px;
|
|
|
+ border: 1px solid #CCCCCC;
|
|
|
+ font-size: 18px;
|
|
|
+ color: #666666;
|
|
|
+ margin-left: 10px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+.My_search-box {
|
|
|
+ padding: 10px;
|
|
|
+ padding-top: 0px;
|
|
|
+}
|
|
|
|
|
|
.footer {
|
|
|
position: fixed;
|