lisy vor 1 Monat
Ursprung
Commit
dc3949ff27

+ 6 - 0
src/pages.json

@@ -199,6 +199,12 @@
                     "style": {
                         "navigationBarTitleText": "种源信息列表"
                     }
+                },
+                {
+                    "path": "port-harvest/index",
+                    "style": {
+                        "navigationBarTitleText": "采收管理列表"
+                    }
                 }
             ]
         },

+ 1 - 1
src/pages/plant/port/index.vue

@@ -24,7 +24,7 @@
         <view class="pd-24 pt-0">
             <up-swipe-action>
                 <up-swipe-action-item v-for="(item, index) in list" :key="index" :name="item?.id" :options="form?.status == '1' ? options2 : options" class="mb-20" @click="clickTempSwipe">
-                    <task :data="item" :status="form?.status" @click="$u.route({ type: 'navigateTo', url: '/plant/port/port-detail/index', params: { id: item?.id } })" @toSupervise="$u.route({ type: 'navigateTo', url: '/plant/port/port-supervise/index', params: { id: item?.id } })" @toInformation="$u.route({ type: 'navigateTo', url: '/plant/port/port-listinfo/index', params: { id: item?.id } })" />
+                    <task :data="item" :status="form?.status" @click="$u.route({ type: 'navigateTo', url: '/plant/port/port-detail/index', params: { id: item?.id } })" @toSupervise="$u.route({ type: 'navigateTo', url: '/plant/port/port-supervise/index', params: { id: item?.id } })" @toInformation="$u.route({ type: 'navigateTo', url: '/plant/port/port-listinfo/index', params: { id: item?.id } })" @toHarvest="$u.route({ type: 'navigateTo', url: '/plant/port/port-harvest/index', params: { id: item?.id } })" />
                 </up-swipe-action-item>
             </up-swipe-action>
         </view>

+ 4 - 4
src/pages/plant/port/models/task.vue

@@ -59,7 +59,7 @@
                         <text class="f-s-26">饲养管理</text>
                     </view>
                 </up-button>
-                <up-button :customStyle="customStyle3">
+                <up-button :customStyle="customStyle3" @click="$emit('toHarvest')">
                     <view class="d-flex a-c j-c">
                         <image class="w-28 h-24" src="https://ta.zycpzs.cn/oss-file/smart-trace/szyy/images-plt/plant/port/Task_Harvest_management.png" mode="widthFix" />
                         <text class="f-s-26">采收管理</text>
@@ -138,7 +138,7 @@
                         <text class="f-s-26"> 种植管理 </text>
                     </view>
                 </up-button>
-                <up-button :customStyle="customStyle3">
+                <up-button :customStyle="customStyle3" @click="$emit('toHarvest')">
                     <view class="d-flex a-c j-c">
                         <image class="w-28 h-24" src="https://ta.zycpzs.cn/oss-file/smart-trace/szyy/images-plt/plant/port/Task_Harvest_management.png" mode="widthFix" />
                         <text class="f-s-26">采收管理</text>
@@ -207,7 +207,7 @@
                         <text class="f-s-26"> 种植管理 </text>
                     </view>
                 </up-button>
-                <up-button :customStyle="customStyle3">
+                <up-button :customStyle="customStyle3" @click="$emit('toHarvest')">
                     <view class="d-flex a-c j-c">
                         <image class="w-28 h-24" src="https://ta.zycpzs.cn/oss-file/smart-trace/szyy/images-plt/plant/port/Task_Harvest_management.png" mode="widthFix" />
                         <text class="f-s-26">采收管理</text>
@@ -276,7 +276,7 @@
                         <text class="f-s-26">饲养管理</text>
                     </view>
                 </up-button>
-                <up-button :customStyle="customStyle3">
+                <up-button :customStyle="customStyle3" @click="$emit('toHarvest')">
                     <view class="d-flex a-c j-c">
                         <image class="w-28 h-24" src="https://ta.zycpzs.cn/oss-file/smart-trace/szyy/images-plt/plant/port/Task_Harvest_management.png" mode="widthFix" />
                         <text class="f-s-26">采收管理</text>

+ 36 - 15
src/plant/port/port-create/index.vue

@@ -163,7 +163,7 @@
                                 </view>
                             </view>
                         </up-form-item> -->
-                        <up-form-item borderBottom label="委托企业" prop="delegateInfo">
+                        <up-form-item v-if="+(form?.delegateFlag ?? 0)" borderBottom label="委托企业" prop="delegateInfo">
                             <view class="flex1">
                                 <ContactUnitInput v-model="form.delegateInfo.cpyid" v-model:info="form.delegate" :params="{ cpyType: '1' }" title="选择委托企业" placeholder="请选择委托企业信息"></ContactUnitInput>
                             </view>
@@ -430,7 +430,7 @@
                                 <Baseinfo :modeValue="deawerData" @close="handleBaseinfoClose" :baseType="form.taskType" />
                             </view>
                         </up-form-item>
-                        <up-form-item :borderBottom="false" label="具体位置" required prop="baseId" id="baseIdpppp">
+                        <up-form-item :borderBottom="false" label="具体位置" prop="baseId" id="baseIdpppp">
                             <Go_button v-if="!laboratory" @click="openLaboratory" title="请选择具体位置" style="flex: 1" />
                             <view class="w-100%" v-else>
                                 <laboratory :modeValue="laboratory" @close="handleLaboratoryClose" :baseType="form.taskType" />
@@ -462,7 +462,7 @@
                                 </view>
                             </view>
                         </up-form-item> -->
-                        <up-form-item borderBottom label="委托企业" prop="delegateInfo">
+                        <up-form-item v-if="+(form?.delegateFlag ?? 0)" borderBottom label="委托企业" prop="delegateInfo">
                             <view class="flex1">
                                 <ContactUnitInput v-model="form.delegateInfo.cpyid" v-model:info="form.delegate" :params="{ cpyType: '1' }" title="选择委托企业" placeholder="请选择委托企业信息"></ContactUnitInput>
                             </view>
@@ -845,16 +845,20 @@ const validateBreedingAmount = (rule: any, value: any, callback: any) => {
 const Enterprise = ref('123');
 // 自定义delegateInfo 委托企业校验
 const validateDelegateInfo = (rule: any, value: any, callback: any) => {
-    if (!value) {
-        callback(new Error('请选择委托企业'));
-        return;
-    }
-    const { cpyid, crediteCode, cusName } = value;
-    if (!cpyid) {
-        callback(new Error('请选择委托企业'));
-        return;
+    if (+(form.value?.delegateFlag ?? 0)) {
+        if (!value) {
+            callback(new Error('请选择委托企业'));
+            return;
+        }
+        const { cpyid, crediteCode, cusName } = value;
+        if (!cpyid) {
+            callback(new Error('请选择委托企业'));
+            return;
+        }
+        callback();
+    } else {
+        callback();
     }
-    callback();
 };
 //判断是否要填种植面积
 const validatePlantingAmount = (rule: any, value: any, callback: any) => {
@@ -1061,8 +1065,15 @@ const save = () => {
             console.log('开始提交');
             await upFormRef.value?.validate();
             console.log('校验完成');
-            form.value.delegateInfo.cusName = form.value?.delegate.cusName;
-            form.value.delegateInfo.cusCode = form.value?.delegate.cusCode;
+            if (+(form.value.delegateFlag ?? 0)) {
+                form.value.delegateInfo.cusName = form.value?.delegate.cusName;
+                form.value.delegateInfo.cusCode = form.value?.delegate.cusCode;
+            } else {
+                form.value.delegateInfo = null as any;
+                form.value.delegate = null as any;
+            }
+            console.log(form.value.plant, 'form.value.plant');
+
             const params = {
                 ...form.value,
                 ...form.value.queryType6,
@@ -1070,8 +1081,14 @@ const save = () => {
                 ...form.value.inoculation,
                 animalIds: animalIds.value,
             };
+            console.log('提交参数:', params);
+            let res = null;
+            if (isEdit.value) {
+                res = await useClientRequest.post('/plt-api/app/plantationTask/updateTask', params);
+            } else {
+                res = await useClientRequest.post('/plt-api/app/plantationTask/saveTask', params);
+            }
 
-            const res = await useClientRequest.post('/plt-api/app/plantationTask/saveTask', params);
             if (res.code == 200) {
                 uni.showToast({
                     title: '提交成功',
@@ -1187,6 +1204,7 @@ const plantingMgAmount = computed(() => {
     }
 
     const result = inoculationAmount * inoculationDosage;
+    form.value.plant.plantingMgAmount = result;
     // 返回计算结果,保持数字类型或空字符串
     return isNaN(result) ? '' : result;
 });
@@ -1214,9 +1232,12 @@ function handleLaboratoryConfirm(data: any) {
     console.log('收到基地选择数据:', data);
 }
 const taskId = ref();
+//是否是修改的标志
+const isEdit = ref(false);
 onLoad((options) => {
     if (!options?.taskType && options?.taskId) {
         taskId.value = options?.taskId;
+        isEdit.value = true;
     } else {
         form.value.taskType = options?.taskType;
         if (+options?.taskType == 1 || +options?.taskType == 11) {

+ 5 - 5
src/plant/port/port-detail/index.vue

@@ -166,14 +166,14 @@
                         <text class="c-#666 f-s-30">是否代繁育:</text>
                         <text class="c-#333 f-s-30 f-w-5">{{ form.delegateFlag ? selectDictLabel(yes_no, form.delegateFlag) : '--' }}</text>
                     </view>
-                    <view class="pt-16 pb-16 info-border-bottom">
+                    <view delegateFlag class="pt-16 pb-16 info-border-bottom">
                         <view class="c-#666 f-s-30 mb-20">委托企业:</view>
                         <view class="pd-24 d-flex flex-cln bg-#FBFDFB border-#37A954 b-radius mb-20">
                             <view class="">
                                 <text class="c-#333 f-s-34 f-w-5 mr-5">{{ form?.delegateInfo?.cusName }}</text>
                             </view>
                             <view class="">
-                                <text class="c-#666 f-s-24">{{ form?.delegateInfo?.crediteCode }}</text>
+                                <text class="c-#666 f-s-24">{{ form?.delegateInfo?.cusCode }}</text>
                             </view>
                         </view>
                     </view>
@@ -238,14 +238,14 @@
                         <text class="c-#666 f-s-30">是否代繁育:</text>
                         <text class="c-#333 f-s-30 f-w-5">{{ form.delegateFlag ? selectDictLabel(yes_no, form.delegateFlag) : '--' }}</text>
                     </view>
-                    <view class="pt-16 pb-16 info-border-bottom">
+                    <view v-if="+form?.delegateFlag" class="pt-16 pb-16 info-border-bottom">
                         <view class="c-#666 f-s-30 mb-20">委托企业:</view>
                         <view class="pd-24 d-flex flex-cln bg-#FBFDFB border-#37A954 b-radius mb-20">
                             <view class="">
                                 <text class="c-#333 f-s-34 f-w-5 mr-5">{{ form?.delegateInfo?.cusName }}</text>
                             </view>
                             <view class="">
-                                <text class="c-#666 f-s-24">{{ form?.delegateInfo?.crediteCode }}</text>
+                                <text class="c-#666 f-s-24">{{ form?.delegateInfo?.cusCode }}</text>
                             </view>
                         </view>
                     </view>
@@ -401,7 +401,7 @@ const form = ref<any>({
     plantingAmount: '',
     remark: null,
     delegateFlag: '0',
-    delegateInfo: { cusId: '1795009980763025410', crediteCode: '91530102MACA96MJ9H', cusName: '演示企业' },
+    delegateInfo: {},
     plantationType: null,
     sowingMethod: null,
     transplantMethod: null,

+ 168 - 0
src/plant/port/port-harvest/index.vue

@@ -0,0 +1,168 @@
+<template>
+    <z-paging ref="paging" v-model="list" bgColor="#f7f7f7" @query="query" safe-area-inset-bottom empty-view-text="该任务暂未关联种源信息">
+        <template #top>
+            <ut-navbar title="采收管理" :fixed="false"> </ut-navbar>
+        </template>
+        <view class="pd-24">
+            <Task_card :data="taskDate" />
+            <view class="d-flex a-c j-sb pt-20 pb-20">
+                <view class="startline-title mb-16">采收入库记录</view>
+                <view class="d-flex a-c gap-10">
+                    <view class="bg-#37A954 radius-10 pd4-10-20-10-20 d-flex a-c" style="width: max-content" @click="addManagementRecord()">
+                        <up-icon name="plus" color="#fff" size="24rpx"></up-icon>
+                        <view class="c-#fff f-s-22">添加采收入库</view>
+                    </view>
+                </view>
+            </view>
+            <view class="pd-10"></view>
+            <up-swipe-action>
+                <up-swipe-action-item v-for="(item, index) in list" :key="index" :name="item?.id" :options="options2" class="mb-20" @click="clickTempSwipe">
+                    <view class="bg-#fff b-radius pd-24" @click="gotoDetail(item)">
+                        <view class="d-flex a-c j-sb">
+                            <view class="d-flex a-c">
+                                <view class="f-s-34 f-w-5 pb-10 mr-10">{{ item?.seedInfo?.variety }}</view>
+                                <view class="f-s-24 c-#666">{{ selectDictLabel(pt_seed_type, item?.seedInfo?.seedType) }}</view>
+                            </view>
+                            <view class="d-flex a-c">
+                                <view class="f-s-22 c-#666">{{ item?.seedInfo?.updateTime || item?.seedInfo?.createTime }}</view>
+                            </view>
+                        </view>
+                        <view class="d-flex pd4-8-0-8-0">
+                            <view class="c-#666 f-s-28 w-s-no">入库批号:</view>
+                            <view class="c-#333 f-s-28 f-w-5 w-s-no tx-ov ov-hd">{{ item?.seedInfo?.batchCode }}</view>
+                        </view>
+                        <view class="d-flex pd4-8-0-8-0">
+                            <view class="c-#666 f-s-28 w-s-no">供应商:</view>
+                            <view class="c-#333 f-s-28 f-w-5 w-s-no tx-ov ov-hd">{{ item?.seedInfo?.supplierInfo?.cusName || '-' }}</view>
+                        </view>
+                        <view class="d-flex pd4-8-0-8-0">
+                            <view class="c-primary f-s-28 w-s-no">投入量:</view>
+                            <view class="c-primary f-s-28 f-w-5 w-s-no tx-ov ov-hd">{{ item?.amount }}{{ item?.seedInfo?.unit }}</view>
+                        </view>
+                        <view class="d-flex pd4-8-0-8-0">
+                            <view class="c-#666 f-s-28 w-s-no">备注/说明:</view>
+                            <view class="c-#333 f-s-28 f-w-5 w-s-no tx-ov ov-hd">{{ item?.remark || '-' }}</view>
+                        </view>
+                        <view class="d-flex">
+                            <view class="pd2-4-0 f-s-24 w-40%">
+                                <span class="c-#666">记录人:</span>
+                                <span class="c-#666">{{ item?.seedInfo?.createByName || '-' }}</span>
+                            </view>
+                            <view class="pd2-4-0 f-s-24 flex1">
+                                <span class="c-#666">操作时间:</span>
+                                <span class="c-#666">{{ item?.seedInfo?.updateTime || item?.seedInfo?.createTime }}</span>
+                            </view>
+                        </view>
+                    </view>
+                </up-swipe-action-item>
+            </up-swipe-action>
+        </view>
+    </z-paging>
+</template>
+<script setup lang="ts">
+import { useClientRequest } from '@/utils/request';
+import Task_card from './models/task_card.vue';
+const { proxy } = getCurrentInstance() as ComponentInternalInstance;
+const { pt_seed_type, pt_breed_op_method, pt_raise_op_method } = toRefs<any>(proxy?.useDict('pt_seed_type', 'pt_breed_op_method', 'pt_raise_op_method'));
+const paging = ref();
+const list = ref<any>([]);
+const taskId = ref('');
+const taskDate = ref<any>();
+const from = ref({
+    keyword: '',
+    activityType: '',
+});
+const query = async (pageNo: number, pageSize: number) => {
+    const res = await useClientRequest.get(`/plt-api/app/seedInfo/getSeedInfoList/${taskId.value}`, {
+        pageNo,
+        pageSize,
+        ...from.value,
+        taskId: taskId.value,
+    });
+    console.log(res, 'res');
+
+    if (res) {
+        const { data } = res;
+        paging.value.complete(data);
+    }
+};
+// 添加种源信息
+const addManagementRecord = () => {
+    uni.$u.route({
+        type: 'navigateTo',
+        url: '/tools/species-info/index',
+        params: { taskId: taskId.value },
+    });
+};
+
+const changeSeach = async () => {
+    paging.value.reload();
+};
+const options2 = reactive([
+    {
+        text: '撤回采收入库',
+        style: {
+            backgroundColor: '#F74C30',
+            width: '80rpx',
+            fontSize: '28rpx',
+        },
+    },
+]);
+const clickTempSwipe = async (event: object) => {
+    const { name, index } = event as any;
+    try {
+        const res = await uni.showModal({
+            title: '撤回提示',
+            content: '删除后,删除的物料将自动退回相应库存。不能恢复,请谨慎操作!',
+            confirmColor: '#f56c6c',
+        });
+        if (!res.confirm) return;
+        await uni.showLoading({
+            title: '删除中...',
+            mask: true,
+        });
+        await useClientRequest.get(`/plt-api/app/seedInfo/deleteSeedInfo/${name}`);
+        uni.hideLoading();
+        uni.showToast({
+            title: '删除成功',
+            icon: 'success',
+        });
+        paging.value?.reload();
+    } catch (error) {
+        console.error('删除任务失败:', error);
+    }
+};
+const gotoDetail = async (item: any) => {
+    if (item?.activityType == '2') {
+        uni.$u.route({
+            type: 'navigateTo',
+            url: `/plant/port/supervise/supervise-material-detail/index`,
+            params: {
+                id: item?.id,
+            },
+        });
+    } else if (item?.activityType == '1') {
+        uni.$u.route({
+            type: 'navigateTo',
+            url: `/plant/port/supervise/supervise-plant-detail/index`,
+            params: {
+                id: item?.id,
+            },
+        });
+    }
+};
+onMounted(async () => {
+    const res = await useClientRequest.get(`/plt-api/app/plantationTask/getInfo/${taskId.value}`, {
+        pageNo: 1,
+        pageSize: 10,
+    });
+    taskDate.value = res.data;
+});
+onLoad((options: any) => {
+    taskId.value = options?.id;
+    //接收 uni.$emit('updatesuperviselist');
+    uni.$on('updatesuperviselist', () => {
+        paging.value?.reload();
+    });
+});
+</script>

+ 140 - 0
src/plant/port/port-harvest/models/task_card.vue

@@ -0,0 +1,140 @@
+<template>
+    <!-- 种植 -->
+    <view class="" v-if="data?.taskType === '1'" @click="$emit('click')">
+        <view class="b-radius bg-#fff pd-10 p-rtv">
+            <image class="w-80 h-34" src="https://ta.zycpzs.cn/oss-file/smart-trace/szyy/images-plt/plant/port/Task_Planting.png" mode="widthFix" style="position: absolute; top: 0; left: 0" />
+            <view class="d-flex j-ed f-s-22 c-#666">{{ data?.plannedStartDate }}至{{ data?.plannedEndDate }}</view>
+            <view class="d-flex a-ed pd-16 pt-8 pb-8">
+                <view class="c-#333 f-s-34 f-w-5 mr-6">{{ data?.variety }}</view>
+                <view class="c-#666 f-s-26">{{ data?.genusName }}</view>
+            </view>
+            <view class="d-flex a-c f-s-28 pd-16 pt-8 pb-8">
+                <view class="c-#666 w-s-no">种植批号:</view>
+                <view class="c-#333 f-w-5">{{ data?.plantationCode }}</view>
+            </view>
+            <view class="d-flex a-c f-s-28 pd-16 pt-8 pb-8">
+                <view class="c-#666 w-s-no">基地:</view>
+                <view class="c-#333 f-w-5 tx-ov w-s-no ov-hd d-flex a-c">
+                    {{ data?.baseRef?.baseInfo?.address }}基地
+                    <text v-if="data?.landIds.length == 0">全部地块</text>
+                    <view v-else>
+                        <text v-for="(item, index) in data?.baseRef?.baseInfo?.landList" :key="index"><text v-if="index != 0">、</text> {{ item?.landName }}</text>
+                    </view>
+                </view>
+            </view>
+            <view class="d-flex f-s-28 pd-16 pt-8 pb-8">
+                <view class="d-flex a-c w-50%">
+                    <view class="c-#666 w-s-no">种植面积:</view>
+                    <view class="c-#333 f-w-5 tx-ov w-s-no ov-hd">{{ data?.plantingAmount }}{{ data?.plantingUnit }}</view>
+                </view>
+                <view class="d-flex a-c w-50%">
+                    <view class="c-#666 w-s-no">种植量:</view>
+                    <view class="c-#333 f-w-5 tx-ov w-s-no ov-hd">{{ data?.plantingMgAmount }}{{ data?.plantingMgUnit }}</view>
+                </view>
+            </view>
+        </view>
+    </view>
+    <!-- 养殖 -->
+    <view class="" v-if="data?.taskType === '2'" @click="$emit('click')">
+        <view class="b-radius bg-#fff pd-10 p-rtv">
+            <image class="w-80 h-34" src="https://ta.zycpzs.cn/oss-file/smart-trace/szyy/images-plt/plant/port/Task_Breeding.png" mode="widthFix" style="position: absolute; top: 0; left: 0" />
+            <view class="d-flex j-ed f-s-22 c-#666">{{ data?.plannedStartDate }}至{{ data?.plannedEndDate }}</view>
+            <view class="d-flex a-ed pd-16 pt-8 pb-8">
+                <view class="c-#333 f-s-34 f-w-5 mr-6">{{ data?.variety }}</view>
+                <view class="c-#666 f-s-26">{{ data?.genusName }}</view>
+            </view>
+            <view class="d-flex a-c f-s-28 pd-16 pt-8 pb-8">
+                <view class="c-#666 w-s-no">养殖批号:</view>
+                <view class="c-#333 f-w-5">{{ data?.plantationCode }}</view>
+            </view>
+            <view class="d-flex a-c f-s-28 pd-16 pt-8 pb-8">
+                <view class="c-#666 w-s-no">基地:</view>
+                <view class="c-#333 f-w-5 tx-ov w-s-no ov-hd d-flex a-c">
+                    {{ data?.baseRef?.baseInfo?.address }}基地
+                    <text v-if="data?.landIds.length == 0">全部地块</text>
+                    <view v-else>
+                        <text v-for="(item, index) in data?.baseRef?.baseInfo?.landList" :key="index"><text v-if="index != 0">、</text> {{ item?.landName }}</text>
+                    </view>
+                </view>
+                <view class="flex1 d-flex j-ed"><up-icon name="arrow-right" size="34rpx"></up-icon></view>
+            </view>
+            <view class="d-flex f-s-28 pd-16 pt-8 pb-8">
+                <view class="d-flex a-c w-50%">
+                    <view class="c-#666 w-s-no">养殖区域:</view>
+                    <view class="c-#333 f-w-5 tx-ov w-s-no ov-hd">{{ data?.breedScale }}{{ data?.breedScaleUnit }}</view>
+                </view>
+                <view class="d-flex a-c w-50%">
+                    <view class="c-#666 w-s-no">养殖量:</view>
+                    <view class="c-#333 f-w-5 tx-ov w-s-no ov-hd">{{ data?.plantingMgAmount }}{{ data?.plantingMgUnit }}</view>
+                </view>
+            </view>
+        </view>
+    </view>
+    <!-- 种苗繁育 -->
+    <view class="" v-if="data?.taskType === '11'" @click="$emit('click')">
+        <view class="b-radius bg-#fff pd-10 p-rtv">
+            <image class="w-112 h-34" src="/static/images/plant/port/Task_Seedling_breeding.png" mode="widthFix" style="position: absolute; top: 0; left: 0" />
+            <view class="d-flex j-ed f-s-22 c-#666">{{ data?.plannedStartDate }}至{{ data?.plannedEndDate }}</view>
+            <view class="d-flex a-ed pd-16 pt-8 pb-8">
+                <view class="c-#333 f-s-34 f-w-5 mr-6">{{ data?.variety }}</view>
+                <view class="c-#666 f-s-26">{{ data?.genusName }}</view>
+            </view>
+            <view class="d-flex a-c f-s-28 pd-16 pt-8 pb-8">
+                <view class="c-#666 w-s-no">繁育批号:</view>
+                <view class="c-#333 f-w-5">{{ data?.plantationCode }}</view>
+            </view>
+            <view class="d-flex a-c f-s-28 pd-16 pt-8 pb-8">
+                <view class="c-#666 w-s-no">基地:</view>
+                <view class="c-#333 f-w-5 tx-ov w-s-no ov-hd d-flex a-c">
+                    {{ data?.baseRef?.baseInfo?.address }}基地
+                    <text v-if="data?.landIds.length == 0">全部地块</text>
+                    <view v-else>
+                        <text v-for="(item, index) in data?.baseRef?.baseInfo?.landList" :key="index"><text v-if="index != 0">、</text> {{ item?.landName }}</text>
+                    </view>
+                </view>
+            </view>
+            <view class="d-flex f-s-28 pd-16 pt-8 pb-8">
+                <view v-if="data?.baseType == '3'" class="d-flex a-c w-50%">
+                    <view class="c-#666 w-s-no">接种数量:</view>
+                    <view class="c-#333 f-w-5 tx-ov w-s-no ov-hd">{{ data?.inoculationAmount }}{{ data?.inoculationUnit }}</view>
+                </view>
+                <view v-else class="d-flex a-c w-50%">
+                    <view class="c-#666 w-s-no">种植面积:</view>
+                    <view class="c-#333 f-w-5 tx-ov w-s-no ov-hd">{{ data?.plantingAmount }}{{ data?.plantingUnit }}</view>
+                </view>
+                <view class="d-flex a-c w-50%">
+                    <view class="c-#666 w-s-no">繁育量:</view>
+                    <view class="c-#333 f-w-5 tx-ov w-s-no ov-hd">{{ data?.plantingMgAmount }}{{ data?.plantingMgUnit }}</view>
+                </view>
+            </view>
+        </view>
+    </view>
+    <!-- 种畜繁育 -->
+    <view class="" v-if="data?.taskType === '21'" @click="$emit('click')">
+        <view class="b-radius bg-#fff pd-10 p-rtv">
+            <image class="w-112 h-34" src="https://ta.zycpzs.cn/oss-file/smart-trace/szyy/images-plt/plant/port/Task_Breeding_Livestock.png" mode="widthFix" style="position: absolute; top: 0; left: 0" />
+            <view class="d-flex j-ed f-s-22 c-#666">{{ data?.plannedStartDate }}至{{ data?.plannedEndDate }}</view>
+            <view class="d-flex a-ed pd-16 pt-8 pb-8">
+                <view class="c-#333 f-s-34 f-w-5 mr-6">{{ data?.variety }}</view>
+                <view class="c-#666 f-s-26">{{ data?.genusName }}</view>
+            </view>
+            <view class="d-flex a-c f-s-28 pd-16 pt-8 pb-8">
+                <view class="c-#666 w-s-no">繁育批号:</view>
+                <view class="c-#333 f-w-5">{{ data?.plantationCode }}</view>
+            </view>
+            <view class="d-flex f-s-28 pd-16 pt-8 pb-8">
+                <view class="d-flex a-c w-50%">
+                    <view class="c-#666 w-s-no">养殖区域:</view>
+                    <view class="c-#333 f-w-5 tx-ov w-s-no ov-hd">{{ data?.breedScale }}{{ data?.breedScaleUnit }}</view>
+                </view>
+                <view class="d-flex a-c w-50%">
+                    <view class="c-#666 w-s-no">养殖量:</view>
+                    <view class="c-#333 f-w-5 tx-ov w-s-no ov-hd">{{ data?.plantingMgAmount }}{{ data?.plantingMgUnit }}</view>
+                </view>
+            </view>
+        </view>
+    </view>
+</template>
+<script setup lang="ts">
+const props = defineProps<{ data: any }>();
+</script>

+ 34 - 3
src/plant/port/port-supervise/index.vue

@@ -26,7 +26,7 @@
             <view class="pd-10"></view>
             <up-swipe-action>
                 <up-swipe-action-item v-for="(item, index) in list" :key="index" :name="item?.id" :options="options2" class="mb-20" @click="clickTempSwipe">
-                    <view class="bg-#fff b-radius pd-24" @click="gotoDetail(item)">
+                    <view v-if="+item?.activityType == 1" class="bg-#fff b-radius pd-24" @click="gotoDetail(item)">
                         <view class="d-flex a-c j-sb">
                             <view class="f-s-34 f-w-5 pb-10" v-if="item?.opMethod !== '99'">{{ selectDictLabel(+taskDate.baseType == 1 ? pt_op_method : +taskDate.baseType == 2 ? pt_raise_op_method : pt_breed_op_method, item?.opMethod) }}</view>
                             <view class="f-s-34 f-w-5 pb-10" v-else>{{ item?.cusOp }}</view>
@@ -36,9 +36,14 @@
                                 <view class="f-s-22 c-#666">{{ item?.activityEnd }}</view>
                             </view>
                         </view>
-                        <view class="d-flex pd4-8-0-8-0">
+                        <view class="d-flex pd4-8-0-8-0" v-if="item?.inputMaterialList?.length == 0">
                             <view class="c-#666 f-s-28 w-s-no">使用物料:</view>
-                            <view class="c-#333 f-s-28 f-w-5 w-s-no tx-ov ov-hd"></view>
+                            <view class="c-#333 f-s-28 f-w-5 w-s-no tx-ov ov-hd">
+                                <view v-for="(data, indexs) in item?.inputMaterialList">
+                                    <text v-if="indexs !== 0">、</text>
+                                    <text>{{ data?.materialName }}({{ data?.quantity }}{{ data?.unit }})</text>
+                                </view>
+                            </view>
                         </view>
                         <view v-if="item?.mgName" class="d-flex pd4-8-0-8-0">
                             <view class="c-#666 f-s-28">记录人:</view>
@@ -72,6 +77,32 @@
                             <view class="c-#333 f-s-28 f-w-5 w-s-no tx-ov ov-hd">{{ item?.remark }}</view>
                         </view>
                     </view>
+                    <view v-if="+item?.activityType == 2" class="bg-#fff b-radius pd-24" @click="gotoDetail(item)">
+                        <view class="d-flex a-c j-sb">
+                            <view class="f-s-34 f-w-5 pb-10">{{ item?.activityName }}</view>
+                        </view>
+                        <view class="d-flex pd4-8-0-8-0">
+                            <view class="c-#666 f-s-28 w-s-no">农资名称:</view>
+                            <view class="c-#333 f-s-28 f-w-5 w-s-no tx-ov ov-hd">
+                                <view v-for="(data, indexs) in item?.inputMaterialList">
+                                    <text v-if="indexs !== 0">、</text>
+                                    <text>{{ data?.materialName }}</text>
+                                </view>
+                            </view>
+                        </view>
+                        <view v-if="item?.mgName" class="d-flex pd4-8-0-8-0">
+                            <view class="c-#666 f-s-28">记录人:</view>
+                            <view class="c-#333 f-s-28 f-w-5">{{ item?.mgName }}</view>
+                        </view>
+                        <view v-if="item?.mgName" class="d-flex pd4-8-0-8-0">
+                            <view class="c-#666 f-s-28">投入量:</view>
+                            <view class="c-#333 f-s-28 f-w-5">{{ item?.inputMaterialList[0]?.quantity }}{{ item?.inputMaterialList[0]?.unit }}</view>
+                        </view>
+                        <view v-if="item?.remark" class="d-flex pd4-8-0-8-0">
+                            <view class="c-#666 f-s-28 w-s-no">说明:</view>
+                            <view class="c-#333 f-s-28 f-w-5 w-s-no tx-ov ov-hd">{{ item?.remark }}</view>
+                        </view>
+                    </view>
                 </up-swipe-action-item>
             </up-swipe-action>
         </view>

+ 1 - 1
src/plant/port/supervise/supervise-material-create/index.vue

@@ -5,7 +5,7 @@
         </template>
         <view>
             <view class="pd-24 bg-#fff">
-                <up-alert title="注意:投入物料记录可用于记录此次任务投入过的物料,不分 管理具体事务、圈舍和时间记录。" type="info" class="b-radius"></up-alert>
+                <up-alert title="注意:投入物料记录可用于记录此次任务投入过的物料,不分管理具体事务、圈舍和时间记录。" type="info" class="b-radius"></up-alert>
             </view>
             <up-form class="p-rtv" labelPosition="top" :model="form" :rules="rules" labelWidth="auto" ref="upFormRef">
                 <view class="bg-#fff pd-24 pt-0 mb-20">

+ 1 - 1
src/plant/port/supervise/supervise-material-detail/index.vue

@@ -1,7 +1,7 @@
 <template>
     <z-paging ref="paging" v-model="list" bgColor="#fff" safe-area-inset-bottom>
         <template #top>
-            <ut-navbar title="管理记录详情" :fixed="false"></ut-navbar>
+            <ut-navbar title="投入记录详情" :fixed="false"></ut-navbar>
         </template>
         <view class="pd-24 pt-0">
             <view v-if="+data?.inputFlag" class="pt-16 pb-16 info-border-bottom">

+ 8 - 1
src/tools/species-info/index.vue

@@ -20,6 +20,13 @@
             <info-card :item="item" :selected="selectedItems.has(item.id)" @click="toggleSelection(item)" />
         </template>
         <template #bottom>
+            <view v-if="formDate.inputs.length > 0" class="bg-#EBF6EE c-primary f-s-24 pd-10 pl-24">
+                已选择种源:
+                <template v-for="(item, index) in formDate.inputs" :key="index">
+                    <text v-if="index !== 0">、</text>
+                    {{ item.variety }}
+                </template>
+            </view>
             <view class="pd-20 d-flex">
                 <up-button type="primary" @click="open">确认选择</up-button>
             </view>
@@ -147,7 +154,6 @@ const changeSeach = () => {
 
 const toggleSelection = (item: SeedItem) => {
     const newMap = new Map(selectedItems.value);
-
     if (newMap.has(item.id)) {
         // 取消选择
         newMap.delete(item.id);
@@ -159,6 +165,7 @@ const toggleSelection = (item: SeedItem) => {
                 taskId: taskId.value,
                 seedId: item.id,
                 amount: '',
+                variety: item?.variety,
             });
         }
         newMap.set(item.id, item);