Ver Fonte

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

lisy há 2 semanas atrás
pai
commit
415128796f

+ 4 - 1
src/plant/base/base-detail/index.vue

@@ -319,7 +319,7 @@
                             </view>
                         </up-button>
                     </template>
-                    <up-button @click="$u.route({ type: 'redirect', url: '/plant/base/base-edit/index', params: { id: did } })" type="primary">修改</up-button>
+                    <up-button @click="$u.route({ type: 'navigateTo', url: '/plant/base/base-edit/index', params: { id: did } })" type="primary">修改</up-button>
                 </view>
             </template>
         </z-paging>
@@ -366,6 +366,9 @@ const onRefresh = () => {
 onLoad((options: any) => {
     did.value = options?.id || getUrlParams(recursiveDecodeURIComponent(options?.q))?.id || '';
     getDetailById(did.value);
+    uni.$on('refreshBase', () => {
+        onRefresh();
+    });
 });
 </script>
 <style lang="scss" scoped>

+ 2 - 0
src/plant/base/base-edit/index.vue

@@ -646,6 +646,7 @@ const saveBaseInfo = async () => {
                     title: '保存成功',
                     icon: 'success',
                 });
+                uni.$emit('refreshBase');
                 uni.$emit('refreshBaseList');
                 // 返回上一页
                 setTimeout(() => {
@@ -687,6 +688,7 @@ const submitForm = async () => {
                     title: '提交成功',
                     icon: 'success',
                 });
+                uni.$emit('refreshBase');
                 uni.$emit('refreshBaseList');
                 // 返回上一页
                 setTimeout(() => {

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

@@ -8,7 +8,8 @@
                 <view ref="baseRef" class="pd-24" id="base12345">
                     <view class="startline-title">证明材料</view>
                 </view>
-                <view class="pd-24 bg-#fff mb-10 p-rtv">
+                <view v-if="form" class="pd-24 bg-#fff mb-10 p-rtv">
+                    <image class="base_res_logo w-160 h-160" :src="`/static/images/common/base_res_logo${form?.baseInfo?.swyqRes}.png`" mode="widthFix" />
                     <view class="f-s-30 pd2-16-0 info-border-bottom">
                         <span class="c-#666">获评品种:</span>
                         <span class="c-#333">{{ form?.baseInfo?.swyqVarietyName || '-' }}</span>
@@ -63,10 +64,10 @@
                     </view>
                 </view>
             </view>
-            <template #bottom>
+            <template v-if="form?.baseInfo?.swyqRes == '2'" #bottom>
                 <view class="pd-20">
                     <view></view>
-                    <up-button type="primary">去修改</up-button>
+                    <up-button type="primary" @click="$u.route({ type: 'redirect', url: '/plant/base/mark-swyq-base/index', params: { id: did } })">去修改</up-button>
                 </view>
             </template>
         </z-paging>
@@ -89,20 +90,8 @@ const mapUnitByBaseType: any = {
     '2': '平方米',
     '3': '平方米',
 };
-const form = ref<any>({});
-const formSwyq = ref<any>({
-    swyqVarietyId: '',
-    swyqVarietyName: '',
-    swyqRatedDate: '',
-    swyqCertFile: '',
-    swyqUrl: '',
-});
-const rulesSwyq = reactive<any>({
-    swyqVarietyId: [{ required: true, message: '请选择获评品种', trigger: 'blur' }],
-    swyqRatedDate: [{ required: true, message: '请选择获评三无一全基地时间', trigger: 'blur' }],
-    swyqCertFile: [{ required: true, message: '请上传官方公示证明材料', trigger: 'blur' }],
-    swyqUrl: [{ required: true, message: '请输入官方公示网址', trigger: 'blur' }],
-});
+const form = ref<any>(null);
+
 
 const did = ref('');
 // 根据id获取基地详情
@@ -147,8 +136,10 @@ onLoad((options: any) => {
 .gap-info-card {
     border: 1rpx solid rgba($u-primary, 0.4);
 }
-.ksqulc {
-    position: relative;
-    height: 100vh;
+
+.base_res_logo {
+    position: absolute;
+    right: 30rpx;
+    top: 30rpx;
 }
 </style>

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

@@ -150,6 +150,11 @@ const getDetailById = async (id: string) => {
     const res = await useClientRequest.get(`/plt-api/app/base/getInfoAllById/${id}`);
     if (res && res.code === 200) {
         form.value = res.data || {};
+        formSwyq.value.swyqVarietyId = res.data?.baseInfo?.swyqVarietyId || undefined;
+        formSwyq.value.swyqVarietyName = res.data?.baseInfo?.swyqVarietyName || '';
+        formSwyq.value.swyqRatedDate = res.data?.baseInfo?.swyqRatedDate || '';
+        formSwyq.value.swyqCertFile = res.data?.baseInfo?.swyqCertFile || '';
+        formSwyq.value.swyqUrl = res.data?.baseInfo?.swyqUrl || '';
     }
 };
 const onRefresh = () => {
@@ -186,7 +191,9 @@ const submitForm = async () => {
                     title: '提交成功',
                     icon: 'success',
                 });
-                uni.$emit('swyqBaseInfoUpdated');
+
+                uni.$emit('refreshBase');
+                uni.$emit('refreshBaseList');
                 // 返回上一页
                 uni.$u.route({
                     type: 'redirect',

BIN
src/static/images/common/base_res_logo0.png


BIN
src/static/images/common/base_res_logo1.png


BIN
src/static/images/common/base_res_logo2.png


BIN
src/static/images/common/select_push_icon.png