index.vue 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306
  1. <template>
  2. <view>
  3. <view class="condition">
  4. <view class="conditionone">
  5. <view :style="{'border-bottom':(underline =='0'?'3rpx solid #fff':'none')}" @click="screen(0)">全部</view>
  6. <view :style="{'border-bottom':(underline =='1'?'3rpx solid #fff':'none')}" @click="screen(1)">仓库</view>
  7. <view :style="{'border-bottom':(underline =='2'?'3rpx solid #fff':'none')}" @click="screen(2)">商品</view>
  8. <view :style="{'border-bottom':(underline =='3'?'3rpx solid #fff':'none')}" @click="screen(3)">入库日期
  9. </view>
  10. </view>
  11. </view>
  12. <view class="search">
  13. <u-search shape="round" placeholder="请输入提单号" @custom="custom" @search="custom" :clearabled="false">
  14. </u-search>
  15. </view>
  16. <view class="ordertop" v-for="(item, index) in lisi" :key="index">
  17. <view>
  18. <view class="iconblue"></view>
  19. <text class="license">提单号:{{item.fMblno}}</text>
  20. <view class="various" @click="viewDetails(item)">{{item.fOriginalbilldate}}</view>
  21. </view>
  22. <view class="line">
  23. <u-line color="#ccc" border-style='dashed' />
  24. </view>
  25. <view class="basic">
  26. <view>货物属性</view>
  27. <view>{{item.fBusinessTypes}}</view>
  28. </view>
  29. <view class="basic">
  30. <view>品名</view>
  31. <view>{{item.fGoodsids}}</view>
  32. </view>
  33. <view class="basic">
  34. <view>仓库</view>
  35. <view>{{item.fWarehouseids}}</view>
  36. </view>
  37. <view class="basic">
  38. <view>结余件数</view>
  39. <view>{{item.fQtyblc}}</view>
  40. </view>
  41. <view class="basic">
  42. <view>结余毛重(kg)</view>
  43. <view>{{item.fGrossweightblc}}</view>
  44. </view>
  45. <view class="basic">
  46. <view>结余净重(kg)</view>
  47. <view>{{item.fNetweightblc}}</view>
  48. </view>
  49. <view class="basic">
  50. <view>箱号</view>
  51. <view>{{item.fLocalcntrno}}</view>
  52. </view>
  53. <view class="basic">
  54. <view>入库时间</view>
  55. <view>{{item.fOriginalbilldate}}</view>
  56. </view>
  57. <view class="basic">
  58. <view>入库数</view>
  59. <view>{{item.fQtyD}}</view>
  60. </view>
  61. <view class="line">
  62. <u-line color="#ccc" border-style='dashed' />
  63. </view>
  64. <view class="view" @click="viewDetails(item)">
  65. <view>
  66. <text>查看入出库照片</text>
  67. </view>
  68. <view>
  69. <u-icon name="arrow-right"></u-icon>
  70. </view>
  71. </view>
  72. </view>
  73. <u-loadmore :status="status" :icon-type="iconType" :load-text="loadText" />
  74. <u-picker v-model="show" mode="selector" :range="list" range-key="fName" @confirm="confirm"></u-picker>
  75. <u-calendar v-model="calendar" mode="range" @change="change"></u-calendar>
  76. </view>
  77. </template>
  78. <script>
  79. export default {
  80. data() {
  81. return {
  82. underline: '0',
  83. loadText: {
  84. loadmore: '轻轻上拉',
  85. loading: '努力加载中',
  86. nomore: '实在没有了'
  87. },
  88. show: false,
  89. calendar: false,
  90. total: 0,
  91. iconType: 'flower',
  92. status: 'loadmore',
  93. form: {
  94. pageNum: 1,
  95. pageSize: 10
  96. },
  97. lisi: [],
  98. list: [],
  99. warehouse: [],
  100. commodity: []
  101. }
  102. },
  103. created() {
  104. this.query()
  105. this.$u.get('/basicdata/warehouse/lists', {
  106. fStatus: 0,
  107. delFlag: 0
  108. }).then(res => {
  109. console.log(res)
  110. this.warehouse = res.rows
  111. // res.rows.forEach((item, index) => {
  112. // this.warehouse.push({
  113. // id: item.fId,
  114. // text: item.fName
  115. // })
  116. // })
  117. })
  118. this.$u.get('/basicdata/goods/list', {
  119. fStatus: 0,
  120. delFlag: 0
  121. }).then(res => {
  122. console.log(res)
  123. this.commodity = res.rows
  124. // res.rows.forEach((item, index) => {
  125. // this.commodity.push({
  126. // id: item.fId,
  127. // text: item.fName
  128. // })
  129. // })
  130. })
  131. },
  132. onReachBottom() {
  133. this.status = 'loading'
  134. if (this.lisi.length < this.total) {
  135. this.form.pageNum++
  136. this.query()
  137. } else {
  138. this.status = 'nomore'
  139. }
  140. },
  141. methods: {
  142. //日期区间确定
  143. change(e) {
  144. console.log(e)
  145. this.lisi = []
  146. this.form = {
  147. orgStorageDate: e.startDate + ' 00:00:00,' + e.endDate + ' 23:59:59',
  148. pageNum: 1,
  149. pageSize: 10
  150. }
  151. this.query()
  152. },
  153. //确定
  154. confirm(index) {
  155. this.lisi = []
  156. console.log(index)
  157. if (this.underline == 1) {
  158. this.form = {
  159. fWarehouseid: this.warehouse[index].fId,
  160. pageNum: 1,
  161. pageSize: 10
  162. }
  163. } else if (this.underline == 2) {
  164. this.form = {
  165. fGoodsid: this.commodity[index].fId,
  166. pageNum: 1,
  167. pageSize: 10
  168. }
  169. }
  170. this.query()
  171. },
  172. //全部
  173. screen(index) {
  174. this.underline = index
  175. if (index == 0) {
  176. this.form = {
  177. pageNum: 1,
  178. pageSize: 10
  179. }
  180. this.query()
  181. } else if (index == 1) {
  182. this.show = true
  183. this.list = this.warehouse
  184. } else if (index == 2) {
  185. this.show = true
  186. this.list = this.commodity
  187. } else if (index == 3) {
  188. this.calendar = !this.calendar
  189. }
  190. },
  191. custom(text) {
  192. console.log(text)
  193. this.form = {
  194. fMblno: text,
  195. pageNum: 1,
  196. pageSize: 10
  197. }
  198. this.query()
  199. },
  200. viewDetails(item) {
  201. console.log(item)
  202. uni.navigateTo({
  203. url: './inventoryDetails?item=' + JSON.stringify(item)
  204. });
  205. },
  206. query() {
  207. this.$u.get('/warehouseBusiness/whgenleg/appWhGenLegList', this.form).then(res => {
  208. console.log(res)
  209. this.lisi = res.rows
  210. this.total = res.total
  211. if (this.total < 10) this.status = 'nomore'
  212. })
  213. }
  214. }
  215. }
  216. </script>
  217. <style scoped lang="scss">
  218. .ordertop {
  219. width: 96%;
  220. background-color: #fff;
  221. margin: 20rpx auto;
  222. border-radius: 20rpx;
  223. padding-top: 20rpx;
  224. box-shadow: 0px 0px 8px 0px rgba(165, 189, 251, 0.4);
  225. padding-bottom: 10rpx;
  226. }
  227. .ordertop>view:nth-child(1) {
  228. width: 98%;
  229. margin-bottom: 60rpx;
  230. }
  231. .iconblue {
  232. width: 10rpx;
  233. height: 45rpx;
  234. float: left;
  235. background-color: #3a63cf;
  236. margin-right: 10rpx;
  237. }
  238. .license {
  239. float: left;
  240. font-size: 32rpx;
  241. }
  242. .various {
  243. float: right;
  244. width: 230rpx;
  245. border: 2rpx solid #3a63cf;
  246. text-align: center;
  247. border-radius: 100rpx;
  248. color: #1669e6;
  249. }
  250. .view {
  251. width: 96%;
  252. margin: 20rpx auto;
  253. display: flex;
  254. justify-content: space-between
  255. }
  256. .line {
  257. width: 92%;
  258. margin: 0 auto;
  259. }
  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. .search {
  273. width: 96%;
  274. margin: 10rpx auto;
  275. }
  276. .condition {
  277. background-color: #1669e6;
  278. height: 60rpx;
  279. }
  280. .conditionone {
  281. width: 92%;
  282. height: 44rpx;
  283. margin: 0rpx auto;
  284. display: flex;
  285. justify-content: space-between;
  286. color: #fff;
  287. }
  288. .conditionone>view {
  289. color: #e6e8e8;
  290. }
  291. </style>