正在显示
3 个修改的文件
包含
708 行增加
和
0 行删除
src/api/trn.js
0 → 100644
| 1 | +import http from './http.js' | ||
| 2 | +let baseUrl = 'wlpt-nmms-manage/trans' | ||
| 3 | + | ||
| 4 | + | ||
| 5 | + | ||
| 6 | + | ||
| 7 | + | ||
| 8 | + | ||
| 9 | +export const selectTrans = params => { return http.get(`${baseUrl}/selectTrans`, params); }; | ||
| 10 | +export const delTrans = params => { return http.post(`${baseUrl}/delTrans`, params); }; | ||
| 11 | +export const batchSend = params => { return http.post(`${baseUrl}/batchSend`, params); }; | ||
| 12 | +export const addTrans = params => { return http.post(`${baseUrl}/addTrans`, params); }; | ||
| 13 | +export const ediTrans = params => { return http.post(`${baseUrl}/ediTrans`, params); }; | ||
| 14 | +export const send = params => { return http.post(`${baseUrl}/send`, params); }; | ||
| 15 | + | ||
| 16 | + | ||
| 17 | + |
| @@ -83,6 +83,7 @@ import queryArrival from './views/airtransport/queryArrival.vue' | @@ -83,6 +83,7 @@ import queryArrival from './views/airtransport/queryArrival.vue' | ||
| 83 | import queryConfirmatory from './views/airtransport/queryConfirmatory.vue' | 83 | import queryConfirmatory from './views/airtransport/queryConfirmatory.vue' |
| 84 | import configure from './views/airtransport/configure.vue' | 84 | import configure from './views/airtransport/configure.vue' |
| 85 | import queryConfigure from './views/airtransport/queryConfigure.vue' | 85 | import queryConfigure from './views/airtransport/queryConfigure.vue' |
| 86 | +import transit from './views/transit/transit.vue' | ||
| 86 | import departure from './views/airtransport/departure.vue' | 87 | import departure from './views/airtransport/departure.vue' |
| 87 | import declare from './views/airtransport/declare.vue' | 88 | import declare from './views/airtransport/declare.vue' |
| 88 | import queryDeparture from './views/airtransport/queryDeparture.vue' | 89 | import queryDeparture from './views/airtransport/queryDeparture.vue' |
| @@ -168,6 +169,7 @@ let routes = [ | @@ -168,6 +169,7 @@ let routes = [ | ||
| 168 | ] | 169 | ] |
| 169 | }, | 170 | }, |
| 170 | 171 | ||
| 172 | + | ||
| 171 | { | 173 | { |
| 172 | path: '/domdep', | 174 | path: '/domdep', |
| 173 | component: Home, | 175 | component: Home, |
| @@ -398,6 +400,15 @@ let routes = [ | @@ -398,6 +400,15 @@ let routes = [ | ||
| 398 | ] | 400 | ] |
| 399 | }, | 401 | }, |
| 400 | { | 402 | { |
| 403 | + path: '/', | ||
| 404 | + component: Home, | ||
| 405 | + name: '转关运抵', | ||
| 406 | + iconCls: 'el-icon-delete-location', | ||
| 407 | + children: [ | ||
| 408 | + {path:'/transit',component:transit,name:'转关运抵申报'}, | ||
| 409 | + ] | ||
| 410 | + }, | ||
| 411 | + { | ||
| 401 | path: '/out', | 412 | path: '/out', |
| 402 | component: Home, | 413 | component: Home, |
| 403 | name: '出港航班申报', | 414 | name: '出港航班申报', |
src/views/transit/transit.vue
0 → 100644
| 1 | +<template> | ||
| 2 | + <el-row> | ||
| 3 | + <el-row style="margin-top: 30px"> | ||
| 4 | + <el-col :span="2"> | ||
| 5 | + <el-input | ||
| 6 | + v-model="formTrn.customscode" | ||
| 7 | + placeholder="关区" | ||
| 8 | + style="width: 100px" | ||
| 9 | + /> | ||
| 10 | + </el-col> | ||
| 11 | + <el-col :span="3"> | ||
| 12 | + <el-input | ||
| 13 | + v-model="formTrn.username" | ||
| 14 | + placeholder="申报用户" | ||
| 15 | + style="width: 160px" | ||
| 16 | + /> | ||
| 17 | + </el-col> | ||
| 18 | + <el-col :span="3"> | ||
| 19 | +<!-- <el-input--> | ||
| 20 | +<!-- v-model="formTrn.trnmode"--> | ||
| 21 | +<!-- placeholder="转关方式"--> | ||
| 22 | +<!-- style="width: 140px"--> | ||
| 23 | +<!-- />--> | ||
| 24 | + <el-select v-model="formTrn.trnmode" placeholder="请选择转关方式" size="mini" style="width: 160px"> | ||
| 25 | + <el-option label="0-非转关运抵模式" value="0"></el-option> | ||
| 26 | + <el-option label="1-南方转关运抵模式" value="1"></el-option> | ||
| 27 | + <el-option label="2-北方转关运抵模式" value="2"></el-option> | ||
| 28 | + <el-option label="3-水运中转运抵模式" value="3"></el-option> | ||
| 29 | + </el-select> | ||
| 30 | + </el-col> | ||
| 31 | + <el-col :span="3"> | ||
| 32 | + <el-input | ||
| 33 | + v-model="formTrn.unloadcode" | ||
| 34 | + placeholder="卸货地代码" | ||
| 35 | + style="width: 160px" | ||
| 36 | + /> | ||
| 37 | + </el-col> | ||
| 38 | + <el-col :span="7"> | ||
| 39 | +<!-- <el-input--> | ||
| 40 | +<!-- v-model="formTrn.creattime"--> | ||
| 41 | +<!-- placeholder="新增时间段"--> | ||
| 42 | +<!-- style="width: 160px"--> | ||
| 43 | +<!-- />--> | ||
| 44 | + <el-date-picker | ||
| 45 | + v-model="formTrn.creattime" | ||
| 46 | + type="daterange" | ||
| 47 | + align="right" | ||
| 48 | + unlink-panels | ||
| 49 | + range-separator="至" | ||
| 50 | + start-placeholder="开始日期" | ||
| 51 | + end-placeholder="结束日期" | ||
| 52 | + value-format="yyyy-MM-dd" | ||
| 53 | + format="yyyy-MM-dd" | ||
| 54 | + :picker-options="pickerOptions"> | ||
| 55 | + </el-date-picker> | ||
| 56 | + </el-col> | ||
| 57 | + <el-col :span="5"> | ||
| 58 | + <el-button type="primary" icon="el-icon-search" @click="trnList">查询</el-button> | ||
| 59 | + <el-button type="success" icon="el-icon-edit" @click="addTrn">新增</el-button> | ||
| 60 | + <el-button type="warning" icon="el-icon-edit" :loading="batchSendLoading" @click="batchTrn">批量申报</el-button> | ||
| 61 | + </el-col> | ||
| 62 | + </el-row> | ||
| 63 | + <el-row> | ||
| 64 | + <el-table | ||
| 65 | + v-loading="listLoading" | ||
| 66 | + :data="tableData" | ||
| 67 | + border | ||
| 68 | + fit | ||
| 69 | + highlight-current-row | ||
| 70 | + style="width: 100%" | ||
| 71 | + @selection-change="trnSelectionChange" | ||
| 72 | + > | ||
| 73 | + <el-table-column | ||
| 74 | + type="selection" | ||
| 75 | + :selectable="checkSelectable" | ||
| 76 | + fixed="left" | ||
| 77 | + width="55" | ||
| 78 | + /> | ||
| 79 | + <el-table-column label="统一编号"> | ||
| 80 | + <template slot-scope="scope"> | ||
| 81 | + <span>{{ scope.row.seqno }}</span> | ||
| 82 | + </template> | ||
| 83 | + </el-table-column> | ||
| 84 | + <el-table-column label="转关方式" width="140"> | ||
| 85 | + <template slot-scope="scope"> | ||
| 86 | + <span v-if="scope.row.trnmode ==='0'">非转关运抵模式</span> | ||
| 87 | + <span v-if="scope.row.trnmode ==='1'">南方转关运抵模式</span> | ||
| 88 | + <span v-if="scope.row.trnmode ==='2'">北方转关运抵模式</span> | ||
| 89 | + <span v-if="scope.row.trnmode ==='3'">水运中转运抵模式</span> | ||
| 90 | +<!-- <span>{{ scope.row.trnmode }}</span>--> | ||
| 91 | + </template> | ||
| 92 | + </el-table-column> | ||
| 93 | + <el-table-column label="申报地海关" width="100"> | ||
| 94 | + <template slot-scope="scope"> | ||
| 95 | + <span>{{ scope.row.customscode }}</span> | ||
| 96 | + </template> | ||
| 97 | + </el-table-column> | ||
| 98 | + <el-table-column label="集装箱(器)编号" width="140"> | ||
| 99 | + <template slot-scope="scope"> | ||
| 100 | + <span>{{ scope.row.contaid }}</span> | ||
| 101 | + </template> | ||
| 102 | + </el-table-column> | ||
| 103 | + <el-table-column label="总提运单号" width="140"> | ||
| 104 | + <template slot-scope="scope"> | ||
| 105 | + <span>{{ scope.row.billno }}</span> | ||
| 106 | + </template> | ||
| 107 | + </el-table-column> | ||
| 108 | + <el-table-column label="运输方式代码" width="120"> | ||
| 109 | + <template slot-scope="scope"> | ||
| 110 | + <span v-if="scope.row.trafmode ==='2'">江海运输</span> | ||
| 111 | + <span v-if="scope.row.trafmode ==='3'">铁路运输</span> | ||
| 112 | + <span v-if="scope.row.trafmode ==='4'">汽车运输</span> | ||
| 113 | + <span v-if="scope.row.trafmode ==='5'">航空运输</span> | ||
| 114 | + <span v-if="scope.row.trafmode ==='6'">邮件运输</span> | ||
| 115 | +<!-- <span>{{ scope.row.trafmode }}</span>--> | ||
| 116 | + </template> | ||
| 117 | + </el-table-column> | ||
| 118 | + <el-table-column label="境内运输工具名称" width="140"> | ||
| 119 | + <template slot-scope="scope"> | ||
| 120 | + <span>{{ scope.row.trafname }}</span> | ||
| 121 | + </template> | ||
| 122 | + </el-table-column> | ||
| 123 | + <el-table-column label="境内运输工具航(班)次" width="160"> | ||
| 124 | + <template slot-scope="scope"> | ||
| 125 | + <span>{{ scope.row.voyageno }}</span> | ||
| 126 | + </template> | ||
| 127 | + </el-table-column> | ||
| 128 | + <el-table-column label="境内运输方式" width="120"> | ||
| 129 | + <template slot-scope="scope"> | ||
| 130 | + <span v-if="scope.row.trafway ==='2'">江海运输</span> | ||
| 131 | + <span v-if="scope.row.trafway ==='3'">铁路运输</span> | ||
| 132 | + <span v-if="scope.row.trafway ==='4'">汽车运输</span> | ||
| 133 | + <span v-if="scope.row.trafway ==='5'">航空运输</span> | ||
| 134 | + <span v-if="scope.row.trafway ==='6'">邮件运输</span> | ||
| 135 | +<!-- <span>{{ scope.row.trafway }}</span>--> | ||
| 136 | + </template> | ||
| 137 | + </el-table-column> | ||
| 138 | + <el-table-column label="托运货物件数" width="100"> | ||
| 139 | + <template slot-scope="scope"> | ||
| 140 | + <span>{{ scope.row.packno }}</span> | ||
| 141 | + </template> | ||
| 142 | + </el-table-column> | ||
| 143 | + <el-table-column label="货物总毛重" width="100"> | ||
| 144 | + <template slot-scope="scope"> | ||
| 145 | + <span>{{ scope.row.grosswt }}</span> | ||
| 146 | + </template> | ||
| 147 | + </el-table-column> | ||
| 148 | + <el-table-column label="卸货地代码" width="120"> | ||
| 149 | + <template slot-scope="scope"> | ||
| 150 | + <span>{{ scope.row.unloadcode }}</span> | ||
| 151 | + </template> | ||
| 152 | + </el-table-column> | ||
| 153 | + <el-table-column label="到达卸货地时间" width="140"> | ||
| 154 | + <template slot-scope="scope"> | ||
| 155 | + <span>{{ scope.row.arrivetime }}</span> | ||
| 156 | + </template> | ||
| 157 | + </el-table-column> | ||
| 158 | + <el-table-column label="回执内容" width="140"> | ||
| 159 | + <template slot-scope="scope"> | ||
| 160 | + <span>{{ scope.row.customResponseText }}</span> | ||
| 161 | + </template> | ||
| 162 | + </el-table-column> | ||
| 163 | + <el-table-column label="操作" align="center" width="400" fixed="right"> | ||
| 164 | + <template slot-scope="scope"> | ||
| 165 | + <el-button type="warning" size="mini" @click="editTrn(scope.$index,scope.row)">编辑</el-button> | ||
| 166 | + <el-button type="success" size="mini" @click="declareTrn(scope.row)"> | ||
| 167 | + 申报 | ||
| 168 | + </el-button> | ||
| 169 | + <el-button type="success" size="mini" @click="statusTrn(scope.row)"> | ||
| 170 | + 修改状态 | ||
| 171 | + </el-button> | ||
| 172 | + <el-button type="danger" size="mini" :disabled="scope.row.customResponseText && scope.row.customResponseText !== undefined && scope.row.customResponseText.length>0" @click="delTrn(scope.row)"> | ||
| 173 | + 删除 | ||
| 174 | + </el-button> | ||
| 175 | + </template> | ||
| 176 | + </el-table-column> | ||
| 177 | + </el-table> | ||
| 178 | + <!--分页区域--> | ||
| 179 | + <div style="margin-top: 10px"> | ||
| 180 | + <el-pagination | ||
| 181 | + :current-page="formTrn.pageNum" | ||
| 182 | + :page-sizes="[10, 50, 100, 500]" | ||
| 183 | + :page-size="formTrn.pageSize" | ||
| 184 | + layout="total, sizes, prev, pager, next, jumper" | ||
| 185 | + :total="total" | ||
| 186 | + @size-change="handleSizeChange" | ||
| 187 | + @current-change="handleCurrentChange" | ||
| 188 | + /> | ||
| 189 | + </div> | ||
| 190 | + | ||
| 191 | + </el-row> | ||
| 192 | + <el-row> | ||
| 193 | + <el-dialog | ||
| 194 | + :title="dialogMap[dialogStatus]" | ||
| 195 | + :visible.sync="trn_dialog.addDialog" | ||
| 196 | + style="margin-top: -50px" | ||
| 197 | + text-align="center" | ||
| 198 | + width="80%" | ||
| 199 | + @close="trn_addDialogClosed" | ||
| 200 | + > | ||
| 201 | + <el-form ref="form" :inline="true" :model="form" class="demo-form-inline" label-width="100px" style="margin-top: -20px;label:right" :rules="rules" > | ||
| 202 | + <el-row> | ||
| 203 | + <el-col :span="24"> | ||
| 204 | + <div class="grid-content content">信息表单</div> | ||
| 205 | + </el-col> | ||
| 206 | + </el-row> | ||
| 207 | + <el-row> | ||
| 208 | + <el-col :span="6"> | ||
| 209 | + <el-form-item label="海关申报序号" prop="seqno"> | ||
| 210 | + <el-input v-model="form.seqno" size="small" placeholder="" /> | ||
| 211 | + </el-form-item> | ||
| 212 | + </el-col> | ||
| 213 | + <el-col :span="6"> | ||
| 214 | + <el-form-item label="海关关区" prop="customscode"> | ||
| 215 | + <el-input v-model="form.customscode" size="small" placeholder="" /> | ||
| 216 | + </el-form-item> | ||
| 217 | + </el-col> | ||
| 218 | + <el-col :span="6"> | ||
| 219 | + <el-form-item label="操作员卡号" prop="inputopid"> | ||
| 220 | + <el-input v-model="form.inputopid" size="small" placeholder="" /> | ||
| 221 | + </el-form-item> | ||
| 222 | + </el-col> | ||
| 223 | + <el-col :span="6"> | ||
| 224 | + <el-form-item label="操作员姓名" prop="inputopname"> | ||
| 225 | + <el-input v-model="form.inputopname" size="small" placeholder="" /> | ||
| 226 | + </el-form-item> | ||
| 227 | + </el-col> | ||
| 228 | + </el-row> | ||
| 229 | + <el-row> | ||
| 230 | + <el-col :span="6"> | ||
| 231 | + <el-form-item label="报关公司" prop="applyname"> | ||
| 232 | + <el-input v-model="form.applyname" size="small" placeholder="" /> | ||
| 233 | + </el-form-item> | ||
| 234 | + </el-col> | ||
| 235 | + <el-col :span="6"> | ||
| 236 | + <el-form-item label="十位海关编码" prop="applycode"> | ||
| 237 | + <el-input v-model="form.applycode" size="small" placeholder="" /> | ||
| 238 | + </el-form-item> | ||
| 239 | + </el-col> | ||
| 240 | + <el-col :span="6"> | ||
| 241 | + <el-form-item label="组织机构代码" prop="copcode"> | ||
| 242 | + <el-input v-model="form.copcode" size="small" placeholder="" /> | ||
| 243 | + </el-form-item> | ||
| 244 | + </el-col> | ||
| 245 | + <el-col :span="6"> | ||
| 246 | + <el-form-item label="运抵编号" prop="arriveno"> | ||
| 247 | + <el-input v-model="form.arriveno" size="small" placeholder="" /> | ||
| 248 | + </el-form-item> | ||
| 249 | + </el-col> | ||
| 250 | + </el-row> | ||
| 251 | + <el-row> | ||
| 252 | + <el-col :span="6"> | ||
| 253 | + <el-form-item label="集装箱编号" prop="contaid"> | ||
| 254 | + <el-input v-model="form.contaid" size="small" placeholder="" /> | ||
| 255 | + </el-form-item> | ||
| 256 | + </el-col> | ||
| 257 | + <el-col :span="6"> | ||
| 258 | + <el-form-item label="运单号" prop="billno"> | ||
| 259 | + <el-input v-model="form.billno" size="small" placeholder="" /> | ||
| 260 | + </el-form-item> | ||
| 261 | + </el-col> | ||
| 262 | + <el-col :span="6"> | ||
| 263 | + <el-form-item label="运输方式" prop="trafmode"> | ||
| 264 | +<!-- <el-input v-model="form.trafmode" size="small" placeholder="" />--> | ||
| 265 | + <el-select v-model="form.trafmode" placeholder="请选择" size="mini" > | ||
| 266 | + <el-option label="2-江海运输" value="2"></el-option> | ||
| 267 | + <el-option label="3-铁路运输" value="3"></el-option> | ||
| 268 | + <el-option label="4-汽车运输" value="4"></el-option> | ||
| 269 | + <el-option label="5-汽车运输" value="5"></el-option> | ||
| 270 | + <el-option label="6-汽车运输" value="6"></el-option> | ||
| 271 | + </el-select> | ||
| 272 | + </el-form-item> | ||
| 273 | + </el-col> | ||
| 274 | + <el-col :span="6"> | ||
| 275 | + <el-form-item label="运输工具名称" prop="trafname"> | ||
| 276 | + <el-input v-model="form.trafname" size="small" placeholder="" /> | ||
| 277 | + </el-form-item> | ||
| 278 | + </el-col> | ||
| 279 | + </el-row> | ||
| 280 | + <el-row> | ||
| 281 | + <el-col :span="6"> | ||
| 282 | + <el-form-item label="启运时间" prop="voyageno"> | ||
| 283 | +<!-- <el-input v-model="form.voyageno" size="small" placeholder="" />--> | ||
| 284 | + <el-date-picker | ||
| 285 | + v-model="form.voyageno" | ||
| 286 | + type="date" size="mini" | ||
| 287 | + value-format="yyMMdd" | ||
| 288 | + format="yyMMdd" | ||
| 289 | + style="width:190px" | ||
| 290 | + placeholder="选择日期"> | ||
| 291 | + </el-date-picker> | ||
| 292 | + </el-form-item> | ||
| 293 | + </el-col> | ||
| 294 | + <el-col :span="6"> | ||
| 295 | + <el-form-item label="境内运输方式" prop="trafway"> | ||
| 296 | +<!-- <el-input v-model="form.trafway" size="small" placeholder="" />--> | ||
| 297 | + <el-select v-model="form.trafway" placeholder="请选择" size="mini"> | ||
| 298 | + <el-option label="2-江海运输" value="2"></el-option> | ||
| 299 | + <el-option label="3-铁路运输" value="3"></el-option> | ||
| 300 | + <el-option label="4-汽车运输" value="4"></el-option> | ||
| 301 | + <el-option label="5-汽车运输" value="5"></el-option> | ||
| 302 | + <el-option label="6-汽车运输" value="6"></el-option> | ||
| 303 | + </el-select> | ||
| 304 | + </el-form-item> | ||
| 305 | + </el-col> | ||
| 306 | + <el-col :span="6"> | ||
| 307 | + <el-form-item label="托运件数" prop="packno"> | ||
| 308 | + <el-input v-model="form.packno" size="small" placeholder="" /> | ||
| 309 | + </el-form-item> | ||
| 310 | + </el-col> | ||
| 311 | + <el-col :span="6"> | ||
| 312 | + <el-form-item label="托运重量" prop="grosswt"> | ||
| 313 | + <el-input v-model="form.grosswt" size="small" placeholder="" /> | ||
| 314 | + </el-form-item> | ||
| 315 | + </el-col> | ||
| 316 | + </el-row> | ||
| 317 | + <el-row> | ||
| 318 | + <el-col :span="6"> | ||
| 319 | + <el-form-item label="卸货地代码" prop="unloadcode"> | ||
| 320 | + <el-input v-model="form.unloadcode" size="small" placeholder="" /> | ||
| 321 | + </el-form-item> | ||
| 322 | + </el-col> | ||
| 323 | + <el-col :span="6"> | ||
| 324 | + <el-form-item label="到达卸货地时间" prop="arrivetime" label-width="110px"> | ||
| 325 | +<!-- <el-input v-model="form.arrivetime" size="mini" placeholder="" />--> | ||
| 326 | + <el-date-picker | ||
| 327 | + v-model="form.arrivetime" | ||
| 328 | + type="datetime" size="mini" | ||
| 329 | + value-format="yyyyMMddhhmmss" | ||
| 330 | + format="yyyyMMddhhmmss" | ||
| 331 | + style="width:190px" | ||
| 332 | + placeholder="选择日期时间"> | ||
| 333 | + </el-date-picker> | ||
| 334 | + </el-form-item> | ||
| 335 | + </el-col> | ||
| 336 | + <el-col :span="6"> | ||
| 337 | + <el-form-item label="集装器尺寸" prop="contatype"> | ||
| 338 | + <el-input v-model="form.contatype" size="small" placeholder="" /> | ||
| 339 | + </el-form-item> | ||
| 340 | + </el-col> | ||
| 341 | + <el-col :span="6"> | ||
| 342 | + <el-form-item label="转关方式" prop="trnmode"> | ||
| 343 | +<!-- <el-input v-model="form.trnmode" size="small"/>--> | ||
| 344 | + <el-select v-model="form.trnmode" placeholder="请选择" size="mini"> | ||
| 345 | + <el-option label="0-非转关运抵模式" value="0"></el-option> | ||
| 346 | + <el-option label="1-南方转关运抵模式" value="1"></el-option> | ||
| 347 | + <el-option label="2-北方转关运抵模式" value="2"></el-option> | ||
| 348 | + <el-option label="3-水运中转运抵模式" value="3"></el-option> | ||
| 349 | + </el-select> | ||
| 350 | + </el-form-item> | ||
| 351 | + </el-col> | ||
| 352 | + </el-row> | ||
| 353 | + <el-row> | ||
| 354 | + <el-col :span="24"> | ||
| 355 | + <el-form-item label="备注" prop="notes"> | ||
| 356 | + <el-input | ||
| 357 | + v-model="form.notes" | ||
| 358 | + type="textarea" | ||
| 359 | + :rows="1" size="small" style="width: 440px" | ||
| 360 | + placeholder="请输入内容" | ||
| 361 | + /> | ||
| 362 | + </el-form-item> | ||
| 363 | + </el-col> | ||
| 364 | + </el-row> | ||
| 365 | + <el-row> | ||
| 366 | + <el-col :span="24"> | ||
| 367 | + <el-form-item> | ||
| 368 | + <el-button size="small" style="margin-left: 500px;width: 100px" type="info" @click="trn_dialog.addDialog = false">取消</el-button> | ||
| 369 | + <el-button type="primary" size="small" style="margin-left: 20px;width: 100px" @click="dialogStatus==='create'?trn_add():trn_edit()">提交</el-button> | ||
| 370 | + </el-form-item> | ||
| 371 | + </el-col> | ||
| 372 | + </el-row> | ||
| 373 | + </el-form> | ||
| 374 | + </el-dialog> | ||
| 375 | + </el-row> | ||
| 376 | + </el-row> | ||
| 377 | +</template> | ||
| 378 | + | ||
| 379 | +<script> | ||
| 380 | + import {selectTrans,delTrans,batchSend,ediTrans,send,addTrans} from "../../api/trn"; | ||
| 381 | + | ||
| 382 | + export default { | ||
| 383 | + name: "transit", | ||
| 384 | + data(){ | ||
| 385 | + return{ | ||
| 386 | + pickerOptions: { | ||
| 387 | + shortcuts: [{ | ||
| 388 | + text: '最近一周', | ||
| 389 | + onClick(picker) { | ||
| 390 | + const end = new Date(); | ||
| 391 | + const start = new Date(); | ||
| 392 | + start.setTime(start.getTime() - 3600 * 1000 * 24 * 7); | ||
| 393 | + picker.$emit('pick', [start, end]); | ||
| 394 | + } | ||
| 395 | + }, { | ||
| 396 | + text: '最近一个月', | ||
| 397 | + onClick(picker) { | ||
| 398 | + const end = new Date(); | ||
| 399 | + const start = new Date(); | ||
| 400 | + start.setTime(start.getTime() - 3600 * 1000 * 24 * 30); | ||
| 401 | + picker.$emit('pick', [start, end]); | ||
| 402 | + } | ||
| 403 | + }, { | ||
| 404 | + text: '最近三个月', | ||
| 405 | + onClick(picker) { | ||
| 406 | + const end = new Date(); | ||
| 407 | + const start = new Date(); | ||
| 408 | + start.setTime(start.getTime() - 3600 * 1000 * 24 * 90); | ||
| 409 | + picker.$emit('pick', [start, end]); | ||
| 410 | + } | ||
| 411 | + }] | ||
| 412 | + }, | ||
| 413 | + formTrn: { | ||
| 414 | + customscode:'', | ||
| 415 | + username:'', | ||
| 416 | + trnmode:'', | ||
| 417 | + unloadcode:'', | ||
| 418 | + creattime:'', | ||
| 419 | + pageNum: 1, | ||
| 420 | + pageSize: 10 | ||
| 421 | + }, | ||
| 422 | + total: 0, | ||
| 423 | + dialogMap: { | ||
| 424 | + update: '编辑', | ||
| 425 | + create: '新增' | ||
| 426 | + }, | ||
| 427 | + dialogStatus: 'create', | ||
| 428 | + trn_dialog: { | ||
| 429 | + // 添加对话框 | ||
| 430 | + addDialog: false, | ||
| 431 | + // 编辑对话框 | ||
| 432 | + editDialog: false | ||
| 433 | + }, | ||
| 434 | + batchSendLoading: false, | ||
| 435 | + listLoading: false, | ||
| 436 | + tableData: [], | ||
| 437 | + //批量选中的 | ||
| 438 | + selectedWaybillList: [], | ||
| 439 | + //新增编辑表单 | ||
| 440 | + form: { | ||
| 441 | + autoid:'', | ||
| 442 | + seqno:'', | ||
| 443 | + customscode:'', | ||
| 444 | + inputopid: '', | ||
| 445 | + inputopname:'', | ||
| 446 | + applyname:'', | ||
| 447 | + applycode:'', | ||
| 448 | + copcode:'', | ||
| 449 | + arriveno:'', | ||
| 450 | + contaid:'', | ||
| 451 | + billno:'', | ||
| 452 | + trafmode:'', | ||
| 453 | + trafname:'', | ||
| 454 | + voyageno:'', | ||
| 455 | + trafway:'', | ||
| 456 | + packno:'', | ||
| 457 | + grosswt:'', | ||
| 458 | + unloadcode:'', | ||
| 459 | + arrivetime:'', | ||
| 460 | + contatype:'', | ||
| 461 | + trnmode:'', | ||
| 462 | + notes:'', | ||
| 463 | + opertype:'1', | ||
| 464 | + sign:'qwer', | ||
| 465 | + signdate:'20220113120000', | ||
| 466 | + clientseqno:'qwertyuioplkjhgfds', | ||
| 467 | + hostid:'1137490146@qq.com', | ||
| 468 | + certno:'11', | ||
| 469 | + | ||
| 470 | + | ||
| 471 | + }, | ||
| 472 | + rules: { | ||
| 473 | + } | ||
| 474 | + | ||
| 475 | + } | ||
| 476 | + }, | ||
| 477 | + mounted() { | ||
| 478 | + //获取列表 | ||
| 479 | + this.trnList(); | ||
| 480 | + }, | ||
| 481 | + methods:{ | ||
| 482 | + //分页 | ||
| 483 | + handleSizeChange(val) { | ||
| 484 | + this.formTrn.pageSize = val | ||
| 485 | + this.trnList() | ||
| 486 | + }, | ||
| 487 | + handleCurrentChange(val) { | ||
| 488 | + this.formTrn.pageNum = val | ||
| 489 | + this.trnList() | ||
| 490 | + }, | ||
| 491 | + //修改状态 | ||
| 492 | + statusTrn(row) { | ||
| 493 | + this.$confirm('修改状态', '确认信息', { | ||
| 494 | + distinguishCancelAndClose: true, | ||
| 495 | + confirmButtonText: '确定', | ||
| 496 | + cancelButtonText: '取消' | ||
| 497 | + }).then(() => { | ||
| 498 | + row.customResponseText = undefined | ||
| 499 | + }) | ||
| 500 | + }, | ||
| 501 | + // 删除 | ||
| 502 | + delTrn(row) { | ||
| 503 | + // 弹框询问是否删除? | ||
| 504 | + this.$confirm('此操作永久删除该消息收发记录, 是否继续?', '警告', { | ||
| 505 | + confirmButtonText: '确定删除', | ||
| 506 | + cancelButtonText: '取消', | ||
| 507 | + type: 'warning' | ||
| 508 | + } | ||
| 509 | + ).then(() => { | ||
| 510 | + delTrans(row).then((response) => { | ||
| 511 | + console.log(row) | ||
| 512 | + const res = response.data | ||
| 513 | + if (res.code !== '200') { | ||
| 514 | + return this.$message.error(res.msg) | ||
| 515 | + } | ||
| 516 | + this.$message.success(res.msg) | ||
| 517 | + // 刷新列表 | ||
| 518 | + this.trnList() | ||
| 519 | + }).catch(error => { | ||
| 520 | + this.$message.error(res.msg) | ||
| 521 | + }) | ||
| 522 | + }).catch(() => { | ||
| 523 | + }) | ||
| 524 | + }, | ||
| 525 | + // 获取消息标签列表 | ||
| 526 | + trnList() { | ||
| 527 | + const _this = this | ||
| 528 | + selectTrans(this.formTrn).then((response) => { | ||
| 529 | + const res = response.data | ||
| 530 | + if (res.code !== '200') { | ||
| 531 | + return _this.$message.error('获取消息收发记录,失败!') | ||
| 532 | + } | ||
| 533 | + // 获取列表数据 | ||
| 534 | + _this.tableData = res.data.list | ||
| 535 | + // 获取列表的总记录数 | ||
| 536 | + _this.total = res.data.total | ||
| 537 | + _this.$message.success('获取消息收发记录,成功!') | ||
| 538 | + }).catch(error => { | ||
| 539 | + // 关闭加载 | ||
| 540 | + _this.$message.error(error.toString()) | ||
| 541 | + }) | ||
| 542 | + }, | ||
| 543 | + //新增编辑弹框关闭重置 | ||
| 544 | + trn_addDialogClosed() { | ||
| 545 | + // 重置对话框 | ||
| 546 | + this.$refs.form.resetFields() | ||
| 547 | + }, | ||
| 548 | + // 打开新增 | ||
| 549 | + addTrn() { | ||
| 550 | + this.dialogStatus = 'create' | ||
| 551 | + this.trn_dialog.addDialog = true | ||
| 552 | + }, | ||
| 553 | + | ||
| 554 | + // 新增功能 | ||
| 555 | + trn_add() { // 进行表单的预验证 | ||
| 556 | + this.$refs.form.validate(valid => { | ||
| 557 | + // 未通过,表单预校验 | ||
| 558 | + if (!valid) return | ||
| 559 | + addTrans(this.form).then((response) => { | ||
| 560 | + const res = response.data | ||
| 561 | + // 添加失败 | ||
| 562 | + if (res.code !== '200') { | ||
| 563 | + // 关闭加载 | ||
| 564 | + return this.$message.error(res.msg) | ||
| 565 | + } | ||
| 566 | + // 添加,成功 | ||
| 567 | + this.$message.success(res.msg) | ||
| 568 | + // 隐藏对话框 | ||
| 569 | + this.trn_dialog.addDialog = false | ||
| 570 | + // 刷新列表 | ||
| 571 | + this.trnList() | ||
| 572 | + }).catch(error => { | ||
| 573 | + this.$message.error(error.toString()) | ||
| 574 | + }) | ||
| 575 | + }) | ||
| 576 | + }, | ||
| 577 | + // 打开编辑 | ||
| 578 | + editTrn(index, row) { | ||
| 579 | + this.form = Object.assign({}, row) | ||
| 580 | + this.trn_dialog.addDialog = true | ||
| 581 | + this.dialogStatus = 'update' | ||
| 582 | + this.$nextTick(() => { | ||
| 583 | + this.form = Object.assign({}, row) | ||
| 584 | + }) | ||
| 585 | + }, | ||
| 586 | + // 编辑功能 | ||
| 587 | + trn_edit() { | ||
| 588 | + // 进行表单的预验证 | ||
| 589 | + this.$refs.form.validate(valid => { | ||
| 590 | + // 未通过,表单预校验 | ||
| 591 | + if (!valid) return | ||
| 592 | + ediTrans(this.form).then((response) => { | ||
| 593 | + const res = response.data | ||
| 594 | + if (res.code !== '200') { | ||
| 595 | + return this.$message.error(res.msg) | ||
| 596 | + } | ||
| 597 | + this.$message.success(res.msg) | ||
| 598 | + // 隐藏对话框 | ||
| 599 | + this.trn_dialog.addDialog = false | ||
| 600 | + // 刷新列表 | ||
| 601 | + this.trnList() | ||
| 602 | + }).catch(error => { | ||
| 603 | + this.$message.error(error.toString()) | ||
| 604 | + }) | ||
| 605 | + }) | ||
| 606 | + }, | ||
| 607 | + // 申报 | ||
| 608 | + declareTrn(row) { | ||
| 609 | + row.clientseqno= "qwertyuioplkjhgfds" | ||
| 610 | + row.opertype= "1" | ||
| 611 | + row.sign= "qwer" | ||
| 612 | + row.signdate= "20220113120000" | ||
| 613 | + row.hostid= "1137490146@qq.com" | ||
| 614 | + row.certno= "11" | ||
| 615 | + | ||
| 616 | + send(row).then((response) => { | ||
| 617 | + const res = response.data | ||
| 618 | + if (res.code !== '200') { | ||
| 619 | + return this.$message.error(res.msg); | ||
| 620 | + } | ||
| 621 | + this.$message.success('申报成功!'); | ||
| 622 | + this.trnList(); | ||
| 623 | + }).catch(error => { | ||
| 624 | + this.$message.error(error.toString()); | ||
| 625 | + }); | ||
| 626 | + }, | ||
| 627 | + // 产生回执的不批量发送 | ||
| 628 | + checkSelectable: function(row) { | ||
| 629 | + if (row.customResponseText && row.customResponseText !== undefined && row.customResponseText.length > 0) { | ||
| 630 | + return false | ||
| 631 | + } else { | ||
| 632 | + return true | ||
| 633 | + } | ||
| 634 | + }, | ||
| 635 | + //批量选中 | ||
| 636 | + trnSelectionChange: function(selectRows) { | ||
| 637 | + console.log(selectRows) | ||
| 638 | + const list = [] | ||
| 639 | + if (selectRows) { | ||
| 640 | + selectRows.forEach(function(item, index) { | ||
| 641 | + list.push(item.autoid) | ||
| 642 | + }) | ||
| 643 | + } | ||
| 644 | + this.selectedWaybillList = list | ||
| 645 | + }, | ||
| 646 | + //批量申报 | ||
| 647 | + batchTrn() { | ||
| 648 | + this.batchSendLoading = true | ||
| 649 | + if (this.selectedWaybillList && this.selectedWaybillList.length > 0) { | ||
| 650 | + batchSend(this.selectedWaybillList).then(res => { | ||
| 651 | + if (res.code === '200') { | ||
| 652 | + Message.success('批量申报成功') | ||
| 653 | + } else { | ||
| 654 | + Message.error('批量申报成功,请稍后重试') | ||
| 655 | + } | ||
| 656 | + }).catch(action => { | ||
| 657 | + this.$message({ | ||
| 658 | + type: 'info', | ||
| 659 | + message: action === 'cancel' | ||
| 660 | + ? '取消修改' | ||
| 661 | + : '停留在当前页面' | ||
| 662 | + }) | ||
| 663 | + }) | ||
| 664 | + this.batchSendLoading = false | ||
| 665 | + setTimeout(() => { | ||
| 666 | + this.trnList() | ||
| 667 | + }, 1000) | ||
| 668 | + Message.success('批量申报执行完毕') | ||
| 669 | + } else { | ||
| 670 | + Message.error('请选择需要批量发送的运单') | ||
| 671 | + } | ||
| 672 | + }, | ||
| 673 | + } | ||
| 674 | + | ||
| 675 | + } | ||
| 676 | +</script> | ||
| 677 | + | ||
| 678 | +<style scoped> | ||
| 679 | + | ||
| 680 | +</style> |
-
请 注册 或 登录 后发表评论