index.vue 29 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475
  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">基地信息</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 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">
  253. <text class="c-#666 f-s-30">溯源级别:</text>
  254. <text class="c-#333 f-s-30 f-w-5">{{ form.mgMethod ? selectDictLabel(pt_mg_method, form.mgMethod) : '--' }}</text>
  255. </view>
  256. <view class="pt-16 pb-16 info-border-bottom">
  257. <view class="c-#666 f-s-30 mb-20">植物名称:</view>
  258. <view class="pd-24 d-flex flex-cln bg-#FBFDFB border-#37A954 b-radius mb-20">
  259. <view class="mb-20">
  260. <text class="c-#333 f-s-34 f-w-5 mr-5">{{ Biological?.varietyName }}</text>
  261. <text class="c-#666 f-s-24">{{ Biological?.latinName }}</text>
  262. </view>
  263. <view class="mb-20">
  264. <text class="c-#333 f-s-28 f-w-5 mr-5">{{ Biological?.genusName }}</text>
  265. <text class="c-#666 f-s-24">{{ Biological?.genusLatinName }}</text>
  266. </view>
  267. <view class="">
  268. <text class="c-#666 f-s-24">产出:</text>
  269. <text class="c-#666 f-s-24">{{ Biological?.medicineName }}</text>
  270. </view>
  271. </view>
  272. </view>
  273. <view class="pt-16 pb-16 info-border-bottom">
  274. <text class="c-#666 f-s-30">繁育批号:</text>
  275. <text class="c-#333 f-s-30 f-w-5">{{ form.plantationCode || '--' }}</text>
  276. </view>
  277. <view class="pt-16 pb-16 info-border-bottom">
  278. <view class="c-#666 f-s-30 mb-20">繁育技术规程:</view>
  279. <ut-album v-if="form.technicalFile?.length > 0" :urls="form.technicalFile"></ut-album>
  280. <text v-else class="c-#333 f-s-30 f-w-5">{{ '--' }}</text>
  281. </view>
  282. <view class="pt-16 pb-16 info-border-bottom">
  283. <text class="c-#666 f-s-30">繁育方式:</text>
  284. <text class="c-#333 f-s-30 f-w-5">{{ form.plantationMethod ? selectDictLabel(pt_feeding_method, form.plantationMethod) : '--' }}</text>
  285. </view>
  286. <view class="pt-16 pb-16 info-border-bottom">
  287. <text class="c-#666 f-s-30">繁育日期:</text>
  288. <text class="c-#333 f-s-30 f-w-5">{{ `${form.plannedStartDate} 至 ${form.plannedEndDate}` }}</text>
  289. </view>
  290. <view v-if="+deawerData?.data[0]?.landType == 1" class="pt-16 pb-16 info-border-bottom">
  291. <text class="c-#666 f-s-30">种植面积:</text>
  292. <text class="c-#333 f-s-30 f-w-5">{{ form.plantingAmount ? `${form.plantingAmount}${form.plantingUnit || ''}` : '--' }}</text>
  293. </view>
  294. <view class="pt-16 pb-16 info-border-bottom">
  295. <text class="c-#666 f-s-30">接种数量:</text>
  296. <text class="c-#333 f-s-30 f-w-5">{{ form.inoculationAmount ? `${form.inoculationAmount}${form?.inoculationUnit}` : '--' }}</text>
  297. </view>
  298. <view class="pt-16 pb-16 info-border-bottom">
  299. <text class="c-#666 f-s-30">繁育量:</text>
  300. <text class="c-#333 f-s-30 f-w-5">{{ form?.plantingMgAmount ? `${form.plantingMgAmount}${form?.plantingMgUnit ? selectDictLabel(pt_inoculation_dosage_unit, form?.plantingMgUnit) : ''}` : '--' }}</text>
  301. </view>
  302. <view class="pt-16 pb-16 info-border-bottom">
  303. <text class="c-#666 f-s-30">繁殖方式:</text>
  304. <text class="c-#333 f-s-30 f-w-5">{{ form.reproductionType ? selectDictLabel(pt_reproduction_type, form.reproductionType) : '--' }}</text>
  305. </view>
  306. <view class="pt-16 pb-16 info-border-bottom">
  307. <text class="c-#666 f-s-30">种植类型:</text>
  308. <text class="c-#333 f-s-30 f-w-5">{{ form.plantationType ? selectDictLabel(pt_plantation_type, form.plantationType) : '--' }}</text>
  309. </view>
  310. <view class="pt-16 pb-16 info-border-bottom">
  311. <text class="c-#666 f-s-30">播种方式:</text>
  312. <text class="c-#333 f-s-30 f-w-5">{{ form.sowingMethod ? selectDictLabel(pt_sowing_method, form.sowingMethod) : '--' }}</text>
  313. </view>
  314. <view class="pt-16 pb-16 info-border-bottom">
  315. <text class="c-#666 f-s-30">移栽方法:</text>
  316. <text class="c-#333 f-s-30 f-w-5">{{ form.transplantMethod ? selectDictLabel(pt_transplant_method, form.transplantMethod) : '--' }}</text>
  317. </view>
  318. <view class="pt-16 pb-16 info-border-bottom">
  319. <view class="c-#666 f-s-30 mb-20">前茬植物:</view>
  320. <view v-if="PreBiological" class="pd-24 d-flex flex-cln bg-#FBFDFB border-#37A954 b-radius mb-20">
  321. <view class="mb-20">
  322. <text class="c-#333 f-s-34 f-w-5 mr-5">{{ PreBiological?.varietyName }}</text>
  323. <text class="c-#666 f-s-24">{{ PreBiological?.latinName }}</text>
  324. </view>
  325. <view class="mb-20">
  326. <text class="c-#333 f-s-28 f-w-5 mr-5">{{ PreBiological?.genusName }}</text>
  327. <text class="c-#666 f-s-24">{{ PreBiological?.genusLatinName }}</text>
  328. </view>
  329. <view class="">
  330. <text class="c-#666 f-s-24">产出:</text>
  331. <text class="c-#666 f-s-24">{{ PreBiological?.medicineName }}</text>
  332. </view>
  333. </view>
  334. <view v-else class="">--</view>
  335. </view>
  336. <view class="pt-16 pb-16 info-border-bottom">
  337. <text class="c-#666 f-s-30">备注:</text>
  338. <text class="c-#333 f-s-30 f-w-5">{{ form.remark || '--' }}</text>
  339. </view>
  340. </template>
  341. </view>
  342. <template v-if="animalIds?.length > 0">
  343. <view class="startline-title pl-24 ml-24 mb-16">个体标识信息</view>
  344. <view class="bg-#fff pd-24 mb-20">
  345. <template v-for="(item, index) in animalIds" :key="index">
  346. <view class="pd-34 border-#37A954 mb-20 d-flex flex-cln b-radius">
  347. <text>{{ item }}</text>
  348. </view>
  349. </template>
  350. </view>
  351. </template>
  352. <view class="pd-24">
  353. <view class="d-flex j-c pd-10">
  354. <view class="mr-10 c-#ccc f-s-24">
  355. <text>最新操作人:</text>
  356. <text>{{ form?.updateByName || form?.createByName }}</text>
  357. </view>
  358. <view class="c-#ccc f-s-24">
  359. <text>最新操作时间:</text>
  360. <text>{{ form?.updateTime || form?.createTime }}</text>
  361. </view>
  362. </view>
  363. <view class="">
  364. <up-button type="primary" class="b-radius" @click="handlechoseConfirm">修改</up-button>
  365. </view>
  366. </view>
  367. </template>
  368. </z-paging>
  369. </template>
  370. <script setup lang="ts">
  371. import Baseinfo from '../port-create/models/baseinfo.vue';
  372. import { useClientRequest } from '@/utils/request';
  373. const { proxy } = getCurrentInstance() as ComponentInternalInstance;
  374. 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>(
  375. 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'),
  376. );
  377. const paging = ref();
  378. const list = ref();
  379. const form = ref<any>({
  380. deawerData: null,
  381. baseId: null,
  382. landIds: [],
  383. taskType: null,
  384. gapFlag: null,
  385. mgMethod: null,
  386. varietyId: null,
  387. plantationCode: null,
  388. plantationMethod: null,
  389. reproductionType: null,
  390. technicalFile: [],
  391. plantingUnit: null,
  392. breedScale: null,
  393. queryType6: {
  394. plannedStartDate: null,
  395. plannedEndDate: null,
  396. },
  397. plant: {
  398. plantingMgAmount: null,
  399. plantingMgUnit: null,
  400. },
  401. plantingAmount: '',
  402. remark: null,
  403. delegateFlag: '0',
  404. delegateInfo: {},
  405. plantationType: null,
  406. sowingMethod: null,
  407. transplantMethod: null,
  408. preCropId: null,
  409. inoculation: {
  410. inoculationAmount: null,
  411. inoculationUnit: null,
  412. inoculationDosage: null,
  413. inoculationDosageUnit: null,
  414. },
  415. cultureMediumFormula: null,
  416. });
  417. const deawerData = ref<any>(null);
  418. const animalIds = ref();
  419. // 所选动植物
  420. const Biological = ref<any>(null);
  421. const PreBiological = ref<any>(null);
  422. const taskId = ref();
  423. const getInfo = async () => {
  424. const res = await useClientRequest.get<any>(`/plt-api/app/plantationTask/getInfo/${taskId.value}`);
  425. if (!res.data) return;
  426. form.value = res.data;
  427. if (res.data.animalIds) {
  428. animalIds.value = res.data.animalIds;
  429. }
  430. if (res.data.preCropCode) {
  431. PreBiological.value = {};
  432. const Bio = await useClientRequest.get(`/plt-api/app/medicine/getMedicineByCode/${res.data.preCropCode}`);
  433. PreBiological.value = Bio.data;
  434. }
  435. if (res.data.varietyCode) {
  436. Biological.value = {};
  437. const Bio = await useClientRequest.get(`/plt-api/app/medicine/getMedicineByCode/${res.data.varietyCode}`);
  438. Biological.value = Bio.data;
  439. }
  440. // 判断有没有基地,然后去获取基地数据
  441. if (res.data.baseId) {
  442. deawerData.value = {};
  443. deawerData.value.baseName = res.data.baseRef.baseName;
  444. deawerData.value.areaUnit = res.data.baseRef.baseInfo.areaUnit;
  445. deawerData.value.area = res.data.baseRef.baseInfo.area;
  446. deawerData.value.address = res.data.baseRef.baseInfo.address;
  447. // adcodeName
  448. deawerData.value.adcodeName = res.data.baseRef.baseInfo.adcodeName;
  449. if (+res.data.landFlag) {
  450. deawerData.value.aloneChecked = true;
  451. const landIds = await useClientRequest.get('/plt-api/app/baseLandInfo/pageList', { baseId: res.data.baseId });
  452. deawerData.value.data = landIds.rows;
  453. } else {
  454. deawerData.value.aloneChecked = false;
  455. deawerData.value.data = [];
  456. const landIds = await useClientRequest.get('/plt-api/app/baseLandInfo/pageList', { baseId: res.data.baseId });
  457. //找到res.data.landIds和landIds.rows中的id相同的项
  458. landIds.rows.forEach((i: any) => {
  459. if (res.data.landIds.find((t: any) => t == i.id)) {
  460. deawerData.value.data.push(i);
  461. }
  462. });
  463. }
  464. }
  465. };
  466. const handlechoseConfirm = () => {
  467. uni.$u.route({ type: 'navigateTo', url: '/plant/port/port-create/index', params: { taskId: taskId.value } });
  468. };
  469. onMounted(() => {
  470. getInfo();
  471. });
  472. onLoad((options: any) => {
  473. taskId.value = options?.id;
  474. });
  475. </script>