master
yujialong 11 months ago
parent 620d47a75d
commit e4fe2631b2
  1. 6
      apis/modules/goods.js
  2. 15
      apis/modules/order.js
  3. 21
      components/order/order.vue
  4. 2
      config/goods.js
  5. 6
      other/addGoods/addGoods.vue
  6. 20
      other/goods/goods.vue
  7. 196
      other/procure/procure.vue
  8. 138
      other/procureDetail/procureDetail.vue
  9. 88
      other/vouchers/vouchers.vue
  10. 18
      pages.json
  11. 4
      pages/index/index.vue
  12. 4
      pages/login/login.vue
  13. 13
      pages/person/person.vue
  14. 5
      pages/supplier/supplier.vue

@ -25,9 +25,3 @@ export const categoryInfo = (data) => {
export const list = (data) => {
return get('nakadai/prod/list', data)
}
export const confirm = (data) => {
return get('nakadai/order/order/confirm', data)
}
export const orderSubmit = (data) => {
return get('nakadai/order/order/submit', data)
}

@ -0,0 +1,15 @@
import request from '@/apis/request.js'
const { get, post } = request
export const myOrder = (data) => {
return get('nakadai/myOrder/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 orderSubmit = (data) => {
return get('nakadai/order/order/submit', data)
}

@ -15,12 +15,12 @@
<view class="goods" v-for="(item, i) in goods" :key="i">
<view class="info">
<view class="item">
<view class="name">{{ item.name }}</view>
<view class="meta">23.00</view>
<view class="name">{{ item.prodName }}</view>
<view class="meta">{{ item.price }}</view>
</view>
<view class="item">
<view class="name">{{ item.name }}</view>
<view class="meta">库存12</view>
<view class="name">{{ item.skuName }}</view>
<view class="meta">库存{{ item.stocks }}</view>
</view>
</view>
@ -41,7 +41,7 @@
</template>
<script>
import { list } from '@/apis/modules/goods.js'
import { list, confirm, orderSubmit } from '@/apis/modules/goods.js'
export default {
name:"order",
// props: {
@ -122,17 +122,26 @@
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 20rpx;
}
.info {
display: inline-flex;
margin-bottom: 20rpx;
.item {
margin-right: 20rpx;
&:first-child {
padding-right: 20rpx;
border-right: 1px solid #e6e6e6;
}
}
.name {
margin-bottom: 10rpx;
font-size: 26rpx;
color: #333;
}
.meta {
font-size: 24rpx;
color: #ccc;
color: #9c9c9c;
}
}
.msg {

@ -8,7 +8,7 @@ export default {
// 商品状态
goodsStatus: [
{
id: 0,
id: 1,
name: '上架中'
},
{

@ -53,7 +53,7 @@
<view class="btns">
<view class="btn" @click="submit(3)">存草稿</view>
<view class="btn publish" @click="submit(0)">发布</view>
<view class="btn publish" @click="submit(1)">发布</view>
</view>
<uni-popup ref="popup" background-color="#fff" type="bottom">
@ -116,7 +116,7 @@
this.originSku = JSON.parse(JSON.stringify(this.form.skuList[0]))
this.getCategory()
this.getInfo()
this.prodId && this.getInfo()
},
methods: {
//
@ -208,7 +208,7 @@
} else {
await save(form)
}
this.$util.sucMsg(status ? '保存成功!' : '发布成功!')
this.$util.sucMsg(status === 3 ? '保存成功!' : '发布成功!')
setTimeout(() => {
uni.navigateBack()

@ -14,19 +14,19 @@
<view class="item" v-for="item in list" @click="toDetail(item)">
<view class="metas">
<view class="time">{{ item.putawayTime }}</view>
<view :class="['status', {grounding: !item.status}]">{{ Goods.goodsStatus.find(e => e.id === item.status).name }}</view>
<view :class="['status', {grounding: item.status === 1}]">{{ Goods.goodsStatus.find(e => e.id === item.status).name }}</view>
</view>
<view class="info">
<image class="pic" :src="item.pic"></image>
<view class="texts">
<view class="name">{{ item.prodName }}</view>
<view class="meta">
市场价20.00
<text class="sell">售价10</text>
市场价{{ item.oriPrice || 0 }}
<text class="sell">售价{{ item.price || 0 }}</text>
</view>
<view class="meta">
库存1000
已售500
库存{{ item.totalStocks || 0 }}&emsp;
<!-- 已售500 -->
</view>
<view class="btns">
<!-- <view class="btn" @click.stop="toDetail(item)">查看</view> -->
@ -34,7 +34,7 @@
<view class="btn del" @click.stop="del(item)">删除</view>
<view class="btn" @click.stop="toEdit(item)">编辑</view>
</template>
<view v-else-if="!item.status" class="btn off" @click.stop="changeStatus(item)">下架</view>
<view v-else-if="item.status === 1" class="btn off" @click.stop="changeStatus(item)">下架</view>
</view>
</view>
</view>
@ -228,6 +228,10 @@
font-size: 24rpx;
color: #999;
}
.sell {
margin-left: 20rpx;
color: #d60000;
}
.btns {
display: flex;
justify-content: flex-end;
@ -241,10 +245,10 @@
background-color: $uni-primary;
border-radius: 20px;
&.del {
background-color: #ff982e;
background-color: #ea9b4a;
}
&.off {
background-color: #e23636;
background-color: #de5151;
}
}
}

@ -0,0 +1,196 @@
<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>
<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.putawayTime }}</view>
<view class="date">提交时间</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>
<view class="type">组织采购</view>
</view>
</view>
</view>
<uni-load-more :status="status" />
</template>
<empty v-else text="暂无线索"></empty>
</view>
</view>
</template>
<script>
import { myOrder } from '@/apis/modules/order.js'
import Goods from '@/config/goods.js'
export default {
data() {
return {
Goods,
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: '加载中'
})
myOrder({
status: this.curTab,
page: this.page
}).then(({ data }) => {
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 //
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?prodId=${item.prodId}`)
},
}
}
</script>
<style scoped lang="scss">
.page {
padding-bottom: 90px;
}
.list {
margin-top: 20rpx;
padding: 20rpx;
.item {
padding: 20rpx;
margin-bottom: 20rpx;
// border-bottom: 1px solid #f1f1f1;
background-color: #fff;
}
.metas {
display: flex;
justify-content: space-between;
margin-bottom: 20rpx;
}
.serial {
font-size: 24rpx;
color: #333;
}
.date {
font-size: 24rpx;
color: #ccc;
}
.info {
display: flex;
justify-content: space-between;
align-items: center;
}
.pro-name {
display: flex;
align-items: center;
padding: 18rpx 0;
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>

@ -0,0 +1,138 @@
<template>
<view class="wrap">
<view class="block">
<view class="title">编号134561321</view>
</view>
<view class="block">
<view class="title">采购内容</view>
<view class="content">
<view class="item">
<text class="name">测试11</text>
<text>测试11</text>
</view>
<view class="item">
<text class="name">测试11</text>
<text>测试11</text>
</view>
</view>
</view>
<view class="block">
<view class="title">采购方信息</view>
<view class="info">
<view class="line">
<text class="field">采购内容</text>
<text>测试11</text>
</view>
<view class="line">
<text class="field">联系方式</text>
<text>测试11</text>
</view>
<view class="line">
<text class="field">采购类型</text>
<text>测试11</text>
</view>
<view class="line">
<text class="field">所属幼儿园</text>
<text>测试11</text>
</view>
<view class="line">
<text class="field">提交时间</text>
<text>测试11</text>
</view>
<view class="line">
<text class="field">幼儿园是否已认证/是否已实名</text>
<text>测试11</text>
</view>
</view>
</view>
</view>
</template>
<script>
import { queryTeamInfo } from '@/apis/modules/user.js'
export default {
data() {
return {
teamId: '',
form: {
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;'
}
}
},
onShow() {
const pages = getCurrentPages()
const { options } = pages[pages.length - 1]
this.teamId = options.teamId
this.getInfo()
},
methods: {
//
async getInfo() {
uni.showLoading({
title: '加载中'
})
const res = await queryTeamInfo({
teamId: this.teamId
})
const data = res.teamInfo
if (data) {
//
if (data.pictureUrl) {
this.desPics = data.pictureUrl.split(',')
}
}
this.form = data
uni.hideLoading()
},
//
picChange(e) {
this.curPic = e.detail.current;
},
// tab
tabChange(id) {
this.curTab = id
},
}
}
</script>
<style scoped lang="scss">
.block {
padding: 24rpx;
}
.content {
display: flex;
align-items: center;
font-size: 28rpx;
color: #333;
.item {
margin-bottom: 20rpx;
}
.name {
width: 50%;
color: #ccc;
}
}
.info {
display: flex;
justify-content: space-between;
align-items: center;
font-size: 28rpx;
color: #333;
.line {
margin-bottom: 20rpx;
}
.field {
color: #ccc;
}
}
</style>

@ -12,19 +12,34 @@
<view class="name ell">{{ item.competitionName }}</view>
<view class="meta">有效期 {{ item.playEndTime.substr(0, 16) }}</view>
</view>
<view :class="['use', {ing: item.playing}]" @click.stop="presign(item)">使用</view>
<view :class="['use', {ing: item.playing}]" @click.stop="use(item)">使用</view>
</view>
</view>
<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 } from '@/apis/modules/activity.js'
import { viewUserDetails } from '@/apis/modules/user.js'
import Util from '@/libs/util'
export default {
data() {
return {
teamId: uni.getStorageSync('teamId') || '',
openId: uni.getStorageSync('openId'),
reachBottom: 0, // 0->,1->,-1->
status: 'more', // more|loading|noMore
keyword: '',
@ -52,6 +67,8 @@
scrollLeft: 0,
timer: null,
now: '',
curRow: {},
info: {},
}
},
//
@ -72,6 +89,7 @@
onShow() {
this.keyword = ''
this.initList()
this.getInfo()
},
methods: {
getList() {
@ -122,15 +140,30 @@
this.getList()
},
//
toDetail(item) {
this.$util.to('/other/activityDetail/activityDetail?id=' + item.id)
//
async getInfo() {
const { result } = await viewUserDetails({
openId: this.openId
})
this.info = result
},
// tab
tabChange(tab) {
this.curTab = tab.id
this.initList()
},
//
use(row) {
if (row.playing) {
this.curRow = row
this.$refs.popup.open()
}
},
//
closePopup() {
this.$refs.popup.close()
},
}
}
</script>
@ -182,4 +215,51 @@
background-color: $uni-primary;
}
}
.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 {
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>

@ -81,7 +81,7 @@
"path" : "addGoods/addGoods",
"style" :
{
"navigationBarTitleText" : "",
"navigationBarTitleText" : "商品",
"enablePullDownRefresh" : false
}
},
@ -92,6 +92,22 @@
"navigationBarTitleText" : "电子券",
"enablePullDownRefresh" : true
}
},
{
"path" : "procure/procure",
"style" :
{
"navigationBarTitleText" : "采购咨询",
"enablePullDownRefresh" : true
}
},
{
"path" : "procureDetail/procureDetail",
"style" :
{
"navigationBarTitleText" : "采购咨询详情",
"enablePullDownRefresh" : false
}
}
]
},

@ -122,8 +122,8 @@
}
},
onShow() {
// uni.setStorageSync('token', 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ1c2VyIiwiaWF0IjoxNzAzNDk1ODY2LCJleHAiOjE3MDQzNTk4NjYsImFjY291bnRJZCI6IjQ5MzEifQ.A5tQewZlfVz3yiQCjPscWXvyXjOJmWzheG5b82siZl4')
// uni.setStorageSync('openId', 'o3hKk686kGjgMygKdPTJd5KQQ7CA')
// uni.setStorageSync('token', 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ1c2VyIiwiaWF0IjoxNzA0Nzg1NDg5LCJleHAiOjE3MDU2NDk0ODksImFjY291bnRJZCI6IjQ5ODMiLCJzaG9wSWQiOjYsInBsYXRmb3JtSWQiOjV9.B0gXKl9gOEi9oSNZl8M_gGcqFXf9hAYbqtVHygDoYxM')
// uni.setStorageSync('openId', 'o3hKk60jbhAuLm4K3weIgQGFmv2g')
this.keyword = ''
this.curTab = ''
this.per = true

@ -78,8 +78,8 @@
}
},
onShow() {
// uni.setStorageSync('token', 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ1c2VyIiwiaWF0IjoxNzAzNDk1ODY2LCJleHAiOjE3MDQzNTk4NjYsImFjY291bnRJZCI6IjQ5MzEifQ.A5tQewZlfVz3yiQCjPscWXvyXjOJmWzheG5b82siZl4')
// uni.setStorageSync('openId', 'o3hKk686kGjgMygKdPTJd5KQQ7CA')
// uni.setStorageSync('token', 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ1c2VyIiwiaWF0IjoxNzA0Nzg1NDg5LCJleHAiOjE3MDU2NDk0ODksImFjY291bnRJZCI6IjQ5ODMiLCJzaG9wSWQiOjYsInBsYXRmb3JtSWQiOjV9.B0gXKl9gOEi9oSNZl8M_gGcqFXf9hAYbqtVHygDoYxM')
// uni.setStorageSync('openId', 'o3hKk60jbhAuLm4K3weIgQGFmv2g')
//
this.checkLogin()
},

@ -133,7 +133,7 @@
<view class="text ell">我要采购</view>
</li>
<template v-if="isSupplier">
<li @click="tips">
<li @click="toPage('/other/procure/procure')">
<image src="https://occupationlab.com/images/preschoolEdu/icon14.png" />
<view class="text ell">商机线索</view>
</li>
@ -206,10 +206,8 @@
// #endif
this.platformId = uni.getStorageSync('platformId')
this.per = true
this.enterDisabled = 0
this.getInfo()
if (this.platformId !== 7) {
this.getTeams()
}
this.getEnterInfo()
},
methods: {
@ -240,7 +238,7 @@
// userAccountList
const accountList = result.userAccountList
if (accountList && accountList.length) {
const enter = accountList.find(e => e.platformId !== '7' && e.isEnable)
const enter = accountList.find(e => e.platformId !== '7' && e.isEnable) //
this.curAccount = enter || accountList[0]
//
if (enter) {
@ -249,7 +247,7 @@
this.platformId = platformId
} else {
//
this.enterDisabled = 1 //
if (accountList.find(e => e.platformId !== '7' && !e.isEnable)) this.enterDisabled = 1 //
uni.setStorageSync('platformId', 7)
this.platformId = 7
}
@ -270,9 +268,12 @@
uni.clearStorageSync()
this.$util.to('/pages/login/login')
}, 1500)
return false
}
}
}
this.platformId !== 7 && this.getTeams()
},
//
async getEnterInfo() {

@ -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 : 'https://occupationlab.com/images/preschoolEdu/preSchool-icon.png'"></image>
{{ item.companyName }}
</view>
<view class="info">
@ -48,7 +48,6 @@
<script>
import { selectEnterpriseCertificationList, treeStructureList } from '@/apis/modules/supplier.js'
import { confirm, orderSubmit } from '@/apis/modules/goods.js'
export default {
data() {
return {
@ -144,7 +143,7 @@
platformSource: 6,
keyWord: this.keyword,
supplierClassificationId: this.active,
}).then(async ({ data }) => {
}).then(({ data }) => {
this.list = this.reachBottom > 0 ? [...this.list, ...data.records] : data.records
this.page++ // page+1
const noMore = this.list.length === data.total //

Loading…
Cancel
Save