Commit 3cef5b8f by 林家欣

fix: 修改条码注册注销公告详情页

parent e3b5eb44
......@@ -320,6 +320,14 @@ const routes = [
component: () => import("@/views/Business/Notice.vue"),
},
{
path: "/Business/Msg",
name: "BusinessMsg",
meta: {
name: "业务大厅详情",
},
component: () => import("@/views/Business/Msg.vue"),
},
{
path: "/Business/Training",
name: "",
meta: {
......
<template>
<div class="guide">
<cate :father="czznCate"></cate>
<div class="guide-msg container">
<table cellspacing="1" class="table table-striped table-hover">
<tbody>
<tr>
<th>厂商识别代码:</th>
<td>
<span
id="Lab_CompanyCode"
style="font-weight: normal; font-style: normal"
>{{msg.code}}</span
>
</td>
</tr>
<tr>
<th>厂商名称:</th>
<td>
<span
id="Lab_CompanyName"
style="font-weight: normal; font-style: normal"
>{{msg.firmName}}</span
>
</td>
</tr>
<tr v-if="false">
<th>厂商地址:</th>
<td>
<span
id="Lab_Address"
style="font-weight: normal; font-style: normal"
></span>
</td>
</tr>
<tr v-if="false">
<th>邮政编码:</th>
<td>
<span
id="Lab_PostCode"
style="font-weight: normal; font-style: normal"
></span>
</td>
</tr>
<tr>
<th>状态:</th>
<td>
<span
id="Lab_DateEnd"
style="font-weight: normal; font-style: normal"
>{{msg.logoutFlag}}</span>
</td>
</tr>
<tr v-if="this.$route.query.type">
<th>注销时间:</th>
<td>
<span
id="Lab_DateEnd"
style="font-weight: normal; font-style: normal"
>{{msg.logoutDate}}</span>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</template>
<script>
import cate from "../comps/cate.vue";
export default {
components: {
cate,
},
data() {
return {
czznCate: {
name: "",
ico: "",
},
msg: {},
};
},
created() {
this.init();
},
methods: {
init() {
this.businessGetDetailById(this.$route.query.fId, this.$route.query.code);
},
// 条码注册/注销公告详情
async businessGetDetailById(fId, code) {
const params = {
fId,
code,
};
const businessGetDetailByIdRes =
await this.$api.business.businessGetDetailById(params);
const { returnCode, data } = businessGetDetailByIdRes;
console.log(businessGetDetailByIdRes, "businessGetDetailByIdRes");
if (returnCode === "0") {
this.czznCate.name = data.firmName;
data.logoutFlag = data.logoutFlag === '1' ? '已注销' : '有效';
data.logoutDate = data.logoutDate ? this.$moment(data.logoutDate).format("YYYY年MM月DD") : null;
this.msg = data;
}
},
},
};
</script>
<style lang="scss" scoped>
.guide {
@include module-box;
.guide-msg {
margin: 30px 0;
font-size: 16px;
font-weight: 300;
.table {
width: 100%;
margin-bottom: 20px;
tbody {
tr {
th,
td {
padding: 8px;
line-height: 1.42857143;
vertical-align: top;
border-top: 1px solid #dddddd;
}
&:nth-child(odd) {
td {
border-bottom: 0;
}
}
}
}
}
.table-striped {
tbody {
tr:nth-child(odd) {
th {
background-color: #f5f5f5;
}
td {
background-color: #f5f5f5;
}
}
}
}
}
}
</style>
\ No newline at end of file
......@@ -37,7 +37,7 @@
role="tabpanel"
:aria-labelledby="tmp.type + '-tab'"
>
<list :list="tmp.data" />
<list :list="tmp.data" @toListFather="receiveListChild" />
<pages :pages="pageParams" @toPagesFather="receivePagesChild" />
</div>
</div>
......@@ -67,18 +67,14 @@ export default {
name: "注册",
link: "/Business/Notice",
active: "zhuce",
data: [
],
data: [],
},
{
type: "zhuxiao",
name: "注销",
link: "/Business/Notice",
active: "zhuxiao",
data: [
],
data: [],
},
],
pageParams: {
......@@ -120,17 +116,21 @@ export default {
console.log(businessGetEanUpcByConditionRes, "条码注册/注销公告");
this.pageParams.total = data.totalCount;
let key;
if (this.logoutFlag === '1') {
if (this.logoutFlag === "1") {
key = 0;
} else {
key = 1;
}
data.list.forEach(el => {
data.list.forEach((el) => {
el.name = el.firmName;
el.time = this.$moment(el.logDate).format('YYYY-MM-DD');
if (this.logoutFlag === "1") {
el.time = this.$moment(el.loginDate).format("YYYY-MM-DD");
} else {
el.time = this.$moment(el.logoutDate).format("YYYY-MM-DD");
}
});
this.list[key].data = data.list
console.log(this.list, 'this.list');
this.list[key].data = data.list;
console.log(this.list, "this.list");
}
},
// 接收分页子组件传过来的值
......@@ -138,6 +138,23 @@ export default {
this.pageParams.currentPage = val;
this.businessGetEanUpcByCondition();
},
// 接收列表子组件传过来的值
receiveListChild(obj) {
let type;
if (this.$route.query.id === "zhuxiao") {
type = false;
} else {
type = true;
}
this.$router.push({
path: "/Business/Msg",
query: {
type,
fId: obj.fid,
code: obj.code,
},
});
},
jump(i) {
// console.log(i);
this.setLogoutFlag(this.list[i].active);
......
<template>
<div class="list">
<div v-for="(tmp, i) in list" :key="i" class="row">
<div v-for="(tmp, i) in list" :key="i" class="row" @click="handelClick(i)">
<div class="col-lg-6 list-left">
<span></span>
<span>{{tmp.name}}</span>
......@@ -12,6 +12,12 @@
<script>
export default {
props: ['list'],
methods: {
// 跳转至详情页
handelClick(i) {
this.$emit('toListFather', this.list[i]);
},
},
}
</script>
<style lang="scss" scoped>
......@@ -26,6 +32,7 @@ export default {
margin: 0;
font-size: 14px;
color: #454545;
cursor: pointer;
.list-left {
flex: 1;
display: flex;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment