|  | @@ -26,7 +26,7 @@
 | 
											
												
													
														|  |                      </el-button>
 |  |                      </el-button>
 | 
											
												
													
														|  |                      <el-dropdown-menu slot="dropdown">
 |  |                      <el-dropdown-menu slot="dropdown">
 | 
											
												
													
														|  |                          <el-dropdown-item v-for="item in imporiData" :key="item.id"
 |  |                          <el-dropdown-item v-for="item in imporiData" :key="item.id"
 | 
											
												
													
														|  | -                            @click.native="importData(item.id)">{{
 |  | 
 | 
											
												
													
														|  | 
 |  | +                            @click.native="importData(item)">{{
 | 
											
												
													
														|  |                                  item.name }}
 |  |                                  item.name }}
 | 
											
												
													
														|  |                          </el-dropdown-item>
 |  |                          </el-dropdown-item>
 | 
											
												
													
														|  |                      </el-dropdown-menu>
 |  |                      </el-dropdown-menu>
 | 
											
										
											
												
													
														|  | @@ -769,7 +769,13 @@ export default {
 | 
											
												
													
														|  |                      value: 'cyCnName',
 |  |                      value: 'cyCnName',
 | 
											
												
													
														|  |                  },
 |  |                  },
 | 
											
												
													
														|  |              ],
 |  |              ],
 | 
											
												
													
														|  | -            imporiData: [{ id: 0, name: '导入 ONE 模板' }, { id: 1, name: '导入 PIL 订舱模板' }, { id: 2, name: '导入截单格式' }, { id: 3, name: '导入海信提单' }],
 |  | 
 | 
											
												
													
														|  | 
 |  | +            imporiData: [
 | 
											
												
													
														|  | 
 |  | +                { id: 0, name: '导入 ONE 模板', key: 'ONE', showCoverDlg: true, document: 'importOne' },
 | 
											
												
													
														|  | 
 |  | +                { id: 1, name: '导入 PIL 订舱模板', key: 'PIL-BOOKING', showCoverDlg: true, document: 'importPilBooking' },
 | 
											
												
													
														|  | 
 |  | +                { id: 2, name: '导入截单格式', key: 'PIL-CUTDOC', showCoverDlg: true, document: 'importPilCutOffOrders' },
 | 
											
												
													
														|  | 
 |  | +                { id: 3, name: '导入海信提单', key: 'HISENSE-BILL', showCoverDlg: false, document: 'importHisenseBill' }
 | 
											
												
													
														|  | 
 |  | +            ],
 | 
											
												
													
														|  | 
 |  | +            currentImportDataRow: null,
 | 
											
												
													
														|  |              excelForm: {},
 |  |              excelForm: {},
 | 
											
												
													
														|  |              excelLoading: false,
 |  |              excelLoading: false,
 | 
											
												
													
														|  |              excelOption: {
 |  |              excelOption: {
 | 
											
										
											
												
													
														|  | @@ -970,16 +976,16 @@ export default {
 | 
											
												
													
														|  |          },
 |  |          },
 | 
											
												
													
														|  |          //文档导入
 |  |          //文档导入
 | 
											
												
													
														|  |          importData(row) {
 |  |          importData(row) {
 | 
											
												
													
														|  | -            if (row == 0) {
 |  | 
 | 
											
												
													
														|  | -                this.excelOption.column[0].action = `/api/blade-los/templateImport/importOne?billId=${this.form.id}`
 |  | 
 | 
											
												
													
														|  | -            } else if (row == 1) {
 |  | 
 | 
											
												
													
														|  | -                this.excelOption.column[0].action = `/api/blade-los/templateImport/importPilBooking?billId=${this.form.id}`
 |  | 
 | 
											
												
													
														|  | -            } else if (row == 2) {
 |  | 
 | 
											
												
													
														|  | -                this.excelOption.column[0].action = `/api/blade-los/templateImport/importPilCutOffOrders?billId=${this.form.id}`
 |  | 
 | 
											
												
													
														|  | -            } else if (row == 3) {
 |  | 
 | 
											
												
													
														|  | -                this.excelOption.column[0].action = `/api/blade-los/templateImport/importHisenseBill?billId=${this.form.id}`
 |  | 
 | 
											
												
													
														|  | -            }
 |  | 
 | 
											
												
													
														|  | 
 |  | +            if(!row) return
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  | 
 |  | +            this.excelOption.column[0].action = `/api/blade-los/templateImport/${row.document}?billId=${this.form.id}`
 | 
											
												
													
														|  | 
 |  | +            // this.excelOption.column[0].action = `/api/blade-los/templateImport/${row.document}?billId=${this.form.id}`
 | 
											
												
													
														|  | 
 |  | +            // this.excelOption.column[0].action = `/api/blade-los/templateImport/${row.document}?billId=${this.form.id}`
 | 
											
												
													
														|  | 
 |  | +            // this.excelOption.column[0].action = `/api/blade-los/templateImport/${row.document}?billId=${this.form.id}`
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  | 
 |  | +            this.currentImportDataRow = row
 | 
											
												
													
														|  |              this.excelBox = true
 |  |              this.excelBox = true
 | 
											
												
													
														|  | 
 |  | +            console.log('excelLoading', this.excelLoading)
 | 
											
												
													
														|  |          },
 |  |          },
 | 
											
												
													
														|  |          uploadBefore(file, done, loading) {
 |  |          uploadBefore(file, done, loading) {
 | 
											
												
													
														|  |              done();
 |  |              done();
 | 
											
										
											
												
													
														|  | @@ -996,11 +1002,41 @@ export default {
 | 
											
												
													
														|  |          // 上传成功
 |  |          // 上传成功
 | 
											
												
													
														|  |          onSuccess(res, done, loading, column) {
 |  |          onSuccess(res, done, loading, column) {
 | 
											
												
													
														|  |              if (Object.keys(res).length) {
 |  |              if (Object.keys(res).length) {
 | 
											
												
													
														|  | -                this.$confirm('此操作将覆盖数据, 是否继续?', '提示', {
 |  | 
 | 
											
												
													
														|  | -                    confirmButtonText: '确定',
 |  | 
 | 
											
												
													
														|  | -                    cancelButtonText: '取消',
 |  | 
 | 
											
												
													
														|  | -                    type: 'warning'
 |  | 
 | 
											
												
													
														|  | -                }).then(() => {
 |  | 
 | 
											
												
													
														|  | 
 |  | +                if(this.currentImportDataRow.showCoverDlg===true) {
 | 
											
												
													
														|  | 
 |  | +                    this.$confirm('此操作将覆盖数据, 是否继续?', '提示', {
 | 
											
												
													
														|  | 
 |  | +                        confirmButtonText: '确定',
 | 
											
												
													
														|  | 
 |  | +                        cancelButtonText: '取消',
 | 
											
												
													
														|  | 
 |  | +                        type: 'warning'
 | 
											
												
													
														|  | 
 |  | +                    }).then(() => {
 | 
											
												
													
														|  | 
 |  | +                        // this.form = res;
 | 
											
												
													
														|  | 
 |  | +                        Object.keys(res).forEach(key => {
 | 
											
												
													
														|  | 
 |  | +                            if (res[key]) {
 | 
											
												
													
														|  | 
 |  | +                                if (key != 'detail') {
 | 
											
												
													
														|  | 
 |  | +                                    // this.form[key] = res[key]
 | 
											
												
													
														|  | 
 |  | +                                    this.$set(this.form, key, res[key])
 | 
											
												
													
														|  | 
 |  | +                                }
 | 
											
												
													
														|  | 
 |  | +                                if (key == 'detail') {
 | 
											
												
													
														|  | 
 |  | +                                    Object.keys(res.detail).forEach(key => {
 | 
											
												
													
														|  | 
 |  | +                                        if (res.detail[key]) {
 | 
											
												
													
														|  | 
 |  | +                                            // this.form.detail[key] = res.detail[key]
 | 
											
												
													
														|  | 
 |  | +                                            this.$set(this.form.detail, key, res.detail[key])
 | 
											
												
													
														|  | 
 |  | +                                        }
 | 
											
												
													
														|  | 
 |  | +                                    });
 | 
											
												
													
														|  | 
 |  | +                                }
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  | 
 |  | +                            }
 | 
											
												
													
														|  | 
 |  | +                        });
 | 
											
												
													
														|  | 
 |  | +                        this.excelBox = false;
 | 
											
												
													
														|  | 
 |  | +                        this.$message.success("导入成功!");
 | 
											
												
													
														|  | 
 |  | +                        loading = false;
 | 
											
												
													
														|  | 
 |  | +                        done();
 | 
											
												
													
														|  | 
 |  | +                    }).catch(() => {
 | 
											
												
													
														|  | 
 |  | +                        this.excelBox = false;
 | 
											
												
													
														|  | 
 |  | +                        loading = false;
 | 
											
												
													
														|  | 
 |  | +                        done();
 | 
											
												
													
														|  | 
 |  | +                    });
 | 
											
												
													
														|  | 
 |  | +                }else{
 | 
											
												
													
														|  | 
 |  | +                    console.log('onSuccess 1')
 | 
											
												
													
														|  |                      // this.form = res;
 |  |                      // this.form = res;
 | 
											
												
													
														|  |                      Object.keys(res).forEach(key => {
 |  |                      Object.keys(res).forEach(key => {
 | 
											
												
													
														|  |                          if (res[key]) {
 |  |                          if (res[key]) {
 | 
											
										
											
												
													
														|  | @@ -1016,18 +1052,14 @@ export default {
 | 
											
												
													
														|  |                                      }
 |  |                                      }
 | 
											
												
													
														|  |                                  });
 |  |                                  });
 | 
											
												
													
														|  |                              }
 |  |                              }
 | 
											
												
													
														|  | -
 |  | 
 | 
											
												
													
														|  |                          }
 |  |                          }
 | 
											
												
													
														|  | -                    });
 |  | 
 | 
											
												
													
														|  | -                    this.excelBox = false;
 |  | 
 | 
											
												
													
														|  | -                    this.$message.success("导入成功!");
 |  | 
 | 
											
												
													
														|  | 
 |  | +                    })
 | 
											
												
													
														|  |                      loading = false;
 |  |                      loading = false;
 | 
											
												
													
														|  |                      done();
 |  |                      done();
 | 
											
												
													
														|  | -                }).catch(() => {
 |  | 
 | 
											
												
													
														|  |                      this.excelBox = false;
 |  |                      this.excelBox = false;
 | 
											
												
													
														|  | -                    loading = false;
 |  | 
 | 
											
												
													
														|  | -                    done();
 |  | 
 | 
											
												
													
														|  | -                });
 |  | 
 | 
											
												
													
														|  | 
 |  | +                    this.$message.success("导入成功!");
 | 
											
												
													
														|  | 
 |  | +                    console.log('onSuccess 2')
 | 
											
												
													
														|  | 
 |  | +                }
 | 
											
												
													
														|  |              } else {
 |  |              } else {
 | 
											
												
													
														|  |                  loading = false;
 |  |                  loading = false;
 | 
											
												
													
														|  |                  done();
 |  |                  done();
 |