diff --git a/src/views/reagent/createapply/index.vue b/src/views/reagent/createapply/index.vue
index bb76048..d631042 100644
--- a/src/views/reagent/createapply/index.vue
+++ b/src/views/reagent/createapply/index.vue
@@ -276,7 +276,8 @@ export default {
{ required: true, message: '请选择陪同人', trigger: 'change' }
]
},
- currentItem: {}
+ currentItem: {},
+ notes_msg: "",
}
},
created() {
@@ -397,42 +398,24 @@ export default {
//添加申请列表
handleClick(row) {
var that = this
- that.$prompt('请输入领取用途', '提示', {
- confirmButtonText: '确定',
- cancelButtonText: '取消'
- }).then(({ value }) => {
- if (value) {
- row.notes = value
- // 检查先进先出
- get_check_last_drug(stringify(row)).then(res => {
- this.check_last_medicament(res.data).then((check_res) => {
- // 继续领用当前试剂
- if (check_res) {
- var result = that.checkList.filter(item => item).map(item => item.bar_code)
- if (result.indexOf(row.bar_code) != -1) {
- that.$message({
- type: 'info',
- message: '不可重复添加'
- })
- } 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: '取消输入'
+
+ // 检查先进先出
+ get_check_last_drug(stringify(row)).then(res => {
+ this.check_last_medicament(res.data).then((check_res) => {
+ // 继续领用当前试剂
+ if (check_res) {
+ var result = that.checkList.filter(item => item).map(item => item.bar_code);
+ if (result.indexOf(row.bar_code) != -1) {
+ that.$message({
+ type: 'info',
+ message: '不可重复添加'
+ });
+ } else {
+ that.checkList.push(row)
+ let getLocation = that.tableData.indexOf(row);
+ that.tableData.splice(getLocation, 1)
+ }
+ }
})
})
},
@@ -518,47 +501,70 @@ export default {
})
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) {
var that = this
- let datalist = that.checkList.map((item) => {
- 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 === '') {
- that.$message({
- type: 'info',
- message: '请选择陪同人'
- })
- } else {
- const data = {
- user_id: this.$store.state.user.id,
- user_id_pt: pt_from.user_id_pt,
- use_content: JSON.stringify(datalist)
- }
- add_apply(stringify(data)).then(rsp => {
- console.log('rsp>>', rsp)
- if (rsp.status == 0) {
- this.dialogTableClose()
- //清空表格多选框
- this.$refs.multipleTable.clearSelection()
- that.checkList = []
- this.get_apply()
+ that.prompt_notes().then(notes_res => {
+ if (!notes_res){
+ return
+ } else {
+ console.log("申请理由notes_msg", this.notes_msg)
+ let datalist = that.checkList.map((item) => {
+ 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})
+ })
+ if (pt_from.user_id_pt === '') {
+ that.$message({
+ type: 'info',
+ message: '请选择陪同人'
+ });
+ } else {
+ const data = {
+ user_id: this.$store.state.user.id,
+ user_id_pt: pt_from.user_id_pt,
+ use_content: JSON.stringify(datalist),
+ }
+ add_apply(stringify(data)).then(rsp => {
+ console.log("rsp>>", rsp)
+ if (rsp.status == 0) {
+ this.dialogTableClose()
+ //清空表格多选框
+ this.$refs.multipleTable.clearSelection();
+ that.checkList = []
+ this.get_apply()
+ }
+ })
}
- })
- }
+ }
+ })
},
//申请页翻页
pageChange(page) {
diff --git a/src/views/reagent/management/variety/index.vue b/src/views/reagent/management/variety/index.vue
index 2b7e235..a68a689 100644
--- a/src/views/reagent/management/variety/index.vue
+++ b/src/views/reagent/management/variety/index.vue
@@ -25,9 +25,11 @@
+
+
@@ -78,6 +80,18 @@
+
+
+
+ g/cm3
+
+
+
+
+
+
+
+
@@ -183,6 +197,7 @@ export default {
message: '请输入纯度',
trigger: 'blur'
}],
+ density: [],
total: [{
required: false,
message: '请输入总量',
@@ -206,7 +221,8 @@ export default {
empty_count: [],
use_count: [],
normal_count: [],
- total_count: []
+ total_count: [],
+ remark5:[],
},
dialogVisible: false,
dialogTitile: ''
@@ -244,9 +260,14 @@ export default {
}).finally(() => { this.loadingReagent = false })
},
handleFormEdit(row) {
- this.dialogTitile = '编辑试剂品类信息'
- this.formData = { ...row }
- this.dialogVisible = true
+ if(this.$store.state.user.role_name.indexOf("管理员") !== -1){
+ this.dialogTitile = '编辑试剂品类信息'
+ this.formData = { ...row }
+ this.dialogVisible = true
+ } else {
+ this.$message.error("分类编辑只有管理员可以编辑!")
+ }
+
},
// 用户多选
handleSelectionChange(val) {
diff --git a/src/views/reagent/receivingandreturn/index.vue b/src/views/reagent/receivingandreturn/index.vue
index 5048a7b..ec30c2e 100644
--- a/src/views/reagent/receivingandreturn/index.vue
+++ b/src/views/reagent/receivingandreturn/index.vue
@@ -407,21 +407,19 @@ export default {
this.dialogVisible = false
this.$message.success('归还成功!')
// 归还弹框提示用量
- if (this.$route.name === 'standardSendBack'){
- const h = this.$createElement;
- var msg = ""
- if (res.data.is_liquid){
- msg += `用量:${res.data.use_quality}, 液体 体积用量:${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)
- });
+ const h = this.$createElement;
+ var msg = ""
+ if (res.data.is_liquid){
+ msg += `用量:${res.data.use_quality}, 液体 体积用量:${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)
+ });
+
})
}