yujialong 10 months ago
parent 1525264991
commit 3a48b8e2af
  1. 6
      other/activityDetail/activityDetail.vue
  2. 6
      other/addGoods/addGoods.vue
  3. 5
      other/goods/goods.vue
  4. 3
      other/goodsDetail/goodsDetail.vue
  5. 12
      other/supplierDetail/supplierDetail.vue
  6. 11
      pages/index/index.vue
  7. 22
      pages/login/login.vue
  8. 67
      pages/person/person.vue
  9. 8
      team/info/info.vue
  10. 7
      team/teams/teams.vue

@ -55,7 +55,7 @@
<view class="btns"> <view class="btns">
<button class="share" open-type="share">分享</button> <button class="share" open-type="share">分享</button>
<view :class="['btn sign', {signed, disabled: comStatus !== 1}]" @click="presign">{{ stopSign ? '已截止报名' : comStatus === 1 ? (signed ? '取消报名' : '立刻报名') : statusList[comStatus] }}</view> <view :class="['btn sign', {signed, disabled: comStatus !== 1}]" @click="presign">{{ stopSign ? (signed ? '已报名' : '已截止报名') : comStatus === 1 ? (signed ? '取消报名' : '立刻报名') : statusList[comStatus] }}</view>
</view> </view>
<uni-popup ref="popup" type="dialog"> <uni-popup ref="popup" type="dialog">
@ -162,7 +162,6 @@
handleStatus () { handleStatus () {
const data = this.form const data = this.form
let status = 0 let status = 0
let signed = 0 //
const signUpStartTime = new Date(data.signUpStartTime) // const signUpStartTime = new Date(data.signUpStartTime) //
const signUpEndTime = new Date(data.signUpEndTime) // const signUpEndTime = new Date(data.signUpEndTime) //
const playStartTime = new Date(data.playStartTime) // const playStartTime = new Date(data.playStartTime) //
@ -175,7 +174,6 @@
} else if (now > signUpStartTime && now < signUpEndTime) { } else if (now > signUpStartTime && now < signUpEndTime) {
// //
status = 1 status = 1
if (data.competitionRegistration) signed = 1
} else if (now > signUpEndTime && now < playEndTime) { } else if (now > signUpEndTime && now < playEndTime) {
// //
this.stopSign = 1 this.stopSign = 1
@ -184,7 +182,7 @@
status = 2 status = 2
} }
this.comStatus = status this.comStatus = status
this.signed = signed this.signed = data.competitionRegistration ? 1 : 0
}, },
// //
getRegList() { getRegList() {

@ -66,11 +66,11 @@
<view class="form-list edit-form"> <view class="form-list edit-form">
<view class="line"> <view class="line">
<view class="name">售价</view> <view class="name">售价</view>
<input ref="price" :focus="showPopup" type="text" placeholder="请输入售价" v-model="curSku.price" /> <input ref="price" :focus="showPopup" type="text" step="0.01" placeholder="请输入售价" v-model="curSku.price" />
</view> </view>
<view class="line"> <view class="line">
<view class="name">市场价</view> <view class="name">市场价</view>
<input type="text" placeholder="请输入市场价" v-model="curSku.oriPrice" /> <input type="text" step="0.01" placeholder="请输入市场价" v-model="curSku.oriPrice" />
</view> </view>
</view> </view>
</view> </view>
@ -85,6 +85,7 @@
export default { export default {
data() { data() {
return { return {
team: uni.getStorageSync('team'),
openId: uni.getStorageSync('openId'), openId: uni.getStorageSync('openId'),
prodId: '', prodId: '',
form: { form: {
@ -253,6 +254,7 @@
}) })
form.totalStocks = stocks form.totalStocks = stocks
form.status = status form.status = status
form.shopId = this.team.isTeam ? this.team.teamId : this.team.parentId
try { try {
if (this.prodId) { if (this.prodId) {
await update(form) await update(form)

@ -5,7 +5,7 @@
</view> </view>
<ul class="tab"> <ul class="tab">
<li :class="{active: curTab === ''}" @click="tabChange('')">全部</li> <li :class="{active: curTab === ''}" @click="tabChange('')">全部</li>
<li :class="{active: curTab === 1}" @click="tabChange(0)">已上架({{ status1 }})</li> <li :class="{active: curTab === 1}" @click="tabChange(1)">已上架({{ status1 }})</li>
<li :class="{active: curTab === 2}" @click="tabChange(2)">已下架({{ status2 }})</li> <li :class="{active: curTab === 2}" @click="tabChange(2)">已下架({{ status2 }})</li>
<li :class="{active: curTab === 3}" @click="tabChange(3)">草稿({{ status3 }})</li> <li :class="{active: curTab === 3}" @click="tabChange(3)">草稿({{ status3 }})</li>
<!-- <li :class="{active: curTab === 4}" @click="tabChange(4)">审核中({{ status4 }})</li> --> <!-- <li :class="{active: curTab === 4}" @click="tabChange(4)">审核中({{ status4 }})</li> -->
@ -56,6 +56,8 @@
export default { export default {
data() { data() {
return { return {
team: uni.getStorageSync('team'),
isTeam: uni.getStorageSync('team').isTeam == 1, //
Goods, Goods,
curTab: '', curTab: '',
tabs: [], tabs: [],
@ -113,6 +115,7 @@
status: this.curTab, status: this.curTab,
current: this.page, current: this.page,
prodName: this.keyword, prodName: this.keyword,
shopId: this.team.isTeam ? this.team.teamId : this.team.parentId
}).then(({ page, productCount }) => { }).then(({ page, productCount }) => {
// //
const status1 = productCount.find(e => e.status === 1) const status1 = productCount.find(e => e.status === 1)

@ -37,7 +37,7 @@
</view> </view>
</view> </view>
<view v-if="info.status === 2 || info.status === 3" class="btn-wrap"> <view v-if="isTeam && (info.status === 2 || info.status === 3)" class="btn-wrap">
<view class="btn" @click="$util.to(`/other/addGoods/addGoods?prodId=${prodId}`)">编辑</view> <view class="btn" @click="$util.to(`/other/addGoods/addGoods?prodId=${prodId}`)">编辑</view>
</view> </view>
</view> </view>
@ -49,6 +49,7 @@
export default { export default {
data() { data() {
return { return {
isTeam: uni.getStorageSync('team').isTeam == 1, //
prodId: '', prodId: '',
curPic: 0, curPic: 0,
pic: [], pic: [],

@ -139,6 +139,7 @@
const { options } = pages[pages.length - 1] const { options } = pages[pages.length - 1]
this.teamId = options.teamId this.teamId = options.teamId
this.accountId = options.accountId this.accountId = options.accountId
this.page = 1
this.getInfo() this.getInfo()
this.getGoods() this.getGoods()
}, },
@ -174,6 +175,9 @@
shopId: this.teamId, shopId: this.teamId,
}) })
const list = res.page.records const list = res.page.records
list.forEach(e => {
if (e.pic) e.pic = e.pic.split(',')[0]
})
this.goods = this.reachBottom > 0 ? [...this.goods, ...list] : list this.goods = this.reachBottom > 0 ? [...this.goods, ...list] : list
this.page++ // page+1 this.page++ // page+1
const noMore = this.goods.length === res.page.total // const noMore = this.goods.length === res.page.total //
@ -252,9 +256,9 @@
color: #000; color: #000;
} }
.logo { .logo {
width: 80rpx; width: 100rpx;
min-width: 80rpx; min-width: 100rpx;
height: 80rpx; height: 100rpx;
margin-right: 20rpx; margin-right: 20rpx;
border-radius: 50%; border-radius: 50%;
} }
@ -280,7 +284,7 @@
background-color: #fff; background-color: #fff;
.pics { .pics {
margin: 20rpx 0; margin: 20rpx 0;
.pic { swiper, .pic {
width: 100%; width: 100%;
height: 500rpx; height: 500rpx;
} }

@ -138,8 +138,8 @@
this.menuBtnInfo = uni.getMenuButtonBoundingClientRect() this.menuBtnInfo = uni.getMenuButtonBoundingClientRect()
// .top + 8 + 'px' // .top + 8 + 'px'
// #endif // #endif
// uni.setStorageSync('token', 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ1c2VyIiwiaWF0IjoxNzA0Nzg1NDg5LCJleHAiOjE3MDU2NDk0ODksImFjY291bnRJZCI6IjQ5ODMiLCJzaG9wSWQiOjYsInBsYXRmb3JtSWQiOjV9.B0gXKl9gOEi9oSNZl8M_gGcqFXf9hAYbqtVHygDoYxM') // uni.setStorageSync('token', 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ1c2VyIiwiaWF0IjoxNzA1OTk4NTU2LCJleHAiOjE3MDY4NjI1NTYsImFjY291bnRJZCI6IjUwNTAiLCJzaG9wSWQiOjM2LCJwbGF0Zm9ybUlkIjo2fQ.y4PVCH76hXp3gC1J44h83KpYBmfIyeM4SP8G7ru3P8M')
// uni.setStorageSync('openId', 'o3hKk60jbhAuLm4K3weIgQGFmv2g') // uni.setStorageSync('openId', 'o3hKk686kGjgMygKdPTJd5KQQ7CA')
this.keyword = '' this.keyword = ''
this.curTab = '' this.curTab = ''
this.per = true this.per = true
@ -263,9 +263,12 @@
// link 12 // link 12
if (item.link === '1') { if (item.link === '1') {
const { selectLinkId, correspondingLinkId } = item const { selectLinkId, correspondingLinkId } = item
// selectLinkId 1234 // selectLinkId 1(idid)234
if (selectLinkId === '1') { if (selectLinkId === '1') {
if (correspondingLinkId.includes(',')) {
const ids = correspondingLinkId.split(',')
ids.length === 2 && this.$util.to(`/other/goodsDetail/goodsDetail?prodId=${ids[1]}`)
}
} else if (selectLinkId === '2') { } else if (selectLinkId === '2') {
this.$util.to('/other/activityDetail/activityDetail?id=' + correspondingLinkId) this.$util.to('/other/activityDetail/activityDetail?id=' + correspondingLinkId)
} else if (selectLinkId === '3') { } else if (selectLinkId === '3') {

@ -95,8 +95,8 @@
} }
}, },
onShow() { onShow() {
// uni.setStorageSync('token', 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ1c2VyIiwiaWF0IjoxNzA0Nzg1NDg5LCJleHAiOjE3MDU2NDk0ODksImFjY291bnRJZCI6IjQ5ODMiLCJzaG9wSWQiOjYsInBsYXRmb3JtSWQiOjV9.B0gXKl9gOEi9oSNZl8M_gGcqFXf9hAYbqtVHygDoYxM') // uni.setStorageSync('token', 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ1c2VyIiwiaWF0IjoxNzA1OTk4NTU2LCJleHAiOjE3MDY4NjI1NTYsImFjY291bnRJZCI6IjUwNTAiLCJzaG9wSWQiOjM2LCJwbGF0Zm9ybUlkIjo2fQ.y4PVCH76hXp3gC1J44h83KpYBmfIyeM4SP8G7ru3P8M')
// uni.setStorageSync('openId', 'o3hKk60jbhAuLm4K3weIgQGFmv2g') // uni.setStorageSync('openId', 'o3hKk686kGjgMygKdPTJd5KQQ7CA')
// //
this.checkLogin() this.checkLogin()
}, },
@ -141,12 +141,18 @@
this.isLogin = true this.isLogin = true
this.isReg = true this.isReg = true
} else { } else {
const e = data.sessionKey if (data.tips) {
uni.setStorageSync('token', data.token) that.$util.errMsg(data.tips)
uni.setStorageSync('platformId', data.platformId) }
uni.setStorageSync('openId', e.openid)
this.handleTab(data.platformId) setTimeout(() => {
this.toIndex() const e = data.sessionKey
uni.setStorageSync('token', data.token)
uni.setStorageSync('platformId', data.platformId)
uni.setStorageSync('openId', e.openid)
this.handleTab(data.platformId)
this.toIndex()
}, data.tips ? 2000 : 0)
} }
}).catch(e => { }).catch(e => {
this.submiting = false this.submiting = false

@ -5,7 +5,7 @@
<view class="team-wrap" :style="{paddingTop: headerTop}"> <view class="team-wrap" :style="{paddingTop: headerTop}">
<view v-if="platformId !== 7 && teams.length > 1" class="team"> <view v-if="platformId !== 7 && teams.length > 1" class="team">
<uni-data-picker class="picker-input" placeholder="切换团队" popup-title="切换团队" preload :clear-icon="false" :localdata="teams" :map="{text: 'classificationName', value: 'teamId'}" v-model="teamId" @change="teamChange"></uni-data-picker> <uni-data-picker class="picker-input" placeholder="切换团队" popup-title="切换团队" preload :clear-icon="false" :localdata="teams" :map="{text: 'organizationName', value: 'teamId'}" v-model="teamId" @change="teamChange"></uni-data-picker>
</view> </view>
</view> </view>
@ -23,7 +23,7 @@
</view> </view>
</view> </view>
<view class="phone">{{ curAccount.account || info.phone }}</view> <view class="phone">{{ curTeam.organizationName }}</view>
</view> </view>
</view> </view>
@ -91,7 +91,7 @@
<view v-if="!isMember" class="badge">{{ platformName }}负责人</view> <view v-if="!isMember" class="badge">{{ platformName }}负责人</view>
</view> </view>
<view class="auth" @click="toEnterAuth(platformId)"> <view class="auth" @click="toEnterAuth(platformId)">
{{ auditStatus }} {{ curTeam.authentication }}
<uni-icons class="icon" type="right" size="16" color="#fd9413"></uni-icons> <uni-icons class="icon" type="right" size="16" color="#fd9413"></uni-icons>
</view> </view>
</view> </view>
@ -160,7 +160,6 @@
</template> </template>
<script> <script>
import { getTeamsByPlatformId } from '@/apis/modules/parner.js'
import { viewUserDetails, enterpriseCertificationStatus, updateAvatars } from '@/apis/modules/user.js' import { viewUserDetails, enterpriseCertificationStatus, updateAvatars } from '@/apis/modules/user.js'
import OSS from '@/libs/Oss/upload' import OSS from '@/libs/Oss/upload'
import Common from '@/config/common' import Common from '@/config/common'
@ -172,6 +171,10 @@
platformId: uni.getStorageSync('platformId'), platformId: uni.getStorageSync('platformId'),
openId: uni.getStorageSync('openId'), openId: uni.getStorageSync('openId'),
userName: uni.getStorageSync('userName'), userName: uni.getStorageSync('userName'),
curTeam: {
authentication: '',
organizationName: '',
},
teams: [], teams: [],
info: { info: {
authentication: '' authentication: ''
@ -180,7 +183,6 @@
headerTop: 0, headerTop: 0,
auditStatus: '', auditStatus: '',
isMember: true, // isMember: true, //
organizationName: '',
curAccount: { curAccount: {
account: '' account: ''
}, },
@ -233,8 +235,30 @@
this.info = result.hrUserInfo this.info = result.hrUserInfo
} }
const org = result.organizationInfoList //
if (org && org.length) this.organizationName = org[0].organizationName const org = result.organizationInfoList.filter(e => !e.isEnable)
if (org && org.length) {
if (this.teams) {
/**
* @description 如果是第一次进则默认选中第一个团队并把该团队的信息存入缓存
* 或者团队列表里没有该id则说明超管已经被转让也需要重新选中团队
*/
if (!uni.getStorageSync('team') || !org.find(e => e.teamId == this.teamId)) {
this.teamId = org[0].teamId
uni.setStorageSync('teamId', org[0].teamId)
uni.setStorageSync('team', org[0])
this.curTeam = org[0]
} else {
this.curTeam = org.find(e => e.teamId == this.teamId)
}
}
this.isMember = uni.getStorageSync('team').isTeam == 0 //
this.teams = org
} else {
this.curTeam = {
organizationName: this.info.phone
}
}
// userAccountList // userAccountList
const accountList = result.userAccountList const accountList = result.userAccountList
@ -274,7 +298,7 @@
} }
} }
this.platformId !== 7 && this.getTeams() // this.platformId !== 7 && this.getTeams()
}, },
// //
async getEnterInfo() { async getEnterInfo() {
@ -284,35 +308,12 @@
this.enterInfo = data this.enterInfo = data
} }
}, },
//
async getTeams() {
const { data } = await getTeamsByPlatformId({platformId: this.platformId})
data.map(e => {
const n = e.platformTeamClassificationList
e.id = n.id
// parnerIdidteamIduni.getStorageSync('team').partnerId使
e.teamId = e.isTeam === '1' ? +e.classificationId : n.id
e.classificationName = n.classificationName
delete e.platformTeamClassificationList
})
if (data.length) {
/**
* @description 如果是第一次进则默认选中第一个团队并把该团队的信息存入缓存
* 或者团队列表里没有该id则说明超管已经被转让也需要重新选中团队
*/
if (!uni.getStorageSync('team') || !data.find(e => e.teamId == this.teamId)) {
this.teamId = data[0].teamId
uni.setStorageSync('teamId', data[0].teamId)
uni.setStorageSync('team', data[0])
}
}
this.isMember = uni.getStorageSync('team').isTeam == 0 //
this.teams = data
},
// //
teamChange() { teamChange() {
const { teamId } = this const { teamId } = this
const e = this.teams.find(e => e.teamId == teamId) const e = this.teams.find(e => e.teamId == teamId)
this.curTeam = e
this.isMember = e.isTeam == 0
uni.setStorageSync('team', e) uni.setStorageSync('team', e)
uni.setStorageSync('teamId', teamId) uni.setStorageSync('teamId', teamId)
}, },

@ -69,8 +69,8 @@
</view> </view>
</view> </view>
</view> </view>
<!-- 队长才能编辑 -->
<view v-if="isTeam" class="btn-wrap"> <view v-if="team.isTeam == 1" class="btn-wrap">
<view class="btn" @click="toEdit">编辑</view> <view class="btn" @click="toEdit">编辑</view>
</view> </view>
</view> </view>
@ -83,7 +83,7 @@
data() { data() {
return { return {
openId: uni.getStorageSync('openId'), openId: uni.getStorageSync('openId'),
isTeam: uni.getStorageSync('team').isTeam == 1, // team: uni.getStorageSync('team'),
teamId: uni.getStorageSync('teamId'), teamId: uni.getStorageSync('teamId'),
info: {}, info: {},
pictureUrl: [], pictureUrl: [],
@ -106,7 +106,7 @@
// //
getInfo() { getInfo() {
queryTeamInfo({ queryTeamInfo({
teamId: this.teamId teamId: this.team.isTeam ? this.team.teamId : this.team.parentId
}).then(res => { }).then(res => {
const data = res.teamInfo const data = res.teamInfo
if (!data.logoUrl) data.logoUrl = Common.avatar if (!data.logoUrl) data.logoUrl = Common.avatar

@ -27,7 +27,8 @@
</template> </template>
<empty v-else></empty> <empty v-else></empty>
<uni-icons v-if="isTeam" class="plus" type="plus-filled" size="60" color="#007eff" @click="$util.to('../addStaff/addStaff')"></uni-icons> <!-- 队长 -->
<uni-icons v-if="team.isTeam == 1" class="plus" type="plus-filled" size="60" color="#007eff" @click="$util.to('../addStaff/addStaff')"></uni-icons>
<view v-if="!per" class="per-mask">功能升级中敬请期待...</view> <view v-if="!per" class="per-mask">功能升级中敬请期待...</view>
</view> </view>
</template> </template>
@ -37,7 +38,7 @@
export default { export default {
data() { data() {
return { return {
isTeam: uni.getStorageSync('team').isTeam == 1, // team: uni.getStorageSync('team'),
platformId: uni.getStorageSync('platformId'), platformId: uni.getStorageSync('platformId'),
per: true, // per: true, //
reachBottom: 0, // 0->,1->,-1-> reachBottom: 0, // 0->,1->,-1->
@ -88,7 +89,7 @@
pageSize: this.pageSize, pageSize: this.pageSize,
keyWord: this.keyword, keyWord: this.keyword,
platformId: this.platformId, platformId: this.platformId,
classificationId: uni.getStorageSync('team').teamId classificationId: this.team.isTeam ? this.team.teamId : this.team.parentId
}).then(({ pageList }) => { }).then(({ pageList }) => {
uni.hideLoading() uni.hideLoading()
const { records } = pageList const { records } = pageList

Loading…
Cancel
Save