pageTwo.vue 27 KB

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