库存管理查询

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

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

@ -566,3 +566,11 @@
},
};
</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-col :span="10" class="el-col" type="flex">
<div class="text item">
<el-form-item label="往来单位编号" prop="thirdId">
<el-form-item label="企业自定义ID" prop="thirdId">
<el-input
v-model="editQuery.thirdId"
style="width: 60%"

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

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

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

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

Loading…
Cancel
Save