This commit is contained in:
2025-09-17 13:18:40 +08:00
parent 31bfde4fbb
commit 0a8a7b1f17
6 changed files with 74 additions and 41 deletions

View File

@@ -11,17 +11,10 @@
<view class="zd-col-24 filter_select">
<search-box
v-model="val1"
@handleChange="handleChange"
/>
</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> -->
@@ -78,7 +71,7 @@
<script>
import NavBar from '@/components/NavBar.vue'
import SearchBox from '@/components/SearchBox.vue'
import {rgfhSelectMaterials, materialBinding, vehicleBinding, getMaterialTypes} from '@/utils/getData4.js'
import {selectMaterialByPointCode, materialBinding, vehicleBinding} from '@/utils/getData4.js'
export default {
components: {
NavBar,
@@ -87,8 +80,6 @@
data() {
return {
title: '',
options: [],
index: '',
val1: '',
dataList: [],
pkId: '',
@@ -126,21 +117,6 @@
}
},
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 : {}
@@ -243,13 +219,18 @@
this.disabled = false
this.disabled2 = false
},
handleChange (e) {
if (e) {
this.searchList()
}
},
searchList () {
this.dataList = []
this.pageNum = 1
this._rgfhSelectMaterials()
this._selectMaterialByPointCode()
},
async _rgfhSelectMaterials () {
let res = await rgfhSelectMaterials(this.val1, this.index)
async _selectMaterialByPointCode () {
let res = await selectMaterialByPointCode(this.val1)
this.dataList = res.data
// this.totalCount = res.totalElements
// if (res.totalElements > 0) {
@@ -269,7 +250,7 @@
this.status = 'loading'
setTimeout(() => {
this.pageNum++
this._rgfhSelectMaterials()
this._selectMaterialByPointCode()
}, 1000)
} else { //停止加载
this.status = 'noMore'