This commit is contained in:
2025-09-16 11:29:06 +08:00
parent aceb3a3301
commit 6a4e67c027
5 changed files with 78 additions and 25 deletions

View File

@@ -14,6 +14,14 @@
/>
</view>
</view>
<view class="zd-row border-bottom">
<view class="zd-col-7">
<span class="filter_label">物料类型</span>
</view>
<view class="zd-col-24 filter_select">
<uni-data-select v-model="index" :localdata="options" @change="selectChange"></uni-data-select>
</view>
</view>
<view class="zd-row">
<!-- <view class="zd-col-1">
</view> -->
@@ -70,7 +78,7 @@
<script>
import NavBar from '@/components/NavBar.vue'
import SearchBox from '@/components/SearchBox.vue'
import {selectMaterials, materialBinding, vehicleBinding} from '@/utils/getData4.js'
import {rgfhSelectMaterials, materialBinding, vehicleBinding, getMaterialTypes} from '@/utils/getData4.js'
export default {
components: {
NavBar,
@@ -79,6 +87,8 @@
data() {
return {
title: '',
options: [],
index: '',
val1: '',
dataList: [],
pkId: '',
@@ -116,6 +126,21 @@
}
},
methods: {
async _getMaterialTypes () {
try {
let res = await getMaterialTypes()
if (res) {
this.options = res.data
} else {
this.options =[]
}
} catch (e) {
this.options = []
}
},
selectChange (e) {
this.index = e
},
toCheck (e) {
this.pkId = this.pkId === e.mid ? '' : e.mid
this.pkObj = this.pkId === e.mid ? e : {}
@@ -221,10 +246,10 @@
searchList () {
this.dataList = []
this.pageNum = 1
this._selectMaterials()
this._rgfhSelectMaterials()
},
async _selectMaterials () {
let res = await selectMaterials(this.val1)
async _rgfhSelectMaterials () {
let res = await rgfhSelectMaterials(this.val1, this.index)
this.dataList = res.data
// this.totalCount = res.totalElements
// if (res.totalElements > 0) {
@@ -244,7 +269,7 @@
this.status = 'loading'
setTimeout(() => {
this.pageNum++
this._selectMaterials()
this._rgfhSelectMaterials()
}, 1000)
} else { //停止加载
this.status = 'noMore'