人工组盘
This commit is contained in:
@@ -49,7 +49,7 @@
|
||||
// ],
|
||||
menuList: [
|
||||
{menu_id: '1', icon: 'RF01', name: '设备点检', path: '/pages/modules/equip-inspection', sonTree: []},
|
||||
{menu_id: '2', icon: 'RF05', name: '人工组盘', path: '', sonTree: []},
|
||||
{menu_id: '2', icon: 'RF05', name: '人工组盘', path: '/pages/modules/man-group', sonTree: []},
|
||||
{menu_id: '3', icon: 'RF07', name: '强制静置', path: '/pages/modules/forced-rest', sonTree: []}
|
||||
],
|
||||
show: false,
|
||||
|
||||
@@ -12,14 +12,14 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="filter_item">
|
||||
<view class="filter_label">点位编码</view>
|
||||
<view class="filter_label">载具类型</view>
|
||||
<view class="filter_input_wraper">
|
||||
<uni-data-select v-model="index1" :localdata="options1" @change="selectChange1"></uni-data-select>
|
||||
</view>
|
||||
</view>
|
||||
<view class="filter_item">
|
||||
<view class="filter_label_wraper">
|
||||
<span class="filter_label">所属工单</span>
|
||||
<span class="filter_label">点位编码</span>
|
||||
</view>
|
||||
<view class="filter_input_wraper">
|
||||
<uni-data-select v-model="index2" :localdata="options2" @change="selectChange2"></uni-data-select>
|
||||
@@ -45,7 +45,7 @@
|
||||
<script>
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
import SearchBox from '@/components/SearchBox.vue'
|
||||
import {deviceInfo, deviceStatus, deviceCheckVerify} from '@/utils/getData2.js'
|
||||
import {getPressCode, getVehicleType, groupmanual} from '@/utils/getData1.js'
|
||||
export default {
|
||||
components: {
|
||||
NavBar,
|
||||
@@ -63,8 +63,8 @@
|
||||
};
|
||||
},
|
||||
created () {
|
||||
this._deviceInfo()
|
||||
this._deviceStatus()
|
||||
this._getPressCode()
|
||||
this._getVehicleType()
|
||||
},
|
||||
methods: {
|
||||
/** 选择器 */
|
||||
@@ -74,39 +74,32 @@
|
||||
selectChange2(e) {
|
||||
this.index2 = e
|
||||
},
|
||||
/** 获取设备下拉框 */
|
||||
async _deviceInfo () {
|
||||
let res = await deviceInfo()
|
||||
/** 获取载具类型下拉框 */
|
||||
async _getVehicleType () {
|
||||
let res = await getVehicleType()
|
||||
this.options1 = [...res]
|
||||
},
|
||||
/** 获取设备状态下拉框 */
|
||||
async _deviceStatus () {
|
||||
let res = await deviceStatus()
|
||||
/** 获取点位编码下拉框 */
|
||||
async _getPressCode () {
|
||||
let res = await getPressCode()
|
||||
this.options2 = [...res]
|
||||
},
|
||||
/** 确定 */
|
||||
async toSure () {
|
||||
this.disabled1 = true
|
||||
if (!this.index1) {
|
||||
uni.showToast({
|
||||
title: '混碾位置不能为空',
|
||||
icon: 'none'
|
||||
})
|
||||
this.disabled1 = false
|
||||
return
|
||||
}
|
||||
if (!this.index2) {
|
||||
uni.showToast({
|
||||
title: '目的压机不能为空',
|
||||
icon: 'none'
|
||||
})
|
||||
this.disabled1 = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
let userName = this.$store.getters.userInfo !== '' ? JSON.parse(this.$store.getters.userInfo).username : ''
|
||||
let res = await deviceCheckVerify(this.index1, userName, this.index2)
|
||||
let res = await groupmanual(this.val1, this.index1, this.index2, this.val2)
|
||||
this.disabled1 = false
|
||||
this.val1 = ''
|
||||
this.val2 = ''
|
||||
this.index1 = ''
|
||||
this.index2 = ''
|
||||
uni.showToast({
|
||||
@@ -119,6 +112,8 @@
|
||||
},
|
||||
toCancle () {
|
||||
this.disabled1 = false
|
||||
this.val1 = ''
|
||||
this.val2 = ''
|
||||
this.index1 = ''
|
||||
this.index2 = ''
|
||||
}
|
||||
|
||||
@@ -1 +1,25 @@
|
||||
import request from './request.js'
|
||||
|
||||
/**
|
||||
* 人工组盘
|
||||
*/
|
||||
// 点位编码
|
||||
export const getPressCode = () => request({
|
||||
url:'api/pda/group/getPressCode',
|
||||
data: {}
|
||||
})
|
||||
// 获取载具类型
|
||||
export const getVehicleType = () => request({
|
||||
url:'api/pda/group/getVehicleType',
|
||||
data: {}
|
||||
})
|
||||
// 人工组盘-确认
|
||||
export const groupmanual = (vcode, vtype, pcode, weight) => request({
|
||||
url:'api/pda/group/manual',
|
||||
data: {
|
||||
vehicle_code: vcode,
|
||||
vehicle_type: vtype,
|
||||
point_code: pcode,
|
||||
material_weight: weight
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user