duizhaopin_ui
cxw 2 years ago
parent 5a181fb1cb
commit 685bcfff3f

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

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

@ -5,5 +5,5 @@ ENV = 'staging'
# base api # base api
VUE_APP_BASE_API = 'http://111.231.67.55:9001' VUE_APP_BASE_API = 'http://111.231.67.55:9001'
VUE_APP_FACE_API='http://127.0.0.1:5000' VUE_APP_FACE_API='http://192.168.8.111:5000'

@ -15,3 +15,20 @@ export function update_solve(data) {
data data
}) })
} }
export function register_drug_list(data) {
return request({
url: '/api/temporary_auth/register_drug_list',
method: 'post',
data
})
}
export function set_register(data) {
return request({
url: '/api/temporary_auth/set_register',
method: 'post',
data
})
}

@ -70,7 +70,7 @@ export function pring_bar_code(data) {
}) })
} }
// /api/drug_tmplate/pring_bar_code // /api/drug_tmplate/get_drug_group_list
export function get_drug_group_list(data) { export function get_drug_group_list(data) {
return request({ return request({
url: '/api/drug_tmplate/get_drug_group_list', url: '/api/drug_tmplate/get_drug_group_list',
@ -78,3 +78,12 @@ export function get_drug_group_list(data) {
data data
}) })
} }
// /api/drug_tmplate/enter_db_client_list
export function enter_db_client_list(data) {
return request({
url: '/api/drug_tmplate/enter_db_client_list',
method: 'post',
data
})
}

@ -194,17 +194,17 @@ export function getALLRouter(data) {
{ {
name: 'reagent', name: 'reagent',
router: rasr[0], router: rasr[0],
title: '试剂管理' title: '高危化品'
}, },
{ {
name: 'standard', name: 'standard',
router: standard[0], router: standard[0],
title: '标准品管理' title: '危化品管理'
}, },
{ {
name: 'consumables', name: 'consumables',
router: consumables[0], router: consumables[0],
title: '耗材管理' title: '对照品管理'
}, },
{ {
name: 'instrument', name: 'instrument',

Binary file not shown.

After

Width:  |  Height:  |  Size: 173 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 182 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 172 KiB

@ -0,0 +1,4 @@
<svg id="创建申请" xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20">
<path id="路径_393" data-name="路径 393" d="M0,0H20V20H0Z" fill="none"/>
<path id="路径_394" data-name="路径 394" d="M12.333,3.6H4.556V16.4H15.444V6.8H12.333ZM3,2.794A.785.785,0,0,1,3.777,2h9.334L17,6V17.194a.79.79,0,0,1-.772.806H3.772A.789.789,0,0,1,3,17.206ZM10.778,10v3.2H9.222V10H6.889L10,6.8,13.111,10Z" transform="translate(0)"/>
</svg>

After

Width:  |  Height:  |  Size: 457 B

@ -0,0 +1,4 @@
<svg id="申请管理" xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20">
<path id="路径_395" data-name="路径 395" d="M0,0H20V20H0Z" fill="none"/>
<path id="路径_396" data-name="路径 396" d="M7.352,10.65a2.886,2.886,0,0,1,0-1.3L6.58,8.893l.778-1.386.772.458a2.7,2.7,0,0,1,1.093-.65V6.4h1.556v.916a2.7,2.7,0,0,1,1.093.65l.772-.458.778,1.386-.772.458a2.886,2.886,0,0,1,0,1.3l.772.458-.778,1.386-.772-.458a2.7,2.7,0,0,1-1.093.65V13.6H9.222v-.916a2.7,2.7,0,0,1-1.093-.65l-.772.458L6.58,11.107l.772-.458ZM10,11.2A1.2,1.2,0,1,0,8.833,10,1.184,1.184,0,0,0,10,11.2Zm2.333-7.6H4.556V16.4H15.444V6.8H12.333ZM3,2.794A.785.785,0,0,1,3.777,2h9.334L17,6V17.194a.79.79,0,0,1-.772.806H3.772A.789.789,0,0,1,3,17.206Z" transform="translate(0)"/>
</svg>

After

Width:  |  Height:  |  Size: 775 B

@ -0,0 +1,4 @@
<svg id="称重登记" xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20">
<path id="路径_397" data-name="路径 397" d="M0,0H20V20H0Z" fill="none"/>
<path id="路径_398" data-name="路径 398" d="M17.434,5.806l-1.6,1.6V3.6H8.613v4H4.6v8.8H15.83V14.194l1.6-1.6v4.612a.8.8,0,0,1-.8.794H3.8a.8.8,0,0,1-.8-.806V6.8L7.814,2h8.817a.8.8,0,0,1,.8.794Zm.624,1.64,1.134,1.132L12.955,14.8l-1.135,0,0-1.13,6.237-6.222Z"/>
</svg>

After

Width:  |  Height:  |  Size: 452 B

@ -1,5 +1,5 @@
import Layout from '@/layout' import Layout from '@/layout'
// 耗材管理路由 com // 对照品管理路由 com
const consumablesRouter = [ const consumablesRouter = [
// { // {
// path: '/standard', // path: '/standard',
@ -45,7 +45,7 @@ const consumablesRouter = [
name: 'standardInfo', name: 'standardInfo',
component: () => import('@/views/reagent/report/reagentinfo/index'), component: () => import('@/views/reagent/report/reagentinfo/index'),
hidden: true, hidden: true,
meta: { title: '耗材信息详情', icon: '报表统计', classification: 'consumables', activeMenu: '/consumables/report/index' } meta: { title: '对照品信息详情', icon: '报表统计', classification: 'consumables', activeMenu: '/consumables/report/index' }
}, },
{ {
path: 'warehousinginfo', path: 'warehousinginfo',
@ -66,7 +66,7 @@ const consumablesRouter = [
name: 'standardConsumInfo', name: 'standardConsumInfo',
component: () => import('@/views/reagent/report/reagentconsum/index'), component: () => import('@/views/reagent/report/reagentconsum/index'),
hidden: true, hidden: true,
meta: { title: '耗材消耗', icon: '报表统计', classification: 'consumables', activeMenu: '/consumables/report/index' } meta: { title: '对照品消耗', icon: '报表统计', classification: 'consumables', activeMenu: '/consumables/report/index' }
}, },
{ {
path: 'userconsuminfo', path: 'userconsuminfo',
@ -101,7 +101,7 @@ const consumablesRouter = [
path: 'index', path: 'index',
name: 'standardWarehousing', name: 'standardWarehousing',
component: () => import('@/views/reagent/warehousing/index'), component: () => import('@/views/reagent/warehousing/index'),
meta: { title: '耗材入库', icon: '试剂入库', classification: 'consumables' } meta: { title: '对照品入库', icon: '试剂入库', classification: 'consumables' }
} }
] ]
}, },
@ -115,7 +115,7 @@ const consumablesRouter = [
path: 'index', path: 'index',
name: 'standardReceiving', name: 'standardReceiving',
component: () => import('@/views/reagent/receivingandreturn/index'), component: () => import('@/views/reagent/receivingandreturn/index'),
meta: { title: '耗材领用', icon: '试剂领用', classification: 'consumables' } meta: { title: '对照品领用', icon: '试剂领用', classification: 'consumables' }
} }
] ]
}, },
@ -129,7 +129,7 @@ const consumablesRouter = [
path: 'index', path: 'index',
name: 'standardSendBack', name: 'standardSendBack',
component: () => import('@/views/reagent/receivingandreturn/index'), component: () => import('@/views/reagent/receivingandreturn/index'),
meta: { title: '耗材归还', icon: '试剂归还', classification: 'consumables' } meta: { title: '对照品归还', icon: '试剂归还', classification: 'consumables' }
} }
] ]
}, },
@ -143,7 +143,7 @@ const consumablesRouter = [
path: 'index', path: 'index',
name: 'standardweighing', name: 'standardweighing',
component: () => import('@/views/reagent/weighing/index'), component: () => import('@/views/reagent/weighing/index'),
meta: { title: '耗材称重', icon: '试剂称重', classification: 'consumables' } meta: { title: '对照品称重', icon: '试剂称重', classification: 'consumables' }
} }
] ]
}, },
@ -157,7 +157,7 @@ const consumablesRouter = [
path: 'index', path: 'index',
name: 'standardInventory', name: 'standardInventory',
component: () => import('@/views/reagent/inventory/index'), component: () => import('@/views/reagent/inventory/index'),
meta: { title: '耗材盘点', icon: '库存盘点', classification: 'consumables' } meta: { title: '对照品盘点', icon: '库存盘点', classification: 'consumables' }
} }
] ]
}, },
@ -191,7 +191,7 @@ const consumablesRouter = [
path: 'index', path: 'index',
name: 'standardManagement', name: 'standardManagement',
component: () => import('@/views/reagent/management/data/index'), component: () => import('@/views/reagent/management/data/index'),
meta: { title: '耗材管理', icon: '试剂管理', classification: 'consumables' } meta: { title: '对照品管理', icon: '试剂管理', classification: 'consumables' }
} }
] ]
}, },
@ -233,7 +233,7 @@ const consumablesRouter = [
path: 'index', path: 'index',
name: 'standardForm', name: 'standardForm',
component: () => import('@/views/reagent/customform/index'), component: () => import('@/views/reagent/customform/index'),
meta: { title: '耗材表单自定义', icon: '表单', classification: 'consumables' } meta: { title: '对照品表单自定义', icon: '表单', classification: 'consumables' }
} }
] ]
}, },

@ -1,5 +1,5 @@
import Layout from '@/layout' import Layout from '@/layout'
// 试剂管理路由 // 高危化品管理路由
const reagentRouter = [ const reagentRouter = [
{ {
path: '/reagent/mainoverview', path: '/reagent/mainoverview',
@ -95,7 +95,7 @@ const reagentRouter = [
path: 'index', path: 'index',
name: 'Warehousing', name: 'Warehousing',
component: () => import('@/views/reagent/warehousing/index'), component: () => import('@/views/reagent/warehousing/index'),
meta: { title: '试剂入库', icon: '试剂入库', classification: 'reagent' } meta: { title: '高危化品入库', icon: '试剂入库', classification: 'reagent' }
} }
] ]
}, },
@ -103,13 +103,13 @@ 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: 'YRYBDangerousUseView' },
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' }
} }
] ]
}, },
@ -117,13 +117,13 @@ const reagentRouter = [
path: '/reagent/sendback', path: '/reagent/sendback',
component: Layout, component: Layout,
redirect: '/reagent/sendback/index', redirect: '/reagent/sendback/index',
meta: { classification: 'reagent', module_code: 'DrugReturnView' }, meta: { classification: 'reagent', module_code: 'YRYBDangerousReturnView' },
children: [ children: [
{ {
path: 'index', path: 'index',
name: 'SendBack', name: 'SendBack',
component: () => import('@/views/reagent/receivingandreturn/index'), component: () => import('@/views/reagent/receivingandreturn/index'),
meta: { title: '试剂归还', icon: '试剂归还', classification: 'reagent' } meta: { title: '高危化品归还', icon: '试剂归还', classification: 'reagent' }
} }
] ]
}, },
@ -137,7 +137,7 @@ const reagentRouter = [
path: 'index', path: 'index',
name: 'createapply', name: 'createapply',
component: () => import('@/views/reagent/createapply/index'), component: () => import('@/views/reagent/createapply/index'),
meta: { title: '创建申请', icon: '创建申请', classification: 'reagent' } meta: { title: '高危化品创建申请', icon: '创建申请', classification: 'reagent' }
} }
] ]
}, },
@ -151,115 +151,129 @@ const reagentRouter = [
path: 'index', path: 'index',
name: 'applymanagement', name: 'applymanagement',
component: () => import('@/views/reagent/applymanagement/index'), component: () => import('@/views/reagent/applymanagement/index'),
meta: { title: '申请管理', icon: '申请管理', classification: 'reagent' } meta: { title: '高危化品申请管理', icon: '申请管理', classification: 'reagent' }
} }
] ]
}, },
{ {
path: '/reagent/weighing', path: '/reagent/weightregistration',
component: Layout, component: Layout,
redirect: '/reagent/weighing/index', redirect: '/reagent/weightregistration/index',
meta: { classification: 'reagent', module_code: 'DrugWeigh' }, meta: { classification: 'reagent', module_code: 'CreateApplyView' },
children: [
{
path: 'index',
name: 'weighing',
component: () => import('@/views/reagent/weighing/index'),
meta: { title: '试剂称重', icon: '试剂称重', classification: 'reagent' }
}
]
},
{
path: '/reagent/inventory',
component: Layout,
redirect: '/reagent/inventory/index',
meta: { classification: 'reagent', module_code: 'StockTakingIndex' },
children: [ children: [
{ {
path: 'index', path: 'index',
name: 'Inventory', name: 'weightregistration',
component: () => import('@/views/reagent/inventory/index'), component: () => import('@/views/reagent/weightregistration/index'),
meta: { title: '试剂盘点', icon: '库存盘点', classification: 'reagent' } meta: { title: '高危化品称重登记', icon: '称重登记', classification: 'reagent' }
}
]
},
{
path: '/reagent/database',
component: Layout,
redirect: '/reagent/database/msds',
meta: { title: '化学品数据库', icon: '化学品数据库', classification: 'reagent', module_code: 'ChemicalDB' },
children: [
{
path: 'msds',
name: 'MSDS',
component: () => import('@/views/reagent/database/index'),
meta: { title: 'MSDS数据库', classification: 'reagent' }
},
{
path: 'dangerous',
name: 'Dangerous',
component: () => import('@/views/reagent/database/index'),
meta: { title: '危化品数据库', classification: 'reagent' }
} }
] ]
}, },
// {
// path: '/reagent/weighing',
// component: Layout,
// redirect: '/reagent/weighing/index',
// meta: { classification: 'reagent', module_code: 'YRYBDangerousWeigh' },
// children: [
// {
// path: 'index',
// name: 'weighing',
// component: () => import('@/views/reagent/weighing/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,
// redirect: '/reagent/database/msds',
// meta: { title: '化学品数据库', icon: '化学品数据库', classification: 'reagent', module_code: 'ChemicalDB' },
// children: [
// {
// path: 'msds',
// name: 'MSDS',
// component: () => import('@/views/reagent/database/index'),
// meta: { title: 'MSDS数据库', classification: 'reagent' }
// },
// {
// path: 'dangerous',
// name: 'Dangerous',
// component: () => import('@/views/reagent/database/index'),
// meta: { title: '危化品数据库', classification: 'reagent' }
// }
// ]
// },
{ {
path: '/reagent/management', path: '/reagent/management',
component: Layout, component: Layout,
redirect: '/reagent/management/index', redirect: '/reagent/management/index',
meta: { title: '试剂管理', icon: '试剂管理', classification: 'reagent', module_code: 'DrugIndex' }, meta: { title: '高危化品管理', icon: '试剂管理', classification: 'reagent', module_code: 'YRYBDangerousIndex' },
children: [ children: [
{ {
path: 'index', path: 'index',
name: 'Management', name: 'Management',
component: () => import('@/views/reagent/management/data/index'), component: () => import('@/views/reagent/management/data/index'),
meta: { title: '试剂管理', icon: '试剂管理', classification: 'reagent' } meta: { title: '高危化品管理', icon: '试剂管理', classification: 'reagent' }
}
]
},
{
path: '/reagent/client',
component: Layout,
redirect: '/reagent/client/index',
meta: { classification: 'reagent', module_code: 'CabinetIndex' },
children: [
{
path: 'index',
name: 'Client',
component: () => import('@/views/reagent/client/index'),
meta: { title: '柜体管理', icon: '柜体管理', classification: 'reagent' }
}
]
},
{
path: '/reagent/envrecord',
component: Layout,
redirect: '/reagent/envrecord/index',
meta: { classification: 'reagent', module_code: 'HumitureIndex' },
children: [
{
path: 'index',
name: 'EnvRecord',
component: () => import('@/views/reagent/envrecord/index'),
meta: { title: '环境记录', icon: '雪花', classification: 'reagent' }
}
]
},
{
path: '/reagent/form',
component: Layout,
redirect: '/reagent/form/index',
meta: { classification: 'reagent', module_code: 'DrugCustomForm' },
children: [
{
path: 'index',
name: 'Form',
component: () => import('@/views/reagent/customform/index'),
meta: { title: '试剂表单自定义', icon: '表单', classification: 'reagent' }
} }
] ]
}, },
// { // {
// path: '/reagent/client',
// component: Layout,
// redirect: '/reagent/client/index',
// meta: { classification: 'reagent', module_code: 'CabinetIndex' },
// children: [
// {
// path: 'index',
// name: 'Client',
// component: () => import('@/views/reagent/client/index'),
// meta: { title: '柜体管理', icon: '柜体管理', classification: 'reagent' }
// }
// ]
// },
// {
// path: '/reagent/envrecord',
// component: Layout,
// redirect: '/reagent/envrecord/index',
// meta: { classification: 'reagent', module_code: 'HumitureIndex' },
// children: [
// {
// path: 'index',
// name: 'EnvRecord',
// component: () => import('@/views/reagent/envrecord/index'),
// meta: { title: '环境记录', icon: '雪花', classification: 'reagent' }
// }
// ]
// },
// {
// path: '/reagent/form',
// component: Layout,
// redirect: '/reagent/form/index',
// meta: { classification: 'reagent', module_code: 'YRYBDangerousCustomForm' },
// children: [
// {
// path: 'index',
// name: 'Form',
// component: () => import('@/views/reagent/customform/index'),
// meta: { title: '试剂表单自定义', icon: '表单', classification: 'reagent' }
// }
// ]
// },
// {
// path: '/reagent/buy', // path: '/reagent/buy',
// component: Layout, // component: Layout,
// meta: { classification: 'reagent' }, // meta: { classification: 'reagent' },

@ -1,5 +1,5 @@
import Layout from '@/layout' import Layout from '@/layout'
// 标准品管理路由 // 危化品管理路由
const standardRouter = [ const standardRouter = [
{ {
path: '/standard/mainoverview', path: '/standard/mainoverview',
@ -39,7 +39,7 @@ const standardRouter = [
name: 'standardInfo', name: 'standardInfo',
component: () => import('@/views/reagent/report/reagentinfo/index'), component: () => import('@/views/reagent/report/reagentinfo/index'),
hidden: true, hidden: true,
meta: { title: '标准品信息详情', icon: '报表统计', classification: 'standard', activeMenu: '/standard/report/index' } meta: { title: '危化品信息详情', icon: '报表统计', classification: 'standard', activeMenu: '/standard/report/index' }
}, },
{ {
path: 'warehousinginfo', path: 'warehousinginfo',
@ -60,7 +60,7 @@ const standardRouter = [
name: 'standardConsumInfo', name: 'standardConsumInfo',
component: () => import('@/views/reagent/report/reagentconsum/index'), component: () => import('@/views/reagent/report/reagentconsum/index'),
hidden: true, hidden: true,
meta: { title: '标准品消耗', icon: '报表统计', classification: 'standard', activeMenu: '/standard/report/index' } meta: { title: '危化品消耗', icon: '报表统计', classification: 'standard', activeMenu: '/standard/report/index' }
}, },
{ {
path: 'userconsuminfo', path: 'userconsuminfo',
@ -95,7 +95,7 @@ const standardRouter = [
path: 'index', path: 'index',
name: 'standardWarehousing', name: 'standardWarehousing',
component: () => import('@/views/reagent/warehousing/index'), component: () => import('@/views/reagent/warehousing/index'),
meta: { title: '标准品入库', icon: '试剂入库', classification: 'standard' } meta: { title: '危化品入库', icon: '试剂入库', classification: 'standard' }
} }
] ]
}, },
@ -109,7 +109,7 @@ const standardRouter = [
path: 'index', path: 'index',
name: 'standardReceiving', name: 'standardReceiving',
component: () => import('@/views/reagent/receivingandreturn/index'), component: () => import('@/views/reagent/receivingandreturn/index'),
meta: { title: '标准品领用', icon: '试剂领用', classification: 'standard' } meta: { title: '危化品领用', icon: '试剂领用', classification: 'standard' }
} }
] ]
}, },
@ -123,7 +123,7 @@ const standardRouter = [
path: 'index', path: 'index',
name: 'standardSendBack', name: 'standardSendBack',
component: () => import('@/views/reagent/receivingandreturn/index'), component: () => import('@/views/reagent/receivingandreturn/index'),
meta: { title: '标准品归还', icon: '试剂归还', classification: 'standard' } meta: { title: '危化品归还', icon: '试剂归还', classification: 'standard' }
} }
] ]
}, },
@ -137,7 +137,7 @@ const standardRouter = [
path: 'index', path: 'index',
name: 'standardweighing', name: 'standardweighing',
component: () => import('@/views/reagent/weighing/index'), component: () => import('@/views/reagent/weighing/index'),
meta: { title: '标准品称重', icon: '试剂称重', classification: 'standard' } meta: { title: '危化品称重', icon: '试剂称重', classification: 'standard' }
} }
] ]
}, },
@ -151,7 +151,7 @@ const standardRouter = [
path: 'index', path: 'index',
name: 'standardInventory', name: 'standardInventory',
component: () => import('@/views/reagent/inventory/index'), component: () => import('@/views/reagent/inventory/index'),
meta: { title: '标准品盘点', icon: '库存盘点', classification: 'standard' } meta: { title: '危化品盘点', icon: '库存盘点', classification: 'standard' }
} }
] ]
}, },
@ -179,13 +179,13 @@ const standardRouter = [
path: '/standard/management', path: '/standard/management',
component: Layout, component: Layout,
redirect: '/standard/management/index', redirect: '/standard/management/index',
meta: { title: '标准品管理', icon: '试剂管理', classification: 'standard', module_code: 'StandardIndex' }, meta: { title: '危化品管理', icon: '试剂管理', classification: 'standard', module_code: 'StandardIndex' },
children: [ children: [
{ {
path: 'index', path: 'index',
name: 'standardManagement', name: 'standardManagement',
component: () => import('@/views/reagent/management/data/index'), component: () => import('@/views/reagent/management/data/index'),
meta: { title: '标准品管理', icon: '试剂管理', classification: 'standard' } meta: { title: '危化品管理', icon: '试剂管理', classification: 'standard' }
} }
] ]
}, },
@ -227,7 +227,7 @@ const standardRouter = [
path: 'index', path: 'index',
name: 'standardForm', name: 'standardForm',
component: () => import('@/views/reagent/customform/index'), component: () => import('@/views/reagent/customform/index'),
meta: { title: '标准品表单自定义', icon: '表单', classification: 'standard' } meta: { title: '危化品表单自定义', icon: '表单', classification: 'standard' }
} }
] ]
}, },

@ -200,17 +200,17 @@ export function getALLRouter(data) {
{ {
name: 'reagent', name: 'reagent',
router: rasr[0], router: rasr[0],
title: '试剂管理' title: '高危化品管理'
}, },
{ {
name: 'standard', name: 'standard',
router: bzp[0], router: bzp[0],
title: '标准品管理' title: '危化品管理'
}, },
{ {
name: 'consumables', name: 'consumables',
router: hc[0], router: hc[0],
title: '耗材管理' title: '对照品管理'
}, },
{ {
name: 'instrument', name: 'instrument',

@ -1,8 +1,8 @@
const mapTitle = { const mapTitle = {
'reagent': '试剂', 'reagent': '高危化品',
'user': 'user', 'user': 'user',
'standard': '标准品', 'standard': '危化品',
'consumables': '耗材', 'consumables': '对照品',
'instrument': '仪器' 'instrument': '仪器'
} }

@ -7,9 +7,9 @@
</div> </div>
<div class="home-content"> <div class="home-content">
<div class="home-pic"> <div class="home-pic">
<div class="home-pic-item" @click="picClick('reagent')"><img src="@/assets/2-主界面/试剂管理.png" alt=""></div> <div class="home-pic-item" @click="picClick('reagent')"><img src="@/assets/2-主界面/易制毒易制爆.png" alt=""></div>
<div key="2" class="home-pic-item" @click="picClick('standard')"><img src="@/assets/2-主界面/standard.png" alt=""></div> <div key="2" class="home-pic-item" @click="picClick('standard')"><img src="@/assets/2-主界面/一般危化品.png" alt=""></div>
<div key="3" class="home-pic-item" @click="picClick('consumables')"><img src="@/assets/2-主界面/耗材管理.png" alt=""></div> <div key="3" class="home-pic-item" @click="picClick('consumables')"><img src="@/assets/2-主界面/对照品.png" alt=""></div>
<!-- <div key="4" class="home-pic-item" @click="picClick('instrument')"><img src="@/assets/2-主界面/instrument.png" alt=""></div> --> <!-- <div key="4" class="home-pic-item" @click="picClick('instrument')"><img src="@/assets/2-主界面/instrument.png" alt=""></div> -->
<div v-if="this.$store.getters.userAuth.includes('UserIndex')" key="5" class="home-pic-item" @click="picClick('user')"><img src="@/assets/2-主界面/用户管理.png" alt=""></div> <div v-if="this.$store.getters.userAuth.includes('UserIndex')" key="5" class="home-pic-item" @click="picClick('user')"><img src="@/assets/2-主界面/用户管理.png" alt=""></div>
</div> </div>

@ -2,19 +2,15 @@
<div class="main-container-text"> <div class="main-container-text">
<div class="title">申请管理</div> <div class="title">申请管理</div>
<div class="header"> <div class="header">
<el-select v-model="client_id" placeholder="请选择柜体"> <!-- <el-select v-model="client_id" placeholder="请选择柜体">
<el-option <el-option
v-for="item in $store.getters.currentOptions" v-for="item in $store.getters.currentOptions"
:key="item.id" :key="item.id"
:label="item.client_name" :label="item.client_name"
:value="item.client_id" :value="item.client_id"
/> />
</el-select> </el-select> -->
<el-button type="primary" plain @click="handleApply"><i class="el-icon-edit" />处理请求</el-button> <el-button type="primary" plain @click="handleCheck"><i class="el-icon-edit" />详情查看</el-button>
<!-- <div class="header-right">
<el-button type="primary" plain @click="handleHistory"></el-button>
<el-button icon="el-icon-refresh" circle @click="handleRefresh" />
</div> -->
<div class="header-right"> <div class="header-right">
<el-button icon="el-icon-refresh" circle @click="handleRefresh" /> <el-button icon="el-icon-refresh" circle @click="handleRefresh" />
</div> </div>
@ -31,8 +27,7 @@
<el-table-column align="center" type="index" width="50" label="序号" /> <el-table-column align="center" type="index" width="50" label="序号" />
<el-table-column prop="user_name" show-overflow-tooltip label="用户名称" align="center" /> <el-table-column prop="user_name" show-overflow-tooltip label="用户名称" align="center" />
<el-table-column prop="user_name_pt" show-overflow-tooltip label="陪同用户名称" align="center" /> <el-table-column prop="user_name_pt" show-overflow-tooltip label="陪同用户名称" align="center" />
<el-table-column prop="drug_name" show-overflow-tooltip label="试剂名称" align="center" /> <el-table-column prop="use_content" show-overflow-tooltip label="试剂详情" align="center" />
<el-table-column prop="drug_num" show-overflow-tooltip label="试剂数量" align="center" />
<el-table-column prop="create_date" show-overflow-tooltip label="申请时间" align="center" /> <el-table-column prop="create_date" show-overflow-tooltip label="申请时间" align="center" />
@ -42,9 +37,17 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="solve_user_name" show-overflow-tooltip label="受理人" align="center" /> <el-table-column prop="solve_user_name" show-overflow-tooltip label="审批人1" align="center" />
<el-table-column prop="solve_user_pt_name" show-overflow-tooltip label="陪同受理人" align="center" /> <el-table-column prop="solve_user_pt_name" show-overflow-tooltip label="审批人2" align="center" />
<el-table-column prop="solve_date" show-overflow-tooltip label="受理时间" align="center" /> <el-table-column prop="solve_date" show-overflow-tooltip label="审批时间" align="center" />
<el-table-column
fixed="right"
label="操作"
width="100">
<template slot-scope="scope">
<el-button @click="handleClick(scope.row)" type="text" size="small">审批</el-button>
</template>
</el-table-column>
</el-table> </el-table>
<div class="my-pagination" style="text-align: center"> <div class="my-pagination" style="text-align: center">
@ -107,10 +110,7 @@
<el-table-column align="center" property="name" label="试剂名称" /> <el-table-column align="center" property="name" label="试剂名称" />
<el-table-column align="center" property="purity" label="纯度" /> <el-table-column align="center" property="purity" label="纯度" />
<el-table-column align="center" property="speci" label="规格" /> <el-table-column align="center" property="speci" label="规格" />
<el-table-column align="center" property="purity" label="纯度" /> <el-table-column align="center" property="num" label="数量" />
<el-table-column align="center" property="input_num" label="录入量" />
<el-table-column align="center" property="stock_num" label="库存量" />
<el-table-column align="center" property="difference_num" label="相差值" />
</el-table> </el-table>
</el-scrollbar> </el-scrollbar>
</div> </div>
@ -128,7 +128,8 @@ import {
} from '@/api/reagent/drugStock' } from '@/api/reagent/drugStock'
import { import {
get_apply_list get_apply_list,
update_solve
} from '@/api/reagent/applymanage' } from '@/api/reagent/applymanage'
import stringify from '@/utils/stringify' import stringify from '@/utils/stringify'
export default { export default {
@ -176,6 +177,23 @@ export default {
this.total = rsp.data.total_count this.total = rsp.data.total_count
}) })
}, },
handleClick(row){
var that =this
const data={
id:row.id
}
update_solve(stringify(data)).then(rsp => {
console.log(rsp)
if (rsp.status === 0) {
this.$message.success("审批成功!")
this.handleRefresh()
// this.get_stock_list()
} else {
this.$message.error(rsp.msg)
}
})
},
pageChange(page) { pageChange(page) {
this.page = page this.page = page
this.get_stock_list() this.get_stock_list()
@ -184,7 +202,12 @@ export default {
this.handleSelectionSelection = val this.handleSelectionSelection = val
}, },
// handleHistory() { // handleHistory() {
// console.log(this.handleSelectionSelection,'1111')
// if(this.handleSelectionSelection.length ===1){
// this.dialogHistoryVisible = true // this.dialogHistoryVisible = true
// }else{
// alert('')
// }
// }, // },
handleRefresh() { handleRefresh() {
this.get_apply() this.get_apply()
@ -232,16 +255,8 @@ export default {
handleCheck() { handleCheck() {
if (this.handleSelectionSelection.length === 1) { if (this.handleSelectionSelection.length === 1) {
this.dialogHistoryVisible = true this.dialogHistoryVisible = true
const data = { this.historyData = JSON.parse(this.handleSelectionSelection[0].use_content)
id:this.handleSelectionSelection[0].id console.log(this.handleSelectionSelection[0].use_content,'111')
}
get_stock_info(stringify(data)).then(rsp => {
if (rsp.status === 0) {
this.historyData = rsp.data
} else {
this.$message.error(rsp.msg)
}
})
} else { } else {
this.$message.warning("选择一条记录操作!") this.$message.warning("选择一条记录操作!")
} }

@ -0,0 +1,288 @@
<template>
<div class="main-container-text">
<div class="title">创建申请</div>
<div class="header">
<el-button type="primary" plain @click="openDialogTableVisible"><i class="el-icon-edit" />申请</el-button>
<el-dialog title="确认提交申请" :visible.sync="dialogTableVisible">
<el-form :inline="true" :model="pt_form" :rules="rules" ref="pt_form" class="demo-form-inline">
<el-form-item label="申请陪同人" prop="user_id_pt">
<el-select v-model="pt_form.user_id_pt" filterable placeholder="请选择陪同人">
<el-option
v-for="item in ptUserArray"
:key="item.user_id"
:label="item.real_name"
:value="item.user_id">
</el-option>
</el-select>
</el-form-item>
</el-form>
<el-table :data="checkList">
<el-table-column align="center" type="index" width="50" label="序号" />
<el-table-column prop="name" show-overflow-tooltip label="试剂名称" align="center" />
<el-table-column prop="drug_num" show-overflow-tooltip label="剩余数量" align="center" />
<el-table-column prop="speci" show-overflow-tooltip label="规格" align="center" />
<el-table-column prop="purity" show-overflow-tooltip label="纯度" align="center" />
<el-table-column prop="num" show-overflow-tooltip label="领用数量" align="center">
<template slot-scope="scope">
<el-input-number type="number" :max="Number(scope.row.drug_num)" :min="0" v-model="scope.row.num" size="small"></el-input-number>
</template>
</el-table-column>
</el-table>
<div slot="footer" style="text-align: center">
<el-button @click="dialogTableClose"></el-button>
<el-button type="primary" @click="create_apply(pt_form)"></el-button>
</div>
</el-dialog>
<div class="header-right">
<el-button icon="el-icon-refresh" circle @click="handleRefresh" />
</div>
</div>
<el-table
stripe
ref="multipleTable"
:data="tableData"
:header-cell-style="headerStyle"
@select="handleSelection"
row-key="medicament_id"
height="69vh"
class="table-style"
>
<el-table-column :reserve-selection="true" type="selection" width="55" align="center" label="选择" />
<el-table-column type="index" align="center" width="50" label="序号" />
<el-table-column prop="name" show-overflow-tooltip label="试剂名称" align="center" />
<el-table-column prop="drug_num" show-overflow-tooltip label="试剂数量" align="center" />
<el-table-column prop="speci" show-overflow-tooltip label="规格" align="center" />
<el-table-column prop="purity" show-overflow-tooltip label="纯度" align="center" />
<el-table-column prop="distributor" show-overflow-tooltip label="经销商" align="center" />
<el-table-column prop="manufacturer" show-overflow-tooltip label="生产厂家" align="center" />
</el-table>
<div class="my-pagination" style="text-align: center">
<el-pagination
background
layout="prev, pager, next"
:current-page.sync="page"
:total="total"
:page-size.sync="page_size"
@current-change="pageChange"
/>
</div>
</div>
</template>
<script>
import stringify from '@/utils/stringify'
import {
get_pt_user_list,
get_drug_group_list,
add_apply
} from '@/api/reagent/createapply'
export default {
name: 'CreateApply',
data() {
return {
page: 1,
page_size: 15,
total: 0,
client_id: '',
dialogVisible: false,
tableData: [],
headerStyle: { 'background': '#E6E6E6' },
multipleSelection: [],
handleSelectionSelection: [],
dialogHistoryVisible: false,
loadingHistory: false,
historyData: [],
name: '',
history_client_id: '',
value1: '',
value2: ['', ''],
history_page: 1,
history_page_size: 15,
history_total: 100,
dialogTableVisible: false,
checkList: [],
ptUserArray:[],
pt_form:{
user_id_pt: '',
},
rules: {
user_id_pt: [
{ required: true, message: '请选择陪同人', trigger: 'change' }
],
}
}
},
created () {
this.client_id = this.$store.getters.currentOptions[0].client_id
this.get_drug_group()
this.get_pt_user()
},
methods: {
handleSelection(selection){
var that =this
that.checkList =selection
},
get_drug_group: function() {
const data = {
client_id: this.client_id,
page:this.page,
page_size: this.page_size
}
get_drug_group_list(stringify(data)).then(rsp => {
console.log("rsp.data.data_list>>", rsp.data.data_list)
rsp.data.data_list.forEach((value , index) => {
value['num'] = 1
})
this.tableData = this.addDataIndex(rsp.data.data_list)
this.total = rsp.data.total_count
})
},
get_pt_user() {
console.log("jjj")
const data = {
page: this.page,
page_size: 10000,
user_id:this.$store.state.user.id,
user_code: this.user_code,
real_name: this.real_name,
role_id: this.role_id,
is_enabled: this.is_enabled
}
console.log("hhhhh")
get_pt_user_list(stringify(data)).then(res => {
this.ptUserArray = res.data.data_list
console.log("res>>>", res)
})
console.log("giao")
},
create_apply(pt_from){
var that =this
let datalist = that.checkList.map((item) => {
return Object.assign({}, { name: item.name, num: item.num,client_id: item.client_id, purity: item.purity, speci: item.speci})
})
if (pt_from.user_id_pt === '') {
alert("请选择陪同人");
}else{
const data = {
user_id: this.$store.state.user.id,
user_id_pt: pt_from.user_id_pt,
use_content: JSON.stringify(datalist),
}
add_apply(stringify(data)).then(rsp => {
console.log("rsp>>", rsp)
if (rsp.status==0){
this.dialogTableClose()
//
this.$refs.multipleTable.clearSelection();
that.checkList=[]
}
})
}
},
pageChange(page) {
this.page = page
this.get_drug_group()
},
addDataIndex(initData){
for (let i = 0; i < initData.length; i++) {
initData[i]["index"] = i
}
return initData
},
handleRefresh() {
this.get_drug_group()
},
handleApply() {
const data = {
client_id: this.client_id
}
get_drug_list(stringify(data)).then(rsp => {
this.multipleSelection = rsp.data
})
this.dialogVisible = true
},
onClose() {
this.multipleSelection = []
},
close() {
this.dialogVisible = false
this.multipleSelection = []
},
openDialogTableVisible(){
if (this.checkList.length === 0 ){
alert("未选择");
} else {
this.dialogTableVisible = true
}
},
dialogTableClose() {
this.user_id_pt = ''
this.dialogTableVisible = false
},
}
}
</script>
<style lang="scss" scoped>
.main-container-text {
min-height: calc(100vh - 110px);
padding: 1rem;
margin: 1rem;
background: white;
.title {
font-size: 20px;
font-weight: bold;
color: #000000;
}
.header {
margin: 1rem 0 1rem 0;
.el-input {
width: 9.375rem;
margin-right: 1rem;
}
.el-select {
margin-right: 1rem;
}
.header-right {
float: right;
}
}
}
.add-item {
margin-bottom: 1rem;
}
</style>
<style scoped>
.table-style /deep/ .el-table-column--selection.is-leaf .el-checkbox {
display: none;
}
</style>
<style>
/* 1,必须去掉scoped否则overflow-x: hidden失效 */
.box {
margin: 0 auto;
width: 95%;
height: 95%;
}
/* 2外包一个div,来减少对其他页面会有冲突此时缺少scoped */
.box .el-scrollbar__wrap {
overflow-x: hidden;
}
.el-dialog__body {
height: 500px;
}
</style>

@ -2,18 +2,11 @@
<div class="main-container-text"> <div class="main-container-text">
<div class="title">创建申请</div> <div class="title">创建申请</div>
<div class="header"> <div class="header">
<el-select v-model="client_id" placeholder="请选择柜体">
<el-option
v-for="item in $store.getters.currentOptions"
:key="item.id"
:label="item.client_name"
:value="item.client_id"
/>
</el-select>
<el-button type="primary" plain @click="openDialogTableVisible"><i class="el-icon-edit" />申请</el-button> <el-button type="primary" plain @click="openDialogTableVisible"><i class="el-icon-edit" />申请</el-button>
<el-dialog title="确认提交申请" :visible.sync="dialogTableVisible"> <el-dialog title="确认提交申请" :visible.sync="dialogTableVisible">
<el-form :inline="true" :model="pt_form" :rules="rules" ref="pt_form" class="demo-form-inline"> <div style="display:flex;flex-direction: row;">
<el-form :inline="true" :model="pt_form" :rules="rules" ref="pt_form" class="demo-form-inline" style="padding-top:13px">
<el-form-item label="申请陪同人" prop="user_id_pt"> <el-form-item label="申请陪同人" prop="user_id_pt">
<el-select v-model="pt_form.user_id_pt" filterable placeholder="请选择陪同人"> <el-select v-model="pt_form.user_id_pt" filterable placeholder="请选择陪同人">
<el-option <el-option
@ -25,17 +18,49 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-form> </el-form>
<div class="header">
<el-input v-model="name" clearable placeholder="请输入试剂名称" />
<el-button type="primary" icon="el-icon-search" @click="getList"></el-button>
</div>
<el-table :data="checkList"> </div>
<el-table-column align="center" type="index" width="50" label="序号" /> <el-table :data="tableData" max-height="250" style="height:250px;padding-bottom: 50px;">
<el-table-column type="index" align="center" width="50" label="序号" />
<el-table-column prop="name" show-overflow-tooltip label="试剂名称" align="center" /> <el-table-column prop="name" show-overflow-tooltip label="试剂名称" align="center" />
<el-table-column prop="drug_num" show-overflow-tooltip label="试剂数量" align="center" /> <el-table-column prop="drug_num" show-overflow-tooltip label="试剂数量" align="center" />
<el-table-column prop="speci" show-overflow-tooltip label="规格" align="center" /> <el-table-column prop="speci" show-overflow-tooltip label="规格" align="center" />
<el-table-column prop="purity" show-overflow-tooltip label="纯度" align="center" /> <el-table-column prop="purity" show-overflow-tooltip label="纯度" align="center" />
<el-table-column prop="distributor" show-overflow-tooltip label="经销商" align="center" /> <el-table-column prop="distributor" show-overflow-tooltip label="经销商" align="center" />
<el-table-column prop="manufacturer" show-overflow-tooltip label="生产厂家" align="center" /> <el-table-column prop="manufacturer" show-overflow-tooltip label="生产厂家" align="center" />
<el-table-column
fixed="right"
label="操作"
width="100">
<template slot-scope="scope">
<el-button @click="handleClick(scope.row)" type="text" size="small">添加申请</el-button>
</template>
</el-table-column>
</el-table> </el-table>
<el-table :data="checkList" max-height="250" style="height:250px;padding-bottom: 50px;">
<el-table-column type="index" align="center" width="50" label="序号" />
<el-table-column prop="name" show-overflow-tooltip label="试剂名称" align="center" />
<el-table-column prop="num" show-overflow-tooltip label="申请数量" align="center" />
<el-table-column prop="speci" show-overflow-tooltip label="规格" align="center" />
<el-table-column prop="purity" show-overflow-tooltip label="纯度" align="center" />
<el-table-column prop="distributor" show-overflow-tooltip label="经销商" align="center" />
<el-table-column prop="manufacturer" show-overflow-tooltip label="生产厂家" align="center" />
<el-table-column
fixed="right"
label="操作"
width="100">
<template slot-scope="scope">
<el-button @click="cancelClick(scope.row)" type="text" size="small">取消申请</el-button>
</template>
</el-table-column>
</el-table>
<div slot="footer" style="text-align: center"> <div slot="footer" style="text-align: center">
<el-button @click="dialogTableClose"></el-button> <el-button @click="dialogTableClose"></el-button>
<el-button type="primary" @click="create_apply(pt_form)"></el-button> <el-button type="primary" @click="create_apply(pt_form)"></el-button>
@ -49,32 +74,31 @@
</div> </div>
<el-table <el-table
stripe stripe
:data="tableData" ref="multipleTable"
:data="tableData1"
:header-cell-style="headerStyle" :header-cell-style="headerStyle"
@select="handleSelection"
row-key="medicament_id"
height="69vh" height="69vh"
@row-click="singleElection" class="table-style"
> >
<el-table-column type="selection" width="55" align="center" label="选择"> <el-table-column type="selection" width="55" align="center" />
<template slot-scope="scope">
<el-radio class="radio" v-model="templateSelection" :label="scope.row.index"
>{{''}}</el-radio
>
</template>
</el-table-column>
<el-table-column align="center" type="index" width="50" label="序号" /> <el-table-column align="center" type="index" width="50" label="序号" />
<el-table-column prop="name" show-overflow-tooltip label="试剂名称" align="center" /> <el-table-column prop="user_name" show-overflow-tooltip label="用户名称" align="center" />
<el-table-column prop="drug_num" show-overflow-tooltip label="试剂数量" align="center" /> <el-table-column prop="user_name_pt" show-overflow-tooltip label="陪同用户名称" align="center" />
<el-table-column prop="speci" show-overflow-tooltip label="规格" align="center" /> <el-table-column prop="use_content" show-overflow-tooltip label="试剂详情" align="center" />
<el-table-column prop="purity" show-overflow-tooltip label="纯度" align="center" /> <el-table-column prop="create_date" show-overflow-tooltip label="申请时间" align="center" />
<el-table-column prop="distributor" show-overflow-tooltip label="经销商" align="center" /> <el-table-column prop="solve_user_name" show-overflow-tooltip label="审批人1" align="center" />
<el-table-column prop="manufacturer" show-overflow-tooltip label="生产厂家" align="center" /> <el-table-column prop="solve_user_pt_name" show-overflow-tooltip label="审批人2" align="center" />
<el-table-column prop="solve_date" show-overflow-tooltip label="审批时间" align="center" />
</el-table> </el-table>
<div class="my-pagination" style="text-align: center"> <div class="my-pagination" style="text-align: center">
<el-pagination <el-pagination
background background
layout="prev, pager, next" layout="prev, pager, next"
:current-page.sync="page" :current-page.sync="page"
:total="total" :total="total1"
:page-size.sync="page_size" :page-size.sync="page_size"
@current-change="pageChange" @current-change="pageChange"
/> />
@ -85,22 +109,25 @@
<script> <script>
import stringify from '@/utils/stringify' import stringify from '@/utils/stringify'
import { import {
add_apply,
get_pt_user_list, get_pt_user_list,
get_drug_group_list get_drug_group_list,
add_apply
} from '@/api/reagent/createapply' } from '@/api/reagent/createapply'
import {
get_apply_list,
} from '@/api/reagent/applymanage'
export default { export default {
name: 'CreateApply', name: 'CreateApply',
data() { data() {
return { return {
// drugStockForm:[],
page: 1, page: 1,
page_size: 15, page_size: 15,
total: 0, total: 0,
total1: 0,
client_id: '', client_id: '',
dialogVisible: false, dialogVisible: false,
tableData: [], tableData: [],
tableData1: [],
headerStyle: { 'background': '#E6E6E6' }, headerStyle: { 'background': '#E6E6E6' },
multipleSelection: [], multipleSelection: [],
handleSelectionSelection: [], handleSelectionSelection: [],
@ -115,7 +142,6 @@ export default {
history_page_size: 15, history_page_size: 15,
history_total: 100, history_total: 100,
dialogTableVisible: false, dialogTableVisible: false,
templateSelection: "",
checkList: [], checkList: [],
ptUserArray:[], ptUserArray:[],
pt_form:{ pt_form:{
@ -134,14 +160,62 @@ export default {
this.get_pt_user() this.get_pt_user()
}, },
methods: { methods: {
handleClick(row){
var that =this
that.$prompt('请输入数量', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
inputPattern: /^[1-9]\d*$/,
inputErrorMessage: '请输入数字'
}).then(({ value }) => {
if(value>row.drug_num){
that.$message({
type: 'info',
message: '余量不足'
});
}else{
row.num =value
that.checkList.push(row)
that.tableData.splice(row.$index, 1)
}
}).catch(() => {
that.$message({
type: 'info',
message: '取消输入'
});
});
// that.tableData.slice(row)
console.log(row)
},
cancelClick(row){
var that =this
that.tableData.push(row)
that.checkList.splice(row.$index, 1)
console.log(row)
},
handleSelection(selection){
var that =this
that.checkList =selection
},
get_drug_group: function() { get_drug_group: function() {
const data = { const data = {
client_id: this.client_id, client_id: this.client_id,
page:this.page, page:this.page,
page_size: this.page_size page_size: this.page_size
} }
get_apply_list(stringify(data)).then(rsp => {
console.log("apply>>>", rsp)
this.tableData1 = rsp.data.data_list
this.total1 = rsp.data.total_count
})
get_drug_group_list(stringify(data)).then(rsp => { get_drug_group_list(stringify(data)).then(rsp => {
console.log("rsp.data.data_list>>", rsp.data.data_list) console.log("rsp.data.data_list>>", rsp.data.data_list)
rsp.data.data_list.forEach((value , index) => {
value['num'] = 1
})
this.tableData = this.addDataIndex(rsp.data.data_list) this.tableData = this.addDataIndex(rsp.data.data_list)
this.total = rsp.data.total_count this.total = rsp.data.total_count
}) })
@ -150,7 +224,8 @@ export default {
console.log("jjj") console.log("jjj")
const data = { const data = {
page: this.page, page: this.page,
page_size: this.page_size, page_size: 10000,
user_id:this.$store.state.user.id,
user_code: this.user_code, user_code: this.user_code,
real_name: this.real_name, real_name: this.real_name,
role_id: this.role_id, role_id: this.role_id,
@ -164,18 +239,32 @@ export default {
console.log("giao") console.log("giao")
}, },
create_apply(pt_from){ create_apply(pt_from){
console.log("pt_from.user_id_pt>>>", pt_from.user_id_pt) var that =this
let datalist = that.checkList.map((item) => {
return Object.assign({}, { name: item.name, num: item.num,client_id: item.client_id, purity: item.purity, speci: item.speci})
})
if (pt_from.user_id_pt === '') { if (pt_from.user_id_pt === '') {
console.log("请选择陪同人") alert("请选择陪同人");
}else{
const data = {
user_id: this.$store.state.user.id,
user_id_pt: pt_from.user_id_pt,
use_content: JSON.stringify(datalist),
}
add_apply(stringify(data)).then(rsp => {
console.log("rsp>>", rsp)
if (rsp.status==0){
this.dialogTableClose()
//
this.$refs.multipleTable.clearSelection();
that.checkList=[]
}
})
} }
}, },
pageChange(page) { pageChange(page) {
this.page = page this.page = page
this.get_stock_list() this.get_drug_group()
},
singleElection(row){
this.templateSelection = row.index
this.checkList = this.tableData.filter((item) => item.index === row.index)
}, },
addDataIndex(initData){ addDataIndex(initData){
for (let i = 0; i < initData.length; i++) { for (let i = 0; i < initData.length; i++) {
@ -203,11 +292,7 @@ export default {
this.multipleSelection = [] this.multipleSelection = []
}, },
openDialogTableVisible(){ openDialogTableVisible(){
if (this.checkList.length === 0 ){
alert("未选择");
} else {
this.dialogTableVisible = true this.dialogTableVisible = true
}
}, },
dialogTableClose() { dialogTableClose() {
this.user_id_pt = '' this.user_id_pt = ''
@ -266,6 +351,6 @@ export default {
overflow-x: hidden; overflow-x: hidden;
} }
.el-dialog__body { .el-dialog__body {
height: 500px; height: 600px !important;
} }
</style> </style>

@ -76,7 +76,7 @@
<el-table-column <el-table-column
v-if="$store.getters.classification === 'standard'" v-if="$store.getters.classification === 'standard'"
prop="standard_code" prop="standard_code"
label="标准品批号" label="危化品批号"
align="center" align="center"
/> />
<el-table-column <el-table-column
@ -438,8 +438,8 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col v-if="$store.getters.classification === 'standard'" :span="12"> <el-col v-if="$store.getters.classification === 'standard'" :span="12">
<el-form-item label="标准品批号" prop="standard_code"> <el-form-item label="危化品批号" prop="standard_code">
<el-input v-model="formData.standard_code" placeholder="请输入标准品批号" clearable :style="{width: '100%'}" /> <el-input v-model="formData.standard_code" placeholder="请输入危化品批号" clearable :style="{width: '100%'}" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col v-if="$store.getters.classification === 'standard'" :span="12"> <el-col v-if="$store.getters.classification === 'standard'" :span="12">

@ -0,0 +1,815 @@
<template>
<div class="main-content-container">
<div class="header">
<div class="title">{{ $store.state.app.title }}入库</div>
<div class="header-select">
<!-- <el-button>返回上一级</el-button>-->
<el-select v-model="client_id" clearable placeholder="请选择柜体" @change="getTmpList">
<el-option
v-for="item in $store.getters.currentOptions"
:key="item.id"
:label="item.client_name"
:value="item.client_id"
/>
</el-select>
<el-button type="primary" @click="handleReagentToDatabase">{{ $store.state.app.title }}</el-button>
<el-button type="primary" @click="handleBindToDB"></el-button>
<el-button type="primary" plain @click="handleAddTmp('add')">+ {{ $store.state.app.title }}</el-button>
<el-button @click="handleAddTmp('modify')"><i class="el-icon-edit" />编辑{{ $store.state.app.title }}模板</el-button>
<el-button @click="handlePrintCode"><i class="el-icon-printer" /> 打印条码</el-button>
<el-button @click="handleImport"><i class="el-icon-folder-add" /> 导入入库模板</el-button>
<div class="right">
<el-button icon="el-icon-delete" circle @click="handleDelTem" />
<el-button icon="el-icon-refresh" circle @click="handleRefresh" />
</div>
</div>
</div>
<div class="content">
<el-table
ref="multipleTable"
v-loading="loading"
element-loading-text="拼命加载中"
:header-cell-style="headerStyle"
:data="tableData"
style="width: 100%"
size="medium"
stripe
@selection-change="handleSelectionChange"
>
<el-table-column
type="selection"
width="55"
align="center"
/>
<el-table-column
align="center"
type="index"
width="50"
label="序号"
/>
<el-table-column
prop="template_name"
label="模板名称"
sortable
align="center"
/>
<el-table-column
prop="client_name"
label="所处位置"
sortable
align="center"
/>
<el-table-column
align="center"
prop="all_export_count"
label="入库数量"
/>
<el-table-column
align="center"
prop="create_date"
label="创建时间"
/>
<el-table-column
align="center"
prop="create_user_name"
label="创建人"
/>
<el-table-column
:show-overflow-tooltip="true"
align="center"
width="180"
prop="template_content"
label="详情信息"
/>
</el-table>
</div>
<div class="page my-pagination">
<el-pagination
background
layout="prev, pager, next"
:current-page.sync="page"
:total="total"
:page-size.sync="page_size"
@current-change="tmpPageChange"
/>
</div>
<!-- 选择试剂入库 弹框 -->
<el-dialog :title="`选择${$store.state.app.title}入库`" width="70%" :close-on-click-modal="false" :visible.sync="dialogTableVisible" @close="handleSelectClose">
<div class="search-header">
<el-input v-model="selectReagentValue" clearable placeholder="请输入搜索名称" />
<el-button type="primary" icon="el-icon-search" @click="searchReagent"></el-button>
</div>
<el-table
v-loading="loadingReagent"
element-loading-text="拼命加载中"
:header-cell-style="headerStyle"
:data="reagentData"
stripe
height="400"
>
<el-table-column align="center" type="index" width="50" label="序号" />
<el-table-column align="center" property="name" label="试剂名称" />
<el-table-column align="center" property="bar_code" label="试剂编码" />
<el-table-column align="center" property="manufacturer" label="生产厂家" />
<el-table-column align="center" property="purity" label="纯度" />
<el-table-column align="center" property="cas_number" label="CAS码" />
<el-table-column align="center" property="production_date" label="生产日期" />
<el-table-column align="center" property="shelf_life" label="保质期(天)" />
<el-table-column
align="center"
label="操作"
>
<template slot-scope="scope">
<el-button type="primary" @click="handleReagentClick(scope.row)"></el-button>
</template>
</el-table-column>
</el-table>
<div class="my-pagination" style="text-align: right">
<el-pagination
background
layout="total, prev, pager, next"
:current-page.sync="reagent_page"
:total="reagent_total"
:page-size.sync="reagent_page_size"
@current-change="reagentPageChange"
/>
</div>
<el-dialog
width="53%"
:title="`编辑${$store.state.app.title}信息`"
:close-on-click-modal="false"
:visible.sync="formVisible"
append-to-body
@close="formClose"
>
<ReagentForm :propsformdata="propsformdata" @handlefunc="handleReagentForm" />
</el-dialog>
</el-dialog>
<!-- 新增试剂模板弹框 -->
<el-dialog
:title="opTitle"
width="70%"
:close-on-click-modal="false"
:visible.sync="reagentAddVisible"
@close="handleAddClose"
>
<div class="header-select">
<el-input v-model="reagentAddTmpName" placeholder="请输入名称" />
<el-select v-model="reagentAddClient" placeholder="请选择柜体">
<el-option
v-for="item in $store.getters.currentOptions"
:key="item.id"
:label="item.client_name"
:value="item.client_id"
/>
</el-select>
<el-button v-if="opType === 'add'" type="primary" plain @click="handleADDOpen('add')">+ {{ $store.state.app.title }}</el-button>
<el-button @click="handleADDOpen('modify')"><i class="el-icon-edit" />编辑{{ $store.state.app.title }}条目</el-button>
<el-button v-if="opType === 'add'" @click="handleADDDEL"><i class="el-icon-delete" /> 删除{{ $store.state.app.title }}条目</el-button>
</div>
<div class="content">
<el-table
ref="multipleTable"
:header-cell-style="headerStyle"
:data="reagentAddTmpData"
style="width: 100%"
size="medium"
height="400"
@selection-change="handleAddSelectionChange"
>
<el-table-column type="selection" width="55" />
<el-table-column align="center" property="name" label="试剂名称" />
<el-table-column align="center" property="english_name" label="英文名称" />
<el-table-column align="center" property="purity" label="纯度" />
<el-table-column align="center" property="cas_number" label="CAS码" />
<el-table-column align="center" property="manufacturer" label="生产厂家" />
<el-table-column align="center" property="speci" label="规格" />
<el-table-column align="center" property="net_weight_unit" label="单位" />
<el-table-column align="center" property="total" label="预估质量" />
<el-table-column align="center" property="production_date" label="生产日期" />
<el-table-column align="center" property="shelf_life" label="保质期(天)" />
</el-table>
<div class="reagent-add">
<el-button @click="() => {reagentAddVisible= false;handleAddClose()}">取消</el-button>
<el-button type="primary" @click="handleAddSave"></el-button>
</div>
</div>
<el-dialog
width="53%"
:close-on-click-modal="false"
:title="reagentAddFormTitle"
:visible.sync="reagentAddFormVisible"
append-to-body
@close="reagentAddFormClose"
>
<ReagentForm :propsformdata="reagentAddFormdata" @handlefunc="handleReagentAddForm" />
</el-dialog>
</el-dialog>
<!-- 绑定入库 -->
<el-dialog
title="绑定入库"
width="70%"
:close-on-click-modal="false"
:visible.sync="bindToDBVisible"
@close="handleCloseToDB"
>
<div class="to-database">
<div class="bind-to-db-title">请扫描{{ $store.state.app.title }}条码</div>
<div>
<el-select v-model="client_id_input" placeholder="请选择柜体">
<el-option
v-for="item in $store.getters.currentOptions"
:key="item.id"
:label="item.client_name"
:value="item.client_id"
/>
</el-select>
</div>
</div>
<el-table
ref="singleTable"
:header-cell-style="headerStyle"
:data="bindToDBData"
height="400"
highlight-current-row
@current-change="handleCurrentSelectChange"
>
<el-table-column align="center" property="name" label="试剂名称" />
<el-table-column align="center" property="bar_code" label="试剂编码" />
<el-table-column align="center" property="manufacturer" label="生产厂家" />
<el-table-column align="center" property="purity" label="纯度" />
<el-table-column align="center" property="cas_number" label="CAS码" />
<el-table-column align="center" property="production_date" label="生产日期" />
<el-table-column align="center" property="shelf_life" label="保质期(天)" />
<el-table-column align="center" property="status" label="状态">
<template slot-scope="scope">
<el-tag
:type="scope.row.status ? 'success' : 'danger' "
disable-transitions
>{{ scope.row.status ? "已入库" : "未入库" }}
</el-tag>
</template>
</el-table-column>
</el-table>
</el-dialog>
<!-- 导入入库模板 -->
<el-dialog title="选择导入入库模板文件" :visible.sync="dialogImportVisible">
<el-radio-group v-model="importFile">
<el-radio v-for="item in fileList" :key="item" :label="item">{{ item }}</el-radio>
</el-radio-group>
<div slot="footer" style="text-align: center">
<el-button @click="dialogImportVisible = false"> </el-button>
<el-button type="primary" @click="handleSubFile"></el-button>
</div>
</el-dialog>
<!-- 打印条码 -->
<el-dialog
title="打印条码"
:visible.sync="dialogVisible"
width="35%"
:close-on-click-modal="false"
@close="handlePringClose"
>
<el-row :gutter="15">
<el-form ref="elForm" :model="formData" :rules="rules" size="medium" label-width="50px">
<el-col :span="12">
<el-form-item label="起始" prop="start_code">
<el-input
v-model.number="formData.start_code"
placeholder="请输入起始条码"
clearable
:style="{width: '100%'}"
/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="结束" prop="end_code">
<el-input v-model.number="formData.end_code" placeholder="请输入结束条码" clearable :style="{width: '100%'}" />
</el-form-item>
</el-col>
</el-form>
</el-row>
<div slot="footer" class="dialog-footer" style="text-align: center">
<el-button type="primary" @click="doPrintCode"></el-button>
</div>
</el-dialog>
<Scanner @getcode="getCode" />
</div>
</template>
<script>
import ReagentForm from '@/components/ReagentForm/index'
import Scanner from '@/components/Scannner/index'
import {
show_tmp,
select_drug,
bind_tmp_enter_warehouse,
add_tmp,
del_tmp,
u_file_list,
put_in_tmp, pring_bar_code
} from '@/api/reagent/warehousing'
import stringify from '@/utils/stringify'
import { throttle } from '@/utils'
export default {
name: 'Warehousing',
components: { ReagentForm, Scanner },
data() {
return {
//
dialogVisible: false,
formData: {
start_code: undefined,
end_code: undefined
},
rules: {
start_code: [{
required: true,
message: '请输入起始条码',
trigger: 'blur'
}, { type: 'number', message: '条码必须为数字值' }],
end_code: [{
required: true,
message: '请输入结束条码',
trigger: 'blur'
}, { type: 'number', message: '条码必须为数字值' }]
},
dialogTableVisible: false,
headerStyle: { 'background': '#E6E6E6' },
tableData: [],
client_id: '',
selectReagentValue: '',
multipleSelection: [],
loading: false,
//
page: 1,
page_size: 15,
total: 0,
//
loadingReagent: false,
reagentData: [],
reagent_page: 1,
reagent_page_size: 15,
reagent_total: 0,
// dialog form
formVisible: false,
propsformdata: {},
//
opType: null,
opTitle: '',
reagentAddVisible: false,
reagentAddTmpName: '',
reagentAddClient: null,
reagentAddTmpData: [],
reagentAddSelection: [],
reagentAddFormdata: {},
reagentAddModifyIndex: null, //
reagentAddFormVisible: false,
reagentAddFormTitle: '',
//
bindToDBVisible: false,
bindToDBData: [],
barCode: '',
currentRow: null,
client_id_input: '',
click_num: false,
//
fileList: [],
dialogImportVisible: false,
importFile: undefined
}
},
created() {
if (this.$store.getters.currentOptions.length > 0) {
this.client_id = this.$store.getters.currentOptions[0].client_id
}
this.getTmpList()
},
methods: {
//
doPrintCode() {
this.$refs['elForm'].validate(valid => {
if (!valid) return
pring_bar_code(stringify(this.formData)).then(res => {
this.$message.success(res.msg)
})
})
},
//
handlePrintCode() {
if (this.multipleSelection.length === 1) {
const template_id = this.multipleSelection[0].template_id
console.log(template_id)
const data = {
template_id: template_id
}
pring_bar_code(stringify(data)).then(res => {
this.$message.success(res.msg)
})
}
},
handlePringClose() {
this.formData = {
start_code: undefined,
end_code: undefined
}
this.$refs['elForm'].resetFields()
},
handleCloseToDB() {
this.client_id_input = ''
this.click_num=false
},
formClose() {
this.propsformdata = {}
},
handleCurrentSelectChange(row) {
this.currentRow = row
},
// getCode
getCode(code) {
this.barCode = code
if (this.barCode) {
if (!this.client_id_input) {
this.$message.warning('请选择存储柜体!')
return
}
const data = JSON.parse(JSON.stringify(this.currentRow))
const id = data.index
delete data.status
delete data.index
bind_tmp_enter_warehouse(stringify({
'tmplate_content': JSON.stringify(data),
'bar_code': this.barCode,
'client_id': this.client_id_input
})).then(res => {
if (res.status === 0) {
this.$set(this.bindToDBData, id, { ...this.bindToDBData[id], status: true })
this.$message.success('入库成功!')
//
if (id < this.bindToDBData.length - 1) {
//
this.$refs.singleTable.setCurrentRow(this.bindToDBData[id + 1])
}
} else {
this.$message.error('入库失败,请重试!')
}
})
}
},
//
handleSelectionChange(val) {
this.multipleSelection = val
},
//
handleImport() {
u_file_list().then(
res => {
this.fileList = res.data
if (this.fileList.length > 0) {
this.dialogImportVisible = true
} else {
this.$message.warning('没找到可以导入的模板!')
}
}
)
},
//
handleSubFile() {
if (this.importFile) {
const data = {
client_id: this.client_id,
template_name: this.importFile
}
put_in_tmp(stringify(data)).then(res => {
this.$message.success(res.msg)
this.dialogImportVisible = false
this.getTmpList()
})
}
},
//
handleDelTem() {
if (this.multipleSelection.length > 0) {
this.$msgbox.confirm(`确定要删除模板${this.multipleSelection.map(item => item.template_name).join('、')}吗?`, '提示', {
confirmButtonText: '确认',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
del_tmp(stringify({ 'template_id_list': JSON.stringify(this.multipleSelection.map(item => item.template_id)) })).then(
res => {
if (res.status === 0) {
this.$message.success('删除成功!')
this.getTmpList()
}
}
)
})
} else {
this.$message.warning('请先选择模板')
}
},
//
handleRefresh() {
this.getTmpList()
},
//
searchReagent() {
this.reagentPageChange(1)
},
getTmpList() {
this.loading = true
show_tmp(stringify({
page: this.page,
page_size: this.page_size,
client_id: this.client_id
})).then(res => {
this.tableData = res.data.data_list
this.total = res.data.total_count
}).finally(() => {
this.loading = false
})
},
//
tmpPageChange(page) {
this.page = page
this.getTmpList()
},
//
reagentPageChange(page) {
this.reagent_page = page
const data = { seach_word: this.selectReagentValue, page: this.reagent_page, page_size: this.reagent_page_size }
this.getSelectDrug(data)
},
//
handleReagentClick(row) {
this.propsformdata = row
this.formVisible = true
},
// ReagentForm
handleReagentForm(obj) {
this.formVisible = false
this.bindToDBData = []
for (let i = 0; i < obj.export_count; i++) {
this.bindToDBData.push({ ...this.propsformdata, ...obj, 'status': false, 'index': i })
}
this.client_id_input = obj.client_id
//
this.$nextTick(() => {
this.$refs.singleTable.setCurrentRow(this.bindToDBData[0])
})
this.bindToDBDataTmp = this.bindToDBData
this.bindToDBVisible = true
this.click_num = true
},
//
handleSelectClose() {
this.bindToDBData = []
this.selectReagentValue = ''
},
// select_drug
getSelectDrug(data) {
this.loadingReagent = true
this.reagentData = []
select_drug(stringify(data)).then(res => {
this.reagentData = res.data.data_list
this.reagent_total = res.data.total_count
}).finally(() => {
this.loadingReagent = false
})
},
handleReagentToDatabase() {
this.dialogTableVisible = true
this.getSelectDrug({ page: this.reagent_page, page_size: this.reagent_page_size })
},
//
handleAddTmp(t) {
// /
// opType: null,
// opTitle: '',
this.opType = t
if (t === 'add') {
this.opTitle = `新增${this.$store.state.app.title}模板`
if (this.multipleSelection.length === 0) {
this.reagentAddVisible = true
} else if (this.multipleSelection.length === 1) {
const data = this.multipleSelection[0]
this.reagentAddTmpName = data.template_name
this.reagentAddClient = data.client_id
this.reagentAddTmpData = JSON.parse(data.template_content).map((v, index) => {
v['index'] = index
return v
})
this.reagentAddVisible = true
} else {
this.$message.warning('请选择一个模板!')
}
} else {
this.opTitle = `编辑${this.$store.state.app.title}模板`
if (this.multipleSelection.length === 1) {
const data = this.multipleSelection[0]
this.reagentAddTmpName = data.template_name
this.reagentAddClient = data.client_id
this.reagentAddTmpData = JSON.parse(data.template_content).map((v, index) => {
v['index'] = index
return v
})
this.reagentAddVisible = true
} else {
this.$message.warning('请选择一个模板!')
}
}
},
//
handleAddClose() {
this.reagentAddTmpName = ''
this.reagentAddClient = null
this.reagentAddTmpData = []
this.client_id_input = ''
},
handleAddSave: throttle(function() {
if (!this.reagentAddTmpName) {
this.$message.warning('请输入模板名称!')
return
}
if (!this.reagentAddClient) {
this.$message.warning('请选择存储柜体!')
return
}
if (this.reagentAddTmpData.length === 0){
this.$message.warning('试剂信息为空,无需保存')
return
}
console.log("1111111111111111111111111111", this.reagentAddTmpData)
const data = stringify({
'template_name': this.reagentAddTmpName,
'template_content': JSON.stringify(this.reagentAddTmpData),
'client_id': this.reagentAddClient
})
add_tmp(data).then(
res => {
if (res.status === 0) {
this.$message.success('操作成功')
this.handleAddClose()
this.reagentAddVisible = false
this.getTmpList()
} else {
this.$message.success('操作失败,请重试!')
}
}
)
}, 2000),
//
handleADDOpen(t) {
if (t === 'add') {
this.reagentAddFormTitle = '新增模板条目'
} else {
if (this.reagentAddSelection.length !== 1) {
this.$message.warning('请选择需要编辑的模板条目!')
return
}
//
this.reagentAddModifyIndex = this.reagentAddSelection[0].index
this.reagentAddFormdata = this.reagentAddSelection[0]
this.reagentAddFormTitle = '编辑模板条目'
}
this.reagentAddFormVisible = true
},
handleADDDEL() {
this.reagentAddTmpData = this.reagentAddTmpData.filter(item => !this.reagentAddSelection.includes(item))
},
// form
handleReagentAddForm(obj) {
obj.name = obj.value
if (this.reagentAddFormTitle.indexOf('新增') !== -1) {
this.reagentAddTmpData.push(obj)
} else {
//
this.reagentAddTmpData[this.reagentAddModifyIndex] = { ...this.reagentAddTmpData[this.reagentAddModifyIndex], ...obj }
}
this.reagentAddFormVisible = false
},
reagentAddFormClose() {
this.reagentAddFormdata = {}
},
// handleAddSelectionChange
handleAddSelectionChange(val) {
this.reagentAddSelection = val
},
//
handleBindToDB() {
if (this.click_num) {
return
}
if (this.bindToDBData.length === 0 && this.multipleSelection.length === 0) {
this.$message.warning('请选择入库试剂或模板!')
return
}
this.bindToDBData = []
this.multipleSelection.forEach(item => {
const items = JSON.parse(item.template_content)
items.forEach(item => {
if (item.export_count) {
for (let i = 0; i < item.export_count; i++) {
this.bindToDBData.push({ ...item })
}
}
})
})
this.bindToDBData.map((item, index) => {
item.status = false
item.index = index
return item
})
if (this.multipleSelection.length === 1) {
this.client_id_input = this.multipleSelection[0].client_id
}
//
this.$nextTick(() => {
this.$refs.singleTable.setCurrentRow(this.bindToDBData[0])
})
this.bindToDBVisible = true
this.click_num = true
}
}
}
</script>
<style lang="scss" scoped>
.main-content-container {
margin: 1rem;
background: white;
min-height: calc(100vh - 110px);
.header {
margin: 1rem;
.title {
font-size: 20px;
font-weight: bold;
color: #000000;
padding-top: 1rem;
}
.header-select {
margin-top: 1rem;
.el-select {
margin-left: 0;
}
.right {
float: right;
}
}
}
.content {
margin: 1rem;
}
.page {
position: absolute;
bottom: 2rem;
text-align: center;
left: 50%; //body50%
transform: translate(-50%);
}
}
.el-select {
margin: 0rem 1rem 0rem 1rem;
}
.el-input {
width: 14.9375rem;
margin-right: 1rem;
}
.search-header {
margin-bottom: 1rem;
}
.bind-to-db-title {
font-size: 1rem;
font-weight: 400;
color: #FF9B02;
margin-bottom: 1rem;
}
.reagent-add {
text-align: center;
margin-top: 1rem;
}
.to-database {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 1rem;
}
</style>

@ -293,6 +293,25 @@
<el-button type="primary" @click="doPrintCode"></el-button> <el-button type="primary" @click="doPrintCode"></el-button>
</div> </div>
</el-dialog> </el-dialog>
<el-dialog title="选择柜层号" :visible.sync="detailVisible" width="35%">
<div>
<el-radio-group v-model="radio1" @change="changeHandler">
<el-radio-button :label="item.client_id" :key="item.client_id" v-for="item in chosedata">{{item.client_name}}</el-radio-button>
</el-radio-group>
<div :key="index" v-for="item,index in chosedata" style="padding-top:30px">
<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-group>
</div>
</div>
<span slot="footer" class="dialog-footer">
<el-button @click="detailVisible = false"> </el-button>
<el-button type="primary" @click="putindata()"> </el-button>
</span>
</el-dialog>
<Scanner @getcode="getCode" /> <Scanner @getcode="getCode" />
</div> </div>
</template> </template>
@ -307,7 +326,8 @@ import {
add_tmp, add_tmp,
del_tmp, del_tmp,
u_file_list, u_file_list,
put_in_tmp, pring_bar_code put_in_tmp, pring_bar_code,
enter_db_client_list
} from '@/api/reagent/warehousing' } from '@/api/reagent/warehousing'
import stringify from '@/utils/stringify' import stringify from '@/utils/stringify'
import { throttle } from '@/utils' import { throttle } from '@/utils'
@ -318,6 +338,10 @@ export default {
data() { data() {
return { return {
// //
chosedata:[],
radio1:'',
radio2:'',
detailVisible:false,
dialogVisible: false, dialogVisible: false,
formData: { formData: {
start_code: undefined, start_code: undefined,
@ -390,6 +414,40 @@ export default {
this.getTmpList() this.getTmpList()
}, },
methods: { methods: {
putindata(){
if(this.radio1 !='' && this.radio2 !=''){
const data = JSON.parse(JSON.stringify(this.currentRow))
data.flow_position_code =this.radio2
data.client_id=this.radio1
const id = data.index
delete data.status
delete data.index
bind_tmp_enter_warehouse(stringify({
'tmplate_content': JSON.stringify(data),
'bar_code': this.barCode,
// 'client_id': this.client_id_input,
})).then(res => {
if (res.status === 0) {
this.$set(this.bindToDBData, id, { ...this.bindToDBData[id], status: true })
this.$message.success('入库成功!')
this.detailVisible=false
//
if (id < this.bindToDBData.length - 1) {
//
this.$refs.singleTable.setCurrentRow(this.bindToDBData[id + 1])
}
} else {
this.$message.error('入库失败,请重试!')
}
})
}else{
this.$message.warning('请选择位置')
}
},
changeHandler(value){
var that =this
that.radio2=''
},
// //
doPrintCode() { doPrintCode() {
this.$refs['elForm'].validate(valid => { this.$refs['elForm'].validate(valid => {
@ -431,33 +489,24 @@ export default {
}, },
// getCode // getCode
getCode(code) { getCode(code) {
var that =this
this.barCode = code this.barCode = code
if (this.barCode) { if (this.barCode) {
if (!this.client_id_input) { if (!this.client_id_input) {
this.$message.warning('请选择存储柜体!') this.$message.warning('请选择存储柜体!')
return return
} }
const data = JSON.parse(JSON.stringify(this.currentRow)) const row = JSON.parse(JSON.stringify(this.currentRow))
const id = data.index const data = {
delete data.status drug_name: row.name
delete data.index
bind_tmp_enter_warehouse(stringify({
'tmplate_content': JSON.stringify(data),
'bar_code': this.barCode,
'client_id': this.client_id_input
})).then(res => {
if (res.status === 0) {
this.$set(this.bindToDBData, id, { ...this.bindToDBData[id], status: true })
this.$message.success('入库成功!')
//
if (id < this.bindToDBData.length - 1) {
//
this.$refs.singleTable.setCurrentRow(this.bindToDBData[id + 1])
}
} else {
this.$message.error('入库失败,请重试!')
} }
enter_db_client_list(stringify(data)).then(res => {
console.log(res.data)
that.chosedata=res.data
that.radio1=res.data[0].client_id
that.radio2=res.data[0].client_cell[0]
}) })
this.detailVisible =true
} }
}, },
// //

@ -0,0 +1,383 @@
<template>
<div class="contents">
<div class="content left">
<div class="title">{{ subTitle }}</div>
<div class="show-data">
<el-table
v-loading="loading"
stripe
element-loading-text="拼命加载中"
:data="tableData"
style="width: 100%"
height="76vh"
:header-cell-style="headerStyle"
>
<el-table-column
align="center"
type="index"
width="50"
label="序号"
/>
<el-table-column
prop="name"
label="试剂名称"
align="center"
/>
<el-table-column
prop="bar_code"
label="条码编号"
align="center"
/>
<el-table-column
prop="cas_number"
label="CAS码"
align="center"
/>
<el-table-column
prop="purity"
label="纯度"
align="center"
/>
</el-table>
</div>
<div class="page my-pagination">
<el-pagination
background
layout="prev, pager, next"
:total="total"
:disabled="loading"
:current-page.sync="page"
:page-size.sync="page_size"
@current-change="pageChange"
/>
</div>
</div>
<div class="content right">
<div class="top">
<div class="title">选择称重</div>
<div class="tip">精度0.01g±0.03g</div>
<div class="show-data">
<div class="top">
<span class="num">{{ showWeigh }}</span>
<span class="unit">(g)</span>
</div>
<div class="bottom">
<el-radio v-model="radio" label="1"></el-radio>
<!-- <el-radio v-model="radio" label="2"></el-radio> -->
<el-button type="primary" @click="updateDrugRemain"></el-button>
<el-button type="primary" plain @click="doTare"></el-button>
<el-input v-model="inputWeigh" placeholder="手动输入" />
<!-- <el-button type="warning">设置为空</el-button> -->
</div>
</div>
</div>
<div class="bottom">
<div class="title">详情信息</div>
<el-descriptions class="margin-top" :column="2" border>
<el-descriptions-item label-style="width:100px" span="2" label="试剂名称">{{
infoData.name
}}
</el-descriptions-item>
<el-descriptions-item span="2" label="英文名称">{{ infoData.english_name }}</el-descriptions-item>
<el-descriptions-item label="条码编号">{{ infoData.bar_code }}</el-descriptions-item>
<el-descriptions-item label-style="width:100px" label="CAS码">{{ infoData.cas_number }}</el-descriptions-item>
<el-descriptions-item label="试剂纯度">{{ infoData.purity }}</el-descriptions-item>
<el-descriptions-item label="试剂余量">{{ infoData.remain }}</el-descriptions-item>
<el-descriptions-item label="生产日期">{{ infoData.production_date }}</el-descriptions-item>
<el-descriptions-item label="过期日期">{{ infoData.expiration_date }}</el-descriptions-item>
<el-descriptions-item label="生产厂家">{{ infoData.manufacturer }}</el-descriptions-item>
<el-descriptions-item label="经销商">{{ infoData.distributor }}</el-descriptions-item>
<el-table-column align="center" property="status" label="状态">
<template slot-scope="scope">
<el-tag :type="statusColorMap[scope.row.status-1]">{{ statusMap[scope.row.status - 1] }}</el-tag>
</template>
</el-table-column>
<el-descriptions-item label="是否监管">{{ infoData.is_supervise }}</el-descriptions-item>
<el-descriptions-item label="所属终端">
<div v-if="$store.getters.currentOptions.find(item => item.client_id === infoData.client_id)">
{{ $store.getters.currentOptions.find(item => item.client_id === infoData.client_id).client_name }}
</div>
<div v-else>
{{ infoData.client_id }}
</div>
</el-descriptions-item>
<el-descriptions-item label="最后使用人">
<el-tag v-if="infoData.by_user_name">{{ infoData.by_user_name }}</el-tag>
</el-descriptions-item>
</el-descriptions>
</div>
</div>
<Scannner @getcode="getCode" />
</div>
</template>
<script>
import stringify from '@/utils/stringify'
import Scannner from '@/components/Scannner/index'
import { register_drug_list,set_register } from '@/api/reagent/applymanage'
import { update_drug_remain, weigh, get_drug_info, tare, zero } from '@/api/reagent/weight'
import { set_drug_empty_bottle } from '@/api/reagent/management'
export default {
name: 'Weighing',
components: { Scannner },
data() {
return {
headerStyle: { 'background': '#E6E6E6' },
tableData: [],
page: 1,
page_size: 15,
total: 0,
loading: false,
radio: '1',
barCode: '',
infoData: '',
statusMap: ['在库', '出库', '空瓶'],
statusColorMap: ['success', '', 'warning'],
weight: '0.00',
timer: undefined,
inputWeigh: '',
surplusWeigh: ''
}
},
computed: {
showWeigh() {
return this.checkInputWeigh() ? parseFloat(this.inputWeigh).toFixed(2) : this.weight
}
},
mounted() {
this.pageChange(1)
// (1000*60*60=>**60)
this.timer = setInterval(() => {
this.doWeigh()
}, 500)
// this.doZero()
},
destroyed() {
if (this.timer) {
clearInterval(this.timer)
}
},
methods: {
getDrugInfo(code) {
get_drug_info(stringify({ 'bar_code': code })).then(res => {
this.infoData = res.data
this.$message.success(res.data.name + ' 试剂领扫描成功!')
})
},
checkInputWeigh() {
const w = parseFloat(this.inputWeigh)
return !!w
},
getCode(code) {
this.barCode = code
this.getDrugInfo(this.barCode)
},
getList() {
const data = {
// status: 2,
page: this.page,
page_size: this.page_size
}
this.loading = true
register_drug_list(stringify(data)).then(res => {
this.tableData = res.data.data_list
this.total = res.data.total_count
}).finally(() => (this.loading = false))
},
pageChange(page) {
this.page = page
this.getList()
},
doWeigh() {
weigh().then(
res => {
let weigh = null
if (res.status === 0) {
weigh = parseFloat(res.data)
if (weigh == null) {
return
}
//
this.surplusWeigh = weigh.toFixed(2)
//
if (this.radio === '1') {
this.weight = this.surplusWeigh
} else {
//
this.weight = parseFloat(this.infoData.remain).toFixed(2) - this.surplusWeigh
}
}
}
)
},
doTare() {
tare().then(
res => {
this.$message.success('去皮操作成功')
}
)
},
doZero() {
zero().then(
res => {
this.$message.success('清零成功')
}
)
},
handleSetEmpty() {
if (this.infoData.medicament_id) {
const data = {
medicament_id: this.infoData.medicament_id
}
set_drug_empty_bottle(stringify(data)).then(res => {
this.$message.success(res.msg)
})
} else {
this.$message.warning('请选择试剂!')
}
},
updateDrugRemain() {
if (this.infoData.medicament_id) {
const w = this.checkInputWeigh()
console.log(this.infoData)
const data = {
'bar_code': this.infoData.bar_code,
'remain': w ? parseFloat(this.inputWeigh).toFixed(2) : this.surplusWeigh
}
set_register(stringify(data)).then(
res => {
this.$message.success(res.msg)
this.getList()
this.getDrugInfo(this.infoData.bar_code)
}
)
} else {
this.$message.warning('请选择试剂!')
}
}
}
}
</script>
<style lang="scss" scoped>
.contents {
margin: 1rem;
display: flex;
.content {
width: 50%;
height: calc(100vh - 110px);
padding: 1rem;
background: white;
.title {
font-size: 1.25rem;
font-weight: bold;
color: #000000;
}
.tip {
width: 100%;
font-size: 0.875rem;
font-weight: 400;
color: #C0C4CC;
text-align: right;
}
.img {
text-align: center;
margin-top: 6rem;
img {
width: 25.25rem;
}
}
.text {
margin-top: 2rem;
text-align: center;
font-size: 1.8rem;
font-weight: 400;
color: #909399;
}
.show-data {
margin-top: 1rem;
.top {
.num {
width: 660px;
height: 124px;
background: linear-gradient(180deg, #FFFFFF 0%, #F2F6FC 100%);
box-shadow: inset 0px 4px 12px 1px #DCDFE6;
border-radius: 4px 4px 4px 4px;
opacity: 1;
}
}
}
.page {
text-align: center;
}
}
.left {
margin-right: 1rem;
}
.right {
background-color: #F7F7F7;
padding: 0;
.top {
background: white;
margin-bottom: 1rem;
padding: 1rem;
.show-data {
.top {
.num {
padding: 0.75rem 8.25rem 0.75rem 8.25rem;
width: 41.25rem;
height: 7.75rem;
display: inline-block;
background: linear-gradient(180deg, #FFFFFF 0%, #F2F6FC 100%);
box-shadow: inset 0rem 0.25rem 0.75rem 0.0625rem #DCDFE6;
border-radius: 0.25rem 0.25rem 0.25rem 0.25rem;
opacity: 1;
font-size: 6.25rem;
font-weight: 400;
color: #606266;
text-align: center;
}
.unit {
font-size: 32px;
font-weight: 400;
color: #909399;
}
}
}
}
.bottom {
background: white;
padding: 1rem;
.el-input {
width: 6rem;
margin-right: 1rem;
margin-left: 1rem;
}
.title {
margin-bottom: 1rem;
}
}
}
}
</style>

@ -80,7 +80,7 @@ export default {
}, },
{ {
id: 1, id: 1,
title: '标准品管理', title: '危化品管理',
items: [ items: [
{ name: '试剂入库', id: 0 }, { name: '试剂入库', id: 0 },
{ name: '试剂领用', id: 1 }, { name: '试剂领用', id: 1 },

@ -148,7 +148,7 @@
v-loading="tabsLoading" v-loading="tabsLoading"
element-loading-text="拼命加载中" element-loading-text="拼命加载中"
> >
<el-tab-pane label="试剂管理" name="first"> <el-tab-pane label="高危化品管理" name="first">
<el-checkbox <el-checkbox
v-model="checkAll_drug_module_id" v-model="checkAll_drug_module_id"
:indeterminate="isIndeterminate_drug_module_id" :indeterminate="isIndeterminate_drug_module_id"
@ -165,8 +165,8 @@
</el-checkbox> </el-checkbox>
</el-checkbox-group> </el-checkbox-group>
</el-tab-pane> </el-tab-pane>
<!-- 标准品管理 --> <!-- 危化品管理 -->
<el-tab-pane label="标准品管理" name="second"> <el-tab-pane label="危化品管理" name="second">
<el-checkbox <el-checkbox
v-model="checkAll_standard_module_id" v-model="checkAll_standard_module_id"
:indeterminate="isIndeterminate_standard_module_id" :indeterminate="isIndeterminate_standard_module_id"
@ -183,8 +183,8 @@
</el-checkbox> </el-checkbox>
</el-checkbox-group> </el-checkbox-group>
</el-tab-pane> </el-tab-pane>
<!-- 耗材管理 --> <!-- 对照品管理 -->
<el-tab-pane label="耗材管理" name="third"> <el-tab-pane label="对照品管理" name="third">
<el-checkbox <el-checkbox
v-model="checkAll_consumables_module_id" v-model="checkAll_consumables_module_id"
:indeterminate="isIndeterminate_consumables_module_id" :indeterminate="isIndeterminate_consumables_module_id"

@ -99,7 +99,7 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col v-if="standard_module_idOptions.length !== 0"> <el-col v-if="standard_module_idOptions.length !== 0">
<el-form-item label="标准品权限" prop="standard_module_id"> <el-form-item label="危化品权限" prop="standard_module_id">
<el-checkbox-group v-model="formData.standard_module_id" size="medium"> <el-checkbox-group v-model="formData.standard_module_id" size="medium">
<el-checkbox <el-checkbox
v-for="item in standard_module_idOptions" v-for="item in standard_module_idOptions"
@ -110,7 +110,7 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col v-if="consumables_module_idOptions.length !== 0"> <el-col v-if="consumables_module_idOptions.length !== 0">
<el-form-item label="耗材权限" prop="consumables_module_id"> <el-form-item label="对照品权限" prop="consumables_module_id">
<el-checkbox-group v-model="formData.consumables_module_id" size="medium"> <el-checkbox-group v-model="formData.consumables_module_id" size="medium">
<el-checkbox <el-checkbox
v-for="item in consumables_module_idOptions" v-for="item in consumables_module_idOptions"
@ -184,11 +184,11 @@ export default {
role_id: undefined, role_id: undefined,
role_code: undefined, role_code: undefined,
role_name: undefined, role_name: undefined,
// //
drug_module_id: [], drug_module_id: [],
// //
standard_module_id: [], standard_module_id: [],
// //
consumables_module_id: [], consumables_module_id: [],
// //
instrument_module_id: [], instrument_module_id: [],

Loading…
Cancel
Save