提交 894f635d authored 作者: 彭涛's avatar 彭涛

bug修复

上级 f1a1ef4d
......@@ -27,108 +27,114 @@
} from '../../static/util/fun.js'
import api from '../../static/util/api.js'
export default {
props:{
type:{
type:Number,
default:0
props: {
type: {
type: Number,
default: 0
},
packageId:{
type:Number,
default:0
packageId: {
type: Number,
default: 0
}
},
data() {
return {
dialogShow: false,
saveurl:'',
saveurl: '',
}
},
onLoad() {
},
methods: {
// 点击actionSheet回调
onShareAppMessage(res) {
return {
title:'张晓敏邀请您绑定成为他的用电企业',
path: '/pages/login/login?id=张晓敏',//分享的页面路径
imageUrl:'https://fire.huoshitou.net/profile/icon/yaoqing.png',
content: '邀请您绑定成为他的用电企业',
desc: '电客',
success:(res) => {
console.log('111111')
console.log(res)
},
fail:(err) => {
console.log('222222')
console.log(err)
}
}
},
onShareAppMessage(res) {
return {
title: '张晓敏邀请您绑定成为他的用电企业',
path: '/pages/login/login?id=张晓敏', //分享的页面路径
imageUrl: 'https://fire.huoshitou.net/profile/icon/yaoqing.png',
content: '邀请您绑定成为他的用电企业',
desc: '电客',
success: (res) => {
console.log('111111')
console.log(res)
},
fail: (err) => {
console.log('222222')
console.log(err)
}
}
},
//保存图片到手机相册
save() {
let that=this
let that = this
uni.showLoading({
title: '正在保存中'
})
let utype = uni.getStorageSync('type')
let userId = uni.getStorageSync('user').electricId
console.log('that.type',that.type)
if(that.type==1){
let inviteCode=uni.getStorageSync('user').inviteCode
get(api.getWxCode,{
page:'pages/login/login',
scene:'3&&'+userId,
console.log('that.type', that.type)
if (that.type == 1) {
let inviteCode = uni.getStorageSync('user').inviteCode
get(api.getWxCode, {
page: 'pages/login/login',
scene: '3&&' + userId,
// scene:'?inviteType=3',
}).then(res=>{
if(res.code==200){
that.saveurl=res.msg
}).then(res => {
uni.hideLoading()
if (res.code == 200) {
that.saveurl = res.msg
that.saveimg(that.saveurl)
}else{
} else {
uni.showToast({
title:res.msg,
icon:'none'
title: res.msg,
icon: 'none'
})
}
})
}else if(that.type==2){
console.log('that.packageId',that.packageId)
get(api.getWxCode,{
page:'pages/group/groupInfo',
scene:that.packageId,
}).then(res=>{
if(res.code==200){
that.saveurl=res.msg
} else if (that.type == 2) {
console.log('that.packageId', that.packageId)
get(api.getWxCode, {
page: 'pages/group/groupInfo',
scene: that.packageId,
}).then(res => {
uni.hideLoading()
if (res.code == 200) {
that.saveurl = res.msg
that.saveimg(that.saveurl)
}else{
} else {
uni.showToast({
title:res.msg,
icon:'none'
title: res.msg,
icon: 'none'
})
}
})
}else if(that.type==3){
console.log('that.packageId',that.packageId)
get(api.getWxCode,{
page:'pages/login/login',
scene:'33&&'+userId,
}).then(res=>{
if(res.code==200){
that.saveurl=res.msg
} else if (that.type == 3) {
console.log('that.packageId', that.packageId)
get(api.getWxCode, {
page: 'pages/login/login',
scene: '33&&' + userId,
}).then(res => {
uni.hideLoading()
if (res.code == 200) {
that.saveurl = res.msg
that.saveimg(that.saveurl)
}else{
} else {
uni.showToast({
title:res.msg,
icon:'none'
title: res.msg,
icon: 'none'
})
}
})
}
},
saveimg(url){
saveimg(url) {
console.log(url)
let newUrl = url.replace('httpss:','https:')
let that=this
let newUrl = url.replace('httpss:', 'https:')
let that = this
uni.downloadFile({
url:newUrl, //仅为示例,并非真实的资源
url: newUrl, //仅为示例,并非真实的资源
success: (res) => {
if (res.statusCode === 200) {
uni.saveImageToPhotosAlbum({
......@@ -144,7 +150,7 @@
});
}
});
}
},
fail: function() {
......@@ -171,7 +177,8 @@
left: 0;
top: 0;
z-index: 100;
button::after{
button::after {
display: none;
}
......
......@@ -107,7 +107,7 @@
<view class="uploadImg" @click="chooseImg(2)">
<image v-if="powerOfAttorney" :src="powerOfAttorney" mode=""></image>
<image v-else src="../../static/images/upload_bg.png" mode=""></image>
<view class="template" @click="Download">下载模板</view>
<view class="template" @click="Download">下载委托书</view>
</view>
<view class="border_bottom"></view>
</view>
......@@ -444,6 +444,40 @@
this.isClick = true
},
methods: {
// 下载委托书
Download(){
get(api.downloadPowerOfAttorney).then(res => {
if (res.code == 200) {
let url = res.msg.replace('http:', 'https:')
const downloadTask = uni.downloadFile({
url: url, //仅为示例,并非真实的资源
filePath: wx.env.USER_DATA_PATH + '/委托书.docx',
success: (res) => {
if (res.statusCode == 200) {
uni.openDocument({
filePath: res.filePath,
// fileType: "pdf",
showMenu: true,
success: function() {
console.log('打开文档成功');
},
})
}
}
});
downloadTask.onProgressUpdate((res) => {
console.log('下载进度' + res.progress);
console.log('已经下载的数据长度' + res.totalBytesWritten);
console.log('预期需要下载的数据总长度' + res.totalBytesExpectedToWrite);
});
} else {
uni.showToast({
title: res.msg,
icon: 'none'
})
}
})
},
// switch开关选择
switchChange(event) {
let flag = event.target.value
......
......@@ -136,7 +136,7 @@
<!-- 满足弹窗start -->
<view class="success_dialog" v-if="successDialog">
<view class="success_dialog_content">
<image src="../../static/images/index/group.png" mode=""></image>
<image src="https://fire.huoshitou.net/profile/icon/dianke_bg.png" mode=""></image>
<view class="success">恭喜您,选中的企业参与成功!</view>
<view>快去邀请其他朋友一起参与吧,参与人数越多,收益越多!</view>
</view>
......
......@@ -56,7 +56,7 @@
<view class="particulars_btns">
<view @click="linktoContracts(i.id,i.year)" v-if="i.status==5">选择合同</view>
<view @click="linktoContracts(i.id,i.year)" v-if="i.status==8">重新选择合同</view>
<view @click="toParticulars(i.id,i.status)">查看详情</view>
<view @click="toParticulars(i.id,i.status,i.isCompanyPass,i.isContractPass)">查看详情</view>
</view>
</view>
</view>
......@@ -135,9 +135,9 @@
areaValue: '',
enquirydata: [],
enquirydata2: [{
ename:'环节环节发哈快结婚副科级安徽发金凤凰卡机是道森股份',
status:13,
platformContractSpread:10
ename: '环节环节发哈快结婚副科级安徽发金凤凰卡机是道森股份',
status: 13,
platformContractSpread: 10
}],
remainder: [],
remaindering: [],
......@@ -253,9 +253,10 @@
this.araeShow = false
},
//跳往详情页
toParticulars(id, status) {
toParticulars(id, status, com, con) {
uni.navigateTo({
url: '/pagesA/enquiry/Particulars?id=' + id + '&status=' + status
url: '/pagesA/enquiry/Particulars?id=' + id + '&status=' + status + '&isCompanyPass=' + com +
'&isContractPass=' + con
})
},
//跳往选择合同
......@@ -374,7 +375,8 @@
font-size: 28rpx;
position: relative;
margin-bottom: 32rpx;
.item_company{
.item_company {
width: 82%;
}
}
......
......@@ -17,12 +17,15 @@
<view v-if="type==2">居间价差(厘/千瓦时):
{{messages.platformIntermediateSpread?messages.platformIntermediateSpread: messages.intermediateSpread}}
</view>
<view v-if="messages.commissionRatio">佣金比例%:{{messages.commissionRatio}}</view>
<view>用电年份: {{messages.year}}</view>
<view class="df_block">企业电费通知单:
<view class="dftzd_img" style="height: auto;">
<image v-for="(i,index) in messages.enterpriseElectricityNoticeBill" :key="index" :src="i"
mode="" @click="previewImage(i)"></image>
</view>
<text style="color: #1989fa; margin-left: 10rpx;"
@click="lookFile(messages.enterpriseElectricityNoticeBill)">点击查看</text>
<!-- <view class=" dftzd_img" style="height: auto;">
<image v-for="(i,index) in imgList" :key="index" :src="i" mode="" @click="previewImage(i)">
</image>
</view> -->
</view>
<view>备注: {{messages.remark}}</view>
</view>
......@@ -57,7 +60,21 @@
</view>
<view class="timeline" style="background-color: #f4f5f7; padding: 32rpx;">
<u-time-line class="u-time-line">
<u-time-line-item v-if="status==4||status==2||status==1">
<u-time-line-item v-if="isContractPass==2||isContractPass==0">
<template v-slot:node>
<view class="u-node" style="background: #1989fa;"></view>
</template>
<template v-slot:content>
<view>
<view class="u-order-title" style="font-size: 30rpx;">合同待审核</view>
<view class="u-order-desc" style="font-size: 24rpx;" v-if="status==4">合同审核通过</view>
<view class="u-order-desc" style="font-size: 24rpx;" v-if="status==7">合同审核中</view>
<view class="u-order-desc" style="font-size: 24rpx;" v-if="status==8">
合同审核不通过,不通过理由:{{messages.noReason}}</view>
</view>
</template>
</u-time-line-item>
<u-time-line-item v-if="isCompanyPass==2||isCompanyPass==0">
<!-- 此处没有自定义左边的内容,会默认显示一个点 -->
<template v-slot:node>
<view class="u-node" style="background: #1989fa;"></view>
......@@ -65,11 +82,11 @@
<template v-slot:content>
<view>
<view class="u-order-title" style="font-size: 30rpx;">售电公司审核</view>
<view class="u-order-desc" style="font-size: 24rpx;" v-if="status==4">售电公司审核通过</view>
<view class="u-order-desc" style="font-size: 24rpx;" v-if="status==4||status==5||status==7">
售电公司审核通过</view>
<view class="u-order-desc" style="font-size: 24rpx;" v-if="status==1">售电公司审核中</view>
<view class="u-order-desc" style="font-size: 24rpx;" v-if="status==2">
售电公司审核不通过,不通过理由:{{messages.noReasonCompany}}</view>
<!-- <view class="u-order-time">2019-12-06 22:30</view> -->
</view>
</template>
</u-time-line-item>
......@@ -82,21 +99,21 @@
<view>
<view class="u-order-title" style="font-size: 30rpx;">平台审核</view>
<view class="u-order-desc" style="font-size: 24rpx;"
v-if="status==3||status==4||status==2||status==1">平台审核通过</view>
<view class="u-order-desc" style="font-size: 24rpx;" v-if="status==5">待上传合同</view>
<view class="u-order-desc" style="font-size: 24rpx;" v-if="status==7">合同待审核</view>
v-if="status==3||status==4||status==2||status==1||status==5||status==7">平台审核通过</view>
<view class="u-order-desc" style="font-size: 24rpx;" v-if="status==8">
合同审核不通过,不通过理由:{{messages.noReason}}</view>
<view class="u-order-desc" style="font-size: 24rpx;" v-if="status==10">
<!-- 平台审核不通过,不通过理由 -->审核意见:{{messages.noReason}}</view>
审核意见:{{messages.noReason}}
</view>
<view class="u-order-desc" style="font-size: 24rpx;" v-if="status==12">
<!-- 风控审核不通过,不通过理由 -->审核意见:{{messages.noReason}}</view>
审核意见:{{messages.noReason}}
</view>
<view class="u-order-desc" style="font-size: 24rpx;" v-if="status==14">
<!-- 总经理审核不通过,不通过理由 -->审核意见:{{messages.noReason}}</view>
<view class="u-order-desc" style="font-size: 24rpx;" v-if="status==9">待平台审核<!-- 待客服审核 --></view>
<view class="u-order-desc" style="font-size: 24rpx;" v-if="status==11">待平台审核<!-- 待风控审核 --></view>
<view class="u-order-desc" style="font-size: 24rpx;" v-if="status==13">待平台审核<!-- 待总经理审核 --></view>
<!-- <view class="u-order-time">2019-12-06 22:30</view> -->
审核意见:{{messages.noReason}}
</view>
<view class="u-order-desc" style="font-size: 24rpx;" v-if="status==9">待平台审核</view>
<view class="u-order-desc" style="font-size: 24rpx;" v-if="status==11">待平台审核</view>
<view class="u-order-desc" style="font-size: 24rpx;" v-if="status==13">待平台审核</view>
</view>
</template>
</u-time-line-item>
......@@ -121,6 +138,9 @@
messages: '',
userType: '0', //企业类型
type: '', //用户类型
imgList: [], // 电费通知单
isCompanyPass: 1, // 是否在售电公司审核
isContractPass: 1, // 是否在合同审核
}
},
created() {
......@@ -137,23 +157,27 @@
onLoad(options) {
let that = this
this.status = options.status
this.isCompanyPass = options.isCompanyPass
console.log(this.isCompanyPass)
this.isContractPass = options.isContractPass
console.log(this.status)
get(api.independentInquiryDetails, {
id: options.id
}).then(res => {
if (res.code == 200) {
that.messages = res.data
that.messages.enterpriseElectricityNoticeBill = JSON.parse(that.messages
.enterpriseElectricityNoticeBill)
// console.log(res.data.enterpriseElectricityNoticeBill)
// that.imgList = res.data.enterpriseElectricityNoticeBill.split(',')
// console.log(that.imgList)
}
})
},
methods: {
//预览电费单
previewImage(url) {
uni.previewImage({
urls: [url],
});
lookFile(url) {
uni.navigateTo({
url: '/pagesA/Contracts/attachment/attachment?appendix=' + url
})
},
//车看合同附件
checkFile(url, id) {
......
......@@ -153,5 +153,6 @@ erp.verifiedBefore = HOST + 'enterprise/verifiedBefore' // 企业认证提交前
erp.switchIdentit = HOST + 'common/switchIdentity' // 身份切换
erp.participatePackage = HOST + 'common/participatePackage' // 用电企业参与拼团
erp.isCommission = HOST + 'enterprise/isCommission' // 高级会员是否可以委托电客拼团
erp.downloadPowerOfAttorney = HOST + 'common/downloadPowerOfAttorney'// 企业认证下载委托书
export default erp;
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论