zhanbo.xu

feat: 新增法定单位

...@@ -31,9 +31,16 @@ ...@@ -31,9 +31,16 @@
31 :pageSizes="[20, 30, 50, 100]" 31 :pageSizes="[20, 30, 50, 100]"
32 :totalCount="0" 32 :totalCount="0"
33 :loading="tableLoading" 33 :loading="tableLoading"
34 - :emptyText="(loadingDatas && !rowData.popoverData.length) ? '数据加载中' : $t('portEntry.emptyText')" 34 + :emptyText="
35 - height="350px" 35 + loadingDatas &&
36 - maxHeight="500px" 36 + rowData &&
37 + rowData.popoverData &&
38 + !rowData.popoverData.length
39 + ? '数据加载中'
40 + : $t('portEntry.emptyText')
41 + "
42 + :height="tableHeight + 'px'"
43 + :maxHeight="tableHeight + 'px'"
37 rowKey="id" 44 rowKey="id"
38 > 45 >
39 </Table> 46 </Table>
...@@ -82,20 +89,31 @@ export default { ...@@ -82,20 +89,31 @@ export default {
82 }, 89 },
83 data() { 90 data() {
84 return { 91 return {
85 - tableLoading: false 92 + tableLoading: false,
93 + tableHeight: 350,
86 }; 94 };
87 }, 95 },
88 - computed:{ 96 + computed: {
89 - loadingDatas(){ 97 + loadingDatas() {
90 - return this.$store.state.viewOption.loadingDatas 98 + return this.$store.state.viewOption.loadingDatas;
91 - } 99 + },
100 + },
101 + mounted() {
102 + this.calculateTableHeight();
103 + window.addEventListener("resize", this.calculateTableHeight);
104 + },
105 + beforeDestroy() {
106 + window.removeEventListener("resize", this.calculateTableHeight);
92 }, 107 },
93 methods: { 108 methods: {
109 + calculateTableHeight() {
110 + this.tableHeight = window.innerHeight - 300;
111 + },
94 //弹框关闭 112 //弹框关闭
95 popoverClose() { 113 popoverClose() {
96 this.$emit("popoverClose"); 114 this.$emit("popoverClose");
97 this.parentDom.$refs.tables.$refs.bodyWrapper.style.overflowY = "auto"; 115 this.parentDom.$refs.tables.$refs.bodyWrapper.style.overflowY = "auto";
98 - this.$store.dispatch('setLoadingState', true) 116 + this.$store.dispatch("setLoadingState", true);
99 }, 117 },
100 //弹框状态改版 118 //弹框状态改版
101 popoverChange(data, type) { 119 popoverChange(data, type) {
......
1 <template> 1 <template>
2 - <div style="height: 100%;"> 2 + <div style="height: 100%">
3 <el-form 3 <el-form
4 class="fedexFormStyle fedexRowEditFormStyle" 4 class="fedexFormStyle fedexRowEditFormStyle"
5 ref="editRowForm" 5 ref="editRowForm"
...@@ -116,7 +116,10 @@ ...@@ -116,7 +116,10 @@
116 </Formitem> 116 </Formitem>
117 </el-col> 117 </el-col>
118 <el-col :span="4"> 118 <el-col :span="4">
119 - <Formitem label="目的国(地区)代码" prop="destinationCountryRegionCode"> 119 + <Formitem
120 + label="目的国(地区)代码"
121 + prop="destinationCountryRegionCode"
122 + >
120 <el-select 123 <el-select
121 type="text" 124 type="text"
122 id="inputInner--destinationCountryRegionCode" 125 id="inputInner--destinationCountryRegionCode"
...@@ -182,6 +185,22 @@ ...@@ -182,6 +185,22 @@
182 </el-row> 185 </el-row>
183 <el-row :gutter="5"> 186 <el-row :gutter="5">
184 <el-col :span="4"> 187 <el-col :span="4">
188 + <Formitem label="法定单位">
189 + <el-input
190 + class="inputShadow"
191 + id="inputInner--unitLegalFirstCode"
192 + resize="none"
193 + :disabled="true"
194 + :value="
195 + mapDicDatas(
196 + $store.getters.dict.MEASUREMENT_UNIT,
197 + tableRowformData.unitLegalFirstCode
198 + )
199 + "
200 + ></el-input>
201 + </Formitem>
202 + </el-col>
203 + <el-col :span="4">
185 <Formitem label="币制" prop="currency"> 204 <Formitem label="币制" prop="currency">
186 <el-select 205 <el-select
187 type="text" 206 type="text"
...@@ -254,28 +273,30 @@ ...@@ -254,28 +273,30 @@
254 </el-col> 273 </el-col>
255 </el-row> 274 </el-row>
256 </el-form> 275 </el-form>
257 - <p class="formRowDataOperate"><a @click="cancelEditRowData">取消</a> <a @click="rowFormDataSave">保存</a></p> 276 + <p class="formRowDataOperate">
277 + <a @click="cancelEditRowData">取消</a>
278 + <a @click="rowFormDataSave">保存</a>
279 + </p>
258 </div> 280 </div>
259 - </template> 281 +</template>
260 -
261 - <script>
262 282
263 - export default { 283 +<script>
284 +export default {
264 props: { 285 props: {
265 rowDatas: { 286 rowDatas: {
266 type: Object, 287 type: Object,
267 - default: ()=>({}), 288 + default: () => ({}),
268 }, 289 },
269 }, 290 },
270 data() { 291 data() {
271 var checkFractionalPart = (rule, value, callback) => { 292 var checkFractionalPart = (rule, value, callback) => {
272 if (value < 0) { 293 if (value < 0) {
273 - callback(new Error('数值不能为负')); 294 + callback(new Error("数值不能为负"));
274 } 295 }
275 - if (value !== '' && value !== undefined) { 296 + if (value !== "" && value !== undefined) {
276 const regex = /^\d{0,14}(\.\d{1,5})?$/; 297 const regex = /^\d{0,14}(\.\d{1,5})?$/;
277 if (!regex.test(value)) { 298 if (!regex.test(value)) {
278 - callback(new Error('整数最多14位,小数最多5位')); 299 + callback(new Error("整数最多14位,小数最多5位"));
279 } else { 300 } else {
280 callback(); 301 callback();
281 } 302 }
...@@ -285,21 +306,21 @@ ...@@ -285,21 +306,21 @@
285 }; 306 };
286 var checkNegativeNum = (rule, value, callback) => { 307 var checkNegativeNum = (rule, value, callback) => {
287 if (value < 0) { 308 if (value < 0) {
288 - callback(new Error('数值不能为负')); 309 + callback(new Error("数值不能为负"));
289 } else { 310 } else {
290 callback(); 311 callback();
291 } 312 }
292 }; 313 };
293 var checkQty = (rule, value, callback) => { 314 var checkQty = (rule, value, callback) => {
294 if (!Number.isInteger(value)) { 315 if (!Number.isInteger(value)) {
295 - callback(new Error('请输入整数值')); 316 + callback(new Error("请输入整数值"));
296 } else { 317 } else {
297 if (value < 0) { 318 if (value < 0) {
298 - callback(new Error('数值不能为负')); 319 + callback(new Error("数值不能为负"));
299 } else { 320 } else {
300 const valueStr = value.toString(); 321 const valueStr = value.toString();
301 if (valueStr.length > 14) { 322 if (valueStr.length > 14) {
302 - callback(new Error('最多14位')); 323 + callback(new Error("最多14位"));
303 } else { 324 } else {
304 callback(); 325 callback();
305 } 326 }
...@@ -307,86 +328,101 @@ ...@@ -307,86 +328,101 @@
307 } 328 }
308 }; 329 };
309 return { 330 return {
310 - tableRowformData:{}, 331 + tableRowformData: {},
311 - tableRowFormRules:{ 332 + tableRowFormRules: {
312 enterpriseProductCode: [ 333 enterpriseProductCode: [
313 - { required: true, message: '请输入企业商品货号', trigger: 'blur' }, 334 + { required: true, message: "请输入企业商品货号", trigger: "blur" },
314 - { max: 30, message: '长度不能超过30个字符', trigger: 'blur' } 335 + { max: 30, message: "长度不能超过30个字符", trigger: "blur" },
315 ], 336 ],
316 enterpriseProductName: [ 337 enterpriseProductName: [
317 - { required: true, message: '请输入企业商品名称', trigger: 'blur' }, 338 + { required: true, message: "请输入企业商品名称", trigger: "blur" },
318 - { max: 250, message: '长度不能超过250个字符', trigger: 'blur' } 339 + { max: 250, message: "长度不能超过250个字符", trigger: "blur" },
319 ], 340 ],
320 enterpriseProductDescribe: [ 341 enterpriseProductDescribe: [
321 - { max: 1000, message: '长度不能超过1000个字符', trigger: 'blur' } 342 + { max: 1000, message: "长度不能超过1000个字符", trigger: "blur" },
322 ], 343 ],
323 productName: [ 344 productName: [
324 - { required: true, message: '请输入商品名称', trigger: 'blur' }, 345 + { required: true, message: "请输入商品名称", trigger: "blur" },
325 - { max: 250, message: '长度不能超过250个字符', trigger: 'blur' } 346 + { max: 250, message: "长度不能超过250个字符", trigger: "blur" },
326 ], 347 ],
327 productCode: [ 348 productCode: [
328 - { required: true, message: '请输入商品编码', trigger: 'blur' }, 349 + { required: true, message: "请输入商品编码", trigger: "blur" },
329 - { max: 10, message: '长度不能超过10个字符', trigger: 'blur' } 350 + { max: 10, message: "长度不能超过10个字符", trigger: "blur" },
330 ], 351 ],
331 model: [ 352 model: [
332 - { required: true, message: '请输入规格型号', trigger: 'blur' }, 353 + { required: true, message: "请输入规格型号", trigger: "blur" },
333 - { max: 250, message: '长度不能超过250个字符', trigger: 'blur' } 354 + { max: 250, message: "长度不能超过250个字符", trigger: "blur" },
334 ], 355 ],
335 accountBookMaterialNumber: [ 356 accountBookMaterialNumber: [
336 - { max: 30, message: '长度不能超过30个字符', trigger: 'blur' } 357 + { max: 30, message: "长度不能超过30个字符", trigger: "blur" },
337 ], 358 ],
338 barCode: [ 359 barCode: [
339 - { max: 50, message: '长度不能超过50个字符', trigger: 'blur' } 360 + { max: 50, message: "长度不能超过50个字符", trigger: "blur" },
340 ], 361 ],
341 destinationCountryRegionCode: [ 362 destinationCountryRegionCode: [
342 - { required: true, message: '请选择目的国(地区)代码', trigger: 'change' } 363 + {
364 + required: true,
365 + message: "请选择目的国(地区)代码",
366 + trigger: "change",
367 + },
343 ], 368 ],
344 unit: [ 369 unit: [
345 - { required: true, message: '请选择计量单位', trigger: 'change' } 370 + { required: true, message: "请选择计量单位", trigger: "change" },
346 ], 371 ],
347 qty: [ 372 qty: [
348 - { required: true, message: '请输入数量', trigger: 'blur' }, 373 + { required: true, message: "请输入数量", trigger: "blur" },
349 - { validator: checkQty, trigger: 'blur' } 374 + { validator: checkQty, trigger: "blur" },
350 ], 375 ],
351 legalQty: [ 376 legalQty: [
352 - { required: true, message: '请输入法定数量', trigger: 'blur' }, 377 + { required: true, message: "请输入法定数量", trigger: "blur" },
353 - { validator: checkFractionalPart, trigger: 'blur' } 378 + { validator: checkFractionalPart, trigger: "blur" },
354 ], 379 ],
355 currency: [ 380 currency: [
356 - { required: true, message: '请选择币制', trigger: 'change' } 381 + { required: true, message: "请选择币制", trigger: "change" },
357 ], 382 ],
358 price: [ 383 price: [
359 - { required: true, message: '请输入单价', trigger: 'blur' }, 384 + { required: true, message: "请输入单价", trigger: "blur" },
360 - { validator: checkNegativeNum, trigger: 'blur' } 385 + { validator: checkNegativeNum, trigger: "blur" },
361 ], 386 ],
362 totalPrice: [ 387 totalPrice: [
363 - { required: true, message: '请输入总价', trigger: 'blur' }, 388 + { required: true, message: "请输入总价", trigger: "blur" },
364 - { validator: checkNegativeNum, trigger: 'blur' } 389 + { validator: checkNegativeNum, trigger: "blur" },
365 ], 390 ],
366 netWeight: [ 391 netWeight: [
367 - { required: true, message: '请输入净重', trigger: 'blur' }, 392 + { required: true, message: "请输入净重", trigger: "blur" },
368 - { validator: checkFractionalPart, trigger: 'blur' } 393 + { validator: checkFractionalPart, trigger: "blur" },
369 ], 394 ],
370 remark: [ 395 remark: [
371 - { max: 1000, message: '长度不能超过1000个字符', trigger: 'blur' } 396 + { max: 1000, message: "长度不能超过1000个字符", trigger: "blur" },
372 ], 397 ],
373 - } 398 + },
374 }; 399 };
375 }, 400 },
376 methods: { 401 methods: {
377 - rowFormDataSave(){ 402 + mapDicDatas(dicArr, code) {
403 + if (code != "" && code) {
404 + return dicArr.filter((item) => item.itemCode == code)[0]
405 + .itemChineseName;
406 + } else {
407 + return "";
408 + }
409 + },
410 + rowFormDataSave() {
378 this.$refs.editRowForm.validate((valid) => { 411 this.$refs.editRowForm.validate((valid) => {
379 if (valid) { 412 if (valid) {
380 - this.$emit('rowFormDataSave', {gnum: this.rowDatas.row.gnum, tableRowformData: this.tableRowformData}) 413 + this.$emit("rowFormDataSave", {
381 - this.tableRowformData = {} 414 + gnum: this.rowDatas.row.gnum,
415 + tableRowformData: this.tableRowformData,
416 + });
417 + this.tableRowformData = {};
382 } else { 418 } else {
383 return false; 419 return false;
384 } 420 }
385 - }) 421 + });
386 }, 422 },
387 - cancelEditRowData(){ 423 + cancelEditRowData() {
388 - this.tableRowformData = {} 424 + this.tableRowformData = {};
389 - this.$emit('cancelEditRowData',this.rowDatas.row.gnum-1) 425 + this.$emit("cancelEditRowData", this.rowDatas.row.gnum - 1);
390 }, 426 },
391 // validate() { 427 // validate() {
392 // return this.$refs.editRowForm.validate((valid)=>{ 428 // return this.$refs.editRowForm.validate((valid)=>{
...@@ -404,59 +440,62 @@ ...@@ -404,59 +440,62 @@
404 this.$refs.editRowForm.validate((valid) => { 440 this.$refs.editRowForm.validate((valid) => {
405 if (valid) { 441 if (valid) {
406 // console.log("tg2") 442 // console.log("tg2")
407 - this.$emit('rowFormDataSave', {gnum: this.rowDatas.row.gnum, tableRowformData: this.tableRowformData}) 443 + this.$emit("rowFormDataSave", {
408 - this.tableRowformData = {} 444 + gnum: this.rowDatas.row.gnum,
409 - this.$emit('updateLastItemValid', true); 445 + tableRowformData: this.tableRowformData,
446 + });
447 + this.tableRowformData = {};
448 + this.$emit("updateLastItemValid", true);
410 resolve(true); 449 resolve(true);
411 } else { 450 } else {
412 // console.log("wtg2") 451 // console.log("wtg2")
413 - this.$emit('updateLastItemValid', false); 452 + this.$emit("updateLastItemValid", false);
414 resolve(false); 453 resolve(false);
415 } 454 }
416 }); 455 });
417 }); 456 });
418 }, 457 },
419 }, 458 },
420 - }; 459 +};
421 - </script> 460 +</script>
422 461
423 - <style lang="scss" scoped> 462 +<style lang="scss" scoped>
424 - .addNewItem{ 463 +.addNewItem {
425 display: flex; 464 display: flex;
426 justify-content: flex-start; 465 justify-content: flex-start;
427 align-items: center; 466 align-items: center;
428 - color:#007AB7; 467 + color: #007ab7;
429 line-height: 38px; 468 line-height: 38px;
430 cursor: pointer; 469 cursor: pointer;
431 - i{ 470 + i {
432 margin-right: 3px; 471 margin-right: 3px;
433 } 472 }
434 - span{ 473 + span {
435 font-size: 13px; 474 font-size: 13px;
436 font-weight: 500; 475 font-weight: 500;
437 } 476 }
438 - } 477 +}
439 - .formRowDataOperate{ 478 +.formRowDataOperate {
440 text-align: center; 479 text-align: center;
441 padding: 0 20px; 480 padding: 0 20px;
442 - a{ 481 + a {
443 - color: #007AB7; 482 + color: #007ab7;
444 font-weight: 600; 483 font-weight: 600;
445 - &:first-child{ 484 + &:first-child {
446 margin-right: 5px; 485 margin-right: 5px;
447 } 486 }
448 } 487 }
449 - } 488 +}
450 - .fedexRowEditFormStyle .el-form-item{ 489 +.fedexRowEditFormStyle .el-form-item {
451 background-color: #ffffff; 490 background-color: #ffffff;
452 - box-shadow: 0 2px 4px 0 #E5F2F8CC; 491 + box-shadow: 0 2px 4px 0 #e5f2f8cc;
453 - border-left: 1px solid #E5F2F8CC; 492 + border-left: 1px solid #e5f2f8cc;
454 // margin-bottom: 30px; 493 // margin-bottom: 30px;
455 - } 494 +}
456 - .fedexRowEditFormStyle .el-form-item:has(.formError){ 495 +.fedexRowEditFormStyle .el-form-item:has(.formError) {
457 - margin-bottom: 25px!important; 496 + margin-bottom: 25px !important;
458 - } 497 +}
459 - .fedexRowEditFormStyle .activeBorder{ 498 +.fedexRowEditFormStyle .activeBorder {
460 - border-left: 3px solid #007AB7; 499 + border-left: 3px solid #007ab7;
461 - } 500 +}
462 - </style> 501 +</style>
......
...@@ -868,7 +868,7 @@ export default { ...@@ -868,7 +868,7 @@ export default {
868 }, 868 },
869 methods: { 869 methods: {
870 mapDicDatas(dicArr, code) { 870 mapDicDatas(dicArr, code) {
871 - if (code != "") { 871 + if (code != "" && code) {
872 return dicArr.filter((item) => item.itemCode == code)[0] 872 return dicArr.filter((item) => item.itemCode == code)[0]
873 .itemChineseName; 873 .itemChineseName;
874 } else { 874 } else {
......
...@@ -178,7 +178,9 @@ ...@@ -178,7 +178,9 @@
178 type="primary" 178 type="primary"
179 class="dropdown-style-button" 179 class="dropdown-style-button"
180 :loading="loadings.departureLoading" 180 :loading="loadings.departureLoading"
181 - @click="declareData('departureLoading', '离境单申报', 'logisticsDeparture')" 181 + @click="
182 + declareData('departureLoading', '离境单申报', 'logisticsDeparture')
183 + "
182 > 184 >
183 <svg-icon 185 <svg-icon
184 class="el-icon-user-solid" 186 class="el-icon-user-solid"
...@@ -192,7 +194,7 @@ ...@@ -192,7 +194,7 @@
192 type="primary" 194 type="primary"
193 class="dropdown-style-button" 195 class="dropdown-style-button"
194 :loading="loadings.revokeLoading" 196 :loading="loadings.revokeLoading"
195 - @click="declareData('revokeLoading', '撤销单申报' ,'cancellation')" 197 + @click="declareData('revokeLoading', '撤销单申报', 'cancellation')"
196 > 198 >
197 <svg-icon 199 <svg-icon
198 class="el-icon-user-solid" 200 class="el-icon-user-solid"
...@@ -211,7 +213,7 @@ ...@@ -211,7 +213,7 @@
211 </el-button> 213 </el-button>
212 </div> 214 </div>
213 </div> 215 </div>
214 - <section style="position:fixed;top:350px;left: 500px;"> 216 + <section style="position: fixed; top: 350px; left: 500px">
215 <TablePopover 217 <TablePopover
216 ref="allLogDataReceiptStatusPopover" 218 ref="allLogDataReceiptStatusPopover"
217 dataKey="allLogDataReceiptStatus" 219 dataKey="allLogDataReceiptStatus"
...@@ -237,7 +239,8 @@ ...@@ -237,7 +239,8 @@
237 ref="entryTable" 239 ref="entryTable"
238 :data="tableData" 240 :data="tableData"
239 :headerData="headerData" 241 :headerData="headerData"
240 - :maxHeight="tableMaxheight" 242 + :height="tableMaxheight + 'px'"
243 + :maxHeight="tableMaxheight + 'px'"
241 :border="true" 244 :border="true"
242 :pagination="true" 245 :pagination="true"
243 :order="false" 246 :order="false"
...@@ -364,7 +367,9 @@ ...@@ -364,7 +367,9 @@
364 <el-table-column align="center" label="操作" width="150"> 367 <el-table-column align="center" label="操作" width="150">
365 <template slot-scope="scope"> 368 <template slot-scope="scope">
366 <el-button type="text" @click="update(scope.row)"> 修改 </el-button> 369 <el-button type="text" @click="update(scope.row)"> 修改 </el-button>
367 - <el-button type="text" @click="showTotalLog(scope.row)">日志</el-button> 370 + <el-button type="text" @click="showTotalLog(scope.row)"
371 + >日志</el-button
372 + >
368 </template> 373 </template>
369 </el-table-column> 374 </el-table-column>
370 </template> 375 </template>
...@@ -379,7 +384,8 @@ ...@@ -379,7 +384,8 @@
379 :showDialog="revokeVisible" 384 :showDialog="revokeVisible"
380 :selectedDatas="selected" 385 :selectedDatas="selected"
381 :dropdownCode="dropdownCode" 386 :dropdownCode="dropdownCode"
382 - @cancelRevoke="cancelRevoke" /> 387 + @cancelRevoke="cancelRevoke"
388 + />
383 <TemplateDownloadDialog 389 <TemplateDownloadDialog
384 :showDialog="templateDownloadVisible" 390 :showDialog="templateDownloadVisible"
385 @cancelDownload="cancelDownload" 391 @cancelDownload="cancelDownload"
...@@ -408,9 +414,9 @@ import { ...@@ -408,9 +414,9 @@ import {
408 getTotalReceipt, 414 getTotalReceipt,
409 getLogisticsReceipt, 415 getLogisticsReceipt,
410 getDeclarationLog, 416 getDeclarationLog,
411 - exportDeclareData 417 + exportDeclareData,
412 } from "@/api/declareData-api.js"; 418 } from "@/api/declareData-api.js";
413 -import { getDictData } from '@/api/system/dict-api.js' 419 +import { getDictData } from "@/api/system/dict-api.js";
414 import DialogVue from "./dialog.vue"; 420 import DialogVue from "./dialog.vue";
415 import RevokeDialog from "./revokeDialog.vue"; 421 import RevokeDialog from "./revokeDialog.vue";
416 import TemplateDownloadDialog from "./templateDownloadDialog.vue"; 422 import TemplateDownloadDialog from "./templateDownloadDialog.vue";
...@@ -423,7 +429,7 @@ export default { ...@@ -423,7 +429,7 @@ export default {
423 RevokeDialog, 429 RevokeDialog,
424 TemplateDownloadDialog, 430 TemplateDownloadDialog,
425 ExportDialog, 431 ExportDialog,
426 - BatchModify 432 + BatchModify,
427 }, 433 },
428 data() { 434 data() {
429 return { 435 return {
...@@ -577,30 +583,30 @@ export default { ...@@ -577,30 +583,30 @@ export default {
577 dwonloadModelLoading: false, 583 dwonloadModelLoading: false,
578 dropDownLoading: false, 584 dropDownLoading: false,
579 logTableLoading: false, 585 logTableLoading: false,
580 - exportDeclareLoading:false, 586 + exportDeclareLoading: false,
581 revokeLoading: false, // 撤销单申报加载状态 587 revokeLoading: false, // 撤销单申报加载状态
582 departureLoading: false, // 离境单申报加载状态 588 departureLoading: false, // 离境单申报加载状态
583 }, 589 },
584 textareaVisible: {}, 590 textareaVisible: {},
585 - tableMaxheight: null, 591 + tableMaxheight: 500,
586 outerVisible: false, 592 outerVisible: false,
587 dropdownName: "一键申报", 593 dropdownName: "一键申报",
588 dropdownCode: "full", 594 dropdownCode: "full",
589 - revokeVisible:false, 595 + revokeVisible: false,
590 - templateDownloadVisible:false, 596 + templateDownloadVisible: false,
591 - datasExportVisible:false, 597 + datasExportVisible: false,
592 - batchModifyVisible:false 598 + batchModifyVisible: false,
593 }; 599 };
594 }, 600 },
595 created() { 601 created() {
596 this.search(0); 602 this.search(0);
597 - // this.getCancellationReasons() 603 + this.calculateTableHeight();
598 }, 604 },
599 mounted() { 605 mounted() {
600 - this.tableMaxheight = window.innerHeight - 355; 606 + window.addEventListener("resize", this.calculateTableHeight);
601 - window.addEventListener('resize',()=>{ 607 + },
602 - this.tableMaxheight = window.innerHeight - 355; 608 + beforeDestroy() {
603 - },false) 609 + window.removeEventListener("resize", this.calculateTableHeight);
604 }, 610 },
605 watch: { 611 watch: {
606 $route(val, oldval) { 612 $route(val, oldval) {
...@@ -608,7 +614,7 @@ export default { ...@@ -608,7 +614,7 @@ export default {
608 }, 614 },
609 }, 615 },
610 beforeRouteEnter(to, from, next) { 616 beforeRouteEnter(to, from, next) {
611 - next(vm => { 617 + next((vm) => {
612 // 检查标志是否需要刷新数据 618 // 检查标志是否需要刷新数据
613 if (to.meta.needsRefresh) { 619 if (to.meta.needsRefresh) {
614 vm.search(0); 620 vm.search(0);
...@@ -618,6 +624,9 @@ export default { ...@@ -618,6 +624,9 @@ export default {
618 }); 624 });
619 }, 625 },
620 methods: { 626 methods: {
627 + calculateTableHeight() {
628 + this.tableMaxheight = window.innerHeight - 300;
629 + },
621 //查询申报数据 630 //查询申报数据
622 search(val) { 631 search(val) {
623 this.loadings.sreachLoading = true; 632 this.loadings.sreachLoading = true;
...@@ -678,12 +687,14 @@ export default { ...@@ -678,12 +687,14 @@ export default {
678 //下载模板 687 //下载模板
679 dwonloadModelFile() { 688 dwonloadModelFile() {
680 this.loadings.dwonloadModelLoading = true; 689 this.loadings.dwonloadModelLoading = true;
681 - this.$store.dispatch("GetInfo").then(res =>{ 690 + this.$store
682 - console.log('res====', res) 691 + .dispatch("GetInfo")
692 + .then((res) => {
693 + console.log("res====", res);
683 if (res.code == 200) { 694 if (res.code == 200) {
684 - console.log('port===', res.data?.port?.split(',')) 695 + console.log("port===", res.data?.port?.split(","));
685 - if (res.data?.port?.split(',').length == 2) { 696 + if (res.data?.port?.split(",").length == 2) {
686 - this.templateDownloadVisible = true 697 + this.templateDownloadVisible = true;
687 } else { 698 } else {
688 this.fileDownload 699 this.fileDownload
689 .downLoadZip( 700 .downLoadZip(
...@@ -692,27 +703,27 @@ export default { ...@@ -692,27 +703,27 @@ export default {
692 "申报数据模板.xlsx", 703 "申报数据模板.xlsx",
693 "xlsx", 704 "xlsx",
694 "get", 705 "get",
695 - {type: res.data?.port} 706 + { type: res.data?.port }
696 ) 707 )
697 .finally(() => { 708 .finally(() => {
698 - this.cancelDownload() 709 + this.cancelDownload();
699 }); 710 });
700 } 711 }
701 } 712 }
702 - }).catch(err =>{
703 - console.log(err)
704 }) 713 })
705 - 714 + .catch((err) => {
715 + console.log(err);
716 + });
706 }, 717 },
707 718
708 - datasDownload(dataSource){ 719 + datasDownload(dataSource) {
709 let obj = { 720 let obj = {
710 billNo: this.sreachFormData.billNo, 721 billNo: this.sreachFormData.billNo,
711 declareId: [], 722 declareId: [],
712 logisticsNo: this.sreachFormData.logisticsNo, 723 logisticsNo: this.sreachFormData.logisticsNo,
713 orderNo: this.sreachFormData.orderNo, 724 orderNo: this.sreachFormData.orderNo,
714 receiptStatus: this.sreachFormData.receiptStatus, 725 receiptStatus: this.sreachFormData.receiptStatus,
715 - dataSource 726 + dataSource,
716 }; 727 };
717 obj.startCreateTime = ""; 728 obj.startCreateTime = "";
718 obj.endCreateTime = ""; 729 obj.endCreateTime = "";
...@@ -723,45 +734,50 @@ export default { ...@@ -723,45 +734,50 @@ export default {
723 this.selected.forEach((item) => { 734 this.selected.forEach((item) => {
724 obj.declareId.push(item.declareId); 735 obj.declareId.push(item.declareId);
725 }); 736 });
726 - exportDeclareData(obj).then((res)=>{ 737 + exportDeclareData(obj)
738 + .then((res) => {
727 // if (res.code === "200") { 739 // if (res.code === "200") {
728 // // this.alertSuccessMsg(res.message); 740 // // this.alertSuccessMsg(res.message);
729 // } else { 741 // } else {
730 // console.log(res.message); 742 // console.log(res.message);
731 // this.alertWarningMsg(res.message); 743 // this.alertWarningMsg(res.message);
732 // } 744 // }
733 - 745 + })
734 - }).catch((err)=>{ 746 + .catch((err) => {
735 console.log(err); 747 console.log(err);
736 this.alertErrorMsg(err); 748 this.alertErrorMsg(err);
737 - }).finally(res =>{
738 - this.loadings.exportDeclareLoading = false;
739 - this.datasExportVisible = false
740 - this.$refs.exportDialog.datasExportVisible = false
741 }) 749 })
750 + .finally((res) => {
751 + this.loadings.exportDeclareLoading = false;
752 + this.datasExportVisible = false;
753 + this.$refs.exportDialog.datasExportVisible = false;
754 + });
742 }, 755 },
743 //导出 756 //导出
744 downloadData() { 757 downloadData() {
745 this.loadings.exportDeclareLoading = true; 758 this.loadings.exportDeclareLoading = true;
746 - this.$store.dispatch("GetInfo").then(res =>{ 759 + this.$store
747 - console.log('res====', res) 760 + .dispatch("GetInfo")
761 + .then((res) => {
762 + console.log("res====", res);
748 if (res.code == 200) { 763 if (res.code == 200) {
749 - console.log('port===', res.data?.port?.split(',')) 764 + console.log("port===", res.data?.port?.split(","));
750 - if (res.data?.port?.split(',').length == 2) { 765 + if (res.data?.port?.split(",").length == 2) {
751 - this.datasExportVisible = true 766 + this.datasExportVisible = true;
752 } else { 767 } else {
753 - this.datasDownload(res.data?.port) 768 + this.datasDownload(res.data?.port);
754 } 769 }
755 } 770 }
756 - }).catch(err =>{
757 - console.log(err)
758 }) 771 })
772 + .catch((err) => {
773 + console.log(err);
774 + });
759 }, 775 },
760 - startDatasExport(dataSource){ 776 + startDatasExport(dataSource) {
761 - this.datasDownload(dataSource) 777 + this.datasDownload(dataSource);
762 }, 778 },
763 - cancelDatasExport(){ 779 + cancelDatasExport() {
764 - this.datasExportVisible = false 780 + this.datasExportVisible = false;
765 this.loadings.exportDeclareLoading = false; 781 this.loadings.exportDeclareLoading = false;
766 }, 782 },
767 783
...@@ -781,12 +797,12 @@ export default { ...@@ -781,12 +797,12 @@ export default {
781 this.$set(this.loadings, loadingKey, true); 797 this.$set(this.loadings, loadingKey, true);
782 // 构造请求参数 798 // 构造请求参数
783 const obj = { 799 const obj = {
784 - declareIds: this.selected.map(item => item.declareId), 800 + declareIds: this.selected.map((item) => item.declareId),
785 type: dropdownCode, 801 type: dropdownCode,
786 }; 802 };
787 803
788 // 如果是撤销单申报,显示弹窗并返回 804 // 如果是撤销单申报,显示弹窗并返回
789 - if (dropdownName === '撤销单申报') { 805 + if (dropdownName === "撤销单申报") {
790 this.revokeVisible = true; 806 this.revokeVisible = true;
791 this.$set(this.loadings, loadingKey, false); 807 this.$set(this.loadings, loadingKey, false);
792 this.dropdownCode = dropdownCode; 808 this.dropdownCode = dropdownCode;
...@@ -823,8 +839,8 @@ export default { ...@@ -823,8 +839,8 @@ export default {
823 // } 839 // }
824 this.search(1); 840 this.search(1);
825 this.outerVisible = false; 841 this.outerVisible = false;
826 - this.tableMaxheight = window.innerHeight - 355; 842 + this.tableMaxheight = window.innerHeight - 300;
827 - this.$forceUpdate() 843 + this.$forceUpdate();
828 }, 844 },
829 popoverChange(val) { 845 popoverChange(val) {
830 this.tableData = val.tableData; 846 this.tableData = val.tableData;
...@@ -839,7 +855,7 @@ export default { ...@@ -839,7 +855,7 @@ export default {
839 }) 855 })
840 .finally(() => { 856 .finally(() => {
841 this.$nextTick(() => { 857 this.$nextTick(() => {
842 - this.$store.dispatch('setLoadingState', false) 858 + this.$store.dispatch("setLoadingState", false);
843 this.$refs.orderReceiptStatusPopover.tableLoading = false; 859 this.$refs.orderReceiptStatusPopover.tableLoading = false;
844 this.$refs.wayBillReceiptPopover.tableLoading = false; 860 this.$refs.wayBillReceiptPopover.tableLoading = false;
845 this.$refs.listReceiptStatusPopover.tableLoading = false; 861 this.$refs.listReceiptStatusPopover.tableLoading = false;
...@@ -905,8 +921,7 @@ export default { ...@@ -905,8 +921,7 @@ export default {
905 console.log(err); 921 console.log(err);
906 reject(); 922 reject();
907 }); 923 });
908 - } 924 + } else if (type == "logisticsReceiptStatus") {
909 - else if (type == "logisticsReceiptStatus") {
910 getLogisticsReceipt(obj) 925 getLogisticsReceipt(obj)
911 .then((res) => { 926 .then((res) => {
912 if (res.code === "200") { 927 if (res.code === "200") {
...@@ -919,8 +934,7 @@ export default { ...@@ -919,8 +934,7 @@ export default {
919 console.log(err); 934 console.log(err);
920 reject(); 935 reject();
921 }); 936 });
922 - } 937 + } else if (type == "allLogDataReceiptStatus") {
923 - else if (type == "allLogDataReceiptStatus") {
924 getDeclarationLog(id) 938 getDeclarationLog(id)
925 .then((res) => { 939 .then((res) => {
926 if (res.code === "200") { 940 if (res.code === "200") {
...@@ -980,10 +994,10 @@ export default { ...@@ -980,10 +994,10 @@ export default {
980 }); 994 });
981 } 995 }
982 }, 996 },
983 - cancelRevoke(){ 997 + cancelRevoke() {
984 this.loadings.dropDownLoading = false; 998 this.loadings.dropDownLoading = false;
985 - this.revokeVisible = false 999 + this.revokeVisible = false;
986 - this.dropdownCode = 'full' 1000 + this.dropdownCode = "full";
987 }, 1001 },
988 update(val) { 1002 update(val) {
989 this.$router.push({ 1003 this.$router.push({
...@@ -995,42 +1009,43 @@ export default { ...@@ -995,42 +1009,43 @@ export default {
995 showTotalLog(row) { 1009 showTotalLog(row) {
996 this.$store.state.viewOption.loadingDatas = true; 1010 this.$store.state.viewOption.loadingDatas = true;
997 this.selectedLogRow = row; 1011 this.selectedLogRow = row;
998 - this.$set(row, 'logLoading', true); 1012 + this.$set(row, "logLoading", true);
999 1013
1000 - this.receiptApi(row.declareId, "allLogDataReceiptStatus") 1014 + this.receiptApi(row.declareId, "allLogDataReceiptStatus").then(
1001 - .then((logData) => { 1015 + (logData) => {
1002 - this.$set(row, 'popoverData', logData); 1016 + this.$set(row, "popoverData", logData);
1003 1017
1004 - if(!this.selectedLogRow.popoverData.length){ 1018 + if (!this.selectedLogRow.popoverData.length) {
1005 this.$store.state.viewOption.loadingDatas = false; 1019 this.$store.state.viewOption.loadingDatas = false;
1006 } 1020 }
1007 1021
1008 // 手动触发状态更新 1022 // 手动触发状态更新
1009 this.$nextTick(() => { 1023 this.$nextTick(() => {
1010 // 强制设置弹窗状态为true 1024 // 强制设置弹窗状态为true
1011 - row.allLogDataReceiptStatusPopoverType = true 1025 + row.allLogDataReceiptStatusPopoverType = true;
1012 // 强制更新表格 1026 // 强制更新表格
1013 this.tableData = [...this.tableData]; 1027 this.tableData = [...this.tableData];
1014 }); 1028 });
1015 - }) 1029 + }
1030 + );
1016 }, 1031 },
1017 - cancelDownload(){ 1032 + cancelDownload() {
1018 this.loadings.dwonloadModelLoading = false; 1033 this.loadings.dwonloadModelLoading = false;
1019 - this.templateDownloadVisible = false 1034 + this.templateDownloadVisible = false;
1020 }, 1035 },
1021 - batchModify(){ 1036 + batchModify() {
1022 if (!this.selected.length) { 1037 if (!this.selected.length) {
1023 this.alertWarningMsg("请选择数据!"); 1038 this.alertWarningMsg("请选择数据!");
1024 - return 1039 + return;
1025 } 1040 }
1026 - this.batchModifyVisible = true 1041 + this.batchModifyVisible = true;
1027 }, 1042 },
1028 - cancelBatchModify(val){ 1043 + cancelBatchModify(val) {
1029 - this.batchModifyVisible = false 1044 + this.batchModifyVisible = false;
1030 - if(val === 1){ 1045 + if (val === 1) {
1031 this.search(0); 1046 this.search(0);
1032 } 1047 }
1033 - } 1048 + },
1034 }, 1049 },
1035 }; 1050 };
1036 </script> 1051 </script>
...@@ -1087,9 +1102,9 @@ export default { ...@@ -1087,9 +1102,9 @@ export default {
1087 transform: translate(0, -50%); 1102 transform: translate(0, -50%);
1088 z-index: 10; 1103 z-index: 10;
1089 } 1104 }
1090 -.revokeOperation{ 1105 +.revokeOperation {
1091 - margin-bottom:25px; 1106 + margin-bottom: 25px;
1092 - .revokeSubmitBtn{ 1107 + .revokeSubmitBtn {
1093 margin-right: 30px; 1108 margin-right: 30px;
1094 } 1109 }
1095 } 1110 }
......