tran_detail.vue 27 KB

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