index.vue 7.3 KB

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