展品维保小程序前端代码接口
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1038 lines
27 KiB

  1. <template>
  2. <view class="maintain-submit">
  3. <!-- 修改状态 -->
  4. <view class="status-item">
  5. <!-- 维修状态和状态选择 -->
  6. <view class="status-row">
  7. <text class="status-label">维修状态</text>
  8. <view class="status-select" @click="showStatusPicker">
  9. <text class="status-value" :class="{ placeholder: !selectedStatus }">{{ selectedStatus || '故障中' }}</text>
  10. <uv-icon name="arrow-down" size="18" color="#000"></uv-icon>
  11. </view>
  12. </view>
  13. <!-- 修改状态按钮 -->
  14. <button class="status-btn" :class="{ active: statusType === 'modify' }" @click="modifyStatus">
  15. <text class="status-text">修改状态</text>
  16. </button>
  17. </view>
  18. <!-- 保修基本信息 -->
  19. <view class="repair-info">
  20. <view class="info-header">
  21. <view class="red-line"></view>
  22. <text class="info-title">报修基本信息</text>
  23. </view>
  24. <!-- 报修日期 -->
  25. <view class="form-item">
  26. <text class="label">报修日期</text>
  27. <text class="value">{{ repairData.malfunctionDate }}</text>
  28. </view>
  29. <!-- 故障紧急程度 -->
  30. <view class="form-item">
  31. <text class="label">故障紧急程度</text>
  32. <text class="value">{{ repairData.urgency === '1' ? '紧急' : '一般' }}</text>
  33. </view>
  34. <!-- 故障情况描述 -->
  35. <view class="form-item">
  36. <text class="label">故障情况描述</text>
  37. </view>
  38. <!-- 故障情况描述文本区域 -->
  39. <view class="content-text">
  40. <uv-textarea
  41. v-model="repairData.malfunctionDesc"
  42. placeholder="展品故障描述"
  43. :maxlength="200"
  44. :show-confirm-bar="false"
  45. height="60"
  46. border="none"
  47. disabled
  48. :textStyle="{ color: '#000' }"
  49. :custom-style="{ backgroundColor: '#f5f5f5' }"
  50. ></uv-textarea>
  51. </view>
  52. <!-- 故障图片 -->
  53. <view class="form-item" v-if="!isCollapsed">
  54. <text class="label">故障图片</text>
  55. </view>
  56. <view class="image-container" v-if="!isCollapsed">
  57. <image
  58. class="uploaded-image"
  59. v-for="(img, index) in getImageList(repairData.malfunctionImage)"
  60. :key="index"
  61. :src="img.trim()"
  62. mode="aspectFill"
  63. @click="previewImage(img.trim())"
  64. ></image>
  65. </view>
  66. <!-- 故障首次发生时间 -->
  67. <view class="form-item" v-if="!isCollapsed">
  68. <text class="label">故障首次发生时间</text>
  69. <text class="value">{{ repairData.firstDate }}</text>
  70. </view>
  71. <!-- 发生频率 -->
  72. <view class="form-item" v-if="!isCollapsed">
  73. <text class="label">发生频率</text>
  74. <text class="value red-text">{{ repairData.frequency === '1' ? '间歇性问题' : '持续性问题' }}</text>
  75. </view>
  76. <!-- 故障发生频率的触发条件 -->
  77. <view class="content-text" v-if="!isCollapsed">
  78. <uv-textarea
  79. v-model="repairData.reason"
  80. placeholder="故障发生频率的触发条件"
  81. :maxlength="200"
  82. :show-confirm-bar="false"
  83. height="60"
  84. border="none"
  85. disabled
  86. :textStyle="{ color: '#000' }"
  87. :custom-style="{ backgroundColor: '#f5f5f5' }"
  88. ></uv-textarea>
  89. </view>
  90. <!-- 是否影响使用 -->
  91. <view class="form-item" v-if="!isCollapsed">
  92. <text class="label">是否影响使用</text>
  93. <text class="value red-text">{{ repairData.isAffectUse === '1' ? '是' : '否' }}</text>
  94. </view>
  95. <!-- 是否采取临时措施 -->
  96. <view class="form-item" v-if="!isCollapsed">
  97. <text class="label">是否采取临时措施</text>
  98. <text class="value red-text">{{ repairData.isTakeMeasure === '1' ? '是' : '否' }}</text>
  99. </view>
  100. <!-- 如有采取临时措施请填写措施说明 -->
  101. <view class="content-text" v-if="!isCollapsed">
  102. <uv-textarea
  103. v-model="repairData.measureDesc"
  104. placeholder="如果有采取临时措施请填写措施说明"
  105. :maxlength="200"
  106. :show-confirm-bar="false"
  107. height="60"
  108. border="none"
  109. disabled
  110. :textStyle="{ color: '#000' }"
  111. :custom-style="{ backgroundColor: '#f5f5f5' }"
  112. ></uv-textarea>
  113. </view>
  114. <!-- 是否影响体验 -->
  115. <view class="form-item" v-if="!isCollapsed">
  116. <text class="label">是否影响体验</text>
  117. <text class="value red-text">{{ repairData.isAffectUsage === '1' ? '是' : '否' }}</text>
  118. </view>
  119. <view class="form-item" v-if="!isCollapsed">
  120. <text class="label">备注</text>
  121. </view>
  122. <!-- 备注 -->
  123. <view class="content-text" v-if="!isCollapsed">
  124. <uv-textarea
  125. v-model="repairData.remark"
  126. placeholder="备注"
  127. :maxlength="200"
  128. :show-confirm-bar="false"
  129. height="60"
  130. border="none"
  131. disabled
  132. :textStyle="{ color: '#000' }"
  133. :custom-style="{ backgroundColor: '#f5f5f5' }"
  134. ></uv-textarea>
  135. </view>
  136. <!-- 查看全部/收起按钮 -->
  137. <view class="collapse-btn" @click="toggleCollapse">
  138. <text class="collapse-text">{{ isCollapsed ? '查看全部' : '收起' }}</text>
  139. <text class="collapse-icon">{{ isCollapsed ? '▼' : '▲' }}</text>
  140. </view>
  141. </view>
  142. <!-- 处理内容 -->
  143. <view class="process-content">
  144. <view class="info-header">
  145. <view class="red-line"></view>
  146. <text class="info-title">处理内容</text>
  147. </view>
  148. <!-- 维修人 -->
  149. <view class="form-item">
  150. <text class="label">维修人</text>
  151. <view class="input-area" >
  152. <input
  153. v-model="processData.repairName"
  154. placeholder="请填写"
  155. class="input-field"
  156. ref="maintainerInput"
  157. />
  158. </view>
  159. </view>
  160. <!-- 联系方式 -->
  161. <view class="form-item">
  162. <text class="label">联系方式</text>
  163. <view class="input-area" >
  164. <input
  165. v-model="processData.phone"
  166. placeholder="请填写"
  167. class="input-field"
  168. ref="maintainerInput"
  169. />
  170. </view>
  171. </view>
  172. <!-- 维修日期 -->
  173. <view class="form-item" @click="showDatePicker">
  174. <text class="label">维修日期</text>
  175. <view class="select-area">
  176. <text class="value" :class="{ placeholder: !processData.repairDate }">{{ processData.repairDate || '请选择' }}</text>
  177. <uv-icon name="arrow-down" size="18" color="#000"></uv-icon>
  178. </view>
  179. </view>
  180. <!-- 处理内容 -->
  181. <view class="form-item">
  182. <text class="label">处理内容</text>
  183. </view>
  184. <view class="textarea-container">
  185. <uv-textarea
  186. v-model="processData.content"
  187. placeholder="请输入处理内容"
  188. :maxlength="200"
  189. :show-confirm-bar="false"
  190. height="60"
  191. border="none"
  192. :textStyle="{ color: '#000' }"
  193. :custom-style="{ backgroundColor: '#f5f5f5' }"
  194. ></uv-textarea>
  195. </view>
  196. <!-- 上传图片 -->
  197. <view class="form-item">
  198. <text class="label">上传图片</text>
  199. </view>
  200. <view class="image-upload">
  201. <view v-for="(img, index) in getImageList(processData.image)" :key="index" class="image-item">
  202. <image :src="img.trim()" mode="aspectFill" @click="previewImage(img.trim())"></image>
  203. <view class="delete-btn" @click="deleteImage(index)">
  204. <uv-icon name="close" size="12" color="#fff"></uv-icon>
  205. </view>
  206. </view>
  207. <view class="upload-btn" @click="uploadImage">
  208. <uv-icon name="camera" size="34" color="#C70019"></uv-icon>
  209. </view>
  210. </view>
  211. <!-- 是否产生费用 -->
  212. <view class="form-item">
  213. <text class="label">是否产生费用</text>
  214. <view class="radio-options">
  215. <view
  216. class="radio-item"
  217. :class="{ active: processData.isExpend === '1' }"
  218. @click="selectCost('1')"
  219. >
  220. <view class="radio-dot" :class="{ active: processData.isExpend === '1' }"></view>
  221. <text :class="{ active: processData.isExpend === '1' }"></text>
  222. </view>
  223. <view
  224. class="radio-item"
  225. :class="{ active: processData.isExpend === '0' }"
  226. @click="selectCost('0')"
  227. >
  228. <view class="radio-dot" :class="{ active: processData.isExpend === '0' }"></view>
  229. <text :class="{ active: processData.isExpend === '0' }"></text>
  230. </view>
  231. </view>
  232. </view>
  233. <!-- 产生费用 -->
  234. <view class="form-item" v-if="processData.isExpend === '1'">
  235. <text class="label">产生费用</text>
  236. <view class="input-area" >
  237. <input
  238. v-model="amount"
  239. placeholder="请输入费用"
  240. disabled
  241. class="input-field"
  242. ref="maintainerInput"
  243. />
  244. </view>
  245. </view>
  246. <!-- 费用详情表格 -->
  247. <view class="cost-table" v-if="processData.isExpend === '1'">
  248. <view class="table-header">
  249. <text class="header-cell">费用名称</text>
  250. <text class="header-cell">数量</text>
  251. <text class="header-cell">金额</text>
  252. <text class="header-cell"></text>
  253. </view>
  254. <view class="table-row" v-for="(item, index) in processData.costDetails" :key="index">
  255. <view class="cell-input">
  256. <uv-input
  257. v-model="item.name"
  258. placeholder="费用名称"
  259. border="none"
  260. :custom-style="{ backgroundColor: 'transparent', fontSize: '28rpx' }"
  261. ></uv-input>
  262. </view>
  263. <view class="cell-input">
  264. <uv-input
  265. v-model="item.quantity"
  266. placeholder="数量"
  267. border="none"
  268. :custom-style="{ backgroundColor: 'transparent', fontSize: '28rpx' }"
  269. ></uv-input>
  270. </view>
  271. <view class="cell-input">
  272. <uv-input
  273. v-model="item.amount"
  274. placeholder="金额"
  275. border="none"
  276. :custom-style="{ backgroundColor: 'transparent', fontSize: '28rpx' }"
  277. ></uv-input>
  278. </view>
  279. <view class="cell-action">
  280. <view class="action-btn delete-btn" @click="deleteCostItem(index)" v-if="processData.costDetails.length > 1">
  281. <uv-icon name="close" size="14" color="#fff"></uv-icon>
  282. </view>
  283. <view class="action-btn add-btn" @click="addCostItem" v-if="index === processData.costDetails.length - 1">
  284. <uv-icon name="plus" size="14" color="#fff"></uv-icon>
  285. </view>
  286. </view>
  287. </view>
  288. </view>
  289. <!-- 问题是否解决 -->
  290. <view class="form-item">
  291. <text class="label">问题是否解决</text>
  292. <view class="radio-options">
  293. <view
  294. class="radio-item"
  295. :class="{ active: processData.isFix === '1' }"
  296. @click="selectResolved('1')"
  297. >
  298. <view class="radio-dot" :class="{ active: processData.isFix === '1' }"></view>
  299. <text :class="{ active: processData.isFix === '1' }"></text>
  300. </view>
  301. <view
  302. class="radio-item"
  303. :class="{ active: processData.isFix === '0' }"
  304. @click="selectResolved('0')"
  305. >
  306. <view class="radio-dot" :class="{ active: processData.isFix === '0' }"></view>
  307. <text :class="{ active: processData.isFix === '0' }"></text>
  308. </view>
  309. </view>
  310. </view>
  311. <!-- 备注 -->
  312. <view class="form-item">
  313. <text class="label">备注</text>
  314. </view>
  315. <view class="textarea-container">
  316. <uv-textarea
  317. v-model="processData.remark"
  318. placeholder="备注"
  319. :maxlength="200"
  320. :show-confirm-bar="false"
  321. height="60"
  322. border="none"
  323. :custom-style="{ backgroundColor: '#f5f5f5' }"
  324. ></uv-textarea>
  325. </view>
  326. <!-- 立即维修按钮 -->
  327. <view class="repair-btn-container">
  328. <uv-button
  329. type="primary"
  330. text="立即维修"
  331. :custom-style="{ backgroundColor: '#C70019', borderRadius: '25px' }"
  332. @click="startRepair"
  333. ></uv-button>
  334. </view>
  335. </view>
  336. <!-- 日期选择器 -->
  337. <uv-datetime-picker
  338. confirm-color="#C70019"
  339. ref="datePicker"
  340. mode="date"
  341. @confirm="confirmDate"
  342. ></uv-datetime-picker>
  343. </view>
  344. </template>
  345. <script>
  346. export default {
  347. data() {
  348. return {
  349. statusType: 'modify',
  350. selectedStatus: '故障中',
  351. isCollapsed: true,
  352. id: '',
  353. // 映射表
  354. statusMap: {
  355. '故障中': '0',
  356. '维修中': '1',
  357. '已解决': '2'
  358. },
  359. // 报修基本信息(只读)
  360. repairData: {
  361. malfunctionDate: '2025-08-28', // 从接口 malfunctionDate 字段获取
  362. urgency: '0', // 从接口 urgency 字段映射:0-一般,1-紧急,2-非常紧急
  363. malfunctionDesc: '故障描述', // 从接口 malfunctionDesc 字段获取
  364. malfunctionImage: '', // 从接口 malfunctionImage 字段获取(字符串格式,多张图片用逗号分隔)
  365. firstDate: '2025-08-27', // 从接口 firstDate 字段获取
  366. frequency: '0', // 从接口 frequency 字段映射:0-偶发性,1-持续性
  367. reason: '发生频率触发条件', // 从接口 reason 字段获取
  368. isAffectUse: '0', // 从接口 isAffectUse 字段映射:0-否,1-是
  369. isMeasure: '0', // 从接口 isMeasure 字段映射:0-否,1-是
  370. measureDesc: '措施说明', // 从接口 measureDesc 字段获取
  371. isAffectExperience: '0', // 从接口 isAffectExperience 字段映射:0-否,1-是
  372. remark: '备注' // 从接口 remark 字段获取
  373. },
  374. // 处理内容(可编辑)
  375. processData: {
  376. repairName: '',
  377. phone: '',
  378. repairDate: '',
  379. content: '',
  380. image: '',
  381. isExpend: '0',
  382. costDetails: [
  383. { name: '', quantity: '', amount: '' }
  384. ],
  385. isFix: '0',
  386. remark: ''
  387. },
  388. }
  389. },
  390. computed: {
  391. // 计算总金额
  392. amount() {
  393. return this.processData.costDetails.reduce((sum, item) => {
  394. return sum + (Number(item.quantity) * parseFloat(item.amount || 0))
  395. }, 0)
  396. }
  397. },
  398. async onShow(){
  399. await this.getRepairDetail()
  400. },
  401. onLoad(args){
  402. this.id = args.id
  403. },
  404. methods: {
  405. // 修改状态
  406. async modifyStatus(){
  407. const res = await this.$api.exhibit.updateMalfunction({
  408. id: this.id,
  409. status: this.statusMap[this.selectedStatus]
  410. })
  411. if (res.code === 200) {
  412. uni.showToast({
  413. title: '修改成功',
  414. icon: 'success'
  415. })
  416. }
  417. },
  418. // 获取报修详情
  419. async getRepairDetail() {
  420. const queryRes = await this.$api.exhibit.queryMalfunctionById({
  421. malfunctionId: this.id
  422. })
  423. if (queryRes.code === 200) {
  424. this.repairData = queryRes.result
  425. }
  426. },
  427. // 立即维修
  428. async startRepair() {
  429. // 验证必填项
  430. if (!this.processData.repairName) {
  431. uni.showToast({
  432. title: '请输入维修人',
  433. icon: 'none'
  434. })
  435. return
  436. }
  437. if (!this.processData.phone) {
  438. uni.showToast({
  439. title: '请输入联系方式',
  440. icon: 'none'
  441. })
  442. return
  443. }
  444. if (!this.processData.repairDate) {
  445. uni.showToast({
  446. title: '请选择维修日期',
  447. icon: 'none'
  448. })
  449. return
  450. }
  451. if (!this.processData.content) {
  452. uni.showToast({
  453. title: '请输入处理内容',
  454. icon: 'none'
  455. })
  456. return
  457. }
  458. if (this.processData.isFix === null) {
  459. uni.showToast({
  460. title: '请选择问题是否解决',
  461. icon: 'none'
  462. })
  463. return
  464. }
  465. if (this.processData.isExpend === '1') {
  466. // 如果总金额为0则没有消费信息
  467. if (!this.amount) {
  468. uni.showToast({
  469. title: '请添加费用明细',
  470. icon: 'none'
  471. })
  472. return
  473. }
  474. }
  475. const tempData = {...this.processData}
  476. const tempDataList = [...this.processData.costDetails]
  477. const submitRes = await this.$api.exhibit.addRepair({
  478. id: this.id,
  479. ...tempData,
  480. amount: this.amount,
  481. expenseList: tempDataList.map(item => `${item.name},${item.quantity},${item.amount}`).join(';')
  482. })
  483. if (submitRes.code === 200) {
  484. uni.showToast({
  485. title: submitRes.message,
  486. icon: 'none'
  487. })
  488. }else {
  489. uni.showToast({
  490. title: submitRes.message,
  491. icon: 'none'
  492. })
  493. }
  494. },
  495. // 获取图片列表
  496. getImageList(imageStr) {
  497. if (!imageStr || typeof imageStr !== 'string') {
  498. return []
  499. }
  500. return imageStr.split(',').filter(img => img && img.trim())
  501. },
  502. // 切换折叠状态
  503. toggleCollapse() {
  504. this.isCollapsed = !this.isCollapsed
  505. },
  506. // 预览图片
  507. previewImage(img) {
  508. uni.previewImage({
  509. urls: [img],
  510. current: img
  511. })
  512. },
  513. // 显示日期选择器
  514. showDatePicker() {
  515. this.$refs.datePicker.open()
  516. },
  517. // 确认日期
  518. confirmDate(e) {
  519. const date = new Date(e.value)
  520. const year = date.getFullYear()
  521. const month = String(date.getMonth() + 1).padStart(2, '0')
  522. const day = String(date.getDate()).padStart(2, '0')
  523. this.processData.repairDate = `${year}-${month}-${day}`
  524. },
  525. // 上传图片
  526. async uploadImage() {
  527. try {
  528. const result = await this.$utils.chooseAndUpload()
  529. if (result && result.success) {
  530. console.log(result);
  531. // 将新图片URL添加到字符串中
  532. if (this.processData.image) {
  533. this.processData.image += ',' + result.url
  534. } else {
  535. this.processData.image = result.url
  536. }
  537. }
  538. } catch (error) {
  539. console.error('图片上传失败:', error)
  540. uni.showToast({
  541. title: '图片上传失败',
  542. icon: 'error'
  543. })
  544. }
  545. },
  546. // 删除图片
  547. deleteImage(index) {
  548. const imageList = this.getImageList(this.processData.image)
  549. imageList.splice(index, 1)
  550. this.processData.image = imageList.join(',')
  551. },
  552. // 选择是否产生费用
  553. selectCost(value) {
  554. this.processData.isExpend = value
  555. if (!value) {
  556. this.processData.amount = 0
  557. this.processData.costDetails = [{ name: '', quantity: '', amount: '' }]
  558. }
  559. },
  560. // 添加费用项
  561. addCostItem() {
  562. this.processData.costDetails.push({ name: '', quantity: '', amount: '' })
  563. },
  564. // 删除费用项
  565. deleteCostItem(index) {
  566. this.processData.costDetails.splice(index, 1)
  567. },
  568. // 选择问题是否解决
  569. selectResolved(value) {
  570. this.processData.isFix = value
  571. },
  572. // 显示状态选择器
  573. showStatusPicker() {
  574. uni.showActionSheet({
  575. itemList: ['故障中', '维修中', '已解决'],
  576. success: (res) => {
  577. const statusList = ['故障中', '维修中', '已解决']
  578. this.selectedStatus = statusList[res.tapIndex]
  579. }
  580. })
  581. },
  582. }
  583. }
  584. </script>
  585. <style lang="scss" scoped>
  586. .maintain-submit {
  587. min-height: 100vh;
  588. background-color: #f5f5f5;
  589. padding-bottom: 200rpx;
  590. }
  591. // 修改状态
  592. .status-item {
  593. margin: 18rpx;
  594. background: #ffffff;
  595. border-radius: 15rpx;
  596. box-shadow: 0rpx 3rpx 6rpx 0rpx rgba(0,0,0,0.16);
  597. padding: 20rpx 40rpx;
  598. .status-row {
  599. display: flex;
  600. align-items: center;
  601. justify-content: space-between;
  602. margin-bottom: 24rpx;
  603. .status-label {
  604. font-size: 30rpx;
  605. color: $primary-text-color;
  606. // font-weight: bold;
  607. }
  608. .status-select {
  609. display: flex;
  610. align-items: center;
  611. gap: 23rpx;
  612. padding: 12rpx 24rpx;
  613. // background-color: #f5f5f5;
  614. border-radius: 8rpx;
  615. // min-width: 200rpx;
  616. justify-content: space-between;
  617. .status-value {
  618. font-size: 28rpx;
  619. color: $primary-text-color;
  620. &.placeholder {
  621. color: $secondary-text-color;
  622. }
  623. }
  624. }
  625. }
  626. .status-btn {
  627. display: flex;
  628. align-items: center;
  629. justify-content: center;
  630. // padding: 16rpx 32rpx;
  631. // border: 2rpx solid #ddd;
  632. border-radius: full;
  633. background-color: #fff;
  634. width: 419rpx;
  635. height: 78rpx;
  636. border-radius: 39rpx;
  637. &.active {
  638. border-color: $primary-color;
  639. background-color: $primary-color;
  640. .status-text {
  641. color: #fff;
  642. }
  643. }
  644. .status-text {
  645. font-size: 30rpx;
  646. color: $secondary-text-color;
  647. }
  648. }
  649. }
  650. // 报修基本信息和处理内容通用样式
  651. .repair-info, .process-content {
  652. margin: 18rpx;
  653. background: #ffffff;
  654. border-radius: 15rpx;
  655. box-shadow: 0rpx 3rpx 6rpx 0rpx rgba(0,0,0,0.16);
  656. padding: 30rpx;
  657. .info-header {
  658. display: flex;
  659. align-items: center;
  660. margin-bottom: 40rpx;
  661. .red-line {
  662. width: 9rpx;
  663. height: 33rpx;
  664. background-color: $primary-color;
  665. margin-right: 7rpx;
  666. border-radius: 5rpx;
  667. }
  668. .info-title {
  669. font-size: 30rpx;
  670. font-weight: bold;
  671. color: $primary-text-color;
  672. }
  673. }
  674. .form-item {
  675. display: flex;
  676. align-items: center;
  677. justify-content: space-between;
  678. padding: 18rpx 0;
  679. border-bottom: 2rpx solid #f0f0f0;
  680. &:last-child {
  681. border-bottom: none;
  682. }
  683. .input-area {
  684. flex: 1;
  685. // background-color: #f5f5f5;
  686. border-radius: 8rpx;
  687. padding: 2rpx 24rpx;
  688. margin-left: 24rpx;
  689. .input-field {
  690. width: 100%;
  691. font-size: 30rpx;
  692. color: $primary-text-color;
  693. background: transparent;
  694. border: none;
  695. outline: none;
  696. text-align: right;
  697. &::placeholder {
  698. color: $secondary-text-color;
  699. }
  700. }
  701. }
  702. .label {
  703. font-size: 30rpx;
  704. color: $primary-text-color;
  705. flex-shrink: 0;
  706. &.active {
  707. font-weight: bold;
  708. }
  709. }
  710. .value {
  711. font-size: 30rpx;
  712. color: $primary-text-color;
  713. &.placeholder {
  714. color: $secondary-text-color;
  715. }
  716. &.red-text {
  717. color: $primary-color;
  718. }
  719. }
  720. .select-area {
  721. display: flex;
  722. align-items: center;
  723. gap: 16rpx;
  724. }
  725. }
  726. .content-text {
  727. // padding: 16rpx 0;
  728. margin-bottom: 16rpx;
  729. text {
  730. font-size: 30rpx;
  731. color: $secondary-text-color;
  732. line-height: 1.5;
  733. }
  734. }
  735. .image-container {
  736. display: flex;
  737. flex-wrap: wrap;
  738. gap: 24rpx;
  739. margin: 16rpx 0;
  740. .uploaded-image {
  741. width: 160rpx;
  742. height: 160rpx;
  743. // border-radius: 8rpx;
  744. }
  745. }
  746. .collapse-btn {
  747. display: flex;
  748. align-items: center;
  749. justify-content: center;
  750. gap: 16rpx;
  751. padding: 30rpx 0 0;
  752. margin-top: 16rpx;
  753. border-top: 2rpx solid #f0f0f0;
  754. .collapse-text {
  755. font-size: 28rpx;
  756. color: $primary-color;
  757. }
  758. .collapse-icon {
  759. font-size: 24rpx;
  760. color: $primary-color;
  761. }
  762. }
  763. }
  764. // 处理内容特有样式
  765. .process-content {
  766. .textarea-container {
  767. margin: 16rpx 0;
  768. background-color: #f5f5f5;
  769. border-radius: 8rpx;
  770. padding: 8rpx 16rpx;
  771. }
  772. .image-upload {
  773. display: flex;
  774. flex-wrap: wrap;
  775. gap: 24rpx;
  776. margin: 16rpx 0;
  777. .upload-btn {
  778. width: 160rpx;
  779. height: 160rpx;
  780. border: 2rpx dashed $primary-color;
  781. display: flex;
  782. align-items: center;
  783. justify-content: center;
  784. background-color: #fff;
  785. border-radius: 8rpx;
  786. }
  787. .image-item {
  788. position: relative;
  789. width: 160rpx;
  790. height: 160rpx;
  791. image {
  792. width: 100%;
  793. height: 100%;
  794. border-radius: 8rpx;
  795. }
  796. .delete-btn {
  797. position: absolute;
  798. top: -12rpx;
  799. right: -12rpx;
  800. width: 40rpx;
  801. height: 40rpx;
  802. background-color: #ff4757;
  803. border-radius: 50%;
  804. display: flex;
  805. align-items: center;
  806. justify-content: center;
  807. }
  808. }
  809. }
  810. .radio-options {
  811. display: flex;
  812. gap: 80rpx;
  813. .radio-item {
  814. display: flex;
  815. align-items: center;
  816. gap: 16rpx;
  817. .radio-dot {
  818. width: 32rpx;
  819. height: 32rpx;
  820. border: 4rpx solid #ddd;
  821. border-radius: 50%;
  822. position: relative;
  823. &.active {
  824. border-color: $primary-color;
  825. &::after {
  826. content: '';
  827. position: absolute;
  828. top: 50%;
  829. left: 50%;
  830. transform: translate(-50%, -50%);
  831. width: 16rpx;
  832. height: 16rpx;
  833. background-color: $primary-color;
  834. border-radius: 50%;
  835. }
  836. }
  837. }
  838. text {
  839. font-size: 30rpx;
  840. color: $secondary-text-color;
  841. &.active {
  842. color: $primary-color;
  843. }
  844. }
  845. }
  846. }
  847. // 费用表格样式
  848. .cost-table {
  849. margin: 16rpx 0;
  850. border: 2rpx solid #f0f0f0;
  851. border-radius: 8rpx;
  852. overflow: hidden;
  853. .table-header {
  854. display: flex;
  855. background-color: #f8f8f8;
  856. .header-cell {
  857. flex: 1;
  858. padding: 24rpx 16rpx;
  859. font-size: 28rpx;
  860. font-weight: bold;
  861. color: $primary-text-color;
  862. text-align: left;
  863. border-right: 2rpx solid #f0f0f0;
  864. &:first-child {
  865. flex: 2;
  866. text-align: left;
  867. }
  868. &:last-child {
  869. border-right: none;
  870. }
  871. }
  872. }
  873. .table-row {
  874. display: flex;
  875. border-top: 2rpx solid #f0f0f0;
  876. .cell-input {
  877. flex: 1;
  878. padding: 8rpx;
  879. border-right: 2rpx solid #f0f0f0;
  880. &:first-child {
  881. flex: 2;
  882. }
  883. &:last-child {
  884. border-right: none;
  885. }
  886. }
  887. .cell-action {
  888. width: 120rpx;
  889. display: flex;
  890. align-items: center;
  891. justify-content: center;
  892. gap: 8rpx;
  893. padding: 8rpx;
  894. .action-btn {
  895. width: 36rpx;
  896. height: 36rpx;
  897. padding: 4rpx;
  898. border-radius: 50%;
  899. display: flex;
  900. align-items: center;
  901. justify-content: center;
  902. &.add-btn {
  903. background-color: #1a9c10;
  904. }
  905. &.delete-btn {
  906. background-color: $primary-color;
  907. }
  908. }
  909. }
  910. }
  911. }
  912. // 立即维修按钮
  913. .repair-btn-container {
  914. margin-top: 40rpx;
  915. padding-top: 32rpx;
  916. border-top: 2rpx solid #f0f0f0;
  917. }
  918. }
  919. </style>