11.20 电费信息详情更改

formal_basic
shilei 4 days ago
parent 125adc434a
commit ef005651a7

@ -138,8 +138,10 @@
{
"path": "pages/order/chargorder/detailInf/detail",
"style": {
"navigationBarTitleText": "充电单详情",
"enablePullDownRefresh": false
"navigationBarTitleText": "订单详情",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#0aca46",
"navigationBarTextStyle": "white"
}
},
@ -241,6 +243,22 @@
"enablePullDownRefresh": false
}
},
{
"path": "billingPage/billingRecord/billingRecord",
"style": {
"navigationBarTitleText": "开票记录",
"enablePullDownRefresh": false
}
},
{
"path": "billingPage/invoiceDetail/invoiceDetail",
"style": {
"navigationBarTitleText": "开票详情",
"enablePullDownRefresh": false
}
},
{
"path": "billingPage/billingMean/billingMean",

@ -1,111 +1,71 @@
<template>
<view class="content">
<view class="cu-card article" style="position: relative;">
<view class="cu-item shadow">
<view class="padding-sm justify-between">
<view class="refunded_0" v-if="detail.list.orderStatus == 0">
初始化
</view>
<view class="refunded_1" v-if="detail.list.orderStatus == 1">
充电中
</view>
<view class="refunded_3" v-if="detail.list.orderStatus == 2">
启动充电失败
</view>
<view class="refunded_2" v-if="detail.list.orderStatus == 3">
结束充电
</view>
<view class="refunded_1" v-if="detail.list.orderStatus == 4">
待支付
</view>
<view class="refunded_2" v-if="detail.list.orderStatus == 5">
(已完成)支付完成
</view>
<view class="refunded_3" v-if="detail.list.orderStatus == 6">
支付失败
</view>
<view class="refunded_4" v-if="detail.list.orderStatus == 7">
已退款
</view>
<view class="refunded_5" v-if="detail.list.orderStatus == 8">
已挂起
</view>
<view class="refunded_6" v-if="detail.list.orderStatus == 9">
已关闭
</view>
<view class="title_tops">
<view class="status_title">
<view style="font-weight: 600" v-if="detail.list.orderStatus == 0">
初始化
</view>
</view>
</view>
<view class="cu-card article">
<view class="cu-item shadow">
<view class="flex justify-between flex-wrap padding-sm">
<view class="name">{{detail.list.stationName==null?'--':detail.list.stationName}}</view>
<view style="font-weight: 600" v-if="detail.list.orderStatus == 1">
充电中
</view>
<view class="flex padding-lr-sm justify-between flex-wrap list-view">
<view class="staName">场站编码 </view>
<view class="staNum">{{detail.list.stationNo==null?'--':detail.list.stationNo}}</view>
<view style="font-weight: 600" v-if="detail.list.orderStatus == 2">
启动充电失败
</view>
<view class="flex justify-between flex-wrap list-view">
<view class="staName">充电订单号 </view>
<view class="staNum">{{detail.list.chargeOrder==null?'--':detail.list.chargeOrder}}</view>
<view style="font-weight: 600" v-if="detail.list.orderStatus == 3">
结束充电
</view>
<view class="flex justify-between list-view">
<view class="staName">车牌号 </view>
<view class="staNum">{{detail.list.vehicleNo==null?'--':detail.list.vehicleNo}}</view>
<view style="font-weight: 600" v-if="detail.list.orderStatus == 4">
待支付
</view>
<view class="flex padding-lr-sm justify-between list-view">
<view class="staName">车辆vin</view>
<view class="staNum">{{detail.list.vin==null?'--':detail.list.vin}}</view>
<view style="font-weight: 600" v-if="detail.list.orderStatus == 5">
(已完成)支付完成
</view>
<view class="flex padding-lr-sm justify-between list-view">
<view class="staName">充电开始时间</view>
<view class="staNum">{{detail.list.startTime==null?'--':detail.list.startTime}}</view>
<view style="font-weight: 600" v-if="detail.list.orderStatus == 6">
支付失败
</view>
<view class="flex padding-lr-sm justify-between list-view">
<view class="staName">充电结束时间</view>
<view class="staNum">{{detail.list.endTime==null?'--':detail.list.endTime}}</view>
<view style="font-weight: 600" v-if="detail.list.orderStatus == 7">
已退款
</view>
<view class="flex padding-lr-sm justify-between list-view">
<view class="staName">充电时长</view>
<view class="staNum">{{detail.list.chargingTime==null?'--':detail.list.chargingTime}} 分钟</view>
<view style="font-weight: 600" v-if="detail.list.orderStatus == 8">
已挂起
</view>
<view class="flex padding-lr-sm justify-between list-view">
<view class="staName">总电量 </view>
<view class="staNum">{{detail.list.totalElectricity==null?'0':detail.list.totalElectricity}}kW·h
</view>
<view style="font-weight: 600" v-if="detail.list.orderStatus == 9">
已关闭
</view>
<view class="flex justify-between list-view">
<view class="staName">电价费用</view>
<view class="staNum">{{detail.list.elecTotalExpense==null?'0':detail.list.elecTotalExpense / 100}}
<view style="margin-top: 10rpx;">充电开始时间: {{detail.list.startTime==null?'--':detail.list.startTime}}</view>
</view>
<view class="line_center">
<view class="white_box">
<view class="flex justify-between flex-wrap padding-sm">
<view class="name">{{detail.list.stationName==null?'--':detail.list.stationName}}</view>
</view>
</view>
<view class="flex justify-between list-view">
<view class="staName">平台服务费</view>
<view class="staNum">{{detail.list.cloudTotalFee==null?'0':detail.list.cloudTotalFee / 100}}</view>
</view>
<view class="flex justify-between list-view">
<view class="staName">电池服务费</view>
<view class="staNum">{{detail.list.batTotalFee==null?'0':detail.list.batTotalFee / 100}}</view>
</view>
<view class="flex padding-lr-sm justify-between list-view">
<view class="staName">充电服务总费用</view>
<view class="staNum">{{detail.list.chargeTotalFee==null?'0':detail.list.chargeTotalFee / 100}}
<view class="flex padding-lr-sm justify-between flex-wrap list-view">
<view class="staName">场站编码 </view>
<view class="staNum">{{detail.list.stationNo==null?'--':detail.list.stationNo}}</view>
</view>
<view class="flex justify-between flex-wrap list-view">
<view class="staName">充电订单号 </view>
<view class="staNum">{{detail.list.chargeOrder==null?'--':detail.list.chargeOrder}}</view>
</view>
<view class="flex justify-between list-view">
<view class="staName">车牌号 </view>
<view class="staNum">{{detail.list.vehicleNo==null?'--':detail.list.vehicleNo}}</view>
</view>
<view class="flex padding-lr-sm justify-between list-view">
<view class="staName">车辆vin</view>
<view class="staNum">{{detail.list.vin==null?'--':detail.list.vin}}</view>
</view>
<view class="flex padding-lr-sm justify-between list-view">
<view class="staName">充电结束时间</view>
<view class="staNum">{{detail.list.endTime==null?'--':detail.list.endTime}}</view>
</view>
<view class="flex padding-lr-sm justify-between list-view">
<view class="staName">充电时长</view>
<view class="staNum">{{detail.list.chargingTime==null?'--':detail.list.chargingTime}} 分钟</view>
</view>
</view>
<view class="flex padding-sm justify-between flex-wrap">
<view class="titleName">费用合计</view>
<view class="money text-price">{{detail.list.totalFee==null?'0':detail.list.totalFee / 100}}</view>
</view>
</view>
</view>
<view class="btn_pay" v-if="detail.list.orderStatus == 4">
<button style="font-size: 14px;" type="primary" @click="handle_pay"></button>
</view>
<!-- <view class="btn_pay" v-if="detail.list.payStatus == 2">
<button style="font-size: 14px;" type="primary" @click="pay_handle_refund">退</button>
</view> -->
</view>
</template>
@ -188,6 +148,13 @@
})
}
const pay_handle_invoice = () => {
sheep.$router.go('/pagesCenter/billingPage/addInvoice/addInvoice', {
orderNo: detail.list.id,
orderType: 2,
});
}
const handle_pay_money = async (e) => {
sheep.$router.go('/pagesCenter/pay/index', {
id: e.payOrderId,
@ -300,4 +267,50 @@
top: 50%;
transform: translateY(-50%);
}
//
.title_tops {
height: 260rpx;
background: #0aca46;
display: flex;
align-items: center;
justify-content: center;
position: relative;
.status_title {
position: absolute;
left: 80rpx;
top: 10rpx;
font-size: 14px;
color: #fff;
}
}
.line_center {
width: 90%;
height: 20rpx;
background: #08ab40;
position: relative;
// border-radius: 10rpx;
.white_box {
width: 95%;
// height: 400rpx;
padding: 15rpx;
background: #fff;
position: absolute;
top: 10rpx;
left: 50%;
transform: translate(-50%);
box-shadow:
0px 1.4px 1.2px rgba(0, 0, 0, 0.017),
0px 3.4px 2.9px rgba(0, 0, 0, 0.024),
0px 6.4px 5.5px rgba(0, 0, 0, 0.03),
0px 11.4px 9.8px rgba(0, 0, 0, 0.036),
0px 21.3px 18.4px rgba(0, 0, 0, 0.043),
0px 51px 44px rgba(0, 0, 0, 0.06);
border-bottom-left-radius: 15rpx;
border-bottom-right-radius: 15rpx;
}
}
</style>

@ -0,0 +1,313 @@
<template>
<view class="content">
<view class="cu-card article" style="position: relative;">
<view class="cu-item shadow">
<view class="padding-sm justify-between">
<view class="refunded_0" v-if="detail.list.orderStatus == 0">
初始化
</view>
<view class="refunded_1" v-if="detail.list.orderStatus == 1">
充电中
</view>
<view class="refunded_3" v-if="detail.list.orderStatus == 2">
启动充电失败
</view>
<view class="refunded_2" v-if="detail.list.orderStatus == 3">
结束充电
</view>
<view class="refunded_1" v-if="detail.list.orderStatus == 4">
待支付
</view>
<view class="refunded_2" v-if="detail.list.orderStatus == 5">
(已完成)支付完成
</view>
<view class="refunded_3" v-if="detail.list.orderStatus == 6">
支付失败
</view>
<view class="refunded_4" v-if="detail.list.orderStatus == 7">
已退款
</view>
<view class="refunded_5" v-if="detail.list.orderStatus == 8">
已挂起
</view>
<view class="refunded_6" v-if="detail.list.orderStatus == 9">
已关闭
</view>
</view>
</view>
</view>
<view class="cu-card article">
<view class="cu-item shadow">
<view class="flex justify-between flex-wrap padding-sm">
<view class="name">{{detail.list.stationName==null?'--':detail.list.stationName}}</view>
</view>
<view class="flex padding-lr-sm justify-between flex-wrap list-view">
<view class="staName">场站编码 </view>
<view class="staNum">{{detail.list.stationNo==null?'--':detail.list.stationNo}}</view>
</view>
<view class="flex justify-between flex-wrap list-view">
<view class="staName">充电订单号 </view>
<view class="staNum">{{detail.list.chargeOrder==null?'--':detail.list.chargeOrder}}</view>
</view>
<view class="flex justify-between list-view">
<view class="staName">车牌号 </view>
<view class="staNum">{{detail.list.vehicleNo==null?'--':detail.list.vehicleNo}}</view>
</view>
<view class="flex padding-lr-sm justify-between list-view">
<view class="staName">车辆vin</view>
<view class="staNum">{{detail.list.vin==null?'--':detail.list.vin}}</view>
</view>
<view class="flex padding-lr-sm justify-between list-view">
<view class="staName">充电开始时间</view>
<view class="staNum">{{detail.list.startTime==null?'--':detail.list.startTime}}</view>
</view>
<view class="flex padding-lr-sm justify-between list-view">
<view class="staName">充电结束时间</view>
<view class="staNum">{{detail.list.endTime==null?'--':detail.list.endTime}}</view>
</view>
<view class="flex padding-lr-sm justify-between list-view">
<view class="staName">充电时长</view>
<view class="staNum">{{detail.list.chargingTime==null?'--':detail.list.chargingTime}} 分钟</view>
</view>
<view class="flex padding-lr-sm justify-between list-view">
<view class="staName">总电量 </view>
<view class="staNum">{{detail.list.totalElectricity==null?'0':detail.list.totalElectricity}}kW·h
</view>
</view>
<view class="flex justify-between list-view">
<view class="staName">电价费用</view>
<view class="staNum">{{detail.list.elecTotalExpense==null?'0':detail.list.elecTotalExpense / 100}}
</view>
</view>
<view class="flex justify-between list-view">
<view class="staName">平台服务费</view>
<view class="staNum">{{detail.list.cloudTotalFee==null?'0':detail.list.cloudTotalFee / 100}}</view>
</view>
<view class="flex justify-between list-view">
<view class="staName">电池服务费</view>
<view class="staNum">{{detail.list.batTotalFee==null?'0':detail.list.batTotalFee / 100}}</view>
</view>
<view class="flex padding-lr-sm justify-between list-view">
<view class="staName">充电服务总费用</view>
<view class="staNum">{{detail.list.chargeTotalFee==null?'0':detail.list.chargeTotalFee / 100}}
</view>
</view>
<view class="flex padding-sm justify-between flex-wrap">
<view class="titleName">费用合计</view>
<view class="money text-price">{{detail.list.totalFee==null?'0':detail.list.totalFee / 100}}</view>
</view>
</view>
</view>
<view class="btn_pay" v-if="detail.list.orderStatus == 4">
<button style="font-size: 14px;" type="primary" @click="handle_pay"></button>
</view>
<!-- <view class="btn_pay" v-if="detail.list.payStatus == 2">
<button style="font-size: 14px;" type="primary" @click="pay_handle_refund">退</button>
</view> -->
<view class="btn_pay" v-if="detail.list.invoiceFlag == null || detail.list.invoiceFlag == 0">
<button style="font-size: 14px;" type="primary" @click="pay_handle_invoice"></button>
</view>
</view>
</template>
<script setup>
import config from '@/common/config/config.js';
import sheep from '@/sheep';
import {
reactive,
ref,
} from "vue";
import {
onLoad,
onShow,
onUnload
} from "@dcloudio/uni-app";
import {
useCounterStore
} from '@/stores/counter.js';
const detail = reactive({
list: []
})
const timer = ref(null)
const isorderStatus = ref(false)
onLoad((options) => {
var station = JSON.parse(options.details);
detail.list = station
})
onShow(() => {})
onUnload(() => {
})
const charging_data = ref({})
const istipsonly = ref(0)
const handle_pay = async () => {
await uni.request({ //token
url: config.baseUrl + "app-api/cloud/outCharge/createPayOrder/" + detail.list.id,
method: 'GET',
header: {
'Content-Type': 'application/x-www-form-urlencoded',
'Authorization': 'Bearer ' + uni.getStorageSync('token'),
'tenant-id': 1
}
}).then(res => {
console.log(res, '支付信息')
if (res.data.code == 0) {
handle_pay_money(res.data.data)
} else {
uni.showModal({
title: '提示',
content: res.data.msg,
showCancel: false,
success: function(res) {
}
});
}
})
}
const pay_handle_refund = async () => {
await uni.$request({ //token
url: config.baseUrl + "app-api/cloud/refund-order/create",
method: 'POST',
data: {
orderNo: detail.list.orderNo,
refundPrice: detail.list.totalFee / 100,
type: 1
}
}).then(res => {
if (res.data.code == 0) {
uni.showToast({
title: '申请成功',
duration: 2000,
icon: 'success'
});
}
})
}
const pay_handle_invoice = () => {
sheep.$router.go('/pagesCenter/billingPage/addInvoice/addInvoice', {
orderNo: detail.list.id,
orderType: 2,
});
}
const handle_pay_money = async (e) => {
sheep.$router.go('/pagesCenter/pay/index', {
id: e.payOrderId,
orderType: 'recharge',
});
}
</script>
<style lang="scss" scoped>
.content {
height: 100vh;
background: #F7F8FA;
position: relative;
}
.cu-card.article>.cu-item {
padding-bottom: 0rpx;
}
.payState {
color: #4C91FF;
font-size: 39rpx;
}
.non-payment {
color: #FF7B0E;
font-size: 39rpx;
}
.refunded_0 {
color: #06efef;
font-size: 39rpx;
}
.refunded_1 {
color: #00aaff;
font-size: 39rpx;
}
.refunded_2 {
color: #00aa00;
font-size: 39rpx;
}
.refunded_3 {
color: #aa0000;
font-size: 39rpx;
}
.refunded_4 {
color: #ffff00;
font-size: 39rpx;
}
.refunded_5 {
color: #55557f;
font-size: 39rpx;
}
.refunded_6 {
color: #aaaa7f;
font-size: 39rpx;
}
.name {
color: #333;
font-size: 39rpx;
font-weight: 400;
}
.titleName {
color: #808080;
font-size: 28rpx;
font-weight: 400;
}
.staName {
color: #808080;
font-size: 28rpx;
font-weight: 400;
}
.staNum {
color: #333333;
font-size: 28rpx;
font-weight: 400;
}
.money {
color: #4C91FF;
font-size: 32rpx;
font-weight: 600;
}
.list-view {
padding: 0rpx 20rpx 20rpx 20rpx;
}
.btn_pay {
// width: 100%;
position: absolute;
bottom: 20rpx;
right: 0;
padding: 0 30rpx;
}
.posi_loading {
position: absolute;
right: 50rpx;
top: 50%;
transform: translateY(-50%);
}
</style>

@ -109,6 +109,9 @@
<view class="btn_pay" v-if="detail.list.payStatus == 1">
<button style="font-size: 14px;" type="primary" @click="pay_handle"></button>
</view>
<view class="btn_pay" v-if="detail.list.invoiceFlag == null || detail.list.invoiceFlag == 0">
<button style="font-size: 14px;" type="primary" @click="pay_handle_invoice"></button>
</view>
<!-- <view class="btn_pay" v-if="detail.list.payStatus == 2">
<button style="font-size: 14px;" type="primary" @click="pay_handle_refund">退</button>
</view> -->
@ -145,6 +148,14 @@
onShow(() => {
isDetail.value = true
})
const pay_handle_invoice = () => {
sheep.$router.go('/pagesCenter/billingPage/addInvoice/addInvoice', {
orderNo: detail.list.id,
orderType: 1,
});
}
const pay_handle = async () => {
await uni.request({ //token
url: config.baseUrl + "app-api/cloud/swapOrder/createPayOrder",

@ -115,9 +115,9 @@
</view>
<view class="flex padding-tb-sm justify-between" @click="goAddinvoice">
<view class="flex">
<uv-icon name="setting" color="#2cc06c" size="20"></uv-icon>
<uv-icon name="file-text" color="#2cc06c" size="20"></uv-icon>
<!-- <view class="titleFont">其他设置</view> -->
<view class="titleFont"></view>
<view class="titleFont">记录</view>
</view>
<view><text class="lg text-gray cuIcon-right padding-top-xs"></text></view>
</view>
@ -251,7 +251,7 @@
return;
} else {
uni.navigateTo({
url: '/pagesCenter/billingPage/addInvoice/addInvoice'
url: '/pagesCenter/billingPage/billingRecord/billingRecord'
})
}
// else if (realNameAuthFlag.value != 1) {

@ -184,10 +184,15 @@
trigger: ['blur', 'change']
}
}
const orderNo =ref(null)
const orderType =ref(null)
//
onLoad((option) => {
// console.log(option, 'option');
orderNo.value = option.orderNo
orderType.value = option.orderType
// if (option.detail) {
// let detail = JSON.parse(option.detail)
// model1.userInfo.invoiceHeader = detail.invoiceHeader
@ -214,7 +219,7 @@
// updataId.value = detail.id
// console.log('JSON.parse(option.detail)', JSON.parse(option.detail));
// }
handle_start_access_token()
// handle_start_access_token()
})
//
watch(checked, (newVal, oldVal) => {
@ -303,10 +308,10 @@
// model1.userInfo.cardNo = ''
// }
let data = {
orderNo: 12,
orderNo: orderNo.value,
invoiceStatus: 0,
type: checked.value,
orderType: 1,
orderType: orderType.value,
// 1
invoiceTitle: model1.userInfo.invoiceTitle,
dutyNumber: model1.userInfo.dutyNumber,
@ -321,13 +326,22 @@
method: 'POST',
data: data,
}).then(res => {
uni.$u.toast(res.data.msg)
if(res.data.code == 0) {
uni.$u.toast('申请成功')
} else {
uni.$u.toast(res.data.msg)
}
setTimeout(function() {
uni.navigateBack({
delta: 1,
});
}, 500)
// console.log(res.data.msg, '=======?');
// setTimeout(function() {
// uni.navigateBack({
// delta: 1,
// });
// }, 500)
console.log(res.data.msg, '=======?');
})
}).catch((error) => {

@ -1,8 +1,17 @@
<template>
<view class="invoice">
<view class="select">
<view class="day-inf" @click="getMouth">
{{chooseDay}}
<view class="day-inf" @click="getMouth_start">
开始:
{{start_chooseDay}}
<view class="unfold-img">
<text class="lg text-gray cuIcon-unfold"></text>
</view>
</view>
<view style="font-size: 12px;"></view>
<view class="day-inf" @click="getMouth_end">
结束:
{{end_chooseDay}}
<view class="unfold-img">
<text class="lg text-gray cuIcon-unfold"></text>
</view>
@ -13,45 +22,49 @@
<view class="content-first">
<view class="active-check">
<view>
<view class="station-time">{{item.createTime}}</view>
<view class="station-name">换电消费</view>
<view class="station-time">{{formatTimestamp(item.createTime)}}</view>
<view class="station-name">{{item.orderType == 1? '换电订单': '站外充电订单' }}</view>
</view>
</view>
<view>
<view class="orders-price">{{item.invoiceAmount}}</view>
<view class="orders-price">{{item.actualPay / 100}}</view>
</view>
</view>
<view class="content-second">
<view>
<!-- progress content-state-orange content-state-blue content-state-red content-state-green ,'开票中','开票完成','邮寄中'-->
<view
:class="{'content-state':true, 'content-state-orange':item.progress==0,'content-state-blue':item.progress==2,'content-state-red':item.progress==1,'content-state-green':item.progress==3}">
{{['未审核','审核失败','审核成功','重开待审核'][item.progress==null?'':item.progress]}}
:class="{'content-state':true, 'content-state-orange':item.invoiceStatus==1,'content-state-blue':item.invoiceStatus==2,'content-state-red':item.invoiceStatus==0}">
{{['未开票','开票中','开票完成'][item.invoiceStatus==null?'':item.invoiceStatus]}}
</view>
</view>
<!-- 取消开票 -->
<view class="invoice-state">
<view @click="cancelContinue(item)" v-if="item.progress==0"></view>
<!-- <view @click="cancelContinue(item)" v-if="item.progress==0"></view> -->
<view class="invoice-detail" @click="goinvoiceDetail(item)"></view>
</view>
</view>
</view>
</view>
<u-datetime-picker v-model="chooseValue" mode="year-month" :show="timeShow" @confirm="confirm" @cancel="cancel"
<!-- <u-datetime-picker v-model="chooseValue" mode="year-month" :show="timeShow" @confirm="confirm" @cancel="cancel"
:immediateChange='true'>
</u-datetime-picker>
</u-datetime-picker> -->
<uv-datetime-picker ref="start_datetimePicker" v-model="start_chooseValue" mode="date" @confirm="confirm_start">
</uv-datetime-picker>
<uv-datetime-picker ref="end_datetimePicker" v-model="start_chooseValue" mode="date" @confirm="confirm_end">
</uv-datetime-picker>
<u-modal :show="show" title="取消确认" :showCancelButton="true" @confirm="modalConfirm" @cancel="modalCancel"
confirmText="确定">
<view class="model-inf">是否确定取消开票</view>
</u-modal>
</view>
<view v-if="orderData.orderList == null || orderData.orderList.length == 0">
<!-- <view v-if="orderData.orderList == null || orderData.orderList.length == 0">
<view class="nonePage">
<view class="noneBg">
</view>
</view>
</view>
</view> -->
</template>
<script setup>
@ -70,9 +83,13 @@
onPullDownRefresh
} from "@dcloudio/uni-app";
const show = ref(false);
const chooseValue = ref(Date.now());
const start_datetimePicker = ref(null)
const end_datetimePicker = ref(null)
const start_chooseValue = ref();
const end_chooseValue = ref();
const timeShow = ref(false)
const chooseDay = ref()
const start_chooseDay = ref()
const end_chooseDay = ref()
const orderData = reactive({ //
orderList: [],
orderAskIng: []
@ -83,10 +100,11 @@
//
onShow(async () => {
chooseDay.value = await getDay(0) //
start_chooseDay.value = getDay(0)
end_chooseDay.value = getDay(0)
page.value = 1
console.log(chooseDay.value);
await getOrder(0, chooseDay.value)
// console.log(chooseDay.value);
await getOrder(0, 0)
})
onReachBottom(async () => {
if (page.value < totalPages.value) {
@ -97,7 +115,7 @@
uni.$u.toast('没有更多啦');
}
})
onPullDownRefresh(async () => {
onPullDownRefresh(async () => {
// chooseDay.value = await getDay(0)
page.value = 1
getOrder(0, chooseDay.value)
@ -113,7 +131,7 @@ onPullDownRefresh(async () => {
cancelId.value,
method: 'DELETE'
}).then(res => {
console.log(res, '==========>');
// console.log(res, '==========>');
uni.$u.toast(res.data.msg)
getOrder(0, chooseDay.value)
}).catch((err) => {
@ -128,30 +146,47 @@ onPullDownRefresh(async () => {
show.value = false
}
const confirm = () => {
const confirm = (data) => {
setTimeout(() => {
let n = new Date(chooseValue._rawValue)
let year = n.getFullYear()
let month = n.getMonth() + 1
console.log('month: ', month, toString.call(month));
month = month < 10 ? ('0' + month) : month
let res = year + '-' + month
chooseDay.value = res
timeShow.value = false
if (data == 1) {
}
page.value = 1 //
getOrder(0, res)
}, 500)
}
const confirm_start = (response) => {
// console.log(value,'value')
start_chooseDay.value = formatTimestamp(response.value)
getOrder(0, 2)
}
const confirm_end = (response) => {
// console.log(value,'value')
end_chooseDay.value = formatTimestamp(response.value)
getOrder(0, 2)
}
const getOrder = async (type, data) => {
// console.log(new Date(data).getTime())
let config_url = ''
let params = {
pageNo: page.value,
pageSize: 10
}
if (data != 0 && start_chooseDay.value != '' && end_chooseDay.value != '') {
params.startTime = start_chooseDay.value
params.endTime = end_chooseDay.value
}
await uni.$request({
url: config.wxUrl_pay + 'pay/invoice/list?pageNo=' +
page.value + "&pageSize=" + 10 + "&date=" + data
url: config.baseUrl + 'app-api/cloud/invoice/page',
data: params
}).then(res => {
console.log(res, '==========>');
// console.log(res, '==========>');
if (type == 1) {
orderData.orderAskIng = res.data.data.data //
orderData.orderAskIng = res.data.data.list //
} else {
orderData.orderList = res.data.data.data //
orderData.orderList = res.data.data.list //
}
totalPages.value = res.data.data.total //
}).catch((err) => {
@ -162,6 +197,23 @@ onPullDownRefresh(async () => {
});
})
}
const formatTimestamp = (timestamp) => {
// Date
const date = new Date(timestamp);
//
const year = date.getFullYear();
const month = String(date.getMonth() + 1).padStart(2, '0'); // 0 1
const day = String(date.getDate()).padStart(2, '0');
const hours = String(date.getHours()).padStart(2, '0');
const minutes = String(date.getMinutes()).padStart(2, '0');
const seconds = String(date.getSeconds()).padStart(2, '0');
//
return `${year}-${month}-${day}`;
// return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
}
const goInvoiceInf = () => {
uni.navigateTo({
url: '../invoiceInf/invoiceInf'
@ -176,14 +228,20 @@ onPullDownRefresh(async () => {
url: '../invoiceDetail/invoiceDetail?detail=' + JSON.stringify(e)
})
}
const getMouth = () => {
timeShow.value = true
const getMouth_start = () => {
// timeShow.value = true
start_datetimePicker.value.open()
}
const getMouth_end = () => {
// timeShow.value = true
end_datetimePicker.value.open()
}
const cancel = () => {
timeShow.value = false
}
const getDay = (day) => {
var today = new Date();
// console.log(today, 'today')
var targetday_milliseconds = today.getTime() + 1000 * 60 * 60 * 24 * day;
today.setTime(targetday_milliseconds);
var tYear = today.getFullYear();
@ -191,8 +249,8 @@ onPullDownRefresh(async () => {
var tDate = today.getDate();
tMonth = doHandleMonth(tMonth + 1);
tDate = doHandleMonth(tDate);
// return tYear + "-" + tMonth + "-" + tDate;
return tYear + "-" + tMonth;
return tYear + "-" + tMonth + "-" + tDate;
// return tYear + "-" + tMonth;
}
const doHandleMonth = (month) => {
var m = month;

@ -4,62 +4,64 @@
<view class="">开票状态</view>
<view class="price">
<!-- <view class="invoice-state">开票成功</view> -->
<view :class="{'invoice-state':true, 'content-state-orange':progressVal==0,'content-state-blue':progressVal==2,'content-state-red':progressVal==1,'content-state-green':progressVal==3}">
{{['未审核','审核失败','审核成功','重开待审核'][progressVal==null?'':progressVal]}}
<view
:class="{'invoice-state':true, 'content-state-orange':model1.userInfo.invoiceStatus==1,'content-state-blue':model1.userInfo.invoiceStatus==2,'content-state-red':model1.userInfo.invoiceStatus==0}">
{{['未开票','开票中','开票完成'][model1.userInfo.invoiceStatus==null?'':model1.userInfo.invoiceStatus]}}
</view>
</view>
</view>
<view class="from-box">
<u--form labelPosition="left">
<view class="line line-icon ">
<u-form-item label="发票抬头" prop="userInfo.invoiceHeader" borderBottom ref="item1"
<u-form-item label="发票抬头" prop="userInfo.invoiceTitle" borderBottom ref="item1"
@click="goinvoiceTitle">
<u--input disabled v-model="model1.userInfo.invoiceHeader" border="none" inputAlign='right'
<u--input disabled v-model="model1.userInfo.invoiceTitle" border="none" inputAlign='right'
placeholder=""></u--input>
</u-form-item>
</view>
<view v-if="checked==1">
<view class="line">
<u-form-item label="税号" prop="userInfo.taxId" borderBottom ref="item1">
<u--input disabled v-model="model1.userInfo.taxId" border="none" inputAlign='right'
placeholder=""></u--input>
</u-form-item>
</view>
<view class="line">
<u-form-item label="注册地址" prop="userInfo.address" borderBottom ref="item1">
<u--input disabled v-model="model1.userInfo.address" border="none" inputAlign='right'
placeholder=""></u--input>
</u-form-item>
</view>
<view class="line">
<u-form-item label="公司开户行" prop="userInfo.bank" borderBottom ref="item1">
<u--input disabled v-model="model1.userInfo.bank" border="none" inputAlign='right' placeholder="">
</u--input>
</u-form-item>
</view>
<view class="line">
<u-form-item label="开户行账户" prop="userInfo.cardNo" borderBottom ref="item1">
<u--input disabled v-model="model1.userInfo.cardNo" border="none" inputAlign='right'
placeholder=""></u--input>
</u-form-item>
</view>
<view class="line">
<u-form-item label="税号" prop="userInfo.dutyNumber" borderBottom ref="item1">
<u--input disabled v-model="model1.userInfo.dutyNumber" border="none" inputAlign='right'
placeholder=""></u--input>
</u-form-item>
</view>
<view class="line">
<u-form-item label="注册地址" prop="userInfo.registeredAddress" borderBottom ref="item1">
<u--input disabled v-model="model1.userInfo.registeredAddress" border="none"
inputAlign='right' placeholder=""></u--input>
</u-form-item>
</view>
<view class="line">
<u-form-item label="公司开户行" prop="userInfo.bankOfDeposit" borderBottom ref="item1">
<u--input disabled v-model="model1.userInfo.bankOfDeposit" border="none" inputAlign='right'
placeholder="">
</u--input>
</u-form-item>
</view>
<view class="line">
<u-form-item label="开户行账户" prop="userInfo.openBankAccount" borderBottom ref="item1">
<u--input disabled v-model="model1.userInfo.openBankAccount" border="none"
inputAlign='right' placeholder=""></u--input>
</u-form-item>
</view>
</view>
<view class="line ">
<u-form-item label="发票金额" prop="userInfo.money" borderBottom ref="item1">
<u--input disabled v-model="model1.userInfo.money" border="none" inputAlign='right' placeholder=""
color="#4C91FF"></u--input>
<u-form-item label="发票金额" prop="userInfo.actualPay" borderBottom ref="item1">
<u--input disabled v-model="model1.userInfo.actualPay" border="none" inputAlign='right'
placeholder="" color="#4C91FF"></u--input>
</u-form-item>
</view>
<view class="">
<u-form-item label="申请时间" prop="userInfo.time" borderBottom ref="item1">
<u--input disabled v-model="model1.userInfo.time" border="none" inputAlign='right'
<u-form-item label="申请时间" prop="userInfo.createTime" borderBottom ref="item1">
<u--input disabled v-model="model1.userInfo.createTime" border="none" inputAlign='right'
placeholder=""></u--input>
</u-form-item>
</view>
</u--form>
</view>
<!-- 邮寄信息 -->
<view class="content-title">
<!-- <view class="content-title">
<view class="content-name">
<view class="orders-line"></view>
<view>邮寄信息</view>
@ -87,17 +89,17 @@
</view>
</u--form>
</view>
<view class="from-box amount">
</view> -->
<!-- <view class="from-box amount">
<view class="">电子邮箱</view>
<view class="">
<u--input disabled v-model="model2.userInfo2.email" border="none" inputAlign='right'></u--input>
</view>
</view>
</view> -->
<!-- position bottom -->
<view class="footer-box">
<view class="check">
<u-button color="#4C91FF" :plain="true" shape='circle' @click="goBillingOrder"></u-button>
<view class="check" v-if="model1.userInfo.filePath != '' && model1.userInfo.filePath != null">
<u-button color="#4C91FF" :plain="true" shape='circle' @click="goBillingOrder">PDF</u-button>
</view>
<!-- <view>
<u-button color="#4C91FF" shape='circle' @click="www"></u-button>
@ -120,11 +122,15 @@
//
const model1 = reactive({
userInfo: {
invoiceHeader: '',
taxId: '',
address: '',
bank: '',
cardNo: '',
invoiceStatus: '',
filePath: '',
invoiceTitle: '',
dutyNumber: '',
registeredAddress: '',
bankOfDeposit: '',
openBankAccount: '',
actualPay: '',
createTime: ''
}
})
const model2 = reactive({
@ -135,33 +141,69 @@
email: '',
}
})
const progressVal=ref()
const inId=ref()
const checked=ref()
const progressVal = ref()
const inId = ref()
const checked = ref()
//
onLoad((option) => {
let detail = JSON.parse(option.detail)
inId.value=detail.id
progressVal.value=detail.progress
model1.userInfo.invoiceHeader = detail.invoiceHeader
model1.userInfo.taxId = detail.taxId
model1.userInfo.address = detail.address
model1.userInfo.bank = detail.bank
model1.userInfo.cardNo = detail.cardNo
model1.userInfo.money = detail.invoiceAmount + '元'
model1.userInfo.time = detail.createTime
model2.userInfo2.address = detail.shippingAddress
model2.userInfo2.phone = detail.contactPhone
model2.userInfo2.contacts = detail.recipient
model2.userInfo2.email = detail.email
checked.value=detail.type
console.log(option, 'option', detail);
// console.log(detail,'')
model1.userInfo.invoiceStatus = detail.invoiceStatus
model1.userInfo.filePath = detail.filePath
model1.userInfo.invoiceTitle = detail.invoiceTitle
model1.userInfo.dutyNumber = detail.dutyNumber
model1.userInfo.registeredAddress = detail.registeredAddress
model1.userInfo.bankOfDeposit = detail.bankOfDeposit
model1.userInfo.openBankAccount = detail.openBankAccount
model1.userInfo.actualPay = detail.actualPay / 100
model1.userInfo.createTime = formatTimestamp(detail.createTime)
checked.value = detail.type
// console.log(option, 'option', detail);
})
//
const goBillingOrder = () => {
uni.navigateTo({
url: '../billingOrder/billingOrder?id='+inId.value
})
// uni.navigateTo({
// url: '../billingOrder/billingOrder?id=' + inId.value
// })
uni.downloadFile({
url: 'https://www.zzpower.net/admin-api/infra/file/4/get/' + model1.userInfo.filePath,
success: function(res) {
// console.log(res, 'res')
var filePath = res.tempFilePath;
uni.openDocument({
filePath: filePath,
fileType: 'pdf',
showMenu: true,
success: function(res) {
// console.log('');
},
fail: function(error) {
// console.log(error,'')
uni.showToast({
title: '文件错误',
duration: 2000,
icon: 'error'
});
}
});
}
});
}
const formatTimestamp = (timestamp) => {
// Date
const date = new Date(timestamp);
//
const year = date.getFullYear();
const month = String(date.getMonth() + 1).padStart(2, '0'); // 0 1
const day = String(date.getDate()).padStart(2, '0');
const hours = String(date.getHours()).padStart(2, '0');
const minutes = String(date.getMinutes()).padStart(2, '0');
const seconds = String(date.getSeconds()).padStart(2, '0');
//
return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
}
</script>
@ -270,9 +312,11 @@
margin-left: 8rpx;
}
}
.line-last {
.line-last {
border-bottom: 1px solid #eee;
}
.line-last:last-child {
border: 0;
}
@ -289,22 +333,26 @@
.check {
margin-right: 24rpx;
}
.content-state-orange {
border: 1px solid #FF7B0E;
color: #FF7B0E;
}
.content-state-blue {
border: 1px solid #4C91FF;
color: #4C91FF;
}
.content-state-red {
border: 1px solid #F2634F;
color: #F2634F;
}
.content-state-green {
border: 1px solid #26C3C0;
color: #26C3C0;
}
border: 1px solid #FF7B0E;
color: #FF7B0E;
}
.content-state-blue {
border: 1px solid #4C91FF;
color: #4C91FF;
}
.content-state-red {
border: 1px solid #F2634F;
color: #F2634F;
}
.content-state-green {
border: 1px solid #26C3C0;
color: #26C3C0;
}
</style>
<style lang="less">
page {

@ -197,31 +197,31 @@
if (option.orderType == 1) {
orderTypeVal.value = option.orderType
}
console.log(option.price, option.list, '--------', orderTypeVal.value);
uni.$request({
url: config.wxUrl_pay + "pay/invoice/selectDefault",
}).then(res => {
// uni.$u.toast(res.data.msg)
if (res.data.data) {
model1.userInfo.invoiceHeader = res.data.data.invoiceHeader
model1.userInfo.taxId = res.data.data.taxId
model1.userInfo.address = res.data.data.address
model1.userInfo.bank = res.data.data.bank
model1.userInfo.cardNo = res.data.data.cardNo
model2.userInfo2.address = res.data.data.shippingAddress
model2.userInfo2.phone = res.data.data.contactPhone
model2.userInfo2.contacts = res.data.data.recipient
email.value = res.data.data.email
if (res.data.data.type == 1) {
isChecked.value = 0
checked.value = 1
} else {
isChecked.value = 1
checked.value = 2
}
}
console.log(res, '默认地址');
// console.log(option.price, option.list, '--------', orderTypeVal.value);
// uni.$request({
// url: config.wxUrl_pay + "pay/invoice/selectDefault",
// }).then(res => {
// // uni.$u.toast(res.data.msg)
// if (res.data.data) {
// model1.userInfo.invoiceHeader = res.data.data.invoiceHeader
// model1.userInfo.taxId = res.data.data.taxId
// model1.userInfo.address = res.data.data.address
// model1.userInfo.bank = res.data.data.bank
// model1.userInfo.cardNo = res.data.data.cardNo
// model2.userInfo2.address = res.data.data.shippingAddress
// model2.userInfo2.phone = res.data.data.contactPhone
// model2.userInfo2.contacts = res.data.data.recipient
// email.value = res.data.data.email
// if (res.data.data.type == 1) {
// isChecked.value = 0
// checked.value = 1
// } else {
// isChecked.value = 1
// checked.value = 2
// }
// }
// console.log(res, '');
})
})
onShow((e) => {

@ -117,8 +117,8 @@
})
const tips = ref('获取验证码')
const form_login = ref({
mobile: '',
password: '',
mobile: '17625813248',
password: '123456',
// mobile: '',
// password: '',
code: ''

Loading…
Cancel
Save