orderDetails.vue 37 KB

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