huangxw пре 1 недеља
родитељ
комит
aeb9dfdcac

+ 14 - 0
src/plant/models/warehouseCard/seed-source-card.vue

@@ -32,6 +32,20 @@
                 <span class="c-#333 f-w-500">{{ getStorageRoomNames(item?.warehouses) || '-' }}</span>
             </view>
         </template>
+        <template v-if="item?.instoreType == '4'">
+            <view class="pd2-4-0 f-s-28">
+                <span class="c-#666">入库批号:</span>
+                <span class="c-#333 f-w-500">{{ item?.batchCode }}</span>
+            </view>
+            <view v-if="item?.supplierId" class="pd2-4-0 f-s-28">
+                <span class="c-#666">供应商:</span>
+                <span class="c-#333 f-w-500">{{ item?.supplierInfo?.cusName || '-' }}</span>
+            </view>
+            <view v-if="item?.warehouses?.length" class="pd2-4-0 f-s-28">
+                <span class="c-#666">存放库房:</span>
+                <span class="c-#333 f-w-500">{{ getStorageRoomNames(item?.warehouses) || '-' }}</span>
+            </view>
+        </template>
         <template v-if="item?.instoreType == '3'">
             <view class="pd2-4-0 f-s-28">
                 <span class="c-#666">采收批号:</span>

+ 3 - 110
src/plant/storage/loss-register/index.vue

@@ -5,116 +5,8 @@
         </template>
         <up-form class="p-rtv pd-24" labelPosition="top" :model="form" :rules="rules" labelWidth="auto" ref="upFormRef">
             <view class="bg-fff b-radius-16">
-                <view class="pd-24 up-border-bottom">
-                    <template v-if="info?.stockType === '1'">
-                        <view class="d-flex j-ed a-c mb-16">
-                            <view class="f-s-22 c-#666">{{ info?.instoreBizInfo?.instoreDate }}</view>
-                        </view>
-                        <view class="d-flex flex1 mb-10">
-                            <view class="flex1">
-                                <span class="f-s-34 c-#333 f-w-500 mr-10">{{ info?.materialName }}</span>
-                                <span class="f-s-24 c-#666">{{ selectDictLabel(pt_material_type, info?.materialType) }}</span>
-                            </view>
-                            <view>
-                                <view v-if="info?.examinReport?.length" class="tag-span c-primary bg-#EBF6EE">已检验</view>
-                                <view v-else class="tag-span c-danger bg-#F9ECEA">未检验</view>
-                            </view>
-                        </view>
-                        <view class="pd2-4-0 f-s-28">
-                            <span class="c-#666">入库批号:</span>
-                            <span class="c-#333 f-w-500">{{ info?.batchCode }}</span>
-                        </view>
-                        <view v-if="info?.supplier" class="pd2-4-0 f-s-28">
-                            <span class="c-#666">供应商:</span>
-                            <span class="c-#333 f-w-500">{{ info?.supplier }}</span>
-                        </view>
-                        <view class="pd2-4-0 f-s-28">
-                            <span class="c-#666">入库量:</span>
-                            <span class="c-#333 f-w-500">{{ info?.capacity }}{{ info?.unit }}</span>
-                        </view>
-                        <view class="d-flex">
-                            <view v-if="info?.restAmount" class="pd2-4-0 f-s-28 flex1">
-                                <span class="c-#666">出库量:</span>
-                                <span class="c-#333 f-w-500">{{ info?.inputAmount || '0' }}{{ info?.unit }}</span>
-                            </view>
-                            <view v-if="info?.restAmount" class="pd2-4-0 f-s-28 flex1">
-                                <span class="c-primary">剩余量:</span>
-                                <span class="c-primary f-w-500">{{ info?.restAmount || '0' }}{{ info?.unit }}</span>
-                            </view>
-                        </view>
-                    </template>
-                    <template v-if="info?.stockType === '2'">
-                        <view class="d-flex j-sb a-c li-item-head mb-16">
-                            <view class="li-left-tag" :class="{ [`bg-instore-${info?.instoreType}`]: true }">{{ selectDictLabel(pt_seed_instore_type, info?.instoreType) }}</view>
-                            <view class="f-s-22 c-#666">{{ info?.updateTime || info?.createTime }}</view>
-                        </view>
-                        <view class="mb-10">
-                            <span class="f-s-34 c-#333 f-w-500 mr-10">{{ info?.variety }}</span>
-                            <span class="f-s-24 c-#666">{{ info?.seedLevel }}{{ selectDictLabel(pt_seed_type, info?.seedType) }}</span>
-                        </view>
-                        <view class="pd2-4-0 f-s-28">
-                            <span class="c-#666">入库批号:</span>
-                            <span class="c-#333 f-w-500">{{ info?.batchCode }}</span>
-                        </view>
-                        <view v-if="['A3', 'A4'].includes(info?.fungusCodeType)" class="pd2-4-0 f-s-28">
-                            <span class="c-#666">菌种/菌株编号:</span>
-                            <span class="c-#333 f-w-500">{{ selectDictLabel(pt_fungus_code_type, info?.fungusCodeType) }}/{{ info?.fungusCode }}</span>
-                        </view>
-                        <view class="pd2-4-0 f-s-28">
-                            <span class="c-#666">供应商:</span>
-                            <span class="c-#333 f-w-500">{{ info?.supplier }}</span>
-                        </view>
-                        <view class="pd2-4-0 f-s-28">
-                            <span class="c-#666">入库量:</span>
-                            <span class="c-#333 f-w-500">{{ info?.capacity }}{{ info?.unit }}</span>
-                        </view>
-                        <view class="d-flex">
-                            <view v-if="info?.restAmount" class="pd2-4-0 f-s-28 flex1">
-                                <span class="c-#666">出库量:</span>
-                                <span class="c-#333 f-w-500">{{ info?.inputAmount || '0' }}{{ info?.unit }}</span>
-                            </view>
-                            <view v-if="info?.restAmount" class="pd2-4-0 f-s-28 flex1">
-                                <span class="c-primary">剩余量:</span>
-                                <span class="c-primary f-w-500">{{ info?.restAmount || '0' }}{{ info?.unit }}</span>
-                            </view>
-                        </view>
-                    </template>
-                    <template v-if="info?.stockType === '4'">
-                        <view class="d-flex j-sb a-c li-item-head mb-16">
-                            <view class="li-left-tag" :class="{ [`bg-instore-${info?.instoreType}`]: true }">{{ selectDictLabel(pt_seed_instore_type, info?.instoreType) }}</view>
-                            <view class="f-s-22 c-#666">{{ info?.instoreBizInfo?.instoreDate }}</view>
-                        </view>
-                        <view class="mb-10">
-                            <span class="f-s-34 c-#333 f-w-500 mr-10">{{ info?.variety }}</span>
-                            <span v-if="info?.partName" class="f-s-24 c-#666">{{ info?.level }}{{ info?.partName }}</span>
-                        </view>
-                        <view class="pd2-4-0 f-s-28">
-                            <span class="c-#666">入库批号:</span>
-                            <span class="c-#333 f-w-500">{{ info?.batchCode }}</span>
-                        </view>
-                        <view v-if="info?.supplierId" class="pd2-4-0 f-s-28">
-                            <span class="c-#666">供应商:</span>
-                            <span class="c-#333 f-w-500">{{ info?.supplierInfo?.cusName || '-' }}</span>
-                        </view>
-                        <view v-if="info?.warehouses?.length" class="pd2-4-0 f-s-28">
-                            <span class="c-#666">存放库房:</span>
-                            <span class="c-#333 f-w-500">{{ getStorageRoomNames(info?.warehouses) || '-' }}</span>
-                        </view>
-                        <view class="pd2-4-0 f-s-28">
-                            <span class="c-#666">入库量:</span>
-                            <span class="c-#333 f-w-500">{{ info?.capacity }}{{ info?.unit }}</span>
-                        </view>
-                        <view class="d-flex">
-                            <view v-if="info?.inputAmount" class="pd2-4-0 f-s-28 flex1">
-                                <span class="c-#666">出库量:</span>
-                                <span class="c-#333 f-w-500">{{ info?.inputAmount || '0' }}{{ info?.unit }}</span>
-                            </view>
-                            <view v-if="info?.restAmount" class="pd2-4-0 f-s-28 flex1">
-                                <span class="c-primary">剩余量:</span>
-                                <span class="c-primary f-w-500">{{ info?.restAmount || '0' }}{{ info?.unit }}</span>
-                            </view>
-                        </view>
-                    </template>
+                <view v-if="info" class="up-border-bottom">
+                   <ObjectCardStorage :item="info"></ObjectCardStorage>
                 </view>
                 <view class="pd3-10-24-24">
                     <!-- 损耗登记日期 -->
@@ -159,6 +51,7 @@
 import { getStorageRoomNames } from '@/utils/common';
 import { useClientRequest } from '@/utils/request';
 import { parseTime, selectDictListClass } from '@/utils/ruoyi';
+import ObjectCardStorage from '@/plant/models/warehouseCard/object-card-storage.vue';
 const { proxy } = getCurrentInstance() as ComponentInternalInstance;
 const { pt_material_type, pt_seed_instore_type, pt_seed_type, pt_fungus_code_type } = toRefs<any>(proxy?.useDict('pt_material_type', 'pt_seed_instore_type', 'pt_seed_type', 'pt_fungus_code_type'));
 const upFormRef = ref();