lisy пре 1 недеља
родитељ
комит
69491d0b2c

+ 39 - 0
src/pages.json

@@ -391,6 +391,20 @@
                     "style": {
                     "style": {
                         "navigationBarTitleText": "成品详情"
                         "navigationBarTitleText": "成品详情"
                     }
                     }
+                },
+                // 修改成品信息,单条
+                {
+                    "path": "finished-product/info-update/index",
+                    "style": {
+                        "navigationBarTitleText": "修改成品信息"
+                    }
+                },
+                // 销售登记成功
+                {
+                    "path": "finished-product/sales-registration/index",
+                    "style": {
+                        "navigationBarTitleText": "销售登记成功"
+                    }
                 }
                 }
             ]
             ]
         },
         },
@@ -630,6 +644,13 @@
                         "navigationBarTitleText": "选择加工原料"
                         "navigationBarTitleText": "选择加工原料"
                     }
                     }
                 },
                 },
+                // 选择销售批次
+                {
+                    "path": "sales-registration/index",
+                    "style": {
+                        "navigationBarTitleText": "请选择要销售的批次"
+                    }
+                },
                 // 选择规格等级
                 // 选择规格等级
                 {
                 {
                     "path": "specification-level/index",
                     "path": "specification-level/index",
@@ -683,6 +704,24 @@
                     }
                     }
                 }
                 }
             ]
             ]
+        },
+        // 企业风采配置
+        {
+            "root": "plant/cor-style",
+            "pages": [
+                {
+                    "path": "index/index",
+                    "style": {
+                        "navigationBarTitleText": "企业风采配置"
+                    }
+                },
+                {
+                    "path": "create/index",
+                    "style": {
+                        "navigationBarTitleText": "新增企业风采配置"
+                    }
+                }
+            ]
         }
         }
     ],
     ],
     "tabBar": {
     "tabBar": {

+ 16 - 16
src/pages/plant/more/index.vue

@@ -7,23 +7,16 @@
             <view class="radius-16 bg-#fff pd-24 mb-16">
             <view class="radius-16 bg-#fff pd-24 mb-16">
                 <view class="mb-30 f-s-30 c-#333 f-w-500">码管理</view>
                 <view class="mb-30 f-s-30 c-#333 f-w-500">码管理</view>
                 <view class="d-flex flex-w gap-30 j-sb">
                 <view class="d-flex flex-w gap-30 j-sb">
-                    <view class="d-flex flex-cln j-c a-c pd-10" hover-class="bg-#f7f7f7"
-                        @click="$u.route({ url: '/plant/code/code-list/index' })">
-                        <image class="w-54 h-54 mb-16"
-                            src="https://ta.zycpzs.cn/oss-file/smart-trace/szyy/images-plt/plant/more/mag_code_icon.png"
-                            mode="widthFix" />
+                    <view class="d-flex flex-cln j-c a-c pd-10" hover-class="bg-#f7f7f7" @click="$u.route({ url: '/plant/code/code-list/index' })">
+                        <image class="w-54 h-54 mb-16" src="https://ta.zycpzs.cn/oss-file/smart-trace/szyy/images-plt/plant/more/mag_code_icon.png" mode="widthFix" />
                         <view class="f-s-26 c-#666">码生成及下载</view>
                         <view class="f-s-26 c-#666">码生成及下载</view>
                     </view>
                     </view>
                     <view class="d-flex flex-cln j-c a-c pd-10" hover-class="bg-#f7f7f7">
                     <view class="d-flex flex-cln j-c a-c pd-10" hover-class="bg-#f7f7f7">
-                        <image class="w-54 h-54 mb-16"
-                            src="https://ta.zycpzs.cn/oss-file/smart-trace/szyy/images-plt/plant/more/mag_trace_icon.png"
-                            mode="widthFix" />
+                        <image class="w-54 h-54 mb-16" src="https://ta.zycpzs.cn/oss-file/smart-trace/szyy/images-plt/plant/more/mag_trace_icon.png" mode="widthFix" />
                         <view class="f-s-26 c-#666">追溯码查询</view>
                         <view class="f-s-26 c-#666">追溯码查询</view>
                     </view>
                     </view>
                     <view class="d-flex flex-cln j-c a-c pd-10" hover-class="bg-#f7f7f7">
                     <view class="d-flex flex-cln j-c a-c pd-10" hover-class="bg-#f7f7f7">
-                        <image class="w-54 h-54 mb-16"
-                            src="https://ta.zycpzs.cn/oss-file/smart-trace/szyy/images-plt/plant/more/mag_relate_icon.png"
-                            mode="widthFix" />
+                        <image class="w-54 h-54 mb-16" src="https://ta.zycpzs.cn/oss-file/smart-trace/szyy/images-plt/plant/more/mag_relate_icon.png" mode="widthFix" />
                         <view class="f-s-26 c-#666">关联关系管理</view>
                         <view class="f-s-26 c-#666">关联关系管理</view>
                     </view>
                     </view>
                 </view>
                 </view>
@@ -31,15 +24,22 @@
             <view class="radius-16 bg-#fff pd-24 mb-16">
             <view class="radius-16 bg-#fff pd-24 mb-16">
                 <view class="mb-30 f-s-30 c-#333 f-w-500">往来单位管理</view>
                 <view class="mb-30 f-s-30 c-#333 f-w-500">往来单位管理</view>
                 <view class="d-flex flex-w gap-30">
                 <view class="d-flex flex-w gap-30">
-                    <view class="d-flex flex-cln j-c a-c pd-10" hover-class="bg-#f7f7f7"
-                        @click="$u.route({ url: '/plant/contact-unit/unit-list/index' })">
-                        <image class="w-54 h-54 mb-16"
-                            src="https://ta.zycpzs.cn/oss-file/smart-trace/szyy/images-plt/plant/more/mag_unit_icon.png"
-                            mode="widthFix" />
+                    <view class="d-flex flex-cln j-c a-c pd-10" hover-class="bg-#f7f7f7" @click="$u.route({ url: '/plant/contact-unit/unit-list/index' })">
+                        <image class="w-54 h-54 mb-16" src="https://ta.zycpzs.cn/oss-file/smart-trace/szyy/images-plt/plant/more/mag_unit_icon.png" mode="widthFix" />
                         <view class="f-s-26 c-#666">往来单位管理</view>
                         <view class="f-s-26 c-#666">往来单位管理</view>
                     </view>
                     </view>
                 </view>
                 </view>
             </view>
             </view>
+            <view class="radius-16 bg-#fff pd-24 mb-16">
+                <view class="mb-30 f-s-30 c-#333 f-w-500">H5 扫码页面管理</view>
+                <view class="d-flex flex-w gap-30">
+                    <view class="d-flex flex-cln j-c a-c pd-10" hover-class="bg-#f7f7f7" @click="$u.route({ url: '/plant/cor-style/index/index' })">
+                        <image class="w-54 h-54 mb-16" src="https://ta.zycpzs.cn/oss-file/smart-trace/szyy/images-plt/plant/more/corstyle-dis.png" mode="widthFix" />
+                        <view class="f-s-26 c-#666">企业风采展示</view>
+                        <view class="f-s-26 c-#666">配置</view>
+                    </view>
+                </view>
+            </view>
         </view>
         </view>
         <template #bottom>
         <template #bottom>
             <ut-tabar activeTab="more"></ut-tabar>
             <ut-tabar activeTab="more"></ut-tabar>

+ 172 - 0
src/plant/cor-style/create/index.vue

@@ -0,0 +1,172 @@
+<template>
+    <z-paging class="" ref="paging" bgColor="#f7f7f7" paging-class="paging-btm-shadow" scroll-with-animation>
+        <template #top>
+            <ut-navbar :title="'新增企业风采配置'" :fixed="false" border></ut-navbar>
+        </template>
+        <up-alert type="success" fontSize="24rpx" description="注意:授权后,将默认展示所有字段。想展示哪些字段填写哪些字段,不想展示的字段请勿填写!"></up-alert>
+        <up-form class="p-rtv" labelPosition="top" :model="form" :rules="rules" labelWidth="auto" ref="upFormRef">
+            <!-- 企业简介 -->
+            <view class="pd-24 bg-#fff">
+                <view>
+                    <up-form-item label="企业简介" prop="introduction">
+                        <up-textarea v-model="form.introduction" placeholder="请输入企业简介" :maxlength="400" autoHeight count></up-textarea>
+                    </up-form-item>
+                </view>
+                <!-- 企业荣誉/资质 -->
+                <view>
+                    <up-form-item label="企业荣誉/资质" prop="honors">
+                        <ut-upload v-model="form.honors" :max-count="50" valueType="array" accept="image"></ut-upload>
+                    </up-form-item>
+                </view>
+                <!-- 企业宣传图片及视频 -->
+                <view>
+                    <up-form-item label="企业宣传图片及视频" prop="imgs">
+                        <ut-upload v-model="form.imgs" :max-count="50" valueType="array" accept="image,video"></ut-upload>
+                    </up-form-item>
+                </view>
+                <!-- 企业联系电话 -->
+                <view>
+                    <up-form-item border-bottom label="企业联系电话" prop="tel">
+                        <up-input v-model="form.tel" placeholder="请输入企业联系电话" border="none" clearable></up-input>
+                    </up-form-item>
+                </view>
+            </view>
+
+            <view class="pd-24 bg-#fff">
+                <up-form-item label="授权设置" prop="showStatus" required>
+                    <up-radio-group v-model="form.showStatus" class="d-flex flex-cln">
+                        <view class="d-flex a-c mb-20">
+                            <up-radio name="1" shape="circle" activeColor="#37A954"></up-radio>
+                            <span class="f-s-28 c-666 ml-10">授权在追溯扫码页面展示</span>
+                        </view>
+                        <view class="d-flex a-c">
+                            <up-radio name="0" shape="circle" activeColor="#37A954"></up-radio>
+                            <span class="f-s-28 c-666 ml-10">暂不授权在追溯扫码页面展示</span>
+                        </view>
+                    </up-radio-group>
+                </up-form-item>
+            </view>
+        </up-form>
+        <template #bottom>
+            <view class="pd-20 d-flex">
+                <up-button @click="submitForm" type="primary" customStyle="width: 100%">保存</up-button>
+            </view>
+        </template>
+    </z-paging>
+</template>
+
+<script setup lang="ts">
+import { useClientRequest } from '@/utils/request';
+import { formItemBtnStyle } from '@/assets/styles/uview-plus';
+
+const { proxy } = getCurrentInstance() as ComponentInternalInstance;
+const upFormRef = ref<any>(null);
+const paging = ref<any>(null);
+
+// 表单数据
+const form = ref({
+    id: undefined as number | undefined,
+    introduction: '',
+    honors: [] as any[],
+    imgs: [] as any[],
+    tel: '',
+    showStatus: '1',
+});
+
+// 验证规则
+const rules = reactive({
+    showStatus: [{ required: true, message: '请选择展示授权状态' }],
+});
+
+// 提交表单
+const submitForm = async () => {
+    uni.$u.debounce(
+        async () => {
+            try {
+                await upFormRef.value?.validate();
+            } catch (error: any) {
+                const firstErrorField = error && error[0].prop + 'pppp';
+                paging.value?.scrollIntoViewById(firstErrorField, 30, true);
+                return;
+            }
+
+            uni.showLoading({
+                title: '提交中...',
+            });
+
+            // 构建提交参数
+            const params: any = {
+                ...form.value,
+            };
+
+            // 处理数组字段,提取 URL 字符串
+            try {
+                const res = await useClientRequest.post('/plt-api/app/CpyFeatures/addOrUpdate', params);
+                if (!res || res.code !== 200) return;
+
+                uni.hideLoading();
+                uni.showToast({
+                    title: '提交成功',
+                    icon: 'success',
+                });
+
+                // 返回上一页
+                setTimeout(() => {
+                    uni.navigateBack({
+                        delta: 1,
+                    });
+                }, 1500);
+            } catch (error) {
+                uni.hideLoading();
+            }
+        },
+        500,
+        true,
+    );
+};
+
+// 页面加载时检查是否有传入的 id(编辑模式)
+onLoad((options: any) => {
+    if (options.id) {
+        form.value.id = Number(options.id);
+        // 可以在这里加载详情数据
+        loadDetail(options.id);
+    }
+});
+
+// 加载详情数据
+const loadDetail = async (id: string) => {
+    uni.showLoading({
+        title: '加载中...',
+    });
+    try {
+        const res = await useClientRequest.get(`/plt-api/app/CpyFeatures/info`);
+        if (res && res.code === 200 && res.data) {
+            const data = res.data;
+            form.value = {
+                id: data.id,
+                introduction: data.introduction,
+                honors: data.honors,
+                imgs: data.imgs,
+                tel: data.tel,
+                showStatus: data.showStatus,
+            };
+            // 处理字符串类型的 URL 字段,转换为数组格式
+        }
+        uni.hideLoading();
+    } catch (error) {
+        uni.hideLoading();
+    }
+};
+</script>
+
+<style lang="scss" scoped>
+.startline-title {
+    font-size: 30rpx;
+    font-weight: 500;
+    color: #333;
+    padding-left: 12rpx;
+    border-left: 6rpx solid #37a954;
+    line-height: 1.5;
+}
+</style>

+ 135 - 0
src/plant/cor-style/index/index.vue

@@ -0,0 +1,135 @@
+<template>
+    <z-paging ref="paging" bgColor="#f7f7f7" safe-area-inset-bottom>
+        <template #top>
+            <ut-navbar title="企业风采配置" :fixed="false"></ut-navbar>
+        </template>
+
+        <!-- 无数据状态 -->
+        <view v-if="!hasData" class="d-flex flex-cln j-c a-c" style="min-height: 50vh">
+            <ut-empty text="企业暂未配置企业风采内容" width="300rpx" height="300rpx" />
+            <up-button type="primary" customStyle="width: 300rpx; height: 80rpx; border-radius: 16rpx;" @click="goToCreate"> 去配置 </up-button>
+        </view>
+        <!-- 有数据状态 -->
+        <template v-else>
+            <!-- 顶部提示条 -->
+            <up-alert type="success" fontSize="24rpx" description="注意:授权后,将默认展示所有字段。想展示哪些字段填写哪些字段,不想展示的字段请勿填写!"></up-alert>
+            <!-- 企业风采内容 -->
+            <view class="bg-#fff pd-24 mb-16">
+                <!-- 企业简介 -->
+                <view class="pb-16">
+                    <text class="c-#666 f-s-30">企业简介:</text>
+                </view>
+                <view class="pb-16 info-border-bottom">
+                    <text class="c-#333 f-s-28 f-w-4" style="line-height: 1.8">{{ form.introduction || '--' }}</text>
+                </view>
+                <!-- 企业荣誉/资质 -->
+                <view class="pt-16 pb-16 info-border-bottom">
+                    <view class="c-#666 f-s-30 pb-16">企业荣誉/资质:</view>
+                    <ut-album v-if="form?.honors.length > 0" :urls="form?.honors"></ut-album>
+                    <view v-else class="c-#999 f-s-30">--</view>
+                </view>
+                <!-- 企业宣传图片 -->
+                <view class="pt-16 pb-16 info-border-bottom">
+                    <view class="c-#666 f-s-30 pb-16">企业宣传图片:</view>
+                    <ut-album v-if="form?.imgs.length > 0" :urls="form?.imgs"></ut-album>
+                    <view v-else class="c-#999 f-s-30">--</view>
+                </view>
+                <!-- 企业联系电话 -->
+                <view class="pt-16 pb-16 info-border-bottom">
+                    <view class="c-#666 f-s-30">企业联系电话:</view>
+                    <view class="c-#333 f-s-30 f-w-5 ml-10">{{ form.tel || '--' }}</view>
+                </view>
+            </view>
+            <!-- 授权状态 -->
+            <view class="pt-16 pb-16">
+                <view v-if="form.showStatus === '1'" class="d-flex a-c ml-10">
+                    <up-icon name="checkmark-circle-fill" color="#37A954" size="40rpx"></up-icon>
+                    <text class="c-#333 f-s-28 f-w-5 ml-10">已授权在追溯扫码页面展示</text>
+                </view>
+                <view v-else class="d-flex a-c ml-10">
+                    <up-icon name="close-circle" color="#37A954" size="40rpx"></up-icon>
+                    <text class="c-#333 f-s-28 f-w-5 ml-10">暂不授权在追溯扫码页面展示</text>
+                </view>
+            </view>
+
+            <!-- 修改按钮 -->
+            <view class="d-flex j-c pt-32">
+                <up-button type="primary" class="b-radius w-300 h-80 f-s-32" @click="handleEdit">修改</up-button>
+            </view>
+        </template>
+    </z-paging>
+</template>
+
+<script setup lang="ts">
+import { ref, getCurrentInstance, type ComponentInternalInstance } from 'vue';
+import { useClientRequest } from '@/utils/request';
+
+const { proxy } = getCurrentInstance() as ComponentInternalInstance;
+
+// 表单数据
+const form = ref<any>({
+    id: '',
+    introduction: '',
+    honors: '',
+    imgs: '',
+    videos: '',
+    tel: '',
+    showStatus: '',
+});
+
+// 是否有数据
+const hasData = ref(false);
+// 获取详情
+const getInfo = async () => {
+    try {
+        const res = await useClientRequest.get('/plt-api/app/CpyFeatures/info');
+        if (res.code === 200 && res.data) {
+            const data = res.data;
+            form.value = {
+                id: data.id || '',
+                introduction: data.introduction || '',
+                honors: data.honors || '',
+                imgs: data.imgs || '',
+                videos: data.videos || '',
+                tel: data.tel || '',
+                showStatus: data.showStatus || '',
+            };
+            // 判断是否有数据(只要有简介或图片或视频就认为有数据)
+            hasData.value = !!(data.introduction || data.honors || data.imgs);
+        }
+    } catch (error) {
+        console.error('获取企业风采信息失败:', error);
+        uni.showToast({
+            title: '获取信息失败',
+            icon: 'none',
+        });
+    }
+};
+
+// 去新增
+const goToCreate = () => {
+    uni.$u.route({
+        type: 'navigateTo',
+        url: '/plant/cor-style/create/index',
+    });
+};
+onShow(() => {
+    getInfo();
+});
+// 修改
+const handleEdit = () => {
+    uni.$u.route({
+        type: 'navigateTo',
+        url: '/plant/cor-style/create/index',
+        params: {
+            id: form.value.id,
+        },
+    });
+};
+</script>
+
+<style scoped lang="scss">
+.info-border-bottom {
+    border-bottom: 1rpx solid #f0f0f0;
+}
+</style>

+ 62 - 38
src/plant/models/warehouseCard/product-item.vue

@@ -1,82 +1,96 @@
 <template>
 <template>
-    <view class="b-radius bg-#fff pd-20 p-rtv"
-        @click.stop="$u.route({ url: '/plant/storage/finished-product/detail/index', params: { id: item.id } })">
+    <view class="b-radius bg-#fff pd-20 p-rtv" @click.stop="handleClick">
         <!-- 顶部类型标签和日期 -->
         <!-- 顶部类型标签和日期 -->
         <view class="d-flex j-sb a-c li-item-head mb-16">
         <view class="d-flex j-sb a-c li-item-head mb-16">
-            <view :class="['li-left-tag', typeBgClass]">{{ typeName }}</view>
-            <view class="f-s-22 c-#666">{{ item?.packagingDate || '' }}</view>
+            <view :class="['li-left-tag', typeBgClass]">{{ selectDictLabel(pt_product_type, item.instoreBizInfo?.productType) }}</view>
+            <view class="f-s-22 c-#666">{{ item?.productDate || '' }}</view>
         </view>
         </view>
-
         <!-- 主标题和状态 -->
         <!-- 主标题和状态 -->
         <view class="d-flex flex1 mb-10">
         <view class="d-flex flex1 mb-10">
             <view class="flex1">
             <view class="flex1">
-                <span class="f-s-34 c-#333 f-w-500 mr-10">{{ item?.variety || '' }}</span>
-                <span v-if="item?.level || item?.partName" class="f-s-24 c-#666">{{
-                    (item?.level || '') + (item?.partName || '')
-                    }}</span>
+                <span class="f-s-34 c-#333 f-w-500 mr-10">{{ item?.instoreBizInfo?.proName || '' }}</span>
+                <span v-if="item?.instoreBizInfo?.proLevel" class="f-s-24 c-#666">
+                    {{ item?.instoreBizInfo?.proLevel }}
+                </span>
             </view>
             </view>
-            <view>
+            <view v-if="!props.hideExtraInfo">
                 <!-- 成品已检/未检状态标签 -->
                 <!-- 成品已检/未检状态标签 -->
                 <view v-if="item?.isInspected" class="tag-span c-primary bg-#EBF6EE">成品已检</view>
                 <view v-if="item?.isInspected" class="tag-span c-primary bg-#EBF6EE">成品已检</view>
                 <view v-else class="tag-span c-danger bg-#F9ECEA">成品未检</view>
                 <view v-else class="tag-span c-danger bg-#F9ECEA">成品未检</view>
             </view>
             </view>
         </view>
         </view>
-
+        <view class="" v-if="+item.instoreBizInfo?.productType == 6">
+            <span v-if="item?.instoreBizInfo?.finalSpecn" class="f-s-24 c-#666"> {{ item?.instoreBizInfo?.finalSpecn }}{{ item?.instoreBizInfo?.finalUnit }} </span>
+        </view>
         <!-- 详细信息 -->
         <!-- 详细信息 -->
         <view class="pd2-4-0 f-s-28 d-flex a-c">
         <view class="pd2-4-0 f-s-28 d-flex a-c">
             <span class="c-#666">成品批号:</span>
             <span class="c-#666">成品批号:</span>
-            <span class="c-#333 f-w-500 flex1">{{ item?.productBatchNo || '-' }}</span>
-            <up-icon name="arrow-right" size="24rpx" color="#333"></up-icon>
+            <span class="c-#333 f-w-500 flex1">{{ item?.batchCode || '-' }}</span>
+            <up-icon v-if="!props.hideExtraInfo" name="arrow-right" size="24rpx" color="#333"></up-icon>
         </view>
         </view>
 
 
         <view class="pd2-4-0 f-s-28">
         <view class="pd2-4-0 f-s-28">
             <span class="c-#666">包装批号:</span>
             <span class="c-#666">包装批号:</span>
-            <span class="c-#333 f-w-500">{{ item?.packagingBatchNo || '-' }}</span>
+            <span class="c-#333 f-w-500">{{ item?.instoreBizInfo?.packSn || '-' }}</span>
         </view>
         </view>
 
 
         <view class="pd2-4-0 f-s-28">
         <view class="pd2-4-0 f-s-28">
             <span class="c-#666">存放库房:</span>
             <span class="c-#666">存放库房:</span>
-            <span class="c-#333 f-w-500">{{ item?.warehouseInfo || '-' }}</span>
-        </view>
-
-        <view class="pd2-4-0 f-s-28">
-            <span class="c-#666">入库量:</span>
-            <span class="c-#333 f-w-500">{{ item?.instoreAmount || '' }}{{ item?.unit || '' }}</span>
+            <span class="c-#333 f-w-500">{{ getStorageRoomNames(item?.warehouses) || '-' }}</span>
         </view>
         </view>
-
-        <!-- 剩余量(可能有多个) -->
-        <view v-for="(rest, idx) in restAmountList" :key="idx" class="d-flex mt-10">
-            <view class="pd2-4-0 f-s-28 flex1">
-                <span class="c-danger">剩余量:</span>
-                <span class="c-danger f-w-500">{{ rest.amount || '' }}{{ rest.unit || '' }}</span>
+        <view class="d-flex">
+            <view class="pd2-4-0 f-s-28 d-flex w-50%">
+                <view class="c-#666 w-s-no">入库量:</view>
+                <view class="d-flex flex-cln">
+                    <span class="c-#333 f-w-500 d-flex a-c">{{ item?.specn }}*{{ item?.capacity }}{{ item?.unit }}</span>
+                    <span class="c-#333 f-w-500 d-flex a-c" v-if="+item?.restSpecn">{{ item?.restSpecn }}*{{ item?.capacity }}{{ item?.unit }}</span>
+                </view>
+            </view>
+            <view class="pd2-4-0 f-s-28 d-flex w-50%">
+                <span class="c-primary w-s-no">剩余量:</span>
+                <view class="d-flex flex-cln">
+                    <span class="c-primary f-w-500">{{ item?.specn }}*{{ item?.restAmount }}{{ item?.unit }}</span>
+                    <span class="c-primary f-w-500 d-flex a-c" v-if="+item?.restRestAmount">{{ item?.restSpecn }}*{{ item?.restRestAmount }}{{ item?.unit }}</span>
+                </view>
             </view>
             </view>
         </view>
         </view>
     </view>
     </view>
 </template>
 </template>
 
 
 <script setup lang="ts">
 <script setup lang="ts">
+import { getStorageRoomNames } from '@/utils/common';
+const { proxy } = getCurrentInstance() as ComponentInternalInstance;
+const { pt_product_type } = toRefs<any>(proxy?.useDict('pt_product_type'));
+
 interface RestAmountItem {
 interface RestAmountItem {
     amount?: string | number;
     amount?: string | number;
     unit?: string;
     unit?: string;
     packInfo?: string;
     packInfo?: string;
 }
 }
-
 const props = defineProps({
 const props = defineProps({
     item: {
     item: {
         type: Object as () => Record<string, any>,
         type: Object as () => Record<string, any>,
-        default: () => ({})
-    }
+        default: () => ({}),
+    },
+    jumpUrl: {
+        type: String,
+        default: '',
+    },
+    hideExtraInfo: {
+        type: Boolean,
+        default: false,
+    },
 });
 });
 
 
 const emit = defineEmits<{
 const emit = defineEmits<{
-    click: [value: typeof props.item]
+    click: [value: typeof props.item];
 }>();
 }>();
 
 
 // 类型名称映射(根据数据结构变化可调整)
 // 类型名称映射(根据数据结构变化可调整)
 const typeNameMap: Record<string, string> = {
 const typeNameMap: Record<string, string> = {
     '1': '药材',
     '1': '药材',
     '2': '鲜货',
     '2': '鲜货',
-    '3': '种源'
+    '3': '种源',
 };
 };
 
 
 const typeName = computed(() => {
 const typeName = computed(() => {
@@ -84,7 +98,7 @@ const typeName = computed(() => {
     return typeNameMap[type] || '药材';
     return typeNameMap[type] || '药材';
 });
 });
 
 
-const typeBgClass = computed(() => `bg-instore-${props.item?.instoreType || '1'}`);
+const typeBgClass = computed(() => `bg-instore-${props.item.instoreBizInfo?.productType}`);
 
 
 // 剩余量列表(数据结构待定,暂留空数组)
 // 剩余量列表(数据结构待定,暂留空数组)
 const restAmountList = computed<RestAmountItem[]>(() => {
 const restAmountList = computed<RestAmountItem[]>(() => {
@@ -94,6 +108,12 @@ const restAmountList = computed<RestAmountItem[]>(() => {
 });
 });
 
 
 const handleClick = () => {
 const handleClick = () => {
+    // 如果传入了 jumpUrl,则跳转到指定地址
+    if (props.jumpUrl) {
+        uni.navigateTo({
+            url: `${props.jumpUrl}?id=${encodeURIComponent(props.item?.id || '')}`,
+        });
+    }
     emit('click', props.item);
     emit('click', props.item);
 };
 };
 </script>
 </script>
@@ -119,19 +139,23 @@ const handleClick = () => {
 }
 }
 
 
 /* 类型标签背景色 */
 /* 类型标签背景色 */
-.bg-instore-1 {
-    background-color: #4CAF50;
+.bg-instore-2 {
+    background-color: #2289e0;
 }
 }
 
 
 /* 药材 - 绿色 */
 /* 药材 - 绿色 */
-.bg-instore-2 {
-    background-color: #FF9800;
+.bg-instore-4 {
+    background-color: #ff9800;
 }
 }
 
 
 /* 鲜货 - 橙色 */
 /* 鲜货 - 橙色 */
-.bg-instore-3 {
-    background-color: #2196F3;
+.bg-instore-5 {
+    background-color: #1ebddc;
 }
 }
 
 
 /* 种源 - 蓝色 */
 /* 种源 - 蓝色 */
+
+.bg-instore-6 {
+    background-color: #ebf6ee;
+}
 </style>
 </style>

+ 24 - 56
src/plant/processing/processing-index/index.vue

@@ -6,12 +6,10 @@
         <template>
         <template>
             <view class="d-flex a-c pd-24 pb-0 bg-#f7f7f7">
             <view class="d-flex a-c pd-24 pb-0 bg-#f7f7f7">
                 <view class="min-w-220 flex1">
                 <view class="min-w-220 flex1">
-                    <ut-action-sheet v-model="form.processType" :tabs="[{ label: '全部', value: '' }, ...pt_process_type]"
-                        @change="onRefresh" title="选择原料类型">
+                    <ut-action-sheet v-model="form.processType" :tabs="[{ label: '全部', value: '' }, ...pt_process_type]" @change="onRefresh" title="选择原料类型">
                         <view class="d-flex search-select-item a-c">
                         <view class="d-flex search-select-item a-c">
                             <view class="flex1 ov-hd f-s-28 c-333 text-center f-w-5 w-s-no d-flex a-c j-c">
                             <view class="flex1 ov-hd f-s-28 c-333 text-center f-w-5 w-s-no d-flex a-c j-c">
-                                <view class="w-s-no">{{ selectDictLabel(pt_process_type, form.processType) || '全部' }}
-                                </view>
+                                <view class="w-s-no">{{ selectDictLabel(pt_process_type, form.processType) || '全部' }} </view>
                                 <template v-for="(item, index) in processCountList" :key="index">
                                 <template v-for="(item, index) in processCountList" :key="index">
                                     <view class="" v-if="form.processType == item?.type">({{ item?.num }})</view>
                                     <view class="" v-if="form.processType == item?.type">({{ item?.num }})</view>
                                 </template>
                                 </template>
@@ -21,42 +19,26 @@
                     </ut-action-sheet>
                     </ut-action-sheet>
                 </view>
                 </view>
                 <view class="h-86 pl-20 w-100%">
                 <view class="h-86 pl-20 w-100%">
-                    <ut-search ref="searchRef" v-model="form.keyword" @search="changeSeach" @change="changeSeach"
-                        margin="0" :border="false" placeholder="搜药材名、批号" bgColor="#fff" height="86rpx"
-                        borderRadius="10rpx"></ut-search>
+                    <ut-search ref="searchRef" v-model="form.keyword" @search="changeSeach" @change="changeSeach" margin="0" :border="false" placeholder="搜药材名、批号" bgColor="#fff" height="86rpx" borderRadius="10rpx"></ut-search>
                 </view>
                 </view>
             </view>
             </view>
             <view class="pd-24">
             <view class="pd-24">
                 <up-swipe-action>
                 <up-swipe-action>
-                    <up-swipe-action-item v-for="(item, index) in list" :key="index" :name="item?.id"
-                        :options="swipeOptions" class="mb-16" @click="handleSwipeClick">
+                    <up-swipe-action-item v-for="(item, index) in list" :key="index" :name="item?.id" :options="swipeOptions" class="mb-16" @click="handleSwipeClick">
                         <template #default>
                         <template #default>
                             <view class="bg-#fff b-radius pd-24 p-rtv">
                             <view class="bg-#fff b-radius pd-24 p-rtv">
-                                <view v-if="+item?.processType == 1 && +item?.processMedType == 1"
-                                    class="bg-#91C747 c-#fff f-w-5 pd-10 pt-4 pb-4 f-s-20"
-                                    style="border-radius: 16rpx 0 16rpx 0; width: max-content; position: absolute; top: 0rpx; left: 0rpx">
-                                    种子初加工</view>
-                                <view v-if="+item?.processType == 1 && +item?.processMedType == 2"
-                                    class="bg-#C7A262 c-#fff f-w-5 pd-10 pt-4 pb-4 f-s-20"
-                                    style="border-radius: 16rpx 0 16rpx 0; width: max-content; position: absolute; top: 0rpx; left: 0rpx">
-                                    药材初加工</view>
-                                <view v-if="+item?.processType == 2"
-                                    class="bg-#37A954 c-#fff f-w-5 pd-10 pt-4 pb-4 f-s-20"
-                                    style="border-radius: 16rpx 0 16rpx 0; width: max-content; position: absolute; top: 0rpx; left: 0rpx">
-                                    趁鲜切制</view>
+                                <view v-if="+item?.processType == 1 && +item?.processMedType == 1" class="bg-#91C747 c-#fff f-w-5 pd-10 pt-4 pb-4 f-s-20" style="border-radius: 16rpx 0 16rpx 0; width: max-content; position: absolute; top: 0rpx; left: 0rpx"> 种子初加工</view>
+                                <view v-if="+item?.processType == 1 && +item?.processMedType == 2" class="bg-#C7A262 c-#fff f-w-5 pd-10 pt-4 pb-4 f-s-20" style="border-radius: 16rpx 0 16rpx 0; width: max-content; position: absolute; top: 0rpx; left: 0rpx"> 药材初加工</view>
+                                <view v-if="+item?.processType == 2" class="bg-#37A954 c-#fff f-w-5 pd-10 pt-4 pb-4 f-s-20" style="border-radius: 16rpx 0 16rpx 0; width: max-content; position: absolute; top: 0rpx; left: 0rpx"> 趁鲜切制</view>
                                 <view v-if="item?.processingDate || item?.processingDateEnd" class="d-flex a-c j-ed">
                                 <view v-if="item?.processingDate || item?.processingDateEnd" class="d-flex a-c j-ed">
-                                    <view class="c-#999 f-s-24">{{ item?.processingDate }} 至 {{ item?.processingDateEnd
-                                        }}</view>
+                                    <view class="c-#999 f-s-24">{{ item?.processingDate }} 至 {{ item?.processingDateEnd }}</view>
                                 </view>
                                 </view>
                                 <view class="" @click="gotodetaillist(item)">
                                 <view class="" @click="gotodetaillist(item)">
                                     <view class="mb-10 d-flex a-c">
                                     <view class="mb-10 d-flex a-c">
                                         <view class="">
                                         <view class="">
-                                            <span v-if="item?.variety" class="f-s-34 c-#333 f-w-500 mr-10">{{
-                                                item?.variety }}</span>
-                                            <span v-else class="f-s-34 c-#333 f-w-500 mr-10">{{ item?.medicineName
-                                                }}(鲜制)</span>
-                                            <span class="f-s-24 c-#666" v-if="+item?.processMedType == 1">{{
-                                                selectDictLabel(pt_stock_type, item?.processMedType) }}</span>
+                                            <span v-if="item?.variety" class="f-s-34 c-#333 f-w-500 mr-10">{{ item?.variety }}</span>
+                                            <span v-else class="f-s-34 c-#333 f-w-500 mr-10">{{ item?.medicineName }}(鲜制)</span>
+                                            <span class="f-s-24 c-#666" v-if="+item?.processMedType == 1">{{ selectDictLabel(pt_stock_type, item?.processMedType) }}</span>
                                         </view>
                                         </view>
                                         <view class="flex1"></view>
                                         <view class="flex1"></view>
                                         <up-icon name="arrow-right" size="26rpx"></up-icon>
                                         <up-icon name="arrow-right" size="26rpx"></up-icon>
@@ -67,22 +49,18 @@
                                     </view>
                                     </view>
                                     <view v-if="+item?.processType == 1" class="pd2-4-0 f-s-28">
                                     <view v-if="+item?.processType == 1" class="pd2-4-0 f-s-28">
                                         <span class="c-#666">执行标准:</span>
                                         <span class="c-#666">执行标准:</span>
-                                        <span class="c-#333 f-w-500">{{ selectDictLabel(pt_standard_type,
-                                            item?.standardType) }}</span>
-                                        <span class="c-#666" v-if="item?.standardDetailName">({{
-                                            item?.standardDetailName }})</span>
+                                        <span class="c-#333 f-w-500">{{ selectDictLabel(pt_standard_type, item?.standardType) }}</span>
+                                        <span class="c-#666" v-if="item?.standardDetailName">({{ item?.standardDetailName }})</span>
                                     </view>
                                     </view>
                                     <view v-else class="pd2-4-0 f-s-28">
                                     <view v-else class="pd2-4-0 f-s-28">
                                         <span class="c-#666">执行标准:</span>
                                         <span class="c-#666">执行标准:</span>
-                                        <span class="c-#666" v-if="item?.standardDetailName">{{ item?.standardDetailName
-                                            }}</span>
+                                        <span class="c-#666" v-if="item?.standardDetailName">{{ item?.standardDetailName }}</span>
                                     </view>
                                     </view>
                                     <view class="pd2-4-0 f-s-28">
                                     <view class="pd2-4-0 f-s-28">
                                         <span class="c-#666">加工工艺:</span>
                                         <span class="c-#666">加工工艺:</span>
-                                        <template v-for="(items, indexs) in item?.ptech?.split(',')" v-if="item?.ptech"
-                                            :key="indexs">
+                                        <template v-for="(items, indexs) in item?.ptech?.split(',')" v-if="item?.ptech" :key="indexs">
                                             <span v-if="indexs !== 0" class="c-#999 f-s-32 ml-10 mr-10">→ </span>
                                             <span v-if="indexs !== 0" class="c-#999 f-s-32 ml-10 mr-10">→ </span>
-                                            <span class="f-s-32">{{ items }}</span>
+                                            <span class="f-s-28">{{ items }}</span>
                                         </template>
                                         </template>
                                         <template v-else>
                                         <template v-else>
                                             <span class="c-#999 f-s-32">-</span>
                                             <span class="c-#999 f-s-32">-</span>
@@ -102,8 +80,7 @@
         </template>
         </template>
         <template #empty>
         <template #empty>
             <view class="d-flex flex-cln a-c">
             <view class="d-flex flex-cln a-c">
-                <ut-empty class="mg-at" color="#ccc" size="28rpx"
-                    image="https://ta.zycpzs.cn/oss-file/smart-trace/szyy/images-plt/plant/noEmptyBase.png">暂无加工任务</ut-empty>
+                <ut-empty class="mg-at" color="#ccc" size="28rpx" image="https://ta.zycpzs.cn/oss-file/smart-trace/szyy/images-plt/plant/noEmptyBase.png">暂无加工任务</ut-empty>
                 <text class="c-#ccc f-s-28">点击下方按钮去添加吧~</text>
                 <text class="c-#ccc f-s-28">点击下方按钮去添加吧~</text>
             </view>
             </view>
         </template>
         </template>
@@ -111,33 +88,24 @@
             <ut-tabar activeTab="processing"></ut-tabar>
             <ut-tabar activeTab="processing"></ut-tabar>
         </template>
         </template>
     </z-paging>
     </z-paging>
-    <ut-suspension v-if="sus?.left" :imageWidth="60" :imageHeight="60" :x="sus?.left" :y="sus?.bottom" :inertia="false"
-        :snap-threshold="40">
-        <image src="https://ta.zycpzs.cn/oss-file/smart-trace/szyy/images-plt/common/btn_add_logo.png" mode="widthFix"
-            class="w-120 h-120" @click="showDeleteDialog = true"></image>
+    <ut-suspension v-if="sus?.left" :imageWidth="60" :imageHeight="60" :x="sus?.left" :y="sus?.bottom" :inertia="false" :snap-threshold="40">
+        <image src="https://ta.zycpzs.cn/oss-file/smart-trace/szyy/images-plt/common/btn_add_logo.png" mode="widthFix" class="w-120 h-120" @click="showDeleteDialog = true"></image>
     </ut-suspension>
     </ut-suspension>
-    <ut-confirm-dialog v-model:show="showDeleteDialog" width="80vw" title="请选择要创建的任务类型" :confirmText="'确认选择'"
-        :cancelText="'取消'" @confirm="handlechoseConfirm" @cancel="handleDeleteCancel">
+    <ut-confirm-dialog v-model:show="showDeleteDialog" width="80vw" title="请选择要创建的任务类型" :confirmText="'确认选择'" :cancelText="'取消'" @confirm="handlechoseConfirm" @cancel="handleDeleteCancel">
         <view class="" v-for="item in pt_process_type" :key="item?.value">
         <view class="" v-for="item in pt_process_type" :key="item?.value">
-            <view style="border: 1rpx solid"
-                :style="{ backgroundColor: item?.value == basetype ? '#EBF6EE' : '#f7f7f7', borderColor: item?.value == basetype ? '#37A954' : 'transparent' }"
-                class="pr-30 d-flex a-c mb-20 radius-100" @click="handlechose(item.value)">
+            <view style="border: 1rpx solid" :style="{ backgroundColor: item?.value == basetype ? '#EBF6EE' : '#f7f7f7', borderColor: item?.value == basetype ? '#37A954' : 'transparent' }" class="pr-30 d-flex a-c mb-20 radius-100" @click="handlechose(item.value)">
                 <view class="radius-50% mg-8 bg-#F0F0F0" v-if="item?.value == '1'">
                 <view class="radius-50% mg-8 bg-#F0F0F0" v-if="item?.value == '1'">
-                    <up-avatar size="90rpx"
-                        src="https://ta.zycpzs.cn/oss-file/smart-trace/szyy/images-plt/plant/processing/processType_initial.png"></up-avatar>
+                    <up-avatar size="90rpx" src="https://ta.zycpzs.cn/oss-file/smart-trace/szyy/images-plt/plant/processing/processType_initial.png"></up-avatar>
                 </view>
                 </view>
                 <view class="radius-50% mg-8 bg-#F0F0F0" v-if="item?.value == '2'">
                 <view class="radius-50% mg-8 bg-#F0F0F0" v-if="item?.value == '2'">
-                    <up-avatar size="90rpx"
-                        src="https://ta.zycpzs.cn/oss-file/smart-trace/szyy/images-plt/plant/processing/processType_fresh.png"></up-avatar>
+                    <up-avatar size="90rpx" src="https://ta.zycpzs.cn/oss-file/smart-trace/szyy/images-plt/plant/processing/processType_fresh.png"></up-avatar>
                 </view>
                 </view>
                 <view class="c-#333 f-s-34">
                 <view class="c-#333 f-s-34">
                     {{ item?.label }}
                     {{ item?.label }}
                 </view>
                 </view>
                 <view class="flex1"></view>
                 <view class="flex1"></view>
                 <view class="d-flex">
                 <view class="d-flex">
-                    <img v-if="basetype === item.value" class="w-30 h-30"
-                        src="https://ta.zycpzs.cn/oss-file/smart-trace/szyy/images-plt/plant/chooseSuccessfully.png"
-                        mode="widthFix" alt="" />
+                    <img v-if="basetype === item.value" class="w-30 h-30" src="https://ta.zycpzs.cn/oss-file/smart-trace/szyy/images-plt/plant/chooseSuccessfully.png" mode="widthFix" alt="" />
                 </view>
                 </view>
             </view>
             </view>
         </view>
         </view>

+ 9 - 5
src/plant/processing/processing-index/models/output.vue

@@ -51,10 +51,12 @@
         <view class="bg-#F6FAFE flex1 f-s-22 pd-16" v-else>
         <view class="bg-#F6FAFE flex1 f-s-22 pd-16" v-else>
             <view v-for="(item, index) in outputList" :key="item?.id || index" class="mb-6">
             <view v-for="(item, index) in outputList" :key="item?.id || index" class="mb-6">
                 <ut-row gap="10rpx">
                 <ut-row gap="10rpx">
-                    <ut-col class="d-flex a-c c-#666" :span="2">{{ String(Number(index) + 1).padStart(2, '0') }}</ut-col>
+                    <ut-col class="d-flex a-c c-#666" :span="2">{{ String(Number(index) + 1).padStart(2, '0')
+                        }}</ut-col>
                     <ut-col class="d-flex flex-cln j-c" :span="8">
                     <ut-col class="d-flex flex-cln j-c" :span="8">
                         <span class="c-#666">{{ item?.specnLevel }}</span>
                         <span class="c-#666">{{ item?.specnLevel }}</span>
-                        <span class="c-#999">{{ item?.finalSpecn }}{{ item?.finalUnit }}{{ selectDictLabel(pt_final_form_type, item?.finalFormType) }}</span>
+                        <span class="c-#999">{{ item?.finalSpecn }}{{ item?.finalUnit }}{{
+                            selectDictLabel(pt_final_form_type, item?.finalFormType) }}</span>
                     </ut-col>
                     </ut-col>
                     <ut-col class="d-flex a-c c-#666" :span="8">{{ item?.capacity }}{{ item?.unit }}</ut-col>
                     <ut-col class="d-flex a-c c-#666" :span="8">{{ item?.capacity }}{{ item?.unit }}</ut-col>
                     <ut-col class="d-flex a-c" :span="3">
                     <ut-col class="d-flex a-c" :span="3">
@@ -68,7 +70,8 @@
                     </ut-col>
                     </ut-col>
                 </ut-row>
                 </ut-row>
             </view>
             </view>
-            <view class="d-flex a-c j-c pd-16 radius-10" style="border: 1rpx dashed #2289e0" @click.stop="handleShowOutputModel">
+            <view class="d-flex a-c j-c pd-16 radius-10" style="border: 1rpx dashed #2289e0"
+                @click.stop="handleShowOutputModel">
                 <up-icon name="plus" size="26rpx" color="#2289E0"></up-icon>
                 <up-icon name="plus" size="26rpx" color="#2289E0"></up-icon>
                 <span class="c-#2289E0 f-s-26">添加产出物</span>
                 <span class="c-#2289E0 f-s-26">添加产出物</span>
             </view>
             </view>
@@ -76,7 +79,8 @@
     </view>
     </view>
     <!-- 添加/修改产出信息弹框 -->
     <!-- 添加/修改产出信息弹框 -->
     <root-portal>
     <root-portal>
-        <OutputInfo v-if="showOutputModel" v-model:show="showOutputModel" :type="processType" :processId="processId" :isEdit="isEditOutput" :editData="editOutputData" @confirm="handleOutputConfirm" />
+        <OutputInfo v-if="showOutputModel" v-model:show="showOutputModel" :type="processType" :processId="processId"
+            :isEdit="isEditOutput" :editData="editOutputData" @confirm="handleOutputConfirm" />
     </root-portal>
     </root-portal>
 </template>
 </template>
 <script setup lang="ts">
 <script setup lang="ts">
@@ -120,7 +124,7 @@ const goAssociate = () => {
     uni.$u.route({
     uni.$u.route({
         type: 'navigateTo',
         type: 'navigateTo',
         url: '/tools/species-info-process/index',
         url: '/tools/species-info-process/index',
-        params: { id: props?.data?.id, processMedType: props?.data?.processMedType },
+        params: { id: props?.data?.id, processMedType: props?.data?.processMedType, medicineCode: props?.data?.medicineCode, varietyId: props?.data?.varietyId },
     });
     });
 };
 };
 const gotodetaillist = (id: any) => {
 const gotodetaillist = (id: any) => {

+ 92 - 131
src/plant/storage/finished-product/detail/index.vue

@@ -1,10 +1,8 @@
 <template>
 <template>
-    <z-paging ref="paging" bgColor="#F7F7F7" safe-area-inset-bottom paging-class="paging-btm-shadow"
-        scroll-with-animation>
+    <z-paging ref="paging" bgColor="#F7F7F7" safe-area-inset-bottom paging-class="paging-btm-shadow" scroll-with-animation>
         <template #top>
         <template #top>
             <ut-navbar title="成品详情" :fixed="false" border></ut-navbar>
             <ut-navbar title="成品详情" :fixed="false" border></ut-navbar>
         </template>
         </template>
-
         <template>
         <template>
             <view class="pd-24 d-flex a-c">
             <view class="pd-24 d-flex a-c">
                 <view class="flex1 ov-hd">
                 <view class="flex1 ov-hd">
@@ -12,68 +10,61 @@
                 </view>
                 </view>
                 <view>
                 <view>
                     <up-button @click="navigateToInOutRecords" type="primary" :customStyle="formItemBtnStyle">
                     <up-button @click="navigateToInOutRecords" type="primary" :customStyle="formItemBtnStyle">
-                        <image class="w-30 h-30 mr-10"
-                            src="https://ta.zycpzs.cn/oss-file/smart-trace/szyy/images-plt/plant/storage/ckcrkjl_icon.png"
-                            mode="widthFix" />
+                        <image class="w-30 h-30 mr-10" src="https://ta.zycpzs.cn/oss-file/smart-trace/szyy/images-plt/plant/storage/ckcrkjl_icon.png" mode="widthFix" />
                         <span>查看出入库记录</span>
                         <span>查看出入库记录</span>
                     </up-button>
                     </up-button>
                 </view>
                 </view>
             </view>
             </view>
-            <view class="bg-#fff pd-24">
+            <!-- 卡片顶部 -->
+            <view class="b-radius bg-#fff pd-20 p-rtv">
+                <!-- 顶部类型标签和日期 -->
                 <view class="d-flex j-sb a-c li-item-head mb-16">
                 <view class="d-flex j-sb a-c li-item-head mb-16">
-                    <view class="li-left-tag" :class="{ [`bg-instore-${form?.instoreType}`]: true }">{{
-                        selectDictLabel(pt_seed_instore_type, form?.instoreType) }}</view>
-                    <view class="f-s-22 c-#666">{{ form?.instoreBizInfo?.instoreDate }}</view>
-                </view>
-                <view class="mb-10">
-                    <span class="f-s-34 c-#333 f-w-500 mr-10">{{ form?.variety }}</span>
-                    <span v-if="form?.partName" class="f-s-24 c-#666">{{ form?.level || '' }}{{ form?.partName }}</span>
+                    <view :class="['li-left-tag', typeBgClass]">{{ selectDictLabel(pt_product_type, form?.instoreBizInfo?.productType) }}</view>
+                    <view class="f-s-22 c-#666">{{ form?.productDate || '' }}包装</view>
                 </view>
                 </view>
-                <template v-if="form?.instoreType == '2'">
-                    <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="form?.supplierId" class="pd2-4-0 f-s-28">
-                        <span class="c-#666">供应商:</span>
-                        <span class="c-#333 f-w-500">{{ form?.supplierInfo?.cusName || '-' }}</span>
-                    </view>
-                </template>
-                <template v-if="form?.instoreType == '3'">
-                    <view class="pd2-4-0 f-s-28">
-                        <span class="c-#666">采收批号:</span>
-                        <span class="c-#333 f-w-500">{{ form?.harvestInfo?.harvestCode || '-' }}</span>
-                    </view>
-                    <view class="pd2-4-0 f-s-28">
-                        <span class="c-#666">采收基地:</span>
-                        <span class="c-#333 f-w-500">
-                            {{ form?.harvestInfo?.baseInfo?.baseName || '-' }}
+                <!-- 主标题和状态 -->
+                <view class="d-flex flex1 mb-10">
+                    <view class="flex1">
+                        <span class="f-s-34 c-#333 f-w-500 mr-10">{{ form?.instoreBizInfo?.proName }}</span>
+                        <span v-if="form?.instoreBizInfo?.proLevel" class="f-s-24 c-#666">
+                            {{ form?.instoreBizInfo?.proLevel }}
                         </span>
                         </span>
                     </view>
                     </view>
-                </template>
-                <view v-if="form?.warehouses?.length" class="pd2-4-0 f-s-28">
-                    <span class="c-#666">存放库房:</span>
-                    <span class="c-#333 f-w-500">{{ getStorageRoomNames(form?.warehouses) || '-' }}</span>
                 </view>
                 </view>
+                <view class="" v-if="+form.instoreBizInfo?.productType == 6">
+                    <span v-if="form?.instoreBizInfo?.finalSpecn" class="f-s-24 c-#666"> {{ form?.instoreBizInfo?.finalSpecn }}{{ form?.instoreBizInfo?.finalUnit }} </span>
+                </view>
+                <!-- 详细信息 -->
+                <view class="pd2-4-0 f-s-28 d-flex a-c">
+                    <span class="c-#666">成品批号:</span>
+                    <span class="c-#333 f-w-500 flex1">{{ form?.batchCode || '-' }}</span>
+                </view>
+
+                <view class="pd2-4-0 f-s-28">
+                    <span class="c-#666">包装批号:</span>
+                    <span class="c-#333 f-w-500">{{ form?.instoreBizInfo?.packSn || '-' }}</span>
+                </view>
+
                 <view class="pd2-4-0 f-s-28">
                 <view class="pd2-4-0 f-s-28">
-                    <span class="c-#666">入库量:</span>
-                    <span class="c-#333 f-w-500">{{ form?.capacity }}{{ form?.unit }}</span>
+                    <span class="c-#666">存放库房:</span>
+                    <span class="c-#333 f-w-500">{{ getStorageRoomNames(form?.warehouses) || '-' }}</span>
                 </view>
                 </view>
                 <view class="d-flex">
                 <view class="d-flex">
-                    <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 class="pd2-4-0 f-s-28 d-flex w-50%">
+                        <view class="c-#666 w-s-no">入库量:</view>
+                        <view class="d-flex flex-cln">
+                            <span class="c-#333 f-w-500 d-flex a-c">{{ form?.specn }}*{{ form?.capacity }}{{ form?.unit }}</span>
+                            <span class="c-#333 f-w-500 d-flex a-c" v-if="form?.restSpecn">{{ form?.restSpecn }}*{{ form?.capacity }}{{ form?.unit }}</span>
+                        </view>
                     </view>
                     </view>
-                    <view v-if="form?.restAmount" class="pd2-4-0 f-s-28 flex1">
-                        <span class="c-primary">剩余量:</span>
-                        <span class="c-primary f-w-500">{{ form?.restAmount || '0' }}{{ form?.unit }}</span>
+                    <view class="pd2-4-0 f-s-28 w-50% d-flex">
+                        <span class="c-primary w-s-no">剩余量:</span>
+                        <view class="d-flex flex-cln">
+                            <span class="c-primary f-w-500">{{ form?.specn }}*{{ form?.restAmount }}{{ form?.unit }}</span>
+                            <span class="c-primary f-w-500 d-flex a-c" v-if="form?.restRestAmount">{{ form?.restSpecn }}*{{ form?.restRestAmount }}{{ form?.unit }}</span>
+                        </view>
                     </view>
                     </view>
                 </view>
                 </view>
-                <view v-if="+form?.restAmount" class="pd3-20-40-0">
-                    <up-button @click="navigateToInventoryLoss" type="warning" plain
-                        :customStyle="{ background: '#FFF9EF', borderColor: '#F9D9A3' }">库存有消耗?库存损耗登记{{ '>'
-                        }}</up-button>
-                </view>
             </view>
             </view>
             <view class="pd-24">
             <view class="pd-24">
                 <view class="startline-title">成品信息</view>
                 <view class="startline-title">成品信息</view>
@@ -81,44 +72,26 @@
             <view class="bg-#fff pd-24">
             <view class="bg-#fff pd-24">
                 <!-- 成品信息详情 -->
                 <!-- 成品信息详情 -->
                 <view class="f-s-30 pd2-16-0 info-border-bottom">
                 <view class="f-s-30 pd2-16-0 info-border-bottom">
-                    <view class="c-#666 mb-10">动植物名称:</view>
-                    <view v-if="form?.varietyInfo" class="bg-#FBFDFB card-info-block pd-24 p-rtv">
-                        <view class="mb-10">
-                            <span class="f-s-34 c-#333 f-w-5 mr-16">{{ form?.varietyInfo?.varietyName || '-' }}</span>
-                            <span class="f-s-24 c-#666">{{ form?.varietyInfo?.latinName || '' }}</span>
-                        </view>
-                        <view class="mb-10">
-                            <span class="f-s-28 c-#333 f-w-5 mr-16">{{ form?.varietyInfo?.genusName || '' }}</span>
-                            <span class="f-s-24 c-#666">{{ form?.varietyInfo?.genusLatinName || '' }}</span>
-                        </view>
-                        <view class="f-s-24 c-#666" v-if="form?.varietyInfo?.medicineName">产出:{{
-                            form?.varietyInfo?.medicineName }}
-                        </view>
-                    </view>
-                    <view v-else class="c-#333 f-w-600">{{ form?.variety || '-' }}</view>
+                    <span class="c-#666">成品批号:</span>
+                    <span class="c-#333 f-w-500 flex1">{{ form?.batchCode || '-' }}</span>
                 </view>
                 </view>
 
 
                 <view class="f-s-30 pd2-16-0 info-border-bottom">
                 <view class="f-s-30 pd2-16-0 info-border-bottom">
-                    <span class="c-#666">药用部位/对象:</span>
-                    <span class="c-#333 f-w-600">{{ form?.partName || form?.part || '-' }}</span>
+                    <span class="c-#666">包装批号:</span>
+                    <span class="c-#333 f-w-500">{{ form?.instoreBizInfo?.packSn || '-' }}</span>
                 </view>
                 </view>
 
 
-                <view class="f-s-30 pd2-16-0 info-border-bottom">
-                    <span class="c-#666">鲜货来源:</span>
-                    <span class="c-#333 f-w-600">{{ selectDictLabel(pt_medicine_source_tag, form?.sourceType) || '-'
-                    }}</span>
-                </view>
-
-                <view class="f-s-30 pd2-16-0 info-border-bottom">
-                    <span class="c-#666">入库量:</span>
-                    <span class="c-#333 f-w-600">{{ form?.capacity || '-' }}{{ selectDictLabel(pt_medicine_unit,
-                        form?.unit) ||
-                        form?.unit || '' }}</span>
+                <view class="f-s-30 pd2-16-0 info-border-bottom d-flex">
+                    <view class="c-#666 w-s-no">入库量:</view>
+                    <view class="d-flex flex-cln">
+                        <span class="c-#333 f-w-500 d-flex a-c">{{ form?.specn }}*{{ form?.capacity }}{{ form?.unit }}</span>
+                        <span class="c-#333 f-w-500 d-flex a-c" v-if="form?.restSpecn">{{ form?.restSpecn }}*{{ form?.capacity }}{{ form?.unit }}</span>
+                    </view>
                 </view>
                 </view>
 
 
-                <view class="f-s-30 pd2-16-0 info-border-bottom">
-                    <span class="c-#666">鲜货产地:</span>
-                    <span class="c-#333 f-w-600">{{ form?.producePlaceName || form?.producePlace || '-' }}</span>
+                <view v-if="form?.examinReport && form?.examinReport.length" class="f-s-30 pd2-16-0 info-border-bottom">
+                    <view class="c-#666 mb-10">检验报告:</view>
+                    <ut-album :urls="form?.examinReport"></ut-album>
                 </view>
                 </view>
 
 
                 <view v-if="form?.instoreType == '2'" class="f-s-30 pd2-16-0 info-border-bottom">
                 <view v-if="form?.instoreType == '2'" class="f-s-30 pd2-16-0 info-border-bottom">
@@ -133,8 +106,7 @@
                     </view>
                     </view>
                     <view class="f-s-30 pd2-16-0 info-border-bottom">
                     <view class="f-s-30 pd2-16-0 info-border-bottom">
                         <span class="c-#666">供应商是否是生产商:</span>
                         <span class="c-#666">供应商是否是生产商:</span>
-                        <span class="c-#333 f-w-600">{{ selectDictLabel(yes_no, form?.supplierProducerFlag) || '-'
-                        }}</span>
+                        <span class="c-#333 f-w-600">{{ selectDictLabel(yes_no, form?.supplierProducerFlag) || '-' }}</span>
                     </view>
                     </view>
                     <view class="f-s-30 pd2-16-0 info-border-bottom">
                     <view class="f-s-30 pd2-16-0 info-border-bottom">
                         <span class="c-#666">生产商:</span>
                         <span class="c-#666">生产商:</span>
@@ -143,49 +115,25 @@
                 </template>
                 </template>
 
 
                 <view v-if="form?.imgs" class="f-s-30 pd2-16-0 info-border-bottom">
                 <view v-if="form?.imgs" class="f-s-30 pd2-16-0 info-border-bottom">
-                    <view class="c-#666 mb-10">鲜货图片:</view>
+                    <view class="c-#666 mb-10">成品图片:</view>
                     <ut-album :urls="form?.imgs"></ut-album>
                     <ut-album :urls="form?.imgs"></ut-album>
                 </view>
                 </view>
                 <view v-if="form?.vedios" class="f-s-30 pd2-16-0 info-border-bottom">
                 <view v-if="form?.vedios" class="f-s-30 pd2-16-0 info-border-bottom">
-                    <view class="c-#666 mb-10">鲜货视频:</view>
+                    <view class="c-#666 mb-10">成品视频:</view>
                     <ut-album :urls="form?.vedios"></ut-album>
                     <ut-album :urls="form?.vedios"></ut-album>
                 </view>
                 </view>
-                <view v-if="form?.examinReport && form?.examinReport.length" class="f-s-30 pd2-16-0 info-border-bottom">
-                    <view class="c-#666 mb-10">检验报告:</view>
-                    <ut-album :urls="form?.examinReport"></ut-album>
-                </view>
-            </view>
-            <view class="pd-24">
-                <view class="startline-title">入库信息</view>
-            </view>
-            <view class="bg-#fff pd-24">
-                <view class="f-s-30 pd2-16-0 info-border-bottom">
-                    <span class="c-#666">鲜货级别:</span>
-                    <span class="c-#333 f-w-600">{{ form?.level || '-' }}</span>
-                </view>
-                <view class="f-s-30 pd2-16-0 info-border-bottom">
-                    <span class="c-#666">入库类型:</span>
-                    <span class="c-#333 f-w-600">{{ selectDictLabel(pt_seed_instore_type, form?.instoreType) || '-'
-                    }}</span>
-                </view>
-                <template v-if="form.instoreType == '2'">
-                    <view class="f-s-30 pd2-16-0 info-border-bottom">
-                        <span class="c-#666">入库日期:</span>
-                        <span class="c-#333 f-w-600">{{ form?.instoreBizInfo?.instoreDate || '-' }}</span>
-                    </view>
-                    <view class="f-s-30 pd2-16-0 info-border-bottom">
-                        <span class="c-#666">入库批号:</span>
-                        <span class="c-#333 f-w-600">{{ form?.batchCode || '-' }}</span>
-                    </view>
-                </template>
                 <view class="f-s-30 pd2-16-0 info-border-bottom">
                 <view class="f-s-30 pd2-16-0 info-border-bottom">
                     <span class="c-#666">库房类型:</span>
                     <span class="c-#666">库房类型:</span>
-                    <span class="c-#333 f-w-600">鲜货库</span>
+                    <span class="c-#333 f-w-600">成品库</span>
                 </view>
                 </view>
-                <view v-if="form?.warehouses?.length" class="pd2-4-0 f-s-28">
-                    <span class="c-#666">存放库房:</span>
+                <view class="pd2-4-0 f-s-28 info-border-bottom">
+                    <span class="c-#666">所在库房:</span>
                     <span class="c-#333 f-w-500">{{ getStorageRoomNames(form?.warehouses) || '-' }}</span>
                     <span class="c-#333 f-w-500">{{ getStorageRoomNames(form?.warehouses) || '-' }}</span>
                 </view>
                 </view>
+                <view class="f-s-30 pd2-16-0 info-border-bottom">
+                    <span class="c-#666">入库日期:</span>
+                    <span class="c-#333 f-w-600">{{ form?.instoreBizInfo?.instoreDate || '-' }}</span>
+                </view>
                 <view class="f-s-30 pd2-16-0 info-border-bottom">
                 <view class="f-s-30 pd2-16-0 info-border-bottom">
                     <span class="c-#666">入库人:</span>
                     <span class="c-#666">入库人:</span>
                     <span class="c-#333 f-w-600">{{ form?.instoreBizInfo?.instoreMg || '-' }}</span>
                     <span class="c-#333 f-w-600">{{ form?.instoreBizInfo?.instoreMg || '-' }}</span>
@@ -194,16 +142,6 @@
                     <span class="c-#666">入库备注:</span>
                     <span class="c-#666">入库备注:</span>
                     <span class="c-#333 f-w-600">{{ form?.instoreBizInfo?.remark || '-' }}</span>
                     <span class="c-#333 f-w-600">{{ form?.instoreBizInfo?.remark || '-' }}</span>
                 </view>
                 </view>
-                <view class="f-s-30 pd2-16-0 info-border-bottom">
-                    <span class="c-#666">最后修改人:</span>
-                    <span class="c-#333 f-w-600">{{ form?.operatorName || form?.updateByName || form?.createByName ||
-                        '-' }}</span>
-                </view>
-                <view class="f-s-30 pd2-16-0 info-border-bottom">
-                    <span class="c-#666">最后修改时间:</span>
-                    <span class="c-#333 f-w-600">{{ form?.operateTime || form?.updateTime || form?.createTime || '-'
-                    }}</span>
-                </view>
             </view>
             </view>
         </template>
         </template>
         <template #bottom>
         <template #bottom>
@@ -221,7 +159,10 @@ import { useClientRequest } from '@/utils/request';
 import { selectDictListClass } from '@/utils/ruoyi';
 import { selectDictListClass } from '@/utils/ruoyi';
 const { proxy } = getCurrentInstance() as ComponentInternalInstance;
 const { proxy } = getCurrentInstance() as ComponentInternalInstance;
 
 
-const { pt_seed_instore_type, yes_no, pt_medicine_source_tag, pt_medicine_unit } = toRefs<any>(proxy?.useDict('pt_seed_instore_type', 'yes_no', 'pt_medicine_source_tag', 'pt_medicine_unit'));
+const { pt_seed_instore_type, yes_no, pt_medicine_source_tag, pt_medicine_unit, pt_product_type } = toRefs<any>(proxy?.useDict('pt_seed_instore_type', 'yes_no', 'pt_medicine_source_tag', 'pt_medicine_unit', 'pt_product_type'));
+
+// 类型标签背景色类名
+const typeBgClass = computed(() => `bg-instore-${form.value?.instoreBizInfo?.productType}`);
 const paging = ref<any>(null);
 const paging = ref<any>(null);
 const form = ref<any>({});
 const form = ref<any>({});
 const did = ref('');
 const did = ref('');
@@ -271,13 +212,13 @@ const onRefresh = () => {
     paging.value?.complete();
     paging.value?.complete();
 };
 };
 const clickEdit = () => {
 const clickEdit = () => {
-    uni.$on('fresh-goods-detail-refresh', () => {
+    uni.$on('finished-product-detail-refresh', () => {
         getDetailById(did.value);
         getDetailById(did.value);
-        uni.$off('fresh-goods-detail-refresh');
+        uni.$off('finished-product-detail-refresh');
     });
     });
     uni.$u.route({
     uni.$u.route({
         type: 'navigateTo',
         type: 'navigateTo',
-        url: '/plant/storage/fresh-goods/info-update/index',
+        url: '/plant/storage/finished-product/info-update/index',
         params: {
         params: {
             id: did.value,
             id: did.value,
         },
         },
@@ -304,8 +245,28 @@ onLoad((options: any) => {
 .li-left-tag {
 .li-left-tag {
     padding: 6rpx 16rpx;
     padding: 6rpx 16rpx;
     color: #fff;
     color: #fff;
-    border-radius: 0 0 16rpx 0;
+    border-radius: 0rpx 0 16rpx 0;
     font-size: 20rpx;
     font-size: 20rpx;
     font-weight: 500;
     font-weight: 500;
 }
 }
+
+/* 类型标签背景色 */
+.bg-instore-2 {
+    background-color: #2289e0;
+}
+
+/* 药材 - 绿色 */
+.bg-instore-4 {
+    background-color: #ff9800;
+}
+
+/* 鲜货 - 橙色 */
+.bg-instore-5 {
+    background-color: #1ebddc;
+}
+
+/* 种源 - 蓝色 */
+.bg-instore-6 {
+    background-color: #ebf6ee;
+}
 </style>
 </style>

+ 177 - 0
src/plant/storage/finished-product/info-update/index.vue

@@ -0,0 +1,177 @@
+<template>
+    <z-paging class="" ref="paging" bgColor="#f7f7f7" paging-class="paging-btm-shadow" safe-area-inset-bottom scroll-with-animation>
+        <template #top>
+            <ut-navbar title="修改成品信息" :fixed="false" border></ut-navbar>
+        </template>
+        <up-form class="p-rtv" labelPosition="top" :model="form" :rules="rules" labelWidth="auto" ref="upFormRef">
+            <!-- 成品信息 -->
+            <view class="pd-24">
+                <view class="startline-title">成品信息</view>
+            </view>
+            <view class="pd-24 bg-#fff">
+                <!-- 成品批号 - 不可修改 -->
+                <up-form-item borderBottom label="成品批号" required>
+                    <view class="f-s-30 c-#999 f-w-5 flex1">{{ form.batchCode || '-' }}</view>
+                </up-form-item>
+
+                <!-- 包装批号 - 不可修改 -->
+                <up-form-item borderBottom label="包装批号" required>
+                    <view class="f-s-30 c-#999 f-w-5 flex1">{{ form.instoreBizInfo?.packSn || '-' }}</view>
+                </up-form-item>
+
+                <!-- 入库量 - 不可修改 -->
+                <up-form-item borderBottom label="入库量" required>
+                    <view class="f-s-30 c-#999 f-w-5 flex1">{{ form?.specn }}*{{ form?.capacity }}{{ form?.unit }}</view>
+                </up-form-item>
+
+                <!-- 检验报告 - 不可修改 -->
+                <up-form-item v-if="form?.examinReport && form?.examinReport.length" borderBottom label="检验报告">
+                    <ut-album :urls="form?.examinReport"></ut-album>
+                </up-form-item>
+
+                <!-- 库房类型 - 不可修改 -->
+                <up-form-item borderBottom label="库房类型" required>
+                    <view class="f-s-30 c-#999 f-w-5 flex1">成品库</view>
+                </up-form-item>
+                <!-- 所在库房 - 可修改 -->
+                <up-form-item borderBottom label="所在库房" prop="warehouses">
+                    <select-warehouse-input v-model="form.warehouses" title="选择存放库房" :params="{ type: '2' }"></select-warehouse-input>
+                </up-form-item>
+
+                <!-- 入库日期 - 可修改 -->
+                <ut-datetime-picker v-model="form.instoreBizInfo.instoreDate" :maxDate="new Date()" mode="date">
+                    <up-form-item borderBottom label="入库日期" required prop="instoreBizInfo.instoreDate">
+                        <up-input v-model="form.instoreBizInfo.instoreDate" placeholder="请选择入库日期" border="none" clearable></up-input>
+                        <template #right>
+                            <up-icon size="22rpx" color="#37A954" name="arrow-down-fill"></up-icon>
+                        </template>
+                    </up-form-item>
+                </ut-datetime-picker>
+                <!-- 入库人 - 可修改 -->
+                <up-form-item borderBottom label="入库人" required prop="instoreBizInfo.instoreMg">
+                    <up-input v-model="form.instoreBizInfo.instoreMg" placeholder="请输入入库人" border="none" clearable></up-input>
+                </up-form-item>
+                <!-- 入库备注 - 可修改 -->
+                <up-form-item borderBottom label="入库备注" prop="instoreBizInfo.remark">
+                    <up-textarea v-model="form.instoreBizInfo.remark" placeholder="请输入入库备注" autoHeight></up-textarea>
+                </up-form-item>
+            </view>
+        </up-form>
+        <template #bottom>
+            <view class="pd-20 d-flex">
+                <up-button @click="submitForm" type="primary">保存</up-button>
+            </view>
+        </template>
+    </z-paging>
+</template>
+
+<script setup lang="ts">
+import { useClientRequest } from '@/utils/request';
+import SelectWarehouseInput from '@/models/select-warehouse-input/select-warehouse-input.vue';
+import { parseTime } from '@/utils/ruoyi';
+
+const { proxy } = getCurrentInstance() as ComponentInternalInstance;
+const { pt_warehouse_type } = toRefs<any>(proxy?.useDict('pt_warehouse_type'));
+
+const paging = ref<any>(null);
+const upFormRef = ref<any>(null);
+
+// 表单数据
+const form = ref<any>({
+    instoreBizInfo: {
+        instoreDate: parseTime(new Date(), '{y}-{m}-{d}'),
+        instoreMg: '',
+        remark: '',
+    },
+});
+
+// 表单验证规则
+const rules = reactive({
+    'instoreBizInfo.instoreDate': [{ required: true, message: '请选择入库日期' }],
+    'instoreBizInfo.instoreMg': [{ required: true, message: '请输入入库人' }],
+});
+
+// 提交表单
+const submitForm = async () => {
+    uni.$u.debounce(
+        async () => {
+            try {
+                await upFormRef.value?.validate();
+            } catch (error: any) {
+                const firstErrorField = error && error[0].prop + 'pppp';
+                paging.value?.scrollIntoViewById(firstErrorField, 30, true);
+                return;
+            }
+            uni.showLoading({
+                title: '提交中...',
+            });
+            try {
+                const res = await useClientRequest.post('/plt-api/app/storage/edit', form.value);
+                if (!res || res.code !== 200) return;
+                uni.hideLoading();
+                uni.showToast({
+                    title: '修改成功',
+                    icon: 'success',
+                });
+                // 触发刷新事件
+                uni.$emit('finished-product-detail-refresh');
+                uni.$emit('refreshStorageRoomList');
+                setTimeout(() => {
+                    uni.navigateBack({
+                        delta: 1,
+                    });
+                }, 1500);
+            } catch (error) {
+                // uni.hideLoading();
+            }
+        },
+        500,
+        true,
+    );
+};
+
+const did = ref('');
+
+// 获取详情
+const getDetailById = async (id: string) => {
+    if (!id) return;
+    const res = await useClientRequest.get(`/plt-api/app/storage/getInfo/${id}`);
+    if (res && res.code === 200) {
+        form.value = {
+            ...form.value,
+            ...res.data,
+            instoreBizInfo: {
+                ...form.value.instoreBizInfo,
+                ...res.data.instoreBizInfo,
+            },
+        };
+        console.log(form.value);
+    }
+};
+
+// 页面加载
+onLoad((options: any) => {
+    did.value = options?.id || '';
+    getDetailById(did.value);
+});
+</script>
+
+<style lang="scss" scoped>
+.card-info-block {
+    border: 1rpx solid #afddbb;
+    border-radius: 10rpx;
+}
+
+.tag-span {
+    padding: 4rpx 12rpx;
+    font-size: 20rpx;
+    border-radius: 18rpx;
+}
+
+.close-icon {
+    position: absolute;
+    top: 0;
+    right: 0;
+    z-index: 10;
+}
+</style>

+ 9 - 13
src/plant/storage/finished-product/list/index.vue

@@ -9,27 +9,23 @@
             </view>
             </view>
             <view class="d-flex a-c">
             <view class="d-flex a-c">
                 <view class="min-w-230 flex1">
                 <view class="min-w-230 flex1">
-                    <ut-action-sheet v-model="form.instoreType" :tabs="tabs_pt_fresh_instore_type" mode="custom"
-                        @change="onRefresh" title="选择入库类型">
+                    <ut-action-sheet v-model="form.instoreType" :tabs="tabs_pt_product_type" mode="custom" @change="onRefresh" title="选择入库类型">
                         <view class="d-flex search-select-item a-c">
                         <view class="d-flex search-select-item a-c">
-                            <view class="flex1 ov-hd f-s-28 c-333 text-center f-w-5 w-s-no">{{
-                                selectDictLabel(pt_fresh_instore_type, form.instoreType) || '全部' }} </view>
+                            <view class="flex1 ov-hd f-s-28 c-333 text-center f-w-5 w-s-no">{{ selectDictLabel(pt_product_type, form.instoreType) || '全部' }} </view>
                             <up-icon size="24rpx" color="#333" name="arrow-down-fill" class="mr-5"></up-icon>
                             <up-icon size="24rpx" color="#333" name="arrow-down-fill" class="mr-5"></up-icon>
                         </view>
                         </view>
                     </ut-action-sheet>
                     </ut-action-sheet>
                 </view>
                 </view>
                 <view class="h-86 pl-20 w-100%">
                 <view class="h-86 pl-20 w-100%">
-                    <ut-search ref="searchRef" v-model="form.keyword" @search="changeSeach" margin="0" :border="false"
-                        placeholder="搜名称、批号、库房、供应商" bgColor="#fff" height="86rpx" borderRadius="10rpx"></ut-search>
+                    <ut-search ref="searchRef" v-model="form.keyword" @search="changeSeach" margin="0" :border="false" placeholder="搜名称、批号、库房、供应商" bgColor="#fff" height="86rpx" borderRadius="10rpx"></ut-search>
                 </view>
                 </view>
             </view>
             </view>
             <view></view>
             <view></view>
         </view>
         </view>
         <view class="pd-24 bg-#f7f7f7">
         <view class="pd-24 bg-#f7f7f7">
             <up-swipe-action>
             <up-swipe-action>
-                <up-swipe-action-item v-for="(item, index) in list" :key="index" :name="item?.id"
-                    :options="optionsActionTemp" @click="clickTempSwipe($event, item)" class="mb-20 b-radius">
-                    <product-item :item="item" />
+                <up-swipe-action-item v-for="(item, index) in list" :key="index" :name="item?.id" :options="optionsActionTemp" @click="clickTempSwipe($event, item)" class="mb-20 b-radius">
+                    <product-item :item="item" jump-url="/plant/storage/finished-product/detail/index" />
                 </up-swipe-action-item>
                 </up-swipe-action-item>
             </up-swipe-action>
             </up-swipe-action>
         </view>
         </view>
@@ -48,9 +44,9 @@ import { useClientRequest } from '@/utils/request';
 import { selectDictListClass } from '@/utils/ruoyi';
 import { selectDictListClass } from '@/utils/ruoyi';
 import { getStorageRoomNames } from '@/utils/common';
 import { getStorageRoomNames } from '@/utils/common';
 import FreshGoodsBottom from './model/fresh-goods-bottom.vue';
 import FreshGoodsBottom from './model/fresh-goods-bottom.vue';
-import ProductItem from '@/plant/models/warehouseCard/product-item.vue'
+import ProductItem from '@/plant/models/warehouseCard/product-item.vue';
 const { proxy } = getCurrentInstance() as ComponentInternalInstance;
 const { proxy } = getCurrentInstance() as ComponentInternalInstance;
-const { pt_fresh_instore_type } = toRefs<any>(proxy?.useDict('pt_fresh_instore_type'));
+const { pt_product_type } = toRefs<any>(proxy?.useDict('pt_product_type'));
 const list = ref<any[]>();
 const list = ref<any[]>();
 const form = ref({ keyword: '', restFlag: '1', instoreType: '', storageType: '3' });
 const form = ref({ keyword: '', restFlag: '1', instoreType: '', storageType: '3' });
 const paging = ref();
 const paging = ref();
@@ -58,8 +54,8 @@ const tabs = ref([
     { label: '有库存', value: '1' },
     { label: '有库存', value: '1' },
     { label: '无库存', value: '0' },
     { label: '无库存', value: '0' },
 ]);
 ]);
-const tabs_pt_fresh_instore_type = computed(() => {
-    return [{ label: '全部', value: '' }, ...pt_fresh_instore_type.value].filter((item: any) => item.value != '4');
+const tabs_pt_product_type = computed(() => {
+    return [{ label: '全部', value: '' }, ...pt_product_type.value];
 });
 });
 const changeSeach = () => {
 const changeSeach = () => {
     paging.value.reload();
     paging.value.reload();

+ 57 - 0
src/plant/storage/finished-product/sales-registration/index.vue

@@ -0,0 +1,57 @@
+<template>
+    <z-paging ref="paging" v-model="list" :fixed-bottom="false" safe-area-inset-bottom>
+        <template #top>
+            <ut-navbar title="销售登记" :fixed="false"></ut-navbar>
+        </template>
+
+        <!-- 成功图标和标题 -->
+        <view class="d-flex flex-cln a-c j-c pt-120 pb-40">
+            <image src="https://ta.zycpzs.cn/oss-file/smart-trace/szyy/images-plt/plant/sales/salessuccess.png" mode="widthFix" class="w-400 h-400 mb-40" />
+            <text class="f-s-42 f-w-5 c-primary">销售登记成功!</text>
+        </view>
+
+        <!-- 按钮区域 -->
+        <view class="pd-24">
+            <!-- 两个并排按钮 -->
+            <view class="d-flex gap-24 mb-24">
+                <up-button text="继续销售登记" type="primary" class="flex1" :custom-style="{ backgroundColor: '#14c4c4', borderColor: '#14c4c4' }" @click="continueRegistration"></up-button>
+                <up-button text="查看销售清单" type="success" class="flex1" :custom-style="{ backgroundColor: '#41c06d', borderColor: '#41c06d' }" @click="viewSalesList"></up-button>
+            </view>
+            <!-- 返回列表按钮 -->
+            <up-button text="返回列表" type="text" :custom-style="{ backgroundColor: '#ffffff', borderColor: '#41c06d', color: '#41c06d', width: '100%' }" @click="backToList"></up-button>
+        </view>
+    </z-paging>
+</template>
+
+<script setup lang="ts">
+const list = ref([]);
+const paging = ref();
+
+// 继续销售登记
+const continueRegistration = () => {
+    uni.navigateBack({
+        delta: 1,
+    });
+};
+
+// 查看销售清单
+const viewSalesList = () => {
+    uni.reLaunch({
+        url: '/plant/storage/finished-product/list/index',
+    });
+};
+
+// 返回列表
+const backToList = () => {
+    uni.reLaunch({
+        url: '/plant/storage/finished-product/list/index',
+    });
+};
+</script>
+
+<style lang="scss" scoped>
+// 页面容器
+page {
+    background-color: #f5f5f5;
+}
+</style>

+ 157 - 0
src/tools/sales-registration/index.vue

@@ -0,0 +1,157 @@
+<template>
+    <z-paging ref="paging" v-model="list" paging-class="paging-btm-shadow" bgColor="#f7f7f7" safe-area-inset-bottom @query="query">
+        <template #top>
+            <ut-navbar title="请选择要销售的批次" :fixed="false"></ut-navbar>
+        </template>
+        <view class="d-flex a-c pd-24 pb-0 bg-#f7f7f7">
+            <view class="min-w-170 flex1">
+                <ut-action-sheet v-model="form.instoreType" :tabs="[{ label: '全部', value: '' }, ...pt_product_type]" @change="changeSeach" title="选择入库类型">
+                    <view class="d-flex search-select-item a-c">
+                        <view class="flex1 ov-hd f-s-28 c-333 text-center f-w-5 w-s-no">{{ selectDictLabel(pt_product_type, form.instoreType) || '全部' }}</view>
+                        <up-icon size="24rpx" color="#333" name="arrow-down-fill" class="mr-5"></up-icon>
+                    </view>
+                </ut-action-sheet>
+            </view>
+            <view class="h-86 pl-20 w-100%">
+                <ut-search ref="searchRef" v-model="form.keyword" @search="changeSeach" @change="changeSeach" margin="0" :border="false" placeholder="搜名称、批号、库房、供应商" bgColor="#fff" height="86rpx" borderRadius="10rpx"></ut-search>
+            </view>
+        </view>
+        <template v-for="(item, index) in list" :key="index">
+            <batch-card :item="item" :selected="isSelected(item)" @click="toggleSelection(item)" />
+        </template>
+        <template #bottom>
+            <view v-if="selectedList.length > 0" class="bg-#EBF6EE c-primary f-s-24 pd-10 pl-24"> 已选择 {{ selectedList.length }} 个批次 </view>
+            <view class="pd-20 d-flex">
+                <up-button type="primary" @click="confirmSelection">确认选择</up-button>
+            </view>
+        </template>
+    </z-paging>
+</template>
+
+<script setup lang="ts">
+import { useClientRequest } from '@/utils/request';
+import BatchCard from './models/batch-card.vue';
+
+const { proxy } = getCurrentInstance() as ComponentInternalInstance;
+const { pt_product_type } = toRefs<any>(proxy?.useDict('pt_product_type'));
+
+interface BatchItem {
+    id: number | string;
+    [key: string]: any;
+}
+
+const list = ref<BatchItem[]>([]);
+const paging = ref();
+const form = ref({
+    keyword: '',
+    instoreType: '',
+    storageType: '3',
+});
+
+// 已选中的批次列表(多选)
+const selectedList = ref<BatchItem[]>([]);
+
+// 预存的批次 ID 列表(用于回显)
+const preSelectedIds = ref<(number | string)[]>([]);
+
+const query = async (pageNo: number, pageSize: number) => {
+    const params = {
+        pageNo,
+        pageSize,
+        ...form.value,
+    };
+    const res = await useClientRequest.get('/plt-api/app/storage/list', params);
+    const { rows } = res;
+    paging.value.complete(rows);
+
+    // 加载完成后,如果有预存的 ID,尝试匹配并选中
+    if (preSelectedIds.value.length > 0 && selectedList.value.length === 0) {
+        matchPreSelectedItems(rows);
+    }
+};
+
+// 匹配预存的项目
+const matchPreSelectedItems = (rows: BatchItem[]) => {
+    rows.forEach((item: BatchItem) => {
+        if (preSelectedIds.value.includes(item.id)) {
+            // 检查是否已选中,避免重复
+            if (!selectedList.value.find((selected) => selected.id === item.id)) {
+                selectedList.value.push(item);
+            }
+        }
+    });
+};
+
+const changeSeach = () => {
+    paging.value.reload();
+};
+
+// 判断是否已选中
+const isSelected = (item: BatchItem) => {
+    return selectedList.value.some((selected) => selected.id === item.id);
+};
+
+// 切换选中状态
+const toggleSelection = (item: BatchItem) => {
+    const index = selectedList.value.findIndex((selected) => selected.id === item.id);
+    if (index > -1) {
+        // 取消选中
+        selectedList.value.splice(index, 1);
+    } else {
+        // 添加选中
+        selectedList.value.push(item);
+    }
+};
+
+// 确认选择
+const confirmSelection = () => {
+    if (selectedList.value.length === 0) {
+        uni.showToast({
+            title: '请选择至少一个批次',
+            icon: 'none',
+        });
+        return;
+    }
+
+    // 返回选中的数据(完整对象数组)
+    uni.navigateBack({
+        delta: 1,
+        success: () => {
+            // 通过事件总线传递选中的数据
+            uni.$emit('batchSelected', selectedList.value);
+        },
+    });
+};
+
+onLoad((options: any) => {
+    // 处理回显参数 batchIds
+    if (options?.batchIds) {
+        try {
+            // 可能是 JSON 字符串或逗号分隔的字符串
+            const batchIdsStr = decodeURIComponent(options.batchIds);
+            if (batchIdsStr.startsWith('[')) {
+                // JSON 数组格式
+                preSelectedIds.value = JSON.parse(batchIdsStr);
+            } else {
+                // 逗号分隔格式
+                preSelectedIds.value = batchIdsStr.split(',').map((id: string) => {
+                    const numId = Number(id);
+                    return isNaN(numId) ? id : numId;
+                });
+            }
+        } catch (e) {
+            console.error('解析 batchIds 失败:', e);
+        }
+    }
+});
+</script>
+
+<style lang="scss" scoped>
+.search-select-item {
+    height: 86rpx;
+    background-color: #fff;
+    border-radius: 10rpx;
+    box-sizing: border-box;
+    padding: 12rpx;
+}
+</style>

+ 126 - 0
src/tools/sales-registration/models/batch-card.vue

@@ -0,0 +1,126 @@
+<template>
+    <view class="pd-24 pb-10 select-item" @click="$emit('click')">
+        <view class="b-radius bg-#fff pd-20 p-rtv noactive" :class="{ active: selected }">
+            <view class="d-flex j-sb a-c li-item-head mb-16">
+                <view class="li-left-tag" :class="{ [`bg-instore-${item?.instoreBizInfo?.productType}`]: true }">
+                    {{ selectDictLabel(pt_product_type, item?.instoreBizInfo?.productType) }}
+                </view>
+                <view class="f-s-22 c-#666 pt-10">{{ item?.updateTime || item?.createTime }}</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?.instoreBizInfo?.proName || '' }}</span>
+                    <span class="f-s-24 c-#666">{{ item?.instoreBizInfo?.proLevel || '' }}</span>
+                </view>
+                <view>
+                    <view v-if="item?.isInspected" 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 w-s-no">成品批号:</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?.instoreBizInfo?.packSn || '-' }}</span>
+            </view>
+            <view class="pd2-4-0 f-s-28">
+                <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">
+                <span class="c-#666 w-s-no">入库量:</span>
+                <span class="c-#333 f-w-500">{{ item?.specn }}*{{ item?.capacity }}{{ item?.unit }}</span>
+            </view>
+            <view class="d-flex">
+                <view class="pd2-4-0 f-s-28 flex1">
+                    <span class="c-primary">剩余量:</span>
+                    <span class="c-primary f-w-500">{{ item?.restSpecn }}*{{ item?.restAmount }}{{ item?.unit }}</span>
+                </view>
+            </view>
+            <!-- 选中图标 -->
+            <image v-if="selected" class="w-40 h-40 checked-icon" src="https://ta.zycpzs.cn/oss-file/smart-trace/szyy/images-plt/common/btn_checked_icon.png" mode="widthFix" />
+        </view>
+    </view>
+</template>
+
+<script setup lang="ts">
+import { getStorageRoomNames } from '@/utils/common';
+
+const { proxy } = getCurrentInstance() as ComponentInternalInstance;
+const { pt_product_type } = toRefs<any>(proxy?.useDict('pt_product_type'));
+
+defineProps<{
+    item: any;
+    selected?: boolean;
+}>();
+
+defineEmits<{
+    click: [];
+}>();
+</script>
+
+<style lang="scss" scoped>
+.tag-span {
+    padding: 4rpx 12rpx;
+    font-size: 20rpx;
+    border-radius: 18rpx;
+}
+
+.li-item-head {
+    margin-left: -24rpx;
+    margin-top: -24rpx;
+}
+
+.li-left-tag {
+    padding: 6rpx 16rpx;
+    color: #fff;
+    border-radius: 16rpx 0 16rpx 0;
+    font-size: 20rpx;
+    font-weight: 500;
+}
+
+.select-item {
+    .noactive {
+        border: 1rpx solid transparent;
+    }
+
+    .active {
+        background-color: #ebf6ee;
+        position: relative;
+        border: 1rpx solid #37a954;
+    }
+
+    .checked-icon {
+        position: absolute;
+        right: 0rpx;
+        bottom: 0rpx;
+    }
+}
+
+/* 类型标签背景色 */
+.bg-instore-1 {
+    background-color: #ff9800;
+}
+
+.bg-instore-2 {
+    background-color: #2289e0;
+}
+
+.bg-instore-3 {
+    background-color: #1ebddc;
+}
+
+.bg-instore-4 {
+    background-color: #ff9800;
+}
+
+.bg-instore-5 {
+    background-color: #1ebddc;
+}
+
+.bg-instore-6 {
+    background-color: #ebf6ee;
+}
+</style>

+ 20 - 7
src/tools/species-info-process/index.vue

@@ -1,26 +1,32 @@
 <template>
 <template>
-    <z-paging ref="paging" v-model="list" paging-class="paging-btm-shadow" bgColor="#f7f7f7" safe-area-inset-bottom @query="query">
+    <z-paging ref="paging" v-model="list" paging-class="paging-btm-shadow" bgColor="#f7f7f7" safe-area-inset-bottom
+        @query="query">
         <template #top>
         <template #top>
             <ut-navbar leftText="请选择任务所使用的种子信息" :fixed="false"></ut-navbar>
             <ut-navbar leftText="请选择任务所使用的种子信息" :fixed="false"></ut-navbar>
         </template>
         </template>
         <view class="d-flex a-c pd-24 pb-0 bg-#f7f7f7">
         <view class="d-flex a-c pd-24 pb-0 bg-#f7f7f7">
             <view class="min-w-170 flex1">
             <view class="min-w-170 flex1">
-                <ut-action-sheet v-model="form.instoreType" :tabs="[{ label: '全部', value: '' }, ...pt_fresh_instore_type]" @change="changeSeach" title="选择原料类型">
+                <ut-action-sheet v-model="form.instoreType"
+                    :tabs="[{ label: '全部', value: '' }, ...pt_fresh_instore_type]" @change="changeSeach" title="选择原料类型">
                     <view class="d-flex search-select-item a-c">
                     <view class="d-flex search-select-item a-c">
-                        <view class="flex1 ov-hd f-s-28 c-333 text-center f-w-5 w-s-no">{{ selectDictLabel(pt_fresh_instore_type, form.instoreType) || '全部' }}</view>
+                        <view class="flex1 ov-hd f-s-28 c-333 text-center f-w-5 w-s-no">{{
+                            selectDictLabel(pt_fresh_instore_type, form.instoreType) || '全部' }}</view>
                         <up-icon size="24rpx" color="#333" name="arrow-down-fill" class="mr-5"></up-icon>
                         <up-icon size="24rpx" color="#333" name="arrow-down-fill" class="mr-5"></up-icon>
                     </view>
                     </view>
                 </ut-action-sheet>
                 </ut-action-sheet>
             </view>
             </view>
             <view class="h-86 pl-20 w-100%">
             <view class="h-86 pl-20 w-100%">
-                <ut-search ref="searchRef" v-model="form.keyword" @search="changeSeach" @change="changeSeach" margin="0" :border="false" placeholder="搜批次号、品种名、基地名" bgColor="#fff" height="86rpx" borderRadius="10rpx"></ut-search>
+                <ut-search ref="searchRef" v-model="form.keyword" @search="changeSeach" @change="changeSeach" margin="0"
+                    :border="false" placeholder="搜批次号、品种名、基地名" bgColor="#fff" height="86rpx"
+                    borderRadius="10rpx"></ut-search>
             </view>
             </view>
         </view>
         </view>
         <template v-for="(item, index) in list" :key="index">
         <template v-for="(item, index) in list" :key="index">
             <info-card :item="item" :selected="selectedItems?.id === item.id" @click="toggleSelection(item)" />
             <info-card :item="item" :selected="selectedItems?.id === item.id" @click="toggleSelection(item)" />
         </template>
         </template>
         <template #bottom>
         <template #bottom>
-            <view v-if="selectedItems" class="bg-#EBF6EE c-primary f-s-24 pd-10 pl-24"> 已选择种源:{{ selectedItems.variety }} </view>
+            <view v-if="selectedItems" class="bg-#EBF6EE c-primary f-s-24 pd-10 pl-24"> 已选择种源:{{ selectedItems.variety
+            }} </view>
             <view class="pd-20 d-flex">
             <view class="pd-20 d-flex">
                 <up-button type="primary" @click="open">确认选择</up-button>
                 <up-button type="primary" @click="open">确认选择</up-button>
             </view>
             </view>
@@ -36,10 +42,12 @@
                 </view>
                 </view>
             </view>
             </view>
             <view class="pd-24">
             <view class="pd-24">
-                <up-form class="p-rtv" labelPosition="top" :model="formDate" :rules="rules" labelWidth="auto" ref="upFormRef">
+                <up-form class="p-rtv" labelPosition="top" :model="formDate" :rules="rules" labelWidth="auto"
+                    ref="upFormRef">
                     <up-form-item :borderBottom="false" prop="inputs" id="inputspppp">
                     <up-form-item :borderBottom="false" prop="inputs" id="inputspppp">
                         <view class="d-flex flex-cln" style="width: 100%">
                         <view class="d-flex flex-cln" style="width: 100%">
-                            <souceinfo v-if="selectedItems" :data="selectedItems" :index="0" v-model:inputs="formDate.inputs[0]" @close="handleSourceClose" />
+                            <souceinfo v-if="selectedItems" :data="selectedItems" :index="0"
+                                v-model:inputs="formDate.inputs[0]" @close="handleSourceClose" />
                         </view>
                         </view>
                     </up-form-item>
                     </up-form-item>
                 </up-form>
                 </up-form>
@@ -69,6 +77,8 @@ const form = ref({
     storageType: '4',
     storageType: '4',
     part: '',
     part: '',
     notIncludePart: '',
     notIncludePart: '',
+    varietyId: '',
+    medicineCode: ''
 });
 });
 //表单
 //表单
 const formDate = ref({
 const formDate = ref({
@@ -222,6 +232,9 @@ const saveSeedInfo = async () => {
 };
 };
 const processId = ref('');
 const processId = ref('');
 onLoad((options: any) => {
 onLoad((options: any) => {
+    console.log(options, 'options');
+    form.value.varietyId = options?.varietyId || '';
+    form.value.medicineCode = options?.medicineCode || '';
     processId.value = options?.id;
     processId.value = options?.id;
     if (+options?.processMedType == 1) {
     if (+options?.processMedType == 1) {
         form.value.part = 'PL-FR-05';
         form.value.part = 'PL-FR-05';

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

@@ -1,48 +1,52 @@
 <template>
 <template>
     <view class="bg-#FBFDFB border-#AFDDBB pd-24 b-radius mb-10">
     <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="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>
-        <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>
-        <view class="pt-6 pb-6 d-flex mb-12" v-if="showClose">
-            <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 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>
-            <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 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>
-        </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" type="number">
-                    <template #suffix>
-                        <view class="c-#333 f-s-28 f-w-5">{{ data?.unit }}</view>
-                    </template>
-                </up-input>
+            <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">{{ 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="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>
             </view>
-            <view class="">
-                <up-checkbox label="全部使用" usedAlone v-model:checked="hasChecked" @change="handleUseAllChange"></up-checkbox>
+            <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>
             </view>
         </view>
         </view>
-    </view>
 </template>
 </template>
 <script setup lang="ts">
 <script setup lang="ts">
 import { ref, watch, computed, nextTick } from 'vue';
 import { ref, watch, computed, nextTick } from 'vue';
@@ -59,7 +63,7 @@ const emit = defineEmits<{
     close: [index: number];
     close: [index: number];
 }>();
 }>();
 
 
-const inputsModel = defineModel<any>('inputs', { default: () => {} });
+const inputsModel = defineModel<any>('inputs', { default: () => { } });
 
 
 // 处理关闭事件
 // 处理关闭事件
 const handleClose = (index: number) => {
 const handleClose = (index: number) => {
@@ -70,7 +74,8 @@ const hasChecked = computed(() => {
     return +inputsModel?.value.inputAmount >= +props.data.restAmount;
     return +inputsModel?.value.inputAmount >= +props.data.restAmount;
 });
 });
 const handleUseAllChange = () => {
 const handleUseAllChange = () => {
-    if (!hasChecked.value) {
+    console.log(hasChecked.value, 'hasChecked.value');
+    if (!hasChecked.value || +hasChecked.value == 0) {
         inputsModel.value.inputAmount = props.data.restAmount;
         inputsModel.value.inputAmount = props.data.restAmount;
     }
     }
 };
 };