huangxw 1 ay önce
ebeveyn
işleme
3934af27c5

+ 7 - 0
src/pages.json

@@ -332,6 +332,13 @@
                     "style": {
                         "navigationBarTitleText": "新增鲜货入库"
                     }
+                },
+                 // 新增鲜货入库信息
+                {
+                    "path": "fresh-goods/info-edit/index",
+                    "style": {
+                        "navigationBarTitleText": "新增鲜货入库信息"
+                    }
                 },
                 // 修改鲜货信息,单条
                 {

+ 12 - 16
src/plant/storage/fresh-goods/add/index.vue

@@ -1,16 +1,16 @@
 <template>
     <z-paging class="" ref="paging" bgColor="#f7f7f7" paging-class="paging-btm-shadow" safe-area-inset-bottom scroll-with-animation>
         <template #top>
-            <ut-navbar :title="'新增种源入库'" :fixed="false" border></ut-navbar>
+            <ut-navbar :title="'新增外部鲜货入库'" :fixed="false" border></ut-navbar>
         </template>
         <up-form class="p-rtv" labelPosition="top" :model="form" :rules="rules" labelWidth="auto" ref="upFormRef">
-            <!-- 种源信息 -->
+            <!-- 鲜货信息 -->
             <view class="pd-24">
-                <view class="startline-title">种源信息</view>
+                <view class="startline-title">鲜货信息</view>
             </view>
             <view class="pd-24 bg-#fff">
-                <!-- TODO: 后续按 seedInfoList 设计种源信息明细,此处先留空结构避免表单错误 -->
-                <up-form-item borderBottom label="添加种源信息" required prop="seedInfoList">
+                <!-- TODO: 后续按 seedInfoList 设计鲜货信息明细,此处先留空结构避免表单错误 -->
+                <up-form-item borderBottom label="添加鲜货信息" required prop="seedInfoList">
                     <view class="flex1">
                         <template v-for="(item, index) in form.seedInfoList" :key="index">
                             <view class="bg-#FBFDFB card-info-block pd-24 p-rtv mb-12">
@@ -57,7 +57,7 @@
 
                         <up-button type="primary" plain @click="navigateToAddSeedSource('', 'add')">
                             <up-icon class="mr-10" name="plus" color="#37A954"></up-icon>
-                            <span>点击添加种源入库</span>
+                            <span>点击添加鲜货信息</span>
                         </up-button>
                     </view>
                 </up-form-item>
@@ -66,10 +66,6 @@
                 <view class="startline-title">入库信息</view>
             </view>
             <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">
                     <view v-if="form.instoreType" class="f-s-30 c-333 f-w-5 flex1">{{ selectDictLabel(pt_seed_instore_type, form.instoreType) }}</view>
@@ -98,7 +94,7 @@
                     <view v-else class="f-s-30 c-ccc f-w-4 flex1">请选择库房类型</view>
                 </up-form-item>
                 <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: '4' }"></select-warehouse-input>
                 </up-form-item>
                 <!-- 入库人 -->
                 <up-form-item borderBottom label="入库人" required prop="instoreBizInfo.instoreMg">
@@ -133,7 +129,7 @@ const upFormRef = ref<any>(null);
 const showArea = ref(false);
 const form = ref<SeedSourceAddTypeEnum>({
     instoreType: '2',
-    storeType: '2',
+    storeType: '4',
     seedInfoList: [],
     warehouses: [],
     instoreBizInfo: {
@@ -143,7 +139,7 @@ const form = ref<SeedSourceAddTypeEnum>({
     },
 });
 const rules = reactive({
-    seedInfoList: [{ required: true, message: '请添加种源信息', type: 'array', min: 1 }],
+    seedInfoList: [{ required: true, message: '请添加鲜货信息', type: 'array', min: 1 }],
     instoreType: [{ required: true, message: '请选择入库类型' }],
     'instoreBizInfo.instoreDate': [{ required: true, message: '请选择入库日期' }],
     batchCode: [{ required: true, message: '请输入入库批号' }],
@@ -206,7 +202,7 @@ const generateBatchCode = async () => {
         title: '生成中...',
     });
     const res = await useClientRequest.post('/plt-api/app/plantationTask/getBatchCode', {
-        plType: 'Z',
+        plType: 'X',
         linkType: 'I',
     });
     if (res && res.code === 200) {
@@ -220,7 +216,7 @@ const generateBatchCode = async () => {
 };
 
 const uidMapData = ref({} as any);
-// 添加种源入库跳转
+// 添加鲜货入库跳转
 const navigateToAddSeedSource = (uid = '', mode = 'add') => {
     uni.$on('submitForm', (data: any) => {
         uidMapData.value[data.uid] = data.form;
@@ -230,7 +226,7 @@ const navigateToAddSeedSource = (uid = '', mode = 'add') => {
         uni.$off('submitForm');
     });
     uni.navigateTo({
-        url: '/plant/storage/seed-source/info-edit/index',
+        url: '/plant/storage/fresh-goods/info-edit/index',
         success(res) {
             res.eventChannel.emit('optionsParam', {
                 uid: uid || generateUniqueId(),

+ 37 - 333
src/plant/storage/fresh-goods/info-edit/index.vue

@@ -1,27 +1,16 @@
 <template>
     <z-paging class="" ref="paging" bgColor="#fff" paging-class="paging-btm-shadow" safe-area-inset-bottom scroll-with-animation>
         <template #top>
-            <ut-navbar :title="optionsParam?.mode == 'edit' ? '编辑种源入库信息' : '添加种源入库信息'" :fixed="false" border></ut-navbar>
+            <ut-navbar :title="optionsParam?.mode == 'edit' ? '编辑鲜货入库信息' : '添加鲜货入库信息'" :fixed="false" border></ut-navbar>
         </template>
         <view class="pd-24">
             <up-form class="p-rtv" labelPosition="top" :model="form" :rules="rules" labelWidth="auto" ref="upFormRef">
-                <!-- 基本信息 -->
-                <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">
+                <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>
+                            <span>请选择动植物名称</span>
                         </up-button>
                         <view v-else class="bg-#FBFDFB card-info-block pd-24 p-rtv">
                             <view class="mb-16">
@@ -45,160 +34,19 @@
                         </view>
                     </view>
                 </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 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="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>
                             <up-icon size="22rpx" color="#2A6D52" name="arrow-down-fill"></up-icon>
                         </template>
                     </up-form-item>
                 </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>
-                                </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="unitpppp"></view>
@@ -211,10 +59,10 @@
                         </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="选择单位">
+                            <ut-action-sheet v-model="form.unit" :tabs="pt_medicine_unit" mode="custom" title="选择单位">
                                 <up-form-item prop="unit" border-bottom class="form-item-top-padding-0">
                                     <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_medicine_unit, form.unit) }}</view>
                                         <view v-else class="f-s-30 c-ccc f-w-4 text-center">单位</view>
                                     </view>
                                     <template #right>
@@ -225,10 +73,7 @@
                         </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 borderBottom label="供应商" prop="supplierId" required>
                         <view class="flex1">
@@ -244,95 +89,35 @@
                         <up-input v-model="form.producer" placeholder="请输入生产商名称" border="none" clearable></up-input>
                     </up-form-item>
                 </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>
-
-                <!-- 种源产地 -->
-                <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="选择鲜货产地" >
+                    <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>
                             <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>
+                <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>
                             <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>
+                </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 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>
         </view>
@@ -346,75 +131,20 @@
 <script setup lang="ts">
 import { useClientRequest } from '@/utils/request';
 import { seedInfoListType } from '../models/type';
-import AnimalsInput from '../models/animals-input.vue';
 import ContactUnitInput from '@/models/contact-unit-input/contact-unit-input.vue';
 import PickerAreaInput from '@/models/picker-area-input/picker-area-input.vue';
 
 const { proxy } = getCurrentInstance() as ComponentInternalInstance;
-const { pt_seed_type, pt_seed_source, pt_materail_unit, pt_mother_father_flag, 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_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_medicine_source, pt_medicine_unit, } = toRefs<any>(proxy?.useDict('pt_medicine_source', 'pt_medicine_unit'));
 const paging = ref<any>(null);
-const selectContactUnitShow = ref(false);
 const upFormRef = ref<any>(null);
 const form = ref<seedInfoListType>({
-    imgs: undefined,
-    vedios: undefined,
-    spCert: [],
-    newSpCert: [],
-    importCert: [],
-    seedCheckCert: [],
-    unit: '',
-    adcode: '',
-    instoreBizInfo: {
-        motherFatherFlag: '',
-        idFlag: '1',
-        genUnit: '',
-    },
-    supplierId: undefined,
-    generationMaterial: '',
+
 });
 const rules = reactive({
-    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: '请输入个体标识号' }],
-});
-// 繁衍世代对象
-const genCountMap = reactive({
-    A4: '累计扩繁代数',
-    A3: '继代培养次数',
+   
 });
+
 const submitForm = async () => {
     console.log(form.value);
     uni.$u.debounce(
@@ -444,7 +174,7 @@ const submitForm = async () => {
         true,
     );
 };
-// 去选择物种基原
+// 去选择动植物名称
 const selectVarietyId = () => {
     uni.$once('updateBiologicalname', function (data) {
         form.value.varietyId = data.msg.id;
@@ -454,33 +184,7 @@ const selectVarietyId = () => {
         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: '选择母本品种',
+            title: '选择动植物名称',
         },
     });
 };

+ 8 - 8
src/plant/storage/fresh-goods/list/index.vue

@@ -1,7 +1,7 @@
 <template>
     <z-paging ref="paging" v-model="list" bgColor="#f7f7f7" @query="query">
         <template #top>
-            <ut-navbar title="种源库" :fixed="false"></ut-navbar>
+            <ut-navbar title="鲜货库" :fixed="false"></ut-navbar>
         </template>
 
         <view class="pd3-24-24-0">
@@ -82,23 +82,23 @@
 
         <template #empty>
             <view class="d-flex flex-cln a-c" style="margin-top: -200rpx">
-                <ut-empty class="mg-at" color="#ccc" size="28rpx">暂无种源信息,点击下方+号新增吧</ut-empty>
+                <ut-empty class="mg-at" color="#ccc" size="28rpx">暂无鲜货信息,点击下方+号新增吧</ut-empty>
             </view>
         </template>
         <template #bottom>
-            <source-bottom></source-bottom>
+            <fresh-goods-bottom></fresh-goods-bottom>
         </template>
     </z-paging>
 </template>
 <script setup lang="ts">
 import { useClientRequest } from '@/utils/request';
-import SourceBottom from './model/source-bottom.vue';
 import { selectDictListClass } from '@/utils/ruoyi';
 import { getStorageRoomNames } from '@/utils/common';
+import FreshGoodsBottom from './model/fresh-goods-bottom.vue';
 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 list = ref<any[]>();
-const form = ref({ keyword: '', restFlag: '1', instoreType: '' });
+const form = ref({ keyword: '', restFlag: '1', instoreType: '', storageType: '2' });
 const paging = ref();
 const tabs = ref([
     { label: '有库存', value: '1' },
@@ -114,7 +114,7 @@ const query = async (pageNum: number, pageSize: number) => {
         pageSize,
         ...form.value,
     };
-    const res = await useClientRequest.get('/plt-api/app/storageSeed/page', params);
+    const res = await useClientRequest.get('/plt-api/app/storage/list', params);
     if (res) {
         const { rows } = res;
         paging.value.complete(rows);
@@ -136,7 +136,7 @@ const clickTempSwipe = async (event: object) => {
         try {
             const res = await uni.showModal({
                 title: '删除提示',
-                content: '确定删除种源信息吗?',
+                content: '确定删除鲜货信息吗?',
                 confirmColor: '#F74C30',
             });
             if (!res.confirm) return;
@@ -152,7 +152,7 @@ const clickTempSwipe = async (event: object) => {
             });
             paging.value?.reload();
         } catch (error) {
-            console.error('删除暂存种源信息失败:', error);
+            console.error('删除暂存鲜货信息失败:', error);
         }
     }
 };

+ 4 - 4
src/plant/storage/fresh-goods/list/model/source-bottom.vue → src/plant/storage/fresh-goods/list/model/fresh-goods-bottom.vue

@@ -25,14 +25,14 @@
                         <image class="w-68 h-68" src="https://ta.zycpzs.cn/oss-file/smart-trace/szyy/images-plt/plant/storage/xzsyrk_icon_sd.png" mode="widthFix" />
                     </view>
                     <view class="f-s-28 c-#333">新增溯源入库</view>
-                    <view class="f-s-22 c-#999">适合贴有溯源码的种源</view>
+                    <view class="f-s-22 c-#999">适合贴有溯源码的鲜货</view>
                 </view>
-                <view class="flex1 d-flex flex-cln a-c pt-160 pr-30" @click="clickBtnBall();$u.route({ url: '/plant/storage/seed-source/add/index' });">
+                <view class="flex1 d-flex flex-cln a-c pt-160 pr-30" @click="clickBtnBall();$u.route({ url: '/plant/storage/fresh-goods/add/index' });">
                      <view>
                         <image class="w-68 h-68" src="https://ta.zycpzs.cn/oss-file/smart-trace/szyy/images-plt/plant/storage/xzfsyrk_icon_sd.png" mode="widthFix" />
                     </view>
                     <view class="f-s-28 c-#333">新增非溯源入库</view>
-                    <view class="f-s-22 c-#999">适合无法溯源的种源</view>
+                    <view class="f-s-22 c-#999">适合无法溯源的鲜货</view>
                 </view>
                 </view>
         </view>
@@ -43,7 +43,7 @@ const windowInfo = uni.getWindowInfo();
 const safeAreaBottom = windowInfo.safeAreaInsets.bottom;
 const btnStyle = ref('add')
 const mapTextBtn = ref<any>({
-    add: '新增种源信息',
+    add: '新增鲜货信息',
     close: '关闭',
 });
 const clickBtnBall = () => {

+ 1 - 1
src/plant/storage/seed-source/add/index.vue

@@ -126,7 +126,7 @@ import { parseTime } from '@/utils/ruoyi';
 import SelectWarehouseInput from '@/models/select-warehouse-input/select-warehouse-input.vue';
 
 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_seed_type, pt_seed_source } = toRefs<any>(proxy?.useDict('pt_seed_instore_type, pt_warehouse_type, pt_seed_type, pt_seed_source'));
 // 表单与分页等基础状态(参考 base-edit 风格)
 const paging = ref<any>(null);
 const upFormRef = ref<any>(null);

+ 1 - 1
src/plant/storage/seed-source/detail/index.vue

@@ -277,7 +277,7 @@ import { useClientRequest } from '@/utils/request';
 import { selectDictListClass } from '@/utils/ruoyi';
 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_seed_type, pt_seed_source,pt_mother_father_flag, pt_fungus_code_type, pt_breeding_materials, yes_no, pt_gen_unit } = toRefs<any>(proxy?.useDict('pt_seed_instore_type', 'pt_seed_type', 'pt_seed_source', 'pt_mother_father_flag', 'pt_fungus_code_type', 'pt_breeding_materials', 'yes_no', 'pt_gen_unit'));
 const paging = ref<any>(null);
 const form = ref<any>({});
 const did = ref('');

+ 1 - 3
src/plant/storage/seed-source/info-edit/index.vue

@@ -349,11 +349,9 @@ import { seedInfoListType } from '../models/type';
 import AnimalsInput from '../models/animals-input.vue';
 import ContactUnitInput from '@/models/contact-unit-input/contact-unit-input.vue';
 import PickerAreaInput from '@/models/picker-area-input/picker-area-input.vue';
-
 const { proxy } = getCurrentInstance() as ComponentInternalInstance;
-const { pt_seed_type, pt_seed_source, pt_materail_unit, pt_mother_father_flag, pt_seed_unit, pt_fungus_code_type, pt_breeding_materials, yes_no, pt_cus_type, pt_cpy_type, pt_gen_unit, pt_seed_source_tag } = toRefs<any>(proxy?.useDict('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', 'pt_seed_source_tag'));
+const { pt_seed_type, pt_seed_source,  pt_mother_father_flag, pt_seed_unit, pt_fungus_code_type, pt_breeding_materials, yes_no, pt_gen_unit, pt_seed_source_tag } = toRefs<any>(proxy?.useDict('pt_seed_type', 'pt_seed_source', 'pt_mother_father_flag', 'pt_seed_unit', 'pt_fungus_code_type', 'pt_breeding_materials', 'yes_no', 'pt_gen_unit', 'pt_seed_source_tag'));
 const paging = ref<any>(null);
-const selectContactUnitShow = ref(false);
 const upFormRef = ref<any>(null);
 const form = ref<seedInfoListType>({
     imgs: undefined,

+ 1 - 1
src/plant/storage/seed-source/list/index.vue

@@ -96,7 +96,7 @@ import SourceBottom from './model/source-bottom.vue';
 import { selectDictListClass } from '@/utils/ruoyi';
 import { getStorageRoomNames } from '@/utils/common';
 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_seed_type, pt_fungus_code_type, } = toRefs<any>(proxy?.useDict('pt_seed_instore_type', 'pt_seed_type', 'pt_fungus_code_type'));
 const list = ref<any[]>();
 const form = ref({ keyword: '', restFlag: '1', instoreType: '' });
 const paging = ref();