modify.vue 73 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919
  1. <template>
  2. <div class="new-farming-page">
  3. <custom-header :name="isEdit ? '编辑方案' : '查看详情'"></custom-header>
  4. <div class="new-farming-content">
  5. <el-form
  6. ref="formRef"
  7. style="max-width: 600px"
  8. label-position="left"
  9. :rules="rules"
  10. :model="dynamicValidateForm"
  11. class="demo-dynamic"
  12. >
  13. <div class="farm-card">
  14. <div class="card-title between">
  15. <div>{{ detailData?.name }}<span class="type-tag">标准农事</span></div>
  16. <el-popover
  17. title=""
  18. v-if="isEdit"
  19. :popper-style="'min-width: 110px;'"
  20. :width="110"
  21. placement="left-start"
  22. trigger="click"
  23. >
  24. <div class="tag-list">
  25. <div class="tag-item">托管农事</div>
  26. <div class="tag-item active">特别关注</div>
  27. </div>
  28. <template #reference>
  29. <div class="title-tag add-tag">标记为</div>
  30. </template>
  31. </el-popover>
  32. <div class="edit-tag tag-text" v-else>托管农事</div>
  33. <!-- <el-tooltip
  34. effect="dark"
  35. placement="left"
  36. >
  37. <template #content>
  38. <div class="tag-item">全托管</div>
  39. <div class="tag-item">飞防托管</div>
  40. <div class="tag-item">营养托管</div>
  41. </template>
  42. <div class="title-tag add-tag">托管用户</div>
  43. </el-tooltip> -->
  44. </div>
  45. <div class="info-content">
  46. <el-form-item label-width="70px" class="form-item text-item" label="农事编号">
  47. <div class="info-text">
  48. {{ detailData?.code }}
  49. </div>
  50. </el-form-item>
  51. <el-form-item label-width="70px" class="form-item text-item" label="服务亩数">
  52. <div class="info-text">
  53. {{ detailData?.area ? formatArea(detailData?.area) + "亩" : "--" }}
  54. </div>
  55. </el-form-item>
  56. <el-form-item label-width="70px" class="form-item text-item" label="服务区域">
  57. <div class="info-text">
  58. {{ detailData?.serviceRegion }}
  59. </div>
  60. </el-form-item>
  61. <el-form-item
  62. v-if="isEdit"
  63. label-width="70px"
  64. class="form-item"
  65. prop="executeDate"
  66. label="执行时间"
  67. >
  68. <el-date-picker
  69. class="item-input"
  70. style="width: 100%"
  71. value-format="YYYY-MM-DD"
  72. v-model="dynamicValidateForm.executeDate"
  73. type="date"
  74. :clearable="false"
  75. placeholder="选择日期"
  76. :editable="false"
  77. />
  78. </el-form-item>
  79. <el-form-item v-else label-width="70px" class="form-item text-item" label="执行时间">
  80. <div class="info-text">
  81. {{ detailData?.executeDate }}
  82. </div>
  83. </el-form-item>
  84. </div>
  85. </div>
  86. <div class="farm-card">
  87. <!-- 农情互动 -->
  88. <div class="card-title border-bottom between">
  89. <div>农情互动</div>
  90. <!-- <span class="del-tag">删除互动</span> -->
  91. </div>
  92. <div class="interact-content">
  93. {{ detailData?.warmReminder }}
  94. <span class="edit-tag" @click="handleEditInteract(detailData)">点击编辑</span>
  95. </div>
  96. </div>
  97. <template v-if="isEdit">
  98. <div class="farm-card prescription-content common-inputs">
  99. <div class="card-title pb-12">药物处方</div>
  100. <el-form-item label-width="82px" class="form-item" prop="usageMode" label="施用方式">
  101. <el-select
  102. v-model="dynamicValidateForm.usageMode"
  103. placeholder="请选择施用方式"
  104. style="width: 100%"
  105. >
  106. <el-option
  107. v-for="(usage, uId) in allUsageModeList"
  108. :key="uId"
  109. :label="usage"
  110. :value="usage"
  111. />
  112. </el-select>
  113. </el-form-item>
  114. <div v-if="dynamicValidateForm.usageMode !== '人工农事'">
  115. <el-form-item
  116. v-for="(prescriptionItem, prescriptionI) in dynamicValidateForm.prescriptionList"
  117. :key="prescriptionI"
  118. :prop="'prescriptions.' + prescriptionI + '.value'"
  119. class="prescription-item"
  120. >
  121. <div class="recipe-item">
  122. <div class="sub-title">
  123. <div>{{ prescriptionItem.name }}处方</div>
  124. <div class="add-tag" @click="addDomain(prescriptionI)">
  125. <el-icon color="#2199F8"><Plus /></el-icon>新增药物
  126. </div>
  127. </div>
  128. <div class="recipe-form">
  129. <el-form-item
  130. v-for="(domain, index) in prescriptionItem.pesticideFertilizerList"
  131. :key="domain.key"
  132. :prop="'pesticideFertilizerList.' + index + '.value'"
  133. >
  134. <div class="form-box">
  135. <div class="form-index">药肥{{ index + 1 }}</div>
  136. <div class="box-item" v-if="domain.typeName">
  137. <div class="form-l">药肥类型</div>
  138. <div class="form-r r-text">
  139. {{ domain.typeName }}
  140. <!-- <el-select
  141. v-model="domain.typeName"
  142. placeholder="请选择"
  143. style="width: 100%"
  144. >
  145. <el-option :label="domain.typeName" :value="domain.typeName" />
  146. </el-select> -->
  147. </div>
  148. </div>
  149. <div class="box-item">
  150. <div class="form-l">药肥名称</div>
  151. <div class="form-r">
  152. <el-select
  153. filterable
  154. @change="
  155. handlePesticideFertilizerChange(prescriptionI, index)
  156. "
  157. v-model="domain.pesticideFertilizerId"
  158. placeholder="请选择"
  159. style="width: 150px"
  160. >
  161. <el-option
  162. v-for="item in pesticideFertilizersOptions"
  163. :key="item.id"
  164. :label="item.defaultName || item.name"
  165. :value="item.id"
  166. />
  167. </el-select>
  168. </div>
  169. </div>
  170. <div class="box-item">
  171. <div class="form-l">执行方式</div>
  172. <div
  173. class="form-r item-val"
  174. v-if="dynamicValidateForm.usageMode === '叶面施'"
  175. >
  176. <el-select
  177. class="select-item"
  178. v-model="domain.executionMethod"
  179. placeholder="执行方式"
  180. style="width: 150px"
  181. @change="
  182. (val) =>
  183. handleExecutionMethodChange(
  184. prescriptionI,
  185. index,
  186. val
  187. )
  188. "
  189. >
  190. <el-option
  191. v-for="(item, index) in modeList"
  192. :key="index"
  193. :label="item.name"
  194. :value="item.value"
  195. />
  196. </el-select>
  197. </div>
  198. <div class="form-r r-text" v-else>人工</div>
  199. </div>
  200. <div class="mt-8" v-if="domain.executionMethod === 1">
  201. <div class="box-item sub-item">
  202. <div class="form-l has-sub">
  203. <div class="main-name">亩兑水量</div>
  204. <div class="sub-name">(药剂:兑水量)</div>
  205. </div>
  206. <div class="form-r input-box text-center">
  207. <!-- <el-input
  208. v-model="domain.ratio2"
  209. style="width: 100%"
  210. placeholder="请输入"
  211. /> -->
  212. <el-input
  213. v-model="domain.ratio2"
  214. type="number"
  215. step="0.01"
  216. style="width: 150px"
  217. placeholder="请输入"
  218. >
  219. <template #append>{{ domain.unit }}</template>
  220. </el-input>
  221. </div>
  222. </div>
  223. <div class="box-item sub-item">
  224. <div class="form-l has-sub">
  225. <div class="main-name">单亩用量</div>
  226. <div class="sub-name">(亩数:药剂)</div>
  227. </div>
  228. <div class="form-r input-box text-center">
  229. <el-input
  230. v-model="domain.muUsage2"
  231. type="number"
  232. step="0.01"
  233. style="width: 150px"
  234. placeholder="请输入"
  235. >
  236. <template #append>{{ domain.unit }}</template>
  237. </el-input>
  238. </div>
  239. </div>
  240. </div>
  241. <div class="mt-8" v-else>
  242. <div class="box-item sub-item">
  243. <div class="form-l has-sub">
  244. <div class="main-name">亩兑水量</div>
  245. <div class="sub-name">(药剂:兑水量)</div>
  246. </div>
  247. <div class="form-r input-box text-center input-unit">
  248. <!-- <el-input
  249. v-model="domain.ratio"
  250. style="width: 100%"
  251. placeholder="请输入"
  252. /> -->
  253. <el-input
  254. v-model="domain.ratio"
  255. type="number"
  256. step="0.01"
  257. style="width: 150px"
  258. placeholder="请输入"
  259. >
  260. <template #append>{{ domain.unit }}</template>
  261. </el-input>
  262. </div>
  263. </div>
  264. <div class="box-item sub-item">
  265. <div class="form-l has-sub">
  266. <div class="main-name">单亩用量</div>
  267. <div class="sub-name">(亩数:药剂)</div>
  268. </div>
  269. <div class="form-r input-box text-center">
  270. <!-- <el-input
  271. v-model="domain.muUsage"
  272. style="width: 100%"
  273. placeholder="请输入"
  274. /> -->
  275. <el-input
  276. v-model="domain.muUsage"
  277. type="number"
  278. step="0.01"
  279. style="width: 150px"
  280. placeholder="请输入"
  281. >
  282. <template #append>{{ domain.unit }}</template>
  283. </el-input>
  284. </div>
  285. </div>
  286. </div>
  287. <div class="input-box mark-box">
  288. <el-input
  289. v-model="domain.remark"
  290. style="width: 100%"
  291. placeholder="备注:用药注意事项"
  292. />
  293. </div>
  294. <div class="action-btn">
  295. <el-button
  296. class="btn delete-btn"
  297. @click.prevent="removeDomain(prescriptionI, domain)"
  298. >
  299. 删除
  300. </el-button>
  301. <el-button
  302. type="default"
  303. class="btn"
  304. @click.prevent="resetItemForm(prescriptionI, index)"
  305. >
  306. 重置
  307. </el-button>
  308. </div>
  309. </div>
  310. </el-form-item>
  311. </div>
  312. </div>
  313. </el-form-item>
  314. </div>
  315. </div>
  316. <div
  317. v-if="dynamicValidateForm.usageMode !== '人工农事'"
  318. class="farm-card prescription-content common-inputs"
  319. >
  320. <div class="card-title">处方报价</div>
  321. <div class="medicine-wrap">
  322. <template
  323. v-for="(prescription, pIndex) in dynamicValidateForm.prescriptionList"
  324. :key="pIndex"
  325. >
  326. <div
  327. class="medicine-box"
  328. v-for="(pesticide, mIndex) in prescription.pesticideFertilizerList"
  329. :key="mIndex"
  330. >
  331. <div class="form-index">药肥{{ mIndex + 1 }}</div>
  332. <div class="box-wrap">
  333. <div class="medicine-item">
  334. <div class="item-name">药肥名称</div>
  335. <div class="item-val">{{ pesticide.pesticideFertilizerName }}</div>
  336. </div>
  337. <div class="medicine-item">
  338. <div class="item-name">药肥品牌</div>
  339. <div class="item-val">
  340. <el-input
  341. v-model="pesticide.brand"
  342. placeholder="药肥品牌"
  343. style="width: 150px"
  344. />
  345. </div>
  346. </div>
  347. <div class="medicine-item mt-8">
  348. <div class="item-name">药肥单价</div>
  349. <div class="item-val">
  350. <el-input
  351. style="width: 150px"
  352. v-model="pesticide.price"
  353. type="number"
  354. step="0.01"
  355. placeholder="单价"
  356. >
  357. <template #append>元/{{ pesticide.unit }}</template>
  358. </el-input>
  359. </div>
  360. </div>
  361. <div class="medicine-item">
  362. <div class="item-name">单亩用量</div>
  363. <div class="item-val">{{ getMuUsage(pesticide) }}{{ pesticide.unit }}</div>
  364. </div>
  365. <div class="medicine-item">
  366. <div class="item-name">服务亩数</div>
  367. <div class="item-val">{{ formatArea(detailData?.area) }}亩</div>
  368. </div>
  369. <div class="medicine-item">
  370. <div class="item-total">总计:</div>
  371. <div class="item-price">
  372. {{ getPesticideTotal(pesticide) }}<span class="item-unit">元</span>
  373. </div>
  374. </div>
  375. </div>
  376. </div>
  377. </template>
  378. <div class="medicine-box">
  379. <div class="form-index">服务报价</div>
  380. <div class="box-wrap">
  381. <div class="medicine-item mt-8">
  382. <div class="item-name">单亩价格</div>
  383. <div class="item-val">
  384. <el-input
  385. style="width: 150px"
  386. v-model="servicePricePerMu"
  387. type="number"
  388. step="0.01"
  389. placeholder="服务单价"
  390. >
  391. <template #append>元/亩</template>
  392. </el-input>
  393. </div>
  394. </div>
  395. <div class="medicine-item">
  396. <div class="item-name">服务亩数</div>
  397. <div class="item-val">{{ formatArea(detailData?.area) }}亩</div>
  398. </div>
  399. <div class="medicine-item">
  400. <div class="item-total">总计:</div>
  401. <div class="item-price">
  402. {{ getServiceTotal() }}<span class="item-unit">元</span>
  403. </div>
  404. </div>
  405. </div>
  406. </div>
  407. </div>
  408. </div>
  409. <div class="submit-btn">
  410. <div class="btn second" @click.prevent="cancelEdit">取消编辑</div>
  411. <div class="btn" @click.prevent="submitForm(formRef)">保存方案</div>
  412. </div>
  413. </template>
  414. <template v-else>
  415. <div class="farm-card prescription-content">
  416. <div class="card-title">药物处方</div>
  417. <div class="table-item">
  418. <div class="form-item">
  419. <div class="item-name">施用方式</div>
  420. <div class="item-text">{{ detailData?.usageMode }}</div>
  421. </div>
  422. </div>
  423. <div class="new-wrap">
  424. <div class="new-title">
  425. <div class="title-1"><div class="table-name">药肥类型</div></div>
  426. <div class="title-2"><div class="table-name">肥药名称</div></div>
  427. <div class="title-3"><div class="table-name">执行方式</div></div>
  428. <div class="title-4"><div class="table-name">亩兑水量</div></div>
  429. <div class="title-5"><div class="table-name">单亩用量</div></div>
  430. </div>
  431. <div
  432. class="new-table-wrap"
  433. v-for="(subP, prescriptionI) in detailData?.prescriptionList"
  434. :key="prescriptionI"
  435. >
  436. <!-- <div
  437. class="new-prescription"
  438. v-for="(subP, subI) in prescriptionItem.pesticideFertilizerList"
  439. :key="subI"
  440. > -->
  441. <div class="new-table">
  442. <div class="line-l">
  443. <div class="line-1 title-1">{{ subP.typeName }}</div>
  444. <div class="line-2">
  445. {{ subP.name || subP.pesticideFertilizerName }}
  446. </div>
  447. </div>
  448. <div class="line-r">
  449. <div class="line-3">
  450. <div class="sub-line title-3">人工</div>
  451. <div class="sub-line title-4">{{ subP.ratio }}ML</div>
  452. <div class="sub-line title-5">{{ subP.muUsage }}{{ subP.unit }}</div>
  453. </div>
  454. </div>
  455. </div>
  456. <div class="note-text" v-if="subP.remark">{{ subP.remark }}</div>
  457. <!-- </div> -->
  458. </div>
  459. </div>
  460. </div>
  461. <div class="farm-card prescription-content">
  462. <div class="card-title">处方报价</div>
  463. <div class="price-bottom pb-8">
  464. <div class="info-title-wrap">
  465. <div class="sub-title font-bold">药肥费用</div>
  466. <div class="info-more">
  467. {{ quotationData?.pesticideFertilizerCost ? formatArea(quotationData.pesticideFertilizerCost) : "--" }}<span class="unit-text">元</span>
  468. </div>
  469. </div>
  470. </div>
  471. <div class="info-content-wrap">
  472. <price-table :prescriptionData="quotationData.prescriptionList">
  473. <template #bottomContent>
  474. <div class="price-bottom">
  475. <div class="info-title-wrap">
  476. <div class="sub-title font-bold">服务费用</div>
  477. <div class="info-more">
  478. {{
  479. quotationData?.farmWorkServiceCost
  480. ? getServiceCost(
  481. quotationData.farmWorkServiceCost,
  482. quotationData.area
  483. )
  484. : "--"
  485. }}<span class="unit-text">元</span>
  486. </div>
  487. </div>
  488. <div class="price-info">
  489. <div class="info-l">
  490. 执行方式<span class="main-text">{{
  491. quotationData.executionMethodName || "人工"
  492. }}</span>
  493. </div>
  494. <div class="info-c">
  495. 亩单价<span class="main-text">{{
  496. quotationData.farmWorkServiceCost ||
  497. quotationData.manualServicePrice
  498. ? (quotationData.farmWorkServiceCost ||
  499. quotationData.manualServicePrice) + "元/亩"
  500. : "--"
  501. }}</span>
  502. </div>
  503. <div class="info-r">
  504. 亩数<span class="main-text">{{
  505. quotationData.area ? formatArea(quotationData.area) + "亩" : "--"
  506. }}</span>
  507. </div>
  508. </div>
  509. <div class="price-total">
  510. 报价合计:<span class="main-val">{{
  511. quotationData?.totalCost ? formatArea(quotationData.totalCost) : "--"
  512. }}</span
  513. >元
  514. </div>
  515. </div>
  516. </template>
  517. </price-table>
  518. </div>
  519. </div>
  520. <div class="submit-btn center-btn">
  521. <div class="btn" @click.prevent="toEditPrescription">编辑处方</div>
  522. </div>
  523. </template>
  524. </el-form>
  525. </div>
  526. </div>
  527. <!-- 服务报价单 -->
  528. <price-sheet-popup ref="priceSheetPopupRef"></price-sheet-popup>
  529. <!-- 互动设置弹窗 -->
  530. <interact-popup
  531. ref="interactPopupRef"
  532. @handleSaveSuccess="handleSaveInteractSuccess"
  533. @handleDeleteInteract="handleDeleteInteract"
  534. ></interact-popup>
  535. </template>
  536. <script setup>
  537. import { onActivated, ref, reactive, onDeactivated, onBeforeUnmount, computed, onMounted } from "vue";
  538. import { useRouter, useRoute } from "vue-router";
  539. import { ElMessage, ElMessageBox } from "element-plus";
  540. import customHeader from "@/components/customHeader.vue";
  541. import { useStore } from "vuex";
  542. import { formatArea } from "@/common/commonFun";
  543. import priceSheetPopup from "@/components/popup/priceSheetPopup.vue";
  544. import interactPopup from "@/components/popup/interactPopup.vue";
  545. import priceTable from "../agri_work/components/priceTable.vue";
  546. import dayjs from "dayjs";
  547. const store = useStore();
  548. const router = useRouter();
  549. const route = useRoute();
  550. const actionType = ref([]);
  551. const isEdit = ref(false);
  552. onActivated(() => {
  553. const id = route.query.id;
  554. isEdit.value = route.query.isEdit ? true : false;
  555. // if (id) {
  556. // getDetail(id);
  557. // }
  558. if (route.query.farmWorkId) {
  559. // getFarmWorkDetail(route.query.farmWorkId);
  560. getDetail(route.query.farmWorkId);
  561. }
  562. window.scrollTo(0, 0);
  563. if (route.query.data) {
  564. actionType.value = JSON.parse(route.query.data);
  565. } else {
  566. actionType.value = ["生长异常"];
  567. }
  568. dynamicValidateForm.prescriptionList = actionType.value.map((name) => ({
  569. name,
  570. pesticideFertilizerList: [
  571. {
  572. key: 1,
  573. typeName: "",
  574. muUsage: "",
  575. muUsage2: "",
  576. ratio: "",
  577. ratio2: "",
  578. remark: "",
  579. },
  580. ],
  581. }));
  582. });
  583. const farmWorkDetail = ref({});
  584. // 获取农事详情
  585. const getFarmWorkDetail = async (farmWorkId) => {
  586. const { data, code } = await VE_API.farm.getFarmWorkLib({ id: farmWorkId });
  587. if (code === 0) {
  588. detailData.value = data || {};
  589. }
  590. };
  591. const priceSheetPopupRef = ref(null);
  592. const showPriceSheetPopup = () => {
  593. priceSheetPopupRef.value.handleShowPopup(detailData.value);
  594. };
  595. const detailData = ref({});
  596. const getDetail = async (id) => {
  597. // const { data } = await VE_API.z_farm_work_record.getDetail({ id });
  598. const { data, code } = await VE_API.farm.getFarmWorkLib({ id });
  599. if(code === 0) {
  600. detailData.value = data;
  601. dynamicValidateForm.executeDate = data.executeDate;
  602. dynamicValidateForm.usageMode = data.usageMode;
  603. data.prescriptionList = data.prescription?.pesticideFertilizerList || [];
  604. // data.prescription?.pesticideFertilizerList.forEach((item) => {
  605. // // item.pesticideFertilizerList.forEach((pesticide) => {
  606. // item.executionMethod = item.executionMethod || 2; // 默认人工
  607. // // });
  608. // });
  609. dynamicValidateForm.prescriptionList = data.prescriptionList;
  610. servicePricePerMu.value = detailData.value.farmWorkServiceCost || null;
  611. getQuotationData();
  612. }
  613. };
  614. const toEditPrescription = () => {
  615. isEdit.value = true;
  616. };
  617. const quotationData = ref({});
  618. const getQuotationData = async () => {
  619. let priceDataObj = {};
  620. const { data } = await VE_API.z_farm_work_record_cost.getByRecordId({ farmWorkRecordId: detailData.value.id });
  621. priceDataObj = data;
  622. if (priceDataObj && Object.keys(priceDataObj).length > 0) {
  623. // 合并外层字段
  624. quotationData.value = {
  625. ...detailData.value,
  626. ...priceDataObj,
  627. agriculturalId: priceDataObj.agriculturalId,
  628. };
  629. // 根据 itemsList 的 pesticideFertilizerId 匹配并赋值品牌和价格
  630. if (priceDataObj.itemsList && Array.isArray(priceDataObj.itemsList) && detailData.value.prescriptionList) {
  631. // 创建价格映射表
  632. const priceMap = new Map();
  633. priceDataObj.itemsList.forEach((item) => {
  634. priceMap.set(String(item.pesticideFertilizerId), {
  635. brand: item.brand || "",
  636. price: item.price || 0,
  637. totalPrice: item.totalPrice || null,
  638. });
  639. });
  640. // 遍历处方列表,赋值品牌和价格,并计算格式化字段供 price-table 使用
  641. quotationData.value.prescriptionList = detailData.value.prescriptionList.map((prescription) => {
  642. return {
  643. ...prescription,
  644. pesticideFertilizerList: prescription.pesticideFertilizerList.map((pesticide) => {
  645. const pesticideId = String(pesticide.pesticideFertilizerId || "");
  646. const priceInfo = priceMap.get(pesticideId);
  647. if (priceInfo) {
  648. const price = priceInfo.price || 0;
  649. const muUsage = pesticide.muUsage || 0;
  650. const unit = pesticide.unit || "";
  651. const area = detailData.value.area || 0;
  652. // 计算总价:优先使用 totalPrice,否则计算 price * muUsage * area
  653. const total = priceInfo.totalPrice ? priceInfo.totalPrice : price * muUsage * area;
  654. return {
  655. ...pesticide,
  656. brand: priceInfo.brand || "--",
  657. totalPrice: priceInfo.totalPrice,
  658. // 格式化字段供 price-table 组件使用
  659. price: price > 0 ? `${price}元/${unit}` : "--", // 格式化单价显示
  660. dosage: muUsage > 0 ? `${muUsage}${unit}` : "--", // 格式化用量显示
  661. total: total > 0 ? total.toFixed(2) : "--", // 格式化总价显示
  662. };
  663. }
  664. return pesticide;
  665. }),
  666. };
  667. });
  668. }
  669. }
  670. };
  671. // 根据执行方式获取单亩用量:1=无人机用muUsage2,2=人工用muUsage
  672. const getMuUsage = (pesticide) => {
  673. if (!pesticide) return 0;
  674. // 如果是叶面施且有执行方式选择,根据执行方式判断
  675. if (
  676. detailData.value?.usageMode === "叶面施" &&
  677. dynamicValidateForm.executionMethod !== null &&
  678. dynamicValidateForm.executionMethod !== undefined
  679. ) {
  680. // 1 = 无人机,使用 muUsage2
  681. if (dynamicValidateForm.executionMethod == 1) {
  682. return pesticide.muUsage2 || pesticide.muUsage || 0;
  683. }
  684. // 2 = 人工,使用 muUsage
  685. if (dynamicValidateForm.executionMethod == 2) {
  686. return pesticide.muUsage || 0;
  687. }
  688. }
  689. // 默认使用 muUsage(非叶面施的情况)
  690. return pesticide.muUsage || 0;
  691. };
  692. // 计算单个药肥的总计:单价 * 单亩用量 * 亩数
  693. const getPesticideTotal = (pesticide) => {
  694. const muUsage = getMuUsage(pesticide);
  695. if (!pesticide.price || !muUsage || !detailData.value.area) return "--";
  696. const total = (pesticide.price * muUsage * detailData.value.area).toFixed(2);
  697. return total;
  698. };
  699. function getServiceCost(cost, area) {
  700. if (!cost || !area) return "--";
  701. return (parseFloat(cost) * parseFloat(area)).toFixed(2);
  702. }
  703. const resetForm = (formEl) => {
  704. if (!formEl) return;
  705. formEl.resetFields();
  706. };
  707. // 清空所有数据
  708. const clearData = () => {
  709. // 清空表单
  710. resetForm(formRef.value);
  711. // 清空详情数据
  712. detailData.value = {};
  713. // 清空表单数据
  714. dynamicValidateForm.farmWorkName = "";
  715. dynamicValidateForm.conditionRate = "";
  716. dynamicValidateForm.purpose = "";
  717. dynamicValidateForm.executeDate = dayjs().format("YYYY-MM-DD");
  718. dynamicValidateForm.checkDay = "";
  719. dynamicValidateForm.usageMode = "";
  720. dynamicValidateForm.prescriptionList = [
  721. {
  722. name: "",
  723. pesticideFertilizerList: [
  724. {
  725. key: 1,
  726. typeName: "",
  727. muUsage: "",
  728. muUsage2: "",
  729. ratio: "",
  730. ratio2: "",
  731. remark: "",
  732. },
  733. ],
  734. },
  735. ];
  736. // 清空其他数据
  737. actionType.value = [];
  738. };
  739. onDeactivated(() => {
  740. clearData();
  741. });
  742. onBeforeUnmount(() => {
  743. clearData();
  744. });
  745. const cancelEdit = () => {
  746. ElMessageBox.confirm("确认要取消编辑吗?", "提示", {
  747. confirmButtonText: "确认",
  748. cancelButtonText: "取消",
  749. type: "warning",
  750. })
  751. .then(() => {
  752. isEdit.value = false;
  753. })
  754. .catch(() => {
  755. console.log("取消编辑");
  756. });
  757. };
  758. const modeList = ref([
  759. { name: "无人机", value: 1 },
  760. { name: "人工", value: 2 },
  761. ]);
  762. const handleExecutionMethodChange = (parentIndex, index, val) => {
  763. const domain = dynamicValidateForm.prescriptionList[parentIndex].pesticideFertilizerList[index];
  764. if (val == 1) {
  765. domain.muUsage = domain.muUsage2;
  766. domain.ratio = domain.ratio2;
  767. servicePricePerMu.value = detailData.value.uavServicePrice;
  768. } else {
  769. servicePricePerMu.value = detailData.value.manualServicePrice;
  770. }
  771. };
  772. // 表单
  773. const formRef = ref();
  774. const dynamicValidateForm = reactive({
  775. farmWorkName: "",
  776. conditionRate: "",
  777. purpose: "",
  778. executeDate: dayjs().format("YYYY-MM-DD"),
  779. checkDay: "",
  780. usageMode: "",
  781. executionMethod: 2,
  782. prescriptionList: [
  783. {
  784. name: "",
  785. pesticideFertilizerList: [
  786. {
  787. key: 1,
  788. typeName: "",
  789. muUsage: "",
  790. muUsage2: "",
  791. ratio: "",
  792. ratio2: "",
  793. remark: "",
  794. },
  795. ],
  796. },
  797. ],
  798. });
  799. const rules = {
  800. farmWorkName: [
  801. {
  802. required: true,
  803. message: "请输入农事名称",
  804. trigger: "blur",
  805. },
  806. ],
  807. conditionRate: [
  808. {
  809. required: false,
  810. message: "请输入触发条件",
  811. trigger: "blur",
  812. },
  813. ],
  814. executeDate: [
  815. {
  816. required: false,
  817. message: "请选择执行时间",
  818. trigger: "blur",
  819. },
  820. ],
  821. checkDay: [
  822. {
  823. required: true,
  824. message: "请选择复核时间",
  825. trigger: "blur",
  826. },
  827. ],
  828. };
  829. const addDomain = (parentIndex) => {
  830. dynamicValidateForm.prescriptionList[parentIndex].pesticideFertilizerList.unshift({
  831. key: Date.now(),
  832. muUsage: "",
  833. muUsage2: "",
  834. ratio: "",
  835. ratio2: "",
  836. remark: "",
  837. executionMethod: 2, // 默认人工
  838. });
  839. };
  840. let pesticideFertilizersOptions = ref([]);
  841. VE_API.z_farm_work_order.pesticideFertilizersList().then(({ data }) => {
  842. pesticideFertilizersOptions.value = data;
  843. });
  844. const allUsageModeList = ["叶面施", "根部施", "人工农事"];
  845. /**
  846. * 选择药肥的时候修改订单中药肥pesticideFertilizerId 以外其他数据
  847. * @param index
  848. */
  849. const handlePesticideFertilizerChange = (parentIndex, index) => {
  850. let obj = pesticideFertilizersOptions.value.filter(
  851. (item) =>
  852. dynamicValidateForm.prescriptionList[parentIndex].pesticideFertilizerList[index].pesticideFertilizerId ===
  853. item.id
  854. )[0];
  855. dynamicValidateForm.prescriptionList[parentIndex].pesticideFertilizerList[index] = {
  856. ...dynamicValidateForm.prescriptionList[parentIndex].pesticideFertilizerList[index],
  857. typeName: obj.typeName,
  858. unit: obj.unit,
  859. defaultRatio: obj.defaultRatio,
  860. usageModeList: obj.usageModeList,
  861. executionMethod: obj.executionMethod || 2, // 默认人工
  862. ratio: obj.defaultRatio,
  863. defaultName: obj.defaultName,
  864. pesticideFertilizerName: obj.name,
  865. pesticideFertilizerCode: obj.pesticideFertilizerCode,
  866. };
  867. };
  868. const removeDomain = (parentIndex, item) => {
  869. const index = dynamicValidateForm.prescriptionList[parentIndex].pesticideFertilizerList.indexOf(item);
  870. if (index !== -1) {
  871. dynamicValidateForm.prescriptionList[parentIndex].pesticideFertilizerList.splice(index, 1);
  872. }
  873. };
  874. const resetItemForm = (parentIndex, index) => {
  875. dynamicValidateForm.prescriptionList[parentIndex].pesticideFertilizerList[index] = {
  876. typeName: "",
  877. muUsage: "",
  878. muUsage2: "",
  879. ratio: "",
  880. ratio2: "",
  881. remark: "",
  882. executionMethod: 2, // 默认人工
  883. };
  884. };
  885. const servicePricePerMu = ref(null);
  886. // 计算服务费用总计:亩单价 * 亩数
  887. const getServiceTotal = () => {
  888. if (!servicePricePerMu.value || !detailData.value.area) return "--";
  889. const total = (servicePricePerMu.value * detailData.value.area).toFixed(2);
  890. return total;
  891. };
  892. const submitForm = (formEl) => {
  893. if (!formEl) return;
  894. formEl.validate((valid) => {
  895. if (valid) {
  896. // router.push({
  897. // path: "/completed_work",
  898. // query: {
  899. // id: 1,
  900. // status: 1,
  901. // },
  902. // });
  903. submit();
  904. } else {
  905. console.log("error submit!");
  906. }
  907. });
  908. };
  909. const submit = () => {
  910. const data = {
  911. id: route.query.id,
  912. ...dynamicValidateForm,
  913. };
  914. VE_API.z_farm_work_record.issueFarmWorkRecord(data).then(async (res) => {
  915. if (res.code === 0) {
  916. await getDetail(route.query.id);
  917. showPriceSheetPopup();
  918. }
  919. });
  920. };
  921. const handleSaveInteractSuccess = () => {
  922. // getDetail(route.query.id);
  923. };
  924. const handleDeleteInteract = () => {
  925. // getDetail(route.query.id);
  926. };
  927. const interactPopupRef = ref(null);
  928. const handleEditInteract = (item) => {
  929. if (interactPopupRef.value) {
  930. interactPopupRef.value.showPopup({
  931. arrangeIdVal: item.id,
  932. interactTitleVal: item.farmWorkName || "梢期杀虫", // 使用农事名称作为标题
  933. interactTimeVal: item.interactTime || "", // 如果有已保存的互动时间
  934. forceTriggerTimeVal: item.forceTriggerTime || "", // 如果有已保存的强制触发时间
  935. interactQuestionVal: item.interactQuestion, // 如果有已保存的互动问题
  936. });
  937. }
  938. };
  939. </script>
  940. <style lang="scss" scoped>
  941. .new-farming-page {
  942. height: 100vh;
  943. position: relative;
  944. overflow: auto;
  945. font-size: 14px;
  946. background: #f2f3f5;
  947. ::v-deep {
  948. .custom-header {
  949. position: fixed;
  950. top: 0;
  951. padding-bottom: 1px;
  952. }
  953. }
  954. .step-wrap {
  955. padding: 12px 0;
  956. }
  957. .box-wrap {
  958. background: #fff;
  959. padding: 20px 10px 10px;
  960. border-radius: 6px;
  961. }
  962. .new-farming-content {
  963. margin: 41px 0 62px 0;
  964. padding: 4px 12px 8px 12px;
  965. width: 100%;
  966. box-sizing: border-box;
  967. // ::v-deep {
  968. // .el-select__input {
  969. // color: #2199F8;
  970. // }
  971. // .el-select__wrapper {
  972. // color: #2199F8;
  973. // min-height: 30px;
  974. // line-height: 28px;
  975. // box-shadow: 0 0 0 1px rgba(33, 153, 248, 0.3) inset;
  976. // }
  977. // .el-select__caret {
  978. // color: #2199F8;
  979. // }
  980. // .el-select__placeholder {
  981. // color: #2199F8;
  982. // }
  983. // .el-radio {
  984. // margin-right: 16px;
  985. // }
  986. // .el-input__wrapper {
  987. // box-shadow: 0 0 0 1px rgba(33, 153, 248, 0.3) inset;
  988. // }
  989. // .el-input__prefix {
  990. // color: #2199F8;
  991. // }
  992. // .el-input__inner {
  993. // color: #2199F8;
  994. // --el-input-placeholder-color: rgba(33, 153, 248, 0.43);
  995. // }
  996. // .el-tag.el-tag--info {
  997. // --el-tag-text-color: #2199F8;
  998. // --el-tag-bg-color: rgba(33, 153, 248, 0.1);
  999. // }
  1000. // }
  1001. .farm-info {
  1002. color: rgba(0, 0, 0, 0.6);
  1003. font-size: 14px;
  1004. margin-top: 14px;
  1005. .info-title {
  1006. display: flex;
  1007. align-items: center;
  1008. justify-content: space-between;
  1009. color: rgba(41, 41, 41, 0.3);
  1010. .info-more {
  1011. display: flex;
  1012. align-items: center;
  1013. }
  1014. }
  1015. }
  1016. .farm-photo {
  1017. margin-top: 10px;
  1018. .photo-list {
  1019. display: flex;
  1020. align-items: center;
  1021. width: 100%;
  1022. overflow: auto;
  1023. padding-bottom: 10px;
  1024. .photo-item {
  1025. width: 92px;
  1026. height: 92px;
  1027. border-radius: 8px;
  1028. object-fit: cover;
  1029. }
  1030. .img-item {
  1031. img {
  1032. width: 92px;
  1033. height: 92px;
  1034. border-radius: 8px;
  1035. object-fit: cover;
  1036. margin-right: 12px;
  1037. }
  1038. }
  1039. }
  1040. .list-text {
  1041. text-align: center;
  1042. color: rgba(0, 0, 0, 0.5);
  1043. padding-top: 2px;
  1044. }
  1045. }
  1046. .submit-btn {
  1047. z-index: 10;
  1048. position: fixed;
  1049. bottom: 0px;
  1050. left: 0;
  1051. width: 100%;
  1052. display: flex;
  1053. align-items: center;
  1054. justify-content: space-between;
  1055. padding: 12px;
  1056. background: #fff;
  1057. box-sizing: border-box;
  1058. box-shadow: 0 4px 4px rgba(0, 0, 0, 0.4);
  1059. border-top: 1px solid rgba(0, 0, 0, 0.1);
  1060. &.center-btn {
  1061. justify-content: center;
  1062. }
  1063. .btn {
  1064. height: 40px;
  1065. border-radius: 25px;
  1066. line-height: 40px;
  1067. width: 110px;
  1068. text-align: center;
  1069. background: linear-gradient(180deg, #70bffe, #2199f8);
  1070. color: #ffffff;
  1071. font-size: 14px;
  1072. &.second {
  1073. background: #ffffff;
  1074. border: 1px solid rgba(153, 153, 153, 0.5);
  1075. color: #666666;
  1076. }
  1077. }
  1078. .btn + .btn {
  1079. margin-left: 12px;
  1080. }
  1081. }
  1082. }
  1083. .card-title {
  1084. font-size: 16px;
  1085. font-weight: bold;
  1086. color: #000;
  1087. display: flex;
  1088. align-items: center;
  1089. &.between {
  1090. justify-content: space-between;
  1091. .del-tag {
  1092. color: #e04c4c;
  1093. border: 1px solid #e04c4c;
  1094. border-radius: 5px;
  1095. padding: 4px 14px;
  1096. font-size: 12px;
  1097. font-weight: normal;
  1098. }
  1099. .title-tag {
  1100. padding: 2px 10px;
  1101. height: 26px;
  1102. line-height: 26px;
  1103. }
  1104. }
  1105. // justify-content: space-between;
  1106. .add-tag {
  1107. font-size: 12px;
  1108. color: #2199f8;
  1109. padding: 4px 8px;
  1110. background: rgba(33, 153, 248, 0.16);
  1111. border-radius: 20px;
  1112. font-weight: normal;
  1113. height: 25px;
  1114. line-height: 25px;
  1115. }
  1116. .type-tag {
  1117. margin-left: 5px;
  1118. font-size: 12px;
  1119. color: #000000;
  1120. padding: 0 10px;
  1121. background: rgba(119, 119, 119, 0.1);
  1122. border-radius: 20px;
  1123. font-weight: normal;
  1124. height: 26px;
  1125. line-height: 26px;
  1126. display: inline-block;
  1127. }
  1128. }
  1129. .pb-12 {
  1130. padding-bottom: 12px;
  1131. }
  1132. .farm-card {
  1133. background: #ffffff;
  1134. border-radius: 8px;
  1135. padding: 12px 12px 0 12px;
  1136. width: 100%;
  1137. box-sizing: border-box;
  1138. margin-top: 10px;
  1139. color: rgba(0, 0, 0, 0.4);
  1140. &.progress {
  1141. display: flex;
  1142. align-items: center;
  1143. padding: 12px;
  1144. .progress-title {
  1145. margin-right: 12px;
  1146. }
  1147. ::v-deep {
  1148. .el-radio {
  1149. margin-right: 10px;
  1150. }
  1151. }
  1152. }
  1153. &.map-content {
  1154. margin-top: 12px;
  1155. }
  1156. &.prescription-content {
  1157. padding: 12px;
  1158. }
  1159. .border-bottom {
  1160. padding-bottom: 7px;
  1161. border-bottom: 1px solid rgba(245, 245, 245, 0.99);
  1162. }
  1163. }
  1164. .table-item {
  1165. padding: 6px 0 10px 0;
  1166. .form-item {
  1167. display: flex;
  1168. align-items: center;
  1169. font-size: 14px;
  1170. color: #767676;
  1171. height: 24px;
  1172. .item-name {
  1173. width: 80px;
  1174. color: rgba(0, 0, 0, 0.2);
  1175. }
  1176. }
  1177. }
  1178. .new-wrap {
  1179. border-radius: 5px;
  1180. text-align: center;
  1181. border: 1px solid rgba(225, 225, 225, 0.5);
  1182. .new-title {
  1183. background: rgba(241, 241, 241, 0.4);
  1184. border-radius: 5px 5px 0 0;
  1185. border-bottom: 1px solid rgba(225, 225, 225, 0.5);
  1186. display: flex;
  1187. color: #767676;
  1188. // justify-content: space-around;
  1189. padding: 5px 6px;
  1190. font-size: 12px;
  1191. .table-name {
  1192. width: 24px;
  1193. font-size: 12px;
  1194. margin: 0 auto;
  1195. }
  1196. }
  1197. .title-1 {
  1198. width: 46px;
  1199. }
  1200. .title-2 {
  1201. flex: 1;
  1202. }
  1203. .title-3 {
  1204. width: 52px;
  1205. }
  1206. .title-4 {
  1207. width: 56px;
  1208. }
  1209. .title-5 {
  1210. width: 52px;
  1211. }
  1212. .new-table-wrap {
  1213. padding: 5px 0;
  1214. .new-prescription + .new-prescription {
  1215. border-top: 1px solid rgba(225, 225, 225, 0.8);
  1216. }
  1217. // .new-prescription {
  1218. .new-table {
  1219. display: flex;
  1220. align-items: center;
  1221. // border: 1px solid rgba(225, 225, 225, 0.8);
  1222. background: #fff;
  1223. border-radius: 5px;
  1224. color: rgba(0, 0, 0, 0.6);
  1225. font-size: 11px;
  1226. .line-l {
  1227. display: flex;
  1228. flex: 1;
  1229. .line-2 {
  1230. flex: 1;
  1231. padding: 0 2px;
  1232. }
  1233. }
  1234. .line-r {
  1235. &.has-border {
  1236. border-left: 1px solid rgba(225, 225, 225, 0.8);
  1237. }
  1238. .line-3 {
  1239. display: flex;
  1240. align-items: center;
  1241. }
  1242. .sub-line {
  1243. padding: 10px 0;
  1244. }
  1245. .line-4 {
  1246. display: flex;
  1247. align-items: center;
  1248. border-top: 1px solid rgba(225, 225, 225, 0.8);
  1249. }
  1250. .execute-line {
  1251. border-right: 1px solid rgba(225, 225, 225, 0.8);
  1252. }
  1253. }
  1254. }
  1255. .note-text {
  1256. margin: 8px 0 4px 0;
  1257. color: rgba(0, 0, 0, 0.4);
  1258. background: #fff;
  1259. padding: 6px 8px;
  1260. border-radius: 5px;
  1261. text-align: left;
  1262. font-size: 11px;
  1263. }
  1264. // }
  1265. // .new-prescription + .new-prescription {
  1266. // padding-top: 8px;
  1267. // }
  1268. }
  1269. }
  1270. .info-content-wrap {
  1271. ::v-deep {
  1272. .new-table-wrap {
  1273. padding: 5px 0;
  1274. .new-prescription + .new-prescription {
  1275. border-top: 1px solid rgba(225, 225, 225, 0.8);
  1276. }
  1277. }
  1278. }
  1279. }
  1280. .price-bottom {
  1281. padding-top: 8px;
  1282. .info-title-wrap {
  1283. display: flex;
  1284. align-items: center;
  1285. justify-content: space-between;
  1286. color: #000;
  1287. .info-more {
  1288. font-size: 18px;
  1289. }
  1290. .unit-text {
  1291. font-size: 12px;
  1292. }
  1293. }
  1294. .price-info {
  1295. padding: 8px 0;
  1296. display: flex;
  1297. align-items: center;
  1298. justify-content: space-between;
  1299. color: rgba(0, 0, 0, 0.2);
  1300. .main-text {
  1301. padding-left: 6px;
  1302. color: rgba(0, 0, 0, 0.8);
  1303. }
  1304. .info-c {
  1305. flex: 1;
  1306. text-align: center;
  1307. }
  1308. }
  1309. .price-total {
  1310. height: 38px;
  1311. display: flex;
  1312. align-items: center;
  1313. justify-content: center;
  1314. border: 1px solid rgba(33, 153, 248, 0.5);
  1315. background: rgba(33, 153, 248, 0.1);
  1316. color: #000000;
  1317. border-radius: 4px;
  1318. .main-val {
  1319. font-size: 20px;
  1320. font-weight: bold;
  1321. color: #2199f8;
  1322. padding-right: 2px;
  1323. }
  1324. }
  1325. }
  1326. .pb-8 {
  1327. padding-bottom: 8px;
  1328. }
  1329. .common-inputs {
  1330. ::v-deep {
  1331. .el-input__wrapper {
  1332. box-shadow: none;
  1333. }
  1334. .el-input-group__append {
  1335. padding: 0 10px;
  1336. background: none;
  1337. box-shadow: none;
  1338. }
  1339. .el-input-group__append {
  1340. color: rgba(33, 153, 248, 0.5);
  1341. }
  1342. .el-input {
  1343. border: 1px solid rgba(33, 153, 248, 0.3);
  1344. border-radius: 5px;
  1345. height: 30px;
  1346. box-sizing: border-box;
  1347. }
  1348. .el-input__wrapper {
  1349. padding: 0 2px 0 10px;
  1350. height: 28px;
  1351. line-height: 28px;
  1352. min-height: 28px;
  1353. }
  1354. .el-input__inner {
  1355. --el-input-inner-height: 28px;
  1356. height: 28px;
  1357. line-height: 28px;
  1358. min-height: 28px;
  1359. color: #2199f8;
  1360. --el-input-placeholder-color: rgba(33, 153, 248, 0.43);
  1361. }
  1362. .el-select__wrapper {
  1363. box-shadow: 0 0 0 1px rgba(33, 153, 248, 0.3) inset;
  1364. }
  1365. .el-select__placeholder,
  1366. .el-select__caret {
  1367. color: #2199f8;
  1368. }
  1369. }
  1370. }
  1371. .medicine-box {
  1372. margin-top: 12px;
  1373. // padding-top: 10px;
  1374. border: 1px solid rgba(33, 153, 248, 0.8);
  1375. position: relative;
  1376. border-radius: 6px;
  1377. .item-title {
  1378. padding-left: 5px;
  1379. font-size: 16px;
  1380. color: #000000;
  1381. font-weight: 500;
  1382. padding-bottom: 10px;
  1383. }
  1384. .medicine-item {
  1385. display: flex;
  1386. align-items: center;
  1387. justify-content: space-between;
  1388. height: 32px;
  1389. .item-name {
  1390. color: rgba(0, 0, 0, 0.4);
  1391. }
  1392. .item-val {
  1393. min-width: 142px;
  1394. text-align: center;
  1395. color: #302f2f;
  1396. display: flex;
  1397. align-items: center;
  1398. justify-content: center;
  1399. gap: 4px;
  1400. .price-unit {
  1401. font-size: 12px;
  1402. color: rgba(0, 0, 0, 0.4);
  1403. white-space: nowrap;
  1404. }
  1405. }
  1406. .item-total {
  1407. font-size: 16px;
  1408. color: #000;
  1409. }
  1410. .item-price {
  1411. color: #2199f8;
  1412. font-size: 20px;
  1413. font-weight: bold;
  1414. .item-unit {
  1415. font-size: 14px;
  1416. font-weight: normal;
  1417. padding-left: 2px;
  1418. color: #474747;
  1419. }
  1420. }
  1421. }
  1422. .medicine-item + .medicine-item {
  1423. padding-top: 2px;
  1424. }
  1425. .mt-8 {
  1426. margin-top: 8px;
  1427. }
  1428. }
  1429. .usage-mode-wrap {
  1430. padding: 0 12px;
  1431. margin-top: 12px;
  1432. .info-content {
  1433. padding-top: 14px;
  1434. padding-bottom: 1px;
  1435. }
  1436. .el-form-item--default {
  1437. margin-bottom: 0;
  1438. }
  1439. }
  1440. ::v-deep {
  1441. .el-form-item__label {
  1442. height: 30px;
  1443. line-height: 30px;
  1444. color: rgba(0, 0, 0, 0.4);
  1445. }
  1446. .el-form-item.is-required:not(.is-no-asterisk).asterisk-left > .el-form-item__label:before {
  1447. display: none;
  1448. }
  1449. }
  1450. .interact-content {
  1451. padding: 10px 0;
  1452. line-height: 20px;
  1453. color: #919191;
  1454. font-size: 12px;
  1455. }
  1456. .edit-tag {
  1457. padding-left: 4px;
  1458. color: #2199f8;
  1459. }
  1460. .tag-text {
  1461. font-size: 12px;
  1462. font-weight: normal;
  1463. }
  1464. .info-content {
  1465. padding: 10px 0;
  1466. position: relative;
  1467. .condition-wrap {
  1468. display: flex;
  1469. align-items: center;
  1470. width: 100%;
  1471. .symbol {
  1472. width: 10px;
  1473. // text-align: center;
  1474. // padding: 0 4px;
  1475. }
  1476. }
  1477. .item-input {
  1478. // width: 60%;
  1479. min-width: 140px;
  1480. max-width: 240px;
  1481. }
  1482. .recheck-text {
  1483. padding-left: 6px;
  1484. }
  1485. .info-item {
  1486. display: flex;
  1487. justify-content: space-between;
  1488. align-items: center;
  1489. width: 100%;
  1490. }
  1491. .info-item + .info-item {
  1492. margin-top: 12px;
  1493. }
  1494. .bottom-map {
  1495. width: 100%;
  1496. height: 250px;
  1497. clip-path: inset(0px round 8px);
  1498. }
  1499. .check-btn {
  1500. position: absolute;
  1501. bottom: 16px;
  1502. right: 6px;
  1503. background: rgba(0, 0, 0, 0.6);
  1504. padding: 0 8px;
  1505. border-radius: 8px;
  1506. ::v-deep {
  1507. .el-checkbox {
  1508. color: #fff;
  1509. }
  1510. }
  1511. }
  1512. .area-select {
  1513. padding-bottom: 12px;
  1514. .block {
  1515. width: 12px;
  1516. display: inline-block;
  1517. }
  1518. }
  1519. }
  1520. ::v-deep {
  1521. .el-form-item--default {
  1522. margin-bottom: 8px;
  1523. &.text-item {
  1524. margin-bottom: 2px;
  1525. .el-form-item__content {
  1526. line-height: 24px;
  1527. }
  1528. .el-form-item__label {
  1529. height: 24px;
  1530. line-height: 24px;
  1531. }
  1532. }
  1533. }
  1534. }
  1535. .sub-title {
  1536. display: flex;
  1537. align-items: center;
  1538. justify-content: space-between;
  1539. color: rgba(0, 0, 0, 0.6);
  1540. font-size: 14px;
  1541. .add-tag {
  1542. font-size: 12px;
  1543. color: #2199f8;
  1544. padding: 0 8px;
  1545. border: 1px solid #2199f8;
  1546. border-radius: 5px;
  1547. font-weight: normal;
  1548. height: 28px;
  1549. line-height: 28px;
  1550. }
  1551. }
  1552. .font-bold {
  1553. font-weight: 500;
  1554. color: #000000;
  1555. }
  1556. .form-index {
  1557. position: absolute;
  1558. left: 0;
  1559. top: 0;
  1560. padding: 0 6px;
  1561. background: #2199f8;
  1562. border-radius: 5px 0 4px 0;
  1563. height: 18px;
  1564. line-height: 18px;
  1565. font-size: 12px;
  1566. color: #fff;
  1567. }
  1568. .recipe-item {
  1569. width: 100%;
  1570. .recipe-form {
  1571. padding-top: 8px;
  1572. ::v-deep {
  1573. .el-form-item {
  1574. &:last-child {
  1575. margin-bottom: 0;
  1576. }
  1577. }
  1578. }
  1579. }
  1580. .mt-8 {
  1581. margin-top: 8px;
  1582. }
  1583. .box-item {
  1584. display: flex;
  1585. align-items: center;
  1586. justify-content: space-between;
  1587. color: rgba(0, 0, 0, 0.4);
  1588. .r-text {
  1589. color: #302f2f;
  1590. width: 150px;
  1591. text-align: center;
  1592. }
  1593. .form-r {
  1594. width: 150px;
  1595. min-width: 140px;
  1596. max-width: 240px;
  1597. }
  1598. }
  1599. .form-box {
  1600. border: 1px solid rgba(33, 153, 248, 0.8);
  1601. border-radius: 6px;
  1602. padding: 20px 10px;
  1603. width: 100%;
  1604. position: relative;
  1605. // background: rgb(209, 235, 255, 0.3);
  1606. // margin-bottom: 12px;
  1607. .input-box {
  1608. &.mark-box {
  1609. padding: 8px 0 12px 0;
  1610. }
  1611. }
  1612. // .input-unit {
  1613. // ::v-deep {
  1614. // .el-input {
  1615. // border: 1px solid #dcdfe6;
  1616. // border-radius: 5px;
  1617. // height: 32px;
  1618. // box-sizing: border-box;
  1619. // }
  1620. // .el-input__wrapper {
  1621. // padding: 0 2px 0 10px;
  1622. // height: 30px;
  1623. // line-height: 30px;
  1624. // min-height: 30px;
  1625. // box-shadow: none;
  1626. // }
  1627. // .el-input__inner {
  1628. // --el-input-inner-height: 30px;
  1629. // height: 30px;
  1630. // line-height: 30px;
  1631. // min-height: 30px;
  1632. // color: #606266;
  1633. // --el-input-placeholder-color: #a8abb2;
  1634. // }
  1635. // .el-input-group__append {
  1636. // box-shadow: none;
  1637. // border: none;
  1638. // background: none;
  1639. // }
  1640. // }
  1641. // }
  1642. // .text-center {
  1643. // ::v-deep {
  1644. // .el-input__inner {
  1645. // text-align: center;
  1646. // }
  1647. // }
  1648. // }
  1649. .action-btn {
  1650. display: flex;
  1651. justify-content: flex-end;
  1652. .btn {
  1653. color: #8f8f8f;
  1654. border-radius: 25px;
  1655. padding: 5px 30px;
  1656. }
  1657. .delete-btn {
  1658. color: rgba(255, 89, 89, 0.9);
  1659. background: #fff;
  1660. border: 1px solid rgba(255, 89, 89, 0.9);
  1661. }
  1662. }
  1663. .btn-group {
  1664. padding-top: 12px;
  1665. }
  1666. .sub-item {
  1667. // padding-left: 10px;
  1668. .has-sub {
  1669. display: flex;
  1670. flex-direction: column;
  1671. align-items: center;
  1672. .main-name {
  1673. line-height: 20px;
  1674. }
  1675. .sub-name {
  1676. font-size: 10px;
  1677. color: rgba(129, 129, 129, 0.5);
  1678. line-height: 14px;
  1679. }
  1680. }
  1681. .colunm-sub {
  1682. display: flex;
  1683. align-items: center;
  1684. .sub-name {
  1685. font-size: 10px;
  1686. color: rgba(129, 129, 129, 0.5);
  1687. }
  1688. }
  1689. .r-text {
  1690. width: 132px;
  1691. text-align: center;
  1692. font-size: 14px;
  1693. color: #474747;
  1694. }
  1695. .price {
  1696. ::v-deep {
  1697. .el-input__wrapper {
  1698. box-shadow: 0 0 0 1px rgba(33, 153, 248, 0.3) inset;
  1699. }
  1700. .el-input__inner {
  1701. color: #2199f8;
  1702. }
  1703. }
  1704. }
  1705. }
  1706. .form-title {
  1707. font-size: 14px;
  1708. padding-top: 6px;
  1709. color: #000;
  1710. font-weight: 600;
  1711. }
  1712. .box-item + .box-item {
  1713. margin-top: 8px;
  1714. }
  1715. }
  1716. .form-box + .form-box {
  1717. margin-top: 8px;
  1718. }
  1719. .usageMode-wrap {
  1720. padding-top: 8px;
  1721. }
  1722. }
  1723. // 状况描述样式
  1724. .situation-description {
  1725. width: 100%;
  1726. .description-title {
  1727. font-size: 16px;
  1728. font-weight: bold;
  1729. color: #000;
  1730. margin-bottom: 12px;
  1731. }
  1732. .description-content {
  1733. .description-textarea {
  1734. margin-bottom: 10px;
  1735. width: 100%;
  1736. }
  1737. .upload-section {
  1738. .upload-btn {
  1739. width: 112px;
  1740. height: 32px;
  1741. border-radius: 3px;
  1742. border: 1px solid #e0e0e0;
  1743. background: #fff;
  1744. color: #000;
  1745. font-size: 14px;
  1746. display: flex;
  1747. align-items: center;
  1748. justify-content: center;
  1749. margin-bottom: 8px;
  1750. .el-icon {
  1751. margin-right: 6px;
  1752. }
  1753. }
  1754. .upload-tip {
  1755. font-size: 12px;
  1756. color: #999;
  1757. line-height: 1.4;
  1758. }
  1759. }
  1760. }
  1761. }
  1762. // 专家诊断按钮样式
  1763. .expert-diagnosis-btn {
  1764. width: 180px;
  1765. height: 40px;
  1766. border-radius: 24px;
  1767. background: linear-gradient(180deg, #70bffe 0%, #2199f8 100%);
  1768. color: #ffffff;
  1769. display: flex;
  1770. align-items: center;
  1771. justify-content: center;
  1772. margin: 30px auto 0;
  1773. }
  1774. }
  1775. .tag-list {
  1776. font-size: 14px;
  1777. .tag-item + .tag-item {
  1778. margin-top: 6px;
  1779. }
  1780. .tag-item {
  1781. padding: 2px 8px;
  1782. text-align: center;
  1783. &.active {
  1784. color: #2199f8;
  1785. background: rgba(33, 153, 248, 0.16);
  1786. border-radius: 4px;
  1787. }
  1788. }
  1789. }
  1790. .task-tips-popup {
  1791. width: 75%;
  1792. padding: 28px 28px 20px;
  1793. display: flex;
  1794. flex-direction: column;
  1795. align-items: center;
  1796. justify-content: center;
  1797. .create-farm-icon {
  1798. width: 40px;
  1799. height: 40px;
  1800. margin-bottom: 12px;
  1801. }
  1802. .farm-check-icon {
  1803. width: 68px;
  1804. height: 68px;
  1805. margin-bottom: 12px;
  1806. }
  1807. .create-farm-text {
  1808. font-size: 20px;
  1809. font-weight: 500;
  1810. line-height: 40px;
  1811. margin-bottom: 32px;
  1812. text-align: center;
  1813. &.success-text {
  1814. font-size: 24px;
  1815. font-weight: 500;
  1816. }
  1817. }
  1818. .main-text {
  1819. color: #2199f8;
  1820. }
  1821. .create-farm-btn {
  1822. width: 100%;
  1823. box-sizing: border-box;
  1824. padding: 8px;
  1825. border-radius: 25px;
  1826. font-size: 16px;
  1827. background: #2199f8;
  1828. color: #fff;
  1829. text-align: center;
  1830. }
  1831. }
  1832. </style>