reportDetail.vue 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930
  1. <template>
  2. <view class="maintenance-container">
  3. <uni-nav-bar fixed="true" statusBar="true" left-icon="back" title="报工信息" @clickLeft="back"></uni-nav-bar>
  4. <view class="maintenance-wrapper">
  5. <view class="maintenance-content">
  6. <scroll-view :scroll-y='true' class="kd-baseInfo">
  7. <view class="kd-cell">
  8. <text class="kd-label">开始里程</text>
  9. <uni-easyinput v-model="formData.startMileage" type="number" :clearable="false" :inputBorder="false" @blur="validateStartMileage">
  10. <template #right>
  11. <view>KM</view>
  12. </template>
  13. </uni-easyinput>
  14. </view>
  15. <view class="kd-cell">
  16. <text class="kd-label">结束里程</text>
  17. <uni-easyinput v-model="formData.endMileage" type="number" :clearable="false" :inputBorder="false" @blur="validateEndMileage">
  18. <template #right>
  19. <view>KM</view>
  20. </template>
  21. </uni-easyinput>
  22. </view>
  23. <view class="kd-cell">
  24. <text class="kd-label">总里程</text>
  25. <uni-easyinput v-model="formData.mileage" type="number" :clearable="false" :inputBorder="false" :disabled="true">
  26. <template #right>
  27. <view>KM</view>
  28. </template>
  29. </uni-easyinput>
  30. </view>
  31. <view class="kd-cell" style="display: block;">
  32. <text class="kd-label">开始里程图片</text>
  33. <view class="image-list">
  34. <view class="image-item" v-for="(img, index) in (formData.startMileageImages || [])" :key="index">
  35. <image :src="getImageUrl(img)" mode="aspectFill" @click="previewImage(formData.startMileageImages, index)"></image>
  36. <view class="delete-btn" v-if="formData.status == 1" @click="deleteImage('start', index)">×</view>
  37. </view>
  38. <view class="image-add" v-if="formData.status == 1 && (!formData.startMileageImages || formData.startMileageImages.length < 9)" @click="chooseImage('start')">
  39. <text>+</text>
  40. </view>
  41. </view>
  42. </view>
  43. <view class="kd-cell" style="display: block;">
  44. <text class="kd-label">结束里程图片</text>
  45. <view class="image-list">
  46. <view class="image-item" v-for="(img, index) in (formData.endMileageImages || [])" :key="index">
  47. <image :src="getImageUrl(img)" mode="aspectFill" @click="previewImage(formData.endMileageImages, index)"></image>
  48. <view class="delete-btn" v-if="formData.status == 1" @click="deleteImage('end', index)">×</view>
  49. </view>
  50. <view class="image-add" v-if="formData.status == 1 && (!formData.endMileageImages || formData.endMileageImages.length < 9)" @click="chooseImage('end')">
  51. <text>+</text>
  52. </view>
  53. </view>
  54. </view>
  55. <view v-if="formData.status == 4" class="kd-cell">
  56. <text class="kd-label">验收说明</text>
  57. <uni-easyinput v-model="formData.checkRemark" :clearable="false" :inputBorder="false" :disabled="true">
  58. </uni-easyinput>
  59. </view>
  60. <template v-if="formData.costList && formData.costList.length > 0">
  61. <view class="kd-cell-divider"></view>
  62. <view class="kd-cell">
  63. <text class="kd-label">费用信息</text>
  64. <text class="kd-content"></text>
  65. </view>
  66. <view v-for="(item, index) in formData.costList" :key="index">
  67. <view class="kd-cell">
  68. <text class="kd-label">费用类型</text>
  69. <text class="kd-content">{{ getDict('logistic_list_cost_type', item.costType) }}</text>
  70. </view>
  71. <view class="kd-cell">
  72. <text class="kd-label">金额</text>
  73. <text class="kd-content">{{ item.cost }}</text>
  74. </view>
  75. <view class="kd-cell">
  76. <text class="kd-label">备注</text>
  77. <text class="kd-content">{{ item.remark }}</text>
  78. </view>
  79. <view v-if="formData.status == 1" style="float: right;">
  80. <button class="btn-reassignment del" type="primary" @click="handleDelFee(index)">删除</button>
  81. </view>
  82. </view>
  83. </template>
  84. <template v-else>
  85. <view class="kd-cell">
  86. <text class="kd-label">费用信息</text>
  87. <text class="kd-content" style="color: #999;">暂无费用信息</text>
  88. </view>
  89. </template>
  90. </scroll-view>
  91. <template v-if="formData.status == 1">
  92. <button class="btn-execute" type="primary" @click="handleExecute(2)">保存</button>
  93. <button class="btn-reassignment" type="primary" @click="handleAddFee">新增费用</button>
  94. </template>
  95. <template v-else>
  96. <button class="btn-execute" type="primary" @click="back(1)">返回</button>
  97. </template>
  98. </view>
  99. </view>
  100. <u-popup :show="popShow" @close="close">
  101. <view class="select-container">
  102. <view class="title">
  103. <text class="btn cancel" @tap="close">取消</text>
  104. 新增费用
  105. <text class="btn confirm" @tap="submit">确定</text>
  106. </view>
  107. <view class="select-wrapper">
  108. <view class="col deptInp">
  109. <text class="label">费用类型:</text>
  110. <zxz-uni-data-select :localdata="costTypeList" v-model="form.costType" filterable></zxz-uni-data-select>
  111. </view>
  112. <view class="col userInp">
  113. <text class="label">金额:</text>
  114. <uni-easyinput v-model="form.cost" type='number'></uni-easyinput>
  115. </view>
  116. <view class="col userInp">
  117. <text class="label">备注:</text>
  118. <uni-easyinput v-model="form.remark" type='textarea'></uni-easyinput>
  119. </view>
  120. </view>
  121. </view>
  122. </u-popup>
  123. </view>
  124. </template>
  125. <script>
  126. import {
  127. logistictraklistnoteUpdateAPI
  128. } from '@/api/pda/dispatchManage/index.js'
  129. export default {
  130. components: {},
  131. data() {
  132. return {
  133. costTypeList: [],
  134. form: {},
  135. popShow: false,
  136. value: '',
  137. info: {},
  138. formData: {
  139. costList: []
  140. },
  141. isSubmitting: false // 防重复提交标志
  142. }
  143. },
  144. onLoad(options) {
  145. console.log('options~~~', options)
  146. let initData = JSON.parse(options.item)
  147. const apiInfo = uni.getStorageSync('apiInfo')
  148. const orgin =
  149. apiInfo.hostname &&
  150. `${apiInfo.protocal || ''}${apiInfo.hostname || ''}:${apiInfo.port || ''}`
  151. // 处理开始里程图片(使用路径生成URL,同步ID)
  152. initData.startMileageImages = initData.startMileageImagesPaths
  153. ? initData.startMileageImagesPaths.split(',').map((path, index) => ({
  154. id: initData.startMileageImagesFileIds.split(',')[index] || '', // 对应ID
  155. url: `${orgin}/api/main/file/getFile?objectName=${path}`, // 使用路径作为参数
  156. status: 'done'
  157. }))
  158. : [];
  159. // 处理结束里程图片(同上)
  160. initData.endMileageImages = initData.endMileageImagesPaths
  161. ? initData.endMileageImagesPaths.split(',').map((path, index) => ({
  162. id: initData.endMileageImagesFileIds.split(',')[index] || '',
  163. url: `${orgin}/api/main/file/getFile?objectName=${path}`,
  164. status: 'done'
  165. }))
  166. : [];
  167. this.formData = initData
  168. console.log('initData~~~', initData)
  169. this.costTypeList = this.formData.dictList['logistic_list_cost_type'].map(item => {
  170. let values = Object.keys(item)
  171. return {
  172. text: item[values[0]],
  173. value: values[0],
  174. }
  175. })
  176. },
  177. computed: {
  178. getDict() {
  179. return (dictName, val) => {
  180. let find = this.formData.dictList[dictName].find(item => item[val]) || {}
  181. return find[val] ? find[val] : ''
  182. }
  183. },
  184. // 获取图片URL
  185. getImageUrl() {
  186. return (img) => {
  187. if (typeof img === 'string') {
  188. return img
  189. }
  190. return img.url
  191. }
  192. }
  193. },
  194. methods: {
  195. back(num = 1) {
  196. uni.navigateBack({
  197. delta: num
  198. })
  199. },
  200. // 验证开始里程
  201. validateStartMileage() {
  202. const start = parseFloat(this.formData.startMileage)
  203. const end = parseFloat(this.formData.endMileage)
  204. if (start !== 0 && !start) {
  205. uni.showToast({
  206. icon: 'none',
  207. title: '请输入开始里程'
  208. })
  209. return
  210. }
  211. if (start && end && start >= end) {
  212. uni.showToast({
  213. icon: 'none',
  214. title: '开始里程必须小于结束里程'
  215. })
  216. this.formData.startMileage = ''
  217. this.formData.mileage = ''
  218. } else if (start !== '' && end !== '') {
  219. this.calcTotalMileage()
  220. }
  221. },
  222. // 验证结束里程
  223. validateEndMileage() {
  224. const start = parseFloat(this.formData.startMileage)
  225. const end = parseFloat(this.formData.endMileage)
  226. if (!end) {
  227. uni.showToast({
  228. icon: 'none',
  229. title: '请输入结束里程'
  230. })
  231. return
  232. }
  233. if (start && end && end <= start) {
  234. uni.showToast({
  235. icon: 'none',
  236. title: '结束里程必须大于开始里程'
  237. })
  238. this.formData.endMileage = ''
  239. this.formData.mileage = ''
  240. } else if (start !== '' && end !== '') {
  241. this.calcTotalMileage()
  242. }
  243. },
  244. // 计算总里程
  245. calcTotalMileage() {
  246. const start = parseFloat(this.formData.startMileage) || 0
  247. const end = parseFloat(this.formData.endMileage) || 0
  248. this.formData.mileage = (end - start).toFixed(2)
  249. },
  250. // 选择图片
  251. chooseImage(type) {
  252. const maxCount = 9
  253. const currentImages = type === 'start' ? (this.formData.startMileageImages || []) : (this.formData.endMileageImages || [])
  254. const remainingCount = maxCount - currentImages.length
  255. if (remainingCount <= 0) {
  256. uni.showToast({
  257. icon: 'none',
  258. title: '最多上传9张图片'
  259. })
  260. return
  261. }
  262. uni.chooseImage({
  263. count: remainingCount,
  264. sizeType: ['compressed'],
  265. sourceType: ['camera', 'album'],
  266. success: (res) => {
  267. const tempFilePaths = res.tempFilePaths
  268. this.uploadImages(tempFilePaths, type)
  269. }
  270. })
  271. },
  272. // 上传多张图片
  273. async uploadImages(filePaths, type) {
  274. uni.showLoading({
  275. title: '上传中...'
  276. })
  277. const uploadPromises = filePaths.map(filePath => {
  278. return new Promise((resolve, reject) => {
  279. uni.uploadFile({
  280. url: this.apiUrl + '/main/file/upload',
  281. filePath: filePath,
  282. name: 'multiPartFile',
  283. header: {
  284. authorization: uni.getStorageSync("token")
  285. },
  286. success: (res) => {
  287. const data = JSON.parse(res.data)
  288. console.log('data~~~', data)
  289. if (data.code == 0) {
  290. // 构建完整的图片URL
  291. // const fileNames = data.data.storePath.split('/')
  292. // const url = this.apiUrl +
  293. // '/main/file/getFile?objectName=' + data.data.storePath +
  294. // '&fullfilename=' + fileNames[fileNames.length - 1]
  295. resolve(data.data)
  296. } else {
  297. reject(data.message || '上传失败')
  298. }
  299. },
  300. fail: () => {
  301. reject('上传失败')
  302. }
  303. })
  304. })
  305. })
  306. try {
  307. const results = await Promise.all(uploadPromises)
  308. console.log('results~~~', results)
  309. if (type === 'start') {
  310. if (!this.formData.startMileageImages) {
  311. this.formData.startMileageImages = []
  312. }
  313. this.formData.startMileageImages.push(...results)
  314. } else {
  315. if (!this.formData.endMileageImages) {
  316. this.formData.endMileageImages = []
  317. }
  318. this.formData.endMileageImages.push(...results)
  319. }
  320. console.log('startMileageImages~~~', this.formData.startMileageImages)
  321. // 强制更新视图
  322. this.$forceUpdate()
  323. uni.hideLoading()
  324. uni.showToast({
  325. title: '上传成功',
  326. icon: 'success'
  327. })
  328. } catch (error) {
  329. uni.hideLoading()
  330. uni.showToast({
  331. title: error || '上传失败',
  332. icon: 'none'
  333. })
  334. }
  335. },
  336. // 删除图片
  337. deleteImage(type, index) {
  338. uni.showModal({
  339. title: '确认删除',
  340. content: '确定要删除这张图片吗?',
  341. confirmColor: '#157A2C',
  342. success: res => {
  343. if (res.confirm) {
  344. console.log('index~~~', index)
  345. if (type === 'start') {
  346. this.formData.startMileageImages.splice(index, 1)
  347. } else {
  348. this.formData.endMileageImages.splice(index, 1)
  349. }
  350. this.$forceUpdate();
  351. console.log('startMileageImages~~~', this.formData.startMileageImages)
  352. console.log('endMileageImages~~~', this.formData.endMileageImages)
  353. }
  354. }
  355. })
  356. },
  357. // 预览图片
  358. previewImage(images, index) {
  359. // 处理图片数据,确保是字符串数组
  360. const urls = images.map(img => {
  361. if (typeof img === 'string') {
  362. return img
  363. } else if (img && img.url) {
  364. return img.url
  365. }
  366. return ''
  367. }).filter(url => url) // 过滤掉空字符串
  368. uni.previewImage({
  369. urls: urls,
  370. current: index
  371. })
  372. },
  373. async handleExecute(status) {
  374. // 防重复提交检查
  375. if (this.isSubmitting) {
  376. return
  377. }
  378. this.isSubmitting = true
  379. try {
  380. // 验证开始里程(允许0,但不允许负数、空值或NaN)
  381. if (this.formData.startMileage === '' || this.formData.startMileage === null || this.formData.startMileage === undefined || isNaN(this.formData.startMileage) || parseFloat(this.formData.startMileage) < 0) {
  382. uni.showToast({
  383. icon: 'none',
  384. title: '请输入有效的开始里程'
  385. })
  386. return
  387. }
  388. // 验证结束里程(不允许为0、负数、空值或NaN)
  389. if (!this.formData.endMileage || isNaN(this.formData.endMileage) || parseFloat(this.formData.endMileage) <= 0) {
  390. uni.showToast({
  391. icon: 'none',
  392. title: '请输入有效的结束里程'
  393. })
  394. return
  395. }
  396. // 验证里程关系:结束里程必须大于开始里程
  397. if (parseFloat(this.formData.endMileage) <= parseFloat(this.formData.startMileage)) {
  398. uni.showToast({
  399. icon: 'none',
  400. title: '结束里程必须大于开始里程'
  401. })
  402. return
  403. }
  404. // 验证开始里程图片
  405. if (!this.formData.startMileageImages || this.formData.startMileageImages.length === 0) {
  406. uni.showToast({
  407. icon: 'none',
  408. title: '请上传开始里程图片'
  409. })
  410. return
  411. }
  412. // 验证结束里程图片
  413. if (!this.formData.endMileageImages || this.formData.endMileageImages.length === 0) {
  414. uni.showToast({
  415. icon: 'none',
  416. title: '请上传结束里程图片'
  417. })
  418. return
  419. }
  420. // 验证费用信息
  421. if (!this.formData.costList || this.formData.costList.length === 0) {
  422. uni.showToast({
  423. icon: 'none',
  424. title: '请添加费用信息'
  425. })
  426. return
  427. }
  428. // 显示加载状态
  429. uni.showLoading({
  430. title: '提交中...',
  431. mask: true
  432. })
  433. const data = JSON.parse(JSON.stringify(this.formData))
  434. data.endMileageImagesFileIds = data.endMileageImages.map(img => img.id).join(',')
  435. data.startMileageImagesFileIds = data.startMileageImages.map(img => img.id).join(',')
  436. console.log('data~~~', data)
  437. // 调用API
  438. await logistictraklistnoteUpdateAPI({...data, status})
  439. uni.hideLoading()
  440. uni.showModal({
  441. title: '此工单报工成功',
  442. content: '',
  443. confirmText: '确认',
  444. showCancel: false,
  445. success: res => {
  446. if (res.confirm) {
  447. this.back(2)
  448. }
  449. }
  450. })
  451. } catch (error) {
  452. uni.hideLoading()
  453. uni.showToast({
  454. icon: 'none',
  455. title: error.message || '提交失败,请重试',
  456. duration: 3000
  457. })
  458. console.error('提交失败:', error)
  459. } finally {
  460. this.isSubmitting = false
  461. }
  462. },
  463. handleAddFee() {
  464. this.form = {}
  465. this.popShow = true
  466. },
  467. handleDelFee(index) {
  468. uni.showModal({
  469. title: '确认删除',
  470. content: '确定要删除这条费用信息吗?',
  471. confirmColor: '#157A2C',
  472. success: res => {
  473. if (res.confirm) {
  474. this.formData.costList.splice(index, 1)
  475. }
  476. }
  477. })
  478. },
  479. submit() {
  480. if (!this.form.costType) {
  481. uni.showToast({
  482. icon: 'error',
  483. title: '请选择费用类型'
  484. })
  485. return
  486. }
  487. if (!this.form.cost) {
  488. uni.showToast({
  489. icon: 'error',
  490. title: '请输入金额'
  491. })
  492. return
  493. }
  494. this.form.listId = this.formData.id
  495. this.formData.costList.push({
  496. ...this.form
  497. })
  498. this.form = {}
  499. this.close()
  500. },
  501. close() {
  502. this.popShow = false
  503. },
  504. }
  505. }
  506. </script>
  507. <style lang="scss" scoped>
  508. @import '@/components/submitted.scss';
  509. .list-cell {
  510. display: flex;
  511. align-items: center;
  512. justify-content: space-between;
  513. color: $uni-text-color-grey;
  514. padding: 5rpx 20rpx;
  515. }
  516. .font-sm {
  517. font-size: $uni-font-size-sm;
  518. }
  519. .font-text {
  520. color: $uni-text-color;
  521. }
  522. .btn-execute {
  523. background-color: $j-primary-border-green;
  524. width: 450rpx;
  525. margin-top: 10vh;
  526. }
  527. .btn-sparepart {
  528. width: 450rpx;
  529. margin-top: 20rpx;
  530. }
  531. .btn-reassignment {
  532. color: $uni-color-primary;
  533. background-color: transparent;
  534. border: none;
  535. box-shadow: none;
  536. &::after {
  537. display: none;
  538. }
  539. }
  540. .del {
  541. color: red;
  542. font-size: 1.5rex;
  543. }
  544. .maintenance-container {
  545. position: fixed;
  546. top: 0;
  547. bottom: 0;
  548. width: 100vw;
  549. display: flex;
  550. flex-direction: column;
  551. /deep/.u-popup {
  552. flex: none !important;
  553. }
  554. }
  555. .maintenance-wrapper {
  556. position: relative;
  557. flex: 1;
  558. }
  559. .maintenance-content {
  560. padding-top: 40rpx;
  561. box-sizing: border-box;
  562. position: absolute;
  563. top: 0;
  564. bottom: 0;
  565. left: 0;
  566. right: 0;
  567. display: flex;
  568. flex-direction: column;
  569. }
  570. .kd-cell {
  571. line-height: 90rpx;
  572. border-bottom: 1px dashed #dadada;
  573. display: flex;
  574. justify-content: space-between;
  575. .kd-label {
  576. display: inline-block;
  577. width: 7em;
  578. font-weight: bold;
  579. }
  580. .kd-content {
  581. flex: 1;
  582. text-align: left;
  583. word-break: break-all;
  584. }
  585. &.block {
  586. display: block;
  587. }
  588. }
  589. .kd-cell-divider {
  590. border-bottom: 2px solid #dadada;
  591. margin: 10px 0;
  592. }
  593. .upload-btn {
  594. flex: 1;
  595. text-align: center;
  596. color: $theme-color;
  597. }
  598. .image-list {
  599. display: flex;
  600. flex-wrap: wrap;
  601. padding: 10rpx 0;
  602. margin-left: 7em;
  603. .image-item {
  604. position: relative;
  605. width: 150rpx;
  606. height: 150rpx;
  607. margin: 0 10rpx 10rpx 0;
  608. box-sizing: border-box;
  609. image {
  610. width: 100%;
  611. height: 100%;
  612. border-radius: 8rpx;
  613. }
  614. .delete-btn {
  615. position: absolute;
  616. top: -10rpx;
  617. right: -10rpx;
  618. width: 40rpx;
  619. height: 40rpx;
  620. line-height: 40rpx;
  621. text-align: center;
  622. background-color: #ff4d4f;
  623. color: #fff;
  624. border-radius: 50%;
  625. font-size: 32rpx;
  626. cursor: pointer;
  627. z-index: 10;
  628. }
  629. }
  630. .image-add {
  631. width: 150rpx;
  632. height: 150rpx;
  633. border: 2rpx dashed #d9d9d9;
  634. border-radius: 8rpx;
  635. display: flex;
  636. align-items: center;
  637. justify-content: center;
  638. font-size: 60rpx;
  639. color: #999;
  640. margin: 0 10rpx 10rpx 0;
  641. cursor: pointer;
  642. box-sizing: border-box;
  643. &:active {
  644. background-color: #f5f5f5;
  645. }
  646. }
  647. }
  648. .kd-baseInfo {
  649. padding: 0 32rpx;
  650. font-size: 28rpx;
  651. height: 75%;
  652. }
  653. .kd-equipment {
  654. flex: 1;
  655. display: flex;
  656. flex-direction: column;
  657. overflow: hidden;
  658. .kd-type-box {
  659. text-align: center;
  660. padding: 26rpx 0;
  661. view {
  662. position: relative;
  663. display: inline-block;
  664. width: 120rpx;
  665. padding: 4rpx 0;
  666. color: #747474;
  667. margin: 0 20rpx;
  668. background-color: rgba(215, 215, 215, 0.5);
  669. &.type—active {
  670. background-color: #1e7f35;
  671. color: #fff;
  672. }
  673. .count {
  674. position: absolute;
  675. top: -9px;
  676. right: -9px;
  677. width: 18px;
  678. height: 18px;
  679. border-radius: 50%;
  680. font-size: 12px;
  681. background-color: red;
  682. color: #fff;
  683. }
  684. }
  685. }
  686. .kd-list-container {
  687. flex: 1;
  688. display: flex;
  689. flex-direction: column;
  690. overflow: hidden;
  691. padding: 12rpx 18rpx;
  692. background-color: $page-bg;
  693. .u-list {
  694. flex: 1;
  695. height: 100% !important;
  696. }
  697. }
  698. }
  699. .spare-parts {
  700. flex: 1;
  701. overflow: hidden;
  702. }
  703. .kd-card {
  704. background-color: #fff;
  705. margin-bottom: 20rpx;
  706. padding: 8rpx 0;
  707. font-size: 28rpx;
  708. word-break: break-all;
  709. .kd-card-wrapper {
  710. padding: 0 30rpx;
  711. border-bottom: 1px solid #dadada;
  712. }
  713. .kd-cell {
  714. line-height: 60rpx;
  715. }
  716. .kd-cell:last-of-type {
  717. border-bottom: none;
  718. }
  719. .status-box {
  720. margin-right: 16rpx;
  721. }
  722. .card-footer {
  723. display: flex;
  724. justify-content: flex-end;
  725. align-items: center;
  726. padding: 8rpx 0 20rpx;
  727. button {
  728. width: 180rpx;
  729. height: 56rpx;
  730. line-height: 56rpx;
  731. font-size: 28rpx;
  732. margin: 0 8rpx;
  733. }
  734. .primary-btn {
  735. background-color: $j-primary-border-green;
  736. }
  737. }
  738. }
  739. .apply-box {
  740. width: 70%;
  741. margin: 0 auto;
  742. display: flex;
  743. align-items: center;
  744. justify-content: space-around;
  745. }
  746. .select-container {
  747. min-height: 60vh;
  748. .title {
  749. display: flex;
  750. justify-content: space-between;
  751. align-items: center;
  752. height: 100rpx;
  753. line-height: 100rpx;
  754. text-align: center;
  755. background-color: $j-primary-border-green;
  756. font-weight: bold;
  757. position: relative;
  758. font-size: 32rpx;
  759. color: #fff;
  760. padding: 0 30rpx;
  761. box-sizing: border-box;
  762. .btn {
  763. display: flex;
  764. align-items: center;
  765. justify-content: center;
  766. width: 120rpx;
  767. height: 56rpx;
  768. font-size: 28rpx;
  769. border: 1px solid #fff;
  770. text-align: center;
  771. line-height: 56rpx;
  772. border-radius: 8rpx;
  773. transition: opacity 0.3s;
  774. cursor: pointer;
  775. &:active {
  776. opacity: 0.7;
  777. }
  778. &.cancel {
  779. background-color: transparent;
  780. color: #fff;
  781. }
  782. &.confirm {
  783. background-color: rgba(255, 255, 255, 0.2);
  784. color: #fff;
  785. }
  786. }
  787. }
  788. .select-wrapper {
  789. .col {
  790. display: flex;
  791. // min-height: 0rpx;
  792. margin-top: 22rpx;
  793. align-items: center;
  794. padding-right: 14rpx;
  795. .label {
  796. display: inline-block;
  797. width: 200rpx;
  798. text-align: right;
  799. }
  800. .input_text {
  801. flex: 1;
  802. height: 66rpx;
  803. line-height: 66rpx;
  804. padding: 0rpx 16rpx;
  805. box-sizing: border-box;
  806. font-size: 28rpx;
  807. border: 1px solid #eceeec;
  808. border-radius: 8rpx;
  809. }
  810. input {
  811. flex: 1;
  812. border: 1rpx solid #e5e5e5;
  813. height: 66rpx;
  814. border-radius: 8rpx;
  815. font-size: 28rpx;
  816. padding: 0rpx 16rpx;
  817. color: #6a6a6a;
  818. }
  819. textarea {
  820. border: 1rpx solid #e5e5e5;
  821. flex: 1;
  822. height: 100rpx;
  823. }
  824. .tab_box {
  825. display: flex;
  826. flex-direction: row;
  827. flex-wrap: wrap;
  828. width: 520rpx;
  829. .tab {
  830. display: flex;
  831. flex-direction: row;
  832. border: 2rpx solid #d9ecff;
  833. background-color: #f4f4f5;
  834. border-color: #e9e9eb;
  835. color: #909399;
  836. margin-left: 8rpx;
  837. margin-bottom: 8rpx;
  838. padding: 2rpx 8rpx;
  839. font-size: 28rpx;
  840. }
  841. .icon {
  842. margin-left: 6rpx;
  843. }
  844. }
  845. }
  846. }
  847. }
  848. </style>