detailed.vue 8.0 KB

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