库存管理查询

udims_mongo
anthonywj 3 years ago
parent a180b0e62c
commit e57e0686d4

@ -0,0 +1,26 @@
import axios from "../../utils/axios";
export function getUdiInfos(query) {
return axios({
url: "/udiwms/udiinfo/filterUdi",
method: "get",
params: query
});
}
export function filterCompany(query) {
return axios({
url: "/udiwms/udiinfo/filterCompany",
method: "get",
params: query
});
}
export function filterByUuid(query) {
return axios({
url: "/udiwms/udiinfo/local/filterByUuid",
method: "get",
params: query
});
}

@ -70,6 +70,13 @@ export function combineUdi(query) {
}); });
} }
export function combineAllUdi(query) {
return axios({
url: "/udi/udirel/combineAll",
method: "get",
params: query
});
}
export function deletetUdiInfos(query) { export function deletetUdiInfos(query) {
return axios({ return axios({

@ -0,0 +1,28 @@
import axios from "../../utils/axios";
export function filterProducts(query) {
return axios({
url: "/udims/inv/products/filter",
method: "get",
params: query
});
}
export function filterDetailProducts(query) {
return axios({
url: "/udims/inv/products/filterDetail",
method: "get",
params: query
});
}
export function deleteProducts(query) {
return axios(
{
url: "/udims/inv/products/delete",
method: "post",
data: query
}
)
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 MiB

After

Width:  |  Height:  |  Size: 1.0 MiB

@ -39,6 +39,7 @@ import inout from "../views/warehouse/ioFinishOrder.vue";
import udiTrace from "../views/warehouse/udiTrace.vue"; import udiTrace from "../views/warehouse/udiTrace.vue";
import ioUdiTrace from "../views/warehouse/ioUdiTrace.vue"; import ioUdiTrace from "../views/warehouse/ioUdiTrace.vue";
import codeNeedRl from "../views/warehouse/codeNeedRl.vue"; import codeNeedRl from "../views/warehouse/codeNeedRl.vue";
import invProducts from "../views/warehouse/InvProducts.vue";
import company from "../views/warehouse/company.vue"; import company from "../views/warehouse/company.vue";
@ -555,7 +556,7 @@ export const asyncRouterMap = [
{ {
path: "ioNew", path: "ioNew",
component: ioNew, component: ioNew,
name: "新增单据", name: "新增扫码单据",
meta: { meta: {
authRule: ["inout/ioNew"] authRule: ["inout/ioNew"]
}, },
@ -589,12 +590,22 @@ export const asyncRouterMap = [
{ {
path: "udiTrace", path: "udiTrace",
name: "UDI码追溯", name: "UDI流向查询",
component: ioUdiTrace, component: ioUdiTrace,
meta: { meta: {
authRule: ["inout/udiTrace"] authRule: ["inout/udiTrace"]
} }
}, },
{
path: "invProducts",
name: "库存查询",
component: invProducts,
meta: {
authRule: ["inout/invProducts"]
}
},
{ {
path: "codeNeedRl", path: "codeNeedRl",
name: "UDI码关联关系", name: "UDI码关联关系",
@ -606,7 +617,7 @@ export const asyncRouterMap = [
{ {
path: "errorOrder", path: "errorOrder",
component: errorOrder, component: errorOrder,
name: "异常单据", name: "异常扫码单据",
meta: { meta: {
authRule: ["inout/errorOrder"] authRule: ["inout/errorOrder"]
}, },

@ -1,9 +1,9 @@
<template> <template>
<div class="login-container"> <div class="login-container">
<div > <!--<div >-->
<H1 style=" position: absolute; top: 23%; left: 15%; transform: translate(-50%, -50%);font-size: 40px">医疗器械UDI系统</H1> <!--<H1 style=" position: absolute; top: 23%; left: 15%; transform: translate(-50%, -50%);font-size: 40px">医疗器械UDI系统</H1>-->
</div> <!--</div>-->
<el-form <el-form
class="card-box login-form" class="card-box login-form"
@ -18,7 +18,7 @@
<img alt="element-logo" src="../../assets/logo.png"/> <img alt="element-logo" src="../../assets/logo.png"/>
</div> </div>
<h3 class="title">用户登录</h3> <h3 class="title">用户登录</h3>
<el-form-item prop="username" class="item" style="margin-top: -20px"> <el-form-item prop="username" class="item" style="margin-top: -20px;width:305px">
<el-input <el-input
placeholder="账号" placeholder="账号"
name="userName" name="userName"
@ -30,7 +30,7 @@
</i> </i>
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-form-item prop="password" class="item"> <el-form-item prop="password" class="item" style="width:305px">
<!--<span class="svg-container">--> <!--<span class="svg-container">-->
<!--<icon-svg icon-class="pwd"/>--> <!--<icon-svg icon-class="pwd"/>-->
<!--</span>--> <!--</span>-->
@ -41,6 +41,7 @@
@keyup.enter.native="handleLogin" @keyup.enter.native="handleLogin"
v-model="ruleForm.pwd" v-model="ruleForm.pwd"
autocomplete="on" autocomplete="on"
> >
<i slot="prefix" class="el-input__icon"> <i slot="prefix" class="el-input__icon">
<icon-svg icon-class="pwd"/> <icon-svg icon-class="pwd"/>

@ -566,3 +566,11 @@
}, },
}; };
</script> </script>
<style>
.checkitemTag {
float: left;
text-align: left;
margin-top: 5px;
width: 100%;
}
</style>

@ -109,7 +109,7 @@
<el-row :gutter="20" class="el-row" type="flex"> <el-row :gutter="20" class="el-row" type="flex">
<el-col :span="10" class="el-col" type="flex"> <el-col :span="10" class="el-col" type="flex">
<div class="text item"> <div class="text item">
<el-form-item label="往来单位编号" prop="thirdId"> <el-form-item label="企业自定义ID" prop="thirdId">
<el-input <el-input
v-model="editQuery.thirdId" v-model="editQuery.thirdId"
style="width: 60%" style="width: 60%"

@ -1,261 +1,381 @@
<template> <template>
<div> <div>
<el-card class="el-card"> <el-card class="el-card">
<div> <div>
<el-form <el-form :inline="true" :model="unionQuery" size="mini">
:inline="true" <el-row style="width: 1000px">
:model="unionQuery" <el-form-item class="query-form-item">
class="query-form" <el-input v-model="unionQuery.udiCode"
size="mini" style="width: 600px"
> placeholder="请扫描或输入UDI码"
<el-row> :clearable="true"
<el-form-item class="query-form-item"> @keyup.enter.native="keyup_submit($event)"></el-input>
<el-input </el-form-item>
v-model="unionQuery.nameCode" </el-row>
size="mini"
placeholder="最小单元销售标识"
@keyup.enter.native="keyup_submit($event)"
></el-input>
</el-form-item>
<el-form-item class="query-form-item">
<el-input
v-model="unionQuery.cpmctymc"
size="mini"
placeholder="产品通用名"
></el-input>
</el-form-item>
<el-form-item class="query-form-item">
<el-input
v-model="unionQuery.ylqxzcrbarmc"
size="mini"
placeholder="医疗器械注册人"
></el-input>
</el-form-item>
<el-form-item class="query-form-item">
<el-input
v-model="unionQuery.ggxh"
placeholder="规格型号"
size="mini"
></el-input>
</el-form-item>
<el-form-item class="query-form-item"> <el-row>
<el-button-group> <el-form-item class="query-form-item">
<el-button <el-input
type="primary" v-model="unionQuery.nameCode" :clearable="true"
icon="search" size="mini"
@click="getList" placeholder="请输入完整DI"
size="mini" @keyup.enter.native="keyup_submit($event)"
>查询</el-button ></el-input>
</el-form-item>
<el-form-item class="query-form-item">
<el-select
v-model="unionQuery.ylqxzcrbarmc"
filterable
remote
:clearable="true"
reserve-keyword
placeholder="医疗器械注册人"
:remote-method="findMethod"
:loading="loading"
>
<el-option
v-for="item in fromOptions"
:key="item.ylqxzcrbarmc"
:label="item.ylqxzcrbarmc"
:value="item.ylqxzcrbarmc"
>
<span style="float: left">{{ item.ylqxzcrbarmc }}</span>
</el-option>
</el-select>
</el-form-item>
<el-form-item class="query-form-item">
<el-input
v-model="unionQuery.cpmctymc" :clearable="true"
size="mini"
placeholder="器械通用名称"
></el-input>
</el-form-item>
</el-row>
<el-row>
<el-form-item class="query-form-item">
<el-input
v-model="unionQuery.ggxh" :clearable="true"
:disabled="(unionQuery.cpmctymc=='' && unionQuery.nameCode=='' && unionQuery.ylqxzcrbarmc==null)"
placeholder="规格型号"
size="mini"
></el-input>
</el-form-item>
<el-form-item class="query-form-item">
<el-input
v-model="unionQuery.zczbhhzbapzbh" :clearable="true"
:disabled="(unionQuery.cpmctymc=='' && unionQuery.nameCode=='' && unionQuery.ylqxzcrbarmc==null)"
placeholder="注册证/备案号"
size="mini"
></el-input>
</el-form-item>
<el-form-item class="query-form-item">
<el-button-group>
<el-button type="primary" icon="search" @click="searchList" size="mini"
>查询
</el-button
>
<el-button type="primary" size="mini" icon="search" @click="combine"
:loading="combineLoading"
>选入
</el-button
>
<el-button type="primary" size="mini" icon="search" @click="combineUdiAll"
>结果全部选入
</el-button
>
</el-button-group>
</el-form-item>
</el-row>
</el-form>
<!--// :row-class-name="tableRowClassName"-->
<el-table
:data="udidlList"
style="width: 100%"
@row-click="intentDetail"
v-loading="loading"
@selection-change="handleSelectionUdiChange"
> >
</el-button-group>
</el-form-item>
</el-row>
</el-form>
<el-table <el-table-column
:data="udidlList" type="selection"
style="width: 100%" width="55"
@row-click="intentDetail" :selectable="checkSelectable"
v-loading="loading" ></el-table-column>
:row-class-name="tableRowClassName" <el-table-column label="序号" type="index"></el-table-column>
@selection-change="handleSelectionUdiChange" <el-table-column
> label="产品标识"
<el-table-column prop="nameCode"
type="selection" show-overflow-tooltip
width="55" ></el-table-column>
:selectable="checkSelectable" <el-table-column
></el-table-column> label="产品名称"
<el-table-column label="序号" type="index"></el-table-column> prop="cpmctymc"
<el-table-column show-overflow-tooltip
label="产品标识" ></el-table-column>
prop="nameCode" <el-table-column
show-overflow-tooltip label="规格型号"
></el-table-column> prop="ggxh"
<el-table-column show-overflow-tooltip
label="产品名称" ></el-table-column>
prop="cpmctymc" <el-table-column
show-overflow-tooltip label="医疗器械注册人"
></el-table-column> prop="ylqxzcrbarmc"
<el-table-column show-overflow-tooltip
label="规格型号" ></el-table-column>
prop="ggxh" <el-table-column
show-overflow-tooltip label="注册证编号"
></el-table-column> prop="zczbhhzbapzbh"
<el-table-column show-overflow-tooltip
label="医疗器械注册人" ></el-table-column>
prop="ylqxzcrbarmc" </el-table>
show-overflow-tooltip <el-pagination
></el-table-column> :page-size="unionQuery.limit"
<el-table-column @current-change="handleCurrentChange"
label="注册证编号" layout="prev, pager, next"
prop="zczbhhzbapzbh" :total="total"
show-overflow-tooltip ></el-pagination>
></el-table-column> </div>
</el-table> <div style="text-align: center">
<el-pagination <el-button type="primary" size="small" icon="search" @click="combine"
:page-size="unionQuery.limit" >确定
@current-change="handleCurrentChange" </el-button
layout="prev, pager, next" >
:total="total" <el-button type="primary" size="small" icon="search" @click="intentBack"
></el-pagination> >取消
</div> </el-button
<div style="text-align: center"> >
<el-button type="primary" size="small" icon="search" @click="combine" </div>
>确定</el-button </el-card>
> </div>
<el-button type="primary" size="small" icon="search" @click="intentBack"
>取消</el-button
>
</div>
</el-card>
</div>
</template> </template>
<script> <script>
import { unionSearch, udidList, combineSearch } from "../../api/udid/udid"; import {filterCompany} from "../../api/basic/udiInfo";
import { import {
getUdiInfos, getUdiInfos,
combineProduct, combineProduct,
combineUdi, combineUdi, combineAllUdi
} from "../../api/erp/udiRelevance"; } from "../../api/erp/udiRelevance";
export default {
name: "closeDialog",
props: {
closeDialog: {
type: Function,
required: true,
},
},
data() { export default {
return { name: "selectUdi",
erpQuery: { props: {
key: "", closeDialog: {
page: 1, type: Function,
limit: 10, required: true,
}, },
unionQuery: { },
page: 1,
limit: 20, data() {
nameCode: "", return {
cpmctymc: "", erpQuery: {
ylqxzcrbarmc: "", key: "",
ggxh: "", page: 1,
}, limit: 10,
combineQuery: { },
thirdId: "", unionQuery: {
keys: [], page: 1,
}, limit: 10,
checked: false, udiCode: "",
udidlList: [], nameCode: "",
erpList: [], cpmctymc: "",
currentRow: null, ylqxzcrbarmc: "",
multipleUdiSelection: [], ggxh: "",
}; zczbhhzbapzbh: "",
}, isCheck: 1
methods: { },
getList() { combineQuery: {
if ( thirdId: "",
this.unionQuery.nameCode == "" && keys: [],
this.unionQuery.cpmctymc == "" && },
this.unionQuery.ylqxzcrbarmc == "" && combineLoading: false,
this.unionQuery.ggxh == "" checked: false,
) { udidlList: [],
this.$message.warning("请输入查询条件"); erpList: [],
return; currentRow: null,
} multipleUdiSelection: [],
this.loading = true; fromOptions: [],
getUdiInfos(this.unionQuery) };
.then((response) => { },
this.loading = false; methods: {
this.udidlList = response.data.list || []; searchList() {
this.total = response.data.total || 0; this.unionQuery.page = 1;
}) this.getList();
.catch(() => { },
this.loading = false; getList() {
this.udidlList = []; if (
this.total = 0; this.unionQuery.udiCode == "" &&
}); this.unionQuery.nameCode == "" &&
}, this.unionQuery.cpmctymc == "" &&
tableRowClassName({ row, rowIndex }) { this.unionQuery.ylqxzcrbarmc == "" &&
if (row.check) return "warning-row"; this.unionQuery.ggxh == "" &&
return ""; this.unionQuery.zczbhhzbapzbh == ""
}, ) {
checkSelectable(row, index) { this.$message.warning("请输入查询条件");
return !row.check; return;
}, }
handleCurrentChange(val) { this.loading = true;
this.unionQuery.page = val; getUdiInfos(this.unionQuery)
this.getList(); .then((response) => {
}, this.loading = false;
getErpList() { this.udidlList = response.data.list || [];
this.loading = true; this.total = response.data.total || 0;
getErpProduct(this.erpQuery) })
.then((response) => { .catch(() => {
this.loading = false; this.loading = false;
this.erpList = response.data || []; this.udidlList = [];
}) this.total = 0;
.catch(() => { });
this.loading = false; },
this.erpList = []; checkSelectable(row) {
}); return !row.check;
}, },
intentBack() { tableRowClassName({row, rowIndex}) {
this.$emit("closeUdi", false); if (row.check) return "warning-row";
}, return "";
combine() { },
let selectData = this.multipleUdiSelection; handleCurrentChange(val) {
var ids = []; this.unionQuery.page = val;
selectData.forEach((obj, index) => { this.getList();
ids.push(obj.uuid); },
}); getErpList() {
this.loading = true;
getErpProduct(this.erpQuery)
.then((response) => {
this.loading = false;
this.erpList = response.data || [];
})
.catch(() => {
this.loading = false;
this.erpList = [];
});
},
intentBack() {
this.$emit("closeUdi", false);
},
combine() {
let selectData = this.multipleUdiSelection;
var ids = [];
selectData.forEach((obj, index) => {
ids.push(obj.uuid);
});
this.combineQuery.keys = ids;
if (this.checked) {
this.combineQuery.thirdId = this.currentRow.id;
} else {
this.combineQuery.thirdId = "";
}
combineUdi(this.combineQuery)
.then((response) => {
if (response.code == 20000) {
this.$emit("closeUdi", true);
this.$message.success("添加成功!");
} else {
this.$emit("closeUdi", false);
this.$message.error(response.message);
}
})
.catch(() => {
this.$emit("closeUdi", false);
this.$message.error(response.message);
});
},
this.combineQuery.keys = ids; combineUdiAll() {
if (this.checked) { this.$confirm("此操作将在后台自动下载所有查询结果, 是否继续?", "提示", {
this.combineQuery.thirdId = this.currentRow.id; confirmButtonText: "确定",
} else { cancelButtonText: "取消",
this.combineQuery.thirdId = ""; type: "warning",
} })
combineUdi(this.combineQuery) .then(() => {
.then((response) => { combineAllUdi(this.unionQuery)
if (response.code == 20000) { .then((response) => {
this.$emit("closeUdi", true); this.loading = false;
this.$message.success("添加成功!"); if (response.code == 20000) {
} else { this.$message.success(response.data);
this.$emit("closeUdi", false); this.$emit("closeUdi", true);
this.$message.error(response.message); } else {
} this.$message.error(response.message);
}) }
.catch(() => { })
this.$emit("closeUdi", false); .catch(() => {
this.$message.error(response.message); });
}); })
}, .catch(() => {
});
intentDetail(row) {
this.$emit("productInfo", row);
this.closeDialog();
},
handleSelectionUdiChange(val) { },
console.log("----" + val);
this.multipleUdiSelection = val; intentDetail(row) {
}, this.$emit("productInfo", row);
keyup_submit(event) { this.closeDialog();
console.log("全选----"); },
this.getList();
event.target.select(); handleSelectionUdiChange(val) {
}, console.log("----" + val);
}, this.multipleUdiSelection = val;
}; },
keyup_submit(event) {
this.unionQuery.page = 1;
this.getList();
event.target.select();
},
findMethod(query) {
console.log(query);
let cQuery = {
ylqxzcrbarmc: query,
page: 1,
limit: 10,
};
filterCompany(cQuery)
.then((response) => {
this.loading = false;
this.fromOptions = response.data || [];
})
.catch(() => {
this.loading = false;
this.options = [];
});
},
},
};
</script> </script>
<style> <style scoped>
.checkitemTag { .checkitemTag {
float: left; float: left;
text-align: left; text-align: left;
margin-top: 5px; margin-top: 5px;
width: 100%; width: 100%;
} }
.query-form-item {
display: block !important;
margin-right: 10px;
margin-bottom: 5px;
}
.el-row {
display: flex;
flex-wrap: wrap;
}
.el-col {
border-radius: 4px;
flex-wrap: wrap;
}
div /deep/ .el-table .warning-row {
background: #bebebe;
}
div /deep/ .el-table .success-row {
background: #ffffff;
}
</style> </style>

@ -0,0 +1,273 @@
<template>
<div>
<el-form :inline="true" :model="filterQuery" class="query-form" size="mini">
<el-row>
<el-form-item class="query-form-item">
<el-input v-model="filterQuery.nameCode" placeholder="最小销售产品标识" :clearable="true"></el-input>
</el-form-item>
<el-form-item class="query-form-item">
<el-input v-model="filterQuery.cpmctymc" placeholder="产品名称" :clearable="true"></el-input>
</el-form-item>
<el-form-item class="query-form-item">
<el-input v-model="filterQuery.batchNo" placeholder="批次号" :clearable="true"></el-input>
</el-form-item>
<el-form-item>
<el-button-group>
<el-button
type="primary"
icon="el-icon-refresh"
@click="onReset"
></el-button>
<el-button type="primary" icon="search" @click="onSubmit"
>查询
</el-button
>
</el-button-group>
</el-form-item>
</el-row>
</el-form>
<el-table v-loading="loading" :data="list" style="width: 100%">
<el-table-column label="序号" type="index"></el-table-column>
<el-table-column label="产品名称" prop="productsName"></el-table-column>
<el-table-column label="产品标识" prop="nameCode"></el-table-column>
<el-table-column label="规格型号" prop="ggxh"></el-table-column>
<el-table-column label="批次号" prop="batchNo"></el-table-column>
<el-table-column label="生产日期" prop="productionDate"></el-table-column>
<el-table-column label="失效日期" prop="expireDate"></el-table-column>
<el-table-column label="入库数量" prop="inCount"></el-table-column>
<el-table-column label="出库数量" prop="outCount"></el-table-column>
<el-table-column label="操作" width="300" fixed="right">
<template slot-scope="scope">
<el-button
type="text"
size="small"
@click.native.stop="intentDetail(scope.row)"
>详情
</el-button
>
<el-button
type="text"
size="small"
@click.native.stop="deleteDialog(scope.row.id)"
>删除
</el-button
>
</template>
</el-table-column>
</el-table>
<el-dialog
title="库存详情"
:visible.sync="codeDetailVisible"
width="65%"
v-if="codeDetailVisible"
>
<codeDetail
:idQuery="idQuery"
v-on:closeDetailDialog="closeDetailDialog"
></codeDetail>
</el-dialog>
<el-pagination
:page-size="filterQuery.limit"
@current-change="handleCurrentChange"
layout="prev, pager, next"
:total="total"
></el-pagination>
</div>
</template>
<script>
import {
filterProducts,
filterDetailProducts,
deleteProducts,
} from "../../api/warehouse/InvProducts";
import draggable from "vuedraggable";
import codeDetail from "./InvProductsDetail";
import store from "../../store";
import {getBusType} from "../../api/warehouse/BusRole";
export default {
data() {
return {
filterQuery: {
cpmctymc: null,
nameCode: null,
relIdFk: null,
batchNo: null,
page: 1,
limit: 20,
customerId: null,
},
detailQuery: {
code: null,
productIdFk: null,
page: 1,
limit: 20,
},
list: [],
codeDetailVisible: false,
total: 0,
loading: true,
index: null,
dialogTableVisible: false,
formLoading: false,
dialogVisible: false,
deleteLoading: false,
busTypes: [],
idQuery: null,
};
},
components: {
draggable,
codeDetail,
},
methods: {
onReset() {
this.$router.push({
path: "",
});
this.filterQuery = {
cpmctymc: null,
nameCode: null,
relIdFk: null,
batchNo: null,
customerId: null,
page: 1,
limit: 20,
};
this.getList();
},
onSubmit() {
this.loading = true;
this.getList();
},
handleSizeChange(val) {
this.filterQuery.limit = val;
this.getList();
},
handleCurrentChange(val) {
this.filterQuery.page = val;
this.getList();
},
handleUnitClick(row) {
this.curIndex = row.id;
this.dialogTableVisible = true;
},
closeDetailDialog(val) {
this.codeDetailVisible = false;
},
closeDialog() {
this.getList();
},
getList() {
this.loading = true;
this.filterQuery.customerId = store.getters.customerId;
filterProducts(this.filterQuery)
.then((response) => {
console.log(response)
this.loading = false;
this.list = response.data.list || [];
this.total = response.data.total || 0;
})
.catch(() => {
this.loading = false;
this.list = [];
this.total = 0;
});
},
deleteOrders(data) {
this.loading = true;
let query = {
id: data,
}
deleteProducts(query)
.then((response) => {
if (response.code == 20000) {
this.getList();
this.$message({
type: "success",
message: "删除成功!",
});
} else {
this.$message.error(response.message);
}
})
.catch(() => {
});
},
deleteDialog(rowId) {
this.$confirm("此操作将永久删除该订单, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.deleteOrders(rowId);
})
.catch(() => {
});
},
intentDetail(row) {
this.codeDetailVisible = true;
this.idQuery = row;
},
getBusType() {
let query = {
enabled: true,
};
getBusType(query)
.then((response) => {
this.busTypes = response.data.list || [];
this.filterQuery.billAction = this.busTypes[0].action;
// this.getList();
})
.catch(() => {
});
},
getActionName(action) {
for (let i = 0; i < this.busTypes.length; i++) {
if (this.busTypes[i].action === action) {
return this.busTypes[i].name;
}
}
},
},
filters: {
statusFilterType(status) {
const statusMap = {
false: "success",
true: "danger",
};
return statusMap[status];
},
},
mounted() {
document.body.ondrop = function (event) {
event.preventDefault();
event.stopPropagation();
};
},
created() {
this.getBusType();
let query = this.$route.query;
this.filterQuery = Object.assign(this.filterQuery, query);
this.filterQuery.limit = parseInt(this.filterQuery.limit);
//
this.getList();
},
};
</script>
<style type="text/scss" lang="scss">
</style>

@ -0,0 +1,177 @@
<template>
<div>
<el-form :inline="true" :model="query" class="query-form" size="mini">
<el-form-item class="query-form-item">
<el-input v-model="query.code" placeholder="条码查询"></el-input>
</el-form-item>
<el-form-item>
<el-button-group>
<el-button type="primary" icon="search" @click="getCodeList"
>查询
</el-button
>
</el-button-group>
</el-form-item>
</el-form>
<el-table v-loading="loading" :data="codeArry" style="width: 100%">
<el-table-column label="序号" type="index"></el-table-column>
<el-table-column
label="条码"
prop="code"
show-overflow-tooltip
></el-table-column>
<el-table-column label="出入库类型" prop="action" width="150">
<template slot-scope="scope">
<span>{{ getActionName(scope.row.action) }}</span>
</template>
</el-table-column>
<el-table-column
label="数量"
prop="count"
width="150"
show-overflow-tooltip
></el-table-column>
<el-table-column
label="所属订单"
prop="orderIdFk"
width="200"
show-overflow-tooltip
></el-table-column>
</el-table>
<el-pagination
:page-size="query.limit"
@current-change="handleCurrentChange"
layout="prev, pager, next,total"
:total="total"
>
</el-pagination>
</div>
</template>
<script>
import {
filterDetailProducts,
} from "../../api/warehouse/InvProducts";
import store from "../../store";
import draggable from "vuedraggable";
import {getBusType} from "../../api/warehouse/BusRole";
export default {
name: "idQuery",
props: {
idQuery: {
type: Object,
required: true,
},
},
data() {
return {
query: {
productIdFk:null,
customerId:null,
page: 1,
limit: 20,
},
codeArry: [],
total: 0,
loading: true,
index: null,
formLoading: false,
formVisible: false,
deleteLoading: false,
orderNo: null,
busTypes: [],
};
},
components: {
draggable,
},
methods: {
onReset() {
this.$router.push({
path: "",
});
this.query = {
productIdFk:null,
customerId:null,
page: 1,
limit: 20,
};
this.getCodeList();
},
onSubmit() {
this.$router.push({
path: "",
query: this.query,
});
this.getCodeList();
},
handleSizeChange(val) {
this.query.limit = val;
this.getCodeList();
},
handleCurrentChange(val) {
this.query.page = val;
this.getCodeList();
},
getCodeList() {
this.loading = true;
this.query.productIdFk = this.idQuery.id;
this.query.customerId = store.getters.customerId;
filterDetailProducts(this.query) //
.then((response) => {
this.loading = false;
this.codeArry = response.data.list || [];
this.total = response.data.total || 0;
})
.catch(() => {
this.loading = false;
this.list = [];
this.total = 0;
});
},
intentBack() {
// this.$router.push({path:'../readme/detail',query:{id:row.corpOrderId}});
this.$router.go(-1);
},
getActionName(action) {
for (let i = 0; i < this.busTypes.length; i++) {
if (this.busTypes[i].action === action) {
return this.busTypes[i].name;
}
}
},
getBusType() {
let query = {
enabled: true,
};
getBusType(query)
.then((response) => {
this.busTypes = response.data.list || [];
this.filterQuery.billAction = this.busTypes[0].action;
// this.getList();
})
.catch(() => {
});
},
},
filters: {},
mounted() {
document.body.ondrop = function (event) {
event.preventDefault();
event.stopPropagation();
};
},
created() {
this.getBusType();
this.getCodeList();
},
};
</script>

@ -246,6 +246,7 @@
fromCorpId: "", fromCorpId: "",
fromCorp: "", fromCorp: "",
}, },
curOrderId: null,
idQuery: { idQuery: {
id: "", id: "",
}, },
@ -306,6 +307,7 @@
handleUnitClick(row) { handleUnitClick(row) {
this.curIndex = row.id; this.curIndex = row.id;
this.dialogTableVisible = true; this.dialogTableVisible = true;
this.curOrderId = row.orderId;
}, },
closeDetailDialog(val) { closeDetailDialog(val) {
this.codeDetailVisible = false; this.codeDetailVisible = false;
@ -335,7 +337,8 @@
console.log(row.id); console.log(row.id);
this.unitUpdateQuery.id = this.curIndex; this.unitUpdateQuery.id = this.curIndex;
this.unitUpdateQuery.fromCorp = row.name; this.unitUpdateQuery.fromCorp = row.name;
this.unitUpdateQuery.fromCorpId = row.unitid; this.unitUpdateQuery.fromCorpId = row.unitId;
this.unitUpdateQuery.orderId = this.curOrderId;
updateUnit(this.unitUpdateQuery) updateUnit(this.unitUpdateQuery)
.then((response) => { .then((response) => {
this.dialogTableVisible = false; this.dialogTableVisible = false;

@ -676,7 +676,7 @@
console.log(row.id); console.log(row.id);
this.unitUpdateQuery.id = this.curIndex; this.unitUpdateQuery.id = this.curIndex;
this.unitUpdateQuery.fromCorp = row.name; this.unitUpdateQuery.fromCorp = row.name;
this.unitUpdateQuery.fromCorpId = row.unitid; this.unitUpdateQuery.fromCorpId = row.unitId;
this.unitUpdateQuery.orderId = this.curOrderId; this.unitUpdateQuery.orderId = this.curOrderId;
updateUnit(this.unitUpdateQuery) updateUnit(this.unitUpdateQuery)
.then((response) => { .then((response) => {

@ -238,6 +238,7 @@
idQuery: { idQuery: {
id: "", id: "",
}, },
curOrderId: null,
list: [], list: [],
adId: [], adId: [],
busTypes: [], busTypes: [],
@ -296,6 +297,7 @@
handleUnitClick(row) { handleUnitClick(row) {
this.curIndex = row.id; this.curIndex = row.id;
this.dialogTableVisible = true; this.dialogTableVisible = true;
this.curOrderId = row.orderId;
}, },
closeDetailDialog(val) { closeDetailDialog(val) {
this.codeDetailVisible = false; this.codeDetailVisible = false;
@ -316,7 +318,8 @@
console.log(row.id); console.log(row.id);
this.unitUpdateQuery.id = this.curIndex; this.unitUpdateQuery.id = this.curIndex;
this.unitUpdateQuery.fromCorp = row.name; this.unitUpdateQuery.fromCorp = row.name;
this.unitUpdateQuery.fromCorpId = row.unitid; this.unitUpdateQuery.fromCorpId = row.unitId;
this.unitUpdateQuery.orderId = this.curOrderId;
updateUnit(this.unitUpdateQuery) updateUnit(this.unitUpdateQuery)
.then((response) => { .then((response) => {
this.dialogTableVisible = false; this.dialogTableVisible = false;

Loading…
Cancel
Save