orderDetails.vue 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802
  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. </view>
  202. </view>
  203. <u-modal :show="isShowAlert" :title="alertTitle" :content='alertContent' :confirmText='confirmText'
  204. :closeOnClickOverlay='true' :showCancelButton='showCancelButton' @confirm="$u.throttle(confirmClick(), 5000)" @close="cancelClick"
  205. @cancel="cancelClick" class="modal">
  206. <u-radio-group v-model="radiovalue1" placement="" v-if='isShowTerminationReason' class='row'>
  207. <u-radio :customStyle="{marginBottom: '8px'}" v-for="(item, index) in radiolist1" :key="index"
  208. :label="item.name" :name="item.name" @change="radioChange">
  209. </u-radio>
  210. </u-radio-group>
  211. <u--textarea class="row" v-model="value2" placeholder="终止原因描述" count maxlength='50'
  212. v-if='isShowTerminationReason'>
  213. </u--textarea>
  214. </u-modal>
  215. <u-popup :show="show" mode="bottom" @close="close" @open="open">
  216. <view class="u-popup-wrap">
  217. <view>
  218. <image style='width:12px;height:12px;' @click='closepopup' class='close' src="../../static/images/order/guanbi@3x.png" mode=""></image>
  219. <!-- <u-icon @click="closepopup" class='close' name="close" size="20"></u-icon> -->
  220. </view>
  221. <view style='fon-size:34rpx;margin-bottom:20px;text-align:center;font-weight: 600;'>确认终止订单</view>
  222. <view style="margin: 0 auto;">
  223. <u-radio-group iconPlacement="right" v-model="radiovalue1" placement="" v-if='isShowTerminationReason' >
  224. <u-radio :customStyle="{marginBottom: '8px'}" v-for="(item, index) in radiolist1" :key="index"
  225. :label="item.name" :name="item.name" @change="radioChange" >
  226. </u-radio>
  227. </u-radio-group>
  228. </view>
  229. <view style='border-top:10px solid #F2F4F7;position:absolute;left:0;height:0;width:100%;'></view>
  230. <view style='padding:40rpx 0 30rpx;'>终止原因描述</view>
  231. <u--textarea class="row" v-model="value2" placeholder="终止原因描述" count maxlength='50'
  232. v-if='isShowTerminationReason'>
  233. </u--textarea>
  234. <view class='termination' :class="{'active':value2.length>0}" @click='$u.throttle(confirmClick, 5000)'>终止</view>
  235. </view>
  236. </u-popup>
  237. <u-modal :show="moneyShow" title="提示" :content='freightContent' showCancelButton @confirm="moneyClick" @close="moneyclose"
  238. @cancel="moneyclose"></u-modal>
  239. <u-toast ref="uToast"></u-toast>
  240. </view>
  241. </view>
  242. </template>
  243. <script>
  244. import uniPopup from '@/components/uni-popup/uni-popup.vue'
  245. export default {
  246. components:{
  247. uniPopup
  248. },
  249. data() {
  250. return {
  251. zcPhoneList:[],
  252. xcPhoneList:[],
  253. hdPhoneList:[],
  254. show:false,
  255. carrierInfo:{},
  256. freightInfo:{},
  257. cyinfoStatus: '未装车',
  258. isShowTerminationReason: false,
  259. dataObj:{},
  260. status1:false,
  261. status2:false,
  262. id: '',
  263. showCancelButton:true,
  264. value2: '',
  265. radiolist1: [{
  266. name: '已与货主协商',
  267. disabled: false
  268. },
  269. {
  270. name: '货主原因终止',
  271. disabled: false
  272. },
  273. {
  274. name: '司机个人原因终止',
  275. disabled: false
  276. }, {
  277. name: '其他',
  278. disabled: false
  279. }
  280. ],
  281. radiovalue1: '已与货主协商',
  282. confirmText: '终止',
  283. alertTitle: '确定终止订单?',
  284. alertContent: "",
  285. isShowAlert: false,
  286. moneyShow:false,
  287. freightContent:"",
  288. tips:""
  289. }
  290. },
  291. onLoad(options) {
  292. this.id = options.id
  293. },
  294. onShow() {
  295. this.getList()
  296. },
  297. methods: {
  298. open() {
  299. // console.log('open');
  300. },
  301. close() {
  302. this.show = false
  303. // console.log('close');
  304. },
  305. cargoOwner(_obj){
  306. // uni.$u.route('/pages/order/evaluateList');
  307. // console.log("查看---------------",_obj)
  308. uni.$u.route('/pages/order/cargoOwnerSee',_obj)
  309. },
  310. moneyclose(){
  311. this.moneyShow=false
  312. },
  313. moneyClick(){
  314. this.$request.baseRequest('post', '/orderInfo/api/confirmFreight', {
  315. id: this.dataObj.id,
  316. typeFlag:2,
  317. examineFlag:this.tips
  318. }).then(res => {
  319. if (res.code == 200) {
  320. this.$refs.uToast.show({
  321. type: 'success',
  322. message: this.tips == 1?"确认成功":"驳回成功",
  323. })
  324. this.moneyShow=false
  325. this.getList()
  326. }
  327. })
  328. },
  329. checkfreight(num){
  330. this.tips = num
  331. if(num == 1){
  332. this.freightContent = "合计应付运费 "+ this.dataObj.hyCarrierInfo.totalFreight + " 元,确认无误?"
  333. }else{
  334. this.freightContent = "确认驳回运费信息?"
  335. }
  336. this.moneyShow=true
  337. },
  338. ylImg(src) {
  339. uni.previewImage({
  340. urls: src,
  341. longPressActions: {
  342. itemList: ['发送给朋友', '保存图片', '收藏'],
  343. success: function(data) {
  344. console.log('选中了第' + (data.tapIndex + 1) + '个按钮,第' + (data.index + 1) + '张图片');
  345. },
  346. fail: function(err) {
  347. console.log(err.errMsg);
  348. }
  349. }
  350. });
  351. },
  352. closepopup(){
  353. this.show=false
  354. },
  355. lookContract(){
  356. uni.downloadFile({
  357. url: this.dataObj.driverContractUrl,
  358. success: function (res) {
  359. var filePath = res.tempFilePath;
  360. uni.openDocument({
  361. filePath: filePath,
  362. showMenu: true,
  363. success: function (res) {
  364. console.log('打开文档成功');
  365. }
  366. });
  367. }
  368. });
  369. // this.$request.baseRequest('get', '/orderInfo/setPdf', {
  370. // }).then(res => {
  371. // if (res.code == 200) {
  372. // this.contractSrc = res.data
  373. // uni.downloadFile({
  374. // url: res.data,
  375. // success: function (res) {
  376. // var filePath = res.tempFilePath;
  377. // uni.openDocument({
  378. // filePath: filePath,
  379. // showMenu: true,
  380. // success: function (res) {
  381. // console.log('打开文档成功');
  382. // }
  383. // });
  384. // }
  385. // });
  386. // // this.$refs.uToast.show({
  387. // // type: 'success',
  388. // // message: "提交成功",
  389. // // complete() {
  390. // // that.upCallback({
  391. // // size: 10,
  392. // // num: 1
  393. // // })
  394. // // }
  395. // // })
  396. // }
  397. // })
  398. // .catch(res => {
  399. // uni.$u.toast(res.message);
  400. // });
  401. },
  402. signContract() {
  403. // this.lookAlert = true
  404. uni.$u.route('/pages/order/signContract',{obj:encodeURIComponent(JSON.stringify(this.dataObj))}
  405. );
  406. },
  407. // 完结
  408. closed() {
  409. let item = this.dataDetails
  410. let that = this
  411. this.$request.baseRequest('post', '/orderInfo/api/editEnd', {
  412. id: item.id,
  413. }).then(res => {
  414. if (res.code == 200) {
  415. this.$refs.uToast.show({
  416. type: 'success',
  417. message: "提交成功",
  418. complete() {
  419. that.upCallback({
  420. size: 10,
  421. num: 1
  422. })
  423. }
  424. })
  425. }
  426. })
  427. .catch(res => {
  428. uni.$u.toast(res.message);
  429. });
  430. },
  431. confirmLoading() {
  432. var that = this
  433. this.$request.baseRequest('get', '/driverCarInfo/selectDriverCar', {
  434. commonId: uni.getStorageSync('userInfo').id,
  435. searchType:2
  436. }).then(res => {
  437. if (res.code == '200') {
  438. if(res.data&&res.data.length>0){
  439. uni.$u.route('/pages/order/confirmLoading', {
  440. obj: JSON.stringify({id:that.id,carrierId:that.dataObj.hyCarrierInfo.id}),
  441. });
  442. }else{
  443. that.alertTitle = '尚未添加车辆!'
  444. that.showCancelButton = false
  445. that.confirmText = '立即添加'
  446. that.isShowAlert = true
  447. }
  448. } else {
  449. uni.$u.toast(res.message);
  450. }
  451. })
  452. .catch(res => {
  453. uni.$u.toast(res.message);
  454. });
  455. // uni.$u.route('/pages/order/confirmLoading', {id:this.id});
  456. },
  457. confirmUnLoading() {
  458. let item = this.dataObj
  459. uni.$u.route('/pages/order/confirmUnloading', {obj:JSON.stringify(item)});
  460. },
  461. confirmClick() {
  462. if(this.alertTitle == '尚未添加车辆!'){
  463. uni.$u.route('/pages/mine/manageVehicles/index');
  464. }else{
  465. let that = this
  466. if (this.radiovalue1 == '其他' && !this.value2) {
  467. this.$refs.uToast.show({
  468. type: 'error',
  469. message: "请填写终止原因描述!",
  470. })
  471. return
  472. }
  473. let _terminationReason = ''
  474. if (this.radiovalue1 == '已与货主协商') {
  475. _terminationReason = 1
  476. } else if (this.radiovalue1 == '货主原因终止') {
  477. _terminationReason = 2
  478. } else if (this.radiovalue1 == '司机个人原因终止') {
  479. _terminationReason = 3
  480. } else if (this.radiovalue1 == '其他') {
  481. _terminationReason = 4
  482. }
  483. this.$request.baseRequest('post', '/orderInfo/api/end', {
  484. id: this.id,
  485. terminationReason: _terminationReason,
  486. terminationReasonDescription: this.value2,
  487. terminator:1
  488. }).then(res => {
  489. this.show=false
  490. this.radiovalue1 == '已与货主协商'
  491. this.value2=''
  492. this.isShowAlert = false
  493. // this.mescroll.resetUpScroll()
  494. this.$refs.uToast.show({
  495. type: 'success',
  496. message: "提交成功!",
  497. complete() {
  498. that.getList()
  499. }
  500. })
  501. })
  502. .catch(res => {
  503. uni.$u.toast(res.message);
  504. });
  505. }
  506. },
  507. cancelClick() {
  508. this.isShowAlert = false
  509. },
  510. stop() {
  511. let item = this.dataObj
  512. // 货主接单
  513. this.id = item.id
  514. if (item.orderStatusKey == 1) {
  515. this.isShowTerminationReason = false
  516. } else {
  517. this.isShowTerminationReason = true
  518. }
  519. if(item.orderStatus=='未装车'){
  520. this.show = true
  521. }else{
  522. this.isShowAlert=true
  523. }
  524. },
  525. toPhone(){
  526. uni.makePhoneCall({
  527. phoneNumber: this.dataObj.cargoOwnerPhone
  528. });
  529. },
  530. back() {
  531. uni.navigateBack()
  532. },
  533. getList(){
  534. this.$request.baseRequest('get', '/orderInfo/getOrderInfo', {
  535. id: this.id,
  536. }).then(res => {
  537. if(res.code==200){
  538. this.dataObj = res.data
  539. if(res.data.hyCarrierInfo){
  540. }
  541. this.carrierInfo = res.data.hyCarrierInfo
  542. this.freightInfo = res.data.freightInfo
  543. if(this.carrierInfo.loadingImg&&this.carrierInfo.loadingImg.length>0){
  544. this.zcPhoneList = this.carrierInfo.loadingImg.split(',')
  545. }
  546. if(this.carrierInfo.unloadingImg&&this.carrierInfo.unloadingImg.length>0){
  547. this.xcPhoneList = this.carrierInfo.unloadingImg.split(',')
  548. }
  549. if(this.carrierInfo.receiptImg&&this.carrierInfo.receiptImg.length>0){
  550. this.hdPhoneList = this.carrierInfo.receiptImg.split(',')
  551. }
  552. // if(res.data.orderStatus!="待货主确认"&&res.data.orderStatus!="未装车"&&res.data.orderStatus!="已终止"){
  553. // this.status1 = true
  554. // }
  555. // 运费信息
  556. if (res.data.cargoOwnerStatus != "待接单" && res.data.cargoOwnerStatus != "未装车" && res.data
  557. .cargoOwnerStatus != "待确认装车" && res.data.cargoOwnerStatus != "已驳回装车信息" && res.data
  558. .cargoOwnerStatus != "待平台确认装车" && res.data.cargoOwnerStatus != "平台驳回装车信息" && res.data.cargoOwnerStatus != "待结算" && res.data
  559. .cargoOwnerStatus != "已终止") {
  560. this.status2 = true
  561. }
  562. }
  563. })
  564. },
  565. goConfirmLoading(id) {
  566. uni.$u.route('/pages/order/confirmLoading', {
  567. obj: JSON.stringify({id:this.id}),
  568. });
  569. },
  570. }
  571. }
  572. </script>
  573. <style lang="scss">
  574. .fixed,
  575. .fixed1 {
  576. background: white;
  577. position: fixed;
  578. top: var(--status-bar-height);
  579. z-index: 999;
  580. width: 100%;
  581. }
  582. .fixed {
  583. padding-bottom: 10rpx;
  584. .title {
  585. background: white;
  586. position: relative;
  587. font-size: 36rpx;
  588. color: rgba(0, 0, 0, 0.85);
  589. .search {
  590. position: absolute;
  591. right: 20rpx;
  592. }
  593. .back {
  594. position: absolute;
  595. left: 20rpx;
  596. width:18px;height:18px;
  597. }
  598. }
  599. }
  600. .fixed1 {
  601. top: 0;
  602. height: var(--status-bar-height);
  603. background: white;
  604. }
  605. .row-between{
  606. margin-bottom: 10rpx;
  607. }
  608. .content1 {
  609. background: white;
  610. margin: calc(var(--status-bar-height) + 80rpx) 20rpx 0 20rpx;
  611. border-radius: 20rpx;
  612. padding: 40rpx 0rpx 0 0;
  613. box-sizing: border-box;
  614. .status {
  615. display: flex;
  616. justify-content: center;
  617. margin-bottom: 40rpx;
  618. font-size: 36rpx;
  619. color: #333333;
  620. font-weight: 700;
  621. }
  622. .btn {
  623. width: 40%;
  624. margin-top: 20rpx;
  625. }
  626. .item2 {
  627. padding-bottom: 40rpx;
  628. }
  629. .item3 {
  630. padding: 20rpx;
  631. background: linear-gradient(180deg, #F7F7F9 0%, #FFFFFF 100%);
  632. border-radius: 0 0 20rpx 20rpx;
  633. .name {
  634. margin-left: 10rpx;
  635. margin-right: 20rpx;
  636. font-size: 32rpx;
  637. font-weight: 500;
  638. color: #333333;
  639. }
  640. .number {
  641. font-size: 26rpx;
  642. color: #878787;
  643. }
  644. .star {
  645. margin-left: 10rpx;
  646. }
  647. .phone {
  648. .bgc {
  649. background: #E5F0FE;
  650. width: 58rpx;
  651. height: 58rpx;
  652. display: flex;
  653. align-items: center;
  654. justify-content: center;
  655. border-radius: 50%;
  656. }
  657. .hz-name {
  658. font-size: 26rpx;
  659. color: #2772FB;
  660. }
  661. }
  662. }
  663. }
  664. .level2-title {
  665. margin: 20rpx 0 20rpx 0;
  666. }
  667. .content2 {
  668. background: white;
  669. margin: 20rpx;
  670. border-radius: 20rpx;
  671. padding: 20rpx;
  672. .change-btn {
  673. width: 86rpx;
  674. height: 86rpx;
  675. position: relative;
  676. top: -20rpx;
  677. }
  678. .item1,
  679. .item2 {
  680. width: 40%;
  681. .text {
  682. text-overflow: ellipsis;
  683. overflow: hidden;
  684. white-space: nowrap;
  685. }
  686. .gray {
  687. text-align: center;
  688. }
  689. }
  690. .item1 .text {
  691. text-align: center;
  692. }
  693. .item2 .text {
  694. text-align: center;
  695. }
  696. .border {
  697. border-bottom: 1px solid #EEEEEE;
  698. padding-bottom: 33rpx;
  699. }
  700. .place {
  701. width: 80%;
  702. text-align: right;
  703. }
  704. }
  705. .content3,
  706. .content4 {
  707. background: white;
  708. margin: 20rpx 0;
  709. border-radius: 20rpx;
  710. padding: 20rpx 0;
  711. }
  712. .content3{
  713. padding: 20rpx 0;
  714. margin:20rpx 0;
  715. }
  716. .content4 {
  717. .time{
  718. text-align: right;
  719. }
  720. .mx {
  721. background: #F7F8FA;
  722. padding: 10rpx;
  723. margin: 10rpx 0;
  724. }
  725. }
  726. /deep/.u-modal__content {
  727. flex-direction: column;
  728. }
  729. /deep/.u-popup__content{
  730. border-radius: 10px;
  731. // padding:20px;
  732. }
  733. /deep/.u-radio{
  734. margin:40rpx 0;
  735. }
  736. .close{
  737. position:absolute;
  738. right:20px;
  739. top:26px;
  740. }
  741. .termination{
  742. background:#F1F3F6;
  743. color:#C5CAD4;
  744. padding:10px;
  745. border-radius:30px;
  746. text-align: center;
  747. margin-top:30rpx;
  748. }
  749. .termination.active{
  750. background: #2772FB;
  751. color: white;
  752. }
  753. .u-popup-wrap{
  754. padding:20px;
  755. }
  756. </style>