confirmLoading.vue 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682
  1. <!-- 确认装车 -->
  2. <template>
  3. <view class="content">
  4. <div class='content1'>
  5. <view class="level2-title">承运合同</view>
  6. <view class='row-between'>
  7. <view class="">合同编号</view>
  8. <view class="" @click="toSignContract">{{detailData.contractNo?detailData.contractNo:'去签订合同'}}</view>
  9. </view>
  10. </div>
  11. <view class="content2">
  12. <view class="level2-title">基本信息</view>
  13. <view class='row-between'>
  14. <view class="">订单编号</view>
  15. <view class="">{{detailData.orderNo}}</view>
  16. </view>
  17. <view class='row-between'>
  18. <view class="">货主</view>
  19. <view class="">{{detailData.cargoOwner}}</view>
  20. </view>
  21. <view class='row-between'>
  22. <view class="">货主单位</view>
  23. <view class="">{{detailData.compName?detailData.compName:'个人货主'}}</view>
  24. </view>
  25. <view class='row-between'>
  26. <view class="">发货地</view>
  27. <view class=" place">
  28. {{detailData.sendPrivate}}{{detailData.sendCity}}{{detailData.sendArea}}{{detailData.sendDetailedAddress}}
  29. </view>
  30. </view>
  31. <view class='row-between'>
  32. <view class="">卸货地</view>
  33. <view class=" place">
  34. {{detailData.unloadPrivate}}{{detailData.unloadCity}}{{detailData.unloadArea}}{{detailData.unloadDetailedAddress}}
  35. </view>
  36. </view>
  37. <view class='row-between'>
  38. <view class="">货名</view>
  39. <view class="">{{detailData.goodsName}}</view>
  40. </view>
  41. <!-- <view class='row-between'>
  42. <view class="">运费</view>
  43. <view class="">{{detailData.freight}}{{detailData.illingMethod==0?'元/吨':'元/车'}}</view>
  44. </view>-->
  45. </view>
  46. <view class="content2">
  47. <view class="level2-title">装车信息</view>
  48. <view class='row-between'>
  49. <view class="">车牌号</view>
  50. {{detailData.carNo?detailData.carNo:"来自合同"}}
  51. <!-- <input class="car-uumber input" v-model='detailData.carrierInfo.carNo'
  52. :disabled="true" placeholder="输入车牌号" name="input" disabled="true"></input> -->
  53. </view>
  54. <view class='row-between'>
  55. <view class="">装车日期</view>
  56. <view class="date-style">
  57. {{detailData.loadingDate1?detailData.loadingDate1:'来自合同'}}
  58. </view>
  59. </view>
  60. <view class='row-between'>
  61. <view class="">装车净重(吨)</view>
  62. {{detailData.weight ? detailData.weight:"来自合同"}}
  63. </view>
  64. <view class='row-between'>
  65. <view class="">预计运费(元)</view>
  66. {{detailData.freight ? detailData.freight:"来自合同"}}
  67. <!-- <view class=""><input class="input" type="text" value="" v-model="detailData.carrierInfo.freight"
  68. placeholder="请输入运费"></view> -->
  69. </view>
  70. <view class='row-between'>
  71. <view class="">预付款(元)</view>
  72. {{detailData.advanceCharge ? detailData.advanceCharge:"来自合同"}}
  73. <!-- <view class=""><input class="input" type="text" value="" v-model="detailData.carrierInfo.freight"
  74. placeholder="请输入运费"></view> -->
  75. </view>
  76. <view class='row-between'>
  77. <view class="">定位</view>
  78. <view class="flex align-center">{{localtion.city}}
  79. {{localtion.sendArea}}
  80. <view class="sx-style" @click.stop="getLngLat()">刷新</view>
  81. </view>
  82. </view>
  83. <view class='s-flex'>
  84. <view class="" style="margin:20rpx 0;">上传装车照片</view>
  85. <u-upload class="uview-upload" :fileList="fileList1" @afterRead="afterRead($event)" @delete="deletePic"
  86. name="1" multiple='true' :maxCount="3"></u-upload>
  87. </view>
  88. <!-- <view class='s-flex'>
  89. <view class="">上传装车磅单</view>
  90. <upload class="upload" ref="upload" :action="action" :max-size="maxSize" :max-count="1"
  91. :size-type="['compressed']" @on-success="getImgUrl" @on-error="onError" @on-remove="onRemove"
  92. @on-uploaded="isAdd = true" :before-upload="filterFileType" @on-progress="onProgress"></upload>
  93. </view> -->
  94. </view>
  95. <view class="bottom-btn">
  96. <view class="store" @click="$u.throttle(submit(1), 5000)">暂存</view>
  97. <view class="submit" @click="$u.throttle(submit(3), 5000)">提交</view>
  98. </view>
  99. <u-modal :show="isShowAlert" :title="alertTitle" :content='alertContent' :closeOnClickOverlay='true'
  100. :showCancelButton='true' confirmColor='#2772FB' @confirm="confirmClick" @close="cancelClick"
  101. @cancel="cancelClick"></u-modal>
  102. <master-keyboard ref="keyboard" keyboardtype="car" :show="keyShow" :randomNumber="true" :newCar="false"
  103. :defaultValue="carNumber" @keyboardClick="handleClick"></master-keyboard>
  104. <u-toast ref="uToast"></u-toast>
  105. <u-calendar :show="showDate" :mode="mode" @confirm="confirmDate" @close="showDate= false"></u-calendar>
  106. </view>
  107. </template>
  108. <script>
  109. let that;
  110. import uploadImage from '@/components/ossutil/uploadFile.js';
  111. export default {
  112. data() {
  113. return {
  114. cyId: '',
  115. localtion: {
  116. city: '',
  117. sendArea: ''
  118. },
  119. imgList: [],
  120. fileList1: [],
  121. showDate: false,
  122. mode: 'single',
  123. id: '',
  124. sourceType: ['camera'],
  125. detailData: {
  126. hyCarrierInfo: {},
  127. loadingDate: {}
  128. },
  129. action: this.$helper.ossUploadUrl,
  130. maxSize: 50 * 1024 * 1024, //限制文件大小 50M
  131. isAdd: true,
  132. isShowAlert: false,
  133. alertContent: '',
  134. alertTitle: '',
  135. keyShow: false,
  136. carNumber: '',
  137. gjList: [],
  138. }
  139. },
  140. onLoad(options) {
  141. this.id = JSON.parse(decodeURIComponent(options.obj)).id
  142. this.detailData.hyCarrierInfo.id = JSON.parse(decodeURIComponent(options.obj)).carrierId
  143. this.cyId = JSON.parse(decodeURIComponent(options.obj)).carrierId
  144. this.getInfo()
  145. console.log(options)
  146. // this.detailData = JSON.parse(options.obj) ;
  147. // console.log(this.detailData)
  148. // CYHT20220317000001
  149. },
  150. methods: {
  151. //确认装车提交成功后,开启实时定位,
  152. // 调接口5分钟一次发送轨迹,[
  153. // {latitude: 39.997761, longitude: 116.478935},
  154. // {latitude: 39.997825, longitude: 116.478939},
  155. // {latitude: 39.998549, longitude: 116.478912},
  156. // {latitude: 39.998555, longitude: 116.478998},
  157. // {latitude: 39.998566, longitude: 116.479282},
  158. // {latitude: 39.998528, longitude: 116.479658},
  159. // {latitude: 39.998453, longitude: 116.480151},
  160. // {latitude: 39.998302, longitude: 116.480784},
  161. // {latitude: 39.998184, longitude: 116.481149},
  162. // {latitude: 39.997997, longitude: 116.481573},
  163. // {latitude: 39.997846, longitude: 116.481863},
  164. // {latitude: 39.997718, longitude: 116.482072},
  165. // {latitude: 39.997718, longitude: 116.482362},
  166. // {latitude: 39.998935, longitude: 116.483633},
  167. // {latitude: 39.998968, longitude: 116.48367},
  168. // {latitude: 39.999861, longitude: 116.484648}
  169. // ]
  170. // a(){},
  171. toSignContract() {
  172. console.log(this.detailData)
  173. this.$request.baseRequest('get', '/orderInfo/getOrderInfo', {
  174. id: this.id,
  175. }).then(res => {
  176. uni.$u.route('/pages/order/signContract', {
  177. obj: JSON.stringify(res.data),
  178. });
  179. });
  180. },
  181. selectDate() {
  182. this.showDate = true
  183. },
  184. confirmDate(e) {
  185. this.detailData.hyCarrierInfo.loadingDate = e[0]
  186. this.showDate = false
  187. },
  188. getInfo() {
  189. this.$request.baseRequest('get', '/orderInfo/getOrderInfo', {
  190. id: this.id,
  191. }).then(res => {
  192. if (res.code == 200) {
  193. this.detailData = res.data
  194. // #ifdef APP-PLUS
  195. this.getLngLat();
  196. // #endif
  197. this.$request.baseRequest('get', '/carrierInfo/getHyCarrierInfo', {
  198. orderId: this.detailData.id,
  199. }).then(res => {
  200. if (res.data) {
  201. if(res.data.loadingImg){
  202. var data=res.data.loadingImg.split(',')
  203. this.imgList=res.data.loadingImg.split(',')
  204. for (var i = 0; i < data.length; i++) {
  205. if(data[i]!=''){
  206. this.fileList1.push({url:data[i]})
  207. }
  208. }
  209. }
  210. console.log(this.fileList1)
  211. this.detailData.carNo = res.data.carNo
  212. this.detailData.loadingDate = res.data.loadingDate
  213. this.detailData.loadingDate1=res.data.loadingDate.split(' ')[0]
  214. this.detailData.weight = res.data.loadingWeight
  215. this.detailData.freight = res.data.estimatedFreight
  216. }
  217. })
  218. // this.detailData.contractNo = ''
  219. // this.detailData.id = this.detailData.carrierId
  220. // this.detailData.carrierInfo.loadingDate = ''
  221. // this.detailData.carrierInfo.carNo = ''
  222. // this.detailData.carrierInfo.loadingAreaLongitude = ''
  223. // this.detailData.carrierInfo.loadingAreaLatitude = ''
  224. // this.detailData.carrierInfo.sendCity = '营口'
  225. // this.detailData.carrierInfo.sendArea = '鲅鱼圈'
  226. // this.detailData.carrierInfo.loadingImg = ''
  227. // this.carrierInfo = res.data.carrierInfo
  228. // this.freightInfo = res.data.freightInfo
  229. // this.zcPhoneList = this.carrierInfo.loadingImg.split(',')
  230. // if(res.data.orderStatus!="待货主确认"&&res.data.orderStatus!="未装车"&&res.data.orderStatus!="已终止"){
  231. // this.status1 = true
  232. // }
  233. // if(res.data.orderStatus!="已终止"&&res.data.orderStatus!="平台驳回装车信息"&&res.data.orderStatus!="待平台确认装车"&&res.data.orderStatus!="待货主确认"&&res.data.orderStatus!="未装车"&&res.data.orderStatus!="待货主确认装车"&&res.data.orderStatus!="货主驳回装车信息"){
  234. // this.status2 = true
  235. // }
  236. }
  237. })
  238. },
  239. //车牌号弹出键盘
  240. handleShowKeyboard() {
  241. if (this.detailData.hyCarrierInfo.carNo == '') {
  242. this.carNumber = ''
  243. } else {
  244. this.carNumber = this.detailData.hyCarrierInfo.carNo
  245. }
  246. if (this.$refs.keyboard.open) {
  247. this.$refs.keyboard.open(false) //true 键盘显示 false 键盘隐藏
  248. } else {
  249. this.$refs.keyboard[0].open(false)
  250. }
  251. if (this.$refs.keyboard.open) {
  252. this.$refs.keyboard.open(true) //true 键盘显示 false 键盘隐藏
  253. } else {
  254. this.$refs.keyboard[0].open(true)
  255. }
  256. },
  257. //车牌号弹出键盘
  258. handleClick(e) {
  259. this.carNumber = e.value
  260. this.detailData.hyCarrierInfo.carNo = e.value //键盘输入值
  261. },
  262. getLngLat() {
  263. var that=this
  264. uni.showLoading({
  265. title: '获取定位中',
  266. mask: true
  267. })
  268. // this.$helper.fUN_AmapLocation.start({
  269. // intervalTime: 1000 * 3,
  270. // isReport: false,
  271. // },
  272. // res => {
  273. // //见下方定位返回示例
  274. // console.log('====fUN_AmapLocation定位====', JSON.stringify(res));
  275. // if (res.latitude) {
  276. // this.detailData.carrierInfo.loadingAreaLongitude = res.longitude;
  277. // this.detailData.carrierInfo.loadingAreaLatitude = res.latitude;
  278. // this.detailData.carrierInfo.sendCity = this.$helper.filterUrban(res.city)
  279. // this.detailData.carrierInfo.sendArea = this.$helper.filterArea(res.district);
  280. // console.log(this.detailData.carrierInfo.sendCity)
  281. // console.log(this.detailData.carrierInfo.sendArea)
  282. // this.$forceUpdate()
  283. // }
  284. // this.$helper.fUN_AmapLocation.stop({}, result => {
  285. // uni.hideLoading()
  286. // console.log('====fUN_AmapLocation定位stop====', JSON.stringify(result));
  287. // });
  288. // }
  289. // );
  290. console.log(111111)
  291. // console.log(that.detailData,111111)
  292. uni.getLocation({
  293. type: 'gcj02',
  294. geocode: true,
  295. success: res => {
  296. if (res.latitude) {
  297. that.detailData.hyCarrierInfo.longitudeLatitude=res.longitude+','+res.latitude
  298. that.detailData.hyCarrierInfo.loadingAreaLongitude = res.longitude;
  299. that.detailData.hyCarrierInfo.loadingAreaLatitude = res.latitude;
  300. that.detailData.hyCarrierInfo.sendCity = that.$helper.filterUrban(res.address.city)
  301. that.localtion.city = that.$helper.filterUrban(res.address.city)
  302. that.$set(that.detailData,'loadingArea',that.$helper.filterUrban(res.address.district))
  303. that.$set(that.detailData,'loadingCity',that.$helper.filterUrban(res.address.city))
  304. that.localtion.sendArea = that.$helper.filterUrban(res.address.district)
  305. // .loadingCity = that.$helper.filterUrban(res.address.city)
  306. that.detailData.loadingLongitude = res.longitude;
  307. that.detailData.loadingLatitude = res.latitude;
  308. console.log(res,that.detailData,22222)
  309. that.$forceUpdate()
  310. uni.hideLoading()
  311. } else {
  312. if (uni.getSystemInfoSync().platform == 'android') {
  313. var context = plus.android.importClass("android.content.Context");
  314. var locationManager = plus.android.importClass(
  315. "android.location.LocationManager");
  316. var main = plus.android.runtimeMainActivity();
  317. var mainSvr = main.getSystemService(context.LOCATION_SERVICE);
  318. that.bool = mainSvr.isProviderEnabled(locationManager.GPS_PROVIDER)
  319. }
  320. if (that.bool === false) {
  321. uni.showModal({
  322. title: '提示',
  323. content: '请打开定位服务',
  324. success: ({
  325. confirm,
  326. cancel
  327. }) => {
  328. if (confirm) {
  329. if (uni.getSystemInfoSync().platform == 'android') {
  330. var Intent = plus.android.importClass(
  331. 'android.content.Intent');
  332. var Settings = plus.android.importClass(
  333. 'android.provider.Settings');
  334. var intent = new Intent(Settings
  335. .ACTION_LOCATION_SOURCE_SETTINGS);
  336. var main = plus.android.runtimeMainActivity();
  337. main.startActivity(intent); // 打开系统设置GPS服务页面
  338. }
  339. }
  340. }
  341. });
  342. uni.hideLoading()
  343. }
  344. }
  345. },
  346. fail: res => {
  347. console.log('定位失败')
  348. console.log(res)
  349. uni.hideLoading()
  350. }
  351. });
  352. },
  353. alertBtn() {
  354. // uni.navigateTo({
  355. // url: '/pages/public/login'
  356. // })
  357. },
  358. cancelClick() {
  359. this.isShowAlert = false
  360. },
  361. // 删除图片
  362. deletePic(event) {
  363. this[`fileList${event.name}`].splice(event.index, 1)
  364. },
  365. // 新增图片
  366. async afterRead(event) {
  367. // 当设置 mutiple 为 true 时, file 为数组格式,否则为对象格式
  368. let lists = [].concat(event.file)
  369. let fileListLen = this[`fileList${event.name}`].length
  370. lists.map((item) => {
  371. this[`fileList${event.name}`].push({
  372. ...item,
  373. status: 'uploading',
  374. message: '上传中'
  375. })
  376. })
  377. for (let i = 0; i < lists.length; i++) {
  378. const result = await this.uploadFilePromise(lists[i].url)
  379. let item = this[`fileList${event.name}`][fileListLen]
  380. this[`fileList${event.name}`].splice(fileListLen, 1, Object.assign(item, {
  381. status: 'success',
  382. message: '',
  383. url: result
  384. }))
  385. fileListLen++
  386. }
  387. },
  388. uploadFilePromise(url) {
  389. uploadImage('image', url, 'appData/',
  390. result => {
  391. // 上传成功回调函数
  392. console.log('图片地址', result)
  393. this.imgList.push(result)
  394. }
  395. )
  396. },
  397. onProgress(e) {
  398. console.log(e)
  399. },
  400. submit(type) {
  401. if (type == 1) {
  402. if (this.detailData.driverContract != 1) { //合同签订标识
  403. this.$refs.uToast.show({
  404. type: 'error',
  405. message: "合同未签订不能暂存!"
  406. })
  407. return
  408. }
  409. this.alertTitle = '确定暂存装车信息?'
  410. } else {
  411. if (this.detailData.driverContract != 1) {
  412. this.$refs.uToast.show({
  413. type: 'error',
  414. message: "合同未签订不能提交!"
  415. })
  416. return
  417. }
  418. this.alertTitle = '确定提交装车信息?'
  419. }
  420. if (this.validate()) return
  421. this.isShowAlert = true
  422. this.detailData.statusFlag = type
  423. // this.$refs.uToast.show({
  424. // ...params,
  425. // complete() {
  426. // params.url && uni.navigateTo({
  427. // url: params.url
  428. // })
  429. // }
  430. // })
  431. },
  432. validate() {
  433. // uni.$u.test.isEmpty(this.detailData.carrierInfo.carNo
  434. if (uni.$u.test.isEmpty(this.detailData.carNo)) {
  435. this.$refs.uToast.show({
  436. type: 'error',
  437. message: "车牌号不能为空!",
  438. })
  439. return true
  440. }
  441. if (uni.$u.test.isEmpty(this.detailData.loadingDate)) {
  442. this.$refs.uToast.show({
  443. type: 'error',
  444. message: "装车日期不能为空!",
  445. })
  446. return true
  447. }
  448. if (uni.$u.test.isEmpty(this.detailData.freight)) {
  449. this.$refs.uToast.show({
  450. type: 'error',
  451. message: "预计运费不能为空!",
  452. })
  453. return true
  454. }
  455. // if (uni.$u.test.isEmpty(this.detailData.carrierInfo.sendCity)) {
  456. // this.$refs.uToast.show({
  457. // type: 'error',
  458. // message: "定位不能为空!",
  459. // })
  460. // return true
  461. // }
  462. // if (uni.$u.test.isEmpty(this.detailData.carrierInfo.sendArea)) {
  463. // this.$refs.uToast.show({
  464. // type: 'error',
  465. // message: "定位不能为空!",
  466. // })
  467. // return true
  468. // }
  469. if(this.imgList.length == 0){
  470. this.$refs.uToast.show({
  471. type: 'error',
  472. message: "装车照片不能为空!",
  473. })
  474. return true
  475. }
  476. },
  477. confirmClick() {
  478. var that=this
  479. this.isShowAlert = false
  480. //1暂存
  481. if (this.detailData.statusFlag == 1) {
  482. delete this.detailData.hyCarrierInfo.loadingAreaLongitude;
  483. delete this.detailData.hyCarrierInfo.loadingAreaLatitude;
  484. delete this.detailData.hyCarrierInfo.sendCity;
  485. delete this.detailData.hyCarrierInfo.sendArea;
  486. }
  487. uni.showLoading({
  488. title: '加载中'
  489. })
  490. let time = new Date() //装车时间 去当前时间的时分秒
  491. let h = time.getHours();
  492. if (h < 10) {
  493. h = "0" + h
  494. }
  495. let f = time.getMinutes();
  496. if (f < 10) {
  497. f = "0" + f
  498. }
  499. let m = time.getSeconds();
  500. if (m < 10) {
  501. m = "0" + m
  502. }
  503. var data={
  504. loadingImg:this.imgList.toString(),
  505. statusFlag:this.detailData.statusFlag,
  506. loadingDate:this.detailData.hyCarrierInfo.loadingDate.split(" ")[0] + " " + h + ":" + f + ":" + m,
  507. loadingArea:this.detailData.loadingArea,
  508. loadingCity:this.detailData.loadingCity,
  509. loadingLongitude:this.detailData.loadingLongitude,
  510. loadingLatitude:this.detailData.loadingLatitude,
  511. id:this.detailData.hyCarrierInfo.id
  512. }
  513. console.log("查看id--------",this.detailData.hyCarrierInfo.id)
  514. this.$request.baseRequest('post', '/carrierInfo/loadingAdd', data).then(res => {
  515. if (res.code == 200) {
  516. uni.hideLoading()
  517. let _title = ''
  518. if (this.detailData.statusFlag == 1) {
  519. _title = '暂存成功!'
  520. } else {
  521. _title = '提交成功!'
  522. }
  523. that.$helper.fUN_AmapLocation.start({
  524. // intervalTime: 1000 * 60,
  525. intervalTime: 5000,
  526. // locationCacheEnable:true,
  527. isReport: false
  528. // url: 'http://192.168.0.66/fun/open/test_json.do',
  529. // params: {
  530. // a: 1,
  531. // B: '测试',
  532. // c: true
  533. // },
  534. // headers: {
  535. // a: '123',
  536. // B: 'abcd'
  537. // }
  538. },
  539. res => {
  540. console.log('====确认装车开启连续定位====');
  541. console.log(res)
  542. let _data = {
  543. orderId: that.id,
  544. longitude: res.longitude,
  545. latitude: res.latitude,
  546. province: res.province,
  547. city: res.city,
  548. area: res.district
  549. }
  550. this.$helper.gjList.push(_data)
  551. uni.setStorageSync('mapGJ', this.$helper.gjList);
  552. console.log('this.$helper.gjList')
  553. console.log(this.$helper.gjList)
  554. console.log("条数", uni.getStorageSync('mapGJ').length)
  555. if (uni.getStorageSync('mapGJ').length > 100) {
  556. console.log(JSON.stringify(uni.getStorageSync('mapGJ')) )
  557. this.$request.baseRequest('post', '/hyOrderTravelPath/api/addInfo', {
  558. orderId:that.id,
  559. longitudeLatitude:JSON.stringify(uni.getStorageSync('mapGJ'))
  560. }).then(res => {
  561. uni.removeStorageSync('mapGJ');
  562. this.$helper.gjList = []
  563. })
  564. .catch(res => {
  565. uni.$u.toast(res.message);
  566. });
  567. }
  568. //判断缓存数据条数,超过reportInterval时清空缓存,重新存入缓存
  569. }
  570. );
  571. this.$refs.uToast.show({
  572. type: 'success',
  573. message: _title,
  574. complete() {
  575. uni.switchTab({
  576. url: '/pages/order/index'
  577. })
  578. }
  579. })
  580. }
  581. })
  582. .catch(res => {
  583. uni.$u.toast(res.message);
  584. });
  585. }
  586. },
  587. }
  588. </script>
  589. <style scoped lang="scss">
  590. .content {
  591. // . {
  592. // color: #333333;
  593. // }
  594. }
  595. .level2-title {
  596. margin: 0 0 20rpx 0;
  597. }
  598. .content1,
  599. .content2 {
  600. background: white;
  601. margin: 20rpx;
  602. border-radius: 20rpx;
  603. padding: 20rpx;
  604. .place {
  605. width: 80%;
  606. text-align: right;
  607. }
  608. }
  609. .upload {}
  610. .bottom-btn {
  611. display: flex;
  612. justify-content: space-around;
  613. margin-bottom: 50rpx;
  614. background: #FFFFFF;
  615. padding: 40rpx 0;
  616. }
  617. .store {
  618. padding: 20rpx 30rpx;
  619. color: #2772FB;
  620. width: 40%;
  621. background: #EEF4FF;
  622. border-radius: 40rpx;
  623. font-size: 36rpx;
  624. text-align: center;
  625. }
  626. .submit {
  627. font-size: 36rpx;
  628. padding: 20rpx 30rpx;
  629. color: white;
  630. width: 40%;
  631. background: #2772FB;
  632. border-radius: 40rpx;
  633. text-align: center;
  634. }
  635. .row-between {
  636. margin: 20rpx 0;
  637. }
  638. .sx-style {
  639. background: #2772FB;
  640. color: white;
  641. padding: 2rpx 16rpx;
  642. box-sizing: border-box;
  643. border-radius: 10rpx;
  644. margin-left: 20rpx;
  645. }
  646. .input {
  647. text-align: right;
  648. }
  649. .date-style {}
  650. </style>