From 074a8921c08de67221323f84496cbf22e0e381f9 Mon Sep 17 00:00:00 2001
From: yujialong <479214531@qq.com>
Date: Fri, 12 Jan 2024 11:01:56 +0800
Subject: [PATCH] fix
---
components/order/order.vue | 4 +-
components/sideSelect/sideSelect.vue | 2 +-
other/addGoods/addGoods.vue | 26 +++++++++++-
other/procureDetail/procureDetail.vue | 13 +++++-
other/supplierDetail/supplierDetail.vue | 2 +-
pages/supplier/supplier.vue | 54 ++++++++++++++++++-------
styles/common.scss | 1 +
7 files changed, 80 insertions(+), 22 deletions(-)
diff --git a/components/order/order.vue b/components/order/order.vue
index 919d24c..b84b183 100644
--- a/components/order/order.vue
+++ b/components/order/order.vue
@@ -93,7 +93,7 @@
},
// 返回
back() {
-
+ this.$refs.popup.close()
},
// tab切换
tabChange(tab) {
@@ -123,7 +123,7 @@
// 留言
const res = await orderSubmit({
- leaveAMessage: this.remarks ? true : false,
+ leaveAMessage: hadOrder ? false : true,
orderShopParam: [
{
remarks: this.remarks,
diff --git a/components/sideSelect/sideSelect.vue b/components/sideSelect/sideSelect.vue
index e48df1c..9c50a66 100644
--- a/components/sideSelect/sideSelect.vue
+++ b/components/sideSelect/sideSelect.vue
@@ -1,6 +1,6 @@
- {{ item.name }}
+ {{ item.classificationName }}
diff --git a/other/addGoods/addGoods.vue b/other/addGoods/addGoods.vue
index 8c609d4..361298e 100644
--- a/other/addGoods/addGoods.vue
+++ b/other/addGoods/addGoods.vue
@@ -92,11 +92,12 @@
prodName: '',
skuList: [
{
+ prodName: '',
status: 1,
oriPrice: '',
price: '',
skuName: '',
- stocks: '',
+ stocks: 0,
}
],
},
@@ -185,11 +186,32 @@
// 提交
async submit(status) {
if (this.submiting) return false
- const { form } = this
+ const form = JSON.parse(JSON.stringify((this.form)))
if (!form.prodName) return this.$util.errMsg(`请输入商品名称!`)
if (!this.pic.length) return this.$util.errMsg(`请上传封面图片!`)
if (!form.brief) return this.$util.errMsg(`请输入商品描述!`)
+ form.skuList = form.skuList.filter(e => e.skuName)
if (!form.skuList.length) return this.$util.errMsg(`请输入产品规格!`)
+ let invalid = 0
+ for (const e of form.skuList) {
+ if (!e.skuName) {
+ this.$util.errMsg(`请输入规格名称!`)
+ invalid = 1
+ }
+ if (!e.price) {
+ this.$util.errMsg(`请输入售价!`)
+ invalid = 1
+ }
+ if (!e.oriPrice) {
+ this.$util.errMsg(`请输入市场价!`)
+ invalid = 1
+ }
+ if (!e.stocks) {
+ this.$util.errMsg(`请输入库存!`)
+ invalid = 1
+ }
+ }
+ if (invalid) return false
this.submiting = true
form.pic = this.pic.map(e => e.url).join()
form.imgs = this.imgs.map(e => e.url).join()
diff --git a/other/procureDetail/procureDetail.vue b/other/procureDetail/procureDetail.vue
index cc9df67..84ae387 100644
--- a/other/procureDetail/procureDetail.vue
+++ b/other/procureDetail/procureDetail.vue
@@ -8,7 +8,8 @@
{{ info.authentication }}
-
+
+
采购内容
@@ -20,6 +21,12 @@
+
+
+ 备注
+
+
+
采购方信息
@@ -159,6 +166,10 @@
color: #333;
}
}
+.remarks {
+ font-size: 26rpx;
+ color: #6d6d6d;
+}
.info {
font-size: 28rpx;
color: #333;
diff --git a/other/supplierDetail/supplierDetail.vue b/other/supplierDetail/supplierDetail.vue
index 252cc68..d13e785 100644
--- a/other/supplierDetail/supplierDetail.vue
+++ b/other/supplierDetail/supplierDetail.vue
@@ -52,7 +52,7 @@
{{ item.prodName }}
- ¥12.8
+ ¥{{ item.price }}
diff --git a/pages/supplier/supplier.vue b/pages/supplier/supplier.vue
index 9774148..1e749d7 100644
--- a/pages/supplier/supplier.vue
+++ b/pages/supplier/supplier.vue
@@ -3,11 +3,11 @@
-
+
-
+
@@ -15,16 +15,20 @@
{{ item.companyName }}
- {{ item.briefIntroduction }}
- {{ item.province }}-{{ item.city }}
+
+
+ {{ item.briefIntroduction }}
+
+
+
+ {{ item.province }}-{{ item.city }}
+
我想采购
- 功能升级中,敬请期待...
-
@@ -43,6 +47,8 @@
+
+ 功能升级中,敬请期待...
@@ -55,6 +61,7 @@
Common,
per: true, // 是否有权限
teamId: uni.getStorageSync('teamId') || '',
+ platformId: uni.getStorageSync('platformId'),
menus: [
{
id: '',
@@ -121,9 +128,10 @@
onShow() {
this.active = ''
this.keyword = ''
- this.per = true
this.typeVisible = false
- this.initList()
+ this.per = this.platformId !== 6 // 供应商不能查看该页面
+ // this.per = true // 供应商不能查看该页面
+ this.per && this.initList()
},
methods: {
initList() {
@@ -159,7 +167,13 @@
// 获取分类
async getCategory() {
const { list } = await treeStructureList()
- this.classifications = list[0].children
+ this.classifications = [
+ {
+ id: '',
+ classificationName: '全部'
+ },
+ ...list[0].children
+ ]
},
// 分类点击回调
classificationClick(item) {
@@ -183,7 +197,7 @@
},
// 切换
menuClick(tab) {
- this.curTab = tab.id
+ this.active = tab.id
this.initList()
},
// 我想采购
@@ -247,14 +261,24 @@
color: #999;
}
.intro {
- max-width: 70%;
- margin: 10rpx 0;
- font-size: 24rpx;
- color: #777;
+ display: flex;
+ align-items: center;
+ margin: 10rpx 0 20rpx;
+ font-size: 26rpx;
+ color: #3c3c3c;
+ .text {
+ max-width: 49%;
+ }
}
.meta {
+ display: flex;
+ align-items: center;
font-size: 26rpx;
- color: #333;
+ color: #3c3c3c;
+ }
+ .icon {
+ width: 30rpx;
+ margin-right: 10rpx;
}
.ell-wrap {
display: inline-flex;
diff --git a/styles/common.scss b/styles/common.scss
index 8f3bcef..177e9bb 100644
--- a/styles/common.scss
+++ b/styles/common.scss
@@ -311,6 +311,7 @@ ul {
-webkit-user-drag: none;
-webkit-user-select: none;
user-select: none;
+ background-color: #f1f1f1;
.mask {
position: relative;
width: 100%;