|
|
@ -276,7 +276,8 @@ export default {
|
|
|
|
{ required: true, message: '请选择陪同人', trigger: 'change' }
|
|
|
|
{ required: true, message: '请选择陪同人', trigger: 'change' }
|
|
|
|
]
|
|
|
|
]
|
|
|
|
},
|
|
|
|
},
|
|
|
|
currentItem: {}
|
|
|
|
currentItem: {},
|
|
|
|
|
|
|
|
notes_msg: "",
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
created() {
|
|
|
|
created() {
|
|
|
@ -397,44 +398,26 @@ export default {
|
|
|
|
//添加申请列表
|
|
|
|
//添加申请列表
|
|
|
|
handleClick(row) {
|
|
|
|
handleClick(row) {
|
|
|
|
var that = this
|
|
|
|
var that = this
|
|
|
|
that.$prompt('请输入领取用途', '提示', {
|
|
|
|
|
|
|
|
confirmButtonText: '确定',
|
|
|
|
|
|
|
|
cancelButtonText: '取消'
|
|
|
|
|
|
|
|
}).then(({ value }) => {
|
|
|
|
|
|
|
|
if (value) {
|
|
|
|
|
|
|
|
row.notes = value
|
|
|
|
|
|
|
|
// 检查先进先出
|
|
|
|
// 检查先进先出
|
|
|
|
get_check_last_drug(stringify(row)).then(res => {
|
|
|
|
get_check_last_drug(stringify(row)).then(res => {
|
|
|
|
this.check_last_medicament(res.data).then((check_res) => {
|
|
|
|
this.check_last_medicament(res.data).then((check_res) => {
|
|
|
|
// 继续领用当前试剂
|
|
|
|
// 继续领用当前试剂
|
|
|
|
if (check_res) {
|
|
|
|
if (check_res) {
|
|
|
|
var result = that.checkList.filter(item => item).map(item => item.bar_code)
|
|
|
|
var result = that.checkList.filter(item => item).map(item => item.bar_code);
|
|
|
|
if (result.indexOf(row.bar_code) != -1) {
|
|
|
|
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) {
|
|
|
@ -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
|
|
|
|
|
|
|
|
that.prompt_notes().then(notes_res => {
|
|
|
|
|
|
|
|
if (!notes_res){
|
|
|
|
|
|
|
|
return
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
console.log("申请理由notes_msg", this.notes_msg)
|
|
|
|
let datalist = that.checkList.map((item) => {
|
|
|
|
let datalist = that.checkList.map((item) => {
|
|
|
|
return Object.assign({}, {
|
|
|
|
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})
|
|
|
|
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()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
})
|
|
|
|
},
|
|
|
|
},
|
|
|
|
//申请页翻页
|
|
|
|
//申请页翻页
|
|
|
|
pageChange(page) {
|
|
|
|
pageChange(page) {
|
|
|
|