index.vue 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210
  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="date" 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="
  62. width: 50%;
  63. margin: 0 auto;
  64. height: 220rpx;
  65. align-items: center;
  66. position: absolute;
  67. top: 45%;
  68. left: 50%;
  69. transform:translate(-50%,-50%)" text="无申请数据" mode="data"></u-empty>
  70. </view>
  71. </template>
  72. <script>
  73. export default {
  74. data() {
  75. return {
  76. timeInterval: false,
  77. whetherList: [{
  78. text: '全部',
  79. value: null
  80. },{
  81. text: '待接单',
  82. value: 0
  83. }, {
  84. text: '已接单',
  85. value: 1
  86. }, {
  87. text: '已拒绝',
  88. value: 2
  89. }],
  90. whetherShow: false,
  91. list: [{
  92. name: '待接单'
  93. }, {
  94. name: '是否接单'
  95. }, {
  96. name: '提货日期'
  97. }],
  98. current: 0,
  99. dataList: [],
  100. status: 'loadmore',
  101. total: 0,
  102. loadText: {
  103. loadmore: '轻轻上拉',
  104. loading: '努力加载中',
  105. nomore: '实在没有了'
  106. },
  107. form: {
  108. pageNum: 1,
  109. pageSize: 10,
  110. fBilltype: 'SQ',
  111. fTakeOrders:0
  112. },
  113. iconType: 'flower',
  114. deptName: ''
  115. }
  116. },
  117. created() {
  118. this.deptName = uni.getStorageSync('deptName')
  119. if (this.deptName == '外部用户') {
  120. this.$u.get('/anPin/anPinApp/supplier', this.form).then(res => {
  121. this.dataList = res.rows
  122. this.total = res.total
  123. })
  124. } else {
  125. this.$u.get('/anPin/anPinApp/list', this.form).then(res => {
  126. this.dataList = res.rows
  127. this.total = res.total
  128. })
  129. }
  130. },
  131. methods: {
  132. change(index) {
  133. this.current = index
  134. if (index == 1) {
  135. this.whetherShow = true
  136. } else if (index == 2) {
  137. this.timeInterval = true
  138. } else if (index == 0) {
  139. this.form = {
  140. pageNum: 1,
  141. pageSize: 10,
  142. fBilltype: 'SQ',
  143. fTakeOrders:0
  144. }
  145. this.dataList = []
  146. this.query()
  147. }
  148. },
  149. timeIntervalChange(e) {
  150. this.form = {
  151. pageNum: 1,
  152. pageSize: 10,
  153. fBilltype: 'SQ',
  154. fBsdate:e.result
  155. }
  156. this.dataList = []
  157. this.current = null;
  158. this.query()
  159. },
  160. whetherClick(index) {
  161. this.form = {
  162. pageNum: 1,
  163. pageSize: 10,
  164. fBilltype: 'SQ',
  165. fTakeOrders: this.whetherList[index].value
  166. }
  167. this.dataList = []
  168. this.current = null;
  169. this.query()
  170. },
  171. whetherClose() {
  172. this.current = null;
  173. },
  174. onReachBottom() {
  175. this.status = 'loading'
  176. if (this.dataList.length < this.total) {
  177. this.form.pageNum++
  178. this.query()
  179. } else {
  180. this.status = 'nomore'
  181. }
  182. },
  183. query() {
  184. if (this.deptName == '外部用户') {
  185. this.$u.get('/anPin/anPinApp/supplier', this.form).then(res => {
  186. this.dataList = this.dataList.concat(res.rows)
  187. this.total = res.total
  188. if (res.total === 0) this.status = 'nomore'
  189. })
  190. } else {
  191. this.$u.get('/anPin/anPinApp/list', this.form).then(res => {
  192. this.dataList = this.dataList.concat(res.rows)
  193. this.total = res.total
  194. if (res.total === 0) this.status = 'nomore'
  195. })
  196. }
  197. },
  198. expenseDetails(item) {
  199. this.$u.route('/pages/home/procurementApplicationApproval/detailsOrUpdates', {
  200. form: JSON.stringify(item),
  201. toExamine: JSON.stringify(false)
  202. })
  203. }
  204. }
  205. }
  206. </script>
  207. <style>
  208. </style>