shippingInformation.vue 7.9 KB

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