index.vue 7.3 KB

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