pageTwo.vue 28 KB

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