设备领用代码提交

20231126-yw
郑明梁 2 years ago
parent 849ac6875d
commit f0ed4bf9c8

@ -4,9 +4,14 @@
<el-form :model="formData" ref="dataForm" label-width="100px" style="margin-bottom: -15px">
<el-button-group style="display: flex;margin: 0px 0 10px 80%; height: 35px">
<el-button
type="primary"
@click.native="saveDeviceReceiveOrder()"
>保存
type="primary"
@click.native="saveDeviceReceiveOrder()"
>草稿保存
</el-button>
<el-button
type="primary"
@click.native="submitAudit()"
>提交审核
</el-button>
</el-button-group>
@ -22,7 +27,7 @@
</el-form-item>
</el-col>
<el-col :span="10">
<el-form-item class="query-form-item" label="领用日期:">
<el-form-item class="query-form-item" label="领用时间:">
<el-input v-model="formData.createTime"
auto-complete="off"
:disabled="true"
@ -38,14 +43,14 @@
<el-form-item class="query-form-item" label="领用部门:">
<el-select v-model="formData.fromDeptCode" placeholder="领用部门信息"
:disabled="detailList.length >0 && this.paramValue == 0 "
@change="deptChange"
style="width: 90%;"
disabled
clearable>
<el-option
v-for="item in deptList"
:key="item.name"
:label="item.name"
:value="item.code">
v-for="item in deptList"
:key="item.name"
:label="item.name"
:value="item.code">
<span style="float: left">{{ item.name }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.parentName }}</span>
</el-option>
@ -53,17 +58,17 @@
</el-form-item>
</el-col>
<el-col :span="10">
<el-col :span="10" v-if="paramValue == 0">
<el-form-item class="query-form-item" label="出库仓库:">
<el-select v-model="formData.fromInvCode" placeholder="出库仓库信息"
:disabled="detailList.length >0 && this.paramValue == 0 "
:disabled="detailList.length >0 && paramValue == 0 "
style="width: 90%"
clearable>
<el-option
v-for="item in invList"
:key="item.name"
:label="item.name"
:value="item.code">
v-for="item in invList"
:key="item.name"
:label="item.name"
:value="item.code">
<span style="float: left">{{ item.name }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.code }}</span>
</el-option>
@ -72,57 +77,14 @@
</el-col>
</el-row>
<el-row>
<el-col :span="10">
<el-form-item class="query-form-item" label="领用人:">
<el-select v-model="formData.receiveUser" placeholder="领用人信息"
:disabled="detailList.length >0 && this.paramValue == 0 "
style="width: 90%"
clearable>
<el-option
v-for="item in userList"
:key="item.employeeName"
:label="item.employeeName"
:value="item.userId">
<span style="float: left">{{ item.employeeName }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.userId }}</span>
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="17">
<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="4">
<el-button
type="primary"
size="mini"
@click.native.stop="addCode()"
style="margin-left: 15px"
>扫码添加
</el-button>
<el-button
type="primary"
:disabled="this.detailList.length > 0 && this.paramValue == 0 "
@click.native="selectInvProduct()"
>手动添加
<el-row type="flex" justify="end">
<el-button-group style="display: flex;margin-right: 10px">
<el-button type="primary" @click.native.stop="selectInvProduct()" :loading="loading">选入设备
</el-button>
</el-col>
</el-button-group>
</el-row>
<el-table v-loading="loading" :data="detailList" style="width: 100%;margin-top: 20px;"
highlight-current-row
border max-height="300" height="300">
@ -169,9 +131,15 @@
<el-table-column label="供应商" prop="supName" show-overflow-tooltip></el-table-column>
<el-table-column label="操作">
<template slot-scope="scope">
<el-button type="text" size="small" @click.stop="true" @click.native="deleteOrderDetail(scope.$index, scope.row)">减一</el-button>
<el-button type="text" size="small" v-if="scope.row.id == selectedIndex && paramValue == 1" @click.stop="true" @click.native="updateOrderDetail(scope.row)"></el-button>
<el-button type="text" size="small" v-if="scope.row.id != selectedIndex && paramValue == 1" @click.stop="true" @click.native="uploadOrderDetail(scope.row)"></el-button>
<el-button type="text" size="small" @click.stop="true"
@click.native="deleteOrderDetail(scope.$index, scope.row)">减一
</el-button>
<el-button type="text" size="small" v-if="scope.row.id == selectedIndex && paramValue == 1"
@click.stop="true" @click.native="updateOrderDetail(scope.row)">保存
</el-button>
<el-button type="text" size="small" v-if="scope.row.id != selectedIndex && paramValue == 1"
@click.stop="true" @click.native="uploadOrderDetail(scope.row)">编辑
</el-button>
</template>
</el-table-column>
</el-table>
@ -181,79 +149,104 @@
<el-dialog
title="库存产品录入"
:visible.sync="selectInvProductVisible"
:close-on-click-modal="false"
:close-on-press-escape="false"
width="85%"
v-if="selectInvProductVisible"
:append-to-body='true'
title="库存产品录入"
:visible.sync="selectInvProductVisible"
:close-on-click-modal="false"
:close-on-press-escape="false"
width="80%"
v-if="selectInvProductVisible"
:append-to-body='true'
>
<el-form :inline="true" :model="filterQuery" size="mini">
<el-row>
<el-form-item class="query-form-item" label="领用仓库:">
<el-select v-model="filterQuery.invCode" placeholder="领用仓库信息"
:disabled="true"
clearable>
<el-option
v-for="item in invList"
:key="item.name"
:label="item.name"
:value="item.code">
<span style="float: left">{{ item.name }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.parentName }}</span>
</el-option>
</el-select>
</el-form-item>
<el-form-item class="query-form-item" label="产品标识DI:">
<el-input v-model="filterQuery.nameCode" placeholder="产品标识DI" clearable></el-input>
</el-form-item>
<el-form-item class="query-form-item" label="产品名称:">
<el-input v-model="filterQuery.cpmctymc" placeholder="产品名称" clearable></el-input>
</el-form-item>
<el-form-item class="query-form-item" label="批次号:">
<el-input v-model="filterQuery.batchNo" placeholder="批次号" clearable></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="queryInvProductsList"
>查询
</el-button
>
<el-button type="primary" icon="search" @click="combine"></el-button>
</el-button-group>
<el-form label-width="100px" :model="filterQuery" size="mini" v-show="showSearch">
<el-col :span="18">
<el-form-item class="query-form-item" label="扫码录入:">
<el-input
id="inputer"
placeholder="请输入UDI码"
@focus="getInputFocus($event)"
@keypress.enter.native="addCode($event)"
ref='inputRef'
style="ime-mode:disabled"
type="tel"
v-model="filterQuery.code"
></el-input>
</el-form-item>
</el-col>
<el-row>
<el-col :span="8">
<el-form-item class="query-form-item" label="DI/物资编码:">
<el-input v-model="filterQuery.nameCode" style="width: 90%" placeholder="请输入DI/物资编码" clearable></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item class="query-form-item" label="产品通用名称:">
<el-input v-model="filterQuery.cpmctymc" style="width: 90%" placeholder="请输入产品通用名称" clearable></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item class="query-form-item" label="规格型号:">
<el-input v-model="filterQuery.ggxh" style="width: 90%" placeholder="请输入规格型号" clearable></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<el-form-item class="query-form-item" label="生产企业:">
<el-input v-model="filterQuery.manufactory" style="width: 90%" placeholder="请输入生产企业" clearable></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item class="query-form-item" label="注册/备案号:">
<el-input v-model="filterQuery.zczbhhzbapzbh" style="width: 90%" placeholder="请输入注册/备案号" clearable></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item class="query-form-item" label="供应商:">
<el-input v-model="filterQuery.supName" style="width: 90%" placeholder="请输入供应商" clearable></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="queryInvProductsList"></el-button>
<el-button type="primary" icon="search" @click="combine"></el-button>
</el-button-group>
</div>
<el-divider style="margin: 15px"></el-divider>
<el-table v-loading="loading" :data="productList" style="width: 100%"
highlight-current-row="false"
:row-key="getRowKeys"
@selection-change="handleSelectionChange"
<el-table v-loading="loading" :data="productList" style="width: 100%" highlight-current-row="false" :row-key="getRowKeys"
@selection-change="handleSelectionChange" border
ref="multipleTable">
<el-table-column type="selection" :reserve-selection="true" width="55"></el-table-column>
<el-table-column label="序号" type="index"></el-table-column>
<el-table-column label="产品标识" prop="nameCode"></el-table-column>
<el-table-column label="产品名称" prop="cpmctymc"></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" width="120"></el-table-column>
<el-table-column label="产品通用名称" prop="cpmctymc" width="200"></el-table-column>
<el-table-column label="规格型号" prop="ggxh" width="200"></el-table-column>
<el-table-column label="DI/物资编码" prop="nameCode" width="120"></el-table-column>
<el-table-column label="UDI码" prop="code" width="350"></el-table-column>
<el-table-column label="批次号" prop="batchNo" width="120"></el-table-column>
<el-table-column label="生产日期" prop="produceDate" width="120"></el-table-column>
<el-table-column label="失效日期" prop="expireDate" width="120"></el-table-column>
<el-table-column label="供应商" prop="supName" width="120"></el-table-column>
<el-table-column label="序列号" prop="serialNo" width="150"></el-table-column>
<el-table-column label="生产企业" prop="manufactory" width="200"></el-table-column>
<el-table-column label="注册/备案号" prop="zczbhhzbapzbh" width="200"></el-table-column>
<el-table-column label="供应商" prop="supName" width="260"></el-table-column>
</el-table>
<pagination
v-show="productTotal>0"
:total="productTotal"
:limit.sync="filterQuery.limit"
:page.sync="filterQuery.page"
@pagination="queryInvProducts"
v-show="productTotal>0"
:total="productTotal"
:limit.sync="filterQuery.limit"
:page.sync="filterQuery.page"
@pagination="queryInvProducts"
></pagination>
</el-dialog>
<el-dialog
title="耗材产品录入"
title="设备领用-物资字典录入"
:visible.sync="selectProductVisible"
:close-on-click-modal="false"
:close-on-press-escape="false"
@ -261,37 +254,76 @@
v-if="selectProductVisible"
:append-to-body='true'
>
<el-form :inline="true" :model="filterProductQuery" size="mini">
<el-row>
<el-form-item class="query-form-item" label="产品标识DI:">
<el-input v-model="filterProductQuery.nameCode" placeholder="产品标识DI" clearable></el-input>
</el-form-item>
<el-form-item class="query-form-item" label="产品名称:">
<el-input v-model="filterProductQuery.cpmctymc" placeholder="产品名称" clearable></el-input>
</el-form-item>
<el-form-item class="query-form-item" label="批次号:">
<el-input v-model="filterProductQuery.batchNo" placeholder="批次号" clearable></el-input>
</el-form-item>
<el-form-item>
<el-button-group>
<el-button type="primary" icon="el-icon-refresh" @click="onProductReset"></el-button>
<el-button type="primary" icon="search" @click="queryProductsList"></el-button>
<el-button type="primary" icon="search" @click="combine"></el-button>
</el-button-group>
<el-form label-width="100px" :model="filterProductQuery" size="mini" v-show="showSearch">
<el-col :span="18">
<el-form-item class="query-form-item" label="扫码录入:">
<el-input
id="inputer1"
placeholder="请输入UDI码"
@focus="getInputFocus($event)"
@keypress.enter.native="addCode($event)"
ref='inputRef'
type="tel"
v-model="filterProductQuery.code"
></el-input>
</el-form-item>
</el-col>
<el-row>
<el-col :span="8">
<el-form-item class="query-form-item" label="DI/物资编码:">
<el-input v-model="filterProductQuery.nameCode" style="width: 90%" placeholder="请输入DI/物资编码" clearable></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item class="query-form-item" label="产品通用名称:">
<el-input v-model="filterProductQuery.cpmctymc" style="width: 90%" placeholder="请输入产品通用名称" clearable></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item class="query-form-item" label="规格型号:">
<el-input v-model="filterProductQuery.ggxh" style="width: 90%" placeholder="请输入规格型号" clearable></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<el-form-item class="query-form-item" label="生产企业:">
<el-input v-model="filterProductQuery.manufactory" style="width: 90%" placeholder="请输入生产企业" clearable></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item class="query-form-item" label="注册/备案号:">
<el-input v-model="filterProductQuery.zczbhhzbapzbh" style="width: 90%" placeholder="请输入注册/备案号" clearable></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item class="query-form-item" label="供应商:">
<el-input v-model="filterProductQuery.companyName" style="width: 90%" placeholder="请输入供应商" clearable></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
<el-table v-loading="loading" :data="udiProductList" style="width: 100%" highlight-current-row :row-key="getRowKeys"
<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="onProductReset"></el-button>
<el-button type="primary" icon="el-icon-search" @click="queryProductsList"></el-button>
<el-button type="primary" icon="el-icon-plus" @click="combine"></el-button>
</el-button-group>
</div>
<el-divider style="margin: 15px"></el-divider>
<el-table v-loading="loading" :data="udiProductList" style="width: 100%" highlight-current-row border
:row-key="getRowKeys"
@selection-change="handleSelectionChange" ref="multipleTable">
<el-table-column type="selection" :reserve-selection="true" width="55">
</el-table-column>
<el-table-column label="序号" type="index"></el-table-column>
<el-table-column label="产品标识" prop="nameCode"></el-table-column>
<el-table-column label="产品名称" prop="cpmctymc"></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="supName" width="120"></el-table-column>
<el-table-column label="产品通用名称" prop="cpmctymc" width="300"></el-table-column>
<el-table-column label="规格型号" prop="ggxh"width="300"></el-table-column>
<el-table-column label="DI/物资编码" prop="nameCode"width="300"></el-table-column>
<el-table-column label="生产企业" prop="manufactory" width="300"></el-table-column>
<el-table-column label="注册/备案号" prop="zczbhhzbapzbh" width="300"></el-table-column>
<el-table-column label="供应商" prop="companyName" width="300"></el-table-column>
</el-table>
<pagination
@ -307,7 +339,7 @@
<script>
import {getDeptListByUser} from "@/api/auth/authDept";
import {findInvByUser} from "@/api/system/invSubWarehouse";
import {filterSubAll, findInvByUser} from "@/api/system/invSubWarehouse";
import {getInvSpaceList} from "@/api/inventory/invSpace";
import {
addDeviceReceiveOrder,
@ -317,7 +349,7 @@ import {
getDeviceReceiveOrderDetailList,
deleteDeviceReceiveOrderDetail,
checkCode,
getConfig, selectProduct
getConfig, selectProduct, submitAudit
} from "@/api/inventory/deviceReceiveOrder";
import {getInvMAProducts} from "@/api/inventory/invPorduct";
import {isBlank} from "@/utils/strUtil";
@ -358,14 +390,14 @@ export default {
id: null,
orderId: null,
createTime: null,
fromDeptCode: null,
fromDeptCode: this.$store.getters.locDeptCode,
fromInvCode: null,
fromInvSpaceCode: null,
receiveUser: null,
status: 0,
code: null,
},
filterProductQuery:{
filterProductQuery: {
nameCode: null,
cpmctymc: null,
batchNo: null,
@ -376,9 +408,9 @@ export default {
limit: 10
},
detailList: [],
paramValue:null,
paramValue: null,
loading: false,
selectProductVisible:false,
selectProductVisible: false,
scanText: "扫码录入:",
currentIndex: -1,
selectInvProductVisible: false,
@ -386,14 +418,14 @@ export default {
userList: [],
productInvList: [],
productSpaceList: [],
currentRow:{},
selectedIndex:null
currentRow: {},
selectedIndex: null,
showSearch: true,
}
},
methods: {
getInvList() {
let params = {deptCode: this.formData.fromDeptCode};
findInvByUser(params).then((res) => {
filterSubAll().then((res) => {
if (res.code === 20000) {
this.invList = res.data || [];
if (!isBlank(this.deviceReceiveOrder.fromInvSpaceCode)) {
@ -403,6 +435,9 @@ export default {
}
});
},
hideSearch() {
this.showSearch = !this.showSearch;
},
deptChange() {
//
this.formData.fromInvCode = null;
@ -412,21 +447,6 @@ export default {
this.spaceList = [];
this.userList = [];
this.getInvList();
//
this.getDeptUserList();
},
getDeptUserList() {
this.userList = [];
let params = {deptId: null};
this.deptList.forEach((item) => {
if (item.code === this.formData.fromDeptCode) {
params.deptId = item.id;
}
});
listDeptUser(params).then((res) => {
this.userList = res.data.list || [];
})
},
getDeptList() {
getDeptListByUser().then((res) => {
@ -450,7 +470,7 @@ export default {
this.formData.fromInvSpaceCode = "";
},
selectInvProduct() {
if(this.paramValue == 0){
if (this.paramValue == 0) {
let message = this.verifyOrder();
if (!isBlank(message)) {
this.$message.warning(message);
@ -461,7 +481,7 @@ export default {
this.onReset();
this.selectInvProductVisible = true;
this.filterQuery.invCode = this.formData.fromInvCode;
}else{
} else {
//
this.saveOrder();
this.onProductReset();
@ -483,6 +503,7 @@ export default {
} else {
addDeviceReceiveOrder(this.formData).then((res) => {
if (res.code === 20000) {
debugger
this.formData.id = res.data.id;
this.formData.orderId = res.data.orderId;
this.formData.createTime = res.data.createTime;
@ -500,7 +521,11 @@ export default {
},
saveDeviceReceiveOrder() {
let message = this.verifyOrder();
if(this.paramValue == 0){
var message = this.verifyOrder()
}else{
var message = this.verifyProductOrder()
}
if (isBlank(message)) {
this.saveOrder();
this.closeDialog();
@ -518,33 +543,49 @@ export default {
this.$refs.inputRef.select();
},
addCode() {
let message = this.verifyOrder();
if (!isBlank(message)) {
this.$message.warning(message);
return;
}
if (isBlank(this.formData.code)) {
this.$message.warning("请扫描或输入UDI码");
return;
}
if (isBlank(this.formData.orderId)) {
this.saveOrder(this.formData.code);
} else {
this.addScanCode();
}
this.queryInvProductsList()
this.queryProductsList()
},
verifyOrder() {
if (isBlank(this.formData.fromDeptCode)) {
return "请选择领用部门!";
} else if (isBlank(this.formData.fromInvCode)) {
return "请选择领用仓库!";
} else if (isBlank(this.formData.receiveUser)) {
return "请选择领用人!";
return "请选择出库仓库!";
} else if (this.detailList == null || this.detailList.length == 0) {
return "请选择设备!";
}
},
verifyProductOrder() {
if (this.detailList == null || this.detailList.length == 0) {
return "请选择设备!";
}
},
submitAudit() {
if(this.paramValue == 0){
var message = this.verifyOrder()
}else{
var message = this.verifyProductOrder()
}
if(!isBlank(message)){
return this.$message.warning(message);
}
let params = {id: this.formData.id};
submitAudit(params).then((res) => {
if (res.code === 20000) {
this.$message.success("提交成功!");
this.closeDialog();
} else {
this.$message.error(res.message);
}
}).catch((error) => {
this.$message.error(error.message);
});
},
addScanCode() {
//
let checkParams = {
@ -611,12 +652,12 @@ export default {
})
}
},
uploadOrderDetail(val){
uploadOrderDetail(val) {
this.currentRow = val;
this.selectedIndex = val.id;
console.log(this.selectedIndex)
},
saveOrderDetail(val){
saveOrderDetail(val) {
},
getList() {
@ -692,7 +733,7 @@ export default {
this.productTotal = 0;
});
},
queryProductsList(){
queryProductsList() {
selectProduct(this.filterProductQuery).then((res) => {
if (res.code === 20000) {
this.udiProductList = res.data.list || [];
@ -749,13 +790,15 @@ export default {
created() {
//
getConfig().then((res) => {
if(res.code == 20000 && !isBlank(res.data.paramValue)){
this.paramValue =res.data.paramValue
if (res.code == 20000 && !isBlank(res.data.paramValue)) {
this.paramValue = res.data.paramValue
}
})
this.getDeptList();
this.deptChange();
if (!(isBlank(this.deviceReceiveOrder.orderId))) {
this.formData.orderId = this.deviceReceiveOrder.orderId;
this.formData.id = this.deviceReceiveOrder.id;
this.formData.createTime = this.deviceReceiveOrder.createTime;
this.formData.fromDeptCode = this.deviceReceiveOrder.fromDeptCode;
this.formData.fromInvCode = this.deviceReceiveOrder.fromInvCode;
@ -768,3 +811,49 @@ export default {
};
</script>
<style scoped>
#inputer {
width: 100%;
min-height: 30px;
background-color: white;
border: #d0d0d0;
border-style: solid;
border-width: 0.1px;
color: #4a4a4a;
}
#inputer:focus {
width: 100%;
min-height: 30px;
background-color: white;
border: #0080FF;
border-style: solid;
border-width: 0.1px;
color: #4a4a4a;
}
#inputer1 {
width: 100%;
min-height: 30px;
background-color: white;
border: #d0d0d0;
border-style: solid;
border-width: 0.1px;
color: #4a4a4a;
}
#inputer1:focus {
width: 100%;
min-height: 30px;
background-color: white;
border: #0080FF;
border-style: solid;
border-width: 0.1px;
color: #4a4a4a;
}
</style>

@ -1,67 +1,75 @@
<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-input v-model="filterQuery.orderId" placeholder="请输入领用记录号"
clearable="true"></el-input>
</el-form-item>
<el-form-item class="query-form-item" label="领用部门:">
<el-select v-model="filterQuery.fromDeptCode" placeholder="请选择部门" clearable="true"
@change="deptChange"
>
<el-option
v-for="item in deptList"
:key="item.name"
:label="item.name"
:value="item.code">
<span style="float: left">{{ item.name }}</span>
</el-option>
</el-select>
</el-form-item>
<el-form-item class="query-form-item" label="出库仓库:">
<el-select v-model="filterQuery.fromInvCode" placeholder="请选择仓库" clearable="true"
>
<el-option
v-for="item in invList"
:key="item.name"
:label="item.name"
:value="item.code">
<span style="float: left">{{ item.name }}</span>
</el-option>
</el-select>
</el-form-item>
<!--<el-form-item class="query-form-item" label="领用货位:">
<el-select v-model="filterQuery.fromInvSpaceCode" placeholder="请选择货位" clearable="true"
>
<el-option
v-for="item in spaceList"
:key="item.name"
:label="item.name"
:value="item.code">
<span style="float: left">{{ item.name }}</span>
</el-option>
</el-select>
</el-form-item>-->
<el-form-item>
<el-button-group style="margin-left: 10px;display:flex;">
<el-button type="primary" icon="el-icon-refresh" @click="onReset"></el-button>
<el-button type="primary" icon="el-icon-search" @click="onSubmit"></el-button>
<el-button type="primary" icon="el-icon-plus" @click="addReceiveOrder"></el-button>
</el-button-group>
</el-form-item>
<el-form :model="filterQuery" class="query-form" size="mini" label-width="100px" v-show="showSearch">
<el-row>
<el-col :span="8">
<el-form-item class="query-form-item" label="领用记录号:">
<el-input v-model="filterQuery.orderId" placeholder="请输入领用记录号" style="width: 90%"
clearable="true"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item class="query-form-item" label="领用部门:">
<el-select v-model="filterQuery.fromDeptCode" placeholder="请选择部门" clearable="true" style="width: 90%"
@change="getDeptList"
>
<el-option
v-for="item in deptList"
: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="8">
<el-form-item class="query-form-item" label="领用人:">
<el-input v-model="filterQuery.receiveUserName" placeholder="请输入领用人" style="width: 90%"
clearable="true"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<el-form-item label="领用日期:">
<el-date-picker
:picker-options="pickerOptions"
v-model="actDateRange"
type="daterange"
format="yyyy 年 MM 月 dd 日"
style="width: 90%"
value-format="yyyy-MM-dd"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
>
</el-date-picker>
</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-plus" @click="addReceiveOrder"></el-button>
</el-button-group>
</div>
<el-divider style="margin: 15px"></el-divider>
<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="orderId"></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="fromInvSpaceName"></el-table-column>-->
<el-table-column label="领用日期" prop="createTime"></el-table-column>
<el-table-column label="出库仓库" prop="fromInvName" v-if="paramValue == 0"></el-table-column>
<!-- <el-table-column label="领用货位" prop="fromInvSpaceName"></el-table-column>-->
<el-table-column label="领用人" prop="receiveUserName"></el-table-column>
<el-table-column label="创建人" prop="createUserName"></el-table-column>
<el-table-column label="领用日期" prop="createTime"></el-table-column>
<el-table-column label="状态" prop="status" show-overflow-tooltip width="120">
<template slot-scope="scope">
<el-tag>{{ statusMap[scope.row.status] }}</el-tag>
@ -70,23 +78,16 @@
<el-table-column label="操作">
<template slot-scope="scope">
<el-button
type="text"
size="small"
@click.native.stop="editOrder(scope.row)"
type="text"
size="small"
@click.native.stop="editOrder(scope.row)"
>编辑
</el-button
>
<el-button
type="text"
size="small"
@click.native.stop="submitAudit(scope.row)"
>提交审核
</el-button
>
<el-button
type="text"
size="small"
@click.native.stop="deleteDialog(scope.row.id)"
type="text"
size="small"
@click.native.stop="deleteDialog(scope.row.id)"
>删除
</el-button
>
@ -94,25 +95,25 @@
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:limit.sync="filterQuery.limit"
:page.sync="filterQuery.page"
@pagination="getList"
v-show="total>0"
:total="total"
:limit.sync="filterQuery.limit"
:page.sync="filterQuery.page"
@pagination="getList"
></pagination>
</el-card>
<el-dialog
:title="formMap[formName]"
:visible.sync="formVisible"
:close-on-click-modal="false"
:close-on-press-escape="false"
width="85%"
v-if="formVisible"
:title="formMap[formName]"
:visible.sync="formVisible"
:close-on-click-modal="false"
:close-on-press-escape="false"
width="85%"
v-if="formVisible"
>
<deviceReceiveOrderModify
:deviceReceiveOrder="deviceReceiveOrder"
:closeDialog="closeDialog"
:deviceReceiveOrder="deviceReceiveOrder"
:closeDialog="closeDialog"
></deviceReceiveOrderModify>
</el-dialog>
@ -124,7 +125,13 @@ import {getDeptListByUser} from "@/api/auth/authDept";
import {findInvByUser} from "@/api/system/invSubWarehouse";
import {getInvSpaceList} from "@/api/inventory/invSpace";
import deviceReceiveOrderModify from "@/views/inventory/DeviceReceiveOrderModify.vue";
import {submitAudit, deleteDeviceReceiveOrder, getDeviceReceiveOrderList} from "@/api/inventory/deviceReceiveOrder";
import {
submitAudit,
deleteDeviceReceiveOrder,
getDeviceReceiveOrderList,
getConfig
} from "@/api/inventory/deviceReceiveOrder";
import {isBlank} from "@/utils/strUtil";
export default {
name: "DeviceReceiveOrderNew",
@ -134,6 +141,7 @@ export default {
orderId: null,
fromDeptCode: this.$store.getters.locDeptCode,
fromInvCode: null,
receiveUserName: null,
fromInvSpaceCode: null,
status: 0,
page: 1,
@ -144,9 +152,12 @@ export default {
deptList: [],
invList: [],
spaceList: [],
actDateRange: [],
loading: false,
formVisible: false,
codeTableLoading: false,
showSearch: true,
paramValue: null,
statusMap: {
0: "草稿",
1: "未审核",
@ -154,13 +165,47 @@ export default {
},
formName: null,
formMap: {
add: "新增设备领用记录",
edit: "编辑设备领用记录"
add: "设备领用-库存产品录入",
edit: "设备领用-库存产品录入"
},
deviceReceiveOrder: {},
pickerOptions: {
shortcuts: [
{
text: "最近一周",
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
picker.$emit("pick", [start, end]);
},
},
{
text: "最近一个月",
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
picker.$emit("pick", [start, end]);
},
},
{
text: "最近三个月",
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
picker.$emit("pick", [start, end]);
},
},
],
},
};
},
methods: {
hideSearch() {
this.showSearch = !this.showSearch;
},
onReset() {
this.$router.push({
path: "",
@ -174,6 +219,7 @@ export default {
page: 1,
limit: 20,
};
this.actDateRange = [];
this.spaceList = [];
// this.getList();
this.getDeptList();
@ -184,6 +230,13 @@ export default {
},
getList() {
this.loading = true;
if (this.actDateRange !== null) {
this.filterQuery.startTime = this.actDateRange[0];
this.filterQuery.endTime = this.actDateRange[1];
} else {
this.filterQuery.startTime = null;
this.filterQuery.endTime = null;
}
getDeviceReceiveOrderList(this.filterQuery).then((res) => {
this.loading = false;
if (res.code === 20000) {
@ -201,17 +254,9 @@ export default {
this.total = 0;
})
},
deptChange() {
this.invList = [];
this.spaceList = [];
this.filterQuery.fromInvCode = null;
this.filterQuery.fromInvSpaceCode = null;
this.getInvList();
},
getDeptList() {
getDeptListByUser().then((res) => {
this.deptList = res.data || [];
this.getInvList();
this.getList();
});
},
@ -223,15 +268,19 @@ export default {
getInvList() {
let params = {deptCode: this.filterQuery.fromDeptCode};
findInvByUser(params)
.then((response) => {
this.invList = response.data || [];
this.getList();
})
.catch(() => {
});
.then((response) => {
this.invList = response.data || [];
this.getList();
})
.catch(() => {
});
},
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) => {
this.spaceList = res.data.list || [];
this.getList();
@ -296,6 +345,12 @@ export default {
};
},
created() {
//
getConfig().then((res) => {
if(res.code == 20000 && !isBlank(res.data.paramValue)){
this.paramValue =res.data.paramValue
}
})
this.getDeptList();
},
};

Loading…
Cancel
Save