|
@@ -1,11 +1,11 @@
|
|
|
<template>
|
|
<template>
|
|
|
- <z-paging ref="paging" v-model="list" bgColor="#f7f7f7" @query="query" 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>
|
|
<ut-navbar title="创建种养殖任务" :fixed="false"></ut-navbar>
|
|
|
</template>
|
|
</template>
|
|
|
<view class="pt-24">
|
|
<view class="pt-24">
|
|
|
<!-- 养殖 -->
|
|
<!-- 养殖 -->
|
|
|
- <template v-if="+form.taskType == 2">
|
|
|
|
|
|
|
+ <template v-if="form.taskType == 2">
|
|
|
<up-form class="p-rtv" labelPosition="top" :model="form" :rules="rules" labelWidth="auto" ref="upFormRef">
|
|
<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="startline-title pl-24 ml-24 mb-16">基地信息</view>
|
|
|
<view class="bg-#fff pd-24">
|
|
<view class="bg-#fff pd-24">
|
|
@@ -132,7 +132,7 @@
|
|
|
</up-form>
|
|
</up-form>
|
|
|
</template>
|
|
</template>
|
|
|
<!-- 种畜繁育 -->
|
|
<!-- 种畜繁育 -->
|
|
|
- <template v-if="+form.taskType == 21">
|
|
|
|
|
|
|
+ <template v-if="form.taskType == 21">
|
|
|
<up-form class="p-rtv" labelPosition="top" :model="form" :rules="rules1" labelWidth="auto" ref="upFormRef">
|
|
<up-form class="p-rtv" labelPosition="top" :model="form" :rules="rules1" labelWidth="auto" ref="upFormRef">
|
|
|
<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">
|
|
<view class="bg-#fff pd-24">
|
|
@@ -161,18 +161,18 @@
|
|
|
<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-radio-group>
|
|
|
</up-form-item>
|
|
</up-form-item>
|
|
|
- <up-form-item borderBottom label="委托企业" required prop="delegateInfo" id="varietyIdpppp">
|
|
|
|
|
- <view v-if="!Biological" @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">
|
|
|
|
|
|
|
+ <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=""></view>
|
|
|
<view class="f-s-34 c-primary">请选择委托企业</view>
|
|
<view class="f-s-34 c-primary">请选择委托企业</view>
|
|
|
</view>
|
|
</view>
|
|
|
- <view v-if="Biological" class="pd-24 d-flex flex-cln bg-#FBFDFB border-#37A954 b-radius mb-20 w-100% p-rtv">
|
|
|
|
|
- <up-icon @click="Biological = null" size="26rpx" color="red" name="close" style="position: absolute; right: 10rpx; top: 10rpx"></up-icon>
|
|
|
|
|
- <view class="mb-20">
|
|
|
|
|
- <text class="c-#333 f-s-34 f-w-5 mr-5">云南钰津供应链科技有限公司</text>
|
|
|
|
|
|
|
+ <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>
|
|
|
<view class="mb-20">
|
|
<view class="mb-20">
|
|
|
- <text class="c-#666 f-s-24">93851583573353575</text>
|
|
|
|
|
|
|
+ <text class="c-#666 f-s-24">{{ form?.delegateInfo?.crediteCode }}</text>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
</up-form-item>
|
|
</up-form-item>
|
|
@@ -217,7 +217,7 @@
|
|
|
<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="feeding_method" title="选择养殖方式">
|
|
|
- <up-form-item borderBottom label="养殖方式" required 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(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>
|
|
@@ -270,7 +270,7 @@
|
|
|
</up-form>
|
|
</up-form>
|
|
|
</template>
|
|
</template>
|
|
|
<!-- 种植 -->
|
|
<!-- 种植 -->
|
|
|
- <template v-if="+form.taskType == 1">
|
|
|
|
|
|
|
+ <template v-if="form.taskType == 1">
|
|
|
<up-form class="p-rtv" labelPosition="top" :model="form" :rules="rules2" labelWidth="auto" ref="upFormRef">
|
|
<up-form class="p-rtv" labelPosition="top" :model="form" :rules="rules2" labelWidth="auto" ref="upFormRef">
|
|
|
<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">
|
|
<view class="bg-#fff pd-24">
|
|
@@ -376,7 +376,7 @@
|
|
|
</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="reproduction_type" title="选择繁殖方式">
|
|
|
- <up-form-item borderBottom label="繁殖方式" 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(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>
|
|
@@ -439,8 +439,8 @@
|
|
|
</up-form>
|
|
</up-form>
|
|
|
</template>
|
|
</template>
|
|
|
<!-- 种苗繁育 -->
|
|
<!-- 种苗繁育 -->
|
|
|
- <template v-if="+form.taskType == 11">
|
|
|
|
|
- <up-form class="p-rtv" labelPosition="top" :model="form" :rules="rules2" labelWidth="auto" ref="upFormRef">
|
|
|
|
|
|
|
+ <template v-if="form.taskType == 11">
|
|
|
|
|
+ <up-form class="p-rtv" labelPosition="top" :model="form" :rules="rules3" labelWidth="auto" ref="upFormRef">
|
|
|
<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">
|
|
<view class="bg-#fff pd-24">
|
|
|
<view class="b-radius bg-#EBF6EE c-primary f-s-24 pd-24 pb-16"> 注意:关联时请确保已添加到地块;关联时必须选到地块/圈舍/培养架。</view>
|
|
<view class="b-radius bg-#EBF6EE c-primary f-s-24 pd-24 pb-16"> 注意:关联时请确保已添加到地块;关联时必须选到地块/圈舍/培养架。</view>
|
|
@@ -468,18 +468,18 @@
|
|
|
<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-radio-group>
|
|
|
</up-form-item>
|
|
</up-form-item>
|
|
|
- <up-form-item borderBottom label="委托企业" required prop="delegateInfo" id="varietyIdpppp">
|
|
|
|
|
- <view v-if="!Biological" @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">
|
|
|
|
|
|
|
+ <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=""></view>
|
|
|
<view class="f-s-34 c-primary">请选择委托企业</view>
|
|
<view class="f-s-34 c-primary">请选择委托企业</view>
|
|
|
</view>
|
|
</view>
|
|
|
- <view v-if="Biological" class="pd-24 d-flex flex-cln bg-#FBFDFB border-#37A954 b-radius mb-20 w-100% p-rtv">
|
|
|
|
|
- <up-icon @click="Biological = null" size="26rpx" color="red" name="close" style="position: absolute; right: 10rpx; top: 10rpx"></up-icon>
|
|
|
|
|
- <view class="mb-20">
|
|
|
|
|
- <text class="c-#333 f-s-34 f-w-5 mr-5">云南钰津供应链科技有限公司</text>
|
|
|
|
|
|
|
+ <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>
|
|
|
<view class="mb-20">
|
|
<view class="mb-20">
|
|
|
- <text class="c-#666 f-s-24">93851583573353575</text>
|
|
|
|
|
|
|
+ <text class="c-#666 f-s-24">{{ form?.delegateInfo?.crediteCode }}</text>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
</up-form-item>
|
|
</up-form-item>
|
|
@@ -524,7 +524,7 @@
|
|
|
<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="plantation_method" title="选择繁育方式">
|
|
|
- <up-form-item borderBottom label="繁育方式" required 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(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>
|
|
@@ -532,13 +532,28 @@
|
|
|
</template>
|
|
</template>
|
|
|
</up-form-item>
|
|
</up-form-item>
|
|
|
</ut-action-sheet>
|
|
</ut-action-sheet>
|
|
|
|
|
+ <view class="h-1" id="queryType6pppp"></view>
|
|
|
|
|
+ <up-form-item :borderBottom="false" label="繁育日期" required prop="queryType6">
|
|
|
|
|
+ <ut-datetime-picker v-model="form.queryType6.plannedStartDate" mode="date" dateFields="day">
|
|
|
|
|
+ <view class="d-flex mr-20">
|
|
|
|
|
+ <up-input v-model="form.queryType6.plannedStartDate" 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>
|
|
|
|
|
+ <ut-datetime-picker v-model="form.queryType6.plannedEndDate" mode="date" dateFields="day">
|
|
|
|
|
+ <view class="d-flex">
|
|
|
|
|
+ <up-input v-model="form.queryType6.plannedEndDate" 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 v-if="+deawerData?.data[0]?.landType == 1" borderBottom label="种植面积" required prop="plantingAmount" id="plantingAmountpppp">
|
|
<up-form-item v-if="+deawerData?.data[0]?.landType == 1" borderBottom label="种植面积" required prop="plantingAmount" id="plantingAmountpppp">
|
|
|
<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.plantingAmount" placeholder="请输入种植面积" border="none"></up-input>
|
|
<up-input style="padding-left: 0" v-model="form.plantingAmount" placeholder="请输入种植面积" border="none"></up-input>
|
|
|
<view class="c-#333 f-s-32 f-w-5">{{ form.plantingUnit }}</view>
|
|
<view class="c-#333 f-s-32 f-w-5">{{ form.plantingUnit }}</view>
|
|
|
</view>
|
|
</view>
|
|
|
</up-form-item>
|
|
</up-form-item>
|
|
|
- <up-form-item v-if="+deawerData?.data[0]?.landType == 3" borderBottom label="接种数量" required prop="inoculation" 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="inoculation_unit" title="选择单位">
|
|
@@ -550,7 +565,7 @@
|
|
|
</ut-action-sheet>
|
|
</ut-action-sheet>
|
|
|
</view>
|
|
</view>
|
|
|
</up-form-item>
|
|
</up-form-item>
|
|
|
- <up-form-item v-if="+deawerData?.data[0]?.landType == 3" borderBottom label="接种剂量" required prop="inoculation" 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="inoculation_dosage_unit" title="选择单位">
|
|
@@ -560,45 +575,51 @@
|
|
|
<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>
|
|
|
- <ut-action-sheet v-model="form.inoculation.inoculationUnit" :tabs="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(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 v-if="form.inoculation?.inoculationUnit" class="f-s-30 c-333 f-w-5 w-100">{{ selectDictLabel(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 borderBottom label="繁育量" required 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="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>
|
|
|
|
|
+ </up-form-item>
|
|
|
|
|
+ <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="area_unit" title="选择单位">
|
|
|
|
|
|
|
+ <ut-action-sheet v-model="form.plant.plantingMgUnit" :tabs="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(area_unit, form.plant?.plantingMgUnit) }}</view>
|
|
|
|
|
|
|
+ <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-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>
|
|
|
- <view class="h-1" id="queryType6pppp"></view>
|
|
|
|
|
- <up-form-item :borderBottom="false" label="种植时间" required prop="queryType6">
|
|
|
|
|
- <ut-datetime-picker v-model="form.queryType6.plannedStartDate" mode="date" dateFields="day">
|
|
|
|
|
- <view class="d-flex mr-20">
|
|
|
|
|
- <up-input v-model="form.queryType6.plannedStartDate" placeholder="请选择种植开始时间" border="bottom" :customStyle="{ paddingLeft: '0rpx' }"></up-input>
|
|
|
|
|
- <up-icon size="22rpx" color="#2A6D52" name="arrow-down-fill" style="margin-left: -20rpx"></up-icon>
|
|
|
|
|
|
|
+ <up-form-item borderBottom label="培养基配方" prop="cultureMediumFormula" id="cultureMediumFormulapppp">
|
|
|
|
|
+ <view v-if="!Biological" @click="gotoTorganism(1)" 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="Biological" class="pd-24 d-flex flex-cln bg-#FBFDFB border-#37A954 b-radius mb-20 w-100% p-rtv">
|
|
|
|
|
+ <up-icon @click="Biological = null" size="26rpx" color="red" name="close" style="position: absolute; right: 10rpx; top: 10rpx"></up-icon>
|
|
|
|
|
+ <view class="mb-20">
|
|
|
|
|
+ <text class="c-#333 f-s-34 f-w-5 mr-5">{{ Biological?.varietyName }}</text>
|
|
|
|
|
+ <text class="c-#666 f-s-24">{{ Biological?.latinName }}</text>
|
|
|
</view>
|
|
</view>
|
|
|
- </ut-datetime-picker>
|
|
|
|
|
- <ut-datetime-picker v-model="form.queryType6.plannedEndDate" mode="date" dateFields="day">
|
|
|
|
|
- <view class="d-flex">
|
|
|
|
|
- <up-input v-model="form.queryType6.plannedEndDate" 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 class="mb-20">
|
|
|
|
|
+ <text class="c-#333 f-s-28 f-w-5 mr-5">{{ Biological?.genusName }}</text>
|
|
|
|
|
+ <text class="c-#666 f-s-24">{{ Biological?.genusLatinName }}</text>
|
|
|
</view>
|
|
</view>
|
|
|
- </ut-datetime-picker>
|
|
|
|
|
|
|
+ <view class="">
|
|
|
|
|
+ <text class="c-#666 f-s-24">产出:</text>
|
|
|
|
|
+ <text class="c-#666 f-s-24">{{ Biological?.medicineName }}</text>
|
|
|
|
|
+ </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="reproduction_type" title="选择繁殖方式">
|
|
|
- <up-form-item borderBottom label="繁殖方式" 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(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>
|
|
@@ -631,7 +652,7 @@
|
|
|
</template>
|
|
</template>
|
|
|
</up-form-item>
|
|
</up-form-item>
|
|
|
</ut-action-sheet>
|
|
</ut-action-sheet>
|
|
|
- <up-form-item borderBottom label="前茬植物" required prop="preCropId" id="preCropIddpppp">
|
|
|
|
|
|
|
+ <up-form-item borderBottom label="前茬植物" prop="preCropId" id="preCropIddpppp">
|
|
|
<view v-if="!PreBiological" @click="gotoTorganism(2)" class="w-100% d-flex a-c j-c pd-24 b-radius bg-#FBFDFB border-#AFDDBB">
|
|
<view v-if="!PreBiological" @click="gotoTorganism(2)" class="w-100% d-flex a-c j-c pd-24 b-radius bg-#FBFDFB border-#AFDDBB">
|
|
|
<view class=""></view>
|
|
<view class=""></view>
|
|
|
<view class="f-s-34 c-primary">请选择前茬植物名称</view>
|
|
<view class="f-s-34 c-primary">请选择前茬植物名称</view>
|
|
@@ -710,9 +731,12 @@ import { ref } from 'vue';
|
|
|
import Drawer from './models/drawer.vue';
|
|
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';
|
|
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
|
|
-const { 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('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 form = ref({
|
|
|
|
|
|
|
+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 form = ref<PlantationTaskForm>({
|
|
|
deawerData: null,
|
|
deawerData: null,
|
|
|
baseId: null,
|
|
baseId: null,
|
|
|
landIds: [],
|
|
landIds: [],
|
|
@@ -737,7 +761,7 @@ const form = ref({
|
|
|
plantingAmount: '',
|
|
plantingAmount: '',
|
|
|
remark: null,
|
|
remark: null,
|
|
|
delegateFlag: '0',
|
|
delegateFlag: '0',
|
|
|
- delegateInfo: { cusId: null, crediteCode: null, cusName: null },
|
|
|
|
|
|
|
+ delegateInfo: { cusId: '1795009980763025410', crediteCode: '91530102MACA96MJ9H', cusName: '演示企业' },
|
|
|
plantationType: null,
|
|
plantationType: null,
|
|
|
sowingMethod: null,
|
|
sowingMethod: null,
|
|
|
transplantMethod: null,
|
|
transplantMethod: null,
|
|
@@ -748,6 +772,7 @@ const form = ref({
|
|
|
inoculationDosage: null,
|
|
inoculationDosage: null,
|
|
|
inoculationDosageUnit: null,
|
|
inoculationDosageUnit: null,
|
|
|
},
|
|
},
|
|
|
|
|
+ cultureMediumFormula: null,
|
|
|
});
|
|
});
|
|
|
//单个溯源都数组
|
|
//单个溯源都数组
|
|
|
const animalIds = ref<any>([]);
|
|
const animalIds = ref<any>([]);
|
|
@@ -811,6 +836,10 @@ const validateBreedingTime = (rule: any, value: any, callback: any) => {
|
|
|
|
|
|
|
|
// 自定义校验函数:养殖量校验
|
|
// 自定义校验函数:养殖量校验
|
|
|
const validateBreedingAmount = (rule: any, value: any, callback: any) => {
|
|
const validateBreedingAmount = (rule: any, value: any, callback: any) => {
|
|
|
|
|
+ if (+deawerData.value?.data[0]?.landType == 3) {
|
|
|
|
|
+ callback();
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
if (!value) {
|
|
if (!value) {
|
|
|
callback(new Error('请输入养殖量'));
|
|
callback(new Error('请输入养殖量'));
|
|
|
return;
|
|
return;
|
|
@@ -826,6 +855,8 @@ const validateBreedingAmount = (rule: any, value: any, callback: any) => {
|
|
|
}
|
|
}
|
|
|
callback();
|
|
callback();
|
|
|
};
|
|
};
|
|
|
|
|
+// 委托企业
|
|
|
|
|
+const Enterprise = ref('123');
|
|
|
// 自定义delegateInfo 委托企业校验
|
|
// 自定义delegateInfo 委托企业校验
|
|
|
const validateDelegateInfo = (rule: any, value: any, callback: any) => {
|
|
const validateDelegateInfo = (rule: any, value: any, callback: any) => {
|
|
|
if (!value) {
|
|
if (!value) {
|
|
@@ -839,9 +870,75 @@ const validateDelegateInfo = (rule: any, value: any, callback: any) => {
|
|
|
}
|
|
}
|
|
|
if (!crediteCode) {
|
|
if (!crediteCode) {
|
|
|
callback(new Error('请选择委托企业'));
|
|
callback(new Error('请选择委托企业'));
|
|
|
|
|
+ return;
|
|
|
}
|
|
}
|
|
|
if (!cusName) {
|
|
if (!cusName) {
|
|
|
callback(new Error('请选择委托企业'));
|
|
callback(new Error('请选择委托企业'));
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ callback();
|
|
|
|
|
+};
|
|
|
|
|
+//判断是否要填种植面积
|
|
|
|
|
+const validatePlantingAmount = (rule: any, value: any, callback: any) => {
|
|
|
|
|
+ if (+deawerData.value?.data[0]?.landType == 1) {
|
|
|
|
|
+ if (!value || value.trim() === '') {
|
|
|
|
|
+ callback(new Error('请输入种植面积'));
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ callback();
|
|
|
|
|
+ return;
|
|
|
|
|
+ } else {
|
|
|
|
|
+ callback();
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+};
|
|
|
|
|
+// 判断是否要填接种数量
|
|
|
|
|
+const validateinoculation = (rule: any, value: any, callback: any) => {
|
|
|
|
|
+ if (+deawerData.value?.data[0]?.landType == 3) {
|
|
|
|
|
+ if (!value || value.trim() === '') {
|
|
|
|
|
+ callback(new Error('请输入接种数量'));
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ // 检查单位是否选择
|
|
|
|
|
+ if (!form.value.inoculation?.inoculationUnit) {
|
|
|
|
|
+ callback(new Error('请选择接种数量单位'));
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ callback();
|
|
|
|
|
+ } else {
|
|
|
|
|
+ callback();
|
|
|
|
|
+ }
|
|
|
|
|
+};
|
|
|
|
|
+const validateInoculationDosage = (rule: any, value: any, callback: any) => {
|
|
|
|
|
+ if (+deawerData.value?.data[0]?.landType == 3) {
|
|
|
|
|
+ // value 就是 form.inoculation.inoculationDosage 的值
|
|
|
|
|
+ if (!value || value.trim() === '') {
|
|
|
|
|
+ callback(new Error('请输入接种剂量'));
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ // 检查单位是否选择
|
|
|
|
|
+ if (!form.value.inoculation?.inoculationDosageUnit) {
|
|
|
|
|
+ callback(new Error('请选择接种剂量单位'));
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ callback();
|
|
|
|
|
+ } else {
|
|
|
|
|
+ callback();
|
|
|
|
|
+ }
|
|
|
|
|
+};
|
|
|
|
|
+// 判断溯源级别是否需要校验
|
|
|
|
|
+const validateMgMethod = (rule: any, value: any, callback: any) => {
|
|
|
|
|
+ if (+deawerData.value?.data[0]?.landType == 3) {
|
|
|
|
|
+ if (!value) {
|
|
|
|
|
+ callback(new Error('请选择溯源级别'));
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ callback();
|
|
|
|
|
+ } else {
|
|
|
|
|
+ callback();
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|
|
|
const rules = reactive({
|
|
const rules = reactive({
|
|
@@ -868,7 +965,7 @@ const rules1 = reactive({
|
|
|
varietyId: [{ required: true, message: '请选择养殖的动物名称' }],
|
|
varietyId: [{ required: true, message: '请选择养殖的动物名称' }],
|
|
|
plantationCode: [{ required: true, message: '请输入养殖批号' }],
|
|
plantationCode: [{ required: true, message: '请输入养殖批号' }],
|
|
|
technicalFile: [{ required: false, message: '请选择养殖技术规程文件' }],
|
|
technicalFile: [{ required: false, message: '请选择养殖技术规程文件' }],
|
|
|
- plantationMethod: [{ required: true, message: '请选择养殖方式' }],
|
|
|
|
|
|
|
+ plantationMethod: [{ required: false, message: '请选择养殖方式' }],
|
|
|
queryType6: [{ validator: validateBreedingTime, trigger: 'blur' }],
|
|
queryType6: [{ validator: validateBreedingTime, trigger: 'blur' }],
|
|
|
plantingAmount: [{ required: true, message: '请输入养殖面积' }],
|
|
plantingAmount: [{ required: true, message: '请输入养殖面积' }],
|
|
|
breedScale: [{ required: true, message: '请输入养殖区域' }],
|
|
breedScale: [{ required: true, message: '请输入养殖区域' }],
|
|
@@ -890,6 +987,25 @@ const rules2 = reactive({
|
|
|
preCropId: [{ required: false, message: '请选择前茬植物' }],
|
|
preCropId: [{ required: false, message: '请选择前茬植物' }],
|
|
|
reproductionType: [{ required: true, message: '请选择选择繁殖方式' }],
|
|
reproductionType: [{ required: true, message: '请选择选择繁殖方式' }],
|
|
|
});
|
|
});
|
|
|
|
|
+const rules3 = reactive({
|
|
|
|
|
+ baseId: [{ required: true, message: '请选择种植所在的基地' }],
|
|
|
|
|
+ taskType: [{ required: true, message: '请选择任务类型' }],
|
|
|
|
|
+ delegateFlag: [{ required: true, message: '请选择是否代繁育' }],
|
|
|
|
|
+ delegateInfo: [{ validator: validateDelegateInfo, trigger: 'blur' }],
|
|
|
|
|
+ mgMethod: [{ validator: validateMgMethod, trigger: 'blur' }],
|
|
|
|
|
+ varietyId: [{ required: true, message: '请选择种植的植物名称' }],
|
|
|
|
|
+ plantationCode: [{ required: true, message: '请输入种植批号' }],
|
|
|
|
|
+ technicalFile: [{ required: false, message: '请选择繁育技术规程文件' }],
|
|
|
|
|
+ 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' }],
|
|
|
|
|
+ remark: [{ required: true, message: '请输入备注' }],
|
|
|
|
|
+ preCropId: [{ required: false, message: '请选择前茬植物' }],
|
|
|
|
|
+ reproductionType: [{ required: true, message: '请选择选择繁殖方式' }],
|
|
|
|
|
+});
|
|
|
const upFormRef = ref<any>();
|
|
const upFormRef = ref<any>();
|
|
|
const paging = ref<any>();
|
|
const paging = ref<any>();
|
|
|
const list = ref<unknown>([]);
|
|
const list = ref<unknown>([]);
|
|
@@ -924,10 +1040,12 @@ function onDrawerConfirm(data: any) {
|
|
|
// 确认基地id
|
|
// 确认基地id
|
|
|
form.value.baseId = data.data[0]?.baseId;
|
|
form.value.baseId = data.data[0]?.baseId;
|
|
|
//确认地块面积
|
|
//确认地块面积
|
|
|
- form.value.plantingAmount = '';
|
|
|
|
|
- data.data.forEach((i: any) => {
|
|
|
|
|
- form.value.plantingAmount += i.area;
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ if (+data.data[0]?.landType !== 3) {
|
|
|
|
|
+ form.value.plantingAmount = '';
|
|
|
|
|
+ data.data.forEach((i: LandInfo) => {
|
|
|
|
|
+ form.value.plantingAmount += i.area;
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
//确认养殖区域的个数
|
|
//确认养殖区域的个数
|
|
|
form.value.breedScale = data.data?.length;
|
|
form.value.breedScale = data.data?.length;
|
|
|
if (data?.aloneChecked) {
|
|
if (data?.aloneChecked) {
|
|
@@ -947,9 +1065,10 @@ const PreBiological = ref<any>(null);
|
|
|
//随机生成
|
|
//随机生成
|
|
|
const randomCode = async () => {
|
|
const randomCode = async () => {
|
|
|
let plType = '';
|
|
let plType = '';
|
|
|
- if (+form.value.taskType == 1) {
|
|
|
|
|
|
|
+ const taskType = form.value.taskType;
|
|
|
|
|
+ if (taskType === 1) {
|
|
|
plType = 'P';
|
|
plType = 'P';
|
|
|
- } else if (+form.value.taskType == 2) {
|
|
|
|
|
|
|
+ } else if (taskType === 2) {
|
|
|
plType = 'F';
|
|
plType = 'F';
|
|
|
} else {
|
|
} else {
|
|
|
plType = 'C';
|
|
plType = 'C';
|
|
@@ -961,7 +1080,9 @@ const randomCode = async () => {
|
|
|
const save = () => {
|
|
const save = () => {
|
|
|
uni.$u.debounce(async () => {
|
|
uni.$u.debounce(async () => {
|
|
|
try {
|
|
try {
|
|
|
|
|
+ console.log('开始提交');
|
|
|
await upFormRef.value?.validate();
|
|
await upFormRef.value?.validate();
|
|
|
|
|
+ console.log('校验完成');
|
|
|
const params = {
|
|
const params = {
|
|
|
...form.value,
|
|
...form.value,
|
|
|
...form.value.queryType6,
|
|
...form.value.queryType6,
|
|
@@ -1038,7 +1159,7 @@ const handleDeleteCancel = () => {
|
|
|
animalId.value = null;
|
|
animalId.value = null;
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
-const clickSwipe = async (name, index) => {
|
|
|
|
|
|
|
+const clickSwipe = async (name: any, index: number) => {
|
|
|
console.log(name, index);
|
|
console.log(name, index);
|
|
|
if (name?.index == 0) {
|
|
if (name?.index == 0) {
|
|
|
const res = await uni.showModal({
|
|
const res = await uni.showModal({
|
|
@@ -1063,12 +1184,39 @@ const clickSwipe = async (name, index) => {
|
|
|
DialogFlag.value = name?.name;
|
|
DialogFlag.value = name?.name;
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|
|
|
|
|
+// 如果是组培实验室的话,繁育量是一个计算属性
|
|
|
|
|
+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 || '';
|
|
|
|
|
+ }
|
|
|
|
|
+ return '';
|
|
|
|
|
+ }
|
|
|
|
|
+ return '';
|
|
|
|
|
+});
|
|
|
|
|
+// 如果是组培实验室的话,繁育量单位是一个计算属性
|
|
|
|
|
+const plantingMgUnit = computed(() => {
|
|
|
|
|
+ if (form.value.taskType === 11) {
|
|
|
|
|
+ form.value.plant.plantingMgUnit = form.value.inoculation?.inoculationDosageUnit || null;
|
|
|
|
|
+ return form.value.plant.plantingMgUnit;
|
|
|
|
|
+ }
|
|
|
|
|
+ return null;
|
|
|
|
|
+});
|
|
|
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) {
|
|
|
form.value.plantingUnit = '亩';
|
|
form.value.plantingUnit = '亩';
|
|
|
|
|
+ if (+options?.taskType == 11) {
|
|
|
|
|
+ form.value.gapFlag = 0;
|
|
|
|
|
+ }
|
|
|
} else {
|
|
} else {
|
|
|
form.value.plantingUnit = '平方米';
|
|
form.value.plantingUnit = '平方米';
|
|
|
|
|
+ if (+options?.taskType == 21) {
|
|
|
|
|
+ form.value.gapFlag = 0;
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
const gotoTorganism = (type: number) => {
|
|
const gotoTorganism = (type: number) => {
|
|
@@ -1087,5 +1235,41 @@ const gotoTorganism = (type: number) => {
|
|
|
url: '/tools/por-torganism/index',
|
|
url: '/tools/por-torganism/index',
|
|
|
});
|
|
});
|
|
|
};
|
|
};
|
|
|
-onMounted(() => {});
|
|
|
|
|
|
|
+// 查看是否有缓存的信息
|
|
|
|
|
+const getCache = async (taskType: TaskType | null) => {
|
|
|
|
|
+ const res = await useClientRequest.get(`/plt-api/app/plantationTask/getDraft/${taskType}`);
|
|
|
|
|
+ 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,
|
|
|
|
|
+ };
|
|
|
|
|
+ // 判断有没有基地,然后去获取基地数据
|
|
|
|
|
+ if (res.data.baseId) {
|
|
|
|
|
+ deawerData.value = {};
|
|
|
|
|
+ deawerData.value.baseName = res.data.baseRef.baseName;
|
|
|
|
|
+ deawerData.value.areaUnit = res.data.baseRef.baseInfo.areaUnit;
|
|
|
|
|
+ deawerData.value.address = res.data.baseRef.baseInfo.address;
|
|
|
|
|
+ // adcodeName
|
|
|
|
|
+ deawerData.value.adcodeName = res.data.baseRef.baseInfo.adcodeName;
|
|
|
|
|
+ if (res.data.landIds.length == 0) {
|
|
|
|
|
+ deawerData.value.aloneChecked = '';
|
|
|
|
|
+ const landIds = await useClientRequest.get('/plt-api/app/baseLandInfo/pageList', { baseId: res.data.baseId });
|
|
|
|
|
+ deawerData.value.data = landIds.rows;
|
|
|
|
|
+ }
|
|
|
|
|
+ console.log(deawerData.value);
|
|
|
|
|
+ }
|
|
|
|
|
+};
|
|
|
|
|
+onMounted(() => {
|
|
|
|
|
+ getCache(form.value.taskType);
|
|
|
|
|
+});
|
|
|
</script>
|
|
</script>
|