index.vue 7.2 KB

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