dev:出库查询库存

This commit is contained in:
2023-05-31 19:14:50 +08:00
parent a3098348ef
commit 31e9e2c3c0

View File

@@ -0,0 +1,153 @@
<!--suppress ALL -->
<template>
<el-dialog
title="库存选择"
append-to-body
:visible.sync="dialogVisible"
destroy-on-close
width="1200px"
@close="close"
@open="open"
>
<div class="head-container">
<div v-if="crud.props.searchToggle">
<!-- 搜索 -->
<el-form
:inline="true"
class="demo-form-inline"
label-position="right"
label-width="80px"
label-suffix=":"
>
<el-form-item label="库区/货位">
<el-input
v-model="query.bill_code"
clearable
size="mini"
placeholder="库区/货位"
style="width: 200px;"
class="filter-item"
@keyup.enter.native="crud.toQuery"
/>
</el-form-item>
<el-form-item label="物料">
<el-input
v-model="query.material_search"
clearable
size="mini"
placeholder="物料"
style="width: 230px;"
class="filter-item"
@keyup.enter.native="crud.toQuery"
/>
</el-form-item>
<rrOperation />
</el-form>
</div>
<!--如果想在工具栏加入更多按钮可以使用插槽方式 slot = 'left' or 'right'-->
<crudOperation />
<!--表格渲染-->
<el-table
ref="multipleTable"
v-loading="crud.loading"
:data="crud.data"
style="width: 100%;"
@selection-change="crud.selectionChangeHandler"
>
<el-table-column type="selection" width="55" />
<el-table-column show-overflow-tooltip width="100" prop="sect_code" label="库区" />
<el-table-column show-overflow-tooltip width="150" prop="struct_name" label="货位" />
<el-table-column show-overflow-tooltip prop="material_code" width="100" label="物料编号" />
<el-table-column show-overflow-tooltip width="300" prop="material_name" label="物料名称" />
<el-table-column show-overflow-tooltip width="150" prop="canuse_qty" label="数量(个)" />
<el-table-column show-overflow-tooltip width="100" prop="unit_weight" label="单重" />
<el-table-column show-overflow-tooltip prop="storagevehicle_code" label="载具号" />
</el-table>
<!--分页组件-->
<pagination />
</div>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false"> </el-button>
<el-button type="primary" @click="submit"> </el-button>
</span>
</el-dialog>
</template>
<script>
import CRUD, { crud, header, presenter } from '@crud/crud'
import rrOperation from '@crud/RR.operation'
import crudOperation from '@crud/CRUD.operation'
import pagination from '@crud/Pagination'
import DateRangePicker from '@/components/DateRangePicker/index'
import crudProductIn from '@/views/wms/storage_manage/rawproduct/rawProductIn/rawproductin'
const start = new Date()
export default {
name: 'AddDtl',
components: { crudOperation, rrOperation, pagination, DateRangePicker },
cruds() {
return CRUD({
title: '半成品可用库存',
url: '/api/bcp/getBcpIvt',
crudMethod: {},
optShow: {
reset: true
}
})
},
mixins: [presenter(), header(), crud()],
props: {
dialogShow: {
type: Boolean,
default: false
}
},
data() {
return {
dialogVisible: false,
rows: [],
tableData: []
}
},
watch: {
dialogShow: {
handler(newValue, oldValue) {
this.dialogVisible = newValue
}
}
},
methods: {
objectSpanMethod({ row, column, rowIndex, columnIndex }) {
if (columnIndex === 0) {
if (rowIndex % 2 === 0) {
return {
rowspan: 2,
colspan: 1
}
} else {
return {
rowspan: 0,
colspan: 0
}
}
}
},
open() {
this.crud.toQuery()
},
close() {
this.$emit('update:dialogShow', false)
},
submit() {
this.$emit('update:dialogShow', false)
this.rows = this.$refs.multipleTable.selection
this.$emit('tableChanged', this.rows)
// this.form = this.$options.data().form
}
}
}
</script>