index.vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415
  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)">入库日期</view>
  9. <view :style="{'border-bottom':(underline =='4'?'3rpx solid #fff':'none')}" @click="screen(4)">筛选</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.fCorpid}}</view>
  28. </view>
  29. <view class="basic">
  30. <view>品名\属性详情</view>
  31. <view>{{item.fGoodsids}}\{{item.fMarks}}</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}}\{{item.fGrossweightblc}}\{{item.fVolumnblc}}</view>
  40. </view>
  41. <view class="basic">
  42. <view>入库件数\毛重(吨)\尺</view>
  43. <view>{{item.fQtyD}}\{{item.fGrossweightD}}\{{item.fVolumnD}}</view>
  44. </view>
  45. <view class="line">
  46. <u-line color="#ccc" border-style='dashed' />
  47. </view>
  48. <view class="view" @click="viewDetails(item)">
  49. <view>
  50. <text>查看入出库照片</text>
  51. </view>
  52. <view>
  53. <u-icon name="arrow-right"></u-icon>
  54. </view>
  55. </view>
  56. </view>
  57. <u-loadmore :status="status" :icon-type="iconType" :load-text="loadText" />
  58. <u-picker v-model="show" z-index="10076" mode="selector" :range="list" range-key="fName" @confirm="confirm"></u-picker>
  59. <u-calendar v-model="calendar" z-index="10076" mode="range" @change="change"></u-calendar>
  60. <u-popup v-model="screenOpen" @close="closeScreen" mode="bottom" length="60%" border-radius="40" :closeable="true">
  61. <view>
  62. <view style="text-align: center;height: 100rpx;line-height: 100rpx;">
  63. <text style="font-weight: bold;font-size: 32rpx;">全部筛选</text>
  64. </view>
  65. <view style="width: 96%;margin: 0 auto;">
  66. <!-- <text style="font-size: 32rpx;" v-if="deptName != '外部用户'">货主</text> -->
  67. <u-field style="padding: 10px 0px;" v-model="fCorpid.label" v-if="deptName != '外部用户'" label="货主名称:" placeholder="请选择货主名称" disabled @click="client = true"/>
  68. <!-- <text style="font-size: 32rpx;">发货方</text> -->
  69. <u-field style="padding: 10px 0px;" v-model="fShipper" label="发货单位:" placeholder="请输入发货单位"/>
  70. <!-- <text style="font-size: 32rpx;">入库日期</text> -->
  71. <u-field style="padding: 10px 0px;" v-model="entryDate" label="入库日期:" placeholder="请选择入库日期" disabled @click="calendar = true"/>
  72. <!-- <text style="font-size: 32rpx;">货物名称</text> -->
  73. <u-field
  74. style="margin: 20rpx auto;padding: 10px 0px;"
  75. v-model="fGoodsName"
  76. label="货物名称:"
  77. placeholder="请选择货物名称"
  78. disabled
  79. @click="show = true;list = commodity;screenType =1"
  80. />
  81. <!-- <text style="font-size: 32rpx;">仓库名称</text> -->
  82. <u-field
  83. style="margin: 20rpx auto;padding: 10px 0px;"
  84. v-model="warehouseName"
  85. label="仓库名称:"
  86. placeholder="请选择仓库"
  87. disabled
  88. @click="show = true;list = warehouse;screenType = 0"
  89. />
  90. <view style="width: 100%;height: 120rpx;"></view>
  91. <view
  92. style="width: 100%;position:fixed; bottom:0;background-color: #FFFFFF;padding-left: 20px;padding-right: 20px;padding-bottom: 30rpx;z-index: 9999;">
  93. <u-button type="warning" @click="confirmReset" size="medium" style="float: left;">确认重置</u-button>
  94. <u-button type="primary" @click="confirmCompletion" size="medium" style="float: right;">确认完成</u-button>
  95. </view>
  96. </view>
  97. </view>
  98. </u-popup>
  99. <u-select v-model="client" :list="clientList" @confirm="confirmClient" @cancel="client = false"></u-select>
  100. </view>
  101. </template>
  102. <script>
  103. export default {
  104. data() {
  105. return {
  106. screenOpen:false,
  107. client:false,
  108. clientList:[],
  109. fCorpid:{
  110. value: '',
  111. label: ''
  112. },
  113. warehouseName:'',
  114. fShipper:'',
  115. warehouseId:'',
  116. fGoodsid:'',
  117. fGoodsName:'',
  118. screenType:0,
  119. entryDate:'',
  120. underline: '0',
  121. loadText: {
  122. loadmore: '轻轻上拉',
  123. loading: '努力加载中',
  124. nomore: '实在没有了'
  125. },
  126. show: false,
  127. calendar: false,
  128. deptName:'',
  129. total: 0,
  130. iconType: 'flower',
  131. status: 'loadmore',
  132. form: {
  133. pageNum: 1,
  134. pageSize: 10
  135. },
  136. lisi: [],
  137. list: [],
  138. warehouse: [],
  139. commodity: []
  140. }
  141. },
  142. created() {
  143. this.deptName = uni.getStorageSync('deptName')
  144. this.query()
  145. this.$u.get('/basicdata/warehouse/appList', {
  146. fStatus: 0,
  147. delFlag: 0
  148. }).then(res => {
  149. console.log(res)
  150. this.warehouse = res.rows
  151. // res.rows.forEach((item, index) => {
  152. // this.warehouse.push({
  153. // id: item.fId,
  154. // text: item.fName
  155. // })
  156. // })
  157. })
  158. this.$u.get('/basicdata/goods/list', {
  159. fStatus: 0,
  160. delFlag: 0
  161. }).then(res => {
  162. console.log(res)
  163. this.commodity = res.rows
  164. // res.rows.forEach((item, index) => {
  165. // this.commodity.push({
  166. // id: item.fId,
  167. // text: item.fName
  168. // })
  169. // })
  170. })
  171. },
  172. onReachBottom() {
  173. this.status = 'loading'
  174. if (this.lisi.length < this.total) {
  175. this.form.pageNum++
  176. this.query()
  177. } else {
  178. this.status = 'nomore'
  179. }
  180. },
  181. onShow() {
  182. this.clientList = []
  183. this.$u.get('/basicdata/corps/list').then(res=>{
  184. for(let item in res.rows){
  185. this.clientList.push({
  186. value: res.rows[item].fId,
  187. label: res.rows[item].fName
  188. })
  189. }
  190. })
  191. },
  192. methods: {
  193. confirmReset(){
  194. this.warehouseName = ''
  195. this.fGoodsName = ''
  196. this.entryDate = ''
  197. this.fShipper = ''
  198. this.fCorpid = {
  199. value: '',
  200. label: ''
  201. }
  202. },
  203. //确认货主
  204. confirmClient(e){
  205. this.fCorpid.value = e[0].value
  206. this.fCorpid.label = e[0].label
  207. },
  208. // 确认完成
  209. confirmCompletion(){
  210. this.form = {
  211. pageNum: 1,
  212. pageSize: 10,
  213. fShipper:this.fShipper,
  214. }
  215. if(this.warehouseId) this.form.fWarehouseid = this.warehouseId
  216. if(this.fGoodsid) this.form.fGoodsid = this.fGoodsid
  217. if(this.entryDate) this.form.orgStorageDate = this.entryDate.split(',')
  218. if(this.entryDate){
  219. this.form.orgStorageDate = [this.form.orgStorageDate[0] + ' ' + '00:00:00', this.form.orgStorageDate[1] + ' ' + '23:59:59']
  220. }else{
  221. delete this.form.orgStorageDate
  222. }
  223. if(this.fCorpid.value) this.form.fCorpid = this.fCorpid.value
  224. this.screenOpen = false
  225. this.lisi = []
  226. this.query()
  227. },
  228. //弹出框收起触发
  229. closeScreen(){
  230. this.screenOpen = false
  231. },
  232. //日期区间确定
  233. change(e) {
  234. console.log(e)
  235. if(this.screenOpen == true){
  236. this.entryDate = e.startDate+','+e.endDate
  237. }else{
  238. this.lisi = []
  239. this.form = {
  240. orgStorageDate: e.startDate + ' 00:00:00,' + e.endDate + ' 23:59:59',
  241. pageNum: 1,
  242. pageSize: 10
  243. }
  244. this.query()
  245. }
  246. },
  247. //确定
  248. confirm(index) {
  249. console.log(this.underline)
  250. if(this.screenOpen == true){
  251. if(this.screenType == 0){
  252. this.warehouseName = this.warehouse[index].fName
  253. this.warehouseId = this.warehouse[index].fId
  254. }else{
  255. this.fGoodsName = this.commodity[index].fName
  256. this.fGoodsId = this.commodity[index].fId
  257. }
  258. return
  259. }else{
  260. if (this.underline == 1) {
  261. this.form = {
  262. fWarehouseid: this.warehouse[index].fId,
  263. pageNum: 1,
  264. pageSize: 10
  265. }
  266. } else if (this.underline == 2) {
  267. this.form = {
  268. fGoodsid: this.commodity[index].fId,
  269. pageNum: 1,
  270. pageSize: 10
  271. }
  272. }
  273. }
  274. this.lisi = []
  275. this.query()
  276. },
  277. //全部
  278. screen(index) {
  279. this.underline = index
  280. if (index == 0) {
  281. this.form = {
  282. pageNum: 1,
  283. pageSize: 10
  284. }
  285. this.query()
  286. } else if (index == 1) {
  287. this.show = true
  288. this.list = this.warehouse
  289. } else if (index == 2) {
  290. this.show = true
  291. this.list = this.commodity
  292. } else if (index == 3) {
  293. this.calendar = !this.calendar
  294. }else if(index == 4){
  295. this.screenOpen = true
  296. }
  297. },
  298. custom(text) {
  299. console.log(text)
  300. this.form = {
  301. fMblno: text,
  302. pageNum: 1,
  303. pageSize: 10
  304. }
  305. this.lisi = []
  306. this.query()
  307. },
  308. viewDetails(item) {
  309. console.log(item)
  310. uni.navigateTo({
  311. url: './inventoryDetails?item=' + JSON.stringify(item)
  312. });
  313. },
  314. query() {
  315. this.$u.get('/warehouseBusiness/whgenleg/appWhGenLegList', this.form).then(res => {
  316. console.log(res)
  317. this.lisi = this.lisi.concat(res.rows)
  318. this.total = res.total
  319. if (this.total < 10) this.status = 'nomore'
  320. })
  321. }
  322. }
  323. }
  324. </script>
  325. <style scoped lang="scss">
  326. .ordertop {
  327. width: 96%;
  328. background-color: #fff;
  329. margin: 20rpx auto;
  330. border-radius: 20rpx;
  331. padding-top: 20rpx;
  332. box-shadow: 0px 0px 8px 0px rgba(165, 189, 251, 0.4);
  333. padding-bottom: 10rpx;
  334. }
  335. .ordertop>view:nth-child(1) {
  336. width: 98%;
  337. margin-bottom: 60rpx;
  338. }
  339. .iconblue {
  340. width: 10rpx;
  341. height: 45rpx;
  342. float: left;
  343. background-color: #3a63cf;
  344. margin-right: 10rpx;
  345. }
  346. .license {
  347. float: left;
  348. font-size: 32rpx;
  349. }
  350. .various {
  351. float: right;
  352. width: 230rpx;
  353. border: 2rpx solid #3a63cf;
  354. text-align: center;
  355. border-radius: 100rpx;
  356. color: #1669e6;
  357. }
  358. .view {
  359. width: 96%;
  360. margin: 20rpx auto;
  361. display: flex;
  362. justify-content: space-between
  363. }
  364. .line {
  365. width: 92%;
  366. margin: 0 auto;
  367. }
  368. .basic {
  369. width: 94%;
  370. margin: 10rpx auto;
  371. display: flex;
  372. justify-content: space-between;
  373. }
  374. .basic>view {
  375. margin-bottom: 10rpx;
  376. }
  377. .basic>view:nth-child(1) {
  378. color: #797979;
  379. }
  380. .search {
  381. width: 96%;
  382. margin: 10rpx auto;
  383. }
  384. .condition {
  385. background-color: #1669e6;
  386. height: 60rpx;
  387. }
  388. .conditionone {
  389. width: 92%;
  390. height: 44rpx;
  391. margin: 0rpx auto;
  392. display: flex;
  393. justify-content: space-between;
  394. color: #fff;
  395. }
  396. .conditionone>view {
  397. color: #e6e8e8;
  398. }
  399. </style>