统一
This commit is contained in:
@@ -48,7 +48,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import NavBar from '@/components/NavBar.vue'
|
import NavBar from '@/components/NavBar.vue'
|
||||||
import SearchBox from '@/components/SearchBox.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 {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
NavBar,
|
NavBar,
|
||||||
@@ -72,13 +72,13 @@
|
|||||||
this.title = options.title
|
this.title = options.title
|
||||||
},
|
},
|
||||||
created () {
|
created () {
|
||||||
this._getRegions1()
|
this._getStartRegions()
|
||||||
this._getRegions2()
|
this._getEndRegions()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
async _getRegions1 () {
|
async _getStartRegions () {
|
||||||
try {
|
try {
|
||||||
let res = await getRegions()
|
let res = await getStartRegions()
|
||||||
if (res) {
|
if (res) {
|
||||||
this.options = res.data
|
this.options = res.data
|
||||||
} else {
|
} else {
|
||||||
@@ -92,9 +92,9 @@
|
|||||||
this.index = e
|
this.index = e
|
||||||
this._getPointnByRegion1()
|
this._getPointnByRegion1()
|
||||||
},
|
},
|
||||||
async _getRegions2 () {
|
async _getEndRegions () {
|
||||||
try {
|
try {
|
||||||
let res = await getRegions()
|
let res = await getEndRegions()
|
||||||
if (res) {
|
if (res) {
|
||||||
this.options2 = res.data
|
this.options2 = res.data
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<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>{{i+1}}</td>
|
||||||
<td>{{e.create_time}}</td>
|
<td>{{e.create_time}}</td>
|
||||||
<td>{{e.create_name}}</td>
|
<td>{{e.create_name}}</td>
|
||||||
@@ -59,6 +59,8 @@
|
|||||||
title: '',
|
title: '',
|
||||||
options: [],
|
options: [],
|
||||||
index: '',
|
index: '',
|
||||||
|
pkId: '',
|
||||||
|
pkObj: {},
|
||||||
dataList: [],
|
dataList: [],
|
||||||
reload: false,
|
reload: false,
|
||||||
status: 'more',
|
status: 'more',
|
||||||
@@ -99,6 +101,7 @@
|
|||||||
},
|
},
|
||||||
clearUp () {
|
clearUp () {
|
||||||
this.index = ''
|
this.index = ''
|
||||||
|
this.pkId = ''
|
||||||
this.dataList = []
|
this.dataList = []
|
||||||
this.disabled = false
|
this.disabled = false
|
||||||
this.disabled2 = false
|
this.disabled2 = false
|
||||||
@@ -137,6 +140,10 @@
|
|||||||
this.status = 'noMore'
|
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 () {
|
async _inArea () {
|
||||||
this.disabled = true
|
this.disabled = true
|
||||||
if (!this.index) {
|
if (!this.index) {
|
||||||
@@ -144,7 +151,7 @@
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
let res = await inArea(this.index)
|
let res = await inArea(this.pkObj)
|
||||||
if (res.code === '200') {
|
if (res.code === '200') {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: res.message,
|
title: res.message,
|
||||||
@@ -169,7 +176,7 @@
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
let res = await outArea(this.index)
|
let res = await outArea(this.pkObj)
|
||||||
if (res.code === '200') {
|
if (res.code === '200') {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: res.message,
|
title: res.message,
|
||||||
|
|||||||
@@ -77,7 +77,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import NavBar from '@/components/NavBar.vue'
|
import NavBar from '@/components/NavBar.vue'
|
||||||
import SearchBox from '@/components/SearchBox.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 {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
NavBar,
|
NavBar,
|
||||||
@@ -114,12 +114,12 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
created () {
|
created () {
|
||||||
this._getRegions1()
|
this._getNextRegions()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
async _getRegions1 () {
|
async _getNextRegions () {
|
||||||
try {
|
try {
|
||||||
let res = await getRegions()
|
let res = await getNextRegions()
|
||||||
if (res) {
|
if (res) {
|
||||||
this.options = res.data
|
this.options = res.data
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -14,6 +14,14 @@
|
|||||||
/>
|
/>
|
||||||
</view>
|
</view>
|
||||||
</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-row">
|
||||||
<!-- <view class="zd-col-1">
|
<!-- <view class="zd-col-1">
|
||||||
</view> -->
|
</view> -->
|
||||||
@@ -70,7 +78,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import NavBar from '@/components/NavBar.vue'
|
import NavBar from '@/components/NavBar.vue'
|
||||||
import SearchBox from '@/components/SearchBox.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 {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
NavBar,
|
NavBar,
|
||||||
@@ -79,6 +87,8 @@
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
title: '',
|
title: '',
|
||||||
|
options: [],
|
||||||
|
index: '',
|
||||||
val1: '',
|
val1: '',
|
||||||
dataList: [],
|
dataList: [],
|
||||||
pkId: '',
|
pkId: '',
|
||||||
@@ -116,6 +126,21 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
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) {
|
toCheck (e) {
|
||||||
this.pkId = this.pkId === e.mid ? '' : e.mid
|
this.pkId = this.pkId === e.mid ? '' : e.mid
|
||||||
this.pkObj = this.pkId === e.mid ? e : {}
|
this.pkObj = this.pkId === e.mid ? e : {}
|
||||||
@@ -221,10 +246,10 @@
|
|||||||
searchList () {
|
searchList () {
|
||||||
this.dataList = []
|
this.dataList = []
|
||||||
this.pageNum = 1
|
this.pageNum = 1
|
||||||
this._selectMaterials()
|
this._rgfhSelectMaterials()
|
||||||
},
|
},
|
||||||
async _selectMaterials () {
|
async _rgfhSelectMaterials () {
|
||||||
let res = await selectMaterials(this.val1)
|
let res = await rgfhSelectMaterials(this.val1, this.index)
|
||||||
this.dataList = res.data
|
this.dataList = res.data
|
||||||
// this.totalCount = res.totalElements
|
// this.totalCount = res.totalElements
|
||||||
// if (res.totalElements > 0) {
|
// if (res.totalElements > 0) {
|
||||||
@@ -244,7 +269,7 @@
|
|||||||
this.status = 'loading'
|
this.status = 'loading'
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.pageNum++
|
this.pageNum++
|
||||||
this._selectMaterials()
|
this._rgfhSelectMaterials()
|
||||||
}, 1000)
|
}, 1000)
|
||||||
} else { //停止加载
|
} else { //停止加载
|
||||||
this.status = 'noMore'
|
this.status = 'noMore'
|
||||||
|
|||||||
@@ -47,8 +47,8 @@ export const selectMaterials = (blurry, page, size) => request({
|
|||||||
data: {blurry: blurry, page: page, size: size}
|
data: {blurry: blurry, page: page, size: size}
|
||||||
})
|
})
|
||||||
// 1.2查询所有区域
|
// 1.2查询所有区域
|
||||||
export const getRegions = () => request({
|
export const getNextRegions = () => request({
|
||||||
url:'api/hand/getRegions',
|
url:'api/hand/getNextRegions',
|
||||||
data: {}
|
data: {}
|
||||||
})
|
})
|
||||||
// 1.3确认下料
|
// 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物料绑定
|
// 1.2物料绑定
|
||||||
export const materialBinding = (pcode, arr) => request({
|
export const materialBinding = (pcode, arr) => request({
|
||||||
url:'api/hand/materialBinding',
|
url:'api/hand/materialBinding',
|
||||||
@@ -68,6 +73,11 @@ export const vehicleBinding = (pcode) => request({
|
|||||||
url:'api/hand/vehicleBinding',
|
url:'api/hand/vehicleBinding',
|
||||||
data: {point_code: pcode}
|
data: {point_code: pcode}
|
||||||
})
|
})
|
||||||
|
// 1.2查询所有物料类型
|
||||||
|
export const getMaterialTypes = () => request({
|
||||||
|
url:'api/hand/getMaterialTypes',
|
||||||
|
data: {}
|
||||||
|
})
|
||||||
|
|
||||||
// 人工取货
|
// 人工取货
|
||||||
// 1.1根据点位查询物料信息
|
// 1.1根据点位查询物料信息
|
||||||
@@ -109,6 +119,17 @@ export const sendPointTask = (pcode1, pcode2) => request({
|
|||||||
url:'api/hand/sendPointTask',
|
url:'api/hand/sendPointTask',
|
||||||
data: {point_code: pcode1, point_code2: pcode2}
|
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查询未完成的任务
|
// 1.1查询未完成的任务
|
||||||
@@ -134,12 +155,12 @@ export const selectRegionInfo = (rcode) => request({
|
|||||||
data: {region_code: rcode}
|
data: {region_code: rcode}
|
||||||
})
|
})
|
||||||
// 1.3进入
|
// 1.3进入
|
||||||
export const inArea = (rcode) => request({
|
export const inArea = (obj) => request({
|
||||||
url:'api/hand/inArea',
|
url:'api/hand/inArea',
|
||||||
data: {region_code: rcode}
|
data: obj
|
||||||
})
|
})
|
||||||
// 1.3强制确认
|
// 1.3强制确认
|
||||||
export const outArea = (rcode) => request({
|
export const outArea = (obj) => request({
|
||||||
url:'api/hand/outArea',
|
url:'api/hand/outArea',
|
||||||
data: {region_code: rcode}
|
data: obj
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user