orderDetails.vue 28 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067
  1. <!-- 订单详情-->
  2. <template>
  3. <view class="content">
  4. <view class="fixed1"></view>
  5. <view class="fixed">
  6. <view class='title flex flex-center'>
  7. <u-icon class="back" name="arrow-left" color="" size="20" @click="back"></u-icon>
  8. <view class="nav-title">订单详情</view>
  9. <u-icon class="search" name="server-fill" color="" size="28" @click="$helper.contactCustomerService()">
  10. </u-icon>
  11. </view>
  12. </view>
  13. <view class="content1">
  14. <view class="item1">
  15. <view class="status">{{dataObj.cargoOwnerStatus}}</view>
  16. </view>
  17. <!-- flex flex-space-between -->
  18. <view class="item2">
  19. <u-button class="btn" text="驳回" @click="accept(2)" v-if="dataObj.cargoOwnerStatus=='待接单'">
  20. </u-button>
  21. <u-button class="btn" text="接受" @click="accept(1)" v-if="dataObj.cargoOwnerStatus=='待接单'">
  22. </u-button>
  23. <u-button class="btn" text="终止" @click="stop()" v-if="dataObj.cargoOwnerStatus=='未装车'">
  24. </u-button>
  25. <u-button class="btn" text="查看合同" @click="lookContract" v-if="dataObj.cargoOwnerContract=='1'">
  26. </u-button>
  27. <u-button class="btn" text="签订合同" @click="signContract"
  28. v-if="dataObj.cargoOwnerStatus=='待确认装车'&&dataObj.cargoOwnerContract!='1'">
  29. </u-button>
  30. <u-button class="btn" text="驳回装车信息" @click="confirmLoading(5)" v-if="dataObj.cargoOwnerStatus=='待确认装车'">
  31. </u-button>
  32. <!-- <u-button class="btn" text="确认装车" @click="confirmLoading(3)"
  33. v-if="dataObj.cargoOwnerStatus=='待确认装车'&&dataObj.cargoOwnerContract=='1'">
  34. </u-button> -->
  35. <u-button class="btn" text="确认装车" @click="confirmLoading(3)" v-if="dataObj.cargoOwnerStatus=='待确认装车'">
  36. </u-button>
  37. <u-button class="btn" text="驳回卸车信息" @click="confirmUnLoading(6)" v-if="dataObj.cargoOwnerStatus=='待收货'">
  38. </u-button>
  39. <u-button class="btn" text="确认卸车" @click="confirmUnLoading(4)" v-if="dataObj.cargoOwnerStatus=='待收货'">
  40. </u-button>
  41. <!-- <u-button class="btn" text="确认卸车" @click="confirmLoading(4)" v-if="dataObj.cargoOwnerStatus=='待收货'">
  42. </u-button> -->
  43. <u-button class="btn" text="付款" @click="closed"
  44. v-if="dataObj.cargoOwnerStatus=='待结算'||dataObj.cargoOwnerStatus=='已结算'"></u-button>
  45. <u-button class="btn" text="还款" @click="stop" v-if="dataObj.cargoOwnerStatus=='待还款'"></u-button>
  46. <u-button class="btn" text="联系客服" @click="$helper.contactCustomerService()"
  47. v-if="dataObj.cargoOwnerStatus!='待接单'&&dataObj.cargoOwnerStatus!='未装车'">
  48. </u-button>
  49. </view>
  50. <view class="item3 flex flex-space-between align-center">
  51. <view class="left flex align-center" @click="goTodriverDetail">
  52. <u--image :showLoading="true" :src="dataObj.driverPortrait" width="44px" height="44px" @click=""
  53. shape='circle'>
  54. </u--image>
  55. <view class="name">{{dataObj.driverName}}</view>
  56. <view class="flex align-center">
  57. <!-- <view class="number">4.98</view> -->
  58. <!-- <u-icon class="star" name="star-fill" color="#FEC823" size="20" @click="back"></u-icon> -->
  59. </view>
  60. </view>
  61. <view class="right flex s-row align-center phone">
  62. <view class="bgc">
  63. <u-icon class="phone" name="phone-fill" color="#2772FB" size="20" @click="toPhone"></u-icon>
  64. </view>
  65. <view class="hz-name">联系司机</view>
  66. </view>
  67. </view>
  68. <!-- <view class='row-between'>
  69. <view class="">货主</view>
  70. <view>张三</view>
  71. </view>
  72. <view class='row-between'>
  73. <view class="">货主单位</view>
  74. <view>黑龙江中天昊元贸易有限公司</view>
  75. </view>
  76. <view class='row-between'>
  77. <view class="">卸货地</view>
  78. <view>黑龙江省齐齐哈尔市梅里斯达斡尔族区杜尔门沁达斡尔乡53农场</view>
  79. </view>
  80. <view class='row-between'>
  81. <view class="">货名</view>
  82. <view>玉米</view>
  83. </view>
  84. <view class='row-between'>
  85. <view class="">距离</view>
  86. <view>约15公里</view>
  87. </view>
  88. <view class='row-between'>
  89. <view class="">货运费</view>
  90. <view>100元/吨</view>
  91. </view> -->
  92. </view>
  93. <view class="content2">
  94. <view class="flex flex-space-between border">
  95. <view class="flex s-row item1">
  96. <view class="fontsize-46 fontweight-500 text">{{dataObj.sendCity}}</view>
  97. <view class="fontsize-28 gray">发货地</view>
  98. </view>
  99. <image class="change-btn" src="@/static/images/common/jt.png" mode='widthFix'></image>
  100. <view class="flex s-row item2">
  101. <view class="fontsize-46 fontweight-500 text" @click="">{{dataObj.unloadCity}}</view>
  102. <view class="fontsize-28 gray text-align-right">卸货地</view>
  103. </view>
  104. </view>
  105. <view class="level2-title">基本信息</view>
  106. <view class='row-between'>
  107. <view class="row-left-text gray">订单编号</view>
  108. <view class="row-right-text">{{dataObj.orderNo}}</view>
  109. </view>
  110. <!-- <view class='row-between'>
  111. <view class="row-left-text gray">货主</view>
  112. <view class="row-right-text">{{dataObj.cargoOwner}}</view>
  113. </view> -->
  114. <view class='row-between'>
  115. <view class="row-left-text gray">发货单位</view>
  116. <view class="row-right-text">{{dataObj.compName?dataObj.compName:'个人货主'}}</view>
  117. </view>
  118. <view class='row-between'>
  119. <view class="row-left-text gray">发货地</view>
  120. <view class="row-right-text place">
  121. {{dataObj.sendPrivate}}{{dataObj.sendCity}}{{dataObj.sendArea}}{{dataObj.sendDetailedAddress}}
  122. </view>
  123. </view>
  124. <view class='row-between'>
  125. <view class="row-left-text gray">卸货地</view>
  126. <view class="row-right-text place">
  127. {{dataObj.unloadPrivate}}{{dataObj.unloadCity}}{{dataObj.unloadArea}}{{dataObj.unloadDetailedAddress}}
  128. </view>
  129. </view>
  130. <view class='row-between'>
  131. <view class="row-left-text gray">货名</view>
  132. <view class="row-right-text">{{dataObj.goodsName}}</view>
  133. </view>
  134. <view class='row-between'>
  135. <view class="row-left-text gray">距离</view>
  136. <view class="row-right-text">约{{dataObj.distance}}公里</view>
  137. </view>
  138. <!-- <view class='row-between'>
  139. <view class="row-left-text gray">运费</view>
  140. <view class="row-right-text">{{dataObj.freight}}{{dataObj.illingMethod==0?'元/吨':'元/车'}}</view>
  141. </view>
  142. -->
  143. </view>
  144. <view class="content3" v-if="status1">
  145. <view class="level2-title">承运信息</view>
  146. <view class='row-between'>
  147. <view class="row-left-text gray">合同编号</view>
  148. <view class="row-right-text">{{dataObj.contractNo}}</view>
  149. </view>
  150. <view class='row-between'>
  151. <view class="row-left-text gray">车牌号</view>
  152. <view class="row-right-text">{{dataObj.hyCarrierInfo.carNo}}</view>
  153. </view>
  154. <view class='row-between'>
  155. <view class="row-left-text gray">预计运费</view>
  156. <view class="row-right-text">{{dataObj.hyCarrierInfo.estimatedFreight}}元</view>
  157. </view>
  158. <view class='row-between'>
  159. <view class="row-left-text gray">预付款</view>
  160. <view class="row-right-text">{{dataObj.advanceCharge}}元</view>
  161. </view>
  162. <view class='row-between'>
  163. <view class="row-left-text gray">装车净重</view>
  164. <view class="row-right-text">{{dataObj.hyCarrierInfo?dataObj.hyCarrierInfo.loadingWeight:""}}吨</view>
  165. </view>
  166. <view class='row-between'>
  167. <view class="row-left-text gray">装车时间</view>
  168. <view class="row-right-text">{{dataObj.hyCarrierInfo.loadingDate}}</view>
  169. </view>
  170. <view class='row-between'>
  171. <view class="row-left-text gray">装车照片</view>
  172. <view class="flex">
  173. <u--image :showLoading="true" :src="item" width="40px" height="40px"
  174. v-for="(item,index) in zcImgList" :key='index' @click='ylImg(zcImgList)'></u--image>
  175. </view>
  176. </view>
  177. <view class='row-between'>
  178. <view class="row-left-text gray">合计应付运费</view>
  179. <view class="row-right-text">
  180. {{dataObj.hyCarrierInfo.totalFreight}}{{dataObj.hyCarrierInfo.totalFreight?"元":""}}
  181. </view>
  182. </view>
  183. <view class='row-between'>
  184. <view class="row-left-text gray">卸车时间</view>
  185. <view class="row-right-text">{{dataObj.hyCarrierInfo.unloadingDate}}</view>
  186. </view>
  187. <view class='row-between'>
  188. <view class="row-left-text gray">卸车照片</view>
  189. <view class="flex">
  190. <u--image :showLoading="true" :src="item" width="40px" height="40px"
  191. v-for="(item,index) in xcImgList" :key='index' @click='ylImg(xcImgList)'></u--image>
  192. </view>
  193. </view>
  194. </view>
  195. <!-- v-if="status2 -->
  196. <view class="content4" v-if="status2">
  197. <view class="level2-title">运费信息(单位:元)</view>
  198. <view class='row-between'>
  199. <view class="row-left-text gray">预付运费</view>
  200. <view class="row-right-text">{{dataObj.freightInfo.prepaidFreight}}</view>
  201. </view>
  202. <view class='flex flex-end'>
  203. <view class="row-right-text">{{dataObj.freightInfo.prepaidFreightDate}}</view>
  204. </view>
  205. <view class='row-between'>
  206. <view class="row-left-text gray">运费尾款</view>
  207. <view class="row-right-text">
  208. {{dataObj.freightInfo.freightBalance?dataObj.freightInfo.freightBalance:"未支付"}}
  209. </view>
  210. </view>
  211. <view class='flex flex-end'>
  212. <view class="row-right-text">{{dataObj.freightInfo.freightBalanceDate}}</view>
  213. </view>
  214. <view class='row-between mx row-left-text' v-if="dataObj.freightInfo.freightBalance">
  215. 明细:预付{{dataObj.advanceCharge}}元,服务费{{dataObj.freightInfo.driverServiceCharge}}元,尾款{{dataObj.freightInfo.freightBalance}}元,司机合计收款{{dataObj.freightInfo.totalCollection}}元。
  216. </view>
  217. </view>
  218. <!-- v-if="status3" -->
  219. <view class="content4" v-if="status3">
  220. <view class="level2-title gray">还款信息</view>
  221. <view class='row-between'>
  222. <view class="row-left-text gray">运费</view>
  223. <view class="row-right-text">{{dataObj.freightInfo.totalRepayable}}</view>
  224. </view>
  225. <view class='flex flex-end'>
  226. <view class="gray row-right-text">{{dataObj.freightInfo.prepaidFreightDate}}</view>
  227. </view>
  228. <view class='row-between'>
  229. <view class="row-left-text gray">超期费(每天3%)</view>
  230. <view class="row-right-text">{{dataObj.freightInfo.overdueFee}}</view>
  231. </view>
  232. <view class='row-between'>
  233. <view class="row-left-text gray">合计应还</view>
  234. <view class="row-right-text">{{dataObj.freightInfo.totalRepayable}}</view>
  235. </view>
  236. <view class='row-between'>
  237. <view class="row-left-text gray">还款(尾号{{dataObj.freightInfo.repaymentBank}})</view>
  238. <view class="row-right-text">{{dataObj.freightInfo.repaymentConfirm}}</view>
  239. </view>
  240. <view class='row-between'>
  241. <view class="row-left-text gray">{{dataObj.freightInfo.updateDate}}</view>
  242. <!-- <view class="row-right-text">{{dataObj.freightInfo.freightBalance}}</view> -->
  243. </view>
  244. </view>
  245. <u-modal :show="isShowAlert" :title="alertTitle" :content='alertContent' :confirmText='confirmText'
  246. :closeOnClickOverlay='true' :showCancelButton='true' @confirm="confirmClick" @close="cancelClick"
  247. @cancel="cancelClick" class="modal">
  248. <u-radio-group v-model="radiovalue1" placement="" v-if='isShowTerminationReason' class='row'>
  249. <u-radio :customStyle="{marginBottom: '8px'}" v-for="(item, index) in radiolist1" :key="index"
  250. :label="item.name" :name="item.name" @change="radioChange">
  251. </u-radio>
  252. </u-radio-group>
  253. <u--textarea class="row" v-model="value2" placeholder="终止原因描述" count maxlength='50'
  254. v-if='isShowTerminationReason'>
  255. </u--textarea>
  256. </u-modal>
  257. <u-toast ref="uToast"></u-toast>
  258. <!-- <view v-if="lookAlert" class="look-contract" @click="lookAlert==false">
  259. <u-button class="btn" text="查看合同" @click="lookContract"></u-button>
  260. <u-button class="btn" text="签名"></u-button>
  261. <view class="wrapper">
  262. <view class="handBtn">
  263. <image @click="selectColorEvent('black','#1A1A1A')"
  264. :src="selectColor === 'black' ? '/static/other/color_black_selected.png' : '/static/other/color_black.png'"
  265. :class="[selectColor === 'black' ? 'color_select' : '', 'black-select']"></image>
  266. <image @click="selectColorEvent('red','#ca262a')"
  267. :src="selectColor === 'red' ? '/static/other/color_red_selected.png' : '/static/other/color_red.png'"
  268. :class="[selectColor === 'red' ? 'color_select' : '', 'black-select']"></image>
  269. <button @click="retDraw" class="delBtn">重写</button>
  270. <button @click="saveCanvasAsImg" class="saveBtn">保存</button>
  271. <button @click="previewCanvasImg" class="previewBtn">预览</button>
  272. <button @click="subCanvas" class="subBtn">完成</button>
  273. </view>
  274. <view class="handCenter">
  275. <canvas class="handWriting" :disable-scroll="true" @touchstart="uploadScaleStart"
  276. @touchmove="uploadScaleMove" canvas-id="handWriting"></canvas>
  277. </view>
  278. <view class="handRight">
  279. <view class="handTitle">请签名</view>
  280. </view>
  281. </view>
  282. </view> -->
  283. </view>
  284. </template>
  285. <script>
  286. var that;
  287. import uploadImage from '@/components/ossutil/uploadFile.js';
  288. export default {
  289. data() {
  290. return {
  291. cyinfoStatus: '未装车',
  292. src: 'https://cdn.uviewui.com/uview/album/1.jpg',
  293. isShowTerminationReason: false,
  294. id: "",
  295. dataObj: {
  296. contractNo: '123'
  297. },
  298. type: null,
  299. status1: false,
  300. status2: false,
  301. status3: false,
  302. id: '',
  303. value2: '',
  304. radiolist1: [{
  305. name: '已与货主协商',
  306. disabled: false
  307. },
  308. {
  309. name: '货主原因终止',
  310. disabled: false
  311. },
  312. {
  313. name: '司机个人原因终止',
  314. disabled: false
  315. }, {
  316. name: '其他',
  317. disabled: false
  318. }
  319. ],
  320. radiovalue1: '已与货主协商',
  321. confirmText: '终止',
  322. alertTitle: '确定终止订单?',
  323. alertContent: "",
  324. isShowAlert: false,
  325. zcImgList: [],
  326. xcImgList: [],
  327. contractSrc: '',
  328. canvasName: 'handWriting',
  329. ctx: '',
  330. startX: null,
  331. startY: null,
  332. canvasWidth: 0,
  333. canvasHeight: 0,
  334. selectColor: 'black',
  335. lineColor: '#1A1A1A', // 颜色
  336. lineSize: 5, // 笔记倍数
  337. }
  338. },
  339. onLoad(options) {
  340. that = this
  341. this.id = options.id
  342. // this.ctx = uni.createCanvasContext("handWriting");
  343. // this.$nextTick(() => {
  344. // uni.createSelectorQuery().select('.handCenter').boundingClientRect(rect => {
  345. // this.canvasWidth = rect.width;
  346. // this.canvasHeight = rect.height;
  347. // /* 将canvas背景设置为 白底,不设置 导出的canvas的背景为透明 */
  348. // this.setCanvasBg('#fff');
  349. // })
  350. // .exec();
  351. // });
  352. },
  353. onShow() {
  354. this.getList()
  355. },
  356. methods: {
  357. ylImg(src) {
  358. uni.previewImage({
  359. urls: src,
  360. longPressActions: {
  361. itemList: ['发送给朋友', '保存图片', '收藏'],
  362. success: function(data) {
  363. console.log('选中了第' + (data.tapIndex + 1) + '个按钮,第' + (data.index + 1) + '张图片');
  364. },
  365. fail: function(err) {
  366. console.log(err.errMsg);
  367. }
  368. }
  369. });
  370. },
  371. goTodriverDetail() {
  372. uni.$u.route('/pages/order/driverDetail', {
  373. driver: JSON.stringify(this.dataObj)
  374. });
  375. },
  376. lookContract() {
  377. uni.downloadFile({
  378. url: this.dataObj.ownerContractUrl,
  379. success: function(res) {
  380. var filePath = res.tempFilePath;
  381. uni.openDocument({
  382. filePath: filePath,
  383. showMenu: true,
  384. success: function(res) {
  385. console.log('打开文档成功');
  386. }
  387. });
  388. }
  389. });
  390. },
  391. signContract() {
  392. // this.lookAlert = true
  393. uni.$u.route('/pages/order/signContract', {
  394. obj: JSON.stringify(this.dataObj)
  395. });
  396. },
  397. // 完结
  398. closed() {
  399. let item = this.dataObj
  400. let that = this
  401. this.$request.baseRequest('post', '/orderInfo/api/editEnd', {
  402. id: item.id,
  403. }).then(res => {
  404. if (res.code == 200) {
  405. this.$refs.uToast.show({
  406. type: 'success',
  407. message: "提交成功",
  408. complete() {
  409. that.upCallback({
  410. size: 10,
  411. num: 1
  412. })
  413. }
  414. })
  415. }
  416. })
  417. .catch(res => {
  418. uni.$u.toast(res.message);
  419. });
  420. },
  421. accept(type) {
  422. this.type = type
  423. if (type == 1) {
  424. this.alertTitle = '确定接受订单?'
  425. this.confirmText = '确定'
  426. } else if (type == 2) {
  427. this.alertTitle = '确定拒绝订单?'
  428. this.confirmText = '确定'
  429. } else {
  430. this.alertTitle = '确定终止订单?'
  431. this.confirmText = '终止'
  432. }
  433. this.isShowAlert = true
  434. },
  435. confirmLoading(type) {
  436. if(this.type == 3 && this.type == 4){
  437. if (this.dataObj.cargoOwnerContract != '1') {
  438. uni.showToast({
  439. title: '请先签订合同',
  440. icon: 'none'
  441. })
  442. return
  443. }
  444. }
  445. this.type = type
  446. if (type == 3) {
  447. this.alertTitle = '确认装车?'
  448. this.confirmText = '确定'
  449. this.isShowAlert = true
  450. } else if (type == 4) {
  451. this.alertTitle = '确认卸车?'
  452. this.confirmText = '确定'
  453. this.isShowAlert = true
  454. } else if (type == 5) { //驳回装车信息不用签合同
  455. this.alertTitle = '确认驳回装车信息?'
  456. this.confirmText = '确定'
  457. this.isShowAlert = true
  458. }
  459. // uni.$u.route('/pages/order/confirmLoading', item);
  460. },
  461. confirmUnLoading(type) {
  462. this.type=type
  463. if(type == 4){
  464. this.alertTitle = '确认卸车?'
  465. this.confirmText = '确定'
  466. this.isShowAlert = true
  467. }else if(type == 6){
  468. this.alertTitle = '确定驳回卸车信息?'
  469. this.confirmText = '确定'
  470. this.isShowAlert = true
  471. }
  472. // let item = this.dataObj
  473. // uni.$u.route('/pages/order/confirmUnloading', item);
  474. },
  475. confirmClick() {
  476. that.isShowAlert = false
  477. if (this.type == 1 || this.type == 2) {
  478. let _title = ''
  479. this.$request.baseRequest('post', '/orderInfo/api/orderReceiving', {
  480. id: this.dataObj.id,
  481. flag: this.type
  482. }).then(res => {
  483. if (res.code == 200) {
  484. if (this.type == 1) {
  485. _title = '接单成功'
  486. } else {
  487. _title = '拒绝接单成功'
  488. }
  489. this.$refs.uToast.show({
  490. type: 'success',
  491. message: _title,
  492. complete() {
  493. that.mescroll.resetUpScroll()
  494. }
  495. })
  496. } else {
  497. if (this.type == 1) {
  498. _title = '接单失败'
  499. } else {
  500. _title = '拒绝接单失败'
  501. }
  502. this.$refs.uToast.show({
  503. type: 'success',
  504. message: _title,
  505. complete() {
  506. that.mescroll.resetUpScroll()
  507. }
  508. })
  509. }
  510. })
  511. .catch(res => {
  512. uni.$u.toast(res.message);
  513. });
  514. } else if (this.type == 3 || this.type == 4) {
  515. let _flag = ''
  516. if (this.type == 3) _flag = 1
  517. if (this.type == 4) _flag = 2
  518. this.$request.baseRequest('post', '/carrierInfo/cargoOwnerLoadingAdd', {
  519. id: this.dataObj.id,
  520. loadingFlag: _flag,
  521. flag: 1
  522. }).then(res => {
  523. if (res.code == 200) {
  524. this.$refs.uToast.show({
  525. type: 'success',
  526. message: "提交成功",
  527. complete() {
  528. that.getList()
  529. // that.upCallback({
  530. // size: 10,
  531. // num: 1
  532. // })
  533. }
  534. })
  535. }
  536. })
  537. .catch(res => {
  538. uni.$u.toast(res.message);
  539. });
  540. }else if(this.type==5){
  541. this.$request.baseRequest('post', '/carrierInfo/cargoOwnerLoadingAdd', {
  542. id: this.dataObj.id,
  543. loadingFlag: 1,
  544. flag: 2
  545. }).then(res => {
  546. if (res.code == 200) {
  547. this.$refs.uToast.show({
  548. type: 'success',
  549. message: "驳回装车成功!",
  550. complete() {
  551. that.getList()
  552. // that.upCallback({
  553. // size: 10,
  554. // num: 1
  555. // })
  556. }
  557. })
  558. }
  559. })
  560. .catch(res => {
  561. uni.$u.toast(res.message);
  562. });
  563. }else if(this.type == 6){
  564. this.$request.baseRequest('post', '/carrierInfo/cargoOwnerLoadingAdd', {
  565. id: this.dataObj.id,
  566. loadingFlag: 2,
  567. flag: 2
  568. }).then(res => {
  569. if (res.code == 200) {
  570. this.$refs.uToast.show({
  571. type: 'success',
  572. message: "驳回卸车信息成功",
  573. complete() {
  574. that.getList()
  575. // that.upCallback({
  576. // size: 10,
  577. // num: 1
  578. // })
  579. }
  580. })
  581. }
  582. })
  583. .catch(res => {
  584. uni.$u.toast(res.message);
  585. });
  586. } else {
  587. if (this.radiovalue1 == '其他' && !this.value2) {
  588. this.$refs.uToast.show({
  589. type: 'error',
  590. message: "请填写终止原因描述!",
  591. })
  592. return
  593. }
  594. let _terminationReason = ''
  595. if (this.radiovalue1 == '已与货主协商') {
  596. _terminationReason = 1
  597. } else if (this.radiovalue1 == '货主原因终止') {
  598. _terminationReason = 2
  599. } else if (this.radiovalue1 == '司机个人原因终止') {
  600. _terminationReason = 3
  601. } else if (this.radiovalue1 == '其他') {
  602. _terminationReason = 4
  603. }
  604. this.$request.baseRequest('post', '/orderInfo/api/end', {
  605. id: this.id,
  606. terminator: 2,
  607. }).then(res => {
  608. if (res.code == 200) {
  609. this.$refs.uToast.show({
  610. type: 'success',
  611. message: '终止订单成功',
  612. })
  613. } else {
  614. this.$refs.uToast.show({
  615. type: 'success',
  616. message: '终止订单失败',
  617. })
  618. }
  619. that.mescroll.resetUpScroll()
  620. })
  621. .catch(res => {
  622. uni.$u.toast(res.message);
  623. });
  624. }
  625. },
  626. cancelClick() {
  627. this.isShowAlert = false
  628. },
  629. stop() {
  630. let item = this.dataObj
  631. // 货主接单
  632. if (item.cargoOwnerStatusKey == 1) {
  633. this.isShowTerminationReason = false
  634. } else {
  635. this.isShowTerminationReason = true
  636. }
  637. this.id = item.id
  638. this.isShowAlert = true
  639. },
  640. toPhone() {
  641. var that=this
  642. uni.makePhoneCall({
  643. phoneNumber: that.dataObj.driverPhone,
  644. success: (res) => {
  645. console.log('调用成功!')
  646. },
  647. // 失败回调
  648. fail: (res) => {
  649. console.log('调用失败!')
  650. }
  651. });
  652. },
  653. back() {
  654. uni.navigateBack()
  655. },
  656. getList() {
  657. this.$request.baseRequest('get', '/orderInfo/getOrderInfo', {
  658. id: this.id,
  659. }).then(res => {
  660. if (res.code == 200) {
  661. this.dataObj = res.data
  662. // 承运信息显示
  663. if (res.data.cargoOwnerStatus != "待接单" && res.data.cargoOwnerStatus != "未装车" && res.data
  664. .cargoOwnerStatus != "已终止") {
  665. this.status1 = true
  666. }
  667. // 运费信息
  668. if (res.data.cargoOwnerStatus != "待接单" && res.data.cargoOwnerStatus != "未装车" && res.data
  669. .cargoOwnerStatus != "待确认装车" && res.data.cargoOwnerStatus != "已驳回装车信息" && res.data
  670. .cargoOwnerStatus != "待平台确认装车" && res.data.cargoOwnerStatus != "平台驳回装车信息" && res.data
  671. .cargoOwnerStatus != "待结算" && res.data
  672. .cargoOwnerStatus != "已终止") {
  673. this.status2 = true
  674. }
  675. //还款信息
  676. if (res.data.cargoOwnerStatus == "待还款" && res.data.cargoOwnerStatus == "已还款" && res.data
  677. .cargoOwnerStatus == "已完结") {
  678. this.status3 = true
  679. }
  680. if (res.data.hyCarrierInfo) {
  681. if (res.data.hyCarrierInfo.loadingImg) {
  682. let _zcList = res.data.hyCarrierInfo.loadingImg.split(',')
  683. for (let i = 0; i < _zcList.length; i++) {
  684. if (_zcList[i]) this.zcImgList.push(_zcList[i])
  685. }
  686. }
  687. if (res.data.hyCarrierInfo.unloadingImg) {
  688. let _xcList = res.data.hyCarrierInfo.unloadingImg.split(',')
  689. for (let i = 0; i < _xcList.length; i++) {
  690. if (_xcList[i]) this.xcImgList.push(_xcList[i])
  691. }
  692. }
  693. }
  694. }
  695. })
  696. },
  697. goConfirmLoading(id) {
  698. console.log('点击详情id:', id)
  699. uni.$u.route('/pages/order/confirmLoading', {
  700. id: this.id,
  701. });
  702. },
  703. }
  704. }
  705. </script>
  706. <style lang="scss">
  707. .fixed,
  708. .fixed1 {
  709. background: white;
  710. position: fixed;
  711. top: var(--status-bar-height);
  712. z-index: 999;
  713. width: 100%;
  714. }
  715. .fixed {
  716. padding-bottom: 10rpx;
  717. .title {
  718. background: white;
  719. position: relative;
  720. font-size: 36rpx;
  721. color: rgba(0, 0, 0, 0.85);
  722. .search {
  723. position: absolute;
  724. right: 20rpx;
  725. }
  726. .back {
  727. position: absolute;
  728. left: 20rpx;
  729. }
  730. }
  731. }
  732. .fixed1 {
  733. top: 0;
  734. height: var(--status-bar-height);
  735. background: white;
  736. }
  737. .row-between {
  738. margin-bottom: 10rpx;
  739. }
  740. .content1 {
  741. background: white;
  742. margin: calc(var(--status-bar-height) + 80rpx) 20rpx 0 20rpx;
  743. border-radius: 20rpx;
  744. padding: 40rpx 0rpx 0 0;
  745. box-sizing: border-box;
  746. .status {
  747. display: flex;
  748. justify-content: center;
  749. margin-bottom: 40rpx;
  750. font-size: 36rpx;
  751. color: #333333;
  752. font-weight: 700;
  753. }
  754. .btn {
  755. width: 40%;
  756. margin-top: 20rpx;
  757. }
  758. .item2 {
  759. padding-bottom: 40rpx;
  760. }
  761. .item3 {
  762. padding: 20rpx;
  763. background: linear-gradient(180deg, #F7F7F9 0%, #FFFFFF 100%);
  764. border-radius: 0 0 20rpx 20rpx;
  765. .name {
  766. margin-left: 10rpx;
  767. margin-right: 20rpx;
  768. font-size: 32rpx;
  769. font-weight: 500;
  770. color: #333333;
  771. }
  772. .number {
  773. font-size: 26rpx;
  774. color: #878787;
  775. }
  776. .star {
  777. margin-left: 10rpx;
  778. }
  779. .phone {
  780. .bgc {
  781. background: #E5F0FE;
  782. width: 58rpx;
  783. height: 58rpx;
  784. display: flex;
  785. align-items: center;
  786. justify-content: center;
  787. border-radius: 50%;
  788. }
  789. .hz-name {
  790. font-size: 26rpx;
  791. color: #2772FB;
  792. }
  793. }
  794. }
  795. }
  796. .level2-title {
  797. margin: 20rpx 0 20rpx 0;
  798. }
  799. .content2 {
  800. background: white;
  801. margin: 20rpx;
  802. border-radius: 20rpx;
  803. padding: 20rpx;
  804. .change-btn {
  805. width: 86rpx;
  806. height: 86rpx;
  807. position: relative;
  808. top: -20rpx;
  809. }
  810. .item1,
  811. .item2 {
  812. width: 40%;
  813. .text {
  814. text-overflow: ellipsis;
  815. overflow: hidden;
  816. white-space: nowrap;
  817. }
  818. .gray {
  819. text-align: center;
  820. }
  821. }
  822. .item1 .text {
  823. text-align: center;
  824. }
  825. .item2 .text {
  826. text-align: center;
  827. }
  828. .border {
  829. border-bottom: 1px solid #EEEEEE;
  830. padding-bottom: 33rpx;
  831. }
  832. .place {
  833. width: 80%;
  834. text-align: right;
  835. }
  836. }
  837. .content3,
  838. .content4 {
  839. background: white;
  840. margin: 20rpx;
  841. border-radius: 20rpx;
  842. padding: 20rpx;
  843. }
  844. .content4 {
  845. .time {
  846. text-align: right;
  847. }
  848. .mx {
  849. background: #F7F8FA;
  850. padding: 10rpx;
  851. margin: 10rpx 0;
  852. }
  853. }
  854. /deep/.u-modal__content {
  855. flex-direction: column;
  856. }
  857. .look-contract {
  858. padding-top: 1000rpx;
  859. position: fixed;
  860. top: 0;
  861. bottom: 0;
  862. left: 0;
  863. right: 0;
  864. margin: auto;
  865. background: #0000005e;
  866. width: 100%;
  867. height: 100vh;
  868. .btn {
  869. width: 70%;
  870. margin-bottom: 20rpx;
  871. }
  872. }
  873. .wrapper {
  874. width: 100%;
  875. height: 95vh;
  876. margin: 30rpx 0;
  877. overflow: hidden;
  878. display: flex;
  879. align-content: center;
  880. flex-direction: row;
  881. justify-content: center;
  882. font-size: 28rpx;
  883. position: relative;
  884. }
  885. .handWriting {
  886. background: #fff;
  887. width: 100%;
  888. height: 95vh;
  889. }
  890. .handRight {
  891. display: inline-flex;
  892. align-items: center;
  893. }
  894. .handCenter {
  895. border: 4rpx dashed #e9e9e9;
  896. flex: 5;
  897. overflow: hidden;
  898. box-sizing: border-box;
  899. }
  900. .handTitle {
  901. transform: rotate(90deg);
  902. flex: 1;
  903. color: #666;
  904. }
  905. .handBtn button {
  906. font-size: 28rpx;
  907. }
  908. .handBtn {
  909. height: 95vh;
  910. display: inline-flex;
  911. flex-direction: column;
  912. justify-content: space-between;
  913. align-content: space-between;
  914. flex: 1;
  915. }
  916. .delBtn {
  917. position: absolute;
  918. top: 250rpx;
  919. left: 0rpx;
  920. transform: rotate(90deg);
  921. color: #666;
  922. }
  923. .delBtn image {
  924. position: absolute;
  925. top: 13rpx;
  926. left: 25rpx;
  927. }
  928. .subBtn {
  929. position: absolute;
  930. bottom: 52rpx;
  931. left: -3rpx;
  932. display: inline-flex;
  933. transform: rotate(90deg);
  934. background: #008ef6;
  935. color: #fff;
  936. margin-bottom: 30rpx;
  937. text-align: center;
  938. justify-content: center;
  939. }
  940. /*Peach - 新增 - 保存*/
  941. .saveBtn {
  942. position: absolute;
  943. top: 375rpx;
  944. left: 0rpx;
  945. transform: rotate(90deg);
  946. color: #666;
  947. }
  948. .previewBtn {
  949. position: absolute;
  950. top: 500rpx;
  951. left: 0rpx;
  952. transform: rotate(90deg);
  953. color: #666;
  954. }
  955. .uploadBtn {
  956. position: absolute;
  957. top: 625rpx;
  958. left: 0rpx;
  959. transform: rotate(90deg);
  960. color: #666;
  961. }
  962. /*Peach - 新增 - 保存*/
  963. .black-select {
  964. width: 60rpx;
  965. height: 60rpx;
  966. position: absolute;
  967. top: 30rpx;
  968. left: 25rpx;
  969. }
  970. .black-select.color_select {
  971. width: 90rpx;
  972. height: 90rpx;
  973. top: 100rpx;
  974. left: 10rpx;
  975. }
  976. .red-select {
  977. width: 60rpx;
  978. height: 60rpx;
  979. position: absolute;
  980. top: 140rpx;
  981. left: 25rpx;
  982. }
  983. .red-select.color_select {
  984. width: 90rpx;
  985. height: 90rpx;
  986. top: 120rpx;
  987. left: 10rpx;
  988. }
  989. </style>