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

@@ -48,7 +48,7 @@
<script>
import NavBar from '@/components/NavBar.vue'
import SearchBox from '@/components/SearchBox.vue'
import {getRegions, selectRegionInfo, inArea, outArea} from '@/utils/getData4.js'
import {getChargeRegions, selectRegionInfo, inArea, outArea} from '@/utils/getData4.js'
export default {
components: {
NavBar,
@@ -80,12 +80,12 @@
this.title = options.title
},
created () {
this._getRegions1()
this._getChargeRegions()
},
methods: {
async _getRegions1 () {
async _getChargeRegions () {
try {
let res = await getRegions()
let res = await getChargeRegions()
if (res) {
this.options = res.data
} else {

View File

@@ -130,7 +130,8 @@
})
},
async _getPointInfo () {
let res = await getPointInfo( this.index, this.val1, this.currentData.material_code)
let mcode = this.currentData.material_code || ''
let res = await getPointInfo( this.index, this.val1, mcode)
this.dataList = res.data
// this.totalCount = res.totalElements
// if (res.totalElements > 0) {

View File

@@ -100,6 +100,11 @@
handleChange1 (e) {
if (e) {
this._getRegionByPoint(e)
} else {
uni.showToast({
title: 'scan',
icon: 'none'
})
}
},
async _getRegionByPoint (e) {

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'

View File

@@ -12,6 +12,14 @@
<input type="text" class="filter_input" v-model="val1">
</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>
<view class="zd_wrapper grid-wraper">
<view class="slide_new">
@@ -21,6 +29,7 @@
<th>物料编码</th>
<th>物料名称</th>
<th>单位</th>
<th>物料类型</th>
</tr>
</thead>
<tbody>
@@ -28,6 +37,7 @@
<td>{{e.material_code}}</td>
<td>{{e.material_name}}</td>
<td>{{e.measure_unit_id}}</td>
<td>{{e.material_type}}</td>
</tr>
</tbody>
</table>
@@ -46,7 +56,7 @@
<script>
import NavBar from '@/components/NavBar.vue'
import SearchBox from '@/components/SearchBox.vue'
import {selectMaterials} from '@/utils/getData4.js'
import {rgfhSelectMaterials, getMaterialTypes} from '@/utils/getData4.js'
export default {
components: {
NavBar,
@@ -55,6 +65,8 @@
data() {
return {
title: '',
options: [],
index: '',
val1: '',
dataList: [],
// dataList: [
@@ -79,15 +91,34 @@
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._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) {
@@ -107,7 +138,7 @@
this.status = 'loading'
setTimeout(() => {
this.pageNum++
this._selectMaterials()
this._rgfhSelectMaterials()
}, 1000)
} else { //停止加载
this.status = 'noMore'

View File

@@ -78,6 +78,11 @@ export const getMaterialTypes = () => request({
url:'api/hand/getMaterialTypes',
data: {}
})
// 1.3根据点位查询物料
export const selectMaterialByPointCode = (pcode) => request({
url:'api/hand/selectMaterialByPointCode',
data: {point_code: pcode}
})
// 人工取货
// 1.1根据点位查询物料信息
@@ -91,7 +96,7 @@ export const comfirmGetting = (pcode, arr) => request({
data: {point_code: pcode, data: arr}
})
// 点位维护
// 库存锁定解锁
// 1.1查询缓冲区点位库存
export const getPointInfo = (rcode, pcode, mcode) => request({
url:'api/hand/getPointInfo',
@@ -107,6 +112,11 @@ export const unlock = (arr) => request({
url:'api/hand/unlock',
data: {data: arr}
})
// 1.4查询所有区域
export const getRegions = () => request({
url:'api/hand/getRegions',
data: {}
})
// 定点任务
// 1.1根据区域查询点位
@@ -154,6 +164,11 @@ export const selectRegionInfo = (rcode) => request({
url:'api/hand/selectRegionInfo',
data: {region_code: rcode}
})
// 1.2查询所有管制区域
export const getChargeRegions = () => request({
url:'api/hand/getChargeRegions',
data: {}
})
// 1.3进入
export const inArea = (obj) => request({
url:'api/hand/inArea',