orderDetails.vue 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803
  1. <!-- 订单详情-->
  2. <template>
  3. <view class="content">
  4. <view class="fixed1"></view>
  5. <view class="fixed">
  6. <view class='title flex flex-center'>
  7. <image class="back" src="../../static/images/return.png" @click="back" mode="" style="width: 40rpx; height: 40rpx;"></image>
  8. <!-- <u-icon class="back" name="arrow-left" color="" size="20" ></u-icon> -->
  9. <view class="nav-title">订单</view>
  10. <image class="search" style='width:18px;height:18px;' src="../../static/images/kefu.png" @click="$helper.contactCustomerService()" mode=""></image>
  11. <!-- <u-icon class="search" name="server-fill" color="" size="28" @click="$helper.contactCustomerService"></u-icon> -->
  12. </view>
  13. </view>
  14. <view class="content1">
  15. <view class="item1">
  16. <view class="status">{{dataObj.orderStatus}}</view>
  17. </view>
  18. <!-- flex flex-space-between -->
  19. <view class="item2">
  20. <u-button class="btn" @click="lookContract" v-if="dataObj.driverContract=='1'">查看合同</u-button>
  21. <!-- <u-button class="btn" text="签订合同" @click="signContract" v-if="dataObj.cargoOwnerStatus=='未装车'&&dataObj.driverContract!='1'"></u-button> -->
  22. <u-button class="btn" text="终止" @click="stop" v-if="dataObj.orderStatus=='待货主确认'||dataObj.orderStatus=='未装车'"></u-button>
  23. <!-- <u-button class="btn" text="联系客服" @click="$helper.contactCustomerService()"></u-button> -->
  24. <u-button class="btn" text="确认装车" @click="confirmLoading" ></u-button>
  25. <!-- <u-button class="btn" text="确认装车" @click="confirmLoading"></u-button> -->
  26. <u-button class="btn" text="修改装车信息" @click="confirmLoading" v-if="dataObj.orderStatus=='货主驳回装车信息'||dataObj.orderStatus=='平台驳回装车信息'"></u-button>
  27. <u-button class="btn" text="确认卸车" @click="confirmUnLoading" v-if="dataObj.orderStatus=='运输中'"></u-button>
  28. <u-button class="btn" text="确认运费" @click="checkfreight(1)" v-if="dataObj.orderStatus=='待确认运费'"></u-button>
  29. <u-button class="btn" text="驳回运费" @click="checkfreight(2)" v-if="dataObj.orderStatus=='待确认运费'"></u-button>
  30. <u-button class="btn" text="修改卸车信息" @click="confirmUnLoading" v-if="dataObj.orderStatus=='货主驳回卸车信息'||dataObj.orderStatus=='平台驳回卸车信息'"></u-button>
  31. <u-button class="btn" text="完结" @click="closed" v-if="dataObj.orderStatus=='结算中'"></u-button>
  32. </view>
  33. <view class="item3 flex flex-space-between align-center">
  34. <view @click.stop="cargoOwner(dataObj)" class="left flex align-center">
  35. <u--image :showLoading="true" :src="dataObj.cargoOwnerPortrait" width="44px" height="44px" @click="" shape='circle'>
  36. </u--image>
  37. <view class="name">{{dataObj.cargoOwner}}</view>
  38. <view class="flex align-center">
  39. <!-- <view class="number">4.98</view> -->
  40. <!-- <u-icon class="star" name="star-fill" color="#FEC823" size="20" @click="back"></u-icon> -->
  41. </view>
  42. </view>
  43. <view class="right flex s-row align-center phone">
  44. <view class="bgc">
  45. <image class="phone" style='width:24px;height:24px;' src="../../static/images/dianhua.png" @click="$helper.contactCustomerService(dataObj.cargoOwnerPhone)" mode=""></image>
  46. <!-- <u-icon class="phone" name="phone-fill" color="#2772FB" size="20" @click="$helper.contactCustomerService(dataObj.cargoOwnerPhone)"></u-icon> -->
  47. </view>
  48. <view class="hz-name">联系货主</view>
  49. </view>
  50. </view>
  51. <!-- <view class='row-between'>
  52. <view class="">货主</view>
  53. <view>张三</view>
  54. </view>
  55. <view class='row-between'>
  56. <view class="">货主单位</view>
  57. <view>黑龙江中天昊元贸易有限公司</view>
  58. </view>
  59. <view class='row-between'>
  60. <view class="">卸货地</view>
  61. <view>黑龙江省齐齐哈尔市梅里斯达斡尔族区杜尔门沁达斡尔乡53农场</view>
  62. </view>
  63. <view class='row-between'>
  64. <view class="">货名</view>
  65. <view>玉米</view>
  66. </view>
  67. <view class='row-between'>
  68. <view class="">距离</view>
  69. <view>约15公里</view>
  70. </view>
  71. <view class='row-between'>
  72. <view class="">货运费</view>
  73. <view>100元/吨</view>
  74. </view> -->
  75. </view>
  76. <view class="content2">
  77. <view class="flex flex-space-between border">
  78. <view class="flex s-row item1">
  79. <view class="fontsize-46 fontweight-500 text">{{dataObj.sendCity}}</view>
  80. <view class="fontsize-28 gray">发货地</view>
  81. </view>
  82. <image class="change-btn" src="@/static/images/common/jt.png" mode='widthFix'></image>
  83. <view class="flex s-row item2">
  84. <view class="fontsize-46 fontweight-500 text" @click="">{{dataObj.unloadCity}}</view>
  85. <view class="fontsize-28 gray text-align-right">卸货地</view>
  86. </view>
  87. </view>
  88. <view class="level2-title">基本信息</view>
  89. <view class='row-between'>
  90. <view class=" gray">订单编号</view>
  91. <view class="">{{dataObj.orderNo}}</view>
  92. </view>
  93. <!-- <view class='row-between'>
  94. <view class=" gray">货主</view>
  95. <view class="">{{dataObj.cargoOwner}}</view>
  96. </view> -->
  97. <view class='row-between'>
  98. <view class=" gray">货主单位</view>
  99. <view class="">{{dataObj.compName?dataObj.compName:'个人货主'}}</view>
  100. </view>
  101. <view class='row-between'>
  102. <view class=" gray">发货地</view>
  103. <view class=" place">{{dataObj.sendPrivate}}{{dataObj.sendCity}}{{dataObj.sendArea}}{{dataObj.sendDetailedAddress}}</view>
  104. </view>
  105. <view class='row-between'>
  106. <view class=" gray">卸货地</view>
  107. <view class=" place">{{dataObj.unloadPrivate}}{{dataObj.unloadCity}}{{dataObj.unloadArea}}{{dataObj.unloadDetailedAddress}}</view>
  108. </view>
  109. <view class='row-between'>
  110. <view class=" gray">货名</view>
  111. <view class="">{{dataObj.goodsName}}</view>
  112. </view>
  113. <view class='row-between'>
  114. <view class=" gray">距离</view>
  115. <view class="">约{{dataObj.distance}}公里</view>
  116. </view>
  117. <view v-if='dataObj.publishTaskInfo' class='row-between'>
  118. <view class=" gray">收货联系人</view>
  119. <view class="flex flex-center">{{dataObj.publishTaskInfo.sender?dataObj.publishTaskInfo.sender:''}}
  120. <image style='width:12px;height:12px;margin-left:5px;' v-if='dataObj.publishTaskInfo.senderPhone' class="phone" @click="$helper.contactCustomerService(dataObj.publishTaskInfo.senderPhone)" src="../../static/images/order/dianhua.png" mode=""></image>
  121. </view>
  122. </view>
  123. <view v-if='dataObj.publishTaskInfo' class='row-between'>
  124. <view class=" gray">发货联系人</view>
  125. <view class="flex flex-center">{{dataObj.publishTaskInfo.receiver?dataObj.publishTaskInfo.receiver:''}}
  126. <image style='width:12px;height:12px;margin-left:5px;' v-if='dataObj.publishTaskInfo.receiverPhone' class="phone" @click="$helper.contactCustomerService(dataObj.publishTaskInfo.receiverPhone)" src="../../static/images/order/dianhua.png" mode=""></image>
  127. </view>
  128. <!-- <view class='row-between'>
  129. <view class=" gray">运费</view>
  130. <view class="">{{dataObj.freight}}{{dataObj.illingMethod==0?'元/吨':'元/车'}}</view>
  131. </view> -->
  132. </view>
  133. <view class="content3" v-if='dataObj.orderStatus!="待货主确认"&&dataObj.orderStatus!="未装车"&&dataObj.orderStatus!="已终止"'>
  134. <view class="level2-title">承运信息</view>
  135. <view class='row-between'>
  136. <view class=" gray">合同编号</view>
  137. <view class="">{{carrierInfo.contractNo}}</view>
  138. </view>
  139. <view class='row-between'>
  140. <view class=" gray">车牌号</view>
  141. <view class="">{{carrierInfo.carNo}}</view>
  142. </view>
  143. <view class='row-between'>
  144. <view class=" gray">运费</view>
  145. <view class="">{{carrierInfo.estimatedFreight}}元</view>
  146. </view>
  147. <view class='row-between'>
  148. <view class="gray">预付款(元)</view>
  149. {{dataObj.advanceCharge}}元
  150. </view>
  151. <view class='row-between'>
  152. <view class=" gray">装车时间</view>
  153. <view class="">{{carrierInfo.loadingDate1}}</view>
  154. </view>
  155. <view class='row-between'>
  156. <view class=" gray">装车照片</view>
  157. <view class="flex">
  158. <u--image @click='ylImg(zcPhoneList)' :showLoading="true" :src='item' width="40px" height="40px" v-for="(item,index) in zcPhoneList"></u--image>
  159. </view>
  160. </view>
  161. <view v-if='dataObj.orderStatus!="待货主确认"&&dataObj.orderStatus!="未装车"&&dataObj.orderStatus!="待货主确认装车"&&dataObj.orderStatus!="货主驳回装车信息"&&dataObj.orderStatus!="待平台确认装车"&&dataObj.orderStatus!="平台驳回装车信息"&&dataObj.orderStatus!="运输中"&&dataObj.orderStatus!="已终止"'>
  162. <view class='row-between'>
  163. <view class=" gray">合计应付运费</view>
  164. <view class="">{{carrierInfo.totalFreight}}元</view>
  165. </view>
  166. <view class='row-between'>
  167. <view class=" gray">卸车时间</view>
  168. <view class="">{{carrierInfo.loadingDate}}</view>
  169. </view>
  170. <view class='row-between'>
  171. <view class=" gray">卸车照片</view>
  172. <view class="flex">
  173. <u--image @click='ylImg(xcPhoneList)' :showLoading="true" :src='item' width="40px" height="40px" v-for="(item,index) in xcPhoneList"></u--image>
  174. </view>
  175. </view>
  176. <view class='row-between'>
  177. <view class=" gray">回单照片</view>
  178. <view class="flex">
  179. <u--image @click='ylImg(hdPhoneList)' :showLoading="true" :src='item' width="40px" height="40px" v-for="(item,index) in hdPhoneList"></u--image>
  180. </view>
  181. </view>
  182. </view>
  183. </view>
  184. <!-- v-if="status2 -->
  185. <!-- dataObj.orderStatus!="待货主确认"&&dataObj.orderStatus!="未装车"&&dataObj.orderStatus!="待货主确认装车"&&dataObj.orderStatus!="货主驳回装车信息"&&dataObj.orderStatus!="待平台确认装车"&&dataObj.orderStatus!="平台驳回装车信息"&&dataObj.orderStatus!="已终止" -->
  186. <view class="content4" v-if='status2'>
  187. <view class="level2-title">运费信息(单位:元)</view>
  188. <view class='row-between'>
  189. <view class=" gray">预付运费</view>
  190. <view class="">{{freightInfo.prepaidFreight}}</view>
  191. </view>
  192. <view class='flex flex-end'>
  193. <view class="">{{freightInfo.prepaidFreightDate}}</view>
  194. </view>
  195. <view class='row-between'>
  196. <view class=" gray">运费尾款</view>
  197. <view class="">{{freightInfo.freightBalance?freightInfo.freightBalance:'未支付'}}</view>
  198. </view>
  199. <view class='row-between mx ' v-if="freightInfo.freightBalance">
  200. <!-- 明细:预付{{freightInfo.prepaidFreight}}元,服务费{{freightInfo.driverServiceCharge}}元,尾款{{freightInfo.freightBalance}}元,合计收款{{freightInfo.totalCollection}}元。 -->
  201. 明细:预付{{freightInfo.prepaidFreight}}元,工本费{{freightInfo.driverServiceCharge}}元,尾款{{freightInfo.freightBalance}}元,合计收款{{freightInfo.totalCollection}}元。
  202. </view>
  203. </view>
  204. <u-modal :show="isShowAlert" :title="alertTitle" :content='alertContent' :confirmText='confirmText'
  205. :closeOnClickOverlay='true' :showCancelButton='showCancelButton' @confirm="$u.throttle(confirmClick(), 5000)" @close="cancelClick"
  206. @cancel="cancelClick" class="modal">
  207. <u-radio-group v-model="radiovalue1" placement="" v-if='isShowTerminationReason' class='row'>
  208. <u-radio :customStyle="{marginBottom: '8px'}" v-for="(item, index) in radiolist1" :key="index"
  209. :label="item.name" :name="item.name" @change="radioChange">
  210. </u-radio>
  211. </u-radio-group>
  212. <u--textarea class="row" v-model="value2" placeholder="终止原因描述" count maxlength='50'
  213. v-if='isShowTerminationReason'>
  214. </u--textarea>
  215. </u-modal>
  216. <u-popup :show="show" mode="bottom" @close="close" @open="open">
  217. <view class="u-popup-wrap">
  218. <view>
  219. <image style='width:12px;height:12px;' @click='closepopup' class='close' src="../../static/images/order/guanbi@3x.png" mode=""></image>
  220. <!-- <u-icon @click="closepopup" class='close' name="close" size="20"></u-icon> -->
  221. </view>
  222. <view style='fon-size:34rpx;margin-bottom:20px;text-align:center;font-weight: 600;'>确认终止订单</view>
  223. <view style="margin: 0 auto;">
  224. <u-radio-group iconPlacement="right" v-model="radiovalue1" placement="" v-if='isShowTerminationReason' >
  225. <u-radio :customStyle="{marginBottom: '8px'}" v-for="(item, index) in radiolist1" :key="index"
  226. :label="item.name" :name="item.name" @change="radioChange" >
  227. </u-radio>
  228. </u-radio-group>
  229. </view>
  230. <view style='border-top:10px solid #F2F4F7;position:absolute;left:0;height:0;width:100%;'></view>
  231. <view style='padding:40rpx 0 30rpx;'>终止原因描述</view>
  232. <u--textarea class="row" v-model="value2" placeholder="终止原因描述" count maxlength='50'
  233. v-if='isShowTerminationReason'>
  234. </u--textarea>
  235. <view class='termination' :class="{'active':value2.length>0}" @click='$u.throttle(confirmClick, 5000)'>终止</view>
  236. </view>
  237. </u-popup>
  238. <u-modal :show="moneyShow" title="提示" :content='freightContent' showCancelButton @confirm="moneyClick" @close="moneyclose"
  239. @cancel="moneyclose"></u-modal>
  240. <u-toast ref="uToast"></u-toast>
  241. </view>
  242. </view>
  243. </template>
  244. <script>
  245. import uniPopup from '@/components/uni-popup/uni-popup.vue'
  246. export default {
  247. components:{
  248. uniPopup
  249. },
  250. data() {
  251. return {
  252. zcPhoneList:[],
  253. xcPhoneList:[],
  254. hdPhoneList:[],
  255. show:false,
  256. carrierInfo:{},
  257. freightInfo:{},
  258. cyinfoStatus: '未装车',
  259. isShowTerminationReason: false,
  260. dataObj:{},
  261. status1:false,
  262. status2:false,
  263. id: '',
  264. showCancelButton:true,
  265. value2: '',
  266. radiolist1: [{
  267. name: '已与货主协商',
  268. disabled: false
  269. },
  270. {
  271. name: '货主原因终止',
  272. disabled: false
  273. },
  274. {
  275. name: '司机个人原因终止',
  276. disabled: false
  277. }, {
  278. name: '其他',
  279. disabled: false
  280. }
  281. ],
  282. radiovalue1: '已与货主协商',
  283. confirmText: '终止',
  284. alertTitle: '确定终止订单?',
  285. alertContent: "",
  286. isShowAlert: false,
  287. moneyShow:false,
  288. freightContent:"",
  289. tips:""
  290. }
  291. },
  292. onLoad(options) {
  293. this.id = options.id
  294. },
  295. onShow() {
  296. this.getList()
  297. },
  298. methods: {
  299. open() {
  300. // console.log('open');
  301. },
  302. close() {
  303. this.show = false
  304. // console.log('close');
  305. },
  306. cargoOwner(_obj){
  307. // uni.$u.route('/pages/order/evaluateList');
  308. // console.log("查看---------------",_obj)
  309. uni.$u.route('/pages/order/cargoOwnerSee',_obj)
  310. },
  311. moneyclose(){
  312. this.moneyShow=false
  313. },
  314. moneyClick(){
  315. this.$request.baseRequest('post', '/orderInfo/api/confirmFreight', {
  316. id: this.dataObj.id,
  317. typeFlag:2,
  318. examineFlag:this.tips
  319. }).then(res => {
  320. if (res.code == 200) {
  321. this.$refs.uToast.show({
  322. type: 'success',
  323. message: this.tips == 1?"确认成功":"驳回成功",
  324. })
  325. this.moneyShow=false
  326. this.getList()
  327. }
  328. })
  329. },
  330. checkfreight(num){
  331. this.tips = num
  332. if(num == 1){
  333. this.freightContent = "合计应付运费 "+ this.dataObj.hyCarrierInfo.totalFreight + " 元,确认无误?"
  334. }else{
  335. this.freightContent = "确认驳回运费信息?"
  336. }
  337. this.moneyShow=true
  338. },
  339. ylImg(src) {
  340. uni.previewImage({
  341. urls: src,
  342. longPressActions: {
  343. itemList: ['发送给朋友', '保存图片', '收藏'],
  344. success: function(data) {
  345. console.log('选中了第' + (data.tapIndex + 1) + '个按钮,第' + (data.index + 1) + '张图片');
  346. },
  347. fail: function(err) {
  348. console.log(err.errMsg);
  349. }
  350. }
  351. });
  352. },
  353. closepopup(){
  354. this.show=false
  355. },
  356. lookContract(){
  357. uni.downloadFile({
  358. url: this.dataObj.driverContractUrl,
  359. success: function (res) {
  360. var filePath = res.tempFilePath;
  361. uni.openDocument({
  362. filePath: filePath,
  363. showMenu: true,
  364. success: function (res) {
  365. console.log('打开文档成功');
  366. }
  367. });
  368. }
  369. });
  370. // this.$request.baseRequest('get', '/orderInfo/setPdf', {
  371. // }).then(res => {
  372. // if (res.code == 200) {
  373. // this.contractSrc = res.data
  374. // uni.downloadFile({
  375. // url: res.data,
  376. // success: function (res) {
  377. // var filePath = res.tempFilePath;
  378. // uni.openDocument({
  379. // filePath: filePath,
  380. // showMenu: true,
  381. // success: function (res) {
  382. // console.log('打开文档成功');
  383. // }
  384. // });
  385. // }
  386. // });
  387. // // this.$refs.uToast.show({
  388. // // type: 'success',
  389. // // message: "提交成功",
  390. // // complete() {
  391. // // that.upCallback({
  392. // // size: 10,
  393. // // num: 1
  394. // // })
  395. // // }
  396. // // })
  397. // }
  398. // })
  399. // .catch(res => {
  400. // uni.$u.toast(res.message);
  401. // });
  402. },
  403. signContract() {
  404. // this.lookAlert = true
  405. uni.$u.route('/pages/order/signContract',{obj:encodeURIComponent(JSON.stringify(this.dataObj))}
  406. );
  407. },
  408. // 完结
  409. closed() {
  410. let item = this.dataDetails
  411. let that = this
  412. this.$request.baseRequest('post', '/orderInfo/api/editEnd', {
  413. id: item.id,
  414. }).then(res => {
  415. if (res.code == 200) {
  416. this.$refs.uToast.show({
  417. type: 'success',
  418. message: "提交成功",
  419. complete() {
  420. that.upCallback({
  421. size: 10,
  422. num: 1
  423. })
  424. }
  425. })
  426. }
  427. })
  428. .catch(res => {
  429. uni.$u.toast(res.message);
  430. });
  431. },
  432. confirmLoading() {
  433. var that = this
  434. this.$request.baseRequest('get', '/driverCarInfo/selectDriverCar', {
  435. commonId: uni.getStorageSync('userInfo').id,
  436. searchType:2
  437. }).then(res => {
  438. if (res.code == '200') {
  439. if(res.data&&res.data.length>0){
  440. uni.$u.route('/pages/order/confirmLoading', {
  441. obj: JSON.stringify({id:that.id,carrierId:that.dataObj.hyCarrierInfo.id}),
  442. });
  443. }else{
  444. that.alertTitle = '尚未添加车辆!'
  445. that.showCancelButton = false
  446. that.confirmText = '立即添加'
  447. that.isShowAlert = true
  448. }
  449. } else {
  450. uni.$u.toast(res.message);
  451. }
  452. })
  453. .catch(res => {
  454. uni.$u.toast(res.message);
  455. });
  456. // uni.$u.route('/pages/order/confirmLoading', {id:this.id});
  457. },
  458. confirmUnLoading() {
  459. let item = this.dataObj
  460. uni.$u.route('/pages/order/confirmUnloading', {obj:JSON.stringify(item)});
  461. },
  462. confirmClick() {
  463. if(this.alertTitle == '尚未添加车辆!'){
  464. uni.$u.route('/pages/mine/manageVehicles/index');
  465. }else{
  466. let that = this
  467. if (this.radiovalue1 == '其他' && !this.value2) {
  468. this.$refs.uToast.show({
  469. type: 'error',
  470. message: "请填写终止原因描述!",
  471. })
  472. return
  473. }
  474. let _terminationReason = ''
  475. if (this.radiovalue1 == '已与货主协商') {
  476. _terminationReason = 1
  477. } else if (this.radiovalue1 == '货主原因终止') {
  478. _terminationReason = 2
  479. } else if (this.radiovalue1 == '司机个人原因终止') {
  480. _terminationReason = 3
  481. } else if (this.radiovalue1 == '其他') {
  482. _terminationReason = 4
  483. }
  484. this.$request.baseRequest('post', '/orderInfo/api/end', {
  485. id: this.id,
  486. terminationReason: _terminationReason,
  487. terminationReasonDescription: this.value2,
  488. terminator:1
  489. }).then(res => {
  490. this.show=false
  491. this.radiovalue1 == '已与货主协商'
  492. this.value2=''
  493. this.isShowAlert = false
  494. // this.mescroll.resetUpScroll()
  495. this.$refs.uToast.show({
  496. type: 'success',
  497. message: "提交成功!",
  498. complete() {
  499. that.getList()
  500. }
  501. })
  502. })
  503. .catch(res => {
  504. uni.$u.toast(res.message);
  505. });
  506. }
  507. },
  508. cancelClick() {
  509. this.isShowAlert = false
  510. },
  511. stop() {
  512. let item = this.dataObj
  513. // 货主接单
  514. this.id = item.id
  515. if (item.orderStatusKey == 1) {
  516. this.isShowTerminationReason = false
  517. } else {
  518. this.isShowTerminationReason = true
  519. }
  520. if(item.orderStatus=='未装车'){
  521. this.show = true
  522. }else{
  523. this.isShowAlert=true
  524. }
  525. },
  526. toPhone(){
  527. uni.makePhoneCall({
  528. phoneNumber: this.dataObj.cargoOwnerPhone
  529. });
  530. },
  531. back() {
  532. uni.navigateBack()
  533. },
  534. getList(){
  535. this.$request.baseRequest('get', '/orderInfo/getOrderInfo', {
  536. id: this.id,
  537. }).then(res => {
  538. if(res.code==200){
  539. this.dataObj = res.data
  540. if(res.data.hyCarrierInfo){
  541. }
  542. this.carrierInfo = res.data.hyCarrierInfo
  543. this.freightInfo = res.data.freightInfo
  544. if(this.carrierInfo.loadingImg&&this.carrierInfo.loadingImg.length>0){
  545. this.zcPhoneList = this.carrierInfo.loadingImg.split(',')
  546. }
  547. if(this.carrierInfo.unloadingImg&&this.carrierInfo.unloadingImg.length>0){
  548. this.xcPhoneList = this.carrierInfo.unloadingImg.split(',')
  549. }
  550. if(this.carrierInfo.receiptImg&&this.carrierInfo.receiptImg.length>0){
  551. this.hdPhoneList = this.carrierInfo.receiptImg.split(',')
  552. }
  553. // if(res.data.orderStatus!="待货主确认"&&res.data.orderStatus!="未装车"&&res.data.orderStatus!="已终止"){
  554. // this.status1 = true
  555. // }
  556. // 运费信息
  557. if (res.data.cargoOwnerStatus != "待接单" && res.data.cargoOwnerStatus != "未装车" && res.data
  558. .cargoOwnerStatus != "待确认装车" && res.data.cargoOwnerStatus != "已驳回装车信息" && res.data
  559. .cargoOwnerStatus != "待平台确认装车" && res.data.cargoOwnerStatus != "平台驳回装车信息" && res.data.cargoOwnerStatus != "待结算" && res.data
  560. .cargoOwnerStatus != "已终止") {
  561. this.status2 = true
  562. }
  563. }
  564. })
  565. },
  566. goConfirmLoading(id) {
  567. uni.$u.route('/pages/order/confirmLoading', {
  568. obj: JSON.stringify({id:this.id}),
  569. });
  570. },
  571. }
  572. }
  573. </script>
  574. <style lang="scss">
  575. .fixed,
  576. .fixed1 {
  577. background: white;
  578. position: fixed;
  579. top: var(--status-bar-height);
  580. z-index: 999;
  581. width: 100%;
  582. }
  583. .fixed {
  584. padding-bottom: 10rpx;
  585. .title {
  586. background: white;
  587. position: relative;
  588. font-size: 36rpx;
  589. color: rgba(0, 0, 0, 0.85);
  590. .search {
  591. position: absolute;
  592. right: 20rpx;
  593. }
  594. .back {
  595. position: absolute;
  596. left: 20rpx;
  597. width:18px;height:18px;
  598. }
  599. }
  600. }
  601. .fixed1 {
  602. top: 0;
  603. height: var(--status-bar-height);
  604. background: white;
  605. }
  606. .row-between{
  607. margin-bottom: 10rpx;
  608. }
  609. .content1 {
  610. background: white;
  611. margin: calc(var(--status-bar-height) + 80rpx) 20rpx 0 20rpx;
  612. border-radius: 20rpx;
  613. padding: 40rpx 0rpx 0 0;
  614. box-sizing: border-box;
  615. .status {
  616. display: flex;
  617. justify-content: center;
  618. margin-bottom: 40rpx;
  619. font-size: 36rpx;
  620. color: #333333;
  621. font-weight: 700;
  622. }
  623. .btn {
  624. width: 40%;
  625. margin-top: 20rpx;
  626. }
  627. .item2 {
  628. padding-bottom: 40rpx;
  629. }
  630. .item3 {
  631. padding: 20rpx;
  632. background: linear-gradient(180deg, #F7F7F9 0%, #FFFFFF 100%);
  633. border-radius: 0 0 20rpx 20rpx;
  634. .name {
  635. margin-left: 10rpx;
  636. margin-right: 20rpx;
  637. font-size: 32rpx;
  638. font-weight: 500;
  639. color: #333333;
  640. }
  641. .number {
  642. font-size: 26rpx;
  643. color: #878787;
  644. }
  645. .star {
  646. margin-left: 10rpx;
  647. }
  648. .phone {
  649. .bgc {
  650. background: #E5F0FE;
  651. width: 58rpx;
  652. height: 58rpx;
  653. display: flex;
  654. align-items: center;
  655. justify-content: center;
  656. border-radius: 50%;
  657. }
  658. .hz-name {
  659. font-size: 26rpx;
  660. color: #2772FB;
  661. }
  662. }
  663. }
  664. }
  665. .level2-title {
  666. margin: 20rpx 0 20rpx 0;
  667. }
  668. .content2 {
  669. background: white;
  670. margin: 20rpx;
  671. border-radius: 20rpx;
  672. padding: 20rpx;
  673. .change-btn {
  674. width: 86rpx;
  675. height: 86rpx;
  676. position: relative;
  677. top: -20rpx;
  678. }
  679. .item1,
  680. .item2 {
  681. width: 40%;
  682. .text {
  683. text-overflow: ellipsis;
  684. overflow: hidden;
  685. white-space: nowrap;
  686. }
  687. .gray {
  688. text-align: center;
  689. }
  690. }
  691. .item1 .text {
  692. text-align: center;
  693. }
  694. .item2 .text {
  695. text-align: center;
  696. }
  697. .border {
  698. border-bottom: 1px solid #EEEEEE;
  699. padding-bottom: 33rpx;
  700. }
  701. .place {
  702. width: 80%;
  703. text-align: right;
  704. }
  705. }
  706. .content3,
  707. .content4 {
  708. background: white;
  709. margin: 20rpx 0;
  710. border-radius: 20rpx;
  711. padding: 20rpx 0;
  712. }
  713. .content3{
  714. padding: 20rpx 0;
  715. margin:20rpx 0;
  716. }
  717. .content4 {
  718. .time{
  719. text-align: right;
  720. }
  721. .mx {
  722. background: #F7F8FA;
  723. padding: 10rpx;
  724. margin: 10rpx 0;
  725. }
  726. }
  727. /deep/.u-modal__content {
  728. flex-direction: column;
  729. }
  730. /deep/.u-popup__content{
  731. border-radius: 10px;
  732. // padding:20px;
  733. }
  734. /deep/.u-radio{
  735. margin:40rpx 0;
  736. }
  737. .close{
  738. position:absolute;
  739. right:20px;
  740. top:26px;
  741. }
  742. .termination{
  743. background:#F1F3F6;
  744. color:#C5CAD4;
  745. padding:10px;
  746. border-radius:30px;
  747. text-align: center;
  748. margin-top:30rpx;
  749. }
  750. .termination.active{
  751. background: #2772FB;
  752. color: white;
  753. }
  754. .u-popup-wrap{
  755. padding:20px;
  756. }
  757. </style>