huangxw 1 vecka sedan
förälder
incheckning
9a608e760e

+ 4 - 4
src/assets/styles/uview-plus.scss

@@ -52,14 +52,14 @@ uni-button::after{
     }
 }
 :deep(.form-item-top-padding-0) {
-    >.u-form-item__body {
-        padding-top: 0rpx;
+    .u-form-item__body {
+        padding-top: 0rpx !important;
     }
 }
 
 :deep(.form-item-bottom-padding-0) {
-    >.u-form-item__body {
-        padding-bottom: 0rpx;
+    .u-form-item__body {
+        padding-bottom: 0rpx !important;
     }
 }
 .form-item-label_required {

+ 5 - 1
src/plant/models/warehouseCard/fresh-goods-card.vue

@@ -1,7 +1,7 @@
 <template>
     <view class="d-flex j-sb a-c li-item-head">
         <view class="li-left-tag" :class="{ [`bg-instore-${item?.instoreType}`]: true }">{{ selectDictLabel(pt_fresh_instore_type, item?.instoreType) }}</view>
-        <view class="f-s-22 c-#666 mr-30">{{ item?.instoreBizInfo?.instoreDate }}</view>
+        <view v-if="isInstoreDate" class="f-s-22 c-#666 mr-30">{{ item?.instoreBizInfo?.instoreDate }}</view>
     </view>
     <view class="pd-20">
         <view class="d-flex flex1 mb-10">
@@ -71,6 +71,10 @@ const props = defineProps({
         type: Object,
         default: () => ({}),
     },
+    isInstoreDate: {
+        type: Boolean,
+        default: true,
+    },
 });
 const { pt_fresh_instore_type } = toRefs<any>(props.dict);
 </script>

+ 40 - 33
src/plant/models/warehouseCard/medicine-card.vue

@@ -1,43 +1,46 @@
 <template>
-    <view class="d-flex j-sb a-c li-item-head mb-16">
+    <view class="d-flex j-sb a-c li-item-head">
         <view class="li-left-tag" :class="{ [`bg-instore-${item?.instoreBizInfo?.processType}`]: true }">{{ item?.seedLevel || '' }}{{ selectDictLabel(st_medicine_process_type, item?.instoreBizInfo?.processType) }}</view>
-        <view class="f-s-22 c-#666">{{ item?.instoreBizInfo?.instoreDate }}</view>
+        <view v-if="isInstoreDate" class="f-s-22 c-#666">{{ item?.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">{{ item?.variety }}</span>
-            <span v-if="item?.partName" class="f-s-24 c-#666">{{ item?.partName }}</span>
+    <view class="pd-20">
+        <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 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>
+                <view v-else class="tag-span c-danger bg-#F9ECEA">未检验</view>
+            </view>
         </view>
-        <view>
-            <view v-if="item?.examinReport?.length" class="tag-span c-primary bg-#EBF6EE">已检验</view>
-            <view v-else class="tag-span c-danger bg-#F9ECEA">未检验</view>
+        <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>
-    <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 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 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 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?.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 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 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?.restAmount" class="pd2-4-0 f-s-28 flex1">
-            <span class="c-danger">剩余量:</span>
-            <span class="c-danger f-w-500">{{ item?.restAmount || '0' }}{{ item?.unit }}</span>
+        <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?.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>
+            <view v-if="item?.restAmount" class="pd2-4-0 f-s-28 flex1">
+                <span class="c-danger">剩余量:</span>
+                <span class="c-danger f-w-500">{{ item?.restAmount || '0' }}{{ item?.unit }}</span>
+            </view>
+        </view>
+        <slot></slot>
     </view>
 </template>
 <script setup lang="ts" name="MedicineCard">
@@ -53,6 +56,10 @@ const props = defineProps({
         type: Object,
         default: () => ({}),
     },
+    isInstoreDate: {
+        type: Boolean,
+        default: true,
+    },
 });
 const { st_medicine_process_type } = toRefs<any>(props.dict);
 </script>

+ 29 - 0
src/plant/models/warehouseCard/object-card-storage.vue

@@ -0,0 +1,29 @@
+<template>
+    <template v-if="item.storageType === '2'">
+        <seed-source-card :item="item" :dict="{ pt_seed_instore_type, pt_seed_type, pt_fungus_code_type }" :isInstoreDate="isInstoreDate"></seed-source-card>
+    </template>
+    <template v-if="item.storageType === '4'">
+        <fresh-goods-card :item="item" :dict="{ pt_fresh_instore_type }" :isInstoreDate="isInstoreDate"></fresh-goods-card>
+    </template>
+    <template v-if="item.storageType === '5'">
+        <medicine-card :item="item" :dict="{ st_medicine_process_type }" :isInstoreDate="isInstoreDate"></medicine-card>
+    </template>
+</template>
+<script lang="ts" setup>
+import SeedSourceCard from '@/plant/models/warehouseCard/seed-source-card.vue';
+import FreshGoodsCard from '@/plant/models/warehouseCard/fresh-goods-card.vue';
+import MedicineCard from '@/plant/models/warehouseCard/medicine-card.vue';
+const { proxy } = getCurrentInstance() as ComponentInternalInstance;
+const { pt_seed_instore_type, pt_seed_type, pt_fungus_code_type, st_medicine_process_type, pt_fresh_instore_type } = toRefs<any>(proxy?.useDict('pt_seed_instore_type', 'pt_seed_type', 'pt_fungus_code_type', 'st_medicine_process_type', 'pt_fresh_instore_type') || {});
+const props = defineProps({
+    item: {
+        type: Object,
+        default: () => ({}),
+    },
+    isInstoreDate: {
+        type: Boolean,
+        default: false,
+    },
+});
+
+</script>

+ 5 - 1
src/plant/models/warehouseCard/seed-source-card.vue

@@ -1,7 +1,7 @@
 <template>
     <view class="d-flex j-sb a-c li-item-head">
         <view class="li-left-tag" :class="{ [`bg-instore-${item?.instoreType}`]: true }">{{ selectDictLabel(pt_seed_instore_type, item?.instoreType) }}</view>
-        <view class="f-s-22 c-#666 mr-24">{{ item?.instoreBizInfo?.instoreDate }}</view>
+        <view v-if="isInstoreDate" class="f-s-22 c-#666 mr-24">{{ item?.instoreBizInfo?.instoreDate }}</view>
     </view>
     <view class="pd-20">
         <view class="d-flex flex1 mb-10">
@@ -82,6 +82,10 @@ const props = defineProps({
         type: Object,
         default: () => ({}),
     },
+    isInstoreDate: {
+        type: Boolean,
+        default: true,
+    },
 });
 const { pt_seed_instore_type, pt_seed_type, pt_fungus_code_type } = toRefs<any>(props.dict);
 </script>

+ 26 - 2
src/plant/packaging/create/index.vue

@@ -12,7 +12,15 @@
                             <image class="w-36 h-36 mr-10" src="https://ta.zycpzs.cn/oss-file/smart-trace/szyy/images-plt/common/select_push_icon.png" mode="widthFix" />
                             <span>请选择您要包装的对象</span>
                         </up-button>
-                        <view v-else class="bg-#FBFDFB card-info-block pd-24 p-rtv"> </view>
+                        <view v-else class="bg-#FBFDFB card-info-block p-rtv border-#A9D7B4 b-radius">
+                            <ObjectCardStorage :item="form.stroeObject"></ObjectCardStorage>
+                               <view
+                                class="close-icon pd-16"
+                                @click="deleteStorage"
+                            >
+                                <up-icon color="#F81242" name="close" size="32rpx"></up-icon>
+                            </view>
+                        </view>
                     </view>
                 </up-form-item>
                 <view class="h-1" id="storageUseAmountpppp"></view>
@@ -151,6 +159,7 @@ import { useClientRequest } from '@/utils/request';
 import { formItemBtnStyle } from '@/assets/styles/uview-plus';
 import type { PackTaskForm } from './types';
 import NP from 'number-precision';
+import ObjectCardStorage from '@/plant/models/warehouseCard/object-card-storage.vue';
 const { proxy } = getCurrentInstance() as ComponentInternalInstance;
 const { pt_pack_ref_type, pt_pack_spec_unit, pt_expire_date_unit } = toRefs<any>(proxy?.useDict('pt_pack_ref_type', 'pt_pack_spec_unit', 'pt_expire_date_unit'));
 const upFormRef = ref();
@@ -282,6 +291,14 @@ const selectStorage = () => {
         },
     });
 };
+const deleteStorage = () => {
+    form.value.inputStorageId = '';
+    form.value.storageUseUnit = 'kg';
+    form.value.storageUseAmount = '';
+    form.value.capacity = '';
+    form.value.unit = '';
+    form.value.stroeObject = null;
+};
 // 计算属性分包结果
 const packResult = computed(() => {
     // 预计分包数 = 本次包装用量 / 包装规格,向上取整
@@ -312,4 +329,11 @@ const packResult = computed(() => {
 });
 onLoad((options: any) => {});
 </script>
-<style lang="scss" scoped></style>
+<style lang="scss" scoped>
+.close-icon {
+    position: absolute;
+    top: 0;
+    right: 0;
+    z-index: 1;
+}
+</style>

+ 1 - 1
src/plant/packaging/select-object/models/select-medicine-list.vue

@@ -22,7 +22,7 @@
         </view>
         <view class="pd-24 bg-#f7f7f7">
             <template v-for="(item, index) in list" :key="index">
-                <view class="b-radius bg-#fff pd-20 p-rtv mb-20 select-item-list"
+                <view class="b-radius bg-#fff p-rtv mb-20 select-item-list"
                     :class="{ active: item.id + '-' + item.storageType === checkedId }"
                     @click="emit('clickItem', item)">
                     <MedicineCard :item="item" :dict="{ st_medicine_process_type }"></MedicineCard>

+ 1 - 1
src/plant/storage/medicine/list/index.vue

@@ -29,7 +29,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">
+                    <view class="b-radius bg-#fff p-rtv">
                        <MedicineCard :item="item" :dict="{ st_medicine_process_type }"></MedicineCard>
                     </view>
                 </up-swipe-action-item>