yujialong 11 months ago
parent e4fe2631b2
commit ec94248e27
  1. 6
      apis/modules/order.js
  2. 63
      components/order/order.vue
  3. 1
      config/common.js
  4. 2
      other/activityDetail/activityDetail.vue
  5. 1
      other/addGoods/addGoods.vue
  6. 30
      other/goods/goods.vue
  7. 7
      other/procure/procure.vue
  8. 122
      other/procureDetail/procureDetail.vue
  9. 6
      other/vouchers/vouchers.vue
  10. 2
      pages.json
  11. 38
      pages/index/index.vue
  12. 7
      pages/supplier/supplier.vue

@ -7,9 +7,9 @@ export const myOrder = (data) => {
export const orderDetail = (data) => { export const orderDetail = (data) => {
return get('nakadai/myOrder/orderDetail', data) return get('nakadai/myOrder/orderDetail', data)
} }
export const confirm = (data) => { export const orderConfirm = (data) => {
return get('nakadai/order/order/confirm', data) return post('nakadai/order/order/confirm', data)
} }
export const orderSubmit = (data) => { export const orderSubmit = (data) => {
return get('nakadai/order/order/submit', data) return post('nakadai/order/order/submit', data)
} }

@ -24,10 +24,10 @@
</view> </view>
</view> </view>
<uni-number-box :value="item.price" :min="1"></uni-number-box> <uni-number-box v-model.number="item.prodCount" :min="0" :max="item.stocks"></uni-number-box>
</view> </view>
</scroll-view> </scroll-view>
<textarea v-else class="msg" placeholder="请输入"></textarea> <textarea v-else class="msg" v-model="remarks" placeholder="请输入"></textarea>
</view> </view>
<view class="btns"> <view class="btns">
@ -37,11 +37,17 @@
</view> </view>
</view> </view>
</uni-popup> </uni-popup>
<uni-popup ref="successDia" type="dialog">
<uni-popup-dialog type="success" cancelText="返回" confirmText="查询询价采购单" title="提示" content="发送成功" @confirm="dialogConfirm"
@close="dialogClose"></uni-popup-dialog>
</uni-popup>
</view> </view>
</template> </template>
<script> <script>
import { list, confirm, orderSubmit } from '@/apis/modules/goods.js' import { orderConfirm, orderSubmit } from '@/apis/modules/order.js'
import { list } from '@/apis/modules/goods.js'
export default { export default {
name:"order", name:"order",
// props: { // props: {
@ -52,6 +58,7 @@
data() { data() {
return { return {
platformId: uni.getStorageSync('platformId'), platformId: uni.getStorageSync('platformId'),
shopId: '',
tabs: [ tabs: [
{ {
id: 0, id: 0,
@ -64,6 +71,8 @@
], ],
curTab: 0, curTab: 0,
goods: [], goods: [],
remarks: '',
orderNumbers: '',
}; };
}, },
onShow() { onShow() {
@ -72,9 +81,11 @@
methods: { methods: {
// //
async getGoods(shopId) { async getGoods(shopId) {
this.shopId = shopId
const { data } = await list({ const { data } = await list({
shopId shopId
}) })
data.map(e => e.prodCount = '')
this.goods = data this.goods = data
}, },
change() { change() {
@ -82,17 +93,57 @@
}, },
// //
back() { back() {
this.$refs.popup.close()
}, },
// tab // tab
tabChange(tab) { tabChange(tab) {
this.curTab = tab.id this.curTab = tab.id
}, },
// //
procure(type) { async procure(type) {
confirm({ 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 res = await orderSubmit({
leaveAMessage: this.remarks ? true : false,
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() {
this.$util.to(`/other/procureDetail/procureDetail?id=${this.orderNumbers}`)
},
//
dialogClose() {
this.$refs.successDia.close()
}, },
} }
} }

@ -6,6 +6,7 @@
export default { export default {
avatar: 'https://cube.elemecdn.com/3/7c/3ea6beec64369c2642b92c6726f1epng.png', avatar: 'https://cube.elemecdn.com/3/7c/3ea6beec64369c2642b92c6726f1epng.png',
shopIcon: 'https://occupationlab.com/images/preschoolEdu/preSchool-icon.png',
// 角色 // 角色
platformSource: [ platformSource: [
{ {

@ -165,7 +165,7 @@
let signed = 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) //
const playEndTime = new Date(data.playEndTime) // const playEndTime = new Date(data.playEndTime) //
const { now } = this const { now } = this
// (whetherToSignUp 10) // (whetherToSignUp 10)

@ -198,6 +198,7 @@
form.price = form.skuList[0].price form.price = form.skuList[0].price
let stocks = 0 let stocks = 0
form.skuList.map(e => { form.skuList.map(e => {
e.prodName = form.prodName + ' ' + e.skuName
if (e.stocks) stocks += e.stocks if (e.stocks) stocks += e.stocks
}) })
form.totalStocks = stocks form.totalStocks = stocks

@ -3,7 +3,7 @@
<view class="page"> <view class="page">
<ul class="tab"> <ul class="tab">
<li :class="{active: curTab === ''}" @click="tabChange('')">全部</li> <li :class="{active: curTab === ''}" @click="tabChange('')">全部</li>
<li :class="{active: curTab === 0}" @click="tabChange(0)">已上架({{ status0 }})</li> <li :class="{active: curTab === 1}" @click="tabChange(0)">已上架({{ 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>
@ -65,7 +65,8 @@
list: [], list: [],
page: 1, page: 1,
pageSize: 10, pageSize: 10,
status0: 0, total: 0,
status1: 0,
status2: 0, status2: 0,
status3: 0, status3: 0,
status4: 0, status4: 0,
@ -95,7 +96,7 @@
} }
}, },
onShow() { onShow() {
this.status0 = 0 this.status1 = 0
this.status2 = 0 this.status2 = 0
this.status3 = 0 this.status3 = 0
this.status4 = 0 this.status4 = 0
@ -108,17 +109,32 @@
title: '加载中' title: '加载中'
}) })
page({ page({
status: this.curTab status: this.curTab,
}).then(({ data }) => { current: this.page,
}).then(({ page, productCount }) => {
//
const status1 = productCount.find(e => e.status === 1)
if (status1) this.status1 = status1.count
const status2 = productCount.find(e => e.status === 2)
if (status2) this.status2 = status2.count
const status3 = productCount.find(e => e.status === 3)
if (status3) this.status3 = status3.count
const status4 = productCount.find(e => e.status === 4)
if (status4) this.status4 = status4.count
uni.hideLoading() uni.hideLoading()
// list // list
const list = data.records const list = page.records
list.forEach(e => { list.forEach(e => {
if (e.pic) e.pic = e.pic.split(',')[0] if (e.pic) e.pic = e.pic.split(',')[0]
}) })
this.list = this.reachBottom > 0 ? [...this.list, ...list] : list this.list = this.reachBottom > 0 ? [...this.list, ...list] : list
this.page++ // page+1 this.page++ // page+1
const noMore = this.list.length === data.total // const noMore = this.list.length === page.total //
this.total = page.total
this.status = noMore ? 'noMore' : 'more' // noMore this.status = noMore ? 'noMore' : 'more' // noMore
this.reachBottom = noMore ? -1 : 0 // -1 this.reachBottom = noMore ? -1 : 0 // -1
}).catch(e => { }).catch(e => {

@ -9,7 +9,7 @@
<view class="list"> <view class="list">
<view class="item" v-for="item in list" @click="toDetail(item)"> <view class="item" v-for="item in list" @click="toDetail(item)">
<view class="metas"> <view class="metas">
<view class="serial">编号{{ item.putawayTime }}</view> <view class="serial">编号{{ item.orderNumber }}</view>
<view class="date">提交时间</view> <view class="date">提交时间</view>
</view> </view>
<view class="pro-name"> <view class="pro-name">
@ -106,9 +106,6 @@
uni.hideLoading() uni.hideLoading()
// list // list
const list = data.records const list = data.records
list.forEach(e => {
if (e.pic) e.pic = e.pic.split(',')[0]
})
this.list = this.reachBottom > 0 ? [...this.list, ...list] : list this.list = this.reachBottom > 0 ? [...this.list, ...list] : list
this.page++ // page+1 this.page++ // page+1
const noMore = this.list.length === data.total // const noMore = this.list.length === data.total //
@ -130,7 +127,7 @@
}, },
// //
toDetail(item) { toDetail(item) {
this.$util.to(`../procureDetail/procureDetail?prodId=${item.prodId}`) this.$util.to(`../procureDetail/procureDetail?id=${item.orderNumber}`)
}, },
} }
} }

@ -1,18 +1,22 @@
<template> <template>
<view class="wrap"> <view class="wrap">
<view class="block"> <view class="block">
<view class="title">编号134561321</view> <view class="title">编号{{ id }}</view>
<view class="shop">
<image class="logo" :src="info.shopLogo || Common.shopIcon"></image>
{{ info.shopName }}
<view class="status">{{ info.authentication }}</view>
</view>
</view> </view>
<view class="block"> <view class="block">
<view class="title">采购内容</view> <view class="title">采购内容</view>
<view class="content"> <view class="content">
<view class="item"> <view v-for="(item, i) in info.orderItemDtos" :key="i" class="item">
<text class="name">测试11</text> <view class="prod">
<text>测试11</text> <view class="name">{{ item.prodName}}</view>
<view class="price">{{ item.price }}</view>
</view> </view>
<view class="item"> <text class="count">{{ item.prodCount }}</text>
<text class="name">测试11</text>
<text>测试11</text>
</view> </view>
</view> </view>
</view> </view>
@ -20,28 +24,28 @@
<view class="title">采购方信息</view> <view class="title">采购方信息</view>
<view class="info"> <view class="info">
<view class="line"> <view class="line">
<text class="field">采购内容</text> <text class="field">采购</text>
<text>测试11</text> <text>{{ info.purchasingPerson }}</text>
</view> </view>
<view class="line"> <view class="line">
<text class="field">联系方式</text> <text class="field">联系方式</text>
<text>测试11</text> <text>{{ info.phone }}</text>
</view> </view>
<view class="line"> <view class="line">
<text class="field">采购类型</text> <text class="field">采购类型</text>
<text>测试11</text> <text>{{ info.orderType === 1 ? '个人' : '组织' }}</text>
</view> </view>
<view class="line"> <view class="line">
<text class="field">所属幼儿园</text> <text class="field">所属幼儿园</text>
<text>测试11</text> <text>{{ info.shopName }}</text>
</view> </view>
<view class="line"> <view class="line">
<text class="field">提交时间</text> <text class="field">提交时间</text>
<text>测试11</text> <text>{{ info.createTime }}</text>
</view> </view>
<view class="line"> <view class="line">
<text class="field">幼儿园是否已认证/是否已实名</text> <text class="field">幼儿园是否已认证/是否已实名</text>
<text>测试11</text> <text>{{ info.authentication }}</text>
</view> </view>
</view> </view>
</view> </view>
@ -49,19 +53,21 @@
</template> </template>
<script> <script>
import { queryTeamInfo } from '@/apis/modules/user.js' import { orderDetail } from '@/apis/modules/order.js'
import Common from '@/config/common'
export default { export default {
data() { data() {
return { return {
teamId: '', Common,
form: { id: '',
info: {
orderItemDtos: [],
classificationName: '', classificationName: '',
slogan: '', slogan: '',
briefIntroduction: '', briefIntroduction: '',
address: '', address: '',
phone: '' phone: ''
}, },
curPic: 0,
mpStyle: { mpStyle: {
p: 'font-size: 25rpx !important;font-family: Microsoft Yahei !important;font-weight: 400 !important;color: #333 !important;', p: 'font-size: 25rpx !important;font-family: Microsoft Yahei !important;font-weight: 400 !important;color: #333 !important;',
span: 'font-size: 25rpx !important;font-family: Microsoft Yahei !important;font-weight: 400 !important;color: #333 !important;' span: 'font-size: 25rpx !important;font-family: Microsoft Yahei !important;font-weight: 400 !important;color: #333 !important;'
@ -71,7 +77,7 @@
onShow() { onShow() {
const pages = getCurrentPages() const pages = getCurrentPages()
const { options } = pages[pages.length - 1] const { options } = pages[pages.length - 1]
this.teamId = options.teamId this.id = options.id
this.getInfo() this.getInfo()
}, },
methods: { methods: {
@ -80,27 +86,12 @@
uni.showLoading({ uni.showLoading({
title: '加载中' title: '加载中'
}) })
const res = await queryTeamInfo({ const { data } = await orderDetail({
teamId: this.teamId orderNumber: this.id
}) })
const data = res.teamInfo this.info = data
if (data) {
//
if (data.pictureUrl) {
this.desPics = data.pictureUrl.split(',')
}
}
this.form = data
uni.hideLoading() uni.hideLoading()
}, },
//
picChange(e) {
this.curPic = e.detail.current;
},
// tab
tabChange(id) {
this.curTab = id
},
} }
} }
</script> </script>
@ -109,30 +100,73 @@
.block { .block {
padding: 24rpx; padding: 24rpx;
} }
.content { .title {
margin-bottom: 20rpx;
font-size: 30rpx;
color: #333;
}
.shop {
position: relative;
display: flex; display: flex;
align-items: center; align-items: center;
font-size: 28rpx;
color: #333;
.logo {
width: 66rpx;
min-width: 66rpx;
height: 66rpx;
margin-right: 20rpx;
border-radius: 4px;
}
.status {
position: absolute;
bottom: 0;
right: 0;
padding: 8rpx 28rpx;
font-size: 28rpx;
color: #fff;
background-color: $uni-primary;
border-radius: 20px;
}
}
.content {
font-size: 28rpx; font-size: 28rpx;
color: #333; color: #333;
.item { .item {
display: flex;
justify-content: space-between;
align-items: center;
padding-bottom: 10rpx;
margin-bottom: 20rpx; margin-bottom: 20rpx;
} }
.prod {
max-width: 70%;
}
.name { .name {
width: 50%; margin-bottom: 10rpx;
color: #ccc; font-size: 26rpx;
color: #333;
}
.price {
font-size: 24rpx;
color: #8c8c8c;
}
.count {
font-size: 26rpx;
color: #333;
} }
} }
.info { .info {
display: flex;
justify-content: space-between;
align-items: center;
font-size: 28rpx; font-size: 28rpx;
color: #333; color: #333;
.line { .line {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 20rpx; margin-bottom: 20rpx;
} }
.field { .field {
color: #ccc; color: #717171;
} }
} }
</style> </style>

@ -9,7 +9,7 @@
<view class="list"> <view class="list">
<view v-for="(item, i) in list" :key="i" class="item"> <view v-for="(item, i) in list" :key="i" class="item">
<view class="texts"> <view class="texts">
<view class="name ell">{{ item.competitionName }}</view> <view class="name">{{ item.competitionName }}</view>
<view class="meta">有效期 {{ item.playEndTime.substr(0, 16) }}</view> <view class="meta">有效期 {{ item.playEndTime.substr(0, 16) }}</view>
</view> </view>
<view :class="['use', {ing: item.playing}]" @click.stop="use(item)">使用</view> <view :class="['use', {ing: item.playing}]" @click.stop="use(item)">使用</view>
@ -199,14 +199,16 @@
color: #333; color: #333;
} }
.meta { .meta {
margin: 10rpx 0; margin-top: 20rpx;
font-size: 24rpx; font-size: 24rpx;
color: #999; color: #999;
} }
.use { .use {
padding: 8rpx 28rpx; padding: 8rpx 28rpx;
margin-left: 20rpx;
font-size: 28rpx; font-size: 28rpx;
color: #fff; color: #fff;
white-space: nowrap;
background-color: #afafaf; background-color: #afafaf;
border-radius: 4px; border-radius: 4px;
} }

@ -105,7 +105,7 @@
"path" : "procureDetail/procureDetail", "path" : "procureDetail/procureDetail",
"style" : "style" :
{ {
"navigationBarTitleText" : "采购咨询详情", "navigationBarTitleText" : "采购详情",
"enablePullDownRefresh" : false "enablePullDownRefresh" : false
} }
} }

@ -53,9 +53,10 @@
<image class="pic" :src="item.coverUrl"></image> <image class="pic" :src="item.coverUrl"></image>
<view class="texts"> <view class="texts">
<view class="name ell">{{ item.competitionName }}</view> <view class="name ell">{{ item.competitionName }}</view>
<view class="meta">报名时间{{ item.signUpStartTime }}</view> <view v-if="item.signUpStartTime" class="meta">报名时间{{ item.signUpStartTime.substr(0, 16) }}</view>
<view class="meta ell">主办方{{ item.sponsor }}</view> <view class="meta ell">主办方{{ item.sponsor }}</view>
<view v-if="item.whetherToShowApplicants === '1'" class="meta ell">{{ item.applicantNum }}/{{ item.quantityLimit }}人已报名</view> <view v-if="item.whetherToShowApplicants === '1'" class="meta ell">{{ item.applicantNum }}/{{ item.quantityLimit }}人已报名</view>
<view v-if="item.status !== '' && item.whetherToSignUp" class="status">{{ statusList[item.status] }}</view>
<view v-if="item.signing" class="sign" @click.stop="presign(item)">报名</view> <view v-if="item.signing" class="sign" @click.stop="presign(item)">报名</view>
<view v-if="!item.whetherToSignUp" class="signed">已报名</view> <view v-if="!item.whetherToSignUp" class="signed">已报名</view>
</view> </view>
@ -79,6 +80,8 @@
return { return {
per: true, // per: true, //
teamId: uni.getStorageSync('teamId') || '', teamId: uni.getStorageSync('teamId') || '',
platformId: uni.getStorageSync('platformId'),
statusList: ['待开始', '已截止报名', '已结束'],
curBanner: 0, curBanner: 0,
dotsStyles: { dotsStyles: {
backgroundColor: 'rgba(83, 200, 249,0.3)', backgroundColor: 'rgba(83, 200, 249,0.3)',
@ -148,7 +151,8 @@
listType: 0, listType: 0,
keyWord: this.keyword, keyWord: this.keyword,
classificationId: this.curTab, classificationId: this.curTab,
platformSource: '' platformSource: '',
// platformSource: this.platformId === 7 ? 1 : this.platformId,
}).then(async ({ data }) => { }).then(async ({ data }) => {
this.list = this.reachBottom > 0 ? [...this.list, ...data.records] : data.records this.list = this.reachBottom > 0 ? [...this.list, ...data.records] : data.records
this.page++ // page+1 this.page++ // page+1
@ -176,15 +180,28 @@
}, },
// //
handleStatus (item) { handleStatus (item) {
let status = ''
let signing = 0 let signing = 0
const signUpStartTime = new Date(item.signUpStartTime) // const signUpStartTime = new Date(item.signUpStartTime) //
const signUpEndTime = new Date(item.signUpEndTime) // const signUpEndTime = new Date(item.signUpEndTime) //
const playStartTime = new Date(item.playStartTime) //
const playEndTime = new Date(item.playEndTime) //
const { now } = this const { now } = this
// (whetherToSignUp 0 1) // (whetherToSignUp 0 1)
if (item.whetherToSignUp && now > signUpStartTime && now < signUpEndTime) { if (now < signUpStartTime) {
signing = 1 //
status = 0
} else if (now > signUpStartTime && now < signUpEndTime) {
if (item.whetherToSignUp) signing = 1
} else if (now > signUpEndTime && now < playEndTime) {
//
status = 1
} else if (now > playEndTime) {
//
status = 2
} }
this.$set(item, 'signing', signing) this.$set(item, 'signing', signing)
this.$set(item, 'status', status)
}, },
// //
async getCategory() { async getCategory() {
@ -278,7 +295,7 @@
} }
} }
}) })
} },
} }
} }
</script> </script>
@ -340,13 +357,15 @@
overflow: hidden; overflow: hidden;
} }
.pic { .pic {
min-width: 280rpx;
width: 280rpx; width: 280rpx;
height: 180rpx; height: 180rpx;
margin-right: 20rpx; margin-right: 20rpx;
border-radius: 8px; border-radius: 8px;
} }
.texts { .texts {
width: calc(100% - 240rpx); position: relative;
width: calc(100% - 300rpx);
} }
.name { .name {
font-size: 28rpx; font-size: 28rpx;
@ -358,6 +377,13 @@
font-size: 24rpx; font-size: 24rpx;
color: #999; color: #999;
} }
.status {
position: absolute;
bottom: 17rpx;
right: 0;
font-size: 24rpx;
color: #b9b9b9;
}
.sign { .sign {
position: absolute; position: absolute;
bottom: 0; bottom: 0;

@ -11,7 +11,7 @@
<view class="list"> <view class="list">
<view class="item" v-for="(item, i) in list" :key="i" @click="toDetail(item)"> <view class="item" v-for="(item, i) in list" :key="i" @click="toDetail(item)">
<view class="pro-name"> <view class="pro-name">
<image class="icon" :src="item.logoUrl ? item.logoUrl : 'https://occupationlab.com/images/preschoolEdu/preSchool-icon.png'"></image> <image class="icon" :src="item.logoUrl ? item.logoUrl : Common.shopIcon"></image>
{{ item.companyName }} {{ item.companyName }}
</view> </view>
<view class="info"> <view class="info">
@ -48,9 +48,11 @@
<script> <script>
import { selectEnterpriseCertificationList, treeStructureList } from '@/apis/modules/supplier.js' import { selectEnterpriseCertificationList, treeStructureList } from '@/apis/modules/supplier.js'
import Common from '@/config/common'
export default { export default {
data() { data() {
return { return {
Common,
per: true, // per: true, //
teamId: uni.getStorageSync('teamId') || '', teamId: uni.getStorageSync('teamId') || '',
menus: [ menus: [
@ -186,8 +188,8 @@
}, },
// //
toOrder(row) { toOrder(row) {
// console.log(33, this.$refs.order.popup)
const el = this.$refs.order const el = this.$refs.order
el.remarks = ''
el.getGoods(row.teamId) el.getGoods(row.teamId)
el.$refs.popup.open() el.$refs.popup.open()
} }
@ -245,6 +247,7 @@
color: #999; color: #999;
} }
.intro { .intro {
max-width: 70%;
margin: 10rpx 0; margin: 10rpx 0;
font-size: 24rpx; font-size: 24rpx;
color: #777; color: #777;

Loading…
Cancel
Save