pageTwo.vue 28 KB

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