@ -20,6 +20,7 @@
element - loading - text = "拼命加载中"
element - loading - text = "拼命加载中"
: header - cell - style = "headerStyle"
: header - cell - style = "headerStyle"
height = "69vh"
height = "69vh"
: cell - style = "{'text-align':'center'}"
@ selection - change = "handleSelectionChange"
@ selection - change = "handleSelectionChange"
>
>
< el -table -column
< el -table -column
@ -30,6 +31,7 @@
< el -table -column
< el -table -column
type = "index"
type = "index"
width = "50"
width = "50"
align = 'center'
/ >
/ >
< el -table -column
< el -table -column
prop = "client_name"
prop = "client_name"
@ -48,7 +50,7 @@
label = "所处位置"
label = "所处位置"
align = "center"
align = "center"
/ >
/ >
< el -table -column
<!-- < el -table -column
show - overflow - tooltip
show - overflow - tooltip
prop = "contact_people_name"
prop = "contact_people_name"
label = "联系人"
label = "联系人"
@ -58,7 +60,7 @@
prop = "contact_phone"
prop = "contact_phone"
label = "联系电话"
label = "联系电话"
align = "center"
align = "center"
/ >
/ > - - >
< el -table -column
< el -table -column
prop = "is_enabled"
prop = "is_enabled"
label = "状态"
label = "状态"
@ -80,7 +82,8 @@
label = "操作"
label = "操作"
align = "center"
align = "center"
>
>
< template slot -scope = " scope " >
< template slot -scope = " scope " style = "display:flex;flex-direction: row;" >
< el -button @click ="handleLayerEdit(scope.row)" > 层 级 维 护 < / el -button >
< el -button @click ="handleFormEdit(scope.row)" > 编 辑 < / el -button >
< el -button @click ="handleFormEdit(scope.row)" > 编 辑 < / el -button >
< / template >
< / template >
< / e l - t a b l e - c o l u m n >
< / e l - t a b l e - c o l u m n >
@ -129,9 +132,27 @@
< el -input v -model = " formData.client_type " placeholder = "请输入柜体类型" clearable : style = "{width: '100%'}" / >
< el -input v -model = " formData.client_type " placeholder = "请输入柜体类型" clearable : style = "{width: '100%'}" / >
< / e l - f o r m - i t e m >
< / e l - f o r m - i t e m >
< / e l - c o l >
< / e l - c o l >
< el -col :span =" 24 ">
< el -col :span =" 1 2">
< el -form -item label = "柜体位置" prop = "place" >
< el -form -item label = "柜体位置" prop = "place" >
< el -input v -model = " formData.place " placeholder = "请输入柜体位置" clearable : style = "{width: '100%'}" / >
< el -select
v - model = "formData.place"
filterable
allow - create
default - first - option
placeholder = "请输入柜体位置" >
< el -option
v - for = "item in options"
: key = "item.value"
: label = "item.value"
: value = "item.value" >
< / e l - o p t i o n >
< / e l - s e l e c t >
<!-- < el -input v -model = " formData.place " placeholder = "请输入柜体位置" clearable : style = "{width: '100%'}" / > -- >
< / e l - f o r m - i t e m >
< / e l - c o l >
< el -col :span ="12" >
< el -form -item label = "柜体层数" prop = "layer_num" >
< el -input v -model = " formData.layer_num " placeholder = "请输入柜体层数" clearable : style = "{width: '100%'}" : disabled = "dialogTitile =='编辑柜体信息' ? true:false" / >
< / e l - f o r m - i t e m >
< / e l - f o r m - i t e m >
< / e l - c o l >
< / e l - c o l >
< el -col :span ="12" >
< el -col :span ="12" >
@ -270,6 +291,31 @@
< / div >
< / div >
< / e l - d i a l o g >
< / e l - d i a l o g >
< el -dialog :visible.sync ="dialogLayerVisible" :close-on-click-modal ="false" width = "30%" title = "柜体层级维护" >
< el -scrollbar style = "height:500px;overflow: hidden;" >
< el -form ref = "LayerForm" label -width = " 100px " style = "padding-right: 20px" >
< div v-for ="item,index in layer" :key ="index" >
< el -col :span ="12" >
< el -form -item label = "柜体层号" >
{ { item . cell _speci } }
< / e l - f o r m - i t e m >
< / e l - c o l >
< el -col :span ="12" >
< el -form -item label = "存放试剂数量" >
< el -input v -model = " item.storage_quantity " placeholder = "请输入存放试剂数量" clearable : style = "{width: '100%'}" / >
< / e l - f o r m - i t e m >
< / e l - c o l >
< / div >
< / e l - f o r m >
< / e l - s c r o l l b a r >
< div slot = "footer" style = "text-align: center" >
< el -button @ click = "dialogLayerVisible =false" > 取消 < / e l - b u t t o n >
< el -button type = "primary" @click ="handelLayerfirm" > 确 定 < / el -button >
< / div >
< / e l - d i a l o g >
< / div >
< / div >
< / template >
< / template >
@ -281,6 +327,9 @@ import {
update _status ,
update _status ,
get _client _drawer ,
get _client _drawer ,
get _drawer _power ,
get _drawer _power ,
get _client _place ,
get _client _layer ,
update _client _storage _quantity ,
user _ban _relieve , set _drawer _power , user _ban _list , user _ban _confirm , del , client _empty
user _ban _relieve , set _drawer _power , user _ban _list , user _ban _confirm , del , client _empty
} from '@/api/reagent/client'
} from '@/api/reagent/client'
import { client _list } from '@/api/common'
import { client _list } from '@/api/common'
@ -297,6 +346,7 @@ export default {
multipleSelection : [ ] ,
multipleSelection : [ ] ,
tableData : [ ] ,
tableData : [ ] ,
headerStyle : { 'background' : '#E6E6E6' } ,
headerStyle : { 'background' : '#E6E6E6' } ,
options : [ ] ,
formData : {
formData : {
client _id : undefined ,
client _id : undefined ,
client _name : undefined ,
client _name : undefined ,
@ -308,7 +358,8 @@ export default {
filter _shelf _life _warning _value : undefined ,
filter _shelf _life _warning _value : undefined ,
contact _people _name : undefined ,
contact _people _name : undefined ,
contact _phone : undefined ,
contact _phone : undefined ,
description : undefined
description : undefined ,
layer _num : undefined
} ,
} ,
rules : {
rules : {
client _name : [ {
client _name : [ {
@ -331,7 +382,16 @@ export default {
message : '请输入柜体类型' ,
message : '请输入柜体类型' ,
trigger : 'blur'
trigger : 'blur'
} ] ,
} ] ,
place : [ ] ,
layer _num : [ {
required : true ,
message : '请输入柜体层数' ,
trigger : 'blur'
} ] ,
place : [ {
required : true ,
message : '请输入柜体位置' ,
trigger : 'blur'
} ] ,
filter _production _date : [ {
filter _production _date : [ {
required : true ,
required : true ,
message : '请选择柜体滤芯 生产日期' ,
message : '请选择柜体滤芯 生产日期' ,
@ -351,6 +411,7 @@ export default {
/ / 抽 屉 权 限
/ / 抽 屉 权 限
loadingDraw : false ,
loadingDraw : false ,
dialogDrawVisible : false ,
dialogDrawVisible : false ,
dialogLayerVisible : false ,
drawData : [ ] ,
drawData : [ ] ,
userDrawData : [ ] ,
userDrawData : [ ] ,
multipleDrawSelection : [ ] ,
multipleDrawSelection : [ ] ,
@ -369,17 +430,55 @@ export default {
user _page : 1 ,
user _page : 1 ,
user _page _size : 15 ,
user _page _size : 15 ,
user _total : 0 ,
user _total : 0 ,
multipleUserSelection : [ ]
multipleUserSelection : [ ] ,
layer : [ ] ,
layerflag : false
}
}
} ,
} ,
created ( ) {
created ( ) {
this . getList ( )
this . getList ( )
this . getclientplace ( )
} ,
} ,
destroyed ( ) {
destroyed ( ) {
/ / 更 新 c l i e n t 数 据 供 后 续 使 用
/ / 更 新 c l i e n t 数 据 供 后 续 使 用
this . get _client _list ( )
this . get _client _list ( )
} ,
} ,
methods : {
methods : {
handelLayerfirm ( ) {
console . log ( this . layer )
var dirctionary = { }
this . layerflag = false
this . layer . forEach ( item => {
if ( isNaN ( Number ( item . storage _quantity ) ) == true || Number ( item . storage _quantity ) < 1 ) {
this . $message . warning ( '请输入大于0的正整数! ' )
this . layerflag = true
return
} else {
let key = item . id
let value = item . storage _quantity
dirctionary [ key ] = value ;
}
} )
if ( this . layerflag ) {
return
} else {
update _client _storage _quantity ( stringify ( { data _info : dirctionary } ) ) . then (
res => {
this . $message . success ( res . msg )
if ( res . status === 0 ) {
this . dialogLayerVisible = false
}
}
)
}
} ,
getclientplace ( ) {
get _client _place ( ) . then (
res => {
this . options = res . data
}
)
} ,
get _client _list ( ) {
get _client _list ( ) {
client _list ( ) . then (
client _list ( ) . then (
res => {
res => {
@ -555,6 +654,7 @@ export default {
client _code : undefined ,
client _code : undefined ,
client _type : undefined ,
client _type : undefined ,
place : undefined ,
place : undefined ,
layer _num : undefined ,
filter _production _date : null ,
filter _production _date : null ,
filter _shelf _life _warning _value : undefined ,
filter _shelf _life _warning _value : undefined ,
contact _people _name : undefined ,
contact _people _name : undefined ,
@ -587,6 +687,18 @@ export default {
this . formData . client _id = row . client _id
this . formData . client _id = row . client _id
this . dialogVisible = true
this . dialogVisible = true
} ,
} ,
handleLayerEdit ( row ) {
console . log ( row )
const data = {
client _id : row . client _id
}
get _client _layer ( stringify ( data ) ) . then (
res => {
this . layer = res . data
}
)
this . dialogLayerVisible = true
} ,
handleDel ( ) {
handleDel ( ) {
if ( this . multipleSelection . length !== 1 ) {
if ( this . multipleSelection . length !== 1 ) {
this . $message . warning ( '请选择一个柜体!' )
this . $message . warning ( '请选择一个柜体!' )