|
|
@@ -363,34 +363,34 @@
|
|
|
<script>
|
|
|
import _default, {
|
|
|
mapGetters
|
|
|
- } from "vuex";
|
|
|
- import axios from 'axios'
|
|
|
+ } from 'vuex'
|
|
|
+import axios from 'axios'
|
|
|
import uploadajax from '../../../../assets/js/uploadajax.js'
|
|
|
- import ChooseAnimalDialog from "../../../../components/samples/chooseanimal";
|
|
|
- export default {
|
|
|
- name: "samplespreinputadd",
|
|
|
+ import ChooseAnimalDialog from '../../../../components/samples/chooseanimal'
|
|
|
+export default {
|
|
|
+ name: 'samplespreinputadd',
|
|
|
components: {
|
|
|
ChooseAnimalDialog
|
|
|
},
|
|
|
computed: mapGetters({
|
|
|
- authUser: "authUser"
|
|
|
+ authUser: 'authUser'
|
|
|
}),
|
|
|
- data() {
|
|
|
+ data () {
|
|
|
var checkSampleType = (rule, value, callback) => {
|
|
|
- if (value === "") {
|
|
|
- callback(new Error("请选择样本类型"));
|
|
|
- return;
|
|
|
- } else {
|
|
|
- callback();
|
|
|
- }
|
|
|
- };
|
|
|
- var checkSubpackageNum = (rule, value, callback) => {
|
|
|
+ if (value === '') {
|
|
|
+ callback(new Error('请选择样本类型'))
|
|
|
+
|
|
|
+ } else {
|
|
|
+ callback()
|
|
|
+ }
|
|
|
+ }
|
|
|
+ var checkSubpackageNum = (rule, value, callback) => {
|
|
|
if (!isNaN(parseInt(value)) && !isNaN(value) && value > 0 && value < 100) {
|
|
|
- callback();
|
|
|
+ callback()
|
|
|
} else {
|
|
|
- callback(new Error("请输入正确数字值"));
|
|
|
+ callback(new Error('请输入正确数字值'))
|
|
|
}
|
|
|
- };
|
|
|
+ }
|
|
|
var checkCapacity = (rule, value, callback) => {
|
|
|
if (!isNaN(parseFloat(value)) && !isNaN(value)) {
|
|
|
if (parseFloat(value) <= 0) {
|
|
|
@@ -400,12 +400,12 @@
|
|
|
callback(new Error('样本取样量超过最大值'))
|
|
|
this.sampleform.UsedCapacity = value
|
|
|
}
|
|
|
- callback();
|
|
|
+ callback()
|
|
|
}
|
|
|
} else {
|
|
|
- callback(new Error("请输入正确数字值"));
|
|
|
+ callback(new Error('请输入正确数字值'))
|
|
|
}
|
|
|
- };
|
|
|
+ }
|
|
|
var checkUsedCapacity = (rule, value, callback) => {
|
|
|
if (!isNaN(parseFloat(value)) && !isNaN(value)) {
|
|
|
if (parseFloat(value) <= 0) {
|
|
|
@@ -415,12 +415,12 @@
|
|
|
callback(new Error('样本取样量超过最大值'))
|
|
|
this.sampleform.UsedCapacity = this.sampleform.Capacitystr
|
|
|
}
|
|
|
- callback();
|
|
|
+ callback()
|
|
|
}
|
|
|
} else {
|
|
|
- callback(new Error("请输入正确数字值"));
|
|
|
+ callback(new Error('请输入正确数字值'))
|
|
|
}
|
|
|
- };
|
|
|
+ }
|
|
|
// var checkSampleCode = (rule, value, callback) => {
|
|
|
// if (value === "") {
|
|
|
// callback(new Error("请输入样本编码"));
|
|
|
@@ -431,7 +431,7 @@
|
|
|
// };
|
|
|
|
|
|
return {
|
|
|
- title: "样本预录入添加",
|
|
|
+ title: '样本预录入添加',
|
|
|
disabledbarcode: false,
|
|
|
disabledsamplecode: false,
|
|
|
disabledsampletype: false,
|
|
|
@@ -443,7 +443,7 @@
|
|
|
diaabledyongjiu: false,
|
|
|
disabledsamplingsite: false,
|
|
|
disabledsource: false,
|
|
|
- transportdialog: false, //样本分装 操作详情(修改)
|
|
|
+ transportdialog: false, // 样本分装 操作详情(修改)
|
|
|
Isruku: false,
|
|
|
tableDataOne: [],
|
|
|
DonorsInfoId: 0,
|
|
|
@@ -452,8 +452,8 @@
|
|
|
size: 10,
|
|
|
Sam: '',
|
|
|
SampleCodeOld: '',
|
|
|
- SubpackageNum: 1, //分装份数
|
|
|
- SubpackageCapacity: '', //分装容量
|
|
|
+ SubpackageNum: 1, // 分装份数
|
|
|
+ SubpackageCapacity: '', // 分装容量
|
|
|
transportForm: {
|
|
|
InnerCode: '',
|
|
|
SubpackageCapacity: '',
|
|
|
@@ -476,15 +476,15 @@
|
|
|
Id: ''
|
|
|
},
|
|
|
sourceform: {
|
|
|
- InnerNo: "", // 来源内码
|
|
|
- Name: "", // 样本来源姓名
|
|
|
+ InnerNo: '', // 来源内码
|
|
|
+ Name: '', // 样本来源姓名
|
|
|
SourceId: 0,
|
|
|
- Genus: "",
|
|
|
+ Genus: '',
|
|
|
GenusName: '',
|
|
|
- Amount: "",
|
|
|
- Unit: "",
|
|
|
- SourceType: "",
|
|
|
- SurveyDate: new Date(),
|
|
|
+ Amount: '',
|
|
|
+ Unit: '',
|
|
|
+ SourceType: '',
|
|
|
+ SurveyDate: new Date()
|
|
|
},
|
|
|
amountuni: '',
|
|
|
Address: '',
|
|
|
@@ -504,11 +504,11 @@
|
|
|
ProjectName: '',
|
|
|
ReceiveDatedate: new Date(), // 接收日期
|
|
|
ValidityDate: '', // 有效日期
|
|
|
- DefaultCapacity: 1, //默认容量
|
|
|
+ DefaultCapacity: 1, // 默认容量
|
|
|
Capacitystr: 1, // 可用容量
|
|
|
- InitCapacity: 1, //初始容量
|
|
|
- Capacity: 1, //剩余容量
|
|
|
- UsedCapacity: 1, //取用量
|
|
|
+ InitCapacity: 1, // 初始容量
|
|
|
+ Capacity: 1, // 剩余容量
|
|
|
+ UsedCapacity: 1, // 取用量
|
|
|
Unit: ' ml', // 单位(容量)
|
|
|
ValidityDatedate: '', // 有效日期
|
|
|
InnerNo: '', // 来源内码
|
|
|
@@ -524,8 +524,8 @@
|
|
|
autoprintchecked: false,
|
|
|
CreateUserId: 0, // 录入人
|
|
|
CreateBy: '', // 录入人
|
|
|
- SubpackageNum: 1, //分装份数
|
|
|
- SubpackageCapacity: '', //分装容量
|
|
|
+ SubpackageNum: 1, // 分装份数
|
|
|
+ SubpackageCapacity: '', // 分装容量
|
|
|
IdCard: '',
|
|
|
Sex: 0,
|
|
|
Age: 20
|
|
|
@@ -537,20 +537,20 @@
|
|
|
// }],
|
|
|
SubpackageNum: [{
|
|
|
validator: checkSubpackageNum,
|
|
|
- trigger: "blur"
|
|
|
+ trigger: 'blur'
|
|
|
}],
|
|
|
SampleTypestr: [{
|
|
|
validator: checkSampleType,
|
|
|
- trigger: "change"
|
|
|
+ trigger: 'change'
|
|
|
}],
|
|
|
Capacitystr: [{
|
|
|
validator: checkCapacity,
|
|
|
- trigger: "blur"
|
|
|
+ trigger: 'blur'
|
|
|
}],
|
|
|
UsedCapacity: [{
|
|
|
validator: checkUsedCapacity,
|
|
|
- trigger: "blur"
|
|
|
- }],
|
|
|
+ trigger: 'blur'
|
|
|
+ }]
|
|
|
},
|
|
|
animalSourceVisible: false,
|
|
|
// 选项的基础资料
|
|
|
@@ -559,84 +559,84 @@
|
|
|
samplequcailist: [],
|
|
|
selectedorgan: [], // 级联所选组织结构
|
|
|
sampleorganprops: {
|
|
|
- value: "code",
|
|
|
- label: "name",
|
|
|
- children: "children"
|
|
|
+ value: 'code',
|
|
|
+ label: 'name',
|
|
|
+ children: 'children'
|
|
|
},
|
|
|
- samplecodelist: [], //样本编码
|
|
|
+ samplecodelist: [], // 样本编码
|
|
|
// organlist2: [],
|
|
|
typetykzlist: [], // 特有扩展
|
|
|
// publickzlist: [], // 公共扩展
|
|
|
userlist: [], // 录入人
|
|
|
|
|
|
- groupList: [], //合作用户分组
|
|
|
+ groupList: [], // 合作用户分组
|
|
|
GroupIdOption: [],
|
|
|
GroupId: '',
|
|
|
GroupName: '',
|
|
|
|
|
|
Tabs: '',
|
|
|
- groupnameList: [], //扩展字段分组列表
|
|
|
+ groupnameList: [], // 扩展字段分组列表
|
|
|
imageDialog: false,
|
|
|
ImageTitle: '',
|
|
|
imagefiles: '',
|
|
|
imagefilelist: [],
|
|
|
- imagenewlist: '', //删除图片时使用
|
|
|
+ imagenewlist: '', // 删除图片时使用
|
|
|
dialogImageUrl: '',
|
|
|
dialogVisible: false,
|
|
|
- acc: '',
|
|
|
- };
|
|
|
- },
|
|
|
- created() {
|
|
|
+ acc: ''
|
|
|
+ }
|
|
|
+ },
|
|
|
+ created () {
|
|
|
this.acc = this.authUser.Profile.AccCode
|
|
|
- this.getType();
|
|
|
- this.getsampetypeunit();
|
|
|
- this.getautocodedata();
|
|
|
+ this.getType()
|
|
|
+ this.getsampetypeunit()
|
|
|
+ this.getautocodedata()
|
|
|
this.getGrouplist()
|
|
|
// this.getpublickz();
|
|
|
// 获取录入人
|
|
|
- this.getuserlist();
|
|
|
- },
|
|
|
+ this.getuserlist()
|
|
|
+ },
|
|
|
methods: {
|
|
|
- getType() {
|
|
|
- let _this = this;
|
|
|
- _this.$axios.get("/sampletype/list", {}).then(res => {
|
|
|
- _this.sampletypelist = [];
|
|
|
+ getType () {
|
|
|
+ let _this = this
|
|
|
+ _this.$axios.get('/sampletype/list', {}).then(res => {
|
|
|
+ _this.sampletypelist = []
|
|
|
for (var i = 0; i < res.data.currentItemCount; i++) {
|
|
|
_this.sampletypelist.push({
|
|
|
label: res.data.items[i].Name,
|
|
|
code: res.data.items[i].Code,
|
|
|
photo: res.data.items[i].Photo,
|
|
|
- value: res.data.items[i].Id + ""
|
|
|
- });
|
|
|
+ value: res.data.items[i].Id + ''
|
|
|
+ })
|
|
|
}
|
|
|
- });
|
|
|
+ })
|
|
|
},
|
|
|
- getautocodedata() {
|
|
|
- let _this = this;
|
|
|
+ getautocodedata () {
|
|
|
+ let _this = this
|
|
|
// 获取自动编码数据
|
|
|
_this.$axios
|
|
|
- .get("/sampleoperation/getautocodedata", {})
|
|
|
+ .get('/sampleoperation/getautocodedata', {})
|
|
|
.then(res => {
|
|
|
- _this.sampleform.code_default = res.data.code_default;
|
|
|
- _this.sampleform.code_codeId = res.data.code_codeId;
|
|
|
- _this.sampleform.code_lastnum = res.data.code_lastnum;
|
|
|
+ _this.sampleform.code_default = res.data.code_default
|
|
|
+ _this.sampleform.code_codeId = res.data.code_codeId
|
|
|
+ _this.sampleform.code_lastnum = res.data.code_lastnum
|
|
|
_this.sampleform.coderule_samplingorgan_flag =
|
|
|
- res.data.coderule_samplingorgan_flag;
|
|
|
+ res.data.coderule_samplingorgan_flag
|
|
|
_this.sampleform.coderule_sampletype_flag =
|
|
|
- res.data.coderule_sampletype_flag;
|
|
|
+ res.data.coderule_sampletype_flag
|
|
|
})
|
|
|
.catch(err => {
|
|
|
- console.error(err);
|
|
|
- });
|
|
|
+ console.error(err)
|
|
|
+ })
|
|
|
},
|
|
|
- getsampetypeunit() {
|
|
|
+ getsampetypeunit () {
|
|
|
// 获取样本单位
|
|
|
- let _this = this;
|
|
|
- _this.$axios.get("/sampletype/sunitajax", {}).then(res => {
|
|
|
- _this.sampeunitlist = res.data;
|
|
|
- });
|
|
|
+ let _this = this
|
|
|
+ _this.$axios.get('/sampletype/sunitajax', {}).then(res => {
|
|
|
+ _this.sampeunitlist = res.data
|
|
|
+ })
|
|
|
},
|
|
|
- choosetype(v) {
|
|
|
+ choosetype (v) {
|
|
|
// 获取特有扩展
|
|
|
let _this = this
|
|
|
_this.groupnameList = []
|
|
|
@@ -656,11 +656,11 @@
|
|
|
}
|
|
|
_this.Tabs = _this.groupnameList[0]
|
|
|
_this.getSpecialkz(v)
|
|
|
- //_this.getCodeRule()
|
|
|
+ // _this.getCodeRule()
|
|
|
})
|
|
|
}
|
|
|
},
|
|
|
- getSpecialkz(v) {
|
|
|
+ getSpecialkz (v) {
|
|
|
// 获取特有扩展
|
|
|
let _this = this
|
|
|
if (v !== '') {
|
|
|
@@ -672,14 +672,14 @@
|
|
|
})
|
|
|
}
|
|
|
},
|
|
|
- getsampetypedata(v) {
|
|
|
+ getsampetypedata (v) {
|
|
|
// 获取样本类型数据
|
|
|
- let _this = this;
|
|
|
- _this.$axios.get("/sampletype/sampletypeajax?id=" + v, {})
|
|
|
+ let _this = this
|
|
|
+ _this.$axios.get('/sampletype/sampletypeajax?id=' + v, {})
|
|
|
.then(res => {
|
|
|
- _this.sampleform.Capacitystr = res.data.SampleType.DefaultCapacity + ""
|
|
|
+ _this.sampleform.Capacitystr = res.data.SampleType.DefaultCapacity + ''
|
|
|
_this.sampleform.UsedCapacity = res.data.SampleType.SubpackageCapacity * res.data.SampleType.SubpackageNum
|
|
|
- if (res.data.VHours === "5000-1-1 23:59:59") {
|
|
|
+ if (res.data.VHours === '5000-1-1 23:59:59') {
|
|
|
_this.sampleform.ValidityDate = new Date(res.data.VHours)
|
|
|
_this.sampleform.Isyongjiu = true
|
|
|
} else {
|
|
|
@@ -708,7 +708,7 @@
|
|
|
// _this.getautobarcode(sampletypestr, sampleselectedorgan);
|
|
|
// }
|
|
|
// }
|
|
|
- });
|
|
|
+ })
|
|
|
},
|
|
|
// getCodeRule() {
|
|
|
// this.$axios.get('/sampleoperation/getcoderule', {})
|
|
|
@@ -734,7 +734,7 @@
|
|
|
// _this.sampleform.SampleCode = res.data.barcode;
|
|
|
// });
|
|
|
// },
|
|
|
- animalDialogCallback(val) { //样本来源选择数据显示
|
|
|
+ animalDialogCallback (val) { // 样本来源选择数据显示
|
|
|
this.disabledsource = true
|
|
|
this.sourceform.SourceId = val.Id
|
|
|
this.sourceform.Genus = val.Genus
|
|
|
@@ -752,15 +752,15 @@
|
|
|
this.TimeCode = this.jstimehandle(val.SurveyDate)
|
|
|
this.getGroupCode()
|
|
|
},
|
|
|
- getGroupCode() {
|
|
|
- let _this = this;
|
|
|
+ getGroupCode () {
|
|
|
+ let _this = this
|
|
|
_this.groupcodeListv = []
|
|
|
let params = {
|
|
|
SourceId: this.sourceform.SourceId
|
|
|
}
|
|
|
- _this.$axios.get("/samplessource/getgroupcode", {
|
|
|
- params
|
|
|
- })
|
|
|
+ _this.$axios.get('/samplessource/getgroupcode', {
|
|
|
+ params
|
|
|
+ })
|
|
|
.then(res => {
|
|
|
let minvalue = res.data.items.MinValue
|
|
|
let maxvalue = res.data.items.MaxValue
|
|
|
@@ -768,18 +768,18 @@
|
|
|
_this.groupcodeList.push({
|
|
|
label: (Array(4).join(0) + i).slice(-4),
|
|
|
value: i
|
|
|
- });
|
|
|
+ })
|
|
|
}
|
|
|
_this.groupcodeList.push({
|
|
|
label: '全部',
|
|
|
value: maxvalue + 1
|
|
|
- });
|
|
|
+ })
|
|
|
})
|
|
|
.catch(err => {
|
|
|
- console.error(err);
|
|
|
- });
|
|
|
+ console.error(err)
|
|
|
+ })
|
|
|
},
|
|
|
- goback() {
|
|
|
+ goback () {
|
|
|
if (this.$route.query.size) {
|
|
|
this.$router.push({
|
|
|
name: this.$route.query.pname,
|
|
|
@@ -787,29 +787,29 @@
|
|
|
size: this.$route.query.size,
|
|
|
currentPage: this.$route.query.currentPage
|
|
|
}
|
|
|
- });
|
|
|
+ })
|
|
|
} else {
|
|
|
- this.$router.go(-1);
|
|
|
+ this.$router.go(-1)
|
|
|
}
|
|
|
},
|
|
|
- getkuozhandata() {
|
|
|
+ getkuozhandata () {
|
|
|
// 拼接扩展字段
|
|
|
- let _this = this;
|
|
|
- let jsonstr = "";
|
|
|
- // 特有扩展
|
|
|
- for (let i = 0; i < _this.typetykzlist.length; i++) {
|
|
|
+ let _this = this
|
|
|
+ let jsonstr = ''
|
|
|
+ // 特有扩展
|
|
|
+ for (let i = 0; i < _this.typetykzlist.length; i++) {
|
|
|
jsonstr +=
|
|
|
'"' +
|
|
|
_this.typetykzlist[i].FieldName +
|
|
|
'" : "' +
|
|
|
_this.typetykzlist[i].FieldDefault +
|
|
|
- '",';
|
|
|
+ '",'
|
|
|
}
|
|
|
- jsonstr = "{" + jsonstr.substring(0, jsonstr.length - 1) + "}";
|
|
|
- return jsonstr;
|
|
|
+ jsonstr = '{' + jsonstr.substring(0, jsonstr.length - 1) + '}'
|
|
|
+ return jsonstr
|
|
|
},
|
|
|
|
|
|
- savedata() {
|
|
|
+ savedata () {
|
|
|
let _this = this
|
|
|
this.$refs['samplemanageform'].validate((valid) => {
|
|
|
if (valid) {
|
|
|
@@ -829,10 +829,10 @@
|
|
|
// 转换为json对象
|
|
|
let jsonobj = JSON.parse(jsonstr)
|
|
|
// 拼接两个对象
|
|
|
- //_this.sampleform.CreateBy = _this.$refs.reflrrselect.selectedLabel
|
|
|
+ // _this.sampleform.CreateBy = _this.$refs.reflrrselect.selectedLabel
|
|
|
let params = _this.sampleform
|
|
|
params = Object.assign(params, jsonobj)
|
|
|
- //拼接群号列表
|
|
|
+ // 拼接群号列表
|
|
|
if (_this.groupcodeList) {
|
|
|
params = Object.assign(params, _this.groupcodeList)
|
|
|
}
|
|
|
@@ -858,19 +858,19 @@
|
|
|
}
|
|
|
|
|
|
if (_this.GroupIdOption.length > 0) {
|
|
|
- _this.GroupId = _this.GroupIdOption.join(',');
|
|
|
- let tempOfficers = [];
|
|
|
+ _this.GroupId = _this.GroupIdOption.join(',')
|
|
|
+ let tempOfficers = []
|
|
|
for (let idx in this.GroupIdOption) {
|
|
|
- let selectId = this.GroupIdOption[idx];
|
|
|
+ let selectId = this.GroupIdOption[idx]
|
|
|
for (let idx2 in this.groupList) {
|
|
|
- let item = this.groupList[idx2];
|
|
|
+ let item = this.groupList[idx2]
|
|
|
if (item.Id == selectId) {
|
|
|
- tempOfficers.push(item.Value);
|
|
|
- break;
|
|
|
- }
|
|
|
+ tempOfficers.push(item.Value)
|
|
|
+ break
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
- _this.GroupName = tempOfficers.join(',');
|
|
|
+ _this.GroupName = tempOfficers.join(',')
|
|
|
}
|
|
|
_this.$axios.post('samplesubpackage/subpackage?subpackagenum=' + _this.SubpackageNum +
|
|
|
'&subpackagecapacity=' +
|
|
|
@@ -882,12 +882,12 @@
|
|
|
type: 'success',
|
|
|
message: res.data.message
|
|
|
})
|
|
|
- //样本分装预览表
|
|
|
+ // 样本分装预览表
|
|
|
_this.initDonorsInfo()
|
|
|
let stype = _this.sampleform.SampleTypestr + ''
|
|
|
_this.getsampetypedata(stype)
|
|
|
if (_this.Isruku) {
|
|
|
- //传递数据到入库界面
|
|
|
+ // 传递数据到入库界面
|
|
|
this.$router.push({
|
|
|
path: '/biobank/sampleRK/addRK/operation',
|
|
|
query: {
|
|
|
@@ -904,7 +904,7 @@
|
|
|
if (res.data.item !== '') {
|
|
|
let printparams = res.data.item.split(',')
|
|
|
if (printparams.length === 3 && printparams[0] !== '' && printparams[1] !== '' && printparams[
|
|
|
- 2] !== '') {
|
|
|
+ 2] !== '') {
|
|
|
// 执行打印操作
|
|
|
window.PrintReport(printparams[1], `samplespreinput,${printparams[2]},${printparams[0]}`)
|
|
|
}
|
|
|
@@ -922,7 +922,7 @@
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
- deleteInfo(val) {
|
|
|
+ deleteInfo (val) {
|
|
|
let _this = this
|
|
|
_this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
|
|
|
confirmButtonText: '确定',
|
|
|
@@ -948,8 +948,8 @@
|
|
|
.catch(() => {})
|
|
|
}).catch(() => {})
|
|
|
},
|
|
|
- //修改列表详情
|
|
|
- subpackageedit(val) {
|
|
|
+ // 修改列表详情
|
|
|
+ subpackageedit (val) {
|
|
|
this.transportdialog = true
|
|
|
this.transportForm.IdCard = val.SourceIdCard
|
|
|
this.transportForm.Name = val.SourceName
|
|
|
@@ -960,9 +960,9 @@
|
|
|
this.transportForm.SampleSize = val.InitCapacity
|
|
|
this.transportForm.SampleUnit = val.Unit
|
|
|
this.transportForm.InnerCode = val.InnerCode
|
|
|
- this.transportForm.Id = val.Id //样本子表ID
|
|
|
+ this.transportForm.Id = val.Id // 样本子表ID
|
|
|
},
|
|
|
- changeInnerCode() {
|
|
|
+ changeInnerCode () {
|
|
|
let _this = this
|
|
|
_this.$axios.put('/samplesubpackage/editinner/' + _this.transportForm.Id, _this.transportForm)
|
|
|
.then(res => {
|
|
|
@@ -984,16 +984,16 @@
|
|
|
console.error(err)
|
|
|
})
|
|
|
},
|
|
|
- //获取样本分装预览详情列表信息
|
|
|
- initDonorsInfo() {
|
|
|
+ // 获取样本分装预览详情列表信息
|
|
|
+ initDonorsInfo () {
|
|
|
let _this = this // request
|
|
|
let params = {
|
|
|
_currentPage: _this.currentpage,
|
|
|
- _size: _this.size,
|
|
|
+ _size: _this.size
|
|
|
}
|
|
|
this.$axios.get('samplesubpackage/subpackagelist/' + _this.samplecodelist, {
|
|
|
- params
|
|
|
- })
|
|
|
+ params
|
|
|
+ })
|
|
|
.then(res => {
|
|
|
_this.tableDataOne = res.data.items
|
|
|
_this.currentItemCount = res.data.currentItemCount
|
|
|
@@ -1006,91 +1006,91 @@
|
|
|
},
|
|
|
|
|
|
// 分装取用量失去焦点事件
|
|
|
- lostFocusSubpackageCapacityUse() {
|
|
|
+ lostFocusSubpackageCapacityUse () {
|
|
|
this.sampleform.UsedCapacity = this.sampleform.SubpackageCapacity * this.sampleform.SubpackageNum
|
|
|
},
|
|
|
|
|
|
- //样本来源信息
|
|
|
- getsaveReview(formName) {
|
|
|
+ // 样本来源信息
|
|
|
+ getsaveReview (formName) {
|
|
|
let _this = this
|
|
|
let jscapacitytotal = 0.00
|
|
|
jscapacitytotal = this.sampleform.SubpackageCapacity * this.sampleform.SubpackageNum
|
|
|
let last = 0.00
|
|
|
last = _this.sampleform.UsedCapacity - jscapacitytotal
|
|
|
this.$refs[formName].validate((valid) => {
|
|
|
- if (valid) {
|
|
|
- if (_this.sampleform.Capacity < 0) {
|
|
|
- _this.$message({
|
|
|
- type: 'warning',
|
|
|
- message: '取用容量超出可用量,请调整取用容量'
|
|
|
- })
|
|
|
- return
|
|
|
- } else if (_this.sampleform.UsedCapacity - jscapacitytotal < 0) {
|
|
|
- _this.$message({
|
|
|
- type: 'warning',
|
|
|
- message: '取用容量与分装容量总和不一致,请调整分装容量'
|
|
|
- })
|
|
|
- return
|
|
|
- } else {
|
|
|
- if (_this.GroupCode == '') {
|
|
|
- _this.$message({
|
|
|
- type: 'warning',
|
|
|
- message: '请选择群号!'
|
|
|
- })
|
|
|
- return
|
|
|
- } else {
|
|
|
- _this.savedata()
|
|
|
- }
|
|
|
- }
|
|
|
+ if (valid) {
|
|
|
+ if (_this.sampleform.Capacity < 0) {
|
|
|
+ _this.$message({
|
|
|
+ type: 'warning',
|
|
|
+ message: '取用容量超出可用量,请调整取用容量'
|
|
|
+ })
|
|
|
+
|
|
|
+ } else if (_this.sampleform.UsedCapacity - jscapacitytotal < 0) {
|
|
|
+ _this.$message({
|
|
|
+ type: 'warning',
|
|
|
+ message: '取用容量与分装容量总和不一致,请调整分装容量'
|
|
|
+ })
|
|
|
+
|
|
|
+ } else {
|
|
|
+ if (_this.GroupCode == '') {
|
|
|
+ _this.$message({
|
|
|
+ type: 'warning',
|
|
|
+ message: '请选择群号!'
|
|
|
+ })
|
|
|
+ return
|
|
|
} else {
|
|
|
- return false
|
|
|
+ _this.savedata()
|
|
|
}
|
|
|
- })
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ })
|
|
|
},
|
|
|
|
|
|
- gettykzandtovalue(val) {
|
|
|
+ gettykzandtovalue (val) {
|
|
|
// 获取特有扩展并赋值
|
|
|
if (val && val.SampleType > 0) {
|
|
|
- let _this = this;
|
|
|
+ let _this = this
|
|
|
_this.$axios
|
|
|
- .get("/sampletype/gettykzzd?SampleType=" + val.SampleType, {})
|
|
|
+ .get('/sampletype/gettykzzd?SampleType=' + val.SampleType, {})
|
|
|
.then(res => {
|
|
|
- _this.typetykzlist = res.data;
|
|
|
- let foo = window;
|
|
|
- foo.typetykzsampedit = val;
|
|
|
+ _this.typetykzlist = res.data
|
|
|
+ let foo = window
|
|
|
+ foo.typetykzsampedit = val
|
|
|
// 给扩展信息赋值
|
|
|
for (let i = 0; i < this.typetykzlist.length; i++) {
|
|
|
this.typetykzlist[i].FieldDefault = foo.eval(
|
|
|
- "typetykzsampedit." + this.typetykzlist[i].FieldName
|
|
|
- );
|
|
|
+ 'typetykzsampedit.' + this.typetykzlist[i].FieldName
|
|
|
+ )
|
|
|
}
|
|
|
- });
|
|
|
+ })
|
|
|
}
|
|
|
},
|
|
|
- getuserlist() {
|
|
|
- this.$axios.get("users/list", {})
|
|
|
+ getuserlist () {
|
|
|
+ this.$axios.get('users/list', {})
|
|
|
.then(res => {
|
|
|
- this.userlist = res.data.items;
|
|
|
+ this.userlist = res.data.items
|
|
|
this.userlist.unshift({
|
|
|
Id: this.authUser.Profile.Id,
|
|
|
Realname: this.authUser.Profile.Realname
|
|
|
- });
|
|
|
- this.sampleform.CreateUserId = this.authUser.Profile.Id;
|
|
|
+ })
|
|
|
+ this.sampleform.CreateUserId = this.authUser.Profile.Id
|
|
|
})
|
|
|
.catch(err => {
|
|
|
- console.error(err);
|
|
|
- });
|
|
|
+ console.error(err)
|
|
|
+ })
|
|
|
},
|
|
|
|
|
|
- //合作用户分组处理
|
|
|
- getGroup(val) {
|
|
|
+ // 合作用户分组处理
|
|
|
+ getGroup (val) {
|
|
|
this.$axios.get('samplesgroup/groupbybarcode/' + val, {})
|
|
|
.then(res => {
|
|
|
- this.GroupIdOption = [];
|
|
|
- if (res.data.GroupId != "") {
|
|
|
- let tempArr = res.data.GroupId.split(',');
|
|
|
+ this.GroupIdOption = []
|
|
|
+ if (res.data.GroupId != '') {
|
|
|
+ let tempArr = res.data.GroupId.split(',')
|
|
|
for (let idx in tempArr) {
|
|
|
- this.GroupIdOption.push(parseInt(tempArr[idx]));
|
|
|
+ this.GroupIdOption.push(parseInt(tempArr[idx]))
|
|
|
}
|
|
|
}
|
|
|
})
|
|
|
@@ -1098,19 +1098,19 @@
|
|
|
console.error(err)
|
|
|
})
|
|
|
},
|
|
|
- getGrouplist() {
|
|
|
+ getGrouplist () {
|
|
|
let _this = this
|
|
|
_this.$axios.get('/samplesgroup/grouplist', {})
|
|
|
.then(res => {
|
|
|
_this.groupList = res.data
|
|
|
})
|
|
|
},
|
|
|
- //获取当前上传图片字段
|
|
|
- getitem(val) {
|
|
|
+ // 获取当前上传图片字段
|
|
|
+ getitem (val) {
|
|
|
this.imagefiles = ''
|
|
|
this.imagefilelist = []
|
|
|
this.ImageTitle = val.Name
|
|
|
- //显示已存储图片
|
|
|
+ // 显示已存储图片
|
|
|
if (val.FieldDefault != '') {
|
|
|
let imagearr = []
|
|
|
imagearr = val.FieldDefault.split('|')
|
|
|
@@ -1128,7 +1128,7 @@
|
|
|
this.extendId = val.Id
|
|
|
},
|
|
|
|
|
|
- beforeAvatarUpload(file) {
|
|
|
+ beforeAvatarUpload (file) {
|
|
|
const isJPG = (file.type.indexOf('image/') === 0)
|
|
|
const isLt2M = file.size / 1024 / 1024 < 10
|
|
|
if (!isJPG) {
|
|
|
@@ -1141,11 +1141,11 @@
|
|
|
}
|
|
|
return true
|
|
|
},
|
|
|
- handlePictureCardPreview(file) {
|
|
|
- this.dialogImageUrl = file.url;
|
|
|
- this.dialogVisible = true;
|
|
|
+ handlePictureCardPreview (file) {
|
|
|
+ this.dialogImageUrl = file.url
|
|
|
+ this.dialogVisible = true
|
|
|
},
|
|
|
- uploadrequest(option) {
|
|
|
+ uploadrequest (option) {
|
|
|
let _this = this
|
|
|
axios.post(process.env.upfilehost, {})
|
|
|
.then(function (res) {
|
|
|
@@ -1172,7 +1172,7 @@
|
|
|
})
|
|
|
})
|
|
|
},
|
|
|
- handleAvatarSuccess(res, file) {
|
|
|
+ handleAvatarSuccess (res, file) {
|
|
|
for (var i = 0; i < this.animalextends.length; i++) {
|
|
|
if (this.animalextends[i].Id == this.extendId) {
|
|
|
this.animalextends[i].FieldDefault = this.animalextends[i].FieldDefault +
|
|
|
@@ -1181,7 +1181,7 @@
|
|
|
}
|
|
|
this.imagefiles = ''
|
|
|
},
|
|
|
- handleRemove(file, fileList) {
|
|
|
+ handleRemove (file, fileList) {
|
|
|
for (var i = 0; i < this.imagefilelist.length; i++) {
|
|
|
if (this.imagefilelist[i].uid != file.uid) {
|
|
|
this.imagenewlist = this.imagenewlist + this.imagefilelist[i].url.substring(7, 42) + `|`
|
|
|
@@ -1194,16 +1194,16 @@
|
|
|
}
|
|
|
},
|
|
|
|
|
|
- handleCurrentChange(value) {
|
|
|
+ handleCurrentChange (value) {
|
|
|
this.currentpage = value
|
|
|
this.initDonorsInfo()
|
|
|
},
|
|
|
- handleSizeChange(value) {
|
|
|
+ handleSizeChange (value) {
|
|
|
this.size = value
|
|
|
this.currentpage = 1
|
|
|
this.initDonorsInfo()
|
|
|
},
|
|
|
- jstimehandle(val) {
|
|
|
+ jstimehandle (val) {
|
|
|
if (val === '') {
|
|
|
return '----'
|
|
|
} else if (val === '0001-01-01T08:00:00+08:00') {
|
|
|
@@ -1216,8 +1216,7 @@
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- };
|
|
|
-
|
|
|
+ }
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss">
|