DESKTOP-2IO5MST\huting пре 2 година
родитељ
комит
0bc65555e1

+ 2
- 2
pages.json Прегледај датотеку

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

+ 2
- 1
pages/order/components/order-list-item-new.vue Прегледај датотеку

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


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


<!-- 已结束 --> <!-- 已结束 -->

+ 3
- 1
subpackage/orders/order-evaluate-product.vue Прегледај датотеку

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



+ 74
- 69
subpackage/orders/order-evaluate-salesman.vue Прегледај датотеку

<!-- 订单-评价 --> <!-- 订单-评价 -->
<template> <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 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="center as-layout-horizontal">
<view class="tags 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}} {{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>
</view> </view>
<image <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> </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="请输入评价内容"> style="height: 200rpx;" placeholder="请输入评价内容">
</textarea> </textarea>
</view> </view>
</view> </view>
<!-- 业务员满意度评价 -->
<view class="card" v-if="state.haveUser"> <view class="card" v-if="state.haveUser">
<view class="title1">业务员</view>
<view class="title1">业务员满意度评价</view>
<view style="padding: 30rpx 30rpx 45rpx;"> <view style="padding: 30rpx 30rpx 45rpx;">
<view class="user as-layout-horizontal"> <view class="user as-layout-horizontal">
<image class="avatar" :src="`${$imgUrl}default_head.png`" mode="aspectFill"></image> <image class="avatar" :src="`${$imgUrl}default_head.png`" mode="aspectFill"></image>
<view class="user-info"> <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>
</view> </view>
<evaluate-star v-model="state.user.score" title="进行评价"></evaluate-star> <evaluate-star v-model="state.user.score" title="进行评价"></evaluate-star>
<view class="btn"> <view class="btn">
<submit-button @submit="publish" title="发布"></submit-button> <submit-button @submit="publish" title="发布"></submit-button>
</view> </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%"> <u-popup v-model="state.showTagPop" mode="bottom" height="60%">
<view v-if="state.showTagPop"> <view v-if="state.showTagPop">
<tag-popup :selTags="state.user.tagList" :tagAllList="state.tagAllList" @cancel="state.showTagPop = !state.showTagPop" @confirm="confirmSelectTag"></tag-popup> <tag-popup :selTags="state.user.tagList" :tagAllList="state.tagAllList" @cancel="state.showTagPop = !state.showTagPop" @confirm="confirmSelectTag"></tag-popup>
import {confirm, isBlank, msg} from "@/utils/utils"; import {confirm, isBlank, msg} from "@/utils/utils";
import tagPopup from "./components/popup-order-evaluate-tag"; import tagPopup from "./components/popup-order-evaluate-tag";
import { request } from "@/utils/network/request"; 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 {onLoad} from "@dcloudio/uni-app";
import { stringToJson } from "@/utils/network/encryption"; import { stringToJson } from "@/utils/network/encryption";
import { getItem, StorageKeys } from "@/utils/storage"; import { getItem, StorageKeys } from "@/utils/storage";
const state = reactive({ const state = reactive({
orderInfo:{} as any, //订单信息 orderInfo:{} as any, //订单信息
haveUser: false, //存在有业务员发起的业务展示业务员评价模块 haveUser: false, //存在有业务员发起的业务展示业务员评价模块
showTagPop1:false, //第一个弹框
showTagPop: false, //显示标签选择弹窗 showTagPop: false, //显示标签选择弹窗
product: { //产品
handle: { //办理满意度
score: 0, //星级得分 最高5分,0.5小数点 2.5分及以下为差评 2.5以上4.0以下为中评 4.0及4.0以上为好评(必选) score: 0, //星级得分 最高5分,0.5小数点 2.5分及以下为差评 2.5以上4.0以下为中评 4.0及4.0以上为好评(必选)
content: '', //评价内容 content: '', //评价内容
imageList: [], //支持拍照上传最多上传9张
tagList: [], //已选择的评价标签列表
}, },
user: { //业务员 user: { //业务员
score: 0, //星级得分 最高5分,0.5小数点 2.5分及以下为差评 2.5以上4.0以下为中评 4.0及4.0以上为好评(必选) score: 0, //星级得分 最高5分,0.5小数点 2.5分及以下为差评 2.5以上4.0以下为中评 4.0及4.0以上为好评(必选)
}, },
tagAllList:[] tagAllList:[]
}) })

/* 确认选择tag */
/* 确认选择tag 满意度 */
const confirmSelectTag1 = (selectTag) => {
state.showTagPop1 = !state.showTagPop1
state.handle.tagList = [...selectTag];
}
/* 确认选择tag 业务员*/
const confirmSelectTag = (selectTag) => { const confirmSelectTag = (selectTag) => {
state.showTagPop = !state.showTagPop state.showTagPop = !state.showTagPop
state.user.tagList = [...selectTag]; 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) => { const removeTag = (item: any) => {
state.user.tagList.map((tag, index) => { state.user.tagList.map((tag, index) => {
if (tag.id === item.id) { if (tag.id === item.id) {


/* 发布 */ /* 发布 */
const publish = (e) => { const publish = (e) => {
if (state.product.score === 0) {
msg('请对产品进行打分!');
if (state.handle.score === 0) {
msg('请对业务员办理满意度进行打分!');
return; return;
} }
if (state.haveUser && state.user.score === 0) { if (state.haveUser && state.user.score === 0) {
//差评展示:默认差评 2.5分及以下 //差评展示:默认差评 2.5分及以下
//中评展示:默认中评 2.5以上4.0以下 //中评展示:默认中评 2.5以上4.0以下
//好评展示:默认好评 4.0及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 { } else {
state.product.content = "默认好评";
state.handle.content = "默认好评";
} }
} }
if (state.haveUser && !state.user.content) { if (state.haveUser && !state.user.content) {
type: 2, type: 2,
data: { data: {
"id": state.orderInfo.id, "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, 'staffScore':state.user.score,
'staffTips':getTagIds().join(';'), 'staffTips':getTagIds().join(';'),
'staffAppraise':state.user.content, 'staffAppraise':state.user.content,
showLoading: true, showLoading: true,
} }
request(orderDetail, options).then((res) => { request(orderDetail, options).then((res) => {
console.log("stringToJson(res.bizContent)",stringToJson(res.bizContent))
state.orderInfo = 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; state.haveUser = true;
}) })
} }
/* 获取评价标签 */ /* 获取评价标签 */
const getEnvTag = () => { const getEnvTag = () => {
const options = { const options = {
} }
onLoad((option) => { onLoad((option) => {
getOrderDetails(option.id);
// getOrderDetails(option.id);
getSalesmanMsg(option.id);
getEnvTag(); getEnvTag();
}) })
</script> </script>

+ 1
- 0
utils/network/api.js Прегледај датотеку

export const outletList = '168'; //根据机构号获取服务网点信息 export const outletList = '168'; //根据机构号获取服务网点信息
export const orderEvaluate = '169'; //评价订单 export const orderEvaluate = '169'; //评价订单
export const orderEvaluateTag = '170'; //获取服务评价标签 export const orderEvaluateTag = '170'; //获取服务评价标签
export const salesmanMsg='9f19be89a03e475b903b88d4bc91cbb4' //订单查询业务员简单信息
//个人中心 //个人中心
export const changePassword = "94"; //重置密码 export const changePassword = "94"; //重置密码

Loading…
Откажи
Сачувај