business-order.vue 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312
  1. <template>
  2. <view>
  3. <view class="box">
  4. <view class="top">
  5. <text class="title">业务订单</text>
  6. </view>
  7. </view>
  8. <!-- <u-sticky offset-top="0">
  9. <u-tabs :list="tabs" @change="change" :current="current" :is-scroll="false"></u-tabs>
  10. </u-sticky> -->
  11. <view class="card-box">
  12. <view class="card" v-for="(businessItem,index) in businessItemList" :key="index">
  13. <view class="t">
  14. <image class="icon" src="../../static/home-icon-01.png"></image>
  15. <text class="title">{{businessItem.customerName}}</text>
  16. </view>
  17. <view style="line-height: 60rpx;">
  18. <view class="title">录入时间:{{businessItem.createTime}}</view>
  19. <view class="title">订单号:{{businessItem.no}}</view>
  20. </view>
  21. <view class="c">
  22. <view class="item car-num-item">
  23. <text class="car-num">{{businessItem.cardNo}}</text>
  24. </view>
  25. <view class="item">
  26. <text class="p1">车型:</text>
  27. <text class="p2">{{businessItem.cardSize}}(米)</text>
  28. </view>
  29. <view class="item">
  30. <text class="p1">载重:</text>
  31. <text class="p2">{{businessItem.netWeight}}(吨)</text>
  32. </view>
  33. <view class="item">
  34. <text class="p1">车辆状态:</text>
  35. <text class="p2">
  36. <text v-if="businessItem.realInTime==null">未入场</text>
  37. <text v-if="businessItem.realInTime!=null">已入场</text>
  38. <text v-if="businessItem.outDayTime!=null">已离场</text>
  39. </text>
  40. </view>
  41. <view class="item">
  42. <text class="p1">确认状态:</text>
  43. <text class="p2">
  44. <text v-if="businessItem.confirmInput==0">未确认</text>
  45. <text v-else>已确认</text>
  46. </text>
  47. </view>
  48. <view class="item">
  49. <text class="p1">支付状态:</text>
  50. <text class="p2">
  51. <text v-if="businessItem.payStatus==1">未支付</text>
  52. <text v-if="businessItem.payStatus==2">已支付(未确认)</text>
  53. <text v-if="businessItem.payStatus==3">已支付(已确认)</text>
  54. </text>
  55. </view>
  56. </view>
  57. <view class="b">
  58. <view class="btn b3" v-if="businessItem.confirmInput==0
  59. &&businessItem.payStatus==1
  60. &&perList.indexOf('tb-business-confirm')!=-1
  61. &&customemrId!='1'" @click="sureZdFn(businessItem)">
  62. 确认账单</view>
  63. <view class="btn b3" v-if="businessItem.confirmInput==1&&businessItem.payStatus<3" @click="fkFn(businessItem)">
  64. 确认支付</view>
  65. <view class="btn b1" v-if="customemrId=='1'&&businessItem.realInTime==null"
  66. @click="rcFn(businessItem)">确认入场</view>
  67. <view class="btn b1" v-if="customemrId=='1'&&businessItem.outDayTime==null&&businessItem.realInTime!=null" @click="cc(index)">确认出场</view>
  68. <view class="btn b3" v-if="businessItem.btnShow==2" @click="zd(index)">确认账单</view>
  69. </view>
  70. </view>
  71. </view>
  72. <noData v-if="businessItemList.length==0"></noData>
  73. <u-loadmore style="margin: 30rpx;" :status="status" />
  74. </view>
  75. </template>
  76. <script>
  77. export default {
  78. data() {
  79. return {
  80. p: {
  81. pageNo: 1,
  82. pageSize: 3,
  83. dataCount: 0
  84. },
  85. customemrId: '1',
  86. fk: {
  87. ids: '',
  88. },
  89. rc: {
  90. id: '',
  91. inChannel: '',
  92. showTime: false,
  93. visible: false,
  94. realInTime: ''
  95. },
  96. current: 0,
  97. status: 'loadmore',
  98. page: 0,
  99. tabs: [{
  100. name: '进场',
  101. }, {
  102. name: '出场',
  103. }],
  104. businessItemList: [],
  105. perList:[]
  106. }
  107. },
  108. created() {
  109. this.customemrId = uni.getStorageSync('customerId')
  110. this.perList=uni.getStorageSync('perList')
  111. },
  112. onShow() {
  113. this.getBusinessList();
  114. },
  115. methods: {
  116. sureZdFn(data){
  117. this.$common.to('/pages/business-order/sureOrder?id='+data.id)
  118. },
  119. fkFn(data) {
  120. this.$common.to('/pages/business-order/surePay?id='+data.id)
  121. },
  122. getBusinessList() {
  123. this.$api.getBusinessList(this.p).then(resp => {
  124. this.status = 'loadmore';
  125. this.p.pageNo = resp.pageNo;
  126. this.p.pageSize = resp.pageSize;
  127. this.p.dataCount = resp.dataCount;
  128. this.businessItemList = resp.data;
  129. })
  130. },
  131. //点击上方切换栏,根据点击项重新加载数据
  132. change(index) {
  133. this.current = index;
  134. if (index == 0) {
  135. //只加载进场订单
  136. }
  137. if (index == 1) {
  138. //只加载出场订单
  139. }
  140. },
  141. //点击按钮
  142. //------------------------------------------
  143. fkconfirm() {
  144. this.$api.adminConfirmPay(this.fk).then(resp => {
  145. this.$refs.fkpopup.close();
  146. this.getBusinessList();
  147. })
  148. },
  149. rcFn(data) {
  150. this.rc.id = data.id
  151. this.rc.visible = true;
  152. this.rc.showTime = false;
  153. },
  154. rcconfirm() {
  155. if (!this.rc.inChannel) {
  156. this.$common.toast('请填写入场通道');
  157. return false;
  158. }
  159. this.$api.adminConfirmIn(this.rc).then(resp => {
  160. this.$refs.rcpopup.close();
  161. this.getBusinessList();
  162. })
  163. },
  164. cc() {
  165. this.$refs.ccpopup.open('center')
  166. },
  167. ccconfirm(index) {
  168. console.log('出场')
  169. this.$refs.ccpopup.close()
  170. },
  171. zd() {
  172. this.$refs.zdpopup.open('center')
  173. },
  174. zdconfirm(index) {
  175. this.$refs.zdpopup.close()
  176. },
  177. //------------------------------------------
  178. //上拉加载更多,分页模拟数据
  179. onReachBottom() {
  180. if (parseInt(this.p.dataCount) > parseInt(this.p.pageSize) * parseInt(this.p.pageNo)) {
  181. this.status = 'loading';
  182. this.p.pageSize += 5;
  183. this.getBusinessList();
  184. } else {
  185. this.status = 'nomore';
  186. }
  187. }
  188. }
  189. }
  190. </script>
  191. <style lang="scss">
  192. .card-box {
  193. display: flex;
  194. width: 100%;
  195. flex-direction: column;
  196. .card {
  197. background-color: #fff;
  198. border-radius: 20rpx;
  199. margin: 20rpx 20rpx 0 20rpx;
  200. padding: 30rpx;
  201. box-sizing: border-box;
  202. display: flex;
  203. flex-direction: column;
  204. .t {
  205. width: 100%;
  206. display: flex;
  207. align-items: center;
  208. padding-bottom: 30rpx;
  209. border-bottom: 1rpx solid #f5f5f5;
  210. .icon {
  211. width: 40rpx;
  212. height: 40rpx;
  213. }
  214. .title {
  215. font-size: 30rpx;
  216. font-weight: bold;
  217. margin-left: 20rpx;
  218. }
  219. }
  220. .c {
  221. padding: 15rpx 0 30rpx 0;
  222. display: flex;
  223. flex-wrap: wrap;
  224. border-bottom: 1rpx solid #f5f5f5;
  225. .item {
  226. width: 50%;
  227. padding: 20rpx 0;
  228. .car-num {
  229. background-color: #edf6ff;
  230. color: #0080ff;
  231. font-size: 44rpx;
  232. padding: 15rpx 0;
  233. text-align: center;
  234. width: 100%;
  235. border-radius: 10rpx;
  236. font-weight: bold;
  237. letter-spacing: 20rpx;
  238. }
  239. .p1 {
  240. font-size: 28rpx;
  241. color: #999;
  242. }
  243. .p2 {
  244. font-size: 28rpx;
  245. color: #191919;
  246. font-weight: bold;
  247. margin-left: 20rpx;
  248. }
  249. }
  250. .car-num-item {
  251. width: 100%;
  252. display: flex;
  253. align-items: center;
  254. justify-content: center;
  255. }
  256. }
  257. .b {
  258. display: flex;
  259. width: 100%;
  260. align-items: center;
  261. justify-content: space-between;
  262. .btn {
  263. height: 70rpx;
  264. display: flex;
  265. align-items: center;
  266. justify-content: center;
  267. width: calc(50% - 15rpx);
  268. margin: 30rpx 0 0 0;
  269. border-radius: 10rpx;
  270. border-width: 1rpx;
  271. box-sizing: border-box;
  272. }
  273. .b1 {
  274. background-color: #0080ff;
  275. color: #fff;
  276. }
  277. .b2 {
  278. background-color: #f7f7f7;
  279. color: #191919;
  280. }
  281. .b3 {
  282. background-color: #fff;
  283. color: #0080ff;
  284. border: 1rpx solid #0080ff;
  285. }
  286. }
  287. }
  288. }
  289. @import '@/common/common.scss'
  290. </style>