Explorar el Código

修改跳转

yxb
DESKTOP-2IO5MST\huting hace 1 año
padre
commit
d6ca997740

+ 2
- 1
subpackage/after-sale/activation/activate.vue Ver fichero

@@ -45,6 +45,7 @@
} from "vue";
import {
formatTime,
formatTime2,
expireDate,
expireDate2,
getFormatDate,
@@ -491,7 +492,7 @@
brand: "3",
model: "0",
enableTime: formatTime(new Date()),
expireTime: formatTime(new Date()),
expireTime: formatTime2(new Date()),
accountOrganization: "",
accountCardNo: "",
cosRecordId: "",

+ 29
- 45
subpackage/after-sale/transfer-page.vue Ver fichero

@@ -11,10 +11,9 @@
} from "@/utils/utils"
import {
orderList,
workOrderList,
userInfoQuery,
searchVehicleInfo,
silentLoginApi
silentLoginApi,
selectCarInfo
} from "@/utils/network/api.js";
import {
getItem,
@@ -28,6 +27,7 @@
stringToJson
} from "@/utils/network/encryption";
import { msg } from "@/utils/utils";
import { vehiclePlateColorPai } from "@/datas/vehiclePlateColor.js";
const state = reactive({
type: "",
name: "",
@@ -150,25 +150,13 @@
} else if (state.type == "9" && state.name == '解除车牌占用') {
navTo('/subpackage/after-sale/rescind-carId/rescind-carId-select')
} else if (state.type == "20") {
uni.switchTab({
url: "/pages/user/user"
queryCarMsg().then((item) => {
console.log("item", item.vehicleManages)
const params = encodeURIComponent(JSON.stringify(item.vehicleManages[0]))
uni.navigateTo({
url: `/subpackage/personal-center/car-details?params=${params}`
})
})
// searchVehicleInfoQuery().then((item : any) => {
// console.log("====", item.vehicles[0])
// state.customerId = item.vehicles[0]['customerId']
// state.vehiclePlate = item.vehicles[0]['vehiclePlate']
// state.vehiclePlateColor = item.vehicles[0]['vehiclePlateColor']
// isWorkOrder().then((item : any) => {
// console.log("查询是否有工单", item)
// if (item.data) {
// if (item.data[0]['status'] == '0') {
// navTo(`/subpackage/after-sale/equipment-upgrade/upgrade-confirm?id=${state.id}&workId=${item.data[0]['id']}`)
// }
// } else {
// msg('暂无工单')
// }
// })
// })
} else if (state.type == "21") {
navTo(`/subpackage/after-sale/additional-equipment/additional-equipment-confirm?id=${state.id}`)
} else if (state.type == "22") {
@@ -196,7 +184,11 @@
var vehiclePlateColor = state.vehicleId.split("_")[1]
navTo(`/subpackage/after-sale/blacklist-query/list?vehiclePlate=${vehiclePlate}&vehiclePlateColor=${vehiclePlateColor}`)
} else if (state.type == "31") {
navTo(`/subpackage/orders/invoiceApply/Invoice-mannager`)
if (state.name == "服务发票") {
navTo(`/subpackage/orders/invoiceApply/invoice-content?type=1`)
} else {
navTo(`/subpackage/orders/invoiceApply/invoice-content?type=2`)
}
} else if (state.type == "32") {
navTo(`/subpackage/after-sale/month-statement/month-statement-query-list?vehicleId=${state.vehicleId}`)
} else if (state.type == "33") {
@@ -206,42 +198,34 @@
}
}

const searchVehicleInfoQuery = () => {

// 查询车辆信息
const queryCarMsg = () => {
const options = {
type: 2,
data: {
vehicleId: state.vehicleId
"openId": getItem('openId'),
"vehicleId": state.vehicleId
},
method: "POST",
showLoading: true,
};
return new Promise(async (resolve, reject) => {
const res = await request(searchVehicleInfo, options);
const data = stringToJson(res.bizContent);
resolve(data);
}).catch((error) => {
reject(error);
});
}
const isWorkOrder = () => {
var data = {
vehiclePlate: state.vehiclePlate,
vehiclePlateColor: state.vehiclePlateColor,
customerId: state.customerId,
};
const options = {
type: 2,
data: data,
method: "POST",
showLoading: true,
};
return new Promise(async (resolve, reject) => {
const res = await request(workOrderList, options);
const res = await request(selectCarInfo, options);
const data = stringToJson(res.bizContent);
for (var i = 0; i < data.length; i++) {
for (var j = 0; j < vehiclePlateColorPai.length; j++) {
if (data[i].vehiclePlateColor == vehiclePlateColorPai[j]['id']) {
data[i].color = vehiclePlateColorPai[j]['color']
data[i].showColor = vehiclePlateColorPai[j]['showColor']
}
}
}
resolve(data);
}).catch((error) => {
reject(error);
});

}
</script>


+ 34
- 10
subpackage/orders/invoiceApply/invoiceList.vue Ver fichero

@@ -21,13 +21,12 @@

<view class="listbox" v-if="state.data.length>0">
<view class="card-no-active" v-for="(item,index) in state.data">
<view class="head">
<!-- <image :src="`${$imgUrl}order/icon-star-green.png`" mode=""></image> -->
<!-- <text>新办订单</text> -->
</view>
<view class="content">
<view class="row">
开票日期:<text>{{item.invoiceDate}}</text>
订单类型:<text>{{item.invoiceTypeName}}</text>
</view>
<view class="row">
车牌号:<text>{{item.remarks}}</text>
</view>
<view class="row">
发票抬头:<text>{{item.buyerName}}</text>
@@ -35,9 +34,15 @@
<view class="row">
状态:<text>{{item.status==1?'正常':"红冲"}}</text>
</view>
<view class="row">
商品价:<text>¥{{item.goodsAmount}}</text>
</view>
<view class="row">
开票日期:<text>{{item.invoiceOpenTime}}</text>
</view>
</view>
<view class="btns">
<button @click="down(item.fileUrl)">开票</button>
<button @click="down(item.fileUrl)">下载</button>
</view>
</view>
<!-- <view class="bottom-line" v-if="state.flags">我是有底线的~~~</view> -->
@@ -127,10 +132,29 @@
const down = (fileUrl) => {
uni.downloadFile({
url: fileUrl, //仅为示例,并非真实的资源
success: (res) => {
if (res.statusCode === 200) {
console.log('下载成功');
msg("下载成功")
success: (data) => {
if (data.statusCode === 200) {
uni.saveFile({ //文件保存到本地
tempFilePath: data.tempFilePath, //临时路径
success: function (res) {
console.log("下载成功" + res.savedFilePath)
console.log(JSON.stringify(res))
uni.showToast({
icon: 'none',
mask: true,
title: '文件已保存!',
duration: 3000,
});
uni.openDocument({
//fileType: 'docx',
showMenu: true, //关键点,可以转发到微信
filePath: res.savedFilePath,
success: function (res) {
console.log('打开文档成功');
}
});
}
});
}
}
});

+ 6
- 0
subpackage/personal-center/consumption-record.vue Ver fichero

@@ -101,6 +101,12 @@
return;
}
}
if (state.vehiclePlateColor) {
if (!state.vehiclePlate) {
msg('请输入车牌')
return;
}
}
const options = {
type: 2,
data: {

+ 10
- 0
utils/utils.ts Ver fichero

@@ -404,6 +404,16 @@ export function formatTime(date : any) {

return `${[year, month, day].map(formatNumber).join('-')}T${[hour, minute, second].map(formatNumber).join(':')}`
}
export function formatTime2(date : any) {
const year = date.getFullYear() + 10
const month = date.getMonth() + 1
const day = date.getDate()
const hour = date.getHours()
const minute = date.getMinutes()
const second = date.getSeconds()

return `${[year, month, day].map(formatNumber).join('-')}T${[hour, minute, second].map(formatNumber).join(':')}`
}

//有效期时间格式化
export function expireDate(date : any) {

Cargando…
Cancelar
Guardar