From 9bc739b7af43e0c012ae1243ab87ae07c12902c4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E8=AE=B8=E5=85=81=E6=9E=9E?= <3422692813@qq.com>
Date: Sat, 26 Oct 2024 17:07:36 +0800
Subject: [PATCH] =?UTF-8?q?=E9=87=87=E8=B4=AD=E5=8D=95=E3=80=81=E5=85=A5?=
=?UTF-8?q?=E5=BA=93?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
components/repairSoCard.vue | 247 ++++++++++++++++++++++++
pages-order/orderList/orderList.vue | 70 ++++++-
pages-warehouse/inOutWarehouse/part.vue | 163 +++++++++++-----
3 files changed, 431 insertions(+), 49 deletions(-)
create mode 100644 components/repairSoCard.vue
diff --git a/components/repairSoCard.vue b/components/repairSoCard.vue
new file mode 100644
index 0000000..290ae1e
--- /dev/null
+++ b/components/repairSoCard.vue
@@ -0,0 +1,247 @@
+
+
+
+
+ 采购单号:{{ order.soNo }}
+
+
+
+
+
+
+
+
+ 数量:{{ order.itemCount }}
+
+
+ 金额:{{ order.totalPrice }}
+
+
+ 状态:{{ soStatusText }}
+
+
+ 采购员:{{ order.userName }}
+
+
+
+
+
+
+
+
+
+
diff --git a/pages-order/orderList/orderList.vue b/pages-order/orderList/orderList.vue
index 9b0d463..2aa47ef 100644
--- a/pages-order/orderList/orderList.vue
+++ b/pages-order/orderList/orderList.vue
@@ -1,6 +1,6 @@
-
@@ -41,12 +50,14 @@ import {
getStrData,
getTenantId
} from '@/utils/auth'
+import RepairSoCard from "@/components/repairSoCard.vue";
export default {
components: {
OrderCard,
tabBarVue,
- VNavigationBar
+ VNavigationBar,
+ RepairSoCard
},
data() {
return {
@@ -56,6 +67,7 @@ export default {
pageNo: 1,
pageSize: 10,
total: 0,
+ isRepairWarehouse : false, //是否是仓库管理员
//下来刷新状态
isTriggered:false,
imageUrl: '',
@@ -71,6 +83,7 @@ export default {
],
orderList: [
],
+ repairSoList: [],
}
},
onShow() {
@@ -81,6 +94,15 @@ export default {
}else{
//直接取缓存中的用户信息
this.userInfo = getUserInfo()
+ if (this.userInfo.roleCodes.includes("repair_warehouse")){
+ this.tabList = [
+ {
+ id: 0,
+ title: '采购单'
+ },
+ ]
+ this.isRepairWarehouse = true
+ }
this.onRefresherrefresh()
}
},
@@ -97,7 +119,11 @@ export default {
//页码+1,调用获取数据的方法获取第二页数据
this.pageNo++
//此处调用自己获取数据列表的方法
- this.getOrderList()
+ if (this.isRepairWarehouse) {
+ this.getRepairSoList()
+ }else{
+ this.getOrderList()
+ }
},
/**
* 下拉刷新数据
@@ -106,8 +132,13 @@ export default {
this.isTriggered = true
this.pageNo = 1
this.total = 0
- this.orderList = []
- this.getOrderList()
+ if (this.isRepairWarehouse) {
+ this.getRepairSoList()
+ this.repairSoList = []
+ }else{
+ this.getOrderList()
+ this.orderList = []
+ }
},
/**
* 清空
@@ -230,6 +261,33 @@ export default {
})
}
},
+ /**
+ * 获取采购单
+ */
+ getRepairSoList(){
+ const paramsObj = {
+ pageNo: this.pageNo,
+ pageSize: this.pageSize,
+ userId: this.userInfo.id,
+ soType: "01"
+ }
+ request({
+ url: '/admin-api/repair/so/page',
+ method: 'get',
+ params: paramsObj
+ }).then((res) => {
+
+ //判断 如果获取的数据的页码不是第一页,就让之前赋值获取过的数组数据 concat连接 刚获取的第n页数据
+ if (this.pageNo != 1) {
+ this.repairSoList = this.repairSoList.concat(res.data.records)
+ } else {
+ this.repairSoList = res.data.records
+ }
+ //将获取的总条数赋值
+ this.total = res.data.total
+ this.isTriggered = false
+ })
+ },
}
}
diff --git a/pages-warehouse/inOutWarehouse/part.vue b/pages-warehouse/inOutWarehouse/part.vue
index b615dee..8ca6291 100644
--- a/pages-warehouse/inOutWarehouse/part.vue
+++ b/pages-warehouse/inOutWarehouse/part.vue
@@ -1,19 +1,19 @@
-
+
-
+
供应商
查询
-
+
备注
-
-
+
+
@@ -30,7 +30,8 @@
@@ -38,52 +39,62 @@
@@ -214,17 +287,20 @@ export default {
display: flex;
flex-direction: column;
}
+
.listBox {
- padding: 30 rpx 32 rpx;
+ padding: 30rpx 32rpx;
flex: 1;
height: 0;
}
+
.list {
background-color: #fff;
padding: 0 30rpx;
height: 100%;
overflow: auto;
}
+
.formItem {
box-sizing: border-box;
margin: 0 auto;
@@ -250,6 +326,7 @@ export default {
font-size: 32rpx;
color: #999999;
}
+
.repairBottom {
display: flex;
align-items: center;