危化品同步对照品

duizhaopin_ui
tangxuan 2 years ago
parent 4078f93384
commit 48227e58b3

@ -83,8 +83,16 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="预估质量" prop="total"> <el-form-item v-show="showTotal" label="预估质量" prop="total">
<el-input v-model="formData.total" placeholder="请输入预估质量" clearable :style="{ width: '100%' }" /> <el-input @focus="doWeight" @blur="cancelWeight" v-model="weight" placeholder="请输入预估质量" clearable
:style="{ width: '100%' }" />
<el-button type="primary" plain @click="doTare"></el-button>
<el-button type="warning" @click="doZero"></el-button>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="批号" prop="standard_code">
<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-for="item in extra_form" :key="item.id" :span="12"> <el-col v-for="item in extra_form" :key="item.id" :span="12">
@ -119,7 +127,9 @@ export default {
var func_type = get_func_type() var func_type = get_func_type()
return { return {
weight: '', weight: '',
formData: {}, formData: {
total: 0.00
},
loadAll: [], loadAll: [],
showTotal: func_type == 3 ? false : true, showTotal: func_type == 3 ? false : true,
rules: { rules: {
@ -129,6 +139,7 @@ export default {
trigger: 'blur' trigger: 'blur'
}], }],
english_name: [], english_name: [],
// CAS
cas_number: [{ cas_number: [{
required: func_type == 3 ? false : true, required: func_type == 3 ? false : true,
message: '请输入CAS码', message: '请输入CAS码',
@ -142,8 +153,7 @@ export default {
export_count: [{ export_count: [{
required: true, required: true,
message: '请输入导入数量', message: '请输入导入数量',
trigger: 'blur', trigger: 'blur'
type: 'number'
}], }],
production_date: [{ production_date: [{
required: func_type == 3 ? false : true, required: func_type == 3 ? false : true,
@ -155,7 +165,11 @@ export default {
message: '请输入过期日期', message: '请输入过期日期',
trigger: 'blur' trigger: 'blur'
}], }],
manufacturer: [], manufacturer: [{
required: true,
message: '请输入生产厂家',
trigger: 'blur'
}],
distributor: [], distributor: [],
speci: [{ speci: [{
required: true, required: true,
@ -163,16 +177,20 @@ export default {
trigger: 'blur' trigger: 'blur'
}], }],
total: [{ total: [{
required: true, required: func_type == 3 ? false : true,
message: '请输入单位', message: '请输入预估质量',
trigger: 'blur' trigger: 'blur'
}], }],
net_weight_unit: [{ net_weight_unit: [{
required: func_type == 3 ? false : true,
message: '请选择单位',
trigger: 'blur'
}],
standard_code: [{
required: true, required: true,
message: '请输入预估质量', message: '请填写批号',
trigger: 'blur' trigger: 'blur'
} }],
]
}, },
extra_form: [] extra_form: []
} }
@ -187,14 +205,11 @@ export default {
} }
}, },
created() { created() {
//this.doZero() // this.doZero()
get_use().then(res => { get_use().then(res => {
this.extra_form = res.data this.extra_form = res.data
}) })
this.drugList() this.drugList()
//this.timer = setInterval(() => {
// this.doWeigh()
//}, 1500)
}, },
destroyed() { destroyed() {
if (this.timer) { if (this.timer) {
@ -202,38 +217,6 @@ export default {
} }
}, },
methods: { methods: {
doWeigh() {
weigh().then(
res => {
let weigh = null
if (res.status === 0) {
weigh = parseFloat(res.data)
if (weigh == null) {
return
}
//
console.log(weigh, '11111111111111111')
if (weigh.toFixed(2) > 10) {
this.formData.total = weigh.toFixed(2)
}
}
}
)
},
doTare() {
tare().then(
res => {
this.$message.success('去皮操作成功')
}
)
},
doZero() {
zero().then(
res => {
this.$message.success('清零成功')
}
)
},
drugList() { drugList() {
get_drug_group_list().then( get_drug_group_list().then(
res => { res => {
@ -267,6 +250,7 @@ export default {
}, },
handleConfirm: throttle(function () { handleConfirm: throttle(function () {
this.formData.total = this.weight
// //
this.drugList() this.drugList()
this.$refs['elForm'].validate(valid => { this.$refs['elForm'].validate(valid => {
@ -304,7 +288,53 @@ export default {
}, },
resetForm() { resetForm() {
this.$refs['elForm'].resetFields() this.$refs['elForm'].resetFields()
},
//
doWeight() {
var drug_margin = 0
this.timer = setInterval(() => {
weigh().then(
res => {
let weigh = null
if (res.status === 0) {
drug_margin = res.data
if (drug_margin.substring(0,1) == '+') {
drug_margin = drug_margin.slice(1,)
}
weigh = parseFloat(drug_margin)
if (weigh == null) {
return
}
this.weight = drug_margin
this.formData.total = drug_margin
}
}
)
}, 1500)
},
//
cancelWeight() {
if (this.timer) {
clearInterval(this.timer)
}
},
doTare() {
tare().then(
res => {
this.$message.success('去皮操作成功')
} }
)
},
doZero() {
zero().then(
res => {
this.$message.success('清零成功')
}
)
},
} }
} }

@ -2,24 +2,34 @@
<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-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-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="申请详情"> <el-dialog :close-on-click-modal="false" :visible.sync="dialogHistoryVisible" width="60%" title="申请详情">
<div style='height:500px'> <div style="height:500px">
<el-scrollbar style="height: 100%"> <el-scrollbar style="height: 100%">
<el-table <el-table v-loading="loadingHistory" element-loading-text="" :header-cell-style="headerStyle"
v-loading="loadingHistory" :data="historyData" height="420" @close="dialogHistoryClose"
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" type="index" width="50" label="序号"/>
<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="client_name" label="所属终端"/>
<el-table-column align="center" property="place" label="所属单元"/>
<el-table-column align="center" property="notes" label="用途"/>
<el-table-column align="center" property="info" label="未领用说明"/>
<el-table-column
fixed="right"
label="操作"
width="160"
>
<template slot-scope="scope">
<el-button v-if="is_over ==1" @click="handleUseInfo(scope.row)" type="text" size="small">
填写未领用说明
</el-button>
</template>
</el-table-column>
</el-table> </el-table>
</el-scrollbar> </el-scrollbar>
</div> </div>
@ -27,8 +37,8 @@
<el-dialog :close-on-click-modal="false" :visible.sync="dialogMsdsVisible" width="60%" title="MSDS数据库"> <el-dialog :close-on-click-modal="false" :visible.sync="dialogMsdsVisible" width="60%" title="MSDS数据库">
<div class="box" style='height:500px'> <div class="box" style="height:500px">
<el-scrollbar style='hight:500px'> <el-scrollbar style="hight:500px">
<div class="main-container-text"> <div class="main-container-text">
<div class="title">{{ currentItem.name }}</div> <div class="title">{{ currentItem.name }}</div>
<div class="header"> <div class="header">
@ -45,17 +55,28 @@
<el-descriptions-item label="稳定性">{{ currentItem.stability }}</el-descriptions-item> <el-descriptions-item label="稳定性">{{ currentItem.stability }}</el-descriptions-item>
<el-descriptions-item label="生态性">{{ currentItem.ecological }}</el-descriptions-item> <el-descriptions-item label="生态性">{{ currentItem.ecological }}</el-descriptions-item>
<el-descriptions-item label="注意事项">{{ currentItem.precautions }}</el-descriptions-item> <el-descriptions-item label="注意事项">{{ currentItem.precautions }}</el-descriptions-item>
<el-descriptions-item :style="{'hight':'80px'}" /> <el-descriptions-item :style="{'hight':'80px'}"/>
<el-descriptions-item v-if="$route.path.indexOf('msds') === -1" :label-style="{'background': '#ffcc99'}" label="试剂属性">{{ currentItem.drug_attribute }}</el-descriptions-item> <el-descriptions-item v-if="$route.path.indexOf('msds') === -1" :label-style="{'background': '#ffcc99'}"
<el-descriptions-item v-if="$route.path.indexOf('msds') === -1" :label-style="{'background': '#ffcc99'}"> label="试剂属性"
>{{ currentItem.drug_attribute }}
</el-descriptions-item>
<el-descriptions-item v-if="$route.path.indexOf('msds') === -1"
:label-style="{'background': '#ffcc99'}"
>
<template slot="label"> <template slot="label">
存储禁忌 <i class="el-icon-warning-outline" /> 存储禁忌 <i class="el-icon-warning-outline"/>
</template> </template>
{{ currentItem.storage_taboo }} {{ currentItem.storage_taboo }}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item :label-style="{'background': '#ffcc99','width':'120px'}" label="储存方法">{{ currentItem.storage_method }}</el-descriptions-item> <el-descriptions-item :label-style="{'background': '#ffcc99','width':'120px'}" label="储存方法">
<el-descriptions-item :label-style="{'background': '#ffcc99'}" label="柜体储存要求">{{ currentItem.client_storage_require }}</el-descriptions-item> {{ currentItem.storage_method }}
<el-descriptions-item :label-style="{'background': '#ffcc99'}" label="领用归还规定">{{ currentItem.provision }}</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item :label-style="{'background': '#ffcc99'}" label="柜体储存要求">
{{ currentItem.client_storage_require }}
</el-descriptions-item>
<el-descriptions-item :label-style="{'background': '#ffcc99'}" label="领用归还规定">
{{ currentItem.provision }}
</el-descriptions-item>
</el-descriptions> </el-descriptions>
</div> </div>
</el-scrollbar> </el-scrollbar>
@ -64,29 +85,29 @@
<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;">
<el-form :inline="true" :model="pt_form" :rules="rules" ref="pt_form" class="demo-form-inline" style="padding-top:13px"> <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 v-for="item in ptUserArray" :key="item.user_id" :label="item.real_name"
v-for="item in ptUserArray" :value="item.user_id"
:key="item.user_id" >
:label="item.real_name"
:value="item.user_id">
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-form> </el-form>
<div class="header"> <div class="header">
<el-input v-model="seach_word" clearable placeholder="请输入试剂名称" /> <el-input v-model="seach_word" clearable placeholder="请输入试剂名称"/>
<el-button type="primary" icon="el-icon-search" @click="get_drug_group()"></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;">
<el-table-column type="index" align="center" width="50" 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="name" show-overflow-tooltip label="试剂名称" align="center"/>
<el-table-column prop="remain" show-overflow-tooltip label="余量" align="center" /> <el-table-column prop="remain" show-overflow-tooltip label="余量" align="center"/>
<el-table-column prop="bar_code" show-overflow-tooltip label="编号" align="center" /> <el-table-column prop="bar_code" show-overflow-tooltip label="编号" align="center"/>
<el-table-column align="center" property="client_id" label="所属终端"> <el-table-column align="center" property="client_id" label="所属终端">
<template slot-scope="scope"> <template slot-scope="scope">
<div v-if="$store.getters.currentOptions.find(item => item.client_id === scope.row.client_id)"> <div v-if="$store.getters.currentOptions.find(item => item.client_id === scope.row.client_id)">
@ -98,19 +119,20 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="place" prop="flow_position_code"
show-overflow-tooltip show-overflow-tooltip
label="所属单元" label="所属单元"
align="center" align="center"
width="100" width="100"
/> />
<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="manufacturer" show-overflow-tooltip label="生产厂家" align="center" /> <el-table-column prop="manufacturer" show-overflow-tooltip label="生产厂家" align="center"/>
<el-table-column <el-table-column
fixed="right" fixed="right"
label="操作" label="操作"
width="160"> width="100"
>
<template slot-scope="scope"> <template slot-scope="scope">
<el-button @click="handleClick(scope.row)" type="text" size="small">添加申请</el-button> <el-button @click="handleClick(scope.row)" type="text" size="small">添加申请</el-button>
<el-button @click="handleInfo(scope.row)" type="text" size="small">查看详情</el-button> <el-button @click="handleInfo(scope.row)" type="text" size="small">查看详情</el-button>
@ -119,10 +141,10 @@
</el-table> </el-table>
<el-table :data="checkList" max-height="250" style="height:250px;padding-bottom: 50px;"> <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 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="remain" show-overflow-tooltip label="余量" align="center" /> <el-table-column prop="remain" show-overflow-tooltip label="余量" align="center"/>
<el-table-column prop="bar_code" show-overflow-tooltip label="编号" align="center" /> <el-table-column prop="bar_code" show-overflow-tooltip label="编号" align="center"/>
<el-table-column align="center" property="client_id" label="所属终端"> <el-table-column align="center" property="client_id" label="所属终端">
<template slot-scope="scope"> <template slot-scope="scope">
<div v-if="$store.getters.currentOptions.find(item => item.client_id === scope.row.client_id)"> <div v-if="$store.getters.currentOptions.find(item => item.client_id === scope.row.client_id)">
@ -134,19 +156,21 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="place" prop="flow_position_code"
show-overflow-tooltip show-overflow-tooltip
label="所属单元" label="所属单元"
align="center" align="center"
width="100" width="100"
/> />
<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="manufacturer" show-overflow-tooltip label="生产厂家" align="center" /> <el-table-column prop="manufacturer" show-overflow-tooltip label="生产厂家" align="center"/>
<el-table-column prop="notes" show-overflow-tooltip label="用途" align="center"/>
<el-table-column <el-table-column
fixed="right" fixed="right"
label="操作" label="操作"
width="100"> width="100"
>
<template slot-scope="scope"> <template slot-scope="scope">
<el-button @click="cancelClick(scope.row)" type="text" size="small">取消申请</el-button> <el-button @click="cancelClick(scope.row)" type="text" size="small">取消申请</el-button>
</template> </template>
@ -160,52 +184,37 @@
</el-dialog> </el-dialog>
<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>
</div> </div>
<el-table <el-table stripe ref="multipleTable" :data="tableData1" :header-cell-style="headerStyle" @select="handleSelection"
stripe row-key="medicament_id" height="69vh" class="table-style"
ref="multipleTable"
:data="tableData1"
:header-cell-style="headerStyle"
@select="handleSelection"
row-key="medicament_id"
height="69vh"
class="table-style"
> >
<el-table-column type="selection" width="55" align="center" /> <el-table-column type="selection" width="55" align="center"/>
<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="use_content" show-overflow-tooltip label="试剂详情" align="center" /> --> <!-- <el-table-column prop="use_content" 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"/>
<el-table-column prop="is_solve" show-overflow-tooltip label="状态" align="center"> <el-table-column prop="is_solve" show-overflow-tooltip label="状态" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-tag :type="statusColorMap[scope.row.is_solve]">{{ statusMap[scope.row.is_solve] }}</el-tag> <el-tag :type="statusColorMap[scope.row.is_solve]">{{ statusMap[scope.row.is_solve] }}</el-tag>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="solve_user_name" show-overflow-tooltip label="审批人1" align="center" /> <el-table-column prop="solve_user_sh_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_user_name" show-overflow-tooltip label="审批人1" align="center"/>
<el-table-column prop="solve_date" 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="information" show-overflow-tooltip label="备注" align="center" /> <el-table-column prop="solve_date" show-overflow-tooltip label="审批时间" align="center"/>
<el-table-column <el-table-column prop="information" show-overflow-tooltip label="备注" align="center"/>
fixed="right" <el-table-column fixed="right" label="操作" align="center" width="100">
label="操作"
align="center"
width="100">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button @click="handleCheck(scope.row)" type="text" size="small">查看</el-button> <el-button @click="handleCheck(scope.row)" type="text" size="small">查看</el-button>
</template> </template>
</el-table-column> </el-table-column>
</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 layout="prev, pager, next" :current-page.sync="page" :total="total1"
background :page-size.sync="page_size" @current-change="pageChange"
layout="prev, pager, next"
:current-page.sync="page"
:total="total1"
:page-size.sync="page_size"
@current-change="pageChange"
/> />
</div> </div>
</div> </div>
@ -217,20 +226,24 @@ import stringify from '@/utils/stringify'
import { import {
get_pt_user_list, get_pt_user_list,
get_drug_group_list, get_drug_group_list,
add_apply add_apply,
get_check_last_drug,
update_notes
} from '@/api/reagent/createapply' } from '@/api/reagent/createapply'
import { import {
get_apply_list, get_apply_list
} from '@/api/reagent/applymanage' } from '@/api/reagent/applymanage'
export default { export default {
name: 'CreateApply', name: 'CreateApply',
data() { data() {
return { return {
page: 1, page: 1,
page_size: 10, page_size: 10,
seach_word:'', seach_word: '',
total: 0, total: 0,
total1: 0, total1: 0,
is_over: 0,
client_id: '', client_id: '',
dialogVisible: false, dialogVisible: false,
tableData: [], tableData: [],
@ -249,23 +262,24 @@ export default {
history_page_size: 15, history_page_size: 15,
history_total: 100, history_total: 100,
dialogTableVisible: false, dialogTableVisible: false,
dialogMsdsVisible:false, dialogMsdsVisible: false,
checkList: [], checkList: [],
ptUserArray:[], id: '',
pt_form:{ ptUserArray: [],
user_id_pt: '', pt_form: {
user_id_pt: ''
}, },
statusColorMap: ['warning','success','danger'], statusColorMap: ['warning', 'success', 'danger'],
statusMap: ['未处理', '已处理','已驳回','已完成'], statusMap: ['未处理', '已处理', '已驳回', '已完成'],
rules: { rules: {
user_id_pt: [ user_id_pt: [
{ required: true, message: '请选择陪同人', trigger: 'change' } { required: true, message: '请选择陪同人', trigger: 'change' }
], ]
}, },
currentItem:{} currentItem: {}
} }
}, },
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_apply()
this.get_drug_group() this.get_drug_group()
@ -273,14 +287,50 @@ export default {
}, },
methods: { methods: {
// //
handleSelection(selection){ handleSelection(selection) {
var that =this var that = this
that.handleSelectionSelection =selection that.handleSelectionSelection = selection
},
//
compareDate(row) {
let d = row.create_date
let hour = row.time_hour
if (hour != undefined || hour == '') {
let date1 = new Date().getTime()
let date2 = new Date(d).getTime() + 3600 * 1000 * Number(hour)
let isCompare = date1 > date2
return isCompare
} else {
return false
}
},
//
compareDate(row) {
let d = row.create_date
let hour = row.time_hour
if (hour != undefined || hour == '') {
let date1 = new Date().getTime()
let date2 = new Date(d).getTime() + 3600 * 1000 * Number(hour)
let isCompare = date1 > date2
return isCompare
} else {
return false
}
}, },
// //
handleCheck(row) { handleCheck(row) {
this.dialogHistoryVisible = true this.dialogHistoryVisible = true
this.historyData = JSON.parse(row.use_content) this.historyData = JSON.parse(row.use_content)
this.id = row.id
//
console.log(row.create_date, row.time_hour, row)
let r = this.compareDate(row)
console.log(r)
if (r) {
this.is_over = 1
} else {
this.is_over = 0
}
// if (this.handleSelectionSelection.length === 1) { // if (this.handleSelectionSelection.length === 1) {
// this.dialogHistoryVisible = true // this.dialogHistoryVisible = true
// this.historyData = JSON.parse(this.handleSelectionSelection[0].use_content) // this.historyData = JSON.parse(this.handleSelectionSelection[0].use_content)
@ -288,97 +338,146 @@ export default {
// this.$message.warning("") // this.$message.warning("")
// } // }
}, },
handleInfo(row){ handleInfo(row) {
var that =this var that = this
const data = { const data = {
seach_word: row.name, seach_word: row.name,
cas_number:row.cas_number cas_number: row.cas_number
} }
get_msds_drug(stringify(data)).then(res => { get_msds_drug(stringify(data)).then(res => {
console.log(res.data.data_list.length>0) console.log(res.data.data_list)
if(res.data.data_list.length>0){ if (res.data.data_list.length > 0) {
this.currentItem = res.data.data_list[0] this.currentItem = res.data.data_list[0]
that.dialogMsdsVisible=true that.dialogMsdsVisible = true
}else{ } else {
this.$message.warning("未找到该试剂!") this.$message.warning('未找到该试剂!')
} }
}).finally(() => { this.loading = false }) }).finally(() => {
this.loading = false
})
}, },
// //
dialogHistoryClose() { dialogHistoryClose() {
this.dialogHistoryVisible = false this.dialogHistoryVisible = false
this.historyData = [] this.historyData = []
}, },
//
handleUseInfo(row) {
var that = this
console.log('未领用说明', row)
that.$prompt('请输入未领用说明', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消'
}).then(({ value }) => {
if (value) {
const data = {
id: that.id,
bar_code: row.bar_code,
info: value
}
update_notes(stringify(data)).then(rsp => {
console.log('rsp.data>>', rsp.data)
that.historyData = JSON.parse(rsp.data.use_content)
that.handleRefresh()
})
} else {
that.$message({
type: 'info',
message: '请输入说明内容'
})
}
}).catch(() => {
that.$message({
type: 'info',
message: '取消输入'
})
})
},
// //
handleClick(row){ handleClick(row) {
var that =this var that = this
// that.$prompt('', '', { that.$prompt('请输入领取用途', '提示', {
// confirmButtonText: '', confirmButtonText: '确定',
// cancelButtonText: '', cancelButtonText: '取消'
// inputPattern: /^[1-9]\d*$/, }).then(({ value }) => {
// inputErrorMessage: '' if (value) {
// }).then(({ value }) => { row.notes = value
// if(value>row.drug_num){ //
// that.$message({ get_check_last_drug(stringify(row)).then(res => {
// type: 'info', this.check_last_medicament(res.data).then((check_res) => {
// message: '' //
// }); if (check_res) {
// }else{ var result = that.checkList.filter(item => item).map(item => item.bar_code)
// row.num =value if (result.indexOf(row.bar_code) != -1) {
// 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.tableData.splice(row.$index, 1)
// }
// }).catch(() => {
// that.$message({
// type: 'info',
// message: ''
// });
// });
var result = that.checkList.filter(item => item).map(item => item.bar_code);
if(result.indexOf(row.bar_code) !=-1){
that.$message({ that.$message({
type: 'info', type: 'info',
message: '不可重复添加' message: '不可重复添加'
}); })
}else{ } else {
that.checkList.push(row) that.checkList.push(row)
let getLocation = that.tableData.indexOf(row); let getLocation = that.tableData.indexOf(row)
that.tableData.splice(getLocation, 1) that.tableData.splice(getLocation, 1)
} }
}
})
})
} else {
that.$message({
type: 'info',
message: '请输入用途'
})
}
}).catch(() => {
that.$message({
type: 'info',
message: '取消输入'
})
})
}, },
// //
cancelClick(row){ cancelClick(row) {
var that =this var that = this
let getLocation = that.checkList.indexOf(row); let getLocation = that.checkList.indexOf(row)
that.checkList.splice(getLocation, 1) that.checkList.splice(getLocation, 1)
}, },
//
check_last_medicament(res) {
return new Promise((resolve, reject) => {
var is_last = res.is_last
if (is_last) {
resolve(true)
} else {
this.$confirm('存在更早的试剂, 是否继续领用?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
resolve(true)
}).catch(() => {
resolve(false)
})
}
})
},
// //
get_drug_group: function() { get_drug_group: function() {
var that =this var that = this
const data = { const data = {
page:1, page: 1,
seach_word:this.seach_word, seach_word: this.seach_word,
page_size: 10000 page_size: 10000
} }
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)
var datalist=[] var datalist = []
var result = that.checkList.filter(item => item).map(item => item.bar_code); var result = that.checkList.filter(item => item).map(item => item.bar_code)
rsp.data.data_list.forEach(item => { rsp.data.data_list.forEach(item => {
if (result.indexOf(item.bar_code) ==-1) { if (result.indexOf(item.bar_code) == -1) {
datalist.push(item) datalist.push(item)
} }
}) })
@ -388,13 +487,13 @@ export default {
}, },
// //
get_apply(){ get_apply() {
const data = { 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
}) })
@ -402,47 +501,60 @@ export default {
// //
get_pt_user() { get_pt_user() {
console.log("jjj") console.log('jjj')
const data = { const data = {
page: 1, 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,
real_name: this.real_name, real_name: this.real_name,
role_id: this.role_id, role_id: this.role_id,
is_enabled: this.is_enabled is_enabled: this.is_enabled
} }
console.log("hhhhh") console.log('hhhhh')
get_pt_user_list(stringify(data)).then(res => { get_pt_user_list(stringify(data)).then(res => {
this.ptUserArray = res.data.data_list this.ptUserArray = res.data.data_list.filter(item => item.user_id != this.$store.state.user.id)
console.log("res>>>", res) console.log('res>>>', res)
}) })
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) => {
return Object.assign({}, { bar_code: item.bar_code,client_code: item.client_code,place: item.place,remark12: item.remark12,name: item.name, num: item.num,client_id: item.client_id, purity: item.purity, speci: item.speci,medicament_id:item.medicament_id}) return Object.assign({}, {
info: '',
notes: item.notes,
bar_code: item.bar_code,
client_code: item.client_code,
place: item.flow_position_code,
remark12: item.remark12,
name: item.name,
num: item.num,
client_id: item.client_id,
purity: item.purity,
speci: item.speci,
medicament_id: item.medicament_id
})
}) })
if (pt_from.user_id_pt === '') { if (pt_from.user_id_pt === '') {
that.$message({ that.$message({
type: 'info', type: 'info',
message: '请选择陪同人' message: '请选择陪同人'
}); })
}else{ } else {
const data = { const data = {
user_id: this.$store.state.user.id, user_id: this.$store.state.user.id,
user_id_pt: pt_from.user_id_pt, user_id_pt: pt_from.user_id_pt,
use_content: JSON.stringify(datalist), use_content: JSON.stringify(datalist)
} }
add_apply(stringify(data)).then(rsp => { add_apply(stringify(data)).then(rsp => {
console.log("rsp>>", rsp) console.log('rsp>>', rsp)
if (rsp.status==0){ if (rsp.status == 0) {
this.dialogTableClose() this.dialogTableClose()
// //
this.$refs.multipleTable.clearSelection(); this.$refs.multipleTable.clearSelection()
that.checkList=[] that.checkList = []
this.get_apply() this.get_apply()
} }
}) })
@ -453,9 +565,9 @@ export default {
this.page = page this.page = page
this.get_apply() this.get_apply()
}, },
addDataIndex(initData){ addDataIndex(initData) {
for (let i = 0; i < initData.length; i++) { for (let i = 0; i < initData.length; i++) {
initData[i]["index"] = i initData[i]['index'] = i
} }
return initData return initData
}, },
@ -465,15 +577,15 @@ export default {
this.get_drug_group() this.get_drug_group()
}, },
// //
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=[] this.checkList = []
}, }
} }
} }
</script> </script>
@ -525,8 +637,9 @@ export default {
/* 2外包一个div,来减少对其他页面会有冲突此时缺少scoped */ /* 2外包一个div,来减少对其他页面会有冲突此时缺少scoped */
.box .el-scrollbar__wrap { .box .el-scrollbar__wrap {
overflow-x: hidden; overflow-x: hidden;
height:500px height: 500px
} }
/* .el-dialog__body { /* .el-dialog__body {
height: 600px !important; height: 600px !important;
} */ } */

@ -8,7 +8,7 @@
<div class="view-container-top"> <div class="view-container-top">
<div class="view-container-tl "> <div class="view-container-tl ">
<div class="view-container-tlt"> <div class="view-container-tlt">
<Detail v-for="(item,index) in desc" :key="index" :count="item.count" :desc="item.desc" :img="item.img" /> <Detail @click.native="clickDetail(item)" v-for="(item,index) in desc" :key="index" :count="item.count" :desc="item.desc" :img="item.img" />
</div> </div>
<div class="view-container-tlb view-content"> <div class="view-container-tlb view-content">
<div class="header"> <div class="header">
@ -287,6 +287,46 @@
</div> </div>
</el-dialog> --> </el-dialog> -->
</el-dialog> </el-dialog>
<!-- 查看今日数据弹框 -->
<el-dialog
:title="ndTitle"
width="70%"
:close-on-click-modal="true"
:visible.sync="nowDayVisible"
@close="() => {nowDayVisible = false}"
>
<div class="content">
<el-table
ref="multipleTable"
:header-cell-style="headerStyle"
:data="nowDayData"
style="width: 100%"
size="medium"
height="400"
>
<el-table-column align="center" type="index" width="50" label="序号" />
<el-table-column align="center" property="name" label="试剂名称" width="150" show-overflow-tooltip />
<el-table-column align="center" property="english_name" label="英文名称" width="150" show-overflow-tooltip />
<el-table-column align="center" property="bar_code" label="试剂编码" />
<!-- <el-table-column align="center" property="purity" label="纯度" width="100" show-overflow-tooltip /> -->
<!-- <el-table-column align="center" property="cas_number" label="CAS码" /> -->
<el-table-column align="center" property="use_quantity" label="用量(g)" />
<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-table-column align="center" property="create_user_name" label="操作人员" />
</el-table>
<div class="reagent-add">
<el-button @click="() => {nowDayVisible= false}">取消</el-button>
</div>
</div>
</el-dialog>
</div> </div>
</template> </template>
@ -295,6 +335,7 @@ import Detail from '@/components/Detail/index'
import { home_info, home_warning_list, home_drug_remaining, get_monitoring_info} from '@/api/reagent/overView' import { home_info, home_warning_list, home_drug_remaining, get_monitoring_info} from '@/api/reagent/overView'
import stringify from '@/utils/stringify' import stringify from '@/utils/stringify'
import WaringListView from '@/components/WaringForm/index' import WaringListView from '@/components/WaringForm/index'
import { drug_log_type_info } from '@/api/reagent/report'
export default { export default {
name: 'MainOverview', name: 'MainOverview',
@ -313,22 +354,26 @@ export default {
{ {
count: 0, count: 0,
desc: '今日入库', desc: '今日入库',
img: require('@/assets/3-主概览/today_store.png') img: require('@/assets/3-主概览/today_store.png'),
record_type: 1
}, },
{ {
count: 0, count: 0,
desc: '今日领用', desc: '今日领用',
img: require('@/assets/3-主概览/today_get.png') img: require('@/assets/3-主概览/today_get.png'),
record_type: 2,
}, },
{ {
count: 0, count: 0,
desc: '今日归还', desc: '今日归还',
img: require('@/assets/3-主概览/today_return.png') img: require('@/assets/3-主概览/today_return.png'),
record_type: 3,
}, },
{ {
count: 0, count: 0,
desc: '今日未归还', desc: '今日未归还',
img: require('@/assets/3-主概览/today_noreturn.png') img: require('@/assets/3-主概览/today_noreturn.png'),
record_type: 100,
} }
], ],
tableData: [], tableData: [],
@ -354,7 +399,12 @@ export default {
client_id: null, client_id: null,
client_date: 1, client_date: 1,
linechartData: [], linechartData: [],
loadingLineData: false loadingLineData: false,
nowDayVisible: false,
nowDayData:[],
ndTitle: '',
statusColorMap: ['success', '', 'warning'],
statusMap: ['在库', '出库', '空瓶'],
} }
}, },
created() { created() {
@ -465,15 +515,19 @@ export default {
const nowno = new_day_record_number.find(item => item.record_type === 100) const nowno = new_day_record_number.find(item => item.record_type === 100)
if (nowstore) { if (nowstore) {
this.desc[0].count = nowstore.type_number this.desc[0].count = nowstore.type_number
this.desc[0].record_type = nowstore.record_type
} }
if (nowget) { if (nowget) {
this.desc[1].count = nowget.type_number this.desc[1].count = nowget.type_number
this.desc[1].record_type = nowget.record_type
} }
if (nowsend) { if (nowsend) {
this.desc[2].count = nowsend.type_number this.desc[2].count = nowsend.type_number
this.desc[2].record_type = nowsend.record_type
} }
if (nowno) { if (nowno) {
this.desc[3].count = nowno.type_number this.desc[3].count = nowno.type_number
this.desc[3].record_type = nowno.record_type
} }
this.warning_data_info = warning_data_info this.warning_data_info = warning_data_info
this.tableData = warning_list this.tableData = warning_list
@ -579,7 +633,36 @@ export default {
] ]
} }
this.myChart2.setOption(option) this.myChart2.setOption(option)
},
//
clickDetail(detailItem) {
//0
var date1 = new Date(new Date(new Date().toLocaleDateString()).getTime());
var start_time = date1.getFullYear() + "-" + ((date1.getMonth() + 1) < 10 ? "0" + (date1.getMonth() + 1):(date1.getMonth() + 1))+ "-" + (date1.getDate() < 10 ? "0" + date1.getDate():date1.getDate()) + " " + (date1.getHours()<10?"0"+date1.getHours():date1.getHours()) + ":" + (date1.getMinutes()<10?"0"+date1.getMinutes():date1.getMinutes()) + ":" + (date1.getSeconds()<10?"0"+date1.getSeconds():date1.getSeconds());
//24
var date2 = new Date(new Date(new Date().toLocaleDateString()).getTime()+24*60*60*1000-1);
var end_time = date2.getFullYear() + '-' + (date2.getMonth() + 1) + '-' + date2.getDate() + ' ' + date2.getHours() + ':' + date2.getMinutes() + ':' + date2.getSeconds();
drug_log_type_info(stringify({
record_type: detailItem.record_type,
name: '',
user_name: '',
place:'',
status: '',
client_id: '',
start_time: start_time,
end_time: end_time,
})).then(res => {
this.nowDayData = res.data.data
}).finally(() => {
this.nowDayVisible = true
this.ndTitle = detailItem.desc
})
} }
} }
} }
</script> </script>
@ -709,4 +792,9 @@ export default {
margin-right: 1rem; margin-right: 1rem;
} }
} }
.reagent-add {
text-align: center;
margin-top: 1rem;
}
</style> </style>

@ -23,6 +23,11 @@
label="试剂名称" label="试剂名称"
align="center" align="center"
/> />
<el-table-column
prop="remark12"
label="试剂编号"
align="center"
/>
<el-table-column <el-table-column
prop="bar_code" prop="bar_code"
label="条码编号" label="条码编号"
@ -38,6 +43,16 @@
label="纯度" label="纯度"
align="center" align="center"
/> />
<el-table-column
prop="client_name"
label="终端"
align="center"
/>
<el-table-column
prop="flow_position_code"
label="存储单元"
align="center"
/>
</el-table> </el-table>
</div> </div>
<div class="page my-pagination"> <div class="page my-pagination">
@ -73,8 +88,8 @@
<div class="bottom"> <div class="bottom">
<el-radio v-model="radio" label="1"></el-radio> <el-radio v-model="radio" label="1"></el-radio>
<!-- <el-radio v-model="radio" label="2"></el-radio> --> <!-- <el-radio v-model="radio" label="2"></el-radio> -->
<el-button type="primary" @click="updateDrugRemain"></el-button> <el-button type="primary" @click="updateDrugRemain"></el-button>
<!-- <el-button type="primary" plain @click="doTare"></el-button>--> <el-button type="primary" plain @click="doTare"></el-button>
<el-input v-model="inputWeigh" placeholder="手动输入" /> <el-input v-model="inputWeigh" placeholder="手动输入" />
<el-button type="warning" @click="handleSetEmpty"></el-button> <el-button type="warning" @click="handleSetEmpty"></el-button>
</div> </div>
@ -135,7 +150,10 @@
<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 {
get_check_last_drug,
} from '@/api/reagent/createapply'
import { weigh, get_drug_info, tare, zero, update_drug_remain } from '@/api/reagent/weight'
import { set_drug_empty_bottle } from '@/api/reagent/management' import { set_drug_empty_bottle } from '@/api/reagent/management'
import stringify from '@/utils/stringify' import stringify from '@/utils/stringify'
@ -160,7 +178,8 @@ export default {
inputWeigh: '', inputWeigh: '',
surplusWeigh: '', surplusWeigh: '',
dialogVisible: false, dialogVisible: false,
place: null place: null,
is_wait:true
} }
}, },
computed: { computed: {
@ -174,6 +193,9 @@ export default {
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() { type() {
if (this.$route.name == "standardReceiving") {
return `0`
}
return this.$route.name.indexOf('Receiving') !== -1 ? `1` : `0` return this.$route.name.indexOf('Receiving') !== -1 ? `1` : `0`
} }
}, },
@ -193,19 +215,49 @@ export default {
methods: { methods: {
getCode(code) { getCode(code) {
var that =this
if (that.is_wait){
this.barCode = code this.barCode = code
console.log(this.$store.state.app.title)
if (this.$store.state.app.title=='危化品'){ if (this.$store.state.app.title=='危化品'){
this.is_wait =false
this.getDrugInfo(this.barCode) this.getDrugInfo(this.barCode)
console.log('222222222222222222222222222222222222')
if (this.$route.name.indexOf('Receiving') !== -1) { if (this.$route.name.indexOf('Receiving') !== -1) {
use(stringify({ 'bar_code': this.barCode })).then(res => {
//
that.$prompt('领用用途说明', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
}).then(({ value }) => {
if(value){
//
get_check_last_drug(stringify(this.infoData)).then(res => {
this.check_last_medicament(this.infoData).then((check_res) => {
//
if (check_res) {
use(stringify({ 'bar_code': this.barCode,notes: value})).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{
that.$message({
type: 'info',
message: '请输入用途说明'
});
}
}).catch(() => {
that.$message({
type: 'info',
message: '取消输入'
});
}).finally(() =>{
this.is_wait =true
}) })
} }
}else{ }else{
console.log('9999999999999999999999')
this.getDrugInfo(this.barCode) 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 => {
@ -215,10 +267,31 @@ export default {
}) })
} }
} }
}
},
check_last_medicament(res) {
return new Promise((resolve, reject) => {
var is_last = res.is_last
if (is_last) {
resolve(true)
} else {
this.$confirm('存在更早的试剂, 是否继续领用?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
resolve(true)
}).catch(() => {
resolve(false)
});
}
})
}, },
getList() { getList() {
const data = { const data = {
status: this.$route.name === 'Receiving' ? 1 : 2, status: this.$route.name === 'standardReceiving' ? 1 : 2, // 1 2 3
page: this.page, page: this.page,
page_size: this.page_size page_size: this.page_size
} }
@ -230,7 +303,6 @@ export default {
}, },
pageChange(page) { pageChange(page) {
this.page = page this.page = page
console.log(this.$route.name,'7777777777777777777777777')
if (this.$route.name != 'standardReceiving') { if (this.$route.name != 'standardReceiving') {
this.getList() this.getList()
} }
@ -298,14 +370,39 @@ export default {
const w = this.checkInputWeigh() const w = this.checkInputWeigh()
const data = { const data = {
'bar_code': this.infoData.bar_code, 'bar_code': this.infoData.bar_code,
'medicament_id': this.infoData.medicament_id,
'remain': w ? parseFloat(this.inputWeigh).toFixed(2) : this.surplusWeigh 'remain': w ? parseFloat(this.inputWeigh).toFixed(2) : this.surplusWeigh
} }
//
if (this.$route.name == "standardReceiving"){
update_drug_remain(stringify(data)).then(res => {
this.$message.success('余量更新完成')
})
} else {
drug_return(stringify(data)).then(res => { drug_return(stringify(data)).then(res => {
// this.tableData.push(res.data) // this.tableData.push(res.data)
this.getList() this.getList()
this.dialogVisible = false this.dialogVisible = false
this.$message.success('归还成功!') this.$message.success('归还成功!')
//
if (this.$route.name === 'standardSendBack'){
const h = this.$createElement;
var msg = ""
if (res.data.is_liquid){
msg += `液体, 体积用量:${res.data.use_volum} ${res.data.net_weight_unit}`
} else {
msg += `当次用量:${res.data.use_quality} ${res.data.net_weight_unit}`
}
this.$notify({
title: '本次使用用量',
message: h('i', { style: 'color: teal'}, msg)
});
}
}) })
}
} else { } else {
this.$message.warning('请选择试剂!') this.$message.warning('请选择试剂!')
} }

@ -68,7 +68,9 @@
<el-table-column align="center" property="bar_code" label="试剂编码" /> <el-table-column align="center" property="bar_code" label="试剂编码" />
<el-table-column align="center" property="purity" label="纯度" width="100" show-overflow-tooltip /> <el-table-column align="center" property="purity" label="纯度" width="100" show-overflow-tooltip />
<el-table-column align="center" property="cas_number" label="CAS码" /> <el-table-column align="center" property="cas_number" label="CAS码" />
<el-table-column align="center" property="use_quantity" label="用量" /> <el-table-column align="center" property="use_quantity" label="用量(g)" />
<el-table-column align="center" property="use_volume" label="液体用量(ml)" />
<el-table-column align="center" property="status" label="状态"> <el-table-column align="center" property="status" label="状态">
<template slot-scope="scope"> <template slot-scope="scope">
<el-tag :type="statusColorMap[scope.row.status-1]">{{ statusMap[scope.row.status-1] }}</el-tag> <el-tag :type="statusColorMap[scope.row.status-1]">{{ statusMap[scope.row.status-1] }}</el-tag>

@ -17,7 +17,6 @@
<el-button type="primary" @click="purchasePutIn"></el-button> <el-button type="primary" @click="purchasePutIn"></el-button>
<el-button type="primary" plain @click="handleAddTmp('add')">+ {{ $store.state.app.title }}</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="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> <el-button @click="handleImport"><i class="el-icon-folder-add" /> 导入入库模板</el-button>
<div class="right"> <div class="right">
<el-button icon="el-icon-delete" circle @click="handleDelTem" /> <el-button icon="el-icon-delete" circle @click="handleDelTem" />
@ -48,6 +47,11 @@
width="50" width="50"
label="序号" label="序号"
/> />
<el-table-column
prop="standard_codes"
label="批号"
align="center"
/>
<el-table-column <el-table-column
prop="template_name" prop="template_name"
label="模板名称" label="模板名称"
@ -179,6 +183,7 @@
@selection-change="handleAddSelectionChange" @selection-change="handleAddSelectionChange"
> >
<el-table-column type="selection" width="55" /> <el-table-column type="selection" width="55" />
<el-table-column align="center" property="standard_code" label="批号" />
<el-table-column align="center" property="name" label="试剂名称" /> <el-table-column align="center" property="name" label="试剂名称" />
<el-table-column align="center" property="english_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="purity" label="纯度" />
@ -719,19 +724,7 @@ export default {
}) })
}) })
}, },
//
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)
})
}
},
handlePrintCode1(row) { handlePrintCode1(row) {
const template_id = row.template_id const template_id = row.template_id
console.log(template_id) console.log(template_id)
@ -1012,7 +1005,6 @@ export default {
this.$message.warning('试剂信息为空,无需保存') this.$message.warning('试剂信息为空,无需保存')
return return
} }
console.log("1111111111111111111111111111", this.reagentAddTmpData)
const data = stringify({ const data = stringify({
'template_name': this.reagentAddTmpName, 'template_name': this.reagentAddTmpName,
'template_content': JSON.stringify(this.reagentAddTmpData), 'template_content': JSON.stringify(this.reagentAddTmpData),

Loading…
Cancel
Save