解包出桶

This commit is contained in:
2026-02-27 13:09:44 +08:00
parent fa58622306
commit b144f5b949

View File

@@ -1,17 +1,9 @@
<template> <template>
<view class="zd_container"> <view class="zd_container">
<!-- 解包下料 --> <!-- 解包出桶 -->
<nav-bar :title="title"></nav-bar> <nav-bar :title="title"></nav-bar>
<view class="zd_content"> <view class="zd_content">
<view class="zd_wrapper"> <view class="zd_wrapper">
<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 border-bottom"> <view class="zd-row border-bottom">
<view class="zd-col-7"> <view class="zd-col-7">
<span class="filter_label">设备点位</span> <span class="filter_label">设备点位</span>
@@ -21,14 +13,13 @@
</view> </view>
</view> </view>
<view class="zd-row border-bottom"> <view class="zd-row border-bottom">
<view class="zd-col-6"> <view class="zd-col-7">
<span class="filter_label">物料重量</span> <span class="filter_label">物料重量</span>
</view> </view>
<view class="zd-col-12"> <view class="zd-col-24">
<!-- <search-box v-model="code" @handleChange="handleChange1" @handleDel="handleDel1" /> --> <!-- <search-box v-model="code" @handleChange="handleChange1" @handleDel="handleDel1" /> -->
<input type="number" class="filter_input" v-model="val3" @blur="handleBlur()"> <input type="number" class="filter_input" v-model="val3" @blur="handleBlur()">
</view> </view>
<button class="mini-btn" type="primary" size="mini" @tap="_getWeight">获取重量</button>
</view> </view>
<!-- <view class="zd-row border-bottom"> <!-- <view class="zd-row border-bottom">
<view class="zd-col-7"> <view class="zd-col-7">
@@ -103,8 +94,6 @@
data() { data() {
return { return {
title: '', title: '',
options: [],
index: '',
options2: [], options2: [],
index2: '', index2: '',
id: '', id: '',
@@ -121,9 +110,11 @@
standError: '', standError: '',
disabled: false, disabled: false,
statusMap: { statusMap: {
'1': '未开始', '1': '未生产',
'2': '已下发',
'3': '生产中', '3': '生产中',
'5': '已结束' '4': '等待下料',
'5': '完成'
}, },
reload: false, reload: false,
status: 'more', status: 'more',
@@ -142,7 +133,7 @@
this.id = options.id this.id = options.id
}, },
created () { created () {
this._regionList() this._pointList('DDJBQ')
}, },
methods: { methods: {
handleBlur () { handleBlur () {
@@ -150,6 +141,9 @@
if (this.val3 < 0) { if (this.val3 < 0) {
this.val3 = 0 this.val3 = 0
} else { } else {
if (this.val3 > 2000) {
this.val3 = 2000
}
// 1. 过滤非法字符 // 1. 过滤非法字符
// this.val3 = this.val3.replace(/[^0-9]/g, '') // this.val3 = this.val3.replace(/[^0-9]/g, '')
// this.val3 = this.val3.replace(/^0+/, '') || '0' // this.val3 = this.val3.replace(/^0+/, '') || '0'
@@ -176,18 +170,6 @@
// }) // })
} }
}, },
async _regionList () {
try {
let res = await regionList()
if (res) {
this.options = res.data
} else {
this.options = []
}
} catch (e) {
this.options = []
}
},
async _pointList (e) { async _pointList (e) {
try { try {
let res = await pointList(e) let res = await pointList(e)
@@ -200,10 +182,6 @@
this.options2 = [] this.options2 = []
} }
}, },
selectChange (e) {
this.index = e
this._pointList(e)
},
selectChange2 (e) { selectChange2 (e) {
this.index2 = e this.index2 = e
this._jbGetVehicleCode() this._jbGetVehicleCode()
@@ -264,7 +242,6 @@
this.pkObj = this.pkId === e.workorder_id ? e : {} this.pkObj = this.pkId === e.workorder_id ? e : {}
}, },
clearUp () { clearUp () {
this.index = ''
this.index2 = '' this.index2 = ''
this.val2 = '' this.val2 = ''
this.val3 = '' this.val3 = ''
@@ -346,7 +323,7 @@
}, },
async _downMaterial () { async _downMaterial () {
try { try {
let res = await downMaterial(this.pkId, this.index, this.val3, this.index2, this.val1, this.val2) let res = await downMaterial(this.pkId, 'DDJBQ', this.val3, this.index2, this.val1, this.val2)
if (res.code === '200') { if (res.code === '200') {
uni.showToast({ uni.showToast({
title: res.message, title: res.message,