pageTwo.vue 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853
  1. <template>
  2. <view class="page-container">
  3. <view class="card_wrap">
  4. <view class="address-section">
  5. <view class="address-header">
  6. <u-icon name="map" size="36rpx" color="#108cff" class="location-icon"></u-icon>
  7. <text class="address-title">上门地址</text>
  8. </view>
  9. <view class="address-content">
  10. <text class="address-text">北京市朝阳区建国路88号SOHO现代城A座2301室</text>
  11. </view>
  12. </view>
  13. </view>
  14. <view class="card_wrap checklist-card">
  15. <view class="checklist-section">
  16. <u-checkbox-group v-model="selectedCheckbox" placement="column">
  17. <view class="checklist-item">
  18. <view class="checkbox-text-container">
  19. <u-checkbox name="contact师傅" size="40rpx" color="#108cff" />
  20. <text class="checklist-text">联系师傅</text>
  21. </view>
  22. <u-input v-if="selectedCheckbox.includes('contact师傅')" v-model="formData.contactPhone"
  23. placeholder="请输入师傅手机号" size="default" class="checklist-input" />
  24. </view>
  25. <view class="checklist-item">
  26. <view class="checkbox-text-container">
  27. <u-checkbox name="photo技巧" size="40rpx" color="#108cff" />
  28. <text class="checklist-text">师傅拍图技巧</text>
  29. </view>
  30. <u-input v-if="selectedCheckbox.includes('photo技巧')" v-model="formData.photoTips"
  31. type="textarea" placeholder="请输入拍图技巧" rows="3" class="checklist-textarea" />
  32. <!-- 上传图片按钮 -->
  33. <view v-if="selectedCheckbox.includes('photo技巧')" class="upload-btn-container">
  34. <div class="upload-btn" @click="chooseImage('photoTips')">
  35. <u-icon name="camera" size="32rpx" color="#108cff"></u-icon>
  36. <text class="upload-btn-text">上传图片</text>
  37. </div>
  38. </view>
  39. <!-- 图片显示区域 -->
  40. <view v-if="selectedCheckbox.includes('photo技巧') && photoTipsImages.length > 0"
  41. class="image-list">
  42. <view v-for="(image, index) in photoTipsImages" :key="index" class="image-item"
  43. @click="previewImageHandler(image, 'photoTips')">
  44. <image :src="image" mode="aspectFill" class="image-thumb"></image>
  45. </view>
  46. </view>
  47. </view>
  48. <view class="checklist-item">
  49. <view class="checkbox-text-container">
  50. <u-checkbox name="face2face" size="40rpx" color="#108cff" />
  51. <text class="checklist-text">到达客户面对面</text>
  52. </view>
  53. <u-input v-if="selectedCheckbox.includes('face2face')" v-model="formData.face2faceNotes"
  54. type="textarea" placeholder="请输入备注信息" rows="3" class="checklist-textarea" />
  55. <!-- 上传图片按钮 -->
  56. <view v-if="selectedCheckbox.includes('face2face')" class="upload-btn-container">
  57. <div class="upload-btn" @click="chooseImage('face2face')">
  58. <u-icon name="camera" size="32rpx" color="#108cff"></u-icon>
  59. <text class="upload-btn-text">上传图片</text>
  60. </div>
  61. </view>
  62. <!-- 图片显示区域 -->
  63. <view v-if="selectedCheckbox.includes('face2face') && face2faceImages.length > 0"
  64. class="image-list">
  65. <view v-for="(image, index) in face2faceImages" :key="index" class="image-item"
  66. @click="previewImageHandler(image, 'face2face')">
  67. <image :src="image" mode="aspectFill" class="image-thumb"></image>
  68. </view>
  69. </view>
  70. </view>
  71. </u-checkbox-group>
  72. </view>
  73. </view>
  74. <!-- 新添加的数字选择器卡片 -->
  75. <view class="card_wrap price-card">
  76. <view class="price-section">
  77. <view class="price-picker-container">
  78. <!-- 上方快速操作按钮 -->
  79. <view class="quick-actions top-actions">
  80. <div class="quick-btn increase" @click="quickChangePrice(100)">+100</div>
  81. <div class="quick-btn increase" @click="quickChangePrice(1000)">+1000</div>
  82. </view>
  83. <!-- 数字选择器 -->
  84. <view class="number-box-container">
  85. <view class="price-input-box">
  86. <text class="price-label">核准价¥</text>
  87. <input type="number" v-model="approvedPrice" class="price-input" placeholder="0" min="0"
  88. @input="onPriceInput" />
  89. </view>
  90. </view>
  91. <!-- 下方快速操作按钮 -->
  92. <view class="quick-actions bottom-actions">
  93. <div class="quick-btn decrease" @click="quickChangePrice(-100)">-100</div>
  94. <div class="quick-btn decrease" @click="quickChangePrice(-1000)">-1000</div>
  95. </view>
  96. </view>
  97. </view>
  98. </view>
  99. <!-- 新添加的高清细节图上传卡片 -->
  100. <view class="card_wrap detail-image-card">
  101. <view class="detail-image-section">
  102. <div class="detail-image-header">
  103. <div class="detail-image-title">上传高清细节图(支持多选)</div>
  104. <div class="copy-btn" @click="copyAllDetailImages">
  105. <text>一键复制</text>
  106. </div>
  107. </div>
  108. <div class="detail-image-upload-container">
  109. <view class="detail-image-list">
  110. <view class="detail-image-item" v-for="(item, index) in detailImages" :key="'detail-' + index">
  111. <pic-comp :src="item"></pic-comp>
  112. <view class="detail-delete-btn" @click="deleteDetailImage(index)">×</view>
  113. </view>
  114. <view class="detail-upload-btn" @click="uploadDetailImage">
  115. <u-icon name="plus" size="40rpx" color="#999"></u-icon>
  116. </view>
  117. </view>
  118. </div>
  119. </view>
  120. </view>
  121. <u-button @click="handleNextClick" type="primary" size="middle" style="border-radius: 20rpx;">下一步</u-button>
  122. </view>
  123. </template>
  124. <script>
  125. import picComp from './picComp.vue'
  126. export default {
  127. props: {
  128. orderDetail: {
  129. type: Object,
  130. default: () => { },
  131. }
  132. },
  133. watch: {
  134. orderDetail: {
  135. handler(newVal, oldVal) {
  136. if (newVal) {
  137. this.approvedPrice = newVal.itemPrice || 0;
  138. }
  139. },
  140. deep: true,
  141. }
  142. },
  143. components: {
  144. picComp
  145. },
  146. data() {
  147. return {
  148. selectedCheckbox: [],
  149. formData: {
  150. contactPhone: '',
  151. photoTips: '',
  152. face2faceNotes: ''
  153. },
  154. // 图片相关数据
  155. photoTipsImages: [], // 师傅技巧图片数组
  156. face2faceImages: [], // 到达客户面对面图片数组
  157. // 全屏预览相关
  158. previewImage: '', // 当前预览的图片
  159. showPreview: false, // 是否显示全屏预览
  160. // 核准价格相关
  161. approvedPrice: 0, // 核准价格初始值
  162. // 高清细节图相关
  163. detailImages: [] // 高清细节图数组
  164. };
  165. },
  166. methods: {
  167. // 选择图片方法
  168. chooseImage(type) {
  169. uni.chooseImage({
  170. count: 9, // 最多选择9张图片
  171. sizeType: ['original', 'compressed'], // 原图或压缩图
  172. sourceType: ['album', 'camera'], // 从相册或相机选择
  173. success: (res) => {
  174. const tempFilePaths = res.tempFilePaths;
  175. // 根据类型将图片添加到对应的数组
  176. if (type === 'photoTips') {
  177. this.photoTipsImages = [...this.photoTipsImages, ...tempFilePaths];
  178. } else if (type === 'face2face') {
  179. this.face2faceImages = [...this.face2faceImages, ...tempFilePaths];
  180. }
  181. },
  182. fail: (err) => {
  183. console.error('选择图片失败:', err);
  184. uni.showToast({
  185. title: '选择图片失败',
  186. icon: 'none'
  187. });
  188. }
  189. });
  190. },
  191. // 图片预览方法
  192. previewImageHandler(image, type) {
  193. let currentIndex = 0;
  194. let imageList = [];
  195. // 根据类型获取对应的图片数组
  196. if (type === 'photoTips') {
  197. imageList = this.photoTipsImages;
  198. currentIndex = imageList.indexOf(image);
  199. } else if (type === 'face2face') {
  200. imageList = this.face2faceImages;
  201. currentIndex = imageList.indexOf(image);
  202. }
  203. // 使用uni-app的图片预览API
  204. uni.previewImage({
  205. current: currentIndex, // 当前预览图片的索引
  206. urls: imageList, // 需要预览的图片链接列表
  207. loop: true, // 是否可循环预览
  208. longPressActions: {
  209. itemList: ['保存图片'],
  210. success: function (data) {
  211. // 保存图片到相册
  212. uni.saveImageToPhotosAlbum({
  213. filePath: imageList[data.tapIndex],
  214. success: function () {
  215. uni.showToast({
  216. title: '保存成功',
  217. icon: 'success'
  218. });
  219. },
  220. fail: function (err) {
  221. console.error('保存图片失败:', err);
  222. uni.showToast({
  223. title: '保存失败',
  224. icon: 'none'
  225. });
  226. }
  227. });
  228. }
  229. }
  230. });
  231. },
  232. // 价格输入回调
  233. onPriceInput(e) {
  234. // 确保价格是数字且不小于0
  235. let value = Number(e.detail.value);
  236. if (isNaN(value)) value = 0;
  237. value = Math.max(0, value);
  238. this.approvedPrice = value;
  239. },
  240. // 快速调整价格
  241. quickChangePrice(amount) {
  242. let newPrice = this.approvedPrice + amount;
  243. // 确保价格不小于0
  244. newPrice = Math.max(0, newPrice);
  245. this.approvedPrice = newPrice;
  246. },
  247. // 上传高清细节图
  248. uploadDetailImage() {
  249. uni.chooseImage({
  250. count: 9 - this.detailImages.length, // 最多选择9张
  251. sizeType: ['compressed'], // 压缩图片
  252. sourceType: ['album', 'camera'], // 从相册选择或拍照
  253. success: (res) => {
  254. const tempFilePaths = res.tempFilePaths;
  255. // 将图片路径添加到数组中
  256. this.detailImages = [...this.detailImages, ...tempFilePaths];
  257. },
  258. fail: (err) => {
  259. console.error('选择图片失败:', err);
  260. uni.showToast({
  261. title: '选择图片失败',
  262. icon: 'none'
  263. });
  264. }
  265. });
  266. },
  267. // 删除高清细节图
  268. deleteDetailImage(index) {
  269. uni.showModal({
  270. title: '提示',
  271. content: '确定要删除这张图片吗?',
  272. success: (res) => {
  273. if (res.confirm) {
  274. this.detailImages.splice(index, 1);
  275. }
  276. }
  277. });
  278. },
  279. // 复制所有高清细节图链接
  280. copyAllDetailImages() {
  281. if (this.detailImages.length === 0) {
  282. uni.showToast({
  283. title: '暂无图片可复制',
  284. icon: 'none'
  285. });
  286. return;
  287. }
  288. const imageUrls = this.detailImages.join('\n');
  289. uni.setClipboardData({
  290. data: imageUrls,
  291. success: () => {
  292. uni.showToast({
  293. title: '复制成功',
  294. icon: 'success'
  295. });
  296. },
  297. fail: () => {
  298. uni.showToast({
  299. title: '复制失败',
  300. icon: 'none'
  301. });
  302. }
  303. });
  304. },
  305. // 下一步按钮点击事件
  306. handleNextClick() {
  307. // 创建一个只包含被勾选checkbox对应数据的对象
  308. const result = {};
  309. // 检查联系师傅
  310. if (this.selectedCheckbox.includes('contact师傅')) {
  311. result.contactPhone = this.formData.contactPhone;
  312. }
  313. // 检查师傅拍图技巧
  314. if (this.selectedCheckbox.includes('photo技巧')) {
  315. result.photoTips = this.formData.photoTips;
  316. result.photoTipsImages = this.photoTipsImages;
  317. }
  318. // 检查到达客户面对面
  319. if (this.selectedCheckbox.includes('face2face')) {
  320. result.face2faceNotes = this.formData.face2faceNotes;
  321. result.face2faceImages = this.face2faceImages;
  322. }
  323. // 添加其他非checkbox控制的字段
  324. result.approvedPrice = this.approvedPrice;
  325. result.detailImages = this.detailImages;
  326. // result.selectedCheckbox = this.selectedCheckbox;
  327. // 打印结果对象
  328. // console.log('当前界面的选中值:', result);
  329. this.$emit('handleNextClick', {
  330. nowPage: 'formTwo',
  331. form: result,
  332. })
  333. }
  334. }
  335. };
  336. </script>
  337. <style scoped lang="scss">
  338. // 导入公共样式
  339. @import './common.scss';
  340. // 主样式
  341. .page-container {
  342. box-sizing: border-box;
  343. padding: 0;
  344. background-color: map-get($colors, bg);
  345. font-family: map-get($font, family);
  346. -webkit-font-smoothing: map-get($font, smoothing);
  347. font-smoothing: map-get($font, smoothing);
  348. }
  349. .card_wrap {
  350. @include card;
  351. margin-bottom: 20rpx;
  352. &:hover {
  353. @include shadow(2);
  354. }
  355. &.checklist-card,
  356. &.price-card,
  357. &.detail-image-card {
  358. margin-top: 20rpx;
  359. }
  360. }
  361. .address-section {
  362. padding: map-get($sizes, padding-sm) map-get($sizes, padding);
  363. }
  364. .address-header {
  365. @include flex-center;
  366. margin-bottom: map-get($sizes, margin-sm);
  367. padding-bottom: map-get($sizes, margin-sm);
  368. border-bottom: 1rpx solid map-get($colors, border);
  369. .location-icon {
  370. margin-right: map-get($sizes, margin-xs);
  371. background-color: map-get($colors, primary-light);
  372. padding: map-get($sizes, icon-padding);
  373. border-radius: 50%;
  374. flex-shrink: 0;
  375. }
  376. .address-title {
  377. margin-left: 16rpx;
  378. }
  379. }
  380. .address-content {
  381. .address-text {
  382. @include font-styles;
  383. }
  384. }
  385. // 复选框卡片样式
  386. .checklist-card {
  387. margin-top: 20rpx;
  388. }
  389. .checklist-section {
  390. padding: map-get($sizes, padding-sm) map-get($sizes, padding);
  391. display: block;
  392. /* 明确设置为块级元素,避免任何flex影响 */
  393. }
  394. .checklist-item {
  395. display: block;
  396. /* 明确设置为块级元素,确保垂直排列 */
  397. width: 100%;
  398. /* 确保占满整个宽度 */
  399. padding: 16rpx 0;
  400. border-bottom: 1rpx solid map-get($colors, border);
  401. margin-bottom: 0;
  402. /* 移除任何可能的margin影响 */
  403. &:first-child {
  404. padding-top: 0;
  405. }
  406. &:last-child {
  407. padding-bottom: 0;
  408. border-bottom: none;
  409. }
  410. // 复选框和文本的容器
  411. .checkbox-text-container {
  412. @include flex-center;
  413. display: flex;
  414. align-items: center;
  415. }
  416. }
  417. // u-checkbox样式调整
  418. u-checkbox {
  419. margin-right: 16rpx;
  420. flex-shrink: 0;
  421. vertical-align: middle;
  422. }
  423. // 隐藏原生checkbox样式
  424. .checkbox {
  425. display: none;
  426. }
  427. .checklist-text {
  428. @include font-styles;
  429. vertical-align: middle;
  430. }
  431. // 输入框样式
  432. .checklist-input,
  433. .checklist-textarea {
  434. margin-top: 12rpx;
  435. margin-left: 56rpx; // 与复选框对齐
  436. width: calc(100% - 72rpx); // 减去左边距和额外的16rpx边距,确保不超出边界
  437. max-width: calc(100% - 72rpx); // 确保最大宽度也不超出
  438. box-sizing: border-box; // 确保padding和border不影响总宽度
  439. border-radius: 8rpx;
  440. border: 1rpx solid #e5e7eb;
  441. padding: 12rpx 16rpx;
  442. font-size: 28rpx;
  443. background-color: #f9fafb;
  444. transition: all 0.2s ease;
  445. &:focus {
  446. border-color: map-get($colors, primary);
  447. background-color: #ffffff;
  448. box-shadow: 0 0 0 2rpx rgba(16, 140, 255, 0.1);
  449. }
  450. }
  451. .checklist-textarea {
  452. min-height: 160rpx;
  453. resize: vertical;
  454. vertical-align: top;
  455. padding-top: 16rpx;
  456. padding-bottom: 16rpx;
  457. }
  458. // 解决textarea文本和placeholder居中问题
  459. // 直接穿透u-input组件的所有层级
  460. :deep(.checklist-textarea) {
  461. & .u-input__textarea {
  462. display: block !important;
  463. height: auto !important;
  464. min-height: 160rpx !important;
  465. padding: 16rpx !important;
  466. text-align: left !important;
  467. }
  468. & .u-input__textarea textarea {
  469. display: block !important;
  470. width: 100% !important;
  471. height: auto !important;
  472. min-height: 128rpx !important;
  473. padding: 0 !important;
  474. margin: 0 !important;
  475. text-align: left !important;
  476. vertical-align: top !important;
  477. line-height: 1.5 !important;
  478. resize: vertical !important;
  479. }
  480. // 确保输入的文本顶部对齐
  481. & .u-input__textarea textarea:focus {
  482. text-align: left !important;
  483. vertical-align: top !important;
  484. }
  485. // 针对不同浏览器的placeholder样式
  486. & .u-input__textarea textarea::-webkit-input-placeholder {
  487. text-align: left !important;
  488. vertical-align: top !important;
  489. line-height: 1.5 !important;
  490. }
  491. & .u-input__textarea textarea::-moz-placeholder {
  492. text-align: left !important;
  493. vertical-align: top !important;
  494. line-height: 1.5 !important;
  495. }
  496. & .u-input__textarea textarea:-ms-input-placeholder {
  497. text-align: left !important;
  498. vertical-align: top !important;
  499. line-height: 1.5 !important;
  500. }
  501. & .u-input__textarea textarea::placeholder {
  502. text-align: left !important;
  503. vertical-align: top !important;
  504. line-height: 1.5 !important;
  505. }
  506. }
  507. // 上传按钮容器样式
  508. .upload-btn-container {
  509. margin-top: 16rpx;
  510. margin-left: 56rpx;
  511. display: inline-block;
  512. }
  513. // 上传按钮样式
  514. .upload-btn {
  515. display: flex;
  516. align-items: center;
  517. justify-content: center;
  518. gap: 12rpx;
  519. font-size: 30rpx;
  520. padding: 20rpx 40rpx;
  521. border-radius: 8rpx;
  522. background-color: map-get($colors, bg);
  523. border: 2rpx dashed map-get($colors, primary);
  524. color: map-get($colors, primary);
  525. transition: all 0.3s ease;
  526. cursor: pointer;
  527. min-width: 200rpx;
  528. box-sizing: border-box;
  529. &:hover {
  530. background-color: map-get($colors, primary-light);
  531. border-color: darken(map-get($colors, primary), 10%);
  532. transform: translateY(-2rpx);
  533. box-shadow: 0 4rpx 16rpx rgba(16, 140, 255, 0.15);
  534. }
  535. &:active {
  536. transform: translateY(0);
  537. }
  538. }
  539. .upload-btn-text {
  540. color: map-get($colors, primary);
  541. @include font-styles($size: small, $weight: medium);
  542. }
  543. // 图片列表样式
  544. .image-list {
  545. margin-top: 16rpx;
  546. margin-left: 56rpx;
  547. display: flex;
  548. flex-wrap: wrap;
  549. gap: 16rpx;
  550. padding-bottom: 8rpx;
  551. }
  552. // 图片项样式
  553. .image-item {
  554. width: 120rpx;
  555. height: 120rpx;
  556. border-radius: 8rpx;
  557. overflow: hidden;
  558. background-color: map-get($colors, bg);
  559. @include shadow(1);
  560. transition: all 0.3s ease;
  561. cursor: pointer;
  562. position: relative;
  563. &:hover {
  564. @include shadow(2);
  565. transform: translateY(-2rpx);
  566. }
  567. }
  568. // 图片缩略图样式
  569. .image-thumb {
  570. width: 100%;
  571. height: 100%;
  572. object-fit: cover;
  573. }
  574. // 价格卡片样式
  575. .price-card {
  576. margin-top: 20rpx;
  577. }
  578. .price-section {
  579. padding: map-get($sizes, padding-sm) map-get($sizes, padding);
  580. }
  581. .detail-image-card {
  582. margin-top: 20rpx;
  583. }
  584. .detail-image-section {
  585. padding: map-get($sizes, padding-sm) map-get($sizes, padding);
  586. }
  587. .detail-image-header {
  588. display: flex;
  589. justify-content: space-between;
  590. align-items: center;
  591. margin-bottom: map-get($sizes, margin-sm);
  592. padding-bottom: map-get($sizes, margin-sm);
  593. border-bottom: 1rpx solid map-get($colors, border);
  594. }
  595. .detail-image-title {
  596. @include font-styles($size: content, $weight: bold, $color: primary);
  597. }
  598. .copy-btn {
  599. border-radius: 20rpx;
  600. border: 1rpx solid #007AFF;
  601. background-color: transparent;
  602. color: #007AFF;
  603. @include font-styles($size: small, $weight: regular);
  604. padding: 0 24rpx;
  605. height: 64rpx;
  606. line-height: 64rpx;
  607. display: flex;
  608. align-items: center;
  609. gap: 8rpx;
  610. cursor: pointer;
  611. user-select: none;
  612. transition: all 0.3s ease;
  613. &:hover {
  614. background-color: rgba(0, 122, 255, 0.05);
  615. }
  616. &:active {
  617. transform: scale(0.98);
  618. }
  619. }
  620. .detail-image-upload-container {
  621. margin-top: 20rpx;
  622. }
  623. .detail-image-list {
  624. display: flex;
  625. flex-wrap: wrap;
  626. gap: 20rpx;
  627. }
  628. .detail-image-item {
  629. position: relative;
  630. width: 200rpx;
  631. height: 200rpx;
  632. box-sizing: border-box;
  633. }
  634. .detail-delete-btn {
  635. position: absolute;
  636. top: -10rpx;
  637. right: -10rpx;
  638. width: 40rpx;
  639. height: 40rpx;
  640. background-color: #ff4d4f;
  641. color: #fff;
  642. border-radius: 50%;
  643. display: flex;
  644. align-items: center;
  645. justify-content: center;
  646. @include font-styles($size: small, $weight: bold);
  647. z-index: 10;
  648. }
  649. .detail-upload-btn {
  650. width: 200rpx;
  651. height: 200rpx;
  652. border: 8rpx dashed #ddd;
  653. border-radius: 30rpx;
  654. display: flex;
  655. align-items: center;
  656. justify-content: center;
  657. background-color: #f9f9f9;
  658. box-sizing: border-box;
  659. }
  660. .price-picker-container {
  661. display: flex;
  662. flex-direction: column;
  663. align-items: center;
  664. padding: 20rpx 0;
  665. }
  666. // 快速操作按钮样式
  667. .quick-actions {
  668. display: flex;
  669. justify-content: center;
  670. gap: 16rpx;
  671. margin: 16rpx 0;
  672. width: 100%;
  673. max-width: 800rpx;
  674. }
  675. .quick-btn {
  676. flex: 1;
  677. border-radius: 12rpx;
  678. font-size: 36rpx;
  679. padding: 32rpx 0;
  680. min-width: 0;
  681. text-align: center;
  682. color: #ffffff;
  683. font-weight: 600;
  684. transition: all 0.3s ease;
  685. box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.1);
  686. cursor: pointer;
  687. }
  688. .quick-btn.increase {
  689. background-color: #e6f7ed;
  690. color: #00b42a;
  691. }
  692. .quick-btn.decrease {
  693. background-color: #fff1f0;
  694. color: #f53f3f;
  695. }
  696. .quick-btn:hover {
  697. opacity: 0.9;
  698. transform: translateY(-2rpx);
  699. box-shadow: 0 6rpx 16rpx rgba(0, 0, 0, 0.15);
  700. }
  701. // 数字选择器容器
  702. .number-box-container {
  703. display: flex;
  704. align-items: center;
  705. gap: 16rpx;
  706. margin: 20rpx 0;
  707. width: 100%;
  708. justify-content: center;
  709. white-space: nowrap;
  710. }
  711. // 价格输入框盒子
  712. .price-input-box {
  713. flex: 1;
  714. max-width: 800rpx;
  715. background-color: #f5f7fa;
  716. border: 2rpx solid #e5e7eb;
  717. border-radius: 12rpx;
  718. padding: 20rpx 24rpx;
  719. box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.05);
  720. display: flex;
  721. align-items: center;
  722. justify-content: space-between;
  723. white-space: nowrap;
  724. min-width: 300rpx;
  725. }
  726. // 价格标签样式
  727. .price-label {
  728. font-size: 36rpx;
  729. color: map-get($colors, text-primary);
  730. font-weight: 700;
  731. min-width: 120rpx;
  732. flex-shrink: 0;
  733. margin-right: 16rpx;
  734. letter-spacing: 1rpx;
  735. font-family: map-get($font, family);
  736. }
  737. // 价格输入框样式
  738. .price-input {
  739. width: 100%;
  740. height: auto;
  741. border: none;
  742. outline: none;
  743. background-color: transparent;
  744. text-align: right;
  745. font-size: 48rpx;
  746. font-weight: 600;
  747. color: map-get($colors, text-primary);
  748. padding: 0 10rpx;
  749. box-sizing: border-box;
  750. -webkit-appearance: none;
  751. -moz-appearance: textfield;
  752. /* 使用等宽字体显示带斜线的0 */
  753. font-family: Consolas, 'Courier New', monospace, -apple-system, BlinkMacSystemFont;
  754. }
  755. // 移除数字输入框的上下箭头
  756. .price-input::-webkit-inner-spin-button,
  757. .price-input::-webkit-outer-spin-button {
  758. -webkit-appearance: none;
  759. margin: 0;
  760. }
  761. .price-input:focus {
  762. background-color: transparent;
  763. }
  764. </style>