lisy il y a 1 semaine
Parent
commit
b0199b0988

+ 3 - 1
src/plant/port/supervise/models/materialinfo.vue

@@ -15,7 +15,7 @@
         </view>
         <view class="pt-6 pb-6 d-flex a-c">
             <view class="c-#666 f-s-28 w-s-no"> 所在库房:</view>
-            <view class="c-#333 f-s-28 f-w-5">{{ data?.warehouses }}</view>
+            <view class="c-#333 f-s-28 f-w-5">{{ getStorageRoomNames(data?.warehouses) }}</view>
         </view>
         <view class="pt-6 pb-6 d-flex mb-12" v-if="showClose">
             <view class="w-50% d-flex a-c">
@@ -48,7 +48,9 @@
     </view>
 </template>
 <script setup lang="ts">
+import { getStorageRoomNames } from '@/utils/common';
 import { ref, watch, computed } from 'vue';
+
 // 从外部获取数据
 const props = defineProps<{
     showClose?: boolean;

+ 2 - 1
src/plant/port/supervise/supervise-material-detail/index.vue

@@ -21,7 +21,7 @@
                     </view>
                     <view class="pt-6 pb-6 d-flex a-c">
                         <view class="c-#666 f-s-28 w-s-no"> 所在库房:</view>
-                        <view class="c-#333 f-s-28 f-w-5">{{ item?.warehouses }}</view>
+                        <view class="c-#333 f-s-28 f-w-5">{{ getStorageRoomNames(item?.warehouses) }}</view>
                     </view>
                     <view class="pt-6 pb-6 d-flex mb-12">
                         <view class="w-50% d-flex a-c">
@@ -54,6 +54,7 @@
 </template>
 <script setup lang="ts">
 import { useClientRequest } from '@/utils/request';
+import { getStorageRoomNames } from '@/utils/common';
 const list = ref<any>([]);
 const data = ref<any>();
 const paging = ref();

+ 2 - 1
src/plant/port/supervise/supervise-plant-detail/index.vue

@@ -57,7 +57,7 @@
                     </view>
                     <view class="pt-6 pb-6 d-flex a-c">
                         <view class="c-#666 f-s-28 w-s-no"> 所在库房:</view>
-                        <view class="c-#333 f-s-28 f-w-5">{{ item?.warehouses }}</view>
+                        <view class="c-#333 f-s-28 f-w-5">{{ getStorageRoomNames(item?.warehouses) }}</view>
                     </view>
                     <view class="pt-6 pb-6 d-flex mb-12">
                         <view class="w-50% d-flex a-c">
@@ -85,6 +85,7 @@
     </z-paging>
 </template>
 <script setup lang="ts">
+import { getStorageRoomNames } from '@/utils/common';
 import { useClientRequest } from '@/utils/request';
 import Baseinfo from '../models/baseinfo.vue';
 import Individualinfo from '../models/individualinfo.vue';

+ 39 - 42
src/tools/species-info-process/models/souceinfo.vue

@@ -1,54 +1,51 @@
 <template>
     <view class="bg-#FBFDFB border-#AFDDBB pd-24 b-radius mb-10">
-        <view v-if="showClose" class="c-#F81242 f-s-36 ab2-10-10 pl-20 pr-10"
-            style="position: absolute; right: 10rpx; top: 0rpx" @click="() => handleClose(index)"> × </view>
+        <view v-if="showClose" class="c-#F81242 f-s-36 ab2-10-10 pl-20 pr-10" style="position: absolute; right: 10rpx; top: 0rpx" @click="() => handleClose(index)"> × </view>
         <view class="d-flex a-c pb-10">
-            <view class="c-primary pd-4 bg-#E7F4EA radius-10" style="font-style: italic">{{ index + 1 < 10 ? '0' +
-                (index + 1) : index + 1 }}</view>
-                    <view class="c-#333 f-s-34 f-w-5 ml-10 mr-10">{{ data?.variety }}</view>
-                    <span class="f-s-24 c-#666">{{ selectDictLabel(pt_seed_type, data?.seedType) }}</span>
-            </view>
-            <view class="pt-6 pb-6 d-flex a-c">
-                <view class="c-#666 f-s-28"> 入库批次号:</view>
-                <view class="c-#333 f-s-28 f-w-5">{{ data?.batchCode }}</view>
-            </view>
-            <view class="pt-6 pb-6 d-flex a-c">
-                <view class="c-#666 f-s-28"> 供应商:</view>
-                <view class="c-#333 f-s-28 f-w-5">{{ data?.supplier }}</view>
+            <view class="c-primary pd-4 bg-#E7F4EA radius-10" style="font-style: italic">{{ index + 1 < 10 ? '0' + (index + 1) : index + 1 }}</view>
+            <view class="c-#333 f-s-34 f-w-5 ml-10 mr-10">{{ data?.variety }}</view>
+            <span class="f-s-24 c-#666">{{ selectDictLabel(pt_seed_type, data?.seedType) }}</span>
+        </view>
+        <view class="pt-6 pb-6 d-flex a-c">
+            <view class="c-#666 f-s-28"> 入库批次号:</view>
+            <view class="c-#333 f-s-28 f-w-5">{{ data?.batchCode }}</view>
+        </view>
+        <view class="pt-6 pb-6 d-flex a-c">
+            <view class="c-#666 f-s-28"> 供应商:</view>
+            <view class="c-#333 f-s-28 f-w-5">{{ data?.supplier }}</view>
+        </view>
+        <view class="pt-6 pb-6 d-flex a-c">
+            <view class="c-#666 f-s-28 w-s-no"> 所在库房:</view>
+            <view class="c-#333 f-s-28 f-w-5">{{ getStorageRoomNames(data?.warehouses) }}</view>
+        </view>
+        <view class="pt-6 pb-6 d-flex mb-12">
+            <view class="w-50% d-flex a-c">
+                <view class="c-#666 f-s-28"> 入库量:</view>
+                <view class="c-#333 f-s-28 f-w-5">{{ data?.capacity }}{{ data?.unit }}</view>
             </view>
-            <view class="pt-6 pb-6 d-flex a-c">
-                <view class="c-#666 f-s-28 w-s-no"> 所在库房:</view>
-                <view class="c-#333 f-s-28 f-w-5">{{ data?.warehouses }}</view>
+            <view class="w-50% d-flex a-c">
+                <view class="c-#666 f-s-28"> 剩余量:</view>
+                <view class="c-primary f-s-28 f-w-5">{{ data?.restAmount }}{{ data?.unit }}</view>
             </view>
-            <view class="pt-6 pb-6 d-flex mb-12">
-                <view class="w-50% d-flex a-c">
-                    <view class="c-#666 f-s-28"> 入库量:</view>
-                    <view class="c-#333 f-s-28 f-w-5">{{ data?.capacity }}{{ data?.unit }}</view>
-                </view>
-                <view class="w-50% d-flex a-c">
-                    <view class="c-#666 f-s-28"> 剩余量:</view>
-                    <view class="c-primary f-s-28 f-w-5">{{ data?.restAmount }}{{ data?.unit }}</view>
-                </view>
+        </view>
+        <up-line color="#AFDDBB" style="margin-left: -24rpx; margin-right: -24rpx; width: auto"></up-line>
+        <view class="f-s-28 c-#666 pt-16">本次使用量:</view>
+        <view class="pt-6 pb-6 d-flex a-c">
+            <view class="flex1 mr-10">
+                <up-input v-model="inputsModel.inputAmount" placeholder="请输入本次使用量" border="bottom" style="padding-left: 0">
+                    <template #suffix>
+                        <view class="c-#333 f-s-28 f-w-5">{{ data?.unit }}</view>
+                    </template>
+                </up-input>
             </view>
-            <up-line color="#AFDDBB" style="margin-left: -24rpx; margin-right: -24rpx; width: auto"></up-line>
-            <view class="f-s-28 c-#666 pt-16">本次使用量:</view>
-            <view class="pt-6 pb-6 d-flex a-c">
-                <view class="flex1 mr-10">
-                    <up-input v-model="inputsModel.inputAmount" placeholder="请输入本次使用量" border="bottom"
-                        style="padding-left: 0">
-                        <template #suffix>
-                            <view class="c-#333 f-s-28 f-w-5">{{ data?.unit }}</view>
-                        </template>
-                    </up-input>
-                </view>
-                <view class="">
-                    <up-checkbox label="全部使用" usedAlone v-model:checked="hasChecked"
-                        @change="handleUseAllChange"></up-checkbox>
-                </view>
+            <view class="">
+                <up-checkbox label="全部使用" usedAlone v-model:checked="hasChecked" @change="handleUseAllChange"></up-checkbox>
             </view>
         </view>
+    </view>
 </template>
 <script setup lang="ts">
+import { getStorageRoomNames } from '@/utils/common';
 import { ref, watch, computed, nextTick } from 'vue';
 const { proxy } = getCurrentInstance() as ComponentInternalInstance;
 const { pt_seed_instore_type, pt_seed_type, pt_fungus_code_type } = toRefs<any>(proxy?.useDict('pt_seed_instore_type', 'pt_seed_type', 'pt_fungus_code_type'));
@@ -63,7 +60,7 @@ const emit = defineEmits<{
     close: [index: number];
 }>();
 
-const inputsModel = defineModel<any>('inputs', { default: () => { } });
+const inputsModel = defineModel<any>('inputs', { default: () => {} });
 
 // 处理关闭事件
 const handleClose = (index: number) => {

+ 2 - 1
src/tools/species-info/models/souceinfo.vue

@@ -16,7 +16,7 @@
         </view>
         <view class="pt-6 pb-6 d-flex a-c">
             <view class="c-#666 f-s-28 w-s-no"> 所在库房:</view>
-            <view class="c-#333 f-s-28 f-w-5">{{ data?.warehouses }}</view>
+            <view class="c-#333 f-s-28 f-w-5">{{ getStorageRoomNames(data?.warehouses) }}</view>
         </view>
         <view class="pt-6 pb-6 d-flex mb-12" v-if="showClose">
             <view class="w-50% d-flex a-c">
@@ -46,6 +46,7 @@
 </template>
 <script setup lang="ts">
 import { ref, watch, computed, nextTick } from 'vue';
+import { getStorageRoomNames } from '@/utils/common';
 const { proxy } = getCurrentInstance() as ComponentInternalInstance;
 const { pt_seed_instore_type, pt_seed_type, pt_fungus_code_type } = toRefs<any>(proxy?.useDict('pt_seed_instore_type', 'pt_seed_type', 'pt_fungus_code_type'));
 // 从外部获取数据