pageTwo.vue 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788
  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. onPriceInput(e) {
  193. // 确保价格是数字且不小于0
  194. let value = Number(e.detail.value);
  195. if (isNaN(value)) value = 0;
  196. value = Math.max(0, value);
  197. this.approvedPrice = value;
  198. },
  199. // 快速调整价格
  200. quickChangePrice(amount) {
  201. let newPrice = this.approvedPrice + amount;
  202. // 确保价格不小于0
  203. newPrice = Math.max(0, newPrice);
  204. this.approvedPrice = newPrice;
  205. },
  206. // 复制所有高清细节图链接
  207. copyAllDetailImages() {
  208. },
  209. // 下一步按钮点击事件
  210. handleNextClick() {
  211. // 创建一个只包含被勾选checkbox对应数据的对象
  212. const result = {};
  213. // 检查联系师傅
  214. if (this.selectedCheckbox.includes('contact师傅')) {
  215. result.contactPhone = this.formData.contactPhone;
  216. }
  217. // 检查师傅拍图技巧
  218. if (this.selectedCheckbox.includes('photo技巧')) {
  219. result.photoTips = this.formData.photoTips;
  220. result.photoTipsImages = this.photoTipsImages;
  221. }
  222. // 检查到达客户面对面
  223. if (this.selectedCheckbox.includes('face2face')) {
  224. result.face2faceNotes = this.formData.face2faceNotes;
  225. result.face2faceImages = this.face2faceImages;
  226. }
  227. // 添加其他非checkbox控制的字段
  228. result.approvedPrice = this.approvedPrice;
  229. result.detailImages = this.detailImages;
  230. // result.selectedCheckbox = this.selectedCheckbox;
  231. // 打印结果对象
  232. // console.log('当前界面的选中值:', result);
  233. this.$emit('handleNextClick', {
  234. nowPage: 'formTwo',
  235. form: result,
  236. })
  237. },
  238. //获取文件列表
  239. async getList() {
  240. console.log('获取文件列表', type, orderFileType)
  241. try {
  242. const params = {
  243. clueId: this.orderDetail.clueId,
  244. sourceId: this.orderId,
  245. type: '2',
  246. orderFileType: '3',
  247. isDuplicate: '1',//先传1
  248. pageNum: 1,
  249. pageSize: 1000 // 设置一个较大的值以获取所有数据
  250. }
  251. const response = await uni.$u.api.selectClueFileByDto(params)
  252. this.detailImages = response.rows || []
  253. } catch (error) {
  254. uni.$u.toast(`获取列表失败:${error.message}`)
  255. }
  256. },
  257. // 上传高清细节图
  258. uploadDetailImage() {
  259. },
  260. // 删除高清细节图
  261. deleteDetailImage(index) {
  262. uni.showModal({
  263. title: '提示',
  264. content: '确定要删除这张图片吗?',
  265. success: (res) => {
  266. }
  267. });
  268. },
  269. }
  270. };
  271. </script>
  272. <style scoped lang="scss">
  273. // 导入公共样式
  274. @import './common.scss';
  275. // 主样式
  276. .page-container {
  277. box-sizing: border-box;
  278. padding: 0;
  279. background-color: map-get($colors, bg);
  280. font-family: map-get($font, family);
  281. -webkit-font-smoothing: map-get($font, smoothing);
  282. font-smoothing: map-get($font, smoothing);
  283. }
  284. .card_wrap {
  285. @include card;
  286. margin-bottom: 20rpx;
  287. &:hover {
  288. @include shadow(2);
  289. }
  290. &.checklist-card,
  291. &.price-card,
  292. &.detail-image-card {
  293. margin-top: 20rpx;
  294. }
  295. }
  296. .address-section {
  297. padding: map-get($sizes, padding-sm) map-get($sizes, padding);
  298. }
  299. .address-header {
  300. @include flex-center;
  301. margin-bottom: map-get($sizes, margin-sm);
  302. padding-bottom: map-get($sizes, margin-sm);
  303. border-bottom: 1rpx solid map-get($colors, border);
  304. .location-icon {
  305. margin-right: map-get($sizes, margin-xs);
  306. background-color: map-get($colors, primary-light);
  307. padding: map-get($sizes, icon-padding);
  308. border-radius: 50%;
  309. flex-shrink: 0;
  310. }
  311. .address-title {
  312. margin-left: 16rpx;
  313. }
  314. }
  315. .address-content {
  316. .address-text {
  317. @include font-styles;
  318. }
  319. }
  320. // 复选框卡片样式
  321. .checklist-card {
  322. margin-top: 20rpx;
  323. }
  324. .checklist-section {
  325. padding: map-get($sizes, padding-sm) map-get($sizes, padding);
  326. display: block;
  327. /* 明确设置为块级元素,避免任何flex影响 */
  328. }
  329. .checklist-item {
  330. display: block;
  331. /* 明确设置为块级元素,确保垂直排列 */
  332. width: 100%;
  333. /* 确保占满整个宽度 */
  334. padding: 16rpx 0;
  335. border-bottom: 1rpx solid map-get($colors, border);
  336. margin-bottom: 0;
  337. /* 移除任何可能的margin影响 */
  338. &:first-child {
  339. padding-top: 0;
  340. }
  341. &:last-child {
  342. padding-bottom: 0;
  343. border-bottom: none;
  344. }
  345. // 复选框和文本的容器
  346. .checkbox-text-container {
  347. @include flex-center;
  348. display: flex;
  349. align-items: center;
  350. }
  351. }
  352. // u-checkbox样式调整
  353. u-checkbox {
  354. margin-right: 16rpx;
  355. flex-shrink: 0;
  356. vertical-align: middle;
  357. }
  358. // 隐藏原生checkbox样式
  359. .checkbox {
  360. display: none;
  361. }
  362. .checklist-text {
  363. @include font-styles;
  364. vertical-align: middle;
  365. }
  366. // 输入框样式
  367. .checklist-input,
  368. .checklist-textarea {
  369. margin-top: 12rpx;
  370. margin-left: 56rpx; // 与复选框对齐
  371. width: calc(100% - 72rpx); // 减去左边距和额外的16rpx边距,确保不超出边界
  372. max-width: calc(100% - 72rpx); // 确保最大宽度也不超出
  373. box-sizing: border-box; // 确保padding和border不影响总宽度
  374. border-radius: 8rpx;
  375. border: 1rpx solid #e5e7eb;
  376. padding: 12rpx 16rpx;
  377. font-size: 28rpx;
  378. background-color: #f9fafb;
  379. transition: all 0.2s ease;
  380. &:focus {
  381. border-color: map-get($colors, primary);
  382. background-color: #ffffff;
  383. box-shadow: 0 0 0 2rpx rgba(16, 140, 255, 0.1);
  384. }
  385. }
  386. .checklist-textarea {
  387. min-height: 160rpx;
  388. resize: vertical;
  389. vertical-align: top;
  390. padding-top: 16rpx;
  391. padding-bottom: 16rpx;
  392. }
  393. // 解决textarea文本和placeholder居中问题
  394. // 直接穿透u-input组件的所有层级
  395. :deep(.checklist-textarea) {
  396. & .u-input__textarea {
  397. display: block !important;
  398. height: auto !important;
  399. min-height: 160rpx !important;
  400. padding: 16rpx !important;
  401. text-align: left !important;
  402. }
  403. & .u-input__textarea textarea {
  404. display: block !important;
  405. width: 100% !important;
  406. height: auto !important;
  407. min-height: 128rpx !important;
  408. padding: 0 !important;
  409. margin: 0 !important;
  410. text-align: left !important;
  411. vertical-align: top !important;
  412. line-height: 1.5 !important;
  413. resize: vertical !important;
  414. }
  415. // 确保输入的文本顶部对齐
  416. & .u-input__textarea textarea:focus {
  417. text-align: left !important;
  418. vertical-align: top !important;
  419. }
  420. // 针对不同浏览器的placeholder样式
  421. & .u-input__textarea textarea::-webkit-input-placeholder {
  422. text-align: left !important;
  423. vertical-align: top !important;
  424. line-height: 1.5 !important;
  425. }
  426. & .u-input__textarea textarea::-moz-placeholder {
  427. text-align: left !important;
  428. vertical-align: top !important;
  429. line-height: 1.5 !important;
  430. }
  431. & .u-input__textarea textarea:-ms-input-placeholder {
  432. text-align: left !important;
  433. vertical-align: top !important;
  434. line-height: 1.5 !important;
  435. }
  436. & .u-input__textarea textarea::placeholder {
  437. text-align: left !important;
  438. vertical-align: top !important;
  439. line-height: 1.5 !important;
  440. }
  441. }
  442. // 上传按钮容器样式
  443. .upload-btn-container {
  444. margin-top: 16rpx;
  445. margin-left: 56rpx;
  446. display: inline-block;
  447. }
  448. // 上传按钮样式
  449. .upload-btn {
  450. display: flex;
  451. align-items: center;
  452. justify-content: center;
  453. gap: 12rpx;
  454. font-size: 30rpx;
  455. padding: 20rpx 40rpx;
  456. border-radius: 8rpx;
  457. background-color: map-get($colors, bg);
  458. border: 2rpx dashed map-get($colors, primary);
  459. color: map-get($colors, primary);
  460. transition: all 0.3s ease;
  461. cursor: pointer;
  462. min-width: 200rpx;
  463. box-sizing: border-box;
  464. &:hover {
  465. background-color: map-get($colors, primary-light);
  466. border-color: darken(map-get($colors, primary), 10%);
  467. transform: translateY(-2rpx);
  468. box-shadow: 0 4rpx 16rpx rgba(16, 140, 255, 0.15);
  469. }
  470. &:active {
  471. transform: translateY(0);
  472. }
  473. }
  474. .upload-btn-text {
  475. color: map-get($colors, primary);
  476. @include font-styles($size: small, $weight: medium);
  477. }
  478. // 图片列表样式
  479. .image-list {
  480. margin-top: 16rpx;
  481. margin-left: 56rpx;
  482. display: flex;
  483. flex-wrap: wrap;
  484. gap: 16rpx;
  485. padding-bottom: 8rpx;
  486. }
  487. // 图片项样式
  488. .image-item {
  489. width: 120rpx;
  490. height: 120rpx;
  491. border-radius: 8rpx;
  492. overflow: hidden;
  493. background-color: map-get($colors, bg);
  494. @include shadow(1);
  495. transition: all 0.3s ease;
  496. cursor: pointer;
  497. position: relative;
  498. &:hover {
  499. @include shadow(2);
  500. transform: translateY(-2rpx);
  501. }
  502. }
  503. // 图片缩略图样式
  504. .image-thumb {
  505. width: 100%;
  506. height: 100%;
  507. object-fit: cover;
  508. }
  509. // 价格卡片样式
  510. .price-card {
  511. margin-top: 20rpx;
  512. }
  513. .price-section {
  514. padding: map-get($sizes, padding-sm) map-get($sizes, padding);
  515. }
  516. .detail-image-card {
  517. margin-top: 20rpx;
  518. }
  519. .detail-image-section {
  520. padding: map-get($sizes, padding-sm) map-get($sizes, padding);
  521. }
  522. .detail-image-header {
  523. display: flex;
  524. justify-content: space-between;
  525. align-items: center;
  526. margin-bottom: map-get($sizes, margin-sm);
  527. padding-bottom: map-get($sizes, margin-sm);
  528. border-bottom: 1rpx solid map-get($colors, border);
  529. }
  530. .detail-image-title {
  531. @include font-styles($size: content, $weight: bold, $color: primary);
  532. }
  533. .copy-btn {
  534. border-radius: 20rpx;
  535. border: 1rpx solid #007AFF;
  536. background-color: transparent;
  537. color: #007AFF;
  538. @include font-styles($size: small, $weight: regular);
  539. padding: 0 24rpx;
  540. height: 64rpx;
  541. line-height: 64rpx;
  542. display: flex;
  543. align-items: center;
  544. gap: 8rpx;
  545. cursor: pointer;
  546. user-select: none;
  547. transition: all 0.3s ease;
  548. &:hover {
  549. background-color: rgba(0, 122, 255, 0.05);
  550. }
  551. &:active {
  552. transform: scale(0.98);
  553. }
  554. }
  555. .detail-image-upload-container {
  556. margin-top: 20rpx;
  557. }
  558. .detail-image-list {
  559. display: flex;
  560. flex-wrap: wrap;
  561. gap: 20rpx;
  562. }
  563. .detail-image-item {
  564. position: relative;
  565. width: 200rpx;
  566. height: 200rpx;
  567. box-sizing: border-box;
  568. }
  569. .detail-delete-btn {
  570. position: absolute;
  571. top: -10rpx;
  572. right: -10rpx;
  573. width: 40rpx;
  574. height: 40rpx;
  575. background-color: #ff4d4f;
  576. color: #fff;
  577. border-radius: 50%;
  578. display: flex;
  579. align-items: center;
  580. justify-content: center;
  581. @include font-styles($size: small, $weight: bold);
  582. z-index: 10;
  583. }
  584. .detail-upload-btn {
  585. width: 200rpx;
  586. height: 200rpx;
  587. border: 8rpx dashed #ddd;
  588. border-radius: 30rpx;
  589. display: flex;
  590. align-items: center;
  591. justify-content: center;
  592. background-color: #f9f9f9;
  593. box-sizing: border-box;
  594. }
  595. .price-picker-container {
  596. display: flex;
  597. flex-direction: column;
  598. align-items: center;
  599. padding: 20rpx 0;
  600. }
  601. // 快速操作按钮样式
  602. .quick-actions {
  603. display: flex;
  604. justify-content: center;
  605. gap: 16rpx;
  606. margin: 16rpx 0;
  607. width: 100%;
  608. max-width: 800rpx;
  609. }
  610. .quick-btn {
  611. flex: 1;
  612. border-radius: 12rpx;
  613. font-size: 36rpx;
  614. padding: 32rpx 0;
  615. min-width: 0;
  616. text-align: center;
  617. color: #ffffff;
  618. font-weight: 600;
  619. transition: all 0.3s ease;
  620. box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.1);
  621. cursor: pointer;
  622. }
  623. .quick-btn.increase {
  624. background-color: #e6f7ed;
  625. color: #00b42a;
  626. }
  627. .quick-btn.decrease {
  628. background-color: #fff1f0;
  629. color: #f53f3f;
  630. }
  631. .quick-btn:hover {
  632. opacity: 0.9;
  633. transform: translateY(-2rpx);
  634. box-shadow: 0 6rpx 16rpx rgba(0, 0, 0, 0.15);
  635. }
  636. // 数字选择器容器
  637. .number-box-container {
  638. display: flex;
  639. align-items: center;
  640. gap: 16rpx;
  641. margin: 20rpx 0;
  642. width: 100%;
  643. justify-content: center;
  644. white-space: nowrap;
  645. }
  646. // 价格输入框盒子
  647. .price-input-box {
  648. flex: 1;
  649. max-width: 800rpx;
  650. background-color: #f5f7fa;
  651. border: 2rpx solid #e5e7eb;
  652. border-radius: 12rpx;
  653. padding: 20rpx 24rpx;
  654. box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.05);
  655. display: flex;
  656. align-items: center;
  657. justify-content: space-between;
  658. white-space: nowrap;
  659. min-width: 300rpx;
  660. }
  661. // 价格标签样式
  662. .price-label {
  663. font-size: 36rpx;
  664. color: map-get($colors, text-primary);
  665. font-weight: 700;
  666. min-width: 120rpx;
  667. flex-shrink: 0;
  668. margin-right: 16rpx;
  669. letter-spacing: 1rpx;
  670. font-family: map-get($font, family);
  671. }
  672. // 价格输入框样式
  673. .price-input {
  674. width: 100%;
  675. height: auto;
  676. border: none;
  677. outline: none;
  678. background-color: transparent;
  679. text-align: right;
  680. font-size: 48rpx;
  681. font-weight: 600;
  682. color: map-get($colors, text-primary);
  683. padding: 0 10rpx;
  684. box-sizing: border-box;
  685. -webkit-appearance: none;
  686. -moz-appearance: textfield;
  687. /* 使用等宽字体显示带斜线的0 */
  688. font-family: Consolas, 'Courier New', monospace, -apple-system, BlinkMacSystemFont;
  689. }
  690. // 移除数字输入框的上下箭头
  691. .price-input::-webkit-inner-spin-button,
  692. .price-input::-webkit-outer-spin-button {
  693. -webkit-appearance: none;
  694. margin: 0;
  695. }
  696. .price-input:focus {
  697. background-color: transparent;
  698. }
  699. </style>