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

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