lisy 1 settimana fa
parent
commit
9422c6963a

+ 2 - 2
src/pages/plant/port/models/task.vue

@@ -9,7 +9,7 @@
                 <view class="c-#333 f-s-34 f-w-5 mr-6">{{ data?.variety }}</view>
                 <view class="c-#666 f-s-26">{{ data?.genusName }}</view>
             </view>
-            <view class="d-flex f-s-28 pd-16 pt-8 pb-8" @click.stop="$emit('cardClick')">
+            <view class="d-flex a-c f-s-28 pd-16 pt-8 pb-8" @click.stop="$emit('cardClick')">
                 <view class="c-#666 w-s-no">养殖批号:</view>
                 <view class="c-#333 f-w-5">{{ data?.plantationCode }}</view>
             </view>
@@ -157,7 +157,7 @@
                 <view class="c-#333 f-s-34 f-w-5 mr-6">{{ data?.variety }}</view>
                 <view class="c-#666 f-s-26">{{ data?.genusName }}</view>
             </view>
-            <view class="d-flexf-s-28 pd-16 pt-8 pb-8" @click.stop="$emit('cardClick')">
+            <view class="d-flex f-s-28 pd-16 pt-8 pb-8" @click.stop="$emit('cardClick')">
                 <view class="c-#666 w-s-no">种植批号:</view>
                 <view class="c-#333 f-w-5">{{ data?.plantationCode }}</view>
             </view>

+ 40 - 74
src/plant/port/port-harvest-create/index.vue

@@ -25,15 +25,13 @@
                     <view class="h-1" id="outputTypepppp"></view>
                     <template v-if="+taskType == 11 || +taskType == 21 || changeRevisions">
                         <up-form-item borderBottom label="采收类型" required prop="outputType">
-                            <view v-if="form?.outputType" class="f-s-30 c-#999 f-w-5 flex1">{{
-                                selectDictLabel(pt_output_type, form?.outputType) }}</view>
+                            <view v-if="form?.outputType" class="f-s-30 c-#999 f-w-5 flex1">{{ selectDictLabel(pt_output_type, form?.outputType) }}</view>
                         </up-form-item>
                     </template>
                     <template v-else>
                         <ut-action-sheet v-model="form.outputType" :tabs="pt_output_type" title="选择采收类型">
                             <up-form-item borderBottom label="采收类型" required prop="outputType">
-                                <view v-if="form?.outputType" class="f-s-30 c-333 f-w-5 flex1">{{
-                                    selectDictLabel(pt_output_type, form?.outputType) }}</view>
+                                <view v-if="form?.outputType" class="f-s-30 c-333 f-w-5 flex1">{{ selectDictLabel(pt_output_type, form?.outputType) }}</view>
                                 <view v-else class="f-s-30 c-ccc f-w-4 flex1">请选择采收类型</view>
                                 <template #right>
                                     <up-icon size="22rpx" color="#37A954" name="arrow-down-fill"></up-icon>
@@ -45,8 +43,7 @@
                     <template v-if="+form?.outputType == 1">
                         <ut-action-sheet v-model="form.seedType" :tabs="pt_seed_type" title="选择种源类型" mode="custom">
                             <up-form-item borderBottom label="种源类型" required prop="seedType" id="seedTypepppp">
-                                <view v-if="form.seedType" class="f-s-30 c-333 f-w-5 flex1">{{
-                                    selectDictLabel(pt_seed_type, form?.seedType) }}</view>
+                                <view v-if="form.seedType" class="f-s-30 c-333 f-w-5 flex1">{{ selectDictLabel(pt_seed_type, form?.seedType) }}</view>
                                 <view v-else class="f-s-30 c-ccc f-w-4 flex1">请选择种源类型</view>
                                 <template #right>
                                     <up-icon size="22rpx" color="#37A954" name="arrow-down-fill"></up-icon>
@@ -57,23 +54,17 @@
                         <!-- <up-form-item v-if="form?.seedType == 'A4' || form?.seedType == 'A8'" borderBottom label="菌种/菌株编号" required prop="fungusCode" id="fungusCodeppppp">
                             <up-input v-model="form.fungusCode" placeholder="请输入菌种/菌株编号" border="none"></up-input>
                         </up-form-item> -->
-                        <up-form-item required v-if="['A4', 'A8'].includes(form.seedType as string)"
-                            :label="`${selectDictLabel(pt_seed_type, form.seedType as string)}编号`"
-                            class="form-item-bottom-padding-0">
+                        <up-form-item required v-if="['A4', 'A8'].includes(form.seedType as string)" :label="`${selectDictLabel(pt_seed_type, form.seedType as string)}编号`" class="form-item-bottom-padding-0">
                             <view class="d-flex flex1">
                                 <view class="flex1">
-                                    <ut-action-sheet v-model="form.fungusCodeType" :tabs="pt_fungus_code_type"
-                                        mode="custom" title="选择单位">
-                                        <up-form-item prop="fungusCodeType" border-bottom
-                                            class="form-item-top-padding-0">
+                                    <ut-action-sheet v-model="form.fungusCodeType" :tabs="pt_fungus_code_type" mode="custom" title="选择单位">
+                                        <up-form-item prop="fungusCodeType" border-bottom class="form-item-top-padding-0">
                                             <view class="flex1" style="line-height: 24px">
-                                                <view v-if="form.fungusCodeType" class="f-s-30 c-333 f-w-5">{{
-                                                    selectDictLabel(pt_fungus_code_type, form.fungusCodeType) }}</view>
+                                                <view v-if="form.fungusCodeType" class="f-s-30 c-333 f-w-5">{{ selectDictLabel(pt_fungus_code_type, form.fungusCodeType) }}</view>
                                                 <view v-else class="f-s-30 c-ccc f-w-4">选择编号类型</view>
                                             </view>
                                             <template #right>
-                                                <up-icon class="pr-20" size="22rpx" color="#37A954"
-                                                    name="arrow-down-fill"></up-icon>
+                                                <up-icon class="pr-20" size="22rpx" color="#37A954" name="arrow-down-fill"></up-icon>
                                             </template>
                                         </up-form-item>
                                     </ut-action-sheet>
@@ -81,8 +72,7 @@
                                 <view class="pd-5"></view>
                                 <view class="flex1">
                                     <up-form-item prop="fungusCode" border-bottom class="form-item-top-padding-0">
-                                        <up-input v-model="form.fungusCode" placeholder="输入数字小数点" border="none"
-                                            clearable></up-input>
+                                        <up-input v-model="form.fungusCode" placeholder="输入数字小数点" border="none" clearable></up-input>
                                     </up-form-item>
                                 </view>
                             </view>
@@ -91,44 +81,38 @@
                     <!-- 采收日期 -->
                     <up-form-item :borderBottom="false" label="采收日期" required>
                         <up-form-item :borderBottom="false" prop="harvestDate" id="harvestDatepppp">
-                            <ut-datetime-picker v-model="form.harvestDate" mode="date" dateFields="day"
-                                @change="changeStartTime">
+                            <ut-datetime-picker v-model="form.harvestDate" mode="date" dateFields="day" @change="changeStartTime">
                                 <view class="d-flex mr-20">
-                                    <up-input v-model="form.harvestDate" readonly placeholder="请选择采收开始时间"
-                                        border="bottom" :customStyle="{ paddingLeft: '0rpx' }"></up-input>
-                                    <up-icon size="22rpx" color="#37A954" name="arrow-down-fill"
-                                        style="margin-left: -20rpx"></up-icon>
+                                    <up-input v-model="form.harvestDate" readonly placeholder="请选择采收开始时间" border="bottom" :customStyle="{ paddingLeft: '0rpx' }"></up-input>
+                                    <up-icon size="22rpx" color="#37A954" name="arrow-down-fill" style="margin-left: -20rpx"></up-icon>
                                 </view>
                             </ut-datetime-picker>
                         </up-form-item>
                         <up-form-item :borderBottom="false" prop="harvestDateEnd" id="harvestDateEndpppp">
                             <ut-datetime-picker v-model="form.harvestDateEnd" mode="date" dateFields="day">
                                 <view class="d-flex">
-                                    <up-input v-model="form.harvestDateEnd" readonly placeholder="请选择采收结束时间"
-                                        border="bottom" :customStyle="{ paddingLeft: '0rpx' }"></up-input>
-                                    <up-icon size="22rpx" color="#37A954" name="arrow-down-fill"
-                                        style="margin-left: -20rpx"></up-icon>
+                                    <up-input v-model="form.harvestDateEnd" readonly placeholder="请选择采收结束时间" border="bottom" :customStyle="{ paddingLeft: '0rpx' }"></up-input>
+                                    <up-icon size="22rpx" color="#37A954" name="arrow-down-fill" style="margin-left: -20rpx"></up-icon>
                                 </view>
                             </ut-datetime-picker>
                         </up-form-item>
                     </up-form-item>
                     <!-- 采收部位 -->
-                    <up-form-item v-if="+form?.outputType == 2" borderBottom label="药用部位/对象" prop="harvestPart"
-                        required>
-                        <SelectMedicinalPart v-model="form.harvestPart" v-model:value-name="form.harvestPartName"
-                            title="选择采收部位">
-                            <up-input v-model="form.harvestPartName" placeholder="请选择药用部位/对象" border="none" readonly
-                                clearable></up-input>
-                        </SelectMedicinalPart>
-                    </up-form-item>
+                    <SelectMedicinalPart v-if="+form?.outputType == 2" v-model="form.harvestPart" v-model:value-name="form.harvestPartName" title="选择采收部位">
+                        <up-form-item borderBottom label="药用部位/对象" prop="harvestPart" required>
+                            <up-input v-model="form.harvestPartName" placeholder="请选择药用部位/对象" border="none" readonly clearable></up-input>
+
+                            <template #right>
+                                <up-icon size="22rpx" color="#37A954" name="arrow-down-fill"></up-icon>
+                            </template>
+                        </up-form-item>
+                    </SelectMedicinalPart>
                     <!-- 采收批号 -->
                     <up-form-item borderBottom label="采收批号" required prop="harvestCode" id="harvestCodepppp">
                         <view class="d-flex a-c j-sb w-100%">
                             <view class="flex1 d-flex">
-                                <up-input v-model="form.harvestCode" placeholder="请输入采收批号" border="none"
-                                    clearable></up-input>
-                                <up-button @click="randomCode" class="c-#fff" type="primary"
-                                    style="height: 50rpx; width: 130rpx">随机生成</up-button>
+                                <up-input v-model="form.harvestCode" placeholder="请输入采收批号" border="none" clearable></up-input>
+                                <up-button @click="randomCode" class="c-#fff" type="primary" style="height: 50rpx; width: 130rpx">随机生成</up-button>
                             </view>
                         </view>
                     </up-form-item>
@@ -137,8 +121,7 @@
                         <div class="flex1 d-flex">
                             <div class="flex1 ov-hd" id="quantitypppp">
                                 <up-form-item prop="quantity" border-bottom class="form-item-top-padding-0">
-                                    <up-input v-model="form.quantity" placeholder="请输入采收量" border="none"
-                                        clearable></up-input>
+                                    <up-input v-model="form.quantity" placeholder="请输入采收量" border="none" clearable></up-input>
                                 </up-form-item>
                             </div>
                             <div class="pd-5" id="unitpppp"></div>
@@ -146,8 +129,7 @@
                                 <ut-action-sheet v-model="form.unit" :tabs="pt_seed_unit" title="选择单位">
                                     <up-form-item prop="unit" border-bottom class="form-item-top-padding-0">
                                         <view class="flex1" style="line-height: 24px">
-                                            <view v-if="form.unit" class="f-s-30 c-333 f-w-5 text-center">{{
-                                                selectDictLabel(pt_seed_unit, form.unit) }}</view>
+                                            <view v-if="form.unit" class="f-s-30 c-333 f-w-5 text-center">{{ selectDictLabel(pt_seed_unit, form.unit) }}</view>
                                             <view v-else class="f-s-30 c-ccc f-w-4 text-center">单位</view>
                                         </view>
                                         <template #right>
@@ -161,16 +143,13 @@
                     <!-- 采收负责人 -->
                     <up-form-item borderBottom label="采收负责人" required prop="mgrName" id="mgr_namepppp">
                         <view class="d-flex a-c j-sb w-100%">
-                            <up-input style="padding-left: 0" v-model="form.mgrName" placeholder="请输入采收负责人"
-                                border="none"></up-input>
+                            <up-input style="padding-left: 0" v-model="form.mgrName" placeholder="请输入采收负责人" border="none"></up-input>
                         </view>
                     </up-form-item>
                     <!-- 采收方式 -->
                     <ut-action-sheet v-model="form.harvestType" :tabs="pt_harvest_type" title="选择采收方式">
                         <up-form-item borderBottom label="采收方式" prop="harvestType" id="harvestTypepppp">
-                            <view v-if="form.harvestType" class="f-s-30 c-333 f-w-5 flex1">{{
-                                selectDictLabel(pt_harvest_type,
-                                form.harvestType) }}</view>
+                            <view v-if="form.harvestType" class="f-s-30 c-333 f-w-5 flex1">{{ selectDictLabel(pt_harvest_type, form.harvestType) }}</view>
                             <view v-else class="f-s-30 c-ccc f-w-4 flex1">请选择采收方式</view>
                             <template #right>
                                 <up-icon size="22rpx" color="#37A954" name="arrow-down-fill"></up-icon>
@@ -178,19 +157,15 @@
                         </up-form-item>
                     </ut-action-sheet>
                     <!-- 采收地块 -->
-                    <up-form-item v-if="+mgMethod !== 2" :borderBottom="false" :label="'采收' + landIdsTitle"
-                        prop="landIds" id="landIdspppp">
-                        <Go_button v-if="!deawerData?.data.length" @click="openDrawer" :title="'请选择采收的' + landIdsTitle"
-                            style="flex: 1" />
+                    <up-form-item v-if="+mgMethod !== 2" :borderBottom="false" :label="'采收' + landIdsTitle" prop="landIds" id="landIdspppp">
+                        <Go_button v-if="!deawerData?.data.length" @click="openDrawer" :title="'请选择采收的' + landIdsTitle" style="flex: 1" />
                         <view class="w-100%" v-else>
                             <Baseinfo :modeValue="deawerData" @close="handleBaseinfoClose" :baseType="baseType" />
                         </view>
                     </up-form-item>
-                    <up-form-item v-else :borderBottom="false" :label="'采收' + landIdsTitle" prop="animalIds"
-                        id="animalIdspppp">
+                    <up-form-item v-else :borderBottom="false" :label="'采收' + landIdsTitle" prop="animalIds" id="animalIdspppp">
                         <view class="flex1">
-                            <Individualinfo v-if="individualLandIds?.checkBox?.length > 0" v-model="individualLandIds"
-                                v-model:landIds="form.animalIds" />
+                            <Individualinfo v-if="individualLandIds?.checkBox?.length > 0" v-model="individualLandIds" v-model:landIds="form.animalIds" />
                             <Go_button @click="goIndividual()" :title="'请选择采收的' + landIdsTitle" style="flex: 1" />
                         </view>
                     </up-form-item>
@@ -200,11 +175,9 @@
                     <up-form-item label="过程视频" prop="videos" borderBottom id="videospppp">
                         <ut-upload v-model="form.videos" :max-count="9" accept="video"></ut-upload>
                     </up-form-item>
-                    <up-form-item v-if="+form.outputType == 1" label="种源加工处理工艺" prop="ptech" borderBottom
-                        id="ptechpppp">
+                    <up-form-item v-if="+form.outputType == 1" label="种源加工处理工艺" prop="ptech" borderBottom id="ptechpppp">
                         <view class="w-100%">
-                            <view v-if="form?.ptech?.length !== 0"
-                                class="pd-24 d-flex flex-cln bg-#FBFDFB border-#37A954 b-radius p-rtv mb-20">
+                            <view v-if="form?.ptech?.length !== 0" class="pd-24 d-flex flex-cln bg-#FBFDFB border-#37A954 b-radius p-rtv mb-20">
                                 <view class="">
                                     <template v-for="(item, index) in form?.ptech?.split(',')" :key="index">
                                         <span v-if="index !== 0" class="c-#999 f-s-32 ml-10 mr-10">→ </span>
@@ -213,8 +186,7 @@
                                 </view>
                                 <view class="d-flex">
                                     <view class="flex1"></view>
-                                    <up-button type="primary" @click="goPtech"
-                                        style="width: 130rpx; height: 60rpx; border-radius: 10rpx">选择工艺</up-button>
+                                    <up-button type="primary" @click="goPtech" style="width: 130rpx; height: 60rpx; border-radius: 10rpx">选择工艺</up-button>
                                 </view>
                             </view>
                             <Go_button v-else @click="goPtech" title="请选择种源加工处理工艺" style="flex: 1" />
@@ -222,9 +194,7 @@
                     </up-form-item>
                     <up-form-item label="存放库房类型" borderBottom>
                         <view class="d-flex a-c j-sb w-100%">
-                            <view v-if="form.outputType" class="f-s-30 c-#999 f-w-5 flex1">{{
-                                selectDictLabel(pt_output_type,
-                                form.outputType) }}</view>
+                            <view v-if="form.outputType" class="f-s-30 c-#999 f-w-5 flex1">{{ selectDictLabel(pt_output_type, form.outputType) }}</view>
                         </view>
                     </up-form-item>
                 </view>
@@ -247,12 +217,9 @@
                 <view class="c-#999 f-s-26 f-w-5 pb-10">已选择工艺步骤</view>
                 <view class="d-flex flex-wrap pd-24 a-c gap-10 border-#37A954 b-radius">
                     <template v-for="(item, index) in form?.ptech?.split(',')" :key="index">
-                        <image v-if="index !== 0"
-                            src="https://ta.zycpzs.cn/oss-file/smart-trace/szyy/images-plt/common/craftArrow.png"
-                            class="mr-10 ml-10" style="width: 44rpx; height: 44rpx"> </image>
+                        <image v-if="index !== 0" src="https://ta.zycpzs.cn/oss-file/smart-trace/szyy/images-plt/common/craftArrow.png" class="mr-10 ml-10" style="width: 44rpx; height: 44rpx"> </image>
                         <view class="p-rtv">
-                            <up-icon color="red" name="close-circle-fill" @click="removePtech(index)"
-                                style="position: absolute; right: -10rpx; top: -10rpx"></up-icon>
+                            <up-icon color="red" name="close-circle-fill" @click="removePtech(index)" style="position: absolute; right: -10rpx; top: -10rpx"></up-icon>
                             <view class="pd-16 bg-#37A9541A c-primary b-radius mb-10"> {{ item }}</view>
                         </view>
                     </template>
@@ -267,8 +234,7 @@
             <template v-else>
                 <scroll-view class="h-400" scroll-y>
                     <view class="d-flex j-sb flex-wrap pd-24 pb-0">
-                        <view v-for="(item, idnex) in ptechData" :key="idnex"
-                            class="bg-#f7f7f7 c-#333 radius-10 pd4-16-24-16-24 mb-16" @click="addPtech(item)">
+                        <view v-for="(item, idnex) in ptechData" :key="idnex" class="bg-#f7f7f7 c-#333 radius-10 pd4-16-24-16-24 mb-16" @click="addPtech(item)">
                             {{ item }}
                         </view>
                     </view>