index.vue 32 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533
  1. <template>
  2. <z-paging ref="paging" v-model="list" bgColor="#f7f7f7" safe-area-inset-bottom>
  3. <template #top>
  4. <ut-navbar title="种养殖任务详情" :fixed="false"></ut-navbar>
  5. </template>
  6. <template>
  7. <!-- <up-alert :title="'备注' + form?.remark" type = "warning" ></up-alert> -->
  8. <view class="startline-title pl-24 ml-24 mb-16 mt-10">基地信息</view>
  9. <view class="bg-#fff pd-24 mb-20">
  10. <view v-if="form?.remark" class="pd4-16-20-16-20 bg-#EBF6EE c-primary f-s-30 f-w-5 b-radius mb-24">备注:{{ form?.remark }}</view>
  11. <Baseinfo v-if="deawerData" :modeValue="deawerData" :baseType="form.taskType" :showClose="false" />
  12. </view>
  13. <view class="startline-title pl-24 ml-24 mb-16">种养殖信息</view>
  14. <view class="bg-#fff pd-24 mb-20 pt-0">
  15. <view class="pt-16 pb-16 info-border-bottom">
  16. <text class="c-#666 f-s-30">任务类型:</text>
  17. <text class="c-#333 f-s-30 f-w-5">{{ selectDictLabel(pt_task_type, form.taskType) }}</text>
  18. </view>
  19. <!-- 种植字段显示(仅当 taskType == 1 时显示) -->
  20. <template v-if="form.taskType == 1">
  21. <view class="pt-16 pb-16 info-border-bottom">
  22. <text class="c-#666 f-s-30">符合要求:</text>
  23. <text class="c-#333 f-s-30 f-w-5">{{ form.gapFlag ? selectDictLabel(pt_task_gap_flag, form.gapFlag) : '--' }}</text>
  24. </view>
  25. <view class="pt-16 pb-16 info-border-bottom">
  26. <view class="c-#666 f-s-30 mb-20">植物名称:</view>
  27. <view class="pd-24 d-flex flex-cln bg-#FBFDFB border-#37A954 b-radius mb-20">
  28. <view class="mb-20">
  29. <text class="c-#333 f-s-34 f-w-5 mr-5">{{ Biological?.varietyName }}</text>
  30. <text class="c-#666 f-s-24">{{ Biological?.latinName }}</text>
  31. </view>
  32. <view class="mb-20">
  33. <text class="c-#333 f-s-28 f-w-5 mr-5">{{ Biological?.genusName }}</text>
  34. <text class="c-#666 f-s-24">{{ Biological?.genusLatinName }}</text>
  35. </view>
  36. <view class="">
  37. <text class="c-#666 f-s-24">产出:</text>
  38. <text class="c-#666 f-s-24">{{ Biological?.medicineName }}</text>
  39. </view>
  40. </view>
  41. </view>
  42. <view class="pt-16 pb-16 info-border-bottom">
  43. <text class="c-#666 f-s-30">种植批号:</text>
  44. <text class="c-#333 f-s-30 f-w-5">{{ form.plantationCode || '--' }}</text>
  45. </view>
  46. <view class="pt-16 pb-16 info-border-bottom">
  47. <view class="c-#666 f-s-30 mb-20">种植技术规程:</view>
  48. <ut-album v-if="form.technicalFile?.length > 0" :urls="form.technicalFile"></ut-album>
  49. <text v-else class="c-#333 f-s-30 f-w-5">{{ '--' }}</text>
  50. </view>
  51. <view class="pt-16 pb-16 info-border-bottom">
  52. <text class="c-#666 f-s-30">种植方式:</text>
  53. <text class="c-#333 f-s-30 f-w-5">{{ form.plantationMethod ? selectDictLabel(pt_feeding_method, form.plantationMethod) : '--' }}</text>
  54. </view>
  55. <view class="pt-16 pb-16 info-border-bottom">
  56. <text class="c-#666 f-s-30">种植日期:</text>
  57. <text class="c-#333 f-s-30 f-w-5">{{ `${form.plannedStartDate} 至 ${form.plannedEndDate}` }}</text>
  58. </view>
  59. <view class="pt-16 pb-16 info-border-bottom">
  60. <text class="c-#666 f-s-30">种植面积:</text>
  61. <text class="c-#333 f-s-30 f-w-5">{{ form.plantingAmount ? `${form.plantingAmount}${form.plantingUnit || ''}` : '--' }}</text>
  62. </view>
  63. <view class="pt-16 pb-16 info-border-bottom">
  64. <text class="c-#666 f-s-30">繁殖方式:</text>
  65. <text class="c-#333 f-s-30 f-w-5">{{ form.reproductionType ? selectDictLabel(pt_reproduction_type, form.reproductionType) : '--' }}</text>
  66. </view>
  67. <view class="pt-16 pb-16 info-border-bottom">
  68. <text class="c-#666 f-s-30">种植类型:</text>
  69. <text class="c-#333 f-s-30 f-w-5">{{ form.plantationType ? selectDictLabel(pt_plantation_type, form.plantationType) : '--' }}</text>
  70. </view>
  71. <view class="pt-16 pb-16 info-border-bottom">
  72. <text class="c-#666 f-s-30">播种方式:</text>
  73. <text class="c-#333 f-s-30 f-w-5">{{ form.sowingMethod ? selectDictLabel(pt_sowing_method, form.sowingMethod) : '--' }}</text>
  74. </view>
  75. <view class="pt-16 pb-16 info-border-bottom">
  76. <text class="c-#666 f-s-30">移栽方法:</text>
  77. <text class="c-#333 f-s-30 f-w-5">{{ form.transplantMethod ? selectDictLabel(pt_transplant_method, form.transplantMethod) : '--' }}</text>
  78. </view>
  79. <view class="pt-16 pb-16 info-border-bottom">
  80. <view class="c-#666 f-s-30 mb-20">前茬植物:</view>
  81. <view v-if="PreBiological" class="pd-24 d-flex flex-cln bg-#FBFDFB border-#37A954 b-radius mb-20">
  82. <view class="mb-20">
  83. <text class="c-#333 f-s-34 f-w-5 mr-5">{{ PreBiological?.varietyName }}</text>
  84. <text class="c-#666 f-s-24">{{ PreBiological?.latinName }}</text>
  85. </view>
  86. <view class="mb-20">
  87. <text class="c-#333 f-s-28 f-w-5 mr-5">{{ PreBiological?.genusName }}</text>
  88. <text class="c-#666 f-s-24">{{ PreBiological?.genusLatinName }}</text>
  89. </view>
  90. <view class="">
  91. <text class="c-#666 f-s-24">产出:</text>
  92. <text class="c-#666 f-s-24">{{ PreBiological?.medicineName }}</text>
  93. </view>
  94. </view>
  95. <view v-else class="">--</view>
  96. </view>
  97. <view class="pt-16 pb-16 info-border-bottom">
  98. <text class="c-#666 f-s-30">备注:</text>
  99. <text class="c-#333 f-s-30 f-w-5">{{ form.remark || '--' }}</text>
  100. </view>
  101. </template>
  102. <!-- 养殖字段显示(仅当 taskType == 2 时显示) -->
  103. <template v-if="form.taskType == 2">
  104. <view class="pt-16 pb-16 info-border-bottom">
  105. <text class="c-#666 f-s-30">溯源级别:</text>
  106. <text class="c-#333 f-s-30 f-w-5">{{ form.mgMethod ? selectDictLabel(pt_mg_method, form.mgMethod) : '--' }}</text>
  107. </view>
  108. <view class="pt-16 pb-16 info-border-bottom">
  109. <text class="c-#666 f-s-30">符合要求:</text>
  110. <text class="c-#333 f-s-30 f-w-5">{{ form.gapFlag ? selectDictLabel(pt_task_gap_flag, form.gapFlag) : '--' }}</text>
  111. </view>
  112. <view class="pt-16 pb-16 info-border-bottom">
  113. <view class="c-#666 f-s-30 mb-20">动物名称:</view>
  114. <view class="pd-24 d-flex flex-cln bg-#FBFDFB border-#37A954 b-radius mb-20">
  115. <view class="mb-20">
  116. <text class="c-#333 f-s-34 f-w-5 mr-5">{{ Biological?.varietyName }}</text>
  117. <text class="c-#666 f-s-24">{{ Biological?.latinName }}</text>
  118. </view>
  119. <view class="mb-20">
  120. <text class="c-#333 f-s-28 f-w-5 mr-5">{{ Biological?.genusName }}</text>
  121. <text class="c-#666 f-s-24">{{ Biological?.genusLatinName }}</text>
  122. </view>
  123. <view class="">
  124. <text class="c-#666 f-s-24">产出:</text>
  125. <text class="c-#666 f-s-24">{{ Biological?.medicineName }}</text>
  126. </view>
  127. </view>
  128. </view>
  129. <view class="pt-16 pb-16 info-border-bottom">
  130. <text class="c-#666 f-s-30">养殖批号:</text>
  131. <text class="c-#333 f-s-30 f-w-5">{{ form.plantationCode || '--' }}</text>
  132. </view>
  133. <view class="pt-16 pb-16 info-border-bottom">
  134. <view class="c-#666 f-s-30 mb-20">养殖技术规程:</view>
  135. <ut-album v-if="form.technicalFile?.length > 0" :urls="form.technicalFile"></ut-album>
  136. <text v-else class="c-#333 f-s-30 f-w-5">{{ '--' }}</text>
  137. </view>
  138. <view class="pt-16 pb-16 info-border-bottom">
  139. <text class="c-#666 f-s-30">养殖方式:</text>
  140. <text class="c-#333 f-s-30 f-w-5">{{ form.plantationMethod ? selectDictLabel(pt_feeding_method, form.plantationMethod) : '--' }}</text>
  141. </view>
  142. <view class="pt-16 pb-16 info-border-bottom">
  143. <text class="c-#666 f-s-30">养殖日期:</text>
  144. <text class="c-#333 f-s-30 f-w-5">{{ `${form.plannedStartDate} 至 ${form.plannedEndDate}` }}</text>
  145. </view>
  146. <view class="pt-16 pb-16 info-border-bottom">
  147. <text class="c-#666 f-s-30">养殖面积:</text>
  148. <text class="c-#333 f-s-30 f-w-5">{{ form.plantingAmount ? `${form.plantingAmount}${form.plantingUnit || ''}` : '--' }}</text>
  149. </view>
  150. <view class="pt-16 pb-16 info-border-bottom">
  151. <text class="c-#666 f-s-30">养殖区域:</text>
  152. <text class="c-#333 f-s-30 f-w-5">{{ form.breedScale ? `${form.breedScale}个` : '--' }}</text>
  153. </view>
  154. <view class="pt-16 pb-16 info-border-bottom">
  155. <text class="c-#666 f-s-30">养殖量:</text>
  156. <text class="c-#333 f-s-30 f-w-5">{{ form?.plantingMgAmount ? `${form.plantingMgAmount}${form?.plantingMgUnit ? selectDictLabel(pt_planting_mg_unit, form.plantingMgUnit) : ''}` : '--' }}</text>
  157. </view>
  158. <view class="pt-16 pb-16 info-border-bottom">
  159. <text class="c-#666 f-s-30">备注:</text>
  160. <text class="c-#333 f-s-30 f-w-5">{{ form.remark || '--' }}</text>
  161. </view>
  162. </template>
  163. <!-- 种畜繁育字段显示(仅当 taskType == 21 时显示) -->
  164. <template v-if="form.taskType == 21">
  165. <view class="pt-16 pb-16 info-border-bottom">
  166. <text class="c-#666 f-s-30">是否代繁育:</text>
  167. <text class="c-#333 f-s-30 f-w-5">{{ form.delegateFlag ? selectDictLabel(yes_no, form.delegateFlag) : '--' }}</text>
  168. </view>
  169. <view v-if="+form.delegateFlag" class="pt-16 pb-16 info-border-bottom">
  170. <view class="c-#666 f-s-30 mb-20">委托企业:</view>
  171. <view class="pd-24 d-flex flex-cln bg-#FBFDFB border-#37A954 b-radius mb-20">
  172. <view class="">
  173. <text class="c-#333 f-s-34 f-w-5 mr-5">{{ form?.delegateInfo?.cusName }}</text>
  174. </view>
  175. <view class="">
  176. <text class="c-#666 f-s-24">{{ form?.delegateInfo?.cusCode }}</text>
  177. </view>
  178. </view>
  179. </view>
  180. <view class="pt-16 pb-16 info-border-bottom">
  181. <text class="c-#666 f-s-30">溯源级别:</text>
  182. <text class="c-#333 f-s-30 f-w-5">{{ form.mgMethod ? selectDictLabel(pt_mg_method, form.mgMethod) : '--' }}</text>
  183. </view>
  184. <view class="pt-16 pb-16 info-border-bottom">
  185. <view class="c-#666 f-s-30 mb-20">动物名称:</view>
  186. <view class="pd-24 d-flex flex-cln bg-#FBFDFB border-#37A954 b-radius mb-20">
  187. <view class="mb-20">
  188. <text class="c-#333 f-s-34 f-w-5 mr-5">{{ Biological?.varietyName }}</text>
  189. <text class="c-#666 f-s-24">{{ Biological?.latinName }}</text>
  190. </view>
  191. <view class="mb-20">
  192. <text class="c-#333 f-s-28 f-w-5 mr-5">{{ Biological?.genusName }}</text>
  193. <text class="c-#666 f-s-24">{{ Biological?.genusLatinName }}</text>
  194. </view>
  195. <view class="">
  196. <text class="c-#666 f-s-24">产出:</text>
  197. <text class="c-#666 f-s-24">{{ Biological?.medicineName }}</text>
  198. </view>
  199. </view>
  200. </view>
  201. <view class="pt-16 pb-16 info-border-bottom">
  202. <text class="c-#666 f-s-30">养殖批号:</text>
  203. <text class="c-#333 f-s-30 f-w-5">{{ form.plantationCode || '--' }}</text>
  204. </view>
  205. <view class="pt-16 pb-16 info-border-bottom">
  206. <view class="c-#666 f-s-30 mb-20">养殖繁育技术规程:</view>
  207. <ut-album v-if="form.technicalFile?.length > 0" :urls="form.technicalFile"></ut-album>
  208. <text v-else class="c-#333 f-s-30 f-w-5">{{ '--' }}</text>
  209. </view>
  210. <view class="pt-16 pb-16 info-border-bottom">
  211. <text class="c-#666 f-s-30">养殖方式:</text>
  212. <text class="c-#333 f-s-30 f-w-5">{{ form.plantationMethod ? selectDictLabel(pt_feeding_method, form.plantationMethod) : '--' }}</text>
  213. </view>
  214. <view class="pt-16 pb-16 info-border-bottom">
  215. <text class="c-#666 f-s-30">养殖日期:</text>
  216. <text class="c-#333 f-s-30 f-w-5">{{ `${form.plannedStartDate} 至 ${form.plannedEndDate}` }}</text>
  217. </view>
  218. <view class="pt-16 pb-16 info-border-bottom">
  219. <text class="c-#666 f-s-30">养殖面积:</text>
  220. <text class="c-#333 f-s-30 f-w-5">{{ form.plantingAmount ? `${form.plantingAmount}${form.plantingUnit || ''}` : '--' }}</text>
  221. </view>
  222. <view class="pt-16 pb-16 info-border-bottom">
  223. <text class="c-#666 f-s-30">养殖区域:</text>
  224. <text class="c-#333 f-s-30 f-w-5">{{ form.breedScale ? `${form.breedScale}个` : '--' }}</text>
  225. </view>
  226. <view class="pt-16 pb-16 info-border-bottom">
  227. <text class="c-#666 f-s-30">养殖量:</text>
  228. <text class="c-#333 f-s-30 f-w-5">{{ form?.plantingMgAmount ? `${form.plantingMgAmount}${form?.plantingMgUnit ? selectDictLabel(pt_planting_mg_unit, form.plantingMgUnit) : ''}` : '--' }}</text>
  229. </view>
  230. <view class="pt-16 pb-16 info-border-bottom">
  231. <text class="c-#666 f-s-30">备注:</text>
  232. <text class="c-#333 f-s-30 f-w-5">{{ form.remark || '--' }}</text>
  233. </view>
  234. </template>
  235. <!-- 种苗繁育字段显示(仅当 taskType == 11 时显示) -->
  236. <template v-if="form.taskType == 11">
  237. <view class="pt-16 pb-16 info-border-bottom">
  238. <text class="c-#666 f-s-30">是否代繁育:</text>
  239. <text class="c-#333 f-s-30 f-w-5">{{ form.delegateFlag ? selectDictLabel(yes_no, form.delegateFlag) : '--' }}</text>
  240. </view>
  241. <view v-if="+form?.delegateFlag" class="pt-16 pb-16 info-border-bottom">
  242. <view class="c-#666 f-s-30 mb-20">委托企业:</view>
  243. <view class="pd-24 d-flex flex-cln bg-#FBFDFB border-#37A954 b-radius mb-20">
  244. <view class="">
  245. <text class="c-#333 f-s-34 f-w-5 mr-5">{{ form?.delegateInfo?.cusName }}</text>
  246. </view>
  247. <view class="">
  248. <text class="c-#666 f-s-24">{{ form?.delegateInfo?.cusCode }}</text>
  249. </view>
  250. </view>
  251. </view>
  252. <view class="pt-16 pb-16 info-border-bottom" v-if="form?.baseRef?.baseInfo?.landList.length">
  253. <view class="c-#666 f-s-30 mb-20">具体位置:</view>
  254. <view class="p-rtv pd-24 b-radius mb-10" v-for="(it, indexs) in form?.baseRef?.baseInfo?.landList" :key="indexs" style="border: 1px solid #afddbb">
  255. <view class="c-#333 f-s-34 f-w-5">{{ it?.landName }}</view>
  256. <view class="c-#666 f-s-24">{{ stringifyCheckedList(it?.checkedList, Number(it?.capacityAmount || 0)) }}</view>
  257. </view>
  258. </view>
  259. <view class="pt-16 pb-16 info-border-bottom">
  260. <text class="c-#666 f-s-30">溯源级别:</text>
  261. <text class="c-#333 f-s-30 f-w-5">{{ form.mgMethod ? selectDictLabel(pt_mg_method, form.mgMethod) : '--' }}</text>
  262. </view>
  263. <view class="pt-16 pb-16 info-border-bottom">
  264. <view class="c-#666 f-s-30 mb-20">植物名称:</view>
  265. <view class="pd-24 d-flex flex-cln bg-#FBFDFB border-#37A954 b-radius mb-20">
  266. <view class="mb-20">
  267. <text class="c-#333 f-s-34 f-w-5 mr-5">{{ Biological?.varietyName }}</text>
  268. <text class="c-#666 f-s-24">{{ Biological?.latinName }}</text>
  269. </view>
  270. <view class="mb-20">
  271. <text class="c-#333 f-s-28 f-w-5 mr-5">{{ Biological?.genusName }}</text>
  272. <text class="c-#666 f-s-24">{{ Biological?.genusLatinName }}</text>
  273. </view>
  274. <view class="">
  275. <text class="c-#666 f-s-24">产出:</text>
  276. <text class="c-#666 f-s-24">{{ Biological?.medicineName }}</text>
  277. </view>
  278. </view>
  279. </view>
  280. <view class="pt-16 pb-16 info-border-bottom">
  281. <text class="c-#666 f-s-30">繁育批号:</text>
  282. <text class="c-#333 f-s-30 f-w-5">{{ form.plantationCode || '--' }}</text>
  283. </view>
  284. <view class="pt-16 pb-16 info-border-bottom">
  285. <view class="c-#666 f-s-30 mb-20">繁育技术规程:</view>
  286. <ut-album v-if="form.technicalFile?.length > 0" :urls="form.technicalFile"></ut-album>
  287. <text v-else class="c-#333 f-s-30 f-w-5">{{ '--' }}</text>
  288. </view>
  289. <view class="pt-16 pb-16 info-border-bottom">
  290. <text class="c-#666 f-s-30">繁育方式:</text>
  291. <text class="c-#333 f-s-30 f-w-5">{{ form.plantationMethod ? selectDictLabel(pt_feeding_method, form.plantationMethod) : '--' }}</text>
  292. </view>
  293. <view class="pt-16 pb-16 info-border-bottom">
  294. <text class="c-#666 f-s-30">繁育日期:</text>
  295. <text class="c-#333 f-s-30 f-w-5">{{ `${form.plannedStartDate} 至 ${form.plannedEndDate}` }}</text>
  296. </view>
  297. <view v-if="+deawerData?.data?.[0]?.landType == 1" class="pt-16 pb-16 info-border-bottom">
  298. <text class="c-#666 f-s-30">种植面积:</text>
  299. <text class="c-#333 f-s-30 f-w-5">{{ form.plantingAmount ? `${form.plantingAmount}${form.plantingUnit || ''}` : '--' }}</text>
  300. </view>
  301. <view class="pt-16 pb-16 info-border-bottom">
  302. <text class="c-#666 f-s-30">接种数量:</text>
  303. <text class="c-#333 f-s-30 f-w-5">{{ form.inoculationAmount ? `${form.inoculationAmount}${form?.inoculationUnit}` : '--' }}</text>
  304. </view>
  305. <view class="pt-16 pb-16 info-border-bottom">
  306. <text class="c-#666 f-s-30">繁育量:</text>
  307. <text class="c-#333 f-s-30 f-w-5">{{ form?.plantingMgAmount ? `${form.plantingMgAmount}${form?.plantingMgUnit ? selectDictLabel(pt_inoculation_dosage_unit, form?.plantingMgUnit) : ''}` : '--' }}</text>
  308. </view>
  309. <view class="pt-16 pb-16 info-border-bottom">
  310. <text class="c-#666 f-s-30">繁殖方式:</text>
  311. <text class="c-#333 f-s-30 f-w-5">{{ form.reproductionType ? selectDictLabel(pt_reproduction_type, form.reproductionType) : '--' }}</text>
  312. </view>
  313. <view class="pt-16 pb-16 info-border-bottom">
  314. <text class="c-#666 f-s-30">种植类型:</text>
  315. <text class="c-#333 f-s-30 f-w-5">{{ form.plantationType ? selectDictLabel(pt_plantation_type, form.plantationType) : '--' }}</text>
  316. </view>
  317. <view class="pt-16 pb-16 info-border-bottom">
  318. <text class="c-#666 f-s-30">播种方式:</text>
  319. <text class="c-#333 f-s-30 f-w-5">{{ form.sowingMethod ? selectDictLabel(pt_sowing_method, form.sowingMethod) : '--' }}</text>
  320. </view>
  321. <view class="pt-16 pb-16 info-border-bottom">
  322. <text class="c-#666 f-s-30">移栽方法:</text>
  323. <text class="c-#333 f-s-30 f-w-5">{{ form.transplantMethod ? selectDictLabel(pt_transplant_method, form.transplantMethod) : '--' }}</text>
  324. </view>
  325. <view class="pt-16 pb-16 info-border-bottom">
  326. <view class="c-#666 f-s-30 mb-20">前茬植物:</view>
  327. <view v-if="PreBiological" class="pd-24 d-flex flex-cln bg-#FBFDFB border-#37A954 b-radius mb-20">
  328. <view class="mb-20">
  329. <text class="c-#333 f-s-34 f-w-5 mr-5">{{ PreBiological?.varietyName }}</text>
  330. <text class="c-#666 f-s-24">{{ PreBiological?.latinName }}</text>
  331. </view>
  332. <view class="mb-20">
  333. <text class="c-#333 f-s-28 f-w-5 mr-5">{{ PreBiological?.genusName }}</text>
  334. <text class="c-#666 f-s-24">{{ PreBiological?.genusLatinName }}</text>
  335. </view>
  336. <view class="">
  337. <text class="c-#666 f-s-24">产出:</text>
  338. <text class="c-#666 f-s-24">{{ PreBiological?.medicineName }}</text>
  339. </view>
  340. </view>
  341. <view v-else class="">--</view>
  342. </view>
  343. <view class="pt-16 pb-16 info-border-bottom">
  344. <text class="c-#666 f-s-30">备注:</text>
  345. <text class="c-#333 f-s-30 f-w-5">{{ form.remark || '--' }}</text>
  346. </view>
  347. </template>
  348. </view>
  349. <template v-if="animalIds?.length > 0">
  350. <view class="startline-title pl-24 ml-24 mb-16">个体标识信息</view>
  351. <view class="bg-#fff pd-24 mb-20">
  352. <template v-for="(item, index) in animalIds" :key="index">
  353. <view class="pd-34 border-#37A954 mb-20 d-flex flex-cln b-radius">
  354. <text>{{ item }}</text>
  355. </view>
  356. </template>
  357. </view>
  358. </template>
  359. <view class="pd-24">
  360. <view class="d-flex j-c pd-10">
  361. <view class="mr-10 c-#ccc f-s-24">
  362. <text>最新操作人:</text>
  363. <text>{{ form?.updateByName || form?.createByName }}</text>
  364. </view>
  365. <view class="c-#ccc f-s-24">
  366. <text>最新操作时间:</text>
  367. <text>{{ form?.updateTime || form?.createTime }}</text>
  368. </view>
  369. </view>
  370. <view class="">
  371. <up-button type="primary" class="b-radius" @click="handlechoseConfirm">修改</up-button>
  372. </view>
  373. </view>
  374. </template>
  375. </z-paging>
  376. </template>
  377. <script setup lang="ts">
  378. import Baseinfo from '../port-create/models/baseinfo.vue';
  379. import { useClientRequest } from '@/utils/request';
  380. const { proxy } = getCurrentInstance() as ComponentInternalInstance;
  381. 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>(
  382. 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'),
  383. );
  384. const paging = ref();
  385. const list = ref();
  386. const form = ref<any>({
  387. deawerData: null,
  388. baseId: null,
  389. landIds: [],
  390. taskType: null,
  391. gapFlag: null,
  392. mgMethod: null,
  393. varietyId: null,
  394. plantationCode: null,
  395. plantationMethod: null,
  396. reproductionType: null,
  397. technicalFile: [],
  398. plantingUnit: null,
  399. breedScale: null,
  400. queryType6: {
  401. plannedStartDate: null,
  402. plannedEndDate: null,
  403. },
  404. plant: {
  405. plantingMgAmount: null,
  406. plantingMgUnit: null,
  407. },
  408. plantingAmount: '',
  409. remark: null,
  410. delegateFlag: '0',
  411. delegateInfo: {},
  412. plantationType: null,
  413. sowingMethod: null,
  414. transplantMethod: null,
  415. preCropId: null,
  416. inoculation: {
  417. inoculationAmount: null,
  418. inoculationUnit: null,
  419. inoculationDosage: null,
  420. inoculationDosageUnit: null,
  421. },
  422. cultureMediumFormula: null,
  423. });
  424. const deawerData = ref<any>(null);
  425. const animalIds = ref();
  426. // 所选动植物
  427. const Biological = ref<any>(null);
  428. const PreBiological = ref<any>(null);
  429. const taskId = ref();
  430. const getInfo = async () => {
  431. const res = await useClientRequest.get<any>(`/plt-api/app/plantationTask/getInfo/${taskId.value}`);
  432. if (!res.data) return;
  433. form.value = res.data;
  434. if (res.data.animalIds) {
  435. animalIds.value = res.data.animalIds;
  436. }
  437. if (res.data.preCropCode) {
  438. PreBiological.value = {};
  439. const Bio = await useClientRequest.get(`/plt-api/app/medicine/getMedicineByCode/${res.data.preCropCode}`);
  440. PreBiological.value = Bio.data;
  441. }
  442. if (res.data.varietyCode) {
  443. Biological.value = {};
  444. const Bio = await useClientRequest.get(`/plt-api/app/medicine/getMedicineByCode/${res.data.varietyCode}`);
  445. Biological.value = Bio.data;
  446. }
  447. // 判断有没有基地,然后去获取基地数据
  448. if (res.data.baseId) {
  449. deawerData.value = {};
  450. deawerData.value.baseName = res.data.baseRef.baseName;
  451. deawerData.value.areaUnit = res.data.baseRef.baseInfo.areaUnit;
  452. deawerData.value.area = res.data.baseRef.baseInfo.area;
  453. deawerData.value.address = res.data.baseRef.baseInfo.address;
  454. // adcodeName
  455. deawerData.value.adcodeName = res.data.baseRef.baseInfo.adcodeName;
  456. if (+res.data.landFlag) {
  457. deawerData.value.aloneChecked = true;
  458. const landIds = await useClientRequest.get('/plt-api/app/baseLandInfo/pageList', { baseId: res.data.baseId });
  459. deawerData.value.data = landIds.rows;
  460. } else {
  461. deawerData.value.aloneChecked = false;
  462. deawerData.value.data = [];
  463. const landIds = await useClientRequest.get('/plt-api/app/baseLandInfo/pageList', { baseId: res.data.baseId });
  464. //找到res.data.landIds和landIds.rows中的id相同的项
  465. landIds.rows.forEach((i: any) => {
  466. if (res.data.landIds.find((t: any) => t == i.id)) {
  467. deawerData.value.data.push(i);
  468. }
  469. });
  470. }
  471. }
  472. };
  473. const handlechoseConfirm = () => {
  474. uni.$u.route({ type: 'navigateTo', url: '/plant/port/port-create/index', params: { taskId: taskId.value } });
  475. };
  476. const stringifyCheckedList = (list: CheckedPosition[], perLayerCount: number) => {
  477. if (!Array.isArray(list) || !list.length) {
  478. return '';
  479. }
  480. const capacity = Number(perLayerCount || 0);
  481. if (!capacity) {
  482. return '';
  483. }
  484. const serialMap = new Map<number, CheckedPosition>();
  485. list.forEach((item) => {
  486. const serial = (item.x - 1) * capacity + item.y;
  487. if (serial > 0 && !serialMap.has(serial)) {
  488. serialMap.set(serial, item);
  489. }
  490. });
  491. const serials = Array.from(serialMap.keys()).sort((a, b) => a - b);
  492. if (!serials.length) {
  493. return '';
  494. }
  495. const segments: string[] = [];
  496. let startSerial = serials[0];
  497. let endSerial = serials[0];
  498. const pushSegment = (start: number, end: number) => {
  499. const startItem = serialMap.get(start)!;
  500. const endItem = serialMap.get(end)!;
  501. if (start === end) {
  502. segments.push(`${startItem.x}-${startItem.y}`);
  503. } else {
  504. segments.push(`${startItem.x}-${startItem.y}至${endItem.x}-${endItem.y}`);
  505. }
  506. };
  507. for (let index = 1; index < serials.length; index++) {
  508. const current = serials[index];
  509. if (current === endSerial + 1) {
  510. endSerial = current;
  511. } else {
  512. pushSegment(startSerial, endSerial);
  513. startSerial = current;
  514. endSerial = current;
  515. }
  516. }
  517. pushSegment(startSerial, endSerial);
  518. return `${segments.join(',')}共${serials.length}个位置`;
  519. };
  520. onMounted(() => {
  521. getInfo();
  522. });
  523. onLoad((options: any) => {
  524. taskId.value = options?.id;
  525. });
  526. </script>