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

1051 lines
28 KiB

1 week ago
1 week ago
1 week ago
1 week ago
1 week ago
6 days ago
6 days ago
6 days ago
6 days 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. }else {
  484. }
  485. const tempData = {...this.processData}
  486. delete tempData.costDetails
  487. const tempDataList = [...this.processData.costDetails]
  488. if (this.processData.isExpend === '1') {
  489. tempData.expenseList = tempDataList.map(item => `${item.name},${item.quantity},${item.amount}`).join(';')
  490. }else {
  491. delete tempData.expenseList
  492. }
  493. const submitRes = await this.$api.exhibit.addRepair({
  494. id: this.id,
  495. ...tempData,
  496. amount: this.amount
  497. })
  498. if (submitRes.code === 200) {
  499. uni.showToast({
  500. title: submitRes.message,
  501. icon: 'none'
  502. })
  503. }else {
  504. uni.showToast({
  505. title: submitRes.message,
  506. icon: 'none'
  507. })
  508. }
  509. },
  510. // 获取图片列表
  511. getImageList(imageStr) {
  512. if (!imageStr || typeof imageStr !== 'string') {
  513. return []
  514. }
  515. return imageStr.split(',').filter(img => img && img.trim())
  516. },
  517. // 切换折叠状态
  518. toggleCollapse() {
  519. this.isCollapsed = !this.isCollapsed
  520. },
  521. // 预览图片
  522. previewImage(img) {
  523. uni.previewImage({
  524. urls: [img],
  525. current: img
  526. })
  527. },
  528. // 显示日期选择器
  529. showDatePicker() {
  530. this.$refs.datePicker.open()
  531. },
  532. // 确认日期
  533. confirmDate(e) {
  534. this.processData.repairDate = this.$utils.formatTime(e.value)
  535. },
  536. // 上传图片
  537. async uploadImage() {
  538. try {
  539. const result = await this.$utils.chooseAndUpload()
  540. if (result && result.success) {
  541. console.log(result);
  542. // 将新图片URL添加到字符串中
  543. if (this.processData.image) {
  544. this.processData.image += ',' + result.url
  545. } else {
  546. this.processData.image = result.url
  547. }
  548. }
  549. } catch (error) {
  550. console.error('图片上传失败:', error)
  551. uni.showToast({
  552. title: '图片上传失败',
  553. icon: 'error'
  554. })
  555. }
  556. },
  557. // 删除图片
  558. deleteImage(index) {
  559. const imageList = this.getImageList(this.processData.image)
  560. imageList.splice(index, 1)
  561. this.processData.image = imageList.join(',')
  562. },
  563. // 选择是否产生费用
  564. selectCost(value) {
  565. this.processData.isExpend = value
  566. if (!value) {
  567. this.processData.amount = 0
  568. this.processData.costDetails = [{ name: '', quantity: '', amount: '' }]
  569. }
  570. },
  571. // 添加费用项
  572. addCostItem() {
  573. this.processData.costDetails.push({ name: '', quantity: '', amount: '' })
  574. },
  575. // 删除费用项
  576. deleteCostItem(index) {
  577. this.processData.costDetails.splice(index, 1)
  578. },
  579. // 选择问题是否解决
  580. selectResolved(value) {
  581. this.processData.isFix = value
  582. },
  583. // 显示状态选择器
  584. showStatusPicker() {
  585. uni.showActionSheet({
  586. itemList: ['故障中', '维修中', '已解决'],
  587. success: (res) => {
  588. const statusList = ['故障中', '维修中', '已解决']
  589. this.selectedStatus = statusList[res.tapIndex]
  590. }
  591. })
  592. },
  593. }
  594. }
  595. </script>
  596. <style lang="scss" scoped>
  597. .maintain-submit {
  598. min-height: 100vh;
  599. background-color: #f5f5f5;
  600. padding-bottom: 200rpx;
  601. }
  602. // 修改状态
  603. .status-item {
  604. margin: 18rpx;
  605. background: #ffffff;
  606. border-radius: 15rpx;
  607. box-shadow: 0rpx 3rpx 6rpx 0rpx rgba(0,0,0,0.16);
  608. padding: 20rpx 40rpx;
  609. .status-row {
  610. display: flex;
  611. align-items: center;
  612. justify-content: space-between;
  613. margin-bottom: 24rpx;
  614. .status-label {
  615. font-size: 30rpx;
  616. color: $primary-text-color;
  617. // font-weight: bold;
  618. }
  619. .status-select {
  620. display: flex;
  621. align-items: center;
  622. gap: 23rpx;
  623. padding: 12rpx 24rpx;
  624. // background-color: #f5f5f5;
  625. border-radius: 8rpx;
  626. // min-width: 200rpx;
  627. justify-content: space-between;
  628. .status-value {
  629. font-size: 28rpx;
  630. color: $primary-text-color;
  631. &.placeholder {
  632. color: $secondary-text-color;
  633. }
  634. }
  635. }
  636. }
  637. .status-btn {
  638. display: flex;
  639. align-items: center;
  640. justify-content: center;
  641. // padding: 16rpx 32rpx;
  642. // border: 2rpx solid #ddd;
  643. border-radius: full;
  644. background-color: #fff;
  645. width: 419rpx;
  646. height: 78rpx;
  647. border-radius: 39rpx;
  648. &.active {
  649. border-color: $primary-color;
  650. background-color: $primary-color;
  651. .status-text {
  652. color: #fff;
  653. }
  654. }
  655. .status-text {
  656. font-size: 30rpx;
  657. color: $secondary-text-color;
  658. }
  659. }
  660. }
  661. // 报修基本信息和处理内容通用样式
  662. .repair-info, .process-content {
  663. margin: 18rpx;
  664. background: #ffffff;
  665. border-radius: 15rpx;
  666. box-shadow: 0rpx 3rpx 6rpx 0rpx rgba(0,0,0,0.16);
  667. padding: 30rpx;
  668. .info-header {
  669. display: flex;
  670. align-items: center;
  671. margin-bottom: 40rpx;
  672. .red-line {
  673. width: 9rpx;
  674. height: 33rpx;
  675. background-color: $primary-color;
  676. margin-right: 7rpx;
  677. border-radius: 5rpx;
  678. }
  679. .info-title {
  680. font-size: 30rpx;
  681. font-weight: bold;
  682. color: $primary-text-color;
  683. }
  684. }
  685. .form-item {
  686. display: flex;
  687. align-items: center;
  688. justify-content: space-between;
  689. padding: 18rpx 0;
  690. border-bottom: 2rpx solid #f0f0f0;
  691. &:last-child {
  692. border-bottom: none;
  693. }
  694. .input-area {
  695. flex: 1;
  696. // background-color: #f5f5f5;
  697. border-radius: 8rpx;
  698. padding: 2rpx 24rpx;
  699. margin-left: 24rpx;
  700. .input-field {
  701. width: 100%;
  702. font-size: 30rpx;
  703. color: $primary-text-color;
  704. background: transparent;
  705. border: none;
  706. outline: none;
  707. text-align: right;
  708. &::placeholder {
  709. color: $secondary-text-color;
  710. }
  711. }
  712. }
  713. .label {
  714. font-size: 30rpx;
  715. color: $primary-text-color;
  716. flex-shrink: 0;
  717. &.active {
  718. font-weight: bold;
  719. }
  720. }
  721. .value {
  722. font-size: 30rpx;
  723. color: $primary-text-color;
  724. &.placeholder {
  725. color: $secondary-text-color;
  726. }
  727. &.red-text {
  728. color: $primary-color;
  729. }
  730. }
  731. .select-area {
  732. display: flex;
  733. align-items: center;
  734. gap: 16rpx;
  735. }
  736. }
  737. .content-text {
  738. // padding: 16rpx 0;
  739. margin-bottom: 16rpx;
  740. text {
  741. font-size: 30rpx;
  742. color: $secondary-text-color;
  743. line-height: 1.5;
  744. }
  745. }
  746. .image-container {
  747. display: flex;
  748. flex-wrap: wrap;
  749. gap: 24rpx;
  750. margin: 16rpx 0;
  751. .uploaded-image {
  752. width: 160rpx;
  753. height: 160rpx;
  754. // border-radius: 8rpx;
  755. }
  756. }
  757. .collapse-btn {
  758. display: flex;
  759. align-items: center;
  760. justify-content: center;
  761. gap: 16rpx;
  762. padding: 30rpx 0 0;
  763. margin-top: 16rpx;
  764. border-top: 2rpx solid #f0f0f0;
  765. .collapse-text {
  766. font-size: 28rpx;
  767. color: $primary-color;
  768. }
  769. .collapse-icon {
  770. font-size: 24rpx;
  771. color: $primary-color;
  772. }
  773. }
  774. }
  775. // 处理内容特有样式
  776. .process-content {
  777. .textarea-container {
  778. margin: 16rpx 0;
  779. background-color: #f5f5f5;
  780. border-radius: 8rpx;
  781. padding: 8rpx 16rpx;
  782. }
  783. .image-upload {
  784. display: flex;
  785. flex-wrap: wrap;
  786. gap: 24rpx;
  787. margin: 16rpx 0;
  788. .upload-btn {
  789. width: 160rpx;
  790. height: 160rpx;
  791. border: 2rpx dashed $primary-color;
  792. display: flex;
  793. align-items: center;
  794. justify-content: center;
  795. background-color: #fff;
  796. border-radius: 8rpx;
  797. }
  798. .image-item {
  799. position: relative;
  800. width: 160rpx;
  801. height: 160rpx;
  802. image {
  803. width: 100%;
  804. height: 100%;
  805. border-radius: 8rpx;
  806. }
  807. .delete-btn {
  808. position: absolute;
  809. top: -12rpx;
  810. right: -12rpx;
  811. width: 40rpx;
  812. height: 40rpx;
  813. background-color: #ff4757;
  814. border-radius: 50%;
  815. display: flex;
  816. align-items: center;
  817. justify-content: center;
  818. }
  819. }
  820. }
  821. .radio-options {
  822. display: flex;
  823. gap: 80rpx;
  824. .radio-item {
  825. display: flex;
  826. align-items: center;
  827. gap: 16rpx;
  828. .radio-dot {
  829. width: 32rpx;
  830. height: 32rpx;
  831. border: 4rpx solid #ddd;
  832. border-radius: 50%;
  833. position: relative;
  834. &.active {
  835. border-color: $primary-color;
  836. &::after {
  837. content: '';
  838. position: absolute;
  839. top: 50%;
  840. left: 50%;
  841. transform: translate(-50%, -50%);
  842. width: 16rpx;
  843. height: 16rpx;
  844. background-color: $primary-color;
  845. border-radius: 50%;
  846. }
  847. }
  848. }
  849. text {
  850. font-size: 30rpx;
  851. color: $secondary-text-color;
  852. &.active {
  853. color: $primary-color;
  854. }
  855. }
  856. }
  857. }
  858. // 费用表格样式
  859. .cost-table {
  860. margin: 16rpx 0;
  861. border: 2rpx solid #f0f0f0;
  862. border-radius: 8rpx;
  863. overflow: hidden;
  864. .table-header {
  865. display: flex;
  866. background-color: #f8f8f8;
  867. .header-cell {
  868. flex: 1;
  869. padding: 24rpx 16rpx;
  870. font-size: 28rpx;
  871. font-weight: bold;
  872. color: $primary-text-color;
  873. text-align: left;
  874. border-right: 2rpx solid #f0f0f0;
  875. &:first-child {
  876. flex: 2;
  877. text-align: left;
  878. }
  879. &:last-child {
  880. border-right: none;
  881. }
  882. }
  883. }
  884. .table-row {
  885. display: flex;
  886. border-top: 2rpx solid #f0f0f0;
  887. .cell-input {
  888. flex: 1;
  889. padding: 8rpx;
  890. border-right: 2rpx solid #f0f0f0;
  891. &:first-child {
  892. flex: 2;
  893. }
  894. &:last-child {
  895. border-right: none;
  896. }
  897. }
  898. .cell-action {
  899. width: 120rpx;
  900. display: flex;
  901. align-items: center;
  902. justify-content: center;
  903. gap: 8rpx;
  904. padding: 8rpx;
  905. .action-btn {
  906. width: 36rpx;
  907. height: 36rpx;
  908. padding: 4rpx;
  909. border-radius: 50%;
  910. display: flex;
  911. align-items: center;
  912. justify-content: center;
  913. &.add-btn {
  914. background-color: #1a9c10;
  915. }
  916. &.delete-btn {
  917. background-color: $primary-color;
  918. }
  919. }
  920. }
  921. }
  922. }
  923. // 立即维修按钮
  924. .repair-btn-container {
  925. margin-top: 40rpx;
  926. padding-top: 32rpx;
  927. border-top: 2rpx solid #f0f0f0;
  928. }
  929. }
  930. </style>