lisy 4 недель назад
Родитель
Сommit
0eee9e8b10

+ 200 - 123
src/plant/port/port-create/index.vue

@@ -107,15 +107,28 @@
                             </view>
                         </up-form-item>
                         <view class="h-1" id="plantpppp"></view>
-                        <up-form-item borderBottom label="养殖量" required prop="plant">
-                            <up-input v-model="form.plant.plantingMgAmount" placeholder="请输入养殖量" border="none"></up-input>
-                            <ut-action-sheet v-model="form.plant.plantingMgUnit" :tabs="pt_planting_mg_unit" title="选择单位">
-                                <view class="d-flex a-c">
-                                    <view v-if="form.plant?.plantingMgUnit" class="f-s-30 c-333 f-w-5 w-100">{{ selectDictLabel(pt_planting_mg_unit, form.plant?.plantingMgUnit) }}</view>
-                                    <view v-else class="f-s-30 c-ccc f-w-4 w-100">单位</view>
-                                    <up-icon size="22rpx" color="#2A6D52" name="arrow-down-fill"></up-icon>
-                                </view>
-                            </ut-action-sheet>
+                        <up-form-item label="养殖量" required class="form-item-bottom-padding-0">
+                            <div class="flex1 d-flex">
+                                <div class="flex1 ov-hd">
+                                    <up-form-item prop="plantingMgAmount" border-bottom class="form-item-top-padding-0">
+                                        <up-input v-model="form.plantingMgAmount" placeholder="请输入养殖量" border="none" clearable></up-input>
+                                    </up-form-item>
+                                </div>
+                                <div class="pd-5"></div>
+                                <div class="min-w-200">
+                                    <ut-action-sheet v-model="form.plantingMgUnit" :tabs="pt_planting_mg_unit" title="选择单位">
+                                        <up-form-item prop="unit" border-bottom class="form-item-top-padding-0">
+                                            <view class="flex1" style="line-height: 24px">
+                                                <view v-if="form.plantingMgUnit" class="f-s-30 c-333 f-w-5 text-center">{{ selectDictLabel(pt_planting_mg_unit, form.plantingMgUnit) }}</view>
+                                                <view v-else class="f-s-30 c-ccc f-w-4 text-center">单位</view>
+                                            </view>
+                                            <template #right>
+                                                <up-icon size="22rpx" color="#2A6D52" name="arrow-down-fill"></up-icon>
+                                            </template>
+                                        </up-form-item>
+                                    </ut-action-sheet>
+                                </div>
+                            </div>
                         </up-form-item>
                         <up-form-item borderBottom label="备注" prop="remark" id="remarkpppp">
                             <up-input v-model="form.remark" placeholder="请输入备注" border="none"></up-input>
@@ -148,21 +161,6 @@
                                 <up-radio :customStyle="{ marginRight: '60rpx' }" v-for="(item, index) in yes_no" :key="index" :label="item.label" :name="item.value"></up-radio>
                             </up-radio-group>
                         </up-form-item>
-                        <!-- <up-form-item borderBottom label="委托企业" required prop="delegateInfo" id="delegateInfopppp">
-                            <view v-if="!Enterprise" @click="$u.route({ type: 'navigateTo', url: '/plant/port/por-torganism/index' })" class="w-100% d-flex a-c j-c pd-24 b-radius bg-#FBFDFB border-#AFDDBB">
-                                <view class=""></view>
-                                <view class="f-s-34 c-primary">请选择委托企业</view>
-                            </view>
-                            <view v-if="Enterprise" class="pd-24 d-flex flex-cln bg-#FBFDFB border-#37A954 b-radius mb-20 w-100% p-rtv">
-                                <up-icon @click="Enterprise = null" size="26rpx" color="red" name="close" style="position: absolute; right: 10rpx; top: 10rpx"></up-icon>
-                                <view class="">
-                                    <text class="c-#333 f-s-34 f-w-5 mr-5">{{ form?.delegateInfo?.cusName }}</text>
-                                </view>
-                                <view class="mb-20">
-                                    <text class="c-#666 f-s-24">{{ form?.delegateInfo?.crediteCode }}</text>
-                                </view>
-                            </view>
-                        </up-form-item> -->
                         <up-form-item v-if="+(form?.delegateFlag ?? 0)" borderBottom label="委托企业" prop="delegateInfo">
                             <view class="flex1">
                                 <ContactUnitInput v-model="form.delegateInfo.cpyid" v-model:info="form.delegate" :params="{ cpyType: '1' }" title="选择委托企业" placeholder="请选择委托企业信息"></ContactUnitInput>
@@ -242,15 +240,28 @@
                             </view>
                         </up-form-item>
                         <view class="h-1" id="plantpppp"></view>
-                        <up-form-item borderBottom label="养殖量" required prop="plant">
-                            <up-input v-model="form.plant.plantingMgAmount" placeholder="请输入养殖量" border="none"></up-input>
-                            <ut-action-sheet v-model="form.plant.plantingMgUnit" :tabs="pt_planting_mg_unit" title="选择单位">
-                                <view class="d-flex a-c">
-                                    <view v-if="form.plant?.plantingMgUnit" class="f-s-30 c-333 f-w-5 w-100">{{ selectDictLabel(pt_planting_mg_unit, form.plant?.plantingMgUnit) }}</view>
-                                    <view v-else class="f-s-30 c-ccc f-w-4 w-100">单位</view>
-                                    <up-icon size="22rpx" color="#2A6D52" name="arrow-down-fill"></up-icon>
-                                </view>
-                            </ut-action-sheet>
+                        <up-form-item label="养殖量" required class="form-item-bottom-padding-0">
+                            <div class="flex1 d-flex">
+                                <div class="flex1 ov-hd" id="plantingMgAmountpppp">
+                                    <up-form-item prop="plantingMgAmount" border-bottom class="form-item-top-padding-0">
+                                        <up-input v-model="form.plantingMgAmount" placeholder="请输入养殖量" border="none" clearable></up-input>
+                                    </up-form-item>
+                                </div>
+                                <div class="pd-5" id="plantingMgUnitpppp"></div>
+                                <div class="min-w-200">
+                                    <ut-action-sheet v-model="form.plantingMgUnit" :tabs="pt_planting_mg_unit" title="选择单位">
+                                        <up-form-item prop="plantingMgUnit" border-bottom class="form-item-top-padding-0">
+                                            <view class="flex1" style="line-height: 24px">
+                                                <view v-if="form.plantingMgUnit" class="f-s-30 c-333 f-w-5 text-center">{{ selectDictLabel(pt_planting_mg_unit, form.plantingMgUnit) }}</view>
+                                                <view v-else class="f-s-30 c-ccc f-w-4 text-center">单位</view>
+                                            </view>
+                                            <template #right>
+                                                <up-icon size="22rpx" color="#2A6D52" name="arrow-down-fill"></up-icon>
+                                            </template>
+                                        </up-form-item>
+                                    </ut-action-sheet>
+                                </div>
+                            </div>
                         </up-form-item>
                         <up-form-item borderBottom label="备注" prop="remark" id="remarkpppp">
                             <up-input v-model="form.remark" placeholder="请输入备注" border="none"></up-input>
@@ -330,16 +341,28 @@
                                 <view class="c-#333 f-s-32 f-w-5">亩</view>
                             </view>
                         </up-form-item>
-                        <view class="h-1" id="plantpppp"></view>
-                        <up-form-item borderBottom label="种植量" required prop="plant">
-                            <up-input v-model="form.plant.plantingMgAmount" placeholder="请输入种植量" border="none"></up-input>
-                            <ut-action-sheet v-model="form.plant.plantingMgUnit" :tabs="pt_scale_unit" title="选择单位">
-                                <view class="d-flex a-c">
-                                    <view v-if="form.plant?.plantingMgUnit" class="f-s-30 c-333 f-w-5 w-100">{{ selectDictLabel(pt_scale_unit, form.plant?.plantingMgUnit) }}</view>
-                                    <view v-else class="f-s-30 c-ccc f-w-4 w-100">单位</view>
-                                    <up-icon size="22rpx" color="#2A6D52" name="arrow-down-fill"></up-icon>
-                                </view>
-                            </ut-action-sheet>
+                        <up-form-item label="种植量" required class="form-item-bottom-padding-0">
+                            <div class="flex1 d-flex">
+                                <div class="flex1 ov-hd" id="plantingMgAmountpppp">
+                                    <up-form-item prop="plantingMgAmount" border-bottom class="form-item-top-padding-0">
+                                        <up-input v-model="form.plantingMgAmount" placeholder="请输入种植量" border="none" clearable></up-input>
+                                    </up-form-item>
+                                </div>
+                                <div class="pd-5" id="plantingMgUnitpppp"></div>
+                                <div class="min-w-200">
+                                    <ut-action-sheet v-model="form.plantingMgUnit" :tabs="pt_area_unit" title="选择单位">
+                                        <up-form-item prop="unit" border-bottom class="form-item-top-padding-0">
+                                            <view class="flex1" style="line-height: 24px">
+                                                <view v-if="form.plantingMgUnit" class="f-s-30 c-333 f-w-5 text-center">{{ selectDictLabel(pt_area_unit, form.plantingMgUnit) }}</view>
+                                                <view v-else class="f-s-30 c-ccc f-w-4 text-center">单位</view>
+                                            </view>
+                                            <template #right>
+                                                <up-icon size="22rpx" color="#2A6D52" name="arrow-down-fill"></up-icon>
+                                            </template>
+                                        </up-form-item>
+                                    </ut-action-sheet>
+                                </div>
+                            </div>
                         </up-form-item>
                         <view class="h-1" id="queryType6pppp"></view>
                         <up-form-item :borderBottom="false" label="种植时间" required prop="queryType6">
@@ -534,31 +557,63 @@
                                 <view class="c-#333 f-s-32 f-w-5">{{ form.plantingUnit }}</view>
                             </view>
                         </up-form-item>
-                        <up-form-item v-if="+deawerData?.data[0]?.landType == 3" borderBottom label="接种数量" required prop="inoculation.inoculationAmount" id="inoculationpppp">
-                            <view class="d-flex a-c j-sb w-100%">
-                                <up-input style="padding-left: 0" v-model="form.inoculation.inoculationAmount" placeholder="请输入接种数量" border="none"></up-input>
-                                <ut-action-sheet v-model="form.inoculation.inoculationUnit" :tabs="pt_inoculation_unit" title="选择单位">
-                                    <view class="d-flex a-c">
-                                        <view v-if="form.inoculation?.inoculationUnit" class="f-s-30 c-333 f-w-5 w-100">{{ selectDictLabel(pt_inoculation_unit, form.inoculation?.inoculationUnit) }}</view>
-                                        <view v-else class="f-s-30 c-ccc f-w-4 w-100">单位</view>
-                                        <up-icon size="22rpx" color="#2A6D52" name="arrow-down-fill"></up-icon>
-                                    </view>
-                                </ut-action-sheet>
-                            </view>
+                        <up-form-item v-if="+deawerData?.data[0]?.landType == 3" label="接种数量" required class="form-item-bottom-padding-0">
+                            <div class="flex1 d-flex">
+                                <div class="flex1 ov-hd" id="plantingMgAmountpppp">
+                                    <up-form-item prop="inoculationAmount" border-bottom class="form-item-top-padding-0">
+                                        <up-input v-model="form.inoculationAmount" placeholder="请输入接种数量" border="none" clearable></up-input>
+                                    </up-form-item>
+                                </div>
+                                <div class="pd-5" id="plantingMgUnitpppp"></div>
+                                <div class="min-w-200">
+                                    <ut-action-sheet v-model="form.inoculationUnit" :tabs="pt_inoculation_unit" title="选择单位">
+                                        <up-form-item prop="unit" border-bottom class="form-item-top-padding-0">
+                                            <view class="flex1" style="line-height: 24px">
+                                                <view v-if="form.inoculationUnit" class="f-s-30 c-333 f-w-5 text-center">{{ selectDictLabel(pt_inoculation_unit, form.inoculationUnit) }}</view>
+                                                <view v-else class="f-s-30 c-ccc f-w-4 text-center">单位</view>
+                                            </view>
+                                            <template #right>
+                                                <up-icon size="22rpx" color="#2A6D52" name="arrow-down-fill"></up-icon>
+                                            </template>
+                                        </up-form-item>
+                                    </ut-action-sheet>
+                                </div>
+                            </div>
                         </up-form-item>
-                        <up-form-item v-if="+deawerData?.data[0]?.landType == 3" borderBottom label="接种剂量" required prop="inoculation.inoculationDosage" id="inoculationpppp">
-                            <view class="d-flex a-c j-sb w-100%">
-                                <up-input style="padding-left: 0" v-model="form.inoculation.inoculationDosage" placeholder="请输入接种剂量" border="none"></up-input>
-                                <ut-action-sheet v-model="form.inoculation.inoculationDosageUnit" :tabs="pt_inoculation_dosage_unit" title="选择单位">
-                                    <view class="d-flex a-c">
-                                        <view v-if="form.inoculation?.inoculationDosageUnit" class="f-s-30 c-333 f-w-5 w-100">{{ selectDictLabel(pt_inoculation_dosage_unit, form.inoculation?.inoculationDosageUnit) }}</view>
-                                        <view v-else class="f-s-30 c-ccc f-w-4 w-100">单位</view>
-                                        <up-icon size="22rpx" color="#2A6D52" name="arrow-down-fill"></up-icon>
-                                    </view>
-                                </ut-action-sheet>
-                                <view v-if="form.inoculation?.inoculationUnit">/</view>
-                                <view v-if="form.inoculation?.inoculationUnit" class="f-s-30 c-333 f-w-5 w-100" style="text-align: right">{{ selectDictLabel(pt_inoculation_unit, form.inoculation?.inoculationUnit) }}</view>
-                            </view>
+                        <up-form-item v-if="+deawerData?.data[0]?.landType == 3" label="接种剂量" required class="form-item-bottom-padding-0">
+                            <div class="flex1 d-flex">
+                                <div class="flex1 ov-hd">
+                                    <up-form-item prop="inoculationDosage" border-bottom class="form-item-top-padding-0">
+                                        <up-input v-model="form.inoculationDosage" placeholder="请输入接种剂量" border="none" clearable></up-input>
+                                    </up-form-item>
+                                </div>
+                                <div class="pd-5"></div>
+                                <div class="min-w-200">
+                                    <ut-action-sheet v-model="form.inoculationDosageUnit" :tabs="pt_inoculation_dosage_unit" title="选择单位">
+                                        <up-form-item prop="specUnit" border-bottom class="form-item-top-padding-0">
+                                            <view class="flex1" style="line-height: 24px">
+                                                <view v-if="form.inoculationDosageUnit" class="f-s-30 c-333 f-w-5 text-center">{{ selectDictLabel(pt_inoculation_dosage_unit, form.inoculationDosageUnit) }}</view>
+                                                <view v-else class="f-s-30 c-ccc f-w-4 text-center">单位</view>
+                                            </view>
+                                            <template #right>
+                                                <up-icon class="mr-10" size="22rpx" color="#2A6D52" name="arrow-down-fill"></up-icon>
+                                            </template>
+                                        </up-form-item>
+                                    </ut-action-sheet>
+                                </div>
+                                <div class="pd2-0-10 c-#ccc d-flex d-c a-c">/</div>
+                                <div class="min-w-200">
+                                    <up-form-item prop="unit" border-bottom class="form-item-top-padding-0">
+                                        <view class="flex1" style="line-height: 24px">
+                                            <view v-if="form.inoculationUnit" class="f-s-30 c-333 f-w-5 text-center">{{ selectDictLabel(pt_inoculation_unit, form.inoculationUnit) }}</view>
+                                            <view v-else class="f-s-30 c-ccc f-w-4 text-center">单位</view>
+                                        </view>
+                                        <template #right>
+                                            <up-icon size="22rpx" color="#fff" name="arrow-down-fill"></up-icon>
+                                        </template>
+                                    </up-form-item>
+                                </div>
+                            </div>
                         </up-form-item>
                         <view class="h-1" id="plantpppp"></view>
                         <up-form-item v-if="+deawerData?.data[0]?.landType == 3" borderBottom label="繁育量" prop="plant">
@@ -567,7 +622,7 @@
                                 <view v-if="plantingMgUnit" class="f-s-30 c-333 f-w-5 w-100">{{ selectDictLabel(pt_inoculation_dosage_unit, plantingMgUnit) }}</view>
                             </view>
                         </up-form-item>
-                        <up-form-item v-else borderBottom label="繁育量" required prop="plant">
+                        <!-- <up-form-item v-else borderBottom label="繁育量" required prop="plant">
                             <up-input v-model="form.plant.plantingMgAmount" placeholder="请输入繁育量" border="none"></up-input>
                             <ut-action-sheet v-model="form.plant.plantingMgUnit" :tabs="pt_feed_amount_unit" title="选择单位">
                                 <view class="d-flex a-c">
@@ -576,6 +631,29 @@
                                     <up-icon size="22rpx" color="#2A6D52" name="arrow-down-fill"></up-icon>
                                 </view>
                             </ut-action-sheet>
+                        </up-form-item> -->
+                        <up-form-item v-else label="繁育量" required class="form-item-bottom-padding-0">
+                            <div class="flex1 d-flex">
+                                <div class="flex1 ov-hd" id="plantingMgAmountpppp">
+                                    <up-form-item prop="plantingMgAmount" border-bottom class="form-item-top-padding-0">
+                                        <up-input v-model="form.plantingMgAmount" placeholder="请输入繁育量" border="none" clearable></up-input>
+                                    </up-form-item>
+                                </div>
+                                <div class="pd-5" id="plantingMgUnitpppp"></div>
+                                <div class="min-w-200">
+                                    <ut-action-sheet v-model="form.plantingMgUnit" :tabs="pt_feed_amount_unit" title="选择单位">
+                                        <up-form-item prop="plantingMgUnit" border-bottom class="form-item-top-padding-0">
+                                            <view class="flex1" style="line-height: 24px">
+                                                <view v-if="form.plantingMgUnit" class="f-s-30 c-333 f-w-5 text-center">{{ selectDictLabel(pt_feed_amount_unit, form.plantingMgUnit) }}</view>
+                                                <view v-else class="f-s-30 c-ccc f-w-4 text-center">单位</view>
+                                            </view>
+                                            <template #right>
+                                                <up-icon size="22rpx" color="#2A6D52" name="arrow-down-fill"></up-icon>
+                                            </template>
+                                        </up-form-item>
+                                    </ut-action-sheet>
+                                </div>
+                            </div>
                         </up-form-item>
                         <up-form-item borderBottom label="培养基配方" prop="cultureMediumFormula" id="cultureMediumFormulapppp">
                             <Go_button v-if="!Biological" @click="gotoTorganism(1)" title="请选择培养基配方" style="flex: 1" />
@@ -734,10 +812,8 @@ const form = ref<PlantationTaskForm>({
         plannedStartDate: null,
         plannedEndDate: null,
     },
-    plant: {
-        plantingMgAmount: null,
-        plantingMgUnit: null,
-    },
+    plantingMgAmount: null,
+    plantingMgUnit: null,
     plantingAmount: '',
     remark: null,
     delegateFlag: '0',
@@ -747,12 +823,10 @@ const form = ref<PlantationTaskForm>({
     sowingMethod: null,
     transplantMethod: null,
     preCropId: null,
-    inoculation: {
-        inoculationAmount: null,
-        inoculationUnit: null,
-        inoculationDosage: null,
-        inoculationDosageUnit: null,
-    },
+    inoculationAmount: null,
+    inoculationUnit: null,
+    inoculationDosage: null,
+    inoculationDosageUnit: null,
     cultureMediumFormula: null,
 });
 const changeStartTime = () => {
@@ -876,17 +950,22 @@ const validatePlantingAmount = (rule: any, value: any, callback: any) => {
 };
 // 判断是否要填接种数量
 const validateinoculation = (rule: any, value: any, callback: any) => {
+    console.log(deawerData.value?.data[0]?.landType, 'deawerData.value?.data[0]?.landType');
     if (+deawerData.value?.data[0]?.landType == 3) {
-        if (!value || value.trim() === '') {
-            callback(new Error('请输入接种数量'));
-            return;
-        }
-        // 检查单位是否选择
-        if (!form.value.inoculation?.inoculationUnit) {
+        console.log(form.value, 'form.value');
+
+        if (!form.value?.inoculationUnit) {
+            console.log(form.value?.inoculationUnit, 'form.value?.inoculationUnit');
+
             callback(new Error('请选择接种数量单位'));
             return;
         }
+        if (!form.value?.inoculationAmount || form.value?.inoculationAmount.trim() === '') {
+            console.log(form.value?.inoculationAmount, 'form.value?.inoculationAmount');
 
+            callback(new Error('请输入接种数量'));
+            return;
+        }
         callback();
     } else {
         callback();
@@ -895,13 +974,17 @@ const validateinoculation = (rule: any, value: any, callback: any) => {
 const validateInoculationDosage = (rule: any, value: any, callback: any) => {
     if (+deawerData.value?.data[0]?.landType == 3) {
         // value 就是 form.inoculation.inoculationDosage 的值
-        if (!value || value.trim() === '') {
+        if (!form.value?.inoculationDosage || form.value?.inoculationDosage.trim() === '') {
+            console.log(form.value?.inoculationDosage, 'form.value?.inoculationDosage');
+
             callback(new Error('请输入接种剂量'));
             return;
         }
+        console.log(form.value);
 
         // 检查单位是否选择
-        if (!form.value.inoculation?.inoculationDosageUnit) {
+        if (!form.value?.inoculationDosageUnit) {
+            console.log(form.value?.inoculationDosageUnit, 'form.value?.inoculationDosageUnit');
             callback(new Error('请选择接种剂量单位'));
             return;
         }
@@ -935,7 +1018,8 @@ const rules = reactive({
     queryType6: [{ validator: validateBreedingTime, trigger: 'blur' }],
     plantingAmount: [{ required: true, message: '请输入养殖面积' }],
     breedScale: [{ required: true, message: '请输入养殖区域' }],
-    plant: [{ validator: validateBreedingAmount, trigger: 'blur' }],
+    plantingMgUnit: [{ required: true, message: '请选择养殖单位' }],
+    plantingMgAmount: [{ required: true, message: '请输入养殖量' }],
     remark: [{ required: false, message: '请输入备注' }],
 });
 const rules1 = reactive({
@@ -951,7 +1035,8 @@ const rules1 = reactive({
     queryType6: [{ validator: validateBreedingTime, trigger: 'blur' }],
     plantingAmount: [{ required: true, message: '请输入养殖面积' }],
     breedScale: [{ required: true, message: '请输入养殖区域' }],
-    plant: [{ validator: validateBreedingAmount, trigger: 'blur' }],
+    plantingMgUnit: [{ required: true, message: '请选择养殖单位' }],
+    plantingMgAmount: [{ required: true, message: '请输入养殖量' }],
     remark: [{ required: false, message: '请输入备注' }],
 });
 const rules2 = reactive({
@@ -964,7 +1049,8 @@ const rules2 = reactive({
     plantationMethod: [{ required: false, message: '请选择种植方式' }],
     queryType6: [{ validator: validateBreedingTime, trigger: 'blur' }],
     plantingAmount: [{ required: true, message: '请输入种植面积' }],
-    plant: [{ validator: validateBreedingAmount, trigger: 'blur' }],
+    plantingMgUnit: [{ required: true, message: '请选择种植单位' }],
+    plantingMgAmount: [{ required: true, message: '请输入种植量' }],
     remark: [{ required: false, message: '请输入备注' }],
     preCropId: [{ required: false, message: '请选择前茬植物' }],
     reproductionType: [{ required: true, message: '请选择选择繁殖方式' }],
@@ -981,9 +1067,12 @@ const rules3 = reactive({
     plantationMethod: [{ required: false, message: '请选择繁育方式' }],
     queryType6: [{ validator: validateBreedingTime, trigger: 'blur' }],
     plantingAmount: [{ validator: validatePlantingAmount, trigger: 'blur' }],
-    plant: [{ validator: validateBreedingAmount, trigger: 'blur' }],
-    'inoculation.inoculationAmount': [{ validator: validateinoculation, trigger: 'blur' }],
-    'inoculation.inoculationDosage': [{ validator: validateInoculationDosage, trigger: 'blur' }],
+    plantingMgUnit: [{ required: true, message: '请选择繁育单位' }],
+    plantingMgAmount: [{ required: true, message: '请输入繁育数量' }],
+    inoculationAmount: [{ validator: validateinoculation }],
+    inoculationUnit: [{ validator: validateinoculation }],
+    inoculationDosage: [{ validator: validateInoculationDosage }],
+    inoculationDosageUnit: [{ validator: validateInoculationDosage }],
     remark: [{ required: false, message: '请输入备注' }],
     preCropId: [{ required: false, message: '请选择前茬植物' }],
     reproductionType: [{ required: true, message: '请选择选择繁殖方式' }],
@@ -1072,12 +1161,10 @@ const save = () => {
                 form.value.delegateInfo = null as any;
                 form.value.delegate = null as any;
             }
-            console.log(form.value.plant, 'form.value.plant');
 
             const params = {
                 ...form.value,
                 ...form.value.queryType6,
-                ...form.value.plant,
                 ...form.value.inoculation,
                 animalIds: animalIds.value,
             };
@@ -1116,8 +1203,6 @@ const saveDraft = () => {
             const params = {
                 ...form.value,
                 ...form.value.queryType6,
-                ...form.value.plant,
-                ...form.value.inoculation,
                 animalIds: animalIds.value,
             };
             if (form.value?.delegate?.cusCode) {
@@ -1195,8 +1280,8 @@ const plantingMgAmount = computed(() => {
         return '';
     }
 
-    const inoculationAmount = Number(form.value?.inoculation?.inoculationAmount);
-    const inoculationDosage = Number(form.value?.inoculation?.inoculationDosage);
+    const inoculationAmount = Number(form.value?.inoculationAmount);
+    const inoculationDosage = Number(form.value?.inoculationDosage);
 
     // 如果任一值为无效数字,返回空字符串
     if (!inoculationAmount || !inoculationDosage || isNaN(inoculationAmount) || isNaN(inoculationDosage)) {
@@ -1204,15 +1289,15 @@ const plantingMgAmount = computed(() => {
     }
 
     const result = inoculationAmount * inoculationDosage;
-    form.value.plant.plantingMgAmount = result;
+    form.value.plantingMgAmount = result;
     // 返回计算结果,保持数字类型或空字符串
     return isNaN(result) ? '' : result;
 });
 // 如果是组培实验室的话,繁育量单位是一个计算属性
 const plantingMgUnit = computed(() => {
     if (Number(deawerData.value?.data?.[0]?.landType) == 3) {
-        form.value.plant.plantingMgUnit = form.value.inoculation?.inoculationDosageUnit || null;
-        return form.value.plant.plantingMgUnit;
+        form.value.plantingMgUnit = form.value?.inoculationDosageUnit || null;
+        return form.value.plantingMgUnit;
     }
     return null;
 });
@@ -1281,21 +1366,11 @@ const getCache = async (taskType: TaskType | null) => {
         plannedStartDate: res.data.plannedStartDate,
         plannedEndDate: res.data.plannedEndDate,
     };
-    form.value.inoculation = {
-        inoculationAmount: res.data.inoculationAmount,
-        inoculationDosage: res.data.inoculationDosage,
-        inoculationUnit: res.data.inoculationUnit,
-        inoculationDosageUnit: res.data.inoculationDosageUnit,
-    };
-    form.value.plant = {
-        plantingMgAmount: res.data.plantingMgAmount,
-        plantingMgUnit: res.data.plantingMgUnit,
-    };
+
     form.value.delegate = {
         cusCode: form.value.delegateInfo?.cusCode,
         cusName: form.value.delegateInfo?.cusName,
     };
-    console.log(form.value.delegate);
 
     if (res.data.animalIds) {
         animalIds.value = res.data.animalIds;
@@ -1341,21 +1416,10 @@ const getInfo = async (taskId: any) => {
     const res = await useClientRequest.get<any>(`/plt-api/app/plantationTask/getInfo/${taskId}`);
     if (!res.data) return;
     form.value = res.data;
-
     form.value.queryType6 = {
         plannedStartDate: res.data.plannedStartDate,
         plannedEndDate: res.data.plannedEndDate,
     };
-    form.value.inoculation = {
-        inoculationAmount: res.data.inoculationAmount,
-        inoculationDosage: res.data.inoculationDosage,
-        inoculationUnit: res.data.inoculationUnit,
-        inoculationDosageUnit: res.data.inoculationDosageUnit,
-    };
-    form.value.plant = {
-        plantingMgAmount: res.data.plantingMgAmount,
-        plantingMgUnit: res.data.plantingMgUnit,
-    };
     form.value.delegate = {
         cusCode: form.value.delegateInfo?.cusCode,
         cusName: form.value.delegateInfo?.cusName,
@@ -1407,3 +1471,16 @@ onMounted(() => {
     }
 });
 </script>
+<style lang="scss">
+:deep(.form-item-top-padding-0) {
+    > .u-form-item__body {
+        padding-top: 0rpx;
+    }
+}
+
+:deep(.form-item-bottom-padding-0) {
+    > .u-form-item__body {
+        padding-bottom: 0rpx;
+    }
+}
+</style>

+ 6 - 1
src/plant/port/port-create/models/types.ts

@@ -99,7 +99,8 @@ export interface PlantationTaskForm {
     plantingUnit: string | null;
     breedScale: string | number | null;
     queryType6: TimeRange;
-    plant: PlantInfo;
+    plantingMgUnit: any;
+    plantingMgAmount: any;
     plantingAmount: string;
     remark: string | null;
     // 条件字段(根据任务类型可选)
@@ -111,6 +112,10 @@ export interface PlantationTaskForm {
     transplantMethod?: any; // 仅种植和种苗繁育,当reproductionType=2时
     preCropId?: string | null; // 仅种植和种苗繁育
     inoculation?: InoculationInfo; // 仅种苗繁育,当landType=3时
+    inoculationAmount: any;
+    inoculationUnit: any;
+    inoculationDosage: any;
+    inoculationDosageUnit: any;
     cultureMediumFormula?: string | null; // 仅种苗繁育
 }
 

+ 127 - 0
src/plant/port/port-harvest-create/index.vue

@@ -0,0 +1,127 @@
+<template>
+    <z-paging ref="paging" v-model="list" bgColor="#f7f7f7" @query="query" safe-area-inset-bottom>
+        <template #top>
+            <ut-navbar title="新增采收入库" :fixed="false"> </ut-navbar>
+        </template>
+        <view class="pt-24">
+            <up-form class="p-rtv" labelPosition="top" :model="form" :rules="rules" labelWidth="auto" ref="upFormRef">
+                <view class="startline-title pl-24 ml-24 mb-16">管理记录信息</view>
+                <view class="bg-#fff pd-24 mb-20">
+                    <!-- 操作日期 -->
+                    <view class="h-1" id="operationDatepppp"></view>
+                    <!-- 采收类型 -->
+                    <ut-action-sheet v-model="form.opMethod" :tabs="pt_op_method" title="选择操作类型" mode="custom">
+                        <up-form-item borderBottom label="操作类型" required prop="opMethod" id="opMethodpppp">
+                            <view v-if="form.opMethod" class="f-s-30 c-333 f-w-5 flex1">{{ selectDictLabel(pt_op_method, form.opMethod) }}</view>
+                            <view v-else class="f-s-30 c-ccc f-w-4 flex1">请选择采收类型</view>
+                            <template #right>
+                                <up-icon size="22rpx" color="#2A6D52" name="arrow-down-fill"></up-icon>
+                            </template>
+                        </up-form-item>
+                    </ut-action-sheet>
+                    <!-- 种源类型 -->
+                    <ut-action-sheet v-model="form.opMethod" :tabs="pt_op_method" title="选择操作类型" mode="custom">
+                        <up-form-item borderBottom label="操作类型" required prop="opMethod" id="opMethodpppp">
+                            <view v-if="form.opMethod" class="f-s-30 c-333 f-w-5 flex1">{{ selectDictLabel(pt_op_method, form.opMethod) }}</view>
+                            <view v-else class="f-s-30 c-ccc f-w-4 flex1">请选择种源类型</view>
+                            <template #right>
+                                <up-icon size="22rpx" color="#2A6D52" name="arrow-down-fill"></up-icon>
+                            </template>
+                        </up-form-item>
+                    </ut-action-sheet>
+                    <!-- 菌种/菌株编号 -->
+                    <up-form-item borderBottom label="菌种/菌株编号" required prop="cusOp" id="cusOppppp">
+                        <up-input v-model="form.cusOp" placeholder="请输入菌种/菌株编号" border="none"></up-input>
+                    </up-form-item>
+                    <!-- 采收日期 -->
+                    <up-form-item :borderBottom="false" label="采收日期">
+                        <up-form-item :borderBottom="false" required prop="activityStart">
+                            <ut-datetime-picker v-model="form.activityStart" mode="date" dateFields="day" @change="changeStartTime">
+                                <view class="d-flex mr-20">
+                                    <up-input v-model="form.activityStart" placeholder="请选择采收开始时间" border="bottom" :customStyle="{ paddingLeft: '0rpx' }"></up-input>
+                                    <up-icon size="22rpx" color="#2A6D52" name="arrow-down-fill" style="margin-left: -20rpx"></up-icon>
+                                </view>
+                            </ut-datetime-picker>
+                        </up-form-item>
+                        <up-form-item :borderBottom="false" required prop="activityEnd">
+                            <ut-datetime-picker v-model="form.activityEnd" mode="date" dateFields="day">
+                                <view class="d-flex">
+                                    <up-input v-model="form.activityEnd" placeholder="请选择采收结束时间" border="bottom" :customStyle="{ paddingLeft: '0rpx' }"></up-input>
+                                    <up-icon size="22rpx" color="#2A6D52" name="arrow-down-fill" style="margin-left: -20rpx"></up-icon>
+                                </view>
+                            </ut-datetime-picker>
+                        </up-form-item>
+                    </up-form-item>
+                    <!-- 采收批号 -->
+                    <up-form-item borderBottom label="采收批号" required prop="plantationCode" id="plantationCodepppp">
+                        <view class="d-flex a-c j-sb w-100%">
+                            <view v-if="!form.plantationCode" class="flex1 c-#999">请生成采收批号</view>
+                            <view v-else class="flex1 c-#333">{{ form.plantationCode }}</view>
+                            <up-button @click="randomCode" class="c-#fff" type="primary" style="height: 50rpx; width: 130rpx">随机生成</up-button>
+                        </view>
+                    </up-form-item>
+                    <!-- 采收量 -->
+                    <up-form-item label="采收量" required class="form-item-bottom-padding-0">
+                        <div class="flex1 d-flex">
+                            <div class="flex1 ov-hd" id="plantingMgAmountpppp">
+                                <up-form-item prop="plantingMgAmount" border-bottom class="form-item-top-padding-0">
+                                    <up-input v-model="form.plantingMgAmount" placeholder="请输入采收量" border="none" clearable></up-input>
+                                </up-form-item>
+                            </div>
+                            <div class="pd-5" id="plantingMgUnitpppp"></div>
+                            <div class="min-w-200">
+                                <ut-action-sheet v-model="form.plantingMgUnit" :tabs="pt_planting_mg_unit" title="选择单位">
+                                    <up-form-item prop="plantingMgUnit" border-bottom class="form-item-top-padding-0">
+                                        <view class="flex1" style="line-height: 24px">
+                                            <view v-if="form.plantingMgUnit" class="f-s-30 c-333 f-w-5 text-center">{{ selectDictLabel(pt_planting_mg_unit, form.plantingMgUnit) }}</view>
+                                            <view v-else class="f-s-30 c-ccc f-w-4 text-center">单位</view>
+                                        </view>
+                                        <template #right>
+                                            <up-icon size="22rpx" color="#2A6D52" name="arrow-down-fill"></up-icon>
+                                        </template>
+                                    </up-form-item>
+                                </ut-action-sheet>
+                            </div>
+                        </div>
+                    </up-form-item>
+                    <!-- 采收负责人 -->
+                    <up-form-item borderBottom label="采收负责人" required prop="mgName" id="namepppp">
+                        <view class="d-flex a-c j-sb w-100%">
+                            <up-input style="padding-left: 0" v-model="form.mgName" placeholder="请输入采收负责人" border="none"></up-input>
+                        </view>
+                    </up-form-item>
+                    <!-- 采收方式 -->
+                    <ut-action-sheet v-model="form.opMethod" :tabs="pt_op_method" title="选择采收方式" mode="custom">
+                        <up-form-item borderBottom label="采收方式" required prop="opMethod" id="opMethodpppp">
+                            <view v-if="form.opMethod" class="f-s-30 c-333 f-w-5 flex1">{{ selectDictLabel(pt_op_method, form.opMethod) }}</view>
+                            <view v-else class="f-s-30 c-ccc f-w-4 flex1">请选择采收方式</view>
+                            <template #right>
+                                <up-icon size="22rpx" color="#2A6D52" name="arrow-down-fill"></up-icon>
+                            </template>
+                        </up-form-item>
+                    </ut-action-sheet>
+                    <!-- 采收地块 -->
+                    <up-form-item :borderBottom="false" label="操作地块" prop="landIds" id="baseIdpppp">
+                        <view v-if="!deawerData" class="w-100% d-flex a-c j-c pd-24 b-radius bg-#FBFDFB border-#AFDDBB" @click="goSelectBase()">
+                            <view class=""></view>
+                            <view class="f-s-34 c-primary">请选择操作地块</view>
+                        </view>
+                        <view class="w-100%" v-else>
+                            <Baseinfo :modeValue="deawerData" @close="handleBaseinfoClose" :baseType="'1'" />
+                        </view>
+                    </up-form-item>
+                    <!-- 操作方式 -->
+                    <up-form-item borderBottom label="操作方式" prop="opRemark" id="opRemarkpppp">
+                        <up-input v-model="form.opRemark" placeholder="如:人工锄草、机械中耕、喷雾器叶面喷施等" border="none"></up-input>
+                    </up-form-item>
+                    <up-form-item label="过程图片" prop="imgs" borderBottom id="imgspppp">
+                        <ut-upload v-model="form.imgs" :max-count="9" accept="image"></ut-upload>
+                    </up-form-item>
+                    <up-form-item label="过程视频" prop="videos" borderBottom id="videospppp">
+                        <ut-upload v-model="form.videos" :max-count="9" accept="video"></ut-upload>
+                    </up-form-item>
+                </view>
+            </up-form>
+        </view>
+    </z-paging>
+</template>

+ 19 - 38
src/plant/storage/agro-product/info-edit/index.vue

@@ -1,9 +1,7 @@
 <template>
-    <z-paging class="" ref="paging" bgColor="#fff" paging-class="paging-btm-shadow" safe-area-inset-bottom
-        scroll-with-animation>
+    <z-paging class="" ref="paging" bgColor="#fff" paging-class="paging-btm-shadow" safe-area-inset-bottom scroll-with-animation>
         <template #top>
-            <ut-navbar :title="optionsParam?.mode == 'edit' ? '编辑农资入库信息' : '添加农资入库信息'" :fixed="false"
-                border></ut-navbar>
+            <ut-navbar :title="optionsParam?.mode == 'edit' ? '编辑农资入库信息' : '添加农资入库信息'" :fixed="false" border></ut-navbar>
         </template>
         <view class="pd-24">
             <up-form class="p-rtv" labelPosition="top" :model="form" :rules="rules" labelWidth="auto" ref="upFormRef">
@@ -15,9 +13,7 @@
                 <view class="h-1" id="materialTypepppp"></view>
                 <ut-action-sheet :tabs="pt_material_type" mode="custom" title="农资类别" v-model="form.materialType">
                     <up-form-item borderBottom label="农资类别" required prop="materialType">
-                        <view v-if="form.materialType" class="f-s-30 c-333 f-w-5 flex1">{{
-                            selectDictLabel(pt_material_type,
-                            form.materialType) }}</view>
+                        <view v-if="form.materialType" class="f-s-30 c-333 f-w-5 flex1">{{ selectDictLabel(pt_material_type, form.materialType) }}</view>
                         <view v-else class="f-s-30 c-ccc f-w-4 flex1">请选择农资类别</view>
                         <template #right>
                             <up-icon size="22rpx" color="#2A6D52" name="arrow-down-fill"></up-icon>
@@ -28,12 +24,11 @@
                 <!-- 入库数量与单位 -->
                 <view class="h-1" id="capacitypppp"></view>
                 <view class="h-1" id="unitpppp"></view>
-                <up-form-item label="入库量" prop="capacity" required class="form-item-bottom-padding-0">
+                <up-form-item label="入库量" required class="form-item-bottom-padding-0">
                     <div class="flex1 d-flex">
                         <div class="flex1 ov-hd">
                             <up-form-item prop="capacity" border-bottom class="form-item-top-padding-0">
-                                <up-input v-model="form.capacity" placeholder="请输入入库量" border="none"
-                                    clearable></up-input>
+                                <up-input v-model="form.capacity" placeholder="请输入入库量" border="none" clearable></up-input>
                             </up-form-item>
                         </div>
                         <div class="pd-5"></div>
@@ -41,8 +36,7 @@
                             <ut-action-sheet v-model="form.unit" :tabs="pt_materail_unit" mode="custom" title="选择单位">
                                 <up-form-item prop="unit" border-bottom class="form-item-top-padding-0">
                                     <view class="flex1" style="line-height: 24px">
-                                        <view v-if="form.unit" class="f-s-30 c-333 f-w-5 text-center">{{
-                                            selectDictLabel(pt_materail_unit, form.unit) }}</view>
+                                        <view v-if="form.unit" class="f-s-30 c-333 f-w-5 text-center">{{ selectDictLabel(pt_materail_unit, form.unit) }}</view>
                                         <view v-else class="f-s-30 c-ccc f-w-4 text-center">单位</view>
                                     </view>
                                     <template #right>
@@ -60,23 +54,19 @@
                         <div class="flex1 d-flex">
                             <div class="flex1 ov-hd">
                                 <up-form-item prop="spec" border-bottom class="form-item-top-padding-0">
-                                    <up-input v-model="form.spec" placeholder="请输入规格" border="none"
-                                        clearable></up-input>
+                                    <up-input v-model="form.spec" placeholder="请输入规格" border="none" clearable></up-input>
                                 </up-form-item>
                             </div>
                             <div class="pd-5"></div>
                             <div class="min-w-200">
-                                <ut-action-sheet v-model="form.specUnit" :tabs="pt_materail_spec_unit" mode="custom"
-                                    title="选择单位">
+                                <ut-action-sheet v-model="form.specUnit" :tabs="pt_materail_spec_unit" mode="custom" title="选择单位">
                                     <up-form-item prop="specUnit" border-bottom class="form-item-top-padding-0">
                                         <view class="flex1" style="line-height: 24px">
-                                            <view v-if="form.specUnit" class="f-s-30 c-333 f-w-5 text-center">{{
-                                                selectDictLabel(pt_materail_spec_unit, form.specUnit) }}</view>
+                                            <view v-if="form.specUnit" class="f-s-30 c-333 f-w-5 text-center">{{ selectDictLabel(pt_materail_spec_unit, form.specUnit) }}</view>
                                             <view v-else class="f-s-30 c-ccc f-w-4 text-center">单位</view>
                                         </view>
                                         <template #right>
-                                            <up-icon class="mr-10" size="22rpx" color="#2A6D52"
-                                                name="arrow-down-fill"></up-icon>
+                                            <up-icon class="mr-10" size="22rpx" color="#2A6D52" name="arrow-down-fill"></up-icon>
                                         </template>
                                     </up-form-item>
                                 </ut-action-sheet>
@@ -85,9 +75,7 @@
                             <div class="min-w-200">
                                 <up-form-item prop="unit" border-bottom class="form-item-top-padding-0">
                                     <view class="flex1" style="line-height: 24px">
-                                        <view v-if="form.unit" class="f-s-30 c-333 f-w-5 text-center">{{
-                                            selectDictLabel(pt_materail_unit,
-                                            form.unit) }}</view>
+                                        <view v-if="form.unit" class="f-s-30 c-333 f-w-5 text-center">{{ selectDictLabel(pt_materail_unit, form.unit) }}</view>
                                         <view v-else class="f-s-30 c-ccc f-w-4 text-center">单位</view>
                                     </view>
                                     <template #right>
@@ -102,8 +90,7 @@
                 <view class="h-1" id="sourceTypepppp"></view>
                 <ut-action-sheet :tabs="pt_source_type" mode="custom" title="农资来源" v-model="form.sourceType">
                     <up-form-item borderBottom label="农资来源" required prop="sourceType">
-                        <view v-if="form.sourceType" class="f-s-30 c-333 f-w-5 flex1">{{ selectDictLabel(pt_source_type,
-                            form.sourceType) }}</view>
+                        <view v-if="form.sourceType" class="f-s-30 c-333 f-w-5 flex1">{{ selectDictLabel(pt_source_type, form.sourceType) }}</view>
                         <view v-else class="f-s-30 c-ccc f-w-4 flex1">请选择农资来源</view>
                         <template #right>
                             <up-icon size="22rpx" color="#2A6D52" name="arrow-down-fill"></up-icon>
@@ -113,14 +100,12 @@
                 <template v-if="['1'].includes(form.sourceType as string)">
                     <up-form-item borderBottom label="供应商" prop="supplierId" required>
                         <view class="flex1">
-                            <ContactUnitInput v-model="form.supplierId" v-model:info="form.supplierInfo"
-                                :params="{ cpyType: '4' }" title="选择供应商" placeholder="请选择供应商信息"></ContactUnitInput>
+                            <ContactUnitInput v-model="form.supplierId" v-model:info="form.supplierInfo" :params="{ cpyType: '4' }" title="选择供应商" placeholder="请选择供应商信息"></ContactUnitInput>
                         </view>
                     </up-form-item>
                     <up-form-item borderBottom label="供应商是否是生产商" prop="supplierProducerFlag">
                         <up-radio-group v-model="form.supplierProducerFlag">
-                            <up-radio :customStyle="{ marginRight: '60rpx' }" v-for="(item, index) in yes_no"
-                                :key="index" :label="item.label" :name="item.value"></up-radio>
+                            <up-radio :customStyle="{ marginRight: '60rpx' }" v-for="(item, index) in yes_no" :key="index" :label="item.label" :name="item.value"></up-radio>
                         </up-radio-group>
                     </up-form-item>
                     <up-form-item borderBottom label="生产商" prop="producer">
@@ -132,8 +117,7 @@
                 </up-form-item>
                 <ut-datetime-picker v-model="form.productDate" :maxDate="new Date()" mode="date">
                     <up-form-item borderBottom label="生产日期" prop="productDate">
-                        <up-input v-model="form.productDate" readonly placeholder="请选择生产日期" border="none"
-                            clearable></up-input>
+                        <up-input v-model="form.productDate" readonly placeholder="请选择生产日期" border="none" clearable></up-input>
                         <template #right>
                             <up-icon size="22rpx" color="#2A6D52" name="arrow-down-fill"></up-icon>
                         </template>
@@ -157,8 +141,7 @@
                 </up-form-item>
                 <!-- 检验报告 -->
                 <up-form-item borderBottom label="检验报告" prop="examinReport">
-                    <ut-upload v-model="form.examinReport" :max-count="50" valueType="array"
-                        accept="image,file"></ut-upload>
+                    <ut-upload v-model="form.examinReport" :max-count="50" valueType="array" accept="image,file"></ut-upload>
                 </up-form-item>
             </up-form>
         </view>
@@ -174,9 +157,7 @@ import { AgroProductInstoreType } from '../models/type';
 import ContactUnitInput from '@/models/contact-unit-input/contact-unit-input.vue';
 
 const { proxy } = getCurrentInstance() as ComponentInternalInstance;
-const { pt_material_type, pt_source_type, pt_materail_unit, pt_materail_spec_unit, yes_no } = toRefs<any>(
-    proxy?.useDict('pt_material_type', 'pt_source_type', 'pt_materail_unit', 'pt_materail_spec_unit', 'yes_no'),
-);
+const { pt_material_type, pt_source_type, pt_materail_unit, pt_materail_spec_unit, yes_no } = toRefs<any>(proxy?.useDict('pt_material_type', 'pt_source_type', 'pt_materail_unit', 'pt_materail_spec_unit', 'yes_no'));
 const paging = ref<any>(null);
 const upFormRef = ref<any>(null);
 // 农资入库单明细表单
@@ -299,13 +280,13 @@ onLoad((options: any) => {
 }
 
 :deep(.form-item-top-padding-0) {
-    >.u-form-item__body {
+    > .u-form-item__body {
         padding-top: 0rpx;
     }
 }
 
 :deep(.form-item-bottom-padding-0) {
-    >.u-form-item__body {
+    > .u-form-item__body {
         padding-bottom: 0rpx;
     }
 }

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

@@ -33,7 +33,7 @@
             </view>
             <view class="pd2-4-0 f-s-28">
                 <span class="c-#666 w-s-no">存放库房:</span>
-                <span class="c-#333 f-w-500"></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>
@@ -56,6 +56,7 @@
 </template>
 <script setup lang="ts">
 import { selectDictListClass } from '@/utils/ruoyi';
+import { getStorageRoomNames } from '@/utils/common';
 const props = defineProps<{
     item: any;
     selected?: boolean;

+ 2 - 1
src/tools/supervise-material/index.vue

@@ -27,7 +27,7 @@
                 </view>
                 <view class="d-flex a-c pt-10 pb-10">
                     <text class="c-#666 f-s-30 w-s-no">存放库房:</text>
-                    <text class="c-#333 f-w-5 f-s-30 ov-hd tx-ov w-s-no">{{ item?.warehouses }}</text>
+                    <text class="c-#333 f-w-5 f-s-30 ov-hd tx-ov w-s-no">{{ getStorageRoomNames(item?.warehouses) || '-' }}</text>
                 </view>
                 <view class="d-flex a-c pt-10 pb-10">
                     <text class="c-#666 f-s-30 w-s-no">入库量:</text>
@@ -64,6 +64,7 @@
 </template>
 <script setup lang="ts">
 import { useClientRequest } from '@/utils/request';
+import { getStorageRoomNames } from '@/utils/common';
 const list = ref<any>([]);
 const paging = ref();
 const form = ref({