|
|
@@ -59,7 +59,9 @@
|
|
|
</van-search>
|
|
|
</div>
|
|
|
<div class="lineGrey"></div>
|
|
|
- <div v-if="refreshTotal" class="refreshBtn" @click="onSearch">检测到 {{ refreshTotal }} 条更新,点击刷新</div>
|
|
|
+ <div v-if="refreshTotal" class="refreshBtn" @click="onSearch">
|
|
|
+ 检测到 {{ refreshTotal }} 条更新,点击刷新
|
|
|
+ </div>
|
|
|
<div v-if="refreshTotal" class="lineGrey"></div>
|
|
|
</div>
|
|
|
<!-- 主体内容-->
|
|
|
@@ -207,8 +209,8 @@ export default {
|
|
|
name: 'index.vue',
|
|
|
data() {
|
|
|
return {
|
|
|
- latestUpdateTime:null,
|
|
|
- refreshTotal:0,
|
|
|
+ latestUpdateTime: null,
|
|
|
+ refreshTotal: 0,
|
|
|
timeico: timeico,
|
|
|
defaultDate: new Date(),
|
|
|
searchValue: '',
|
|
|
@@ -270,15 +272,15 @@ export default {
|
|
|
},
|
|
|
activated() {
|
|
|
let typeQuery = localStorage.getItem('typeQuery');
|
|
|
- if(this.latestUpdateTime!=null && typeQuery == 1){
|
|
|
- this.getListTotalFn();
|
|
|
- }else{
|
|
|
+ if (this.latestUpdateTime != null && typeQuery == 1) {
|
|
|
+ this.getListTotalFn();
|
|
|
+ } else {
|
|
|
setTimeout(() => {
|
|
|
this.onSearch();
|
|
|
}, 1000);
|
|
|
}
|
|
|
},
|
|
|
- deactivated(){
|
|
|
+ deactivated() {
|
|
|
localStorage.setItem('typeQuery', 1);
|
|
|
},
|
|
|
created() {
|
|
|
@@ -317,16 +319,16 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
- getListTotalFn(){
|
|
|
+ getListTotalFn() {
|
|
|
getListTotal({
|
|
|
- startTime: this.startTime + ' 00:00:00',
|
|
|
- stopTime: this.endTime + ' 24:00:00',
|
|
|
+ startTime: this.startTime + ' 00:00:00',
|
|
|
+ stopTime: this.endTime + ' 24:00:00',
|
|
|
storeRequest: this.storeName.trim(),
|
|
|
companyId: this.companyCode,
|
|
|
regionId: this.regionCode,
|
|
|
userId: this.userCode,
|
|
|
deptId: this.deptCode,
|
|
|
- queryStartTime:this.latestUpdateTime
|
|
|
+ queryStartTime: this.latestUpdateTime,
|
|
|
}).then((res) => {
|
|
|
if (res.code == 200) {
|
|
|
this.refreshTotal = res.data;
|
|
|
@@ -346,17 +348,28 @@ export default {
|
|
|
},
|
|
|
detilsFn(val) {
|
|
|
console.log(val.id);
|
|
|
- this.$router.push({
|
|
|
- path: '/historicalDetails',
|
|
|
- query: {
|
|
|
- visitId: val.id,
|
|
|
- storeId: val.storeId,
|
|
|
- storeCode: val.storeCode,
|
|
|
- taskId: val.taskId,
|
|
|
- userId: val.userId,
|
|
|
- storeCategory: val.storeCategory,
|
|
|
- },
|
|
|
- });
|
|
|
+ if (val.jinpaiStore) {
|
|
|
+ this.$router.push({
|
|
|
+ path: '/perfectStore',
|
|
|
+ query: {
|
|
|
+ visitId: val.id,
|
|
|
+ storeId: val.storeId,
|
|
|
+ storeCode: val.storeCode,
|
|
|
+ },
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ this.$router.push({
|
|
|
+ path: '/historicalDetails',
|
|
|
+ query: {
|
|
|
+ visitId: val.id,
|
|
|
+ storeId: val.storeId,
|
|
|
+ storeCode: val.storeCode,
|
|
|
+ taskId: val.taskId,
|
|
|
+ userId: val.userId,
|
|
|
+ storeCategory: val.storeCategory,
|
|
|
+ },
|
|
|
+ });
|
|
|
+ }
|
|
|
},
|
|
|
timeBefore7(date) {
|
|
|
if (!date) {
|
|
|
@@ -406,7 +419,7 @@ export default {
|
|
|
},
|
|
|
onClickLeft() {
|
|
|
this.$router.push({
|
|
|
- path: '/My/index',
|
|
|
+ path: '/My/index',
|
|
|
});
|
|
|
},
|
|
|
onSearch() {
|
|
|
@@ -440,7 +453,7 @@ export default {
|
|
|
loading1.clear();
|
|
|
if (res.code == 200) {
|
|
|
this.loading = false;
|
|
|
- if(this.pageNum == 1){
|
|
|
+ if (this.pageNum == 1) {
|
|
|
this.latestUpdateTime = res.dataTime;
|
|
|
}
|
|
|
this.list = this.list.concat(res.data);
|
|
|
@@ -576,16 +589,16 @@ export default {
|
|
|
};
|
|
|
</script>
|
|
|
<style lang="scss">
|
|
|
-.refreshBtn{
|
|
|
- display: flex;
|
|
|
- justify-content: center;
|
|
|
- align-items: center;
|
|
|
- cursor: pointer;
|
|
|
- width: 100%;
|
|
|
- color: #ff976a;
|
|
|
- padding: 5px;
|
|
|
- font-size: 14px;
|
|
|
- background-color: #fff;
|
|
|
+.refreshBtn {
|
|
|
+ display: flex;
|
|
|
+ justify-content: center;
|
|
|
+ align-items: center;
|
|
|
+ cursor: pointer;
|
|
|
+ width: 100%;
|
|
|
+ color: #ff976a;
|
|
|
+ padding: 5px;
|
|
|
+ font-size: 14px;
|
|
|
+ background-color: #fff;
|
|
|
}
|
|
|
.searchDiv {
|
|
|
.van-search {
|