第三方库存信息界面样式修改

prod
郑明梁 3 years ago
parent 2d2f7a8b8a
commit 1eba7ce184

@ -1,313 +1,345 @@
<template> <template>
<div> <div>
<el-card> <el-card>
<el-form :inline="true" :model="filterQuery" class="query-form" size="mini"> <el-form :model="filterQuery" size="mini" label-width="100px" v-show="showSearch">
<el-form-item class="query-form-item"> <el-row>
<el-input <el-col :span="6">
v-model="filterQuery.inventoryCode" clearable <el-form-item label="产品编码:">
placeholder="请输入产品编码" <el-input
></el-input> v-model="filterQuery.inventoryCode" clearable
style="width: 90%"
placeholder="请输入产品编码"
></el-input>
</el-form-item> </el-form-item>
<el-form-item class="query-form-item"> </el-col>
<el-input <el-col :span="6">
v-model="filterQuery.inventoryName" clearable <el-form-item label="产品名称:">
placeholder="请输入产品名称" <el-input
></el-input> v-model="filterQuery.inventoryName" clearable
style="width: 90%"
placeholder="请输入产品名称"
></el-input>
</el-form-item> </el-form-item>
<el-form-item class="query-form-item"> </el-col>
<el-input <el-col :span="6">
v-model="filterQuery.spec" clearable <el-form-item label="规格型号:">
placeholder="请输入规格型号" <el-input
></el-input> v-model="filterQuery.spec" clearable
style="width: 90%"
placeholder="请输入规格型号"
></el-input>
</el-form-item> </el-form-item>
<el-form-item class="query-form-item"> </el-col>
<el-input <el-col :span="6">
v-model="filterQuery.registerCertNo" clearable <el-form-item label-width="120px" label="注册/备案凭证号:">
placeholder="请输入注册/备案凭证号" <el-input
></el-input> v-model="filterQuery.registerCertNo" clearable
style="width: 90%"
placeholder="请输入注册/备案凭证号"
></el-input>
</el-form-item> </el-form-item>
<el-form-item class="query-form-item"> </el-col>
<el-input </el-row>
v-model="filterQuery.manufactory" clearable <el-row>
placeholder="请输入生厂厂家" <el-col :span="6">
></el-input> <el-form-item label="生厂厂家:">
<el-input
v-model="filterQuery.manufactory" clearable
style="width: 90%"
placeholder="请输入生厂厂家"
></el-input>
</el-form-item> </el-form-item>
<el-form-item class="query-form-item"> </el-col>
<el-select v-model="filterQuery.filterCount" placeholder="过滤条件"> <el-col :span="6">
<el-option label="全部" value="0"></el-option> <el-form-item label="库存:">
<el-option label="库存等于0" value="1"></el-option> <el-select v-model="filterQuery.filterCount" style="width: 90%" placeholder="过滤条件">
<el-option label="库存大于0" value="2"></el-option> <el-option label="全部" value="0"></el-option>
</el-select> <el-option label="库存等于0" value="1"></el-option>
<el-option label="库存大于0" value="2"></el-option>
</el-select>
</el-form-item> </el-form-item>
<el-form-item class="query-form-item"> </el-col>
<el-col :span="6">
<el-form-item label="外部系统:">
<el-select v-model="filterQuery.thirdSys" placeholder="请选择第三方系统"> <el-select v-model="filterQuery.thirdSys" style="width: 90%" placeholder="请选择第三方系统">
<el-option <el-option
v-for="item in thirdSys" v-for="item in thirdSys"
:key="item.value" :key="item.value"
:label="item.thirdName" :label="item.thirdName"
:value="item.thirdId"> :value="item.thirdId">
<span style="float: left">{{ item.thirdName }}</span> <span style="float: left">{{ item.thirdName }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.thirdId }}</span> <span style="float: right; color: #8492a6; font-size: 13px">{{ item.thirdId }}</span>
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item> </el-col>
<el-button-group style="display:flex;"> </el-row>
<el-button type="primary" icon="el-icon-refresh" @click="onReset"></el-button> </el-form>
<el-button type="primary" icon="el-icon-search" @click="getList"></el-button>
<el-button type="primary" icon="search" @click="clearAll"
v-if="!this.thirdSysDetail.enabled">清空全部 <div class="top-right-btn">
</el-button> <el-button-group style="display:flex;">
</el-button-group> <el-button icon="el-icon-view" type="primary" @click="hideSearch">/</el-button>
</el-form-item> <el-button type="primary" icon="el-icon-refresh" @click="onReset"></el-button>
</el-form> <el-button type="primary" icon="el-icon-search" @click="getList"></el-button>
<el-table v-loading="loading" :data="list" style="width: 100%" border highlight-current-row> <el-button type="primary" icon="el-icon-delete-solid" @click="clearAll"
<el-table-column label="序号" type="index" width="70"></el-table-column> v-if="!this.thirdSysDetail.enabled">清空全部
<el-table-column label="产品编码" prop="code" show-overflow-tooltip></el-table-column> </el-button>
<el-table-column label="产品名称" prop="name" show-overflow-tooltip></el-table-column> </el-button-group>
<el-table-column label="规格型号" prop="spec" show-overflow-tooltip></el-table-column> </div>
<el-table-column label="批次号" prop="batchNo" show-overflow-tooltip></el-table-column> <el-divider style="margin: 15px"></el-divider>
<el-table-column label="生产日期" prop="manufacturingDate" show-overflow-tooltip></el-table-column>
<el-table-column label="失效日期" prop="expirationDate" show-overflow-tooltip></el-table-column>
<el-table-column label="数量" prop="count" show-overflow-tooltip></el-table-column>
<el-table-column label="注册证号" prop="registerCertNo" show-overflow-tooltip></el-table-column>
<el-table-column label="生产厂家" prop="manufactory" show-overflow-tooltip></el-table-column>
<el-table-column label="仓位" prop="warehouseName" show-overflow-tooltip></el-table-column>
<el-table-column label="货位" prop="spaceName" show-overflow-tooltip></el-table-column>
<el-table v-loading="loading" :data="list" style="width: 100%" border highlight-current-row>
<el-table-column label="序号" type="index" width="70"></el-table-column>
<el-table-column label="产品编码" prop="code" show-overflow-tooltip></el-table-column>
<el-table-column label="产品名称" prop="name" show-overflow-tooltip></el-table-column>
<el-table-column label="规格型号" prop="spec" show-overflow-tooltip></el-table-column>
<el-table-column label="批次号" prop="batchNo" show-overflow-tooltip></el-table-column>
<el-table-column label="生产日期" prop="manufacturingDate" show-overflow-tooltip></el-table-column>
<el-table-column label="失效日期" prop="expirationDate" show-overflow-tooltip></el-table-column>
<el-table-column label="数量" prop="count" show-overflow-tooltip></el-table-column>
<el-table-column label="注册证号" prop="registerCertNo" show-overflow-tooltip></el-table-column>
<el-table-column label="生产厂家" prop="manufactory" show-overflow-tooltip></el-table-column>
<el-table-column label="仓位" prop="warehouseName" show-overflow-tooltip></el-table-column>
<el-table-column label="货位" prop="spaceName" show-overflow-tooltip></el-table-column>
<el-table-column label="操作" v-if="thirdSysDetail.fromType!=0"> <el-table-column label="操作" v-if="thirdSysDetail.fromType!=0" width="60">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" size="small" @click.native.stop="deleteDialog(scope.row)" <el-button type="text" size="small" @click.native.stop="deleteDialog(scope.row)"
>删除 >删除
</el-button> </el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<pagination <pagination
v-show="total>0" v-show="total>0"
:total="total" :total="total"
:page.sync="filterQuery.page" :page.sync="filterQuery.page"
:limit.sync="filterQuery.limit" :limit.sync="filterQuery.limit"
@pagination="getList" @pagination="getList"
/> />
</el-card> </el-card>
</div> </div>
</template> </template>
<script> <script>
import {delInvProducts, delAll, downloadAll} from "@/api/thrsys/thrInvProducts"; import {delInvProducts, delAll, downloadAll} from "@/api/thrsys/thrInvProducts";
import {getBasicThirdSys, filterDetailByKey} from "@/api/basic/basicThirdSys"; import {getBasicThirdSys, filterDetailByKey} from "@/api/basic/basicThirdSys";
import {selectIp} from "@/api/param/systemParamConfig"; import {selectIp} from "@/api/param/systemParamConfig";
import {getOnhands} from "@/api/inventory/onHand.js"; import {getOnhands} from "@/api/inventory/onHand.js";
export default { export default {
data() { data() {
return { return {
filterQuery: { showSearch: true,
inventoryCode: null, filterQuery: {
inventoryName: null, inventoryCode: null,
spec: null, inventoryName: null,
registerCertNo: null, spec: null,
manufactory: null, registerCertNo: null,
thirdSys: null, manufactory: null,
page: 1, thirdSys: null,
limit: 100, page: 1,
filterCount:null, limit: 100,
}, filterCount: null,
total: 0, },
list: [], total: 0,
thirdSys: [], list: [],
thirdSysDetail: null, thirdSys: [],
fileList: [], thirdSysDetail: null,
uploadData: { fileList: [],
thirdSys: "thirdId", uploadData: {
}, thirdSys: "thirdId",
uploadFileUrl: null, },
}; uploadFileUrl: null,
}, };
},
methods: {
onReset() {
this.$router.push({
path: "",
});
this.filterQuery = {
inventoryCode: null,
inventoryName: null,
thirdSys: null,
spec: null,
registerCertNo: null,
manufactory: null,
page: 1,
limit: 100,
filterCount:null,
};
this.getList();
},
getList() { methods: {
if (this.filterQuery.thirdSys == null) { onReset() {
this.$message.warning("请先选择第三方系统!") this.$router.push({
return; path: "",
} });
this.loading = true; this.filterQuery = {
getOnhands(this.filterQuery) inventoryCode: null,
.then((response) => { inventoryName: null,
this.loading = false; thirdSys: null,
if (response.code == 20000) { spec: null,
this.list = response.data.list || []; registerCertNo: null,
this.total = response.data.total || 0; manufactory: null,
}else { page: 1,
this.$message.error(response.message); limit: 100,
this.loading = false; filterCount: null,
} };
}) this.getList();
.catch(() => { },
this.loading = false; hideSearch() {
this.list = []; this.showSearch = !this.showSearch;
this.total = 0; },
}); getList() {
}, if (this.filterQuery.thirdSys == null) {
deleteDialog(row) { this.$message.warning("请先选择第三方系统!")
this.$confirm("此操作将永久删除该产品信息, 是否继续?", "提示", { return;
confirmButtonText: "确定", }
cancelButtonText: "取消", this.loading = true;
type: "warning", getOnhands(this.filterQuery)
}) .then((response) => {
.then(() => { this.loading = false;
if (response.code == 20000) {
this.list = response.data.list || [];
this.total = response.data.total || 0;
} else {
this.$message.error(response.message);
this.loading = false;
}
})
.catch(() => {
this.loading = false;
this.list = [];
this.total = 0;
});
},
deleteDialog(row) {
this.$confirm("此操作将永久删除该产品信息, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
let dQuery = { let dQuery = {
id: row.id, id: row.id,
}; };
delInvProducts(dQuery) delInvProducts(dQuery)
.then((response) => { .then((response) => {
this.loading = false; this.loading = false;
if (response.code == 20000) { if (response.code == 20000) {
this.$message.success("删除成功"); this.$message.success("删除成功");
this.getList(); this.getList();
} else { } else {
this.$message.error(response.message); this.$message.error(response.message);
} }
}) })
.catch(() => { .catch(() => {
this.loading = false; this.loading = false;
}); });
}) })
.catch(() => { .catch(() => {
}); });
}, },
clearAll() { clearAll() {
this.$confirm("此操作将清空所有库存产品信息, 是否继续?", "提示", { this.$confirm("此操作将清空所有库存产品信息, 是否继续?", "提示", {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
type: "warning", type: "warning",
}) })
.then(() => { .then(() => {
delAll() delAll()
.then((response) => { .then((response) => {
this.loading = false; this.loading = false;
if (response.code == 20000) { if (response.code == 20000) {
this.$message.success("删除成功"); this.$message.success("删除成功");
this.getList(); this.getList();
} else { } else {
this.$message.success(response.message); this.$message.success(response.message);
} }
}) })
.catch(() => { .catch(() => {
this.loading = false; this.loading = false;
}); });
}) })
.catch(() => { .catch(() => {
}); });
}, },
handleChange(response, files, fileList) { handleChange(response, files, fileList) {
console.log(response); console.log(response);
if (response.code != 20000) { if (response.code != 20000) {
this.$message.error(response.message); this.$message.error(response.message);
} else { } else {
console.log(files[0] + "\n" + this.fileList[0] + "\n" + fileList[0]); console.log(files[0] + "\n" + this.fileList[0] + "\n" + fileList[0]);
this.$message.success("文件上传成功,请稍后刷新查看!"); this.$message.success("文件上传成功,请稍后刷新查看!");
} }
}, },
getBasicThirdSys() { getBasicThirdSys() {
let query = { let query = {
enabled: true, enabled: true,
}; };
getBasicThirdSys(query) getBasicThirdSys(query)
.then((response) => { .then((response) => {
this.thirdSys = response.data.list || []; this.thirdSys = response.data.list || [];
this.filterQuery.thirdSys = this.thirdSys[0].thirdId; this.filterQuery.thirdSys = this.thirdSys[0].thirdId;
this.uploadData.thirdSys = this.filterQuery.thirdSys; this.uploadData.thirdSys = this.filterQuery.thirdSys;
this.getThirdSysDetail(); this.getThirdSysDetail();
this.selectSysParam(); this.selectSysParam();
this.getList(); this.getList();
}) })
.catch(() => { .catch(() => {
this.loading = false; this.loading = false;
this.list = []; this.list = [];
}); });
}, },
selectSysParam() { selectSysParam() {
let query = { let query = {
key: "thirdIpUrl", key: "thirdIpUrl",
thirdSysFk: this.filterQuery.thirdSys thirdSysFk: this.filterQuery.thirdSys
}; };
selectIp(query).then((response) => { selectIp(query).then((response) => {
if (response.code == 20000) { if (response.code == 20000) {
this.uploadFileUrl = response.data.thridUrl + "/udiwms/erp/invpi/upload"; this.uploadFileUrl = response.data.thridUrl + "/udiwms/erp/invpi/upload";
} }
}); });
}, },
thirdSysChange() { thirdSysChange() {
this.uploadData.thirdSys = this.filterQuery.thirdSys; this.uploadData.thirdSys = this.filterQuery.thirdSys;
this.getThirdSysDetail(); this.getThirdSysDetail();
}, },
getThirdSysDetail() { getThirdSysDetail() {
let query = { let query = {
thirdSysFk: this.filterQuery.thirdSys, thirdSysFk: this.filterQuery.thirdSys,
key: "invPiUrl", key: "invPiUrl",
}; };
filterDetailByKey(query) filterDetailByKey(query)
.then((response) => { .then((response) => {
this.thirdSysDetail = response.data; this.thirdSysDetail = response.data;
}) })
.catch(() => { .catch(() => {
this.loading = false; this.loading = false;
this.list = []; this.list = [];
}); });
}, },
downloadDatas() { downloadDatas() {
let query = { let query = {
thirdSysFk: this.filterQuery.thirdSys thirdSysFk: this.filterQuery.thirdSys
}; };
downloadAll(query).then((response) => { downloadAll(query).then((response) => {
if (response.code == 20000) { if (response.code == 20000) {
this.$message.success(response.data); this.$message.success(response.data);
} else { } else {
this.$message.error(response.message); this.$message.error(response.message);
} }
}); });
}, },
}, },
components: {}, components: {},
mounted() { mounted() {
}, },
created() { created() {
this.getBasicThirdSys(); this.getBasicThirdSys();
}, },
}; };
</script> </script>
<style scoped> <style scoped>
.el-form-item--mini.el-form-item {
margin-bottom: 9px;
}
</style> </style>

@ -1,294 +1,301 @@
<template> <template>
<div> <div>
<el-card> <el-card>
<el-form :inline="true" :model="query" class="query-form" size="mini"> <el-form :model="query" class="query-form" size="mini" label-width="100px" v-show="showSearch">
<el-row> <el-row>
<el-form-item class="query-form-item"> <el-col :span="6">
<el-input v-model="filterQuery.genKey" placeholder="请输入记录ID"></el-input> <el-form-item label="记录ID:">
</el-form-item> <el-input v-model="filterQuery.genKey" style="width: 90%" placeholder="请输入记录ID"></el-input>
<el-form-item> </el-form-item>
<el-button-group style="display:flex;"> </el-col>
<el-button type="primary" icon="el-icon-refresh" @click="onReset"></el-button> </el-row>
<el-button type="primary" icon="el-icon-search" @click="getList"></el-button> </el-form>
<el-button type="primary" icon="el-icon-upload2" @click="exportExcel">Excel</el-button>
</el-button-group>
</el-form-item>
</el-row>
</el-form>
<el-table <div class="top-right-btn">
v-loading="loading" <el-button-group style="display:flex;">
:data="list" <el-button icon="el-icon-view" type="primary" @click="hideSearch">/</el-button>
style="width: 100%" <el-button type="primary" icon="el-icon-refresh" @click="onReset"></el-button>
@selection-change="handleSelectionChange" <el-button type="primary" icon="el-icon-search" @click="getList"></el-button>
border highlight-current-row <el-button type="primary" icon="el-icon-upload2" @click="exportExcel">Excel</el-button>
> </el-button-group>
<el-table-column label="序号" type="index"></el-table-column> </div>
<el-table-column <el-divider style="margin: 15px"></el-divider>
label="记录ID" <el-table
prop="genKey" v-loading="loading"
show-overflow-tooltip :data="list"
></el-table-column> 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 <el-table-column
label="更新日期" label="更新日期"
prop="updateTime" prop="updateTime"
show-overflow-tooltip show-overflow-tooltip
></el-table-column> ></el-table-column>
<el-table-column <el-table-column
label="状态" label="状态"
prop="status" prop="status"
show-overflow-tooltip show-overflow-tooltip
>
<template slot-scope="scope">
<el-tag
:type="statusFilterType(scope.row.status)"
>{{ status[scope.row.status] }}
</el-tag
> >
<template slot-scope="scope"> </template>
<el-tag </el-table-column>
:type="statusFilterType(scope.row.status)" <el-table-column
>{{ status[scope.row.status] }} label="下载次数"
</el-tag prop="dlCount"
> show-overflow-tooltip
</template> >
</el-table-column> </el-table-column>
<el-table-column <el-table-column label="操作" width="120">
label="下载次数" <template slot-scope="scope">
prop="dlCount" <el-button
show-overflow-tooltip type="text"
@click.native.stop="downloadExcel(scope.row)"
>下载
</el-button
> >
</el-table-column> <el-button
<el-table-column label="操作" width="160"> type="text"
<template slot-scope="scope"> @click.native.stop="deleteDialog(scope.row.id)"
<el-button >删除
type="text" </el-button
size="small" >
@click.native.stop="downloadExcel(scope.row)" </template>
>下载 </el-table-column>
</el-button </el-table>
>
<el-button
type="text"
size="small"
@click.native.stop="deleteDialog(scope.row.id)"
>删除
</el-button
>
</template>
</el-table-column>
</el-table>
<el-dialog <el-dialog
title="导出库存产品信息" title="导出库存产品信息"
:visible.sync="thrInvProductsSelectVisible" :visible.sync="thrInvProductsSelectVisible"
width="85%" width="80%"
:close-on-click-modal="false" :close-on-click-modal="false"
:close-on-press-escape="false" :close-on-press-escape="false"
v-if="thrInvProductsSelectVisible" v-if="thrInvProductsSelectVisible"
> >
<thrInvProductsSelect :selectType="selectType" v-on:cancelDialog="cancelDialog" <thrInvProductsSelect :selectType="selectType" v-on:cancelDialog="cancelDialog"
></thrInvProductsSelect> ></thrInvProductsSelect>
</el-dialog> </el-dialog>
<pagination <pagination
v-show="total>0" v-show="total>0"
:total="total" :total="total"
:page.sync="filterQuery.page" :page.sync="filterQuery.page"
:limit.sync="filterQuery.limit" :limit.sync="filterQuery.limit"
@pagination="getList" @pagination="getList"
/> />
</el-card> </el-card>
</div> </div>
</template> </template>
<script> <script>
import {filterLog, deleteLog} from "@/api/thrsys/thrInvProductsExport.js"; import {filterLog, deleteLog} from "@/api/thrsys/thrInvProductsExport.js";
import thrInvProductsSelect from "./thrInvProductsSelect"; import thrInvProductsSelect from "./thrInvProductsSelect";
import axios from "axios"; import axios from "axios";
export default {
data() {
return {
filterQuery: {
genKey: null,
status: null,
fromType: null,
page: 1,
limit: 20,
thirdSysFk: null,
},
selectType: 0,
thrInvProductsSelectVisible: 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: { export default {
onReset() { data() {
this.$router.push({ return {
path: "", showSearch: true,
}); filterQuery: {
this.filterQuery = { genKey: null,
fromType: null, status: null,
genKey: null, fromType: null,
status: null, page: 1,
page: 1, limit: 20,
limit: 20, thirdSysFk: null,
thirdSysFk: null, },
}; selectType: 0,
this.getList(); thrInvProductsSelectVisible: false,
}, list: [],
getList() { detailList: [],
this.loading = true; thirdSys: [],
filterLog(this.filterQuery) thirdSysDetail: null,
.then((response) => { total: 0,
if (response.code == 20000) { editQuery: null,
this.list = response.data.list || []; fromStatus: {
this.total = response.data.total || 0; 0: "产品信息",
}else { 1: "库存信息",
this.$message.error(response.message); 2: "异常第三方上传"
} },
status: {
0: "等待处理",
1: "正在处理",
2: "处理异常",
3: "处理完成"
},
uploadFileUrl: null,
uploadData: {
thirdSys: "thirdId",
},
};
},
this.loading = false; methods: {
onReset() {
this.$router.push({
path: "",
});
this.filterQuery = {
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) => {
if (response.code == 20000) {
this.list = response.data.list || [];
this.total = response.data.total || 0;
} else {
this.$message.error(response.message);
}
}) this.loading = false;
.catch(() => {
this.loading = false;
this.list = [];
this.total = 0;
});
},
exportExcel() { })
this.selectType = 0; .catch(() => {
this.thrInvProductsSelectVisible = true; this.loading = false;
}, this.list = [];
uploadSmp() { this.total = 0;
this.selectType = 1; });
this.thrInvProductsSelectVisible = true; },
},
downloadExcel(row) {
axios.get("./config.json").then(res => {
let baseUrl = res.data.BASE_URL;
let href = baseUrl + "/udiwms/invProducts/exportLog/download" + "?genKey=" +row.genKey;
let a = document.createElement("a");
fetch(href)
.then((res) => res.blob())
.then((blob) => {
a.href = URL.createObjectURL(blob);
console.log(a.href);
a.download =
row.filePath.split("/")[
row.filePath.split("/").length - 1
]; // //
document.body.appendChild(a);
a.click();
this.getList();
});
}); exportExcel() {
this.selectType = 0;
this.thrInvProductsSelectVisible = true;
},
uploadSmp() {
this.selectType = 1;
this.thrInvProductsSelectVisible = true;
},
downloadExcel(row) {
axios.get("./config.json").then(res => {
let baseUrl = res.data.BASE_URL;
let href = baseUrl + "/udiwms/invProducts/exportLog/download" + "?genKey=" + row.genKey;
let a = document.createElement("a");
fetch(href)
.then((res) => res.blob())
.then((blob) => {
a.href = URL.createObjectURL(blob);
console.log(a.href);
a.download =
row.filePath.split("/")[
row.filePath.split("/").length - 1
]; // //
document.body.appendChild(a);
a.click();
this.getList();
});
});
},
cancelDialog(val) { },
this.thrInvProductsSelectVisible = false;
if (val) { cancelDialog(val) {
this.getList(); this.thrInvProductsSelectVisible = false;
} if (val) {
}, this.getList();
deleteDialog(rowId) { }
this.$confirm("此操作将删除该导出记录, 是否继续?", "提示", { },
confirmButtonText: "确定", deleteDialog(rowId) {
cancelButtonText: "取消", this.$confirm("此操作将删除该导出记录, 是否继续?", "提示", {
type: "warning", confirmButtonText: "确定",
}) cancelButtonText: "取消",
.then(() => { type: "warning",
let dQuery = { })
id: rowId, .then(() => {
}; let dQuery = {
deleteLog(dQuery) id: rowId,
.then((response) => { };
this.loading = false; deleteLog(dQuery)
if (response.code == 20000) { .then((response) => {
this.$message.success("删除成功"); this.loading = false;
} else { if (response.code == 20000) {
this.$message.error(response.message); this.$message.success("删除成功");
} } else {
this.getList(); this.$message.error(response.message);
}) }
.catch(() => { this.getList();
this.loading = false; })
}); .catch(() => {
}) this.loading = false;
.catch(() => { });
}); })
}, .catch(() => {
handleChange(response, files, fileList) { });
console.log(response); },
if (response.code != 20000) { handleChange(response, files, fileList) {
this.$message.error(response.message); console.log(response);
} else { if (response.code != 20000) {
console.log(files[0] + "\n" + this.fileList[0] + "\n" + fileList[0]); this.$message.error(response.message);
this.$message.success("文件上传成功,请稍后刷新查看!"); } else {
} console.log(files[0] + "\n" + this.fileList[0] + "\n" + fileList[0]);
}, this.$message.success("文件上传成功,请稍后刷新查看!");
statusFilterType(status) { }
const statusMap = { },
0: "warning", statusFilterType(status) {
1: "warning", const statusMap = {
2: "danger", 0: "warning",
3: "success", 1: "warning",
}; 2: "danger",
return statusMap[status]; 3: "success",
}, };
}, return statusMap[status];
mounted() { },
}, },
components: {thrInvProductsSelect}, mounted() {
created() { },
// this.getBasicThirdSys(); components: {thrInvProductsSelect},
this.getList(); created() {
}, // this.getBasicThirdSys();
}; this.getList();
},
};
</script> </script>
<style> <style>
.itemTag { .itemTag {
float: left; float: left;
text-align: left; text-align: left;
margin-top: 10px; margin-top: 10px;
width: 100px; width: 100px;
} }
.text { .text {
font-size: 13px; font-size: 13px;
font-family: "Microsoft YaHei"; font-family: "Microsoft YaHei";
} }
.el-row { .el-row {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
} }
.el-col { .el-col {
border-radius: 4px; border-radius: 4px;
flex-wrap: wrap; flex-wrap: wrap;
} }
</style> </style>

@ -1,155 +1,158 @@
<template> <template>
<div> <div>
<el-card> <el-card>
<el-form :inline="true" :model="query" class="query-form" size="mini"> <el-form :model="query" size="mini" label-width="100px" v-show="showSearch">
<el-row> <el-row>
<el-form-item class="query-form-item"> <el-col :span="6">
<el-input v-model="filterQuery.genKey" placeholder="请输入记录ID"></el-input> <el-form-item label="记录ID:">
</el-form-item> <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-col :span="6">
<el-form-item label="外部系统:">
<el-select v-model="filterQuery.thirdSysFk" style="width: 90%" placeholder="请选择第三方系统"
@change="sysChange">
<el-option
v-for="item in thirdSys"
:key="item.value"
:label="item.thirdName"
:value="item.thirdId">
<span style="float: left">{{ item.thirdName }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.thirdId }}</span>
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
</el-form>
<el-form-item class="query-form-item"> <div class="top-right-btn">
<el-select v-model="filterQuery.status" placeholder="请选择处理状态"> <el-button-group style="display:flex;">
<el-option label="全部" value=""></el-option> <el-button icon="el-icon-view" type="primary" @click="hideSearch">/</el-button>
<el-option label="处理中" value="0"></el-option> <el-button type="primary" icon="el-icon-refresh" @click="onReset"></el-button>
<el-option label="已处理" value="1"></el-option> <el-button type="primary" icon="el-icon-search" @click="getList"></el-button>
<el-option label="异常" value="2"></el-option> <el-upload
</el-select> v-if="this.thirdSysDetail.enabled && this.thirdSysDetail.fromType==1"
</el-form-item> :action="uploadFileUrl"
<el-form-item class="query-form-item"> multiple
<el-select v-model="filterQuery.thirdSysFk" placeholder="请选择第三方系统" @change="sysChange"> :limit="1"
<el-option :data="uploadData"
v-for="item in thirdSys" :show-file-list="false"
:key="item.value" :on-success="handleChange"
:label="item.thirdName" :file-list="fileList"
:value="item.thirdId"> >
<span style="float: left">{{ item.thirdName }}</span> <el-button icon="el-icon-bottom-right" type="primary">导入库存产品信息</el-button>
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.thirdId }}</span> </el-upload>
</el-option> <el-button type="primary" icon="el-icon-download" @click="downloadInpi"
</el-select> v-if="this.thirdSysDetail.enabled && this.thirdSysDetail.fromType==3">
</el-form-item> 下载库存产品信息
</el-button>
</el-button-group>
</div>
<el-divider style="margin: 15px"></el-divider>
<el-form-item> <el-table
<el-button-group style="display:flex;"> v-loading="loading"
<el-button type="primary" icon="el-icon-refresh" @click="onReset"></el-button> :data="list"
<el-button type="primary" icon="el-icon-search" @click="getList"></el-button> style="width: 100%"
<el-upload @selection-change="handleSelectionChange"
v-if="this.thirdSysDetail.enabled && this.thirdSysDetail.fromType==1" border highlight-current-row
:action="uploadFileUrl" >
multiple <el-table-column label="序号" type="index"></el-table-column>
:limit="1" <el-table-column
:data="uploadData" label="记录ID"
:show-file-list="false" prop="genKey"
:on-success="handleChange" show-overflow-tooltip
:file-list="fileList" ></el-table-column>
>
<el-button size="mini" type="primary">导入库存产品信息</el-button>
</el-upload>
<!-- <el-button type="primary" icon="search" @click="jumpDl"-->
<!-- v-if="this.thirdSysDetail.enabled && this.thirdSysDetail.fromType==1">模板下载-->
<!-- </el-button>-->
<el-button type="primary" icon="el-icon-download" @click="downloadInpi"
v-if="this.thirdSysDetail.enabled && this.thirdSysDetail.fromType==3">
下载库存产品信息
</el-button>
</el-button-group>
</el-form-item>
</el-row>
</el-form>
<el-table <el-table-column
v-loading="loading" label="来源"
:data="list" prop="fromType"
style="width: 100%" show-overflow-tooltip
@selection-change="handleSelectionChange"
border highlight-current-row
> >
<el-table-column label="序号" type="index"></el-table-column> </el-table-column>
<el-table-column <el-table-column
label="记录ID" label="更新日期"
prop="genKey" prop="updateTime"
show-overflow-tooltip show-overflow-tooltip
></el-table-column> ></el-table-column>
<el-table-column
<el-table-column label="来源系统"
label="来源" prop="thirdSysFk"
prop="fromType" show-overflow-tooltip
show-overflow-tooltip :formatter="formatterThirdSys"
></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="handleDetailClick(scope.row)"
>详情
</el-button
> >
</el-table-column> <el-button
<el-table-column type="text"
label="更新日期" @click.native.stop="deleteDialog(scope.row.id)"
prop="updateTime" >删除
show-overflow-tooltip </el-button
></el-table-column>
<el-table-column
label="来源系统"
prop="thirdSysFk"
show-overflow-tooltip
:formatter="formatterThirdSys"
></el-table-column>
<el-table-column
label="状态"
prop="status"
show-overflow-tooltip
> >
<template slot-scope="scope"> </template>
<el-tag </el-table-column>
:type="statusFilterType(scope.row.status)" </el-table>
>{{ 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="160">
<template slot-scope="scope">
<el-button
type="text"
size="small"
@click.native.stop="handleDetailClick(scope.row)"
>详情
</el-button
>
<el-button
type="text"
size="small"
@click.native.stop="deleteDialog(scope.row.id)"
>删除
</el-button
>
</template>
</el-table-column>
</el-table>
<el-dialog <el-dialog
title="导入库存产品信息详情详情" title="导入库存产品信息详情详情"
:visible.sync="udiImportDetailVisible" :visible.sync="udiImportDetailVisible"
width="85%" width="80%"
:close-on-click-modal="false" :close-on-click-modal="false"
:close-on-press-escape="false" :close-on-press-escape="false"
v-if="udiImportDetailVisible" v-if="udiImportDetailVisible"
> >
<thrInvProductsImportDetail <thrInvProductsImportDetail
:currentRow="currentRow" :currentRow="currentRow"
></thrInvProductsImportDetail> ></thrInvProductsImportDetail>
</el-dialog> </el-dialog>
<el-dialog <el-dialog
title="导出库存产品信息" title="导出库存产品信息"
:visible.sync="thrInvProductsSelectVisible" :visible.sync="thrInvProductsSelectVisible"
width="85%" width="80%"
:close-on-click-modal="false" :close-on-click-modal="false"
:close-on-press-escape="false" :close-on-press-escape="false"
v-if="thrInvProductsSelectVisible" v-if="thrInvProductsSelectVisible"
> >
<thrInvProductsSelect :selectType="selectType" v-on:cancelDialog="cancelDialog" <thrInvProductsSelect :selectType="selectType" v-on:cancelDialog="cancelDialog"
:isDownThrSys="true" :isDownThrSys="true"
></thrInvProductsSelect> ></thrInvProductsSelect>
</el-dialog> </el-dialog>
<pagination <pagination
v-show="total>0" v-show="total>0"
:total="total" :total="total"
@ -157,8 +160,8 @@
:limit.sync="filterQuery.limit" :limit.sync="filterQuery.limit"
@pagination="getList" @pagination="getList"
/> />
</el-card> </el-card>
</div> </div>
</template> </template>
<script> <script>
@ -171,271 +174,275 @@ import thrInvProductsSelect from "./thrInvProductsSelect";
import axios from "axios"; import axios from "axios";
export default { export default {
data() { data() {
return { return {
filterQuery: { showSearch: true,
genKey: null, filterQuery: {
status: null, genKey: null,
fromType: null, status: null,
page: 1, fromType: null,
limit: 20, page: 1,
thirdSysFk: null, limit: 20,
}, thirdSysFk: null,
selectType: 0, },
udiImportDetailVisible: false, selectType: 0,
thrInvProductsSelectVisible: false, udiImportDetailVisible: false,
checked: false, thrInvProductsSelectVisible: false,
list: [], checked: false,
detailList: [], list: [],
fileList: [], detailList: [],
thirdSys: [], fileList: [],
thirdSysDetail: null, thirdSys: [],
total: 0, thirdSysDetail: null,
currentRow: null, total: 0,
editQuery: null, currentRow: null,
fromStatus: { editQuery: null,
0: "产品信息", fromStatus: {
1: "库存信息", 0: "产品信息",
2: "异常第三方上传" 1: "库存信息",
}, 2: "异常第三方上传"
status: { },
0: "等待处理", status: {
1: "正在处理", 0: "等待处理",
2: "处理异常", 1: "正在处理",
3: "处理完成" 2: "处理异常",
}, 3: "处理完成"
uploadFileUrl: null, },
uploadData: { uploadFileUrl: null,
thirdSys: "thirdId", uploadData: {
}, thirdSys: "thirdId",
templateDlUrl: null, },
}; templateDlUrl: null,
}, };
},
methods: { methods: {
onReset() { onReset() {
this.$router.push({ this.$router.push({
path: "", path: "",
}); });
this.filterQuery = { this.filterQuery = {
fromType: null, fromType: null,
genKey: null, genKey: null,
status: null, status: null,
page: 1, page: 1,
limit: 20, limit: 20,
thirdSysFk: null, thirdSysFk: null,
}; };
this.getList(); this.getList();
}, },
getList() { hideSearch() {
this.loading = true; this.showSearch = !this.showSearch;
filterLog(this.filterQuery) },
.then((response) => { getList() {
if (response.code == 20000) { this.loading = true;
this.list = response.data.list || []; filterLog(this.filterQuery)
this.total = response.data.total || 0; .then((response) => {
} else { if (response.code == 20000) {
this.$message.error(response.message); this.list = response.data.list || [];
} this.total = response.data.total || 0;
this.loading = false; } else {
}) this.$message.error(response.message);
.catch(() => { }
this.loading = false; this.loading = false;
this.list = []; })
this.total = 0; .catch(() => {
}); this.loading = false;
}, this.list = [];
sysChange() { this.total = 0;
this.getThirdSysDetail(); });
// console.log( this.thirdSysDetail.thirdId+"\n"+ this.thirdSysDetail.fromType+"\n"+this.thirdSysDetail.enable); },
}, sysChange() {
this.getThirdSysDetail();
// console.log( this.thirdSysDetail.thirdId+"\n"+ this.thirdSysDetail.fromType+"\n"+this.thirdSysDetail.enable);
},
genInCode() { genInCode() {
this.selectBasicUdiVisible = true; this.selectBasicUdiVisible = true;
}, },
downloadInpi() { downloadInpi() {
this.selectType = 3; this.selectType = 3;
this.thrInvProductsSelectVisible = true; this.thrInvProductsSelectVisible = true;
}, },
handleDetailClick(row) { handleDetailClick(row) {
this.currentRow = row; this.currentRow = row;
console.log(this.currentRow.genKey) console.log(this.currentRow.genKey)
this.udiImportDetailVisible = true; this.udiImportDetailVisible = true;
}, },
cancelDialog(val) { cancelDialog(val) {
this.udiImportDetailVisible = false; this.udiImportDetailVisible = false;
this.thrInvProductsSelectVisible = false; this.thrInvProductsSelectVisible = false;
if (val) { if (val) {
this.getList(); this.getList();
} }
}, },
deleteDialog(rowId) { deleteDialog(rowId) {
this.$confirm("此操作将删除该导入记录, 是否继续?", "提示", { this.$confirm("此操作将删除该导入记录, 是否继续?", "提示", {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
type: "warning", 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();
}) })
.then(() => { .catch(() => {
let dQuery = { this.loading = false;
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.uploadData.thirdSys = this.filterQuery.thirdSysFk;
this.getList();
this.getThirdSysDetail();
this.selectSysParam();
})
.catch(() => {
this.loading = false;
this.list = [];
});
axios.get("./config.json").then(res => {
let response = res.data.SERVER_IP;
this.templateDlUrl = response + "/第三方库存产品信息导入模板.xlsx";
console.log(this.templateDlUrl);
}); });
})
.catch(() => {
});
},
getBasicThirdSys() {
let query = {
enabled: true,
};
getBasicThirdSys(query)
.then((response) => {
this.thirdSys = response.data.list || [];
this.filterQuery.thirdSysFk = this.thirdSys[0].thirdId;
this.uploadData.thirdSys = this.filterQuery.thirdSysFk;
this.getList();
this.getThirdSysDetail();
this.selectSysParam();
})
.catch(() => {
this.loading = false;
this.list = [];
});
axios.get("./config.json").then(res => {
let response = res.data.SERVER_IP;
this.templateDlUrl = response + "/第三方库存产品信息导入模板.xlsx";
console.log(this.templateDlUrl);
}, });
jumpDl() {
window.open(this.templateDlUrl, '_blank'); },
}, jumpDl() {
selectSysParam() { window.open(this.templateDlUrl, '_blank');
let query = { },
key: "thirdIpUrl", selectSysParam() {
thirdSysFk: this.filterQuery.thirdSysFk let query = {
}; key: "thirdIpUrl",
selectIp(query).then((response) => { thirdSysFk: this.filterQuery.thirdSysFk
if (response.code == 20000) { };
this.uploadFileUrl = response.data.thridUrl + "/udiwms/erp/invpi/upload"; selectIp(query).then((response) => {
} if (response.code == 20000) {
}); this.uploadFileUrl = response.data.thridUrl + "/udiwms/erp/invpi/upload";
}, }
handleChange(response, files, fileList) { });
console.log(response); },
if (response.code != 20000) { handleChange(response, files, fileList) {
this.$message.error(response.message); console.log(response);
} else { if (response.code != 20000) {
// console.log(files[0] + "\n" + this.fileList[0] + "\n" + fileList[0]); this.$message.error(response.message);
this.$message.success(response.data); } else {
} // console.log(files[0] + "\n" + this.fileList[0] + "\n" + fileList[0]);
this.fileList = []; this.$message.success(response.data);
this.getList(); }
}, this.fileList = [];
formatterThirdSys(key) { this.getList();
let data = null; },
this.thirdSys.forEach((item, index) => { formatterThirdSys(key) {
if (key.thirdSysFk == item.thirdId) { let data = null;
data = item.thirdName; this.thirdSys.forEach((item, index) => {
} if (key.thirdSysFk == item.thirdId) {
}); data = item.thirdName;
return data; }
}, });
statusFilterType(status) { return data;
const statusMap = { },
0: "warning", statusFilterType(status) {
1: "warning", const statusMap = {
2: "danger", 0: "warning",
3: "success", 1: "warning",
}; 2: "danger",
return statusMap[status]; 3: "success",
}, };
getThirdSysDetail() { return statusMap[status];
let query = { },
thirdSysFk: this.filterQuery.thirdSysFk, getThirdSysDetail() {
key: "invPiUrl", let query = {
}; thirdSysFk: this.filterQuery.thirdSysFk,
filterDetailByKey(query) key: "invPiUrl",
.then((response) => { };
this.thirdSysDetail = response.data; filterDetailByKey(query)
}) .then((response) => {
.catch(() => { this.thirdSysDetail = response.data;
this.loading = false; })
this.list = []; .catch(() => {
}); this.loading = false;
this.uploadData.thirdSys = this.filterQuery.thirdSysFk; this.list = [];
});
this.uploadData.thirdSys = this.filterQuery.thirdSysFk;
}, },
downloadDatas() { downloadDatas() {
this.$confirm("此操作从第三方系统下载全部库存产品信息, 是否继续?", "提示", { this.$confirm("此操作从第三方系统下载全部库存产品信息, 是否继续?", "提示", {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
type: "warning", type: "warning",
}).then(() => { }).then(() => {
let query = { let query = {
thirdSysFk: this.filterQuery.thirdSysFk thirdSysFk: this.filterQuery.thirdSysFk
}; };
downloadAll(query).then((response) => { downloadAll(query).then((response) => {
if (response.code == 20000) { if (response.code == 20000) {
this.$message.success(response.data); this.$message.success(response.data);
this.getList(); this.getList();
} else { } else {
this.$message.error(response.message); this.$message.error(response.message);
} }
}); });
}); });
},
}, },
},
mounted() { mounted() {
}, },
components: {thrInvProductsImportDetail, thrInvProductsSelect}, components: {thrInvProductsImportDetail, thrInvProductsSelect},
created() { created() {
this.getBasicThirdSys(); this.getBasicThirdSys();
// this.getList(); // this.getList();
}, },
}; };
</script> </script>
<style> <style>
.itemTag { .itemTag {
float: left; float: left;
text-align: left; text-align: left;
margin-top: 10px; margin-top: 10px;
width: 100px; width: 100px;
} }
.text { .text {
font-size: 13px; font-size: 13px;
font-family: "Microsoft YaHei"; font-family: "Microsoft YaHei";
} }
.el-row { .el-row {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
} }
.el-col { .el-col {
border-radius: 4px; border-radius: 4px;
flex-wrap: wrap; flex-wrap: wrap;
} }
</style> </style>

@ -1,166 +1,178 @@
<template> <template>
<div> <div>
<el-card> <el-card>
<el-form :inline="true" :model="query" size="mini"> <el-form :model="query" size="mini" label-width="100px" v-show="showSearch">
<el-row> <el-row>
<el-form-item class="query-form-item"> <el-col :span="6">
<el-input <el-form-item label="存货编码:">
v-model="filterQuery.inventoryCode" clearable <el-input
placeholder="请输入存货编码" v-model="filterQuery.inventoryCode" clearable
></el-input> style="width: 90%"
</el-form-item> placeholder="请输入存货编码"
<el-form-item class="query-form-item"> ></el-input>
<el-input </el-form-item>
v-model="filterQuery.inventoryName" clearable </el-col>
placeholder="请输入存货名称" <el-col :span="6">
></el-input> <el-form-item label="存货名称:">
</el-form-item> <el-input
<el-form-item> v-model="filterQuery.inventoryName" clearable
<el-button-group style="display:flex;"> style="width: 90%"
<el-button type="primary" icon="el-icon-refresh" @click="onReset"></el-button> placeholder="请输入存货名称"
<el-button type="primary" icon="el-icon-search" @click="getList"></el-button> ></el-input>
</el-button-group> </el-form-item>
</el-form-item> </el-col>
</el-row> </el-row>
</el-form> </el-form>
<el-table <div class="top-right-btn">
v-loading="loading" <el-button-group style="display:flex;">
:data="list" <el-button icon="el-icon-view" type="primary" @click="hideSearch">/</el-button>
style="width: 100%" <el-button type="primary" icon="el-icon-refresh" @click="onReset"></el-button>
border highlight-current-row <el-button type="primary" icon="el-icon-search" @click="getList"></el-button>
> </el-button-group>
<el-table-column label="序号" type="index"></el-table-column> </div>
<el-table-column label="产品编码" prop="inventoryCode" show-overflow-tooltip></el-table-column> <el-divider style="margin: 15px"></el-divider>
<el-table-column label="产品名称" prop="inventoryName" show-overflow-tooltip></el-table-column> <el-table
<el-table-column label="规格型号" prop="spec" show-overflow-tooltip></el-table-column> v-loading="loading"
<el-table-column label="批次号" prop="batchNo" show-overflow-tooltip></el-table-column> :data="list"
<el-table-column label="仓位" prop="warehouseName" show-overflow-tooltip></el-table-column> style="width: 100%"
<el-table-column label="货位" prop="spaceName" show-overflow-tooltip></el-table-column> border highlight-current-row
<el-table-column label="注册证号" prop="registerCertNo" show-overflow-tooltip></el-table-column> >
<el-table-column label="生产日期" prop="manufacturingDate" show-overflow-tooltip></el-table-column> <el-table-column label="序号" type="index"></el-table-column>
<el-table-column label="失效日期" prop="expirationDate" show-overflow-tooltip></el-table-column> <el-table-column label="产品编码" prop="inventoryCode" show-overflow-tooltip></el-table-column>
<el-table-column label="数量" prop="count" show-overflow-tooltip></el-table-column> <el-table-column label="产品名称" prop="inventoryName" show-overflow-tooltip></el-table-column>
</el-table> <el-table-column label="规格型号" prop="spec" show-overflow-tooltip></el-table-column>
<pagination <el-table-column label="批次号" prop="batchNo" show-overflow-tooltip></el-table-column>
v-show="total>0" <el-table-column label="仓位" prop="warehouseName" show-overflow-tooltip></el-table-column>
:total="total" <el-table-column label="货位" prop="spaceName" show-overflow-tooltip></el-table-column>
:page.sync="filterQuery.page" <el-table-column label="注册证号" prop="registerCertNo" show-overflow-tooltip></el-table-column>
:limit.sync="filterQuery.limit" <el-table-column label="生产日期" prop="manufacturingDate" show-overflow-tooltip></el-table-column>
@pagination="getList" <el-table-column label="失效日期" prop="expirationDate" show-overflow-tooltip></el-table-column>
/> <el-table-column label="数量" prop="count" show-overflow-tooltip></el-table-column>
</el-card> </el-table>
</div> <pagination
v-show="total>0"
:total="total"
:page.sync="filterQuery.page"
:limit.sync="filterQuery.limit"
@pagination="getList"
/>
</el-card>
</div>
</template> </template>
<script> <script>
import { import {
filterDetail, filterDetail,
} from "@/api/thrsys/thrInvProductsImport"; } from "@/api/thrsys/thrInvProductsImport";
export default { export default {
name: "ThrInvProductsImportDetail", name: "ThrInvProductsImportDetail",
props: { props: {
currentRow: { currentRow: {
type: Object, type: Object,
required: true, required: true,
}, },
}, },
data() { data() {
return { return {
filterQuery: { showSearch: true,
genKey: null, filterQuery: {
inventoryCode: null, genKey: null,
inventoryName: null, inventoryCode: null,
status: null, inventoryName: null,
page: 1, status: null,
limit: 10, page: 1,
}, limit: 10,
list: [], },
detailList: [], list: [],
total: 0, detailList: [],
status: { total: 0,
0: "未处理", status: {
1: "处理失败", 0: "未处理",
2: "处理成功" 1: "处理失败",
}, 2: "处理成功"
}; },
},
methods: {
onReset() {
this.$router.push({
path: "",
});
this.filterQuery = {
genKey: null,
inventoryCode: null,
inventoryName: null,
status: null,
page: 1,
limit: 10,
};
this.getList();
},
getList() {
this.loading = true;
console.log(" this.genKey = " + this.currentRow)
this.filterQuery.genKey = this.currentRow.genKey;
filterDetail(this.filterQuery)
.then((response) => {
if (response.code == 20000) {
this.list = response.data.list || [];
this.total = response.data.total || 0;
}else {
this.$message.error(response.message);
}
this.loading = false;
})
.catch(() => {
this.loading = false;
this.list = [];
this.total = 0;
});
},
statusFilterType(status) {
const statusMap = {
0: "warning",
1: "danger",
2: "success",
};
return statusMap[status];
},
},
mounted() {
},
created() {
this.getList();
},
filters: {},
}; };
},
methods: {
onReset() {
this.$router.push({
path: "",
});
this.filterQuery = {
genKey: null,
inventoryCode: null,
inventoryName: null,
status: null,
page: 1,
limit: 10,
};
this.getList();
},
hideSearch() {
this.showSearch = !this.showSearch;
},
getList() {
this.loading = true;
console.log(" this.genKey = " + this.currentRow)
this.filterQuery.genKey = this.currentRow.genKey;
filterDetail(this.filterQuery)
.then((response) => {
if (response.code == 20000) {
this.list = response.data.list || [];
this.total = response.data.total || 0;
} else {
this.$message.error(response.message);
}
this.loading = false;
})
.catch(() => {
this.loading = false;
this.list = [];
this.total = 0;
});
},
statusFilterType(status) {
const statusMap = {
0: "warning",
1: "danger",
2: "success",
};
return statusMap[status];
},
},
mounted() {
},
created() {
this.getList();
},
filters: {},
};
</script> </script>
<style> <style>
.itemTag { .itemTag {
float: left; float: left;
text-align: left; text-align: left;
margin-top: 10px; margin-top: 10px;
width: 100px; width: 100px;
} }
.text { .text {
font-size: 13px; font-size: 13px;
font-family: "Microsoft YaHei"; font-family: "Microsoft YaHei";
} }
.el-row { .el-row {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
} }
.el-col { .el-col {
border-radius: 4px; border-radius: 4px;
flex-wrap: wrap; flex-wrap: wrap;
} }
</style> </style>

@ -1,46 +1,47 @@
<template> <template>
<div> <div>
<el-card> <el-card>
<el-form :inline="true" :model="filterQuery" class="query-form" size="mini"> <el-form :model="filterQuery" size="mini" label-width="100px" v-show="showSearch">
<el-form-item class="query-form-item"> <el-row>
<el-input <el-col :span="6">
v-model="filterQuery.inventoryCode" clearable <el-form-item label="产品编码:">
placeholder="请输入产品编码" <el-input v-model="filterQuery.inventoryCode" style="width: 90%" clearable placeholder="请输入产品编码"></el-input>
></el-input>
</el-form-item> </el-form-item>
<el-form-item class="query-form-item"> </el-col>
<el-input <el-col :span="6">
v-model="filterQuery.inventoryName" clearable <el-form-item label="产品编码:">
placeholder="请输入产品名称" <el-input v-model="filterQuery.inventoryName" style="width: 90%" clearable placeholder="请输入产品名称"></el-input>
></el-input>
</el-form-item> </el-form-item>
<el-form-item class="query-form-item"> </el-col>
<el-input <el-col :span="6">
v-model="filterQuery.spec" clearable <el-form-item label="产品编码:">
placeholder="请输入规格型号" <el-input v-model="filterQuery.spec" clearable style="width: 90%" placeholder="请输入规格型号"></el-input>
></el-input>
</el-form-item> </el-form-item>
<el-form-item class="query-form-item"> </el-col>
<el-input <el-col :span="6">
v-model="filterQuery.registerCertNo" clearable <el-form-item label="产品编码:">
placeholder="请输入注册/备案凭证号" <el-input v-model="filterQuery.registerCertNo" style="width: 90%" clearable placeholder="请输入注册/备案凭证号"></el-input>
></el-input>
</el-form-item> </el-form-item>
<el-form-item class="query-form-item"> </el-col>
<el-input </el-row>
v-model="filterQuery.manufactory" clearable <el-row>
placeholder="请输入生厂厂家" <el-col :span="6">
></el-input> <el-form-item label="产品编码:">
<el-input v-model="filterQuery.manufactory" style="width: 90%" clearable placeholder="请输入生厂厂家"></el-input>
</el-form-item> </el-form-item>
<el-form-item class="query-form-item"> </el-col>
<el-select v-model="filterQuery.filterCount" placeholder="请选择过滤条件"> <el-col :span="6">
<el-form-item label="产品编码:">
<el-select v-model="filterQuery.filterCount" style="width: 90%" placeholder="请选择过滤条件">
<el-option label="全部" value="0"></el-option> <el-option label="全部" value="0"></el-option>
<el-option label="库存等于0" value="1"></el-option> <el-option label="库存等于0" value="1"></el-option>
<el-option label="库存大于0" value="2"></el-option> <el-option label="库存大于0" value="2"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item class="query-form-item"> </el-col>
<el-select v-model="filterQuery.thirdSys" placeholder="请选择第三方系统"> <el-col :span="6">
<el-form-item label="产品编码:">
<el-select v-model="filterQuery.thirdSys" style="width: 90%" placeholder="请选择第三方系统">
<el-option <el-option
v-for="item in thirdSys" v-for="item in thirdSys"
:key="item.value" :key="item.value"
@ -51,35 +52,26 @@
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item> </el-col>
<el-button-group style="display:flex;" > </el-row>
<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="selectExport" v-if="selectType==0"
>选中导出
</el-button>
<el-button type="primary" icon="el-icon-upload2" @click="allExport" v-if="selectType==0"
>结果全部导出
</el-button>
<el-button type="primary" icon="search" @click="uploadSMP"
v-if="selectType==1"
>选中上传
</el-button>
<el-button type="primary" icon="search" @click="uploadSMP"
v-if="selectType==1"
>一键上传
</el-button>
<el-button type="primary" icon="el-icon-download" @click="downloadErp"
v-if="selectType==3"
>选中下载
</el-button>
<el-button type="primary" icon="el-icon-download" @click="downloadAllErp"
v-if="selectType==3"
>结果全部下载
</el-button>
</el-button-group>
</el-form-item>
</el-form> </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="selectExport" v-if="selectType==0"></el-button>
<el-button type="primary" icon="el-icon-upload2" @click="allExport" v-if="selectType==0"></el-button>
<el-button type="primary" icon="el-icon-top-upload" @click="uploadSMP" v-if="selectType==1"></el-button>
<el-button type="primary" icon="el-icon-top-upload" @click="uploadSMP" v-if="selectType==1"></el-button>
<el-button type="primary" icon="el-icon-download" @click="downloadErp" v-if="selectType==3"></el-button>
<el-button type="primary" icon="el-icon-download" @click="downloadAllErp" v-if="selectType==3"></el-button>
</el-button-group>
</div>
<el-divider style="margin: 15px"></el-divider>
<el-table v-loading="loading" :data="list" style="width: 100%" border highlight-current-row @selection-change="handleSelectionChange"> <el-table v-loading="loading" :data="list" style="width: 100%" border highlight-current-row @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55"></el-table-column> <el-table-column type="selection" width="55"></el-table-column>
<el-table-column label="序号" type="index" width="70"></el-table-column> <el-table-column label="序号" type="index" width="70"></el-table-column>
@ -131,6 +123,7 @@
data() { data() {
return { return {
showSearch: true,
filterQuery: { filterQuery: {
thrInvProductsEntities:[], thrInvProductsEntities:[],
inventoryCode: null, inventoryCode: null,
@ -177,6 +170,9 @@
handleSelectionChange(val) { handleSelectionChange(val) {
this.multipleSelection = val; this.multipleSelection = val;
}, },
hideSearch() {
this.showSearch = !this.showSearch;
},
getList() { getList() {
this.loading = true; this.loading = true;
this.filterQuery.isDownThrSys = this.isDownThrSys; this.filterQuery.isDownThrSys = this.isDownThrSys;

@ -51,7 +51,7 @@
:on-success="handleChange" :on-success="handleChange"
:file-list="fileList" :file-list="fileList"
> >
<el-button size="mini" type="primary">导入产品信息</el-button> <el-button size="mini" icon="el-icon-bottom-right" type="primary">导入产品信息</el-button>
</el-upload> </el-upload>
<el-button type="primary" icon="el-icon-download" @click="downloadProducts" <el-button type="primary" icon="el-icon-download" @click="downloadProducts"
v-if="this.thirdSysDetail.enabled && this.thirdSysDetail.fromType==3"> v-if="this.thirdSysDetail.enabled && this.thirdSysDetail.fromType==3">

Loading…
Cancel
Save