2 Commits 70710b4f87 ... a38df9c57b

Auteur SHA1 Message Date
  lisy a38df9c57b Merge branch 'master' of http://git.yujin.shuziyunyao.com/yujin/forestry-wx il y a 1 semaine
  lisy 90d908b0dc 风采完成 il y a 1 semaine

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

@@ -9,19 +9,15 @@
         </template>
         <view class="d-flex a-c pd-24 pb-0 bg-#f7f7f7">
             <view class="min-w-170 flex1">
-                <ut-action-sheet v-model="form.taskType" :tabs="[{ label: '全部', value: '' }, ...pt_task_type]"
-                    @change="onRefresh" title="选择原料类型">
+                <ut-action-sheet v-model="form.taskType" :tabs="[{ label: '全部', value: '' }, ...pt_task_type]" @change="onRefresh" title="选择原料类型">
                     <view class="d-flex search-select-item a-c">
-                        <view class="flex1 ov-hd f-s-28 c-333 text-center f-w-5 w-s-no">{{ selectDictLabel(pt_task_type,
-                            form.taskType) || '全部' }}</view>
+                        <view class="flex1 ov-hd f-s-28 c-333 text-center f-w-5 w-s-no">{{ selectDictLabel(pt_task_type, form.taskType) || '全部' }}</view>
                         <up-icon size="24rpx" color="#333" name="arrow-down-fill" class="mr-5"></up-icon>
                     </view>
                 </ut-action-sheet>
             </view>
             <view class="h-86 pl-20 w-100%">
-                <ut-search ref="searchRef" v-model="form.keyword" @search="changeSeach" @change="changeSeach" margin="0"
-                    :border="false" placeholder="搜批次号、品种名、基地名" bgColor="#fff" height="86rpx"
-                    borderRadius="10rpx"></ut-search>
+                <ut-search ref="searchRef" v-model="form.keyword" @search="changeSeach" @change="changeSeach" margin="0" :border="false" placeholder="搜批次号、品种名、基地名" bgColor="#fff" height="86rpx" borderRadius="10rpx"></ut-search>
             </view>
         </view>
         <view class="pd-24 bg-#f7f7f7">
@@ -29,68 +25,50 @@
         </view>
         <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"
-                        @cardClick="$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 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" @cardClick="$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>
         <template #empty v-if="form?.status == '1'">
             <view class="d-flex flex-cln a-c" style="margin-top: -200rpx">
-                <ut-empty class="mg-at" color="#ccc" size="28rpx"
-                    image="https://ta.zycpzs.cn/oss-file/smart-trace/szyy/images-plt/plant/noEmptyBase.png">暂无进行中的养殖任务</ut-empty>
+                <ut-empty class="mg-at" color="#ccc" size="28rpx" image="https://ta.zycpzs.cn/oss-file/smart-trace/szyy/images-plt/plant/noEmptyBase.png">暂无进行中的养殖任务</ut-empty>
                 <text class="c-#ccc f-s-28">点击下方按钮去添加吧~</text>
             </view>
         </template>
         <template #empty v-if="form?.status == '9'">
             <view class="d-flex flex-cln a-c" style="margin-top: -200rpx">
-                <ut-empty class="mg-at" color="#ccc" size="28rpx"
-                    image="https://ta.zycpzs.cn/oss-file/smart-trace/szyy/images-plt/plant/noEmptyBase.png">暂无已经结束的养殖任务</ut-empty>
+                <ut-empty class="mg-at" color="#ccc" size="28rpx" image="https://ta.zycpzs.cn/oss-file/smart-trace/szyy/images-plt/plant/noEmptyBase.png">暂无已经结束的养殖任务</ut-empty>
             </view>
         </template>
         <template #bottom>
             <ut-tabar activeTab="planting"></ut-tabar>
         </template>
     </z-paging>
-    <ut-suspension v-if="sus?.left" :imageWidth="60" :imageHeight="60" :x="sus?.left" :y="sus?.bottom" :inertia="false"
-        :snap-threshold="40">
-        <image src="https://ta.zycpzs.cn/oss-file/smart-trace/szyy/images-plt/common/btn_add_logo.png" mode="widthFix"
-            class="w-120 h-120" @click="showDeleteDialog = true"></image>
+    <ut-suspension v-if="sus?.left" :imageWidth="60" :imageHeight="60" :x="sus?.left" :y="sus?.bottom" :inertia="false" :snap-threshold="40">
+        <image src="https://ta.zycpzs.cn/oss-file/smart-trace/szyy/images-plt/common/btn_add_logo.png" mode="widthFix" class="w-120 h-120" @click="showDeleteDialog = true"></image>
     </ut-suspension>
-    <ut-confirm-dialog v-model:show="showDeleteDialog" width="80vw" title="请选择要创建的任务类型" :confirmText="'确认选择'"
-        :cancelText="'取消'" @confirm="handlechoseConfirm" @cancel="handleDeleteCancel">
+    <ut-confirm-dialog v-model:show="showDeleteDialog" width="80vw" title="请选择要创建的任务类型" :confirmText="'确认选择'" :cancelText="'取消'" @confirm="handlechoseConfirm" @cancel="handleDeleteCancel">
         <view class="" v-for="item in pt_task_type" :key="item?.value">
-            <view style="border: 1rpx solid"
-                :style="{ backgroundColor: item?.value == basetype ? '#EBF6EE' : '#f7f7f7', borderColor: item?.value == basetype ? '#37A954' : 'transparent' }"
-                class="pr-30 d-flex a-c mb-20 radius-100" @click="handlechose(item.value)">
+            <view style="border: 1rpx solid" :style="{ backgroundColor: item?.value == basetype ? '#EBF6EE' : '#f7f7f7', borderColor: item?.value == basetype ? '#37A954' : 'transparent' }" class="pr-30 d-flex a-c mb-20 radius-100" @click="handlechose(item.value)">
                 <view class="radius-50% mg-8 bg-#F0F0F0" v-if="item?.value == '1'">
-                    <up-avatar size="90rpx"
-                        src="https://ta.zycpzs.cn/oss-file/smart-trace/szyy/images-plt/plant/port/TaskType_plant.png"></up-avatar>
+                    <up-avatar size="90rpx" src="https://ta.zycpzs.cn/oss-file/smart-trace/szyy/images-plt/plant/port/TaskType_plant.png"></up-avatar>
                 </view>
                 <view class="radius-50% mg-8 bg-#F0F0F0" v-if="item?.value == '2'">
-                    <up-avatar size="90rpx"
-                        src="https://ta.zycpzs.cn/oss-file/smart-trace/szyy/images-plt/plant/port/TaskType_breeding.png"></up-avatar>
+                    <up-avatar size="90rpx" src="https://ta.zycpzs.cn/oss-file/smart-trace/szyy/images-plt/plant/port/TaskType_breeding.png"></up-avatar>
                 </view>
                 <view class="radius-50% mg-8 bg-#F0F0F0" v-if="item?.value == '11'">
-                    <up-avatar size="90rpx"
-                        src="https://ta.zycpzs.cn/oss-file/smart-trace/szyy/images-plt/plant/port/TaskType_SeedlingBreeding.png"></up-avatar>
+                    <up-avatar size="90rpx" src="https://ta.zycpzs.cn/oss-file/smart-trace/szyy/images-plt/plant/port/TaskType_SeedlingBreeding.png"></up-avatar>
                 </view>
                 <view class="radius-50% mg-8 bg-#F0F0F0" v-if="item?.value == '21'">
-                    <up-avatar size="90rpx"
-                        src="https://ta.zycpzs.cn/oss-file/smart-trace/szyy/images-plt/plant/port/TaskType_BreedingLivestock.png"></up-avatar>
+                    <up-avatar size="90rpx" src="https://ta.zycpzs.cn/oss-file/smart-trace/szyy/images-plt/plant/port/TaskType_BreedingLivestock.png"></up-avatar>
                 </view>
                 <view class="c-#333 f-s-34">
                     {{ item?.label }}
                 </view>
                 <view class="flex1"></view>
                 <view class="d-flex">
-                    <img v-if="basetype === item.value" class="w-30 h-30"
-                        src="https://ta.zycpzs.cn/oss-file/smart-trace/szyy/images-plt/plant/chooseSuccessfully.png"
-                        mode="widthFix" alt="" />
+                    <img v-if="basetype === item.value" class="w-30 h-30" src="https://ta.zycpzs.cn/oss-file/smart-trace/szyy/images-plt/plant/chooseSuccessfully.png" mode="widthFix" alt="" />
                 </view>
             </view>
         </view>
@@ -99,6 +77,7 @@
 <script setup lang="ts">
 import { useClientRequest } from '@/utils/request';
 import Task from './models/task.vue';
+import { copy } from 'clipboard';
 const { proxy } = getCurrentInstance() as ComponentInternalInstance;
 const { pt_task_type } = toRefs<any>(proxy?.useDict('pt_task_type'));
 const list = ref<unknown[]>();
@@ -221,7 +200,28 @@ const clickTempSwipe = async (event: object) => {
             console.error('结束任务失败:', error);
         }
     }
+    if (index === 0) {
+        try {
+            console.log(name, 'name');
+
+            const res = await uni.showModal({
+                title: '复制提示',
+                content: '确定复制该任务吗?',
+                confirmColor: '#37A954',
+            });
+            if (!res.confirm) return;
+            await uni.showLoading({
+                title: '复制中...',
+                mask: true,
+            });
+            uni.$u.route({ type: 'navigateTo', url: '/plant/port/port-create/index', params: { taskId: name, copy: true } });
+            uni.hideLoading();
+        } catch (error) {
+            console.error('复制任务失败:', error);
+        }
+    }
 };
+
 const refreshList = () => {
     paging.value?.reload();
 };

+ 43 - 99
src/pages/plant/port/models/task.vue

@@ -2,22 +2,18 @@
     <!-- 养殖 -->
     <view class="" v-if="data.taskType === '2'">
         <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" />
-            <image v-if="+status == 9" class="w-98 h-98"
-                src="https://ta.zycpzs.cn/oss-file/smart-trace/szyy/images-plt/plant/port/over.png" mode="widthFix"
-                style="position: absolute; top: 50rpx; right: 20rpx" />
+            <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" />
+            <image v-if="+status == 9" class="w-98 h-98" src="https://ta.zycpzs.cn/oss-file/smart-trace/szyy/images-plt/plant/port/over.png" mode="widthFix" style="position: absolute; top: 50rpx; right: 20rpx" />
             <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" @click.stop="$emit('cardClick')">
                 <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" @click.stop="$emit('cardClick')">
+            <view class="d-flex f-s-28 pd-16 pt-8 pb-8" @click.stop="$emit('cardClick')">
                 <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="d-flex f-s-28 pd-16 pt-8 pb-8">
                 <view class="c-#666 w-s-no">种源批号:</view>
                 <view v-if="data?.seedCodeList.length !== 0">
                     <view class="c-#333 f-w-5" v-for="item in data?.seedCodeList" :key="item">{{ item }}</view>
@@ -32,8 +28,7 @@
                     {{ data?.baseRef?.baseName }}
                     <text v-if="+data?.landFlag">全部地块</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>
+                        <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>
@@ -41,13 +36,11 @@
             <view class="d-flex f-s-28 pd-16 pt-8 pb-8" @click.stop="$emit('cardClick')">
                 <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 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 class="c-#333 f-w-5 tx-ov w-s-no ov-hd">{{ data?.plantingMgAmount }}{{ data?.plantingMgUnit }} </view>
                 </view>
             </view>
             <view class="pd-16 pt-8 pb-8">
@@ -56,25 +49,19 @@
             <view class="pd-16 pt-8 pb-8 d-flex j-sb gap-20">
                 <up-button :customStyle="customStyle1" @click.stop="$emit('toInformation')">
                     <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_Species_source_information.png"
-                            mode="widthFix" />
+                        <image class="w-28 h-24" src="https://ta.zycpzs.cn/oss-file/smart-trace/szyy/images-plt/plant/port/Task_Species_source_information.png" mode="widthFix" />
                         <text class="f-s-26">种源信息</text>
                     </view>
                 </up-button>
                 <up-button :customStyle="customStyle2" @click.stop="$emit('toSupervise')">
                     <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_Breeding_management.png"
-                            mode="widthFix" />
+                        <image class="w-28 h-24" src="https://ta.zycpzs.cn/oss-file/smart-trace/szyy/images-plt/plant/port/Task_Breeding_management.png" mode="widthFix" />
                         <text class="f-s-26">饲养管理</text>
                     </view>
                 </up-button>
                 <up-button :customStyle="customStyle3" @click.stop="$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" />
+                        <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>
                     </view>
                 </up-button>
@@ -84,22 +71,18 @@
     <!-- 种苗繁育 -->
     <view class="" v-if="data.taskType === '11'">
         <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_Seedling_breeding.png"
-                mode="widthFix" style="position: absolute; top: 0; left: 0" />
-            <image v-if="+status == 9" class="w-98 h-98"
-                src="https://ta.zycpzs.cn/oss-file/smart-trace/szyy/images-plt/plant/port/over.png" mode="widthFix"
-                style="position: absolute; top: 50rpx; right: 20rpx" />
+            <image class="w-112 h-34" src="https://ta.zycpzs.cn/oss-file/smart-trace/szyy/images-plt/plant/port/Task_Seedling_breeding.png" mode="widthFix" style="position: absolute; top: 0; left: 0" />
+            <image v-if="+status == 9" class="w-98 h-98" src="https://ta.zycpzs.cn/oss-file/smart-trace/szyy/images-plt/plant/port/over.png" mode="widthFix" style="position: absolute; top: 50rpx; right: 20rpx" />
             <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" @click.stop="$emit('cardClick')">
                 <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" @click.stop="$emit('cardClick')">
+            <view class="d-flex f-s-28 pd-16 pt-8 pb-8" @click.stop="$emit('cardClick')">
                 <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" @click.stop="$emit('cardClick')">
+            <view class="d-flex f-s-28 pd-16 pt-8 pb-8" @click.stop="$emit('cardClick')">
                 <view class="c-#666 w-s-no">种源批号:</view>
                 <view v-if="data?.seedCodeList.length !== 0">
                     <view class="c-#333 f-w-5" v-for="item in data?.seedCodeList" :key="item">{{ item }}</view>
@@ -114,8 +97,7 @@
                     {{ data?.baseRef?.baseName }}
                     <text v-if="+data?.landFlag">全部地块</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>
+                        <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>
@@ -123,18 +105,15 @@
             <view class="d-flex f-s-28 pd-16 pt-8 pb-8" @click.stop="$emit('cardClick')">
                 <view v-if="data?.lands[0]?.landType == '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 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 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 class="c-#333 f-w-5 tx-ov w-s-no ov-hd">{{ data?.plantingMgAmount }}{{ data?.plantingMgUnit }} </view>
                 </view>
             </view>
             <view class="pd-16 pt-8 pb-8">
@@ -143,34 +122,25 @@
             <view class="pd-16 pt-8 pb-8 d-flex j-sb gap-20">
                 <up-button :customStyle="customStyle1" @click.stop="$emit('toInformation')">
                     <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_Species_source_information.png"
-                            mode="widthFix" />
+                        <image class="w-28 h-24" src="https://ta.zycpzs.cn/oss-file/smart-trace/szyy/images-plt/plant/port/Task_Species_source_information.png" mode="widthFix" />
                         <text class="f-s-26">种源信息</text>
                     </view>
                 </up-button>
-                <up-button v-if="data?.lands[0]?.landType == '3'" :customStyle="customStyle2"
-                    @click.stop="$emit('toSupervise')">
+                <up-button v-if="data?.lands[0]?.landType == '3'" :customStyle="customStyle2" @click.stop="$emit('toSupervise')">
                     <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_Breeding_management.png"
-                            mode="widthFix" />
+                        <image class="w-28 h-24" src="https://ta.zycpzs.cn/oss-file/smart-trace/szyy/images-plt/plant/port/Task_Breeding_management.png" mode="widthFix" />
                         <text class="f-s-26"> 繁育管理 </text>
                     </view>
                 </up-button>
                 <up-button v-else :customStyle="customStyle2" @click.stop="$emit('toSupervise')">
                     <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_Breeding_management.png"
-                            mode="widthFix" />
+                        <image class="w-28 h-24" src="https://ta.zycpzs.cn/oss-file/smart-trace/szyy/images-plt/plant/port/Task_Breeding_management.png" mode="widthFix" />
                         <text class="f-s-26"> 种植管理 </text>
                     </view>
                 </up-button>
                 <up-button :customStyle="customStyle3" @click.stop="$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" />
+                        <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>
                     </view>
                 </up-button>
@@ -180,22 +150,18 @@
     <!-- 种植 -->
     <view class="" v-if="data.taskType === '1'">
         <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" />
-            <image v-if="+status == 9" class="w-98 h-98"
-                src="https://ta.zycpzs.cn/oss-file/smart-trace/szyy/images-plt/plant/port/over.png" mode="widthFix"
-                style="position: absolute; top: 50rpx; right: 20rpx" />
+            <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" />
+            <image v-if="+status == 9" class="w-98 h-98" src="https://ta.zycpzs.cn/oss-file/smart-trace/szyy/images-plt/plant/port/over.png" mode="widthFix" style="position: absolute; top: 50rpx; right: 20rpx" />
             <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" @click.stop="$emit('cardClick')">
                 <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" @click.stop="$emit('cardClick')">
+            <view class="d-flexf-s-28 pd-16 pt-8 pb-8" @click.stop="$emit('cardClick')">
                 <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" @click.stop="$emit('cardClick')">
+            <view class="d-flex f-s-28 pd-16 pt-8 pb-8" @click.stop="$emit('cardClick')">
                 <view class="c-#666 w-s-no">种源批号:</view>
                 <view v-if="data?.seedCodeList.length !== 0">
                     <view class="c-#333 f-w-5" v-for="item in data?.seedCodeList" :key="item">{{ item }}</view>
@@ -210,8 +176,7 @@
                     {{ data?.baseRef?.baseName }}
                     <text v-if="+data?.landFlag">全部地块</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>
+                        <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>
@@ -219,13 +184,11 @@
             <view class="d-flex f-s-28 pd-16 pt-8 pb-8" @click.stop="$emit('cardClick')">
                 <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 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 class="c-#333 f-w-5 tx-ov w-s-no ov-hd">{{ data?.plantingMgAmount }}{{ data?.plantingMgUnit }} </view>
                 </view>
             </view>
             <view class="pd-16 pt-8 pb-8">
@@ -234,25 +197,19 @@
             <view class="pd-16 pt-8 pb-8 d-flex j-sb gap-20">
                 <up-button :customStyle="customStyle1" @click.stop="$emit('toInformation')">
                     <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_Species_source_information.png"
-                            mode="widthFix" />
+                        <image class="w-28 h-24" src="https://ta.zycpzs.cn/oss-file/smart-trace/szyy/images-plt/plant/port/Task_Species_source_information.png" mode="widthFix" />
                         <text class="f-s-26">种源信息</text>
                     </view>
                 </up-button>
                 <up-button :customStyle="customStyle2" @click.stop="$emit('toSupervise')">
                     <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_Breeding_management.png"
-                            mode="widthFix" />
+                        <image class="w-28 h-24" src="https://ta.zycpzs.cn/oss-file/smart-trace/szyy/images-plt/plant/port/Task_Breeding_management.png" mode="widthFix" />
                         <text class="f-s-26"> 种植管理 </text>
                     </view>
                 </up-button>
                 <up-button :customStyle="customStyle3" @click.stop="$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" />
+                        <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>
                     </view>
                 </up-button>
@@ -262,22 +219,18 @@
     <!-- 种畜繁育 -->
     <view class="" v-if="data.taskType === '21'">
         <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" />
-            <image v-if="+status == 9" class="w-98 h-98"
-                src="https://ta.zycpzs.cn/oss-file/smart-trace/szyy/images-plt/plant/port/over.png" mode="widthFix"
-                style="position: absolute; top: 50rpx; right: 20rpx" />
+            <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" />
+            <image v-if="+status == 9" class="w-98 h-98" src="https://ta.zycpzs.cn/oss-file/smart-trace/szyy/images-plt/plant/port/over.png" mode="widthFix" style="position: absolute; top: 50rpx; right: 20rpx" />
             <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" @click.stop="$emit('cardClick')">
                 <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" @click.stop="$emit('cardClick')">
+            <view class="d-flex f-s-28 pd-16 pt-8 pb-8" @click.stop="$emit('cardClick')">
                 <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" @click.stop="$emit('cardClick')">
+            <view class="d-flex f-s-28 pd-16 pt-8 pb-8" @click.stop="$emit('cardClick')">
                 <view class="c-#666 w-s-no">种源批号:</view>
                 <view v-if="data?.seedCodeList.length !== 0">
                     <view class="c-#333 f-w-5" v-for="item in data?.seedCodeList" :key="item">{{ item }}</view>
@@ -292,8 +245,7 @@
                     {{ data?.baseRef?.baseName }}
                     <text v-if="+data?.landFlag">全部地块</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>
+                        <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>
@@ -301,13 +253,11 @@
             <view class="d-flex f-s-28 pd-16 pt-8 pb-8" @click.stop="$emit('cardClick')">
                 <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 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 class="c-#333 f-w-5 tx-ov w-s-no ov-hd">{{ data?.plantingMgAmount }}{{ data?.plantingMgUnit }} </view>
                 </view>
             </view>
             <view class="pd-16 pt-8 pb-8">
@@ -316,25 +266,19 @@
             <view class="pd-16 pt-8 pb-8 d-flex j-sb gap-20">
                 <up-button :customStyle="customStyle1" @click.stop="$emit('toInformation')">
                     <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_Species_source_information.png"
-                            mode="widthFix" />
+                        <image class="w-28 h-24" src="https://ta.zycpzs.cn/oss-file/smart-trace/szyy/images-plt/plant/port/Task_Species_source_information.png" mode="widthFix" />
                         <text class="f-s-26">种源信息</text>
                     </view>
                 </up-button>
                 <up-button :customStyle="customStyle2" @click.stop="$emit('toSupervise')">
                     <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_Breeding_management.png"
-                            mode="widthFix" />
+                        <image class="w-28 h-24" src="https://ta.zycpzs.cn/oss-file/smart-trace/szyy/images-plt/plant/port/Task_Breeding_management.png" mode="widthFix" />
                         <text class="f-s-26">饲养管理</text>
                     </view>
                 </up-button>
                 <up-button :customStyle="customStyle3" @click.stop="$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" />
+                        <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>
                     </view>
                 </up-button>

+ 1 - 1
src/plant/models/warehouseCard/product-item.vue

@@ -156,6 +156,6 @@ const handleClick = () => {
 /* 种源 - 蓝色 */
 
 .bg-instore-6 {
-    background-color: #ebf6ee;
+    background-color: #3fad5b;
 }
 </style>

+ 14 - 1
src/plant/port/port-create/index.vue

@@ -1349,10 +1349,15 @@ function handleLaboratoryConfirm(data: any) {
 const taskId = ref();
 //是否是修改的标志
 const isEdit = ref(false);
+//是否是复制
+const isCopy = ref(false);
 onLoad((options) => {
     if (!options?.taskType && options?.taskId) {
         taskId.value = options?.taskId;
         isEdit.value = true;
+        if (options?.copy) {
+            isCopy.value = true;
+        }
     } else {
         form.value.taskType = options?.taskType;
         if (+options?.taskType == 1 || +options?.taskType == 11) {
@@ -1492,6 +1497,14 @@ const getInfo = async (taskId: any) => {
             });
         }
     }
+    if (isCopy.value) {
+        form.value.plantationCode = null;
+        form.value.queryType6.plannedStartDate = null;
+        form.value.queryType6.plannedEndDate = null;
+        form.value.plantingMgAmount = null;
+        animalIds.value = [];
+        animalId.value = null;
+    }
 };
 onMounted(() => {
     if (taskId.value) {
@@ -1501,7 +1514,7 @@ onMounted(() => {
     }
 });
 </script>
-<style lang="scss">
+<style lang="scss" scoped>
 :deep(.form-item-top-padding-0) {
     > .u-form-item__body {
         padding-top: 0rpx;

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

@@ -166,7 +166,7 @@ onLoad((options: any) => {
     });
 });
 </script>
-<style lang="scss">
+<style lang="scss" scoped>
 :deep(.u-swipe-action-item__right__button__wrapper__text) {
     white-space: normal;
 }

+ 22 - 29
src/plant/storage/finished-product/list/model/fresh-goods-bottom.vue

@@ -1,47 +1,38 @@
 <template>
     <view class="source-bottom-fixed">
         <view class="source-top-view h-49"></view>
-        <view class="source-bottom-view pt-49 text-center bg-#fff pt-60"
-            :style="{ opacity: btnStyle == 'close' ? 0 : 1 }">
-            <view style="opacity: 0;">{{ mapTextBtn[btnStyle] }}</view>
-
+        <view class="source-bottom-view pt-49 text-center bg-#fff pt-60" :style="{ opacity: btnStyle == 'close' ? 0 : 1 }">
+            <view style="opacity: 0">{{ mapTextBtn[btnStyle] }}</view>
         </view>
         <view @click="clickBtnBall" class="source-center-view d-flex flex-cln a-c j-c">
-            <view class="source-btn-ball d-flex a-c j-c" :class="{ [`btn-deg-${btnStyle}`]: true }"
-                :style="{ backgroundImage: 'url(https://ta.zycpzs.cn/oss-file/smart-trace/szyy/images-plt/plant/storage/add_c_btn.png)' }">
-            </view>
+            <view class="source-btn-ball d-flex a-c j-c" :class="{ [`btn-deg-${btnStyle}`]: true }" :style="{ backgroundImage: 'url(https://ta.zycpzs.cn/oss-file/smart-trace/szyy/images-plt/plant/storage/add_c_btn.png)' }"> </view>
             <view class="c-primary f-s-28 pt-6">{{ mapTextBtn[btnStyle] }}</view>
-
         </view>
         <view class="bg-#fff" :style="{ height: safeAreaBottom + 'px' }"></view>
-        <view class="bottom-circle-line" :class="{ 'bottom-circle-line-active': btnStyle == 'close' }"
-            :style="{ bottom: safeAreaBottom + 'px' }">
-            <view class="bottom-circle d-flex"
-                :style="{ backgroundImage: 'url(https://ta.zycpzs.cn/oss-file/smart-trace/szyy/images-plt/plant/storage/send_btm_bg_c.png)' }">
+        <view class="bottom-circle-line" :class="{ 'bottom-circle-line-active': btnStyle == 'close' }" :style="{ bottom: safeAreaBottom + 'px' }">
+            <view class="bottom-circle d-flex" :style="{ backgroundImage: 'url(https://ta.zycpzs.cn/oss-file/smart-trace/szyy/images-plt/plant/storage/send_btm_bg_c.png)' }">
                 <view class="flex1 d-flex flex-cln a-c pt-160 pl-30">
                     <view>
-                        <image class="w-68 h-68"
-                            src="https://ta.zycpzs.cn/oss-file/smart-trace/szyy/images-plt/plant/storage/xzhwk_icon_sd.png"
-                            mode="widthFix" />
+                        <image class="w-68 h-68" src="https://ta.zycpzs.cn/oss-file/smart-trace/szyy/images-plt/plant/storage/xzhwk_icon_sd.png" mode="widthFix" />
                     </view>
                     <view class="f-s-28 c-#333">下载货位卡</view>
                     <view class="f-s-22 c-#999">库存结余清晰</view>
                 </view>
                 <view class="d-flex flex-cln a-c pt-24">
                     <view>
-                        <image class="w-68 h-68"
-                            src="https://ta.zycpzs.cn/oss-file/smart-trace/szyy/images-plt/plant/storage/xzsyrk_icon_sd.png"
-                            mode="widthFix" />
+                        <image class="w-68 h-68" src="https://ta.zycpzs.cn/oss-file/smart-trace/szyy/images-plt/plant/storage/xzsyrk_icon_sd.png" mode="widthFix" />
                     </view>
                     <view class="f-s-28 c-#333">销售记录清单</view>
                     <view class="f-s-22 c-#999">销售登记的记录都在这里</view>
                 </view>
-                <view class="flex1 d-flex flex-cln a-c pt-160 pr-30"
-                    @click="clickBtnBall(); $u.route({ url: '/plant/storage/fresh-goods/add/index' });">
+                <view
+                    class="flex1 d-flex flex-cln a-c pt-160 pr-30"
+                    @click="
+                        clickBtnBall();
+                        $u.route({ url: '/plant/storage/fresh-goods/add/index' });
+                    ">
                     <view>
-                        <image class="w-68 h-68"
-                            src="https://ta.zycpzs.cn/oss-file/smart-trace/szyy/images-plt/plant/storage/xzfsyrk_icon_sd.png"
-                            mode="widthFix" />
+                        <image class="w-68 h-68" src="https://ta.zycpzs.cn/oss-file/smart-trace/szyy/images-plt/plant/storage/xzfsyrk_icon_sd.png" mode="widthFix" />
                     </view>
                     <view class="f-s-28 c-#333">销售登记</view>
                     <view class="f-s-22 c-#999">按订单包装或按数量登记都可</view>
@@ -50,21 +41,21 @@
         </view>
     </view>
     <view class="pt-60">
-        <view style="opacity: 0;">{{ mapTextBtn[btnStyle] }}</view>
+        <view style="opacity: 0">{{ mapTextBtn[btnStyle] }}</view>
     </view>
     <view class="bg-#fff" :style="{ height: safeAreaBottom + 'px' }"></view>
 </template>
 <script setup lang="ts">
 const windowInfo = uni.getWindowInfo();
 const safeAreaBottom = windowInfo.safeAreaInsets.bottom;
-const btnStyle = ref('add')
+const btnStyle = ref('add');
 const mapTextBtn = ref<any>({
-    add: '新增鲜货信息',
+    add: '新增成品信息',
     close: '关闭',
 });
 const clickBtnBall = () => {
     btnStyle.value = btnStyle.value === 'add' ? 'close' : 'add';
-}
+};
 </script>
 
 <style scoped lang="scss">
@@ -104,7 +95,9 @@ const clickBtnBall = () => {
     opacity: 0;
     transform: translateY(80rpx);
     pointer-events: none;
-    transition: opacity 0.3s ease, transform 0.3s ease;
+    transition:
+        opacity 0.3s ease,
+        transform 0.3s ease;
 }
 
 .bottom-circle-line-active {
@@ -114,7 +107,7 @@ const clickBtnBall = () => {
 }
 
 .source-bottom-view {
-    box-shadow: 0px 0px 6rpx 0px #F1F6F4;
+    box-shadow: 0px 0px 6rpx 0px #f1f6f4;
     transition: all 0.3s ease;
 }