|
@@ -5,10 +5,10 @@
|
|
|
<view class="content">
|
|
|
<view class="left">
|
|
|
<view class="tag-box">
|
|
|
- <view class="storetype">
|
|
|
+ <view v-if="detail.storetype" class="storetype">
|
|
|
{{ detail.storetype }}
|
|
|
</view>
|
|
|
- <view class="markettype">
|
|
|
+ <view v-if="detail.markettype" class="markettype">
|
|
|
{{ detail.markettype }}
|
|
|
</view>
|
|
|
</view>
|
|
@@ -26,7 +26,7 @@
|
|
|
{{ getCity(detail) }}
|
|
|
</view>
|
|
|
<view class="row">
|
|
|
- 状态:<text style="color: #333333;">{{ detail.status }}</text>
|
|
|
+ 状态:<text :style="{ color: detail.color }">{{ detail.status }}</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="right">
|
|
@@ -42,48 +42,94 @@
|
|
|
@click="changeCurrent" :current="current" />
|
|
|
<view v-show="current == 0">
|
|
|
<displayCell :showList="showList" :detail="detail" />
|
|
|
+ <view :style="{ height: detail.status == '审核' ? '30px' : '75px' }" />
|
|
|
</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 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 v-if="authOption.includes('storeInsertUser')" 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="authOption.includes('storeDeleteUser')"
|
|
|
+ @onDelete="onDelete" />
|
|
|
+ </My_listbox>
|
|
|
+ </view>
|
|
|
+ <view v-if="detail.status != '审核'" class="footer">
|
|
|
+ <view class="insert" style="flex:1;" :class="detail.status == '新建' ? '' : 'forbidden'"
|
|
|
+ @click="detail.status == '新建' ? toEdit() : ''">
|
|
|
+ 编辑门店信息
|
|
|
</view>
|
|
|
- </block>
|
|
|
- <view v-else style="height: 30px;" />
|
|
|
+ <view v-if="authOption.includes('storeComeUpForReview')" class="invite"
|
|
|
+ @click="detail.status == '新建' ? submit() : revocation()">
|
|
|
+ {{ detail.status == '新建' ? '提交门店信息' : '撤回' }}
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
</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,
|
|
|
+ authOption: [],
|
|
|
}
|
|
|
},
|
|
|
onLoad(options) {
|
|
|
- console.log(options)
|
|
|
this.sa_storeid = options.id;
|
|
|
+ this.content.sa_storeid = options.id;
|
|
|
this.getDetail();
|
|
|
uni.setNavigationBarTitle({
|
|
|
title: '门店信息'
|
|
|
});
|
|
|
+ let auth = this.getApps('工作台', "/team/team/index");
|
|
|
+ if (auth) this.authOption = auth.option;
|
|
|
+ },
|
|
|
+ onShow() {
|
|
|
+ setTimeout(() => {
|
|
|
+ this.$refs.List.setHeight();
|
|
|
+ }, 300)
|
|
|
},
|
|
|
onUnload() {
|
|
|
delete this.$Http.uploadStoreDetail;
|
|
|
+ delete this.$Http.uploadUserList;
|
|
|
},
|
|
|
methods: {
|
|
|
+ changeSearchShow() {
|
|
|
+ this.searchShow = !this.searchShow;
|
|
|
+ setTimeout(() => {
|
|
|
+ this.$refs.List.setHeight();
|
|
|
+ }, 300)
|
|
|
+ },
|
|
|
getDetail() {
|
|
|
this.$Http.basic({
|
|
|
"id": "20240410095402",
|
|
@@ -93,6 +139,19 @@ export default {
|
|
|
}).then(res => {
|
|
|
console.log("店铺详情", res)
|
|
|
if (this.cutoff(res.msg)) return;
|
|
|
+
|
|
|
+ switch (res.data.status) {
|
|
|
+ case '提交':
|
|
|
+ res.data.color = '#009270'
|
|
|
+ break;
|
|
|
+ case '审核':
|
|
|
+ res.data.color = '#095DE0'
|
|
|
+ break;
|
|
|
+ default:
|
|
|
+ res.data.color = '#333333'
|
|
|
+ break;
|
|
|
+ }
|
|
|
+
|
|
|
res.data.cover = res.data.attinfos.length ? this.getSpecifiedImage(res.data.attinfos[0], 'compressed') || uni.getStorageSync("site").logo : uni.getStorageSync("site").logo
|
|
|
this.detail = res.data;
|
|
|
this.showList = [{
|
|
@@ -140,6 +199,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 +253,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 +394,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;
|
|
@@ -299,6 +472,7 @@ export default {
|
|
|
font-weight: 500;
|
|
|
font-size: 16px;
|
|
|
color: #FFFFFF;
|
|
|
+ margin-left: 10px;
|
|
|
}
|
|
|
|
|
|
|