bug修改,UDI国家库更新下载最新版本

fencang
anthonywj 3 years ago
parent 84c26a83eb
commit 07c12382be

@ -7,6 +7,7 @@ export function getUdiInfos(query) {
params: query
});
}
export function filterCompany(query) {
return axios({
url: "/udiwms/udiinfo/filterCompany",
@ -22,6 +23,7 @@ export function filterByUuid(query) {
params: query
});
}
export function filterByVersion(query) {
return axios({
url: "/udiwms/syncdi/version",
@ -38,6 +40,14 @@ export function superSearch(query) {
});
}
export function dlLastVersionByDi(query) {
return axios({
url: "/udiwms/udiinfo/dlLastVersionByDi",
method: "get",
params: query
});
}

@ -258,6 +258,7 @@ import {combineUdi} from "../../api/basic/udiRelevance";
import {getBasicThirdSys} from "../../api/basic/basicThirdSys";
import {getInvbasdoc} from "../../api/basic/getErps";
import selectDiDetail from "@/views/basic/SelectDIDetailDialog";
import {deleteLog} from "@/api/basic/corpExport";
export default {
name: "closeDialog",
@ -349,27 +350,38 @@ export default {
});
},
getSuperSeaech() {
if (this.unionQuery.nameCode == "") {
this.$message.warning("请输入查询条件");
return;
}
this.loading = true;
superSearch(this.unionQuery)
.then((response) => {
this.loading = false;
if (response.code == 20000) {
this.udidlList = response.data.list || [];
this.total = response.data.total || 0;
} else {
this.$message.error(response.message);
this.$confirm("此操作将访问国家库查询DI数据, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
if (this.unionQuery.nameCode == "") {
this.$message.warning("请输入完成DI信息进行查询");
return;
}
this.loading = true;
superSearch(this.unionQuery)
.then((response) => {
this.loading = false;
if (response.code == 20000) {
this.udidlList = response.data.list || [];
this.total = response.data.total || 0;
} else {
this.$message.error(response.message);
}
})
.catch(() => {
this.loading = false;
this.udidlList = [];
this.total = 0;
});
})
.catch(() => {
this.loading = false;
this.udidlList = [];
this.total = 0;
});
},
checkSelectable(row) {
return !row.check;

@ -477,27 +477,38 @@ export default {
},
getSuperSeaech() {
if (this.unionQuery.nameCode == "") {
this.$message.warning("请输入查询条件");
return;
}
this.loading = true;
superSearch(this.unionQuery)
.then((response) => {
this.loading = false;
if (response.code == 20000) {
this.udidlList = response.data.list || [];
this.total = response.data.total || 0;
} else {
this.$message.error(response.message);
this.$confirm("此操作将访问国家库查询DI数据, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
if (this.unionQuery.nameCode == "") {
this.$message.warning("请输入完成DI信息进行查询");
return;
}
this.loading = true;
superSearch(this.unionQuery)
.then((response) => {
this.loading = false;
if (response.code == 20000) {
this.udidlList = response.data.list || [];
this.total = response.data.total || 0;
} else {
this.$message.error(response.message);
}
})
.catch(() => {
this.loading = false;
this.udidlList = [];
this.total = 0;
});
})
.catch(() => {
this.loading = false;
this.udidlList = [];
this.total = 0;
});
},
combineUdiAll() {

@ -2,8 +2,20 @@
<div>
<el-card class="el-card">
<div>
<el-form>
<el-form-item class="query-form-item">
<el-button-group>
<el-button type="primary" icon="search" @click="dlLastVersion" size="mini"
>国家同步库更新查询
</el-button
>
<el-button type="primary" icon="search" @click="getList" size="mini"
>刷新
</el-button
>
</el-button-group>
</el-form-item>
</el-form>
<el-table
:data="udidlList"
style="width: 100%"
@ -95,7 +107,7 @@
</template>
<script>
import {filterByVersion, filterCompany,} from "../../api/basic/udiInfo";
import {filterByVersion, dlLastVersionByDi, superSearch,} from "../../api/basic/udiInfo";
import {changeVersion, checkExitUdi} from "../../api/basic/udiRelevance";
import selectDiDetail from "./SelectDIDetailDialog"
@ -153,8 +165,45 @@ export default {
methods: {
dlLastVersion() {
this.$confirm("此操作将访问国家库查询最新版本信息, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.loading = true;
let query = {nameCode: this.udidlList[0].nameCode};
dlLastVersionByDi(query)
.then((response) => {
this.loading = false;
if (response.code == 20000) {
this.getList();
this.$message.success("更新成功!");
} else {
this.getList()
this.$message.error(response.message);
}
})
.catch(() => {
this.loading = false;
this.udidlList = [];
this.total = 0;
});
})
.catch(() => {
});
},
getList() {
this.loading = true;
filterByVersion(this.unionQuery)
.then((response) => {
this.loading = false;
@ -164,8 +213,6 @@ export default {
} else {
this.$message.error(response.message);
}
})
.catch(() => {
this.loading = false;

@ -144,7 +144,7 @@
@current-change="handleCurrentChange"
layout="prev, pager, next,total"
:total="total"
:current-page="quer.page"
:current-page="query.page"
>
</el-pagination>
</div>

@ -112,7 +112,7 @@
@current-change="handleErpPageChange"
layout="prev, pager, next"
:total="pageTotal"
:current-page="filterQuery.page"
:current-page="listQuery.page"
></el-pagination>
</div>
</el-card>

Loading…
Cancel
Save