|
@@ -1,7 +1,7 @@
|
|
|
<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 字段与顺序) -->
|
|
@@ -9,230 +9,78 @@
|
|
|
<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>
|
|
|
|
|
- <up-form-item borderBottom label="物种基原" required prop="varietyId">
|
|
|
|
|
- <view class="flex1">
|
|
|
|
|
- <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" />
|
|
|
|
|
- <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>
|
|
|
|
|
|
|
+ <view class="h-1" id="materialNamepppp"></view>
|
|
|
|
|
+ <up-form-item borderBottom label="产品名称" prop="materialName" required>
|
|
|
|
|
+ <up-input v-model="form.materialName" placeholder="请输入产品名称" border="none" clearable></up-input>
|
|
|
</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="materialTypepppp"></view>
|
|
|
|
|
+ <ut-action-sheet :tabs="pt_material_type" mode="custom" title="农资类别" v-model="form.materialType">
|
|
|
|
|
+ <up-form-item borderBottom label="农资类别" required prop="materialType">
|
|
|
|
|
+ <view v-if="form.materialType" class="f-s-30 c-333 f-w-5 flex1">{{ selectDictLabel(pt_material_type, form.materialType) }}</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 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 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>
|
|
|
|
|
|
|
+
|
|
|
|
|
+ <!-- 入库数量与单位 -->
|
|
|
|
|
+ <view class="h-1" id="capacitypppp"></view>
|
|
|
|
|
+ <view class="h-1" id="unitpppp"></view>
|
|
|
|
|
+ <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>
|
|
|
|
|
+ <view class="h-1" id="specpppp"></view>
|
|
|
|
|
+ <view class="h-1" id="specUnitpppp"></view>
|
|
|
|
|
+ <template v-if="!['kg', 'L'].includes(form?.unit as string)">
|
|
|
|
|
+ <up-form-item label="规格" prop="spec" required class="form-item-bottom-padding-0">
|
|
|
|
|
+ <div class="flex1 d-flex">
|
|
|
|
|
+ <div class="flex1 ov-hd">
|
|
|
|
|
+ <up-form-item prop="spec" border-bottom class="form-item-top-padding-0">
|
|
|
|
|
+ <up-input v-model="form.spec" placeholder="请输入规格" border="none" clearable></up-input>
|
|
|
</up-form-item>
|
|
</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">
|
|
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="pd-5"></div>
|
|
|
|
|
+ <div class="min-w-200">
|
|
|
|
|
+ <ut-action-sheet v-model="form.specUnit" :tabs="pt_materail_spec_unit" mode="custom" title="选择单位">
|
|
|
|
|
+ <up-form-item prop="specUnit" border-bottom class="form-item-top-padding-0">
|
|
|
<view class="flex1" style="line-height: 24px">
|
|
<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-if="form.specUnit" class="f-s-30 c-333 f-w-5 text-center">{{ selectDictLabel(pt_materail_spec_unit, form.specUnit) }}</view>
|
|
|
<view v-else class="f-s-30 c-ccc f-w-4 text-center">单位</view>
|
|
<view v-else class="f-s-30 c-ccc f-w-4 text-center">单位</view>
|
|
|
</view>
|
|
</view>
|
|
|
<template #right>
|
|
<template #right>
|
|
|
- <up-icon size="22rpx" color="#2A6D52" name="arrow-down-fill"></up-icon>
|
|
|
|
|
|
|
+ <up-icon class="mr-10" 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>
|
|
|
|
|
- </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>
|
|
|
|
|
- <up-form-item label="入库量" prop="capacity" required class="form-item-bottom-padding-0">
|
|
|
|
|
- <div class="flex1 d-flex">
|
|
|
|
|
- <div class="flex1 ov-hd">
|
|
|
|
|
- <up-form-item prop="capacity" border-bottom class="form-item-top-padding-0">
|
|
|
|
|
- <up-input v-model="form.capacity" placeholder="请输入入库量" border="none" clearable></up-input>
|
|
|
|
|
- </up-form-item>
|
|
|
|
|
- </div>
|
|
|
|
|
- <div class="pd-5"></div>
|
|
|
|
|
- <div class="min-w-200">
|
|
|
|
|
- <ut-action-sheet v-model="form.unit" :tabs="pt_seed_unit" mode="custom" title="选择单位">
|
|
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="pd2-0-10 c-#ccc">/</div>
|
|
|
|
|
+ <div class="min-w-200">
|
|
|
<up-form-item prop="unit" border-bottom class="form-item-top-padding-0">
|
|
<up-form-item prop="unit" border-bottom class="form-item-top-padding-0">
|
|
|
<view class="flex1" style="line-height: 24px">
|
|
<view class="flex1" style="line-height: 24px">
|
|
|
- <view v-if="form.unit" class="f-s-30 c-333 f-w-5 text-center">{{ selectDictLabel(pt_seed_unit, form.unit) }}</view>
|
|
|
|
|
|
|
+ <view v-if="form.unit" class="f-s-30 c-333 f-w-5 text-center">{{ selectDictLabel(pt_materail_unit, form.unit) }}</view>
|
|
|
<view v-else class="f-s-30 c-ccc f-w-4 text-center">单位</view>
|
|
<view v-else class="f-s-30 c-ccc f-w-4 text-center">单位</view>
|
|
|
</view>
|
|
</view>
|
|
|
<template #right>
|
|
<template #right>
|
|
|
- <up-icon size="22rpx" color="#2A6D52" name="arrow-down-fill"></up-icon>
|
|
|
|
|
|
|
+ <up-icon size="22rpx" color="#fff" name="arrow-down-fill"></up-icon>
|
|
|
</template>
|
|
</template>
|
|
|
</up-form-item>
|
|
</up-form-item>
|
|
|
- </ut-action-sheet>
|
|
|
|
|
|
|
+ </div>
|
|
|
</div>
|
|
</div>
|
|
|
- </div>
|
|
|
|
|
- </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>
|
|
|
|
|
- </up-form-item>
|
|
|
|
|
- <template v-if="['2', '3'].includes(form.seedSource as string)">
|
|
|
|
|
|
|
+ </up-form-item>
|
|
|
|
|
+ </template>
|
|
|
|
|
+
|
|
|
|
|
+ <view class="h-1" id="sourceTypepppp"></view>
|
|
|
|
|
+ <ut-action-sheet :tabs="pt_source_type" 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_source_type, form.sourceType) }}</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 v-if="['1'].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>
|
|
@@ -247,95 +95,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 borderBottom label="生产批号" prop="productCode">
|
|
|
|
|
+ <up-input v-model="form.productCode" placeholder="请输入生产批号" border="none" clearable></up-input>
|
|
|
</up-form-item>
|
|
</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>
|
|
|
|
|
|
|
+ <ut-datetime-picker v-model="form.productDate" :maxDate="new Date()" mode="date">
|
|
|
|
|
+ <up-form-item borderBottom label="生产日期" prop="productDate">
|
|
|
|
|
+ <up-input v-model="form.productDate" readonly placeholder="请选择生产日期" border="none" clearable></up-input>
|
|
|
|
|
+ <template #right>
|
|
|
|
|
+ <up-icon size="22rpx" color="#2A6D52" name="arrow-down-fill"></up-icon>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </up-form-item>
|
|
|
|
|
+ </ut-datetime-picker>
|
|
|
|
|
+ <up-form-item borderBottom label="品牌" prop="brand">
|
|
|
|
|
+ <up-input v-model="form.brand" placeholder="请输入品牌" border="none" clearable></up-input>
|
|
|
</up-form-item>
|
|
</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>
|
|
|
|
|
|
|
+ <!-- 登记证号 肥料和农药才有登记证号 -->
|
|
|
|
|
+ <template v-if="['1', '2'].includes(form.materialType as string)">
|
|
|
|
|
+ <up-form-item borderBottom label="登记证号" prop="materialCode">
|
|
|
|
|
+ <up-input v-model="form.materialCode" placeholder="请输入登记证号" border="none" clearable></up-input>
|
|
|
</up-form-item>
|
|
</up-form-item>
|
|
|
</template>
|
|
</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">
|
|
|
|
|
|
|
+ <up-form-item borderBottom label="农资图片" prop="imgs">
|
|
|
<ut-upload v-model="form.imgs" :max-count="9" valueType="string"></ut-upload>
|
|
<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="vedios">
|
|
|
|
|
|
|
+ <up-form-item borderBottom label="农资视频" prop="vedios">
|
|
|
<ut-upload v-model="form.vedios" :max-count="3" accept="video" valueType="string"></ut-upload>
|
|
<ut-upload v-model="form.vedios" :max-count="3" accept="video" valueType="string"></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>
|
|
|
|
|
- <template #right>
|
|
|
|
|
- <up-icon size="22rpx" color="#2A6D52" name="arrow-down-fill"></up-icon>
|
|
|
|
|
- </template>
|
|
|
|
|
- </up-form-item>
|
|
|
|
|
- </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>
|
|
|
|
|
- <template #right>
|
|
|
|
|
- <up-icon size="22rpx" color="#2A6D52" name="arrow-down-fill"></up-icon>
|
|
|
|
|
- </template>
|
|
|
|
|
- </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>
|
|
|
|
|
- </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="examinReport">
|
|
|
|
|
+ <ut-upload v-model="form.examinReport" :max-count="50" valueType="array" accept="image,file"></ut-upload>
|
|
|
</up-form-item>
|
|
</up-form-item>
|
|
|
</view>
|
|
</view>
|
|
|
|
|
|
|
@@ -343,10 +132,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>
|
|
@@ -356,7 +141,7 @@
|
|
|
<view class="h-1" id="instoreDatepppp"></view>
|
|
<view class="h-1" id="instoreDatepppp"></view>
|
|
|
<ut-datetime-picker v-model="form.instoreBizInfo.instoreDate" :maxDate="new Date()" mode="date">
|
|
<ut-datetime-picker v-model="form.instoreBizInfo.instoreDate" :maxDate="new Date()" mode="date">
|
|
|
<up-form-item borderBottom label="入库日期" required prop="instoreBizInfo.instoreDate">
|
|
<up-form-item borderBottom label="入库日期" required prop="instoreBizInfo.instoreDate">
|
|
|
- <up-input v-model="form.instoreBizInfo.instoreDate" placeholder="请选择入库日期" border="none" clearable></up-input>
|
|
|
|
|
|
|
+ <up-input v-model="form.instoreBizInfo.instoreDate" 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>
|
|
@@ -364,16 +149,14 @@
|
|
|
</ut-datetime-picker>
|
|
</ut-datetime-picker>
|
|
|
<!-- 入库批号 -->
|
|
<!-- 入库批号 -->
|
|
|
<up-form-item borderBottom label="入库批号" required prop="batchCode">
|
|
<up-form-item borderBottom label="入库批号" required prop="batchCode">
|
|
|
- <up-input v-model="form.batchCode" placeholder="请输入入库批号" border="none" clearable></up-input>
|
|
|
|
|
- <template #right>
|
|
|
|
|
- <up-button @click="generateBatchCode" type="primary" :customStyle="formItemBtnStyle">随机生成</up-button>
|
|
|
|
|
- </template>
|
|
|
|
|
|
|
+ <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>
|
|
<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>
|
|
<view v-if="form.storeType" class="f-s-30 c-333 f-w-5 flex1">{{ selectDictLabel(pt_warehouse_type, form.storeType) }}</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: '1' }"></select-warehouse-input>
|
|
<select-warehouse-input v-model="form.warehouses" title="添加农资存放库房" :params="{ type: '1' }"></select-warehouse-input>
|
|
|
</up-form-item>
|
|
</up-form-item>
|
|
@@ -398,88 +181,88 @@
|
|
|
import { useClientRequest } from '@/utils/request';
|
|
import { useClientRequest } from '@/utils/request';
|
|
|
import { formItemBtnStyle } from '@/assets/styles/uview-plus';
|
|
import { formItemBtnStyle } from '@/assets/styles/uview-plus';
|
|
|
import { AgroProductInstoreAddTypeEnum } from '../models/type';
|
|
import { AgroProductInstoreAddTypeEnum } from '../models/type';
|
|
|
-import AnimalsInput from '../models/animals-input.vue';
|
|
|
|
|
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 SelectWarehouseInput from '@/models/select-warehouse-input/select-warehouse-input.vue';
|
|
import SelectWarehouseInput from '@/models/select-warehouse-input/select-warehouse-input.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_material_type, pt_materail_unit, pt_materail_spec_unit, pt_source_type, yes_no, pt_seed_instore_type, pt_warehouse_type } = toRefs<any>(proxy?.useDict('pt_material_type', 'pt_materail_unit', 'pt_materail_spec_unit', 'pt_source_type', 'yes_no', 'pt_seed_instore_type', 'pt_warehouse_type') || {});
|
|
|
const paging = ref<any>(null);
|
|
const paging = ref<any>(null);
|
|
|
const upFormRef = ref<any>(null);
|
|
const upFormRef = ref<any>(null);
|
|
|
// 单条种源信息 + 入库信息的合并表单
|
|
// 单条种源信息 + 入库信息的合并表单
|
|
|
const form = ref<AgroProductInstoreAddTypeEnum | any>({
|
|
const form = ref<AgroProductInstoreAddTypeEnum | any>({
|
|
|
|
|
+ materialName: '',
|
|
|
|
|
+ materialType: '',
|
|
|
|
|
+ capacity: '',
|
|
|
|
|
+ unit: '',
|
|
|
|
|
+ spec: '',
|
|
|
|
|
+ specUnit: '',
|
|
|
|
|
+ sourceType: '',
|
|
|
|
|
+ supplierId: undefined,
|
|
|
|
|
+ supplierInfo: undefined,
|
|
|
|
|
+ supplierProducerFlag: '',
|
|
|
|
|
+ producer: '',
|
|
|
|
|
+ productCode: '',
|
|
|
|
|
+ productDate: '',
|
|
|
|
|
+ brand: '',
|
|
|
|
|
+ materialCode: '',
|
|
|
imgs: undefined,
|
|
imgs: undefined,
|
|
|
vedios: undefined,
|
|
vedios: undefined,
|
|
|
- spCert: [],
|
|
|
|
|
- newSpCert: [],
|
|
|
|
|
- importCert: [],
|
|
|
|
|
- seedCheckCert: [],
|
|
|
|
|
- unit: '',
|
|
|
|
|
- adcode: '',
|
|
|
|
|
|
|
+ examinReport: [],
|
|
|
|
|
+ instoreType: '2',
|
|
|
|
|
+ storeType: '1',
|
|
|
|
|
+ agroProductInfoList: [],
|
|
|
|
|
+ warehouses: [],
|
|
|
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({
|
|
const rules = reactive({
|
|
|
- // 种源信息校验(来自 info-edit)
|
|
|
|
|
- seedType: [{ required: true, message: '请选择种源类型' }],
|
|
|
|
|
- varietyId: [{ required: true, message: '请选择物种基原' }],
|
|
|
|
|
- seedSource: [{ required: true, message: '请选择种源来源' }],
|
|
|
|
|
- 'instoreBizInfo.motherFatherFlag': [{ required: true, message: '请选择父母本情况' }],
|
|
|
|
|
- 'instoreBizInfo.genCount': [
|
|
|
|
|
|
|
+ materialName: [{ required: true, message: '请输入产品名称' }],
|
|
|
|
|
+ materialType: [{ required: true, message: '请选择农资类别' }],
|
|
|
|
|
+ capacity: [{ required: true, message: '请输入入库量' }],
|
|
|
|
|
+ unit: [{ required: true, message: '请选择单位' }],
|
|
|
|
|
+ sourceType: [{ required: true, message: '请选择农资来源' }],
|
|
|
|
|
+ // 规格与规格单位仅在单位为 kg/L 时必填
|
|
|
|
|
+ spec: [
|
|
|
{
|
|
{
|
|
|
asyncValidator: (rule: any, value: any) => {
|
|
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']);
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ if (!['kg', 'L'].includes(form.value.unit as string) && !value) {
|
|
|
|
|
+ return Promise.reject('请输入规格');
|
|
|
}
|
|
}
|
|
|
return Promise.resolve();
|
|
return Promise.resolve();
|
|
|
},
|
|
},
|
|
|
},
|
|
},
|
|
|
],
|
|
],
|
|
|
- 'instoreBizInfo.genUnit': [
|
|
|
|
|
|
|
+ specUnit: [
|
|
|
{
|
|
{
|
|
|
asyncValidator: (rule: any, value: any) => {
|
|
asyncValidator: (rule: any, value: any) => {
|
|
|
- if (['A3', 'A4'].includes(form.value.seedType as string)) {
|
|
|
|
|
- if (!value) {
|
|
|
|
|
- return Promise.reject('请选择单位');
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ if (!['kg', 'L'].includes(form.value.unit as string) && !value) {
|
|
|
|
|
+ return Promise.reject('请选择规格单位');
|
|
|
}
|
|
}
|
|
|
return Promise.resolve();
|
|
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)
|
|
|
|
|
|
|
+ // 供应商仅在来源为“采购”等特定来源时必选(目前为来源=1)
|
|
|
|
|
+ supplierId: [
|
|
|
|
|
+ {
|
|
|
|
|
+ asyncValidator: (rule: any, value: any) => {
|
|
|
|
|
+ if (['1'].includes(form.value.sourceType as string) && !value) {
|
|
|
|
|
+ return Promise.reject('请选择供应商');
|
|
|
|
|
+ }
|
|
|
|
|
+ return Promise.resolve();
|
|
|
|
|
+ },
|
|
|
|
|
+ },
|
|
|
|
|
+ ],
|
|
|
|
|
+ agroProductInfoList: [{ required: true, message: '请添加农资信息', type: 'array', min: 1 }],
|
|
|
instoreType: [{ required: true, message: '请选择入库类型' }],
|
|
instoreType: [{ required: true, message: '请选择入库类型' }],
|
|
|
'instoreBizInfo.instoreDate': [{ required: true, message: '请选择入库日期' }],
|
|
'instoreBizInfo.instoreDate': [{ required: true, message: '请选择入库日期' }],
|
|
|
batchCode: [{ required: true, message: '请输入入库批号' }],
|
|
batchCode: [{ required: true, message: '请输入入库批号' }],
|
|
|
|
|
+ storeType: [{ required: true, message: '请选择库房类型' }],
|
|
|
'instoreBizInfo.instoreMg': [{ required: true, message: '请输入入库人' }],
|
|
'instoreBizInfo.instoreMg': [{ required: true, message: '请输入入库人' }],
|
|
|
});
|
|
});
|
|
|
-// 繁衍世代对象
|
|
|
|
|
-const genCountMap = reactive({
|
|
|
|
|
- A4: '累计扩繁代数',
|
|
|
|
|
- A3: '继代培养次数',
|
|
|
|
|
-});
|
|
|
|
|
|
|
|
|
|
// 提交:当前页面改为单条种源信息,直接提交合并后的对象
|
|
// 提交:当前页面改为单条种源信息,直接提交合并后的对象
|
|
|
const submitForm = async () => {
|
|
const submitForm = async () => {
|
|
@@ -497,14 +280,14 @@ const submitForm = async () => {
|
|
|
});
|
|
});
|
|
|
try {
|
|
try {
|
|
|
// 这里使用单条入库接口,后端若仍要求 batch,可根据需要包装成数组
|
|
// 这里使用单条入库接口,后端若仍要求 batch,可根据需要包装成数组
|
|
|
- const res = await useClientRequest.post('/plt-api/app/storageSeed/batchInstore', [form.value]);
|
|
|
|
|
|
|
+ const res = await useClientRequest.post('/plt-api/app/material/edit', form.value);
|
|
|
uni.hideLoading();
|
|
uni.hideLoading();
|
|
|
if (!res || res.code !== 200) return;
|
|
if (!res || res.code !== 200) return;
|
|
|
uni.showToast({
|
|
uni.showToast({
|
|
|
title: '提交成功',
|
|
title: '提交成功',
|
|
|
icon: 'success',
|
|
icon: 'success',
|
|
|
});
|
|
});
|
|
|
- uni.$emit('seed-source-detail-refresh');
|
|
|
|
|
|
|
+ uni.$emit('seed-agro-detail-refresh');
|
|
|
uni.$emit('refreshStorageRoomList');
|
|
uni.$emit('refreshStorageRoomList');
|
|
|
setTimeout(() => {
|
|
setTimeout(() => {
|
|
|
uni.navigateBack({
|
|
uni.navigateBack({
|
|
@@ -524,8 +307,8 @@ const generateBatchCode = async () => {
|
|
|
uni.showLoading({
|
|
uni.showLoading({
|
|
|
title: '生成中...',
|
|
title: '生成中...',
|
|
|
});
|
|
});
|
|
|
- const res = await useClientRequest.post('/plt-api/app/plantationTask/getBatchCode', {
|
|
|
|
|
- plType: 'S',
|
|
|
|
|
|
|
+ const res = await useClientRequest.post('/plt-api/app/material/getBatchCode', {
|
|
|
|
|
+ plType: 'M',
|
|
|
linkType: 'I',
|
|
linkType: 'I',
|
|
|
});
|
|
});
|
|
|
if (res && res.code === 200) {
|
|
if (res && res.code === 200) {
|
|
@@ -538,51 +321,11 @@ const generateBatchCode = async () => {
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
-// 选择物种、父母本逻辑保持与 info-edit 一致
|
|
|
|
|
-const selectVarietyId = () => {
|
|
|
|
|
- uni.$once('updateBiologicalname', function (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.instoreBizInfo.fatherVarietyId = data.msg.id;
|
|
|
|
|
- form.value.instoreBizInfo.fatherVarietyInfo = data.msg;
|
|
|
|
|
- });
|
|
|
|
|
- uni.$u.route({
|
|
|
|
|
- type: 'navigateTo',
|
|
|
|
|
- url: '/tools/por-torganism/index',
|
|
|
|
|
- params: {
|
|
|
|
|
- title: '选择父本品种',
|
|
|
|
|
- },
|
|
|
|
|
- });
|
|
|
|
|
-};
|
|
|
|
|
-const selectMotherVarietyId = () => {
|
|
|
|
|
- uni.$once('updateBiologicalname', function (data) {
|
|
|
|
|
- form.value.instoreBizInfo.motherVarietyId = data.msg.id;
|
|
|
|
|
- form.value.instoreBizInfo.motherVarietyInfo = data.msg;
|
|
|
|
|
- });
|
|
|
|
|
- uni.$u.route({
|
|
|
|
|
- type: 'navigateTo',
|
|
|
|
|
- url: '/tools/por-torganism/index',
|
|
|
|
|
- params: {
|
|
|
|
|
- title: '选择母本品种',
|
|
|
|
|
- },
|
|
|
|
|
- });
|
|
|
|
|
-};
|
|
|
|
|
const did = ref('');
|
|
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/material/getInfo/${id}`);
|
|
|
if (res && res.code === 200) {
|
|
if (res && res.code === 200) {
|
|
|
form.value = {
|
|
form.value = {
|
|
|
...form.value,
|
|
...form.value,
|