index.vue 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462
  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 :style="{'border-bottom':(underline =='4'?'3rpx solid #fff':'none')}"
  12. @click="underline = '4';screen=true">筛选</view>
  13. </view>
  14. </view>
  15. <view class="search">
  16. <u-search shape="round" placeholder="请输入提单号" @custom="custom" @search="custom" :clearabled="false">
  17. </u-search>
  18. </view>
  19. <view class="ordertop" v-for="(item, index) in lisi" :key="index">
  20. <view>
  21. <view class="iconblue"></view>
  22. <text class="license">提单号:{{item.fMblno}}</text>
  23. <view class="various" @click="viewDetails(item)">{{item.fBillstatus}}</view>
  24. </view>
  25. <view class="line">
  26. <u-line color="#ccc" border-style='dashed' />
  27. </view>
  28. <view class="basic">
  29. <view>货主</view>
  30. <view>{{item.corpName}}</view>
  31. </view>
  32. <view class="basic">
  33. <view style="width: 190rpx;">出库日期/仓库</view>
  34. <view style="width: 480rpx;overflow: hidden;text-overflow:ellipsis;white-space: nowrap;">{{item.fBsdate}}/{{item.fWarehouseName}}</view>
  35. </view>
  36. <view class="basic">
  37. <view>计划件数/件数/毛重(吨)</view>
  38. <view>{{item.fPlanqty}}/{{item.fQty}}/{{item.fGrossweight}}</view>
  39. </view>
  40. <!-- <view class="basic">
  41. <view>库管</view>
  42. <view>{{item.fContacts}}</view>
  43. </view> -->
  44. <view class="basic">
  45. <view>品名/箱量</view>
  46. <view>{{item.goodsName}}/{{item.fCntval}}</view>
  47. </view>
  48. <!-- <view class="basic" @tap="call_phone(item.fDriverTel)">
  49. <view>司机电话</view>
  50. <view>{{item.fDriverTel}}</view>
  51. </view> -->
  52. <view>
  53. <view>
  54. <view></view>
  55. <view></view>
  56. </view>
  57. <view></view>
  58. <view></view>
  59. </view>
  60. <view class="line">
  61. <u-line color="#ccc" border-style='dashed' />
  62. </view>
  63. <view class="view" @click="viewDetails(item)">
  64. <view>
  65. <text>查看订单详情</text>
  66. </view>
  67. <view>
  68. <u-icon name="arrow-right"></u-icon>
  69. </view>
  70. </view>
  71. </view>
  72. <u-loadmore :status="status" :icon-type="iconType" :load-text="loadText" />
  73. <u-calendar v-model="show" :mode="mode" @change="orderdate" max-date="2050"></u-calendar>
  74. <u-calendar v-model="suitcase" :mode="mode" @change="suitcaSe"></u-calendar>
  75. <u-action-sheet :list="column" @close="underline = '0'" @click="thatOne" v-model="choiceState"></u-action-sheet>
  76. <u-popup v-model="screen" mode="bottom" length="60%" border-radius="40" :closeable="true">
  77. <view>
  78. <view style="text-align: center;height: 100rpx;line-height: 100rpx;">
  79. <text style="font-weight: bold;font-size: 32rpx;">全部筛选</text>
  80. </view>
  81. <view style="width: 96%;margin: 0 auto;">
  82. <text style="font-size: 28rpx;">状态选择</text>
  83. <u-radio-group v-model="screenName" @change="radioGroupChange"
  84. style="margin: 20rpx auto;display: flex;justify-content: space-around;">
  85. <u-radio
  86. shape="square"
  87. @change="radioChange"
  88. v-for="(item, index) in screenList"
  89. :key="index"
  90. :name="item.name"
  91. :disabled="item.disabled">
  92. {{item.name}}
  93. </u-radio>
  94. </u-radio-group>
  95. <!-- <text style="font-size: 32rpx;" v-if="deptName != '外部用户'">货主</text> -->
  96. <u-field style="padding: 10px 0px;" v-model="fCorpid.label" v-if="deptName != '外部用户'" label="货主名称:" placeholder="请选择货主名称" disabled @click="client = true"/>
  97. <!-- <text style="font-size: 32rpx;">发货方</text> -->
  98. <u-field style="padding: 10px 0px;" v-model="fShipper" label="发货单位:" placeholder="请输入发货单位"/>
  99. <!-- <text style="font-size: 32rpx;">入库日期</text> -->
  100. <u-field style="padding: 10px 0px;" v-model="entryDate" label="入库日期:" placeholder="请选择入库日期" disabled @click="screenEntryDate = true"/>
  101. <view style="width: 100%;height: 120rpx;"></view>
  102. <view
  103. style="width: 100%;position:fixed; bottom:0;background-color: #FFFFFF;padding-left: 20px;padding-right: 20px;padding-bottom: 30rpx;z-index: 9999;">
  104. <u-button type="warning" @click="confirmReset" size="medium" style="float: left;">确认重置</u-button>
  105. <u-button type="primary" @click="confirmCompletion" size="medium" style="float: right;">确认完成</u-button>
  106. </view>
  107. </view>
  108. </view>
  109. </u-popup>
  110. <u-calendar v-model="screenEntryDate" :mode="mode" @change="entryScreen" max-date="2050"></u-calendar>
  111. <u-select v-model="client" :list="clientList" @confirm="confirmClient" @cancel="client = false"></u-select>
  112. </view>
  113. </template>
  114. <script>
  115. // import {request} from '@/common/request/request'
  116. export default {
  117. data() {
  118. return {
  119. lisi: [],
  120. client:false,
  121. fCorpid:{
  122. value: '',
  123. label: ''
  124. },
  125. clientList:[],
  126. screenValue: '',
  127. fShipper:'',
  128. screenName: '',
  129. entryDate: '',
  130. screenEntryDate: false,
  131. screenList: [{
  132. name: '计划',
  133. value: '1',
  134. disabled: false
  135. },
  136. {
  137. name: '待入库',
  138. value: '2',
  139. disabled: false
  140. },
  141. {
  142. name: '入库中',
  143. value: '3',
  144. disabled: false
  145. },
  146. {
  147. name: '已入库',
  148. value: '4',
  149. disabled: false
  150. }
  151. ],
  152. screen: false,
  153. column: [{
  154. text: '计划',
  155. value: '1'
  156. }, {
  157. text: '待入库',
  158. value: '2'
  159. }, {
  160. text: '入库中',
  161. value: '3'
  162. }, {
  163. text: '已入库',
  164. value: '4'
  165. }],
  166. show: false,
  167. suitcase: false,
  168. choiceState: false,
  169. underline: '0',
  170. mode: 'range',
  171. deptName:'',
  172. queryParams: {
  173. pageNum: 1, //页数
  174. pageSize: 10, //几条数据
  175. },
  176. status: 'loadmore',
  177. iconType: 'flower',
  178. loadText: {
  179. loadmore: '轻轻上拉',
  180. loading: '努力加载中',
  181. nomore: '实在没有了'
  182. },
  183. total: 0,
  184. }
  185. },
  186. onShow() {
  187. this.clientList = []
  188. this.$u.get('/basicdata/corps/list').then(res=>{
  189. for(let item in res.rows){
  190. this.clientList.push({
  191. value: res.rows[item].fId,
  192. label: res.rows[item].fName
  193. })
  194. }
  195. })
  196. this.whole()
  197. },
  198. onReachBottom() {
  199. this.status = 'loading'
  200. if (this.lisi.length < this.total) {
  201. this.queryParams.pageNum++
  202. this.query()
  203. } else {
  204. this.status = 'nomore'
  205. }
  206. },
  207. created() {
  208. this.deptName = uni.getStorageSync('deptName')
  209. uni.showLoading({
  210. title: '加载中'
  211. });
  212. setTimeout(function() {
  213. uni.hideLoading();
  214. }, 1000);
  215. // #ifdef MP-WEIXIN
  216. if (wx.hideHomeButton) {
  217. wx.hideHomeButton();
  218. }
  219. // #endif
  220. },
  221. methods: {
  222. confirmReset(){
  223. this.screenName = ''
  224. this.entryDate = ''
  225. this.fShipper = ''
  226. this.fCorpid = {
  227. value: '',
  228. label: ''
  229. }
  230. },
  231. //确认货主
  232. confirmClient(e){
  233. this.fCorpid.value = e[0].value
  234. this.fCorpid.label = e[0].label
  235. },
  236. // 选中某个单选框时,由radio时触发
  237. radioChange(e) {
  238. for(let item in this.screenList){
  239. if(e == this.screenList[item].name){
  240. this.screenName = this.screenList[item].name
  241. this.screenValue = this.screenList[item].value
  242. }
  243. }
  244. },
  245. // 选中任一radio时,由radio-group触发
  246. radioGroupChange(e) {
  247. for(let item in this.screenList){
  248. if(e == this.screenList[item].name){
  249. this.screenName = this.screenList[item].name
  250. this.screenValue = this.screenList[item].value
  251. }
  252. }
  253. },
  254. call_phone(bphone) {
  255. uni.makePhoneCall({
  256. phoneNumber: '' + bphone, // 手机号
  257. });
  258. },
  259. thatOne(index) {
  260. // console.log(index)
  261. // console.log(this.column[index].value)
  262. this.lisi = []
  263. this.queryParams = {}
  264. this.queryParams = {
  265. pageNum: 1,
  266. pageSize: 10,
  267. fItemsStatus: this.column[index].value
  268. }
  269. this.query()
  270. },
  271. whole() {
  272. this.underline = '0'
  273. this.lisi = []
  274. this.queryParams = []
  275. this.queryParams = {
  276. pageNum: 1,
  277. pageSize: 10
  278. }
  279. this.query()
  280. },
  281. custom(res) {
  282. // console.log(res)
  283. this.lisi = []
  284. this.queryParams = []
  285. this.queryParams = {
  286. pageNum: 1,
  287. pageSize: 10,
  288. fMblno: res
  289. }
  290. // console.log(this.queryParams)
  291. this.query()
  292. },
  293. orderdate(e) {
  294. // console.log(e)
  295. this.lisi = []
  296. this.queryParams = []
  297. this.queryParams = {
  298. pageNum: 1,
  299. pageSize: 10,
  300. timeInterval: [e.startDate + ' ' + '00:00:00', e.endDate + ' ' + '23:59:59']
  301. }
  302. this.query()
  303. },
  304. suitcaSe(e) {
  305. console.log(e)
  306. this.lisi = []
  307. this.queryParams = []
  308. this.queryParams = {
  309. pageNum: 1,
  310. pageSize: 10,
  311. timeInterval: [e.startDate + ' ' + '00:00:00', e.endDate + ' ' + '23:59:59']
  312. }
  313. this.query()
  314. },
  315. entryScreen(e){
  316. this.entryDate = e.startDate+','+e.endDate
  317. },
  318. confirmCompletion(){
  319. this.lisi = []
  320. this.queryParams = {
  321. pageNum: 1,
  322. pageSize: 10,
  323. fShipper:this.fShipper,
  324. fItemsStatus:this.screenValue,
  325. timeInterval:this.entryDate.split(',')
  326. }
  327. if(this.entryDate){
  328. this.queryParams.timeInterval = [this.queryParams.timeInterval[0] + ' ' + '00:00:00', this.queryParams.timeInterval[1] + ' ' + '23:59:59']
  329. }else{
  330. delete this.queryParams.timeInterval
  331. }
  332. if(this.fCorpid.value) this.queryParams.fCorpid = this.fCorpid.value
  333. this.screen = false
  334. this.query()
  335. },
  336. query() {
  337. this.$u.get('/warehouseBusiness/applets/inStockList', this.queryParams).then(res => {
  338. // console.log(res)
  339. if (res.code == 500) {
  340. uni.showToast({
  341. icon: 'none',
  342. title: res.msg,
  343. position: "bottom"
  344. })
  345. } else if (res.code == 200) {
  346. this.total = res.total
  347. this.lisi = this.lisi.concat(res.rows)
  348. // this.lisi = res.rows
  349. if (this.lisi.length == this.total) {
  350. this.status = 'nomore'
  351. }
  352. }
  353. })
  354. },
  355. viewDetails(item) {
  356. // console.log(item)
  357. let data = {
  358. fId:item.fId
  359. }
  360. // console.log(JSON.stringify(item))
  361. uni.navigateTo({
  362. url: './detailed?item=' + JSON.stringify(data)
  363. });
  364. },
  365. }
  366. }
  367. </script>
  368. <style scoped lang="scss">
  369. .basic {
  370. width: 94%;
  371. margin: 10rpx auto;
  372. display: flex;
  373. justify-content: space-between;
  374. }
  375. .basic>view {
  376. margin-bottom: 10rpx;
  377. }
  378. .basic>view:nth-child(1) {
  379. color: #797979;
  380. }
  381. .view {
  382. width: 96%;
  383. margin: 20rpx auto;
  384. display: flex;
  385. justify-content: space-between
  386. }
  387. .line {
  388. width: 92%;
  389. margin: 0 auto;
  390. }
  391. .oddnumber {
  392. width: 96%;
  393. margin: 20rpx auto;
  394. margin-bottom: 20rpx;
  395. }
  396. .ordertop {
  397. width: 96%;
  398. background-color: #fff;
  399. margin: 20rpx auto;
  400. border-radius: 20rpx;
  401. padding-top: 20rpx;
  402. box-shadow: 0px 0px 8px 0px rgba(165, 189, 251, 0.4);
  403. padding-bottom: 10rpx;
  404. }
  405. .ordertop>view:nth-child(1) {
  406. width: 98%;
  407. margin-bottom: 60rpx;
  408. }
  409. .search {
  410. width: 96%;
  411. margin: 10rpx auto;
  412. }
  413. .iconblue {
  414. width: 10rpx;
  415. height: 45rpx;
  416. float: left;
  417. background-color: #3a63cf;
  418. margin-right: 10rpx;
  419. }
  420. .license {
  421. float: left;
  422. font-size: 32rpx;
  423. }
  424. .various {
  425. float: right;
  426. width: 150rpx;
  427. border: 2rpx solid #3a63cf;
  428. text-align: center;
  429. border-radius: 100rpx;
  430. color: #1669e6;
  431. }
  432. .condition {
  433. background-color: #1669e6;
  434. height: 60rpx;
  435. }
  436. .conditionone {
  437. width: 92%;
  438. height: 44rpx;
  439. margin: 0rpx auto;
  440. display: flex;
  441. justify-content: space-between;
  442. color: #fff;
  443. }
  444. .conditionone>view {
  445. color: #e6e8e8;
  446. }
  447. </style>