|
@@ -1,333 +1,134 @@
|
|
|
<template>
|
|
<template>
|
|
|
- <div class="container-fluid">
|
|
|
|
|
- <Navbar
|
|
|
|
|
- title="我的项目-库存查询"
|
|
|
|
|
- :is-go-back="false"
|
|
|
|
|
- />
|
|
|
|
|
-
|
|
|
|
|
- <div
|
|
|
|
|
- class="flex-container"
|
|
|
|
|
- style="margin-top: 10px;"
|
|
|
|
|
- >
|
|
|
|
|
- <div class="flex-header">
|
|
|
|
|
- <div>
|
|
|
|
|
- <div
|
|
|
|
|
- class="form-inline"
|
|
|
|
|
- role="form"
|
|
|
|
|
- >
|
|
|
|
|
- <div class="form-group">
|
|
|
|
|
- SKU:
|
|
|
|
|
- <input
|
|
|
|
|
- v-model="queryNo"
|
|
|
|
|
- autocomplete="off"
|
|
|
|
|
- type="text"
|
|
|
|
|
- class="form-control"
|
|
|
|
|
- placeholder="请输入要查询物料的SKU"
|
|
|
|
|
- aria-describedby="basic-addon"
|
|
|
|
|
- style="width:250px;"
|
|
|
|
|
- @keyup.enter="queryInventory"
|
|
|
|
|
- />
|
|
|
|
|
- 物料名称:
|
|
|
|
|
- <input
|
|
|
|
|
- v-model="queryName"
|
|
|
|
|
- autocomplete="off"
|
|
|
|
|
- type="text"
|
|
|
|
|
- class="form-control"
|
|
|
|
|
- placeholder="请输入要查询物料的名称"
|
|
|
|
|
- aria-describedby="basic-addon"
|
|
|
|
|
- style="width:250px;"
|
|
|
|
|
- @keyup.enter="queryInventory"
|
|
|
|
|
- />
|
|
|
|
|
- 规格型号:
|
|
|
|
|
- <input
|
|
|
|
|
- v-model="queryType"
|
|
|
|
|
- autocomplete="off"
|
|
|
|
|
- type="text"
|
|
|
|
|
- class="form-control"
|
|
|
|
|
- placeholder="请输入要查询物料的规格型号"
|
|
|
|
|
- aria-describedby="basic-addon"
|
|
|
|
|
- style="width:250px;"
|
|
|
|
|
- @keyup.enter="queryInventory"
|
|
|
|
|
- />
|
|
|
|
|
- 物料类型:
|
|
|
|
|
- <select
|
|
|
|
|
- v-model="selectType"
|
|
|
|
|
- class="form-control"
|
|
|
|
|
- @change="changeSelectType"
|
|
|
|
|
- >
|
|
|
|
|
- <option value="0">全部</option>
|
|
|
|
|
- <option value="001">成套工具箱</option>
|
|
|
|
|
- <option value="002">散件</option>
|
|
|
|
|
- </select>
|
|
|
|
|
- </div>
|
|
|
|
|
- <div class="form-group">
|
|
|
|
|
- <button
|
|
|
|
|
- class="btn btn-default"
|
|
|
|
|
- @click="queryInventory"
|
|
|
|
|
- >
|
|
|
|
|
- 查询
|
|
|
|
|
- </button>
|
|
|
|
|
- </div>
|
|
|
|
|
- <div class="form-group">
|
|
|
|
|
- <button
|
|
|
|
|
- class="btn btn-success"
|
|
|
|
|
- @click="exportExcel"
|
|
|
|
|
- >
|
|
|
|
|
- 导出
|
|
|
|
|
- </button>
|
|
|
|
|
- </div>
|
|
|
|
|
- </div>
|
|
|
|
|
- </div>
|
|
|
|
|
- </div>
|
|
|
|
|
- <div
|
|
|
|
|
- class="flex-content"
|
|
|
|
|
- style="margin-top: 10px;"
|
|
|
|
|
- >
|
|
|
|
|
- <table class="fixed-table table-striped table-bordered">
|
|
|
|
|
- <thead>
|
|
|
|
|
- <tr>
|
|
|
|
|
- <th style="width: 50px;">
|
|
|
|
|
- 序号
|
|
|
|
|
- </th>
|
|
|
|
|
- <th style="width: 70px;">
|
|
|
|
|
- 图片
|
|
|
|
|
- </th>
|
|
|
|
|
- <th style="width: 150px;">
|
|
|
|
|
- 物料名称
|
|
|
|
|
- </th>
|
|
|
|
|
- <th style="width: 100px;">
|
|
|
|
|
- SKU
|
|
|
|
|
- </th>
|
|
|
|
|
- <th style="width: 150px;">
|
|
|
|
|
- 规格型号
|
|
|
|
|
- </th>
|
|
|
|
|
- <th style="width: 80px;">
|
|
|
|
|
- 入库总数量
|
|
|
|
|
- </th>
|
|
|
|
|
- <th style="width: 80px;">
|
|
|
|
|
- 库存数量
|
|
|
|
|
- </th>
|
|
|
|
|
- <th style="width: 80px;">
|
|
|
|
|
- 出库总数量
|
|
|
|
|
- </th>
|
|
|
|
|
- <th style="width: 80px;">
|
|
|
|
|
- RFID管理
|
|
|
|
|
- </th>
|
|
|
|
|
- <th style="width: 80px;">
|
|
|
|
|
- 物料类型
|
|
|
|
|
- </th>
|
|
|
|
|
- <th style="width: 100px;">
|
|
|
|
|
- 操作
|
|
|
|
|
- </th>
|
|
|
|
|
- </tr>
|
|
|
|
|
- </thead>
|
|
|
|
|
- <tbody class="table1">
|
|
|
|
|
- <tr v-for="(inventoryInstance, index) in inventoryInstanceDatas" :key="inventoryInstance.id">
|
|
|
|
|
- <td>
|
|
|
|
|
- {{ index + 1 + (pagination.current_page-1) * pagination.per_page }}
|
|
|
|
|
- </td>
|
|
|
|
|
- <td>
|
|
|
|
|
- <img
|
|
|
|
|
- :src="Common.getThumbnailImageSrc(className, inventoryInstance.imageName)"
|
|
|
|
|
- class="image"
|
|
|
|
|
- @click="$refs.imagePreview.preview(className, inventoryInstance.imageName)"
|
|
|
|
|
- />
|
|
|
|
|
- </td>
|
|
|
|
|
- <td>
|
|
|
|
|
- {{ inventoryInstance.inventoryName }}
|
|
|
|
|
- </td>
|
|
|
|
|
- <td>
|
|
|
|
|
- {{ inventoryInstance.inventoryNo }}
|
|
|
|
|
- </td>
|
|
|
|
|
- <td>
|
|
|
|
|
- {{ inventoryInstance.inventoryType }}
|
|
|
|
|
- </td>
|
|
|
|
|
- <td>
|
|
|
|
|
- {{ inventoryInstance.totalQuantity }}
|
|
|
|
|
- </td>
|
|
|
|
|
- <td>
|
|
|
|
|
- {{ inventoryInstance.stockQuantity }}
|
|
|
|
|
- </td>
|
|
|
|
|
- <td>
|
|
|
|
|
- {{ inventoryInstance.stockOutQuantity }}
|
|
|
|
|
- </td>
|
|
|
|
|
- <td>
|
|
|
|
|
- {{ inventoryInstance.rfidManagement == true ? '是':'否' }}
|
|
|
|
|
- </td>
|
|
|
|
|
- <td>
|
|
|
|
|
- {{ inventoryInstance.tagNo == '001' ? '成套工具箱':'散件' }}
|
|
|
|
|
- </td>
|
|
|
|
|
- <td>
|
|
|
|
|
- <button
|
|
|
|
|
- type="button"
|
|
|
|
|
- class="btn btn-link"
|
|
|
|
|
- style="width: 100%"
|
|
|
|
|
- @click="findByInventoryId(inventoryInstance)"
|
|
|
|
|
- >
|
|
|
|
|
- 查看详情
|
|
|
|
|
- </button>
|
|
|
|
|
- </td>
|
|
|
|
|
- </tr>
|
|
|
|
|
- </tbody>
|
|
|
|
|
- </table>
|
|
|
|
|
- </div>
|
|
|
|
|
- <div class="flex-footer">
|
|
|
|
|
- <div>
|
|
|
|
|
- <div class="form-group">
|
|
|
|
|
- <div class="pull-left">
|
|
|
|
|
- 共查询到<b>{{ pagination.total }}</b>条数据
|
|
|
|
|
- </div>
|
|
|
|
|
- <div class="pull-right">
|
|
|
|
|
- <VueBootstrapPagination
|
|
|
|
|
- v-if="pagination.last_page > 0"
|
|
|
|
|
- :pagination="pagination"
|
|
|
|
|
- :callback="queryInventory"
|
|
|
|
|
- />
|
|
|
|
|
- </div>
|
|
|
|
|
- </div>
|
|
|
|
|
- </div>
|
|
|
|
|
- </div>
|
|
|
|
|
- </div>
|
|
|
|
|
|
|
+ <div class="current-stock-container">
|
|
|
|
|
+ <!-- 导航栏 -->
|
|
|
|
|
+ <a-page-header title="我的项目-库存查询" />
|
|
|
|
|
|
|
|
- <Modal
|
|
|
|
|
- v-model:show="modal"
|
|
|
|
|
- small="true"
|
|
|
|
|
- :show-canel-button="true"
|
|
|
|
|
- :show-ok-button="false"
|
|
|
|
|
|
|
+ <!-- 查询表单 -->
|
|
|
|
|
+ <a-form
|
|
|
|
|
+ :inline="true"
|
|
|
|
|
+ :layout="formLayout"
|
|
|
|
|
+ class="search-form"
|
|
|
>
|
|
>
|
|
|
- <template #header>
|
|
|
|
|
- <p>{{ displayData.inventoryNo }}-{{ displayData.inventoryName }}>>库存详情</p>
|
|
|
|
|
- </template>
|
|
|
|
|
- <table class="fixed-table table-striped table-bordered">
|
|
|
|
|
- <thead>
|
|
|
|
|
- <tr>
|
|
|
|
|
- <th style="width: 100px;">
|
|
|
|
|
- 序号
|
|
|
|
|
- </th>
|
|
|
|
|
- <th style="width: 150px;">
|
|
|
|
|
- 物料编码
|
|
|
|
|
- </th>
|
|
|
|
|
- <th style="width: 150px;">
|
|
|
|
|
- 物料名称
|
|
|
|
|
- </th>
|
|
|
|
|
- <th style="width: 150px;">
|
|
|
|
|
- 状态
|
|
|
|
|
- </th>
|
|
|
|
|
- <th style="width: 100px;">
|
|
|
|
|
- 货位
|
|
|
|
|
- </th>
|
|
|
|
|
- <th style="width: 100px;">
|
|
|
|
|
- 项目事件
|
|
|
|
|
- </th>
|
|
|
|
|
- <th style="width: 100px;">
|
|
|
|
|
- 齐套情况
|
|
|
|
|
- </th>
|
|
|
|
|
- </tr>
|
|
|
|
|
- </thead>
|
|
|
|
|
- <tbody class="table1">
|
|
|
|
|
- <tr v-for="(data, index) in inventoryInstanceCurrentStocks" :key="data.id">
|
|
|
|
|
- <td>
|
|
|
|
|
- {{ index+1 }}
|
|
|
|
|
- </td>
|
|
|
|
|
- <td>
|
|
|
|
|
- {{ data.no }}
|
|
|
|
|
- </td>
|
|
|
|
|
- <td>
|
|
|
|
|
- {{ data.name }}
|
|
|
|
|
- </td>
|
|
|
|
|
- <td>
|
|
|
|
|
- {{ (data.positionId == undefined || data.positionId == null)? '已出库':'在库' }}
|
|
|
|
|
- </td>
|
|
|
|
|
- <td>
|
|
|
|
|
- {{ data.positionBarCode }}
|
|
|
|
|
- </td>
|
|
|
|
|
- <td>
|
|
|
|
|
- {{ data.projectItem }}
|
|
|
|
|
- </td>
|
|
|
|
|
- <td>
|
|
|
|
|
- {{ data.finished == false ? '未补齐':'已补齐' }}
|
|
|
|
|
- </td>
|
|
|
|
|
- </tr>
|
|
|
|
|
- </tbody>
|
|
|
|
|
- </table>
|
|
|
|
|
- <div class="modal-footer">
|
|
|
|
|
- <slot name="footer" />
|
|
|
|
|
- </div>
|
|
|
|
|
- </Modal>
|
|
|
|
|
|
|
+ <a-form-item label="SKU">
|
|
|
|
|
+ <a-input
|
|
|
|
|
+ v-model="queryNo"
|
|
|
|
|
+ placeholder="请输入要查询物料的SKU"
|
|
|
|
|
+ @keyup.enter="queryInventory"
|
|
|
|
|
+ />
|
|
|
|
|
+ </a-form-item>
|
|
|
|
|
+ <a-form-item label="物料名称">
|
|
|
|
|
+ <a-input
|
|
|
|
|
+ v-model="queryName"
|
|
|
|
|
+ placeholder="请输入要查询物料的名称"
|
|
|
|
|
+ @keyup.enter="queryInventory"
|
|
|
|
|
+ />
|
|
|
|
|
+ </a-form-item>
|
|
|
|
|
+ <a-form-item label="规格型号">
|
|
|
|
|
+ <a-input
|
|
|
|
|
+ v-model="queryType"
|
|
|
|
|
+ placeholder="请输入要查询物料的规格型号"
|
|
|
|
|
+ @keyup.enter="queryInventory"
|
|
|
|
|
+ />
|
|
|
|
|
+ </a-form-item>
|
|
|
|
|
+ <a-form-item label="物料类型">
|
|
|
|
|
+ <a-select
|
|
|
|
|
+ v-model="selectType"
|
|
|
|
|
+ @change="changeSelectType"
|
|
|
|
|
+ >
|
|
|
|
|
+ <a-select-option value="0">全部</a-select-option>
|
|
|
|
|
+ <a-select-option value="001">成套工具箱</a-select-option>
|
|
|
|
|
+ <a-select-option value="002">散件</a-select-option>
|
|
|
|
|
+ </a-select>
|
|
|
|
|
+ </a-form-item>
|
|
|
|
|
+ <a-form-item>
|
|
|
|
|
+ <a-button
|
|
|
|
|
+ type="primary"
|
|
|
|
|
+ @click="queryInventory"
|
|
|
|
|
+ >
|
|
|
|
|
+ 查询
|
|
|
|
|
+ </a-button>
|
|
|
|
|
+ <a-button
|
|
|
|
|
+ @click="exportExcel"
|
|
|
|
|
+ >
|
|
|
|
|
+ 导出
|
|
|
|
|
+ </a-button>
|
|
|
|
|
+ </a-form-item>
|
|
|
|
|
+ </a-form>
|
|
|
|
|
|
|
|
- <Modal
|
|
|
|
|
- v-model:show="modal2"
|
|
|
|
|
- small="true"
|
|
|
|
|
- :show-canel-button="true"
|
|
|
|
|
- :show-ok-button="false"
|
|
|
|
|
|
|
+ <!-- 表格 -->
|
|
|
|
|
+ <a-table
|
|
|
|
|
+ :columns="columns"
|
|
|
|
|
+ :data-source="inventoryInstanceDatas"
|
|
|
|
|
+ :pagination="pagination"
|
|
|
|
|
+ :loading="loading"
|
|
|
|
|
+ row-key="id"
|
|
|
|
|
+ @change="handleTableChange"
|
|
|
>
|
|
>
|
|
|
- <template #header>
|
|
|
|
|
- <p>{{ displayData.inventoryNo }}-{{ displayData.inventoryName }}>>库存详情</p>
|
|
|
|
|
|
|
+ <template #bodyCell="{ column, record, index }">
|
|
|
|
|
+ <template v-if="column.key === 'index'">
|
|
|
|
|
+ {{ (pagination.current - 1) * pagination.pageSize + index + 1 }}
|
|
|
|
|
+ </template>
|
|
|
|
|
+ <template v-if="column.key === 'image'">
|
|
|
|
|
+ <img
|
|
|
|
|
+ :src="Common.getThumbnailImageSrc(className, record.imageName)"
|
|
|
|
|
+ class="image"
|
|
|
|
|
+ @click="$refs.imagePreview.preview(className, record.imageName)"
|
|
|
|
|
+ />
|
|
|
|
|
+ </template>
|
|
|
|
|
+ <template v-if="column.key === 'rfidManagement'">
|
|
|
|
|
+ {{ record.rfidManagement ? '是' : '否' }}
|
|
|
|
|
+ </template>
|
|
|
|
|
+ <template v-if="column.key === 'tagNo'">
|
|
|
|
|
+ {{ record.tagNo === '001' ? '成套工具箱' : '散件' }}
|
|
|
|
|
+ </template>
|
|
|
|
|
+ <template v-if="column.key === 'operation'">
|
|
|
|
|
+ <a-button
|
|
|
|
|
+ type="link"
|
|
|
|
|
+ @click="findByInventoryId(record)"
|
|
|
|
|
+ >
|
|
|
|
|
+ 查看详情
|
|
|
|
|
+ </a-button>
|
|
|
|
|
+ </template>
|
|
|
</template>
|
|
</template>
|
|
|
- <table class="fixed-table table-striped table-bordered">
|
|
|
|
|
- <thead>
|
|
|
|
|
- <tr>
|
|
|
|
|
- <th style="width: 100px;">
|
|
|
|
|
- 序号
|
|
|
|
|
- </th>
|
|
|
|
|
- <th style="width: 150px;">
|
|
|
|
|
- 所在成套工具箱
|
|
|
|
|
- </th>
|
|
|
|
|
- <th style="width: 150px;">
|
|
|
|
|
- 数量
|
|
|
|
|
- </th>
|
|
|
|
|
- <th style="width: 150px;">
|
|
|
|
|
- 货位
|
|
|
|
|
- </th>
|
|
|
|
|
- <th style="width: 150px;">
|
|
|
|
|
- 项目事件
|
|
|
|
|
- </th>
|
|
|
|
|
- </tr>
|
|
|
|
|
- </thead>
|
|
|
|
|
- <tbody class="table1">
|
|
|
|
|
- <tr v-for="(data, index) in inventoryInstanceCurrentStocks2" :key="data.id">
|
|
|
|
|
- <td>
|
|
|
|
|
- {{ index+1 }}
|
|
|
|
|
- </td>
|
|
|
|
|
- <td>
|
|
|
|
|
- {{ data.no }}
|
|
|
|
|
- </td>
|
|
|
|
|
- <td>
|
|
|
|
|
- {{ data.quantity }}
|
|
|
|
|
- </td>
|
|
|
|
|
- <td>
|
|
|
|
|
- {{ data.positionBarCode }}
|
|
|
|
|
- </td>
|
|
|
|
|
- <td>
|
|
|
|
|
- {{ data.projectItem }}
|
|
|
|
|
- </td>
|
|
|
|
|
- </tr>
|
|
|
|
|
- </tbody>
|
|
|
|
|
- </table>
|
|
|
|
|
- <div class="modal-footer">
|
|
|
|
|
- <slot name="footer" />
|
|
|
|
|
- </div>
|
|
|
|
|
- </Modal>
|
|
|
|
|
|
|
+ </a-table>
|
|
|
|
|
|
|
|
- <Modal
|
|
|
|
|
- v-model:show="modal3"
|
|
|
|
|
- :full="true"
|
|
|
|
|
- :show-canel-button="true"
|
|
|
|
|
- :show-ok-button="false"
|
|
|
|
|
- >
|
|
|
|
|
- <template #header>
|
|
|
|
|
- <p>{{ displayData.inventoryNo }}-{{ displayData.inventoryName }}>>出入库流水</p>
|
|
|
|
|
- </template>
|
|
|
|
|
|
|
+ <!-- 分页信息 -->
|
|
|
|
|
+ <div class="pagination-info">
|
|
|
|
|
+ 共查询到 <b>{{ pagination.total }}</b> 条数据
|
|
|
|
|
+ </div>
|
|
|
|
|
|
|
|
- <div class="modal-body">
|
|
|
|
|
- <InAndOutFlow :display-data="displayData" />
|
|
|
|
|
- </div>
|
|
|
|
|
|
|
+ <!-- 详情模态框 -->
|
|
|
|
|
+ <a-modal
|
|
|
|
|
+ v-model:visible="modal"
|
|
|
|
|
+ title="库存详情"
|
|
|
|
|
+ width="80%"
|
|
|
|
|
+ >
|
|
|
|
|
+ <a-table
|
|
|
|
|
+ :columns="modalColumns"
|
|
|
|
|
+ :data-source="inventoryInstanceCurrentStocks"
|
|
|
|
|
+ pagination="false"
|
|
|
|
|
+ />
|
|
|
|
|
+ </a-modal>
|
|
|
|
|
+ <a-modal
|
|
|
|
|
+ v-model:visible="modal2"
|
|
|
|
|
+ title="库存详情"
|
|
|
|
|
+ width="80%"
|
|
|
|
|
+ >
|
|
|
|
|
+ <a-table
|
|
|
|
|
+ :columns="modalColumns2"
|
|
|
|
|
+ :data-source="inventoryInstanceCurrentStocks2"
|
|
|
|
|
+ pagination="false"
|
|
|
|
|
+ />
|
|
|
|
|
+ </a-modal>
|
|
|
|
|
+ <a-modal
|
|
|
|
|
+ v-model:visible="modal3"
|
|
|
|
|
+ title="出入库流水"
|
|
|
|
|
+ width="80%"
|
|
|
|
|
+ >
|
|
|
|
|
+ <InAndOutFlow :display-data="displayData" />
|
|
|
|
|
+ </a-modal>
|
|
|
|
|
|
|
|
- <div class="modal-footer">
|
|
|
|
|
- <slot name="footer" />
|
|
|
|
|
- </div>
|
|
|
|
|
- </Modal>
|
|
|
|
|
-
|
|
|
|
|
|
|
+ <!-- 加载状态 -->
|
|
|
<Loading v-if="loading" />
|
|
<Loading v-if="loading" />
|
|
|
<ImagePreview ref="imagePreview" />
|
|
<ImagePreview ref="imagePreview" />
|
|
|
</div>
|
|
</div>
|
|
@@ -335,30 +136,21 @@
|
|
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
import Common from '../common/Common.js';
|
|
import Common from '../common/Common.js';
|
|
|
-
|
|
|
|
|
import InventoryInstanceResource from '../api/common/InventoryInstanceResource.js';
|
|
import InventoryInstanceResource from '../api/common/InventoryInstanceResource.js';
|
|
|
import InventoryInstanceBindResource from '../api/wms/InventoryInstanceBindResource.js';
|
|
import InventoryInstanceBindResource from '../api/wms/InventoryInstanceBindResource.js';
|
|
|
import CurrentStockResource from '../api/wms/CurrentStockResource.js';
|
|
import CurrentStockResource from '../api/wms/CurrentStockResource.js';
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
import InAndOutFlow from './InAndOutFlow.vue';
|
|
import InAndOutFlow from './InAndOutFlow.vue';
|
|
|
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
export default {
|
|
export default {
|
|
|
components: {
|
|
components: {
|
|
|
-
|
|
|
|
|
InAndOutFlow,
|
|
InAndOutFlow,
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
},
|
|
},
|
|
|
- data: function () {
|
|
|
|
|
- this.Common = Common;
|
|
|
|
|
|
|
+ data() {
|
|
|
return {
|
|
return {
|
|
|
|
|
+ formLayout: {
|
|
|
|
|
+ labelCol: { span: 8 },
|
|
|
|
|
+ wrapperCol: { span: 16 },
|
|
|
|
|
+ },
|
|
|
displayData: {},
|
|
displayData: {},
|
|
|
queryNo: '',
|
|
queryNo: '',
|
|
|
queryName: '',
|
|
queryName: '',
|
|
@@ -366,241 +158,195 @@ export default {
|
|
|
inventoryInstanceDatas: [],
|
|
inventoryInstanceDatas: [],
|
|
|
inventoryInstanceCurrentStocks: [],
|
|
inventoryInstanceCurrentStocks: [],
|
|
|
inventoryInstanceCurrentStocks2: [],
|
|
inventoryInstanceCurrentStocks2: [],
|
|
|
- inventoryInstanceCurrentStocks3: [],
|
|
|
|
|
- recordIds: [],
|
|
|
|
|
pagination: {
|
|
pagination: {
|
|
|
total: 0,
|
|
total: 0,
|
|
|
- per_page: Common.pageSize, // required
|
|
|
|
|
- current_page: 1, // required
|
|
|
|
|
- last_page: 0, // required
|
|
|
|
|
|
|
+ pageSize: Common.pageSize,
|
|
|
|
|
+ current: 1,
|
|
|
},
|
|
},
|
|
|
isUpdatePage: true,
|
|
isUpdatePage: true,
|
|
|
className: 'com.leanwo.prodog.model.common.Inventory',
|
|
className: 'com.leanwo.prodog.model.common.Inventory',
|
|
|
- allRepeatPack: [], //重复打印全部的id
|
|
|
|
|
- printType: 0,//类型 0:采购入库打印/1:扫描入库打印
|
|
|
|
|
selectType: '0',
|
|
selectType: '0',
|
|
|
loading: false,
|
|
loading: false,
|
|
|
modal: false,
|
|
modal: false,
|
|
|
modal2: false,
|
|
modal2: false,
|
|
|
modal3: false,
|
|
modal3: false,
|
|
|
|
|
+ columns: [
|
|
|
|
|
+ { title: '序号', key: 'index', width: 50 },
|
|
|
|
|
+ { title: '图片', key: 'image', width: 70 },
|
|
|
|
|
+ { title: '物料名称', dataIndex: 'inventoryName', key: 'inventoryName', width: 150 },
|
|
|
|
|
+ { title: 'SKU', dataIndex: 'inventoryNo', key: 'inventoryNo', width: 100 },
|
|
|
|
|
+ { title: '规格型号', dataIndex: 'inventoryType', key: 'inventoryType', width: 150 },
|
|
|
|
|
+ { title: '入库总数量', dataIndex: 'totalQuantity', key: 'totalQuantity', width: 80 },
|
|
|
|
|
+ { title: '库存数量', dataIndex: 'stockQuantity', key: 'stockQuantity', width: 80 },
|
|
|
|
|
+ { title: '出库总数量', dataIndex: 'stockOutQuantity', key: 'stockOutQuantity', width: 80 },
|
|
|
|
|
+ { title: 'RFID管理', key: 'rfidManagement', width: 80 },
|
|
|
|
|
+ { title: '物料类型', key: 'tagNo', width: 80 },
|
|
|
|
|
+ { title: '操作', key: 'operation', width: 100 },
|
|
|
|
|
+ ],
|
|
|
|
|
+ modalColumns: [
|
|
|
|
|
+ { title: '序号', key: 'index', width: 100 },
|
|
|
|
|
+ { title: '物料编码', dataIndex: 'no', key: 'no', width: 150 },
|
|
|
|
|
+ { title: '物料名称', dataIndex: 'name', key: 'name', width: 150 },
|
|
|
|
|
+ { title: '状态', key: 'status', width: 150 },
|
|
|
|
|
+ { title: '货位', dataIndex: 'positionBarCode', key: 'positionBarCode', width: 100 },
|
|
|
|
|
+ { title: '项目事件', dataIndex: 'projectItem', key: 'projectItem', width: 100 },
|
|
|
|
|
+ { title: '齐套情况', key: 'finished', width: 100 },
|
|
|
|
|
+ ],
|
|
|
|
|
+ modalColumns2: [
|
|
|
|
|
+ { title: '序号', key: 'index', width: 100 },
|
|
|
|
|
+ { title: '所在成套工具箱', dataIndex: 'no', key: 'no', width: 150 },
|
|
|
|
|
+ { title: '数量', dataIndex: 'quantity', key: 'quantity', width: 150 },
|
|
|
|
|
+ { title: '货位', dataIndex: 'positionBarCode', key: 'positionBarCode', width: 150 },
|
|
|
|
|
+ { title: '项目事件', dataIndex: 'projectItem', key: 'projectItem', width: 150 },
|
|
|
|
|
+ ],
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
-
|
|
|
|
|
- mounted: function () {
|
|
|
|
|
- var _self = this;
|
|
|
|
|
- _self.queryInventory();
|
|
|
|
|
- $('.fixed-table').tableFixer({
|
|
|
|
|
- 'left': 3,
|
|
|
|
|
- 'head': true,
|
|
|
|
|
- });
|
|
|
|
|
-
|
|
|
|
|
- $('.fixed-table').colResizable({
|
|
|
|
|
- resizeMode: 'overflow',
|
|
|
|
|
- partialRefresh: true,
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ mounted() {
|
|
|
|
|
+ this.queryInventory();
|
|
|
},
|
|
},
|
|
|
-
|
|
|
|
|
methods: {
|
|
methods: {
|
|
|
- /**
|
|
|
|
|
- * 导出excel
|
|
|
|
|
- */
|
|
|
|
|
- exportExcel: function () {
|
|
|
|
|
- var _self = this;
|
|
|
|
|
- var loginInfo = localStorage.getItem('#LoginInfo');
|
|
|
|
|
- var loginData = JSON.parse(loginInfo);
|
|
|
|
|
- var whereClause = ' totalInventory.clientId=' + loginData.loginClientId;
|
|
|
|
|
- if (_self.queryNo != null && _self.queryNo.length > 0) {
|
|
|
|
|
- whereClause = whereClause + ' AND totalInventory.no like ' + '\'%' + _self.queryNo + '%\'';
|
|
|
|
|
- if (_self.queryName != null && _self.queryName.length > 0) {
|
|
|
|
|
- whereClause = whereClause + ' OR totalInventory.name like ' + '\'%' + _self.queryName + '%\'';
|
|
|
|
|
|
|
+ // 导出Excel
|
|
|
|
|
+ exportExcel() {
|
|
|
|
|
+ const loginInfo = localStorage.getItem('#LoginInfo');
|
|
|
|
|
+ const loginData = JSON.parse(loginInfo);
|
|
|
|
|
+ let whereClause = `totalInventory.clientId=${loginData.loginClientId}`;
|
|
|
|
|
+ if (this.queryNo) {
|
|
|
|
|
+ whereClause += ` AND totalInventory.no like '%${this.queryNo}%'`;
|
|
|
|
|
+ if (this.queryName) {
|
|
|
|
|
+ whereClause += ` OR totalInventory.name like '%${this.queryName}%'`;
|
|
|
}
|
|
}
|
|
|
- if (_self.queryType != null && _self.queryType.length > 0) {
|
|
|
|
|
- whereClause = whereClause + ' OR totalInventory.type like ' + '\'%' + _self.queryType + '%\'';
|
|
|
|
|
|
|
+ if (this.queryType) {
|
|
|
|
|
+ whereClause += ` OR totalInventory.type like '%${this.queryType}%'`;
|
|
|
}
|
|
}
|
|
|
- } else if (_self.queryName != null && _self.queryName.length > 0) {
|
|
|
|
|
- whereClause = whereClause + ' AND totalInventory.name like ' + '\'%' + _self.queryName + '%\'';
|
|
|
|
|
- if (_self.queryType != null && _self.queryType.length > 0) {
|
|
|
|
|
- whereClause = whereClause + ' OR totalInventory.type like ' + '\'%' + _self.queryType + '%\'';
|
|
|
|
|
|
|
+ } else if (this.queryName) {
|
|
|
|
|
+ whereClause += ` AND totalInventory.name like '%${this.queryName}%'`;
|
|
|
|
|
+ if (this.queryType) {
|
|
|
|
|
+ whereClause += ` OR totalInventory.type like '%${this.queryType}%'`;
|
|
|
}
|
|
}
|
|
|
- } else if (_self.queryType != null && _self.queryType.length > 0) {
|
|
|
|
|
- whereClause = whereClause + ' AND totalInventory.type like ' + '\'%' + _self.queryType + '%\'';
|
|
|
|
|
|
|
+ } else if (this.queryType) {
|
|
|
|
|
+ whereClause += ` AND totalInventory.type like '%${this.queryType}%'`;
|
|
|
}
|
|
}
|
|
|
whereClause = encodeURIComponent(whereClause);
|
|
whereClause = encodeURIComponent(whereClause);
|
|
|
- var url = '/ureport/preview?_u=dicfile-wms:stock.ureport.xml&whereClause=' + whereClause;
|
|
|
|
|
|
|
+ const url = `/ureport/preview?_u=dicfile-wms:stock.ureport.xml&whereClause=${whereClause}`;
|
|
|
window.open(url);
|
|
window.open(url);
|
|
|
},
|
|
},
|
|
|
- /**
|
|
|
|
|
- * 根据存货档案id进行查询
|
|
|
|
|
- */
|
|
|
|
|
- findByInventoryId: function (data) {
|
|
|
|
|
- var _self = this;
|
|
|
|
|
- if (data.totalQuantity == undefined || data.totalQuantity == null) {
|
|
|
|
|
|
|
+ // 根据库存ID查询详情
|
|
|
|
|
+ findByInventoryId(data) {
|
|
|
|
|
+ if (!data.totalQuantity) {
|
|
|
Notify.error('提示', '物料暂无入库记录', false);
|
|
Notify.error('提示', '物料暂无入库记录', false);
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
- var inventoryId = data.inventoryId;
|
|
|
|
|
- var tagNo = data.tagNo;
|
|
|
|
|
- var rfidManagement = data.rfidManagement;
|
|
|
|
|
- _self.displayData = data;
|
|
|
|
|
- if (rfidManagement == true) {
|
|
|
|
|
- if (tagNo == undefined || tagNo == null || tagNo == '002') {
|
|
|
|
|
- InventoryInstanceResource.findCurrentStockProjectItemMangerByInventoryId(inventoryId).then(successData => {
|
|
|
|
|
- if(successData.errorCode == 0) {
|
|
|
|
|
- if (successData.datas && successData.datas.length > 0) {
|
|
|
|
|
- _self.inventoryInstanceCurrentStocks2 = successData.datas;
|
|
|
|
|
- _self.modal2 = true;
|
|
|
|
|
|
|
+ const inventoryId = data.inventoryId;
|
|
|
|
|
+ const tagNo = data.tagNo;
|
|
|
|
|
+ const rfidManagement = data.rfidManagement;
|
|
|
|
|
+ this.displayData = data;
|
|
|
|
|
+ if (rfidManagement) {
|
|
|
|
|
+ if (!tagNo || tagNo === '002') {
|
|
|
|
|
+ $.ajax({
|
|
|
|
|
+ url: InventoryInstanceResource.findCurrentStockProjectItemMangerByInventoryIdUrl,
|
|
|
|
|
+ type: 'GET',
|
|
|
|
|
+ data: { inventoryId },
|
|
|
|
|
+ success: response => {
|
|
|
|
|
+ if (response.errorCode === 0 && response.datas?.length > 0) {
|
|
|
|
|
+ this.inventoryInstanceCurrentStocks2 = response.datas;
|
|
|
|
|
+ this.modal2 = true;
|
|
|
}
|
|
}
|
|
|
- } else {
|
|
|
|
|
- Notify.error('错误', successData.errorMessage, false);
|
|
|
|
|
- return;
|
|
|
|
|
- }
|
|
|
|
|
- }, errorData => {
|
|
|
|
|
- Common.processException(errorData);
|
|
|
|
|
|
|
+ },
|
|
|
|
|
+ error: error => {
|
|
|
|
|
+ Common.processException(error);
|
|
|
|
|
+ },
|
|
|
});
|
|
});
|
|
|
} else {
|
|
} else {
|
|
|
- InventoryInstanceBindResource.findProjectItemMangerByInventoryId(inventoryId).then(successData => {
|
|
|
|
|
- if(successData.errorCode == 0) {
|
|
|
|
|
- if (successData.datas) {
|
|
|
|
|
- _self.inventoryInstanceCurrentStocks = successData.datas;
|
|
|
|
|
- _self.modal = true;
|
|
|
|
|
|
|
+ $.ajax({
|
|
|
|
|
+ url: InventoryInstanceBindResource.findProjectItemMangerByInventoryIdUrl,
|
|
|
|
|
+ type: 'GET',
|
|
|
|
|
+ data: { inventoryId },
|
|
|
|
|
+ success: response => {
|
|
|
|
|
+ if (response.errorCode === 0 && response.datas) {
|
|
|
|
|
+ this.inventoryInstanceCurrentStocks = response.datas;
|
|
|
|
|
+ this.modal = true;
|
|
|
}
|
|
}
|
|
|
- }
|
|
|
|
|
- }, errorData => {
|
|
|
|
|
- Common.processException(errorData);
|
|
|
|
|
|
|
+ },
|
|
|
|
|
+ error: error => {
|
|
|
|
|
+ Common.processException(error);
|
|
|
|
|
+ },
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
} else {
|
|
} else {
|
|
|
- _self.modal3 = true;
|
|
|
|
|
|
|
+ this.modal3 = true;
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
- changeSelectType: function () {
|
|
|
|
|
- var _self = this;
|
|
|
|
|
- _self.pagination.current_page = 1;
|
|
|
|
|
- _self.queryInventory();
|
|
|
|
|
|
|
+ // 物料类型选择变化处理
|
|
|
|
|
+ changeSelectType() {
|
|
|
|
|
+ this.pagination.current = 1;
|
|
|
|
|
+ this.queryInventory();
|
|
|
},
|
|
},
|
|
|
- /**
|
|
|
|
|
- * 根据物料名称或者编号查询数据
|
|
|
|
|
- */
|
|
|
|
|
- queryInventory: function () {
|
|
|
|
|
- var _self = this;
|
|
|
|
|
- if (_self.inventoryInstanceDatas == undefined) {
|
|
|
|
|
- _self.inventoryInstanceDatas = [];
|
|
|
|
|
|
|
+ // 查询库存
|
|
|
|
|
+ queryInventory() {
|
|
|
|
|
+ if (!this.inventoryInstanceDatas) {
|
|
|
|
|
+ this.inventoryInstanceDatas = [];
|
|
|
}
|
|
}
|
|
|
- var queryNo = $.trim(_self.queryNo);
|
|
|
|
|
- var queryName = $.trim(_self.queryName);
|
|
|
|
|
- var queryType = $.trim(_self.queryType);
|
|
|
|
|
- if ((queryNo.length > 0 || queryName.length > 0 || queryType.length > 0) && !_self.isUpdatePage) {
|
|
|
|
|
- _self.pagination.current_page = 1;
|
|
|
|
|
- _self.isUpdatePage = true;
|
|
|
|
|
- } else if (queryNo.length == 0 && queryName.length == 0 && queryType.length == 0) {
|
|
|
|
|
- _self.isUpdatePage = false;
|
|
|
|
|
|
|
+ const queryNo = $.trim(this.queryNo);
|
|
|
|
|
+ const queryName = $.trim(this.queryName);
|
|
|
|
|
+ const queryType = $.trim(this.queryType);
|
|
|
|
|
+ if ((queryNo || queryName || queryType) && !this.isUpdatePage) {
|
|
|
|
|
+ this.pagination.current = 1;
|
|
|
|
|
+ this.isUpdatePage = true;
|
|
|
|
|
+ } else if (!queryNo && !queryName && !queryType) {
|
|
|
|
|
+ this.isUpdatePage = false;
|
|
|
}
|
|
}
|
|
|
- _self.inventoryInstanceDatas.splice(0, _self.inventoryInstanceDatas.length);
|
|
|
|
|
- var inventoryQueryCondition = {
|
|
|
|
|
- 'no': queryNo,
|
|
|
|
|
- 'name': queryName,
|
|
|
|
|
- 'type': queryType,
|
|
|
|
|
- 'start': (_self.pagination.current_page - 1) * _self.pagination.per_page,
|
|
|
|
|
- 'length': _self.pagination.per_page,
|
|
|
|
|
|
|
+ this.inventoryInstanceDatas = [];
|
|
|
|
|
+ const inventoryQueryCondition = {
|
|
|
|
|
+ no: queryNo,
|
|
|
|
|
+ name: queryName,
|
|
|
|
|
+ type: queryType,
|
|
|
|
|
+ start: (this.pagination.current - 1) * this.pagination.pageSize,
|
|
|
|
|
+ length: this.pagination.pageSize,
|
|
|
};
|
|
};
|
|
|
- _self.loading=true;
|
|
|
|
|
- CurrentStockResource.findSiemensCurrentStockProjectItemManger(inventoryQueryCondition, _self.selectType).then(successData => {
|
|
|
|
|
- _self.loading=false;
|
|
|
|
|
- if(successData.errorCode == 0) {
|
|
|
|
|
- if (successData.datas) {
|
|
|
|
|
- _self.inventoryInstanceDatas = successData.datas;
|
|
|
|
|
- _self.pagination.total = successData.total;
|
|
|
|
|
- _self.pagination.last_page = Math.ceil(_self.pagination.total / _self.pagination.per_page);
|
|
|
|
|
|
|
+ this.loading = true;
|
|
|
|
|
+ $.ajax({
|
|
|
|
|
+ url: CurrentStockResource.findSiemensCurrentStockProjectItemMangerUrl,
|
|
|
|
|
+ type: 'GET',
|
|
|
|
|
+ data: { ...inventoryQueryCondition, selectType: this.selectType },
|
|
|
|
|
+ success: response => {
|
|
|
|
|
+ this.loading = false;
|
|
|
|
|
+ if (response.errorCode === 0 && response.datas) {
|
|
|
|
|
+ this.inventoryInstanceDatas = response.datas;
|
|
|
|
|
+ this.pagination.total = response.total;
|
|
|
|
|
+ this.pagination.current = Math.ceil(this.pagination.total / this.pagination.pageSize);
|
|
|
}
|
|
}
|
|
|
- _self.fixedTableHeader();
|
|
|
|
|
- }
|
|
|
|
|
- }, errorData => {
|
|
|
|
|
- _self.loading=false;
|
|
|
|
|
- Common.processException(errorData);
|
|
|
|
|
|
|
+ },
|
|
|
|
|
+ error: error => {
|
|
|
|
|
+ this.loading = false;
|
|
|
|
|
+ Common.processException(error);
|
|
|
|
|
+ },
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
-
|
|
|
|
|
- /**
|
|
|
|
|
- * 冻结表头
|
|
|
|
|
- */
|
|
|
|
|
- fixedTableHeader: function () {
|
|
|
|
|
- let _self = this;
|
|
|
|
|
-
|
|
|
|
|
- _self.$nextTick(function () {
|
|
|
|
|
- $('.fixed-table').tableFixer({
|
|
|
|
|
- 'left': 3,
|
|
|
|
|
- 'head': true,
|
|
|
|
|
- });
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ // 表格分页、排序等变化处理
|
|
|
|
|
+ handleTableChange(pagination) {
|
|
|
|
|
+ this.pagination.current = pagination.current;
|
|
|
|
|
+ this.pagination.pageSize = pagination.pageSize;
|
|
|
|
|
+ this.queryInventory();
|
|
|
},
|
|
},
|
|
|
},
|
|
},
|
|
|
};
|
|
};
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|
|
|
<style scoped>
|
|
<style scoped>
|
|
|
-.flex-container {
|
|
|
|
|
- display: flex;
|
|
|
|
|
- /* 垂直*/
|
|
|
|
|
- flex-direction: column;
|
|
|
|
|
- width: 100%;
|
|
|
|
|
- /*视口被均分为100单位的vh 占据整个窗口,扣掉顶部topNav的距离后,计算得到container的高度*/
|
|
|
|
|
- height: calc(100vh - 140px);
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
-.flex-header {
|
|
|
|
|
- /*放大缩小比例为0 */
|
|
|
|
|
- flex: 0 0 35px;
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
-.flex-footer {
|
|
|
|
|
- height: 45px;
|
|
|
|
|
- /*放大缩小比例为0 */
|
|
|
|
|
- flex: 0 0 45px;
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
-.flex-content {
|
|
|
|
|
- flex: 1;
|
|
|
|
|
- overflow: scroll;
|
|
|
|
|
- width: 100%;
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
-.fixed-table {
|
|
|
|
|
- table-layout: fixed;
|
|
|
|
|
- word-wrap: break-word;
|
|
|
|
|
- word-break: break-all;
|
|
|
|
|
-}
|
|
|
|
|
-</style>
|
|
|
|
|
-
|
|
|
|
|
-<style scoped>
|
|
|
|
|
-.fixed-table {
|
|
|
|
|
- table-layout: fixed;
|
|
|
|
|
- width: 800px !important;
|
|
|
|
|
- min-width: 800px !important;
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
-table.fixed-table tr {
|
|
|
|
|
- height: 40px;
|
|
|
|
|
|
|
+.current-stock-container {
|
|
|
|
|
+ padding: 24px;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-table.fixed-table th,
|
|
|
|
|
-table.fixed-table td {
|
|
|
|
|
- overflow: hidden;
|
|
|
|
|
- white-space: nowrap;
|
|
|
|
|
- text-overflow: ellipsis;
|
|
|
|
|
|
|
+.search-form {
|
|
|
|
|
+ margin-bottom: 24px;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
.image {
|
|
.image {
|
|
|
- width: 40px;
|
|
|
|
|
- height: 40px;
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
-.modal-img-box {
|
|
|
|
|
- width: 100%;
|
|
|
|
|
- text-align: center;
|
|
|
|
|
- overflow: auto;
|
|
|
|
|
|
|
+ width: 40px;
|
|
|
|
|
+ height: 40px;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-.m-img {
|
|
|
|
|
- width: 100%;
|
|
|
|
|
|
|
+.pagination-info {
|
|
|
|
|
+ margin-top: 16px;
|
|
|
}
|
|
}
|
|
|
-</style>
|
|
|
|
|
|
|
+</style>
|