Files
aio-hl-new/src/pages/modules/finished/finished-instore.vue

170 lines
5.7 KiB
Vue
Raw Normal View History

2023-06-27 17:07:14 +08:00
<template>
<div class="order-wraper">
<div class="search-confirm-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"
2023-06-30 11:27:19 +08:00
:key="item.stor_id"
:label="item.stor_name"
:value="item.stor_id">
2023-06-27 17:07:14 +08:00
</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"
2023-06-30 11:27:19 +08:00
:key="item.value"
:label="item.label"
:value="item.value">
2023-06-27 17:07:14 +08:00
</el-option>
</el-select>
</div>
</div>
<div class="search-item">
<div class="search-label">入库点</div>
<div class="filter_input_wraper">
<el-select v-model="value3" filterable clearable placeholder="请选择">
<el-option
v-for="item in options3"
2023-06-30 11:27:19 +08:00
:key="item.point_code"
:label="item.point_name"
:value="item.point_code">
2023-06-27 17:07:14 +08:00
</el-option>
</el-select>
</div>
</div>
<div class="search-item">
<div class="search-label">备注</div>
<div class="filter_input_wraper">
2023-07-03 10:26:28 +08:00
<input type="text" class="filter-input" v-model="val1">
2023-06-27 17:07:14 +08:00
</div>
</div>
<div class="search-item_2 flexend">
2023-07-03 10:26:28 +08:00
<button class="button button--primary" @click="toInConfirm">确认入库</button>
<button class="button button--primary" @click="toSearch">作业查询</button>
2023-06-30 11:27:19 +08:00
<button class="button button--primary" @click="toAddBillMater">添加单据物料</button>
2023-07-03 10:26:28 +08:00
<button class="button button--primary" @click="toDel">删除一行</button>
2023-06-27 17:07:14 +08:00
</div>
</div>
</div>
<div class="grid_wraper">
<table class="filter-table">
<thead>
<tr>
<th>序号</th>
<th>物料编号</th>
<th>物料名称</th>
<th>入库数量</th>
<th>单位</th>
<th>箱号</th>
<th>订单号</th>
<th>客户</th>
</tr>
</thead>
<tbody>
2023-06-30 11:27:19 +08:00
<tr v-for="(e, i) in dataList" :key="i" :class="{'selected_icon': pkId === e.material_code}" @click="toRadio(e)">
2023-07-03 10:26:28 +08:00
<td>{{i + 1}}</td>
2023-06-30 11:27:19 +08:00
<td>{{e.material_code}}</td>
<td>{{e.material_name}}</td>
<td>{{e.sale_qty}}</td>
<td>{{e.qty_unit_name}}</td>
<td>{{e.bucketunique}}</td>
<td>{{e.sale_code}}</td>
<td>{{e.cust_name}}</td>
2023-06-27 17:07:14 +08:00
</tr>
</tbody>
</table>
</div>
</div>
</template>
<script>
2023-07-03 10:26:28 +08:00
import { getBcpStor, getBillType, getPoint, confirmIn } from '../../../config/getData1.js'
2023-06-27 17:07:14 +08:00
export default {
data () {
return {
options1: [],
value1: '',
options2: [],
value2: '',
options3: [],
2023-06-30 11:27:19 +08:00
value3: '',
dataList: [{material_code: '030301010031'}],
pkId: '',
2023-07-03 10:26:28 +08:00
pkObj: {},
disabled1: false
2023-06-30 11:27:19 +08:00
}
},
beforeRouteLeave (to, from, next) {
if (to.path === '/home' || to.path === '/login') {
this.$store.dispatch('setKeepAlive', [])
}
next()
},
activated () {
},
created () {
this._getBcpStor()
this._getBillType()
this._getPoint()
},
methods: {
// 仓库下拉框
async _getBcpStor () {
let res = await getBcpStor()
this.options1 = [...res.data]
},
// 单据类型下拉框
async _getBillType () {
let res = await getBillType()
this.options2 = [...res.data]
},
// 入库点下拉框
async _getPoint () {
let res = await getPoint()
this.options3 = [...res.data]
},
2023-07-03 10:26:28 +08:00
toInConfirm () {
this._confirmIn()
},
async _confirmIn () {
try {
let res = await confirmIn(this.value1, this.value2, this.value3, this.val1, this.dataList)
this.toast(res.message)
} catch (e) {
}
},
2023-06-30 11:27:19 +08:00
toAddBillMater () {
this.$router.push('/selectfinishedmater')
},
2023-07-03 10:26:28 +08:00
toSearch () {
this.$router.push('/finishedinstoresearch')
},
2023-06-30 11:27:19 +08:00
toRadio (e) {
this.pkId = this.pkId === e.material_code ? '' : e.material_code
this.pkObj = this.pkId === e.material_code ? e : {}
2023-07-03 10:26:28 +08:00
},
toDel () {
console.log('del')
2023-06-27 17:07:14 +08:00
}
}
}
</script>
<style lang="stylus" scoped>
.grid_wraper
height calc(100% - 95px)
.filter_input_wraper_1
width calc(100% - 45px)
.search-label_1
width 45px
</style>