yujialong 10 months ago
parent 4a3790dd3b
commit 1525264991
  1. 2
      components/order/order.vue
  2. 45
      other/addGoods/addGoods.vue
  3. 70
      other/goodsDetail/goodsDetail.vue
  4. 2
      other/procureDetail/procureDetail.vue
  5. 65
      other/supplierDetail/supplierDetail.vue
  6. 85
      pages/login/login.vue
  7. 19
      pages/person/person.vue
  8. 9
      pages/supplier/supplier.vue
  9. 7
      styles/common.scss
  10. 1
      team/info/info.vue
  11. 12
      team/infoEdit/infoEdit.vue

@ -16,7 +16,7 @@
<view class="info"> <view class="info">
<view class="item"> <view class="item">
<view class="name">{{ item.prodName }}</view> <view class="name">{{ item.prodName }}</view>
<view class="meta">{{ item.price }}</view> <view class="meta">{{ item.price ? '¥' + item.price : '面议' }}</view>
</view> </view>
<view class="item"> <view class="item">
<view class="name">{{ item.skuName }}</view> <view class="name">{{ item.skuName }}</view>

@ -13,7 +13,7 @@
</view> </view>
</view> </view>
<view class="py"> <view class="py">
<uni-file-picker v-model="pic" limit="5" title="请上传封面图片,至少一张" :auto-upload="false" @select="uploadPic"></uni-file-picker> <uni-file-picker v-model="pic" limit="5" title="请上传封面图片,至少一张" :auto-upload="false" @delete="delPic" @select="uploadPic"></uni-file-picker>
</view> </view>
</view> </view>
@ -25,7 +25,7 @@
<textarea placeholder="描述一下宝贝的品牌型号、货品来源..." v-model="form.brief"></textarea> <textarea placeholder="描述一下宝贝的品牌型号、货品来源..." v-model="form.brief"></textarea>
</view> </view>
<view class="py"> <view class="py">
<uni-file-picker v-model="imgs" limit="10" title="添加优质图片" :auto-upload="false" @select="uploadImgs"></uni-file-picker> <uni-file-picker v-model="imgs" limit="10" title="添加优质图片" :auto-upload="false" @delete="delImgs" @select="uploadImgs"></uni-file-picker>
</view> </view>
</view> </view>
</view> </view>
@ -116,7 +116,7 @@
showPopup: false, showPopup: false,
} }
}, },
onShow() { onLoad() {
const pages = getCurrentPages() const pages = getCurrentPages()
const { options } = pages[pages.length - 1] const { options } = pages[pages.length - 1]
this.prodId = options.prodId this.prodId = options.prodId
@ -162,24 +162,38 @@
}, },
// //
uploadPic(e){ uploadPic(e){
OSS(e.tempFilePaths[0], (res) => { e.tempFilePaths.forEach(n => {
this.pic.push({ OSS(n, (res) => {
name: res.name, this.pic.push({
extname: res.ext, name: res.name,
url: res.url, extname: res.ext,
url: res.url,
})
}) })
}) })
}, },
// //
delPic(e) {
const i = this.pic.findIndex(n => n.url === e.tempFilePath)
if (i !== -1) this.pic.splice(i, 1)
},
//
uploadImgs(e){ uploadImgs(e){
OSS(e.tempFilePaths[0], (res) => { e.tempFilePaths.forEach(n => {
this.imgs.push({ OSS(n, (res) => {
name: res.name, this.imgs.push({
extname: res.ext, name: res.name,
url: res.url, extname: res.ext,
url: res.url,
})
}) })
}) })
}, },
//
delImgs(e) {
const i = this.imgs.findIndex(n => n.url === e.tempFilePath)
if (i !== -1) this.imgs.splice(i, 1)
},
// //
showPrice(item) { showPrice(item) {
this.curSku = item this.curSku = item
@ -194,7 +208,7 @@
}, },
// sku // sku
addSku() { addSku() {
this.form.skuList.push(this.originSku) this.form.skuList.push(JSON.parse(JSON.stringify(this.originSku)))
}, },
// //
async submit(status) { async submit(status) {
@ -230,7 +244,6 @@
this.submiting = true this.submiting = true
form.pic = this.pic.map(e => e.url).join() form.pic = this.pic.map(e => e.url).join()
form.imgs = this.imgs.map(e => e.url).join() form.imgs = this.imgs.map(e => e.url).join()
form.oriPrice = form.skuList[0].oriPrice form.oriPrice = form.skuList[0].oriPrice
form.price = form.skuList[0].price form.price = form.skuList[0].price
let stocks = 0 let stocks = 0

@ -1,5 +1,5 @@
<template> <template>
<view class="wrap"> <view class="page">
<view class="banner"> <view class="banner">
<uni-swiper-dot class="swiper" v-if="pic.length" :current="curPic" :info="pic" field="id" mode="round" :dotsStyles="dotsStyles"> <uni-swiper-dot class="swiper" v-if="pic.length" :current="curPic" :info="pic" field="id" mode="round" :dotsStyles="dotsStyles">
<swiper class="swiper-box" autoplay @change="picChange"> <swiper class="swiper-box" autoplay @change="picChange">
@ -12,13 +12,19 @@
<view class="detail"> <view class="detail">
<view class="prices"> <view class="prices">
<text class="price">售价 {{ info.price }}</text> <text class="price">售价 {{ info.price ? '¥ ' + info.price + '起' : '面议' }}</text>
<text class="oriPrice">市场价 {{ info.oriPrice }}</text> <text v-if="info.oriPrice" class="oriPrice">市场价 {{ info.oriPrice }}</text>
</view> </view>
<view class="name">{{ info.prodName }}</view> <view class="name">{{ info.prodName }}</view>
<view class="sku"> <view v-if="info.skuList && info.skuList.length" class="sku">
<view class="item"> <view class="sku-title">
<text></text> <image class="icon" src="http://124.71.79.122/images/miniProgram/order1.png" mode="widthFix"></image>
规格
</view>
<view v-for="(item, i) in info.skuList" :key="i" class="item">
<text class="sku-name">{{ item.skuName }}</text>
<text class="sku-price">{{ item.price ? '¥ ' + item.price : '面议' }}</text>
<text class="sku-stocks">库存{{ item.stocks }}</text>
</view> </view>
</view> </view>
</view> </view>
@ -26,6 +32,13 @@
<view class="detail"> <view class="detail">
<view class="title">商品详情</view> <view class="title">商品详情</view>
<mp-html :content="info.brief"/> <mp-html :content="info.brief"/>
<view v-if="imgs.length" class="img-wrap">
<image v-for="(item, i) in imgs" :key="i" class="img" :src="item" mode="widthFix"></image>
</view>
</view>
<view v-if="info.status === 2 || info.status === 3" class="btn-wrap">
<view class="btn" @click="$util.to(`/other/addGoods/addGoods?prodId=${prodId}`)">编辑</view>
</view> </view>
</view> </view>
</template> </template>
@ -102,13 +115,17 @@
}, },
// //
picChange(e) { picChange(e) {
this.curBanner = e.detail.current; this.curPic = e.detail.current;
}, },
} }
} }
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.page {
padding-bottom: 170rpx;
-webkit-overflow-scrolling: touch;
}
.banner { .banner {
position: relative; position: relative;
.pic { .pic {
@ -151,5 +168,44 @@
font-weight: 600; font-weight: 600;
color: #333; color: #333;
} }
.sku {
.item {
display: flex;
justify-content: space-between;
align-items: center;
}
.sku-title {
display: flex;
align-items: center;
margin: 40rpx 0 5rpx;
font-size: 30rpx;
font-weight: 600;
color: #333;
.icon {
width: 40rpx;
margin-right: 10rpx;
}
}
.sku-name {
font-size: 28rpx;
color: #333;
}
.sku-price {
margin: 10rpx 0;
font-size: 28rpx;
color: #ff3313;
}
.sku-stocks {
font-size: 26rpx;
color: #868686;
}
}
.img-wrap {
margin-top: 20rpx;
text-align: center;
.img {
max-width: 100%;
}
}
} }
</style> </style>

@ -45,7 +45,7 @@
<text>{{ info.orderType === 1 ? '个人' : '组织' }}</text> <text>{{ info.orderType === 1 ? '个人' : '组织' }}</text>
</view> </view>
<view class="line"> <view class="line">
<text class="field">所属幼儿园</text> <text class="field">所属组织</text>
<text>{{ info.shopName }}</text> <text>{{ info.shopName }}</text>
</view> </view>
<view class="line"> <view class="line">

@ -1,8 +1,11 @@
<template> <template>
<view class="wrap"> <view class="wrap">
<view class="top"> <view class="top">
<view class="name">{{ form.classificationName }}</view> <view class="name-wrap">
<image class="logo" :src="form.logoUrl ? form.logoUrl : Common.shopIcon"></image> <image class="logo" :src="form.logoUrl ? form.logoUrl : Common.shopIcon"></image>
<view class="name ell2">{{ form.classificationName }}</view>
</view>
<view v-if="form.slogan" class="slogan">{{ form.slogan }}</view> <view v-if="form.slogan" class="slogan">{{ form.slogan }}</view>
<view class="star" @click.stop="collect"> <view class="star" @click.stop="collect">
@ -53,14 +56,21 @@
</view> </view>
<view v-else-if="goods.length" class="list"> <view v-else-if="goods.length" class="list">
<view v-for="(item, i) in goods" :key="i" class="item"> <view v-for="(item, i) in goods" :key="i" class="item" @click="toGoods(item)">
<image class="pic" :src="item.pic"></image> <image class="pic" :src="item.pic"></image>
<view class="texts"> <view class="texts">
<view class="name">{{ item.prodName }}</view> <view class="name">{{ item.prodName }}</view>
<view class="price">{{ item.price }}</view> <view class="price">{{ item.price ? '¥' + item.price : '面议' }}</view>
</view> </view>
</view> </view>
</view> </view>
<view class="order" @click="toOrder">
<image class="icon" src="http://124.71.79.122/images/miniProgram/order.png" mode="widthFix"></image>
<view class="text">我想采购</view>
</view>
<order ref="order" />
</view> </view>
</template> </template>
@ -201,6 +211,17 @@
this.getInfo() this.getInfo()
} }
}, },
//
toGoods(item) {
this.$util.to(`/other/goodsDetail/goodsDetail?prodId=${item.prodId}`)
},
//
toOrder() {
const el = this.$refs.order
el.remarks = ''
el.getGoods(this.teamId)
el.$refs.popup.open()
},
} }
} }
</script> </script>
@ -214,22 +235,27 @@
} }
.top { .top {
position: relative; position: relative;
display: flex;
flex-direction: column;
justify-content: center;
min-height: 300rpx; min-height: 300rpx;
padding: 40rpx; padding: 40rpx;
background: url(http://124.71.79.122/images/miniProgram/supplier-bg.jpg) 0 0/100% 100% no-repeat; background: url(http://124.71.79.122/images/miniProgram/supplier-bg.jpg) 0 0/100% 100% no-repeat;
box-sizing: border-box; box-sizing: border-box;
.name-wrap {
display: flex;
align-items: center;
}
.name { .name {
font-size: 38rpx; font-size: 38rpx;
font-weight: 600; font-weight: 600;
color: #000; color: #000;
} }
.logo { .logo {
position: absolute;
top: 20rpx;
right: 20rpx;
width: 80rpx; width: 80rpx;
min-width: 80rpx; min-width: 80rpx;
height: 80rpx; height: 80rpx;
margin-right: 20rpx;
border-radius: 50%; border-radius: 50%;
} }
.slogan { .slogan {
@ -256,7 +282,7 @@
margin: 20rpx 0; margin: 20rpx 0;
.pic { .pic {
width: 100%; width: 100%;
height: 300rpx; height: 500rpx;
} }
} }
.des { .des {
@ -268,7 +294,7 @@
.info { .info {
display: flex; display: flex;
align-items: center; align-items: center;
font-size: 28rpx; font-size: 26rpx;
color: #333; color: #333;
&.address { &.address {
margin: 30rpx 0 20rpx; margin: 30rpx 0 20rpx;
@ -323,4 +349,25 @@
color: #ff0047; color: #ff0047;
} }
} }
.order {
position: fixed;
bottom: 200rpx;
right: 40rpx;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
width: 150rpx;
padding: 20rpx 0 30rpx;
color: #fff;
background-color: #4876f9;
border-radius: 50%;
.icon {
width: 60rpx;
margin-bottom: 10rpx;
}
.text {
font-size: 24rpx;
}
}
</style> </style>

@ -23,11 +23,12 @@
</view> </view>
</view> </view>
<!-- 选择角色 -->
<uni-popup ref="popup" :is-mask-click="false"> <uni-popup ref="popup" :is-mask-click="false">
<view class="type-wrap"> <view class="type-wrap">
<view class="title-wrap"> <view class="title-wrap">
<view class="title">请选择注册类型</view> <view class="title">请选择注册类型</view>
<uni-icons class="close" type="closeempty" size="20" color="#333"></uni-icons> <!-- <uni-icons class="close" type="closeempty" size="20" color="#333"></uni-icons> -->
</view> </view>
<view class="types"> <view class="types">
@ -52,15 +53,29 @@
</view> </view>
</view> </view>
</uni-popup> </uni-popup>
<!-- 上传头像 -->
<uni-popup ref="uploadAvatarPop" background-color="#fff" type="bottom" :mask-click="false">
<view class="avatar-wrap">
<button class="avatar-btn" open-type="chooseAvatar" @chooseavatar="onChooseAvatar">
<image class="avatar" :src="avatar ? avatar : Common.avatar" mode=""></image>
</button>
<view class="text">请选择头像</view>
<view class="btn" @click="showPlatform">下一步</view>
</view>
</uni-popup>
</view> </view>
</template> </template>
<script> <script>
import { login, userBinding, getSessionKey, kindergartenWeChatApplication, saveCertification, loginWithPhoneNumber } from '@/apis/modules/user.js' import { login, userBinding, getSessionKey, kindergartenWeChatApplication, saveCertification, loginWithPhoneNumber, updateAvatars } from '@/apis/modules/user.js'
import WXBizDataCrypt from '@/libs/WXBizDataCrypt' import WXBizDataCrypt from '@/libs/WXBizDataCrypt'
import OSS from '@/libs/Oss/upload'
import Common from '@/config/common'
export default { export default {
data() { data() {
return { return {
Common,
agree: [], agree: [],
agreeData: [{ agreeData: [{
text: '同意', text: '同意',
@ -74,7 +89,9 @@
code: '', code: '',
phone: '', phone: '',
submiting: false, submiting: false,
teamName: '' teamName: '',
// avatar: Common.avatar,
avatar: '',
} }
}, },
onShow() { onShow() {
@ -174,8 +191,8 @@
uni.setStorageSync('openId', res.data.openId) uni.setStorageSync('openId', res.data.openId)
// uni.setStorageSync('teamId', data.teamId) // uni.setStorageSync('teamId', data.teamId)
} else { } else {
this.$refs.uploadAvatarPop.open()
this.submiting = false this.submiting = false
this.$refs.popup.open('bottom')
} }
} else { // } else { //
userBinding({ userBinding({
@ -240,6 +257,16 @@
}) })
} }
this.handleTab(platformId) this.handleTab(platformId)
//
if (this.avatar) {
await updateAvatars({
url: this.avatar,
userName: '',
openId: data.openId,
platformId
})
}
this.toIndex() this.toIndex()
} catch(e) { } catch(e) {
this.submiting = false this.submiting = false
@ -260,7 +287,18 @@
uni.reLaunch({ uni.reLaunch({
url: '../index/index' url: '../index/index'
}) })
} },
//
onChooseAvatar(e) {
OSS(e.detail.avatarUrl, async ({ url }) => {
this.avatar = url
})
},
//
showPlatform() {
this.$refs.uploadAvatarPop.close()
this.$refs.popup.open('bottom')
},
} }
} }
</script> </script>
@ -414,4 +452,41 @@
} }
} }
} }
.avatar-wrap {
padding: 30rpx 0;
.avatar-btn {
padding: 0;
line-height: 0;
border: 0 !important;
background-color: transparent;
outline: none;
border-radius: 50%;
&:after {
display: none;
}
}
.avatar {
width: 120rpx;
height: 120rpx;
border: 0;
border-radius: 50%;
}
.text {
margin-top: 10rpx;
font-size: 26rpx;
text-align: center;
color: #7d7d7d;
}
.btn {
width: 300rpx;
padding: 20rpx 0;
margin: 30rpx auto 0;
font-size: 28rpx;
color: #fff;
text-align: center;
background-color: $uni-primary;
border-radius: 20px;
}
}
</style> </style>

@ -13,7 +13,7 @@
<view class="info"> <view class="info">
<button class="avatar-btn" open-type="chooseAvatar" @chooseavatar="onChooseAvatar"> <button class="avatar-btn" open-type="chooseAvatar" @chooseavatar="onChooseAvatar">
<image class="avatar" :src="info.userAvatars" mode=""></image> <image class="avatar" :src="info.userAvatars" mode=""></image>
</button> </button>
<view> <view>
<view class="person"> <view class="person">
<view class="name">{{ info.userName || userName }}</view> <view class="name">{{ info.userName || userName }}</view>
@ -64,7 +64,7 @@
<view class="item"> <view class="item">
<view class="left"> <view class="left">
<view class="icon"> <view class="icon">
<image class="img" src="http://124.71.79.122/images/miniProgram/role-icon1.png" mode="widthFix" /> <image class="img" src="http://124.71.79.122/images/miniProgram/role-icon2.png" mode="widthFix" />
</view> </view>
<view class="text">我是供应商</view> <view class="text">我是供应商</view>
</view> </view>
@ -75,7 +75,7 @@
<view class="item item2"> <view class="item item2">
<view class="left"> <view class="left">
<view class="icon"> <view class="icon">
<image class="img" src="http://124.71.79.122/images/miniProgram/role-icon2.png" mode="widthFix" /> <image class="img" src="http://124.71.79.122/images/miniProgram/role-icon1.png" mode="widthFix" />
</view> </view>
<view class="text">我是幼儿园</view> <view class="text">我是幼儿园</view>
</view> </view>
@ -90,9 +90,9 @@
<view class="title">我是{{ platformName }}</view> <view class="title">我是{{ platformName }}</view>
<view v-if="!isMember" class="badge">{{ platformName }}负责人</view> <view v-if="!isMember" class="badge">{{ platformName }}负责人</view>
</view> </view>
<view class="auth"> <view class="auth" @click="toEnterAuth(platformId)">
{{ auditStatus }} {{ auditStatus }}
<uni-icons class="icon" type="right" size="16" color="#4876f9"></uni-icons> <uni-icons class="icon" type="right" size="16" color="#fd9413"></uni-icons>
</view> </view>
</view> </view>
<view class="identity-bg"> <view class="identity-bg">
@ -403,6 +403,9 @@
background-color: transparent; background-color: transparent;
outline: none; outline: none;
border-radius: 50%; border-radius: 50%;
&:after {
display: none;
}
} }
.avatar { .avatar {
width: 120rpx; width: 120rpx;
@ -492,12 +495,12 @@
padding: 4rpx 16rpx; padding: 4rpx 16rpx;
margin-left: 20rpx; margin-left: 20rpx;
font-size: 24rpx; font-size: 24rpx;
color: $uni-primary; color: #fd9413;
white-space: nowrap; white-space: nowrap;
border: 1px solid #8ca5eb; border: 1px solid #ffb23e;
border-radius: 20px; border-radius: 20px;
.icon { .icon {
color: $uni-primary; color: #fd9413;
} }
} }
} }

@ -13,7 +13,7 @@
<view class="pro-name"> <view class="pro-name">
<image v-if="item.logoUrl" class="icon logo" :src="item.logoUrl"></image> <image v-if="item.logoUrl" class="icon logo" :src="item.logoUrl"></image>
<image v-else class="icon" :src="Common.shopIcon"></image> <image v-else class="icon" :src="Common.shopIcon"></image>
{{ item.companyName }} <text class="ell2">{{ item.companyName }}</text>
</view> </view>
<view class="info"> <view class="info">
<view v-if="item.briefIntroduction" class="intro"> <view v-if="item.briefIntroduction" class="intro">
@ -241,6 +241,7 @@
font-weight: 600; font-weight: 600;
color: #333; color: #333;
border-bottom: 1px solid #E6E8ED; border-bottom: 1px solid #E6E8ED;
.icon { .icon {
width: 80rpx; width: 80rpx;
min-width: 80rpx; min-width: 80rpx;
@ -271,7 +272,7 @@
font-size: 26rpx; font-size: 26rpx;
color: #3c3c3c; color: #3c3c3c;
.text { .text {
max-width: 49%; max-width: 86%;
} }
} }
.meta { .meta {
@ -296,14 +297,14 @@
} }
.actions { .actions {
display: flex; display: flex;
justify-content: flex-end; justify-content: space-between;
align-items: center; align-items: center;
} }
.star { .star {
display: inline-flex; display: inline-flex;
align-items: center; align-items: center;
margin-right: 20rpx; margin-right: 20rpx;
font-size: 28rpx; font-size: 26rpx;
color: #333; color: #333;
.star-icon { .star-icon {
margin-right: 10rpx; margin-right: 10rpx;

@ -25,6 +25,13 @@ ul {
text-overflow: ellipsis; text-overflow: ellipsis;
overflow: hidden; overflow: hidden;
} }
.ell2 {
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
text-overflow: ellipsis;
overflow: hidden;
}
.l-title { .l-title {
display: flex; display: flex;
align-items: center; align-items: center;

@ -98,6 +98,7 @@
}, },
}, },
onShow() { onShow() {
this.pictureUrl = []
this.getEnterInfo() this.getEnterInfo()
this.getInfo() this.getInfo()
}, },

@ -235,11 +235,13 @@
}, },
// //
uploadDes(e){ uploadDes(e){
OSS(e.tempFilePaths[0], (res) => { e.tempFilePaths.forEach(n => {
this.desPics.push({ OSS(n, (res) => {
name: res.name, this.desPics.push({
extname: res.ext, name: res.name,
url: res.url, extname: res.ext,
url: res.url,
})
}) })
}) })
}, },

Loading…
Cancel
Save