detailed.vue 8.0 KB

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