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) => {
return get('nakadai/myOrder/orderDetail', data)
}
export const confirm = (data) => {
return get('nakadai/order/order/confirm', data)
export const orderConfirm = (data) => {
return post('nakadai/order/order/confirm', 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>
<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>
</scroll-view>
<textarea v-else class="msg" placeholder="请输入"></textarea>
<textarea v-else class="msg" v-model="remarks" placeholder="请输入"></textarea>
</view>
<view class="btns">
@ -37,11 +37,17 @@
</view>
</view>
</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>
</template>
<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 {
name:"order",
// props: {
@ -52,6 +58,7 @@
data() {
return {
platformId: uni.getStorageSync('platformId'),
shopId: '',
tabs: [
{
id: 0,
@ -64,6 +71,8 @@
],
curTab: 0,
goods: [],
remarks: '',
orderNumbers: '',
};
},
onShow() {
@ -72,9 +81,11 @@
methods: {
//
async getGoods(shopId) {
this.shopId = shopId
const { data } = await list({
shopId
})
data.map(e => e.prodCount = '')
this.goods = data
},
change() {
@ -82,17 +93,57 @@
},
//
back() {
this.$refs.popup.close()
},
// tab
tabChange(tab) {
this.curTab = tab.id
},
//
procure(type) {
confirm({
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 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 {
avatar: 'https://cube.elemecdn.com/3/7c/3ea6beec64369c2642b92c6726f1epng.png',
shopIcon: 'https://occupationlab.com/images/preschoolEdu/preSchool-icon.png',
// 角色
platformSource: [
{

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

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

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

@ -9,7 +9,7 @@
<view class="list">
<view class="item" v-for="item in list" @click="toDetail(item)">
<view class="metas">
<view class="serial">编号{{ item.putawayTime }}</view>
<view class="serial">编号{{ item.orderNumber }}</view>
<view class="date">提交时间</view>
</view>
<view class="pro-name">
@ -106,9 +106,6 @@
uni.hideLoading()
// list
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.page++ // page+1
const noMore = this.list.length === data.total //
@ -130,7 +127,7 @@
},
//
toDetail(item) {
this.$util.to(`../procureDetail/procureDetail?prodId=${item.prodId}`)
this.$util.to(`../procureDetail/procureDetail?id=${item.orderNumber}`)
},
}
}

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

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

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

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

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

Loading…
Cancel
Save