pageTwo.vue 27 KB

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