拷贝海亮缓存线平板
This commit is contained in:
154
pages/management/FinishedInStore.vue
Normal file
154
pages/management/FinishedInStore.vue
Normal file
@@ -0,0 +1,154 @@
|
||||
<template>
|
||||
<view class="content">
|
||||
<nav-bar title="成品入库"></nav-bar>
|
||||
<view class="search-confirm-wrap">
|
||||
<view class="search-wrap">
|
||||
<view class="search-item">
|
||||
<label class="search-label">入库点</label>
|
||||
<view class="filter_input_wraper">
|
||||
<uni-data-select v-model="index1" :localdata="options1" @change="selectChange1"></uni-data-select>
|
||||
</view>
|
||||
</view>
|
||||
<view class="search-item">
|
||||
<label class="search-label">载具号</label>
|
||||
<view class="filter_input_wraper">
|
||||
<search-box
|
||||
v-model="val1"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
<view class="search-item flexend">
|
||||
<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>
|
||||
<view class="grid-wrap">
|
||||
<table class="grid-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>订单号</th>
|
||||
<th>订单行号</th>
|
||||
<th>规格</th>
|
||||
<th>入库数量</th>
|
||||
<th>物料编码</th>
|
||||
<th>物料名称</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(e, i) in dataList" :key="i">
|
||||
<td>{{e.sale_code}}</td>
|
||||
<td>{{e.order_line_code}}</td>
|
||||
<td>{{e.material_spec}}</td>
|
||||
<td>{{e.assign_qty}}</td>
|
||||
<td>{{e.material_code}}</td>
|
||||
<td>{{e.material_name}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
import SearchBox from '@/components/SearchBox.vue'
|
||||
import {finishproductPoint, InstoreOrder} from '@/utils/getData2.js'
|
||||
export default {
|
||||
components: {
|
||||
NavBar,
|
||||
SearchBox
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
options1: [],
|
||||
index1: 'A1',
|
||||
val1: '',
|
||||
dataList: [],
|
||||
pkId: '',
|
||||
disabled: false
|
||||
};
|
||||
},
|
||||
onShow() {
|
||||
if (this.$store.getters.publicArr) {
|
||||
this.dataList = this.$store.getters.publicArr
|
||||
}
|
||||
},
|
||||
destroyed () {
|
||||
this.$store.dispatch('setPublicArr', '')
|
||||
},
|
||||
created () {
|
||||
this._finishproductPoint()
|
||||
},
|
||||
methods: {
|
||||
/** 选择器1 */
|
||||
selectChange1(e) {
|
||||
this.index1 = e
|
||||
},
|
||||
toDelect () {
|
||||
this.dataList = []
|
||||
this.pkId = ''
|
||||
this.$store.dispatch('setPublicArr', '')
|
||||
},
|
||||
async _finishproductPoint () {
|
||||
let res = await finishproductPoint('1')
|
||||
this.options1 = [...res]
|
||||
},
|
||||
async toSure () {
|
||||
this.disabled = true
|
||||
if (!this.index1) {
|
||||
uni.showToast({
|
||||
title: '请选择入库点',
|
||||
icon: 'none'
|
||||
})
|
||||
this.disabled = false
|
||||
return
|
||||
}
|
||||
if (!this.val1) {
|
||||
uni.showToast({
|
||||
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 InstoreOrder(this.index1, this.val1, this.dataList)
|
||||
this.disabled = false
|
||||
this.index1 = ''
|
||||
this.val1 = ''
|
||||
this.toDelect()
|
||||
uni.showToast({
|
||||
title: res.message,
|
||||
icon: 'none'
|
||||
})
|
||||
} catch (e) {
|
||||
this.disabled = false
|
||||
}
|
||||
},
|
||||
toSelect () {
|
||||
uni.navigateTo({
|
||||
url: '/pages/management/MaterList'
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="stylus" scoped>
|
||||
@import '../../common/style/mixin.styl';
|
||||
.search-item
|
||||
&:nth-child(1),&:nth-child(2)
|
||||
width 30%
|
||||
&:nth-child(3)
|
||||
width 36%
|
||||
</style>
|
||||
Reference in New Issue
Block a user