2023-08-08 17:59:17 +08:00
|
|
|
<template>
|
|
|
|
|
<div class="order-wraper">
|
|
|
|
|
<div class="search-confirm-wrap">
|
|
|
|
|
<div class="search-wrap">
|
|
|
|
|
<div class="search-item">
|
2023-08-08 18:22:24 +08:00
|
|
|
<div class="search-label">包装机编号</div>
|
2023-08-08 17:59:17 +08:00
|
|
|
<div class="filter_input_wraper">
|
2023-08-09 09:36:19 +08:00
|
|
|
<input type="text" class="filter-input" v-model="val1" disabled>
|
2023-08-08 17:59:17 +08:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="search-item_2 flexend">
|
2023-08-08 18:22:24 +08:00
|
|
|
<button class="button button--primary" :disabled="disabled1" :class="{'button--defalut': !this.pkId}" @click="_confirmIn">确认上料</button>
|
2023-08-08 17:59:17 +08:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="grid_wraper">
|
|
|
|
|
<table class="filter-table">
|
|
|
|
|
<thead>
|
|
|
|
|
<tr>
|
|
|
|
|
<th>序号</th>
|
2023-08-08 18:22:24 +08:00
|
|
|
<th>设备号</th>
|
|
|
|
|
<th>工单号</th>
|
|
|
|
|
<th>生产数量</th>
|
2023-08-08 17:59:17 +08:00
|
|
|
<th>物料规格</th>
|
2023-08-08 18:22:24 +08:00
|
|
|
<th>物料编码</th>
|
2023-08-08 17:59:17 +08:00
|
|
|
</tr>
|
|
|
|
|
</thead>
|
|
|
|
|
<tbody>
|
|
|
|
|
<tr v-for="(e, i) in dataList" :key="i" :class="{'selected_icon': pkId === e.sale_code}" @click="toRadio(e)">
|
|
|
|
|
<td>{{i + 1}}</td>
|
2023-08-08 18:22:24 +08:00
|
|
|
<td>{{e.device_code}}</td>
|
|
|
|
|
<td>{{e.workorder_code}}</td>
|
|
|
|
|
<td>{{e.plan_qty}}</td>
|
2023-08-08 17:59:17 +08:00
|
|
|
<td>{{e.material_spec}}</td>
|
2023-08-08 18:22:24 +08:00
|
|
|
<td>{{e.material_code}}</td>
|
2023-08-08 17:59:17 +08:00
|
|
|
</tr>
|
|
|
|
|
</tbody>
|
|
|
|
|
</table>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
2023-08-08 18:22:24 +08:00
|
|
|
import { confirmIn } from '../../../config/getData1.js'
|
2023-08-08 17:59:17 +08:00
|
|
|
export default {
|
2023-08-08 18:22:24 +08:00
|
|
|
name: 'letterbufferselect',
|
2023-08-08 17:59:17 +08:00
|
|
|
data () {
|
|
|
|
|
return {
|
2023-08-08 18:22:24 +08:00
|
|
|
val1: '',
|
2023-08-08 17:59:17 +08:00
|
|
|
dataList: [],
|
|
|
|
|
// dataList: [{material_code: '24007845L', material_spec: '23xcds', material_name: '垫片活接直通\DPHJS22\EHJA0703009B', sale_qty: '1000', sale_code: '0022060927', remark: '222'}],
|
|
|
|
|
pkId: '',
|
|
|
|
|
pkObj: {},
|
2023-08-08 18:22:24 +08:00
|
|
|
disabled1: false
|
2023-08-08 17:59:17 +08:00
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
beforeRouteLeave (to, from, next) {
|
|
|
|
|
if (to.path === '/home' || to.path === '/login') {
|
|
|
|
|
this.$store.dispatch('setKeepAlive', [])
|
|
|
|
|
}
|
|
|
|
|
next()
|
|
|
|
|
},
|
|
|
|
|
created () {
|
2023-08-08 18:22:24 +08:00
|
|
|
this._outgetAll()
|
2023-08-08 17:59:17 +08:00
|
|
|
},
|
|
|
|
|
methods: {
|
2023-08-08 18:22:24 +08:00
|
|
|
async _confirmIn () {
|
|
|
|
|
this.disabled1 = true
|
|
|
|
|
if (!this.pkId) {
|
|
|
|
|
this.disabled1 = false
|
2023-08-08 17:59:17 +08:00
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
try {
|
2023-08-08 18:22:24 +08:00
|
|
|
let res = await confirmIn(this.pkObj)
|
2023-08-08 17:59:17 +08:00
|
|
|
this.toast(res.message)
|
2023-08-08 18:22:24 +08:00
|
|
|
this.disabled1 = false
|
|
|
|
|
this.pkId = ''
|
|
|
|
|
this.pkObj = {}
|
|
|
|
|
this._outgetAll()
|
2023-08-08 17:59:17 +08:00
|
|
|
} catch (e) {
|
2023-08-08 18:22:24 +08:00
|
|
|
this.disabled1 = false
|
2023-08-08 17:59:17 +08:00
|
|
|
}
|
|
|
|
|
},
|
2023-08-08 18:22:24 +08:00
|
|
|
toSelect () {
|
2023-08-08 17:59:17 +08:00
|
|
|
this.$router.push('/finishedinstoresearch')
|
|
|
|
|
},
|
|
|
|
|
toRadio (e) {
|
|
|
|
|
this.pkId = this.pkId === e.sale_code ? '' : e.sale_code
|
|
|
|
|
this.pkObj = this.pkId === e.sale_code ? e : {}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style lang="stylus" scoped>
|
|
|
|
|
.grid_wraper
|
|
|
|
|
height calc(100% - 1.1rem)
|
|
|
|
|
.filter_input_wraper_1
|
|
|
|
|
width calc(100% - 45px)
|
|
|
|
|
.search-label_1
|
|
|
|
|
width 45px
|
|
|
|
|
.filter-table th, .filter-table td
|
|
|
|
|
line-height 22px
|
|
|
|
|
.input
|
|
|
|
|
width auto
|
|
|
|
|
text-indent 0
|
|
|
|
|
text-align center
|
|
|
|
|
</style>
|