|
@@ -1,7 +1,7 @@
|
|
|
<template>
|
|
<template>
|
|
|
<z-paging ref="paging" v-model="list" bgColor="#f7f7f7" safe-area-inset-bottom>
|
|
<z-paging ref="paging" v-model="list" bgColor="#f7f7f7" safe-area-inset-bottom>
|
|
|
<template #top>
|
|
<template #top>
|
|
|
- <ut-navbar title="创建种养殖任务" :fixed="false"></ut-navbar>
|
|
|
|
|
|
|
+ <up-navbar title="创建种养殖任务" :fixed="false"></up-navbar>
|
|
|
</template>
|
|
</template>
|
|
|
<view class="pt-24">
|
|
<view class="pt-24">
|
|
|
<!-- 养殖 -->
|
|
<!-- 养殖 -->
|
|
@@ -29,18 +29,18 @@
|
|
|
<view class="f-s-30 c-333 f-w-5 flex1">{{ selectDictLabel(pt_task_type, form.taskType) }}</view>
|
|
<view class="f-s-30 c-333 f-w-5 flex1">{{ selectDictLabel(pt_task_type, form.taskType) }}</view>
|
|
|
</up-form-item>
|
|
</up-form-item>
|
|
|
</ut-action-sheet>
|
|
</ut-action-sheet>
|
|
|
- <ut-action-sheet v-model="form.mgMethod" :tabs="mg_method" title="选择溯源级别">
|
|
|
|
|
|
|
+ <ut-action-sheet v-model="form.mgMethod" :tabs="pt_mg_method" title="选择溯源级别">
|
|
|
<up-form-item borderBottom label="溯源级别" required prop="mgMethod" id="mgMethodpppp">
|
|
<up-form-item borderBottom label="溯源级别" required prop="mgMethod" id="mgMethodpppp">
|
|
|
- <view v-if="form.mgMethod" class="f-s-30 c-333 f-w-5 flex1">{{ selectDictLabel(mg_method, form.mgMethod) }}</view>
|
|
|
|
|
|
|
+ <view v-if="form.mgMethod" class="f-s-30 c-333 f-w-5 flex1">{{ selectDictLabel(pt_mg_method, form.mgMethod) }}</view>
|
|
|
<view v-else class="f-s-30 c-ccc f-w-4 flex1">请选择溯源级别</view>
|
|
<view v-else class="f-s-30 c-ccc f-w-4 flex1">请选择溯源级别</view>
|
|
|
<template #right>
|
|
<template #right>
|
|
|
<up-icon size="22rpx" color="#2A6D52" name="arrow-down-fill"></up-icon>
|
|
<up-icon size="22rpx" color="#2A6D52" name="arrow-down-fill"></up-icon>
|
|
|
</template>
|
|
</template>
|
|
|
</up-form-item>
|
|
</up-form-item>
|
|
|
</ut-action-sheet>
|
|
</ut-action-sheet>
|
|
|
- <ut-action-sheet v-model="form.gapFlag" :tabs="task_gap_flag" title="选择符合要求">
|
|
|
|
|
|
|
+ <ut-action-sheet v-model="form.gapFlag" :tabs="pt_task_gap_flag" title="选择符合要求">
|
|
|
<up-form-item borderBottom label="符合要求" required prop="gapFlag" id="gapFlagpppp">
|
|
<up-form-item borderBottom label="符合要求" required prop="gapFlag" id="gapFlagpppp">
|
|
|
- <view v-if="form.gapFlag" class="f-s-30 c-333 f-w-5 flex1">{{ selectDictLabel(task_gap_flag, form.gapFlag) }}</view>
|
|
|
|
|
|
|
+ <view v-if="form.gapFlag" class="f-s-30 c-333 f-w-5 flex1">{{ selectDictLabel(pt_task_gap_flag, form.gapFlag) }}</view>
|
|
|
<view v-else class="f-s-30 c-ccc f-w-4 flex1">请选择符合要求</view>
|
|
<view v-else class="f-s-30 c-ccc f-w-4 flex1">请选择符合要求</view>
|
|
|
<template #right>
|
|
<template #right>
|
|
|
<up-icon size="22rpx" color="#2A6D52" name="arrow-down-fill"></up-icon>
|
|
<up-icon size="22rpx" color="#2A6D52" name="arrow-down-fill"></up-icon>
|
|
@@ -78,9 +78,9 @@
|
|
|
<up-form-item label="请选择养殖技术规程文件" prop="technicalFile" borderBottom id="technicalFilepppp">
|
|
<up-form-item label="请选择养殖技术规程文件" prop="technicalFile" borderBottom id="technicalFilepppp">
|
|
|
<ut-upload v-model="form.technicalFile" :max-count="9" valueType="array" accept="file"></ut-upload>
|
|
<ut-upload v-model="form.technicalFile" :max-count="9" valueType="array" accept="file"></ut-upload>
|
|
|
</up-form-item>
|
|
</up-form-item>
|
|
|
- <ut-action-sheet v-model="form.plantationMethod" :tabs="feeding_method" title="选择养殖方式">
|
|
|
|
|
|
|
+ <ut-action-sheet v-model="form.plantationMethod" :tabs="pt_feeding_method" title="选择养殖方式">
|
|
|
<up-form-item borderBottom label="养殖方式" required prop="plantationMethod" id="plantationMethodpppp">
|
|
<up-form-item borderBottom label="养殖方式" required prop="plantationMethod" id="plantationMethodpppp">
|
|
|
- <view v-if="form.plantationMethod" class="f-s-30 c-333 f-w-5 flex1">{{ selectDictLabel(feeding_method, form.plantationMethod) }}</view>
|
|
|
|
|
|
|
+ <view v-if="form.plantationMethod" class="f-s-30 c-333 f-w-5 flex1">{{ selectDictLabel(pt_feeding_method, form.plantationMethod) }}</view>
|
|
|
<view v-else class="f-s-30 c-ccc f-w-4 flex1">请选择养殖方式</view>
|
|
<view v-else class="f-s-30 c-ccc f-w-4 flex1">请选择养殖方式</view>
|
|
|
<template #right>
|
|
<template #right>
|
|
|
<up-icon size="22rpx" color="#2A6D52" name="arrow-down-fill"></up-icon>
|
|
<up-icon size="22rpx" color="#2A6D52" name="arrow-down-fill"></up-icon>
|
|
@@ -117,15 +117,15 @@
|
|
|
<view class="h-1" id="plantpppp"></view>
|
|
<view class="h-1" id="plantpppp"></view>
|
|
|
<up-form-item borderBottom label="养殖量" required prop="plant">
|
|
<up-form-item borderBottom label="养殖量" required prop="plant">
|
|
|
<up-input v-model="form.plant.plantingMgAmount" placeholder="请输入养殖量" border="none"></up-input>
|
|
<up-input v-model="form.plant.plantingMgAmount" placeholder="请输入养殖量" border="none"></up-input>
|
|
|
- <ut-action-sheet v-model="form.plant.plantingMgUnit" :tabs="planting_mg_unit" title="选择单位">
|
|
|
|
|
|
|
+ <ut-action-sheet v-model="form.plant.plantingMgUnit" :tabs="pt_planting_mg_unit" title="选择单位">
|
|
|
<view class="d-flex a-c">
|
|
<view class="d-flex a-c">
|
|
|
- <view v-if="form.plant?.plantingMgUnit" class="f-s-30 c-333 f-w-5 w-100">{{ selectDictLabel(planting_mg_unit, form.plant?.plantingMgUnit) }}</view>
|
|
|
|
|
|
|
+ <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>
|
|
<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>
|
|
<up-icon size="22rpx" color="#2A6D52" name="arrow-down-fill"></up-icon>
|
|
|
</view>
|
|
</view>
|
|
|
</ut-action-sheet>
|
|
</ut-action-sheet>
|
|
|
</up-form-item>
|
|
</up-form-item>
|
|
|
- <up-form-item borderBottom label="备注" required prop="remark" id="remarkpppp">
|
|
|
|
|
|
|
+ <up-form-item borderBottom label="备注" prop="remark" id="remarkpppp">
|
|
|
<up-input v-model="form.remark" placeholder="请输入备注" border="none"></up-input>
|
|
<up-input v-model="form.remark" placeholder="请输入备注" border="none"></up-input>
|
|
|
</up-form-item>
|
|
</up-form-item>
|
|
|
</view>
|
|
</view>
|
|
@@ -176,9 +176,9 @@
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
</up-form-item>
|
|
</up-form-item>
|
|
|
- <ut-action-sheet v-model="form.mgMethod" :tabs="mg_method" title="选择溯源级别">
|
|
|
|
|
|
|
+ <ut-action-sheet v-model="form.mgMethod" :tabs="pt_mg_method" title="选择溯源级别">
|
|
|
<up-form-item borderBottom label="溯源级别" required prop="mgMethod" id="mgMethodpppp">
|
|
<up-form-item borderBottom label="溯源级别" required prop="mgMethod" id="mgMethodpppp">
|
|
|
- <view v-if="form.mgMethod" class="f-s-30 c-333 f-w-5 flex1">{{ selectDictLabel(mg_method, form.mgMethod) }}</view>
|
|
|
|
|
|
|
+ <view v-if="form.mgMethod" class="f-s-30 c-333 f-w-5 flex1">{{ selectDictLabel(pt_mg_method, form.mgMethod) }}</view>
|
|
|
<view v-else class="f-s-30 c-ccc f-w-4 flex1">请选择溯源级别</view>
|
|
<view v-else class="f-s-30 c-ccc f-w-4 flex1">请选择溯源级别</view>
|
|
|
<template #right>
|
|
<template #right>
|
|
|
<up-icon size="22rpx" color="#2A6D52" name="arrow-down-fill"></up-icon>
|
|
<up-icon size="22rpx" color="#2A6D52" name="arrow-down-fill"></up-icon>
|
|
@@ -216,9 +216,9 @@
|
|
|
<up-form-item label="请选择养殖技术规程文件" prop="technicalFile" borderBottom id="technicalFilepppp">
|
|
<up-form-item label="请选择养殖技术规程文件" prop="technicalFile" borderBottom id="technicalFilepppp">
|
|
|
<ut-upload v-model="form.technicalFile" :max-count="9" valueType="array" accept="file"></ut-upload>
|
|
<ut-upload v-model="form.technicalFile" :max-count="9" valueType="array" accept="file"></ut-upload>
|
|
|
</up-form-item>
|
|
</up-form-item>
|
|
|
- <ut-action-sheet v-model="form.plantationMethod" :tabs="feeding_method" title="选择养殖方式">
|
|
|
|
|
|
|
+ <ut-action-sheet v-model="form.plantationMethod" :tabs="pt_feeding_method" title="选择养殖方式">
|
|
|
<up-form-item borderBottom label="养殖方式" prop="plantationMethod" id="plantationMethodpppp">
|
|
<up-form-item borderBottom label="养殖方式" prop="plantationMethod" id="plantationMethodpppp">
|
|
|
- <view v-if="form.plantationMethod" class="f-s-30 c-333 f-w-5 flex1">{{ selectDictLabel(feeding_method, form.plantationMethod) }}</view>
|
|
|
|
|
|
|
+ <view v-if="form.plantationMethod" class="f-s-30 c-333 f-w-5 flex1">{{ selectDictLabel(pt_feeding_method, form.plantationMethod) }}</view>
|
|
|
<view v-else class="f-s-30 c-ccc f-w-4 flex1">请选择养殖方式</view>
|
|
<view v-else class="f-s-30 c-ccc f-w-4 flex1">请选择养殖方式</view>
|
|
|
<template #right>
|
|
<template #right>
|
|
|
<up-icon size="22rpx" color="#2A6D52" name="arrow-down-fill"></up-icon>
|
|
<up-icon size="22rpx" color="#2A6D52" name="arrow-down-fill"></up-icon>
|
|
@@ -255,15 +255,15 @@
|
|
|
<view class="h-1" id="plantpppp"></view>
|
|
<view class="h-1" id="plantpppp"></view>
|
|
|
<up-form-item borderBottom label="养殖量" required prop="plant">
|
|
<up-form-item borderBottom label="养殖量" required prop="plant">
|
|
|
<up-input v-model="form.plant.plantingMgAmount" placeholder="请输入养殖量" border="none"></up-input>
|
|
<up-input v-model="form.plant.plantingMgAmount" placeholder="请输入养殖量" border="none"></up-input>
|
|
|
- <ut-action-sheet v-model="form.plant.plantingMgUnit" :tabs="planting_mg_unit" title="选择单位">
|
|
|
|
|
|
|
+ <ut-action-sheet v-model="form.plant.plantingMgUnit" :tabs="pt_planting_mg_unit" title="选择单位">
|
|
|
<view class="d-flex a-c">
|
|
<view class="d-flex a-c">
|
|
|
- <view v-if="form.plant?.plantingMgUnit" class="f-s-30 c-333 f-w-5 w-100">{{ selectDictLabel(planting_mg_unit, form.plant?.plantingMgUnit) }}</view>
|
|
|
|
|
|
|
+ <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>
|
|
<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>
|
|
<up-icon size="22rpx" color="#2A6D52" name="arrow-down-fill"></up-icon>
|
|
|
</view>
|
|
</view>
|
|
|
</ut-action-sheet>
|
|
</ut-action-sheet>
|
|
|
</up-form-item>
|
|
</up-form-item>
|
|
|
- <up-form-item borderBottom label="备注" required prop="remark" id="remarkpppp">
|
|
|
|
|
|
|
+ <up-form-item borderBottom label="备注" prop="remark" id="remarkpppp">
|
|
|
<up-input v-model="form.remark" placeholder="请输入备注" border="none"></up-input>
|
|
<up-input v-model="form.remark" placeholder="请输入备注" border="none"></up-input>
|
|
|
</up-form-item>
|
|
</up-form-item>
|
|
|
</view>
|
|
</view>
|
|
@@ -294,9 +294,9 @@
|
|
|
<view class="f-s-30 c-333 f-w-5 flex1">{{ selectDictLabel(pt_task_type, form.taskType) }}</view>
|
|
<view class="f-s-30 c-333 f-w-5 flex1">{{ selectDictLabel(pt_task_type, form.taskType) }}</view>
|
|
|
</up-form-item>
|
|
</up-form-item>
|
|
|
</ut-action-sheet>
|
|
</ut-action-sheet>
|
|
|
- <ut-action-sheet v-model="form.gapFlag" :tabs="task_gap_flag" title="选择符合要求">
|
|
|
|
|
|
|
+ <ut-action-sheet v-model="form.gapFlag" :tabs="pt_task_gap_flag" title="选择符合要求">
|
|
|
<up-form-item borderBottom label="符合要求" required prop="gapFlag" id="gapFlagpppp">
|
|
<up-form-item borderBottom label="符合要求" required prop="gapFlag" id="gapFlagpppp">
|
|
|
- <view v-if="form.gapFlag" class="f-s-30 c-333 f-w-5 flex1">{{ selectDictLabel(task_gap_flag, form.gapFlag) }}</view>
|
|
|
|
|
|
|
+ <view v-if="form.gapFlag" class="f-s-30 c-333 f-w-5 flex1">{{ selectDictLabel(pt_task_gap_flag, form.gapFlag) }}</view>
|
|
|
<view v-else class="f-s-30 c-ccc f-w-4 flex1">请选择符合要求</view>
|
|
<view v-else class="f-s-30 c-ccc f-w-4 flex1">请选择符合要求</view>
|
|
|
<template #right>
|
|
<template #right>
|
|
|
<up-icon size="22rpx" color="#2A6D52" name="arrow-down-fill"></up-icon>
|
|
<up-icon size="22rpx" color="#2A6D52" name="arrow-down-fill"></up-icon>
|
|
@@ -334,9 +334,9 @@
|
|
|
<up-form-item label="请选择种植技术规程文件" prop="technicalFile" borderBottom id="technicalFilepppp">
|
|
<up-form-item label="请选择种植技术规程文件" prop="technicalFile" borderBottom id="technicalFilepppp">
|
|
|
<ut-upload v-model="form.technicalFile" :max-count="9" valueType="array" accept="file"></ut-upload>
|
|
<ut-upload v-model="form.technicalFile" :max-count="9" valueType="array" accept="file"></ut-upload>
|
|
|
</up-form-item>
|
|
</up-form-item>
|
|
|
- <ut-action-sheet v-model="form.plantationMethod" :tabs="plantation_method" title="选择种植方式">
|
|
|
|
|
|
|
+ <ut-action-sheet v-model="form.plantationMethod" :tabs="pt_plantation_method" title="选择种植方式">
|
|
|
<up-form-item borderBottom label="种植方式" prop="plantationMethod" id="plantationMethodpppp">
|
|
<up-form-item borderBottom label="种植方式" prop="plantationMethod" id="plantationMethodpppp">
|
|
|
- <view v-if="form.plantationMethod" class="f-s-30 c-333 f-w-5 flex1">{{ selectDictLabel(plantation_method, form.plantationMethod) }}</view>
|
|
|
|
|
|
|
+ <view v-if="form.plantationMethod" class="f-s-30 c-333 f-w-5 flex1">{{ selectDictLabel(pt_plantation_method, form.plantationMethod) }}</view>
|
|
|
<view v-else class="f-s-30 c-ccc f-w-4 flex1">请选择种植方式</view>
|
|
<view v-else class="f-s-30 c-ccc f-w-4 flex1">请选择种植方式</view>
|
|
|
<template #right>
|
|
<template #right>
|
|
|
<up-icon size="22rpx" color="#2A6D52" name="arrow-down-fill"></up-icon>
|
|
<up-icon size="22rpx" color="#2A6D52" name="arrow-down-fill"></up-icon>
|
|
@@ -352,9 +352,9 @@
|
|
|
<view class="h-1" id="plantpppp"></view>
|
|
<view class="h-1" id="plantpppp"></view>
|
|
|
<up-form-item borderBottom label="种植量" required prop="plant">
|
|
<up-form-item borderBottom label="种植量" required prop="plant">
|
|
|
<up-input v-model="form.plant.plantingMgAmount" placeholder="请输入种植量" border="none"></up-input>
|
|
<up-input v-model="form.plant.plantingMgAmount" placeholder="请输入种植量" border="none"></up-input>
|
|
|
- <ut-action-sheet v-model="form.plant.plantingMgUnit" :tabs="scale_unit" title="选择单位">
|
|
|
|
|
|
|
+ <ut-action-sheet v-model="form.plant.plantingMgUnit" :tabs="pt_scale_unit" title="选择单位">
|
|
|
<view class="d-flex a-c">
|
|
<view class="d-flex a-c">
|
|
|
- <view v-if="form.plant?.plantingMgUnit" class="f-s-30 c-333 f-w-5 w-100">{{ selectDictLabel(scale_unit, form.plant?.plantingMgUnit) }}</view>
|
|
|
|
|
|
|
+ <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>
|
|
<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>
|
|
<up-icon size="22rpx" color="#2A6D52" name="arrow-down-fill"></up-icon>
|
|
|
</view>
|
|
</view>
|
|
@@ -375,36 +375,36 @@
|
|
|
</view>
|
|
</view>
|
|
|
</ut-datetime-picker>
|
|
</ut-datetime-picker>
|
|
|
</up-form-item>
|
|
</up-form-item>
|
|
|
- <ut-action-sheet v-model="form.reproductionType" :tabs="reproduction_type" title="选择繁殖方式">
|
|
|
|
|
|
|
+ <ut-action-sheet v-model="form.reproductionType" :tabs="pt_reproduction_type" title="选择繁殖方式">
|
|
|
<up-form-item borderBottom label="繁殖方式" required prop="reproductionType" id="reproductionTypepppp">
|
|
<up-form-item borderBottom label="繁殖方式" required prop="reproductionType" id="reproductionTypepppp">
|
|
|
- <view v-if="form.reproductionType" class="f-s-30 c-333 f-w-5 flex1">{{ selectDictLabel(reproduction_type, form.reproductionType) }}</view>
|
|
|
|
|
|
|
+ <view v-if="form.reproductionType" class="f-s-30 c-333 f-w-5 flex1">{{ selectDictLabel(pt_reproduction_type, form.reproductionType) }}</view>
|
|
|
<view v-else class="f-s-30 c-ccc f-w-4 flex1">请选择繁殖方式</view>
|
|
<view v-else class="f-s-30 c-ccc f-w-4 flex1">请选择繁殖方式</view>
|
|
|
<template #right>
|
|
<template #right>
|
|
|
<up-icon size="22rpx" color="#2A6D52" name="arrow-down-fill"></up-icon>
|
|
<up-icon size="22rpx" color="#2A6D52" name="arrow-down-fill"></up-icon>
|
|
|
</template>
|
|
</template>
|
|
|
</up-form-item>
|
|
</up-form-item>
|
|
|
</ut-action-sheet>
|
|
</ut-action-sheet>
|
|
|
- <ut-action-sheet v-if="+form.reproductionType == 2" v-model="form.plantationType" :tabs="plantation_type" title="选择种植类型">
|
|
|
|
|
|
|
+ <ut-action-sheet v-if="+form.reproductionType == 2" v-model="form.plantationType" :tabs="pt_plantation_type" title="选择种植类型">
|
|
|
<up-form-item borderBottom label="种植类型" prop="plantationType" id="plantationTypepppp">
|
|
<up-form-item borderBottom label="种植类型" prop="plantationType" id="plantationTypepppp">
|
|
|
- <view v-if="form.plantationType" class="f-s-30 c-333 f-w-5 flex1">{{ selectDictLabel(plantation_type, form.plantationType) }}</view>
|
|
|
|
|
|
|
+ <view v-if="form.plantationType" class="f-s-30 c-333 f-w-5 flex1">{{ selectDictLabel(pt_plantation_type, form.plantationType) }}</view>
|
|
|
<view v-else class="f-s-30 c-ccc f-w-4 flex1">请选择种植类型</view>
|
|
<view v-else class="f-s-30 c-ccc f-w-4 flex1">请选择种植类型</view>
|
|
|
<template #right>
|
|
<template #right>
|
|
|
<up-icon size="22rpx" color="#2A6D52" name="arrow-down-fill"></up-icon>
|
|
<up-icon size="22rpx" color="#2A6D52" name="arrow-down-fill"></up-icon>
|
|
|
</template>
|
|
</template>
|
|
|
</up-form-item>
|
|
</up-form-item>
|
|
|
</ut-action-sheet>
|
|
</ut-action-sheet>
|
|
|
- <ut-action-sheet v-if="+form.reproductionType == 2" v-model="form.sowingMethod" :tabs="sowing_method" title="选择播种方法">
|
|
|
|
|
|
|
+ <ut-action-sheet v-if="+form.reproductionType == 2" v-model="form.sowingMethod" :tabs="pt_sowing_method" title="选择播种方法">
|
|
|
<up-form-item borderBottom label="播种方法" prop="sowingMethod" id="sowingMethodpppp">
|
|
<up-form-item borderBottom label="播种方法" prop="sowingMethod" id="sowingMethodpppp">
|
|
|
- <view v-if="form.sowingMethod" class="f-s-30 c-333 f-w-5 flex1">{{ selectDictLabel(sowing_method, form.sowingMethod) }}</view>
|
|
|
|
|
|
|
+ <view v-if="form.sowingMethod" class="f-s-30 c-333 f-w-5 flex1">{{ selectDictLabel(pt_sowing_method, form.sowingMethod) }}</view>
|
|
|
<view v-else class="f-s-30 c-ccc f-w-4 flex1">请选择播种方法</view>
|
|
<view v-else class="f-s-30 c-ccc f-w-4 flex1">请选择播种方法</view>
|
|
|
<template #right>
|
|
<template #right>
|
|
|
<up-icon size="22rpx" color="#2A6D52" name="arrow-down-fill"></up-icon>
|
|
<up-icon size="22rpx" color="#2A6D52" name="arrow-down-fill"></up-icon>
|
|
|
</template>
|
|
</template>
|
|
|
</up-form-item>
|
|
</up-form-item>
|
|
|
</ut-action-sheet>
|
|
</ut-action-sheet>
|
|
|
- <ut-action-sheet v-if="+form.reproductionType == 2" v-model="form.transplantMethod" :tabs="transplant_method" title="选择移栽方法">
|
|
|
|
|
|
|
+ <ut-action-sheet v-if="+form.reproductionType == 2" v-model="form.transplantMethod" :tabs="pt_transplant_method" title="选择移栽方法">
|
|
|
<up-form-item borderBottom label="移栽方法" prop="transplantMethod" id="transplantMethodpppp">
|
|
<up-form-item borderBottom label="移栽方法" prop="transplantMethod" id="transplantMethodpppp">
|
|
|
- <view v-if="form.transplantMethod" class="f-s-30 c-333 f-w-5 flex1">{{ selectDictLabel(transplant_method, form.transplantMethod) }}</view>
|
|
|
|
|
|
|
+ <view v-if="form.transplantMethod" class="f-s-30 c-333 f-w-5 flex1">{{ selectDictLabel(pt_transplant_method, form.transplantMethod) }}</view>
|
|
|
<view v-else class="f-s-30 c-ccc f-w-4 flex1">请选择移栽方法</view>
|
|
<view v-else class="f-s-30 c-ccc f-w-4 flex1">请选择移栽方法</view>
|
|
|
<template #right>
|
|
<template #right>
|
|
|
<up-icon size="22rpx" color="#2A6D52" name="arrow-down-fill"></up-icon>
|
|
<up-icon size="22rpx" color="#2A6D52" name="arrow-down-fill"></up-icon>
|
|
@@ -432,7 +432,7 @@
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
</up-form-item>
|
|
</up-form-item>
|
|
|
- <up-form-item borderBottom label="备注" required prop="remark" id="remarkpppp">
|
|
|
|
|
|
|
+ <up-form-item borderBottom label="备注" prop="remark" id="remarkpppp">
|
|
|
<up-input v-model="form.remark" placeholder="请输入备注" border="none"></up-input>
|
|
<up-input v-model="form.remark" placeholder="请输入备注" border="none"></up-input>
|
|
|
</up-form-item>
|
|
</up-form-item>
|
|
|
</view>
|
|
</view>
|
|
@@ -455,6 +455,15 @@
|
|
|
<Baseinfo :modeValue="deawerData" @close="handleBaseinfoClose" :baseType="form.taskType" />
|
|
<Baseinfo :modeValue="deawerData" @close="handleBaseinfoClose" :baseType="form.taskType" />
|
|
|
</view>
|
|
</view>
|
|
|
</up-form-item>
|
|
</up-form-item>
|
|
|
|
|
+ <up-form-item :borderBottom="false" label="具体位置" required prop="baseId" id="baseIdpppp">
|
|
|
|
|
+ <view v-if="!laboratory" class="w-100% d-flex a-c j-c pd-24 b-radius bg-#FBFDFB border-#AFDDBB" @click="openLaboratory">
|
|
|
|
|
+ <view class=""></view>
|
|
|
|
|
+ <view class="f-s-34 c-primary">请选择具体位置</view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <view class="w-100%" v-else>
|
|
|
|
|
+ <laboratory :modeValue="laboratory" @close="handleLaboratoryClose" :baseType="form.taskType" />
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </up-form-item>
|
|
|
</view>
|
|
</view>
|
|
|
<view class="startline-title pl-24 ml-24 mb-16">种养殖信息</view>
|
|
<view class="startline-title pl-24 ml-24 mb-16">种养殖信息</view>
|
|
|
<view class="bg-#fff pd-24 mb-20">
|
|
<view class="bg-#fff pd-24 mb-20">
|
|
@@ -483,9 +492,9 @@
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
</up-form-item>
|
|
</up-form-item>
|
|
|
- <ut-action-sheet v-if="+deawerData?.data[0]?.landType == 3" v-model="form.mgMethod" :tabs="mg_method" title="选择溯源级别">
|
|
|
|
|
|
|
+ <ut-action-sheet v-if="+deawerData?.data[0]?.landType == 3" v-model="form.mgMethod" :tabs="pt_mg_method" title="选择溯源级别">
|
|
|
<up-form-item borderBottom label="溯源级别" required prop="mgMethod" id="mgMethodpppp">
|
|
<up-form-item borderBottom label="溯源级别" required prop="mgMethod" id="mgMethodpppp">
|
|
|
- <view v-if="form.mgMethod" class="f-s-30 c-333 f-w-5 flex1">{{ selectDictLabel(mg_method, form.mgMethod) }}</view>
|
|
|
|
|
|
|
+ <view v-if="form.mgMethod" class="f-s-30 c-333 f-w-5 flex1">{{ selectDictLabel(pt_mg_method, form.mgMethod) }}</view>
|
|
|
<view v-else class="f-s-30 c-ccc f-w-4 flex1">请选择溯源级别</view>
|
|
<view v-else class="f-s-30 c-ccc f-w-4 flex1">请选择溯源级别</view>
|
|
|
<template #right>
|
|
<template #right>
|
|
|
<up-icon size="22rpx" color="#2A6D52" name="arrow-down-fill"></up-icon>
|
|
<up-icon size="22rpx" color="#2A6D52" name="arrow-down-fill"></up-icon>
|
|
@@ -523,9 +532,9 @@
|
|
|
<up-form-item label="请选择繁育技术规程文件" prop="technicalFile" borderBottom id="technicalFilepppp">
|
|
<up-form-item label="请选择繁育技术规程文件" prop="technicalFile" borderBottom id="technicalFilepppp">
|
|
|
<ut-upload v-model="form.technicalFile" :max-count="9" valueType="array" accept="file"></ut-upload>
|
|
<ut-upload v-model="form.technicalFile" :max-count="9" valueType="array" accept="file"></ut-upload>
|
|
|
</up-form-item>
|
|
</up-form-item>
|
|
|
- <ut-action-sheet v-model="form.plantationMethod" :tabs="plantation_method" title="选择繁育方式">
|
|
|
|
|
|
|
+ <ut-action-sheet v-model="form.plantationMethod" :tabs="pt_plantation_method" title="选择繁育方式">
|
|
|
<up-form-item borderBottom label="繁育方式" prop="plantationMethod" id="plantationMethodpppp">
|
|
<up-form-item borderBottom label="繁育方式" prop="plantationMethod" id="plantationMethodpppp">
|
|
|
- <view v-if="form.plantationMethod" class="f-s-30 c-333 f-w-5 flex1">{{ selectDictLabel(plantation_method, form.plantationMethod) }}</view>
|
|
|
|
|
|
|
+ <view v-if="form.plantationMethod" class="f-s-30 c-333 f-w-5 flex1">{{ selectDictLabel(pt_plantation_method, form.plantationMethod) }}</view>
|
|
|
<view v-else class="f-s-30 c-ccc f-w-4 flex1">请选择繁育方式</view>
|
|
<view v-else class="f-s-30 c-ccc f-w-4 flex1">请选择繁育方式</view>
|
|
|
<template #right>
|
|
<template #right>
|
|
|
<up-icon size="22rpx" color="#2A6D52" name="arrow-down-fill"></up-icon>
|
|
<up-icon size="22rpx" color="#2A6D52" name="arrow-down-fill"></up-icon>
|
|
@@ -556,9 +565,9 @@
|
|
|
<up-form-item v-if="+deawerData?.data[0]?.landType == 3" borderBottom label="接种数量" required prop="inoculation.inoculationAmount" id="inoculationpppp">
|
|
<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%">
|
|
<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>
|
|
<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="inoculation_unit" title="选择单位">
|
|
|
|
|
|
|
+ <ut-action-sheet v-model="form.inoculation.inoculationUnit" :tabs="pt_inoculation_unit" title="选择单位">
|
|
|
<view class="d-flex a-c">
|
|
<view class="d-flex a-c">
|
|
|
- <view v-if="form.inoculation?.inoculationUnit" class="f-s-30 c-333 f-w-5 w-100">{{ selectDictLabel(inoculation_unit, form.inoculation?.inoculationUnit) }}</view>
|
|
|
|
|
|
|
+ <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>
|
|
<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>
|
|
<up-icon size="22rpx" color="#2A6D52" name="arrow-down-fill"></up-icon>
|
|
|
</view>
|
|
</view>
|
|
@@ -568,28 +577,28 @@
|
|
|
<up-form-item v-if="+deawerData?.data[0]?.landType == 3" borderBottom label="接种剂量" required prop="inoculation.inoculationDosage" id="inoculationpppp">
|
|
<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%">
|
|
<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>
|
|
<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="inoculation_dosage_unit" title="选择单位">
|
|
|
|
|
|
|
+ <ut-action-sheet v-model="form.inoculation.inoculationDosageUnit" :tabs="pt_inoculation_dosage_unit" title="选择单位">
|
|
|
<view class="d-flex a-c">
|
|
<view class="d-flex a-c">
|
|
|
- <view v-if="form.inoculation?.inoculationDosageUnit" class="f-s-30 c-333 f-w-5 w-100">{{ selectDictLabel(inoculation_dosage_unit, form.inoculation?.inoculationDosageUnit) }}</view>
|
|
|
|
|
|
|
+ <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>
|
|
<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>
|
|
<up-icon size="22rpx" color="#2A6D52" name="arrow-down-fill"></up-icon>
|
|
|
</view>
|
|
</view>
|
|
|
</ut-action-sheet>
|
|
</ut-action-sheet>
|
|
|
- <view v-if="form.inoculation?.inoculationUnit" class="f-s-30 c-333 f-w-5 w-100">{{ selectDictLabel(inoculation_unit, form.inoculation?.inoculationUnit) }}</view>
|
|
|
|
|
|
|
+ <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>
|
|
</view>
|
|
|
</up-form-item>
|
|
</up-form-item>
|
|
|
<view class="h-1" id="plantpppp"></view>
|
|
<view class="h-1" id="plantpppp"></view>
|
|
|
<up-form-item v-if="+deawerData?.data[0]?.landType == 3" borderBottom label="繁育量" prop="plant">
|
|
<up-form-item v-if="+deawerData?.data[0]?.landType == 3" borderBottom label="繁育量" prop="plant">
|
|
|
<view class="d-flex a-c j-sb w-100%">
|
|
<view class="d-flex a-c j-sb w-100%">
|
|
|
<view class="f-s-30 c-333 f-w-5 w-100">{{ plantingMgAmount }}</view>
|
|
<view class="f-s-30 c-333 f-w-5 w-100">{{ plantingMgAmount }}</view>
|
|
|
- <view v-if="plantingMgUnit" class="f-s-30 c-333 f-w-5 w-100">{{ selectDictLabel(inoculation_dosage_unit, plantingMgUnit) }}</view>
|
|
|
|
|
|
|
+ <view v-if="plantingMgUnit" class="f-s-30 c-333 f-w-5 w-100">{{ selectDictLabel(pt_inoculation_dosage_unit, plantingMgUnit) }}</view>
|
|
|
</view>
|
|
</view>
|
|
|
</up-form-item>
|
|
</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>
|
|
<up-input v-model="form.plant.plantingMgAmount" placeholder="请输入繁育量" border="none"></up-input>
|
|
|
- <ut-action-sheet v-model="form.plant.plantingMgUnit" :tabs="feed_amount_unit" title="选择单位">
|
|
|
|
|
|
|
+ <ut-action-sheet v-model="form.plant.plantingMgUnit" :tabs="pt_feed_amount_unit" title="选择单位">
|
|
|
<view class="d-flex a-c">
|
|
<view class="d-flex a-c">
|
|
|
- <view v-if="form.plant?.plantingMgUnit" class="f-s-30 c-333 f-w-5 w-100">{{ selectDictLabel(feed_amount_unit, form.plant?.plantingMgUnit) }}</view>
|
|
|
|
|
|
|
+ <view v-if="form.plant?.plantingMgUnit" class="f-s-30 c-333 f-w-5 w-100">{{ selectDictLabel(pt_feed_amount_unit, form.plant?.plantingMgUnit) }}</view>
|
|
|
<view v-else class="f-s-30 c-ccc f-w-4 w-100">单位</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>
|
|
<up-icon size="22rpx" color="#2A6D52" name="arrow-down-fill"></up-icon>
|
|
|
</view>
|
|
</view>
|
|
@@ -616,36 +625,36 @@
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
</up-form-item>
|
|
</up-form-item>
|
|
|
- <ut-action-sheet v-model="form.reproductionType" :tabs="reproduction_type" title="选择繁殖方式">
|
|
|
|
|
|
|
+ <ut-action-sheet v-model="form.reproductionType" :tabs="pt_reproduction_type" title="选择繁殖方式">
|
|
|
<up-form-item borderBottom label="选择繁殖方式" required prop="reproductionType" id="reproductionTypepppp">
|
|
<up-form-item borderBottom label="选择繁殖方式" required prop="reproductionType" id="reproductionTypepppp">
|
|
|
- <view v-if="form.reproductionType" class="f-s-30 c-333 f-w-5 flex1">{{ selectDictLabel(reproduction_type, form.reproductionType) }}</view>
|
|
|
|
|
|
|
+ <view v-if="form.reproductionType" class="f-s-30 c-333 f-w-5 flex1">{{ selectDictLabel(pt_reproduction_type, form.reproductionType) }}</view>
|
|
|
<view v-else class="f-s-30 c-ccc f-w-4 flex1">请选择选择繁殖方式</view>
|
|
<view v-else class="f-s-30 c-ccc f-w-4 flex1">请选择选择繁殖方式</view>
|
|
|
<template #right>
|
|
<template #right>
|
|
|
<up-icon size="22rpx" color="#2A6D52" name="arrow-down-fill"></up-icon>
|
|
<up-icon size="22rpx" color="#2A6D52" name="arrow-down-fill"></up-icon>
|
|
|
</template>
|
|
</template>
|
|
|
</up-form-item>
|
|
</up-form-item>
|
|
|
</ut-action-sheet>
|
|
</ut-action-sheet>
|
|
|
- <ut-action-sheet v-if="+form.reproductionType == 2" v-model="form.plantationType" :tabs="plantation_type" title="选择种植类型">
|
|
|
|
|
|
|
+ <ut-action-sheet v-if="+form.reproductionType == 2" v-model="form.plantationType" :tabs="pt_plantation_type" title="选择种植类型">
|
|
|
<up-form-item borderBottom label="种植类型" required prop="plantationType" id="plantationTypepppp">
|
|
<up-form-item borderBottom label="种植类型" required prop="plantationType" id="plantationTypepppp">
|
|
|
- <view v-if="form.plantationType" class="f-s-30 c-333 f-w-5 flex1">{{ selectDictLabel(plantation_type, form.plantationType) }}</view>
|
|
|
|
|
|
|
+ <view v-if="form.plantationType" class="f-s-30 c-333 f-w-5 flex1">{{ selectDictLabel(pt_plantation_type, form.plantationType) }}</view>
|
|
|
<view v-else class="f-s-30 c-ccc f-w-4 flex1">请选择种植类型</view>
|
|
<view v-else class="f-s-30 c-ccc f-w-4 flex1">请选择种植类型</view>
|
|
|
<template #right>
|
|
<template #right>
|
|
|
<up-icon size="22rpx" color="#2A6D52" name="arrow-down-fill"></up-icon>
|
|
<up-icon size="22rpx" color="#2A6D52" name="arrow-down-fill"></up-icon>
|
|
|
</template>
|
|
</template>
|
|
|
</up-form-item>
|
|
</up-form-item>
|
|
|
</ut-action-sheet>
|
|
</ut-action-sheet>
|
|
|
- <ut-action-sheet v-if="+form.reproductionType == 2" v-model="form.sowingMethod" :tabs="sowing_method" title="选择播种方法">
|
|
|
|
|
|
|
+ <ut-action-sheet v-if="+form.reproductionType == 2" v-model="form.sowingMethod" :tabs="pt_sowing_method" title="选择播种方法">
|
|
|
<up-form-item borderBottom label="播种方法" required prop="sowingMethod" id="sowingMethodpppp">
|
|
<up-form-item borderBottom label="播种方法" required prop="sowingMethod" id="sowingMethodpppp">
|
|
|
- <view v-if="form.sowingMethod" class="f-s-30 c-333 f-w-5 flex1">{{ selectDictLabel(sowing_method, form.sowingMethod) }}</view>
|
|
|
|
|
|
|
+ <view v-if="form.sowingMethod" class="f-s-30 c-333 f-w-5 flex1">{{ selectDictLabel(pt_sowing_method, form.sowingMethod) }}</view>
|
|
|
<view v-else class="f-s-30 c-ccc f-w-4 flex1">请选择播种方法</view>
|
|
<view v-else class="f-s-30 c-ccc f-w-4 flex1">请选择播种方法</view>
|
|
|
<template #right>
|
|
<template #right>
|
|
|
<up-icon size="22rpx" color="#2A6D52" name="arrow-down-fill"></up-icon>
|
|
<up-icon size="22rpx" color="#2A6D52" name="arrow-down-fill"></up-icon>
|
|
|
</template>
|
|
</template>
|
|
|
</up-form-item>
|
|
</up-form-item>
|
|
|
</ut-action-sheet>
|
|
</ut-action-sheet>
|
|
|
- <ut-action-sheet v-if="+form.reproductionType == 2" v-model="form.transplantMethod" :tabs="transplant_method" title="选择移栽方法">
|
|
|
|
|
|
|
+ <ut-action-sheet v-if="+form.reproductionType == 2" v-model="form.transplantMethod" :tabs="pt_transplant_method" title="选择移栽方法">
|
|
|
<up-form-item borderBottom label="移栽方法" required prop="transplantMethod" id="transplantMethodpppp">
|
|
<up-form-item borderBottom label="移栽方法" required prop="transplantMethod" id="transplantMethodpppp">
|
|
|
- <view v-if="form.transplantMethod" class="f-s-30 c-333 f-w-5 flex1">{{ selectDictLabel(transplant_method, form.transplantMethod) }}</view>
|
|
|
|
|
|
|
+ <view v-if="form.transplantMethod" class="f-s-30 c-333 f-w-5 flex1">{{ selectDictLabel(pt_transplant_method, form.transplantMethod) }}</view>
|
|
|
<view v-else class="f-s-30 c-ccc f-w-4 flex1">请选择移栽方法</view>
|
|
<view v-else class="f-s-30 c-ccc f-w-4 flex1">请选择移栽方法</view>
|
|
|
<template #right>
|
|
<template #right>
|
|
|
<up-icon size="22rpx" color="#2A6D52" name="arrow-down-fill"></up-icon>
|
|
<up-icon size="22rpx" color="#2A6D52" name="arrow-down-fill"></up-icon>
|
|
@@ -673,7 +682,7 @@
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
</up-form-item>
|
|
</up-form-item>
|
|
|
- <up-form-item borderBottom label="备注" required prop="remark" id="remarkpppp">
|
|
|
|
|
|
|
+ <up-form-item borderBottom label="备注" prop="remark" id="remarkpppp">
|
|
|
<up-input v-model="form.remark" placeholder="请输入备注" border="none"></up-input>
|
|
<up-input v-model="form.remark" placeholder="请输入备注" border="none"></up-input>
|
|
|
</up-form-item>
|
|
</up-form-item>
|
|
|
</view>
|
|
</view>
|
|
@@ -724,6 +733,7 @@
|
|
|
</ut-confirm-dialog>
|
|
</ut-confirm-dialog>
|
|
|
<!-- 添加drawer组件 -->
|
|
<!-- 添加drawer组件 -->
|
|
|
<Drawer v-if="drawerVisible" :baseType="form.taskType" v-model="drawerVisible" @open="onDrawerOpen" @close="onDrawerClose" @confirm="onDrawerConfirm" />
|
|
<Drawer v-if="drawerVisible" :baseType="form.taskType" v-model="drawerVisible" @open="onDrawerOpen" @close="onDrawerClose" @confirm="onDrawerConfirm" />
|
|
|
|
|
+ <Drawer_laboratory v-if="laboratoryVisible" :baseId="form?.baseId" :landIds="form?.landIds" v-model="laboratoryVisible" @open="openLaboratory" @close="handleLaboratoryClose" @confirm="handleLaboratoryConfirm" />
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script setup lang="ts">
|
|
<script setup lang="ts">
|
|
@@ -732,9 +742,10 @@ import Drawer from './models/drawer.vue';
|
|
|
import Baseinfo from './models/baseinfo.vue';
|
|
import Baseinfo from './models/baseinfo.vue';
|
|
|
import { useClientRequest } from '@/utils/request';
|
|
import { useClientRequest } from '@/utils/request';
|
|
|
import type { TaskType, YesNoType, TimeRange, PlantInfo, DelegateInfo, InoculationInfo, LandInfo, BaseSelectData, PlantationTaskForm, FormRuleItem, FormRules } from './models/types';
|
|
import type { TaskType, YesNoType, TimeRange, PlantInfo, DelegateInfo, InoculationInfo, LandInfo, BaseSelectData, PlantationTaskForm, FormRuleItem, FormRules } from './models/types';
|
|
|
|
|
+import Drawer_laboratory from './models/drawer_laboratory.vue';
|
|
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
|
|
-const { feed_amount_unit, planting_mg_unit, inoculation_unit, inoculation_dosage_unit, transplant_method, plantation_type, sowing_method, area_unit, plantation_method, reproduction_type, scale_unit, feeding_method, mg_method, task_gap_flag, pt_task_type, pt_org_type, yes_no } = toRefs<any>(
|
|
|
|
|
- proxy?.useDict('feed_amount_unit', 'planting_mg_unit', 'inoculation_unit', 'inoculation_dosage_unit', 'transplant_method', 'plantation_type', 'sowing_method', 'area_unit', 'plantation_method', 'reproduction_type', 'scale_unit', 'feeding_method', 'mg_method', 'task_gap_flag', 'pt_task_type', 'pt_org_type', 'yes_no')
|
|
|
|
|
|
|
+const { pt_feed_amount_unit, pt_planting_mg_unit, pt_inoculation_unit, pt_inoculation_dosage_unit, pt_transplant_method, pt_plantation_type, pt_sowing_method, pt_area_unit, pt_plantation_method, pt_reproduction_type, pt_scale_unit, pt_feeding_method, pt_mg_method, pt_task_gap_flag, pt_task_type, pt_org_type, yes_no } = toRefs<any>(
|
|
|
|
|
+ proxy?.useDict('pt_feed_amount_unit', 'pt_planting_mg_unit', 'pt_inoculation_unit', 'pt_inoculation_dosage_unit', 'pt_transplant_method', 'pt_plantation_type', 'pt_sowing_method', 'pt_area_unit', 'pt_plantation_method', 'pt_reproduction_type', 'pt_scale_unit', 'pt_feeding_method', 'pt_mg_method', 'pt_task_gap_flag', 'pt_task_type', 'pt_org_type', 'yes_no')
|
|
|
);
|
|
);
|
|
|
const form = ref<PlantationTaskForm>({
|
|
const form = ref<PlantationTaskForm>({
|
|
|
deawerData: null,
|
|
deawerData: null,
|
|
@@ -954,7 +965,7 @@ const rules = reactive({
|
|
|
plantingAmount: [{ required: true, message: '请输入养殖面积' }],
|
|
plantingAmount: [{ required: true, message: '请输入养殖面积' }],
|
|
|
breedScale: [{ required: true, message: '请输入养殖区域' }],
|
|
breedScale: [{ required: true, message: '请输入养殖区域' }],
|
|
|
plant: [{ validator: validateBreedingAmount, trigger: 'blur' }],
|
|
plant: [{ validator: validateBreedingAmount, trigger: 'blur' }],
|
|
|
- remark: [{ required: true, message: '请输入备注' }],
|
|
|
|
|
|
|
+ remark: [{ required: false, message: '请输入备注' }],
|
|
|
});
|
|
});
|
|
|
const rules1 = reactive({
|
|
const rules1 = reactive({
|
|
|
baseId: [{ required: true, message: '请选择种养殖所在的基地' }],
|
|
baseId: [{ required: true, message: '请选择种养殖所在的基地' }],
|
|
@@ -970,7 +981,7 @@ const rules1 = reactive({
|
|
|
plantingAmount: [{ required: true, message: '请输入养殖面积' }],
|
|
plantingAmount: [{ required: true, message: '请输入养殖面积' }],
|
|
|
breedScale: [{ required: true, message: '请输入养殖区域' }],
|
|
breedScale: [{ required: true, message: '请输入养殖区域' }],
|
|
|
plant: [{ validator: validateBreedingAmount, trigger: 'blur' }],
|
|
plant: [{ validator: validateBreedingAmount, trigger: 'blur' }],
|
|
|
- remark: [{ required: true, message: '请输入备注' }],
|
|
|
|
|
|
|
+ remark: [{ required: false, message: '请输入备注' }],
|
|
|
});
|
|
});
|
|
|
const rules2 = reactive({
|
|
const rules2 = reactive({
|
|
|
baseId: [{ required: true, message: '请选择种植所在的基地' }],
|
|
baseId: [{ required: true, message: '请选择种植所在的基地' }],
|
|
@@ -983,7 +994,7 @@ const rules2 = reactive({
|
|
|
queryType6: [{ validator: validateBreedingTime, trigger: 'blur' }],
|
|
queryType6: [{ validator: validateBreedingTime, trigger: 'blur' }],
|
|
|
plantingAmount: [{ required: true, message: '请输入种植面积' }],
|
|
plantingAmount: [{ required: true, message: '请输入种植面积' }],
|
|
|
plant: [{ validator: validateBreedingAmount, trigger: 'blur' }],
|
|
plant: [{ validator: validateBreedingAmount, trigger: 'blur' }],
|
|
|
- remark: [{ required: true, message: '请输入备注' }],
|
|
|
|
|
|
|
+ remark: [{ required: false, message: '请输入备注' }],
|
|
|
preCropId: [{ required: false, message: '请选择前茬植物' }],
|
|
preCropId: [{ required: false, message: '请选择前茬植物' }],
|
|
|
reproductionType: [{ required: true, message: '请选择选择繁殖方式' }],
|
|
reproductionType: [{ required: true, message: '请选择选择繁殖方式' }],
|
|
|
});
|
|
});
|
|
@@ -1002,7 +1013,7 @@ const rules3 = reactive({
|
|
|
plant: [{ validator: validateBreedingAmount, trigger: 'blur' }],
|
|
plant: [{ validator: validateBreedingAmount, trigger: 'blur' }],
|
|
|
'inoculation.inoculationAmount': [{ validator: validateinoculation, trigger: 'blur' }],
|
|
'inoculation.inoculationAmount': [{ validator: validateinoculation, trigger: 'blur' }],
|
|
|
'inoculation.inoculationDosage': [{ validator: validateInoculationDosage, trigger: 'blur' }],
|
|
'inoculation.inoculationDosage': [{ validator: validateInoculationDosage, trigger: 'blur' }],
|
|
|
- remark: [{ required: true, message: '请输入备注' }],
|
|
|
|
|
|
|
+ remark: [{ required: false, message: '请输入备注' }],
|
|
|
preCropId: [{ required: false, message: '请选择前茬植物' }],
|
|
preCropId: [{ required: false, message: '请选择前茬植物' }],
|
|
|
reproductionType: [{ required: true, message: '请选择选择繁殖方式' }],
|
|
reproductionType: [{ required: true, message: '请选择选择繁殖方式' }],
|
|
|
});
|
|
});
|
|
@@ -1087,8 +1098,11 @@ const save = () => {
|
|
|
...form.value,
|
|
...form.value,
|
|
|
...form.value.queryType6,
|
|
...form.value.queryType6,
|
|
|
...form.value.plant,
|
|
...form.value.plant,
|
|
|
|
|
+ ...form.value.inoculation,
|
|
|
animalIds: animalIds.value,
|
|
animalIds: animalIds.value,
|
|
|
};
|
|
};
|
|
|
|
|
+ console.log(params);
|
|
|
|
|
+
|
|
|
const res = await useClientRequest.post('/plt-api/app/plantationTask/saveTask', params);
|
|
const res = await useClientRequest.post('/plt-api/app/plantationTask/saveTask', params);
|
|
|
if (res.code == 200) {
|
|
if (res.code == 200) {
|
|
|
uni.showToast({
|
|
uni.showToast({
|
|
@@ -1116,10 +1130,10 @@ const saveDraft = () => {
|
|
|
try {
|
|
try {
|
|
|
const params = {
|
|
const params = {
|
|
|
...form.value,
|
|
...form.value,
|
|
|
- plannedStartDate: form.value.queryType6.plannedStartDate,
|
|
|
|
|
- plannedEndDate: form.value.queryType6.plannedEndDate,
|
|
|
|
|
- plantingMgAmount: form.value.plant.plantingMgAmount,
|
|
|
|
|
- plantingMgUnit: form.value.plant.plantingMgUnit,
|
|
|
|
|
|
|
+ ...form.value.queryType6,
|
|
|
|
|
+ ...form.value.plant,
|
|
|
|
|
+ ...form.value.inoculation,
|
|
|
|
|
+ animalIds: animalIds.value,
|
|
|
};
|
|
};
|
|
|
const res = await useClientRequest.post('/plt-api/app/plantationTask/draftTask', params);
|
|
const res = await useClientRequest.post('/plt-api/app/plantationTask/draftTask', params);
|
|
|
if (res.code == 200) {
|
|
if (res.code == 200) {
|
|
@@ -1158,9 +1172,7 @@ const handleDeleteConfirm = () => {
|
|
|
const handleDeleteCancel = () => {
|
|
const handleDeleteCancel = () => {
|
|
|
animalId.value = null;
|
|
animalId.value = null;
|
|
|
};
|
|
};
|
|
|
-
|
|
|
|
|
const clickSwipe = async (name: any, index: number) => {
|
|
const clickSwipe = async (name: any, index: number) => {
|
|
|
- console.log(name, index);
|
|
|
|
|
if (name?.index == 0) {
|
|
if (name?.index == 0) {
|
|
|
const res = await uni.showModal({
|
|
const res = await uni.showModal({
|
|
|
title: '删除提示',
|
|
title: '删除提示',
|
|
@@ -1186,25 +1198,46 @@ const clickSwipe = async (name: any, index: number) => {
|
|
|
};
|
|
};
|
|
|
// 如果是组培实验室的话,繁育量是一个计算属性
|
|
// 如果是组培实验室的话,繁育量是一个计算属性
|
|
|
const plantingMgAmount = computed(() => {
|
|
const plantingMgAmount = computed(() => {
|
|
|
- if (+deawerData.value.data[0]?.landType == 3) {
|
|
|
|
|
- const inoculationAmount = form.value.inoculation?.inoculationAmount;
|
|
|
|
|
- const inoculationDosage = form.value.inoculation?.inoculationDosage;
|
|
|
|
|
- if (inoculationAmount && inoculationDosage) {
|
|
|
|
|
- form.value.plant.plantingMgAmount = +inoculationAmount * +inoculationDosage;
|
|
|
|
|
- return form.value.plant.plantingMgAmount || '';
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ // 安全访问嵌套属性
|
|
|
|
|
+ if (Number(deawerData.value?.data?.[0]?.landType) !== 3) {
|
|
|
|
|
+ return '';
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ const inoculationAmount = Number(form.value?.inoculation?.inoculationAmount);
|
|
|
|
|
+ const inoculationDosage = Number(form.value?.inoculation?.inoculationDosage);
|
|
|
|
|
+
|
|
|
|
|
+ // 如果任一值为无效数字,返回空字符串
|
|
|
|
|
+ if (!inoculationAmount || !inoculationDosage || isNaN(inoculationAmount) || isNaN(inoculationDosage)) {
|
|
|
return '';
|
|
return '';
|
|
|
}
|
|
}
|
|
|
- return '';
|
|
|
|
|
|
|
+
|
|
|
|
|
+ const result = inoculationAmount * inoculationDosage;
|
|
|
|
|
+ // 返回计算结果,保持数字类型或空字符串
|
|
|
|
|
+ return isNaN(result) ? '' : result;
|
|
|
});
|
|
});
|
|
|
// 如果是组培实验室的话,繁育量单位是一个计算属性
|
|
// 如果是组培实验室的话,繁育量单位是一个计算属性
|
|
|
const plantingMgUnit = computed(() => {
|
|
const plantingMgUnit = computed(() => {
|
|
|
- if (form.value.taskType === 11) {
|
|
|
|
|
|
|
+ if (Number(deawerData.value?.data?.[0]?.landType) == 3) {
|
|
|
form.value.plant.plantingMgUnit = form.value.inoculation?.inoculationDosageUnit || null;
|
|
form.value.plant.plantingMgUnit = form.value.inoculation?.inoculationDosageUnit || null;
|
|
|
return form.value.plant.plantingMgUnit;
|
|
return form.value.plant.plantingMgUnit;
|
|
|
}
|
|
}
|
|
|
return null;
|
|
return null;
|
|
|
});
|
|
});
|
|
|
|
|
+const laboratory = ref<any>();
|
|
|
|
|
+// 控制抽屉显示状态
|
|
|
|
|
+const laboratoryVisible = ref(false);
|
|
|
|
|
+// 处理实验室的关闭
|
|
|
|
|
+function handleLaboratoryClose() {
|
|
|
|
|
+ laboratory.value = null;
|
|
|
|
|
+}
|
|
|
|
|
+// 处理实验室的打开
|
|
|
|
|
+function openLaboratory() {
|
|
|
|
|
+ laboratoryVisible.value = true;
|
|
|
|
|
+}
|
|
|
|
|
+// 处理抽屉确认事件
|
|
|
|
|
+function handleLaboratoryConfirm(data: any) {
|
|
|
|
|
+ console.log('收到基地选择数据:', data);
|
|
|
|
|
+}
|
|
|
onLoad((options) => {
|
|
onLoad((options) => {
|
|
|
form.value.taskType = options?.taskType;
|
|
form.value.taskType = options?.taskType;
|
|
|
if (+options?.taskType == 1 || +options?.taskType == 11) {
|
|
if (+options?.taskType == 1 || +options?.taskType == 11) {
|
|
@@ -1223,6 +1256,8 @@ const gotoTorganism = (type: number) => {
|
|
|
if (type == 1) {
|
|
if (type == 1) {
|
|
|
uni.$once('updateBiologicalname', function (data) {
|
|
uni.$once('updateBiologicalname', function (data) {
|
|
|
Biological.value = data.msg;
|
|
Biological.value = data.msg;
|
|
|
|
|
+ console.log(Biological.value);
|
|
|
|
|
+
|
|
|
form.value.varietyId = data.msg.id;
|
|
form.value.varietyId = data.msg.id;
|
|
|
});
|
|
});
|
|
|
} else {
|
|
} else {
|
|
@@ -1238,7 +1273,9 @@ const gotoTorganism = (type: number) => {
|
|
|
// 查看是否有缓存的信息
|
|
// 查看是否有缓存的信息
|
|
|
const getCache = async (taskType: TaskType | null) => {
|
|
const getCache = async (taskType: TaskType | null) => {
|
|
|
const res = await useClientRequest.get(`/plt-api/app/plantationTask/getDraft/${taskType}`);
|
|
const res = await useClientRequest.get(`/plt-api/app/plantationTask/getDraft/${taskType}`);
|
|
|
|
|
+ if (!res.data) return;
|
|
|
form.value = res.data;
|
|
form.value = res.data;
|
|
|
|
|
+
|
|
|
form.value.queryType6 = {
|
|
form.value.queryType6 = {
|
|
|
plannedStartDate: res.data.plannedStartDate,
|
|
plannedStartDate: res.data.plannedStartDate,
|
|
|
plannedEndDate: res.data.plannedEndDate,
|
|
plannedEndDate: res.data.plannedEndDate,
|
|
@@ -1253,6 +1290,19 @@ const getCache = async (taskType: TaskType | null) => {
|
|
|
plantingMgAmount: res.data.plantingMgAmount,
|
|
plantingMgAmount: res.data.plantingMgAmount,
|
|
|
plantingMgUnit: res.data.plantingMgUnit,
|
|
plantingMgUnit: res.data.plantingMgUnit,
|
|
|
};
|
|
};
|
|
|
|
|
+ if (res.data.animalIds) {
|
|
|
|
|
+ animalIds.value = res.data.animalIds;
|
|
|
|
|
+ }
|
|
|
|
|
+ if (res.data.preCropCode) {
|
|
|
|
|
+ PreBiological.value = {};
|
|
|
|
|
+ const Bio = await useClientRequest.get(`/plt-api/app/medicine/getMedicineByCode/${res.data.preCropCode}`);
|
|
|
|
|
+ PreBiological.value = Bio.data;
|
|
|
|
|
+ }
|
|
|
|
|
+ if (res.data.varietyCode) {
|
|
|
|
|
+ Biological.value = {};
|
|
|
|
|
+ const Bio = await useClientRequest.get(`/plt-api/app/medicine/getMedicineByCode/${res.data.varietyCode}`);
|
|
|
|
|
+ Biological.value = Bio.data;
|
|
|
|
|
+ }
|
|
|
// 判断有没有基地,然后去获取基地数据
|
|
// 判断有没有基地,然后去获取基地数据
|
|
|
if (res.data.baseId) {
|
|
if (res.data.baseId) {
|
|
|
deawerData.value = {};
|
|
deawerData.value = {};
|
|
@@ -1262,11 +1312,20 @@ const getCache = async (taskType: TaskType | null) => {
|
|
|
// adcodeName
|
|
// adcodeName
|
|
|
deawerData.value.adcodeName = res.data.baseRef.baseInfo.adcodeName;
|
|
deawerData.value.adcodeName = res.data.baseRef.baseInfo.adcodeName;
|
|
|
if (res.data.landIds.length == 0) {
|
|
if (res.data.landIds.length == 0) {
|
|
|
- deawerData.value.aloneChecked = '';
|
|
|
|
|
|
|
+ deawerData.value.aloneChecked = true;
|
|
|
const landIds = await useClientRequest.get('/plt-api/app/baseLandInfo/pageList', { baseId: res.data.baseId });
|
|
const landIds = await useClientRequest.get('/plt-api/app/baseLandInfo/pageList', { baseId: res.data.baseId });
|
|
|
deawerData.value.data = landIds.rows;
|
|
deawerData.value.data = landIds.rows;
|
|
|
|
|
+ } else {
|
|
|
|
|
+ deawerData.value.aloneChecked = false;
|
|
|
|
|
+ deawerData.value.data = [];
|
|
|
|
|
+ const landIds = await useClientRequest.get('/plt-api/app/baseLandInfo/pageList', { baseId: res.data.baseId });
|
|
|
|
|
+ //找到res.data.landIds和landIds.rows中的id相同的项
|
|
|
|
|
+ landIds.rows.forEach((i: any) => {
|
|
|
|
|
+ if (res.data.landIds.find((t: any) => t == i.id)) {
|
|
|
|
|
+ deawerData.value.data.push(i);
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
}
|
|
}
|
|
|
- console.log(deawerData.value);
|
|
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|
|
|
onMounted(() => {
|
|
onMounted(() => {
|