zngs.vue 26 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069
  1. <template>
  2. <view class="content">
  3. <view class="jg"></view>
  4. <!-- #ifdef MP-WEIXIN -->
  5. <view class="" style="position: absolute;backgroun: black;"
  6. :style="{'height':info.height+ 'px','top':info.top+ 'px'}">
  7. <view class="tit" :style="{'height': info.height + 'px'}">
  8. <view class="black" @click="goBlack">
  9. <image src="../../static/icon/fanhui.png" mode=""></image>
  10. </view>
  11. <view class="title">
  12. 智能估算
  13. </view>
  14. <view class="black"></view>
  15. </view>
  16. </view>
  17. <view class="gs-top">
  18. <view class="bw" :style="{'height': (info.height + info.top) + 'px'}"></view>
  19. <view class="flex info">
  20. <view class="">
  21. 基本信息
  22. </view>
  23. <view class="">
  24. 零件厚度
  25. </view>
  26. <view class="">
  27. 价格预估
  28. </view>
  29. </view>
  30. <image :src="`../../static/img/js0${tabcurrent}.png`" mode=""></image>
  31. </view>
  32. <!-- #endif -->
  33. <scroll-view scroll-y="true" :style="{'height': height}" class="scroll-wrap">
  34. <template v-if="tabcurrent == 0">
  35. <view class="list-item flex">
  36. <view class="item-name">
  37. 长(米)
  38. </view>
  39. <input type="digit" placeholder="请填写长度(米)" class="item-val" v-model="chang">
  40. </view>
  41. <view class="list-item flex">
  42. <view class="item-name">
  43. 宽(米)
  44. </view>
  45. <input type="digit" placeholder="请填写宽度(米)" class="item-val" v-model="kuan">
  46. </view>
  47. <view class="list-item flex">
  48. <view class="item-name">
  49. 高(米)
  50. </view>
  51. <picker @change="bindGaodu" :range="gaoduList">
  52. <input type="text" placeholder="请选择" class="item-val" v-model="gao" disabled>
  53. </picker>
  54. </view>
  55. <view class="list-item flex">
  56. <view class="item-name">
  57. 是否保温
  58. </view>
  59. <picker @change="bindBaowen" :range="son">
  60. <input type="text" placeholder="请选择" class="item-val" v-model="isBaowen" disabled>
  61. </picker>
  62. </view>
  63. <view class="list-item flex" v-if="isBaowen == '是'">
  64. <view class="item-name">
  65. 保温材料
  66. </view>
  67. <picker @change="bindBaowenCl" :range="warmList" range-key="name">
  68. <input type="text" placeholder="请选择" class="item-val" v-model="baowenCl" disabled>
  69. </picker>
  70. </view>
  71. <view class="list-item flex">
  72. <view class="item-name">
  73. 是否需要钢槽
  74. </view>
  75. <picker @change="bindGangc" :range="son">
  76. <input type="text" placeholder="请选择" class="item-val" v-model="isGangC" disabled>
  77. </picker>
  78. </view>
  79. <view class="list-item flex" v-if="isGangC == '是'">
  80. <view class="item-name">
  81. 钢槽材料
  82. </view>
  83. <picker @change="bindGangcCl" :range="channelList" range-key="name">
  84. <input type="text" placeholder="请选择" class="item-val" v-model="gangcCl" disabled>
  85. </picker>
  86. </view>
  87. <view class="list-item flex">
  88. <view class="item-name">
  89. 是否需要人梯
  90. </view>
  91. <picker @change="bindRent" :range="son">
  92. <input type="text" placeholder="请选择" class="item-val" v-model="isRent" disabled>
  93. </picker>
  94. </view>
  95. <!-- <view class="list-item flex">
  96. <view class="item-name">
  97. 是否需要隔板
  98. </view>
  99. <picker @change="bindValue" :range="geban" range-key="name" ref="geban">
  100. <input type="text" placeholder="请选择" class="item-val" v-model="gebanname" disabled>
  101. </picker>
  102. </view> -->
  103. <view class="xyb" @click="tot">
  104. 下一步
  105. </view>
  106. <view class="wxtip">
  107. 价格仅供参考 不作投资依据
  108. </view>
  109. </template>
  110. <template v-if="tabcurrent == 1">
  111. <view class="list-item flex">
  112. <view class="item-name">
  113. 顶板厚度
  114. </view>
  115. <picker @change="bindFoof" :range="roofList" range-key="name">
  116. <input type="text" placeholder="请选择" class="item-val" v-model="roof" disabled>
  117. </picker>
  118. </view>
  119. <view class="list-item flex">
  120. <view class="item-name">
  121. 底板厚度
  122. </view>
  123. <picker @change="bindFloor" :range="floorList" range-key="name">
  124. <input type="text" placeholder="请选择" class="item-val" v-model="floor" disabled>
  125. </picker>
  126. </view>
  127. <view class="list-item flex" v-for="(item,index) in (Math.ceil(gao))" :key="'sideplate'+index">
  128. <view class="item-name">
  129. 侧板厚度{{index + 1}}
  130. </view>
  131. <picker @change="bindValue" :range="sideplateList" range-key="name" :id="`sideplate${index}`">
  132. <view class="item-val" :class="{'noact': showValue(index,'sideplate') == '请选择'}">
  133. {{showValue(index,'sideplate')}}
  134. </view>
  135. </picker>
  136. </view>
  137. <view class="list-item flex">
  138. <view class="item-name">
  139. 立柱厚度
  140. </view>
  141. <picker @change="bindColumn" :range="columnList" range-key="name">
  142. <input type="text" placeholder="请选择" class="item-val" v-model="column" disabled>
  143. </picker>
  144. </view>
  145. <view class="list-item flex" v-for="(item,index) in (Math.ceil(gao)-1)" :key="'lacing' + index">
  146. <view class="item-name">
  147. 主拉厚度{{index + 1}}
  148. </view>
  149. <picker @change="bindValue" :range="lacingList" range-key="name" :id="`lacing${index}`">
  150. <view class="item-val" :class="{'noact': showValue(index,'lacing') == '请选择'}">
  151. {{showValue(index,'lacing')}}
  152. </view>
  153. </picker>
  154. </view>
  155. <view class="list-item flex" v-for="(item,index) in (Math.ceil(gao)-1)" :key="'fula' + index">
  156. <view class="item-name">
  157. 辅拉厚度{{index + 1}}
  158. </view>
  159. <picker @change="bindValue" :range="fulaList" range-key="name" :id="`fula${index}`">
  160. <view class="item-val" :class="{'noact': showValue(index,'fula') == '请选择'}">
  161. {{showValue(index,'fula')}}
  162. </view>
  163. </picker>
  164. </view>
  165. <view class="btn-wrap flex">
  166. <view class="xyb syb" @click="too">
  167. 上一步
  168. </view>
  169. <view class="xyb ksjs" @click="toth">
  170. 开始计算
  171. </view>
  172. </view>
  173. <view class="wxtip" style="padding: 0 20rpx 20rpx 0;">
  174. 价格仅供参考 不作投资依据
  175. </view>
  176. </template>
  177. <template v-if="tabcurrent == 2">
  178. <view class="flex jg-jz">
  179. <view class="">
  180. 规格
  181. </view>
  182. <view class="zj">
  183. {{chang}}m*{{kuan}}m*{{gao}}m={{chang*kuan*gao}}吨{{isBaowen == '是'?'保温水箱': '冷水箱'}},
  184. {{2*(chang*kuan + chang*gao + kuan*gao)}}平方
  185. </view>
  186. </view>
  187. <view class="new-bg">
  188. <view class="bg-line flex">
  189. <view class="title">
  190. 名称
  191. </view>
  192. <view class="name">
  193. 材质/厚度
  194. </view>
  195. <view class="specifications">
  196. 规格
  197. </view>
  198. <view class="number">
  199. 数量
  200. </view>
  201. <view class="unit_price">
  202. 单价
  203. </view>
  204. <view class="ot-price">
  205. 总价格
  206. </view>
  207. </view>
  208. <view class="bg-line flex" v-for="item in jsjg.table">
  209. <view class="title clamp2">
  210. {{item.title}}
  211. </view>
  212. <view class="name">
  213. {{item.name}}
  214. </view>
  215. <view class="specifications">
  216. {{item.specifications}}
  217. </view>
  218. <view class="number">
  219. {{item.number}}
  220. </view>
  221. <view class="unit_price">
  222. {{item.unit_price*1}}
  223. </view>
  224. <view class="ot-price">
  225. {{item.ot_price*1}}
  226. </view>
  227. </view>
  228. </view>
  229. <view class="flex jg-jz">
  230. <view class="">
  231. 总重量:{{(jsjg.zzl*1).toFixed(2)}}kg
  232. </view>
  233. <view class="zj">
  234. 含税总价:{{jsjg.zj*1}}元
  235. </view>
  236. </view>
  237. <!-- <view class="jg-wrap">
  238. <view class="jsjg-wrap flex" v-for="jitem in jsjg.table">
  239. <view class="jg-left">
  240. <view class="left-top">
  241. <text
  242. class="item-tit">{{jitem.title}}</text><text>单价:{{jitem.unit_price}}数量:{{jitem.number}}</text>
  243. </view>
  244. <view class="left-btm">
  245. 规格:{{jitem.specifications}} {{jitem.name}}
  246. </view>
  247. </view>
  248. <view class="jg-right">
  249. ¥{{jitem.ot_price}}元
  250. </view>
  251. </view>
  252. <view class="flex jg-zj">
  253. <view class="">
  254. 总计(元):
  255. </view>
  256. <view class="price">
  257. {{jsjg.zj}}
  258. </view>
  259. </view>
  260. <view class="jg-tip">
  261. *此结果为预估价格 详细请联系我们
  262. </view>
  263. </view> -->
  264. <view class="btn-wrap flex">
  265. <view class="xyb syb" @click="endjs">
  266. 结束计算
  267. </view>
  268. <button open-type="contact" plain="true" class="xyb ksjs" style="color: #fff;border: none;">
  269. 联系我们
  270. </button>
  271. <!-- <view class="xyb ksjs" @click="openKf">
  272. </view> -->
  273. </view>
  274. </template>
  275. </scroll-view>
  276. <!-- 客服 start -->
  277. <uni-popup ref="popupkf" type="center">
  278. <view class="popup-box">
  279. <view class="img">
  280. <image src="../../static/img/img009.png" mode=""></image>
  281. </view>
  282. <view class="mian">
  283. <view class="delivery">
  284. <view class="title">已经为您定制专属客服</view>
  285. <image src="../../static/img/img010.png" mode=""></image>
  286. </view>
  287. <view class="nocancel">客服VX:{{ text }}</view>
  288. <view class="comfirm-box">
  289. <view class="cancel" @click="cancel">取消</view>
  290. <view class="comfirm" @click="comfirm(text)">复制微信</view>
  291. </view>
  292. </view>
  293. </view>
  294. </uni-popup>
  295. <!-- 客服 end -->
  296. </view>
  297. </template>
  298. <script>
  299. let info = ''
  300. import {
  301. getZyList,
  302. calculation,
  303. getDefault
  304. } from '@/api/index.js'
  305. // #ifdef MP-WEIXIN
  306. info = wx.getMenuButtonBoundingClientRect()
  307. // #endif
  308. export default {
  309. data() {
  310. return {
  311. gaoduList: [1, 1.5, 2, 2.5, 3, 3.5, 4, 4.5, 5],
  312. son: ['是', '否'],
  313. isBaowen: '否', //是否保温
  314. warmList: [], //保温材料
  315. baowenCl: '', //选择的保温材料
  316. baowenClId: '', //保温材料id
  317. isGangC: '否', //是否钢槽
  318. channelList: [], //钢槽材料
  319. gangcCl: '', //选择的钢槽材料
  320. gangcClId: '', //钢槽材料id
  321. isRent: '否', //是否人梯
  322. roofList: [], //顶板厚度
  323. roof: '', ///选择的顶板厚度
  324. roofId: '', //顶板厚度idfloor
  325. floorList: [], //底板厚度
  326. floor: '', ///选择的底板厚度
  327. floorId: '', //底板厚度id
  328. sideplateList: [], //侧板厚度
  329. sideplate: [], //选择的侧板
  330. columnList: [], //立柱厚度
  331. column: '', //选择的立柱厚度
  332. columnId: '', //立柱厚度id
  333. lacingList: [], //主拉厚度
  334. lacing: [], //选择的主拉
  335. fulaList: [], //辅拉厚度
  336. fula: [], //选择的辅拉厚度
  337. tabcurrent: 0,
  338. height: '',
  339. info: info,
  340. chang: '',
  341. kuan: '',
  342. gao: '',
  343. loading: false,
  344. type: 0,
  345. jsjg: {},
  346. text: ''
  347. }
  348. },
  349. onLoad(opt) {
  350. if (opt.type) {
  351. this.type = opt.type
  352. }
  353. },
  354. onShow() {
  355. console.log(this.info)
  356. this.getZyList()
  357. },
  358. onReachBottom() {
  359. },
  360. onReady(res) {
  361. var obj = this;
  362. uni.getSystemInfo({
  363. success: resu => {
  364. const query = uni.createSelectorQuery();
  365. query.select('.scroll-wrap').boundingClientRect();
  366. query.exec(function(res) {
  367. obj.height = resu.windowHeight - res[0].top + 'px';
  368. });
  369. },
  370. fail: res => {}
  371. });
  372. },
  373. methods: {
  374. // 获取默认方案
  375. getMr() {
  376. },
  377. // 选择高度
  378. bindGaodu(e) {
  379. console.log(e.detail.value)
  380. this.gao = this.gaoduList[e.detail.value]
  381. },
  382. // 选择是否保温
  383. bindBaowen(e) {
  384. this.isBaowen = this.son[e.detail.value]
  385. },
  386. //选择保温材料
  387. bindBaowenCl(e) {
  388. // this.isBaowen = this.son[e.detail.value]
  389. this.baowenCl = this.warmList[e.detail.value].name
  390. this.baowenClId = this.warmList[e.detail.value].id
  391. },
  392. //选择是否钢槽
  393. bindGangc(e) {
  394. this.isGangC = this.son[e.detail.value]
  395. },
  396. //选择钢槽材料
  397. bindGangcCl(e) {
  398. this.gangcCl = this.channelList[e.detail.value].name
  399. this.gangcClId = this.channelList[e.detail.value].id
  400. },
  401. //是否人梯
  402. bindRent(e) {
  403. this.isRent = this.son[e.detail.value]
  404. },
  405. //选择顶板厚度
  406. bindFoof(e) {
  407. this.roof = this.roofList[e.detail.value].name
  408. this.roofId = this.roofList[e.detail.value].id
  409. },
  410. //选择底板厚度
  411. bindFloor(e) {
  412. this.floor = this.floorList[e.detail.value].name
  413. this.floorId = this.floorList[e.detail.value].id
  414. },
  415. // 显示侧板、主拉、辅拉
  416. showValue(index, tip) {
  417. if (this[tip][index * 1]) {
  418. return this[tip][index * 1].name
  419. } else {
  420. return '请选择'
  421. }
  422. },
  423. //选择立柱厚度
  424. bindColumn(e) {
  425. this.column = this.columnList[e.detail.value].name
  426. this.columnId = this.columnList[e.detail.value].id
  427. },
  428. //选择侧板、主拉、辅拉
  429. bindValue(e) {
  430. let obj = this
  431. console.log(e)
  432. let name = e.currentTarget.id
  433. let index = name.replace(/[^\d]/g, '')
  434. let path = name.replace(/[0-9]/g, '')
  435. console.log(index, 'index')
  436. obj.$set(obj[path], index * 1, {})
  437. obj.$set(obj[path][index * 1], 'name', obj[path + 'List'][e.detail.value].name)
  438. obj.$set(obj[path][index * 1], 'id', obj[path + 'List'][e.detail.value].id)
  439. // obj.$set(obj[path],name,{'name': '','id': ''})
  440. // obj.$set(obj[path][name],'name',obj[path+'List'][e.detail.value].name)
  441. // obj.$set(obj[path][name],'id',obj[path+'List'][e.detail.value].id)
  442. console.log(obj[path], path)
  443. },
  444. goBlack() {
  445. uni.switchTab({
  446. url: '/pages/index/index'
  447. })
  448. },
  449. // bindValue(e) {
  450. // let obj = this
  451. // console.log(e,arguments)
  452. // // let name = e.currentTarget.dataset.ref
  453. // // obj[name + 'name'] = obj[name][e.detail.value].name
  454. // // obj[name + 'id'] = obj[name][e.detail.value].id
  455. // },
  456. tot() {
  457. let obj = this
  458. if (obj.chang == '') {
  459. return obj.$api.msg('请输入长度')
  460. }
  461. if (obj.kuan == '') {
  462. return obj.$api.msg('请输入宽度')
  463. }
  464. if (obj.gao == '') {
  465. return obj.$api.msg('请选择高度')
  466. }
  467. if (obj.isBaowen == '') {
  468. return obj.$api.msg('请选择是否保温')
  469. }
  470. if (obj.isBaowen == '是') {
  471. if (obj.baowenCl == '') {
  472. return obj.$api.msg('请选择保温材料')
  473. }
  474. }
  475. if (obj.isGangC == '') {
  476. return obj.$api.msg('请选择是否需要钢槽')
  477. }
  478. if (obj.isGangC == '是') {
  479. if (obj.gangcCl == '') {
  480. return obj.$api.msg('请选择钢槽材料')
  481. }
  482. }
  483. if (obj.isRent == '') {
  484. return obj.$api.msg('请选择是否需要人梯')
  485. }
  486. if (obj.gebanname == '') {
  487. return obj.$api.msg('请选择是否需要隔板')
  488. }
  489. getDefault({
  490. high: obj.gao,
  491. is_gc: obj.type
  492. }).then(res => {
  493. console.log(res, '999999', res.data)
  494. // 处理默认值
  495. if (res.data.roof) {
  496. console.log('处理默认值')
  497. console.log(res.data.roof)
  498. obj.roof = res.data.roof.name
  499. obj.roofId = res.data.roof.id
  500. } else {
  501. console.log('清除默认')
  502. obj.roof = ''
  503. obj.roofId = ''
  504. }
  505. if (res.data.floor) {
  506. obj.floor = res.data.floor.name
  507. obj.floorId = res.data.floor.id
  508. } else {
  509. obj.floor = ''
  510. obj.floorId = ''
  511. }
  512. if (res.data.side_plate) {
  513. obj.sideplate = res.data.side_plate
  514. } else {
  515. obj.sideplate = []
  516. }
  517. if (res.data.column) {
  518. obj.column = res.data.column.name
  519. obj.columnId = res.data.column.id
  520. } else {
  521. obj.column = ''
  522. obj.columnId = ''
  523. }
  524. if (res.data.lacing) {
  525. obj.lacing = res.data.lacing
  526. } else {
  527. obj.lacing = []
  528. }
  529. if (res.data.fula) {
  530. obj.fula = res.data.fula
  531. } else {
  532. obj.fula = []
  533. }
  534. obj.tabcurrent = 1
  535. })
  536. },
  537. too() {
  538. let obj = this
  539. obj.tabcurrent = 0
  540. },
  541. toth() {
  542. let obj = this
  543. if (obj.loading) {
  544. return
  545. }
  546. let lacing = obj.lacing.map(item => {
  547. return item.id
  548. })
  549. let fula = obj.fula.map(item => {
  550. return item.id
  551. })
  552. let side_plate = obj.sideplate.map(item => {
  553. return item.id
  554. })
  555. if (obj.roof == '') {
  556. return obj.$api.msg('请选择顶板厚度')
  557. }
  558. if (obj.floor == '') {
  559. return obj.$api.msg('请选择底板厚度')
  560. }
  561. // 判断侧板是否完整
  562. let cblen = Math.ceil(obj.gao)
  563. if (side_plate.length < cblen) {
  564. return obj.$api.msg('请选择侧板厚度')
  565. }
  566. if (obj.column == '') {
  567. return obj.$api.msg('请选择立柱厚度')
  568. }
  569. //判断辅拉,主拉是否完整
  570. let lalen = Math.ceil(obj.gao) - 1
  571. console.log(lalen, 'lalen')
  572. if (lacing.length < lalen) {
  573. return obj.$api.msg('请选择主拉厚度')
  574. }
  575. if (fula.length < lalen) {
  576. return obj.$api.msg('请选择辅拉厚度')
  577. }
  578. console.log(lacing, 'lacing++++')
  579. obj.loading = true
  580. uni.showLoading({
  581. title: '计算中...'
  582. })
  583. calculation({
  584. long: obj.chang, //长
  585. wide: obj.kuan,
  586. high: obj.gao,
  587. is_warm: obj.isBaowen == '是' ? 1 : 0,
  588. warm: obj.baowenClId,
  589. is_channel: obj.isGangC == '是' ? 1 : 0,
  590. channel: obj.gangcClId,
  591. is_human_ladder: obj.isRent == '是' ? 1 : 0,
  592. is_gc: obj.type,
  593. floor: obj.floorId,
  594. roof: obj.roofId,
  595. column: obj.columnId,
  596. lacing: lacing,
  597. fula: fula,
  598. side_plate: side_plate,
  599. }).then(res => {
  600. console.log(res)
  601. uni.hideLoading()
  602. obj.jsjg = res.data
  603. if(res.data.remind) {
  604. uni.showModal({
  605. title: '温馨提醒',
  606. content:res.data.remind,
  607. showCancel: false,
  608. complete() {
  609. obj.tabcurrent = 2
  610. }
  611. })
  612. }else {
  613. obj.tabcurrent = 2
  614. }
  615. }).catch(err => {
  616. uni.hideLoading()
  617. obj.loading = false
  618. })
  619. },
  620. endjs() {
  621. uni.switchTab({
  622. url: '/pages/index/index'
  623. })
  624. },
  625. openKf() {
  626. },
  627. getZyList() {
  628. let obj = this
  629. getZyList({
  630. is_gc: obj.type
  631. }).then(res => {
  632. console.log(res)
  633. obj.warmList = res.data.warm //保温材料
  634. obj.channelList = res.data.channel //钢槽材料
  635. obj.roofList = res.data.roof //顶板厚度
  636. obj.floorList = res.data.floor //底板厚度
  637. obj.sideplateList = res.data.side_plate //侧板厚度
  638. obj.columnList = res.data.column //立柱厚度
  639. obj.lacingList = res.data.lacing //主拉厚度
  640. obj.fulaList = res.data.fula
  641. })
  642. },
  643. // 打开客服
  644. openKf() {
  645. this.$refs.popupkf.open();
  646. },
  647. // 关闭客服
  648. cancel() {
  649. this.$refs.popupkf.close();
  650. },
  651. // 复制客服微信
  652. comfirm(text) {
  653. console.log(text);
  654. const result = this.uniCopy(text);
  655. if (result === false) {
  656. uni.showToast({
  657. title: '不支持'
  658. });
  659. } else {
  660. uni.showToast({
  661. title: '复制成功',
  662. icon: 'none'
  663. });
  664. }
  665. this.$refs.popupkf.close();
  666. },
  667. uniCopy(content) {
  668. /**
  669. * 小程序端 和 app端的复制逻辑
  670. */
  671. //#ifndef H5
  672. uni.setClipboardData({
  673. data: content,
  674. success: function() {
  675. console.log('success');
  676. return true;
  677. }
  678. });
  679. //#endif
  680. /**
  681. * H5端的复制逻辑
  682. */
  683. // #ifdef H5
  684. if (!document.queryCommandSupported('copy')) {
  685. //为了兼容有些浏览器 queryCommandSupported 的判断
  686. // 不支持
  687. return false;
  688. }
  689. let textarea = document.createElement('textarea');
  690. textarea.value = content;
  691. textarea.readOnly = 'readOnly';
  692. document.body.appendChild(textarea);
  693. textarea.select(); // 选择对象
  694. textarea.setSelectionRange(0, content.length); //核心
  695. let result = document.execCommand('copy'); // 执行浏览器复制命令
  696. textarea.remove();
  697. return result;
  698. // #endif
  699. },
  700. }
  701. }
  702. </script>
  703. <style lang="scss">
  704. .jg {
  705. height: var(--status-bar-height);
  706. width: 100%;
  707. background: linear-gradient(-43deg, #3455e3, #0328c7);
  708. }
  709. .gs-top {
  710. width: 750rpx;
  711. // height: 240rpx;
  712. padding-bottom: 40rpx;
  713. background: linear-gradient(-43deg, #4464ED, #0328C7);
  714. // position: relative;
  715. image {
  716. width: 560rpx;
  717. height: 37rpx;
  718. margin: auto;
  719. display: block;
  720. }
  721. .info {
  722. padding-top: 20rpx;
  723. padding-bottom: 15rpx;
  724. view {
  725. width: 33%;
  726. text-align: center;
  727. font-size: 28rpx;
  728. font-weight: 500;
  729. color: #cad0f4;
  730. }
  731. }
  732. }
  733. .tit {
  734. display: flex;
  735. width: 750rpx;
  736. // height: 44px;
  737. align-items: center;
  738. .black {
  739. width: 80rpx;
  740. padding-left: 30rpx;
  741. image {
  742. width: 19rpx;
  743. height: 33rpx;
  744. }
  745. }
  746. .title {
  747. flex-grow: 1;
  748. text-align: center;
  749. font-size: 35rpx;
  750. font-weight: 500;
  751. color: #fff;
  752. }
  753. }
  754. .list-item {
  755. height: 105rpx;
  756. border-bottom: 1px solid #ECECEC;
  757. width: 700rpx;
  758. margin: auto;
  759. align-items: center;
  760. font-size: 30rpx;
  761. font-weight: 500;
  762. color: #222222;
  763. .item-name {
  764. width: 250rpx;
  765. }
  766. .item-val {
  767. // width: 400rpx;
  768. min-width: 400rpx;
  769. // background-color:red;
  770. flex-grow: 1;
  771. text-align: right;
  772. }
  773. .noact {
  774. color: #999;
  775. }
  776. }
  777. .xyb {
  778. width: 520rpx;
  779. height: 88rpx;
  780. line-height: 88rpx;
  781. text-align: center;
  782. background: linear-gradient(270deg, #4464ED, #0328C7);
  783. border-radius: 44rpx;
  784. margin: 60rpx auto 0;
  785. font-size: 32rpx;
  786. font-weight: 500;
  787. color: #FFFFFF;
  788. }
  789. .syb {
  790. width: 318rpx;
  791. height: 88rpx;
  792. background: #ECEFFC;
  793. border: 1px solid #4261E3;
  794. border-radius: 44px;
  795. color: #4261E3;
  796. }
  797. .ksjs {
  798. width: 318rpx;
  799. height: 88rpx;
  800. background: linear-gradient(270deg, #4464ED, #0328C7);
  801. border-radius: 44rpx;
  802. }
  803. .btn-wrap {
  804. padding-bottom: 74rpx;
  805. }
  806. .jg-wrap {
  807. width: 710rpx;
  808. margin: auto;
  809. background: #FFFFFF;
  810. box-shadow: 0px 3rpx 18rpx 0px rgba(114, 136, 231, 0.27);
  811. border-radius: 0px 0px 14rpx 14rpx;
  812. }
  813. .jsjg-wrap {
  814. height: 110rpx;
  815. border-top: 1px solid #EDEDED;
  816. border-bottom: 1px solid #EDEDED;
  817. width: 646rpx;
  818. margin: auto;
  819. font-size: 22rpx;
  820. padding: 0 15rpx;
  821. .jg-left {
  822. .left-top {
  823. .item-tit {
  824. font-size: 30rpx;
  825. font-weight: bold;
  826. color: #0C0C0C;
  827. padding-right: 10rpx;
  828. }
  829. }
  830. }
  831. .jg-right {
  832. flex-shrink: 0;
  833. font-size: 32rpx;
  834. font-weight: 500;
  835. color: #282828;
  836. }
  837. }
  838. .jg-zj {
  839. padding: 35rpx 43rpx 20rpx 40rpx;
  840. font-size: 28rpx;
  841. font-weight: 500;
  842. color: #444444;
  843. .price {
  844. font-size: 60rpx;
  845. font-weight: bold;
  846. color: #444444;
  847. &::before {
  848. content: '¥';
  849. font-size: 32rpx;
  850. padding-right: 10rpx;
  851. }
  852. }
  853. }
  854. .jg-tip {
  855. font-size: 25rpx;
  856. font-weight: 500;
  857. color: #A0A0A0;
  858. text-align: right;
  859. padding-right: 44rpx;
  860. padding-bottom: 50rpx;
  861. }
  862. .popup-box {
  863. width: 522rpx;
  864. height: 605rpx;
  865. background-color: #ffffff;
  866. border-radius: 20rpx;
  867. position: relative;
  868. .img {
  869. position: relative;
  870. top: -56rpx;
  871. left: 0;
  872. width: 522rpx;
  873. height: 132rpx;
  874. display: flex;
  875. justify-content: center;
  876. image {
  877. border-radius: 20rpx 20rpx 0 0;
  878. width: 450rpx;
  879. height: 132rpx;
  880. }
  881. }
  882. .mian {
  883. margin-top: -44rpx;
  884. display: flex;
  885. flex-direction: column;
  886. align-items: center;
  887. // padding: 32rpx 32rpx;
  888. background-color: #ffffff;
  889. border-radius: 0 0 20rpx 20rpx;
  890. text-align: center;
  891. .delivery {
  892. font-size: 40rpx;
  893. color: #333333;
  894. display: flex;
  895. align-items: center;
  896. flex-direction: column;
  897. image {
  898. margin-top: 48rpx;
  899. width: 172rpx;
  900. height: 160rpx;
  901. }
  902. }
  903. .nocancel {
  904. font-size: 32rpx;
  905. color: #333333;
  906. margin-top: 14rpx;
  907. }
  908. .comfirm-box {
  909. margin-top: 52rpx;
  910. display: flex;
  911. // margin-bottom: 32rpx;
  912. // justify-content: space-around;
  913. .cancel {
  914. display: flex;
  915. align-items: center;
  916. justify-content: center;
  917. width: 197rpx;
  918. height: 74rpx;
  919. border: 1px solid #dcc786;
  920. border-radius: 38rpx;
  921. font-size: 32rpx;
  922. color: #605128;
  923. }
  924. .comfirm {
  925. margin-left: 32rpx;
  926. display: flex;
  927. align-items: center;
  928. justify-content: center;
  929. width: 197rpx;
  930. height: 74rpx;
  931. background: linear-gradient(-90deg, #d1ba77 0%, #f7e8ad 100%);
  932. border-radius: 38px;
  933. font-size: 32rpx;
  934. color: #605128;
  935. }
  936. }
  937. }
  938. }
  939. .new-bg {
  940. width: 750rpx;
  941. background-color: #fff;
  942. padding: 0 10rpx;
  943. .bg-line {
  944. height: 100rpx;
  945. font-size: 26rpx;
  946. justify-content: flex-start;
  947. border-bottom: 1px solid #eeeeee;
  948. &:nth-child(odd) {
  949. background-color: #f6f7fb;
  950. }
  951. view {
  952. text-align: center;
  953. height: 100rpx;
  954. display: flex;
  955. align-items: center;
  956. justify-content: center;
  957. border-right: 1px solid #eee;
  958. border-top: 1px solid #eee;
  959. }
  960. .title {
  961. width: 128rpx;
  962. text-align: left;
  963. }
  964. .name {
  965. width: 160rpx;
  966. }
  967. .specifications {
  968. width: 150rpx;
  969. }
  970. .number {
  971. width: 85rpx;
  972. }
  973. .unit_price {
  974. width: 120rpx;
  975. }
  976. .ot-price {
  977. width: 110rpx;
  978. border-right: none;
  979. }
  980. }
  981. }
  982. .jg-jz {
  983. padding: 0 20rpx;
  984. font-size: 30rpx;
  985. height: 90rpx;
  986. line-height: 90rpx;
  987. }
  988. .wxtip {
  989. font-style:italic;
  990. font-size: 28rpx;
  991. text-align: right;
  992. padding: 40rpx 20rpx 0 0;
  993. }
  994. </style>