Merge branch 'master' of http://116.204.71.86:3000/UDI/udiwms-vue-frame
commit
449c751f9b
@ -0,0 +1,318 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<el-card class="el-card">
|
||||||
|
<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(3)">货位变更</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="recordId" width="180"></el-table-column>
|
||||||
|
<el-table-column label="仓库" prop="invName" width="180"></el-table-column>
|
||||||
|
<el-table-column label="操作时间" prop="createTime" width="150"></el-table-column>
|
||||||
|
<el-table-column label="操作前货位" prop="invSpaceName" width="180"></el-table-column>
|
||||||
|
<el-table-column label="操作后货位" prop="invSpaceName" width="180"></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="DI/物资编码" prop="nameCode" width="150"></el-table-column>
|
||||||
|
<el-table-column label="物资名称" prop="productName" width="200" show-overflow-tooltip></el-table-column>
|
||||||
|
<el-table-column label="数量" prop="count" width="150" 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>
|
||||||
|
<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="expireDate" width="120"></el-table-column>
|
||||||
|
<el-table-column label="注册备案号" prop="zczbhhzbapzbh" show-overflow-tooltip
|
||||||
|
width="200"></el-table-column>
|
||||||
|
<el-table-column label="生产厂家" prop="manufactory" show-overflow-tooltip
|
||||||
|
width="200"></el-table-column>
|
||||||
|
<el-table-column label="供应商" prop="supName" show-overflow-tooltip
|
||||||
|
width="200"></el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<pagination
|
||||||
|
v-show="total>0"
|
||||||
|
:total="total"
|
||||||
|
:limit.sync="filterQuery.limit"
|
||||||
|
:page.sync="filterQuery.page"
|
||||||
|
@pagination="getList"
|
||||||
|
></pagination>
|
||||||
|
</el-card>
|
||||||
|
|
||||||
|
<el-dialog
|
||||||
|
title="货位变更"
|
||||||
|
:visible.sync="placeChangeDialogVisible"
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
:close-on-press-escape="false"
|
||||||
|
width="85%"
|
||||||
|
v-if="placeChangeDialogVisible"
|
||||||
|
>
|
||||||
|
<InvPlaceChangeModify
|
||||||
|
:closePlaceDialog="closePlaceDialog"
|
||||||
|
></InvPlaceChangeModify>
|
||||||
|
</el-dialog>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import {getInvListByUser} from "@/api/system/invWarehouse";
|
||||||
|
import {getInvSpaceList} from "@/api/inventory/invSpace";
|
||||||
|
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";
|
||||||
|
import InvPlaceChangeModify from "@/views/inventory/InvPlaceChangeModify.vue";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "InvProducts",
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
filterQuery: {
|
||||||
|
invCode: this.$store.getters.locInvCode,
|
||||||
|
invSpaceCode: null,
|
||||||
|
code: null,
|
||||||
|
type: 3,
|
||||||
|
orderId: null,
|
||||||
|
productName: null,
|
||||||
|
nameCode: null,
|
||||||
|
batchNo: null,
|
||||||
|
zczbhhzbapzbh: null,
|
||||||
|
page: 1,
|
||||||
|
limit: 20,
|
||||||
|
},
|
||||||
|
list: [],
|
||||||
|
total: 0,
|
||||||
|
invList: [],
|
||||||
|
spaceList: [],
|
||||||
|
loading: false,
|
||||||
|
productPlaceDialogVisible: false,
|
||||||
|
orderPlaceDialogVisible: false,
|
||||||
|
placeChangeDialogVisible: false,
|
||||||
|
typeNames: {
|
||||||
|
1: "按物资上架",
|
||||||
|
2: "按单上架"
|
||||||
|
},
|
||||||
|
showSearch: true
|
||||||
|
};
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
hideSearch() {
|
||||||
|
this.showSearch = !this.showSearch;
|
||||||
|
},
|
||||||
|
onReset() {
|
||||||
|
this.$router.push({
|
||||||
|
path: "",
|
||||||
|
});
|
||||||
|
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() {
|
||||||
|
this.filterQuery.page = 1;
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
getList() {
|
||||||
|
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 = [];
|
||||||
|
this.filterQuery.invSpaceCode = null;
|
||||||
|
this.getSpaceList();
|
||||||
|
},
|
||||||
|
getInvList() {
|
||||||
|
getInvListByUser()
|
||||||
|
.then((response) => {
|
||||||
|
this.invList = response.data || [];
|
||||||
|
this.getList();
|
||||||
|
this.getSpaceList();
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
});
|
||||||
|
},
|
||||||
|
getSpaceList() {
|
||||||
|
let params = {
|
||||||
|
invWarehouseCode: this.filterQuery.invCode,
|
||||||
|
status: 1
|
||||||
|
};
|
||||||
|
getInvSpaceList(params).then((res) => {
|
||||||
|
this.spaceList = res.data.list || [];
|
||||||
|
})
|
||||||
|
},
|
||||||
|
invPlace(type) {
|
||||||
|
if (type === 3) {
|
||||||
|
this.placeChangeDialogVisible = true;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
closePlaceDialog(type) {
|
||||||
|
if (type === 3) {
|
||||||
|
this.placeChangeDialogVisible = false;
|
||||||
|
}
|
||||||
|
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,
|
||||||
|
invOrderPlaceModify, InvPlaceChangeModify
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
document.body.ondrop = function (event) {
|
||||||
|
event.preventDefault();
|
||||||
|
event.stopPropagation();
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getInvList();
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style type="text/scss" lang="scss">
|
||||||
|
</style>
|
||||||
|
|
@ -0,0 +1,296 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<el-card class="el-card">
|
||||||
|
<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(4)">物资下架</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="recordId" width="180"></el-table-column>
|
||||||
|
<el-table-column label="仓库" prop="invName" width="180"></el-table-column>
|
||||||
|
<el-table-column label="操作时间" prop="createTime" width="150"></el-table-column>
|
||||||
|
<el-table-column label="操作前货位" prop="invSpaceName" width="180"></el-table-column>
|
||||||
|
<el-table-column label="操作后货位" prop="invSpaceName" width="180"></el-table-column>
|
||||||
|
<el-table-column label="单号" v-if="filterQuery.type === 2" prop="orderId" width="120"></el-table-column>
|
||||||
|
<el-table-column label="DI/物资编码" prop="nameCode" width="150"></el-table-column>
|
||||||
|
<el-table-column label="物资名称" prop="productName" width="200" show-overflow-tooltip></el-table-column>
|
||||||
|
<el-table-column label="数量" prop="count" width="150" 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>
|
||||||
|
<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="expireDate" width="120"></el-table-column>
|
||||||
|
<el-table-column label="注册备案号" prop="zczbhhzbapzbh" show-overflow-tooltip
|
||||||
|
width="200"></el-table-column>
|
||||||
|
<el-table-column label="生产厂家" prop="manufactory" show-overflow-tooltip
|
||||||
|
width="200"></el-table-column>
|
||||||
|
<el-table-column label="供应商" prop="supName" show-overflow-tooltip
|
||||||
|
width="200"></el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<pagination
|
||||||
|
v-show="total>0"
|
||||||
|
:total="total"
|
||||||
|
:limit.sync="filterQuery.limit"
|
||||||
|
:page.sync="filterQuery.page"
|
||||||
|
@pagination="getList"
|
||||||
|
></pagination>
|
||||||
|
</el-card>
|
||||||
|
|
||||||
|
<el-dialog
|
||||||
|
title="物资下架"
|
||||||
|
:visible.sync="productPlaceDialogVisible"
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
:close-on-press-escape="false"
|
||||||
|
width="85%"
|
||||||
|
v-if="productPlaceDialogVisible"
|
||||||
|
>
|
||||||
|
<invProductPlaceOutModify
|
||||||
|
:closePlaceDialog="closePlaceDialog"
|
||||||
|
></invProductPlaceOutModify>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import {getInvListByUser} from "@/api/system/invWarehouse";
|
||||||
|
import {getInvSpaceList} from "@/api/inventory/invSpace";
|
||||||
|
import {getInvPlaceOrderList, getInvPlaceOrderDetailList} from "@/api/inventory/invPlaceOrder";
|
||||||
|
import {isBlank} from "@/utils/strUtil";
|
||||||
|
import invProductPlaceOutModify from "@/views/inventory/InvProductPlaceOutModify.vue";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "InvProducts",
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
filterQuery: {
|
||||||
|
invCode: this.$store.getters.locInvCode,
|
||||||
|
invSpaceCode: null,
|
||||||
|
code: null,
|
||||||
|
type: 4,
|
||||||
|
orderId: null,
|
||||||
|
productName: null,
|
||||||
|
nameCode: null,
|
||||||
|
batchNo: null,
|
||||||
|
zczbhhzbapzbh: null,
|
||||||
|
page: 1,
|
||||||
|
limit: 20,
|
||||||
|
},
|
||||||
|
list: [],
|
||||||
|
total: 0,
|
||||||
|
invList: [],
|
||||||
|
spaceList: [],
|
||||||
|
loading: false,
|
||||||
|
productPlaceDialogVisible: false,
|
||||||
|
showSearch: true
|
||||||
|
};
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
hideSearch() {
|
||||||
|
this.showSearch = !this.showSearch;
|
||||||
|
},
|
||||||
|
onReset() {
|
||||||
|
this.$router.push({
|
||||||
|
path: "",
|
||||||
|
});
|
||||||
|
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() {
|
||||||
|
this.filterQuery.page = 1;
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
getList() {
|
||||||
|
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 = [];
|
||||||
|
this.filterQuery.invSpaceCode = null;
|
||||||
|
this.getSpaceList();
|
||||||
|
},
|
||||||
|
getInvList() {
|
||||||
|
getInvListByUser()
|
||||||
|
.then((response) => {
|
||||||
|
this.invList = response.data || [];
|
||||||
|
this.getList();
|
||||||
|
this.getSpaceList();
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
});
|
||||||
|
},
|
||||||
|
getSpaceList() {
|
||||||
|
let params = {
|
||||||
|
invWarehouseCode: this.filterQuery.invCode,
|
||||||
|
status: 1
|
||||||
|
};
|
||||||
|
getInvSpaceList(params).then((res) => {
|
||||||
|
this.spaceList = res.data.list || [];
|
||||||
|
})
|
||||||
|
},
|
||||||
|
invPlace() {
|
||||||
|
this.productPlaceDialogVisible = true;
|
||||||
|
},
|
||||||
|
closePlaceDialog(type) {
|
||||||
|
this.productPlaceDialogVisible = false;
|
||||||
|
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: {
|
||||||
|
invProductPlaceOutModify
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
document.body.ondrop = function (event) {
|
||||||
|
event.preventDefault();
|
||||||
|
event.stopPropagation();
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getInvList();
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style type="text/scss" lang="scss">
|
||||||
|
</style>
|
||||||
|
|
@ -0,0 +1,135 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<el-card class="el-card">
|
||||||
|
<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="编码:">
|
||||||
|
<el-input v-model="filterQuery.code" placeholder="请扫描或输入编码" ref="inputRef" clearable style="width: 97%" @keyup.enter.native="keyup_submit($event)"></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-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="deptName" width="180"></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="单号" v-if="filterQuery.type === 2" prop="orderId" width="120"></el-table-column>
|
||||||
|
<el-table-column label="DI/物资编码" prop="nameCode" width="150"></el-table-column>
|
||||||
|
<el-table-column label="物资名称" prop="productName" width="200" show-overflow-tooltip></el-table-column>
|
||||||
|
<el-table-column label="数量" prop="count" width="150" 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>
|
||||||
|
<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="measname" width="120"></el-table-column>
|
||||||
|
<el-table-column label="注册备案号" prop="zczbhhzbapzbh" show-overflow-tooltip
|
||||||
|
width="200"></el-table-column>
|
||||||
|
<el-table-column label="生产厂家" prop="manufactory" show-overflow-tooltip
|
||||||
|
width="200"></el-table-column>
|
||||||
|
<el-table-column label="供应商" prop="supName" show-overflow-tooltip
|
||||||
|
width="200"></el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<pagination
|
||||||
|
v-show="total>0"
|
||||||
|
:total="total"
|
||||||
|
:limit.sync="filterQuery.limit"
|
||||||
|
:page.sync="filterQuery.page"
|
||||||
|
@pagination="getList"
|
||||||
|
></pagination>
|
||||||
|
</el-card>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
|
||||||
|
import {getInvPlaceOrderList, selectPlaceList} from "@/api/inventory/invPlaceOrder";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "InvProducts",
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
filterQuery: {
|
||||||
|
code: null,
|
||||||
|
page: 1,
|
||||||
|
limit: 20,
|
||||||
|
},
|
||||||
|
list: [],
|
||||||
|
total: 0,
|
||||||
|
invList: [],
|
||||||
|
spaceList: [],
|
||||||
|
loading: false,
|
||||||
|
showSearch: true
|
||||||
|
};
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
hideSearch() {
|
||||||
|
this.showSearch = !this.showSearch;
|
||||||
|
},
|
||||||
|
onReset() {
|
||||||
|
this.$router.push({
|
||||||
|
path: "",
|
||||||
|
});
|
||||||
|
this.filterQuery = {
|
||||||
|
code:null,
|
||||||
|
page: 1,
|
||||||
|
limit: 20,
|
||||||
|
};
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
onSubmit() {
|
||||||
|
this.filterQuery.page = 1;
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
getList() {
|
||||||
|
this.loading = true;
|
||||||
|
selectPlaceList(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;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
keyup_submit(event) {
|
||||||
|
this.getList();
|
||||||
|
this.$refs.inputRef.focus();
|
||||||
|
this.$refs.inputRef.select();
|
||||||
|
},
|
||||||
|
},
|
||||||
|
components: {},
|
||||||
|
mounted() {
|
||||||
|
document.body.ondrop = function (event) {
|
||||||
|
event.preventDefault();
|
||||||
|
event.stopPropagation();
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style type="text/scss" lang="scss">
|
||||||
|
</style>
|
||||||
|
|
@ -0,0 +1,313 @@
|
|||||||
|
<template>
|
||||||
|
<el-form :model="formData" label-width="100px">
|
||||||
|
<el-button-group
|
||||||
|
style="display: flex; margin: 0px 0 10px 80%; height: 35px"
|
||||||
|
>
|
||||||
|
<el-button size="mini" type="primary" @click.native="saveData()"
|
||||||
|
>提交
|
||||||
|
</el-button
|
||||||
|
>
|
||||||
|
<el-button size="mini" type="primary" @click.native="closePlaceDialog(1)"
|
||||||
|
>关闭
|
||||||
|
</el-button
|
||||||
|
>
|
||||||
|
</el-button-group>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="10">
|
||||||
|
<el-form-item prop="invWarehouseCode" label="下架仓库:">
|
||||||
|
<el-select
|
||||||
|
v-model="formData.invCode"
|
||||||
|
placeholder="当前仓库信息"
|
||||||
|
:disabled="list.length > 0"
|
||||||
|
@change="invChange"
|
||||||
|
style="width: 90%"
|
||||||
|
clearable
|
||||||
|
>
|
||||||
|
<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="10">
|
||||||
|
<el-form-item class="query-form-item" label="下架货位:">
|
||||||
|
<el-autocomplete
|
||||||
|
v-model="formData.invSpaceName"
|
||||||
|
:disabled="list.length > 0"
|
||||||
|
:fetch-suggestions="querySearchAsync"
|
||||||
|
placeholder="请输入内容"
|
||||||
|
ref="spaceInputRef"
|
||||||
|
@select="handleSelect"
|
||||||
|
@keypress.enter.native="spaceEnterKey($event)"
|
||||||
|
clearable
|
||||||
|
style="width: 90%"
|
||||||
|
></el-autocomplete>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="18">
|
||||||
|
<el-form-item class="query-form-item" label="扫码录入:">
|
||||||
|
<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" size="mini" @click.native.stop="addCode()" style="margin-left: 15px">添加</el-button>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-table v-loading="loading" :data="list" style="width: 100%; margin-top: 20px" highlight-current-row border max-height="300" height="300">
|
||||||
|
<el-table-column label="序号" type="index" width="50"></el-table-column>
|
||||||
|
<el-table-column label="DI/物资编码" prop="nameCode" width="150"></el-table-column>
|
||||||
|
<el-table-column label="物资名称" prop="productName" width="150" show-tooltip-when-overflow></el-table-column>
|
||||||
|
<el-table-column label="规格型号" prop="ggxh" width="150"></el-table-column>
|
||||||
|
<el-table-column label="批次号" prop="batchNo" width="150"></el-table-column>
|
||||||
|
<el-table-column label="序列号" prop="serialNo" width="150"></el-table-column>
|
||||||
|
<el-table-column label="计量单位" prop="measname" width="150"></el-table-column>
|
||||||
|
<el-table-column label="货位" prop="invSpaceName" width="150"></el-table-column>
|
||||||
|
<el-table-column label="数量" prop="count" width="150"></el-table-column>
|
||||||
|
<el-table-column label="注册备案号" prop="zczbhhzbapzbh" width="150" show-tooltip-when-overflow></el-table-column>
|
||||||
|
<el-table-column label="生产厂家" prop="manufactory" width="150"></el-table-column>
|
||||||
|
<el-table-column label="供应商" prop="supName" width="150"></el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</el-form>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import {getInvListByUser} from "@/api/system/invWarehouse";
|
||||||
|
import {getInvSpaceList} from "@/api/inventory/invSpace";
|
||||||
|
import {isBlank} from "@/utils/strUtil";
|
||||||
|
import {
|
||||||
|
bindInvSpace,
|
||||||
|
getInvPlaceOrderDetailList,
|
||||||
|
getInvProductInfo, getInvProductOutInfo, unbindInvOrderSpace,
|
||||||
|
} from "@/api/inventory/invPlace";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
props: {
|
||||||
|
closePlaceDialog: {
|
||||||
|
type: Function,
|
||||||
|
required: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
name: "InvProductPlaceModify",
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
formData: {
|
||||||
|
invCode: this.$store.getters.locInvCode,
|
||||||
|
invSpaceCode: null,
|
||||||
|
invSpaceName: null,
|
||||||
|
code: null,
|
||||||
|
},
|
||||||
|
orderId: null,
|
||||||
|
list: [],
|
||||||
|
codeArray: [],
|
||||||
|
invList: [],
|
||||||
|
spaceList: [],
|
||||||
|
loading: false,
|
||||||
|
spaceSearchResult: [],
|
||||||
|
};
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
saveData() {
|
||||||
|
if (isBlank(this.formData.invCode)) {
|
||||||
|
this.$message.error("请选择当前仓库");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (isBlank(this.formData.invSpaceCode)) {
|
||||||
|
this.$message.error("请选择当前货位");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.$confirm("是否确认保存当前数据?", "提示", {
|
||||||
|
confirmButtonText: "确定",
|
||||||
|
cancelButtonText: "取消",
|
||||||
|
type: "warning",
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
let params = {
|
||||||
|
invCode: this.formData.invCode,
|
||||||
|
invSpaceCode: this.formData.invSpaceCode,
|
||||||
|
type: 4,
|
||||||
|
orderId: this.orderId,
|
||||||
|
outCount: this.list.length
|
||||||
|
};
|
||||||
|
unbindInvOrderSpace(params)
|
||||||
|
.then((res) => {
|
||||||
|
if (res.code === 20000) {
|
||||||
|
this.$message.success("下架成功");
|
||||||
|
this.clearFormData();
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.spaceInputRef.focus();
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
this.$message.error(res.message);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch((error) => {
|
||||||
|
this.$message.error(error.message);
|
||||||
|
});
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
});
|
||||||
|
},
|
||||||
|
clearFormData() {
|
||||||
|
//清空表单数据
|
||||||
|
this.formData = {
|
||||||
|
invCode: this.$store.getters.locInvCode,
|
||||||
|
invSpaceCode: null,
|
||||||
|
invSpaceName: null,
|
||||||
|
code: null,
|
||||||
|
};
|
||||||
|
this.orderId = null;
|
||||||
|
this.codeArray = [];
|
||||||
|
this.list = [];
|
||||||
|
//光标切回货位框
|
||||||
|
this.$refs.spaceInputRef.focus();
|
||||||
|
},
|
||||||
|
invChange() {
|
||||||
|
this.formData.invSpaceCode = null;
|
||||||
|
this.formData.invSpaceName = null;
|
||||||
|
this.list.forEach((item) => {
|
||||||
|
item.invSpaceCode = null;
|
||||||
|
item.invSpaceName = null;
|
||||||
|
});
|
||||||
|
this.getSpaceList();
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.spaceInputRef.focus();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
querySearchAsync(queryString, cb) {
|
||||||
|
let restaurants = this.spaceList;
|
||||||
|
restaurants.forEach((item) => {
|
||||||
|
item.value = item.name;
|
||||||
|
});
|
||||||
|
|
||||||
|
let results = queryString
|
||||||
|
? restaurants.filter(this.createStateFilter(queryString))
|
||||||
|
: restaurants;
|
||||||
|
if (!isBlank(queryString)) {
|
||||||
|
this.spaceSearchResult = results;
|
||||||
|
}
|
||||||
|
cb(results);
|
||||||
|
},
|
||||||
|
createStateFilter(queryString) {
|
||||||
|
return (state) => {
|
||||||
|
const {value, code} = state;
|
||||||
|
return (
|
||||||
|
value === queryString.toLowerCase() ||
|
||||||
|
code === queryString.toLowerCase()
|
||||||
|
);
|
||||||
|
};
|
||||||
|
},
|
||||||
|
handleSelect(item) {
|
||||||
|
this.formData.invSpaceCode = item.code;
|
||||||
|
this.formData.invSpaceName = item.name;
|
||||||
|
this.list.forEach((invProduct) => {
|
||||||
|
invProduct.invSpaceCode = item.code;
|
||||||
|
invProduct.invSpaceName = item.name;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
getInvList() {
|
||||||
|
getInvListByUser()
|
||||||
|
.then((response) => {
|
||||||
|
this.invList = response.data || [];
|
||||||
|
this.getSpaceList();
|
||||||
|
this.getList();
|
||||||
|
this.$refs.spaceInputRef.focus();
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
});
|
||||||
|
},
|
||||||
|
getSpaceList() {
|
||||||
|
let params = {
|
||||||
|
invWarehouseCode: this.formData.invCode,
|
||||||
|
status: 1,
|
||||||
|
};
|
||||||
|
getInvSpaceList(params).then((res) => {
|
||||||
|
this.spaceList = res.data.list || [];
|
||||||
|
});
|
||||||
|
},
|
||||||
|
addCode(event) {
|
||||||
|
if (event != null) {
|
||||||
|
event.target.select();
|
||||||
|
}
|
||||||
|
this.$refs.inputRef.select();
|
||||||
|
if (isBlank(this.formData.invCode)) {
|
||||||
|
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;
|
||||||
|
this.getInvProductInfo(this.formData.code);
|
||||||
|
this.$refs.inputRef.select();
|
||||||
|
},
|
||||||
|
getInvProductInfo(code) {
|
||||||
|
let params = {
|
||||||
|
orderId: this.orderId,
|
||||||
|
invCode: this.formData.invCode,
|
||||||
|
code: code,
|
||||||
|
type: 4,
|
||||||
|
invSpaceCode: this.formData.invSpaceCode,
|
||||||
|
};
|
||||||
|
getInvProductOutInfo(params).then((res) => {
|
||||||
|
if (res.code == 20000) {
|
||||||
|
this.orderId = res.data;
|
||||||
|
getInvPlaceOrderDetailList({orderId: this.orderId}).then((res) => {
|
||||||
|
this.list = res.data.list;
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
this.$message.warning(res.message);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
getInputFocus(event) {
|
||||||
|
event.currentTarget.select();
|
||||||
|
},
|
||||||
|
enterKey(event) {
|
||||||
|
this.checkSuccess = true;
|
||||||
|
this.addCode(event);
|
||||||
|
this.$refs.inputRef.focus();
|
||||||
|
this.$refs.inputRef.select();
|
||||||
|
},
|
||||||
|
spaceEnterKey(event) {
|
||||||
|
if (this.spaceSearchResult.length > 0) {
|
||||||
|
this.handleSelect(this.spaceSearchResult[0]);
|
||||||
|
this.$refs.spaceInputRef.close();
|
||||||
|
this.$refs.inputRef.focus();
|
||||||
|
this.$refs.inputRef.select();
|
||||||
|
} else {
|
||||||
|
event.target.select();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getInvList();
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
//默认获取上架货物光标
|
||||||
|
this.$refs.spaceInputRef.focus();
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped></style>
|
Loading…
Reference in New Issue