增加物资类型筛选
This commit is contained in:
parent
07107dffc5
commit
6da25629b3
|
|
@ -55,11 +55,29 @@
|
|||
></uni-data-select>
|
||||
</uni-forms-item>
|
||||
</uni-col>
|
||||
<!-- <uni-col :span="6">
|
||||
<view class="addBtn" @click="getList">查询</view>
|
||||
</uni-col> -->
|
||||
</uni-row>
|
||||
<uni-row
|
||||
:gutter="30"
|
||||
style="display: flex; margin-top: -15px;"
|
||||
>
|
||||
<uni-col :span="24">
|
||||
<uni-forms-item name="typeName" >
|
||||
<uni-data-select
|
||||
v-model="queryParams.typeName"
|
||||
:localdata="typeList"
|
||||
placeholder="选择物资类型"
|
||||
:searchable="false"
|
||||
filterable
|
||||
></uni-data-select>
|
||||
</uni-forms-item>
|
||||
</uni-col>
|
||||
<uni-col :span="6">
|
||||
<view class="addBtn" @click="getList">查询</view>
|
||||
</uni-col>
|
||||
</uni-row>
|
||||
|
||||
</div>
|
||||
|
||||
<scroll-view scroll-y class="scroll-container">
|
||||
|
|
@ -135,7 +153,8 @@
|
|||
<script setup>
|
||||
import { onLoad } from '@dcloudio/uni-app'
|
||||
import { onMounted, ref, reactive, computed } from 'vue'
|
||||
import { getBranchListApi,getImpUnitListApi, getDepartListByImpUnitApi, getProListByDepartApi, } from '@/services/materialsStation'
|
||||
import { getBranchListApi,getImpUnitListApi, getDepartListByImpUnitApi, getProListByDepartApi } from '@/services/materialsStation'
|
||||
import { getTypeListApi } from '@/services/inStorage/index.js'
|
||||
import { useMemberStore } from '@/stores'
|
||||
const memberStore = useMemberStore()
|
||||
const userInfo = ref(memberStore.userInfo || {})
|
||||
|
|
@ -147,10 +166,12 @@ const queryParams = ref({
|
|||
departName: '',
|
||||
proName: '',
|
||||
keyWord: '',
|
||||
typeName: ''
|
||||
})
|
||||
const impUnitOptions = ref([])
|
||||
const departOptions = ref([])
|
||||
const proOptions = ref([])
|
||||
const typeList = ref([])
|
||||
|
||||
const back = () => {
|
||||
uni.navigateBack({
|
||||
|
|
@ -204,6 +225,7 @@ onLoad((opt) => {
|
|||
handleImpUnitChange()
|
||||
handleDepartChange()
|
||||
getList()
|
||||
getTypeList()
|
||||
})
|
||||
|
||||
onMounted(() => {
|
||||
|
|
@ -265,6 +287,23 @@ const handleDepartChange= async () => {
|
|||
}
|
||||
};
|
||||
|
||||
const getTypeList = async () => {
|
||||
try {
|
||||
const res = await getTypeListApi({ level: 3, skipPermission: 1 })
|
||||
console.log('🚀 ~ getTypeList ~ res:', res)
|
||||
typeList.value = []
|
||||
if (res.data) {
|
||||
typeList.value = res.data.map(item => ({
|
||||
text: item.typeName, // 设备类型字段
|
||||
value: item.typeName
|
||||
}))
|
||||
}
|
||||
} catch (error) {
|
||||
console.log('🚀 ~ getTypeList ~ error:', error)
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
const filteredEquipmentCategories = computed(() => {
|
||||
|
|
@ -290,7 +329,7 @@ const showDetail= (engineering) => {
|
|||
console.log('查看详情:', engineering);
|
||||
// 这里可以跳转到详情页面或显示弹窗等
|
||||
uni.navigateTo({
|
||||
url: '/pages/materialsStation/equipmentRecord/equipmentRecordDetails?proName='+ engineering.proName,
|
||||
url: '/pages/materialsStation/equipmentRecord/equipmentRecordDetails?proName='+ engineering.proName + '&typeName='+ queryParams.value.typeName,
|
||||
})
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -105,6 +105,7 @@ const back = () => {
|
|||
onLoad((options) => {
|
||||
console.log(options)
|
||||
proName.value = options.proName
|
||||
queryParams.value.typeName = options.typeName
|
||||
getDetailsList()
|
||||
})
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue