From ec94248e27fe892494366d23c29f0df933d3c3fd Mon Sep 17 00:00:00 2001
From: yujialong <479214531@qq.com>
Date: Wed, 10 Jan 2024 18:17:14 +0800
Subject: [PATCH] fix
---
apis/modules/order.js | 6 +-
components/order/order.vue | 65 +++++++++++--
config/common.js | 1 +
other/activityDetail/activityDetail.vue | 2 +-
other/addGoods/addGoods.vue | 1 +
other/goods/goods.vue | 30 ++++--
other/procure/procure.vue | 7 +-
other/procureDetail/procureDetail.vue | 124 +++++++++++++++---------
other/vouchers/vouchers.vue | 6 +-
pages.json | 2 +-
pages/index/index.vue | 38 ++++++--
pages/supplier/supplier.vue | 7 +-
12 files changed, 210 insertions(+), 79 deletions(-)
diff --git a/apis/modules/order.js b/apis/modules/order.js
index e363df9..b463d66 100644
--- a/apis/modules/order.js
+++ b/apis/modules/order.js
@@ -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)
}
\ No newline at end of file
diff --git a/components/order/order.vue b/components/order/order.vue
index e76ae07..919d24c 100644
--- a/components/order/order.vue
+++ b/components/order/order.vue
@@ -24,10 +24,10 @@
-
+
-
+
@@ -37,11 +37,17 @@
+
+
+
+
@@ -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;
}
}
diff --git a/other/vouchers/vouchers.vue b/other/vouchers/vouchers.vue
index 96c79da..954318e 100644
--- a/other/vouchers/vouchers.vue
+++ b/other/vouchers/vouchers.vue
@@ -9,7 +9,7 @@
- {{ item.competitionName }}
+ {{ item.competitionName }}
有效期 {{ item.playEndTime.substr(0, 16) }}
使用
@@ -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;
}
diff --git a/pages.json b/pages.json
index c87c504..c59a68c 100644
--- a/pages.json
+++ b/pages.json
@@ -105,7 +105,7 @@
"path" : "procureDetail/procureDetail",
"style" :
{
- "navigationBarTitleText" : "采购咨询详情",
+ "navigationBarTitleText" : "采购详情",
"enablePullDownRefresh" : false
}
}
diff --git a/pages/index/index.vue b/pages/index/index.vue
index 2e5f1bb..5c478d9 100644
--- a/pages/index/index.vue
+++ b/pages/index/index.vue
@@ -53,9 +53,10 @@
{{ item.competitionName }}
- 报名时间:{{ item.signUpStartTime }}
+ 报名时间:{{ item.signUpStartTime.substr(0, 16) }}
主办方:{{ item.sponsor }}
{{ item.applicantNum }}/{{ item.quantityLimit }}人已报名
+ {{ statusList[item.status] }}
报名
已报名
@@ -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 @@
}
}
})
- }
+ },
}
}
@@ -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;
diff --git a/pages/supplier/supplier.vue b/pages/supplier/supplier.vue
index 27c15ab..9774148 100644
--- a/pages/supplier/supplier.vue
+++ b/pages/supplier/supplier.vue
@@ -11,7 +11,7 @@
-
+
{{ item.companyName }}
@@ -48,9 +48,11 @@