index.vue 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183
  1. <template>
  2. <div class="app-container">
  3. <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
  4. <el-row>
  5. <el-form-item label="箱号" prop="fNo">
  6. <el-input
  7. v-model="queryParams.fNo"
  8. style="width: 240px"
  9. placeholder="请输入箱号"
  10. clearable
  11. size="small"
  12. @keyup.enter.native="handleQuery"
  13. />
  14. </el-form-item>
  15. <el-form-item label="地点" prop="fUpdateaddress">
  16. <el-select
  17. style="width: 240px"
  18. v-model="queryParams.fUpdateaddress"
  19. placeholder="请输入地点"
  20. clearable
  21. size="small"
  22. filterable
  23. :remote-method="addressMethod"
  24. >
  25. <el-option
  26. v-for="item in this.addressOptions"
  27. :key="item.fId"
  28. :label="item.fName"
  29. :value="item.fId">
  30. <span style="float: left; color: #8492a6; font-size: 13px">{{ item.typesName }}</span>
  31. <span style="float: right;">{{ item.fName }}</span>
  32. </el-option>
  33. </el-select>
  34. </el-form-item>
  35. </el-row>
  36. </el-form>
  37. <el-row :gutter="10" class="mb8">
  38. <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
  39. <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
  40. <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
  41. </el-row>
  42. <el-table v-loading="loading" :data="corpsList" @selection-change="handleSelectionChange">
  43. <el-table-column type="selection" width="55" align="center" />
  44. <el-table-column type="index" width="55" label="行号" align="center" />
  45. <el-table-column :show-overflow-tooltip="true" label="提单号" align="center" prop="fMblno" width="120px"/>
  46. <el-table-column :show-overflow-tooltip="true" label="箱号" align="center" prop="fNo" width="120px"/>
  47. <el-table-column label="铅封号" align="center" prop="" width="120px"/>
  48. <el-table-column :show-overflow-tooltip="true" label="箱型" align="center" prop="typeidName" width="100px"
  49. />
  50. <el-table-column :show-overflow-tooltip="true" label="尺寸" align="center" width="100px" prop="cntrsizeName" />
  51. <el-table-column :show-overflow-tooltip="true" label="箱主" align="center" prop="ownerName" />
  52. <el-table-column :show-overflow-tooltip="true" label="船名" align="center" prop="fVsl" />
  53. <el-table-column label="航次" align="center" prop="fVoy" />
  54. <el-table-column label="最新时间" align="center" prop="fUpdatetime" width="100"/>
  55. <el-table-column label="地点" align="center" prop="addressName" width="100px"/>
  56. <el-table-column label="空重" align="center" prop="updateEFName" width="100px"/>
  57. <el-table-column label="箱状态" align="center" prop="cntrstatusName" width="100px"/>
  58. <el-table-column label="操作" align="center" min-width="120px" fixed="right">
  59. <template slot-scope="scope">
  60. <el-button
  61. size="mini"
  62. type="text"
  63. icon="el-icon-delete"
  64. v-hasPermi="['shipping:cntrtracking:remove']"
  65. @click="handleDelete(scope.row)"
  66. >移除</el-button>
  67. </template>
  68. </el-table-column>
  69. </el-table>
  70. <pagination
  71. v-show="total>0"
  72. :total="total"
  73. :page.sync="queryParams.pageNum"
  74. :limit.sync="queryParams.pageSize"
  75. @pagination="getList"
  76. />
  77. </div>
  78. </template>
  79. <script>
  80. import { listCorps, getaddress, delCorps } from "@/api/kaihe/containerNews/historyBoxNews";
  81. export default {
  82. name: "historyBoxNews",
  83. components: {
  84. },
  85. data() {
  86. return {
  87. //默认显示第一行
  88. queryParamsHidden:false,
  89. //模糊下拉查询地点
  90. addressOptions:[],
  91. //全屏放大
  92. dialogFull:false,
  93. contactList:[],
  94. // 遮罩层
  95. loading: true,
  96. // 选中数组
  97. ids: [],
  98. // 非单个禁用
  99. single: true,
  100. // 非多个禁用
  101. multiple: true,
  102. // 显示搜索条件
  103. showSearch: true,
  104. // 总条数
  105. total: 0,
  106. // 客户详情表格数据
  107. corpsList: [],
  108. // 查询参数
  109. queryParams: {
  110. pageNum: 1,
  111. pageSize: 10,
  112. fNo:null,
  113. fUpdateaddress:null
  114. },
  115. };
  116. },
  117. created() {
  118. this.getList();
  119. this.addressMethod()
  120. },
  121. methods: {
  122. /** 删除按钮操作 */
  123. handleDelete(row) {
  124. const fIds = row.fId || this.ids;
  125. this.$confirm('是否确认删除客户详情编号为"' + fIds + '"的数据项?', "警告", {
  126. confirmButtonText: "确定",
  127. cancelButtonText: "取消",
  128. type: "warning"
  129. }).then(function() {
  130. return delCorps(fIds);
  131. }).then(() => {
  132. this.getList();
  133. this.msgSuccess("删除成功");
  134. })
  135. },
  136. //模糊查询地点
  137. addressMethod(){
  138. let queryParams = { pageNum: 1,};
  139. getaddress(queryParams).then(response=>{
  140. this.addressOptions = response.rows
  141. })
  142. },
  143. /** 查询客户详情列表 */
  144. getList() {
  145. this.loading = true;
  146. listCorps(this.queryParams).then(response => {
  147. this.corpsList = response.rows;
  148. this.total = response.total;
  149. this.loading = false;
  150. });
  151. },
  152. /** 搜索按钮操作 */
  153. handleQuery() {
  154. this.queryParams.pageNum = 1;
  155. this.getList();
  156. },
  157. /** 重置按钮操作 */
  158. resetQuery() {
  159. this.resetForm("queryForm");
  160. this.handleQuery();
  161. },
  162. // 多选框选中数据
  163. handleSelectionChange(selection) {
  164. this.ids = selection.map(item => item.fId)
  165. this.single = selection.length!==1
  166. this.multiple = !selection.length
  167. },
  168. }
  169. };
  170. </script>
  171. <style lang="scss">
  172. </style>