yujialong 1 year ago
parent 433cdbe421
commit 74831cceaf
  1. 3
      apis/modules/user.js
  2. 83
      components/order/order.vue
  3. 6
      libs/share.js
  4. 3
      libs/util.js
  5. 100
      other/activityDetail/activityDetail.vue
  6. 37
      other/addGoods/addGoods.vue
  7. 75
      other/goodsDetail/goodsDetail.vue
  8. 2
      other/procureDetail/procureDetail.vue
  9. 45
      other/supplierDetail/supplierDetail.vue
  10. 3
      pages/person/person.vue
  11. 1
      pages/supplier/supplier.vue
  12. 24
      styles/common.scss
  13. 24
      team/certified/certified.vue
  14. 4
      team/infoEdit/infoEdit.vue
  15. 6
      team/qrcode/qrcode.vue

@ -43,6 +43,9 @@ export const enterpriseCertificationStatus = (openId) => {
export const saveCertification = (data) => {
return post(`nakadai/enterprise/certification/save`, data)
}
export const updateCertification = (data) => {
return post(`nakadai/enterprise/certification/update`, data)
}

@ -29,7 +29,6 @@
</scroll-view>
<textarea v-else class="msg" v-model="remarks" placeholder="请输入"></textarea>
</view>
<view class="btns">
<view class="btn" @click="procure(1)">个人采购</view>
<view v-if="platformId === 5" class="btn" @click="procure(2)">组织采购</view>
@ -50,11 +49,6 @@
import { list } from '@/apis/modules/goods.js'
export default {
name:"order",
// props: {
// prodId: {
// type: Number,
// },
// },
data() {
return {
platformId: uni.getStorageSync('platformId'),
@ -101,41 +95,50 @@
},
//
async procure(type) {
const { goods } = this
const hadOrder = goods.find(e => e.prodCount) //
if (!hadOrder && !this.remarks) return this.$util.errMsg(`请输入采购数量或者留言信息!`)
try {
//
if (hadOrder) {
const data = goods.filter(e => e.prodCount).map(e => {
return {
prodCount: e.prodCount,
prodId: e.prodId,
shopId: this.shopId,
skuId: e.skuId,
}
})
await orderConfirm({
orderItem: data
})
const that = this
uni.showModal({
title: '提示',
content: '是否提交采购咨询?',
async success(res) {
if (res.confirm) {
const { goods } = that
const hadOrder = goods.find(e => e.prodCount) //
if (!hadOrder && !that.remarks) return that.$util.errMsg(`请输入采购数量或者留言信息!`)
try {
//
if (hadOrder) {
const data = goods.filter(e => e.prodCount).map(e => {
return {
prodCount: e.prodCount,
prodId: e.prodId,
shopId: that.shopId,
skuId: e.skuId,
}
})
await orderConfirm({
orderItem: data
})
}
//
const res = await orderSubmit({
leaveAMessage: hadOrder ? false : true,
orderShopParam: [
{
remarks: that.remarks,
shopId: that.shopId
}
],
orderType: type
})
that.orderNumbers = res.data.orderNumbers
that.$refs.popup.close()
that.$refs.successDia.open()
} catch (e) {}
}
}
//
const res = await orderSubmit({
leaveAMessage: hadOrder ? false : true,
orderShopParam: [
{
remarks: this.remarks,
shopId: this.shopId
}
],
orderType: type
})
this.orderNumbers = res.data.orderNumbers
this.$refs.popup.close()
this.$refs.successDia.open()
} catch (e) {}
})
},
//
dialogConfirm() {

@ -1,10 +1,12 @@
export default{
// 监听用户点击右上角菜单的「转发」按钮时触发的事件
onShareAppMessage() {
onShareAppMessage(e) {
const pages = getCurrentPages()
const { route, $page } = pages[pages.length - 1]
// 设置转发的参数
return {
title: "GPAC",
// path: '',
path: route === 'other/activityDetail/activityDetail' ? $page : '',
imageUrl: "",
success: function(res) {
if (res.errMsg == 'shareAppMessage:ok') {

@ -3,9 +3,6 @@ import { getCurrentTime } from '@/apis/modules/activity.js'
const files = [
'https://huorantech.cn/%E7%94%A8%E6%88%B7%E6%9C%8D%E5%8A%A1%E5%8D%8F%E8%AE%AE.docx', // 用户服务协议
'https://huorantech.cn/%E7%94%A8%E6%88%B7%E9%9A%90%E7%A7%81%E5%8D%8F%E8%AE%AE.docx', // 用户隐私协议
'https://huorantech.cn/%E4%BA%BA%E5%B7%A5%E6%99%BA%E8%83%BD%E5%AE%9E%E9%AA%8C%E5%AE%A4%E5%BB%BA%E8%AE%BE%E6%96%B9%E6%A1%88-2020.1.docx', // 人工智能
'https://huorantech.cn/%E5%A4%A7%E6%95%B0%E6%8D%AE%E7%AE%A1%E7%90%86%E4%B8%8E%E5%BA%94%E7%94%A8%E4%B8%93%E4%B8%9A%E5%BB%BA%E8%AE%BE%E6%96%B9%E6%A1%88.docx', // 大数据
'https://huorantech.cn/%E9%87%91%E8%9E%8D%E7%A7%91%E6%8A%80%E5%AE%9E%E9%AA%8C%E5%AE%A4%E5%BB%BA%E8%AE%BE%E6%96%B9%E6%A1%88V2.0.docx', // 金融科技
]
const docExts = ['doc', 'xls', 'ppt', 'pdf', 'docx', 'xlsx', 'pptx']
export default {

@ -43,6 +43,16 @@
<view v-if="!curTab" class="detail">
<mp-html :content="form.description"/>
<template v-if="form.competitionAnnexList && form.competitionAnnexList.length">
<view class="file-title">附件</view>
<view class="files">
<view class="file" v-for="(file, i) in form.competitionAnnexList" :key="i">
<text class="file-name">{{ file.fileName }}</text>
<view class="download" @click="download(file)">下载</view>
</view>
</view>
</template>
</view>
<view v-else-if="curTab === 2" class="list">
<view v-for="(item, i) in list" :key="i" class="item" @click="toDetail(item)">
@ -58,7 +68,7 @@
<view :class="['btn sign', {signed, disabled: comStatus !== 1}]" @click="presign">{{ stopSign ? (signed ? '已报名' : '已截止报名') : comStatus === 1 ? (signed ? '取消报名' : '立刻报名') : statusList[comStatus] }}</view>
</view>
<uni-popup ref="popup" type="dialog">
<uni-popup v-if="popupShow" ref="popup" type="dialog">
<uni-popup-dialog mode="input" placeholder="请输入4位数邀请码" :duration="2000" :before-close="true" @close="closePopup" @confirm="codeSubmit"></uni-popup-dialog>
</uni-popup>
</view>
@ -103,6 +113,7 @@
now: '',
invitationCode: '',
submiting: false,
popupShow: false,
}
},
//
@ -126,6 +137,10 @@
this.stopSign = 0
this.id = options.id
this.getInfo()
this.focus = false
},
onLoad() {
this.focus = false
},
methods: {
//
@ -223,7 +238,14 @@
} else { //
this.invitationCode = ''
//
this.form.isNeedCode ? this.$refs.popup.open() : this.sign()
if (this.form.isNeedCode) {
this.popupShow = true
this.$nextTick(() => {
this.$refs.popup.open()
})
} else {
this.sign()
}
}
},
//
@ -267,6 +289,62 @@
this.invitationCode = value
this.sign()
},
download(item) {
uni.showLoading({
title: '加载中',
mask: true
})
//
uni.downloadFile({
url: item.filePath,
success: function(res) {
console.log('result:', res)
// uni.hideLoading();
if (res.statusCode === 200) {
uni.getFileSystemManager().saveFile({
tempFilePath: res.tempFilePath,
success(res) {
console.log('saveFile:',res.savedFilePath)
uni.openDocument({
filePath: res.savedFilePath,
showMenu: true, //
success: (res) => {
uni.hideLoading()
console.log(res);
},
fail: (e) => {
uni.showToast({
title: '打开失败',
icon: "error"
})
}
})
}
})
}
// uni.showLoading({
// title: '',
// mask: true
// })
// doc, xls, ppt, pdf, docx, xlsx, pptx
// uni.openDocument({
// filePath: res.tempFilePath,
// fileType: 'docx', // doc, xls, ppt, pdf, docx, xlsx, pptx
// showMenu: true, //
// success: res => {
// uni.hideLoading()
// },
// fail: openError => {
// uni.hideLoading()
// }
// })
},
fail: function(err) {
uni.hideLoading()
}
})
},
}
}
</script>
@ -311,6 +389,24 @@
margin: 20rpx;
border-radius: 20px;
background-color: #fff;
.file-title {
margin: 40rpx 0 20rpx;
font-size: 26rpx;
color: $uni-primary;
}
.file {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 15rpx;
font-size: 24rpx;
}
.file-name {
color: #333;
}
.download {
color: $uni-primary;
}
}
.list {
margin: 0 30rpx;

@ -15,7 +15,6 @@
<view class="py">
<uni-file-picker v-model="pic" limit="5" title="请上传封面图片,至少一张" :auto-upload="false" @delete="delPic" @select="uploadPic"></uni-file-picker>
</view>
</view>
</view>
@ -35,7 +34,7 @@
<view class="form-list edit-form">
<view class="line">
<view class="name">规格名称</view>
<input type="text" placeholder="请输入规格名称" v-model="item.skuName" />
<input type="text" placeholder="请输入规格名称" v-model="item.skuName" @blur="skuNameChange" />
</view>
<view class="line">
<view class="name">价格</view>
@ -62,11 +61,11 @@
</view>
<uni-popup ref="popup" background-color="#fff" type="bottom" @change="popupChange">
<view class="block">
<view class="block popup-block">
<view class="form-list edit-form">
<view class="line">
<view class="name">售价</view>
<input ref="price" :focus="showPopup" type="text" step="0.01" placeholder="请输入售价" v-model="curSku.price" />
<input ref="price" type="text" step="0.01" placeholder="请输入售价" v-model="curSku.price" @blur="priceChange" />
</view>
<view class="line">
<view class="name">市场价</view>
@ -211,6 +210,17 @@
addSku() {
this.form.skuList.push(JSON.parse(JSON.stringify(this.originSku)))
},
// sku
skuNameChange(e) {
console.log(3, e)
this.form.skuList.filter(n => n.skuName === e.detail.value).length > 1 && this.$util.errMsg(`规格名称不能重复!`)
},
priceChange(e) {
const { value } = e.detail
if (value && isNaN(+value)) {
this.$util.errMsg(`价格请输入数字!`)
}
},
//
async submit(status) {
if (this.submiting) return false
@ -227,14 +237,14 @@
this.$util.errMsg(`请输入规格名称!`)
invalid = 1
}
// if (!e.price) {
// this.$util.errMsg(``)
// invalid = 1
// }
// if (!e.oriPrice) {
// this.$util.errMsg(``)
// invalid = 1
// }
if (e.price && isNaN(+e.price)) {
this.$util.errMsg(`售价请输入数字!`)
invalid = 1
}
if (e.oriPrice && isNaN(+e.oriPrice)) {
this.$util.errMsg(`市场价请输入数字!`)
invalid = 1
}
if (!e.stocks) {
this.$util.errMsg(`请输入库存!`)
invalid = 1
@ -339,4 +349,7 @@
background-color: $uni-primary;
}
}
.popup-block {
padding: 40rpx 30rpx;
}
</style>

@ -12,19 +12,23 @@
<view class="detail">
<view class="prices">
<text class="price">售价 {{ info.price ? '¥ ' + info.price + '起' : '面议' }}</text>
<view class="price-wrap">
<text>售价</text>
<text class="price">{{ info.price ? '¥ ' + info.price + '起' : '面议' }}</text>
</view>
<text v-if="info.oriPrice" class="oriPrice">市场价 {{ info.oriPrice }}</text>
</view>
<view class="name">{{ info.prodName }}</view>
<view v-if="info.skuList && info.skuList.length" class="sku">
<view v-if="info.skuList && info.skuList.length" class="sku-wrap">
<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 class="skus">
<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>
</view>
</view>
</view>
</view>
@ -40,6 +44,15 @@
<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>
<template v-if="info.status === 1">
<view class="order-btn" @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" />
</template>
</view>
</template>
@ -49,6 +62,7 @@
export default {
data() {
return {
teamId: uni.getStorageSync('teamId'),
isTeam: uni.getStorageSync('team').isTeam == 1, //
prodId: '',
curPic: 0,
@ -118,6 +132,13 @@
picChange(e) {
this.curPic = e.detail.current;
},
//
toOrder() {
const el = this.$refs.order
el.remarks = ''
el.getGoods(this.teamId)
el.$refs.popup.open()
},
}
}
</script>
@ -152,7 +173,11 @@
display: flex;
justify-content: space-between;
align-items: center;
.price-wrap {
color: #000;
}
.price {
margin-left: 10rpx;
font-size: 38rpx;
font-weight: 600;
color: #f70000;
@ -164,17 +189,15 @@
}
}
.name {
padding: 20rpx 0;
margin: 20rpx 0;
font-size: 32rpx;
font-weight: 600;
color: #333;
border-top: 1px dashed #e6e6e6;
border-bottom: 1px dashed #e6e6e6;
}
.sku {
.item {
display: flex;
justify-content: space-between;
align-items: center;
}
.sku-wrap {
.sku-title {
display: flex;
align-items: center;
@ -187,18 +210,32 @@
margin-right: 10rpx;
}
}
.skus {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
margin-top: 20rpx;
}
.item {
display: inline-flex;
justify-content: space-between;
align-items: center;
width: 48%;
padding: 15rpx;
margin-bottom: 20rpx;
background-color: #f2f5ff;
box-sizing: border-box;
border-radius: 8px;
}
.sku-name {
font-size: 28rpx;
color: #333;
font-weight: 600;
color: $uni-primary;
}
.sku-price {
margin: 10rpx 0;
font-size: 28rpx;
color: #ff3313;
}
.sku-stocks {
font-size: 26rpx;
color: #868686;
font-weight: 600;
color: $uni-primary;
}
}
.img-wrap {

@ -44,7 +44,7 @@
<text class="field">采购类型</text>
<text>{{ info.orderType === 1 ? '个人' : '组织' }}</text>
</view>
<view class="line">
<view v-if="info.orderType === 2" class="line">
<text class="field">所属组织</text>
<text>{{ info.shopName }}</text>
</view>

@ -60,12 +60,15 @@
<image class="pic" :src="item.pic"></image>
<view class="texts">
<view class="name">{{ item.prodName }}</view>
<view class="price">{{ item.price ? '¥' + item.price : '面议' }}</view>
<view class="prices">
<text class="price">{{ item.price ? '¥' + item.price : '面议' }}</text>
<text v-if="item.oriPrice" class="ori">{{ item.oriPrice }}</text>
</view>
</view>
</view>
</view>
<view class="order" @click="toOrder">
<view class="order-btn" @click="toOrder">
<image class="icon" src="http://124.71.79.122/images/miniProgram/order.png" mode="widthFix"></image>
<view class="text">我想采购</view>
</view>
@ -256,11 +259,12 @@
color: #000;
}
.logo {
width: 100rpx;
min-width: 100rpx;
height: 100rpx;
width: 120rpx;
min-width: 120rpx;
height: 120rpx;
margin-right: 20rpx;
border-radius: 50%;
object-fit: cover;
}
.slogan {
margin-top: 40rpx;
@ -297,7 +301,7 @@
}
.info {
display: flex;
align-items: center;
align-items: flex-start;
font-size: 26rpx;
color: #333;
&.address {
@ -305,6 +309,7 @@
}
.icon {
width: 40rpx;
min-width: 40rpx;
margin-right: 10rpx;
}
}
@ -348,30 +353,18 @@
font-size: 30rpx;
font-weight: 600;
}
.prices {
display: flex;
justify-content: space-between;
}
.price {
font-size: 26rpx;
font-size: 34rpx;
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 {
.ori {
font-size: 24rpx;
text-decoration: line-through;
color: #666;
}
}
</style>

@ -48,7 +48,8 @@
<image src="http://124.71.79.122/images/miniProgram/icon4.png" />
<view class="text ell">我的发票</view>
</li> -->
<li v-if="!isSupplier" @click="toPage('/other/procure/procure')">
<!-- v-if="!isSupplier" -->
<li @click="toPage('/other/procure/procure')">
<image src="http://124.71.79.122/images/miniProgram/icon5.png" />
<view class="text ell">我的采购</view>
</li>

@ -100,6 +100,7 @@
}
},
onShow() {
this.$refs.order.platformId = uni.getStorageSync('platformId')
this.active = ''
this.keyword = ''
this.typeVisible = false

@ -350,4 +350,28 @@ ul {
padding-bottom: 0 !important;
overflow: hidden;
filter: blur(10px);
}
.order-btn {
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%;
box-shadow: 0 0 8px rgba(74, 121, 255, .8);
.icon {
width: 60rpx;
margin-bottom: 10rpx;
}
.text {
font-size: 24rpx;
}
}

@ -22,16 +22,19 @@
</view>
<view class="btn-wrap">
<view class="btn" @click="back">确定</view>
<!-- 队长可以取消认证 -->
<view v-if="team.isTeam == 1" class="btn" @click="cancel">取消认证</view>
<view v-else class="btn" @click="back">确定</view>
</view>
</view>
</template>
<script>
import { enterpriseCertificationStatus } from '@/apis/modules/user.js'
import { enterpriseCertificationStatus, updateCertification } from '@/apis/modules/user.js'
export default {
data() {
return {
team: uni.getStorageSync('team'),
openId: uni.getStorageSync('openId'),
info: {}
}
@ -45,6 +48,23 @@
const { data } = await enterpriseCertificationStatus(this.openId)
this.info = data
},
//
cancel() {
const that = this
uni.showModal({
title: '提示',
content: '取消认证后需要重新进行认证,是否继续?',
async success(res) {
if (res.confirm) {
that.info.authenticationStatus = 0
await updateCertification(that.info)
setTimeout(() => {
uni.navigateBack()
}, 1500)
}
}
})
},
//
back() {
uni.navigateBack()

@ -8,7 +8,7 @@
</view>
<view class="line with-arrow">
<view class="name">{{ platformName }}名称</view>
<input type="text" :placeholder="'请输入' + platformName + '幼儿园名称'" v-model="form.classificationName" :disabled="info.authenticationStatus !== 0" />
<input type="text" :placeholder="'请输入' + platformName + '名称'" v-model="form.classificationName" :disabled="info.authenticationStatus !== 0" />
</view>
<view v-if="info.platformSource === '6'" class="line with-arrow">
<view class="name">供应商分类</view>
@ -259,7 +259,7 @@
async submit() {
if (this.submiting) return false
const { form } = this
if (!form.classificationName) return this.$util.errMsg(`请输入幼儿园名称!`)
if (!form.classificationName) return this.$util.errMsg(`请输入${this.platformName}名称!`)
this.submiting = true
form.pictureUrl = this.desPics.map(e => e.url).join()
form.qrCodeOneUrl = this.qrCodeOne.length ? this.qrCodeOne[0].url : ''

@ -3,10 +3,10 @@
<view class="wrap">
<view class="inner">
<view class="info">
<image class="avatar" :src="info.userAvatars" mode=""></image>
<image class="avatar" :src="info.userAvatars || Common.avatar" mode=""></image>
<view class="text">
<view class="invite">
<text class="name">{{ my.info.userName }}</text> 邀请你加入组织
<text class="name">{{ info.userName }}</text> 邀请你加入组织
</view>
</view>
</view>
@ -25,9 +25,11 @@
<script>
import { generateInvitationCode } from '@/apis/modules/parner.js'
import { viewUserDetails } from '@/apis/modules/user.js'
import Common from '@/config/common'
export default {
data() {
return {
Common,
teamId: uni.getStorageSync('teamId'),
openId: uni.getStorageSync('openId'),
platformId: uni.getStorageSync('platformId'),

Loading…
Cancel
Save