Showing
1 changed file
with
322 additions
and
407 deletions
| ... | @@ -17,11 +17,11 @@ | ... | @@ -17,11 +17,11 @@ |
| 17 | > | 17 | > |
| 18 | <el-row :gutter="5"> | 18 | <el-row :gutter="5"> |
| 19 | <el-col :span="3"> | 19 | <el-col :span="3"> |
| 20 | - <Formitem label="电商企业名称" prop="ebccode"> | 20 | + <Formitem label="电商企业名称" prop="ebpCode"> |
| 21 | <el-select | 21 | <el-select |
| 22 | type="text" | 22 | type="text" |
| 23 | - id="inputInner--ebccode" | 23 | + id="inputInner--ebpCode" |
| 24 | - v-model="formData.ebccode" | 24 | + v-model="formData.ebpCode" |
| 25 | clearable | 25 | clearable |
| 26 | filterable | 26 | filterable |
| 27 | placeholder="" | 27 | placeholder="" |
| ... | @@ -35,23 +35,20 @@ | ... | @@ -35,23 +35,20 @@ |
| 35 | </el-select> | 35 | </el-select> |
| 36 | </Formitem> | 36 | </Formitem> |
| 37 | </el-col> | 37 | </el-col> |
| 38 | - <!-- 订单编号 --> | ||
| 39 | <el-col :span="3"> | 38 | <el-col :span="3"> |
| 40 | - <Formitem label="订单编号" prop="logisticsCode"> | 39 | + <Formitem label="订单编号" prop="orderNo"> |
| 41 | <el-input | 40 | <el-input |
| 42 | type="text" | 41 | type="text" |
| 43 | class="inputShadow" | 42 | class="inputShadow" |
| 44 | - id="inputInner--logisticsCode" | 43 | + id="inputInner--orderNo" |
| 45 | resize="none" | 44 | resize="none" |
| 46 | - v-model="formData.logisticsCode" | 45 | + v-model="formData.orderNo" |
| 47 | disabled | 46 | disabled |
| 48 | clearable | 47 | clearable |
| 49 | placeholder="" | 48 | placeholder="" |
| 50 | ></el-input> | 49 | ></el-input> |
| 51 | </Formitem> | 50 | </Formitem> |
| 52 | </el-col> | 51 | </el-col> |
| 53 | - | ||
| 54 | - <!-- 电商平台名称 --> | ||
| 55 | <el-col :span="3"> | 52 | <el-col :span="3"> |
| 56 | <Formitem label="物流运单编号" prop="logisticsNo"> | 53 | <Formitem label="物流运单编号" prop="logisticsNo"> |
| 57 | <el-input | 54 | <el-input |
| ... | @@ -65,8 +62,6 @@ | ... | @@ -65,8 +62,6 @@ |
| 65 | ></el-input> | 62 | ></el-input> |
| 66 | </Formitem> | 63 | </Formitem> |
| 67 | </el-col> | 64 | </el-col> |
| 68 | - | ||
| 69 | - <!-- 电商平台代码、电商平台名称、生产销售企业代码、生产销售企业名称、申报业务类型 --> | ||
| 70 | <el-col :span="3"> | 65 | <el-col :span="3"> |
| 71 | <Formitem label="电商平台代码" prop="ebpCode"> | 66 | <Formitem label="电商平台代码" prop="ebpCode"> |
| 72 | <el-input | 67 | <el-input |
| ... | @@ -80,7 +75,7 @@ | ... | @@ -80,7 +75,7 @@ |
| 80 | ></el-input> | 75 | ></el-input> |
| 81 | </Formitem> | 76 | </Formitem> |
| 82 | </el-col> | 77 | </el-col> |
| 83 | - <el-col :span="6"> | 78 | + <el-col :span="3"> |
| 84 | <Formitem label="电商平台名称" prop="ebpName"> | 79 | <Formitem label="电商平台名称" prop="ebpName"> |
| 85 | <el-input | 80 | <el-input |
| 86 | type="text" | 81 | type="text" |
| ... | @@ -93,43 +88,38 @@ | ... | @@ -93,43 +88,38 @@ |
| 93 | ></el-input> | 88 | ></el-input> |
| 94 | </Formitem> | 89 | </Formitem> |
| 95 | </el-col> | 90 | </el-col> |
| 96 | - </el-row> | ||
| 97 | - <el-row :gutter="5"> | ||
| 98 | <el-col :span="3"> | 91 | <el-col :span="3"> |
| 99 | - <Formitem | 92 | + <Formitem label="生产销售企业代码" prop="ownerCode"> |
| 100 | - label="生产销售企业代码" | ||
| 101 | - prop="productionSaleEnterpriseCode" | ||
| 102 | - > | ||
| 103 | <el-input | 93 | <el-input |
| 104 | type="text" | 94 | type="text" |
| 105 | class="inputShadow" | 95 | class="inputShadow" |
| 106 | - id="inputInner--productionSaleEnterpriseCode" | 96 | + id="inputInner--ownerCode" |
| 107 | resize="none" | 97 | resize="none" |
| 108 | - v-model="formData.productionSaleEnterpriseCode" | 98 | + v-model="formData.ownerCode" |
| 109 | clearable | 99 | clearable |
| 110 | placeholder="" | 100 | placeholder="" |
| 111 | ></el-input> | 101 | ></el-input> |
| 112 | </Formitem> | 102 | </Formitem> |
| 113 | </el-col> | 103 | </el-col> |
| 114 | - <el-col :span="6"> | 104 | + <el-col :span="3"> |
| 115 | - <Formitem label="生产销售企业名称" prop="ebcName"> | 105 | + <Formitem label="生产销售企业名称" prop="ownerName"> |
| 116 | <el-input | 106 | <el-input |
| 117 | type="text" | 107 | type="text" |
| 118 | class="inputShadow" | 108 | class="inputShadow" |
| 119 | - id="inputInner--ebcName" | 109 | + id="inputInner--ownerName" |
| 120 | resize="none" | 110 | resize="none" |
| 121 | - v-model="formData.ebcName" | 111 | + v-model="formData.ownerName" |
| 122 | clearable | 112 | clearable |
| 123 | placeholder="" | 113 | placeholder="" |
| 124 | ></el-input> | 114 | ></el-input> |
| 125 | </Formitem> | 115 | </Formitem> |
| 126 | </el-col> | 116 | </el-col> |
| 127 | <el-col :span="3"> | 117 | <el-col :span="3"> |
| 128 | - <Formitem label="运抵国(地区)" prop="destinationCountryRegion"> | 118 | + <Formitem label="运抵国(地区)" prop="country "> |
| 129 | <el-select | 119 | <el-select |
| 130 | type="text" | 120 | type="text" |
| 131 | - id="inputInner--destinationCountryRegion" | 121 | + id="inputInner--country " |
| 132 | - v-model="formData.destinationCountryRegion" | 122 | + v-model="formData.country" |
| 133 | clearable | 123 | clearable |
| 134 | filterable | 124 | filterable |
| 135 | placeholder="" | 125 | placeholder="" |
| ... | @@ -145,11 +135,11 @@ | ... | @@ -145,11 +135,11 @@ |
| 145 | </Formitem> | 135 | </Formitem> |
| 146 | </el-col> | 136 | </el-col> |
| 147 | <el-col :span="3"> | 137 | <el-col :span="3"> |
| 148 | - <Formitem label="指运港代码" prop="portCode"> | 138 | + <Formitem label="指运港代码" prop="pod"> |
| 149 | <el-select | 139 | <el-select |
| 150 | type="text" | 140 | type="text" |
| 151 | - id="inputInner--portCode" | 141 | + id="inputInner--pod" |
| 152 | - v-model="formData.portCode" | 142 | + v-model="formData.pod" |
| 153 | clearable | 143 | clearable |
| 154 | filterable | 144 | filterable |
| 155 | placeholder="" | 145 | placeholder="" |
| ... | @@ -165,13 +155,13 @@ | ... | @@ -165,13 +155,13 @@ |
| 165 | </Formitem> | 155 | </Formitem> |
| 166 | </el-col> | 156 | </el-col> |
| 167 | <el-col :span="3"> | 157 | <el-col :span="3"> |
| 168 | - <Formitem label="贸易方式" prop="appType"> | 158 | + <Formitem label="贸易方式" prop="tradeMode"> |
| 169 | <el-input | 159 | <el-input |
| 170 | type="text" | 160 | type="text" |
| 171 | class="inputShadow" | 161 | class="inputShadow" |
| 172 | - id="inputInner--appType" | 162 | + id="inputInner--tradeMode" |
| 173 | resize="none" | 163 | resize="none" |
| 174 | - v-model="formData.appType" | 164 | + v-model="formData.tradeMode" |
| 175 | disabled | 165 | disabled |
| 176 | clearable | 166 | clearable |
| 177 | placeholder="" | 167 | placeholder="" |
| ... | @@ -328,13 +318,13 @@ | ... | @@ -328,13 +318,13 @@ |
| 328 | </Formitem> | 318 | </Formitem> |
| 329 | </el-col> | 319 | </el-col> |
| 330 | <el-col :span="6"> | 320 | <el-col :span="6"> |
| 331 | - <Formitem label="主要货物信息" prop="mainGoodsInfo"> | 321 | + <Formitem label="主要货物信息" prop="goodsInfo"> |
| 332 | <el-input | 322 | <el-input |
| 333 | type="text" | 323 | type="text" |
| 334 | class="inputShadow" | 324 | class="inputShadow" |
| 335 | - id="inputInner--mainGoodsInfo" | 325 | + id="inputInner--goodsInfo" |
| 336 | resize="none" | 326 | resize="none" |
| 337 | - v-model="formData.mainGoodsInfo" | 327 | + v-model="formData.goodsInfo" |
| 338 | clearable | 328 | clearable |
| 339 | placeholder="" | 329 | placeholder="" |
| 340 | ></el-input> | 330 | ></el-input> |
| ... | @@ -354,11 +344,89 @@ | ... | @@ -354,11 +344,89 @@ |
| 354 | </Formitem> | 344 | </Formitem> |
| 355 | </el-col> | 345 | </el-col> |
| 356 | <el-col :span="3"> | 346 | <el-col :span="3"> |
| 357 | - <Formitem label="包装种类代码" prop="packageTypeCode"> | 347 | + <Formitem label="申报业务类型" prop="statisticsFlag"> |
| 348 | + <el-select | ||
| 349 | + type="text" | ||
| 350 | + id="inputInner--statisticsFlag" | ||
| 351 | + v-model="formData.statisticsFlag" | ||
| 352 | + clearable | ||
| 353 | + placeholder="" | ||
| 354 | + > | ||
| 355 | + <el-option | ||
| 356 | + v-for="(item, index) in $store.getters.dict | ||
| 357 | + .DECLARE_STATISTICS_FLAG" | ||
| 358 | + :key="index" | ||
| 359 | + :label="item.itemChineseName" | ||
| 360 | + :value="item.itemValue" | ||
| 361 | + ></el-option> | ||
| 362 | + </el-select> | ||
| 363 | + </Formitem> | ||
| 364 | + </el-col> | ||
| 365 | + <el-col :span="3"> | ||
| 366 | + <Formitem label="申报地海关" prop="port"> | ||
| 358 | <el-select | 367 | <el-select |
| 359 | type="text" | 368 | type="text" |
| 360 | - id="inputInner--packageTypeCode" | 369 | + id="inputInner--port" |
| 361 | - v-model="formData.packageTypeCode" | 370 | + v-model="formData.port" |
| 371 | + filterable | ||
| 372 | + clearable | ||
| 373 | + placeholder="" | ||
| 374 | + > | ||
| 375 | + <el-option | ||
| 376 | + v-for="(item, index) in declareCustomsDataList" | ||
| 377 | + :key="index" | ||
| 378 | + :label="item.declarationPortCode" | ||
| 379 | + :value="item.declarationPortCode" | ||
| 380 | + ></el-option> | ||
| 381 | + </el-select> | ||
| 382 | + </Formitem> | ||
| 383 | + </el-col> | ||
| 384 | + <el-col :span="3"> | ||
| 385 | + <Formitem label="区内企业代码" prop="iacCode"> | ||
| 386 | + <el-input | ||
| 387 | + class="inputShadow" | ||
| 388 | + id="inputInner--iacCode" | ||
| 389 | + resize="none" | ||
| 390 | + maxlength="9" | ||
| 391 | + v-model.number="formData.iacCode" | ||
| 392 | + clearable | ||
| 393 | + placeholder="" | ||
| 394 | + ></el-input> | ||
| 395 | + </Formitem> | ||
| 396 | + </el-col> | ||
| 397 | + <el-col :span="3"> | ||
| 398 | + <Formitem label="区内企业名称" prop="iacName"> | ||
| 399 | + <el-input | ||
| 400 | + class="inputShadow" | ||
| 401 | + id="inputInner--iacName" | ||
| 402 | + resize="none" | ||
| 403 | + maxlength="9" | ||
| 404 | + v-model.number="formData.iacName" | ||
| 405 | + clearable | ||
| 406 | + placeholder="" | ||
| 407 | + ></el-input> | ||
| 408 | + </Formitem> | ||
| 409 | + </el-col> | ||
| 410 | + <el-col :span="3"> | ||
| 411 | + <Formitem label="账册编号" prop="emsNo"> | ||
| 412 | + <el-input | ||
| 413 | + class="inputShadow" | ||
| 414 | + id="inputInner--emsNo" | ||
| 415 | + resize="none" | ||
| 416 | + maxlength="9" | ||
| 417 | + v-model.number="formData.emsNo" | ||
| 418 | + clearable | ||
| 419 | + placeholder="" | ||
| 420 | + ></el-input> | ||
| 421 | + </Formitem> | ||
| 422 | + </el-col> | ||
| 423 | + | ||
| 424 | + <el-col :span="3"> | ||
| 425 | + <Formitem label="包装种类代码" prop="wrapType"> | ||
| 426 | + <el-select | ||
| 427 | + type="text" | ||
| 428 | + id="inputInner--wrapType" | ||
| 429 | + v-model="formData.wrapType" | ||
| 362 | clearable | 430 | clearable |
| 363 | placeholder="" | 431 | placeholder="" |
| 364 | > | 432 | > |
| ... | @@ -411,9 +479,9 @@ | ... | @@ -411,9 +479,9 @@ |
| 411 | ></el-input> | 479 | ></el-input> |
| 412 | </Formitem> | 480 | </Formitem> |
| 413 | </el-col> | 481 | </el-col> |
| 414 | - | 482 | + </el-row> |
| 415 | - <!-- ===================== --> | 483 | + <el-row :gutter="5"> |
| 416 | - <el-col :span="3"> | 484 | + <!-- <el-col :span="3"> |
| 417 | <Formitem label="出口日期" prop="exportDate"> | 485 | <Formitem label="出口日期" prop="exportDate"> |
| 418 | <el-date-picker | 486 | <el-date-picker |
| 419 | class="inputInner--createTime" | 487 | class="inputInner--createTime" |
| ... | @@ -425,12 +493,8 @@ | ... | @@ -425,12 +493,8 @@ |
| 425 | value-format="yyyy-MM-dd" | 493 | value-format="yyyy-MM-dd" |
| 426 | /> | 494 | /> |
| 427 | </Formitem> | 495 | </Formitem> |
| 428 | - </el-col> | 496 | + </el-col> --> |
| 429 | - | 497 | + <!-- <el-col :span="3"> |
| 430 | - <!-- 商品金额 --> | ||
| 431 | - </el-row> | ||
| 432 | - <el-row :gutter="5"> | ||
| 433 | - <el-col :span="3"> | ||
| 434 | <Formitem label="航班号" prop="flightNumber"> | 498 | <Formitem label="航班号" prop="flightNumber"> |
| 435 | <el-input | 499 | <el-input |
| 436 | type="text" | 500 | type="text" |
| ... | @@ -442,9 +506,8 @@ | ... | @@ -442,9 +506,8 @@ |
| 442 | placeholder="" | 506 | placeholder="" |
| 443 | ></el-input> | 507 | ></el-input> |
| 444 | </Formitem> | 508 | </Formitem> |
| 445 | - </el-col> | 509 | + </el-col> --> |
| 446 | - <!-- 备注 --> | 510 | + <!-- <el-col :span="3"> |
| 447 | - <el-col :span="3"> | ||
| 448 | <Formitem label="提运单号" prop="billno"> | 511 | <Formitem label="提运单号" prop="billno"> |
| 449 | <el-input | 512 | <el-input |
| 450 | type="text" | 513 | type="text" |
| ... | @@ -456,8 +519,8 @@ | ... | @@ -456,8 +519,8 @@ |
| 456 | placeholder="" | 519 | placeholder="" |
| 457 | ></el-input> | 520 | ></el-input> |
| 458 | </Formitem> | 521 | </Formitem> |
| 459 | - </el-col> | 522 | + </el-col> --> |
| 460 | - <el-col :span="3"> | 523 | + <!-- <el-col :span="3"> |
| 461 | <Formitem label="总包号" prop="totalPackageNo"> | 524 | <Formitem label="总包号" prop="totalPackageNo"> |
| 462 | <el-input | 525 | <el-input |
| 463 | type="text" | 526 | type="text" |
| ... | @@ -469,8 +532,8 @@ | ... | @@ -469,8 +532,8 @@ |
| 469 | placeholder="" | 532 | placeholder="" |
| 470 | ></el-input> | 533 | ></el-input> |
| 471 | </Formitem> | 534 | </Formitem> |
| 472 | - </el-col> | 535 | + </el-col> --> |
| 473 | - <el-col :span="3"> | 536 | + <!-- <el-col :span="3"> |
| 474 | <Formitem label="监管场所代码" prop="regulatoryVenueCode"> | 537 | <Formitem label="监管场所代码" prop="regulatoryVenueCode"> |
| 475 | <el-input | 538 | <el-input |
| 476 | type="text" | 539 | type="text" |
| ... | @@ -482,8 +545,8 @@ | ... | @@ -482,8 +545,8 @@ |
| 482 | placeholder="" | 545 | placeholder="" |
| 483 | ></el-input> | 546 | ></el-input> |
| 484 | </Formitem> | 547 | </Formitem> |
| 485 | - </el-col> | 548 | + </el-col> --> |
| 486 | - <el-col :span="3"> | 549 | + <!-- <el-col :span="3"> |
| 487 | <Formitem label="许可证号" prop="licenseKey"> | 550 | <Formitem label="许可证号" prop="licenseKey"> |
| 488 | <el-input | 551 | <el-input |
| 489 | type="text" | 552 | type="text" |
| ... | @@ -495,7 +558,7 @@ | ... | @@ -495,7 +558,7 @@ |
| 495 | placeholder="" | 558 | placeholder="" |
| 496 | ></el-input> | 559 | ></el-input> |
| 497 | </Formitem> | 560 | </Formitem> |
| 498 | - </el-col> | 561 | + </el-col> --> |
| 499 | </el-row> | 562 | </el-row> |
| 500 | </el-form> | 563 | </el-form> |
| 501 | </section> | 564 | </section> |
| ... | @@ -527,7 +590,7 @@ | ... | @@ -527,7 +590,7 @@ |
| 527 | :rowKey="'gnum'" | 590 | :rowKey="'gnum'" |
| 528 | :expandRowKeys="expandRowKeys" | 591 | :expandRowKeys="expandRowKeys" |
| 529 | > | 592 | > |
| 530 | - <template slot="rowDataEdit" slot-scope="props"> | 593 | + <!-- <template slot="rowDataEdit" slot-scope="props"> |
| 531 | <RowDataEditForm | 594 | <RowDataEditForm |
| 532 | ref="rowEditForm" | 595 | ref="rowEditForm" |
| 533 | :rowDatas="props" | 596 | :rowDatas="props" |
| ... | @@ -535,7 +598,7 @@ | ... | @@ -535,7 +598,7 @@ |
| 535 | @rowFormDataSave="rowFormDataSave" | 598 | @rowFormDataSave="rowFormDataSave" |
| 536 | @updateLastItemValid="handleUpdateLastItemValid" | 599 | @updateLastItemValid="handleUpdateLastItemValid" |
| 537 | /> | 600 | /> |
| 538 | - </template> | 601 | + </template> --> |
| 539 | <template v-slot:destinationCountryRegionCode="scope"> | 602 | <template v-slot:destinationCountryRegionCode="scope"> |
| 540 | <span>{{ | 603 | <span>{{ |
| 541 | mapDicDatas( | 604 | mapDicDatas( |
| ... | @@ -570,7 +633,7 @@ | ... | @@ -570,7 +633,7 @@ |
| 570 | mapCurrencyDatas($store.getters.dict.CURRENCY, scope.row.currency) | 633 | mapCurrencyDatas($store.getters.dict.CURRENCY, scope.row.currency) |
| 571 | }}</span> | 634 | }}</span> |
| 572 | </template> | 635 | </template> |
| 573 | - <template slot="optionColumn"> | 636 | + <!-- <template slot="optionColumn"> |
| 574 | <el-table-column align="left" label="操作" width="100"> | 637 | <el-table-column align="left" label="操作" width="100"> |
| 575 | <template slot-scope="scope"> | 638 | <template slot-scope="scope"> |
| 576 | <el-button type="text" @click="updateRow(scope.row)"> | 639 | <el-button type="text" @click="updateRow(scope.row)"> |
| ... | @@ -581,36 +644,19 @@ | ... | @@ -581,36 +644,19 @@ |
| 581 | </el-button> | 644 | </el-button> |
| 582 | </template> | 645 | </template> |
| 583 | </el-table-column> | 646 | </el-table-column> |
| 584 | - </template> | 647 | + </template> --> |
| 585 | </Table> | 648 | </Table> |
| 586 | </section> | 649 | </section> |
| 587 | - <div class="addNewItem"> | ||
| 588 | - <i class="el-icon-circle-plus-outline" @click="addNewItem"></i> | ||
| 589 | - <span @click="addNewItem">添加新商品</span> | ||
| 590 | - </div> | ||
| 591 | - <div style="margin-top: 20px; text-align: center"> | ||
| 592 | - <el-button | ||
| 593 | - class="entrySaveButton entrySaveButton-background revokeSubmitBtn" | ||
| 594 | - type="primary" | ||
| 595 | - @click="submitEditedReportDatas" | ||
| 596 | - >保存</el-button | ||
| 597 | - > | ||
| 598 | - <el-button class="entrySaveButton" @click="back">返回</el-button> | ||
| 599 | - </div> | ||
| 600 | </div> | 650 | </div> |
| 601 | </template> | 651 | </template> |
| 602 | 652 | ||
| 603 | <script> | 653 | <script> |
| 604 | -import RowDataEditForm from "./RowDataEditForm.vue"; | 654 | +// import RowDataEditForm from "./RowDataEditForm.vue"; |
| 605 | -import { | 655 | +import { getCustomerDeclareDataId } from "@/api/pdd-info"; |
| 606 | - getCustomerList, | 656 | +import { getCustomerList, getPortList } from "@/api/declareData-api.js"; |
| 607 | - getPortList, | ||
| 608 | - getDeclareData, | ||
| 609 | - updateDeclareData, | ||
| 610 | -} from "@/api/declareData-api.js"; | ||
| 611 | export default { | 657 | export default { |
| 612 | name: "", | 658 | name: "", |
| 613 | - components: { RowDataEditForm }, | 659 | + // components: { RowDataEditForm }, |
| 614 | data() { | 660 | data() { |
| 615 | var checkNegativeNum = (rule, value, callback) => { | 661 | var checkNegativeNum = (rule, value, callback) => { |
| 616 | if (value < 0) { | 662 | if (value < 0) { |
| ... | @@ -653,168 +699,168 @@ export default { | ... | @@ -653,168 +699,168 @@ export default { |
| 653 | appType: 9610, | 699 | appType: 9610, |
| 654 | }, | 700 | }, |
| 655 | formRules: { | 701 | formRules: { |
| 656 | - ebccode: [ | 702 | + // ebccode: [ |
| 657 | - { required: true, message: "请选择电商企业", trigger: "change" }, | 703 | + // { required: true, message: "请选择电商企业", trigger: "change" }, |
| 658 | - ], | 704 | + // ], |
| 659 | - logisticsCode: [ | 705 | + // logisticsCode: [ |
| 660 | - { required: true, message: "请选择物流企业", trigger: "change" }, | 706 | + // { required: true, message: "请选择物流企业", trigger: "change" }, |
| 661 | - ], | 707 | + // ], |
| 662 | - orderNo: [ | 708 | + // orderNo: [ |
| 663 | - { required: true, message: "请输入订单编号", trigger: "blur" }, | 709 | + // { required: true, message: "请输入订单编号", trigger: "blur" }, |
| 664 | - { max: 60, message: "长度不能超过60个字符", trigger: "blur" }, | 710 | + // { max: 60, message: "长度不能超过60个字符", trigger: "blur" }, |
| 665 | - ], | 711 | + // ], |
| 666 | - logisticsNo: [ | 712 | + // logisticsNo: [ |
| 667 | - { required: true, message: "请输入物流运单编号", trigger: "blur" }, | 713 | + // { required: true, message: "请输入物流运单编号", trigger: "blur" }, |
| 668 | - { max: 80, message: "长度不能超过80个字符", trigger: "blur" }, | 714 | + // { max: 80, message: "长度不能超过80个字符", trigger: "blur" }, |
| 669 | - ], | 715 | + // ], |
| 670 | - declareCustomsCode: [ | 716 | + // declareCustomsCode: [ |
| 671 | - { required: true, message: "请选择申报地海关", trigger: "change" }, | 717 | + // { required: true, message: "请选择申报地海关", trigger: "change" }, |
| 672 | - ], | 718 | + // ], |
| 673 | - exportDate: [{ message: "请选择出口日期", trigger: "change" }], | 719 | + // exportDate: [{ message: "请选择出口日期", trigger: "change" }], |
| 674 | - goodsValue: [ | 720 | + // goodsValue: [ |
| 675 | - { required: true, message: "请输入商品金额", trigger: "blur" }, | 721 | + // { required: true, message: "请输入商品金额", trigger: "blur" }, |
| 676 | - ], | 722 | + // ], |
| 677 | - miscellaneousFreight: [ | 723 | + // miscellaneousFreight: [ |
| 678 | - { validator: checkNegativeNum, trigger: "blur" }, | 724 | + // { validator: checkNegativeNum, trigger: "blur" }, |
| 679 | - ], | 725 | + // ], |
| 680 | - currency: [ | 726 | + // currency: [ |
| 681 | - { required: true, message: "请选择币制", trigger: "change" }, | 727 | + // { required: true, message: "请选择币制", trigger: "change" }, |
| 682 | - ], | 728 | + // ], |
| 683 | - mainGoodsInfo: [ | 729 | + // mainGoodsInfo: [ |
| 684 | - { required: true, message: "请输入主要物品信息", trigger: "blur" }, | 730 | + // { required: true, message: "请输入主要物品信息", trigger: "blur" }, |
| 685 | - { max: 200, message: "长度不能超过200个字符", trigger: "blur" }, | 731 | + // { max: 200, message: "长度不能超过200个字符", trigger: "blur" }, |
| 686 | - ], | 732 | + // ], |
| 687 | - flightNumber: [ | 733 | + // flightNumber: [ |
| 688 | - { required: true, message: "请输入航班号", trigger: "blur" }, | 734 | + // { required: true, message: "请输入航班号", trigger: "blur" }, |
| 689 | - { max: 32, message: "长度不能超过32个字符", trigger: "blur" }, | 735 | + // { max: 32, message: "长度不能超过32个字符", trigger: "blur" }, |
| 690 | - ], | 736 | + // ], |
| 691 | - billno: [ | 737 | + // billno: [ |
| 692 | - { required: true, message: "请输入提运单号", trigger: "blur" }, | 738 | + // { required: true, message: "请输入提运单号", trigger: "blur" }, |
| 693 | - { max: 37, message: "长度不能超过37个字符", trigger: "blur" }, | 739 | + // { max: 37, message: "长度不能超过37个字符", trigger: "blur" }, |
| 694 | - ], | 740 | + // ], |
| 695 | - totalPackageNo: [ | 741 | + // totalPackageNo: [ |
| 696 | - { max: 37, message: "长度不能超过37个字符", trigger: "blur" }, | 742 | + // { max: 37, message: "长度不能超过37个字符", trigger: "blur" }, |
| 697 | - ], | 743 | + // ], |
| 698 | - regulatoryVenueCode: [ | 744 | + // regulatoryVenueCode: [ |
| 699 | - { max: 10, message: "长度不能超过10个字符", trigger: "blur" }, | 745 | + // { max: 10, message: "长度不能超过10个字符", trigger: "blur" }, |
| 700 | - ], | 746 | + // ], |
| 701 | - licenseKey: [ | 747 | + // licenseKey: [ |
| 702 | - { max: 19, message: "长度不能超过19个字符", trigger: "blur" }, | 748 | + // { max: 19, message: "长度不能超过19个字符", trigger: "blur" }, |
| 703 | - ], | 749 | + // ], |
| 704 | - destinationCountryRegion: [ | 750 | + // destinationCountryRegion: [ |
| 705 | - { required: true, message: "请选择运抵国", trigger: "change" }, | 751 | + // { required: true, message: "请选择运抵国", trigger: "change" }, |
| 706 | - ], | 752 | + // ], |
| 707 | - portCode: [ | 753 | + // portCode: [ |
| 708 | - { required: true, message: "请选择运指运港代码", trigger: "change" }, | 754 | + // { required: true, message: "请选择运指运港代码", trigger: "change" }, |
| 709 | - ], | 755 | + // ], |
| 710 | - freight: [ | 756 | + // freight: [ |
| 711 | - { required: true, message: "请输入运费", trigger: "blur" }, | 757 | + // { required: true, message: "请输入运费", trigger: "blur" }, |
| 712 | - { validator: checkNegativeNum, trigger: "blur" }, | 758 | + // { validator: checkNegativeNum, trigger: "blur" }, |
| 713 | - ], | 759 | + // ], |
| 714 | - freightCurrency: [ | 760 | + // freightCurrency: [ |
| 715 | - { required: true, message: "请选择运费币制", trigger: "change" }, | 761 | + // { required: true, message: "请选择运费币制", trigger: "change" }, |
| 716 | - ], | 762 | + // ], |
| 717 | - freightTag: [ | 763 | + // freightTag: [ |
| 718 | - { required: true, message: "请选择运费标志", trigger: "change" }, | 764 | + // { required: true, message: "请选择运费标志", trigger: "change" }, |
| 719 | - ], | 765 | + // ], |
| 720 | - insuredfee: [ | 766 | + // insuredfee: [ |
| 721 | - { required: true, message: "请输入保费", trigger: "blur" }, | 767 | + // { required: true, message: "请输入保费", trigger: "blur" }, |
| 722 | - { validator: checkInsuredFee, trigger: "blur" }, | 768 | + // { validator: checkInsuredFee, trigger: "blur" }, |
| 723 | - ], | 769 | + // ], |
| 724 | - insuredfeeCurrency: [ | 770 | + // insuredfeeCurrency: [ |
| 725 | - { required: true, message: "请输入保费币制", trigger: "blur" }, | 771 | + // { required: true, message: "请输入保费币制", trigger: "blur" }, |
| 726 | - ], | 772 | + // ], |
| 727 | - insuredfeeTag: [ | 773 | + // insuredfeeTag: [ |
| 728 | - { required: true, message: "请输选择保费标志", trigger: "change" }, | 774 | + // { required: true, message: "请输选择保费标志", trigger: "change" }, |
| 729 | - ], | 775 | + // ], |
| 730 | - packageTypeCode: [ | 776 | + // packageTypeCode: [ |
| 731 | - { required: true, message: "请选择包装种类代码", trigger: "change" }, | 777 | + // { required: true, message: "请选择包装种类代码", trigger: "change" }, |
| 732 | - ], | 778 | + // ], |
| 733 | - packNo: [ | 779 | + // packNo: [ |
| 734 | - { required: true, message: "请输入件数", trigger: "blur" }, | 780 | + // { required: true, message: "请输入件数", trigger: "blur" }, |
| 735 | - { validator: checkPackNo, trigger: "blur" }, | 781 | + // { validator: checkPackNo, trigger: "blur" }, |
| 736 | - ], | 782 | + // ], |
| 737 | - weight: [ | 783 | + // weight: [ |
| 738 | - { required: true, message: "请输入毛重", trigger: "blur" }, | 784 | + // { required: true, message: "请输入毛重", trigger: "blur" }, |
| 739 | - { validator: checkNegativeNum, trigger: "blur" }, | 785 | + // { validator: checkNegativeNum, trigger: "blur" }, |
| 740 | - ], | 786 | + // ], |
| 741 | - netWeight: [{ required: true, message: "请输入净重", trigger: "blur" }], | 787 | + // netWeight: [{ required: true, message: "请输入净重", trigger: "blur" }], |
| 742 | - remark: [ | 788 | + // remark: [ |
| 743 | - { max: 1000, message: "长度不能超过1000个字符", trigger: "blur" }, | 789 | + // { max: 1000, message: "长度不能超过1000个字符", trigger: "blur" }, |
| 744 | - ], | 790 | + // ], |
| 745 | - ebpCode: [ | 791 | + // ebpCode: [ |
| 746 | - { required: true, message: "请输入电商平台代码", trigger: "blur" }, | 792 | + // { required: true, message: "请输入电商平台代码", trigger: "blur" }, |
| 747 | - ], | 793 | + // ], |
| 748 | - ebpName: [ | 794 | + // ebpName: [ |
| 749 | - { required: true, message: "请输入电商平台名称", trigger: "blur" }, | 795 | + // { required: true, message: "请输入电商平台名称", trigger: "blur" }, |
| 750 | - ], | 796 | + // ], |
| 751 | - productionSaleEnterpriseCode: [ | 797 | + // productionSaleEnterpriseCode: [ |
| 752 | - { | 798 | + // { |
| 753 | - required: true, | 799 | + // required: true, |
| 754 | - message: "请输入生产销售企业代码", | 800 | + // message: "请输入生产销售企业代码", |
| 755 | - trigger: "blur", | 801 | + // trigger: "blur", |
| 756 | - }, | 802 | + // }, |
| 757 | - ], | 803 | + // ], |
| 758 | - ebcName: [ | 804 | + // ebcName: [ |
| 759 | - { | 805 | + // { |
| 760 | - required: true, | 806 | + // required: true, |
| 761 | - message: "请输入生产销售企业名称", | 807 | + // message: "请输入生产销售企业名称", |
| 762 | - trigger: "blur", | 808 | + // trigger: "blur", |
| 763 | - }, | 809 | + // }, |
| 764 | - ], | 810 | + // ], |
| 765 | - declareBusinessType: [ | 811 | + // declareBusinessType: [ |
| 766 | - { required: true, message: "请选择申报业务类型", trigger: "change" }, | 812 | + // { required: true, message: "请选择申报业务类型", trigger: "change" }, |
| 767 | - ], | 813 | + // ], |
| 768 | }, | 814 | }, |
| 769 | detailData: [], | 815 | detailData: [], |
| 770 | detialHeaderData: [ | 816 | detialHeaderData: [ |
| 771 | - { | 817 | + // { |
| 772 | - value: "rowDataEdit", | 818 | + // value: "rowDataEdit", |
| 773 | - expand: true, | 819 | + // expand: true, |
| 774 | - width: 0, | 820 | + // width: 0, |
| 775 | - }, | 821 | + // }, |
| 776 | { | 822 | { |
| 777 | name: "企业商品货号", | 823 | name: "企业商品货号", |
| 778 | - value: "enterpriseProductCode", | 824 | + value: "itemNo", |
| 779 | width: "", | 825 | width: "", |
| 780 | align: "left", | 826 | align: "left", |
| 781 | }, | 827 | }, |
| 782 | { | 828 | { |
| 783 | name: "企业商品名称", | 829 | name: "企业商品名称", |
| 784 | - value: "enterpriseProductName", | 830 | + value: "itemName", |
| 785 | width: "", | 831 | width: "", |
| 786 | align: "left", | 832 | align: "left", |
| 787 | }, | 833 | }, |
| 788 | { | 834 | { |
| 789 | name: "企业商品描述", | 835 | name: "企业商品描述", |
| 790 | - value: "enterpriseProductDescribe", | 836 | + value: "itemDescribe", |
| 791 | width: "", | 837 | width: "", |
| 792 | align: "left", | 838 | align: "left", |
| 793 | }, | 839 | }, |
| 794 | { | 840 | { |
| 795 | name: "商品名称", | 841 | name: "商品名称", |
| 796 | - value: "productName", | 842 | + value: "itemName", |
| 797 | width: "", | 843 | width: "", |
| 798 | align: "left", | 844 | align: "left", |
| 799 | }, | 845 | }, |
| 800 | { | 846 | { |
| 801 | name: "商品编码", | 847 | name: "商品编码", |
| 802 | - value: "productCode", | 848 | + value: "hsCode", |
| 803 | width: "", | 849 | width: "", |
| 804 | align: "left", | 850 | align: "left", |
| 805 | }, | 851 | }, |
| 806 | { | 852 | { |
| 807 | name: "规格型号", | 853 | name: "规格型号", |
| 808 | - value: "model", | 854 | + value: "gmodel", |
| 809 | - width: "", | ||
| 810 | - align: "left", | ||
| 811 | - }, | ||
| 812 | - { | ||
| 813 | - name: "账册备案料号", | ||
| 814 | - value: "accountBookMaterialNumber", | ||
| 815 | width: "", | 855 | width: "", |
| 816 | align: "left", | 856 | align: "left", |
| 817 | }, | 857 | }, |
| 858 | + // { | ||
| 859 | + // name: "账册备案料号", | ||
| 860 | + // value: "accountBookMaterialNumber", | ||
| 861 | + // width: "", | ||
| 862 | + // align: "left", | ||
| 863 | + // }, | ||
| 818 | { | 864 | { |
| 819 | name: "条形码", | 865 | name: "条形码", |
| 820 | value: "barCode", | 866 | value: "barCode", |
| ... | @@ -828,41 +874,42 @@ export default { | ... | @@ -828,41 +874,42 @@ export default { |
| 828 | align: "left", | 874 | align: "left", |
| 829 | slot: true, | 875 | slot: true, |
| 830 | }, | 876 | }, |
| 877 | + | ||
| 831 | { | 878 | { |
| 832 | - name: "计量单位", | 879 | + name: "数量", |
| 833 | - value: "unit", | 880 | + value: "qty", |
| 834 | width: "", | 881 | width: "", |
| 835 | align: "left", | 882 | align: "left", |
| 836 | - slot: true, | ||
| 837 | }, | 883 | }, |
| 838 | { | 884 | { |
| 839 | - name: "数量", | 885 | + name: "计量单位", |
| 840 | - value: "qty", | 886 | + value: "unit", |
| 841 | width: "", | 887 | width: "", |
| 842 | align: "left", | 888 | align: "left", |
| 889 | + slot: true, | ||
| 843 | }, | 890 | }, |
| 844 | { | 891 | { |
| 845 | name: "法定数量", | 892 | name: "法定数量", |
| 846 | - value: "legalQty", | 893 | + value: "qty1", |
| 847 | width: "", | 894 | width: "", |
| 848 | align: "left", | 895 | align: "left", |
| 849 | }, | 896 | }, |
| 850 | { | 897 | { |
| 851 | name: "法定计量单位", | 898 | name: "法定计量单位", |
| 852 | - value: "unitLegalFirstCode", | 899 | + value: "unit1", |
| 853 | width: "", | 900 | width: "", |
| 854 | align: "left", | 901 | align: "left", |
| 855 | slot: true, | 902 | slot: true, |
| 856 | }, | 903 | }, |
| 857 | { | 904 | { |
| 858 | name: "第二数量", | 905 | name: "第二数量", |
| 859 | - value: "secondQty", | 906 | + value: "qty2", |
| 860 | width: "", | 907 | width: "", |
| 861 | align: "left", | 908 | align: "left", |
| 862 | }, | 909 | }, |
| 863 | { | 910 | { |
| 864 | name: "第二计量单位", | 911 | name: "第二计量单位", |
| 865 | - value: "unitLegalSecondCode", | 912 | + value: "unit2", |
| 866 | width: "", | 913 | width: "", |
| 867 | align: "left", | 914 | align: "left", |
| 868 | slot: true, | 915 | slot: true, |
| ... | @@ -886,18 +933,18 @@ export default { | ... | @@ -886,18 +933,18 @@ export default { |
| 886 | width: "", | 933 | width: "", |
| 887 | align: "left", | 934 | align: "left", |
| 888 | }, | 935 | }, |
| 889 | - { | 936 | + // { |
| 890 | - name: "净重", | 937 | + // name: "净重", |
| 891 | - value: "netWeight", | 938 | + // value: "netWeight", |
| 892 | - width: "", | 939 | + // width: "", |
| 893 | - align: "left", | 940 | + // align: "left", |
| 894 | - }, | 941 | + // }, |
| 895 | - { | 942 | + // { |
| 896 | - name: "备注", | 943 | + // name: "备注", |
| 897 | - value: "remark", | 944 | + // value: "remark", |
| 898 | - width: "", | 945 | + // width: "", |
| 899 | - align: "left", | 946 | + // align: "left", |
| 900 | - }, | 947 | + // }, |
| 901 | ], | 948 | ], |
| 902 | loadings: { | 949 | loadings: { |
| 903 | entryLoading: false, | 950 | entryLoading: false, |
| ... | @@ -914,7 +961,7 @@ export default { | ... | @@ -914,7 +961,7 @@ export default { |
| 914 | }, | 961 | }, |
| 915 | created() { | 962 | created() { |
| 916 | if (this.$route.params.data) { | 963 | if (this.$route.params.data) { |
| 917 | - this.declareId = this.$route.params.data.declareId; | 964 | + this.declareId = this.$route.params.data.id; |
| 918 | this.queryDeclareData(this.declareId); | 965 | this.queryDeclareData(this.declareId); |
| 919 | this.queryCustomerList(); | 966 | this.queryCustomerList(); |
| 920 | this.queryPortList(); | 967 | this.queryPortList(); |
| ... | @@ -939,7 +986,9 @@ export default { | ... | @@ -939,7 +986,9 @@ export default { |
| 939 | } | 986 | } |
| 940 | }, | 987 | }, |
| 941 | mapCurrencyDatas(dicArr, code) { | 988 | mapCurrencyDatas(dicArr, code) { |
| 942 | - if (code != "") { | 989 | + console.log(dicArr, code); |
| 990 | + | ||
| 991 | + if (code != "" && code) { | ||
| 943 | return dicArr.filter((item) => item.itemValue == code)[0] | 992 | return dicArr.filter((item) => item.itemValue == code)[0] |
| 944 | .itemChineseName; | 993 | .itemChineseName; |
| 945 | } else { | 994 | } else { |
| ... | @@ -975,16 +1024,16 @@ export default { | ... | @@ -975,16 +1024,16 @@ export default { |
| 975 | }); | 1024 | }); |
| 976 | }, | 1025 | }, |
| 977 | //获取申报数据 | 1026 | //获取申报数据 |
| 978 | - queryDeclareData(declareId) { | 1027 | + queryDeclareData(id) { |
| 979 | - getDeclareData({ declareId }) | 1028 | + getCustomerDeclareDataId({ customerDeclareDataId: id }) |
| 980 | .then((res) => { | 1029 | .then((res) => { |
| 981 | // console.log(1111, res) | 1030 | // console.log(1111, res) |
| 982 | if (res.code == 200) { | 1031 | if (res.code == 200) { |
| 983 | - res.data.declare.orderNo = res.data.declare.orderno; | 1032 | + res.data.orderNo = res.data.orderNo; |
| 984 | - this.formData = res.data.declare; | 1033 | + this.formData = res.data; |
| 985 | this.formData.appType = 9610; | 1034 | this.formData.appType = 9610; |
| 986 | - this.detailData = res.data.product.length | 1035 | + this.detailData = res.data.productList.length |
| 987 | - ? res.data.product.map((item, index) => { | 1036 | + ? res.data.productList.map((item, index) => { |
| 988 | item.gnum = index + 1; | 1037 | item.gnum = index + 1; |
| 989 | return item; | 1038 | return item; |
| 990 | }) | 1039 | }) |
| ... | @@ -1006,86 +1055,25 @@ export default { | ... | @@ -1006,86 +1055,25 @@ export default { |
| 1006 | this.$router.go(-1); | 1055 | this.$router.go(-1); |
| 1007 | }, | 1056 | }, |
| 1008 | 1057 | ||
| 1009 | - //添加新商品 | 1058 | + // updateRow(row) { |
| 1010 | - async addNewItem() { | 1059 | + // if (this.expandRowKeys.length > 0) return; |
| 1011 | - // 如果上一次新增的 item 没有通过校验,则不允许新增 | 1060 | + // this.expandRowKeys = [row.gnum]; |
| 1012 | - //console.log("this",this.lastItemValid) | 1061 | + // this.currentRowKey = row.gnum; // 设置当前行的 gnum |
| 1013 | - // if (!this.lastItemValid) { | ||
| 1014 | - // console.log(11) | ||
| 1015 | - // this.$message.warning('请先完善新增的商品信息'); | ||
| 1016 | - // return; | ||
| 1017 | - // } | ||
| 1018 | - // 获取最后一个 item 的引用 | ||
| 1019 | - const lastItem = this.detailData[this.detailData.length - 1]; | ||
| 1020 | - // 如果存在上一次新增的 item,则进行校验 | ||
| 1021 | - if (lastItem) { | ||
| 1022 | - // 获取 RowDataEditForm 组件的引用 | ||
| 1023 | - const rowEditForm = this.$refs.rowEditForm; | ||
| 1024 | - if (rowEditForm) { | ||
| 1025 | - // 调用校验方法 | ||
| 1026 | - const isValid = await rowEditForm.validate(); | ||
| 1027 | - // console.log("y:",this.lastItemValid) | ||
| 1028 | - // console.log("!",isValid) | ||
| 1029 | - if (!isValid) { | ||
| 1030 | - // console.log(22) | ||
| 1031 | - this.lastItemValid = false; // 标记上一次新增的 item 未通过校验 | ||
| 1032 | - this.$message.warning("请先完善新增的商品信息"); | ||
| 1033 | - return; | ||
| 1034 | - } | ||
| 1035 | - } | ||
| 1036 | - } | ||
| 1037 | - // 校验通过,允许新增 item | ||
| 1038 | - let orderNum = | ||
| 1039 | - this.detailData.at(-1) === undefined | ||
| 1040 | - ? 1 | ||
| 1041 | - : this.detailData.at(-1).gnum + 1; | ||
| 1042 | - this.detailData.push({ | ||
| 1043 | - gnum: orderNum, | ||
| 1044 | - accountBookMaterialNumber: "", | ||
| 1045 | - barCode: "", | ||
| 1046 | - currency: "", | ||
| 1047 | - destinationCountryRegionCode: "", | ||
| 1048 | - enterpriseProductCode: "", | ||
| 1049 | - enterpriseProductDescribe: "", | ||
| 1050 | - enterpriseProductName: "", | ||
| 1051 | - legalQty: 0, | ||
| 1052 | - secondQty: 0, | ||
| 1053 | - model: "", | ||
| 1054 | - netWeight: 0, | ||
| 1055 | - price: 0, | ||
| 1056 | - productCode: "", | ||
| 1057 | - productName: "", | ||
| 1058 | - qty: 0, | ||
| 1059 | - remark: "", | ||
| 1060 | - totalPrice: 0, | ||
| 1061 | - unit: "", | ||
| 1062 | - isNew: true, // 添加 isNew 标志 | ||
| 1063 | - }); | ||
| 1064 | 1062 | ||
| 1065 | - this.$nextTick(() => { | 1063 | + // // 保存原始数据 |
| 1066 | - this.expandRowKeys = [orderNum]; | 1064 | + // this.originalDetailData[row.gnum] = { ...row }; |
| 1067 | - this.lastItemValid = true; // 重置标志位 | ||
| 1068 | - }); | ||
| 1069 | - }, | ||
| 1070 | - updateRow(row) { | ||
| 1071 | - if (this.expandRowKeys.length > 0) return; | ||
| 1072 | - this.expandRowKeys = [row.gnum]; | ||
| 1073 | - this.currentRowKey = row.gnum; // 设置当前行的 gnum | ||
| 1074 | - | ||
| 1075 | - // 保存原始数据 | ||
| 1076 | - this.originalDetailData[row.gnum] = { ...row }; | ||
| 1077 | 1065 | ||
| 1078 | - let obj = {}; | 1066 | + // let obj = {}; |
| 1079 | - for (let key in row) { | 1067 | + // for (let key in row) { |
| 1080 | - obj[key] = row[key]; | 1068 | + // obj[key] = row[key]; |
| 1081 | - } | 1069 | + // } |
| 1082 | 1070 | ||
| 1083 | - this.$nextTick(() => { | 1071 | + // this.$nextTick(() => { |
| 1084 | - this.$refs.rowEditForm.tableRowformData = obj; | 1072 | + // this.$refs.rowEditForm.tableRowformData = obj; |
| 1085 | - // const table = this.$refs.entryTable.$el.querySelector('.el-table__body-wrapper'); | 1073 | + // // const table = this.$refs.entryTable.$el.querySelector('.el-table__body-wrapper'); |
| 1086 | - // table.scrollTop = row.gnum*51+10 | 1074 | + // // table.scrollTop = row.gnum*51+10 |
| 1087 | - }); | 1075 | + // }); |
| 1088 | - }, | 1076 | + // }, |
| 1089 | getTotalNumber() { | 1077 | getTotalNumber() { |
| 1090 | let totalNetWeight = 0; | 1078 | let totalNetWeight = 0; |
| 1091 | let totalGoodsValue = 0; | 1079 | let totalGoodsValue = 0; |
| ... | @@ -1096,80 +1084,21 @@ export default { | ... | @@ -1096,80 +1084,21 @@ export default { |
| 1096 | this.formData.netWeight = totalNetWeight.toFixed(5); | 1084 | this.formData.netWeight = totalNetWeight.toFixed(5); |
| 1097 | this.formData.goodsValue = totalGoodsValue.toFixed(5); | 1085 | this.formData.goodsValue = totalGoodsValue.toFixed(5); |
| 1098 | }, | 1086 | }, |
| 1099 | - deleteRow(row) { | 1087 | + // deleteRow(row) { |
| 1100 | - this.detailData = this.detailData | 1088 | + // this.detailData = this.detailData |
| 1101 | - .filter((item) => item.gnum != row.gnum) | 1089 | + // .filter((item) => item.gnum != row.gnum) |
| 1102 | - .map((item, index) => { | 1090 | + // .map((item, index) => { |
| 1103 | - item.gnum = index + 1; | 1091 | + // item.gnum = index + 1; |
| 1104 | - return item; | 1092 | + // return item; |
| 1105 | - }); | 1093 | + // }); |
| 1106 | - this.$nextTick(() => { | 1094 | + // this.$nextTick(() => { |
| 1107 | - this.getTotalNumber(); | 1095 | + // this.getTotalNumber(); |
| 1108 | - this.expandRowKeys = []; | 1096 | + // this.expandRowKeys = []; |
| 1109 | - this.detailData.length; | 1097 | + // this.detailData.length; |
| 1110 | - this.lastItemValid = this.detailData.length === row.index; | 1098 | + // this.lastItemValid = this.detailData.length === row.index; |
| 1111 | - }); | 1099 | + // }); |
| 1112 | - }, | 1100 | + // }, |
| 1113 | - rowFormDataSave(props) { | 1101 | + |
| 1114 | - this.detailData.map((item) => { | ||
| 1115 | - if (item.gnum == props.gnum) { | ||
| 1116 | - item = Object.assign(item, props.tableRowformData); | ||
| 1117 | - return item; | ||
| 1118 | - } | ||
| 1119 | - }); | ||
| 1120 | - this.expandRowKeys = []; | ||
| 1121 | - this.$nextTick(() => { | ||
| 1122 | - this.lastItemValid = true; | ||
| 1123 | - this.getTotalNumber(); | ||
| 1124 | - }); | ||
| 1125 | - }, | ||
| 1126 | - cancelEditRowData(index) { | ||
| 1127 | - this.lastItemValid = true; // 重置标志位 | ||
| 1128 | - this.expandRowKeys = []; | ||
| 1129 | - if (index !== undefined) { | ||
| 1130 | - const gnum = this.detailData[index].gnum; | ||
| 1131 | - if (this.detailData[index].isNew) { | ||
| 1132 | - // 如果是新添加的项,则删除该项 | ||
| 1133 | - this.detailData.splice(index, 1); | ||
| 1134 | - } else { | ||
| 1135 | - // 否则,恢复原始数据 | ||
| 1136 | - if (this.originalDetailData[gnum]) { | ||
| 1137 | - this.detailData[index] = { ...this.originalDetailData[gnum] }; | ||
| 1138 | - delete this.originalDetailData[gnum]; // 删除保存的原始数据 | ||
| 1139 | - } | ||
| 1140 | - } | ||
| 1141 | - } | ||
| 1142 | - }, | ||
| 1143 | - // 更新 lastItemValid | ||
| 1144 | - handleUpdateLastItemValid(isValid) { | ||
| 1145 | - this.lastItemValid = isValid; | ||
| 1146 | - }, | ||
| 1147 | - //提交更新数据 | ||
| 1148 | - submitEditedReportDatas() { | ||
| 1149 | - this.$refs.editForm.validate((valid) => { | ||
| 1150 | - if (valid) { | ||
| 1151 | - let data = { | ||
| 1152 | - declare: this.formData, | ||
| 1153 | - product: this.detailData, | ||
| 1154 | - }; | ||
| 1155 | - updateDeclareData(data) | ||
| 1156 | - .then((res) => { | ||
| 1157 | - if (res.code == 200) { | ||
| 1158 | - this.msgSuccess("数据更新成功"); | ||
| 1159 | - this.queryDeclareData(this.declareId); | ||
| 1160 | - this.lastItemValid = true; | ||
| 1161 | - } else { | ||
| 1162 | - this.alertWarningMsg(res.message); | ||
| 1163 | - } | ||
| 1164 | - }) | ||
| 1165 | - .catch((err) => { | ||
| 1166 | - console.log(err); | ||
| 1167 | - }); | ||
| 1168 | - } else { | ||
| 1169 | - return false; | ||
| 1170 | - } | ||
| 1171 | - }); | ||
| 1172 | - }, | ||
| 1173 | //取消编辑 | 1102 | //取消编辑 |
| 1174 | cancelEditedReportDatas() {}, | 1103 | cancelEditedReportDatas() {}, |
| 1175 | }, | 1104 | }, |
| ... | @@ -1202,21 +1131,7 @@ export default { | ... | @@ -1202,21 +1131,7 @@ export default { |
| 1202 | border-bottom: 1px solid #333; | 1131 | border-bottom: 1px solid #333; |
| 1203 | } | 1132 | } |
| 1204 | } | 1133 | } |
| 1205 | -.addNewItem { | 1134 | + |
| 1206 | - display: flex; | ||
| 1207 | - justify-content: flex-start; | ||
| 1208 | - align-items: center; | ||
| 1209 | - color: #007ab7; | ||
| 1210 | - line-height: 38px; | ||
| 1211 | - i { | ||
| 1212 | - margin-right: 3px; | ||
| 1213 | - } | ||
| 1214 | - span { | ||
| 1215 | - font-size: 13px; | ||
| 1216 | - font-weight: 500; | ||
| 1217 | - cursor: pointer; | ||
| 1218 | - } | ||
| 1219 | -} | ||
| 1220 | .formRowDataOperate { | 1135 | .formRowDataOperate { |
| 1221 | text-align: right; | 1136 | text-align: right; |
| 1222 | padding: 0 20px; | 1137 | padding: 0 20px; | ... | ... |
-
Please register or login to post a comment