Forráskód Böngészése

Merge branch 'master' of http://git.yujin.shuziyunyao.com/yujin/forestry-wx

lisy 4 hete
szülő
commit
431088006d

+ 11 - 0
src/assets/styles/uview-plus.scss

@@ -49,4 +49,15 @@ uni-button::after{
     .zp-page-bottom-container {
     .zp-page-bottom-container {
         box-shadow: 0px 0px 6rpx 0px #AECEBF;
         box-shadow: 0px 0px 6rpx 0px #AECEBF;
     }
     }
+}
+:deep(.form-item-top-padding-0) {
+    >.u-form-item__body {
+        padding-top: 0rpx;
+    }
+}
+
+:deep(.form-item-bottom-padding-0) {
+    >.u-form-item__body {
+        padding-bottom: 0rpx;
+    }
 }
 }

+ 3 - 3
src/plant/storage/agro-product/detail/index.vue

@@ -34,9 +34,9 @@
                     <span class="c-#666">入库批号:</span>
                     <span class="c-#666">入库批号:</span>
                     <span class="c-#333 f-w-500">{{ form?.batchCode }}</span>
                     <span class="c-#333 f-w-500">{{ form?.batchCode }}</span>
                 </view>
                 </view>
-                <view v-if="form?.supplier" class="pd2-4-0 f-s-28">
+                <view v-if="form?.supplierId" class="pd2-4-0 f-s-28">
                     <span class="c-#666">供应商:</span>
                     <span class="c-#666">供应商:</span>
-                    <span class="c-#333 f-w-500">{{ form?.supplier }}</span>
+                    <span class="c-#333 f-w-500">{{ form?.supplierInfo?.cusName || '-' }}</span>
                 </view>
                 </view>
                 <view v-if="form?.warehouses?.length" class="pd2-4-0 f-s-28">
                 <view v-if="form?.warehouses?.length" class="pd2-4-0 f-s-28">
                     <span class="c-#666">存放库房:</span>
                     <span class="c-#666">存放库房:</span>
@@ -47,7 +47,7 @@
                     <span class="c-#333 f-w-500">{{ form?.capacity }}{{ form?.unit }}</span>
                     <span class="c-#333 f-w-500">{{ form?.capacity }}{{ form?.unit }}</span>
                 </view>
                 </view>
                 <view class="d-flex">
                 <view class="d-flex">
-                    <view v-if="form?.restAmount" class="pd2-4-0 f-s-28 flex1">
+                    <view v-if="form?.inputAmount" class="pd2-4-0 f-s-28 flex1">
                         <span class="c-#666">出库量:</span>
                         <span class="c-#666">出库量:</span>
                         <span class="c-#333 f-w-500">{{ form?.inputAmount || '0' }}{{ form?.unit }}</span>
                         <span class="c-#333 f-w-500">{{ form?.inputAmount || '0' }}{{ form?.unit }}</span>
                     </view>
                     </view>

+ 15 - 4
src/plant/storage/agro-product/info-update/index.vue

@@ -152,8 +152,8 @@
                     <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>
                 <!-- 存放库房(具体库房/货架信息稍后补充为选择器) -->
                 <!-- 存放库房(具体库房/货架信息稍后补充为选择器) -->
@@ -209,7 +209,7 @@ const form = ref<AgroProductInstoreAddTypeEnum | any>({
     vedios: undefined,
     vedios: undefined,
     examinReport: [],
     examinReport: [],
     instoreType: '2',
     instoreType: '2',
-    storeType: '1',
+    storageType: '1',
     agroProductInfoList: [],
     agroProductInfoList: [],
     warehouses: [],
     warehouses: [],
     instoreBizInfo: {
     instoreBizInfo: {
@@ -260,7 +260,7 @@ const rules = reactive({
     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: '请选择库房类型' }],
+    storageType: [{ required: true, message: '请选择库房类型' }],
     'instoreBizInfo.instoreMg': [{ required: true, message: '请输入入库人' }],
     'instoreBizInfo.instoreMg': [{ required: true, message: '请输入入库人' }],
 });
 });
 
 
@@ -357,4 +357,15 @@ onLoad((options: any) => {
     right: 0;
     right: 0;
     z-index: 10;
     z-index: 10;
 }
 }
+:deep(.form-item-top-padding-0) {
+    >.u-form-item__body {
+        padding-top: 0rpx;
+    }
+}
+
+:deep(.form-item-bottom-padding-0) {
+    >.u-form-item__body {
+        padding-bottom: 0rpx;
+    }
+}
 </style>
 </style>

+ 3 - 3
src/plant/storage/agro-product/list/index.vue

@@ -37,16 +37,16 @@
                             <span class="c-#666">存放库房:</span>
                             <span class="c-#666">存放库房:</span>
                             <span class="c-#333 f-w-500">{{ getStorageRoomNames(item?.warehouses) || '-' }}</span>
                             <span class="c-#333 f-w-500">{{ getStorageRoomNames(item?.warehouses) || '-' }}</span>
                         </view>
                         </view>
-                        <view class="pd2-4-0 f-s-28">
+                        <view v-if="item?.supplierId" class="pd2-4-0 f-s-28">
                             <span class="c-#666">供应商:</span>
                             <span class="c-#666">供应商:</span>
-                            <span class="c-#333 f-w-500">{{ item?.supplier }}</span>
+                            <span class="c-#333 f-w-500">{{ item?.supplierInfo?.cusName }}</span>
                         </view>
                         </view>
                         <view class="pd2-4-0 f-s-28">
                         <view class="pd2-4-0 f-s-28">
                             <span class="c-#666">入库量:</span>
                             <span class="c-#666">入库量:</span>
                             <span class="c-#333 f-w-500">{{ item?.capacity }}{{ item?.unit }}</span>
                             <span class="c-#333 f-w-500">{{ item?.capacity }}{{ item?.unit }}</span>
                         </view>
                         </view>
                         <view class="d-flex">
                         <view class="d-flex">
-                            <view v-if="item?.restAmount" class="pd2-4-0 f-s-28 flex1">
+                            <view v-if="item?.inputAmount" class="pd2-4-0 f-s-28 flex1">
                                 <span class="c-#666">出库量:</span>
                                 <span class="c-#666">出库量:</span>
                                 <span class="c-#333 f-w-500">{{ item?.inputAmount || '0' }}{{ item?.unit }}</span>
                                 <span class="c-#333 f-w-500">{{ item?.inputAmount || '0' }}{{ item?.unit }}</span>
                             </view>
                             </view>

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

@@ -174,7 +174,7 @@ const submitForm = async () => {
                     });
                     });
                 }, 1500);
                 }, 1500);
             } catch (error) {
             } catch (error) {
-                uni.hideLoading();
+                // uni.hideLoading();
             }
             }
         },
         },
         500,
         500,

+ 11 - 34
src/plant/storage/fresh-goods/detail/index.vue

@@ -23,19 +23,15 @@
                 </view>
                 </view>
                 <view class="mb-10">
                 <view class="mb-10">
                     <span class="f-s-34 c-#333 f-w-500 mr-10">{{ form?.variety }}</span>
                     <span class="f-s-34 c-#333 f-w-500 mr-10">{{ form?.variety }}</span>
-                    <span class="f-s-24 c-#666">{{ selectDictLabel(pt_seed_type, form?.seedType) }}</span>
+                    <span v-if="form?.partName" class="f-s-24 c-#666">{{ form?.partName }}</span>
                 </view>
                 </view>
                 <view class="pd2-4-0 f-s-28">
                 <view class="pd2-4-0 f-s-28">
                     <span class="c-#666">入库批号:</span>
                     <span class="c-#666">入库批号:</span>
                     <span class="c-#333 f-w-500">{{ form?.batchCode }}</span>
                     <span class="c-#333 f-w-500">{{ form?.batchCode }}</span>
                 </view>
                 </view>
-                <view v-if="['A3', 'A4'].includes(form?.fungusCodeType)" class="pd2-4-0 f-s-28">
-                    <span class="c-#666">菌种/菌株编号:</span>
-                    <span class="c-#333 f-w-500">{{ selectDictLabel(pt_fungus_code_type, form?.fungusCodeType) }}/{{ form?.fungusCode }}</span>
-                </view>
-                <view class="pd2-4-0 f-s-28">
+                <view v-if="form?.supplierId" class="pd2-4-0 f-s-28">
                     <span class="c-#666">供应商:</span>
                     <span class="c-#666">供应商:</span>
-                    <span class="c-#333 f-w-500">{{ form?.supplier }}</span>
+                    <span class="c-#333 f-w-500">{{ form?.supplierInfo?.cusName || '-' }}</span>
                 </view>
                 </view>
                 <view v-if="form?.warehouses?.length" class="pd2-4-0 f-s-28">
                 <view v-if="form?.warehouses?.length" class="pd2-4-0 f-s-28">
                     <span class="c-#666">存放库房:</span>
                     <span class="c-#666">存放库房:</span>
@@ -46,7 +42,7 @@
                     <span class="c-#333 f-w-500">{{ form?.capacity }}{{ form?.unit }}</span>
                     <span class="c-#333 f-w-500">{{ form?.capacity }}{{ form?.unit }}</span>
                 </view>
                 </view>
                 <view class="d-flex">
                 <view class="d-flex">
-                    <view v-if="form?.restAmount" class="pd2-4-0 f-s-28 flex1">
+                    <view v-if="form?.inputAmount" class="pd2-4-0 f-s-28 flex1">
                         <span class="c-#666">出库量:</span>
                         <span class="c-#666">出库量:</span>
                         <span class="c-#333 f-w-500">{{ form?.inputAmount || '0' }}{{ form?.unit }}</span>
                         <span class="c-#333 f-w-500">{{ form?.inputAmount || '0' }}{{ form?.unit }}</span>
                     </view>
                     </view>
@@ -190,26 +186,7 @@ import { useClientRequest } from '@/utils/request';
 import { selectDictListClass } from '@/utils/ruoyi';
 import { selectDictListClass } 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, pt_medicine_source, pt_medicine_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',
-        'pt_medicine_source',
-        'pt_medicine_unit',
-    ),
-);
+const { pt_seed_instore_type,yes_no, pt_medicine_source, pt_medicine_unit } = toRefs<any>(proxy?.useDict('pt_seed_instore_type','yes_no', 'pt_medicine_source', 'pt_medicine_unit'));
 const paging = ref<any>(null);
 const paging = ref<any>(null);
 const form = ref<any>({});
 const form = ref<any>({});
 const did = ref('');
 const did = ref('');
@@ -223,7 +200,7 @@ const genCountMap = reactive({
 // 获取详情(仓库信息)
 // 获取详情(仓库信息)
 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 = res.data || {};
         form.value = res.data || {};
     }
     }
@@ -234,7 +211,7 @@ const navigateToInOutRecords = () => {
         url: '/plant/storage/stock-list/index',
         url: '/plant/storage/stock-list/index',
         params: {
         params: {
             id: did.value,
             id: did.value,
-            stockType: '2',
+            stockType: '4',
         },
         },
     });
     });
 };
 };
@@ -248,7 +225,7 @@ const navigateToInventoryLoss = () => {
         url: '/plant/storage/loss-register/index',
         url: '/plant/storage/loss-register/index',
         success: (res) => {
         success: (res) => {
             res.eventChannel.emit('storage-data', {
             res.eventChannel.emit('storage-data', {
-                stockType: '2',
+                stockType: '4',
                 ...form.value,
                 ...form.value,
             });
             });
         },
         },
@@ -259,13 +236,13 @@ const onRefresh = () => {
     paging.value?.complete();
     paging.value?.complete();
 };
 };
 const clickEdit = () => {
 const clickEdit = () => {
-    uni.$on('seed-source-detail-refresh', () => {
+    uni.$on('fresh-goods-detail-refresh', () => {
         getDetailById(did.value);
         getDetailById(did.value);
-        uni.$off('seed-source-detail-refresh');
+        uni.$off('fresh-goods-detail-refresh');
     });
     });
     uni.$u.route({
     uni.$u.route({
         type: 'navigateTo',
         type: 'navigateTo',
-        url: '/plant/storage/seed-source/info-update/index',
+        url: '/plant/storage/fresh-goods/info-update/index',
         params: {
         params: {
             id: did.value,
             id: did.value,
         },
         },

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

@@ -54,7 +54,7 @@
                 <!-- 入库数量与单位 -->
                 <!-- 入库数量与单位 -->
                 <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="入库量" required class="form-item-bottom-padding-0">
                     <div class="flex1 d-flex">
                     <div class="flex1 d-flex">
                         <div class="flex1 ov-hd">
                         <div class="flex1 ov-hd">
                             <up-form-item prop="capacity" border-bottom class="form-item-top-padding-0">
                             <up-form-item prop="capacity" border-bottom class="form-item-top-padding-0">

+ 55 - 350
src/plant/storage/fresh-goods/info-update/index.vue

@@ -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,

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

@@ -26,7 +26,7 @@
         <view class="pd-24 bg-#f7f7f7">
         <view class="pd-24 bg-#f7f7f7">
             <up-swipe-action>
             <up-swipe-action>
                 <up-swipe-action-item v-for="(item, index) in list" :key="index" :name="item?.id" :options="optionsActionTemp" @click="clickTempSwipe" class="mb-20 b-radius">
                 <up-swipe-action-item v-for="(item, index) in list" :key="index" :name="item?.id" :options="optionsActionTemp" @click="clickTempSwipe" class="mb-20 b-radius">
-                    <view class="b-radius bg-#fff pd-20 p-rtv" @click.stop="$u.route({ url: '/plant/storage/seed-source/detail/index', params: { id: item.id } })">
+                    <view class="b-radius bg-#fff pd-20 p-rtv" @click.stop="$u.route({ url: '/plant/storage/fresh-goods/detail/index', params: { id: item.id } })">
                         <view class="d-flex j-sb a-c li-item-head mb-16">
                         <view class="d-flex j-sb a-c li-item-head mb-16">
                             <view class="li-left-tag" :class="{ [`bg-${selectDictListClass(pt_seed_instore_type, item?.instoreType)}`]: true }">{{ selectDictLabel(pt_seed_instore_type, item?.instoreType) }}</view>
                             <view class="li-left-tag" :class="{ [`bg-${selectDictListClass(pt_seed_instore_type, item?.instoreType)}`]: true }">{{ selectDictLabel(pt_seed_instore_type, item?.instoreType) }}</view>
                             <view class="f-s-22 c-#666">{{ item?.instoreBizInfo?.instoreDate }}</view>
                             <view class="f-s-22 c-#666">{{ item?.instoreBizInfo?.instoreDate }}</view>
@@ -34,7 +34,7 @@
                         <view class="d-flex flex1 mb-10">
                         <view class="d-flex flex1 mb-10">
                             <view class="flex1">
                             <view class="flex1">
                                 <span class="f-s-34 c-#333 f-w-500 mr-10">{{ item?.variety }}</span>
                                 <span class="f-s-34 c-#333 f-w-500 mr-10">{{ item?.variety }}</span>
-                                <span class="f-s-24 c-#666">{{ selectDictLabel(pt_seed_type, item?.seedType) }}</span>
+                                <span v-if="item?.partName" class="f-s-24 c-#666">{{ item?.partName }}</span>
                             </view>
                             </view>
                             <view>
                             <view>
                                 <view v-if="item?.examinReport?.length" class="tag-span c-primary bg-#EBF6EE">已检验</view>
                                 <view v-if="item?.examinReport?.length" class="tag-span c-primary bg-#EBF6EE">已检验</view>
@@ -43,17 +43,9 @@
                         </view>
                         </view>
                         <view class="pd2-4-0 f-s-28">
                         <view class="pd2-4-0 f-s-28">
                             <span class="c-#666">入库批号:</span>
                             <span class="c-#666">入库批号:</span>
-                            <span class="c-#333 f-w-500">{{ item?.batchCode }}</span>
+                            <span class="c-#333 f-w-500">{{ item?.batchCode || '-' }}</span>
                         </view>
                         </view>
-                        <!-- <view class="pd2-4-0 f-s-28">
-                            <span class="c-#666">溯源批号:</span>
-                            <span class="c-#333 f-w-500">暂无</span>
-                        </view> -->
-                        <view v-if="['A3', 'A4'].includes(item?.fungusCodeType)" class="pd2-4-0 f-s-28">
-                            <span class="c-#666">菌种/菌株编号:</span>
-                            <span class="c-#333 f-w-500">{{ selectDictLabel(pt_fungus_code_type, item?.fungusCodeType) }}/{{ item?.fungusCode }}</span>
-                        </view>
-                        <view class="pd2-4-0 f-s-28">
+                        <view v-if="item?.supplierId" class="pd2-4-0 f-s-28">
                             <span class="c-#666">供应商:</span>
                             <span class="c-#666">供应商:</span>
                             <span class="c-#333 f-w-500">{{ item?.supplierInfo?.cusName || '-' }}</span>
                             <span class="c-#333 f-w-500">{{ item?.supplierInfo?.cusName || '-' }}</span>
                         </view>
                         </view>
@@ -66,7 +58,7 @@
                             <span class="c-#333 f-w-500">{{ item?.capacity }}{{ item?.unit }}</span>
                             <span class="c-#333 f-w-500">{{ item?.capacity }}{{ item?.unit }}</span>
                         </view>
                         </view>
                         <view class="d-flex">
                         <view class="d-flex">
-                            <view v-if="item?.restAmount" class="pd2-4-0 f-s-28 flex1">
+                            <view v-if="item?.inputAmount" class="pd2-4-0 f-s-28 flex1">
                                 <span class="c-#666">出库量:</span>
                                 <span class="c-#666">出库量:</span>
                                 <span class="c-#333 f-w-500">{{ item?.inputAmount || '0' }}{{ item?.unit }}</span>
                                 <span class="c-#333 f-w-500">{{ item?.inputAmount || '0' }}{{ item?.unit }}</span>
                             </view>
                             </view>
@@ -96,9 +88,9 @@ import { selectDictListClass } from '@/utils/ruoyi';
 import { getStorageRoomNames } from '@/utils/common';
 import { getStorageRoomNames } from '@/utils/common';
 import FreshGoodsBottom from './model/fresh-goods-bottom.vue';
 import FreshGoodsBottom from './model/fresh-goods-bottom.vue';
 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 } = toRefs<any>(proxy?.useDict('pt_seed_instore_type'));
 const list = ref<any[]>();
 const list = ref<any[]>();
-const form = ref({ keyword: '', restFlag: '1', instoreType: '', storageType: '2' });
+const form = ref({ keyword: '', restFlag: '1', instoreType: '', storageType: '4' });
 const paging = ref();
 const paging = ref();
 const tabs = ref([
 const tabs = ref([
     { label: '有库存', value: '1' },
     { label: '有库存', value: '1' },
@@ -144,7 +136,7 @@ const clickTempSwipe = async (event: object) => {
                 title: '删除中...',
                 title: '删除中...',
                 mask: true,
                 mask: true,
             });
             });
-            await useClientRequest.get(`/plt-api/app/storageSeed/removeById/${name}`);
+            await useClientRequest.get(`/plt-api/app/storage/removeById/${name}`);
             uni.hideLoading();
             uni.hideLoading();
             uni.showToast({
             uni.showToast({
                 title: '删除成功',
                 title: '删除成功',

+ 1 - 1
src/plant/storage/fresh-goods/models/type.ts

@@ -85,7 +85,7 @@ export interface FreshGoodsInstoreItemForm {
 }
 }
 
 
 // 兼容旧命名(历史页面仍在使用)
 // 兼容旧命名(历史页面仍在使用)
-export type seedInfoListType = FreshGoodsInstoreItemForm;
+export type FreshGoodsInfoType = FreshGoodsInstoreItemForm;
 
 
 export interface AccesseryDTO {
 export interface AccesseryDTO {
     /**
     /**

+ 39 - 2
src/plant/storage/loss-register/index.vue

@@ -79,6 +79,42 @@
                             </view>
                             </view>
                         </view>
                         </view>
                     </template>
                     </template>
+                    <template v-if="info?.stockType === '4'">
+                        <view class="d-flex j-sb a-c li-item-head mb-16">
+                            <view class="li-left-tag" :class="{ [`bg-${selectDictListClass(pt_seed_instore_type, info?.instoreType)}`]: true }">{{ selectDictLabel(pt_seed_instore_type, info?.instoreType) }}</view>
+                            <view class="f-s-22 c-#666">{{ info?.instoreBizInfo?.instoreDate }}</view>
+                        </view>
+                        <view class="mb-10">
+                            <span class="f-s-34 c-#333 f-w-500 mr-10">{{ info?.variety }}</span>
+                            <span v-if="info?.partName" class="f-s-24 c-#666">{{ info?.partName }}</span>
+                        </view>
+                        <view class="pd2-4-0 f-s-28">
+                            <span class="c-#666">入库批号:</span>
+                            <span class="c-#333 f-w-500">{{ info?.batchCode }}</span>
+                        </view>
+                        <view v-if="info?.supplierId" class="pd2-4-0 f-s-28">
+                            <span class="c-#666">供应商:</span>
+                            <span class="c-#333 f-w-500">{{ info?.supplierInfo?.cusName || '-' }}</span>
+                        </view>
+                        <view v-if="info?.warehouses?.length" class="pd2-4-0 f-s-28">
+                            <span class="c-#666">存放库房:</span>
+                            <span class="c-#333 f-w-500">{{ getStorageRoomNames(info?.warehouses) || '-' }}</span>
+                        </view>
+                        <view class="pd2-4-0 f-s-28">
+                            <span class="c-#666">入库量:</span>
+                            <span class="c-#333 f-w-500">{{ info?.capacity }}{{ info?.unit }}</span>
+                        </view>
+                        <view class="d-flex">
+                            <view v-if="info?.inputAmount" class="pd2-4-0 f-s-28 flex1">
+                                <span class="c-#666">出库量:</span>
+                                <span class="c-#333 f-w-500">{{ info?.inputAmount || '0' }}{{ info?.unit }}</span>
+                            </view>
+                            <view v-if="info?.restAmount" class="pd2-4-0 f-s-28 flex1">
+                                <span class="c-primary">剩余量:</span>
+                                <span class="c-primary f-w-500">{{ info?.restAmount || '0' }}{{ info?.unit }}</span>
+                            </view>
+                        </view>
+                    </template>
                 </view>
                 </view>
                 <view class="pd3-10-24-24">
                 <view class="pd3-10-24-24">
                     <!-- 损耗登记日期 -->
                     <!-- 损耗登记日期 -->
@@ -113,13 +149,14 @@
         </up-form>
         </up-form>
         <template #bottom>
         <template #bottom>
             <view class="pd-20 d-flex">
             <view class="pd-20 d-flex">
-                <up-button @click="navigateBackOrHome()" class="mr-30" style="color: #333;" color="#F2F2F2">取消</up-button>
+                <up-button @click="navigateBackOrHome()" class="mr-30" style="color: #333" color="#F2F2F2">取消</up-button>
                 <up-button @click="submit" type="primary">确认登记</up-button>
                 <up-button @click="submit" type="primary">确认登记</up-button>
             </view>
             </view>
         </template>
         </template>
     </z-paging>
     </z-paging>
 </template>
 </template>
 <script setup lang="ts">
 <script setup lang="ts">
+import { getStorageRoomNames } from '@/utils/common';
 import { useClientRequest } from '@/utils/request';
 import { useClientRequest } from '@/utils/request';
 import { parseTime, selectDictListClass } from '@/utils/ruoyi';
 import { parseTime, selectDictListClass } from '@/utils/ruoyi';
 const { proxy } = getCurrentInstance() as ComponentInternalInstance;
 const { proxy } = getCurrentInstance() as ComponentInternalInstance;
@@ -178,7 +215,7 @@ const submit = async () => {
         uni.hideLoading();
         uni.hideLoading();
         if (res && res.code === 200) {
         if (res && res.code === 200) {
             uni.showToast({ title: '登记成功', icon: 'success' });
             uni.showToast({ title: '登记成功', icon: 'success' });
-            uni.$emit('storage-registered')
+            uni.$emit('storage-registered');
             setTimeout(() => uni.navigateBack(), 300);
             setTimeout(() => uni.navigateBack(), 300);
         }
         }
     } catch (e) {
     } catch (e) {

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

@@ -33,9 +33,9 @@
                     <span class="c-#666">菌种/菌株编号:</span>
                     <span class="c-#666">菌种/菌株编号:</span>
                     <span class="c-#333 f-w-500">{{ selectDictLabel(pt_fungus_code_type, form?.fungusCodeType) }}/{{ form?.fungusCode }}</span>
                     <span class="c-#333 f-w-500">{{ selectDictLabel(pt_fungus_code_type, form?.fungusCodeType) }}/{{ form?.fungusCode }}</span>
                 </view>
                 </view>
-                <view class="pd2-4-0 f-s-28">
+                <view v-if="form?.supplierId" class="pd2-4-0 f-s-28">
                     <span class="c-#666">供应商:</span>
                     <span class="c-#666">供应商:</span>
-                    <span class="c-#333 f-w-500">{{ form?.supplier }}</span>
+                    <span class="c-#333 f-w-500">{{ form?.supplierInfo?.cusName || '-' }}</span>
                 </view>
                 </view>
                 <view v-if="form?.warehouses?.length" class="pd2-4-0 f-s-28">
                 <view v-if="form?.warehouses?.length" class="pd2-4-0 f-s-28">
                     <span class="c-#666">存放库房:</span>
                     <span class="c-#666">存放库房:</span>
@@ -46,7 +46,7 @@
                     <span class="c-#333 f-w-500">{{ form?.capacity }}{{ form?.unit }}</span>
                     <span class="c-#333 f-w-500">{{ form?.capacity }}{{ form?.unit }}</span>
                 </view>
                 </view>
                 <view class="d-flex">
                 <view class="d-flex">
-                    <view v-if="form?.restAmount" class="pd2-4-0 f-s-28 flex1">
+                    <view v-if="form?.inputAmount" class="pd2-4-0 f-s-28 flex1">
                         <span class="c-#666">出库量:</span>
                         <span class="c-#666">出库量:</span>
                         <span class="c-#333 f-w-500">{{ form?.inputAmount || '0' }}{{ form?.unit }}</span>
                         <span class="c-#333 f-w-500">{{ form?.inputAmount || '0' }}{{ form?.unit }}</span>
                     </view>
                     </view>
@@ -277,7 +277,7 @@ import { useClientRequest } from '@/utils/request';
 import { selectDictListClass } from '@/utils/ruoyi';
 import { selectDictListClass } from '@/utils/ruoyi';
 const { proxy } = getCurrentInstance() as ComponentInternalInstance;
 const { proxy } = getCurrentInstance() as ComponentInternalInstance;
 
 
-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 { 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 paging = ref<any>(null);
 const form = ref<any>({});
 const form = ref<any>({});
 const did = ref('');
 const did = ref('');

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

@@ -348,8 +348,8 @@
                     <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>
                 <!-- 存放库房(具体库房/货架信息稍后补充为选择器) -->
                 <!-- 存放库房(具体库房/货架信息稍后补充为选择器) -->
@@ -405,7 +405,7 @@ const form = ref<seedInfoListType | any>({
     },
     },
     generationMaterial: '',
     generationMaterial: '',
     instoreType: '2',
     instoreType: '2',
-    storeType: '2',
+    storageType: '2',
 });
 });
 const rules = reactive({
 const rules = reactive({
     // 种源信息校验(来自 info-edit)
     // 种源信息校验(来自 info-edit)

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

@@ -53,7 +53,7 @@
                             <span class="c-#666">菌种/菌株编号:</span>
                             <span class="c-#666">菌种/菌株编号:</span>
                             <span class="c-#333 f-w-500">{{ selectDictLabel(pt_fungus_code_type, item?.fungusCodeType) }}/{{ item?.fungusCode }}</span>
                             <span class="c-#333 f-w-500">{{ selectDictLabel(pt_fungus_code_type, item?.fungusCodeType) }}/{{ item?.fungusCode }}</span>
                         </view>
                         </view>
-                        <view class="pd2-4-0 f-s-28">
+                        <view v-if="item?.supplierId" class="pd2-4-0 f-s-28">
                             <span class="c-#666">供应商:</span>
                             <span class="c-#666">供应商:</span>
                             <span class="c-#333 f-w-500">{{ item?.supplierInfo?.cusName || '-' }}</span>
                             <span class="c-#333 f-w-500">{{ item?.supplierInfo?.cusName || '-' }}</span>
                         </view>
                         </view>
@@ -66,7 +66,7 @@
                             <span class="c-#333 f-w-500">{{ item?.capacity }}{{ item?.unit }}</span>
                             <span class="c-#333 f-w-500">{{ item?.capacity }}{{ item?.unit }}</span>
                         </view>
                         </view>
                         <view class="d-flex">
                         <view class="d-flex">
-                            <view v-if="item?.restAmount" class="pd2-4-0 f-s-28 flex1">
+                            <view v-if="item?.inputAmount" class="pd2-4-0 f-s-28 flex1">
                                 <span class="c-#666">出库量:</span>
                                 <span class="c-#666">出库量:</span>
                                 <span class="c-#333 f-w-500">{{ item?.inputAmount || '0' }}{{ item?.unit }}</span>
                                 <span class="c-#333 f-w-500">{{ item?.inputAmount || '0' }}{{ item?.unit }}</span>
                             </view>
                             </view>

+ 1 - 1
src/tools/species-info/models/info-card.vue

@@ -40,7 +40,7 @@
                 <span class="c-#333 f-w-500">{{ item?.capacity }}{{ item?.unit }}</span>
                 <span class="c-#333 f-w-500">{{ item?.capacity }}{{ item?.unit }}</span>
             </view>
             </view>
             <view class="d-flex">
             <view class="d-flex">
-                <view v-if="item?.restAmount" class="pd2-4-0 f-s-28 flex1">
+                <view v-if="item?.inputAmount" class="pd2-4-0 f-s-28 flex1">
                     <span class="c-#666">出库量:</span>
                     <span class="c-#666">出库量:</span>
                     <span class="c-#333 f-w-500">{{ item?.inputAmount || '0' }}{{ item?.unit }}</span>
                     <span class="c-#333 f-w-500">{{ item?.inputAmount || '0' }}{{ item?.unit }}</span>
                 </view>
                 </view>