shippingInformation.vue 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175
  1. <!-- 船期信息 -->
  2. <template>
  3. <view>
  4. <!-- 搜索区 -->
  5. <view style="width: 96%;margin: 10rpx auto;box-shadow: 0px 0px 8px 0px rgba(165, 189, 251, 0.4);padding: 0 3% 0 3%;border-radius: 5rpx;">
  6. <!-- <u-field v-model="polId" label="起始港" placeholder="请选择起始港" type="select" @click="destination = true"></u-field> -->
  7. <u-form-item label="起始港:" label-width="110rpx" style="float: left;width: 50%;">
  8. <u-input v-model="list.polId" type="select" placeholder="请选择起始港" @click="destination = true" />
  9. </u-form-item>
  10. <u-action-sheet :list="destinationList" v-model="destination" @click="destinationMethod"></u-action-sheet>
  11. <u-form-item label="目的港:" label-width="110rpx">
  12. <u-input v-model="list.podId" type="select" placeholder="请选择目的港" @click="destinationtwo = true" />
  13. </u-form-item>
  14. <u-action-sheet :list="destinationList" v-model="destinationtwo" @click="destinationMethodTwo">
  15. </u-action-sheet>
  16. <u-form-item label="开航日:" label-width="110rpx">
  17. <u-input v-model="list.sailingDay" :disabled="true" type="select" placeholder="请选择日期" @click="show = true" />
  18. </u-form-item>
  19. <u-calendar max-date="2050" v-model="show" mode="range" @change="change"></u-calendar>
  20. </view>
  21. <view
  22. style="width: 100%;position:fixed; bottom:0;background-color: #FFFFFF;padding-left: 20px;padding-right: 20px;padding-bottom: 30rpx;">
  23. <u-button type="primary" @click="submit">重新查询</u-button>
  24. </view>
  25. <view
  26. v-if="dataList.length === 0"
  27. style="width: 96%;height: 650rpx;margin: 0 auto;border-radius: 10rpx;">
  28. <u-empty text="无符合条件的航期" mode="search"></u-empty>
  29. </view>
  30. <view style="box-shadow: 0px 0px 8px 0px rgba(165, 189, 251, 0.4);width: 96%;border-top-right-radius: 10rpx;margin: 0 auto;padding-top: 10rpx;"
  31. v-for="(item,index) in dataList" :key="index">
  32. <span style="width: 10rpx;height: 40rpx;background-color: #2979ff;display: block;float: left;margin-top: 10rpx;"></span>
  33. <h4 style="width: 140rpx;border-radius: 200rpx;text-align: center;color: #2979ff;border: 2rpx solid #1785FF;float: right;margin-right: 10rpx;margin-top: 10rpx;">{{item.fBilltype}}</h4>
  34. <view style="width: 90%;margin: 0 auto;margin: 0 auto;">
  35. <view style="display: flex;justify-content: space-between;height: 60rpx;line-height: 60rpx;">
  36. <h4>{{item.fLineName}}</h4>
  37. </view>
  38. <view style="display: flex;justify-content: space-between;height: 60rpx;line-height: 60rpx;">
  39. <h4>{{item.fCorpName?item.fCorpName:'无船公司'}}</h4>
  40. <h4>{{item.fBookagentName?item.fBookagentName:'无订舱代理'}}</h4>
  41. <h4>{{item.fSailingSchedule ? item.fSailingSchedule:'无日期'}}</h4>
  42. </view>
  43. <view style="display: flex;justify-content: space-between;border-top: 1rpx solid #eff4ff;height: 60rpx;line-height: 60rpx;">
  44. <h4>20GP</h4>
  45. <h4>40GP</h4>
  46. <h4>40HC</h4>
  47. <h4>45HC</h4>
  48. <h4>20RH</h4>
  49. <h4>40RH</h4>
  50. </view>
  51. <view style="border-top: 1rpx solid #eff4ff;height: 60rpx;line-height: 60rpx;">
  52. <span v-if="item.seapriceItem[0]" style="display: flex;justify-content: space-between;">
  53. <h4>{{item.seapriceItem[0].fSpecification1}}</h4>
  54. <h4>{{item.seapriceItem[0].fSpecification2}}</h4>
  55. <h4>{{item.seapriceItem[0].fSpecification3}}</h4>
  56. <h4>{{item.seapriceItem[0].fSpecification4}}</h4>
  57. <h4>{{item.seapriceItem[0].fSpecification5}}</h4>
  58. <h4>{{item.seapriceItem[0].fSpecification6}}</h4>
  59. </span>
  60. <span v-else>
  61. <h2 style="text-align: center;">无价格</h2>
  62. </span>
  63. </view>
  64. <view style="width: 100%;margin: 0 auto;height: 80rpx;margin: 0 auto;line-height: 80rpx;border-top: 1rpx solid #eff4ff;" @click="expenseDetails(item)">
  65. <view style="float: left;"><h3>查看海运费</h3></view>
  66. <view style="float: right;"><u-icon name="arrow-right"></u-icon></view>
  67. </view>
  68. </view>
  69. </view>
  70. <u-loadmore :status="status" :icon-type="iconType" :load-text="loadText" />
  71. </view>
  72. </template>
  73. <script>
  74. export default {
  75. data() {
  76. return {
  77. show: false,
  78. loadText: {
  79. loadmore: '轻轻上拉',
  80. loading: '努力加载中',
  81. nomore: '实在没有了'
  82. },
  83. iconType: 'flower',
  84. status: 'loadmore',
  85. mode: 'range',
  86. list:{},
  87. form: {
  88. fQueryFrom: 'app',
  89. pageNum: 1,
  90. pageSize: 10,
  91. },
  92. dataList:[],
  93. destination: false,
  94. destinationtwo: false,
  95. destinationList: [],
  96. total:0
  97. }
  98. },
  99. onLoad(option) {
  100. this.form = JSON.parse(option.form)
  101. this.list = JSON.parse(option.list)
  102. this.submit()
  103. },
  104. onReachBottom() {
  105. this.status = 'loading'
  106. if (this.dataList.length < this.total) {
  107. this.form.pageNum++
  108. this.query()
  109. } else {
  110. this.status = 'nomore'
  111. }
  112. },
  113. created() {
  114. this.destinationList = []
  115. this.$u.get('/shipping/address/selectPortName').then(res => {
  116. console.log(res)
  117. for (let item in res.rows) {
  118. this.destinationList.push({
  119. value: res.rows[item].fId,
  120. text: res.rows[item].fName
  121. })
  122. }
  123. })
  124. },
  125. methods: {
  126. query() {
  127. this.$u.get('/warehouse/seaprice/queryApp',this.form).then(res=>{
  128. this.dataList = this.dataList.concat(res.rows)
  129. this.total = res.total
  130. if (res.total === 0) this.status = 'nomore'
  131. })
  132. },
  133. change(e) {
  134. console.log(e)
  135. this.form.fValiddateBegin = e.startDate
  136. this.form.fValiddateEnd = e.endDate
  137. this.list.sailingDay = e.startDate + ' - ' + e.endDate
  138. },
  139. destinationMethod(index) {
  140. this.list.polId = this.destinationList[index].text
  141. this.form.polId = this.destinationList[index].value
  142. },
  143. destinationMethodTwo(index) {
  144. this.list.podId = this.destinationList[index].text
  145. this.form.podId = this.destinationList[index].value
  146. },
  147. submit(){
  148. // if (!this.form.polId) return this.textTips('请选择起始港')
  149. // if (!this.form.podId) return this.textTips('请选择目的港')
  150. // if (!this.form.fValiddateBegin || !this.form.fValiddateEnd) return this.textTips('请选择开航日期')
  151. this.dataList = []
  152. this.$u.get('/warehouse/seaprice/queryApp',this.form).then(res=>{
  153. // console.log(res)
  154. this.dataList = this.dataList.concat(res.rows)
  155. })
  156. },
  157. expenseDetails(item){
  158. this.$u.route('/pages/home/freightCalculation/freightCalculation',{
  159. form:JSON.stringify(item)
  160. });
  161. },
  162. textTips(text){
  163. uni.showToast({
  164. icon: 'none',
  165. title: text,
  166. position: "center"
  167. })
  168. },
  169. }
  170. }
  171. </script>
  172. <style scoped lang="scss">
  173. </style>