index.vue 7.3 KB

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