detailed.vue 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350
  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. <!-- 导航条 -->
  18. <u-navbar :background="background" back-icon-color="#fff" title-color="#fff" title="入库明细列表">
  19. <!-- <view class="navbar-right" slot="right" @click="newly">
  20. <view class="message-box right-item" style="padding-right: 20rpx;color: #FFFFFF;">
  21. <span>新行</span>
  22. </view>
  23. </view> -->
  24. </u-navbar>
  25. <view class="ordertop" v-for="(item, index) in lisi" :key="index">
  26. <view>
  27. <view class="iconblue"></view>
  28. <text class="license">提单号:{{item.fMblno}}</text>
  29. <view class="various" @click="viewDetails(item)">{{item.fBillstatus}}</view>
  30. </view>
  31. <view class="line">
  32. <u-line color="#ccc" border-style='dashed' />
  33. </view>
  34. <view class="basic">
  35. <view>货主</view>
  36. <view>{{item.corpName}}</view>
  37. </view>
  38. <view class="basic">
  39. <view>入库日期</view>
  40. <view>{{item.fBsdate}}</view>
  41. </view>
  42. <view class="basic">
  43. <view>件数/毛重(吨)</view>
  44. <view>{{item.fQty}}/{{item.fGrossweight}}</view>
  45. </view>
  46. <view class="basic">
  47. <view>品名/库位</view>
  48. <view>{{item.goodsName}}/{{item.fWarehouseInformation}}</view>
  49. </view>
  50. <view class="basic">
  51. <view>叉车工</view>
  52. <view>{{item.fForkliftman}}</view>
  53. </view>
  54. <view class="basic">
  55. <view>箱型/箱量/箱号</view>
  56. <view>{{item.cntrtypes}}/{{item.fCntqty}}/{{item.fCntrno}}</view>
  57. </view>
  58. <view class="basic" @tap="call_phone(item.fDriverTel)">
  59. <view>车号/司机电话</view>
  60. <view>{{item.fTruckno}}/{{item.fDriverTel}}</view>
  61. </view>
  62. <view class="line">
  63. <u-line color="#ccc" border-style='dashed' />
  64. </view>
  65. <view class="view" @click="viewDetails(item)">
  66. <view>
  67. <text>查看订单详情</text>
  68. </view>
  69. <view>
  70. <u-icon name="arrow-right"></u-icon>
  71. </view>
  72. </view>
  73. </view>
  74. <u-loadmore :status="status" :icon-type="iconType" :load-text="loadText" />
  75. <u-calendar v-model="show" :mode="mode" @change="orderdate"></u-calendar>
  76. <u-calendar v-model="suitcase" :mode="mode" @change="suitcaSe"></u-calendar>
  77. <u-action-sheet :list="column" @close="underline = '0'" @click="thatOne" v-model="choiceState"></u-action-sheet>
  78. </view>
  79. </template>
  80. <script>
  81. export default {
  82. data() {
  83. return {
  84. lisi: [],
  85. background: {
  86. backgroundColor: '#1669e6'
  87. },
  88. column: [{
  89. text: '待入库',
  90. value: '20'
  91. }, {
  92. text: '入库中',
  93. value: '30'
  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. 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. onLoad(option) { //option为object类型,会序列化上个页面传递的参数
  124. console.log(option)
  125. console.log(JSON.parse(option.item)); //打印出上个页面传递的参数.
  126. this.form = JSON.parse(decodeURIComponent(option.item))
  127. console.log(this.form)
  128. this.queryParams.fId = this.form.fId
  129. // uni.showLoading({
  130. // title: '加载中'
  131. // });
  132. // setTimeout(function() {
  133. // uni.hideLoading();
  134. // }, 1000);
  135. },
  136. onShow() {
  137. this.lisi = []
  138. this.query()
  139. },
  140. created() {
  141. uni.showLoading({
  142. title: '加载中'
  143. });
  144. setTimeout(function() {
  145. uni.hideLoading();
  146. }, 1000);
  147. // #ifdef MP-WEIXIN
  148. if (wx.hideHomeButton) {
  149. wx.hideHomeButton();
  150. }
  151. // #endif
  152. },
  153. methods: {
  154. call_phone(bphone) {
  155. uni.makePhoneCall({
  156. phoneNumber: '' + bphone, // 手机号
  157. });
  158. },
  159. thatOne(index) {
  160. // console.log(index)
  161. // console.log(this.column[index].value)
  162. this.lisi = []
  163. this.queryParams = {}
  164. this.queryParams = {
  165. pageNum: 1,
  166. pageSize: 10,
  167. fBillstatus: this.column[index].value
  168. }
  169. this.query()
  170. },
  171. whole() {
  172. this.underline = '0'
  173. this.lisi = []
  174. this.queryParams = []
  175. this.queryParams = {
  176. pageNum: 1,
  177. pageSize: 10
  178. }
  179. this.query()
  180. },
  181. custom(res) {
  182. // console.log(res)
  183. this.lisi = []
  184. this.queryParams = []
  185. this.queryParams = {
  186. pageNum: 1,
  187. pageSize: 10,
  188. fMblno: res
  189. }
  190. // console.log(this.queryParams)
  191. this.query()
  192. },
  193. orderdate(e) {
  194. this.lisi = []
  195. this.queryParams = []
  196. this.queryParams = {
  197. pageNum: 1,
  198. pageSize: 10,
  199. timeStartBsdate: e.startDate + ' ' + '00:00:00',
  200. timeEndBsdate: e.endDate + ' ' + '23:59:59'
  201. }
  202. this.query()
  203. },
  204. suitcaSe(e) {
  205. // console.log(e)
  206. this.lisi = []
  207. this.queryParams = []
  208. this.queryParams = {
  209. pageNum: 1,
  210. pageSize: 10,
  211. timeStartBsdate: e.startDate + ' ' + '00:00:00',
  212. timeEndBsdate: e.endDate + ' ' + '23:59:59'
  213. }
  214. this.query()
  215. },
  216. query() {
  217. this.$u.get('/warehouseBusiness/applets/warehouseItemById',this.queryParams).then(res => {
  218. console.log(res)
  219. if (res.code == 500) {
  220. uni.showToast({
  221. icon: 'none',
  222. title: res.msg,
  223. position: "bottom"
  224. })
  225. } else if (res.code == 200) {
  226. this.total = res.total
  227. this.lisi = this.lisi.concat(res.rows)
  228. // this.lisi = res.rows
  229. this.status = 'nomore'
  230. }
  231. }).catch(err => {
  232. uni.showToast({
  233. icon: 'none',
  234. title: '网络繁忙请稍后再试',
  235. position: "bottom"
  236. })
  237. })
  238. },
  239. viewDetails(item) {
  240. let data = {
  241. fId:item.fId,
  242. fPid:item.fPid
  243. }
  244. uni.navigateTo({
  245. url: './orderDetails/index?item=' + JSON.stringify(data)
  246. });
  247. },
  248. newly(){
  249. uni.navigateTo({
  250. url: './orderDetails/newlyAdded?item='+JSON.stringify(this.form)
  251. });
  252. }
  253. }
  254. }
  255. </script>
  256. <style scoped lang="scss">
  257. .basic {
  258. width: 94%;
  259. margin: 10rpx auto;
  260. display: flex;
  261. justify-content: space-between;
  262. }
  263. .basic>view {
  264. margin-bottom: 10rpx;
  265. }
  266. .basic>view:nth-child(1) {
  267. color: #797979;
  268. }
  269. .view {
  270. width: 96%;
  271. margin: 20rpx auto;
  272. display: flex;
  273. justify-content: space-between
  274. }
  275. .line {
  276. width: 92%;
  277. margin: 0 auto;
  278. }
  279. .oddnumber {
  280. width: 96%;
  281. margin: 20rpx auto;
  282. margin-bottom: 20rpx;
  283. }
  284. .ordertop {
  285. width: 96%;
  286. background-color: #fff;
  287. margin: 20rpx auto;
  288. border-radius: 20rpx;
  289. padding-top: 20rpx;
  290. box-shadow: 0px 0px 8px 0px rgba(165, 189, 251, 0.4);
  291. padding-bottom: 10rpx;
  292. }
  293. .ordertop>view:nth-child(1) {
  294. width: 98%;
  295. margin-bottom: 60rpx;
  296. }
  297. .search {
  298. width: 96%;
  299. margin: 10rpx auto;
  300. }
  301. .iconblue {
  302. width: 10rpx;
  303. height: 45rpx;
  304. float: left;
  305. background-color: #3a63cf;
  306. margin-right: 10rpx;
  307. }
  308. .license {
  309. float: left;
  310. font-size: 32rpx;
  311. }
  312. .various {
  313. float: right;
  314. width: 150rpx;
  315. border: 2rpx solid #3a63cf;
  316. text-align: center;
  317. border-radius: 100rpx;
  318. color: #3a63cf;
  319. }
  320. .condition {
  321. background-color: #3a63cf;
  322. height: 60rpx;
  323. }
  324. .conditionone {
  325. width: 92%;
  326. height: 44rpx;
  327. margin: 0rpx auto;
  328. display: flex;
  329. justify-content: space-between;
  330. color: #fff;
  331. }
  332. .conditionone>view {
  333. color: #e6e8e8;
  334. }
  335. </style>