| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335 |
- <template>
- <z-paging ref="paging" bgColor="#F7F7F7" safe-area-inset-bottom paging-class="paging-btm-shadow" scroll-with-animation>
- <template #top>
- <ut-navbar title="种源详情" :fixed="false" border></ut-navbar>
- </template>
- <template>
- <view class="pd-24 d-flex a-c">
- <view class="flex1 ov-hd">
- <view class="startline-title">库存信息</view>
- </view>
- <view>
- <up-button type="primary" :customStyle="formItemBtnStyle">
- <span>查看出入库记录</span>
- </up-button>
- </view>
- </view>
- <view class="bg-#fff pd-24">
- <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, form?.instoreType)}`]: true }">{{ selectDictLabel(pt_seed_instore_type, form?.instoreType) }}</view>
- <view class="f-s-22 c-#666">{{ form?.updateTime || form?.createTime }}</view>
- </view>
- <view class="mb-10">
- <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>
- </view>
- <view class="pd2-4-0 f-s-28">
- <span class="c-#666">入库批号:</span>
- <span class="c-#333 f-w-500">{{ form?.batchCode }}</span>
- </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(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">
- <span class="c-#666">供应商:</span>
- <span class="c-#333 f-w-500">{{ form?.supplier }}</span>
- </view>
- <view class="pd2-4-0 f-s-28">
- <span class="c-#666">入库量:</span>
- <span class="c-#333 f-w-500">{{ form?.capacity }}{{ form?.unit }}</span>
- </view>
- <view class="d-flex">
- <view v-if="form?.restAmount" class="pd2-4-0 f-s-28 flex1">
- <span class="c-#666">出库量:</span>
- <span class="c-#333 f-w-500">{{ form?.inputAmount || '0' }}{{ form?.unit }}</span>
- </view>
- <view v-if="form?.restAmount" class="pd2-4-0 f-s-28 flex1">
- <span class="c-primary">剩余量:</span>
- <span class="c-primary f-w-500">{{ form?.restAmount || '0' }}{{ form?.unit }}</span>
- </view>
- </view>
- </view>
- <view class="pd-24">
- <view class="startline-title">种源信息</view>
- </view>
- <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="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>
- </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>
- </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>
- </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>
- </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>
- <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>
- <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>
- <template v-if="['A3', 'A4'].includes(form?.seedType 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>
- </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>
- </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>
- </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>
- <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>
- </view>
- <view v-if="form?.vedios" class="f-s-30 pd2-16-0 info-border-bottom">
- <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>
- </view>
- <view class="pd-24">
- <view class="startline-title">入库信息</view>
- </view>
- <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">{{ form?.seedLevel || '-' }}</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_instore_type, form?.instoreType) || '-' }}</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?.instoreBizInfo?.instoreDate || '-' }}</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?.batchCode || '-' }}</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">种源库</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_warehouse_type, form?.warehouseType) || '-' }}</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?.instoreBizInfo?.instoreMg || '-' }}</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?.instoreBizInfo?.remark || '-' }}</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?.operatorName || form?.updateByName || form?.createByName || '-' }}</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?.operateTime || form?.updateTime || form?.createTime || '-' }}</span>
- </view>
- </view>
- </template>
- <template #bottom>
- <view class="pd-24 d-flex a-c">
- <up-button type="primary" @click="clickEdit">修改</up-button>
- </view>
- </template>
- </z-paging>
- </template>
- <script setup lang="ts">
- import { formItemBtnStyle } from '@/assets/styles/uview-plus';
- 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 paging = ref<any>(null);
- const form = ref<any>({});
- const did = ref('');
- // 繁衍世代显示文案
- const genCountMap = reactive({
- A4: '累计扩繁代数',
- A3: '继代培养次数',
- });
- // 获取详情(仓库信息)
- const getDetailById = async (id: string) => {
- if (!id) return;
- const res = await useClientRequest.get(`/plt-api/app/storageSeed/getById/${id}`);
- if (res && res.code === 200) {
- form.value = res.data || {};
- }
- };
- const onRefresh = () => {
- getDetailById(did.value);
- paging.value?.complete();
- };
- const clickEdit = () => {
- uni.$on('seed-source-detail-refresh', () => {
- getDetailById(did.value);
- uni.$off('seed-source-detail-refresh');
- });
- uni.$u.route({
- type: 'navigateTo',
- url: '/plant/storage/seed-source/info-update/index',
- params: {
- id: did.value,
- },
- });
- };
- // 页面入参解析并加载
- onLoad((options: any) => {
- did.value = options?.id || '';
- getDetailById(did.value);
- });
- </script>
- <style lang="scss" scoped>
- .card-info-block {
- border: 1rpx solid #afddbb;
- border-radius: 10rpx;
- }
- .li-item-head {
- margin-left: -24rpx;
- margin-top: -24rpx;
- }
- .li-left-tag {
- padding: 6rpx 16rpx;
- color: #fff;
- border-radius: 0 0 16rpx 0;
- font-size: 20rpx;
- font-weight: 500;
- }
- </style>
|