This commit is contained in:
2026-01-12 14:48:21 +08:00
parent d661432ab1
commit d327b56a2f
12 changed files with 78 additions and 64 deletions

View File

@@ -1,27 +1,18 @@
<template>
<view class="zd_container">
<!-- 查询物料 -->
<!-- 查询品种 -->
<nav-bar :title="title" :inner="true"></nav-bar>
<view class="zd_content">
<view class="zd_wrapper">
<view class="zd-row border-bottom">
<view class="zd-col-7">
<!-- <span class="filter_label">物料</span> -->
<span class="filter_label">{{$t('filter.material')}}</span>
<span class="filter_label">KCODE</span>
<!-- <span class="filter_label">{{$t('filter.material')}}</span> -->
</view>
<view class="zd-col-24">
<input type="text" class="filter_input" v-model="val1">
</view>
</view>
<view class="zd-row border-bottom">
<view class="zd-col-9">
<!-- <span class="filter_label">物料类型</span> -->
<span class="filter_label">{{$t('filter.wltype')}}</span>
</view>
<view class="zd-col-24 filter_select">
<uni-data-select v-model="index" :localdata="options" placeholder="" @change="selectChange"></uni-data-select>
</view>
</view>
</view>
<view class="zd_wrapper grid-wraper">
<view class="slide_new">
@@ -32,18 +23,22 @@
<th>物料品种</th>
<th>单位</th>
<th>物料类型</th> -->
<th>{{$t('grid.material-code')}}</th>
<!-- <th>{{$t('grid.material-code')}}</th>
<th>{{$t('grid.material-name')}}</th>
<th>{{$t('grid.unit')}}</th>
<th>{{$t('grid.wltype')}}</th>
<th>{{$t('grid.wltype')}}</th> -->
<th>KCODE</th>
<th>品种批号</th>
</tr>
</thead>
<tbody>
<tr v-for="(e, i) in dataList" :key="i" :class="{'checked': e.material_code === pkId}" @tap="toCheck(e)">
<td>{{e.material_code}}</td>
<!-- <td>{{e.material_code}}</td>
<td>{{e.material_name}}</td>
<td>{{e.measure_unit_id}}</td>
<td>{{e.material_type}}</td>
<td>{{e.material_type}}</td> -->
<td>{{e.material_code}}</td>
<td>{{e.material_name}}</td>
</tr>
</tbody>
</table>
@@ -65,7 +60,7 @@
<script>
import NavBar from '@/components/NavBar.vue'
import SearchBox from '@/components/SearchBox.vue'
import {rgfhSelectMaterials, getMaterialTypes} from '@/utils/getData4.js'
import {rgfhSelectMaterials} from '@/utils/getData4.js'
export default {
components: {
NavBar,
@@ -74,8 +69,6 @@
data() {
return {
title: '',
options: [],
index: '',
val1: '',
dataList: [],
// dataList: [
@@ -100,34 +93,15 @@
onLoad (options) {
this.title = options.title
// this.searchList()
this._getMaterialTypes()
},
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
if (this.val1 && this.index) {
this.searchList()
}
},
searchList () {
this.dataList = []
this.pageNum = 1
this._rgfhSelectMaterials()
},
async _rgfhSelectMaterials () {
let res = await rgfhSelectMaterials(this.val1, this.index)
let res = await rgfhSelectMaterials(this.val1, '')
this.dataList = res.data
// this.totalCount = res.totalElements
// if (res.totalElements > 0) {