zhanbo.xu

feat: 优化增加单条同步

......@@ -6,7 +6,7 @@ VUE_APP_BASE_ENV = "dev"
VUE_APP_Version = '1.0.0'
# FedEx 在线申报工具/开发环境
VUE_APP_BASE_API = 'http://101.132.100.41:7001/EcomExp'
VUE_APP_BASE_API = 'http://101.132.100.41:7008/EcomExp'
VUE_APP_BASE_ROUTE = '/EcomDev'
......
......@@ -110,6 +110,9 @@
<el-table-column align="center" label="操作" width="150">
<template slot-scope="scope">
<el-button type="text" @click="detail(scope.row)"> 详情 </el-button>
<el-button type="text" @click="goUpdate(scope.row)">
同步更新
</el-button>
</template>
</el-table-column>
</template>
......@@ -123,7 +126,11 @@
</template>
<script>
import { getHsCodeList, getHsCodeIncr } from "@/api/arrivalList-api.js";
import {
getHsCodeList,
getHsCodeIncr,
getHsCodeSingleSync,
} from "@/api/arrivalList-api.js";
import DialogVue from "./dialog.vue";
export default {
name: "SupervisePlaceManage",
......@@ -263,10 +270,15 @@ export default {
},
addDeclare() {
this.loadings.postLoading = true;
this.$confirm("是否确认操作增量数据同步?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
getHsCodeIncr()
.then((res) => {
if (res.code === "200") {
this.loadings.postLoading = false;
this.alertSuccessMsg(res.message);
} else {
this.alertWarningMsg(res.message);
......@@ -278,13 +290,32 @@ export default {
this.loadings.postLoading = false;
})
.finally(() => {
console.log("finally");
// console.log("finally");
});
})
.catch(() => {});
},
detail(record) {
this.selected = JSON.parse(JSON.stringify(record));
this.outerVisible = true;
},
goUpdate(record) {
this.$confirm("是否确认操作同步更新?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
getHsCodeSingleSync({ id: record.id }).then((res) => {
if (+res.code === 200) {
this.alertSuccessMsg(res.message);
} else {
this.alertWarningMsg(res.message);
}
});
})
.catch(() => {});
},
dialogClose() {
this.outerVisible = false;
......