yujialong 11 months ago
parent ec94248e27
commit 4431b11f36
  1. 3
      apis/modules/order.js
  2. 201
      other/clue/clue.vue
  3. 14
      other/procure/procure.vue
  4. 265
      other/registeredActivity/registeredActivity.vue
  5. 1
      other/vouchers/vouchers.vue
  6. 8
      pages.json
  7. 9
      pages/person/person.vue

@ -12,4 +12,7 @@ export const orderConfirm = (data) => {
}
export const orderSubmit = (data) => {
return post('nakadai/order/order/submit', data)
}
export const page = (data) => {
return get('nakadai/platformOrder/page', data)
}

@ -0,0 +1,201 @@
<template>
<view>
<view class="page">
<view class="search-wrap">
<uni-search-bar class="search" radius="30" placeholder="请输入幼儿园名称、订单编号" v-model="keyword" clearButton="auto" cancelButton="none" @confirm="initList" />
<view>
<uni-icons type="notification" size="20"></uni-icons>
</view>
</view>
<ul class="tab">
<li v-for="(item, i) in tabs" :class="{active: curTab === item.id}" @click="tabChange(item.id)">{{ item.name }}</li>
</ul>
<template v-if="list.length">
<view class="list">
<view class="item" v-for="item in list" @click="toDetail(item)">
<!-- <view class="metas">
<view class="serial">编号{{ item.orderNumber }}</view>
<view class="date">提交时间{{ item.createTime }}</view>
</view> -->
<view class="pro-name">
<image class="icon" :src="item.logoUrl ? item.logoUrl : 'https://occupationlab.com/images/preschoolEdu/preSchool-icon.png'"></image>
{{ item.companyName }}
</view>
<view class="info">
<view class="texts">
<view class="meta">采购内容{{ item.oriPrice || 0 }}</view>
<view class="meta">数量{{ item.totalStocks || 0 }}</view>
<view class="meta">编号{{ item.orderNumber }}</view>
<view class="meta">提交时间{{ item.createTime }}</view>
</view>
<view class="type">组织采购</view>
</view>
</view>
</view>
<uni-load-more :status="status" />
</template>
<empty v-else text="暂无线索"></empty>
</view>
</view>
</template>
<script>
import { page } from '@/apis/modules/order.js'
import Goods from '@/config/goods.js'
export default {
data() {
return {
Goods,
keyword: '',
curTab: '',
tabs: [
{
id: '',
name: '全部'
},
{
id: 2,
name: '组织'
},
{
id: 1,
name: '个人'
},
],
reachBottom: 0, // 0->,1->,-1->
status: 'more', // more|loading|noMore
searchTimer: null,
keyword: '',
list: [],
page: 1,
pageSize: 10,
}
},
watch: {
keyword () {
clearTimeout(this.searchTimer)
this.searchTimer = setTimeout(() => {
this.initList()
}, 500)
}
},
//
onPullDownRefresh() {
this.initList()
setTimeout(() => {
uni.stopPullDownRefresh()
}, 1500)
},
//
onReachBottom() {
if (this.reachBottom >= 0) {
this.reachBottom = 1
this.status = 'loading'
this.getList()
}
},
onShow() {
this.initList()
},
methods: {
//
getList() {
uni.showLoading({
title: '加载中'
})
page({
current: this.page,
orderType: this.curTab,
queryCriteria: this.keyword
}).then(({ data }) => {
uni.hideLoading()
// list
const list = data.records
this.list = this.reachBottom > 0 ? [...this.list, ...list] : list
this.page++ // page+1
const noMore = this.list.length === data.total //
this.status = noMore ? 'noMore' : 'more' // noMore
this.reachBottom = noMore ? -1 : 0 // -1
}).catch(e => {
uni.hideLoading()
})
},
initList() {
this.page = 1
this.reachBottom = 0
this.getList()
},
// tab
tabChange(id) {
this.curTab = id
this.initList()
},
//
toDetail(item) {
this.$util.to(`../procureDetail/procureDetail?id=${item.orderNumber}`)
},
}
}
</script>
<style scoped lang="scss">
.page {
padding-bottom: 90px;
}
.list {
padding: 20rpx;
.item {
padding: 20rpx;
margin-bottom: 20rpx;
// border-bottom: 1px solid #f1f1f1;
background-color: #fff;
border-radius: 4px;
}
.metas {
// display: flex;
justify-content: space-between;
margin-bottom: 20rpx;
}
.serial {
margin-bottom: 10rpx;
font-size: 24rpx;
color: #333;
}
.date {
font-size: 24rpx;
color: #8e8e8e;
}
.info {
display: flex;
justify-content: space-between;
align-items: center;
}
.pro-name {
display: flex;
align-items: center;
padding: 18rpx 0;
margin-bottom: 10rpx;
font-size: 32rpx;
font-weight: 600;
color: #333;
border-bottom: 1px solid #E6E8ED;
.icon {
width: 66rpx;
min-width: 66rpx;
height: 66rpx;
margin-right: 20rpx;
border-radius: 4px;
}
}
.meta {
margin: 10rpx 0;
font-size: 24rpx;
color: #999;
}
.type {
font-size: 24rpx;
color: #1fc133;
}
}
</style>

@ -1,9 +1,12 @@
<template>
<view>
<view class="page">
<ul class="tab">
<li v-for="(item, i) in tabs" :class="{active: curTab === tab.id}" @click="tabChange(tab.id)">{{ item.name }}</li>
</ul>
<view class="search-wrap">
<uni-search-bar class="search" radius="30" placeholder="请输入店铺名称、编号" v-model="keyword" clearButton="auto" cancelButton="none" @confirm="initList" />
<view>
<uni-icons type="notification" size="20"></uni-icons>
</view>
</view>
<template v-if="list.length">
<view class="list">
@ -43,6 +46,7 @@
data() {
return {
Goods,
keyword: '',
curTab: '',
tabs: [
{
@ -143,7 +147,6 @@
.item {
padding: 20rpx;
margin-bottom: 20rpx;
// border-bottom: 1px solid #f1f1f1;
background-color: #fff;
}
.metas {
@ -157,7 +160,7 @@
}
.date {
font-size: 24rpx;
color: #ccc;
color: #8e8e8e;
}
.info {
display: flex;
@ -168,6 +171,7 @@
display: flex;
align-items: center;
padding: 18rpx 0;
margin-bottom: 10rpx;
font-size: 32rpx;
font-weight: 600;
color: #333;

@ -6,20 +6,28 @@
</view>
<view class="wrap">
<sideSelect :menus="menus" @menuClick="menuClick" />
<ul class="tab-wrap">
<view class="tab">
<li :class="{active: curTab === ''}" @click="tabChange('')">全部</li>
</view>
<scroll-view scroll-x :scroll-left="scrollLeft" class="tab tab-scroll">
<li v-for="(tab, i) in tabs" :key="i" :class="{active: curTab === tab.id}" @click="tabChange(tab)">{{ tab.classificationName }}</li>
</scroll-view>
</ul>
<view v-if="list.length" class="list">
<uni-swipe-action>
<uni-swipe-action-item
v-for="item in list"
v-for="(item, i) in list"
:key="i"
:threshold="0"
:right-options="ops"
@click="e => handle(e, item)"
>
<view class="item" @click="toDetail(item)">
<view class="item" @click.stop="toDetail(item)">
<view class="top">
<image class="pic" :src="item.coverUrl"></image>
<view class="">
<view class="right">
<view class="name ell">{{ item.competitionName }}</view>
<view v-if="item.whetherToShowApplicants === '1'" class="meta ell">{{ item.applicantNum }}/{{ item.quantityLimit }}人已报名</view>
</view>
@ -29,39 +37,36 @@
<view class="meta">举办时间{{ item.playStartTime + ' ~ ' + item.playEndTime }}</view>
<view class="meta ell">主办方{{ item.sponsor }}</view>
</view>
<view v-if="item.playing" class="voucher" @click.stop="use(item)">电子入场券</view>
</view>
</uni-swipe-action-item>
</uni-swipe-action>
</view>
</view>
<filter-popup ref="filter" showCategory :data="filters" :form.sync="filterForm" v-model="popup" title="全部筛选" height="1104rpx" @finsh="subFinsh"></filter-popup>
<uni-popup ref="popup" type="dialog">
<view class="sign-popup">
<uni-icons class="close" type="closeempty" size="16" color="#4876f9" @click="closePopup"></uni-icons>
<view class="activity-name">{{ curRow.competitionName }}</view>
<view class="title">签到二维码</view>
<image class="qrcode" src="http://124.71.79.122/images/miniProgram/qrcode.png"></image>
<view v-if="curRow.playStartTime" class="date">有效期限{{ curRow.playStartTime.substr(0, 16) + ' ~ ' + curRow.playEndTime.substr(0, 16) }}</view>
<view class="userName">{{ info.hrUserInfo.userName }}</view>
<view class="phone">{{ info.hrUserInfo.phone }}</view>
<view v-if="info.organizationInfoList && info.organizationInfoList.length" class="org-name">{{ info.organizationInfoList[0].organizationName }}</view>
</view>
</uni-popup>
</view>
</template>
<script>
import { postLoginActivity, competitionUserDel, cancelRegistration } from '@/apis/modules/activity.js'
import { postLoginActivity, competitionUserDel, cancelRegistration, categoryList } from '@/apis/modules/activity.js'
import { viewUserDetails } from '@/apis/modules/user.js'
import Util from '@/libs/util'
export default {
data() {
return {
menus: [
{
id: '',
name: '全部'
},
{
id: 1,
name: '活动'
},
{
id: 2,
name: '需求'
},
{
id: 3,
name: '招募'
},
],
tabs: [],
popup: false,
//
filters: [
@ -124,6 +129,9 @@
productTypeName: '',
tagName: '',
categoryName: '',
timer: null,
curRow: {},
info: {},
ops: [
{
text: '删除',
@ -164,8 +172,9 @@
}
},
onShow() {
this.getCategory()
this.initList()
// this.getFilter()
this.getInfo()
},
methods: {
getList() {
@ -181,82 +190,51 @@
const noMore = this.list.length === data.total //
this.status = noMore ? 'noMore' : 'more' // noMore
this.reachBottom = noMore ? -1 : 0 // -1
this.now = await Util.getNow()
this.statusInterval()
uni.hideLoading()
this.timer = setInterval(() => {
this.now = new Date(this.now.setSeconds(this.now.getSeconds() + 1))
this.statusInterval()
}, 1000)
}).catch(e => {})
},
async statusInterval () {
this.list.map(item => {
if (item.signUpStartTime && item.signUpEndTime) {
this.handleStatus(item)
}
})
},
//
handleStatus (item) {
let playing = 0
const playStartTime = new Date(item.playStartTime) //
const playEndTime = new Date(item.playEndTime) //
const { now } = this
// (whetherToSignUp 0 1)
if (now > playStartTime && now < playEndTime) {
playing = 1
}
this.$set(item, 'playing', playing)
},
initList() {
this.page = 1
this.reachBottom = 0
this.getList()
},
//
getFilter() {
//
productTypeList().then(res => {
res.typeList.forEach(e => {
e.value = e.typeId
e.title = e.typeName
})
this.tabs = res.typeList
this.filters[0].data = res.typeList
}).catch(e => {})
//
tagsList().then(res => {
res.tagsList.forEach(e => {
e.value = e.tagsId
e.title = e.tagsName
})
this.filters[2].data = res.tagsList
}).catch(e => {})
},
//
subFinsh(val) {
const { productType, selection, tagId, categoryId, professionalCategoryId, professionalId, categoryName } = val
this.form = {
categoryId: categoryId || '',
professionalCategoryId: professionalCategoryId || '',
professionalId: professionalId || '',
productType: productType.length ? productType[0] : '',
selection: selection.length ? selection[0] : '',
tagId: tagId.length ? tagId[0] : ''
}
this.categoryName = categoryName || ''
this.productTypeName = this.form.productType ? this.filters[0].data.find(e => e.value == this.form.productType).title : ''
this.tagName = this.form.tagId ? this.filters[2].data.find(e => e.value == this.form.tagId).title : ''
this.initList()
},
//
delCategory() {
this.$refs.filter.category = []
this.$refs.filter.categoryName = ''
this.$refs.filter.categoryId = ''
this.$refs.filter.professionalCategoryId = ''
this.$refs.filter.professionalId = ''
this.form.categoryId = ''
this.form.professionalCategoryId = ''
this.form.professionalId = ''
this.categoryName = ''
this.initList()
},
//
delProductType() {
this.filterForm.productType = []
this.form.productType = ''
this.productTypeName = ''
this.initList()
},
//
delSelection() {
this.filterForm.selection = []
this.form.selection = ''
this.initList()
//
async getInfo() {
const { result } = await viewUserDetails({
openId: this.openId
})
this.info = result
},
//
delTag() {
this.filterForm.tagId = []
this.form.tagId = ''
this.tagName = ''
this.initList()
//
async getCategory() {
const { page } = await categoryList()
this.tabs = page
},
// tab
tabChange(id) {
@ -300,54 +278,133 @@
})
}
},
//
menuClick(e) {
}
//
use(row) {
if (row.playing) {
this.curRow = row
this.$refs.popup.open()
}
},
//
closePopup() {
this.$refs.popup.close()
},
}
}
</script>
<style scoped lang="scss">
.wrap {
.tab-wrap {
display: flex;
align-items: flex-start;
.tab-scroll {
width: calc(100% - 100rpx);
white-space: nowrap;
li {
display: inline-block;
}
}
}
.list {
flex: 1;
padding: 20rpx;
margin: 20rpx;
border-radius: 8px;
background-color: #fff;
.item {
position: relative;
padding: 28rpx 0;
overflow: hidden;
border-bottom: 1px solid rgba(225, 225, 225, .4);
}
.top {
display: flex;
align-items: center;
margin-bottom: 20rpx;
}
.pic {
min-width: 160rpx;
width: 160rpx;
height: 100rpx;
margin-right: 20rpx;
border-radius: 8px;
}
.texts {
// width: calc(100% - 240rpx);
.right {
width: calc(100% - 180rpx);
}
.name {
margin-bottom: 10rpx;
font-size: 28rpx;
font-weight: 600;
color: #333;
}
.meta {
margin: 10rpx 0;
font-size: 26rpx;
margin-bottom: 10rpx;
font-size: 24rpx;
color: #999;
&:last-child {
margin-bottom: 0;
}
}
.voucher {
position: absolute;
bottom: 10rpx;
right: 0;
padding: 8rpx 20rpx;
margin-left: 20rpx;
font-size: 24rpx;
color: #fff;
white-space: nowrap;
background-color: $uni-primary;
border-radius: 4px;
}
}
.sign-popup {
position: relative;
width: 80vw;
padding: 20rpx 0;
text-align: center;
box-sizing: border-box;
background-color: #fff;
border-radius: 8px;
.close {
position: absolute;
top: 20rpx;
right: 20rpx;
}
.activity-name {
padding: 0 10rpx;
font-size: 36rpx;
color: $uni-primary;
}
.title {
padding: 20rpx 0;
margin: 20rpx 0;
font-size: 32rpx;
color: #fff;
background-color: $uni-primary;
}
.qrcode {
width: 200rpx;
height: 200rpx;
}
.date {
margin: 20rpx;
font-size: 24rpx;
color: #8c8c8c;
}
.userName {
font-size: 30rpx;
color: #333;
}
.phone {
margin: 20rpx;
font-size: 24rpx;
color: #6f6f6f;
}
.org-name {
font-size: 24rpx;
color: #333;
}
}
</style>

@ -231,6 +231,7 @@
right: 20rpx;
}
.activity-name {
padding: 0 10rpx;
font-size: 36rpx;
color: $uni-primary;
}

@ -108,6 +108,14 @@
"navigationBarTitleText" : "采购详情",
"enablePullDownRefresh" : false
}
},
{
"path" : "clue/clue",
"style" :
{
"navigationBarTitleText" : "商机线索",
"enablePullDownRefresh" : true
}
}
]
},

@ -48,10 +48,11 @@
<image src="https://occupationlab.com/images/preschoolEdu/icon4.png" />
<view class="text ell">我的发票</view>
</li> -->
<!-- <li @click="tips">
<!-- v-if="!isSupplier" -->
<li @click="toPage('/other/procure/procure')">
<image src="https://occupationlab.com/images/preschoolEdu/icon5.png" />
<view class="text ell">我的订单</view>
</li> -->
<view class="text ell">我的采购</view>
</li>
<li @click="tips">
<image src="https://occupationlab.com/images/preschoolEdu/icon6.png" />
<view class="text ell">发布采购</view>
@ -133,7 +134,7 @@
<view class="text ell">我要采购</view>
</li>
<template v-if="isSupplier">
<li @click="toPage('/other/procure/procure')">
<li @click="toPage('/other/clue/clue')">
<image src="https://occupationlab.com/images/preschoolEdu/icon14.png" />
<view class="text ell">商机线索</view>
</li>

Loading…
Cancel
Save