浏览代码

2024年4月25日16:36:18

yxb
wq 1年前
父节点
当前提交
6bc814f100

+ 0
- 12
pages.json 查看文件

"navigationBarTitleText": "开票申请" "navigationBarTitleText": "开票申请"
} }
}, },
{
"path": "invoice-download",
"style": {
"navigationBarTitleText": "下载发票"
}
},
{ {
"path": "invoiceApply/Invoice-mannager", "path": "invoiceApply/Invoice-mannager",
"style": { "style": {
"enablePullDownRefresh": true "enablePullDownRefresh": true
} }
}, },
{
"path": "invoicing-record",
"style": {
"navigationBarTitleText": "开票记录"
}
},
{ {
"path": "verification-apply", "path": "verification-apply",
"style": { "style": {

+ 32
- 33
subpackage/after-sale/activation-once-again/activation-once-again.vue 查看文件

let ids = ''; let ids = '';


onLoad((option) => { onLoad((option) => {
console.log('======重新激活开始111======', option);
//请求订单详情
queryOrderDetail(option.id);
ids = option.id; ids = option.id;
if (option.status) { if (option.status) {
getObuId()
queryOrderDetail(option.id, () => { getObuId() })
} else {
queryOrderDetail(option.id, () => { })
} }

}); });


onShow((option) => { onShow((option) => {
}; };


const toPage = () => { const toPage = () => {
// navTo("/pages/bluetooth/bluetooth?routeType=5&id=" + ids);
// // return
// if (!state.form.vehPosImgUrl) {
// msg("请上传行驶证主页")
// return;
// }
// if (!state.form.vehNegImgUrl) {
// msg("请上传行驶证副页")
// return;
// }
// console.log("state.form.vehicleIdNum", state.form.vehicleIdNum, orderInfos.vehiclePlate)
// if (state.form.vehicleIdNum == orderInfos.vehiclePlate) {
// if (state.form.vehicleIdNumB == orderInfos.vehiclePlate) {
// activationRecordQuery().then((val) => {
// console.log("激活次数", val)
// if (val.limit) {
// navTo("/pages/bluetooth/bluetooth?routeType=5");
// } else {
// msg("一年内到达激活次数上限5次")
// }
// });
// } else {
// msg("请上传正确行驶证副页")
// }
// } else {
// msg("请上传正确行驶证")
// }


if (!state.form.vehPosImgUrl) {
msg("请上传行驶证主页")
return;
}
if (!state.form.vehNegImgUrl) {
msg("请上传行驶证副页")
return;
}
console.log("state.form.vehicleIdNum", state.form.vehicleIdNum, orderInfos.vehiclePlate)
if (state.form.vehicleIdNum == orderInfos.vehiclePlate) {
if (state.form.vehicleIdNumB == orderInfos.vehiclePlate) {
activationRecordQuery().then((val) => {
console.log("激活次数", val)
if (val.limit) {
navTo(`/pages/bluetooth/bluetooth?routeType=5&id=${ids}&difference=1`);
} else {
msg("一年内到达激活次数上限5次")
}
});
} else {
msg("请上传正确行驶证副页")
}
} else {
msg("请上传正确行驶证")
}
}; };


//获取订单详情 //获取订单详情
const queryOrderDetail = (id : string) => {
const queryOrderDetail = (id : string, caback) => {
const options = { const options = {
type: 2, type: 2,
data: { data: {
orderInfos.approvedCount = orderInfo.vehicleApprovedCount; orderInfos.approvedCount = orderInfo.vehicleApprovedCount;
orderInfos.vehicleVin = orderInfo.vehicleVin; orderInfos.vehicleVin = orderInfo.vehicleVin;
orderInfos.vehicleEngineNum = orderInfo.vehicleEngineNum; orderInfos.vehicleEngineNum = orderInfo.vehicleEngineNum;
caback();
activationRecordQuery().then((val) => { activationRecordQuery().then((val) => {
console.log("jihuo", val) console.log("jihuo", val)
state.activationNum = val.num state.activationNum = val.num
const getObuId = () => { const getObuId = () => {
console.log('======获取OBU号======') console.log('======获取OBU号======')
let cmdArray = [cmd.HOME_DIRECTORY, cmd.OBU_SYSTEM_FILE, cmd.RANDOM_NUMBER]; let cmdArray = [cmd.HOME_DIRECTORY, cmd.OBU_SYSTEM_FILE, cmd.RANDOM_NUMBER];
// tools.showLoadingAlert("正在执行指令");
tools.showLoadingAlert("正在执行指令");
bluetoothUtil.transCmd(cmdArray, "20", function (res) { bluetoothUtil.transCmd(cmdArray, "20", function (res) {
tools.hideLoadingAlert(); tools.hideLoadingAlert();
var status = res[1].substring(res[1].length - 4, res[1].length); var status = res[1].substring(res[1].length - 4, res[1].length);

+ 9
- 3
subpackage/after-sale/blacklist-query/list.vue 查看文件

request(blackApi, options).then((res) => { request(blackApi, options).then((res) => {
const data = stringToJson(res.bizContent); const data = stringToJson(res.bizContent);
const getData = data.blackCards; const getData = data.blackCards;
const newData = []
for (var i = 0; i < getData.length; i++) { for (var i = 0; i < getData.length; i++) {
if (getData[i]['status'] == '1') {
newData.push(getData[i])
}
}
for (var i = 0; i < newData.length; i++) {
for (var m = 0; m < state.blackStatus.length; m++) { for (var m = 0; m < state.blackStatus.length; m++) {
if (getData[i]['type'] == state.blackStatus[m]['value']) {
getData[i]['typeC'] = state.blackStatus[m]['text']
if (newData[i]['type'] == state.blackStatus[m]['value']) {
newData[i]['typeC'] = state.blackStatus[m]['text']
break; break;
} }
} }
} }
state.tableData = data.blackCards
state.tableData = newData
console.log("圈存金额查询2", data) console.log("圈存金额查询2", data)
}) })
} }

+ 0
- 80
subpackage/orders/invoice-download.vue 查看文件

<template>
<view class="box">
<view class="content">
<view class="">
如需下载请长按网址复制后使用游览器访问
</view>
<text>https://www.baidu.com</text>
</view>
<button class="download">复制</button>
</view>

</template>

<script setup lang="ts">
import {
reactive
} from "vue";
import {
msg,
navTo
} from '@/utils/utils';

const toPage = () => {
navTo('/subpackage/orders/invoiceApply/invoiceList')
}
</script>


<style>
page {
width: 100%;
height: 100%;
background: #EEF7F7;
}
</style>

<style lang="scss" scoped>
.box {
height: 100%;
width: 100%;
border-top: 1rpx solid #EEF7F7;
background: #EEF7F7;

.content {
text-align: center;
margin-top: 123rpx;

view {
font-size: 32rpx;
font-family: Noto Sans S Chinese;
font-weight: 400;
color: #333333;
margin-bottom: 60rpx;
}

text {
font-size: 26rpx;
font-family: Noto Sans S Chinese;
font-weight: 400;
color: #333333;
}
}

.download {
width: 670rpx;
height: 80rpx;
background: linear-gradient(-90deg, #43A1E0 0%, #13E7C1 100%);
border-radius: 40rpx;
font-size: 32rpx;
font-family: Noto Sans S Chinese;
font-weight: 400;
color: #FFFFFF;
line-height: 80rpx;
position: fixed;
left: 50%;
transform: translate(-50%);
bottom: 100rpx;
}
}
</style>

+ 16
- 3
subpackage/orders/invoiceApply/invoiceList.vue 查看文件

<!-- <text>新办订单</text> --> <!-- <text>新办订单</text> -->
</view> </view>
<view class="content"> <view class="content">
<view class="row">
<!-- <view class="row">
订单类型:<text>新办订单</text> 订单类型:<text>新办订单</text>
</view>
</view> -->
<view class="row"> <view class="row">
开票日期:<text>{{item.invoiceDate}}</text> 开票日期:<text>{{item.invoiceDate}}</text>
</view> </view>
</view> </view>
</view> </view>
<view class="btns"> <view class="btns">
<button>开票</button>
<button @click="down(item.fileUrl)">开票</button>
</view> </view>
</view> </view>
<!-- <view class="bottom-line" v-if="state.flags">我是有底线的~~~</view> --> <!-- <view class="bottom-line" v-if="state.flags">我是有底线的~~~</view> -->
import { invoiceQueryApi } from "@/utils/network/api.js"; import { invoiceQueryApi } from "@/utils/network/api.js";
import { stringToJson } from "@/utils/network/encryption"; import { stringToJson } from "@/utils/network/encryption";
import { request } from "@/utils/network/request.js"; import { request } from "@/utils/network/request.js";
import { msg } from "@/utils/utils";
const state = reactive({ const state = reactive({
userMobile: "", userMobile: "",
pageNumber: 1, pageNumber: 1,
state.pageNumber++ state.pageNumber++
query(2) query(2)
}) })
const down = (fileUrl) => {
uni.downloadFile({
url: fileUrl, //仅为示例,并非真实的资源
success: (res) => {
if (res.statusCode === 200) {
console.log('下载成功');
msg("下载成功")
}
}
});

}
</script> </script>





+ 0
- 154
subpackage/orders/invoicing-record.vue 查看文件

<template>
<view class="box">
<view class="card">
<view class="item">
<view>发票抬头</view>
<text>贵州某某科技有限公司</text>
</view>
<view class="item">
<view>发票类型</view>
<text>ETC服务发票</text>
</view>
<view class="item">
<view>开票金额</view>
<text>90.00元</text>
</view>
<view class="item">
<view>开票时间</view>
<text>2023-01-21 10:10:23</text>
</view>
<view class="item">
<view>备注</view>
<text>贵A123123</text>
</view>
<button class="download" @click="toPage">
下载电子发票
</button>
</view>
<view class="card">
<view class="item">
<view>发票抬头</view>
<text>贵州某某科技有限公司</text>
</view>
<view class="item">
<view>发票类型</view>
<text>ETC服务发票</text>
</view>
<view class="item">
<view>开票金额</view>
<text>90.00元</text>
</view>
<view class="item">
<view>开票时间</view>
<text>2023-01-21 10:10:23</text>
</view>
<view class="item">
<view>备注</view>
<text>贵A123123</text>
</view>
<button class="download" @click="toPage">
下载电子发票
</button>
</view>
<view class="card">
<view class="item">
<view>发票抬头</view>
<text>贵州某某科技有限公司</text>
</view>
<view class="item">
<view>发票类型</view>
<text>ETC服务发票</text>
</view>
<view class="item">
<view>开票金额</view>
<text>90.00元</text>
</view>
<view class="item">
<view>开票时间</view>
<text>2023-01-21 10:10:23</text>
</view>
<view class="item">
<view>备注</view>
<text>贵A123123</text>
</view>
<button class="download" @click="toPage">
下载电子发票
</button>
</view>
</view>

</template>

<script setup lang="ts">
import {
reactive
} from "vue";
import {
msg,
navTo
} from '@/utils/utils';

const toPage = () => {
navTo('/subpackage/orders/invoice-download')
}
</script>


<style>
page {
width: 100%;
height: 100%;
background: #EEF7F7;
}
</style>

<style lang="scss" scoped>
.box {
height: 100%;
width: 100%;
border-top: 1rpx solid #EEF7F7;
background: #EEF7F7;

.card {
padding: 0 30rpx;
height: 615rpx;
background: #FFFFFF;
box-shadow: 0rpx 2rpx 6rpx 0rpx rgba(223, 223, 223, 0.8);
margin-bottom: 30rpx;

.item {
display: flex;
justify-content: space-between;
padding: 30rpx 0;
border-bottom: 1rpx solid #DCDCDC;

view {
font-size: 28rpx;
font-family: Noto Sans S Chinese;
font-weight: 400;
color: #777777;
}

text {
font-size: 28rpx;
font-family: Noto Sans S Chinese;
font-weight: 400;
color: #333333;
}
}

.download {
width: 670rpx;
height: 80rpx;
background: linear-gradient(-90deg, #43A1E0 0%, #13E7C1 100%);
border-radius: 40rpx;
margin: 30rpx auto;
font-size: 32rpx;
font-family: Noto Sans S Chinese;
font-weight: 400;
color: #FFFFFF;
line-height: 80rpx;
}
}
}
</style>

+ 16
- 13
subpackage/service/equity/equity.vue 查看文件

style="display: flex;flex-direction: row;min-height: 60rpx;justify-content: space-between;text-align: baseline;"> style="display: flex;flex-direction: row;min-height: 60rpx;justify-content: space-between;text-align: baseline;">
<text class="text-w" style="flex: 1;margin-top: 5rpx;" <text class="text-w" style="flex: 1;margin-top: 5rpx;"
:style="functBackName(list) == 'WAIT_ACTIVATED' ? 'color: #023F8F;' : functBackName(list) == 'WAIT_USE' ? 'color: orange;' : functBackName(list) == 'USED' ? 'color: green;' : 'color: gray;'">卡卷状态:{{functBackName(list) == 'WAIT_ACTIVATED' ? '待激活' : functBackName(list) == 'WAIT_USE' ? '待领取' : functBackName(list) == 'USED' ? '已领取' : '已失效'}}</text> :style="functBackName(list) == 'WAIT_ACTIVATED' ? 'color: #023F8F;' : functBackName(list) == 'WAIT_USE' ? 'color: orange;' : functBackName(list) == 'USED' ? 'color: green;' : 'color: gray;'">卡卷状态:{{functBackName(list) == 'WAIT_ACTIVATED' ? '待激活' : functBackName(list) == 'WAIT_USE' ? '待领取' : functBackName(list) == 'USED' ? '已领取' : '已失效'}}</text>
<button v-if="functBackName(list) != 'EXPIRED' && list && list.equityType !='ZFB'"
<button
v-if="functBackName(list) != 'EXPIRED' && list && list.equityType !='ZFB'"
:style="functBackName(list) == 'WAIT_ACTIVATED' ? 'background-color: #023F8F;' : functBackName(list) == 'WAIT_USE' ? 'background-color: orange;' : functBackName(list) == 'USED' ? 'background-color: green;' : 'background-color: gray;'" :style="functBackName(list) == 'WAIT_ACTIVATED' ? 'background-color: #023F8F;' : functBackName(list) == 'WAIT_USE' ? 'background-color: orange;' : functBackName(list) == 'USED' ? 'background-color: green;' : 'background-color: gray;'"
class="copy-btn" data-code="{{item}}" @click.stop="copyCode(list)">
class="copy-btn" data-code="{{item}}"
@click.stop="copyCode(list,functBackName(list),item)">
{{functBackName(list) == 'WAIT_ACTIVATED' ? '去激活' : functBackName(list) == 'WAIT_USE' ? '立即领取' : {{functBackName(list) == 'WAIT_ACTIVATED' ? '去激活' : functBackName(list) == 'WAIT_USE' ? '立即领取' :
functBackName(list) == 'USED' ? '复制' : '已失效'}}</button> functBackName(list) == 'USED' ? '复制' : '已失效'}}</button>
</view> </view>
卡卷状态:正常 卡卷状态:正常
</text> </text>
<button style="background-color: #4caf50;" class="copy-btn" <button style="background-color: #4caf50;" class="copy-btn"
data-code="{{item}}" @click.stop="copyCode(list)">
data-code="{{item}}" @click.stop="copyCode(list,'EXPIRED',null)">
去使用 去使用
</button> </button>
</view> </view>
'USED' : ''; 'USED' : '';
} }


function copyCode(e) {
function copyCode(e, start,items) {
let item = e; let item = e;
// // 复制兑换码到剪贴板 // // 复制兑换码到剪贴板
let code = e.redeemCode; let code = e.redeemCode;
console.log("===e===", e.equityType);
console.log(item, "===e===", e.equityType, items);
if (item.equityType == 'ZFB') { if (item.equityType == 'ZFB') {
uni.navigateTo({ uni.navigateTo({
url: `/subpackage/service/zfbqy/zfbqy` url: `/subpackage/service/zfbqy/zfbqy`
return return
} }


if (e.status == 'WAIT_ACTIVATED') { //待激活
if (start == 'WAIT_ACTIVATED') { //待激活
uni.showModal({ uni.showModal({
title: '温馨提示', title: '温馨提示',
content: "激活后,可领取卡卷", content: "激活后,可领取卡卷",
} }
} }
}); });
} else if (e.status == 'WAIT_USE') { //待领取使用
} else if (start == 'WAIT_USE') { //待领取使用
uni.showModal({ uni.showModal({
title: '温馨提示', title: '温馨提示',
content: "请在领取后120天内使用,超期失效", content: "请在领取后120天内使用,超期失效",
data: { data: {
mobile: getItem('mobile') + "", mobile: getItem('mobile') + "",
notificationType: 'USE', notificationType: 'USE',
cardIds: [item.id],
cardIds: [items.id],
couponId: couponId.value, couponId: couponId.value,
equityId: item.equityId,
orderId: item.orderId
equityId: item.singleEquityId,
orderId: items.orderId
}, },
method: "POST", method: "POST",
showLoading: true, showLoading: true,
// }); // });
// }, // },
// }); // });
loadExchangeCodes();
uni.showToast({ uni.showToast({
title: '领取成功', title: '领取成功',
icon: 'success', icon: 'success',
}); });
loadExchangeCodes();
uni.navigateBack();
}) })
} else if (res.cancel) { } else if (res.cancel) {
console.log('用户点击取消'); console.log('用户点击取消');
}); });
// 已使用 USED // 已使用 USED
// 已过期 EXPIRED // 已过期 EXPIRED
} else if (e.status == 'USED') { //已使用
} else if (start == 'USED') { //已使用
uni.setClipboardData({ uni.setClipboardData({
data: code, data: code,
success: function() { success: function() {
}); });
}, },
}); });
} else if (e.status == 'EXPIRED') { //已过期
} else if (start == 'EXPIRED') { //已过期


} }
} }

+ 2
- 2
utils/network/request.js 查看文件



} }


// options.url = envs[process.env.NODE_ENV].baseUrl + '/api/interfaceMidGroundIn'
options.url = envs[process.env.NODE_ENV].baseUrl + '/dev/api/interfaceMidGroundIn'
options.url = envs[process.env.NODE_ENV].baseUrl + '/api/interfaceMidGroundIn'
// options.url = envs[process.env.NODE_ENV].baseUrl + '/dev/api/interfaceMidGroundIn'
//默认json数据格式提交` //默认json数据格式提交`
let contentType = 'application/x-www-form-urlencoded' let contentType = 'application/x-www-form-urlencoded'



正在加载...
取消
保存