<template>
|
<!-- 新增母代弹窗 -->
|
<el-dialog :title="parentForm.status === 'detail' ? '母代详情' : '新增母代'" :visible.sync="addParentDialogVisible"
|
width="40%" :close-on-click-modal="false">
|
<el-form :model="parentForm" ref="parentForm" label-position="top">
|
<el-form-item label="菌种源" prop="strainSourceStart">
|
<div class="flex-row">
|
<div class="input-wrapper">
|
<el-input disabled v-model="parentForm.strainSourceStart" class="fixed-width-input"></el-input>
|
</div>
|
<span class="form-text">代—</span>
|
<div class="input-wrapper">
|
<el-input disabled v-model="parentForm.strainSourceEnd" class="fixed-width-input"></el-input>
|
</div>
|
<span class="form-text">细胞库</span>
|
</div>
|
</el-form-item>
|
<el-row :gutter="20">
|
<el-col :span="10">
|
<el-form-item label="代传菌种编号" prop="strainNo">
|
<el-input disabled v-model="parentForm.strainNo"></el-input>
|
</el-form-item>
|
</el-col>
|
<el-col :span="10">
|
<el-form-item label="代传菌种名称" prop="strainName">
|
<el-input disabled v-model="parentForm.strainName"></el-input>
|
</el-form-item>
|
</el-col>
|
</el-row>
|
<el-row v-if="parentForm.status === 'detail'" :gutter="20">
|
<el-col :span="10">
|
<el-form-item label="接种操作人签字">
|
<el-image />
|
</el-form-item>
|
</el-col>
|
<el-col :span="10">
|
<el-form-item label="菌种保藏人签字">
|
<el-image />
|
</el-form-item>
|
</el-col>
|
</el-row>
|
</el-form>
|
<div v-if="parentForm.status !== 'detail'" class="dialog-footer">
|
<el-button type="primary" @click="handleAddParent">提交</el-button>
|
</div>
|
</el-dialog>
|
</template>
|
<script>
|
export default {
|
data() {
|
return {
|
addParentDialogVisible: false,
|
parentForm: {},
|
}
|
},
|
methods: {
|
openInitData(value) {
|
this.parentForm = value
|
this.openDialog()
|
},
|
openDialog() {
|
this.addParentDialogVisible = true
|
},
|
closeDialog() {
|
this.addParentDialogVisible = false
|
},
|
handleAddParent() {
|
this.$emit('addNodeSign', this.parentForm, 1)
|
}
|
}
|
}
|
</script>
|
<style scoped lang="less">
|
.flex-row {
|
display: flex;
|
align-items: center;
|
flex-wrap: wrap;
|
|
@media (max-width: 768px) {
|
flex-direction: column;
|
align-items: flex-start;
|
width: 100%;
|
}
|
}
|
|
.input-wrapper {
|
@media (min-width: 769px) {
|
width: 290px;
|
min-width: 290px;
|
}
|
|
@media (max-width: 768px) {
|
width: 100%;
|
}
|
}
|
|
.fixed-width-input {
|
width: 100%;
|
|
@media (min-width: 769px) {
|
width: 290px !important;
|
min-width: 290px !important;
|
}
|
}
|
|
.form-text {
|
margin: 0 8px;
|
white-space: nowrap;
|
|
@media (max-width: 768px) {
|
margin: 8px 0;
|
}
|
}
|
|
.dialog-footer {
|
margin-top: 115px;
|
display: flex;
|
justify-content: center;
|
|
.el-button--primary {
|
width: 150px;
|
height: 40px;
|
background: #049C9A;
|
border-radius: 4px;
|
}
|
}
|
</style>
|