快递查询
This commit is contained in:
@@ -610,6 +610,9 @@ public class WelfareCommonController {
|
|||||||
public Object courierNumberInfo(String welfareId, String userId) {
|
public Object courierNumberInfo(String welfareId, String userId) {
|
||||||
//查询的时候去触发福利最新信息
|
//查询的时候去触发福利最新信息
|
||||||
List<WelfareCourierNumber> welfareCourierNumberList = dao.query(WelfareCourierNumber.class, Cnd.where("welfareId", "=", welfareId).and("selectUserId", "=", userId));
|
List<WelfareCourierNumber> welfareCourierNumberList = dao.query(WelfareCourierNumber.class, Cnd.where("welfareId", "=", welfareId).and("selectUserId", "=", userId));
|
||||||
|
if (Lang.isEmpty(welfareCourierNumberList)) {
|
||||||
|
return Result.error("未获取到您的快递单号,请耐心等待管理员录入");
|
||||||
|
}
|
||||||
for (WelfareCourierNumber courierNumber : welfareCourierNumberList) {
|
for (WelfareCourierNumber courierNumber : welfareCourierNumberList) {
|
||||||
//如果有上次查询的时间
|
//如果有上次查询的时间
|
||||||
|
|
||||||
|
|||||||
@@ -1,84 +1,84 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog title="快递物流信息" width="60%" :visible.sync="dialogVisible" :append-to-body="true"
|
<el-dialog title="快递物流信息" width="60%" :visible.sync="dialogVisible" :append-to-body="true"
|
||||||
top="50px">
|
top="50px">
|
||||||
<el-tabs v-model="activeName" v-loading="loading">
|
<el-tabs v-model="activeName" v-loading="loading">
|
||||||
<el-tab-pane v-for="(v,k) in courierNumberInfoData"
|
<el-tab-pane v-for="(v,k) in courierNumberInfoData"
|
||||||
:label="k"
|
:label="k"
|
||||||
:key="k"
|
:key="k"
|
||||||
:name="k">
|
:name="k">
|
||||||
<div style="height: 600px;overflow-y: auto">
|
<div style="height: 600px;overflow-y: auto">
|
||||||
<div class="alert alert-info" v-if="v.length>1">
|
<div class="alert alert-info" v-if="v.length>1">
|
||||||
<strong>此套餐有多个快递单号</strong>
|
<strong>此套餐有多个快递单号</strong>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<template v-for="item in v" :key="item.courierNumber">
|
<template v-for="item in v" :key="item.courierNumber">
|
||||||
<div class="alert alert-info">
|
<div class="alert alert-info">
|
||||||
<strong>快递单号</strong>
|
<strong>快递单号</strong>
|
||||||
{{ item.courierNumber || '暂无' }}
|
{{ item.courierNumber || "暂无" }}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<el-timeline reverse="true"
|
<el-timeline reverse="true"
|
||||||
v-if="item.logisticsTrace && item.logisticsTrace.logisticsTraceDetailList">
|
v-if="item.logisticsTrace && item.logisticsTrace.logisticsTraceDetailList">
|
||||||
<el-timeline-item
|
<el-timeline-item
|
||||||
:color="timeline.color"
|
:color="timeline.color"
|
||||||
:key="timelineIndex"
|
:key="timelineIndex"
|
||||||
:timestamp="moment(timeline.time).format('YYYY-MM-DD HH:mm:ss')"
|
:timestamp="moment(timeline.time).format('YYYY-MM-DD HH:mm:ss')"
|
||||||
v-for="(timeline, timelineIndex) in item.logisticsTrace.logisticsTraceDetailList">
|
v-for="(timeline, timelineIndex) in item.logisticsTrace.logisticsTraceDetailList">
|
||||||
{{ timeline.desc }}
|
{{ timeline.desc }}
|
||||||
</el-timeline-item>
|
</el-timeline-item>
|
||||||
</el-timeline>
|
</el-timeline>
|
||||||
<div v-else>
|
<div v-else>
|
||||||
<el-empty description="暂无物流信息"></el-empty>
|
<el-empty description="暂无物流信息"></el-empty>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</div>
|
</div>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
module.exports = {
|
module.exports = {
|
||||||
name: "CourierNumberInfo",
|
name: "CourierNumberInfo",
|
||||||
props: {},
|
props: {},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
dialogVisible: false,
|
dialogVisible: false,
|
||||||
courierNumberInfoData: [],
|
courierNumberInfoData: [],
|
||||||
activeName: null,
|
activeName: null,
|
||||||
loading: true
|
loading: true
|
||||||
}
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
async openView(welfareId, userId) {
|
|
||||||
this.dialogVisible = true
|
|
||||||
this.loading = true
|
|
||||||
const {
|
|
||||||
code,
|
|
||||||
data,
|
|
||||||
msg
|
|
||||||
} = await $.get('/platform/welfare/common/courierNumberInfo', {welfareId, userId})
|
|
||||||
this.loading = false
|
|
||||||
if (code === 0) {
|
|
||||||
if (data == null || data.length === 0) {
|
|
||||||
this.dialogVisible = false
|
|
||||||
this.$message.warning('您还没有选择福利套餐')
|
|
||||||
return
|
|
||||||
}
|
}
|
||||||
this.courierNumberInfoData = data
|
},
|
||||||
const keys = Object.keys(this.courierNumberInfoData)
|
methods: {
|
||||||
this.activeName = keys && keys[0]
|
async openView(welfareId, userId) {
|
||||||
|
this.loading = true
|
||||||
|
const {
|
||||||
|
code,
|
||||||
|
data,
|
||||||
|
msg
|
||||||
|
} = await $.get("/platform/welfare/common/courierNumberInfo", { welfareId, userId })
|
||||||
|
this.loading = false
|
||||||
|
if (code === 0) {
|
||||||
|
if (data == null || data.length === 0) {
|
||||||
|
this.dialogVisible = false
|
||||||
|
this.$message.warning("您还没有选择福利套餐")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.dialogVisible = true
|
||||||
|
this.courierNumberInfoData = data
|
||||||
|
const keys = Object.keys(this.courierNumberInfoData)
|
||||||
|
this.activeName = keys && keys[0]
|
||||||
|
|
||||||
|
} else {
|
||||||
|
this.$message.warning(msg)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
|
||||||
} else {
|
|
||||||
this.$message.warning(msg)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
|
||||||
created() {
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -508,7 +508,7 @@ layout("/mobile/platform.html"){
|
|||||||
})
|
})
|
||||||
this.logisticsTrace = resp.data
|
this.logisticsTrace = resp.data
|
||||||
} else {
|
} else {
|
||||||
this.$message.error(resp.msg);
|
this.$toast.msgError(resp.msg);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -532,7 +532,10 @@ layout("/mobile/platform.html"){
|
|||||||
this.activeName = this.optionCourierNumberInfo[keys[0]][0].courierNumber
|
this.activeName = this.optionCourierNumberInfo[keys[0]][0].courierNumber
|
||||||
this.courierNumberShow = true
|
this.courierNumberShow = true
|
||||||
} else {
|
} else {
|
||||||
this.$modal.msgError(msg)
|
vant.Dialog.alert({
|
||||||
|
title: '提示',
|
||||||
|
message: msg
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -126,11 +126,11 @@ layout("/layouts/platform.html"){
|
|||||||
<el-button @click="openView(row)" size="mini" type="primary">
|
<el-button @click="openView(row)" size="mini" type="primary">
|
||||||
查看
|
查看
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button :disabled="!row.courierNumber" @click="openExpress(row)"
|
<!--<el-button :disabled="!row.courierNumber" @click="openExpress(row)"
|
||||||
size="mini"
|
size="mini"
|
||||||
type="primary">
|
type="primary">
|
||||||
查看物流
|
查看物流
|
||||||
</el-button>
|
</el-button>-->
|
||||||
<el-button :disabled="!row.courierNumber" @click="openEvaluate(row)"
|
<el-button :disabled="!row.courierNumber" @click="openEvaluate(row)"
|
||||||
size="mini"
|
size="mini"
|
||||||
type="primary">
|
type="primary">
|
||||||
|
|||||||
Reference in New Issue
Block a user