index.vue 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237
  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: 200px"
  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: 200px"
  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-form-item label="空重" prop="fUpdateef">
  36. <el-select
  37. v-model="queryParams.fUpdateef"
  38. style="width: 200px"
  39. placeholder="请输入空重"
  40. clearable
  41. size="small">
  42. <el-option
  43. v-for="item in this.updateEFOptions"
  44. :key="item.dictValue"
  45. :label="item.dictLabel"
  46. :value="item.dictValue"/>
  47. </el-select>
  48. </el-form-item>
  49. <el-form-item label="箱状态" prop="fCntrstatus">
  50. <el-select
  51. v-model="queryParams.fCntrstatus"
  52. style="width: 200px"
  53. placeholder="请选择状态"
  54. clearable
  55. size="small"
  56. >
  57. <el-option
  58. v-for="item in this.cntrstatusOptions"
  59. :key="item.dictValue"
  60. :label="item.dictLabel"
  61. :value="item.dictValue"/>
  62. </el-select>
  63. </el-form-item>
  64. <el-form-item label="最新时间" prop="cLoadDate">
  65. <el-date-picker
  66. v-model="queryParams.cLoadDate"
  67. type="daterange"
  68. value-format="yyyy-MM-dd"
  69. range-separator="至"
  70. start-placeholder="开始日期"
  71. end-placeholder="结束日期"
  72. style="width: 250px"
  73. >
  74. </el-date-picker>
  75. </el-form-item>
  76. </el-row>
  77. </el-form>
  78. <el-row :gutter="10" class="mb8">
  79. <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
  80. <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
  81. <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
  82. </el-row>
  83. <el-table v-loading="loading" :data="corpsList" @selection-change="handleSelectionChange">
  84. <el-table-column type="selection" width="55" align="center" />
  85. <el-table-column type="index" width="55" label="行号" align="center" />
  86. <el-table-column :show-overflow-tooltip="true" label="提单号" align="center" prop="fMblno" width="120px"/>
  87. <el-table-column :show-overflow-tooltip="true" label="箱号" align="center" prop="fNo" width="120px"/>
  88. <el-table-column label="铅封号" align="center" prop="" width="120px"/>
  89. <el-table-column :show-overflow-tooltip="true" label="箱型" align="center" prop="typeidName" width="100px"
  90. />
  91. <el-table-column :show-overflow-tooltip="true" label="尺寸" align="center" width="100px" prop="cntrsizeName" />
  92. <el-table-column :show-overflow-tooltip="true" label="箱主" align="center" prop="ownerName" />
  93. <el-table-column :show-overflow-tooltip="true" label="船名" align="center" prop="fVsl" />
  94. <el-table-column label="航次" align="center" prop="fVoy" />
  95. <el-table-column label="最新时间" align="center" prop="fUpdatetime" width="100"/>
  96. <el-table-column label="地点" align="center" prop="addressName" width="100px"/>
  97. <el-table-column label="空重" align="center" prop="updateEFName" width="100px"/>
  98. <el-table-column label="箱状态" align="center" prop="cntrstatusName" width="100px"/>
  99. <el-table-column label="操作" align="center" min-width="120px" fixed="right">
  100. <template slot-scope="scope">
  101. <el-button
  102. size="mini"
  103. type="text"
  104. icon="el-icon-delete"
  105. v-hasPermi="['shipping:cntrtracking:remove']"
  106. @click="handleDelete(scope.row)"
  107. >移除</el-button>
  108. </template>
  109. </el-table-column>
  110. </el-table>
  111. <pagination
  112. v-show="total>0"
  113. :total="total"
  114. :page.sync="queryParams.pageNum"
  115. :limit.sync="queryParams.pageSize"
  116. @pagination="getList"
  117. />
  118. </div>
  119. </template>
  120. <script>
  121. import { listCorps, getaddress, delCorps } from "@/api/kaihe/containerNews/historyBoxNews";
  122. export default {
  123. name: "historyBoxNews",
  124. components: {
  125. },
  126. data() {
  127. return {
  128. //状态字典表
  129. cntrstatusOptions:[],
  130. //空重字典表
  131. updateEFOptions:[],
  132. //默认显示第一行
  133. queryParamsHidden:false,
  134. //模糊下拉查询地点
  135. addressOptions:[],
  136. //全屏放大
  137. dialogFull:false,
  138. contactList:[],
  139. // 遮罩层
  140. loading: true,
  141. // 选中数组
  142. ids: [],
  143. // 非单个禁用
  144. single: true,
  145. // 非多个禁用
  146. multiple: true,
  147. // 显示搜索条件
  148. showSearch: true,
  149. // 总条数
  150. total: 0,
  151. // 客户详情表格数据
  152. corpsList: [],
  153. // 查询参数
  154. queryParams: {
  155. pageNum: 1,
  156. pageSize: 10,
  157. fNo:null,
  158. fUpdateaddress:null,
  159. cLoadDate:null,
  160. fUpdateef:null,
  161. fCntrstatus:null
  162. },
  163. };
  164. },
  165. created() {
  166. this.getList();
  167. this.addressMethod()
  168. this.getDicts("f_updateEF").then(response => {
  169. this.updateEFOptions = response.data;
  170. });
  171. this.getDicts("f_cntrstatus").then(response => {
  172. this.cntrstatusOptions = response.data;
  173. });
  174. },
  175. methods: {
  176. /** 删除按钮操作 */
  177. handleDelete(row) {
  178. const fIds = row.fId || this.ids;
  179. this.$confirm('是否确认删除客户详情编号为"' + fIds + '"的数据项?', "警告", {
  180. confirmButtonText: "确定",
  181. cancelButtonText: "取消",
  182. type: "warning"
  183. }).then(function() {
  184. return delCorps(fIds);
  185. }).then(() => {
  186. this.getList();
  187. this.msgSuccess("删除成功");
  188. })
  189. },
  190. //模糊查询地点
  191. addressMethod(){
  192. let queryParams = { pageNum: 1,};
  193. getaddress(queryParams).then(response=>{
  194. this.addressOptions = response.rows
  195. })
  196. },
  197. /** 查询客户详情列表 */
  198. getList() {
  199. this.loading = true;
  200. listCorps(this.queryParams).then(response => {
  201. this.corpsList = response.rows;
  202. this.total = response.total;
  203. this.loading = false;
  204. });
  205. },
  206. /** 搜索按钮操作 */
  207. handleQuery() {
  208. this.queryParams.pageNum = 1;
  209. this.getList();
  210. },
  211. /** 重置按钮操作 */
  212. resetQuery() {
  213. this.resetForm("queryForm");
  214. this.handleQuery();
  215. },
  216. // 多选框选中数据
  217. handleSelectionChange(selection) {
  218. this.ids = selection.map(item => item.fId)
  219. this.single = selection.length!==1
  220. this.multiple = !selection.length
  221. },
  222. }
  223. };
  224. </script>
  225. <style lang="scss" scoped>
  226. </style>