|
|
@@ -1,1265 +1,340 @@
|
|
|
<template>
|
|
|
- <a-layout>
|
|
|
- <a-layout-header class="header">
|
|
|
- <a-form layout="inline" class="form-container">
|
|
|
- <a-form-item label="采购订单号">
|
|
|
- <a-select
|
|
|
- v-model:value="documentNo"
|
|
|
- placeholder="输入采购订单号"
|
|
|
- show-search
|
|
|
- option-filter-prop="children"
|
|
|
- />
|
|
|
- </a-form-item>
|
|
|
-
|
|
|
- <a-form-item label="存货名称">
|
|
|
- <a-input v-model:value="inventoryName" placeholder="输入存货档案名称" />
|
|
|
- </a-form-item>
|
|
|
+ <a-layout class="container">
|
|
|
+ <h1 class="page-header" style="margin-top: 10px; margin-bottom: 0px;">
|
|
|
+ <AuthImage
|
|
|
+ :auth-src="Common.getThumbnailImageSrc(inventoryClassName, showInventory.imageName)" class="image img-thumbnail"
|
|
|
+ style="width: 78px; height: 78px;" @click="$refs.imagePreview.preview(inventoryClassName, showInventory.imageName)"
|
|
|
+ />
|
|
|
|
|
|
- <a-form-item label="规格型号">
|
|
|
- <a-input v-model:value="inventoryType" placeholder="输入规格型号" />
|
|
|
- </a-form-item>
|
|
|
+ 物料详细信息
|
|
|
+ </h1>
|
|
|
+ <a-card :bordered="false" class="form-card">
|
|
|
+ <a-row :gutter="16" class="asset-detail">
|
|
|
+ <a-col :span="6">
|
|
|
+ <strong>存货编号:{{ showInventory.no }}</strong>
|
|
|
+ </a-col>
|
|
|
+ <a-col :span="6">
|
|
|
+ <strong>存货名称:{{ showInventory.name }}</strong>
|
|
|
+ </a-col>
|
|
|
+ <a-col :span="6">
|
|
|
+ <strong>所属公司:{{ showInventory.client }}</strong>
|
|
|
+ </a-col>
|
|
|
+ <a-col :span="6">
|
|
|
+ <strong>规格型号:{{ showInventory.type }}</strong>
|
|
|
+ </a-col>
|
|
|
+ </a-row>
|
|
|
|
|
|
- <a-form-item label="打印范围">
|
|
|
- <a-select
|
|
|
- v-model:value="selectedNum"
|
|
|
- @change="refreshPurchaseOrderLineTable"
|
|
|
- >
|
|
|
- <a-select-option value="0">全部</a-select-option>
|
|
|
- <a-select-option value="1">未打印</a-select-option>
|
|
|
- <a-select-option value="2">已打印</a-select-option>
|
|
|
- </a-select>
|
|
|
- </a-form-item>
|
|
|
+ <a-tabs v-model:activeKey="activeContent" class="data-tabs">
|
|
|
+ <a-tab-pane key="1" tab="出入库流水">
|
|
|
+ <InAndOutFlow ref="inAndOutFlow" :display-data="dataId" />
|
|
|
+ <a-list item-layout="horizontal" :data-source="historyEvents2">
|
|
|
+ <template #renderItem="{ item }">
|
|
|
+ <a-list-item>
|
|
|
+ <template #actions>
|
|
|
+ <a-image
|
|
|
+ :src="getHistoryIconSrc(item.title)"
|
|
|
+ width="45px"
|
|
|
+ @click="showImage(item.image)"
|
|
|
+ />
|
|
|
+ </template>
|
|
|
+ <a-list-item-meta
|
|
|
+ :title="item.title"
|
|
|
+ :description="item.content"
|
|
|
+ >
|
|
|
+ <template #description>
|
|
|
+ <p class="event-time">时间: {{ item.eventDate }}</p>
|
|
|
+ {{ item.content }}
|
|
|
+ </template>
|
|
|
+ </a-list-item-meta>
|
|
|
+ </a-list-item>
|
|
|
+ </template>
|
|
|
+ </a-list>
|
|
|
+ </a-tab-pane>
|
|
|
|
|
|
- <a-form-item>
|
|
|
- <a-space>
|
|
|
- <a-button type="primary" @click="refreshPurchaseOrderLineTable">
|
|
|
- 查询
|
|
|
- </a-button>
|
|
|
- <a-button type="primary" @click="showNeedPrint">
|
|
|
- 打印
|
|
|
- <a-badge :count="notPrintCount" />
|
|
|
- </a-button>
|
|
|
- </a-space>
|
|
|
- </a-form-item>
|
|
|
- </a-form>
|
|
|
- </a-layout-header>
|
|
|
+ <a-tab-pane key="2" tab="库存情况">
|
|
|
+ <a-table
|
|
|
+ :data-source="stockInfos"
|
|
|
+ :columns="stockColumns"
|
|
|
+ row-key="id"
|
|
|
+ size="small"
|
|
|
+ />
|
|
|
+ </a-tab-pane>
|
|
|
|
|
|
- <a-layout-content class="content">
|
|
|
- <a-table
|
|
|
- :columns="columns"
|
|
|
- :data-source="purchaseOrderLines"
|
|
|
- :scroll="{ x: 1200 }"
|
|
|
- row-key="id"
|
|
|
- >
|
|
|
- <template #bodyCell="{ column, record, index }">
|
|
|
- <template v-if="column.dataIndex === 'index'">{{ index + 1 }}</template>
|
|
|
- <template v-if="column.dataIndex === 'operation'">
|
|
|
- <a-button type="link" @click="refreshPackModal(record.id)">包装</a-button>
|
|
|
- </template>
|
|
|
- </template>
|
|
|
- </a-table>
|
|
|
+ <a-tab-pane key="3" tab="库位信息">
|
|
|
+ <a-table
|
|
|
+ :data-source="positionInfos"
|
|
|
+ :columns="positionColumns"
|
|
|
+ :pagination="pagination2"
|
|
|
+ row-key="id"
|
|
|
+ size="small"
|
|
|
+ />
|
|
|
+ </a-tab-pane>
|
|
|
+ </a-tabs>
|
|
|
+ </a-card>
|
|
|
|
|
|
- <!-- 分页组件 -->
|
|
|
- <a-pagination
|
|
|
- v-model:current="pagination.current_page"
|
|
|
- :total="pagination.total"
|
|
|
- :page-size="pagination.per_page"
|
|
|
- class="pagination-wrapper"
|
|
|
- show-less-items
|
|
|
- />
|
|
|
- </a-layout-content>
|
|
|
+ <a-modal v-model:open="modal" title="历史图片" :footer="null">
|
|
|
+ <a-image :src="imageUrl" />
|
|
|
+ </a-modal>
|
|
|
+
|
|
|
+ <Loading v-if="loading" />
|
|
|
+ <ImagePreview ref="imagePreview" />
|
|
|
</a-layout>
|
|
|
-
|
|
|
- <!-- 包装模态框 -->
|
|
|
- <div id="pack-modal" class="modal fade" aria-hidden="true" data-backdrop="static">
|
|
|
- <div class="modal-dialog modal-lg" style="width:1000px;">
|
|
|
- <div class="modal-content">
|
|
|
- <div class="modal-header">
|
|
|
- <button type="button" class="close" data-dismiss="modal">
|
|
|
- <span aria-hidden="true">×</span>
|
|
|
- <span class="sr-only">Close</span>
|
|
|
- </button>
|
|
|
- <h4 class="modal-title">包装</h4>
|
|
|
- </div>
|
|
|
- <div id="modal-body" class="modal-body" style="color:#676767;">
|
|
|
- <div class="container-fluid">
|
|
|
- <div class="row header-row">
|
|
|
- <div class="col-md-2">
|
|
|
- <div class="form-control-label">存货档案名称</div>
|
|
|
- </div>
|
|
|
- <div class="col-md-4">
|
|
|
- <input v-model="packData.inventoryName" autocomplete="off" class="form-control" disabled type="text" />
|
|
|
- </div>
|
|
|
- <div class="col-md-2">
|
|
|
- <div class="form-control-label">存货档案编号</div>
|
|
|
- </div>
|
|
|
- <div class="col-md-4">
|
|
|
- <input v-model="packData.inventoryCode" autocomplete="off" class="form-control" disabled type="text" />
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="row header-row">
|
|
|
- <div class="col-md-2">
|
|
|
- <div class="form-control-label">订单数量</div>
|
|
|
- </div>
|
|
|
- <div class="col-md-4">
|
|
|
- <input v-model="packData.quantity" autocomplete="off" class="form-control" disabled type="text" />
|
|
|
- </div>
|
|
|
- <div class="col-md-2">
|
|
|
- <div class="form-control-label">工作令</div>
|
|
|
- </div>
|
|
|
- <div class="col-md-4">
|
|
|
- <input v-model="packData.projectInventoryName" autocomplete="off" class="form-control" disabled type="text" />
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="row header-row">
|
|
|
- <div class="col-md-2">
|
|
|
- <div class="form-control-label">预算分类项</div>
|
|
|
- </div>
|
|
|
- <div class="col-md-4">
|
|
|
- <input v-model="packData.componentInventoryName" autocomplete="off" class="form-control" disabled type="text" />
|
|
|
- </div>
|
|
|
- <div class="col-md-2">
|
|
|
- <div class="form-control-label">已打印包装件数</div>
|
|
|
- </div>
|
|
|
- <div class="col-md-4">
|
|
|
- <input v-model="purchaseOrderLinePrint.printedInventoryInstanceCount" autocomplete="off" class="form-control" disabled type="text" />
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="row header-row">
|
|
|
- <div class="col-md-2">
|
|
|
- <div class="form-control-label">已打印物料总数</div>
|
|
|
- </div>
|
|
|
- <div class="col-md-4">
|
|
|
- <input v-model="purchaseOrderLinePrint.printedInventoryInstanceQuantity" autocomplete="off" class="form-control" disabled type="text" />
|
|
|
- </div>
|
|
|
- <div class="col-md-2">
|
|
|
- <div class="form-control-label">未打印包装件数</div>
|
|
|
- </div>
|
|
|
- <div class="col-md-4">
|
|
|
- <input v-model="purchaseOrderLinePrint.notPrintedInventoryInstanceCount" autocomplete="off" class="form-control" disabled type="text" />
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="row header-row">
|
|
|
- <div class="col-md-2">
|
|
|
- <div class="form-control-label">未打印物料总数</div>
|
|
|
- </div>
|
|
|
- <div class="col-md-4">
|
|
|
- <input v-model="purchaseOrderLinePrint.notPrintedInventoryInstanceQuantity" autocomplete="off" class="form-control" disabled type="text" />
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="row header-row">
|
|
|
- <div class="col-md-6 col-md-offset-5">
|
|
|
- <div class="col-md-3">
|
|
|
- <button type="button" class="btn btn-info btn-sm" @click="showOnePackModal">添加一个包装</button>
|
|
|
- </div>
|
|
|
- <div class="col-md-3">
|
|
|
- <button type="button" class="btn btn-info btn-sm" @click="showMorePackModal">添加多个包装</button>
|
|
|
- </div>
|
|
|
- <div class="col-md-4">
|
|
|
- <!-- eslint-disable-next-line -->
|
|
|
- <select v-model="buttonText" class="selectpicker form-control" data-style="btn-info" style="width:110%; padding-left:1px; margin: 0px 10px" @change="packModalPrintStatus">
|
|
|
- <option value="0">显示全部</option>
|
|
|
- <option value="1">显示未打印</option>
|
|
|
- </select>
|
|
|
- </div>
|
|
|
- <div class="col-md-3">
|
|
|
- <button type="button" class="btn btn-primary btn-sm" style="position: absolute;top: -33px;left: 400px;" @click="printNotPrintedContent">
|
|
|
- 打印未打印的内容
|
|
|
- <span class="badge">{{ notPrintCount }}</span>
|
|
|
- </button>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="row">
|
|
|
- <div class="col-sm-12">
|
|
|
- <div id="myTabContent" class="tab-content">
|
|
|
- <table id="table-width" class="myTable" style="color: #ccc;">
|
|
|
- <thead>
|
|
|
- <tr>
|
|
|
- <th>序号</th>
|
|
|
- <th>包装创建时间</th>
|
|
|
- <th>包装内物料数量</th>
|
|
|
- <th>打印次数</th>
|
|
|
- <th>打印状态</th>
|
|
|
- <th>打印</th>
|
|
|
- <th>删除</th>
|
|
|
- </tr>
|
|
|
- </thead>
|
|
|
- <tbody>
|
|
|
- <template v-if="buttonText == 0">
|
|
|
- <tr v-for="(item,index) in inventoryInstances" :key="item.id">
|
|
|
- <td>{{ index + 1 }}</td>
|
|
|
- <td>{{ item.createDate }}</td>
|
|
|
- <td style="cursor: pointer;text-decoration: underline;" @click="changeQty(item.id,item.quantity)">{{ item.quantity }}</td>
|
|
|
- <td>{{ item.printCount }}</td>
|
|
|
- <td v-if="item.printStatus == 0">未打印</td>
|
|
|
- <td v-else-if="item.printStatus == 1">待打印</td>
|
|
|
- <td v-else>已打印</td>
|
|
|
- <td>
|
|
|
- <button type="button" class="btn btn-success btn-sm" @click="printPack(item.id)">打印</button>
|
|
|
- </td>
|
|
|
- <td>
|
|
|
- <button type="button" class="btn btn-danger btn-sm" @click="deletePack(item.id)">删除</button>
|
|
|
- </td>
|
|
|
- </tr>
|
|
|
- </template>
|
|
|
- <template v-if="buttonText == 1 && item.printStatus == 0">
|
|
|
- <tr v-for="(item,index) in inventoryInstances" :key="item.id">
|
|
|
- <td>{{ index + 1 }}</td>
|
|
|
- <td>{{ item.createDate }}</td>
|
|
|
- <td style="cursor: pointer;text-decoration: underline;" @click="changeQty(item.id,item.quantity)">{{ item.quantity }}</td>
|
|
|
- <td>{{ item.printCount }}</td>
|
|
|
- <td>未打印</td>
|
|
|
- <td>
|
|
|
- <button type="button" class="btn btn-success btn-sm" @click="printPack(item.id)">打印</button>
|
|
|
- </td>
|
|
|
- <td>
|
|
|
- <button type="button" class="btn btn-danger btn-sm" @click="deletePack(item.id)">删除</button>
|
|
|
- </td>
|
|
|
- </tr>
|
|
|
- </template>
|
|
|
- </tbody>
|
|
|
- </table>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
-
|
|
|
- <!-- 包装模态框:END -->
|
|
|
- <!-- +1模态框 -->
|
|
|
- <div id="pack-modal-1" class="modal fade" aria-hidden="true" data-backdrop="static">
|
|
|
- <div class="modal-dialog modal-lg" style="width:800px;">
|
|
|
- <div class="modal-content">
|
|
|
- <div class="modal-header">
|
|
|
- <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button>
|
|
|
- <h4 class="modal-title">输入包装内物料数量</h4>
|
|
|
- </div>
|
|
|
- <div id="modal-body" class="modal-body" style="color:#676767;">
|
|
|
- <div class="row header-row">
|
|
|
- <div class="col-md-2">
|
|
|
- <div class="form-control-label">包装内物料数量:</div>
|
|
|
- </div>
|
|
|
- <div class="col-md-4">
|
|
|
- <input v-model="packOneQty" autocomplete="off" class="form-control" type="text" />
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="modal-footer">
|
|
|
- <button type="button" class="btn btn-default" @click="cancelOnePackModal">取消</button>
|
|
|
- <button type="button" class="btn btn-primary" @click="saveOnePack">确定</button>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <!-- +1模态框END -->
|
|
|
- <!-- +N模态框 -->
|
|
|
- <div id="pack-modal-N" class="modal fade" aria-hidden="true" data-backdrop="static">
|
|
|
- <div class="modal-dialog modal-lg" style="width:800px">
|
|
|
- <div class="modal-content">
|
|
|
- <div class="modal-header">
|
|
|
- <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button>
|
|
|
- <h4 class="modal-title">输入包装内物料数量</h4>
|
|
|
- </div>
|
|
|
- <div class="modal-body" style="color:#676767;">
|
|
|
- <div class="row header-row">
|
|
|
- <div class="col-md-2">
|
|
|
- <div class="form-control-label">包装数量:</div>
|
|
|
- </div>
|
|
|
- <div class="col-md-4">
|
|
|
- <input v-model="packMoreCount" autocomplete="off" class="form-control" type="text" />
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="row header-row">
|
|
|
- <div class="col-md-2">
|
|
|
- <div class="form-control-label">包装内物料数量:</div>
|
|
|
- </div>
|
|
|
- <div class="col-md-4">
|
|
|
- <input v-model="packMoreQty" autocomplete="off" class="form-control" type="text" />
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="modal-footer">
|
|
|
- <button type="button" class="btn btn-default" @click="cancelMorePackModal">取消</button>
|
|
|
- <button type="button" class="btn btn-primary" @click="saveMorePack">确定</button>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <!-- +N模态框END -->
|
|
|
- <!-- 打印模态框 -->
|
|
|
- <div id="print-modal" class="modal fade" aria-hidden="true" data-backdrop="static">
|
|
|
- <div class="modal-dialog modal-lg" style="width:1000px">
|
|
|
- <div class="modal-content">
|
|
|
- <div id="modal-body" class="modal-body" style="color:#676767;">
|
|
|
- <div class="row header-row">
|
|
|
- <button type="button" class="close" data-dismiss="modal" style="margin-right:5px;">
|
|
|
- <span aria-hidden="true">×</span>
|
|
|
- <span class="sr-only">Close</span>
|
|
|
- </button>
|
|
|
- <ul id="myTab" class="nav nav-tabs">
|
|
|
- <li class="active">
|
|
|
- <a id="notPrint-a" href="#notPrint-deal" data-toggle="tab" class="hide-table" @click="getNoPrintInventoryInstancePrint">待打印
|
|
|
- </a>
|
|
|
- </li>
|
|
|
- <li>
|
|
|
- <a id="printed-a" href="#Printed-deal" data-toggle="tab" class="hide-table" @click="getPrintedInventoryInstancePrint">已打印
|
|
|
- </a>
|
|
|
- </li>
|
|
|
- </ul>
|
|
|
- </div>
|
|
|
- <div class="row header-row">
|
|
|
- <div class="container-fluid">
|
|
|
- <div id="myTabContent" class="tab-content">
|
|
|
- <div id="notPrint-deal" class="tab-pane fade in active">
|
|
|
- <div class="tab-pane">
|
|
|
- <div class="row">
|
|
|
- <div class="col-md-12">
|
|
|
- <div class="col-md-2">
|
|
|
- <span>采购订单号:</span>
|
|
|
- <!-- eslint-disable-next-line -->
|
|
|
- <input autocomplete="off" id="documentNo-noPrint" v-model="notPrintDocumentNo" type="text" class="form-control col-md-2 query-input-noPrint" placeholder="输入采购订单号" />
|
|
|
- </div>
|
|
|
- <div class="col-md-2">
|
|
|
- <span>存货档案名称:</span>
|
|
|
- <!--eslint-disable-next-line -->
|
|
|
- <input autocomplete="off" id="inventoryName-noPrint" v-model="notPrintInventoryName" type="text" style="padding-left: 5px;" class="form-control col-md-2 query-input-noPrint" placeholder="输入存货档案名称" />
|
|
|
- </div>
|
|
|
- <!--eslint-disable-next-line -->
|
|
|
- <div class="col-md-2">
|
|
|
- <span>存货档案编码:</span>
|
|
|
- <!--eslint-disable-next-line -->
|
|
|
- <input autocomplete="off" id="inventoryCode-noPrint" v-model="notPrintInventoryCode" type="text" style="padding-left: 5px;" class="form-control col-md-2 query-input-noPrint" placeholder="输入存货档案编码" />
|
|
|
- </div>
|
|
|
- <div class="col-md-2">
|
|
|
- <span>规格型号:</span>
|
|
|
- <!-- eslint-disable-next-line -->
|
|
|
- <input autocomplete="off" id="inventoryType-noPrint" v-model="notPrintInventoryType" type="text" class="form-control col-md-2 query-input-noPrint" placeholder="输入规格型号" />
|
|
|
- </div>
|
|
|
- <div class="col-md-2" style="position: absolute;top: 20px;right: 150px;">
|
|
|
- <button id="query-noPrint" type="button" class="btn btn-primary btn-sm" @click="getNoPrintInventoryInstancePrint">查询</button>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="col-md-12">
|
|
|
- <table id="myTable" class="myTable" style="color:#ccc;">
|
|
|
- <thead>
|
|
|
- <tr>
|
|
|
- <th>
|
|
|
- <input id="select-all-notPrint" v-model="checkAll" autocomplete="off" type="checkbox" name="select-all-notPrint" @click="notPrintCheckedAll()" />
|
|
|
- </th>
|
|
|
- <th>序号</th>
|
|
|
- <th>订单编号</th>
|
|
|
- <th>存货档案名称</th>
|
|
|
- <th>存货档案编码</th>
|
|
|
- <th>规格型号</th>
|
|
|
- <th>创建日期</th>
|
|
|
- <th>包装内物料数量</th>
|
|
|
- <th>订单数量</th>
|
|
|
- <th>打印状态</th>
|
|
|
- </tr>
|
|
|
- </thead>
|
|
|
- <tbody id="table-notPrint">
|
|
|
- <tr v-for="(item,index) in notPrintInventoryInstances" :key="item.id">
|
|
|
- <td>
|
|
|
- <input v-model="notPrintCheckboxModel" autocomplete="off" type="checkbox" :value="item.id" />
|
|
|
- </td>
|
|
|
- <td>{{ index + 1 }}</td>
|
|
|
- <td>{{ item.purchaseOrderDocumentNo }}</td>
|
|
|
- <td>{{ item.inventoryName }}</td>
|
|
|
- <td>{{ item.inventoryCode }}</td>
|
|
|
- <td>{{ item.inventoryType }}</td>
|
|
|
- <td>{{ item.createDate }}</td>
|
|
|
- <td>{{ item.printQuantity }}</td>
|
|
|
- <td>{{ item.quantity }}</td>
|
|
|
- <td>待打印</td>
|
|
|
- </tr>
|
|
|
- </tbody>
|
|
|
- </table>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="modal-footer">
|
|
|
- <button id="savePrint-btn-notPrint" type="button" class="btn btn-primary" @click="printReport(0)">打印条码</button>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div id="Printed-deal" class="tab-pane fade ">
|
|
|
- <div class="tab-pane">
|
|
|
- <div class="row">
|
|
|
- <div class="col-md-12">
|
|
|
- <div class="col-md-2">
|
|
|
- <span>采购订单号:</span>
|
|
|
- <!-- eslint-disable-next-line -->
|
|
|
- <input autocomplete="off" id="documentNo-print" v-model="printedDocumentNo" type="text" class="form-control col-md-2 query-input-print" placeholder="输入采购订单号" />
|
|
|
- </div>
|
|
|
- <div class="col-md-2">
|
|
|
- <span>存货档案名称:</span>
|
|
|
- <!-- eslint-disable-next-line -->
|
|
|
- <input autocomplete="off" id="inventoryName-print" v-model="printedInventoryName" type="text" style="padding-left: 5px;" class="form-control col-md-2 query-input-print" placeholder="输入存货档案名称" />
|
|
|
- </div>
|
|
|
- <div class="col-md-2">
|
|
|
- <span>存货档案编码:</span>
|
|
|
- <!--eslint-disable-next-line -->
|
|
|
- <input autocomplete="off" id="inventoryCode-print" v-model="printedInventoryCode" type="text" style="padding-left: 5px;" class="form-control col-md-2 query-input-print" placeholder="输入存货档案编码" />
|
|
|
- </div>
|
|
|
- <div class="col-md-2">
|
|
|
- <span>规格型号:</span>
|
|
|
- <!-- eslint-disable-next-line -->
|
|
|
- <input autocomplete="off" id="inventoryType-print" v-model="printedInventoryType" type="text" class="form-control col-md-2 query-input-print" placeholder="输入规格型号" />
|
|
|
- </div>
|
|
|
- <div class="col-md-2" style="position: absolute;top: 20px;right: 150px;">
|
|
|
- <button id="query-print" type="button" class="btn btn-primary btn-sm" @click="getPrintedInventoryInstancePrint">查询</button>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="col-md-12">
|
|
|
- <table id="myTable" class="myTable" style="color:#ccc;">
|
|
|
- <thead>
|
|
|
- <tr>
|
|
|
- <th><input v-model="printedCheckAll" autocomplete="off" type="checkbox" name="select-all-printed" @click="printedCheckedAll()" /></th>
|
|
|
- <th>序号</th>
|
|
|
- <th>订单编号</th>
|
|
|
- <th>存货档案名称</th>
|
|
|
- <th>存货档案编码</th>
|
|
|
- <th>规格型号</th>
|
|
|
- <th>创建日期</th>
|
|
|
- <th>打印日期</th>
|
|
|
- <th>包装内物料数量</th>
|
|
|
- <th>订单数量</th>
|
|
|
- <th>打印状态</th>
|
|
|
- </tr>
|
|
|
- </thead>
|
|
|
- <tbody id="table-Printed">
|
|
|
- <tr v-for="(item,index) in printedInventoryInstances" :key="item.id">
|
|
|
- <td>
|
|
|
- <input v-model="printedCheckboxModel" autocomplete="off" type="checkbox" :value="item.id" />
|
|
|
- </td>
|
|
|
- <td>{{ (pagination.current_page - 1) * pagination.per_page + 1 + index }}</td>
|
|
|
- <td>{{ item.purchaseOrderDocumentNo }}</td>
|
|
|
- <td>{{ item.inventoryName }}</td>
|
|
|
- <td>{{ item.inventoryCode }}</td>
|
|
|
- <td>{{ item.inventoryType }}</td>
|
|
|
- <td>{{ item.createDate }}</td>
|
|
|
- <td>{{ item.printedDate }}</td>
|
|
|
- <td>{{ item.printQuantity }}</td>
|
|
|
- <td>{{ item.quantity }}</td>
|
|
|
- <td>已打印</td>
|
|
|
- </tr>
|
|
|
- </tbody>
|
|
|
- </table>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="modal-footer">
|
|
|
- <button id="sendDocPrint-btn" type="button" class="btn btn-primary" @click="printReport(2)">打印发货单</button>
|
|
|
- <button id="savePrint-btn-Printed" type="button" class="btn btn-primary" @click="printReport(1)">打印条码</button>
|
|
|
- </div>
|
|
|
- <div class="row">
|
|
|
- <VueBootstrapPagination v-if="isShowPage" :pagination="pagination" :callback="getPrintedInventoryInstancePrint" />
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <!-- 打印模态框END -->
|
|
|
- <!-- pdf、Excel下载模态框 -->
|
|
|
- <div id="pack-modal-download" class="modal fade" aria-hidden="true" data-backdrop="static">
|
|
|
- <div class="modal-dialog modal-lg" style="width:500px">
|
|
|
- <div class="modal-content">
|
|
|
- <div class="modal-header">
|
|
|
- <button type="button" class="close" data-dismiss="modal" style="margin-right:10px;margin-top:-5px;">
|
|
|
- <span aria-hidden="true">×</span>
|
|
|
- <span class="sr-only">Close</span>
|
|
|
- </button>
|
|
|
- <h4 class="modal-title">选择下载格式</h4>
|
|
|
- </div>
|
|
|
- <div id="modal-body" class="modal-body" style="color:#676767;">
|
|
|
- <div class="row header-row">
|
|
|
- <div class="col-md-2">
|
|
|
- <button id="download-pdf" type="button" class="btn btn-info">
|
|
|
- <a style="color:#fff;" target="_blank" @click="downloadPdf">PDF下载</a>
|
|
|
- </button>
|
|
|
- </div>
|
|
|
- <div class="col-md-2">
|
|
|
- <button id="download-Excel" type="button" class="btn btn-info">
|
|
|
- <a style="color:#fff;" target="_blank" @click="downloadExcel">Excel下载</a>
|
|
|
- </button>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <!-- pdf、Excel下载模态框END -->
|
|
|
- <!-- 修改数量模态框start -->
|
|
|
- <div id="pack-modal-quantity" class="modal fade" aria-hidden="true" data-backdrop="static">
|
|
|
- <div class="modal-dialog modal-lg" style="width:800px;">
|
|
|
- <div class="modal-content">
|
|
|
- <div class="modal-header">
|
|
|
- <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button>
|
|
|
- <h4 class="modal-title">输入包装内物料数量</h4>
|
|
|
- </div>
|
|
|
- <div id="modal-body" class="modal-body" style="color:#676767;">
|
|
|
- <input id="inventoryInstanceId" autocomplete="off" type="hidden" value="" />
|
|
|
- <div class="row header-row">
|
|
|
- <div class="col-md-2"><div class="form-control-label">包装内物料数量:</div></div>
|
|
|
- <div class="col-md-4"><input id="pack-changeQty" v-model="quantity" autocomplete="off" class="form-control" type="text" /></div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="modal-footer">
|
|
|
- <button id="cancel-btn-changeQty" type="button" class="btn btn-default" @click="cancelChangeQty">取消</button>
|
|
|
- <button id="saveQty-btn-changeQty" type="button" class="btn btn-primary" @click="saveChangeQty">保存</button>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
import Common from '../common/Common.js';
|
|
|
-
|
|
|
+import InAndOutFlow from '../stock/InAndOutFlow.vue';
|
|
|
|
|
|
|
|
|
export default {
|
|
|
+
|
|
|
components: {
|
|
|
-
|
|
|
+ InAndOutFlow,
|
|
|
|
|
|
},
|
|
|
- data: function () {
|
|
|
+ data: function() {
|
|
|
+ this.Common = Common;
|
|
|
return {
|
|
|
- columns: [
|
|
|
- { title: '序号', dataIndex: 'index', width: 60 },
|
|
|
- { title: '存货名称', dataIndex: 'inventoryName' },
|
|
|
- { title: '存货编码', dataIndex: 'inventoryCode' },
|
|
|
- { title: '规格型号', dataIndex: 'inventoryType' },
|
|
|
- { title: '订单数量', dataIndex: 'quantity' },
|
|
|
- { title: '操作', dataIndex: 'operation', fixed: 'right' },
|
|
|
- ],
|
|
|
- inventoryName: '',
|
|
|
- inventoryCode: '',
|
|
|
- inventoryType: '',
|
|
|
- documentNo: '',
|
|
|
- selectedNum: '',
|
|
|
- purchaseOrderLines: [],
|
|
|
- purchaseOrderLineId: '',
|
|
|
- packData: {},
|
|
|
- purchaseOrderLinePrint: {},
|
|
|
- buttonText: '',
|
|
|
- inventoryInstances: [],
|
|
|
- packOneQty: '',
|
|
|
- packMoreCount: '',
|
|
|
- packMoreQty: '',
|
|
|
- notPrintInventoryInstances: [],
|
|
|
- notPrintInventoryName: '',
|
|
|
- notPrintInventoryCode: '',
|
|
|
- notPrintInventoryType: '',
|
|
|
- notPrintDocumentNo: '',
|
|
|
- notPrintCheckboxModel: [], //获取选项框数据
|
|
|
- checkAll: false, //全选,
|
|
|
- reportResult: {},
|
|
|
pagination: {
|
|
|
total: 0,
|
|
|
- per_page: 30,
|
|
|
- current_page: 1,
|
|
|
- last_page: 10,
|
|
|
+ per_page: Common.pageSize, // required
|
|
|
+ current_page: 1, // required
|
|
|
+ last_page: 1, // required
|
|
|
+ },
|
|
|
+ //历史图片分页参数
|
|
|
+ pagination2: {
|
|
|
+ total: 0,
|
|
|
+ per_page: Common.pageSize, // required
|
|
|
+ current_page: 1, // required
|
|
|
+ last_page: 1, // required
|
|
|
+ from: 1,
|
|
|
+ to: 1, // required
|
|
|
},
|
|
|
- isShowPage: false,
|
|
|
- printedInventoryInstances: [],
|
|
|
- printedInventoryName: '',
|
|
|
- printedInventoryCode: '',
|
|
|
- printedInventoryType: '',
|
|
|
- printedDocumentNo: '',
|
|
|
- printedCheckboxModel: [], //获取选项框数据
|
|
|
- printedCheckAll: false, //全选,
|
|
|
- notPrintCount: '',
|
|
|
- quantity: '',
|
|
|
- inventoryInstanceId: '',
|
|
|
+ condition: '',
|
|
|
+ showPager: false, // 是否显示分页
|
|
|
+ assetInstances: [],
|
|
|
+ inventorys: [],
|
|
|
+ assetClassName: 'com.leanwo.prodog.asset.model.AssetInstance',
|
|
|
+ inventoryClassName: 'com.leanwo.prodog.model.common.Inventory',
|
|
|
+ showAssetInstance: '',
|
|
|
+ showInventory: '',
|
|
|
+ activeContent: 1,
|
|
|
+ imageInfos: [],
|
|
|
+ imageUrl: '',
|
|
|
+ historyEvents: [],
|
|
|
+ assetHistoryEvents: [],
|
|
|
+ historyEvents2: [],
|
|
|
+ stockInfos: [],
|
|
|
+ positionInfos: [],
|
|
|
+ results: [],
|
|
|
+ startDate: '',
|
|
|
+ endDate: '',
|
|
|
+ firstSearch: true,
|
|
|
+ loading: false,
|
|
|
+ modal: false,
|
|
|
+ stockColumns: [
|
|
|
+ { title: '仓库名称', dataIndex: 'warehouseName' },
|
|
|
+ { title: '入库单号', dataIndex: 'documentNo' },
|
|
|
+ { title: '存货名称', dataIndex: 'inventoryName' },
|
|
|
+ { title: '存货编码', dataIndex: 'inventoryNo' },
|
|
|
+ { title: '批次', dataIndex: 'batchNo' },
|
|
|
+ { title: '结存数量', dataIndex: 'quantity' },
|
|
|
+ ],
|
|
|
+ positionColumns: [
|
|
|
+ { title: '仓库名称', dataIndex: 'warehouseName' },
|
|
|
+ { title: '入库单号', dataIndex: 'documentNo' },
|
|
|
+ { title: '存货名称', dataIndex: 'inventoryName' },
|
|
|
+ { title: '存货编号', dataIndex: 'inventoryNo' },
|
|
|
+ { title: '库位名称', dataIndex: 'positionName' },
|
|
|
+ { title: '库位编号', dataIndex: 'positionNo' },
|
|
|
+ { title: '数量', dataIndex: 'quantity' },
|
|
|
+ { title: '处理人', dataIndex: 'handlerUser' },
|
|
|
+ { title: '处理时间', dataIndex: 'handlerDate' },
|
|
|
+ ],
|
|
|
};
|
|
|
},
|
|
|
- watch: {
|
|
|
- // 反选
|
|
|
- notPrintCheckboxModel: {
|
|
|
- handler: function (val, oldVal) {
|
|
|
- console.log(this.notPrintCheckboxModel.toString());
|
|
|
- if (
|
|
|
- this.notPrintInventoryInstances.length ==
|
|
|
- this.notPrintCheckboxModel.length
|
|
|
- ) {
|
|
|
- this.checkAll = true;
|
|
|
- } else {
|
|
|
- this.checkAll = false;
|
|
|
- }
|
|
|
- },
|
|
|
- deep: true,
|
|
|
- },
|
|
|
- // 反选
|
|
|
- printedCheckboxModel: {
|
|
|
- handler: function (val, oldVal) {
|
|
|
- console.log(this.printedCheckboxModel.toString());
|
|
|
- if (
|
|
|
- this.printedInventoryInstances.length ==
|
|
|
- this.printedCheckboxModel.length
|
|
|
- ) {
|
|
|
- this.printedCheckAll = true;
|
|
|
- } else {
|
|
|
- this.printedCheckAll = false;
|
|
|
- }
|
|
|
- },
|
|
|
- deep: true,
|
|
|
- },
|
|
|
+
|
|
|
+ computed: {
|
|
|
+ dataId: function() {
|
|
|
+ return {inventoryId: this.$route.query.inventoryresultId};
|
|
|
+ },
|
|
|
},
|
|
|
- mounted: function () {
|
|
|
- this.loadDocumentNo();
|
|
|
- this.getNeedPrintCount();
|
|
|
+
|
|
|
+ watch: {},
|
|
|
+
|
|
|
+ mounted: function() {
|
|
|
+ var _self = this;
|
|
|
+
|
|
|
+ var inventoryresultId = _self.$route.query.inventoryresultId;
|
|
|
+
|
|
|
+ _self.findInventoryById(inventoryresultId);
|
|
|
+ if (_self.firstSearch) {
|
|
|
+ _self.condition = localStorage.getItem('##searchStr##');
|
|
|
+ _self.firstSearch = false;
|
|
|
+ }
|
|
|
},
|
|
|
- methods: {
|
|
|
- loadDocumentNo: function () {
|
|
|
- var _self = this;
|
|
|
- $('#documentNo')
|
|
|
- .select2({
|
|
|
- placeholder: '输入采购订单号',
|
|
|
- allowClear: false,
|
|
|
- ajax: {
|
|
|
- type: 'get',
|
|
|
- dataType: 'json',
|
|
|
- url: Common.getApiURL(
|
|
|
- 'PurchaseOrderLineResource/queryPurchaseOrderLineDocumentNo',
|
|
|
- ),
|
|
|
- beforeSend: function (request) {
|
|
|
- Common.addTokenToRequest(request);
|
|
|
- },
|
|
|
- data: function (params) {
|
|
|
- return {
|
|
|
- documentNo: params.term,
|
|
|
- };
|
|
|
- },
|
|
|
- processResults: function (data) {
|
|
|
- return {
|
|
|
- results: $.map(data, function (item) {
|
|
|
- return {
|
|
|
- id: item.documentNo,
|
|
|
- text: item.documentNo,
|
|
|
- };
|
|
|
- }),
|
|
|
- };
|
|
|
- },
|
|
|
- },
|
|
|
- })
|
|
|
- .on('select2:select', function (event) {
|
|
|
- console.log(event.params.data);
|
|
|
- _self.documentNo = event.params.data.text;
|
|
|
- _self.refreshPurchaseOrderLineTable();
|
|
|
- _self.keydown();
|
|
|
- });
|
|
|
- },
|
|
|
- refreshPurchaseOrderLineTable: function () {
|
|
|
- var _self = this;
|
|
|
- var purchaseOrderDocumentNo = _self.documentNo;
|
|
|
- var inventoryName = _self.inventoryName;
|
|
|
- var inventoryType = _self.inventoryType;
|
|
|
- var inventoryCode = _self.inventoryCode;
|
|
|
- var printNum = _self.selectedNum;
|
|
|
- if (
|
|
|
- purchaseOrderDocumentNo == '' &&
|
|
|
- inventoryName == '' &&
|
|
|
- inventoryCode == '' &&
|
|
|
- inventoryType == ''
|
|
|
- ) {
|
|
|
- return;
|
|
|
- } else {
|
|
|
- var url;
|
|
|
- if (printNum == 1) {
|
|
|
- url =
|
|
|
- 'PurchaseOrderLineResource/findNotPrintByDocumentNoNameCodeType';
|
|
|
- } else if (printNum == 2) {
|
|
|
- url = 'PurchaseOrderLineResource/findPrintedByDocumentNoNameCodeType';
|
|
|
- } else {
|
|
|
- url = 'PurchaseOrderLineResource/findAllByDocumentNoNameCodeType';
|
|
|
- }
|
|
|
- $.ajax({
|
|
|
- url: Common.getApiURL(url),
|
|
|
- type: 'post',
|
|
|
- data: {
|
|
|
- documentNo: purchaseOrderDocumentNo,
|
|
|
- inventoryName: inventoryName,
|
|
|
- inventoryCode: inventoryCode,
|
|
|
- inventoryType: inventoryType,
|
|
|
- },
|
|
|
- beforeSend: function (request) {
|
|
|
- Common.addTokenToRequest(request);
|
|
|
- },
|
|
|
- success: function (data) {
|
|
|
- //console.log(data);
|
|
|
- _self.purchaseOrderLines = data;
|
|
|
- },
|
|
|
- error: function (XMLHttpRequest, textStatus, errorThrown) {
|
|
|
- Common.processException(XMLHttpRequest, textStatus, errorThrown);
|
|
|
- },
|
|
|
- });
|
|
|
- }
|
|
|
- },
|
|
|
- refreshPackModal: function (purchaseOrderLineId) {
|
|
|
- var _self = this;
|
|
|
- _self.purchaseOrderLineId = purchaseOrderLineId;
|
|
|
|
|
|
- _self.getNeedPrintCount();
|
|
|
- //根据采购订单明细Id查询PurchaseOrderLinePackDto
|
|
|
- if (purchaseOrderLineId == undefined || purchaseOrderLineId == '') {
|
|
|
- return;
|
|
|
- }
|
|
|
- $.ajax({
|
|
|
- url:
|
|
|
- Common.getApiURL(
|
|
|
- 'PurchaseOrderLineResource/queryPurchaseOrderLinePackDto?purchaseOrderLineId=',
|
|
|
- ) + purchaseOrderLineId,
|
|
|
- async: false,
|
|
|
- type: 'get',
|
|
|
- beforeSend: function (request) {
|
|
|
- Common.addTokenToRequest(request);
|
|
|
- },
|
|
|
- success: function (data) {
|
|
|
- console.log(data);
|
|
|
- _self.packData = data;
|
|
|
- _self.purchaseOrderLinePrint = data.purchaseOrderLinePrintDto;
|
|
|
- $('#pack-modal').modal('show');
|
|
|
- _self.showInventoryInstanceTable(purchaseOrderLineId);
|
|
|
- },
|
|
|
- error: function (XMLHttpRequest, textStatus, errorThrown) {
|
|
|
- Common.processException(XMLHttpRequest, textStatus, errorThrown);
|
|
|
- },
|
|
|
- });
|
|
|
- },
|
|
|
- showInventoryInstanceTable: function (purchaseOrderLineId) {
|
|
|
- var _self = this;
|
|
|
- var url;
|
|
|
- if (_self.buttonText == 0) {
|
|
|
- url =
|
|
|
- 'InventoryInstanceResource/loadInventoryInstance/?purchaseOrderLineId=';
|
|
|
- } else {
|
|
|
- url =
|
|
|
- 'InventoryInstanceResource/notPrintedInventoryInstance/?purchaseOrderLineId=';
|
|
|
- }
|
|
|
- $.ajax({
|
|
|
- url: Common.getApiURL(url) + purchaseOrderLineId,
|
|
|
- async: false,
|
|
|
- type: 'get',
|
|
|
- beforeSend: function (request) {
|
|
|
- Common.addTokenToRequest(request);
|
|
|
- },
|
|
|
- success: function (data) {
|
|
|
- // //渲染InventoryInstanceDto表格数据
|
|
|
- console.log(data);
|
|
|
- _self.inventoryInstances = data;
|
|
|
- },
|
|
|
- error: function (XMLHttpRequest, textStatus, errorThrown) {
|
|
|
- Common.processException(XMLHttpRequest, textStatus, errorThrown);
|
|
|
- },
|
|
|
- });
|
|
|
- },
|
|
|
- showOnePackModal: function () {
|
|
|
- this.packOneQty = '';
|
|
|
- $('#pack-modal').modal('hide');
|
|
|
- $('#pack-modal-1').modal('show');
|
|
|
- },
|
|
|
- cancelOnePackModal: function () {
|
|
|
- $('#pack-modal-1').modal('hide');
|
|
|
- $('#pack-modal').modal('show');
|
|
|
- $('body').css('overflow-y', 'hidden');
|
|
|
- $('#pack-modal').css('overflow-y', 'auto');
|
|
|
- },
|
|
|
- // 保存一个包装
|
|
|
- saveOnePack: function () {
|
|
|
- var _self = this;
|
|
|
- var inventoryInstanceDtos = [];
|
|
|
- var quantity = _self.packOneQty;
|
|
|
- var purchaseOrderLineId = _self.purchaseOrderLineId;
|
|
|
- var aa = {
|
|
|
- quantity: quantity,
|
|
|
- purchaseOrderLineId: purchaseOrderLineId,
|
|
|
- };
|
|
|
- inventoryInstanceDtos.push(aa);
|
|
|
- console.log(inventoryInstanceDtos);
|
|
|
- // 保存InventoryInstances
|
|
|
- $.ajax({
|
|
|
- url: Common.getApiURL(
|
|
|
- 'InventoryInstanceResource/saveInventoryInstances',
|
|
|
- ),
|
|
|
- dataType: 'json',
|
|
|
- type: 'post',
|
|
|
- contentType: 'application/json',
|
|
|
- data: JSON.stringify(inventoryInstanceDtos),
|
|
|
- beforeSend: function (request) {
|
|
|
- Common.addTokenToRequest(request);
|
|
|
- },
|
|
|
- success: function (jsonData) {
|
|
|
- _self.refreshPackModal(purchaseOrderLineId);
|
|
|
- _self.refreshPurchaseOrderLineTable();
|
|
|
- $('#pack-modal-1').modal('hide');
|
|
|
- $('#pack-modal').css('overflow-y', 'auto');
|
|
|
- },
|
|
|
- error: function (XMLHttpRequest, textStatus, errorThrown) {
|
|
|
- Common.processException(XMLHttpRequest, textStatus, errorThrown);
|
|
|
- },
|
|
|
- });
|
|
|
- },
|
|
|
- showMorePackModal: function () {
|
|
|
- this.packMoreCount = '';
|
|
|
- this.packMoreQty = '';
|
|
|
- $('#pack-modal-N').modal('show');
|
|
|
- $('#pack-modal').modal('hide');
|
|
|
- },
|
|
|
- cancelMorePackModal: function () {
|
|
|
- $('#pack-modal-N').modal('hide');
|
|
|
- $('#pack-modal').modal('show');
|
|
|
- $('body').css('overflow-y', 'hidden');
|
|
|
- $('#pack-modal').css('overflow-y', 'auto');
|
|
|
- },
|
|
|
- // 保存多个包装
|
|
|
- saveMorePack: function () {
|
|
|
+ beforeUnmount: function() {
|
|
|
+
|
|
|
+ },
|
|
|
+
|
|
|
+ methods: {
|
|
|
+ findInventoryById: function(inventoryresultId) {
|
|
|
var _self = this;
|
|
|
- var inventoryInstanceDtos = [];
|
|
|
- var count = _self.packMoreCount;
|
|
|
- for (var i = 0; i < count; i++) {
|
|
|
- var quantity = _self.packMoreQty;
|
|
|
- var purchaseOrderLineId = _self.purchaseOrderLineId;
|
|
|
- var aa = {
|
|
|
- quantity: quantity,
|
|
|
- purchaseOrderLineId: purchaseOrderLineId,
|
|
|
- };
|
|
|
- inventoryInstanceDtos.push(aa);
|
|
|
- }
|
|
|
- // 保存包装信息
|
|
|
$.ajax({
|
|
|
- url: Common.getApiURL(
|
|
|
- 'InventoryInstanceResource/saveInventoryInstances',
|
|
|
- ),
|
|
|
- dataType: 'json',
|
|
|
+ url: Common.getApiURL('InventoryResource/findInventoryById'),
|
|
|
type: 'post',
|
|
|
+ data: inventoryresultId,
|
|
|
contentType: 'application/json',
|
|
|
- data: JSON.stringify(inventoryInstanceDtos),
|
|
|
- beforeSend: function (request) {
|
|
|
- Common.addTokenToRequest(request);
|
|
|
- },
|
|
|
- success: function (jsonData) {
|
|
|
- _self.refreshPackModal(purchaseOrderLineId);
|
|
|
- _self.refreshPurchaseOrderLineTable();
|
|
|
- $('#pack-modal-N').modal('hide');
|
|
|
- $('#pack-modal').css('overflow-y', 'auto');
|
|
|
- },
|
|
|
- error: function (XMLHttpRequest, textStatus, errorThrown) {
|
|
|
- Common.processException(XMLHttpRequest, textStatus, errorThrown);
|
|
|
- },
|
|
|
- });
|
|
|
- },
|
|
|
- packModalPrintStatus: function () {
|
|
|
- var _self = this;
|
|
|
- _self.refreshPackModal(_self.purchaseOrderLineId);
|
|
|
- },
|
|
|
- printPack: function (inventoryInstanceId) {
|
|
|
- var _self = this;
|
|
|
- $.ajax({
|
|
|
- url: Common.getApiURL(
|
|
|
- 'InventoryInstancePrintResource/saveInventoryInstancesToInventoryInstancePrint',
|
|
|
- ),
|
|
|
- async: false,
|
|
|
- type: 'post',
|
|
|
- beforeSend: function (request) {
|
|
|
- Common.addTokenToRequest(request);
|
|
|
- },
|
|
|
- data: {
|
|
|
- inventoryInstanceId: inventoryInstanceId,
|
|
|
- },
|
|
|
- success: function (data) {
|
|
|
- _self.refreshPackModal(_self.purchaseOrderLineId);
|
|
|
- Notify.success('提示', '放入打印队列完成', false);
|
|
|
- },
|
|
|
- error: function (XMLHttpRequest, textStatus, errorThrown) {
|
|
|
- Common.processException(XMLHttpRequest, textStatus, errorThrown);
|
|
|
- },
|
|
|
- });
|
|
|
- },
|
|
|
- deletePack: function (inventoryInstanceId) {
|
|
|
- var _self = this;
|
|
|
- $.ajax({
|
|
|
- url:
|
|
|
- Common.getApiURL(
|
|
|
- 'InventoryInstanceResource/deleteByInventoryInstanceId?inventoryInstanceId=',
|
|
|
- ) + inventoryInstanceId,
|
|
|
- async: false,
|
|
|
- type: 'get',
|
|
|
- beforeSend: function (request) {
|
|
|
+ beforeSend: function(request) {
|
|
|
Common.addTokenToRequest(request);
|
|
|
},
|
|
|
- success: function (data) {
|
|
|
- _self.refreshPackModal(_self.purchaseOrderLineId);
|
|
|
- _self.refreshPurchaseOrderLineTable();
|
|
|
+ success: function(data) {
|
|
|
+ _self.showItem2(data);
|
|
|
},
|
|
|
- error: function (XMLHttpRequest, textStatus, errorThrown) {
|
|
|
- Common.processException(XMLHttpRequest, textStatus, errorThrown);
|
|
|
- },
|
|
|
- });
|
|
|
- },
|
|
|
- printNotPrintedContent: function () {
|
|
|
- var _self = this;
|
|
|
- var data = [];
|
|
|
- _self.inventoryInstances.forEach(function (item) {
|
|
|
- data.push(item.id);
|
|
|
- });
|
|
|
- $.ajax({
|
|
|
- url: Common.getApiURL(
|
|
|
- 'InventoryInstancePrintResource/saveNotPrintedInventoryInstancesToInventoryInstancePrint',
|
|
|
- ),
|
|
|
- async: true,
|
|
|
- dataType: 'json',
|
|
|
- type: 'post',
|
|
|
- contentType: 'application/json; charset=utf-8',
|
|
|
- data: JSON.stringify(data),
|
|
|
- beforeSend: function (request) {
|
|
|
- Common.addTokenToRequest(request);
|
|
|
- },
|
|
|
- success: function (data) {
|
|
|
- _self.refreshPackModal(_self.purchaseOrderLineId);
|
|
|
- _self.showPrintModal();
|
|
|
- },
|
|
|
- error: function (XMLHttpRequest, textStatus, errorThrown) {
|
|
|
- //showPrintModal();
|
|
|
- Common.processException(XMLHttpRequest, textStatus, errorThrown);
|
|
|
- },
|
|
|
- });
|
|
|
- },
|
|
|
- //点击打印未打印,显示打印模态框
|
|
|
- showPrintModal: function () {
|
|
|
- var _self = this;
|
|
|
- _self.getNoPrintInventoryInstancePrint();
|
|
|
- $('#pack-modal').modal('hide');
|
|
|
- $('#print-modal').modal('show');
|
|
|
- $('#print-modal').css('overflow-y', 'auto');
|
|
|
- $('body').css('overflow-y', 'hidden');
|
|
|
- },
|
|
|
- showNeedPrint: function () {
|
|
|
- var _self = this;
|
|
|
- $.ajax({
|
|
|
- url: Common.getApiURL(
|
|
|
- 'InventoryInstancePrintResource/queryInventoryInstancePrint',
|
|
|
- ),
|
|
|
- async: true,
|
|
|
- dataType: 'json',
|
|
|
- type: 'post',
|
|
|
- data: {
|
|
|
- printed: false,
|
|
|
- },
|
|
|
- beforeSend: function (request) {
|
|
|
- Common.addTokenToRequest(request);
|
|
|
- },
|
|
|
- success: function (data) {
|
|
|
- $('#print-modal').modal('show');
|
|
|
- _self.notPrintInventoryInstances = data;
|
|
|
- },
|
|
|
- error: function (XMLHttpRequest, textStatus, errorThrown) {
|
|
|
- Common.processException(XMLHttpRequest, textStatus, errorThrown);
|
|
|
- },
|
|
|
- });
|
|
|
- },
|
|
|
- getNoPrintInventoryInstancePrint: function () {
|
|
|
- var _self = this;
|
|
|
- var documentNo = _self.notPrintDocumentNo;
|
|
|
- var inventoryName = _self.notPrintInventoryName;
|
|
|
- var inventoryCode = _self.notPrintInventoryCode;
|
|
|
- var inventoryType = _self.notPrintInventoryType;
|
|
|
- $.ajax({
|
|
|
- url: Common.getApiURL(
|
|
|
- 'InventoryInstancePrintResource/queryInventoryInstancePrint',
|
|
|
- ),
|
|
|
- async: true,
|
|
|
- dataType: 'json',
|
|
|
- type: 'post',
|
|
|
- data: {
|
|
|
- printed: false,
|
|
|
- documentNo: documentNo,
|
|
|
- inventoryName: inventoryName,
|
|
|
- inventoryCode: inventoryCode,
|
|
|
- inventoryType: inventoryType,
|
|
|
- },
|
|
|
- beforeSend: function (request) {
|
|
|
- Common.addTokenToRequest(request);
|
|
|
- },
|
|
|
- success: function (data) {
|
|
|
- _self.notPrintInventoryInstances = data;
|
|
|
- },
|
|
|
- error: function (XMLHttpRequest, textStatus, errorThrown) {
|
|
|
+ error: function(XMLHttpRequest, textStatus, errorThrown) {
|
|
|
Common.processException(XMLHttpRequest, textStatus, errorThrown);
|
|
|
},
|
|
|
});
|
|
|
},
|
|
|
|
|
|
- getPrintedInventoryInstancePrint: function () {
|
|
|
- var _self = this;
|
|
|
- var documentNo = _self.printedDocumentNo;
|
|
|
- var inventoryName = _self.printedInventoryName;
|
|
|
- var inventoryCode = _self.printedInventoryCode;
|
|
|
- var inventoryType = _self.printedInventoryType;
|
|
|
- $.ajax({
|
|
|
- url: Common.getApiURL(
|
|
|
- 'InventoryInstancePrintResource/queryPrintedInventoryInstancePrint',
|
|
|
- ),
|
|
|
- async: false,
|
|
|
- dataType: 'json',
|
|
|
- type: 'post',
|
|
|
- data: {
|
|
|
- printed: true,
|
|
|
- currentPage: _self.pagination.current_page,
|
|
|
- pageSize: _self.pagination.per_page,
|
|
|
- documentNo: documentNo,
|
|
|
- inventoryName: inventoryName,
|
|
|
- inventoryCode: inventoryCode,
|
|
|
- inventoryType: inventoryType,
|
|
|
- },
|
|
|
- beforeSend: function (request) {
|
|
|
- Common.addTokenToRequest(request);
|
|
|
- },
|
|
|
- success: function (data) {
|
|
|
- _self.printedInventoryInstances = data.inventoryInstancePrintDtos;
|
|
|
|
|
|
- _self.isShowPage = true;
|
|
|
- _self.printedCheckAll = false;
|
|
|
- _self.printedCheckboxModel.splice(
|
|
|
- 0,
|
|
|
- _self.printedCheckboxModel.length,
|
|
|
- );
|
|
|
- console.log(data);
|
|
|
- // 分页相关
|
|
|
- _self.pagination.total = data.totalCount;
|
|
|
- _self.pagination.last_page =
|
|
|
- data.totalCount % _self.pagination.per_page == 0
|
|
|
- ? data.totalCount / _self.pagination.per_page
|
|
|
- : Math.floor(data.totalCount / _self.pagination.per_page) + 1;
|
|
|
- },
|
|
|
- error: function (XMLHttpRequest, textStatus, errorThrown) {
|
|
|
- Common.processException(XMLHttpRequest, textStatus, errorThrown);
|
|
|
- },
|
|
|
- });
|
|
|
- },
|
|
|
- // 打印流程
|
|
|
- printReport: function (buttonStatus) {
|
|
|
+ /**
|
|
|
+ * 显示存货详细信息
|
|
|
+ * @param {Object} inventoryresult
|
|
|
+ */
|
|
|
+ showItem2: function(inventoryresult) {
|
|
|
var _self = this;
|
|
|
- var checkedNum;
|
|
|
- var recordIds;
|
|
|
- var id;
|
|
|
- if (buttonStatus == 0) {
|
|
|
- id = 283981;
|
|
|
- checkedNum = _self.notPrintCheckboxModel.length;
|
|
|
- recordIds = _self.notPrintCheckboxModel;
|
|
|
- } else if (buttonStatus == 1) {
|
|
|
- id = 283981;
|
|
|
- checkedNum = _self.printedCheckboxModel.length;
|
|
|
- recordIds = _self.printedCheckboxModel;
|
|
|
- } else {
|
|
|
- id = 284941;
|
|
|
- checkedNum = _self.printedCheckboxModel.length;
|
|
|
- recordIds = _self.printedCheckboxModel;
|
|
|
- }
|
|
|
- if (checkedNum == 0) {
|
|
|
- Notify.notice('提示', '请选择打印内容', false);
|
|
|
- } else {
|
|
|
- $.ajax({
|
|
|
- url: Common.getApiURL('ProcessReportResource/runProcessByIds/') + id,
|
|
|
- async: true,
|
|
|
- dataType: 'json',
|
|
|
- type: 'post',
|
|
|
- contentType: 'application/json; charset=utf-8',
|
|
|
- data: JSON.stringify(recordIds),
|
|
|
- beforeSend: function (request) {
|
|
|
- Common.addTokenToRequest(request);
|
|
|
- },
|
|
|
- success: function (data) {
|
|
|
- _self.refreshPurchaseOrderLineTable();
|
|
|
- console.log(data);
|
|
|
- _self.getNeedPrintCount();
|
|
|
- $('#print-modal').modal('hide');
|
|
|
- $('#pack-modal-download').modal('show');
|
|
|
- //_self.showDownloadModal(data);
|
|
|
- _self.reportResult = data.reportResults[0];
|
|
|
- },
|
|
|
- error: function (XMLHttpRequest, textStatus, errorThrown) {
|
|
|
- Common.processException(XMLHttpRequest, textStatus, errorThrown);
|
|
|
- },
|
|
|
- });
|
|
|
- }
|
|
|
+ _self.showInventory = inventoryresult;
|
|
|
+ // 查询生命周期数据
|
|
|
+ _self.getHistoryEvent2();
|
|
|
+ _self.getStockInfo();
|
|
|
},
|
|
|
- //下载Excel
|
|
|
- downloadExcel: function () {
|
|
|
- var _self = this;
|
|
|
- var url = '../..';
|
|
|
- var excelDownLoadUrl = _self.reportResult.excelDownLoadUrl;
|
|
|
- if (excelDownLoadUrl == undefined) {
|
|
|
- Notify.error('提示', '下载失败', false);
|
|
|
- } else {
|
|
|
- var ExcelUrl = url + '/' + excelDownLoadUrl;
|
|
|
- window.open(ExcelUrl);
|
|
|
- }
|
|
|
- },
|
|
|
- // 下载Pdf
|
|
|
- downloadPdf: function () {
|
|
|
- var _self = this;
|
|
|
- var url = '../..';
|
|
|
- var pdfDownLoadUrl = _self.reportResult.pdfDownLoadUrl;
|
|
|
- if (pdfDownLoadUrl == undefined) {
|
|
|
- Notify.error('提示', '下载失败', false);
|
|
|
- } else {
|
|
|
- var pdfUrl = url + '/' + pdfDownLoadUrl;
|
|
|
- window.open(pdfUrl);
|
|
|
- }
|
|
|
- },
|
|
|
- // 未打印全选
|
|
|
- notPrintCheckedAll: function () {
|
|
|
- var _self = this;
|
|
|
- if (event.currentTarget.checked) {
|
|
|
- _self.notPrintInventoryInstances.forEach(function (item) {
|
|
|
- _self.notPrintCheckboxModel.push(item.id);
|
|
|
- });
|
|
|
- } else {
|
|
|
- _self.notPrintCheckboxModel.splice(
|
|
|
- 0,
|
|
|
- this.notPrintCheckboxModel.length,
|
|
|
- );
|
|
|
+
|
|
|
+ callbackFun: function() {
|
|
|
+ if (this.showAssetInstance == undefined || this.showAssetInstance == '') {
|
|
|
+ return;
|
|
|
}
|
|
|
+ this.showItem(this.showAssetInstance);
|
|
|
},
|
|
|
- // 已打印全选
|
|
|
- printedCheckedAll: function () {
|
|
|
- var _self = this;
|
|
|
- if (event.currentTarget.checked) {
|
|
|
- _self.printedInventoryInstances.forEach(function (item) {
|
|
|
- _self.printedCheckboxModel.push(item.id);
|
|
|
- });
|
|
|
- } else {
|
|
|
- _self.printedCheckboxModel.splice(0, this.printedCheckboxModel.length);
|
|
|
- }
|
|
|
+ showImage: function(imageName) {
|
|
|
+ this.imageUrl = imageName;
|
|
|
+ this.modal = true;
|
|
|
},
|
|
|
|
|
|
- // 打印队列中未打印数量
|
|
|
- getNeedPrintCount: function () {
|
|
|
+ /**
|
|
|
+ * 查询存货的出入库记录
|
|
|
+ */
|
|
|
+ getHistoryEvent2: function() {
|
|
|
var _self = this;
|
|
|
$.ajax({
|
|
|
- url: Common.getApiURL(
|
|
|
- 'InventoryInstancePrintResource/queryInventoryInstancePrintCount',
|
|
|
- ),
|
|
|
- async: true,
|
|
|
- dataType: 'json',
|
|
|
+ url: Common.getApiURL('StockOutResource/getHistoryEventByInventory'),
|
|
|
type: 'post',
|
|
|
- beforeSend: function (request) {
|
|
|
- Common.addTokenToRequest(request);
|
|
|
- },
|
|
|
- success: function (data) {
|
|
|
- _self.notPrintCount = data;
|
|
|
- },
|
|
|
- error: function (XMLHttpRequest, textStatus, errorThrown) {
|
|
|
- Common.processException(XMLHttpRequest, textStatus, errorThrown);
|
|
|
- },
|
|
|
- });
|
|
|
- },
|
|
|
- changeQty: function (inventoryInstanceId, quantity) {
|
|
|
- var _self = this;
|
|
|
- _self.quantity = quantity;
|
|
|
- _self.inventoryInstanceId = inventoryInstanceId;
|
|
|
- $.ajax({
|
|
|
- url: Common.getApiURL('InventoryInstanceResource/quantity'),
|
|
|
- async: true,
|
|
|
dataType: 'json',
|
|
|
- type: 'post',
|
|
|
data: {
|
|
|
- inventoryInstanceId: inventoryInstanceId,
|
|
|
- quantity: quantity,
|
|
|
+ inventoryId: _self.showInventory.id,
|
|
|
+ startDate: _self.startDate,
|
|
|
+ endDate: _self.endDate,
|
|
|
},
|
|
|
- beforeSend: function (request) {
|
|
|
+ beforeSend: function(request) {
|
|
|
Common.addTokenToRequest(request);
|
|
|
},
|
|
|
- success: function (data) {
|
|
|
- $('#pack-modal-quantity').modal('show');
|
|
|
- $('#pack-modal').modal('hide');
|
|
|
+ success: function(data) {
|
|
|
+ console.log(data);
|
|
|
+ _self.historyEvents2 = data;
|
|
|
},
|
|
|
- error: function (XMLHttpRequest, textStatus, errorThrown) {
|
|
|
+ error: function(XMLHttpRequest, textStatus, errorThrown) {
|
|
|
Common.processException(XMLHttpRequest, textStatus, errorThrown);
|
|
|
},
|
|
|
});
|
|
|
},
|
|
|
- cancelChangeQty: function () {
|
|
|
- $('#pack-modal-quantity').modal('hide');
|
|
|
- $('#pack-modal').modal('show');
|
|
|
- $('body').css('overflow-y', 'hidden');
|
|
|
- $('#pack-modal').css('overflow-y', 'auto');
|
|
|
- },
|
|
|
- saveChangeQty: function () {
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 根据inventoryId获取库存信息
|
|
|
+ */
|
|
|
+ getStockInfo: function() {
|
|
|
var _self = this;
|
|
|
- var inventoryInstanceId = _self.inventoryInstanceId;
|
|
|
- var quantity = _self.quantity;
|
|
|
- if (quantity == '' || quantity < 0) {
|
|
|
- Notify.error('输入有误', '数量填写不正确', false);
|
|
|
- return;
|
|
|
- }
|
|
|
$.ajax({
|
|
|
- url: Common.getApiURL('InventoryInstanceResource/quantity'),
|
|
|
- async: true,
|
|
|
+ url: Common.getApiURL('StockOutResource/getStockInfoByInventory'),
|
|
|
+ type: 'GET',
|
|
|
dataType: 'json',
|
|
|
- type: 'post',
|
|
|
data: {
|
|
|
- inventoryInstanceId: inventoryInstanceId,
|
|
|
- quantity: quantity,
|
|
|
+ inventoryId: _self.showInventory.id,
|
|
|
},
|
|
|
- beforeSend: function (request) {
|
|
|
+ beforeSend: function(request) {
|
|
|
Common.addTokenToRequest(request);
|
|
|
},
|
|
|
- success: function (data) {
|
|
|
- _self.refreshPackModal(_self.purchaseOrderLineId);
|
|
|
- _self.refreshPurchaseOrderLineTable();
|
|
|
- $('#pack-modal-quantity').modal('hide');
|
|
|
- $('#pack-modal').modal('show');
|
|
|
- $('body').css('overflow-y', 'hidden');
|
|
|
- $('#pack-modal').css('overflow-y', 'auto');
|
|
|
+ success: function(data) {
|
|
|
+ console.log(data);
|
|
|
+ _self.stockInfos = data;
|
|
|
},
|
|
|
- error: function (XMLHttpRequest, textStatus, errorThrown) {
|
|
|
+ error: function(XMLHttpRequest, textStatus, errorThrown) {
|
|
|
Common.processException(XMLHttpRequest, textStatus, errorThrown);
|
|
|
},
|
|
|
});
|
|
|
},
|
|
|
- // 键盘回车事件
|
|
|
- keydown: function () {
|
|
|
- var _self = this;
|
|
|
- document.onkeydown = function (event) {
|
|
|
- var currentEvent = event || window.event || arguments[0];
|
|
|
- if (currentEvent && currentEvent.keyCode == 13) {
|
|
|
- currentEvent.preventDefault();
|
|
|
- _self.refreshPurchaseOrderLineTable();
|
|
|
- }
|
|
|
- };
|
|
|
+
|
|
|
+ // 获取图标
|
|
|
+ getHistoryIconSrc: function(title) {
|
|
|
+ var iconSrc = 'static/image/';
|
|
|
+ switch (title) {
|
|
|
+ case '资产盘点':
|
|
|
+ iconSrc += 'inventory.png';
|
|
|
+ break;
|
|
|
+ case '资产归还':
|
|
|
+ iconSrc += 'stockin.png';
|
|
|
+ break;
|
|
|
+ case '资产领用':
|
|
|
+ iconSrc += 'stockout.png';
|
|
|
+ break;
|
|
|
+ case '资产报失':
|
|
|
+ iconSrc += 'lost.png';
|
|
|
+ break;
|
|
|
+ case '资产报失找回':
|
|
|
+ iconSrc += 'lostRetrieve.png';
|
|
|
+ break;
|
|
|
+ case '资产保养':
|
|
|
+ iconSrc += 'maintain.png';
|
|
|
+ break;
|
|
|
+ case '资产维修':
|
|
|
+ iconSrc += 'repair.png';
|
|
|
+ break;
|
|
|
+ case '资产报废':
|
|
|
+ iconSrc += 'scrap.png';
|
|
|
+ break;
|
|
|
+ case '材料出库':
|
|
|
+ iconSrc += 'stockout.png';
|
|
|
+ break;
|
|
|
+ case '材料入库':
|
|
|
+ iconSrc += 'stockin.png';
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ return iconSrc;
|
|
|
},
|
|
|
},
|
|
|
};
|
|
|
</script>
|
|
|
-
|
|
|
<style scoped>
|
|
|
-.header {
|
|
|
- padding: 16px;
|
|
|
- background: #fff;
|
|
|
- box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
|
|
|
+.container {
|
|
|
+ padding: 20px;
|
|
|
}
|
|
|
|
|
|
-.form-container {
|
|
|
- margin-bottom: 24px;
|
|
|
+.form-card {
|
|
|
+ margin-top: 20px;
|
|
|
}
|
|
|
|
|
|
-.pagination-wrapper {
|
|
|
+.data-tabs {
|
|
|
margin-top: 24px;
|
|
|
- text-align: right;
|
|
|
}
|
|
|
|
|
|
-/* 表格样式优化 */
|
|
|
-:deep(.ant-table-thead > tr > th) {
|
|
|
- background: #fafafa;
|
|
|
- text-align: center;
|
|
|
+.image {
|
|
|
+ width: 78px;
|
|
|
+ height: 78px;
|
|
|
+ margin-right: 16px;
|
|
|
}
|
|
|
-</style>
|
|
|
+
|
|
|
+.event-time {
|
|
|
+ color: rgba(0, 0, 0, 0.45);
|
|
|
+}
|
|
|
+</style>
|
|
|
+
|