新需求更改

duizhaopin_ui
tangxuan 2 years ago
parent e7622df0c0
commit dd4468d03d

@ -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) {

@ -407,21 +407,19 @@ 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_volum} ${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)
});
}) })
} }

Loading…
Cancel
Save