出入库
This commit is contained in:
@@ -19,16 +19,15 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="confirm-button-wrap">
|
||||
<button class="confirm-button" @tap="toSearch">查询</button>
|
||||
<button class="confirm-button" :class="{'confirm-button_disabled': !pkId}" :disabled="disabled" @tap="toSelect">选择订单</button>
|
||||
<button class="confirm-button" :class="{'confirm-button_disabled': !pkId || !index2 || !val1 || !index3}" :disabled="disabled" @tap="toSure">入库确认</button>
|
||||
<button class="confirm-button" @tap="toDelect">清空</button>
|
||||
<button class="confirm-button" @tap="toSelect">选择订单</button>
|
||||
<button class="confirm-button" :class="{'confirm-button_disabled': !index1 || !val1 || dataList.length === 0}" :disabled="disabled" @tap="toSure">入库确认</button>
|
||||
</view>
|
||||
</view>
|
||||
<view class="grid-wrap">
|
||||
<table class="grid-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>选择</th>
|
||||
<th>订单行号</th>
|
||||
<th>规格</th>
|
||||
<th>入库数量</th>
|
||||
@@ -37,15 +36,12 @@
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="e in dataList" :key="e.position_code" @click="toRadio(e)">
|
||||
<td>
|
||||
<view class="iconfont icon-check" :class="{'icon-checked': pkId === e.position_code}"></view>
|
||||
</td>
|
||||
<td>{{e.cacheline_code}}</td>
|
||||
<td>{{e.position_code}}</td>
|
||||
<td>{{e.vehicle_code}}</td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<tr v-for="(e, i) in dataList" :key="i">
|
||||
<td>{{e.order_line_code}}</td>
|
||||
<td>{{e.material_spec}}</td>
|
||||
<td>{{e.in_qty}}</td>
|
||||
<td>{{e.material_code}}</td>
|
||||
<td>{{e.material_name}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -56,7 +52,7 @@
|
||||
<script>
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
import SearchBox from '@/components/SearchBox.vue'
|
||||
import {getCacheLine, inOutExceptionInstQuery, inOutExceptionInstConfirm} from '@/utils/getData2.js'
|
||||
import {getCacheLine, InstoreOrder} from '@/utils/getData2.js'
|
||||
export default {
|
||||
components: {
|
||||
NavBar,
|
||||
@@ -72,21 +68,20 @@
|
||||
disabled: false
|
||||
};
|
||||
},
|
||||
created() {
|
||||
onLoad() {
|
||||
if (this.$store.getters.publicArr) {
|
||||
this.dataList = this.$store.getters.publicArr
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
/** 选择器1 */
|
||||
selectChange1(e) {
|
||||
this.index1 = e
|
||||
},
|
||||
toSearch () {
|
||||
toDelect () {
|
||||
this.dataList = []
|
||||
this.pkId = ''
|
||||
this._inOutExceptionInstQuery()
|
||||
},
|
||||
async _getCacheLine (id) {
|
||||
let res = await getCacheLine(id)
|
||||
this.options2 = [...res]
|
||||
this.$store.dispatch('setPublicArr', '')
|
||||
},
|
||||
async _inOutExceptionInstQuery () {
|
||||
let res = await inOutExceptionInstQuery(this.index2)
|
||||
@@ -94,42 +89,36 @@
|
||||
},
|
||||
async toSure () {
|
||||
this.disabled = true
|
||||
if (!this.pkId) {
|
||||
if (!this.index1) {
|
||||
uni.showToast({
|
||||
title: '请选择',
|
||||
title: '请选择入库点',
|
||||
icon: 'none'
|
||||
})
|
||||
this.disabled = false
|
||||
return
|
||||
}
|
||||
if (!this.index2) {
|
||||
uni.showToast({
|
||||
title: '请选择缓存线',
|
||||
icon: 'none'
|
||||
})
|
||||
this.disabled = false
|
||||
return
|
||||
}
|
||||
if (!this.index3) {
|
||||
uni.showToast({
|
||||
title: '请选择位置类型',
|
||||
icon: 'none'
|
||||
})
|
||||
this.disabled = false
|
||||
return
|
||||
}
|
||||
if (!this.val1) {
|
||||
uni.showToast({
|
||||
title: '请扫满箱码',
|
||||
title: '请输入载具号',
|
||||
icon: 'none'
|
||||
})
|
||||
this.disabled = false
|
||||
return
|
||||
}
|
||||
if (this.dataList.length === 0) {
|
||||
uni.showToast({
|
||||
title: '请选择订单信息',
|
||||
icon: 'none'
|
||||
})
|
||||
this.disabled = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
let res = await inOutExceptionInstConfirm(this.index2, this.val1, this.pkId, this.index3)
|
||||
let res = await InstoreOrder(this.index1, this.val1, this.dataList)
|
||||
this.disabled = false
|
||||
this.toSearch()
|
||||
this.index1 = ''
|
||||
this.val1 = ''
|
||||
this.toDelect()
|
||||
uni.showToast({
|
||||
title: res.message,
|
||||
icon: 'none'
|
||||
@@ -138,15 +127,10 @@
|
||||
this.disabled = false
|
||||
}
|
||||
},
|
||||
toRadio (e) {
|
||||
this.pkId = this.pkId === e.position_code ? '' : e.position_code
|
||||
},
|
||||
toSelect () {
|
||||
if (!this.pkId) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/management/MaterList'
|
||||
})
|
||||
}
|
||||
uni.navigateTo({
|
||||
url: '/pages/management/MaterList'
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user