var that = this; | var that = this; | ||||
uni.getSystemInfo({ | uni.getSystemInfo({ | ||||
success: (res) => { | success: (res) => { | ||||
console.log("sadsd", res) | |||||
if (res.uniPlatform === 'mp-weixin') { | if (res.uniPlatform === 'mp-weixin') { | ||||
console.log('当前为微信小程序', res, 1111); | |||||
setItem("loginSource", "69af303ba2eb4608a099163f0d2a5dbd"); | setItem("loginSource", "69af303ba2eb4608a099163f0d2a5dbd"); | ||||
setItem("environment", "WX") | setItem("environment", "WX") | ||||
} else if (res.uniPlatform === 'mp-alipay') { | } else if (res.uniPlatform === 'mp-alipay') { | ||||
console.log('当前为支付宝小程序'); | |||||
setItem("loginSource", "601052a249c04155831710b577cb796d"); | setItem("loginSource", "601052a249c04155831710b577cb796d"); | ||||
setItem("environment", "ZFB") | setItem("environment", "ZFB") | ||||
} | } | ||||
uni.login({ | uni.login({ | ||||
provider: "weixin", | provider: "weixin", | ||||
success: function(e) { | success: function(e) { | ||||
console.log("ee", e); | |||||
that.getOpenid(e.code); | that.getOpenid(e.code); | ||||
}, | }, | ||||
}, | }, | ||||
onShow: function(option) { | onShow: function(option) { | ||||
console.log(option); | |||||
console.log("进入主视图"); | console.log("进入主视图"); | ||||
if (option && option.scene === 1038) { | if (option && option.scene === 1038) { | ||||
// 场景值1038:从被打开的小程序返回 | // 场景值1038:从被打开的小程序返回 | ||||
extraData | extraData | ||||
} = option.referrerInfo; | } = option.referrerInfo; | ||||
if (appId == "wxbcad394b3d99dac9") { | if (appId == "wxbcad394b3d99dac9") { | ||||
console.log(getItem("QYorder")); | |||||
const orders = getItem("QYorder"); | const orders = getItem("QYorder"); | ||||
// appId为wxbcad394b3d99dac9:从车主小程序跳转回来 | // appId为wxbcad394b3d99dac9:从车主小程序跳转回来 | ||||
// TODO | // TODO | ||||
showLoading: true, | showLoading: true, | ||||
}; | }; | ||||
request(etcQYAction, options).then((res) => { | request(etcQYAction, options).then((res) => { | ||||
console.log(res); | |||||
msg("授权成功"); | msg("授权成功"); | ||||
//如果我当前路由是签约页面才能跳转 | //如果我当前路由是签约页面才能跳转 | ||||
let routes = getCurrentPages(); | let routes = getCurrentPages(); | ||||
let curRoute = routes[routes.length - 1].route; | let curRoute = routes[routes.length - 1].route; | ||||
console.log(curRoute); | |||||
if (curRoute === "orders/sign-up") { | if (curRoute === "orders/sign-up") { | ||||
uni.navigateTo({ | uni.navigateTo({ | ||||
url: `/subpackage/orders/product-detail?orderId=${orders.orderId}&&clientFee=${getItem("clientFee")}&&id=${getItem("productId")}`, | url: `/subpackage/orders/product-detail?orderId=${orders.orderId}&&clientFee=${getItem("clientFee")}&&id=${getItem("productId")}`, | ||||
return; | return; | ||||
} | } | ||||
} | } | ||||
console.log(option); | |||||
}, | }, | ||||
onLoad: function(option) { | onLoad: function(option) { | ||||
}, | }, | ||||
onHide: function() { | |||||
console.log("App Hide"); | |||||
}, | |||||
onHide: function() {}, | |||||
methods: { | methods: { | ||||
globalParam() { | globalParam() { | ||||
const options = { | const options = { | ||||
request(getGlobalParam, options).then((res) => { | request(getGlobalParam, options).then((res) => { | ||||
const result = stringToJson(res.bizContent); | const result = stringToJson(res.bizContent); | ||||
setItem('globalParam', result.data) | setItem('globalParam', result.data) | ||||
console.log("配置", result); | |||||
}); | }); | ||||
// #ifdef MP-WEIXIN | // #ifdef MP-WEIXIN | ||||
// #endif | // #endif | ||||
getGlobalParam() { | getGlobalParam() { | ||||
const data = getItem('globalParam') | const data = getItem('globalParam') | ||||
console.log("全局配置数据1111", getCodeName('IS_ENABLE', data.setGray)) | |||||
// 申办时是否允许修改OCR识别出来的车辆信息数据 | // 申办时是否允许修改OCR识别出来的车辆信息数据 | ||||
if (getCodeName('IS_ENABLE', data.setGray) == '启用') { | if (getCodeName('IS_ENABLE', data.setGray) == '启用') { | ||||
this.isEnableSetGray = true; | this.isEnableSetGray = true; | ||||
// #ifdef MP-WEIXIN | // #ifdef MP-WEIXIN | ||||
request(getOpenidApi, options).then((res) => { | request(getOpenidApi, options).then((res) => { | ||||
const result = stringToJson(res.bizContent); | const result = stringToJson(res.bizContent); | ||||
console.log("获取微信小程序openid", result); | |||||
const openidData = stringToJson(result.data); | const openidData = stringToJson(result.data); | ||||
setItem("QYorder", openidData); | setItem("QYorder", openidData); | ||||
}); | }); | ||||
font-family: "Microsoft Yahei"; | font-family: "Microsoft Yahei"; | ||||
// filter: grayscale(1) | // filter: grayscale(1) | ||||
} | } | ||||
</style> | |||||
</style> |
// 获取选择的地区 | // 获取选择的地区 | ||||
function handleGetRegion(e : any, item : TypeData) { | function handleGetRegion(e : any, item : TypeData) { | ||||
console.log("获取选择的地区", e, item) | |||||
item[item.value] = e.detail.value; | item[item.value] = e.detail.value; | ||||
emit("handleGetRegion", e, item); | emit("handleGetRegion", e, item); | ||||
} | } | ||||
if (all) { | if (all) { | ||||
item[item.value] = srcUrl; | item[item.value] = srcUrl; | ||||
// console.log('--------总图片路径------------'); | |||||
// console.log(item[item.value]) | |||||
} | } | ||||
} | } | ||||
} | } | ||||
}) | }) | ||||
.catch((e) => { | .catch((e) => { | ||||
console.log(">>>>", e); | |||||
}); | }); | ||||
}); | }); | ||||
// #endif | // #endif |
<template> | <template> | ||||
<view class="content"> | |||||
{{content}} | |||||
<web-view v-if="isTextSrc" :src="textSrc"></web-view> | |||||
<view class="content" v-else> | |||||
{{textContent}} | |||||
</view> | </view> | ||||
</template> | </template> | ||||
request | request | ||||
} from "@/utils/network/request.js"; | } from "@/utils/network/request.js"; | ||||
import { | import { | ||||
infoQuery | |||||
infoQuery, envs | |||||
} from "@/utils/network/api.js" | } from "@/utils/network/api.js" | ||||
const isTextSrc = ref(false) | |||||
const textSrc = ref('') | |||||
const content = ref('') | const content = ref('') | ||||
const textContent = ref('') | |||||
// 获取文本信息----用户协议 | // 获取文本信息----用户协议 | ||||
const getInfo = (type) => { | |||||
const getInfo = () => { | |||||
//参数说明 | //参数说明 | ||||
let options = { | let options = { | ||||
type: 2, //type: 2,JSON格式提交数据(默认表单形式提交) | type: 2, //type: 2,JSON格式提交数据(默认表单形式提交) | ||||
request(infoQuery, options) | request(infoQuery, options) | ||||
.then((res) => { | .then((res) => { | ||||
let data = stringToJson(res.bizContent) | let data = stringToJson(res.bizContent) | ||||
console.log(data); | |||||
content.value = data.text | |||||
if (data.textType == "URL") { | |||||
textSrc.value = envs[process.env.NODE_ENV].baseUrl + data.text | |||||
isTextSrc.value = true | |||||
} else { | |||||
textContent.value = data.text | |||||
isTextSrc.value = false | |||||
} | |||||
}) | }) | ||||
.catch((err) => { | .catch((err) => { | ||||
console.log(err); | console.log(err); | ||||
}); | }); | ||||
} | } | ||||
onLoad(() => { | onLoad(() => { | ||||
getInfo() | getInfo() | ||||
}) | }) |
"subPackages": [{ | "subPackages": [{ | ||||
"root": "subpackage/after-sale", //售后相关 | "root": "subpackage/after-sale", //售后相关 | ||||
"pages": [{ | "pages": [{ | ||||
"path": "cancell-refund/cancell-refund", | |||||
"style": { | |||||
"navigationBarTitleText": "注销退费查询", | |||||
"enablePullDownRefresh": false | |||||
} | |||||
}, | |||||
{ | |||||
"path": "corporate-account-query/corporate-account-query-details", | "path": "corporate-account-query/corporate-account-query-details", | ||||
"style": { | "style": { | ||||
"navigationBarTitleText": "对公账户详情", | "navigationBarTitleText": "对公账户详情", |
<!-- 已完成 --> | <!-- 已完成 --> | ||||
<view class="btns" v-else-if="item.orderStep == OrderStatus.已完成"> | <view class="btns" v-else-if="item.orderStep == OrderStatus.已完成"> | ||||
<view class="btn btn-normal" v-if="item.isStaff==1"> | |||||
<view class="btn btn-normal" v-if="item.isStaff==1 && item.isProduct==1"> | |||||
已评价 | 已评价 | ||||
</view> | </view> | ||||
<view class='evaluation' v-else> | <view class='evaluation' v-else> |
@click='search()'>搜索</button> | @click='search()'>搜索</button> | ||||
</view> | </view> | ||||
<view class='item' v-for="(item,index) in state.newList"> | <view class='item' v-for="(item,index) in state.newList"> | ||||
<view class='time'><text>时间:{{item.tradeConfirmTime}}</text><text>¥{{item.fee}}</text></view> | |||||
<view class='time'><text>时间:{{item.tradeConfirmTime}}</text><text>¥{{item.fee/100}}</text></view> | |||||
<view>ETC卡号:{{item.bankCardId}}</view> | <view>ETC卡号:{{item.bankCardId}}</view> | ||||
</view> | </view> | ||||
</view> | </view> |
@click='search()'>搜索</button> | @click='search()'>搜索</button> | ||||
</view> | </view> | ||||
<view class='item' v-for="(item,index) in state.newList"> | <view class='item' v-for="(item,index) in state.newList"> | ||||
<view class='time'><text>时间:{{item.tradeConfirmTime}}</text><text>¥{{item.fee}}</text></view> | |||||
<view class='time'><text>时间:{{item.tradeConfirmTime}}</text><text>¥{{item.fee/100}}</text></view> | |||||
<view>ETC卡号:{{item.bankCardId}}</view> | <view>ETC卡号:{{item.bankCardId}}</view> | ||||
</view> | </view> | ||||
</view> | </view> |
<template> | |||||
<view class="content"> | |||||
<view class="top-content"> | |||||
<view class="input"> | |||||
<text>车牌号:</text> | |||||
<input placeholder="请输入车牌号" v-model="state.vehiclePlate" /> | |||||
</view> | |||||
<view class="item last"> | |||||
<text>车牌颜色:</text> | |||||
<uni-data-select v-model="state.vehiclePlateColor" :localdata="state.colorRange" @change="changeColor" | |||||
:clear="false"></uni-data-select> | |||||
<button size="mini" style="color: #ffffff; | |||||
backgroundColor: rgb(118, 200, 77); | |||||
borderColor: rgb(118, 200, 77); | |||||
font-size: 26rpx; | |||||
flex-shrink: 0;margin-left: 30rpx;" @click="search(1)">搜索</button> | |||||
</view> | |||||
</view> | |||||
<view class="uni-container"> | |||||
<view class="list-item" v-for="(item,index) in state.listData"> | |||||
<view> | |||||
<view><text>车牌号:</text><text>{{item.vehiclePlate}}</text></view> | |||||
<view><text>金额:</text><text>{{item.amount/100}}元</text></view> | |||||
<view v-if="item.cardId"><text>卡号:</text><text>{{item.cardId}}</text></view> | |||||
<view><text>单号:</text><text>{{item.orderNo}}</text></view> | |||||
<view><text>状态:</text><text>{{item.statusC}}</text></view> | |||||
<view><text>退费类型:</text><text>{{item.businessPortC}}</text></view> | |||||
<view><text>创建时间:</text><text>{{item.insertTime}}</text></view> | |||||
<view><text>审核时间:</text><text>{{item.updateTime}}</text></view> | |||||
</view> | |||||
</view> | |||||
<view style="text-align: center;" v-if="state.noData">暂无数据</view> | |||||
</view> | |||||
<view class="bottom-line" v-if="state.flags">我是有底线的~~~</view> | |||||
</view> | |||||
</template> | |||||
<script setup lang="ts"> | |||||
import { reactive } from "vue"; | |||||
import { | |||||
msg | |||||
} from "@/utils/utils"; | |||||
import { | |||||
businessType | |||||
} from "@/datas/businessType.js" | |||||
import { onLoad, onReachBottom } from "@dcloudio/uni-app"; | |||||
import { cancellRefoundApi } from "@/utils/network/api.js"; | |||||
import { stringToJson } from "@/utils/network/encryption"; | |||||
import { request } from "@/utils/network/request.js"; | |||||
import { getItem, StorageKeys } from "@/utils/storage"; | |||||
const state = reactive({ | |||||
startTime: Date.now(), //日期 | |||||
colorRange: [], | |||||
listData: [], | |||||
range: ['', ''], | |||||
pageSize: 10, //每页数据量 | |||||
pageNo: 1, // 当前页 | |||||
total: 0, // 数据总量 | |||||
flags: false, | |||||
vehiclePlate: "", | |||||
vehiclePlateColor: "", | |||||
statusArr: [],//状态 | |||||
refundBusinessArr: [], | |||||
noData: false //是否有数据 | |||||
}) | |||||
onLoad((option) => { | |||||
let getColor = getItem('key')['VEHICLE_COLOR_TYPE']; | |||||
for (var k = 0; k < getColor.length; k++) { | |||||
let obj = {}; | |||||
obj['value'] = getColor[k]['code'] | |||||
obj['text'] = getColor[k]['name'] | |||||
state.colorRange.push(obj) | |||||
} | |||||
// REFUND_STATUS 退费管理-退费状 | |||||
let getStatus = getItem('key')['REFUND_STATUS']; | |||||
for (var k = 0; k < getStatus.length; k++) { | |||||
let obj = {}; | |||||
obj['value'] = getStatus[k]['code'] | |||||
obj['text'] = getStatus[k]['name'] | |||||
state.statusArr.push(obj) | |||||
} | |||||
console.log("state.statusArr", state.statusArr) | |||||
// REFUND_BUSINESS 退费管理-退费业务类型 | |||||
let refundBusiness = getItem('key')['REFUND_BUSINESS']; | |||||
for (var k = 0; k < refundBusiness.length; k++) { | |||||
let obj = {}; | |||||
obj['value'] = refundBusiness[k]['code'] | |||||
obj['text'] = refundBusiness[k]['name'] | |||||
state.refundBusinessArr.push(obj) | |||||
} | |||||
}) | |||||
const changeColor = (e) => { | |||||
state.vehiclePlateColor = e | |||||
console.log(e) | |||||
} | |||||
//业务完成日志 | |||||
const search = (val) => { | |||||
if (!state.vehiclePlate) { | |||||
msg("请输入车牌号") | |||||
return; | |||||
} | |||||
if (!state.vehiclePlateColor) { | |||||
msg("请选择车牌颜色") | |||||
return; | |||||
} | |||||
if (val == 1) { | |||||
state.pageNo = 1 | |||||
} | |||||
if (state.pageNo == 1 && state.listData.length > 0) { | |||||
state.listData = [] | |||||
} | |||||
var data = { | |||||
vehicleId: state.vehiclePlate + "_" + state.vehiclePlateColor, | |||||
pageNo: state.pageNo, | |||||
pageSize: state.pageSize, | |||||
}; | |||||
const options = { | |||||
type: 2, | |||||
data: data, | |||||
method: "POST", | |||||
showLoading: true, | |||||
}; | |||||
request(cancellRefoundApi, options).then((res) => { | |||||
const data = stringToJson(res.bizContent); | |||||
console.log("getData", data) | |||||
if (data.totalCount == 0) { | |||||
state.noData = true | |||||
} else { | |||||
state.noData = false | |||||
} | |||||
var getData = [...stringToJson(res.bizContent).data, ...state.listData] | |||||
for (var i = 0; i < getData.length; i++) { | |||||
for (var m = 0; m < state.statusArr.length; m++) { | |||||
if (getData[i]['status'] == state.statusArr[m]['value']) { | |||||
getData[i]['statusC'] = state.statusArr[m]['text'] | |||||
break; | |||||
} | |||||
} | |||||
for (var m = 0; m < state.refundBusinessArr.length; m++) { | |||||
if (getData[i]['businessPort'] == state.refundBusinessArr[m]['value']) { | |||||
getData[i]['businessPortC'] = state.refundBusinessArr[m]['text'] | |||||
break; | |||||
} | |||||
} | |||||
} | |||||
state.listData = getData | |||||
state.total = state.listData.length | |||||
}); | |||||
} | |||||
// 触底加载 | |||||
onReachBottom(() => { | |||||
if (state.listData.length < state.pageNo * 10) return state.flags = true | |||||
console.log("触底了") | |||||
state.pageNo++ | |||||
search(2) | |||||
}) | |||||
</script> | |||||
<style scoped> | |||||
.top-content { | |||||
position: fixed; | |||||
left: 0; | |||||
top: 0; | |||||
background-color: white; | |||||
width: 100%; | |||||
padding: 0 20rpx 20rpx 20rpx; | |||||
box-sizing: border-box; | |||||
z-index: 999999; | |||||
} | |||||
.content { | |||||
font-size: 32rpx; | |||||
padding: 20rpx 30rpx; | |||||
background-color: #EEF7F7; | |||||
min-height: 100vh; | |||||
} | |||||
.card { | |||||
display: flex; | |||||
margin: 0 20rpx; | |||||
align-items: center; | |||||
} | |||||
.title { | |||||
margin-bottom: 20rpx; | |||||
} | |||||
.uni-container { | |||||
margin: 50rpx 0; | |||||
margin-top: 180rpx; | |||||
} | |||||
/deep/.uni-table-th, | |||||
/deep/.uni-table-td { | |||||
padding: 0 !important; | |||||
font-size: 12px !important; | |||||
} | |||||
/deep/.uni-date__x-input, | |||||
/deep/.uni-select { | |||||
font-size: 13px; | |||||
height: 24px; | |||||
line-height: 24px; | |||||
} | |||||
/deep/.last .uni-stat__select { | |||||
width: 360rpx; | |||||
} | |||||
/deep/.uni-select__selector-empty, | |||||
/deep/.uni-select__selector-item { | |||||
font-size: 13px !important; | |||||
} | |||||
/deep/.uni-date { | |||||
width: 73% !important; | |||||
} | |||||
.example-body { | |||||
display: flex; | |||||
align-items: center; | |||||
margin-top: 20rpx; | |||||
} | |||||
/deep/.uni-date-x { | |||||
height: 56rpx !important; | |||||
} | |||||
.list-item { | |||||
width: 95%; | |||||
border-radius: 10rpx; | |||||
margin: 30rpx auto; | |||||
font-size: 28rpx; | |||||
border: 1rpx solid #ccc; | |||||
padding: 12rpx; | |||||
box-sizing: border-box; | |||||
background-color: white; | |||||
display: flex; | |||||
align-items: center; | |||||
} | |||||
.list-item>view { | |||||
margin-bottom: 10rpx; | |||||
width: 90%; | |||||
} | |||||
.list-item>view>view>text:first-child { | |||||
width: 25%; | |||||
display: inline-block; | |||||
} | |||||
.bottom-line { | |||||
text-align: center; | |||||
margin: 30rpx 0; | |||||
} | |||||
.item { | |||||
display: flex; | |||||
font-size: 30rpx; | |||||
margin-top: 20rpx; | |||||
align-items: center; | |||||
} | |||||
input, | |||||
.uni-input { | |||||
border: 1rpx solid #ccc; | |||||
padding: 0 10rpx; | |||||
height: 28rpx; | |||||
line-height: 28rpx; | |||||
} | |||||
.input { | |||||
display: flex; | |||||
align-items: center; | |||||
} | |||||
.input>input { | |||||
width: 47%; | |||||
margin-top: 10rpx; | |||||
font-size: 30rpx; | |||||
margin-left: 20rpx; | |||||
} | |||||
</style> |
<view v-if="state.isWeiXin==2"> | <view v-if="state.isWeiXin==2"> | ||||
<view class="btn-status" v-if="state.orderInfo.orderStep == OrderStatus.已完成"> | <view class="btn-status" v-if="state.orderInfo.orderStep == OrderStatus.已完成"> | ||||
<view class="btn space" v-if="state.orderInfo.isStaff==1"> | |||||
<view class="btn space" v-if="state.orderInfo.isStaff==1 && state.orderInfo.isProduct==1"> | |||||
已评价 | 已评价 | ||||
</view> | </view> | ||||
<view class='evaluation' v-else> | <view class='evaluation' v-else> |
<!-- 订单-评价 --> | <!-- 订单-评价 --> | ||||
<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"> | <view class="card"> | ||||
<view class="title1">业务员满意度评价</view> | <view class="title1">业务员满意度评价</view> | ||||
orderInfo: {} as any, //订单信息 | orderInfo: {} as any, //订单信息 | ||||
showTagPop1: false, //第一个弹框 | showTagPop1: false, //第一个弹框 | ||||
showTagPop: false, //显示标签选择弹窗 | showTagPop: false, //显示标签选择弹窗 | ||||
product: { //产品 | |||||
score: 0, //星级得分 最高5分,0.5小数点 2.5分及以下为差评 2.5以上4.0以下为中评 4.0及4.0以上为好评(必选) | |||||
content: '', //评价内容 | |||||
imageList: [], //支持拍照上传最多上传9张 | |||||
}, | |||||
handle: { //办理满意度 | 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: '', //评价内容 | ||||
id: '', | id: '', | ||||
isAnonymity: 0, //是否匿名 默认匿名 | isAnonymity: 0, //是否匿名 默认匿名 | ||||
}) | }) | ||||
//删除图片 | |||||
const removeImg = (imgList) => { | |||||
state.product.imageList = imgList | |||||
} | |||||
//选择图片 | |||||
const backImg = (e : any) => { | |||||
console.log("e", e) | |||||
state.product.imageList = e; | |||||
} | |||||
/* 确认选择tag 满意度 */ | /* 确认选择tag 满意度 */ | ||||
const confirmSelectTag1 = (selectTag) => { | const confirmSelectTag1 = (selectTag) => { | ||||
state.showTagPop1 = !state.showTagPop1 | state.showTagPop1 = !state.showTagPop1 | ||||
/* 发布 */ | /* 发布 */ | ||||
const publish = (e) => { | const publish = (e) => { | ||||
addStaff(); | |||||
addProduct(); | |||||
} | } | ||||
const addStaff = () => { | |||||
const addProduct = () => { | |||||
if (state.product.score === 0) { | |||||
msg('请对产品进行打分!'); | |||||
return; | |||||
} | |||||
if (state.user.score === 0) { | if (state.user.score === 0) { | ||||
msg('请对业务员进行打分!'); | msg('请对业务员进行打分!'); | ||||
return; | return; | ||||
} | } | ||||
//若不填评价内容,根据打分规则自动填充评价内容 | |||||
//差评展示:默认差评 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 = "默认中评"; | |||||
} else { | |||||
state.product.content = "默认好评"; | |||||
} | |||||
} | |||||
const options = { | |||||
type: 2, | |||||
data: { | |||||
"orderId": state.orderId, | |||||
"serviceType": "product", | |||||
"score": state.product.score, | |||||
"pictureUrl": state.product.imageList.join(";"), | |||||
"message": '', | |||||
"suggestion": state.product.content, | |||||
"isAnonymity": state.isAnonymity | |||||
}, | |||||
method: 'POST', | |||||
showLoading: true, | |||||
} | |||||
console.log("options", options) | |||||
request(addEvaluation, options).then((res) => { | |||||
addStaff() | |||||
}) | |||||
} | |||||
const addStaff = () => { | |||||
if (!state.user.content) { | if (!state.user.content) { | ||||
if (state.user.score <= 2.5) { | if (state.user.score <= 2.5) { | ||||
state.user.content = "默认差评"; | state.user.content = "默认差评"; | ||||
state.orderId = option.orderId; | state.orderId = option.orderId; | ||||
state.id = option.id; | state.id = option.id; | ||||
getEnvTag(); | getEnvTag(); | ||||
getOrderDetails(option.id); | |||||
}) | }) | ||||
/* 获取订单详情 */ | |||||
const getOrderDetails = (id) => { | |||||
const options = { | |||||
type: 2, | |||||
data: { "id": id }, | |||||
method: 'POST', | |||||
showLoading: true, | |||||
} | |||||
request(orderDetail, options).then((res) => { | |||||
state.orderInfo = stringToJson(res.bizContent); | |||||
console.log("获取订单详情", stringToJson(res.bizContent), state.orderInfo.equityId) | |||||
}) | |||||
} | |||||
</script> | </script> | ||||
<style> | <style> |
:key="i"> | :key="i"> | ||||
<view class="iten-left"> | <view class="iten-left"> | ||||
<view>订单编号:{{item.orderId}}</view> | <view>订单编号:{{item.orderId}}</view> | ||||
<view>退款金额:{{item.rechargeAmount/100}}元</view> | |||||
<view>充值金额:{{item.rechargeAmount/100}}元</view> | |||||
<view>圈存时间:{{item.updateTime}}</view> | <view>圈存时间:{{item.updateTime}}</view> | ||||
</view> | </view> | ||||
<view class="choose-item"> | <view class="choose-item"> |
<!-- 车牌颜色 --> | <!-- 车牌颜色 --> | ||||
<view class="plate-color"> | <view class="plate-color"> | ||||
<view class="title">选择车牌颜色</view> | <view class="title">选择车牌颜色</view> | ||||
<numberplateColor :numberplate="state.numberplate?state.numberplate:state.vehiclePlateNumber" :numberplateCor="{ id: 0 }" | |||||
@numberplateResult="checkNumberplateColor"> | |||||
<numberplateColor :numberplate="state.numberplate?state.numberplate:state.vehiclePlateNumber" | |||||
:numberplateCor="{ id: 0 }" @numberplateResult="checkNumberplateColor"> | |||||
</numberplateColor> | </numberplateColor> | ||||
</view> | </view> | ||||
<view class="btn"> | <view class="btn"> | ||||
import numberplateColor from "./components/layout-numberplate-color"; | import numberplateColor from "./components/layout-numberplate-color"; | ||||
import carNumerInput from "@/components/car-number-input/car-number-input"; | import carNumerInput from "@/components/car-number-input/car-number-input"; | ||||
const tools = require("../../static/etcUtil/tools.js"); | const tools = require("../../static/etcUtil/tools.js"); | ||||
onLoad((option) => { | onLoad((option) => { | ||||
console.log(option); | console.log(option); | ||||
}) | }) | ||||
vehiclePlateNumber: "贵A12345", | vehiclePlateNumber: "贵A12345", | ||||
}) | }) | ||||
/* 选择车牌颜色 */ | /* 选择车牌颜色 */ | ||||
const checkNumberplateColor = (item : any) => { | const checkNumberplateColor = (item : any) => { | ||||
state.vehiclePlateColor = item.id; | state.vehiclePlateColor = item.id; | ||||
// state.vehiclePlateColorStr = colorItem.title; | |||||
}; | }; | ||||
//车牌颜色选择回调结果 | //车牌颜色选择回调结果 |
console.log(err); | console.log(err); | ||||
}); | }); | ||||
} | } | ||||
onLoad(() => { | |||||
}) | |||||
onShow(() => { | onShow(() => { | ||||
getInfo() | getInfo() | ||||
}) | }) |
}, | }, | ||||
toggleSelector() { | toggleSelector() { | ||||
this.$emit('close') | this.$emit('close') | ||||
console.log("close") | |||||
if (this.disabled) { | if (this.disabled) { | ||||
return | return | ||||
} | } | ||||
.uni-stat__select { | .uni-stat__select { | ||||
display: flex; | display: flex; | ||||
align-items: center; | align-items: center; | ||||
// padding: 15px; | |||||
cursor: pointer; | cursor: pointer; | ||||
width: 100%; | |||||
// width: 100%; | |||||
min-width: 400rpx; | |||||
flex: 1; | flex: 1; | ||||
box-sizing: border-box; | box-sizing: border-box; | ||||
} | } |
:clear="false" @close="showTan"></uni-data-select> | :clear="false" @close="showTan"></uni-data-select> | ||||
</view> | </view> | ||||
<view class="change_type"> | <view class="change_type"> | ||||
<view class="choice_item1" v-if=" isShow===0"> | |||||
<view class="choice_item1" v-if="isShow===0"> | |||||
<uni-data-select v-if="!isAli" v-model="selectPieValue" :localdata="pieRange" @change="changePie" | <uni-data-select v-if="!isAli" v-model="selectPieValue" :localdata="pieRange" @change="changePie" | ||||
:clear="false" @close="showTan"> | :clear="false" @close="showTan"> | ||||
</uni-data-select> | </uni-data-select> | ||||
</view> | </view> | ||||
<view v-else-if=" isShow===1"> | |||||
<view v-else-if="isShow===1"> | |||||
<zxzUniDataSelect v-model="value1" filterable multiple dataKey="label" dataValue="value" | <zxzUniDataSelect v-model="value1" filterable multiple dataKey="label" dataValue="value" | ||||
:localdata="data" @change="changeLine" @close="showTan" /> | :localdata="data" @change="changeLine" @close="showTan" /> | ||||
</view> | </view> | ||||
}, | }, | ||||
methods: { | methods: { | ||||
changeLine(e) { | changeLine(e) { | ||||
const choiceAllData = [] | const choiceAllData = [] | ||||
for (var i = 0; i < e.length; i++) { | for (var i = 0; i < e.length; i++) { | ||||
choiceAllData.push(this.lineDataAll[e[i]['value']]) | choiceAllData.push(this.lineDataAll[e[i]['value']]) | ||||
} | } | ||||
this.getLineData(choiceAllData); | this.getLineData(choiceAllData); | ||||
this.closeTan() | |||||
console.log('e:', e); | console.log('e:', e); | ||||
}, | }, | ||||
showTan() { | showTan() { | ||||
console.log("展示") | |||||
console.log("隐藏") | |||||
this.hideCanvas = false; | this.hideCanvas = false; | ||||
}, | }, | ||||
closeTan() { | closeTan() { | ||||
console.log("隐藏") | |||||
console.log("展示") | |||||
this.hideCanvas = true; | this.hideCanvas = true; | ||||
}, | }, | ||||
getPieData(data) { | getPieData(data) { | ||||
}] | }] | ||||
}; | }; | ||||
this.pieData = JSON.parse(JSON.stringify(res)); | this.pieData = JSON.parse(JSON.stringify(res)); | ||||
this.closeTan() | |||||
}, 500); | }, 500); | ||||
}, | }, | ||||
getColumnData(xData, yData) { | getColumnData(xData, yData) { | ||||
series: yData | series: yData | ||||
}; | }; | ||||
this.chartData = JSON.parse(JSON.stringify(res)); | this.chartData = JSON.parse(JSON.stringify(res)); | ||||
this.closeTan() | |||||
}, 500); | }, 500); | ||||
}, | }, | ||||
getLineData(data) { | getLineData(data) { | ||||
console.log("data", data) | console.log("data", data) | ||||
//模拟从服务器获取数据时的延时 | |||||
setTimeout(() => { | |||||
if (data.length > 0) { | |||||
//模拟从服务器获取数据时的延时 | |||||
//模拟服务器返回数据,如果数据格式和标准格式不同,需自行按下面的格式拼接 | //模拟服务器返回数据,如果数据格式和标准格式不同,需自行按下面的格式拼接 | ||||
let res = { | let res = { | ||||
'categories': "", | 'categories': "", | ||||
for (var i = 0; i < data.length; i++) { | for (var i = 0; i < data.length; i++) { | ||||
res['series'].push(data[i]['yData'][0]) | res['series'].push(data[i]['yData'][0]) | ||||
} | } | ||||
console.log("data", data, res) | |||||
this.lineData = JSON.parse(JSON.stringify(res)); | |||||
}, 500); | |||||
setTimeout(() => { | |||||
console.log("data", data, res) | |||||
this.lineData = JSON.parse(JSON.stringify(res)); | |||||
this.closeTan() | |||||
}, 500); | |||||
} else { | |||||
this.showTan() | |||||
} | |||||
}, | }, | ||||
selectitem(index, item) { | selectitem(index, item) { | ||||
if (index >= 0) { | if (index >= 0) { | ||||
//饼状图改变 | //饼状图改变 | ||||
changePie(e) { | changePie(e) { | ||||
this.getPieData(this.pieDataAll[e]); | this.getPieData(this.pieDataAll[e]); | ||||
this.closeTan() | |||||
}, | }, | ||||
// 柱状图改变 | // 柱状图改变 | ||||
changeCol(e) { | changeCol(e) { | ||||
allyData.push(this.colData.yData[index]) | allyData.push(this.colData.yData[index]) | ||||
} | } | ||||
this.getColumnData(this.colData.xData, allyData); | this.getColumnData(this.colData.xData, allyData); | ||||
this.closeTan() | |||||
}, | }, | ||||
// 改变类型 | // 改变类型 | ||||
changeType(e) { | changeType(e) { |
export const appPage = "608fc3bddd3e4d7b8667b71b743f1b52" //app分页 | export const appPage = "608fc3bddd3e4d7b8667b71b743f1b52" //app分页 | ||||
export const noActivationOrder = "fa0ef243d4044a96b5fb0186081baf20" //所有待激活订单 | export const noActivationOrder = "fa0ef243d4044a96b5fb0186081baf20" //所有待激活订单 | ||||
export const accountMoneyApi = "7c0846300c6f490abd35120931fcd663" //对公账户余额 | export const accountMoneyApi = "7c0846300c6f490abd35120931fcd663" //对公账户余额 | ||||
export const addProductInterestApi = "aa7ce8d0b64a4396a42c57bac6cd2433" //权益产品评价完成调用 | |||||
export const addProductInterestApi = "aa7ce8d0b64a4396a42c57bac6cd2433" //权益产品评价完成调用 | |||||
export const cancellRefoundApi = "441ea77c279046d192bc3c6abf07c952" //注销退费查询 |