|
@@ -1,38 +1,144 @@
|
|
|
<template>
|
|
<template>
|
|
|
- <z-paging class="" ref="paging" bgColor="#fff" paging-class="paging-btm-shadow" safe-area-inset-bottom scroll-with-animation>
|
|
|
|
|
|
|
+ <z-paging class="" ref="paging" bgColor="#fff" paging-class="paging-btm-shadow" safe-area-inset-bottom
|
|
|
|
|
+ scroll-with-animation>
|
|
|
<template #top>
|
|
<template #top>
|
|
|
<ut-navbar :title="did ? '编辑种源入库信息' : '添加种源入库信息'" :fixed="false" border></ut-navbar>
|
|
<ut-navbar :title="did ? '编辑种源入库信息' : '添加种源入库信息'" :fixed="false" border></ut-navbar>
|
|
|
</template>
|
|
</template>
|
|
|
<view class="pd-24">
|
|
<view class="pd-24">
|
|
|
<up-form class="p-rtv" labelPosition="top" :model="form" :rules="rules" labelWidth="auto" ref="upFormRef">
|
|
<up-form class="p-rtv" labelPosition="top" :model="form" :rules="rules" labelWidth="auto" ref="upFormRef">
|
|
|
<!-- 基本信息 -->
|
|
<!-- 基本信息 -->
|
|
|
- <ut-action-sheet :tabs="pt_seed_type" mode="custom" v-model="form.seedType">
|
|
|
|
|
|
|
+ <ut-action-sheet :tabs="pt_seed_type" mode="custom" title="种源类型" v-model="form.seedType">
|
|
|
<up-form-item borderBottom label="种源类型" required prop="seedType">
|
|
<up-form-item borderBottom label="种源类型" required prop="seedType">
|
|
|
- <up-input v-model="form.seedType" placeholder="请输入种源类型" border="none" clearable></up-input>
|
|
|
|
|
|
|
+ <view v-if="form.seedType" class="f-s-30 c-333 f-w-5 flex1">{{ selectDictLabel(pt_seed_type,
|
|
|
|
|
+ form.seedType) }}</view>
|
|
|
|
|
+ <view v-else class="f-s-30 c-ccc f-w-4 flex1">请选择基地类型</view>
|
|
|
<template #right>
|
|
<template #right>
|
|
|
<up-icon size="22rpx" color="#2A6D52" name="arrow-down-fill"></up-icon>
|
|
<up-icon size="22rpx" color="#2A6D52" name="arrow-down-fill"></up-icon>
|
|
|
</template>
|
|
</template>
|
|
|
</up-form-item>
|
|
</up-form-item>
|
|
|
</ut-action-sheet>
|
|
</ut-action-sheet>
|
|
|
<up-form-item borderBottom label="物种基原" required prop="varietyId">
|
|
<up-form-item borderBottom label="物种基原" required prop="varietyId">
|
|
|
- <up-input v-model="form.varietyId" placeholder="请输入物种基原" border="none" clearable></up-input>
|
|
|
|
|
|
|
+ <view class="flex1">
|
|
|
|
|
+ <up-button v-if="!form.varietyId" @click="selectVarietyId" type="primary" plain>
|
|
|
|
|
+ <image class="w-36 h-36 mr-10" src="@/static/images/common/select_push_icon.png"
|
|
|
|
|
+ mode="widthFix" />
|
|
|
|
|
+ <span>请选择物种基原</span>
|
|
|
|
|
+ </up-button>
|
|
|
|
|
+ <view v-else class="bg-#FBFDFB card-info-block pd-24 p-rtv">
|
|
|
|
|
+ <view class="mb-16">
|
|
|
|
|
+ <span class="f-s-34 c-#333 f-w-5 mr-16">{{ form?.varietyInfo?.varietyName }}</span>
|
|
|
|
|
+ <span class="f-s-24 c-#666">{{ form?.varietyInfo?.latinName }}</span>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <view class="mb-16">
|
|
|
|
|
+ <span class="f-s-28 c-#333 f-w-5 mr-16">{{ form?.varietyInfo?.genusName }}</span>
|
|
|
|
|
+ <span class="f-s-24 c-#666">{{ form?.varietyInfo?.genusLatinName }}</span>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <view class="f-s-24 c-#666">产出:{{ form?.varietyInfo?.medicineName }}</view>
|
|
|
|
|
+ <view class="close-icon pd-16" @click="form.varietyId = ''; form.varietyInfo = null;">
|
|
|
|
|
+ <up-icon color="#F81242" name="close" size="32rpx"></up-icon>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </view>
|
|
|
</up-form-item>
|
|
</up-form-item>
|
|
|
<up-form-item borderBottom label="具体品种/品系名称" prop="seedName">
|
|
<up-form-item borderBottom label="具体品种/品系名称" prop="seedName">
|
|
|
<up-input v-model="form.seedName" placeholder="请输入具体品种/品系名称" border="none" clearable></up-input>
|
|
<up-input v-model="form.seedName" placeholder="请输入具体品种/品系名称" border="none" clearable></up-input>
|
|
|
</up-form-item>
|
|
</up-form-item>
|
|
|
- <up-form-item borderBottom label="种源来源" required prop="seedSource">
|
|
|
|
|
- <up-input v-model="form.seedSource" placeholder="请输入种源来源" border="none" clearable></up-input>
|
|
|
|
|
- </up-form-item>
|
|
|
|
|
|
|
+ <ut-action-sheet :tabs="pt_seed_source" mode="custom" title="种源来源" v-model="form.seedSource">
|
|
|
|
|
+ <up-form-item borderBottom label="种源来源" required prop="seedSource">
|
|
|
|
|
+ <view v-if="form.seedSource" class="f-s-30 c-333 f-w-5 flex1">{{ selectDictLabel(pt_seed_source,
|
|
|
|
|
+ form.seedSource) }}</view>
|
|
|
|
|
+ <view v-else class="f-s-30 c-ccc f-w-4 flex1">请选择种源来源</view>
|
|
|
|
|
+ <template #right>
|
|
|
|
|
+ <up-icon size="22rpx" color="#2A6D52" name="arrow-down-fill"></up-icon>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </up-form-item>
|
|
|
|
|
+ </ut-action-sheet>
|
|
|
|
|
+ <ut-action-sheet :tabs="pt_mother_father_flag" mode="custom" title="父母本情况"
|
|
|
|
|
+ v-model="form.motherFatherFlag">
|
|
|
|
|
+ <up-form-item borderBottom label="父母本情况" required prop="motherFatherFlag">
|
|
|
|
|
+ <view v-if="form.motherFatherFlag" class="f-s-30 c-333 f-w-5 flex1">{{
|
|
|
|
|
+ selectDictLabel(pt_mother_father_flag, form.motherFatherFlag) }}</view>
|
|
|
|
|
+ <view v-else class="f-s-30 c-ccc f-w-4 flex1">请选择父母本情况</view>
|
|
|
|
|
+ <template #right>
|
|
|
|
|
+ <up-icon size="22rpx" color="#2A6D52" name="arrow-down-fill"></up-icon>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </up-form-item>
|
|
|
|
|
+ </ut-action-sheet>
|
|
|
|
|
+ <template>
|
|
|
|
|
+ <!-- 父本品种 -->
|
|
|
|
|
+ <up-form-item borderBottom label="父本品种" prop="fatherVarietyId">
|
|
|
|
|
+ <view class="flex1">
|
|
|
|
|
+ <up-button v-if="!form.fatherVarietyId" @click="selectFatherVarietyId" type="primary" plain>
|
|
|
|
|
+ <image class="w-36 h-36 mr-10" src="@/static/images/common/select_push_icon.png"
|
|
|
|
|
+ mode="widthFix" />
|
|
|
|
|
+ <span>请选择父本品种</span>
|
|
|
|
|
+ </up-button>
|
|
|
|
|
+ <view v-else class="bg-#FBFDFB card-info-block pd-24 p-rtv">
|
|
|
|
|
+ <view class="mb-16">
|
|
|
|
|
+ <span class="f-s-34 c-#333 f-w-5 mr-16">{{ form?.fatherVarietyInfo?.varietyName
|
|
|
|
|
+ }}</span>
|
|
|
|
|
+ <span class="f-s-24 c-#666">{{ form?.fatherVarietyInfo?.latinName }}</span>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <view class="mb-16">
|
|
|
|
|
+ <span class="f-s-28 c-#333 f-w-5 mr-16">{{ form?.fatherVarietyInfo?.genusName
|
|
|
|
|
+ }}</span>
|
|
|
|
|
+ <span class="f-s-24 c-#666">{{ form?.fatherVarietyInfo?.genusLatinName }}</span>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <view class="f-s-24 c-#666">产出:{{ form?.fatherVarietyInfo?.medicineName }}</view>
|
|
|
|
|
+ <view class="close-icon pd-16"
|
|
|
|
|
+ @click="form.fatherVarietyId = ''; form.fatherVarietyInfo = null;">
|
|
|
|
|
+ <up-icon color="#F81242" name="close" size="32rpx"></up-icon>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </up-form-item>
|
|
|
|
|
+ <!-- 母本品种 -->
|
|
|
|
|
+ <up-form-item borderBottom label="母本品种" prop="motherVarietyId">
|
|
|
|
|
+ <view class="flex1">
|
|
|
|
|
+ <up-button v-if="!form.motherVarietyId" @click="selectMotherVarietyId" type="primary" plain>
|
|
|
|
|
+ <image class="w-36 h-36 mr-10" src="@/static/images/common/select_push_icon.png"
|
|
|
|
|
+ mode="widthFix" />
|
|
|
|
|
+ <span>请选择母本品种</span>
|
|
|
|
|
+ </up-button>
|
|
|
|
|
+ <view v-else class="bg-#FBFDFB card-info-block pd-24 p-rtv mt-16">
|
|
|
|
|
+ <view class="mb-16">
|
|
|
|
|
+ <span class="f-s-34 c-#333 f-w-5 mr-16">{{ form?.motherVarietyInfo?.varietyName
|
|
|
|
|
+ }}</span>
|
|
|
|
|
+ <span class="f-s-24 c-#666">{{ form?.motherVarietyInfo?.latinName }}</span>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <view class="mb-16">
|
|
|
|
|
+ <span class="f-s-28 c-#333 f-w-5 mr-16">{{ form?.motherVarietyInfo?.genusName
|
|
|
|
|
+ }}</span>
|
|
|
|
|
+ <span class="f-s-24 c-#666">{{ form?.motherVarietyInfo?.genusLatinName }}</span>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <view class="f-s-24 c-#666">产出:{{ form?.motherVarietyInfo?.medicineName }}</view>
|
|
|
|
|
+ <view class="close-icon pd-16"
|
|
|
|
|
+ @click="form.motherVarietyId = ''; form.motherVarietyInfo = null;">
|
|
|
|
|
+ <up-icon color="#F81242" name="close" size="32rpx"></up-icon>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </up-form-item>
|
|
|
|
|
+ </template>
|
|
|
<up-form-item borderBottom label="受托单位" prop="entrustId">
|
|
<up-form-item borderBottom label="受托单位" prop="entrustId">
|
|
|
<up-input v-model="form.entrustId" placeholder="请输入受托单位" border="none" clearable></up-input>
|
|
<up-input v-model="form.entrustId" placeholder="请输入受托单位" border="none" clearable></up-input>
|
|
|
</up-form-item>
|
|
</up-form-item>
|
|
|
|
|
|
|
|
<!-- 入库数量与单位 -->
|
|
<!-- 入库数量与单位 -->
|
|
|
- <up-form-item borderBottom label="入库量" prop="capacity">
|
|
|
|
|
- <up-input v-model="form.capacity" type="number" placeholder="请输入入库量" border="none" clearable></up-input>
|
|
|
|
|
- </up-form-item>
|
|
|
|
|
- <up-form-item borderBottom label="计量单位" prop="unit">
|
|
|
|
|
- <up-input v-model="form.unit" placeholder="请输入计量单位" border="none" clearable></up-input>
|
|
|
|
|
|
|
+
|
|
|
|
|
+ <up-form-item label="入库量" prop="capacity" required borderBottom>
|
|
|
|
|
+ <up-input v-model="form.capacity" placeholder="请输入入库量" border="none" clearable />
|
|
|
|
|
+ <template #right>
|
|
|
|
|
+ <view @click.stop>
|
|
|
|
|
+ <ut-action-sheet v-model="form.unit" :tabs="pt_materail_unit" mode="custom" title="选择单位">
|
|
|
|
|
+ <!-- 可点击选择单位 -->
|
|
|
|
|
+ <view class="d-flex pd-10" style="">
|
|
|
|
|
+ <span>{{ form.unit || '株' }}</span>
|
|
|
|
|
+ <up-icon size="22rpx" color="#2A6D52" name="arrow-down-fill"></up-icon>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </ut-action-sheet>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </template>
|
|
|
</up-form-item>
|
|
</up-form-item>
|
|
|
|
|
|
|
|
<!-- 检验报告与供应商信息 -->
|
|
<!-- 检验报告与供应商信息 -->
|
|
@@ -59,7 +165,7 @@
|
|
|
|
|
|
|
|
<!-- 个体标识:此处仅占位,后续可改为多选列表 -->
|
|
<!-- 个体标识:此处仅占位,后续可改为多选列表 -->
|
|
|
<up-form-item borderBottom label="是否有个体标识" prop="animalIds">
|
|
<up-form-item borderBottom label="是否有个体标识" prop="animalIds">
|
|
|
- <up-input v-model="form.animalIds" placeholder="如有个体标识,请稍后补充明细" border="none" disabled></up-input>
|
|
|
|
|
|
|
+
|
|
|
</up-form-item>
|
|
</up-form-item>
|
|
|
|
|
|
|
|
<!-- 媒体与附件 -->
|
|
<!-- 媒体与附件 -->
|
|
@@ -75,10 +181,12 @@
|
|
|
<up-input v-model="form.adcode" placeholder="请输入种源产地行政编码" border="none" clearable></up-input>
|
|
<up-input v-model="form.adcode" placeholder="请输入种源产地行政编码" border="none" clearable></up-input>
|
|
|
</up-form-item>
|
|
</up-form-item>
|
|
|
<up-form-item borderBottom label="繁殖材料" prop="generationMaterial">
|
|
<up-form-item borderBottom label="繁殖材料" prop="generationMaterial">
|
|
|
- <up-input v-model="form.generationMaterial" placeholder="请输入繁殖材料" border="none" clearable></up-input>
|
|
|
|
|
|
|
+ <up-input v-model="form.generationMaterial" placeholder="请输入繁殖材料" border="none"
|
|
|
|
|
+ clearable></up-input>
|
|
|
</up-form-item>
|
|
</up-form-item>
|
|
|
<up-form-item borderBottom label="繁殖地点/采集地点" prop="generationAdcode">
|
|
<up-form-item borderBottom label="繁殖地点/采集地点" prop="generationAdcode">
|
|
|
- <up-input v-model="form.generationAdcode" placeholder="请输入繁殖/采集地点编码或名称" border="none" clearable></up-input>
|
|
|
|
|
|
|
+ <up-input v-model="form.generationAdcode" placeholder="请输入繁殖/采集地点编码或名称" border="none"
|
|
|
|
|
+ clearable></up-input>
|
|
|
</up-form-item>
|
|
</up-form-item>
|
|
|
|
|
|
|
|
<!-- 资质证明附件(暂按上传控件处理,可后续细化) -->
|
|
<!-- 资质证明附件(暂按上传控件处理,可后续细化) -->
|
|
@@ -112,7 +220,7 @@
|
|
|
import { useClientRequest } from '@/utils/request';
|
|
import { useClientRequest } from '@/utils/request';
|
|
|
import { seedInfoListType } from '../models/type';
|
|
import { seedInfoListType } from '../models/type';
|
|
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
|
|
-const { pt_seed_type } = toRefs<any>(proxy?.useDict('pt_seed_type'));
|
|
|
|
|
|
|
+const { pt_seed_type, pt_seed_source, pt_materail_unit, pt_mother_father_flag } = toRefs<any>(proxy?.useDict('pt_seed_type', 'pt_seed_source', 'pt_materail_unit', 'pt_mother_father_flag'));
|
|
|
const paging = ref<any>(null);
|
|
const paging = ref<any>(null);
|
|
|
const upFormRef = ref<any>(null);
|
|
const upFormRef = ref<any>(null);
|
|
|
const form = ref<seedInfoListType>({
|
|
const form = ref<seedInfoListType>({
|
|
@@ -122,6 +230,7 @@ const form = ref<seedInfoListType>({
|
|
|
newSpCert: [],
|
|
newSpCert: [],
|
|
|
importCert: [],
|
|
importCert: [],
|
|
|
seedCheckCert: [],
|
|
seedCheckCert: [],
|
|
|
|
|
+ unit: '株',
|
|
|
});
|
|
});
|
|
|
const rules = reactive({});
|
|
const rules = reactive({});
|
|
|
|
|
|
|
@@ -146,10 +255,51 @@ const submitForm = async () => {
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
500,
|
|
500,
|
|
|
- true
|
|
|
|
|
|
|
+ true,
|
|
|
);
|
|
);
|
|
|
};
|
|
};
|
|
|
|
|
+// 去选择物种基原
|
|
|
|
|
+const selectVarietyId = () => {
|
|
|
|
|
+ uni.$once('updateBiologicalname', function (data) {
|
|
|
|
|
+ console.log(data);
|
|
|
|
|
|
|
|
|
|
+ form.value.varietyId = data.msg.id;
|
|
|
|
|
+ form.value.varietyInfo = data.msg;
|
|
|
|
|
+ });
|
|
|
|
|
+ uni.$u.route({
|
|
|
|
|
+ type: 'navigateTo',
|
|
|
|
|
+ url: '/tools/por-torganism/index',
|
|
|
|
|
+ params: {
|
|
|
|
|
+ title: '选择物种基原',
|
|
|
|
|
+ },
|
|
|
|
|
+ });
|
|
|
|
|
+};
|
|
|
|
|
+const selectFatherVarietyId = () => {
|
|
|
|
|
+ uni.$once('updateBiologicalname', function (data) {
|
|
|
|
|
+ form.value.fatherVarietyId = data.msg.id;
|
|
|
|
|
+ form.value.fatherVarietyInfo = data.msg;
|
|
|
|
|
+ });
|
|
|
|
|
+ uni.$u.route({
|
|
|
|
|
+ type: 'navigateTo',
|
|
|
|
|
+ url: '/tools/por-torganism/index',
|
|
|
|
|
+ params: {
|
|
|
|
|
+ title: '选择父本品种',
|
|
|
|
|
+ },
|
|
|
|
|
+ });
|
|
|
|
|
+};
|
|
|
|
|
+const selectMotherVarietyId = () => {
|
|
|
|
|
+ uni.$once('updateBiologicalname', function (data) {
|
|
|
|
|
+ form.value.motherVarietyId = data.msg.id;
|
|
|
|
|
+ form.value.motherVarietyInfo = data.msg;
|
|
|
|
|
+ });
|
|
|
|
|
+ uni.$u.route({
|
|
|
|
|
+ type: 'navigateTo',
|
|
|
|
|
+ url: '/tools/por-torganism/index',
|
|
|
|
|
+ params: {
|
|
|
|
|
+ title: '选择母本品种',
|
|
|
|
|
+ },
|
|
|
|
|
+ });
|
|
|
|
|
+};
|
|
|
const did = ref('');
|
|
const did = ref('');
|
|
|
onLoad((optins: any) => {
|
|
onLoad((optins: any) => {
|
|
|
if (optins.id) {
|
|
if (optins.id) {
|
|
@@ -159,4 +309,15 @@ onLoad((optins: any) => {
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
</script>
|
|
</script>
|
|
|
-<style lang="scss" scoped></style>
|
|
|
|
|
|
|
+<style lang="scss" scoped>
|
|
|
|
|
+.card-info-block {
|
|
|
|
|
+ border: 1rpx solid #afddbb;
|
|
|
|
|
+ border-radius: 10rpx;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+.close-icon {
|
|
|
|
|
+ position: absolute;
|
|
|
|
|
+ top: 0rpx;
|
|
|
|
|
+ right: 0rpx;
|
|
|
|
|
+}
|
|
|
|
|
+</style>
|