index.vue 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326
  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.goodsName}}/{{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. // import {request} from '@/common/request/request'
  78. export default {
  79. data() {
  80. return {
  81. lisi: [],
  82. column: [{
  83. text: '计划',
  84. value: '1'
  85. }, {
  86. text: '待入库',
  87. value: '2'
  88. }, {
  89. text: '入库中',
  90. value: '3'
  91. }, {
  92. text: '已入库',
  93. value: '4'
  94. }],
  95. show: false,
  96. suitcase: false,
  97. choiceState: false,
  98. underline: '0',
  99. mode: 'range',
  100. queryParams: {
  101. pageNum: 1, //页数
  102. pageSize: 10, //几条数据
  103. },
  104. status: 'loadmore',
  105. iconType: 'flower',
  106. loadText: {
  107. loadmore: '轻轻上拉',
  108. loading: '努力加载中',
  109. nomore: '实在没有了'
  110. },
  111. total: 0,
  112. }
  113. },
  114. onShow() {
  115. this.query()
  116. },
  117. onReachBottom() {
  118. this.status = 'loading'
  119. if (this.lisi.length < this.total) {
  120. this.queryParams.pageNum++
  121. this.query()
  122. } else {
  123. this.status = 'nomore'
  124. }
  125. },
  126. created() {
  127. uni.showLoading({
  128. title: '加载中'
  129. });
  130. setTimeout(function() {
  131. uni.hideLoading();
  132. }, 1000);
  133. // #ifdef MP-WEIXIN
  134. if (wx.hideHomeButton) {
  135. wx.hideHomeButton();
  136. }
  137. // #endif
  138. },
  139. onShow() {
  140. this.whole()
  141. },
  142. methods: {
  143. call_phone(bphone) {
  144. uni.makePhoneCall({
  145. phoneNumber: '' + bphone, // 手机号
  146. });
  147. },
  148. thatOne(index) {
  149. // console.log(index)
  150. // console.log(this.column[index].value)
  151. this.lisi = []
  152. this.queryParams = {}
  153. this.queryParams = {
  154. pageNum: 1,
  155. pageSize: 10,
  156. fItemsStatus: this.column[index].value
  157. }
  158. this.query()
  159. },
  160. whole() {
  161. this.underline = '0'
  162. this.lisi = []
  163. this.queryParams = []
  164. this.queryParams = {
  165. pageNum: 1,
  166. pageSize: 10
  167. }
  168. this.query()
  169. },
  170. custom(res) {
  171. // console.log(res)
  172. this.lisi = []
  173. this.queryParams = []
  174. this.queryParams = {
  175. pageNum: 1,
  176. pageSize: 10,
  177. fMblno: res
  178. }
  179. // console.log(this.queryParams)
  180. this.query()
  181. },
  182. orderdate(e) {
  183. // console.log(e)
  184. this.lisi = []
  185. this.queryParams = []
  186. this.queryParams = {
  187. pageNum: 1,
  188. pageSize: 10,
  189. timeInterval: [e.startDate + ' ' + '00:00:00', e.endDate + ' ' + '23:59:59']
  190. }
  191. this.query()
  192. },
  193. suitcaSe(e) {
  194. console.log(e)
  195. this.lisi = []
  196. this.queryParams = []
  197. this.queryParams = {
  198. pageNum: 1,
  199. pageSize: 10,
  200. timeInterval: [e.startDate + ' ' + '00:00:00', e.endDate + ' ' + '23:59:59']
  201. }
  202. this.query()
  203. },
  204. query() {
  205. this.$u.get('/warehouseBusiness/applets/inStockList', this.queryParams).then(res => {
  206. // console.log(res)
  207. if (res.code == 500) {
  208. uni.showToast({
  209. icon: 'none',
  210. title: res.msg,
  211. position: "bottom"
  212. })
  213. } else if (res.code == 200) {
  214. this.total = res.total
  215. this.lisi = this.lisi.concat(res.rows)
  216. // this.lisi = res.rows
  217. if (this.lisi.length == this.total) {
  218. this.status = 'nomore'
  219. }
  220. }
  221. })
  222. },
  223. viewDetails(item) {
  224. // console.log(item)
  225. uni.navigateTo({
  226. url: './detailed?item=' + JSON.stringify(item)
  227. });
  228. },
  229. }
  230. }
  231. </script>
  232. <style scoped lang="scss">
  233. .basic {
  234. width: 94%;
  235. margin: 10rpx auto;
  236. display: flex;
  237. justify-content: space-between;
  238. }
  239. .basic>view {
  240. margin-bottom: 10rpx;
  241. }
  242. .basic>view:nth-child(1) {
  243. color: #797979;
  244. }
  245. .view {
  246. width: 96%;
  247. margin: 20rpx auto;
  248. display: flex;
  249. justify-content: space-between
  250. }
  251. .line {
  252. width: 92%;
  253. margin: 0 auto;
  254. }
  255. .oddnumber {
  256. width: 96%;
  257. margin: 20rpx auto;
  258. margin-bottom: 20rpx;
  259. }
  260. .ordertop {
  261. width: 96%;
  262. background-color: #fff;
  263. margin: 20rpx auto;
  264. border-radius: 20rpx;
  265. padding-top: 20rpx;
  266. box-shadow: 0px 0px 8px 0px rgba(165, 189, 251, 0.4);
  267. padding-bottom: 10rpx;
  268. }
  269. .ordertop>view:nth-child(1) {
  270. width: 98%;
  271. margin-bottom: 60rpx;
  272. }
  273. .search {
  274. width: 96%;
  275. margin: 10rpx auto;
  276. }
  277. .iconblue {
  278. width: 10rpx;
  279. height: 45rpx;
  280. float: left;
  281. background-color: #3a63cf;
  282. margin-right: 10rpx;
  283. }
  284. .license {
  285. float: left;
  286. font-size: 32rpx;
  287. }
  288. .various {
  289. float: right;
  290. width: 150rpx;
  291. border: 2rpx solid #3a63cf;
  292. text-align: center;
  293. border-radius: 100rpx;
  294. color: #1669e6;
  295. }
  296. .condition {
  297. background-color: #1669e6;
  298. height: 60rpx;
  299. }
  300. .conditionone {
  301. width: 92%;
  302. height: 44rpx;
  303. margin: 0rpx auto;
  304. display: flex;
  305. justify-content: space-between;
  306. color: #fff;
  307. }
  308. .conditionone>view {
  309. color: #e6e8e8;
  310. }
  311. </style>