business-order.vue 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344
  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}}(kg)</text>
  32. </view>
  33. <view class="item">
  34. <text class="p1">账单确认:</text>
  35. <text class="p2">
  36. <text v-if="businessItem.confirmInput==0">未确认</text>
  37. <text v-else>已确认</text>
  38. </text>
  39. </view>
  40. <view class="item">
  41. <text class="p1">支付状态:</text>
  42. <text class="p2">
  43. <text v-if="businessItem.payStatus==1">未支付</text>
  44. <!-- <text v-if="businessItem.payStatus==2">已支付(未确认)</text> -->
  45. <text v-if="businessItem.payStatus==3">已支付</text>
  46. </text>
  47. </view>
  48. </view>
  49. <view class="b">
  50. <view class="btn b3" v-if="customemrId=='1'&&perList.indexOf('tb-business-item')!==-1" @click="businessFn(businessItem)">
  51. 作业订单</view>
  52. <view class="btn b3" v-if="businessItem.payStatus==1
  53. &&perList.indexOf('tb-business-confirm')!=-1"
  54. @click="sureZdFn(businessItem)">
  55. 账单</view>
  56. <view class="btn b3" v-if="customemrId!=='1'" @click="fkFn(businessItem)">
  57. 证明</view>
  58. <view class="btn b3" @click="toDetail(businessItem)">详情</view>
  59. <view class="btn b1" v-if="businessItem.adminConfirmInput==0&&perList.indexOf('tb-business-edit')!==-1" @click="editFn(businessItem)">修改</view>
  60. <view class="btn b4" v-if="businessItem.payStatus==1
  61. &&businessItem.adminConfirmInput==0
  62. &&perList.indexOf('tb-business-del')!==-1" @click="deleteFn(businessItem)">删除</view>
  63. </view>
  64. </view>
  65. </view>
  66. <noData v-if="businessItemList.length==0"></noData>
  67. <u-loadmore style="margin: 30rpx;" :status="status" />
  68. </view>
  69. </template>
  70. <script>
  71. export default {
  72. data() {
  73. return {
  74. p: {
  75. pageNo: 1,
  76. pageSize: 3,
  77. dataCount: 0
  78. },
  79. customemrId: '1',
  80. fk: {
  81. ids: '',
  82. },
  83. rc: {
  84. id: '',
  85. inChannel: '',
  86. showTime: false,
  87. visible: false,
  88. realInTime: ''
  89. },
  90. current: 0,
  91. status: 'loadmore',
  92. page: 0,
  93. tabs: [{
  94. name: '进场',
  95. }, {
  96. name: '出场',
  97. }],
  98. businessItemList: [],
  99. perList: []
  100. }
  101. },
  102. onShow() {
  103. this.customemrId = uni.getStorageSync('customerId')
  104. this.getBusinessList();
  105. this.perList = uni.getStorageSync('perList')
  106. },
  107. mounted() {
  108. },
  109. onBackPress() {
  110. this.$common.to('/pages/index/index')
  111. return true;
  112. },
  113. methods: {
  114. businessFn(data){
  115. this.$common.to('/pages/business-order/business-item?id=' + data.id)
  116. },
  117. toDetail(data) {
  118. this.$common.to('/pages/business-entering/business-detail?id=' + data.id)
  119. },
  120. editFn(data) {
  121. this.$common.to('/pages/business-entering/business-edit?id=' + data.id)
  122. },
  123. deleteFn(data) {
  124. let that = this;
  125. uni.showModal({
  126. title: "警告",
  127. content: "是否删除该业务?",
  128. success(res) {
  129. if (res.confirm) {
  130. that.$api.deleteBusiness({
  131. id: data.id
  132. }).then(resp => {
  133. that.$common.toast('已删除');
  134. that.getBusinessList();
  135. })
  136. }
  137. }
  138. })
  139. },
  140. completeFn(data) {
  141. this.$common.to('/pages/business-order/createOrder?id=' + data.id)
  142. },
  143. sureZdFn(data) {
  144. this.$common.to('/pages/wx/payOrderTemp?id=' + data.id)
  145. },
  146. fkFn(data) {
  147. this.$common.to('/pages/business-order/report?id=' + data.id)
  148. },
  149. rcFn(data) {
  150. this.$common.to('/pages/business-order/sureIn?id=' + data.id)
  151. },
  152. cc(data) {
  153. this.$common.to('/pages/business-order/sureOut?id=' + data.id)
  154. },
  155. getBusinessList() {
  156. this.p.isCar=0;
  157. this.$api.getBusinessList(this.p).then(resp => {
  158. this.status = 'loadmore';
  159. this.p.pageNo = resp.pageNo;
  160. this.p.pageSize = resp.pageSize;
  161. this.p.dataCount = resp.dataCount;
  162. this.businessItemList = resp.data;
  163. })
  164. },
  165. //点击上方切换栏,根据点击项重新加载数据
  166. change(index) {
  167. this.current = index;
  168. if (index == 0) {
  169. //只加载进场订单
  170. }
  171. if (index == 1) {
  172. //只加载出场订单
  173. }
  174. },
  175. //点击按钮
  176. //------------------------------------------
  177. fkconfirm() {
  178. this.$api.adminConfirmPay(this.fk).then(resp => {
  179. this.$refs.fkpopup.close();
  180. this.getBusinessList();
  181. })
  182. },
  183. rcconfirm() {
  184. if (!this.rc.inChannel) {
  185. this.$common.toast('请填写入场通道');
  186. return false;
  187. }
  188. this.$api.adminConfirmIn(this.rc).then(resp => {
  189. this.$refs.rcpopup.close();
  190. this.getBusinessList();
  191. })
  192. },
  193. ccconfirm(index) {
  194. this.$refs.ccpopup.close()
  195. },
  196. zd() {
  197. this.$refs.zdpopup.open('center')
  198. },
  199. zdconfirm(index) {
  200. this.$refs.zdpopup.close()
  201. },
  202. //------------------------------------------
  203. //上拉加载更多,分页模拟数据
  204. onReachBottom() {
  205. if (parseInt(this.p.dataCount) > parseInt(this.p.pageSize) * parseInt(this.p.pageNo)) {
  206. this.status = 'loading';
  207. this.p.pageSize += 5;
  208. this.getBusinessList();
  209. } else {
  210. this.status = 'nomore';
  211. }
  212. }
  213. }
  214. }
  215. </script>
  216. <style lang="scss">
  217. .card-box {
  218. display: flex;
  219. width: 100%;
  220. flex-direction: column;
  221. .card {
  222. background-color: #fff;
  223. border-radius: 20rpx;
  224. margin: 20rpx 20rpx 0 20rpx;
  225. padding: 30rpx;
  226. box-sizing: border-box;
  227. display: flex;
  228. flex-direction: column;
  229. .t {
  230. width: 100%;
  231. display: flex;
  232. align-items: center;
  233. padding-bottom: 30rpx;
  234. border-bottom: 1rpx solid #f5f5f5;
  235. .icon {
  236. width: 40rpx;
  237. height: 40rpx;
  238. }
  239. .title {
  240. font-size: 30rpx;
  241. font-weight: bold;
  242. margin-left: 20rpx;
  243. }
  244. }
  245. .c {
  246. padding: 15rpx 0 30rpx 0;
  247. display: flex;
  248. flex-wrap: wrap;
  249. border-bottom: 1rpx solid #f5f5f5;
  250. .item {
  251. width: 50%;
  252. padding: 20rpx 0;
  253. .car-num {
  254. background-color: #edf6ff;
  255. color: #0080ff;
  256. font-size: 44rpx;
  257. padding: 15rpx 0;
  258. text-align: center;
  259. width: 100%;
  260. border-radius: 10rpx;
  261. font-weight: bold;
  262. letter-spacing: 20rpx;
  263. }
  264. .p1 {
  265. font-size: 28rpx;
  266. color: #999;
  267. }
  268. .p2 {
  269. font-size: 28rpx;
  270. color: #191919;
  271. font-weight: bold;
  272. margin-left: 20rpx;
  273. }
  274. }
  275. .car-num-item {
  276. width: 100%;
  277. display: flex;
  278. align-items: center;
  279. justify-content: center;
  280. }
  281. }
  282. .b {
  283. display: flex;
  284. width: 100%;
  285. align-items: center;
  286. justify-content: space-between;
  287. .btn {
  288. height: 70rpx;
  289. display: flex;
  290. align-items: center;
  291. justify-content: center;
  292. width: calc(50% - 15rpx);
  293. margin: 30rpx 0 0 0;
  294. border-radius: 10rpx;
  295. border-width: 1rpx;
  296. box-sizing: border-box;
  297. }
  298. .b1 {
  299. background-color: #0080ff;
  300. color: #fff;
  301. }
  302. .b2 {
  303. background-color: #f7f7f7;
  304. color: #191919;
  305. }
  306. .b3 {
  307. background-color: #fff;
  308. color: #0080ff;
  309. border: 1rpx solid #0080ff;
  310. }
  311. .b4 {
  312. background-color: #ff0000;
  313. color: #fff;
  314. }
  315. }
  316. }
  317. }
  318. @import '@/common/common.scss'
  319. </style>