Commit 70f9ea3a authored by 赵茹林's avatar 赵茹林

一次性物流信息 [修复] 待发货|已发货筛选时出现错乱的问题,[优化] 最后更新时间格式化显示

团队概况 [优化] 弹窗最近备注时间显示
团队概况、小时动态 [优化] 弹窗客户微信昵称可点击区域
parent 5ae8f74b
......@@ -300,6 +300,7 @@
border-radius: 3px;
text-decoration: underline;
transition: color 240ms, background-color 240ms;
color: #444;
& + .cell-link {
margin-left: 0;
}
......
......@@ -14,22 +14,13 @@
<el-option label="赠品" value="1"></el-option>
</el-select>
</el-form-item>
<el-form-item>
<!--<el-form-item>
<el-select filterable v-model="searchFrom.status" placeholder="物流状态" clearable style="width: 120px" @change="getList">
<el-option label="待发货" value="0"></el-option>
<el-option label="已发货" value="1"></el-option>
</el-select>
</el-form-item>
<!-- <el-form-item label="发货状态">
<el-select filterable v-model="searchFrom.type" placeholder="请选择" clearable>
<el-option
v-for="(data,index) in logisticsType"
:key="index"
:label="data.name"
:value="data.value">
</el-option>
</el-select>
</el-form-item>-->
<el-form-item>
<div class="search-btn-wrapper">
<el-button type="primary" plain @click="getList">搜索</el-button>
......@@ -52,7 +43,7 @@
</el-form>
</div>
<el-tabs v-model="searchFrom.type" type="card" @tab-click="handleClick" style="padding-top: 10px;background-color: #fff">
<el-tabs v-model="searchFrom.status" type="card" @tab-click="handleClick" style="background-color: #fff">
<el-tab-pane label="所有" name="2"></el-tab-pane>
<el-tab-pane label="待发货" name="0"></el-tab-pane>
<el-tab-pane label="已发货" name="1"></el-tab-pane>
......@@ -87,7 +78,11 @@
{{scope.row.goods_type == 0 ? '订单货品' : (scope.row.goods_type == 1 ? '赠品' : '')}}
</template>
</el-table-column>
<el-table-column prop="updated_at" label="最后更新" width="95px"></el-table-column>
<el-table-column prop="updated_at" label="最后更新" width="95px">
<template slot-scope="scope">
<span v-html="transDate(scope.row.updated_at)"></span>
</template>
</el-table-column>
<el-table-column prop="deliver_at" label="发货时间" width="100px"></el-table-column>
<el-table-column prop="status" label="物流状态">
<template slot-scope="scope">
......@@ -145,7 +140,8 @@
user_id: "",
theme_id: "",
periods_id: "",
type: "2"
type: "2",
status: "2"
},
nowPage: 1,
total: 0,
......@@ -175,6 +171,9 @@
this.init();
},
methods: {
transDate(string) {
return CommonJs.formatDateString(string)
},
cancelEvent() {
this.showFlag = false;
},
......@@ -217,7 +216,7 @@
if (this.searchFrom.user_id) {
json.user_id = this.searchFrom.user_id;
}
if (this.searchFrom.status) {
if (this.searchFrom.status && this.searchFrom.status != '2') {
json.status = this.searchFrom.status;
}
if (this.searchFrom.goods_type) {
......@@ -302,7 +301,7 @@
if (this.searchFrom.user_id) {
json.user_id = this.searchFrom.user_id;
}
if (this.searchFrom.status) {
if (this.searchFrom.status && this.searchFrom.status != '2') {
json.status = this.searchFrom.status;
}
if (this.searchFrom.goods_type) {
......
......@@ -10,11 +10,9 @@
<el-table-column label="客户微信昵称">
<template slot-scope="scope">
<template v-if="scope.row.user_id">
<span class="cell-link">
<router-link target="_blank" :to="{path:'/user', query:{type: 'detail', userid: scope.row.user_id}}">
{{scope.row.nickname || '-'}}
</router-link>
</span>
<router-link target="_blank" :to="{path:'/user', query:{type: 'detail', userid: scope.row.user_id}}">
<span class="cell-link">{{scope.row.nickname || '-'}}</span>
</router-link>
</template>
<template v-else>{{scope.row.nickname || '-'}}</template>
</template>
......@@ -28,12 +26,14 @@
<el-table-column label="最近备注时间">
<template slot-scope="scope">
<template v-if="scope.row.remark_time && String(scope.row.remark_time).indexOf(' ') > -1">
<div>{{String(scope.row.remark_time).split(' ')[0]}}</div>
<div>{{String(scope.row.remark_time).split(' ')[1]}}</div>
<!--<div>{{String(scope.row.remark_time).split(' ')[0]}}</div>
<div>{{String(scope.row.remark_time).split(' ')[1]}}</div>-->
<span v-html="transDate(scope.row.remark_time)"></span>
</template>
<template v-else-if="scope.row.created_at && String(scope.row.created_at).indexOf(' ') > -1">
<div>{{String(scope.row.created_at).split(' ')[0]}}</div>
<div>{{String(scope.row.created_at).split(' ')[1]}}</div>
<!--<div>{{String(scope.row.created_at).split(' ')[0]}}</div>
<div>{{String(scope.row.created_at).split(' ')[1]}}</div>-->
<span v-html="transDate(scope.row.created_at)"></span>
</template>
<template v-else>-</template>
</template>
......@@ -53,11 +53,9 @@
<el-table-column label="客户微信昵称">
<template slot-scope="scope">
<template v-if="scope.row.friend_uid">
<span class="cell-link">
<router-link target="_blank" :to="{path:'/user', query:{type: 'detail', userid: scope.row.friend_uid}}">
{{scope.row.nick || '-'}}
</router-link>
</span>
<router-link target="_blank" :to="{path:'/user', query:{type: 'detail', userid: scope.row.friend_uid}}">
<span class="cell-link">{{scope.row.nick || '-'}}</span>
</router-link>
</template>
<template v-else>{{scope.row.nick || '-'}}</template>
</template>
......@@ -71,12 +69,14 @@
<el-table-column label="最近备注时间">
<template slot-scope="scope">
<template v-if="scope.row.remark_time && String(scope.row.remark_time).indexOf(' ') > -1">
<div>{{String(scope.row.remark_time).split(' ')[0]}}</div>
<div>{{String(scope.row.remark_time).split(' ')[1]}}</div>
<!--<div>{{String(scope.row.remark_time).split(' ')[0]}}</div>
<div>{{String(scope.row.remark_time).split(' ')[1]}}</div>-->
<span v-html="transDate(scope.row.remark_time)"></span>
</template>
<template v-else-if="scope.row.created_at && String(scope.row.created_at).indexOf(' ') > -1">
<div>{{String(scope.row.created_at).split(' ')[0]}}</div>
<div>{{String(scope.row.created_at).split(' ')[1]}}</div>
<!--<div>{{String(scope.row.created_at).split(' ')[0]}}</div>
<div>{{String(scope.row.created_at).split(' ')[1]}}</div>-->
<span v-html="transDate(scope.row.created_at)"></span>
</template>
<template v-else>-</template>
</template>
......@@ -96,11 +96,9 @@
<el-table-column label="客户微信昵称">
<template slot-scope="scope">
<template v-if="scope.row.friend_uid">
<span class="cell-link">
<router-link target="_blank" :to="{path:'/user', query:{type: 'detail', userid: scope.row.friend_uid}}">
{{scope.row.nick || '-'}}
</router-link>
</span>
<router-link target="_blank" :to="{path:'/user', query:{type: 'detail', userid: scope.row.friend_uid}}">
<span class="cell-link">{{scope.row.nick || '-'}}</span>
</router-link>
</template>
<template v-else>{{scope.row.nick || '-'}}</template>
</template>
......@@ -114,12 +112,14 @@
<el-table-column label="最近备注时间">
<template slot-scope="scope">
<template v-if="scope.row.remark_time && String(scope.row.remark_time).indexOf(' ') > -1">
<div>{{String(scope.row.remark_time).split(' ')[0]}}</div>
<div>{{String(scope.row.remark_time).split(' ')[1]}}</div>
<!--<div>{{String(scope.row.remark_time).split(' ')[0]}}</div>
<div>{{String(scope.row.remark_time).split(' ')[1]}}</div>-->
<span v-html="transDate(scope.row.remark_time)"></span>
</template>
<template v-else-if="scope.row.created_at && String(scope.row.created_at).indexOf(' ') > -1">
<div>{{String(scope.row.created_at).split(' ')[0]}}</div>
<div>{{String(scope.row.created_at).split(' ')[1]}}</div>
<!--<div>{{String(scope.row.created_at).split(' ')[0]}}</div>
<div>{{String(scope.row.created_at).split(' ')[1]}}</div>-->
<span v-html="transDate(scope.row.created_at)"></span>
</template>
<template v-else>-</template>
</template>
......@@ -188,7 +188,8 @@
<script>
import {getVisitedApi, getClassOpenedApi, getAchievementApi, getPhoneRecordApi, getValidchatApi} from "@service/api";
import {CALLBACK_INTENTION} from "@/util/wordbook";
import page from '@framework/page'
import page from '@framework/page';
import CommonJs from '@util/common';
export default {
name: "TeamDialog",
......@@ -197,7 +198,8 @@
dialogObj: {
type: Object,
required: true,
default: () => {}
default: () => {
}
}
},
data() {
......@@ -224,6 +226,10 @@
}
},
transDate(string) {
return CommonJs.formatDateString(string)
},
transIntention(string) {
var result;
if (string) {
......
......@@ -50,11 +50,9 @@
<el-table-column label="客户微信昵称">
<template slot-scope="scope">
<template v-if="scope.row.friend_uid">
<span class="cell-link">
<router-link target="_blank" :to="{path:'/user', query:{type: 'detail', userid: scope.row.friend_uid}}">
{{scope.row.nick || '-'}}
<span class="cell-link">{{scope.row.nick || '-'}}</span>
</router-link>
</span>
</template>
<template v-else>{{scope.row.nick || '-'}}</template>
</template>
......@@ -109,11 +107,9 @@
<el-table-column label="客户微信昵称">
<template slot-scope="scope">
<template v-if="scope.row.friend_uid">
<span class="cell-link">
<router-link target="_blank" :to="{path:'/user', query:{type: 'detail', userid: scope.row.friend_uid}}">
{{scope.row.nick || '-'}}
<span class="cell-link">{{scope.row.nick || '-'}}</span>
</router-link>
</span>
</template>
<template v-else>{{scope.row.nick || '-'}}</template>
</template>
......@@ -221,7 +217,7 @@
},
methods: {
transTime(time) {
return CommonJs.secondFmt(time) || '-'
return CommonJs.formatSecond(time) || '-'
},
transIntention(string) {
var result;
......
......@@ -119,7 +119,6 @@
<el-table-column prop="phone_total_time">
<template slot="header" slot-scope="scope">
<!--TODO 时间展示-->
<el-tooltip effect="dark" :content="TIP_TEAM['phone_total_time']" placement="top">
<span class="table-refresh-header">
当日 <i class="el-icon-question"></i><br>有效通
......@@ -299,7 +298,7 @@
return '';
},
transTime(time) {
return CommonJs.secondFmt(time) || '-'
return CommonJs.formatSecond(time) || '-'
},
dialogToggle(row, type) {
this.dialogObj = {
......
import md5 from 'js-md5';
export default {
secondFmt: function (second) { // second 2 hms
formatDateString: function (string) {
var result;
if (string) {
if (String(string).indexOf(' ')>-1 && String(string).length == 19) { // '2019-09-17 10:51:22'.length
result = `${String(string).split(' ')[0]}<br>${String(string).split(' ')[1]}`
} else {
result = string
}
} else {
result = '-';
}
return result
},
formatSecond: function (second) { // 秒 转为 0h 0m 0s
var h, m, s;
h = Math.floor(second / 60 / 60);
m = Math.floor(second / 60 % 60);
......
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