临时刻字上料
This commit is contained in:
@@ -2,41 +2,9 @@
|
|||||||
<div class="order-wraper">
|
<div class="order-wraper">
|
||||||
<div class="search-confirm-wrap">
|
<div class="search-confirm-wrap">
|
||||||
<div class="search-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">
|
<div class="search-item_3">
|
||||||
<button class="button button--primary" :disabled="disabled2" :class="{'button--defalut': value2 === ''}" @click="_tmpsendVechile">刻字上料</button>
|
<button class="button button--primary" :disabled="disabled2" @click="_tmpsendVechile">刻字上料</button>
|
||||||
<button class="button button--primary" :disabled="disabled1" :class="{'button--defalut': qty === '' || value2 === ''}" @click="toSure">空框搬回</button>
|
<button class="button button--primary" :disabled="disabled1" @click="toSure">空框搬回</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -44,55 +12,23 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {dictDetailByCode, devicelist, tmpcallVechile, tmpsendVechile} from '@config/getData1.js'
|
import {tmpcallVechile, tmpsendVechile} from '@config/getData1.js'
|
||||||
export default {
|
export default {
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
options1: [],
|
|
||||||
value1: '',
|
|
||||||
options2: [],
|
|
||||||
value2: '',
|
|
||||||
qty: '',
|
|
||||||
disabled1: false,
|
disabled1: false,
|
||||||
disabled2: false
|
disabled2: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created () {
|
created () {
|
||||||
this._letterDeviceList()
|
|
||||||
this._pourDictList()
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 设备下拉框
|
|
||||||
async _devicelist () {
|
|
||||||
let res = await devicelist('1535144682756116480')
|
|
||||||
if (res.code === 200) {
|
|
||||||
this.options2 = [...res.content]
|
|
||||||
} else {
|
|
||||||
this.toast(res.msg)
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 车间下拉框
|
|
||||||
async _dictDetailByCode () {
|
|
||||||
let res = await dictDetailByCode('product_area')
|
|
||||||
if (res.code === 200) {
|
|
||||||
this.options1 = [...res.content]
|
|
||||||
} else {
|
|
||||||
this.toast(res.msg)
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 空框搬回
|
// 空框搬回
|
||||||
async toSure () {
|
async toSure () {
|
||||||
this.disabled1 = true
|
this.disabled1 = true
|
||||||
if (this.qty === '' || this.value2 === '') {
|
|
||||||
this.disabled1 = false
|
|
||||||
return
|
|
||||||
}
|
|
||||||
try {
|
try {
|
||||||
let res = await tmpcallVechile(this.qty, this.value2)
|
let res = await tmpcallVechile('', '')
|
||||||
this.toast(res.message)
|
this.toast(res.message)
|
||||||
this.value1 = ''
|
|
||||||
this.qty = ''
|
|
||||||
this.value2 = ''
|
|
||||||
this.disabled1 = false
|
this.disabled1 = false
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
this.disabled1 = false
|
this.disabled1 = false
|
||||||
@@ -106,11 +42,8 @@ export default {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
let res = await tmpsendVechile(this.value2)
|
let res = await tmpsendVechile('')
|
||||||
this.toast(res.message)
|
this.toast(res.message)
|
||||||
this.value1 = ''
|
|
||||||
this.qty = ''
|
|
||||||
this.value2 = ''
|
|
||||||
this.disabled2 = false
|
this.disabled2 = false
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
this.disabled2 = false
|
this.disabled2 = false
|
||||||
|
|||||||
Reference in New Issue
Block a user