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. 17
      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="item">
<view class="name">{{ item.prodName }}</view>
<view class="meta">{{ item.price }}</view>
<view class="meta">{{ item.price ? '¥' + item.price : '面议' }}</view>
</view>
<view class="item">
<view class="name">{{ item.skuName }}</view>

@ -13,7 +13,7 @@
</view>
</view>
<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>
@ -25,7 +25,7 @@
<textarea placeholder="描述一下宝贝的品牌型号、货品来源..." v-model="form.brief"></textarea>
</view>
<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>
@ -116,7 +116,7 @@
showPopup: false,
}
},
onShow() {
onLoad() {
const pages = getCurrentPages()
const { options } = pages[pages.length - 1]
this.prodId = options.prodId
@ -162,24 +162,38 @@
},
//
uploadPic(e){
OSS(e.tempFilePaths[0], (res) => {
this.pic.push({
name: res.name,
extname: res.ext,
url: res.url,
e.tempFilePaths.forEach(n => {
OSS(n, (res) => {
this.pic.push({
name: res.name,
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){
OSS(e.tempFilePaths[0], (res) => {
this.imgs.push({
name: res.name,
extname: res.ext,
url: res.url,
e.tempFilePaths.forEach(n => {
OSS(n, (res) => {
this.imgs.push({
name: res.name,
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) {
this.curSku = item
@ -194,7 +208,7 @@
},
// sku
addSku() {
this.form.skuList.push(this.originSku)
this.form.skuList.push(JSON.parse(JSON.stringify(this.originSku)))
},
//
async submit(status) {
@ -230,7 +244,6 @@
this.submiting = true
form.pic = this.pic.map(e => e.url).join()
form.imgs = this.imgs.map(e => e.url).join()
form.oriPrice = form.skuList[0].oriPrice
form.price = form.skuList[0].price
let stocks = 0

@ -1,5 +1,5 @@
<template>
<view class="wrap">
<view class="page">
<view class="banner">
<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">
@ -12,13 +12,19 @@
<view class="detail">
<view class="prices">
<text class="price">售价 {{ info.price }}</text>
<text class="oriPrice">市场价 {{ info.oriPrice }}</text>
<text class="price">售价 {{ info.price ? '¥ ' + info.price + '起' : '面议' }}</text>
<text v-if="info.oriPrice" class="oriPrice">市场价 {{ info.oriPrice }}</text>
</view>
<view class="name">{{ info.prodName }}</view>
<view class="sku">
<view class="item">
<text></text>
<view v-if="info.skuList && info.skuList.length" class="sku">
<view class="sku-title">
<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>
@ -26,6 +32,13 @@
<view class="detail">
<view class="title">商品详情</view>
<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>
</template>
@ -102,13 +115,17 @@
},
//
picChange(e) {
this.curBanner = e.detail.current;
this.curPic = e.detail.current;
},
}
}
</script>
<style scoped lang="scss">
.page {
padding-bottom: 170rpx;
-webkit-overflow-scrolling: touch;
}
.banner {
position: relative;
.pic {
@ -151,5 +168,44 @@
font-weight: 600;
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>

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

@ -1,8 +1,11 @@
<template>
<view class="wrap">
<view class="top">
<view class="name">{{ form.classificationName }}</view>
<image class="logo" :src="form.logoUrl ? form.logoUrl : Common.shopIcon"></image>
<view class="name-wrap">
<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 class="star" @click.stop="collect">
@ -53,14 +56,21 @@
</view>
<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>
<view class="texts">
<view class="name">{{ item.prodName }}</view>
<view class="price">{{ item.price }}</view>
<view class="price">{{ item.price ? '¥' + item.price : '面议' }}</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>
</template>
@ -201,6 +211,17 @@
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>
@ -214,22 +235,27 @@
}
.top {
position: relative;
display: flex;
flex-direction: column;
justify-content: center;
min-height: 300rpx;
padding: 40rpx;
background: url(http://124.71.79.122/images/miniProgram/supplier-bg.jpg) 0 0/100% 100% no-repeat;
box-sizing: border-box;
.name-wrap {
display: flex;
align-items: center;
}
.name {
font-size: 38rpx;
font-weight: 600;
color: #000;
}
.logo {
position: absolute;
top: 20rpx;
right: 20rpx;
width: 80rpx;
min-width: 80rpx;
height: 80rpx;
margin-right: 20rpx;
border-radius: 50%;
}
.slogan {
@ -256,7 +282,7 @@
margin: 20rpx 0;
.pic {
width: 100%;
height: 300rpx;
height: 500rpx;
}
}
.des {
@ -268,7 +294,7 @@
.info {
display: flex;
align-items: center;
font-size: 28rpx;
font-size: 26rpx;
color: #333;
&.address {
margin: 30rpx 0 20rpx;
@ -323,4 +349,25 @@
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>

@ -23,11 +23,12 @@
</view>
</view>
<!-- 选择角色 -->
<uni-popup ref="popup" :is-mask-click="false">
<view class="type-wrap">
<view class="title-wrap">
<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 class="types">
@ -52,15 +53,29 @@
</view>
</view>
</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>
</template>
<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 OSS from '@/libs/Oss/upload'
import Common from '@/config/common'
export default {
data() {
return {
Common,
agree: [],
agreeData: [{
text: '同意',
@ -74,7 +89,9 @@
code: '',
phone: '',
submiting: false,
teamName: ''
teamName: '',
// avatar: Common.avatar,
avatar: '',
}
},
onShow() {
@ -174,8 +191,8 @@
uni.setStorageSync('openId', res.data.openId)
// uni.setStorageSync('teamId', data.teamId)
} else {
this.$refs.uploadAvatarPop.open()
this.submiting = false
this.$refs.popup.open('bottom')
}
} else { //
userBinding({
@ -240,6 +257,16 @@
})
}
this.handleTab(platformId)
//
if (this.avatar) {
await updateAvatars({
url: this.avatar,
userName: '',
openId: data.openId,
platformId
})
}
this.toIndex()
} catch(e) {
this.submiting = false
@ -260,7 +287,18 @@
uni.reLaunch({
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>
@ -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>

@ -64,7 +64,7 @@
<view class="item">
<view class="left">
<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 class="text">我是供应商</view>
</view>
@ -75,7 +75,7 @@
<view class="item item2">
<view class="left">
<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 class="text">我是幼儿园</view>
</view>
@ -90,9 +90,9 @@
<view class="title">我是{{ platformName }}</view>
<view v-if="!isMember" class="badge">{{ platformName }}负责人</view>
</view>
<view class="auth">
<view class="auth" @click="toEnterAuth(platformId)">
{{ 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 class="identity-bg">
@ -403,6 +403,9 @@
background-color: transparent;
outline: none;
border-radius: 50%;
&:after {
display: none;
}
}
.avatar {
width: 120rpx;
@ -492,12 +495,12 @@
padding: 4rpx 16rpx;
margin-left: 20rpx;
font-size: 24rpx;
color: $uni-primary;
color: #fd9413;
white-space: nowrap;
border: 1px solid #8ca5eb;
border: 1px solid #ffb23e;
border-radius: 20px;
.icon {
color: $uni-primary;
color: #fd9413;
}
}
}

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

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

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

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

Loading…
Cancel
Save