You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
218 lines
6.3 KiB
Vue
218 lines
6.3 KiB
Vue
<template>
|
|
<div>
|
|
<el-card>
|
|
<el-form :inline="true" :model="query" size="mini">
|
|
<el-row>
|
|
<el-form-item class="query-form-item">
|
|
<el-input v-model="filterQuery.udiCode" placeholder="UDI编码"></el-input>
|
|
</el-form-item>
|
|
<el-form-item class="query-form-item">
|
|
<el-select v-model="filterQuery.status" 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-form-item>
|
|
<el-button-group style="display:flex;">
|
|
<el-button type="primary" icon="el-icon-refresh" @click="onReset"></el-button>
|
|
<el-button type="primary" icon="search" @click="getList">查询</el-button>
|
|
</el-button-group>
|
|
</el-form-item>
|
|
</el-row>
|
|
</el-form>
|
|
|
|
<el-table
|
|
v-loading="loading"
|
|
:data="list"
|
|
style="width: 100%"
|
|
@selection-change="handleSelectionChange"
|
|
>
|
|
<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>
|
|
<el-pagination
|
|
:page-size="filterQuery.limit"
|
|
@current-change="handleCurrentChange"
|
|
layout="prev, pager, next"
|
|
:total="total"
|
|
></el-pagination>
|
|
|
|
</el-card>
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
import {
|
|
filterDetail,
|
|
} from "../../api/basic/udiinfolog";
|
|
|
|
export default {
|
|
name: "udiImportDetail",
|
|
props: {
|
|
currentRow: {
|
|
type: Object,
|
|
required: true,
|
|
},
|
|
|
|
},
|
|
data() {
|
|
return {
|
|
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;
|
|
});
|
|
},
|
|
statusFilterType(status) {
|
|
const statusMap = {
|
|
0: "warning",
|
|
1: "danger",
|
|
2: "success",
|
|
};
|
|
return statusMap[status];
|
|
},
|
|
handleCurrentChange(val) {
|
|
this.filterQuery.page = val;
|
|
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>
|