|
|
|
@ -4,19 +4,11 @@
|
|
|
|
|
<el-form :inline="true" :model="filterQuery" size="mini">
|
|
|
|
|
<el-row style="width: 100%">
|
|
|
|
|
<el-form-item class="query-form-item">
|
|
|
|
|
<el-select v-model="filterQuery.invStorageCode" placeholder="请选择当前仓库" clearable="true"
|
|
|
|
|
@change="invChange" size="mini">
|
|
|
|
|
<el-option
|
|
|
|
|
v-for="item in storageList"
|
|
|
|
|
:key="item.name"
|
|
|
|
|
:label="item.name"
|
|
|
|
|
:value="item.code">
|
|
|
|
|
<span style="float: left">{{ item.name }}</span>
|
|
|
|
|
</el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
<el-input placeholder="请输入养护记录号" v-model="filterQuery.orderId"
|
|
|
|
|
clearable="true"></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item class="query-form-item">
|
|
|
|
|
<el-select v-model="filterQuery.invWarehouseCode" placeholder="请选择当前分库" clearable="true"
|
|
|
|
|
<el-select v-model="filterQuery.invWarehouseCode" placeholder="请选择当前仓库" clearable="true"
|
|
|
|
|
@change="invWarehouseChange" size="mini">
|
|
|
|
|
<el-option
|
|
|
|
|
v-for="item in subInvList"
|
|
|
|
@ -50,8 +42,8 @@
|
|
|
|
|
>查询
|
|
|
|
|
</el-button
|
|
|
|
|
>
|
|
|
|
|
<el-button type="primary" icon="search" @click="goodsPlacement"
|
|
|
|
|
>摆放
|
|
|
|
|
<el-button type="primary" icon="search" @click="addMAOrder"
|
|
|
|
|
>新增养护记录
|
|
|
|
|
</el-button
|
|
|
|
|
>
|
|
|
|
|
</el-button-group>
|
|
|
|
@ -59,199 +51,115 @@
|
|
|
|
|
</el-row>
|
|
|
|
|
</el-form>
|
|
|
|
|
|
|
|
|
|
<el-table v-loading="loading" :data="list" style="width: 100%">
|
|
|
|
|
<el-table v-loading="loading" :data="list" style="width: 100%"
|
|
|
|
|
highlight-current-row="true"
|
|
|
|
|
@current-change="handleChange"
|
|
|
|
|
>
|
|
|
|
|
<el-table-column label="序号" type="index" fixed></el-table-column>
|
|
|
|
|
<el-table-column label="仓库" prop="invStorageName" width="180"></el-table-column>
|
|
|
|
|
<el-table-column label="分库" prop="invWarehouseName" width="180"></el-table-column>
|
|
|
|
|
<el-table-column label="养护记录号" prop="orderId" width="180"></el-table-column>
|
|
|
|
|
<el-table-column label="仓库" prop="invWarehouseName" width="180"></el-table-column>
|
|
|
|
|
<el-table-column label="货位" prop="invSpaceName" width="180"></el-table-column>
|
|
|
|
|
<el-table-column label="产品标识" prop="nameCode" width="120"></el-table-column>
|
|
|
|
|
<el-table-column label="产品名称" prop="productName" width="200"></el-table-column>
|
|
|
|
|
<el-table-column label="规格型号" prop="ggxh" width="180" show-overflow-tooltip></el-table-column>
|
|
|
|
|
<el-table-column label="批次号" prop="batchNo" width="120"></el-table-column>
|
|
|
|
|
<el-table-column label="生产日期" prop="productionDate" width="120"></el-table-column>
|
|
|
|
|
<el-table-column label="失效日期" prop="expireDate" width="120"></el-table-column>
|
|
|
|
|
<el-table-column label="批准文号" prop="zczbhhzbapzbh" v-if="showSup" show-overflow-tooltip
|
|
|
|
|
width="120"></el-table-column>
|
|
|
|
|
<el-table-column label="生产厂家" prop="ylqxzcrbarmc" v-if="showSup" show-overflow-tooltip
|
|
|
|
|
width="120"></el-table-column>
|
|
|
|
|
</el-table>
|
|
|
|
|
</el-card>
|
|
|
|
|
|
|
|
|
|
<el-pagination
|
|
|
|
|
:page-size="filterQuery.limit"
|
|
|
|
|
:current-page="filterQuery.page"
|
|
|
|
|
@current-change="handleCurrentChange"
|
|
|
|
|
layout="prev, pager, next"
|
|
|
|
|
:total="total"
|
|
|
|
|
></el-pagination>
|
|
|
|
|
|
|
|
|
|
<el-dialog
|
|
|
|
|
title="货物摆放"
|
|
|
|
|
:visible.sync="placeDialogVisible"
|
|
|
|
|
width="70%"
|
|
|
|
|
:close-on-click-modal="false"
|
|
|
|
|
:close-on-press-escape="false"
|
|
|
|
|
v-if="placeDialogVisible"
|
|
|
|
|
>
|
|
|
|
|
<el-form :model="formData" :rules="formRules" ref="dataForm">
|
|
|
|
|
<el-button-group style="display: flex;margin: -50px 0 10px 80%; height: 35px">
|
|
|
|
|
<el-button
|
|
|
|
|
type="primary"
|
|
|
|
|
@click.native="saveData()"
|
|
|
|
|
>提交
|
|
|
|
|
</el-button
|
|
|
|
|
>
|
|
|
|
|
</el-button-group>
|
|
|
|
|
<el-row :gutter="20" style="margin-top: 0px">
|
|
|
|
|
<el-col :span="3">
|
|
|
|
|
<div class="ao-text">
|
|
|
|
|
<span>当前仓库:</span>
|
|
|
|
|
</div>
|
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
|
|
<el-col :span="7">
|
|
|
|
|
<el-form-item prop="locStorageCode">
|
|
|
|
|
<el-select v-model="formData.invStorageCode" placeholder="当前仓库信息"
|
|
|
|
|
@change="locInChange"
|
|
|
|
|
:disabled="codeArray.length>0"
|
|
|
|
|
clearable>
|
|
|
|
|
<el-option
|
|
|
|
|
v-for="item in storageList"
|
|
|
|
|
:key="item.name"
|
|
|
|
|
:label="item.name"
|
|
|
|
|
:value="item.code">
|
|
|
|
|
<span style="float: left">{{ item.name }}</span>
|
|
|
|
|
</el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<el-col :span="3">
|
|
|
|
|
<div class="ao-text">
|
|
|
|
|
<span>当前分库:</span>
|
|
|
|
|
</div>
|
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
|
|
<el-col :span="7">
|
|
|
|
|
<el-form-item prop="invWarehouseCode">
|
|
|
|
|
<el-select v-model="formData.invWarehouseCode" placeholder="当前分库信息"
|
|
|
|
|
:disabled="codeArray.length>0"
|
|
|
|
|
@change="subStorageChange"
|
|
|
|
|
clearable>
|
|
|
|
|
<el-option
|
|
|
|
|
v-for="item in formSubInvList"
|
|
|
|
|
:key="item.name"
|
|
|
|
|
:label="item.name"
|
|
|
|
|
:value="item.code">
|
|
|
|
|
<span style="float: left">{{ item.name }}</span>
|
|
|
|
|
</el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<el-row :gutter="20">
|
|
|
|
|
<el-col :span="3">
|
|
|
|
|
<div class="ao-text">
|
|
|
|
|
<span>当前货位:</span>
|
|
|
|
|
</div>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="7">
|
|
|
|
|
<el-form-item class="query-form-item" prop="invSpaceCode"
|
|
|
|
|
<el-table-column label="养护日期" prop="createTime" width="120"></el-table-column>
|
|
|
|
|
<el-table-column label="养护人" prop="createUser" width="120"></el-table-column>
|
|
|
|
|
<el-table-column label="状态" prop="status" show-overflow-tooltip width="120">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-tag>{{ statusMap[scope.row.status] }}</el-tag>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="操作" width="180" fixed="right">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-button
|
|
|
|
|
type="text"
|
|
|
|
|
size="small"
|
|
|
|
|
@click.native.stop="auditOrder(scope.row)"
|
|
|
|
|
>审核
|
|
|
|
|
</el-button
|
|
|
|
|
>
|
|
|
|
|
<el-select v-model="formData.invSpaceCode" placeholder="当前货位信息"
|
|
|
|
|
:disabled="codeArray.length>0"
|
|
|
|
|
clearable>
|
|
|
|
|
<el-option
|
|
|
|
|
v-for="item in formSpaceList"
|
|
|
|
|
:key="item.name"
|
|
|
|
|
:label="item.name"
|
|
|
|
|
:value="item.code">
|
|
|
|
|
<span style="float: left">{{ item.name }}</span>
|
|
|
|
|
</el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
|
|
|
|
|
<el-row :gutter="20" style="margin-top: 12px">
|
|
|
|
|
<el-col :span="2">
|
|
|
|
|
<div class="ao-text">
|
|
|
|
|
<el-link
|
|
|
|
|
target="_blank">{{ scanText }}
|
|
|
|
|
</el-link>
|
|
|
|
|
</div>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="16">
|
|
|
|
|
<el-form-item prop="code">
|
|
|
|
|
<el-input
|
|
|
|
|
id="inputer"
|
|
|
|
|
@focus="getInputFocus($event)"
|
|
|
|
|
@keypress.enter.native="enterKey($event)"
|
|
|
|
|
ref='inputRef'
|
|
|
|
|
style="ime-mode:disabled"
|
|
|
|
|
type="tel"
|
|
|
|
|
v-model="formData.code"
|
|
|
|
|
></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="2">
|
|
|
|
|
<el-button
|
|
|
|
|
type="primary"
|
|
|
|
|
type="text"
|
|
|
|
|
size="small"
|
|
|
|
|
@click.native.stop="addCode()"
|
|
|
|
|
style="height: 31px; margin-left: 20px"
|
|
|
|
|
>添加
|
|
|
|
|
@click.native.stop="deleteDialog(scope.row.id)"
|
|
|
|
|
>删除
|
|
|
|
|
</el-button
|
|
|
|
|
>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
</el-table>
|
|
|
|
|
|
|
|
|
|
<el-row :gutter="20">
|
|
|
|
|
<el-col :span="14" style="margin-left: 40px">
|
|
|
|
|
<el-pagination
|
|
|
|
|
:page-size="filterQuery.limit"
|
|
|
|
|
:current-page="filterQuery.page"
|
|
|
|
|
@current-change="handleCurrentChange"
|
|
|
|
|
layout="prev, pager, next"
|
|
|
|
|
:total="total"
|
|
|
|
|
></el-pagination>
|
|
|
|
|
</el-card>
|
|
|
|
|
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="3">
|
|
|
|
|
<div class="text item" style="margin-left: 30px"> 条码数量:{{ codeArray.length }}
|
|
|
|
|
</div>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
|
|
|
|
|
<el-table v-loading="loading" :data="codeArray" style="width: 100%;margin-top: 20px;"
|
|
|
|
|
max-height="300" height="300" ref="multipleTable">
|
|
|
|
|
<el-table-column label="序号" type="index" width="50"></el-table-column>
|
|
|
|
|
<el-table-column width="300" label="条码" prop="code" show-overflow-tooltip>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="操作" fixed="right" width="150">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-button
|
|
|
|
|
type="text"
|
|
|
|
|
size="small"
|
|
|
|
|
@click.stop="true"
|
|
|
|
|
@click.native="deleteCodeArray(scope.$index, scope.row)"
|
|
|
|
|
>删除
|
|
|
|
|
</el-button
|
|
|
|
|
>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
</el-table>
|
|
|
|
|
</el-form>
|
|
|
|
|
</el-dialog>
|
|
|
|
|
<el-card>
|
|
|
|
|
<el-table v-loading="loading" :data="detailList" style="width: 100%; margin-top: 10px;">
|
|
|
|
|
<el-table-column label="序号" type="index" width="50"></el-table-column>
|
|
|
|
|
<el-table-column label="条码" width="150" prop="code"></el-table-column>
|
|
|
|
|
<el-table-column width="150"
|
|
|
|
|
label="产品通用名"
|
|
|
|
|
prop="productName"
|
|
|
|
|
show-overflow-tooltip
|
|
|
|
|
></el-table-column>
|
|
|
|
|
<el-table-column width="150" label="规格型号" prop="ggxh" show-overflow-tooltip></el-table-column>
|
|
|
|
|
<el-table-column width="150" label="批次号" prop="batchNo"></el-table-column>
|
|
|
|
|
<el-table-column width="150" label="养护数量" prop="count" show-overflow-tooltip></el-table-column>
|
|
|
|
|
<el-table-column width="150" label="养护状态" prop="maintenanceStatus">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-radio :disabled="scope.$index !== currentIndex" v-model="scope.row.maintenanceStatus"
|
|
|
|
|
:label="0">未养护
|
|
|
|
|
</el-radio>
|
|
|
|
|
<el-radio :disabled="scope.$index !== currentIndex" v-model="scope.row.maintenanceStatus"
|
|
|
|
|
:label="1">已养护
|
|
|
|
|
</el-radio>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column width="150" label="设备状态" prop="deviceStatus">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-radio v-model="scope.row.deviceStatus" :label="1">
|
|
|
|
|
正常
|
|
|
|
|
</el-radio>
|
|
|
|
|
<el-radio v-model="scope.row.deviceStatus" :label="0">
|
|
|
|
|
异常
|
|
|
|
|
</el-radio>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column width="200" label="养护备注" prop="remark">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-input v-model="scope.row.remark"></el-input>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column width="180" label="生产日期(yyMMdd)" prop="produceDate"></el-table-column>
|
|
|
|
|
<el-table-column width="180" label="失效日期(yyMMdd)" prop="expireDate"
|
|
|
|
|
show-overflow-tooltip></el-table-column>
|
|
|
|
|
<el-table-column width="250" label="注册/备案凭证号" prop="zczbhhzbapzbh"
|
|
|
|
|
show-overflow-tooltip></el-table-column>
|
|
|
|
|
<el-table-column width="150" label="生产厂家" prop="ylqxzcrbarmc"
|
|
|
|
|
show-overflow-tooltip></el-table-column>
|
|
|
|
|
</el-table>
|
|
|
|
|
|
|
|
|
|
<el-pagination
|
|
|
|
|
:page-size="detailQuery.limit"
|
|
|
|
|
:current-page="detailQuery.page"
|
|
|
|
|
@current-change="handleCurrentDetailChange"
|
|
|
|
|
layout="prev, pager, next"
|
|
|
|
|
:total="detailTotal"
|
|
|
|
|
></el-pagination>
|
|
|
|
|
</el-card>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
import draggable from "vuedraggable";
|
|
|
|
|
import {filterUplLocInv} from "@/api/basic/invWarehouse";
|
|
|
|
|
import {filterSubByInv} from "@/api/basic/invSubWarehouse";
|
|
|
|
|
import {filterSubAll} from "@/api/basic/invSubWarehouse";
|
|
|
|
|
import {getSpaceCodeList} from "@/api/inventory/invSpace";
|
|
|
|
|
import {getPlacementDetailList, bindInvSpace, checkCodeSpace} from "@/api/inventory/InvProducts";
|
|
|
|
|
import {isBlank} from "@/utils/strUtil";
|
|
|
|
|
import {userInfo} from "@/api/auth/login";
|
|
|
|
|
import {getMAOrderList} from "@/api/inventory/invMAOrder";
|
|
|
|
|
import {getMAOrderList, getMAOrderDetailList, updateStatus, deleteOrder} from "@/api/inventory/invMAOrder";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
@ -259,82 +167,59 @@ export default {
|
|
|
|
|
return {
|
|
|
|
|
filterQuery: {
|
|
|
|
|
invWarehouseCode: null,
|
|
|
|
|
page: 1,
|
|
|
|
|
limit: 20,
|
|
|
|
|
invStorageCode: null,
|
|
|
|
|
invSpaceCode: null,
|
|
|
|
|
status: 1,
|
|
|
|
|
orderId: null,
|
|
|
|
|
page: 1,
|
|
|
|
|
limit: 20
|
|
|
|
|
},
|
|
|
|
|
detailQuery: {
|
|
|
|
|
code: null,
|
|
|
|
|
productIdFk: null,
|
|
|
|
|
orderIdFk: null,
|
|
|
|
|
page: 1,
|
|
|
|
|
limit: 20,
|
|
|
|
|
},
|
|
|
|
|
list: [],
|
|
|
|
|
total: 0,
|
|
|
|
|
detailTotal: 0,
|
|
|
|
|
detailList: [],
|
|
|
|
|
loading: false,
|
|
|
|
|
index: null,
|
|
|
|
|
dialogTableVisible: false,
|
|
|
|
|
formLoading: false,
|
|
|
|
|
dialogVisible: false,
|
|
|
|
|
deleteLoading: false,
|
|
|
|
|
idQuery: null,
|
|
|
|
|
showSup: false,
|
|
|
|
|
fromOptions: [],
|
|
|
|
|
storageOptions: [],
|
|
|
|
|
storageList: [],
|
|
|
|
|
subInvList: [],
|
|
|
|
|
spaceCodeList: [],
|
|
|
|
|
formSubInvList: [],
|
|
|
|
|
formSpaceList: [],
|
|
|
|
|
placeDialogVisible: false,
|
|
|
|
|
formData: {
|
|
|
|
|
invStorageCode: null,
|
|
|
|
|
invWarehouseCode: null,
|
|
|
|
|
invSpaceCode: null,
|
|
|
|
|
code: null,
|
|
|
|
|
codeArray: []
|
|
|
|
|
statusMap: {
|
|
|
|
|
0: "草稿",
|
|
|
|
|
1: "未审核",
|
|
|
|
|
2: "已完成"
|
|
|
|
|
},
|
|
|
|
|
formRules: [],
|
|
|
|
|
codeArray: [],
|
|
|
|
|
scanText: "扫码录入:",
|
|
|
|
|
originCode: null,
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
components: {
|
|
|
|
|
draggable,
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
onReset() {
|
|
|
|
|
this.$router.push({
|
|
|
|
|
path: "",
|
|
|
|
|
});
|
|
|
|
|
this.filterQuery = {
|
|
|
|
|
invStorageCode: null,
|
|
|
|
|
invWarehouseCode: null,
|
|
|
|
|
invSpaceCode: null,
|
|
|
|
|
status: 1,
|
|
|
|
|
orderId: null,
|
|
|
|
|
page: 1,
|
|
|
|
|
limit: 20,
|
|
|
|
|
limit: 20
|
|
|
|
|
};
|
|
|
|
|
this.getList();
|
|
|
|
|
},
|
|
|
|
|
onSubmit() {
|
|
|
|
|
this.getList();
|
|
|
|
|
},
|
|
|
|
|
handleSizeChange(val) {
|
|
|
|
|
this.filterQuery.limit = val;
|
|
|
|
|
this.getList();
|
|
|
|
|
},
|
|
|
|
|
handleCurrentChange(val) {
|
|
|
|
|
this.filterQuery.page = val;
|
|
|
|
|
this.getList();
|
|
|
|
|
},
|
|
|
|
|
closeDialog() {
|
|
|
|
|
this.getList();
|
|
|
|
|
},
|
|
|
|
|
getList() {
|
|
|
|
|
this.loading = true
|
|
|
|
|
getPlacementDetailList(this.filterQuery).then((res) => {
|
|
|
|
|
this.detailList = [];
|
|
|
|
|
this.detailTotal = 0;
|
|
|
|
|
getMAOrderList(this.filterQuery).then((res) => {
|
|
|
|
|
this.loading = false;
|
|
|
|
|
if (res.code === 20000) {
|
|
|
|
|
this.list = res.data.list || [];
|
|
|
|
@ -343,35 +228,34 @@ export default {
|
|
|
|
|
this.list = [];
|
|
|
|
|
this.total = 0;
|
|
|
|
|
}
|
|
|
|
|
}).catch((error) => {
|
|
|
|
|
this.loading = false;
|
|
|
|
|
this.list = [];
|
|
|
|
|
this.total = 0;
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
getStorage() {
|
|
|
|
|
this.storageList = [];
|
|
|
|
|
filterUplLocInv()
|
|
|
|
|
.then((response) => {
|
|
|
|
|
this.storageList = response.data || [];
|
|
|
|
|
})
|
|
|
|
|
.catch(() => {
|
|
|
|
|
});
|
|
|
|
|
handleChange(row) {
|
|
|
|
|
this.detailQuery.orderIdFk = row.orderId;
|
|
|
|
|
this.detailQuery.page = 1;
|
|
|
|
|
},
|
|
|
|
|
invChange() {
|
|
|
|
|
this.filterQuery.invWarehouseCode = null;
|
|
|
|
|
this.filterQuery.invSpaceCode = null;
|
|
|
|
|
this.subInvList = [];
|
|
|
|
|
this.spaceCodeList = [];
|
|
|
|
|
let query = {
|
|
|
|
|
pcode: this.filterQuery.invStorageCode
|
|
|
|
|
};
|
|
|
|
|
filterSubByInv(query)
|
|
|
|
|
.then((response) => {
|
|
|
|
|
this.subInvList = response.data || [];
|
|
|
|
|
})
|
|
|
|
|
.catch(() => {
|
|
|
|
|
});
|
|
|
|
|
getDetailList() {
|
|
|
|
|
getMAOrderDetailList(this.detailQuery).then((res) => {
|
|
|
|
|
if (res.code === 20000) {
|
|
|
|
|
this.detailList = res.data.list || [];
|
|
|
|
|
this.detailTotal = res.data.total || 0;
|
|
|
|
|
} else {
|
|
|
|
|
this.detailList = [];
|
|
|
|
|
this.detailTotal = 0;
|
|
|
|
|
}
|
|
|
|
|
}).catch(() => {
|
|
|
|
|
this.detailList = [];
|
|
|
|
|
this.detailTotal = 0;
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
handleCurrentDetailChange(val) {
|
|
|
|
|
this.detailQuery.page = val;
|
|
|
|
|
this.getDetailList();
|
|
|
|
|
},
|
|
|
|
|
getAllWarehouse() {
|
|
|
|
|
filterSubAll().then((res) => {
|
|
|
|
|
this.subInvList = res.data || [];
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
invWarehouseChange() {
|
|
|
|
|
this.filterQuery.invSpaceCode = null;
|
|
|
|
@ -385,159 +269,55 @@ export default {
|
|
|
|
|
this.spaceCodeList = res.data || [];
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
goodsPlacement() {
|
|
|
|
|
this.placeDialogVisible = true;
|
|
|
|
|
this.formData = {
|
|
|
|
|
code: null,
|
|
|
|
|
invStorageCode: null,
|
|
|
|
|
invWarehouseCode: null,
|
|
|
|
|
invSpaceCode: null
|
|
|
|
|
};
|
|
|
|
|
this.codeArray = [];
|
|
|
|
|
},
|
|
|
|
|
saveData() {
|
|
|
|
|
if (isBlank(this.formData.invStorageCode) || isBlank(this.formData.invWarehouseCode)
|
|
|
|
|
|| isBlank(this.formData.invSpaceCode)) {
|
|
|
|
|
this.$message.warning("请选择仓库和货位信息");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if (this.codeArray.length === 0) {
|
|
|
|
|
this.$message.warning("请扫描需要摆放的货物");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
this.formData.codeArray = [];
|
|
|
|
|
this.codeArray.forEach(item => {
|
|
|
|
|
this.formData.codeArray.push(item.code);
|
|
|
|
|
})
|
|
|
|
|
bindInvSpace(this.formData).then((res) => {
|
|
|
|
|
if (res.code === 20000) {
|
|
|
|
|
this.$message.success("绑定成功");
|
|
|
|
|
this.placeDialogVisible = false;
|
|
|
|
|
this.getList();
|
|
|
|
|
} else {
|
|
|
|
|
this.$message.error("绑定失败");
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
deleteCodeArray(index, row) {
|
|
|
|
|
for (let i = 0; i < this.codeArray.length; i++) {
|
|
|
|
|
if (this.codeArray[i] === row) {
|
|
|
|
|
this.codeArray.splice(i, 1);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
getInputFocus(event) {
|
|
|
|
|
event.currentTarget.select();
|
|
|
|
|
},
|
|
|
|
|
enterKey(event) {
|
|
|
|
|
this.checkSuccess = true;
|
|
|
|
|
let tQuery = {
|
|
|
|
|
code: this.formData.code.trim(),
|
|
|
|
|
invStorageCode: this.formData.invStorageCode,
|
|
|
|
|
invWarehouseCode: this.formData.invWarehouseCode,
|
|
|
|
|
invSpaceCode: this.formData.invSpaceCode
|
|
|
|
|
}
|
|
|
|
|
this.addCode(event);
|
|
|
|
|
this.$refs.inputRef.focus();
|
|
|
|
|
this.$refs.inputRef.select();
|
|
|
|
|
},
|
|
|
|
|
addCode(event) {
|
|
|
|
|
this.originCode = "";
|
|
|
|
|
if (event != null) {
|
|
|
|
|
event.target.select();
|
|
|
|
|
}
|
|
|
|
|
this.actionEnable = true;
|
|
|
|
|
this.$refs.inputRef.select();
|
|
|
|
|
if (isBlank(this.formData.invStorageCode)) {
|
|
|
|
|
this.$message.error('当前仓库不能为空');
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (isBlank(this.formData.invWarehouseCode)) {
|
|
|
|
|
this.$message.error('当前分库不能为空');
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (isBlank(this.formData.invSpaceCode)) {
|
|
|
|
|
this.$message.error('当前货位不能为空');
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
this.formData.code = this.formData.code.trim();
|
|
|
|
|
if (this.$isBlank(this.formData.code)) return;
|
|
|
|
|
let tQuery = Object.assign(JSON.parse(JSON.stringify(this.formData)));
|
|
|
|
|
this.checkCode(tQuery);
|
|
|
|
|
this.$refs.inputRef.select();
|
|
|
|
|
},
|
|
|
|
|
locInChange() {
|
|
|
|
|
this.formData.invWarehouseCode = null;
|
|
|
|
|
this.formData.invSpaceCode = null;
|
|
|
|
|
this.formSubInvList = [];
|
|
|
|
|
this.formSpaceList = [];
|
|
|
|
|
let params = {pcode: this.formData.invStorageCode};
|
|
|
|
|
filterSubByInv(params).then((res) => {
|
|
|
|
|
this.formSubInvList = res.data || [];
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
subStorageChange() {
|
|
|
|
|
this.formData.invSpaceCode = null;
|
|
|
|
|
this.formSpaceList = [];
|
|
|
|
|
let params = {
|
|
|
|
|
invStorageCode: this.formData.invStorageCode,
|
|
|
|
|
invWarehouseCode: this.formData.invWarehouseCode,
|
|
|
|
|
status: true
|
|
|
|
|
};
|
|
|
|
|
getSpaceCodeList(params).then((res) => {
|
|
|
|
|
this.formSpaceList = res.data || [];
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
checkCode(tQuery) {
|
|
|
|
|
//检验是否重复添加
|
|
|
|
|
let flag = false;
|
|
|
|
|
this.codeArray.forEach(item => {
|
|
|
|
|
if (item.code === this.formData.code) {
|
|
|
|
|
this.$message.error("重复条码!");
|
|
|
|
|
flag = true;
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
if (flag) {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
//校验此条码是否已经被绑定到其他货位,如已被绑定,则提示,点击确定之后,重置此库存数据的仓库和分库数据
|
|
|
|
|
checkCodeSpace(tQuery).then((res) => {
|
|
|
|
|
if (res.code === 20000) {
|
|
|
|
|
this.codeArray.push({code: this.formData.code});
|
|
|
|
|
} else if (res.code === 8) {
|
|
|
|
|
this.loading = false;
|
|
|
|
|
this.$message.error(res.message);
|
|
|
|
|
} else if (res.code === 7) {
|
|
|
|
|
this.$confirm(res.data, '提示', {
|
|
|
|
|
confirmButtonText: '确定',
|
|
|
|
|
cancelButtonText: '取消',
|
|
|
|
|
type: 'warning'
|
|
|
|
|
}).then(() => {
|
|
|
|
|
this.codeArray.push(this.formData.code);
|
|
|
|
|
}).catch(() => {
|
|
|
|
|
this.loading = false;
|
|
|
|
|
this.$message({
|
|
|
|
|
type: 'info',
|
|
|
|
|
message: '已取消'
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
auditOrder(row) {
|
|
|
|
|
this.$confirm('请选择审核意见', '提示', {
|
|
|
|
|
confirmButtonText: '确定',
|
|
|
|
|
cancelButtonText: '取消',
|
|
|
|
|
type: 'warning',
|
|
|
|
|
center: true
|
|
|
|
|
}).then(() => {
|
|
|
|
|
let params = {
|
|
|
|
|
id: row.id,
|
|
|
|
|
status: 2
|
|
|
|
|
};
|
|
|
|
|
updateStatus(params).then((res) => {
|
|
|
|
|
if (res.code === 20000) {
|
|
|
|
|
this.$message.success("审核通过!");
|
|
|
|
|
this.getList();
|
|
|
|
|
} else {
|
|
|
|
|
this.$message.error(res.message);
|
|
|
|
|
}
|
|
|
|
|
}).catch((error) => {
|
|
|
|
|
this.$message.error(error.message);
|
|
|
|
|
})
|
|
|
|
|
}).catch(() => {
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
deleteDialog(id) {
|
|
|
|
|
this.$confirm('是否确认删除此条养护记录?', '提示', {
|
|
|
|
|
confirmButtonText: '确定',
|
|
|
|
|
cancelButtonText: '取消',
|
|
|
|
|
type: 'warning'
|
|
|
|
|
}).then(() => {
|
|
|
|
|
let params = {id: id};
|
|
|
|
|
deleteOrder(params).then((res) => {
|
|
|
|
|
if (res.code === 20000) {
|
|
|
|
|
this.$message.success("删除成功");
|
|
|
|
|
this.getList();
|
|
|
|
|
this.detailList = [];
|
|
|
|
|
this.detailTotal = 0;
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}).catch(() => {
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
created() {
|
|
|
|
|
this.getStorage();
|
|
|
|
|
this.getAllWarehouse();
|
|
|
|
|
//获取用户默认仓库信息
|
|
|
|
|
userInfo().then((res) => {
|
|
|
|
|
if (res.code === 20000) {
|
|
|
|
|
if (!isBlank(res.data.locInvCode)) {
|
|
|
|
|
this.filterQuery.invStorageCode = res.data.locInvCode;
|
|
|
|
|
this.invChange();
|
|
|
|
|
this.filterQuery.invWarehouseCode = res.data.locSubInvCode;
|
|
|
|
|
this.invWarehouseChange();
|
|
|
|
|
}
|
|
|
|
|