confirmUnloading.vue 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649
  1. <!-- 确认卸车 -->
  2. <template>
  3. <view class="content">
  4. <view class="content2">
  5. <view class="level2-title">基本信息</view>
  6. <view class='row-between'>
  7. <view class="row-left-text">订单编号</view>
  8. <view class="row-right-text">{{detailData.orderNo}}</view>
  9. </view>
  10. <view class='row-between'>
  11. <view class="row-left-text">货主</view>
  12. <view class="row-right-text">{{detailData.cargoOwner}}</view>
  13. </view>
  14. <view class='row-between'>
  15. <view class="row-left-text">货主单位</view>
  16. <view class="row-right-text">{{detailData.compName?detailData.compName:'个人货主'}}</view>
  17. </view>
  18. <view class='row-between'>
  19. <view class="row-left-text">发货地</view>
  20. <view class="row-right-text place">
  21. {{detailData.sendPrivate}}{{detailData.sendCity}}{{detailData.sendArea}}{{detailData.sendDetailedAddress}}
  22. </view>
  23. </view>
  24. <view class='row-between'>
  25. <view class="row-left-text">卸货地</view>
  26. <view class="row-right-text place">
  27. {{detailData.unloadPrivate}}{{detailData.unloadCity}}{{detailData.unloadArea}}{{detailData.unloadDetailedAddress}}
  28. </view>
  29. </view>
  30. <view class='row-between'>
  31. <view class="row-left-text">货名</view>
  32. <view class="row-right-text">{{detailData.goodsName}}</view>
  33. </view>
  34. <view class='row-between'>
  35. <view class="row-left-text">运费</view>
  36. <view class="row-right-text">{{detailData.freight}}{{detailData.billingMethod==0?'元/吨':'元/车'}}</view>
  37. </view>
  38. </view>
  39. <view class="content2">
  40. <view class="level2-title">卸车信息</view>
  41. <view class='row-between'>
  42. <view class="row-left-text">车牌号</view>
  43. <view class="row-right-text">{{detailData.carNumber}}</view>
  44. </view>
  45. <!-- <view class='row-between'>
  46. <view class="row-left-text">卸车日期</view>
  47. <view class="row-right-text">{{detailData.carrierInfo.unloadingDate}}</view>
  48. </view> -->
  49. <view class="row-between">
  50. <view class="left-text">卸车日期</view>
  51. <view class="row-right-text" @click="selectUnloadingDate">
  52. {{detailData.carrierInfo.unloadingDate?detailData.carrierInfo.unloadingDate:'选择卸车日期'}}
  53. </view>
  54. </view>
  55. <!-- <view class='row-between'>
  56. <view class="row-left-text">合计运费(元)</view>
  57. <view style='position:relative;'>
  58. <input :style="{color:this.detailData.freight!=detailData.totalFreight?'red':'#000'}" class="totalFreight-input" placeholder="输入合计运费" v-model="detailData.totalFreight"
  59. type="number" />
  60. <image @click='eliminate' class='close' v-if='detailData.totalFreight.length>0' src="../../static/images/order/guanbi.png" mode=""></image>
  61. </view>
  62. </view> -->
  63. <view class='row-between'>
  64. <view class="row-left-text">定位</view>
  65. <view style='font-size:14px;' class="flex align-center">
  66. {{detailData.carrierInfo.unloadCity}}{{detailData.carrierInfo.unloadArea}}
  67. <view class="sx-style" @click.stop="getLngLat()">刷新</view>
  68. </view>
  69. </view>
  70. <view class='s-flex'>
  71. <view class="row-left-text" style="margin:20rpx 0;">上传卸车照片(1-3张)</view>
  72. <u-upload class="uview-upload" :fileList="fileList1" @afterRead="afterRead($event)" @delete="deletePic"
  73. name="1" multiple :maxCount="3"></u-upload>
  74. </view>
  75. <view class='s-flex'>
  76. <view class="row-left-text" style="margin:20rpx 0;">上传回单照片(磅单)</view>
  77. <u-upload class="uview-upload" :fileList="fileList2" @afterRead="afterRead1($event)" @delete="deletePic1"
  78. name="2" multiple :maxCount="3"></u-upload>
  79. </view>
  80. </view>
  81. <view class="bottom-btn">
  82. <view class="store" @click="$u.throttle(submit(1), 5000)">暂存</view>
  83. <view class="submit" @click="$u.throttle(submit(3), 5000)">提交</view>
  84. </view>
  85. <u-modal :show="isShowAlert" :title="alertTitle" :content='alertContent' :closeOnClickOverlay='true'
  86. :showCancelButton='true' confirmColor='#2772FB' @confirm="confirmClick" @close="cancelClick"
  87. @cancel="cancelClick"></u-modal>
  88. <!--<u- picker :show="isShowValidity" :defaultIndex='defaultIndex' ref="uPicker" :columns="validityPeriod" @confirm="confirmValidityPeriod"
  89. :closeOnClickOverlay='true' @close='isShowValidity=false' @cancel='isShowValidity=false'>
  90. </u-picker> -->
  91. <!-- :endDate="array" -->
  92. <itmister-date-picker :dateStatus="0" ref="dateEl" :startYear="1999"
  93. :futureYear="30" @dateConfirm="confirmValidityPeriod"></itmister-date-picker>
  94. <u-toast ref="uToast"></u-toast>
  95. </view>
  96. </template>
  97. <script>
  98. let that;
  99. import uploadImage from '@/components/ossutil/uploadFile.js';
  100. //插件对象
  101. var sdkwx = uni.requireNativePlugin('Hdgq-LocSdkWX');
  102. export default {
  103. data() {
  104. return {
  105. imgList: [],
  106. fileList1: [],
  107. fileList2:[],
  108. validityPeriod: [],
  109. sourceType: ['camera'],
  110. imgList1:[],
  111. detailData: {
  112. addressUrl: '',
  113. hyCarrierInfo:{},
  114. totalFreight:''
  115. },
  116. defaultIndex:[],
  117. action: this.$helper.ossUploadUrl,
  118. maxSize: 50 * 1024 * 1024, //限制文件大小 50M
  119. isAdd: true,
  120. isShowAlert: false,
  121. alertContent: '',
  122. alertTitle: '',
  123. localtion:{},
  124. shippingNoteInfos: [{
  125. shippingNoteNumber: '',
  126. serialNumber: "",
  127. startCountrySubdivisionCode: "",
  128. endCountrySubdivisionCode: "",
  129. startLongitude: "",
  130. startLatitude: "",
  131. endLongitude: "",
  132. endLatitude: "",
  133. startLocationText: "",
  134. endLocationText: "",
  135. vehicleNumber: "",
  136. driverName: "",
  137. interval: "",
  138. }],
  139. }
  140. },
  141. onLoad(options) {
  142. this.detailData = JSON.parse(options.obj)
  143. console.log(this.detailData,"编号编号焦点方式规范化见到过")
  144. this.fileList1=[]
  145. this.fileList2=[]
  146. if(this.detailData.hyCarrierInfo.unloadingImg){
  147. this.imgList=this.detailData.hyCarrierInfo.unloadingImg.split(',')
  148. var data=this.detailData.hyCarrierInfo.unloadingImg.split(',')
  149. for (var i = 0; i < data.length; i++) {
  150. if(data[i]!=''){
  151. this.fileList1.push({url:data[i]})
  152. }
  153. }
  154. }
  155. if(this.detailData.hyCarrierInfo.receiptImg){
  156. this.imgList1=this.detailData.hyCarrierInfo.receiptImg.split(',')
  157. var data=this.detailData.hyCarrierInfo.receiptImg.split(',')
  158. for (var i = 0; i < data.length; i++) {
  159. if(data[i]!=''){
  160. this.fileList2.push({url:data[i]})
  161. }
  162. }
  163. }
  164. if(this.detailData.hyCarrierInfo.totalFreight){
  165. this.$set(this.detailData,'totalFreight',String(this.detailData.hyCarrierInfo.totalFreight))
  166. // this.detailData.totalFreight=String(this.detailData.hyCarrierInfo.totalFreight)
  167. }else{
  168. this.$set(this.detailData,'totalFreight',String(this.detailData.freight))
  169. // this.detailData.totalFreight=String(this.detailData.freight)
  170. }
  171. this.detailData.carrierInfo = {
  172. // unloadingDate: '',
  173. // estimatedFreight: '',
  174. // unloadingAreaLongitude: '',
  175. // unloadingAreaLatitude: '',
  176. // unloadCity: '',
  177. // unloadArea: '',
  178. // unloadingImg: '',
  179. // totalFreight: '',
  180. unloadingImg:this.detailData.hyCarrierInfo.unloadingImg,
  181. receiptImg:this.detailData.hyCarrierInfo.receiptImg,
  182. id: this.detailData.carrierId?this.detailData.carrierId:this.detailData.hyCarrierInfo.id,
  183. }
  184. // #ifdef APP-PLUS
  185. this.getLngLat();
  186. // #endif
  187. this.getNowTime()
  188. },
  189. methods: {
  190. stop(){//结束定位
  191. this.shippingNoteInfos[0].shippingNoteNumber = this.detailData.orderNo, //运单号
  192. this.shippingNoteInfos[0].serialNumber = "0000", //分单号
  193. this.shippingNoteInfos[0].startCountrySubdivisionCode = this.detailData.sendAdCode, //起点位置行政区划代码,调 用 start/stop/pause/restart 时 必填,调用 send 非必填
  194. this.shippingNoteInfos[0].endCountrySubdivisionCode = this.detailData.unsendAdCode, //到达位置行政区划代码,调 用 start/stop/pause/restart 时 必填,调用 send 非必填
  195. this.shippingNoteInfos[0].startLongitude = this.detailData.sendLongitude, //起点位置经度,调用 start/stop/pause/restart 时必 填,调用 send 非必填
  196. this.shippingNoteInfos[0].startLatitude = this.detailData.sendLatitude, //起点位置纬度,调用 start/stop/pause/restart 时必 填,调用 send 非必填
  197. this.shippingNoteInfos[0].endLongitude = this.detailData.unsendLongitude, //到达位置经度,调用 start/stop/pause/restart 时必 填,调用 send 非必填
  198. this.shippingNoteInfos[0].endLatitude = this.detailData.unsendLatitude, //到达位置纬度,调用 start/stop/pause/restart 时必 填,调用 send 非必填
  199. this.shippingNoteInfos[0].startLocationText = this.detailData.sendCity, //起点地址文字描述,调用 start/stop/pause/restart 时必 填,调用 send 非必填
  200. this.shippingNoteInfos[0].endLocationText = this.detailData.unloadCity, //到达地址文字描述,调用 start/stop/pause/restart 时必 填,调用 send 非必填
  201. this.shippingNoteInfos[0].vehicleNumber = this.detailData.carNumber, //车牌号,SDK 回调返回,调 用 start/stop/pause/restart/必 填,send 时非必填
  202. this.shippingNoteInfos[0].driverName = this.detailData.driverName, //司机姓名,SDK 回调返回, 调用 start/stop/pause/restart/ 必填,send 时非必填
  203. this.shippingNoteInfos[0].interval = "5000" //请求时间间隔,SDK 回调返 回(单位 ms)
  204. // var shippingNoteInfos = this.shippingNoteInfos;//运单信息列表
  205. let remark = ""
  206. sdkwx.stop(this.detailData.carNumber, this.detailData.driverName, remark, this.shippingNoteInfos, function(res) {
  207. if (res.type == "onSuccess") {
  208. console.log("结束成功!!!",res)
  209. //成功
  210. } else if (res.type == "onFailure"){
  211. console.log("结束成功!!!",res)
  212. //失败
  213. var errorCode = res.data.errorCode;//错误码
  214. var errorMsg = res.data.errorMsg;//错误描述
  215. }
  216. });
  217. },
  218. deletePic(event) {
  219. console.log(this[`fileList${event.name}`])
  220. this[`fileList${event.name}`].splice(event.index, 1)
  221. this.imgList.splice(event.index, 1)
  222. },
  223. deletePic1(event) {
  224. this[`fileList${event.name}`].splice(event.index, 1)
  225. this.imgList1.splice(event.index, 1)
  226. },
  227. getNowTime() {
  228. let now = new Date();
  229. let year = now.getFullYear(); //得到年份
  230. let month = now.getMonth(); //得到月份
  231. let date = now.getDate(); //得到日期
  232. month = month + 1;
  233. month = month.toString().padStart(2, "0");
  234. date = date.toString().padStart(2, "0");
  235. let defaultDate = `${year}-${month}-${date}`
  236. this.detailData.carrierInfo.unloadingDate = defaultDate
  237. // this.$forceUpdate()
  238. },
  239. eliminate(){
  240. console.log(11111)
  241. this.$set(this.detailData,'totalFreight','')
  242. // t.totalFreight=''
  243. console.log(this.detailData.totalFreight)
  244. console.log(this.detailData.totalFreight.length)
  245. },
  246. selectUnloadingDate() {
  247. this.$refs.dateEl.show()
  248. },
  249. getLngLat() {
  250. let that = this
  251. uni.showLoading({
  252. title: '获取定位中',
  253. mask: true
  254. })
  255. // this.$helper.fUN_AmapLocation.start({
  256. // intervalTime: 1000 * 3,
  257. // isReport: false,
  258. // },
  259. // res => {
  260. // //见下方定位返回示例
  261. // console.log('====fUN_AmapLocation定位====', JSON.stringify(res));
  262. // if (res.latitude) {
  263. // this.detailData.carrierInfo.loadingAreaLongitude = res.longitude;
  264. // this.detailData.carrierInfo.loadingAreaLatitude = res.latitude;
  265. // this.detailData.carrierInfo.sendCity = this.$helper.filterUrban(res.city)
  266. // this.detailData.carrierInfo.sendArea = this.$helper.filterArea(res.district);
  267. // console.log(this.detailData.carrierInfo.sendCity)
  268. // console.log(this.detailData.carrierInfo.sendArea)
  269. // this.$forceUpdate()
  270. // }
  271. // this.$helper.fUN_AmapLocation.stop({}, result => {
  272. // uni.hideLoading()
  273. // console.log('====fUN_AmapLocation定位stop====', JSON.stringify(result));
  274. // });
  275. // }
  276. // );
  277. uni.getLocation({
  278. type: 'gcj02',
  279. geocode: true,
  280. success: res => {
  281. if (res.latitude) {
  282. // that.detailData.hyCarrierInfo.loadingAreaLongitude = res.longitude;
  283. // that.detailData.hyCarrierInfo.loadingAreaLatitude = res.latitude;
  284. that.detailData.carrierInfo.unloadingAreaLongitude = res.longitude;
  285. that.detailData.carrierInfo.unloadingAreaLatitude = res.latitude;
  286. console.log("1234567890")
  287. that.detailData.carrierInfo.unloadCity = that.$helper.filterUrban(res.address.city)
  288. that.detailData.carrierInfo.unloadArea = that.$helper.filterUrban(res.address.district)
  289. that.localtion.city = that.$helper.filterUrban(res.address.city)
  290. that.localtion.sendArea = that.$helper.filterUrban(res.address.district)
  291. that.detailData.carrierInfo.unloadingCity = that.$helper.filterUrban(res.address.city)
  292. that.detailData.carrierInfo.unloadingArea = that.$helper.filterUrban(res.address.district)
  293. that.detailData.carrierInfo.unloadingLongitude = res.longitude;
  294. that.detailData.carrierInfo.unloadingLatitude = res.latitude;
  295. that.$forceUpdate()
  296. uni.hideLoading()
  297. } else {
  298. if (uni.getSystemInfoSync().platform == 'android') {
  299. var context = plus.android.importClass("android.content.Context");
  300. var locationManager = plus.android.importClass(
  301. "android.location.LocationManager");
  302. var main = plus.android.runtimeMainActivity();
  303. var mainSvr = main.getSystemService(context.LOCATION_SERVICE);
  304. that.bool = mainSvr.isProviderEnabled(locationManager.GPS_PROVIDER)
  305. }
  306. if (that.bool === false) {
  307. uni.showModal({
  308. title: '提示',
  309. content: '请打开定位服务',
  310. success: ({
  311. confirm,
  312. cancel
  313. }) => {
  314. if (confirm) {
  315. if (uni.getSystemInfoSync().platform == 'android') {
  316. var Intent = plus.android.importClass(
  317. 'android.content.Intent');
  318. var Settings = plus.android.importClass(
  319. 'android.provider.Settings');
  320. var intent = new Intent(Settings
  321. .ACTION_LOCATION_SOURCE_SETTINGS);
  322. var main = plus.android.runtimeMainActivity();
  323. main.startActivity(intent); // 打开系统设置GPS服务页面
  324. }
  325. }
  326. }
  327. });
  328. uni.hideLoading()
  329. }
  330. }
  331. },
  332. fail: res => {
  333. console.log('定位失败')
  334. console.log(res)
  335. uni.hideLoading()
  336. }
  337. });
  338. },
  339. alertBtn() {
  340. // uni.navigateTo({
  341. // url: '/pages/public/login'
  342. // })
  343. },
  344. cancelClick() {
  345. this.isShowAlert = false
  346. },
  347. getImgUrl(res) {
  348. this.detailData.carrierInfo.unloadingImg += res + ','
  349. console.log(res)
  350. console.log('------------res-----------')
  351. },
  352. onError(error) {
  353. alert(error)
  354. console.log('------------error-----------')
  355. console.log(error)
  356. },
  357. onRemove(index) {},
  358. filterFileType(index, lists) {
  359. if (lists[index].fileType != 'jpg' && lists[index].fileType != 'png' && lists[index].fileType != 'gif') {
  360. lists.splice(index, 1);
  361. // 当前文件不支持
  362. uni.showModal({
  363. title: '暂不支持当前图片类型',
  364. showCancel: false
  365. });
  366. } else {
  367. this.isAdd = false;
  368. }
  369. },
  370. // 新增图片
  371. async afterRead(event) {
  372. // 当设置 mutiple 为 true 时, file 为数组格式,否则为对象格式
  373. let lists = [].concat(event.file)
  374. let fileListLen = this[`fileList${event.name}`].length
  375. lists.map((item) => {
  376. this[`fileList${event.name}`].push({
  377. ...item,
  378. status: 'uploading',
  379. message: '上传中'
  380. })
  381. })
  382. for (let i = 0; i < lists.length; i++) {
  383. const result = await this.uploadFilePromise(lists[i].url)
  384. let item = this[`fileList${event.name}`][fileListLen]
  385. this[`fileList${event.name}`].splice(fileListLen, 1, Object.assign(item, {
  386. status: 'success',
  387. message: '',
  388. url: result
  389. }))
  390. fileListLen++
  391. }
  392. },
  393. // 新增图片
  394. async afterRead1(event) {
  395. // 当设置 mutiple 为 true 时, file 为数组格式,否则为对象格式
  396. let lists = [].concat(event.file)
  397. let fileListLen = this[`fileList${event.name}`].length
  398. lists.map((item) => {
  399. this[`fileList${event.name}`].push({
  400. ...item,
  401. status: 'uploading',
  402. message: '上传中'
  403. })
  404. })
  405. for (let i = 0; i < lists.length; i++) {
  406. const result = await this.uploadFilePromise1(lists[i].url)
  407. let item = this[`fileList${event.name}`][fileListLen]
  408. this[`fileList${event.name}`].splice(fileListLen, 1, Object.assign(item, {
  409. status: 'success',
  410. message: '',
  411. url: result
  412. }))
  413. fileListLen++
  414. }
  415. },
  416. uploadFilePromise(url) {
  417. uploadImage('image', url, 'appData/',
  418. result => {
  419. // 上传成功回调函数
  420. console.log('图片地址', result)
  421. this.imgList.push(result)
  422. }
  423. )
  424. },
  425. uploadFilePromise1(url) {
  426. uploadImage('image', url, 'appData/',
  427. result => {
  428. // 上传成功回调函数
  429. console.log('图片地址', result)
  430. this.imgList1.push(result)
  431. }
  432. )
  433. },
  434. onProgress(e) {
  435. console.log(e)
  436. },
  437. submit(type) {
  438. if (type == 1) {
  439. this.alertContent = '确定暂存卸车信息?'
  440. } else {
  441. if (this.fileList1.length == 0) {
  442. this.$refs.uToast.show({
  443. type: 'error',
  444. message: "卸车照片不能为空!",
  445. })
  446. return
  447. }
  448. if (this.fileList2.length == 0) {
  449. this.$refs.uToast.show({
  450. type: 'error',
  451. message: "请上传回单照片!",
  452. })
  453. return
  454. }
  455. this.alertContent = '确定提交卸车信息?'
  456. }
  457. // if(!this.detailData.totalFreight){
  458. // this.$refs.uToast.show({
  459. // type: 'error',
  460. // message: "请输入合计运费!",
  461. // })
  462. // return
  463. // }
  464. this.isShowAlert = true
  465. this.detailData.statusFlag = type
  466. },
  467. confirmClick() {
  468. var that=this
  469. if (this.detailData.statusFlag == 1) {
  470. delete this.detailData.carrierInfo.unloadingAreaLongitude;
  471. delete this.detailData.carrierInfo.unloadingAreaLatitude;
  472. delete this.detailData.carrierInfo.unloadCity;
  473. delete this.detailData.carrierInfo.unloadArea;
  474. }
  475. this.detailData.carrierInfo.statusFlag = this.detailData.statusFlag
  476. this.detailData.carrierInfo.unloadingImg = this.imgList.toString()
  477. this.detailData.carrierInfo.receiptImg = this.imgList1.toString()
  478. // if (!this.detailData.carrierInfo.totalFreight) {
  479. // uni.showToast({
  480. // title: '运费不能为空!',
  481. // duration: 2000,
  482. // icon: "none",
  483. // });
  484. // return
  485. // }
  486. // if (
  487. // this.detailData.carrierInfo.totalFreight < 0 || this.detailData.carrierInfo.totalFreight > 100000 || (
  488. // String(this.detailData.carrierInfo.totalFreight).indexOf('.') != -1 && String(this.detailData
  489. // .carrierInfo.totalFreight).length - (String(this.detailData.carrierInfo.totalFreight).indexOf(
  490. // '.') + 1) > 2)
  491. // ) {
  492. // uni.showToast({
  493. // title: '运费输入错误!',
  494. // duration: 2000,
  495. // icon: "none",
  496. // });
  497. // return
  498. // }
  499. this.isShowAlert = false
  500. uni.showLoading({
  501. title:'加载中'
  502. })
  503. let time = new Date() //卸车时间 去当前时间的时分秒
  504. let h = time.getHours();
  505. if (h < 10) {
  506. h = "0" + h
  507. }
  508. let f = time.getMinutes();
  509. if (f < 10) {
  510. f = "0" + f
  511. }
  512. let m = time.getSeconds();
  513. if (m < 10) {
  514. m = "0" + m
  515. }
  516. if(this.detailData.carrierInfo.unloadingDate){//卸车时间 去当前时间的时分秒
  517. this.detailData.carrierInfo.unloadingDate= this.detailData.carrierInfo.unloadingDate.split(" ")[0] + " " + h + ":" + f + ":" + m
  518. }
  519. // this.detailData.carrierInfo.totalFreight = this.detailData.totalFreight
  520. this.detailData.carrierInfo.carNo = this.detailData.carNumber
  521. this.$request.baseRequest('post', '/carrierInfo/unLoadingAdd', this.detailData.carrierInfo).then(res => {
  522. if (res.code == 200) {
  523. let _title = ''
  524. if (this.detailData.statusFlag == 1) {
  525. _title = '暂存成功!'
  526. } else {
  527. that.stop()
  528. _title = '提交成功!'
  529. }
  530. uni.hideLoading()
  531. this.$refs.uToast.show({
  532. type: 'success',
  533. message: _title,
  534. complete() {
  535. uni.hideLoading()
  536. uni.switchTab({
  537. url: '/pages/order/index'
  538. })
  539. if(that.$helper.fUN_AmapLocation){
  540. that.$helper.fUN_AmapLocation.stop({}, result => {
  541. console.log('====fUN_AmapLocation定位stop====', JSON.stringify(result));
  542. });
  543. }
  544. }
  545. })
  546. }
  547. })
  548. .catch(res => {
  549. uni.$u.toast(res.message);
  550. });
  551. },
  552. confirmValidityPeriod(date) {
  553. this.detailData.carrierInfo.unloadingDate = date.date
  554. },
  555. },
  556. }
  557. </script>
  558. <style scoped lang="scss">
  559. .content {
  560. .row-left-text {
  561. color: #333333;
  562. }
  563. }
  564. .level2-title {
  565. margin: 0 0 20rpx 0;
  566. }
  567. .content1,
  568. .content2 {
  569. background: white;
  570. margin: 20rpx;
  571. border-radius: 20rpx;
  572. padding: 20rpx;
  573. .place {
  574. width: 80%;
  575. text-align: right;
  576. }
  577. }
  578. .upload {}
  579. .bottom-btn {
  580. display: flex;
  581. justify-content: space-around;
  582. // margin-bottom: 50rpx;
  583. background: #FFFFFF;
  584. padding: 40rpx 0;
  585. }
  586. .store {
  587. padding: 20rpx 30rpx;
  588. color: #2772FB;
  589. width: 40%;
  590. background: #EEF4FF;
  591. border-radius: 40rpx;
  592. font-size: 36rpx;
  593. text-align: center;
  594. }
  595. .submit {
  596. font-size: 36rpx;
  597. padding: 20rpx 30rpx;
  598. color: white;
  599. width: 40%;
  600. background: #2772FB;
  601. border-radius: 40rpx;
  602. text-align: center;
  603. }
  604. .row-between {
  605. margin: 20rpx 0;
  606. }
  607. .sx-style {
  608. background: #2772FB;
  609. color: white;
  610. padding: 2rpx 16rpx;
  611. box-sizing: border-box;
  612. border-radius: 10rpx;
  613. margin-left: 20rpx;
  614. }
  615. .totalFreight-input {
  616. text-align: right;
  617. padding-right:18px;
  618. }
  619. .close{
  620. position:absolute;
  621. right:0;
  622. width:15px;height:15px;
  623. top:50%;
  624. transform: translateY(-50%);
  625. }
  626. </style>