duizhaopin_ui
cxw 2 years ago
parent 5c977494a7
commit c9af5ac71c

@ -2,5 +2,5 @@
ENV = 'development' ENV = 'development'
# base api # base api
VUE_APP_BASE_API = 'http://192.168.1.115:9001' VUE_APP_BASE_API = 'http://192.168.1.124:9001'
VUE_APP_FACE_API = 'http://192.168.1.115:5000' VUE_APP_FACE_API = 'http://192.168.1.124:5000'

@ -2,6 +2,6 @@
ENV = 'production' ENV = 'production'
# base api # base api
VUE_APP_BASE_API = 'http://192.168.1.115:9001' VUE_APP_BASE_API = 'http://192.168.1.124:9001'
VUE_APP_FACE_API ='http://192.168.1.115:5000' VUE_APP_FACE_API ='http://192.168.1.124:5000'

@ -4,6 +4,6 @@ NODE_ENV = production
ENV = 'staging' ENV = 'staging'
# base api # base api
VUE_APP_BASE_API = 'http://192.168.1.115:9001' VUE_APP_BASE_API = 'http://192.168.1.124:9001'
VUE_APP_FACE_API='http://192.168.1.115:5000' VUE_APP_FACE_API='http://192.168.1.124:5000'

@ -98,3 +98,29 @@ export function client_empty(data) {
}) })
} }
// /api/client/get_client_place
export function get_client_place(data) {
return request({
url: '/api/client/get_client_place',
method: 'post',
data
})
}
// /api/client/get_client_layer
export function get_client_layer(data) {
return request({
url: '/api/client/get_client_layer',
method: 'post',
data
})
}
// /api/client/update_client_storage_quantity
export function update_client_storage_quantity(data) {
return request({
url: '/api/client/update_client_storage_quantity',
method: 'post',
data
})
}

@ -99,20 +99,20 @@ const reagentRouter = [
} }
] ]
}, },
{ // {
path: '/reagent/receiving', // path: '/reagent/receiving',
component: Layout, // component: Layout,
redirect: '/reagent/receiving/index', // redirect: '/reagent/receiving/index',
meta: { classification: 'reagent', module_code: 'DrugUseView' }, // meta: { classification: 'reagent', module_code: 'DrugUseView' },
children: [ // children: [
{ // {
path: 'index', // path: 'index',
name: 'Receiving', // name: 'Receiving',
component: () => import('@/views/reagent/receivingandreturn/index'), // component: () => import('@/views/reagent/receivingandreturn/index'),
meta: { title: '高危化品领用', icon: '试剂领用', classification: 'reagent' } // meta: { title: '高危化品领用', icon: '试剂领用', classification: 'reagent' }
} // }
] // ]
}, // },
{ {
path: '/reagent/sendback', path: '/reagent/sendback',
component: Layout, component: Layout,
@ -183,20 +183,20 @@ const reagentRouter = [
// } // }
// ] // ]
// }, // },
// { {
// path: '/reagent/inventory', path: '/reagent/inventory',
// component: Layout, component: Layout,
// redirect: '/reagent/inventory/index', redirect: '/reagent/inventory/index',
// meta: { classification: 'reagent', module_code: 'StockTakingIndex' }, meta: { classification: 'reagent', module_code: 'StockTakingIndex' },
// children: [ children: [
// { {
// path: 'index', path: 'index',
// name: 'Inventory', name: 'Inventory',
// component: () => import('@/views/reagent/inventory/index'), component: () => import('@/views/reagent/inventory/index'),
// meta: { title: '高危化品盘点', icon: '库存盘点', classification: 'reagent' } meta: { title: '高危化品盘点', icon: '库存盘点', classification: 'reagent' }
// } }
// ] ]
// }, },
{ {
path: '/reagent/database', path: '/reagent/database',
component: Layout, component: Layout,

@ -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>
</el-table-column> </el-table-column>
@ -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%'}" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="24"> <el-col :span="12">
<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">
</el-option>
</el-select>
<!-- <el-input v-model="formData.place" placeholder="请输入柜体位置" clearable :style="{width: '100%'}" /> -->
</el-form-item>
</el-col>
<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" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
@ -270,6 +291,31 @@
</div> </div>
</el-dialog> </el-dialog>
<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}}
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="存放试剂数量">
<el-input v-model="item.storage_quantity" placeholder="请输入存放试剂数量" clearable :style="{width: '100%'}" />
</el-form-item>
</el-col>
</div>
</el-form>
</el-scrollbar>
<div slot="footer" style="text-align: center">
<el-button @click="dialogLayerVisible =false">取消</el-button>
<el-button type="primary" @click="handelLayerfirm"></el-button>
</div>
</el-dialog>
</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() {
// client使 // client使
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('请选择一个柜体!')

@ -296,11 +296,11 @@
<el-dialog title="选择柜层号" :visible.sync="detailVisible" width="35%"> <el-dialog title="选择柜层号" :visible.sync="detailVisible" width="35%">
<div> <div>
<el-radio-group v-model="radio1" @change="changeHandler"> <el-radio-group v-model="radio1" @change="changeHandler" size="medium" style="margin-bottom: 40px;">
<el-radio-button :label="item.client_id" :key="item.client_id" v-for="item in chosedata">{{item.client_name}}</el-radio-button> <el-radio-button :label="item.client_id" :key="item.client_id" v-for="item in chosedata" style="margin-bottom: 10px">{{item.client_name}}</el-radio-button>
</el-radio-group> </el-radio-group>
<div :key="index" v-for="item,index in chosedata" style="padding-top:30px"> <div :key="index" v-for="item,index in chosedata">
<el-radio-group v-model="radio2" v-if="item.client_id == radio1"> <el-radio-group v-model="radio2" v-if="item.client_id == radio1">
<el-radio-button :label="item1" :key="item1" v-for="item1 in item.client_cell" style="padding-right:30px;padding-top: 10px;"></el-radio-button> <el-radio-button :label="item1" :key="item1" v-for="item1 in item.client_cell" style="padding-right:30px;padding-top: 10px;"></el-radio-button>
</el-radio-group> </el-radio-group>
@ -967,7 +967,11 @@ export default {
} }
} }
</script> </script>
<style>
.el-radio-button__inner{
border-left:0.0625rem solid #DCDFE6 !important;
}
</style>
<style lang="scss" scoped> <style lang="scss" scoped>
.main-content-container { .main-content-container {
margin: 1rem; margin: 1rem;

Loading…
Cancel
Save