lisy 3 тижнів тому
батько
коміт
c5ce2b62d8

+ 3 - 2
src/audit/plant/base/audit-detail/index.vue

@@ -145,11 +145,12 @@ const passAudit = async () => {
             icon: 'success',
         });
         paging.value?.reload();
+        uni.$emit('refreshGapBaseListAudit');
         uni.$emit('refreshSwyqListAudit');
         //返回上一页
-        uni.navigateBack({
+        setTimeout(() => uni.navigateBack({
             delta: 1,
-        });
+        }), 300);
     } catch (error) {
         console.error('通过基地审核失败:', error);
     }

+ 64 - 33
src/components/ut-tabar/ut-tabar.vue

@@ -1,47 +1,78 @@
 <template>
-    <view class="w-100%" style="position: fixed; bottom: 0; left: 0; z-index: 1100">
-        <view class="p-rtv" style="height: 210rpx">
-            <image class="w-100%" src="https://ta.zycpzs.cn/oss-file/smart-trace/szyy/images-plt/plant/bottombg.png" mode="widthFix" style="position: absolute; bottom: 0; left: 0; z-index: -1" />
-            <view class="d-flex h-140 w-100% j-sa" style="position: absolute; bottom: 0; left: 0">
-                <view class="d-flex a-c flex1 j-sa">
-                    <view @click="showStorage = false;$u.route({ type: 'switchTab', url: '/pages/plant/base/index' })" class="c-#999 f-s-24 d-flex flex-cln j-c a-c">
-                        <image v-if="activeTab === 'base'" class="w-80 h-80" src="https://ta.zycpzs.cn/oss-file/smart-trace/szyy/images-plt/plant/bottomBaseActive.png" mode="widthFix" />
-                        <image v-else class="w-80 h-80" src="https://ta.zycpzs.cn/oss-file/smart-trace/szyy/images-plt/plant/bottomBase.png" mode="widthFix" />
-                        <view class="text-center" :class="activeTab === 'base' ? 'c-primary f-w-5' : ''">基地</view>
-                    </view>
-                    <view @click="showStorage = false;$u.route({ type: 'switchTab', url: '/pages/plant/port/index' })" class="c-#999 f-s-24 d-flex flex-cln j-c a-c">
-                        <image v-if="activeTab === 'planting'" class="w-80 h-80" src="https://ta.zycpzs.cn/oss-file/smart-trace/szyy/images-plt/plant/bottomPlantingBreedingActive.png" mode="widthFix" />
-                        <image v-else class="w-80 h-80" src="https://ta.zycpzs.cn/oss-file/smart-trace/szyy/images-plt/plant/bottomPlantingBreeding.png" mode="widthFix" />
-                        <view class="text-center" :class="activeTab === 'planting' ? 'c-primary f-w-5' : ''">种养殖</view>
-                    </view>
-                </view>
-                <view class="w-126 d-flex a-c j-c p-rtv" @click="$u.route({ type: 'switchTab', url: '/pages/plant/storage/index' })">
-                    <image v-if="activeTab === 'storage'" class="w-80 h-80" src="https://ta.zycpzs.cn/oss-file/smart-trace/szyy/images-plt/plant/bottomWarehouseActive.png" mode="widthFix" style="position: absolute; top: -40rpx" />
-                    <image  v-else class="w-80 h-80" src="https://ta.zycpzs.cn/oss-file/smart-trace/szyy/images-plt/plant/bottomWarehouse.png" mode="widthFix" style="position: absolute; top: -40rpx" />
-                </view>
-                <view class="d-flex a-c flex1 j-sa">
-                    <view class="c-#999 f-s-24 d-flex flex-cln j-c a-c" @click="$u.route({ type: 'switchTab', url: '/pages/plant/processing/index' })">
-                        <image v-if="activeTab === 'processing'" class="w-80 h-80" src="https://ta.zycpzs.cn/oss-file/smart-trace/szyy/images-plt/plant/bottomProcessingPackagingActive.png" mode="widthFix" />
-                        <image v-else class="w-80 h-80" src="https://ta.zycpzs.cn/oss-file/smart-trace/szyy/images-plt/plant/bottomProcessingPackaging.png" mode="widthFix" />
-                        <view class="text-center" :class="activeTab === 'processing' ? 'c-primary f-w-5' : ''">加工包装</view>
-                    </view>
-                    <view @click="$u.route({ type: 'switchTab', url: '/pages/plant/more/index' })" class="c-#999 f-s-24 d-flex flex-cln j-c a-c">
-                        <image v-if="activeTab === 'more'" class="w-80 h-80" src="https://ta.zycpzs.cn/oss-file/smart-trace/szyy/images-plt/plant/bottomMoreActive.png" mode="widthFix" />
-                        <image v-else class="w-80 h-80" src="https://ta.zycpzs.cn/oss-file/smart-trace/szyy/images-plt/plant/bottomMore.png" mode="widthFix" />
-                        <view class="text-center" :class="activeTab === 'more' ? 'c-primary f-w-5' : ''">更多</view>
-                    </view>
-                </view>
+    <view class="d-flex a-c j-sb bg-fff pd-10">
+        <view
+            v-for="item in navs"
+            :key="item.id"
+            @click="navigate(item)"
+            class="c-#999 f-s-24 d-flex flex-cln j-c a-c flex1"
+        >
+            <image
+                :class="'w-64 h-64'"
+                :src="activeTab === item.id ? item.activeIcon : item.icon"
+                mode="widthFix"
+            />
+            <view class="text-center" :class="activeTab === item.id ? 'c-primary f-w-5' : ''">
+                {{ item.label }}
             </view>
         </view>
-        <view class="bg-#fff" :style="{ height: `${safeAreaBottom}px` }"></view>
     </view>
+    <view class="bg-fff" :style="{ height: `${safeAreaBottom}px` }"></view>
 </template>
 
 <script setup lang="ts">
 const showStorage = ref(false);
+
 defineProps<{
     activeTab?: string; // 当前活跃的tab标识符:'base' | 'planting' | 'warehouse' | 'processing' | 'more'
 }>();
+
 const windowInfo = uni.getWindowInfo();
 const safeAreaBottom = windowInfo.safeAreaInsets.bottom;
+
+// data-driven nav items
+const navs = [
+    {
+        id: 'base',
+        label: '基地',
+        icon: 'https://ta.zycpzs.cn/oss-file/smart-trace/szyy/images-plt/plant/bottomBase.png',
+        activeIcon: 'https://ta.zycpzs.cn/oss-file/smart-trace/szyy/images-plt/plant/bottomBaseActive.png',
+        url: '/pages/plant/base/index',
+    },
+    {
+        id: 'planting',
+        label: '种养殖',
+        icon: 'https://ta.zycpzs.cn/oss-file/smart-trace/szyy/images-plt/plant/bottomPlantingBreeding.png',
+        activeIcon: 'https://ta.zycpzs.cn/oss-file/smart-trace/szyy/images-plt/plant/bottomPlantingBreedingActive.png',
+        url: '/pages/plant/port/index',
+    },
+    {
+        id: 'processing',
+        label: '加工包装',
+        icon: 'https://ta.zycpzs.cn/oss-file/smart-trace/szyy/images-plt/plant/bottomProcessingPackaging.png',
+        activeIcon: 'https://ta.zycpzs.cn/oss-file/smart-trace/szyy/images-plt/plant/bottomProcessingPackagingActive.png',
+        url: '/pages/plant/processing/index',
+    },
+    {
+        id: 'storage',
+        label: '仓储',
+        icon: 'https://ta.zycpzs.cn/oss-file/smart-trace/szyy/images-plt/plant/bottomWarehouse.png',
+        activeIcon: 'https://ta.zycpzs.cn/oss-file/smart-trace/szyy/images-plt/plant/bottomWarehouseActive.png',
+        url: '/pages/plant/storage/index',
+    },
+    {
+        id: 'more',
+        label: '更多',
+        icon: 'https://ta.zycpzs.cn/oss-file/smart-trace/szyy/images-plt/plant/bottomMore.png',
+        activeIcon: 'https://ta.zycpzs.cn/oss-file/smart-trace/szyy/images-plt/plant/bottomMoreActive.png',
+        url: '/pages/plant/more/index',
+    },
+];
+
+function navigate(item: { id: string; url: string }) {
+    // certain tabs should clear showStorage flag
+    if (item.id === 'base' || item.id === 'planting') {
+        showStorage.value = false;
+    }
+    uni.$u.route({ type: 'switchTab', url: item.url });
+}
 </script>

+ 1 - 1
src/pages/login/login.vue

@@ -262,7 +262,7 @@ const homeBack = () => {
         uni.navigateBack();
     } else {
         const redirectUrl = redirect.value || '/pages/list/index';
-        const switchTabs = ['/pages/plant/base/index', '/pages/plant/port/index'];
+        const switchTabs = ['/pages/plant/base/index', '/pages/plant/port/index', '/pages/plant/processing/index', '/pages/plant/more/index'];
         if (switchTabs.includes(redirectUrl)) {
             uni.$u.route({
                 type: 'switchTab',

+ 5 - 4
src/pages/plant/base/index.vue

@@ -1,5 +1,5 @@
 <template>
-    <z-paging ref="paging" v-model="list" bgColor="#f7f7f7" @query="query" @scroll="onPageScroll" safe-area-inset-bottom>
+    <z-paging ref="paging" v-model="list" bgColor="#f7f7f7" @query="query" @scroll="onPageScroll">
         <template #top>
             <up-navbar :fixed="true" :bgColor="navBarBgColor">
                 <template #left>
@@ -159,10 +159,11 @@
                 </view>
             </view>
         </template>
-        <view class="h-210" v-if="list?.length"></view>
-        <view v-if="list?.length" :style="{ height: `${safeAreaBottom}px` }"></view>
+        <template #bottom>
+            <ut-tabar activeTab="base"></ut-tabar>
+        </template>
     </z-paging>
-    <ut-tabar activeTab="base"></ut-tabar>
+
     <ut-confirm-dialog v-model:show="showDeleteDialog" width="80vw" title="请选择要添加到基地类型" :confirmText="'确认选择'" :cancelText="'取消'" @confirm="handlechoseConfirm" @cancel="handleDeleteCancel">
         <view class="" v-for="item in pt_base_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)">

+ 30 - 12
src/pages/plant/more/index.vue

@@ -1,22 +1,40 @@
 <template>
-    <z-paging ref="paging" bgColor="#fff">
+    <z-paging ref="paging" bgColor="#f7f7f7">
         <template #top>
             <ut-navbar title="更多" :fixed="false" :isLeftBack="false" :breadcrumb="false"></ut-navbar>
         </template>
-        <view class="base-content pd-20">
-            <up-grid :border="false" :column="3" gap="10rpx">
-                <up-grid-item>
-                    <view class="pd2-10-0 d-flex flex-cln a-c j-c" @click="$u.route({ url: '/plant/contact-unit/unit-list/index' })">
-                        <view class="w-109 h-109 bg-#fff radius-50% d-flex a-c j-c mb-10">
-                            <image class="w-72 h-72" src="https://ta.zycpzs.cn/oss-file/smart-trace/szyy/images-plt/plant/storage/nav_kfgl_icon.png" mode="widthFix" />
-                        </view>
-                        <view class="c-#333 f-s-28 text-center">往来单位管理</view>
+        <view class="base-content pd-24">
+            <view class="radius-16 bg-#fff pd-24 mb-16">
+                <view class="mb-30 f-s-30 c-#333 f-w-500">码管理</view>
+                <view class="d-flex flex-w gap-30 j-sb">
+                    <view class="d-flex flex-cln j-c a-c pd-10" hover-class="bg-#f7f7f7">
+                        <image class="w-54 h-54 mb-16" src="https://ta.zycpzs.cn/oss-file/smart-trace/szyy/images-plt/plant/more/mag_code_icon.png" mode="widthFix" />
+                        <view class="f-s-26 c-#666">码生成及下载</view>
                     </view>
-                </up-grid-item>
-            </up-grid>
+                    <view class="d-flex flex-cln j-c a-c pd-10" hover-class="bg-#f7f7f7">
+                        <image class="w-54 h-54 mb-16" src="https://ta.zycpzs.cn/oss-file/smart-trace/szyy/images-plt/plant/more/mag_trace_icon.png" mode="widthFix" />
+                        <view class="f-s-26 c-#666">追溯码查询</view>
+                    </view>
+                    <view class="d-flex flex-cln j-c a-c pd-10" hover-class="bg-#f7f7f7">
+                        <image class="w-54 h-54 mb-16" src="https://ta.zycpzs.cn/oss-file/smart-trace/szyy/images-plt/plant/more/mag_relate_icon.png" mode="widthFix" />
+                        <view class="f-s-26 c-#666">关联关系管理</view>
+                    </view>
+                </view>
+            </view>
+            <view class="radius-16 bg-#fff pd-24 mb-16">
+                <view class="mb-30 f-s-30 c-#333 f-w-500">往来单位管理</view>
+                <view class="d-flex flex-w gap-30">
+                    <view class="d-flex flex-cln j-c a-c pd-10" hover-class="bg-#f7f7f7" @click="$u.route({ url: '/plant/contact-unit/unit-list/index' })">
+                        <image class="w-54 h-54 mb-16" src="https://ta.zycpzs.cn/oss-file/smart-trace/szyy/images-plt/plant/more/mag_unit_icon.png" mode="widthFix" />
+                        <view class="f-s-26 c-#666">往来单位管理</view>
+                    </view>
+                </view>
+            </view>
         </view>
+        <template #bottom>
+            <ut-tabar activeTab="more"></ut-tabar>
+        </template>
     </z-paging>
-    <ut-tabar activeTab="more"></ut-tabar>
 </template>
 <script setup lang="ts"></script>
 <style lang="scss" scoped></style>

+ 4 - 0
src/pages/plant/port/index.vue

@@ -1,5 +1,9 @@
 <template>
+<<<<<<< HEAD
     <z-paging ref="paging" v-model="list" bgColor="#f7f7f7" @query="query" safe-area-inset-bottom hide-no-more-inside>
+=======
+    <z-paging ref="paging" v-model="list" bgColor="#f7f7f7" @query="query">
+>>>>>>> 84bf63a02fd3b1ba91f839dc1cba1e254e5d4b6c
         <template #top>
             <ut-navbar title="种养殖任务" :fixed="false">
                 <template #left><view class=""></view></template>

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

@@ -1,5 +1,5 @@
 <template>
-    <z-paging ref="paging" v-model="list" bgColor="#f7f7f7" @query="query" safe-area-inset-bottom hide-no-more-inside>
+    <z-paging ref="paging" v-model="list" bgColor="#f7f7f7" @query="query" hide-no-more-inside>
         <template #top>
             <up-navbar title="加工及包装赋码任务" :fixed="false"> </up-navbar>
         </template>

+ 3 - 1
src/pages/plant/storage/index.vue

@@ -56,8 +56,10 @@
                 <up-icon name="arrow-right"></up-icon>
             </view>
         </view>
+        <template #bottom>
+            <ut-tabar activeTab="storage"></ut-tabar>
+        </template>
     </z-paging>
-    <ut-tabar activeTab="storage"></ut-tabar>
 </template>
 <script setup lang="ts"></script>
 <style lang="scss" scoped></style>

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

@@ -172,7 +172,7 @@ import SelectWarehouseInput from '@/models/select-warehouse-input/select-warehou
 import SelectMedicinalPart from '@/models/select-medicinal-part/select-medicinal-part.vue';
 import { parseTime } from '@/utils/ruoyi';
 const { proxy } = getCurrentInstance() as ComponentInternalInstance;
-const { pt_fresh_instore_type, pt_warehouse_type, pt_medicine_source,pt_medicine_unit, yes_no, pt_medicine_source_tag  } = toRefs<any>(proxy?.useDict('pt_fresh_instore_type', 'pt_warehouse_type', 'pt_medicine_source','pt_medicine_unit', 'yes_no', 'pt_medicine_source_tag'));
+const { pt_fresh_instore_type, pt_warehouse_type, pt_medicine_source, yes_no, pt_medicine_source_tag } = toRefs<any>(proxy?.useDict('pt_fresh_instore_type', 'pt_warehouse_type', 'pt_medicine_source', 'yes_no', 'pt_medicine_source_tag'));
 const paging = ref<any>(null);
 const upFormRef = ref<any>(null);
 // 单条鲜货信息 + 入库信息的合并表单

+ 11 - 2
src/plant/storage/fresh-goods/list/index.vue

@@ -25,7 +25,7 @@
         </view>
         <view class="pd-24 bg-#f7f7f7">
             <up-swipe-action>
-                <up-swipe-action-item v-for="(item, index) in list" :key="index" :name="item?.id" :options="optionsActionTemp" @click="clickTempSwipe" class="mb-20 b-radius">
+                <up-swipe-action-item v-for="(item, index) in list" :key="index" :name="item?.id" :options="optionsActionTemp" @click="clickTempSwipe($event, item)" class="mb-20 b-radius">
                     <view class="b-radius bg-#fff pd-20 p-rtv" @click.stop="$u.route({ url: '/plant/storage/fresh-goods/detail/index', params: { id: item.id } })">
                         <view class="d-flex j-sb a-c li-item-head mb-16">
                             <view class="li-left-tag" :class="{ [`bg-instore-${item?.instoreType}`]: true }">{{ item?.level || '' }}{{ selectDictLabel(pt_fresh_instore_type, item?.instoreType) }}</view>
@@ -137,9 +137,18 @@ const optionsActionTemp = reactive([
     },
 ]);
 // 暂存项删除点击(本地移除)
-const clickTempSwipe = async (event: object) => {
+const clickTempSwipe = async (event: object, item: any) => {
     const { name, index } = event as any;
     if (index === 0) {
+           if (item.instoreType == '3') {
+            return uni.showModal({
+                title: '提示',
+                content: '该批次为采收入库的种源,请前往种养殖-采收管理里删除采收记录,入库记录将同步删除。',
+                showCancel: false,
+                confirmText: '知道了',
+                confirmColor: '#41c06d',
+            });
+        }
         try {
             const res = await uni.showModal({
                 title: '删除提示',

+ 1 - 2
src/plant/storage/seed-source/list/index.vue

@@ -153,14 +153,13 @@ const optionsActionTemp = reactive([
 ]);
 // 暂存项删除点击(本地移除)
 const clickTempSwipe = async (event: object, item: any) => {
-    console.log(item);
     const { name, index } = event as any;
   
     if (index === 0) {
         if (item.instoreType == '3') {
             return uni.showModal({
                 title: '提示',
-                content: '该批次为采收入库的种源,请前往种养殖-采收管理里删除采收记录,入库记录将同步删除。',
+                content: '该批次为采收入库的鲜货,请前往种养殖-采收管理里删除采收记录,入库记录将同步删除。',
                 showCancel: false,
                 confirmText: '知道了',
                 confirmColor: '#41c06d',

BIN
src/static/images/plant/bottomWarehouse.png


BIN
src/static/images/plant/bottomWarehouseActive.png


BIN
src/static/images/plant/more/mag_code_icon.png


BIN
src/static/images/plant/more/mag_relate_icon.png


BIN
src/static/images/plant/more/mag_trace_icon.png


BIN
src/static/images/plant/more/mag_unit_icon.png