index.vue 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332
  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.corpName}}</view>
  31. </view>
  32. <view class="basic">
  33. <view>货转日期</view>
  34. <view>{{item.fBsdate}}</view>
  35. </view>
  36. <view class="basic">
  37. <view>仓库</view>
  38. <view>{{item.fWarehouseName}}</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.goodsName}}/{{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.$u.get('/warehouseBusiness/applets/inStockList', this.queryParams).then(res => {
  212. // console.log(res)
  213. if (res.code == 500) {
  214. uni.showToast({
  215. icon: 'none',
  216. title: res.msg,
  217. position: "bottom"
  218. })
  219. } else if (res.code == 200) {
  220. this.total = res.total
  221. this.lisi = this.lisi.concat(res.rows)
  222. // this.lisi = res.rows
  223. if (this.lisi.length == this.total) {
  224. this.status = 'nomore'
  225. }
  226. }
  227. })
  228. },
  229. viewDetails(item) {
  230. // console.log(item)
  231. uni.navigateTo({
  232. url: './detailed?item=' + JSON.stringify(item)
  233. });
  234. },
  235. }
  236. }
  237. </script>
  238. <style scoped lang="scss">
  239. .basic {
  240. width: 94%;
  241. margin: 10rpx auto;
  242. display: flex;
  243. justify-content: space-between;
  244. }
  245. .basic>view {
  246. margin-bottom: 10rpx;
  247. }
  248. .basic>view:nth-child(1) {
  249. color: #797979;
  250. }
  251. .view {
  252. width: 96%;
  253. margin: 20rpx auto;
  254. display: flex;
  255. justify-content: space-between
  256. }
  257. .line {
  258. width: 92%;
  259. margin: 0 auto;
  260. }
  261. .oddnumber {
  262. width: 96%;
  263. margin: 20rpx auto;
  264. margin-bottom: 20rpx;
  265. }
  266. .ordertop {
  267. width: 96%;
  268. background-color: #fff;
  269. margin: 20rpx auto;
  270. border-radius: 20rpx;
  271. padding-top: 20rpx;
  272. box-shadow: 0px 0px 8px 0px rgba(165, 189, 251, 0.4);
  273. padding-bottom: 10rpx;
  274. }
  275. .ordertop>view:nth-child(1) {
  276. width: 98%;
  277. margin-bottom: 60rpx;
  278. }
  279. .search {
  280. width: 96%;
  281. margin: 10rpx auto;
  282. }
  283. .iconblue {
  284. width: 10rpx;
  285. height: 45rpx;
  286. float: left;
  287. background-color: #3a63cf;
  288. margin-right: 10rpx;
  289. }
  290. .license {
  291. float: left;
  292. font-size: 32rpx;
  293. }
  294. .various {
  295. float: right;
  296. width: 150rpx;
  297. border: 2rpx solid #3a63cf;
  298. text-align: center;
  299. border-radius: 100rpx;
  300. color: #1669e6;
  301. }
  302. .condition {
  303. background-color: #1669e6;
  304. height: 60rpx;
  305. }
  306. .conditionone {
  307. width: 92%;
  308. height: 44rpx;
  309. margin: 0rpx auto;
  310. display: flex;
  311. justify-content: space-between;
  312. color: #fff;
  313. }
  314. .conditionone>view {
  315. color: #e6e8e8;
  316. }
  317. </style>