展品维保小程序前端代码接口
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.

1044 lines
27 KiB

1 week ago
1 week ago
1 week ago
1 week ago
1 week ago
  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. reverseStatusMap: {
  361. '0': '故障中',
  362. '1': '维修中',
  363. '2': '已解决'
  364. },
  365. // 报修基本信息(只读)
  366. repairData: {
  367. malfunctionDate: '2025-08-28', // 从接口 malfunctionDate 字段获取
  368. urgency: '0', // 从接口 urgency 字段映射:0-一般,1-紧急,2-非常紧急
  369. malfunctionDesc: '故障描述', // 从接口 malfunctionDesc 字段获取
  370. malfunctionImage: '', // 从接口 malfunctionImage 字段获取(字符串格式,多张图片用逗号分隔)
  371. firstDate: '2025-08-27', // 从接口 firstDate 字段获取
  372. frequency: '0', // 从接口 frequency 字段映射:0-偶发性,1-持续性
  373. reason: '发生频率触发条件', // 从接口 reason 字段获取
  374. isAffectUse: '0', // 从接口 isAffectUse 字段映射:0-否,1-是
  375. isMeasure: '0', // 从接口 isMeasure 字段映射:0-否,1-是
  376. measureDesc: '措施说明', // 从接口 measureDesc 字段获取
  377. isAffectExperience: '0', // 从接口 isAffectExperience 字段映射:0-否,1-是
  378. remark: '备注', // 从接口 remark 字段获取
  379. status: '0', // 从接口 status 字段获取
  380. },
  381. // 处理内容(可编辑)
  382. processData: {
  383. repairName: '',
  384. phone: '',
  385. repairDate: '',
  386. content: '',
  387. image: '',
  388. isExpend: '0',
  389. costDetails: [
  390. { name: '', quantity: '', amount: '' }
  391. ],
  392. isFix: '0',
  393. remark: ''
  394. },
  395. }
  396. },
  397. computed: {
  398. // 计算总金额
  399. amount() {
  400. return this.processData.costDetails.reduce((sum, item) => {
  401. return sum + (Number(item.quantity) * parseFloat(item.amount || 0))
  402. }, 0)
  403. }
  404. },
  405. async onShow(){
  406. await this.getRepairDetail()
  407. },
  408. onLoad(args){
  409. this.id = args.id
  410. },
  411. methods: {
  412. // 修改状态
  413. async modifyStatus(){
  414. const res = await this.$api.exhibit.updateMalfunction({
  415. id: this.id,
  416. status: this.statusMap[this.selectedStatus]
  417. })
  418. if (res.code === 200) {
  419. uni.showToast({
  420. title: '修改成功',
  421. icon: 'success'
  422. })
  423. }
  424. },
  425. // 获取报修详情
  426. async getRepairDetail() {
  427. const queryRes = await this.$api.exhibit.queryMalfunctionById({
  428. malfunctionId: this.id
  429. })
  430. if (queryRes.code === 200) {
  431. this.repairData = queryRes.result
  432. // 状态字段反引射表
  433. this.selectedStatus = this.reverseStatusMap[this.repairData.status]
  434. }
  435. },
  436. // 立即维修
  437. async startRepair() {
  438. // 验证必填项
  439. if (!this.processData.repairName) {
  440. uni.showToast({
  441. title: '请输入维修人',
  442. icon: 'none'
  443. })
  444. return
  445. }
  446. if (!this.processData.phone) {
  447. uni.showToast({
  448. title: '请输入联系方式',
  449. icon: 'none'
  450. })
  451. return
  452. }
  453. if (!this.processData.repairDate) {
  454. uni.showToast({
  455. title: '请选择维修日期',
  456. icon: 'none'
  457. })
  458. return
  459. }
  460. if (!this.processData.content) {
  461. uni.showToast({
  462. title: '请输入处理内容',
  463. icon: 'none'
  464. })
  465. return
  466. }
  467. if (this.processData.isFix === null) {
  468. uni.showToast({
  469. title: '请选择问题是否解决',
  470. icon: 'none'
  471. })
  472. return
  473. }
  474. if (this.processData.isExpend === '1') {
  475. // 如果总金额为0则没有消费信息
  476. if (!this.amount) {
  477. uni.showToast({
  478. title: '请添加费用明细',
  479. icon: 'none'
  480. })
  481. return
  482. }
  483. }
  484. const tempData = {...this.processData}
  485. const tempDataList = [...this.processData.costDetails]
  486. const submitRes = await this.$api.exhibit.addRepair({
  487. id: this.id,
  488. ...tempData,
  489. amount: this.amount,
  490. expenseList: tempDataList.map(item => `${item.name},${item.quantity},${item.amount}`).join(';')
  491. })
  492. if (submitRes.code === 200) {
  493. uni.showToast({
  494. title: submitRes.message,
  495. icon: 'none'
  496. })
  497. }else {
  498. uni.showToast({
  499. title: submitRes.message,
  500. icon: 'none'
  501. })
  502. }
  503. },
  504. // 获取图片列表
  505. getImageList(imageStr) {
  506. if (!imageStr || typeof imageStr !== 'string') {
  507. return []
  508. }
  509. return imageStr.split(',').filter(img => img && img.trim())
  510. },
  511. // 切换折叠状态
  512. toggleCollapse() {
  513. this.isCollapsed = !this.isCollapsed
  514. },
  515. // 预览图片
  516. previewImage(img) {
  517. uni.previewImage({
  518. urls: [img],
  519. current: img
  520. })
  521. },
  522. // 显示日期选择器
  523. showDatePicker() {
  524. this.$refs.datePicker.open()
  525. },
  526. // 确认日期
  527. confirmDate(e) {
  528. this.processData.repairDate = this.$utils.formatTime(e.value)
  529. },
  530. // 上传图片
  531. async uploadImage() {
  532. try {
  533. const result = await this.$utils.chooseAndUpload()
  534. if (result && result.success) {
  535. console.log(result);
  536. // 将新图片URL添加到字符串中
  537. if (this.processData.image) {
  538. this.processData.image += ',' + result.url
  539. } else {
  540. this.processData.image = result.url
  541. }
  542. }
  543. } catch (error) {
  544. console.error('图片上传失败:', error)
  545. uni.showToast({
  546. title: '图片上传失败',
  547. icon: 'error'
  548. })
  549. }
  550. },
  551. // 删除图片
  552. deleteImage(index) {
  553. const imageList = this.getImageList(this.processData.image)
  554. imageList.splice(index, 1)
  555. this.processData.image = imageList.join(',')
  556. },
  557. // 选择是否产生费用
  558. selectCost(value) {
  559. this.processData.isExpend = value
  560. if (!value) {
  561. this.processData.amount = 0
  562. this.processData.costDetails = [{ name: '', quantity: '', amount: '' }]
  563. }
  564. },
  565. // 添加费用项
  566. addCostItem() {
  567. this.processData.costDetails.push({ name: '', quantity: '', amount: '' })
  568. },
  569. // 删除费用项
  570. deleteCostItem(index) {
  571. this.processData.costDetails.splice(index, 1)
  572. },
  573. // 选择问题是否解决
  574. selectResolved(value) {
  575. this.processData.isFix = value
  576. },
  577. // 显示状态选择器
  578. showStatusPicker() {
  579. uni.showActionSheet({
  580. itemList: ['故障中', '维修中', '已解决'],
  581. success: (res) => {
  582. const statusList = ['故障中', '维修中', '已解决']
  583. this.selectedStatus = statusList[res.tapIndex]
  584. }
  585. })
  586. },
  587. }
  588. }
  589. </script>
  590. <style lang="scss" scoped>
  591. .maintain-submit {
  592. min-height: 100vh;
  593. background-color: #f5f5f5;
  594. padding-bottom: 200rpx;
  595. }
  596. // 修改状态
  597. .status-item {
  598. margin: 18rpx;
  599. background: #ffffff;
  600. border-radius: 15rpx;
  601. box-shadow: 0rpx 3rpx 6rpx 0rpx rgba(0,0,0,0.16);
  602. padding: 20rpx 40rpx;
  603. .status-row {
  604. display: flex;
  605. align-items: center;
  606. justify-content: space-between;
  607. margin-bottom: 24rpx;
  608. .status-label {
  609. font-size: 30rpx;
  610. color: $primary-text-color;
  611. // font-weight: bold;
  612. }
  613. .status-select {
  614. display: flex;
  615. align-items: center;
  616. gap: 23rpx;
  617. padding: 12rpx 24rpx;
  618. // background-color: #f5f5f5;
  619. border-radius: 8rpx;
  620. // min-width: 200rpx;
  621. justify-content: space-between;
  622. .status-value {
  623. font-size: 28rpx;
  624. color: $primary-text-color;
  625. &.placeholder {
  626. color: $secondary-text-color;
  627. }
  628. }
  629. }
  630. }
  631. .status-btn {
  632. display: flex;
  633. align-items: center;
  634. justify-content: center;
  635. // padding: 16rpx 32rpx;
  636. // border: 2rpx solid #ddd;
  637. border-radius: full;
  638. background-color: #fff;
  639. width: 419rpx;
  640. height: 78rpx;
  641. border-radius: 39rpx;
  642. &.active {
  643. border-color: $primary-color;
  644. background-color: $primary-color;
  645. .status-text {
  646. color: #fff;
  647. }
  648. }
  649. .status-text {
  650. font-size: 30rpx;
  651. color: $secondary-text-color;
  652. }
  653. }
  654. }
  655. // 报修基本信息和处理内容通用样式
  656. .repair-info, .process-content {
  657. margin: 18rpx;
  658. background: #ffffff;
  659. border-radius: 15rpx;
  660. box-shadow: 0rpx 3rpx 6rpx 0rpx rgba(0,0,0,0.16);
  661. padding: 30rpx;
  662. .info-header {
  663. display: flex;
  664. align-items: center;
  665. margin-bottom: 40rpx;
  666. .red-line {
  667. width: 9rpx;
  668. height: 33rpx;
  669. background-color: $primary-color;
  670. margin-right: 7rpx;
  671. border-radius: 5rpx;
  672. }
  673. .info-title {
  674. font-size: 30rpx;
  675. font-weight: bold;
  676. color: $primary-text-color;
  677. }
  678. }
  679. .form-item {
  680. display: flex;
  681. align-items: center;
  682. justify-content: space-between;
  683. padding: 18rpx 0;
  684. border-bottom: 2rpx solid #f0f0f0;
  685. &:last-child {
  686. border-bottom: none;
  687. }
  688. .input-area {
  689. flex: 1;
  690. // background-color: #f5f5f5;
  691. border-radius: 8rpx;
  692. padding: 2rpx 24rpx;
  693. margin-left: 24rpx;
  694. .input-field {
  695. width: 100%;
  696. font-size: 30rpx;
  697. color: $primary-text-color;
  698. background: transparent;
  699. border: none;
  700. outline: none;
  701. text-align: right;
  702. &::placeholder {
  703. color: $secondary-text-color;
  704. }
  705. }
  706. }
  707. .label {
  708. font-size: 30rpx;
  709. color: $primary-text-color;
  710. flex-shrink: 0;
  711. &.active {
  712. font-weight: bold;
  713. }
  714. }
  715. .value {
  716. font-size: 30rpx;
  717. color: $primary-text-color;
  718. &.placeholder {
  719. color: $secondary-text-color;
  720. }
  721. &.red-text {
  722. color: $primary-color;
  723. }
  724. }
  725. .select-area {
  726. display: flex;
  727. align-items: center;
  728. gap: 16rpx;
  729. }
  730. }
  731. .content-text {
  732. // padding: 16rpx 0;
  733. margin-bottom: 16rpx;
  734. text {
  735. font-size: 30rpx;
  736. color: $secondary-text-color;
  737. line-height: 1.5;
  738. }
  739. }
  740. .image-container {
  741. display: flex;
  742. flex-wrap: wrap;
  743. gap: 24rpx;
  744. margin: 16rpx 0;
  745. .uploaded-image {
  746. width: 160rpx;
  747. height: 160rpx;
  748. // border-radius: 8rpx;
  749. }
  750. }
  751. .collapse-btn {
  752. display: flex;
  753. align-items: center;
  754. justify-content: center;
  755. gap: 16rpx;
  756. padding: 30rpx 0 0;
  757. margin-top: 16rpx;
  758. border-top: 2rpx solid #f0f0f0;
  759. .collapse-text {
  760. font-size: 28rpx;
  761. color: $primary-color;
  762. }
  763. .collapse-icon {
  764. font-size: 24rpx;
  765. color: $primary-color;
  766. }
  767. }
  768. }
  769. // 处理内容特有样式
  770. .process-content {
  771. .textarea-container {
  772. margin: 16rpx 0;
  773. background-color: #f5f5f5;
  774. border-radius: 8rpx;
  775. padding: 8rpx 16rpx;
  776. }
  777. .image-upload {
  778. display: flex;
  779. flex-wrap: wrap;
  780. gap: 24rpx;
  781. margin: 16rpx 0;
  782. .upload-btn {
  783. width: 160rpx;
  784. height: 160rpx;
  785. border: 2rpx dashed $primary-color;
  786. display: flex;
  787. align-items: center;
  788. justify-content: center;
  789. background-color: #fff;
  790. border-radius: 8rpx;
  791. }
  792. .image-item {
  793. position: relative;
  794. width: 160rpx;
  795. height: 160rpx;
  796. image {
  797. width: 100%;
  798. height: 100%;
  799. border-radius: 8rpx;
  800. }
  801. .delete-btn {
  802. position: absolute;
  803. top: -12rpx;
  804. right: -12rpx;
  805. width: 40rpx;
  806. height: 40rpx;
  807. background-color: #ff4757;
  808. border-radius: 50%;
  809. display: flex;
  810. align-items: center;
  811. justify-content: center;
  812. }
  813. }
  814. }
  815. .radio-options {
  816. display: flex;
  817. gap: 80rpx;
  818. .radio-item {
  819. display: flex;
  820. align-items: center;
  821. gap: 16rpx;
  822. .radio-dot {
  823. width: 32rpx;
  824. height: 32rpx;
  825. border: 4rpx solid #ddd;
  826. border-radius: 50%;
  827. position: relative;
  828. &.active {
  829. border-color: $primary-color;
  830. &::after {
  831. content: '';
  832. position: absolute;
  833. top: 50%;
  834. left: 50%;
  835. transform: translate(-50%, -50%);
  836. width: 16rpx;
  837. height: 16rpx;
  838. background-color: $primary-color;
  839. border-radius: 50%;
  840. }
  841. }
  842. }
  843. text {
  844. font-size: 30rpx;
  845. color: $secondary-text-color;
  846. &.active {
  847. color: $primary-color;
  848. }
  849. }
  850. }
  851. }
  852. // 费用表格样式
  853. .cost-table {
  854. margin: 16rpx 0;
  855. border: 2rpx solid #f0f0f0;
  856. border-radius: 8rpx;
  857. overflow: hidden;
  858. .table-header {
  859. display: flex;
  860. background-color: #f8f8f8;
  861. .header-cell {
  862. flex: 1;
  863. padding: 24rpx 16rpx;
  864. font-size: 28rpx;
  865. font-weight: bold;
  866. color: $primary-text-color;
  867. text-align: left;
  868. border-right: 2rpx solid #f0f0f0;
  869. &:first-child {
  870. flex: 2;
  871. text-align: left;
  872. }
  873. &:last-child {
  874. border-right: none;
  875. }
  876. }
  877. }
  878. .table-row {
  879. display: flex;
  880. border-top: 2rpx solid #f0f0f0;
  881. .cell-input {
  882. flex: 1;
  883. padding: 8rpx;
  884. border-right: 2rpx solid #f0f0f0;
  885. &:first-child {
  886. flex: 2;
  887. }
  888. &:last-child {
  889. border-right: none;
  890. }
  891. }
  892. .cell-action {
  893. width: 120rpx;
  894. display: flex;
  895. align-items: center;
  896. justify-content: center;
  897. gap: 8rpx;
  898. padding: 8rpx;
  899. .action-btn {
  900. width: 36rpx;
  901. height: 36rpx;
  902. padding: 4rpx;
  903. border-radius: 50%;
  904. display: flex;
  905. align-items: center;
  906. justify-content: center;
  907. &.add-btn {
  908. background-color: #1a9c10;
  909. }
  910. &.delete-btn {
  911. background-color: $primary-color;
  912. }
  913. }
  914. }
  915. }
  916. }
  917. // 立即维修按钮
  918. .repair-btn-container {
  919. margin-top: 40rpx;
  920. padding-top: 32rpx;
  921. border-top: 2rpx solid #f0f0f0;
  922. }
  923. }
  924. </style>