刻字工序多页面修改
This commit is contained in:
@@ -1,123 +0,0 @@
|
||||
<template>
|
||||
<div class="order-wraper">
|
||||
<div class="search-confirm-wrap">
|
||||
<div class="search-wrap">
|
||||
<div class="search-item">
|
||||
<div class="search-label">车间</div>
|
||||
<div class="filter_input_wraper">
|
||||
<el-select v-model="value1" filterable clearable placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in options1"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="search-item">
|
||||
<div class="search-label">设备</div>
|
||||
<div class="filter_input_wraper">
|
||||
<el-select v-model="value2" filterable clearable placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in options2"
|
||||
:key="item.device_code"
|
||||
:label="item.device_name"
|
||||
:value="item.device_code">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="search-item">
|
||||
<div class="search-label">数量</div>
|
||||
<div class="filter_input_wraper">
|
||||
<input type="number" class="filter-input" v-model="qty">
|
||||
</div>
|
||||
</div>
|
||||
<div class="search-item_3">
|
||||
<button class="button button--primary" :disabled="disabled2" :class="{'button--defalut': value2 === ''}" @click="_letterCallVechile">补空框</button>
|
||||
<button class="button button--primary" :disabled="disabled1" :class="{'button--defalut': qty === '' || value2 === ''}" @click="toSure">人工倒料</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {pourDictList, letterDeviceList, pourdeviceinstorQty, letterCallVechile} from '@config/getData2.js'
|
||||
export default {
|
||||
data () {
|
||||
return {
|
||||
options1: [],
|
||||
value1: '',
|
||||
options2: [],
|
||||
value2: '',
|
||||
qty: '',
|
||||
disabled1: false
|
||||
}
|
||||
},
|
||||
created () {
|
||||
this._letterDeviceList()
|
||||
this._pourDictList()
|
||||
},
|
||||
methods: {
|
||||
// 设备下拉框
|
||||
async _letterDeviceList () {
|
||||
let res = await letterDeviceList('1535144682756116480')
|
||||
if (res.code === 200) {
|
||||
this.options2 = [...res.content]
|
||||
} else {
|
||||
this.toast(res.msg)
|
||||
}
|
||||
},
|
||||
// 车间下拉框
|
||||
async _pourDictList () {
|
||||
let res = await pourDictList('product_area')
|
||||
if (res.code === 200) {
|
||||
this.options1 = [...res.content]
|
||||
} else {
|
||||
this.toast(res.msg)
|
||||
}
|
||||
},
|
||||
// 确认入库
|
||||
async toSure () {
|
||||
this.disabled1 = true
|
||||
if (this.qty === '' || this.value2 === '') {
|
||||
this.disabled1 = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
let res = await pourdeviceinstorQty(this.qty, this.value2)
|
||||
this.toast(res.msg)
|
||||
this.value1 = ''
|
||||
this.qty = ''
|
||||
this.value2 = ''
|
||||
this.disabled1 = false
|
||||
} catch (e) {
|
||||
this.disabled1 = false
|
||||
}
|
||||
},
|
||||
// 补空框
|
||||
async _letterCallVechile () {
|
||||
this.disabled2 = true
|
||||
if (this.value2 === '') {
|
||||
this.disabled2 = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
let res = await letterCallVechile(this.value2)
|
||||
this.toast(res.msg)
|
||||
this.value1 = ''
|
||||
this.qty = ''
|
||||
this.value2 = ''
|
||||
this.disabled2 = false
|
||||
} catch (e) {
|
||||
this.disabled2 = false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="stylus" scoped>
|
||||
</style>
|
||||
Reference in New Issue
Block a user