index.vue 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322
  1. <template>
  2. <view>
  3. <view class="condition">
  4. <view class="conditionone">
  5. <view :style="{'border-bottom':(underline =='0'?'3rpx solid #fff':'none')}" @click="whole">全部</view>
  6. <view :style="{'border-bottom':(underline =='1'?'3rpx solid #fff':'none')}"
  7. @click="show = !show,underline = '1'">出库日期</view>
  8. <!-- <view :style="{'border-bottom':(underline =='2'?'3rpx solid #fff':'none')}" @click="suitcase = !suitcase,underline = '2'">提箱日期</view> -->
  9. <view :style="{'border-bottom':(underline =='3'?'3rpx solid #fff':'none')}"
  10. @click="choiceState = !choiceState,underline = '3'">状态</view>
  11. </view>
  12. </view>
  13. <view class="search">
  14. <u-search shape="round" placeholder="请输入提单号" @custom="custom" @search="custom" :clearabled="false">
  15. </u-search>
  16. </view>
  17. <view class="ordertop" v-for="(item, index) in lisi" :key="index">
  18. <view>
  19. <view class="iconblue"></view>
  20. <text class="license">提单号:{{item.fMblno}}</text>
  21. <view class="various" @click="viewDetails(item)">{{item.fBillstatus}}</view>
  22. </view>
  23. <view class="line">
  24. <u-line color="#ccc" border-style='dashed' />
  25. </view>
  26. <view class="basic">
  27. <view>货主</view>
  28. <view>{{item.corpName}}</view>
  29. </view>
  30. <view class="basic">
  31. <view>入库日期/仓库</view>
  32. <view>{{item.fBsdate}}/{{item.fWarehouseName}}</view>
  33. </view>
  34. <view class="basic">
  35. <view>计划件数/件数/毛重(吨)</view>
  36. <view>{{item.fPlanqty}}/{{item.fQty}}/{{item.fGrossweight}}</view>
  37. </view>
  38. <!-- <view class="basic">
  39. <view>库管</view>
  40. <view>{{item.fContacts}}</view>
  41. </view> -->
  42. <view class="basic">
  43. <view>品名/箱量</view>
  44. <view>{{item.fProductName}}/{{item.fCntval}}</view>
  45. </view>
  46. <!-- <view class="basic" @tap="call_phone(item.fDriverTel)">
  47. <view>司机电话</view>
  48. <view>{{item.fDriverTel}}</view>
  49. </view> -->
  50. <view>
  51. <view>
  52. <view></view>
  53. <view></view>
  54. </view>
  55. <view></view>
  56. <view></view>
  57. </view>
  58. <view class="line">
  59. <u-line color="#ccc" border-style='dashed' />
  60. </view>
  61. <view class="view" @click="viewDetails(item)">
  62. <view>
  63. <text>查看订单详情</text>
  64. </view>
  65. <view>
  66. <u-icon name="arrow-right"></u-icon>
  67. </view>
  68. </view>
  69. </view>
  70. <u-loadmore :status="status" :icon-type="iconType" :load-text="loadText" />
  71. <u-calendar v-model="show" :mode="mode" @change="orderdate"></u-calendar>
  72. <u-calendar v-model="suitcase" :mode="mode" @change="suitcaSe"></u-calendar>
  73. <u-action-sheet :list="column" @close="underline = '0'" @click="thatOne" v-model="choiceState"></u-action-sheet>
  74. </view>
  75. </template>
  76. <script>
  77. export default {
  78. data() {
  79. return {
  80. lisi: [],
  81. column: [{
  82. text: '计划',
  83. value: '1'
  84. }, {
  85. text: '待出库',
  86. value: '2'
  87. }, {
  88. text: '出库中',
  89. value: '3'
  90. }],
  91. show: false,
  92. suitcase: false,
  93. choiceState: false,
  94. underline: '0',
  95. mode: 'range',
  96. queryParams: {
  97. pageNum: 1, //页数
  98. pageSize: 10, //几条数据
  99. },
  100. status: 'loadmore',
  101. iconType: 'flower',
  102. loadText: {
  103. loadmore: '轻轻上拉',
  104. loading: '努力加载中',
  105. nomore: '实在没有了'
  106. },
  107. total: 0,
  108. }
  109. },
  110. onReachBottom() {
  111. this.status = 'loading'
  112. if (this.lisi.length < this.total) {
  113. this.queryParams.pageNum++
  114. this.query()
  115. } else {
  116. this.status = 'nomore'
  117. }
  118. },
  119. created() {
  120. uni.showLoading({
  121. title: '加载中'
  122. });
  123. setTimeout(function() {
  124. uni.hideLoading();
  125. }, 1000);
  126. // #ifdef MP-WEIXIN
  127. if (wx.hideHomeButton) {
  128. wx.hideHomeButton();
  129. }
  130. // #endif
  131. },
  132. onShow() {
  133. this.whole()
  134. },
  135. methods: {
  136. call_phone(bphone) {
  137. uni.makePhoneCall({
  138. phoneNumber: '' + bphone, // 手机号
  139. });
  140. },
  141. thatOne(index) {
  142. // console.log(index)
  143. // console.log(this.column[index].value)
  144. this.lisi = []
  145. this.queryParams = {}
  146. this.queryParams = {
  147. pageNum: 1,
  148. pageSize: 10,
  149. fItemsStatus: this.column[index].value
  150. }
  151. this.query()
  152. },
  153. whole() {
  154. this.underline = '0'
  155. this.lisi = []
  156. this.queryParams = []
  157. this.queryParams = {
  158. pageNum: 1,
  159. pageSize: 10
  160. }
  161. this.query()
  162. },
  163. custom(res) {
  164. // console.log(res)
  165. this.lisi = []
  166. this.queryParams = []
  167. this.queryParams = {
  168. pageNum: 1,
  169. pageSize: 10,
  170. fMblno: res
  171. }
  172. // console.log(this.queryParams)
  173. this.query()
  174. },
  175. orderdate(e) {
  176. this.lisi = []
  177. this.queryParams = []
  178. this.queryParams = {
  179. pageNum: 1,
  180. pageSize: 10,
  181. timeInterval:[e.startDate + ' ' + '00:00:00',e.endDate + ' ' + '23:59:59']
  182. }
  183. this.query()
  184. },
  185. suitcaSe(e) {
  186. // console.log(e)
  187. this.lisi = []
  188. this.queryParams = []
  189. this.queryParams = {
  190. pageNum: 1,
  191. pageSize: 10,
  192. timeInterval:[e.startDate + ' ' + '00:00:00',e.endDate + ' ' + '23:59:59']
  193. }
  194. this.query()
  195. },
  196. query() {
  197. this.$u.get('/warehouseBusiness/applets/outStockList',this.queryParams).then(res => {
  198. console.log(res)
  199. if (res.code == 500) {
  200. uni.showToast({
  201. icon: 'none',
  202. title: res.msg,
  203. position: "bottom"
  204. })
  205. } else if (res.code == 200) {
  206. this.total = res.total
  207. this.lisi = this.lisi.concat(res.rows)
  208. // this.lisi = res.rows
  209. this.status = 'nomore'
  210. }
  211. }).catch(err => {
  212. uni.showToast({
  213. icon: 'none',
  214. title: '网络繁忙请稍后再试',
  215. position: "bottom"
  216. })
  217. })
  218. },
  219. viewDetails(item) {
  220. // console.log(item)
  221. uni.navigateTo({
  222. url: './detailed?item=' + JSON.stringify(item)
  223. });
  224. },
  225. }
  226. }
  227. </script>
  228. <style scoped lang="scss">
  229. .basic {
  230. width: 94%;
  231. margin: 10rpx auto;
  232. display: flex;
  233. justify-content: space-between;
  234. }
  235. .basic>view {
  236. margin-bottom: 10rpx;
  237. }
  238. .basic>view:nth-child(1) {
  239. color: #797979;
  240. }
  241. .view {
  242. width: 96%;
  243. margin: 20rpx auto;
  244. display: flex;
  245. justify-content: space-between
  246. }
  247. .line {
  248. width: 92%;
  249. margin: 0 auto;
  250. }
  251. .oddnumber {
  252. width: 96%;
  253. margin: 20rpx auto;
  254. margin-bottom: 20rpx;
  255. }
  256. .ordertop {
  257. width: 96%;
  258. background-color: #fff;
  259. margin: 20rpx auto;
  260. border-radius: 20rpx;
  261. padding-top: 20rpx;
  262. box-shadow: 0px 0px 8px 0px rgba(165, 189, 251, 0.4);
  263. padding-bottom: 10rpx;
  264. }
  265. .ordertop>view:nth-child(1) {
  266. width: 98%;
  267. margin-bottom: 60rpx;
  268. }
  269. .search {
  270. width: 96%;
  271. margin: 10rpx auto;
  272. }
  273. .iconblue {
  274. width: 10rpx;
  275. height: 45rpx;
  276. float: left;
  277. background-color: #3a63cf;
  278. margin-right: 10rpx;
  279. }
  280. .license {
  281. float: left;
  282. font-size: 32rpx;
  283. }
  284. .various {
  285. float: right;
  286. width: 150rpx;
  287. border: 2rpx solid #3a63cf;
  288. text-align: center;
  289. border-radius: 100rpx;
  290. color: #3a63cf;
  291. }
  292. .condition {
  293. background-color: #1669e6;
  294. height: 60rpx;
  295. }
  296. .conditionone {
  297. width: 92%;
  298. height: 44rpx;
  299. margin: 0rpx auto;
  300. display: flex;
  301. justify-content: space-between;
  302. color: #fff;
  303. }
  304. .conditionone>view {
  305. color: #e6e8e8;
  306. }
  307. </style>