This commit is contained in:
liuye
2024-06-27 14:53:01 +08:00
parent b395a44e70
commit 988ee9bd91
6 changed files with 71 additions and 49 deletions

View File

@@ -37,8 +37,8 @@ export default {
params: {
current: this.current,
size: 15,
phone: 15527637203
// phone: this.user.phone
// phone: 15527637203
phone: this.user.phone
}
}).then(res => {
if (res?.data) {

View File

@@ -1,5 +1,6 @@
<template>
<div class="AppStore">
<u-navbar :is-back="false" title="门店" title-color="#000" title-width="300" title-size="32" :title-bold="true" :background="backgroundNavbar" :is-fixed="true" height="44"></u-navbar>
<div class="tab">
<u-tabs :list="tabList" :is-scroll="false" :current="tabIndex" @change="change" inactive-color="#222" active-color="#222"
height="100" :bar-style="barStyle"></u-tabs>
@@ -29,18 +30,15 @@ export default {
'border-radius': '2px',
'bottom': '-3px',
'background': '#2D7DFF'
},
backgroundNavbar: {
background: '#fff',
}
}
},
computed: {
...mapState(['user'])
},
onReady() {
uni.setNavigationBarColor({
frontColor: '#000000',
backgroundColor: '#ffffff'
})
},
onLoad(e) {
if(e.tabIndex) {
this.tabIndex = e.tabIndex
@@ -73,7 +71,6 @@ page{
height: 100vh;
.tab {
position: fixed;
top: 0;
left: 0;
z-index: 9;
width: 100%;

View File

@@ -1,5 +1,6 @@
<template>
<div class="EvaluateForm">
<u-navbar back-icon-color="#000" title="我要评价" title-color="#000" title-width="300" title-size="32" :title-bold="true" :background="backgroundNavbar" :is-fixed="true" height="44"></u-navbar>
<div class="header-info">
<div class="name">{{ shopInfo.shopName }}</div>
<div class="time">
@@ -30,12 +31,12 @@
<div class="label">({{index+1}}){{item.listType}}</div>
<div class="value">
<div class="radio" @click="positiveRadioClick(index, 1)">
<img src="https://cdn.cunwuyun.cn/wechat/fd-store/evaluate-form-xz.png" alt="" v-if="item.status">
<img src="https://cdn.cunwuyun.cn/wechat/fd-store/evaluate-form-xz.png" alt="" v-if="item.status == 1">
<img src="https://cdn.cunwuyun.cn/wechat/fd-store/evaluate-form-wxz.png" alt="" v-else>
</div>
<div class="radio" @click="positiveRadioClick(index, 0)">
<img src="https://cdn.cunwuyun.cn/wechat/fd-store/evaluate-form-xz.png" alt="" v-if="!item.status">
<img src="https://cdn.cunwuyun.cn/wechat/fd-store/evaluate-form-xz.png" alt="" v-if="item.status == 0">
<img src="https://cdn.cunwuyun.cn/wechat/fd-store/evaluate-form-wxz.png" alt="" v-else>
</div>
@@ -46,12 +47,12 @@
<div class="label">({{index+1}}){{item.listType}}</div>
<div class="value">
<div class="radio" @click="negativeRadioClick(index, 1)">
<img src="https://cdn.cunwuyun.cn/wechat/fd-store/evaluate-form-xz.png" alt="" v-if="item.status">
<img src="https://cdn.cunwuyun.cn/wechat/fd-store/evaluate-form-xz.png" alt="" v-if="item.status == 1">
<img src="https://cdn.cunwuyun.cn/wechat/fd-store/evaluate-form-wxz.png" alt="" v-else>
</div>
<div class="radio" @click="negativeRadioClick(index, 0)">
<img src="https://cdn.cunwuyun.cn/wechat/fd-store/evaluate-form-xz.png" alt="" v-if="!item.status">
<img src="https://cdn.cunwuyun.cn/wechat/fd-store/evaluate-form-xz.png" alt="" v-if="item.status == 0">
<img src="https://cdn.cunwuyun.cn/wechat/fd-store/evaluate-form-wxz.png" alt="" v-else>
</div>
@@ -59,10 +60,9 @@
</div>
<div class="line-bg"></div>
<div class="text-area">
<div class="label">请填写评语</div>
<u-input type="textarea" trim v-model="form.remark" maxlength="300" height="400"
placeholder-style="color: #999;font-size: 15px;"/>
<p>0/300</p>
<u-input type="textarea" trim v-model="form.remark" maxlength="300" height="400" placeholder="请填写评语..."
placeholder-style="color: #333;font-size: 15px;"/>
<p>{{form.remark.length}}/300</p>
</div>
<div class="line-bg"></div>
<div class="upload">
@@ -95,18 +95,15 @@ export default {
positiveTypeList: [],
negativeTypeList: [],
shopId: '',
shopInfo: {}
shopInfo: {},
backgroundNavbar: {
background: '#fff',
}
}
},
computed: {
...mapState(['user'])
},
onReady() {
uni.setNavigationBarColor({
frontColor: '#000000',
backgroundColor: '#ffffff'
})
},
onLoad(e) {
this.getTypeList()
this.shopId = e.shopId
@@ -124,6 +121,7 @@ export default {
this.$instance.post(`/app/appscorerules/list?status=1&size=100`).then(res => {
if (res?.data) {
res.data.records.map((item) => {
item.status = null
if(item.type == 1) {
this.positiveTypeList.push(item)
}else {
@@ -143,7 +141,6 @@ export default {
}).finally(() => uni.hideLoading())
},
positiveRadioClick(index, val) {
console.log(index, val)
this.positiveTypeList[index].status = val
},
negativeRadioClick(index, val) {

View File

@@ -1,5 +1,6 @@
<template>
<div class="StoreDetail">
<u-navbar back-icon-color="#000" title="门店情况" title-color="#000" title-width="300" title-size="32" :title-bold="true" :background="backgroundNavbar" :is-fixed="true" height="44"></u-navbar>
<div class="header-info">
<div class="flex-top">
<div class="left">
@@ -39,7 +40,7 @@
<div class="line-bg"></div>
<div class="list-content">
<div class="type-list">
<div :class="typeIndex == index ? 'type-item active' : 'type-item' " v-for="(item, index) in typeList" :key="index" @click="typeClick(index)">{{ item.dictName }} {{item.num}}</div>
<div :class="typeIndex == index ? 'type-item active' : 'type-item' " v-for="(item, index) in typeNumList" :key="index" @click="typeClick(index)">{{ item.dictName }} {{item.num}}</div>
</div>
<div class="item" v-for="(item, index) in assessList" :key="index">
<div class="user-info">
@@ -52,7 +53,7 @@
<div class="star-info">
<u-icon name="star-fill" color="#FF8C19" size="24" v-for="(items, indexs) in item.xzStar" :key="indexs"></u-icon>
<u-icon name="star-fill" color="#F0F0F0" size="24" v-for="(items, indexs) in item.wxzStar" :key="indexs"></u-icon>
<span class="star-num">{{ item.score }}</span>
<span class="star-num">{{ item.score || 0}}</span>
</div>
<div class="text">{{ item.remark }}</div>
<div v-if="item.imgList && item.imgList.length">
@@ -75,31 +76,27 @@ export default {
shopId: '',
detailInfo: {},
assessList: [],
typeList: [
{dictName: '全部', dictValue: '', num: '30'},
{dictName: '111', dictValue: '', num: '30'},
{dictName: '222', dictValue: '', num: '30'}
],
typeIndex: 0,
current: 1,
pages: 2
pages: 2,
typeNumList: [],
shopEvaluateType: '',
backgroundNavbar: {
background: '#fff',
}
}
},
onReady() {
uni.setNavigationBarColor({
frontColor: '#000000',
backgroundColor: '#ffffff'
})
},
onLoad(e) {
this.shopId = e.shopId
this.$dict.load(['operatorType']).then(() => {
this.$dict.load(['operatorType', 'shopEvaluateType']).then(() => {
this.getDetail()
this.getAssessList()
this.getTypeNum()
})
uni.$on('updateStore', () => {
this.getDetail()
this.getAssessList()
this.getTypeNum()
})
},
onShow() {
@@ -122,7 +119,7 @@ export default {
getAssessList() {
if(this.current > this.pages) return
this.$loading()
this.$instance.post(`/app/appshopassess/list?shopId=${this.shopId}&current=${this.current}`).then(res => {
this.$instance.post(`/app/appshopassess/list?shopId=${this.shopId}&current=${this.current}&shopEvaluateType=${this.shopEvaluateType}`).then(res => {
if (res?.data) {
res.data.records.map((item) => {
if(item.pictureUrl) {
@@ -137,8 +134,35 @@ export default {
}
}).finally(() => uni.hideLoading())
},
getTypeNum() {
this.$instance.post(`/app/appshopassess/queryAppScoreCount?id=${this.shopId}`).then(res => {
if (res.data) {
var list = this.$dict.getDict('shopEvaluateType')
list.map((item) => {
if(item.dictName == '全部') {
item.num = res.data.queryAllCount
}
if(item.dictName == '最新') {
item.num = res.data.newCount
}
if(item.dictName == '好评') {
item.num = res.data.goodCount
}
if(item.dictName == '差评') {
item.num = res.data.badCount
}
if(item.dictName == '有图') {
item.num = res.data.picCount
}
})
this.typeNumList = list
}
}).finally(() => uni.hideLoading())
},
typeClick(e) {
this.typeIndex = e
this.shopEvaluateType = this.typeNumList[e].dictValue
this.current = 1
this.pages = 2
this.getAssessList()
@@ -153,11 +177,11 @@ export default {
list.push(e)
})
console.log(list, index)
this.$previewImage(list, index, url);
this.$previewImage(list, index, 'url');
},
previewShopImg() {
var imgList = [{url: this.detailInfo.fileUrl}]
this.$previewImage(imgList, 0, url);
this.$previewImage(imgList, 0, 'url');
}
},
onReachBottom() {

View File

@@ -1,6 +1,6 @@
<template>
<div class="Evaluate">
<div class="search">
<div class="search" :style="{'top': navHeight+'px'}">
<div class="search-input">
<u-search v-model="searchVal" :clearabled="true" placeholder="搜索门店名称" :show-action="false"
bg-color="#F4F5FA" search-icon-color="#666" color="#222" height="72" @search="getListInit" @clear="getListInit">
@@ -80,10 +80,14 @@ export default {
storeLevelDict: [],
searchStoreLevel: {},
searchOperatorType: {},
girdInfo: {gridName: ''}
girdInfo: {gridName: ''},
navHeight: ''
}
},
created() {
// var statusBarHeight = uni.getSystemInfoSync().statusBarHeight
this.navHeight = uni.getSystemInfoSync().statusBarHeight + 94
this.$dict.load(['operatorType', 'storeLevel']).then(() => {
var all = [{dictName: '全部', dictValue: ''}]
this.operatorTypeDict = all.concat( this.$dict.getDict('operatorType'))
@@ -148,7 +152,7 @@ export default {
.Evaluate {
.search {
position: fixed;
top: 100px;
// top: 100px;
left: 0;
width: 100%;
border-top: 1px solid #F4F5FA;

View File

@@ -1,5 +1,5 @@
<template>
<div class="Situation">
<div class="Situation" :style="{paddingTop: (statusBarHeight + 110) + 'px'}">
<div class="title">
<div class="left">门店台账</div>
</div>
@@ -82,8 +82,8 @@ export default {
},
created() {
const date = new Date()
this.monthText = date.getMonth() + 1
var month = date.getMonth() + 1
var month = date.getMonth() == 0 ? 12 : date.getMonth()
this.monthText = month
month = month > 9 ? month : "0" + month;
this.month = date.getFullYear() + '-' + month
this.getTable()