priceSheetPopup.vue 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826
  1. <template>
  2. <popup class="price-sheet-popup" :overlay-style="{'z-index': 9999}" v-model:show="showPopup" teleport="body">
  3. <div class="price-sheet-content">
  4. <div class="price-sheet-content-inner" ref="contentEl">
  5. <!-- 顶部标题区域 -->
  6. <div class="header-section">
  7. <div class="header-left">
  8. <div class="main-title">服务报价单</div>
  9. </div>
  10. <div class="header-right">
  11. <div class="qr-icon">
  12. <img src="@/assets/img/home/qrcode.png" alt="" />
  13. </div>
  14. <div class="qr-text">扫码查看详情</div>
  15. </div>
  16. </div>
  17. <div class="sheet-content" v-loading="loading">
  18. <!-- 报价详情区域 -->
  19. <div class="quotation-info">
  20. <div class="info-item">
  21. <span class="info-label">报价组织</span>
  22. <span class="info-value">{{ priceData.agriculturalName || '--' }}</span>
  23. </div>
  24. <div class="info-item">
  25. <span class="info-label">报价农事</span>
  26. <span class="info-value">{{ priceData?.name || '--' }}</span>
  27. </div>
  28. <div class="info-item">
  29. <span class="info-label">执行时间</span>
  30. <span class="info-value">{{ priceData?.executeDate || quotationData?.executeDate || '--' }}</span>
  31. </div>
  32. <div class="info-item catalog-label">
  33. <span class="info-label">报价目录</span>
  34. <div class="edit-btn-box">
  35. <div class="edit-btn" @click="handleEdit">编辑报价</div>
  36. </div>
  37. </div>
  38. <div class="total-bar">
  39. <span class="total-label">报价合计:</span>
  40. <span class="total-value">{{ totalCost ? formatArea(totalCost) : "--" }}</span>
  41. <span class="total-unit">元</span>
  42. </div>
  43. </div>
  44. <!-- 药肥费用区域 -->
  45. <div class="fertilizer-cost-section">
  46. <div class="section-header">
  47. <div class="section-title">药肥费用</div>
  48. <div class="section-total">{{ pesticideCostTotal ? formatArea(pesticideCostTotal) : "--" }}<span class="unit-text">元</span></div>
  49. </div>
  50. <div class="cost-table">
  51. <div class="table-header">
  52. <div class="col-1">类型</div>
  53. <div class="col-2">名称</div>
  54. <div class="col-3">品牌</div>
  55. <div class="col-4">单价</div>
  56. <div class="col-5">用量</div>
  57. <div class="col-6">总价</div>
  58. </div>
  59. <div
  60. class="table-row"
  61. v-for="(item, index) in priceData?.prescription?.pesticideFertilizerList || []"
  62. :key="index"
  63. >
  64. <div class="col-1">{{ item.typeName || '--' }}</div>
  65. <div class="col-2">{{ item.name || item.pesticideFertilizerName || '--' }}</div>
  66. <div class="col-3">{{ item.brand || '--' }}</div>
  67. <div class="col-4">{{ item.price || '--' }}</div>
  68. <div class="col-5">{{ item.dosage ? item.dosage + item.unit : '--' }}</div>
  69. <div class="col-6">{{ getTotal(item) }}</div>
  70. </div>
  71. </div>
  72. </div>
  73. <!-- 服务费用区域 -->
  74. <div class="service-cost-section">
  75. <div class="section-header">
  76. <div class="section-title">服务费用</div>
  77. <div class="section-total">{{ priceData?.serviceMuPrice ? serviceCostTotal : '--' }}<span class="unit-text">元</span></div>
  78. </div>
  79. <div class="service-details">
  80. <div class="detail-item">
  81. <div class="detail-value">{{ priceData?.executionMethodName || '人工' }}</div>
  82. <div class="detail-label">执行方式</div>
  83. </div>
  84. <div class="detail-item">
  85. <div class="detail-value">{{ (priceData?.serviceMuPrice ? priceData?.serviceMuPrice + '元/亩' : '--') }}</div>
  86. <div class="detail-label">亩单价</div>
  87. </div>
  88. <div class="detail-item">
  89. <div class="detail-value">{{ priceData?.farm?.mianji ? (formatArea(priceData?.farm?.mianji) + '亩') : '--' }}</div>
  90. <div class="detail-label">亩数</div>
  91. </div>
  92. </div>
  93. </div>
  94. </div>
  95. </div>
  96. <!-- 底部操作按钮 -->
  97. <div class="bottom-actions" @click.stop="showPopup = false">
  98. <div class="action-buttons">
  99. <!-- <div class="action-btn blue-btn" @click.stop="handleShare">
  100. <div class="icon-circle">
  101. <img src="@/assets/img/home/bird.png" alt="" />
  102. </div>
  103. <span class="btn-label">飞鸟用户</span>
  104. </div> -->
  105. <div class="action-btn green-btn" @click.stop="handleWechat">
  106. <div class="icon-circle">
  107. <img src="@/assets/img/home/wechat.png" alt="" />
  108. </div>
  109. <span class="btn-label">微信</span>
  110. </div>
  111. <div class="action-btn orange-btn" @click.stop="handleSaveImage">
  112. <div class="icon-circle">
  113. <el-icon :size="24"><Download /></el-icon>
  114. </div>
  115. <span class="btn-label">保存图片</span>
  116. </div>
  117. </div>
  118. <div class="cancel-btn" @click="handleCancel">取消</div>
  119. </div>
  120. </div>
  121. </popup>
  122. </template>
  123. <script setup>
  124. import { Popup } from "vant";
  125. import { ref, computed, onActivated, watch } from "vue";
  126. import { useRouter, useRoute } from "vue-router";
  127. import { ElMessage } from "element-plus";
  128. import wx from "weixin-js-sdk";
  129. import html2canvas from "html2canvas";
  130. import { formatArea } from "@/common/commonFun";
  131. const router = useRouter();
  132. const route = useRoute();
  133. const showPopup = ref(false);
  134. const contentEl = ref(null);
  135. // 报价数据
  136. const quotationData = ref({});
  137. const priceData = ref({});
  138. onActivated(() => {
  139. if (ids.value?.id) {
  140. getDetail();
  141. }
  142. })
  143. const getTotal = (item) => {
  144. const price = Number(item?.price ?? 0);
  145. const dosage = Number(item?.dosage ?? 0);
  146. const area = Number(priceData.value?.farm?.mianji ?? 0);
  147. if (!price || !dosage || !area) return '--';
  148. return (price * dosage * area).toFixed(2);
  149. }
  150. // 药肥费用总计:∑(单价 * 单亩用量 * 亩数)
  151. const pesticideCostTotal = computed(() => {
  152. const list = priceData.value?.prescription?.pesticideFertilizerList || [];
  153. const area = Number(priceData.value?.farm?.mianji || 0);
  154. if (!list.length || !area) return 0;
  155. const sum = list.reduce((acc, item) => {
  156. const price = Number(item?.price || 0);
  157. const dosage = Number(item?.dosage || 0);
  158. if (!price || !dosage) return acc;
  159. return acc + price * dosage * area;
  160. }, 0);
  161. return Number(sum.toFixed(2));
  162. });
  163. // 报价合计 = 药肥费用 + 服务费用
  164. const totalCost = computed(() => {
  165. const pesticide = Number(pesticideCostTotal.value || 0);
  166. const service = Number(serviceCostTotal.value || 0);
  167. if (!pesticide && !service) return '--';
  168. return Number((pesticide + service).toFixed(2));
  169. });
  170. const ids = ref({});
  171. const handleShowPopup = ({id, farmId}) => {
  172. if (id) {
  173. loading.value = true;
  174. ids.value = {id, farmId};
  175. getDetail();
  176. }
  177. showPopup.value = true;
  178. };
  179. const loading = ref(false);
  180. function fetchPriceData(id) {
  181. // VE_API.z_farm_work_record_cost.getByRecordId({ farmWorkRecordId: quotationData.value.id }).then(({ data }) => {
  182. // priceData.value = data;
  183. // }).catch(() => {
  184. // // 获取价格数据失败
  185. // }).finally(() => {
  186. // loading.value = false;
  187. // });
  188. }
  189. const userInfoStr = localStorage.getItem("localUserInfo");
  190. const userInfo = userInfoStr ? JSON.parse(userInfoStr) : {};
  191. const getDetail = async () => {
  192. const { id, farmId } = ids.value;
  193. const { data, code } = await VE_API.farm.getFarmWorkLib({ id, farmId, agriculturalId: userInfo?.agriculturalId });
  194. if(code === 0) {
  195. priceData.value = data;
  196. const pesticideFertilizerCodes = data?.prescription?.pesticideFertilizerList.map(item => item.code);
  197. getPriceList(data.schemeId, pesticideFertilizerCodes);
  198. loading.value = false;
  199. }
  200. }
  201. const getPriceList = async (schemeId, pesticideFertilizerCodes) => {
  202. const { data } = await VE_API.farm.getPriceList({ schemeId, pesticideFertilizerCodes });
  203. if (!data || !Array.isArray(data)) return;
  204. priceData.value.prescription.pesticideFertilizerList.forEach((item) => {
  205. const priceInfo = data.find((p) => p.pesticideFertilizerCode === item.code);
  206. if (!priceInfo) return;
  207. item.price = priceInfo.price ?? item.price;
  208. item.brand = priceInfo.brand ?? item.brand;
  209. });
  210. };
  211. // 检查 itemsList 是否都有价格和品牌
  212. function checkItemsListHasPrice() {
  213. if (!priceData.value?.prescription?.pesticideFertilizerList || !Array.isArray(priceData.value.prescription.pesticideFertilizerList) || priceData.value.prescription.pesticideFertilizerList.length === 0) {
  214. return false;
  215. }
  216. // 检查所有项是否都有 price 且 price 不为 0,以及 brand 有值
  217. return priceData.value.prescription.pesticideFertilizerList.every(item => {
  218. const hasPrice = item.price != null && item.price !== '' && item.price !== 0;
  219. const hasBrand = item.brand && item.brand.trim() !== '';
  220. return hasPrice && hasBrand;
  221. });
  222. }
  223. async function checkOrder() {
  224. // 如果没有 id,需要检查 itemsList 是否都有价格
  225. if (!checkItemsListHasPrice()) {
  226. return false; // 没有价格,返回 false
  227. }
  228. // 有 id 且都有价格,返回 true
  229. return true;
  230. }
  231. const handleShare = async () => {
  232. // 检查订单状态,如果返回 false 说明数据不完整
  233. const canProceed = await checkOrder();
  234. if (!canProceed) {
  235. ElMessage.warning('请补全报价数据');
  236. setTimeout(() => {
  237. handleEdit();
  238. }, 1000);
  239. return;
  240. }
  241. const userId = priceData.value.farmMiniUserId;
  242. const parmasPage = {
  243. farmWorkOrderId:priceData.value.orderId,
  244. farmMiniUserId:userId,
  245. farmMiniUserName:priceData.value.farmMiniUserName,
  246. farmId:priceData.value.farmId,
  247. farmWorkName:priceData.value.farmWorkName,
  248. id:priceData.value.id,
  249. type:'quotation'
  250. }
  251. if(userId){
  252. router.push(`/chat_frame?userId=${userId}&farmId=${parmasPage.farmId}&pageParams=${JSON.stringify(parmasPage)}`);
  253. }else{
  254. ElMessage.warning('尚未绑定用户,暂时无法分享')
  255. }
  256. };
  257. const handleWechat = async () => {
  258. // 检查订单状态,如果返回 false 说明数据不完整
  259. const canProceed = await checkItemsListHasPrice();
  260. if (!canProceed) {
  261. ElMessage.warning('请补全报价数据');
  262. return;
  263. }
  264. // router.push({
  265. // path: "/completed_work",
  266. // query: { id: quotationData.value.id, farmWorkOrderId: quotationData.value.orderId, isAssign: true },
  267. // });
  268. const query = { askInfo: {title: "服务报价单", content: "是否分享该服务报价单给好友"}, shareText: "向您发送了一张 服务报价单", id: quotationData.value.id, farmWorkOrderId: quotationData.value.orderId, isAssign: true }
  269. wx.miniProgram.navigateTo({
  270. url: `/pages/subPages/share_page/index?pageParams=${JSON.stringify(query)}&type=priceSheet`,
  271. });
  272. };
  273. // 服务费用总计(数值):亩单价 * 亩数
  274. const serviceCostTotal = computed(() => {
  275. const price = Number(priceData.value?.serviceMuPrice || 0);
  276. const area = Number(priceData.value?.farm?.mianji || 0);
  277. if (!price || !area) return 0;
  278. return Number((price * area).toFixed(2));
  279. });
  280. const handleSaveImage = async () => {
  281. try {
  282. if (!contentEl.value) return;
  283. const element = contentEl.value;
  284. const scroller = element.querySelector('.sheet-content');
  285. // 记录原样式
  286. const prev = {
  287. elementOverflow: element.style.overflow,
  288. elementMaxHeight: element.style.maxHeight,
  289. elementHeight: element.style.height,
  290. scrollerOverflow: scroller ? scroller.style.overflow : undefined,
  291. scrollerMaxHeight: scroller ? scroller.style.maxHeight : undefined,
  292. scrollerHeight: scroller ? scroller.style.height : undefined,
  293. };
  294. // 展开内容,去除滚动限制,确保截图包含全部内容
  295. element.style.overflow = 'visible';
  296. element.style.maxHeight = 'none';
  297. element.style.height = 'auto';
  298. if (scroller) {
  299. scroller.style.overflow = 'visible';
  300. scroller.style.maxHeight = 'none';
  301. scroller.style.height = 'auto';
  302. }
  303. // 计算完整尺寸
  304. const width = element.scrollWidth;
  305. const height = element.scrollHeight;
  306. const canvas = await html2canvas(element, {
  307. backgroundColor: '#ffffff',
  308. useCORS: true,
  309. allowTaint: true,
  310. scale: Math.min(2, window.devicePixelRatio || 2),
  311. width,
  312. height,
  313. windowWidth: width,
  314. windowHeight: height,
  315. scrollX: 0,
  316. scrollY: 0,
  317. });
  318. const dataUrl = canvas.toDataURL('image/png');
  319. const link = document.createElement('a');
  320. link.href = dataUrl;
  321. link.download = '服务报价单.png';
  322. document.body.appendChild(link);
  323. link.click();
  324. document.body.removeChild(link);
  325. // 还原样式
  326. element.style.overflow = prev.elementOverflow;
  327. element.style.maxHeight = prev.elementMaxHeight;
  328. element.style.height = prev.elementHeight;
  329. if (scroller) {
  330. scroller.style.overflow = prev.scrollerOverflow;
  331. scroller.style.maxHeight = prev.scrollerMaxHeight;
  332. scroller.style.height = prev.scrollerHeight;
  333. }
  334. } catch (e) {
  335. // 保存图片失败
  336. }
  337. };
  338. const handleEdit = () => {
  339. // 编辑报价逻辑
  340. // 可以触发编辑事件或打开编辑页面
  341. const queryData = route.query?.miniJson ? JSON.parse(route.query?.miniJson) : {};
  342. router.push({
  343. path: "/modify",
  344. query: {
  345. isEdit: true,
  346. onlyPrice: true,
  347. farmId: priceData.value.farm.id,
  348. arrangeId: queryData.arrangeId,
  349. farmWorkId: priceData.value.id,
  350. },
  351. });
  352. // router.push({
  353. // path: "/price_detail",
  354. // query: { data: JSON.stringify(quotationData.value), priceData: JSON.stringify(priceData.value) },
  355. // });
  356. };
  357. // 清空数据
  358. const clearData = () => {
  359. // quotationData.value = {};
  360. // priceData.value = {};
  361. };
  362. // 监听弹窗关闭,清空数据
  363. // watch(showPopup, (newVal) => {
  364. // if (!newVal) {
  365. // clearData();
  366. // }
  367. // });
  368. const handleCancel = () => {
  369. showPopup.value = false;
  370. };
  371. defineExpose({
  372. handleShowPopup,
  373. });
  374. </script>
  375. <style lang="scss" scoped>
  376. .price-sheet-popup {
  377. z-index: 9999 !important;
  378. width: 90%;
  379. max-height: 90vh;
  380. background: none;
  381. border-radius: 12px;
  382. overflow: hidden;
  383. display: flex;
  384. flex-direction: column;
  385. backdrop-filter: 4px;
  386. ::v-deep {
  387. .van-popup__close-icon {
  388. color: #000;
  389. font-size: 18px;
  390. top: 12px;
  391. right: 12px;
  392. }
  393. }
  394. }
  395. .price-sheet-content {
  396. display: flex;
  397. flex-direction: column;
  398. max-height: 90vh;
  399. // height: 95vh;
  400. .price-sheet-content-inner {
  401. background: #fff;
  402. border-radius: 12px;
  403. display: flex;
  404. flex-direction: column;
  405. height: 100%;
  406. overflow: hidden;
  407. }
  408. }
  409. // 顶部标题区域
  410. .header-section {
  411. display: flex;
  412. justify-content: space-between;
  413. align-items: center;
  414. padding: 16px 10px 12px 16px;
  415. // background: linear-gradient(180deg, rgba(33, 153, 248, 0) 8%, rgba(139, 199, 252, 0.519) 94%, rgba(237, 241, 255, 1) 100%);
  416. background: linear-gradient(180deg, rgba(33, 153, 248, 0) 2%, rgba(139, 199, 252, 0.519) 50%, #c4e3fd);
  417. flex-shrink: 0;
  418. .header-left {
  419. flex: 1;
  420. .main-title {
  421. font-family: "PangMenZhengDao";
  422. font-size: 28px;
  423. color: #0387EF;
  424. }
  425. }
  426. .header-right {
  427. display: flex;
  428. flex-direction: column;
  429. align-items: center;
  430. margin-left: 16px;
  431. .qr-icon {
  432. color: #2199F8;
  433. margin-bottom: 4px;
  434. img {
  435. width: 40px;
  436. height: 40px;
  437. }
  438. }
  439. .qr-text {
  440. font-size: 12px;
  441. color: #171717;
  442. }
  443. }
  444. }
  445. .sheet-content {
  446. padding: 24px 16px 12px 16px;
  447. flex: 1;
  448. overflow-y: auto;
  449. overflow-x: hidden;
  450. position: relative;
  451. }
  452. // 报价详情区域
  453. .quotation-info {
  454. margin-bottom: 12px;
  455. .info-item {
  456. font-size: 16px;
  457. color: #000;
  458. margin-bottom: 8px;
  459. .info-label {
  460. padding-right: 8px;
  461. color: rgba(0, 0, 0, 0.5);
  462. }
  463. .info-value {
  464. color: #000;
  465. }
  466. &.catalog-label {
  467. font-weight: bold;
  468. margin-top: 10px;
  469. margin-bottom: 10px;
  470. position: relative;
  471. .info-label {
  472. color: #000;
  473. }
  474. }
  475. }
  476. .total-bar {
  477. display: flex;
  478. align-items: center;
  479. justify-content: center;
  480. background: rgba(33, 153, 248, 0.1);
  481. border: 1px solid rgba(33, 153, 248, 0.5);
  482. height: 38px;
  483. border-radius: 4px;
  484. .total-label {
  485. font-size: 14px;
  486. color: #000000;
  487. }
  488. .total-value {
  489. font-size: 22px;
  490. font-weight: bold;
  491. color: #2199F8;
  492. }
  493. .total-unit {
  494. font-size: 14px;
  495. color: #000;
  496. margin-left: 4px;
  497. }
  498. }
  499. }
  500. // 药肥费用区域
  501. .fertilizer-cost-section {
  502. margin-bottom: 10px;
  503. .section-header {
  504. display: flex;
  505. justify-content: space-between;
  506. align-items: center;
  507. margin-bottom: 8px;
  508. .section-title {
  509. font-size: 14px;
  510. color: #000;
  511. }
  512. .section-total {
  513. font-size: 16px;
  514. font-weight: bold;
  515. color: #000;
  516. .unit-text {
  517. padding-left: 2px;
  518. font-size: 12px;
  519. font-weight: normal;
  520. }
  521. }
  522. }
  523. .cost-table {
  524. border: 1px solid rgba(225, 225, 225, 0.5);
  525. border-radius: 5px;
  526. overflow: hidden;
  527. .table-header {
  528. display: flex;
  529. background: rgba(241, 241, 241, 0.4);
  530. padding: 8px 6px;
  531. font-size: 12px;
  532. color: #767676;
  533. border-bottom: 1px solid rgba(225, 225, 225, 0.5);
  534. .col-1 {
  535. width: 40px;
  536. text-align: center;
  537. }
  538. .col-2 {
  539. flex: 1;
  540. text-align: center;
  541. }
  542. .col-3 {
  543. width: 52px;
  544. text-align: center;
  545. }
  546. .col-4 {
  547. width: 56px;
  548. text-align: center;
  549. }
  550. .col-5 {
  551. width: 52px;
  552. text-align: center;
  553. }
  554. .col-6 {
  555. width: 52px;
  556. text-align: center;
  557. }
  558. }
  559. .table-row {
  560. display: flex;
  561. padding: 8px 6px;
  562. font-size: 11px;
  563. color: rgba(0, 0, 0, 0.6);
  564. background: #fff;
  565. border-bottom: 1px solid rgba(225, 225, 225, 0.3);
  566. &:last-child {
  567. border-bottom: none;
  568. }
  569. .col-1,
  570. .col-2,
  571. .col-3,
  572. .col-4,
  573. .col-5,
  574. .col-6 {
  575. display: flex;
  576. align-items: center;
  577. justify-content: center;
  578. }
  579. .col-1 {
  580. width: 40px;
  581. }
  582. .col-2 {
  583. flex: 1;
  584. }
  585. .col-3 {
  586. width: 52px;
  587. }
  588. .col-4 {
  589. width: 56px;
  590. }
  591. .col-5 {
  592. width: 52px;
  593. }
  594. .col-6 {
  595. width: 52px;
  596. }
  597. }
  598. }
  599. }
  600. // 服务费用区域
  601. .service-cost-section {
  602. position: relative;
  603. .section-header {
  604. display: flex;
  605. justify-content: space-between;
  606. align-items: center;
  607. margin-bottom: 12px;
  608. .section-title {
  609. font-size: 14px;
  610. color: #000;
  611. }
  612. .section-total {
  613. font-size: 16px;
  614. font-weight: bold;
  615. color: #000;
  616. .unit-text {
  617. padding-left: 2px;
  618. font-size: 12px;
  619. font-weight: normal;
  620. }
  621. }
  622. }
  623. .service-details {
  624. display: flex;
  625. align-items: center;
  626. border: 1px solid rgba(206, 206, 206, 0.5);
  627. padding: 8px 0;
  628. border-radius: 4px;
  629. margin-bottom: 10px;
  630. .detail-item {
  631. font-size: 14px;
  632. flex: 1;
  633. text-align: center;
  634. .detail-label {
  635. color: rgba(0, 0, 0, 0.2);
  636. margin-top: 6px;
  637. }
  638. .detail-value {
  639. color: rgba(0, 0, 0, 0.8);
  640. }
  641. }
  642. .detail-item + .detail-item {
  643. position: relative;
  644. &::before {
  645. content: '';
  646. position: absolute;
  647. left: 0;
  648. top: 50%;
  649. transform: translateY(-50%);
  650. width: 1px;
  651. height: 20px;
  652. background: rgba(0, 0, 0, 0.1);
  653. }
  654. }
  655. }
  656. }
  657. .edit-btn-box {
  658. display: flex;
  659. justify-content: end;
  660. position: absolute;
  661. right: 0;
  662. top: -8px;
  663. z-index: 10;
  664. }
  665. .edit-btn {
  666. background: rgba(33, 153, 248, 0.1);
  667. color: #2199F8;
  668. padding: 6px 16px;
  669. border-radius: 20px;
  670. font-size: 14px;
  671. width: fit-content;
  672. cursor: pointer;
  673. font-weight: 500;
  674. }
  675. // 底部操作按钮
  676. .bottom-actions {
  677. flex-shrink: 0;
  678. .action-buttons {
  679. padding: 16px;
  680. display: flex;
  681. justify-content: space-around;
  682. .action-btn {
  683. display: flex;
  684. flex-direction: column;
  685. align-items: center;
  686. cursor: pointer;
  687. .icon-circle {
  688. width: 48px;
  689. height: 48px;
  690. border-radius: 50%;
  691. display: flex;
  692. align-items: center;
  693. justify-content: center;
  694. color: #fff;
  695. margin-bottom: 4px;
  696. .el-icon {
  697. color: #fff;
  698. }
  699. img {
  700. width: 50px;
  701. }
  702. }
  703. &.blue-btn .icon-circle {
  704. background: #2199F8;
  705. }
  706. &.green-btn .icon-circle {
  707. background: #07C160;
  708. }
  709. &.orange-btn .icon-circle {
  710. background: #FF790B;
  711. }
  712. .btn-label {
  713. font-size: 12px;
  714. color: #fff;
  715. }
  716. }
  717. }
  718. .cancel-btn {
  719. text-align: center;
  720. font-size: 18px;
  721. color: #fff;
  722. cursor: pointer;
  723. }
  724. }
  725. </style>