zhanbo.xu

feat: 优化增加单条同步

...@@ -6,7 +6,7 @@ VUE_APP_BASE_ENV = "dev" ...@@ -6,7 +6,7 @@ VUE_APP_BASE_ENV = "dev"
6 VUE_APP_Version = '1.0.0' 6 VUE_APP_Version = '1.0.0'
7 7
8 # FedEx 在线申报工具/开发环境 8 # FedEx 在线申报工具/开发环境
9 -VUE_APP_BASE_API = 'http://101.132.100.41:7001/EcomExp' 9 +VUE_APP_BASE_API = 'http://101.132.100.41:7008/EcomExp'
10 10
11 VUE_APP_BASE_ROUTE = '/EcomDev' 11 VUE_APP_BASE_ROUTE = '/EcomDev'
12 12
......
...@@ -110,6 +110,9 @@ ...@@ -110,6 +110,9 @@
110 <el-table-column align="center" label="操作" width="150"> 110 <el-table-column align="center" label="操作" width="150">
111 <template slot-scope="scope"> 111 <template slot-scope="scope">
112 <el-button type="text" @click="detail(scope.row)"> 详情 </el-button> 112 <el-button type="text" @click="detail(scope.row)"> 详情 </el-button>
113 + <el-button type="text" @click="goUpdate(scope.row)">
114 + 同步更新
115 + </el-button>
113 </template> 116 </template>
114 </el-table-column> 117 </el-table-column>
115 </template> 118 </template>
...@@ -123,7 +126,11 @@ ...@@ -123,7 +126,11 @@
123 </template> 126 </template>
124 127
125 <script> 128 <script>
126 -import { getHsCodeList, getHsCodeIncr } from "@/api/arrivalList-api.js"; 129 +import {
130 + getHsCodeList,
131 + getHsCodeIncr,
132 + getHsCodeSingleSync,
133 +} from "@/api/arrivalList-api.js";
127 import DialogVue from "./dialog.vue"; 134 import DialogVue from "./dialog.vue";
128 export default { 135 export default {
129 name: "SupervisePlaceManage", 136 name: "SupervisePlaceManage",
...@@ -263,10 +270,15 @@ export default { ...@@ -263,10 +270,15 @@ export default {
263 }, 270 },
264 addDeclare() { 271 addDeclare() {
265 this.loadings.postLoading = true; 272 this.loadings.postLoading = true;
273 + this.$confirm("是否确认操作增量数据同步?", "提示", {
274 + confirmButtonText: "确定",
275 + cancelButtonText: "取消",
276 + type: "warning",
277 + })
278 + .then(() => {
266 getHsCodeIncr() 279 getHsCodeIncr()
267 .then((res) => { 280 .then((res) => {
268 if (res.code === "200") { 281 if (res.code === "200") {
269 - this.loadings.postLoading = false;
270 this.alertSuccessMsg(res.message); 282 this.alertSuccessMsg(res.message);
271 } else { 283 } else {
272 this.alertWarningMsg(res.message); 284 this.alertWarningMsg(res.message);
...@@ -278,13 +290,32 @@ export default { ...@@ -278,13 +290,32 @@ export default {
278 this.loadings.postLoading = false; 290 this.loadings.postLoading = false;
279 }) 291 })
280 .finally(() => { 292 .finally(() => {
281 - console.log("finally"); 293 + // console.log("finally");
282 }); 294 });
295 + })
296 + .catch(() => {});
283 }, 297 },
284 detail(record) { 298 detail(record) {
285 this.selected = JSON.parse(JSON.stringify(record)); 299 this.selected = JSON.parse(JSON.stringify(record));
286 this.outerVisible = true; 300 this.outerVisible = true;
287 }, 301 },
302 + goUpdate(record) {
303 + this.$confirm("是否确认操作同步更新?", "提示", {
304 + confirmButtonText: "确定",
305 + cancelButtonText: "取消",
306 + type: "warning",
307 + })
308 + .then(() => {
309 + getHsCodeSingleSync({ id: record.id }).then((res) => {
310 + if (+res.code === 200) {
311 + this.alertSuccessMsg(res.message);
312 + } else {
313 + this.alertWarningMsg(res.message);
314 + }
315 + });
316 + })
317 + .catch(() => {});
318 + },
288 319
289 dialogClose() { 320 dialogClose() {
290 this.outerVisible = false; 321 this.outerVisible = false;
......