huangxw 1 ヶ月 前
コミット
c2b1b2a661

+ 60 - 124
src/plant/storage/fresh-goods/detail/index.vue

@@ -65,124 +65,61 @@
             <view class="bg-#fff pd-24">
                 <!-- 鲜货信息详情 -->
                 <view class="f-s-30 pd2-16-0 info-border-bottom">
-                    <span class="c-#666">鲜货类型:</span>
-                    <span class="c-#333 f-w-600">{{ selectDictLabel(pt_seed_type, form?.seedType) || '-' }}</span>
-                </view>
-                <view class="f-s-30 pd2-16-0 info-border-bottom">
-                    <view class="c-#666 mb-10">物种基原:</view>
-                    <view class="bg-#FBFDFB card-info-block pd-24 p-rtv">
+                    <view class="c-#666 mb-10">动植物名称:</view>
+                    <view v-if="form?.varietyInfo" class="bg-#FBFDFB card-info-block pd-24 p-rtv">
                         <view class="mb-10">
-                            <span class="f-s-34 c-#333 f-w-5 mr-16">{{ form?.varietyInfo?.varietyName }}</span>
-                            <span class="f-s-24 c-#666">{{ form?.varietyInfo?.latinName }}</span>
+                            <span class="f-s-34 c-#333 f-w-5 mr-16">{{ form?.varietyInfo?.varietyName || '-' }}</span>
+                            <span class="f-s-24 c-#666">{{ form?.varietyInfo?.latinName || '' }}</span>
                         </view>
-                        <view>
-                            <span class="f-s-28 c-#333 f-w-5 mr-16">{{ form?.varietyInfo?.genusName }}</span>
-                            <span class="f-s-24 c-#666">{{ form?.varietyInfo?.genusLatinName }}</span>
+                        <view class="mb-10">
+                            <span class="f-s-28 c-#333 f-w-5 mr-16">{{ form?.varietyInfo?.genusName || '' }}</span>
+                            <span class="f-s-24 c-#666">{{ form?.varietyInfo?.genusLatinName || '' }}</span>
                         </view>
+                        <view class="f-s-24 c-#666" v-if="form?.varietyInfo?.medicineName">产出:{{ form?.varietyInfo?.medicineName }}</view>
                     </view>
+                    <view v-else class="c-#333 f-w-600">{{ form?.variety || '-' }}</view>
                 </view>
+
                 <view class="f-s-30 pd2-16-0 info-border-bottom">
-                    <span class="c-#666">具体品种/品系名称:</span>
-                    <span class="c-#333 f-w-600">{{ form?.seedName || '-' }}</span>
+                    <span class="c-#666">药用部位/对象:</span>
+                    <span class="c-#333 f-w-600">{{ form?.partName || form?.part || '-' }}</span>
                 </view>
+
                 <view class="f-s-30 pd2-16-0 info-border-bottom">
                     <span class="c-#666">鲜货来源:</span>
-                    <span class="c-#333 f-w-600">{{ selectDictLabel(pt_seed_source, form?.seedSource) || '-' }}</span>
+                    <span class="c-#333 f-w-600">{{ selectDictLabel(pt_medicine_source, form?.sourceType) || '-' }}</span>
                 </view>
-                <view class="f-s-30 pd2-16-0 info-border-bottom" v-if="form?.instoreBizInfo?.motherFatherFlag">
-                    <span class="c-#666">父母本情况:</span>
-                    <span class="c-#333 f-w-600">{{ selectDictLabel(pt_mother_father_flag, form?.instoreBizInfo?.motherFatherFlag) || '-' }}</span>
+
+                <view class="f-s-30 pd2-16-0 info-border-bottom">
+                    <span class="c-#666">入库量:</span>
+                    <span class="c-#333 f-w-600">{{ form?.capacity || '-' }}{{ selectDictLabel(pt_medicine_unit, form?.unit) || form?.unit || '' }}</span>
                 </view>
-                <view v-if="form?.instoreBizInfo?.motherFatherFlag == '2' && form?.instoreBizInfo?.fatherVarietyInfo" class="f-s-30 pd2-16-0 info-border-bottom">
-                    <view class="c-#666 mb-10">父本品种:</view>
-                    <view class="bg-#FBFDFB card-info-block pd-24 p-rtv">
-                        <view class="mb-10">
-                            <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>
-                            <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>
+
+                <view class="f-s-30 pd2-16-0 info-border-bottom">
+                    <span class="c-#666">鲜货产地:</span>
+                    <span class="c-#333 f-w-600">{{ form?.producePlaceName || form?.producePlace || '-' }}</span>
                 </view>
-                <view v-if="form?.instoreBizInfo?.motherVarietyInfo" class="f-s-30 pd2-16-0 info-border-bottom">
-                    <view class="c-#666 mb-10">母本品种:</view>
-                    <view class="bg-#FBFDFB card-info-block pd-24 p-rtv">
-                        <view class="mb-10">
-                            <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>
-                            <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>
+
+                <view class="f-s-30 pd2-16-0 info-border-bottom">
+                    <span class="c-#666">采收日期:</span>
+                    <span class="c-#333 f-w-600">{{ form?.productDate || '-' }}</span>
                 </view>
-                <template v-if="['A3', 'A4'].includes(form?.seedType as string)">
+
+                <template v-if="['2'].includes(form?.sourceType as string)">
                     <view class="f-s-30 pd2-16-0 info-border-bottom">
-                        <span class="c-#666">{{ genCountMap[form?.seedType as 'A3' | 'A4'] }}:</span>
-                        <span class="c-#333 f-w-600">
-                            {{ form?.instoreBizInfo?.genCount || '-' }}
-                            <text v-if="form?.instoreBizInfo?.genUnit">{{ selectDictLabel(pt_gen_unit, form?.instoreBizInfo?.genUnit) }}</text>
-                        </span>
+                        <span class="c-#666">供应商:</span>
+                        <span class="c-#333 f-w-600">{{ form?.supplier || form?.supplierInfo?.cusName || '-' }}</span>
                     </view>
-                </template>
-                <template v-else>
                     <view class="f-s-30 pd2-16-0 info-border-bottom">
-                        <span class="c-#666">繁衍世代:</span>
-                        <span class="c-#333 f-w-600">
-                            {{ form?.instoreBizInfo?.genCount || '-' }}
-                            <text v-if="form?.instoreBizInfo?.genUnit">{{ selectDictLabel(pt_gen_unit, form?.instoreBizInfo?.genUnit) }}</text>
-                        </span>
-                    </view>
-                </template>
-                <view v-if="form?.entrustId" class="f-s-30 pd2-16-0 info-border-bottom">
-                    <view class="c-#666 mb-10">受托单位:</view>
-                    <view class="bg-#FBFDFB card-info-block pd-24 p-rtv">
-                        <view class="f-s-34 c-#333 f-w-500">{{ form?.entrustInfo?.cusName }}</view>
-                        <view class="f-s-24 c-#666">{{ form?.entrustInfo?.cusCode }}</view>
+                        <span class="c-#666">供应商是否是生产商:</span>
+                        <span class="c-#333 f-w-600">{{ selectDictLabel(yes_no, form?.supplierProducerFlag) || '-' }}</span>
                     </view>
-                </view>
-                <view v-if="form?.examinReport && form?.examinReport.length" class="f-s-30 pd2-16-0 info-border-bottom">
-                    <view class="c-#666 mb-10">检验报告:</view>
-                    <ut-album :urls="form?.examinReport"></ut-album>
-                </view>
-                <view v-if="['2', '3'].includes(form?.seedSource as string)" class="f-s-30 pd2-16-0 info-border-bottom">
-                    <view class="c-#666 mb-10">供应商:</view>
-                    <view class="bg-#FBFDFB card-info-block pd-24 p-rtv">
-                        <view class="f-s-34 c-#333 f-w-500">{{ form?.supplierInfo?.cusName }}</view>
-                        <view class="f-s-24 c-#666">{{ form?.supplierInfo?.cusCode }}</view>
+                    <view class="f-s-30 pd2-16-0 info-border-bottom">
+                        <span class="c-#666">生产商:</span>
+                        <span class="c-#333 f-w-600">{{ form?.producer || '-' }}</span>
                     </view>
-                </view>
-                <view v-if="['2', '3'].includes(form?.seedSource as string)" class="f-s-30 pd2-16-0 info-border-bottom">
-                    <span class="c-#666">供应商是否是生产商:</span>
-                    <span class="c-#333 f-w-600">{{ selectDictLabel(yes_no, form?.supplierProducerFlag) || '-' }}</span>
-                </view>
-                <view v-if="['2', '3'].includes(form?.seedSource as string)" class="f-s-30 pd2-16-0 info-border-bottom">
-                    <span class="c-#666">生产商:</span>
-                    <span class="c-#333 f-w-600">{{ form?.producer || '-' }}</span>
-                </view>
-                <view v-if="['A4', 'A8'].includes(form?.seedType as string)" class="f-s-30 pd2-16-0 info-border-bottom">
-                    <span class="c-#666">{{ selectDictLabel(pt_seed_type, form?.seedType as string) }}编号:</span>
-                    <span class="c-#333 f-w-600">{{ selectDictLabel(pt_fungus_code_type, form?.fungusCodeType) }}/{{ form?.fungusCode }}</span>
-                </view>
-                <view class="f-s-30 pd2-16-0 info-border-bottom" v-if="form?.instoreBizInfo?.idFlag">
-                    <span class="c-#666">是否有个体标识:</span>
-                    <span class="c-#333 f-w-600">{{ selectDictLabel(yes_no, form?.instoreBizInfo?.idFlag) || '-' }}</span>
-                </view>
-                <view v-if="form?.instoreBizInfo?.animals && form?.instoreBizInfo?.animals.length" class="f-s-30 pd2-16-0 info-border-bottom">
-                    <view class="c-#666 mb-10">个体标识号:</view>
-                    <template v-for="(animal, index) in form?.instoreBizInfo?.animals" :key="index">
-                        <view class="bg-#FBFDFB card-info-block pd-24 p-rtv mb-10 f-s-28 c-#333 f-w-500">
-                            {{ animal.animalId }}
-                        </view>
-                    </template>
-                </view>
-                <view v-if="form?.instoreBizInfo?.storageMethod" class="f-s-30 pd2-16-0 info-border-bottom">
-                    <span class="c-#666">保藏方法:</span>
-                    <span class="c-#333 f-w-600">{{ form?.instoreBizInfo?.storageMethod || '-' }}</span>
-                </view>
+                </template>
+
                 <view v-if="form?.imgs" class="f-s-30 pd2-16-0 info-border-bottom">
                     <view class="c-#666 mb-10">鲜货图片:</view>
                     <ut-album :urls="form?.imgs"></ut-album>
@@ -191,29 +128,9 @@
                     <view class="c-#666 mb-10">鲜货视频:</view>
                     <ut-album :urls="form?.vedios"></ut-album>
                 </view>
-                <view class="f-s-30 pd2-16-0 info-border-bottom">
-                    <span class="c-#666">鲜货产地:</span>
-                    <span class="c-#333 f-w-600">{{ form?.adcodeName || '-' }}</span>
-                </view>
-                <view class="f-s-30 pd2-16-0 info-border-bottom">
-                    <span class="c-#666">繁殖材料:</span>
-                    <span class="c-#333 f-w-600">{{ form?.generationMaterial ? selectDictLabels(pt_breeding_materials, form?.generationMaterial, ',') : '-' }}</span>
-                </view>
-                <view class="f-s-30 pd2-16-0 info-border-bottom">
-                    <span class="c-#666">繁殖地点/采集地点:</span>
-                    <span class="c-#333 f-w-600">{{ form?.generationAdcodeName || '-' }}</span>
-                </view>
-                <view v-if="form?.spCert && form?.spCert.length" class="f-s-30 pd2-16-0 info-border-bottom">
-                    <view class="c-#666 mb-10">物种鉴定证书:</view>
-                    <ut-album :urls="form?.spCert"></ut-album>
-                </view>
-                <view class="f-s-30 pd2-16-0 info-border-bottom">
-                    <span class="c-#666">鲜货检疫证号:</span>
-                    <span class="c-#333 f-w-600">{{ form?.seedCheckSn || '-' }}</span>
-                </view>
-                <view v-if="form?.seedCheckCert && form?.seedCheckCert.length" class="f-s-30 pd2-16-0 info-border-bottom">
-                    <view class="c-#666 mb-10">鲜货检疫证书:</view>
-                    <ut-album :urls="form?.seedCheckCert"></ut-album>
+                <view v-if="form?.examinReport && form?.examinReport.length" class="f-s-30 pd2-16-0 info-border-bottom">
+                    <view class="c-#666 mb-10">检验报告:</view>
+                    <ut-album :urls="form?.examinReport"></ut-album>
                 </view>
             </view>
             <view class="pd-24">
@@ -273,7 +190,26 @@ 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_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 paging = ref<any>(null);
 const form = ref<any>({});
 const did = ref('');

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

@@ -187,7 +187,7 @@ const rules = reactive({
     supplierId: [
         {
             asyncValidator: (rule: any, value: any) => {
-                if (['3'].includes(form.value.sourceType as string)) {
+                if (['2'].includes(form.value.sourceType as string)) {
                     if (!value) return Promise.reject('请选择供应商');
                 }
                 return Promise.resolve();