| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264 |
- <!-- 入库 -->
- <template>
- <div class="inWarehouse">
- <!-- <el-form label-width="100px">
- <el-row>
- <el-col :span="6">
- <el-form-item label="入库场景"
- ><el-select
- filterable
- placeholder="请选择"
- v-model="searchForm.bizScene"
- clearable
- >
- <el-option
- v-for="item in sceneState"
- :key="item.code"
- :value="item.code + ''"
- :label="item.label"
- ></el-option>
- </el-select>
- </el-form-item>
- </el-col>
- <el-col :span="6">
- <el-form-item label="入库单号" prop="bizNum">
- <el-input
- v-model="searchForm.bizNum"
- placeholder="请输入"
- size="small"
- ></el-input>
- </el-form-item>
- </el-col>
- <el-col :span="6">
- <el-form-item label="入库数量">
- <el-col :span="11">
- <el-input
- v-model="searchForm.warehouseStart"
- @blur="
- () => {
- if (!/^\d+(\.\d+)?$/.test(searchForm.warehouseStart)) {
- searchForm.warehouseStart = '';
- }
- }
- "
- placeholder="请输入"
- size="small"
- ></el-input
- ></el-col>
- <el-col :span="2" style="text-align: center">~</el-col>
- <el-col :span="11">
- <el-input
- v-model="searchForm.warehouseEnd"
- @blur="
- () => {
- if (!/^\d+(\.\d+)?$/.test(searchForm.warehouseEnd)) {
- searchForm.warehouseEnd = '';
- }
- }
- "
- placeholder="请输入"
- size="small"
- ></el-input
- ></el-col>
- </el-form-item>
- </el-col>
- <el-col :span="6">
- <el-form-item label="包装数量">
- <el-col :span="11">
- <el-input
- v-model="searchForm.packetStart"
- @blur="
- () => {
- if (!/^\d+(\.\d+)?$/.test(searchForm.packetStart)) {
- searchForm.packetStart = '';
- }
- }
- "
- placeholder="请输入"
- size="small"
- ></el-input
- ></el-col>
- <el-col :span="2" style="text-align: center">~</el-col>
- <el-col :span="11">
- <el-input
- v-model="searchForm.packetEnd"
- @blur="
- () => {
- if (!/^\d+(\.\d+)?$/.test(searchForm.packetEnd)) {
- searchForm.packetEnd = '';
- }
- }
- "
- placeholder="请输入"
- size="small"
- ></el-input
- ></el-col>
- </el-form-item>
- </el-col>
- <el-col :span="24" style="text-align: right; margin-bottom: 20px">
- <el-button
- @click="search"
- type="primary"
- icon="el-icon-search"
- size="small"
- >搜索</el-button
- >
- <el-button @click="reset" icon="el-icon-refresh-left" size="small"
- >重置</el-button
- >
- </el-col>
- </el-row>
- </el-form> -->
- <el-table
- class="table"
- :data="tableData"
- @cell-click="handleCellClick"
- :header-cell-style="{ background: '#EEEEEE', border: 'none' }"
- >
- <el-table-column width="80px" label="序号" type="index" />
- <el-table-column label="入库单号" prop="bizNo"></el-table-column>
- <el-table-column label="入库场景" prop="bizType">
- <template slot-scope="{ row }">{{
- getSceneState(+row.bizType)
- }}</template>
- </el-table-column>
- <el-table-column
- label="入库数量"
- prop="availableCountBase"
- ></el-table-column>
- <el-table-column label="计量单位" prop="measuringUnit"></el-table-column>
- <el-table-column label="包装数量" prop="packageNo"></el-table-column>
- <el-table-column label="包装单位" prop="packingUnit"></el-table-column>
- <el-table-column label="操作人" prop="createUserId">
- <template slot-scope="{ row }">
- {{ handleDeta(row.createUserId) }}
- </template>
- </el-table-column>
- <el-table-column label="审核人" prop="verifyName"></el-table-column>
- <el-table-column label="入库时间" prop="createTime"></el-table-column>
- </el-table>
- <Pagination
- class="pagination"
- :total="total"
- :page.sync="page"
- :size.sync="size"
- @pagination="handlePageChange"
- />
- <InWarehouseDialog
- ref="detailRef"
- :assetCode="baseInfo.assetCode"
- :baseInfo="baseInfo"
- />
- </div>
- </template>
- <script>
- import Pagination from '@/components/Pagination';
- // import { getInWarehouseDetail } from '@/api/stockManagement/stockLedger'
- import { sceneState } from '@/utils/dict/index';
- import InWarehouseDialog from './InWarehouseDialog';
- import { inventorybookPage } from '@/api/classifyManage/itemInformation';
- import { useDictLabel } from '@/utils/dict/index';
- import ouint from '@/api/warehouseManagement/outin';
- export default {
- components: { Pagination, InWarehouseDialog },
- props: {
- baseInfo: {
- type: Object,
- default: () => ({})
- },
- baseParams: {
- type: Object,
- default: () => ({})
- }
- },
- data() {
- return {
- sceneState,
- sceneState: [],
- searchForm: {
- bizNum: '',
- warehouseEnd: '',
- warehouseStart: '',
- packetEnd: '',
- packetStart: ''
- },
- tableData: [],
- size: 10,
- page: 1,
- total: 0,
- vuexUser: []
- };
- },
- created() {
- this.getList();
- },
- methods: {
- getSceneState: useDictLabel(sceneState),
- search() {
- this.page = 1;
- this.getList();
- },
- reset() {
- this.searchForm = {};
- this.search();
- },
- handleCellClick(row) {
- this.$refs.detailRef.open(row);
- },
- handlePageChange(v) {
- this.page = v.current;
- this.size = v.size;
- this.getList();
- },
- handleDeta(row) {
- for (const key in this.vuexUser) {
- if (this.vuexUser[key].id == row) {
- return this.vuexUser[key].name;
- }
- }
- },
- async getList() {
- const res = await ouint.getInventoryDetails({
- categoryId: this.$route.query.id,
- size: this.size,
- page: this.page,
- type: 1,
- ...this.baseParams
- // ...this.searchForm,
- // batchNum: this.baseParams.batchNum || this.searchForm.batchNum
- });
- if (res) {
- const list = this.$store.state.userPage.userList;
- this.vuexUser = list;
- this.tableData = res.list;
- this.total = res.count;
- }
- }
- }
- };
- </script>
- <style lang="scss" scoped>
- .inWarehouse {
- height: 100%;
- width: 100%;
- padding-top: 20px;
- box-sizing: border-box;
- display: flex;
- flex-direction: column;
- .table {
- flex: 1;
- display: flex;
- flex-direction: column;
- .el-table__body-wrapper {
- flex: 1;
- }
- }
- .pagination {
- flex: 0 0 50px;
- display: flex;
- align-items: center;
- }
- }
- </style>
|