Sfoglia il codice sorgente

修改选择往来单位

huangxw 1 mese fa
parent
commit
2ccd0588a4

+ 0 - 4
src/components/ut-action-sheet/ut-action-sheet.vue

@@ -193,10 +193,6 @@ watch(
     },
     { immediate: true },
 );
-onMounted(() => {
-    // 初始化已选择项
-    console.log(props.tabs);
-});
 </script>
 <style lang="scss" scoped>
 .ut-custom-item-sheet {

+ 1 - 1
src/components/ut-tabs/ut-tabs.vue

@@ -1,7 +1,7 @@
 <template>
     <template v-if="mode == 'scroll-x'">
         <scroll-view scroll-x class="ut-tabs-scroll" show-scrollbar="false" :scroll-into-view-offset="SCROLL_OFFSET" :scroll-into-view="scrollIntoView" ref="scrollViewRef" scroll-with-animation>
-            <view class="ut-tabs-row gap-20">
+            <view class="ut-tabs-row gap-30">
                 <view v-for="(tab, idx) in tabs" :key="tab.value" :id="'tab-' + idx" class="ut-tab-item p-rtv" :class="{ active: idx === activeIndex }" @click="selectTab(idx)" ref="tabRefs">
                     <view
                         class="tab-label"

+ 65 - 0
src/models/contact-unit-input/contact-unit-input.vue

@@ -0,0 +1,65 @@
+<template>
+    <up-button v-if="!modelValue" type="primary" @click="selectContactUnitShow = true" plain>
+        <image class="w-36 h-36 mr-10" src="@/static/images/common/select_push_icon.png" mode="widthFix" />
+        <span>{{ placeholder }}</span>
+    </up-button>
+    <view v-else class="bg-#FBFDFB card-info-block pd-24 p-rtv mt-16">
+        <view>
+            <view class="f-s-34 c-#333 f-w-500">{{ info?.cusName }}</view>
+            <view class="f-s-24 c-#666">{{ info?.cusCode }}</view>
+        </view>
+        <view
+            class="close-icon pd-16"
+            @click="emit('update:modelValue', '');emit('update:info', null)"
+        >
+            <up-icon color="#F81242" name="close" size="32rpx"></up-icon>
+        </view>
+    </view>
+    <SelectContactUnit v-if="selectContactUnitShow" :title="title" v-model:show="selectContactUnitShow" :params="params" @confirm="confirmSelection"></SelectContactUnit>
+</template>
+<script setup lang="ts">
+import SelectContactUnit from '../select-contact-unit/select-contact-unit.vue';
+
+const props = defineProps({
+    modelValue: {
+        type: String,
+        default: () => '',
+    },
+    title: {
+        type: String,
+        default: '选择往来单位',
+    },
+    placeholder: {
+        type: String,
+        default: '请选择往来单位信息',
+    },
+    info: {
+        type: Object,
+        default: () => ({}),
+    },
+    params: {
+        type: Object,
+        default: () => ({}),
+    },
+});
+const selectContactUnitShow = ref(false);
+
+const emit = defineEmits(['update:modelValue', 'update:info', 'change']);
+const confirmSelection = (info: any) => {
+    emit('update:modelValue', info.id);
+    emit('update:info', info);
+    emit('change', info);
+};
+</script>
+<style scoped lang="scss">
+.close-icon {
+    position: absolute;
+    top: 0;
+    right: 0;
+    z-index: 10;
+}
+.card-info-block {
+    border: 1rpx solid #afddbb;
+    border-radius: 10rpx;
+}
+</style>

+ 142 - 0
src/models/select-contact-unit/select-contact-unit.vue

@@ -0,0 +1,142 @@
+<template>
+    <up-popup :show="show" mode="right" @close="close">
+        <view class="w-680 p-rtv" style="height: 100vh">
+            <z-paging ref="paging" v-model="list" bgColor="#f7f7f7" :fixed="false" @query="query" safe-area-inset-bottom>
+                <template #top>
+                    <up-navbar :fixed="false" border>
+                        <template #left>
+                            <view class="f-s-34 c-#333 f-w-500">{{ title }}</view>
+                        </template>
+                    </up-navbar>
+                    <view class="pd3-10-24-10">
+                        <ut-tabs :tabs="[{ label: '全部', value: '' }, ...pt_cus_type]" v-model="form.cusType" @change="onRefresh"></ut-tabs>
+                        <view class="pd-10"></view>
+                        <ut-search ref="searchRef" v-model="form.keyword" @search="onRefresh" margin="0" :border="false" placeholder="搜委托单位名称、代码" bgColor="#fff" height="86rpx" borderRadius="10rpx"></ut-search>
+                    </view>
+                </template>
+                <template>
+                    <view class="pd-24">
+                        <up-swipe-action>
+                            <template v-for="item in list" :key="item?.id">
+                                <view @click="clickRow(item)" class="b-radius bg-#fff pd-24 p-rtv select-item mb-20" :class="{ 'active': item?.id === checkedId }">
+                                    <view class="d-flex j-sb a-c li-item-head mb-16">
+                                        <view class="li-left-tag">{{ selectDictLabel(pt_cus_type, item?.cusType) }}</view>
+                                        <view class="f-s-22 c-#666">{{ item?.updateTime || item?.createTime }}</view>
+                                    </view>
+                                    <view class="f-s-34 c-#333 f-w-500">{{ item?.cusName }}</view>
+                                    <view class="f-s-24 c-#666">{{ item?.cusCode }}</view>
+                                    <view class="pd-5"></view>
+                                    <view class="f-s-28 pd2-5-0">
+                                        <span class="c-#666">联系电话:</span>
+                                        <span class="c-#333 f-w-600">{{ item?.contactTel }}</span>
+                                    </view>
+                                    <image v-if="item.id === checkedId" class="w-40 h-40 checked-icon" src="https://ta.zycpzs.cn/oss-file/smart-trace/szyy/images-lm/price/checked1.png" mode="widthFix" />
+                                </view>
+                            </template>
+                        </up-swipe-action>
+                    </view>
+                </template>
+                <!-- 空数据处理 -->
+
+                <template #empty>
+                    <ut-empty class="mg-at" size="28rpx" color="#999" padding="10rpx">暂无往来单位信息,点击+号新增吧</ut-empty>
+                </template>
+                <template #bottom>
+                    <view class="pd-24 bg-#fff d-flex">
+                        <up-button @click="close" class="mr-30" color="#F2F2F2" style="color: #333;">取消</up-button>
+                        <up-button @click="confirmSelection" type="primary">确认选择</up-button>
+                    </view>
+                </template>
+            </z-paging>
+        </view>
+    </up-popup>
+</template>
+<script setup lang="ts">
+import { useClientRequest } from '@/utils/request';
+const { proxy } = getCurrentInstance() as ComponentInternalInstance;
+const {  pt_cus_type, pt_cpy_type } = toRefs<any>(proxy?.useDict('pt_cus_type', 'pt_cpy_type'));
+const paging = ref();
+const props = defineProps({
+    params: {
+        type: Object,
+        default: () => ({}),
+    },
+    show: {
+        type: Boolean,
+        default: false,
+    },
+    title: {
+        type: String,
+        default: '选择往来单位',
+    },
+});
+
+const form = ref({
+    keyword: '',
+    cusType: '',
+});
+const checkedId = ref(null);
+const checkedInfo = ref<any>(null);
+const emit = defineEmits(['update:show', 'confirm']);
+const list = ref<any[]>([]);
+const query = async (pageNum: number, pageSize: number) => {
+    const params = {
+        pageNum,
+        pageSize,
+        ...props.params,
+        ...form.value,
+    };
+    const res = await useClientRequest.get<any>('/plt-api/app/customer/list', params);
+    if (!res || res.code !== 200) return;
+    const { rows } = res;
+    paging.value?.complete(rows);
+};
+const confirmSelection = () => {
+    if (checkedInfo.value) {
+        emit('confirm', checkedInfo.value);
+        close();
+    } else {
+        uni.showToast({
+            title: '请' + props.title,
+            icon: 'none',
+        });
+    }
+};
+const clickRow = (item: any) => {
+    checkedId.value = item.id;
+    checkedInfo.value = item;
+};
+const close = () => {
+    emit('update:show', false);
+};
+const onRefresh = () => {
+    paging.value?.reload();
+};
+</script>
+<style scoped lang="scss">
+.li-item-head {
+    margin-left: -24rpx;
+    margin-top: -24rpx;
+}
+.li-left-tag {
+    padding: 4rpx 12rpx;
+    background-color: #ebf6ee;
+    color: #37a954;
+    border-radius: 16rpx 0 16rpx 0;
+    font-size: 20rpx;
+    font-weight: 500;
+}
+.select-item {
+    border: 1rpx solid #fff;
+
+    &.active {
+        border-color: $u-primary;
+        background-color: rgba($u-primary, 0.1);
+    }
+    .checked-icon {
+        position: absolute;
+        right: 0;
+        bottom: 0;
+    }
+}
+</style>

+ 1 - 1
src/plant/contact-unit/unit-list/index.vue

@@ -78,7 +78,7 @@ const query = async (pageNum: number, pageSize: number) => {
     paging.value.complete(rows);
 };
 const onRefresh = () => {
-    paging.value.reload();
+    paging.value?.reload();
 };
 const optionsAction = reactive([
     {

+ 76 - 64
src/plant/storage/seed-source/info-edit/index.vue

@@ -1,6 +1,5 @@
 <template>
-    <z-paging class="" ref="paging" bgColor="#fff" paging-class="paging-btm-shadow" safe-area-inset-bottom
-        scroll-with-animation>
+    <z-paging class="" ref="paging" bgColor="#fff" paging-class="paging-btm-shadow" safe-area-inset-bottom scroll-with-animation>
         <template #top>
             <ut-navbar :title="did ? '编辑种源入库信息' : '添加种源入库信息'" :fixed="false" border></ut-navbar>
         </template>
@@ -9,8 +8,7 @@
                 <!-- 基本信息 -->
                 <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-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>
@@ -20,8 +18,7 @@
                 <up-form-item borderBottom label="物种基原" required prop="varietyId">
                     <view class="flex1">
                         <up-button v-if="!form.varietyId" @click="selectVarietyId" type="primary" plain>
-                            <image class="w-36 h-36 mr-10" src="@/static/images/common/select_push_icon.png"
-                                mode="widthFix" />
+                            <image class="w-36 h-36 mr-10" src="@/static/images/common/select_push_icon.png" mode="widthFix" />
                             <span>请选择物种基原</span>
                         </up-button>
                         <view v-else class="bg-#FBFDFB card-info-block pd-24 p-rtv">
@@ -34,7 +31,13 @@
                                 <span class="f-s-24 c-#666">{{ form?.varietyInfo?.genusLatinName }}</span>
                             </view>
                             <view class="f-s-24 c-#666">产出:{{ form?.varietyInfo?.medicineName }}</view>
-                            <view class="close-icon pd-16" @click="form.varietyId = ''; form.varietyInfo = null;">
+                            <view
+                                class="close-icon pd-16"
+                                @click="
+                                    form.varietyId = '';
+                                    form.varietyInfo = null;
+                                "
+                            >
                                 <up-icon color="#F81242" name="close" size="32rpx"></up-icon>
                             </view>
                         </view>
@@ -45,19 +48,16 @@
                 </up-form-item>
                 <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-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>
                         <template #right>
                             <up-icon size="22rpx" color="#2A6D52" name="arrow-down-fill"></up-icon>
                         </template>
                     </up-form-item>
                 </ut-action-sheet>
-                <ut-action-sheet :tabs="pt_mother_father_flag" mode="custom" title="父母本情况"
-                    v-model="form.instoreBizInfo.motherFatherFlag">
+                <ut-action-sheet :tabs="pt_mother_father_flag" mode="custom" title="父母本情况" v-model="form.instoreBizInfo.motherFatherFlag">
                     <up-form-item borderBottom label="父母本情况" prop="motherFatherFlag">
-                        <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-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>
@@ -68,30 +68,27 @@
                     <!-- 父本品种 -->
                     <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="@/static/images/common/select_push_icon.png"
-                                    mode="widthFix" />
+                            <up-button v-if="!form.instoreBizInfo.fatherVarietyId" @click="selectFatherVarietyId" type="primary" plain>
+                                <image class="w-36 h-36 mr-10" src="@/static/images/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>
+                                    <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>
+                                    <span class="f-s-28 c-#333 f-w-5 mr-16">{{ form?.instoreBizInfo?.fatherVarietyInfo?.genusName }}</span>
+                                    <span class="f-s-24 c-#666">{{ form?.instoreBizInfo?.fatherVarietyInfo?.genusLatinName }}</span>
                                 </view>
-                                <view class="f-s-24 c-#666">产出:{{ form?.instoreBizInfo?.fatherVarietyInfo?.medicineName
-                                    }}</view>
-                                <view class="close-icon pd-16"
-                                    @click="form.instoreBizInfo.fatherVarietyId = ''; form.instoreBizInfo.fatherVarietyInfo = null;">
+                                <view class="f-s-24 c-#666">产出:{{ form?.instoreBizInfo?.fatherVarietyInfo?.medicineName }}</view>
+                                <view
+                                    class="close-icon pd-16"
+                                    @click="
+                                        form.instoreBizInfo.fatherVarietyId = '';
+                                        form.instoreBizInfo.fatherVarietyInfo = null;
+                                    "
+                                >
                                     <up-icon color="#F81242" name="close" size="32rpx"></up-icon>
                                 </view>
                             </view>
@@ -100,16 +97,13 @@
                     <!-- 母本品种 -->
                     <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="@/static/images/common/select_push_icon.png"
-                                    mode="widthFix" />
+                            <up-button v-if="!form.instoreBizInfo.motherVarietyId" @click="selectMotherVarietyId" type="primary" plain>
+                                <image class="w-36 h-36 mr-10" src="@/static/images/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-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">
@@ -117,33 +111,40 @@
                                     <span class="f-s-24 c-#666">{{ form?.instoreBizInfo?.motherVarietyInfo?.genusLatinName }}</span>
                                 </view>
                                 <view class="f-s-24 c-#666">产出:{{ form?.instoreBizInfo?.motherVarietyInfo?.medicineName }}</view>
-                                <view class="close-icon pd-16" @click="form.instoreBizInfo.motherVarietyId = ''; form.instoreBizInfo.motherVarietyInfo = null;">
+                                <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>
-                <up-form-item label="繁衍世代" prop="instoreBizInfo.genCount">
-                    <up-input v-model="form.instoreBizInfo.genCount" placeholder="请输入繁衍世代" border="none" clearable />
+                <up-form-item label="繁衍世代" prop="instoreBizInfo.genCount" border-bottom>
+                    <up-input v-model="form.instoreBizInfo.genCount" border="none" placeholder="请输入繁衍世代" clearable />
                     <template #right>
                         <view @click.stop>
-                            <ut-action-sheet v-model="form.unit" :tabs="pt_materail_unit" mode="custom" title="选择单位">
+                            <ut-action-sheet v-model="form.genUnit" :tabs="pt_gen_unit" mode="custom" title="选择单位">
                                 <!-- 可点击选择单位 -->
                                 <view class="d-flex pd-10" style="">
-                                    <span>{{ form.unit || '代' }}</span>
+                                    <span>{{ form.genUnit || '代' }}</span>
                                     <up-icon size="22rpx" color="#2A6D52" name="arrow-down-fill"></up-icon>
                                 </view>
                             </ut-action-sheet>
                         </view>
                     </template>
                 </up-form-item>
-                <up-form-item borderBottom label="受托单位" prop="entrustId">
-                    <up-input v-model="form.entrustId" placeholder="请输入受托单位" border="none" clearable></up-input>
+                <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>
 
                 <!-- 入库数量与单位 -->
-
                 <up-form-item label="入库量" prop="capacity" required borderBottom>
                     <up-input v-model="form.capacity" placeholder="请输入入库量" border="none" clearable />
                     <template #right>
@@ -158,34 +159,32 @@
                         </view>
                     </template>
                 </up-form-item>
-
                 <!-- 检验报告与供应商信息 -->
                 <up-form-item borderBottom label="检验报告" prop="examinReport">
                     <up-input v-model="form.examinReport" placeholder="请输入检验报告编号或说明" border="none" clearable></up-input>
                 </up-form-item>
                 <up-form-item borderBottom label="供应商" prop="supplierId">
-                    <up-input v-model="form.supplierId" placeholder="请输入供应商" border="none" clearable></up-input>
-                </up-form-item>
-                <up-form-item borderBottom label="供应商名称" prop="supplier">
-                    <up-input v-model="form.supplier" placeholder="请输入供应商名称" border="none" clearable></up-input>
-                </up-form-item>
-                <up-form-item borderBottom label="生产商" prop="producer">
-                    <up-input v-model="form.producer" placeholder="请输入生产商名称" border="none" clearable></up-input>
+                     <view class="flex1">
+                        <ContactUnitInput v-model="form.supplierId" v-model:info="form.supplierInfo" :params="{ cpyType: '4' }" title="选择供应商" placeholder="请选择供应商信息"></ContactUnitInput>
+                    </view>
                 </up-form-item>
-
                 <!-- 菌种编码信息 -->
                 <up-form-item borderBottom label="菌种/菌株编号" prop="fungusCode">
                     <up-input v-model="form.fungusCode" placeholder="请输入菌种/菌株编号" border="none" clearable></up-input>
                 </up-form-item>
-                <up-form-item borderBottom label="菌种编码类型" prop="fungusCodeType">
-                    <up-input v-model="form.fungusCodeType" placeholder="请输入菌种编码类型" border="none" clearable></up-input>
+                <up-form-item borderBottom label="供应商是否是生产商" prop="supplierProducerFlag">
+                     <up-radio-group v-model="form.supplierProducerFlag">
+                        <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>
+                <up-form-item borderBottom label="生产商" prop="producer">
+                    <up-input v-model="form.producer" placeholder="请输入生产商名称" border="none" clearable></up-input>
                 </up-form-item>
 
                 <!-- 个体标识:此处仅占位,后续可改为多选列表 -->
                 <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 :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>
                 <!-- 个体标识:此处仅占位,后续可改为多选列表 -->
@@ -194,6 +193,10 @@
                         <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"></ut-upload>
@@ -206,13 +209,17 @@
                 <up-form-item borderBottom label="种源产地" prop="adcode">
                     <up-input v-model="form.adcode" placeholder="请输入种源产地行政编码" border="none" clearable></up-input>
                 </up-form-item>
-                <up-form-item borderBottom label="繁殖材料" prop="generationMaterial">
-                    <up-input v-model="form.generationMaterial" placeholder="请输入繁殖材料" border="none"
-                        clearable></up-input>
-                </up-form-item>
+                <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>
                 <up-form-item borderBottom label="繁殖地点/采集地点" prop="generationAdcode">
-                    <up-input v-model="form.generationAdcode" placeholder="请输入繁殖/采集地点编码或名称" border="none"
-                        clearable></up-input>
+                    <up-input v-model="form.generationAdcode" placeholder="请输入繁殖/采集地点编码或名称" border="none" clearable></up-input>
                 </up-form-item>
 
                 <!-- 资质证明附件(暂按上传控件处理,可后续细化) -->
@@ -241,15 +248,19 @@
             </view>
         </template>
     </z-paging>
+    
 </template>
 <script setup lang="ts">
 import { useClientRequest } from '@/utils/request';
 import { seedInfoListType } from '../models/type';
 import AnimalsInput from '../models/animals-input.vue';
+import SelectContactUnit from '@/models/select-contact-unit/select-contact-unit.vue';
+import ContactUnitInput from '@/models/contact-unit-input/contact-unit-input.vue';
 
 const { proxy } = getCurrentInstance() as ComponentInternalInstance;
-const { pt_seed_type, pt_seed_source, pt_materail_unit, pt_mother_father_flag, pt_seed_unit, pt_fungus_code_type, pt_breeding_materials, yes_no } = toRefs<any>(proxy?.useDict('pt_seed_type', 'pt_seed_source', 'pt_materail_unit', 'pt_mother_father_flag', 'pt_op_method', 'pt_seed_unit', 'pt_fungus_code_type', 'pt_breeding_materials', 'yes_no'));
+const { pt_seed_type, pt_seed_source, pt_materail_unit, pt_mother_father_flag, pt_seed_unit, pt_fungus_code_type, pt_breeding_materials, yes_no, pt_cus_type, pt_cpy_type, pt_gen_unit } = toRefs<any>(proxy?.useDict('pt_seed_type', 'pt_seed_source', 'pt_materail_unit', 'pt_mother_father_flag', 'pt_op_method', 'pt_seed_unit', 'pt_fungus_code_type', 'pt_breeding_materials', 'yes_no', 'pt_cus_type', 'pt_cpy_type', 'pt_gen_unit'));
 const paging = ref<any>(null);
+const selectContactUnitShow = ref(false);
 const upFormRef = ref<any>(null);
 const form = ref<seedInfoListType>({
     imgs: [],
@@ -261,6 +272,7 @@ const form = ref<seedInfoListType>({
     instoreBizInfo: {
         motherFatherFlag: '',
         idFlag: '1',
+        genUnit: '代',
     },
 });
 const rules = reactive({});

+ 2 - 1
src/plant/storage/seed-source/models/type.ts

@@ -118,6 +118,7 @@ export interface instoreBizInfoType {
     motherVarietyInfo?: any;
     idFlag: string;
     animals?: any[];
+    storageMethod?: string;
+    genUnit?: string;
     [property: string]: any;
-
 }