|
@@ -1,54 +1,51 @@
|
|
|
<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 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">{{ getStorageRoomNames(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>
|
|
|
- <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 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 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>
|
|
|
|
|
+ <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>
|
|
|
- <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 class="">
|
|
|
|
|
+ <up-checkbox label="全部使用" usedAlone v-model:checked="hasChecked" @change="handleUseAllChange"></up-checkbox>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
|
|
+ </view>
|
|
|
</template>
|
|
</template>
|
|
|
<script setup lang="ts">
|
|
<script setup lang="ts">
|
|
|
|
|
+import { getStorageRoomNames } from '@/utils/common';
|
|
|
import { ref, watch, computed, nextTick } from 'vue';
|
|
import { ref, watch, computed, nextTick } from 'vue';
|
|
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
|
|
const { pt_seed_instore_type, pt_seed_type, pt_fungus_code_type } = toRefs<any>(proxy?.useDict('pt_seed_instore_type', 'pt_seed_type', 'pt_fungus_code_type'));
|
|
const { pt_seed_instore_type, pt_seed_type, pt_fungus_code_type } = toRefs<any>(proxy?.useDict('pt_seed_instore_type', 'pt_seed_type', 'pt_fungus_code_type'));
|
|
@@ -63,7 +60,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) => {
|