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

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

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