|
|
@@ -9,7 +9,7 @@
|
|
|
|
|
|
<template>
|
|
|
<div>
|
|
|
- <el-card style="min-height: calc(100vh - 92px);">
|
|
|
+ <el-card style="height: calc(1000vh - 92px);">
|
|
|
<div slot="header" style="height: 20px;">
|
|
|
<span style="float: left;">
|
|
|
<i class="icon icon-table2"></i>
|
|
|
@@ -144,7 +144,7 @@
|
|
|
<legend style="color:#436EEE"></legend>
|
|
|
<i class="icon icon-paragraph-justify">样本信息</i>
|
|
|
<span style="float: right;">
|
|
|
- <el-button type="primary" class="el-button--mini" @click="EquipmentlistShow" :disabled="SampleRKform.ApplyStatus != 0">样本存储</el-button>
|
|
|
+ <el-button type="primary" class="el-button--mini" @click="EquipmentlistShow" :disabled="SampleRKform.ApplyStatus != 0">样本存储AAAAAA</el-button>
|
|
|
</span>
|
|
|
</div>
|
|
|
<el-table :data="SamplesList" border style="width: 100%" @selection-change="handleSelectionChange">
|
|
|
@@ -175,7 +175,7 @@
|
|
|
</el-card>
|
|
|
|
|
|
<!-- 获取容器列表 -->
|
|
|
- <el-dialog title="样本存储" :visible.sync="Equipmentdialog">
|
|
|
+ <el-dialog title="样本存储BBB" :visible.sync="Equipmentdialog">
|
|
|
<el-form :model="equipmentForm" :rules="storarules" ref="equipmentForm">
|
|
|
<el-form-item label="选择存储容器" prop="EquipmentId" required label-width="120px">
|
|
|
<el-select v-model="equipmentForm.EquipmentId" placeholder="请选择存储容器" style="width:100%">
|
|
|
@@ -241,9 +241,10 @@
|
|
|
export default {
|
|
|
name: 'materialdetect',
|
|
|
components: {},
|
|
|
- components: {},
|
|
|
- data() {
|
|
|
+ data () {
|
|
|
var checksampletype = (rule, value, callback) => {
|
|
|
+ console.log(rule, value, callback)
|
|
|
+ console.log('ccccccccccccccccc')
|
|
|
if (!value) {
|
|
|
callback(new Error('请选择存储容器'))
|
|
|
} else {
|
|
|
@@ -265,22 +266,22 @@
|
|
|
}
|
|
|
}
|
|
|
return {
|
|
|
- pagetitle: '', //面包屑标题
|
|
|
- service_flag: '', //页面新增或编辑标志位
|
|
|
+ pagetitle: '', // 面包屑标题
|
|
|
+ service_flag: '', // 页面新增或编辑标志位
|
|
|
CurrentItemCount: 0, // 当前页显示数量
|
|
|
CurrentPage: 1, // 当前页
|
|
|
Size: 10,
|
|
|
currentItemCount: 0, // 当前页显示数量
|
|
|
currentPage: 1, // 当前页
|
|
|
size: 10,
|
|
|
- SamplesList: [], //选择样本列表
|
|
|
+ SamplesList: [], // 选择样本列表
|
|
|
equipmentList: [],
|
|
|
selectSamples: [],
|
|
|
SampleRKform: {
|
|
|
EntryNo: '',
|
|
|
OperationBy: '',
|
|
|
- ConUserId: '', //负责人ID
|
|
|
- ConUserBy: '', //负责人
|
|
|
+ ConUserId: '', // 负责人ID
|
|
|
+ ConUserBy: '', // 负责人
|
|
|
EntryTime: new Date(),
|
|
|
ConTime: new Date(),
|
|
|
ApplyStatus: 0,
|
|
|
@@ -299,7 +300,7 @@
|
|
|
applyForm: {},
|
|
|
sampletypelist: [],
|
|
|
equipmentForm: {
|
|
|
- EquipmentId: '',
|
|
|
+ EquipmentId: ''
|
|
|
},
|
|
|
storarules: {
|
|
|
EquipmentId: [{
|
|
|
@@ -307,10 +308,10 @@
|
|
|
trigger: 'blur'
|
|
|
}]
|
|
|
},
|
|
|
- batchstorages: [], //批量存储的样本
|
|
|
+ batchstorages: [], // 批量存储的样本
|
|
|
auditorShow: false,
|
|
|
ParentId: 0,
|
|
|
- authorSamples: [], //要审核的样本列表
|
|
|
+ authorSamples: [], // 要审核的样本列表
|
|
|
shenheForm: {
|
|
|
SuccessStatus: 0,
|
|
|
AuditorRemark: ''
|
|
|
@@ -320,32 +321,32 @@
|
|
|
password: '',
|
|
|
isLoginSucceed: false,
|
|
|
acceptUsers: [],
|
|
|
- Getter: '', //接收人
|
|
|
- GetterName: '', //接收人
|
|
|
+ Getter: '', // 接收人
|
|
|
+ GetterName: '', // 接收人
|
|
|
samplesdetail: [],
|
|
|
- selectcollection_flag: 0, //采集单选择按钮标志位,0:不可用;1:可用
|
|
|
+ selectcollection_flag: 0, // 采集单选择按钮标志位,0:不可用;1:可用
|
|
|
CreateOn: [],
|
|
|
- samplecodelist: [], //样本编码
|
|
|
+ samplecodelist: [], // 样本编码
|
|
|
sampletypes: [], // 样本类型
|
|
|
ServiceId: 0,
|
|
|
permissionscode: {
|
|
|
rkadd: 'biobank.sampleRK.add',
|
|
|
rkedit: 'biobank.sampleRK.edit',
|
|
|
- rkapprove: 'biobank.sampleRK.approve',
|
|
|
+ rkapprove: 'biobank.sampleRK.approve'
|
|
|
},
|
|
|
permissions: {
|
|
|
'biobank.sampleRK.add': false,
|
|
|
'biobank.sampleRK.edit': false,
|
|
|
- 'biobank.sampleRK.approve': false,
|
|
|
- },
|
|
|
+ 'biobank.sampleRK.approve': false
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
- created() {
|
|
|
+ created () {
|
|
|
let _this = this
|
|
|
if (_this.$route.query.samplecodelist) {
|
|
|
_this.samplecodelist = this.$route.query.samplecodelist
|
|
|
}
|
|
|
- _this.ServiceId = _this.$route.params.opera //主单id
|
|
|
+ _this.ServiceId = _this.$route.params.opera // 主单id
|
|
|
// _this.filehost = process.env.imgserverhost
|
|
|
if (_this.ServiceId && _this.ServiceId == 'addRK') {
|
|
|
_this.pagetitle = '新增样本入库'
|
|
|
@@ -360,7 +361,7 @@
|
|
|
}
|
|
|
_this.getEntryNo()
|
|
|
_this.getuserlist()
|
|
|
- _this.getsamplelist() //获取样本列表
|
|
|
+ _this.getsamplelist() // 获取样本列表
|
|
|
_this.getuserlist()
|
|
|
_this.getEquiplist()
|
|
|
_this.getPermissions()
|
|
|
@@ -371,14 +372,14 @@
|
|
|
})
|
|
|
},
|
|
|
methods: {
|
|
|
- getApplyInfo() {
|
|
|
+ getApplyInfo () {
|
|
|
let _this = this // request
|
|
|
let params = {
|
|
|
Id: this.ServiceId
|
|
|
}
|
|
|
_this.$axios.get('/samplesapply/getapplyinfo', {
|
|
|
- params
|
|
|
- })
|
|
|
+ params
|
|
|
+ })
|
|
|
.then(res => {
|
|
|
_this.SampleRKform = res.data.items
|
|
|
if (_this.SampleRKform.ApplyStatus == 0) {
|
|
|
@@ -402,27 +403,27 @@
|
|
|
console.error(err)
|
|
|
})
|
|
|
},
|
|
|
- //获取样本信息
|
|
|
- getdetaillist() {
|
|
|
+ // 获取样本信息
|
|
|
+ getdetaillist () {
|
|
|
let _this = this // request
|
|
|
let params = {
|
|
|
ParentId: this.ServiceId,
|
|
|
_currentPage: this.CurrentPage,
|
|
|
- _size: this.Size,
|
|
|
+ _size: this.Size
|
|
|
}
|
|
|
- _this.$axios.get("/samplesapply/applydetaillist", {
|
|
|
- params
|
|
|
- })
|
|
|
+ _this.$axios.get('/samplesapply/applydetaillist', {
|
|
|
+ params
|
|
|
+ })
|
|
|
.then(res => {
|
|
|
_this.ApplyList = res.data.items
|
|
|
_this.CurrentItemCount = res.data.currentItemCount
|
|
|
})
|
|
|
.catch(function (error) {
|
|
|
- console.log(error);
|
|
|
- });
|
|
|
+ console.log(error)
|
|
|
+ })
|
|
|
},
|
|
|
- //自动生成单品交付单编号
|
|
|
- getEntryNo() {
|
|
|
+ // 自动生成单品交付单编号
|
|
|
+ getEntryNo () {
|
|
|
let _this = this
|
|
|
if (_this.SampleRKform.EntryNo == '') {
|
|
|
_this.$axios.get('orderadd/getOrderNumgene')
|
|
|
@@ -431,39 +432,45 @@
|
|
|
})
|
|
|
}
|
|
|
},
|
|
|
- //获取样本信息
|
|
|
- getsamplelist() {
|
|
|
+ // 获取样本信息
|
|
|
+ getsamplelist () {
|
|
|
let _this = this // request
|
|
|
let params = {
|
|
|
_currentPage: this.currentPage,
|
|
|
- _size: this.size,
|
|
|
+ _size: this.size
|
|
|
}
|
|
|
- if (_this.samplecodelist == "") {
|
|
|
- _this.$axios.get("/samplepreinput/list", {
|
|
|
- params
|
|
|
- })
|
|
|
+ if (_this.samplecodelist.length === 0) {
|
|
|
+ console.log('samplecodelist.length === 0')
|
|
|
+ _this.$axios.get('/samplepreinput/list', {
|
|
|
+ params
|
|
|
+ })
|
|
|
.then(res => {
|
|
|
_this.SamplesList = res.data.items
|
|
|
_this.currentItemCount = res.data.currentItemCount
|
|
|
+ console.log('samplecodelist.length === 0')
|
|
|
+ console.log(_this.SamplesList)
|
|
|
+ console.log(_this.currentItemCount)
|
|
|
})
|
|
|
.catch(function (error) {
|
|
|
- console.log(error);
|
|
|
- });
|
|
|
+ console.log(error)
|
|
|
+ })
|
|
|
} else {
|
|
|
+ console.log(_this.SamplesList)
|
|
|
+ console.log('else')
|
|
|
_this.$axios.get('samplesubpackage/subpackagelist/' + _this.samplecodelist, {
|
|
|
- params
|
|
|
- })
|
|
|
+ params
|
|
|
+ })
|
|
|
.then(res => {
|
|
|
_this.SamplesList = res.data.items
|
|
|
_this.currentItemCount = res.data.currentItemCount
|
|
|
})
|
|
|
.catch(function (error) {
|
|
|
- console.log(error);
|
|
|
- });
|
|
|
+ console.log(error)
|
|
|
+ })
|
|
|
}
|
|
|
},
|
|
|
// 获取容器列表
|
|
|
- getEquiplist() {
|
|
|
+ getEquiplist () {
|
|
|
let _this = this
|
|
|
_this.$axios.get('/equipment/elist', {})
|
|
|
.then(res => {
|
|
|
@@ -479,9 +486,12 @@
|
|
|
console.error(err)
|
|
|
})
|
|
|
},
|
|
|
+
|
|
|
// 打开容器弹窗 选择存储位置
|
|
|
- EquipmentlistShow() {
|
|
|
+ EquipmentlistShow () {
|
|
|
let _this = this
|
|
|
+ console.log('_this.service_flag')
|
|
|
+ console.log(_this.service_flag)
|
|
|
if (_this.selectSamples.length < 1) {
|
|
|
_this.$message({
|
|
|
type: 'warning',
|
|
|
@@ -489,19 +499,21 @@
|
|
|
})
|
|
|
return
|
|
|
}
|
|
|
- if (_this.service_flag == 'editRK') {
|
|
|
+ if (_this.service_flag === 'editRK') {
|
|
|
_this.SampleRKform.ConUserBy = _this.$refs.reflrrselect.selectedLabel
|
|
|
}
|
|
|
- //拼接样本与主申请单信息
|
|
|
+ // 拼接样本与主申请单信息
|
|
|
for (var i = 0; i < _this.selectSamples.length; i++) {
|
|
|
_this.selectSamples[i] = Object.assign(_this.selectSamples[i], _this.SampleRKform)
|
|
|
}
|
|
|
_this.Equipmentdialog = true
|
|
|
},
|
|
|
- chooseEquip() {
|
|
|
+ chooseEquip () {
|
|
|
this.$refs['equipmentForm'].validate((valid) => {
|
|
|
if (valid) {
|
|
|
store.set('batchstorages', this.selectSamples)
|
|
|
+ console.log('cccccccccc')
|
|
|
+ console.log(this.equipmentForm.EquipmentId)
|
|
|
this.$router.push({
|
|
|
path: `/equipment/${this.equipmentForm.EquipmentId}/manage_new?batchitem=1&desc='样本入库'&apply=1`
|
|
|
})
|
|
|
@@ -528,13 +540,13 @@
|
|
|
// }
|
|
|
// _this.auditorShow = true
|
|
|
// },
|
|
|
- auditor() {
|
|
|
+ auditor () {
|
|
|
let _this = this
|
|
|
- _this.$confirm("确定审核该入库申请单?审核后所有信息将不可修改!", "提示", {
|
|
|
- confirmButtonText: "确定",
|
|
|
- cancelButtonText: "取消",
|
|
|
- type: "warning"
|
|
|
- })
|
|
|
+ _this.$confirm('确定审核该入库申请单?审核后所有信息将不可修改!', '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ })
|
|
|
.then(() => {
|
|
|
if (_this.shenheForm.SuccessStatus == 1) {
|
|
|
_this.SampleRKform.ApplyStatus = 3
|
|
|
@@ -548,7 +560,7 @@
|
|
|
})
|
|
|
.catch(() => {})
|
|
|
},
|
|
|
- saveauditor() {
|
|
|
+ saveauditor () {
|
|
|
let _this = this
|
|
|
let params = _this.SampleRKform
|
|
|
_this.$axios.put('/samplesapply/auditorrk/' + _this.ServiceId, params)
|
|
|
@@ -604,7 +616,7 @@
|
|
|
// authorSelectionChange(val) {
|
|
|
// this.authorSamples = val
|
|
|
// },
|
|
|
- getuserlist() {
|
|
|
+ getuserlist () {
|
|
|
this.$axios.get('users/list', {})
|
|
|
.then(res => {
|
|
|
// response
|
|
|
@@ -623,33 +635,33 @@
|
|
|
console.error(err)
|
|
|
})
|
|
|
},
|
|
|
- numtoupchar(num) {
|
|
|
- return String.fromCharCode(64 + parseInt(num));
|
|
|
+ numtoupchar (num) {
|
|
|
+ return String.fromCharCode(64 + parseInt(num))
|
|
|
},
|
|
|
- postiontoupchar(postion) {
|
|
|
- let pos = postion.split(";");
|
|
|
+ postiontoupchar (postion) {
|
|
|
+ let pos = postion.split(';')
|
|
|
if (pos.length === 2) {
|
|
|
- return this.numtoupchar(pos[1]) + pos[0];
|
|
|
+ return this.numtoupchar(pos[1]) + pos[0]
|
|
|
} else {
|
|
|
- return postion;
|
|
|
+ return postion
|
|
|
}
|
|
|
},
|
|
|
- //获取权限
|
|
|
- getPermissions() {
|
|
|
+ // 获取权限
|
|
|
+ getPermissions () {
|
|
|
let _this = this
|
|
|
// request
|
|
|
let params = {
|
|
|
percodes: `'${this.permissionscode.rkadd}','${this.permissionscode.rkedit}','${this.permissionscode.rkapprove}'`
|
|
|
}
|
|
|
this.$axios.get('/permissions/isauths', {
|
|
|
- params
|
|
|
- })
|
|
|
+ params
|
|
|
+ })
|
|
|
.then(res => {
|
|
|
if (res.data instanceof Array && res.data.length > 0) {
|
|
|
console.log(res.data)
|
|
|
res.data.forEach(element => {
|
|
|
_this.permissions[element.Code] = element.Isperm
|
|
|
- });
|
|
|
+ })
|
|
|
}
|
|
|
})
|
|
|
.catch(err => {
|
|
|
@@ -657,18 +669,18 @@
|
|
|
console.error(err)
|
|
|
})
|
|
|
},
|
|
|
- handleSelectionChange(val) {
|
|
|
+ handleSelectionChange (val) {
|
|
|
this.selectSamples = val
|
|
|
},
|
|
|
- contains(strs, str) {
|
|
|
+ contains (strs, str) {
|
|
|
let arrs = strs.split(',')
|
|
|
for (let v in arrs) {
|
|
|
if (arrs[v] === (str + '')) return true
|
|
|
}
|
|
|
return false
|
|
|
},
|
|
|
- //登陆
|
|
|
- selectGetter() {
|
|
|
+ // 登陆
|
|
|
+ selectGetter () {
|
|
|
if (this.Getter != this.authUser.Profile.Id) {
|
|
|
this.loginDialogVisible = true
|
|
|
}
|
|
|
@@ -678,7 +690,7 @@
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
- cancelLogin() {
|
|
|
+ cancelLogin () {
|
|
|
if (this.isLoginSucceed) {
|
|
|
this.isLoginSucceed = false
|
|
|
} else {
|
|
|
@@ -686,13 +698,13 @@
|
|
|
}
|
|
|
this.loginDialogVisible = false
|
|
|
},
|
|
|
- confirmLogin() {
|
|
|
+ confirmLogin () {
|
|
|
let _this = this
|
|
|
let fields = {
|
|
|
username: this.username,
|
|
|
- password: this.password,
|
|
|
+ password: this.password
|
|
|
}
|
|
|
- this.$axios.post("/users/checkUserPwd?RealName=" + this.GetterName, fields)
|
|
|
+ this.$axios.post('/users/checkUserPwd?RealName=' + this.GetterName, fields)
|
|
|
.then(res => {
|
|
|
if (res.data.code == 0) {
|
|
|
_this.loginDialogVisible = false
|
|
|
@@ -710,27 +722,26 @@
|
|
|
console.error(err)
|
|
|
})
|
|
|
},
|
|
|
- HandleCurrentChange(value) {
|
|
|
+ HandleCurrentChange (value) {
|
|
|
this.CurrentPage = value
|
|
|
this.getdetaillist()
|
|
|
},
|
|
|
- HandleSizeChange(value) {
|
|
|
+ HandleSizeChange (value) {
|
|
|
this.Size = value
|
|
|
this.CurrentPage = 1
|
|
|
this.getdetaillist()
|
|
|
},
|
|
|
- handleCurrentChange(value) {
|
|
|
+ handleCurrentChange (value) {
|
|
|
this.currentPage = value
|
|
|
this.getsamplelist()
|
|
|
},
|
|
|
- handleSizeChange(value) {
|
|
|
+ handleSizeChange (value) {
|
|
|
this.size = value
|
|
|
this.currentPage = 1
|
|
|
this.getsamplelist()
|
|
|
- },
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss">
|