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

@@ -48,7 +48,7 @@
<script>
import NavBar from '@/components/NavBar.vue'
import SearchBox from '@/components/SearchBox.vue'
import {getRegions, getPointnByRegion, sendPointTask} from '@/utils/getData4.js'
import {getStartRegions, getEndRegions, getPointnByRegion, sendPointTask} from '@/utils/getData4.js'
export default {
components: {
NavBar,
@@ -72,13 +72,13 @@
this.title = options.title
},
created () {
this._getRegions1()
this._getRegions2()
this._getStartRegions()
this._getEndRegions()
},
methods: {
async _getRegions1 () {
async _getStartRegions () {
try {
let res = await getRegions()
let res = await getStartRegions()
if (res) {
this.options = res.data
} else {
@@ -92,9 +92,9 @@
this.index = e
this._getPointnByRegion1()
},
async _getRegions2 () {
async _getEndRegions () {
try {
let res = await getRegions()
let res = await getEndRegions()
if (res) {
this.options2 = res.data
} else {

View File

@@ -25,7 +25,7 @@
</tr>
</thead>
<tbody>
<tr v-for="(e, i) in dataList" :key="i">
<tr v-for="(e, i) in dataList" :key="i" @click="toCheck(e)" :class="{'checked': e.create_name === pkId}">
<td>{{i+1}}</td>
<td>{{e.create_time}}</td>
<td>{{e.create_name}}</td>
@@ -59,6 +59,8 @@
title: '',
options: [],
index: '',
pkId: '',
pkObj: {},
dataList: [],
reload: false,
status: 'more',
@@ -99,6 +101,7 @@
},
clearUp () {
this.index = ''
this.pkId = ''
this.dataList = []
this.disabled = false
this.disabled2 = false
@@ -137,6 +140,10 @@
this.status = 'noMore'
}
},
toCheck (e) {
this.pkId = e.create_name === this.pkId ? '' : e.create_name
this.pkObj = this.pkId === e.create_name ? e : {}
},
async _inArea () {
this.disabled = true
if (!this.index) {
@@ -144,7 +151,7 @@
return
}
try {
let res = await inArea(this.index)
let res = await inArea(this.pkObj)
if (res.code === '200') {
uni.showToast({
title: res.message,
@@ -169,7 +176,7 @@
return
}
try {
let res = await outArea(this.index)
let res = await outArea(this.pkObj)
if (res.code === '200') {
uni.showToast({
title: res.message,

View File

@@ -77,7 +77,7 @@
<script>
import NavBar from '@/components/NavBar.vue'
import SearchBox from '@/components/SearchBox.vue'
import {getRegions, selectMaterials, blanking} from '@/utils/getData4.js'
import {getNextRegions, selectMaterials, blanking} from '@/utils/getData4.js'
export default {
components: {
NavBar,
@@ -114,12 +114,12 @@
}
},
created () {
this._getRegions1()
this._getNextRegions()
},
methods: {
async _getRegions1 () {
async _getNextRegions () {
try {
let res = await getRegions()
let res = await getNextRegions()
if (res) {
this.options = res.data
} else {

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'

View File

@@ -47,8 +47,8 @@ export const selectMaterials = (blurry, page, size) => request({
data: {blurry: blurry, page: page, size: size}
})
// 1.2查询所有区域
export const getRegions = () => request({
url:'api/hand/getRegions',
export const getNextRegions = () => request({
url:'api/hand/getNextRegions',
data: {}
})
// 1.3确认下料
@@ -58,6 +58,11 @@ export const blanking = (pcode, arr, rcode) => request({
})
// 人工放货
// 1.1查询物料信息
export const rgfhSelectMaterials = (blurry, type, page, size) => request({
url:'api/hand/selectMaterials',
data: {blurry: blurry, material_type: type, page: page, size: size}
})
// 1.2物料绑定
export const materialBinding = (pcode, arr) => request({
url:'api/hand/materialBinding',
@@ -68,6 +73,11 @@ export const vehicleBinding = (pcode) => request({
url:'api/hand/vehicleBinding',
data: {point_code: pcode}
})
// 1.2查询所有物料类型
export const getMaterialTypes = () => request({
url:'api/hand/getMaterialTypes',
data: {}
})
// 人工取货
// 1.1根据点位查询物料信息
@@ -109,6 +119,17 @@ export const sendPointTask = (pcode1, pcode2) => request({
url:'api/hand/sendPointTask',
data: {point_code: pcode1, point_code2: pcode2}
})
// 1.2查询所有起点区域
export const getStartRegions = () => request({
url:'api/hand/getStartRegions',
data: {}
})
// 1.2查询所有终点区域
export const getEndRegions = () => request({
url:'api/hand/getEndRegions',
data: {}
})
// 作业管理
// 1.1查询未完成的任务
@@ -134,12 +155,12 @@ export const selectRegionInfo = (rcode) => request({
data: {region_code: rcode}
})
// 1.3进入
export const inArea = (rcode) => request({
export const inArea = (obj) => request({
url:'api/hand/inArea',
data: {region_code: rcode}
data: obj
})
// 1.3强制确认
export const outArea = (rcode) => request({
export const outArea = (obj) => request({
url:'api/hand/outArea',
data: {region_code: rcode}
data: obj
})