|
|
@@ -9,7 +9,7 @@
|
|
|
</view>
|
|
|
</template>
|
|
|
<view class="pd-24" v-if="!showSearch">
|
|
|
- <template>
|
|
|
+ <template v-if="speArray.length">
|
|
|
<view class="f-s-32 c-#333 f-w-5 mb-20">主营品种</view>
|
|
|
<view class="d-flex a-c f-w-w">
|
|
|
<spe-lable class="mr-20 mb-20" v-for="(item, index) in speArray" :key="index" :text="item?.medicineName" size="30rpx" :id="item?.id" @click="changeSpe(item?.medicineName)" />
|
|
|
@@ -18,8 +18,8 @@
|
|
|
<template>
|
|
|
<ut-empty></ut-empty>
|
|
|
<view class="d-flex flex-cln j-c a-c">
|
|
|
- <view class="c-#ccc f-s-28">可请前往<text class="c-primary">基地-主营品种配置</text>页面进行</view>
|
|
|
- <view class="c-#ccc f-s-28">主营品种配置,配置后即可快捷选择</view>
|
|
|
+ <view class="c-#ccc f-s-28">您可以直接搜索,或前往<text class="c-primary">基地-主营品种配置</text>页面进行</view>
|
|
|
+ <view class="c-#ccc f-s-28">主营品种配置,配置后下次即可快捷选择。</view>
|
|
|
</view>
|
|
|
</template>
|
|
|
</view>
|
|
|
@@ -27,31 +27,32 @@
|
|
|
<view class="f-s-32 c-#333 f-w-5 mb-20">搜索结果</view>
|
|
|
<view class="pd-30 d-flex bg-#FBFDFB border-#37A954 b-radius mb-20" v-for="(item, index) in list" :key="index">
|
|
|
<up-radio-group v-model="radiovalue1">
|
|
|
- <view class="">
|
|
|
- <view class="mb-20">
|
|
|
- <text class="c-#333 f-s-34 f-w-5 mr-5">{{ item?.varietyName }}</text>
|
|
|
- <text class="c-#666 f-s-24">{{ item?.latinName }}</text>
|
|
|
- </view>
|
|
|
- <view class="mb-20">
|
|
|
- <text class="c-#333 f-s-28 f-w-5 mr-5">{{ item?.genusName }}</text>
|
|
|
- <text class="c-#666 f-s-24">{{ item?.genusLatinName }}</text>
|
|
|
- </view>
|
|
|
+ <view class="d-flex w-100%">
|
|
|
<view class="">
|
|
|
- <text class="c-#666 f-s-24">产出:</text>
|
|
|
- <text class="c-#666 f-s-24">{{ item?.medicineName }}</text>
|
|
|
+ <view class="mb-20 ov-hd tx-ov">
|
|
|
+ <text class="c-#333 f-s-34 f-w-5 mr-5">{{ item?.varietyName }}</text>
|
|
|
+ <text class="c-#666 f-s-24 tx-ov ov-hd">{{ item?.latinName }}</text>
|
|
|
+ </view>
|
|
|
+ <view class="mb-20">
|
|
|
+ <text class="c-#333 f-s-28 f-w-5 mr-5">{{ item?.genusName }}</text>
|
|
|
+ <text class="c-#666 f-s-24 tx-ov ov-hd">{{ item?.genusLatinName }}</text>
|
|
|
+ </view>
|
|
|
+ <view class="">
|
|
|
+ <text class="c-#666 f-s-24">产出:</text>
|
|
|
+ <text class="c-#666 f-s-24 tx-ov ov-hd">{{ item?.medicineName }}</text>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view class="flex1"></view>
|
|
|
+ <view class="d-flex j-c a-c">
|
|
|
+ <up-radio activeColor="#37A954" label="" :name="item?.id"></up-radio>
|
|
|
</view>
|
|
|
- </view>
|
|
|
- <view class="flex1"></view>
|
|
|
- <view class="d-flex j-c a-c">
|
|
|
- <up-radio activeColor="#37A954" label="" :name="item?.id"></up-radio>
|
|
|
</view>
|
|
|
</up-radio-group>
|
|
|
</view>
|
|
|
</view>
|
|
|
<template #bottom v-if="showSearch">
|
|
|
<view class="pd-24 d-flex j-c gap-20 base-bottom-wrap">
|
|
|
- <up-button type="primary" @click="navigateBackOrHome()">取消</up-button>
|
|
|
- <up-button type="primary" @click="save()">完成</up-button>
|
|
|
+ <up-button type="primary" @click="save()">确认选择</up-button>
|
|
|
</view>
|
|
|
</template>
|
|
|
</z-paging>
|
|
|
@@ -89,6 +90,10 @@ const changeSpe = (data: string) => {
|
|
|
changeSeach();
|
|
|
};
|
|
|
const getSpecies = async () => {
|
|
|
+ console.log('getSpecies');
|
|
|
+ if (form.value?.keyword) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
const res = await useClientRequest.get('/plt-api/app/cpyVariety/list');
|
|
|
if (res.code === 200) {
|
|
|
speArray.value = res.data;
|
|
|
@@ -97,11 +102,14 @@ const getSpecies = async () => {
|
|
|
const radiovalue1 = ref('苹果');
|
|
|
const save = () => {
|
|
|
const res = list.value.find((item) => item.id === radiovalue1.value);
|
|
|
- console.log(res);
|
|
|
+ if (!res) return;
|
|
|
uni.$emit('updateBiologicalname', { msg: res });
|
|
|
uni.navigateBack({ delta: 1 });
|
|
|
};
|
|
|
onMounted(() => {
|
|
|
getSpecies();
|
|
|
});
|
|
|
+onUnload(() => {
|
|
|
+ console.log('????');
|
|
|
+});
|
|
|
</script>
|