huangxw 1 hónapja
szülő
commit
c4bbe17138

+ 3 - 3
src/plant/storage/agro-product/detail/index.vue

@@ -34,9 +34,9 @@
                     <span class="c-#666">入库批号:</span>
                     <span class="c-#333 f-w-500">{{ form?.batchCode }}</span>
                 </view>
-                <view v-if="form?.supplier" class="pd2-4-0 f-s-28">
+                <view v-if="form?.supplierId" class="pd2-4-0 f-s-28">
                     <span class="c-#666">供应商:</span>
-                    <span class="c-#333 f-w-500">{{ form?.supplier }}</span>
+                    <span class="c-#333 f-w-500">{{ form?.supplierInfo?.cusName || '-' }}</span>
                 </view>
                 <view v-if="form?.warehouses?.length" class="pd2-4-0 f-s-28">
                     <span class="c-#666">存放库房:</span>
@@ -47,7 +47,7 @@
                     <span class="c-#333 f-w-500">{{ form?.capacity }}{{ form?.unit }}</span>
                 </view>
                 <view class="d-flex">
-                    <view v-if="form?.restAmount" class="pd2-4-0 f-s-28 flex1">
+                    <view v-if="form?.inputAmount" class="pd2-4-0 f-s-28 flex1">
                         <span class="c-#666">出库量:</span>
                         <span class="c-#333 f-w-500">{{ form?.inputAmount || '0' }}{{ form?.unit }}</span>
                     </view>

+ 3 - 3
src/plant/storage/agro-product/list/index.vue

@@ -37,16 +37,16 @@
                             <span class="c-#666">存放库房:</span>
                             <span class="c-#333 f-w-500">{{ getStorageRoomNames(item?.warehouses) || '-' }}</span>
                         </view>
-                        <view class="pd2-4-0 f-s-28">
+                        <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?.supplier }}</span>
+                            <span class="c-#333 f-w-500">{{ item?.supplierInfo?.cusName }}</span>
                         </view>
                         <view class="pd2-4-0 f-s-28">
                             <span class="c-#666">入库量:</span>
                             <span class="c-#333 f-w-500">{{ item?.capacity }}{{ item?.unit }}</span>
                         </view>
                         <view class="d-flex">
-                            <view v-if="item?.restAmount" class="pd2-4-0 f-s-28 flex1">
+                            <view v-if="item?.inputAmount" class="pd2-4-0 f-s-28 flex1">
                                 <span class="c-#666">出库量:</span>
                                 <span class="c-#333 f-w-500">{{ item?.inputAmount || '0' }}{{ item?.unit }}</span>
                             </view>

+ 8 - 31
src/plant/storage/fresh-goods/detail/index.vue

@@ -23,19 +23,15 @@
                 </view>
                 <view class="mb-10">
                     <span class="f-s-34 c-#333 f-w-500 mr-10">{{ form?.variety }}</span>
-                    <span class="f-s-24 c-#666">{{ selectDictLabel(pt_seed_type, form?.seedType) }}</span>
+                    <span v-if="form?.partName" class="f-s-24 c-#666">{{ form?.partName }}</span>
                 </view>
                 <view class="pd2-4-0 f-s-28">
                     <span class="c-#666">入库批号:</span>
                     <span class="c-#333 f-w-500">{{ form?.batchCode }}</span>
                 </view>
-                <view v-if="['A3', 'A4'].includes(form?.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, form?.fungusCodeType) }}/{{ form?.fungusCode }}</span>
-                </view>
-                <view class="pd2-4-0 f-s-28">
+                <view v-if="form?.supplierId" class="pd2-4-0 f-s-28">
                     <span class="c-#666">供应商:</span>
-                    <span class="c-#333 f-w-500">{{ form?.supplier }}</span>
+                    <span class="c-#333 f-w-500">{{ form?.supplierInfo?.cusName || '-' }}</span>
                 </view>
                 <view v-if="form?.warehouses?.length" class="pd2-4-0 f-s-28">
                     <span class="c-#666">存放库房:</span>
@@ -46,7 +42,7 @@
                     <span class="c-#333 f-w-500">{{ form?.capacity }}{{ form?.unit }}</span>
                 </view>
                 <view class="d-flex">
-                    <view v-if="form?.restAmount" class="pd2-4-0 f-s-28 flex1">
+                    <view v-if="form?.inputAmount" class="pd2-4-0 f-s-28 flex1">
                         <span class="c-#666">出库量:</span>
                         <span class="c-#333 f-w-500">{{ form?.inputAmount || '0' }}{{ form?.unit }}</span>
                     </view>
@@ -190,26 +186,7 @@ import { useClientRequest } from '@/utils/request';
 import { selectDictListClass } from '@/utils/ruoyi';
 const { proxy } = getCurrentInstance() as ComponentInternalInstance;
 
-const { pt_seed_instore_type, pt_warehouse_type, pt_seed_type, pt_seed_source, pt_materail_unit, pt_mother_father_flag, pt_op_method, pt_seed_unit, pt_fungus_code_type, pt_breeding_materials, yes_no, pt_cus_type, pt_cpy_type, pt_gen_unit, pt_medicine_source, pt_medicine_unit } = toRefs<any>(
-    proxy?.useDict(
-        'pt_seed_instore_type',
-        'pt_warehouse_type',
-        'pt_seed_type',
-        'pt_seed_source',
-        'pt_materail_unit',
-        'pt_mother_father_flag',
-        'pt_op_method',
-        'pt_seed_unit',
-        'pt_fungus_code_type',
-        'pt_breeding_materials',
-        'yes_no',
-        'pt_cus_type',
-        'pt_cpy_type',
-        'pt_gen_unit',
-        'pt_medicine_source',
-        'pt_medicine_unit',
-    ),
-);
+const { pt_seed_instore_type, pt_warehouse_type, pt_seed_type, pt_seed_source, pt_materail_unit, pt_mother_father_flag, pt_op_method, pt_seed_unit, pt_fungus_code_type, pt_breeding_materials, yes_no, pt_cus_type, pt_cpy_type, pt_gen_unit, pt_medicine_source, pt_medicine_unit } = toRefs<any>(proxy?.useDict('pt_seed_instore_type', 'pt_warehouse_type', 'pt_seed_type', 'pt_seed_source', 'pt_materail_unit', 'pt_mother_father_flag', 'pt_op_method', 'pt_seed_unit', 'pt_fungus_code_type', 'pt_breeding_materials', 'yes_no', 'pt_cus_type', 'pt_cpy_type', 'pt_gen_unit', 'pt_medicine_source', 'pt_medicine_unit'));
 const paging = ref<any>(null);
 const form = ref<any>({});
 const did = ref('');
@@ -223,7 +200,7 @@ const genCountMap = reactive({
 // 获取详情(仓库信息)
 const getDetailById = async (id: string) => {
     if (!id) return;
-    const res = await useClientRequest.get(`/plt-api/app/storageSeed/getById/${id}`);
+    const res = await useClientRequest.get(`/plt-api/app/storage/getInfo/${id}`);
     if (res && res.code === 200) {
         form.value = res.data || {};
     }
@@ -234,7 +211,7 @@ const navigateToInOutRecords = () => {
         url: '/plant/storage/stock-list/index',
         params: {
             id: did.value,
-            stockType: '2',
+            stockType: '4',
         },
     });
 };
@@ -248,7 +225,7 @@ const navigateToInventoryLoss = () => {
         url: '/plant/storage/loss-register/index',
         success: (res) => {
             res.eventChannel.emit('storage-data', {
-                stockType: '2',
+                stockType: '4',
                 ...form.value,
             });
         },

+ 7 - 15
src/plant/storage/fresh-goods/list/index.vue

@@ -26,7 +26,7 @@
         <view class="pd-24 bg-#f7f7f7">
             <up-swipe-action>
                 <up-swipe-action-item v-for="(item, index) in list" :key="index" :name="item?.id" :options="optionsActionTemp" @click="clickTempSwipe" class="mb-20 b-radius">
-                    <view class="b-radius bg-#fff pd-20 p-rtv" @click.stop="$u.route({ url: '/plant/storage/seed-source/detail/index', params: { id: item.id } })">
+                    <view class="b-radius bg-#fff pd-20 p-rtv" @click.stop="$u.route({ url: '/plant/storage/fresh-goods/detail/index', params: { id: item.id } })">
                         <view class="d-flex j-sb a-c li-item-head mb-16">
                             <view class="li-left-tag" :class="{ [`bg-${selectDictListClass(pt_seed_instore_type, item?.instoreType)}`]: true }">{{ selectDictLabel(pt_seed_instore_type, item?.instoreType) }}</view>
                             <view class="f-s-22 c-#666">{{ item?.instoreBizInfo?.instoreDate }}</view>
@@ -34,7 +34,7 @@
                         <view class="d-flex flex1 mb-10">
                             <view class="flex1">
                                 <span class="f-s-34 c-#333 f-w-500 mr-10">{{ item?.variety }}</span>
-                                <span class="f-s-24 c-#666">{{ selectDictLabel(pt_seed_type, item?.seedType) }}</span>
+                                <span v-if="item?.partName" class="f-s-24 c-#666">{{ item?.partName }}</span>
                             </view>
                             <view>
                                 <view v-if="item?.examinReport?.length" class="tag-span c-primary bg-#EBF6EE">已检验</view>
@@ -43,17 +43,9 @@
                         </view>
                         <view class="pd2-4-0 f-s-28">
                             <span class="c-#666">入库批号:</span>
-                            <span class="c-#333 f-w-500">{{ item?.batchCode }}</span>
+                            <span class="c-#333 f-w-500">{{ item?.batchCode || '-' }}</span>
                         </view>
-                        <!-- <view class="pd2-4-0 f-s-28">
-                            <span class="c-#666">溯源批号:</span>
-                            <span class="c-#333 f-w-500">暂无</span>
-                        </view> -->
-                        <view v-if="['A3', 'A4'].includes(item?.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, item?.fungusCodeType) }}/{{ item?.fungusCode }}</span>
-                        </view>
-                        <view class="pd2-4-0 f-s-28">
+                        <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>
@@ -66,7 +58,7 @@
                             <span class="c-#333 f-w-500">{{ item?.capacity }}{{ item?.unit }}</span>
                         </view>
                         <view class="d-flex">
-                            <view v-if="item?.restAmount" class="pd2-4-0 f-s-28 flex1">
+                            <view v-if="item?.inputAmount" class="pd2-4-0 f-s-28 flex1">
                                 <span class="c-#666">出库量:</span>
                                 <span class="c-#333 f-w-500">{{ item?.inputAmount || '0' }}{{ item?.unit }}</span>
                             </view>
@@ -96,7 +88,7 @@ import { selectDictListClass } from '@/utils/ruoyi';
 import { getStorageRoomNames } from '@/utils/common';
 import FreshGoodsBottom from './model/fresh-goods-bottom.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_warehouse_type', 'pt_seed_type', 'pt_seed_source', 'pt_materail_unit', 'pt_mother_father_flag', 'pt_op_method', 'pt_seed_unit', 'pt_fungus_code_type', 'pt_breeding_materials', 'yes_no', 'pt_cus_type', 'pt_cpy_type', 'pt_gen_unit'));
+const { pt_seed_instore_type } = toRefs<any>(proxy?.useDict('pt_seed_instore_type'));
 const list = ref<any[]>();
 const form = ref({ keyword: '', restFlag: '1', instoreType: '', storageType: '4' });
 const paging = ref();
@@ -144,7 +136,7 @@ const clickTempSwipe = async (event: object) => {
                 title: '删除中...',
                 mask: true,
             });
-            await useClientRequest.get(`/plt-api/app/storageSeed/removeById/${name}`);
+            await useClientRequest.get(`/plt-api/app/storage/removeById/${name}`);
             uni.hideLoading();
             uni.showToast({
                 title: '删除成功',

+ 39 - 2
src/plant/storage/loss-register/index.vue

@@ -79,6 +79,42 @@
                             </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-${selectDictListClass(pt_seed_instore_type, 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?.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>
                 <view class="pd3-10-24-24">
                     <!-- 损耗登记日期 -->
@@ -113,13 +149,14 @@
         </up-form>
         <template #bottom>
             <view class="pd-20 d-flex">
-                <up-button @click="navigateBackOrHome()" class="mr-30" style="color: #333;" color="#F2F2F2">取消</up-button>
+                <up-button @click="navigateBackOrHome()" class="mr-30" style="color: #333" color="#F2F2F2">取消</up-button>
                 <up-button @click="submit" type="primary">确认登记</up-button>
             </view>
         </template>
     </z-paging>
 </template>
 <script setup lang="ts">
+import { getStorageRoomNames } from '@/utils/common';
 import { useClientRequest } from '@/utils/request';
 import { parseTime, selectDictListClass } from '@/utils/ruoyi';
 const { proxy } = getCurrentInstance() as ComponentInternalInstance;
@@ -178,7 +215,7 @@ const submit = async () => {
         uni.hideLoading();
         if (res && res.code === 200) {
             uni.showToast({ title: '登记成功', icon: 'success' });
-            uni.$emit('storage-registered')
+            uni.$emit('storage-registered');
             setTimeout(() => uni.navigateBack(), 300);
         }
     } catch (e) {

+ 4 - 4
src/plant/storage/seed-source/detail/index.vue

@@ -33,9 +33,9 @@
                     <span class="c-#666">菌种/菌株编号:</span>
                     <span class="c-#333 f-w-500">{{ selectDictLabel(pt_fungus_code_type, form?.fungusCodeType) }}/{{ form?.fungusCode }}</span>
                 </view>
-                <view class="pd2-4-0 f-s-28">
+                <view v-if="form?.supplierId" class="pd2-4-0 f-s-28">
                     <span class="c-#666">供应商:</span>
-                    <span class="c-#333 f-w-500">{{ form?.supplier }}</span>
+                    <span class="c-#333 f-w-500">{{ form?.supplierInfo?.cusName || '-' }}</span>
                 </view>
                 <view v-if="form?.warehouses?.length" class="pd2-4-0 f-s-28">
                     <span class="c-#666">存放库房:</span>
@@ -46,7 +46,7 @@
                     <span class="c-#333 f-w-500">{{ form?.capacity }}{{ form?.unit }}</span>
                 </view>
                 <view class="d-flex">
-                    <view v-if="form?.restAmount" class="pd2-4-0 f-s-28 flex1">
+                    <view v-if="form?.inputAmount" class="pd2-4-0 f-s-28 flex1">
                         <span class="c-#666">出库量:</span>
                         <span class="c-#333 f-w-500">{{ form?.inputAmount || '0' }}{{ form?.unit }}</span>
                     </view>
@@ -277,7 +277,7 @@ import { useClientRequest } from '@/utils/request';
 import { selectDictListClass } from '@/utils/ruoyi';
 const { proxy } = getCurrentInstance() as ComponentInternalInstance;
 
-const { pt_seed_instore_type,  pt_seed_type, pt_seed_source,pt_mother_father_flag, pt_fungus_code_type, pt_breeding_materials, yes_no, pt_gen_unit } = toRefs<any>(proxy?.useDict('pt_seed_instore_type', 'pt_seed_type', 'pt_seed_source', 'pt_mother_father_flag', 'pt_fungus_code_type', 'pt_breeding_materials', 'yes_no', 'pt_gen_unit'));
+const { pt_seed_instore_type, pt_seed_type, pt_seed_source, pt_mother_father_flag, pt_fungus_code_type, pt_breeding_materials, yes_no, pt_gen_unit } = toRefs<any>(proxy?.useDict('pt_seed_instore_type', 'pt_seed_type', 'pt_seed_source', 'pt_mother_father_flag', 'pt_fungus_code_type', 'pt_breeding_materials', 'yes_no', 'pt_gen_unit'));
 const paging = ref<any>(null);
 const form = ref<any>({});
 const did = ref('');

+ 2 - 2
src/plant/storage/seed-source/list/index.vue

@@ -53,7 +53,7 @@
                             <span class="c-#666">菌种/菌株编号:</span>
                             <span class="c-#333 f-w-500">{{ selectDictLabel(pt_fungus_code_type, item?.fungusCodeType) }}/{{ item?.fungusCode }}</span>
                         </view>
-                        <view class="pd2-4-0 f-s-28">
+                        <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>
@@ -66,7 +66,7 @@
                             <span class="c-#333 f-w-500">{{ item?.capacity }}{{ item?.unit }}</span>
                         </view>
                         <view class="d-flex">
-                            <view v-if="item?.restAmount" class="pd2-4-0 f-s-28 flex1">
+                            <view v-if="item?.inputAmount" class="pd2-4-0 f-s-28 flex1">
                                 <span class="c-#666">出库量:</span>
                                 <span class="c-#333 f-w-500">{{ item?.inputAmount || '0' }}{{ item?.unit }}</span>
                             </view>

+ 1 - 1
src/tools/species-info/models/info-card.vue

@@ -40,7 +40,7 @@
                 <span class="c-#333 f-w-500">{{ item?.capacity }}{{ item?.unit }}</span>
             </view>
             <view class="d-flex">
-                <view v-if="item?.restAmount" class="pd2-4-0 f-s-28 flex1">
+                <view v-if="item?.inputAmount" class="pd2-4-0 f-s-28 flex1">
                     <span class="c-#666">出库量:</span>
                     <span class="c-#333 f-w-500">{{ item?.inputAmount || '0' }}{{ item?.unit }}</span>
                 </view>