选择物料
This commit is contained in:
@@ -40,26 +40,26 @@ export const authority = () => {
|
||||
},
|
||||
{menu_id: '5',
|
||||
path: 'RF05',
|
||||
name: '专机管理',
|
||||
sonTree: [
|
||||
// {menu_id: '1', name: '专机管理', path: '/operation'}
|
||||
]
|
||||
},
|
||||
{menu_id: '6',
|
||||
path: 'RF06',
|
||||
name: '暂存区管理',
|
||||
sonTree: [
|
||||
// {menu_id: '1', name: '暂存区管理', path: '/operation'}
|
||||
]
|
||||
},
|
||||
{menu_id: '7',
|
||||
path: 'RF04',
|
||||
name: '清洗管理',
|
||||
sonTree: [
|
||||
{menu_id: '1', name: '清洗上料', path: '/cleaningloading'},
|
||||
{menu_id: '2', name: '清洗下料', path: '/cleaningcutting'},
|
||||
{menu_id: '3', name: '人工倒料', path: '/manpour'}
|
||||
]
|
||||
},
|
||||
{menu_id: '6',
|
||||
path: 'RF06',
|
||||
name: '专机管理',
|
||||
sonTree: [
|
||||
// {menu_id: '1', name: '专机管理', path: '/operation'}
|
||||
]
|
||||
},
|
||||
{menu_id: '7',
|
||||
path: 'RF07',
|
||||
name: '暂存区管理',
|
||||
sonTree: [
|
||||
// {menu_id: '1', name: '暂存区管理', path: '/operation'}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<div class="search-item">
|
||||
<div class="search-label">车间</div>
|
||||
<div class="filter_input_wraper">
|
||||
<el-select v-model="value1" filterable clearable placeholder="请选择">
|
||||
<el-select v-model="value1" filterable clearable placeholder="请选择" @change="changeValue">
|
||||
<el-option
|
||||
v-for="item in options1"
|
||||
:key="item.value"
|
||||
@@ -18,12 +18,12 @@
|
||||
<div class="search-item">
|
||||
<div class="search-label">设备</div>
|
||||
<div class="filter_input_wraper">
|
||||
<el-select v-model="value2" filterable clearable placeholder="请选择">
|
||||
<el-select v-model="value2" filterable clearable placeholder="请选择" @change="changeValue">
|
||||
<el-option
|
||||
v-for="item in options2"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
:key="item.device_code"
|
||||
:label="item.device_name"
|
||||
:value="item.device_code">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
@@ -72,8 +72,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {dictall, washdevicelist, washquery, washweighing, washweighingFinish} from '@config/getData2.js'
|
||||
import {accDiv} from '@config/utils.js'
|
||||
import {dictall, washdevicelist, washquery, washweighing, washweighingFinish} from '@config/getData1.js'
|
||||
export default {
|
||||
name: 'manpour',
|
||||
data () {
|
||||
@@ -127,16 +126,32 @@ export default {
|
||||
this.toast(res.msg)
|
||||
}
|
||||
},
|
||||
changeValue () {
|
||||
if (this.value1 && this.value2) {
|
||||
this._washquery()
|
||||
}
|
||||
},
|
||||
// 1.2根据设备列表获取物料信息
|
||||
async _washquery () {
|
||||
let res = await washquery(this.value1, this.value2)
|
||||
if (res.code === 200) {
|
||||
this.material_spec = res.content[0].material_spec
|
||||
this.material_code = res.content[0].material_code
|
||||
this.material_name = res.content[0].material_name
|
||||
} else {
|
||||
this.toast(res.msg)
|
||||
}
|
||||
},
|
||||
// 称重
|
||||
async _washweighing () {
|
||||
this.disabled1 = true
|
||||
let list = []
|
||||
list.push(this.value2)
|
||||
try {
|
||||
// let res = await washweighing(['A1_SKQX_05'])
|
||||
let res = await washweighing(list)
|
||||
this.toast(res.msg)
|
||||
this.deviceinstor_weight = res.content[0].deviceinstor_weight
|
||||
if (res.code === 200) {
|
||||
this.deviceinstor_weight = res.content[0].deviceinstor_weight
|
||||
}
|
||||
this.disabled1 = false
|
||||
} catch (e) {
|
||||
this.disabled1 = false
|
||||
@@ -151,14 +166,16 @@ export default {
|
||||
}
|
||||
try {
|
||||
let res = await washweighingFinish(this.value1, this.value2, this.material_spec, this.material_code, this.material_name)
|
||||
this.toast(res.msg)
|
||||
this.value1 = ''
|
||||
this.value2 = ''
|
||||
this.material_spec = ''
|
||||
this.material_code = ''
|
||||
this.material_name = ''
|
||||
if (res.code === 200) {
|
||||
this.toast(res.msg)
|
||||
this.value1 = ''
|
||||
this.value2 = ''
|
||||
this.material_spec = ''
|
||||
this.material_code = ''
|
||||
this.material_name = ''
|
||||
this.$store.dispatch('setMaterObj', '')
|
||||
}
|
||||
this.disabled2 = false
|
||||
this.$store.dispatch('setMaterObj', '')
|
||||
} catch (e) {
|
||||
this.disabled2 = false
|
||||
}
|
||||
|
||||
@@ -45,8 +45,6 @@ import {washsearchlist} from '@config/getData1.js'
|
||||
export default {
|
||||
data () {
|
||||
return {
|
||||
options1: [],
|
||||
value1: '',
|
||||
val1: '',
|
||||
dataList: [],
|
||||
pkId: '',
|
||||
|
||||
Reference in New Issue
Block a user