DESKTOP-2IO5MST\huting 1 год назад
Родитель
Сommit
d6ca997740

+ 2
- 1
subpackage/after-sale/activation/activate.vue Просмотреть файл

} from "vue"; } from "vue";
import { import {
formatTime, formatTime,
formatTime2,
expireDate, expireDate,
expireDate2, expireDate2,
getFormatDate, getFormatDate,
brand: "3", brand: "3",
model: "0", model: "0",
enableTime: formatTime(new Date()), enableTime: formatTime(new Date()),
expireTime: formatTime(new Date()),
expireTime: formatTime2(new Date()),
accountOrganization: "", accountOrganization: "",
accountCardNo: "", accountCardNo: "",
cosRecordId: "", cosRecordId: "",

+ 29
- 45
subpackage/after-sale/transfer-page.vue Просмотреть файл

} from "@/utils/utils" } from "@/utils/utils"
import { import {
orderList, orderList,
workOrderList,
userInfoQuery, userInfoQuery,
searchVehicleInfo,
silentLoginApi
silentLoginApi,
selectCarInfo
} from "@/utils/network/api.js"; } from "@/utils/network/api.js";
import { import {
getItem, getItem,
stringToJson stringToJson
} from "@/utils/network/encryption"; } from "@/utils/network/encryption";
import { msg } from "@/utils/utils"; import { msg } from "@/utils/utils";
import { vehiclePlateColorPai } from "@/datas/vehiclePlateColor.js";
const state = reactive({ const state = reactive({
type: "", type: "",
name: "", name: "",
} else if (state.type == "9" && state.name == '解除车牌占用') { } else if (state.type == "9" && state.name == '解除车牌占用') {
navTo('/subpackage/after-sale/rescind-carId/rescind-carId-select') navTo('/subpackage/after-sale/rescind-carId/rescind-carId-select')
} else if (state.type == "20") { } 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") { } else if (state.type == "21") {
navTo(`/subpackage/after-sale/additional-equipment/additional-equipment-confirm?id=${state.id}`) navTo(`/subpackage/after-sale/additional-equipment/additional-equipment-confirm?id=${state.id}`)
} else if (state.type == "22") { } else if (state.type == "22") {
var vehiclePlateColor = state.vehicleId.split("_")[1] var vehiclePlateColor = state.vehicleId.split("_")[1]
navTo(`/subpackage/after-sale/blacklist-query/list?vehiclePlate=${vehiclePlate}&vehiclePlateColor=${vehiclePlateColor}`) navTo(`/subpackage/after-sale/blacklist-query/list?vehiclePlate=${vehiclePlate}&vehiclePlateColor=${vehiclePlateColor}`)
} else if (state.type == "31") { } 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") { } else if (state.type == "32") {
navTo(`/subpackage/after-sale/month-statement/month-statement-query-list?vehicleId=${state.vehicleId}`) navTo(`/subpackage/after-sale/month-statement/month-statement-query-list?vehicleId=${state.vehicleId}`)
} else if (state.type == "33") { } else if (state.type == "33") {
} }
} }


const searchVehicleInfoQuery = () => {

// 查询车辆信息
const queryCarMsg = () => {
const options = { const options = {
type: 2, type: 2,
data: { data: {
vehicleId: state.vehicleId
"openId": getItem('openId'),
"vehicleId": state.vehicleId
}, },
method: "POST", method: "POST",
showLoading: true, showLoading: true,
}; };
return new Promise(async (resolve, reject) => { 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); 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); resolve(data);
}).catch((error) => { }).catch((error) => {
reject(error); reject(error);
}); });

} }
</script> </script>



+ 34
- 10
subpackage/orders/invoiceApply/invoiceList.vue Просмотреть файл



<view class="listbox" v-if="state.data.length>0"> <view class="listbox" v-if="state.data.length>0">
<view class="card-no-active" v-for="(item,index) in state.data"> <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="content">
<view class="row"> <view class="row">
开票日期:<text>{{item.invoiceDate}}</text>
订单类型:<text>{{item.invoiceTypeName}}</text>
</view>
<view class="row">
车牌号:<text>{{item.remarks}}</text>
</view> </view>
<view class="row"> <view class="row">
发票抬头:<text>{{item.buyerName}}</text> 发票抬头:<text>{{item.buyerName}}</text>
<view class="row"> <view class="row">
状态:<text>{{item.status==1?'正常':"红冲"}}</text> 状态:<text>{{item.status==1?'正常':"红冲"}}</text>
</view> </view>
<view class="row">
商品价:<text>¥{{item.goodsAmount}}</text>
</view>
<view class="row">
开票日期:<text>{{item.invoiceOpenTime}}</text>
</view>
</view> </view>
<view class="btns"> <view class="btns">
<button @click="down(item.fileUrl)">开票</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> -->
const down = (fileUrl) => { const down = (fileUrl) => {
uni.downloadFile({ uni.downloadFile({
url: fileUrl, //仅为示例,并非真实的资源 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 Просмотреть файл

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

+ 10
- 0
utils/utils.ts Просмотреть файл



return `${[year, month, day].map(formatNumber).join('-')}T${[hour, minute, second].map(formatNumber).join(':')}` 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) { export function expireDate(date : any) {

Загрузка…
Отмена
Сохранить