tran_detail.vue 26 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157
  1. <template>
  2. <view class="container">
  3. <view class="introduce-section">
  4. <view class="price-box">
  5. <view class="title">{{tran.tranNo}}</view>
  6. <view class="title-tip">
  7. <text class="price-tip">¥</text>
  8. <text class="price">{{tran.price}}</text>
  9. <text class="price-tip">元/吨</text>
  10. </view>
  11. </view>
  12. <!-- <view class="bot-row">
  13. <view class='cu-tag radius line-orange'>{{tran.sender}}</view>
  14. <view class='cu-tag radius line-orange'>{{tran.senderPhone}}</view>
  15. </view> -->
  16. <view v-if='tran.total' class="bot-row">
  17. <view class='cu-tag radius line-orange'>剩余量: {{numFilter(tran.total - tran.tranCount)}}吨</view>
  18. <view class='cu-tag radius line-orange'>总量: {{tran.total}}吨</view>
  19. </view>
  20. </view>
  21. <view class="detail-desc">
  22. <view class="d-header">
  23. <text>基本信息</text>
  24. </view>
  25. <view class="c-list">
  26. <view class="c-row b-b">
  27. <text class="tit">发货人</text>
  28. <view class="con-list">
  29. <text>{{tran.sender}}</text>
  30. </view>
  31. </view>
  32. <view class="c-row b-b">
  33. <text class="tit">发货人电话</text>
  34. <view class="con-list">
  35. <text>{{tran.senderPhone}}</text>
  36. </view>
  37. </view>
  38. <view v-if="tran.tranPhone" class="c-row b-b">
  39. <text class="tit">物流部电话</text>
  40. <view class="con-list">
  41. <text>{{tran.tranPhone}}</text>
  42. </view>
  43. </view>
  44. <view class="c-row b-b">
  45. <text class="tit">收货人</text>
  46. <view class="con-list">
  47. <text>{{tran.receiver}}</text>
  48. </view>
  49. </view>
  50. <view class="c-row b-b">
  51. <text class="tit">收货人电话</text>
  52. <view class="con-list">
  53. <text>{{tran.receiverPhone}}</text>
  54. </view>
  55. </view>
  56. <view v-if='tran.goodsName&&tran.goodsName!="外采"' class="c-row b-b">
  57. <text class="tit">货名</text>
  58. <view class="con-list">
  59. <text>{{tran.goodsName}}</text>
  60. </view>
  61. </view>
  62. <view class="c-row b-b">
  63. <text class="tit">起始地</text>
  64. <view class="con-list">
  65. <text>{{tran.startPlace}}</text>
  66. </view>
  67. </view>
  68. <view class="c-row b-b">
  69. <text class="tit">目的地</text>
  70. <view class="con-list">
  71. <text>{{tran.endPlace}}</text>
  72. </view>
  73. </view>
  74. <view v-if='tran.total' class="c-row b-b">
  75. <text class="tit">剩余量</text>
  76. <view class="con-list">
  77. <text>{{numFilter(tran.total-tran.tranCount)}}</text>
  78. </view>
  79. </view>
  80. </view>
  81. <view class="d-header">
  82. <text>承运信息</text>
  83. </view>
  84. <view class="c-list">
  85. <view class="c-row b-b">
  86. <text class="tit">车牌号</text>
  87. <view class="con-list">
  88. <input placeholder="请填写" name="input" v-model="carNo" @input="carNoInput"></input>
  89. </view>
  90. <button class='cu-btn bg-green shadow' @click="getHistoryCar">选择车辆</button>
  91. </view>
  92. <!-- <view class="cu-bar bg-white">
  93. <view class="action">
  94. 司机身份证(正、反面)上传
  95. </view>
  96. </view>
  97. <view class="cu-form-group">
  98. <view class="grid col-2 grid-square flex-sub">
  99. <view class="bg-img" v-if="personNoImg != ''" @tap="ViewImage" :data-url="personNoImg">
  100. <image :src="personNoImg" mode="aspectFit"></image>
  101. <view class="cu-tag bg-red" @tap.stop="DelImg" :data-index="0">
  102. <text class='cuIcon-close'></text>
  103. </view>
  104. </view>
  105. <view class="bg-img" v-if="personNoImg1 != ''" @tap="ViewImage" :data-url="personNoImg1">
  106. <image :src="personNoImg1" mode="aspectFit"></image>
  107. <view class="cu-tag bg-red" @tap.stop="DelImg" :data-index="1">
  108. <text class='cuIcon-close'></text>
  109. </view>
  110. </view>
  111. <view class="solids" @tap="ChooseImagePerson" v-if="personNoImg == '' || personNoImg1 == ''">
  112. <text class='cuIcon-cameraadd'></text>
  113. </view>
  114. </view>
  115. </view> -->
  116. <!-- <view class="c-row b-b">
  117. <text class="tit">承运人</text>
  118. <view class="con-list">
  119. <input placeholder="请填写" name="input" v-model="driver" @input="driverInput"></input>
  120. </view>
  121. </view> -->
  122. <!-- <view class="c-row b-b">
  123. <text class="tit">承运人身份证号</text>
  124. <view class="con-list">
  125. <input placeholder="请填写" name="input" v-model="driverNo" @input="driverNoInput"></input>
  126. </view>
  127. </view>
  128. <view class="c-row b-b">
  129. <text class="tit">承运人联系地址</text>
  130. <view class="con-list">
  131. <input placeholder="请填写" name="input" v-model="driverAddress" @input="driverAddressInput"></input>
  132. </view>
  133. </view> -->
  134. <view class="c-row b-b">
  135. <text class="tit">承运人微信号</text>
  136. <view class="con-list">
  137. <input placeholder="请填写" name="input" v-model="wechatNo" @input="wechatNoInput"></input>
  138. </view>
  139. </view>
  140. <view class="c-row b-b">
  141. <text class="tit">承运人手机号</text>
  142. <view class="con-list">
  143. <input placeholder="请填写" type="mobile" name="input" v-model="driverPhone" @input="driverPhoneInput"></input>
  144. </view>
  145. </view>
  146. <view class="c-row b-b">
  147. <view class="tit">验证码</view>
  148. <view class="con-list">
  149. <input type="mobile" value="" placeholder="6位验证码" maxlength="6"
  150. data-key="verifyCode" @input="verifyCodeInput" style="width: 60%;"></input>
  151. </view>
  152. <button class='cu-btn bg-green shadow':disabled="sendDisabled" @click="doGetVerify">{{sendText}}</button>
  153. </view>
  154. <!-- <view class="c-row b-b">
  155. <text class="tit">承运吨数</text>
  156. <view class="con-list">
  157. <input placeholder="请填写" type="mobile" name="input" @input="tranCountInput"></input>
  158. </view>
  159. </view> -->
  160. <!-- <view class="cu-bar bg-white ">
  161. <view class="action">
  162. 司机驾驶证(主页、副页)上传
  163. </view>
  164. </view>
  165. <view class="cu-form-group">
  166. <view class="grid col-2 grid-square flex-sub">
  167. <view class="bg-img" v-if="driverNoImg != ''" @tap="ViewImage" :data-url="driverNoImg">
  168. <image :src="driverNoImg" mode="aspectFit"></image>
  169. <view class="cu-tag bg-red" @tap.stop="DelImg" :data-index="2">
  170. <text class='cuIcon-close'></text>
  171. </view>
  172. </view>
  173. <view class="bg-img" v-if="driverNoImg1 != ''" @tap="ViewImage" :data-url="driverNoImg1">
  174. <image :src="driverNoImg1" mode="aspectFit"></image>
  175. <view class="cu-tag bg-red" @tap.stop="DelImg" :data-index="3">
  176. <text class='cuIcon-close'></text>
  177. </view>
  178. </view>
  179. <view class="solids" @tap="ChooseImageDriver" v-if="driverNoImg == '' || driverNoImg1 == ''">
  180. <text class='cuIcon-cameraadd'></text>
  181. </view>
  182. </view>
  183. </view>
  184. <view class="cu-bar bg-white ">
  185. <view class="action">
  186. 行车证(主页、副页)上传
  187. </view>
  188. </view>
  189. <view class="cu-form-group">
  190. <view class="grid col-2 grid-square flex-sub">
  191. <view class="bg-img" v-if="carNoImg != ''" @tap="ViewImage" :data-url="carNoImg">
  192. <image :src="carNoImg" mode="aspectFit"></image>
  193. <view class="cu-tag bg-red" @tap.stop="DelImg" :data-index="4">
  194. <text class='cuIcon-close'></text>
  195. </view>
  196. </view>
  197. <view class="bg-img" v-if="carNoImg1 != ''" @tap="ViewImage" :data-url="carNoImg1">
  198. <image :src="carNoImg1" mode="aspectFit"></image>
  199. <view class="cu-tag bg-red" @tap.stop="DelImg" :data-index="5">
  200. <text class='cuIcon-close'></text>
  201. </view>
  202. </view>
  203. <view class="solids" @tap="ChooseImageCar" v-if="carNoImg == '' || carNoImg1 == ''">
  204. <text class='cuIcon-cameraadd'></text>
  205. </view>
  206. </view>
  207. </view> -->
  208. </view>
  209. </view>
  210. <view class="cu-modal" :class="modalName=='MycarModal'?'show':''" @tap="hideModal">
  211. <scroll-view scroll-y class="cu-dialog" :style="mycarStyle" @tap.stop="">
  212. <view class="cu-list menu text-center" >
  213. <view class="cu-item" v-for="(item,index) in carInfo" :key="index" @click="mycarClick(item)">
  214. <label class="flex justify-between align-center flex-sub">
  215. <view class="flex-sub">{{item.carNo+" "+item.driver+" "+item.driverPhone}}</view>
  216. </label>
  217. </view>
  218. </view>
  219. </scroll-view>
  220. </view>
  221. <!-- 底部操作菜单 -->
  222. <view class="page-bottom">
  223. <view class="action-btn-group">
  224. <button type="primary" class=" action-btn no-border buy-now-btn" @click="contactUs">联系我们</button>
  225. <button v-if="tran.status == 30" type="primary" class=" action-btn no-border add-cart-btn" @click="tranNow">立即承运</button>
  226. <button v-else type="primary" class=" action-btn no-border add-cart-btn" >承运结束</button>
  227. </view>
  228. </view>
  229. </view>
  230. </template>
  231. <script>
  232. import uploadImage from '@/components/ossutil/uploadFile.js';
  233. import uniNumberBox from '@/components/uni-number-box.vue';
  234. import {
  235. mapState
  236. } from 'vuex';
  237. export default {
  238. components: {
  239. uniNumberBox
  240. },
  241. data() {
  242. return {
  243. tran: {
  244. id: undefined,
  245. tranCount: 0,
  246. tranNo:'',
  247. total: 0,
  248. price: 0,
  249. startPlace: undefined,
  250. endPlace: undefined,
  251. goodsName: undefined,
  252. sender:'',
  253. senderPhone:'',
  254. status:0,
  255. receiver:'',
  256. receiverPhone:'',
  257. carNo:'',
  258. verifyCode:'',
  259. personNoImg:'',
  260. personNoImg1:'',
  261. driverNoImg:'',
  262. driverNoImg1:'',
  263. carNoImg:'',
  264. carNoImg1:'',
  265. },
  266. carInfo:[],
  267. driver:'',
  268. driverNo:'',
  269. driverAddress:'',
  270. driverPhone:'',
  271. carNo:'',
  272. tranCount: 0,
  273. sendText:'获取验证码',
  274. sendDisabled: false,
  275. verifyCode:'',
  276. personNoImg:'',
  277. personNoImg1:'',
  278. driverNoImg:'',
  279. driverNoImg1:'',
  280. carNoImg:'',
  281. carNoImg1:'',
  282. modalName:'',
  283. wechatNo:'',
  284. mycarStyle:'',
  285. };
  286. },
  287. onShow() {
  288. },
  289. onLoad(options) {
  290. const that = this
  291. uni.showLoading({
  292. title: '正在加载',
  293. mask:true
  294. })
  295. that.$api.request('tran', 'getTranDetailInfo', {
  296. id: options.id
  297. }, failres => {
  298. that.$api.msg(failres.errmsg)
  299. uni.hideLoading()
  300. }).then(res => {
  301. that.tran = res.data
  302. if(that.tran.tranCount >= that.tran.total){
  303. that.tran.status = 1
  304. }
  305. uni.hideLoading()
  306. })
  307. },
  308. computed: {
  309. ...mapState(['hasLogin','userInfo'])
  310. },
  311. methods: {
  312. numFilter (value) {
  313. if(!value){
  314. return 0
  315. }
  316. // 截取当前数据到小数点后两位
  317. let realVal = parseFloat(value).toFixed(2)
  318. return realVal
  319. },
  320. // ChooseImagePerson() {
  321. // const that = this
  322. // uni.showLoading({
  323. // title: '正在识别'
  324. // })
  325. // uni.chooseImage({
  326. // count: 1, //默认9
  327. // sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
  328. // sourceType: ['album','camera'], //从相册选择
  329. // success: (res) => {
  330. // //上传图片
  331. // //图片路径可自行修改
  332. // uploadImage(res.tempFilePaths[0], 'personNoImg/',
  333. // result => {
  334. // if (this.personNoImg.length != 0) {
  335. // this.personNoImg1 = result
  336. // uni.hideLoading()
  337. // } else {
  338. // this.personNoImg = result
  339. // that.$api.request('tran', 'personShibie', {
  340. // personImg: result,
  341. // type:"driver"
  342. // }, failres => {
  343. // that.$api.msg(failres.errmsg)
  344. // uni.hideLoading()
  345. // }).then(res => {
  346. // that.driver = res.data.driver
  347. // that.driverNo = res.data.driverNo
  348. // that.driverAddress = res.data.driverAddress
  349. // that.$api.msg('请核对身份信息')
  350. // uni.hideLoading()
  351. // })
  352. // }
  353. // }
  354. // )
  355. // },
  356. // complete:function(res){
  357. // uni.hideLoading()
  358. // }
  359. // });
  360. // },
  361. // ChooseImageDriver() {
  362. // uni.chooseImage({
  363. // count: 1, //默认9
  364. // sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
  365. // sourceType: ['album','camera'], //从相册选择
  366. // success: (res) => {
  367. // //上传图片
  368. // //图片路径可自行修改
  369. // uploadImage(res.tempFilePaths[0], 'driverNoImg/',
  370. // result => {
  371. // if (this.driverNoImg.length != 0) {
  372. // this.driverNoImg1 = result
  373. // } else {
  374. // this.driverNoImg = result
  375. // }
  376. // uni.hideLoading();
  377. // }
  378. // )
  379. // }
  380. // });
  381. // },
  382. // ChooseImageCar() {
  383. // uni.chooseImage({
  384. // count: 1, //默认9
  385. // sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
  386. // sourceType: ['album','camera'], //从相册选择
  387. // success: (res) => {
  388. // //上传图片
  389. // //图片路径可自行修改
  390. // uploadImage(res.tempFilePaths[0], 'carNoImg/',
  391. // result => {
  392. // if (this.carNoImg.length != 0) {
  393. // this.carNoImg1 = result
  394. // } else {
  395. // this.carNoImg = result
  396. // }
  397. // uni.hideLoading();
  398. // }
  399. // )
  400. // }
  401. // });
  402. // },
  403. // ViewImage(e) {
  404. // var img = [];
  405. // img = e.currentTarget.dataset.url.split(' ')
  406. // uni.previewImage({
  407. // current:0,
  408. // urls: img
  409. // });
  410. // },
  411. // DelImg(e) {
  412. // uni.showModal({
  413. // title: '提示',
  414. // content: '确定要删除该照片吗?',
  415. // cancelText: '取消',
  416. // confirmText: '确定',
  417. // success: res => {
  418. // if (res.confirm) {
  419. // if(e.currentTarget.dataset.index == 0){
  420. // this.personNoImg = "";
  421. // }
  422. // else if(e.currentTarget.dataset.index == 1){
  423. // this.personNoImg1 = "";
  424. // }
  425. // else if(e.currentTarget.dataset.index == 2){
  426. // this.driverNoImg = "";
  427. // }
  428. // else if(e.currentTarget.dataset.index == 3){
  429. // this.driverNoImg1 = "";
  430. // }
  431. // else if(e.currentTarget.dataset.index == 4){
  432. // this.carNoImg = "";
  433. // }
  434. // else if(e.currentTarget.dataset.index == 5){
  435. // this.carNoImg1 = "";
  436. // }
  437. // }
  438. // }
  439. // })
  440. // },
  441. contactUs() {
  442. const that = this
  443. uni.makePhoneCall({
  444. // 手机号
  445. phoneNumber: that.tran.senderPhone,
  446. // 成功回调
  447. success: (res) => {
  448. console.log('调用成功!')
  449. },
  450. // 失败回调
  451. fail: (res) => {
  452. console.log('调用失败!')
  453. }
  454. });
  455. },
  456. driverInput(e) {
  457. this.driver = e.detail.value
  458. },
  459. driverNoInput(e) {
  460. this.driverNo = e.detail.value
  461. },
  462. wechatNoInput(e) {
  463. this.wechatNo = e.detail.value
  464. },
  465. driverAddressInput(e) {
  466. this.driverAddress = e.detail.value
  467. },
  468. driverPhoneInput(e) {
  469. this.driverPhone = e.detail.value
  470. },
  471. carNoInput(e) {
  472. this.carNo = e.detail.value
  473. },
  474. tranCountInput(e) {
  475. this.tranCount = e.detail.value
  476. },
  477. verifyCodeInput(e){
  478. this.verifyCode = e.detail.value
  479. },
  480. hideModal(e) {
  481. this.modalName = null
  482. },
  483. mycarClick(item){
  484. this.modalName = null
  485. this.driver = item.driver
  486. this.driverPhone = item.driverPhone
  487. this.carNo = item.carNo
  488. this.personNoImg = item.personNoImg
  489. this.personNoImg1 = item.personNoImg1
  490. this.driverNoImg = item.driverNoImg
  491. this.driverNoImg1 = item.driverNoImg1
  492. this.carNoImg = item.carNoImg
  493. this.carNoImg1 = item.carNoImg1
  494. this.driverNo = item.driverNo
  495. this.driverAddress = item.driverAddress
  496. this.wechatNo = item.wechatNo
  497. },
  498. getHistoryCar(){
  499. const that = this
  500. uni.showLoading({
  501. title: '正在加载',
  502. mask:true
  503. })
  504. that.$api.request('tran', 'getHistoryCar', failres => {
  505. that.$api.msg(failres.errmsg)
  506. uni.hideLoading()
  507. }).then(res => {
  508. that.carInfo = res.data
  509. if(that.carInfo.length == 0){
  510. that.$api.msg('暂无历史车辆');
  511. uni.hideLoading()
  512. return
  513. }
  514. var height = that.carInfo.length * 100
  515. var width = 500
  516. that.mycarStyle = "height:"+height+"rpx;width:" + width+"rpx"
  517. that.modalName = 'MycarModal'
  518. uni.hideLoading()
  519. })
  520. },
  521. doGetVerify() {
  522. const that = this
  523. var phone = this.driverPhone;
  524. if (!phone || phone.length != 11) {
  525. uni.showToast({
  526. title:'请输入正确手机号!',
  527. icon:'none'
  528. })
  529. return
  530. }
  531. that.$api.request('user', 'sendVerifyCode', {
  532. phone: phone,
  533. }).then(res => {
  534. that.sendDisabled = true
  535. let sec = 60
  536. let interval = setInterval(() => {
  537. sec--;
  538. that.sendText = sec + 's后重发'
  539. if (sec <= 0) {
  540. that.sendDisabled = false
  541. that.sendText = "获取验证码"
  542. clearInterval(interval)
  543. }
  544. }, 1000)
  545. })
  546. },
  547. tranNow(){
  548. let that = this
  549. if (!this.hasLogin) {
  550. uni.showModal({
  551. title: '登录提示',
  552. content: '您尚未登录,是否立即登录?',
  553. showCancel: true,
  554. confirmText: '登录',
  555. success: (e) => {
  556. if (e.confirm) {
  557. uni.navigateTo({
  558. url: '/pages/public/login'
  559. })
  560. }
  561. },
  562. fail: () => {},
  563. complete: () => {}
  564. })
  565. }
  566. else{
  567. // if(!that.driver){
  568. // this.$api.msg('请填写承运人');
  569. // return;
  570. // }
  571. if(!that.driverPhone){
  572. this.$api.msg('请填写承运人手机号码');
  573. return;
  574. }
  575. if(!that.verifyCode){
  576. this.$api.msg('请填写验证码');
  577. return;
  578. }
  579. if (!that.carNo) {
  580. that.$api.msg('请填写车牌号');
  581. return
  582. }
  583. // if (!that.tranCount) {
  584. // that.$api.msg('请填写承运吨数');
  585. // return
  586. // }
  587. // if(that.tranCount>that.tran.total){
  588. // that.$api.msg('承运吨数必须小于等于总吨数');
  589. // return
  590. // }
  591. // if (!that.personNoImg || !that.personNoImg1) {
  592. // that.$api.msg('请上传身份证正、反面照片');
  593. // return
  594. // }
  595. // if (!that.driverNoImg || !that.driverNoImg1) {
  596. // that.$api.msg('请上传驾驶证主、副页照片');
  597. // return
  598. // }
  599. // if (!that.carNoImg || !that.carNoImg1) {
  600. // that.$api.msg('请上传行车证主、副页照片');
  601. // return
  602. // }
  603. // that.tran.driver = that.driver
  604. // that.tran.driverNo = that.driverNo
  605. // that.tran.driverAddress = that.driverAddress
  606. that.tran.driverPhone = that.driverPhone
  607. that.tran.carNo = that.carNo
  608. // that.tran.tranCount = that.tranCount
  609. that.tran.verifyCode = that.verifyCode
  610. // that.tran.personNoImg = that.personNoImg
  611. // that.tran.personNoImg1 = that.personNoImg1
  612. // that.tran.driverNoImg = that.driverNoImg
  613. // that.tran.driverNoImg1 = that.driverNoImg1
  614. // that.tran.carNoImg = that.carNoImg
  615. // that.tran.carNoImg1 = that.carNoImg1
  616. that.tran.wechatNo = that.wechatNo
  617. uni.showLoading({
  618. title: '正在提交',
  619. mask:true
  620. })
  621. that.$api.request('tran', 'addCar',that.tran, failres => {
  622. uni.hideLoading()
  623. that.$api.msg(failres.errmsg);
  624. }).then(res => {
  625. uni.hideLoading()
  626. uni.showModal({
  627. title: '提示',
  628. content: "承运申请提交成功,等待审核中",
  629. showCancel: false,
  630. confirmText: '确定',
  631. success: () => {
  632. uni.navigateBack({
  633. delta: 2
  634. })
  635. }
  636. })
  637. // that.$api.prePage().refreshList(data, that.manageType);
  638. })
  639. }
  640. },
  641. },
  642. }
  643. </script>
  644. <style lang='scss' scoped>
  645. .container {
  646. background: $page-color-base;
  647. padding-bottom: 160upx;
  648. }
  649. .icon-you {
  650. font-size: $font-base + 2upx;
  651. color: #888;
  652. }
  653. .carousel {
  654. height: 722upx;
  655. position: relative;
  656. swiper {
  657. height: 100%;
  658. }
  659. .image-wrapper {
  660. width: 100%;
  661. height: 100%;
  662. }
  663. .swiper-item {
  664. display: flex;
  665. justify-content: center;
  666. align-content: center;
  667. height: 750upx;
  668. overflow: hidden;
  669. image {
  670. width: 100%;
  671. height: 100%;
  672. }
  673. }
  674. }
  675. .c-list {
  676. font-size: $font-sm + 2upx;
  677. color: $font-color-base;
  678. background: #fff;
  679. .c-row {
  680. display: flex;
  681. align-items: center;
  682. padding: 20upx 30upx;
  683. position: relative;
  684. }
  685. .tit {
  686. width: 220upx;
  687. }
  688. .con {
  689. flex: 1;
  690. color: $font-color-dark;
  691. .selected-text {
  692. margin-right: 10upx;
  693. }
  694. }
  695. .bz-list {
  696. height: 40upx;
  697. font-size: $font-sm+2upx;
  698. color: $font-color-dark;
  699. text {
  700. display: inline-block;
  701. margin-right: 30upx;
  702. }
  703. }
  704. .con-list {
  705. flex: 1;
  706. display: flex;
  707. flex-direction: column;
  708. color: $font-color-dark;
  709. line-height: 40upx;
  710. text-align: right;
  711. padding-right: 20upx;
  712. }
  713. .red {
  714. color: $uni-color-primary;
  715. }
  716. }
  717. /* 评价 */
  718. .eva-section {
  719. display: flex;
  720. flex-direction: column;
  721. padding: 20upx 30upx;
  722. background: #fff;
  723. margin-top: 16upx;
  724. .e-header {
  725. display: flex;
  726. align-items: center;
  727. height: 70upx;
  728. font-size: $font-sm + 2upx;
  729. color: $font-color-light;
  730. .tit {
  731. font-size: $font-base + 2upx;
  732. color: $font-color-dark;
  733. margin-right: 4upx;
  734. }
  735. .tip {
  736. flex: 1;
  737. text-align: right;
  738. }
  739. .icon-you {
  740. margin-left: 10upx;
  741. }
  742. }
  743. }
  744. .eva-box {
  745. display: flex;
  746. padding: 20upx 0;
  747. .portrait {
  748. flex-shrink: 0;
  749. width: 80upx;
  750. height: 80upx;
  751. border-radius: 100px;
  752. }
  753. .right {
  754. flex: 1;
  755. display: flex;
  756. flex-direction: column;
  757. font-size: $font-base;
  758. color: $font-color-base;
  759. padding-left: 26upx;
  760. .con {
  761. font-size: $font-base;
  762. color: $font-color-dark;
  763. padding: 20upx 0;
  764. }
  765. .bot {
  766. display: flex;
  767. justify-content: space-between;
  768. font-size: $font-sm;
  769. color: $font-color-light;
  770. }
  771. }
  772. }
  773. /* 详情 */
  774. .detail-desc {
  775. background: #fff;
  776. margin-top: 16upx;
  777. width: 750upx;
  778. .d-header {
  779. display: flex;
  780. justify-content: center;
  781. align-items: center;
  782. height: 80upx;
  783. font-size: $font-base + 2upx;
  784. color: $font-color-dark;
  785. position: relative;
  786. text {
  787. padding: 0 20upx;
  788. background: #fff;
  789. position: relative;
  790. z-index: 1;
  791. }
  792. &:after {
  793. position: absolute;
  794. left: 50%;
  795. top: 50%;
  796. transform: translateX(-50%);
  797. width: 300upx;
  798. height: 0;
  799. content: '';
  800. border-bottom: 1px solid #ccc;
  801. }
  802. }
  803. }
  804. /* 规格选择弹窗 */
  805. .attr-content {
  806. padding: 10upx 30upx;
  807. .a-t {
  808. display: flex;
  809. image {
  810. width: 170upx;
  811. height: 170upx;
  812. flex-shrink: 0;
  813. margin-top: -40upx;
  814. border-radius: 8upx;
  815. ;
  816. }
  817. .right {
  818. display: flex;
  819. flex-direction: column;
  820. padding-left: 24upx;
  821. font-size: $font-sm + 2upx;
  822. color: $font-color-base;
  823. line-height: 42upx;
  824. .price {
  825. font-size: $font-lg;
  826. color: $uni-color-primary;
  827. margin-bottom: 10upx;
  828. }
  829. .selected-text {
  830. margin-right: 10upx;
  831. }
  832. }
  833. }
  834. .attr-list {
  835. display: flex;
  836. flex-direction: column;
  837. font-size: $font-base + 2upx;
  838. color: $font-color-base;
  839. padding-top: 30upx;
  840. padding-left: 10upx;
  841. }
  842. .item-list {
  843. padding: 30upx 0 0;
  844. display: flex;
  845. flex-wrap: wrap;
  846. text {
  847. display: flex;
  848. align-items: center;
  849. justify-content: center;
  850. background: #eee;
  851. margin-right: 20upx;
  852. margin-bottom: 20upx;
  853. border-radius: 100upx;
  854. min-width: 60upx;
  855. height: 60upx;
  856. padding: 0 20upx;
  857. font-size: $font-base;
  858. color: $font-color-dark;
  859. }
  860. .selected {
  861. background: #fbebee;
  862. color: $uni-color-primary;
  863. }
  864. }
  865. }
  866. /* 弹出层 */
  867. .popup {
  868. position: fixed;
  869. left: 0;
  870. top: 0;
  871. right: 0;
  872. bottom: 0;
  873. z-index: 99;
  874. &.show {
  875. display: block;
  876. .mask {
  877. animation: showPopup 0.2s linear both;
  878. }
  879. .layer {
  880. animation: showLayer 0.2s linear both;
  881. }
  882. }
  883. &.hide {
  884. .mask {
  885. animation: hidePopup 0.2s linear both;
  886. }
  887. .layer {
  888. animation: hideLayer 0.2s linear both;
  889. }
  890. }
  891. &.none {
  892. display: none;
  893. }
  894. .mask {
  895. position: fixed;
  896. top: 0;
  897. width: 100%;
  898. height: 100%;
  899. z-index: 1;
  900. background-color: rgba(0, 0, 0, 0.4);
  901. }
  902. .layer {
  903. position: fixed;
  904. z-index: 99;
  905. bottom: 0;
  906. width: 100%;
  907. min-height: 40vh;
  908. border-radius: 10upx 10upx 0 0;
  909. background-color: #fff;
  910. .btn {
  911. height: 66upx;
  912. line-height: 66upx;
  913. border-radius: 100upx;
  914. background: $uni-color-primary;
  915. font-size: $font-base + 2upx;
  916. color: #fff;
  917. margin: 30upx auto 20upx;
  918. }
  919. }
  920. @keyframes showPopup {
  921. 0% {
  922. opacity: 0;
  923. }
  924. 100% {
  925. opacity: 1;
  926. }
  927. }
  928. @keyframes hidePopup {
  929. 0% {
  930. opacity: 1;
  931. }
  932. 100% {
  933. opacity: 0;
  934. }
  935. }
  936. @keyframes showLayer {
  937. 0% {
  938. transform: translateY(120%);
  939. }
  940. 100% {
  941. transform: translateY(0%);
  942. }
  943. }
  944. @keyframes hideLayer {
  945. 0% {
  946. transform: translateY(0);
  947. }
  948. 100% {
  949. transform: translateY(120%);
  950. }
  951. }
  952. }
  953. /* 底部操作菜单 */
  954. .page-bottom {
  955. position: fixed;
  956. left: 30upx;
  957. bottom: 30upx;
  958. z-index: 95;
  959. display: flex;
  960. justify-content: center;
  961. align-items: center;
  962. width: 690upx;
  963. height: 100upx;
  964. background: rgba(255, 255, 255, .9);
  965. box-shadow: 0 0 20upx 0 rgba(0, 0, 0, .5);
  966. border-radius: 16upx;
  967. .p-b-btn {
  968. display: flex;
  969. flex-direction: column;
  970. align-items: center;
  971. justify-content: center;
  972. font-size: $font-sm;
  973. color: $font-color-base;
  974. width: 96upx;
  975. height: 80upx;
  976. .yticon {
  977. font-size: 40upx;
  978. line-height: 48upx;
  979. color: $font-color-light;
  980. }
  981. &.active,
  982. &.active .yticon {
  983. color: $uni-color-primary;
  984. }
  985. .icon-fenxiang2 {
  986. font-size: 42upx;
  987. transform: translateY(-2upx);
  988. }
  989. .icon-shoucang {
  990. font-size: 46upx;
  991. }
  992. }
  993. }
  994. .rich-img {
  995. width: 100%;
  996. height: auto;
  997. margin: 0;
  998. padding: 0;
  999. line-height: 0px;
  1000. }
  1001. button::after {
  1002. border: none;
  1003. }
  1004. /* 销售信息 */
  1005. .introduce-section {
  1006. background: #fff;
  1007. padding: 20upx 30upx;
  1008. padding-bottom: 100upx;
  1009. .guess-item {
  1010. padding-bottom: 20upx;
  1011. border-bottom: 1px solid #ccc;
  1012. }
  1013. .title {
  1014. font-size: 28upx;
  1015. color: $font-color-dark;
  1016. font-weight:bold;
  1017. height: 50upx;
  1018. line-height: 50upx;
  1019. flex:2.5;
  1020. }
  1021. .title-tip {
  1022. flex:1;
  1023. }
  1024. .price-box {
  1025. display: flex;
  1026. align-items: baseline;
  1027. height: 70upx;
  1028. padding: 10upx 0;
  1029. font-size: 26upx;
  1030. color: $uni-color-primary;
  1031. }
  1032. .price {
  1033. font-size: $font-lg + 2upx;
  1034. }
  1035. .m-price {
  1036. margin: 0 12upx;
  1037. color: $font-color-light;
  1038. text-decoration: line-through;
  1039. }
  1040. .coupon-tip {
  1041. align-items: center;
  1042. padding: 4upx 10upx;
  1043. background: $uni-color-primary;
  1044. font-size: $font-sm;
  1045. color: #fff;
  1046. border-radius: 6upx;
  1047. line-height: 1;
  1048. transform: translateY(-4upx);
  1049. }
  1050. .bot-row {
  1051. display: flex;
  1052. align-items: center;
  1053. height: 50upx;
  1054. font-size: $font-sm;
  1055. color: $font-color-light;
  1056. view {
  1057. flex: 1;
  1058. }
  1059. }
  1060. }
  1061. </style>