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: { params: {
current: this.current, current: this.current,
size: 15, size: 15,
phone: 15527637203 // phone: 15527637203
// phone: this.user.phone phone: this.user.phone
} }
}).then(res => { }).then(res => {
if (res?.data) { if (res?.data) {

View File

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

View File

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

View File

@@ -1,5 +1,6 @@
<template> <template>
<div class="StoreDetail"> <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="header-info">
<div class="flex-top"> <div class="flex-top">
<div class="left"> <div class="left">
@@ -39,7 +40,7 @@
<div class="line-bg"></div> <div class="line-bg"></div>
<div class="list-content"> <div class="list-content">
<div class="type-list"> <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>
<div class="item" v-for="(item, index) in assessList" :key="index"> <div class="item" v-for="(item, index) in assessList" :key="index">
<div class="user-info"> <div class="user-info">
@@ -52,7 +53,7 @@
<div class="star-info"> <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="#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> <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>
<div class="text">{{ item.remark }}</div> <div class="text">{{ item.remark }}</div>
<div v-if="item.imgList && item.imgList.length"> <div v-if="item.imgList && item.imgList.length">
@@ -75,31 +76,27 @@ export default {
shopId: '', shopId: '',
detailInfo: {}, detailInfo: {},
assessList: [], assessList: [],
typeList: [
{dictName: '全部', dictValue: '', num: '30'},
{dictName: '111', dictValue: '', num: '30'},
{dictName: '222', dictValue: '', num: '30'}
],
typeIndex: 0, typeIndex: 0,
current: 1, current: 1,
pages: 2 pages: 2,
typeNumList: [],
shopEvaluateType: '',
backgroundNavbar: {
background: '#fff',
}
} }
}, },
onReady() {
uni.setNavigationBarColor({
frontColor: '#000000',
backgroundColor: '#ffffff'
})
},
onLoad(e) { onLoad(e) {
this.shopId = e.shopId this.shopId = e.shopId
this.$dict.load(['operatorType']).then(() => { this.$dict.load(['operatorType', 'shopEvaluateType']).then(() => {
this.getDetail() this.getDetail()
this.getAssessList() this.getAssessList()
this.getTypeNum()
}) })
uni.$on('updateStore', () => { uni.$on('updateStore', () => {
this.getDetail() this.getDetail()
this.getAssessList() this.getAssessList()
this.getTypeNum()
}) })
}, },
onShow() { onShow() {
@@ -122,7 +119,7 @@ export default {
getAssessList() { getAssessList() {
if(this.current > this.pages) return if(this.current > this.pages) return
this.$loading() 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) { if (res?.data) {
res.data.records.map((item) => { res.data.records.map((item) => {
if(item.pictureUrl) { if(item.pictureUrl) {
@@ -137,8 +134,35 @@ export default {
} }
}).finally(() => uni.hideLoading()) }).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) { typeClick(e) {
this.typeIndex = e this.typeIndex = e
this.shopEvaluateType = this.typeNumList[e].dictValue
this.current = 1 this.current = 1
this.pages = 2 this.pages = 2
this.getAssessList() this.getAssessList()
@@ -153,11 +177,11 @@ export default {
list.push(e) list.push(e)
}) })
console.log(list, index) console.log(list, index)
this.$previewImage(list, index, url); this.$previewImage(list, index, 'url');
}, },
previewShopImg() { previewShopImg() {
var imgList = [{url: this.detailInfo.fileUrl}] var imgList = [{url: this.detailInfo.fileUrl}]
this.$previewImage(imgList, 0, url); this.$previewImage(imgList, 0, 'url');
} }
}, },
onReachBottom() { onReachBottom() {

View File

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

View File

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