Procházet zdrojové kódy

修改满意度评价

yxb
DESKTOP-2IO5MST\huting před 2 roky
rodič
revize
0bc65555e1

+ 2
- 2
pages.json Zobrazit soubor

@@ -982,13 +982,13 @@
{
"path": "order-evaluate-product",
"style": {
"navigationBarTitleText": "评价产品"
"navigationBarTitleText": "产品评价"
}
},
{
"path": "order-evaluate-salesman",
"style": {
"navigationBarTitleText": "评价满意度"
"navigationBarTitleText": "满意度评价"
}
},
{

+ 2
- 1
pages/order/components/order-list-item-new.vue Zobrazit soubor

@@ -44,6 +44,7 @@
v-if="item.orderStep == OrderStatus['完成个人/单位信息上传'] || item.orderStep == OrderStatus.完成填写基本信息 || item.orderStep == OrderStatus.完成车辆信息上传">
<view class="btn btn-normal" @click.stop="gotoCancelOrder(item)">取消订单</view>
<view class="btn btn-primary" @click.stop="gotoEditUserOrUnitInfo(item)">继续申请</view>
</view>

<!-- 待支付 -->
@@ -92,7 +93,7 @@
<view class="btn btn-primary" @click.stop="gotoEvaluateProduct(item)" >去评价产品</view>
<view class="btn btn-primary" @click.stop="gotoEvaluateSalesman(item)" >去评价业务员</view>
</view>
<view class="btn btn-normal" v-else>已评价</view>
<view class="btn btn-normal" v-else>已评价</view>
</view>

<!-- 已结束 -->

+ 3
- 1
subpackage/orders/order-evaluate-product.vue Zobrazit soubor

@@ -197,6 +197,7 @@
showLoading: true,
}
request(orderDetail, options).then((res) => {
console.log("222",stringToJson(res.bizContent))
state.orderInfo = stringToJson(res.bizContent);
state.haveUser = !isBlank(state.orderInfo.staffId);
})
@@ -211,13 +212,14 @@
showLoading: true,
}
request(orderEvaluateTag, options).then((res) => {
console.log("111",stringToJson(res.bizContent))
state.tagAllList = stringToJson(res.bizContent);
})
}
onLoad((option) => {
getOrderDetails(option.id);
getEnvTag();
// getEnvTag();
})
</script>


+ 74
- 69
subpackage/orders/order-evaluate-salesman.vue Zobrazit soubor

@@ -1,57 +1,38 @@
<!-- 订单-评价 -->
<template>
<!-- 业务员办理满意度评价 -->
<!-- 业务员满意度评价 -->
<!-- 产品 -->
<!-- <view class="card" style="padding: 40rpx 30rpx;">
<view class="title">{{state.orderInfo.productName}}</view>
<evaluate-star v-model="state.product.score" title="评价得分"></evaluate-star>
<textarea class="input-box" v-model="state.product.content" placeholder-class="text-hint" :maxlength="500"
style="height: 260rpx;" placeholder="从多角度评价,可以帮助我们提升服务质量。">
</textarea>
<view class="upload-img">
<form-image @backImg="backImg($event)" @removeImg="removeImg" :isUrl="false" style="width: 100%;" :retract="-15"></form-image>
</view>
</view> -->

<!-- 业务员 -->
<view class="card" v-if="state.haveUser">
<view class="title1">业务员</view>
<!-- 业务员办理满意度评价 -->
<view class="card">
<view class="title1">业务办理满意度评价</view>
<view style="padding: 30rpx 30rpx 45rpx;">
<view class="user as-layout-horizontal">
<image class="avatar" :src="`${$imgUrl}default_head.png`" mode="aspectFill"></image>
<view class="user-info">
<view class="name">{{state.orderInfo.staffName ?? ''}}</view>
<view class="name">{{state.orderInfo.staffPhone ?? ''}}</view>
</view>
</view>
<evaluate-star v-model="state.user.score" title="进行评价"></evaluate-star>
<evaluate-star v-model="state.handle.score" title="进行评价"></evaluate-star>
<view class="center as-layout-horizontal">
<view class="tags as-layout-horizontal">
<view class="tag" v-for="(item,index) in state.user.tagList" :key="item">
<view class="tag" v-for="(item,index) in state.handle.tagList" :key="item">
{{item.label}}
<image v-if="state.user.tagList.length > 1" class="tag-close"
:src="`${$imgUrl}common/icon-close.png`" @click="removeTag(item)" />
<image v-if="state.handle.tagList.length > 1" class="tag-close"
:src="`${$imgUrl}common/icon-close.png`" @click="removeTag1(item)" />
</view>
</view>
<image
:src="`${$imgUrl}common/${state.showTagPop ? 'arror-top.png' : 'arror-down.png'}`"
style="width: 40rpx;height: 40rpx;" @click="state.showTagPop = !state.showTagPop"></image>
:src="`${$imgUrl}common/${state.showTagPop1 ? 'arror-top.png' : 'arror-down.png'}`"
style="width: 40rpx;height: 40rpx;" @click="state.showTagPop1 = !state.showTagPop1"></image>
</view>
<textarea class="input-box" v-model="state.user.content" placeholder-class="text-hint"
<textarea class="input-box" v-model="state.handle.content" placeholder-class="text-hint"
style="height: 200rpx;" placeholder="请输入评价内容">
</textarea>
</view>
</view>
<!-- 业务员满意度评价 -->
<view class="card" v-if="state.haveUser">
<view class="title1">业务员</view>
<view class="title1">业务员满意度评价</view>
<view style="padding: 30rpx 30rpx 45rpx;">
<view class="user as-layout-horizontal">
<image class="avatar" :src="`${$imgUrl}default_head.png`" mode="aspectFill"></image>
<view class="user-info">
<view class="name">{{state.orderInfo.staffName ?? ''}}</view>
<view class="name">{{state.orderInfo.staffPhone ?? ''}}</view>
<view class="name">{{state.orderInfo.nickName ?? ''}}</view>
<view class="name">{{state.orderInfo.tell ?? ''}}</view>
<!-- <view class="name">张三</view>
<view class="name">18712345678</view> -->
</view>
</view>
<evaluate-star v-model="state.user.score" title="进行评价"></evaluate-star>
@@ -76,8 +57,15 @@
<view class="btn">
<submit-button @submit="publish" title="发布"></submit-button>
</view>

<!-- 选择标签弹窗 -->
<!-- 选择标签弹窗 业务员办理满意度弹框-->
<u-popup v-model="state.showTagPop1" mode="bottom" height="60%">
<view v-if="state.showTagPop1">
<tag-popup :selTags="state.handle.tagList" :tagAllList="state.tagAllList" @cancel="state.showTagPop1 = !state.showTagPop1" @confirm="confirmSelectTag1"></tag-popup>
</view>
</u-popup>
<!-- 选择标签弹窗 业务员满意度弹框-->
<u-popup v-model="state.showTagPop" mode="bottom" height="60%">
<view v-if="state.showTagPop">
<tag-popup :selTags="state.user.tagList" :tagAllList="state.tagAllList" @cancel="state.showTagPop = !state.showTagPop" @confirm="confirmSelectTag"></tag-popup>
@@ -91,7 +79,7 @@
import {confirm, isBlank, msg} from "@/utils/utils";
import tagPopup from "./components/popup-order-evaluate-tag";
import { request } from "@/utils/network/request";
import { orderDetail, orderEvaluate,orderEvaluateTag,saleMessage } from "@/utils/network/api";
import { orderDetail, orderEvaluate,orderEvaluateTag,salesmanMsg } from "@/utils/network/api";
import {onLoad} from "@dcloudio/uni-app";
import { stringToJson } from "@/utils/network/encryption";
import { getItem, StorageKeys } from "@/utils/storage";
@@ -99,11 +87,12 @@
const state = reactive({
orderInfo:{} as any, //订单信息
haveUser: false, //存在有业务员发起的业务展示业务员评价模块
showTagPop1:false, //第一个弹框
showTagPop: false, //显示标签选择弹窗
product: { //产品
handle: { //办理满意度
score: 0, //星级得分 最高5分,0.5小数点 2.5分及以下为差评 2.5以上4.0以下为中评 4.0及4.0以上为好评(必选)
content: '', //评价内容
imageList: [], //支持拍照上传最多上传9张
tagList: [], //已选择的评价标签列表
},
user: { //业务员
score: 0, //星级得分 最高5分,0.5小数点 2.5分及以下为差评 2.5以上4.0以下为中评 4.0及4.0以上为好评(必选)
@@ -112,24 +101,25 @@
},
tagAllList:[]
})

/* 确认选择tag */
/* 确认选择tag 满意度 */
const confirmSelectTag1 = (selectTag) => {
state.showTagPop1 = !state.showTagPop1
state.handle.tagList = [...selectTag];
}
/* 确认选择tag 业务员*/
const confirmSelectTag = (selectTag) => {
state.showTagPop = !state.showTagPop
state.user.tagList = [...selectTag];
}

//选择图片
const backImg = (e: any) => {
state.product.imageList = e;
}
//删除图片
const removeImg = (imgList) => {
state.product.imageList = imgList
/* 删除评价标签 满意度*/
const removeTag1 = (item: any) => {
state.handle.tagList.map((tag, index) => {
if (tag.id === item.id) {
state.handle.tagList.splice(index, 1)
}
})
}

/* 删除评价标签 */
/* 删除评价标签 业务员*/
const removeTag = (item: any) => {
state.user.tagList.map((tag, index) => {
if (tag.id === item.id) {
@@ -140,8 +130,8 @@

/* 发布 */
const publish = (e) => {
if (state.product.score === 0) {
msg('请对产品进行打分!');
if (state.handle.score === 0) {
msg('请对业务员办理满意度进行打分!');
return;
}
if (state.haveUser && state.user.score === 0) {
@@ -153,13 +143,13 @@
//差评展示:默认差评 2.5分及以下
//中评展示:默认中评 2.5以上4.0以下
//好评展示:默认好评 4.0及4.0以上
if (!state.product.content) {
if (state.product.score <= 2.5) {
state.product.content = "默认差评";
} else if (state.product.score > 2.5 && state.product.score < 4) {
state.product.content = "默认中评";
if (!state.handle.content) {
if (state.handle.score <= 2.5) {
state.handle.content = "默认差评";
} else if (state.handle.score > 2.5 && state.handle.score < 4) {
state.handle.content = "默认中评";
} else {
state.product.content = "默认好评";
state.handle.content = "默认好评";
}
}
if (state.haveUser && !state.user.content) {
@@ -176,11 +166,11 @@
type: 2,
data: {
"id": state.orderInfo.id,
'productScore': state.product.score,
'productAppraise':state.product.content,
'appraisePics':state.product.imageList.join(";"),
'staffId':state.orderInfo.staffId,
'staffName':state.orderInfo.staffName,
'productScore': state.handle.score,
'productAppraise':state.handle.content,
// 'appraisePics':state.handle.imageList.join(";"),
'staffId':state.orderInfo.openId, //业务员ID
'staffName':state.orderInfo.nickName,
'staffScore':state.user.score,
'staffTips':getTagIds().join(';'),
'staffAppraise':state.user.content,
@@ -215,12 +205,26 @@
showLoading: true,
}
request(orderDetail, options).then((res) => {
console.log("stringToJson(res.bizContent)",stringToJson(res.bizContent))
state.orderInfo = stringToJson(res.bizContent);
// state.haveUser = !isBlank(state.orderInfo.staffId);
state.haveUser = !isBlank(state.orderInfo.staffId);
})
}
/* 订单查询业务员简单信息 */
const getSalesmanMsg = (id) => {
const options = {
type: 2,
data: {"id": id},
method: 'POST',
showLoading: true,
}
request(salesmanMsg, options).then((res) => {
console.log("stringToJson(res.bizContent)",stringToJson(res.bizContent))
state.orderInfo = stringToJson(res.bizContent);
// state.haveUser = !isBlank(state.orderInfo.openId);
state.haveUser = true;
})
}
/* 获取评价标签 */
const getEnvTag = () => {
const options = {
@@ -235,7 +239,8 @@
}
onLoad((option) => {
getOrderDetails(option.id);
// getOrderDetails(option.id);
getSalesmanMsg(option.id);
getEnvTag();
})
</script>

+ 1
- 0
utils/network/api.js Zobrazit soubor

@@ -113,6 +113,7 @@ export const orderExchangeApply = '888'; //8.100.ASS-换货/换卡签申请接
export const outletList = '168'; //根据机构号获取服务网点信息
export const orderEvaluate = '169'; //评价订单
export const orderEvaluateTag = '170'; //获取服务评价标签
export const salesmanMsg='9f19be89a03e475b903b88d4bc91cbb4' //订单查询业务员简单信息
//个人中心
export const changePassword = "94"; //重置密码

Načítá se…
Zrušit
Uložit