|
|
|
@ -1,48 +1,127 @@
|
|
|
|
|
<template>
|
|
|
|
|
<div>
|
|
|
|
|
<el-card class="el-card">
|
|
|
|
|
<el-form :model="filterQuery" class="query-form" size="mini" :inline="true">
|
|
|
|
|
<el-form-item class="query-form-item" label="仓库:">
|
|
|
|
|
<el-select v-model="filterQuery.invCode" placeholder="请选择仓库" clearable="true"
|
|
|
|
|
@change="invChange"
|
|
|
|
|
>
|
|
|
|
|
<el-option
|
|
|
|
|
v-for="item in invList"
|
|
|
|
|
:key="item.name"
|
|
|
|
|
:label="item.name"
|
|
|
|
|
:value="item.code">
|
|
|
|
|
<span style="float: left">{{ item.name }}</span>
|
|
|
|
|
</el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item class="query-form-item" label="货位:">
|
|
|
|
|
<el-select v-model="filterQuery.invSpaceCode" placeholder="请选择货位" clearable="true"
|
|
|
|
|
>
|
|
|
|
|
<el-option
|
|
|
|
|
v-for="item in spaceList"
|
|
|
|
|
:key="item.name"
|
|
|
|
|
:label="item.name"
|
|
|
|
|
:value="item.code">
|
|
|
|
|
<span style="float: left">{{ item.name }}</span>
|
|
|
|
|
</el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item>
|
|
|
|
|
<el-button-group style="margin-left: 10px;display:flex;">
|
|
|
|
|
<el-button type="primary" icon="el-icon-refresh" @click="onReset">重置</el-button>
|
|
|
|
|
<el-button type="primary" icon="el-icon-search" @click="onSubmit">查询</el-button>
|
|
|
|
|
<el-button type="primary" icon="el-icon-box" @click="invPlace(1)">按物资上架</el-button>
|
|
|
|
|
<el-button type="primary" icon="el-icon-box" @click="invPlace(2)">按单上架</el-button>
|
|
|
|
|
</el-button-group>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form :model="filterQuery" class="query-form" size="mini" label-width="100px" v-show="showSearch">
|
|
|
|
|
<el-row>
|
|
|
|
|
<el-col :span="18">
|
|
|
|
|
<el-form-item class="query-form-item" label="UDI码:">
|
|
|
|
|
<el-input v-model="filterQuery.code"
|
|
|
|
|
placeholder="请扫描或输入UDI码"
|
|
|
|
|
ref="inputRef"
|
|
|
|
|
clearable
|
|
|
|
|
style="width: 97%"
|
|
|
|
|
@keyup.enter.native="keyup_submit($event)"></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
|
|
|
|
|
<el-row>
|
|
|
|
|
<el-col :span="6">
|
|
|
|
|
<el-form-item class="query-form-item" label="仓库:">
|
|
|
|
|
<el-select v-model="filterQuery.invCode" placeholder="请选择仓库" clearable="true"
|
|
|
|
|
@change="invChange"
|
|
|
|
|
style="width: 90%"
|
|
|
|
|
>
|
|
|
|
|
<el-option
|
|
|
|
|
v-for="item in invList"
|
|
|
|
|
: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="6">
|
|
|
|
|
<el-form-item class="query-form-item" label="货位:">
|
|
|
|
|
<el-select v-model="filterQuery.invSpaceCode" placeholder="请选择货位" clearable="true"
|
|
|
|
|
@change="getList"
|
|
|
|
|
style="width: 90%"
|
|
|
|
|
>
|
|
|
|
|
<el-option
|
|
|
|
|
v-for="item in spaceList"
|
|
|
|
|
: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="6">
|
|
|
|
|
<el-form-item class="query-form-item" label="上架方式:">
|
|
|
|
|
<el-select v-model="filterQuery.type" placeholder="请选择上架方式" clearable="true"
|
|
|
|
|
@change="typeChange"
|
|
|
|
|
style="width: 90%"
|
|
|
|
|
>
|
|
|
|
|
<el-option :value="1" label="按物资上架"></el-option>
|
|
|
|
|
<el-option :value="2" label="按单上架"></el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="6">
|
|
|
|
|
<el-form-item class="query-form-item" label="单号:">
|
|
|
|
|
<el-input v-model="filterQuery.orderId" :disabled="filterQuery.type !== 2" placeholder="请输入单号"
|
|
|
|
|
clearable style="width: 90%"></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
|
|
|
|
|
<el-row>
|
|
|
|
|
<el-col :span="6">
|
|
|
|
|
<el-form-item class="query-form-item" label="产品名称:">
|
|
|
|
|
<el-input v-model="filterQuery.productName" placeholder="请输入产品名称" clearable
|
|
|
|
|
style="width: 90%"></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="6">
|
|
|
|
|
<el-form-item class="query-form-item" label="产品标识:">
|
|
|
|
|
<el-input v-model="filterQuery.nameCode" placeholder="请输入产品标识" clearable
|
|
|
|
|
style="width: 90%"></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="6">
|
|
|
|
|
<el-form-item class="query-form-item" label="批次号:">
|
|
|
|
|
<el-input v-model="filterQuery.batchNo" placeholder="请输入批次号" clearable
|
|
|
|
|
style="width: 90%"></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="6">
|
|
|
|
|
<el-form-item class="query-form-item" label="注册备案号:">
|
|
|
|
|
<el-input v-model="filterQuery.zczbhhzbapzbh" placeholder="请输入注册备案号" clearable
|
|
|
|
|
style="width: 90%"></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
</el-form>
|
|
|
|
|
|
|
|
|
|
<div class="top-right-btn">
|
|
|
|
|
<el-button-group>
|
|
|
|
|
<el-button icon="el-icon-view" type="primary" @click="hideSearch">显示/隐藏搜索栏</el-button>
|
|
|
|
|
<el-button type="primary" icon="el-icon-refresh" @click="onReset">重置</el-button>
|
|
|
|
|
<el-button type="primary" icon="el-icon-search" @click="onSubmit">查询</el-button>
|
|
|
|
|
<el-button type="primary" icon="el-icon-box" @click="invPlace(1)">按物资上架</el-button>
|
|
|
|
|
<el-button type="primary" icon="el-icon-box" @click="invPlace(2)">按单上架</el-button>
|
|
|
|
|
</el-button-group>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<el-table v-loading="loading" :data="list" style="width: 100%" highlight-current-row
|
|
|
|
|
border>
|
|
|
|
|
<el-table-column label="序号" type="index"></el-table-column>
|
|
|
|
|
<el-table-column label="仓库" prop="invName" width="180"></el-table-column>
|
|
|
|
|
<el-table-column label="货位" prop="invSpaceName" width="180"></el-table-column>
|
|
|
|
|
<el-table-column label="上架时间" prop="createTime" width="150"></el-table-column>
|
|
|
|
|
<el-table-column label="操作人" prop="operatorName" width="120"></el-table-column>
|
|
|
|
|
<el-table-column label="上架方式" prop="type" width="120">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-tag>{{ typeNames[scope.row.type] }}</el-tag>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="单号" v-if="filterQuery.type === 2" prop="orderId" width="120"></el-table-column>
|
|
|
|
|
<el-table-column label="产品标识" prop="nameCode" width="150"></el-table-column>
|
|
|
|
|
<el-table-column label="物资编码" prop="relId" width="150"></el-table-column>
|
|
|
|
|
<el-table-column label="产品名称" prop="productName" width="200" show-overflow-tooltip></el-table-column>
|
|
|
|
|
<el-table-column label="规格型号" prop="ggxh" width="150" show-overflow-tooltip></el-table-column>
|
|
|
|
|
<el-table-column label="批次号" prop="batchNo" width="120"></el-table-column>
|
|
|
|
@ -52,7 +131,7 @@
|
|
|
|
|
width="200"></el-table-column>
|
|
|
|
|
<el-table-column label="生产厂家" prop="manufactory" show-overflow-tooltip
|
|
|
|
|
width="200"></el-table-column>
|
|
|
|
|
<el-table-column label="供应商" prop="ylqxzcrbarmc" show-overflow-tooltip
|
|
|
|
|
<el-table-column label="供应商" prop="supName" show-overflow-tooltip
|
|
|
|
|
width="200"></el-table-column>
|
|
|
|
|
</el-table>
|
|
|
|
|
<pagination
|
|
|
|
@ -95,7 +174,7 @@
|
|
|
|
|
<script>
|
|
|
|
|
import {getInvListByUser} from "@/api/system/invWarehouse";
|
|
|
|
|
import {getInvSpaceList} from "@/api/inventory/invSpace";
|
|
|
|
|
import {getPlaceDetailList} from "@/api/inventory/invPlace";
|
|
|
|
|
import {getInvPlaceOrderList, getInvPlaceOrderDetailList} from "@/api/inventory/invPlaceOrder";
|
|
|
|
|
import {isBlank} from "@/utils/strUtil";
|
|
|
|
|
import invProductPlaceModify from "@/views/inventory/InvProductPlaceModify.vue";
|
|
|
|
|
import invOrderPlaceModify from "@/views/inventory/InvOrderPlaceModify.vue";
|
|
|
|
@ -107,6 +186,13 @@ export default {
|
|
|
|
|
filterQuery: {
|
|
|
|
|
invCode: this.$store.getters.locInvCode,
|
|
|
|
|
invSpaceCode: null,
|
|
|
|
|
code: null,
|
|
|
|
|
type: 1,
|
|
|
|
|
orderId: null,
|
|
|
|
|
productName: null,
|
|
|
|
|
nameCode: null,
|
|
|
|
|
batchNo: null,
|
|
|
|
|
zczbhhzbapzbh: null,
|
|
|
|
|
page: 1,
|
|
|
|
|
limit: 20,
|
|
|
|
|
},
|
|
|
|
@ -116,10 +202,18 @@ export default {
|
|
|
|
|
spaceList: [],
|
|
|
|
|
loading: false,
|
|
|
|
|
productPlaceDialogVisible: false,
|
|
|
|
|
orderPlaceDialogVisible: false
|
|
|
|
|
orderPlaceDialogVisible: false,
|
|
|
|
|
typeNames: {
|
|
|
|
|
1: "按物资上架",
|
|
|
|
|
2: "按单上架"
|
|
|
|
|
},
|
|
|
|
|
showSearch: true
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
hideSearch() {
|
|
|
|
|
this.showSearch = !this.showSearch;
|
|
|
|
|
},
|
|
|
|
|
onReset() {
|
|
|
|
|
this.$router.push({
|
|
|
|
|
path: "",
|
|
|
|
@ -127,43 +221,40 @@ export default {
|
|
|
|
|
this.filterQuery = {
|
|
|
|
|
invCode: this.$store.getters.locInvCode,
|
|
|
|
|
invSpaceCode: null,
|
|
|
|
|
code: null,
|
|
|
|
|
type: 1,
|
|
|
|
|
orderId: null,
|
|
|
|
|
productName: null,
|
|
|
|
|
nameCode: null,
|
|
|
|
|
batchNo: null,
|
|
|
|
|
zczbhhzbapzbh: null,
|
|
|
|
|
page: 1,
|
|
|
|
|
limit: 20,
|
|
|
|
|
};
|
|
|
|
|
this.getList();
|
|
|
|
|
},
|
|
|
|
|
onSubmit() {
|
|
|
|
|
if (isBlank(this.filterQuery.invSpaceCode)) {
|
|
|
|
|
this.$message.error("请选择指定货位");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
this.filterQuery.page = 1;
|
|
|
|
|
this.getList();
|
|
|
|
|
},
|
|
|
|
|
getList() {
|
|
|
|
|
if (isBlank(this.filterQuery.invSpaceCode) && this.spaceList.length > 0) {
|
|
|
|
|
this.filterQuery.invSpaceCode = this.spaceList[0].code;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (!isBlank(this.filterQuery.invSpaceCode)) {
|
|
|
|
|
this.loading = true;
|
|
|
|
|
getPlaceDetailList(this.filterQuery).then((res) => {
|
|
|
|
|
this.loading = false;
|
|
|
|
|
if (res.code === 20000) {
|
|
|
|
|
this.list = res.data.list || [];
|
|
|
|
|
this.total = res.data.total || 0;
|
|
|
|
|
} else {
|
|
|
|
|
this.$message.error(res.message);
|
|
|
|
|
this.list = [];
|
|
|
|
|
this.total = 0;
|
|
|
|
|
}
|
|
|
|
|
}).catch((error) => {
|
|
|
|
|
this.loading = false;
|
|
|
|
|
this.$message.error(error.message);
|
|
|
|
|
this.loading = true;
|
|
|
|
|
getInvPlaceOrderList(this.filterQuery).then((res) => {
|
|
|
|
|
this.loading = false;
|
|
|
|
|
if (res.code === 20000) {
|
|
|
|
|
this.list = res.data.list || [];
|
|
|
|
|
this.total = res.data.total || 0;
|
|
|
|
|
} else {
|
|
|
|
|
this.$message.error(res.message);
|
|
|
|
|
this.list = [];
|
|
|
|
|
this.total = 0;
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}).catch((error) => {
|
|
|
|
|
this.loading = false;
|
|
|
|
|
this.$message.error(error.message);
|
|
|
|
|
this.list = [];
|
|
|
|
|
this.total = 0;
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
invChange() {
|
|
|
|
|
this.spaceList = [];
|
|
|
|
@ -174,6 +265,7 @@ export default {
|
|
|
|
|
getInvListByUser()
|
|
|
|
|
.then((response) => {
|
|
|
|
|
this.invList = response.data || [];
|
|
|
|
|
this.getList();
|
|
|
|
|
this.getSpaceList();
|
|
|
|
|
})
|
|
|
|
|
.catch(() => {
|
|
|
|
@ -186,7 +278,6 @@ export default {
|
|
|
|
|
};
|
|
|
|
|
getInvSpaceList(params).then((res) => {
|
|
|
|
|
this.spaceList = res.data.list || [];
|
|
|
|
|
this.getList();
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
invPlace(type) {
|
|
|
|
@ -205,6 +296,17 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
this.getList();
|
|
|
|
|
},
|
|
|
|
|
typeChange() {
|
|
|
|
|
if (this.filterQuery.type === 1) {
|
|
|
|
|
this.filterQuery.orderId = null;
|
|
|
|
|
}
|
|
|
|
|
this.getList();
|
|
|
|
|
},
|
|
|
|
|
keyup_submit(event) {
|
|
|
|
|
this.getList();
|
|
|
|
|
this.$refs.inputRef.focus();
|
|
|
|
|
this.$refs.inputRef.select();
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
components: {
|
|
|
|
|
invProductPlaceModify,
|
|
|
|
|