pageTwo.vue 27 KB

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