details.vue 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942
  1. <template>
  2. <view class="content-box">
  3. <uni-nav-bar fixed="true" statusBar="true" left-icon="back" :title="title" background-color="#F7F9FA"
  4. color="#000" @clickLeft="back" right-icon="scan" @clickRight="handlScanCode"></uni-nav-bar>
  5. <!-- 投料 -->
  6. <view class="list_box">
  7. <u-list @scrolltolower="scrolltolower">
  8. <view v-for="(item, index) in List" :key="index" class="card_box">
  9. <workOrderBom :item='item' pType="feed" :taskType="item.currentTaskDiagram.type"
  10. @handleScan='handleScan'></workOrderBom>
  11. <paramBom v-if='item.paramDetailList.length != 0' :list='item.paramDetailList'></paramBom>
  12. <!-- //设备信息 -->
  13. <deviceBom v-if='item.equipmentList.length != 0' :workOrderId='item.workOrderId' :wordItem='item'
  14. :list='item.equipmentList' :turnover="item.turnover" @scanIt='scanIt' :type="type"></deviceBom>
  15. <!-- //在制品 -->
  16. <productsBom v-if="item.product != null && item.product != '{}'" :itemObj="item"
  17. :productsObj="item.product">
  18. </productsBom>
  19. <!-- feedNeedMould -->
  20. <modelBom v-if='item.modelList.length != 0' :workOrderId='item.workOrderId' :list='item.modelList'
  21. @scanIt='scanIt' :pattern="'feed'">
  22. </modelBom>
  23. <instanceBom v-if='item.instanceList.length != 0' :workOrderId='item.workOrderId'
  24. :list='item.instanceList' :equipmentList="item.equipmentList"
  25. :currentTaskDiagram="item.currentTaskDiagram" :workInfo="item">
  26. </instanceBom>
  27. <semiProductBom v-if='item.semiProductList.length != 0' :workOrderId='item.workOrderId'
  28. :list='item.semiProductList' :equipmentList="item.equipmentList"
  29. :currentTaskDiagram="item.currentTaskDiagram" :workInfo="item"></semiProductBom>
  30. <!-- 11 周转车 -->
  31. <turnoverBom v-if='item.turnover.length != 0' :list='item.turnover' :wordItem='item' pattern='feed'
  32. @handleScan='handleScan' @handleDel='handleDel'></turnoverBom>
  33. <aridRegion v-if='item.aridRegionList.length != 0' :list='item.aridRegionList'
  34. @handleScan='handleScan'></aridRegion>
  35. <palletBom v-if='item.palletList.length != 0' :palletList='item.palletList'></palletBom>
  36. <revolvingDiskBom v-if="item.revolvingDiskList.length != 0"
  37. :revolvingDiskList="item.revolvingDiskList"></revolvingDiskBom>
  38. <packingBom v-if='item.packingList.length != 0' :list='item.packingList'></packingBom>
  39. <view :class="[operateBtn ? 'flex_btn' : 'flex_btn2']">
  40. <image v-if="operateBtn" class="jiantou" src="../../../static/rightJt.png"
  41. @click="operateBtn = false"> </image>
  42. <view class="close_box" @click="operateBtn = true">
  43. <image v-if="!operateBtn" class="close" src="../../../static/close.png"></image>
  44. </view>
  45. <view v-if="!operateBtn" @click="openDetails(item.workOrderId)">出库单</view>
  46. <view v-if="!operateBtn" @click="removeCacheFn()">清空缓存</view>
  47. </view>
  48. <view :class="[idsList.length == 1 ? 'operate_box' : 'operate_box2']">
  49. <u-button size="small" class="u-reset-button" type="success"
  50. @click="handAdd(item.workOrderId)">手动添加</u-button>
  51. <u-button size="small" class="u-reset-button" type="success"
  52. @click="scanIt(item.workOrderId)">扫一扫</u-button>
  53. </view>
  54. </view>
  55. </u-list>
  56. </view>
  57. <view class="bottom-wrapper">
  58. <view class="btn_box" @click="save(1)">缓存</view>
  59. <view class="btn_box" @click="save(2)">一键投料</view>
  60. </view>
  61. </view>
  62. </template>
  63. <script>
  64. import workOrderBom from './components/workOrderBom.vue' //gd
  65. import deviceBom from './components/deviceBom.vue' //设备信息
  66. import modelBom from './components/modelBom.vue' //模具信息
  67. import instanceBom from './components/instanceBom.vue'
  68. import semiProductBom from './components/semiProductBom' //半成品信息
  69. import aridRegion from './components/aridRegion' //干燥区
  70. import paramBom from './components/paramBom.vue' //
  71. import turnoverBom from './components/turnoverBom.vue' //周转车信息
  72. import packingBom from './components/packingBom.vue' //包装信息
  73. import productsBom from './components/productsBom.vue' //在制品信息
  74. import palletBom from './components/palletBom' //舟皿
  75. import revolvingDiskBom from './components/revolvingDiskBom'
  76. import {
  77. workorderList,
  78. getByCode,
  79. scanLedger,
  80. feedSaveCache,
  81. feedGetCache,
  82. removeCache
  83. } from '@/api/pda/workOrder.js'
  84. import {
  85. batchSave
  86. } from '@/api/pda/feeding.js'
  87. export default {
  88. components: {
  89. workOrderBom,
  90. deviceBom,
  91. modelBom,
  92. instanceBom,
  93. semiProductBom,
  94. aridRegion,
  95. paramBom,
  96. turnoverBom,
  97. packingBom,
  98. productsBom,
  99. palletBom,
  100. revolvingDiskBom,
  101. },
  102. data() {
  103. return {
  104. title: '',
  105. idsList: [],
  106. List: [],
  107. taskId: null,
  108. type: '',
  109. clientEnvironmentId: null,
  110. operateBtn: true
  111. }
  112. },
  113. onLoad(options) {
  114. console.log(options, 'optionsoptionsoptionsoptionsoptionsoptions');
  115. this.title = options.taskName ? options.taskName + '-投料' : '投料'
  116. let queryArray = decodeURIComponent(options.arr);
  117. this.idsList = JSON.parse(queryArray);
  118. this.taskId = options.taskId;
  119. this.taskName = options.taskName;
  120. this.type = options.type;
  121. this.getList()
  122. this.clientEnvironmentId = uni.getStorageSync("userInfo") && uni.getStorageSync("userInfo").clientEnvironmentId
  123. },
  124. onShow() {
  125. uni.$off("setSelectList");
  126. uni.$on("setSelectList", (selectList, id) => {
  127. this.List.forEach(m => {
  128. if (m.workOrderId == id) {
  129. let modelList = [] // 模具
  130. let instanceList = [] // 投料
  131. let aridRegionList = [] // 干燥区
  132. let equipmentList = [] // 生产设备
  133. let palletList = [] // 舟皿
  134. let revolvingDiskList = [] // 周转盘
  135. let semiProductList = [] // 半成品
  136. let turnover = [] //周转车
  137. selectList.forEach(f => {
  138. if (f.rootCategoryLevelId == 4) {
  139. equipmentList = equipmentList.concat(f)
  140. equipmentList.map(d => {
  141. if (d.equipmentLabelJson.length) {
  142. d.equipmentLabelJson.map(v => {
  143. if (v.SJSB) {
  144. d.isSJSB = v.SJSB
  145. }
  146. })
  147. }
  148. })
  149. console.log(equipmentList, '----------');
  150. }
  151. if (f.rootCategoryLevelId == 5) {
  152. modelList = modelList.concat(f)
  153. } else if (f.rootCategoryLevelId == 1) {
  154. instanceList = instanceList.concat(f)
  155. } else if (f.rootCategoryLevelId == 11) {
  156. aridRegionList = aridRegionList.concat(f)
  157. } else if (f.rootCategoryLevelId == 7) {
  158. turnover = turnover.concat(f)
  159. } else if (f.rootCategoryLevelId == 8) {
  160. palletList = palletList.concat(f)
  161. } else if (f.rootCategoryLevelId == 26) {
  162. revolvingDiskList = revolvingDiskList.concat(f)
  163. } else if ([23, 2, 9, 28].includes(Number(f.rootCategoryLevelId))) {
  164. semiProductList = semiProductList.concat(f)
  165. }
  166. })
  167. this.$set(m, 'modelList', modelList)
  168. this.$set(m, 'instanceList', instanceList)
  169. this.$set(m, 'aridRegionList', aridRegionList)
  170. this.$set(m, 'equipmentList', equipmentList)
  171. this.$set(m, 'turnover', turnover)
  172. this.$set(m, 'palletList', palletList)
  173. this.$set(m, 'revolvingDiskList', revolvingDiskList)
  174. this.$set(m, 'semiProductList', semiProductList)
  175. }
  176. })
  177. });
  178. },
  179. methods: {
  180. scrolltolower() { },
  181. async save(type) {
  182. console.log(this.List);
  183. this.List.forEach(f => {
  184. this.$isJobExls(2, f)
  185. })
  186. this.List.forEach(f => {
  187. f.instanceList.forEach(e => {
  188. if (Object.prototype.hasOwnProperty.call(e, 'type')) {
  189. e.extInfo['type'] = e.type
  190. }
  191. e.extInfo['isConsumable'] = e.isConsumable
  192. })
  193. })
  194. const isCache = await this.checkCache(type)
  195. if (!isCache) {
  196. return false
  197. }
  198. if (this.clientEnvironmentId == 3 && this.List[0].currentTaskDiagram.type == 1) {
  199. if (this.List[0] && this.List[0].executorTime && this.List[0].executorTime != undefined) {
  200. // 正则表达式1:匹配 yyyy-MM-dd 格式
  201. let dateRegex = /^\d{4}-\d{2}-\d{2}$/;
  202. if (dateRegex.test(this.List[0].executorTime.trimRight())) {
  203. this.List[0].executorTime = this.List[0].executorTime + ' 00:00:00'
  204. }
  205. } else {
  206. uni.showToast({
  207. title: `请先选择时间投料时间`,
  208. icon: 'none'
  209. })
  210. return false
  211. }
  212. }
  213. const isDevice = await this.checkdDevice()
  214. if (!isDevice) {
  215. return false
  216. }
  217. // item.equipmentList
  218. // 索尔环境下,需要填写炉次号
  219. if (this.clientEnvironmentId === 2) {
  220. if (this.List[0].equipmentList.length) {
  221. if (!this.equipmentListList('heatNumber')) {
  222. return uni.showToast({
  223. title: `请填写炉次号`,
  224. icon: 'none'
  225. })
  226. }
  227. }
  228. }
  229. batchSave(this.List).then(res => {
  230. uni.redirectTo({
  231. url: `/pages/pda/feeding/index/index?feedStatus=1`,
  232. });
  233. })
  234. },
  235. equipmentListList(propertyName) {
  236. return this.List.every(f => {
  237. if (f.equipmentList && f.equipmentList.length > 0) {
  238. return f.equipmentList.every(obj => {
  239. // 检查属性存在且不为空(null, undefined, 空字符串等)
  240. return obj.extInfo.hasOwnProperty(propertyName) &&
  241. obj.extInfo[propertyName] !== null &&
  242. obj.extInfo[propertyName] !== undefined &&
  243. obj.extInfo[propertyName] !== '';
  244. })
  245. }
  246. })
  247. },
  248. checkCache(type) {
  249. uni.hideLoading();
  250. return new Promise((resolve) => {
  251. if (type == 1) {
  252. feedSaveCache(this.List).then(rr => {
  253. uni.showToast({
  254. title: `已经缓存`,
  255. icon: 'none'
  256. })
  257. })
  258. resolve(false)
  259. } else if (type == 2) {
  260. resolve(true)
  261. }
  262. })
  263. },
  264. getList() {
  265. workorderList({
  266. ids: this.idsList,
  267. taskId: this.taskId
  268. }).then(res => {
  269. this.List = res.map(m => {
  270. m.workOrderId = m.id
  271. m.instanceList = [] // 物料
  272. m.equipmentList = [] // 设备
  273. m.modelList = [] // 模具
  274. m.aridRegionList = [] // 干燥区
  275. m.packingList = [] // 包装
  276. m.palletList = [] // 舟皿
  277. m.revolvingDiskList = [] // 周转盘
  278. m.semiProductList = [] //半成品
  279. if (m.pickOutInList.length > 0) {
  280. m.pickOutInList.forEach(f => {
  281. if (f.rootCategoryLevelId == 1) {
  282. m.instanceList.push(f)
  283. } else if (f.rootCategoryLevelId == 4) {
  284. m.modelList.push(f)
  285. } else if (f.rootCategoryLevelId == 5) {
  286. m.modelList.push(f)
  287. } else if (f.rootCategoryLevelId == 11) {
  288. m.aridRegionList.push(f)
  289. } else if (f.rootCategoryLevelId == 13) {
  290. m.packingList.push(f)
  291. } else if (f.rootCategoryLevelId == 8) {
  292. m.palletList.push(f)
  293. } else if (f.rootCategoryLevelId == 26) {
  294. m.revolvingDiskList.push(f)
  295. } else if ([23, 2, 9, 28].includes(Number(f
  296. .rootCategoryLevelId))) {
  297. m.semiProductList.push(f)
  298. }
  299. })
  300. }
  301. // 处理字段
  302. m.quality == '' ? m.quality = {} : ''
  303. if (!Object.prototype.hasOwnProperty.call(m, 'product')) {
  304. m.product = '{}'
  305. }
  306. delete m.id
  307. if (this.taskId) {
  308. m.taskId = this.taskId
  309. m.taskName = this.taskName
  310. }
  311. return {
  312. ...m
  313. }
  314. })
  315. }).finally(() => {
  316. this.getCacheFn()
  317. })
  318. },
  319. handleScan(id, type) {
  320. uni.scanCode({
  321. success: (res) => {
  322. this.scanData(res.result, type, id)
  323. }
  324. })
  325. },
  326. scanData(result, type, id) {
  327. if (type == 'wordOrder') {
  328. let isFals = this.List.some(m => m.code == result)
  329. if (isFals) {
  330. uni.showToast({
  331. title: '工单已存在',
  332. icon: 'none'
  333. })
  334. return false
  335. }
  336. getByCode(result).then(res => {
  337. let _arr = this.List
  338. _arr.forEach((e, index) => {
  339. if (e.workOrderId == id && res) {
  340. _arr[index] = res
  341. }
  342. })
  343. this.List = _arr
  344. this.$forceUpdate()
  345. })
  346. }
  347. },
  348. scanIt(id) {
  349. uni.scanCode({
  350. success: (res) => {
  351. this.scanItData(res.result, id)
  352. }
  353. })
  354. },
  355. scanItData(result, id) {
  356. scanLedger(result).then(res => {
  357. let _arr = []
  358. if (res.length == 1 && res[0].rootCategoryLevelId == 4) { // 设备
  359. _arr = this.List
  360. _arr.forEach((e, index) => {
  361. if (e.workOrderId == id) {
  362. _arr[index].equipmentList = _arr[index].equipmentList.concat(res)
  363. }
  364. })
  365. this.List = _arr
  366. this.$forceUpdate()
  367. } else if (res.length >= 1 && res[0].rootCategoryLevelId == 5) { // 模具
  368. _arr = this.List
  369. _arr.forEach((e, index) => {
  370. if (e.workOrderId == id) {
  371. _arr[index].modelList = res
  372. }
  373. })
  374. this.List = _arr
  375. this.$forceUpdate()
  376. } else if (res.length >= 1 && [1].includes(Number(res[0].rootCategoryLevelId))) { // 物料
  377. _arr = this.List
  378. _arr.forEach((e, index) => {
  379. if (e.workOrderId == id) {
  380. _arr[index].instanceList = _arr[index].instanceList.concat(res)
  381. }
  382. })
  383. this.List = _arr
  384. this.$forceUpdate()
  385. } else if (res.length >= 1 && [23, 2, 9, 28].includes(Number(res[0].rootCategoryLevelId))) {
  386. _arr = this.List
  387. _arr.forEach((e, index) => {
  388. if (e.workOrderId == id) {
  389. _arr[index].semiProductList = _arr[index].semiProductList.concat(res)
  390. }
  391. })
  392. this.List = _arr
  393. this.$forceUpdate()
  394. } else if (res.length >= 1 && res[0].rootCategoryLevelId == 11) { // 干燥区
  395. _arr = this.List
  396. _arr.forEach((e, index) => {
  397. if (e.workOrderId == id) {
  398. let isFals = _arr[index].aridRegionList.some(m => m.code == res[0]
  399. .aridRegionList[0].code)
  400. if (isFals) {
  401. uni.showToast({
  402. title: '干燥区已存在',
  403. icon: 'none'
  404. })
  405. return false
  406. }
  407. let _obj = res[0].aridRegionList[0]
  408. if (_obj.status == 0) {
  409. _obj['name'] = res[0].name
  410. _obj['region'] = res[0].extInfo.region
  411. _arr[index].aridRegionList = _arr[index].aridRegionList.concat(res[0]
  412. .aridRegionList)
  413. } else {
  414. uni.showToast({
  415. title: '干燥区已占用',
  416. icon: 'none'
  417. })
  418. }
  419. }
  420. })
  421. this.List = _arr
  422. this.$forceUpdate()
  423. } else if (res.length >= 1 && res[0].rootCategoryLevelId == 7) { // 周转车
  424. _arr = this.List
  425. _arr.forEach((e, index) => {
  426. if (e.workOrderId == id) {
  427. let isFals = _arr[index].turnover.some(m => m.code == res[0].code)
  428. if (isFals) {
  429. uni.showToast({
  430. title: '周转车已存在',
  431. icon: 'none'
  432. })
  433. return false
  434. }
  435. _arr.forEach((e, index) => {
  436. if (e.workOrderId == id) {
  437. _arr[index].turnover = _arr[index].turnover.concat(res)
  438. }
  439. })
  440. this.List = _arr
  441. this.$forceUpdate()
  442. }
  443. })
  444. }
  445. })
  446. },
  447. // 全部扫一扫
  448. handlScanCode() {
  449. uni.scanCode({
  450. success: (res) => {
  451. this.scanItAllData(res.result)
  452. }
  453. })
  454. },
  455. scanItAllData(result) {
  456. scanLedger(result).then(res => {
  457. let _arr = []
  458. if (res.length == 1 && res[0].rootCategoryLevelId == 4) { // 设备
  459. _arr = this.List
  460. _arr.forEach((e, index) => {
  461. res['extInfo'].fixCode = res.fixCode
  462. e.equipmentList = e.equipmentList.concat(res)
  463. })
  464. this.List = _arr
  465. this.$forceUpdate()
  466. } else if (res.length >= 1 && res[0].rootCategoryLevelId == 5) { // 模具
  467. _arr = this.List
  468. _arr.forEach((e, index) => {
  469. e.modelList = res
  470. })
  471. this.List = _arr
  472. this.$forceUpdate()
  473. } else if (res.length >= 1 && [1].includes(Number(res[0].rootCategoryLevelId))) {
  474. _arr = this.List
  475. _arr.forEach((e, index) => {
  476. e.instanceList = e.instanceList.concat(res)
  477. })
  478. this.List = _arr
  479. this.$forceUpdate()
  480. } else if (res.length >= 1 && [23, 2, 9, 28].includes(Number(res[0].rootCategoryLevelId))) {
  481. _arr = this.List
  482. _arr.forEach((e, index) => {
  483. e.semiProductList = e.semiProductList.concat(res)
  484. })
  485. this.List = _arr
  486. this.$forceUpdate()
  487. } else if (res.length >= 1 && res[0].rootCategoryLevelId == 7) { // 周转车
  488. _arr = this.List
  489. if (_arr.length == 1) {
  490. _arr.forEach((e, index) => {
  491. e.turnover = e.turnover.concat(res)
  492. })
  493. this.List = _arr
  494. this.$forceUpdate()
  495. } else if (_arr.length > 1) {
  496. uni.showToast({
  497. title: '多个工单通过下面单个扫一扫添加',
  498. icon: 'none'
  499. })
  500. }
  501. }
  502. })
  503. },
  504. getCacheFn() {
  505. let parma = {
  506. workOrderIds: this.idsList,
  507. taskId: this.taskId,
  508. type: 2
  509. }
  510. feedGetCache(parma).then(res => {
  511. if (res.length == 0) {
  512. return false
  513. }
  514. let objList = res[0].extInfo.objList
  515. this.List.forEach(f => {
  516. objList.forEach(o => {
  517. if (f.workOrderId == o.workOrderId && f.taskId == o.taskId) {
  518. // f['instanceList'] = o.instanceList || [] // 实例
  519. f['equipmentList'] = o.equipmentList || [] // 设备
  520. f['modelList'] = o.modelList || [] // 模具
  521. f['aridRegionList'] = o.aridRegionList || [] // 干燥区
  522. f['packingList'] = o.packingList || [] // 包装
  523. f['palletList'] = o.palletList || [] //舟皿
  524. f['instanceList'] = o.instanceList || [] // 物料
  525. f['revolvingDiskList'] = o.revolvingDiskList || [] // 周转盘
  526. f['semiProductList'] = o.semiProductList || [] // 半成品
  527. f['turnover'] = o.turnover || [] // 周转车
  528. this.$forceUpdate()
  529. }
  530. })
  531. })
  532. })
  533. },
  534. removeCacheFn() {
  535. uni.showModal({
  536. title: '缓存',
  537. content: '是否清空缓存!',
  538. confirmText: '确认', //这块是确定按钮的文字
  539. success: rr => {
  540. if (rr.confirm) {
  541. let parma = {
  542. workOrderIds: this.idsList,
  543. taskId: this.taskId,
  544. type: 2
  545. }
  546. removeCache(parma).then(res => {
  547. this.getList()
  548. })
  549. }
  550. }
  551. })
  552. },
  553. handAdd(id) {
  554. const storageKey = Date.now() + "";
  555. uni.setStorageSync(storageKey, this.List || []);
  556. uni.navigateTo({
  557. url: `/pages/pda/workOrder/search/index?id=${id}&storageKey=${storageKey}&isType=feed&taskId=${this.taskId}`
  558. })
  559. },
  560. openDetails(id) {
  561. const storageKey = Date.now() + "";
  562. uni.setStorageSync(storageKey, this.List || []);
  563. let url = `/pages/pda/feeding/single?id=${id}&taskId=${this.taskId}&storageKey=${storageKey}`
  564. uni.navigateTo({
  565. url
  566. })
  567. },
  568. checkdDevice() {
  569. return new Promise((resolve) => {
  570. console.log(this.List)
  571. let isFalse = this.List.every(item => {
  572. return item.equipmentList && item.equipmentList.length > 0
  573. })
  574. if (isFalse) {
  575. resolve(true)
  576. } else {
  577. uni.showModal({
  578. title: '提示',
  579. content: '没有选择设备,是否继续?',
  580. confirmText: '确认', //这块是确定按钮的文字
  581. success: function (res) {
  582. if (res.confirm) {
  583. resolve(true)
  584. } else {
  585. resolve(false)
  586. }
  587. }
  588. })
  589. }
  590. })
  591. },
  592. },
  593. beforeDestroy() {
  594. uni.hideLoading();
  595. },
  596. }
  597. </script>
  598. <style lang="scss" scoped>
  599. .content-box {
  600. height: 100vh;
  601. overflow: hidden;
  602. display: flex;
  603. flex-direction: column;
  604. }
  605. .list_box {
  606. flex: 1;
  607. overflow: hidden;
  608. padding: 4rpx 0;
  609. .u-list {
  610. height: 100% !important;
  611. }
  612. .card_box {
  613. padding: 16rpx;
  614. }
  615. }
  616. .bottom-wrapper {
  617. width: 100%;
  618. display: flex;
  619. align-items: center;
  620. justify-content: space-around;
  621. .btn_box {
  622. width: 50%;
  623. height: 88rpx;
  624. line-height: 88rpx;
  625. background: $theme-color;
  626. text-align: center;
  627. font-size: 36rpx;
  628. font-style: normal;
  629. font-weight: 400;
  630. color: #fff;
  631. &:first-child {
  632. border-right: 2rpx solid #fff;
  633. }
  634. }
  635. }
  636. .operate_box {
  637. position: fixed;
  638. right: 0;
  639. top: 400rpx;
  640. /deep/ .u-button {
  641. margin-top: 20rpx;
  642. width: 150rpx;
  643. border-radius: 22rpx 0 0 22rpx;
  644. opacity: 0.6;
  645. font-size: 22rpx;
  646. }
  647. }
  648. .operate_box2 {
  649. display: flex;
  650. /deep/ .u-button {
  651. margin-top: 20rpx;
  652. width: 150rpx;
  653. }
  654. }
  655. .flex_btn {
  656. position: fixed;
  657. right: 0;
  658. bottom: 160rpx;
  659. width: 40rpx;
  660. height: 50rpx;
  661. line-height: 66rpx;
  662. border-radius: 22rpx 0 0 22rpx;
  663. background: $theme-color;
  664. text-align: center;
  665. font-size: 22rpx;
  666. font-style: normal;
  667. font-weight: 400;
  668. color: #fff;
  669. opacity: 0.6;
  670. .jiantou {
  671. width: 30rpx;
  672. height: 30rpx;
  673. }
  674. }
  675. .flex_btn2 {
  676. position: fixed;
  677. right: 0;
  678. bottom: 160rpx;
  679. width: 126rpx;
  680. min-height: 140rpx;
  681. line-height: 62rpx;
  682. border-radius: 22rpx 0 0 22rpx;
  683. background: $theme-color;
  684. text-align: center;
  685. font-size: 22rpx;
  686. font-style: normal;
  687. font-weight: 400;
  688. color: #fff;
  689. opacity: 0.7;
  690. .close_box {
  691. height: 50rpx;
  692. line-height: 50rpx;
  693. width: 126rpx;
  694. text-align: left;
  695. .close {
  696. width: 40rpx;
  697. height: 40rpx;
  698. padding: 6rpx 10rpx;
  699. }
  700. }
  701. }
  702. </style>