Merge remote-tracking branch 'origin/master'

prod
郑明梁 2 years ago
commit b10eecfe6b

@ -0,0 +1,33 @@
import axios from "@/utils/request";
export function getDeptDeviceList(params) {
return axios({
url: "/udiwms/inv/deptDevice/filter",
method: "get",
params: params
});
}
export function addDeptDevice(data) {
return axios({
url: "/udiwms/inv/deptDevice/add",
method: "post",
data: data
});
}
export function updateDeptDevice(data) {
return axios({
url: "/udiwms/inv/deptDevice/update",
method: "post",
data: data
});
}
export function deleteDeptDevice(data) {
return axios({
url: "/udiwms/inv/deptDevice/delete",
method: "post",
data: data
});
}

@ -0,0 +1,380 @@
<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>
<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"></el-button>
</el-button-group>
</el-form-item>
</el-form>
<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="nameCode"></el-table-column>
<el-table-column label="产品名称" prop="productName"></el-table-column>
<el-table-column label="规格型号" prop="ggxh" show-overflow-tooltip></el-table-column>
<el-table-column label="批次号" prop="batchNo" width="120"></el-table-column>
<el-table-column label="生产日期" prop="productionDate" width="120"></el-table-column>
<el-table-column label="失效日期" prop="expireDate" width="120"></el-table-column>
<el-table-column label="批准文号" prop="zczbhhzbapzbh" show-overflow-tooltip width="120"></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="placeDialogVisible"
:close-on-click-modal="false"
:close-on-press-escape="false"
width="60%"
v-if="placeDialogVisible"
>
<el-card style="margin: 5px;margin-top: -20px">
<el-form :model="formData" label-width="100px" style="margin-bottom: -15px">
<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-group>
<el-row>
<el-col :span="10">
<el-form-item prop="invWarehouseCode" label="当前仓库:">
<el-select v-model="formData.invCode"
placeholder="当前仓库信息"
:disabled="codeArray.length>0"
@change="formInvChange"
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-select v-model="formData.invSpaceCode"
placeholder="当前货位信息"
:disabled="codeArray.length>0"
style="width: 90%"
clearable>
<el-option
v-for="item in formSpaceList"
:key="item.name"
:label="item.name"
:value="item.code">
<span style="float: left">{{ item.name }}</span>
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<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="codeTableLoading" :data="codeArray" 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="条码" prop="code" show-overflow-tooltip>
</el-table-column>
<el-table-column label="操作" width="150">
<template slot-scope="scope">
<el-button
type="text"
size="small"
@click.stop="true"
@click.native="deleteCodeArray(scope.$index, scope.row)"
>删除
</el-button
>
</template>
</el-table-column>
</el-table>
</el-form>
</el-card>
</el-dialog>
</div>
</template>
<script>
import {getInvListByUser} from "@/api/system/invWarehouse";
import {getInvSpaceList} from "@/api/inventory/invSpace";
import {getPlaceDetailList, bindInvSpace, checkCodeSpace} from "@/api/inventory/invPlace";
import {isBlank} from "@/utils/strUtil";
import {getDeptListByUser} from "@/api/auth/authDept";
export default {
name: "DeptDeviceDetail",
data() {
return {
filterQuery: {
invCode: this.$store.getters.locInvCode,
invSpaceCode: null,
page: 1,
limit: 20,
},
list: [],
total: 0,
invList: [],
spaceList: [],
loading: false,
fromOptions: [],
formData: {
invCode: null,
invSpaceCode: null,
code: null,
codeArray: []
},
placeDialogVisible: false,
codeTableLoading: false,
codeArray: [],
formInvList: [],
formSpaceList: [],
deptList: [],
};
},
methods: {
onReset() {
this.$router.push({
path: "",
});
this.filterQuery = {
invCode: this.$store.getters.locInvCode,
invSpaceCode: null,
page: 1,
limit: 20,
};
this.getList();
},
onSubmit() {
this.filterQuery.page = 1;
this.getList();
},
getList() {
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.list = [];
this.total = 0;
})
},
getDeptList() {
getDeptListByUser().then((res) => {
this.deptList = res.data || [];
this.getInvList();
this.getList();
});
},
invChange() {
this.getList();
},
getInvList() {
getInvListByUser()
.then((response) => {
this.invList = response.data || [];
this.getList();
})
.catch(() => {
});
},
formInvChange() {
this.formData.invSpaceCode = null;
let params = {
invWarehouseCode: this.formData.invCode,
status: 1
};
getInvSpaceList(params).then((res) => {
this.formSpaceList = res.data.list || [];
})
},
invPlace() {
this.placeDialogVisible = true;
this.formData = {
invCode: null,
invSpaceCode: null,
code: null,
codeArray: []
};
this.codeArray = [];
},
deleteCodeArray(index, row) {
for (let i = 0; i < this.codeArray.length; i++) {
if (this.codeArray[i] === row) {
this.codeArray.splice(i, 1);
return;
}
}
},
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;
let tQuery = Object.assign(JSON.parse(JSON.stringify(this.formData)));
this.checkCode(tQuery);
this.$refs.inputRef.select();
},
getInputFocus(event) {
event.currentTarget.select();
},
enterKey(event) {
this.checkSuccess = true;
this.addCode(event);
this.$refs.inputRef.focus();
this.$refs.inputRef.select();
},
checkCode(tQuery) {
//
let flag = false;
this.codeArray.forEach(item => {
if (item.code === this.formData.code) {
this.$message.error("重复条码!");
flag = true;
return;
}
});
if (flag) {
return;
}
//
checkCodeSpace(tQuery).then((res) => {
if (res.code === 20000) {
this.codeArray.push({code: this.formData.code});
} else if (res.code === 8) {
this.loading = false;
this.$message.error(res.message);
} else if (res.code === 7) {
this.$confirm(res.message, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.codeArray.push({code: this.formData.code});
}).catch(() => {
this.loading = false;
});
}
});
},
saveData() {
if (isBlank(this.formData.invCode) || isBlank(this.formData.invSpaceCode)) {
this.$message.warning("请选择仓库和货位信息");
return;
}
if (this.codeArray.length === 0) {
this.$message.warning("请扫描需要摆放的货物");
return;
}
this.formData.codeArray = [];
this.codeArray.forEach(item => {
this.formData.codeArray.push(item.code);
});
bindInvSpace(this.formData).then((res) => {
if (res.code === 20000) {
this.$message.success("绑定成功");
this.placeDialogVisible = false;
this.getList();
} else {
this.$message.error("绑定失败");
}
})
},
},
mounted() {
document.body.ondrop = function (event) {
event.preventDefault();
event.stopPropagation();
};
},
created() {
this.getDeptList();
},
};
</script>
<style type="text/scss" lang="scss">
</style>

@ -21,7 +21,6 @@
</el-form-item> </el-form-item>
<el-form-item class="query-form-item" label="领用仓库:"> <el-form-item class="query-form-item" label="领用仓库:">
<el-select v-model="filterQuery.fromInvCode" placeholder="请选择仓库" clearable="true" <el-select v-model="filterQuery.fromInvCode" placeholder="请选择仓库" clearable="true"
@change="invChange"
> >
<el-option <el-option
v-for="item in invList" v-for="item in invList"
@ -32,7 +31,7 @@
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item class="query-form-item" label="领用货位:"> <!-- <el-form-item class="query-form-item" label="领用货位:">
<el-select v-model="filterQuery.fromInvSpaceCode" placeholder="请选择货位" clearable="true" <el-select v-model="filterQuery.fromInvSpaceCode" placeholder="请选择货位" clearable="true"
> >
<el-option <el-option
@ -43,7 +42,7 @@
<span style="float: left">{{ item.name }}</span> <span style="float: left">{{ item.name }}</span>
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>-->
<el-form-item> <el-form-item>
<el-button-group style="margin-left: 10px;display:flex;"> <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-refresh" @click="onReset"></el-button>
@ -59,7 +58,7 @@
<el-table-column label="设备领用记录号" prop="orderId"></el-table-column> <el-table-column label="设备领用记录号" prop="orderId"></el-table-column>
<el-table-column label="领用部门" prop="fromDeptName"></el-table-column> <el-table-column label="领用部门" prop="fromDeptName"></el-table-column>
<el-table-column label="领用仓库" prop="fromInvName"></el-table-column> <el-table-column label="领用仓库" prop="fromInvName"></el-table-column>
<el-table-column label="领用货位" prop="fromInvSpaceName"></el-table-column> <!-- <el-table-column label="领用货位" prop="fromInvSpaceName"></el-table-column>-->
<el-table-column label="领用日期" prop="createTime"></el-table-column> <el-table-column label="领用日期" prop="createTime"></el-table-column>
<el-table-column label="领用人" prop="receiveUserName"></el-table-column> <el-table-column label="领用人" prop="receiveUserName"></el-table-column>
<el-table-column label="创建人" prop="createUser"></el-table-column> <el-table-column label="创建人" prop="createUser"></el-table-column>
@ -101,16 +100,15 @@
<el-table-column label="序号" type="index" width="50"></el-table-column> <el-table-column label="序号" type="index" width="50"></el-table-column>
<el-table-column label="条码" width="200" prop="code" show-overflow-tooltip></el-table-column> <el-table-column label="条码" width="200" prop="code" show-overflow-tooltip></el-table-column>
<el-table-column label="产品通用名" prop="productName" width="200"></el-table-column> <el-table-column label="产品通用名" prop="productName" width="200"></el-table-column>
<el-table-column label="规格型号" prop="ggxh" width="180" show-overflow-tooltip></el-table-column> <el-table-column label="规格型号" prop="ggxh" width="200" show-overflow-tooltip></el-table-column>
<el-table-column label="批次号" prop="batchNo" width="150"></el-table-column> <el-table-column label="批次号" prop="batchNo" width="200"></el-table-column>
<el-table-column label="序列号" prop="serialNo" width="150"></el-table-column> <el-table-column label="序列号" prop="serialNo" width="150"></el-table-column>
<el-table-column label="领用日期" prop="createTime" width="150"></el-table-column> <el-table-column label="领用日期" prop="createTime" width="150"></el-table-column>
<el-table-column label="生产日期" prop="productionDate" width="150"></el-table-column> <el-table-column label="生产日期" prop="productionDate" width="150"></el-table-column>
<el-table-column label="失效日期" prop="expireDate" width="150"></el-table-column> <el-table-column label="失效日期" prop="expireDate" width="150"></el-table-column>
<el-table-column label="注册/备案凭证号" prop="zczbhhzbapzbh" <el-table-column label="注册/备案凭证号" prop="zczbhhzbapzbh" show-overflow-tooltip></el-table-column>
show-overflow-tooltip></el-table-column> <el-table-column label="生产企业" prop="ylqxzcrbarmc" show-overflow-tooltip></el-table-column>
<el-table-column label="生产企业" prop="ylqxzcrbarmc" <el-table-column label="供应商" prop="supName" show-overflow-tooltip></el-table-column>
show-overflow-tooltip></el-table-column>
</el-table> </el-table>
<pagination <pagination

@ -21,7 +21,6 @@
</el-form-item> </el-form-item>
<el-form-item class="query-form-item" label="领用仓库:"> <el-form-item class="query-form-item" label="领用仓库:">
<el-select v-model="filterQuery.fromInvCode" placeholder="请选择仓库" clearable="true" <el-select v-model="filterQuery.fromInvCode" placeholder="请选择仓库" clearable="true"
@change="invChange"
> >
<el-option <el-option
v-for="item in invList" v-for="item in invList"
@ -32,18 +31,18 @@
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item class="query-form-item" label="领用货位:"> <!-- <el-form-item class="query-form-item" label="领用货位:">
<el-select v-model="filterQuery.fromInvSpaceCode" placeholder="请选择货位" clearable="true" <el-select v-model="filterQuery.fromInvSpaceCode" placeholder="请选择货位" clearable="true"
> >
<el-option <el-option
v-for="item in spaceList" v-for="item in spaceList"
:key="item.name" :key="item.name"
:label="item.name" :label="item.name"
:value="item.code"> :value="item.code">
<span style="float: left">{{ item.name }}</span> <span style="float: left">{{ item.name }}</span>
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>-->
<el-form-item> <el-form-item>
<el-button-group style="margin-left: 10px;display:flex;"> <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-refresh" @click="onReset"></el-button>
@ -59,7 +58,7 @@
<el-table-column label="设备领用记录号" prop="orderId"></el-table-column> <el-table-column label="设备领用记录号" prop="orderId"></el-table-column>
<el-table-column label="领用部门" prop="fromDeptName"></el-table-column> <el-table-column label="领用部门" prop="fromDeptName"></el-table-column>
<el-table-column label="领用仓库" prop="fromInvName"></el-table-column> <el-table-column label="领用仓库" prop="fromInvName"></el-table-column>
<el-table-column label="领用货位" prop="fromInvSpaceName"></el-table-column> <!-- <el-table-column label="领用货位" prop="fromInvSpaceName"></el-table-column>-->
<el-table-column label="领用日期" prop="createTime"></el-table-column> <el-table-column label="领用日期" prop="createTime"></el-table-column>
<el-table-column label="领用人" prop="receiveUserName"></el-table-column> <el-table-column label="领用人" prop="receiveUserName"></el-table-column>
<el-table-column label="创建人" prop="createUser"></el-table-column> <el-table-column label="创建人" prop="createUser"></el-table-column>
@ -83,16 +82,15 @@
<el-table-column label="序号" type="index" width="50"></el-table-column> <el-table-column label="序号" type="index" width="50"></el-table-column>
<el-table-column label="条码" width="200" prop="code" show-overflow-tooltip></el-table-column> <el-table-column label="条码" width="200" prop="code" show-overflow-tooltip></el-table-column>
<el-table-column label="产品通用名" prop="productName" width="200"></el-table-column> <el-table-column label="产品通用名" prop="productName" width="200"></el-table-column>
<el-table-column label="规格型号" prop="ggxh" width="180" show-overflow-tooltip></el-table-column> <el-table-column label="规格型号" prop="ggxh" width="200" show-overflow-tooltip></el-table-column>
<el-table-column label="批次号" prop="batchNo" width="150"></el-table-column> <el-table-column label="批次号" prop="batchNo" width="200"></el-table-column>
<el-table-column label="序列号" prop="serialNo" width="150"></el-table-column> <el-table-column label="序列号" prop="serialNo" width="150"></el-table-column>
<el-table-column label="领用日期" prop="createTime" width="150"></el-table-column> <el-table-column label="领用日期" prop="createTime" width="150"></el-table-column>
<el-table-column label="生产日期" prop="productionDate" width="150"></el-table-column> <el-table-column label="生产日期" prop="productionDate" width="150"></el-table-column>
<el-table-column label="失效日期" prop="expireDate" width="150"></el-table-column> <el-table-column label="失效日期" prop="expireDate" width="150"></el-table-column>
<el-table-column label="注册/备案凭证号" prop="zczbhhzbapzbh" <el-table-column label="注册/备案凭证号" prop="zczbhhzbapzbh" show-overflow-tooltip></el-table-column>
show-overflow-tooltip></el-table-column> <el-table-column label="生产企业" prop="ylqxzcrbarmc" show-overflow-tooltip></el-table-column>
<el-table-column label="生产企业" prop="ylqxzcrbarmc" <el-table-column label="供应商" prop="supName" show-overflow-tooltip></el-table-column>
show-overflow-tooltip></el-table-column>
</el-table> </el-table>
<pagination <pagination
@ -222,7 +220,11 @@ export default {
}); });
}, },
getSpaceList() { getSpaceList() {
let params = {invWarehouseCode: this.filterQuery.fromInvCode,invStorageCode:this.filterQuery.fromInvCode.fromDeptCode, status: 1}; let params = {
invWarehouseCode: this.filterQuery.fromInvCode,
invStorageCode: this.filterQuery.fromInvCode.fromDeptCode,
status: 1
};
getInvSpaceList(params).then((res) => { getInvSpaceList(params).then((res) => {
this.spaceList = res.data.list || []; this.spaceList = res.data.list || [];
this.getList(); this.getList();

@ -399,10 +399,6 @@ export default {
this.getInvList(); this.getInvList();
} }
}); });
if (!isBlank(this.formData.fromDeptCode)) {
this.getDeptUserList();
}
}, },
invChange() { invChange() {
this.formData.invSpaceCode = null; this.formData.invSpaceCode = null;
@ -679,6 +675,7 @@ export default {
this.formData.fromInvSpaceCode = this.deviceReceiveOrder.fromInvSpaceCode; this.formData.fromInvSpaceCode = this.deviceReceiveOrder.fromInvSpaceCode;
this.formData.receiveUser = this.deviceReceiveOrder.receiveUser; this.formData.receiveUser = this.deviceReceiveOrder.receiveUser;
this.getList(); this.getList();
this.getDeptUserList();
} }
}, },
}; };

@ -58,7 +58,7 @@
<el-table-column label="设备领用记录号" prop="orderId"></el-table-column> <el-table-column label="设备领用记录号" prop="orderId"></el-table-column>
<el-table-column label="领用部门" prop="fromDeptName"></el-table-column> <el-table-column label="领用部门" prop="fromDeptName"></el-table-column>
<el-table-column label="出库仓库" prop="fromInvName"></el-table-column> <el-table-column label="出库仓库" prop="fromInvName"></el-table-column>
<el-table-column label="领用货位" prop="fromInvSpaceName"></el-table-column> <!-- <el-table-column label="领用货位" prop="fromInvSpaceName"></el-table-column>-->
<el-table-column label="领用日期" prop="createTime"></el-table-column> <el-table-column label="领用日期" prop="createTime"></el-table-column>
<el-table-column label="领用人" prop="receiveUserName"></el-table-column> <el-table-column label="领用人" prop="receiveUserName"></el-table-column>
<el-table-column label="创建人" prop="createUser"></el-table-column> <el-table-column label="创建人" prop="createUser"></el-table-column>

Loading…
Cancel
Save