Compare commits

...

2 Commits

@ -100,6 +100,31 @@
<el-input v-model="formData.category" placeholder="请输入分类" clearable :style="{ width: '100%' }" /> <el-input v-model="formData.category" placeholder="请输入分类" clearable :style="{ width: '100%' }" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8">
<el-form-item label="包装" prop="is_packing">
<el-select v-model="formData.is_packing" :style="{ width: '100%' }" placeholder="包装是否完好">
<el-option label="是" value="1" />
<el-option label="否" value="0" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="标签" prop="is_label">
<el-select v-model="formData.is_label" :style="{ width: '100%' }" placeholder="标签是否清晰">
<el-option label="是" value="1" />
<el-option label="否" value="0" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="外观" prop="is_aspect">
<el-select v-model="formData.is_aspect" :style="{ width: '100%' }" placeholder="外观是否符合要求">
<el-option label="是" value="1" default/>
<el-option label="否" value="0" />
</el-select>
</el-form-item>
</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">
<el-form-item :label="item.name" :prop="item.name"> <el-form-item :label="item.name" :prop="item.name">
<el-input v-model="formData[item.name]" :placeholder="'请输入' + item.name" clearable <el-input v-model="formData[item.name]" :placeholder="'请输入' + item.name" clearable
@ -197,6 +222,9 @@ export default {
trigger: 'blur' trigger: 'blur'
}], }],
category:[], category:[],
is_packing: [],
is_label: [],
is_aspect: [],
}, },
extra_form: [] extra_form: []
} }

@ -276,7 +276,8 @@ export default {
{ required: true, message: '请选择陪同人', trigger: 'change' } { required: true, message: '请选择陪同人', trigger: 'change' }
] ]
}, },
currentItem: {} currentItem: {},
notes_msg: "",
} }
}, },
created() { created() {
@ -397,42 +398,24 @@ export default {
// //
handleClick(row) { handleClick(row) {
var that = this var that = this
that.$prompt('请输入领取用途', '提示', {
confirmButtonText: '确定', //
cancelButtonText: '取消' get_check_last_drug(stringify(row)).then(res => {
}).then(({ value }) => { this.check_last_medicament(res.data).then((check_res) => {
if (value) { //
row.notes = value if (check_res) {
// var result = that.checkList.filter(item => item).map(item => item.bar_code);
get_check_last_drug(stringify(row)).then(res => { if (result.indexOf(row.bar_code) != -1) {
this.check_last_medicament(res.data).then((check_res) => { that.$message({
// type: 'info',
if (check_res) { message: '不可重复添加'
var result = that.checkList.filter(item => item).map(item => item.bar_code) });
if (result.indexOf(row.bar_code) != -1) { } else {
that.$message({ that.checkList.push(row)
type: 'info', let getLocation = that.tableData.indexOf(row);
message: '不可重复添加' that.tableData.splice(getLocation, 1)
}) }
} else { }
that.checkList.push(row)
let getLocation = that.tableData.indexOf(row)
that.tableData.splice(getLocation, 1)
}
}
})
})
} else {
that.$message({
type: 'info',
message: '请输入用途'
})
}
}).catch(() => {
that.$message({
type: 'info',
message: '取消输入'
}) })
}) })
}, },
@ -518,47 +501,70 @@ export default {
}) })
console.log('giao') console.log('giao')
}, },
//
prompt_notes(){
var that = this
return new Promise((resolve, reject) => {
that.$prompt('请输入领取用途', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
}).then(({ value }) => {
if(value){
this.notes_msg =value
resolve(true)
}else{
that.$message({
type: 'info',
message: '请输入用途'
});
resolve(false)
}
}).catch(() => {
that.$message({
type: 'info',
message: '取消输入'
});
resolve(false)
});
})
},
// //
create_apply(pt_from) { create_apply(pt_from) {
var that = this var that = this
let datalist = that.checkList.map((item) => { that.prompt_notes().then(notes_res => {
return Object.assign({}, { if (!notes_res){
info: '', return
notes: item.notes, } else {
bar_code: item.bar_code, console.log("申请理由notes_msg", this.notes_msg)
client_code: item.client_code, let datalist = that.checkList.map((item) => {
place: item.flow_position_code, return Object.assign({}, {info:'',notes:this.notes_msg,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})
remark12: item.remark12, })
name: item.name, if (pt_from.user_id_pt === '') {
num: item.num, that.$message({
client_id: item.client_id, type: 'info',
purity: item.purity, message: '请选择陪同人'
speci: item.speci, });
medicament_id: item.medicament_id } else {
}) const data = {
}) user_id: this.$store.state.user.id,
if (pt_from.user_id_pt === '') { user_id_pt: pt_from.user_id_pt,
that.$message({ use_content: JSON.stringify(datalist),
type: 'info', }
message: '请选择陪同人' add_apply(stringify(data)).then(rsp => {
}) console.log("rsp>>", rsp)
} else { if (rsp.status == 0) {
const data = { this.dialogTableClose()
user_id: this.$store.state.user.id, //
user_id_pt: pt_from.user_id_pt, this.$refs.multipleTable.clearSelection();
use_content: JSON.stringify(datalist) that.checkList = []
} this.get_apply()
add_apply(stringify(data)).then(rsp => { }
console.log('rsp>>', rsp) })
if (rsp.status == 0) {
this.dialogTableClose()
//
this.$refs.multipleTable.clearSelection()
that.checkList = []
this.get_apply()
} }
}) }
} })
}, },
// //
pageChange(page) { pageChange(page) {

@ -25,9 +25,11 @@
<el-table-column prop="english_name" show-overflow-tooltip label="英文名称" align="center" /> <el-table-column prop="english_name" show-overflow-tooltip label="英文名称" align="center" />
<el-table-column prop="cas_number" show-overflow-tooltip label="药剂cas码" align="center" /> <el-table-column prop="cas_number" show-overflow-tooltip label="药剂cas码" align="center" />
<el-table-column prop="purity" label="纯度" align="center" /> <el-table-column prop="purity" label="纯度" align="center" />
<el-table-column prop="density" label="密度(g/cm³)" align="center" />
<el-table-column prop="total" label="总量" align="center" /> <el-table-column prop="total" label="总量" align="center" />
<el-table-column prop="net_weight_unit" label="净含量单位" align="center" /> <el-table-column prop="net_weight_unit" label="净含量单位" align="center" />
<el-table-column prop="net_weight" label="净含量" align="center" /> <el-table-column prop="net_weight" label="净含量" align="center" />
<el-table-column prop="remark5" label="有效期年份" align="center" />
<el-table-column prop="inventory_warning_value" label="库存预警量" align="center" /> <el-table-column prop="inventory_warning_value" label="库存预警量" align="center" />
<el-table-column prop="shelf_life_warning_value" label="保质期到期提前预警天数" align="center" /> <el-table-column prop="shelf_life_warning_value" label="保质期到期提前预警天数" align="center" />
<el-table-column prop="use_days_warning_value" label="领用超期预警天数" align="center" /> <el-table-column prop="use_days_warning_value" label="领用超期预警天数" align="center" />
@ -78,6 +80,18 @@
<el-input v-model="formData.purity" placeholder="请输入纯度" clearable :style="{width: '100%'}" /> <el-input v-model="formData.purity" placeholder="请输入纯度" clearable :style="{width: '100%'}" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12">
<el-form-item label="密度" prop="density">
<el-input v-model="formData.density" placeholder="请输入密度" clearable :style="{width: '100%'}" >
<template slot="append">g/cm<sup>3</sup></template>
</el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="有效期年份" prop="remark5">
<el-input v-model="formData.remark5" placeholder="请输入有效期年份" clearable :style="{width: '100%'}" />
</el-form-item>
</el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="总量" prop="total" hidden> <el-form-item label="总量" prop="total" hidden>
<el-input v-model="formData.total" placeholder="请输入总量" clearable :style="{width: '100%'}" /> <el-input v-model="formData.total" placeholder="请输入总量" clearable :style="{width: '100%'}" />
@ -183,6 +197,7 @@ export default {
message: '请输入纯度', message: '请输入纯度',
trigger: 'blur' trigger: 'blur'
}], }],
density: [],
total: [{ total: [{
required: false, required: false,
message: '请输入总量', message: '请输入总量',
@ -206,7 +221,8 @@ export default {
empty_count: [], empty_count: [],
use_count: [], use_count: [],
normal_count: [], normal_count: [],
total_count: [] total_count: [],
remark5:[],
}, },
dialogVisible: false, dialogVisible: false,
dialogTitile: '' dialogTitile: ''
@ -244,9 +260,14 @@ export default {
}).finally(() => { this.loadingReagent = false }) }).finally(() => { this.loadingReagent = false })
}, },
handleFormEdit(row) { handleFormEdit(row) {
this.dialogTitile = '编辑试剂品类信息' if(this.$store.state.user.role_name.indexOf("管理员") !== -1){
this.formData = { ...row } this.dialogTitile = '编辑试剂品类信息'
this.dialogVisible = true this.formData = { ...row }
this.dialogVisible = true
} else {
this.$message.error("分类编辑只有管理员可以编辑!")
}
}, },
// //
handleSelectionChange(val) { handleSelectionChange(val) {

@ -90,9 +90,19 @@
<!-- <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-button type="warning" @click="handleSetEmpty"></el-button> <el-button type="warning" @click="handleSetEmpty"></el-button>
</div> </div>
<div>
<el-input v-model="inputWeigh" placeholder="手动输入" slot="append" style="width: 50%">
<template slot="append">
<el-select style="width: 50px" v-model="select_unit" slot="prepend" placeholder="请选择单位" >
<el-option label="g" value="g"></el-option>
<el-option label="ml" value="ml"></el-option>
</el-select>
</template>
</el-input>
</div>
</div> </div>
</div> </div>
<div class="bottom"> <div class="bottom">
@ -149,7 +159,7 @@
<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, calculate_volume_weight } from '@/api/reagent/receivingReturn'
import { import {
get_check_last_drug, get_check_last_drug,
} from '@/api/reagent/createapply' } from '@/api/reagent/createapply'
@ -180,7 +190,8 @@ export default {
surplusWeigh: '', surplusWeigh: '',
dialogVisible: false, dialogVisible: false,
place: null, place: null,
is_wait:true is_wait:true,
select_unit: ""
} }
}, },
computed: { computed: {
@ -228,7 +239,7 @@ export default {
this.is_wait =false this.is_wait =false
this.getDrugInfo(this.barCode) this.getDrugInfo(this.barCode)
if (this.$route.name.indexOf('Receiving') !== -1) { if (this.$route.name.indexOf('Receiving') !== -1) {
// //
that.$prompt('领用用途说明', '提示', { that.$prompt('领用用途说明', '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
@ -247,18 +258,18 @@ export default {
} }
}) })
}) })
}else{ }else{
that.$message({ that.$message({
type: 'info', type: 'info',
message: '请输入用途说明' message: '请输入用途说明'
}); });
} }
}).catch(() => { }).catch(() => {
that.$message({ that.$message({
type: 'info', type: 'info',
message: '取消输入' message: '取消输入'
}); });
}).finally(() =>{ }).finally(() =>{
this.is_wait =true this.is_wait =true
}) })
@ -366,7 +377,7 @@ export default {
} }
set_drug_empty_bottle(stringify(data)).then(res => { set_drug_empty_bottle(stringify(data)).then(res => {
this.$message.success(res.msg) this.$message.success(res.msg)
// //
if (this.$route.name === 'standardSendBack'){ if (this.$route.name === 'standardSendBack'){
const h = this.$createElement; const h = this.$createElement;
var msg = "" var msg = ""
@ -387,14 +398,15 @@ export default {
this.$message.warning('请选择试剂!') this.$message.warning('请选择试剂!')
} }
}, },
updateDrugRemain() { async updateDrugRemain() {
if (this.infoData.medicament_id) { if (this.infoData.medicament_id) {
const w = this.checkInputWeigh() var weight = await this.check_volume_weight()
const data = { const data = {
'bar_code': this.infoData.bar_code, 'bar_code': this.infoData.bar_code,
'medicament_id': this.infoData.medicament_id, 'medicament_id': this.infoData.medicament_id,
'remain': w ? parseFloat(this.inputWeigh).toFixed(2) : this.surplusWeigh 'remain': weight
} }
// //
if (this.$route.name == "standardReceiving"){ if (this.$route.name == "standardReceiving"){
update_drug_remain(stringify(data)).then(res => { update_drug_remain(stringify(data)).then(res => {
@ -407,28 +419,52 @@ export default {
this.dialogVisible = false this.dialogVisible = false
this.$message.success('归还成功!') this.$message.success('归还成功!')
// //
if (this.$route.name === 'standardSendBack'){ const h = this.$createElement;
const h = this.$createElement; var msg = ""
var msg = "" if (res.data.is_liquid){
if (res.data.is_liquid){ msg += `用量:${res.data.use_quality}, 液体 体积用量:${res.data.use_volume} ${res.data.net_weight_unit}`
msg += `用量:${res.data.use_quality}, 液体 体积用量:${res.data.use_volum} ${res.data.net_weight_unit}` } else {
} else { msg += `当次用量:${res.data.use_quality} ${res.data.net_weight_unit}`
msg += `当次用量:${res.data.use_quality} ${res.data.net_weight_unit}`
}
this.$notify({
title: '本次使用用量',
message: h('i', { style: 'color: teal'}, msg)
});
} }
this.$notify({
title: '本次使用用量',
message: h('i', { style: 'color: teal'}, msg)
});
}) })
} }
} else { } else {
this.$message.warning('请选择试剂!') this.$message.warning('请选择试剂!')
} }
},
//
check_volume_weight(){
return new Promise((resolve, reject) => {
const w = this.checkInputWeigh()
if (this.inputWeigh && this.select_unit == "ml") {
const data = {
"variety_id": this.infoData.variety_id,
'input_volume': parseFloat(this.inputWeigh).toFixed(2)
}
calculate_volume_weight(stringify(data)).then(res => {
if (res.status == 0){
resolve(res.data.weight)
} else {
this.$message.error(res.msg)
reject(res.msg)
}
})
} else {
resolve(w ? parseFloat(this.inputWeigh).toFixed(2) : this.surplusWeigh)
}
})
} }
} }
} }
</script> </script>

@ -45,6 +45,9 @@
<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>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" property="is_packing" label="包装是否完好" :formatter="formatInfo" />
<el-table-column align="center" property="is_label" label="标签是否清晰" :formatter="formatInfo"/>
<el-table-column align="center" property="is_aspect" label="外观是否符合要求" :formatter="formatInfo"/>
<el-table-column align="center" property="by_user_name" label="最后使用人" /> <el-table-column align="center" property="by_user_name" label="最后使用人" />
<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">
@ -137,6 +140,10 @@ export default {
}).finally(() => { }).finally(() => {
this.loadingReagent = false this.loadingReagent = false
}) })
},
//
formatInfo(row, column) {
return row[column.property] == 1 ? "是" : "否"
} }
} }
} }

Loading…
Cancel
Save