index.vue 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463
  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.fProductName}}/{{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;">货主</text> -->
  96. <u-field style="padding: 10px 0px;" v-model="fCorpid.label" label="货主名称:" v-if="deptName != '外部用户'" 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. export default {
  116. data() {
  117. return {
  118. lisi: [],
  119. client:false,
  120. clientList:[],
  121. fCorpid:{
  122. value: '',
  123. label: ''
  124. },
  125. screenValue: '',
  126. screenName: '',
  127. fShipper: '',
  128. entryDate: '',
  129. screenEntryDate: false,
  130. screenList: [{
  131. name: '计划',
  132. value: '1',
  133. disabled: false
  134. },
  135. {
  136. name: '待出库',
  137. value: '2',
  138. disabled: false
  139. },
  140. {
  141. name: '出库中',
  142. value: '3',
  143. disabled: false
  144. },
  145. {
  146. name: '已出库',
  147. value: '4',
  148. disabled: false
  149. }
  150. ],
  151. screen: false,
  152. column: [{
  153. text: '计划',
  154. value: '1'
  155. }, {
  156. text: '待出库',
  157. value: '2'
  158. }, {
  159. text: '出库中',
  160. value: '3'
  161. }, {
  162. text: '已出库',
  163. value: '4'
  164. }],
  165. show: false,
  166. suitcase: false,
  167. choiceState: false,
  168. underline: '0',
  169. mode: 'range',
  170. queryParams: {
  171. pageNum: 1, //页数
  172. pageSize: 10, //几条数据
  173. },
  174. deptName:'',
  175. status: 'loadmore',
  176. iconType: 'flower',
  177. loadText: {
  178. loadmore: '轻轻上拉',
  179. loading: '努力加载中',
  180. nomore: '实在没有了'
  181. },
  182. total: 0,
  183. }
  184. },
  185. onReachBottom() {
  186. this.status = 'loading'
  187. if (this.lisi.length < this.total) {
  188. this.queryParams.pageNum++
  189. this.query()
  190. } else {
  191. this.status = 'nomore'
  192. }
  193. },
  194. created() {
  195. this.deptName = uni.getStorageSync('deptName')
  196. uni.showLoading({
  197. title: '加载中'
  198. });
  199. setTimeout(function() {
  200. uni.hideLoading();
  201. }, 1000);
  202. // #ifdef MP-WEIXIN
  203. if (wx.hideHomeButton) {
  204. wx.hideHomeButton();
  205. }
  206. // #endif
  207. },
  208. onShow() {
  209. this.whole()
  210. this.clientList = []
  211. this.$u.get('/basicdata/corps/list').then(res=>{
  212. for(let item in res.rows){
  213. this.clientList.push({
  214. value: res.rows[item].fId,
  215. label: res.rows[item].fName
  216. })
  217. }
  218. })
  219. },
  220. methods: {
  221. confirmReset(){
  222. this.screenName = ''
  223. this.screenValue = ''
  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. confirmCompletion(){
  237. this.lisi = []
  238. this.queryParams = {
  239. pageNum: 1,
  240. pageSize: 10,
  241. fShipper:this.fShipper,
  242. fItemsStatus:this.screenValue,
  243. timeInterval:this.entryDate.split(',')
  244. }
  245. if(this.entryDate){
  246. this.queryParams.timeInterval = [this.queryParams.timeInterval[0] + ' ' + '00:00:00', this.queryParams.timeInterval[1] + ' ' + '23:59:59']
  247. }else{
  248. delete this.queryParams.timeInterval
  249. }
  250. if(this.fCorpid.value) this.queryParams.fCorpid = this.fCorpid.value
  251. this.screen = false
  252. this.query()
  253. },
  254. // 选中某个单选框时,由radio时触发
  255. radioChange(e) {
  256. for(let item in this.screenList){
  257. if(e == this.screenList[item].name){
  258. this.screenName = this.screenList[item].name
  259. this.screenValue = this.screenList[item].value
  260. }
  261. }
  262. },
  263. // 选中任一radio时,由radio-group触发
  264. radioGroupChange(e) {
  265. for(let item in this.screenList){
  266. if(e == this.screenList[item].name){
  267. this.screenName = this.screenList[item].name
  268. this.screenValue = this.screenList[item].value
  269. }
  270. }
  271. },
  272. entryScreen(e){
  273. this.entryDate = e.startDate+','+e.endDate
  274. },
  275. call_phone(bphone) {
  276. uni.makePhoneCall({
  277. phoneNumber: '' + bphone, // 手机号
  278. });
  279. },
  280. thatOne(index) {
  281. // console.log(index)
  282. // console.log(this.column[index].value)
  283. this.lisi = []
  284. this.queryParams = {}
  285. this.queryParams = {
  286. pageNum: 1,
  287. pageSize: 10,
  288. fItemsStatus: this.column[index].value
  289. }
  290. this.query()
  291. },
  292. whole() {
  293. this.underline = '0'
  294. this.lisi = []
  295. this.queryParams = []
  296. this.queryParams = {
  297. pageNum: 1,
  298. pageSize: 10
  299. }
  300. this.query()
  301. },
  302. custom(res) {
  303. // console.log(res)
  304. this.lisi = []
  305. this.queryParams = []
  306. this.queryParams = {
  307. pageNum: 1,
  308. pageSize: 10,
  309. fMblno: res
  310. }
  311. // console.log(this.queryParams)
  312. this.query()
  313. },
  314. orderdate(e) {
  315. this.lisi = []
  316. this.queryParams = []
  317. this.queryParams = {
  318. pageNum: 1,
  319. pageSize: 10,
  320. timeInterval:[e.startDate + ' ' + '00:00:00',e.endDate + ' ' + '23:59:59']
  321. }
  322. this.query()
  323. },
  324. suitcaSe(e) {
  325. // console.log(e)
  326. this.lisi = []
  327. this.queryParams = []
  328. this.queryParams = {
  329. pageNum: 1,
  330. pageSize: 10,
  331. timeInterval:[e.startDate + ' ' + '00:00:00',e.endDate + ' ' + '23:59:59']
  332. }
  333. this.query()
  334. },
  335. query() {
  336. this.$u.get('/warehouseBusiness/applets/outStockList',this.queryParams).then(res => {
  337. console.log(res)
  338. if (res.code == 500) {
  339. uni.showToast({
  340. icon: 'none',
  341. title: res.msg,
  342. position: "bottom"
  343. })
  344. } else if (res.code == 200) {
  345. this.total = res.total
  346. this.lisi = this.lisi.concat(res.rows)
  347. // this.lisi = res.rows
  348. this.status = 'nomore'
  349. }
  350. }).catch(err => {
  351. uni.showToast({
  352. icon: 'none',
  353. title: '网络繁忙请稍后再试',
  354. position: "bottom"
  355. })
  356. })
  357. },
  358. viewDetails(item) {
  359. let data = {
  360. fId:item.fId
  361. }
  362. uni.navigateTo({
  363. url: './detailed?item=' + JSON.stringify(data)
  364. });
  365. },
  366. }
  367. }
  368. </script>
  369. <style scoped lang="scss">
  370. .basic {
  371. width: 94%;
  372. margin: 10rpx auto;
  373. display: flex;
  374. justify-content: space-between;
  375. }
  376. .basic>view {
  377. margin-bottom: 10rpx;
  378. }
  379. .basic>view:nth-child(1) {
  380. color: #797979;
  381. }
  382. .view {
  383. width: 96%;
  384. margin: 20rpx auto;
  385. display: flex;
  386. justify-content: space-between
  387. }
  388. .line {
  389. width: 92%;
  390. margin: 0 auto;
  391. }
  392. .oddnumber {
  393. width: 96%;
  394. margin: 20rpx auto;
  395. margin-bottom: 20rpx;
  396. }
  397. .ordertop {
  398. width: 96%;
  399. background-color: #fff;
  400. margin: 20rpx auto;
  401. border-radius: 20rpx;
  402. padding-top: 20rpx;
  403. box-shadow: 0px 0px 8px 0px rgba(165, 189, 251, 0.4);
  404. padding-bottom: 10rpx;
  405. }
  406. .ordertop>view:nth-child(1) {
  407. width: 98%;
  408. margin-bottom: 60rpx;
  409. }
  410. .search {
  411. width: 96%;
  412. margin: 10rpx auto;
  413. }
  414. .iconblue {
  415. width: 10rpx;
  416. height: 45rpx;
  417. float: left;
  418. background-color: #3a63cf;
  419. margin-right: 10rpx;
  420. }
  421. .license {
  422. float: left;
  423. font-size: 32rpx;
  424. }
  425. .various {
  426. float: right;
  427. width: 150rpx;
  428. border: 2rpx solid #3a63cf;
  429. text-align: center;
  430. border-radius: 100rpx;
  431. color: #3a63cf;
  432. }
  433. .condition {
  434. background-color: #1669e6;
  435. height: 60rpx;
  436. }
  437. .conditionone {
  438. width: 92%;
  439. height: 44rpx;
  440. margin: 0rpx auto;
  441. display: flex;
  442. justify-content: space-between;
  443. color: #fff;
  444. }
  445. .conditionone>view {
  446. color: #e6e8e8;
  447. }
  448. </style>