Procházet zdrojové kódy

2024年4月25日16:36:18

yxb
wq před 1 rokem
rodič
revize
6bc814f100

+ 0
- 12
pages.json Zobrazit soubor

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

+ 32
- 33
subpackage/after-sale/activation-once-again/activation-once-again.vue Zobrazit soubor

@@ -216,13 +216,13 @@
let ids = '';

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

});

onShow((option) => {
@@ -246,38 +246,36 @@
};

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 = {
type: 2,
data: {
@@ -311,6 +309,7 @@
orderInfos.approvedCount = orderInfo.vehicleApprovedCount;
orderInfos.vehicleVin = orderInfo.vehicleVin;
orderInfos.vehicleEngineNum = orderInfo.vehicleEngineNum;
caback();
activationRecordQuery().then((val) => {
console.log("jihuo", val)
state.activationNum = val.num
@@ -325,7 +324,7 @@
const getObuId = () => {
console.log('======获取OBU号======')
let cmdArray = [cmd.HOME_DIRECTORY, cmd.OBU_SYSTEM_FILE, cmd.RANDOM_NUMBER];
// tools.showLoadingAlert("正在执行指令");
tools.showLoadingAlert("正在执行指令");
bluetoothUtil.transCmd(cmdArray, "20", function (res) {
tools.hideLoadingAlert();
var status = res[1].substring(res[1].length - 4, res[1].length);

+ 9
- 3
subpackage/after-sale/blacklist-query/list.vue Zobrazit soubor

@@ -53,15 +53,21 @@
request(blackApi, options).then((res) => {
const data = stringToJson(res.bizContent);
const getData = data.blackCards;
const newData = []
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++) {
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;
}
}
}
state.tableData = data.blackCards
state.tableData = newData
console.log("圈存金额查询2", data)
})
}

+ 0
- 80
subpackage/orders/invoice-download.vue Zobrazit soubor

@@ -1,80 +0,0 @@
<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 Zobrazit soubor

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

}
</script>



+ 0
- 154
subpackage/orders/invoicing-record.vue Zobrazit soubor

@@ -1,154 +0,0 @@
<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 Zobrazit soubor

@@ -34,9 +34,11 @@
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;"
: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;'"
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) == 'USED' ? '复制' : '已失效'}}</button>
</view>
@@ -52,7 +54,7 @@
卡卷状态:正常
</text>
<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>
</view>
@@ -174,11 +176,11 @@
'USED' : '';
}

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

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

}
}

+ 2
- 2
utils/network/request.js Zobrazit soubor

@@ -70,8 +70,8 @@ export function request(code, options = {}, start = false) {

}

// 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数据格式提交`
let contentType = 'application/x-www-form-urlencoded'


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