index.vue 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200
  1. <template>
  2. <view>
  3. <view style="box-shadow: 0px 0px 8px 0px rgba(165, 189, 251, 0.4);margin-bottom: 20rpx">
  4. <u-tabs :list="list" :is-scroll="false" :current="current" @change="change"></u-tabs>
  5. </view>
  6. <u-action-sheet :list="whetherList" v-model="whetherShow" @click="whetherClick" @close="whetherClose">
  7. </u-action-sheet>
  8. <u-calendar v-model="timeInterval" mode="range" max-date="2050" @change="timeIntervalChange" :mask-close-able="false" :closeable="false"></u-calendar>
  9. <view v-for="(item,index) in dataList" :key="index" style="box-shadow: 0px 0px 8px 0px rgba(165, 189, 251, 0.4);width: 96%;border-top-right-radius: 10rpx;margin: 10rpx auto;padding-top: 10rpx;">
  10. <span style="width: 10rpx;height: 40rpx;background-color: #2979ff;display: block;float: left;margin-top: 10rpx;"></span>
  11. <h4 style="width: 140rpx;border-radius: 200rpx;text-align: center;color: #2979ff;border: 2rpx solid #1785FF;float: right;margin-right: 10rpx;margin-top: 10rpx;">
  12. {{item.fBillstatusName}}
  13. </h4>
  14. <view style="width: 90%;margin: 0 auto;margin: 0 auto;">
  15. <view style="display: flex;justify-content: space-between;height: 60rpx;line-height: 60rpx;border-bottom: 1rpx solid #eff4ff;">
  16. <h4>系统编号:{{item.fBillno}}</h4>
  17. </view>
  18. <view>
  19. <view style="width: 100%;height: 60rpx;line-height: 60rpx;">
  20. <view style="float: left;">提货日期</view>
  21. <view style="float: right;">{{item.fBsdate}}</view>
  22. </view>
  23. <view style="width: 100%;height: 60rpx;line-height: 60rpx;">
  24. <view style="float: left;">项目名称</view>
  25. <view style="float: right;">{{item.projectName}}</view>
  26. </view>
  27. <view style="width: 100%;height: 60rpx;line-height: 60rpx;">
  28. <view style="float: left;">申请人</view>
  29. <view style="float: right;">{{item.createBy}}</view>
  30. </view>
  31. <view style="width: 100%;height: 60rpx;line-height: 60rpx;">
  32. <view style="float: left;">申请日期</view>
  33. <view style="float: right;">{{item.createTime}}</view>
  34. </view>
  35. <view style="width: 100%;height: 60rpx;line-height: 60rpx;">
  36. <view style="float: left;">是否接单</view>
  37. <view style="float: right;">{{item.fTakeOrders==0?'待接单':item.fTakeOrders==1?'已接单':'已拒绝'}}</view>
  38. </view>
  39. <view style="width: 100%;height: 60rpx;line-height: 60rpx;" v-if="item.fTakeOrders == '2'">
  40. <view style="float: left;">拒绝理由</view>
  41. <view style="float: right;">{{item.fReason}}</view>
  42. </view>
  43. <view style="width: 100%;height: 60rpx;line-height: 60rpx;">
  44. <view style="float: left;">备注</view>
  45. <view style="float: right;">{{item.remark}}</view>
  46. </view>
  47. </view>
  48. <view
  49. style="width: 100%;margin: 0 auto;height: 80rpx;margin: 0 auto;line-height: 80rpx;border-top: 1rpx solid #eff4ff;"
  50. @click="expenseDetails(item)">
  51. <view style="float: left;">
  52. <h3>查看详情</h3>
  53. </view>
  54. <view style="float: right;">
  55. <u-icon name="arrow-right"></u-icon>
  56. </view>
  57. </view>
  58. </view>
  59. </view>
  60. <u-loadmore v-if="total > 0" :status="status" :icon-type="iconType" :load-text="loadText" />
  61. <u-empty v-else style="width: 50%;
  62. margin: 0 auto;
  63. height: 220rpx;
  64. align-items: center;
  65. position: absolute;
  66. top: 45%;
  67. left: 50%;
  68. transform:translate(-50%,-50%)" text="无申请数据" mode="data"></u-empty>
  69. </view>
  70. </template>
  71. <script>
  72. export default {
  73. data() {
  74. return {
  75. timeInterval: false,
  76. whetherList: [{
  77. text: '待接单',
  78. value: 0
  79. }, {
  80. text: '已接单',
  81. value: 1
  82. }, {
  83. text: '已拒绝',
  84. value: 2
  85. }],
  86. whetherShow: false,
  87. list: [{
  88. name: '全部'
  89. }, {
  90. name: '是否接单'
  91. }, {
  92. name: '提货日期'
  93. }],
  94. current: 0,
  95. dataList: [],
  96. status: 'loadmore',
  97. total: 0,
  98. loadText: {
  99. loadmore: '轻轻上拉',
  100. loading: '努力加载中',
  101. nomore: '实在没有了'
  102. },
  103. form: {
  104. pageNum: 1,
  105. pageSize: 5,
  106. },
  107. iconType: 'flower',
  108. deptName: ''
  109. }
  110. },
  111. created() {
  112. this.deptName = uni.getStorageSync('deptName')
  113. if (this.deptName == '外部用户') {
  114. this.$u.get('/anPin/anPinApp/supplier', this.form).then(res => {
  115. this.dataList = res.rows
  116. this.total = res.total
  117. })
  118. } else {
  119. this.$u.get('/anPin/anPinApp/list', this.form).then(res => {
  120. this.dataList = res.rows
  121. this.total = res.total
  122. })
  123. }
  124. },
  125. methods: {
  126. change(index) {
  127. this.current = index
  128. if (index == 1) {
  129. this.whetherShow = true
  130. } else if (index == 2) {
  131. this.timeInterval = true
  132. } else if (index == 0) {
  133. this.form = {
  134. pageNum: 1,
  135. pageSize: 10,
  136. }
  137. this.dataList = []
  138. this.query()
  139. }
  140. },
  141. timeIntervalChange(e) {
  142. this.form = {
  143. pageNum: 1,
  144. pageSize: 10,
  145. timeInterval:[e.startDate,e.endDate]
  146. }
  147. this.dataList = []
  148. this.current = null;
  149. this.query()
  150. },
  151. whetherClick(index) {
  152. this.form = {
  153. pageNum: 1,
  154. pageSize: 10,
  155. fTakeOrders: this.whetherList[index].value
  156. }
  157. this.dataList = []
  158. this.current = null;
  159. this.query()
  160. },
  161. whetherClose() {
  162. this.current = null;
  163. },
  164. onReachBottom() {
  165. this.status = 'loading'
  166. if (this.dataList.length < this.total) {
  167. this.form.pageNum++
  168. this.query()
  169. } else {
  170. this.status = 'nomore'
  171. }
  172. },
  173. query() {
  174. if (this.deptName == '外部用户') {
  175. this.$u.get('/anPin/anPinApp/supplier', this.form).then(res => {
  176. this.dataList = this.dataList.concat(res.rows)
  177. this.total = res.total
  178. if (res.total === 0) this.status = 'nomore'
  179. })
  180. } else {
  181. this.$u.get('/anPin/anPinApp/list', this.form).then(res => {
  182. this.dataList = this.dataList.concat(res.rows)
  183. this.total = res.total
  184. if (res.total === 0) this.status = 'nomore'
  185. })
  186. }
  187. },
  188. expenseDetails(item) {
  189. this.$u.route('/pages/home/procurementApplicationApproval/detailsOrUpdates', {
  190. form: JSON.stringify(item),
  191. toExamine: JSON.stringify(false)
  192. })
  193. }
  194. }
  195. }
  196. </script>
  197. <style>
  198. </style>