duizhaopin_ui
cxw 2 years ago
parent 4398b760c9
commit 7dedd424ed

@ -80,3 +80,30 @@ export function set_drug_empty_bottle(data) {
}) })
} }
// /api/drug/get_medicament_image
export function get_medicament_image(data) {
return request({
url: '/api/drug/get_medicament_image',
method: 'post',
data
})
}
// /api/drug/del_medicament_image
export function del_medicament_image(data) {
return request({
url: '/api/drug/del_medicament_image',
method: 'post',
data
})
}
// /api/drug/use_gaopaiyi
export function use_gaopaiyi(data) {
return request({
url: '/api/drug/use_gaopaiyi',
method: 'post',
data
})
}

@ -1,4 +1,12 @@
<svg id="创建申请" xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20"> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<path id="路径_393" data-name="路径 393" d="M0,0H20V20H0Z" fill="none"/> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<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 version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="20px" height="20px" viewBox="0 0 20 20" enable-background="new 0 0 20 20" xml:space="preserve"> <image id="image0" width="20" height="20" x="0" y="0"
href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUBAMAAAB/pwA+AAAABGdBTUEAALGPC/xhBQAAACBjSFJN
AAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAJ1BMVEUAAABAnf9Anf9Anv9A
nf9Anf9Anv9Anv9An/9Anv9An/9Anv////+byDeWAAAAC3RSTlMA0J/AgOCQoDC/fyQwF0EAAAAB
YktHRAyBs1FjAAAAB3RJTUUH5gweAgk1/Qo0lgAAAFRJREFUCNdjYMAOGHcDwSYwk9vExcUlWgHM
dAAS1psQzN0KMGay6QYIk12BgQXKrN4EY7Lv3q0AE2U2YMDP5GiAM4EAgzlrFRCs3ABz5O7dAjj8
AACD1x90JdoWrQAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAyMi0xMi0zMFQwMjowOTo1MyswMDowMIXE
QzkAAAAldEVYdGRhdGU6bW9kaWZ5ADIwMjItMTItMzBUMDI6MDk6NTMrMDA6MDD0mfuFAAAAAElF
TkSuQmCC" />
</svg> </svg>

Before

Width:  |  Height:  |  Size: 457 B

After

Width:  |  Height:  |  Size: 1.0 KiB

@ -1,4 +1,12 @@
<svg id="申请管理" xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20"> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<path id="路径_395" data-name="路径 395" d="M0,0H20V20H0Z" fill="none"/> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<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 version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="20px" height="20px" viewBox="0 0 20 20" enable-background="new 0 0 20 20" xml:space="preserve"> <image id="image0" width="20" height="20" x="0" y="0"
href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAMAAAC6V+0/AAAABGdBTUEAALGPC/xhBQAAACBjSFJN
AAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAANlBMVEUAAABAnv9An/9Anv9A
nf9Anf9An/9An/9Anv9Anf9An/9Anf9Anv9An/9Anf9Anf9Anv/////xsmvLAAAAEHRSTlMAoEDA
gHAQMO9gIPC/f5/Q5yfVeQAAAAFiS0dEEeK1PboAAAAHdElNRQfmDB4CCDZ9GFRtAAAAZ0lEQVQY
05XQSw7AIAgEUFAq2C/3P21Tq4iu2lmZF5yIAH+D2hKcRSpBJTdXz8HwuWu4uL6GWAdLX+1PwPwi
uWewSJqRRfM8aeawW8diacRVtgCZRuTIwEpzp1tT98NyNrzUp3/dh9zrNAVLymtrZgAAACV0RVh0
ZGF0ZTpjcmVhdGUAMjAyMi0xMi0zMFQwMjowODo1NCswMDowMK+hFokAAAAldEVYdGRhdGU6bW9k
aWZ5ADIwMjItMTItMzBUMDI6MDg6NTQrMDA6MDDe/K41AAAAAElFTkSuQmCC" />
</svg> </svg>

Before

Width:  |  Height:  |  Size: 775 B

After

Width:  |  Height:  |  Size: 1.1 KiB

@ -1,4 +1,12 @@
<svg id="称重登记" xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20"> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<path id="路径_397" data-name="路径 397" d="M0,0H20V20H0Z" fill="none"/> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<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 version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="20px" height="20px" viewBox="0 0 20 20" enable-background="new 0 0 20 20" xml:space="preserve"> <image id="image0" width="20" height="20" x="0" y="0"
href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAMAAAC6V+0/AAAABGdBTUEAALGPC/xhBQAAACBjSFJN
AAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAANlBMVEUAAABAnf9Anf9Anv9A
nf9Anf9Anf9Anv9An/9AnP9Anv9Anf9An/9Anv9Anv9An/9Anv////8f8qMGAAAAEHRSTlMA0J/A
gOBgkEBQ7/AQz79/4Gb49wAAAAFiS0dEEeK1PboAAAAHdElNRQfmDB4CCgsXRnr+AAAAaElEQVQY
05XQ0Q6AIAhAUQw1BDP+/2trM5X0oXWf3JlMB8CfnLa2gYq+Foyqfw5o7lrsWjFG2BGDGqTEnAjA
GyTVIKr0QnCSsziYkHPmYxlnXsYpicwP1S/BgrUPLGevNByru3O/tn4B0ooGQngsXcwAAAAldEVY
dGRhdGU6Y3JlYXRlADIwMjItMTItMzBUMDI6MTA6MTErMDA6MDCriqjgAAAAJXRFWHRkYXRlOm1v
ZGlmeQAyMDIyLTEyLTMwVDAyOjEwOjExKzAwOjAw2tcQXAAAAABJRU5ErkJggg==" />
</svg> </svg>

Before

Width:  |  Height:  |  Size: 452 B

After

Width:  |  Height:  |  Size: 1.1 KiB

@ -103,7 +103,7 @@ 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: 'YRYBDangerousUseView' }, meta: { classification: 'reagent', module_code: 'DrugUseView' },
children: [ children: [
{ {
path: 'index', path: 'index',
@ -117,7 +117,7 @@ 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: 'YRYBDangerousReturnView' }, meta: { classification: 'reagent', module_code: 'DrugReturnView' },
children: [ children: [
{ {
path: 'index', path: 'index',
@ -173,7 +173,7 @@ const reagentRouter = [
// path: '/reagent/weighing', // path: '/reagent/weighing',
// component: Layout, // component: Layout,
// redirect: '/reagent/weighing/index', // redirect: '/reagent/weighing/index',
// meta: { classification: 'reagent', module_code: 'YRYBDangerousWeigh' }, // meta: { classification: 'reagent', module_code: 'DrugWeigh' },
// children: [ // children: [
// { // {
// path: 'index', // path: 'index',
@ -221,7 +221,7 @@ const reagentRouter = [
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: 'YRYBDangerousIndex' }, meta: { title: '高危化品管理', icon: '试剂管理', classification: 'reagent', module_code: 'DrugIndex' },
children: [ children: [
{ {
path: 'index', path: 'index',
@ -245,25 +245,25 @@ const reagentRouter = [
// } // }
// ] // ]
// }, // },
// { {
// path: '/reagent/envrecord', path: '/reagent/envrecord',
// component: Layout, component: Layout,
// redirect: '/reagent/envrecord/index', redirect: '/reagent/envrecord/index',
// meta: { classification: 'reagent', module_code: 'HumitureIndex' }, meta: { classification: 'reagent', module_code: 'HumitureIndex' },
// children: [ children: [
// { {
// path: 'index', path: 'index',
// name: 'EnvRecord', name: 'EnvRecord',
// component: () => import('@/views/reagent/envrecord/index'), component: () => import('@/views/reagent/envrecord/index'),
// meta: { title: '环境记录', icon: '雪花', classification: 'reagent' } meta: { title: '环境记录', icon: '雪花', classification: 'reagent' }
// } }
// ] ]
// }, },
// { // {
// path: '/reagent/form', // path: '/reagent/form',
// component: Layout, // component: Layout,
// redirect: '/reagent/form/index', // redirect: '/reagent/form/index',
// meta: { classification: 'reagent', module_code: 'YRYBDangerousCustomForm' }, // meta: { classification: 'reagent', module_code: 'DrugCustomForm' },
// children: [ // children: [
// { // {
// path: 'index', // path: 'index',

@ -271,6 +271,8 @@ export default {
console.log(func_map[item]) console.log(func_map[item])
client_list(stringify({ 'func_type': func_map[item] })).then( client_list(stringify({ 'func_type': func_map[item] })).then(
res => { res => {
console.log(res,'11111111111111')
const cls = this.$store.getters.clientOptions const cls = this.$store.getters.clientOptions
console.log(cls, 1233124124) console.log(cls, 1233124124)
cls[item] = res.data.data_list cls[item] = res.data.data_list

@ -63,34 +63,21 @@
/> />
</div> </div>
<el-dialog <el-dialog
:close-on-click-modal="false"
:visible.sync="dialogVisible" :visible.sync="dialogVisible"
width="30%" width="30%"
height="500px" height="500px"
title="录入库存" title="选择审批生效时间"
@close="onClose"
> >
<div class="box"> <div class="box">
<el-scrollbar style="height: 100%"> <div>
<el-form> <el-radio v-model="radio1" label="2" border>2小时</el-radio>
<div v-for="(item, index) in multipleSelection" :key="index"> <el-radio v-model="radio1" label="4" border>4小时</el-radio>
<el-col :span="24"> <el-radio v-model="radio1" label="6" border>6小时</el-radio>
<el-form-item :label="item.name" prop="input_num"> <el-radio v-model="radio1" label="8" border>8小时</el-radio>
<el-input
v-model="item.input_num"
placeholder="请输入数量"
clearable
type="number"
:style="{width: '100%'}"
/>
</el-form-item>
</el-col>
</div> </div>
</el-form>
</el-scrollbar>
</div> </div>
<div slot="footer" style="text-align: center"> <div slot="footer" style="text-align: center">
<el-button @click="close"></el-button> <el-button @click="dialogVisible=false"></el-button>
<el-button type="primary" @click="handelConfirm"></el-button> <el-button type="primary" @click="handelConfirm"></el-button>
</div> </div>
</el-dialog> </el-dialog>
@ -137,8 +124,9 @@ export default {
data() { data() {
return { return {
// drugStockForm:[], // drugStockForm:[],
radio1:'2',
page: 1, page: 1,
page_size: 15, page_size: 10,
total: 0, total: 0,
client_id: '', client_id: '',
dialogVisible: false, dialogVisible: false,
@ -158,6 +146,7 @@ export default {
history_total: 100, history_total: 100,
statusColorMap: ['warning','success'], statusColorMap: ['warning','success'],
statusMap: ['未处理', '已处理'], statusMap: ['未处理', '已处理'],
row:''
} }
}, },
created () { created () {
@ -178,79 +167,38 @@ export default {
}) })
}, },
handleClick(row){ handleClick(row){
var that =this
that.row=row
that.dialogVisible=true
},
handelConfirm(){
var that=this var that=this
const data={ const data={
id:row.id id:that.row.id,
t:that.radio1
} }
update_solve(stringify(data)).then(rsp => { update_solve(stringify(data)).then(rsp => {
console.log(rsp) console.log(rsp)
if (rsp.status === 0) { if (rsp.status === 0) {
this.$message.success("审批成功!") this.$message.success("审批成功!")
this.handleRefresh() this.handleRefresh()
// this.get_stock_list() that.radio1='2'
that.dialogVisible=false
} else { } else {
this.$message.error(rsp.msg) this.$message.error(rsp.msg)
} }
}) })
}, },
pageChange(page) { pageChange(page) {
this.page = page this.page = page
this.get_stock_list() this.get_apply()
}, },
handleSelectionChange(val) { handleSelectionChange(val) {
this.handleSelectionSelection = val this.handleSelectionSelection = val
}, },
// handleHistory() {
// console.log(this.handleSelectionSelection,'1111')
// if(this.handleSelectionSelection.length ===1){
// this.dialogHistoryVisible = true
// }else{
// alert('')
// }
// },
handleRefresh() { handleRefresh() {
this.get_apply() this.get_apply()
}, },
handleDel() {
if (this.handleSelectionSelection.length === 1) {
const data = {
id:this.handleSelectionSelection[0].id
}
del_stock(stringify(data)).then(rsp => {
if (rsp.status === 0) {
this.$message.success("删除成功!")
this.get_stock_list()
} else {
this.$message.error(rsp.msg)
}
})
} else {
this.$message.warning("选择一条记录操作")
}
},
//
handleAddReagent() {
const data = {
client_id: this.client_id
}
get_drug_list(stringify(data)).then(rsp => {
this.multipleSelection = rsp.data
})
this.dialogVisible = true
},
handleApply() {
const data = {
client_id: this.client_id
}
get_drug_list(stringify(data)).then(rsp => {
this.multipleSelection = rsp.data
})
this.dialogVisible = true
},
// //
handleCheck() { handleCheck() {
if (this.handleSelectionSelection.length === 1) { if (this.handleSelectionSelection.length === 1) {
@ -265,37 +213,6 @@ export default {
this.dialogHistoryVisible = false this.dialogHistoryVisible = false
this.historyData = [] this.historyData = []
}, },
onClose() {
this.multipleSelection = []
},
close() {
this.dialogVisible = false
this.multipleSelection = []
},
handelConfirm() {
const stock_info = {}
for (let i = 0; i < this.multipleSelection.length; i++) {
stock_info[this.multipleSelection[i].name] = this.multipleSelection[i].input_num == "" ? 0: parseInt(this.multipleSelection[i].input_num)
}
const data = {
stock_info: JSON.stringify(stock_info),
client_id: this.client_id,
client_code: this.client_code
}
set_stock(stringify(data)).then(rsp => {
console.log(rsp)
if (rsp.status == 0) {
this.$message.success(rsp.msg)
this.dialogVisible = false
this.get_stock_list()
} else {
this.$message.error(rsp.msg)
}
})
},
searchHistory() {
}
} }
} }
</script> </script>

@ -3,6 +3,28 @@
<div class="title">创建申请</div> <div class="title">创建申请</div>
<div class="header"> <div class="header">
<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-button type="primary" plain @click="handleCheck"><i class="el-icon-edit" />详情查看</el-button>
<el-dialog :close-on-click-modal="false" :visible.sync="dialogHistoryVisible" width="60%" title="申请详情">
<div class="box">
<el-scrollbar style="height: 100%">
<el-table
v-loading="loadingHistory"
element-loading-text="拼命加载中"
:header-cell-style="headerStyle"
:data="historyData"
height="420"
@close="dialogHistoryClose"
>
<el-table-column align="center" type="index" width="50" label="序号" />
<el-table-column align="center" property="name" label="试剂名称" />
<el-table-column align="center" property="purity" label="纯度" />
<el-table-column align="center" property="speci" label="规格" />
<el-table-column align="center" property="num" label="数量" />
</el-table>
</el-scrollbar>
</div>
</el-dialog>
<el-dialog title="确认提交申请" :visible.sync="dialogTableVisible"> <el-dialog title="确认提交申请" :visible.sync="dialogTableVisible">
<div style="display:flex;flex-direction: row;"> <div style="display:flex;flex-direction: row;">
@ -19,10 +41,9 @@
</el-form-item> </el-form-item>
</el-form> </el-form>
<div class="header"> <div class="header">
<el-input v-model="name" clearable placeholder="请输入试剂名称" /> <el-input v-model="seach_word" clearable placeholder="请输入试剂名称" />
<el-button type="primary" icon="el-icon-search" @click="getList"></el-button> <el-button type="primary" icon="el-icon-search" @click="get_drug_group()"></el-button>
</div> </div>
</div> </div>
<el-table :data="tableData" max-height="250" style="height:250px;padding-bottom: 50px;"> <el-table :data="tableData" max-height="250" style="height:250px;padding-bottom: 50px;">
@ -65,7 +86,6 @@
<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>
</div> </div>
</el-dialog> </el-dialog>
<div class="header-right"> <div class="header-right">
@ -121,7 +141,8 @@ export default {
data() { data() {
return { return {
page: 1, page: 1,
page_size: 15, page_size: 10,
seach_word:'',
total: 0, total: 0,
total1: 0, total1: 0,
client_id: '', client_id: '',
@ -156,10 +177,32 @@ export default {
}, },
created () { created () {
this.client_id = this.$store.getters.currentOptions[0].client_id this.client_id = this.$store.getters.currentOptions[0].client_id
this.get_apply()
this.get_drug_group() this.get_drug_group()
this.get_pt_user() this.get_pt_user()
}, },
methods: { methods: {
//
handleSelection(selection){
var that =this
that.handleSelectionSelection =selection
},
//
handleCheck() {
if (this.handleSelectionSelection.length === 1) {
this.dialogHistoryVisible = true
this.historyData = JSON.parse(this.handleSelectionSelection[0].use_content)
} else {
this.$message.warning("选择一条记录操作!")
}
},
//
dialogHistoryClose() {
this.dialogHistoryVisible = false
this.historyData = []
},
//
handleClick(row){ handleClick(row){
var that =this var that =this
that.$prompt('请输入数量', '提示', { that.$prompt('请输入数量', '提示', {
@ -175,8 +218,19 @@ export default {
}); });
}else{ }else{
row.num =value row.num =value
console.log(row.name,that.checkList)
var result = that.checkList.filter(x => x.name === row.name);
console.log(result,'111')
if (result.length>0){
that.$message({
type: 'info',
message: '禁止重复添加'
});
}else{
that.checkList.push(row) that.checkList.push(row)
that.tableData.splice(row.$index, 1) }
// that.tableData.splice(row.$index, 1)
} }
}).catch(() => { }).catch(() => {
that.$message({ that.$message({
@ -184,46 +238,45 @@ export default {
message: '取消输入' message: '取消输入'
}); });
}); });
// that.tableData.slice(row)
console.log(row)
}, },
//
cancelClick(row){ cancelClick(row){
var that =this var that =this
that.tableData.push(row) let getLocation = that.checkList.indexOf(row);
that.checkList.splice(row.$index, 1) that.checkList.splice(getLocation, 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, page:1,
seach_word:this.seach_word,
page_size: 10000
}
get_drug_group_list(stringify(data)).then(rsp => {
console.log("rsp.data.data_list>>", rsp.data.data_list)
this.tableData = this.addDataIndex(rsp.data.data_list)
this.total = rsp.data.total_count
})
},
//
get_apply(){
const data = {
page:this.page, page:this.page,
page_size: this.page_size page_size: this.page_size
} }
get_apply_list(stringify(data)).then(rsp => { get_apply_list(stringify(data)).then(rsp => {
console.log("apply>>>", rsp) console.log("apply>>>", rsp)
this.tableData1 = rsp.data.data_list this.tableData1 = rsp.data.data_list
this.total1 = rsp.data.total_count this.total1 = rsp.data.total_count
}) })
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() { get_pt_user() {
console.log("jjj") console.log("jjj")
const data = { const data = {
page: this.page, page: 1,
page_size: 10000, page_size: 10000,
user_id:this.$store.state.user.id, user_id:this.$store.state.user.id,
user_code: this.user_code, user_code: this.user_code,
@ -238,6 +291,7 @@ export default {
}) })
console.log("giao") console.log("giao")
}, },
//
create_apply(pt_from){ create_apply(pt_from){
var that =this var that =this
let datalist = that.checkList.map((item) => { let datalist = that.checkList.map((item) => {
@ -262,9 +316,10 @@ export default {
}) })
} }
}, },
//
pageChange(page) { pageChange(page) {
this.page = page this.page = page
this.get_drug_group() this.get_apply()
}, },
addDataIndex(initData){ addDataIndex(initData){
for (let i = 0; i < initData.length; i++) { for (let i = 0; i < initData.length; i++) {
@ -272,31 +327,20 @@ export default {
} }
return initData return initData
}, },
//
handleRefresh() { handleRefresh() {
this.get_apply()
this.get_drug_group() 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(){ openDialogTableVisible(){
this.dialogTableVisible = true this.dialogTableVisible = true
}, },
//
dialogTableClose() { dialogTableClose() {
this.user_id_pt = '' this.user_id_pt = ''
this.dialogTableVisible = false this.dialogTableVisible = false
this.checkList=[]
}, },
} }
} }

@ -39,7 +39,7 @@
<div class="header"> <div class="header">
<div class="header-title">每日温度记录</div> <div class="header-title">每日温度记录</div>
<div class="header-sub"> <div class="header-sub">
<el-select v-model="daily_client_id" placeholder="请选择柜体"> <el-select v-model="daily_client_id" clearable 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"

@ -146,14 +146,14 @@
<!-- align="center"--> <!-- align="center"-->
<!-- />--> <!-- />-->
<!-- <el-table-column <el-table-column
label="图片信息" label="图片信息"
align="center" align="center"
> >
<template slot-scope="scope"> <template slot-scope="scope">
<el-button @click="() => handleShowImage(scope.row)">查看</el-button> <el-button @click="() => handleShowImage(scope.row)">查看</el-button>
</template> </template>
</el-table-column> --> </el-table-column>
<el-table-column <el-table-column
prop="status" prop="status"
label="状态" label="状态"
@ -469,7 +469,7 @@
<el-button type="primary" @click="handelConfirm"></el-button> <el-button type="primary" @click="handelConfirm"></el-button>
</div> </div>
</el-dialog> </el-dialog>
<!-- <el-dialog <el-dialog
title="图片信息" title="图片信息"
:visible.sync="dialogImageVisible" :visible.sync="dialogImageVisible"
:close-on-click-modal="false" :close-on-click-modal="false"
@ -546,7 +546,7 @@
</el-upload> </el-upload>
<el-button type="success" @click="handleGaoPiYi"></el-button> <el-button type="success" @click="handleGaoPiYi"></el-button>
</div> </div>
</el-dialog> --> </el-dialog>
<!-- 设置空瓶备注模块 --> <!-- 设置空瓶备注模块 -->
<el-dialog <el-dialog
@ -633,7 +633,10 @@ import {
update, update,
user_ban_confirm, user_ban_confirm,
user_ban_list, user_ban_list,
user_ban_relieve user_ban_relieve,
get_medicament_image,
del_medicament_image,
use_gaopaiyi
} from '@/api/reagent/management' } from '@/api/reagent/management'
import stringify from '@/utils/stringify' import stringify from '@/utils/stringify'
import { get_use } from '@/api/reagent/customform' import { get_use } from '@/api/reagent/customform'
@ -642,8 +645,8 @@ import Scannner from '@/components/Scannner/index'
export default { export default {
name: 'Management', name: 'Management',
components: { components: {
// 'el-upload-list': () => import('element-ui/packages/upload/src/upload-list'), 'el-upload-list': () => import('element-ui/packages/upload/src/upload-list'),
// 'el-image-viewer': () => import('element-ui/packages/image/src/image-viewer'), 'el-image-viewer': () => import('element-ui/packages/image/src/image-viewer'),
'mother-liquir-form': () => import('@/views/reagent/management/motherliquir/index'), 'mother-liquir-form': () => import('@/views/reagent/management/motherliquir/index'),
Scannner Scannner
// 'get-code-scanner' : () => import('@/components/Scannner/index') // 'get-code-scanner' : () => import('@/components/Scannner/index')
@ -891,6 +894,7 @@ export default {
const url = this.getImageUrl(item) const url = this.getImageUrl(item)
this.srcViewrList = [url] this.srcViewrList = [url]
this.imgViewerVisible = true this.imgViewerVisible = true
console.log(this.srcViewrList)
}, },
// //
uploadSuccess(response, file, fileList) { uploadSuccess(response, file, fileList) {

@ -0,0 +1,193 @@
<template>
<div class="contents">
<div class="content left">
<div class="title">{{ mainTitle }}</div>
<div class="img">
<img src="@/assets/5-试剂入库/扫描试剂瓶.png" alt="">
</div>
<div class="text">
请扫描或检测RFID
</div>
</div>
<div class="content">
<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>
<el-dialog :visible.sync="dialogVisible" :close-on-click-modal="false" width="40%">
<el-radio-group v-model="place">
<el-radio
v-for="item in $store.getters.currentOptions"
:key="item.id"
:label="item.client_id"
>{{ item.client_name }}</el-radio>
</el-radio-group>
<div style="text-align: center">
<el-button type="primary" @click="btnClick"></el-button>
</div>
</el-dialog>
<Scannner @getcode="getCode" />
</div>
</template>
<script>
import Scannner from '@/components/Scannner/index'
import { use, drug_return, use_or_return_list } from '@/api/reagent/receivingReturn'
import stringify from '@/utils/stringify'
export default {
name: 'ReceivingAndReturn',
components: { Scannner },
data() {
return {
barCode: '',
headerStyle: { 'background': '#E6E6E6' },
tableData: [],
page: 1,
page_size: 15,
total: 0,
loading: false,
dialogVisible: false,
place: null
}
},
computed: {
mainTitle() {
return this.$route.name.indexOf('Receiving') !== -1 ? `${this.$store.state.app.title}领用` : `${this.$store.state.app.title}归还`
},
subTitle() {
return this.$route.name.indexOf('Receiving') !== -1 ? `${this.$store.state.app.title}领用列表` : `${this.$store.state.app.title}归还列表`
}
},
created() {
this.pageChange(1)
},
methods: {
btnClick() {
drug_return(stringify({ 'bar_code': this.barCode, 'place': this.place })).then(res => {
this.tableData.push(res.data)
this.dialogVisible = false
this.$message.success('归还成功!')
})
},
getCode(code) {
this.barCode = code
if (this.$route.name.indexOf('Receiving') !== -1) {
use(stringify({ 'bar_code': this.barCode })).then(res => {
this.tableData.push(res.data)
this.$message.success(res.data.name + ' 试剂领用成功!')
})
} else {
this.dialogVisible = true
// drug_return(stringify({ 'bar_code': newCode, 'place': '' })).then(res => {
// this.tableData.push(res.data)
// })
}
},
getList() {
const data = {
status: this.$route.name === 'Receiving' ? 2 : 3,
page: this.page,
page_size: this.page_size
}
this.loading = true
use_or_return_list(stringify(data)).then(res => {
this.tableData = res.data.data
this.total = res.data.total_count
}).finally(() => (this.loading = false))
},
pageChange(page) {
this.page = page
this.getList()
}
}
}
</script>
<style lang="scss" scoped>
.contents{
margin: 1rem;
display: flex;
.content{
width: 50%;
height: calc(100vh - 110px);
padding: 1rem;
background: white;
.title{
font-size: 20px;
font-weight: bold;
color: #000000;
}
.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;
}
.page{
text-align: center;
}
}
.left{
margin-right: 1rem;
}
}
</style>

@ -1,15 +1,6 @@
<template> <template>
<div class="contents"> <div class="contents">
<div class="content left"> <div class="content left">
<div class="title">{{ mainTitle }}</div>
<div class="img">
<img src="@/assets/5-试剂入库/扫描试剂瓶.png" alt="">
</div>
<div class="text">
请扫描或检测RFID
</div>
</div>
<div class="content">
<div class="title">{{ subTitle }}</div> <div class="title">{{ subTitle }}</div>
<div class="show-data"> <div class="show-data">
<el-table <el-table
@ -61,7 +52,71 @@
/> />
</div> </div>
</div> </div>
<el-dialog :visible.sync="dialogVisible" :close-on-click-modal="false" width="40%"> <div class="content right" v-if="type=='1'">
<div class="title">{{ mainTitle }}</div>
<div class="img">
<img src="@/assets/5-试剂入库/扫描试剂瓶.png" alt="">
</div>
<div class="text">
请扫描或检测RFID
</div>
</div>
<div class="content right" v-else>
<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>
<!-- <el-dialog :visible.sync="dialogVisible" :close-on-click-modal="false" width="40%">
<el-radio-group v-model="place"> <el-radio-group v-model="place">
<el-radio <el-radio
v-for="item in $store.getters.currentOptions" v-for="item in $store.getters.currentOptions"
@ -72,7 +127,7 @@
<div style="text-align: center"> <div style="text-align: center">
<el-button type="primary" @click="btnClick"></el-button> <el-button type="primary" @click="btnClick"></el-button>
</div> </div>
</el-dialog> </el-dialog> -->
<Scannner @getcode="getCode" /> <Scannner @getcode="getCode" />
</div> </div>
</template> </template>
@ -80,54 +135,71 @@
<script> <script>
import Scannner from '@/components/Scannner/index' import Scannner from '@/components/Scannner/index'
import { use, drug_return, use_or_return_list } from '@/api/reagent/receivingReturn' import { use, drug_return, use_or_return_list } from '@/api/reagent/receivingReturn'
import { weigh, get_drug_info, tare, zero } from '@/api/reagent/weight'
import { set_drug_empty_bottle } from '@/api/reagent/management'
import stringify from '@/utils/stringify' import stringify from '@/utils/stringify'
export default { export default {
name: 'ReceivingAndReturn', name: 'Weighing',
components: { Scannner }, components: { Scannner },
data() { data() {
return { return {
barCode: '',
headerStyle: { 'background': '#E6E6E6' }, headerStyle: { 'background': '#E6E6E6' },
tableData: [], tableData: [],
page: 1, page: 1,
page_size: 15, page_size: 15,
total: 0, total: 0,
loading: false, loading: false,
radio: '1',
barCode: '',
infoData: '',
statusMap: ['在库', '出库', '空瓶'],
statusColorMap: ['success', '', 'warning'],
weight: '0.00',
timer: undefined,
inputWeigh: '',
surplusWeigh: '',
dialogVisible: false, dialogVisible: false,
place: null place: null
} }
}, },
computed: { computed: {
showWeigh() {
return this.checkInputWeigh() ? parseFloat(this.inputWeigh).toFixed(2) : this.weight
},
mainTitle() { mainTitle() {
return this.$route.name.indexOf('Receiving') !== -1 ? `${this.$store.state.app.title}领用` : `${this.$store.state.app.title}归还` return this.$route.name.indexOf('Receiving') !== -1 ? `${this.$store.state.app.title}领用` : `${this.$store.state.app.title}归还`
}, },
subTitle() { subTitle() {
return this.$route.name.indexOf('Receiving') !== -1 ? `${this.$store.state.app.title}领用列表` : `${this.$store.state.app.title}归还列表` return this.$route.name.indexOf('Receiving') !== -1 ? `${this.$store.state.app.title}领用列表` : `${this.$store.state.app.title}归还列表`
},
type() {
return this.$route.name.indexOf('Receiving') !== -1 ? `1` : `0`
} }
}, },
created() { mounted() {
this.pageChange(1) this.pageChange(1)
// (1000*60*60=>**60)
this.timer = setInterval(() => {
this.doWeigh()
}, 500)
this.doZero()
}, },
methods: { destroyed() {
btnClick() { if (this.timer) {
drug_return(stringify({ 'bar_code': this.barCode, 'place': this.place })).then(res => { clearInterval(this.timer)
this.tableData.push(res.data) }
this.dialogVisible = false
this.$message.success('归还成功!')
})
}, },
methods: {
getCode(code) { getCode(code) {
this.barCode = code this.barCode = code
this.getDrugInfo(this.barCode)
if (this.$route.name.indexOf('Receiving') !== -1) { if (this.$route.name.indexOf('Receiving') !== -1) {
use(stringify({ 'bar_code': this.barCode })).then(res => { use(stringify({ 'bar_code': this.barCode })).then(res => {
this.tableData.push(res.data) this.tableData.push(res.data)
this.$message.success(res.data.name + ' 试剂领用成功!') this.$message.success(res.data.name + ' 试剂领用成功!')
}) })
} else {
this.dialogVisible = true
// drug_return(stringify({ 'bar_code': newCode, 'place': '' })).then(res => {
// this.tableData.push(res.data)
// })
} }
}, },
getList() { getList() {
@ -145,6 +217,80 @@ export default {
pageChange(page) { pageChange(page) {
this.page = page this.page = page
this.getList() this.getList()
},
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
},
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()
const data = {
'bar_code': this.infoData.bar_code,
'remain': w ? parseFloat(this.inputWeigh).toFixed(2) : this.surplusWeigh
}
drug_return(stringify(data)).then(res => {
this.tableData.push(res.data)
this.dialogVisible = false
this.$message.success('归还成功!')
})
} else {
this.$message.warning('请选择试剂!')
}
} }
} }
} }
@ -154,23 +300,36 @@ export default {
.contents { .contents {
margin: 1rem; margin: 1rem;
display: flex; display: flex;
.content { .content {
width: 50%; width: 50%;
height: calc(100vh - 110px); height: calc(100vh - 110px);
padding: 1rem; padding: 1rem;
background: white; background: white;
.title { .title {
font-size: 20px; font-size: 1.25rem;
font-weight: bold; font-weight: bold;
color: #000000; color: #000000;
} }
.tip {
width: 100%;
font-size: 0.875rem;
font-weight: 400;
color: #C0C4CC;
text-align: right;
}
.img { .img {
text-align: center; text-align: center;
margin-top: 6rem; margin-top: 6rem;
img { img {
width: 25.25rem; width: 25.25rem;
} }
} }
.text { .text {
margin-top: 2rem; margin-top: 2rem;
text-align: center; text-align: center;
@ -178,16 +337,82 @@ export default {
font-weight: 400; font-weight: 400;
color: #909399; color: #909399;
} }
.show-data { .show-data {
margin-top: 1rem; 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 { .page {
text-align: center; text-align: center;
} }
} }
.left { .left {
margin-right: 1rem; margin-right: 1rem;
} }
.right {
background-color: white;
padding: 1rem;
.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> </style>

@ -4,6 +4,15 @@
<div class="header"> <div class="header">
<div class="header-left"> <div class="header-left">
<el-button @click="$router.push(`/${$store.getters.classification}/report/index`)"></el-button> <el-button @click="$router.push(`/${$store.getters.classification}/report/index`)"></el-button>
<el-select v-model="place" clearable placeholder="请输入搜索房间名称">
<el-option
v-for="item in $store.getters.currentOptions"
:key="item.id"
:label="item.place"
:value="item.place"
/>
</el-select>
<el-select v-model="client_id" clearable placeholder="请选择柜体"> <el-select v-model="client_id" clearable placeholder="请选择柜体">
<el-option <el-option
v-for="item in $store.getters.currentOptions" v-for="item in $store.getters.currentOptions"
@ -114,6 +123,7 @@ export default {
statusMap: ['在库', '出库', '空瓶'], statusMap: ['在库', '出库', '空瓶'],
statusColorMap: ['success', '', 'warning'], statusColorMap: ['success', '', 'warning'],
selectReagentValue: '', selectReagentValue: '',
place:'',
user_name: '', user_name: '',
client_id: null, client_id: null,
select_status: null, select_status: null,
@ -136,6 +146,7 @@ export default {
const data = { const data = {
record_type: this.record_type[this.$route.params.t], record_type: this.record_type[this.$route.params.t],
name: this.selectReagentValue, name: this.selectReagentValue,
place:this.place,
user_name: this.user_name, user_name: this.user_name,
status: this.select_status, status: this.select_status,
client_id: this.client_id, client_id: this.client_id,
@ -169,6 +180,7 @@ export default {
record_type: this.record_type[this.$route.params.t], record_type: this.record_type[this.$route.params.t],
name: this.selectReagentValue, name: this.selectReagentValue,
user_name: this.user_name, user_name: this.user_name,
place:this.place,
status: this.select_status, status: this.select_status,
client_id: this.client_id, client_id: this.client_id,
start_time: this.start_time, start_time: this.start_time,

@ -4,6 +4,25 @@
<div class="header"> <div class="header">
<div class="header-left"> <div class="header-left">
<el-button @click="$router.push(`/${$store.getters.classification}/report/index`)"></el-button> <el-button @click="$router.push(`/${$store.getters.classification}/report/index`)"></el-button>
<el-select v-model="place" clearable placeholder="请输入搜索房间名称" style="padding-left:10px">
<el-option
v-for="item in $store.getters.currentOptions"
:key="item.id"
:label="item.place"
:value="item.place"
/>
</el-select>
<el-select v-model="client_id" clearable placeholder="请选择柜体" style="padding-left:10px">
<el-option
v-for="item in $store.getters.currentOptions"
:key="item.id"
:label="item.client_name"
:value="item.client_id"
/>
</el-select>
<el-input v-model="selectReagentValue" clearable placeholder="请输入搜索试剂名称" /> <el-input v-model="selectReagentValue" clearable placeholder="请输入搜索试剂名称" />
<el-button type="primary" icon="el-icon-search" @click="searchReagent"></el-button> <el-button type="primary" icon="el-icon-search" @click="searchReagent"></el-button>
</div> </div>
@ -59,6 +78,8 @@ export default {
name: 'StoreInfo', name: 'StoreInfo',
data() { data() {
return { return {
place:"",
client_id:"",
selectReagentValue: '', selectReagentValue: '',
headerStyle: { 'background': '#E6E6E6' }, headerStyle: { 'background': '#E6E6E6' },
page: 1, page: 1,
@ -76,6 +97,8 @@ export default {
handleExport() { handleExport() {
const data = { const data = {
name: this.selectReagentValue, name: this.selectReagentValue,
client_id: this.client_id,
palce:this.place,
page: this.page, page: this.page,
page_size: this.page_size, page_size: this.page_size,
download_type: 1, download_type: 1,
@ -104,6 +127,8 @@ export default {
this.loadingReagent = true this.loadingReagent = true
stock_data_info(stringify({ stock_data_info(stringify({
name: this.selectReagentValue, name: this.selectReagentValue,
client_id: this.client_id,
palce:this.place,
page: this.page, page: this.page,
page_size: this.page_size page_size: this.page_size
})).then(res => { })).then(res => {

@ -4,8 +4,25 @@
<div class="header"> <div class="header">
<div class="header-left"> <div class="header-left">
<el-button @click="$router.push(`/${$store.getters.classification}/report/index`)"></el-button> <el-button @click="$router.push(`/${$store.getters.classification}/report/index`)"></el-button>
<el-select v-model="place" clearable placeholder="请输入搜索房间名称" style="padding-left:15px;padding-right: 15px;">
<el-option
v-for="item in $store.getters.currentOptions"
:key="item.id"
:label="item.place"
:value="item.place"
/>
</el-select>
<el-select v-model="client_id" clearable placeholder="请选择柜体" style="padding-left:15px;padding-right: 15px;padding-bottom: 10px;">
<el-option
v-for="item in $store.getters.currentOptions"
:key="item.id"
:label="item.client_name"
:value="item.client_id"
/>
</el-select>
<el-input v-model="selectReagentValue" clearable placeholder="请输入搜索试剂名称" /> <el-input v-model="selectReagentValue" clearable placeholder="请输入搜索试剂名称" />
<el-input v-model="value" clearable placeholder="请输入搜索生产厂商名称" /> <el-input v-model="value" clearable placeholder="请输入入库操作人" />
<el-date-picker <el-date-picker
v-model="start_time" v-model="start_time"
type="datetime" type="datetime"
@ -69,6 +86,8 @@ export default {
data() { data() {
return { return {
selectReagentValue: '', selectReagentValue: '',
client_id:'',
place:'',
headerStyle: { 'background': '#E6E6E6' }, headerStyle: { 'background': '#E6E6E6' },
page: 1, page: 1,
page_size: 15, page_size: 15,
@ -88,7 +107,9 @@ export default {
handleExport() { handleExport() {
const data = { const data = {
seach_word: this.selectReagentValue, seach_word: this.selectReagentValue,
manufacturer: this.value, client_id:this.client_id,
place:this.place,
user: this.value,
start_time: this.start_time, start_time: this.start_time,
end_time: this.end_time, end_time: this.end_time,
page: this.page, page: this.page,
@ -118,7 +139,9 @@ export default {
this.loadingReagent = true this.loadingReagent = true
drug_details_info(stringify({ drug_details_info(stringify({
seach_word: this.selectReagentValue, seach_word: this.selectReagentValue,
manufacturer: this.value, client_id:this.client_id,
place:this.place,
user: this.value,
start_time: this.start_time, start_time: this.start_time,
end_time: this.end_time, end_time: this.end_time,
page: this.page, page: this.page,

@ -312,6 +312,86 @@
<el-button type="primary" @click="putindata()"> </el-button> <el-button type="primary" @click="putindata()"> </el-button>
</span> </span>
</el-dialog> </el-dialog>
<el-dialog
title="图片信息"
:visible.sync="dialogImageVisible"
:close-on-click-modal="false"
width="500"
@close="handleImageClose"
>
<div
v-if="srcList.length > 0"
v-loading="loadingImageList"
element-loading-text="拼命加载中"
>
<div style="text-align: center">
<ul class="el-upload-list el-upload-list--picture-card">
<li
v-for="file in srcList"
:key="file.image_id"
:class="['el-upload-list__item', 'is-success', focusing ? 'focusing' : '']"
tabindex="0"
style="border: none"
@focus="focusing = true"
@blur="focusing = false"
@click="focusing = false"
>
<slot :file="file">
<img
style="width:100px"
class="el-upload-list__item-thumbnail"
:src="getImageUrl(file)"
alt=""
>
<span class="el-upload-list__item-actions">
<span
class="el-upload-list__item-preview"
@click="handleImageView(file)"
>
<i class="el-icon-zoom-in" />
</span>
<span
class="el-upload-list__item-delete"
@click="handleDelFile(file.image_id)"
>
<i class="el-icon-delete" />
</span>
</span>
</slot>
</li>
</ul>
</div>
</div>
<div
v-else
v-loading="loadingImageList"
element-loading-text="拼命加载中"
style="text-align: center;margin-bottom: 40px"
>
请上传
</div>
<el-image-viewer v-if="imgViewerVisible" :z-index="3000" :url-list="srcViewrList" :on-close="closeImgViewer" />
<div style="display: flex;justify-content: center">
<el-upload
class="upload-demo"
:action="UPLOAD_URL"
:show-file-list="false"
:before-upload="beforeUpload"
:on-success="uploadSuccess"
:on-error="uploadErr"
:data="{
variety_id: currentItem.variety_id,
medicament_id: currentItem.medicament_id
}"
>
<el-button type="primary" style="margin-right: 20px;">普通上传</el-button>
</el-upload>
<el-button type="success" @click="handleGaoPiYi"></el-button>
</div>
</el-dialog>
<Scanner @getcode="getCode" /> <Scanner @getcode="getCode" />
</div> </div>
</template> </template>
@ -329,12 +409,20 @@ import {
put_in_tmp, pring_bar_code, put_in_tmp, pring_bar_code,
enter_db_client_list enter_db_client_list
} from '@/api/reagent/warehousing' } from '@/api/reagent/warehousing'
import {
get_medicament_image,
del_medicament_image,
use_gaopaiyi
} from '@/api/reagent/management'
import stringify from '@/utils/stringify' import stringify from '@/utils/stringify'
import { throttle } from '@/utils' import { throttle } from '@/utils'
export default { export default {
name: 'Warehousing', name: 'Warehousing',
components: { ReagentForm, Scanner }, components: {
'el-upload-list': () => import('element-ui/packages/upload/src/upload-list'),
'el-image-viewer': () => import('element-ui/packages/image/src/image-viewer'),
ReagentForm, Scanner },
data() { data() {
return { return {
// //
@ -360,6 +448,8 @@ export default {
}, { type: 'number', message: '条码必须为数字值' }] }, { type: 'number', message: '条码必须为数字值' }]
}, },
dialogTableVisible: false, dialogTableVisible: false,
dialogImageVisible:false,
srcList: [],
headerStyle: { 'background': '#E6E6E6' }, headerStyle: { 'background': '#E6E6E6' },
tableData: [], tableData: [],
client_id: '', client_id: '',
@ -404,7 +494,11 @@ export default {
// //
fileList: [], fileList: [],
dialogImportVisible: false, dialogImportVisible: false,
importFile: undefined loadingImageList: false,
importFile: undefined,
currentItem: {},
imgViewerVisible:false,
UPLOAD_URL: process.env.VUE_APP_BASE_API + '/api/drug/save_drug_img'
} }
}, },
created() { created() {
@ -414,6 +508,85 @@ export default {
this.getTmpList() this.getTmpList()
}, },
methods: { methods: {
/* 图片信息展示*/
//
handleGaoPiYi() {
this.loadingImageList = true
const data = {
variety_id: this.currentItem.variety_id,
medicament_id: this.currentItem.medicament_id
}
use_gaopaiyi(stringify(data)).then(res => {
this.$message.success(res.msg)
this.getImageList()
}).finally(() => { this.loadingImageList = false })
},
//
getImageList() {
const data = {
variety_id: this.currentItem.variety_id,
medicament_id: this.currentItem.medicament_id
}
this.loadingImageList = true
get_medicament_image(stringify(data)).then(res => {
this.srcList = res.data
}).finally(() => {
this.loadingImageList = false
})
},
// url
getImageUrl(file) {
return process.env.VUE_APP_BASE_API + '/api/drug/get_img_info/' + file.pic_url
},
//
// handleShowImage(row) {
// this.currentItem = row
// this.getImageList()
// this.dialogImageVisible = true
// },
//
handleImageView(item) {
const url = this.getImageUrl(item)
this.srcViewrList = [url]
this.imgViewerVisible = true
console.log(this.srcViewrList)
},
//
uploadSuccess(response, file, fileList) {
this.getImageList()
this.loadingImageList = false
},
//
// eslint-disable-next-line handle-callback-err
uploadErr(err, file, fileList) {
this.loadingImageList = false
},
//
beforeUpload(file) {
this.loadingImageList = true
},
//
handleDelFile(image_id) {
const data = { image_id }
this.loadingImageList = true
del_medicament_image(stringify(data)).then(
res => {
this.$message.success(res.msg)
this.getImageList()
}
).finally(() => { this.loadingImageList = false })
},
//
closeImgViewer() {
this.imgViewerVisible = false
},
//
handleImageClose() {
this.srcList = []
this.srcViewrList = []
this.currentItem = {}
},
putindata(){ putindata(){
if(this.radio1 !='' && this.radio2 !=''){ if(this.radio1 !='' && this.radio2 !=''){
const data = JSON.parse(JSON.stringify(this.currentRow)) const data = JSON.parse(JSON.stringify(this.currentRow))
@ -431,6 +604,13 @@ export default {
this.$set(this.bindToDBData, id, { ...this.bindToDBData[id], status: true }) this.$set(this.bindToDBData, id, { ...this.bindToDBData[id], status: true })
this.$message.success('入库成功!') this.$message.success('入库成功!')
this.detailVisible=false this.detailVisible=false
if(this.$store.state.app.title==='对照品'){
this.dialogImageVisible = true
this.currentItem = res.data
this.getImageList()
}
// //
if (id < this.bindToDBData.length - 1) { if (id < this.bindToDBData.length - 1) {
// //

@ -1,7 +1,7 @@
<template> <template>
<div class="contents"> <div class="contents">
<div class="content left"> <div class="content left">
<div class="title">{{ subTitle }}</div> <div class="title">待登记列表</div>
<div class="show-data"> <div class="show-data">
<el-table <el-table
v-loading="loading" v-loading="loading"
@ -328,7 +328,7 @@ export default {
} }
.right { .right {
background-color: #F7F7F7; background-color: white;
padding: 0; padding: 0;
.top { .top {

Loading…
Cancel
Save