index.vue 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297
  1. <template>
  2. <view>
  3. <view class="ordertop">
  4. <view>
  5. <view class="iconblue"></view>
  6. <text class="license">订单基本信息</text>
  7. </view>
  8. <view class="line">
  9. <u-line color="#ccc" border-style='dashed' />
  10. </view>
  11. <view class="basic">
  12. <view>提单号</view>
  13. <view>{{form.mblno}}</view>
  14. </view>
  15. <view class="basic">
  16. <view>车号</view>
  17. <view>{{form.carregNo}}</view>
  18. </view>
  19. <view class="basic">
  20. <view>调度员</view>
  21. <view>{{form.planUserId}}</view>
  22. </view>
  23. <view class="basic">
  24. <view>驾驶员</view>
  25. <view>{{form.driverName}}</view>
  26. </view>
  27. <view class="basic">
  28. <view>装货品名</view>
  29. <view>{{form.goodsId}}</view>
  30. </view>
  31. <view class="basic">
  32. <view>调度数量</view>
  33. <view>{{form.cntrQty}}</view>
  34. </view>
  35. <view class="basic">
  36. <view>船名航次</view>
  37. <view>{{form.ysl}}/{{form.voy}}</view>
  38. </view>
  39. </view>
  40. <view class="ordertop">
  41. <view>
  42. <view class="iconblue"></view>
  43. <text class="license">提箱信息</text>
  44. </view>
  45. <view class="line">
  46. <u-line color="#ccc" border-style='dashed' />
  47. </view>
  48. <view class="basic">
  49. <view>提箱地点</view>
  50. <view>{{form.tLoadAddr}}</view>
  51. </view>
  52. <view class="basic">
  53. <view>提箱时间</view>
  54. <view>{{form.tLoadDate}}</view>
  55. </view>
  56. <view class="basic">
  57. <view>提箱联系</view>
  58. <view>{{form.tLoadAttntel}}</view>
  59. </view>
  60. </view>
  61. <view class="ordertop">
  62. <view>
  63. <view class="iconblue"></view>
  64. <text class="license">装卸信息</text>
  65. </view>
  66. <view class="line">
  67. <u-line color="#ccc" border-style='dashed' />
  68. </view>
  69. <view class="basic">
  70. <view>装卸地点</view>
  71. <view>{{form.tMdLoadAddr}}</view>
  72. </view>
  73. <view class="basic">
  74. <view>装卸时间</view>
  75. <view>{{form.tMdLoadDate}}</view>
  76. </view>
  77. <view class="basic">
  78. <view>装卸联系</view>
  79. <view>{{form.tMdLoadAttnTel}}</view>
  80. </view>
  81. </view>
  82. <view class="ordertop" style="margin-bottom: 140rpx;">
  83. <view>
  84. <view class="iconblue"></view>
  85. <text class="license">卸柜信息</text>
  86. </view>
  87. <view class="line">
  88. <u-line color="#ccc" border-style='dashed' />
  89. </view>
  90. <view class="basic">
  91. <view>卸柜地点</view>
  92. <view>{{form.tUnLoadAddr}}</view>
  93. </view>
  94. <view class="basic">
  95. <view>卸柜时间</view>
  96. <view>{{form.tUnLoadDate}}</view>
  97. </view>
  98. <view class="basic">
  99. <view>卸柜联系</view>
  100. <view>{{form.tUnLoadAttnTel}}</view>
  101. </view>
  102. </view>
  103. <view style="width: 100%;background-color: #ffffff;position: fixed; bottom: 0;">
  104. <view style="width: 96%;margin: 0 auto;margin-bottom: 20rpx;display: flex;justify-content: space-around;" v-if="!form.acceptDate||!form.loadDate||!form.mdLoadDate||!form.unLoadDate">
  105. <u-button type="primary" :ripple="true" @click="receiving(1)" :disabled="!form.acceptDate?fasle:true">接单</u-button>
  106. <u-button type="primary" :ripple="true" @click="receiving(3)" :disabled="!form.loadDate?fasle:true">提箱</u-button>
  107. <u-button type="primary" :ripple="true" @click="receiving(4)" :disabled="!form.mdLoadDate?fasle:true">装卸</u-button>
  108. <u-button type="primary" :ripple="true" @click="receiving(5)" :disabled="!form.unLoadDate?fasle:true">卸柜</u-button>
  109. </view>
  110. </view>
  111. </view>
  112. </template>
  113. <script>
  114. import {
  115. request
  116. } from '@/common/request/request'
  117. export default {
  118. data() {
  119. return {
  120. form: {
  121. mblno: '', //提单号
  122. carregNo: '', //车号
  123. transUserId: '', //调度员*
  124. goodsId: '', //装货品名
  125. cntrQty: '', //调度数量
  126. ysl: '', //船名
  127. voy: '', //航次
  128. loadAddr: '', //提箱地点
  129. loadDate: '', //提箱时间
  130. loadAttntel: '', //提箱联系
  131. mdLoadAddr: '', //装卸地点
  132. mdLoadDate: '', //装卸时间
  133. mdLoadAttnTel: '', //装卸联系
  134. unLoadAddrL: '', //卸车地点
  135. unLadDate: '', //卸车时间
  136. unLoadAttnTel: '' //卸车联系
  137. },
  138. id: ''
  139. }
  140. },
  141. onLoad: function(option) { //option为object类型,会序列化上个页面传递的参数
  142. console.log(option.id); //打印出上个页面传递的参数。
  143. uni.showLoading({
  144. title: '加载中'
  145. });
  146. setTimeout(function() {
  147. uni.hideLoading();
  148. }, 1000);
  149. this.id = option.id
  150. // this.query(option.id)
  151. },
  152. onShow() {
  153. this.query(this.id)
  154. },
  155. methods: {
  156. query(id) {
  157. request({
  158. url: '/fleet/ftmsorderbillscars/selectDriver',
  159. method: 'post',
  160. data: {
  161. id: id
  162. }
  163. }).then(res => {
  164. console.log(res.data)
  165. if(res.data.code == 500){
  166. uni.showToast({
  167. icon: 'none',
  168. title: res.msg,
  169. position: "bottom"
  170. })
  171. }else if(res.data.code == 200){
  172. this.form = res.data.data.cars
  173. if(!this.form.mblno){
  174. this.form.mblno = ''
  175. }
  176. if(!this.form.goodsId){
  177. this.form.goodsId = ''
  178. }
  179. if(!this.form.cntrQty){
  180. this.form.cntrQty = ''
  181. }
  182. if(!this.form.ysl){
  183. this.form.ysl = ''
  184. }
  185. if(!this.form.voy){
  186. this.form.voy = ''
  187. }
  188. if(!this.form.loadAddr){
  189. this.form.loadAddr = ''
  190. }
  191. if(!this.form.loadDate){
  192. this.form.loadDate = ''
  193. }
  194. if(!this.form.loadAttntel){
  195. this.form.loadAttntel = ''
  196. }
  197. if(!this.form.mdLoadAddr){
  198. this.form.mdLoadAddr = ''
  199. }
  200. if(!this.form.mdLoadDate){
  201. this.form.mdLoadDate = ''
  202. }
  203. if(!this.form.mdLoadAttnTel){
  204. this.form.mdLoadAttnTel = ''
  205. }
  206. if(!this.form.unLoadAddrL){
  207. this.form.unLoadAddrL = ''
  208. }
  209. if(!this.form.unLadDate){
  210. this.form.unLadDate = ''
  211. }
  212. if(!this.form.unLoadAttnTel){
  213. this.form.unLoadAttnTel = ''
  214. }
  215. }
  216. }).catch(err => {
  217. uni.showToast({
  218. icon: 'none',
  219. title: '网络繁忙请稍后再试',
  220. position: "bottom"
  221. })
  222. })
  223. },
  224. receiving(res) {
  225. if (res !== 1) {
  226. if (!this.form.acceptDate) {
  227. uni.showToast({
  228. icon: 'none',
  229. title: '未接单,请先接单',
  230. position: "bottom"
  231. })
  232. } else {
  233. uni.navigateTo({
  234. url: '../operation/index?res=' + res + '&id=' + this.id
  235. });
  236. }
  237. } else {
  238. uni.navigateTo({
  239. url: '../operation/index?res=' + res + '&id=' + this.id
  240. });
  241. }
  242. }
  243. }
  244. };
  245. </script>
  246. <style scoped lang="scss">
  247. .basic {
  248. width: 94%;
  249. margin: 10rpx auto;
  250. display: flex;
  251. justify-content: space-between;
  252. }
  253. .basic>view {
  254. margin-bottom: 10rpx;
  255. }
  256. .basic>view:nth-child(1) {
  257. color: #797979;
  258. }
  259. .license {
  260. float: left;
  261. font-size: 32rpx;
  262. }
  263. .ordertop {
  264. width: 96%;
  265. background-color: #fff;
  266. margin: 20rpx auto;
  267. border-radius: 20rpx;
  268. padding-top: 20rpx;
  269. box-shadow: 0px 0px 8px 0px rgba(165, 189, 251, 0.4);
  270. padding-bottom: 10rpx;
  271. }
  272. .ordertop>view:nth-child(1) {
  273. width: 98%;
  274. margin-bottom: 60rpx;
  275. }
  276. .iconblue {
  277. width: 10rpx;
  278. height: 45rpx;
  279. float: left;
  280. background-color: #3a63cf;
  281. margin-right: 10rpx;
  282. }
  283. .line {
  284. width: 92%;
  285. margin: 0 auto;
  286. }
  287. </style>