unPlaceShip.vue 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  1. /**
  2. // author:jiana
  3. // time:2025-04-23
  4. // desc:运单管理
  5. */
  6. <template>
  7. <div class="unPlaceShip">
  8. <Card>
  9. <!-- 筛选 -->
  10. <Row :gutter="8">
  11. <Col span="10">
  12. 供应商名称 <Input v-model="filtInfoData.shopName" placeholder="请输入供应商名称" style="width:80%"/>
  13. </Col>
  14. <Col span="2">
  15. <Button type="primary" @click="getData">查询</Button>
  16. </Col>
  17. <Col span="2">
  18. <Button @click="resetData">重置</Button>
  19. </Col>
  20. </Row>
  21. </Card>
  22. <Card style="margin-top:20px;">
  23. <Row>
  24. <Col span="12">
  25. 已拒绝列表
  26. </Col>
  27. </Row>
  28. <!-- 表格部分 -->
  29. <el-table v-loading="loading" :data="TabData.data" border style="width: 100%;margin-top:20px;">
  30. <el-table-column label="供应商名称" prop="supplierName" width="160" align="center"></el-table-column>
  31. <el-table-column label="仓库名称" width="150" prop="name" align="center"/>
  32. <el-table-column label="仓库地址" width="150" prop="address" align="center"/>
  33. <el-table-column label="经度" width="150" prop="longitude" align="center"></el-table-column>
  34. <el-table-column label="维度" prop="latitude" width="150" align="center"></el-table-column>
  35. <el-table-column label="添加时间" width="160" align="center">
  36. <template #default="scope">
  37. {{ moment(scope.row.addTime).format('yyyy-MM-DD hh:mm:ss') || '暂无'}}
  38. </template>
  39. </el-table-column>
  40. <el-table-column label="操作" width="150" fixed="right" align="center">
  41. <template #default="scope">
  42. <Button class="opt_btn" size="small" type="primary" ghost @click="lookInfo(scope.row)">查看地址</Button>
  43. </template>
  44. </el-table-column>
  45. </el-table>
  46. <!-- 分页 -->
  47. <div class="page_style">
  48. <Page :total="TabData.total" :model-value="currentPage" show-elevator show-total @on-change="changePage" />
  49. </div>
  50. </Card>
  51. <!-- 查看地址 -->
  52. <Modal v-model="showInfo" width="60%" title="查看地址">
  53. <mapMark v-if="showInfo" :markInfo="markInfo"></mapMark>
  54. </Modal>
  55. </div>
  56. </template>
  57. <script>
  58. import { defineComponent, ref ,reactive, onMounted} from 'vue'
  59. import { tms } from '@/request/api'
  60. import { Message,Modal,Spin,Input } from 'view-ui-plus'
  61. import moment from 'moment'
  62. import {useRoute} from 'vue-router'
  63. import mapMark from "./mapMark.vue"
  64. export default defineComponent({
  65. components:{
  66. mapMark
  67. },
  68. setup() {
  69. const route = useRoute()
  70. let filtInfoData = reactive({ // 搜索
  71. limit:10,offset:0,status:2,shopName:''
  72. })
  73. let TabData = ref([]) // 列表数据
  74. let loading = ref(false)
  75. //获取列表内容
  76. async function getData(){
  77. loading.value = true
  78. await tms.warehouseList(filtInfoData).then(res =>{
  79. if (res.code == 0) {
  80. TabData.value = res
  81. }
  82. })
  83. loading.value = false
  84. }
  85. //重置
  86. function resetData(){
  87. filtInfoData.offset = 0
  88. filtInfoData.limit = 10
  89. filtInfoData.shopName = ''
  90. filtInfoData.status = 2
  91. getData()
  92. }
  93. let currentPage = ref(1)
  94. //更改页码
  95. function changePage (page) {
  96. if(TabData.value.limit){
  97. filtInfoData.offset = (page -1) * TabData.value.limit //更新偏移量
  98. currentPage = page //切换当前页码
  99. getData()
  100. }
  101. }
  102. const showInfo = ref(false)
  103. let markInfo = reactive({
  104. longitude:'',latitude:''
  105. })
  106. //查看地址
  107. function lookInfo(data){
  108. markInfo.longitude = data.longitude
  109. markInfo.latitude = data.latitude
  110. showInfo.value = true
  111. }
  112. onMounted(()=>{
  113. getData()
  114. })
  115. return {
  116. getData,changePage,moment,TabData,filtInfoData,
  117. loading,resetData,showInfo,lookInfo,markInfo
  118. }
  119. },
  120. })
  121. </script>
  122. <style lang="scss" scoped>
  123. .unPlaceShip{
  124. padding: 1em;
  125. .opt_btn{margin-bottom:3px; margin-right: 3px;}
  126. .page_style{
  127. text-align: right; margin-top: 1em;
  128. // background-color: var(--system-container-background);
  129. }
  130. }
  131. </style>