shippingInformation.vue 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  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 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;"
  26. v-for="(item,index) in dataList" :key="index">
  27. <span style="width: 10rpx;height: 40rpx;background-color: #2979ff;display: block;float: left;margin-top: 10rpx;"></span>
  28. <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>
  29. <view style="width: 90%;margin: 0 auto;margin: 0 auto;">
  30. <view style="display: flex;justify-content: space-between;height: 60rpx;line-height: 60rpx;">
  31. <h4>{{item.fLineName}}</h4>
  32. </view>
  33. <view style="display: flex;justify-content: space-between;height: 60rpx;line-height: 60rpx;">
  34. <h4>{{item.fCorpName?item.fCorpName:'无船公司'}}</h4>
  35. <h4>{{item.fBookagentName?item.fBookagentName:'无订舱代理'}}</h4>
  36. <h4>{{item.fSailingSchedule ? item.fSailingSchedule:'无日期'}}</h4>
  37. </view>
  38. <view style="display: flex;justify-content: space-between;border-top: 1rpx solid #eff4ff;height: 60rpx;line-height: 60rpx;">
  39. <h4>20GP</h4>
  40. <h4>40GP</h4>
  41. <h4>40HC</h4>
  42. <h4>45HC</h4>
  43. <h4>20RH</h4>
  44. <h4>40RH</h4>
  45. </view>
  46. <view style="border-top: 1rpx solid #eff4ff;height: 60rpx;line-height: 60rpx;">
  47. <span v-if="item.seapriceItem[0]" style="display: flex;justify-content: space-between;">
  48. <h4>{{item.seapriceItem[0].fSpecification1}}</h4>
  49. <h4>{{item.seapriceItem[0].fSpecification2}}</h4>
  50. <h4>{{item.seapriceItem[0].fSpecification3}}</h4>
  51. <h4>{{item.seapriceItem[0].fSpecification4}}</h4>
  52. <h4>{{item.seapriceItem[0].fSpecification5}}</h4>
  53. <h4>{{item.seapriceItem[0].fSpecification6}}</h4>
  54. </span>
  55. <span v-else>
  56. <h2 style="text-align: center;">无价格</h2>
  57. </span>
  58. </view>
  59. <view style="width: 100%;margin: 0 auto;height: 80rpx;margin: 0 auto;line-height: 80rpx;border-top: 1rpx solid #eff4ff;" @click="expenseDetails(item)">
  60. <view style="float: left;"><h3>查看海运费</h3></view>
  61. <view style="float: right;"><u-icon name="arrow-right"></u-icon></view>
  62. </view>
  63. </view>
  64. </view>
  65. </view>
  66. </template>
  67. <script>
  68. export default {
  69. data() {
  70. return {
  71. show: false,
  72. mode: 'range',
  73. list:{},
  74. form: {
  75. fQueryFrom: 'app',
  76. pageNum: 1,
  77. pageSize: 10,
  78. },
  79. dataList:[],
  80. destination: false,
  81. destinationtwo: false,
  82. destinationList: []
  83. }
  84. },
  85. onLoad(option) {
  86. // this.form = JSON.parse(option.form)
  87. this.list = JSON.parse(option.list)
  88. this.submit()
  89. },
  90. created() {
  91. this.destinationList = []
  92. this.$u.get('/shipping/address/selectPortName').then(res => {
  93. console.log(res)
  94. for (let item in res.rows) {
  95. this.destinationList.push({
  96. value: res.rows[item].fId,
  97. text: res.rows[item].fName
  98. })
  99. }
  100. })
  101. },
  102. methods: {
  103. change(e) {
  104. console.log(e)
  105. this.form.fValiddateBegin = e.startDate
  106. this.form.fValiddateEnd = e.endDate
  107. this.list.sailingDay = e.startDate + ' - ' + e.endDate
  108. },
  109. destinationMethod(index) {
  110. this.list.polId = this.destinationList[index].text
  111. this.form.polId = this.destinationList[index].value
  112. },
  113. destinationMethodTwo(index) {
  114. this.list.podId = this.destinationList[index].text
  115. this.form.podId = this.destinationList[index].value
  116. },
  117. submit(){
  118. // if (!this.form.polId) return this.textTips('请选择起始港')
  119. // if (!this.form.podId) return this.textTips('请选择目的港')
  120. // if (!this.form.fValiddateBegin || !this.form.fValiddateEnd) return this.textTips('请选择开航日期')
  121. this.$u.get('/warehouse/seaprice/queryApp',this.form).then(res=>{
  122. console.log(res)
  123. this.dataList = res.rows
  124. })
  125. },
  126. expenseDetails(item){
  127. console.log(item)
  128. // this.$u.route('/pages/home/freightCalculation/freightCalculation');
  129. },
  130. textTips(text){
  131. uni.showToast({
  132. icon: 'none',
  133. title: text,
  134. position: "center"
  135. })
  136. },
  137. }
  138. }
  139. </script>
  140. <style scoped lang="scss">
  141. </style>