| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528 |
- <!-- 出库 -->
- <template>
- <div class="outWarehouse">
- <!-- <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 outputSceneState"
- :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="出库数量" align="center">
- <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> -->
- <ele-pro-table
- class="table_list"
- ref="table"
- height="calc(100vh - 300px)"
- :columns="columns"
- :datasource="datasource"
- :pageSize="20"
- row-key="id"
- >
- <!-- 展开内容 -->
- <template v-slot:expand="{ row, $index }">
- <div
- style="width: 100%; min-height: 60px"
- v-if="row.materialDetailResponseList"
- >
- <ele-pro-table
- :toolbar="false"
- toolsTheme="none"
- ref="table2"
- :need-page="false"
- :datasource="row.materialDetailResponseList"
- :columns="columns2"
- :key="row.code + '-' + $index"
- >
- </ele-pro-table>
- </div>
- </template>
- <template v-slot:bizNo="{ row }">
- <el-link type="primary" @click="handleCellClick(row)">
- {{ row.bizNo }}
- </el-link>
- </template>
- </ele-pro-table>
- <!-- <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
- width="200px"
- 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="categoryName"></el-table-column>
- <el-table-column
- label="计量数量"
- prop="measureQuantity"
- ></el-table-column>
- <el-table-column label="计量单位" prop="measureUnit"></el-table-column>
- <template v-if="!baseInfo.isUnpack">
- <el-table-column
- label="包装数量"
- prop="packingQuantity"
- ></el-table-column>
- <el-table-column label="包装单位" prop="packingUnit"></el-table-column>
- </template>
- <el-table-column label="重量" prop="weight"></el-table-column>
- <el-table-column label="重量单位" prop="weightUnit"></el-table-column>
- <el-table-column
- label="仓库"
- width="200"
- prop="warehouseName"
- ></el-table-column>
- <el-table-column label="操作人" prop="createUserId">
- <template slot-scope="{ row }">
- {{ handleDeta(row) }}
- </template>
- </el-table-column>
- <el-table-column label="审核人" prop="verifyName"></el-table-column>
- <el-table-column
- width="150"
- label="出库时间"
- prop="createTime"
- ></el-table-column>
- </el-table>
- <Pagination
- class="pagination"
- :total="total"
- :page.sync="pageNum"
- :size.sync="size"
- @pagination="handlePageChange"
- />
- <OutWarehouseDialg
- ref="detailRef"
- :assetCode="baseInfo.assetCode"
- :isUnpack="baseInfo.isUnpack"
- title="物品类型"
- /> -->
- <!-- <OutWarehouseDialg
- ref="detailRef"
- :assetCode="baseInfo.assetCode"
- :isUnpack="baseInfo.isUnpack"
- :title="getDictValue('类型用途', baseInfo.assetType)"
- /> -->
- </div>
- </template>
- <script>
- import Pagination from '@/components/Pagination';
- // import { getInWarehouseDetail } from '@/api/stockManagement/stockLedger'
- import { outputSceneState } from '@/utils/dict/index';
- import OutWarehouseDialg from './OutWarehouseDialg.vue';
- import { inventorybookPage } from '@/api/classifyManage/itemInformation';
- import { useDictLabel } from '@/utils/dict/index';
- import storageApi from '@/api/warehouseManagement/index.js';
- // import dictMixin from '@/mixins/dictMixins'
- import ouint from '@/api/warehouseManagement/outin';
- export default {
- components: { Pagination, OutWarehouseDialg },
- // mixins: [dictMixin],
- props: {
- baseInfo: {
- type: Object,
- default: () => ({})
- },
- baseParams: {
- type: Object,
- default: () => ({})
- }
- },
- data() {
- return {
- outputSceneState,
- outputSceneState: [],
- searchForm: {
- bizNum: '',
- warehouseEnd: '',
- warehouseStart: '',
- packetEnd: '',
- packetStart: ''
- },
- columns: [
- {
- width: 45,
- type: 'expand',
- columnKey: 'materialDetailResponseList',
- align: 'center',
- slot: 'expand',
- className: ''
- },
- {
- slot: 'bizNo',
- prop: 'bizNo',
- label: '出库单号',
- showOverflowTooltip: true,
- align: 'center',
- minWidth: 200
- },
- {
- prop: 'name',
- label: '出库场景',
- showOverflowTooltip: true,
- align: 'center',
- minWidth: 110,
- formatter: (_row) => {
- return this.getSceneState(+_row.bizType);
- }
- },
- {
- prop: 'categoryName',
- label: '物品名称',
- showOverflowTooltip: true,
- align: 'center',
- minWidth: 110
- },
- {
- prop: 'balanceBatchQuantity',
- label: '批次期末',
- showOverflowTooltip: true,
- align: 'center',
- minWidth: 110
- },
- {
- prop: 'balanceQuantity',
- label: '物品期末',
- showOverflowTooltip: true,
- align: 'center',
- minWidth: 110
- },
- {
- align: 'center',
- prop: 'measureQuantity',
- label: '计量数量',
- showOverflowTooltip: true,
- minWidth: 110
- },
- {
- prop: 'packingQuantity',
- label: '包装数量',
- align: 'center',
- showOverflowTooltip: true,
- minWidth: 110
- },
- {
- prop: 'packingUnit',
- label: '包装单位',
- align: 'center',
- showOverflowTooltip: true,
- minWidth: 110
- },
- {
- prop: 'weight',
- label: '重量',
- align: 'center',
- showOverflowTooltip: true,
- minWidth: 110
- },
- {
- prop: 'weightUnit',
- label: '重量单位',
- align: 'center',
- showOverflowTooltip: true,
- minWidth: 110
- },
- {
- prop: 'warehouseName',
- label: '仓库',
- align: 'center',
- showOverflowTooltip: true,
- minWidth: 110
- },
- {
- prop: 'verifyName',
- label: '审核人',
- align: 'center',
- showOverflowTooltip: true,
- minWidth: 110
- },
- {
- prop: 'storageTime',
- label: '出库时间',
- align: 'center',
- showOverflowTooltip: true,
- minWidth: 110
- }
- ],
- // 表格列配置
- columns2: [
- {
- prop: 'materialCode',
- label: '物料编码',
- showOverflowTooltip: true,
- align: 'center',
- minWidth: 110
- },
- {
- prop: 'barcodes',
- label: '发货条码',
- showOverflowTooltip: true,
- align: 'center',
- minWidth: 110
- },
- {
- prop: 'materielDesignation',
- label: '物料代号',
- showOverflowTooltip: true,
- align: 'center',
- minWidth: 110
- },
- {
- prop: 'clientCode',
- label: '客户代号',
- showOverflowTooltip: true,
- align: 'center',
- minWidth: 110
- },
- {
- prop: 'engrave',
- label: '刻码',
- showOverflowTooltip: true,
- align: 'center',
- minWidth: 110
- },
- {
- prop: 'weight',
- label: '重量',
- showOverflowTooltip: true,
- align: 'center',
- minWidth: 100
- },
- {
- prop: 'weightUnit',
- label: '重量单位',
- showOverflowTooltip: true,
- align: 'center',
- minWidth: 100
- },
- {
- prop: 'result',
- label: '质检结果',
- align: 'center',
- showOverflowTooltip: true,
- formatter: (_row) => {
- return this.qualityResults[_row.result];
- }
- },
- {
- prop: 'status',
- label: '质检状态',
- align: 'center',
- showOverflowTooltip: true,
- formatter: (_row) => {
- return this.qualityStatus[_row.result];
- }
- }
- ],
- qualityStatus: {
- 0: '未质检',
- 1: '已质检'
- }, // 质检状态 0未检 1已检
- qualityResults: {
- 1: '合格',
- 2: '不合格'
- }, // 质检结果 1合格 2不合格
- tableData: [],
- size: 10,
- pageNum: 1,
- total: 0,
- vuexUser: []
- };
- },
- created() {
- // this.requestDict('类型用途')
- this.getList();
- },
- methods: {
- async datasource({ page, limit, where, order }) {
- console.log(page);
- console.log(limit);
- this.pageNum = page;
- this.size = limit;
- return await this.getList();
- },
- getSceneState: useDictLabel(outputSceneState),
- handleDeta(row) {
- for (const key in this.vuexUser) {
- if (this.vuexUser[key].id == row.createUserId) {
- return this.vuexUser[key].name;
- }
- }
- },
- handleCellClick(row) {
- this.$router.push({
- path: '/warehouseManagement/outgoingManagement/details',
- query: {
- id: row.outInId
- }
- });
- },
- search() {
- this.pageNum = 1;
- this.getList();
- },
- reset() {
- this.searchForm = {};
- this.search();
- },
- handlePageChange(v) {
- this.pageNum = v.current;
- this.size = v.size;
- this.getList();
- },
- async getList() {
- const res = await storageApi.outInRecordsPage({
- categoryId: this.$route.query.id,
- size: this.size,
- pageNum: this.pageNum,
- bizType: 2,
- ...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;
- return res;
- } else {
- return {};
- }
- }
- }
- };
- </script>
- <style lang="scss" scoped>
- .outWarehouse {
- height: 100%;
- width: 100%;
- padding-top: 20px;
- box-sizing: border-box;
- display: flex;
- flex-direction: column;
- ::v-deep .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>
|