刻字暂存位选择
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
<div class="search-wrap">
|
||||
<div class="search-item_2 flexend">
|
||||
<button class="button button--primary" @click="toSelect">刻字暂存位选择</button>
|
||||
<button class="button button--primary" :disabled="disabled1" :class="{'button--defalut': !this.pkId}" @click="_confirmIn">空框送回</button>
|
||||
<button class="button button--primary" :disabled="disabled1" :class="{'button--defalut': !this.pkId}" @click="_sendVechile">空框送回</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -21,7 +21,7 @@
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(e, i) in dataList" :key="i" :class="{'selected_icon': pkId === e.sale_code}" @click="toRadio(e)">
|
||||
<tr v-for="(e, i) in dataList" :key="i" :class="{'selected_icon': pkId === e.device_code}" @click="toRadio(e)">
|
||||
<td>{{i + 1}}</td>
|
||||
<td>{{e.device_code}}</td>
|
||||
<td>{{e.workorder_code}}</td>
|
||||
@@ -36,51 +36,47 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { confirmIn } from '../../../config/getData1.js'
|
||||
import { packageList, sendVechile } from '../../../config/getData1.js'
|
||||
export default {
|
||||
name: 'bzjselect',
|
||||
data () {
|
||||
return {
|
||||
dataList: [],
|
||||
// dataList: [{material_code: '24007845L', material_spec: '23xcds', material_name: '垫片活接直通\DPHJS22\EHJA0703009B', sale_qty: '1000', sale_code: '0022060927', remark: '222'}],
|
||||
// dataList: [{device_code: '24007845L', workorder_code: '23xcds', material_spec: '垫片活接直通\DPHJS22\EHJA0703009B', plan_qty: '1000', material_code: '0022060927'}],
|
||||
pkId: '',
|
||||
pkObj: {},
|
||||
disabled1: false
|
||||
}
|
||||
},
|
||||
beforeRouteLeave (to, from, next) {
|
||||
if (to.path === '/home' || to.path === '/login') {
|
||||
this.$store.dispatch('setKeepAlive', [])
|
||||
}
|
||||
next()
|
||||
},
|
||||
created () {
|
||||
this._outgetAll()
|
||||
this._packageList()
|
||||
},
|
||||
methods: {
|
||||
async _confirmIn () {
|
||||
async _sendVechile () {
|
||||
this.disabled1 = true
|
||||
if (!this.pkId) {
|
||||
this.disabled1 = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
let res = await confirmIn(this.pkObj)
|
||||
let res = await sendVechile(this.pkId)
|
||||
this.toast(res.message)
|
||||
this.disabled1 = false
|
||||
this.pkId = ''
|
||||
this.pkObj = {}
|
||||
this._outgetAll()
|
||||
this.$store.dispatch('setMaterObj', '')
|
||||
this._packageList()
|
||||
} catch (e) {
|
||||
this.disabled1 = false
|
||||
}
|
||||
},
|
||||
toSelect () {
|
||||
this.$store.dispatch('setMaterObj', JSON.stringify(this.pkObj))
|
||||
this.$router.push('/letterbufferselect')
|
||||
},
|
||||
toRadio (e) {
|
||||
this.pkId = this.pkId === e.sale_code ? '' : e.sale_code
|
||||
this.pkObj = this.pkId === e.sale_code ? e : {}
|
||||
this.pkId = this.pkId === e.device_code ? '' : e.device_code
|
||||
this.pkObj = this.pkId === e.device_code ? e : {}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="search-item_2 flexend">
|
||||
<button class="button button--primary" :disabled="disabled1" :class="{'button--defalut': !this.pkId}" @click="_confirmIn">确认上料</button>
|
||||
<button class="button button--primary" :disabled="disabled1" :class="{'button--defalut': !this.pkId}" @click="_confirmUp">确认上料</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -18,21 +18,19 @@
|
||||
<thead>
|
||||
<tr>
|
||||
<th>序号</th>
|
||||
<th>设备号</th>
|
||||
<th>工单号</th>
|
||||
<th>生产数量</th>
|
||||
<th>点位编号</th>
|
||||
<th>物料规格</th>
|
||||
<th>物料编码</th>
|
||||
<th>物料编号</th>
|
||||
<th>数量(个)</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(e, i) in dataList" :key="i" :class="{'selected_icon': pkId === e.sale_code}" @click="toRadio(e)">
|
||||
<tr v-for="(e, i) in dataList" :key="i" :class="{'selected_icon': pkId === e.point_code}" @click="toRadio(e)">
|
||||
<td>{{i + 1}}</td>
|
||||
<td>{{e.device_code}}</td>
|
||||
<td>{{e.workorder_code}}</td>
|
||||
<td>{{e.plan_qty}}</td>
|
||||
<td>{{e.point_code}}</td>
|
||||
<td>{{e.material_spec}}</td>
|
||||
<td>{{e.material_code}}</td>
|
||||
<td>{{e.qty}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -41,52 +39,44 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { confirmIn } from '../../../config/getData1.js'
|
||||
import { cachepoint, confirmUp } from '../../../config/getData1.js'
|
||||
export default {
|
||||
name: 'letterbufferselect',
|
||||
data () {
|
||||
return {
|
||||
val1: '',
|
||||
dataList: [],
|
||||
// dataList: [{material_code: '24007845L', material_spec: '23xcds', material_name: '垫片活接直通\DPHJS22\EHJA0703009B', sale_qty: '1000', sale_code: '0022060927', remark: '222'}],
|
||||
// dataList: [{point_code: '1111', material_code: '24007845L', material_spec: '23xcds', qty: '1000'}],
|
||||
pkId: '',
|
||||
pkObj: {},
|
||||
disabled1: false
|
||||
}
|
||||
},
|
||||
beforeRouteLeave (to, from, next) {
|
||||
if (to.path === '/home' || to.path === '/login') {
|
||||
this.$store.dispatch('setKeepAlive', [])
|
||||
}
|
||||
next()
|
||||
},
|
||||
created () {
|
||||
this._outgetAll()
|
||||
this.val1 = this.$store.getters.setMaterObj.device_code
|
||||
this._cachepoint()
|
||||
},
|
||||
methods: {
|
||||
async _confirmIn () {
|
||||
async _confirmUp () {
|
||||
this.disabled1 = true
|
||||
if (!this.pkId) {
|
||||
this.disabled1 = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
let res = await confirmIn(this.pkObj)
|
||||
let res = await confirmUp(this.val1, this.pkId)
|
||||
this.toast(res.message)
|
||||
this.disabled1 = false
|
||||
this.pkId = ''
|
||||
this.pkObj = {}
|
||||
this._outgetAll()
|
||||
this._cachepoint()
|
||||
} catch (e) {
|
||||
this.disabled1 = false
|
||||
}
|
||||
},
|
||||
toSelect () {
|
||||
this.$router.push('/finishedinstoresearch')
|
||||
},
|
||||
toRadio (e) {
|
||||
this.pkId = this.pkId === e.sale_code ? '' : e.sale_code
|
||||
this.pkObj = this.pkId === e.sale_code ? e : {}
|
||||
this.pkId = this.pkId === e.point_code ? '' : e.point_code
|
||||
this.pkObj = this.pkId === e.point_code ? e : {}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -105,4 +95,6 @@ export default {
|
||||
width auto
|
||||
text-indent 0
|
||||
text-align center
|
||||
.search-label
|
||||
width .9rem
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user