耗材字典导入导出代码提交
parent
4b300fa389
commit
41f2177f4e
@ -0,0 +1,34 @@
|
|||||||
|
import axios from "@/utils/request";
|
||||||
|
|
||||||
|
export function getUdiInfos(query) {
|
||||||
|
return axios({
|
||||||
|
url: "/udiwms/udiinfo/filterUdi",
|
||||||
|
method: "get",
|
||||||
|
params: query
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
export function filterCompany(query) {
|
||||||
|
return axios({
|
||||||
|
url: "/udiwms/udiinfo/filterCompany",
|
||||||
|
method: "get",
|
||||||
|
params: query
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
export function filterByUuid(query) {
|
||||||
|
return axios({
|
||||||
|
url: "/udiwms/udiinfo/local/filterByUuid",
|
||||||
|
method: "get",
|
||||||
|
params: query
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
export function filterByVersion(query) {
|
||||||
|
return axios({
|
||||||
|
url: "/udiwms/syncdi/version",
|
||||||
|
method: "get",
|
||||||
|
params: query
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,33 @@
|
|||||||
|
import axios from "@/utils/request";
|
||||||
|
|
||||||
|
|
||||||
|
export function filterLog(query) {
|
||||||
|
return axios({
|
||||||
|
url: "/udiwms/products/exportLog/filter",
|
||||||
|
method: "get",
|
||||||
|
params: query
|
||||||
|
});
|
||||||
|
}
|
||||||
|
export function deleteLog(query) {
|
||||||
|
return axios({
|
||||||
|
url: "/udiwms/products/exportLog/deleteLog",
|
||||||
|
method: "post",
|
||||||
|
data: query
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
export function downloadLog(query) {
|
||||||
|
return axios({
|
||||||
|
url: "/udiwms/products/exportLog/download",
|
||||||
|
method: "get",
|
||||||
|
params: query
|
||||||
|
});
|
||||||
|
}
|
||||||
|
export function exportExcel(query) {
|
||||||
|
return axios({
|
||||||
|
url: "/udiwms/products/importLog/export",
|
||||||
|
method: "post",
|
||||||
|
data: query
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,191 @@
|
|||||||
|
import axios from "@/utils/request";
|
||||||
|
|
||||||
|
export function getUdiInfos(query) {
|
||||||
|
return axios({
|
||||||
|
url: "/udi/udirel/filterUdi",
|
||||||
|
method: "get",
|
||||||
|
params: query
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getAllUdiInfos(query) {
|
||||||
|
return axios({
|
||||||
|
url: "/udi/udirel/download",
|
||||||
|
method: "get",
|
||||||
|
params: query
|
||||||
|
});
|
||||||
|
}
|
||||||
|
export function getMutiUdiInfos(query) {
|
||||||
|
return axios({
|
||||||
|
url: "/udi/udirel/mutil/download",
|
||||||
|
method: "get",
|
||||||
|
params: query
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
export function getSmUdiInfos(query) {
|
||||||
|
return axios({
|
||||||
|
url: "/udi/udirel/filterSmUdi",
|
||||||
|
method: "get",
|
||||||
|
params: query
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
export function deletetUdiInfos(query) {
|
||||||
|
return axios({
|
||||||
|
url: "/udi/udirel/deleteById",
|
||||||
|
method: "post",
|
||||||
|
data: query
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
export function updatetUdiInfos(query) {
|
||||||
|
return axios({
|
||||||
|
url: "/udi/udirel/update",
|
||||||
|
method: "post",
|
||||||
|
data: query
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
export function checkExitUdi(query) {
|
||||||
|
return axios({
|
||||||
|
url: "/udi/udirel/check/udi",
|
||||||
|
method: "post",
|
||||||
|
data: query
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
export function combineUdi(query) {
|
||||||
|
return axios({
|
||||||
|
url: "/udi/udirel/revleance",
|
||||||
|
method: "post",
|
||||||
|
data: query
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
export function combineAllUdi(query) {
|
||||||
|
return axios({
|
||||||
|
url: "/udi/udirel/combineAll",
|
||||||
|
method: "get",
|
||||||
|
params: query
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
export function modifyRel(query) {
|
||||||
|
return axios({
|
||||||
|
url: "/udi/udirel/modifyRel",
|
||||||
|
method: "post",
|
||||||
|
data: query
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
export function addErp(query) {
|
||||||
|
return axios({
|
||||||
|
url: "/udi/udirel/addErp",
|
||||||
|
method: "post",
|
||||||
|
data: query
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
export function addAllErp(query) {
|
||||||
|
return axios({
|
||||||
|
url: "/udi/udirel/addAllErp",
|
||||||
|
method: "post",
|
||||||
|
data: query
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
export function updateErpProduct(query) {
|
||||||
|
return axios({
|
||||||
|
url: "/udi/udirel/updateErp",
|
||||||
|
method: "get",
|
||||||
|
params: query
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
export function uploadSmp(query) {
|
||||||
|
return axios({
|
||||||
|
url: "/udiwms/smp/udirl/upload",
|
||||||
|
method: "post",
|
||||||
|
data: query
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
export function disableUdi(query) {
|
||||||
|
return axios({
|
||||||
|
url: "/udi/udirel/disable",
|
||||||
|
method: "post",
|
||||||
|
data: query
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
export function thirdSysDetail(query) {
|
||||||
|
return axios({
|
||||||
|
url: "/udiwms/udirel/thirdSys/detail",
|
||||||
|
method: "get",
|
||||||
|
params: query
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
export function removeRl(query) {
|
||||||
|
return axios({
|
||||||
|
url: "/udiwms/udirl/thirdSys/remove",
|
||||||
|
method: "get",
|
||||||
|
params: query
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
export function removeDiRl(query) {
|
||||||
|
return axios({
|
||||||
|
url: "/udiwms/udirl/di/remove",
|
||||||
|
method: "get",
|
||||||
|
params: query
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
export function sysFilter(query) {
|
||||||
|
return axios({
|
||||||
|
url: "/udiwms/udirel/thirdSys/filter",
|
||||||
|
method: "get",
|
||||||
|
params: query
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
export function spcombie(query) {
|
||||||
|
return axios({
|
||||||
|
url: "/udiwms/udiinfo/spcombie",
|
||||||
|
method: "get",
|
||||||
|
params: query
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
export function lockStatus(query) {
|
||||||
|
return axios({
|
||||||
|
url: "/udiwms/udirl/lock/status",
|
||||||
|
method: "post",
|
||||||
|
data: query
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
export function changeVersion(query) {
|
||||||
|
return axios({
|
||||||
|
url: "/udi/udirel/changeVersion",
|
||||||
|
method: "post",
|
||||||
|
data: query
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -0,0 +1,35 @@
|
|||||||
|
import axios from "@/utils/request";
|
||||||
|
|
||||||
|
export function filterDetail(query) {
|
||||||
|
return axios({
|
||||||
|
url: "/udiwms/products/importLog/filterDetail",
|
||||||
|
method: "get",
|
||||||
|
params: query
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
export function filterLog(query) {
|
||||||
|
return axios({
|
||||||
|
url: "/udiwms/products/importLog/filter",
|
||||||
|
method: "get",
|
||||||
|
params: query
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
export function deleteLog(query) {
|
||||||
|
return axios({
|
||||||
|
url: "/udiwms/products/importLog/deleteLog",
|
||||||
|
method: "post",
|
||||||
|
data: query
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
export function downloadSmp(query) {
|
||||||
|
return axios({
|
||||||
|
url: "/udiwms/products/smp/download",
|
||||||
|
method: "get",
|
||||||
|
params: query
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -0,0 +1,291 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<el-card>
|
||||||
|
<el-form :model="query" class="query-form" size="mini" label-width="100px" v-show="showSearch">
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-form-item label="记录ID:">
|
||||||
|
<el-input v-model="filterQuery.genKey" style="width: 90%" placeholder="请输入记录ID"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-form-item label="处理状态:">
|
||||||
|
<el-select v-model="filterQuery.status" style="width: 90%" placeholder="请选择处理状态">
|
||||||
|
<el-option label="全部" value=""></el-option>
|
||||||
|
<el-option label="处理中" value="0"></el-option>
|
||||||
|
<el-option label="已处理" value="1"></el-option>
|
||||||
|
<el-option label="异常" value="2"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
<div class="top-right-btn">
|
||||||
|
<el-button-group style="display:flex;">
|
||||||
|
<el-button icon="el-icon-view" type="primary" @click="hideSearch">显示/隐藏搜索栏</el-button>
|
||||||
|
<el-button type="primary" icon="el-icon-refresh" @click="onReset">重置</el-button>
|
||||||
|
<el-button type="primary" icon="search" @click="getList">查询</el-button>
|
||||||
|
<el-upload :action="uploadFileUrl" multiple :limit="1" :data="uploadData" :show-file-list="false" :on-success="handleChange" :file-list="fileList">
|
||||||
|
<el-button size="mini" icon="el-icon-upload2" type="primary">导入器械信息</el-button>
|
||||||
|
</el-upload>
|
||||||
|
</el-button-group>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<el-divider style="margin: 15px"></el-divider>
|
||||||
|
|
||||||
|
|
||||||
|
<el-table v-loading="loading" :data="list" style="width: 100%" @selection-change="handleSelectionChange" border highlight-current-row>
|
||||||
|
<el-table-column label="序号" type="index"></el-table-column>
|
||||||
|
<el-table-column label="记录ID" prop="genKey" show-overflow-tooltip></el-table-column>
|
||||||
|
<el-table-column label="来源" prop="fromType" show-overflow-tooltip>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="更新日期" prop="updateTime" show-overflow-tooltip></el-table-column>
|
||||||
|
<el-table-column label="状态" prop="status" show-overflow-tooltip>
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-tag :type="statusFilterType(scope.row.status)">{{ status[scope.row.status] }}</el-tag>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="导入信息" prop="remark" show-overflow-tooltip></el-table-column>
|
||||||
|
<el-table-column label="操作" width="120">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button type="text" @click.native.stop="deleteDialog(scope.row.id)">删除</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
|
||||||
|
<el-dialog
|
||||||
|
title="器械信息导入详情"
|
||||||
|
:visible.sync="udiImportDetailVisible"
|
||||||
|
width="80%"
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
:close-on-press-escape="false"
|
||||||
|
v-if="udiImportDetailVisible"
|
||||||
|
>
|
||||||
|
<udiInfoImportDetail :currentRow="currentRow" :closeDialog="cancelDialog"></udiInfoImportDetail>
|
||||||
|
</el-dialog>
|
||||||
|
|
||||||
|
<pagination
|
||||||
|
v-show="total>0"
|
||||||
|
:total="total"
|
||||||
|
:limit.sync="filterQuery.limit"
|
||||||
|
:page.sync="filterQuery.page"
|
||||||
|
@pagination="handleCurrentChange"
|
||||||
|
></pagination>
|
||||||
|
</el-card>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import axios from "axios";
|
||||||
|
import {filterDetail, filterLog, deleteLog, downloadSmp} from "@/api/basic/udiinfoImport";
|
||||||
|
import {getBasicThirdSys} from "@/api/basic/basicThirdSys";
|
||||||
|
import udiInfoImportDetail from "./udiInfoImportDetail";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
showSearch: true,
|
||||||
|
filterQuery: {
|
||||||
|
genKey: null,
|
||||||
|
status: null,
|
||||||
|
fromType: null,
|
||||||
|
page: 1,
|
||||||
|
limit: 20,
|
||||||
|
thirdSysFk: null,
|
||||||
|
},
|
||||||
|
udiImportDetailVisible: false,
|
||||||
|
checked: false,
|
||||||
|
list: [],
|
||||||
|
detailList: [],
|
||||||
|
thirdSys: [],
|
||||||
|
thirdSysDetail: null,
|
||||||
|
total: 0,
|
||||||
|
currentRow: null,
|
||||||
|
editQuery: null,
|
||||||
|
fromStatus: {
|
||||||
|
0: "产品信息",
|
||||||
|
1: "库存信息",
|
||||||
|
2: "异常第三方上传"
|
||||||
|
},
|
||||||
|
status: {
|
||||||
|
0: "等待处理",
|
||||||
|
1: "正在处理",
|
||||||
|
2: "处理异常",
|
||||||
|
3: "处理完成"
|
||||||
|
},
|
||||||
|
uploadFileUrl: null,
|
||||||
|
uploadData: {
|
||||||
|
thirdSys: "thirdId",
|
||||||
|
},
|
||||||
|
templateDlUrl: null,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
|
||||||
|
methods: {
|
||||||
|
onReset() {
|
||||||
|
this.$router.push({
|
||||||
|
path: "",
|
||||||
|
});
|
||||||
|
this.filterQuery = {
|
||||||
|
fromType: null,
|
||||||
|
genKey: null,
|
||||||
|
status: null,
|
||||||
|
page: 1,
|
||||||
|
limit: 20,
|
||||||
|
thirdSysFk: null,
|
||||||
|
};
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
getList() {
|
||||||
|
this.loading = true;
|
||||||
|
filterLog(this.filterQuery)
|
||||||
|
.then((response) => {
|
||||||
|
this.loading = false;
|
||||||
|
this.list = response.data.list || [];
|
||||||
|
this.total = response.data.total || 0;
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
this.loading = false;
|
||||||
|
this.list = [];
|
||||||
|
this.total = 0;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
hideSearch() {
|
||||||
|
this.showSearch = !this.showSearch;
|
||||||
|
},
|
||||||
|
genInCode() {
|
||||||
|
this.selectBasicUdiVisible = true;
|
||||||
|
},
|
||||||
|
handleDetailClick(row) {
|
||||||
|
this.currentRow = row;
|
||||||
|
console.log(this.currentRow.genKey)
|
||||||
|
this.udiImportDetailVisible = true;
|
||||||
|
|
||||||
|
},
|
||||||
|
cancelDialog() {
|
||||||
|
this.udiImportDetailVisible = false;
|
||||||
|
},
|
||||||
|
handleCurrentChange(val) {
|
||||||
|
this.filterQuery.page = val.page;
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
deleteDialog(rowId) {
|
||||||
|
this.$confirm("此操作将删除该产品信息, 是否继续?", "提示", {
|
||||||
|
confirmButtonText: "确定",
|
||||||
|
cancelButtonText: "取消",
|
||||||
|
type: "warning",
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
let dQuery = {
|
||||||
|
id: rowId,
|
||||||
|
};
|
||||||
|
deleteLog(dQuery)
|
||||||
|
.then((response) => {
|
||||||
|
this.loading = false;
|
||||||
|
if (response.code == 20000) {
|
||||||
|
this.$message.success("删除成功");
|
||||||
|
} else {
|
||||||
|
this.$message.error(response.message);
|
||||||
|
}
|
||||||
|
this.getList();
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
});
|
||||||
|
},
|
||||||
|
getBasicThirdSys() {
|
||||||
|
let query = {
|
||||||
|
enabled: true,
|
||||||
|
};
|
||||||
|
getBasicThirdSys(query)
|
||||||
|
.then((response) => {
|
||||||
|
this.thirdSys = response.data.list || [];
|
||||||
|
// this.filterQuery.thirdSysFk = this.thirdSys[0].thirdId;
|
||||||
|
this.getList();
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
this.loading = false;
|
||||||
|
this.list = [];
|
||||||
|
});
|
||||||
|
axios.get("./config.json").then(res => {
|
||||||
|
let response = res.data.BASE_URL;
|
||||||
|
this.uploadFileUrl = response + "/udiwms/products/importLog/upload";
|
||||||
|
});
|
||||||
|
axios.get("./config.json").then(res => {
|
||||||
|
let response = res.data.SERVER_IP;
|
||||||
|
this.templateDlUrl = response + "/已对照产品信息模板.xlsx";
|
||||||
|
});
|
||||||
|
},
|
||||||
|
jumpDl() {
|
||||||
|
window.open(this.templateDlUrl, '_blank');
|
||||||
|
},
|
||||||
|
handleChange(response, files, fileList) {
|
||||||
|
console.log(response);
|
||||||
|
if (response.code != 20000) {
|
||||||
|
this.$message.error(response.message);
|
||||||
|
} else {
|
||||||
|
// console.log(files[0] + "\n" + this.fileList[0] + "\n" + fileList[0]);
|
||||||
|
this.getList();
|
||||||
|
this.$message.success(response.data);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
statusFilterType(status) {
|
||||||
|
const statusMap = {
|
||||||
|
0: "warning",
|
||||||
|
1: "warning",
|
||||||
|
2: "danger",
|
||||||
|
3: "success",
|
||||||
|
};
|
||||||
|
return statusMap[status];
|
||||||
|
},
|
||||||
|
dlSmp() {
|
||||||
|
this.loading = true;
|
||||||
|
downloadSmp()
|
||||||
|
.then((response) => {
|
||||||
|
this.loading = false;
|
||||||
|
this.$message.success(response.data);
|
||||||
|
this.getList();
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
},
|
||||||
|
components: {udiInfoImportDetail},
|
||||||
|
created() {
|
||||||
|
this.getBasicThirdSys();
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<style>
|
||||||
|
.itemTag {
|
||||||
|
float: left;
|
||||||
|
text-align: left;
|
||||||
|
margin-top: 10px;
|
||||||
|
width: 100px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.text {
|
||||||
|
font-size: 13px;
|
||||||
|
font-family: "Microsoft YaHei";
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-row {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-col {
|
||||||
|
border-radius: 4px;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
}
|
||||||
|
</style>
|
@ -0,0 +1,177 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<el-card>
|
||||||
|
<el-form :model="query" size="mini" label-width="100px" v-show="showSearch">
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-form-item label="UDI编码:">
|
||||||
|
<el-input v-model="filterQuery.udiCode" style="width: 90%" placeholder="请输入UDI编码"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-form-item label="处理状态:">
|
||||||
|
<el-select v-model="filterQuery.status" style="width: 90%" placeholder="请选择处理状态">
|
||||||
|
<el-option label="全部" value=""></el-option>
|
||||||
|
<el-option label="未处理" value="0"></el-option>
|
||||||
|
<el-option label="已完成" value="1"></el-option>
|
||||||
|
<el-option label="异常" value="2"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
<div class="top-right-btn">
|
||||||
|
<el-button-group style="display:flex;">
|
||||||
|
<el-button icon="el-icon-view" type="primary" @click="hideSearch">显示/隐藏搜索栏</el-button>
|
||||||
|
<el-button type="primary" icon="el-icon-refresh" @click="onReset">重置</el-button>
|
||||||
|
<el-button type="primary" icon="el-icon-search" @click="getList">查询</el-button>
|
||||||
|
</el-button-group>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<el-divider style="margin: 15px"></el-divider>
|
||||||
|
|
||||||
|
<el-table v-loading="loading" :data="list" style="width: 100%" @selection-change="handleSelectionChange" border highlight-current-row>
|
||||||
|
<el-table-column label="序号" type="index"></el-table-column>
|
||||||
|
<el-table-column label="UDI编码" prop="udiCode" show-overflow-tooltip></el-table-column>
|
||||||
|
<el-table-column label="产品ID1" prop="thirdId" show-overflow-tooltip></el-table-column>
|
||||||
|
<el-table-column label="产品ID2" prop="thirdId1" show-overflow-tooltip></el-table-column>
|
||||||
|
<el-table-column label="产品ID3" prop="thirdId2" show-overflow-tooltip></el-table-column>
|
||||||
|
<el-table-column label="产品ID4" prop="thirdId3" show-overflow-tooltip></el-table-column>
|
||||||
|
<el-table-column label="产品ID5" prop="thirdId4" show-overflow-tooltip></el-table-column>
|
||||||
|
<el-table-column label="医保编码" width="100" prop="ybbm" show-overflow-tooltip></el-table-column>
|
||||||
|
<el-table-column label="商品条码" prop="sptm" show-overflow-tooltip></el-table-column>
|
||||||
|
<el-table-column width="160" label="是否以使用单元入库" prop="isUseDy" show-overflow-tooltip></el-table-column>
|
||||||
|
<el-table-column label="状态" prop="status" show-overflow-tooltip>
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-tag :type="statusFilterType(scope.row.status)">{{ status[scope.row.status] }}</el-tag>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="备注" prop="remark" show-overflow-tooltip></el-table-column>
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
<pagination
|
||||||
|
v-show="total>0"
|
||||||
|
:total="total"
|
||||||
|
:limit.sync="filterQuery.limit"
|
||||||
|
:page.sync="filterQuery.page"
|
||||||
|
@pagination="handleCurrentChange"
|
||||||
|
></pagination>
|
||||||
|
</el-card>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import {
|
||||||
|
filterDetail,
|
||||||
|
} from "@/api/basic/udiinfoImport";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "udiImportDetail",
|
||||||
|
props: {
|
||||||
|
currentRow: {
|
||||||
|
type: Object,
|
||||||
|
required: true,
|
||||||
|
},
|
||||||
|
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
showSearch: true,
|
||||||
|
filterQuery: {
|
||||||
|
genKey: null,
|
||||||
|
udiCode: null,
|
||||||
|
status: null,
|
||||||
|
page: 1,
|
||||||
|
limit: 10,
|
||||||
|
},
|
||||||
|
list: [],
|
||||||
|
detailList: [],
|
||||||
|
total: 0,
|
||||||
|
status: {
|
||||||
|
0: "未处理",
|
||||||
|
1: "处理失败",
|
||||||
|
2: "处理成功"
|
||||||
|
},
|
||||||
|
};
|
||||||
|
},
|
||||||
|
|
||||||
|
methods: {
|
||||||
|
onReset() {
|
||||||
|
this.$router.push({
|
||||||
|
path: "",
|
||||||
|
});
|
||||||
|
this.filterQuery = {
|
||||||
|
genKey: null,
|
||||||
|
udiCode: null,
|
||||||
|
status: null,
|
||||||
|
page: 1,
|
||||||
|
limit: 10,
|
||||||
|
};
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
getList() {
|
||||||
|
this.loading = true;
|
||||||
|
console.log(" this.genKey = " + this.currentRow.genKey)
|
||||||
|
this.filterQuery.genKey = this.currentRow.genKey;
|
||||||
|
filterDetail(this.filterQuery)
|
||||||
|
.then((response) => {
|
||||||
|
this.loading = false;
|
||||||
|
this.list = response.data.list || [];
|
||||||
|
this.total = response.data.total || 0;
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
this.loading = false;
|
||||||
|
this.list = [];
|
||||||
|
this.total = 0;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
hideSearch() {
|
||||||
|
this.showSearch = !this.showSearch;
|
||||||
|
},
|
||||||
|
statusFilterType(status) {
|
||||||
|
const statusMap = {
|
||||||
|
0: "warning",
|
||||||
|
1: "danger",
|
||||||
|
2: "success",
|
||||||
|
};
|
||||||
|
return statusMap[status];
|
||||||
|
},
|
||||||
|
handleCurrentChange(val) {
|
||||||
|
this.filterQuery.page = val.page;
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
filters: {},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<style>
|
||||||
|
.itemTag {
|
||||||
|
float: left;
|
||||||
|
text-align: left;
|
||||||
|
margin-top: 10px;
|
||||||
|
width: 100px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.text {
|
||||||
|
font-size: 13px;
|
||||||
|
font-family: "Microsoft YaHei";
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-row {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-col {
|
||||||
|
border-radius: 4px;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
}
|
||||||
|
</style>
|
@ -0,0 +1,268 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<el-card>
|
||||||
|
<el-form :model="query" class="query-form" size="mini" label-width="100px" v-show="showSearch">
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-form-item label="记录ID:">
|
||||||
|
<el-input v-model="filterQuery.genKey" style="width: 90%" placeholder="请输入记录ID"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
<div class="top-right-btn">
|
||||||
|
<el-button-group style="display:flex;">
|
||||||
|
<el-button icon="el-icon-view" type="primary" @click="hideSearch">显示/隐藏搜索栏</el-button>
|
||||||
|
<el-button type="primary" icon="el-icon-refresh" @click="onReset">重置</el-button>
|
||||||
|
<el-button type="primary" icon="el-icon-search" @click="getList">查询</el-button>
|
||||||
|
<el-button type="primary" icon="el-icon-upload2" @click="exportExcel">导出医疗器械信息</el-button>
|
||||||
|
</el-button-group>
|
||||||
|
</div>
|
||||||
|
<el-divider style="margin: 15px"></el-divider>
|
||||||
|
|
||||||
|
|
||||||
|
<el-table v-loading="loading" :data="list" style="width: 100%" @selection-change="handleSelectionChange" border highlight-current-row>
|
||||||
|
<el-table-column label="序号" type="index"></el-table-column>
|
||||||
|
<el-table-column label="记录ID" prop="genKey" show-overflow-tooltip></el-table-column>
|
||||||
|
<el-table-column label="更新日期" prop="updateTime" show-overflow-tooltip></el-table-column>
|
||||||
|
<el-table-column label="状态" prop="status" show-overflow-tooltip>
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-tag :type="statusFilterType(scope.row.status)">{{ status[scope.row.status] }}</el-tag>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="下载次数" prop="dlCount" show-overflow-tooltip>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="操作" width="120">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button type="text" @click.native.stop="downloadExcel(scope.row)">下载</el-button>
|
||||||
|
<el-button type="text" @click.native.stop="deleteDialog(scope.row.id)">删除</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
<el-dialog
|
||||||
|
title="导出医疗器械产品信息"
|
||||||
|
:visible.sync="udiImportDetailVisible"
|
||||||
|
width="80%"
|
||||||
|
append-to-body
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
:close-on-press-escape="false"
|
||||||
|
v-if="udiImportDetailVisible"
|
||||||
|
>
|
||||||
|
<udiInfoSelect :selectType="selectType" v-on:cancelDialog="cancelDialog"
|
||||||
|
></udiInfoSelect>
|
||||||
|
</el-dialog>
|
||||||
|
|
||||||
|
<pagination
|
||||||
|
v-show="total>0"
|
||||||
|
:total="total"
|
||||||
|
:limit.sync="filterQuery.limit"
|
||||||
|
:page.sync="filterQuery.page"
|
||||||
|
@pagination="handleCurrentChange"
|
||||||
|
></pagination>
|
||||||
|
</el-card>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import axios from "axios";
|
||||||
|
import {filterLog, downloadLog, deleteLog} from "@/api/basic/udiInfoExport";
|
||||||
|
import udiInfoSelect from "./udIInfoSelect";
|
||||||
|
import {formatDate} from "@/utils/date";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
showSearch: true,
|
||||||
|
filterQuery: {
|
||||||
|
type: 3,
|
||||||
|
genKey: null,
|
||||||
|
status: null,
|
||||||
|
fromType: null,
|
||||||
|
page: 1,
|
||||||
|
limit: 20,
|
||||||
|
thirdSysFk: null,
|
||||||
|
},
|
||||||
|
selectType: 0,
|
||||||
|
udiImportDetailVisible: false,
|
||||||
|
list: [],
|
||||||
|
detailList: [],
|
||||||
|
thirdSys: [],
|
||||||
|
thirdSysDetail: null,
|
||||||
|
total: 0,
|
||||||
|
editQuery: null,
|
||||||
|
fromStatus: {
|
||||||
|
0: "产品信息",
|
||||||
|
1: "库存信息",
|
||||||
|
2: "异常第三方上传"
|
||||||
|
},
|
||||||
|
status: {
|
||||||
|
0: "等待处理",
|
||||||
|
1: "正在处理",
|
||||||
|
2: "处理异常",
|
||||||
|
3: "处理完成"
|
||||||
|
},
|
||||||
|
uploadFileUrl: null,
|
||||||
|
uploadData: {
|
||||||
|
thirdSys: "thirdId",
|
||||||
|
},
|
||||||
|
};
|
||||||
|
},
|
||||||
|
|
||||||
|
methods: {
|
||||||
|
onReset() {
|
||||||
|
this.$router.push({
|
||||||
|
path: "",
|
||||||
|
});
|
||||||
|
this.filterQuery = {
|
||||||
|
type: 1,
|
||||||
|
fromType: null,
|
||||||
|
genKey: null,
|
||||||
|
status: null,
|
||||||
|
page: 1,
|
||||||
|
limit: 20,
|
||||||
|
thirdSysFk: null,
|
||||||
|
};
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
hideSearch() {
|
||||||
|
this.showSearch = !this.showSearch;
|
||||||
|
},
|
||||||
|
getList() {
|
||||||
|
this.loading = true;
|
||||||
|
filterLog(this.filterQuery)
|
||||||
|
.then((response) => {
|
||||||
|
this.loading = false;
|
||||||
|
this.list = response.data.list || [];
|
||||||
|
this.total = response.data.total || 0;
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
this.loading = false;
|
||||||
|
this.list = [];
|
||||||
|
this.total = 0;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
exportExcel() {
|
||||||
|
this.selectType = 0;
|
||||||
|
this.udiImportDetailVisible = true;
|
||||||
|
},
|
||||||
|
uploadSmp() {
|
||||||
|
this.selectType = 1;
|
||||||
|
this.udiImportDetailVisible = true;
|
||||||
|
},
|
||||||
|
downloadExcel(row) {
|
||||||
|
|
||||||
|
axios.get("./config.json").then(res => {
|
||||||
|
let baseUrl = res.data.BASE_URL;
|
||||||
|
let href = baseUrl + "/udiwms/products/exportLog/download" + "?genKey=" + row.genKey;
|
||||||
|
let a = document.createElement("a");
|
||||||
|
var timestamp = formatDate(new Date(), "yyyyMMddhhmmss")
|
||||||
|
fetch(href)
|
||||||
|
.then((res) => res.blob())
|
||||||
|
.then((blob) => {
|
||||||
|
a.href = URL.createObjectURL(blob);
|
||||||
|
console.log(a.href);
|
||||||
|
a.download = "BaseProduct_" + timestamp + ".UpperIn";
|
||||||
|
document.body.appendChild(a);
|
||||||
|
a.click();
|
||||||
|
this.getList();
|
||||||
|
});
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
cancelDialog(val) {
|
||||||
|
this.udiImportDetailVisible = false;
|
||||||
|
if (val) {
|
||||||
|
this.getList();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
handleCurrentChange(val) {
|
||||||
|
this.filterQuery.page = val.page;
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
deleteDialog(rowId) {
|
||||||
|
this.$confirm("此操作将删除该产品信息, 是否继续?", "提示", {
|
||||||
|
confirmButtonText: "确定",
|
||||||
|
cancelButtonText: "取消",
|
||||||
|
type: "warning",
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
let dQuery = {
|
||||||
|
id: rowId,
|
||||||
|
};
|
||||||
|
deleteLog(dQuery)
|
||||||
|
.then((response) => {
|
||||||
|
this.loading = false;
|
||||||
|
if (response.code == 20000) {
|
||||||
|
this.$message.success("删除成功");
|
||||||
|
} else {
|
||||||
|
this.$message.error(response.message);
|
||||||
|
}
|
||||||
|
this.getList();
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
});
|
||||||
|
},
|
||||||
|
handleChange(response, files, fileList) {
|
||||||
|
console.log(response);
|
||||||
|
if (response.code != 20000) {
|
||||||
|
this.$message.error(response.message);
|
||||||
|
} else {
|
||||||
|
// console.log(files[0] + "\n" + this.fileList[0] + "\n" + fileList[0]);
|
||||||
|
this.getList();
|
||||||
|
this.$message.success("文件上传成功,请稍后刷新查看!");
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
statusFilterType(status) {
|
||||||
|
const statusMap = {
|
||||||
|
0: "warning",
|
||||||
|
1: "warning",
|
||||||
|
2: "danger",
|
||||||
|
3: "success",
|
||||||
|
};
|
||||||
|
return statusMap[status];
|
||||||
|
},
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
},
|
||||||
|
components: {udiInfoSelect},
|
||||||
|
created() {
|
||||||
|
// this.getBasicThirdSys();
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<style>
|
||||||
|
.itemTag {
|
||||||
|
float: left;
|
||||||
|
text-align: left;
|
||||||
|
margin-top: 10px;
|
||||||
|
width: 100px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.text {
|
||||||
|
font-size: 13px;
|
||||||
|
font-family: "Microsoft YaHei";
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-row {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-col {
|
||||||
|
border-radius: 4px;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
}
|
||||||
|
</style>
|
@ -0,0 +1,268 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<el-card>
|
||||||
|
<el-form :model="query" size="mini" label-width="100px" v-show="showSearch">
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-form-item label="记录ID:">
|
||||||
|
<el-input v-model="filterQuery.genKey" style="width: 90%" placeholder="请输入记录ID"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="top-right-btn">
|
||||||
|
<el-button-group style="display:flex;">
|
||||||
|
<el-button icon="el-icon-view" type="primary" @click="hideSearch">显示/隐藏搜索栏</el-button>
|
||||||
|
<el-button type="primary" icon="el-icon-refresh" @click="onReset">重置</el-button>
|
||||||
|
<el-button type="primary" icon="el-icon-search" @click="getList">查询</el-button>
|
||||||
|
<el-button type="primary" icon="el-icon-share" @click="uploadSmp">同步至自助平台</el-button>
|
||||||
|
</el-button-group>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<el-divider style="margin: 15px"></el-divider>
|
||||||
|
|
||||||
|
<el-table v-loading="loading" :data="list" style="width: 100%" @selection-change="handleSelectionChange" border highlight-current-row>
|
||||||
|
<el-table-column label="序号" type="index"></el-table-column>
|
||||||
|
<el-table-column label="记录ID" prop="genKey" show-overflow-tooltip></el-table-column>
|
||||||
|
<el-table-column label="更新日期" prop="updateTime" show-overflow-tooltip></el-table-column>
|
||||||
|
<el-table-column label="状态" prop="status" show-overflow-tooltip>
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-tag :type="statusFilterType(scope.row.status)">{{ status[scope.row.status] }}</el-tag>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="备注" prop="remark" show-overflow-tooltip></el-table-column>
|
||||||
|
<el-table-column label="操作" width="60">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button type="text" @click.native.stop="deleteDialog(scope.row.id)">删除</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
<el-dialog
|
||||||
|
title="导出医疗器械产品信息"
|
||||||
|
:visible.sync="udiImportDetailVisible"
|
||||||
|
width="80%"
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
:close-on-press-escape="false"
|
||||||
|
v-if="udiImportDetailVisible"
|
||||||
|
>
|
||||||
|
<udiInfoSelect :selectType="selectType" v-on:cancelDialog="cancelDialog"
|
||||||
|
></udiInfoSelect>
|
||||||
|
</el-dialog>
|
||||||
|
|
||||||
|
<pagination
|
||||||
|
v-show="total>0"
|
||||||
|
:total="total"
|
||||||
|
:limit.sync="filterQuery.limit"
|
||||||
|
:page.sync="filterQuery.page"
|
||||||
|
@pagination="handleCurrentChange"
|
||||||
|
></pagination>
|
||||||
|
|
||||||
|
</el-card>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import axios from "axios";
|
||||||
|
import {filterLog, downloadLog, deleteLog} from "@/api/basic/udiInfoExport";
|
||||||
|
import udiInfoSelect from "./udIInfoSelect";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
showSearch: true,
|
||||||
|
filterQuery: {
|
||||||
|
genKey: null,
|
||||||
|
status: null,
|
||||||
|
fromType: null,
|
||||||
|
type:2,
|
||||||
|
page: 1,
|
||||||
|
limit: 20,
|
||||||
|
thirdSysFk: null,
|
||||||
|
},
|
||||||
|
selectType: 0,
|
||||||
|
udiImportDetailVisible: false,
|
||||||
|
list: [],
|
||||||
|
detailList: [],
|
||||||
|
thirdSys: [],
|
||||||
|
thirdSysDetail: null,
|
||||||
|
total: 0,
|
||||||
|
editQuery: null,
|
||||||
|
fromStatus: {
|
||||||
|
0: "产品信息",
|
||||||
|
1: "库存信息",
|
||||||
|
2: "异常第三方上传"
|
||||||
|
},
|
||||||
|
status: {
|
||||||
|
0: "等待处理",
|
||||||
|
1: "正在处理",
|
||||||
|
2: "处理异常",
|
||||||
|
3: "处理完成"
|
||||||
|
},
|
||||||
|
uploadFileUrl: null,
|
||||||
|
uploadData: {
|
||||||
|
thirdSys: "thirdId",
|
||||||
|
},
|
||||||
|
};
|
||||||
|
},
|
||||||
|
|
||||||
|
methods: {
|
||||||
|
onReset() {
|
||||||
|
this.$router.push({
|
||||||
|
path: "",
|
||||||
|
});
|
||||||
|
this.filterQuery = {
|
||||||
|
fromType: null,
|
||||||
|
genKey: null,
|
||||||
|
status: null,
|
||||||
|
page: 1,
|
||||||
|
type:2,
|
||||||
|
limit: 20,
|
||||||
|
thirdSysFk: null,
|
||||||
|
};
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
getList() {
|
||||||
|
this.loading = true;
|
||||||
|
filterLog(this.filterQuery)
|
||||||
|
.then((response) => {
|
||||||
|
this.loading = false;
|
||||||
|
this.list = response.data.list || [];
|
||||||
|
this.total = response.data.total || 0;
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
this.loading = false;
|
||||||
|
this.list = [];
|
||||||
|
this.total = 0;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
hideSearch() {
|
||||||
|
this.showSearch = !this.showSearch;
|
||||||
|
},
|
||||||
|
exportExcel() {
|
||||||
|
this.selectType = 0;
|
||||||
|
this.udiImportDetailVisible = true;
|
||||||
|
},
|
||||||
|
uploadSmp() {
|
||||||
|
this.selectType = 1;
|
||||||
|
this.udiImportDetailVisible = true;
|
||||||
|
},
|
||||||
|
downloadExcel(row) {
|
||||||
|
let href =
|
||||||
|
"http://127.0.0.1:9991" +
|
||||||
|
"/udiwms/products/exportLog/download" +
|
||||||
|
"?genKey=" +row.genKey;
|
||||||
|
let a = document.createElement("a");
|
||||||
|
fetch(href)
|
||||||
|
.then((res) => res.blob())
|
||||||
|
.then((blob) => {
|
||||||
|
// 将链接地址字符内容转变成blob地址
|
||||||
|
a.href = URL.createObjectURL(blob);
|
||||||
|
console.log(a.href);
|
||||||
|
// a.download = ""; // 下载文件的名字
|
||||||
|
a.download =
|
||||||
|
row.filePath.split("/")[
|
||||||
|
row.filePath.split("/").length - 1
|
||||||
|
]; // // 下载文件的名字
|
||||||
|
document.body.appendChild(a);
|
||||||
|
a.click();
|
||||||
|
this.getList();
|
||||||
|
});
|
||||||
|
|
||||||
|
// a.setAttribute("download", "");
|
||||||
|
// a.setAttribute("href", href);
|
||||||
|
// a.click();
|
||||||
|
// window.open(mOrder.exportFilePath);
|
||||||
|
},
|
||||||
|
|
||||||
|
cancelDialog(val) {
|
||||||
|
this.udiImportDetailVisible = false;
|
||||||
|
if (val) {
|
||||||
|
this.getList();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
handleCurrentChange(val) {
|
||||||
|
this.filterQuery.page = val.page;
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
deleteDialog(rowId) {
|
||||||
|
this.$confirm("此操作将删除该产品信息, 是否继续?", "提示", {
|
||||||
|
confirmButtonText: "确定",
|
||||||
|
cancelButtonText: "取消",
|
||||||
|
type: "warning",
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
let dQuery = {
|
||||||
|
id: rowId,
|
||||||
|
};
|
||||||
|
deleteLog(dQuery)
|
||||||
|
.then((response) => {
|
||||||
|
this.loading = false;
|
||||||
|
if (response.code == 20000) {
|
||||||
|
this.$message.success("删除成功");
|
||||||
|
} else {
|
||||||
|
this.$message.error(response.message);
|
||||||
|
}
|
||||||
|
this.getList();
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
});
|
||||||
|
},
|
||||||
|
handleChange(response, files, fileList) {
|
||||||
|
console.log(response);
|
||||||
|
if (response.code != 20000) {
|
||||||
|
this.$message.error(response.message);
|
||||||
|
} else {
|
||||||
|
console.log(files[0] + "\n" + this.fileList[0] + "\n" + fileList[0]);
|
||||||
|
this.$message.success("文件上传成功,请稍后刷新查看!");
|
||||||
|
}
|
||||||
|
},
|
||||||
|
statusFilterType(status) {
|
||||||
|
const statusMap = {
|
||||||
|
0: "warning",
|
||||||
|
1: "warning",
|
||||||
|
2: "danger",
|
||||||
|
3: "success",
|
||||||
|
};
|
||||||
|
return statusMap[status];
|
||||||
|
},
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
},
|
||||||
|
components: {udiInfoSelect},
|
||||||
|
created() {
|
||||||
|
// this.getBasicThirdSys();
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<style>
|
||||||
|
.itemTag {
|
||||||
|
float: left;
|
||||||
|
text-align: left;
|
||||||
|
margin-top: 10px;
|
||||||
|
width: 100px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.text {
|
||||||
|
font-size: 13px;
|
||||||
|
font-family: "Microsoft YaHei";
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-row {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-col {
|
||||||
|
border-radius: 4px;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
}
|
||||||
|
</style>
|
Loading…
Reference in New Issue