设备代码提交

20231126-yw
郑明梁 2 years ago
parent b86029a981
commit d29583a78e

@ -34,29 +34,30 @@
<el-col :span="8">
<el-form-item class="query-form-item" label="负责人:">
<el-input v-model="filterQuery.manager" placeholder="请输入负责人" style="width: 90%" clearable></el-input>
<el-input v-model="filterQuery.manager" placeholder="请输入负责人" style="width: 90%"
clearable></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item class="query-form-item" label="设备状态:">
<el-select v-model="filterQuery.status"
style="width: 90%"
placeholder="请选择设备状态"
clearable
<el-col :span="8">
<el-form-item class="query-form-item" label="设备状态:">
<el-select v-model="filterQuery.status"
style="width: 90%"
placeholder="请选择设备状态"
clearable
>
<el-option
v-for="item in statusMap"
:key="item.value"
:value="item.value"
:label="item.label"
>
<el-option
v-for="item in statusMap"
:key="item.value"
:value="item.value"
:label="item.label"
>
{{ item.label }}
</el-option>
</el-select>
</el-form-item>
</el-col>
{{ item.label }}
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
@ -131,6 +132,8 @@
@row-click="listClick"
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="managerName" show-overflow-tooltip width="200"></el-table-column>
<el-table-column label="设备名称" prop="deviceName" width="200"></el-table-column>
<el-table-column label="规格型号" prop="ggxh" width="200" show-overflow-tooltip></el-table-column>
<el-table-column label="物资编码" prop="code" width="180"></el-table-column>
@ -143,14 +146,13 @@
<el-tag>{{ status[scope.row.status] }}</el-tag>
</template>
</el-table-column>
<el-table-column label="登记部门" prop="deptName" width="180"></el-table-column>
<el-table-column label="负责人" prop="managerName" show-overflow-tooltip width="200"></el-table-column>
<el-table-column label="生产企业" prop="manufactory" show-overflow-tooltip width="200"></el-table-column>
<el-table-column label="注册/备案号" prop="zczbhhzbapzbh" width="300"></el-table-column>
<el-table-column label="供应商" prop="supName" width="300"></el-table-column>
<el-table-column label="操作" width="120" fixed="right">
<template slot-scope="scope">
<el-button type="text" size="small" @click.native.stop="printOrder(scope.row)">打印</el-button>
<el-button type="text" size="small" @click.native.stop="editOrder(scope.row)">编辑</el-button>
<el-button type="text" size="small" @click.native.stop="printOrder(scope.row)">标签打印</el-button>
</template>
</el-table-column>
</el-table>
@ -164,12 +166,6 @@
</el-card>
<el-tabs type="border-card" style="margin: 15px">
<el-tab-pane label="基本信息">
<DeviceModelDetail
:rowData="selectedRowData"
v-if="isInformation"
></DeviceModelDetail>
</el-tab-pane>
<el-tab-pane label="设备资质">
<checkResultPanel
:idQuery="filterQuery"
@ -178,9 +174,9 @@
</el-tab-pane>
<el-tab-pane label="技术资料">
<technical
:idQuery="filterQuery"
:rowData="selectedRowData"
></technical >
:idQuery="filterQuery"
:rowData="selectedRowData"
></technical>
</el-tab-pane>
<el-tab-pane label="相关人员">
@ -219,6 +215,21 @@
:closeDialog="closeInspectSetDialog"
></inspectSetModifyDialog>
</el-dialog>
<el-dialog
title="设备编辑"
:visible.sync="isInformation"
:close-on-click-modal="false"
:close-on-press-escape="false"
width="90%"
v-if="isInformation"
>
<DeviceModelDetail
:rowData="selectedRowData"
:closeDialog="closeInspectSetDialog"
></DeviceModelDetail>
</el-dialog>
</div>
</template>
@ -230,7 +241,7 @@ import deptDeviceModifyDialog from "@/views/inventory/deptDeviceModifyDialog.vue
import DeviceModelDetail from "@/views/inventory/DeviceModelDetail.vue";
import inspectSetModifyDialog from "@/views/inventory/InspectSetModifyDialog.vue";
import checkResultPanel from "@/views/inventory/invDeviceEditDialog.vue";
import technical from "@/views/inventory/invTechniclDialog.vue";
import technical from "@/views/inventory/invTechniclDialog.vue";
export default {
@ -253,7 +264,7 @@ export default {
total: 0,
deptList: [],
invList: [],
isInformation:false,
isInformation: false,
loading: false,
fromOptions: [],
formData: {
@ -284,28 +295,18 @@ export default {
value: 1
},
{
label: '报修',
label: '停用',
value: 2
},
{
label: '养护中',
label: '报废',
value: 3
},
{
label: '已养护',
value: 4
},
{
label: '已报废',
value: 5
}
],
status: {
1: "正常",
2: "报修",
3: "养护中",
4: "已养护",
5: "已报废"
2: "停用",
3: "报废",
},
addTypeMap: [
{
@ -329,12 +330,6 @@ export default {
methods: {
listClick(row) {
this.selectedRowData = row // selectedRow
this.isInformation = false
this.$nextTick(() => {
//
this.isInformation = true
});
},
keyup_submit(event) {
this.filterQuery.page = 1;
@ -360,7 +355,7 @@ export default {
page: 1,
limit: 10,
};
this.selectedRowData=null;
this.selectedRowData = null;
this.getDeptList();
},
onSubmit() {
@ -406,11 +401,14 @@ export default {
getInvListByUser(params)
.then((response) => {
this.invList = response.data || [];
this.getList();
})
.catch(() => {
});
},
editOrder(row) {
this.selectedRowData = row //
this.isInformation = true
},
addDevice() {
this.formName = 'add';
this.deviceDialogVisible = true;
@ -506,7 +504,7 @@ export default {
binaryData.push(response);
//blob
let url = window.URL.createObjectURL(
new Blob(binaryData, {type: "application/pdf"})
new Blob(binaryData, {type: "application/pdf"})
);
this.loading = false;
window.open(url);//pdf

@ -58,20 +58,15 @@
</el-form-item>
</el-col>
<el-col :span="10" v-if="paramValue == 0">
<el-col :span="10">
<el-form-item class="query-form-item" label="设备来源:">
<el-select v-model="formData.fromInvCode" placeholder="请选择设备来源信息"
:disabled="detailList.length >0 && paramValue == 0 "
<el-select v-model="formData.type" placeholder="请选择设备来源信息"
:disabled="detailList.length >0"
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>
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.code }}</span>
</el-option>
<el-option label="库存设备" :value=1></el-option>
<el-option label="科室设备" :value=2></el-option>
<el-option label="其他" :value=3></el-option>
</el-select>
</el-form-item>
</el-col>
@ -100,7 +95,7 @@
style="margin-left: 15px"
>扫码添加
</el-button>
</el-col >
</el-col>
<el-col :span="4">
<el-button-group style="display: flex;margin-right: 20px;float: right;">
<el-button type="primary" @click.native.stop="selectInvProduct(true)" :loading="loading">选入设备
@ -110,8 +105,6 @@
</el-row>
<el-table v-loading="loading" :data="detailList" style="width: 100%;margin-top: 20px;"
highlight-current-row
border max-height="300" height="300">
@ -180,16 +173,18 @@
v-if="selectInvProductVisible"
:append-to-body='true'
>
<el-form label-width="100px" :model="filterQuery" size="mini" v-show="showSearch">
<el-form label-width="100px" :model="filterQuery" size="mini" v-show="showSearch">
<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-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-input v-model="filterQuery.cpmctymc" style="width: 90%" placeholder="请输入设备名称"
clearable></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
@ -201,17 +196,36 @@
<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-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-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-input v-model="filterQuery.supName" 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-select v-model="filterQuery.invCode" placeholder="请选择设备来源信息" 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>
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.code }}</span>
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
@ -227,7 +241,8 @@
<el-divider style="margin: 15px"></el-divider>
<el-table v-loading="loading" :data="productList" style="width: 100%" highlight-current-row="false" :row-key="getRowKeys"
<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>
@ -263,38 +278,44 @@
v-if="selectProductVisible"
:append-to-body='true'
>
<el-form label-width="100px" :model="filterProductQuery" size="mini" v-show="showSearch">
<el-form label-width="100px" :model="filterProductQuery" size="mini" v-show="showSearch">
<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-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-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-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-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-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-input v-model="filterProductQuery.companyName" style="width: 90%" placeholder="请输入供应商"
clearable></el-input>
</el-form-item>
</el-col>
</el-row>
@ -315,8 +336,8 @@
</el-table-column>
<el-table-column label="序号" type="index"></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="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>
@ -330,6 +351,93 @@
@pagination="queryProductsList"
></pagination>
</el-dialog>
<el-dialog
title="设备登记-科室设备录入"
:visible.sync="selectDeviceVisible"
:close-on-click-modal="false"
:close-on-press-escape="false"
width="85%"
v-if="selectDeviceVisible"
:append-to-body='true'
>
<el-form label-width="100px" :model="filterDeviceQuery" size="mini" v-show="showSearch">
<el-row>
<el-col :span="8">
<el-form-item class="query-form-item" label="DI/物资编码:">
<el-input v-model="filterDeviceQuery.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="filterDeviceQuery.deviceName" placeholder="请输入设备名称" style="width: 90%"
clearable></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item class="query-form-item" label="规格型号:">
<el-input v-model="filterDeviceQuery.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="filterDeviceQuery.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="filterDeviceQuery.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="filterDeviceQuery.supName" placeholder="请输入供应商" style="width: 90%"
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="onDeviceReset"></el-button>
<el-button type="primary" icon="el-icon-search" @click="queryDeviceList"></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="deviceList" 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="deptName" width="180"></el-table-column>
<el-table-column label="设备名称" prop="deviceName" width="200"></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="supName" width="300"></el-table-column>
</el-table>
<pagination
v-show="udiDeviceTotal>0"
:total="udiDeviceTotal"
:limit.sync="filterDeviceQuery.limit"
:page.sync="filterDeviceQuery.page"
@pagination="queryProductsList"
></pagination>
</el-dialog>
</div>
</template>
@ -350,6 +458,7 @@ import {
import {getInvMAProducts} from "@/api/inventory/invPorduct";
import {isBlank} from "@/utils/strUtil";
import {listDeptUser} from "@/api/system/deptUser";
import {getDeptDeviceList} from "@/api/inventory/deptDevice";
export default {
props: {
@ -417,6 +526,18 @@ export default {
currentRow: {},
selectedIndex: null,
showSearch: true,
selectDeviceVisible: false,
filterDeviceQuery: {
nameCode: null,
cpmctymc: null,
batchNo: null,
invCode: null,
invSpaceCode: null,
page: 1,
limit: 10
},
udiDeviceTotal: 0,
deviceList: [],
}
},
methods: {
@ -466,7 +587,8 @@ export default {
this.formData.fromInvSpaceCode = "";
},
selectInvProduct(obj) {
if (this.paramValue == 0) {
if (this.formData.type == 1) {
//
let message = this.verifyOrder(obj);
if (!isBlank(message)) {
this.$message.warning(message);
@ -476,14 +598,20 @@ export default {
this.saveOrder();
this.onReset();
this.selectInvProductVisible = true;
this.filterQuery.invCode = this.formData.fromInvCode;
} else {
this.getInvList();
} else if (this.formData.type == 2) {
//
//
this.saveOrder();
this.onDeviceReset();
this.selectDeviceVisible = true;
} else if (this.formData.type == 3) {
//
//
this.saveOrder();
this.onProductReset();
this.selectProductVisible = true;
}
// this.filterQuery.invSpaceCode = this.formData.fromInvSpaceCode;
},
saveMAOrder() {
this.saveOrder();
@ -517,10 +645,10 @@ export default {
},
saveDeviceReceiveOrder() {
if(this.paramValue == 0){
if (this.paramValue == 0) {
var message = this.verifyOrder()
}else{
var message = this.verifyProductOrder()
} else {
var message = this.verifyProductOrder()
}
if (isBlank(message)) {
this.saveOrder();
@ -560,27 +688,16 @@ export default {
verifyOrder(obj) {
if (isBlank(this.formData.fromDeptCode)) {
return "请选择登记部门!";
} else if (isBlank(this.formData.fromInvCode)) {
return "请选择来源!";
} else if (isBlank(obj) && (this.detailList == null || this.detailList.length == 0 )) {
} else if (isBlank(obj) && (this.detailList == null || this.detailList.length == 0)) {
return "请选择设备!";
}
},
verifyProductOrder() {
if (this.detailList == null || this.detailList.length == 0) {
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) {
@ -714,6 +831,18 @@ export default {
this.multiProduct = [];
this.queryProductsList();
},
onDeviceReset() {
this.filterDeviceQuery = {
nameCode: null,
cpmctymc: null,
batchNo: null,
invSpaceCode: null,
page: 1,
limit: 10
};
this.multiProduct = [];
this.queryDeviceList();
},
handleCurrentChange(val) {
this.filterQuery.page = val;
this.queryInvProducts();
@ -723,8 +852,6 @@ export default {
this.queryInvProducts();
},
queryInvProducts() {
this.filterQuery.invCode = this.formData.fromInvCode;
// this.filterQuery.invSpaceCode = this.formData.fromInvSpaceCode;
getInvMAProducts(this.filterQuery).then((res) => {
if (res.code === 20000) {
this.productList = res.data.list || [];
@ -762,10 +889,11 @@ export default {
return;
}
let invProductIds = [];
this.multiProduct.forEach(item => {
invProductIds.push(item.id);
});
this.multiProduct.forEach(item => {
invProductIds.push(item.id);
});
let params = {
type: this.formData.type,
orderIdFk: this.formData.orderId,
invProductIds: invProductIds,
invCode: this.formData.fromInvCode,
@ -776,6 +904,7 @@ export default {
this.$message.success("录入成功!");
this.selectInvProductVisible = false;
this.selectProductVisible = false;
this.selectDeviceVisible = false
this.getList();
} else {
this.$message.error(res.message);
@ -793,6 +922,22 @@ export default {
this.multiProduct.push(item);
});
},
queryDeviceList() {
getDeptDeviceList(this.filterDeviceQuery).then((res) => {
if (res.code === 20000) {
this.deviceList = res.data.list || [];
this.udiDeviceTotal = res.data.total || 0;
} else {
this.$message.error(res.message);
this.deviceList = [];
this.udiDeviceTotal = 0;
}
}).catch((error) => {
this.$message.error(error.message);
this.deviceList = [];
this.udiDeviceTotal = 0;
});
}
},
created() {
//

Loading…
Cancel
Save