Showing
1 changed file
with
262 additions
and
218 deletions
| ... | @@ -6,7 +6,7 @@ | ... | @@ -6,7 +6,7 @@ |
| 6 | <el-button class="entrySaveButton" @click="back">返 回</el-button> | 6 | <el-button class="entrySaveButton" @click="back">返 回</el-button> |
| 7 | </div> | 7 | </div> |
| 8 | </div> | 8 | </div> |
| 9 | - <section :class="{partsHidden:!isFold}"> | 9 | + <section :class="{ partsHidden: !isFold }"> |
| 10 | <el-form | 10 | <el-form |
| 11 | class="fedexFormStyle fedexFormEditStyle" | 11 | class="fedexFormStyle fedexFormEditStyle" |
| 12 | ref="editForm" | 12 | ref="editForm" |
| ... | @@ -233,7 +233,6 @@ | ... | @@ -233,7 +233,6 @@ |
| 233 | ></el-input> | 233 | ></el-input> |
| 234 | </Formitem> | 234 | </Formitem> |
| 235 | </el-col> | 235 | </el-col> |
| 236 | - | ||
| 237 | </el-row> | 236 | </el-row> |
| 238 | <el-row :gutter="5"> | 237 | <el-row :gutter="5"> |
| 239 | <el-col :span="3"> | 238 | <el-col :span="3"> |
| ... | @@ -273,7 +272,8 @@ | ... | @@ -273,7 +272,8 @@ |
| 273 | placeholder="" | 272 | placeholder="" |
| 274 | > | 273 | > |
| 275 | <el-option | 274 | <el-option |
| 276 | - v-for="(item, index) in $store.getters.dict.COUNTRY_REGION_CODE" | 275 | + v-for="(item, index) in $store.getters.dict |
| 276 | + .COUNTRY_REGION_CODE" | ||
| 277 | :key="index" | 277 | :key="index" |
| 278 | :label="item.itemChineseName" | 278 | :label="item.itemChineseName" |
| 279 | :value="item.itemCode" | 279 | :value="item.itemCode" |
| ... | @@ -292,7 +292,8 @@ | ... | @@ -292,7 +292,8 @@ |
| 292 | placeholder="" | 292 | placeholder="" |
| 293 | > | 293 | > |
| 294 | <el-option | 294 | <el-option |
| 295 | - v-for="(item, index) in $store.getters.dict.COUNTRY_REGION_CODE" | 295 | + v-for="(item, index) in $store.getters.dict |
| 296 | + .COUNTRY_REGION_CODE" | ||
| 296 | :key="index" | 297 | :key="index" |
| 297 | :label="item.itemChineseName" | 298 | :label="item.itemChineseName" |
| 298 | :value="item.itemCode" | 299 | :value="item.itemCode" |
| ... | @@ -364,7 +365,6 @@ | ... | @@ -364,7 +365,6 @@ |
| 364 | ></el-input> | 365 | ></el-input> |
| 365 | </Formitem> | 366 | </Formitem> |
| 366 | </el-col> | 367 | </el-col> |
| 367 | - | ||
| 368 | </el-row> | 368 | </el-row> |
| 369 | <el-row :gutter="5"> | 369 | <el-row :gutter="5"> |
| 370 | <el-col :span="3"> | 370 | <el-col :span="3"> |
| ... | @@ -479,11 +479,21 @@ | ... | @@ -479,11 +479,21 @@ |
| 479 | </el-form> | 479 | </el-form> |
| 480 | </section> | 480 | </section> |
| 481 | <div class="fold-unfold"> | 481 | <div class="fold-unfold"> |
| 482 | - <img v-if="isFold" src="@/assets/images/fold.png" @click="()=>isFold = false" alt=""> | 482 | + <img |
| 483 | - <img v-if="!isFold" src="@/assets/images/unfold.png" @click="()=>isFold = true" alt=""> | 483 | + v-if="isFold" |
| 484 | + src="@/assets/images/fold.png" | ||
| 485 | + @click="() => (isFold = false)" | ||
| 486 | + alt="" | ||
| 487 | + /> | ||
| 488 | + <img | ||
| 489 | + v-if="!isFold" | ||
| 490 | + src="@/assets/images/unfold.png" | ||
| 491 | + @click="() => (isFold = true)" | ||
| 492 | + alt="" | ||
| 493 | + /> | ||
| 484 | </div> | 494 | </div> |
| 485 | <div class="entryTitle" style="margin-top: 10px">商品明细</div> | 495 | <div class="entryTitle" style="margin-top: 10px">商品明细</div> |
| 486 | - <section style="position:relative"> | 496 | + <section style="position: relative"> |
| 487 | <Table | 497 | <Table |
| 488 | class="fedexDetialTable fedexSreachTable editableTable" | 498 | class="fedexDetialTable fedexSreachTable editableTable" |
| 489 | ref="entryTable" | 499 | ref="entryTable" |
| ... | @@ -506,19 +516,40 @@ | ... | @@ -506,19 +516,40 @@ |
| 506 | /> | 516 | /> |
| 507 | </template> | 517 | </template> |
| 508 | <template v-slot:destinationCountryRegionCode="scope"> | 518 | <template v-slot:destinationCountryRegionCode="scope"> |
| 509 | - <span>{{ mapDicDatas($store.getters.dict.COUNTRY_REGION_CODE, scope.row.destinationCountryRegionCode) }}</span> | 519 | + <span>{{ |
| 520 | + mapDicDatas( | ||
| 521 | + $store.getters.dict.COUNTRY_REGION_CODE, | ||
| 522 | + scope.row.destinationCountryRegionCode | ||
| 523 | + ) | ||
| 524 | + }}</span> | ||
| 510 | </template> | 525 | </template> |
| 511 | <template v-slot:unit="scope"> | 526 | <template v-slot:unit="scope"> |
| 512 | - <span>{{ mapDicDatas($store.getters.dict.MEASUREMENT_UNIT, scope.row.unit) }}</span> | 527 | + <span>{{ |
| 528 | + mapDicDatas($store.getters.dict.MEASUREMENT_UNIT, scope.row.unit) | ||
| 529 | + }}</span> | ||
| 530 | + </template> | ||
| 531 | + <template v-slot:unitLegalFirstCode="scope"> | ||
| 532 | + <span>{{ | ||
| 533 | + mapDicDatas( | ||
| 534 | + $store.getters.dict.MEASUREMENT_UNIT, | ||
| 535 | + scope.row.unitLegalFirstCode | ||
| 536 | + ) | ||
| 537 | + }}</span> | ||
| 513 | </template> | 538 | </template> |
| 514 | <template v-slot:currency="scope"> | 539 | <template v-slot:currency="scope"> |
| 515 | - <span>{{ mapCurrencyDatas($store.getters.dict.CURRENCY, scope.row.currency) }}</span> | 540 | + <span>{{ |
| 541 | + mapCurrencyDatas($store.getters.dict.CURRENCY, scope.row.currency) | ||
| 542 | + }}</span> | ||
| 516 | </template> | 543 | </template> |
| 517 | <template slot="optionColumn"> | 544 | <template slot="optionColumn"> |
| 518 | <el-table-column align="left" label="操作" width="100"> | 545 | <el-table-column align="left" label="操作" width="100"> |
| 519 | <template slot-scope="scope"> | 546 | <template slot-scope="scope"> |
| 520 | - <el-button type="text" @click="updateRow(scope.row)"> 修改 </el-button> | 547 | + <el-button type="text" @click="updateRow(scope.row)"> |
| 521 | - <el-button type="text" @click="deleteRow(scope.row)"> 删除 </el-button> | 548 | + 修改 |
| 549 | + </el-button> | ||
| 550 | + <el-button type="text" @click="deleteRow(scope.row)"> | ||
| 551 | + 删除 | ||
| 552 | + </el-button> | ||
| 522 | </template> | 553 | </template> |
| 523 | </el-table-column> | 554 | </el-table-column> |
| 524 | </template> | 555 | </template> |
| ... | @@ -533,39 +564,42 @@ | ... | @@ -533,39 +564,42 @@ |
| 533 | class="entrySaveButton entrySaveButton-background revokeSubmitBtn" | 564 | class="entrySaveButton entrySaveButton-background revokeSubmitBtn" |
| 534 | type="primary" | 565 | type="primary" |
| 535 | @click="submitEditedReportDatas" | 566 | @click="submitEditedReportDatas" |
| 536 | - >保存</el-button> | 567 | + >保存</el-button |
| 537 | - <el-button | 568 | + > |
| 538 | - class="entrySaveButton" | 569 | + <el-button class="entrySaveButton" @click="back">返回</el-button> |
| 539 | - @click="back" | ||
| 540 | - >返回</el-button> | ||
| 541 | </div> | 570 | </div> |
| 542 | </div> | 571 | </div> |
| 543 | - </template> | 572 | +</template> |
| 544 | 573 | ||
| 545 | - <script> | 574 | +<script> |
| 546 | - import RowDataEditForm from "./RowDataEditForm.vue"; | 575 | +import RowDataEditForm from "./RowDataEditForm.vue"; |
| 547 | - import { getCustomerList, getPortList, getDeclareData, updateDeclareData } from "@/api/declareData-api.js"; | 576 | +import { |
| 548 | - import { getDictData } from '@/api/system/dict-api.js' | 577 | + getCustomerList, |
| 549 | - import item from "@/layout/components/Sidebar/Item.vue"; | 578 | + getPortList, |
| 550 | - export default { | 579 | + getDeclareData, |
| 580 | + updateDeclareData, | ||
| 581 | +} from "@/api/declareData-api.js"; | ||
| 582 | +import { getDictData } from "@/api/system/dict-api.js"; | ||
| 583 | +import item from "@/layout/components/Sidebar/Item.vue"; | ||
| 584 | +export default { | ||
| 551 | name: "", | 585 | name: "", |
| 552 | components: { RowDataEditForm }, | 586 | components: { RowDataEditForm }, |
| 553 | data() { | 587 | data() { |
| 554 | var checkNegativeNum = (rule, value, callback) => { | 588 | var checkNegativeNum = (rule, value, callback) => { |
| 555 | if (value < 0) { | 589 | if (value < 0) { |
| 556 | - callback(new Error('数值不能为负')); | 590 | + callback(new Error("数值不能为负")); |
| 557 | } else { | 591 | } else { |
| 558 | callback(); | 592 | callback(); |
| 559 | } | 593 | } |
| 560 | }; | 594 | }; |
| 561 | var checkInsuredFee = (rule, value, callback) => { | 595 | var checkInsuredFee = (rule, value, callback) => { |
| 562 | if (value < 0) { | 596 | if (value < 0) { |
| 563 | - callback(new Error('数值不能为负')); | 597 | + callback(new Error("数值不能为负")); |
| 564 | } | 598 | } |
| 565 | - if (value !== '' && value !== undefined) { | 599 | + if (value !== "" && value !== undefined) { |
| 566 | const regex = /^\d{0,14}(\.\d{1,5})?$/; | 600 | const regex = /^\d{0,14}(\.\d{1,5})?$/; |
| 567 | if (!regex.test(value)) { | 601 | if (!regex.test(value)) { |
| 568 | - callback(new Error('整数最多14位,小数最多5位')); | 602 | + callback(new Error("整数最多14位,小数最多5位")); |
| 569 | } else { | 603 | } else { |
| 570 | callback(); | 604 | callback(); |
| 571 | } | 605 | } |
| ... | @@ -575,123 +609,119 @@ | ... | @@ -575,123 +609,119 @@ |
| 575 | }; | 609 | }; |
| 576 | var checkPackNo = (rule, value, callback) => { | 610 | var checkPackNo = (rule, value, callback) => { |
| 577 | if (!Number.isInteger(value)) { | 611 | if (!Number.isInteger(value)) { |
| 578 | - callback(new Error('请输入整数值')); | 612 | + callback(new Error("请输入整数值")); |
| 579 | } else { | 613 | } else { |
| 580 | if (value < 0) { | 614 | if (value < 0) { |
| 581 | - callback(new Error('数值不能为负')); | 615 | + callback(new Error("数值不能为负")); |
| 582 | } else { | 616 | } else { |
| 583 | callback(); | 617 | callback(); |
| 584 | } | 618 | } |
| 585 | } | 619 | } |
| 586 | }; | 620 | }; |
| 587 | return { | 621 | return { |
| 588 | - ebcDataList:[], | 622 | + ebcDataList: [], |
| 589 | - declareCustomsDataList:[], | 623 | + declareCustomsDataList: [], |
| 590 | declareId: null, | 624 | declareId: null, |
| 591 | formData: { | 625 | formData: { |
| 592 | - appType:9610 | 626 | + appType: 9610, |
| 593 | }, | 627 | }, |
| 594 | - formRules:{ | 628 | + formRules: { |
| 595 | ebccode: [ | 629 | ebccode: [ |
| 596 | - { required: true, message: '请选择电商企业', trigger: 'change' }, | 630 | + { required: true, message: "请选择电商企业", trigger: "change" }, |
| 597 | ], | 631 | ], |
| 598 | logisticsCode: [ | 632 | logisticsCode: [ |
| 599 | - { required: true, message: '请选择物流企业', trigger: 'change' }, | 633 | + { required: true, message: "请选择物流企业", trigger: "change" }, |
| 600 | ], | 634 | ], |
| 601 | orderNo: [ | 635 | orderNo: [ |
| 602 | - { required: true, message: '请输入订单编号', trigger: 'blur' }, | 636 | + { required: true, message: "请输入订单编号", trigger: "blur" }, |
| 603 | - { max: 60, message: '长度不能超过60个字符', trigger: 'blur' } | 637 | + { max: 60, message: "长度不能超过60个字符", trigger: "blur" }, |
| 604 | ], | 638 | ], |
| 605 | logisticsNo: [ | 639 | logisticsNo: [ |
| 606 | - { required: true, message: '请输入物流运单编号', trigger: 'blur' }, | 640 | + { required: true, message: "请输入物流运单编号", trigger: "blur" }, |
| 607 | - { max: 80, message: '长度不能超过80个字符', trigger: 'blur' } | 641 | + { max: 80, message: "长度不能超过80个字符", trigger: "blur" }, |
| 608 | ], | 642 | ], |
| 609 | declareCustomsCode: [ | 643 | declareCustomsCode: [ |
| 610 | - { required: true, message: '请选择申报地海关', trigger: 'change' } | 644 | + { required: true, message: "请选择申报地海关", trigger: "change" }, |
| 611 | - ], | ||
| 612 | - exportDate: [ | ||
| 613 | - { message: '请选择出口日期', trigger: 'change' } | ||
| 614 | ], | 645 | ], |
| 646 | + exportDate: [{ message: "请选择出口日期", trigger: "change" }], | ||
| 615 | goodsValue: [ | 647 | goodsValue: [ |
| 616 | - { required: true, message: '请输入商品金额', trigger: 'blur' } | 648 | + { required: true, message: "请输入商品金额", trigger: "blur" }, |
| 617 | ], | 649 | ], |
| 618 | - miscellaneousFreight:[ | 650 | + miscellaneousFreight: [ |
| 619 | - { validator: checkNegativeNum, trigger: 'blur' } | 651 | + { validator: checkNegativeNum, trigger: "blur" }, |
| 620 | ], | 652 | ], |
| 621 | currency: [ | 653 | currency: [ |
| 622 | - { required: true, message: '请选择币制', trigger: 'change' } | 654 | + { required: true, message: "请选择币制", trigger: "change" }, |
| 623 | ], | 655 | ], |
| 624 | mainGoodsInfo: [ | 656 | mainGoodsInfo: [ |
| 625 | - { required: true, message: '请输入主要物品信息', trigger: 'blur' }, | 657 | + { required: true, message: "请输入主要物品信息", trigger: "blur" }, |
| 626 | - { max: 200, message: '长度不能超过200个字符', trigger: 'blur' } | 658 | + { max: 200, message: "长度不能超过200个字符", trigger: "blur" }, |
| 627 | ], | 659 | ], |
| 628 | flightNumber: [ | 660 | flightNumber: [ |
| 629 | - { required: true, message: '请输入航班号', trigger: 'blur' }, | 661 | + { required: true, message: "请输入航班号", trigger: "blur" }, |
| 630 | - { max: 32, message: '长度不能超过32个字符', trigger: 'blur' } | 662 | + { max: 32, message: "长度不能超过32个字符", trigger: "blur" }, |
| 631 | ], | 663 | ], |
| 632 | billno: [ | 664 | billno: [ |
| 633 | - { required: true, message: '请输入提运单号', trigger: 'blur' }, | 665 | + { required: true, message: "请输入提运单号", trigger: "blur" }, |
| 634 | - { max: 37, message: '长度不能超过37个字符', trigger: 'blur' } | 666 | + { max: 37, message: "长度不能超过37个字符", trigger: "blur" }, |
| 635 | ], | 667 | ], |
| 636 | totalPackageNo: [ | 668 | totalPackageNo: [ |
| 637 | - { max: 37, message: '长度不能超过37个字符', trigger: 'blur' } | 669 | + { max: 37, message: "长度不能超过37个字符", trigger: "blur" }, |
| 638 | ], | 670 | ], |
| 639 | regulatoryVenueCode: [ | 671 | regulatoryVenueCode: [ |
| 640 | - { max: 10, message: '长度不能超过10个字符', trigger: 'blur' } | 672 | + { max: 10, message: "长度不能超过10个字符", trigger: "blur" }, |
| 641 | ], | 673 | ], |
| 642 | licenseKey: [ | 674 | licenseKey: [ |
| 643 | - { max: 19, message: '长度不能超过19个字符', trigger: 'blur' } | 675 | + { max: 19, message: "长度不能超过19个字符", trigger: "blur" }, |
| 644 | ], | 676 | ], |
| 645 | destinationCountryRegion: [ | 677 | destinationCountryRegion: [ |
| 646 | - { required: true, message: '请选择运抵国', trigger: 'change' } | 678 | + { required: true, message: "请选择运抵国", trigger: "change" }, |
| 647 | ], | 679 | ], |
| 648 | portCode: [ | 680 | portCode: [ |
| 649 | - { required: true, message: '请选择运指运港代码', trigger: 'change' } | 681 | + { required: true, message: "请选择运指运港代码", trigger: "change" }, |
| 650 | ], | 682 | ], |
| 651 | freight: [ | 683 | freight: [ |
| 652 | - { required: true, message: '请输入运费', trigger: 'blur' }, | 684 | + { required: true, message: "请输入运费", trigger: "blur" }, |
| 653 | - { validator: checkNegativeNum, trigger: 'blur' } | 685 | + { validator: checkNegativeNum, trigger: "blur" }, |
| 654 | ], | 686 | ], |
| 655 | freightCurrency: [ | 687 | freightCurrency: [ |
| 656 | - { required: true, message: '请选择运费币制', trigger: 'change' } | 688 | + { required: true, message: "请选择运费币制", trigger: "change" }, |
| 657 | ], | 689 | ], |
| 658 | freightTag: [ | 690 | freightTag: [ |
| 659 | - { required: true, message: '请选择运费标志', trigger: 'change' } | 691 | + { required: true, message: "请选择运费标志", trigger: "change" }, |
| 660 | ], | 692 | ], |
| 661 | insuredfee: [ | 693 | insuredfee: [ |
| 662 | - { required: true, message: '请输入保费', trigger: 'blur' }, | 694 | + { required: true, message: "请输入保费", trigger: "blur" }, |
| 663 | - { validator: checkInsuredFee, trigger: 'blur' } | 695 | + { validator: checkInsuredFee, trigger: "blur" }, |
| 664 | ], | 696 | ], |
| 665 | insuredfeeCurrency: [ | 697 | insuredfeeCurrency: [ |
| 666 | - { required: true, message: '请输入保费币制', trigger: 'blur' } | 698 | + { required: true, message: "请输入保费币制", trigger: "blur" }, |
| 667 | ], | 699 | ], |
| 668 | insuredfeeTag: [ | 700 | insuredfeeTag: [ |
| 669 | - { required: true, message: '请输选择保费标志', trigger: 'change' } | 701 | + { required: true, message: "请输选择保费标志", trigger: "change" }, |
| 670 | ], | 702 | ], |
| 671 | packageTypeCode: [ | 703 | packageTypeCode: [ |
| 672 | - { required: true, message: '请选择包装种类代码', trigger: 'change' } | 704 | + { required: true, message: "请选择包装种类代码", trigger: "change" }, |
| 673 | ], | 705 | ], |
| 674 | packNo: [ | 706 | packNo: [ |
| 675 | - { required: true, message: '请输入件数', trigger: 'blur' }, | 707 | + { required: true, message: "请输入件数", trigger: "blur" }, |
| 676 | - { validator: checkPackNo, trigger: 'blur' } | 708 | + { validator: checkPackNo, trigger: "blur" }, |
| 677 | ], | 709 | ], |
| 678 | weight: [ | 710 | weight: [ |
| 679 | - { required: true, message: '请输入毛重', trigger: 'blur' }, | 711 | + { required: true, message: "请输入毛重", trigger: "blur" }, |
| 680 | - { validator: checkNegativeNum, trigger: 'blur' } | 712 | + { validator: checkNegativeNum, trigger: "blur" }, |
| 681 | - ], | ||
| 682 | - netWeight: [ | ||
| 683 | - { required: true, message: '请输入净重', trigger: 'blur' } | ||
| 684 | ], | 713 | ], |
| 714 | + netWeight: [{ required: true, message: "请输入净重", trigger: "blur" }], | ||
| 685 | remark: [ | 715 | remark: [ |
| 686 | - { max: 1000, message: '长度不能超过1000个字符', trigger: 'blur' } | 716 | + { max: 1000, message: "长度不能超过1000个字符", trigger: "blur" }, |
| 687 | - ] | 717 | + ], |
| 688 | }, | 718 | }, |
| 689 | detailData: [], | 719 | detailData: [], |
| 690 | detialHeaderData: [ | 720 | detialHeaderData: [ |
| 691 | { | 721 | { |
| 692 | value: "rowDataEdit", | 722 | value: "rowDataEdit", |
| 693 | - expand:true, | 723 | + expand: true, |
| 694 | - width:0, | 724 | + width: 0, |
| 695 | }, | 725 | }, |
| 696 | { | 726 | { |
| 697 | name: "企业商品货号", | 727 | name: "企业商品货号", |
| ... | @@ -722,14 +752,12 @@ | ... | @@ -722,14 +752,12 @@ |
| 722 | value: "productCode", | 752 | value: "productCode", |
| 723 | width: "", | 753 | width: "", |
| 724 | align: "left", | 754 | align: "left", |
| 725 | - | ||
| 726 | }, | 755 | }, |
| 727 | { | 756 | { |
| 728 | name: "规格型号", | 757 | name: "规格型号", |
| 729 | value: "model", | 758 | value: "model", |
| 730 | width: "", | 759 | width: "", |
| 731 | align: "left", | 760 | align: "left", |
| 732 | - | ||
| 733 | }, | 761 | }, |
| 734 | { | 762 | { |
| 735 | name: "账册备案料号", | 763 | name: "账册备案料号", |
| ... | @@ -748,14 +776,14 @@ | ... | @@ -748,14 +776,14 @@ |
| 748 | value: "destinationCountryRegionCode", | 776 | value: "destinationCountryRegionCode", |
| 749 | width: "", | 777 | width: "", |
| 750 | align: "left", | 778 | align: "left", |
| 751 | - slot:true | 779 | + slot: true, |
| 752 | }, | 780 | }, |
| 753 | { | 781 | { |
| 754 | name: "计量单位", | 782 | name: "计量单位", |
| 755 | value: "unit", | 783 | value: "unit", |
| 756 | width: "", | 784 | width: "", |
| 757 | align: "left", | 785 | align: "left", |
| 758 | - slot:true | 786 | + slot: true, |
| 759 | }, | 787 | }, |
| 760 | { | 788 | { |
| 761 | name: "数量", | 789 | name: "数量", |
| ... | @@ -770,11 +798,18 @@ | ... | @@ -770,11 +798,18 @@ |
| 770 | align: "left", | 798 | align: "left", |
| 771 | }, | 799 | }, |
| 772 | { | 800 | { |
| 801 | + name: "法定单位", | ||
| 802 | + value: "unitLegalFirstCode", | ||
| 803 | + width: "", | ||
| 804 | + align: "left", | ||
| 805 | + slot: true, | ||
| 806 | + }, | ||
| 807 | + { | ||
| 773 | name: "币制", | 808 | name: "币制", |
| 774 | value: "currency", | 809 | value: "currency", |
| 775 | width: "", | 810 | width: "", |
| 776 | align: "left", | 811 | align: "left", |
| 777 | - slot:true | 812 | + slot: true, |
| 778 | }, | 813 | }, |
| 779 | { | 814 | { |
| 780 | name: "单价", | 815 | name: "单价", |
| ... | @@ -805,7 +840,7 @@ | ... | @@ -805,7 +840,7 @@ |
| 805 | entryLoading: false, | 840 | entryLoading: false, |
| 806 | }, | 841 | }, |
| 807 | logtableType: true, | 842 | logtableType: true, |
| 808 | - expandRowKeys:[], | 843 | + expandRowKeys: [], |
| 809 | isFold: false, | 844 | isFold: false, |
| 810 | // 用于保存原始数据 | 845 | // 用于保存原始数据 |
| 811 | originalDetailData: {}, | 846 | originalDetailData: {}, |
| ... | @@ -817,83 +852,88 @@ | ... | @@ -817,83 +852,88 @@ |
| 817 | created() { | 852 | created() { |
| 818 | if (this.$route.params.data) { | 853 | if (this.$route.params.data) { |
| 819 | this.declareId = this.$route.params.data.declareId; | 854 | this.declareId = this.$route.params.data.declareId; |
| 820 | - this.queryDeclareData(this.declareId) | 855 | + this.queryDeclareData(this.declareId); |
| 821 | - this.queryCustomerList() | 856 | + this.queryCustomerList(); |
| 822 | - this.queryPortList() | 857 | + this.queryPortList(); |
| 823 | } else { | 858 | } else { |
| 824 | this.back(); | 859 | this.back(); |
| 825 | } | 860 | } |
| 826 | }, | 861 | }, |
| 827 | beforeRouteLeave(to, from, next) { | 862 | beforeRouteLeave(to, from, next) { |
| 828 | - if (to.name === 'ReportingData') { | 863 | + if (to.name === "ReportingData") { |
| 829 | // 设置一个标志表示需要刷新数据 | 864 | // 设置一个标志表示需要刷新数据 |
| 830 | to.meta.needsRefresh = true; | 865 | to.meta.needsRefresh = true; |
| 831 | } | 866 | } |
| 832 | next(); | 867 | next(); |
| 833 | }, | 868 | }, |
| 834 | methods: { | 869 | methods: { |
| 835 | - mapDicDatas(dicArr, code){ | 870 | + mapDicDatas(dicArr, code) { |
| 836 | if (code != "") { | 871 | if (code != "") { |
| 837 | - return dicArr.filter(item => item.itemCode == code)[0].itemChineseName | 872 | + return dicArr.filter((item) => item.itemCode == code)[0] |
| 873 | + .itemChineseName; | ||
| 838 | } else { | 874 | } else { |
| 839 | - return '' | 875 | + return ""; |
| 840 | } | 876 | } |
| 841 | - | ||
| 842 | }, | 877 | }, |
| 843 | - mapCurrencyDatas(dicArr, code){ | 878 | + mapCurrencyDatas(dicArr, code) { |
| 844 | if (code != "") { | 879 | if (code != "") { |
| 845 | - return dicArr.filter(item => item.itemValue == code)[0].itemChineseName | 880 | + return dicArr.filter((item) => item.itemValue == code)[0] |
| 881 | + .itemChineseName; | ||
| 846 | } else { | 882 | } else { |
| 847 | - return '' | 883 | + return ""; |
| 848 | } | 884 | } |
| 849 | - | ||
| 850 | }, | 885 | }, |
| 851 | //获取客户下拉列表数据 | 886 | //获取客户下拉列表数据 |
| 852 | - queryCustomerList(){ | 887 | + queryCustomerList() { |
| 853 | - getCustomerList().then(res =>{ | 888 | + getCustomerList() |
| 889 | + .then((res) => { | ||
| 854 | if (res.code == 200) { | 890 | if (res.code == 200) { |
| 855 | - this.ebcDataList = res.data.value | 891 | + this.ebcDataList = res.data.value; |
| 856 | } else { | 892 | } else { |
| 857 | - this.ebcDataList = [] | 893 | + this.ebcDataList = []; |
| 858 | } | 894 | } |
| 859 | - | ||
| 860 | - }).catch(err =>{ | ||
| 861 | - console.log(err) | ||
| 862 | }) | 895 | }) |
| 896 | + .catch((err) => { | ||
| 897 | + console.log(err); | ||
| 898 | + }); | ||
| 863 | }, | 899 | }, |
| 864 | //获取口岸表数据 | 900 | //获取口岸表数据 |
| 865 | - queryPortList(){ | 901 | + queryPortList() { |
| 866 | - getPortList().then(res =>{ | 902 | + getPortList() |
| 903 | + .then((res) => { | ||
| 867 | if (res.code == 200) { | 904 | if (res.code == 200) { |
| 868 | - this.declareCustomsDataList = res.data.value | 905 | + this.declareCustomsDataList = res.data.value; |
| 869 | } else { | 906 | } else { |
| 870 | - this.declareCustomsDataList = [] | 907 | + this.declareCustomsDataList = []; |
| 871 | } | 908 | } |
| 872 | - | ||
| 873 | - }).catch(err =>{ | ||
| 874 | - console.log(err) | ||
| 875 | }) | 909 | }) |
| 910 | + .catch((err) => { | ||
| 911 | + console.log(err); | ||
| 912 | + }); | ||
| 876 | }, | 913 | }, |
| 877 | //获取申报数据 | 914 | //获取申报数据 |
| 878 | queryDeclareData(declareId) { | 915 | queryDeclareData(declareId) { |
| 879 | - getDeclareData({declareId}).then(res =>{ | 916 | + getDeclareData({ declareId }) |
| 917 | + .then((res) => { | ||
| 880 | // console.log(1111, res) | 918 | // console.log(1111, res) |
| 881 | if (res.code == 200) { | 919 | if (res.code == 200) { |
| 882 | - res.data.declare.orderNo = res.data.declare.orderno | 920 | + res.data.declare.orderNo = res.data.declare.orderno; |
| 883 | - this.formData = res.data.declare | 921 | + this.formData = res.data.declare; |
| 884 | - this.formData.appType=9610 | 922 | + this.formData.appType = 9610; |
| 885 | - this.detailData = res.data.product.length ? res.data.product.map((item, index) =>{ | 923 | + this.detailData = res.data.product.length |
| 886 | - item.gnum = index+1 | 924 | + ? res.data.product.map((item, index) => { |
| 887 | - return item | 925 | + item.gnum = index + 1; |
| 888 | - }) : [] | 926 | + return item; |
| 927 | + }) | ||
| 928 | + : []; | ||
| 889 | } else { | 929 | } else { |
| 890 | - this.detailData = [] | 930 | + this.detailData = []; |
| 891 | - this.formData = {} | 931 | + this.formData = {}; |
| 892 | } | 932 | } |
| 893 | - | ||
| 894 | - }).catch(err =>{ | ||
| 895 | - console.log(err) | ||
| 896 | }) | 933 | }) |
| 934 | + .catch((err) => { | ||
| 935 | + console.log(err); | ||
| 936 | + }); | ||
| 897 | }, | 937 | }, |
| 898 | 938 | ||
| 899 | hiddenLogTable() { | 939 | hiddenLogTable() { |
| ... | @@ -926,33 +966,36 @@ | ... | @@ -926,33 +966,36 @@ |
| 926 | if (!isValid) { | 966 | if (!isValid) { |
| 927 | // console.log(22) | 967 | // console.log(22) |
| 928 | this.lastItemValid = false; // 标记上一次新增的 item 未通过校验 | 968 | this.lastItemValid = false; // 标记上一次新增的 item 未通过校验 |
| 929 | - this.$message.warning('请先完善新增的商品信息'); | 969 | + this.$message.warning("请先完善新增的商品信息"); |
| 930 | return; | 970 | return; |
| 931 | } | 971 | } |
| 932 | } | 972 | } |
| 933 | } | 973 | } |
| 934 | // 校验通过,允许新增 item | 974 | // 校验通过,允许新增 item |
| 935 | - let orderNum = this.detailData.at(-1) === undefined ? 1 : this.detailData.at(-1).gnum + 1; | 975 | + let orderNum = |
| 976 | + this.detailData.at(-1) === undefined | ||
| 977 | + ? 1 | ||
| 978 | + : this.detailData.at(-1).gnum + 1; | ||
| 936 | this.detailData.push({ | 979 | this.detailData.push({ |
| 937 | - "gnum":orderNum, | 980 | + gnum: orderNum, |
| 938 | - "accountBookMaterialNumber": "", | 981 | + accountBookMaterialNumber: "", |
| 939 | - "barCode": "", | 982 | + barCode: "", |
| 940 | - "currency": "", | 983 | + currency: "", |
| 941 | - "destinationCountryRegionCode": "", | 984 | + destinationCountryRegionCode: "", |
| 942 | - "enterpriseProductCode": "", | 985 | + enterpriseProductCode: "", |
| 943 | - "enterpriseProductDescribe": "", | 986 | + enterpriseProductDescribe: "", |
| 944 | - "enterpriseProductName": "", | 987 | + enterpriseProductName: "", |
| 945 | - "legalQty": 0, | 988 | + legalQty: 0, |
| 946 | - "model": "", | 989 | + model: "", |
| 947 | - "netWeight": 0, | 990 | + netWeight: 0, |
| 948 | - "price": 0, | 991 | + price: 0, |
| 949 | - "productCode": "", | 992 | + productCode: "", |
| 950 | - "productName": "", | 993 | + productName: "", |
| 951 | - "qty": 0, | 994 | + qty: 0, |
| 952 | - "remark": "", | 995 | + remark: "", |
| 953 | - "totalPrice": 0, | 996 | + totalPrice: 0, |
| 954 | - "unit": "", | 997 | + unit: "", |
| 955 | - "isNew": true // 添加 isNew 标志 | 998 | + isNew: true, // 添加 isNew 标志 |
| 956 | }); | 999 | }); |
| 957 | 1000 | ||
| 958 | this.$nextTick(() => { | 1001 | this.$nextTick(() => { |
| ... | @@ -960,59 +1003,61 @@ | ... | @@ -960,59 +1003,61 @@ |
| 960 | this.lastItemValid = true; // 重置标志位 | 1003 | this.lastItemValid = true; // 重置标志位 |
| 961 | }); | 1004 | }); |
| 962 | }, | 1005 | }, |
| 963 | - updateRow(row){ | 1006 | + updateRow(row) { |
| 964 | - if (this.expandRowKeys.length > 0) return | 1007 | + if (this.expandRowKeys.length > 0) return; |
| 965 | - this.expandRowKeys = [row.gnum] | 1008 | + this.expandRowKeys = [row.gnum]; |
| 966 | this.currentRowKey = row.gnum; // 设置当前行的 gnum | 1009 | this.currentRowKey = row.gnum; // 设置当前行的 gnum |
| 967 | 1010 | ||
| 968 | // 保存原始数据 | 1011 | // 保存原始数据 |
| 969 | this.originalDetailData[row.gnum] = { ...row }; | 1012 | this.originalDetailData[row.gnum] = { ...row }; |
| 970 | 1013 | ||
| 971 | - let obj = {} | 1014 | + let obj = {}; |
| 972 | for (let key in row) { | 1015 | for (let key in row) { |
| 973 | - obj[key] = row[key] | 1016 | + obj[key] = row[key]; |
| 974 | } | 1017 | } |
| 975 | 1018 | ||
| 976 | - this.$nextTick(()=>{ | 1019 | + this.$nextTick(() => { |
| 977 | - this.$refs.rowEditForm.tableRowformData = obj | 1020 | + this.$refs.rowEditForm.tableRowformData = obj; |
| 978 | // const table = this.$refs.entryTable.$el.querySelector('.el-table__body-wrapper'); | 1021 | // const table = this.$refs.entryTable.$el.querySelector('.el-table__body-wrapper'); |
| 979 | // table.scrollTop = row.gnum*51+10 | 1022 | // table.scrollTop = row.gnum*51+10 |
| 980 | - }) | 1023 | + }); |
| 981 | }, | 1024 | }, |
| 982 | - getTotalNumber(){ | 1025 | + getTotalNumber() { |
| 983 | let totalNetWeight = 0; | 1026 | let totalNetWeight = 0; |
| 984 | - let totalGoodsValue = 0 | 1027 | + let totalGoodsValue = 0; |
| 985 | - for (let i=0; i<this.detailData.length; i++) { | 1028 | + for (let i = 0; i < this.detailData.length; i++) { |
| 986 | - totalNetWeight += Number(this.detailData[i].netWeight) | 1029 | + totalNetWeight += Number(this.detailData[i].netWeight); |
| 987 | - totalGoodsValue += Number(this.detailData[i].totalPrice) | 1030 | + totalGoodsValue += Number(this.detailData[i].totalPrice); |
| 988 | } | 1031 | } |
| 989 | - this.formData.netWeight = totalNetWeight.toFixed(5) | 1032 | + this.formData.netWeight = totalNetWeight.toFixed(5); |
| 990 | - this.formData.goodsValue = totalGoodsValue.toFixed(5) | 1033 | + this.formData.goodsValue = totalGoodsValue.toFixed(5); |
| 991 | }, | 1034 | }, |
| 992 | - deleteRow(row){ | 1035 | + deleteRow(row) { |
| 993 | - this.detailData = this.detailData.filter(item => item.gnum !=row.gnum).map((item, index) =>{ | 1036 | + this.detailData = this.detailData |
| 994 | - item.gnum = index+1 | 1037 | + .filter((item) => item.gnum != row.gnum) |
| 995 | - return item | 1038 | + .map((item, index) => { |
| 996 | - }) | 1039 | + item.gnum = index + 1; |
| 997 | - this.$nextTick(()=>{ | 1040 | + return item; |
| 998 | - this.getTotalNumber() | 1041 | + }); |
| 999 | - this.expandRowKeys = [] | 1042 | + this.$nextTick(() => { |
| 1000 | - this.detailData.length | 1043 | + this.getTotalNumber(); |
| 1044 | + this.expandRowKeys = []; | ||
| 1045 | + this.detailData.length; | ||
| 1001 | this.lastItemValid = this.detailData.length === row.index; | 1046 | this.lastItemValid = this.detailData.length === row.index; |
| 1002 | - }) | 1047 | + }); |
| 1003 | }, | 1048 | }, |
| 1004 | - rowFormDataSave(props){ | 1049 | + rowFormDataSave(props) { |
| 1005 | - this.detailData.map(item =>{ | 1050 | + this.detailData.map((item) => { |
| 1006 | if (item.gnum == props.gnum) { | 1051 | if (item.gnum == props.gnum) { |
| 1007 | - item = Object.assign(item, props.tableRowformData) | 1052 | + item = Object.assign(item, props.tableRowformData); |
| 1008 | - return item | 1053 | + return item; |
| 1009 | } | 1054 | } |
| 1010 | - }) | 1055 | + }); |
| 1011 | - this.expandRowKeys = [] | 1056 | + this.expandRowKeys = []; |
| 1012 | - this.$nextTick(()=>{ | 1057 | + this.$nextTick(() => { |
| 1013 | this.lastItemValid = true; | 1058 | this.lastItemValid = true; |
| 1014 | - this.getTotalNumber() | 1059 | + this.getTotalNumber(); |
| 1015 | - }) | 1060 | + }); |
| 1016 | }, | 1061 | }, |
| 1017 | cancelEditRowData(index) { | 1062 | cancelEditRowData(index) { |
| 1018 | this.lastItemValid = true; // 重置标志位 | 1063 | this.lastItemValid = true; // 重置标志位 |
| ... | @@ -1036,40 +1081,39 @@ | ... | @@ -1036,40 +1081,39 @@ |
| 1036 | this.lastItemValid = isValid; | 1081 | this.lastItemValid = isValid; |
| 1037 | }, | 1082 | }, |
| 1038 | //提交更新数据 | 1083 | //提交更新数据 |
| 1039 | - submitEditedReportDatas(){ | 1084 | + submitEditedReportDatas() { |
| 1040 | this.$refs.editForm.validate((valid) => { | 1085 | this.$refs.editForm.validate((valid) => { |
| 1041 | if (valid) { | 1086 | if (valid) { |
| 1042 | let data = { | 1087 | let data = { |
| 1043 | declare: this.formData, | 1088 | declare: this.formData, |
| 1044 | - product: this.detailData | 1089 | + product: this.detailData, |
| 1045 | - } | 1090 | + }; |
| 1046 | - updateDeclareData(data).then(res =>{ | 1091 | + updateDeclareData(data) |
| 1092 | + .then((res) => { | ||
| 1047 | if (res.code == 200) { | 1093 | if (res.code == 200) { |
| 1048 | this.msgSuccess("数据更新成功"); | 1094 | this.msgSuccess("数据更新成功"); |
| 1049 | - this.queryDeclareData(this.declareId) | 1095 | + this.queryDeclareData(this.declareId); |
| 1050 | this.lastItemValid = true; | 1096 | this.lastItemValid = true; |
| 1051 | } else { | 1097 | } else { |
| 1052 | this.alertWarningMsg(res.message); | 1098 | this.alertWarningMsg(res.message); |
| 1053 | } | 1099 | } |
| 1054 | - | ||
| 1055 | - }).catch(err =>{ | ||
| 1056 | - console.log(err) | ||
| 1057 | }) | 1100 | }) |
| 1101 | + .catch((err) => { | ||
| 1102 | + console.log(err); | ||
| 1103 | + }); | ||
| 1058 | } else { | 1104 | } else { |
| 1059 | return false; | 1105 | return false; |
| 1060 | } | 1106 | } |
| 1061 | }); | 1107 | }); |
| 1062 | }, | 1108 | }, |
| 1063 | //取消编辑 | 1109 | //取消编辑 |
| 1064 | - cancelEditedReportDatas(){ | 1110 | + cancelEditedReportDatas() {}, |
| 1065 | - | ||
| 1066 | - } | ||
| 1067 | }, | 1111 | }, |
| 1068 | - }; | 1112 | +}; |
| 1069 | - </script> | 1113 | +</script> |
| 1070 | 1114 | ||
| 1071 | - <style scoped lang="scss"> | 1115 | +<style scoped lang="scss"> |
| 1072 | - .entry { | 1116 | +.entry { |
| 1073 | width: 100%; | 1117 | width: 100%; |
| 1074 | height: 100%; | 1118 | height: 100%; |
| 1075 | padding: 10px; | 1119 | padding: 10px; |
| ... | @@ -1093,49 +1137,49 @@ | ... | @@ -1093,49 +1137,49 @@ |
| 1093 | .titleBorder { | 1137 | .titleBorder { |
| 1094 | border-bottom: 1px solid #333; | 1138 | border-bottom: 1px solid #333; |
| 1095 | } | 1139 | } |
| 1096 | - } | 1140 | +} |
| 1097 | - .addNewItem{ | 1141 | +.addNewItem { |
| 1098 | display: flex; | 1142 | display: flex; |
| 1099 | justify-content: flex-start; | 1143 | justify-content: flex-start; |
| 1100 | align-items: center; | 1144 | align-items: center; |
| 1101 | - color:#007AB7; | 1145 | + color: #007ab7; |
| 1102 | line-height: 38px; | 1146 | line-height: 38px; |
| 1103 | - i{ | 1147 | + i { |
| 1104 | margin-right: 3px; | 1148 | margin-right: 3px; |
| 1105 | } | 1149 | } |
| 1106 | - span{ | 1150 | + span { |
| 1107 | font-size: 13px; | 1151 | font-size: 13px; |
| 1108 | font-weight: 500; | 1152 | font-weight: 500; |
| 1109 | cursor: pointer; | 1153 | cursor: pointer; |
| 1110 | } | 1154 | } |
| 1111 | - } | 1155 | +} |
| 1112 | - .formRowDataOperate{ | 1156 | +.formRowDataOperate { |
| 1113 | text-align: right; | 1157 | text-align: right; |
| 1114 | padding: 0 20px; | 1158 | padding: 0 20px; |
| 1115 | - a{ | 1159 | + a { |
| 1116 | - color: #007AB7; | 1160 | + color: #007ab7; |
| 1117 | font-weight: 600; | 1161 | font-weight: 600; |
| 1118 | - &:first-child{ | 1162 | + &:first-child { |
| 1119 | margin-right: 5px; | 1163 | margin-right: 5px; |
| 1120 | } | 1164 | } |
| 1121 | } | 1165 | } |
| 1122 | - } | 1166 | +} |
| 1123 | - .fedexFormEditStyle .el-form-item:has(.formError) { | 1167 | +.fedexFormEditStyle .el-form-item:has(.formError) { |
| 1124 | margin-bottom: 30px !important; | 1168 | margin-bottom: 30px !important; |
| 1125 | - } | 1169 | +} |
| 1126 | - .fedexFormEditStyle .el-form-item .formError{ | 1170 | +.fedexFormEditStyle .el-form-item .formError { |
| 1127 | - padding:0 0.9375rem !important; | 1171 | + padding: 0 0.9375rem !important; |
| 1128 | - } | 1172 | +} |
| 1129 | - .partsHidden{ | 1173 | +.partsHidden { |
| 1130 | height: 164px; | 1174 | height: 164px; |
| 1131 | overflow: hidden; | 1175 | overflow: hidden; |
| 1132 | - } | 1176 | +} |
| 1133 | - .fold-unfold{ | 1177 | +.fold-unfold { |
| 1134 | display: flex; | 1178 | display: flex; |
| 1135 | justify-content: center; | 1179 | justify-content: center; |
| 1136 | - padding-top:8px; | 1180 | + padding-top: 8px; |
| 1137 | - img{ | 1181 | + img { |
| 1138 | width: 22px; | 1182 | width: 22px; |
| 1139 | } | 1183 | } |
| 1140 | - } | 1184 | +} |
| 1141 | - </style> | 1185 | +</style> | ... | ... |
-
Please register or login to post a comment