Index.vue 7.3 KB

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