From 2fea12cec55f173a7c232c64663103960aed48eb Mon Sep 17 00:00:00 2001
From: FrancisHu <2756004617@qq.com>
Date: Tue, 11 Jun 2024 10:33:53 +0800
Subject: [PATCH] =?UTF-8?q?6.11=E5=AE=81=E5=A4=8F=E4=B8=8B=E6=8B=89?=
=?UTF-8?q?=E6=A1=86=E6=96=B0=E5=A2=9E=E8=BE=93=E5=85=A5=E5=8A=9F=E8=83=BD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pages/exitMaterial/exitMaterial.vue | 38 +++++++++++++++++------------
pages/orderCart/orderCart.vue | 18 ++++++--------
2 files changed, 30 insertions(+), 26 deletions(-)
diff --git a/pages/exitMaterial/exitMaterial.vue b/pages/exitMaterial/exitMaterial.vue
index d1fce36..f14fed3 100644
--- a/pages/exitMaterial/exitMaterial.vue
+++ b/pages/exitMaterial/exitMaterial.vue
@@ -113,19 +113,21 @@
-
+ filterable
+ >
-
+ filterable
+ >
@@ -231,25 +233,28 @@ import { basePath } from '../../public'
deptChange (e) {
let that = this
console.log(e, that.fetchedList);
- for (let i = 0; i < that.fetchedList.length; i++) {
- if (e == that.fetchedList[i].id) {
- that.newAdd.unitName = that.fetchedList[i].name
- }
- }
- this.$api.fetchMaterial.getProjList({
- id: e
- }, null).then(res => {
+ that.fetchedList.forEach(list => {
+ if (e.value == list.id) that.newAdd.unitName = list.name
+ })
+ that.$api.fetchMaterial.getProjList({
+ id: e.value
+ }).then(res => {
console.log(res);
if (res.data.code == 200) {
- that.projRange = res.data.data.map((item) => {
+ that.projRange = res.data.data.map(item => {
return {
text: item['name'],
value: item['id']
}
})
+ } else {
+ uni.showToast({
+ icon: 'none',
+ title: res.data.msg
+ })
}
}).catch(err => {
-
+ console.log(err);
})
},
formSubmit () {
@@ -291,7 +296,10 @@ import { basePath } from '../../public'
}
}
}).catch(err => {
-
+ uni.showToast({
+ icon: 'none',
+ title: '单位与工程不匹配!'
+ })
})
})
},
diff --git a/pages/orderCart/orderCart.vue b/pages/orderCart/orderCart.vue
index f79a5c0..40151eb 100644
--- a/pages/orderCart/orderCart.vue
+++ b/pages/orderCart/orderCart.vue
@@ -58,17 +58,19 @@
-
+ filterable
+ >
-
+ filterable
+ >
@@ -266,9 +268,6 @@ import { basePath } from '../../public';
let that = this
let nowRole = uni.getStorageSync('roles')
let found = false
- /* that.ableUseArr.forEach(item => {
- if (nowRole.includes(item)) found = true
- }) */
for (let role of nowRole) {
console.log(role);
if (that.ableUseArr.includes(role)) {
@@ -278,9 +277,6 @@ import { basePath } from '../../public';
}
console.log(found);
await this.getgreementId()
- /* if(this.deptFormData.deptName = ''){
- return;
- } */
if (!found) {
uni.showToast({
icon: 'none',
@@ -350,7 +346,7 @@ import { basePath } from '../../public';
console.log(e);
// 切换部门时展示工程
this.$api.fetchMaterial.getProjList({
- id: e
+ id: e.value
}, null).then(res => {
console.log(res);
if (res.data.code == 200) {