diff --git a/.env.development b/.env.development index 3d68d25..fc8a16d 100644 --- a/.env.development +++ b/.env.development @@ -2,5 +2,5 @@ ENV = 'development' # base api -VUE_APP_BASE_API = 'http://192.168.1.115:9001' -VUE_APP_FACE_API = 'http://192.168.1.115:5000' +VUE_APP_BASE_API = 'http://192.168.1.124:9001' +VUE_APP_FACE_API = 'http://192.168.1.124:5000' diff --git a/.env.production b/.env.production index f0253ad..9de1a8b 100644 --- a/.env.production +++ b/.env.production @@ -2,6 +2,6 @@ ENV = 'production' # base api -VUE_APP_BASE_API = 'http://192.168.1.115:9001' -VUE_APP_FACE_API ='http://192.168.1.115:5000' +VUE_APP_BASE_API = 'http://192.168.1.124:9001' +VUE_APP_FACE_API ='http://192.168.1.124:5000' diff --git a/.env.staging b/.env.staging index 4f8f853..47b1798 100644 --- a/.env.staging +++ b/.env.staging @@ -4,6 +4,6 @@ NODE_ENV = production ENV = 'staging' # base api -VUE_APP_BASE_API = 'http://192.168.1.115:9001' -VUE_APP_FACE_API='http://192.168.1.115:5000' +VUE_APP_BASE_API = 'http://192.168.1.124:9001' +VUE_APP_FACE_API='http://192.168.1.124:5000' diff --git a/src/api/reagent/client.js b/src/api/reagent/client.js index f8678b2..59986c7 100644 --- a/src/api/reagent/client.js +++ b/src/api/reagent/client.js @@ -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 + }) +} \ No newline at end of file diff --git a/src/router/modules/reagent.js b/src/router/modules/reagent.js index 4773c2e..c373405 100644 --- a/src/router/modules/reagent.js +++ b/src/router/modules/reagent.js @@ -99,20 +99,20 @@ const reagentRouter = [ } ] }, - { - path: '/reagent/receiving', - component: Layout, - redirect: '/reagent/receiving/index', - meta: { classification: 'reagent', module_code: 'DrugUseView' }, - children: [ - { - path: 'index', - name: 'Receiving', - component: () => import('@/views/reagent/receivingandreturn/index'), - meta: { title: '高危化品领用', icon: '试剂领用', classification: 'reagent' } - } - ] - }, + // { + // path: '/reagent/receiving', + // component: Layout, + // redirect: '/reagent/receiving/index', + // meta: { classification: 'reagent', module_code: 'DrugUseView' }, + // children: [ + // { + // path: 'index', + // name: 'Receiving', + // component: () => import('@/views/reagent/receivingandreturn/index'), + // meta: { title: '高危化品领用', icon: '试剂领用', classification: 'reagent' } + // } + // ] + // }, { path: '/reagent/sendback', component: Layout, @@ -183,20 +183,20 @@ const reagentRouter = [ // } // ] // }, - // { - // path: '/reagent/inventory', - // component: Layout, - // redirect: '/reagent/inventory/index', - // meta: { classification: 'reagent', module_code: 'StockTakingIndex' }, - // children: [ - // { - // path: 'index', - // name: 'Inventory', - // component: () => import('@/views/reagent/inventory/index'), - // meta: { title: '高危化品盘点', icon: '库存盘点', classification: 'reagent' } - // } - // ] - // }, + { + path: '/reagent/inventory', + component: Layout, + redirect: '/reagent/inventory/index', + meta: { classification: 'reagent', module_code: 'StockTakingIndex' }, + children: [ + { + path: 'index', + name: 'Inventory', + component: () => import('@/views/reagent/inventory/index'), + meta: { title: '高危化品盘点', icon: '库存盘点', classification: 'reagent' } + } + ] + }, { path: '/reagent/database', component: Layout, diff --git a/src/views/reagent/client/index.vue b/src/views/reagent/client/index.vue index 71d8d7b..bdeac98 100644 --- a/src/views/reagent/client/index.vue +++ b/src/views/reagent/client/index.vue @@ -20,6 +20,7 @@ element-loading-text="拼命加载中" :header-cell-style="headerStyle" height="69vh" + :cell-style="{'text-align':'center'}" @selection-change="handleSelectionChange" > - + /> --> - + + 层级维护 编辑 @@ -129,9 +132,27 @@ - + - + + + + + + + + + + @@ -270,6 +291,31 @@ + + + + + + + + {{item.cell_speci}} + + + + + + + + + + + + + 取消 + 确定 + + + @@ -281,6 +327,9 @@ import { update_status, get_client_drawer, 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 } from '@/api/reagent/client' import { client_list } from '@/api/common' @@ -297,6 +346,7 @@ export default { multipleSelection: [], tableData: [], headerStyle: { 'background': '#E6E6E6' }, + options: [], formData: { client_id: undefined, client_name: undefined, @@ -308,7 +358,8 @@ export default { filter_shelf_life_warning_value: undefined, contact_people_name: undefined, contact_phone: undefined, - description: undefined + description: undefined, + layer_num:undefined }, rules: { client_name: [{ @@ -331,7 +382,16 @@ export default { message: '请输入柜体类型', trigger: 'blur' }], - place: [], + layer_num: [{ + required: true, + message: '请输入柜体层数', + trigger: 'blur' + }], + place: [{ + required: true, + message: '请输入柜体位置', + trigger: 'blur' + }], filter_production_date: [{ required: true, message: '请选择柜体滤芯 生产日期', @@ -351,6 +411,7 @@ export default { // 抽屉权限 loadingDraw: false, dialogDrawVisible: false, + dialogLayerVisible:false, drawData: [], userDrawData: [], multipleDrawSelection: [], @@ -369,17 +430,55 @@ export default { user_page: 1, user_page_size: 15, user_total: 0, - multipleUserSelection: [] + multipleUserSelection: [], + layer:[], + layerflag:false } }, created() { this.getList() + this.getclientplace() }, destroyed() { // 更新client数据供后续使用 this.get_client_list() }, 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() { client_list().then( res => { @@ -555,6 +654,7 @@ export default { client_code: undefined, client_type: undefined, place: undefined, + layer_num:undefined, filter_production_date: null, filter_shelf_life_warning_value: undefined, contact_people_name: undefined, @@ -587,6 +687,18 @@ export default { this.formData.client_id = row.client_id 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() { if (this.multipleSelection.length !== 1) { this.$message.warning('请选择一个柜体!') diff --git a/src/views/reagent/warehousing/index.vue b/src/views/reagent/warehousing/index.vue index 5e21423..447795c 100644 --- a/src/views/reagent/warehousing/index.vue +++ b/src/views/reagent/warehousing/index.vue @@ -296,11 +296,11 @@ - - {{item.client_name}} + + {{item.client_name}} - + @@ -967,7 +967,11 @@ export default { } } - +