feat: 本部门保修单、报修单大厅、我的报修单、我的维修单

dev_ksck2.0
chenhc 11 months ago
parent 5fc6e1cb3d
commit 9963ba9943

@ -10,6 +10,15 @@ export function listDeptUser(query) {
})
}
// 查询部门列表
export function filterListByDeptCode(query) {
return request({
url: '/udi/auth/dept/user/list',
method: 'get',
params: query
})
}
export function removeUser(data) {
return axios({
url: "/udi/auth/dept/user/delete",

@ -2,8 +2,9 @@ import {filterList} from "@/api/system/invWarehouse";
export default {
name: "deptSelect",
props: {value: {required: true},notCode:null},
name: 'deptSelect',
props: { value: { required: true }, notCode: null,maintenance: null,
},
data() {
return {
val: '',
@ -24,7 +25,11 @@ export default {
},
methods: {
getList() {
filterList({enable: true}).then(res => {
let data =
{enable: true,
}
if (this.maintenance != null) data.maintenance = true
filterList(data).then(res => {
if (res.code == 20000) {
this.list = res.data.list || []
if(this.notCode!=null) {

@ -2,21 +2,21 @@
<div>
<el-card>
<el-form :model="query" v-if="showSearch" label-width="auto">
<el-form :model="detailQuery" v-if="showSearch" label-width="auto">
<el-row :gutter="20">
<el-col :span="6">
<el-form-item label="设备编码">
<el-input v-model="query.deviceCode" clearable/>
<el-input v-model="detailQuery.deviceCode" clearable/>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="设备名称">
<el-input v-model="query.productName" clearable/>
<el-input v-model="detailQuery.productName" clearable/>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="设备状态">
<el-select v-model="query.status"
<el-select v-model="detailQuery.status"
style="width: 100%"
clearable>
<el-option
@ -42,78 +42,94 @@
<el-button type="primary" icon="el-icon-search" @click="search"
>查询
</el-button>
<el-button type="primary" icon="el-icon-plus" @click="push"
>选入
</el-button>
</el-button-group>
</div>
<el-divider style="margin: 15px"></el-divider>
<el-table :data="list" @row-click="rowClick" v-loading="loading" click-row-light>
<el-table-column label="序号" width="50" type="index"/>
<el-table-column label="科室" width="150" prop="deptName"/>
<el-table-column label="最小销售标识" width="150" prop="nameCode"/>
<el-table-column label="设备名称" width="150" prop="productName"/>
<el-table-column label="规格型号" width="160" prop="ggxh"/>
<el-table-column label="状态" width="120" prop="statusName">
<template slot-scope="scope">
<el-tag :type="deviceStatus[scope.row.status].tagType">{{ scope.row.statusName }}</el-tag>
</template>
</el-table-column>
<el-table-column label="巡检锁定" width="120">
<template slot-scope="scope">
<el-tag :type="scope.row.checkLock?'primark':'info'">{{ scope.row.checkLock ? '是' : '否' }}</el-tag>
</template>
</el-table-column>
<el-table-column label="数量" width="120" prop="count"/>
<el-table-column label="计量单位" width="100" prop="measname"/>
<el-table-column label="生产企业" width="180" prop="manufactory"/>
<!-- <el-table-column label="批次号" width="100" prop="batchNo"/>-->
<!-- <el-table-column label="序列号" width="100" prop="serialNo"/>-->
<!-- <el-table-column label="生产日期" width="140" prop="productionDate"/>-->
<!-- <el-table-column label="过期时间" width="140" prop="expireDate"/>-->
<!-- <el-table-column label="供应商" width="100" prop="supName"/>-->
<!-- <el-table-column label="udi码" width="150" prop="udi"/>-->
<!-- <el-table-column label="注册/备案号" width="150" prop="zczbhhzbapzbh"/>-->
<!-- <el-table-column label="操作" width="120" fixed="right">-->
<!-- <template scope="scope">-->
<!-- <el-table :data="list" @row-click="rowClick" v-loading="loading" click-row-light>-->
<!-- <el-table-column label="序号" width="50" type="index"/>-->
<!-- <el-table-column label="科室" width="150" prop="deptName"/>-->
<!-- <el-table-column label="最小销售标识" width="150" prop="nameCode"/>-->
<!-- <el-table-column label="设备名称" width="150" prop="productName"/>-->
<!-- <el-table-column label="规格型号" width="160" prop="ggxh"/>-->
<!-- <el-table-column label="状态" width="120" prop="statusName">-->
<!-- <template slot-scope="scope">-->
<!-- <el-tag :type="deviceStatus[scope.row.status].tagType">{{ scope.row.statusName }}</el-tag>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column label="巡检锁定" width="120">-->
<!-- <template slot-scope="scope">-->
<!-- <el-tag :type="scope.row.checkLock?'primark':'info'">{{ scope.row.checkLock ? '是' : '否' }}</el-tag>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column label="数量" width="120" prop="count"/>-->
<!-- <el-table-column label="计量单位" width="100" prop="measname"/>-->
<!-- <el-table-column label="生产企业" width="180" prop="manufactory"/>-->
<!-- &lt;!&ndash; <el-table-column label="批次号" width="100" prop="batchNo"/>&ndash;&gt;-->
<!-- &lt;!&ndash; <el-table-column label="序列号" width="100" prop="serialNo"/>&ndash;&gt;-->
<!-- &lt;!&ndash; <el-table-column label="生产日期" width="140" prop="productionDate"/>&ndash;&gt;-->
<!-- &lt;!&ndash; <el-table-column label="过期时间" width="140" prop="expireDate"/>&ndash;&gt;-->
<!-- &lt;!&ndash; <el-table-column label="供应商" width="100" prop="supName"/>&ndash;&gt;-->
<!-- &lt;!&ndash; <el-table-column label="udi码" width="150" prop="udi"/>&ndash;&gt;-->
<!-- &lt;!&ndash; <el-table-column label="注册/备案号" width="150" prop="zczbhhzbapzbh"/>&ndash;&gt;-->
<!-- &lt;!&ndash; <el-table-column label="操作" width="120" fixed="right">&ndash;&gt;-->
<!-- &lt;!&ndash; <template scope="scope">&ndash;&gt;-->
<!-- <el-button type="text"-->
<!-- >详情-->
<!-- </el-button>-->
<!-- </template>-->
<!-- </el-table-column>-->
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="query.page"
:limit.sync="query.limit"
@pagination="getList"
/>
</el-card>
<!-- &lt;!&ndash; <el-button type="text"&ndash;&gt;-->
<!-- &lt;!&ndash; >详情&ndash;&gt;-->
<!-- &lt;!&ndash; </el-button>&ndash;&gt;-->
<!-- &lt;!&ndash; </template>&ndash;&gt;-->
<!-- &lt;!&ndash; </el-table-column>&ndash;&gt;-->
<!-- </el-table>-->
<!-- <pagination-->
<!-- v-show="total>0"-->
<!-- :total="total"-->
<!-- :page.sync="query.page"-->
<!-- :limit.sync="query.limit"-->
<!-- @pagination="getList"-->
<!-- />-->
<!-- </el-card>-->
<el-card>
<div slot="header" class="clearfix">
<div class="fl">
{{
`设备详情 ${clickRow ? '——' + clickRow.productName + '(' + clickRow.ggxh + ')' : ''}`
}}
</div>
<div class="fr">
<el-button @click="getDetailList"></el-button>
</div>
</div>
<el-form v-if="clickRow" :model="detailQuery" inline label-width="auto">
<el-row :gutter="20">
<el-col>
<el-form-item label="设备编码">
<el-input v-model.trim="detailQuery.deviceCode" clearable/>
</el-form-item>
<el-button type="primary" icon="el-icon-search" @click="getDetailList"
>查询
</el-button>
</el-col>
</el-row>
</el-form>
<el-table :data="detailList" v-loading="detailLoading">
<!-- <el-card>-->
<!-- <div slot="header" class="clearfix">-->
<!-- <div class="fl">-->
<!-- {{-->
<!-- `设备详情 ${clickRow ? '——' + clickRow.productName + '(' + clickRow.ggxh + ')' : ''}`-->
<!-- }}-->
<!-- </div>-->
<!-- <div class="fr">-->
<!-- <el-button @click="getDetailList"></el-button>-->
<!-- </div>-->
<!-- </div>-->
<!-- <el-form v-if="clickRow" :model="detailQuery" inline label-width="auto">-->
<!-- <el-row :gutter="20">-->
<!-- <el-col>-->
<!-- <el-form-item label="设备编码">-->
<!-- <el-input v-model.trim="detailQuery.deviceCode" clearable/>-->
<!-- </el-form-item>-->
<!-- <el-button type="primary" icon="el-icon-search" @click="getDetailList"-->
<!-- >查询-->
<!-- </el-button>-->
<!-- </el-col>-->
<!-- </el-row>-->
<!-- </el-form>-->
<el-table
:data="detailList"
style="width: 100%"
highlight-current-row="false"
v-loading="detailLoading"
:row-class-name="tableRowClassName"
@current-change="handleChange"
ref="multipleTable"
>
<el-table-column label width="45">
<template slot-scope="scope">
<el-radio :label="scope.row.deviceCode" v-model="radioCheck"><span></span></el-radio>
</template>
</el-table-column>
<el-table-column label="序号" width="50" type="index"/>
<el-table-column label="科室" width="120" prop="deptName"/>
<el-table-column label="设备编码" width="150" prop="deviceCode"/>
@ -161,11 +177,11 @@
>设备码
</el-button>
</el-popover>
<el-button v-if="isChoose&&scope.row.status==deviceStatus.NORMAL.key&&scope.row.checkLock==false"
type="text"
@click="chooseFunc(scope.row)"
>选择
</el-button>
<!-- <el-button v-if="isChoose&&scope.row.status==deviceStatus.NORMAL.key&&scope.row.checkLock==false"-->
<!-- type="text"-->
<!-- @click="chooseFunc(scope.row)"-->
<!-- >选择-->
<!-- </el-button>-->
<el-button
type="text"
size="small"
@ -183,6 +199,40 @@
:limit.sync="detailQuery.limit"
@pagination="getDetailList"
/>
<br> </br>
<br> </br>
<div class="grid-container" v-if="this.item != null ">
<el-card >
<div slot="header" class="clearfix">
<div class="fl">
设备号
{{ item.deviceCode }}
</div>
</div>
<el-form :model="item" label-width="auto">
<el-descriptions border label-style="width:70px" :column="2">
<el-descriptions-item label="名称">
{{ item.productName }}
</el-descriptions-item>
<el-descriptions-item label="规格">
{{ item.ggxh }}
</el-descriptions-item>
<el-descriptions-item label="问题描述">
<el-row>
<el-col>
<el-form-item label=" " prop="description">
<el-input type="textarea" resize="none" :autosize="{ minRows: 4, maxRows: 4 }" clearable
show-word-limit
maxlength="300" v-model.trim="item.description"/>
</el-form-item>
</el-col>
</el-row>
</el-descriptions-item>
</el-descriptions>
</el-form>
</el-card>
</div>
</el-card>

@ -75,7 +75,7 @@
<el-table-column label="生产企业" width="180" prop="manufactory"/>
<el-table-column label="操作" fixed="right" width="80">
<template slot-scope="scope">
<el-button type="text" v-if="!scope.row.finishFlag" @click="finishFunc(scope.row)"></el-button>
<el-button type="text" v-if="!scope.row.finishFlag" @click="finishFuncFlag(scope.row)"></el-button>
</template>
</el-table-column>
</el-table>
@ -87,6 +87,57 @@
@pagination="getList"
/>
</el-card>
<el-dialog
visible
v-if="finishFlag"
@close="finishFuncFlagClose"
title="维修单信息"
width="80%"
>
<el-card v-if="currentRow">
<div slot="header" class="clearfix">
<div class="fl">
{{ `设备号:${currentRow.deviceCode}` }}
</div>
<div class="fr">
<el-button type="primary" @click="finishFunc" >完成维修</el-button>
</div>
</div>
<el-descriptions border label-style="width:90px" :column="4">
<el-descriptions-item label="维修号">{{ currentRow.id }}</el-descriptions-item>
<el-descriptions-item label="状态"><el-tag :type="currentRow.finishFlag?'success':'warning'">{{
currentRow.finishFlag ? '已完成' : '未完成'
}}</el-tag></el-descriptions-item>
<el-descriptions-item label="名称">{{ currentRow.productName }}</el-descriptions-item>
<el-descriptions-item label="规格">{{ currentRow.ggxh }}</el-descriptions-item>
<el-descriptions-item label="销售标识">{{ currentRow.nameCode }}</el-descriptions-item>
<el-descriptions-item label="注册/备案号">{{ currentRow.zczbhhzbapzbh }}</el-descriptions-item>
<el-descriptions-item label="生产企业">{{ currentRow.manufactory }}</el-descriptions-item>
<el-descriptions-item label="供应商">{{ currentRow.supName }}</el-descriptions-item>
<el-descriptions-item label="批次号">{{ currentRow.batchNo }}</el-descriptions-item>
<el-descriptions-item label="序列号">{{ currentRow.serialNo }}</el-descriptions-item>
<el-descriptions-item label="udi码">{{ currentRow.udi }}</el-descriptions-item>
<el-descriptions-item label="生产日期">{{ currentRow.productionDate }}</el-descriptions-item>
<el-descriptions-item label="过期时间">{{ currentRow.expireDate }}</el-descriptions-item>
<el-descriptions-item label="维修方式" :span="1">
{{ currentRow.innerFlag ? '内部维修' : '外部维修' }}
</el-descriptions-item>
<el-descriptions-item label="维修人姓名" :span="1">
{{ currentRow.repairUserName }}
</el-descriptions-item>
<el-descriptions-item label="维修人电话" :span="1">
{{ currentRow.repairUserPhone }}
</el-descriptions-item>
<el-descriptions-item label="问题描述" :label-style="{'height': '100px'}" :span="4">
{{ currentRow.description }}
</el-descriptions-item>
<el-descriptions-item label="诊断信息" :label-style="{'height': '100px'}" :span="4">
{{ currentRow.diagnosisInfo }}
</el-descriptions-item>
</el-descriptions>
</el-card>
</el-dialog>
</div>
</template>

@ -5,15 +5,20 @@
<el-form :model="query" v-if="showSearch" label-width="auto">
<el-row :gutter="20">
<el-col :span="6">
<el-form-item label="受理状态">
<el-select v-model="query.status" clearable>
<el-option v-for="item in deviceRepairApplyStatus" :label="item.desc" :value="item.key"></el-option>
</el-select>
<el-form-item label="报修信息">
<el-input v-model.trim="query.repairInfo" clearable/>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="报修号">
<el-input v-model.trim="query.applyId" clearable/>
<el-form-item label="受理信息">
<el-input v-model.trim="query.acceptInfo" clearable/>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="受理状态">
<el-select v-model="query.status" clearable>
<el-option v-for="item in deviceRepairApplyStatus" :label="item.desc" :value="item.key" :key="item.key"></el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
@ -145,24 +150,29 @@
</div>
</div>
<el-form :model="saveData" ref="saveForm" :rules="formRule" label-width="auto">
<el-row :gutter="20">
<el-col :span="8">
<el-form-item label="报修部门">
{{ user.locDeptName }}
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="报修人">
{{ user.employeeName }}
<el-row :gutter="24">
<el-col :span="12">
<el-form-item label="报修部门" prop="applyDeptCode">
<deptSelect :value.sync="saveData.applyDeptCode"/>
</el-form-item>
</el-col>
<el-col :span="8">
<!-- <el-col :span="8">-->
<!-- <el-form-item label="报修部门">-->
<!-- {{ user.locDeptName }}-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- <el-col :span="8">-->
<!-- <el-form-item label="报修人">-->
<!-- {{ user.employeeName }}-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<el-col :span="12">
<el-form-item label="报修人电话" prop="applyUserPhone">
<el-input v-model="saveData.applyUserPhone" clearable show-word-limit maxlength="20"/>
</el-form-item>
</el-col>
<el-col>
<el-card>
<el-card style="background-color: #e6f1ff;">
<div slot="header" class="clearfix">
<div class="fl">
<el-form-item style="margin-bottom: 0px;" label-width="auto" label="报修设备" prop="details">
@ -176,21 +186,22 @@
</div>
</div>
<div class="grid-container" v-if="saveData.details&&saveData.details.length>0">
<el-card :body-style="{padding:0,paddingTop:'10px'}" class="grid-item"
v-for="(item,i) in saveData.details">
<div slot="header" class="clearfix">
<el-card
:body-style="{padding:0,paddingTop:'10px' }" class="grid-item"
v-for="(item,i) in saveData.details" :key="item.deviceCode">
<div slot="header" class="clearfix" >
<div class="fl">
设备号{{ item.deviceCode }}
</div>
<div class="fr">
<div class="fr" >
<el-button type="text" @click="removeDetail(i)"></el-button>
</div>
</div>
<el-form :model="item" :rules="detailRules" :ref="item.deviceCode" label-width="auto">
<el-form :model="item" :rules="detailRules" :ref="item.deviceCode" label-width="auto" >
<el-descriptions border label-style="width:70px" :column="2">
<el-descriptions-item label="名称">{{ item.productName }}</el-descriptions-item>
<el-descriptions-item label="规格">{{ item.ggxh }}</el-descriptions-item>
<el-descriptions-item label="问题描述">
<el-descriptions-item label="名称" >{{ item.productName }}</el-descriptions-item>
<el-descriptions-item label="规格" >{{ item.ggxh }}</el-descriptions-item>
<el-descriptions-item label="问题描述" >
<el-row>
<el-col>
<el-form-item label=" " prop="description">

@ -1,11 +1,11 @@
<template>
<div>
<el-card :body-style="{padding:0}">
<el-tabs type="border-card" v-model="tabActive" :before-leave="tabClick">
<el-tab-pane label="我的受理" :name="2"></el-tab-pane>
<el-tab-pane label="报修大厅" :name="1"></el-tab-pane>
<el-card>
<el-card >
<!-- <el-tabs type="border-card" v-model="tabActive" :before-leave="tabClick">-->
<!-- <el-tab-pane label="我的受理" :name="2"></el-tab-pane>-->
<!-- <el-tab-pane label="报修大厅" :name="1"></el-tab-pane>-->
<!-- <el-card>-->
<el-form :model="query" v-if="showSearch" label-width="auto">
<el-row :gutter="20">
@ -80,7 +80,8 @@
/>
</el-card>
<el-card>
<!-- <br></br>-->
<el-card>
<div slot="header" class="clearfix">
<div class="fl">
{{ `报修单详情 ${clickRow ? '——' + clickRow.id : ''}` }}
@ -141,8 +142,8 @@
</el-card>
</el-tabs>
</el-card>
<!-- </el-tabs>-->
<el-dialog
:visible="detailFlag"
@ -194,10 +195,28 @@
</el-radio-group>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item v-if="diagnosisData.repairFlag" label="维修部门" :span="3">
<el-form-item label=" " prop="repairDeptCode" style="margin-bottom: 10px">
<deptSelect :value.sync="diagnosisData.repairDeptCode" :maintenance="true" placeholder="请选择报修部门" />
</el-form-item>
</el-descriptions-item>
<el-descriptions-item v-if="diagnosisData.repairFlag" label="维修人姓名" :span="3">
<el-form-item label=" " prop="repairUserName" style="margin-bottom: 10px">
<el-input v-model.trim="diagnosisData.repairUserName" placeholder="请输入维修人姓名"/>
<el-select
v-model="diagnosisData.repairUserName"
>
<el-option
v-for="(item, index) in userlist"
:key="index"
:label="item.employeeName"
:value="item.employeeName"
/>
</el-select>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item v-if="diagnosisData.repairFlag" label="维修人电话" :span="3">
<el-form-item label=" " prop="repairUserPhone" style="margin-bottom: 10px">

@ -0,0 +1,266 @@
<template>
<div>
<!-- <el-card :body-style="{padding:0}">-->
<!-- <el-tabs type="border-card" v-model="tabActive" :before-leave="tabClick">-->
<!-- <el-tab-pane label="我的受理" :name="2"></el-tab-pane>-->
<!-- <el-tab-pane label="报修大厅" :name="1"></el-tab-pane>-->
<el-card>
<el-form :model="query" v-if="showSearch" label-width="auto">
<el-row :gutter="20">
<el-col :span="6" v-if="tabActive==2">
<el-form-item label="受理状态">
<el-select v-model="query.status" clearable>
<el-option v-for="item in deviceRepairApplyStatus" :label="item.desc" :value="item.key"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="报修部门">
<deptSelect :value.sync="query.applyDeptCode"/>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="报修号">
<el-input v-model.trim="query.applyId" clearable/>
</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="showSearch = !showSearch">显示/隐藏搜索栏
</el-button>
<el-button
type="primary"
icon="el-icon-refresh"
@click="onReset"
>重置
</el-button>
<el-button type="primary" icon="el-icon-search" @click="search"
>查询
</el-button>
</el-button-group>
</div>
<el-divider style="margin: 15px"></el-divider>
<el-table :data="list" ref="table"
v-loading="loading" @row-click="rowClick" highlight-current-row
click-row-light>
<el-table-column label="序号" width="50" type="index"/>
<el-table-column label="报修号" width="150" prop="id"/>
<el-table-column label="状态" width="150" prop="statusName">
<template slot-scope="scope">
<el-tag :type="deviceRepairApplyStatus[scope.row.status].tagType">{{ scope.row.statusName }}</el-tag>
</template>
</el-table-column>
<el-table-column label="报修部门" width="120" prop="applyDeptName"/>
<el-table-column label="报修人" width="120" prop="applyUserName"/>
<el-table-column label="报修人电话" width="120" prop="applyUserPhone"/>
<el-table-column label="报修时间" width="140" prop="applyTime"/>
<el-table-column label="受理部门" width="140" prop="confirmDeptName"/>
<el-table-column label="受理人" width="140" prop="confirmUserName"/>
<el-table-column label="受理人电话" width="140" prop="confirmPhone"/>
<el-table-column label="受理时间" width="140" prop="confirmTime"/>
<el-table-column label="设备数量" width="100" prop="deviceCount"/>
<el-table-column label="已完成数量" width="100" prop="finishCount"/>
<el-table-column v-if="tabActive==1" label="操作" fixed="right" width="80">
<template slot-scope="scope">
<el-button type="text" @click="confirm(scope.row)"></el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="query.page"
:limit.sync="query.limit"
@pagination="getList"
/>
</el-card>
<el-card>
<div slot="header" class="clearfix">
<div class="fl">
{{ `报修单详情 ${clickRow ? '——' + clickRow.id : ''}` }}
</div>
<div v-if="clickRow" class="fr">
<el-button @click="getDetailList"></el-button>
</div>
</div>
<el-table :data="detailList" v-loading="detailLoading">
<el-table-column label="序号" width="50" type="index"/>
<el-table-column label="设备编码" width="150" prop="deviceCode"/>
<el-table-column label="最小销售标识" width="150" prop="nameCode"/>
<el-table-column label="名称" width="150" prop="productName"/>
<el-table-column label="规格型号" width="160" prop="ggxh"/>
<el-table-column label="状态" width="160" prop="statusName">
<template slot-scope="scope">
<el-tag :type="deviceRepairApplyDetailStatus[scope.row.status].tagType">{{
scope.row.statusName
}}
</el-tag>
</template>
</el-table-column>
<el-table-column label="是否维修" width="160" prop="repairFlag">
<template slot-scope="scope">
<span>{{
scope.row.repairFlag==null?"":scope.row.repairFlag ? "维修" : "不维修(报废/销毁)"
}}
</span>
</template>
</el-table-column>
<el-table-column label="问题描述" width="160" prop="description"/>
<el-table-column label="诊断信息" width="160" prop="diagnosisInfo"/>
<el-table-column label="计量单位" width="100" prop="measname"/>
<el-table-column label="批次号" width="100" prop="batchNo"/>
<el-table-column label="序列号" width="100" prop="serialNo"/>
<el-table-column label="生产日期" width="140" prop="productionDate"/>
<el-table-column label="过期时间" width="140" prop="expireDate"/>
<el-table-column label="供应商" width="100" prop="supName"/>
<el-table-column label="udi码" width="150" prop="udi"/>
<el-table-column label="注册/备案号" width="150" prop="zczbhhzbapzbh"/>
<el-table-column label="生产企业" width="180" prop="manufactory"/>
<el-table-column v-if="tabActive==2" label="操作" fixed="right" width="100">
<template slot-scope="scope">
<el-button type="text" v-if="scope.row.status==deviceRepairApplyDetailStatus.WAIT_DIAGNOSIS.key"
@click="openDiagnosisDialog(scope.row)">诊断
</el-button>
<el-button type="text" v-if="scope.row.repairId" @click="repairId = scope.row.repairId"></el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="detailTotal>0"
:total="detailTotal"
:page.sync="detailQuery.page"
:limit.sync="detailQuery.limit"
@pagination="getDetailList"
/>
</el-card>
<!-- </el-tabs>-->
<!-- </el-card>-->
<el-dialog
:visible="detailFlag"
v-if="detailFlag"
width="80%"
title="诊断设备"
@close="detailFlag = false"
>
<el-card>
<div slot="header" class="clearfix">
<div class="fl">
设备号{{ detailData.deviceCode }}
</div>
<div class="fr">
<el-button @click="detailFlag = false">取消</el-button>
<el-button type="primary" @click="commitFunc"></el-button>
</div>
</div>
<el-form :model="diagnosisData" ref="saveForm" :rules="detailRules" label-width="auto">
<el-descriptions border label-style="width:90px" :column="3">
<el-descriptions-item label="名称">{{ detailData.productName }}</el-descriptions-item>
<el-descriptions-item label="规格">{{ detailData.ggxh }}</el-descriptions-item>
<el-descriptions-item label="销售标识">{{ detailData.nameCode }}</el-descriptions-item>
<el-descriptions-item label="注册/备案号">{{ detailData.zczbhhzbapzbh }}</el-descriptions-item>
<el-descriptions-item label="生产企业">{{ detailData.manufactory }}</el-descriptions-item>
<el-descriptions-item label="供应商">{{ detailData.supName }}</el-descriptions-item>
<el-descriptions-item label="批次号">{{ detailData.batchNo }}</el-descriptions-item>
<el-descriptions-item label="序列号">{{ detailData.serialNo }}</el-descriptions-item>
<el-descriptions-item label="udi码">{{ detailData.udi }}</el-descriptions-item>
<el-descriptions-item label="生产日期">{{ detailData.productionDate }}</el-descriptions-item>
<el-descriptions-item label="过期时间">{{ detailData.expireDate }}</el-descriptions-item>
<el-descriptions-item label=""></el-descriptions-item>
<el-descriptions-item label="问题描述" :label-style="{'height': '100px'}" :span="3">
{{ detailData.description }}
</el-descriptions-item>
<el-descriptions-item label="是否维修" :span="3">
<el-form-item label=" " prop="repairFlag" style="margin-bottom: 0">
<el-radio-group v-model="diagnosisData.repairFlag">
<el-radio :label="true">维修</el-radio>
<el-radio :label="false">不维修(报废/销毁)</el-radio>
</el-radio-group>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item v-if="diagnosisData.repairFlag" label="维修方式" :span="3">
<el-form-item label=" " prop="innerFlag" style="margin-bottom: 0">
<el-radio-group v-model="diagnosisData.innerFlag">
<el-radio :label="true">内部维修</el-radio>
<el-radio :label="false">外部维修</el-radio>
</el-radio-group>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item v-if="diagnosisData.repairFlag" label="维修部门" :span="3">
<el-form-item label=" " prop="repairDeptCode" style="margin-bottom: 10px">
<deptSelect :value.sync="diagnosisData.repairDeptCode" :maintenance="true" placeholder="请选择报修部门" />
</el-form-item>
</el-descriptions-item>
<el-descriptions-item v-if="diagnosisData.repairFlag" label="维修人姓名" :span="3">
<el-form-item label=" " prop="repairUserName" style="margin-bottom: 10px">
<el-select
v-model="diagnosisData.repairUserName"
>
<el-option
v-for="(item, index) in userlist"
:key="index"
:label="item.employeeName"
:value="item.employeeName"
/>
</el-select>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item v-if="diagnosisData.repairFlag" label="维修人电话" :span="3">
<el-form-item label=" " prop="repairUserPhone" style="margin-bottom: 10px">
<el-input v-model.trim="diagnosisData.repairUserPhone" placeholder="请输入维修人电话"/>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item label="诊断信息" :label-style="{'height': '100px'}" :span="3">
<el-form-item label=" " prop="diagnosisInfo" style="margin-bottom: 10px">
<el-input type="textarea" resize="none" :autosize="{ minRows: 4, maxRows: 4 }" clearable
show-word-limit
maxlength="300" v-model.trim="diagnosisData.diagnosisInfo"/>
</el-form-item>
</el-descriptions-item>
</el-descriptions>
</el-form>
</el-card>
</el-dialog>
<el-dialog
visible
v-if="repairId"
@close="repairId=null"
title="维修单信息"
width="80%"
>
<deviceRepairDialog :repairId="repairId"/>
</el-dialog>
</div>
</template>
<script src="./js/deviceRepairApplyMy.js"/>
<style lang="scss" scoped>
::v-deep .el-dialog__body {
padding: 0 0 20px 0;
}
::v-deep .el-tabs__content {
padding: 0 0 20px 0;
}
::v-deep .el-select {
width: 100%;
}
</style>

@ -17,6 +17,9 @@ let detailQuery = {
deviceCode: null,
deptCode: null,
productId: null,
productName: null,
status: deviceStatus.NORMAL.key,
checkLock: 0
}
export default {
@ -51,14 +54,36 @@ export default {
productRow: null,
//===================================================
logList: [],
radioCheck : null,
currentRow : null,
multipleSelection: null,
item:null,
}
},
created() {
this.locDeptCode = this.$store.getters.locDeptCode
this.getList()
this.detailQuery.deptCode = this.locDeptCode
this.getDetailList()
},
methods: {
downloadBase64Image,
tableRowClassName({row}) {
if (row.checked) return "warning-row";
return "";
},
push(){
if (this.item == null){
this.$message.error("请选择一个设备!")
return
}
this.chooseFunc(this.item)
},
handleChange(val) {
this.radioCheck = val.deviceCode;
this.currentRow = val;
this.item = val;
this.multipleSelection = val
},
genQR(row) {
genDeviceQR(row.deviceCode).then(res => {
if (res.code != 20000) {
@ -109,12 +134,14 @@ export default {
})
},
search() {
this.query.page = 1
this.getList()
this.detailQuery.page = 1
this.detailQuery.deptCode = this.locDeptCode
this.getDetailList()
},
onReset() {
this.query = {...query}
this.getList()
this.detailQuery = {...detailQuery}
this.detailQuery.deptCode = this.locDeptCode
this.getDetailList()
},
getList() {
this.loading = true

@ -18,6 +18,8 @@ export default {
return {
showSearch: true,
loading: false,
finishFlag: false,
currentRow: {},
total: .0,
list: [],
query: {...query},
@ -29,7 +31,16 @@ export default {
this.getList()
},
methods: {
finishFunc(row) {
finishFuncFlag(row){
this.finishFlag = true
this.currentRow = row
},
finishFuncFlagClose(){
this.finishFlag = false
this.currentRow = {}
},
finishFunc() {
let row = this.currentRow
this.$confirm("确定完成维修吗", "提示", {
confirmButtonText: '完成维修',
cancelButtonText: "取消"
@ -42,6 +53,7 @@ export default {
return
}
this.getList()
this.finishFuncFlagClose()
}).catch(e=>{
loading.close()
})

@ -46,6 +46,7 @@ export default {
saveData: _.cloneDeep(detailQuery),
user: null,
formRule: {
applyDeptCode: [{required: true, message: "报修部门不能为空", trigger: ["change", "blur"]}],
applyUserPhone: [{required: true, message: "报修人联系方式不能为空", trigger: ["change", "blur"]}],
details: [{
required: true,
@ -96,14 +97,14 @@ export default {
this.saveData.details.splice(i, 1)
},
chooseDevice(row) {
let data = {...row, description: ""}
let i = this.saveData.details.findIndex(i => i.deviceCode == data.deviceCode)
// let data = {...row, description: ""}
let i = this.saveData.details.findIndex(i => i.deviceCode == row.deviceCode)
if (i != -1) {
this.$message.error("该设备已被选入,无法再次选择")
return
}
this.saveData.details.push(data)
this.saveData.details.push(row)
this.chooseDeviceFlag = false
},
validToDetails(rule, value, callback) {

@ -7,6 +7,7 @@ import {
import {deviceRepairApplyDetailStatus, deviceRepairApplyStatus} from "@/utils/enum";
import {deviceRepairApplyDetailDiagnosis, deviceRepairApplyDetailPage} from "@/api/dev/deviceRepairApplyDetailApi";
import {deviceRepairInfo} from "@/api/dev/deviceRepairApi";
import {filterListByDeptCode} from "@/api/system/deptUser";
let query = {
page: 1,
@ -27,6 +28,7 @@ let diagnosisData = {
deviceCode: null,
repairFlag: true,
innerFlag: true,
repairDeptCode: null,
repairUserName: '',
repairUserPhone: '',
diagnosisInfo: '',
@ -44,11 +46,12 @@ export default {
},
data() {
return {
tabActive: 2,
tabActive: 1,
showSearch: true,
loading: false,
total: 0,
list: [],
userlist: [],
query: {...query},
user: null,
chooseDeviceFlag: false,
@ -72,6 +75,12 @@ export default {
message: "请选择维修方式",
trigger: ["change", "blur"]
}],
repairDeptCode: [{
required: true,
validator: this.repairDeptCodeValid,
message: "维修部门不能为空",
trigger: ["change", "blur"]
}],
repairUserName: [{
required: true,
validator: this.repairUserNameValid,
@ -88,6 +97,16 @@ export default {
},
//========detailDialog--end===============================
}
}
,
watch: {
'diagnosisData.repairDeptCode': {
handler (newV, oldV) {
this.getUerList()
},
// deep: true,
// immediate: true,
}
},
created() {
this.user = this.$store.getters.user
@ -129,6 +148,14 @@ export default {
}
callback()
},
repairDeptCodeValid(rule, value, callback) {
if (this.diagnosisData?.repairFlag) {
if (!this.diagnosisData.repairDeptCode) {
callback(new Error("维修部门不能为空"))
}
}
callback()
},
innerFlagValid(rule, value, callback) {
if (this.diagnosisData?.repairFlag) {
if (this.diagnosisData.innerFlag == null) {
@ -235,6 +262,24 @@ export default {
this.total = res.data.total || 0
})
}
},
getUerList() {
if (this.diagnosisData.repairDeptCode != null){
let userQuery = {
deptCode: this.diagnosisData.repairDeptCode,
}
filterListByDeptCode(userQuery).then((response) => {
// this.loading = false;
this.userlist = response.data.list || [];
// this.userTotal = response.data.total;
})
.catch(() => {
// this.loading = false;
this.userlist = [];
// this.userTotal = 0;
});
}
}
}
}

@ -0,0 +1,285 @@
import {getLoading, copyProperties} from "@/utils"
import {
deviceRepairApplyHallPage,
deviceRepairApplyConfirmByUserPage,
confirmDeviceRepairApply
} from "@/api/dev/deviceRepairApplyApi";
import {deviceRepairApplyDetailStatus, deviceRepairApplyStatus} from "@/utils/enum";
import {deviceRepairApplyDetailDiagnosis, deviceRepairApplyDetailPage} from "@/api/dev/deviceRepairApplyDetailApi";
import {deviceRepairInfo} from "@/api/dev/deviceRepairApi";
import {filterListByDeptCode} from "@/api/system/deptUser";
let query = {
page: 1,
limit: 10,
applyId: null,
status: null,
applyDeptCode: null,
}
let detailQuery = {
page: 1,
limit: 10,
applyId: null,
}
let diagnosisData = {
applyId: null,
deviceCode: null,
repairFlag: true,
innerFlag: true,
repairDeptCode: null,
repairUserName: '',
repairUserPhone: '',
diagnosisInfo: '',
}
export default {
name: "deviceRepairApply",
computed: {
deviceRepairApplyDetailStatus() {
return deviceRepairApplyDetailStatus
},
deviceRepairApplyStatus() {
return deviceRepairApplyStatus
}
},
data() {
return {
tabActive: 2,
showSearch: true,
loading: false,
total: 0,
list: [],
userlist: [],
query: {...query},
user: null,
chooseDeviceFlag: false,
//========detail===============================
clickRow: null,
detailQuery: _.cloneDeep(detailQuery),
detailLoading: false,
detailList: [],
detailTotal: 0,
//========detail--end===============================
repairId: null,
//========detailDialog===============================
detailFlag: false,
detailData: null,
diagnosisData: _.cloneDeep(diagnosisData),
detailRules: {
repairFlag: [{required: true, message: "请选择是否维修", trigger: ["change", "blur"]}],
innerFlag: [{
required: true,
validator: this.innerFlagValid,
message: "请选择维修方式",
trigger: ["change", "blur"]
}],
repairDeptCode: [{
required: true,
validator: this.repairDeptCodeValid,
message: "维修部门不能为空",
trigger: ["change", "blur"]
}],
repairUserName: [{
required: true,
validator: this.repairUserNameValid,
message: "维修人姓名不能为空",
trigger: ["change", "blur"]
}],
repairUserPhone: [{
required: true,
validator: this.repairUserPhoneValid,
message: "维修人电话不能为空",
trigger: ["change", "blur"]
}],
diagnosisInfo: [{required: true, message: "诊断信息不能为空", trigger: ["change", "blur"]}],
},
//========detailDialog--end===============================
}
}
,
watch: {
'diagnosisData.repairDeptCode': {
handler (newV, oldV) {
this.getUerList()
},
// deep: true,
// immediate: true,
}
},
created() {
this.user = this.$store.getters.user
this.getList()
},
methods: {
repairInfo(row) {
this.repairId = row.repairId
},
commitFunc() {
this.$refs.saveForm.validate(b => {
if (!b) {
return
}
deviceRepairApplyDetailDiagnosis(this.diagnosisData).then(res => {
if (res.code != 20000) {
this.$message.error(res.message)
return
}
this.$message.success(res.message)
this.detailFlag = false
this.getList()
})
})
},
repairUserPhoneValid(rule, value, callback) {
if (this.diagnosisData?.repairFlag) {
if (!this.diagnosisData.repairUserPhone) {
callback(new Error("维修人电话不能为空"))
}
}
callback()
},
repairUserNameValid(rule, value, callback) {
if (this.diagnosisData?.repairFlag) {
if (!this.diagnosisData.repairUserName) {
callback(new Error("维修人姓名不能为空"))
}
}
callback()
},
repairDeptCodeValid(rule, value, callback) {
if (this.diagnosisData?.repairFlag) {
if (!this.diagnosisData.repairDeptCode) {
callback(new Error("维修部门不能为空"))
}
}
callback()
},
innerFlagValid(rule, value, callback) {
if (this.diagnosisData?.repairFlag) {
if (this.diagnosisData.innerFlag == null) {
callback(new Error("请选择维修方式"))
}
}
callback()
},
openDiagnosisDialog(row) {
this.detailFlag = true
this.detailData = _.cloneDeep(row)
this.diagnosisData = _.cloneDeep({...diagnosisData, applyId: row.applyId, deviceCode: row.deviceCode})
},
confirm(row) {
this.$prompt("请输入受理人电话", "提示", {
closeOnClickModal: false,
confirmButtonText: '确定',
cancelButtonText: '取消',
inputType: String,
inputPlaceholder: '请输入受理人电话',
}).then(({value}) => {
let data = {
applyId: row.id,
confirmUserPhone: value
}
confirmDeviceRepairApply(data).then(res => {
if (res.code != 20000) {
this.$message.error(res.message)
return
}
this.$message.success(res.message)
this.getList()
})
})
},
tabClick(v, ov) {
if (v == ov) {
return
}
this.tabActive = v
this.query = _.cloneDeep(query)
this.getList()
},
rowClick(row) {
this.clickRow = row
this.detailQuery = _.cloneDeep({...detailQuery, applyId: row.id})
this.getDetailList()
},
getDetailList() {
this.detailLoading = true
deviceRepairApplyDetailPage(this.detailQuery).then(res => {
this.detailLoading = false
if (res.code != 20000) {
this.$message.error(res.message)
return
}
this.detailList = res.data.list || []
this.detailTotal = res.data.total || 0
}).catch(e => {
this.detailLoading = false
})
},
search() {
this.query.page = 1
this.getList()
},
onReset() {
this.query = {...query}
this.getList()
},
getList() {
this.loading = true
this.clickRow = null
this.detailList = []
this.detailTotal = 0
if (this.tabActive == 1) {
deviceRepairApplyHallPage(this.query).then(res => {
this.loading = false
if (res.code != 20000) {
this.$message.error(res.message)
return
}
this.list = res.data.list || []
this.total = res.data.total || 0
}).catch(e => {
this.loading = false
this.list = res.data.list || []
this.total = res.data.total || 0
})
} else {
deviceRepairApplyConfirmByUserPage(this.query).then(res => {
this.loading = false
if (res.code != 20000) {
this.$message.error(res.message)
return
}
this.list = res.data.list || []
this.total = res.data.total || 0
}).catch(e => {
this.loading = false
this.list = res.data.list || []
this.total = res.data.total || 0
})
}
},
getUerList() {
if (this.diagnosisData.repairDeptCode != null){
let userQuery = {
deptCode: this.diagnosisData.repairDeptCode,
}
filterListByDeptCode(userQuery).then((response) => {
// this.loading = false;
this.userlist = response.data.list || [];
// this.userTotal = response.data.total;
})
.catch(() => {
// this.loading = false;
this.userlist = [];
// this.userTotal = 0;
});
}
}
}
}

@ -80,6 +80,13 @@
</el-tag>
</template>
</el-table-column>
<el-table-column label="是否为维修部门" prop="isMaintenance">
<template slot-scope="scope">
<el-tag :type="scope.row.maintenance |maintenanceFilterType"
>{{ scope.row.maintenance | maintenanceFilterName }}
</el-tag>
</template>
</el-table-column>
<el-table-column label="备注" prop="remark"></el-table-column>
<el-table-column label="操作">
<template slot-scope="scope">
@ -158,6 +165,17 @@
<el-radio :label="false"></el-radio>
</el-radio-group>
</el-form-item>
<el-form-item
label="是否为维修部门"
prop="isMaintenance"
class="query-form-item"
>
<el-radio-group v-model="formData.maintenance">
<el-radio :label="true"></el-radio>
<el-radio :label="false"></el-radio>
</el-radio-group>
</el-form-item>
<el-row>
<el-form-item label="备注:" prop="remark">
<el-input
@ -458,6 +476,13 @@ export default {
};
return upUerMap[status];
},
maintenanceFilterType(status) {
const upUerMap = {
true: "success",
false: "danger",
};
return upUerMap[status];
},
spUerFilterName(status) {
const upUerMap = {
true: "允许",
@ -465,6 +490,13 @@ export default {
};
return upUerMap[status];
},
maintenanceFilterName(status) {
const upUerMap = {
true: "是",
false: "否",
};
return upUerMap[status];
},
},
methods: {
onReset() {
@ -538,6 +570,7 @@ export default {
status: 1,
remark: "",
pcode: "0",
maintenance:false,
pid: 0,
level: 1,
};
@ -551,6 +584,7 @@ export default {
pcode: row.code,
status: 1,
spUse: false,
maintenance:false,
};
// this.getStatusTreeselect();
filterList().then((response) => {

Loading…
Cancel
Save