|
@@ -1,31 +1,21 @@
|
|
|
<template>
|
|
<template>
|
|
|
<z-paging class="" ref="paging" bgColor="#f7f7f7" paging-class="paging-btm-shadow" safe-area-inset-bottom scroll-with-animation>
|
|
<z-paging class="" ref="paging" bgColor="#f7f7f7" 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>
|
|
|
<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">
|
|
|
- <!-- 种源信息(复制自 info-edit 字段与顺序) -->
|
|
|
|
|
|
|
+ <!-- 鲜货信息(复制自 info-edit 字段与顺序) -->
|
|
|
<view class="pd-24">
|
|
<view class="pd-24">
|
|
|
- <view class="startline-title">种源信息</view>
|
|
|
|
|
|
|
+ <view class="startline-title">鲜货信息</view>
|
|
|
</view>
|
|
</view>
|
|
|
<view class="pd-24 bg-#fff">
|
|
<view class="pd-24 bg-#fff">
|
|
|
<!-- 基本信息 -->
|
|
<!-- 基本信息 -->
|
|
|
- <view class="h-1" id="seedTypepppp"></view>
|
|
|
|
|
- <ut-action-sheet :tabs="pt_seed_type" mode="custom" title="种源类型" v-model="form.seedType">
|
|
|
|
|
- <up-form-item borderBottom label="种源类型" required prop="seedType">
|
|
|
|
|
- <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>
|
|
|
|
|
- <up-icon size="22rpx" color="#2A6D52" name="arrow-down-fill"></up-icon>
|
|
|
|
|
- </template>
|
|
|
|
|
- </up-form-item>
|
|
|
|
|
- </ut-action-sheet>
|
|
|
|
|
<view class="h-1" id="varietyIdpppp"></view>
|
|
<view class="h-1" id="varietyIdpppp"></view>
|
|
|
- <up-form-item borderBottom label="物种基原" required prop="varietyId">
|
|
|
|
|
|
|
+ <up-form-item borderBottom label="动植物名称" required prop="varietyId">
|
|
|
<view class="flex1">
|
|
<view class="flex1">
|
|
|
<up-button v-if="!form.varietyId" @click="selectVarietyId" type="primary" plain>
|
|
<up-button v-if="!form.varietyId" @click="selectVarietyId" type="primary" plain>
|
|
|
<image class="w-36 h-36 mr-10" src="https://ta.zycpzs.cn/oss-file/smart-trace/szyy/images-plt/common/select_push_icon.png" mode="widthFix" />
|
|
<image class="w-36 h-36 mr-10" src="https://ta.zycpzs.cn/oss-file/smart-trace/szyy/images-plt/common/select_push_icon.png" mode="widthFix" />
|
|
|
- <span>请选择物种基原</span>
|
|
|
|
|
|
|
+ <span>请选择动植物名称</span>
|
|
|
</up-button>
|
|
</up-button>
|
|
|
<view v-else class="bg-#FBFDFB card-info-block pd-24 p-rtv">
|
|
<view v-else class="bg-#FBFDFB card-info-block pd-24 p-rtv">
|
|
|
<view class="mb-16">
|
|
<view class="mb-16">
|
|
@@ -49,171 +39,31 @@
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
</up-form-item>
|
|
</up-form-item>
|
|
|
- <up-form-item borderBottom label="具体品种/品系名称" prop="seedName">
|
|
|
|
|
- <up-input v-model="form.seedName" placeholder="请输入具体品种/品系名称" border="none" clearable></up-input>
|
|
|
|
|
- </up-form-item>
|
|
|
|
|
- <view class="h-1" id="seedSourcepppp"></view>
|
|
|
|
|
- <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>
|
|
|
|
|
|
|
+ <view class="h-1" id="partpppp"></view>
|
|
|
|
|
+ <SelectMedicinalPart v-model="form.part" v-model:value-name="form.partName">
|
|
|
|
|
+ <up-form-item borderBottom label="药用部位/对象" prop="part" required>
|
|
|
|
|
+ <up-input v-model="form.partName" placeholder="请选择药用部位/对象" border="none" readonly clearable></up-input>
|
|
|
|
|
+ </up-form-item>
|
|
|
|
|
+ </SelectMedicinalPart>
|
|
|
|
|
+
|
|
|
|
|
+ <view class="h-1" id="sourceTypepppp"></view>
|
|
|
|
|
+ <ut-action-sheet :tabs="pt_medicine_source" mode="custom" title="鲜货来源" v-model="form.sourceType">
|
|
|
|
|
+ <up-form-item borderBottom label="鲜货来源" required prop="sourceType">
|
|
|
|
|
+ <view v-if="form.sourceType" class="f-s-30 c-333 f-w-5 flex1">{{ selectDictLabel(pt_medicine_source, form.sourceType) }}</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>
|
|
|
- <view class="h-1" id="motherFatherFlagpppp"></view>
|
|
|
|
|
- <ut-action-sheet :tabs="pt_mother_father_flag" mode="custom" title="父母本情况" v-model="form.instoreBizInfo.motherFatherFlag">
|
|
|
|
|
- <template v-if="['A3', 'A4'].includes(form.seedType as string) || ['3'].includes(form.seedSource as string)">
|
|
|
|
|
- <up-form-item borderBottom label="父母本情况" prop="instoreBizInfo.motherFatherFlag" required>
|
|
|
|
|
- <view v-if="form.instoreBizInfo.motherFatherFlag" class="f-s-30 c-333 f-w-5 flex1">{{ selectDictLabel(pt_mother_father_flag, form.instoreBizInfo.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>
|
|
|
|
|
- </template>
|
|
|
|
|
- <template v-else>
|
|
|
|
|
- <up-form-item borderBottom label="父母本情况">
|
|
|
|
|
- <view v-if="form.instoreBizInfo.motherFatherFlag" class="f-s-30 c-333 f-w-5 flex1">{{ selectDictLabel(pt_mother_father_flag, form.instoreBizInfo.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>
|
|
|
|
|
- </template>
|
|
|
|
|
- </ut-action-sheet>
|
|
|
|
|
- <template>
|
|
|
|
|
- <!-- 父本品种 -->
|
|
|
|
|
- <up-form-item v-if="form?.instoreBizInfo?.motherFatherFlag == '2'" borderBottom label="父本品种" prop="fatherVarietyId">
|
|
|
|
|
- <view class="flex1">
|
|
|
|
|
- <up-button v-if="!form.instoreBizInfo.fatherVarietyId" @click="selectFatherVarietyId" type="primary" plain>
|
|
|
|
|
- <image class="w-36 h-36 mr-10" src="https://ta.zycpzs.cn/oss-file/smart-trace/szyy/images-plt/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?.instoreBizInfo?.fatherVarietyInfo?.varietyName }}</span>
|
|
|
|
|
- <span class="f-s-24 c-#666">{{ form?.instoreBizInfo?.fatherVarietyInfo?.latinName }}</span>
|
|
|
|
|
- </view>
|
|
|
|
|
- <view class="mb-16">
|
|
|
|
|
- <span class="f-s-28 c-#333 f-w-5 mr-16">{{ form?.instoreBizInfo?.fatherVarietyInfo?.genusName }}</span>
|
|
|
|
|
- <span class="f-s-24 c-#666">{{ form?.instoreBizInfo?.fatherVarietyInfo?.genusLatinName }}</span>
|
|
|
|
|
- </view>
|
|
|
|
|
- <view v-if="form?.varietyInfo?.medicineName" class="f-s-24 c-#666">产出:{{ form?.instoreBizInfo?.fatherVarietyInfo?.medicineName }}</view>
|
|
|
|
|
- <view
|
|
|
|
|
- class="close-icon pd-16"
|
|
|
|
|
- @click="
|
|
|
|
|
- form.instoreBizInfo.fatherVarietyId = '';
|
|
|
|
|
- form.instoreBizInfo.fatherVarietyInfo = null;
|
|
|
|
|
- "
|
|
|
|
|
- >
|
|
|
|
|
- <up-icon color="#F81242" name="close" size="32rpx"></up-icon>
|
|
|
|
|
- </view>
|
|
|
|
|
- </view>
|
|
|
|
|
- </view>
|
|
|
|
|
- </up-form-item>
|
|
|
|
|
- <!-- 母本品种 -->
|
|
|
|
|
- <up-form-item borderBottom label="母本品种" prop="instoreBizInfo.motherVarietyId">
|
|
|
|
|
- <view class="flex1">
|
|
|
|
|
- <up-button v-if="!form.instoreBizInfo.motherVarietyId" @click="selectMotherVarietyId" type="primary" plain>
|
|
|
|
|
- <image class="w-36 h-36 mr-10" src="https://ta.zycpzs.cn/oss-file/smart-trace/szyy/images-plt/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?.instoreBizInfo?.motherVarietyInfo?.varietyName }}</span>
|
|
|
|
|
- <span class="f-s-24 c-#666">{{ form?.instoreBizInfo?.motherVarietyInfo?.latinName }}</span>
|
|
|
|
|
- </view>
|
|
|
|
|
- <view class="mb-16">
|
|
|
|
|
- <span class="f-s-28 c-#333 f-w-5 mr-16">{{ form?.instoreBizInfo?.motherVarietyInfo?.genusName }}</span>
|
|
|
|
|
- <span class="f-s-24 c-#666">{{ form?.instoreBizInfo?.motherVarietyInfo?.genusLatinName }}</span>
|
|
|
|
|
- </view>
|
|
|
|
|
- <view v-if="form?.varietyInfo?.medicineName" class="f-s-24 c-#666">产出:{{ form?.instoreBizInfo?.motherVarietyInfo?.medicineName }}</view>
|
|
|
|
|
- <view
|
|
|
|
|
- class="close-icon pd-16"
|
|
|
|
|
- @click="
|
|
|
|
|
- form.instoreBizInfo.motherVarietyId = '';
|
|
|
|
|
- form.instoreBizInfo.motherVarietyInfo = null;
|
|
|
|
|
- "
|
|
|
|
|
- >
|
|
|
|
|
- <up-icon color="#F81242" name="close" size="32rpx"></up-icon>
|
|
|
|
|
- </view>
|
|
|
|
|
- </view>
|
|
|
|
|
- </view>
|
|
|
|
|
- </up-form-item>
|
|
|
|
|
- </template>
|
|
|
|
|
- <view class="h-1" id="genCountpppp"></view>
|
|
|
|
|
- <view class="h-1" id="genUnitpppp"></view>
|
|
|
|
|
- <template v-if="['A3', 'A4'].includes(form.seedType as string)">
|
|
|
|
|
- <up-form-item :label="`${genCountMap[form.seedType as 'A3' | 'A4']}`" required class="form-item-bottom-padding-0">
|
|
|
|
|
- <view class="d-flex flex1">
|
|
|
|
|
- <view class="flex1 ov-hd">
|
|
|
|
|
- <up-form-item prop="instoreBizInfo.genCount" border-bottom class="form-item-top-padding-0">
|
|
|
|
|
- <up-input v-model="form.instoreBizInfo.genCount" :placeholder="`请输入${genCountMap[form.seedType as 'A3' | 'A4']}`" border="none" clearable></up-input>
|
|
|
|
|
- </up-form-item>
|
|
|
|
|
- </view>
|
|
|
|
|
- <view class="pd-5"></view>
|
|
|
|
|
- <view class="min-w-200">
|
|
|
|
|
- <ut-action-sheet v-model="form.instoreBizInfo.genUnit" :tabs="pt_gen_unit" mode="custom" title="选择单位">
|
|
|
|
|
- <up-form-item prop="instoreBizInfo.genUnit" border-bottom class="form-item-top-padding-0">
|
|
|
|
|
- <view class="flex1" style="line-height: 24px">
|
|
|
|
|
- <view v-if="form.instoreBizInfo.genUnit" class="f-s-30 c-333 f-w-5 text-center">{{ selectDictLabel(pt_gen_unit, form.instoreBizInfo.genUnit) }}</view>
|
|
|
|
|
- <view v-else class="f-s-30 c-ccc f-w-4 text-center">单位</view>
|
|
|
|
|
- </view>
|
|
|
|
|
- <template #right>
|
|
|
|
|
- <up-icon size="22rpx" color="#2A6D52" name="arrow-down-fill"></up-icon>
|
|
|
|
|
- </template>
|
|
|
|
|
- </up-form-item>
|
|
|
|
|
- </ut-action-sheet>
|
|
|
|
|
- </view>
|
|
|
|
|
- </view>
|
|
|
|
|
- </up-form-item>
|
|
|
|
|
- </template>
|
|
|
|
|
- <template v-else>
|
|
|
|
|
- <up-form-item label="繁衍世代" class="form-item-bottom-padding-0">
|
|
|
|
|
- <view class="d-flex flex1">
|
|
|
|
|
- <view class="flex1 ov-hd">
|
|
|
|
|
- <up-form-item border-bottom class="form-item-top-padding-0">
|
|
|
|
|
- <up-input v-model="form.instoreBizInfo.genCount" placeholder="请输入繁衍世代" border="none" clearable></up-input>
|
|
|
|
|
- </up-form-item>
|
|
|
|
|
- </view>
|
|
|
|
|
- <view class="pd-5"></view>
|
|
|
|
|
- <view class="min-w-200">
|
|
|
|
|
- <ut-action-sheet v-model="form.instoreBizInfo.genUnit" :tabs="pt_gen_unit" mode="custom" title="选择单位">
|
|
|
|
|
- <up-form-item border-bottom class="form-item-top-padding-0">
|
|
|
|
|
- <view class="flex1" style="line-height: 24px">
|
|
|
|
|
- <view v-if="form.instoreBizInfo.genUnit" class="f-s-30 c-333 f-w-5 text-center">{{ selectDictLabel(pt_gen_unit, form.instoreBizInfo.genUnit) }}</view>
|
|
|
|
|
- <view v-else class="f-s-30 c-ccc f-w-4 text-center">单位</view>
|
|
|
|
|
- </view>
|
|
|
|
|
- <template #right>
|
|
|
|
|
- <up-icon size="22rpx" color="#2A6D52" name="arrow-down-fill"></up-icon>
|
|
|
|
|
- </template>
|
|
|
|
|
- </up-form-item>
|
|
|
|
|
- </ut-action-sheet>
|
|
|
|
|
- </view>
|
|
|
|
|
- </view>
|
|
|
|
|
- </up-form-item>
|
|
|
|
|
- </template>
|
|
|
|
|
-
|
|
|
|
|
- <view class="h-1" id="entrustIdpppp"></view>
|
|
|
|
|
- <up-form-item borderBottom label="受托单位" prop="entrustId" required>
|
|
|
|
|
- <view class="flex1">
|
|
|
|
|
- <ContactUnitInput v-model="form.entrustId" v-model:info="form.entrustInfo" :params="{ cpyType: '2' }" title="选择受托单位" placeholder="请选择受托单位信息"></ContactUnitInput>
|
|
|
|
|
- </view>
|
|
|
|
|
- </up-form-item>
|
|
|
|
|
-
|
|
|
|
|
<!-- 入库数量与单位 -->
|
|
<!-- 入库数量与单位 -->
|
|
|
<view class="h-1" id="capacitypppp"></view>
|
|
<view class="h-1" id="capacitypppp"></view>
|
|
|
<view class="h-1" id="unitpppp"></view>
|
|
<view class="h-1" id="unitpppp"></view>
|
|
|
<up-form-item label="入库量" prop="capacity" required class="form-item-bottom-padding-0">
|
|
<up-form-item label="入库量" prop="capacity" required class="form-item-bottom-padding-0">
|
|
|
- <view class="f-s-30 c-333 f-w-5 flex1">{{ form?.capacity }}{{ form?.unit }}</view>
|
|
|
|
|
- </up-form-item>
|
|
|
|
|
- <!-- 检验报告与供应商信息 -->
|
|
|
|
|
- <up-form-item borderBottom label="检验报告" prop="examinReport">
|
|
|
|
|
- <ut-upload v-model="form.examinReport" :max-count="50" valueType="array" accept="image,file"></ut-upload>
|
|
|
|
|
|
|
+ <view class="f-s-30 c-333 f-w-5 flex1">{{ form?.capacity }}{{ form?.unit }}</view>
|
|
|
</up-form-item>
|
|
</up-form-item>
|
|
|
- <template v-if="['2', '3'].includes(form.seedSource as string)">
|
|
|
|
|
|
|
+
|
|
|
|
|
+ <template v-if="['2'].includes(form.sourceType as string)">
|
|
|
<up-form-item borderBottom label="供应商" prop="supplierId" required>
|
|
<up-form-item borderBottom label="供应商" prop="supplierId" required>
|
|
|
<view class="flex1">
|
|
<view class="flex1">
|
|
|
<ContactUnitInput v-model="form.supplierId" v-model:info="form.supplierInfo" :params="{ cpyType: '4' }" title="选择供应商" placeholder="请选择供应商信息"></ContactUnitInput>
|
|
<ContactUnitInput v-model="form.supplierId" v-model:info="form.supplierInfo" :params="{ cpyType: '4' }" title="选择供应商" placeholder="请选择供应商信息"></ContactUnitInput>
|
|
@@ -228,95 +78,36 @@
|
|
|
<up-input v-model="form.producer" placeholder="请输入生产商名称" border="none" clearable></up-input>
|
|
<up-input v-model="form.producer" placeholder="请输入生产商名称" border="none" clearable></up-input>
|
|
|
</up-form-item>
|
|
</up-form-item>
|
|
|
</template>
|
|
</template>
|
|
|
- <!-- 菌种编码信息 -->
|
|
|
|
|
- <up-form-item required v-if="['A4', 'A8'].includes(form.seedType as string)" :label="`${selectDictLabel(pt_seed_type, form.seedType as string)}编号`" class="form-item-bottom-padding-0">
|
|
|
|
|
- <view class="d-flex flex1">
|
|
|
|
|
- <view class="flex1">
|
|
|
|
|
- <ut-action-sheet v-model="form.fungusCodeType" :tabs="pt_fungus_code_type" mode="custom" title="选择单位">
|
|
|
|
|
- <up-form-item prop="fungusCodeType" border-bottom class="form-item-top-padding-0">
|
|
|
|
|
- <view class="flex1" style="line-height: 24px">
|
|
|
|
|
- <view v-if="form.fungusCodeType" class="f-s-30 c-333 f-w-5">{{ selectDictLabel(pt_fungus_code_type, form.fungusCodeType) }}</view>
|
|
|
|
|
- <view v-else class="f-s-30 c-ccc f-w-4">选择编号类型</view>
|
|
|
|
|
- </view>
|
|
|
|
|
- <template #right>
|
|
|
|
|
- <up-icon class="pr-20" size="22rpx" color="#2A6D52" name="arrow-down-fill"></up-icon>
|
|
|
|
|
- </template>
|
|
|
|
|
- </up-form-item>
|
|
|
|
|
- </ut-action-sheet>
|
|
|
|
|
- </view>
|
|
|
|
|
- <view class="pd-5"></view>
|
|
|
|
|
- <view class="flex1">
|
|
|
|
|
- <up-form-item prop="fungusCode" border-bottom class="form-item-top-padding-0">
|
|
|
|
|
- <up-input v-model="form.fungusCode" placeholder="输入数字小数点" border="none" clearable></up-input>
|
|
|
|
|
- </up-form-item>
|
|
|
|
|
- </view>
|
|
|
|
|
- </view>
|
|
|
|
|
- </up-form-item>
|
|
|
|
|
- <!-- 个体标识:此处仅占位,后续可改为多选列表 -->
|
|
|
|
|
- <view class="h-1" id="instoreBizInfo.idFlagpppp"></view>
|
|
|
|
|
- <up-form-item borderBottom label="是否有个体标识" prop="instoreBizInfo.idFlag" required>
|
|
|
|
|
- <up-radio-group v-model="form.instoreBizInfo.idFlag">
|
|
|
|
|
- <up-radio :customStyle="{ marginRight: '60rpx' }" v-for="(item, index) in yes_no" :key="index" :label="item.label" :name="item.value"></up-radio>
|
|
|
|
|
- </up-radio-group>
|
|
|
|
|
- </up-form-item>
|
|
|
|
|
- <!-- 个体标识:此处仅占位,后续可改为多选列表 -->
|
|
|
|
|
- <template v-if="+form?.instoreBizInfo?.idFlag">
|
|
|
|
|
- <view class="h-1" id="instoreBizInfo.animalspppp"></view>
|
|
|
|
|
- <up-form-item borderBottom label="个体标识号" prop="instoreBizInfo.animals" required>
|
|
|
|
|
- <AnimalsInput v-model="form.instoreBizInfo.animals"></AnimalsInput>
|
|
|
|
|
- </up-form-item>
|
|
|
|
|
- </template>
|
|
|
|
|
- <!-- 保藏方法 -->
|
|
|
|
|
- <up-form-item borderBottom label="保藏方法" prop="instoreBizInfo.storageMethod">
|
|
|
|
|
- <up-input v-model="form.instoreBizInfo.storageMethod" placeholder="请输入保藏方法" border="none" clearable></up-input>
|
|
|
|
|
- </up-form-item>
|
|
|
|
|
- <!-- 媒体与附件 -->
|
|
|
|
|
- <up-form-item borderBottom label="种源图片" prop="imgs">
|
|
|
|
|
- <ut-upload v-model="form.imgs" :max-count="9" valueType="string"></ut-upload>
|
|
|
|
|
- </up-form-item>
|
|
|
|
|
- <up-form-item borderBottom label="种源视频" prop="vedios">
|
|
|
|
|
- <ut-upload v-model="form.vedios" :max-count="3" accept="video" valueType="string"></ut-upload>
|
|
|
|
|
|
|
+ <!-- 检验报告与供应商信息 -->
|
|
|
|
|
+ <up-form-item borderBottom label="检验报告" prop="examinReport">
|
|
|
|
|
+ <ut-upload v-model="form.examinReport" :max-count="50" valueType="array" accept="image,file"></ut-upload>
|
|
|
</up-form-item>
|
|
</up-form-item>
|
|
|
-
|
|
|
|
|
- <!-- 种源产地 -->
|
|
|
|
|
- <PickerAreaInput v-model="form.adcode" v-model:full-name="form.adcodeName" title="选择种源产地">
|
|
|
|
|
- <up-form-item borderBottom label="种源产地" prop="adcode">
|
|
|
|
|
- <view v-if="form.adcode" class="f-s-30 c-333 f-w-5 flex1">{{ form.adcodeName }}</view>
|
|
|
|
|
- <view v-else class="f-s-30 c-ccc f-w-4 flex1">请选择种源产地</view>
|
|
|
|
|
|
|
+ <!-- 鲜货产地 -->
|
|
|
|
|
+ <PickerAreaInput v-model="form.producePlace" v-model:full-name="form.producePlaceName" title="选择鲜货产地">
|
|
|
|
|
+ <view class="h-1" id="producePlacepppp"></view>
|
|
|
|
|
+ <up-form-item borderBottom label="鲜货产地" prop="producePlace" required>
|
|
|
|
|
+ <view v-if="form.producePlace" class="f-s-30 c-333 f-w-5 flex1">{{ form.producePlaceName }}</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>
|
|
|
</PickerAreaInput>
|
|
</PickerAreaInput>
|
|
|
- <ut-action-sheet :tabs="pt_breeding_materials" mode="custom" title="繁殖材料" multiple v-model="form.generationMaterial">
|
|
|
|
|
- <up-form-item borderBottom label="繁殖材料" prop="generationMaterial">
|
|
|
|
|
- <view v-if="form.generationMaterial" class="f-s-30 c-333 f-w-5 flex1">{{ selectDictLabels(pt_breeding_materials, form.generationMaterial, ',') }}</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>
|
|
|
|
|
-
|
|
|
|
|
- <PickerAreaInput v-model="form.generationAdcode" v-model:full-name="form.generationAdcodeName" :maxLevel="4" title="选择繁殖地点/采集地点">
|
|
|
|
|
- <up-form-item borderBottom label="繁殖地点/采集地点" prop="generationAdcode">
|
|
|
|
|
- <view v-if="form.generationAdcode" class="f-s-30 c-333 f-w-5 flex1">{{ form.generationAdcodeName }}</view>
|
|
|
|
|
- <view v-else class="f-s-30 c-ccc f-w-4 flex1">请选择繁殖地点/采集地点</view>
|
|
|
|
|
|
|
+ <view class="h-1" id="productDatepppp"></view>
|
|
|
|
|
+ <ut-datetime-picker v-model="form.productDate" :maxDate="new Date()" mode="date">
|
|
|
|
|
+ <up-form-item borderBottom label="采收日期" prop="productDate" required>
|
|
|
|
|
+ <up-input v-model="form.productDate" readonly placeholder="请选择采收日期" border="none" clearable></up-input>
|
|
|
<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>
|
|
|
- </PickerAreaInput>
|
|
|
|
|
- <!-- 资质证明附件(暂按上传控件处理,可后续细化) -->
|
|
|
|
|
- <up-form-item borderBottom label="物种鉴定证书" prop="spCert">
|
|
|
|
|
- <ut-upload v-model="form.spCert" :max-count="9" valueType="array" accept="file"></ut-upload>
|
|
|
|
|
- </up-form-item>
|
|
|
|
|
- <!-- 检疫信息 -->
|
|
|
|
|
- <up-form-item borderBottom label="种源检疫证号" prop="seedCheckSn">
|
|
|
|
|
- <up-input v-model="form.seedCheckSn" placeholder="请输入种源检疫证号" border="none" clearable></up-input>
|
|
|
|
|
|
|
+ </ut-datetime-picker>
|
|
|
|
|
+ <!-- 媒体与附件 -->
|
|
|
|
|
+ <up-form-item borderBottom label="鲜货图片" prop="imgs">
|
|
|
|
|
+ <ut-upload v-model="form.imgs" :max-count="9" valueType="string"></ut-upload>
|
|
|
</up-form-item>
|
|
</up-form-item>
|
|
|
- <up-form-item borderBottom label="种源检疫证书" prop="seedCheckCert">
|
|
|
|
|
- <ut-upload v-model="form.seedCheckCert" :max-count="9" valueType="array" accept="file"></ut-upload>
|
|
|
|
|
|
|
+ <up-form-item borderBottom label="鲜货视频" prop="vedios">
|
|
|
|
|
+ <ut-upload v-model="form.vedios" :max-count="3" accept="video" valueType="string"></ut-upload>
|
|
|
</up-form-item>
|
|
</up-form-item>
|
|
|
</view>
|
|
</view>
|
|
|
|
|
|
|
@@ -324,10 +115,6 @@
|
|
|
<view class="startline-title">入库信息</view>
|
|
<view class="startline-title">入库信息</view>
|
|
|
</view>
|
|
</view>
|
|
|
<view class="pd-24 bg-#fff">
|
|
<view class="pd-24 bg-#fff">
|
|
|
- <!-- 种源级别 -->
|
|
|
|
|
- <up-form-item borderBottom label="种源级别" prop="seedLevel">
|
|
|
|
|
- <up-input v-model="form.seedLevel" placeholder="请输入种源级别" border="none" clearable></up-input>
|
|
|
|
|
- </up-form-item>
|
|
|
|
|
<!-- 入库类型 -->
|
|
<!-- 入库类型 -->
|
|
|
<up-form-item borderBottom label="入库类型" required prop="instoreType">
|
|
<up-form-item borderBottom label="入库类型" required prop="instoreType">
|
|
|
<view v-if="form.instoreType" class="f-s-30 c-333 f-w-5 flex1">{{ selectDictLabel(pt_seed_instore_type, form.instoreType) }}</view>
|
|
<view v-if="form.instoreType" class="f-s-30 c-333 f-w-5 flex1">{{ selectDictLabel(pt_seed_instore_type, form.instoreType) }}</view>
|
|
@@ -348,13 +135,13 @@
|
|
|
<view class="f-s-30 c-333 f-w-5 flex1">{{ form.batchCode }}</view>
|
|
<view class="f-s-30 c-333 f-w-5 flex1">{{ form.batchCode }}</view>
|
|
|
</up-form-item>
|
|
</up-form-item>
|
|
|
<!-- 库房类型 -->
|
|
<!-- 库房类型 -->
|
|
|
- <up-form-item borderBottom label="库房类型" prop="storeType" required>
|
|
|
|
|
- <view v-if="form.storeType" class="f-s-30 c-333 f-w-5 flex1">{{ selectDictLabel(pt_warehouse_type, form.storeType) }}</view>
|
|
|
|
|
|
|
+ <up-form-item borderBottom label="库房类型" prop="storageType" required>
|
|
|
|
|
+ <view v-if="form.storageType" class="f-s-30 c-333 f-w-5 flex1">{{ selectDictLabel(pt_warehouse_type, form.storageType) }}</view>
|
|
|
<view v-else class="f-s-30 c-ccc f-w-4 flex1">请选择库房类型</view>
|
|
<view v-else class="f-s-30 c-ccc f-w-4 flex1">请选择库房类型</view>
|
|
|
</up-form-item>
|
|
</up-form-item>
|
|
|
<!-- 存放库房(具体库房/货架信息稍后补充为选择器) -->
|
|
<!-- 存放库房(具体库房/货架信息稍后补充为选择器) -->
|
|
|
<up-form-item borderBottom label="存放库房" prop="warehouses">
|
|
<up-form-item borderBottom label="存放库房" prop="warehouses">
|
|
|
- <select-warehouse-input v-model="form.warehouses" title="添加种源存放库房" :params="{ type: '2' }"></select-warehouse-input>
|
|
|
|
|
|
|
+ <select-warehouse-input v-model="form.warehouses" title="添加鲜货存放库房" :params="{ type: '2' }"></select-warehouse-input>
|
|
|
</up-form-item>
|
|
</up-form-item>
|
|
|
<!-- 入库人 -->
|
|
<!-- 入库人 -->
|
|
|
<up-form-item borderBottom label="入库人" required prop="instoreBizInfo.instoreMg">
|
|
<up-form-item borderBottom label="入库人" required prop="instoreBizInfo.instoreMg">
|
|
@@ -375,91 +162,28 @@
|
|
|
</template>
|
|
</template>
|
|
|
<script setup lang="ts">
|
|
<script setup lang="ts">
|
|
|
import { useClientRequest } from '@/utils/request';
|
|
import { useClientRequest } from '@/utils/request';
|
|
|
-import { formItemBtnStyle } from '@/assets/styles/uview-plus';
|
|
|
|
|
-import { seedInfoListType } from '../models/type';
|
|
|
|
|
-import AnimalsInput from '../models/animals-input.vue';
|
|
|
|
|
|
|
+import { FreshGoodsInfoType } from '../models/type';
|
|
|
import ContactUnitInput from '@/models/contact-unit-input/contact-unit-input.vue';
|
|
import ContactUnitInput from '@/models/contact-unit-input/contact-unit-input.vue';
|
|
|
import PickerAreaInput from '@/models/picker-area-input/picker-area-input.vue';
|
|
import PickerAreaInput from '@/models/picker-area-input/picker-area-input.vue';
|
|
|
import SelectWarehouseInput from '@/models/select-warehouse-input/select-warehouse-input.vue';
|
|
import SelectWarehouseInput from '@/models/select-warehouse-input/select-warehouse-input.vue';
|
|
|
|
|
+import SelectMedicinalPart from '@/models/select-medicinal-part/select-medicinal-part.vue';
|
|
|
|
|
+import { parseTime } from '@/utils/ruoyi';
|
|
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
|
|
-const { pt_seed_instore_type, pt_warehouse_type, pt_seed_type, pt_seed_source, pt_materail_unit, pt_mother_father_flag, pt_op_method, pt_seed_unit, pt_fungus_code_type, pt_breeding_materials, yes_no, pt_cus_type, pt_cpy_type, pt_gen_unit } = toRefs<any>(
|
|
|
|
|
- proxy?.useDict('pt_seed_instore_type', 'pt_warehouse_type', 'pt_seed_type', 'pt_seed_source', 'pt_materail_unit', 'pt_mother_father_flag', 'pt_op_method', 'pt_seed_unit', 'pt_fungus_code_type', 'pt_breeding_materials', 'yes_no', 'pt_cus_type', 'pt_cpy_type', 'pt_gen_unit'),
|
|
|
|
|
-);
|
|
|
|
|
|
|
+const { pt_seed_instore_type, pt_warehouse_type, pt_medicine_source,pt_medicine_unit, yes_no } = toRefs<any>(proxy?.useDict('pt_seed_instore_type', 'pt_warehouse_type', 'pt_medicine_source','pt_medicine_unit', 'yes_no'));
|
|
|
const paging = ref<any>(null);
|
|
const paging = ref<any>(null);
|
|
|
const upFormRef = ref<any>(null);
|
|
const upFormRef = ref<any>(null);
|
|
|
-// 单条种源信息 + 入库信息的合并表单
|
|
|
|
|
-const form = ref<seedInfoListType | any>({
|
|
|
|
|
- imgs: undefined,
|
|
|
|
|
- vedios: undefined,
|
|
|
|
|
- spCert: [],
|
|
|
|
|
- newSpCert: [],
|
|
|
|
|
- importCert: [],
|
|
|
|
|
- seedCheckCert: [],
|
|
|
|
|
- unit: '',
|
|
|
|
|
- adcode: '',
|
|
|
|
|
|
|
+// 单条鲜货信息 + 入库信息的合并表单
|
|
|
|
|
+const form = ref<FreshGoodsInfoType | any>({
|
|
|
|
|
+ storageType: '4',
|
|
|
instoreBizInfo: {
|
|
instoreBizInfo: {
|
|
|
- motherFatherFlag: '',
|
|
|
|
|
- idFlag: '1',
|
|
|
|
|
- genUnit: '',
|
|
|
|
|
- instoreDate: '',
|
|
|
|
|
|
|
+ instoreDate: parseTime(new Date(), '{y}-{m}-{d}'),
|
|
|
instoreMg: '',
|
|
instoreMg: '',
|
|
|
remark: '',
|
|
remark: '',
|
|
|
},
|
|
},
|
|
|
- generationMaterial: '',
|
|
|
|
|
- instoreType: '2',
|
|
|
|
|
- storeType: '2',
|
|
|
|
|
-});
|
|
|
|
|
-const rules = reactive({
|
|
|
|
|
- // 种源信息校验(来自 info-edit)
|
|
|
|
|
- seedType: [{ required: true, message: '请选择种源类型' }],
|
|
|
|
|
- varietyId: [{ required: true, message: '请选择物种基原' }],
|
|
|
|
|
- seedSource: [{ required: true, message: '请选择种源来源' }],
|
|
|
|
|
- 'instoreBizInfo.motherFatherFlag': [{ required: true, message: '请选择父母本情况' }],
|
|
|
|
|
- 'instoreBizInfo.genCount': [
|
|
|
|
|
- {
|
|
|
|
|
- asyncValidator: (rule: any, value: any) => {
|
|
|
|
|
- if (['A3', 'A4'].includes(form.value.seedType as string)) {
|
|
|
|
|
- if (!value) {
|
|
|
|
|
- return Promise.reject('请输入' + genCountMap[form.value.seedType as 'A3' | 'A4']);
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- return Promise.resolve();
|
|
|
|
|
- },
|
|
|
|
|
- },
|
|
|
|
|
- ],
|
|
|
|
|
- 'instoreBizInfo.genUnit': [
|
|
|
|
|
- {
|
|
|
|
|
- asyncValidator: (rule: any, value: any) => {
|
|
|
|
|
- if (['A3', 'A4'].includes(form.value.seedType as string)) {
|
|
|
|
|
- if (!value) {
|
|
|
|
|
- return Promise.reject('请选择单位');
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- return Promise.resolve();
|
|
|
|
|
- },
|
|
|
|
|
- },
|
|
|
|
|
- ],
|
|
|
|
|
- entrustId: [{ required: true, message: '请选择受托单位' }],
|
|
|
|
|
- capacity: [{ required: true, message: '请输入入库量' }],
|
|
|
|
|
- unit: [{ required: true, message: '请选择单位' }],
|
|
|
|
|
- supplierId: [{ required: true, message: '请选择供应商' }],
|
|
|
|
|
- fungusCodeType: [{ required: true, message: '请选择编号类型' }],
|
|
|
|
|
- fungusCode: [{ required: true, message: '请输入编号' }],
|
|
|
|
|
- 'instoreBizInfo.idFlag': [{ required: true, message: '请选择是否有个体标识' }],
|
|
|
|
|
- 'instoreBizInfo.animals': [{ type: 'array', required: true, message: '请输入个体标识号' }],
|
|
|
|
|
- // 入库信息校验(来自 add)
|
|
|
|
|
- instoreType: [{ required: true, message: '请选择入库类型' }],
|
|
|
|
|
- 'instoreBizInfo.instoreDate': [{ required: true, message: '请选择入库日期' }],
|
|
|
|
|
- batchCode: [{ required: true, message: '请输入入库批号' }],
|
|
|
|
|
- 'instoreBizInfo.instoreMg': [{ required: true, message: '请输入入库人' }],
|
|
|
|
|
-});
|
|
|
|
|
-// 繁衍世代对象
|
|
|
|
|
-const genCountMap = reactive({
|
|
|
|
|
- A4: '累计扩繁代数',
|
|
|
|
|
- A3: '继代培养次数',
|
|
|
|
|
});
|
|
});
|
|
|
|
|
+const rules = reactive({});
|
|
|
|
|
|
|
|
-// 提交:当前页面改为单条种源信息,直接提交合并后的对象
|
|
|
|
|
|
|
+// 提交:当前页面改为单条鲜货信息,直接提交合并后的对象
|
|
|
const submitForm = async () => {
|
|
const submitForm = async () => {
|
|
|
uni.$u.debounce(
|
|
uni.$u.debounce(
|
|
|
async () => {
|
|
async () => {
|
|
@@ -475,7 +199,7 @@ const submitForm = async () => {
|
|
|
});
|
|
});
|
|
|
try {
|
|
try {
|
|
|
// 这里使用单条入库接口,后端若仍要求 batch,可根据需要包装成数组
|
|
// 这里使用单条入库接口,后端若仍要求 batch,可根据需要包装成数组
|
|
|
- const res = await useClientRequest.post('/plt-api/app/storageSeed/edit', form.value);
|
|
|
|
|
|
|
+ const res = await useClientRequest.post('/plt-api/app/storage/edit', form.value);
|
|
|
if (!res || res.code !== 200) return;
|
|
if (!res || res.code !== 200) return;
|
|
|
uni.hideLoading();
|
|
uni.hideLoading();
|
|
|
uni.showToast({
|
|
uni.showToast({
|
|
@@ -490,32 +214,13 @@ const submitForm = async () => {
|
|
|
});
|
|
});
|
|
|
}, 1500);
|
|
}, 1500);
|
|
|
} catch (error) {
|
|
} catch (error) {
|
|
|
- uni.hideLoading();
|
|
|
|
|
|
|
+ // uni.hideLoading();
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
500,
|
|
500,
|
|
|
true,
|
|
true,
|
|
|
);
|
|
);
|
|
|
};
|
|
};
|
|
|
-// 点击随机生成服务端生成唯一的批号(与 add 一致)
|
|
|
|
|
-const generateBatchCode = async () => {
|
|
|
|
|
- uni.showLoading({
|
|
|
|
|
- title: '生成中...',
|
|
|
|
|
- });
|
|
|
|
|
- const res = await useClientRequest.post('/plt-api/app/plantationTask/getBatchCode', {
|
|
|
|
|
- plType: 'S',
|
|
|
|
|
- linkType: 'I',
|
|
|
|
|
- });
|
|
|
|
|
- if (res && res.code === 200) {
|
|
|
|
|
- uni.hideLoading();
|
|
|
|
|
- form.value.batchCode = res.data;
|
|
|
|
|
- uni.showToast({
|
|
|
|
|
- title: '批号生成成功',
|
|
|
|
|
- icon: 'success',
|
|
|
|
|
- });
|
|
|
|
|
- }
|
|
|
|
|
-};
|
|
|
|
|
-
|
|
|
|
|
// 选择物种、父母本逻辑保持与 info-edit 一致
|
|
// 选择物种、父母本逻辑保持与 info-edit 一致
|
|
|
const selectVarietyId = () => {
|
|
const selectVarietyId = () => {
|
|
|
uni.$once('updateBiologicalname', function (data) {
|
|
uni.$once('updateBiologicalname', function (data) {
|
|
@@ -560,7 +265,7 @@ const did = ref('');
|
|
|
// 获取详情(仓库信息)
|
|
// 获取详情(仓库信息)
|
|
|
const getDetailById = async (id: string) => {
|
|
const getDetailById = async (id: string) => {
|
|
|
if (!id) return;
|
|
if (!id) return;
|
|
|
- const res = await useClientRequest.get(`/plt-api/app/storageSeed/getById/${id}`);
|
|
|
|
|
|
|
+ const res = await useClientRequest.get(`/plt-api/app/storage/getInfo/${id}`);
|
|
|
if (res && res.code === 200) {
|
|
if (res && res.code === 200) {
|
|
|
form.value = {
|
|
form.value = {
|
|
|
...form.value,
|
|
...form.value,
|