Преглед изворни кода

Merge branch 'master' of http://git.yujin.shuziyunyao.com/yujin/forestry-wx

lisy пре 1 недеља
родитељ
комит
00ce8984fb

+ 24 - 0
src/assets/styles/audit/plant/theme.scss

@@ -0,0 +1,24 @@
+$colors: (
+    // 主题色
+    primary: #306EFE,
+    res-0: #f6881c,
+    res-1: #2F9E4A,
+    res-2: #FD2D39,
+);
+@each $color, $value in $colors {
+    .c-#{$color} {
+        color: $value;
+    }
+}
+@each $color, $value in $colors {
+    .bg-#{$color} {
+        background-color: $value;
+    }
+}
+
+$u-primary: #306EFE;
+$u-primary-dark: #306EFE;
+$up-primary: #306EFE;
+
+/* 行为相关颜色 */
+$uni-color-primary: #306EFE;

+ 2 - 0
src/assets/styles/public.scss

@@ -108,6 +108,8 @@ $colors: (
     // 会员绿
     member-green: #41c06d,
     res-0: #f6881c,
+    res-1: #2F9E4A,
+    res-2: #FD2D39,
 );
 @each $color, $value in $colors {
     .c-#{$color} {

+ 18 - 0
src/audit/plant/base/audit-detail/index.vue

@@ -0,0 +1,18 @@
+<template>
+    <template v-if="viewType == 'gapbase'">
+        <GapDetail :id="did"></GapDetail>
+    </template>
+    <template v-else-if="viewType == 'swyqbase'">
+        <SwyqDetail :id="did"></SwyqDetail>
+    </template>
+</template>
+<script setup lang="ts">
+import GapDetail from './models/gap-detail.vue';
+import SwyqDetail from './models/swyq-detail.vue';
+const viewType = ref('');
+const did = ref('');
+onLoad((options: any) => {
+    viewType.value = options.viewType || '';
+    did.value = options.id || '';
+});
+</script>

+ 237 - 0
src/audit/plant/base/audit-detail/models/gap-detail.vue

@@ -0,0 +1,237 @@
+<template>
+    <view class="ksqulc">
+        <z-paging ref="paging" bgColor="#F7F7F7" safe-area-inset-bottom paging-class="paging-btm-shadow" refresher-only @onRefresh="onRefresh" scroll-with-animation>
+            <template #top>
+                <ut-navbar title="获评信息详情" :fixed="false" border></ut-navbar>
+            </template>
+            <view v-if="form?.res == '2'" class="pd-24 c-#FC333F f-s-24 bg-#F8E7E8">审核不通过理由:{{form?.msg}}</view>
+            <view class="p-rtv">
+                <!-- 基本信息 -->
+                <image v-if="form?.res !== '0'" class="gap_res_image w-160 h-160" :src="`/static/images/common/base_res_logo${form.res}.png`" mode="widthFix" />
+                <view class="pd-24 bg-#fff mb-10">
+                    <view class="f-s-30 pd2-16-0 info-border-bottom">
+                        <span class="c-#666">获评类型:</span>
+                        <span class="c-#333">GAP</span>
+                    </view>
+                    <view class="f-s-30 pd2-16-0 info-border-bottom">
+                        <span class="c-#666">获评品种:</span>
+                        <span class="c-#333">{{ form?.medicineName || '-' }}</span>
+                    </view>
+                    <view class="f-s-30 pd2-16-0 info-border-bottom">
+                        <span class="c-#666">获评日期:</span>
+                        <span class="c-#333">{{ form?.ratedDate || '-' }}</span>
+                    </view>
+                    <view v-if="form?.certFile" class="f-s-30 pd2-16-0 info-border-bottom">
+                        <view class="f-s-30 c-#666 mb-10">官方公示证明材料</view>
+                        <ut-album :urls="form?.certFile"></ut-album>
+                    </view>
+                    <view v-if="form?.url" class="f-s-30 pd2-16-0 info-border-bottom">
+                        <span class="c-#666">官方公示网址:</span>
+                        <span class="c-#333">{{ form?.url || '-' }}</span>
+                    </view>
+                    <view class="f-s-30 pd2-16-0 info-border-bottom">
+                        <span class="c-#666">基地名称:</span>
+                        <span class="c-#333">{{ form?.gapBaseName || '-' }}</span>
+                    </view>
+                    <view class="f-s-30 pd2-16-0 info-border-bottom">
+                        <span class="c-#666">基地类型:</span>
+                        <span class="c-#333">{{ selectDictLabel(pt_base_type, form?.gapBaseType) || '-' }}</span>
+                    </view>
+
+                    <view class="f-s-30 pd2-16-0 info-border-bottom">
+                        <span class="c-#666">基地所在地区:</span>
+                        <span class="c-#333">{{ form?.adcodeName || '-' }}</span>
+                    </view>
+                    <view class="f-s-30 pd2-16-0 info-border-bottom">
+                        <span class="c-#666">详细地址:</span>
+                        <span class="c-#333">{{ form?.address || '-' }}</span>
+                    </view>
+                    <view class="f-s-30 pd2-16-0 info-border-bottom">
+                        <view class="f-s-30 c-#666 mb-10">基地范围:</view>
+                        <view class="bg-#f7f7f7 d-flex ov-hd p-rtv">
+                            <image class="w-full" v-if="form?.basePic" :src="form?.basePic" mode="widthFix" @click="previewBasePic"></image>
+                            <view v-else class="w-full h-120 d-flex a-c j-c c-999">暂无基地范围</view>
+                        </view>
+                    </view>
+                    <view class="f-s-30 pd2-16-0 info-border-bottom">
+                        <span class="c-#666">基地面积:</span>
+                        <span class="c-#333">{{ form?.area || '-' }}{{ form?.areaUnit || '亩' }}</span>
+                    </view>
+                    <view class="f-s-30 pd2-16-0 info-border-bottom">
+                        <span class="c-#666">基地经纬度:</span>
+                        <span class="c-#333">E{{ form?.lng || '-' }}, N{{ form?.lat || '-' }}</span>
+                    </view>
+                </view>
+            </view>
+            <template v-if="form.res == '0'" #bottom>
+                <view class="pd-20 d-flex">
+                    <up-button @click="passAudit" class="mr-30" type="primary">审核通过</up-button>
+                    <up-button @click="showNoPass = true" type="error">审核不通过</up-button>
+                </view>
+            </template>
+        </z-paging>
+        <ut-confirm-dialog v-model:show="showNoPass" width="680rpx">
+            <view>
+                <up-form ref="upFormNoPassRef" :model="formNoPass" :rules="noPassRules" labelWidth="auto" class="p-rtv" labelPosition="top">
+                    <up-form-item label="不通过原因" prop="msg" required>
+                        <up-textarea v-model="formNoPass.msg" :maxlength="200" placeholder="请输入不通过原因" auto-height></up-textarea>
+                    </up-form-item>
+                </up-form>
+            </view>
+            <template #footer>
+                <view class="d-flex j-c pd-30">
+                    <up-button @click="showNoPass = false" class="mr-30">取消</up-button>
+                    <up-button @click="noPassAudit" type="error">确认不通过</up-button>
+                </view>
+            </template>
+        </ut-confirm-dialog>
+    </view>
+</template>
+<script setup lang="ts">
+import { useClientRequest } from '@/utils/request';
+import { getUrlParams, recursiveDecodeURIComponent } from '@/utils/ruoyi';
+const props = defineProps({
+    id: {
+        type: String,
+        default: '',
+    },
+});
+const { proxy } = getCurrentInstance() as ComponentInternalInstance;
+const { pt_base_type } = toRefs<any>(proxy?.useDict('pt_base_type'));
+const paging = ref<any>(null);
+const form = ref<any>({});
+const did = ref('');
+
+// 获取详情(GAP获评信息)
+const getDetailById = async () => {
+    if (!props.id) return;
+    const res = await useClientRequest.get(`/plt-api/app/gapCertificationInfo/getInfoByIdApproval/${props.id}`);
+    if (res && res.code === 200) {
+        form.value = res.data || {};
+    }
+};
+
+const onRefresh = () => {
+    getDetailById();
+    paging.value?.complete();
+};
+onMounted(() => {
+    getDetailById();
+});
+// 预览基地范围图片
+const previewBasePic = () => {
+    const url = form.value?.basePic;
+    if (!url) return;
+    uni.previewImage({ urls: [url], current: 0 });
+};
+const passAudit = async () => {
+    try {
+        const res = await uni.showModal({
+            title: '通过提示',
+            content: '确认通过该基地审核吗?',
+            confirmColor: '#37A954',
+            confirmText: '确认',
+        });
+        if (!res.confirm && !res.content) return;
+        await uni.showLoading({
+            title: '通过中...',
+            mask: true,
+        });
+        const resq = await useClientRequest.post(`/plt-api/app/gapCertificationInfo/approveGapBaseApproval`, {
+            targetId: props.id,
+            res: '1',
+        });
+        if (!resq || resq.code !== 200) return;
+        uni.hideLoading();
+        uni.showToast({
+            title: '操作成功',
+            icon: 'success',
+        });
+        paging.value?.reload();
+        uni.$emit('refreshGapBaseListAudit');
+        //返回上一页
+        uni.navigateBack({
+            delta: 1,
+        });
+    } catch (error) {
+        console.error('通过基地审核失败:', error);
+    }
+};
+const showNoPass = ref(false);
+const upFormNoPassRef = ref<any>(null);
+const noPassRules = {
+    msg: [
+        { required: true, message: '请输入不通过原因' },
+        { min: 2, max: 200, message: '不通过原因长度在2到200个字符之间' },
+    ],
+};
+const formNoPass = ref({
+    msg: '',
+});
+const noPassAudit = async () => {
+    try {
+        const valid = await upFormNoPassRef.value?.validate();
+        if (!valid) return;
+    } catch (error) {
+        return;
+    }
+    try {
+     
+        await uni.showLoading({
+            title: '提交中...',
+            mask: true,
+        });
+        const res = await useClientRequest.post(`/plt-api/app/gapCertificationInfo/approveGapBaseApproval`, {
+            targetId: props.id,
+            res: '2',
+            ...formNoPass.value,
+        });
+        if (!res || res !== 200) return;
+        uni.hideLoading();
+        uni.showToast({
+            title: '操作成功',
+            icon: 'success',
+        });
+        showNoPass.value = false;
+        paging.value?.reload();
+        uni.$emit('refreshGapBaseListAudit');
+        //返回上一页
+        uni.navigateBack({
+            delta: 1,
+        });
+    } catch (error) {
+        console.error('不通过基地审核失败:', error);
+    }
+};
+</script>
+<style lang="scss" scoped>
+.z-paging-wrap {
+    position: absolute;
+    right: 0;
+    top: 0;
+    bottom: 0;
+    left: 0;
+}
+
+.btn-aree-center {
+    position: absolute;
+    top: 0;
+    right: 0;
+    bottom: 0;
+    left: 0;
+}
+
+.plot-item {
+    border: 1rpx solid rgba($u-primary, 0.4);
+    border-radius: 10rpx;
+}
+.gap-info-card {
+    border: 1rpx solid rgba($u-primary, 0.4);
+}
+
+.gap_res_image {
+    position: absolute;
+    right: 30rpx;
+    top: 30rpx;
+}
+</style>

+ 236 - 0
src/audit/plant/base/audit-detail/models/swyq-detail.vue

@@ -0,0 +1,236 @@
+<template>
+    <view class="ksqulc">
+        <z-paging ref="paging" bgColor="#F7F7F7" safe-area-inset-bottom paging-class="paging-btm-shadow" refresher-only @onRefresh="onRefresh" scroll-with-animation>
+            <template #top>
+                <ut-navbar title="获评信息详情" :fixed="false" border></ut-navbar>
+            </template>
+            <view v-if="form?.swyqRes == '2'" class="pd-24 c-#FC333F f-s-24 bg-#F8E7E8">审核不通过理由:{{form?.msg}}</view>
+            <view class="p-rtv">
+                <!-- 基本信息 -->
+                <image v-if="form?.res !== '0'" class="gap_res_image w-160 h-160" :src="`/static/images/common/base_res_logo${form.swyqRes}.png`" mode="widthFix" />
+                <view class="pd-24 bg-#fff mb-10">
+                    <view class="f-s-30 pd2-16-0 info-border-bottom">
+                        <span class="c-#666">获评类型:</span>
+                        <span class="c-#333">三无一全</span>
+                    </view>
+                    <view class="f-s-30 pd2-16-0 info-border-bottom">
+                        <span class="c-#666">获评品种:</span>
+                        <span class="c-#333">{{ form?.swyqVarietyName || '-' }}</span>
+                    </view>
+                    <view class="f-s-30 pd2-16-0 info-border-bottom">
+                        <span class="c-#666">获评日期:</span>
+                        <span class="c-#333">{{ form?.swyqRatedDate || '-' }}</span>
+                    </view>
+                    <view v-if="form?.swyqCertFile" class="f-s-30 pd2-16-0 info-border-bottom">
+                        <view class="f-s-30 c-#666 mb-10">官方公示证明材料</view>
+                        <ut-album :urls="form?.swyqCertFile"></ut-album>
+                    </view>
+                    <view v-if="form?.swyqUrl" class="f-s-30 pd2-16-0 info-border-bottom">
+                        <span class="c-#666">官方公示网址:</span>
+                        <span class="c-#333">{{ form?.swyqUrl || '-' }}</span>
+                    </view>
+                    <view class="f-s-30 pd2-16-0 info-border-bottom">
+                        <span class="c-#666">基地名称:</span>
+                        <span class="c-#333">{{ form?.baseName || '-' }}</span>
+                    </view>
+                    <view class="f-s-30 pd2-16-0 info-border-bottom">
+                        <span class="c-#666">基地类型:</span>
+                        <span class="c-#333">{{ selectDictLabel(pt_base_type, form?.baseType) || '-' }}</span>
+                    </view>
+
+                    <view class="f-s-30 pd2-16-0 info-border-bottom">
+                        <span class="c-#666">基地所在地区:</span>
+                        <span class="c-#333">{{ form?.gapInfo?.adcodeName || '-' }}</span>
+                    </view>
+                    <view class="f-s-30 pd2-16-0 info-border-bottom">
+                        <span class="c-#666">详细地址:</span>
+                        <span class="c-#333">{{ form?.gapInfo?.address || '-' }}</span>
+                    </view>
+                    <view class="f-s-30 pd2-16-0 info-border-bottom">
+                        <view class="f-s-30 c-#666 mb-10">基地范围:</view>
+                        <view class="bg-#f7f7f7 d-flex ov-hd p-rtv">
+                            <image class="w-full" v-if="form?.gapInfo?.basePic" :src="form?.gapInfo?.basePic" mode="widthFix" @click="previewBasePic"></image>
+                            <view v-else class="w-full h-120 d-flex a-c j-c c-999">暂无基地范围</view>
+                        </view>
+                    </view>
+                    <view class="f-s-30 pd2-16-0 info-border-bottom">
+                        <span class="c-#666">基地面积:</span>
+                        <span class="c-#333">{{ form?.gapInfo?.area || '-' }}{{ form?.gapInfo?.areaUnit || '亩' }}</span>
+                    </view>
+                    <view class="f-s-30 pd2-16-0 info-border-bottom">
+                        <span class="c-#666">基地经纬度:</span>
+                        <span class="c-#333">E{{ form?.gapInfo?.lng || '-' }}, N{{ form?.gapInfo?.lat || '-' }}</span>
+                    </view>
+                </view>
+            </view>
+            <template v-if="form.swyqRes == '0'" #bottom>
+                <view class="pd-20 d-flex">
+                    <up-button @click="passAudit" class="mr-30" type="primary">审核通过</up-button>
+                    <up-button @click="showNoPass = true" type="error">审核不通过</up-button>
+                </view>
+            </template>
+        </z-paging>
+        <ut-confirm-dialog v-model:show="showNoPass" width="680rpx">
+            <view>
+                <up-form ref="upFormNoPassRef" :model="formNoPass" :rules="noPassRules" labelWidth="auto" class="p-rtv" labelPosition="top">
+                    <up-form-item label="不通过原因" prop="msg" required>
+                        <up-textarea v-model="formNoPass.msg" :maxlength="200" placeholder="请输入不通过原因" auto-height></up-textarea>
+                    </up-form-item>
+                </up-form>
+            </view>
+            <template #footer>
+                <view class="d-flex j-c pd-30">
+                    <up-button @click="showNoPass = false" class="mr-30">取消</up-button>
+                    <up-button @click="noPassAudit" type="error">确认不通过</up-button>
+                </view>
+            </template>
+        </ut-confirm-dialog>
+    </view>
+</template>
+<script setup lang="ts">
+import { useClientRequest } from '@/utils/request';
+import { getUrlParams, recursiveDecodeURIComponent } from '@/utils/ruoyi';
+const props = defineProps({
+    id: {
+        type: String,
+        default: '',
+    },
+});
+const { proxy } = getCurrentInstance() as ComponentInternalInstance;
+const { pt_base_type } = toRefs<any>(proxy?.useDict('pt_base_type'));
+const paging = ref<any>(null);
+const form = ref<any>({});
+const did = ref('');
+
+// 获取详情(GAP获评信息)
+const getDetailById = async () => {
+    if (!props.id) return;
+    const res = await useClientRequest.get(`/plt-api/app/base/getInfoById/${props.id}`);
+    if (res && res.code === 200) {
+        form.value = res.data || {};
+    }
+};
+
+const onRefresh = () => {
+    getDetailById();
+    paging.value?.complete();
+};
+onMounted(() => {
+    getDetailById();
+});
+// 预览基地范围图片
+const previewBasePic = () => {
+    const url = form.value?.gapInfo.basePic;
+    if (!url) return;
+    uni.previewImage({ urls: [url], current: 0 });
+};
+const passAudit = async () => {
+    try {
+        const res = await uni.showModal({
+            title: '通过提示',
+            content: '确认通过该基地审核吗?',
+            confirmColor: '#37A954',
+            confirmText: '确认',
+        });
+        if (!res.confirm && !res.content) return;
+        await uni.showLoading({
+            title: '通过中...',
+            mask: true,
+        });
+         const resq: any = await useClientRequest.post(`/plt-api/app/base/approvalSwyq`, {
+            targetId: props.id,
+            res: '1',
+        });
+        if (!resq || resq.code !== 200) return;
+        uni.hideLoading();
+        uni.showToast({
+            title: '操作成功',
+            icon: 'success',
+        });
+        paging.value?.reload();
+        uni.$emit('refreshSwyqListAudit');
+        //返回上一页
+        uni.navigateBack({
+            delta: 1,
+        });
+    } catch (error) {
+        console.error('通过基地审核失败:', error);
+    }
+};
+const showNoPass = ref(false);
+const upFormNoPassRef = ref<any>(null);
+const noPassRules = {
+    msg: [
+        { required: true, message: '请输入不通过原因' },
+        { min: 2, max: 200, message: '不通过原因长度在2到200个字符之间' },
+    ],
+};
+const formNoPass = ref({
+    msg: '',
+});
+const noPassAudit = async () => {
+    try {
+        const valid = await upFormNoPassRef.value?.validate();
+        if (!valid) return;
+    } catch (error) {
+        return;
+    }
+    try {
+     
+        await uni.showLoading({
+            title: '提交中...',
+            mask: true,
+        });
+        await useClientRequest.post(`/plt-api/app/base/approvalSwyq`, {
+            targetId: props.id,
+            res: '2',
+            ...formNoPass.value,
+        });
+        uni.hideLoading();
+        uni.showToast({
+            title: '操作成功',
+            icon: 'success',
+        });
+        showNoPass.value = false;
+        paging.value?.reload();
+        uni.$emit('refreshSwyqBaseListAudit');
+        //返回上一页
+        uni.navigateBack({
+            delta: 1,
+        });
+    } catch (error) {
+        console.error('不通过基地审核失败:', error);
+    }
+};
+</script>
+<style lang="scss" scoped>
+.z-paging-wrap {
+    position: absolute;
+    right: 0;
+    top: 0;
+    bottom: 0;
+    left: 0;
+}
+
+.btn-aree-center {
+    position: absolute;
+    top: 0;
+    right: 0;
+    bottom: 0;
+    left: 0;
+}
+
+.plot-item {
+    border: 1rpx solid rgba($u-primary, 0.4);
+    border-radius: 10rpx;
+}
+.gap-info-card {
+    border: 1rpx solid rgba($u-primary, 0.4);
+}
+
+.gap_res_image {
+    position: absolute;
+    right: 30rpx;
+    top: 30rpx;
+}
+</style>

+ 99 - 0
src/audit/plant/base/audit-list/index.vue

@@ -0,0 +1,99 @@
+<template>
+    <z-paging-swiper>
+        <!-- 需要固定在顶部不滚动的view放在slot="top"的view中 -->
+        <!-- 注意!此处的z-tabs为独立的组件,可替换为第三方的tabs,若需要使用z-tabs,请在插件市场搜索z-tabs并引入,否则会报插件找不到的错误 -->
+        <template #top>
+            <view class="ov-hd" style="position: fixed; top: 0; left: 0; right: 0; z-index: 999" id="topup-navbar">
+                <up-navbar :fixed="false" bg-color="transparent">
+                    <template #left>
+                        <view class="c-#333 f-s-36 f-w-500">GAP/三无一全获评信息审核应用</view>
+                    </template>
+                </up-navbar>
+                <image class="base_index_bg" src="@/static/images/audit/plant/base_index_bg.png" />
+            </view>
+        </template>
+        <image class="base_index_bg" src="@/static/images/audit/plant/base_index_bg.png" />
+        <view class="swiper-content d-flex flex-cln">
+            <template>
+                <up-navbar :fixed="false" bg-color="transparent">
+                    <template #left><span></span></template>
+                </up-navbar>
+                <view class="pd2-16-24">
+                    <view class="d-flex">
+                        <view class="pd-10 d-flex a-c p-rtv flex1 ov-hd">
+                            <span class="mr-10 f-s-32 c-#333 f-w-500">Hi,{{ name }}</span>
+                            <span class="f-s-24 c-#ccc">{{ setCipByNum(phone ?? null, 3, 4) }}</span>
+                        </view>
+                        <view>
+                            <image class="w-254 h-151" src="@/static/images/audit/plant/base_index_logo_right.png" mode="widthFix" />
+                        </view>
+                    </view>
+                    <ut-tabs :tabs="tabs" v-model="viewType"></ut-tabs>
+                </view>
+            </template>
+            <!-- swiper必须设置height:100%,因为swiper有默认的高度,只有设置高度100%才可以铺满页面  -->
+            <swiper class="flex1 ov-hd" :current="viewType" @transition="swiperTransition" @animationfinish="swiperAnimationfinish">
+                <swiper-item class="swiper-item">
+                    <!-- 这里的swiper-list-item为demo中为演示用定义的组件,列表及分页代码在swiper-list-item组件内 -->
+                    <!-- 请注意,swiper-list-item非z-paging内置组件,在自己的项目中必须自己创建,若未创建则会报组件不存在的错误 -->
+                    <GapBase :current="viewType" :tabIndex="0"></GapBase>
+                </swiper-item>
+                <swiper-item class="swiper-item">
+                    <!-- 这里的swiper-list-item为demo中为演示用定义的组件,列表及分页代码在swiper-list-item组件内 -->
+                    <!-- 请注意,swiper-list-item非z-paging内置组件,在自己的项目中必须自己创建,若未创建则会报组件不存在的错误 -->
+                    <SwyqBase :current="viewType" :tabIndex="1"></SwyqBase>
+                </swiper-item>
+            </swiper>
+        </view>
+    </z-paging-swiper>
+</template>
+<script setup lang="ts">
+import { setCipByNum } from '@/utils/public';
+import { useInfoStore } from '@/store';
+import GapBase from './models/gap-base.vue';
+import SwyqBase from './models/swyq-base.vue';
+
+const { proxy } = getCurrentInstance() as ComponentInternalInstance;
+const infoStore = useInfoStore();
+// 获取用户信息
+const name = computed(() => infoStore.userInfo?.name || '');
+const phone = computed(() => infoStore.userInfo?.phone || '');
+// 证书文件类型
+const tabs = ref([
+    { label: 'GAP信息', value: '0' },
+    { label: '三无一全信息', value: '1' },
+]);
+
+const viewType = ref('0');
+const swiperTransition = (e: any) => {};
+const swiperAnimationfinish = (e: any) => {
+    viewType.value = e.detail.current.toString();
+};
+onMounted(() => {});
+</script>
+<style lang="scss" scoped>
+@import '@/assets/styles/audit/plant/theme.scss';
+.temp_flag {
+    position: absolute;
+    right: 0;
+    top: 0;
+    background-color: #c5c6c6;
+    color: #fff;
+    font-size: 20rpx;
+    padding: 4rpx 16rpx;
+    border-radius: 0 16rpx 0 16rpx;
+}
+.base_index_bg {
+    position: absolute;
+    top: 0;
+    left: 0;
+    right: 0;
+    width: 750rpx;
+    height: 430rpx;
+    z-index: -1;
+}
+.swiper-content {
+    height: 100vh;
+    overflow: hidden;
+}
+</style>

+ 182 - 0
src/audit/plant/base/audit-list/models/gap-base.vue

@@ -0,0 +1,182 @@
+<template>
+    <view class="paging-swiper-content">
+        <!--  :enable-back-to-top="currentIndex===tabIndex" 在微信小程序上可以多加这一句,因为默认是允许点击返回顶部的,但是这个页面有多个scroll-view,会全部返回顶部,所以需要控制是当前index才允许点击返回顶部 -->
+        <!-- 如果当前页已经加载过数据或者当前切换到的tab是当前页,才展示当前页数据(懒加载) -->
+        <z-paging ref="paging" v-model="list" @query="query" :auto="false" safe-area-inset-bottom :fixed="false">
+            <!-- 如果希望其他view跟着页面滚动,可以放在z-paging标签内 -->
+            <view class="d-flex a-c pd2-10-24">
+                <view class="min-w-240 flex1">
+                    <ut-action-sheet v-model="form.res" :tabs="typeNums" @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(typeNums, form.res) || '全部' }}</view>
+                            <up-icon size="24rpx" color="#333" name="arrow-down-fill" class="ml-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="onRefresh" margin="0" :border="false" :placeholder="placeholder" bgColor="#fff" height="86rpx" borderRadius="10rpx"></ut-search>
+                </view>
+            </view>
+            <view class="pd2-10-24">
+                <template v-for="(item, index) in list" :key="index">
+                    <view class="b-radius bg-#fff pd4-46-20-20-36 p-rtv mb-20" @click.stop="$u.route({ url: '/audit/plant/base/audit-detail/index', params: { id: item.id, viewType: 'gapbase' } })">
+                        <view class="mb-10">
+                            <view class="c-#333 f-s-34 f-w-5 pb-5">{{ item?.gapBaseName }}</view>
+                            <view class="c-#999 f-s-24">{{ item?.ratedDate }}获评</view>
+                        </view>
+                        <view class="d-flex pb-5">
+                            <view class="w-50%">
+                                <text class="c-#666 f-s-28">获评品种:</text>
+                                <text class="c-#333 f-s-28 f-w-5">{{ item?.medicineName || '-' }}</text>
+                            </view>
+                            <view class="w-50%">
+                                <text class="c-#666 f-s-28">基地面积:</text>
+                                <text class="c-#333 f-s-28 f-w-5">{{ item?.area }}{{ item?.areaUnit || '亩' }}</text>
+                            </view>
+                        </view>
+                        <view class="pb-20">
+                            <text class="c-#666 f-s-28">基地地址:</text>
+                            <text class="c-#333 f-s-28 f-w-5">{{ item?.adcodeName }}{{ item?.address }}</text>
+                        </view>
+                        <view class="d-flex">
+                            <view class="flex1 ov-hd"></view>
+                            <view>
+                                <up-button
+                                    v-if="item?.res == '0'"
+                                    color="#306EFE"
+                                    :customStyle="{
+                                        fontSize: '30rpx',
+                                        height: '68rpx',
+                                        width: '180rpx',
+                                    }"
+                                    >去审核</up-button
+                                >
+                                <up-button
+                                    v-else
+                                    color="#F7F7F7"
+                                    :customStyle="{
+                                        fontSize: '30rpx',
+                                        height: '68rpx',
+                                        width: '180rpx',
+                                        color: '#306EFE',
+                                    }"
+                                    >详情</up-button
+                                >
+                            </view>
+                        </view>
+                        <view class="status-tag" :class="{ [`bg-res-${item?.res}`]: true }">{{ selectDictLabel(tabs, item?.res) }}</view>
+                        <image class="gap_tag_item_logo" src="@/static/images/audit/plant/gap_tag_item_logo.png" mode="widthFix" />
+                    </view>
+                </template>
+            </view>
+        </z-paging>
+    </view>
+</template>
+<script setup lang="ts">
+import { useClientRequest } from '@/utils/request';
+const props = defineProps<{
+    current?: string | number;
+    tabIndex?: string | number;
+}>();
+const list = ref<any[]>([]);
+const paging = ref();
+const placeholder = ref('搜企业、基地名称、品种');
+const tabs = ref([
+    { label: '全部', value: '' },
+    { label: '审核通过', value: '1' },
+    { label: '审核不通过', value: '2' },
+    { label: '待审核', value: '0' },
+]);
+const form = ref({
+    keyword: '',
+    res: '0',
+});
+const query = async (pageNum: number, pageSize: number) => {
+    const params = {
+        pageNum,
+        pageSize,
+        ...form.value,
+    };
+    if (pageNum === 1) {
+        getBaseCount();
+    }
+    const res = await useClientRequest.get<any>('/plt-api/app/gapCertificationInfo/pageListApproval', params);
+    if (!res || res.code !== 200) return;
+    const { rows } = res;
+    paging.value.complete(rows);
+};
+const typeNums = ref<Array<{ label: string; value: string }>>([]);
+// 获取统计信息
+const getBaseCount = async () => {
+    try {
+        const res = await useClientRequest.get('/plt-api/app/gapCertificationInfo/gapApprovalCount', form.value);
+        if (res?.code === 200) {
+            console.log(res);
+            typeNums.value = res.data?.map((item: any) => {
+                return {
+                    label: `${item.name}(${item.num})`,
+                    value: item.type,
+                };
+            });
+        }
+    } catch (error) {
+        console.error('获取地块统计信息失败:', error);
+    }
+};
+const onRefresh = () => {
+    paging.value?.reload();
+};
+
+// 首次进入当前swiper时自动加载一次,之后仅手动刷新
+const loadedOnce = ref(false);
+const isActive = () => (props.current ?? '').toString() === (props.tabIndex ?? '0').toString();
+
+onMounted(() => {
+    if (!loadedOnce.value && isActive()) {
+        loadedOnce.value = true;
+        onRefresh();
+    }
+    uni.$on('refreshGapBaseListAudit', () => {
+        onRefresh();
+    });
+});
+
+watch(
+    () => props.current,
+    () => {
+        if (!loadedOnce.value && isActive()) {
+            loadedOnce.value = true;
+            onRefresh();
+        }
+    }
+);
+</script>
+<style lang="scss" scoped>
+@import '@/assets/styles/audit/plant/theme.scss';
+.paging-swiper-content {
+    height: 100%;
+}
+.status-tag {
+    position: absolute;
+    top: 0;
+    right: 0;
+    padding: 4rpx 24rpx;
+    font-size: 20rpx;
+    color: #fff;
+    border-radius: 0 16rpx 0 20rpx;
+}
+.search-select-item {
+    height: 86rpx;
+    background-color: #fff;
+    border-radius: 10rpx;
+    box-sizing: border-box;
+    padding: 12rpx;
+}
+.gap_tag_item_logo {
+    position: absolute;
+    width: 97rpx;
+    height: 94rpx;
+    left: 0;
+    top: 0;
+}
+</style>

+ 182 - 0
src/audit/plant/base/audit-list/models/swyq-base.vue

@@ -0,0 +1,182 @@
+<template>
+    <view class="paging-swiper-content">
+        <!--  :enable-back-to-top="currentIndex===tabIndex" 在微信小程序上可以多加这一句,因为默认是允许点击返回顶部的,但是这个页面有多个scroll-view,会全部返回顶部,所以需要控制是当前index才允许点击返回顶部 -->
+        <!-- 如果当前页已经加载过数据或者当前切换到的tab是当前页,才展示当前页数据(懒加载) -->
+        <z-paging ref="paging" v-model="list" @query="query" :auto="false" safe-area-inset-bottom :fixed="false">
+            <!-- 如果希望其他view跟着页面滚动,可以放在z-paging标签内 -->
+            <view class="d-flex a-c pd2-10-24">
+                <view class="min-w-240 flex1">
+                    <ut-action-sheet v-model="form.swyqRes" :tabs="typeNums" @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(typeNums, form.swyqRes) || '全部' }}</view>
+                            <up-icon size="24rpx" color="#333" name="arrow-down-fill" class="ml-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="onRefresh" margin="0" :border="false" :placeholder="placeholder" bgColor="#fff" height="86rpx" borderRadius="10rpx"></ut-search>
+                </view>
+            </view>
+            <view class="pd2-10-24">
+                <template v-for="(item, index) in list" :key="index">
+                    <view class="b-radius bg-#fff pd4-46-20-20-36 p-rtv mb-20" @click.stop="$u.route({ url: '/audit/plant/base/audit-detail/index', params: { id: item.id, viewType: 'swyqbase' } })">
+                        <view class="mb-10">
+                            <view class="c-#333 f-s-34 f-w-5 pb-5">{{ item?.baseName }}</view>
+                            <view class="c-#999 f-s-24">{{ item?.swyqRatedDate }}获评</view>
+                        </view>
+                        <view class="d-flex pb-5">
+                            <view class="w-50%">
+                                <text class="c-#666 f-s-28">获评品种:</text>
+                                <text class="c-#333 f-s-28 f-w-5">{{ item?.swyqVarietyName || '-' }}</text>
+                            </view>
+                            <view class="w-50%">
+                                <text class="c-#666 f-s-28">基地面积:</text>
+                                <text class="c-#333 f-s-28 f-w-5">{{ item?.gapInfo?.area }}{{ item?.gapInfo?.areaUnit || '亩' }}</text>
+                            </view>
+                        </view>
+                        <view class="pb-20">
+                            <text class="c-#666 f-s-28">基地地址:</text>
+                            <text class="c-#333 f-s-28 f-w-5">{{ item?.gapInfo?.adcodeName }}{{ item?.gapInfo?.address }}</text>
+                        </view>
+                        <view class="d-flex">
+                            <view class="flex1 ov-hd"></view>
+                            <view>
+                                <up-button
+                                    v-if="item?.res == '0'"
+                                    color="#306EFE"
+                                    :customStyle="{
+                                        fontSize: '30rpx',
+                                        height: '68rpx',
+                                        width: '180rpx',
+                                    }"
+                                    >去审核</up-button
+                                >
+                                <up-button
+                                    v-else
+                                    color="#F7F7F7"
+                                    :customStyle="{
+                                        fontSize: '30rpx',
+                                        height: '68rpx',
+                                        width: '180rpx',
+                                        color: '#306EFE',
+                                    }"
+                                    >详情</up-button
+                                >
+                            </view>
+                        </view>
+                        <view class="status-tag" :class="{ [`bg-res-${item?.swyqRes}`]: true }">{{ selectDictLabel(tabs, item?.swyqRes) }}</view>
+                        <image class="swyq_tag_item_logo" src="@/static/images/audit/plant/swyq_tag_item_logo.png" mode="widthFix" />
+                    </view>
+                </template>
+            </view>
+        </z-paging>
+    </view>
+</template>
+<script setup lang="ts">
+import { useClientRequest } from '@/utils/request';
+const props = defineProps<{
+    current?: string | number;
+    tabIndex?: string | number;
+}>();
+const list = ref<any[]>([]);
+const paging = ref();
+const placeholder = ref('搜企业、基地名称、品种');
+const tabs = ref([
+    { label: '全部', value: '' },
+    { label: '审核通过', value: '1' },
+    { label: '审核未通过', value: '2' },
+    { label: '待审核', value: '0' },
+]);
+const form = ref({
+    keyword: '',
+    swyqRes: '0',
+});
+const query = async (pageNum: number, pageSize: number) => {
+    const params = {
+        pageNum,
+        pageSize,
+        ...form.value,
+    };
+    if (pageNum === 1) {
+        getBaseCount();
+    }
+    const res = await useClientRequest.get<any>('/plt-api/app/base/querySwyqList', params);
+    if (!res || res.code !== 200) return;
+    const { rows } = res;
+    paging.value.complete(rows);
+};
+const typeNums = ref<Array<{ label: string; value: string }>>([]);
+// 获取统计信息
+const getBaseCount = async () => {
+    try {
+        const res = await useClientRequest.get('/plt-api/app/base/baseApprovalCount', form.value);
+        if (res?.code === 200) {
+            console.log(res);
+            typeNums.value = res.data?.map((item: any) => {
+                return {
+                    label: `${item.name}(${item.num})`,
+                    value: item.type,
+                };
+            });
+        }
+    } catch (error) {
+        console.error('获取地块统计信息失败:', error);
+    }
+};
+const onRefresh = () => {
+    paging.value.reload();
+};
+
+// 首次进入当前swiper时自动加载一次,之后仅手动刷新
+const loadedOnce = ref(false);
+const isActive = () => (props.current ?? '').toString() === (props.tabIndex ?? '1').toString();
+
+onMounted(() => {
+    if (!loadedOnce.value && isActive()) {
+        loadedOnce.value = true;
+        onRefresh();
+    }
+    uni.$on('refreshSwyqBaseListAudit', () => {
+        onRefresh();
+    });
+});
+
+watch(
+    () => props.current,
+    () => {
+        if (!loadedOnce.value && isActive()) {
+            loadedOnce.value = true;
+            onRefresh();
+        }
+    }
+);
+</script>
+<style lang="scss" scoped>
+@import '@/assets/styles/audit/plant/theme.scss';
+.paging-swiper-content {
+    height: 100%;
+}
+.status-tag {
+    position: absolute;
+    top: 0;
+    right: 0;
+    padding: 4rpx 24rpx;
+    font-size: 20rpx;
+    color: #fff;
+    border-radius: 0 16rpx 0 20rpx;
+}
+.search-select-item {
+    height: 86rpx;
+    background-color: #fff;
+    border-radius: 10rpx;
+    box-sizing: border-box;
+    padding: 12rpx;
+}
+.swyq_tag_item_logo {
+    position: absolute;
+    width: 97rpx;
+    height: 94rpx;
+    left: 0;
+    top: 0;
+}
+</style>

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

@@ -105,7 +105,6 @@ const scrollToTab = (idx: number) => {
 .ut-tabs-scroll {
     width: 100%;
     white-space: nowrap;
-    background: #fff;
 }
 
 .ut-tabs-row {

+ 18 - 0
src/pages.json

@@ -210,6 +210,24 @@
                     }
                 }
             ]
+        },
+        // 审核端分包
+        {
+            "root": "audit/plant",
+            "pages": [
+                {
+                    "path": "base/audit-list/index",
+                    "style": {
+                        "navigationBarTitleText": "基地审核列表"
+                    }
+                },
+                {
+                    "path": "base/audit-detail/index",
+                    "style": {
+                        "navigationBarTitleText": "基地审核详情"
+                    }
+                }
+            ]
         }
     ],
     "tabBar": {

+ 74 - 19
src/pages/plant/base/index.vue

@@ -58,7 +58,7 @@
                 <view class="b-radius pt-0 bg-#f7f7f7" style="border: 1rpx solid #fff; border-bottom-color: transparent; margin-top: -40rpx">
                     <up-sticky :offset-top="stickyTop" zIndex="10">
                         <view class="pd-24 p-rtv bg-#f7f7f7">
-                            <image src="/static/images/plant/basePlotBG.png" class="w-100%" mode="widthFix" style="position: absolute; top: 0; left: 0;"></image>
+                            <image src="/static/images/plant/basePlotBG.png" class="w-100%" mode="widthFix" style="position: absolute; top: 0; left: 0"></image>
                             <view class="d-flex a-c mb-26 p-rtv">
                                 <view class="p-rtv d-flex flex-cln">
                                     <view class="c-333 f-s-32 f-w-5 z-index-1">基地与地块管理</view>
@@ -69,10 +69,10 @@
                             </view>
                             <view class="d-flex a-c p-rtv">
                                 <view class="w-220">
-                                    <ut-action-sheet v-model="form.queryType" :tabs="[{ label: '全部', value: '' }]" @change="onRefresh" title="选择原料类型">
+                                    <ut-action-sheet v-model="form.queryType" :tabs="typeNums" @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">{{ '全部' }} </view>
-                                            <up-icon size="24rpx" color="#333" name="arrow-down-fill" class="mr-5"></up-icon>
+                                            <view class="flex1 ov-hd f-s-26 c-333 text-center f-w-5 w-s-no up-line-1">{{ selectDictLabel(typeNums, form?.queryType) || '全部' }} </view>
+                                            <up-icon size="24rpx" color="#333" name="arrow-down-fill" class="ml-5"></up-icon>
                                         </view>
                                     </ut-action-sheet>
                                 </view>
@@ -102,22 +102,46 @@
                                         </view>
                                         <view class="c-333 f-s-28 pd-5">
                                             <text class="c-#666">基地地址:</text>
-                                            <text class="f-w-5">{{ item?.gapInfo?.address || '-' }}</text>
+                                            <text class="f-w-5">{{ (item?.gapInfo?.adcodeName || '') + (item?.gapInfo?.address || '') || '-' }}</text>
                                         </view>
                                         <view v-if="item?.plantingVarieties?.length" class="c-333 f-s-28 pd-5 d-flex">
                                             <text class="c-#666 w-s-no">当前在地品种:</text>
                                             <text class="ov-hd tx-ov w-s-no f-w-5">{{ item.plantingVarieties?.map((items) => items.variety).join('、') || '-' }}</text>
                                             <text v-if="item?.plantingVarieties?.length" class="flex1 w-s-no f-w-5">等{{ item.plantingVarieties?.length }}个品种</text>
                                         </view>
-                                        <view class="pd-10"></view>
-                                        <view v-if="item.gapInfo?.basePic" class="p-rtv">
-                                            <image class="w-full h-310" :src="item.gapInfo?.basePic" mode="aspectFill"></image>
-                                            <view class="d-flex flex-cln a-ed" style="position: absolute; bottom: 20rpx; right: 0">
-                                                <view class="pd2-10-20 bg-black-op-0.5 c-#ccc f-s-20 mb-10" style="border-radius: 10rpx 0 0 10rpx; width: max-content">{{ item?.contactName }}负责</view>
-                                                <view class="pd2-10-20 bg-black-op-0.5 c-#ccc f-s-20 mb-10" style="border-radius: 10rpx 0 0 10rpx; width: max-content">公司+合作社</view>
-                                                <view class="pd2-10-20 bg-black-op-0.5 c-#ccc f-s-20" style="border-radius: 10rpx 0 0 10rpx; width: max-content">经度:E{{ item?.gapInfo?.lng }} 纬度:N{{ item?.gapInfo?.lat }}</view>
+                                        <template v-if="item.gapInfo?.basePic">
+                                            <view class="pd-10"></view>
+                                            <view class="p-rtv">
+                                                <image class="w-full h-310" :src="item.gapInfo?.basePic" mode="aspectFill"></image>
+                                                <view class="d-flex flex-cln a-ed" style="position: absolute; bottom: 20rpx; right: 0">
+                                                    <view class="pd2-10-20 bg-black-op-0.5 c-#ccc f-s-20 mb-10" style="border-radius: 10rpx 0 0 10rpx; width: max-content">{{ item?.contactName }}负责</view>
+                                                    <view class="pd2-10-20 bg-black-op-0.5 c-#ccc f-s-20 mb-10" style="border-radius: 10rpx 0 0 10rpx; width: max-content">{{ selectDictLabel(pt_org_type, item?.orgType) }}</view>
+                                                    <view class="pd2-10-20 bg-black-op-0.5 c-#ccc f-s-20" style="border-radius: 10rpx 0 0 10rpx; width: max-content">经度:E{{ item?.gapInfo?.lng }} 纬度:N{{ item?.gapInfo?.lat }}</view>
+                                                </view>
+                                                <view style="position: absolute; top: 20rpx; left: 0">
+                                                    <view class="base-status-gap-1" v-if="+item?.gapFlag">获评{{ item?.gapInfo?.medicineName }}GAP基地</view>
+                                                    <template v-if="item?.swyqRes">
+                                                        <view class="base-status-gap-1" v-if="item?.swyqRes == '1'">获评{{ item?.swyqVarietyName }}三无一全基地</view>
+                                                        <view class="base-status-gap-2" v-if="item?.swyqRes == '2'">标记{{ item?.swyqVarietyName }}三无一全基地未通过审核</view>
+                                                        <view class="base-status-gap-0" v-if="item?.swyqRes == '0'">标记{{ item?.swyqVarietyName }}三无一全基地待审核</view>
+                                                    </template>
+                                                </view>
                                             </view>
-                                        </view>
+                                        </template>
+                                        <template v-else>
+                                            <view v-if="item?.contactName" class="c-333 f-s-28 pd-5">
+                                                <text class="c-#666">负责人:</text>
+                                                <text class="f-w-5">{{ item?.contactName || '-' }}</text>
+                                            </view>
+                                            <view v-if="item?.orgType" class="c-333 f-s-28 pd-5">
+                                                <text class="c-#666">组织方式:</text>
+                                                <text class="f-w-5">{{ selectDictLabel(pt_org_type, item?.orgType) }}</text>
+                                            </view>
+                                            <view v-if="item?.orgType" class="c-333 f-s-28 pd-5">
+                                                <text class="c-#666">经纬度:</text>
+                                                <text class="f-w-5">E{{ item?.gapInfo?.lng }},N{{ item?.gapInfo?.lat }}</text>
+                                            </view>
+                                        </template>
                                         <view v-if="+(item?.tempFlag ?? 0)" class="temp_flag">暂存</view>
                                     </view>
                                 </up-swipe-action-item>
@@ -165,7 +189,7 @@ import { useClientRequest } from '@/utils/request';
 import { setCipByNum } from '@/utils/public';
 import { useInfoStore } from '@/store';
 const { proxy } = getCurrentInstance() as ComponentInternalInstance;
-const { pt_base_type } = toRefs<any>(proxy?.useDict('pt_base_type'));
+const { pt_base_type, pt_org_type } = toRefs<any>(proxy?.useDict('pt_base_type', 'pt_org_type'));
 const infoStore = useInfoStore();
 // 获取用户信息
 const avatar = computed(() => infoStore.userInfo?.avatar || '');
@@ -199,6 +223,7 @@ interface GapInfo {
     res: string;
     auditor: number;
     msg: string;
+    adcodeName?: string;
 }
 
 // 种植品种类型
@@ -244,6 +269,8 @@ interface BaseData {
     plantingVarieties: PlantingVariety[];
     coordinates: Coordinate[][]; // 二维坐标数组
     tempFlag?: number | string;
+    swyqRes?: string;
+    swyqVarietyName?: string;
 }
 const instance = getCurrentInstance();
 const list = ref<BaseData[]>();
@@ -350,13 +377,19 @@ const clickTempSwipe = async (event: object) => {
         }
     }
 };
+const typeNums = ref<any[]>([]);
 // 获取统计信息
 const getBaseCount = async () => {
     try {
         const res = await useClientRequest.get('/plt-api/app/base/getBaseCount');
         if (res?.code === 200) {
             console.log(res);
-            
+            typeNums.value = res.data?.map((item: any) => {
+                return {
+                    label: `${item.name}(${item.num})`,
+                    value: item.type,
+                };
+            });
         }
     } catch (error) {
         console.error('获取地块统计信息失败:', error);
@@ -368,6 +401,7 @@ onMounted(() => {
         .select('#topup-navbar')
         .boundingClientRect((data: any) => {
             console.log(data);
+
             stickyTop.value = data.top + data.height;
         })
         .exec();
@@ -387,10 +421,7 @@ onShow(() => {
     background-color: #fff;
     border-radius: 10rpx;
     box-sizing: border-box;
-    padding-left: 16rpx;
-    padding-right: 16rpx;
-    padding-top: 14rpx;
-    padding-bottom: 14rpx;
+    padding: 12rpx;
 }
 .temp_flag {
     position: absolute;
@@ -402,4 +433,28 @@ onShow(() => {
     padding: 4rpx 16rpx;
     border-radius: 0 16rpx 0 16rpx;
 }
+.base-status-gap-1 {
+    font-size: 24rpx;
+    color: #fff;
+    font-weight: 500;
+    background-image: linear-gradient(to right, #37a954, #a4d14e);
+    padding: 6rpx 24rpx 6rpx 16rpx;
+    border-radius: 0 20rpx 20rpx 0;
+}
+.base-status-gap-2 {
+    font-size: 24rpx;
+    color: #fff;
+    font-weight: 500;
+    background: rgba(#fc333f, 0.8);
+    padding: 6rpx 24rpx 6rpx 16rpx;
+    border-radius: 0 20rpx 20rpx 0;
+}
+.base-status-gap-0 {
+    font-size: 24rpx;
+    color: #fff;
+    font-weight: 500;
+    background: rgba(#ffad11, 0.8);
+    padding: 6rpx 24rpx 6rpx 16rpx;
+    border-radius: 0 20rpx 20rpx 0;
+}
 </style>

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

@@ -8,7 +8,7 @@
                 <!-- 基本信息 -->
                 <image class="gap_res_image w-160 h-160" :src="`/static/images/plant/base/gap_res${form.res}.png`" mode="widthFix" />
                 <view class="pd-24 bg-#fff mb-10">
-                    <view class="f-s-30 pd2-16-0 info-border-bottom">
+                    <view v-if="form?.gapBaseType" class="f-s-30 pd2-16-0 info-border-bottom">
                         <span class="c-#666">基地类型:</span>
                         <span class="c-#333">{{ selectDictLabel(pt_base_type, form?.gapBaseType) || '-' }}</span>
                     </view>
@@ -58,7 +58,8 @@
                 </view>
             </view>
             <template v-if="form.res == '2'" #bottom>
-                <view class="pd-20 d-flex">
+                <view class="pd-20 bg-#fff">
+                    <view v-if="form?.msg" class="mb-16 c-#FC333F f-s-24">审核不通过原因:{{ form?.msg || '-' }}</view>
                     <up-button @click="$u.route({ type: 'redirect', url: '/plant/base/gap-base-info-edit/index', params: { id: did } })" type="primary">修改</up-button>
                 </view>
             </template>

+ 27 - 50
src/plant/base/gap-base-info-edit/index.vue

@@ -2,7 +2,7 @@
     <z-paging class="" ref="paging" bgColor="#fff" paging-class="paging-btm-shadow" safe-area-inset-bottom
         scroll-with-animation>
         <template #top>
-            <ut-navbar title="添加GAP基地信息" :fixed="false" border></ut-navbar>
+            <ut-navbar :title="did ? '编辑GAP基地信息' : '添加GAP基地信息'" :fixed="false" border></ut-navbar>
         </template>
         <view class="pd-24">
             <up-form class="p-rtv" labelPosition="top" :model="form" :rules="rules" labelWidth="auto" ref="upFormRef">
@@ -75,13 +75,17 @@
                         </template>
                     </up-form-item>
                     <!-- 基地经纬度 -->
-                    <view class="h-1" id="lnglatpppp"></view>
-                    <up-form-item required label="基地经纬度" prop="lnglat">
-                        <view class="flex1 d-flex a-c">
-                            <up-input v-model="form.lng" border="bottom" placeholder="70-150内的经度数值"
-                                clearable></up-input>
+                      <view class="h-1" id="lngpppp"></view>
+                    <view class="h-1" id="latpppp"></view>
+                    <up-form-item required label="基地经纬度" class="form-item-wrap-column">
+                        <view class="d-flex" style="margin-top: -10px">
+                            <up-form-item prop="gapInfo.lng">
+                                <up-input v-model="form.lng" border="bottom" placeholder="70-150内的经度数值" clearable></up-input>
+                            </up-form-item>
                             <view class="pd-5"></view>
-                            <up-input v-model="form.lat" placeholder="4-53内的纬度数值" border="bottom" clearable></up-input>
+                            <up-form-item prop="gapInfo.lat">
+                                <up-input v-model="form.lat" placeholder="4-53内的纬度数值" border="bottom" clearable></up-input>
+                            </up-form-item>
                         </view>
                     </up-form-item>
                     <!-- 校验定位:建设时间 -->
@@ -163,53 +167,12 @@ const rules = reactive({
     basePic: [{ required: true, message: '请绘制基地范围' }],
     adcode: [{ required: true, message: '请选择基地具体地址' }],
     area: [{ required: true, message: '请输入基地面积' }],
-    lnglat: [
-        { required: true, message: '请输入基地经纬度' },
-        {
-            validator: (_rule: any, value: any) => {
-                const lng = parseFloat(form.value.lng);
-                const lat = parseFloat(form.value.lat);
-                if (isNaN(lng) || lng < 70 || lng > 150) {
-                    return Promise.reject('经度请输入70-150内的数值');
-                }
-                if (isNaN(lat) || lat < 4 || lat > 53) {
-                    return Promise.reject('纬度请输入4-53内的数值');
-                }
-                return Promise.resolve();
-            },
-            trigger: 'blur',
-        }
-    ],
     ratedDate: [{ required: true, message: '请选择获评GAP基地时间' }],
     certFile: [{ required: true, message: '请上传官方公示证明材料' }],
     url: [{ required: true, message: '请输入官方公示网址' }],
 
 });
-// saveInfo和submitForm防抖
-// 暂存基地信息
-const saveBaseInfo = async () => {
-    uni.$u.debounce(
-        async () => {
-            // 提交表单
-            uni.showLoading({
-                title: '保存中...',
-            });
-            try {
-                const res = await useClientRequest.post('/plt-api/app/base/temp', form.value);
-                uni.hideLoading();
-                if (!res || res !== 200) return;
-                uni.showToast({
-                    title: '保存成功',
-                    icon: 'success',
-                });
-            } catch (error) {
-                uni.hideLoading();
-            }
-        },
-        500,
-        true
-    );
-};
+
 const submitForm = async () => {
     uni.$u.debounce(
         async () => {
@@ -226,7 +189,7 @@ const submitForm = async () => {
                 title: '提交中...',
             });
             try {
-                const res = await useClientRequest.post('/plt-api/app/gapCertificationInfo/add', form.value);
+                const res = did.value ? await useClientRequest.post(`/plt-api/app/gapCertificationInfo/update`, form.value) : await useClientRequest.post('/plt-api/app/gapCertificationInfo/add', form.value);
                 uni.hideLoading();
                 if (!res || res !== 200) return;
                 uni.hideLoading();
@@ -302,8 +265,22 @@ const selectMedicine = () => {
 const confirmArea = (area: any) => {
     form.value.adcodeName = area.fullName;
 };
+const getDetailById = async (id: string) => {
+    if (!id) return;
+    const res = await useClientRequest.get(`/plt-api/app/gapCertificationInfo/getInfoById/${id}`);
+    if (res && res.code === 200) {
+        form.value = {
+            ...res.data,
+            lnglat: res.data.lng + ',' + res.data.lat,
+        };
+    }
+};
+const did = ref('');
 onLoad((optins: any) => {
     if (optins.id) {
+        // 编辑加载详
+        did.value = optins.id;
+        getDetailById(optins.id);
     } else {
         getLocationByAddress();
     }

+ 25 - 16
src/plant/base/gap-base-info/index.vue

@@ -4,7 +4,7 @@
             <ut-navbar title="GAP基地信息" :fixed="false" border></ut-navbar>
             <view class="d-flex a-c pd-25">
                 <view class="min-w-200 flex1">
-                    <ut-action-sheet v-model="form.res" :tabs="tabs" @change="onRefresh" title="选择基地类型">
+                    <ut-action-sheet v-model="form.res" :tabs="tabs" @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(tabs, form.res) || '全部' }}</view>
                             <up-icon size="24rpx" color="#333" name="arrow-down-fill" class="mr-5"></up-icon>
@@ -22,8 +22,10 @@
                     <up-swipe-action>
                         <up-swipe-action-item v-for="item in list" :name="item?.id" :key="item?.id" :disabled="item?.res !== '2'" :options="optionsAction" @click="clickSwipe" class="mb-20 b-radius">
                             <view @click.stop="clickItem(item)" class="b-radius bg-#fff pd-20 p-rtv">
-                                <view class="c-#333 f-s-34 f-w-5 pb-5">{{ item?.gapBaseName }}</view>
-                                <view class="c-#999 f-s-24 pb-20">{{ item?.ratedDate }}获评</view>
+                                <view class="mb-10">
+                                    <view class="c-#333 f-s-34 f-w-5 pb-5">{{ item?.gapBaseName }}</view>
+                                    <view class="c-#999 f-s-24">{{ item?.ratedDate }}获评</view>
+                                </view>
                                 <view class="d-flex pb-5">
                                     <view class="w-50%">
                                         <text class="c-#666 f-s-28">获评品种:</text>
@@ -38,13 +40,14 @@
                                     <text class="c-#666 f-s-28">基地地址:</text>
                                     <text class="c-#333 f-s-28 f-w-5">{{ item?.adcodeName }}{{ item?.address }}</text>
                                 </view>
-                                <view v-if="+item?.res == 2" class="pl-5 pr-5 pt-20 pb-20 border-top-#f7f7f7 c-#FC333F">
-                                    <text class="f-s-28">审核不通过原因:</text>
-                                    <text class="f-s-28">{{ item?.msg }}</text>
-                                </view>
-                                <image v-if="+item?.res == 2" class="w-145" src="/static/images/plant/resFailed.png" style="position: absolute; top: 0; right: 0" mode="widthFix" />
-                                <image v-if="+item?.res == 0" class="w-100" src="/static/images/plant/resPendingReview.png" style="position: absolute; top: 0; right: 0" mode="widthFix" />
-                                <image v-if="+item?.res == 1" class="w-90" src="/static/images/plant/resEffective.png" style="position: absolute; top: 0; right: 0" mode="widthFix" />
+                                <template v-if="+item?.res == 2">
+                                    <view class="h-1 bg-#F7F7F7"></view>
+                                    <view class="c-#FC333F pt-20">
+                                        <text class="f-s-28">审核不通过原因:</text>
+                                        <text class="f-s-28">{{ item?.msg }}</text>
+                                    </view>
+                                </template>
+                                <view class="status-tag" :class="{ [`bg-res-${item?.res}`]: true }">{{ selectDictLabel(tabs, item?.res) }}</view>
                             </view>
                         </up-swipe-action-item>
                     </up-swipe-action>
@@ -83,7 +86,7 @@ const placeholder = ref('搜基地名称、品种、基地地址');
 const tabs = ref([
     { label: '全部', value: '' },
     { label: '有效', value: '1' },
-    { label: '审核通过', value: '2' },
+    { label: '审核通过', value: '2' },
     { label: '待审核', value: '0' },
 ]);
 // 判断是否是云南的企业
@@ -128,7 +131,7 @@ const clickSwipe = async (event: object) => {
             content: '确定删除该GAP基地信息吗?',
         });
         console.log(res);
-        
+
         if (res.confirm) {
             const delRes = await useClientRequest.get(`/plt-api/app/gapCertificationInfo/delById/${name}`);
             if (delRes && delRes.code === 200) {
@@ -160,10 +163,16 @@ onMounted(() => {
     background-color: #fff;
     border-radius: 10rpx;
     box-sizing: border-box;
-    padding-left: 16rpx;
-    padding-right: 16rpx;
-    padding-top: 14rpx;
-    padding-bottom: 14rpx;
+    padding: 12rpx;
+}
+.status-tag {
+    position: absolute;
+    top: 0;
+    right: 0;
+    padding: 4rpx 24rpx;
+    font-size: 20rpx;
+    color: #fff;
+    border-radius: 0 16rpx 0 20rpx;
 }
 .u-page {
     padding: 0;

+ 1 - 1
src/plant/base/mark-swyq-base-detail/index.vue

@@ -66,7 +66,7 @@
             </view>
             <template v-if="form?.baseInfo?.swyqRes == '2'" #bottom>
                 <view class="pd-20">
-                    <view></view>
+                    <view v-if="form?.baseInfo?.msg" class="mb-16 c-#FC333F f-s-24">审核未通过原因:{{ form?.baseInfo?.msg || '-' }}</view>
                     <up-button type="primary" @click="$u.route({ type: 'redirect', url: '/plant/base/mark-swyq-base/index', params: { id: did } })">去修改</up-button>
                 </view>
             </template>

+ 5 - 6
src/plant/base/mark-swyq-base/index.vue

@@ -168,8 +168,6 @@ const submitForm = async () => {
             try {
                 await upFormRef.value?.validate();
             } catch (error: any) {
-                console.log(error);
-                
                 // 滚动到第一个错误字段
                 const firstErrorField = error && error[0].prop + 'pppp';
                 paging.value?.scrollIntoViewById(firstErrorField, 30, true);
@@ -180,12 +178,13 @@ const submitForm = async () => {
                 title: '提交中...',
             });
             try {
-                const res = await useClientRequest.post('/plt-api/app/base/addSwyqBase', {
+                const res = did.value ?  await useClientRequest.post('/plt-api/app/base/updateSwyqBase', {
                     ...formSwyq.value,
                     id: did.value,
+                }) : await useClientRequest.post('/plt-api/app/base/addSwyqBase', {
+                    ...formSwyq.value,
                 });
-                uni.hideLoading();
-                if (!res || res !== 200) return;
+                if (!res || res.code !== 200) return;
                 uni.hideLoading();
                 uni.showToast({
                     title: '提交成功',
@@ -203,7 +202,7 @@ const submitForm = async () => {
                     },
                 });
             } catch (error) {
-                uni.hideLoading();
+                
             }
         },
         500,

BIN
src/static/images/audit/plant/GAP三无一全获评信息审核应用.png


BIN
src/static/images/audit/plant/base_index_bg.png


BIN
src/static/images/audit/plant/base_index_logo_right.png


BIN
src/static/images/audit/plant/gap_tag_item_logo.png


BIN
src/static/images/audit/plant/swyq_tag_item_logo.png


BIN
src/static/images/audit/plant/中药材种植全链条追溯应用.png